@bimdata/design-system 2.1.0-rc.2 → 2.1.0-rc.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/package.json +2 -2
  2. package/src/BIMDataComponents/BIMDataDropdownList/BIMDataDropdownList.vue +10 -0
  3. package/src/BIMDataComponents/BIMDataDropdownList/_BIMDataDropdownList.scss +0 -1
  4. package/src/BIMDataComponents/BIMDataDropdownMenu/_BIMDataDropdownMenu.scss +0 -1
  5. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconAddGavel.vue +19 -0
  6. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconAddList.vue +19 -0
  7. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconCaret.vue +19 -0
  8. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconCreateSpace.vue +20 -0
  9. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconCreateZone.vue +20 -0
  10. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/{BIMDataIconDeploy.vue → BIMDataIconGavel.vue} +3 -3
  11. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconNamingConvention.vue +20 -0
  12. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconPlan.vue +20 -0
  13. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconRotate.vue +20 -0
  14. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconSpace2.vue +19 -0
  15. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconZone2.vue +19 -0
  16. package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js +11 -1
  17. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/AddGavel.vue +21 -0
  18. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/AddList.vue +27 -0
  19. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Caret.vue +3 -0
  20. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/CreateSpace.vue +17 -0
  21. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/CreateZone.vue +32 -0
  22. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Gavel.vue +5 -0
  23. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/List.vue +6 -12
  24. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/NamingConvention.vue +12 -0
  25. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Plan.vue +7 -0
  26. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Rotate.vue +21 -0
  27. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Space2.vue +9 -0
  28. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Zone2.vue +24 -0
  29. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/index.js +22 -2
  30. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/CreateList.vue +214 -0
  31. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/EmptyNamingConvention.vue +47 -0
  32. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ManageList.vue +206 -0
  33. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/RenameFile.vue +175 -0
  34. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ShortcutMoveDwg.vue +145 -0
  35. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ShortcutMovePlan.vue +181 -0
  36. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ShortcutOpenDwg.vue +142 -0
  37. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ShortcutOpenPlan.vue +178 -0
  38. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ShortcutRotateDwg.vue +123 -0
  39. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ShortcutRotatePlan.vue +159 -0
  40. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ShortcutZoomDwg.vue +100 -0
  41. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ShortcutZoomPlan.vue +136 -0
  42. package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/index.js +26 -2
  43. package/src/BIMDataComponents/BIMDataInput/BIMDataInput.vue +3 -2
  44. package/src/BIMDataComponents/BIMDataInput/_BIMDataInput.scss +8 -8
  45. package/src/BIMDataComponents/BIMDataInputOutlined/BIMDataInputOutlined.vue +182 -0
  46. package/src/BIMDataComponents/BIMDataInputOutlined/_BIMDataInputOutlined.scss +96 -0
  47. package/src/BIMDataComponents/BIMDataSearch/BIMDataSearch.vue +6 -1
  48. package/src/BIMDataComponents/BIMDataSearch/_BIMDataSearch.scss +6 -0
  49. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelectMulti.vue +24 -7
  50. package/src/BIMDataComponents/BIMDataSelect/BIMDataSelectSingle.vue +23 -6
  51. package/src/BIMDataComponents/BIMDataSlider/_BIMDataSlider.scss +2 -0
  52. package/src/BIMDataComponents/BIMDataTable/BIMDataTable.vue +224 -35
  53. package/src/BIMDataComponents/BIMDataTable/_BIMDataTable.scss +4 -0
  54. package/src/BIMDataComponents/BIMDataTable/column-filters/ColumnFilters.vue +91 -0
  55. package/src/BIMDataComponents/BIMDataTable/column-filters/_ColumnFilters.scss +14 -0
  56. package/src/BIMDataComponents/BIMDataTable/column-sorting/ColumnSorting.vue +66 -0
  57. package/src/BIMDataComponents/BIMDataTree/BIMDataTree.vue +123 -0
  58. package/src/BIMDataComponents/BIMDataTree/Node.vue +241 -0
  59. package/src/BIMDataComponents/BIMDataTree/state.js +239 -0
  60. package/src/BIMDataComponents/index.js +2 -0
  61. package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Deploy.vue +0 -3
