@scalar/components 0.12.44 → 0.12.46

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 (56) hide show
  1. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.d.ts.map +1 -1
  2. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.js +5 -5
  3. package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts +16 -4
  4. package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts.map +1 -1
  5. package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +2 -1
  6. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +21 -4
  7. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
  8. package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +34 -21
  9. package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts +2 -0
  10. package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts.map +1 -1
  11. package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.js +25 -16
  12. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts +4 -0
  13. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
  14. package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +47 -44
  15. package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +1 -0
  16. package/dist/components/ScalarCombobox/types.d.ts +1 -0
  17. package/dist/components/ScalarCombobox/types.d.ts.map +1 -1
  18. package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts +140 -16
  19. package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts.map +1 -1
  20. package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts +5 -0
  21. package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts.map +1 -1
  22. package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +16 -13
  23. package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts.map +1 -1
  24. package/dist/components/ScalarFloating/ScalarFloating.vue.js +21 -20
  25. package/dist/components/ScalarFloating/types.d.ts +5 -0
  26. package/dist/components/ScalarFloating/types.d.ts.map +1 -1
  27. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +9 -9
  28. package/dist/components/ScalarIcon/icons/Cloud.svg.js +19 -0
  29. package/dist/components/ScalarIcon/icons/Cog.svg.js +20 -0
  30. package/dist/components/ScalarIcon/icons/DarkMode.svg.js +14 -11
  31. package/dist/components/ScalarIcon/icons/Email.svg.js +9 -17
  32. package/dist/components/ScalarIcon/icons/House.svg.js +1 -1
  33. package/dist/components/ScalarIcon/icons/Leave.svg.js +13 -15
  34. package/dist/components/ScalarIcon/icons/LightMode.svg.js +16 -11
  35. package/dist/components/ScalarIcon/icons/Users.svg.js +19 -0
  36. package/dist/components/ScalarIcon/icons/Wallet.svg.js +20 -0
  37. package/dist/components/ScalarIcon/icons/icons.d.ts +1 -1
  38. package/dist/components/ScalarIcon/icons/icons.d.ts.map +1 -1
  39. package/dist/components/ScalarIcon/icons/index.js +152 -150
  40. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +3 -3
  41. package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts +16 -4
  42. package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts.map +1 -1
  43. package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts.map +1 -1
  44. package/dist/components/ScalarListbox/ScalarListbox.vue.js +30 -27
  45. package/dist/components/ScalarModal/ScalarModal.vue.js +4 -4
  46. package/dist/components/ScalarModal/ScalarModal.vue2.js +1 -1
  47. package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts +64 -16
  48. package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts.map +1 -1
  49. package/dist/components/ScalarPopover/ScalarPopover.vue.js +5 -4
  50. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +1 -1
  51. package/dist/components/ScalarSearchResults/ScalarSearchResults.stories.d.ts +4 -4
  52. package/dist/style.css +1 -1
  53. package/package.json +2 -2
  54. package/dist/components/ScalarIcon/icons/Background.svg.js +0 -17
  55. package/dist/components/ScalarIcon/icons/CallToAction.svg.js +0 -20
  56. package/dist/components/ScalarIcon/icons/Payment.svg.js +0 -21
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCodeBlock.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCodeBlock/ScalarCodeBlock.vue"],"names":[],"mappings":";aAiJa,MAAM,GAAG,MAAM;WACjB,MAAM;kBACC,OAAO;sBACH,MAAM,GAAG,MAAM,EAAE;;;;;aAH1B,MAAM,GAAG,MAAM;WACjB,MAAM;kBACC,OAAO;sBACH,MAAM,GAAG,MAAM,EAAE;;;;;UAF5B,MAAM;iBACC,OAAO;;AA0GzB,wBAMG;AAOH,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,s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AC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as u, computed as l, openBlock as s, createElementBlock as r, createElementVNode as o, unref as t, createVNode as C, createCommentVNode as f } from "vue";
2
2
  import { syntaxHighlight as h, standardLanguages as _ } from "@scalar/code-highlight";
