@equal-experts/kuat-vue 0.4.2 → 0.6.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 (106) 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/carousel/Carousel.vue.d.ts +52 -0
  14. package/dist/components/ui/carousel/CarouselContent.vue.d.ts +25 -0
  15. package/dist/components/ui/carousel/CarouselItem.vue.d.ts +27 -0
  16. package/dist/components/ui/carousel/CarouselNext.vue.d.ts +16 -0
  17. package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +16 -0
  18. package/dist/components/ui/carousel/context.d.ts +18 -0
  19. package/dist/components/ui/carousel/index.d.ts +7 -0
  20. package/dist/components/ui/checkbox/Checkbox.vue.d.ts +13 -0
  21. package/dist/components/ui/checkbox/CheckboxField.vue.d.ts +68 -0
  22. package/dist/components/ui/checkbox/constants.d.ts +4 -0
  23. package/dist/components/ui/checkbox/index.d.ts +4 -0
  24. package/dist/components/ui/field/Field.vue.d.ts +48 -0
  25. package/dist/components/ui/field/FieldContent.vue.d.ts +26 -0
  26. package/dist/components/ui/field/FieldDescription.vue.d.ts +26 -0
  27. package/dist/components/ui/field/FieldError.vue.d.ts +33 -0
  28. package/dist/components/ui/field/FieldGroup.vue.d.ts +26 -0
  29. package/dist/components/ui/field/FieldLabel.vue.d.ts +26 -0
  30. package/dist/components/ui/field/FieldLegend.vue.d.ts +43 -0
  31. package/dist/components/ui/field/FieldSeparator.vue.d.ts +26 -0
  32. package/dist/components/ui/field/FieldSet.vue.d.ts +26 -0
  33. package/dist/components/ui/field/FieldTitle.vue.d.ts +26 -0
  34. package/dist/components/ui/field/constants.d.ts +4 -0
  35. package/dist/components/ui/field/index.d.ts +12 -0
  36. package/dist/components/ui/input/Input.vue.d.ts +34 -0
  37. package/dist/components/ui/input/constants.d.ts +2 -0
  38. package/dist/components/ui/input/index.d.ts +3 -0
  39. package/dist/components/ui/kuat-carousel/KuatCarousel.vue.d.ts +7 -3
  40. package/dist/components/ui/kuat-carousel/KuatCarouselItem.vue.d.ts +2 -0
  41. package/dist/components/ui/radio/RadioField.vue.d.ts +58 -0
  42. package/dist/components/ui/radio/RadioGroup.vue.d.ts +31 -0
  43. package/dist/components/ui/radio/RadioGroupItem.vue.d.ts +22 -0
  44. package/dist/components/ui/radio/constants.d.ts +4 -0
  45. package/dist/components/ui/radio/index.d.ts +5 -0
  46. package/dist/components/ui/select/KuatSelect.vue.d.ts +104 -0
  47. package/dist/components/ui/select/Select.vue.d.ts +28 -0
  48. package/dist/components/ui/select/SelectContent.vue.d.ts +52 -0
  49. package/dist/components/ui/select/SelectGroup.vue.d.ts +22 -0
  50. package/dist/components/ui/select/SelectItem.vue.d.ts +40 -0
  51. package/dist/components/ui/select/SelectLabel.vue.d.ts +27 -0
  52. package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +18 -0
  53. package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +18 -0
  54. package/dist/components/ui/select/SelectSeparator.vue.d.ts +18 -0
  55. package/dist/components/ui/select/SelectTrigger.vue.d.ts +72 -0
  56. package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
  57. package/dist/components/ui/select/constants.d.ts +18 -0
  58. package/dist/components/ui/select/index.d.ts +13 -0
  59. package/dist/components/ui/sonner/KuatSonner.vue.d.ts +54 -0
  60. package/dist/components/ui/sonner/KuatSonnerContent.vue.d.ts +53 -0
  61. package/dist/components/ui/sonner/constants.d.ts +2 -0
  62. package/dist/components/ui/sonner/index.d.ts +7 -0
  63. package/dist/components/ui/sonner/toast.d.ts +17 -0
  64. package/dist/components/ui/switch/Switch.vue.d.ts +13 -0
  65. package/dist/components/ui/switch/SwitchField.vue.d.ts +68 -0
  66. package/dist/components/ui/switch/constants.d.ts +4 -0
  67. package/dist/components/ui/switch/index.d.ts +4 -0
  68. package/dist/components/ui/textarea/Textarea.vue.d.ts +24 -0
  69. package/dist/components/ui/textarea/constants.d.ts +2 -0
  70. package/dist/components/ui/textarea/index.d.ts +3 -0
  71. package/dist/components/ui/toggle/Toggle.vue.d.ts +42 -0
  72. package/dist/components/ui/toggle/constants.d.ts +4 -0
  73. package/dist/components/ui/toggle/index.d.ts +3 -0
  74. package/dist/components/ui/toggle-group/ToggleGroup.vue.d.ts +45 -0
  75. package/dist/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +49 -0
  76. package/dist/components/ui/toggle-group/constants.d.ts +2 -0
  77. package/dist/components/ui/toggle-group/index.d.ts +4 -0
  78. package/dist/constants-4SN0MW4f.js +61 -0
  79. package/dist/constants-BpzIL1jq.js +141 -0
  80. package/dist/constants-CXAkjttx.js +5 -0
  81. package/dist/constants-CpIWAssv.js +32 -0
  82. package/dist/constants-D_fYMnOg.js +154 -0
  83. package/dist/constants-Ils7NSfg.js +131 -0
  84. package/dist/field.d.ts +3 -0
  85. package/dist/field.js +19 -0
  86. package/dist/index.d.ts +22 -0
  87. package/dist/index.js +1291 -1119
  88. package/dist/input.d.ts +3 -0
  89. package/dist/input.js +8 -0
  90. package/dist/radio.d.ts +3 -0
  91. package/dist/radio.js +11 -0
  92. package/dist/select.d.ts +3 -0
  93. package/dist/select.js +19 -0
  94. package/dist/sonner.d.ts +1 -0
  95. package/dist/sonner.js +7 -0
  96. package/dist/style.css +1 -1
  97. package/dist/switch.d.ts +1 -0
  98. package/dist/switch.js +7 -0
  99. package/dist/textarea.d.ts +3 -0
  100. package/dist/textarea.js +8 -0
  101. package/dist/toast-LJYTMaV_.js +113 -0
  102. package/dist/toggle-group.d.ts +5 -0
  103. package/dist/toggle-group.js +71 -0
  104. package/dist/toggle.d.ts +3 -0
  105. package/dist/toggle.js +10 -0
  106. package/package.json +53 -12