@@ -0,0 +1,136 @@
1
+ <template>
2
+ <g>
3
+ <rect
4
+ x="36.5"
5
+ y="19.5"
6
+ width="128"
7
+ height="108"
8
+ fill="#F2F2F2"
9
+ stroke="#9E9E9E"
10
+ />
11
+ <path
12
+ fill-rule="evenodd"
13
+ clip-rule="evenodd"
14
+ d="M117.155 101.284H80.1506V100.284H117.155V101.284Z"
15
+ fill="#2F374A"
16
+ />
17
+ <path
18
+ fill-rule="evenodd"
19
+ clip-rule="evenodd"
20
+ d="M74.9045 80.4999L74.9045 67.4999L75.9045 67.4999L75.9045 80.4999L74.9045 80.4999Z"
21
+ fill="#2F374A"
22
+ />
23
+ <path
24
+ fill-rule="evenodd"
25
+ clip-rule="evenodd"
26
+ d="M74.9045 62.0065L74.9045 49.0065L75.9045 49.0065L75.9045 62.0065L74.9045 62.0065Z"
27
+ fill="#2F374A"
28
+ />
29
+ <path
30
+ fill-rule="evenodd"
31
+ clip-rule="evenodd"
32
+ d="M125.095 81.5802L125.095 52.1874L126.095 52.1874L126.095 81.5802L125.095 81.5802Z"
33
+ fill="#2F374A"
34
+ />
35
+ <path
36
+ d="M96.0201 46.3783H98.1179V74.6978H96.0201V46.3783Z"
37
+ fill="#2F374A"
38
+ />
39
+ <path
40
+ d="M98.118 62.0065L98.118 64.1042L91.615 64.1042L91.615 62.0065L98.118 62.0065Z"
41
+ fill="#2F374A"
42
+ />
43
+ <path
44
+ d="M85.6365 62.0065L85.6365 64.1042L76.4064 64.1042L76.4064 62.0065L85.6365 62.0065Z"
45
+ fill="#2F374A"
46
+ />
47
+ <path
48
+ d="M113.415 84.3412L113.415 86.4389L95.9699 86.4389L95.9699 84.3412L113.415 84.3412Z"
49
+ fill="#2F374A"
50
+ />
51
+ <path
52
+ d="M123.945 84.3412L123.945 86.4389L119.392 86.4389L119.392 84.3412L123.945 84.3412Z"
53
+ fill="#2F374A"
54
+ />
55
+ <path
56
+ d="M89.9893 84.3412L89.9893 86.4389L76.4064 86.4389L76.4064 84.3412L89.9893 84.3412Z"
57
+ fill="#2F374A"
58
+ />
59
+ <path
60
+ d="M91.6183 56.2433H92.6695V62.0645H91.6183V56.2433Z"
61
+ fill="#2F374A"
62
+ />
63
+ <path
64
+ fill-rule="evenodd"
65
+ clip-rule="evenodd"
66
+ d="M87.7681 57.3413C89.0606 56.4765 90.608 56.2187 91.6402 56.2457L91.635 56.4456C90.6331 56.4194 89.1293 56.6711 87.8793 57.5075C86.6349 58.3401 85.6353 59.7558 85.6353 62.0784H85.4353C85.4353 59.6872 86.4698 58.21 87.7681 57.3413Z"
67
+ fill="#2F374A"
68
+ />
69
+ <path
70
+ d="M95.9698 78.6144H97.0211V84.4356H95.9698V78.6144Z"
71
+ fill="#2F374A"
72
+ />
73
+ <path
74
+ d="M113.415 92.2506L112.364 92.2506L112.364 86.4294L113.415 86.4294L113.415 92.2506Z"
75
+ fill="#2F374A"
76
+ />
77
+ <path
78
+ fill-rule="evenodd"
79
+ clip-rule="evenodd"
80
+ d="M92.122 79.7093C93.4138 78.8438 94.9601 78.5859 95.9918 78.6128L95.9865 78.8128C94.9854 78.7866 93.4826 79.0385 92.2333 79.8754C90.9898 80.7085 89.9908 82.1252 89.9908 84.4495H89.7908C89.7908 82.0568 90.8245 80.5785 92.122 79.7093Z"
81
+ fill="#2F374A"
82
+ />
83
+ <path
84
+ fill-rule="evenodd"
85
+ clip-rule="evenodd"
86
+ d="M117.263 91.1557C115.971 92.0212 114.424 92.2791 113.393 92.2521L113.398 92.0522C114.399 92.0784 115.902 91.8265 117.151 90.9896C118.395 90.1564 119.394 88.7398 119.394 86.4155L119.594 86.4155C119.594 88.8082 118.56 90.2864 117.263 91.1557Z"
87
+ fill="#2F374A"
88
+ />
89
+ <path
90
+ fill-rule="evenodd"
91
+ clip-rule="evenodd"
92
+ d="M73.4045 44.2158H127.595V54.4317H123.595V48.2158H77.4045V51.6931H73.4045V44.2158ZM77.4045 57.1704V68.1249H73.4045V57.1704H77.4045ZM123.595 98.784V77.6079H127.595V102.784H113.048V98.784H123.595ZM77.4045 98.784V80.1133H73.4045V102.784H87.9523V98.784H77.4045Z"
93
+ fill="#2F374A"
94
+ />
95
+ <path
96
+ d="M115.392 68.9561L115.065 97.3661L122.262 90.149L133.275 90.9509L115.392 68.9561Z"
97
+ fill="white"
98
+ />
99
+ <path
100
+ fill-rule="evenodd"
101
+ clip-rule="evenodd"
102
+ d="M115.149 97.3661L115.065 68.9561L133.275 90.6813L122.332 89.0101L115.149 97.3661ZM117.404 75.223L117.488 91.1826L121.497 86.5034L127.678 87.4225L117.404 75.223Z"
103
+ fill="black"
104
+ />
105
+ <path
106
+ d="M98.1469 166.214H97.6531C86.8883 166.214 78 157.474 78 146.889V130.67C78 120.084 86.8883 111.344 97.6531 111.344H98.1469C108.912 111.344 117.8 120.084 117.8 130.67V146.889C117.8 157.474 109.01 166.214 98.1469 166.214Z"
107
+ fill="white"
108
+ />
109
+ <path
110
+ fill-rule="evenodd"
111
+ clip-rule="evenodd"
112
+ d="M78 146.312C78 157.286 86.9271 166.214 97.9 166.214C108.873 166.214 117.8 157.193 117.8 146.312V131.246C117.8 120.272 108.873 111.344 97.9 111.344C86.9271 111.344 78 120.272 78 131.246V146.312ZM80.7898 131.153C80.7898 121.76 88.415 114.041 97.9 114.041C107.292 114.041 115.01 121.667 115.01 131.153V146.219C115.01 155.612 107.385 163.33 97.9 163.33C88.508 163.33 80.7898 155.705 80.7898 146.219V131.153Z"
113
+ fill="#30374B"
114
+ />
115
+ <path
116
+ d="M97.5844 137.613C96.4942 137.613 95.6021 136.721 95.6021 135.631V131.27C95.6021 130.18 96.4942 129.288 97.5844 129.288C98.6746 129.288 99.5667 130.18 99.5667 131.27V135.631C99.5667 136.721 98.6746 137.613 97.5844 137.613Z"
117
+ fill="#30374B"
118
+ />
119
+ <path
120
+ d="M97.5844 127.206C96.4942 127.206 95.6021 126.314 95.6021 125.224C95.6021 124.134 96.4942 123.242 97.5844 123.242C98.6746 123.242 99.5667 124.134 99.5667 125.224C99.5667 126.314 98.6746 127.206 97.5844 127.206Z"
121
+ fill="#30374B"
122
+ />
123
+ <path
124
+ d="M97.5844 143.56C96.4942 143.56 95.6021 142.668 95.6021 141.578C95.6021 140.488 96.4942 139.595 97.5844 139.595C98.6746 139.595 99.5667 140.488 99.5667 141.578C99.5667 142.668 98.6746 143.56 97.5844 143.56Z"
125
+ fill="#30374B"
126
+ />
127
+ <path
128
+ d="M97.5843 182.908L104.522 175.97C105.117 175.376 106.009 175.376 106.604 175.97C107.198 176.565 107.198 177.456 106.604 178.052L98.6746 185.981C98.3773 186.278 97.9808 186.377 97.5843 186.377C97.1879 186.377 96.7914 186.278 96.4941 185.981L88.565 178.052C87.9704 177.456 87.9704 176.565 88.565 175.97C89.1597 175.376 90.0517 175.376 90.6465 175.97L97.5843 182.908Z"
129
+ fill="#F8C62C"
130
+ />
131
+ <path
132
+ d="M97.5843 191.53L104.522 184.593C105.117 183.998 106.009 183.998 106.604 184.593C107.198 185.188 107.198 186.079 106.604 186.675L98.6746 194.604C98.3773 194.901 97.9808 195 97.5843 195C97.1879 195 96.7914 194.901 96.4941 194.604L88.565 186.675C87.9704 186.079 87.9704 185.188 88.565 184.593C89.1597 183.998 90.0517 183.998 90.6465 184.593L97.5843 191.53Z"
133
+ fill="#F8C62C"
134
+ />
135
+ </g>
136
+ </template>
@@ -1,39 +1,63 @@
1
1
  import click from "./Click.vue";
