@deck9/ui 0.17.0-next.1 → 0.17.0-next.2

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.
package/dist/src/ui.mjs CHANGED
@@ -1,167 +1,41 @@
1
- import { defineComponent as v, computed as w, openBlock as o, createBlock as k, unref as d, mergeProps as T, createCommentVNode as m, createElementBlock as u, normalizeClass as b, createElementVNode as c, toDisplayString as C, createVNode as y, ref as D, watch as I, Fragment as E, withDirectives as te, vModelText as le, normalizeStyle as G, withCtx as h, renderSlot as U, Teleport as se, Transition as O, normalizeProps as oe, guardReactiveProps as ne, resolveDynamicComponent as re, onMounted as ie, renderList as Z } from "vue";
2
- import { FontAwesomeIcon as de } from "@fortawesome/vue-fontawesome";
3
- import { library as F } from "@fortawesome/fontawesome-svg-core";
4
- import * as e from "@fortawesome/free-solid-svg-icons";
5
- import * as B from "@fortawesome/free-brands-svg-icons";
6
- import { v4 as Q } from "uuid";
7
- import { useEyeDropper as ue } from "@vueuse/core";
8
- import { Menu as ce, MenuButton as fe, MenuItems as me, MenuItem as pe, Listbox as be, ListboxButton as ge, ListboxOptions as ye, ListboxOption as he, Switch as ke } from "@headlessui/vue";
9
- import { useFloating as ve, autoUpdate as _e, offset as xe, flip as Ce, shift as we } from "@floating-ui/vue";
10
- var q = "fas", W = "numeric-input", J = 512, K = 512, A = [], X = "", Y = "m409.445 111 2.112.004c34.066.146 46.74 3.848 59.517 10.681 13.037 6.973 23.268 17.204 30.24 30.241l.415.782c6.705 12.782 10.271 25.9 10.271 60.847v72.002c-.15 34.066-3.852 46.74-10.685 59.517-6.973 13.037-17.204 23.268-30.241 30.24l-.782.415C457.51 382.434 444.392 386 409.445 386h-306.89l-2.112-.004c-34.066-.146-46.74-3.848-59.517-10.681-13.037-6.973-23.268-17.204-30.24-30.241l-.415-.782C3.566 331.51 0 318.392 0 283.445v-69.89c0-35.66 3.713-48.592 10.685-61.629 6.973-13.037 17.204-23.268 30.241-30.24l.782-.415C54.49 114.566 67.608 111 102.555 111h306.89Zm.806 36H102.555l-2.387.005c-22.69.089-31.789 1.488-39.667 5.128l-.523.246c-.696.332-1.385.683-2.074 1.052-6.764 3.617-11.856 8.71-15.473 15.473l-.282.533c-4.492 8.62-6.116 17.401-6.148 43.312v71.502l.012 3.09c.161 24.044 1.9 32.308 6.418 40.755 3.617 6.764 8.71 11.856 15.473 15.473l.533.282c8.62 4.492 17.401 6.116 43.312 6.149h307.696c27.078 0 35.763-1.677 44.651-6.43 6.764-3.618 11.856-8.71 15.473-15.474l.282-.533c4.492-8.62 6.116-17.401 6.149-43.312v-70.696c0-27.078-1.677-35.763-6.43-44.651-3.618-6.764-8.71-11.856-15.474-15.473l-.533-.282c-8.62-4.492-17.401-6.116-43.312-6.149Zm-164.715 19c11.682 0 22.013 1.976 30.994 5.929 8.98 3.952 16.005 9.38 21.074 16.284 5.07 6.904 7.578 14.797 7.527 23.677.103 8.829-2.92 16.066-9.07 21.713-6.15 5.646-13.935 8.983-23.353 10.01v1.231c12.764 1.386 22.362 5.274 28.794 11.665 6.433 6.39 9.598 14.411 9.496 24.061.051 9.24-2.715 17.427-8.299 24.562-5.584 7.135-13.33 12.73-23.236 16.785-9.907 4.055-21.319 6.083-34.236 6.083-12.454 0-23.506-2.143-33.156-6.43-9.65-4.285-17.227-10.201-22.734-17.747-5.506-7.545-8.286-16.22-8.337-26.025h43.23c.051 3.029.99 5.737 2.817 8.124 1.827 2.386 4.336 4.247 7.527 5.582 3.19 1.334 6.845 2.002 10.962 2.002 3.962 0 7.462-.706 10.498-2.118 3.037-1.411 5.404-3.375 7.102-5.89 1.699-2.515 2.522-5.39 2.47-8.623.052-3.183-.913-6.006-2.894-8.47-1.982-2.464-4.748-4.389-8.299-5.775-3.55-1.386-7.642-2.079-12.274-2.079h-16.057v-29.566h16.057c4.271 0 8.041-.693 11.31-2.08 3.267-1.385 5.815-3.31 7.642-5.774s2.714-5.287 2.663-8.47c.051-3.08-.695-5.8-2.239-8.161-1.544-2.361-3.692-4.21-6.446-5.544-2.753-1.334-5.93-2.002-9.533-2.002-3.912 0-7.398.693-10.46 2.08-3.063 1.385-5.468 3.31-7.218 5.774s-2.65 5.287-2.702 8.47h-41.068c.051-9.65 2.715-18.172 7.99-25.563 5.275-7.392 12.518-13.192 21.73-17.401 9.212-4.21 19.788-6.314 31.728-6.314Zm-133.074 0c12.615 0 23.55 2.017 32.807 6.05 9.257 4.033 16.41 9.698 21.462 16.994 5.051 7.296 7.577 15.851 7.577 25.665 0 6.063-1.257 12.087-3.77 18.073-2.512 5.986-7.025 12.601-13.538 19.846-6.513 7.245-15.77 15.877-27.77 25.896l-14.768 12.331v.925H176V326H55.077v-30.829l58.77-48.709c3.897-3.237 7.243-6.28 10.038-9.133 2.794-2.851 4.948-5.793 6.461-8.824 1.513-3.032 2.27-6.397 2.27-10.097 0-4.059-.86-7.527-2.578-10.404-1.717-2.877-4.09-5.1-7.115-6.667-3.026-1.567-6.513-2.35-10.461-2.35-3.95 0-7.424.796-10.424 2.389-3 1.593-5.32 3.93-6.961 7.013-1.641 3.083-2.462 6.834-2.462 11.253H52c0-11.099 2.487-20.655 7.462-28.67 4.974-8.016 12-14.182 21.076-18.498 9.077-4.316 19.718-6.474 31.924-6.474Z";
11
- const j = {
12
- prefix: q,
13
- iconName: W,
14
- icon: [J, K, A, X, Y]
15
- }, $e = {
16
- definition: j,
17
- faAlignJustify: j,
18
- prefix: q,
19
- iconName: W,
20
- width: J,
21
- height: K,
22
- ligatures: A,
23
- unicode: X,
24
- svgPathData: Y,
25
- aliases: A
26
- };
27
- F.add(
28
- e.faAlignCenter,
29
- e.faAlignLeft,
30
- e.faAlignRight,
31
- e.faArrowRight,
32
- e.faArrowUp19,
33
- e.faAsterisk,
34
- e.faAt,
35
- e.faBold,
36
- e.faBolt,
37
- e.faCalendar,
38
- e.faChartPie,
39
- e.faCheck,
40
- e.faCheckCircle,
41
- e.faChevronDown,
42
- e.faChevronLeft,
43
- e.faChevronRight,
44
- e.faChevronUp,
45
- e.faCircleCheck,
46
- e.faCircleNodes,
47
- e.faCircleNotch,
48
- e.faClipboard,
49
- e.faCloudDownload,
50
- e.faCloudUpload,
51
- e.faCode,
52
- e.faCodeBranch,
53
- e.faCodeFork,
54
- e.faCog,
55
- e.faCompass,
56
- e.faCrown,
57
- e.faDiagramProject,
58
- e.faDoorOpen,
59
- e.faDotCircle,
60
- e.faEllipsis,
61
- e.faEllipsisVertical,
62
- e.faEnvelope,
63
- e.faExclamationTriangle,
64
- e.faExternalLink,
65
- e.faEye,
66
- e.faEyeDropper,
67
- e.faEyeSlash,
68
- e.faFileLines,
69
- e.faFilePdf,
70
- e.faFileUpload,
71
- e.faFileVideo,
72
- e.faFileWaveform,
73
- e.faFilter,
74
- e.faFilter,
75
- e.faFingerprint,
76
- e.faFont,
77
- e.faGears,
78
- e.faGlobe,
79
- e.faGripHorizontal,
80
- e.faGripVertical,
81
- e.faHandPointRight,
82
- e.faHandPointRight,
83
- e.faHashtag,
84
- e.faHeading,
85
- e.faHeart,
86
- e.faImage,
87
- e.faInfoCircle,
88
- e.faItalic,
89
- e.faLayerGroup,
90
- e.faLink,
91
- e.faLinkSlash,
92
- e.faList,
93
- e.faListOl,
94
- e.faListUl,
95
- e.faLocationArrow,
96
- e.faLocationCrosshairs,
97
- e.faLock,
98
- e.faLockOpen,
99
- e.faMedal,
100
- e.faMessage,
101
- e.faMicrochip,
102
- e.faPencilAlt,
103
- e.faPenToSquare,
104
- e.faPhone,
105
- e.faPlayCircle,
106
- e.faPlus,
107
- e.faPlusCircle,
108
- e.faPoo,
109
- e.faPuzzlePiece,
110
- e.faQuestion,
111
- e.faQuoteLeft,
112
- e.faQuoteRight,
113
- e.faReply,
114
- e.faReplyAll,
115
- e.faRightLong,
116
- e.faRobot,
117
- e.faSave,
118
- e.faShield,
119
- e.faSignal,
120
- e.faSignature,
121
- e.faSignature,
122
- e.faSquareCheck,
123
- e.faStar,
124
- e.faStrikethrough,
125
- e.faTerminal,
126
- e.faTextSlash,
127
- e.faTimes,
128
- e.faTrash,
129
- e.faTree,
130
- e.faTrophy,
131
- e.faTurnDown,
132
- e.faUnderline,
133
- e.faUpload,
134
- e.faUser,
135
- e.faUserShield,
136
- e.faWandMagicSparkles,
137
- // Brands
138
- B.faTwitter,
139
- B.faInstagram,
140
- B.faGithub,
141
- B.faLinkedin,
142
- B.faFacebook,
143
- // Custom
144
- $e.definition
145
- );
146
- const Le = [...Object.keys(F.definitions.fas)].sort(), N = [...Object.keys(F.definitions.fab)].sort(), x = /* @__PURE__ */ v({
1
+ import { defineComponent as x, computed as D, openBlock as a, createBlock as C, unref as d, mergeProps as P, createCommentVNode as m, createElementBlock as i, normalizeClass as b, createElementVNode as c, toDisplayString as g, createVNode as k, ref as z, watch as I, Fragment as E, withDirectives as J, vModelText as Q, normalizeStyle as F, withCtx as _, renderSlot as T, Teleport as W, Transition as O, Comment as X, normalizeProps as Y, guardReactiveProps as Z, resolveDynamicComponent as ee, onMounted as R, createTextVNode as j, renderList as G, onUnmounted as te } from "vue";
2
+ import { library as se, findIconDefinition as U } from "@fortawesome/fontawesome-svg-core";
3
+ import { FontAwesomeIcon as le } from "@fortawesome/vue-fontawesome";
4
+ import { faCheck as oe, faChevronDown as ae, faCircleNotch as ne, faEllipsis as re, faEyeDropper as ie } from "@fortawesome/free-solid-svg-icons";
5
+ import { v4 as H } from "uuid";
6
+ import { useEyeDropper as de } from "@vueuse/core";
7
+ import { Menu as ue, MenuButton as ce, MenuItems as fe, MenuItem as me, Listbox as pe, ListboxButton as be, ListboxOptions as ge, ListboxOption as ye, Switch as he } from "@headlessui/vue";
8
+ import { useFloating as ke, autoUpdate as ve, offset as _e, flip as xe, shift as $e } from "@floating-ui/vue";
9
+ const K = [
10
+ oe,
11
+ ae,
12
+ ne,
13
+ re,
14
+ ie
15
+ ];
16
+ se.add(...K);
17
+ const yt = K.map(({ iconName: s }) => s), ht = [], w = /* @__PURE__ */ x({
147
18
  __name: "Icon",
148
19
  props: {
149
20
  name: { default: "user" }
150
21
  },
151
22
  setup(s) {
152
- const a = s, r = w(() => N.includes(a.name) ? "fab" : "fas"), l = w(() => Le.includes(a.name) || N.includes(a.name) ? !0 : (console.warn(
153
- "could not load icon, because it is not available",
154
- a.name
155
- ), !1));
156
- return (t, i) => l.value ? (o(), k(d(de), T({
23
+ const n = s, e = D(() => {
24
+ const t = n.name, l = U({ prefix: "fab", iconName: t }) ?? U({ prefix: "fas", iconName: t });
25
+ return l || console.warn(
26
+ "could not load icon, because it is not available",
27
+ n.name
28
+ ), l;
29
+ });
30
+ return (t, l) => e.value ? (a(), C(d(le), P({
157
31
  key: 0,
158
- icon: [r.value, t.name]
32
+ icon: e.value
159
33
  }, t.$attrs), null, 16, ["icon"])) : m("", !0);
160
34
  }
161
- }), De = ["aria-label", "disabled", "aria-busy"], Ve = {
35
+ }), we = ["aria-label", "disabled", "aria-disabled", "aria-busy"], Ce = {
162
36
  key: 0,
163
37
  class: "absolute inset-0 flex items-center justify-center"
164
- }, ya = /* @__PURE__ */ v({
38
+ }, kt = /* @__PURE__ */ x({
165
39
  __name: "Button",
166
40
  props: {
167
41
  label: {},
@@ -172,135 +46,146 @@ const Le = [...Object.keys(F.definitions.fas)].sort(), N = [...Object.keys(F.def
172
46
  icon: {},
173
47
  iconPosition: { default: "right" }
174
48
  },
175
- setup(s) {
176
- const a = s, r = w(() => {
177
- const t = {
178
- "text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": a.color === "primary",
179
- "text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": a.color === "light",
180
- "text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": a.color === "dark",
181
- "text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": a.color === "danger"
182
- }, i = {
183
- "pointer-events-none opacity-75 cursor-not-allowed": a.isDisabled
184
- }, f = {
185
- "px-4 py-1 text-xs leading-5 mono-100 rounded-lg": a.size === "small",
186
- "px-5 py-2 text-sm leading-4 font-medium rounded-lg": a.size === "medium",
187
- "px-8 py-3 text-base leading-6 font-medium rounded-lg": a.size === "large"
49
+ emits: ["click"],
50
+ setup(s, { emit: n }) {
51
+ const e = s, t = n, l = D(() => {
52
+ const o = {
53
+ "text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": e.color === "primary",
54
+ "text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": e.color === "light",
55
+ "text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": e.color === "dark",
56
+ "text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": e.color === "danger"
57
+ }, p = {
58
+ "pointer-events-none opacity-75 cursor-not-allowed": e.isDisabled,
59
+ "cursor-default": e.isLoading
60
+ }, y = {
61
+ "px-4 py-1 text-xs leading-5 mono-100 rounded-lg": e.size === "small",
62
+ "px-5 py-2 text-sm leading-4 font-medium rounded-lg": e.size === "medium",
63
+ "px-8 py-3 text-base leading-6 font-medium rounded-lg": e.size === "large"
188
64
  };
189
65
  return {
190
- ...t,
191
- ...i,
192
- ...f
66
+ ...o,
67
+ ...p,
68
+ ...y
193
69
  };
194
- }), l = w(() => {
195
- const t = {
196
- "mr-2 -ml-1": ["small", "medium"].includes(a.size) && a.iconPosition === "left",
197
- "mr-4 -ml-2": ["large"].includes(a.size) && a.iconPosition === "left"
198
- }, i = {
199
- "ml-3 -mr-1": ["small", "medium"].includes(a.size) && a.iconPosition === "right",
200
- "ml-3 -mr-3": ["large"].includes(a.size) && a.iconPosition === "right"
201
- }, f = {
202
- "text-white": a.color === "primary",
203
- "text-blue-600": a.color === "light",
204
- "text-grey-50": a.color === "dark"
70
+ }), u = D(() => {
71
+ const o = {
72
+ "mr-2 -ml-1": ["small", "medium"].includes(e.size) && e.iconPosition === "left",
73
+ "mr-4 -ml-2": ["large"].includes(e.size) && e.iconPosition === "left"
74
+ }, p = {
75
+ "ml-3 -mr-1": ["small", "medium"].includes(e.size) && e.iconPosition === "right",
76
+ "ml-3 -mr-3": ["large"].includes(e.size) && e.iconPosition === "right"
77
+ }, y = {
78
+ "text-white": e.color === "primary",
79
+ "text-blue-600": e.color === "light",
80
+ "text-grey-50": e.color === "dark"
205
81
  };
206
82
  return {
207
- ...t,
208
- ...i,
209
- ...f
83
+ ...o,
84
+ ...p,
85
+ ...y
210
86
  };
211
87
  });
212
- return (t, i) => (o(), u("button", {
213
- class: b(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", r.value]),
88
+ function v(o) {
89
+ if (e.isLoading) {
90
+ o.preventDefault();
91
+ return;
92
+ }
93
+ t("click", o);
94
+ }
95
+ return (o, p) => (a(), i("button", {
96
+ class: b(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", l.value]),
214
97
  type: "button",
215
- "aria-label": t.label,
216
- disabled: t.isDisabled || t.isLoading,
217
- "aria-busy": t.isLoading
98
+ "aria-label": o.label,
99
+ disabled: o.isDisabled,
100
+ "aria-disabled": o.isLoading || void 0,
101
+ "aria-busy": o.isLoading,
102
+ onClick: v
218
103
  }, [
219
104
  c("div", {
220
- class: b(!t.isLoading || "invisible")
105
+ class: b(!o.isLoading || "invisible")
221
106
  }, [
222
- t.icon && t.iconPosition === "left" ? (o(), k(x, {
107
+ o.icon && o.iconPosition === "left" ? (a(), C(w, {
223
108
  key: 0,
224
- name: t.icon,
225
- class: b(l.value)
109
+ name: o.icon,
110
+ class: b(u.value)
226
111
  }, null, 8, ["name", "class"])) : m("", !0),
227
- c("span", null, C(t.label), 1),
228
- t.icon && t.iconPosition === "right" ? (o(), k(x, {
112
+ c("span", null, g(o.label), 1),
113
+ o.icon && o.iconPosition === "right" ? (a(), C(w, {
229
114
  key: 1,
230
- name: t.icon,
231
- class: b(l.value)
115
+ name: o.icon,
116
+ class: b(u.value)
232
117
  }, null, 8, ["name", "class"])) : m("", !0)
233
118
  ], 2),
234
- t.isLoading ? (o(), u("span", Ve, [
235
- y(x, {
119
+ o.isLoading ? (a(), i("span", Ce, [
120
+ k(w, {
236
121
  class: "animate-spin",
237
122
  name: "circle-notch"
238
123
  })
239
124
  ])) : m("", !0)
240
- ], 10, De));
125
+ ], 10, we));
241
126
  }
242
- }), Se = { class: "relative flex items-start" }, ze = ["checked", "id"], Pe = { class: "ml-2 text-sm leading-5 peer-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:[&>label]:cursor-not-allowed" }, Be = ["for"], Me = {
127
+ }), Ve = { class: "relative flex items-start" }, De = ["checked", "id"], ze = { class: "ml-2 text-sm leading-5 peer-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:[&>label]:cursor-not-allowed" }, Be = ["for"], Le = {
243
128
  key: 0,
244
129
  class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
245
- }, Ie = {
130
+ }, Se = {
246
131
  inheritAttrs: !1
247
- }, ha = /* @__PURE__ */ v({
248
- ...Ie,
132
+ }, vt = /* @__PURE__ */ x({
133
+ ...Se,
249
134
  __name: "Checkbox",
250
135
  props: {
251
- id: { default: () => Q() },
136
+ id: { default: () => H() },
252
137
  label: {},
253
138
  modelValue: { type: Boolean },
254
139
  description: {}
255
140
  },
256
141
  emits: ["update:modelValue"],
257
- setup(s, { emit: a }) {
258
- const r = a, l = (t) => {
259
- r("update:modelValue", t.target.checked);
142
+ setup(s, { emit: n }) {
143
+ const e = n, t = (l) => {
144
+ e("update:modelValue", l.target.checked);
260
145
  };
261
- return (t, i) => (o(), u("div", Se, [
262
- c("input", T({
146
+ return (l, u) => (a(), i("div", Ve, [
147
+ c("input", P({
263
148
  class: "peer mt-0.5 h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm disabled:opacity-50 disabled:cursor-not-allowed",
264
149
  type: "checkbox",
265
- checked: t.modelValue,
266
- onChange: l,
267
- id: t.id
268
- }, t.$attrs), null, 16, ze),
269
- c("div", Pe, [
150
+ checked: l.modelValue,
151
+ onChange: t,
152
+ id: l.id
153
+ }, l.$attrs), null, 16, De),
154
+ c("div", ze, [
270
155
  c("label", {
271
- for: t.id,
156
+ for: l.id,
272
157
  class: "font-medium text-grey-700 dark:text-grey-200 casual-25"
273
- }, C(t.label), 9, Be),
274
- t.description ? (o(), u("p", Me, C(t.description), 1)) : m("", !0)
158
+ }, g(l.label), 9, Be),
159
+ l.description ? (a(), i("p", Le, g(l.description), 1)) : m("", !0)
275
160
  ])
276
161
  ]));
277
162
  }
278
163
  });
279
- function H(s) {
280
- const a = w(() => ({
164
+ function A(s) {
165
+ const n = D(() => ({
281
166
  "pl-3 pr-10 py-2": !s.icon && s.type !== "color" && s.size === "small",
282
167
  "pl-4 pr-10 py-3": !s.icon && s.type !== "color" && s.size === "medium",
283
168
  "pl-6 pr-10 py-3": !s.icon && s.type !== "color" && s.size === "large",
284
169
  "pl-10 pr-10 py-1": (s.icon || s.type === "color") && s.size === "small",
285
170
  "pl-12 pr-10 py-3": (s.icon || s.type === "color") && (s.size === "medium" || s.size === "large"),
286
171
  "w-full block": s.block === !0
287
- })), r = w(() => ({
172
+ })), e = D(() => ({
288
173
  "pointer-events-none opacity-50 cursor-not-allowed": s.isDisabled
289
- })), l = w(() => ({
174
+ })), t = D(() => ({
290
175
  "text-xs leading-4": s.size === "small",
291
176
  "text-sm leading-4": s.size === "medium",
292
177
  "text-base leading-5": s.size === "large"
293
178
  }));
294
179
  return {
295
- inputClasses: a,
296
- disabledClasses: r,
297
- textSizeClasses: l
180
+ inputClasses: n,
181
+ disabledClasses: e,
182
+ textSizeClasses: t
298
183
  };
299
184
  }
300
- const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, Ee = ["disabled"], Fe = ["disabled"], He = {
185
+ const Pe = ["placeholder", "type", "min", "max", "disabled", "value"], Me = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, Ie = ["disabled"], Te = ["disabled"], Ee = {
301
186
  inheritAttrs: !1
302
- }, ka = /* @__PURE__ */ v({
303
- ...He,
187
+ }, _t = /* @__PURE__ */ x({
188
+ ...Ee,
304
189
  __name: "Input",
305
190
  props: {
306
191
  modelValue: {},
@@ -315,98 +200,98 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
315
200
  showColorPicker: { type: Boolean }
316
201
  },
317
202
  emits: ["update:modelValue"],
318
- setup(s, { expose: a, emit: r }) {
319
- const l = s, t = D(null), i = D(l.modelValue ?? ""), f = (n) => l.type === "number" && n !== "" && n !== null ? Number(n) : n;
203
+ setup(s, { expose: n, emit: e }) {
204
+ const t = s, l = z(null), u = z(t.modelValue ?? ""), v = (r) => t.type === "number" && r !== "" && r !== null ? Number(r) : r;
320
205
  I(
321
- () => l.modelValue,
322
- (n) => {
323
- typeof n < "u" && n !== f(i.value) && (i.value = n);
206
+ () => t.modelValue,
207
+ (r) => {
208
+ typeof r < "u" && r !== v(u.value) && (u.value = r);
324
209
  }
325
210
  );
326
- const $ = r, { inputClasses: V, disabledClasses: L, textSizeClasses: z } = H(l), _ = w(() => l.type === "color" ? "text" : l.type), {
327
- isSupported: p,
328
- open: R,
329
- sRGBHex: g
330
- } = ue(), M = () => {
331
- R();
211
+ const o = e, { inputClasses: p, disabledClasses: y, textSizeClasses: V } = A(t), $ = D(() => t.type === "color" ? "text" : t.type), {
212
+ isSupported: M,
213
+ open: f,
214
+ sRGBHex: N
215
+ } = de(), h = () => {
216
+ f();
332
217
  };
333
- I(g, (n) => {
334
- i.value = n, $("update:modelValue", n);
218
+ I(N, (r) => {
219
+ u.value = r, o("update:modelValue", r);
335
220
  });
336
- const P = function(n) {
337
- i.value = (n == null ? void 0 : n.target).value, $("update:modelValue", f(i.value));
338
- }, ee = function() {
339
- const n = f(i.value);
340
- if (typeof n != "number")
221
+ const B = function(r) {
222
+ u.value = (r == null ? void 0 : r.target).value, o("update:modelValue", v(u.value));
223
+ }, S = function() {
224
+ const r = v(u.value);
225
+ if (typeof r != "number")
341
226
  return;
342
- const S = Math.min(
343
- Math.max(n, l.min ?? -1 / 0),
344
- l.max ?? 1 / 0
227
+ const L = Math.min(
228
+ Math.max(r, t.min ?? -1 / 0),
229
+ t.max ?? 1 / 0
345
230
  );
346
- S !== n && (i.value = S, $("update:modelValue", S));
231
+ L !== r && (u.value = L, o("update:modelValue", L));
347
232
  };
348
- return a({
233
+ return n({
349
234
  focus: () => {
350
- var n;
351
- l.isDisabled || (n = t.value) == null || n.focus();
235
+ var r;
236
+ t.isDisabled || (r = l.value) == null || r.focus();
352
237
  }
353
- }), (n, S) => (o(), u("div", {
354
- class: b(["relative", [n.block ? "w-full block" : "inline-block"]])
238
+ }), (r, L) => (a(), i("div", {
239
+ class: b(["relative", [r.block ? "w-full block" : "inline-block"]])
355
240
  }, [
356
- c("input", T({
357
- class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [d(V), d(z), d(L)]],
358
- placeholder: n.placeholder,
359
- type: _.value,
360
- min: n.min,
361
- max: n.max,
362
- disabled: n.isDisabled,
363
- value: i.value
364
- }, n.$attrs, {
241
+ c("input", P({
242
+ class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [d(p), d(V), d(y)]],
243
+ placeholder: r.placeholder,
244
+ type: $.value,
245
+ min: r.min,
246
+ max: r.max,
247
+ disabled: r.isDisabled,
248
+ value: u.value
249
+ }, r.$attrs, {
365
250
  ref_key: "inputElement",
366
- ref: t,
367
- onInput: P,
368
- onChange: ee
369
- }), null, 16, Te),
370
- n.type === "color" ? (o(), u(E, { key: 0 }, [
371
- c("label", Ae, [
372
- te(c("input", {
251
+ ref: l,
252
+ onInput: B,
253
+ onChange: S
254
+ }), null, 16, Pe),
255
+ r.type === "color" ? (a(), i(E, { key: 0 }, [
256
+ c("label", Me, [
257
+ J(c("input", {
373
258
  class: "invisible",
374
259
  type: "color",
375
- disabled: n.isDisabled,
376
- "onUpdate:modelValue": S[0] || (S[0] = (ae) => i.value = ae),
377
- onInput: P
378
- }, null, 40, Ee), [
379
- [le, i.value]
260
+ disabled: r.isDisabled,
261
+ "onUpdate:modelValue": L[0] || (L[0] = (q) => u.value = q),
262
+ onInput: B
263
+ }, null, 40, Ie), [
264
+ [Q, u.value]
380
265
  ]),
381
266
  c("span", {
382
267
  class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
383
- style: G(`background-color: ${i.value}`)
268
+ style: F(`background-color: ${u.value}`)
384
269
  }, null, 4)
385
270
  ]),
386
- d(p) && n.showColorPicker ? (o(), u("button", {
271
+ d(M) && r.showColorPicker ? (a(), i("button", {
387
272
  key: 0,
388
273
  type: "button",
389
274
  class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
390
- disabled: n.isDisabled,
391
- onClick: M
275
+ disabled: r.isDisabled,
276
+ onClick: h
392
277
  }, [
393
- y(x, {
278
+ k(w, {
394
279
  size: "xs",
395
280
  name: "eyedropper"
396
281
  })
397
- ], 8, Fe)) : m("", !0)
398
- ], 64)) : n.icon ? (o(), u("span", {
282
+ ], 8, Te)) : m("", !0)
283
+ ], 64)) : r.icon ? (a(), i("span", {
399
284
  key: 1,
400
- class: b(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", d(z)])
285
+ class: b(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", d(V)])
401
286
  }, [
402
- y(x, { name: n.icon }, null, 8, ["name"])
287
+ k(w, { name: r.icon }, null, 8, ["name"])
403
288
  ], 2)) : m("", !0)
404
289
  ], 2));
405
290
  }
406
- }), Re = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, Ue = ["id", "for"], je = {
291
+ }), Ae = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, Ne = ["id", "for"], je = {
407
292
  key: 0,
408
293
  class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
409
- }, va = /* @__PURE__ */ v({
294
+ }, xt = /* @__PURE__ */ x({
410
295
  __name: "Label",
411
296
  props: {
412
297
  id: {},
@@ -414,57 +299,67 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
414
299
  description: {}
415
300
  },
416
301
  setup(s) {
417
- return (a, r) => (o(), u("span", Re, [
302
+ return (n, e) => (a(), i("span", Ae, [
418
303
  c("label", {
419
- id: a.id ? `${a.id}-label` : void 0,
420
- for: a.id
421
- }, C(a.label), 9, Ue),
422
- a.description ? (o(), u("span", je, C(a.description), 1)) : m("", !0)
304
+ id: n.id ? `${n.id}-label` : void 0,
305
+ for: n.id
306
+ }, g(n.label), 9, Ne),
307
+ n.description ? (a(), i("span", je, g(n.description), 1)) : m("", !0)
423
308
  ]));
424
309
  }
425
- }), _a = /* @__PURE__ */ v({
310
+ }), Ue = {
311
+ key: 0,
312
+ class: "sr-only"
313
+ }, $t = /* @__PURE__ */ x({
426
314
  __name: "MenuContainer",
427
315
  props: {
428
316
  position: { default: "left" },
429
- usePortal: { type: [Boolean, String], default: !1 }
317
+ usePortal: { type: [Boolean, String], default: !1 },
318
+ label: { default: "Open menu" }
430
319
  },
431
320
  setup(s) {
432
- const a = s, r = D(null), l = D(null), t = a.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: i } = ve(r, l, {
433
- placement: t,
434
- whileElementsMounted: _e,
435
- middleware: [xe(6), Ce(), we({ padding: 6 })]
321
+ const n = s, e = (o = []) => o.some(
322
+ (p) => typeof p.children == "string" ? p.type !== X && p.children.trim() !== "" : Array.isArray(p.children) && e(p.children)
323
+ ), t = z(null), l = z(null), u = n.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: v } = ke(t, l, {
324
+ placement: u,
325
+ whileElementsMounted: ve,
326
+ middleware: [_e(6), xe(), $e({ padding: 6 })]
436
327
  });
437
- return (f, $) => (o(), k(d(ce), {
328
+ return (o, p) => (a(), C(d(ue), {
438
329
  as: "div",
439
330
  class: "inline-block text-left"
440
331
  }, {
441
- default: h(() => [
442
- y(d(fe), {
332
+ default: _(() => [
333
+ k(d(ce), {
443
334
  class: "focus:outline-none",
444
335
  ref_key: "reference",
445
- ref: r
336
+ ref: t
446
337
  }, {
447
- default: h(() => [
448
- U(f.$slots, "button", {}, () => [
449
- y(d(x), {
450
- class: "fill-current",
451
- name: "ellipsis-h"
452
- })
453
- ])
454
- ]),
338
+ default: _(() => {
339
+ var y, V;
340
+ return [
341
+ T(o.$slots, "button", {}, () => [
342
+ k(d(w), {
343
+ class: "fill-current",
344
+ name: "ellipsis-h"
345
+ })
346
+ ]),
347
+ e((V = (y = o.$slots).button) == null ? void 0 : V.call(y)) ? m("", !0) : (a(), i("span", Ue, g(o.label), 1))
348
+ ];
349
+ }),
455
350
  _: 3
456
351
  }, 512),
457
- (o(), k(se, {
458
- to: typeof f.usePortal == "string" ? f.usePortal : "body",
459
- disabled: !f.usePortal
352
+ (a(), C(W, {
353
+ to: typeof o.usePortal == "string" ? o.usePortal : "body",
354
+ disabled: !o.usePortal
460
355
  }, [
461
356
  c("div", {
462
357
  class: "w-56 z-20",
463
- style: G(d(i)),
358
+ style: F(d(v)),
464
359
  ref_key: "floating",
465
360
  ref: l
466
361
  }, [
467
- y(O, {
362
+ k(O, {
468
363
  "enter-active-class": "transition duration-200 ease-in-out",
469
364
  "enter-from-class": "transform -translate-y-4 opacity-0",
470
365
  "enter-to-class": "transform opacity-100",
@@ -472,14 +367,14 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
472
367
  "leave-from-class": "transform opacity-100",
473
368
  "leave-to-class": "transform -translate-y-2 opacity-0"
474
369
  }, {
475
- default: h(() => [
476
- y(d(me), {
370
+ default: _(() => [
371
+ k(d(fe), {
477
372
  class: b([
478
373
  "z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"
479
374
  ])
480
375
  }, {
481
- default: h(() => [
482
- U(f.$slots, "default")
376
+ default: _(() => [
377
+ T(o.$slots, "default")
483
378
  ]),
484
379
  _: 3
485
380
  })
@@ -492,10 +387,10 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
492
387
  _: 3
493
388
  }));
494
389
  }
495
- }), Ne = {
390
+ }), Fe = {
496
391
  key: 0,
497
392
  class: "bg-grey-300 px-2 rounded-lg max-w-[66px] truncate"
498
- }, xa = /* @__PURE__ */ v({
393
+ }, wt = /* @__PURE__ */ x({
499
394
  __name: "MenuLink",
500
395
  props: {
501
396
  label: {},
@@ -504,17 +399,17 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
504
399
  as: {}
505
400
  },
506
401
  setup(s) {
507
- return (a, r) => (o(), k(d(pe), oe(ne({ disabled: a.disabled })), {
508
- default: h(({ active: l }) => [
509
- (o(), k(re(a.as || "span"), {
402
+ return (n, e) => (a(), C(d(me), Y(Z({ disabled: n.disabled })), {
403
+ default: _(({ active: t }) => [
404
+ (a(), C(ee(n.as || "span"), {
510
405
  class: b(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
511
- l ? "bg-grey-200" : "",
512
- a.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
406
+ t ? "bg-grey-200" : "",
407
+ n.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
513
408
  ]])
514
409
  }, {
515
- default: h(() => [
516
- c("span", null, C(a.label), 1),
517
- a.meta ? (o(), u("span", Ne, C(a.meta), 1)) : m("", !0)
410
+ default: _(() => [
411
+ c("span", null, g(n.label), 1),
412
+ n.meta ? (a(), i("span", Fe, g(n.meta), 1)) : m("", !0)
518
413
  ]),
519
414
  _: 2
520
415
  }, 1032, ["class"]))
@@ -522,19 +417,19 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
522
417
  _: 1
523
418
  }, 16));
524
419
  }
525
- }), Ge = { class: "relative" }, Oe = {
420
+ }), Oe = { class: "relative" }, Re = {
526
421
  key: 0,
527
422
  class: "absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"
528
- }, Ze = {
423
+ }, Ge = {
529
424
  key: 1,
530
425
  class: "block truncate"
531
- }, Qe = ["innerHTML"], qe = {
426
+ }, He = {
532
427
  key: 2,
533
428
  class: "text-grey-500 truncate"
534
- }, We = { class: "absolute right-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none" }, Je = { class: "absolute right-2 inset-y-0 flex items-center" }, Ke = {
429
+ }, Ke = { class: "absolute right-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none" }, qe = { class: "absolute right-2 inset-y-0 flex items-center" }, Je = {
535
430
  key: 0,
536
431
  class: "bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"
537
- }, Xe = ["innerHTML"], Ca = /* @__PURE__ */ v({
432
+ }, Ct = /* @__PURE__ */ x({
538
433
  __name: "Select",
539
434
  props: {
540
435
  id: {},
@@ -544,54 +439,60 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
544
439
  placeholder: {},
545
440
  isDisabled: { type: Boolean, default: !1 },
546
441
  options: {},
547
- disabledBadge: {}
442
+ disabledBadge: {},
443
+ by: {}
548
444
  },
549
445
  emits: ["update:modelValue"],
550
- setup(s, { emit: a }) {
551
- const r = s, l = D(r.modelValue ?? null), t = a, { inputClasses: i, disabledClasses: f, textSizeClasses: $ } = H(r), V = D(!1), L = () => {
552
- V.value = !!r.id && !!document.getElementById(`${r.id}-label`);
446
+ setup(s, { emit: n }) {
447
+ const e = s, t = z(e.modelValue ?? null), l = n, u = (f) => typeof e.by == "string" ? f[e.by] : f.id, { inputClasses: v, disabledClasses: o, textSizeClasses: p } = A(e), y = z(!1), V = () => {
448
+ y.value = !!e.id && !!document.getElementById(`${e.id}-label`);
553
449
  };
554
- ie(L), I(() => r.id, L, { flush: "post" });
555
- const z = w(
556
- () => V.value ? `${r.id}-label ${r.id}` : void 0
450
+ R(V), I(() => e.id, V, { flush: "post" });
451
+ const $ = D(
452
+ () => y.value ? `${e.id}-label ${e.id}` : void 0
557
453
  );
558
454
  I(
559
- () => r.modelValue,
560
- (p) => {
561
- l.value = p ?? null;
455
+ () => e.modelValue,
456
+ (f) => {
457
+ t.value = f ?? null;
562
458
  }
563
459
  );
564
- const _ = (p) => {
565
- l.value = p, t("update:modelValue", p);
460
+ const M = (f) => {
461
+ t.value = f, l("update:modelValue", f);
566
462
  };
567
- return (p, R) => (o(), k(d(be), {
463
+ return (f, N) => (a(), C(d(pe), {
568
464
  as: "div",
569
- "model-value": l.value,
570
- "onUpdate:modelValue": _,
571
- disabled: p.isDisabled
465
+ "model-value": t.value,
466
+ "onUpdate:modelValue": M,
467
+ by: f.by,
468
+ disabled: f.isDisabled
572
469
  }, {
573
- default: h(() => [
574
- c("div", Ge, [
575
- y(d(ge), {
576
- id: p.id,
577
- "aria-labelledby": z.value,
578
- class: b(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left", [d(i), d($), d(f)]])
470
+ default: _(() => [
471
+ c("div", Oe, [
472
+ k(d(be), {
473
+ id: f.id,
474
+ "aria-labelledby": $.value,
475
+ class: b(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left", [d(v), d(p), d(o)]])
579
476
  }, {
580
- default: h(() => {
581
- var g;
477
+ default: _(() => {
478
+ var h;
582
479
  return [
583
- p.icon ? (o(), u("span", Oe, [
584
- y(x, {
585
- name: ((g = l.value) == null ? void 0 : g.icon) ?? p.icon
480
+ f.icon ? (a(), i("span", Re, [
481
+ k(w, {
482
+ name: ((h = t.value) == null ? void 0 : h.icon) ?? f.icon
586
483
  }, null, 8, ["name"])
587
484
  ])) : m("", !0),
588
- l.value ? (o(), u("span", Ze, [
589
- c("span", {
590
- innerHTML: l.value.label
591
- }, null, 8, Qe)
592
- ])) : (o(), u("span", qe, C(p.placeholder), 1)),
593
- c("span", We, [
594
- y(x, {
485
+ t.value ? (a(), i("span", Ge, [
486
+ T(f.$slots, "option", {
487
+ option: t.value,
488
+ active: !1,
489
+ selected: !0
490
+ }, () => [
491
+ j(g(t.value.label), 1)
492
+ ])
493
+ ])) : (a(), i("span", He, g(f.placeholder), 1)),
494
+ c("span", Ke, [
495
+ k(w, {
595
496
  class: "text-grey-400",
596
497
  name: "chevron-down",
597
498
  "aria-hidden": "true"
@@ -599,56 +500,60 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
599
500
  ])
600
501
  ];
601
502
  }),
602
- _: 1
503
+ _: 3
603
504
  }, 8, ["id", "aria-labelledby", "class"]),
604
- y(O, {
505
+ k(O, {
605
506
  "leave-active-class": "transition ease-in duration-100",
606
507
  "leave-from-class": "opacity-100",
607
508
  "leave-to-class": "opacity-0"
608
509
  }, {
609
- default: h(() => [
610
- y(d(ye), { class: "absolute z-10 mt-1 w-full bg-white dark:bg-grey-700 dark:text-grey-50 shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm" }, {
611
- default: h(() => [
612
- (o(!0), u(E, null, Z(p.options, (g) => (o(), k(d(he), {
510
+ default: _(() => [
511
+ k(d(ge), { class: "absolute z-10 mt-1 w-full bg-white dark:bg-grey-700 dark:text-grey-50 shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm" }, {
512
+ default: _(() => [
513
+ (a(!0), i(E, null, G(f.options, (h) => (a(), C(d(ye), {
613
514
  as: "template",
614
- key: g.id,
615
- value: g,
616
- disabled: g.disabled
515
+ key: u(h),
516
+ value: h,
517
+ disabled: h.disabled
617
518
  }, {
618
- default: h(({ active: M, selected: P }) => [
519
+ default: _(({ active: B, selected: S }) => [
619
520
  c("li", {
620
521
  class: b([
621
- M ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
522
+ B ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
622
523
  "cursor-default select-none relative py-2 pl-3 pr-12",
623
- { "opacity-50 bg-grey-100": g.disabled }
524
+ { "opacity-50 bg-grey-100": h.disabled }
624
525
  ])
625
526
  }, [
626
- c("div", Je, [
627
- g.disabled && p.disabledBadge ? (o(), u("span", Ke, C(p.disabledBadge), 1)) : m("", !0)
527
+ c("div", qe, [
528
+ h.disabled && f.disabledBadge ? (a(), i("span", Je, g(f.disabledBadge), 1)) : m("", !0)
628
529
  ]),
629
530
  c("span", {
630
531
  class: b([
631
- P ? "font-semibold" : "font-normal",
532
+ S ? "font-semibold" : "font-normal",
632
533
  "block truncate"
633
534
  ])
634
535
  }, [
635
- g.icon ? (o(), k(x, {
536
+ h.icon ? (a(), C(w, {
636
537
  key: 0,
637
538
  class: "inline-block mr-1",
638
- name: g.icon
539
+ name: h.icon
639
540
  }, null, 8, ["name"])) : m("", !0),
640
- c("span", {
641
- innerHTML: g.label
642
- }, null, 8, Xe)
541
+ T(f.$slots, "option", {
542
+ option: h,
543
+ active: B,
544
+ selected: S
545
+ }, () => [
546
+ j(g(h.label), 1)
547
+ ])
643
548
  ], 2),
644
- P ? (o(), u("span", {
549
+ S ? (a(), i("span", {
645
550
  key: 0,
646
551
  class: b([
647
- M ? "text-blue-100" : "text-blue-500",
552
+ B ? "text-blue-100" : "text-blue-500",
648
553
  "absolute inset-y-0 right-0 flex items-center pr-4"
649
554
  ])
650
555
  }, [
651
- y(x, {
556
+ k(w, {
652
557
  name: "check",
653
558
  class: "h-5 w-5",
654
559
  "aria-hidden": "true"
@@ -659,29 +564,29 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
659
564
  _: 2
660
565
  }, 1032, ["value", "disabled"]))), 128))
661
566
  ]),
662
- _: 1
567
+ _: 3
663
568
  })
664
569
  ]),
665
- _: 1
570
+ _: 3
666
571
  })
667
572
  ])
668
573
  ]),
669
- _: 1
670
- }, 8, ["model-value", "disabled"]));
574
+ _: 3
575
+ }, 8, ["model-value", "by", "disabled"]));
671
576
  }
672
- }), Ye = { class: "animate-pulse" }, ea = { class: "flex items-center justify-between space-x-4" }, aa = {
577
+ }), Qe = { class: "animate-pulse" }, We = { class: "flex items-center justify-between space-x-4" }, Xe = {
673
578
  key: 0,
674
579
  class: "w-12 h-12 bg-current rounded-full shrink-0"
675
- }, ta = {
580
+ }, Ye = {
676
581
  key: 1,
677
582
  class: "w-full h-8 bg-current rounded-lg"
678
- }, la = {
583
+ }, Ze = {
679
584
  key: 0,
680
585
  class: "mt-6 space-y-2"
681
- }, sa = {
586
+ }, et = {
682
587
  key: 1,
683
588
  class: "w-1/3 h-10 mt-6 bg-current rounded-lg"
684
- }, wa = /* @__PURE__ */ v({
589
+ }, Vt = /* @__PURE__ */ x({
685
590
  __name: "Skeleton",
686
591
  props: {
687
592
  avatar: { type: Boolean, default: !1 },
@@ -690,70 +595,86 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
690
595
  footer: { type: Boolean, default: !1 }
691
596
  },
692
597
  setup(s) {
693
- const a = s, r = new Array(a.lines).fill(void 0).map(() => {
694
- const l = [4, 5, 6, 8, 10, 16, 24, 32];
598
+ const n = s, e = new Array(n.lines).fill(void 0).map(() => {
599
+ const t = [4, 5, 6, 8, 10, 16, 24, 32];
695
600
  return {
696
- margin: `mr-${l[Math.floor(Math.random() * l.length)]}`
601
+ margin: `mr-${t[Math.floor(Math.random() * t.length)]}`
697
602
  };
698
603
  });
699
- return (l, t) => (o(), u("div", Ye, [
700
- c("div", ea, [
701
- l.avatar ? (o(), u("div", aa)) : m("", !0),
702
- l.title ? (o(), u("div", ta)) : m("", !0)
604
+ return (t, l) => (a(), i("div", Qe, [
605
+ c("div", We, [
606
+ t.avatar ? (a(), i("div", Xe)) : m("", !0),
607
+ t.title ? (a(), i("div", Ye)) : m("", !0)
703
608
  ]),
704
- l.lines > 0 ? (o(), u("div", la, [
705
- (o(!0), u(E, null, Z(d(r), (i, f) => (o(), u("div", {
706
- class: b(["h-4 bg-current rounded-lg", i.margin]),
707
- key: f
609
+ t.lines > 0 ? (a(), i("div", Ze, [
610
+ (a(!0), i(E, null, G(d(e), (u, v) => (a(), i("div", {
611
+ class: b(["h-4 bg-current rounded-lg", u.margin]),
612
+ key: v
708
613
  }, null, 2))), 128))
709
614
  ])) : m("", !0),
710
- l.footer ? (o(), u("div", sa)) : m("", !0)
615
+ t.footer ? (a(), i("div", et)) : m("", !0)
711
616
  ]));
712
617
  }
713
- }), $a = /* @__PURE__ */ v({
618
+ }), tt = {
619
+ role: "status",
620
+ class: "inline-flex align-[-0.125em]"
621
+ }, st = { class: "sr-only" }, lt = {
622
+ inheritAttrs: !1
623
+ }, Dt = /* @__PURE__ */ x({
624
+ ...lt,
714
625
  __name: "Spinner",
626
+ props: {
627
+ label: { default: "Loading" }
628
+ },
715
629
  setup(s) {
716
- return (a, r) => (o(), k(d(x), {
717
- class: "animate-spin",
718
- name: "circle-notch"
719
- }));
630
+ const n = z(!1);
631
+ let e;
632
+ return R(() => {
633
+ e = setTimeout(() => n.value = !0, 100);
634
+ }), te(() => clearTimeout(e)), (t, l) => (a(), i("span", tt, [
635
+ k(d(w), P({
636
+ class: "animate-spin",
637
+ name: "circle-notch"
638
+ }, t.$attrs), null, 16),
639
+ c("span", st, g(n.value ? t.label : ""), 1)
640
+ ]));
720
641
  }
721
- }), oa = { class: "sr-only" }, La = /* @__PURE__ */ v({
642
+ }), ot = { class: "sr-only" }, zt = /* @__PURE__ */ x({
722
643
  __name: "Switch",
723
644
  props: {
724
- id: { default: () => Q() },
645
+ id: { default: () => H() },
725
646
  label: {},
726
647
  modelValue: { type: Boolean },
727
648
  onLabel: { default: "on" },
728
649
  offLabel: { default: "off" }
729
650
  },
730
651
  emits: ["update:modelValue", "change"],
731
- setup(s, { emit: a }) {
732
- const r = a, l = (t) => {
733
- r("update:modelValue", t), r("change", t);
652
+ setup(s, { emit: n }) {
653
+ const e = n, t = (l) => {
654
+ e("update:modelValue", l), e("change", l);
734
655
  };
735
- return (t, i) => (o(), k(d(ke), {
736
- id: t.id,
737
- modelValue: t.modelValue,
738
- class: b([t.modelValue ? "bg-blue-700" : "bg-grey-700", "relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),
739
- "onUpdate:modelValue": l
656
+ return (l, u) => (a(), C(d(he), {
657
+ id: l.id,
658
+ modelValue: l.modelValue,
659
+ class: b([l.modelValue ? "bg-blue-700" : "bg-grey-700", "relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),
660
+ "onUpdate:modelValue": t
740
661
  }, {
741
- default: h(() => [
662
+ default: _(() => [
742
663
  c("span", {
743
- class: b(["absolute text-xs text-center text-white inset-x-2", t.modelValue ? "pr-3" : "pl-3"])
744
- }, C(t.modelValue === !0 ? t.onLabel : t.offLabel), 3),
745
- c("span", oa, C(t.label), 1),
664
+ class: b(["absolute text-xs text-center text-white inset-x-2", l.modelValue ? "pr-3" : "pl-3"])
665
+ }, g(l.modelValue === !0 ? l.onLabel : l.offLabel), 3),
666
+ c("span", ot, g(l.label), 1),
746
667
  c("span", {
747
- class: b([t.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
668
+ class: b([l.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
748
669
  }, null, 2)
749
670
  ]),
750
671
  _: 1
751
672
  }, 8, ["id", "modelValue", "class"]));
752
673
  }
753
- }), na = { class: "relative" }, ra = ["disabled", "value"], ia = {
674
+ }), at = { class: "relative" }, nt = ["disabled", "value"], rt = {
754
675
  inheritAttrs: !1
755
- }, Da = /* @__PURE__ */ v({
756
- ...ia,
676
+ }, Bt = /* @__PURE__ */ x({
677
+ ...rt,
757
678
  __name: "Textarea",
758
679
  props: {
759
680
  modelValue: {},
@@ -762,43 +683,43 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
762
683
  block: { type: Boolean }
763
684
  },
764
685
  emits: ["update:modelValue"],
765
- setup(s, { expose: a, emit: r }) {
766
- const l = s, t = r, { inputClasses: i, disabledClasses: f, textSizeClasses: $ } = H(l), V = function(_) {
767
- t("update:modelValue", (_ == null ? void 0 : _.target).value);
768
- }, L = D(null);
769
- return a({
686
+ setup(s, { expose: n, emit: e }) {
687
+ const t = s, l = e, { inputClasses: u, disabledClasses: v, textSizeClasses: o } = A(t), p = function($) {
688
+ l("update:modelValue", ($ == null ? void 0 : $.target).value);
689
+ }, y = z(null);
690
+ return n({
770
691
  focus: () => {
771
- l.isDisabled || L.value.focus();
692
+ t.isDisabled || y.value.focus();
772
693
  }
773
- }), (_, p) => (o(), u("div", na, [
774
- c("textarea", T({
775
- class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [d(i), d($), d(f)]],
776
- disabled: _.isDisabled,
777
- value: _.modelValue ?? ""
778
- }, _.$attrs, {
694
+ }), ($, M) => (a(), i("div", at, [
695
+ c("textarea", P({
696
+ class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [d(u), d(o), d(v)]],
697
+ disabled: $.isDisabled,
698
+ value: $.modelValue ?? ""
699
+ }, $.$attrs, {
779
700
  ref_key: "input",
780
- ref: L,
701
+ ref: y,
781
702
  cols: "56",
782
703
  rows: "8",
783
- onInput: V
704
+ onInput: p
784
705
  }), `
785
- `, 16, ra)
706
+ `, 16, nt)
786
707
  ]));
787
708
  }
788
709
  });
789
710
  export {
790
- ya as D9Button,
791
- ha as D9Checkbox,
792
- x as D9Icon,
793
- ka as D9Input,
794
- va as D9Label,
795
- _a as D9Menu,
796
- xa as D9MenuLink,
797
- Ca as D9Select,
798
- wa as D9Skeleton,
799
- $a as D9Spinner,
800
- La as D9Switch,
801
- Da as D9Textarea,
802
- N as brands,
803
- Le as icons
711
+ kt as D9Button,
712
+ vt as D9Checkbox,
713
+ w as D9Icon,
714
+ _t as D9Input,
715
+ xt as D9Label,
716
+ $t as D9Menu,
717
+ wt as D9MenuLink,
718
+ Ct as D9Select,
719
+ Vt as D9Skeleton,
720
+ Dt as D9Spinner,
721
+ zt as D9Switch,
722
+ Bt as D9Textarea,
723
+ ht as brands,
724
+ yt as icons
804
725
  };