@equal-experts/kuat-vue 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +60 -142
  2. package/dist/FieldSet.vue_vue_type_script_setup_true_lang-D9i4ciy0.js +119 -0
  3. package/dist/FieldTitle.vue_vue_type_script_setup_true_lang-Bu8UIwRT.js +108 -0
  4. package/dist/KuatSelect.vue_vue_type_script_setup_true_lang-DP66U_wg.js +493 -0
  5. package/dist/Toggle.vue_vue_type_script_setup_true_lang-CZM1GrLQ.js +38 -0
  6. package/dist/accordion.js +7 -6
  7. package/dist/alert-dialog.js +13 -12
  8. package/dist/badge.js +4 -3
  9. package/dist/button-group.js +7 -6
  10. package/dist/button.js +4 -3
  11. package/dist/checkbox.d.ts +3 -0
  12. package/dist/checkbox.js +10 -0
  13. package/dist/components/ui/checkbox/Checkbox.vue.d.ts +13 -0
  14. package/dist/components/ui/checkbox/CheckboxField.vue.d.ts +68 -0
  15. package/dist/components/ui/checkbox/constants.d.ts +4 -0
  16. package/dist/components/ui/checkbox/index.d.ts +4 -0
  17. package/dist/components/ui/field/Field.vue.d.ts +48 -0
  18. package/dist/components/ui/field/FieldContent.vue.d.ts +26 -0
  19. package/dist/components/ui/field/FieldDescription.vue.d.ts +26 -0
  20. package/dist/components/ui/field/FieldError.vue.d.ts +33 -0
  21. package/dist/components/ui/field/FieldGroup.vue.d.ts +26 -0
  22. package/dist/components/ui/field/FieldLabel.vue.d.ts +26 -0
  23. package/dist/components/ui/field/FieldLegend.vue.d.ts +43 -0
  24. package/dist/components/ui/field/FieldSeparator.vue.d.ts +26 -0
  25. package/dist/components/ui/field/FieldSet.vue.d.ts +26 -0
  26. package/dist/components/ui/field/FieldTitle.vue.d.ts +26 -0
  27. package/dist/components/ui/field/constants.d.ts +4 -0
  28. package/dist/components/ui/field/index.d.ts +12 -0
  29. package/dist/components/ui/input/Input.vue.d.ts +34 -0
  30. package/dist/components/ui/input/constants.d.ts +2 -0
  31. package/dist/components/ui/input/index.d.ts +3 -0
  32. package/dist/components/ui/radio/RadioField.vue.d.ts +58 -0
  33. package/dist/components/ui/radio/RadioGroup.vue.d.ts +31 -0
  34. package/dist/components/ui/radio/RadioGroupItem.vue.d.ts +22 -0
  35. package/dist/components/ui/radio/constants.d.ts +4 -0
  36. package/dist/components/ui/radio/index.d.ts +5 -0
  37. package/dist/components/ui/select/KuatSelect.vue.d.ts +104 -0
  38. package/dist/components/ui/select/Select.vue.d.ts +28 -0
  39. package/dist/components/ui/select/SelectContent.vue.d.ts +52 -0
  40. package/dist/components/ui/select/SelectGroup.vue.d.ts +22 -0
  41. package/dist/components/ui/select/SelectItem.vue.d.ts +40 -0
  42. package/dist/components/ui/select/SelectLabel.vue.d.ts +27 -0
  43. package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +18 -0
  44. package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +18 -0
  45. package/dist/components/ui/select/SelectSeparator.vue.d.ts +18 -0
  46. package/dist/components/ui/select/SelectTrigger.vue.d.ts +72 -0
  47. package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
  48. package/dist/components/ui/select/constants.d.ts +18 -0
  49. package/dist/components/ui/select/index.d.ts +13 -0
  50. package/dist/components/ui/switch/Switch.vue.d.ts +13 -0
  51. package/dist/components/ui/switch/SwitchField.vue.d.ts +68 -0
  52. package/dist/components/ui/switch/constants.d.ts +4 -0
  53. package/dist/components/ui/switch/index.d.ts +4 -0
  54. package/dist/components/ui/textarea/Textarea.vue.d.ts +24 -0
  55. package/dist/components/ui/textarea/constants.d.ts +2 -0
  56. package/dist/components/ui/textarea/index.d.ts +3 -0
  57. package/dist/components/ui/toggle/Toggle.vue.d.ts +42 -0
  58. package/dist/components/ui/toggle/constants.d.ts +4 -0
  59. package/dist/components/ui/toggle/index.d.ts +3 -0
  60. package/dist/components/ui/toggle-group/ToggleGroup.vue.d.ts +45 -0
  61. package/dist/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +49 -0
  62. package/dist/components/ui/toggle-group/constants.d.ts +2 -0
  63. package/dist/components/ui/toggle-group/index.d.ts +4 -0
  64. package/dist/constants-4SN0MW4f.js +61 -0
  65. package/dist/constants-BpzIL1jq.js +141 -0
  66. package/dist/constants-CXAkjttx.js +5 -0
  67. package/dist/constants-CpIWAssv.js +32 -0
  68. package/dist/constants-D_fYMnOg.js +154 -0
  69. package/dist/constants-Ils7NSfg.js +131 -0
  70. package/dist/field.d.ts +3 -0
  71. package/dist/field.js +19 -0
  72. package/dist/index.d.ts +18 -0
  73. package/dist/index.js +781 -721
  74. package/dist/input.d.ts +3 -0
  75. package/dist/input.js +8 -0
  76. package/dist/radio.d.ts +3 -0
  77. package/dist/radio.js +11 -0
  78. package/dist/select.d.ts +3 -0
  79. package/dist/select.js +19 -0
  80. package/dist/style.css +1 -1
  81. package/dist/switch.d.ts +1 -0
  82. package/dist/switch.js +7 -0
  83. package/dist/textarea.d.ts +3 -0
  84. package/dist/textarea.js +8 -0
  85. package/dist/toggle-group.d.ts +5 -0
  86. package/dist/toggle-group.js +71 -0
  87. package/dist/toggle.d.ts +3 -0
  88. package/dist/toggle.js +10 -0
  89. package/package.json +47 -11
