@scalar/components 0.0.5 → 0.2.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 (66) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs +55 -17
  3. package/dist/index.d.ts +526 -14
  4. package/dist/index.js +315 -248
  5. package/dist/index.umd.cjs +40 -2
  6. package/dist/style.css +1 -1
  7. package/package.json +6 -5
  8. package/dist/components/ScalarButton/ScalarButton.spec.d.ts +0 -2
  9. package/dist/components/ScalarButton/ScalarButton.spec.d.ts.map +0 -1
  10. package/dist/components/ScalarButton/ScalarButton.stories.d.ts +0 -889
  11. package/dist/components/ScalarButton/ScalarButton.stories.d.ts.map +0 -1
  12. package/dist/components/ScalarButton/ScalarButton.vue.d.ts +0 -55
  13. package/dist/components/ScalarButton/ScalarButton.vue.d.ts.map +0 -1
  14. package/dist/components/ScalarButton/index.d.ts +0 -2
  15. package/dist/components/ScalarButton/index.d.ts.map +0 -1
  16. package/dist/components/ScalarIcon/ScalarIcon.spec.d.ts +0 -2
  17. package/dist/components/ScalarIcon/ScalarIcon.spec.d.ts.map +0 -1
  18. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +0 -71
  19. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts.map +0 -1
  20. package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts +0 -17
  21. package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts.map +0 -1
  22. package/dist/components/ScalarIcon/SvgRenderer.d.ts +0 -7
  23. package/dist/components/ScalarIcon/SvgRenderer.d.ts.map +0 -1
  24. package/dist/components/ScalarIcon/icons/iconNames.d.ts +0 -2
  25. package/dist/components/ScalarIcon/icons/iconNames.d.ts.map +0 -1
  26. package/dist/components/ScalarIcon/icons/index.d.ts +0 -4
  27. package/dist/components/ScalarIcon/icons/index.d.ts.map +0 -1
  28. package/dist/components/ScalarIcon/index.d.ts +0 -3
  29. package/dist/components/ScalarIcon/index.d.ts.map +0 -1
  30. package/dist/components/ScalarIconButton/ScalarIconButton.spec.d.ts +0 -2
  31. package/dist/components/ScalarIconButton/ScalarIconButton.spec.d.ts.map +0 -1
  32. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +0 -57
  33. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts.map +0 -1
  34. package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts +0 -35
  35. package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts.map +0 -1
  36. package/dist/components/ScalarIconButton/index.d.ts +0 -2
  37. package/dist/components/ScalarIconButton/index.d.ts.map +0 -1
  38. package/dist/components/ScalarLoading/ScalarLoading.spec.d.ts +0 -2
  39. package/dist/components/ScalarLoading/ScalarLoading.spec.d.ts.map +0 -1
  40. package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts +0 -326
  41. package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts.map +0 -1
  42. package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts +0 -48
  43. package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts.map +0 -1
  44. package/dist/components/ScalarLoading/index.d.ts +0 -2
  45. package/dist/components/ScalarLoading/index.d.ts.map +0 -1
  46. package/dist/components/ScalarModal/ScalarModal.spec.d.ts +0 -2
  47. package/dist/components/ScalarModal/ScalarModal.spec.d.ts.map +0 -1
  48. package/dist/components/ScalarModal/ScalarModal.stories.d.ts +0 -202
  49. package/dist/components/ScalarModal/ScalarModal.stories.d.ts.map +0 -1
  50. package/dist/components/ScalarModal/ScalarModal.vue.d.ts +0 -52
  51. package/dist/components/ScalarModal/ScalarModal.vue.d.ts.map +0 -1
  52. package/dist/components/ScalarModal/index.d.ts +0 -2
  53. package/dist/components/ScalarModal/index.d.ts.map +0 -1
  54. package/dist/components/ScalarTextField/ScalarTextField.spec.d.ts +0 -2
  55. package/dist/components/ScalarTextField/ScalarTextField.spec.d.ts.map +0 -1
  56. package/dist/components/ScalarTextField/ScalarTextField.stories.d.ts +0 -992
  57. package/dist/components/ScalarTextField/ScalarTextField.stories.d.ts.map +0 -1
  58. package/dist/components/ScalarTextField/ScalarTextField.vue.d.ts +0 -73
  59. package/dist/components/ScalarTextField/ScalarTextField.vue.d.ts.map +0 -1
  60. package/dist/components/ScalarTextField/index.d.ts +0 -2
  61. package/dist/components/ScalarTextField/index.d.ts.map +0 -1
  62. package/dist/index.d.ts.map +0 -1
  63. package/dist/tailwind/index.d.ts +0 -2
  64. package/dist/tailwind/index.d.ts.map +0 -1
  65. package/dist/tailwind/tailwind.theme.d.ts +0 -59
  66. package/dist/tailwind/tailwind.theme.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,22 +1,26 @@
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";
1
+ import { defineComponent as g, useCssVars as O, openBlock as l, createElementBlock as d, normalizeClass as s, unref as a, createElementVNode as h, createCommentVNode as v, createStaticVNode as E, reactive as V, computed as $, useAttrs as T, mergeProps as Z, renderSlot as x, createVNode as k, defineAsyncComponent as N, h as W, createBlock as C, toDisplayString as y, withCtx as _, normalizeStyle as D, createTextVNode as R, ref as B, onMounted as K, resolveDynamicComponent as U, withKeys as q } from "vue";
2
2
  import { defineConfig as G } from "cva";
