@scalar/components 0.16.12 → 0.16.13

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 (99) hide show
  1. package/dist/components/ScalarButton/ScalarButton.vue.d.ts +1 -1
  2. package/dist/components/ScalarButton/ScalarButton.vue.d.ts.map +1 -1
  3. package/dist/components/ScalarButton/types.d.ts +1 -1
  4. package/dist/components/ScalarButton/types.d.ts.map +1 -1
  5. package/dist/components/ScalarCard/index.d.ts +1 -1
  6. package/dist/components/ScalarCard/index.d.ts.map +1 -1
  7. package/dist/components/ScalarCard/useCardHeading.d.ts +1 -5
  8. package/dist/components/ScalarCard/useCardHeading.d.ts.map +1 -1
  9. package/dist/components/ScalarCard/useCardHeading.js +0 -1
  10. package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue.js +5 -5
  11. package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.js +4 -4
  12. package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue.js +5 -5
  13. package/dist/components/ScalarCheckboxInput/index.d.ts +2 -2
  14. package/dist/components/ScalarCheckboxInput/index.d.ts.map +1 -1
  15. package/dist/components/ScalarCodeBlock/ScalarCodeBlockCopy.vue.js +2 -2
  16. package/dist/components/ScalarCodeBlock/ScalarCodeBlockCopy.vue2.js +5 -5
  17. package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +4 -4
  18. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
  19. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +43 -41
  20. package/dist/components/ScalarCombobox/index.d.ts.map +1 -1
  21. package/dist/components/ScalarCombobox/types.d.ts +0 -2
  22. package/dist/components/ScalarCombobox/types.d.ts.map +1 -1
  23. package/dist/components/ScalarCombobox/types.js +0 -1
  24. package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts.map +1 -1
  25. package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +15 -15
  26. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.js +2 -2
  27. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue2.js +1 -1
  28. package/dist/components/ScalarDropdown/ScalarDropdownItem.vue.js +2 -2
  29. package/dist/components/ScalarDropdown/ScalarDropdownItem.vue2.js +9 -9
  30. package/dist/components/ScalarDropdown/index.d.ts +1 -1
  31. package/dist/components/ScalarDropdown/index.d.ts.map +1 -1
  32. package/dist/components/ScalarFileUpload/index.d.ts +3 -3
  33. package/dist/components/ScalarFileUpload/index.d.ts.map +1 -1
  34. package/dist/components/ScalarFileUpload/types.d.ts +2 -1
  35. package/dist/components/ScalarFileUpload/types.d.ts.map +1 -1
  36. package/dist/components/ScalarFloating/index.d.ts.map +1 -1
  37. package/dist/components/ScalarForm/useFormGroups.d.ts +0 -5
  38. package/dist/components/ScalarForm/useFormGroups.d.ts.map +1 -1
  39. package/dist/components/ScalarForm/useFormGroups.js +3 -4
  40. package/dist/components/ScalarHeader/ScalarHeaderButton.vue.d.ts.map +1 -1
  41. package/dist/components/ScalarHotkey/formatHotkey.d.ts +0 -2
  42. package/dist/components/ScalarHotkey/formatHotkey.d.ts.map +1 -1
  43. package/dist/components/ScalarHotkey/formatHotkey.js +1 -2
  44. package/dist/components/ScalarHotkey/index.d.ts +1 -1
  45. package/dist/components/ScalarHotkey/index.d.ts.map +1 -1
  46. package/dist/components/ScalarIcon/types.d.ts +1 -1
  47. package/dist/components/ScalarIcon/types.d.ts.map +1 -1
  48. package/dist/components/ScalarIconButton/types.d.ts +2 -2
  49. package/dist/components/ScalarIconButton/types.d.ts.map +1 -1
  50. package/dist/components/ScalarListbox/ScalarListboxInput.vue.d.ts +2 -2
  51. package/dist/components/ScalarListbox/ScalarListboxInput.vue.js +8 -8
  52. package/dist/components/ScalarListbox/ScalarListboxItem.vue.js +3 -3
  53. package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts.map +1 -1
  54. package/dist/components/ScalarLoading/ScalarLoading.vue.js +2 -2
  55. package/dist/components/ScalarLoading/ScalarLoading.vue2.js +8 -8
  56. package/dist/components/ScalarLoading/types.d.ts +2 -1
  57. package/dist/components/ScalarLoading/types.d.ts.map +1 -1
  58. package/dist/components/ScalarLoading/useLoadingState.d.ts +12 -3
  59. package/dist/components/ScalarLoading/useLoadingState.d.ts.map +1 -1
  60. package/dist/components/ScalarMenu/ScalarMenuButton.vue.d.ts +1 -1
  61. package/dist/components/ScalarMenu/ScalarMenuButton.vue.d.ts.map +1 -1
  62. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts.map +1 -1
  63. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.d.ts +1 -1
  64. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.d.ts.map +1 -1
  65. package/dist/components/ScalarPopover/index.d.ts.map +1 -1
  66. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +3 -3
  67. package/dist/components/ScalarSearchResults/index.d.ts +1 -1
  68. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -1
  69. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +22 -15
  70. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
  71. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +45 -42
  72. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts +2 -0
  73. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts.map +1 -1
  74. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.js +58 -56
  75. package/dist/components/ScalarSidebar/ScalarSidebarSearchButton.vue.d.ts +1 -4
  76. package/dist/components/ScalarSidebar/ScalarSidebarSearchButton.vue.d.ts.map +1 -1
  77. package/dist/components/ScalarSidebar/ScalarSidebarSearchButton.vue.js +5 -8
  78. package/dist/components/ScalarSidebar/ScalarSidebarSearchInput.vue.js +4 -4
  79. package/dist/components/ScalarSidebar/useSidebarNestedItems.d.ts +1 -7
  80. package/dist/components/ScalarSidebar/useSidebarNestedItems.d.ts.map +1 -1
  81. package/dist/components/ScalarSidebar/useSidebarNestedItems.js +0 -1
  82. package/dist/components/ScalarTeleport/index.d.ts +1 -1
  83. package/dist/components/ScalarTeleport/index.d.ts.map +1 -1
  84. package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +3 -3
  85. package/dist/components/ScalarToggle/ScalarToggleGroup.vue.js +2 -2
  86. package/dist/components/ScalarTooltip/index.d.ts +2 -2
  87. package/dist/components/ScalarTooltip/index.d.ts.map +1 -1
  88. package/dist/components/ScalarTooltip/types.d.ts +2 -1
  89. package/dist/components/ScalarTooltip/types.d.ts.map +1 -1
  90. package/dist/components/ScalarTooltip/useTooltip.d.ts +0 -6
  91. package/dist/components/ScalarTooltip/useTooltip.d.ts.map +1 -1
  92. package/dist/components/ScalarTooltip/useTooltip.js +0 -1
  93. package/dist/helpers/index.d.ts +1 -1
  94. package/dist/helpers/index.d.ts.map +1 -1
  95. package/dist/index.d.ts +2 -0
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js +36 -36
  98. package/dist/style.css +1 -1
  99. package/package.json +13 -19
