@scalar/components 0.0.5 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/index.cjs +55 -17
  2. package/dist/index.d.ts +526 -14
  3. package/dist/index.js +290 -241
  4. package/dist/index.umd.cjs +40 -2
  5. package/dist/style.css +1 -1
  6. package/package.json +5 -5
  7. package/dist/components/ScalarButton/ScalarButton.spec.d.ts +0 -2
  8. package/dist/components/ScalarButton/ScalarButton.spec.d.ts.map +0 -1
  9. package/dist/components/ScalarButton/ScalarButton.stories.d.ts +0 -889
  10. package/dist/components/ScalarButton/ScalarButton.stories.d.ts.map +0 -1
  11. package/dist/components/ScalarButton/ScalarButton.vue.d.ts +0 -55
  12. package/dist/components/ScalarButton/ScalarButton.vue.d.ts.map +0 -1
  13. package/dist/components/ScalarButton/index.d.ts +0 -2
  14. package/dist/components/ScalarButton/index.d.ts.map +0 -1
  15. package/dist/components/ScalarIcon/ScalarIcon.spec.d.ts +0 -2
  16. package/dist/components/ScalarIcon/ScalarIcon.spec.d.ts.map +0 -1
  17. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +0 -71
  18. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts.map +0 -1
  19. package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts +0 -17
  20. package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts.map +0 -1
  21. package/dist/components/ScalarIcon/SvgRenderer.d.ts +0 -7
  22. package/dist/components/ScalarIcon/SvgRenderer.d.ts.map +0 -1
  23. package/dist/components/ScalarIcon/icons/iconNames.d.ts +0 -2
  24. package/dist/components/ScalarIcon/icons/iconNames.d.ts.map +0 -1
  25. package/dist/components/ScalarIcon/icons/index.d.ts +0 -4
  26. package/dist/components/ScalarIcon/icons/index.d.ts.map +0 -1
  27. package/dist/components/ScalarIcon/index.d.ts +0 -3
  28. package/dist/components/ScalarIcon/index.d.ts.map +0 -1
  29. package/dist/components/ScalarIconButton/ScalarIconButton.spec.d.ts +0 -2
  30. package/dist/components/ScalarIconButton/ScalarIconButton.spec.d.ts.map +0 -1
  31. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +0 -57
  32. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts.map +0 -1
  33. package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts +0 -35
  34. package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts.map +0 -1
  35. package/dist/components/ScalarIconButton/index.d.ts +0 -2
  36. package/dist/components/ScalarIconButton/index.d.ts.map +0 -1
  37. package/dist/components/ScalarLoading/ScalarLoading.spec.d.ts +0 -2
  38. package/dist/components/ScalarLoading/ScalarLoading.spec.d.ts.map +0 -1
  39. package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts +0 -326
  40. package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts.map +0 -1
  41. package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts +0 -48
  42. package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts.map +0 -1
  43. package/dist/components/ScalarLoading/index.d.ts +0 -2
  44. package/dist/components/ScalarLoading/index.d.ts.map +0 -1
  45. package/dist/components/ScalarModal/ScalarModal.spec.d.ts +0 -2
  46. package/dist/components/ScalarModal/ScalarModal.spec.d.ts.map +0 -1
  47. package/dist/components/ScalarModal/ScalarModal.stories.d.ts +0 -202
  48. package/dist/components/ScalarModal/ScalarModal.stories.d.ts.map +0 -1
  49. package/dist/components/ScalarModal/ScalarModal.vue.d.ts +0 -52
  50. package/dist/components/ScalarModal/ScalarModal.vue.d.ts.map +0 -1
  51. package/dist/components/ScalarModal/index.d.ts +0 -2
  52. package/dist/components/ScalarModal/index.d.ts.map +0 -1
  53. package/dist/components/ScalarTextField/ScalarTextField.spec.d.ts +0 -2
  54. package/dist/components/ScalarTextField/ScalarTextField.spec.d.ts.map +0 -1
  55. package/dist/components/ScalarTextField/ScalarTextField.stories.d.ts +0 -992
  56. package/dist/components/ScalarTextField/ScalarTextField.stories.d.ts.map +0 -1
  57. package/dist/components/ScalarTextField/ScalarTextField.vue.d.ts +0 -73
  58. package/dist/components/ScalarTextField/ScalarTextField.vue.d.ts.map +0 -1
  59. package/dist/components/ScalarTextField/index.d.ts +0 -2
  60. package/dist/components/ScalarTextField/index.d.ts.map +0 -1
  61. package/dist/index.d.ts.map +0 -1
  62. package/dist/tailwind/index.d.ts +0 -2
  63. package/dist/tailwind/index.d.ts.map +0 -1
  64. package/dist/tailwind/tailwind.theme.d.ts +0 -59
  65. package/dist/tailwind/tailwind.theme.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { defineComponent as p, useCssVars as j, openBlock as s, createElementBlock as u, normalizeClass as i, createElementVNode as b, createCommentVNode as m, createStaticVNode as H, reactive as T, useSlots as P, computed as S, unref as l, renderSlot as x, createVNode as y, defineAsyncComponent as Z, h as W, createBlock as w, withCtx as f, normalizeStyle as V, createTextVNode as E, toDisplayString as C, useAttrs as R, ref as L, onMounted as N, resolveDynamicComponent as K, mergeProps as U, withKeys as q } from "vue";
