@oneb/ui-vue 0.0.38 → 0.0.39

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 (39) hide show
  1. package/dist/OneBrowserMenu.vue_vue_type_script_setup_true_lang-562e2fdb.cjs +1 -0
  2. package/dist/{OneBrowserMenu.vue_vue_type_script_setup_true_lang-b65a0a0a.js → OneBrowserMenu.vue_vue_type_script_setup_true_lang-59fac367.js} +117 -117
  3. package/dist/button/index.cjs +1 -1
  4. package/dist/button/index.js +1 -1
  5. package/dist/dropdown/index.cjs +1 -1
  6. package/dist/dropdown/index.js +1 -1
  7. package/dist/form/index.cjs +1 -1
  8. package/dist/form/index.js +125 -125
  9. package/dist/index-3615f53c.cjs +1 -0
  10. package/dist/{index-72d69e4e.js → index-f136b5ea.js} +51 -51
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.js +2 -2
  13. package/dist/layout/index.cjs +1 -1
  14. package/dist/layout/index.js +168 -168
  15. package/package.json +1 -1
  16. package/dist/OneBrowserMenu.vue_vue_type_script_setup_true_lang-4b350df0.cjs +0 -1
  17. package/dist/button/OneButton.vue.d.ts +0 -2
  18. package/dist/button/SpinnerIcon.vue.d.ts +0 -2
  19. package/dist/button/util.d.ts +0 -2
  20. package/dist/card/OneCard.vue.d.ts +0 -2
  21. package/dist/card/OneCardBody.vue.d.ts +0 -2
  22. package/dist/card/OneCardFooter.vue.d.ts +0 -2
  23. package/dist/card/OneCardHeader.vue.d.ts +0 -2
  24. package/dist/common/OneAvatar.vue.d.ts +0 -2
  25. package/dist/dropdown/OneBrowserMenu.vue.d.ts +0 -2
  26. package/dist/dropdown/OneDropdown.vue.d.ts +0 -2
  27. package/dist/dropdown/OneDropdownDivider.vue.d.ts +0 -2
  28. package/dist/dropdown/OneDropdownItem.vue.d.ts +0 -2
  29. package/dist/dropdown/OneUserMenu.vue.d.ts +0 -2
  30. package/dist/form/OneForm.vue.d.ts +0 -2
  31. package/dist/form/OneFormFeedback.vue.d.ts +0 -2
  32. package/dist/form/OneFormField.vue.d.ts +0 -2
  33. package/dist/form/OneFormInput.vue.d.ts +0 -2
  34. package/dist/form/OneFormLabel.vue.d.ts +0 -2
  35. package/dist/index-e804f148.cjs +0 -1
  36. package/dist/layout/IconOneb.vue.d.ts +0 -2
  37. package/dist/layout/OneMainLayout.vue.d.ts +0 -2
  38. package/dist/layout/OneSidebar.vue.d.ts +0 -2
  39. package/dist/layout/OneSidebarLink.vue.d.ts +0 -2