@@ -1,4 +1,4 @@
1
- import type { ScalarButtonProps } from '../../components/ScalarButton/types';
1
+ import type { ScalarButtonProps } from './types';
2
2
  /**
3
3
  * Scalar Button Component
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarButton/ScalarButton.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAGV,iBAAiB,EAClB,MAAM,iCAAiC,CAAA;AAOxC;;;;;;;;;;;GAWG;;WA+IQ,CAAC,KAAK,IAAgB,KAAK,GAAG;;cAC3B,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;AAhJ7C,wBAiLC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarButton/ScalarButton.vue"],"names":[],"mappings":"AA0HA,OAAO,KAAK,EAAyB,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAGvE;;;;;;;;;;;GAWG;;WA+IQ,CAAC,KAAK,IAAgB,KAAK,GAAG;;cAC3B,CAAC,KAAK,IAAiB,KAAK,GAAG;;cAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;AAhJ7C,wBAiLC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { ScalarIconComponent } from '@scalar/icons/types';
2
2
  import type { Component } from 'vue';
3
- import type { LoadingState } from '../../components/ScalarLoading';
3
+ import type { LoadingState } from '../ScalarLoading/types';
4
4
  /** Styles for the ScalarButton component */
5
5
  export type ButtonVariant = 'solid' | 'outlined' | 'ghost' | 'gradient' | 'danger';
6
6
  /** Sizes for the ScalarButton component */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarButton/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAE9D,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAA;AAElF,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE3C,mCAA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QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAA;IAC1B;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  export { default as ScalarCard } from './ScalarCard.vue.js';
2
+ export { default as ScalarCardFooter } from './ScalarCardFooter.vue.js';
2
3
  export { default as ScalarCardHeader } from './ScalarCardHeader.vue.js';
3
4
  export { default as ScalarCardSection } from './ScalarCardSection.vue.js';
