asheeui 0.6.2 → 0.6.3
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,157 +1,162 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useAsheeConfig as
|
|
5
|
-
import { resolveCascade as
|
|
6
|
-
import { FALLBACK_RESIZABLE_SCREEN_CONFIG as
|
|
2
|
+
import { jsxs as W, jsx as v } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as C, useState as k, useRef as ee, useCallback as A } from "react";
|
|
4
|
+
import { useAsheeConfig as te } from "../../libs/context.js";
|
|
5
|
+
import { resolveCascade as o } from "../../utils/resolve-token.js";
|
|
6
|
+
import { FALLBACK_RESIZABLE_SCREEN_CONFIG as l } from "./resizable-screen-config.js";
|
|
7
7
|
import { cn as c } from "../../utils/cn.js";
|
|
8
|
-
const
|
|
8
|
+
const re = C(
|
|
9
9
|
({
|
|
10
10
|
children: H,
|
|
11
11
|
left: I,
|
|
12
|
-
size:
|
|
13
|
-
defaultSize:
|
|
14
|
-
minSize:
|
|
15
|
-
maxSize:
|
|
16
|
-
step:
|
|
12
|
+
size: w,
|
|
13
|
+
defaultSize: M,
|
|
14
|
+
minSize: N,
|
|
15
|
+
maxSize: E,
|
|
16
|
+
step: K,
|
|
17
17
|
orientation: L,
|
|
18
18
|
hideHandle: j,
|
|
19
19
|
onSizeChange: u,
|
|
20
|
-
handleClassName:
|
|
20
|
+
handleClassName: x,
|
|
21
21
|
className: B,
|
|
22
22
|
style: U,
|
|
23
23
|
..._
|
|
24
24
|
}, d) => {
|
|
25
25
|
var R;
|
|
26
|
-
const t = (R =
|
|
27
|
-
|
|
26
|
+
const t = (R = te().components) == null ? void 0 : R.resizableScreen, h = o(
|
|
27
|
+
N,
|
|
28
28
|
t == null ? void 0 : t.minSize,
|
|
29
29
|
void 0,
|
|
30
|
-
|
|
31
|
-
),
|
|
32
|
-
|
|
30
|
+
l.minSize
|
|
31
|
+
), f = o(
|
|
32
|
+
E,
|
|
33
33
|
t == null ? void 0 : t.maxSize,
|
|
34
34
|
void 0,
|
|
35
|
-
|
|
36
|
-
),
|
|
37
|
-
|
|
35
|
+
l.maxSize
|
|
36
|
+
), D = o(
|
|
37
|
+
K,
|
|
38
38
|
t == null ? void 0 : t.step,
|
|
39
39
|
void 0,
|
|
40
|
-
|
|
41
|
-
), z =
|
|
40
|
+
l.step
|
|
41
|
+
), z = o(
|
|
42
42
|
L,
|
|
43
43
|
t == null ? void 0 : t.orientation,
|
|
44
44
|
void 0,
|
|
45
|
-
|
|
46
|
-
), F =
|
|
45
|
+
l.orientation
|
|
46
|
+
), F = o(
|
|
47
47
|
j,
|
|
48
48
|
t == null ? void 0 : t.hideHandle,
|
|
49
49
|
void 0,
|
|
50
|
-
|
|
51
|
-
),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
l.hideHandle
|
|
51
|
+
), O = o(
|
|
52
|
+
M,
|
|
53
|
+
t == null ? void 0 : t.defaultSize,
|
|
54
|
+
void 0,
|
|
55
|
+
l.defaultSize
|
|
56
|
+
), T = w ?? I ?? O, [$, G] = k(T), [i, b] = k(!1), y = ee(null), S = w !== void 0, a = S ? w : $, g = A(
|
|
57
|
+
(e) => Math.min(Math.max(e, h), f),
|
|
58
|
+
[h, f]
|
|
59
|
+
), s = A(
|
|
55
60
|
(e) => {
|
|
56
61
|
const r = g(e);
|
|
57
|
-
|
|
62
|
+
S || G(r), u == null || u(r);
|
|
58
63
|
},
|
|
59
|
-
[g,
|
|
60
|
-
),
|
|
61
|
-
e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId),
|
|
62
|
-
},
|
|
63
|
-
if (!
|
|
64
|
-
const r = y.current.getBoundingClientRect(),
|
|
64
|
+
[g, S, u]
|
|
65
|
+
), X = (e) => {
|
|
66
|
+
e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), b(!0);
|
|
67
|
+
}, Y = (e) => {
|
|
68
|
+
if (!i || !y.current) return;
|
|
69
|
+
const r = y.current.getBoundingClientRect(), m = z === "horizontal", p = m ? r.width : r.height, Q = m ? e.clientX - r.left : e.clientY - r.top;
|
|
65
70
|
if (p > 0) {
|
|
66
|
-
const
|
|
67
|
-
|
|
71
|
+
const V = Q / p * 100;
|
|
72
|
+
s(V);
|
|
68
73
|
}
|
|
69
74
|
}, P = (e) => {
|
|
70
|
-
if (
|
|
75
|
+
if (i) {
|
|
71
76
|
try {
|
|
72
77
|
e.currentTarget.releasePointerCapture(e.pointerId);
|
|
73
78
|
} catch {
|
|
74
79
|
}
|
|
75
|
-
|
|
80
|
+
b(!1);
|
|
76
81
|
}
|
|
77
|
-
},
|
|
78
|
-
const r = z === "horizontal",
|
|
79
|
-
e.key ===
|
|
80
|
-
}, [
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
+
}, Z = (e) => {
|
|
83
|
+
const r = z === "horizontal", m = r ? "ArrowLeft" : "ArrowUp", p = r ? "ArrowRight" : "ArrowDown";
|
|
84
|
+
e.key === m ? (e.preventDefault(), s(a - D)) : e.key === p ? (e.preventDefault(), s(a + D)) : e.key === "Home" ? (e.preventDefault(), s(h)) : e.key === "End" && (e.preventDefault(), s(f));
|
|
85
|
+
}, [q, J] = H, n = z === "horizontal";
|
|
86
|
+
return /* @__PURE__ */ W(
|
|
82
87
|
"div",
|
|
83
88
|
{
|
|
84
89
|
ref: (e) => {
|
|
85
90
|
y.current = e, typeof d == "function" ? d(e) : d && (d.current = e);
|
|
86
91
|
},
|
|
87
92
|
className: c(
|
|
88
|
-
"w-full h-full min-h-
|
|
89
|
-
|
|
90
|
-
|
|
93
|
+
"w-full h-full min-h-50 min-w-0 relative flex",
|
|
94
|
+
i && "select-none",
|
|
95
|
+
n ? "flex-row" : "flex-col",
|
|
91
96
|
B
|
|
92
97
|
),
|
|
93
98
|
style: {
|
|
94
|
-
cursor:
|
|
99
|
+
cursor: i ? n ? "col-resize" : "row-resize" : "default",
|
|
95
100
|
...U
|
|
96
101
|
},
|
|
97
102
|
..._,
|
|
98
103
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ v(
|
|
100
105
|
"div",
|
|
101
106
|
{
|
|
102
107
|
className: c(
|
|
103
|
-
"h-full w-full min-w-0 min-h-0 overflow-
|
|
104
|
-
|
|
108
|
+
"h-full w-full min-w-0 min-h-0 overflow-clip shrink-0",
|
|
109
|
+
i ? "transition-none" : "transition-[width,height] duration-150 ease-out"
|
|
105
110
|
),
|
|
106
111
|
style: {
|
|
107
|
-
[
|
|
112
|
+
[n ? "width" : "height"]: `${a}%`
|
|
108
113
|
},
|
|
109
|
-
children:
|
|
114
|
+
children: q
|
|
110
115
|
}
|
|
111
116
|
),
|
|
112
117
|
!F && // biome-ignore lint/a11y/useSemanticElements: interactive resizable handle requires div styling
|
|
113
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ v(
|
|
114
119
|
"div",
|
|
115
120
|
{
|
|
116
121
|
role: "separator",
|
|
117
122
|
tabIndex: 0,
|
|
118
|
-
"aria-valuenow": Math.round(
|
|
123
|
+
"aria-valuenow": Math.round(a),
|
|
119
124
|
"aria-valuemin": h,
|
|
120
|
-
"aria-valuemax":
|
|
121
|
-
"aria-orientation":
|
|
125
|
+
"aria-valuemax": f,
|
|
126
|
+
"aria-orientation": n ? "horizontal" : "vertical",
|
|
122
127
|
"aria-label": "Resize panel split",
|
|
123
|
-
onPointerDown:
|
|
124
|
-
onPointerMove:
|
|
128
|
+
onPointerDown: X,
|
|
129
|
+
onPointerMove: Y,
|
|
125
130
|
onPointerUp: P,
|
|
126
131
|
onPointerCancel: P,
|
|
127
|
-
onKeyDown:
|
|
132
|
+
onKeyDown: Z,
|
|
128
133
|
className: c(
|
|
129
134
|
"relative z-20 shrink-0 flex items-center justify-center outline-none select-none group touch-none",
|
|
130
|
-
|
|
135
|
+
n ? "w-4 h-full cursor-col-resize -mx-2" : "h-4 w-full cursor-row-resize -my-2"
|
|
131
136
|
),
|
|
132
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ v(
|
|
133
138
|
"div",
|
|
134
139
|
{
|
|
135
140
|
className: c(
|
|
136
141
|
"transition-colors duration-150",
|
|
137
|
-
|
|
138
|
-
|
|
142
|
+
n ? "w-1 h-full" : "h-1 w-full",
|
|
143
|
+
x || (i ? "bg-primary" : "bg-border group-hover:bg-primary/70 group-focus-visible:bg-primary")
|
|
139
144
|
)
|
|
140
145
|
}
|
|
141
146
|
)
|
|
142
147
|
}
|
|
143
148
|
),
|
|
144
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ v(
|
|
145
150
|
"div",
|
|
146
151
|
{
|
|
147
152
|
className: c(
|
|
148
|
-
"h-full w-full min-w-0 min-h-0 overflow-
|
|
149
|
-
|
|
153
|
+
"h-full w-full min-w-0 min-h-0 overflow-clip shrink-0 flex-1",
|
|
154
|
+
i ? "transition-none" : "transition-[width,height] duration-150 ease-out"
|
|
150
155
|
),
|
|
151
156
|
style: {
|
|
152
|
-
[
|
|
157
|
+
[n ? "width" : "height"]: `${100 - a}%`
|
|
153
158
|
},
|
|
154
|
-
children:
|
|
159
|
+
children: J
|
|
155
160
|
}
|
|
156
161
|
)
|
|
157
162
|
]
|
|
@@ -159,7 +164,7 @@ const te = W(
|
|
|
159
164
|
);
|
|
160
165
|
}
|
|
161
166
|
);
|
|
162
|
-
|
|
167
|
+
re.displayName = "ResizableScreen";
|
|
163
168
|
export {
|
|
164
|
-
|
|
169
|
+
re as ResizableScreen
|
|
165
170
|
};
|
|
@@ -1,13 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ResizableScreen component configuration for AsheeUI.
|
|
3
|
+
* This file defines the configuration types and defaults for the ResizableScreen
|
|
4
|
+
* component, which provides a split panel layout with a draggable handle for
|
|
5
|
+
* resizing the primary panel. It registers the default configuration with the
|
|
6
|
+
* component registry and provides fallback values for the cascade resolution system.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* The orientation of the resizable split.
|
|
10
|
+
* - `horizontal`: Panels are side by side (left/right).
|
|
11
|
+
* - `vertical`: Panels are stacked (top/bottom).
|
|
12
|
+
*/
|
|
1
13
|
export type ResizableOrientation = "horizontal" | "vertical";
|
|
14
|
+
/**
|
|
15
|
+
* Theme configuration options for the ResizableScreen component.
|
|
16
|
+
*
|
|
17
|
+
* Set under `components.resizableScreen` in the AsheeUI config. Values feed the
|
|
18
|
+
* component-level fallback tier of the theme cascade.
|
|
19
|
+
*/
|
|
2
20
|
export interface ResizableScreenConfig {
|
|
21
|
+
/**
|
|
22
|
+
* Default size of the primary panel as a percentage (0-100).
|
|
23
|
+
* Used when the component is uncontrolled.
|
|
24
|
+
*
|
|
25
|
+
* @default 50
|
|
26
|
+
*/
|
|
3
27
|
defaultSize?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Minimum size of the primary panel as a percentage (0-100).
|
|
30
|
+
* Prevents the panel from being resized below this value.
|
|
31
|
+
*
|
|
32
|
+
* @default 20
|
|
33
|
+
*/
|
|
4
34
|
minSize?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Maximum size of the primary panel as a percentage (0-100).
|
|
37
|
+
* Prevents the panel from being resized above this value.
|
|
38
|
+
*
|
|
39
|
+
* @default 80
|
|
40
|
+
*/
|
|
5
41
|
maxSize?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Step size in percentage points for keyboard resizing.
|
|
44
|
+
* Controls how much the size changes per arrow key press.
|
|
45
|
+
*
|
|
46
|
+
* @default 2
|
|
47
|
+
*/
|
|
6
48
|
step?: number;
|
|
49
|
+
/**
|
|
50
|
+
* The orientation of the split layout.
|
|
51
|
+
* Controls whether panels are arranged side by side or stacked.
|
|
52
|
+
*
|
|
53
|
+
* @default "horizontal"
|
|
54
|
+
*/
|
|
7
55
|
orientation?: ResizableOrientation;
|
|
56
|
+
/**
|
|
57
|
+
* Whether to hide the resize handle.
|
|
58
|
+
* When true, the drag handle is not rendered.
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
8
62
|
hideHandle?: boolean;
|
|
9
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Default config values registered for the ResizableScreen component.
|
|
66
|
+
*/
|
|
10
67
|
export declare const defaultResizableScreenConfig: ResizableScreenConfig;
|
|
68
|
+
/**
|
|
69
|
+
* Hard fallback values used when no config tier provides a value.
|
|
70
|
+
* These values are used when instance props, component config,
|
|
71
|
+
* and global defaults are all undefined.
|
|
72
|
+
*/
|
|
11
73
|
export declare const FALLBACK_RESIZABLE_SCREEN_CONFIG: Required<ResizableScreenConfig>;
|
|
12
74
|
declare module "../../libs/registry" {
|
|
13
75
|
interface ComponentTypeConfigRegistry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resizable-screen-config.d.ts","sourceRoot":"","sources":["../../../src/components/resizable-screen/resizable-screen-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resizable-screen-config.d.ts","sourceRoot":"","sources":["../../../src/components/resizable-screen/resizable-screen-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IAEnC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,4BAA4B,EAAE,qBAM1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,qBAAqB,CAQjE,CAAC;AAEb,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,eAAe,EAAE,qBAAqB,CAAC;KACxC;CACF"}
|
|
@@ -1,31 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scrollbar configuration for AsheeUI.
|
|
3
|
+
* This file defines the structural (non-color) theming options for scrollbars.
|
|
4
|
+
* Color properties (thumb/track) are handled separately through ColorVariant
|
|
5
|
+
* in the theme system. This config controls shape, size, and behavior which
|
|
6
|
+
* are theme-agnostic. It registers the default configuration with the
|
|
7
|
+
* component registry for theme-level overrides.
|
|
8
|
+
*/
|
|
1
9
|
/**
|
|
2
10
|
* Structural (non-color) scrollbar theming.
|
|
3
11
|
* Thumb/track colors already live in ColorVariant (scrollbarThumb/scrollbarTrack)
|
|
4
12
|
* per theme - this config controls shape/behavior, which is theme-agnostic.
|
|
5
13
|
*/
|
|
6
14
|
export interface ScrollbarConfig {
|
|
7
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Thickness of the scrollbar.
|
|
17
|
+
* Applied via ::-webkit-scrollbar width and height properties.
|
|
18
|
+
* Accepts any valid CSS size value (e.g., "10px", "0.5rem").
|
|
19
|
+
*/
|
|
8
20
|
width: string;
|
|
9
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Corner radius applied to the thumb.
|
|
23
|
+
* Applied to both the thumb and track when trackRadius is not specified.
|
|
24
|
+
* Accepts any valid CSS radius value.
|
|
25
|
+
*/
|
|
10
26
|
radius: string;
|
|
11
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Optional separate radius for the track.
|
|
29
|
+
* When provided, overrides the radius for the track only.
|
|
30
|
+
* Falls back to the main radius when omitted.
|
|
31
|
+
*/
|
|
12
32
|
trackRadius?: string;
|
|
13
33
|
/**
|
|
14
|
-
* Creates an "inset" thumb look via a transparent border
|
|
15
|
-
*
|
|
34
|
+
* Creates an "inset" thumb look via a transparent border plus background-clip.
|
|
35
|
+
* For example, "3px" gives the thumb 3px of breathing room from the track edge.
|
|
36
|
+
* Accepts any valid CSS size value.
|
|
16
37
|
*/
|
|
17
38
|
thumbBorder: string;
|
|
18
39
|
/**
|
|
19
|
-
* Native `scrollbar-gutter` value
|
|
20
|
-
* content
|
|
40
|
+
* Native `scrollbar-gutter` value.
|
|
41
|
+
* Reserves space for the scrollbar so content does not shift when a
|
|
42
|
+
* scrollbar appears or disappears.
|
|
43
|
+
*
|
|
44
|
+
* - `auto`: No space is reserved.
|
|
45
|
+
* - `stable`: Space is always reserved on the side where the scrollbar appears.
|
|
46
|
+
* - `stable both-edges`: Space is reserved on both sides.
|
|
21
47
|
*/
|
|
22
48
|
gutter: "auto" | "stable" | "stable both-edges";
|
|
23
49
|
/**
|
|
24
|
-
* Native `scrollbar-width` keyword fallback
|
|
25
|
-
* the ::-webkit-scrollbar
|
|
50
|
+
* Native `scrollbar-width` keyword fallback.
|
|
51
|
+
* Used for engines that do not support the ::-webkit-scrollbar
|
|
52
|
+
* pseudo-elements. Width properties are ignored in those engines.
|
|
53
|
+
*
|
|
54
|
+
* - `auto`: Default browser scrollbar width.
|
|
55
|
+
* - `thin`: Thin scrollbar.
|
|
56
|
+
* - `none`: No scrollbar visible.
|
|
26
57
|
*/
|
|
27
58
|
fallbackWidth: "auto" | "thin" | "none";
|
|
28
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Default scrollbar configuration values.
|
|
62
|
+
* Provides a modern, subtle scrollbar with rounded thumb and stable gutter.
|
|
63
|
+
*/
|
|
29
64
|
export declare const defaultScrollbarConfig: ScrollbarConfig;
|
|
30
65
|
declare module "../../libs/registry" {
|
|
31
66
|
interface ComponentTypeConfigRegistry {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbar-config.d.ts","sourceRoot":"","sources":["../../../src/components/scrollbar/scrollbar-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scrollbar-config.d.ts","sourceRoot":"","sources":["../../../src/components/scrollbar/scrollbar-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,mBAAmB,CAAC;IAEhD;;;;;;;;OAQG;IACH,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACzC;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAMpC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,SAAS,EAAE,eAAe,CAAC;KAC5B;CACF"}
|
|
@@ -1,40 +1,180 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { SelectMenuOption } from '../select-menu/select-menu-config';
|
|
3
|
+
import { SelectConfig } from './select-config';
|
|
4
|
+
type BaseSelectProps = SelectConfig & Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "color" | "size" | "value" | "onChange">;
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for the Select component.
|
|
7
|
+
*/
|
|
8
|
+
export interface SelectProps extends BaseSelectProps {
|
|
9
|
+
/**
|
|
10
|
+
* Available options to select from.
|
|
11
|
+
* Each option must have a label and a unique value.
|
|
12
|
+
*/
|
|
13
|
+
options: SelectMenuOption[];
|
|
14
|
+
/**
|
|
15
|
+
* Controlled selected value.
|
|
16
|
+
*/
|
|
9
17
|
value?: string | number;
|
|
18
|
+
/**
|
|
19
|
+
* Native change event handler.
|
|
20
|
+
* Receives a synthetic change event.
|
|
21
|
+
*/
|
|
10
22
|
onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Value change handler.
|
|
25
|
+
* Receives the new selected value directly.
|
|
26
|
+
*/
|
|
11
27
|
onValueChange?: (value: string | number) => void;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
color?: Color;
|
|
16
|
-
status?: FieldStatus;
|
|
28
|
+
/**
|
|
29
|
+
* Label text for the field.
|
|
30
|
+
*/
|
|
17
31
|
label?: string;
|
|
18
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Description text shown below the label.
|
|
34
|
+
*/
|
|
19
35
|
description?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Validation message shown below the field.
|
|
38
|
+
*/
|
|
20
39
|
message?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the field is required.
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
21
44
|
required?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the field is in a loading state.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
22
49
|
isLoading?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether search input is shown in the dropdown.
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
23
54
|
isSearch?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Placeholder text for the search input.
|
|
57
|
+
* @default "Search options..."
|
|
58
|
+
*/
|
|
24
59
|
searchPlaceholder?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Name attribute for the search input.
|
|
62
|
+
* @default "select-search"
|
|
63
|
+
*/
|
|
25
64
|
searchInputName?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Initial value for uncontrolled usage.
|
|
67
|
+
*/
|
|
26
68
|
initialValue?: string | number;
|
|
69
|
+
/**
|
|
70
|
+
* Content rendered below the options list.
|
|
71
|
+
*/
|
|
27
72
|
belowList?: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Placeholder text shown when no value is selected.
|
|
75
|
+
* @default "Select..."
|
|
76
|
+
*/
|
|
28
77
|
placeholder?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Custom background color for the trigger button.
|
|
80
|
+
* Accepts any CSS color value.
|
|
81
|
+
*/
|
|
29
82
|
buttonColor?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Extra CSS classes for the trigger button.
|
|
85
|
+
*/
|
|
30
86
|
className?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Extra CSS classes for the dropdown.
|
|
89
|
+
*/
|
|
31
90
|
dropdownClassName?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Optional ID for the field.
|
|
93
|
+
*/
|
|
32
94
|
id?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Name attribute for the select.
|
|
97
|
+
*/
|
|
33
98
|
name?: string;
|
|
34
|
-
menuVariant?: Variant;
|
|
35
|
-
menuColor?: Color;
|
|
36
|
-
menuRadius?: Radius;
|
|
37
|
-
menuSize?: Size;
|
|
38
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* A dropdown selector with search, label, validation, and configurable styles.
|
|
102
|
+
*
|
|
103
|
+
* Select renders a dropdown that allows selecting a single option from a list.
|
|
104
|
+
* It supports search filtering, controlled and uncontrolled selection state,
|
|
105
|
+
* validation states, and custom menu and trigger styles. Visual tokens resolve
|
|
106
|
+
* through the standard AsheeUI cascade system.
|
|
107
|
+
*
|
|
108
|
+
* The component uses Floating UI for positioning and accessibility, and
|
|
109
|
+
* integrates with the FieldShell for consistent label and validation handling.
|
|
110
|
+
*
|
|
111
|
+
* @param props - Select configuration options.
|
|
112
|
+
* @param props.options - Available options to select from.
|
|
113
|
+
* @param props.value - Controlled selected value.
|
|
114
|
+
* @param props.onChange - Native change event handler.
|
|
115
|
+
* @param props.onValueChange - Value change handler.
|
|
116
|
+
* @param props.label - Field label text.
|
|
117
|
+
* @param props.description - Description text.
|
|
118
|
+
* @param props.message - Validation message.
|
|
119
|
+
* @param props.required - Whether the field is required.
|
|
120
|
+
* @param props.isLoading - Loading state.
|
|
121
|
+
* @param props.disabled - Disabled state.
|
|
122
|
+
* @param props.isSearch - Whether search is enabled. Defaults to false.
|
|
123
|
+
* @param props.searchPlaceholder - Search placeholder. Defaults to "Search options...".
|
|
124
|
+
* @param props.initialValue - Initial value for uncontrolled usage.
|
|
125
|
+
* @param props.belowList - Content below the options list.
|
|
126
|
+
* @param props.placeholder - Placeholder text. Defaults to "Select...".
|
|
127
|
+
* @param props.buttonColor - Custom background color for the trigger.
|
|
128
|
+
* @param props.size - Size of the trigger. Defaults to "md".
|
|
129
|
+
* @param props.radius - Corner rounding. Defaults to "md".
|
|
130
|
+
* @param props.variant - Visual style variant. Defaults to "bordered".
|
|
131
|
+
* @param props.color - Theme accent color. Defaults to "primary".
|
|
132
|
+
* @param props.status - Validation status.
|
|
133
|
+
* @param props.labelAlign - Alignment of the label. Defaults to "left".
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* import { Select } from "asheeui";
|
|
138
|
+
* import { useState } from "react";
|
|
139
|
+
*
|
|
140
|
+
* export function Example() {
|
|
141
|
+
* const [value, setValue] = useState<string | number>("react");
|
|
142
|
+
*
|
|
143
|
+
* const options = [
|
|
144
|
+
* { label: "React", value: "react" },
|
|
145
|
+
* { label: "Vue", value: "vue" },
|
|
146
|
+
* { label: "Svelte", value: "svelte" },
|
|
147
|
+
* ];
|
|
148
|
+
*
|
|
149
|
+
* return (
|
|
150
|
+
* <Select
|
|
151
|
+
* options={options}
|
|
152
|
+
* value={value}
|
|
153
|
+
* onValueChange={setValue}
|
|
154
|
+
* label="Select Framework"
|
|
155
|
+
* placeholder="Choose a framework..."
|
|
156
|
+
* />
|
|
157
|
+
* );
|
|
158
|
+
* }
|
|
159
|
+
* ```
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```tsx
|
|
163
|
+
* // With search and validation
|
|
164
|
+
* <Select
|
|
165
|
+
* options={fruits}
|
|
166
|
+
* label="Favorite Fruit"
|
|
167
|
+
* isSearch
|
|
168
|
+
* status="error"
|
|
169
|
+
* message="Please select a fruit"
|
|
170
|
+
* required
|
|
171
|
+
* />
|
|
172
|
+
* ```
|
|
173
|
+
*
|
|
174
|
+
* @see SelectConfig - The configuration type for component defaults.
|
|
175
|
+
* @see SelectMenu - The dropdown menu component.
|
|
176
|
+
* @see FieldShell - The wrapper component for label and validation.
|
|
177
|
+
*/
|
|
39
178
|
export declare const Select: import('react').ForwardRefExoticComponent<SelectProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
179
|
+
export {};
|
|
40
180
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/select/Select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/select/Select.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAkBf,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAK5E,KAAK,eAAe,GAAG,YAAY,GACjC,IAAI,CACF,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CACxC,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD;;;OAGG;IACH,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE7D;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;IAEjD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,eAAO,MAAM,MAAM,2GA+OlB,CAAC"}
|