@pathscale/ui 1.1.33 → 1.1.35
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/components/badge/Badge.css +5 -5
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/Badge.js +1 -2
- package/dist/components/button/Button.css +10 -1
- package/dist/components/button/Button.d.ts +2 -0
- package/dist/components/button/Button.js +31 -6
- package/dist/components/button-group/ButtonGroup.css +117 -0
- package/dist/components/button-group/ButtonGroup.d.ts +23 -0
- package/dist/components/button-group/ButtonGroup.js +91 -0
- package/dist/components/button-group/context.d.ts +8 -0
- package/dist/components/button-group/context.js +3 -0
- package/dist/components/button-group/index.d.ts +1 -0
- package/dist/components/button-group/index.js +6 -0
- package/dist/components/card/Card.css +110 -0
- package/dist/components/card/Card.d.ts +26 -26
- package/dist/components/card/Card.js +131 -70
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +6 -1
- package/dist/components/checkbox/Checkbox.js +18 -4
- package/dist/components/checkbox-group/CheckboxGroup.css +10 -0
- package/dist/components/checkbox-group/CheckboxGroup.d.ts +18 -0
- package/dist/components/checkbox-group/CheckboxGroup.js +97 -0
- package/dist/components/checkbox-group/context.d.ts +11 -0
- package/dist/components/checkbox-group/context.js +3 -0
- package/dist/components/checkbox-group/index.d.ts +4 -0
- package/dist/components/checkbox-group/index.js +4 -0
- package/dist/components/chip/Chip.css +197 -0
- package/dist/components/chip/Chip.d.ts +25 -0
- package/dist/components/chip/Chip.js +142 -0
- package/dist/components/chip/index.d.ts +8 -0
- package/dist/components/chip/index.js +9 -0
- package/dist/components/close-button/CloseButton.css +81 -0
- package/dist/components/close-button/CloseButton.d.ts +14 -0
- package/dist/components/close-button/CloseButton.js +76 -0
- package/dist/components/close-button/index.d.ts +1 -0
- package/dist/components/close-button/index.js +3 -0
- package/dist/components/combo-box/ComboBox.css +344 -0
- package/dist/components/combo-box/ComboBox.d.ts +86 -0
- package/dist/components/combo-box/ComboBox.js +708 -0
- package/dist/components/combo-box/index.d.ts +1 -0
- package/dist/components/combo-box/index.js +10 -0
- package/dist/components/date-field/DateField.css +215 -0
- package/dist/components/date-field/DateField.d.ts +64 -0
- package/dist/components/date-field/DateField.js +341 -0
- package/dist/components/date-field/index.d.ts +1 -0
- package/dist/components/date-field/index.js +11 -0
- package/dist/components/description/Description.css +10 -0
- package/dist/components/description/Description.d.ts +11 -0
- package/dist/components/{form/Label.js → description/Description.js} +23 -14
- package/dist/components/description/index.d.ts +1 -0
- package/dist/components/description/index.js +5 -0
- package/dist/components/drawer/Drawer.css +15 -0
- package/dist/components/drawer/Drawer.d.ts +2 -0
- package/dist/components/drawer/Drawer.js +24 -16
- package/dist/components/error-message/ErrorMessage.css +20 -0
- package/dist/components/error-message/ErrorMessage.d.ts +11 -0
- package/dist/components/error-message/ErrorMessage.js +40 -0
- package/dist/components/error-message/index.d.ts +1 -0
- package/dist/components/error-message/index.js +5 -0
- package/dist/components/field-error/FieldError.css +27 -0
- package/dist/components/field-error/FieldError.d.ts +21 -0
- package/dist/components/field-error/FieldError.js +69 -0
- package/dist/components/field-error/index.d.ts +1 -0
- package/dist/components/field-error/index.js +5 -0
- package/dist/components/fieldset/Fieldset.css +30 -0
- package/dist/components/fieldset/Fieldset.d.ts +22 -9
- package/dist/components/fieldset/Fieldset.js +88 -44
- package/dist/components/fieldset/index.d.ts +1 -2
- package/dist/components/fieldset/index.js +7 -2
- package/dist/components/form/Form.css +5 -0
- package/dist/components/form/Form.d.ts +10 -16
- package/dist/components/form/Form.js +33 -16
- package/dist/components/form/index.d.ts +1 -4
- package/dist/components/form/index.js +3 -4
- package/dist/components/header/Header.css +13 -0
- package/dist/components/header/Header.d.ts +9 -0
- package/dist/components/{menu/MenuDetails.js → header/Header.js} +17 -20
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/header/index.js +5 -0
- package/dist/components/immersive-landing/components/FirefoxPWABanner.js +62 -68
- package/dist/components/immersive-landing/components/PWAInstallPrompt.js +58 -64
- package/dist/components/input/Input.css +3 -2
- package/dist/components/input/Input.d.ts +2 -2
- package/dist/components/input/Input.js +7 -7
- package/dist/components/input-group/InputGroup.css +172 -0
- package/dist/components/input-group/InputGroup.d.ts +44 -0
- package/dist/components/input-group/InputGroup.js +227 -0
- package/dist/components/input-group/index.d.ts +1 -0
- package/dist/components/input-group/index.js +9 -0
- package/dist/components/input-otp/InputOTP.css +170 -0
- package/dist/components/input-otp/InputOTP.d.ts +46 -0
- package/dist/components/input-otp/InputOTP.js +385 -0
- package/dist/components/input-otp/index.d.ts +1 -0
- package/dist/components/input-otp/index.js +11 -0
- package/dist/components/label/Label.css +30 -0
- package/dist/components/label/Label.d.ts +17 -0
- package/dist/components/label/Label.js +64 -0
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/label/index.js +5 -0
- package/dist/components/list-box/ListBox.css +148 -0
- package/dist/components/list-box/ListBox.d.ts +23 -0
- package/dist/components/list-box/ListBox.js +224 -0
- package/dist/components/list-box/ListBoxItem.d.ts +28 -0
- package/dist/components/list-box/ListBoxItem.js +231 -0
- package/dist/components/list-box/ListBoxSection.d.ts +11 -0
- package/dist/components/list-box/ListBoxSection.js +48 -0
- package/dist/components/list-box/context.d.ts +27 -0
- package/dist/components/list-box/context.js +3 -0
- package/dist/components/list-box/index.d.ts +17 -0
- package/dist/components/list-box/index.js +17 -0
- package/dist/components/menu/Menu.css +199 -0
- package/dist/components/menu/Menu.d.ts +32 -20
- package/dist/components/menu/Menu.js +213 -39
- package/dist/components/menu/MenuItem.d.ts +35 -5
- package/dist/components/menu/MenuItem.js +270 -19
- package/dist/components/menu/MenuSection.d.ts +11 -0
- package/dist/components/menu/MenuSection.js +48 -0
- package/dist/components/menu/context.d.ts +26 -0
- package/dist/components/menu/context.js +3 -0
- package/dist/components/menu/index.d.ts +4 -3
- package/dist/components/menu/index.js +11 -2
- package/dist/components/number-field/NumberField.css +198 -0
- package/dist/components/number-field/NumberField.d.ts +48 -0
- package/dist/components/number-field/NumberField.js +350 -0
- package/dist/components/number-field/index.d.ts +1 -0
- package/dist/components/number-field/index.js +9 -0
- package/dist/components/search-field/SearchField.css +183 -0
- package/dist/components/search-field/SearchField.d.ts +53 -0
- package/dist/components/search-field/SearchField.js +303 -0
- package/dist/components/search-field/index.d.ts +1 -0
- package/dist/components/search-field/index.js +9 -0
- package/dist/components/select/Select.css +16 -10
- package/dist/components/select/Select.d.ts +10 -2
- package/dist/components/select/Select.js +119 -33
- package/dist/components/separator/Separator.css +35 -0
- package/dist/components/separator/Separator.d.ts +12 -0
- package/dist/components/separator/Separator.js +57 -0
- package/dist/components/separator/index.d.ts +1 -0
- package/dist/components/separator/index.js +4 -0
- package/dist/components/sidenav/Sidenav.js +2 -2
- package/dist/components/surface/Surface.css +37 -0
- package/dist/components/surface/Surface.d.ts +12 -0
- package/dist/components/surface/Surface.js +41 -0
- package/dist/components/surface/index.d.ts +1 -0
- package/dist/components/surface/index.js +4 -0
- package/dist/components/table/hooks/index.d.ts +1 -9
- package/dist/components/table/hooks/index.js +1 -18
- package/dist/components/tag/Tag.css +121 -0
- package/dist/components/tag/Tag.d.ts +33 -0
- package/dist/components/tag/Tag.js +241 -0
- package/dist/components/tag/index.d.ts +1 -0
- package/dist/components/tag/index.js +6 -0
- package/dist/components/tag-group/TagGroup.css +22 -0
- package/dist/components/tag-group/TagGroup.d.ts +32 -0
- package/dist/components/tag-group/TagGroup.js +177 -0
- package/dist/components/tag-group/context.d.ts +15 -0
- package/dist/components/tag-group/context.js +3 -0
- package/dist/components/tag-group/index.d.ts +2 -0
- package/dist/components/tag-group/index.js +6 -0
- package/dist/components/text/Text.css +66 -0
- package/dist/components/text/Text.d.ts +17 -0
- package/dist/components/text/Text.js +46 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/text/index.js +5 -0
- package/dist/components/text-area/TextArea.css +95 -0
- package/dist/components/text-area/TextArea.d.ts +19 -0
- package/dist/components/text-area/TextArea.js +64 -0
- package/dist/components/text-area/index.d.ts +1 -0
- package/dist/components/text-area/index.js +5 -0
- package/dist/components/text-field/TextField.css +33 -0
- package/dist/components/text-field/TextField.d.ts +34 -0
- package/dist/components/text-field/TextField.js +85 -0
- package/dist/components/text-field/index.d.ts +1 -0
- package/dist/components/text-field/index.js +7 -0
- package/dist/components/textarea/Textarea.d.ts +8 -13
- package/dist/components/textarea/Textarea.js +14 -45
- package/dist/components/textarea/index.d.ts +2 -1
- package/dist/components/textarea/index.js +4 -1
- package/dist/components/time-field/TimeField.css +215 -0
- package/dist/components/time-field/TimeField.d.ts +64 -0
- package/dist/components/time-field/TimeField.js +341 -0
- package/dist/components/time-field/index.d.ts +1 -0
- package/dist/components/time-field/index.js +11 -0
- package/dist/components/utils.d.ts +2 -2
- package/dist/components/utils.js +3 -17
- package/dist/hooks/form/index.d.ts +5 -0
- package/dist/hooks/form/index.js +12 -0
- package/dist/hooks/form/useField.d.ts +11 -0
- package/dist/hooks/form/useField.js +20 -0
- package/dist/hooks/form/useFieldError.d.ts +3 -0
- package/dist/hooks/form/useFieldError.js +3 -0
- package/dist/hooks/form/useFieldMeta.d.ts +20 -0
- package/dist/hooks/form/useFieldMeta.js +49 -0
- package/dist/hooks/form/useFieldProps.d.ts +10 -0
- package/dist/hooks/form/useFieldProps.js +51 -0
- package/dist/hooks/form/useForm.d.ts +27 -0
- package/dist/hooks/form/useForm.js +54 -0
- package/dist/hooks/form/utils.d.ts +4 -0
- package/dist/hooks/form/utils.js +30 -0
- package/dist/hooks/layout/index.d.ts +1 -0
- package/dist/hooks/layout/index.js +3 -0
- package/dist/hooks/layout/useDesktop.d.ts +1 -0
- package/dist/hooks/layout/useDesktop.js +17 -0
- package/dist/hooks/table/index.d.ts +9 -0
- package/dist/hooks/table/index.js +18 -0
- package/dist/index.d.ts +63 -7
- package/dist/index.js +145 -15
- package/dist/primitives/streaming/index.d.ts +2 -0
- package/dist/primitives/streaming/index.js +5 -0
- package/dist/primitives/streaming/useStreamingBuffer.d.ts +15 -0
- package/dist/primitives/streaming/useStreamingBuffer.js +115 -0
- package/dist/primitives/streaming/useStreamingSubscription.d.ts +27 -0
- package/dist/primitives/streaming/useStreamingSubscription.js +115 -0
- package/dist/styles/icons/generated-icons.css +1 -1
- package/package.json +1 -1
- package/dist/components/card/CardActions.d.ts +0 -4
- package/dist/components/card/CardActions.js +0 -15
- package/dist/components/card/CardBody.d.ts +0 -4
- package/dist/components/card/CardBody.js +0 -15
- package/dist/components/card/CardImage.d.ts +0 -3
- package/dist/components/card/CardImage.js +0 -10
- package/dist/components/card/CardTitle.d.ts +0 -6
- package/dist/components/card/CardTitle.js +0 -13
- package/dist/components/card/card.css +0 -171
- package/dist/components/form/FormBase.d.ts +0 -8
- package/dist/components/form/FormBase.js +0 -74
- package/dist/components/form/FormDropdown.d.ts +0 -25
- package/dist/components/form/FormDropdown.js +0 -139
- package/dist/components/form/FormField.d.ts +0 -14
- package/dist/components/form/FormField.js +0 -78
- package/dist/components/form/Label.d.ts +0 -7
- package/dist/components/form/NumberField.d.ts +0 -20
- package/dist/components/form/NumberField.js +0 -109
- package/dist/components/form/PasswordField.d.ts +0 -16
- package/dist/components/form/PasswordField.js +0 -113
- package/dist/components/form/ValidatedForm.d.ts +0 -26
- package/dist/components/form/ValidatedForm.js +0 -55
- package/dist/components/menu/MenuDetails.d.ts +0 -8
- package/dist/components/menu/MenuDropdown.d.ts +0 -12
- package/dist/components/menu/MenuDropdown.js +0 -48
- package/dist/components/menu/MenuTitle.d.ts +0 -8
- package/dist/components/menu/MenuTitle.js +0 -22
- package/dist/components/menu/menu.css +0 -364
- package/dist/components/textarea/textarea.css +0 -191
- /package/dist/{components/table/hooks → hooks/table}/helpers.d.ts +0 -0
- /package/dist/{components/table/hooks → hooks/table}/helpers.js +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useAnchoredOverlayPosition.d.ts +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useAnchoredOverlayPosition.js +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableExpansion.d.ts +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableExpansion.js +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableFiltering.d.ts +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableFiltering.js +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableModel.d.ts +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableModel.js +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTablePagination.d.ts +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTablePagination.js +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableSelection.d.ts +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableSelection.js +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableSorting.d.ts +0 -0
- /package/dist/{components/table/hooks → hooks/table}/useTableSorting.js +0 -0
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
flex-shrink: 0;
|
|
5
5
|
align-items: center;
|
|
6
6
|
justify-content: center;
|
|
7
|
-
gap: 0.
|
|
7
|
+
gap: 0.125rem;
|
|
8
8
|
font-weight: 500;
|
|
9
9
|
|
|
10
10
|
min-height: 1.75rem;
|
|
11
11
|
min-width: 1.75rem;
|
|
12
|
-
|
|
13
|
-
border-radius: 9999px;
|
|
12
|
+
border-radius: 1.5rem;
|
|
14
13
|
font-size: 0.75rem;
|
|
15
14
|
line-height: 1.34;
|
|
16
15
|
|
|
@@ -24,6 +23,7 @@
|
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
.badge__label {
|
|
26
|
+
padding-inline: 0.125rem;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.badge-anchor {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
.badge--lg {
|
|
36
36
|
min-height: 2rem;
|
|
37
37
|
min-width: 2rem;
|
|
38
|
-
|
|
38
|
+
border-radius: 1rem;
|
|
39
39
|
font-size: 0.875rem;
|
|
40
40
|
line-height: 1.43;
|
|
41
41
|
}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
.badge--sm {
|
|
48
48
|
min-height: 1rem;
|
|
49
49
|
min-width: 1rem;
|
|
50
|
-
|
|
50
|
+
border-radius: 0.75rem;
|
|
51
51
|
font-size: 10px;
|
|
52
52
|
line-height: 1.34;
|
|
53
53
|
}
|
|
@@ -8,7 +8,7 @@ declare const BadgeAnchor: (props: BadgeAnchorProps) => JSX.Element;
|
|
|
8
8
|
type BadgeColor = "default" | "accent" | "success" | "warning" | "danger";
|
|
9
9
|
type BadgeVariant = "primary" | "secondary" | "soft";
|
|
10
10
|
type BadgeSize = "sm" | "md" | "lg";
|
|
11
|
-
type BadgePlacement = "
|
|
11
|
+
type BadgePlacement = "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
12
12
|
interface BadgeRootProps extends Omit<JSX.HTMLAttributes<HTMLSpanElement>, "color"> {
|
|
13
13
|
class?: string;
|
|
14
14
|
children?: JSX.Element;
|
|
@@ -39,7 +39,6 @@ const BADGE_VARIANT_CLASS = {
|
|
|
39
39
|
soft: "badge--soft"
|
|
40
40
|
};
|
|
41
41
|
const BADGE_PLACEMENT_CLASS = {
|
|
42
|
-
none: "",
|
|
43
42
|
"top-right": "badge--top-right",
|
|
44
43
|
"top-left": "badge--top-left",
|
|
45
44
|
"bottom-right": "badge--bottom-right",
|
|
@@ -58,7 +57,7 @@ const BadgeRoot = (props)=>{
|
|
|
58
57
|
const size = local.size ?? "md";
|
|
59
58
|
const color = local.color ?? "default";
|
|
60
59
|
const variant = local.variant ?? "primary";
|
|
61
|
-
const placement = local.placement ?? "
|
|
60
|
+
const placement = local.placement ?? "top-right";
|
|
62
61
|
return (0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)((0, __WEBPACK_EXTERNAL_MODULE_clsx__.clsx)("badge", BADGE_SIZE_CLASS[size], BADGE_COLOR_CLASS[color], BADGE_VARIANT_CLASS[variant], BADGE_PLACEMENT_CLASS[placement], local.class));
|
|
63
62
|
};
|
|
64
63
|
const badgeChildren = ()=>{
|
|
@@ -64,7 +64,10 @@
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.
|
|
67
|
+
.button__icon {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
68
71
|
pointer-events: none;
|
|
69
72
|
margin-block: 0.125rem;
|
|
70
73
|
height: 1rem;
|
|
@@ -73,6 +76,12 @@
|
|
|
73
76
|
align-self: center;
|
|
74
77
|
}
|
|
75
78
|
|
|
79
|
+
.button__icon > * {
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
76
85
|
.button--sm {
|
|
77
86
|
height: 2.25rem;
|
|
78
87
|
padding-inline: 0.75rem;
|
|
@@ -9,6 +9,8 @@ type ButtonProps = Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "disabled">
|
|
|
9
9
|
fullWidth?: boolean;
|
|
10
10
|
isDisabled?: boolean;
|
|
11
11
|
isPending?: boolean;
|
|
12
|
+
startIcon?: JSX.Element;
|
|
13
|
+
endIcon?: JSX.Element;
|
|
12
14
|
className?: string;
|
|
13
15
|
};
|
|
14
16
|
declare const Button: (props: ButtonProps) => JSX.Element;
|
|
@@ -2,7 +2,8 @@ import * as __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__ from "solid-js/web
|
|
|
2
2
|
import "./Button.css";
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__ from "solid-js";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__ from "tailwind-merge";
|
|
5
|
-
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__button_group_context_js_9dfe2267__ from "../button-group/context.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span class=button__spinner data-slot=spinner aria-hidden=true>"), _tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<span class="button__icon button__icon--start"data-slot=button-start-icon>'), _tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<span class="button__icon button__icon--end"data-slot=button-end-icon>'), _tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<button>");
|
|
6
7
|
const VARIANT_CLASS_MAP = {
|
|
7
8
|
primary: "button--primary",
|
|
8
9
|
secondary: "button--secondary",
|
|
@@ -28,14 +29,18 @@ const Button = (props)=>{
|
|
|
28
29
|
"fullWidth",
|
|
29
30
|
"isDisabled",
|
|
30
31
|
"isPending",
|
|
32
|
+
"startIcon",
|
|
33
|
+
"endIcon",
|
|
31
34
|
"type"
|
|
32
35
|
]);
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
36
|
+
const buttonGroupContext = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.useContext)(__WEBPACK_EXTERNAL_MODULE__button_group_context_js_9dfe2267__.ButtonGroupContext);
|
|
37
|
+
const variant = ()=>local.variant ?? buttonGroupContext?.variant() ?? "primary";
|
|
38
|
+
const size = ()=>local.size ?? buttonGroupContext?.size() ?? "md";
|
|
39
|
+
const fullWidth = ()=>local.fullWidth ?? buttonGroupContext?.fullWidth();
|
|
40
|
+
const disabled = ()=>Boolean(local.isDisabled ?? buttonGroupContext?.isDisabled()) || Boolean(local.isPending);
|
|
41
|
+
const classes = ()=>(0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)("button", VARIANT_CLASS_MAP[variant()], SIZE_CLASS_MAP[size()], local.isIconOnly && "button--icon-only", fullWidth() && "button--full-width", local.class, local.className);
|
|
37
42
|
return (()=>{
|
|
38
|
-
var _el$ = _tmpl$
|
|
43
|
+
var _el$ = _tmpl$4();
|
|
39
44
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
40
45
|
get type () {
|
|
41
46
|
return local.type ?? "button";
|
|
@@ -62,7 +67,27 @@ const Button = (props)=>{
|
|
|
62
67
|
return _tmpl$();
|
|
63
68
|
}
|
|
64
69
|
}), null);
|
|
70
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
71
|
+
get when () {
|
|
72
|
+
return local.startIcon;
|
|
73
|
+
},
|
|
74
|
+
get children () {
|
|
75
|
+
var _el$3 = _tmpl$2();
|
|
76
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, ()=>local.startIcon);
|
|
77
|
+
return _el$3;
|
|
78
|
+
}
|
|
79
|
+
}), null);
|
|
65
80
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children, null);
|
|
81
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.Show, {
|
|
82
|
+
get when () {
|
|
83
|
+
return local.endIcon;
|
|
84
|
+
},
|
|
85
|
+
get children () {
|
|
86
|
+
var _el$4 = _tmpl$3();
|
|
87
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$4, ()=>local.endIcon);
|
|
88
|
+
return _el$4;
|
|
89
|
+
}
|
|
90
|
+
}), null);
|
|
66
91
|
return _el$;
|
|
67
92
|
})();
|
|
68
93
|
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.button-group {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
height: auto;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
gap: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.button-group--horizontal {
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.button-group--vertical {
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.button-group .button {
|
|
19
|
+
border-radius: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.button-group--horizontal .button:first-child {
|
|
23
|
+
border-start-start-radius: 1.5rem;
|
|
24
|
+
border-end-start-radius: 1.5rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.button-group--horizontal .button:last-child {
|
|
28
|
+
border-start-end-radius: 1.5rem;
|
|
29
|
+
border-end-end-radius: 1.5rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.button-group--horizontal .button:first-child:last-child {
|
|
33
|
+
border-radius: 1.5rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.button-group--vertical .button:first-child {
|
|
37
|
+
border-top-left-radius: 1.5rem;
|
|
38
|
+
border-top-right-radius: 1.5rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.button-group--vertical .button:last-child {
|
|
42
|
+
border-bottom-left-radius: 1.5rem;
|
|
43
|
+
border-bottom-right-radius: 1.5rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.button-group--vertical .button:first-child:last-child {
|
|
47
|
+
border-radius: 1.5rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.button-group .button:active,
|
|
51
|
+
.button-group .button[data-pressed="true"] {
|
|
52
|
+
transform: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.button-group .button:focus-visible,
|
|
56
|
+
.button-group .button[data-focus-visible="true"] {
|
|
57
|
+
outline-offset: -1px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.button-group__separator {
|
|
61
|
+
background-color: currentColor;
|
|
62
|
+
opacity: 0.15;
|
|
63
|
+
border-radius: 4px;
|
|
64
|
+
position: absolute;
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
transition: opacity 150ms var(--ease-smooth);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (prefers-reduced-motion: reduce) {
|
|
70
|
+
.button-group__separator {
|
|
71
|
+
transition: none;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.button-group--horizontal .button-group__separator {
|
|
76
|
+
left: -1px;
|
|
77
|
+
top: 25%;
|
|
78
|
+
width: 1px;
|
|
79
|
+
height: 50%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.button-group--vertical .button-group__separator {
|
|
83
|
+
left: 25%;
|
|
84
|
+
top: -1px;
|
|
85
|
+
width: 50%;
|
|
86
|
+
height: 1px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.button-group--horizontal .button--outline:first-child {
|
|
90
|
+
border-inline-end-width: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.button-group--horizontal .button--outline:last-child {
|
|
94
|
+
border-inline-start-width: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.button-group--horizontal .button--outline:not(:first-child):not(:last-child) {
|
|
98
|
+
border-inline-width: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.button-group--vertical .button--outline:first-child {
|
|
102
|
+
border-bottom-width: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.button-group--vertical .button--outline:last-child {
|
|
106
|
+
border-top-width: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.button-group--vertical .button--outline:not(:first-child):not(:last-child) {
|
|
110
|
+
border-top-width: 0;
|
|
111
|
+
border-bottom-width: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.button-group--full-width {
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "./ButtonGroup.css";
|
|
2
|
+
import { type Component, type JSX, type ParentComponent } from "solid-js";
|
|
3
|
+
import type { ButtonSize, ButtonVariant } from "../button";
|
|
4
|
+
import type { IComponentBaseProps } from "../types";
|
|
5
|
+
export type ButtonGroupOrientation = "horizontal" | "vertical";
|
|
6
|
+
export type ButtonGroupRootProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "children"> & IComponentBaseProps & {
|
|
7
|
+
children?: JSX.Element;
|
|
8
|
+
orientation?: ButtonGroupOrientation;
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
variant?: ButtonVariant;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type ButtonGroupSeparatorProps = Omit<JSX.HTMLAttributes<HTMLSpanElement>, "children"> & IComponentBaseProps;
|
|
15
|
+
declare const ButtonGroupRoot: ParentComponent<ButtonGroupRootProps>;
|
|
16
|
+
declare const ButtonGroupSeparator: Component<ButtonGroupSeparatorProps>;
|
|
17
|
+
declare const ButtonGroup: ParentComponent<ButtonGroupRootProps> & {
|
|
18
|
+
Root: ParentComponent<ButtonGroupRootProps>;
|
|
19
|
+
Separator: Component<ButtonGroupSeparatorProps>;
|
|
20
|
+
};
|
|
21
|
+
export default ButtonGroup;
|
|
22
|
+
export { ButtonGroup, ButtonGroupRoot, ButtonGroupSeparator };
|
|
23
|
+
export type { ButtonGroupRootProps as ButtonGroupProps };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__ from "solid-js/web";
|
|
2
|
+
import "./ButtonGroup.css";
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__ from "solid-js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__ from "tailwind-merge";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE__context_js_80e2871f__ from "./context.js";
|
|
6
|
+
var _tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<div>"), _tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<span>");
|
|
7
|
+
const ORIENTATION_CLASS_MAP = {
|
|
8
|
+
horizontal: "button-group--horizontal",
|
|
9
|
+
vertical: "button-group--vertical"
|
|
10
|
+
};
|
|
11
|
+
const ButtonGroupRoot = (props)=>{
|
|
12
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
13
|
+
"children",
|
|
14
|
+
"class",
|
|
15
|
+
"className",
|
|
16
|
+
"dataTheme",
|
|
17
|
+
"style",
|
|
18
|
+
"orientation",
|
|
19
|
+
"size",
|
|
20
|
+
"variant",
|
|
21
|
+
"isDisabled",
|
|
22
|
+
"fullWidth",
|
|
23
|
+
"role"
|
|
24
|
+
]);
|
|
25
|
+
const orientation = ()=>local.orientation ?? "horizontal";
|
|
26
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(__WEBPACK_EXTERNAL_MODULE__context_js_80e2871f__.ButtonGroupContext.Provider, {
|
|
27
|
+
value: {
|
|
28
|
+
size: ()=>local.size,
|
|
29
|
+
variant: ()=>local.variant,
|
|
30
|
+
isDisabled: ()=>local.isDisabled,
|
|
31
|
+
fullWidth: ()=>local.fullWidth
|
|
32
|
+
},
|
|
33
|
+
get children () {
|
|
34
|
+
var _el$ = _tmpl$();
|
|
35
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
36
|
+
get ["class"] () {
|
|
37
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)("button-group", ORIENTATION_CLASS_MAP[orientation()], local.fullWidth && "button-group--full-width", local.class, local.className);
|
|
38
|
+
},
|
|
39
|
+
"data-slot": "button-group",
|
|
40
|
+
get ["data-orientation"] () {
|
|
41
|
+
return orientation();
|
|
42
|
+
},
|
|
43
|
+
get ["data-theme"] () {
|
|
44
|
+
return local.dataTheme;
|
|
45
|
+
},
|
|
46
|
+
get style () {
|
|
47
|
+
return local.style;
|
|
48
|
+
},
|
|
49
|
+
get role () {
|
|
50
|
+
return local.role ?? "group";
|
|
51
|
+
},
|
|
52
|
+
get ["aria-disabled"] () {
|
|
53
|
+
return local.isDisabled ? "true" : void 0;
|
|
54
|
+
}
|
|
55
|
+
}), false, true);
|
|
56
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, ()=>local.children);
|
|
57
|
+
return _el$;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
const ButtonGroupSeparator = (props)=>{
|
|
62
|
+
const [local, others] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.splitProps)(props, [
|
|
63
|
+
"class",
|
|
64
|
+
"className",
|
|
65
|
+
"dataTheme",
|
|
66
|
+
"style"
|
|
67
|
+
]);
|
|
68
|
+
return (()=>{
|
|
69
|
+
var _el$2 = _tmpl$2();
|
|
70
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.spread)(_el$2, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
71
|
+
"aria-hidden": "true",
|
|
72
|
+
get ["class"] () {
|
|
73
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_tailwind_merge_e05e3e95__.twMerge)("button-group__separator", local.class, local.className);
|
|
74
|
+
},
|
|
75
|
+
"data-slot": "button-group-separator",
|
|
76
|
+
get ["data-theme"] () {
|
|
77
|
+
return local.dataTheme;
|
|
78
|
+
},
|
|
79
|
+
get style () {
|
|
80
|
+
return local.style;
|
|
81
|
+
}
|
|
82
|
+
}), false, false);
|
|
83
|
+
return _el$2;
|
|
84
|
+
})();
|
|
85
|
+
};
|
|
86
|
+
const ButtonGroup = Object.assign(ButtonGroupRoot, {
|
|
87
|
+
Root: ButtonGroupRoot,
|
|
88
|
+
Separator: ButtonGroupSeparator
|
|
89
|
+
});
|
|
90
|
+
const button_group_ButtonGroup = ButtonGroup;
|
|
91
|
+
export { ButtonGroup, ButtonGroupRoot, ButtonGroupSeparator, button_group_ButtonGroup as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ButtonSize, ButtonVariant } from "../button";
|
|
2
|
+
export type ButtonGroupContextValue = {
|
|
3
|
+
size: () => ButtonSize | undefined;
|
|
4
|
+
variant: () => ButtonVariant | undefined;
|
|
5
|
+
isDisabled: () => boolean | undefined;
|
|
6
|
+
fullWidth: () => boolean | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare const ButtonGroupContext: import("solid-js").Context<ButtonGroupContextValue | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, ButtonGroup, ButtonGroupRoot, ButtonGroupSeparator, type ButtonGroupProps, type ButtonGroupRootProps, type ButtonGroupSeparatorProps, type ButtonGroupOrientation, } from "./ButtonGroup";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE__ButtonGroup_js_df72aaf5__ from "./ButtonGroup.js";
|
|
2
|
+
var __webpack_exports__ButtonGroup = __WEBPACK_EXTERNAL_MODULE__ButtonGroup_js_df72aaf5__.ButtonGroup;
|
|
3
|
+
var __webpack_exports__ButtonGroupRoot = __WEBPACK_EXTERNAL_MODULE__ButtonGroup_js_df72aaf5__.ButtonGroupRoot;
|
|
4
|
+
var __webpack_exports__ButtonGroupSeparator = __WEBPACK_EXTERNAL_MODULE__ButtonGroup_js_df72aaf5__.ButtonGroupSeparator;
|
|
5
|
+
var __webpack_exports__default = __WEBPACK_EXTERNAL_MODULE__ButtonGroup_js_df72aaf5__["default"];
|
|
6
|
+
export { __webpack_exports__ButtonGroup as ButtonGroup, __webpack_exports__ButtonGroupRoot as ButtonGroupRoot, __webpack_exports__ButtonGroupSeparator as ButtonGroupSeparator, __webpack_exports__default as default };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.card {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 0.75rem;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
border-radius: var(--card-radius, calc(var(--radius-box, 0.75rem) * 2));
|
|
9
|
+
padding: var(--card-padding, 1rem);
|
|
10
|
+
color: var(--card-fg, var(--color-base-content));
|
|
11
|
+
background-color: var(--card-bg, var(--color-base-100));
|
|
12
|
+
border: 1px solid var(--card-border, transparent);
|
|
13
|
+
box-shadow:
|
|
14
|
+
var(
|
|
15
|
+
--card-shadow,
|
|
16
|
+
0 8px 24px -18px rgb(0 0 0 / 0.45),
|
|
17
|
+
0 6px 14px -10px rgb(0 0 0 / 0.28)
|
|
18
|
+
);
|
|
19
|
+
transition:
|
|
20
|
+
background-color 160ms ease,
|
|
21
|
+
border-color 160ms ease,
|
|
22
|
+
box-shadow 200ms ease,
|
|
23
|
+
transform 200ms ease;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.card:focus-visible {
|
|
27
|
+
outline: 2px solid currentColor;
|
|
28
|
+
outline-offset: 2px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.card--default {
|
|
32
|
+
--card-bg: var(--color-base-100);
|
|
33
|
+
--card-border: transparent;
|
|
34
|
+
--card-shadow:
|
|
35
|
+
0 8px 24px -18px rgb(0 0 0 / 0.45),
|
|
36
|
+
0 6px 14px -10px rgb(0 0 0 / 0.28);
|
|
37
|
+
--card-hover-shadow:
|
|
38
|
+
0 16px 30px -20px rgb(0 0 0 / 0.5),
|
|
39
|
+
0 8px 18px -12px rgb(0 0 0 / 0.35);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.card--flat {
|
|
43
|
+
--card-bg: var(--color-base-200);
|
|
44
|
+
--card-border: transparent;
|
|
45
|
+
--card-shadow: none;
|
|
46
|
+
--card-hover-shadow: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.card--bordered {
|
|
50
|
+
--card-bg: var(--color-base-100);
|
|
51
|
+
--card-border: var(--color-base-300);
|
|
52
|
+
--card-shadow: none;
|
|
53
|
+
--card-hover-shadow:
|
|
54
|
+
0 6px 20px -16px rgb(0 0 0 / 0.4),
|
|
55
|
+
0 5px 12px -10px rgb(0 0 0 / 0.28);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.card--shadow {
|
|
59
|
+
--card-bg: var(--color-base-100);
|
|
60
|
+
--card-border: transparent;
|
|
61
|
+
--card-shadow:
|
|
62
|
+
0 20px 40px -24px rgb(0 0 0 / 0.55),
|
|
63
|
+
0 12px 20px -14px rgb(0 0 0 / 0.35);
|
|
64
|
+
--card-hover-shadow:
|
|
65
|
+
0 26px 44px -26px rgb(0 0 0 / 0.6),
|
|
66
|
+
0 14px 24px -15px rgb(0 0 0 / 0.4);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.card--hoverable,
|
|
70
|
+
.card--pressable {
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media (hover: hover) {
|
|
75
|
+
.card--hoverable:hover,
|
|
76
|
+
.card--pressable:hover {
|
|
77
|
+
box-shadow: var(--card-hover-shadow, var(--card-shadow));
|
|
78
|
+
transform: translateY(-1px);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.card--pressable:active,
|
|
83
|
+
.card--pressable[data-pressed="true"] {
|
|
84
|
+
transform: scale(0.99);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.card__header,
|
|
88
|
+
.card__body,
|
|
89
|
+
.card__footer {
|
|
90
|
+
display: flex;
|
|
91
|
+
width: 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.card__header {
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
gap: 0.25rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.card__body {
|
|
100
|
+
flex: 1 1 auto;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
gap: 0.5rem;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.card__footer {
|
|
106
|
+
align-items: center;
|
|
107
|
+
flex-wrap: wrap;
|
|
108
|
+
gap: 0.5rem;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import { type JSX } from "solid-js";
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import CardTitle from "./CardTitle";
|
|
8
|
-
export type CardProps = IComponentBaseProps & JSX.HTMLAttributes<HTMLDivElement> & {
|
|
9
|
-
size?: ComponentSize;
|
|
10
|
-
border?: boolean;
|
|
11
|
-
variant?: Exclude<ComponentVariant, "soft"> | "border";
|
|
12
|
-
imageFull?: boolean;
|
|
13
|
-
side?: ComponentSize | boolean;
|
|
14
|
-
background?: ComponentColor | "base-100" | "base-200" | "base-300";
|
|
15
|
-
shadow?: "none" | "sm" | "md" | "lg" | "xl";
|
|
16
|
-
fullWidth?: boolean;
|
|
17
|
-
"aria-label"?: string;
|
|
18
|
-
"aria-describedby"?: string;
|
|
19
|
-
"aria-labelledby"?: string;
|
|
20
|
-
role?: string;
|
|
1
|
+
import "./Card.css";
|
|
2
|
+
import { type Component, type JSX, type ParentComponent } from "solid-js";
|
|
3
|
+
import type { IComponentBaseProps } from "../types";
|
|
4
|
+
export type CardVariant = "default" | "flat" | "bordered" | "shadow";
|
|
5
|
+
type CardContextlessProps<T extends HTMLElement> = Omit<JSX.HTMLAttributes<T>, "children"> & IComponentBaseProps & {
|
|
6
|
+
children?: JSX.Element;
|
|
21
7
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
export type CardRootProps = CardContextlessProps<HTMLDivElement> & {
|
|
9
|
+
variant?: CardVariant;
|
|
10
|
+
isHoverable?: boolean;
|
|
11
|
+
isPressable?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type CardHeaderProps = CardContextlessProps<HTMLDivElement>;
|
|
14
|
+
export type CardBodyProps = CardContextlessProps<HTMLDivElement>;
|
|
15
|
+
export type CardFooterProps = CardContextlessProps<HTMLDivElement>;
|
|
16
|
+
declare const CardRoot: ParentComponent<CardRootProps>;
|
|
17
|
+
declare const CardHeader: Component<CardHeaderProps>;
|
|
18
|
+
declare const CardBody: Component<CardBodyProps>;
|
|
19
|
+
declare const CardFooter: Component<CardFooterProps>;
|
|
20
|
+
declare const Card: ParentComponent<CardRootProps> & {
|
|
21
|
+
Root: ParentComponent<CardRootProps>;
|
|
22
|
+
Header: Component<CardHeaderProps>;
|
|
23
|
+
Body: Component<CardBodyProps>;
|
|
24
|
+
Content: Component<CardBodyProps>;
|
|
25
|
+
Footer: Component<CardFooterProps>;
|
|
28
26
|
};
|
|
29
27
|
export default Card;
|
|
28
|
+
export { Card, CardRoot, CardHeader, CardBody, CardFooter };
|
|
29
|
+
export type { CardRootProps as CardProps };
|