@timmbr/ui 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/dist/components/Alert/Alert.styles.d.ts +2 -2
- package/dist/components/AlertDialog/AlertDialog.d.ts +5 -3
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +21 -8
- package/dist/components/AlertDialog/AlertDialog.styles.d.ts +7 -1
- package/dist/components/AlertDialog/AlertDialog.styles.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.styles.js +26 -3
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +19 -2
- package/dist/components/AlertDialog/AlertDialog.types.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.styles.d.ts +2 -2
- package/dist/components/Badge/Badge.styles.d.ts +2 -2
- package/dist/components/Badge/Badge.styles.d.ts.map +1 -1
- package/dist/components/Badge/Badge.styles.js +3 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +6 -0
- package/dist/components/Button/Button.styles.d.ts +4 -2
- package/dist/components/Button/Button.styles.d.ts.map +1 -1
- package/dist/components/Button/Button.styles.js +26 -7
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +51 -32
- package/dist/components/Card/Card.styles.d.ts +32 -5
- package/dist/components/Card/Card.styles.d.ts.map +1 -1
- package/dist/components/Card/Card.styles.js +69 -10
- package/dist/components/Card/Card.types.d.ts +14 -3
- package/dist/components/Card/Card.types.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.styles.d.ts +2 -2
- package/dist/components/Chip/Chip.styles.d.ts +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +30 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.js +57 -0
- package/dist/components/ConfirmDialog/index.d.ts +2 -0
- package/dist/components/ConfirmDialog/index.d.ts.map +1 -0
- package/dist/components/Container/Container.styles.d.ts +1 -1
- package/dist/components/DataList/DataList.d.ts +3 -1
- package/dist/components/DataList/DataList.d.ts.map +1 -1
- package/dist/components/DataList/DataList.js +53 -15
- package/dist/components/DataList/DataList.styles.d.ts +17 -4
- package/dist/components/DataList/DataList.styles.d.ts.map +1 -1
- package/dist/components/DataList/DataList.styles.js +53 -10
- package/dist/components/DataList/DataList.types.d.ts +19 -2
- package/dist/components/DataList/DataList.types.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +4 -3
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.js +33 -6
- package/dist/components/Drawer/Drawer.styles.d.ts +4 -0
- package/dist/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.styles.js +8 -5
- package/dist/components/Drawer/Drawer.types.d.ts +1 -0
- package/dist/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.js +23 -10
- package/dist/components/Dropdown/Dropdown.styles.d.ts +5 -1
- package/dist/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.styles.js +12 -2
- package/dist/components/Dropdown/Dropdown.types.d.ts +4 -0
- package/dist/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.js +2 -1
- package/dist/components/EmptyState/EmptyState.styles.d.ts +3 -2
- package/dist/components/EmptyState/EmptyState.styles.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.styles.js +5 -0
- package/dist/components/Fieldset/Fieldset.d.ts +14 -0
- package/dist/components/Fieldset/Fieldset.d.ts.map +1 -0
- package/dist/components/Fieldset/Fieldset.js +24 -0
- package/dist/components/Fieldset/index.d.ts +2 -0
- package/dist/components/Fieldset/index.d.ts.map +1 -0
- package/dist/components/FormActions/FormActions.d.ts +13 -0
- package/dist/components/FormActions/FormActions.d.ts.map +1 -0
- package/dist/components/FormActions/FormActions.js +24 -0
- package/dist/components/FormActions/index.d.ts +2 -0
- package/dist/components/FormActions/index.d.ts.map +1 -0
- package/dist/components/Grid/Grid.d.ts +3 -1
- package/dist/components/Grid/Grid.d.ts.map +1 -1
- package/dist/components/Grid/Grid.js +31 -5
- package/dist/components/Grid/Grid.styles.d.ts +86 -0
- package/dist/components/Grid/Grid.styles.d.ts.map +1 -1
- package/dist/components/Grid/Grid.styles.js +85 -1
- package/dist/components/Grid/Grid.types.d.ts +31 -3
- package/dist/components/Grid/Grid.types.d.ts.map +1 -1
- package/dist/components/Heading/Heading.styles.d.ts +2 -2
- package/dist/components/Heading/Heading.styles.d.ts.map +1 -1
- package/dist/components/Heading/Heading.styles.js +3 -1
- package/dist/components/Heading/Heading.types.d.ts +1 -1
- package/dist/components/Heading/Heading.types.d.ts.map +1 -1
- package/dist/components/Icon/Icon.styles.d.ts +2 -2
- package/dist/components/Icon/Icon.styles.d.ts.map +1 -1
- package/dist/components/Icon/Icon.styles.js +6 -2
- package/dist/components/IconTile/IconTile.d.ts +8 -0
- package/dist/components/IconTile/IconTile.d.ts.map +1 -0
- package/dist/components/IconTile/IconTile.js +23 -0
- package/dist/components/IconTile/IconTile.styles.d.ts +7 -0
- package/dist/components/IconTile/IconTile.styles.d.ts.map +1 -0
- package/dist/components/IconTile/IconTile.styles.js +24 -0
- package/dist/components/IconTile/IconTile.types.d.ts +12 -0
- package/dist/components/IconTile/IconTile.types.d.ts.map +1 -0
- package/dist/components/IconTile/index.d.ts +4 -0
- package/dist/components/IconTile/index.d.ts.map +1 -0
- package/dist/components/Inline/Inline.d.ts.map +1 -1
- package/dist/components/Inline/Inline.js +10 -2
- package/dist/components/Inline/Inline.types.d.ts +6 -1
- package/dist/components/Inline/Inline.types.d.ts.map +1 -1
- package/dist/components/Input/Input.styles.d.ts +1 -1
- package/dist/components/Label/Label.styles.d.ts +1 -1
- package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
- package/dist/components/LinkButton/LinkButton.js +2 -0
- package/dist/components/LinkButton/LinkButton.styles.d.ts +3 -2
- package/dist/components/LinkButton/LinkButton.styles.d.ts.map +1 -1
- package/dist/components/LinkButton/LinkButton.styles.js +6 -0
- package/dist/components/List/List.d.ts.map +1 -1
- package/dist/components/List/List.js +18 -5
- package/dist/components/List/List.styles.d.ts +3 -1
- package/dist/components/List/List.styles.d.ts.map +1 -1
- package/dist/components/List/List.styles.js +4 -3
- package/dist/components/List/List.types.d.ts +7 -0
- package/dist/components/List/List.types.d.ts.map +1 -1
- package/dist/components/MediaCard/MediaCard.d.ts +13 -0
- package/dist/components/MediaCard/MediaCard.d.ts.map +1 -0
- package/dist/components/MediaCard/MediaCard.js +123 -0
- package/dist/components/MediaCard/MediaCard.styles.d.ts +17 -0
- package/dist/components/MediaCard/MediaCard.styles.d.ts.map +1 -0
- package/dist/components/MediaCard/MediaCard.styles.js +57 -0
- package/dist/components/MediaCard/MediaCard.types.d.ts +73 -0
- package/dist/components/MediaCard/MediaCard.types.d.ts.map +1 -0
- package/dist/components/MediaCard/index.d.ts +4 -0
- package/dist/components/MediaCard/index.d.ts.map +1 -0
- package/dist/components/NavFooter/NavFooter.styles.d.ts +1 -1
- package/dist/components/NavHeader/NavHeader.d.ts.map +1 -1
- package/dist/components/NavHeader/NavHeader.js +2 -1
- package/dist/components/NavHeader/NavHeader.styles.d.ts +1 -1
- package/dist/components/NavHeader/NavHeader.types.d.ts +22 -0
- package/dist/components/NavHeader/NavHeader.types.d.ts.map +1 -1
- package/dist/components/NavHeader/index.d.ts +1 -1
- package/dist/components/NavHeader/index.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavActions.d.ts +5 -0
- package/dist/components/NavHeader/subcomponents/NavActions.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavActions.js +32 -2
- package/dist/components/OtpInput/OtpInput.styles.d.ts +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +8 -0
- package/dist/components/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeader.js +55 -0
- package/dist/components/PageHeader/PageHeader.styles.d.ts +10 -0
- package/dist/components/PageHeader/PageHeader.styles.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeader.styles.js +23 -0
- package/dist/components/PageHeader/PageHeader.types.d.ts +24 -0
- package/dist/components/PageHeader/PageHeader.types.d.ts.map +1 -0
- package/dist/components/PageHeader/index.d.ts +4 -0
- package/dist/components/PageHeader/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +9 -3
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +60 -39
- package/dist/components/Pagination/Pagination.styles.d.ts +1 -1
- package/dist/components/Pagination/Pagination.types.d.ts +23 -14
- package/dist/components/Pagination/Pagination.types.d.ts.map +1 -1
- package/dist/components/Price/Price.d.ts +10 -0
- package/dist/components/Price/Price.d.ts.map +1 -0
- package/dist/components/Price/Price.js +49 -0
- package/dist/components/Price/Price.styles.d.ts +15 -0
- package/dist/components/Price/Price.styles.d.ts.map +1 -0
- package/dist/components/Price/Price.styles.js +44 -0
- package/dist/components/Price/Price.types.d.ts +22 -0
- package/dist/components/Price/Price.types.d.ts.map +1 -0
- package/dist/components/Price/index.d.ts +4 -0
- package/dist/components/Price/index.d.ts.map +1 -0
- package/dist/components/Progress/Progress.styles.d.ts +1 -1
- package/dist/components/Radio/Radio.styles.d.ts +2 -2
- package/dist/components/Rating/Rating.d.ts +5 -0
- package/dist/components/Rating/Rating.d.ts.map +1 -0
- package/dist/components/Rating/Rating.js +38 -0
- package/dist/components/Rating/Rating.styles.d.ts +6 -0
- package/dist/components/Rating/Rating.styles.d.ts.map +1 -0
- package/dist/components/Rating/Rating.styles.js +13 -0
- package/dist/components/Rating/Rating.types.d.ts +18 -0
- package/dist/components/Rating/Rating.types.d.ts.map +1 -0
- package/dist/components/Rating/index.d.ts +4 -0
- package/dist/components/Rating/index.d.ts.map +1 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.d.ts +29 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.d.ts.map +1 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.js +74 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.types.d.ts +27 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.types.d.ts.map +1 -0
- package/dist/components/ResponsiveDialog/index.d.ts +3 -0
- package/dist/components/ResponsiveDialog/index.d.ts.map +1 -0
- package/dist/components/SectionNav/SectionNav.d.ts +12 -0
- package/dist/components/SectionNav/SectionNav.d.ts.map +1 -0
- package/dist/components/SectionNav/SectionNav.js +67 -0
- package/dist/components/SectionNav/SectionNav.styles.d.ts +11 -0
- package/dist/components/SectionNav/SectionNav.styles.d.ts.map +1 -0
- package/dist/components/SectionNav/SectionNav.styles.js +28 -0
- package/dist/components/SectionNav/SectionNav.types.d.ts +37 -0
- package/dist/components/SectionNav/SectionNav.types.d.ts.map +1 -0
- package/dist/components/SectionNav/index.d.ts +4 -0
- package/dist/components/SectionNav/index.d.ts.map +1 -0
- package/dist/components/Select/Select.styles.d.ts +1 -1
- package/dist/components/Spinner/Spinner.styles.d.ts +1 -1
- package/dist/components/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Stack/Stack.js +16 -1
- package/dist/components/Stack/Stack.types.d.ts +14 -1
- package/dist/components/Stack/Stack.types.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.d.ts +9 -0
- package/dist/components/Stepper/Stepper.d.ts.map +1 -0
- package/dist/components/Stepper/Stepper.js +81 -0
- package/dist/components/Stepper/Stepper.styles.d.ts +14 -0
- package/dist/components/Stepper/Stepper.styles.d.ts.map +1 -0
- package/dist/components/Stepper/Stepper.styles.js +40 -0
- package/dist/components/Stepper/Stepper.types.d.ts +17 -0
- package/dist/components/Stepper/Stepper.types.d.ts.map +1 -0
- package/dist/components/Stepper/index.d.ts +4 -0
- package/dist/components/Stepper/index.d.ts.map +1 -0
- package/dist/components/Steps/Steps.d.ts +9 -0
- package/dist/components/Steps/Steps.d.ts.map +1 -0
- package/dist/components/Steps/Steps.js +81 -0
- package/dist/components/Steps/Steps.styles.d.ts +14 -0
- package/dist/components/Steps/Steps.styles.d.ts.map +1 -0
- package/dist/components/Steps/Steps.styles.js +40 -0
- package/dist/components/Steps/Steps.types.d.ts +17 -0
- package/dist/components/Steps/Steps.types.d.ts.map +1 -0
- package/dist/components/Steps/index.d.ts +4 -0
- package/dist/components/Steps/index.d.ts.map +1 -0
- package/dist/components/SubNav/SubNav.d.ts +17 -0
- package/dist/components/SubNav/SubNav.d.ts.map +1 -0
- package/dist/components/SubNav/SubNav.js +87 -0
- package/dist/components/SubNav/SubNav.styles.d.ts +18 -0
- package/dist/components/SubNav/SubNav.styles.d.ts.map +1 -0
- package/dist/components/SubNav/SubNav.styles.js +33 -0
- package/dist/components/SubNav/SubNav.types.d.ts +45 -0
- package/dist/components/SubNav/SubNav.types.d.ts.map +1 -0
- package/dist/components/SubNav/index.d.ts +4 -0
- package/dist/components/SubNav/index.d.ts.map +1 -0
- package/dist/components/Switch/Switch.styles.d.ts +2 -2
- package/dist/components/Table/Table.styles.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +73 -6
- package/dist/components/Tabs/Tabs.styles.d.ts +10 -2
- package/dist/components/Tabs/Tabs.styles.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.styles.js +17 -2
- package/dist/components/Tabs/Tabs.types.d.ts +13 -0
- package/dist/components/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +4 -0
- package/dist/components/Text/Text.styles.d.ts +4 -2
- package/dist/components/Text/Text.styles.d.ts.map +1 -1
- package/dist/components/Text/Text.styles.js +16 -2
- package/dist/components/Text/Text.types.d.ts +1 -1
- package/dist/components/Text/Text.types.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.styles.d.ts +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +8 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +14 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/components/VisuallyHidden/index.d.ts.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -13
- package/dist/utils/gap.d.ts +21 -1
- package/dist/utils/gap.d.ts.map +1 -1
- package/dist/utils/gap.js +306 -46
- package/package.json +6 -6
|
@@ -71,5 +71,89 @@ const xlColsMap = {
|
|
|
71
71
|
11: "xl:grid-cols-11",
|
|
72
72
|
12: "xl:grid-cols-12"
|
|
73
73
|
};
|
|
74
|
+
const templateClassMap = {
|
|
75
|
+
base: "grid-cols-[var(--grid-template)]",
|
|
76
|
+
sm: "sm:grid-cols-[var(--grid-template-sm)]",
|
|
77
|
+
md: "md:grid-cols-[var(--grid-template-md)]",
|
|
78
|
+
lg: "lg:grid-cols-[var(--grid-template-lg)]",
|
|
79
|
+
xl: "xl:grid-cols-[var(--grid-template-xl)]"
|
|
80
|
+
};
|
|
81
|
+
const spanClassMap = {
|
|
82
|
+
base: {
|
|
83
|
+
1: "col-span-1",
|
|
84
|
+
2: "col-span-2",
|
|
85
|
+
3: "col-span-3",
|
|
86
|
+
4: "col-span-4",
|
|
87
|
+
5: "col-span-5",
|
|
88
|
+
6: "col-span-6",
|
|
89
|
+
7: "col-span-7",
|
|
90
|
+
8: "col-span-8",
|
|
91
|
+
9: "col-span-9",
|
|
92
|
+
10: "col-span-10",
|
|
93
|
+
11: "col-span-11",
|
|
94
|
+
12: "col-span-12",
|
|
95
|
+
full: "col-span-full"
|
|
96
|
+
},
|
|
97
|
+
sm: {
|
|
98
|
+
1: "sm:col-span-1",
|
|
99
|
+
2: "sm:col-span-2",
|
|
100
|
+
3: "sm:col-span-3",
|
|
101
|
+
4: "sm:col-span-4",
|
|
102
|
+
5: "sm:col-span-5",
|
|
103
|
+
6: "sm:col-span-6",
|
|
104
|
+
7: "sm:col-span-7",
|
|
105
|
+
8: "sm:col-span-8",
|
|
106
|
+
9: "sm:col-span-9",
|
|
107
|
+
10: "sm:col-span-10",
|
|
108
|
+
11: "sm:col-span-11",
|
|
109
|
+
12: "sm:col-span-12",
|
|
110
|
+
full: "sm:col-span-full"
|
|
111
|
+
},
|
|
112
|
+
md: {
|
|
113
|
+
1: "md:col-span-1",
|
|
114
|
+
2: "md:col-span-2",
|
|
115
|
+
3: "md:col-span-3",
|
|
116
|
+
4: "md:col-span-4",
|
|
117
|
+
5: "md:col-span-5",
|
|
118
|
+
6: "md:col-span-6",
|
|
119
|
+
7: "md:col-span-7",
|
|
120
|
+
8: "md:col-span-8",
|
|
121
|
+
9: "md:col-span-9",
|
|
122
|
+
10: "md:col-span-10",
|
|
123
|
+
11: "md:col-span-11",
|
|
124
|
+
12: "md:col-span-12",
|
|
125
|
+
full: "md:col-span-full"
|
|
126
|
+
},
|
|
127
|
+
lg: {
|
|
128
|
+
1: "lg:col-span-1",
|
|
129
|
+
2: "lg:col-span-2",
|
|
130
|
+
3: "lg:col-span-3",
|
|
131
|
+
4: "lg:col-span-4",
|
|
132
|
+
5: "lg:col-span-5",
|
|
133
|
+
6: "lg:col-span-6",
|
|
134
|
+
7: "lg:col-span-7",
|
|
135
|
+
8: "lg:col-span-8",
|
|
136
|
+
9: "lg:col-span-9",
|
|
137
|
+
10: "lg:col-span-10",
|
|
138
|
+
11: "lg:col-span-11",
|
|
139
|
+
12: "lg:col-span-12",
|
|
140
|
+
full: "lg:col-span-full"
|
|
141
|
+
},
|
|
142
|
+
xl: {
|
|
143
|
+
1: "xl:col-span-1",
|
|
144
|
+
2: "xl:col-span-2",
|
|
145
|
+
3: "xl:col-span-3",
|
|
146
|
+
4: "xl:col-span-4",
|
|
147
|
+
5: "xl:col-span-5",
|
|
148
|
+
6: "xl:col-span-6",
|
|
149
|
+
7: "xl:col-span-7",
|
|
150
|
+
8: "xl:col-span-8",
|
|
151
|
+
9: "xl:col-span-9",
|
|
152
|
+
10: "xl:col-span-10",
|
|
153
|
+
11: "xl:col-span-11",
|
|
154
|
+
12: "xl:col-span-12",
|
|
155
|
+
full: "xl:col-span-full"
|
|
156
|
+
}
|
|
157
|
+
};
|
|
74
158
|
|
|
75
|
-
export { colsMap, gridVariants, lgColsMap, mdColsMap, smColsMap, xlColsMap };
|
|
159
|
+
export { colsMap, gridVariants, lgColsMap, mdColsMap, smColsMap, spanClassMap, templateClassMap, xlColsMap };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
+
import type { GapValue } from '../../utils/gap';
|
|
2
3
|
export interface ResponsiveCols {
|
|
4
|
+
/** Columns at every size (below the first breakpoint given). */
|
|
5
|
+
base?: number;
|
|
3
6
|
sm?: number;
|
|
4
7
|
md?: number;
|
|
5
8
|
lg?: number;
|
|
@@ -16,15 +19,21 @@ export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
16
19
|
* Gap between rows and columns (e.g. 2, 4, 6, 8 or CSS string '1rem').
|
|
17
20
|
* @default 4
|
|
18
21
|
*/
|
|
19
|
-
gap?:
|
|
22
|
+
gap?: GapValue;
|
|
20
23
|
/**
|
|
21
24
|
* Specific row gap.
|
|
22
25
|
*/
|
|
23
|
-
rowGap?:
|
|
26
|
+
rowGap?: GapValue;
|
|
24
27
|
/**
|
|
25
28
|
* Specific column gap.
|
|
26
29
|
*/
|
|
27
|
-
colGap?:
|
|
30
|
+
colGap?: GapValue;
|
|
31
|
+
/**
|
|
32
|
+
* Custom column template (CSS `grid-template-columns`), e.g.
|
|
33
|
+
* `{ lg: '15rem minmax(0,1fr)' }` for a fixed side column from `lg` up.
|
|
34
|
+
* Takes precedence over `cols` at the breakpoints it sets.
|
|
35
|
+
*/
|
|
36
|
+
template?: string | ResponsiveTemplate;
|
|
28
37
|
/**
|
|
29
38
|
* If true, generates an auto-fit/auto-fill responsive grid using minChildWidth.
|
|
30
39
|
*/
|
|
@@ -38,4 +47,23 @@ export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
38
47
|
*/
|
|
39
48
|
asChild?: boolean;
|
|
40
49
|
}
|
|
50
|
+
export interface ResponsiveTemplate {
|
|
51
|
+
base?: string;
|
|
52
|
+
sm?: string;
|
|
53
|
+
md?: string;
|
|
54
|
+
lg?: string;
|
|
55
|
+
xl?: string;
|
|
56
|
+
}
|
|
57
|
+
export type GridSpan = number | 'full';
|
|
58
|
+
export interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
59
|
+
/** Columns the item spans: a number or `full`, or one per breakpoint. */
|
|
60
|
+
span?: GridSpan | {
|
|
61
|
+
base?: GridSpan;
|
|
62
|
+
sm?: GridSpan;
|
|
63
|
+
md?: GridSpan;
|
|
64
|
+
lg?: GridSpan;
|
|
65
|
+
xl?: GridSpan;
|
|
66
|
+
};
|
|
67
|
+
asChild?: boolean;
|
|
68
|
+
}
|
|
41
69
|
//# sourceMappingURL=Grid.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.types.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/Grid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Grid.types.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/Grid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAC/B;;;OAGG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAAC;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACzE,yEAAyE;IACzE,IAAI,CAAC,EAAE,QAAQ,GAAG;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;QAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;QAAC,EAAE,CAAC,EAAE,QAAQ,CAAC;QAAC,EAAE,CAAC,EAAE,QAAQ,CAAA;KAAE,CAAC;IAClG,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const headingVariants: (props?: ({
|
|
3
|
-
level?: 1 | 2 | 3 |
|
|
3
|
+
level?: 4 | 1 | 2 | 3 | 5 | 6 | null | undefined;
|
|
4
4
|
font?: "title" | "display" | null | undefined;
|
|
5
|
-
foreground?: "default" | "destructive" | "inherit" | "white" | "subtle" | "primary" | "secondary" | "muted" | null | undefined;
|
|
5
|
+
foreground?: "default" | "destructive" | "success" | "warning" | "inherit" | "white" | "subtle" | "primary" | "secondary" | "muted" | null | undefined;
|
|
6
6
|
weight?: "bold" | "normal" | "medium" | "light" | "semibold" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export type HeadingVariants = VariantProps<typeof headingVariants>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,eAAe;;;;;
|
|
1
|
+
{"version":3,"file":"Heading.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,eAAe;;;;;8EAyC1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -18,11 +18,13 @@ const headingVariants = cva("transition-colors text-foreground", {
|
|
|
18
18
|
},
|
|
19
19
|
foreground: {
|
|
20
20
|
default: "text-foreground",
|
|
21
|
-
muted: "text-
|
|
21
|
+
muted: "text-muted-foreground",
|
|
22
22
|
subtle: "text-grey-500 dark:text-grey-500",
|
|
23
23
|
primary: "text-primary",
|
|
24
24
|
secondary: "text-secondary-foreground",
|
|
25
25
|
destructive: "text-destructive",
|
|
26
|
+
success: "text-success",
|
|
27
|
+
warning: "text-warning",
|
|
26
28
|
white: "text-grey-50",
|
|
27
29
|
inherit: "text-inherit"
|
|
28
30
|
},
|
|
@@ -25,7 +25,7 @@ export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement>,
|
|
|
25
25
|
* Foreground color token.
|
|
26
26
|
* @default 'default'
|
|
27
27
|
*/
|
|
28
|
-
foreground?: 'default' | 'muted' | 'subtle' | 'primary' | 'secondary' | 'destructive' | 'white' | 'inherit';
|
|
28
|
+
foreground?: 'default' | 'muted' | 'subtle' | 'primary' | 'secondary' | 'destructive' | 'success' | 'warning' | 'white' | 'inherit';
|
|
29
29
|
/**
|
|
30
30
|
* If true, renders child element via Radix Slot while applying heading styles.
|
|
31
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.types.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACjE,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjD,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAC9C,eAAe;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IAC7D;;;OAGG;IACH,UAAU,CAAC,EACP,SAAS,GACT,OAAO,GACP,QAAQ,GACR,SAAS,GACT,WAAW,GACX,aAAa,GACb,OAAO,GACP,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
1
|
+
{"version":3,"file":"Heading.types.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACjE,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEjD,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAC9C,eAAe;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;IAC7D;;;OAGG;IACH,UAAU,CAAC,EACP,SAAS,GACT,OAAO,GACP,QAAQ,GACR,SAAS,GACT,WAAW,GACX,aAAa,GACb,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const iconVariants: (props?: ({
|
|
3
|
-
size?: "sm" | "
|
|
4
|
-
foreground?: "default" | "destructive" | "inherit" | "white" | "subtle" | "primary" | "secondary" | "muted" | null | undefined;
|
|
3
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
4
|
+
foreground?: "default" | "destructive" | "success" | "warning" | "inherit" | "white" | "subtle" | "primary" | "secondary" | "muted" | null | undefined;
|
|
5
5
|
clickable?: boolean | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export type IconVariants = VariantProps<typeof iconVariants>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;;;
|
|
1
|
+
{"version":3,"file":"Icon.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;;;8EAoCxB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
2
|
|
|
3
3
|
const iconVariants = cva(
|
|
4
|
-
|
|
4
|
+
// Child SVGs (`svg` prop or children) fill the icon box like `icon` does, so
|
|
5
|
+
// `<Icon><Truck /></Icon>` also works in Server Components (no function prop).
|
|
6
|
+
"inline-flex shrink-0 items-center justify-center transition-all leading-none [&>svg]:size-full",
|
|
5
7
|
{
|
|
6
8
|
variants: {
|
|
7
9
|
size: {
|
|
@@ -13,11 +15,13 @@ const iconVariants = cva(
|
|
|
13
15
|
},
|
|
14
16
|
foreground: {
|
|
15
17
|
default: "text-foreground",
|
|
16
|
-
muted: "text-
|
|
18
|
+
muted: "text-muted-foreground",
|
|
17
19
|
subtle: "text-grey-500 dark:text-grey-500",
|
|
18
20
|
primary: "text-primary",
|
|
19
21
|
secondary: "text-secondary-foreground",
|
|
20
22
|
destructive: "text-destructive",
|
|
23
|
+
success: "text-success",
|
|
24
|
+
warning: "text-warning",
|
|
21
25
|
white: "text-grey-50",
|
|
22
26
|
inherit: "text-inherit"
|
|
23
27
|
},
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { IconTileProps } from './IconTile.types';
|
|
3
|
+
/**
|
|
4
|
+
* An icon in a tinted circle: list rows, section cards, settings rows.
|
|
5
|
+
* Decorative by default; pass `label` when the icon carries meaning alone.
|
|
6
|
+
*/
|
|
7
|
+
export declare const IconTile: React.ForwardRefExoticComponent<IconTileProps & React.RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
//# sourceMappingURL=IconTile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconTile.d.ts","sourceRoot":"","sources":["../../../src/components/IconTile/IconTile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,QAAQ,uFAcpB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cn } from '@timmbr/utils';
|
|
4
|
+
import { iconTileVariants } from './IconTile.styles.js';
|
|
5
|
+
|
|
6
|
+
const IconTile = React.forwardRef(
|
|
7
|
+
({ className, size, tone, label, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8
|
+
"span",
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
"data-slot": "icon-tile",
|
|
12
|
+
role: label ? "img" : void 0,
|
|
13
|
+
"aria-label": label,
|
|
14
|
+
"aria-hidden": label ? void 0 : true,
|
|
15
|
+
className: cn(iconTileVariants({ size, tone }), className),
|
|
16
|
+
...props,
|
|
17
|
+
children
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
);
|
|
21
|
+
IconTile.displayName = "IconTile";
|
|
22
|
+
|
|
23
|
+
export { IconTile };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const iconTileVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
tone?: "destructive" | "success" | "warning" | "primary" | "neutral" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export type IconTileVariants = VariantProps<typeof iconTileVariants>;
|
|
7
|
+
//# sourceMappingURL=IconTile.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconTile.styles.d.ts","sourceRoot":"","sources":["../../../src/components/IconTile/IconTile.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;8EAmB5B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
const iconTileVariants = cva(
|
|
4
|
+
"inline-flex shrink-0 items-center justify-center rounded-full",
|
|
5
|
+
{
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
sm: "size-8 [&_svg]:size-4",
|
|
9
|
+
md: "size-10 [&_svg]:size-5",
|
|
10
|
+
lg: "size-12 [&_svg]:size-6"
|
|
11
|
+
},
|
|
12
|
+
tone: {
|
|
13
|
+
primary: "bg-secondary text-secondary-foreground",
|
|
14
|
+
neutral: "bg-muted text-foreground",
|
|
15
|
+
success: "bg-success/10 text-success",
|
|
16
|
+
warning: "bg-warning/15 text-warning-foreground",
|
|
17
|
+
destructive: "bg-destructive/10 text-destructive"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: { size: "md", tone: "primary" }
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export { iconTileVariants };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { IconTileVariants } from './IconTile.styles';
|
|
3
|
+
export interface IconTileProps extends React.HTMLAttributes<HTMLSpanElement>, IconTileVariants {
|
|
4
|
+
/** The icon (an SVG element, e.g. `<Package />`); sized by `size`. */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/**
|
|
7
|
+
* Accessible name. Leave out for decorative tiles (hidden from screen
|
|
8
|
+
* readers), e.g. next to a text label.
|
|
9
|
+
*/
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=IconTile.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconTile.types.d.ts","sourceRoot":"","sources":["../../../src/components/IconTile/IconTile.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,gBAAgB;IAC5F,sEAAsE;IACtE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconTile/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../../src/components/Inline/Inline.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Inline.d.ts","sourceRoot":"","sources":["../../../src/components/Inline/Inline.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,eAAO,MAAM,MAAM,oFAoDlB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Slot } from '@radix-ui/react-slot';
|
|
5
5
|
import { cn } from '@timmbr/utils';
|
|
6
|
-
import { formatGap } from '../../utils/gap.js';
|
|
6
|
+
import { formatGap, formatAxisGap } from '../../utils/gap.js';
|
|
7
7
|
import { inlineVariants } from './Inline.styles.js';
|
|
8
8
|
|
|
9
9
|
const Inline = React.forwardRef(
|
|
@@ -11,6 +11,8 @@ const Inline = React.forwardRef(
|
|
|
11
11
|
className,
|
|
12
12
|
style,
|
|
13
13
|
gap = 3,
|
|
14
|
+
rowGap,
|
|
15
|
+
colGap,
|
|
14
16
|
align = "center",
|
|
15
17
|
justify = "start",
|
|
16
18
|
wrap = true,
|
|
@@ -36,7 +38,13 @@ const Inline = React.forwardRef(
|
|
|
36
38
|
"data-slot": "inline",
|
|
37
39
|
"data-testid": "timmbr-inline",
|
|
38
40
|
style,
|
|
39
|
-
className: cn(
|
|
41
|
+
className: cn(
|
|
42
|
+
inlineVariants({ align, justify, wrap }),
|
|
43
|
+
gapClass,
|
|
44
|
+
formatAxisGap("y", rowGap),
|
|
45
|
+
formatAxisGap("x", colGap),
|
|
46
|
+
className
|
|
47
|
+
),
|
|
40
48
|
...props,
|
|
41
49
|
children: renderChildren()
|
|
42
50
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import type { InlineVariants } from './Inline.styles';
|
|
3
|
+
import type { GapValue } from '../../utils/gap';
|
|
3
4
|
export interface InlineProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'gap'>, Omit<InlineVariants, 'gap'> {
|
|
4
5
|
/**
|
|
5
6
|
* Gap between items. Translates standard Tailwind tokens, any number (px), or custom string.
|
|
6
7
|
*/
|
|
7
|
-
gap?:
|
|
8
|
+
gap?: GapValue;
|
|
9
|
+
/** Gap between wrapped lines (overrides `gap` vertically). */
|
|
10
|
+
rowGap?: GapValue;
|
|
11
|
+
/** Gap between items on a line (overrides `gap` horizontally). */
|
|
12
|
+
colGap?: GapValue;
|
|
8
13
|
/**
|
|
9
14
|
* Optional divider element rendered between each inline child.
|
|
10
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inline.types.d.ts","sourceRoot":"","sources":["../../../src/components/Inline/Inline.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Inline.types.d.ts","sourceRoot":"","sources":["../../../src/components/Inline/Inline.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,EACvD,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC;IAC7B;;OAEG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,8DAA8D;IAC9D,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,kEAAkE;IAClE,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const inputWrapperVariants: (props?: ({
|
|
3
3
|
variant?: "filled" | "outline" | "subtle" | null | undefined;
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "sm" | "md" | "lg" | "default" | null | undefined;
|
|
5
5
|
isError?: boolean | null | undefined;
|
|
6
6
|
isDisabled?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const labelVariants: (props?: ({
|
|
3
|
-
size?: "
|
|
3
|
+
size?: "sm" | "md" | "lg" | "default" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
5
|
export type LabelVariants = VariantProps<typeof labelVariants>;
|
|
6
6
|
//# sourceMappingURL=Label.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/LinkButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"LinkButton.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/LinkButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,2FA2MtB,CAAC"}
|
|
@@ -16,6 +16,7 @@ const LinkButton = React.forwardRef(
|
|
|
16
16
|
style,
|
|
17
17
|
variant,
|
|
18
18
|
size,
|
|
19
|
+
fullWidth,
|
|
19
20
|
asChild = false,
|
|
20
21
|
motion,
|
|
21
22
|
leftIcon,
|
|
@@ -55,6 +56,7 @@ const LinkButton = React.forwardRef(
|
|
|
55
56
|
variant: resolvedVariant,
|
|
56
57
|
size: resolvedSize,
|
|
57
58
|
disabled: isDisabled,
|
|
59
|
+
fullWidth,
|
|
58
60
|
className
|
|
59
61
|
}),
|
|
60
62
|
!shouldAnimate && "transition-none active:scale-100",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const linkButtonVariants: (props?: ({
|
|
3
|
-
variant?: "link" | "default" | "destructive" | "outline" | "ghost" | "subtle" | "primary" | "secondary" | "muted" | null | undefined;
|
|
4
|
-
size?: "
|
|
3
|
+
variant?: "link" | "default" | "destructive" | "outline" | "ghost" | "subtle" | "primary" | "secondary" | "muted" | "back" | null | undefined;
|
|
4
|
+
size?: "sm" | "md" | "lg" | "default" | "icon" | null | undefined;
|
|
5
5
|
disabled?: boolean | null | undefined;
|
|
6
|
+
fullWidth?: boolean | null | undefined;
|
|
6
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
8
|
export type LinkButtonVariants = VariantProps<typeof linkButtonVariants>;
|
|
8
9
|
//# sourceMappingURL=LinkButton.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkButton.styles.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/LinkButton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"LinkButton.styles.d.ts","sourceRoot":"","sources":["../../../src/components/LinkButton/LinkButton.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,kBAAkB;;;;;8EAwE9B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -13,6 +13,8 @@ const linkButtonVariants = cva(
|
|
|
13
13
|
ghost: "text-foreground hover:bg-grey-100 dark:hover:bg-grey-900 active:bg-grey-200 dark:active:bg-grey-800 active:scale-[0.98] font-semibold whitespace-nowrap",
|
|
14
14
|
destructive: "bg-destructive text-grey-50 hover:bg-destructive/90 hover:brightness-105 hover:shadow-md active:brightness-95 shadow-sm active:scale-[0.98] font-semibold whitespace-nowrap",
|
|
15
15
|
muted: "text-grey-600 dark:text-grey-400 hover:text-foreground underline-offset-4 hover:underline font-normal p-0 h-auto active:scale-100",
|
|
16
|
+
/** "‹ Back" links: muted, no underline, 44px touch target, optically aligned to the edge. */
|
|
17
|
+
back: "-ms-1 min-h-11 text-muted-foreground hover:text-foreground font-medium p-0 active:scale-100",
|
|
16
18
|
subtle: "text-foreground/80 hover:text-foreground underline-offset-4 hover:underline font-normal p-0 h-auto active:scale-100"
|
|
17
19
|
},
|
|
18
20
|
size: {
|
|
@@ -25,6 +27,10 @@ const linkButtonVariants = cva(
|
|
|
25
27
|
disabled: {
|
|
26
28
|
true: "pointer-events-none opacity-50 cursor-not-allowed",
|
|
27
29
|
false: "cursor-pointer"
|
|
30
|
+
},
|
|
31
|
+
fullWidth: {
|
|
32
|
+
true: "w-full",
|
|
33
|
+
false: ""
|
|
28
34
|
}
|
|
29
35
|
},
|
|
30
36
|
compoundVariants: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,IAAI,oFAShB,CAAC;AAGF,eAAO,MAAM,QAAQ,qFAoCpB,CAAC;AAGF,eAAO,MAAM,YAAY,0FASxB,CAAC;AAGF,eAAO,MAAM,YAAY,0FAiBxB,CAAC;AAGF,eAAO,MAAM,cAAc,4FAS1B,CAAC"}
|
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
4
5
|
import { cn } from '@timmbr/utils';
|
|
5
|
-
import { listVariants, listItemVariants, listItemActionVariants, listItemIconVariants, listItemTextVariants } from './List.styles.js';
|
|
6
|
+
import { listVariants, listDividedClass, listItemVariants, listItemActionVariants, listItemIconVariants, listItemTextVariants } from './List.styles.js';
|
|
6
7
|
|
|
7
8
|
const List = React.forwardRef(
|
|
8
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9
|
+
({ className, variant, divided = false, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9
10
|
"ul",
|
|
10
11
|
{
|
|
11
12
|
ref,
|
|
12
13
|
"data-slot": "list",
|
|
13
|
-
className: cn(listVariants({ variant }), className),
|
|
14
|
+
className: cn(listVariants({ variant }), divided && listDividedClass, className),
|
|
14
15
|
...props
|
|
15
16
|
}
|
|
16
17
|
)
|
|
17
18
|
);
|
|
18
19
|
List.displayName = "List";
|
|
19
20
|
const ListItem = React.forwardRef(
|
|
20
|
-
({ className, density, interactive, clickable, onClick, ...props }, ref) => {
|
|
21
|
+
({ className, density, interactive, clickable, onClick, asChild = false, children, ...props }, ref) => {
|
|
22
|
+
if (asChild) {
|
|
23
|
+
return /* @__PURE__ */ jsx("li", { ref, "data-slot": "list-item", className: "list-none", children: /* @__PURE__ */ jsx(
|
|
24
|
+
Slot,
|
|
25
|
+
{
|
|
26
|
+
className: cn(listItemVariants({ density, interactive: true }), className),
|
|
27
|
+
onClick,
|
|
28
|
+
...props,
|
|
29
|
+
children
|
|
30
|
+
}
|
|
31
|
+
) });
|
|
32
|
+
}
|
|
21
33
|
const isInteractive = interactive || clickable || !!onClick;
|
|
22
34
|
return /* @__PURE__ */ jsx(
|
|
23
35
|
"li",
|
|
@@ -31,7 +43,8 @@ const ListItem = React.forwardRef(
|
|
|
31
43
|
listItemVariants({ density, interactive: isInteractive }),
|
|
32
44
|
className
|
|
33
45
|
),
|
|
34
|
-
...props
|
|
46
|
+
...props,
|
|
47
|
+
children
|
|
35
48
|
}
|
|
36
49
|
);
|
|
37
50
|
}
|
|
@@ -2,8 +2,10 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
export declare const listVariants: (props?: ({
|
|
3
3
|
variant?: "default" | "bordered" | "divided" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
/** Lines between items; combines with any `variant` (e.g. bordered + divided). */
|
|
6
|
+
export declare const listDividedClass = "divide-y divide-border";
|
|
5
7
|
export declare const listItemVariants: (props?: ({
|
|
6
|
-
density?: "
|
|
8
|
+
density?: "sm" | "lg" | "default" | null | undefined;
|
|
7
9
|
interactive?: boolean | null | undefined;
|
|
8
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
11
|
export declare const listItemIconVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.styles.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;8EAWvB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;8EAmB5B,CAAC;AAEF,eAAO,MAAM,oBAAoB,oFAEhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,oFAAwB,CAAC;AAE1D,eAAO,MAAM,sBAAsB,oFAAkD,CAAC;AAEtF,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAC7D,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"List.styles.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;8EAWvB,CAAC;AAEH,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AAEzD,eAAO,MAAM,gBAAgB;;;8EAmB5B,CAAC;AAEF,eAAO,MAAM,oBAAoB,oFAEhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,oFAAwB,CAAC;AAE1D,eAAO,MAAM,sBAAsB,oFAAkD,CAAC;AAEtF,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAC7D,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ const listVariants = cva("w-full font-sans text-foreground", {
|
|
|
4
4
|
variants: {
|
|
5
5
|
variant: {
|
|
6
6
|
default: "",
|
|
7
|
-
bordered: "border border-grey-200 dark:border-grey-800 rounded-lg overflow-hidden",
|
|
7
|
+
bordered: "border border-grey-200 dark:border-grey-800 rounded-lg overflow-hidden bg-card",
|
|
8
8
|
divided: "divide-y divide-grey-200 dark:divide-grey-800"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
@@ -12,6 +12,7 @@ const listVariants = cva("w-full font-sans text-foreground", {
|
|
|
12
12
|
variant: "default"
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
+
const listDividedClass = "divide-y divide-border";
|
|
15
16
|
const listItemVariants = cva(
|
|
16
17
|
"relative flex items-center gap-3 transition-colors font-sans select-none",
|
|
17
18
|
{
|
|
@@ -22,7 +23,7 @@ const listItemVariants = cva(
|
|
|
22
23
|
lg: "py-4 px-5 text-body-1"
|
|
23
24
|
},
|
|
24
25
|
interactive: {
|
|
25
|
-
true: "cursor-pointer hover:bg-grey-100/70 dark:hover:bg-grey-800/60 active:bg-grey-200/50",
|
|
26
|
+
true: "cursor-pointer hover:bg-grey-100/70 dark:hover:bg-grey-800/60 active:bg-grey-200/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
26
27
|
false: ""
|
|
27
28
|
}
|
|
28
29
|
},
|
|
@@ -38,4 +39,4 @@ const listItemIconVariants = cva(
|
|
|
38
39
|
const listItemTextVariants = cva("flex-1 min-w-0");
|
|
39
40
|
const listItemActionVariants = cva("shrink-0 ml-auto flex items-center gap-2");
|
|
40
41
|
|
|
41
|
-
export { listItemActionVariants, listItemIconVariants, listItemTextVariants, listItemVariants, listVariants };
|
|
42
|
+
export { listDividedClass, listItemActionVariants, listItemIconVariants, listItemTextVariants, listItemVariants, listVariants };
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import type { ListVariants, ListItemVariants } from './List.styles';
|
|
3
3
|
export interface ListProps extends React.HTMLAttributes<HTMLUListElement>, ListVariants {
|
|
4
|
+
/** Lines between items (works with every variant, e.g. bordered). */
|
|
5
|
+
divided?: boolean;
|
|
4
6
|
}
|
|
5
7
|
export interface ListItemProps extends React.LiHTMLAttributes<HTMLLIElement>, ListItemVariants {
|
|
6
8
|
clickable?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Render the row as its child (e.g. a link) inside the `<li>`: the child
|
|
11
|
+
* gets the row and interactive styles, with no button role.
|
|
12
|
+
*/
|
|
13
|
+
asChild?: boolean;
|
|
7
14
|
}
|
|
8
15
|
export type ListItemIconProps = React.HTMLAttributes<HTMLDivElement>;
|
|
9
16
|
export interface ListItemTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.types.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEpE,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAC5C,YAAY;
|
|
1
|
+
{"version":3,"file":"List.types.d.ts","sourceRoot":"","sources":["../../../src/components/List/List.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEpE,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAC5C,YAAY;IACd,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAC3C,gBAAgB;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAErE,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC"}
|