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,10 +1,4 @@
|
|
|
1
|
-
import { Radius } from '../../shared
|
|
2
|
-
import { Size } from '../../shared/size';
|
|
3
|
-
import { Color, Variant } from '../../shared/variant';
|
|
4
|
-
/** Padding and font-size scale of the button. */
|
|
5
|
-
export type ButtonSizeKey = Size;
|
|
6
|
-
/** Corner rounding scale of the button. */
|
|
7
|
-
export type ButtonRadiusKey = Radius;
|
|
1
|
+
import { Color, Radius, Size, Variant } from '../../shared';
|
|
8
2
|
/**
|
|
9
3
|
* Theme configuration options for the Button component.
|
|
10
4
|
*
|
|
@@ -12,32 +6,44 @@ export type ButtonRadiusKey = Radius;
|
|
|
12
6
|
* component-level fallback tier of the theme cascade.
|
|
13
7
|
*/
|
|
14
8
|
export interface ButtonConfig {
|
|
15
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Visual style variant.
|
|
11
|
+
* Controls the background, border, and hover treatment.
|
|
16
12
|
*
|
|
17
13
|
* @default "bordered"
|
|
18
14
|
*/
|
|
19
15
|
variant?: Variant;
|
|
20
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Theme accent color.
|
|
18
|
+
* Controls the color of the button's primary visual elements.
|
|
21
19
|
*
|
|
22
20
|
* @default "primary"
|
|
23
21
|
*/
|
|
24
22
|
color?: Color;
|
|
25
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Padding and font-size scale.
|
|
25
|
+
* Controls the density and text size of the button.
|
|
26
26
|
*
|
|
27
27
|
* @default "md"
|
|
28
28
|
*/
|
|
29
|
-
size?:
|
|
30
|
-
/**
|
|
29
|
+
size?: Size;
|
|
30
|
+
/**
|
|
31
|
+
* Corner rounding.
|
|
32
|
+
* Controls the border-radius of the button.
|
|
31
33
|
*
|
|
32
34
|
* @default "md"
|
|
33
35
|
*/
|
|
34
|
-
radius?:
|
|
35
|
-
/**
|
|
36
|
+
radius?: Radius;
|
|
37
|
+
/**
|
|
38
|
+
* Enables the press-down scale animation.
|
|
39
|
+
* When true, the button scales down slightly on click.
|
|
36
40
|
*
|
|
37
41
|
* @default true
|
|
38
42
|
*/
|
|
39
43
|
animate?: boolean;
|
|
40
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Makes the button stretch to fill its parent width.
|
|
46
|
+
* When true, the button expands to 100% of its container width.
|
|
41
47
|
*
|
|
42
48
|
* @default false
|
|
43
49
|
*/
|
|
@@ -58,6 +64,8 @@ declare module "../../libs/registry" {
|
|
|
58
64
|
}
|
|
59
65
|
/**
|
|
60
66
|
* Hard fallback values used when no config tier provides a value.
|
|
67
|
+
* These values are used when instance props, component config,
|
|
68
|
+
* and global defaults are all undefined.
|
|
61
69
|
*/
|
|
62
70
|
export declare const FALLBACK_BUTTON_CONFIG: Required<ButtonConfig>;
|
|
63
71
|
//# sourceMappingURL=button-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-config.d.ts","sourceRoot":"","sources":["../../../src/components/button/button-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"button-config.d.ts","sourceRoot":"","sources":["../../../src/components/button/button-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAIjC,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,MAAM,EAAE,YAAY,CAAC;KACtB;CACF;AAID;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,YAAY,CAOhD,CAAC"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import { Size } from '../../shared
|
|
1
|
+
import { Size } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* CSS classes for standard button sizes.
|
|
4
|
+
* Maps size keys to Tailwind classes that control padding, height,
|
|
5
|
+
* font size, and spacing between elements.
|
|
6
|
+
*/
|
|
2
7
|
export declare const BUTTON_SIZE_CLASS: Record<Size, string>;
|
|
8
|
+
/**
|
|
9
|
+
* CSS classes for icon-only button sizes.
|
|
10
|
+
* Maps size keys to Tailwind classes that create square buttons
|
|
11
|
+
* with consistent dimensions for icons.
|
|
12
|
+
*/
|
|
3
13
|
export declare const BUTTON_ICON_SIZE_CLASS: Record<Size, string>;
|
|
4
14
|
//# sourceMappingURL=button-styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-styles.d.ts","sourceRoot":"","sources":["../../../src/components/button/button-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"button-styles.d.ts","sourceRoot":"","sources":["../../../src/components/button/button-styles.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIlD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAIvD,CAAC"}
|
|
@@ -1,88 +1,108 @@
|
|
|
1
1
|
import { ElementType, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { Radius } from '../../shared/radius';
|
|
3
|
-
import { Size } from '../../shared/size';
|
|
4
2
|
import { ImageFit, ImageRatioKey } from '../image/image-config';
|
|
5
|
-
import { CardImageLoading, CardImagePosition
|
|
3
|
+
import { CardConfig, CardImageLoading, CardImagePosition } from './card-config';
|
|
4
|
+
type BaseCardProps = CardConfig & Omit<HTMLAttributes<HTMLDivElement>, "title" | "children">;
|
|
6
5
|
/**
|
|
7
6
|
* Configuration options for the Card component.
|
|
8
7
|
*/
|
|
9
|
-
export interface CardProps extends
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
variant?: CardVariant;
|
|
15
|
-
/** Padding and spacing scale for inner content.
|
|
16
|
-
*
|
|
17
|
-
* @default "md"
|
|
18
|
-
*/
|
|
19
|
-
size?: Size;
|
|
20
|
-
/** Corner rounding applied to the card border.
|
|
21
|
-
*
|
|
22
|
-
* @default "md"
|
|
23
|
-
*/
|
|
24
|
-
radius?: Radius;
|
|
25
|
-
/** Enables the press-down scale animation when clickable.
|
|
26
|
-
*
|
|
27
|
-
* @default true
|
|
28
|
-
*/
|
|
29
|
-
animate?: boolean;
|
|
30
|
-
/** Enables interactive hover effects and keyboard accessibility.
|
|
8
|
+
export interface CardProps extends BaseCardProps {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the card is clickable.
|
|
11
|
+
* When true, the card becomes interactive with hover and focus states.
|
|
12
|
+
* This is automatically enabled when href or onClick is provided.
|
|
31
13
|
*
|
|
32
14
|
* @default false
|
|
33
15
|
*/
|
|
34
16
|
isClickable?: boolean;
|
|
35
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Disables interactive states and dims card opacity.
|
|
19
|
+
* Disabled cards cannot be clicked or focused.
|
|
36
20
|
*
|
|
37
21
|
* @default false
|
|
38
22
|
*/
|
|
39
23
|
isDisabled?: boolean;
|
|
40
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Renders the card as a link when provided with `isClickable`.
|
|
26
|
+
* Clicking the card navigates to this URL.
|
|
27
|
+
*/
|
|
41
28
|
href?: string;
|
|
42
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Heading content rendered above the body.
|
|
31
|
+
* Typically a string or React element.
|
|
32
|
+
*/
|
|
43
33
|
title?: ReactNode;
|
|
44
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Supporting text rendered under the title.
|
|
36
|
+
* Typically a string providing additional context.
|
|
37
|
+
*/
|
|
45
38
|
description?: ReactNode;
|
|
46
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Custom header node rendered above the title.
|
|
41
|
+
* Useful for adding icons, badges, or metadata.
|
|
42
|
+
*/
|
|
47
43
|
header?: ReactNode;
|
|
48
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Explicit body content; falls back to `children`.
|
|
46
|
+
* Use this when you need to explicitly set the body content.
|
|
47
|
+
*/
|
|
49
48
|
body?: ReactNode;
|
|
50
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Footer node rendered at the bottom of the content column.
|
|
51
|
+
* Typically used for actions or additional metadata.
|
|
52
|
+
*/
|
|
51
53
|
footer?: ReactNode;
|
|
52
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Source URL of the card image.
|
|
56
|
+
* When provided, displays an image in the card.
|
|
57
|
+
*/
|
|
53
58
|
imageSrc?: string;
|
|
54
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Alternative text for the card image.
|
|
61
|
+
* Important for accessibility.
|
|
55
62
|
*
|
|
56
63
|
* @default ""
|
|
57
64
|
*/
|
|
58
65
|
imageAlt?: string;
|
|
59
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Placement of the image relative to the content.
|
|
68
|
+
* Determines whether the image appears at the top, bottom, or as a background.
|
|
60
69
|
*
|
|
61
70
|
* @default "top"
|
|
62
71
|
*/
|
|
63
72
|
imagePosition?: CardImagePosition;
|
|
64
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Aspect ratio of the positioned image.
|
|
75
|
+
* Controls the proportional dimensions of the image container.
|
|
65
76
|
*
|
|
66
77
|
* @default "video"
|
|
67
78
|
*/
|
|
68
79
|
imageRatio?: ImageRatioKey;
|
|
69
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Object-fit strategy of the positioned image.
|
|
82
|
+
* Controls how the image fills its container.
|
|
70
83
|
*
|
|
71
84
|
* @default "cover"
|
|
72
85
|
*/
|
|
73
86
|
imageFit?: ImageFit;
|
|
74
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Native loading strategy of the positioned image.
|
|
75
89
|
*
|
|
76
90
|
* @default "lazy"
|
|
77
91
|
*/
|
|
78
92
|
imageLoading?: CardImageLoading;
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
93
|
+
/**
|
|
94
|
+
* Custom image component to render the card image with instead of
|
|
95
|
+
* the native `<img>` tag (e.g. `next/image`).
|
|
96
|
+
*/
|
|
81
97
|
imageComponent?: ElementType;
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
98
|
+
/**
|
|
99
|
+
* Additional props forwarded to `imageComponent`
|
|
100
|
+
* (e.g. `{ priority: true, sizes: "..." }`).
|
|
101
|
+
*/
|
|
84
102
|
imageProps?: Record<string, unknown>;
|
|
85
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Card body content, used when `body` is not provided.
|
|
105
|
+
*/
|
|
86
106
|
children?: ReactNode;
|
|
87
107
|
}
|
|
88
108
|
/**
|
|
@@ -95,6 +115,10 @@ export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"
|
|
|
95
115
|
* cascade. When `isClickable` is enabled, the card becomes keyboard
|
|
96
116
|
* accessible and adopts link or button semantics based on `href`.
|
|
97
117
|
*
|
|
118
|
+
* The component automatically handles accessibility attributes including
|
|
119
|
+
* role, tabIndex, aria-disabled, and proper keyboard interaction with
|
|
120
|
+
* Enter and Space keys.
|
|
121
|
+
*
|
|
98
122
|
* @param props - Card configuration options and HTML div element props.
|
|
99
123
|
* @param props.variant - Visual style variant. Defaults to "bordered".
|
|
100
124
|
* @param props.size - Content density scale. Defaults to "md".
|
|
@@ -117,6 +141,7 @@ export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"
|
|
|
117
141
|
* @param props.imageComponent - Custom image component.
|
|
118
142
|
* @param props.imageProps - Props forwarded to the image component.
|
|
119
143
|
* @param props.children - Card body content.
|
|
144
|
+
* @param props.className - Extra CSS classes for the card.
|
|
120
145
|
*
|
|
121
146
|
* @example
|
|
122
147
|
* ```tsx
|
|
@@ -136,6 +161,23 @@ export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"
|
|
|
136
161
|
* );
|
|
137
162
|
* }
|
|
138
163
|
* ```
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```tsx
|
|
167
|
+
* // Clickable card with image
|
|
168
|
+
* <Card
|
|
169
|
+
* isClickable
|
|
170
|
+
* href="/blog/post-1"
|
|
171
|
+
* imageSrc="/images/post-1.jpg"
|
|
172
|
+
* imageAlt="Blog post cover"
|
|
173
|
+
* title="Blog Post Title"
|
|
174
|
+
* description="A brief description of the blog post."
|
|
175
|
+
* />
|
|
176
|
+
* ```
|
|
177
|
+
*
|
|
178
|
+
* @see CardConfig - The configuration type for component defaults.
|
|
179
|
+
* @see useAsheeConfig - Hook for accessing the global configuration.
|
|
139
180
|
*/
|
|
140
181
|
export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
182
|
+
export {};
|
|
141
183
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/card/Card.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,cAAc,EAGnB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAYf,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAGvB,MAAM,eAAe,CAAC;AAQvB,KAAK,aAAa,GAAG,UAAU,GAC7B,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;IAE3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,eAAO,MAAM,IAAI,sGA8ShB,CAAC"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as I, jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as ie, useId as de } from "react";
|
|
4
4
|
import { useAsheeConfig as ce } from "../../libs/context.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Image as ve } from "../image/Image.js";
|
|
5
|
+
import { resolveCascade as v, resolveRadiusKey as ue, resolveAnimate as fe, resolveClassKey as y } from "../../utils/resolve-token.js";
|
|
6
|
+
import { Image as me } from "../image/Image.js";
|
|
8
7
|
import { FALLBACK_CARD_CONFIG as a } from "./card-config.js";
|
|
9
|
-
import { CARD_PADDING_CLASS as
|
|
8
|
+
import { CARD_PADDING_CLASS as ve, CARD_GAP_CLASS as ye, CARD_HEADER_GAP_CLASS as he, CARD_VARIANT_CLASS as G } from "./card-styles.js";
|
|
9
|
+
import { RADIUS_CLASS as xe } from "../../shared/radius.js";
|
|
10
10
|
import { cn as h } from "../../utils/cn.js";
|
|
11
|
-
const
|
|
11
|
+
const ge = ie(
|
|
12
12
|
({
|
|
13
13
|
variant: j,
|
|
14
|
-
size:
|
|
15
|
-
radius:
|
|
16
|
-
animate:
|
|
17
|
-
isClickable:
|
|
14
|
+
size: K,
|
|
15
|
+
radius: B,
|
|
16
|
+
animate: D,
|
|
17
|
+
isClickable: E,
|
|
18
18
|
isDisabled: o = !1,
|
|
19
19
|
href: d,
|
|
20
20
|
title: x,
|
|
21
|
-
description:
|
|
22
|
-
header:
|
|
21
|
+
description: g,
|
|
22
|
+
header: N,
|
|
23
23
|
body: V,
|
|
24
|
-
footer:
|
|
24
|
+
footer: b,
|
|
25
25
|
imageSrc: c,
|
|
26
26
|
imageAlt: w = "",
|
|
27
27
|
imagePosition: F,
|
|
@@ -35,12 +35,12 @@ const Ae = ie(
|
|
|
35
35
|
onClick: f,
|
|
36
36
|
id: q,
|
|
37
37
|
style: J,
|
|
38
|
-
onKeyDown:
|
|
38
|
+
onKeyDown: A,
|
|
39
39
|
...M
|
|
40
40
|
}, Q) => {
|
|
41
41
|
var k;
|
|
42
42
|
const z = ce(), e = (k = z.components) == null ? void 0 : k.card, W = de(), X = q ?? W, p = v(
|
|
43
|
-
|
|
43
|
+
K,
|
|
44
44
|
e == null ? void 0 : e.size,
|
|
45
45
|
void 0,
|
|
46
46
|
a.size
|
|
@@ -49,8 +49,8 @@ const Ae = ie(
|
|
|
49
49
|
e == null ? void 0 : e.variant,
|
|
50
50
|
z.defaultVariant,
|
|
51
51
|
a.variant
|
|
52
|
-
), Z =
|
|
53
|
-
|
|
52
|
+
), Z = ue(
|
|
53
|
+
B,
|
|
54
54
|
e == null ? void 0 : e.radius,
|
|
55
55
|
z.defaultRadius,
|
|
56
56
|
a.radius
|
|
@@ -59,25 +59,25 @@ const Ae = ie(
|
|
|
59
59
|
e == null ? void 0 : e.imagePosition,
|
|
60
60
|
void 0,
|
|
61
61
|
a.imagePosition
|
|
62
|
-
), i =
|
|
63
|
-
|
|
62
|
+
), i = E ?? !!(d || f), P = fe(
|
|
63
|
+
D,
|
|
64
64
|
e == null ? void 0 : e.animate,
|
|
65
65
|
a.animate
|
|
66
66
|
), ee = y(
|
|
67
67
|
p,
|
|
68
|
-
|
|
68
|
+
ve,
|
|
69
69
|
a.size
|
|
70
70
|
), L = y(
|
|
71
71
|
p,
|
|
72
|
-
|
|
72
|
+
ye,
|
|
73
73
|
a.size
|
|
74
74
|
), re = y(
|
|
75
75
|
p,
|
|
76
|
-
|
|
76
|
+
he,
|
|
77
77
|
a.size
|
|
78
78
|
), te = y(
|
|
79
79
|
Z,
|
|
80
|
-
|
|
80
|
+
xe,
|
|
81
81
|
a.radius
|
|
82
82
|
), ae = v(
|
|
83
83
|
O,
|
|
@@ -91,18 +91,18 @@ const Ae = ie(
|
|
|
91
91
|
}
|
|
92
92
|
f == null || f(t), d && !t.defaultPrevented && (window.location.href = d);
|
|
93
93
|
}, ne = (t) => {
|
|
94
|
-
|
|
94
|
+
A == null || A(t), i && !o && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), R(t));
|
|
95
95
|
}, _ = (t) => {
|
|
96
96
|
if (!c || C !== t) return null;
|
|
97
|
-
const
|
|
97
|
+
const l = {
|
|
98
98
|
top: "w-full shrink-0 rounded-b-none",
|
|
99
99
|
bottom: "w-full shrink-0 order-last rounded-t-none",
|
|
100
100
|
background: ""
|
|
101
101
|
}[t];
|
|
102
102
|
let n = { ...r ?? {} };
|
|
103
103
|
if (u) {
|
|
104
|
-
const m = (r == null ? void 0 : r.loading) === "lazy",
|
|
105
|
-
(m ||
|
|
104
|
+
const m = (r == null ? void 0 : r.loading) === "lazy", le = (r == null ? void 0 : r.priority) === !0;
|
|
105
|
+
(m || le) && console.warn(
|
|
106
106
|
`[Card] ${m ? '`loading="lazy"`' : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`
|
|
107
107
|
), n = {
|
|
108
108
|
...n,
|
|
@@ -111,44 +111,44 @@ const Ae = ie(
|
|
|
111
111
|
...n.priority !== void 0 && { priority: !1 }
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
return /* @__PURE__ */
|
|
115
|
-
|
|
114
|
+
return /* @__PURE__ */ s(
|
|
115
|
+
me,
|
|
116
116
|
{
|
|
117
117
|
src: c,
|
|
118
118
|
alt: w,
|
|
119
119
|
ratio: $ ?? "video",
|
|
120
120
|
fit: H ?? "cover",
|
|
121
|
-
className:
|
|
121
|
+
className: l,
|
|
122
122
|
imageComponent: u,
|
|
123
123
|
imageProps: n,
|
|
124
124
|
loading: ae
|
|
125
125
|
}
|
|
126
126
|
);
|
|
127
|
-
},
|
|
127
|
+
}, se = () => {
|
|
128
128
|
if (!c || C !== "background") return null;
|
|
129
129
|
const t = u || "img";
|
|
130
|
-
let
|
|
130
|
+
let l = { ...r ?? {} };
|
|
131
131
|
if (u) {
|
|
132
132
|
const n = (r == null ? void 0 : r.loading) === "lazy", m = (r == null ? void 0 : r.priority) === !0;
|
|
133
133
|
(n || m) && console.warn(
|
|
134
134
|
`[Card] ${n ? '`loading="lazy"`' : "`priority={true}`"} with custom image component may cause rendering issues. Consider using \`loading="eager"\` and removing \`priority\` for card images.`
|
|
135
|
-
),
|
|
136
|
-
...
|
|
135
|
+
), l = {
|
|
136
|
+
...l,
|
|
137
137
|
loading: "eager",
|
|
138
|
-
...
|
|
138
|
+
...l.priority !== void 0 && { priority: !1 }
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
return /* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ s("div", { className: "absolute inset-0 z-0 pointer-events-none", children: /* @__PURE__ */ s(
|
|
142
142
|
t,
|
|
143
143
|
{
|
|
144
144
|
src: c,
|
|
145
145
|
alt: w,
|
|
146
146
|
className: "h-full w-full object-cover",
|
|
147
|
-
...
|
|
147
|
+
...l
|
|
148
148
|
}
|
|
149
149
|
) });
|
|
150
150
|
}, S = V ?? U;
|
|
151
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ I(
|
|
152
152
|
"div",
|
|
153
153
|
{
|
|
154
154
|
ref: Q,
|
|
@@ -171,8 +171,8 @@ const Ae = ie(
|
|
|
171
171
|
...M,
|
|
172
172
|
children: [
|
|
173
173
|
_("top"),
|
|
174
|
-
|
|
175
|
-
/* @__PURE__ */
|
|
174
|
+
se(),
|
|
175
|
+
/* @__PURE__ */ I(
|
|
176
176
|
"div",
|
|
177
177
|
{
|
|
178
178
|
className: h(
|
|
@@ -181,20 +181,20 @@ const Ae = ie(
|
|
|
181
181
|
L
|
|
182
182
|
),
|
|
183
183
|
children: [
|
|
184
|
-
(
|
|
185
|
-
|
|
186
|
-
x && /* @__PURE__ */
|
|
187
|
-
|
|
184
|
+
(N || x || g) && /* @__PURE__ */ I("div", { className: h("flex flex-col z-10", re), children: [
|
|
185
|
+
N,
|
|
186
|
+
x && /* @__PURE__ */ s("h3", { className: "font-semibold leading-tight tracking-tight text-foreground text-lg md:text-xl", children: x }),
|
|
187
|
+
g && /* @__PURE__ */ s("p", { className: "text-sm text-muted-foreground leading-relaxed", children: g })
|
|
188
188
|
] }),
|
|
189
|
-
S && /* @__PURE__ */
|
|
190
|
-
|
|
189
|
+
S && /* @__PURE__ */ s("div", { className: "flex-1 z-10 text-sm leading-relaxed", children: S }),
|
|
190
|
+
b && /* @__PURE__ */ s(
|
|
191
191
|
"div",
|
|
192
192
|
{
|
|
193
193
|
className: h(
|
|
194
194
|
"flex items-center justify-between z-10 mt-auto pt-2",
|
|
195
195
|
L
|
|
196
196
|
),
|
|
197
|
-
children:
|
|
197
|
+
children: b
|
|
198
198
|
}
|
|
199
199
|
)
|
|
200
200
|
]
|
|
@@ -206,7 +206,7 @@ const Ae = ie(
|
|
|
206
206
|
);
|
|
207
207
|
}
|
|
208
208
|
);
|
|
209
|
-
|
|
209
|
+
ge.displayName = "Card";
|
|
210
210
|
export {
|
|
211
|
-
|
|
211
|
+
ge as Card
|
|
212
212
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Radius } from '../../shared
|
|
2
|
-
import { Size } from '../../shared/size';
|
|
1
|
+
import { Radius, Size } from '../../shared';
|
|
3
2
|
import { ImageFit, ImageRatioKey } from '../image/image-config';
|
|
4
3
|
/**
|
|
5
4
|
* Visual style of the card.
|
|
@@ -10,9 +9,16 @@ import { ImageFit, ImageRatioKey } from '../image/image-config';
|
|
|
10
9
|
* - `ghost`: Transparent background without a border.
|
|
11
10
|
*/
|
|
12
11
|
export type CardVariant = "elevated" | "bordered" | "flat" | "ghost";
|
|
13
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Placement of the card image relative to the content.
|
|
14
|
+
* "top" and "bottom" place the image above or below the content.
|
|
15
|
+
* "background" places the image as a full-bleed background layer.
|
|
16
|
+
*/
|
|
14
17
|
export type CardImagePosition = "top" | "bottom" | "background";
|
|
15
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Native image loading strategy.
|
|
20
|
+
* Controls when the browser loads the image resource.
|
|
21
|
+
*/
|
|
16
22
|
export type CardImageLoading = "lazy" | "eager";
|
|
17
23
|
/**
|
|
18
24
|
* Theme configuration options for the Card component.
|
|
@@ -21,47 +27,57 @@ export type CardImageLoading = "lazy" | "eager";
|
|
|
21
27
|
* component-level fallback tier of the theme cascade.
|
|
22
28
|
*/
|
|
23
29
|
export interface CardConfig {
|
|
24
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Visual style variant.
|
|
32
|
+
* Controls the card's background, border, and shadow treatment.
|
|
25
33
|
*
|
|
26
34
|
* @default "bordered"
|
|
27
35
|
*/
|
|
28
36
|
variant?: CardVariant;
|
|
29
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Content padding and spacing scale.
|
|
39
|
+
* Controls the density of the card's internal spacing.
|
|
30
40
|
*
|
|
31
41
|
* @default "md"
|
|
32
42
|
*/
|
|
33
43
|
size?: Size;
|
|
34
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Corner rounding.
|
|
46
|
+
* Controls the border-radius of the card.
|
|
35
47
|
*
|
|
36
48
|
* @default "md"
|
|
37
49
|
*/
|
|
38
50
|
radius?: Radius;
|
|
39
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Placement of the card image.
|
|
53
|
+
* Determines where the image appears relative to the content.
|
|
40
54
|
*
|
|
41
55
|
* @default "top"
|
|
42
56
|
*/
|
|
43
57
|
imagePosition?: CardImagePosition;
|
|
44
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Aspect ratio of the positioned image.
|
|
60
|
+
* Controls the proportional dimensions of the image container.
|
|
45
61
|
*
|
|
46
62
|
* @default "video"
|
|
47
63
|
*/
|
|
48
64
|
imageRatio?: ImageRatioKey;
|
|
49
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Object-fit strategy of the positioned image.
|
|
67
|
+
* Controls how the image fills its container.
|
|
50
68
|
*
|
|
51
69
|
* @default "cover"
|
|
52
70
|
*/
|
|
53
71
|
imageFit?: ImageFit;
|
|
54
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Native loading strategy of the positioned image.
|
|
55
74
|
*
|
|
56
75
|
* @default "lazy"
|
|
57
76
|
*/
|
|
58
77
|
imageLoading?: CardImageLoading;
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
isClickable?: boolean;
|
|
64
|
-
/** Enables the press animation when clickable.
|
|
78
|
+
/**
|
|
79
|
+
* Enables the press animation when clickable.
|
|
80
|
+
* When true, the card scales down slightly on click.
|
|
65
81
|
*
|
|
66
82
|
* @default true
|
|
67
83
|
*/
|
|
@@ -81,6 +97,8 @@ declare module "../../libs/registry" {
|
|
|
81
97
|
}
|
|
82
98
|
/**
|
|
83
99
|
* Hard fallback values used when no config tier provides a value.
|
|
100
|
+
* These values are used when instance props, component config,
|
|
101
|
+
* and global defaults are all undefined.
|
|
84
102
|
*/
|
|
85
103
|
export declare const FALLBACK_CARD_CONFIG: {
|
|
86
104
|
readonly size: "md";
|
|
@@ -90,7 +108,6 @@ export declare const FALLBACK_CARD_CONFIG: {
|
|
|
90
108
|
readonly imageRatio: "video";
|
|
91
109
|
readonly imageFit: "cover";
|
|
92
110
|
readonly imageLoading: "lazy";
|
|
93
|
-
readonly isClickable: false;
|
|
94
111
|
readonly animate: true;
|
|
95
112
|
};
|
|
96
113
|
//# sourceMappingURL=card-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-config.d.ts","sourceRoot":"","sources":["../../../src/components/card/card-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card-config.d.ts","sourceRoot":"","sources":["../../../src/components/card/card-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAErE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAElC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;IAE3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAM/B,CAAC;AAEF,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,2BAA2B;QACnC,IAAI,EAAE,UAAU,CAAC;KAClB;CACF;AAID;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;CASvB,CAAC"}
|