@scalar/components 0.12.61 → 0.12.63

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 (59) hide show
  1. package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.d.ts.map +1 -1
  2. package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts.map +1 -1
  3. package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +28 -21
  4. package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts.map +1 -1
  5. package/dist/components/ScalarFloating/ScalarFloating.vue.js +39 -31
  6. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +16 -8
  7. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts.map +1 -1
  8. package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts +8 -3
  9. package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts.map +1 -1
  10. package/dist/components/ScalarIcon/ScalarIcon.vue.js +3 -3
  11. package/dist/components/ScalarIcon/ScalarIcon.vue2.js +18 -14
  12. package/dist/components/ScalarIcon/icons/index.d.ts +1 -8
  13. package/dist/components/ScalarIcon/icons/index.d.ts.map +1 -1
  14. package/dist/components/ScalarIcon/index.d.ts +1 -1
  15. package/dist/components/ScalarIcon/logos/Adonisjs.svg.js +21 -0
  16. package/dist/components/ScalarIcon/logos/Docusaurus.svg.js +16 -0
  17. package/dist/components/ScalarIcon/logos/Dotnet.svg.js +23 -0
  18. package/dist/components/ScalarIcon/logos/Elysiajs.svg.js +16 -0
  19. package/dist/components/ScalarIcon/logos/Express.svg.js +19 -0
  20. package/dist/components/ScalarIcon/logos/Fastapi.svg.js +19 -0
  21. package/dist/components/ScalarIcon/logos/Fastify.svg.js +19 -0
  22. package/dist/components/ScalarIcon/logos/Go.svg.js +23 -0
  23. package/dist/components/ScalarIcon/logos/Hono.svg.js +24 -0
  24. package/dist/components/ScalarIcon/logos/Laravel.svg.js +19 -0
  25. package/dist/components/ScalarIcon/logos/Litestar.svg.js +16 -0
  26. package/dist/components/ScalarIcon/logos/Nestjs.svg.js +21 -0
  27. package/dist/components/ScalarIcon/logos/Nextjs.svg.js +19 -0
  28. package/dist/components/ScalarIcon/logos/Nitro.svg.js +16 -0
  29. package/dist/components/ScalarIcon/logos/Nuxt.svg.js +19 -0
  30. package/dist/components/ScalarIcon/logos/Openapi.svg.js +16 -0
  31. package/dist/components/ScalarIcon/logos/Platformatic.svg.js +28 -0
  32. package/dist/components/ScalarIcon/logos/React.svg.js +34 -0
  33. package/dist/components/ScalarIcon/logos/Rust.svg.js +19 -0
  34. package/dist/components/ScalarIcon/logos/Vue.svg.js +23 -0
  35. package/dist/components/ScalarIcon/logos/index.d.ts +2 -0
  36. package/dist/components/ScalarIcon/logos/index.d.ts.map +1 -0
  37. package/dist/components/ScalarIcon/utils/index.d.ts +17 -0
  38. package/dist/components/ScalarIcon/utils/index.d.ts.map +1 -0
  39. package/dist/components/ScalarIcon/utils/index.js +283 -0
  40. package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts.map +1 -1
  41. package/dist/components/ScalarListbox/ScalarListbox.vue.js +56 -50
  42. package/dist/components/ScalarModal/ScalarModal.stories.d.ts +3 -3
  43. package/dist/components/ScalarModal/ScalarModal.vue.d.ts +2 -2
  44. package/dist/components/ScalarModal/ScalarModal.vue.d.ts.map +1 -1
  45. package/dist/components/ScalarModal/ScalarModal.vue.js +4 -4
  46. package/dist/components/ScalarModal/ScalarModal.vue2.js +28 -25
  47. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.d.ts.map +1 -1
  48. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +5 -83
  49. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue2.js +83 -2
  50. package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts +24 -0
  51. package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts.map +1 -1
  52. package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts +3 -0
  53. package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts.map +1 -1
  54. package/dist/components/ScalarTooltip/ScalarTooltip.vue.js +19 -17
  55. package/dist/style.css +1 -1
  56. package/package.json +3 -3
  57. package/dist/components/ScalarIcon/icons/icons.d.ts +0 -2
  58. package/dist/components/ScalarIcon/icons/icons.d.ts.map +0 -1
  59. package/dist/components/ScalarIcon/icons/index.js +0 -238