3
3
  import { extendTailwindMerge as J } from "tailwind-merge";
4
4
  import { Dialog as Q, DialogPanel as X, DialogTitle as Y, DialogDescription as ee } from "@headlessui/vue";
5
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({
6
+ import { nanoid as oe } from "nanoid";
7
+ const L = "scalar-component", re = J({
8
+ extend: {
9
+ classGroups: {
10
+ // Add the scalar class prefix as a custom class to be deduped by tailwind-merge
11
+ [L]: [L]
12
+ }
13
+ }
14
+ }), { cva: m, cx: c, compose: et } = G({
8
15
  hooks: {
9
- onComplete: (a) => oe(a)
16
+ onComplete: (o) => `${re(o, L)}`
10
17
  }
11
- }), re = {
12
- key: 0,
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 = {
18
+ }), ae = /* @__PURE__ */ E('<path class="svg-path svg-check-mark" d="m 0 60 l 30 30 l 70 -80" data-v-0f0b7a55></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 -40" data-v-0f0b7a55></path><path class="svg-path svg-x-mark" d="m 50 50 l 40 40" data-v-0f0b7a55></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 -40" data-v-0f0b7a55></path><path class="svg-path svg-x-mark" d="m 50 50 l -40 40" data-v-0f0b7a55></path>', 5), ne = {
15
19
  key: 0,
16
20
  class: "circular-loader"
17
21
  };
18
- function qe() {
19
- return T({
22
+ function tt() {
23
+ return V({
20
24
  isValid: !1,
21
25
  isInvalid: !1,
22
26
  isLoading: !1,
@@ -26,53 +30,56 @@ function qe() {
26
30
  stopLoading() {
27
31
  this.isLoading = !1;
28
32
  },
29
- validate(a = 800) {
33
+ validate(o = 800) {
30
34
  this.isValid = !0;
31
- const e = a - 300;
35
+ const t = o - 300;
32
36
  return new Promise(
33
- (t) => setTimeout(() => this.clear().then(() => t(!0)), e)
37
+ (e) => setTimeout(() => this.clear().then(() => e(!0)), t)
34
38
  );
35
39
  },
36
- invalidate(a = 1100) {
40
+ invalidate(o = 1100) {
37
41
  this.isInvalid = !0;
38
- const e = a - 300;
42
+ const t = o - 300;
39
43
  return new Promise(
40
- (t) => setTimeout(() => this.clear().then(() => t(!0)), e)
44
+ (e) => setTimeout(() => this.clear().then(() => e(!0)), t)
41
45
  );
42
46
  },
43
- clear(a = 300) {
44
- return this.isValid = !1, this.isInvalid = !1, this.isLoading = !1, new Promise((e) => {
47
+ clear(o = 300) {
48
+ return this.isValid = !1, this.isInvalid = !1, this.isLoading = !1, new Promise((t) => {
45
49
  setTimeout(() => {
46
- e(!0);
47
- }, a);
50
+ t(!0);
51
+ }, o);
48
52
  });
49
53
  }
50
54
  });
51
55
  }
52
- const se = /* @__PURE__ */ p({
56
+ const le = /* @__PURE__ */ g({
53
57
  __name: "ScalarLoading",
54
58
  props: {
55
59
  loadingState: {},
56
60
  size: { default: "24px" }
57
61
  },
58
- setup(a) {
59
- return j((e) => ({
60
- "68e6c412": e.size
61
- })), (e, t) => e.loadingState ? (s(), u("div", re, [
62
- (s(), u("svg", {
63
- class: i(["svg-loader", {
64
- "icon-is-valid": e.loadingState.isValid,
65
- "icon-is-invalid": e.loadingState.isInvalid
62
+ setup(o) {
63
+ return O((t) => ({
64
+ "50aa2fee": t.size
65
+ })), (t, e) => t.loadingState ? (l(), d("div", {
66
+ key: 0,
67
+ class: s(a(c)("loader-wrapper"))
68
+ }, [
69
+ (l(), d("svg", {
70
+ class: s(["svg-loader", {
71
+ "icon-is-valid": t.loadingState.isValid,
72
+ "icon-is-invalid": t.loadingState.isInvalid
66
73
  }]),
67
74
  viewBox: "0 0 100 100",
68
75
  xmlns: "http://www.w3.org/2000/svg",
69
76
  "xmlns:xlink": "http://www.w3.org/1999/xlink"
70
77
  }, [
71
- le,
72
- e.loadingState.isLoading ? (s(), u("g", ne, [
73
- b("circle", {
74
- class: i(["loader-path", {
75
- "loader-path-off": e.loadingState.isValid || e.loadingState.isInvalid
78
+ ae,
79
+ t.loadingState.isLoading ? (l(), d("g", ne, [
80
+ h("circle", {
81
+ class: s(["loader-path", {
82
+ "loader-path-off": t.loadingState.isValid || t.loadingState.isInvalid
76
83
  }]),
77
84
  cx: "50",
78
85
  cy: "50",
@@ -80,143 +87,141 @@ const se = /* @__PURE__ */ p({
80
87
  r: "20",
81
88
  "stroke-width": "2"
82
89
  }, null, 2)
83
- ])) : m("", !0)
90
+ ])) : v("", !0)
84
91
  ], 2))
85
- ])) : m("", !0);
92
+ ], 2)) : v("", !0);
86
93
  }
87
94
  });
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",
95
+ const z = (o, t) => {
96
+ const e = o.__vccOpts || o;
97
+ for (const [n, i] of t)
98
+ e[n] = i;
99
+ return e;
100
+ }, F = /* @__PURE__ */ z(le, [["__scopeId", "data-v-0f0b7a55"]]), j = {
101
+ solid: [
102
+ "scalar-button-solid",
103
+ "bg-back-btn-1 text-fore-btn-1 shadow-sm active:bg-back-btn-1 active:shadow-none hocus:bg-hover-btn-1"
104
+ ],
105
+ outlined: [
106
+ "scalar-button-outlined",
107
+ "active:bg-btn-1 border border-solid border-border bg-transparent text-fore-1 hocus:bg-back-2"
108
+ ],
109
+ ghost: [
110
+ "scalar-button-ghost",
111
+ "bg-transparent text-fore-3 active:text-fore-2 hocus:text-fore-2"
112
+ ],
113
+ danger: [
114
+ "scalar-button-danger",
115
+ "bg-error text-white active:brightness-90 hocus:brightness-90"
116
+ ]
117
+ }, se = m({
118
+ base: "scalar-button row cursor-pointer items-center justify-center rounded font-medium",
98
119
  variants: {
99
- isDisabled: { true: "bg-background-2 text-color-3 shadow-none" },
100
- isFullWidth: { true: "w-full" },
101
- isIconOnly: { true: "scalar-button-icon" },
120
+ disabled: {
121
+ true: "bg-background-2 text-color-3 cursor-not-allowed shadow-none"
122
+ },
123
+ fullWidth: { true: "w-full" },
102
124
  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
- }
125
+ variant: j
121
126
  },
122
127
  compoundVariants: [
123
128
  {
124
- isDisabled: !0,
129
+ disabled: !0,
125
130
  variant: "ghost",
126
131
  class: "bg-transparent text-ghost"
127
- },
128
- {
129
- isIconOnly: !0,
130
- size: "md",
131
- class: "h-10 w-10 p-2"
132
132
  }
133
133
  ]
134
- }), I = /* @__PURE__ */ p({
134
+ }), ie = ["ariaDisabled"], de = {
135
+ key: 0,
136
+ class: "mr-2 h-4 w-4"
137
+ }, ce = {
138
+ key: 1,
139
+ class: "ml-2"
140
+ }, ue = /* @__PURE__ */ g({
141
+ inheritAttrs: !1,
135
142
  __name: "ScalarButton",
136
143
  props: {
137
- isDisabled: { type: Boolean, default: !1 },
138
- isFullWidth: { type: Boolean, default: !1 },
139
- loadingState: {},
144
+ disabled: { type: Boolean },
145
+ fullWidth: { type: Boolean, default: !1 },
146
+ loading: {},
140
147
  size: { default: "md" },
141
- variant: { default: "solid" },
142
- title: {}
148
+ variant: { default: "solid" }
143
149
  },
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
- )
150
+ setup(o) {
151
+ const t = $(() => {
152
+ const { class: e, ...n } = T();
153
+ return { className: e || "", rest: n };
154
+ });
155
+ return (e, n) => (l(), d("button", Z(t.value.rest, {
156
+ ariaDisabled: e.disabled || void 0,
157
+ class: a(c)(
158
+ a(se)({ fullWidth: e.fullWidth, disabled: e.disabled, size: e.size, variant: e.variant }),
159
+ { "pl-9 pr-3": e.loading },
160
+ `${t.value.className}`
165
161
  ),
166
- title: o.title || t.value,
167
162
  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,
163
+ }), [
164
+ e.$slots.icon ? (l(), d("div", de, [
165
+ x(e.$slots, "icon")
166
+ ])) : v("", !0),
167
+ x(e.$slots, "default"),
168
+ e.loading ? (l(), d("div", ce, [
169
+ k(a(F), {
170
+ loadingState: e.loading,
179
171
  size: "20px"
180
172
  }, null, 8, ["loadingState"])
181
- ])) : m("", !0)
182
- ], 10, ie));
173
+ ])) : v("", !0)
174
+ ], 16, ie));
183
175
  }
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");
176
+ }), ve = (o) => Object.fromEntries(Array.from(o).map((t) => [t.name, t.value])), he = (o) => ({ raw: t }) => {
177
+ const n = new o().parseFromString(t, "image/svg+xml");
186
178
  if (n.getElementsByTagName("parsererror").length)
187
179
  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 = {
180
+ const i = n.documentElement, p = ve(i.attributes), { width: f, height: w, ...b } = p;
181
+ return W("svg", { ...b, innerHTML: i.innerHTML });
182
+ }, ge = N(async () => {
183
+ const o = typeof DOMParser > "u" ? (await import("@xmldom/xmldom")).DOMParser : DOMParser, t = he(o);
184
+ return t.props = {
193
185
  raw: {
194
186
  type: String,
195
187
  required: !0
196
188
  }
197
- }, e;
198
- }), me = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
189
+ }, t;
190
+ }), pe = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
199
191
  <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.429"
200
192
  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">
193
+ </svg>`, me = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.5 23.5" fill="currentColor">
202
194
  <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
195
  </svg>`, fe = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
196
+ <path d="m19.5 8.25-7.5 7.5-7.5-7.5" />
197
+ </svg>`, we = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
206
198
  <path d="M15.75 19.5 8.25 12l7.5-7.5" />
207
199
  </svg>`, be = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
208
200
  <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">
201
+ </svg>`, _e = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" viewBox="0 0 24 24">
210
202
  <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">
203
+ </svg>`, xe = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 16 16">
204
+ <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
205
+ 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" />
206
+ </svg>`, ke = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
212
207
  <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">
208
+ </svg>`, Ce = `<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
209
+ <path
210
+ 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"
211
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
212
+ </svg>`, ye = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
214
213
  <path
215
214
  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">
215
+ </svg>`, Me = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9 9">
216
+ <g fill="none" fill-rule="evenodd" transform="translate(.67 .67)">
217
+ <rect transform="rotate(180 4 4)" />
218
+ <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width=".5"
219
+ d="M2.85 1.73h3.4v3.4m0-3.4L1.74 6.24" />
220
+ </g>
221
+ </svg>`, Le = `<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 1024 1024">
217
222
  <path
218
223
  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
224
+ </svg>`, ze = `<svg
220
225
  height="24"
221
226
  viewBox="0 0 24 24"
222
227
  width="24"
@@ -225,63 +230,117 @@ const z = (a, e) => {
225
230
  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
231
  fill="currentColor"
227
232
  stroke-width="1"></path>
228
- </svg>`, Se = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 593 593">
233
+ </svg>`, Se = `<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
234
+ <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"
235
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
236
+ <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"
237
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
238
+ <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"
239
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
240
+ <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"
241
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
242
+ <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"
243
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
244
+ <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"
245
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
246
+ <path
247
+ 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"
248
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
249
+ <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"
250
+ stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
251
+ <path
252
+ 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"
253
+ fill="currentColor" stroke="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="0"></path>
254
+ </svg>`, Be = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 593 593">
229
255
  <path fill="currentColor" fill-rule="evenodd"
230
256
  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">
257
+ </svg>`, Ae = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 662 662">
232
258
  <path fill-rule="evenodd" fill="currentColor"
233
259
  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">
260
+ </svg>`, Ve = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 620">
235
261
  <path fill="currentColor"
236
262
  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">
263
+ </svg>`, $e = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 642 642" fill="currentColor">
238
264
  <path
239
265
  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">
266
+ </svg>`, Te = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 620 620" fill="currentColor">
241
267
  <path
242
268
  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">
269
+ </svg>`, Ze = `<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 14 14">
244
270
  <path fill="none" stroke="currentColor" d="M14 3.4H0m14 7.2H0" />
271
+ </svg>`, De = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
272
+ <path fill="currentColor" fill-rule="evenodd"
273
+ 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"
274
+ clip-rule="evenodd"></path>
245
275
  </svg>`, Fe = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor">
246
276
  <path fill-rule="evenodd"
247
277
  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({
278
+ </svg>`, A = /* @__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": ze, "./LightMode.svg": Se, "./Logo.svg": Be, "./LogoAPI.svg": Ae, "./LogoClient.svg": Ve, "./LogoMarket.svg": $e, "./LogoSwagger.svg": Te, "./Menu.svg": Ze, "./PaperAirplane.svg": De, "./Search.svg": Fe }), je = (o) => {
279
+ const t = `./${o}.svg`;
280
+ return A[t] === void 0 ? (console.warn(`Could not find icon: ${o}`), "") : A[t];
281
+ }, I = /* @__PURE__ */ g({
252
282
  __name: "ScalarIcon",
253
283
  props: {
254
- name: {}
284
+ icon: {},
285
+ size: {}
255
286
  },
256
- setup(a) {
257
- const e = a, t = S(() => Te(e.name));
258
- return (n, o) => t.value ? (s(), w(l(he), {
287
+ setup(o) {
288
+ const t = o, e = m({
289
+ variants: {
290
+ size: {
291
+ xs: "h-3 w-3",
292
+ sm: "h-3.5 w-3.5",
293
+ md: "h-4 w-4",
294
+ lg: "h-5 w-5",
295
+ xl: "h-6 w-6",
296
+ full: "h-full w-full"
297
+ }
298
+ },
299
+ defaultVariants: {
300
+ size: "full"
301
+ }
302
+ }), n = $(() => je(t.icon));
303
+ return (i, p) => n.value ? (l(), C(a(ge), {
259
304
  key: 0,
260
- class: "flow-icon",
261
- height: "100%",
262
- raw: t.value,
263
- width: "100%"
264
- }, null, 8, ["raw"])) : m("", !0);
305
+ class: s(a(c)("scalar-icon", a(e)({ size: i.size }))),
306
+ raw: n.value
307
+ }, null, 8, ["class", "raw"])) : v("", !0);
265
308
  }
266
- }), Ve = /* @__PURE__ */ p({
309
+ }), Ie = ["ariaDisabled"], Pe = { class: "sr-only" }, He = /* @__PURE__ */ g({
267
310
  __name: "ScalarIconButton",
268
311
  props: {
269
312
  label: {},
270
313
  icon: {},
271
- variant: { default: "ghost" }
314
+ disabled: { type: Boolean },
315
+ variant: { default: "ghost" },
316
+ size: { default: "md" }
272
317
  },
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"]));
318
+ setup(o) {
319
+ const t = m({
320
+ base: "scalar-icon-button grid aspect-square cursor-pointer rounded",
321
+ variants: {
322
+ size: {
323
+ xs: "h-3.5 w-3.5 p-0.5",
324
+ sm: "h-5 w-5 p-1",
325
+ md: "h-10 w-10 p-3",
326
+ full: "h-full w-full"
327
+ },
328
+ disabled: {
329
+ true: "cursor-not-allowed shadow-none"
330
+ },
331
+ variant: j
332
+ }
333
+ });
334
+ return (e, n) => (l(), d("button", {
335
+ ariaDisabled: e.disabled || void 0,
336
+ class: s(a(c)(a(t)({ size: e.size, variant: e.variant, disabled: e.disabled }))),
337
+ type: "button"
338
+ }, [
339
+ k(a(I), { icon: e.icon }, null, 8, ["icon"]),
340
+ h("span", Pe, y(e.label), 1)
341
+ ], 10, Ie));
283
342
  }
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({
343
+ }), ot = () => V({
285
344
  open: !1,
286
345
  show() {
287
346
  this.open = !0;
@@ -289,7 +348,7 @@ const z = (a, e) => {
289
348
  hide() {
290
349
  this.open = !1;
291
350
  }
292
- }), Ie = /* @__PURE__ */ p({
351
+ }), Oe = /* @__PURE__ */ g({
293
352
  __name: "ScalarModal",
294
353
  props: {
295
354
  state: {},
@@ -299,8 +358,8 @@ const z = (a, e) => {
299
358
  size: { default: "md" },
300
359
  variant: {}
301
360
  },
302
- setup(a) {
303
- const e = B({
361
+ setup(o) {
362
+ const t = m({
304
363
  base: [
305
364
  "scalar-modal",
306
365
  "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,51 +377,59 @@ const z = (a, e) => {
318
377
  }
319
378
  }
320
379
  });
321
- return (t, n) => (s(), w(l(Q), {
322
- open: t.state.open,
323
- onClose: n[0] || (n[0] = (o) => t.state.hide())
380
+ return (e, n) => (l(), C(a(Q), {
381
+ open: e.state.open,
382
+ onClose: n[0] || (n[0] = (i) => e.state.hide())
324
383
  }, {
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 })
384
+ default: _(() => [
385
+ h("div", {
386
+ class: s(
387
+ a(c)(
388
+ "scalar-modal-layout fixed left-0 top-0",
389
+ "z-[1001] h-[100dvh] w-[100dvw]",
390
+ "bg-backdrop p-5 opacity-0"
391
+ )
392
+ )
393
+ }, [
394
+ k(a(X), {
395
+ class: s(a(t)({ size: e.size, variant: e.variant })),
396
+ style: D({ maxWidth: e.maxWidth })
330
397
  }, {
331
- default: f(() => [
332
- t.title ? (s(), w(l(Y), {
398
+ default: _(() => [
399
+ e.title ? (l(), C(a(Y), {
333
400
  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" }])
401
+ class: s(["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
402
  }, {
336
- default: f(() => [
337
- E(C(t.title), 1)
403
+ default: _(() => [
404
+ R(y(e.title), 1)
338
405
  ]),
339
406
  _: 1
340
- }, 8, ["class"])) : m("", !0),
341
- y(l(ee), {
342
- 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"
407
+ }, 8, ["class"])) : v("", !0),
408
+ k(a(ee), {
409
+ class: s([
410
+ "scalar-modal-body relative max-h-[calc(100dvh-240px)] overflow-y-auto rounded-lg bg-back-1 px-6 pb-4 pt-6",
411
+ a(c)(
412
+ e.bodyClass,
413
+ e.variant === "history" && "pt-3",
414
+ e.variant === "search" && "col max-h-[440px] overflow-hidden p-0"
348
415
  )
349
416
  ])
350
417
  }, {
351
- default: f(() => [
352
- x(t.$slots, "default", {}, void 0, !0)
418
+ default: _(() => [
419
+ x(e.$slots, "default", {}, void 0, !0)
353
420
  ]),
354
421
  _: 3
355
422
  }, 8, ["class"])
356
423
  ]),
357
424
  _: 3
358
425
  }, 8, ["class", "style"])
359
- ])
426
+ ], 2)
360
427
  ]),
361
428
  _: 3
362
429
  }, 8, ["open"]));
363
430
  }
364
431
  });
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({
432
+ const Ee = /* @__PURE__ */ z(Oe, [["__scopeId", "data-v-bc6a9e27"]]), Ne = { class: "scalar-input-container relative" }, We = ["for"], Re = { class: "icon-slot cursor-pointer text-ghost hover:text-fore-1 !empty:flex !empty:w-7 !empty:items-center !empty:pr-3" }, Ke = /* @__PURE__ */ g({
366
433
  __name: "ScalarTextField",
367
434
  props: {
368
435
  modelValue: {},
@@ -378,48 +445,48 @@ const De = /* @__PURE__ */ z(Ie, [["__scopeId", "data-v-4ee157b1"]]), Oe = { cla
378
445
  disableTrim: { type: Boolean, default: !1 }
379
446
  },
380
447
  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",
448
+ setup(o, { emit: t }) {
449
+ const e = o, n = m({
450
+ base: "scalar-input-wrapper relative flex items-center rounded border border-solid border-border",
384
451
  variants: {
385
452
  focus: {
386
453
  true: "scalar-input-wrapper-focus border-fore-3 has-actv-btn:border has-actv-btn:border-border"
387
454
  },
388
455
  error: { true: "scalar-input-wrapper-error border-error" }
389
456
  }
390
- }), o = R(), d = o.id || `id-${ae()}`, v = L(), h = L(!1);
391
- let _;
392
- if (t.isMultiline) {
457
+ }), i = T(), p = i.id || `id-${oe()}`, f = B(), w = B(!1);
458
+ let b;
459
+ if (e.isMultiline) {
393
460
  const { triggerResize: r } = te({
394
- element: v,
395
- input: t.modelValue
461
+ element: f,
462
+ input: e.modelValue
396
463
  });
397
- _ = r;
464
+ b = r;
398
465
  }
399
- function O(r) {
400
- const c = r.target.value;
401
- t.isMultiline && _(), t.handleFieldChange ? t.handleFieldChange(c) : e("update:modelValue", c);
466
+ function P(r) {
467
+ const u = r.target.value;
468
+ e.isMultiline && b(), e.handleFieldChange ? e.handleFieldChange(u) : t("update:modelValue", u);
402
469
  }
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);
470
+ function S(r) {
471
+ const u = r.target, M = e.disableTrim || e.isMultiline ? u.value : u.value.trim();
472
+ e.handleFieldSubmit ? e.handleFieldSubmit(M) : t("submit", M);
406
473
  }
407
- function A(r) {
408
- h.value = !1, t.emitOnBlur && t.modelValue && M(r);
474
+ function H(r) {
475
+ w.value = !1, e.emitOnBlur && e.modelValue && S(r);
409
476
  }
410
- return N(() => {
477
+ return K(() => {
411
478
  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 }))
479
+ Object.prototype.hasOwnProperty.call(i, "autofocus") && ((r = f.value) == null || r.focus());
480
+ }), (r, u) => (l(), d("div", Ne, [
481
+ h("div", {
482
+ class: s(a(n)({ error: r.error, focus: w.value }))
416
483
  }, [
417
- (s(), w(K(r.isMultiline ? "textarea" : "input"), U({ id: l(d) }, r.$attrs, {
484
+ (l(), C(U(r.isMultiline ? "textarea" : "input"), Z({ id: a(p) }, r.$attrs, {
418
485
  ref_key: "input",
419
- ref: v,
486
+ ref: f,
420
487
  class: [
421
488
  "scalar-input",
422
- l(g)(
489
+ a(c)(
423
490
  { "min-h-[77px]": r.isMultiline },
424
491
  "z-10 w-full resize-none appearance-none border-0 bg-transparent p-3 text-sm text-fore-1",
425
492
  "outline-none transition-opacity"
@@ -427,43 +494,43 @@ const De = /* @__PURE__ */ z(Ie, [["__scopeId", "data-v-4ee157b1"]]), Oe = { cla
427
494
  ],
428
495
  placeholder: r.placeholder,
429
496
  value: r.modelValue,
430
- onBlur: A,
431
- onFocus: c[0] || (c[0] = (k) => h.value = !0),
432
- onInput: O,
433
- onKeyup: q(M, ["enter"])
497
+ onBlur: H,
498
+ onFocus: u[0] || (u[0] = (M) => w.value = !0),
499
+ onInput: P,
500
+ onKeyup: q(S, ["enter"])
434
501
  }), null, 16, ["id", "class", "placeholder", "value", "onKeyup"])),
435
- r.label ? (s(), u("label", {
502
+ r.label ? (l(), d("label", {
436
503
  key: 0,
437
- class: i(
438
- l(g)(
504
+ class: s(
505
+ a(c)(
439
506
  "scalar-input-label pointer-events-none absolute left-0 top-0 mx-2 my-3 px-1 text-xs",
440
507
  "shadow-current z-10 origin-top-left rounded text-fore-3 transition-transform"
441
508
  )
442
509
  ),
443
- for: l(d),
444
- style: V({
510
+ for: a(p),
511
+ style: D({
445
512
  "box-shadow": `0 0 4px 4px ${r.labelShadowColor}`,
446
513
  "background-color": r.labelShadowColor
447
514
  })
448
- }, C(r.label), 15, Ae)) : m("", !0),
449
- b("div", je, [
515
+ }, y(r.label), 15, We)) : v("", !0),
516
+ h("div", Re, [
450
517
  x(r.$slots, "default", {}, void 0, !0)
451
518
  ])
452
519
  ], 2),
453
- b("span", {
454
- class: i(
455
- l(g)(
520
+ h("span", {
521
+ class: s(
522
+ a(c)(
456
523
  "helper-text mt-1.5 flex items-center text-xs text-error before:rounded-full before:font-black",
457
524
  "before:mr-1.5 before:block before:h-4 before:w-4 before:text-center before:text-xxs before:leading-4",
458
525
  "before:bg-error before:text-white before:content-['!'] empty:hidden"
459
526
  )
460
527
  )
461
- }, C(r.helperText), 3)
528
+ }, y(r.helperText), 3)
462
529
  ]));
463
530
  }
464
531
  });
465
- const Pe = /* @__PURE__ */ z(He, [["__scopeId", "data-v-8e18f760"]]);
466
- const Je = {
532
+ const Ue = /* @__PURE__ */ z(Ke, [["__scopeId", "data-v-c047336e"]]);
533
+ const rt = {
467
534
  boxShadow: {
468
535
  DEFAULT: "var(--theme-shadow-1, var(--default-theme-shadow-1))",
469
536
  md: "var(--theme-shadow-2, var(--default-theme-shadow-2))",
@@ -495,7 +562,7 @@ const Je = {
495
562
  ghost: "var(--theme-color-ghost, var(--default-theme-color-ghost))",
496
563
  transparent: "transparent"
497
564
  }
498
- }, Qe = {
565
+ }, at = {
499
566
  borderRadius: {
500
567
  DEFAULT: "var(--theme-radius, var(--default-theme-radius))",
501
568
  md: "var(--theme-radius, var(--default-theme-radius))",
@@ -519,21 +586,21 @@ const Je = {
519
586
  "screen-md": "640px",
520
587
  "screen-lg": "800px"
521
588
  }
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);
589
+ }, nt = {
590
+ install: (o) => {
591
+ o.component("ScalarButton", ue), o.component("ScalarIcon", I), o.component("ScalarIconButton", He), o.component("ScalarLoading", F), o.component("ScalarModal", Ee), o.component("ScalarTextField", Ue);
525
592
  }
526
593
  };
527
594
  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
595
+ ue as ScalarButton,
596
+ I as ScalarIcon,
597
+ He as ScalarIconButton,
598
+ F as ScalarLoading,
599
+ Ee as ScalarModal,
600
+ Ue as ScalarTextField,
601
+ nt as default,
602
+ at as extend,
603
+ rt as theme,
604
+ tt as useLoadingState,
605
+ ot as useModal
539
606
  };