@@ -1,6 +1,6 @@
1
- import { inject as E, computed as t, defineComponent as g, provide as O, openBlock as l, createElementBlock as n, withModifiers as M, renderSlot as B, unref as s, createTextVNode as P, toDisplayString as v, Fragment as V, renderList as C, createCommentVNode as h, createElementVNode as c, ref as _, onMounted as z, normalizeClass as b, createBlock as k, resolveDynamicComponent as D, createVNode as I } from "vue";
2
- import { r as T } from "../XMarkIcon-51ef0691.js";
3
- const G = {
1
+ import { inject as _, computed as t, defineComponent as g, provide as E, openBlock as l, createElementBlock as n, withModifiers as L, renderSlot as C, unref as d, createTextVNode as M, toDisplayString as v, Fragment as $, renderList as V, createCommentVNode as h, createElementVNode as m, ref as q, onMounted as P, normalizeClass as b, createBlock as k, resolveDynamicComponent as z, createVNode as O } from "vue";
2
+ import { r as D } from "../XMarkIcon-51ef0691.js";
3
+ const T = {
4
4
  id: {
5
5
  type: String,
6
6
  required: !1
@@ -9,7 +9,7 @@ const G = {
9
9
  type: Object,
10
10
  required: !1
11
11
  }
12
- }, H = {
12
+ }, G = {
13
13
  id: {
14
14
  type: String,
15
15
  required: !1
@@ -31,7 +31,7 @@ const G = {
31
31
  type: Array,
32
32
  required: !1
33
33
  }
34
- }, J = {
34
+ }, H = {
35
35
  name: {
36
36
  type: String,
37
37
  required: !1
@@ -40,12 +40,12 @@ const G = {
40
40
  type: Array,
41
41
  required: !1
42
42
  }
43
- }, K = {
43
+ }, J = {
44
44
  label: {
45
45
  type: String,
46
46
  required: !1
47
47
  }
48
- }, Q = {
48
+ }, K = {
49
49
  id: {
50
50
  type: String,
51
51
  required: !1
@@ -107,7 +107,7 @@ const G = {
107
107
  required: !1,
108
108
  default: []
109
109
  }
110
- }, j = () => E(
110
+ }, I = () => _(
111
111
  "BaseForm",
112
112
  () => ({
113
113
  formId: t(() => {
@@ -116,7 +116,7 @@ const G = {
116
116
  })
117
117
  }),
118
118
  !0
119
- ), S = () => E(
119
+ ), S = () => _(
120
120
  "BaseFormField",
121
121
  () => ({
122
122
  inputId: t(() => {
@@ -126,55 +126,55 @@ const G = {
126
126
  hasError: t(() => !1)
127
127
  }),
128
128
  !0
129
- ), R = ["id"], be = /* @__PURE__ */ g({
129
+ ), Q = ["onSubmit", "id"], he = /* @__PURE__ */ g({
130
130
  __name: "OneForm",
131
- props: G,
131
+ props: T,
132
132
  emits: ["submit"],
133
133
  setup(u, { emit: a }) {
134
- const r = u, d = a;
135
- O("BaseForm", {
134
+ const r = u;
135
+ E("BaseForm", {
136
136
  formId: t(() => r.id),
137
137
  validation: t(() => r.validation)
138
138
  });
139
139
  const i = () => {
140
- d("submit");
140
+ a("submit");
141
141
  };
142
- return (o, y) => (l(), n("form", {
143
- onSubmit: M(i, ["prevent"]),
144
- id: o.id,
142
+ return (s, o) => (l(), n("form", {
143
+ onSubmit: L(i, ["prevent"]),
144
+ id: s.id,
145
145
  class: "space-y-3"
146
146
  }, [
147
- B(o.$slots, "default")
148
- ], 40, R));
147
+ C(s.$slots, "default")
148
+ ], 40, Q));
149
149
  }
150
- }), U = ["for"], W = /* @__PURE__ */ g({
150
+ }), R = ["for"], U = /* @__PURE__ */ g({
151
151
  __name: "OneFormLabel",
152
- props: K,
152
+ props: J,
153
153
  setup(u) {
154
154
  const { inputId: a } = S();
155
- return (r, d) => (l(), n("label", {
156
- for: s(a),
155
+ return (r, i) => (l(), n("label", {
156
+ for: d(a),
157
157
  class: "block text-sm font-medium text-primary-content select-none"
158
158
  }, [
159
- B(r.$slots, "default", {}, () => [
160
- P(v(r.label), 1)
159
+ C(r.$slots, "default", {}, () => [
160
+ M(v(r.label), 1)
161
161
  ])
162
- ], 8, U));
162
+ ], 8, R));
163
163
  }
164
- }), X = {
164
+ }), W = {
165
165
  key: 0,
166
166
  class: "text-danger-content text-xs space-y-1"
167
- }, Y = /* @__PURE__ */ g({
167
+ }, X = /* @__PURE__ */ g({
168
168
  __name: "OneFormFeedback",
169
- props: J,
169
+ props: H,
170
170
  setup(u) {
171
- const a = u, { validation: r } = j(), { inputName: d } = S(), i = t(() => d.value == null && a.name == null ? a.errors ?? [] : r.value == null ? a.errors ?? [] : (r.value ?? {})[a.name || d.value] ?? a.errors ?? []);
172
- return (o, y) => i.value.length > 0 ? (l(), n("div", X, [
173
- (l(!0), n(V, null, C(i.value, (p) => (l(), n("div", { key: p }, v(p), 1))), 128))
171
+ const a = u, { validation: r } = I(), { inputName: i } = S(), s = t(() => i.value == null && a.name == null ? a.errors ?? [] : r.value == null ? a.errors ?? [] : (r.value ?? {})[a.name || i.value] ?? a.errors ?? []);
172
+ return (o, c) => s.value.length > 0 ? (l(), n("div", W, [
173
+ (l(!0), n($, null, V(s.value, (y) => (l(), n("div", { key: y }, v(y), 1))), 128))
174
174
  ])) : h("", !0);
175
175
  }
176
176
  });
177
- function Z(u, a) {
177
+ function Y(u, a) {
178
178
  return l(), n("svg", {
179
179
  xmlns: "http://www.w3.org/2000/svg",
180
180
  fill: "none",
@@ -183,19 +183,19 @@ function Z(u, a) {
183
183
  stroke: "currentColor",
184
184
  "aria-hidden": "true"
185
185
  }, [
186
- c("path", {
186
+ m("path", {
187
187
  "stroke-linecap": "round",
188
188
  "stroke-linejoin": "round",
189
189
  d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"
190
190
  }),
191
- c("path", {
191
+ m("path", {
192
192
  "stroke-linecap": "round",
193
193
  "stroke-linejoin": "round",
194
194
  d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
195
195
  })
196
196
  ]);
197
197
  }
198
- function x(u, a) {
198
+ function Z(u, a) {
199
199
  return l(), n("svg", {
200
200
  xmlns: "http://www.w3.org/2000/svg",
201
201
  fill: "none",
@@ -204,42 +204,42 @@ function x(u, a) {
204
204
  stroke: "currentColor",
205
205
  "aria-hidden": "true"
206
206
  }, [
207
- c("path", {
207
+ m("path", {
208
208
  "stroke-linecap": "round",
209
209
  "stroke-linejoin": "round",
210
210
  d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"
211
211
  })
212
212
  ]);
213
213
  }
214
- const ee = ["id", "disabled"], re = ["selected"], le = ["selected", "value"], ae = ["name", "id", "value", "placeholder", "disabled", "readonly"], ne = {
214
+ const x = ["id", "disabled"], ee = ["selected"], re = ["selected", "value"], le = ["name", "id", "value", "placeholder", "disabled", "readonly"], ae = {
215
215
  key: 2,
216
216
  class: "flex w-full space-x-3 items-center"
217
- }, oe = ["type", "name", "id", "disabled", "readonly", "checked"], te = ["for"], se = {
217
+ }, ne = ["type", "name", "id", "disabled", "readonly", "checked"], oe = ["for"], te = {
218
218
  key: 3,
219
219
  class: "w-full space-y-1"
220
- }, de = ["name", "id", "value", "disabled", "readonly", "checked"], ie = ["for"], ue = {
220
+ }, se = ["name", "id", "value", "disabled", "readonly", "checked"], de = ["for"], ie = {
221
221
  key: 4,
222
222
  class: "relative"
223
- }, pe = { class: "absolute p-2 px-3 rounded-md h-full flex items-center select-none" }, me = ["type", "name", "id", "value", "placeholder", "disabled", "readonly"], ce = /* @__PURE__ */ g({
223
+ }, ue = { class: "absolute p-2 px-3 rounded-md h-full flex items-center select-none" }, pe = ["type", "name", "id", "value", "placeholder", "disabled", "readonly"], ce = /* @__PURE__ */ g({
224
224
  __name: "OneFormInput",
225
- props: Q,
225
+ props: K,
226
226
  emits: ["update:modelValue"],
227
227
  setup(u, { emit: a }) {
228
- const r = u, d = a, { inputId: i, inputName: o, hasError: y } = S(), p = _(null), w = _(!1);
229
- z(() => {
230
- r.autofocus && p.value && p.value.focus();
228
+ const r = u, { inputId: i, inputName: s, hasError: o } = S(), c = q(null), y = q(!1);
229
+ P(() => {
230
+ r.autofocus && c.value && c.value.focus();
231
231
  });
232
- const N = t(() => r.modelValue != null && r.modelValue !== ""), f = t(() => {
232
+ const j = t(() => r.modelValue != null && r.modelValue !== ""), f = t(() => {
233
233
  if (r.id)
234
234
  return r.id;
235
235
  const e = (i == null ? void 0 : i.value) || "";
236
236
  return r.name ? `${e}-${r.name}` : e || "";
237
- }), A = () => {
238
- d("update:modelValue", "");
239
- }, L = t(() => {
237
+ }), N = () => {
238
+ a("update:modelValue", "");
239
+ }, A = t(() => {
240
240
  const e = {
241
241
  "shadow-sm": r.type !== "range",
242
- "border-danger-base": y.value || r.invalid,
242
+ "border-danger-base": o.value || r.invalid,
243
243
  "pl-10": r.icon != null,
244
244
  "pr-10": r.type === "password",
245
245
  "rounded-full": r.rounded,
@@ -248,19 +248,19 @@ const ee = ["id", "disabled"], re = ["selected"], le = ["selected", "value"], ae
248
248
  "py-2.5": r.large,
249
249
  "py-2": !r.large
250
250
  };
251
- return r.inputClass != null && (typeof r.inputClass == "string" ? e[r.inputClass] = !0 : r.inputClass instanceof Array && r.inputClass.forEach(($) => {
252
- e[$] = !0;
251
+ return r.inputClass != null && (typeof r.inputClass == "string" ? e[r.inputClass] = !0 : r.inputClass instanceof Array && r.inputClass.forEach((F) => {
252
+ e[F] = !0;
253
253
  })), e;
254
- }), F = (e) => {
255
- r.type === "checkbox" ? d("update:modelValue", e.target.checked) : d("update:modelValue", e.target.value);
254
+ }), w = (e) => {
255
+ r.type === "checkbox" ? a("update:modelValue", e.target.checked) : a("update:modelValue", e.target.value);
256
256
  };
257
- return (e, $) => e.type === "select" ? (l(), n("select", {
257
+ return (e, F) => e.type === "select" ? (l(), n("select", {
258
258
  key: 0,
259
259
  id: f.value,
260
260
  ref_key: "inputElement",
261
- ref: p,
261
+ ref: c,
262
262
  class: b(["border border-primary-stroke px-3 w-full", {
263
- "border-danger-base": s(y) || e.invalid,
263
+ "border-danger-base": d(o) || e.invalid,
264
264
  "text-secondary-content": e.modelValue === "" || e.modelValue == null,
265
265
  "rounded-full": e.rounded,
266
266
  "rounded-md": !e.rounded,
@@ -275,21 +275,21 @@ const ee = ["id", "disabled"], re = ["selected"], le = ["selected", "value"], ae
275
275
  selected: e.modelValue === "" || e.modelValue == null,
276
276
  disabled: "",
277
277
  hidden: ""
278
- }, v(e.placeholder), 9, re)) : h("", !0),
279
- (l(!0), n(V, null, C(e.options, (m) => (l(), n("option", {
280
- selected: m.key === e.modelValue,
281
- key: m.key,
282
- value: m.key
283
- }, v(m.value), 9, le))), 128))
284
- ], 10, ee)) : e.type === "textarea" ? (l(), n("textarea", {
278
+ }, v(e.placeholder), 9, ee)) : h("", !0),
279
+ (l(!0), n($, null, V(e.options, (p) => (l(), n("option", {
280
+ selected: p.key === e.modelValue,
281
+ key: p.key,
282
+ value: p.key
283
+ }, v(p.value), 9, re))), 128))
284
+ ], 10, x)) : e.type === "textarea" ? (l(), n("textarea", {
285
285
  key: 1,
286
- name: e.name || s(o),
286
+ name: e.name || d(s),
287
287
  id: f.value,
288
288
  value: e.modelValue,
289
- onInput: F,
289
+ onInput: w,
290
290
  rows: "3",
291
291
  class: b(["border border-primary-stroke px-3 w-full placeholder-gray-400", {
292
- "border-danger-base": s(y),
292
+ "border-danger-base": d(o),
293
293
  "rounded-3xl": e.rounded,
294
294
  "rounded-md": !e.rounded,
295
295
  "text-lg": e.large,
@@ -300,105 +300,105 @@ const ee = ["id", "disabled"], re = ["selected"], le = ["selected", "value"], ae
300
300
  disabled: e.disabled,
301
301
  readonly: e.readonly,
302
302
  ref_key: "inputElement",
303
- ref: p
304
- }, null, 42, ae)) : e.type === "checkbox" ? (l(), n("div", ne, [
305
- c("input", {
303
+ ref: c
304
+ }, null, 42, le)) : e.type === "checkbox" ? (l(), n("div", ae, [
305
+ m("input", {
306
306
  type: e.type,
307
- name: e.name || s(o),
307
+ name: e.name || d(s),
308
308
  id: f.value,
309
309
  value: !0,
310
- onInput: F,
310
+ onInput: w,
311
311
  disabled: e.disabled,
312
312
  readonly: e.readonly,
313
313
  class: b(["rounded-md border border-primary-stroke px-2 py-2 shadow-sm", {
314
- "border-danger-base": s(y) || e.invalid
314
+ "border-danger-base": d(o) || e.invalid
315
315
  }]),
316
316
  checked: e.modelValue === !0,
317
317
  ref_key: "inputElement",
318
- ref: p
319
- }, null, 42, oe),
320
- c("label", {
318
+ ref: c
319
+ }, null, 42, ne),
320
+ m("label", {
321
321
  for: f.value,
322
322
  class: "text-primary-content select-none"
323
- }, v(e.placeholder), 9, te)
324
- ])) : e.type === "radio" ? (l(), n("div", se, [
325
- (l(!0), n(V, null, C(e.options, (m, q) => (l(), n("div", {
326
- key: m.key,
323
+ }, v(e.placeholder), 9, oe)
324
+ ])) : e.type === "radio" ? (l(), n("div", te, [
325
+ (l(!0), n($, null, V(e.options, (p, B) => (l(), n("div", {
326
+ key: p.key,
327
327
  class: "flex w-full space-x-3 items-center"
328
328
  }, [
329
- c("input", {
329
+ m("input", {
330
330
  type: "radio",
331
- name: e.name || s(o),
332
- id: `${f.value}-${q}`,
333
- value: m.key,
334
- onInput: F,
331
+ name: e.name || d(s),
332
+ id: `${f.value}-${B}`,
333
+ value: p.key,
334
+ onInput: w,
335
335
  disabled: e.disabled,
336
336
  readonly: e.readonly,
337
337
  class: b(["rounded-md border border-primary-stroke px-3 py-2 shadow-sm", {
338
- "border-danger-base": s(y) || e.invalid
338
+ "border-danger-base": d(o) || e.invalid
339
339
  }]),
340
- checked: m.key === e.modelValue,
340
+ checked: p.key === e.modelValue,
341
341
  ref_for: !0,
342
342
  ref_key: "inputElement",
343
- ref: p
344
- }, null, 42, de),
345
- c("label", {
346
- for: `${f.value}-${q}`,
343
+ ref: c
344
+ }, null, 42, se),
345
+ m("label", {
346
+ for: `${f.value}-${B}`,
347
347
  class: "text-primary-content select-none"
348
- }, v(m.value), 9, ie)
348
+ }, v(p.value), 9, de)
349
349
  ]))), 128))
350
- ])) : (l(), n("div", ue, [
351
- c("div", pe, [
352
- e.icon ? (l(), k(D(e.icon), {
350
+ ])) : (l(), n("div", ie, [
351
+ m("div", ue, [
352
+ e.icon ? (l(), k(z(e.icon), {
353
353
  key: 0,
354
354
  class: "w-5 h-5 text-primary-content"
355
355
  })) : h("", !0)
356
356
  ]),
357
- c("input", {
358
- type: w.value ? "text" : e.type,
359
- name: e.name || s(o),
357
+ m("input", {
358
+ type: y.value ? "text" : e.type,
359
+ name: e.name || d(s),
360
360
  id: f.value,
361
361
  value: e.modelValue,
362
- onInput: F,
362
+ onInput: w,
363
363
  placeholder: e.placeholder,
364
364
  disabled: e.disabled,
365
365
  readonly: e.readonly,
366
- class: b(["border border-primary-stroke w-full px-3 placeholder-gray-400", L.value]),
366
+ class: b(["border border-primary-stroke w-full px-3 placeholder-gray-400", A.value]),
367
367
  ref_key: "inputElement",
368
- ref: p
369
- }, null, 42, me),
370
- e.clearable && N.value ? (l(), n("div", {
368
+ ref: c
369
+ }, null, 42, pe),
370
+ e.clearable && j.value ? (l(), n("div", {
371
371
  key: 0,
372
- onClick: A,
372
+ onClick: N,
373
373
  class: "absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"
374
374
  }, [
375
- I(s(T), { class: "w-5 h-5 text-secondary-content hover:text-primary-base" })
375
+ O(d(D), { class: "w-5 h-5 text-secondary-content hover:text-primary-base" })
376
376
  ])) : e.type === "password" ? (l(), n("div", {
377
377
  key: 1,
378
- onClick: $[0] || ($[0] = (m) => w.value = !w.value),
378
+ onClick: F[0] || (F[0] = (p) => y.value = !y.value),
379
379
  class: "absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"
380
380
  }, [
381
- w.value ? (l(), k(s(x), {
381
+ y.value ? (l(), k(d(Z), {
382
382
  key: 0,
383
383
  class: "w-5 h-5 text-primary-content hover:text-primary-base"
384
- })) : (l(), k(s(Z), {
384
+ })) : (l(), k(d(Y), {
385
385
  key: 1,
386
386
  class: "w-5 h-5 text-secondary-content hover:text-primary-base"
387
387
  }))
388
388
  ])) : h("", !0)
389
389
  ]));
390
390
  }
391
- }), ye = { class: "space-y-1" }, fe = {
391
+ }), me = { class: "space-y-1" }, ye = {
392
392
  key: 2,
393
393
  class: "text-xs text-secondary-content select-none"
394
- }, ke = /* @__PURE__ */ g({
394
+ }, be = /* @__PURE__ */ g({
395
395
  __name: "OneFormField",
396
- props: H,
396
+ props: G,
397
397
  setup(u) {
398
- const a = u, { formId: r, validation: d } = j(), i = t(
399
- () => a.errors != null && a.errors.length > 0 ? !0 : a.name == null ? !1 : (d.value ?? {})[a.name] != null
398
+ const a = u, { formId: r, validation: i } = I(), s = t(
399
+ () => a.errors != null && a.errors.length > 0 ? !0 : a.name == null ? !1 : (i.value ?? {})[a.name] != null
400
400
  );
401
- return O("BaseFormField", {
401
+ return E("BaseFormField", {
402
402
  inputId: t(() => {
403
403
  const o = r.value || "form";
404
404
  if (a.id != null)
@@ -407,26 +407,26 @@ const ee = ["id", "disabled"], re = ["selected"], le = ["selected", "value"], ae
407
407
  return `${o}-field-${a.name}`;
408
408
  }),
409
409
  inputName: t(() => a.name),
410
- hasError: i
411
- }), (o, y) => (l(), n("div", ye, [
412
- o.label ? (l(), k(W, {
410
+ hasError: s
411
+ }), (o, c) => (l(), n("div", me, [
412
+ o.label ? (l(), k(U, {
413
413
  key: 0,
414
414
  label: o.label
415
415
  }, null, 8, ["label"])) : h("", !0),
416
- B(o.$slots, "default", {}, () => [
417
- I(ce)
416
+ C(o.$slots, "default", {}, () => [
417
+ O(ce)
418
418
  ]),
419
- i.value ? (l(), k(Y, {
419
+ s.value ? (l(), k(X, {
420
420
  key: 1,
421
421
  errors: o.errors
422
- }, null, 8, ["errors"])) : o.hint.length > 0 ? (l(), n("p", fe, v(o.hint), 1)) : h("", !0)
422
+ }, null, 8, ["errors"])) : o.hint.length > 0 ? (l(), n("p", ye, v(o.hint), 1)) : h("", !0)
423
423
  ]));
424
424
  }
425
425
  });
426
426
  export {
427
- be as OneForm,
428
- Y as OneFormFeedback,
429
- ke as OneFormField,
427
+ he as OneForm,
428
+ X as OneFormFeedback,
429
+ be as OneFormField,
430
430
  ce as OneFormInput,
431
- W as OneFormLabel
431
+ U as OneFormLabel
432
432
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),b=require("./_plugin-vue_export-helper-f246444f.cjs");const g={},h={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}},f=e.createElementVNode("circle",{style:{"stroke-linecap":"round",animation:"one-sp-ico-dash 1.7s ease-in-out infinite"},class:"opacity-75",cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1),v=[f];function y(o,n){return e.openBlock(),e.createElementBlock("svg",h,v)}const i=b._export_sfc(g,[["render",y]]),k={variant:{type:String,default:"primary"},size:{type:String,default:"md"},label:{type:String},icon:{type:[Function,Object]},isLoading:{type:Boolean},isSubmit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconClass:{type:[String,Array]},iconAfter:{type:[Function,Object]}},w=["relative inline-flex","border","items-center justify-center","font-medium whitespace-nowrap","disabled:opacity-50 disabled:cursor-default","focus:outline-none focus:ring-2 focus:ring-offset-2","transition-colors duration-200"],C={sm:["px-2 py-1 text-sm"],md:["px-3 py-2"],lg:["px-4 py-3"]},_={primary:["rounded-md border-transparent bg-primary-base disabled:bg-primary-hover text-sm text-white hover:bg-primary-hover focus:ring-primary-glow"],secondary:["rounded-md border-primary-stroke bg-primary-body disabled:bg-primary-body-hover text-black text-sm hover:bg-primary-body-hover focus:ring-tertiary-glow"],info:["rounded-md border-transparent bg-info-base disabled:bg-info-hover text-white text-sm hover:bg-info-hover focus:ring-info-glow"],success:["rounded-md border-transparent bg-success-base disabled:bg-success-hover text-white text-sm hover:bg-success-hover focus:ring-success-glow"],warning:["rounded-md border-transparent bg-warning-base disabled:bg-warning-hover text-white text-sm hover:bg-warning-hover focus:ring-warning-glow"],danger:["rounded-md border-transparent bg-danger-base disabled:bg-danger-hover text-white text-sm hover:bg-danger-hover focus:ring-danger-glow"],touch:["rounded-full border-transparent text-black hover:bg-primary-body-hover hover:shadow p-3 text-sm focus:ring-tertiary-glow"],link:["rounded-md border-transparent items-center text-info-base hover:text-info-hover text-sm"],none:["rounded-md border-transparent text-gray-500"]},x=(o="primary",n="md")=>{const s=[];return s.push(...w),s.push(..._[o]??[]),o!=="touch"&&s.push(...C[n]??[]),s},B=["disabled","title","type","onClick"],z=e.defineComponent({__name:"OneButton",props:k,emits:["click"],setup(o,{emit:n}){const s=o,c=()=>{n("click")},r=e.computed(()=>s.icon),a=e.computed(()=>s.iconAfter),u=e.computed(()=>{const t=x(s.variant,s.size);return s.variant==="touch"&&s.active&&t.push("bg-primary-body-active"),t}),d=e.computed(()=>s.disabled||s.isLoading),p=e.computed(()=>s.label&&s.label.length>0&&s.variant!=="touch"),m=e.computed(()=>{const t=["inline-block text-ellipsis overflow-hidden"];return r.value!=null&&t.push("ml-2"),a.value!=null&&t.push("mr-2"),t}),l=e.computed(()=>{const t=[];return s.size==="sm"?t.push("w-3 h-3"):s.size==="lg"?t.push("w-5 h-5"):t.push("w-4 h-4"),typeof s.iconClass=="string"?t.push(s.iconClass):s.iconClass instanceof Array&&t.push(...s.iconClass),t});return(t,L)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(u.value),disabled:d.value,title:t.label,type:t.isSubmit?"submit":"button",onClick:e.withModifiers(c,["stop"])},[r.value!=null&&t.isLoading?(e.openBlock(),e.createBlock(i,{key:0,class:e.normalizeClass(l.value)},null,8,["class"])):r.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{key:1,class:e.normalizeClass(l.value)},null,8,["class"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(m.value)},e.toDisplayString(t.label),3)):e.createCommentVNode("",!0),a.value!=null&&t.isLoading?(e.openBlock(),e.createBlock(i,{key:3,class:e.normalizeClass(l.value)},null,8,["class"])):a.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value),{key:4,class:e.normalizeClass(l.value)},null,8,["class"])):e.createCommentVNode("",!0)],10,B))}});exports.SpinnerIcon=i;exports._sfc_main=z;
@@ -1,11 +1,11 @@
1
- import { openBlock as n, createElementBlock as b, createElementVNode as x, defineComponent as _, computed as t, normalizeClass as r, withModifiers as k, createBlock as d, resolveDynamicComponent as m, createCommentVNode as p, toDisplayString as C } from "vue";
2
- import { _ as B } from "./_plugin-vue_export-helper-dad06003.js";
3
- const L = {}, S = {
1
+ import { openBlock as n, createElementBlock as p, createElementVNode as w, defineComponent as x, computed as t, normalizeClass as o, withModifiers as _, createBlock as u, resolveDynamicComponent as b, createCommentVNode as d, toDisplayString as k } from "vue";
2
+ import { _ as C } from "./_plugin-vue_export-helper-dad06003.js";
3
+ const B = {}, L = {
4
4
  class: "spinner",
5
5
  xmlns: "http://www.w3.org/2000/svg",
6
6
  viewBox: "0 0 24 24",
7
7
  style: { animation: "one-sp-ico-rot 2.7s linear infinite" }
8
- }, z = /* @__PURE__ */ x("circle", {
8
+ }, S = /* @__PURE__ */ w("circle", {
9
9
  style: { "stroke-linecap": "round", animation: "one-sp-ico-dash 1.7s ease-in-out infinite" },
10
10
  class: "opacity-75",
11
11
  cx: "12",
@@ -14,13 +14,13 @@ const L = {}, S = {
14
14
  fill: "none",
15
15
  stroke: "currentColor",
16
16
  "stroke-width": "2"
17
- }, null, -1), I = [
18
- z
17
+ }, null, -1), z = [
18
+ S
19
19
  ];
20
- function A(a, i) {
21
- return n(), b("svg", S, I);
20
+ function I(r, a) {
21
+ return n(), p("svg", L, z);
22
22
  }
23
- const g = /* @__PURE__ */ B(L, [["render", A]]), j = {
23
+ const m = /* @__PURE__ */ C(B, [["render", I]]), A = {
24
24
  variant: {
25
25
  type: String,
26
26
  default: "primary"
@@ -56,7 +56,7 @@ const g = /* @__PURE__ */ B(L, [["render", A]]), j = {
56
56
  iconAfter: {
57
57
  type: [Function, Object]
58
58
  }
59
- }, D = [
59
+ }, j = [
60
60
  "relative inline-flex",
61
61
  "border",
62
62
  "items-center justify-center",
@@ -64,11 +64,11 @@ const g = /* @__PURE__ */ B(L, [["render", A]]), j = {
64
64
  "disabled:opacity-50 disabled:cursor-default",
65
65
  "focus:outline-none focus:ring-2 focus:ring-offset-2",
66
66
  "transition-colors duration-200"
67
- ], O = {
67
+ ], D = {
68
68
  sm: ["px-2 py-1 text-sm"],
69
69
  md: ["px-3 py-2"],
70
70
  lg: ["px-4 py-3"]
71
- }, E = {
71
+ }, O = {
72
72
  primary: ["rounded-md border-transparent bg-primary-base disabled:bg-primary-hover text-sm text-white hover:bg-primary-hover focus:ring-primary-glow"],
73
73
  secondary: ["rounded-md border-primary-stroke bg-primary-body disabled:bg-primary-body-hover text-black text-sm hover:bg-primary-body-hover focus:ring-tertiary-glow"],
74
74
  info: ["rounded-md border-transparent bg-info-base disabled:bg-info-hover text-white text-sm hover:bg-info-hover focus:ring-info-glow"],
@@ -78,57 +78,57 @@ const g = /* @__PURE__ */ B(L, [["render", A]]), j = {
78
78
  touch: ["rounded-full border-transparent text-black hover:bg-primary-body-hover hover:shadow p-3 text-sm focus:ring-tertiary-glow"],
79
79
  link: ["rounded-md border-transparent items-center text-info-base hover:text-info-hover text-sm"],
80
80
  none: ["rounded-md border-transparent text-gray-500"]
81
- }, F = (a = "primary", i = "md") => {
82
- const o = [];
83
- return o.push(...D), o.push(...E[a] ?? []), a !== "touch" && o.push(...O[i] ?? []), o;
84
- }, N = ["disabled", "title", "type"], P = /* @__PURE__ */ _({
81
+ }, E = (r = "primary", a = "md") => {
82
+ const e = [];
83
+ return e.push(...j), e.push(...O[r] ?? []), r !== "touch" && e.push(...D[a] ?? []), e;
84
+ }, F = ["disabled", "title", "type", "onClick"], M = /* @__PURE__ */ x({
85
85
  __name: "OneButton",
86
- props: j,
86
+ props: A,
87
87
  emits: ["click"],
88
- setup(a, { emit: i }) {
89
- const o = i, s = a, h = () => {
90
- o("click");
91
- }, l = t(() => s.icon), c = t(() => s.iconAfter), f = t(() => {
92
- const e = F(s.variant, s.size);
93
- return s.variant === "touch" && s.active && e.push("bg-primary-body-active"), e;
94
- }), y = t(() => s.disabled || s.isLoading), v = t(() => s.label && s.label.length > 0 && s.variant !== "touch"), w = t(() => {
95
- const e = [
88
+ setup(r, { emit: a }) {
89
+ const e = r, g = () => {
90
+ a("click");
91
+ }, i = t(() => e.icon), l = t(() => e.iconAfter), h = t(() => {
92
+ const s = E(e.variant, e.size);
93
+ return e.variant === "touch" && e.active && s.push("bg-primary-body-active"), s;
94
+ }), f = t(() => e.disabled || e.isLoading), y = t(() => e.label && e.label.length > 0 && e.variant !== "touch"), v = t(() => {
95
+ const s = [
96
96
  "inline-block text-ellipsis overflow-hidden"
97
97
  ];
98
- return l.value != null && e.push("ml-2"), c.value != null && e.push("mr-2"), e;
99
- }), u = t(() => {
100
- const e = [];
101
- return s.size === "sm" ? e.push("w-3 h-3") : s.size === "lg" ? e.push("w-5 h-5") : e.push("w-4 h-4"), typeof s.iconClass == "string" ? e.push(s.iconClass) : s.iconClass instanceof Array && e.push(...s.iconClass), e;
98
+ return i.value != null && s.push("ml-2"), l.value != null && s.push("mr-2"), s;
99
+ }), c = t(() => {
100
+ const s = [];
101
+ return e.size === "sm" ? s.push("w-3 h-3") : e.size === "lg" ? s.push("w-5 h-5") : s.push("w-4 h-4"), typeof e.iconClass == "string" ? s.push(e.iconClass) : e.iconClass instanceof Array && s.push(...e.iconClass), s;
102
102
  });
103
- return (e, V) => (n(), b("button", {
104
- class: r(f.value),
105
- disabled: y.value,
106
- title: e.label,
107
- type: e.isSubmit ? "submit" : "button",
108
- onClick: k(h, ["stop"])
103
+ return (s, N) => (n(), p("button", {
104
+ class: o(h.value),
105
+ disabled: f.value,
106
+ title: s.label,
107
+ type: s.isSubmit ? "submit" : "button",
108
+ onClick: _(g, ["stop"])
109
109
  }, [
110
- l.value != null && e.isLoading ? (n(), d(g, {
110
+ i.value != null && s.isLoading ? (n(), u(m, {
111
111
  key: 0,
112
- class: r(u.value)
113
- }, null, 8, ["class"])) : l.value != null ? (n(), d(m(l.value), {
112
+ class: o(c.value)
113
+ }, null, 8, ["class"])) : i.value != null ? (n(), u(b(i.value), {
114
114
  key: 1,
115
- class: r(u.value)
116
- }, null, 8, ["class"])) : p("", !0),
117
- v.value ? (n(), b("span", {
115
+ class: o(c.value)
116
+ }, null, 8, ["class"])) : d("", !0),
117
+ y.value ? (n(), p("span", {
118
118
  key: 2,
119
- class: r(w.value)
120
- }, C(e.label), 3)) : p("", !0),
121
- c.value != null && e.isLoading ? (n(), d(g, {
119
+ class: o(v.value)
120
+ }, k(s.label), 3)) : d("", !0),
121
+ l.value != null && s.isLoading ? (n(), u(m, {
122
122
  key: 3,
123
- class: r(u.value)
124
- }, null, 8, ["class"])) : c.value != null ? (n(), d(m(c.value), {
123
+ class: o(c.value)
124
+ }, null, 8, ["class"])) : l.value != null ? (n(), u(b(l.value), {
125
125
  key: 4,
126
- class: r(u.value)
127
- }, null, 8, ["class"])) : p("", !0)
128
- ], 10, N));
126
+ class: o(c.value)
127
+ }, null, 8, ["class"])) : d("", !0)
128
+ ], 10, F));
129
129
  }
130
130
  });
131
131
  export {
132
- g as S,
133
- P as _
132
+ m as S,
133
+ M as _
134
134
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-e804f148.cjs"),r=require("./card/index.cjs"),e=require("./form/index.cjs"),n=require("./OneBrowserMenu.vue_vue_type_script_setup_true_lang-4b350df0.cjs"),O=require("./dropdown/index.cjs"),a=require("./common/index.cjs");require("vue");require("./_plugin-vue_export-helper-f246444f.cjs");require("./XMarkIcon-f94baa4c.cjs");exports.OneButton=o._sfc_main;exports.OneCard=r.OneCard;exports.OneCardBody=r.OneCardBody;exports.OneCardFooter=r.OneCardFooter;exports.OneCardHeader=r.OneCardHeader;exports.OneForm=e.OneForm;exports.OneFormFeedback=e.OneFormFeedback;exports.OneFormField=e.OneFormField;exports.OneFormInput=e.OneFormInput;exports.OneFormLabel=e.OneFormLabel;exports.OneBrowserMenu=n._sfc_main$3;exports.OneDropdown=n._sfc_main;exports.OneDropdownItem=n._sfc_main$1;exports.OneUserMenu=n._sfc_main$2;exports.OneDropdownDivider=O.OneDropdownDivider;exports.OneAvatar=a.OneAvatar;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-3615f53c.cjs"),r=require("./card/index.cjs"),e=require("./form/index.cjs"),n=require("./OneBrowserMenu.vue_vue_type_script_setup_true_lang-562e2fdb.cjs"),O=require("./dropdown/index.cjs"),a=require("./common/index.cjs");require("vue");require("./_plugin-vue_export-helper-f246444f.cjs");require("./XMarkIcon-f94baa4c.cjs");exports.OneButton=o._sfc_main;exports.OneCard=r.OneCard;exports.OneCardBody=r.OneCardBody;exports.OneCardFooter=r.OneCardFooter;exports.OneCardHeader=r.OneCardHeader;exports.OneForm=e.OneForm;exports.OneFormFeedback=e.OneFormFeedback;exports.OneFormField=e.OneFormField;exports.OneFormInput=e.OneFormInput;exports.OneFormLabel=e.OneFormLabel;exports.OneBrowserMenu=n._sfc_main$3;exports.OneDropdown=n._sfc_main;exports.OneDropdownItem=n._sfc_main$1;exports.OneUserMenu=n._sfc_main$2;exports.OneDropdownDivider=O.OneDropdownDivider;exports.OneAvatar=a.OneAvatar;