4
- export { default as ScalarCardFooter } from './ScalarCardFooter.vue.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAA"}
@@ -1,8 +1,4 @@
1
- import { type InjectionKey, type Ref } from 'vue';
2
- /**
3
- * Tracks the region heading id for card accessibility
4
- */
5
- export declare const CARD_Heading_SYMBOL: InjectionKey<Ref<string | undefined>>;
1
+ import { type Ref } from 'vue';
6
2
  /**
7
3
  * Set the region heading id for a ScalarCardHeader component.
8
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"useCardHeading.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/useCardHeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAEvE;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAe,YAAY,CAAC,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;AAEpF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,IAAI,MAAM,SAKxC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa;IAMtB,gCAAgC;;CAGnC,CAAA"}
1
+ {"version":3,"file":"useCardHeading.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/useCardHeading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AAOvE;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,IAAI,MAAM,SAKxC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa;IAMtB,gCAAgC;;CAGnC,CAAA"}
@@ -10,7 +10,6 @@ const n = Symbol(), s = (o) => {
10
10
  };
11
11
  };
12
12
  export {
13
- n as CARD_Heading_SYMBOL,
14
13
  s as useCardHeading,
15
14
  c as useCardRegion
16
15
  };
@@ -16,17 +16,17 @@ const B = {}, S = /* @__PURE__ */ c({
16
16
  return (n, C) => (u(), t(o(h), null, {
17
17
  default: m(() => [
18
18
  (u(!0), p(v, null, V(n.options, (e) => (u(), t(g, {
19
- value: e.value,
20
- name: o(d),
19
+ key: e.value,
21
20
  modelValue: l.value?.some(({ value: a }) => a === e.value),
22
- "onUpdate:modelValue": (a) => l.value = a ? [...l.value, e] : l.value.filter(({ value: s }) => s !== e.value),
23
- key: e.value
21
+ name: o(d),
22
+ value: e.value,
23
+ "onUpdate:modelValue": (a) => l.value = a ? [...l.value, e] : l.value.filter(({ value: s }) => s !== e.value)
24
24
  }, {
25
25
  default: m(() => [
26
26
  k(x(e.label), 1)
27
27
  ]),
28
28
  _: 2
29
- }, 1032, ["value", "name", "modelValue", "onUpdate:modelValue"]))), 128))
29
+ }, 1032, ["modelValue", "name", "value", "onUpdate:modelValue"]))), 128))
30
30
  ]),
31
31
  _: 1
32
32
  }));
@@ -21,17 +21,17 @@ const k = { class: "flex-1 text-left min-w-0 truncate" }, C = ["type"], B = {},
21
21
  ), {
22
22
  default: _(() => [
23
23
  y(b, {
24
+ class: "shrink-0",
24
25
  selected: e.value,
25
- type: t.type,
26
- class: "shrink-0"
26
+ type: t.type
27
27
  }, null, 8, ["selected", "type"]),
28
28
  r("div", k, [
29
29
  v(t.$slots, "default")
30
30
  ]),
31
31
  h(r("input", s({
32
- type: t.type,
33
32
  "onUpdate:modelValue": l[0] || (l[0] = (d) => e.value = d),
34
- class: "sr-only"
33
+ class: "sr-only",
34
+ type: t.type
35
35
  }, o(i)), null, 16, C), [
36
36
  [x, e.value]
37
37
  ])
@@ -16,18 +16,18 @@ const h = {}, b = /* @__PURE__ */ s({
16
16
  return (m, y) => (l(), o(t(g), null, {
17
17
  default: u(() => [
18
18
  (l(!0), f(p, null, v(m.options, (e) => (l(), o(x, {
19
+ key: e.value,
20
+ modelValue: a.value?.value === e.value,
21
+ name: t(d),
19
22
  type: "radio",
20
23
  value: e.value,
21
- name: t(d),
22
- modelValue: a.value?.value === e.value,
23
- "onUpdate:modelValue": (n) => a.value = n ? e : void 0,
24
- key: e.value
24
+ "onUpdate:modelValue": (n) => a.value = n ? e : void 0
25
25
  }, {
26
26
  default: u(() => [
27
27
  V(k(e.label), 1)
28
28
  ]),
29
29
  _: 2
30
- }, 1032, ["value", "name", "modelValue", "onUpdate:modelValue"]))), 128))
30
+ }, 1032, ["modelValue", "name", "value", "onUpdate:modelValue"]))), 128))
31
31
  ]),
32
32
  _: 1
33
33
  }));
@@ -1,6 +1,6 @@
1
- export { default as ScalarCheckboxInput } from './ScalarCheckboxInput.vue.js';
1
+ export { default as ScalarCheckbox } from './ScalarCheckbox.vue.js';
2
2
  export { default as ScalarCheckboxGroup } from './ScalarCheckboxGroup.vue.js';
3
+ export { default as ScalarCheckboxInput } from './ScalarCheckboxInput.vue.js';
3
4
  export { default as ScalarCheckboxRadioGroup } from './ScalarCheckboxRadioGroup.vue.js';
4
- export { default as ScalarCheckbox } from './ScalarCheckbox.vue.js';
5
5
  export type { ScalarCheckboxOption, ScalarCheckboxType } from './types';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCheckboxInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACpF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEhE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCheckboxInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACpF,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ScalarCodeBlockCopy.vue2.js";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ a(o, [["__scopeId", "data-v-0295860a"]]);
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e1870266"]]);
5
5
  export {
6
6
  c as default
7
7
  };
@@ -5,8 +5,8 @@ import { useClipboard as b } from "@scalar/use-hooks/useClipboard";
5
5
  import k from "../ScalarButton/ScalarButton.vue.js";
