@indielayer/ui 1.5.0 → 1.5.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.
Files changed (59) hide show
  1. package/docs/components/toolbar/Toolbar.vue +2 -9
  2. package/docs/pages/component/form/usage.vue +16 -19
  3. package/docs/pages/component/modal/composed.vue +7 -0
  4. package/docs/pages/component/modal/usage.vue +1 -1
  5. package/exports/nuxt.plugin.js +9 -2
  6. package/lib/components/accordion/AccordionItem.vue.js +25 -24
  7. package/lib/components/accordion/theme/AccordionItem.base.theme.js +7 -7
  8. package/lib/components/alert/Alert.vue2.js +4 -3
  9. package/lib/components/button/Button.vue.js +2 -2
  10. package/lib/components/button/Button.vue2.js +26 -26
  11. package/lib/components/checkbox/theme/Checkbox.base.theme.js +35 -35
  12. package/lib/components/inputFooter/theme/InputFooter.base.theme.js +1 -1
  13. package/lib/components/label/theme/Label.base.theme.js +1 -1
  14. package/lib/components/modal/Modal.vue.js +34 -32
  15. package/lib/components/notifications/Notifications.vue.js +1 -0
  16. package/lib/components/popover/Popover.vue.d.ts +7 -25
  17. package/lib/components/popover/Popover.vue.js +12 -12
  18. package/lib/components/radio/theme/Radio.base.theme.js +27 -27
  19. package/lib/components/scroll/Scroll.vue2.js +4 -4
  20. package/lib/components/stepper/Stepper.vue.js +35 -34
  21. package/lib/components/tab/Tab.vue.js +7 -6
  22. package/lib/components/table/Table.vue.js +16 -15
  23. package/lib/components/tooltip/Tooltip.vue.js +1 -1
  24. package/lib/create.d.ts +5 -1
  25. package/lib/create.js +18 -15
  26. package/lib/index.js +1 -1
  27. package/lib/index.umd.js +4 -3
  28. package/lib/node_modules/.pnpm/{floating-vue@5.2.0_vue@3.3.9 → floating-vue@5.2.2_vue@3.3.9}/node_modules/floating-vue/dist/floating-vue.js +208 -183
  29. package/lib/nuxt.plugin.js +9 -2
  30. package/lib/themes/base/index.js +2 -2
  31. package/lib/themes/base/styles.d.ts +2 -0
  32. package/{src/themes/base/styles.css → lib/themes/base/styles.js} +5 -1
  33. package/lib/themes/carbon/index.js +2 -2
  34. package/lib/themes/carbon/styles.d.ts +2 -0
  35. package/lib/themes/carbon/{styles.css.js → styles.js} +2 -1
  36. package/lib/version.d.ts +1 -1
  37. package/lib/version.js +1 -1
  38. package/package.json +2 -2
  39. package/src/components/accordion/AccordionItem.vue +1 -0
  40. package/src/components/accordion/theme/AccordionItem.base.theme.ts +2 -2
  41. package/src/components/alert/Alert.vue +1 -1
  42. package/src/components/button/Button.vue +1 -1
  43. package/src/components/checkbox/theme/Checkbox.base.theme.ts +5 -3
  44. package/src/components/inputFooter/theme/InputFooter.base.theme.ts +1 -1
  45. package/src/components/label/theme/Label.base.theme.ts +1 -1
  46. package/src/components/modal/Modal.vue +4 -2
  47. package/src/components/notifications/Notifications.vue +1 -0
  48. package/src/components/popover/Popover.vue +2 -2
  49. package/src/components/radio/theme/Radio.base.theme.ts +5 -3
  50. package/src/components/scroll/Scroll.vue +1 -1
  51. package/src/components/stepper/Stepper.vue +1 -0
  52. package/src/components/tab/Tab.vue +1 -0
  53. package/src/components/table/Table.vue +1 -1
  54. package/src/create.ts +11 -4
  55. package/src/themes/base/index.ts +2 -2
  56. package/{lib/themes/base/styles.css.js → src/themes/base/styles.ts} +2 -5
  57. package/src/themes/carbon/index.ts +2 -2
  58. package/src/themes/carbon/{styles.css → styles.ts} +2 -0
  59. package/src/version.ts +1 -1