2
- import { defineConfig as G } from "cva";
3
- import { extendTailwindMerge as J } from "tailwind-merge";
4
- import { Dialog as Q, DialogPanel as X, DialogTitle as Y, DialogDescription as ee } from "@headlessui/vue";
5
- import { useTextareaAutosize as te } from "@vueuse/core";
6
- import { nanoid as ae } from "nanoid";
7
- const oe = J({}), { cva: B, cx: g, compose: Ue } = G({
1
+ import { defineComponent as g, useCssVars as P, openBlock as l, createElementBlock as d, normalizeClass as i, createElementVNode as h, createCommentVNode as u, createStaticVNode as O, reactive as A, computed as $, useAttrs as V, mergeProps as T, unref as a, renderSlot as x, createVNode as k, defineAsyncComponent as E, h as N, createBlock as C, toDisplayString as y, withCtx as _, normalizeStyle as Z, createTextVNode as W, ref as z, onMounted as R, resolveDynamicComponent as K, withKeys as U } from "vue";
2
+ import { defineConfig as q } from "cva";
3
+ import { extendTailwindMerge as G } from "tailwind-merge";
4
+ import { Dialog as J, DialogPanel as Q, DialogTitle as X, DialogDescription as Y } from "@headlessui/vue";
5
+ import { useTextareaAutosize as ee } from "@vueuse/core";
6
+ import { nanoid as te } from "nanoid";
7
+ const oe = G({}), { cva: m, cx: v, compose: tt } = q({
8
8
  hooks: {
9
- onComplete: (a) => oe(a)
9
+ onComplete: (o) => `${oe(o)} scalar-reset`
10
10
  }
11
11
  }), re = {
12
12
  key: 0,
13
13
  class: "loader-wrapper"
14
- }, le = /* @__PURE__ */ H('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-9483a281></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-9483a281></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-9483a281></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-9483a281></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-9483a281></path>', 5), ne = {
14
+ }, ae = /* @__PURE__ */ O('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-9483a281></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-9483a281></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-9483a281></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-9483a281></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-9483a281></path>', 5), ne = {
15
15
  key: 0,
16
16
  class: "circular-loader"
17
17
  };
18
- function qe() {
19
- return T({
18
+ function ot() {
19
+ return A({
20
20
  isValid: !1,
21
21
  isInvalid: !1,
22
22
  isLoading: !1,
@@ -26,53 +26,53 @@ function qe() {
26
26
  stopLoading() {
27
27
  this.isLoading = !1;
28
28
  },
29
- validate(a = 800) {
29
+ validate(o = 800) {
30
30
  this.isValid = !0;
31
- const e = a - 300;
31
+ const t = o - 300;
32
32
  return new Promise(
33
- (t) => setTimeout(() => this.clear().then(() => t(!0)), e)
33
+ (e) => setTimeout(() => this.clear().then(() => e(!0)), t)
34
34
  );
35
35
  },
36
- invalidate(a = 1100) {
36
+ invalidate(o = 1100) {
37
37
  this.isInvalid = !0;
38
- const e = a - 300;
38
+ const t = o - 300;
39
39
  return new Promise(
40
- (t) => setTimeout(() => this.clear().then(() => t(!0)), e)
40
+ (e) => setTimeout(() => this.clear().then(() => e(!0)), t)
41
41
  );
42
42
  },
43
- clear(a = 300) {
44
- return this.isValid = !1, this.isInvalid = !1, this.isLoading = !1, new Promise((e) => {
43
+ clear(o = 300) {
44
+ return this.isValid = !1, this.isInvalid = !1, this.isLoading = !1, new Promise((t) => {
45
45
  setTimeout(() => {
46
- e(!0);
47
- }, a);
46
+ t(!0);
47
+ }, o);
48
48
  });
49
49
  }
50
50
  });
51
51
  }
52
- const se = /* @__PURE__ */ p({
52
+ const le = /* @__PURE__ */ g({
53
53
  __name: "ScalarLoading",
54
54
  props: {
55
55
  loadingState: {},
56
56
  size: { default: "24px" }
57
57
  },
58
- setup(a) {
59
- return j((e) => ({
60
- "68e6c412": e.size
61
- })), (e, t) => e.loadingState ? (s(), u("div", re, [
62
- (s(), u("svg", {
58
+ setup(o) {
59
+ return P((t) => ({
60
+ "68e6c412": t.size
61
+ })), (t, e) => t.loadingState ? (l(), d("div", re, [
62
+ (l(), d("svg", {
63
63
  class: i(["svg-loader", {
64
- "icon-is-valid": e.loadingState.isValid,
65
- "icon-is-invalid": e.loadingState.isInvalid
64
+ "icon-is-valid": t.loadingState.isValid,
65
+ "icon-is-invalid": t.loadingState.isInvalid
66
66
  }]),
67
67
  viewBox: "0 0 100 100",
68
68
  xmlns: "http://www.w3.org/2000/svg",
69
69
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
70
70
  }, [
71
- le,
72
- e.loadingState.isLoading ? (s(), u("g", ne, [
73
- b("circle", {
71
+ ae,
72
+ t.loadingState.isLoading ? (l(), d("g", ne, [
73
+ h("circle", {
74
74
  class: i(["loader-path", {
75
- "loader-path-off": e.loadingState.isValid || e.loadingState.isInvalid
75
+ "loader-path-off": t.loadingState.isValid || t.loadingState.isInvalid
76
76
  }]),
77
77
  cx: "50",
78
78
  cy: "50",
@@ -80,143 +80,141 @@ const se = /* @__PURE__ */ p({
80
80
  r: "20",
81
81
  "stroke-width": "2"
82
82
  }, null, 2)
83
- ])) : m("", !0)
83
+ ])) : u("", !0)
84
84
  ], 2))
85
- ])) : m("", !0);
85
+ ])) : u("", !0);
86
86
  }
87
87
  });
88
- const z = (a, e) => {
89
- const t = a.__vccOpts || a;
90
- for (const [n, o] of e)
91
- t[n] = o;
92
- return t;
93
- }, $ = /* @__PURE__ */ z(se, [["__scopeId", "data-v-9483a281"]]), ie = ["aria-disabled", "aria-label", "title"], de = {
94
- key: 1,
95
- class: "ml-2"
96
- }, ce = B({
97
- base: "scalar-button row items-center justify-center rounded font-medium",
88
+ const L = (o, t) => {
89
+ const e = o.__vccOpts || o;
90
+ for (const [n, s] of t)
91
+ e[n] = s;
92
+ return e;
93
+ }, D = /* @__PURE__ */ L(le, [["__scopeId", "data-v-9483a281"]]), F = {
94
+ solid: [
95
+ "scalar-button-solid",
96
+ "bg-back-btn-1 text-fore-btn-1 shadow-sm active:bg-back-btn-1 active:shadow-none hocus:bg-hover-btn-1"
97
+ ],
98
+ outlined: [
99
+ "scalar-button-outlined",
100
+ "active:bg-btn-1 border border-solid border-border bg-transparent text-fore-1 hocus:bg-back-2"
101
+ ],
102
+ ghost: [
103
+ "scalar-button-ghost",
104
+ "bg-transparent text-fore-3 active:text-fore-2 hocus:text-fore-2"
105
+ ],
106
+ danger: [
107
+ "scalar-button-danger",
108
+ "bg-error text-white active:brightness-90 hocus:brightness-90"
109
+ ]
110
+ }, se = m({
111
+ base: "scalar-button row cursor-pointer items-center justify-center rounded font-medium",
98
112
  variants: {
99
- isDisabled: { true: "bg-background-2 text-color-3 shadow-none" },
100
- isFullWidth: { true: "w-full" },
101
- isIconOnly: { true: "scalar-button-icon" },
113
+ disabled: {
114
+ true: "bg-background-2 text-color-3 cursor-not-allowed shadow-none"
115
+ },
116
+ fullWidth: { true: "w-full" },
102
117
  size: { md: "h-10 px-6 text-sm" },
103
- variant: {
104
- solid: [
105
- "scalar-button-solid",
106
- "bg-back-btn-1 text-fore-btn-1 shadow-sm active:bg-back-btn-1 active:shadow-none hocus:bg-hover-btn-1"
107
- ].join(" "),
108
- outlined: [
109
- "scalar-button-outlined",
110
- "active:bg-btn-1 border border-border bg-transparent text-fore-1 hocus:bg-back-2"
111
- ].join(" "),
112
- ghost: [
113
- "scalar-button-ghost",
114
- "bg-transparent text-fore-3 active:text-fore-2 hocus:text-fore-2"
115
- ].join(" "),
116
- danger: [
117
- "scalar-button-danger",
118
- "bg-error text-white active:brightness-90 hocus:brightness-90"
119
- ].join(" ")
120
- }
118
+ variant: F
121
119
  },
122
120
  compoundVariants: [
123
121
  {
124
- isDisabled: !0,
122
+ disabled: !0,
125
123
  variant: "ghost",
126
124
  class: "bg-transparent text-ghost"
127
- },
128
- {
129
- isIconOnly: !0,
130
- size: "md",
131
- class: "h-10 w-10 p-2"
132
125
  }
133
126
  ]
134
- }), I = /* @__PURE__ */ p({
127
+ }), ie = ["ariaDisabled"], de = {
128
+ key: 0,
129
+ class: "mr-2 h-4 w-4"
130
+ }, ce = {
131
+ key: 1,
132
+ class: "ml-2"
133
+ }, ve = /* @__PURE__ */ g({
134
+ inheritAttrs: !1,
135
135
  __name: "ScalarButton",
136
136
  props: {
137
- isDisabled: { type: Boolean, default: !1 },
138
- isFullWidth: { type: Boolean, default: !1 },
139
- loadingState: {},
137
+ disabled: { type: Boolean },
138
+ fullWidth: { type: Boolean, default: !1 },
139
+ loading: {},
140
140
  size: { default: "md" },
141
- variant: { default: "solid" },
142
- title: {}
141
+ variant: { default: "solid" }
143
142
  },
144
- setup(a) {
145
- const e = P(), t = S(
146
- () => {
147
- var o, d, v, h;
148
- return (h = (v = (d = (o = e.default) == null ? void 0 : o.call(e)) == null ? void 0 : d[0]) == null ? void 0 : v.children) == null ? void 0 : h.trim();
149
- }
150
- ), n = S(() => !!(e.icon && !e.default));
151
- return (o, d) => (s(), u("button", {
152
- "aria-disabled": o.isDisabled,
153
- "aria-label": t.value || o.title,
154
- class: i(
155
- l(g)(
156
- l(ce)({
157
- isFullWidth: o.isFullWidth,
158
- isIconOnly: n.value,
159
- isDisabled: o.isDisabled,
160
- size: o.size,
161
- variant: o.variant
162
- }),
163
- { "pl-9 pr-3": o.loadingState }
164
- )
143
+ setup(o) {
144
+ const t = $(() => {
145
+ const { class: e, ...n } = V();
146
+ return { className: e || "", rest: n };
147
+ });
148
+ return (e, n) => (l(), d("button", T(t.value.rest, {
149
+ ariaDisabled: e.disabled || void 0,
150
+ class: a(v)(
151
+ a(se)({ fullWidth: e.fullWidth, disabled: e.disabled, size: e.size, variant: e.variant }),
152
+ { "pl-9 pr-3": e.loading },
153
+ `${t.value.className}`
165
154
  ),
166
- title: o.title || t.value,
167
155
  type: "button"
168
- }, [
169
- o.$slots.icon ? (s(), u("div", {
170
- key: 0,
171
- class: i(l(g)({ "mr-2": !n.value }, "h-4 w-4"))
172
- }, [
173
- x(o.$slots, "icon")
174
- ], 2)) : m("", !0),
175
- x(o.$slots, "default"),
176
- o.loadingState ? (s(), u("div", de, [
177
- y(l($), {
178
- loadingState: o.loadingState,
156
+ }), [
157
+ e.$slots.icon ? (l(), d("div", de, [
158
+ x(e.$slots, "icon")
159
+ ])) : u("", !0),
160
+ x(e.$slots, "default"),
161
+ e.loading ? (l(), d("div", ce, [
162
+ k(a(D), {
163
+ loadingState: e.loading,
179
164
  size: "20px"
180
165
  }, null, 8, ["loadingState"])
181
- ])) : m("", !0)
182
- ], 10, ie));
166
+ ])) : u("", !0)
167
+ ], 16, ie));
183
168
  }
184
- }), ue = (a) => Object.fromEntries(Array.from(a).map((e) => [e.name, e.value])), ve = (a) => ({ raw: e }) => {
185
- const n = new a().parseFromString(e, "image/svg+xml");
169
+ }), ue = (o) => Object.fromEntries(Array.from(o).map((t) => [t.name, t.value])), he = (o) => ({ raw: t }) => {
170
+ const n = new o().parseFromString(t, "image/svg+xml");
186
171
  if (n.getElementsByTagName("parsererror").length)
187
172
  return;
188
- const o = n.documentElement, d = ue(o.attributes), { width: v, height: h, ..._ } = d;
189
- return W("svg", { ..._, innerHTML: o.innerHTML });
190
- }, he = Z(async () => {
191
- const a = typeof DOMParser > "u" ? (await import("@xmldom/xmldom")).DOMParser : DOMParser, e = ve(a);
192
- return e.props = {
173
+ const s = n.documentElement, p = ue(s.attributes), { width: f, height: w, ...b } = p;
174
+ return N("svg", { ...b, innerHTML: s.innerHTML });
175
+ }, ge = E(async () => {
176
+ const o = typeof DOMParser > "u" ? (await import("@xmldom/xmldom")).DOMParser : DOMParser, t = he(o);
177
+ return t.props = {
193
178
  raw: {
194
179
  type: String,
195
180
  required: !0
196
181
  }
197
- }, e;
198
- }), me = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
182
+ }, t;
183
+ }), pe = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
199
184
  <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.429"
200
185
  d="M24 1.714v44.572M1.714 24h44.572" />
201
- </svg>`, ge = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.5 23.5" fill="currentColor">
186
+ </svg>`, me = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.5 23.5" fill="currentColor">
202
187
  <path d="M11.2 23.5 0 12.3l2.15-2.15 9.05 9.05L30.4 0l2.15 2.15z" />
203
- </svg>`, pe = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
204
- <path d="m19.5 8.25-7.5 7.5-7.5-7.5" />
205
188
  </svg>`, fe = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
189
+ <path d="m19.5 8.25-7.5 7.5-7.5-7.5" />
190
+ </svg>`, we = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
206
191
  <path d="M15.75 19.5 8.25 12l7.5-7.5" />
207
192
  </svg>`, be = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
208
193
  <path d="m8.25 4.5 7.5 7.5-7.5 7.5" />
209
- </svg>`, we = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
194
+ </svg>`, _e = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
210
195
  <path d="m4.5 15.75 7.5-7.5 7.5 7.5" />
211
- </svg>`, _e = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
196
+ </svg>`, xe = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
197
+ <path d="M6,5h4c1.7,0,2-1.3,2-3c1.1,0,2,0.9,2,2v10c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V4c0-1.1,0.9-2,2-2C4,3.7,4.3,5,6,5z M6,2V1
198
+ c0-0.6,0.5-1,1-1h2c0.5,0,1,0.4,1,1v1.3C10,2.9,9.6,3,9,3H7C6.4,3,6,2.6,6,2z" />
199
+ </svg>`, ke = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
212
200
  <path stroke="currentColor" d="m12.5 1.5-11 11m0-11 11 11" />
213
- </svg>`, xe = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
201
+ </svg>`, Ce = `<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
202
+ <path
203
+ d="M9.557,7.243A.456.456,0,0,0,9.1,6.991C9.023,7,8.951,7,8.877,7A4,4,0,0,1,5.546.781.5.5,0,0,0,5.564.256.476.476,0,0,0,5.1,0,5,5,0,1,0,9.539,7.767.5.5,0,0,0,9.557,7.243Z"
204
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
205
+ </svg>`, ye = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
214
206
  <path
215
207
  d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" />
216
- </svg>`, ye = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 1024 1024">
208
+ </svg>`, Me = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 9">
209
+ <g fill="none" fill-rule="evenodd" transform="translate(.67 .67)">
210
+ <rect transform="rotate(180 4 4)" />
211
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width=".5"
212
+ d="M2.85 1.73h3.4v3.4m0-3.4L1.74 6.24" />
213
+ </g>
214
+ </svg>`, Le = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 1024 1024">
217
215
  <path
218
216
  d="M512 0a512 512 0 0 0-162 998c26 4 35-11 35-25l-1-95c-128 23-161-32-172-60-6-15-31-61-52-73-18-10-44-33-1-33 40-1 69 37 78 52 46 78 120 56 149 43 5-33 18-56 33-69-114-13-234-56-234-253 0-56 20-101 53-137-5-13-23-65 5-136 0 0 43-13 141 53a487 487 0 0 1 256 0c98-66 141-53 141-53 28 71 10 123 5 136 33 36 53 81 53 137 0 197-120 240-234 253 18 16 35 47 35 95l-1 140c0 14 9 30 35 25A512 512 0 0 0 512 0z" />
219
- </svg>`, ke = `<svg
217
+ </svg>`, Se = `<svg
220
218
  height="24"
221
219
  viewBox="0 0 24 24"
222
220
  width="24"
@@ -225,63 +223,114 @@ const z = (a, e) => {
225
223
  d="M24 12a1 1 0 0 0 -1 -1h-3.91a0.51 0.51 0 0 1 -0.49 -0.4 6.83 6.83 0 0 0 -0.94 -2.28 0.5 0.5 0 0 1 0.06 -0.63l2.77 -2.76a1 1 0 1 0 -1.42 -1.42l-2.76 2.77a0.5 0.5 0 0 1 -0.63 0.06 6.83 6.83 0 0 0 -2.28 -0.94 0.5 0.5 0 0 1 -0.4 -0.49V1a1 1 0 0 0 -2 0v3.91a0.51 0.51 0 0 1 -0.4 0.49 6.83 6.83 0 0 0 -2.28 0.94 0.5 0.5 0 0 1 -0.63 -0.06L4.93 3.51a1 1 0 0 0 -1.42 1.42l2.77 2.76a0.5 0.5 0 0 1 0.06 0.63 6.83 6.83 0 0 0 -0.94 2.28 0.5 0.5 0 0 1 -0.49 0.4H1a1 1 0 0 0 0 2h3.91a0.51 0.51 0 0 1 0.49 0.4 6.83 6.83 0 0 0 0.94 2.28 0.5 0.5 0 0 1 -0.06 0.63l-2.77 2.76a1 1 0 1 0 1.42 1.42l2.76 -2.77a0.5 0.5 0 0 1 0.63 -0.06 6.83 6.83 0 0 0 2.28 0.94 0.5 0.5 0 0 1 0.4 0.49V23a1 1 0 0 0 2 0v-3.91a0.51 0.51 0 0 1 0.4 -0.49 6.83 6.83 0 0 0 2.28 -0.94 0.5 0.5 0 0 1 0.63 0.06l2.76 2.77a1 1 0 1 0 1.42 -1.42l-2.77 -2.76a0.5 0.5 0 0 1 -0.06 -0.63 6.83 6.83 0 0 0 0.94 -2.28 0.5 0.5 0 0 1 0.49 -0.4H23a1 1 0 0 0 1 -1Zm-8.74 2.5A5.76 5.76 0 0 1 9.5 8.74a5.66 5.66 0 0 1 0.16 -1.31 0.49 0.49 0 0 1 0.34 -0.36 5.36 5.36 0 0 1 1.8 -0.31 5.47 5.47 0 0 1 5.46 5.46 5.36 5.36 0 0 1 -0.31 1.8 0.49 0.49 0 0 1 -0.35 0.32 5.53 5.53 0 0 1 -1.34 0.16Z"
226
224
  fill="currentColor"
227
225
  stroke-width="1"></path>
228
- </svg>`, Se = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 593 593">
226
+ </svg>`, ze = `<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
227
+ <path d="M3.500 5.000 A1.500 1.500 0 1 0 6.500 5.000 A1.500 1.500 0 1 0 3.500 5.000 Z" fill="currentColor"
228
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
229
+ <path d="M5,2.25a.625.625,0,0,1-.625-.625v-1a.625.625,0,0,1,1.25,0v1A.625.625,0,0,1,5,2.25Z" fill="currentColor"
230
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
231
+ <path d="M6.945,3.055a.623.623,0,0,1,0-.883l.707-.708a.625.625,0,0,1,.884.884l-.708.707A.623.623,0,0,1,6.945,3.055Z"
232
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
233
+ <path d="M7.75,5a.625.625,0,0,1,.625-.625h1a.625.625,0,0,1,0,1.25h-1A.625.625,0,0,1,7.75,5Z" fill="currentColor"
234
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
235
+ <path d="M6.945,6.945a.623.623,0,0,1,.883,0l.708.707a.625.625,0,0,1-.884.884l-.707-.708A.623.623,0,0,1,6.945,6.945Z"
236
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
237
+ <path d="M5,7.75a.625.625,0,0,1,.625.625v1a.625.625,0,0,1-1.25,0v-1A.625.625,0,0,1,5,7.75Z" fill="currentColor"
238
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
239
+ <path
240
+ d="M3.055,6.945a.623.623,0,0,1,0,.883l-.707.708a.625.625,0,0,1-.884-.884l.708-.707A.623.623,0,0,1,3.055,6.945Z"
241
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
242
+ <path d="M2.25,5a.625.625,0,0,1-.625.625h-1a.625.625,0,0,1,0-1.25h1A.625.625,0,0,1,2.25,5Z" fill="currentColor"
243
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
244
+ <path
245
+ d="M3.055,3.055a.623.623,0,0,1-.883,0l-.708-.707a.625.625,0,0,1,.884-.884l.707.708A.623.623,0,0,1,3.055,3.055Z"
246
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
247
+ </svg>`, Be = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 593 593">
229
248
  <path fill="currentColor" fill-rule="evenodd"
230
249
  d="M347 0c6 0 12 5 12 12v134l94-95c5-5 13-5 17 0l72 72c4 4 5 12 0 16v1l-95 94h134c7 0 12 5 12 12v101c0 7-5 12-12 12H447l95 94c4 5 5 13 0 17l-72 72c-4 4-12 5-16 0h-1l-94-95v134c0 7-5 12-12 12H246c-7 0-12-5-12-12v-70c0-22 9-43 24-59l130-130c14-14 14-37 0-51L259 142a84 84 0 0 1-25-59V12c0-7 5-12 12-12h101ZM138 52h1l219 219c14 14 14 37 0 51L139 542c-4 5-12 5-17 0l-71-70c-4-5-5-12 0-17l95-96H12c-7 0-12-5-12-12V246c0-7 5-12 12-12h134l-95-94c-4-5-4-12 0-17l71-71c4-5 12-5 16 0Z" />
231
- </svg>`, Ce = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 662 662">
250
+ </svg>`, Ae = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 662 662">
232
251
  <path fill-rule="evenodd" fill="currentColor"
233
252
  d="M331 0a331 331 0 1 1 0 662 331 331 0 0 1 0-662Zm148.5 109 .6.9a187 187 0 1 1-297.6-.9 267 267 0 1 0 297 0Z" />
234
- </svg>`, Be = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 620">
253
+ </svg>`, $e = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 620">
235
254
  <path fill="currentColor"
236
255
  d="M-.653 309.29c-.078 82.272 31.848 159.735 89.739 218.178l.283.283c122.379 121.247 319.824 121.184 440.16-.283 119.967-121.1 119.409-316.933-.998-437.339l-.99-.99C468.681 30.845 390.716-1.017 307.893-.67c-82.83.354-160.443 32.994-218.814 91.79C31.209 149.555-.724 227.025-.653 309.29Zm469.271-160.789.778.778c87.9 87.9 88.325 231.005.707 319.33-77.753 78.46-199.786 87.412-288.959 26.862l198.513-198.513-.007 166.361 83.68-.07v-306.22H157.11l-.008 83.6h160.584L121.994 436.323c-59.347-87.689-50.536-208.59 26.51-286.343C236.34 61.294 379.94 60.67 468.61 148.494Z" />
237
- </svg>`, ze = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 642 642" fill="currentColor">
256
+ </svg>`, Ve = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 642 642" fill="currentColor">
238
257
  <path
239
258
  d="M321 0a321 321 0 1 1 0 642 321 321 0 0 1 0-642Zm51.3 63L321 189.5 269.7 63l1 136.5-95.8-97.2L228 228l-125.7-53.1 97.2 95.8-136.5-1L189.5 321 63 372.3l136.5-1-97.2 95.8 125.7-53-53.1 125.6 95.8-97.2-1 136.5L321 452.5 372.3 579l-1-136.5 95.8 97.2-53-125.7 125.6 53.1-97.2-95.8 136.5 1L452.5 321 579 269.7l-136.5 1 97.2-95.8L414 228l53.1-125.7-95.8 97.2 1-136.5Z" />
240
- </svg>`, Me = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 620" fill="currentColor">
259
+ </svg>`, Te = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 620" fill="currentColor">
241
260
  <path
242
261
  d="M529.2 90.8A310 310 0 1 0 90.8 529.2 310 310 0 0 0 529.2 90.8M122.4 498.2c-54.9-55-15.4-183.5 88.2-287 103.6-103.7 232.1-143.2 287-88.3 54.9 54.8 15.4 183.4-88.3 287-103.5 103.6-232 143.1-286.9 88.3m261.8-262.7A104.7 104.7 0 1 1 236 383.7a104.7 104.7 0 0 1 148.2-148.2" />
243
- </svg>`, Le = `<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 14 14">
262
+ </svg>`, Ze = `<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 14 14">
244
263
  <path fill="none" stroke="currentColor" d="M14 3.4H0m14 7.2H0" />
264
+ </svg>`, De = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
265
+ <path fill="currentColor" fill-rule="evenodd"
266
+ d="M11.8214 0.0977942C12.1097 -0.00745677 12.4219 -0.0286524 12.7219 0.0367783C13.0248 0.102864 13.3024 0.254542 13.5216 0.47378C13.7408 0.693018 13.8925 0.970598 13.9586 1.27352C14.024 1.57344 14.0028 1.88572 13.8976 2.17395L10.3236 12.8859L10.3234 12.8866C10.2363 13.1501 10.083 13.3868 9.8781 13.574C9.6738 13.7606 9.42509 13.8918 9.15572 13.9549C8.8863 14.0206 8.60441 14.0151 8.33774 13.9389C8.07131 13.8628 7.82926 13.7187 7.63529 13.5209L5.71795 11.6124L3.70389 12.6538C3.54684 12.7351 3.35857 12.7273 3.20874 12.6334C3.05892 12.5395 2.96981 12.3735 2.9744 12.1967L3.05697 9.013L10.1019 3.8956C10.3812 3.69273 10.4432 3.30188 10.2403 3.02261C10.0374 2.74333 9.64659 2.68139 9.36731 2.88425L2.20283 8.08846L0.473125 6.35875L0.473067 6.3587L0.472941 6.35857C0.285618 6.17138 0.147716 5.9406 0.0716193 5.68694C-0.00393616 5.43509 -0.0162115 5.16853 0.0358379 4.91085C0.0879545 4.62934 0.213796 4.36664 0.400577 4.14957C0.588637 3.93101 0.83165 3.76664 1.1045 3.67345L1.10787 3.6723L1.10787 3.67231L11.8214 0.0977942Z"
267
+ clip-rule="evenodd"></path>
245
268
  </svg>`, Fe = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor">
246
269
  <path fill-rule="evenodd"
247
270
  d="M12.6 11.2h.1l3 3a1 1 0 1 1-1.4 1.5l-3-3a1 1 0 0 1-.1-.1 7 7 0 1 1 1.4-1.4zM7 12A5 5 0 1 0 7 2a5 5 0 0 0 0 10z" />
248
- </svg>`, F = /* @__PURE__ */ Object.assign({ "./Add.svg": me, "./CheckMark.svg": ge, "./ChevronDown.svg": pe, "./ChevronLeft.svg": fe, "./ChevronRight.svg": be, "./ChevronUp.svg": we, "./Close.svg": _e, "./Ellipses.svg": xe, "./GitHub.svg": ye, "./LightDarkModeToggle.svg": ke, "./Logo.svg": Se, "./LogoAPI.svg": Ce, "./LogoClient.svg": Be, "./LogoMarket.svg": ze, "./LogoSwagger.svg": Me, "./Menu.svg": Le, "./Search.svg": Fe }), Te = (a) => {
249
- const e = `./${a}.svg`;
250
- return F[e] === void 0 ? (console.warn(`Could not find icon: ${a}`), "") : F[e];
251
- }, D = /* @__PURE__ */ p({
271
+ </svg>`, B = /* @__PURE__ */ Object.assign({ "./Add.svg": pe, "./CheckMark.svg": me, "./ChevronDown.svg": fe, "./ChevronLeft.svg": we, "./ChevronRight.svg": be, "./ChevronUp.svg": _e, "./Clipboard.svg": xe, "./Close.svg": ke, "./DarkMode.svg": Ce, "./Ellipses.svg": ye, "./ExternalLink.svg": Me, "./GitHub.svg": Le, "./LightDarkModeToggle.svg": Se, "./LightMode.svg": ze, "./Logo.svg": Be, "./LogoAPI.svg": Ae, "./LogoClient.svg": $e, "./LogoMarket.svg": Ve, "./LogoSwagger.svg": Te, "./Menu.svg": Ze, "./PaperAirplane.svg": De, "./Search.svg": Fe }), je = (o) => {
272
+ const t = `./${o}.svg`;
273
+ return B[t] === void 0 ? (console.warn(`Could not find icon: ${o}`), "") : B[t];
274
+ }, j = /* @__PURE__ */ g({
252
275
  __name: "ScalarIcon",
253
276
  props: {
254
- name: {}
277
+ icon: {},
278
+ size: {}
255
279
  },
256
- setup(a) {
257
- const e = a, t = S(() => Te(e.name));
258
- return (n, o) => t.value ? (s(), w(l(he), {
280
+ setup(o) {
281
+ const t = o, e = m({
282
+ variants: {
283
+ size: {
284
+ xs: "h-3 w-3",
285
+ sm: "h-3.5 w-3.5",
286
+ md: "h-4 w-4",
287
+ lg: "h-5 w-5",
288
+ xl: "h-6 w-6"
289
+ }
290
+ }
291
+ }), n = $(() => je(t.icon));
292
+ return (s, p) => n.value ? (l(), C(a(ge), {
259
293
  key: 0,
260
- class: "flow-icon",
294
+ class: i(a(v)("scalar-icon", a(e)({ size: s.size }))),
261
295
  height: "100%",
262
- raw: t.value,
296
+ raw: n.value,
263
297
  width: "100%"
264
- }, null, 8, ["raw"])) : m("", !0);
298
+ }, null, 8, ["class", "raw"])) : u("", !0);
265
299
  }
266
- }), Ve = /* @__PURE__ */ p({
300
+ }), Ie = ["ariaDisabled"], He = { class: "sr-only" }, Pe = /* @__PURE__ */ g({
267
301
  __name: "ScalarIconButton",
268
302
  props: {
269
303
  label: {},
270
304
  icon: {},
271
- variant: { default: "ghost" }
305
+ disabled: { type: Boolean },
306
+ variant: { default: "ghost" },
307
+ size: { default: "md" }
272
308
  },
273
- setup(a) {
274
- return (e, t) => (s(), w(l(I), {
275
- title: e.label,
276
- variant: e.variant
277
- }, {
278
- icon: f(() => [
279
- y(l(D), { name: e.icon }, null, 8, ["name"])
280
- ]),
281
- _: 1
282
- }, 8, ["title", "variant"]));
309
+ setup(o) {
310
+ const t = m({
311
+ base: "scalar-icon-button grid aspect-square cursor-pointer rounded",
312
+ variants: {
313
+ size: {
314
+ xs: "h-3.5 w-3.5 p-0.5",
315
+ sm: "h-5 w-5 p-1",
316
+ md: "h-10 w-10 p-3"
317
+ },
318
+ disabled: {
319
+ true: "cursor-not-allowed shadow-none"
320
+ },
321
+ variant: F
322
+ }
323
+ });
324
+ return (e, n) => (l(), d("button", {
325
+ ariaDisabled: e.disabled || void 0,
326
+ class: i(a(v)(a(t)({ size: e.size, variant: e.variant, disabled: e.disabled }))),
327
+ type: "button"
328
+ }, [
329
+ k(a(j), { icon: e.icon }, null, 8, ["icon"]),
330
+ h("span", He, y(e.label), 1)
331
+ ], 10, Ie));
283
332
  }
284
- }), $e = { class: "scalar-modal-layout fixed left-0 top-0 z-[1001] h-[100dvh] w-[100dvw] bg-backdrop p-5 opacity-0" }, Ge = () => T({
333
+ }), Oe = { class: "scalar-modal-layout fixed left-0 top-0 z-[1001] h-[100dvh] w-[100dvw] bg-backdrop p-5 opacity-0" }, rt = () => A({
285
334
  open: !1,
286
335
  show() {
287
336
  this.open = !0;
@@ -289,7 +338,7 @@ const z = (a, e) => {
289
338
  hide() {
290
339
  this.open = !1;
291
340
  }
292
- }), Ie = /* @__PURE__ */ p({
341
+ }), Ee = /* @__PURE__ */ g({
293
342
  __name: "ScalarModal",
294
343
  props: {
295
344
  state: {},
@@ -299,8 +348,8 @@ const z = (a, e) => {
299
348
  size: { default: "md" },
300
349
  variant: {}
301
350
  },
302
- setup(a) {
303
- const e = B({
351
+ setup(o) {
352
+ const t = m({
304
353
  base: [
305
354
  "scalar-modal",
306
355
  "col relative mx-auto mb-0 mt-20 w-full rounded-lg bg-back-2 text-left leading-snug text-fore-1 opacity-0"
@@ -318,38 +367,38 @@ const z = (a, e) => {
318
367
  }
319
368
  }
320
369
  });
321
- return (t, n) => (s(), w(l(Q), {
322
- open: t.state.open,
323
- onClose: n[0] || (n[0] = (o) => t.state.hide())
370
+ return (e, n) => (l(), C(a(J), {
371
+ open: e.state.open,
372
+ onClose: n[0] || (n[0] = (s) => e.state.hide())
324
373
  }, {
325
- default: f(() => [
326
- b("div", $e, [
327
- y(l(X), {
328
- class: i(l(e)({ size: t.size, variant: t.variant })),
329
- style: V({ maxWidth: t.maxWidth })
374
+ default: _(() => [
375
+ h("div", Oe, [
376
+ k(a(Q), {
377
+ class: i(a(t)({ size: e.size, variant: e.variant })),
378
+ style: Z({ maxWidth: e.maxWidth })
330
379
  }, {
331
- default: f(() => [
332
- t.title ? (s(), w(l(Y), {
380
+ default: _(() => [
381
+ e.title ? (l(), C(a(X), {
333
382
  key: 0,
334
- class: i(["scalar-modal-header font-semiBold m-0 rounded-lg px-6 py-3 text-left text-xs text-fore-1", { "pb-0 pt-6": t.variant === "history" }])
383
+ class: i(["scalar-modal-header font-semiBold m-0 rounded-lg px-6 py-3 text-left text-xs text-fore-1", { "pb-0 pt-6": e.variant === "history" }])
335
384
  }, {
336
- default: f(() => [
337
- E(C(t.title), 1)
385
+ default: _(() => [
386
+ W(y(e.title), 1)
338
387
  ]),
339
388
  _: 1
340
- }, 8, ["class"])) : m("", !0),
341
- y(l(ee), {
389
+ }, 8, ["class"])) : u("", !0),
390
+ k(a(Y), {
342
391
  class: i([
343
- "scalar-modal-body relative max-h-[calc(100dvh-240px)] overflow-y-auto rounded-lg bg-back-1 py-6 pb-4 pt-3",
344
- l(g)(
345
- t.bodyClass,
346
- t.variant === "history" && "pt-3",
347
- t.variant === "search" && "col max-h-[440px] overflow-hidden p-0"
392
+ "scalar-modal-body relative max-h-[calc(100dvh-240px)] overflow-y-auto rounded-lg bg-back-1 px-6 pb-4 pt-6",
393
+ a(v)(
394
+ e.bodyClass,
395
+ e.variant === "history" && "pt-3",
396
+ e.variant === "search" && "col max-h-[440px] overflow-hidden p-0"
348
397
  )
349
398
  ])
350
399
  }, {
351
- default: f(() => [
352
- x(t.$slots, "default", {}, void 0, !0)
400
+ default: _(() => [
401
+ x(e.$slots, "default", {}, void 0, !0)
353
402
  ]),
354
403
  _: 3
355
404
  }, 8, ["class"])
@@ -362,7 +411,7 @@ const z = (a, e) => {
362
411
  }, 8, ["open"]));
363
412
  }
364
413
  });
365
- const De = /* @__PURE__ */ z(Ie, [["__scopeId", "data-v-4ee157b1"]]), Oe = { class: "scalar-input-container relative" }, Ae = ["for"], je = { class: "icon-slot cursor-pointer text-ghost hover:text-fore-1 !empty:flex !empty:w-7 !empty:items-center !empty:pr-3" }, He = /* @__PURE__ */ p({
414
+ const Ne = /* @__PURE__ */ L(Ee, [["__scopeId", "data-v-eaa2e0c9"]]), We = { class: "scalar-input-container relative" }, Re = ["for"], Ke = { class: "icon-slot cursor-pointer text-ghost hover:text-fore-1 !empty:flex !empty:w-7 !empty:items-center !empty:pr-3" }, Ue = /* @__PURE__ */ g({
366
415
  __name: "ScalarTextField",
367
416
  props: {
368
417
  modelValue: {},
@@ -378,48 +427,48 @@ const De = /* @__PURE__ */ z(Ie, [["__scopeId", "data-v-4ee157b1"]]), Oe = { cla
378
427
  disableTrim: { type: Boolean, default: !1 }
379
428
  },
380
429
  emits: ["submit", "update:modelValue"],
381
- setup(a, { emit: e }) {
382
- const t = a, n = B({
383
- base: "scalar-input-wrapper relative flex items-center rounded border border-border",
430
+ setup(o, { emit: t }) {
431
+ const e = o, n = m({
432
+ base: "scalar-input-wrapper relative flex items-center rounded border border-solid border-border",
384
433
  variants: {
385
434
  focus: {
386
435
  true: "scalar-input-wrapper-focus border-fore-3 has-actv-btn:border has-actv-btn:border-border"
387
436
  },
388
437
  error: { true: "scalar-input-wrapper-error border-error" }
389
438
  }
390
- }), o = R(), d = o.id || `id-${ae()}`, v = L(), h = L(!1);
391
- let _;
392
- if (t.isMultiline) {
393
- const { triggerResize: r } = te({
394
- element: v,
395
- input: t.modelValue
439
+ }), s = V(), p = s.id || `id-${te()}`, f = z(), w = z(!1);
440
+ let b;
441
+ if (e.isMultiline) {
442
+ const { triggerResize: r } = ee({
443
+ element: f,
444
+ input: e.modelValue
396
445
  });
397
- _ = r;
446
+ b = r;
398
447
  }
399
- function O(r) {
448
+ function I(r) {
400
449
  const c = r.target.value;
401
- t.isMultiline && _(), t.handleFieldChange ? t.handleFieldChange(c) : e("update:modelValue", c);
450
+ e.isMultiline && b(), e.handleFieldChange ? e.handleFieldChange(c) : t("update:modelValue", c);
402
451
  }
403
- function M(r) {
404
- const c = r.target, k = t.disableTrim || t.isMultiline ? c.value : c.value.trim();
405
- t.handleFieldSubmit ? t.handleFieldSubmit(k) : e("submit", k);
452
+ function S(r) {
453
+ const c = r.target, M = e.disableTrim || e.isMultiline ? c.value : c.value.trim();
454
+ e.handleFieldSubmit ? e.handleFieldSubmit(M) : t("submit", M);
406
455
  }
407
- function A(r) {
408
- h.value = !1, t.emitOnBlur && t.modelValue && M(r);
456
+ function H(r) {
457
+ w.value = !1, e.emitOnBlur && e.modelValue && S(r);
409
458
  }
410
- return N(() => {
459
+ return R(() => {
411
460
  var r;
412
- Object.prototype.hasOwnProperty.call(o, "autofocus") && ((r = v.value) == null || r.focus());
413
- }), (r, c) => (s(), u("div", Oe, [
414
- b("div", {
415
- class: i(l(n)({ error: r.error, focus: h.value }))
461
+ Object.prototype.hasOwnProperty.call(s, "autofocus") && ((r = f.value) == null || r.focus());
462
+ }), (r, c) => (l(), d("div", We, [
463
+ h("div", {
464
+ class: i(a(n)({ error: r.error, focus: w.value }))
416
465
  }, [
417
- (s(), w(K(r.isMultiline ? "textarea" : "input"), U({ id: l(d) }, r.$attrs, {
466
+ (l(), C(K(r.isMultiline ? "textarea" : "input"), T({ id: a(p) }, r.$attrs, {
418
467
  ref_key: "input",
419
- ref: v,
468
+ ref: f,
420
469
  class: [
421
470
  "scalar-input",
422
- l(g)(
471
+ a(v)(
423
472
  { "min-h-[77px]": r.isMultiline },
424
473
  "z-10 w-full resize-none appearance-none border-0 bg-transparent p-3 text-sm text-fore-1",
425
474
  "outline-none transition-opacity"
@@ -427,43 +476,43 @@ const De = /* @__PURE__ */ z(Ie, [["__scopeId", "data-v-4ee157b1"]]), Oe = { cla
427
476
  ],
428
477
  placeholder: r.placeholder,
429
478
  value: r.modelValue,
430
- onBlur: A,
431
- onFocus: c[0] || (c[0] = (k) => h.value = !0),
432
- onInput: O,
433
- onKeyup: q(M, ["enter"])
479
+ onBlur: H,
480
+ onFocus: c[0] || (c[0] = (M) => w.value = !0),
481
+ onInput: I,
482
+ onKeyup: U(S, ["enter"])
434
483
  }), null, 16, ["id", "class", "placeholder", "value", "onKeyup"])),
435
- r.label ? (s(), u("label", {
484
+ r.label ? (l(), d("label", {
436
485
  key: 0,
437
486
  class: i(
438
- l(g)(
487
+ a(v)(
439
488
  "scalar-input-label pointer-events-none absolute left-0 top-0 mx-2 my-3 px-1 text-xs",
440
489
  "shadow-current z-10 origin-top-left rounded text-fore-3 transition-transform"
441
490
  )
442
491
  ),
443
- for: l(d),
444
- style: V({
492
+ for: a(p),
493
+ style: Z({
445
494
  "box-shadow": `0 0 4px 4px ${r.labelShadowColor}`,
446
495
  "background-color": r.labelShadowColor
447
496
  })
448
- }, C(r.label), 15, Ae)) : m("", !0),
449
- b("div", je, [
497
+ }, y(r.label), 15, Re)) : u("", !0),
498
+ h("div", Ke, [
450
499
  x(r.$slots, "default", {}, void 0, !0)
451
500
  ])
452
501
  ], 2),
453
- b("span", {
502
+ h("span", {
454
503
  class: i(
455
- l(g)(
504
+ a(v)(
456
505
  "helper-text mt-1.5 flex items-center text-xs text-error before:rounded-full before:font-black",
457
506
  "before:mr-1.5 before:block before:h-4 before:w-4 before:text-center before:text-xxs before:leading-4",
458
507
  "before:bg-error before:text-white before:content-['!'] empty:hidden"
459
508
  )
460
509
  )
461
- }, C(r.helperText), 3)
510
+ }, y(r.helperText), 3)
462
511
  ]));
463
512
  }
464
513
  });
465
- const Pe = /* @__PURE__ */ z(He, [["__scopeId", "data-v-8e18f760"]]);
466
- const Je = {
514
+ const qe = /* @__PURE__ */ L(Ue, [["__scopeId", "data-v-c047336e"]]);
515
+ const at = {
467
516
  boxShadow: {
468
517
  DEFAULT: "var(--theme-shadow-1, var(--default-theme-shadow-1))",
469
518
  md: "var(--theme-shadow-2, var(--default-theme-shadow-2))",
@@ -495,7 +544,7 @@ const Je = {
495
544
  ghost: "var(--theme-color-ghost, var(--default-theme-color-ghost))",
496
545
  transparent: "transparent"
497
546
  }
498
- }, Qe = {
547
+ }, nt = {
499
548
  borderRadius: {
500
549
  DEFAULT: "var(--theme-radius, var(--default-theme-radius))",
501
550
  md: "var(--theme-radius, var(--default-theme-radius))",
@@ -519,21 +568,21 @@ const Je = {
519
568
  "screen-md": "640px",
520
569
  "screen-lg": "800px"
521
570
  }
522
- }, Xe = {
523
- install: (a) => {
524
- a.component("ScalarButton", I), a.component("ScalarIcon", D), a.component("ScalarIconButton", Ve), a.component("ScalarLoading", $), a.component("ScalarModal", De), a.component("ScalarTextField", Pe);
571
+ }, lt = {
572
+ install: (o) => {
573
+ o.component("ScalarButton", ve), o.component("ScalarIcon", j), o.component("ScalarIconButton", Pe), o.component("ScalarLoading", D), o.component("ScalarModal", Ne), o.component("ScalarTextField", qe);
525
574
  }
526
575
  };
527
576
  export {
528
- I as ScalarButton,
529
- D as ScalarIcon,
530
- Ve as ScalarIconButton,
531
- $ as ScalarLoading,
532
- De as ScalarModal,
533
- Pe as ScalarTextField,
534
- Xe as default,
535
- Qe as extend,
536
- Je as theme,
537
- qe as useLoadingState,
538
- Ge as useModal
577
+ ve as ScalarButton,
578
+ j as ScalarIcon,
579
+ Pe as ScalarIconButton,
580
+ D as ScalarLoading,
581
+ Ne as ScalarModal,
582
+ qe as ScalarTextField,
583
+ lt as default,
584
+ nt as extend,
585
+ at as theme,
586
+ ot as useLoadingState,
587
+ rt as useModal
539
588
  };