6
6
  const g = {
7
7
  key: 0,
8
- role: "alert",
9
- class: "sr-only"
8
+ class: "sr-only",
9
+ role: "alert"
10
10
  }, N = /* @__PURE__ */ f({
11
11
  __name: "ScalarCodeBlockCopy",
12
12
  props: {
@@ -40,11 +40,11 @@ const g = {
40
40
  )
41
41
  }, [
42
42
  a(o(k), {
43
+ "aria-controls": c.controls,
44
+ "aria-label": "Copy",
43
45
  class: s(o(i)(o(p)({ showCopied: e.value }))),
44
46
  type: "button",
45
47
  variant: "ghost",
46
- "aria-controls": c.controls,
47
- "aria-label": "Copy",
48
48
  onClick: u
49
49
  }, {
50
50
  default: y(() => [
@@ -56,7 +56,7 @@ const g = {
56
56
  }, null, 8, ["class"])
57
57
  ]),
58
58
  _: 1
59
- }, 8, ["class", "aria-controls"]),
59
+ }, 8, ["aria-controls", "class"]),
60
60
  e.value ? (l(), n("div", g, " Copied ")) : m("", !0)
61
61
  ], 2));
62
62
  }
@@ -18,7 +18,7 @@ const B = /* @__PURE__ */ f({
18
18
  }),
19
19
  emits: /* @__PURE__ */ s(["add"], ["update:modelValue"]),
20
20
  setup(m, { emit: i }) {
21
- const a = c(m, "modelValue"), u = i;
21
+ const u = i, a = c(m, "modelValue");
22
22
  return (e, b) => ($(), g(y, {
23
23
  middleware: e.middleware,
24
24
  offset: e.offset,
@@ -36,8 +36,8 @@ const B = /* @__PURE__ */ f({
36
36
  open: d,
37
37
  options: e.options,
38
38
  placeholder: e.placeholder,
39
- "onUpdate:modelValue": (o) => (p(), a.value = o[0]),
40
- onAdd: () => (p(), u("add"))
39
+ onAdd: () => (p(), u("add")),
40
+ "onUpdate:modelValue": (o) => (p(), a.value = o[0])
41
41
  }, V({ _: 2 }, [
42
42
  e.$slots.option ? {
43
43
  name: "option",
@@ -60,7 +60,7 @@ const B = /* @__PURE__ */ f({
60
60
  ]),
61
61
  key: "2"
62
62
  } : void 0
63
- ]), 1032, ["modelValue", "open", "options", "placeholder", "onUpdate:modelValue", "onAdd"])
63
+ ]), 1032, ["modelValue", "open", "options", "placeholder", "onAdd", "onUpdate:modelValue"])
64
64
  ]),
65
65
  _: 3
66
66
  }, 8, ["middleware", "offset", "placement", "resize", "target", "teleport"]));
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarComboboxOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxOptions.vue"],"names":[],"mappings":"AAkRA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,eAAe,EAErB,MAAM,SAAS,CAAA;yBAEC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EACpF,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA+bO,mBAAmB,CAAC;;;;iBA7bjB,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;sBACh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AgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;UAEJ,yEAAoC;EAEvC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA5czE,wBA4c4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,10 +1,10 @@
1
- import { defineComponent as W, mergeModels as O, useModel as X, useSlots as Y, useId as z, computed as w, ref as M, onMounted as D, watch as Z, createElementBlock as c, openBlock as s, Fragment as m, createElementVNode as k, withDirectives as G, createVNode as I, unref as h, withKeys as V, withModifiers as y, vModelText as _, createBlock as C, createCommentVNode as K, renderList as q, withCtx as x, renderSlot as S, toDisplayString as F, createTextVNode as ee, vShow as te } from "vue";
1
+ import { defineComponent as W, mergeModels as O, useModel as X, useSlots as Y, useId as z, computed as w, ref as M, onMounted as D, watch as Z, createElementBlock as c, openBlock as a, Fragment as m, createElementVNode as k, withDirectives as G, createVNode as I, unref as h, withKeys as V, withModifiers as y, vModelText as _, createBlock as C, createCommentVNode as K, renderList as q, withCtx as x, renderSlot as S, toDisplayString as F, createTextVNode as ee, vShow as te } from "vue";
2
2
  import { ScalarIconMagnifyingGlass as le, ScalarIconPlus as oe } from "@scalar/icons";
3
3
  import P from "./ScalarComboboxOption.vue.js";