@@ -25,7 +25,7 @@ const isDev = import.meta.env.DEV
25
25
 
26
26
  <template>
27
27
  <x-container fluid class="bg-white dark:bg-secondary-800">
28
- <div class="flex justify-items-center items-center py-2">
28
+ <div class="flex justify-items-center items-center py-2 min-h-[54px]">
29
29
  <a href="/" class="flex items-center">
30
30
  <img src="@/assets/images/logo_mini.svg" width="26" alt="Indielayer"/>
31
31
  <x-divider vertical class="!h-[24px] mx-3"/>
@@ -40,14 +40,7 @@ const isDev = import.meta.env.DEV
40
40
  <x-spacer/>
41
41
 
42
42
  <div class="flex items-center font-semibold text-sm">
43
- <x-select
44
- v-if="isDev"
45
- v-model="selected"
46
- :options="options"
47
- hide-footer
48
- size="sm"
49
- />
50
- <x-divider v-if="isDev" vertical style="height: 10px;" class="px-2"/>
43
+
51
44
  <div class="tracking-wide text-xs">v{{ version }}</div>
52
45
  <x-divider vertical style="height: 10px;" class="px-2 hidden sm:block"/>
53
46
  <x-link
@@ -33,25 +33,22 @@ function onSubmit(isValid: string) {
33
33
 
34
34
  <template>
35
35
  <x-form title="Edit user information" description="Almost all fields are required" @submit="onSubmit">
36
- <div class="grid grid-cols-2 gap-4">
37
- <x-input
38
- v-model="email"
39
- :rules="[rules.isRequired, rules.isEmail]"
40
- name="email"
41
- label="Email"
42
- placeholder="Enter your email"
43
- />
44
- <x-input
45
- v-model="password"
46
- type="password"
47
- :rules="[rules.isRequired]"
48
- name="password"
49
- label="Password"
50
- placeholder="Enter your password"
51
- helper="Must be between 8 and 10 characters"
52
- />
53
- </div>
54
-
36
+ <x-input
37
+ v-model="email"
38
+ :rules="[rules.isRequired, rules.isEmail]"
39
+ name="email"
40
+ label="Email"
41
+ placeholder="Enter your email"
42
+ />
43
+ <x-input
44
+ v-model="password"
45
+ type="password"
46
+ :rules="[rules.isRequired]"
47
+ name="password"
48
+ label="Password"
49
+ placeholder="Enter your password"
50
+ helper="Must be between 8 and 10 characters"
51
+ />
55
52
  <x-textarea
56
53
  v-model="description"
57
54
  name="description"
@@ -10,6 +10,12 @@ const email = ref('')
10
10
  const password = ref('')
11
11
  const description = ref('')
12
12
 
13
+ const selected = ref()
14
+ const options = [
15
+ { value: 'us', label: 'USA' },
16
+ { value: 'u', label: 'United Kingdom' },
17
+ ]
18
+
13
19
  const rules = {
14
20
  isEmail: (v: string) => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid',
15
21
  isRequired: (v: string) => !!v || 'Field is required',
@@ -55,6 +61,7 @@ function onSubmit(isValid: boolean) {
55
61
  placeholder="Description"
56
62
  hide-footer
57
63
  />
64
+ <x-select v-model="selected" :options="options" label="Country" :rules="[rules.isRequired]"/>
58
65
 
59
66
  <!-- <template #tertiary-action>
60
67
  <x-button color="gray" size="lg">Tertiary</x-button>
@@ -33,7 +33,7 @@ const show3 = ref(false)
33
33
  :has-actions="false"
34
34
  :has-header="false"
35
35
  show-close
36
- :dissmissable="false"
36
+ persistent
37
37
  >
38
38
  Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iure praesentium non id dolores vitae. Nam ratione veritatis ab cumque voluptas porro illum, voluptate perferendis ducimus dolorem optio magni assumenda dolore! Doloremque facere aliquid facilis distinctio accusamus, dolorum eligendi consequuntur molestias sapiente non rem vero sed eos minus itaque sunt officiis iste ea repellendus possimus earum maiores? Quo laudantium fuga odit tenetur sint fugit deleniti dolores placeat, accusamus magni consectetur unde totam sunt labore dolor rem consequatur quaerat! Iure temporibus voluptatem cumque, dolore maiores rerum neque vero, iusto veritatis repellat eligendi amet! Molestiae cumque officiis eius harum iste, fuga corporis molestias.
39
39
  </x-modal>
@@ -1,8 +1,15 @@
1
1
  import { defineNuxtPlugin } from '#app'
2
- import create from '../src/create'
2
+ import { BaseTheme, injectIconsKey, injectOptionsKey, injectThemeKey, createUI } from '../src'
3
3
 
4
4
  export default defineNuxtPlugin((nuxtApp) => {
5
- const UI = create(nuxtApp.$config.public?.indielayerOptions)
5
+ const UI = createUI({
6
+ ...nuxtApp.$config.public?.indielayerOptions,
7
+ theme: BaseTheme,
8
+ injectIconsKey,
9
+ injectOptionsKey,
10
+ injectThemeKey,
11
+
12
+ })
6
13
 
7
14
  nuxtApp.vueApp.use(UI)
8
15
  })
@@ -27,13 +27,13 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
27
27
  type: String,
28
28
  default: "right"
29
29
  }
30
- }, oe = {
30
+ }, te = {
31
31
  name: "XAccordionItem",
32
32
  validators: {
33
33
  iconAlign: Z
34
34
  }
35
35
  }, ae = /* @__PURE__ */ V({
36
- ...oe,
36
+ ...te,
37
37
  props: ee,
38
38
  emits: ["expand"],
39
39
  setup(A, { expose: x, emit: _ }) {
@@ -41,40 +41,40 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
41
41
  isInsideAccordion: !1
42
42
  }), w = z(() => u.iconAlign || n.iconAlign), I = D({
43
43
  iconAlign: w
44
- }), o = m(!n.expanded), t = m(!0);
44
+ }), t = m(!n.expanded), o = m(!0);
45
45
  H(() => n.expanded, () => {
46
- o.value = !n.expanded;
46
+ t.value = !n.expanded;
47
47
  });
