@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
@@ -1,4 +1,4 @@
1
- import { defineComponent, getCurrentInstance, ref, computed, toRefs, onMounted, watch } from 'vue-demi';
1
+ import { defineComponent, ref, computed, getCurrentInstance, toRefs, onMounted, watch } from 'vue-demi';
2
2
  import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-06d651cf.js';
3
3
  import { u as useOverflow } from './useOverflow-c856b7b7.js';
4
4
  import '@vueuse/core';
@@ -6,21 +6,86 @@ import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
6
6
  import { u as useResponsive } from './useResponsive-a02e95b7.js';
7
7
  import '@onereach/styles/tailwind.config.json';
8
8
  import { i as isEmptyValue } from './isEmptyValue-fd56a6e4.js';
9
- import { _ as __vue_component__$1 } from './OrCheckbox-adae3aee.js';
10
- import { _ as __vue_component__$2 } from './OrError-4ffc1c39.js';
11
- import { _ as __vue_component__$3 } from './OrExpansionPanel-85503101.js';
12
- import { _ as __vue_component__$4 } from './OrHint-aa221198.js';
13
- import { _ as __vue_component__$6 } from './OrIconButton-3c5be67e.js';
14
- import { _ as __vue_component__$5 } from './OrIcon-d35a84d8.js';
15
- import { _ as __vue_component__$8 } from './OrInputBox-7dc5b9e9.js';
9
+ import { _ as __vue_component__$2 } from './OrCheckbox-adae3aee.js';
10
+ import { _ as __vue_component__$3 } from './OrError-4ffc1c39.js';
11
+ import { _ as __vue_component__$4 } from './OrExpansionPanel-85503101.js';
12
+ import { _ as __vue_component__$5 } from './OrHint-aa221198.js';
13
+ import { _ as __vue_component__$7 } from './OrIconButton-3c5be67e.js';
14
+ import { _ as __vue_component__$6 } from './OrIcon-d35a84d8.js';
15
+ import { _ as __vue_component__$9 } from './OrInputBox-7dc5b9e9.js';
16
16
  import { I as InputBoxSize } from './OrInputBox.vue_rollup-plugin-vue_script-4fde9829.js';
17
- import { _ as __vue_component__$7 } from './OrInput-e4ab5e11.js';
18
- import { _ as __vue_component__$9 } from './OrLabel-4a3d8904.js';
19
- import { _ as __vue_component__$a } from './OrMenuItem-c1c97ebe.js';
20
- import { _ as __vue_component__$b } from './OrPopover-159ff97b.js';
21
- import { _ as __vue_component__$c } from './OrTag-44c0e49b.js';
17
+ import { _ as __vue_component__$8 } from './OrInput-e4ab5e11.js';
18
+ import { _ as __vue_component__$a } from './OrLabel-4a3d8904.js';
19
+ import { _ as __vue_component__$b } from './OrMenuItem-c1c97ebe.js';
20
+ import { _ as __vue_component__$c } from './OrPopover-159ff97b.js';
21
+ import { _ as __vue_component__$d } from './OrTag-44c0e49b.js';
22
22
  import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
23
23
 