3
- import { prettyPrintJson as a } from "../../helpers/oas-utils.js";
3
+ import { prettyPrintJson as c } from "../../helpers/oas-utils.js";
4
4
  import { useClipboard as b } from "./useClipboard.js";
5
5
  import g from "../ScalarIcon/ScalarIcon.vue.js";
6
6
  const y = { class: "scalar-code-block custom-scroll" }, k = { class: "scalar-code-copy" }, N = /* @__PURE__ */ o("span", { class: "sr-only" }, "Copy content", -1), v = ["innerHTML"], E = /* @__PURE__ */ u({
@@ -11,20 +11,20 @@ const y = { class: "scalar-code-block custom-scroll" }, k = { class: "scalar-cod
11
11
  lineNumbers: { type: Boolean, default: !1 },
12
12
  hideCredentials: {}
13
13
  },
14
- setup(c) {
15
- const e = c, i = l(() => h(a(e.content), {
14
+ setup(a) {
15
+ const e = a, i = l(() => h(c(e.content), {
16
16
  lang: e.lang.trim(),
17
17
  languages: _,
18
18
  lineNumbers: e.lineNumbers,
19
19
  maskCredentials: e.hideCredentials
20
- }).slice(5, -6)), { copyToClipboard: d } = b(), p = l(() => e.content !== null && e.content !== "null");
20
+ }).slice(5, -6)), { copyToClipboard: d } = b(), p = l(() => e.content !== null && e.content !== "null" && e.content !== "404 Not Found");
21
21
  return (m, n) => (s(), r("div", y, [
22
22
  o("div", k, [
23
23
  p.value ? (s(), r("button", {
24
24
  key: 0,
25
25
  class: "copy-button",
26
26
  type: "button",
27
- onClick: n[0] || (n[0] = (x) => t(d)(t(a)(e.content)))
27
+ onClick: n[0] || (n[0] = (x) => t(d)(t(c)(e.content)))
28
28
  }, [
29
29
  N,
30
30
  C(t(g), {
@@ -17,7 +17,10 @@ declare const meta: {
17
17
  type: import("vue").PropType<boolean>;
18
18
  };
19
19
  placement: {
20
- type: import("vue").PropType<import("@floating-ui/utils").Placement>;
20
+ type: import("vue").PropType<import("@floating-ui/vue").Placement>;
21
+ };
22
+ targetRef: {
23
+ type: import("vue").PropType<HTMLElement>;
21
24
  };
22
25
  isOpen: {
23
26
  type: import("vue").PropType<boolean>;
@@ -44,7 +47,10 @@ declare const meta: {
44
47
  type: import("vue").PropType<boolean>;
45
48
  };
46
49
  placement: {
47
- type: import("vue").PropType<import("@floating-ui/utils").Placement>;
50
+ type: import("vue").PropType<import("@floating-ui/vue").Placement>;
51
+ };
52
+ targetRef: {
53
+ type: import("vue").PropType<HTMLElement>;
48
54
  };
49
55
  isOpen: {
50
56
  type: import("vue").PropType<boolean>;
@@ -76,7 +82,10 @@ declare const meta: {
76
82
  type: import("vue").PropType<boolean>;
77
83
  };
78
84
  placement: {
79
- type: import("vue").PropType<import("@floating-ui/utils").Placement>;
85
+ type: import("vue").PropType<import("@floating-ui/vue").Placement>;
86
+ };
87
+ targetRef: {
88
+ type: import("vue").PropType<HTMLElement>;
80
89
  };
81
90
  isOpen: {
82
91
  type: import("vue").PropType<boolean>;
@@ -105,7 +114,10 @@ declare const meta: {
105
114
  type: import("vue").PropType<boolean>;
106
115
  };
107
116
  placement: {
108
- type: import("vue").PropType<import("@floating-ui/utils").Placement>;
117
+ type: import("vue").PropType<import("@floating-ui/vue").Placement>;
118
+ };
119
+ targetRef: {
120
+ type: import("vue").PropType<HTMLElement>;
109
121
  };
110
122
  isOpen: {
111
123
  type: import("vue").PropType<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCombobox.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarCombobox.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,Q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AAM,iBAAiB,EAAE,KA0B/B,CAAA"}
@@ -9,12 +9,13 @@ const B = /* @__PURE__ */ a({
9
9
  placeholder: {},
10
10
  placement: {},
11
11
  resize: { type: Boolean },
12
+ targetRef: {},
12
13
  isOpen: { type: Boolean },
13
14
  teleport: { type: [Boolean, String] }
14
15
  },
15
16
  emits: ["update:modelValue"],
16
17
  setup(u) {
17
- return (e, c) => (r(), n(i, {
18
+ return (e, f) => (r(), n(i, {
18
19
  isOpen: e.isOpen,
19
20
  placement: e.placement ?? "bottom-start",
20
21
  resize: e.resize,
@@ -2,11 +2,13 @@ import type { FloatingOptions } from '../ScalarFloating';
2
2
  import type { Option, OptionGroup } from './types.js';
3
3
  declare function __VLS_template(): {
4
4
  default?(_: {}): any;
5
+ actions?(_: {}): any;
5
6
  };
6
7
  declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
7
8
  options: Option[] | OptionGroup[];
8
9
  modelValue?: Option[];
9
10
  placeholder?: string;
11
+ isDeletable?: boolean;
10
12
  } & Omit<FloatingOptions, "middleware">>, {
11
13
  comboboxPopoverRef: import("vue").Ref<({
12
14
  new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
@@ -14,7 +16,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
14
16
  type: import("vue").PropType<boolean>;
15
17
  };
16
18
  placement: {
17
- type: import("vue").PropType<import("@floating-ui/utils").Placement>;
19
+ type: import("vue").PropType<import("@floating-ui/vue").Placement>;
20
+ };
21
+ targetRef: {
22
+ type: import("vue").PropType<HTMLElement>;
18
23
  };
19
24
  isOpen: {
20
25
  type: import("vue").PropType<boolean>;
@@ -61,7 +66,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
61
66
  type: import("vue").PropType<boolean>;
62
67
  };
63
68
  placement: {
64
- type: import("vue").PropType<import("@floating-ui/utils").Placement>;
69
+ type: import("vue").PropType<import("@floating-ui/vue").Placement>;
70
+ };
71
+ targetRef: {
72
+ type: import("vue").PropType<HTMLElement>;
65
73
  };
66
74
  isOpen: {
67
75
  type: import("vue").PropType<boolean>;
@@ -81,7 +89,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
81
89
  type: import("vue").PropType<boolean>;
82
90
  };
83
91
  placement: {
84
- type: import("vue").PropType<import("@floating-ui/utils").Placement>;
92
+ type: import("vue").PropType<import("@floating-ui/vue").Placement>;
93
+ };
94
+ targetRef: {
95
+ type: import("vue").PropType<HTMLElement>;
85
96
  };
86
97
  isOpen: {
87
98
  type: import("vue").PropType<boolean>;
@@ -132,7 +143,10 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
132
143
  type: import("vue").PropType<boolean>;
133
144
  };
134
145
  placement: {
135
- type: import("vue").PropType<import("@floating-ui/utils").Placement>;
146
+ type: import("vue").PropType<import("@floating-ui/vue").Placement>;
147
+ };
148
+ targetRef: {
149
+ type: import("vue").PropType<HTMLElement>;
136
150
  };
137
151
  isOpen: {
138
152
  type: import("vue").PropType<boolean>;
@@ -185,11 +199,14 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
185
199
  })) | null>;
186
200
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
187
201
  "update:modelValue": (v: Option[]) => void;
202
+ delete: (option: Option) => void;
188
203
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
189
204
  options: Option[] | OptionGroup[];
190
205
  modelValue?: Option[];
191
206
  placeholder?: string;
207
+ isDeletable?: boolean;
192
208
  } & Omit<FloatingOptions, "middleware">>>> & {
209
+ onDelete?: ((option: Option) => any) | undefined;
193
210
  "onUpdate:modelValue"?: ((v: Option[]) => any) | undefined;
194
211
  }, {}, {}>;
195
212
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -1 +1 @@
1
- {"version":3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V,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,45 +1,58 @@
1
- import { defineComponent as n, ref as m, openBlock as s, createBlock as i, withCtx as t, createVNode as d, renderSlot as u } from "vue";
2
- import f from "./ScalarComboboxOptions.vue.js";
3
- import c from "./ScalarComboboxPopover.vue.js";
4
- const y = /* @__PURE__ */ n({
1
+ import { defineComponent as d, ref as u, openBlock as t, createBlock as p, withCtx as n, createElementVNode as f, createCommentVNode as a, createElementBlock as b, renderSlot as r } from "vue";
2
+ import c from "./ScalarComboboxOptions.vue.js";
3
+ import V from "./ScalarComboboxPopover.vue.js";
4
+ const y = { class: "divide-1 divide-y" }, v = {
5
+ key: 1,
6
+ class: "p-0.75"
7
+ }, D = /* @__PURE__ */ d({
5
8
  __name: "ScalarComboboxMultiselect",
6
9
  props: {
7
10
  options: {},
8
11
  modelValue: {},
9
12
  placeholder: {},
13
+ isDeletable: { type: Boolean },
10
14
  placement: {},
11
15
  resize: { type: Boolean },
16
+ targetRef: {},
12
17
  isOpen: { type: Boolean },
13
18
  teleport: { type: [Boolean, String] }
14
19
  },
15
- emits: ["update:modelValue"],
16
- setup(V, { expose: p }) {
17
- const o = m(null);
18
- return p({ comboboxPopoverRef: o }), (e, l) => (s(), i(c, {
20
+ emits: ["update:modelValue", "delete"],
21
+ setup(B, { expose: i }) {
22
+ const s = u(null);
23
+ return i({ comboboxPopoverRef: s }), (e, o) => (t(), p(V, {
19
24
  ref_key: "comboboxPopoverRef",
20
- ref: o,
25
+ ref: s,
21
26
  isOpen: e.isOpen,
22
27
  placement: e.placement ?? "bottom-start",
23
28
  resize: e.resize,
24
29
  teleport: e.teleport
25
30
  }, {
26
- popover: t(({ open: r }) => [
27
- d(f, {
28
- modelValue: e.modelValue,
29
- multiselect: "",
30
- open: r,
31
- options: e.options,
32
- placeholder: e.placeholder,
33
- "onUpdate:modelValue": l[0] || (l[0] = (a) => e.$emit("update:modelValue", a))
34
- }, null, 8, ["modelValue", "open", "options", "placeholder"])
31
+ popover: n(({ open: m }) => [
32
+ f("div", y, [
33
+ e.options && e.options.length ? (t(), p(c, {
34
+ key: 0,
35
+ isDeletable: e.isDeletable,
36
+ modelValue: e.modelValue,
37
+ multiselect: "",
38
+ open: m,
39
+ options: e.options,
40
+ placeholder: e.placeholder,
41
+ onDelete: o[0] || (o[0] = (l) => e.$emit("delete", l)),
42
+ "onUpdate:modelValue": o[1] || (o[1] = (l) => e.$emit("update:modelValue", l))
43
+ }, null, 8, ["isDeletable", "modelValue", "open", "options", "placeholder"])) : a("", !0),
44
+ e.$slots.actions ? (t(), b("div", v, [
45
+ r(e.$slots, "actions")
46
+ ])) : a("", !0)
47
+ ])
35
48
  ]),
36
- default: t(() => [
37
- u(e.$slots, "default")
49
+ default: n(() => [
50
+ r(e.$slots, "default")
38
51
  ]),
39
52
  _: 3
40
53
  }, 8, ["isOpen", "placement", "resize", "teleport"]));
41
54
  }
42
55
  });
43
56
  export {
44
- y as default
57
+ D as default
45
58
  };
@@ -5,10 +5,12 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOp
5
5
  active?: boolean;
6
6
  selected?: boolean;
7
7
  style?: "radio" | "checkbox";
8
+ isDeletable?: boolean;
8
9
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
9
10
  active?: boolean;
10
11
  selected?: boolean;
11
12
  style?: "radio" | "checkbox";
13
+ isDeletable?: boolean;
12
14
  }>>>, {}, {}>;
13
15
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
14
16
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarComboboxOption.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxOption.vue"],"names":[],"mappings":"AA8EA,iBAAS,cAAc;qBAuDM,GAAG;EAiB/B;AACD,QAAA,MAAM,eAAe;aApGV,OAAO;eACL,OAAO;YACV,OAAO,GAAG,UAAU;;aAFnB,OAAO;eACL,OAAO;YACV,OAAO,GAAG,UAAU;aAwG5B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"ScalarComboboxOption.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxOption.vue"],"names":[],"mappings":"AAuFA,iBAAS,cAAc;qBA2FM,GAAG;EAiB/B;AACD,QAAA,MAAM,eAAe;aAzIV,OAAO;eACL,OAAO;YACV,OAAO,GAAG,UAAU;kBACd,OAAO;;aAHZ,OAAO;eACL,OAAO;YACV,OAAO,GAAG,UAAU;kBACd,OAAO;aA4IrB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,15 +1,16 @@
1
- import { defineComponent as a, openBlock as n, createElementBlock as c, normalizeClass as r, unref as t, createElementVNode as o, createVNode as l, renderSlot as i } from "vue";
2
- import { cva as p, cx as d } from "../../cva.js";
3
- import u from "../ScalarIcon/ScalarIcon.vue.js";
4
- const m = { class: "inline-block min-w-0 flex-1 truncate text-c-1" }, g = /* @__PURE__ */ a({
1
+ import { defineComponent as c, openBlock as r, createElementBlock as i, normalizeClass as s, unref as t, createElementVNode as a, createVNode as p, renderSlot as d, createBlock as m, withModifiers as u, createCommentVNode as b } from "vue";
2
+ import { cva as f, cx as v } from "../../cva.js";
3
+ import n from "../ScalarIcon/ScalarIcon.vue.js";
4
+ const k = { class: "inline-block min-w-0 flex-1 truncate text-c-1" }, C = /* @__PURE__ */ c({
5
5
  __name: "ScalarComboboxOption",
6
6
  props: {
7
7
  active: { type: Boolean },
8
8
  selected: { type: Boolean },
9
- style: {}
9
+ style: {},
10
+ isDeletable: { type: Boolean }
10
11
  },
11
- setup(b) {
12
- const s = p({
12
+ setup(x) {
13
+ const l = f({
13
14
  base: [
14
15
  // Layout
15
16
  "group",
@@ -24,27 +25,35 @@ const m = { class: "inline-block min-w-0 flex-1 truncate text-c-1" }, g = /* @__
24
25
  active: { true: "bg-b-2" }
25
26
  }
26
27
  });
27
- return (e, f) => (n(), c("li", {
28
- class: r(t(d)(t(s)({ active: e.active, selected: e.selected })))
28
+ return (e, o) => (r(), i("li", {
29
+ class: s(t(v)(t(l)({ active: e.active, selected: e.selected }), "group"))
29
30
  }, [
30
- o("div", {
31
- class: r(["flex size-4 items-center justify-center p-0.75 group-hover:shadow-border", [
31
+ a("div", {
32
+ class: s(["flex size-4 items-center justify-center p-0.75 group-hover:shadow-border", [
32
33
  e.selected ? "bg-blue text-b-1" : "text-transparent",
33
34
  e.style === "checkbox" ? "rounded" : "rounded-full"
34
35
  ]])
35
36
  }, [
36
- l(t(u), {
37
+ p(t(n), {
37
38
  class: "relative top-[0.5px] size-2.5",
38
39
  icon: "Checkmark",
39
40
  thickness: "2.5"
40
41
  })
41
42
  ], 2),
42
- o("span", m, [
43
- i(e.$slots, "default")
44
- ])
43
+ a("span", k, [
44
+ d(e.$slots, "default")
45
+ ]),
46
+ e.isDeletable ? (r(), m(t(n), {
47
+ key: 0,
48
+ class: "text-c-2 opacity-0 group-hover:opacity-100",
49
+ icon: "Delete",
50
+ size: "md",
51
+ thickness: "1.5",
52
+ onClick: o[0] || (o[0] = u((y) => e.$emit("delete"), ["stop"]))
53
+ })) : b("", !0)
45
54
  ], 2));
46
55
  }
47
56
  });
48
57
  export {
49
- g as default
58
+ C as default
50
59
  };
@@ -5,15 +5,19 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
5
5
  placeholder?: string;
6
6
  open?: boolean;
7
7
  multiselect?: boolean;
8
+ isDeletable?: boolean;
8
9
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
10
  "update:modelValue": (v: Option[]) => void;
11
+ delete: (option: Option) => void;
10
12
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
11
13
  options: Option[] | OptionGroup[];
12
14
  modelValue?: Option[];
13
15
  placeholder?: string;
14
16
  open?: boolean;
15
17
  multiselect?: boolean;
18
+ isDeletable?: boolean;
16
19
  }>>> & {
20
+ onDelete?: ((option: Option) => any) | undefined;
17
21
  "onUpdate:modelValue"?: ((v: Option[]) => any) | undefined;
18
22
  }, {}, {}>;
19
23
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarComboboxOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCombobox/ScalarComboboxOptions.vue"],"names":[],"mappings":"AAwJA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAY,MAAM,SAAS,CAAA;;aAKtD,MAAM,EAAE,GAAG,WAAW,EAAE;iBACpB,MAAM,EAAE;kBACP,MAAM;WACb,OAAO;kBACA,OAAO;;;;aAJZ,MAAM,EAAE,GAAG,WAAW,EAAE;iBACpB,MAAM,EAAE;kBACP,MAAM;WACb,OAAO;kBACA,OAAO;;;;AA8PvB,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SA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AQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as E, computed as f, ref as S, watch as M, openBlock as i, createElementBlock as u, Fragment as p, createElementVNode as b, createVNode as K, unref as w, withDirectives as $, withKeys as h, withModifiers as x, vModelText as T, renderList as B, toDisplayString as I, createCommentVNode as _, createBlock as q, normalizeStyle as F, withCtx as G, createTextVNode as O, vShow as U } from "vue";
1
+ import { defineComponent as E, computed as f, ref as $, watch as g, openBlock as i, createElementBlock as u, Fragment as m, createElementVNode as y, createVNode as K, unref as w, withDirectives as S, withKeys as h, withModifiers as b, vModelText as T, renderList as B, toDisplayString as M, createCommentVNode as I, createBlock as q, normalizeStyle as F, withCtx as G, createTextVNode as O, vShow as U } from "vue";
2
2
  import { nanoid as j } from "nanoid";
3
3
  import H from "./ScalarComboboxOption.vue.js";
4
4
  import { isGroups as N } from "./types.js";
@@ -14,94 +14,97 @@ const P = { class: "relative flex" }, Q = ["aria-controls", "placeholder"], R =
14
14
  modelValue: {},
15
15
  placeholder: {},
16
16
  open: { type: Boolean },
17
- multiselect: { type: Boolean }
17
+ multiselect: { type: Boolean },
18
+ isDeletable: { type: Boolean }
18
19
  },
19
- emits: ["update:modelValue"],
20
- setup(L, { emit: z }) {
21
- var g;
22
- const o = L, A = z, k = j(), y = f(
23
- () => N(o.options) ? o.options.flatMap((t) => t.options) : o.options
24
- ), D = f(
20
+ emits: ["update:modelValue", "delete"],
21
+ setup(L, { emit: _ }) {
22
+ var C;
23
+ const o = L, z = _, k = j(), x = f(
24
+ () => N(o.options) ? o.options.flatMap((e) => e.options) : o.options
25
+ ), A = f(
25
26
  () => N(o.options) ? o.options : [{ label: "", options: o.options }]
26
- ), s = S(""), r = S(((g = o.modelValue) == null ? void 0 : g[0]) ?? y.value[0]);
27
- M(
27
+ ), s = $(""), r = $(((C = o.modelValue) == null ? void 0 : C[0]) ?? x.value[0]);
28
+ g(
28
29
  () => o.open,
29
30
  () => s.value = ""
30
- ), M(
31
+ ), g(
31
32
  () => s.value,
32
- () => r.value = d.value[0]
33
+ () => r.value = c.value[0]
33
34
  );
34
- const d = f(
35
- () => s.value === "" ? y.value : y.value.filter((t) => t.label.toLowerCase().includes(s.value.toLowerCase()))
35
+ const c = f(
36
+ () => s.value === "" ? x.value : x.value.filter((e) => e.label.toLowerCase().includes(s.value.toLowerCase()))
36
37
  ), a = f({
37
38
  get: () => o.modelValue ?? [],
38
- set: (t) => t && A("update:modelValue", t)
39
+ set: (e) => e && z("update:modelValue", e)
39
40
  });
40
- function V(t) {
41
- o.multiselect ? a.value.some((e) => e.id === t.id) ? a.value = a.value.filter((e) => e.id !== t.id) : a.value = [...a.value, t] : a.value = [t];
41
+ function V(e) {
42
+ o.multiselect ? a.value.some((t) => t.id === e.id) ? a.value = a.value.filter((t) => t.id !== e.id) : a.value = [...a.value, e] : a.value = [e];
42
43
  }
43
- function C(t) {
44
- const e = d.value, c = e.findIndex((l) => l.id === r.value.id) + t;
45
- c < 0 || c > e.length - 1 || (r.value = e[c]);
44
+ function D(e) {
45
+ const t = c.value, v = t.findIndex((l) => l.id === r.value.id) + e;
46
+ v < 0 || v > t.length - 1 || (r.value = t[v]);
46
47
  }
47
- return (t, e) => (i(), u(p, null, [
48
- b("div", P, [
48
+ return (e, t) => (i(), u(m, null, [
49
+ y("div", P, [
49
50
  K(w(J), {
50
51
  class: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-c-3",
51
52
  icon: "Search",
52
53
  size: "sm"
53
54
  }),
54
- $(b("input", {
55
- "onUpdate:modelValue": e[0] || (e[0] = (n) => s.value = n),
55
+ S(y("input", {
56
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => s.value = n),
56
57
  "aria-autocomplete": "list",
57
58
  "aria-controls": w(k),
58
59
  class: "min-w-0 flex-1 rounded-none border-0 py-2.5 pl-8 pr-3 leading-none text-c-1 outline-none",
59
60
  "data-1p-ignore": "",
60
- placeholder: t.placeholder,
61
+ placeholder: e.placeholder,
61
62
  role: "combobox",
62
63
  tabindex: "0",
63
64
  type: "text",
64
65
  onKeydown: [
65
- e[1] || (e[1] = h(x((n) => C(1), ["prevent"]), ["down"])),
66
- e[2] || (e[2] = h(x((n) => V(r.value), ["prevent"]), ["enter"])),
67
- e[3] || (e[3] = h(x((n) => C(-1), ["prevent"]), ["up"]))
66
+ t[1] || (t[1] = h(b((n) => D(1), ["prevent"]), ["down"])),
67
+ t[2] || (t[2] = h(b((n) => V(r.value), ["prevent"]), ["enter"])),
68
+ t[3] || (t[3] = h(b((n) => D(-1), ["prevent"]), ["up"]))
68
69
  ]
69
70
  }, null, 40, Q), [
70
71
  [T, s.value]
71
72
  ])
72
73
  ]),
73
- $(b("ul", {
74
+ S(y("ul", {
74
75
  id: w(k),
75
76
  class: "border-t p-0.75"
76
77
  }, [
77
- (i(!0), u(p, null, B(D.value, (n, c) => (i(), u(p, { key: c }, [
78
+ (i(!0), u(m, null, B(A.value, (n, v) => (i(), u(m, { key: v }, [
78
79
  n.label && // Only show the group label if there are some results
79
- n.options.some((l) => d.value.some((m) => m.id === l.id)) ? (i(), u("div", W, I(n.label), 1)) : _("", !0),
80
- (i(!0), u(p, null, B(d.value, (l) => {
81
- var m;
82
- return i(), u(p, {
80
+ n.options.some((l) => c.value.some((p) => p.id === l.id)) ? (i(), u("div", W, M(n.label), 1)) : I("", !0),
81
+ (i(!0), u(m, null, B(c.value, (l) => {
82
+ var p;
83
+ return i(), u(m, {
83
84
  key: l.id
84
85
  }, [
85
- n.options.some((v) => v.id === l.id) ? (i(), q(H, {
86
+ n.options.some((d) => d.id === l.id) ? (i(), q(H, {
86
87
  key: 0,
87
- active: ((m = r.value) == null ? void 0 : m.id) === l.id,
88
- selected: a.value.some((v) => v.id === l.id),
89
- style: F(t.multiselect ? "checkbox" : "radio"),
90
- onClick: (v) => V(l),
91
- onMousedown: e[4] || (e[4] = x(() => {
88
+ active: ((p = r.value) == null ? void 0 : p.id) === l.id,
89
+ isDeletable: l.isDeletable ?? e.isDeletable,
90
+ selected: a.value.some((d) => d.id === l.id),
91
+ style: F(e.multiselect ? "checkbox" : "radio"),
92
+ onClick: (d) => V(l),
93
+ onDelete: (d) => e.$emit("delete", l),
94
+ onMousedown: t[4] || (t[4] = b(() => {
92
95
  }, ["prevent"])),
93
- onMouseenter: (v) => r.value = l
96
+ onMouseenter: (d) => r.value = l
94
97
  }, {
95
98
  default: G(() => [
96
- O(I(l.label), 1)
99
+ O(M(l.label), 1)
97
100
  ]),
98
101
  _: 2
99
- }, 1032, ["active", "selected", "style", "onClick", "onMouseenter"])) : _("", !0)
102
+ }, 1032, ["active", "isDeletable", "selected", "style", "onClick", "onDelete", "onMouseenter"])) : I("", !0)
100
103
  ], 64);
101
104
  }), 128))
102
105
  ], 64))), 128))
103
106
  ], 8, R), [
104
- [U, d.value.length]
107
+ [U, c.value.length]
105
108
  ])
106
109
  ], 64));
107
110
  }
@@ -7,6 +7,7 @@ const g = /* @__PURE__ */ w("div", { class: "absolute inset-0 -z-1 rounded bg-b-
7
7
  props: {
8
8
  placement: {},
9
9
  resize: { type: Boolean },
10
+ targetRef: {},
10
11
  isOpen: { type: Boolean },
11
12
  teleport: { type: [Boolean, String] }
12
13
  },
@@ -1,6 +1,7 @@
1
1
  export type Option = {
2
2
  id: string;
3
3
  label: string;
4
+ isDeletable?: boolean;
4
5
  [x: string]: any;
5
6
  };
6
7
  export type OptionGroup = {
@@ -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;IACb,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,OAAO,WACV,MAAM,GAAG,WAAW,KAC3B,MAAM,IAAI,WAEZ,CAAA;AAED,eAAO,MAAM,QAAQ,YACV,MAAM,EAAE,GAAG,WAAW,EAAE,KAChC,OAAO,IAAI,WAAW,EAExB,CAAA"}
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;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,OAAO,WACV,MAAM,GAAG,WAAW,KAC3B,MAAM,IAAI,WAEZ,CAAA;AAED,eAAO,MAAM,QAAQ,YACV,MAAM,EAAE,GAAG,WAAW,EAAE,KAChC,OAAO,IAAI,WAAW,EAExB,CAAA"}