@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 @@
1
+ export * from './components/ui/switch';
package/dist/switch.js ADDED
@@ -0,0 +1,7 @@
1
+ import { S as _, b as s, _ as A, a as E } from "./constants-Ils7NSfg.js";
2
+ export {
3
+ _ as SWITCH_FIELD_APPEARANCES,
4
+ s as SWITCH_FIELD_LAYOUTS,
5
+ A as Switch,
6
+ E as SwitchField
7
+ };
@@ -0,0 +1,3 @@
1
+ export { cn } from './lib/utils';
2
+ export { Textarea, TEXTAREA_RESIZE } from './components/ui/textarea';
3
+ export type { TextareaResize } from './components/ui/textarea';
@@ -0,0 +1,8 @@
1
+ import { c as e } from "./utils-DLUjLwnh.js";
2
+ /* empty css */
3
+ import { T as E, _ as T } from "./constants-CpIWAssv.js";
4
+ export {
5
+ E as TEXTAREA_RESIZE,
6
+ T as Textarea,
7
+ e as cn
8
+ };
@@ -0,0 +1,113 @@
1
+ import { defineComponent as f, useAttrs as b, computed as m, createBlock as p, openBlock as s, unref as r, mergeProps as v, createElementBlock as l, createCommentVNode as u, createElementVNode as _, resolveDynamicComponent as g, toDisplayString as d, h } from "vue";
2
+ import { Toaster as I, toast as e } from "vue-sonner";
3
+ import { c as N } from "./utils-DLUjLwnh.js";
4
+ const E = /* @__PURE__ */ f({
5
+ inheritAttrs: !1,
6
+ __name: "KuatSonner",
7
+ props: {
8
+ class: {},
9
+ containerAriaLabel: { default: "Notifications" },
10
+ expand: { type: Boolean, default: !1 },
11
+ position: { default: "top-right" },
12
+ toastOptions: {},
13
+ visibleToasts: { default: 3 }
14
+ },
15
+ setup(t) {
16
+ const n = t, o = b(), i = m(() => {
17
+ const c = n.toastOptions ?? {};
18
+ return {
19
+ ...c,
20
+ classNames: {
21
+ toast: "kuat-sonner__toast",
22
+ title: "kuat-sonner__title",
23
+ description: "kuat-sonner__description",
24
+ content: "kuat-sonner__content",
25
+ icon: "kuat-sonner__icon",
26
+ actionButton: "kuat-sonner__action",
27
+ cancelButton: "kuat-sonner__cancel",
28
+ loader: "kuat-sonner__loader",
29
+ ...c.classNames
30
+ }
31
+ };
32
+ }), k = m(() => i.value);
33
+ return (c, C) => (s(), p(r(I), v({
34
+ class: r(N)("kuat-sonner__toaster", n.class),
35
+ "container-aria-label": n.containerAriaLabel,
36
+ expand: n.expand,
37
+ position: n.position,
38
+ "visible-toasts": n.visibleToasts,
39
+ "toast-options": k.value
40
+ }, r(o)), null, 16, ["class", "container-aria-label", "expand", "position", "visible-toasts", "toast-options"]));
41
+ }
42
+ }), O = { class: "kuat-sonner__content" }, x = { class: "kuat-sonner__text" }, y = { class: "kuat-sonner__title" }, S = {
43
+ key: 0,
44
+ class: "kuat-sonner__description"
45
+ }, T = ["aria-label"], P = /* @__PURE__ */ f({
46
+ __name: "KuatSonnerContent",
47
+ props: {
48
+ action: { default: void 0 },
49
+ description: { default: void 0 },
50
+ leftIcon: { default: null },
51
+ showLeftIcon: { type: Boolean, default: !0 },
52
+ title: {}
53
+ },
54
+ setup(t) {
55
+ return (n, o) => (s(), l("div", O, [
56
+ t.showLeftIcon && t.leftIcon ? (s(), p(g(t.leftIcon), {
57
+ key: 0,
58
+ class: "kuat-sonner__icon"
59
+ })) : u("", !0),
60
+ _("div", x, [
61
+ _("div", y, d(t.title), 1),
62
+ t.description ? (s(), l("div", S, d(t.description), 1)) : u("", !0)
63
+ ]),
64
+ t.action ? (s(), l("button", {
65
+ key: 1,
66
+ type: "button",
67
+ class: "kuat-sonner__action",
68
+ "aria-label": t.action.ariaLabel ?? t.action.label,
69
+ onClick: o[0] || (o[0] = //@ts-ignore
70
+ (...i) => t.action.onClick && t.action.onClick(...i))
71
+ }, d(t.action.label), 9, T)) : u("", !0)
72
+ ]));
73
+ }
74
+ }), V = [
75
+ "top-left",
76
+ "top-center",
77
+ "top-right",
78
+ "bottom-left",
79
+ "bottom-center",
80
+ "bottom-right"
81
+ ], B = h("span", {
82
+ "aria-hidden": "true",
83
+ class: "kuat-sonner__loading-spinner"
84
+ });
85
+ function a(t) {
86
+ if (!t) return { important: !1 };
87
+ const { announcement: n = "polite", ...o } = t;
88
+ return {
89
+ ...o,
90
+ important: n === "assertive"
91
+ };
92
+ }
93
+ const D = Object.assign(
94
+ (t, n) => e(t, a(n)),
95
+ {
96
+ success: (t, n) => e.success(t, a(n)),
97
+ info: (t, n) => e.info(t, a(n)),
98
+ warning: (t, n) => e.warning(t, a(n)),
99
+ error: (t, n) => e.error(t, a(n)),
100
+ loading: (t, n) => e(t, {
101
+ duration: Number.POSITIVE_INFINITY,
102
+ icon: B,
103
+ ...a(n)
104
+ }),
105
+ dismiss: e.dismiss
106
+ }
107
+ );
108
+ export {
109
+ V as S,
110
+ E as _,
111
+ P as a,
112
+ D as t
113
+ };
@@ -0,0 +1,5 @@
1
+ export { cn } from './lib/utils';
2
+ export { ToggleGroup, ToggleGroupItem, TOGGLE_GROUP_ORIENTATIONS, } from './components/ui/toggle-group';
3
+ export { TOGGLE_SIZES, TOGGLE_SKINS } from './components/ui/toggle';
4
+ export type { ToggleGroupOrientation } from './components/ui/toggle-group';
5
+ export type { ToggleSize, ToggleSkin } from './components/ui/toggle';
@@ -0,0 +1,71 @@
1
+ import { c as p } from "./utils-DLUjLwnh.js";
2
+ /* empty css */
3
+ import { defineComponent as n, createBlock as i, openBlock as u, unref as e, mergeProps as g, withCtx as c, renderSlot as d } from "vue";
4
+ import { useForwardPropsEmits as m, ToggleGroupRoot as f, useForwardProps as _, ToggleGroupItem as G } from "reka-ui";
5
+ import { T as w, a as v } from "./constants-CXAkjttx.js";
6
+ import { r as T } from "./index-A7umpmtg.js";
7
+ const z = /* @__PURE__ */ n({
8
+ __name: "ToggleGroup",
9
+ props: {
10
+ rovingFocus: { type: Boolean },
11
+ disabled: { type: Boolean },
12
+ orientation: { default: "horizontal" },
13
+ dir: {},
14
+ loop: { type: Boolean },
15
+ asChild: { type: Boolean },
16
+ as: {},
17
+ name: {},
18
+ required: { type: Boolean },
19
+ type: {},
20
+ modelValue: {},
21
+ defaultValue: {},
22
+ class: {}
23
+ },
24
+ emits: ["update:modelValue"],
25
+ setup(s, { emit: o }) {
26
+ const t = s, r = m(t, o);
27
+ return (l, B) => (u(), i(e(f), g({ "data-slot": "toggle-group" }, e(r), {
28
+ class: e(p)("toggle-group", `toggle-group--${t.orientation}`, t.class)
29
+ }), {
30
+ default: c(() => [
31
+ d(l.$slots, "default")
32
+ ]),
33
+ _: 3
34
+ }, 16, ["class"]));
35
+ }
36
+ }), E = /* @__PURE__ */ n({
37
+ __name: "ToggleGroupItem",
38
+ props: {
39
+ value: {},
40
+ disabled: { type: Boolean },
41
+ asChild: { type: Boolean },
42
+ as: {},
43
+ class: {},
44
+ size: { default: "regular" },
45
+ skin: { default: "outlined" }
46
+ },
47
+ setup(s) {
48
+ const o = s, t = T(o, "class", "size", "skin"), a = _(t);
49
+ return (r, l) => (u(), i(e(G), g({ "data-slot": "toggle-group-item" }, e(a), {
50
+ class: e(p)(
51
+ "toggle-group-item",
52
+ `toggle-group-item--size-${o.size}`,
53
+ `toggle-group-item--skin-${o.skin}`,
54
+ o.class
55
+ )
56
+ }), {
57
+ default: c(() => [
58
+ d(r.$slots, "default")
59
+ ]),
60
+ _: 3
61
+ }, 16, ["class"]));
62
+ }
63
+ }), P = ["horizontal", "vertical"];
64
+ export {
65
+ P as TOGGLE_GROUP_ORIENTATIONS,
66
+ w as TOGGLE_SIZES,
67
+ v as TOGGLE_SKINS,
68
+ z as ToggleGroup,
69
+ E as ToggleGroupItem,
70
+ p as cn
71
+ };
@@ -0,0 +1,3 @@
1
+ export { cn } from './lib/utils';
2
+ export { Toggle, TOGGLE_SIZES, TOGGLE_SKINS } from './components/ui/toggle';
3
+ export type { ToggleSize, ToggleSkin } from './components/ui/toggle';
package/dist/toggle.js ADDED
@@ -0,0 +1,10 @@
1
+ import { c as e } from "./utils-DLUjLwnh.js";
2
+ /* empty css */
3
+ import { _ as p } from "./Toggle.vue_vue_type_script_setup_true_lang-CZM1GrLQ.js";
4
+ import { T as t, a as G } from "./constants-CXAkjttx.js";
5
+ export {
6
+ t as TOGGLE_SIZES,
7
+ G as TOGGLE_SKINS,
8
+ p as Toggle,
9
+ e as cn
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equal-experts/kuat-vue",
3
- "version": "0.4.2",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -30,6 +30,46 @@
30
30
  "import": "./dist/button-group.js",
31
31
  "types": "./dist/button-group.d.ts"
32
32
  },
