@equal-experts/kuat-vue 0.12.0 → 0.13.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.
- package/README.md +3 -1
- package/dist/{AccordionTrigger-BRz5PzEd.js → AccordionTrigger-BGVFRlgt.js} +1 -1
- package/dist/{AlertDialogTrigger.vue_vue_type_script_setup_true_lang-CK1Um8CY.js → AlertDialogTrigger.vue_vue_type_script_setup_true_lang-DosgAcSM.js} +1 -1
- package/dist/{KuatSelect.vue_vue_type_script_setup_true_lang-DP66U_wg.js → KuatSelect.vue_vue_type_script_setup_true_lang-CT1xn9gs.js} +1 -1
- package/dist/accordion.js +1 -1
- package/dist/alert-dialog.js +1 -1
- package/dist/button-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{constants-Ils7NSfg.js → constants-BZKku54w.js} +1 -1
- package/dist/{constants-BpzIL1jq.js → constants-DC1CCNlp.js} +1 -1
- package/dist/{constants-D_fYMnOg.js → constants-DWBWMp2p.js} +1 -1
- package/dist/icon-button.js +12 -0
- package/dist/index-OELvcT-N.js +54 -0
- package/dist/{index-iz_NZI-V.js → index-Tp80OeHH.js} +1 -1
- package/dist/index-lZY__1xm.js +76 -0
- package/dist/index.js +1188 -392
- package/dist/radio.js +1 -1
- package/dist/select.js +1 -1
- package/dist/style.css +1 -1
- package/dist/switch.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/package.json +5 -1
- package/dist/accordion.d.ts +0 -2
- package/dist/alert-dialog.d.ts +0 -2
- package/dist/badge.d.ts +0 -3
- package/dist/button-group.d.ts +0 -3
- package/dist/button.d.ts +0 -3
- package/dist/carousel.d.ts +0 -2
- package/dist/checkbox.d.ts +0 -3
- package/dist/components/ui/accordion/Accordion.vue.d.ts +0 -26
- package/dist/components/ui/accordion/AccordionContent.vue.d.ts +0 -27
- package/dist/components/ui/accordion/AccordionItem.vue.d.ts +0 -27
- package/dist/components/ui/accordion/AccordionTrigger.vue.d.ts +0 -28
- package/dist/components/ui/accordion/index.d.ts +0 -4
- package/dist/components/ui/alert-dialog/AlertDialog.vue.d.ts +0 -26
- package/dist/components/ui/alert-dialog/AlertDialogAction.vue.d.ts +0 -27
- package/dist/components/ui/alert-dialog/AlertDialogCancel.vue.d.ts +0 -27
- package/dist/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +0 -41
- package/dist/components/ui/alert-dialog/AlertDialogDescription.vue.d.ts +0 -27
- package/dist/components/ui/alert-dialog/AlertDialogFooter.vue.d.ts +0 -26
- package/dist/components/ui/alert-dialog/AlertDialogHeader.vue.d.ts +0 -26
- package/dist/components/ui/alert-dialog/AlertDialogTitle.vue.d.ts +0 -27
- package/dist/components/ui/alert-dialog/AlertDialogTrigger.vue.d.ts +0 -22
- package/dist/components/ui/alert-dialog/index.d.ts +0 -9
- package/dist/components/ui/badge/Badge.vue.d.ts +0 -49
- package/dist/components/ui/badge/constants.d.ts +0 -4
- package/dist/components/ui/badge/index.d.ts +0 -14
- package/dist/components/ui/breadcrumb/Breadcrumb.vue.d.ts +0 -34
- package/dist/components/ui/breadcrumb/index.d.ts +0 -2
- package/dist/components/ui/breadcrumb/types.d.ts +0 -8
- package/dist/components/ui/button/Button.vue.d.ts +0 -53
- package/dist/components/ui/button/constants.d.ts +0 -12
- package/dist/components/ui/button/index.d.ts +0 -12
- package/dist/components/ui/button-group/ButtonGroup.vue.d.ts +0 -43
- package/dist/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +0 -32
- package/dist/components/ui/button-group/ButtonGroupText.vue.d.ts +0 -40
- package/dist/components/ui/button-group/constants.d.ts +0 -2
- package/dist/components/ui/button-group/index.d.ts +0 -14
- package/dist/components/ui/carousel/Carousel.vue.d.ts +0 -59
- package/dist/components/ui/carousel/CarouselContent.vue.d.ts +0 -25
- package/dist/components/ui/carousel/CarouselItem.vue.d.ts +0 -32
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +0 -16
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +0 -16
- package/dist/components/ui/carousel/context.d.ts +0 -26
- package/dist/components/ui/carousel/index.d.ts +0 -7
- package/dist/components/ui/checkbox/Checkbox.vue.d.ts +0 -13
- package/dist/components/ui/checkbox/CheckboxField.vue.d.ts +0 -68
- package/dist/components/ui/checkbox/constants.d.ts +0 -4
- package/dist/components/ui/checkbox/index.d.ts +0 -4
- package/dist/components/ui/content-card/ContentCard.vue.d.ts +0 -72
- package/dist/components/ui/content-card/index.d.ts +0 -1
- package/dist/components/ui/field/Field.vue.d.ts +0 -48
- package/dist/components/ui/field/FieldContent.vue.d.ts +0 -26
- package/dist/components/ui/field/FieldDescription.vue.d.ts +0 -26
- package/dist/components/ui/field/FieldError.vue.d.ts +0 -33
- package/dist/components/ui/field/FieldGroup.vue.d.ts +0 -26
- package/dist/components/ui/field/FieldLabel.vue.d.ts +0 -26
- package/dist/components/ui/field/FieldLegend.vue.d.ts +0 -43
- package/dist/components/ui/field/FieldSeparator.vue.d.ts +0 -26
- package/dist/components/ui/field/FieldSet.vue.d.ts +0 -26
- package/dist/components/ui/field/FieldTitle.vue.d.ts +0 -26
- package/dist/components/ui/field/constants.d.ts +0 -4
- package/dist/components/ui/field/index.d.ts +0 -12
- package/dist/components/ui/input/Input.vue.d.ts +0 -34
- package/dist/components/ui/input/constants.d.ts +0 -2
- package/dist/components/ui/input/index.d.ts +0 -3
- package/dist/components/ui/kuat-carousel/KuatCarousel.vue.d.ts +0 -51
- package/dist/components/ui/kuat-carousel/KuatCarouselContent.vue.d.ts +0 -25
- package/dist/components/ui/kuat-carousel/KuatCarouselItem.vue.d.ts +0 -27
- package/dist/components/ui/kuat-carousel/KuatCarouselNext.vue.d.ts +0 -16
- package/dist/components/ui/kuat-carousel/KuatCarouselPrevious.vue.d.ts +0 -16
- package/dist/components/ui/kuat-carousel/index.d.ts +0 -6
- package/dist/components/ui/kuat-header/EELogo.vue.d.ts +0 -32
- package/dist/components/ui/kuat-header/KuatHeader.vue.d.ts +0 -55
- package/dist/components/ui/kuat-header/constants.d.ts +0 -4
- package/dist/components/ui/kuat-header/index.d.ts +0 -15
- package/dist/components/ui/kuat-logo-lockup/EELogoIcon.vue.d.ts +0 -18
- package/dist/components/ui/kuat-logo-lockup/KuatLogoLockup.vue.d.ts +0 -45
- package/dist/components/ui/kuat-logo-lockup/constants.d.ts +0 -4
- package/dist/components/ui/kuat-logo-lockup/index.d.ts +0 -4
- package/dist/components/ui/kuat-radial-progress/KuatRadialProgress.vue.d.ts +0 -52
- package/dist/components/ui/kuat-radial-progress/constants.d.ts +0 -4
- package/dist/components/ui/kuat-radial-progress/index.d.ts +0 -3
- package/dist/components/ui/radio/RadioField.vue.d.ts +0 -58
- package/dist/components/ui/radio/RadioGroup.vue.d.ts +0 -31
- package/dist/components/ui/radio/RadioGroupItem.vue.d.ts +0 -22
- package/dist/components/ui/radio/constants.d.ts +0 -4
- package/dist/components/ui/radio/index.d.ts +0 -5
- package/dist/components/ui/select/KuatSelect.vue.d.ts +0 -104
- package/dist/components/ui/select/Select.vue.d.ts +0 -28
- package/dist/components/ui/select/SelectContent.vue.d.ts +0 -52
- package/dist/components/ui/select/SelectGroup.vue.d.ts +0 -22
- package/dist/components/ui/select/SelectItem.vue.d.ts +0 -40
- package/dist/components/ui/select/SelectLabel.vue.d.ts +0 -27
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +0 -18
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +0 -18
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +0 -18
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +0 -72
- package/dist/components/ui/select/SelectValue.vue.d.ts +0 -18
- package/dist/components/ui/select/constants.d.ts +0 -18
- package/dist/components/ui/select/index.d.ts +0 -13
- package/dist/components/ui/separator/Separator.vue.d.ts +0 -35
- package/dist/components/ui/separator/index.d.ts +0 -1
- package/dist/components/ui/sonner/KuatSonner.vue.d.ts +0 -54
- package/dist/components/ui/sonner/KuatSonnerContent.vue.d.ts +0 -53
- package/dist/components/ui/sonner/constants.d.ts +0 -2
- package/dist/components/ui/sonner/index.d.ts +0 -7
- package/dist/components/ui/sonner/toast.d.ts +0 -17
- package/dist/components/ui/switch/Switch.vue.d.ts +0 -13
- package/dist/components/ui/switch/SwitchField.vue.d.ts +0 -68
- package/dist/components/ui/switch/constants.d.ts +0 -4
- package/dist/components/ui/switch/index.d.ts +0 -4
- package/dist/components/ui/textarea/Textarea.vue.d.ts +0 -24
- package/dist/components/ui/textarea/constants.d.ts +0 -2
- package/dist/components/ui/textarea/index.d.ts +0 -3
- package/dist/components/ui/toggle/Toggle.vue.d.ts +0 -42
- package/dist/components/ui/toggle/constants.d.ts +0 -4
- package/dist/components/ui/toggle/index.d.ts +0 -3
- package/dist/components/ui/toggle-group/ToggleGroup.vue.d.ts +0 -45
- package/dist/components/ui/toggle-group/ToggleGroupItem.vue.d.ts +0 -49
- package/dist/components/ui/toggle-group/constants.d.ts +0 -2
- package/dist/components/ui/toggle-group/index.d.ts +0 -4
- package/dist/field.d.ts +0 -3
- package/dist/index-A7umpmtg.js +0 -37
- package/dist/index.d.ts +0 -43
- package/dist/input.d.ts +0 -3
- package/dist/kuat-carousel.d.ts +0 -2
- package/dist/lib/utils.d.ts +0 -3
- package/dist/radio.d.ts +0 -3
- package/dist/select.d.ts +0 -3
- package/dist/sonner.d.ts +0 -1
- package/dist/style.css.d.ts +0 -2
- package/dist/switch.d.ts +0 -1
- package/dist/test/setup.d.ts +0 -1
- package/dist/textarea.d.ts +0 -3
- package/dist/toggle-group.d.ts +0 -5
- package/dist/toggle.d.ts +0 -3
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @equal-experts/kuat-vue
|
|
2
2
|
|
|
3
|
-
Vue 3 components and blocks for the Kuat Design System: **localized primitives** and **composed blocks**. Use **`@equal-experts/kuat-core`** for tokens and **shadcn-vue** only for UI that Kuat does not ship (for example Dialog, DropdownMenu).
|
|
3
|
+
Vue 3 components and blocks for the Kuat Design System: **localized primitives** (including **IconButton**) and **composed blocks**. Use **`@equal-experts/kuat-core`** for tokens and **shadcn-vue** only for UI that Kuat does not ship (for example Dialog, DropdownMenu).
|
|
4
|
+
|
|
5
|
+
**IconButton:** `import { IconButton } from "@equal-experts/kuat-vue"` or `@equal-experts/kuat-vue/icon-button`.
|
|
4
6
|
|
|
5
7
|
**When to import from here vs shadcn-vue:** [Choosing components](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/choosing-components.md) · [Public API inventory](https://github.com/equalexperts/kuat-mono/blob/master/kuat-docs/setup/public-api-inventory.md)
|
|
6
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as d, createBlock as i, openBlock as l, unref as o, normalizeProps as A, guardReactiveProps as y, withCtx as c, renderSlot as n, mergeProps as p, createElementVNode as B, normalizeClass as C, createVNode as g } from "vue";
|
|
2
2
|
import { useForwardPropsEmits as v, AccordionRoot as $, AccordionContent as h, useForwardProps as P, AccordionItem as b, AccordionHeader as w, AccordionTrigger as I } from "reka-ui";
|
|
3
3
|
import { c as m } from "./utils-DLUjLwnh.js";
|
|
4
|
-
import { r as u } from "./index-
|
|
4
|
+
import { r as u } from "./index-OELvcT-N.js";
|
|
5
5
|
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
import { ChevronDown as V } from "lucide-vue-next";
|
|
7
7
|
const D = /* @__PURE__ */ d({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as l, createBlock as p, openBlock as r, unref as e, normalizeProps as D, guardReactiveProps as $, withCtx as n, renderSlot as c, mergeProps as u, createVNode as A, createElementBlock as v, normalizeClass as h } from "vue";
|
|
2
2
|
import { useForwardPropsEmits as C, AlertDialogRoot as y, AlertDialogAction as B, AlertDialogCancel as P, AlertDialogPortal as I, AlertDialogOverlay as O, AlertDialogContent as w, AlertDialogDescription as T, AlertDialogTitle as b, AlertDialogTrigger as F } from "reka-ui";
|
|
3
3
|
import { c as d } from "./utils-DLUjLwnh.js";
|
|
4
|
-
import { r as g } from "./index-
|
|
4
|
+
import { r as g } from "./index-OELvcT-N.js";
|
|
5
5
|
import { _ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const G = /* @__PURE__ */ l({
|
|
7
7
|
__name: "AlertDialog",
|
|
@@ -2,7 +2,7 @@ import { defineComponent as f, createBlock as i, openBlock as l, unref as s, mer
|
|
|
2
2
|
import { c as m } from "./utils-DLUjLwnh.js";
|
|
3
3
|
import { useForwardPropsEmits as x, SelectRoot as L, SelectScrollDownButton as O, SelectScrollUpButton as N, SelectPortal as U, SelectContent as D, SelectViewport as F, SelectGroup as A, SelectItem as G, SelectItemText as q, SelectItemIndicator as j, SelectLabel as K, SelectSeparator as M, SelectTrigger as R, SelectIcon as W, SelectValue as Z } from "reka-ui";
|
|
4
4
|
import { ChevronDown as E, ChevronUp as J, Check as Q } from "lucide-vue-next";
|
|
5
|
-
import { r as S } from "./index-
|
|
5
|
+
import { r as S } from "./index-OELvcT-N.js";
|
|
6
6
|
const $e = ["regular", "large", "small", "mini"], Be = ["single", "double"];
|
|
7
7
|
function X(a) {
|
|
8
8
|
return "items" in a;
|
package/dist/accordion.js
CHANGED
package/dist/alert-dialog.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as l } from "./utils-DLUjLwnh.js";
|
|
2
|
-
import { _ as r, A as t, a as i, b as g, c as s, d as A, e as D, f as c, g as n } from "./AlertDialogTrigger.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as r, A as t, a as i, b as g, c as s, d as A, e as D, f as c, g as n } from "./AlertDialogTrigger.vue_vue_type_script_setup_true_lang-DosgAcSM.js";
|
|
3
3
|
export {
|
|
4
4
|
r as AlertDialog,
|
|
5
5
|
t as AlertDialogAction,
|
package/dist/button-group.js
CHANGED
package/dist/checkbox.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineComponent as b, mergeModels as v, useModel as V, useAttrs as S, c
|
|
|
2
2
|
import { c as A } from "./utils-DLUjLwnh.js";
|
|
3
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
4
|
import { SwitchRoot as D, SwitchThumb as F } from "reka-ui";
|
|
5
|
-
import { r as L } from "./index-
|
|
5
|
+
import { r as L } from "./index-OELvcT-N.js";
|
|
6
6
|
const U = /* @__PURE__ */ b({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "Switch",
|
|
@@ -3,7 +3,7 @@ import { c as A } from "./utils-DLUjLwnh.js";
|
|
|
3
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
4
|
import { CheckboxRoot as D, CheckboxIndicator as F } from "reka-ui";
|
|
5
5
|
import { Check as L, Minus as U } from "lucide-vue-next";
|
|
6
|
-
import { r as q } from "./index-
|
|
6
|
+
import { r as q } from "./index-OELvcT-N.js";
|
|
7
7
|
const w = /* @__PURE__ */ k({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "Checkbox",
|
|
@@ -2,7 +2,7 @@ import { defineComponent as m, createBlock as u, openBlock as p, unref as a, mer
|
|
|
2
2
|
import { useForwardPropsEmits as x, RadioGroupRoot as E, RadioGroupItem as T, RadioGroupIndicator as w } from "reka-ui";
|
|
3
3
|
import { c as y } from "./utils-DLUjLwnh.js";
|
|
4
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-
|
|
5
|
+
import { r as k } from "./index-OELvcT-N.js";
|
|
6
6
|
const j = /* @__PURE__ */ m({
|
|
7
7
|
__name: "RadioGroup",
|
|
8
8
|
props: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { c as N } from "./utils-DLUjLwnh.js";
|
|
2
|
+
import { a, I as O, d as S, c as s, b as A, _ as o, i as t } from "./index-lZY__1xm.js";
|
|
3
|
+
export {
|
|
4
|
+
a as ICON_BUTTON_ROUNDNESS,
|
|
5
|
+
O as ICON_BUTTON_SIZES,
|
|
6
|
+
S as ICON_BUTTON_SIZE_LG_ALIAS,
|
|
7
|
+
s as ICON_BUTTON_SIZE_SM_ALIAS,
|
|
8
|
+
A as ICON_BUTTON_VARIANT_DEFAULT_ALIAS,
|
|
9
|
+
o as IconButton,
|
|
10
|
+
N as cn,
|
|
11
|
+
t as iconButtonVariants
|
|
12
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { computed as s, watch as l, isRef as i, reactive as u, unref as f, toRefs as a, toValue as d } from "vue";
|
|
2
|
+
const v = typeof window < "u" && typeof document < "u";
|
|
3
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
4
|
+
const p = Object.prototype.toString, w = (e) => p.call(e) === "[object Object]", g = () => {
|
|
5
|
+
};
|
|
6
|
+
function b(e) {
|
|
7
|
+
return Array.isArray(e) ? e : [e];
|
|
8
|
+
}
|
|
9
|
+
function y(e) {
|
|
10
|
+
return i(e) ? u(new Proxy({}, {
|
|
11
|
+
get(n, t, r) {
|
|
12
|
+
return f(Reflect.get(e.value, t, r));
|
|
13
|
+
},
|
|
14
|
+
set(n, t, r) {
|
|
15
|
+
return i(e.value[t]) && !i(r) ? e.value[t].value = r : e.value[t] = r, !0;
|
|
16
|
+
},
|
|
17
|
+
deleteProperty(n, t) {
|
|
18
|
+
return Reflect.deleteProperty(e.value, t);
|
|
19
|
+
},
|
|
20
|
+
has(n, t) {
|
|
21
|
+
return Reflect.has(e.value, t);
|
|
22
|
+
},
|
|
23
|
+
ownKeys() {
|
|
24
|
+
return Object.keys(e.value);
|
|
25
|
+
},
|
|
26
|
+
getOwnPropertyDescriptor() {
|
|
27
|
+
return {
|
|
28
|
+
enumerable: !0,
|
|
29
|
+
configurable: !0
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
})) : u(e);
|
|
33
|
+
}
|
|
34
|
+
function m(e) {
|
|
35
|
+
return y(s(e));
|
|
36
|
+
}
|
|
37
|
+
function h(e, ...n) {
|
|
38
|
+
const t = n.flat(), r = t[0];
|
|
39
|
+
return m(() => Object.fromEntries(typeof r == "function" ? Object.entries(a(e)).filter(([o, c]) => !r(d(c), o)) : Object.entries(a(e)).filter((o) => !t.includes(o[0]))));
|
|
40
|
+
}
|
|
41
|
+
function P(e, n, t) {
|
|
42
|
+
return l(e, n, {
|
|
43
|
+
...t,
|
|
44
|
+
immediate: !0
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
w as a,
|
|
49
|
+
v as i,
|
|
50
|
+
g as n,
|
|
51
|
+
h as r,
|
|
52
|
+
b as t,
|
|
53
|
+
P as w
|
|
54
|
+
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as s, createElementBlock as f, openBlock as n, normaliz
|
|
|
2
2
|
import { c as r } from "./utils-DLUjLwnh.js";
|
|
3
3
|
import { _ as c } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import { Separator as B, Primitive as v } from "reka-ui";
|
|
5
|
-
import { r as _ } from "./index-
|
|
5
|
+
import { r as _ } from "./index-OELvcT-N.js";
|
|
6
6
|
const g = ["data-orientation"], b = /* @__PURE__ */ s({
|
|
7
7
|
__name: "ButtonGroup",
|
|
8
8
|
props: {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent as f, computed as n, createBlock as m, openBlock as v, unref as i, normalizeClass as b, withCtx as _, renderSlot as I } from "vue";
|
|
2
|
+
import { Primitive as N } from "reka-ui";
|
|
3
|
+
import { c as o } from "./utils-DLUjLwnh.js";
|
|
4
|
+
const O = /* @__PURE__ */ f({
|
|
5
|
+
__name: "IconButton",
|
|
6
|
+
props: {
|
|
7
|
+
variant: { default: "primary" },
|
|
8
|
+
size: { default: "regular" },
|
|
9
|
+
color: { default: "ee-blue" },
|
|
10
|
+
roundness: { default: "default" },
|
|
11
|
+
type: { default: "button" },
|
|
12
|
+
class: {},
|
|
13
|
+
asChild: { type: Boolean },
|
|
14
|
+
as: { default: "button" }
|
|
15
|
+
},
|
|
16
|
+
setup(t) {
|
|
17
|
+
const e = t;
|
|
18
|
+
function u(r) {
|
|
19
|
+
return r === "default" ? "primary" : r ?? "primary";
|
|
20
|
+
}
|
|
21
|
+
function l(r) {
|
|
22
|
+
return r === "sm" ? "small" : r === "lg" ? "large" : r ?? "regular";
|
|
23
|
+
}
|
|
24
|
+
const a = n(() => u(e.variant)), s = n(() => l(e.size)), c = n(() => a.value === "destructive"), d = n(() => {
|
|
25
|
+
if (!e.asChild && e.as === "button")
|
|
26
|
+
return e.type;
|
|
27
|
+
});
|
|
28
|
+
return (r, y) => (v(), m(i(N), {
|
|
29
|
+
as: t.as,
|
|
30
|
+
"as-child": t.asChild,
|
|
31
|
+
type: d.value,
|
|
32
|
+
class: b(
|
|
33
|
+
i(o)(
|
|
34
|
+
"button",
|
|
35
|
+
"icon-button",
|
|
36
|
+
`button--variant-${a.value}`,
|
|
37
|
+
c.value ? [] : `button--color-${t.color}`,
|
|
38
|
+
`icon-button--size-${s.value}`,
|
|
39
|
+
`icon-button--roundness-${t.roundness}`,
|
|
40
|
+
e.class
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
}, {
|
|
44
|
+
default: _(() => [
|
|
45
|
+
I(r.$slots, "default")
|
|
46
|
+
]),
|
|
47
|
+
_: 3
|
|
48
|
+
}, 8, ["as", "as-child", "type", "class"]));
|
|
49
|
+
}
|
|
50
|
+
}), B = "default", A = ["mini", "small", "regular", "large"], $ = "sm", h = "lg", U = ["default", "round"];
|
|
51
|
+
function S(t) {
|
|
52
|
+
return t === "default" ? "primary" : t ?? "primary";
|
|
53
|
+
}
|
|
54
|
+
function T(t) {
|
|
55
|
+
return t === "sm" ? "small" : t === "lg" ? "large" : t ?? "regular";
|
|
56
|
+
}
|
|
57
|
+
function D(t) {
|
|
58
|
+
const e = S((t == null ? void 0 : t.variant) ?? "primary"), u = T((t == null ? void 0 : t.size) ?? "regular"), l = (t == null ? void 0 : t.color) ?? "ee-blue", a = (t == null ? void 0 : t.roundness) ?? "default", c = e === "destructive" ? "" : `button--color-${l}`;
|
|
59
|
+
return o(
|
|
60
|
+
"button",
|
|
61
|
+
"icon-button",
|
|
62
|
+
`button--variant-${e}`,
|
|
63
|
+
c,
|
|
64
|
+
`icon-button--size-${u}`,
|
|
65
|
+
`icon-button--roundness-${a}`
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
A as I,
|
|
70
|
+
O as _,
|
|
71
|
+
U as a,
|
|
72
|
+
B as b,
|
|
73
|
+
$ as c,
|
|
74
|
+
h as d,
|
|
75
|
+
D as i
|
|
76
|
+
};
|