@@ -0,0 +1,45 @@
1
+ import { HTMLAttributes } from 'vue';
2
+ import { ToggleGroupRootProps } from 'reka-ui';
3
+
4
+ declare function __VLS_template(): {
5
+ default?(_: {}): any;
6
+ };
7
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ToggleGroupRootProps<import('reka-ui').AcceptableValue | import('reka-ui').AcceptableValue[]> & {
8
+ class?: HTMLAttributes["class"];
9
+ }>, {
10
+ orientation: string;
11
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ "update:modelValue": (payload: import('reka-ui').AcceptableValue | import('reka-ui').AcceptableValue[]) => void;
13
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ToggleGroupRootProps<import('reka-ui').AcceptableValue | import('reka-ui').AcceptableValue[]> & {
14
+ class?: HTMLAttributes["class"];
15
+ }>, {
16
+ orientation: string;
17
+ }>>> & Readonly<{
18
+ "onUpdate:modelValue"?: ((payload: import('reka-ui').AcceptableValue | import('reka-ui').AcceptableValue[]) => any) | undefined;
19
+ }>, {
20
+ orientation: "vertical" | "horizontal";
21
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
23
+ export default _default;
24
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
25
+ type __VLS_TypePropsToRuntimeProps<T> = {
26
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
27
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
28
+ } : {
29
+ type: import('vue').PropType<T[K]>;
30
+ required: true;
31
+ };
32
+ };
33
+ type __VLS_WithDefaults<P, D> = {
34
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
35
+ default: D[K];
36
+ }> : P[K];
37
+ };
38
+ type __VLS_Prettify<T> = {
39
+ [K in keyof T]: T[K];
40
+ } & {};
41
+ type __VLS_WithTemplateSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,49 @@
1
+ import { HTMLAttributes } from 'vue';
2
+ import { ToggleGroupItemProps } from 'reka-ui';
3
+ import { ToggleSize, ToggleSkin } from '../toggle/constants';
4
+
5
+ declare function __VLS_template(): {
6
+ default?(_: {}): any;
7
+ };
8
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ToggleGroupItemProps & {
9
+ class?: HTMLAttributes["class"];
10
+ size?: ToggleSize;
11
+ skin?: ToggleSkin;
12
+ }>, {
13
+ size: string;
14
+ skin: string;
15
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ToggleGroupItemProps & {
16
+ class?: HTMLAttributes["class"];
17
+ size?: ToggleSize;
18
+ skin?: ToggleSkin;
19
+ }>, {
20
+ size: string;
21
+ skin: string;
22
+ }>>> & Readonly<{}>, {
23
+ size: ToggleSize;
24
+ skin: ToggleSkin;
25
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
26
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
27
+ export default _default;
28
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
29
+ type __VLS_TypePropsToRuntimeProps<T> = {
30
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
31
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
32
+ } : {
33
+ type: import('vue').PropType<T[K]>;
34
+ required: true;
35
+ };
36
+ };
37
+ type __VLS_WithDefaults<P, D> = {
38
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
39
+ default: D[K];
40
+ }> : P[K];
41
+ };
42
+ type __VLS_Prettify<T> = {
43
+ [K in keyof T]: T[K];
44
+ } & {};
45
+ type __VLS_WithTemplateSlots<T, S> = T & {
46
+ new (): {
47
+ $slots: S;
48
+ };
49
+ };
@@ -0,0 +1,2 @@
1
+ export declare const TOGGLE_GROUP_ORIENTATIONS: readonly ["horizontal", "vertical"];
2
+ export type ToggleGroupOrientation = (typeof TOGGLE_GROUP_ORIENTATIONS)[number];
@@ -0,0 +1,4 @@
1
+ export { default as ToggleGroup } from './ToggleGroup.vue';
2
+ export { default as ToggleGroupItem } from './ToggleGroupItem.vue';
3
+ export { TOGGLE_GROUP_ORIENTATIONS } from './constants';
4
+ export type { ToggleGroupOrientation } from './constants';
@@ -0,0 +1,61 @@
1
+ import { defineComponent as _, mergeModels as v, useModel as g, useAttrs as y, computed as u, createElementBlock as t, openBlock as s, normalizeClass as h, unref as k, createCommentVNode as d, withDirectives as D, renderSlot as c, mergeProps as p, vModelDynamic as I } from "vue";
2
+ import { c as V } from "./utils-DLUjLwnh.js";
3
+ const $ = {
4
+ key: 0,
5
+ class: "input__decoration input__decoration--left"
6
+ }, z = {
7
+ key: 3,
8
+ class: "input__decoration input__decoration--right"
9
+ }, C = /* @__PURE__ */ _({
10
+ inheritAttrs: !1,
11
+ __name: "Input",
12
+ props: /* @__PURE__ */ v({
13
+ class: {},
14
+ size: { default: "regular" }
15
+ }, {
16
+ modelValue: { required: !1 },
17
+ modelModifiers: {}
18
+ }),
19
+ emits: ["update:modelValue"],
20
+ setup(n) {
21
+ const i = n, a = g(n, "modelValue"), m = y(), o = u(() => {
22
+ const { class: e, ...l } = m;
23
+ return l;
24
+ }), r = u(() => o.value.type === "file");
25
+ return (e, l) => (s(), t("div", {
26
+ "data-slot": "input",
27
+ class: h(
28
+ k(V)(
29
+ "input",
30
+ `input--size-${i.size}`,
31
+ r.value && "input--type-file",
32
+ i.class
33
+ )
34
+ )
35
+ }, [
36
+ e.$slots.leftDecoration ? (s(), t("span", $, [
37
+ c(e.$slots, "leftDecoration")
38
+ ])) : d("", !0),
39
+ r.value ? (s(), t("input", p({
40
+ key: 2,
41
+ "data-slot": "input-field",
42
+ class: "input__field"
43
+ }, o.value), null, 16)) : D((s(), t("input", p({
44
+ key: 1,
45
+ "data-slot": "input-field",
46
+ class: "input__field"
47
+ }, o.value, {
48
+ "onUpdate:modelValue": l[0] || (l[0] = (f) => a.value = f)
49
+ }), null, 16)), [
50
+ [I, a.value]
51
+ ]),
52
+ e.$slots.rightDecoration ? (s(), t("span", z, [
53
+ c(e.$slots, "rightDecoration")
54
+ ])) : d("", !0)
55
+ ], 2));
56
+ }
57
+ }), S = ["regular", "large", "small", "mini"];
58
+ export {
59
+ S as I,
60
+ C as _
61
+ };
@@ -0,0 +1,141 @@
1
+ import { defineComponent as k, mergeModels as y, useModel as v, useAttrs as V, computed as d, createBlock as b, openBlock as x, unref as a, mergeProps as C, withCtx as c, createVNode as o, useId as g, normalizeClass as E, createElementVNode as I, createCommentVNode as S, createTextVNode as h, toDisplayString as p } from "vue";
2
+ import { c as A } from "./utils-DLUjLwnh.js";
3
+ import { _ as T, c as M, a as N, d as O, b as P } from "./FieldTitle.vue_vue_type_script_setup_true_lang-Bu8UIwRT.js";
4
+ import { CheckboxRoot as D, CheckboxIndicator as F } from "reka-ui";
5
+ import { Check as L, Minus as U } from "lucide-vue-next";
6
+ import { r as q } from "./index-A7umpmtg.js";
7
+ const w = /* @__PURE__ */ k({
8
+ inheritAttrs: !1,
9
+ __name: "Checkbox",
10
+ props: /* @__PURE__ */ y({
11
+ class: {}
12
+ }, {
13
+ modelValue: { type: [Boolean, String], required: !1 },
14
+ modelModifiers: {}
15
+ }),
16
+ emits: ["update:modelValue"],
17
+ setup(e) {
18
+ const s = e, t = v(e, "modelValue"), u = V(), f = d(() => {
19
+ const { class: i, ...l } = u;
20
+ return l;
21
+ });
22
+ return (i, l) => (x(), b(a(D), C({
23
+ modelValue: t.value,
24
+ "onUpdate:modelValue": l[0] || (l[0] = (m) => t.value = m),
25
+ "data-slot": "checkbox",
26
+ class: a(A)("checkbox", s.class)
27
+ }, f.value), {
28
+ default: c(() => [
29
+ o(a(F), { class: "checkbox__indicator" }, {
30
+ default: c(() => [
31
+ o(a(L), {
32
+ class: "checkbox__icon checkbox__icon--check",
33
+ "aria-hidden": "true"
34
+ }),
35
+ o(a(U), {
36
+ class: "checkbox__icon checkbox__icon--indeterminate",
37
+ "aria-hidden": "true"
38
+ })
39
+ ]),
40
+ _: 1
41
+ })
42
+ ]),
43
+ _: 1
44
+ }, 16, ["modelValue", "class"]));
45
+ }
46
+ }), H = { class: "checkbox-field__checkbox-wrap" }, G = /* @__PURE__ */ k({
47
+ inheritAttrs: !1,
48
+ __name: "CheckboxField",
49
+ props: /* @__PURE__ */ y({
50
+ class: {},
51
+ label: {},
52
+ secondaryText: {},
53
+ appearance: { default: "plain" },
54
+ layout: { default: "inline" },
55
+ flipped: { type: Boolean, default: !1 },
56
+ id: {},
57
+ disabled: { type: Boolean }
58
+ }, {
59
+ modelValue: { type: [Boolean, String], required: !1 },
60
+ modelModifiers: {}
61
+ }),
62
+ emits: ["update:modelValue"],
63
+ setup(e) {
64
+ const s = e, t = v(e, "modelValue"), u = V(), f = g(), i = d(() => s.id ?? f), l = d(() => s.secondaryText != null), m = q(s, [
65
+ "label",
66
+ "secondaryText",
67
+ "appearance",
68
+ "layout",
69
+ "flipped",
70
+ "id",
71
+ "class",
72
+ "disabled"
73
+ ]), _ = d(() => {
74
+ const { class: n, ...r } = u;
75
+ return { ...m, ...r };
76
+ }), B = d(() => {
77
+ const n = _.value["aria-invalid"];
78
+ return n === !0 || n === "true";
79
+ });
80
+ return (n, r) => (x(), b(a(T), {
81
+ "data-slot": "checkbox-field",
82
+ class: E(
83
+ a(A)(
84
+ "checkbox-field",
85
+ `checkbox-field--appearance-${e.appearance}`,
86
+ `checkbox-field--layout-${e.layout}`,
87
+ l.value && "checkbox-field--has-secondary",
88
+ e.flipped && "checkbox-field--flipped",
89
+ e.disabled && "checkbox-field--disabled",
90
+ B.value && "checkbox-field--invalid",
91
+ s.class
92
+ )
93
+ )
94
+ }, {
95
+ default: c(() => [
96
+ o(a(M), {
97
+ class: "checkbox-field__label",
98
+ for: i.value
99
+ }, {
100
+ default: c(() => [
101
+ I("span", H, [
102
+ o(w, C({
103
+ id: i.value,
104
+ modelValue: t.value,
105
+ "onUpdate:modelValue": r[0] || (r[0] = ($) => t.value = $)
106
+ }, _.value, { disabled: e.disabled }), null, 16, ["id", "modelValue", "disabled"])
107
+ ]),
108
+ o(a(N), { class: "checkbox-field__text" }, {
109
+ default: c(() => [
110
+ o(a(O), { class: "checkbox-field__primary" }, {
111
+ default: c(() => [
112
+ h(p(e.label), 1)
113
+ ]),
114
+ _: 1
115
+ }),
116
+ l.value ? (x(), b(a(P), {
117
+ key: 0,
118
+ class: "checkbox-field__secondary"
119
+ }, {
120
+ default: c(() => [
121
+ h(p(e.secondaryText), 1)
122
+ ]),
123
+ _: 1
124
+ })) : S("", !0)
125
+ ]),
126
+ _: 1
127
+ })
128
+ ]),
129
+ _: 1
130
+ }, 8, ["for"])
131
+ ]),
132
+ _: 1
133
+ }, 8, ["class"]));
134
+ }
135
+ }), J = ["plain", "card"], Q = ["inline", "block"];
136
+ export {
137
+ J as C,
138
+ w as _,
139
+ G as a,
140
+ Q as b
141
+ };
@@ -0,0 +1,5 @@
1
+ const a = ["mini", "small", "regular", "large"], s = ["outlined", "ghost"];
2
+ export {
3
+ a as T,
4
+ s as a
5
+ };
@@ -0,0 +1,32 @@
1
+ import { defineComponent as c, mergeModels as d, useModel as i, useAttrs as u, computed as m, withDirectives as p, createElementBlock as f, openBlock as x, mergeProps as v, unref as A, vModelText as E } from "vue";
2
+ import { c as T } from "./utils-DLUjLwnh.js";
3
+ const M = /* @__PURE__ */ c({
4
+ inheritAttrs: !1,
5
+ __name: "Textarea",
6
+ props: /* @__PURE__ */ d({
7
+ class: {},
8
+ resize: { default: "vertical" }
9
+ }, {
10
+ modelValue: { required: !1 },
11
+ modelModifiers: {}
12
+ }),
13
+ emits: ["update:modelValue"],
14
+ setup(t) {
15
+ const s = t, a = i(t, "modelValue"), r = u(), o = m(() => {
16
+ const { class: l, ...e } = r;
17
+ return e;
18
+ });
19
+ return (l, e) => p((x(), f("textarea", v({
20
+ "data-slot": "textarea",
21
+ class: A(T)("textarea", `textarea--resize-${s.resize}`, s.class)
22
+ }, o.value, {
23
+ "onUpdate:modelValue": e[0] || (e[0] = (n) => a.value = n)
24
+ }), null, 16)), [
25
+ [E, a.value]
26
+ ]);
27
+ }
28
+ }), V = ["none", "vertical", "horizontal", "both"];
29
+ export {
30
+ V as T,
31
+ M as _
32
+ };
@@ -0,0 +1,154 @@
1
+ import { defineComponent as m, createBlock as u, openBlock as p, unref as a, mergeProps as _, withCtx as o, renderSlot as h, createVNode as r, createElementVNode as R, useAttrs as A, useId as C, computed as c, normalizeClass as V, createCommentVNode as g, createTextVNode as B, toDisplayString as I } from "vue";
2
+ import { useForwardPropsEmits as x, RadioGroupRoot as E, RadioGroupItem as T, RadioGroupIndicator as w } from "reka-ui";
3
+ import { c as y } from "./utils-DLUjLwnh.js";
4
+ import { _ as D, c as G, a as N, d as P, b as S } from "./FieldTitle.vue_vue_type_script_setup_true_lang-Bu8UIwRT.js";
5
+ import { r as k } from "./index-A7umpmtg.js";
6
+ const j = /* @__PURE__ */ m({
7
+ __name: "RadioGroup",
8
+ props: {
9
+ modelValue: {},
10
+ defaultValue: {},
11
+ disabled: { type: Boolean },
12
+ orientation: {},
13
+ dir: {},
14
+ loop: { type: Boolean },
15
+ asChild: { type: Boolean },
16
+ as: {},
17
+ name: {},
18
+ required: { type: Boolean },
19
+ class: {}
20
+ },
21
+ emits: ["update:modelValue"],
22
+ setup(e, { emit: s }) {
23
+ const t = e, d = x(t, s);
24
+ return (l, i) => (p(), u(a(E), _({ "data-slot": "radio-group" }, a(d), {
25
+ class: a(y)("radio-group", t.class)
26
+ }), {
27
+ default: o(() => [
28
+ h(l.$slots, "default")
29
+ ]),
30
+ _: 3
31
+ }, 16, ["class"]));
32
+ }
33
+ }), F = /* @__PURE__ */ m({
34
+ __name: "RadioGroupItem",
35
+ props: {
36
+ id: {},
37
+ value: {},
38
+ disabled: { type: Boolean },
39
+ asChild: { type: Boolean },
40
+ as: {},
41
+ name: {},
42
+ required: { type: Boolean },
43
+ class: {}
44
+ },
45
+ emits: ["select"],
46
+ setup(e, { emit: s }) {
47
+ const t = e, d = x(t, s);
48
+ return (l, i) => (p(), u(a(T), _({ "data-slot": "radio-group-item" }, a(d), {
49
+ class: a(y)("radio", t.class)
50
+ }), {
51
+ default: o(() => [
52
+ r(a(w), { class: "radio__indicator" }, {
53
+ default: o(() => [...i[0] || (i[0] = [
54
+ R("span", {
55
+ class: "radio__dot",
56
+ "aria-hidden": "true"
57
+ }, null, -1)
58
+ ])]),
59
+ _: 1
60
+ })
61
+ ]),
62
+ _: 1
63
+ }, 16, ["class"]));
64
+ }
65
+ }), O = { class: "radio-field__radio-wrap" }, H = /* @__PURE__ */ m({
66
+ inheritAttrs: !1,
67
+ __name: "RadioField",
68
+ props: {
69
+ class: {},
70
+ label: {},
71
+ secondaryText: {},
72
+ appearance: { default: "plain" },
73
+ layout: { default: "inline" },
74
+ flipped: { type: Boolean, default: !1 },
75
+ id: {},
76
+ disabled: { type: Boolean },
77
+ value: {}
78
+ },
79
+ setup(e) {
80
+ const s = e, t = A(), f = C(), d = c(() => s.id ?? f), l = c(() => s.secondaryText != null), i = k(s, [
81
+ "label",
82
+ "secondaryText",
83
+ "appearance",
84
+ "layout",
85
+ "flipped",
86
+ "id",
87
+ "class",
88
+ "disabled"
89
+ ]), b = c(() => {
90
+ const { class: n, ...v } = t;
91
+ return { ...i, ...v };
92
+ }), $ = c(() => {
93
+ const n = b.value["aria-invalid"];
94
+ return n === !0 || n === "true";
95
+ });
96
+ return (n, v) => (p(), u(a(D), {
97
+ "data-slot": "radio-field",
98
+ class: V(
99
+ a(y)(
100
+ "radio-field",
101
+ `radio-field--appearance-${e.appearance}`,
102
+ `radio-field--layout-${e.layout}`,
103
+ l.value && "radio-field--has-secondary",
104
+ e.flipped && "radio-field--flipped",
105
+ e.disabled && "radio-field--disabled",
106
+ $.value && "radio-field--invalid",
107
+ s.class
108
+ )
109
+ )
110
+ }, {
111
+ default: o(() => [
112
+ r(a(G), {
113
+ class: "radio-field__label",
114
+ for: d.value
115
+ }, {
116
+ default: o(() => [
117
+ R("span", O, [
118
+ r(F, _({ id: d.value }, b.value, { disabled: e.disabled }), null, 16, ["id", "disabled"])
119
+ ]),
120
+ r(a(N), { class: "radio-field__text" }, {
121
+ default: o(() => [
122
+ r(a(P), { class: "radio-field__primary" }, {
123
+ default: o(() => [
124
+ B(I(e.label), 1)
125
+ ]),
126
+ _: 1
127
+ }),
128
+ l.value ? (p(), u(a(S), {
129
+ key: 0,
130
+ class: "radio-field__secondary"
131
+ }, {
132
+ default: o(() => [
133
+ B(I(e.secondaryText), 1)
134
+ ]),
135
+ _: 1
136
+ })) : g("", !0)
137
+ ]),
138
+ _: 1
139
+ })
140
+ ]),
141
+ _: 1
142
+ }, 8, ["for"])
143
+ ]),
144
+ _: 1
145
+ }, 8, ["class"]));
146
+ }
147
+ }), J = ["plain", "card"], K = ["inline", "block"];
148
+ export {
149
+ J as R,
150
+ j as _,
151
+ F as a,
152
+ H as b,
153
+ K as c
154
+ };
@@ -0,0 +1,131 @@
1
+ import { defineComponent as b, mergeModels as v, useModel as V, useAttrs as S, computed as i, createBlock as p, openBlock as h, unref as a, mergeProps as x, withCtx as s, createVNode as c, useId as $, normalizeClass as B, createElementVNode as C, createCommentVNode as g, createTextVNode as w, toDisplayString as y } from "vue";
2
+ import { c as A } from "./utils-DLUjLwnh.js";
3
+ import { _ as E, c as N, a as k, d as M, b as P } from "./FieldTitle.vue_vue_type_script_setup_true_lang-Bu8UIwRT.js";
4
+ import { SwitchRoot as D, SwitchThumb as F } from "reka-ui";
5
+ import { r as L } from "./index-A7umpmtg.js";
6
+ const U = /* @__PURE__ */ b({
7
+ inheritAttrs: !1,
8
+ __name: "Switch",
9
+ props: /* @__PURE__ */ v({
10
+ class: {}
11
+ }, {
12
+ modelValue: { type: Boolean, required: !1 },
13
+ modelModifiers: {}
14
+ }),
15
+ emits: ["update:modelValue"],
16
+ setup(e) {
17
+ const l = e, d = V(e, "modelValue"), u = S(), f = i(() => {
18
+ const { class: o, ...t } = u;
19
+ return t;
20
+ });
21
+ return (o, t) => (h(), p(a(D), x({
22
+ modelValue: d.value,
23
+ "onUpdate:modelValue": t[0] || (t[0] = (m) => d.value = m),
24
+ "data-slot": "switch",
25
+ class: a(A)("switch", l.class)
26
+ }, f.value), {
27
+ default: s(() => [
28
+ c(a(F), {
29
+ class: "switch__thumb",
30
+ "data-slot": "switch-thumb"
31
+ })
32
+ ]),
33
+ _: 1
34
+ }, 16, ["modelValue", "class"]));
35
+ }
36
+ }), q = { class: "switch-field__switch-wrap" }, Y = /* @__PURE__ */ b({
37
+ inheritAttrs: !1,
38
+ __name: "SwitchField",
39
+ props: /* @__PURE__ */ v({
40
+ class: {},
41
+ label: {},
42
+ secondaryText: {},
43
+ appearance: { default: "plain" },
44
+ layout: { default: "inline" },
45
+ flipped: { type: Boolean, default: !1 },
46
+ id: {},
47
+ disabled: { type: Boolean }
48
+ }, {
49
+ modelValue: { type: Boolean, required: !1 },
50
+ modelModifiers: {}
51
+ }),
52
+ emits: ["update:modelValue"],
53
+ setup(e) {
54
+ const l = e, d = V(e, "modelValue"), u = S(), f = $(), o = i(() => l.id ?? f), t = i(() => l.secondaryText != null), m = L(l, [
55
+ "label",
56
+ "secondaryText",
57
+ "appearance",
58
+ "layout",
59
+ "flipped",
60
+ "id",
61
+ "class",
62
+ "disabled"
63
+ ]), _ = i(() => {
64
+ const { class: n, ...r } = u;
65
+ return { ...m, ...r };
66
+ }), T = i(() => {
67
+ const n = _.value["aria-invalid"];
68
+ return n === !0 || n === "true";
69
+ });
70
+ return (n, r) => (h(), p(a(E), {
71
+ "data-slot": "switch-field",
72
+ class: B(
73
+ a(A)(
74
+ "switch-field",
75
+ `switch-field--appearance-${e.appearance}`,
76
+ `switch-field--layout-${e.layout}`,
77
+ t.value && "switch-field--has-secondary",
78
+ e.flipped && "switch-field--flipped",
79
+ e.disabled && "switch-field--disabled",
80
+ T.value && "switch-field--invalid",
81
+ l.class
82
+ )
83
+ )
84
+ }, {
85
+ default: s(() => [
86
+ c(a(N), {
87
+ class: "switch-field__label",
88
+ for: o.value
89
+ }, {
90
+ default: s(() => [
91
+ C("span", q, [
92
+ c(U, x({
93
+ id: o.value,
94
+ modelValue: d.value,
95
+ "onUpdate:modelValue": r[0] || (r[0] = (I) => d.value = I)
96
+ }, _.value, { disabled: e.disabled }), null, 16, ["id", "modelValue", "disabled"])
97
+ ]),
98
+ c(a(k), { class: "switch-field__text" }, {
99
+ default: s(() => [
100
+ c(a(M), { class: "switch-field__primary" }, {
101
+ default: s(() => [
102
+ w(y(e.label), 1)
103
+ ]),
104
+ _: 1
105
+ }),
106
+ t.value ? (h(), p(a(P), {
107
+ key: 0,
108
+ class: "switch-field__secondary"
109
+ }, {
110
+ default: s(() => [
111
+ w(y(e.secondaryText), 1)
112
+ ]),
113
+ _: 1
114
+ })) : g("", !0)
115
+ ]),
116
+ _: 1
117
+ })
118
+ ]),
119
+ _: 1
120
+ }, 8, ["for"])
121
+ ]),
122
+ _: 1
123
+ }, 8, ["class"]));
124
+ }
125
+ }), j = ["plain", "card"], G = ["inline", "block"];
126
+ export {
127
+ j as S,
128
+ U as _,
129
+ Y as a,
130
+ G as b
131
+ };
@@ -0,0 +1,3 @@
1
+ export { cn } from './lib/utils';
2
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FIELD_LEGEND_VARIANTS, FIELD_ORIENTATIONS, } from './components/ui/field';
3
+ export type { FieldLegendVariant, FieldOrientation } from './components/ui/field';
package/dist/field.js ADDED
@@ -0,0 +1,19 @@
1
+ import { c as r } from "./utils-DLUjLwnh.js";
2
+ /* empty css */
3
+ import { _ as d, a as F, b as l, c as o, d as t } from "./FieldTitle.vue_vue_type_script_setup_true_lang-Bu8UIwRT.js";
4
+ import { F as E, e as c, _ as n, a as I, b as L, c as _, d as m } from "./FieldSet.vue_vue_type_script_setup_true_lang-D9i4ciy0.js";
5
+ export {
6
+ E as FIELD_LEGEND_VARIANTS,
7
+ c as FIELD_ORIENTATIONS,
8
+ d as Field,
9
+ F as FieldContent,
10
+ l as FieldDescription,
11
+ n as FieldError,
12
+ I as FieldGroup,
13
+ o as FieldLabel,
14
+ L as FieldLegend,
15
+ _ as FieldSeparator,
16
+ m as FieldSet,
17
+ t as FieldTitle,
18
+ r as cn
19
+ };
package/dist/index.d.ts CHANGED
@@ -19,3 +19,21 @@ export { Breadcrumb } from './components/ui/breadcrumb';
19
19
  export type { BreadcrumbItemEntry } from './components/ui/breadcrumb';
