@onereach/ui-components 5.2.2 → 5.2.3-beta.3178.0

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 (36) hide show
  1. package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +100 -37
  2. package/dist/bundled/v2/components/OrSelectV3/OrSelect.vue.d.ts +0 -2
  3. package/dist/bundled/v2/components/OrSelectV3/index.js +1 -1
  4. package/dist/bundled/v2/components/OrSelectV3/styles.d.ts +0 -1
  5. package/dist/bundled/v2/components/OrSelectV3/styles.js +1 -8
  6. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-b029468d.js → OrSelect.vue_vue_type_script_lang-21b9f7b7.js} +68 -28
  7. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +28 -23
  8. package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +0 -1
  9. package/dist/bundled/v3/components/OrSelectV3/index.js +2 -2
  10. package/dist/bundled/v3/components/OrSelectV3/styles.d.ts +0 -1
  11. package/dist/bundled/v3/components/OrSelectV3/styles.js +1 -8
  12. package/dist/bundled/v3/components/index.js +1 -1
  13. package/dist/bundled/v3/index.js +1 -1
  14. package/dist/esm/v2/{OrSelect-f3a50dc9.js → OrSelect-34782e78.js} +97 -42
  15. package/dist/esm/v2/components/index.js +1 -1
  16. package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +0 -2
  17. package/dist/esm/v2/components/or-select-v3/index.js +1 -1
  18. package/dist/esm/v2/components/or-select-v3/partials/or-select-placeholder/OrSelectPlaceholder.vue.d.ts +24 -0
  19. package/dist/esm/v2/components/or-select-v3/partials/or-select-placeholder/styles.d.ts +1 -0
  20. package/dist/esm/v2/components/or-select-v3/styles.d.ts +0 -1
  21. package/dist/esm/v2/components/or-tags-v3/OrTags.vue.d.ts +2 -2
  22. package/dist/esm/v2/components/or-teleport/OrTeleport.vue2.vue.d.ts +2 -2
  23. package/dist/esm/v2/index.js +1 -1
  24. package/dist/esm/v3/{OrSelect-a2272840.js → OrSelect-ba0f0da3.js} +93 -56
  25. package/dist/esm/v3/components/index.js +1 -1
  26. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +0 -1
  27. package/dist/esm/v3/components/or-select-v3/index.js +1 -1
  28. package/dist/esm/v3/components/or-select-v3/partials/or-select-placeholder/OrSelectPlaceholder.vue.d.ts +17 -0
  29. package/dist/esm/v3/components/or-select-v3/partials/or-select-placeholder/styles.d.ts +1 -0
  30. package/dist/esm/v3/components/or-select-v3/styles.d.ts +0 -1
  31. package/dist/esm/v3/index.js +1 -1
  32. package/package.json +2 -3
  33. package/src/components/or-select-v3/OrSelect.vue +9 -18
  34. package/src/components/or-select-v3/partials/or-select-placeholder/OrSelectPlaceholder.vue +43 -0
  35. package/src/components/or-select-v3/partials/or-select-placeholder/styles.ts +11 -0
  36. package/src/components/or-select-v3/styles.ts +0 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "5.2.2",
3
+ "version": "5.2.3-beta.3178.0",
4
4
  "npmUnpacked": "4.15.2",
5
5
  "description": "Vue components library for v2/3",
6
6
  "sideEffects": false,
@@ -156,6 +156,5 @@
156
156
  "default": "./dist/bundled/v3/components/*/index.js"
157
157
  },
158
158
  "./package.json": "./package.json"
159
- },
160
- "gitHead": "6708e2cad0bfb997315b7a072bc1450bd17e2eb2"
159
+ }
161
160
  }
@@ -47,8 +47,8 @@
47
47
  <OrTag
48
48
  v-for="option in selection"
49
49
  :key="option.value"
50
- :variant="'reset'"
51
- :disabled="disabled || readonly"
50
+ :variant="readonly || disabled ? 'tag' : 'reset'"
51
+ :disabled="disabled"
52
52
  @reset="deselect(option)"
53
53
  >
54
54
  {{ option.label }}
@@ -57,12 +57,9 @@
57
57
  </template>
58
58
 
59
59
  <template v-else-if="popoverState === 'closed' || !enableSearch">
60
- <span
61
- :class="placeholderStyles"
62
- :disabled="disabled ? '' : null"
63
- >
60
+ <OrSelectPlaceholder :disabled="disabled">
64
61
  {{ placeholder }}
65
- </span>
62
+ </OrSelectPlaceholder>
66
63
  </template>
67
64
  </template>
68
65
 
@@ -79,12 +76,9 @@
79
76
  </template>