4
- import ie from "./ScalarComboboxOptionGroup.vue.js";
5
- import { isGroups as U } from "./types.js";
6
- import ne from "../ScalarListbox/ScalarListboxCheckbox.vue.js";
7
- const ae = { class: "relative flex" }, se = ["aria-activedescendant", "placeholder"], de = ["aria-multiselectable"], ue = { class: "inline-block min-w-0 flex-1 truncate text-c-1" }, be = /* @__PURE__ */ W({
4
+ import ne from "./ScalarComboboxOptionGroup.vue.js";
5
+ import { isGroups as R } from "./types.js";
6
+ import ie from "../ScalarListbox/ScalarListboxCheckbox.vue.js";
7
+ const se = { class: "relative flex" }, ae = ["aria-activedescendant", "placeholder"], de = ["aria-multiselectable"], ue = { class: "inline-block min-w-0 flex-1 truncate text-c-1" }, be = /* @__PURE__ */ W({
8
8
  inheritAttrs: !1,
9
9
  __name: "ScalarComboboxOptions",
10
10
  props: /* @__PURE__ */ O({
@@ -16,15 +16,15 @@ const ae = { class: "relative flex" }, se = ["aria-activedescendant", "placehold
16
16
  modelModifiers: {}
17
17
  }),
18
18
  emits: /* @__PURE__ */ O(["add"], ["update:modelValue"]),
19
- setup(B, { emit: j }) {
20
- const d = B, H = j, n = X(B, "modelValue"), g = Y(), $ = `scalar-combobox-items-${z()}`, f = { id: `${z()}-add`, label: "Add a new option" };
19
+ setup(B, { emit: U }) {
20
+ const d = B, j = U, i = X(B, "modelValue"), g = Y(), $ = `scalar-combobox-items-${z()}`, f = { id: `${z()}-add`, label: "Add a new option" };
21
21
  function p(t) {
22
22
  return `${$}-${t.id}`;
23
23
  }
24
24
  const r = w(
25
- () => U(d.options) ? d.options.flatMap((t) => t.options) : d.options
26
- ), J = w(
27
- () => U(d.options) ? d.options : (
25
+ () => R(d.options) ? d.options.flatMap((t) => t.options) : d.options
26
+ ), H = w(
27
+ () => R(d.options) ? d.options : (
28
28
  /*
29
29
  We know G is an unextended OptionGroup<O> here because of the
30
30
  structure of the component props so we can cast it to G
@@ -32,10 +32,10 @@ const ae = { class: "relative flex" }, se = ["aria-activedescendant", "placehold
32
32
  [{ label: "", options: d.options }]
33
33
  )
34
34
  // G is OptionGroup<O>
35
- ), u = M(""), l = M(n.value?.[0] ?? r.value[0]);
35
+ ), u = M(""), l = M(i.value?.[0] ?? r.value[0]);
36
36
  D(() => {
37
- u.value = "", l.value = n.value?.[0] ?? r.value[0], n.value[0] && setTimeout(() => {
38
- const e = n.value[0];
37
+ u.value = "", l.value = i.value?.[0] ?? r.value[0], i.value[0] && setTimeout(() => {
38
+ const e = i.value[0];
39
39
  e && document?.getElementById(p(e))?.scrollIntoView({ block: "nearest" });
40
40
  }, 10);
41
41
  }), Z(
@@ -53,25 +53,27 @@ const ae = { class: "relative flex" }, se = ["aria-activedescendant", "placehold
53
53
  T();
54
54
  return;
55
55
  }
56
- d.multiselect ? n.value.some((e) => e.id === t.id) ? n.value = n.value.filter((e) => e.id !== t.id) : n.value = [
57
- ...n.value,
56
+ d.multiselect ? i.value.some((e) => e.id === t.id) ? i.value = i.value.filter((e) => e.id !== t.id) : i.value = [
57
+ ...i.value,
58
58
  r.value.find((e) => e.id === t.id)
59
- ] : n.value = [r.value.find((e) => e.id === t.id)];
59
+ ] : i.value = [r.value.find((e) => e.id === t.id)];
60
60
  }
61
61
  }
62
62
  function E(t) {
63
- const e = N.value, v = e.findIndex((i) => i.id === l.value?.id) + t;
63
+ const e = N.value, v = e.findIndex(
64
+ (n) => n.id === l.value?.id
65
+ ) + t;
64
66
  v < 0 || v > e.length - 1 || (l.value = e[v], l.value && document?.getElementById(p(l.value))?.scrollIntoView({
65
67
  behavior: "smooth",
66
68
  block: "nearest"
67
69
  }));
68
70
  }
69
71
  function T() {
70
- H("add"), u.value = "";
72
+ j("add"), u.value = "";
71
73
  }
72
74
  const L = M(null);
73
- return D(() => setTimeout(() => L.value?.focus(), 0)), (t, e) => (s(), c(m, null, [
74
- k("div", ae, [
75
+ return D(() => setTimeout(() => L.value?.focus(), 0)), (t, e) => (a(), c(m, null, [
76
+ k("div", se, [
75
77
  I(h(le), { class: "pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-c-3 size-4" }),
76
78
  G(k("input", {
77
79
  ref_key: "input",
@@ -91,7 +93,7 @@ const ae = { class: "relative flex" }, se = ["aria-activedescendant", "placehold
91
93
  e[2] || (e[2] = V(y((o) => l.value && A(l.value), ["prevent"]), ["enter"])),
92
94
  e[3] || (e[3] = V(y((o) => E(-1), ["prevent"]), ["up"]))
93
95
  ]
94
- }, null, 40, se), [
96
+ }, null, 40, ae), [
95
97
  [_, u.value]
96
98
  ])
97
99
  ]),
@@ -102,12 +104,12 @@ const ae = { class: "relative flex" }, se = ["aria-activedescendant", "placehold
102
104
  role: "listbox",
103
105
  tabindex: "-1"
104
106
  }, [
105
- (s(!0), c(m, null, q(J.value, (o, v) => (s(), C(ie, {
107
+ (a(!0), c(m, null, q(H.value, (o, v) => (a(), C(ne, {
106
108
  id: `${$}-group-${v}`,
107
109
  key: v,
108
110
  hidden: (
109
111
  // Only show the group label if there are some results
110
- !o.options.some((i) => b.value.some((a) => a.id === i.id)) || // And it has a label
112
+ !o.options.some((n) => b.value.some((s) => s.id === n.id)) || // And it has a label
111
113
  !o.label
112
114
  )
113
115
  }, {
@@ -115,36 +117,36 @@ const ae = { class: "relative flex" }, se = ["aria-activedescendant", "placehold
115
117
  t.$slots.group ? S(t.$slots, "group", {
116
118
  key: 0,
117
119
  group: o
118
- }) : (s(), c(m, { key: 1 }, [
120
+ }) : (a(), c(m, { key: 1 }, [
119
121
  ee(F(o.label), 1)
120
122
  ], 64))
121
123
  ]),
122
124
  default: x(() => [
123
- (s(!0), c(m, null, q(b.value, (i) => (s(), c(m, {
124
- key: i.id
125
+ (a(!0), c(m, null, q(b.value, (n) => (a(), c(m, {
126
+ key: n.id
125
127
  }, [
126
- o.options.some((a) => a.id === i.id) ? (s(), C(P, {
128
+ o.options.some((s) => s.id === n.id) ? (a(), C(P, {
127
129
  key: 0,
128
- id: p(i),
129
- active: l.value?.id === i.id,
130
- selected: n.value.some((a) => a.id === i.id),
131
- onClick: (a) => A(i),
130
+ id: p(n),
131
+ active: l.value?.id === n.id,
132
+ selected: i.value.some((s) => s.id === n.id),
133
+ onClick: (s) => A(n),
132
134
  onMousedown: e[4] || (e[4] = y(() => {
133
135
  }, ["prevent"])),
134
- onMouseenter: (a) => l.value = i
136
+ onMouseenter: (s) => l.value = n
135
137
  }, {
136
- default: x(({ active: a, selected: Q }) => [
138
+ default: x(({ active: s, selected: J }) => [
137
139
  t.$slots.option ? S(t.$slots, "option", {
138
140
  key: 0,
139
- active: a,
140
- option: i,
141
- selected: Q
142
- }) : (s(), c(m, { key: 1 }, [
143
- I(h(ne), {
141
+ active: s,
142
+ option: n,
143
+ selected: J
144
+ }) : (a(), c(m, { key: 1 }, [
145
+ I(h(ie), {
144
146
  multiselect: t.multiselect,
145
- selected: n.value.some((R) => R.id === i.id)
147
+ selected: i.value.some((Q) => Q.id === n.id)
146
148
  }, null, 8, ["multiselect", "selected"]),
147
- k("span", ue, F(i.label), 1)
149
+ k("span", ue, F(n.label), 1)
148
150
  ], 64))
149
151
  ]),
150
152
  _: 2
@@ -153,7 +155,7 @@ const ae = { class: "relative flex" }, se = ["aria-activedescendant", "placehold
153
155
  ]),
154
156
  _: 2
155
157
  }, 1032, ["id", "hidden"]))), 128)),
156
- g.add ? (s(), C(P, {
158
+ g.add ? (a(), C(P, {
157
159
  key: 0,
158
160
  id: p(f),
159
161
  active: l.value?.id === f.id,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAEtF,YAAY,EAAE,MAAM,IAAI,oBAAoB,EAAE,WAAW,IAAI,yBAAyB,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AACtF,YAAY,EAAE,MAAM,IAAI,oBAAoB,EAAE,WAAW,IAAI,yBAAyB,EAAE,MAAM,SAAS,CAAA"}
@@ -7,8 +7,6 @@ export type OptionGroup<O extends Option = Option> = {
7
7
  options: O[];
8
8
  };
9
9
  export type OptionsOrGroups<O extends Option = Option, G extends OptionGroup<O> = OptionGroup<O>> = O[] | G[];
10
- /** Type guard to check if an option is a group */
11
- export declare function isGroup(option: Option | OptionGroup | undefined): option is OptionGroup;
12
10
  /** Type guard to check if an array of options is an array of groups */
13
11
  export declare function isGroups(options: Option[] | OptionGroup[]): options is OptionGroup[];
14
12
  /** Available events emitted by the combobox */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IACnD,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,CAAC,EAAE,CAAA;CACb,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,CAAA;AAE7G,kDAAkD;AAClD,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,IAAI,WAAW,CAEvF;AAED,uEAAuE;AACvE,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,GAAG,OAAO,IAAI,WAAW,EAAE,CAKpF;AAED,+CAA+C;AAC/C,MAAM,MAAM,aAAa,GAAG;IAC1B,4DAA4D;IAC5D,GAAG,EAAE,EAAE,CAAA;CACR,CAAA;AAED,uCAAuC;AACvC,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,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AAED,uCAAuC;AACvC,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI;IAChG,uDAAuD;IACvD,OAAO,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;IAC1C,8CAA8C;IAC9C,MAAM,CAAC,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,CAAC,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;IAC1E,6CAA6C;IAC7C,KAAK,CAAC,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,CAAC,CAAA;KAAE,GAAG,OAAO,CAAA;IACpC,iEAAiE;IACjE,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAA;CAC1C,CAAA"}
@@ -5,6 +5,5 @@ function u(r) {
5
5
  return r[0] ? n(r[0]) : !1;
6
6
  }
7
7
  export {
8
- n as isGroup,
9
8
  u as isGroups
10
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/ScalarDropdown.vue"],"names":[],"mappings":"AA8OA,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAI9E;;;;;;;;;;;GAWG;;IAmLH,0CAA0C;WACjC,OAAO;;;;IADhB,0CAA0C;WACjC,OAAO;;;;IA9Kd,kEAAkE;oBAClD;QACd,0CAA0C;QAC1C,IAAI,EAAE,OAAO,CAAA;KACd,GAAG,OAAO;IACX,iCAAiC;kBACnB;QACZ,0CAA0C;QAC1C,IAAI,EAAE,OAAO,CAAA;KACd,GAAG,OAAO;;AAdb,wBAkTC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarDropdown.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/ScalarDropdown.vue"],"names":[],"mappings":"AA6OA,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAK9E;;;;;;;;;;;GAWG;;IAmLH,0CAA0C;WACjC,OAAO;;;;IADhB,0CAA0C;WACjC,OAAO;;;;IA9Kd,kEAAkE;oBAClD;QACd,0CAA0C;QAC1C,IAAI,EAAE,OAAO,CAAA;KACd,GAAG,OAAO;IACX,iCAAiC;kBACnB;QACZ,0CAA0C;QAC1C,IAAI,EAAE,OAAO,CAAA;KACd,GAAG,OAAO;;AAdb,wBAkTC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as B, mergeModels as D, ref as b, useModel as g, useId as _, watch as $, computed as K, createBlock as L, openBlock as M, unref as m, mergeProps as I, createSlots as N, withCtx as A, renderSlot as R, createVNode as q, createElementVNode as O, withKeys as a, withModifiers as i, nextTick as C } from "vue";
2
- import { useDropdown as U } from "./useDropdown.js";
3
- import { useBindCx as V } from "@scalar/use-hooks/useBindCx";
4
- import { onClickOutside as j } from "@vueuse/core";
5
- import z from "./ScalarDropdownMenu.vue.js";
2
+ import { useBindCx as U } from "@scalar/use-hooks/useBindCx";
3
+ import { onClickOutside as V } from "@vueuse/core";
4
+ import j from "./ScalarDropdownMenu.vue.js";
5
+ import { useDropdown as z } from "./useDropdown.js";
6
6
  import F from "../ScalarFloating/ScalarFloating.vue.js";
7
7
  const P = ["id", "aria-activedescendant", "aria-labelledby", "onKeydown"], G = {}, Z = /* @__PURE__ */ B({
8
8
  ...G,
@@ -21,7 +21,7 @@ const P = ["id", "aria-activedescendant", "aria-labelledby", "onKeydown"], G = {
21
21
  }),
22
22
  emits: ["update:open"],
23
23
  setup(E) {
24
- const l = b(), r = b(), n = g(E, "open"), { active: o } = U(), v = _(), f = b(v), y = _();
24
+ const l = b(), r = b(), n = g(E, "open"), { active: o } = z(), v = _(), f = b(v), y = _();
25
25
  async function k() {
26
26
  n.value = !n.value, await C(), n.value && r.value?.focus();
27
27
  }
@@ -75,10 +75,10 @@ const P = ["id", "aria-activedescendant", "aria-labelledby", "onKeydown"], G = {
75
75
  const w = t[s];
76
76
  w?.id && (o.value = w.id);
77
77
  }
78
- j(r, u, {
78
+ V(r, u, {
79
79
  ignore: [K(() => l.value?.targetRef)]
80
80
  });
81
- const { cx: S } = V();
81
+ const { cx: S } = U();
82
82
  return (e, t) => (M(), L(m(F), I({
83
83
  ref_key: "floatingRef",
84
84
  ref: l
@@ -93,28 +93,28 @@ const P = ["id", "aria-activedescendant", "aria-labelledby", "onKeydown"], G = {
93
93
  n.value ? {
94
94
  name: "floating",
95
95
  fn: A(({ width: c }) => [
96
- q(z, I({
96
+ q(j, I({
97
97
  style: { width: c }
98
98
  }, m(S)("max-h-[inherit] max-w-[inherit]")), {
99
99
  menu: A(() => [
100
100
  O("div", {
101
- class: "flex flex-col p-0.75 outline-none",
101
+ id: m(y),
102
102
  ref_key: "menuRef",
103
103
  ref: r,
104
- role: "menu",
105
- id: m(y),
106
104
  "aria-activedescendant": m(o),
107
105
  "aria-labelledby": f.value,
106
+ class: "flex flex-col p-0.75 outline-none",
107
+ role: "menu",
108
+ tabindex: "-1",
108
109
  onClick: i(u, ["stop"]),
109
110
  onKeydown: [
111
+ t[0] || (t[0] = a(i((s) => d(1), ["prevent", "stop"]), ["down"])),
110
112
  a(i(x, ["prevent", "stop"]), ["enter"]),
111
- a(i(x, ["prevent", "stop"]), ["space"]),
112
113
  a(i(u, ["prevent", "stop"]), ["escape"]),
114
+ a(i(x, ["prevent", "stop"]), ["space"]),
113
115
  a(i(u, ["prevent", "stop"]), ["tab"]),
114
- t[0] || (t[0] = a(i((s) => d(1), ["prevent", "stop"]), ["down"])),
115
116
  t[1] || (t[1] = a(i((s) => d(-1), ["prevent", "stop"]), ["up"]))
116
- ],
117
- tabindex: "-1"
117
+ ]
118
118
  }, [
119
119
  R(e.$slots, "items", { open: n.value })
120
120
  ], 40, P)
@@ -1,7 +1,7 @@
1
1
  import o from "./ScalarDropdownButton.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-12a6b6d1"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6660bbc5"]]);
5
5
  export {
6
- m as default
6
+ c as default
7
7
  };
@@ -25,8 +25,8 @@ const u = {}, _ = /* @__PURE__ */ o({
25
25
  compoundVariants: [{ disabled: !1, active: !0, class: "bg-b-2" }]
26
26
  });
27
27
  return (e, m) => (s(), n(r(e.is), {
28
- class: i(["item", t(p)("scalar-dropdown-item", t(a)({ active: e.active, disabled: e.disabled }))]),
29
28
  "aria-disabled": e.disabled,
29
+ class: i(["item", t(p)("scalar-dropdown-item", t(a)({ active: e.active, disabled: e.disabled }))]),
30
30
  type: e.is === "button" ? "button" : void 0
31
31
  }, {
32
32
  default: d(() => [
@@ -1,7 +1,7 @@
1
1
  import o from "./ScalarDropdownItem.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ab7c0c49"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-3402682d"]]);
5
5
  export {
6
- m as default
6
+ p as default
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as i, useId as r, createBlock as n, openBlock as l, unref as a, withCtx as s, renderSlot as u } from "vue";
2
- import { useDropdownItem as m } from "./useDropdown.js";
3
- import p from "./ScalarDropdownButton.vue.js";
2
+ import m from "./ScalarDropdownButton.vue.js";
3
+ import { useDropdownItem as p } from "./useDropdown.js";
4
4
  const f = {}, w = /* @__PURE__ */ i({
5
5
  ...f,
6
6
  __name: "ScalarDropdownItem",
@@ -10,21 +10,21 @@ const f = {}, w = /* @__PURE__ */ i({
10
10
  },
11
11
  emits: ["click"],
12
12
  setup(c) {
13
- const { active: t } = m();
14
- return (e, o) => (l(), n(p, {
13
+ const { active: t } = p();
14
+ return (e, o) => (l(), n(m, {
15
+ id: e.id,
15
16
  active: a(t) === e.id,
16
- tabindex: "-1",
17
17
  disabled: e.disabled,
18
18
  role: "menuitem",
19
- id: e.id,
20
- onMouseenter: o[0] || (o[0] = (d) => t.value = e.id),
21
- onClick: o[1] || (o[1] = (d) => e.$emit("click", d))
19
+ tabindex: "-1",
20
+ onClick: o[0] || (o[0] = (d) => e.$emit("click", d)),
21
+ onMouseenter: o[1] || (o[1] = (d) => t.value = e.id)
22
22
  }, {
23
23
  default: s(() => [
24
24
  u(e.$slots, "default", {}, void 0, !0)
25
25
  ]),
26
26
  _: 3
27
- }, 8, ["active", "disabled", "id"]));
27
+ }, 8, ["id", "active", "disabled"]));
28
28
  }
29
29
  });
30
30
  export {
@@ -1,6 +1,6 @@
1
1
  export { default as ScalarDropdown } from './ScalarDropdown.vue.js';
2
- export { default as ScalarDropdownDivider } from './ScalarDropdownDivider.vue.js';
3
2
  export { default as ScalarDropdownButton } from './ScalarDropdownButton.vue.js';
3
+ export { default as ScalarDropdownDivider } from './ScalarDropdownDivider.vue.js';
4
4
  export { default as ScalarDropdownItem } from './ScalarDropdownItem.vue.js';
5
5
  export { default as ScalarDropdownMenu } from './ScalarDropdownMenu.vue.js';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA"}