48
48
  function B(e) {
49
- t.value && (e.style.height = "0px");
49
+ o.value && (e.style.height = "0px");
50
50
  }
51
51
  function E(e, i) {
52
- t.value ? (e.addEventListener("transitionend", i), setTimeout(() => {
52
+ o.value ? (e.addEventListener("transitionend", i), setTimeout(() => {
53
53
  e.style.height = `${e.scrollHeight}px`;
54
54
  }, 1)) : i();
55
55
  }
56
- function C(e) {
57
- t.value ? e.style.removeProperty("height") : t.value = !0;
56
+ function b(e) {
57
+ o.value ? e.style.removeProperty("height") : o.value = !0;
58
58
  }
59
- function $(e) {
60
- t.value && (e.style.height = `${e.scrollHeight}px`);
59
+ function C(e) {
60
+ o.value && (e.style.height = `${e.scrollHeight}px`);
61
61
  }
62
- function b(e, i) {
63
- t.value ? (e.addEventListener("transitionend", i), setTimeout(() => {
62
+ function $(e, i) {
63
+ o.value ? (e.addEventListener("transitionend", i), setTimeout(() => {
64
64
  e.style.height = "0px";
65
65
  }, 1)) : i();
66
66
  }
67
67
  function S(e) {
68
- t.value ? e.style.removeProperty("height") : t.value = !0;
68
+ o.value ? e.style.removeProperty("height") : o.value = !0;
69
69
  }
70
70
  function p(e = !0) {
71
- t.value = e, o.value = !1;
71
+ o.value = e, t.value = !1;
72
72
  }
73
73
  function L(e = !0) {
74
- t.value = e, o.value = !0;
74
+ o.value = e, t.value = !0;
75
75
  }
76
76
  function f() {
77
- n.disabled || (o.value = !o.value);
77
+ n.disabled || (t.value = !t.value);
78
78
  }
79
79
  function P(e = !0) {
80
80
  p(e), k("expand");
@@ -82,20 +82,21 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
82
82
  const { styles: N, classes: c, className: T } = J("AccordionItem", {}, {
83
83
  ...n,
84
84
  ...I
85
- }, { collapsed: o, isInsideAccordion: u.isInsideAccordion });
85
+ }, { collapsed: t, isInsideAccordion: u.isInsideAccordion });
86
86
  return x({ toggle: f, open: p, close: L }), (e, i) => (a(), v(K(e.tag), {
87
87
  style: M(s(N)),
88
88
  class: l(s(T)),
89
89
  "aria-disabled": e.disabled,
90
- "aria-expanded": o.value ? "false" : "true"
90
+ "aria-expanded": t.value ? "false" : "true"
91
91
  }, {
92
92
  default: h(() => [
93
93
  r("button", {
94
+ type: "button",
94
95
  class: l(s(c).wrapper),
95
96
  onClick: f
96
97
  }, [
97
98
  r("div", R, [
98
- d(e.$slots, "default", { collapsed: o.value })
99
+ d(e.$slots, "default", { collapsed: t.value })
99
100
  ]),
100
101
  e.showIcon ? (a(), g("div", {
101
102
  key: 0,
@@ -111,9 +112,9 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
111
112
  X(q, {
112
113
  onBeforeEnter: B,
113
114
  onEnter: E,
114
- onAfterEnter: C,
115
- onBeforeLeave: $,
116
- onLeave: b,
115
+ onAfterEnter: b,
116
+ onBeforeLeave: C,
117
+ onLeave: $,
117
118
  onAfterLeave: S
118
119
  }, {
119
120
  default: h(() => [
@@ -122,10 +123,10 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
122
123
  }, [
123
124
  d(e.$slots, "content", {
124
125
  expand: P,
125
- collapsed: o.value
126
+ collapsed: t.value
126
127
  })
127
128
  ], 2), [
128
- [G, !o.value]
129
+ [G, !t.value]
129
130
  ])
130
131
  ]),
131
132
  _: 3
@@ -1,16 +1,16 @@
1
- const r = {
1
+ const i = {
2
2
  classes: {
3
- wrapper: ({ props: t, slots: i, data: e }) => {
4
- const s = ["relative flex items-center w-full text-left"];
5
- return e.isInsideAccordion && (i.default && (t.iconAlign === "left" ? s.push("pl-8 pr-4") : s.push("pr-8 pl-4"), s.push("py-2"), t.disabled || s.push("hover:bg-secondary-50 dark:hover:bg-secondary-600")), t.disabled || s.push("cursor-pointer")), s;
3
+ wrapper: ({ props: t, slots: r, data: e }) => {
4
+ const s = ["relative flex items-center w-full text-left rounded"];
5
+ return e.isInsideAccordion && (r.default && (t.iconAlign === "left" ? s.push("pl-8 pr-4") : s.push("pr-8 pl-4"), s.push("py-2"), t.disabled || s.push("hover:bg-secondary-100 dark:hover:bg-secondary-600")), t.disabled || s.push("cursor-pointer")), s;
6
6
  },
7
- icon: ({ props: t, data: i }) => {
7
+ icon: ({ props: t, data: r }) => {
8
8
  const e = ["absolute flex transform transition-transform duration-150"];
9
- return i.collapsed || e.push("rotate-180"), t.disabled && e.push("text-secondary-300"), t.iconAlign === "left" ? e.push("left-2") : e.push("right-2"), e;
9
+ return r.collapsed || e.push("rotate-180"), t.disabled && e.push("text-secondary-300"), t.iconAlign === "left" ? e.push("left-2") : e.push("right-2"), e;
10
10
  },
11
11
  content: "transition-[height] duration-150 overflow-y-hidden"
12
12
  }
13
- }, n = r;
13
+ }, n = i;
14
14
  export {
15
15
  n as default
16
16
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, computed as g, openBlock as l, createElementBlock as a, normalizeStyle as k, unref as r, normalizeClass as w, renderSlot as t, createBlock as b, createCommentVNode as i, createElementVNode as n, Fragment as B, createVNode as $ } from "vue";
1
+ import { defineComponent as v, computed as g, openBlock as l, createElementBlock as a, normalizeStyle as k, unref as r, normalizeClass as b, renderSlot as t, createBlock as w, createCommentVNode as i, createElementVNode as n, Fragment as B, createVNode as $ } from "vue";
2
2
  import { useColors as I } from "../../composables/useColors.js";
3
3
  import { useTheme as C } from "../../composables/useTheme.js";
4
4
  import { infoIcon as h, successIcon as N, errorIcon as S, warningIcon as V, closeIcon as z } from "../../common/icons.js";
@@ -24,7 +24,7 @@ const A = /* @__PURE__ */ n("div", { class: "flex-grow" }, null, -1), E = ["aria
24
24
  const o = m, p = g(() => o.type === "info" ? h : o.type === "success" ? N : o.type === "error" ? S : o.type === "warning" ? V : ""), { styles: u, classes: f, className: d } = C("Alert", {}, o);
25
25
  return (e, s) => (l(), a("div", {
26
26
  style: k(r(u)),
27
- class: w([
27
+ class: b([
28
28
  r(d),
29
29
  e.$style.alert,
30
30
  e.glow ? e.$style["alert--glow"] : "",
@@ -32,7 +32,7 @@ const A = /* @__PURE__ */ n("div", { class: "flex-grow" }, null, -1), E = ["aria
32
32
  ])
33
33
  }, [
34
34
  t(e.$slots, "icon", {}, () => [
35
- e.type ? (l(), b(c, {
35
+ e.type ? (l(), w(c, {
36
36
  key: 0,
37
37
  icon: p.value,
38
38
  class: "text-[color:var(--x-alert-icon)] dark:text-[color:var(--x-alert-dark-icon)]"
@@ -44,6 +44,7 @@ const A = /* @__PURE__ */ n("div", { class: "flex-grow" }, null, -1), E = ["aria
44
44
  e.removable ? (l(), a(B, { key: 0 }, [
45
45
  A,
46
46
  n("button", {
47
+ type: "button",
47
48
  class: "shrink-0",
48
49
  "aria-label": e.closeLabel,
49
50
  onClick: s[0] || (s[0] = (y) => e.$emit("remove", y))
@@ -1,9 +1,9 @@
1
1
  import o from "./Button.vue2.js";
2
2
  import s from "./Button.vue3.js";
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = {
4
+ const e = {
5
5
  $style: s
6
- }, m = /* @__PURE__ */ t(o, [["__cssModules", c], ["__scopeId", "data-v-46c0001b"]]);
6
+ }, m = /* @__PURE__ */ t(o, [["__cssModules", e], ["__scopeId", "data-v-b25d6b6e"]]);
7
7
  export {
8
8
  m as default
9
9
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as D, ref as I, inject as T, computed as l, useAttrs as V, unref as e, openBlock as a, createBlock as r, resolveDynamicComponent as A, normalizeClass as u, normalizeStyle as E, withCtx as F, createCommentVNode as d, createElementVNode as m, renderSlot as K } from "vue";
1
+ import { defineComponent as D, ref as I, inject as T, computed as l, useAttrs as V, unref as t, openBlock as a, createBlock as r, resolveDynamicComponent as A, normalizeClass as u, normalizeStyle as E, withCtx as F, createCommentVNode as d, createElementVNode as m, renderSlot as K } from "vue";
2
2
  import { useTheme as O } from "../../composables/useTheme.js";
3
3
  import { useColors as X } from "../../composables/useColors.js";
4
4
  import { useCommon as b } from "../../composables/useCommon.js";
@@ -34,42 +34,42 @@ const J = {
34
34
  validators: {
35
35
  ...b.validators()
36
36
  }
37
- }, eo = /* @__PURE__ */ D({
37
+ }, to = /* @__PURE__ */ D({
38
38
  ...M,
39
39
  props: J,
40
40
  setup(y, { expose: v }) {
41
- const t = y, g = I(null), s = T(q, {
41
+ const e = y, g = I(null), s = T(q, {
42
42
  isButtonGroup: !1,
43
43
  groupProps: {}
44
- }), { isButtonGroup: B } = s, n = l(() => s.groupProps.size || t.size), z = l(() => s.groupProps.flat || t.flat), k = l(() => t.color || s.groupProps.color), P = l(() => t.ghost || s.groupProps.ghost), S = l(() => t.light || s.groupProps.light), w = l(() => t.outlined || s.groupProps.outlined), i = l(() => t.disabled || s.groupProps.disabled), p = l(() => t.icon || t.iconLeft), C = V(), R = l(() => C.href ? "a" : t.to ? "router-link" : t.tag), L = l(() => ({
45
- size: e(n),
46
- flat: e(z),
47
- color: e(k),
48
- ghost: e(P),
49
- light: e(S),
50
- outlined: e(w),
51
- disabled: e(i),
52
- loading: t.loading,
53
- block: t.block,
54
- glow: t.glow,
55
- iconLeft: e(p),
56
- iconRight: t.iconRight,
57
- rounded: t.rounded
44
+ }), { isButtonGroup: B } = s, n = l(() => s.groupProps.size || e.size), z = l(() => s.groupProps.flat || e.flat), k = l(() => e.color || s.groupProps.color), P = l(() => e.ghost || s.groupProps.ghost), S = l(() => e.light || s.groupProps.light), w = l(() => e.outlined || s.groupProps.outlined), i = l(() => e.disabled || s.groupProps.disabled), p = l(() => e.icon || e.iconLeft), C = V(), R = l(() => C.href ? "a" : e.to ? "router-link" : e.tag), L = l(() => ({
45
+ size: t(n),
46
+ flat: t(z),
47
+ color: t(k),
48
+ ghost: t(P),
49
+ light: t(S),
50
+ outlined: t(w),
51
+ disabled: t(i),
52
+ loading: e.loading,
53
+ block: e.block,
54
+ glow: e.glow,
55
+ iconLeft: t(p),
56
+ iconRight: e.iconRight,
57
+ rounded: e.rounded
58
58
  })), { className: G, classes: c, styles: $ } = O("Button", {}, L, {
59
59
  isButtonGroup: B
60
- }), { focus: N, blur: j } = h(g);
61
- return v({ focus: N, blur: j }), (o, Q) => (a(), r(A(R.value), {
60
+ }), { focus: j, blur: N } = h(g);
61
+ return v({ focus: j, blur: N }), (o, Q) => (a(), r(A(R.value), {
62
62
  ref_key: "elRef",
63
63
  ref: g,
64
64
  to: o.to,
65
65
  class: u([
66
- e(G),
66
+ t(G),
67
67
  o.$style.button,
68
68
  o.glow && !i.value && !o.loading ? o.$style["button--glow"] : "",
69
- e(c).wrapper,
69
+ t(c).wrapper,
70
70
  { "w-full": o.block }
71
71
  ]),
72
- style: E(e($)),
72
+ style: E(t($)),
73
73
  "aria-busy": o.loading ? "true" : null,
74
74
  "aria-disabled": o.tag !== "button" && i.value ? "true" : null,
75
75
  disabled: i.value || o.loading,
@@ -84,14 +84,14 @@ const J = {
84
84
  status: o.loadingStatus
85
85
  }, null, 8, ["size", "label", "status"])) : d("", !0),
86
86
  m("div", {
87
- class: u({ invisible: o.loading })
87
+ class: u(["inline-flex items-center justify-center", { invisible: o.loading }])
88
88
  }, [
89
89
  p.value ? (a(), r(f, {
90
90
  key: 0,
91
91
  size: n.value,
92
92
  icon: p.value,
93
93
  class: u([
94
- e(c).iconLeft
94
+ t(c).iconLeft
95
95
  ])
96
96
  }, null, 8, ["size", "icon", "class"])) : d("", !0),
97
97
  m("span", null, [
@@ -103,7 +103,7 @@ const J = {
103
103
  size: n.value,
104
104
  icon: o.iconRight,
105
105
  class: u([
106
- e(c).iconRight,
106
+ t(c).iconRight,
107
107
  { invisible: o.loading }
108
108
  ])
109
109
  }, null, 8, ["size", "icon", "class"])) : d("", !0)
@@ -113,5 +113,5 @@ const J = {
113
113
  }
114
114
  });
115
115
  export {
116
- eo as default
116
+ to as default
117
117
  };
@@ -1,59 +1,59 @@
1
- const o = {
1
+ const i = {
2
2
  classes: {
3
- wrapper: ({ data: r }) => {
4
- const e = ["inline-block relative cursor-pointer align-middle"];
5
- return r.isInsideForm && !r.isInsideFormGroup && e.push("mb-3"), e;
3
+ wrapper: ({ data: e }) => {
4
+ const r = ["inline-block relative cursor-pointer align-middle"];
5
+ return e.isInsideForm && !e.isInsideFormGroup && r.push("mb-5"), r;
6
6
  },
7
- box: ({ props: r }) => {
8
- const e = ["rounded flex justify-center items-center shrink-0 border border-[color:var(--x-checkbox-border)] bg-[color:var(--x-checkbox-bg)] dark:border-[color:var(--x-checkbox-dark-border)] dark:bg-[color:var(--x-checkbox-dark-bg)]"];
9
- return r.size === "lg" ? e.push("h-5 w-5") : r.size === "xl" ? e.push("h-6 w-6") : e.push("h-4 w-4"), e;
7
+ box: ({ props: e }) => {
8
+ const r = ["rounded flex justify-center items-center shrink-0 border border-[color:var(--x-checkbox-border)] bg-[color:var(--x-checkbox-bg)] dark:border-[color:var(--x-checkbox-dark-border)] dark:bg-[color:var(--x-checkbox-dark-bg)]"];
9
+ return e.size === "lg" ? r.push("h-5 w-5") : e.size === "xl" ? r.push("h-6 w-6") : r.push("h-4 w-4"), r;
10
10
  },
11
- content: ({ props: r }) => {
12
- const e = ["flex items-baseline"];
13
- return r.disabled && e.push("cursor-not-allowed"), e;
11
+ content: ({ props: e }) => {
12
+ const r = ["flex items-baseline"];
13
+ return e.disabled && r.push("cursor-not-allowed"), r;
14
14
  },
15
- icon: ({ props: r }) => {
16
- const e = ["fill-current text-white"];
17
- return r.size === "lg" ? e.push("h-3 w-3") : r.size === "xl" ? e.push("h-4 w-4") : e.push("h-2.5 w-2.5"), e;
15
+ icon: ({ props: e }) => {
16
+ const r = ["fill-current text-white"];
17
+ return e.size === "lg" ? r.push("h-3 w-3") : e.size === "xl" ? r.push("h-4 w-4") : r.push("h-2.5 w-2.5"), r;
18
18
  },
19
- label: ({ props: r }) => {
20
- const e = ["inline-block font-medium text-secondary-800 dark:text-secondary-200 pl-2"];
21
- return r.size === "xs" ? e.push("text-xs") : r.size === "sm" ? e.push("text-sm") : r.size === "lg" ? e.push("text-lg") : r.size === "xl" && e.push("text-xl"), e;
19
+ label: ({ props: e, data: r }) => {
20
+ const s = ["inline-block text-secondary-800 dark:text-secondary-200 pl-2"];
21
+ return s.push(r.isInsideFormGroup ? "font-normal" : "font-medium"), e.size === "xs" ? s.push("text-xs") : e.size === "sm" ? s.push("text-sm") : e.size === "lg" ? s.push("text-lg") : e.size === "xl" && s.push("text-xl"), s;
22
22
  }
23
23
  },
24
- styles({ props: r, colors: e, css: l, data: i }) {
25
- const s = e.getPalette("gray"), t = e.getPalette(r.color), a = [];
26
- return r.loading ? l.variables({
24
+ styles({ props: e, colors: r, css: s, data: a }) {
25
+ const t = r.getPalette("gray"), l = r.getPalette(e.color), o = [];
26
+ return e.loading ? s.variables({
27
27
  bg: "transparent",
28
28
  border: "transparent",
29
29
  dark: {
30
30
  bg: "transparent",
31
31
  border: "transparent"
32
32
  }
33
- }) : (r.disabled ? a.push(l.variables({
34
- bg: s[100],
35
- border: s[200],
33
+ }) : (e.disabled ? o.push(s.variables({
34
+ bg: t[100],
35
+ border: t[200],
36
36
  dark: {
37
- bg: s[800],
38
- border: s[700]
37
+ bg: t[800],
38
+ border: t[700]
39
39
  }
40
- })) : (i.checked ? a.push(l.variables({
41
- bg: t[500],
42
- border: t[500],
40
+ })) : (a.checked ? o.push(s.variables({
41
+ bg: l[500],
42
+ border: l[500],
43
43
  dark: {
44
- bg: t[500],
45
- border: t[500]
44
+ bg: l[500],
45
+ border: l[500]
46
46
  }
47
- })) : a.push(l.variables({
47
+ })) : o.push(s.variables({
48
48
  bg: "#fff",
49
- border: r.glow ? t[300] : s[300],
49
+ border: e.glow ? l[300] : t[300],
50
50
  dark: {
51
- bg: s[900],
52
- border: r.glow ? t[300] : s[400]
51
+ bg: t[900],
52
+ border: e.glow ? l[300] : t[400]
53
53
  }
54
- })), r.glow && a.push(l.get("glow", e.getColorOpacity(t[500], 0.5)))), a);
54
+ })), e.glow && o.push(s.get("glow", r.getColorOpacity(l[500], 0.5)))), o);
55
55
  }
56
- }, n = o;
56
+ }, n = i;
57
57
  export {
58
58
  n as default
59
59
  };
@@ -1,6 +1,6 @@
1
1
  const e = {
2
2
  classes: {
3
- wrapper: "min-h-[1.3rem] text-xs mt-1",
3
+ wrapper: "text-xs mt-1",
4
4
  helperText: "text-secondary-500 dark:text-secondary-400",
5
5
  errorText: "text-error-500 dark:text-error-400"
6
6
  }
@@ -2,7 +2,7 @@ const s = {
2
2
  classes: {
3
3
  wrapper: ({ props: t }) => {
4
4
  const e = ["block relative align-bottom focus:outline-none"];
5
- return t.isInsideForm && e.push("mb-3"), t.block && e.push("w-full"), e;
5
+ return t.isInsideForm && e.push("mb-5"), t.block && e.push("w-full"), e;
6
6
  },
7
7
  label: ({ props: t }) => {
8
8
  const e = "flex items-center gap-2 font-medium text-secondary-800 dark:text-secondary-200 mb-1";