@scalar/components 0.13.24 → 0.13.26

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 (55) hide show
  1. package/dist/components/ScalarButton/variants.d.ts.map +1 -1
  2. package/dist/components/ScalarButton/variants.js +2 -8
  3. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.d.ts +1 -1
  4. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.d.ts.map +1 -1
  5. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.js +2 -2
  6. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +14 -11
  7. package/dist/components/ScalarCombobox/types.d.ts.map +1 -1
  8. package/dist/components/ScalarFileUpload/ScalarFileUpload.stories.d.ts.map +1 -1
  9. package/dist/components/ScalarFileUpload/types.d.ts.map +1 -1
  10. package/dist/components/ScalarFloating/useResizeWithTarget.d.ts.map +1 -1
  11. package/dist/components/ScalarFloating/useResizeWithTarget.js +2 -6
  12. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +1 -1
  13. package/dist/components/ScalarIcon/icons/Alert.svg.js +21 -0
  14. package/dist/components/ScalarIcon/icons/Markdown.svg.js +19 -0
  15. package/dist/components/ScalarIcon/icons/NotAllowed.svg.js +21 -0
  16. package/dist/components/ScalarIcon/icons/index.d.ts +1 -1
  17. package/dist/components/ScalarIcon/icons/index.d.ts.map +1 -1
  18. package/dist/components/ScalarIcon/utils/index.js +272 -266
  19. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +1 -1
  20. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.d.ts.map +1 -1
  21. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +6 -6
  22. package/dist/components/ScalarModal/ScalarModal.stories.d.ts +10 -12
  23. package/dist/components/ScalarModal/ScalarModal.stories.d.ts.map +1 -1
  24. package/dist/components/ScalarModal/ScalarModal.vue.d.ts +3 -5
  25. package/dist/components/ScalarModal/ScalarModal.vue.d.ts.map +1 -1
  26. package/dist/components/ScalarModal/ScalarModal.vue.js +4 -4
  27. package/dist/components/ScalarModal/ScalarModal.vue2.js +42 -47
  28. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts.map +1 -1
  29. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +2 -2
  30. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue2.js +34 -31
  31. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.d.ts.map +1 -1
  32. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +5 -8
  33. package/dist/components/ScalarSidebar/ScalarSidebar.stories.d.ts.map +1 -1
  34. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -1
  35. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +29 -30
  36. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts +23 -6
  37. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
  38. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +37 -19
  39. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.d.ts +20 -0
  40. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.d.ts.map +1 -0
  41. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.js +7 -0
  42. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue2.js +37 -0
  43. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.d.ts.map +1 -1
  44. package/dist/components/ScalarSidebar/ScalarSidebarItem.vue.js +8 -8
  45. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.js +3 -3
  46. package/dist/components/ScalarSidebar/types.d.ts +2 -0
  47. package/dist/components/ScalarSidebar/types.d.ts.map +1 -1
  48. package/dist/components/ScalarSidebar/useSidebarGroups.d.ts.map +1 -1
  49. package/dist/components/ScalarVirtualText/ScalarVirtualText.stories.d.ts.map +1 -1
  50. package/dist/helpers/add-scalar-classes.d.ts.map +1 -1
  51. package/dist/helpers/add-scalar-classes.js +1 -3
  52. package/dist/helpers/oas-utils.d.ts.map +1 -1
  53. package/dist/hooks/useBindCx.stories.d.ts.map +1 -1
  54. package/dist/style.css +1 -1
  55. package/package.json +6 -6
@@ -1,10 +1,10 @@
1
- import { defineComponent as g, computed as b, openBlock as n, createBlock as u, unref as e, withCtx as r, createVNode as a, mergeProps as v, createElementVNode as k, createElementBlock as x, Fragment as C, renderList as S, createTextVNode as w } from "vue";
1
+ import { defineComponent as g, computed as b, openBlock as n, createBlock as u, unref as e, withCtx as r, createVNode as a, mergeProps as v, createElementVNode as x, createElementBlock as k, Fragment as C, renderList as S, createTextVNode as w } from "vue";
2
2
  import { DropdownMenu as s } from "radix-vue/namespaced";
3
3
  import V from "./ScalarMenuTeamProfile.vue.js";
4
4
  import $ from "./ScalarMenuLink.vue.js";