@@ -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
@@ -5,6 +5,8 @@ export type { ButtonGroupVariants } from './components/ui/button-group';
5
5
  export { ContentCard } from './components/ui/content-card';
6
6
  export { KuatHeader, kuatHeaderVariants, EELogo } from './components/ui/kuat-header';
7
7
  export type { KuatHeaderVariants } from './components/ui/kuat-header';
8
+ export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, } from './components/ui/carousel';
9
+ export type { CarouselItemBasis, CarouselOrientation, CarouselApi, CarouselEventHandler, CarouselEventHandlers, } from './components/ui/carousel';
8
10
  export { KuatCarousel, KuatCarouselContent, KuatCarouselItem, KuatCarouselPrevious, KuatCarouselNext, } from './components/ui/kuat-carousel';
9
11
  export type { KuatCarouselSlidesPerView } from './components/ui/kuat-carousel';
10
12
  export { KuatRadialProgress, KUAT_RADIAL_PROGRESS_SIZES, KUAT_RADIAL_PROGRESS_COLORS, } from './components/ui/kuat-radial-progress';
@@ -19,3 +21,23 @@ export { Breadcrumb } from './components/ui/breadcrumb';
19
21
  export type { BreadcrumbItemEntry } from './components/ui/breadcrumb';
20
22
  export { Button, buttonVariants, BUTTON_VARIANTS, BUTTON_SIZES, BUTTON_COLORS, } from './components/ui/button';
21
23
  export type { ButtonVariants, ButtonVariant, ButtonSize, ButtonColor } from './components/ui/button';
24
+ export { Textarea, TEXTAREA_RESIZE } from './components/ui/textarea';
25
+ export type { TextareaResize } from './components/ui/textarea';
26
+ export { Input, INPUT_SIZES } from './components/ui/input';
27
+ export type { InputSize } from './components/ui/input';
28
+ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FIELD_LEGEND_VARIANTS, FIELD_ORIENTATIONS, } from './components/ui/field';
29
+ export type { FieldLegendVariant, FieldOrientation } from './components/ui/field';
30
+ export { KuatSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SELECT_LINES, SELECT_SIZES, } from './components/ui/select';
31
+ export type { SelectItemGroup, SelectItemOption, SelectItems, SelectLines, SelectSize, } from './components/ui/select';
32
+ export { Checkbox, CheckboxField, CHECKBOX_FIELD_APPEARANCES, CHECKBOX_FIELD_LAYOUTS, } from './components/ui/checkbox';
33
+ export type { CheckboxFieldAppearance, CheckboxFieldLayout } from './components/ui/checkbox';
34
+ export { RadioGroup, RadioGroupItem, RadioField, RADIO_FIELD_APPEARANCES, RADIO_FIELD_LAYOUTS, } from './components/ui/radio';
35
+ export type { RadioFieldAppearance, RadioFieldLayout } from './components/ui/radio';
36
+ export { Switch, SwitchField, SWITCH_FIELD_APPEARANCES, SWITCH_FIELD_LAYOUTS, } from './components/ui/switch';
37
+ export type { SwitchFieldAppearance, SwitchFieldLayout } from './components/ui/switch';
38
+ export { Toggle, TOGGLE_SIZES, TOGGLE_SKINS } from './components/ui/toggle';
39
+ export type { ToggleSize, ToggleSkin } from './components/ui/toggle';
40
+ export { ToggleGroup, ToggleGroupItem, TOGGLE_GROUP_ORIENTATIONS, } from './components/ui/toggle-group';
41
+ export type { ToggleGroupOrientation } from './components/ui/toggle-group';
42
+ export { Sonner, SonnerContent, SONNER_POSITIONS, toast } from './components/ui/sonner';
43
+ export type { SonnerAnnouncement, SonnerContentAction, SonnerPosition, SonnerToastOptions, } from './components/ui/sonner';