20
20
  export { Button, buttonVariants, BUTTON_VARIANTS, BUTTON_SIZES, BUTTON_COLORS, } from './components/ui/button';
21
21
  export type { ButtonVariants, ButtonVariant, ButtonSize, ButtonColor } from './components/ui/button';
22
+ export { Textarea, TEXTAREA_RESIZE } from './components/ui/textarea';
23
+ export type { TextareaResize } from './components/ui/textarea';
24
+ export { Input, INPUT_SIZES } from './components/ui/input';
25
+ export type { InputSize } from './components/ui/input';
26
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FIELD_LEGEND_VARIANTS, FIELD_ORIENTATIONS, } from './components/ui/field';
27
+ export type { FieldLegendVariant, FieldOrientation } from './components/ui/field';
28
+ export { KuatSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SELECT_LINES, SELECT_SIZES, } from './components/ui/select';
29
+ export type { SelectItemGroup, SelectItemOption, SelectItems, SelectLines, SelectSize, } from './components/ui/select';
30
+ export { Checkbox, CheckboxField, CHECKBOX_FIELD_APPEARANCES, CHECKBOX_FIELD_LAYOUTS, } from './components/ui/checkbox';
31
+ export type { CheckboxFieldAppearance, CheckboxFieldLayout } from './components/ui/checkbox';
32
+ export { RadioGroup, RadioGroupItem, RadioField, RADIO_FIELD_APPEARANCES, RADIO_FIELD_LAYOUTS, } from './components/ui/radio';
33
+ export type { RadioFieldAppearance, RadioFieldLayout } from './components/ui/radio';
34
+ export { Switch, SwitchField, SWITCH_FIELD_APPEARANCES, SWITCH_FIELD_LAYOUTS, } from './components/ui/switch';
35
+ export type { SwitchFieldAppearance, SwitchFieldLayout } from './components/ui/switch';
36
+ export { Toggle, TOGGLE_SIZES, TOGGLE_SKINS } from './components/ui/toggle';
37
+ export type { ToggleSize, ToggleSkin } from './components/ui/toggle';
38
+ export { ToggleGroup, ToggleGroupItem, TOGGLE_GROUP_ORIENTATIONS, } from './components/ui/toggle-group';
39
+ export type { ToggleGroupOrientation } from './components/ui/toggle-group';