2
+ import createList from "./CreateList.vue";
2
3
  import emptyBcf from "./EmptyBcf.vue";
3
4
  import emptyBucket from "./EmptyBucket.vue";
4
5
  import emptyMeasure from "./EmptyMeasure.vue";
6
+ import emptyNamingConvention from "./EmptyNamingConvention.vue";
7
+ import emptyPdf from "./EmptyPdf.vue";
5
8
  import emptyProperties from "./EmptyProperties.vue";
6
9
  import emptySectionPlanes from "./EmptySectionPlanes.vue";
7
10
  import emptyTree from "./EmptyTree.vue";
8
11
  import emptyViewer from "./EmptyViewer.vue";
9
12
  import logo from "./Logo.vue";
10
- import emptyPdf from "./EmptyPdf.vue";
13
+ import manageList from "./ManageList.vue";
14
+ import renameFile from "./RenameFile.vue";
11
15
  import shortcutOpen from "./ShortcutOpen.vue";
12
16
  import shortcutRotate from "./ShortcutRotate.vue";
13
17
  import shortcutZoom from "./ShortcutZoom.vue";
14
18
  import shortcutMove2D from "./ShortcutMove2D.vue";
19
+ import shortcutMoveDwg from "./ShortcutMoveDwg.vue";
20
+ import shortcutMovePlan from "./ShortcutMovePlan.vue";
15
21
  import shortcutOpen2D from "./ShortcutOpen2D.vue";
