asheeui 0.6.2 → 0.6.5
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/dist/AsheeUIProvider.d.ts +34 -0
- package/dist/AsheeUIProvider.d.ts.map +1 -1
- package/dist/components/accordion/Accordion.d.ts +55 -44
- package/dist/components/accordion/Accordion.d.ts.map +1 -1
- package/dist/components/accordion/Accordion.js +27 -27
- package/dist/components/accordion/accordion-config.d.ts +41 -12
- package/dist/components/accordion/accordion-config.d.ts.map +1 -1
- package/dist/components/accordion/accordion-styles.d.ts +20 -0
- package/dist/components/accordion/accordion-styles.d.ts.map +1 -1
- package/dist/components/accordion/accordion-styles.js +1 -1
- package/dist/components/autocomplete/Autocomplete.d.ts +59 -39
- package/dist/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/Autocomplete.js +98 -91
- package/dist/components/autocomplete/autocomplete-config.d.ts +9 -62
- package/dist/components/autocomplete/autocomplete-config.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete-config.js +6 -21
- package/dist/components/button/Button.d.ts +50 -51
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +19 -19
- package/dist/components/button/button-config.d.ts +23 -15
- package/dist/components/button/button-config.d.ts.map +1 -1
- package/dist/components/button/button-styles.d.ts +11 -1
- package/dist/components/button/button-styles.d.ts.map +1 -1
- package/dist/components/card/Card.d.ts +85 -43
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +49 -49
- package/dist/components/card/card-config.d.ts +35 -18
- package/dist/components/card/card-config.d.ts.map +1 -1
- package/dist/components/card/card-config.js +0 -2
- package/dist/components/card/card-styles.d.ts +17 -1
- package/dist/components/card/card-styles.d.ts.map +1 -1
- package/dist/components/carousel/Carousel.d.ts +107 -12
- package/dist/components/carousel/Carousel.d.ts.map +1 -1
- package/dist/components/carousel/Carousel.js +63 -64
- package/dist/components/carousel/carousel-config.d.ts +94 -7
- package/dist/components/carousel/carousel-config.d.ts.map +1 -1
- package/dist/components/carousel/carousel-config.js +6 -4
- package/dist/components/carousel/carousel-styles.d.ts +32 -1
- package/dist/components/carousel/carousel-styles.d.ts.map +1 -1
- package/dist/components/chip/Chip.d.ts +55 -34
- package/dist/components/chip/Chip.d.ts.map +1 -1
- package/dist/components/chip/Chip.js +71 -72
- package/dist/components/chip/chip-config.d.ts +29 -15
- package/dist/components/chip/chip-config.d.ts.map +1 -1
- package/dist/components/chip/chip-config.js +5 -6
- package/dist/components/chip/chip-styles.d.ts +21 -1
- package/dist/components/chip/chip-styles.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +166 -2
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +110 -99
- package/dist/components/date-picker/date-picker-config.d.ts +31 -0
- package/dist/components/date-picker/date-picker-config.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-config.js +8 -16
- package/dist/components/date-picker/date-picker-styles.d.ts +21 -1
- package/dist/components/date-picker/date-picker-styles.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker-styles.js +7 -11
- package/dist/components/drawer/Drawer.d.ts +97 -7
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +9 -9
- package/dist/components/drawer/drawer-config.d.ts +54 -1
- package/dist/components/drawer/drawer-config.d.ts.map +1 -1
- package/dist/components/drawer/drawer-styles.d.ts +21 -0
- package/dist/components/drawer/drawer-styles.d.ts.map +1 -1
- package/dist/components/field/FieldShell.d.ts +86 -0
- package/dist/components/field/FieldShell.d.ts.map +1 -1
- package/dist/components/field/field-config.d.ts +66 -3
- package/dist/components/field/field-config.d.ts.map +1 -1
- package/dist/components/field/field-config.js +2 -1
- package/dist/components/field/field-styles.d.ts +22 -0
- package/dist/components/field/field-styles.d.ts.map +1 -1
- package/dist/components/field/field-styles.js +10 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/image/Image.d.ts +35 -28
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +7 -7
- package/dist/components/image/image-config.d.ts +25 -7
- package/dist/components/image/image-config.d.ts.map +1 -1
- package/dist/components/image/image-styles.d.ts +9 -0
- package/dist/components/image/image-styles.d.ts.map +1 -1
- package/dist/components/input/Input.d.ts +117 -10
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/input/Input.js +20 -20
- package/dist/components/input/PasswordInput.d.ts +48 -0
- package/dist/components/input/PasswordInput.d.ts.map +1 -1
- package/dist/components/input/input-config.d.ts +10 -1
- package/dist/components/input/input-config.d.ts.map +1 -1
- package/dist/components/input/input-config.js +5 -8
- package/dist/components/input/input-styles.d.ts +10 -0
- package/dist/components/input/input-styles.d.ts.map +1 -1
- package/dist/components/input/input-styles.js +5 -9
- package/dist/components/keyboard/OnScreenKeyboard.d.ts +58 -8
- package/dist/components/keyboard/OnScreenKeyboard.d.ts.map +1 -1
- package/dist/components/keyboard/OnScreenKeyboard.js +49 -48
- package/dist/components/keyboard/index.js +1 -1
- package/dist/components/keyboard/keyboard-config.d.ts +88 -3
- package/dist/components/keyboard/keyboard-config.d.ts.map +1 -1
- package/dist/components/keyboard/{default-keyboard-config.js → keyboard-config.js} +7 -1
- package/dist/components/keyboard/keyboard-context.d.ts +103 -13
- package/dist/components/keyboard/keyboard-context.d.ts.map +1 -1
- package/dist/components/keyboard/keyboard-context.js +66 -68
- package/dist/components/keyboard/use-keyboard-field.d.ts +37 -0
- package/dist/components/keyboard/use-keyboard-field.d.ts.map +1 -1
- package/dist/components/link/Link.d.ts +118 -9
- package/dist/components/link/Link.d.ts.map +1 -1
- package/dist/components/link/Link.js +29 -30
- package/dist/components/link/link-config.d.ts +58 -5
- package/dist/components/link/link-config.d.ts.map +1 -1
- package/dist/components/link/link-styles.d.ts +24 -4
- package/dist/components/link/link-styles.d.ts.map +1 -1
- package/dist/components/marquee/Marquee.d.ts +77 -8
- package/dist/components/marquee/Marquee.d.ts.map +1 -1
- package/dist/components/marquee/Marquee.js +5 -5
- package/dist/components/marquee/marquee-config.d.ts +74 -0
- package/dist/components/marquee/marquee-config.d.ts.map +1 -1
- package/dist/components/marquee/marquee-styles.d.ts +12 -0
- package/dist/components/marquee/marquee-styles.d.ts.map +1 -1
- package/dist/components/modal/Modal.d.ts +113 -25
- package/dist/components/modal/Modal.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +75 -82
- package/dist/components/modal/modal-config.d.ts +59 -1
- package/dist/components/modal/modal-config.d.ts.map +1 -1
- package/dist/components/modal/modal-styles.d.ts +8 -1
- package/dist/components/modal/modal-styles.d.ts.map +1 -1
- package/dist/components/modal/modal-styles.js +4 -11
- package/dist/components/multi-select/MultiSelect.d.ts +152 -23
- package/dist/components/multi-select/MultiSelect.d.ts.map +1 -1
- package/dist/components/multi-select/MultiSelect.js +195 -217
- package/dist/components/multi-select/multi-select-config.d.ts +61 -23
- package/dist/components/multi-select/multi-select-config.d.ts.map +1 -1
- package/dist/components/multi-select/multi-select-config.js +16 -25
- package/dist/components/multi-select/multi-select-styles.d.ts +17 -0
- package/dist/components/multi-select/multi-select-styles.d.ts.map +1 -1
- package/dist/components/multi-select/multi-select-styles.js +9 -13
- package/dist/components/radio/Radio.d.ts +137 -13
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/Radio.js +66 -141
- package/dist/components/radio/RadioGroup.d.ts +88 -23
- package/dist/components/radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio/RadioGroup.js +141 -66
- package/dist/components/radio/radio-config.d.ts +36 -11
- package/dist/components/radio/radio-config.d.ts.map +1 -1
- package/dist/components/radio/radio-config.js +9 -11
- package/dist/components/radio/radio-context.d.ts +44 -1
- package/dist/components/radio/radio-context.d.ts.map +1 -1
- package/dist/components/radio/radio-styles.d.ts +24 -1
- package/dist/components/radio/radio-styles.d.ts.map +1 -1
- package/dist/components/resizable-screen/ResizableScreen.d.ts +79 -32
- package/dist/components/resizable-screen/ResizableScreen.d.ts.map +1 -1
- package/dist/components/resizable-screen/ResizableScreen.js +77 -72
- package/dist/components/resizable-screen/resizable-screen-config.d.ts +62 -0
- package/dist/components/resizable-screen/resizable-screen-config.d.ts.map +1 -1
- package/dist/components/scrollbar/scrollbar-config.d.ts +44 -9
- package/dist/components/scrollbar/scrollbar-config.d.ts.map +1 -1
- package/dist/components/select/Select.d.ts +157 -17
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +141 -152
- package/dist/components/select/select-config.d.ts +26 -19
- package/dist/components/select/select-config.d.ts.map +1 -1
- package/dist/components/select/select-config.js +5 -21
- package/dist/components/select/select-styles.d.ts +10 -0
- package/dist/components/select/select-styles.d.ts.map +1 -1
- package/dist/components/select/select-styles.js +5 -9
- package/dist/components/select-menu/SelectMenu.d.ts +125 -8
- package/dist/components/select-menu/SelectMenu.d.ts.map +1 -1
- package/dist/components/select-menu/SelectMenu.js +107 -79
- package/dist/components/select-menu/index.d.ts +2 -0
- package/dist/components/select-menu/index.d.ts.map +1 -1
- package/dist/components/select-menu/index.js +1 -0
- package/dist/components/select-menu/select-menu-config.d.ts +82 -0
- package/dist/components/select-menu/select-menu-config.d.ts.map +1 -0
- package/dist/components/select-menu/select-menu-config.js +12 -0
- package/dist/components/sidebar/Sidebar.d.ts +151 -51
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +211 -232
- package/dist/components/sidebar/sidebar-config.d.ts +140 -21
- package/dist/components/sidebar/sidebar-config.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar-config.js +9 -12
- package/dist/components/sidebar/sidebar-styles.d.ts +24 -0
- package/dist/components/sidebar/sidebar-styles.d.ts.map +1 -1
- package/dist/components/spinner/spinner-config.d.ts +15 -9
- package/dist/components/spinner/spinner-config.d.ts.map +1 -1
- package/dist/components/spinner/spinner-styles.d.ts +10 -3
- package/dist/components/spinner/spinner-styles.d.ts.map +1 -1
- package/dist/components/spinner/spinner.d.ts +27 -20
- package/dist/components/spinner/spinner.d.ts.map +1 -1
- package/dist/components/spinner/spinner.js +18 -18
- package/dist/components/switch/Switch.d.ts +109 -9
- package/dist/components/switch/Switch.d.ts.map +1 -1
- package/dist/components/switch/Switch.js +19 -19
- package/dist/components/switch/switch-config.d.ts +20 -6
- package/dist/components/switch/switch-config.d.ts.map +1 -1
- package/dist/components/switch/switch-config.js +8 -16
- package/dist/components/switch/switch-styles.d.ts +17 -0
- package/dist/components/switch/switch-styles.d.ts.map +1 -1
- package/dist/components/table/Table.d.ts +101 -28
- package/dist/components/table/Table.d.ts.map +1 -1
- package/dist/components/table/Table.js +56 -56
- package/dist/components/table/table-config.d.ts +75 -8
- package/dist/components/table/table-config.d.ts.map +1 -1
- package/dist/components/table/table-styles.d.ts +25 -6
- package/dist/components/table/table-styles.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +84 -31
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +44 -44
- package/dist/components/tabs/tabs-config.d.ts +102 -9
- package/dist/components/tabs/tabs-config.d.ts.map +1 -1
- package/dist/components/tabs/tabs-styles.d.ts +16 -4
- package/dist/components/tabs/tabs-styles.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.d.ts +105 -11
- package/dist/components/textarea/Textarea.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.js +27 -24
- package/dist/components/textarea/textarea-config.d.ts +21 -0
- package/dist/components/textarea/textarea-config.d.ts.map +1 -1
- package/dist/components/textarea/textarea-config.js +8 -16
- package/dist/components/textarea/textarea-styles.d.ts +9 -0
- package/dist/components/textarea/textarea-styles.d.ts.map +1 -1
- package/dist/components/textarea/textarea-styles.js +5 -9
- package/dist/components/toast/ToastItem.d.ts +58 -4
- package/dist/components/toast/ToastItem.d.ts.map +1 -1
- package/dist/components/toast/ToastItem.js +18 -18
- package/dist/components/toast/toast-config.d.ts +104 -6
- package/dist/components/toast/toast-config.d.ts.map +1 -1
- package/dist/components/toast/toast-context.d.ts +123 -11
- package/dist/components/toast/toast-context.d.ts.map +1 -1
- package/dist/components/toast/toast-context.js +19 -19
- package/dist/components/toast/toast-styles.d.ts +27 -5
- package/dist/components/toast/toast-styles.d.ts.map +1 -1
- package/dist/components/toast/use-pausable-timeout.d.ts +29 -0
- package/dist/components/toast/use-pausable-timeout.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +76 -16
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.js +25 -25
- package/dist/components/tooltip/tooltip-config.d.ts +73 -3
- package/dist/components/tooltip/tooltip-config.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip-styles.d.ts +12 -0
- package/dist/components/tooltip/tooltip-styles.d.ts.map +1 -1
- package/dist/config/config.d.ts +50 -2
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/default-config.d.ts +5 -0
- package/dist/config/default-config.d.ts.map +1 -1
- package/dist/config/default-config.js +23 -0
- package/dist/config/define-config.d.ts +23 -0
- package/dist/config/define-config.d.ts.map +1 -1
- package/dist/config/resolve-color.d.ts +25 -0
- package/dist/config/resolve-color.d.ts.map +1 -1
- package/dist/config/resolve-config.d.ts +23 -0
- package/dist/config/resolve-config.d.ts.map +1 -1
- package/dist/index.css +43 -7
- package/dist/index.d.ts +30 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +120 -115
- package/dist/libs/context.d.ts +50 -1
- package/dist/libs/context.d.ts.map +1 -1
- package/dist/libs/registry.d.ts +61 -5
- package/dist/libs/registry.d.ts.map +1 -1
- package/dist/libs/use-isomorphic-layout-effect.d.ts +18 -0
- package/dist/libs/use-isomorphic-layout-effect.d.ts.map +1 -1
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/radius.d.ts +37 -1
- package/dist/shared/radius.d.ts.map +1 -1
- package/dist/shared/variant.d.ts +31 -0
- package/dist/shared/variant.d.ts.map +1 -1
- package/dist/shared/variant.js +132 -45
- package/dist/theme/color.d.ts +89 -1
- package/dist/theme/color.d.ts.map +1 -1
- package/dist/theme/controller.d.ts +121 -0
- package/dist/theme/controller.d.ts.map +1 -1
- package/dist/theme/controller.js +84 -0
- package/dist/theme/useTheme.d.ts +68 -0
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +23 -0
- package/dist/utils/index.d.ts +0 -7
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/resolve-token.d.ts +101 -0
- package/dist/utils/resolve-token.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/components/keyboard/default-keyboard-config.d.ts +0 -10
- package/dist/components/keyboard/default-keyboard-config.d.ts.map +0 -1
- package/dist/shared/size.d.ts +0 -2
- package/dist/shared/size.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/Autocomplete.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAKf,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,uBAAuB,CAAC;AAI/B,KAAK,qBAAqB,GAAG,kBAAkB,GAC7C,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;;;;OAKG;IACH,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAE5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAE5E;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAE7C;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,eAAO,MAAM,YAAY,gHAoMxB,CAAC"}
|
|
@@ -1,135 +1,142 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as g, jsx as
|
|
3
|
-
import { useFloating as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { useAsheeConfig as
|
|
6
|
-
import { resolveCascade as
|
|
7
|
-
import { Input as
|
|
8
|
-
import { SelectMenu as
|
|
9
|
-
import { FALLBACK_AUTOCOMPLETE_CONFIG as
|
|
10
|
-
const
|
|
2
|
+
import { jsxs as g, jsx as z } from "react/jsx-runtime";
|
|
3
|
+
import { useFloating as V, autoUpdate as C, offset as ee, flip as te, shift as se, size as re, useFocus as oe, useDismiss as ie, useRole as le, useInteractions as ce } from "@floating-ui/react";
|
|
4
|
+
import { forwardRef as ae, useMemo as F, useState as A, useEffect as fe, useCallback as K } from "react";
|
|
5
|
+
import { useAsheeConfig as me } from "../../libs/context.js";
|
|
6
|
+
import { resolveCascade as S, resolveRadiusKey as de } from "../../utils/resolve-token.js";
|
|
7
|
+
import { Input as pe } from "../input/Input.js";
|
|
8
|
+
import { SelectMenu as ue } from "../select-menu/SelectMenu.js";
|
|
9
|
+
import { FALLBACK_AUTOCOMPLETE_CONFIG as n } from "./autocomplete-config.js";
|
|
10
|
+
const ne = ae(
|
|
11
11
|
({
|
|
12
12
|
options: o = [],
|
|
13
13
|
value: s,
|
|
14
14
|
onValueChange: r,
|
|
15
15
|
onInputChange: c,
|
|
16
|
-
allowCustomValue:
|
|
16
|
+
allowCustomValue: b = !1,
|
|
17
17
|
belowList: w,
|
|
18
18
|
dropdownClassName: L,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
menu: E,
|
|
20
|
+
variant: M,
|
|
21
|
+
color: P,
|
|
22
|
+
radius: j,
|
|
23
|
+
size: N,
|
|
23
24
|
endContent: T,
|
|
24
|
-
onClick:
|
|
25
|
+
onClick: y,
|
|
25
26
|
disabled: O,
|
|
26
|
-
placeholder:
|
|
27
|
-
className:
|
|
28
|
-
size: _,
|
|
27
|
+
placeholder: U = "Type to search...",
|
|
28
|
+
className: _,
|
|
29
29
|
...B
|
|
30
|
-
},
|
|
31
|
-
var
|
|
32
|
-
const
|
|
30
|
+
}, a) => {
|
|
31
|
+
var R;
|
|
32
|
+
const f = me(), t = (R = f.components) == null ? void 0 : R.autocomplete, i = F(
|
|
33
33
|
() => o.find((e) => e.value === s),
|
|
34
34
|
[o, s]
|
|
35
|
-
), [
|
|
35
|
+
), [x, m] = A(!1), [d, p] = A(
|
|
36
36
|
() => i ? i.label : String(s ?? "")
|
|
37
37
|
);
|
|
38
|
-
|
|
39
|
-
i ?
|
|
38
|
+
fe(() => {
|
|
39
|
+
i ? p(i.label) : s != null && p(String(s));
|
|
40
40
|
}, [i, s]);
|
|
41
|
-
const { refs:
|
|
42
|
-
open:
|
|
43
|
-
onOpenChange: (e) => !O &&
|
|
41
|
+
const { refs: v, floatingStyles: D, context: u } = V({
|
|
42
|
+
open: x,
|
|
43
|
+
onOpenChange: (e) => !O && m(e),
|
|
44
44
|
placement: "bottom-start",
|
|
45
|
-
whileElementsMounted:
|
|
46
|
-
middleware: [
|
|
47
|
-
|
|
45
|
+
whileElementsMounted: C,
|
|
46
|
+
middleware: [
|
|
47
|
+
ee(4),
|
|
48
|
+
te(),
|
|
49
|
+
se({ padding: 8 }),
|
|
50
|
+
re({
|
|
51
|
+
apply({ availableHeight: e, elements: l }) {
|
|
52
|
+
Object.assign(l.floating.style, {
|
|
53
|
+
maxHeight: `${e}px`
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
}), G = oe(u), H = ie(u), I = le(u, { role: "combobox" }), { getReferenceProps: $, getFloatingProps: q } = ce([
|
|
48
59
|
G,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
]),
|
|
52
|
-
|
|
53
|
-
t == null ? void 0 : t.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
),
|
|
57
|
-
E,
|
|
58
|
-
t == null ? void 0 : t.menuVariant,
|
|
59
|
-
a.defaultVariant,
|
|
60
|
-
l.variant
|
|
61
|
-
), X = p(
|
|
62
|
-
K,
|
|
63
|
-
t == null ? void 0 : t.menuColor,
|
|
64
|
-
a.defaultColor,
|
|
65
|
-
l.color
|
|
66
|
-
), Y = fe(
|
|
67
|
-
N,
|
|
68
|
-
t == null ? void 0 : t.menuRadius,
|
|
69
|
-
a.defaultRadius,
|
|
70
|
-
l.radius
|
|
71
|
-
), Z = p(
|
|
60
|
+
H,
|
|
61
|
+
I
|
|
62
|
+
]), J = S(
|
|
63
|
+
M,
|
|
64
|
+
t == null ? void 0 : t.variant,
|
|
65
|
+
f.defaultVariant,
|
|
66
|
+
n.variant
|
|
67
|
+
), Q = S(
|
|
72
68
|
P,
|
|
73
|
-
t == null ? void 0 : t.
|
|
69
|
+
t == null ? void 0 : t.color,
|
|
70
|
+
f.defaultColor,
|
|
71
|
+
n.color
|
|
72
|
+
), W = de(
|
|
73
|
+
j,
|
|
74
|
+
t == null ? void 0 : t.radius,
|
|
75
|
+
f.defaultRadius,
|
|
76
|
+
n.radius
|
|
77
|
+
), X = S(
|
|
78
|
+
N,
|
|
79
|
+
t == null ? void 0 : t.size,
|
|
74
80
|
void 0,
|
|
75
|
-
|
|
76
|
-
),
|
|
77
|
-
(e) => e.label.toLowerCase().includes(
|
|
78
|
-
) : o, [o,
|
|
81
|
+
n.size
|
|
82
|
+
), Y = F(() => d.trim() ? o.filter(
|
|
83
|
+
(e) => e.label.toLowerCase().includes(d.toLowerCase())
|
|
84
|
+
) : o, [o, d]), Z = K(
|
|
79
85
|
(e) => {
|
|
80
|
-
const
|
|
81
|
-
|
|
86
|
+
const l = e.target.value;
|
|
87
|
+
p(l), c == null || c(l), m(!0), b && (r == null || r(l));
|
|
82
88
|
},
|
|
83
|
-
[
|
|
84
|
-
),
|
|
89
|
+
[b, c, r]
|
|
90
|
+
), k = K(
|
|
85
91
|
(e) => {
|
|
86
|
-
|
|
92
|
+
p(e.label), r == null || r(e.value, e), m(!1);
|
|
87
93
|
},
|
|
88
94
|
[r]
|
|
89
|
-
),
|
|
95
|
+
), h = F(
|
|
90
96
|
() => s != null ? [s] : [],
|
|
91
97
|
[s]
|
|
92
98
|
);
|
|
93
99
|
return /* @__PURE__ */ g("div", { className: "w-full relative inline-block", children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
|
|
100
|
+
/* @__PURE__ */ z(
|
|
101
|
+
pe,
|
|
96
102
|
{
|
|
97
103
|
ref: (e) => {
|
|
98
|
-
|
|
104
|
+
v.setReference(e), typeof a == "function" ? a(e) : a && (a.current = e);
|
|
99
105
|
},
|
|
100
|
-
|
|
106
|
+
variant: J,
|
|
107
|
+
radius: W,
|
|
108
|
+
color: Q,
|
|
109
|
+
size: X,
|
|
101
110
|
disabled: O,
|
|
102
|
-
placeholder:
|
|
103
|
-
value:
|
|
104
|
-
onChange:
|
|
111
|
+
placeholder: U,
|
|
112
|
+
value: d,
|
|
113
|
+
onChange: Z,
|
|
105
114
|
onClick: (e) => {
|
|
106
|
-
O ||
|
|
115
|
+
O || m(!0), y == null || y(e);
|
|
107
116
|
},
|
|
108
|
-
"aria-expanded":
|
|
109
|
-
"aria-autocomplete": "
|
|
117
|
+
"aria-expanded": x,
|
|
118
|
+
"aria-autocomplete": "none",
|
|
110
119
|
endContent: T,
|
|
111
|
-
className:
|
|
112
|
-
|
|
120
|
+
className: _,
|
|
121
|
+
...$(B)
|
|
113
122
|
}
|
|
114
123
|
),
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
|
|
124
|
+
/* @__PURE__ */ z(
|
|
125
|
+
ue,
|
|
117
126
|
{
|
|
118
|
-
isOpen:
|
|
119
|
-
context:
|
|
127
|
+
isOpen: x,
|
|
128
|
+
context: u,
|
|
120
129
|
floatingStyles: D,
|
|
121
|
-
getFloatingProps:
|
|
122
|
-
setFloatingRef:
|
|
123
|
-
options:
|
|
124
|
-
selectedValues:
|
|
125
|
-
onSelectOption:
|
|
130
|
+
getFloatingProps: q,
|
|
131
|
+
setFloatingRef: v.setFloating,
|
|
132
|
+
options: Y,
|
|
133
|
+
selectedValues: h,
|
|
134
|
+
onSelectOption: k,
|
|
126
135
|
isSearch: !1,
|
|
127
136
|
belowList: w,
|
|
128
137
|
dropdownClassName: L,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
radius: Y,
|
|
132
|
-
size: Z,
|
|
138
|
+
menuProps: E,
|
|
139
|
+
menuConfig: t == null ? void 0 : t.menu,
|
|
133
140
|
initialFocus: -1,
|
|
134
141
|
returnFocus: !1
|
|
135
142
|
}
|
|
@@ -137,7 +144,7 @@ const pe = me(
|
|
|
137
144
|
] });
|
|
138
145
|
}
|
|
139
146
|
);
|
|
140
|
-
|
|
147
|
+
ne.displayName = "Autocomplete";
|
|
141
148
|
export {
|
|
142
|
-
|
|
149
|
+
ne as Autocomplete
|
|
143
150
|
};
|
|
@@ -1,25 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Color, Variant } from '../../shared/variant';
|
|
4
|
-
import { FieldConfig, FieldSizeKey } from '../field/field-config';
|
|
5
|
-
/** Density scale used by the autocomplete trigger and menu. */
|
|
6
|
-
export type AutocompleteSizeKey = FieldSizeKey;
|
|
7
|
-
/**
|
|
8
|
-
* A single selectable autocomplete suggestion.
|
|
9
|
-
*/
|
|
10
|
-
export interface AutocompleteOption {
|
|
11
|
-
/** Text displayed in the input and in the options list. */
|
|
12
|
-
label: string;
|
|
13
|
-
/** Stable identifier returned via `onValueChange`. */
|
|
14
|
-
value: string | number;
|
|
15
|
-
/** Disables the option when `true`.
|
|
16
|
-
*
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
/** Allows arbitrary option metadata (e.g. icons, descriptions). */
|
|
21
|
-
[key: string]: unknown;
|
|
22
|
-
}
|
|
1
|
+
import { FieldConfig } from '../field/field-config';
|
|
2
|
+
import { SelectMenuConfig } from '../select-menu';
|
|
23
3
|
/**
|
|
24
4
|
* Theme configuration options for the Autocomplete component.
|
|
25
5
|
*
|
|
@@ -28,46 +8,11 @@ export interface AutocompleteOption {
|
|
|
28
8
|
* the AsheeUI config.
|
|
29
9
|
*/
|
|
30
10
|
export interface AutocompleteConfig extends FieldConfig {
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
size?: AutocompleteSizeKey;
|
|
36
|
-
/** Trigger and menu corner rounding.
|
|
37
|
-
*
|
|
38
|
-
* @default "md"
|
|
39
|
-
*/
|
|
40
|
-
radius?: Radius;
|
|
41
|
-
/** Visual style of the trigger input.
|
|
42
|
-
*
|
|
43
|
-
* @default "bordered"
|
|
44
|
-
*/
|
|
45
|
-
variant?: Variant;
|
|
46
|
-
/** Theme accent color of the trigger input.
|
|
47
|
-
*
|
|
48
|
-
* @default "primary"
|
|
49
|
-
*/
|
|
50
|
-
color?: Color;
|
|
51
|
-
/** Visual style of the dropdown menu.
|
|
52
|
-
*
|
|
53
|
-
* @default "solid"
|
|
54
|
-
*/
|
|
55
|
-
menuVariant?: Variant;
|
|
56
|
-
/** Theme accent color of the dropdown menu.
|
|
57
|
-
*
|
|
58
|
-
* @default "default"
|
|
59
|
-
*/
|
|
60
|
-
menuColor?: Color;
|
|
61
|
-
/** Corner rounding of the dropdown menu.
|
|
62
|
-
*
|
|
63
|
-
* @default "md"
|
|
64
|
-
*/
|
|
65
|
-
menuRadius?: Radius;
|
|
66
|
-
/** Density scale of the dropdown menu.
|
|
67
|
-
*
|
|
68
|
-
* @default "sm"
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for the dropdown menu that displays suggestions.
|
|
13
|
+
* Controls the menu's visual appearance and behavior.
|
|
69
14
|
*/
|
|
70
|
-
|
|
15
|
+
menu?: SelectMenuConfig;
|
|
71
16
|
}
|
|
72
17
|
/**
|
|
73
18
|
* Default config values registered for the Autocomplete component.
|
|
@@ -77,8 +22,10 @@ export interface AutocompleteConfig extends FieldConfig {
|
|
|
77
22
|
export declare const defaultAutocompleteConfig: AutocompleteConfig;
|
|
78
23
|
/**
|
|
79
24
|
* Hard fallback values used when no config tier provides a value.
|
|
25
|
+
* These values are used when instance props, component config,
|
|
26
|
+
* and global defaults are all undefined.
|
|
80
27
|
*/
|
|
81
|
-
export declare const FALLBACK_AUTOCOMPLETE_CONFIG: Required<
|
|
28
|
+
export declare const FALLBACK_AUTOCOMPLETE_CONFIG: Required<FieldConfig>;
|
|
82
29
|
declare module "../../libs/registry" {
|
|
83
30
|
interface ComponentTypeConfigRegistry {
|
|
84
31
|
autocomplete: AutocompleteConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete-config.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/autocomplete-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"autocomplete-config.d.ts","sourceRoot":"","sources":["../../../src/components/autocomplete/autocomplete-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,kBAAuC,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,uBAAwB,CAAC;AAElE,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,YAAY,EAAE,kBAAkB,CAAC;KAClC;CACF"}
|
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { registerComponentDefaults as
|
|
3
|
-
import { FALLBACK_FIELD_CONFIG as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
labelAlign: "left",
|
|
7
|
-
variant: "bordered"
|
|
8
|
-
}, m = {
|
|
9
|
-
...o,
|
|
10
|
-
size: "md",
|
|
11
|
-
radius: "md",
|
|
12
|
-
variant: "bordered",
|
|
13
|
-
color: "primary",
|
|
14
|
-
labelAlign: "left",
|
|
15
|
-
menuVariant: "solid",
|
|
16
|
-
menuColor: "secondary",
|
|
17
|
-
menuRadius: "md",
|
|
18
|
-
menuSize: "sm"
|
|
19
|
-
};
|
|
20
|
-
e("autocomplete", r);
|
|
2
|
+
import { registerComponentDefaults as o } from "../../libs/registry.js";
|
|
3
|
+
import { FALLBACK_FIELD_CONFIG as t, defaultFieldConfig as e } from "../field/field-config.js";
|
|
4
|
+
const C = e, l = t;
|
|
5
|
+
o("autocomplete", C);
|
|
21
6
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
7
|
+
l as FALLBACK_AUTOCOMPLETE_CONFIG,
|
|
8
|
+
C as defaultAutocompleteConfig
|
|
24
9
|
};
|
|
@@ -1,54 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Color, Variant } from '../../shared/variant';
|
|
3
|
-
import { ButtonRadiusKey, ButtonSizeKey } from './button-config';
|
|
1
|
+
import { ButtonConfig } from './button-config';
|
|
4
2
|
/**
|
|
5
3
|
* Visual and behavioural options shared by button-like elements.
|
|
4
|
+
* This type combines the ButtonConfig with native button HTML attributes.
|
|
6
5
|
*/
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
color?: Color;
|
|
18
|
-
/** Padding and font-size scale.
|
|
19
|
-
*
|
|
20
|
-
* @default "md"
|
|
21
|
-
*/
|
|
22
|
-
size?: ButtonSizeKey;
|
|
23
|
-
/** Corner rounding.
|
|
24
|
-
*
|
|
25
|
-
* @default "md"
|
|
26
|
-
*/
|
|
27
|
-
radius?: ButtonRadiusKey;
|
|
28
|
-
/** Enables the press-down scale animation.
|
|
6
|
+
export type BaseButtonProps = ButtonConfig & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "disabled">;
|
|
7
|
+
/**
|
|
8
|
+
* Configuration options for the Button component.
|
|
9
|
+
*
|
|
10
|
+
* @see {@link ButtonCommonProps} for the shared visual props.
|
|
11
|
+
*/
|
|
12
|
+
interface ButtonProps extends BaseButtonProps {
|
|
13
|
+
/**
|
|
14
|
+
* Whether the button is in a disabled state.
|
|
15
|
+
* Disabled buttons cannot be interacted with and appear dimmed.
|
|
29
16
|
*
|
|
30
|
-
* @default
|
|
17
|
+
* @default false
|
|
31
18
|
*/
|
|
32
|
-
|
|
33
|
-
/**
|
|
19
|
+
isDisabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Shows a loading spinner and blocks interaction.
|
|
22
|
+
* When true, the button displays a spinner and prevents clicks.
|
|
34
23
|
*
|
|
35
24
|
* @default false
|
|
36
25
|
*/
|
|
37
|
-
|
|
38
|
-
/**
|
|
26
|
+
isLoading?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Native button type.
|
|
29
|
+
* Controls the button's behavior in forms.
|
|
39
30
|
*
|
|
40
|
-
* @default
|
|
31
|
+
* @default "button"
|
|
41
32
|
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
33
|
+
type?: "button" | "submit" | "reset";
|
|
34
|
+
/**
|
|
35
|
+
* Switches to the compact icon-only layout.
|
|
36
|
+
* When true, the button becomes square and removes text padding.
|
|
44
37
|
*
|
|
45
38
|
* @default false
|
|
46
39
|
*/
|
|
47
|
-
|
|
48
|
-
/** Extra classes merged with internal styles. */
|
|
49
|
-
className?: string;
|
|
40
|
+
icon?: boolean;
|
|
50
41
|
}
|
|
51
|
-
type CleanButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color" | "disabled" | "className" | "children">;
|
|
52
42
|
/**
|
|
53
43
|
* A clickable element that triggers an action or event.
|
|
54
44
|
*
|
|
@@ -57,6 +47,10 @@ type CleanButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "col
|
|
|
57
47
|
* Visual tokens resolve through the standard AsheeUI cascade: prop,
|
|
58
48
|
* component config, global theme defaults, and the built-in fallback.
|
|
59
49
|
*
|
|
50
|
+
* The component automatically handles accessibility attributes including
|
|
51
|
+
* aria-disabled, aria-busy for loading states, and proper focus management.
|
|
52
|
+
* Icon-only buttons should provide an aria-label for accessibility.
|
|
53
|
+
*
|
|
60
54
|
* @param props - Button configuration options and native button props.
|
|
61
55
|
* @param props.variant - Visual style variant. Defaults to "bordered".
|
|
62
56
|
* @param props.color - Theme accent color. Defaults to "primary".
|
|
@@ -69,6 +63,7 @@ type CleanButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "col
|
|
|
69
63
|
* @param props.type - Native button type. Defaults to "button".
|
|
70
64
|
* @param props.icon - Icon-only compact layout. Defaults to false.
|
|
71
65
|
* @param props.children - Button label content.
|
|
66
|
+
* @param props.className - Extra CSS classes for the button.
|
|
72
67
|
*
|
|
73
68
|
* @example
|
|
74
69
|
* ```tsx
|
|
@@ -86,20 +81,24 @@ type CleanButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "col
|
|
|
86
81
|
* );
|
|
87
82
|
* }
|
|
88
83
|
* ```
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```tsx
|
|
87
|
+
* // Icon-only button with loading state
|
|
88
|
+
* <Button
|
|
89
|
+
* icon
|
|
90
|
+
* isLoading
|
|
91
|
+
* aria-label="Refresh content"
|
|
92
|
+
* onClick={handleRefresh}
|
|
93
|
+
* >
|
|
94
|
+
* <RefreshIcon />
|
|
95
|
+
* </Button>
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* @see ButtonConfig - The configuration type for component defaults.
|
|
99
|
+
* @see resolveVariantClass - Utility for resolving variant and color styles.
|
|
100
|
+
* @see useAsheeConfig - Hook for accessing the global configuration.
|
|
89
101
|
*/
|
|
90
|
-
export declare const Button: import('react').ForwardRefExoticComponent<
|
|
91
|
-
/** Native button type.
|
|
92
|
-
*
|
|
93
|
-
* @default "button"
|
|
94
|
-
*/
|
|
95
|
-
type?: "button" | "submit" | "reset";
|
|
96
|
-
/** Switches to the compact icon-only layout.
|
|
97
|
-
*
|
|
98
|
-
* @default false
|
|
99
|
-
*/
|
|
100
|
-
icon?: boolean;
|
|
101
|
-
/** Button label content. */
|
|
102
|
-
children?: ReactNode;
|
|
103
|
-
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
102
|
+
export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
104
103
|
export {};
|
|
105
104
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAE,KAAK,YAAY,EAA0B,MAAM,iBAAiB,CAAC;AAG5E;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,GACxC,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE5E;;;;GAIG;AACH,UAAU,WAAY,SAAQ,eAAe;IAC3C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAErC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,eAAO,MAAM,MAAM,2GAgHlB,CAAC"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { jsxs as D, jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as W } from "react";
|
|
4
4
|
import { useAsheeConfig as j } from "../../libs/context.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { resolveCascade as r, resolveRadiusKey as k, resolveClassKey as w } from "../../utils/resolve-token.js";
|
|
8
|
-
import { Spinner as E } from "../spinner/spinner.js";
|
|
5
|
+
import { resolveCascade as r, resolveRadiusKey as F, resolveClassKey as V } from "../../utils/resolve-token.js";
|
|
6
|
+
import { Spinner as k } from "../spinner/spinner.js";
|
|
9
7
|
import { FALLBACK_BUTTON_CONFIG as s } from "./button-config.js";
|
|
10
|
-
import { BUTTON_ICON_SIZE_CLASS as
|
|
11
|
-
import { cn as
|
|
8
|
+
import { BUTTON_ICON_SIZE_CLASS as w, BUTTON_SIZE_CLASS as E } from "./button-styles.js";
|
|
9
|
+
import { cn as Z } from "../../utils/cn.js";
|
|
10
|
+
import { UnderlineRadius as f, RADIUS_CLASS as G } from "../../shared/radius.js";
|
|
11
|
+
import { resolveVariantClass as q } from "../../shared/variant.js";
|
|
12
12
|
const H = W(
|
|
13
13
|
(v, p) => {
|
|
14
14
|
var m;
|
|
@@ -26,13 +26,13 @@ const H = W(
|
|
|
26
26
|
children: B,
|
|
27
27
|
type: I = "button",
|
|
28
28
|
onClick: o,
|
|
29
|
-
...
|
|
29
|
+
...K
|
|
30
30
|
} = v, i = j(), e = (m = i.components) == null ? void 0 : m.button, t = r(
|
|
31
31
|
b,
|
|
32
32
|
e == null ? void 0 : e.variant,
|
|
33
33
|
i.defaultVariant,
|
|
34
34
|
s.variant
|
|
35
|
-
),
|
|
35
|
+
), R = r(
|
|
36
36
|
y,
|
|
37
37
|
e == null ? void 0 : e.color,
|
|
38
38
|
i.defaultColor,
|
|
@@ -42,12 +42,12 @@ const H = W(
|
|
|
42
42
|
e == null ? void 0 : e.size,
|
|
43
43
|
void 0,
|
|
44
44
|
s.size
|
|
45
|
-
),
|
|
45
|
+
), T = F(
|
|
46
46
|
N,
|
|
47
47
|
e == null ? void 0 : e.radius,
|
|
48
48
|
i.defaultRadius,
|
|
49
49
|
s.radius
|
|
50
|
-
),
|
|
50
|
+
), z = r(
|
|
51
51
|
S,
|
|
52
52
|
e == null ? void 0 : e.animate,
|
|
53
53
|
s.animate,
|
|
@@ -57,24 +57,24 @@ const H = W(
|
|
|
57
57
|
e == null ? void 0 : e.fullWidth,
|
|
58
58
|
void 0,
|
|
59
59
|
s.fullWidth
|
|
60
|
-
), U = d ?
|
|
60
|
+
), U = d ? w[l] : E[l], n = _ || a, x = (u) => {
|
|
61
61
|
if (n) {
|
|
62
62
|
u.preventDefault();
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
o == null || o(u);
|
|
66
|
-
}, C =
|
|
66
|
+
}, C = Z(
|
|
67
67
|
"inline-flex items-center justify-center font-medium transition-colors select-none shrink-0",
|
|
68
68
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
69
69
|
"disabled:pointer-events-none disabled:opacity-50",
|
|
70
70
|
"aria-disabled:pointer-events-none aria-disabled:opacity-50",
|
|
71
71
|
O && "w-full",
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
z && "motion-safe:transition-transform motion-safe:duration-100 motion-safe:active:scale-[0.99]",
|
|
73
|
+
q(t, R),
|
|
74
74
|
U,
|
|
75
|
-
|
|
76
|
-
f(t,
|
|
77
|
-
|
|
75
|
+
V(
|
|
76
|
+
f(t, T),
|
|
77
|
+
G,
|
|
78
78
|
f(t, s.radius)
|
|
79
79
|
),
|
|
80
80
|
L
|
|
@@ -89,9 +89,9 @@ const H = W(
|
|
|
89
89
|
"aria-busy": a,
|
|
90
90
|
onClick: x,
|
|
91
91
|
className: C,
|
|
92
|
-
...
|
|
92
|
+
...K,
|
|
93
93
|
children: [
|
|
94
|
-
a && /* @__PURE__ */ c(
|
|
94
|
+
a && /* @__PURE__ */ c(k, { className: l }),
|
|
95
95
|
a && /* @__PURE__ */ c("span", { className: "sr-only", children: "Loading" }),
|
|
96
96
|
a && d ? null : B
|
|
97
97
|
]
|