diff --git a/src/BIMDataComponents/BIMDataInputOutlined/BIMDataInputOutlined.vue b/src/BIMDataComponents/BIMDataInputOutlined/BIMDataInputOutlined.vue
new file mode 100644
index 00000000..b3e3f1c2
--- /dev/null
+++ b/src/BIMDataComponents/BIMDataInputOutlined/BIMDataInputOutlined.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
diff --git a/src/BIMDataComponents/BIMDataInputOutlined/_BIMDataInputOutlined.scss b/src/BIMDataComponents/BIMDataInputOutlined/_BIMDataInputOutlined.scss
new file mode 100644
index 00000000..4194ab44
--- /dev/null
+++ b/src/BIMDataComponents/BIMDataInputOutlined/_BIMDataInputOutlined.scss
@@ -0,0 +1,96 @@
+@import "../../assets/scss/mixins/_font-size.scss";
+
+input:-webkit-autofill {
+ box-shadow: 0 0 0px 1000px var(--color-white) inset;
+}
+
+.bimdata-input-outlined {
+ position: relative;
+ font-family: var(--primary-font);
+ color: var(--color-primary);
+ fieldset {
+ margin: 0;
+ padding: 0;
+ border: none;
+ label {
+ display: block;
+ font-size: 10px;
+ text-transform: uppercase;
+ font-weight: bold;
+ letter-spacing: 0.6px;
+ color: var(--color-granite-light);
+ }
+ }
+ &__container {
+ padding: 0 calc(var(--spacing-unit) / 2);
+ width: 100%;
+ height: 100%;
+ border: 1px solid var(--color-silver);
+ border-radius: 3px;
+ display: flex;
+ flex: 1;
+ font-size: 14px;
+ overflow: hidden;
+ position: relative;
+ z-index: 0;
+ input {
+ width: 100%;
+ min-height: 32px;
+ font-size: 14px;
+ color: var(--color-primary);
+ background-color: transparent;
+ border-style: none;
+ cursor: auto;
+ font-family: inherit;
+ &:focus {
+ outline: none;
+ }
+ }
+ &__prefix-inner,
+ &__suffix-inner {
+ align-content: center;
+ align-items: center;
+ display: flex;
+ justify-content: center;
+ }
+ }
+ .error {
+ color: var(--color-high);
+ font-size: 11px;
+ }
+ .success {
+ color: var(--color-success);
+ font-size: 11px;
+ }
+ &.disabled {
+ opacity: 0.6;
+ cursor: default;
+ }
+ &.error {
+ .bimdata-input-outlined__container {
+ border-color: var(--color-high);
+ background-color: var(--color-high-lighter);
+ }
+ }
+ &.success {
+ .bimdata-input-outlined__container {
+ border-color: var(--color-success);
+ background-color: var(--color-success-lighter);
+ }
+ }
+ .counter {
+ font-size: 11px;
+ letter-spacing: -0.5px;
+ color: var(--color-granite-light);
+ }
+ &[type="file"] {
+ .bimdata-input-outlined__container {
+ border: none;
+ }
+ }
+ &[type="number"] {
+ input {
+ appearance: textfield;
+ }
+ }
+}
diff --git a/src/BIMDataComponents/index.js b/src/BIMDataComponents/index.js
index cb169df1..dee2bb2c 100644
--- a/src/BIMDataComponents/index.js
+++ b/src/BIMDataComponents/index.js
@@ -21,6 +21,7 @@ export { default as BIMDataIcon } from "./BIMDataIcon/BIMDataIcon.vue";
export * from "./BIMDataIcon/BIMDataIconStandalone/index.js";
export { default as BIMDataIllustration } from "./BIMDataIllustration/BIMDataIllustration.vue";
export { default as BIMDataInput } from "./BIMDataInput/BIMDataInput.vue";
+export { default as BIMDataInputOutlined } from "./BIMDataInputOutlined/BIMDataInputOutlined.vue";
export { default as BIMDataLoading } from "./BIMDataLoading/BIMDataLoading.vue";
export { default as BIMDataMenu } from "./BIMDataMenu/BIMDataMenu.vue";
export { default as BIMDataMenuInline } from "./BIMDataMenuInline/BIMDataMenuInline.vue";
diff --git a/src/web/views/Components/Input/Input.vue b/src/web/views/Components/Input/Input.vue
index a2cd392a..8878b884 100644
--- a/src/web/views/Components/Input/Input.vue
+++ b/src/web/views/Components/Input/Input.vue
@@ -4,6 +4,7 @@
{{ $route.name }}
+
Basic input
+ >
@@ -75,8 +77,7 @@
{{ getMargin() }}
>
- {{ getInputIcon() }}
-
+ {{ getInputIcon() }}
</BIMDataInput>
@@ -113,6 +114,8 @@
+
+
@@ -123,10 +126,12 @@ import propsData from "./props-data.js";
import slotsData from "./slots-data.js";
// Components
import ComponentCode from "../../Elements/ComponentCode/ComponentCode.vue";
+import InputOutlined from "./InputOutlined.vue";
export default {
components: {
ComponentCode,
+ InputOutlined,
},
data() {
return {
@@ -165,18 +170,10 @@ export default {
}
},
getLoading() {
- if (this.loading) {
- return true;
- } else {
- return false;
- }
+ return this.loading;
},
getDisabled() {
- if (this.disabled) {
- return true;
- } else {
- return false;
- }
+ return this.disabled;
},
getInputIcon() {
if (this.inputIcon) {
diff --git a/src/web/views/Components/Input/InputOutlined.vue b/src/web/views/Components/Input/InputOutlined.vue
new file mode 100644
index 00000000..1dc3c214
--- /dev/null
+++ b/src/web/views/Components/Input/InputOutlined.vue
@@ -0,0 +1,272 @@
+
+
+
Outlined Input
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Slots
+
+
+
+
+
+
+
+
+
+ Margin
+
+
+
+
+
+
+ {{ getImportContent() }}
+
+
+
+
+ <BIMDataInputOutlined
+ v-model="textInput"
+ placeholder="Your placeholder here"
+ {{ error ? ':error="true"' : "" }}
+ {{ errorMessage ? 'errorMessage="your error message here"' : "" }}
+ {{ success ? ':success="true"' : "" }}
+ {{
+ successMessage ? 'successMessage="your success message here"' : ""
+ }}
+ {{ loading ? ':loading="true"' : "" }}
+ {{ disabled ? ':disabled="true"' : "" }}
+ {{ getMargin() }}
+ >
+
+ {{ getPrefixSlot() }}
+ {{ getPrefixInnerSlot() }}
+ {{ getSuffixInnerSlot() }}
+ {{ getSuffixSlot() }}
+
+
+ </BIMDataInputOutlined>
+
+
+
+
+
+ Props:
+
+
+
+ nota bene:
+
+
+ This component use the $attrs attribute provided by Vue. Therefore all
+ native attribute of this tag are workable.
+
+ More info about $attrs
+
+
+
+
+
+ Events:
+
+
+
+
+
+ Slots:
+
+
+
+
+
+
+
diff --git a/src/web/views/Components/Input/events-data.js b/src/web/views/Components/Input/events-data.js
index 037d022f..771522f0 100644
--- a/src/web/views/Components/Input/events-data.js
+++ b/src/web/views/Components/Input/events-data.js
@@ -1,10 +1,9 @@
/* eslint-disable */
export default [
[ "Event name", "Payload" ],
- [ "update:modelValue", "The input value." ],
[ "blur", "The native blur event." ],
- [ "keypress", "The native keypress event." ],
+ [ "change", "To catch the Event object"],
[ "focus", "The native focus event." ],
- ["change", "To catch the Event object"],
-
+ [ "keypress", "The native keypress event." ],
+ [ "update:modelValue", "The input value." ],
];
diff --git a/src/web/views/Components/Input/props-data.js b/src/web/views/Components/Input/props-data.js
index 237533aa..1e802373 100644
--- a/src/web/views/Components/Input/props-data.js
+++ b/src/web/views/Components/Input/props-data.js
@@ -1,24 +1,6 @@
/* eslint-disable */
export default [
[ "Props", "Type", "Default value", "Description" ],
- [
- "modelValue",
- "String",
- "",
- "Use this prop to bind the input value to a variable.",
- ],
- [
- "margin",
- "String",
- "12px 0",
- "Custom input margins",
- ],
- [
- "placeholder",
- "String",
- "' '",
- "Use this props to add a placeholder to your input.",
- ],
[
"autocomplete",
"Boolean",
@@ -32,33 +14,51 @@ export default [
"Use this boolean to disabled your input.",
],
[
- "loading",
+ "error",
"Boolean",
"false",
- "",
+ "Use this boolean to check if your input is incorrect.",
],
[
- "success",
+ "errorMessage",
+ "String",
+ "' '",
+ "Use this props to add an error message to your input.",
+ ],
+ [
+ "loading",
"Boolean",
"false",
- "Use this boolean to check if your input is good.",
+ "",
],
[
- "successMessage",
+ "margin",
+ "String",
+ "12px 0",
+ "Custom input margins",
+ ],
+ [
+ "modelValue",
+ "String",
+ "",
+ "Use this prop to bind the input value to a variable.",
+ ],
+ [
+ "placeholder",
"String",
"' '",
- "Use this props to add a success message to your input.",
+ "Use this props to add a placeholder to your input.",
],
[
- "error",
+ "success",
"Boolean",
"false",
- "Use this boolean to check if your input is bad.",
+ "Use this boolean to check if your input is correct.",
],
[
- "errorMessage",
+ "successMessage",
"String",
"' '",
- "Use this props to add an error message to your input.",
+ "Use this props to add a success message to your input.",
],
];
diff --git a/src/web/views/Components/Input/props-outlined-input.js b/src/web/views/Components/Input/props-outlined-input.js
new file mode 100644
index 00000000..a96b6dc8
--- /dev/null
+++ b/src/web/views/Components/Input/props-outlined-input.js
@@ -0,0 +1,94 @@
+/* eslint-disable */
+export default [
+ [ "Props", "Type", "Default value", "Description"],
+ [
+ "autocomplete",
+ "Boolean",
+ "false",
+ "Whether 'autocomplete' attribute is 'on' or 'off'."
+ ],
+ [
+ "counter",
+ "Boolean",
+ "false",
+ "Specifies whether the input should have a counter at the bottom.",
+ ],
+ [
+ "disabled",
+ "Boolean",
+ "false",
+ "Use this boolean to disabled your input.",
+ ],
+ [
+ "error",
+ "Boolean",
+ "false",
+ "Use this boolean to check if your input is incorrect.",
+ ],
+ [
+ "errorMessage",
+ "String",
+ "' '",
+ "Use this props to add an error message to your input.",
+ ],
+ [
+ "inputType",
+ "String",
+ "'text'",
+ "Will be used as the type attribute of the input element among the following possibilities : 'email', 'file', 'password', 'number', 'text', 'tel', 'time', 'url'.",
+ ],
+ [
+ "label",
+ "Boolean",
+ "false",
+ "Add a label above the input field.",
+ ],
+ [
+ "loading",
+ "Boolean",
+ "false",
+ "",
+ ],
+ [
+ "margin",
+ "String",
+ "12px 0",
+ "Custom input margins.",
+ ],
+ [
+ "maxLength",
+ "Number",
+ "100",
+ "Specifies maximum length of input.",
+ ],
+ [
+ "modelValue",
+ "String",
+ "",
+ "Use this prop to bind the input value to a variable.",
+ ],
+ [
+ "placeholder",
+ "String",
+ "' '",
+ "Use this props to add a placeholder to your input.",
+ ],
+ [
+ "success",
+ "Boolean",
+ "false",
+ "Use this boolean to check if your input is correct.",
+ ],
+ [
+ "successMessage",
+ "String",
+ "' '",
+ "Use this props to add a success message to your input.",
+ ],
+ [
+ "width",
+ "String",
+ "'250px'",
+ "Use this props to custom input width.",
+ ],
+];
diff --git a/src/web/views/Components/Input/slots-outlined-input.js b/src/web/views/Components/Input/slots-outlined-input.js
new file mode 100644
index 00000000..52d95216
--- /dev/null
+++ b/src/web/views/Components/Input/slots-outlined-input.js
@@ -0,0 +1,10 @@
+/* eslint-disable */
+export default [
+ [ "Slot name", "Description" ],
+ [ "label", "Use this slot to add a label." ],
+ [ "prefix", "Use this slot for pass custom elements in front of outer input, such as is icons etc." ],
+ [ "prefixInner", "Use this slot for pass custom elements in front of inner input, such as is icons etc." ],
+ [ "suffixInner", "Use this slot for pass custom elements behind inner input, such as is icons etc." ],
+ [ "suffix", "Use this slot for pass custom elements behind outer input, such as is icons etc." ],
+
+];