22
+ import shortcutOpenDwg from "./ShortcutOpenDwg.vue";
23
+ import shortcutOpenPlan from "./ShortcutOpenPlan.vue";
16
24
  import shortcutRotate2D from "./ShortcutRotate2D.vue";
25
+ import shortcutRotateDwg from "./ShortcutRotateDwg.vue";
26
+ import shortcutRotatePlan from "./ShortcutRotatePlan.vue";
17
27
  import shortcutZoom2D from "./ShortcutZoom2D.vue";
28
+ import shortcutZoomDwg from "./ShortcutZoomDwg.vue";
29
+ import shortcutZoomPlan from "./ShortcutZoomPlan.vue";
18
30
  import successSplit from "./SuccessSplit.vue";
19
31
 
20
32
  export default {
21
33
  click,
34
+ createList,
22
35
  emptyBcf,
23
36
  emptyBucket,
24
37
  emptyMeasure,
38
+ emptyNamingConvention,
39
+ emptyPdf,
25
40
  emptyProperties,
26
41
  emptySectionPlanes,
27
42
  emptyTree,
28
43
  emptyViewer,
29
44
  logo,
30
- emptyPdf,
45
+ manageList,
46
+ renameFile,
31
47
  shortcutOpen,
32
48
  shortcutRotate,
33
49
  shortcutZoom,
34
50
  shortcutMove2D,
51
+ shortcutMoveDwg,
52
+ shortcutMovePlan,
35
53
  shortcutOpen2D,
54
+ shortcutOpenDwg,
55
+ shortcutOpenPlan,
36
56
  shortcutRotate2D,
57
+ shortcutRotateDwg,
58
+ shortcutRotatePlan,
59
+ shortcutZoomPlan,
60
+ shortcutZoomDwg,
37
61
  shortcutZoom2D,
38
62
  successSplit,
39
63
  };
@@ -6,7 +6,8 @@
6
6
  success,
7
7
  disabled,
8
8
  loading,
9
- 'not-empty': modelValue != null,
9
+ empty:
10
+ modelValue === undefined || modelValue === null || modelValue === '',
10
11
  }"
11
12
  :style="style"
12
13
  >
@@ -105,7 +106,7 @@ export default {
105
106
  if (successAndError) {
106
107
  throw new Error("Input state cannot be both success and error.");
107
108
  }
108
- }
109
+ },
109
110
  );
110
111
  },