80
77
 
81
78
  <template v-else-if="popoverState === 'closed' || !enableSearch">
82
- <span
83
- :class="placeholderStyles"
84
- :disabled="disabled ? '' : null"
85
- >
79
+ <OrSelectPlaceholder :disabled="disabled">
86
80
  {{ placeholder }}
87
- </span>
81
+ </OrSelectPlaceholder>
88
82
  </template>
89
83
  </template>
90
84
  </div>
@@ -285,8 +279,9 @@ import { OrLabelV3 as OrLabel } from '../or-label-v3';
285
279
  import { OrMenuItemV3 as OrMenuItem } from '../or-menu-item-v3';
286
280
  import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
287
281
  import { OrTagV3 as OrTag } from '../or-tag-v3';
282
+ import OrSelectPlaceholder from './partials/or-select-placeholder/OrSelectPlaceholder.vue';
288
283
  import { SelectSize } from './props';
289
- import { Select, SelectControl, SelectDropdown, SelectDropdownDefault, SelectDropdownFlipped, SelectDropdownItem, SelectNoSearchResults, SelectPlaceholder, SelectSearchControl } from './styles';
284
+ import { Select, SelectControl, SelectDropdown, SelectDropdownDefault, SelectDropdownFlipped, SelectDropdownItem, SelectNoSearchResults, SelectSearchControl } from './styles';
290
285
  import { SelectGroupByFunction, SelectOption, SelectSearchFunction } from './types';
291
286
 
292
287
  export default defineComponent({
@@ -302,6 +297,7 @@ export default defineComponent({
302
297
  OrLabel,
303
298
  OrMenuItem,
304
299
  OrPopover,
300
+ OrSelectPlaceholder,
305
301
  OrTag,
306
302
  },
307
303
 
@@ -457,10 +453,6 @@ export default defineComponent({
457
453
  ...SelectSearchControl,
458
454
  ]);
459
455
 
460
- const placeholderStyles = computed(() => [
461
- ...SelectPlaceholder,
462
- ]);
463
-
464
456
  const dropdownStyles = computed(() => [
465
457
  ...SelectDropdown,
466
458
  ...popover.value?.isFlipped ? SelectDropdownFlipped : SelectDropdownDefault,
@@ -610,7 +602,6 @@ export default defineComponent({
610
602
  rootStyles,
611
603
  controlStyles,
612
604
  searchControlStyles,
613
- placeholderStyles,
614
605
  dropdownStyles,
615
606
  dropdownItemStyles,
616
607
  noSearchResultsStyles,
@@ -0,0 +1,43 @@
1
+ <template>
2
+ <div
3
+ ref="root"
4
+ :class="rootStyles"
5
+ :disabled="disabled ? '' : null"
6
+ >
7
+ <slot />
8
+ </div>
9
+ </template>
10
+
11
+ <script lang="ts">
12
+ import { computed, defineComponent, ref } from 'vue-demi';
13
+ import { SelectPlaceholder } from './styles';
14
+
15
+ export default defineComponent({
16
+ props: {
17
+ disabled: {
18
+ type: Boolean,
19
+ default: false,
20
+ },
21
+ },
22
+
23
+ expose: [
24
+ 'root',
25
+ ],
26
+
27
+ setup() {
28
+ // Refs
29
+ const root = ref<HTMLElement>();
30
+
31
+ // Styles
32
+ const rootStyles = computed(() => [
33
+ 'or-select-placeholder-v3',
34
+ ...SelectPlaceholder,
35
+ ]);
36
+
37
+ return {
38
+ root,
39
+ rootStyles,
40
+ };
41
+ },
42
+ });
43
+ </script>
@@ -0,0 +1,11 @@
1
+ export const SelectPlaceholder: string[] = [
2
+ // Interactivity
3
+ 'interactivity-none',
4
+
5
+ // Typography
6
+ 'typography-inherit truncate',
7
+
8
+ // Theme
9
+ 'theme-foreground-outline',
10
+ 'dark:theme-foreground-outline-dark',
11
+ ];
@@ -32,18 +32,6 @@ export const SelectSearchControl: string[] = [
32
32
  '!my-sm md:!my-none',
33
33
  ];
34
34
 
35
- export const SelectPlaceholder: string[] = [
36
- // Theme
37
- 'theme-foreground-outline',
38
- 'dark:theme-foreground-outline-dark',
39
-
40
- // Interactivity
41
- 'select-none',
42
-
43
- // Typography
44
- 'truncate',
45
- ];
46
-
47
35
  export const SelectDropdown: string[] = [
48
36
  // Overflow
49
37
  'overflow-y-auto',