5
5
  import B from "../ScalarDropdown/ScalarDropdownMenu.vue.js";
6
6
  import c from "../ScalarDropdown/ScalarDropdownButton.vue.js";
7
- import I from "../ScalarListbox/ScalarListboxCheckbox.vue.js";
7
+ import z from "../ScalarListbox/ScalarListboxCheckbox.vue.js";
8
8
  import p from "../ScalarIcon/ScalarIcon.vue.js";
9
9
  const M = /* @__PURE__ */ g({
10
10
  inheritAttrs: !1,
@@ -32,7 +32,7 @@ const M = /* @__PURE__ */ g({
32
32
  icon: "UserSwitch"
33
33
  }, o.$attrs), {
34
34
  default: r(() => [
35
- t[2] || (t[2] = k("div", null, "Change team", -1)),
35
+ t[2] || (t[2] = x("div", null, "Change team", -1)),
36
36
  a(e(p), {
37
37
  class: "ml-auto text-c-2 -mr-0.25",
38
38
  icon: "ChevronRight",
@@ -45,7 +45,7 @@ const M = /* @__PURE__ */ g({
45
45
  default: r(() => [
46
46
  a(e(s).SubContent, {
47
47
  as: e(B),
48
- class: "max-h-radix-popper",
48
+ class: "max-h-radix-popper z-context-plus",
49
49
  sideOffset: 3
50
50
  }, {
51
51
  default: r(() => [
@@ -55,7 +55,7 @@ const M = /* @__PURE__ */ g({
55
55
  class: "contents"
56
56
  }, {
57
57
  default: r(() => [
58
- (n(!0), x(C, null, S(o.teams, (l) => (n(), u(e(s).RadioItem, {
58
+ (n(!0), k(C, null, S(o.teams, (l) => (n(), u(e(s).RadioItem, {
59
59
  key: l.id,
60
60
  as: e(c),
61
61
  class: "group/item",
@@ -67,7 +67,7 @@ const M = /* @__PURE__ */ g({
67
67
  label: l.label,
68
68
  src: l.src
69
69
  }, null, 8, ["label", "src"]),
70
- a(e(I), {
70
+ a(e(z), {
71
71
  class: "ml-auto",
72
72
  selected: l.id === m.value
73
73
  }, null, 8, ["selected"])
@@ -11,10 +11,8 @@ declare const meta: {
11
11
  bodyClass?: string;
12
12
  maxWidth?: string;
13
13
  size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
14
- variant?: "form" | "search" | "error" | "history" | undefined;
15
- }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
16
- size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
17
- }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
14
+ variant?: "form" | "search" | "error" | undefined;
15
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
18
16
  P: {};
19
17
  B: {};
20
18
  D: {};
@@ -27,10 +25,8 @@ declare const meta: {
27
25
  bodyClass?: string;
28
26
  maxWidth?: string;
29
27
  size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
30
- variant?: "form" | "search" | "error" | "history" | undefined;
31
- }> & Readonly<{}>, {}, {}, {}, {}, {
32
- size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
33
- }>;
28
+ variant?: "form" | "search" | "error" | undefined;
29
+ }> & Readonly<{}>, {}, {}, {}, {}, {}>;
34
30
  __isFragment?: never;
35
31
  __isTeleport?: never;
36
32
  __isSuspense?: never;
@@ -40,16 +36,17 @@ declare const meta: {
40
36
  bodyClass?: string;
41
37
  maxWidth?: string;
42
38
  size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
43
- variant?: "form" | "search" | "error" | "history" | undefined;
44
- }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
45
- size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
46
- }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
39
+ variant?: "form" | "search" | "error" | undefined;
40
+ }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
47
41
  $slots: {
48
42
  default?(_: {}): any;
49
43
  default?(_: {}): any;
50
44
  };
51
45
  });
52
46
  tags: string[];
47
+ parameters: {
48
+ layout: string;
49
+ };
53
50
  argTypes: {
54
51
  size: {
55
52
  control: "select";
@@ -64,5 +61,6 @@ declare const meta: {
64
61
  export default meta;
65
62
  type Story = StoryObj<typeof meta>;
66
63
  export declare const Base: Story;
64
+ export declare const Search: Story;
67
65
  export declare const Scrolling: Story;
68
66
  //# sourceMappingURL=ScalarModal.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarModal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAGrD,OAAoB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAEzD;;GAEG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU0B,CAAA;AAEpC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAwBlB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KA4CvB,CAAA"}
1
+ {"version":3,"file":"ScalarModal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAGrD,OAAoB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAIzD;;GAEG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW0B,CAAA;AAEpC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KA8BlB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KA6CpB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAoDvB,CAAA"}
@@ -10,17 +10,15 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
10
10
  bodyClass?: string;
11
11
  maxWidth?: string;
12
12
  size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
13
- variant?: "form" | "search" | "error" | "history" | undefined;
13
+ variant?: "form" | "search" | "error" | undefined;
14
14
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
15
15
  state: ReturnType<typeof useModal>;
16
16
  title?: string;
17
17
  bodyClass?: string;
18
18
  maxWidth?: string;
19
19
  size?: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs" | undefined;
20
- variant?: "form" | "search" | "error" | "history" | undefined;
21
- }> & Readonly<{}>, {
22
- size: "sm" | "lg" | "xs" | "md" | "xl" | "full" | "xxs";
23
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
20
+ variant?: "form" | "search" | "error" | undefined;
21
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
24
22
  default?(_: {}): any;
25
23
  default?(_: {}): any;
26
24
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.vue"],"names":[],"mappings":"AA6OA,+CAA+C;AAC/C,wBAAgB,QAAQ;;;;EAUvB;;WAOU,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;WAHV,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;;;qBA6NS,GAAG;qBACH,GAAG;;AAtOjC,wBA+QK;AAgBL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.vue"],"names":[],"mappings":"AA6NA,+CAA+C;AAC/C,wBAAgB,QAAQ;;;;EAUvB;;WAOQ,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;WAHV,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;qBA2MW,GAAG;qBACH,GAAG;;AApNjC,wBA2PK;AAWL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import o from "./ScalarModal.vue2.js";
2
- import { useModal as s } from "./ScalarModal.vue2.js";
2
+ import { useModal as e } from "./ScalarModal.vue2.js";
3
3
  /* empty css */
4
4
  import r from "../../_virtual/_plugin-vue_export-helper.js";
5
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0f8e0211"]]);
5
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-12dc7570"]]);
6
6
  export {
7
- f as default,
8
- s as useModal
7
+ p as default,
8
+ e as useModal
9
9
  };
@@ -1,13 +1,13 @@
1
- import { defineComponent as v, openBlock as l, createBlock as r, unref as a, withCtx as t, createElementVNode as x, normalizeClass as o, createVNode as i, normalizeStyle as b, createTextVNode as y, toDisplayString as g, createCommentVNode as d, createElementBlock as m, renderSlot as n, reactive as w } from "vue";
1
+ import { defineComponent as p, openBlock as l, createBlock as r, unref as a, withCtx as o, createElementVNode as x, normalizeClass as t, createVNode as i, normalizeStyle as w, createTextVNode as b, toDisplayString as y, createCommentVNode as m, createElementBlock as n, renderSlot as d, reactive as g } from "vue";
2
2
  import { Dialog as z, DialogPanel as k, DialogTitle as C, DialogDescription as D } from "@headlessui/vue";
3
- import { cva as c, cx as u } from "../../cva.js";
3
+ import { cva as f, cx as c } from "../../cva.js";
4
4
  import S from "../ScalarIconButton/ScalarIconButton.vue.js";
5
5
  const $ = {
6
6
  key: 0,
7
7
  class: "close-button z-10 fixed right-2 top-2"
8
8
  };
9
9
  function E() {
10
- return w({
10
+ return g({
11
11
  open: !1,
12
12
  show() {
13
13
  this.open = !0;
@@ -17,7 +17,7 @@ function E() {
17
17
  }
18
18
  });
19
19
  }
20
- const M = /* @__PURE__ */ v({
20
+ const M = /* @__PURE__ */ p({
21
21
  __name: "ScalarModal",
22
22
  props: {
23
23
  state: {},
@@ -28,48 +28,43 @@ const M = /* @__PURE__ */ v({
28
28
  variant: {}
29
29
  },
30
30
  setup(N) {
31
- const f = c({
31
+ const u = f({
32
32
  base: [
33
33
  "scalar-modal",
34
- "col relative mx-auto mb-0 rounded-lg bg-b-1 p-0 text-left leading-snug text-c-1 opacity-0 md:w-[calc(100vw-16px)] lg:w-[calc(100vw-32px)]"
34
+ "flex flex-col relative mx-auto mb-0 rounded-lg bg-b-1 p-0 text-left leading-snug text-c-1 opacity-0 w-[calc(100vw-12px)] md:w-[calc(100vw-16px)] lg:w-[calc(100vw-32px)]"
35
35
  ].join(" "),
36
36
  variants: {
37
37
  size: {
38
- xxs: "mt-20 max-w-screen-xxs",
39
- xs: "mt-20 max-w-screen-xs",
40
- sm: "mt-20 max-w-screen-sm",
41
- md: "mt-20 max-w-screen-md",
42
- lg: "m-auto max-w-screen-lg",
43
- xl: "m-auto max-w-screen-xl",
44
- full: "full-size-styles mt-0 lg:w-full"
38
+ xxs: "mt-[20svh] max-h-[60svh] max-w-screen-xxs",
39
+ xs: "mt-[20svh] max-h-[60svh] max-w-screen-xs",
40
+ sm: "mt-[20svh] max-h-[60svh] max-w-screen-sm",
41
+ md: "mt-[20svh] max-h-[60svh] max-w-screen-md",
42
+ lg: "m-auto max-h-[80svh] max-w-screen-lg",
43
+ xl: "m-auto max-h-[90svh] max-w-screen-xl",
44
+ full: "full-size-styles max-h-dvh mt-0 lg:w-full"
45
45
  },
46
46
  variant: {
47
47
  form: "scalar-modal-form",
48
- history: "scalar-modal-history bg-b-1",
49
- search: "scalar-modal-search",
48
+ search: "scalar-modal-search mt-[15svh] max-h-[60svh] max-w-[540px]",
50
49
  error: "scalar-modal-error"
51
50
  }
52
51
  }
53
- }), p = c({
54
- base: [
55
- "scalar-modal-body",
56
- "relative max-h-[calc(100dvh-240px)] rounded-lg rounded-t-none border-t-1/2 bg-b-1 p-3"
57
- ].join(" "),
52
+ }), v = f({
53
+ base: ["scalar-modal-body", "relative flex-1 min-h-0 p-3"].join(" "),
58
54
  variants: {
59
55
  variant: {
60
56
  form: "overflow-visible",
61
- history: "pt-3",
62
- search: "col !m-0 max-h-[440px] overflow-hidden p-0",
57
+ search: "col !m-0 overflow-hidden p-0",
63
58
  error: "overflow-y-scroll"
64
59
  },
65
60
  size: {
66
- xxs: "max-h-[calc(100dvh-240px)]",
67
- xs: "max-h-[calc(100dvh-240px)]",
68
- sm: "max-h-[calc(100dvh-240px)]",
69
- md: "max-h-[calc(100dvh-240px)]",
70
- lg: "max-h-[calc(100dvh-180px)]",
71
- xl: "m-0 max-h-[calc(100dvh-120px)] p-0",
72
- full: "max-h-dvh rounded-none"
61
+ xxs: "",
62
+ xs: "",
63
+ sm: "",
64
+ md: "",
65
+ lg: "",
66
+ xl: "m-0 p-0",
67
+ full: " rounded-none"
73
68
  }
74
69
  }
75
70
  });
@@ -77,10 +72,10 @@ const M = /* @__PURE__ */ v({
77
72
  open: e.state.open,
78
73
  onClose: s[1] || (s[1] = (h) => e.state.hide())
79
74
  }, {
80
- default: t(() => [
75
+ default: o(() => [
81
76
  x("div", {
82
- class: o(
83
- a(u)(
77
+ class: t(
78
+ a(c)(
84
79
  e.size === "full" ? "scalar-modal-layout-full" : "scalar-modal-layout",
85
80
  "fixed left-0 top-0 flex items-start justify-center",
86
81
  "z-[1001] h-[100dvh] w-[100dvw]",
@@ -90,44 +85,44 @@ const M = /* @__PURE__ */ v({
90
85
  )
91
86
  }, [
92
87
  i(a(k), {
93
- class: o(a(f)({ size: e.size, variant: e.variant })),
94
- style: b({ maxWidth: e.maxWidth })
88
+ class: t(a(u)({ size: e.size, variant: e.variant })),
89
+ style: w({ maxWidth: e.maxWidth })
95
90
  }, {
96
- default: t(() => [
91
+ default: o(() => [
97
92
  e.title ? (l(), r(a(C), {
98
93
  key: 0,
99
- class: o(["scalar-modal-header m-0 -mb-1 rounded-lg p-3 text-left text-sm font-medium text-c-1", { "pb-0 pt-6": e.variant === "history" }])
94
+ class: "scalar-modal-header m-0 -mb-1 rounded-lg pt-3 px-3 text-left text-sm font-medium text-c-1"
100
95
  }, {
101
- default: t(() => [
102
- y(g(e.title), 1)
96
+ default: o(() => [
97
+ b(y(e.title), 1)
103
98
  ]),
104
99
  _: 1
105
- }, 8, ["class"])) : d("", !0),
106
- e.size === "full" ? (l(), m("div", {
100
+ })) : m("", !0),
101
+ e.size === "full" ? (l(), n("div", {
107
102
  key: 1,
108
- class: o(e.bodyClass)
103
+ class: t(e.bodyClass)
109
104
  }, [
110
- n(e.$slots, "default", {}, void 0, !0)
105
+ d(e.$slots, "default", {}, void 0, !0)
111
106
  ], 2)) : (l(), r(a(D), {
112
107
  key: 2,
113
- class: o(a(u)(a(p)({ size: e.size, variant: e.variant }), e.bodyClass))
108
+ class: t(a(c)(a(v)({ size: e.size, variant: e.variant }), e.bodyClass))
114
109
  }, {
115
- default: t(() => [
116
- n(e.$slots, "default", {}, void 0, !0)
110
+ default: o(() => [
111
+ d(e.$slots, "default", {}, void 0, !0)
117
112
  ]),
118
113
  _: 3
119
114
  }, 8, ["class"]))
120
115
  ]),
121
116
  _: 3
122
117
  }, 8, ["class", "style"]),
123
- e.size === "full" ? (l(), m("div", $, [
118
+ e.size === "full" ? (l(), n("div", $, [
124
119
  i(a(S), {
125
120
  class: "hover:bg-b-3 focus:outline-none",
126
121
  icon: "Close",
127
122
  label: "Clear Search",
128
123
  onClose: s[0] || (s[0] = (h) => e.state.hide())
129
124
  })
130
- ])) : d("", !0)
125
+ ])) : m("", !0)
131
126
  ], 2)
132
127
  ]),
133
128
  _: 3
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AA0GA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;AAInE,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;;;;AA0KF,wBAQG"}
1
+ {"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AAgHA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;AAInE,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;;;;;;;;;AA4KF,wBAQG"}
@@ -1,7 +1,7 @@
1
1
  import o from "./ScalarSearchInput.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2f2316c6"]]);
4
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-080483f0"]]);
5
5
  export {
6
- p as default
6
+ c as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as b, ref as h, computed as g, useAttrs as k, openBlock as s, createElementBlock as v, normalizeClass as i, unref as a, createBlock as o, createCommentVNode as u, createElementVNode as S, mergeProps as V } from "vue";
2
- import { cva as y, cx as c } from "../../cva.js";
3
- import C from "../ScalarIcon/ScalarIcon.vue.js";
4
- import z from "../ScalarLoading/ScalarLoading.vue.js";
5
- import B from "../ScalarIconButton/ScalarIconButton.vue.js";
6
- const I = ["aria-label", "value"], q = /* @__PURE__ */ b({
1
+ import { defineComponent as h, ref as v, computed as g, useAttrs as k, openBlock as s, createElementBlock as S, normalizeClass as i, unref as a, createBlock as o, createCommentVNode as c, createElementVNode as V, mergeProps as y, withModifiers as C } from "vue";
2
+ import { cva as z, cx as u } from "../../cva.js";
3
+ import B from "../ScalarIcon/ScalarIcon.vue.js";
4
+ import I from "../ScalarLoading/ScalarLoading.vue.js";
5
+ import w from "../ScalarIconButton/ScalarIconButton.vue.js";
6
+ const E = ["aria-label", "value"], M = /* @__PURE__ */ h({
7
7
  inheritAttrs: !1,
8
8
  __name: "ScalarSearchInput",
9
9
  props: {
@@ -13,15 +13,18 @@ const I = ["aria-label", "value"], q = /* @__PURE__ */ b({
13
13
  label: {}
14
14
  },
15
15
  emits: ["update:modelValue"],
16
- setup(E, { expose: d, emit: m }) {
17
- const t = m, r = h(null);
18
- function p(e) {
19
- t("update:modelValue", e.target.value);
16
+ setup(N, { expose: d, emit: p }) {
17
+ const r = p, l = v(null);
18
+ function m(e) {
19
+ r("update:modelValue", e.target.value);
20
20
  }
21
- const n = g(() => {
22
- const { class: e, ...l } = k();
23
- return { class: e || "", rest: l };
24
- }), f = y({
21
+ function f() {
22
+ r("update:modelValue", ""), l.value && l.value.focus();
23
+ }
24
+ const t = g(() => {
25
+ const { class: e, ...n } = k();
26
+ return { class: e || "", rest: n };
27
+ }), b = z({
25
28
  base: "search-background flex items-center rounded border text-sm font-medium has-[:focus-visible]:bg-b-1 has-[:focus-visible]:outline",
26
29
  variants: {
27
30
  sidebar: {
@@ -33,26 +36,26 @@ const I = ["aria-label", "value"], q = /* @__PURE__ */ b({
33
36
  return d({
34
37
  focus: () => {
35
38
  var e;
36
- (e = r.value) == null || e.focus();
39
+ (e = l.value) == null || e.focus();
37
40
  },
38
41
  blur: () => {
39
42
  var e;
40
- (e = r.value) == null || e.blur();
43
+ (e = l.value) == null || e.blur();
41
44
  }
42
- }), (e, l) => (s(), v("label", {
43
- class: i(a(c)(a(f)({ sidebar: e.sidebar }), n.value.class))
45
+ }), (e, n) => (s(), S("label", {
46
+ class: i(a(u)(a(b)({ sidebar: e.sidebar }), t.value.class))
44
47
  }, [
45
- e.sidebar ? (s(), o(a(C), {
48
+ e.sidebar ? (s(), o(a(B), {
46
49
  key: 0,
47
50
  class: "text-c-2",
48
51
  icon: "Search",
49
52
  size: "xs",
50
53
  thickness: "2.5"
51
- })) : u("", !0),
52
- S("input", V({
54
+ })) : c("", !0),
55
+ V("input", y({
53
56
  ref_key: "inputRef",
54
- ref: r
55
- }, n.value.rest, {
57
+ ref: l
58
+ }, t.value.rest, {
56
59
  "aria-label": e.label ?? "Enter search query",
57
60
  autocapitalize: "off",
58
61
  autocomplete: "off",
@@ -62,24 +65,24 @@ const I = ["aria-label", "value"], q = /* @__PURE__ */ b({
62
65
  spellcheck: "false",
63
66
  type: "search",
64
67
  value: e.modelValue,
65
- onInput: p
66
- }), null, 16, I),
67
- e.loading && e.loading.isLoading ? (s(), o(a(z), {
68
+ onInput: m
69
+ }), null, 16, E),
70
+ e.loading && e.loading.isLoading ? (s(), o(a(I), {
68
71
  key: 1,
69
72
  class: "mr-3 self-center",
70
73
  loadingState: e.loading,
71
74
  size: "md"
72
- }, null, 8, ["loadingState"])) : e.modelValue ? (s(), o(a(B), {
75
+ }, null, 8, ["loadingState"])) : e.modelValue ? (s(), o(a(w), {
73
76
  key: 2,
74
- class: i(a(c)("p-0", e.sidebar ? "h-4 w-4" : "h-5 w-5")),
77
+ class: i(a(u)("p-0", e.sidebar ? "h-4 w-4" : "h-5 w-5")),
75
78
  icon: "Close",
76
79
  label: "Clear Search",
77
80
  thickness: e.sidebar ? "1.75" : "1.5",
78
- onClick: l[0] || (l[0] = (N) => t("update:modelValue", ""))
79
- }, null, 8, ["class", "thickness"])) : u("", !0)
81
+ onClick: C(f, ["stop", "prevent"])
82
+ }, null, 8, ["class", "thickness"])) : c("", !0)
80
83
  ], 2));
81
84
  }
82
85
  });
83
86
  export {
84
- q as default
87
+ M as default
85
88
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSearchResultItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultItem.vue"],"names":[],"mappings":"AA6DA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,eAAe,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAWF,iBAAS,cAAc;WAiGT,OAAO,IAA6B;;sBAXxB,GAAG;yBACA,GAAG;uBACL,GAAG;6BACG,GAAG;;;;EAanC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarSearchResultItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchResults/ScalarSearchResultItem.vue"],"names":[],"mappings":"AA2DA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,eAAe,CAAA;AAIrD,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AAWF,iBAAS,cAAc;WAiGT,OAAO,IAA6B;;sBAXxB,GAAG;yBACA,GAAG;uBACL,GAAG;6BACG,GAAG;;;;EAanC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,10 +1,7 @@
1
- import { defineComponent as a, openBlock as t, createElementBlock as s, createElementVNode as o, normalizeProps as d, guardReactiveProps as m, unref as l, renderSlot as n, createBlock as p, createCommentVNode as r } from "vue";
1
+ import { defineComponent as a, openBlock as t, createElementBlock as s, createElementVNode as o, normalizeProps as d, guardReactiveProps as m, unref as c, renderSlot as n, createBlock as p, createCommentVNode as r } from "vue";
2
2
  import { useBindCx as u } from "../../hooks/useBindCx.js";
3
3
  import f from "../ScalarIcon/ScalarIcon.vue.js";
4
- const h = {
5
- class: "contents",
6
- role: "option"
7
- }, v = {
4
+ const h = { class: "contents" }, v = {
8
5
  key: 0,
9
6
  class: "flex h-fit items-center text-sm font-medium text-c-3 group-hover:text-c-1"
10
7
  }, x = { class: "flex min-w-0 flex-1 flex-col gap-0.75" }, _ = { class: "flex items-center gap-1" }, g = { class: "flex-1 truncate text-sm font-medium" }, k = {
@@ -21,10 +18,10 @@ const h = {
21
18
  active: { type: Boolean }
22
19
  },
23
20
  setup($) {
24
- const { cx: c } = u();
21
+ const { cx: l } = u();
25
22
  return (e, i) => (t(), s("li", h, [
26
23
  o("a", d(m(
27
- l(c)(
24
+ c(l)(
28
25
  "group flex cursor-pointer gap-2.5 rounded px-3 py-1.5 no-underline hover:bg-b-2",
29
26
  {
30
27
  "bg-b-2": e.active
@@ -33,7 +30,7 @@ const h = {
33
30
  )), [
34
31
  e.icon ? (t(), s("div", v, [
35
32
  n(e.$slots, "icon", {}, () => [
36
- e.icon ? (t(), p(l(f), {
33
+ e.icon ? (t(), p(c(f), {
37
34
  key: 0,
38
35
  icon: e.icon,
39
36
  size: "sm"
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAUrD,QAAA,MAAM,IAAI,EAAE,IAwBX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA;AAE7B,eAAO,MAAM,YAAY,EAAE,KAqC1B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KA6D9B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAkBxB,CAAA"}
1
+ {"version":3,"file":"ScalarSidebar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAUrD,QAAA,MAAM,IAAI,EAAE,IAsBX,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA;AAE7B,eAAO,MAAM,YAAY,EAAE,KAqC1B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAqF9B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAkBxB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarButton.vue"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;;;;;;;;;;;;;GAqBG;;AACH,wBAyHC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarSidebarButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSidebar/ScalarSidebarButton.vue"],"names":[],"mappings":"AAmFA,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAI7E;;;;;;;;;;;;;;;;;;;;;GAqBG;;AACH,wBA4HC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,12 +1,13 @@
1
- import { defineComponent as d, openBlock as t, createBlock as r, resolveDynamicComponent as p, mergeProps as c, unref as o, withCtx as u, createElementVNode as f, createElementBlock as n, renderSlot as s, createVNode as m, createCommentVNode as l } from "vue";
1
+ import { defineComponent as r, openBlock as s, createBlock as c, resolveDynamicComponent as u, mergeProps as f, unref as o, withCtx as m, renderSlot as t, createVNode as n, createElementVNode as p, createElementBlock as a, createCommentVNode as l } from "vue";
2
2
  import { cva as b } from "../../cva.js";
3
3
  import { useBindCx as v } from "../../hooks/useBindCx.js";
4
+ import y from "./ScalarSidebarIndent.vue.js";
4
5
  import h from "../ScalarIcon/ScalarIcon.vue.js";
5
- const y = { class: "flex items-center gap-1 flex-1" }, B = {
6
+ const B = { class: "flex items-center gap-1 flex-1 py-2 leading-5" }, g = {
6
7
  key: 0,
7
8
  class: "size-3.5"
8
- }, _ = { key: 0 }, k = {}, N = /* @__PURE__ */ d({
9
- ...k,
9
+ }, S = { key: 0 }, $ = {}, w = /* @__PURE__ */ r({
10
+ ...$,
10
11
  inheritAttrs: !1,
11
12
  __name: "ScalarSidebarButton",
12
13
  props: {
@@ -16,48 +17,46 @@ const y = { class: "flex items-center gap-1 flex-1" }, B = {
16
17
  disabled: { type: Boolean },
17
18
  indent: { default: 0 }
18
19
  },
19
- setup(C) {
20
- const a = b({
21
- base: ["rounded p-1.5 font-medium text-c-2 no-underline"],
20
+ setup(k) {
21
+ const d = b({
22
+ base: ["group/button flex rounded px-1.5 font-medium text-c-2 no-underline"],
22
23
  variants: {
23
24
  selected: { true: "cursor-auto bg-b-2 text-c-1" },
24
- disabled: { true: "cursor-auto" },
25
- indent: {
26
- 0: "pl-[6px]",
27
- 1: "pl-[24px]",
28
- 2: "pl-[42px]",
29
- 3: "pl-[60px]",
30
- 4: "pl-[78px]",
31
- 5: "pl-[96px]",
32
- 6: "pl-[114px]"
33
- }
25
+ disabled: { true: "cursor-auto" }
34
26
  },
35
27
  compoundVariants: [
36
28
  { selected: !1, disabled: !1, class: "hover:bg-b-2" }
37
29
  ],
38
- defaultVariants: { selected: !1, disabled: !1, indent: 0 }
30
+ defaultVariants: { selected: !1, disabled: !1 }
39
31
  }), { cx: i } = v();
40
- return (e, V) => (t(), r(p(e.is), c({
32
+ return (e, C) => (s(), c(u(e.is), f({
41
33
  "aria-level": e.indent,
34
+ "aria-selected": e.selected,
42
35
  type: e.is === "button" ? "button" : void 0
43
- }, o(i)(o(a)({ selected: e.selected, disabled: e.disabled, indent: e.indent }))), {
44
- default: u(() => [
45
- f("div", y, [
46
- e.icon || e.$slots.icon ? (t(), n("div", B, [
47
- s(e.$slots, "icon", {}, () => [
48
- m(o(h), { icon: e.icon }, null, 8, ["icon"])
36
+ }, o(i)(o(d)({ selected: e.selected, disabled: e.disabled }))), {
37
+ default: m(() => [
38
+ t(e.$slots, "indent", {}, () => [
39
+ n(y, {
40
+ indent: e.indent,
41
+ selected: e.selected
42
+ }, null, 8, ["indent", "selected"])
43
+ ]),
44
+ p("div", B, [
45
+ e.icon || e.$slots.icon ? (s(), a("div", g, [
46
+ t(e.$slots, "icon", {}, () => [
47
+ n(o(h), { icon: e.icon }, null, 8, ["icon"])
49
48
  ])
50
49
  ])) : l("", !0),
51
- s(e.$slots, "default")
50
+ t(e.$slots, "default")
52
51
  ]),
53
- e.$slots.aside ? (t(), n("div", _, [
54
- s(e.$slots, "aside")
52
+ e.$slots.aside ? (s(), a("div", S, [
53
+ t(e.$slots, "aside")
55
54
  ])) : l("", !0)
56
55
  ]),
57
56
  _: 3
58
- }, 16, ["aria-level", "type"]));
57
+ }, 16, ["aria-level", "aria-selected", "type"]));
59
58
  }
60
59
  });
61
60
  export {
62
- N as default
61
+ w as default
63
62
  };