111
112
  methods: {
@@ -11,11 +11,11 @@ input:-webkit-autofill {
11
11
  font-family: var(--primary-font);
12
12
  color: var(--color-primary);
13
13
  font-size: calculateEm(15px);
14
- &.not-empty {
14
+ &.empty {
15
15
  label {
16
- top: -22px;
17
- color: var(--color-primary);
18
- font-size: calculateEm(10px);
16
+ top: 0;
17
+ font-size: calculateEm(12px);
18
+ color: var(--color-granite-light);
19
19
  }
20
20
  }
21
21
  input {
@@ -50,13 +50,13 @@ input:-webkit-autofill {
50
50
  }
51
51
  label {
52
52
  position: absolute;
53
- top: 0;
54
53
  left: 0;
55
- font-size: calculateEm(12px);
56
54
  transform: translateY(8px);
57
55
  transition: 0.2s ease all;
58
- color: var(--color-granite-light);
59
56
  cursor: pointer;
57
+ top: -22px;
58
+ color: var(--color-primary);
59
+ font-size: calculateEm(10px);
60
60
  }
61
61
  .bar {
62
62
  width: 100%;
@@ -67,7 +67,7 @@ input:-webkit-autofill {
67
67
  &::before {
68
68
  width: 0;
69
69
  height: 2px;
70
- content: '';
70
+ content: "";
71
71
  display: block;
72
72
  position: absolute;
73
73
  background-color: var(--color-primary);
@@ -0,0 +1,182 @@
1
+ <template>
2
+ <div
3
+ class="bimdata-input-outlined"
4
+ :class="{
5
+ error,
6
+ success,
7
+ disabled,
8
+ loading,
9
+ empty:
10
+ modelValue === undefined || modelValue === null || modelValue === '',
11
+ }"
12
+ :style="style"
13
+ >
14
+ <fieldset>
15
+ <label v-if="label" :for="`bimdata-input-outlined-${uuid}`" class="m-b-6"
16
+ ><slot name="label">Label here</slot></label
17
+ >
18
+ <div class="flex items-center">
19
+ <slot name="prefix"></slot>
20
+ <div class="bimdata-input-outlined__container">
21
+ <div class="bimdata-input-outlined__container__prefix-inner">
22
+ <slot name="prefixInner"></slot>
23
+ </div>
24
+ <input
25
+ ref="input"
26
+ :type="inputType"
27
+ :id="`bimdata-input-${uuid}`"
28
+ @input="$emit('update:modelValue', $event.currentTarget.value)"
29
+ :disabled="disabled"
30
+ :value="modelValue"
31
+ :placeholder="placeholder"
32
+ @focus="
33
+ $event.target.select();
34
+ $emit('focus', $event);
35
+ "
36
+ @blur="$emit('blur', $event)"
37
+ @keypress="$emit('keypress', $event)"
38
+ @change="$emit('change', $event)"
39
+ :autocomplete="autocomplete ? 'on' : 'off'"
40
+ v-bind="$attrs"
41
+ :maxlength="maxLength"
42
+ />
43
+ <BIMDataSpinner v-if="loading" class="items-center"></BIMDataSpinner>
44
+ <div class="bimdata-input-outlined__container__suffix-inner">
45
+ <slot name="suffixInner"></slot>
46
+ </div>
47
+ </div>
48
+ <slot name="suffix"></slot>
49
+ </div>
50
+ </fieldset>
51
+ <div
52
+ class="flex items-center"
53
+ :class="error || success ? 'justify-between' : 'justify-end'"
54
+ >
55
+ <span v-if="error" class="error">{{ errorMessage }}</span>
56
+ <span v-if="success" class="success">{{ successMessage }}</span>
57
+ <span v-if="counter" class="counter m-l-12">
58
+ {{ modelValue.length }}
59
+ / {{ maxLength }}
60
+ </span>
61
+ </div>
62
+ </div>
63
+ </template>
64
+
65
+ <script>
66
+ let uuid = 0;
67
+
68
+ export default {
69
+ model: {
70
+ prop: "modelValue",
71
+ event: "update:modelValue",
72
+ },
73
+ props: {
74
+ autocomplete: {
75
+ type: Boolean,
76
+ default: false,
77
+ },
78
+ counter: {
79
+ type: Boolean,
80
+ default: false,
81
+ },
82
+ disabled: {
83
+ type: Boolean,
84
+ default: false,
85
+ },
86
+ error: {
87
+ type: Boolean,
88
+ default: false,
89
+ },
90
+ errorMessage: {
91
+ type: String,
92
+ default: "",
93
+ },
94
+ inputType: {
95
+ type: String,
96
+ default: "text",
97
+ validator: type => {
98
+ const possibleTypes = [
99
+ "text",
100
+ "password",
101
+ "number",
102
+ "file",
103
+ "url",
104
+ "time",
105
+ "email",
106
+ "tel",
107
+ ];
108
+ return possibleTypes.includes(type);
109
+ },
110
+ },
111
+ label: {
112
+ type: Boolean,
113
+ default: false,
114
+ },
115
+ loading: {
116
+ type: Boolean,
117
+ default: false,
118
+ },
119
+ margin: {
120
+ type: String,
121
+ default: "12px 0px",
122
+ },
123
+ maxLength: {
124
+ type: Number,
125
+ default: 100,
126
+ },
127
+ modelValue: {
128
+ type: [String, Number],
129
+ default: "",
130
+ },
131
+ placeholder: {
132
+ type: String,
133
+ default: "",
134
+ },
135
+ success: {
136
+ type: Boolean,
137
+ default: false,
138
+ },
139
+ successMessage: {
140
+ type: String,
141
+ default: "",
142
+ },
143
+ width: {
144
+ type: String,
145
+ default: "250px",
146
+ },
147
+ },
148
+ emits: ["update:modelValue", "blur", "keypress", "focus", "change"],
149
+ computed: {
150
+ style() {
151
+ return {
152
+ margin: `${this.margin}`,
153
+ width: `${this.width}`,
154
+ };
155
+ },
156
+ },
157
+ beforeCreate() {
158
+ this.uuid = uuid.toString();
159
+ uuid += 1;
160
+ },
161
+ created() {
162
+ this.$watch(
163
+ () => this.success && this.error,
164
+ successAndError => {
165
+ if (successAndError) {
166
+ throw new Error("Input state cannot be both success and error.");
167
+ }
168
+ },
169
+ );
170
+ },
171
+ methods: {
172
+ focus() {
173
+ this.$refs.input?.focus();
174
+ },
175
+ blur() {
176
+ this.$refs.input?.blur();
177
+ },
178
+ },
179
+ };
180
+ </script>
181
+
182
+ <style scoped lang="scss" src="./_BIMDataInputOutlined.scss"></style>
@@ -0,0 +1,96 @@
1
+ @import "../../assets/scss/mixins/_font-size.scss";
2
+
3
+ input:-webkit-autofill {
4
+ box-shadow: 0 0 0px 1000px var(--color-white) inset;
5
+ }
6
+
7
+ .bimdata-input-outlined {
8
+ position: relative;
9
+ font-family: var(--primary-font);
10
+ color: var(--color-primary);
11
+ fieldset {
12
+ margin: 0;
13
+ padding: 0;
14
+ border: none;
15
+ label {
16
+ display: block;
17
+ font-size: 10px;
18
+ text-transform: uppercase;
19
+ font-weight: bold;
20
+ letter-spacing: 0.6px;
21
+ color: var(--color-granite-light);
22
+ }
23
+ }
24
+ &__container {
25
+ padding: 0 calc(var(--spacing-unit) / 2);
26
+ width: 100%;
27
+ height: 100%;
28
+ border: 1px solid var(--color-silver);
29
+ border-radius: 3px;
30
+ display: flex;
31
+ flex: 1;
32
+ font-size: 14px;
33
+ overflow: hidden;
34
+ position: relative;
35
+ z-index: 0;
36
+ input {
37
+ width: 100%;
38
+ min-height: 32px;
39
+ font-size: 14px;
40
+ color: var(--color-primary);
41
+ background-color: transparent;
42
+ border-style: none;
43
+ cursor: auto;
44
+ font-family: inherit;
45
+ &:focus {
46
+ outline: none;
47
+ }
48
+ }
49
+ &__prefix-inner,
50
+ &__suffix-inner {
51
+ align-content: center;
52
+ align-items: center;
53
+ display: flex;
54
+ justify-content: center;
55
+ }
56
+ }
57
+ .error {
58
+ color: var(--color-high);
59
+ font-size: 11px;
60
+ }
61
+ .success {
62
+ color: var(--color-success);
63
+ font-size: 11px;
64
+ }
65
+ &.disabled {
66
+ opacity: 0.6;
67
+ cursor: default;
68
+ }
69
+ &.error {
70
+ .bimdata-input-outlined__container {
71
+ border-color: var(--color-high);
72
+ background-color: var(--color-high-lighter);
73
+ }
74
+ }
75
+ &.success {
76
+ .bimdata-input-outlined__container {
77
+ border-color: var(--color-success);
78
+ background-color: var(--color-success-lighter);
79
+ }
80
+ }
81
+ .counter {
82
+ font-size: 11px;
83
+ letter-spacing: -0.5px;
84
+ color: var(--color-granite-light);
85
+ }
86
+ &[type="file"] {
87
+ .bimdata-input-outlined__container {
88
+ border: none;
89
+ }
90
+ }
91
+ &[type="number"] {
92
+ input {
93
+ appearance: textfield;
94
+ }
95
+ }
96
+ }
@@ -3,7 +3,7 @@
3
3
  class="bimdata-search-bar"
4
4
  v-clickaway="away"
5
5
  :style="{ width: width, height: height }"
6
- :class="{ focus: focused, ...classes }"
6
+ :class="{ focus: focused, disabled, ...classes }"
7
7
  >
8
8
  <span class="bimdata-search-icon">
9
9
  <BIMDataIconSearch size="xxs" />
@@ -18,6 +18,7 @@
18
18
  :placeholder="placeholder"
19
19
  @keyup.enter="$emit('enter', $event.target.value)"
20
20
  :autocomplete="autocomplete ? 'on' : 'off'"
21
+ :disabled="disabled"
21
22
  />
22
23
  <BIMDataButton
23
24
  width="25px"
@@ -99,6 +100,10 @@ export default {
99
100
  type: Boolean,
100
101
  default: false,
101
102
  },
103
+ disabled: {
104
+ type: Boolean,
105
+ default: false,
106
+ },
102
107
  },
103
108
  emits: ["update:modelValue", "enter", "clear"],
104
109
  data() {
@@ -28,6 +28,12 @@
28
28
  box-shadow: var(--box-shadow);
29
29
  transition: all 0.2s ease;
30
30
  }
31
+ &.disabled {
32
+ color: var(--color-silver);
33
+ input {
34
+ color: var(--color-silver);
35
+ }
36
+ }
31
37
 
32
38
  &__radius {
33
39
  border-radius: 3px;
@@ -31,10 +31,10 @@
31
31
  v-model="searchText"
32
32
  class="m-6"
33
33
  />
34
- <div v-if="filteredOptions.length === 0" class="p-x-6 p-b-6">
34
+ <div v-if="filteredOptions.length === 0">
35
35
  <slot name="empty"></slot>
36
36
  </div>
37
- <ul class="bimdata-list m-b-6">
37
+ <ul class="bimdata-list m-y-6">
38
38
  <li
39
39
  class="bimdata-select__option-list__entry"
40
40
  v-for="(option, index) of filteredOptions"
@@ -116,7 +116,7 @@ export default {
116
116
  type: String,
117
117
  default: "Search",
118
118
  },
119
- isResetSearch: {
119
+ resetOnLeave: {
120
120
  type: Boolean,
121
121
  default: false,
122
122
  },
@@ -137,9 +137,26 @@ export default {
137
137
  return this.options;
138
138
  } else {
139
139
  const lowerCaseSearchText = this.searchText.toLowerCase();
140
- return this.options.filter(option =>
141
- option.toLowerCase().includes(lowerCaseSearchText),
142
- );
140
+ if (this.optionLabelKey) {
141
+ return this.options.filter(option =>
142
+ option[this.optionLabelKey]
143
+ .toLowerCase()
144
+ .includes(lowerCaseSearchText),
145
+ );
146
+ }
147
+ if (this.optionKey) {
148
+ return this.options.filter(
149
+ option =>
150
+ option.optionGroup ||
151
+ option[this.optionKey]
152
+ .toLowerCase()
153
+ .includes(lowerCaseSearchText),
154
+ );
155
+ } else {
156
+ return this.options.filter(option =>
157
+ option.toLowerCase().includes(lowerCaseSearchText),
158
+ );
159
+ }
143
160
  }
144
161
  },
145
162
  },
@@ -192,7 +209,7 @@ export default {
192
209
  this.$emit("update:modelValue", options);
193
210
  },
194
211
  resetSearch() {
195
- if (this.isResetSearch) {
212
+ if (this.clearSearchOnLeave) {
196
213
  this.searchText = "";
197
214
  }
198
215
  },