33
+ "./textarea": {
34
+ "import": "./dist/textarea.js",
35
+ "types": "./dist/textarea.d.ts"
36
+ },
37
+ "./input": {
38
+ "import": "./dist/input.js",
39
+ "types": "./dist/input.d.ts"
40
+ },
41
+ "./field": {
42
+ "import": "./dist/field.js",
43
+ "types": "./dist/field.d.ts"
44
+ },
45
+ "./select": {
46
+ "import": "./dist/select.js",
47
+ "types": "./dist/select.d.ts"
48
+ },
49
+ "./checkbox": {
50
+ "import": "./dist/checkbox.js",
51
+ "types": "./dist/checkbox.d.ts"
52
+ },
53
+ "./radio": {
54
+ "import": "./dist/radio.js",
55
+ "types": "./dist/radio.d.ts"
56
+ },
57
+ "./switch": {
58
+ "import": "./dist/switch.js",
59
+ "types": "./dist/switch.d.ts"
60
+ },
61
+ "./sonner": {
62
+ "import": "./dist/sonner.js",
63
+ "types": "./dist/sonner.d.ts"
64
+ },
65
+ "./toggle": {
66
+ "import": "./dist/toggle.js",
67
+ "types": "./dist/toggle.d.ts"
68
+ },
69
+ "./toggle-group": {
70
+ "import": "./dist/toggle-group.js",
71
+ "types": "./dist/toggle-group.d.ts"
72
+ },
33
73
  "./styles": "./dist/style.css"