@@ -1,9 +1,9 @@
1
- import { defineComponent as y, openBlock as o, createBlock as p, unref as t, normalizeClass as r, withCtx as s, createTextVNode as g, toDisplayString as m, createCommentVNode as v, createVNode as i, mergeProps as x, createElementBlock as V, Fragment as k, renderList as B, createElementVNode as n, renderSlot as h } from "vue";
1
+ import { defineComponent as v, openBlock as r, createBlock as u, unref as t, normalizeClass as i, withCtx as s, createTextVNode as x, toDisplayString as m, createCommentVNode as g, createVNode as n, createElementVNode as a, mergeProps as y, createElementBlock as h, Fragment as V, renderList as k, renderSlot as B } from "vue";
2
2
  import { Listbox as z, ListboxLabel as L, ListboxOptions as w, ListboxOption as O, ListboxButton as C } from "@headlessui/vue";
3
3
  import { cva as S, cx as N } from "../../cva.js";
4
4
  import $ from "../ScalarFloating/ScalarFloating.vue.js";
5
5
  import j from "../ScalarIcon/ScalarIcon.vue.js";
6
- const P = /* @__PURE__ */ y({
6
+ const E = { class: "custom-scroll min-h-0 flex-1" }, T = /* @__PURE__ */ v({
7
7
  inheritAttrs: !1,
8
8
  __name: "ScalarListbox",
9
9
  props: {
@@ -19,7 +19,7 @@ const P = /* @__PURE__ */ y({
19
19
  teleport: { type: [Boolean, String] }
20
20
  },
21
21
  emits: ["update:modelValue"],
22
- setup(E) {
22
+ setup(W) {
23
23
  const c = S({
24
24
  base: [
25
25
  // Layout
@@ -37,79 +37,85 @@ const P = /* @__PURE__ */ y({
37
37
  disabled: { true: "pointer-events-none opacity-50" }
38
38
  }
39
39
  });
40
- return (e, a) => (o(), p(t(z), {
40
+ return (e, o) => (r(), u(t(z), {
41
41
  as: "div",
42
- class: r([{ "w-full": e.fullWidth }, "text-sm"]),
42
+ class: i([{ "w-full": e.fullWidth }, "text-sm"]),
43
43
  modelValue: e.modelValue,
44
44
  multiple: e.multiple,
45
- "onUpdate:modelValue": a[0] || (a[0] = (d) => e.$emit("update:modelValue", d))
45
+ "onUpdate:modelValue": o[0] || (o[0] = (d) => e.$emit("update:modelValue", d))
46
46
  }, {
47
47
  default: s(({ open: d }) => [
48
- e.label ? (o(), p(t(L), {
48
+ e.label ? (r(), u(t(L), {
49
49
  key: 0,
50
50
  class: "sr-only"
51
51
  }, {
52
52
  default: s(() => [
53
- g(m(e.label), 1)
53
+ x(m(e.label), 1)
54
54
  ]),
55
55
  _: 1
56
- })) : v("", !0),
57
- i(t($), {
56
+ })) : g("", !0),
57
+ n(t($), {
58
58
  isOpen: d ?? e.isOpen,
59
59
  placement: e.placement ?? "bottom-start",
60
60
  resize: e.resize,
61
61
  teleport: e.teleport
62
62
  }, {
63
63
  floating: s(({ width: f }) => [
64
- i(t(w), x({
65
- class: "relative flex w-40 flex-col rounded border p-0.75",
64
+ a("div", y(e.$attrs, {
65
+ class: "relative flex max-h-[inherit] w-40 rounded border",
66
66
  style: { width: f }
67
- }, e.$attrs), {
68
- default: s(() => [
69
- (o(!0), V(k, null, B(e.options, (l) => (o(), p(t(O), {
70
- key: l.id,
71
- as: "template",
72
- disabled: l.disabled,
73
- value: l
74
- }, {
75
- default: s(({ active: b, selected: u }) => [
76
- n("li", {
77
- class: r(
78
- t(N)(t(c)({ active: b, selected: u, disabled: l.disabled }))
79
- )
80
- }, [
81
- n("div", {
82
- class: r([
83
- "flex size-4 items-center justify-center rounded-full p-[3px]",
84
- u ? "bg-c-accent text-b-1" : "text-transparent group-hover/listbox:shadow-border"
85
- ])
86
- }, [
87
- i(t(j), {
88
- class: "relative top-[0.5px] size-2.5",
89
- icon: "Checkmark",
90
- thickness: "2.5"
91
- })
92
- ], 2),
93
- n("span", {
94
- class: r(["inline-block min-w-0 flex-1 truncate", l.color ? l.color : "text-c-1"])
95
- }, m(l.label), 3)
96
- ], 2)
67
+ }), [
68
+ a("div", E, [
69
+ n(t(w), { class: "flex flex-col p-0.75" }, {
70
+ default: s(() => [
71
+ (r(!0), h(V, null, k(e.options, (l) => (r(), u(t(O), {
72
+ key: l.id,
73
+ as: "template",
74
+ disabled: l.disabled,
75
+ value: l
76
+ }, {
77
+ default: s(({ active: b, selected: p }) => [
78
+ a("li", {
79
+ class: i(
80
+ t(N)(
81
+ t(c)({ active: b, selected: p, disabled: l.disabled })
82
+ )
83
+ )
84
+ }, [
85
+ a("div", {
86
+ class: i([
87
+ "flex size-4 items-center justify-center rounded-full p-[3px]",
88
+ p ? "bg-c-accent text-b-1" : "text-transparent group-hover/listbox:shadow-border"
89
+ ])
90
+ }, [
91
+ n(t(j), {
92
+ class: "relative top-[0.5px] size-2.5",
93
+ icon: "Checkmark",
94
+ thickness: "2.5"
95
+ })
96
+ ], 2),
97
+ a("span", {
98
+ class: i(["inline-block min-w-0 flex-1 truncate", l.color ? l.color : "text-c-1"])
99
+ }, m(l.label), 3)
100
+ ], 2)
101
+ ]),
102
+ _: 2
103
+ }, 1032, ["disabled", "value"]))), 128))
97
104
  ]),
98
- _: 2
99
- }, 1032, ["disabled", "value"]))), 128)),
100
- a[1] || (a[1] = n("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-md brightness-lifted" }, null, -1))
105
+ _: 1
106
+ })
101
107
  ]),
102
- _: 2
103
- }, 1040, ["style"])
108
+ o[1] || (o[1] = a("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-md brightness-lifted" }, null, -1))
109
+ ], 16)
104
110
  ]),
105
111
  default: s(() => [
106
- i(t(C), {
112
+ n(t(C), {
107
113
  id: e.id,
108
114
  as: "template",
109
115
  class: "justify-start focus:outline-none focus-visible:ring-1 focus-visible:ring-c-accent"
110
116
  }, {
111
117
  default: s(() => [
112
- h(e.$slots, "default")
118
+ B(e.$slots, "default")
113
119
  ]),
114
120
  _: 3
115
121
  }, 8, ["id"])
@@ -122,5 +128,5 @@ const P = /* @__PURE__ */ y({
122
128
  }
123
129
  });
124
130
  export {
125
- P as default
131
+ T as default
126
132
  };
@@ -11,7 +11,7 @@ declare const meta: {
11
11
  bodyClass?: string;
12
12
  maxWidth?: string;
13
13
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "xxs" | undefined;
14
- variant?: "form" | "search" | "history" | undefined;
14
+ variant?: "form" | "search" | "error" | "history" | undefined;
15
15
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
16
16
  size: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "xxs";
17
17
  }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
@@ -27,7 +27,7 @@ declare const meta: {
27
27
  bodyClass?: string;
28
28
  maxWidth?: string;
29
29
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "xxs" | undefined;
30
- variant?: "form" | "search" | "history" | undefined;
30
+ variant?: "form" | "search" | "error" | "history" | undefined;
31
31
  }> & Readonly<{}>, {}, {}, {}, {}, {
32
32
  size: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "xxs";
33
33
  }>;
@@ -40,7 +40,7 @@ declare const meta: {
40
40
  bodyClass?: string;
41
41
  maxWidth?: string;
42
42
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "xxs" | undefined;
43
- variant?: "form" | "search" | "history" | undefined;
43
+ variant?: "form" | "search" | "error" | "history" | undefined;
44
44
  }> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
45
45
  size: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "xxs";
46
46
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
@@ -10,14 +10,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
10
10
  bodyClass?: string;
11
11
  maxWidth?: string;
12
12
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "xxs" | undefined;
13
- variant?: "form" | "search" | "history" | undefined;
13
+ variant?: "form" | "search" | "error" | "history" | 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?: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "xxs" | undefined;
20
- variant?: "form" | "search" | "history" | undefined;
20
+ variant?: "form" | "search" | "error" | "history" | undefined;
21
21
  }> & Readonly<{}>, {
22
22
  size: "xs" | "sm" | "md" | "lg" | "xl" | "full" | "xxs";
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarModal/ScalarModal.vue"],"names":[],"mappings":"AAyNA,+CAA+C;AAC/C,wBAAgB,QAAQ;;;;EAUvB;;WAMU,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;WAHV,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;;;qBA8PS,GAAG;qBACH,GAAG;;AAvQjC,wBAwSK;AAcL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,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":"AA6OA,+CAA+C;AAC/C,wBAAgB,QAAQ;;;;EAUvB;;WAMU,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;WAHV,UAAU,CAAC,OAAO,QAAQ,CAAC;YAC1B,MAAM;gBACF,MAAM;eACP,MAAM;;;;;;qBAqQS,GAAG;qBACH,GAAG;;AA9QjC,wBA+SK;AAcL,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,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 f } from "./ScalarModal.vue2.js";
2
+ import { useModal as s } from "./ScalarModal.vue2.js";
3
3
  /* empty css */
4
4
  import r from "../../_virtual/_plugin-vue_export-helper.js";
5
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e37b0bd8"]]);
5
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f7e672e8"]]);
6
6
  export {
7
- m as default,
8
- f as useModal
7
+ f as default,
8
+ s as useModal
9
9
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as v, openBlock as l, createBlock as r, unref as a, withCtx as o, createElementVNode as x, normalizeClass as s, createVNode as i, normalizeStyle as b, createTextVNode as g, toDisplayString as y, createCommentVNode as d, createElementBlock as n, renderSlot as m, reactive as w } from "vue";
1
+ import { defineComponent as v, openBlock as l, createBlock as r, unref as a, withCtx as t, createElementVNode as x, normalizeClass as s, 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";
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 p } from "../../cva.js";
3
+ import { cva as c, cx as f } from "../../cva.js";
4
4
  import S from "../ScalarIconButton/ScalarIconButton.vue.js";
5
5
  const $ = {
6
6
  key: 0,
@@ -28,10 +28,10 @@ const M = /* @__PURE__ */ v({
28
28
  variant: {}
29
29
  },
30
30
  setup(N) {
31
- const f = c({
31
+ const p = c({
32
32
  base: [
33
33
  "scalar-modal",
34
- "col relative mx-auto mb-0 w-[calc(100vw-16px)] rounded-lg bg-b-2 p-0 text-left leading-snug text-c-1 opacity-0 lg:w-[calc(100vw-32px)]"
34
+ "col relative mx-auto mb-0 rounded-lg bg-b-2 p-0 text-left leading-snug text-c-1 opacity-0 md:w-[calc(100vw-16px)] lg:w-[calc(100vw-32px)]"
35
35
  ].join(" "),
36
36
  variants: {
37
37
  size: {
@@ -41,12 +41,13 @@ const M = /* @__PURE__ */ v({
41
41
  md: "mt-20 max-w-screen-md",
42
42
  lg: "m-auto max-w-screen-lg",
43
43
  xl: "m-auto max-w-screen-xl",
44
- full: "full-size-styles mt-0 overflow-hidden lg:w-full"
44
+ full: "full-size-styles mt-0 lg:w-full"
45
45
  },
46
46
  variant: {
47
47
  form: "scalar-modal-form",
48
48
  history: "scalar-modal-history bg-b-1",
49
- search: "scalar-modal-search"
49
+ search: "scalar-modal-search",
50
+ error: "scalar-modal-error"
50
51
  }
51
52
  }
52
53
  }), u = c({
@@ -58,7 +59,8 @@ const M = /* @__PURE__ */ v({
58
59
  variant: {
59
60
  form: "overflow-visible",
60
61
  history: "pt-3",
61
- search: "col !m-0 max-h-[440px] overflow-hidden p-0"
62
+ search: "col !m-0 max-h-[440px] overflow-hidden p-0",
63
+ error: "overflow-y-scroll"
62
64
  },
63
65
  size: {
64
66
  xxs: "max-h-[calc(100dvh-240px)]",
@@ -67,19 +69,20 @@ const M = /* @__PURE__ */ v({
67
69
  md: "max-h-[calc(100dvh-240px)]",
68
70
  lg: "max-h-[calc(100dvh-180px)]",
69
71
  xl: "m-0 max-h-[calc(100dvh-120px)] p-0",
70
- full: "max-h-dvh rounded-none bg-transparent"
72
+ full: "max-h-dvh rounded-none"
71
73
  }
72
74
  }
73
75
  });
74
- return (e, t) => (l(), r(a(z), {
76
+ return (e, o) => (l(), r(a(z), {
75
77
  open: e.state.open,
76
- onClose: t[1] || (t[1] = (h) => e.state.hide())
78
+ onClose: o[1] || (o[1] = (h) => e.state.hide())
77
79
  }, {
78
- default: o(() => [
80
+ default: t(() => [
79
81
  x("div", {
80
82
  class: s(
81
- a(p)(
82
- "scalar-modal-layout fixed left-0 top-0 flex items-start justify-center",
83
+ a(f)(
84
+ e.size === "full" ? "scalar-modal-layout-full" : "scalar-modal-layout",
85
+ "fixed left-0 top-0 flex items-start justify-center",
83
86
  "z-[1001] h-[100dvh] w-[100dvw]",
84
87
  "bg-backdrop opacity-0 dark:bg-backdropdark",
85
88
  e.size === "full" && "flex"
@@ -87,42 +90,42 @@ const M = /* @__PURE__ */ v({
87
90
  )
88
91
  }, [
89
92
  i(a(k), {
90
- class: s(a(f)({ size: e.size, variant: e.variant })),
93
+ class: s(a(p)({ size: e.size, variant: e.variant })),
91
94
  style: b({ maxWidth: e.maxWidth })
92
95
  }, {
93
- default: o(() => [
96
+ default: t(() => [
94
97
  e.title ? (l(), r(a(C), {
95
98
  key: 0,
96
99
  class: s(["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" }])
97
100
  }, {
98
- default: o(() => [
99
- g(y(e.title), 1)
101
+ default: t(() => [
102
+ y(g(e.title), 1)
100
103
  ]),
101
104
  _: 1
102
105
  }, 8, ["class"])) : d("", !0),
103
- e.size === "full" ? (l(), n("div", {
106
+ e.size === "full" ? (l(), m("div", {
104
107
  key: 1,
105
108
  class: s(e.bodyClass)
106
109
  }, [
107
- m(e.$slots, "default", {}, void 0, !0)
110
+ n(e.$slots, "default", {}, void 0, !0)
108
111
  ], 2)) : (l(), r(a(D), {
109
112
  key: 2,
110
- class: s(a(p)(e.bodyClass, a(u)({ size: e.size, variant: e.variant })))
113
+ class: s(a(f)(e.bodyClass, a(u)({ size: e.size, variant: e.variant })))
111
114
  }, {
112
- default: o(() => [
113
- m(e.$slots, "default", {}, void 0, !0)
115
+ default: t(() => [
116
+ n(e.$slots, "default", {}, void 0, !0)
114
117
  ]),
115
118
  _: 3
116
119
  }, 8, ["class"]))
117
120
  ]),
118
121
  _: 3
119
122
  }, 8, ["class", "style"]),
120
- e.size === "full" ? (l(), n("div", $, [
123
+ e.size === "full" ? (l(), m("div", $, [
121
124
  i(a(S), {
122
- class: "hover:bg-b-2 focus:outline-none",
125
+ class: "hover:bg-b-3 focus:outline-none",
123
126
  icon: "Close",
124
127
  label: "Clear Search",
125
- onClose: t[0] || (t[0] = (h) => e.state.hide())
128
+ onClose: o[0] || (o[0] = (h) => e.state.hide())
126
129
  })
127
130
  ])) : d("", !0)
128
131
  ], 2)
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSearchInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarSearchInput/ScalarSearchInput.vue"],"names":[],"mappings":"AA8FA,OAAO,EAAE,KAAK,YAAY,EAAiB,MAAM,kBAAkB,CAAA;;cAKvD,YAAY;iBACT,MAAM;cACT,OAAO;YACT,MAAM;;;;;;;cAHJ,YAAY;iBACT,MAAM;cACT,OAAO;YACT,MAAM;;;;AAoLhB,wBAUG"}
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;;cAKvD,YAAY;iBACT,MAAM;cACT,OAAO;YACT,MAAM;;;;;;;cAHJ,YAAY;iBACT,MAAM;cACT,OAAO;YACT,MAAM;;;;AAwLhB,wBAUG"}
@@ -1,85 +1,7 @@
1
- import { defineComponent as b, ref as h, computed as g, useAttrs as v, openBlock as s, createElementBlock as k, normalizeClass as i, unref as a, createBlock as r, 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 N from "../ScalarLoading/ScalarLoading.vue.js";
5
- import z from "../ScalarIconButton/ScalarIconButton.vue.js";
6
- const B = ["aria-label", "value"], q = /* @__PURE__ */ b({
7
- inheritAttrs: !1,
8
- __name: "ScalarSearchInput",
9
- props: {
10
- loading: {},
11
- modelValue: {},
12
- sidebar: { type: Boolean },
13
- label: {}
14
- },
15
- emits: ["update:modelValue"],
16
- setup(I, { expose: d, emit: m }) {
17
- const t = m, o = h(null);
18
- function p(e) {
19
- t("update:modelValue", e.target.value);
20
- }
21
- const n = g(() => {
22
- const { class: e, ...l } = v();
23
- return { className: e || "", rest: l };
24
- }), f = y({
25
- base: "flex items-center rounded border bg-b-1/2 text-sm font-medium has-[:focus-visible]:bg-b-1 has-[:focus-visible]:outline",
26
- variants: {
27
- sidebar: {
28
- true: "h-8 gap-1.5 px-1.5",
29
- false: "h-10 p-3"
30
- }
31
- }
32
- });
33
- return d({
34
- focus: () => {
35
- var e;
36
- (e = o.value) == null || e.focus();
37
- },
38
- blur: () => {
39
- var e;
40
- (e = o.value) == null || e.blur();
41
- }
42
- }), (e, l) => (s(), k("label", {
43
- class: i(a(c)(a(f)({ sidebar: e.sidebar }), n.value.className))
44
- }, [
45
- e.sidebar ? (s(), r(a(C), {
46
- key: 0,
47
- class: "text-c-2",
48
- icon: "Search",
49
- size: "xs",
50
- thickness: "2.5"
51
- })) : u("", !0),
52
- S("input", V({
53
- ref_key: "inputRef",
54
- ref: o
55
- }, n.value.rest, {
56
- "aria-label": e.label ?? "Enter search query",
57
- autocapitalize: "off",
58
- autocomplete: "off",
59
- autocorrect: "off",
60
- class: "flex-1 appearance-none rounded border-none bg-transparent outline-none",
61
- placeholder: "Search...",
62
- spellcheck: "false",
63
- type: "search",
64
- value: e.modelValue,
65
- onInput: p
66
- }), null, 16, B),
67
- e.loading && e.loading.isLoading ? (s(), r(a(N), {
68
- key: 1,
69
- class: "mr-3 self-center",
70
- loadingState: e.loading,
71
- size: "md"
72
- }, null, 8, ["loadingState"])) : e.modelValue ? (s(), r(a(z), {
73
- key: 2,
74
- class: i(a(c)("p-0", e.sidebar ? "h-4 w-4" : "h-5 w-5")),
75
- icon: "Close",
76
- label: "Clear Search",
77
- thickness: e.sidebar ? "1.75" : "1.5",
78
- onClick: l[0] || (l[0] = (E) => t("update:modelValue", ""))
79
- }, null, 8, ["class", "thickness"])) : u("", !0)
80
- ], 2));
81
- }
82
- });
1
+ import a from "./ScalarSearchInput.vue2.js";
2
+ /* empty css */
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ o(a, [["__scopeId", "data-v-52e35a1d"]]);
83
5
  export {
84
- q as default
6
+ c as default
85
7
  };
@@ -1,4 +1,85 @@
1
- import f from "./ScalarSearchInput.vue.js";
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 N from "../ScalarLoading/ScalarLoading.vue.js";
5
+ import z from "../ScalarIconButton/ScalarIconButton.vue.js";
6
+ const B = ["aria-label", "value"], q = /* @__PURE__ */ b({
7
+ inheritAttrs: !1,
8
+ __name: "ScalarSearchInput",
9
+ props: {
10
+ loading: {},
11
+ modelValue: {},
12
+ sidebar: { type: Boolean },
13
+ label: {}
14
+ },
15
+ emits: ["update:modelValue"],
16
+ setup(I, { expose: d, emit: m }) {
17
+ const t = m, r = h(null);
18
+ function p(e) {
19
+ t("update:modelValue", e.target.value);
20
+ }
21
+ const n = g(() => {
22
+ const { class: e, ...l } = k();
23
+ return { className: e || "", rest: l };
24
+ }), f = y({
25
+ base: "search-background flex items-center rounded border text-sm font-medium has-[:focus-visible]:bg-b-1 has-[:focus-visible]:outline",
26
+ variants: {
27
+ sidebar: {
28
+ true: "h-8 gap-1.5 px-1.5",
29
+ false: "h-10 p-3"
30
+ }
31
+ }
32
+ });
33
+ return d({
34
+ focus: () => {
35
+ var e;
36
+ (e = r.value) == null || e.focus();
37
+ },
38
+ blur: () => {
39
+ var e;
40
+ (e = r.value) == null || e.blur();
41
+ }
42
+ }), (e, l) => (s(), v("label", {
43
+ class: i(a(c)(a(f)({ sidebar: e.sidebar }), n.value.className))
44
+ }, [
45
+ e.sidebar ? (s(), o(a(C), {
46
+ key: 0,
47
+ class: "text-c-2",
48
+ icon: "Search",
49
+ size: "xs",
50
+ thickness: "2.5"
51
+ })) : u("", !0),
52
+ S("input", V({
53
+ ref_key: "inputRef",
54
+ ref: r
55
+ }, n.value.rest, {
56
+ "aria-label": e.label ?? "Enter search query",
57
+ autocapitalize: "off",
58
+ autocomplete: "off",
59
+ autocorrect: "off",
60
+ class: "flex-1 appearance-none rounded border-none bg-transparent outline-none",
61
+ placeholder: "Search...",
62
+ spellcheck: "false",
63
+ type: "search",
64
+ value: e.modelValue,
65
+ onInput: p
66
+ }), null, 16, B),
67
+ e.loading && e.loading.isLoading ? (s(), o(a(N), {
68
+ key: 1,
69
+ class: "mr-3 self-center",
70
+ loadingState: e.loading,
71
+ size: "md"
72
+ }, null, 8, ["loadingState"])) : e.modelValue ? (s(), o(a(z), {
73
+ key: 2,
74
+ class: i(a(c)("p-0", e.sidebar ? "h-4 w-4" : "h-5 w-5")),
75
+ icon: "Close",
76
+ label: "Clear Search",
77
+ thickness: e.sidebar ? "1.75" : "1.5",
78
+ onClick: l[0] || (l[0] = (E) => t("update:modelValue", ""))
79
+ }, null, 8, ["class", "thickness"])) : u("", !0)
80
+ ], 2));
81
+ }
82
+ });
2
83
  export {
3
- f as default
84
+ q as default
4
85
  };