24
+ const SelectPlaceholder = [
25
+ // Interactivity
26
+ 'interactivity-none',
27
+ // Typography
28
+ 'typography-inherit truncate',
29
+ // Theme
30
+ 'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
31
+
32
+ var script$1 = defineComponent({
33
+ props: {
34
+ disabled: {
35
+ type: Boolean,
36
+ default: false
37
+ }
38
+ },
39
+ expose: ['root'],
40
+ setup() {
41
+ // Refs
42
+ const root = ref();
43
+ // Styles
44
+ const rootStyles = computed(() => ['or-select-placeholder-v3', ...SelectPlaceholder]);
45
+ return {
46
+ root,
47
+ rootStyles
48
+ };
49
+ }
50
+ });
51
+
52
+ /* script */
53
+ const __vue_script__$1 = script$1;
54
+
55
+ /* template */
56
+ var __vue_render__$1 = function () {
57
+ var _vm = this;
58
+ var _h = _vm.$createElement;
59
+ var _c = _vm._self._c || _h;
60
+ return _c('div', {
61
+ ref: "root",
62
+ class: _vm.rootStyles,
63
+ attrs: {
64
+ "disabled": _vm.disabled ? '' : null
65
+ }
66
+ }, [_vm._t("default")], 2);
67
+ };
68
+ var __vue_staticRenderFns__$1 = [];
69
+
70
+ /* style */
71
+ const __vue_inject_styles__$1 = undefined;
72
+ /* scoped */
73
+ const __vue_scope_id__$1 = undefined;
74
+ /* module identifier */
75
+ const __vue_module_identifier__$1 = undefined;
76
+ /* functional template */
77
+ const __vue_is_functional_template__$1 = false;
78
+ /* style inject */
79
+
80
+ /* style inject SSR */
81
+
82
+ /* style inject shadow dom */
83
+
84
+ const __vue_component__$1 = /*#__PURE__*/normalizeComponent({
85
+ render: __vue_render__$1,
86
+ staticRenderFns: __vue_staticRenderFns__$1
87
+ }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
88
+
24
89
  const Select = [
25
90
  // Layout
26
91
  'layout-column',
@@ -42,13 +107,6 @@ const SelectSearchControl = [
42
107
  'grow',
43
108
  // Spacing
44
109
  '!mx-lg md:!-mx-sm+', '!my-sm md:!my-none'];
45
- const SelectPlaceholder = [
46
- // Theme
47
- 'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
48
- // Interactivity
49
- 'select-none',
50
- // Typography
51
- 'truncate'];
52
110
  const SelectDropdown = [
53
111
  // Overflow
54
112
  'overflow-y-auto',
@@ -83,18 +141,19 @@ const SelectNoSearchResults = [
83
141
 
84
142
  var script = defineComponent({
85
143
  components: {
86
- OrCheckbox: __vue_component__$1,
87
- OrError: __vue_component__$2,
88
- OrExpansionPanel: __vue_component__$3,
89
- OrHint: __vue_component__$4,
90
- OrIcon: __vue_component__$5,
91
- OrIconButton: __vue_component__$6,
92
- OrInput: __vue_component__$7,
93
- OrInputBox: __vue_component__$8,
94
- OrLabel: __vue_component__$9,
95
- OrMenuItem: __vue_component__$a,
96
- OrPopover: __vue_component__$b,
97
- OrTag: __vue_component__$c
144
+ OrCheckbox: __vue_component__$2,
145
+ OrError: __vue_component__$3,
146
+ OrExpansionPanel: __vue_component__$4,
147
+ OrHint: __vue_component__$5,
148
+ OrIcon: __vue_component__$6,
149
+ OrIconButton: __vue_component__$7,
150
+ OrInput: __vue_component__$8,
151
+ OrInputBox: __vue_component__$9,
152
+ OrLabel: __vue_component__$a,
153
+ OrMenuItem: __vue_component__$b,
154
+ OrPopover: __vue_component__$c,
155
+ OrSelectPlaceholder: __vue_component__$1,
156
+ OrTag: __vue_component__$d
98
157
  },
99
158
  directives: {
100
159
  DropdownClose,
@@ -217,7 +276,6 @@ var script = defineComponent({
217
276
  const rootStyles = computed(() => ['or-select-v3', ...Select]);
218
277
  const controlStyles = computed(() => [...SelectControl]);
219
278
  const searchControlStyles = computed(() => [...SelectSearchControl]);
220
- const placeholderStyles = computed(() => [...SelectPlaceholder]);
221
279
  const dropdownStyles = computed(() => {
222
280
  var _a;
223
281
  return [...SelectDropdown, ...(((_a = popover.value) === null || _a === void 0 ? void 0 : _a.isFlipped) ? SelectDropdownFlipped : SelectDropdownDefault)];
@@ -332,7 +390,6 @@ var script = defineComponent({
332
390
  rootStyles,
333
391
  controlStyles,
334
392
  searchControlStyles,
335
- placeholderStyles,
336
393
  dropdownStyles,
337
394
  dropdownItemStyles,
338
395
  noSearchResultsStyles,
@@ -425,8 +482,8 @@ var __vue_render__ = function () {
425
482
  return _c('OrTag', {
426
483
  key: option.value,
427
484
  attrs: {
428
- "variant": 'reset',
429
- "disabled": _vm.disabled || _vm.readonly
485
+ "variant": _vm.readonly || _vm.disabled ? 'tag' : 'reset',
486
+ "disabled": _vm.disabled
430
487
  },
431
488
  on: {
432
489
  "reset": function ($event) {
@@ -437,10 +494,9 @@ var __vue_render__ = function () {
437
494
  });
438
495
  }, {
439
496
  "model": _vm.proxyModelValue
440
- })] : _vm.popoverState === 'closed' || !_vm.enableSearch ? [_c('span', {
441
- class: _vm.placeholderStyles,
497
+ })] : _vm.popoverState === 'closed' || !_vm.enableSearch ? [_c('OrSelectPlaceholder', {
442
498
  attrs: {
443
- "disabled": _vm.disabled ? '' : null
499
+ "disabled": _vm.disabled
444
500
  }
445
501
  }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])] : _vm._e()] : [!_vm.isEmptyModelValue ? [_vm._t("valueTemplate", function () {
446
502
  return [_c('span', {
@@ -448,10 +504,9 @@ var __vue_render__ = function () {
448
504
  }, [_vm._v("\n " + _vm._s(_vm.selection && _vm.selection.label) + "\n ")])];
449
505
  }, {
450
506
  "model": _vm.proxyModelValue
451
- })] : _vm.popoverState === 'closed' || !_vm.enableSearch ? [_c('span', {
452
- class: _vm.placeholderStyles,
507
+ })] : _vm.popoverState === 'closed' || !_vm.enableSearch ? [_c('OrSelectPlaceholder', {
453
508
  attrs: {
454
- "disabled": _vm.disabled ? '' : null
509
+ "disabled": _vm.disabled
455
510
  }
456
511
  }, [_vm._v("\n " + _vm._s(_vm.placeholder) + "\n ")])] : _vm._e()]], 2), _vm._v(" "), _vm.multiple && _vm.outerItems.length > 0 ? [_vm._v("\n +" + _vm._s(_vm.outerItems.length) + "\n ")] : _vm._e(), _vm._v(" "), _vm.popoverState === 'open' && _vm.enableSearch && _vm.isDesktop ? [_c('OrInput', {
457
512
  ref: "searchControl",
@@ -78,7 +78,7 @@ export { _ as OrSearch } from '../OrSearch-ac542dd6.js';
78
78
  export { _ as OrSearchV3 } from '../OrSearch-2cd05f40.js';
79
79
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-35b54d3c.js';
80
80
  export { _ as OrSelect } from '../OrSelect-c0d04cf6.js';
81
- export { _ as OrSelectV3 } from '../OrSelect-f3a50dc9.js';
81
+ export { _ as OrSelectV3 } from '../OrSelect-34782e78.js';
82
82
  export { _ as OrSidebar, O as OrSidebarSide } from '../OrSidebar-c56a9221.js';
83
83
  export { _ as OrSidebarV3 } from '../OrSidebar-c76d3d4a.js';
84
84
  export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-ad5db793.js';
@@ -21,7 +21,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
21
21
  rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
22
22
  controlStyles: import("@vue/composition-api").ComputedRef<string[]>;
23
23
  searchControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
24
- placeholderStyles: import("@vue/composition-api").ComputedRef<string[]>;
25
24
  dropdownStyles: import("@vue/composition-api").ComputedRef<string[]>;
26
25
  dropdownItemStyles: import("@vue/composition-api").ComputedRef<string[]>;
27
26
  noSearchResultsStyles: import("@vue/composition-api").ComputedRef<string[]>;
@@ -233,7 +232,6 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
233
232
  rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
234
233
  controlStyles: import("@vue/composition-api").ComputedRef<string[]>;
235
234
  searchControlStyles: import("@vue/composition-api").ComputedRef<string[]>;
236
- placeholderStyles: import("@vue/composition-api").ComputedRef<string[]>;
237
235
  dropdownStyles: import("@vue/composition-api").ComputedRef<string[]>;
238
236
  dropdownItemStyles: import("@vue/composition-api").ComputedRef<string[]>;
239
237
  noSearchResultsStyles: import("@vue/composition-api").ComputedRef<string[]>;
@@ -1,4 +1,4 @@
1
- export { _ as OrSelectV3 } from '../../OrSelect-f3a50dc9.js';
1
+ export { _ as OrSelectV3 } from '../../OrSelect-34782e78.js';
2
2
  export { I as SelectSize } from '../../OrInputBox.vue_rollup-plugin-vue_script-4fde9829.js';
3
3
  import 'vue-demi';
4
4
  import '../../dropdown-open-06d651cf.js';
@@ -0,0 +1,24 @@
1
+ declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
2
+ root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
3
+ rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
4
+ }> & import("@vue/composition-api").Data, {}, {}, {
5
+ disabled: {
6
+ type: BooleanConstructor;
7
+ default: boolean;
8
+ };
9
+ }, import("@vue/composition-api").ExtractPropTypes<{
10
+ disabled: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
15
+ disabled: boolean;
16
+ } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
17
+ root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
18
+ rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
19
+ }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
20
+ disabled: boolean;
21
+ } & {}, {
22
+ disabled: boolean;
23
+ }, true>);
24
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const SelectPlaceholder: string[];
@@ -1,7 +1,6 @@
1
1
  export declare const Select: string[];
2
2
  export declare const SelectControl: string[];
3
3
  export declare const SelectSearchControl: string[];
4
- export declare const SelectPlaceholder: string[];
5
4
  export declare const SelectDropdown: string[];
6
5
  export declare const SelectDropdownDefault: string[];
7
6
  export declare const SelectDropdownFlipped: string[];
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue-demi';
2
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
2
+ declare const _default: import("vue2").ComponentOptions<import("vue2").default, import("@vue/composition-api").ShallowUnwrapRef<{
3
3
  root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
4
4
  container: import("@vue/composition-api").Ref<HTMLElement | undefined>;
5
5
  overflowButton: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
@@ -41,7 +41,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
41
41
  } | {}> & Omit<{} & {}, never>>>;
42
42
  default: undefined;
43
43
  };
44
- }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
44
+ }>> & Omit<import("vue2").VueConstructor<import("vue2").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
45
45
  items: string[];
46
46
  tagProps: Readonly<Partial<{
47
47
  [x: number]: string;
@@ -1,4 +1,4 @@
1
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data> & import("@vue/composition-api").Data, {}, {}, {
1
+ declare const _default: import("vue2").ComponentOptions<import("vue2").default, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data> & import("@vue/composition-api").Data, {}, {}, {
2
2
  to: {
3
3
  type: StringConstructor;
4
4
  required: boolean;
@@ -20,7 +20,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
20
20
  required: boolean;
21
21
  default: boolean;
22
22
  };
23
- }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
23
+ }>> & Omit<import("vue2").VueConstructor<import("vue2").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
24
24
  to: string;
25
25
  isDisabled: boolean;
26
26
  } & {}, import("@vue/composition-api").ShallowUnwrapRef<import("@vue/composition-api").Data>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
@@ -78,7 +78,7 @@ export { _ as OrSearch } from './OrSearch-ac542dd6.js';
78
78
  export { _ as OrSearchV3 } from './OrSearch-2cd05f40.js';
79
79
  export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-35b54d3c.js';
80
80
  export { _ as OrSelect } from './OrSelect-c0d04cf6.js';
81
- export { _ as OrSelectV3 } from './OrSelect-f3a50dc9.js';
81
+ export { _ as OrSelectV3 } from './OrSelect-34782e78.js';
82
82
  export { _ as OrSidebar, O as OrSidebarSide } from './OrSidebar-c56a9221.js';
83
83
  export { _ as OrSidebarV3 } from './OrSidebar-c76d3d4a.js';
84
84
  export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-ad5db793.js';
@@ -1,4 +1,4 @@
1
- import { defineComponent, getCurrentInstance, ref, computed, toRefs, onMounted, watch } from 'vue-demi';
1
+ import { defineComponent, ref, computed, getCurrentInstance, toRefs, onMounted, watch } from 'vue-demi';
2
2
  import { D as DropdownClose, a as DropdownOpen } from './dropdown-open-06d651cf.js';
3
3
  import { u as useOverflow } from './useOverflow-c856b7b7.js';
4
4
  import '@vueuse/core';
@@ -6,19 +6,59 @@ import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
6
6
  import { u as useResponsive } from './useResponsive-a02e95b7.js';
7
7
  import '@onereach/styles/tailwind.config.json';
8
8
  import { i as isEmptyValue } from './isEmptyValue-fd56a6e4.js';
9
- import { s as script$1 } from './OrCheckbox-4433eaa6.js';
10
- import { s as script$2 } from './OrError-c01d0c29.js';
11
- import { s as script$3 } from './OrExpansionPanel-cb469c25.js';
12
- import { s as script$4 } from './OrHint-06ab89d7.js';
13
- import { s as script$6 } from './OrIconButton-6b7afbb3.js';
14
- import { s as script$5 } from './OrIcon-62793572.js';
15
- import { s as script$8, I as InputBoxSize } from './OrInputBox-912a6254.js';
16
- import { s as script$7 } from './OrInput-4aa8ef29.js';
17
- import { s as script$9 } from './OrLabel-d4c46bb6.js';
18
- import { s as script$a } from './OrMenuItem-54062d59.js';
19
- import { s as script$b } from './OrPopover-4ae174d0.js';
20
- import { s as script$c } from './OrTag-05c5e0fd.js';
21
- import { resolveComponent, resolveDirective, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode, withDirectives, createElementVNode, Fragment, renderList, withModifiers, createVNode, vShow } from 'vue';
9
+ import { s as script$2 } from './OrCheckbox-4433eaa6.js';
10
+ import { s as script$3 } from './OrError-c01d0c29.js';
11
+ import { s as script$4 } from './OrExpansionPanel-cb469c25.js';
12
+ import { s as script$5 } from './OrHint-06ab89d7.js';
13
+ import { s as script$7 } from './OrIconButton-6b7afbb3.js';
14
+ import { s as script$6 } from './OrIcon-62793572.js';
15
+ import { s as script$9, I as InputBoxSize } from './OrInputBox-912a6254.js';
16
+ import { s as script$8 } from './OrInput-4aa8ef29.js';
17
+ import { s as script$a } from './OrLabel-d4c46bb6.js';
18
+ import { s as script$b } from './OrMenuItem-54062d59.js';
19
+ import { s as script$c } from './OrPopover-4ae174d0.js';
20
+ import { s as script$d } from './OrTag-05c5e0fd.js';
21
+ import { openBlock, createElementBlock, normalizeClass, renderSlot, resolveComponent, resolveDirective, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, withDirectives, createElementVNode, Fragment, renderList, withModifiers, createVNode, vShow } from 'vue';
22
+
23
+ const SelectPlaceholder = [
24
+ // Interactivity
25
+ 'interactivity-none',
26
+ // Typography
27
+ 'typography-inherit truncate',
28
+ // Theme
29
+ 'theme-foreground-outline', 'dark:theme-foreground-outline-dark'];
30
+
31
+ var script$1 = defineComponent({
32
+ props: {
33
+ disabled: {
34
+ type: Boolean,
35
+ default: false
36
+ }
37
+ },
38
+ expose: ['root'],
39
+ setup() {
40
+ // Refs
41
+ const root = ref();
42
+ // Styles
43
+ const rootStyles = computed(() => ['or-select-placeholder-v3', ...SelectPlaceholder]);
44
+ return {
45
+ root,
46
+ rootStyles
47
+ };
48
+ }
49
+ });
50
+
51
+ const _hoisted_1$1 = ["disabled"];
52
+ function render$1(_ctx, _cache, $props, $setup, $data, $options) {
53
+ return openBlock(), createElementBlock("div", {
54
+ ref: "root",
55
+ class: normalizeClass(_ctx.rootStyles),
56
+ disabled: _ctx.disabled ? '' : null
57
+ }, [renderSlot(_ctx.$slots, "default")], 10 /* CLASS, PROPS */, _hoisted_1$1);
58
+ }
59
+
60
+ script$1.render = render$1;
61
+ script$1.__file = "src/components/or-select-v3/partials/or-select-placeholder/OrSelectPlaceholder.vue";
22
62
 
23
63
  const Select = [
24
64
  // Layout
@@ -41,13 +81,6 @@ const SelectSearchControl = [
41
81
  'grow',
42
82
  // Spacing
43
83
  '!mx-lg md:!-mx-sm+', '!my-sm md:!my-none'];
44
- const SelectPlaceholder = [
45
- // Theme
46
- 'theme-foreground-outline', 'dark:theme-foreground-outline-dark',
47
- // Interactivity
48
- 'select-none',
49
- // Typography
50
- 'truncate'];
51
84
  const SelectDropdown = [
52
85
  // Overflow
53
86
  'overflow-y-auto',
@@ -82,18 +115,19 @@ const SelectNoSearchResults = [
82
115
 
83
116
  var script = defineComponent({
84
117
  components: {
85
- OrCheckbox: script$1,
86
- OrError: script$2,
87
- OrExpansionPanel: script$3,
88
- OrHint: script$4,
89
- OrIcon: script$5,
90
- OrIconButton: script$6,
91
- OrInput: script$7,
92
- OrInputBox: script$8,
93
- OrLabel: script$9,
94
- OrMenuItem: script$a,
95
- OrPopover: script$b,
96
- OrTag: script$c
118
+ OrCheckbox: script$2,
119
+ OrError: script$3,
120
+ OrExpansionPanel: script$4,
121
+ OrHint: script$5,
122
+ OrIcon: script$6,
123
+ OrIconButton: script$7,
124
+ OrInput: script$8,
125
+ OrInputBox: script$9,
126
+ OrLabel: script$a,
127
+ OrMenuItem: script$b,
128
+ OrPopover: script$c,
129
+ OrSelectPlaceholder: script$1,
130
+ OrTag: script$d
97
131
  },
98
132
  directives: {
99
133
  DropdownClose,
@@ -216,7 +250,6 @@ var script = defineComponent({
216
250
  const rootStyles = computed(() => ['or-select-v3', ...Select]);
217
251
  const controlStyles = computed(() => [...SelectControl]);
218
252
  const searchControlStyles = computed(() => [...SelectSearchControl]);
219
- const placeholderStyles = computed(() => [...SelectPlaceholder]);
220
253
  const dropdownStyles = computed(() => {
221
254
  var _a;
222
255
  return [...SelectDropdown, ...(((_a = popover.value) === null || _a === void 0 ? void 0 : _a.isFlipped) ? SelectDropdownFlipped : SelectDropdownDefault)];
@@ -331,7 +364,6 @@ var script = defineComponent({
331
364
  rootStyles,
332
365
  controlStyles,
333
366
  searchControlStyles,
334
- placeholderStyles,
335
367
  dropdownStyles,
336
368
  dropdownItemStyles,
337
369
  noSearchResultsStyles,
@@ -358,27 +390,26 @@ var script = defineComponent({
358
390
  });
359
391
 
360
392
  const _hoisted_1 = ["id", "tabindex", "disabled"];
361
- const _hoisted_2 = ["disabled"];
362
- const _hoisted_3 = {
393
+ const _hoisted_2 = {
363
394
  class: "truncate"
364
395
  };
365
- const _hoisted_4 = ["disabled"];
366
- const _hoisted_5 = {
396
+ const _hoisted_3 = {
367
397
  key: 2,
368
398
  class: /*#__PURE__*/normalizeClass(['grow'])
369
399
  };
370
- const _hoisted_6 = {
400
+ const _hoisted_4 = {
371
401
  class: /*#__PURE__*/normalizeClass(['layout-inline-row', 'gap-sm'])
372
402
  };
373
- const _hoisted_7 = {
403
+ const _hoisted_5 = {
374
404
  class: /*#__PURE__*/normalizeClass(['contents'])
375
405
  };
376
- const _hoisted_8 = {
406
+ const _hoisted_6 = {
377
407
  class: /*#__PURE__*/normalizeClass(['contents'])
378
408
  };
379
409
  function render(_ctx, _cache, $props, $setup, $data, $options) {
380
410
  const _component_OrLabel = resolveComponent("OrLabel");
381
411
  const _component_OrTag = resolveComponent("OrTag");
412
+ const _component_OrSelectPlaceholder = resolveComponent("OrSelectPlaceholder");
382
413
  const _component_OrInput = resolveComponent("OrInput");
383
414
  const _component_OrIconButton = resolveComponent("OrIconButton");
384
415
  const _component_OrIcon = resolveComponent("OrIcon");
@@ -430,28 +461,34 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
430
461
  }, () => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.selection, option => {
431
462
  return openBlock(), createBlock(_component_OrTag, {
432
463
  key: option.value,
433
- variant: 'reset',
434
- disabled: _ctx.disabled || _ctx.readonly,
464
+ variant: _ctx.readonly || _ctx.disabled ? 'tag' : 'reset',
465
+ disabled: _ctx.disabled,
435
466
  onReset: $event => _ctx.deselect(option)
436
467
  }, {
437
468
  default: withCtx(() => [createTextVNode(toDisplayString(option.label), 1 /* TEXT */)]),
438
469
 
439
470
  _: 2 /* DYNAMIC */
440
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled", "onReset"]);
441
- }), 128 /* KEYED_FRAGMENT */))]) : _ctx.popoverState === 'closed' || !_ctx.enableSearch ? (openBlock(), createElementBlock("span", {
471
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["variant", "disabled", "onReset"]);
472
+ }), 128 /* KEYED_FRAGMENT */))]) : _ctx.popoverState === 'closed' || !_ctx.enableSearch ? (openBlock(), createBlock(_component_OrSelectPlaceholder, {
442
473
  key: 1,
443
- class: normalizeClass(_ctx.placeholderStyles),
444
- disabled: _ctx.disabled ? '' : null
445
- }, toDisplayString(_ctx.placeholder), 11 /* TEXT, CLASS, PROPS */, _hoisted_2)) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock(Fragment, {
474
+ disabled: _ctx.disabled
475
+ }, {
476
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.placeholder), 1 /* TEXT */)]),
477
+
478
+ _: 1 /* STABLE */
479
+ }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */)) : (openBlock(), createElementBlock(Fragment, {
446
480
  key: 1
447
481
  }, [!_ctx.isEmptyModelValue ? renderSlot(_ctx.$slots, "valueTemplate", {
448
482
  key: 0,
449
483
  model: _ctx.proxyModelValue
450
- }, () => [createElementVNode("span", _hoisted_3, toDisplayString(_ctx.selection && _ctx.selection.label), 1 /* TEXT */)]) : _ctx.popoverState === 'closed' || !_ctx.enableSearch ? (openBlock(), createElementBlock("span", {
484
+ }, () => [createElementVNode("span", _hoisted_2, toDisplayString(_ctx.selection && _ctx.selection.label), 1 /* TEXT */)]) : _ctx.popoverState === 'closed' || !_ctx.enableSearch ? (openBlock(), createBlock(_component_OrSelectPlaceholder, {
451
485
  key: 1,
452
- class: normalizeClass(_ctx.placeholderStyles),
453
- disabled: _ctx.disabled ? '' : null
454
- }, toDisplayString(_ctx.placeholder), 11 /* TEXT, CLASS, PROPS */, _hoisted_4)) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */))], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1), _ctx.multiple && _ctx.outerItems.length > 0 ? (openBlock(), createElementBlock(Fragment, {
486
+ disabled: _ctx.disabled
487
+ }, {
488
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.placeholder), 1 /* TEXT */)]),
489
+
490
+ _: 1 /* STABLE */
491
+ }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 64 /* STABLE_FRAGMENT */))], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_1), _ctx.multiple && _ctx.outerItems.length > 0 ? (openBlock(), createElementBlock(Fragment, {
455
492
  key: 0
456
493
  }, [createTextVNode(" +" + toDisplayString(_ctx.outerItems.length), 1 /* TEXT */)], 64 /* STABLE_FRAGMENT */)) : createCommentVNode("v-if", true), _ctx.popoverState === 'open' && _ctx.enableSearch && _ctx.isDesktop ? (openBlock(), createBlock(_component_OrInput, {
457
494
  key: 1,
@@ -464,7 +501,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
464
501
  size: _ctx.size,
465
502
  "disable-default-styles": true,
466
503
  onClick: _cache[3] || (_cache[3] = withModifiers(() => {}, ["stop"]))
467
- }, null, 8 /* PROPS */, ["modelValue", "class", "placeholder", "size"])) : (openBlock(), createElementBlock("div", _hoisted_5)), createElementVNode("div", _hoisted_6, [_ctx.showClear ? (openBlock(), createBlock(_component_OrIconButton, {
504
+ }, null, 8 /* PROPS */, ["modelValue", "class", "placeholder", "size"])) : (openBlock(), createElementBlock("div", _hoisted_3)), createElementVNode("div", _hoisted_4, [_ctx.showClear ? (openBlock(), createBlock(_component_OrIconButton, {
468
505
  key: 0,
469
506
  icon: 'close',
470
507
  color: 'inherit',
@@ -593,14 +630,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
593
630
  _: 3 /* FORWARDED */
594
631
  }, 8 /* PROPS */, ["trigger", "custom-styles"])]),
595
632
  _: 3 /* FORWARDED */
596
- }, 8 /* PROPS */, ["class", "variant", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.toggle], [_directive_dropdown_close, _ctx.close]]), withDirectives(createElementVNode("div", _hoisted_7, [_ctx.hint ? (openBlock(), createBlock(_component_OrHint, {
633
+ }, 8 /* PROPS */, ["class", "variant", "size", "invalid", "readonly", "disabled"])), [[_directive_dropdown_open, _ctx.toggle], [_directive_dropdown_close, _ctx.close]]), withDirectives(createElementVNode("div", _hoisted_5, [_ctx.hint ? (openBlock(), createBlock(_component_OrHint, {
597
634
  key: 0,
598
635
  disabled: _ctx.disabled
599
636
  }, {
600
637
  default: withCtx(() => [createTextVNode(toDisplayString(_ctx.hint), 1 /* TEXT */)]),
601
638
 
602
639
  _: 1 /* STABLE */
603
- }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 512 /* NEED_PATCH */), [[vShow, !_ctx.error]]), withDirectives(createElementVNode("div", _hoisted_8, [createVNode(_component_OrError, {
640
+ }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 512 /* NEED_PATCH */), [[vShow, !_ctx.error]]), withDirectives(createElementVNode("div", _hoisted_6, [createVNode(_component_OrError, {
604
641
  disabled: _ctx.disabled
605
642
  }, {
606
643
  default: withCtx(() => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)]),
@@ -75,7 +75,7 @@ export { s as OrSearch } from '../OrSearch-2800e9bf.js';
75
75
  export { s as OrSearchV3 } from '../OrSearch-98342176.js';
76
76
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-851db474.js';
77
77
  export { s as OrSelect } from '../OrSelect-9520d6e6.js';
78
- export { s as OrSelectV3 } from '../OrSelect-a2272840.js';
78
+ export { s as OrSelectV3 } from '../OrSelect-ba0f0da3.js';
79
79
  export { s as OrSidebar, O as OrSidebarSide } from '../OrSidebar-aaf73310.js';
80
80
  export { s as OrSidebarV3 } from '../OrSidebar-8f9b7502.js';
81
81
  export { O as OrSidebarPlacement } from '../OrSidebarCollapseButton-79a7c625.js';
@@ -86,7 +86,6 @@ declare const _default: import("vue-demi").DefineComponent<{
86
86
  rootStyles: import("vue-demi").ComputedRef<string[]>;
87
87
  controlStyles: import("vue-demi").ComputedRef<string[]>;
88
88
  searchControlStyles: import("vue-demi").ComputedRef<string[]>;
89
- placeholderStyles: import("vue-demi").ComputedRef<string[]>;
90
89
  dropdownStyles: import("vue-demi").ComputedRef<string[]>;
91
90
  dropdownItemStyles: import("vue-demi").ComputedRef<string[]>;
92
91
  noSearchResultsStyles: import("vue-demi").ComputedRef<string[]>;
@@ -1,4 +1,4 @@
1
- export { s as OrSelectV3 } from '../../OrSelect-a2272840.js';
1
+ export { s as OrSelectV3 } from '../../OrSelect-ba0f0da3.js';
2
2
  export { I as SelectSize } from '../../OrInputBox-912a6254.js';
3
3
  import 'vue-demi';
4
4
  import '../../dropdown-open-06d651cf.js';
@@ -0,0 +1,17 @@
1
+ declare const _default: import("vue-demi").DefineComponent<{
2
+ disabled: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ }, {
7
+ root: import("vue-demi").Ref<HTMLElement | undefined>;
8
+ rootStyles: import("vue-demi").ComputedRef<string[]>;
9
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
10
+ disabled: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ }>>, {
15
+ disabled: boolean;
16
+ }>;
17
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const SelectPlaceholder: string[];
@@ -1,7 +1,6 @@
1
1
  export declare const Select: string[];
2
2
  export declare const SelectControl: string[];
3
3
  export declare const SelectSearchControl: string[];
4
- export declare const SelectPlaceholder: string[];
5
4
  export declare const SelectDropdown: string[];
6
5
  export declare const SelectDropdownDefault: string[];
7
6
  export declare const SelectDropdownFlipped: string[];
@@ -75,7 +75,7 @@ export { s as OrSearch } from './OrSearch-2800e9bf.js';
75
75
  export { s as OrSearchV3 } from './OrSearch-98342176.js';
76
76
  export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-851db474.js';
77
77
  export { s as OrSelect } from './OrSelect-9520d6e6.js';
78
- export { s as OrSelectV3 } from './OrSelect-a2272840.js';
78
+ export { s as OrSelectV3 } from './OrSelect-ba0f0da3.js';
79
79
  export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-aaf73310.js';
80
80
  export { s as OrSidebarV3 } from './OrSidebar-8f9b7502.js';
81
81
  export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-79a7c625.js';