34
74
  },
35
75
  "files": [
@@ -51,14 +91,23 @@
51
91
  "url": "https://github.com/your-org/kuat-mono.git",
52
92
  "directory": "packages/kuat-vue"
53
93
  },
94
+ "scripts": {
95
+ "build": "vite build",
96
+ "dev": "vite build --watch",
97
+ "lint": "eslint . --max-warnings 0",
98
+ "test": "vitest",
99
+ "test:run": "vitest run"
100
+ },
54
101
  "dependencies": {
55
102
  "@vueuse/core": "^14.1.0",
56
103
  "class-variance-authority": "^0.7.0",
57
104
  "clsx": "^2.1.0",
58
105
  "embla-carousel-vue": "^8.0.0",
59
- "tailwind-merge": "^2.2.1"
106
+ "tailwind-merge": "^2.2.1",
107
+ "vue-sonner": "^2.0.9"
60
108
  },
61
109
  "devDependencies": {
110
+ "@equal-experts/kuat-core": "workspace:*",
62
111
  "@tailwindcss/vite": "^4.0.0",
63
112
  "@testing-library/jest-dom": "^6.6.0",
64
113
  "@testing-library/vue": "^8.0.0",
@@ -73,20 +122,12 @@
73
122
  "vite": "^5.1.0",
74
123
  "vite-plugin-dts": "^3.6.4",
75
124
  "vitest": "^2.0.0",
76
- "vue-tsc": "^1.8.27",
77
- "@equal-experts/kuat-core": "0.4.2"
125
+ "vue-tsc": "^1.8.27"
78
126
  },
79
127
  "peerDependencies": {
80
128
  "lucide-vue-next": "^0.344.0 || >=0.400.0",
81
129
  "radix-vue": "^1.9.0",
82
130
  "reka-ui": "^2.6.1",
83
131
  "vue": "^3.4.0"
84
- },
85
- "scripts": {
86
- "build": "vite build",
87
- "dev": "vite build --watch",
88
- "lint": "eslint . --max-warnings 0",
89
- "test": "vitest",
90
- "test:run": "vitest run"
91
132
  }
92
- }
133
+ }