rocksolidjs 0.1.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/LICENSE.txt +21 -0
- package/README.md +0 -0
- package/dist/Accordion/Accordion.d.ts +12 -0
- package/dist/Accordion/Accordion.js +1 -0
- package/dist/Accordion/index.d.ts +2 -0
- package/dist/Accordion/index.js +1 -0
- package/dist/Accordion/style.d.ts +4 -0
- package/dist/Accordion/style.js +1 -0
- package/dist/AccordionContext/AccordionContext.d.ts +10 -0
- package/dist/AccordionContext/AccordionContext.js +1 -0
- package/dist/AccordionContext/index.d.ts +1 -0
- package/dist/AccordionContext/index.js +1 -0
- package/dist/AccordionDetails/AccordionDetails.d.ts +8 -0
- package/dist/AccordionDetails/AccordionDetails.js +1 -0
- package/dist/AccordionDetails/index.d.ts +2 -0
- package/dist/AccordionDetails/index.js +1 -0
- package/dist/AccordionDetails/style.d.ts +64 -0
- package/dist/AccordionDetails/style.js +1 -0
- package/dist/AccordionSummary/AccordionSummary.d.ts +15 -0
- package/dist/AccordionSummary/AccordionSummary.js +1 -0
- package/dist/AccordionSummary/index.d.ts +2 -0
- package/dist/AccordionSummary/index.js +1 -0
- package/dist/AccordionSummary/style.d.ts +4 -0
- package/dist/AccordionSummary/style.js +1 -0
- package/dist/Alert/Alert.d.ts +26 -0
- package/dist/Alert/Alert.js +1 -0
- package/dist/Alert/index.d.ts +2 -0
- package/dist/Alert/index.js +1 -0
- package/dist/Alert/style.d.ts +82 -0
- package/dist/Alert/style.js +1 -0
- package/dist/Avatar/Avatar.d.ts +20 -0
- package/dist/Avatar/Avatar.js +1 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/Avatar/index.js +1 -0
- package/dist/Avatar/style.d.ts +130 -0
- package/dist/Avatar/style.js +1 -0
- package/dist/Backdrop/Backdrop.d.ts +7 -0
- package/dist/Backdrop/Backdrop.js +1 -0
- package/dist/Backdrop/index.d.ts +2 -0
- package/dist/Backdrop/index.js +1 -0
- package/dist/Backdrop/style.d.ts +4 -0
- package/dist/Backdrop/style.js +1 -0
- package/dist/Badge/Badge.d.ts +21 -0
- package/dist/Badge/Badge.js +1 -0
- package/dist/Badge/index.d.ts +2 -0
- package/dist/Badge/index.js +1 -0
- package/dist/Badge/style.d.ts +214 -0
- package/dist/Badge/style.js +1 -0
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +14 -0
- package/dist/Breadcrumbs/Breadcrumbs.js +1 -0
- package/dist/Breadcrumbs/index.d.ts +2 -0
- package/dist/Breadcrumbs/index.js +1 -0
- package/dist/Breadcrumbs/style.d.ts +64 -0
- package/dist/Breadcrumbs/style.js +1 -0
- package/dist/Button/Button.d.ts +24 -0
- package/dist/Button/Button.js +1 -0
- package/dist/Button/index.d.ts +2 -0
- package/dist/Button/index.js +1 -0
- package/dist/Button/style.d.ts +238 -0
- package/dist/Button/style.js +1 -0
- package/dist/Card/Card.d.ts +10 -0
- package/dist/Card/Card.js +1 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Card/index.js +1 -0
- package/dist/Card/style.d.ts +46 -0
- package/dist/Card/style.js +1 -0
- package/dist/CardContent/CardContent.d.ts +6 -0
- package/dist/CardContent/CardContent.js +1 -0
- package/dist/CardContent/index.d.ts +2 -0
- package/dist/CardContent/index.js +1 -0
- package/dist/CardContent/style.d.ts +4 -0
- package/dist/CardContent/style.js +1 -0
- package/dist/CardDescription/CardDescription.d.ts +8 -0
- package/dist/CardDescription/CardDescription.js +1 -0
- package/dist/CardDescription/index.d.ts +2 -0
- package/dist/CardDescription/index.js +1 -0
- package/dist/CardDescription/style.d.ts +4 -0
- package/dist/CardDescription/style.js +1 -0
- package/dist/CardFooter/CardFooter.d.ts +6 -0
- package/dist/CardFooter/CardFooter.js +1 -0
- package/dist/CardFooter/index.d.ts +2 -0
- package/dist/CardFooter/index.js +1 -0
- package/dist/CardFooter/style.d.ts +4 -0
- package/dist/CardFooter/style.js +1 -0
- package/dist/CardHeader/CardHeader.d.ts +6 -0
- package/dist/CardHeader/CardHeader.js +1 -0
- package/dist/CardHeader/index.d.ts +2 -0
- package/dist/CardHeader/index.js +1 -0
- package/dist/CardHeader/style.d.ts +4 -0
- package/dist/CardHeader/style.js +1 -0
- package/dist/CardTitle/CardTitle.d.ts +8 -0
- package/dist/CardTitle/CardTitle.js +1 -0
- package/dist/CardTitle/index.d.ts +2 -0
- package/dist/CardTitle/index.js +1 -0
- package/dist/CardTitle/style.d.ts +4 -0
- package/dist/CardTitle/style.js +1 -0
- package/dist/Checkbox/Checkbox.d.ts +18 -0
- package/dist/Checkbox/Checkbox.js +1 -0
- package/dist/Checkbox/index.d.ts +2 -0
- package/dist/Checkbox/index.js +1 -0
- package/dist/Checkbox/style.d.ts +88 -0
- package/dist/Checkbox/style.js +1 -0
- package/dist/Chip/Chip.d.ts +25 -0
- package/dist/Chip/Chip.js +1 -0
- package/dist/Chip/index.d.ts +2 -0
- package/dist/Chip/index.js +1 -0
- package/dist/Chip/style.d.ts +298 -0
- package/dist/Chip/style.js +1 -0
- package/dist/Dialog/Dialog.d.ts +20 -0
- package/dist/Dialog/Dialog.js +1 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Dialog/index.js +1 -0
- package/dist/Dialog/style.d.ts +34 -0
- package/dist/Dialog/style.js +1 -0
- package/dist/DialogActions/DialogActions.d.ts +7 -0
- package/dist/DialogActions/DialogActions.js +1 -0
- package/dist/DialogActions/index.d.ts +2 -0
- package/dist/DialogActions/index.js +1 -0
- package/dist/DialogActions/style.d.ts +4 -0
- package/dist/DialogActions/style.js +1 -0
- package/dist/DialogContent/DialogContent.d.ts +7 -0
- package/dist/DialogContent/DialogContent.js +1 -0
- package/dist/DialogContent/index.d.ts +2 -0
- package/dist/DialogContent/index.js +1 -0
- package/dist/DialogContent/style.d.ts +4 -0
- package/dist/DialogContent/style.js +1 -0
- package/dist/DialogTitle/DialogTitle.d.ts +8 -0
- package/dist/DialogTitle/DialogTitle.js +1 -0
- package/dist/DialogTitle/index.d.ts +2 -0
- package/dist/DialogTitle/index.js +1 -0
- package/dist/DialogTitle/style.d.ts +4 -0
- package/dist/DialogTitle/style.js +1 -0
- package/dist/Divider/Divider.d.ts +11 -0
- package/dist/Divider/Divider.js +1 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.js +1 -0
- package/dist/Divider/style.d.ts +34 -0
- package/dist/Divider/style.js +1 -0
- package/dist/IconButton/IconButton.d.ts +6 -0
- package/dist/IconButton/IconButton.js +1 -0
- package/dist/IconButton/index.d.ts +2 -0
- package/dist/IconButton/index.js +1 -0
- package/dist/IconButton/style.d.ts +40 -0
- package/dist/IconButton/style.js +1 -0
- package/dist/Input/Input.d.ts +27 -0
- package/dist/Input/Input.js +1 -0
- package/dist/Input/index.d.ts +2 -0
- package/dist/Input/index.js +1 -0
- package/dist/Input/style.d.ts +232 -0
- package/dist/Input/style.js +1 -0
- package/dist/Label/Label.d.ts +16 -0
- package/dist/Label/Label.js +1 -0
- package/dist/Label/index.d.ts +2 -0
- package/dist/Label/index.js +1 -0
- package/dist/Label/style.d.ts +118 -0
- package/dist/Label/style.js +1 -0
- package/dist/Link/Link.d.ts +15 -0
- package/dist/Link/Link.js +1 -0
- package/dist/Link/index.d.ts +2 -0
- package/dist/Link/index.js +1 -0
- package/dist/Link/style.d.ts +40 -0
- package/dist/Link/style.js +1 -0
- package/dist/Progress/Progress.d.ts +21 -0
- package/dist/Progress/Progress.js +1 -0
- package/dist/Progress/index.d.ts +2 -0
- package/dist/Progress/index.js +1 -0
- package/dist/Progress/style.d.ts +112 -0
- package/dist/Progress/style.js +1 -0
- package/dist/Radio/Radio.d.ts +19 -0
- package/dist/Radio/Radio.js +1 -0
- package/dist/Radio/index.d.ts +2 -0
- package/dist/Radio/index.js +1 -0
- package/dist/Radio/style.d.ts +76 -0
- package/dist/Radio/style.js +1 -0
- package/dist/RadioGroup/RadioGroup.d.ts +10 -0
- package/dist/RadioGroup/RadioGroup.js +1 -0
- package/dist/RadioGroup/index.d.ts +2 -0
- package/dist/RadioGroup/index.js +1 -0
- package/dist/RadioGroupContext/RadioGroupContext.d.ts +8 -0
- package/dist/RadioGroupContext/RadioGroupContext.js +1 -0
- package/dist/RadioGroupContext/index.d.ts +1 -0
- package/dist/RadioGroupContext/index.js +1 -0
- package/dist/Select/Select.d.ts +22 -0
- package/dist/Select/Select.js +1 -0
- package/dist/Select/index.d.ts +2 -0
- package/dist/Select/index.js +1 -0
- package/dist/Select/style.d.ts +124 -0
- package/dist/Select/style.js +1 -0
- package/dist/Skeleton/Skeleton.d.ts +9 -0
- package/dist/Skeleton/Skeleton.js +1 -0
- package/dist/Skeleton/index.d.ts +2 -0
- package/dist/Skeleton/index.js +1 -0
- package/dist/Skeleton/style.d.ts +34 -0
- package/dist/Skeleton/style.js +1 -0
- package/dist/Spinner/Spinner.d.ts +13 -0
- package/dist/Spinner/Spinner.js +1 -0
- package/dist/Spinner/index.d.ts +2 -0
- package/dist/Spinner/index.js +1 -0
- package/dist/Spinner/style.d.ts +112 -0
- package/dist/Spinner/style.js +1 -0
- package/dist/Switch/Switch.d.ts +23 -0
- package/dist/Switch/Switch.js +1 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/index.js +1 -0
- package/dist/Switch/style.d.ts +226 -0
- package/dist/Switch/style.js +1 -0
- package/dist/Tab/Tab.d.ts +18 -0
- package/dist/Tab/Tab.js +1 -0
- package/dist/Tab/index.d.ts +2 -0
- package/dist/Tab/index.js +1 -0
- package/dist/Tab/style.d.ts +94 -0
- package/dist/Tab/style.js +1 -0
- package/dist/TabPanel/TabPanel.d.ts +7 -0
- package/dist/TabPanel/TabPanel.js +1 -0
- package/dist/TabPanel/index.d.ts +2 -0
- package/dist/TabPanel/index.js +1 -0
- package/dist/Table/Table.d.ts +7 -0
- package/dist/Table/Table.js +1 -0
- package/dist/Table/index.d.ts +2 -0
- package/dist/Table/index.js +1 -0
- package/dist/Table/style.d.ts +4 -0
- package/dist/Table/style.js +1 -0
- package/dist/TableBody/TableBody.d.ts +4 -0
- package/dist/TableBody/TableBody.js +1 -0
- package/dist/TableBody/index.d.ts +2 -0
- package/dist/TableBody/index.js +1 -0
- package/dist/TableCell/TableCell.d.ts +11 -0
- package/dist/TableCell/TableCell.js +1 -0
- package/dist/TableCell/index.d.ts +2 -0
- package/dist/TableCell/index.js +1 -0
- package/dist/TableCell/style.d.ts +70 -0
- package/dist/TableCell/style.js +1 -0
- package/dist/TableContext/TableContext.d.ts +6 -0
- package/dist/TableContext/TableContext.js +1 -0
- package/dist/TableContext/index.d.ts +1 -0
- package/dist/TableContext/index.js +1 -0
- package/dist/TableFooter/TableFooter.d.ts +4 -0
- package/dist/TableFooter/TableFooter.js +1 -0
- package/dist/TableFooter/index.d.ts +2 -0
- package/dist/TableFooter/index.js +1 -0
- package/dist/TableFooter/style.d.ts +4 -0
- package/dist/TableFooter/style.js +1 -0
- package/dist/TableHead/TableHead.d.ts +4 -0
- package/dist/TableHead/TableHead.js +1 -0
- package/dist/TableHead/index.d.ts +2 -0
- package/dist/TableHead/index.js +1 -0
- package/dist/TableHeadContext/TableHeadContext.d.ts +5 -0
- package/dist/TableHeadContext/TableHeadContext.js +1 -0
- package/dist/TableHeadContext/index.d.ts +1 -0
- package/dist/TableHeadContext/index.js +1 -0
- package/dist/TableRow/TableRow.d.ts +7 -0
- package/dist/TableRow/TableRow.js +1 -0
- package/dist/TableRow/index.d.ts +2 -0
- package/dist/TableRow/index.js +1 -0
- package/dist/TableRow/style.d.ts +34 -0
- package/dist/TableRow/style.js +1 -0
- package/dist/Tabs/Tabs.d.ts +12 -0
- package/dist/Tabs/Tabs.js +1 -0
- package/dist/Tabs/TabsContentContext.d.ts +7 -0
- package/dist/Tabs/TabsContentContext.js +1 -0
- package/dist/Tabs/index.d.ts +2 -0
- package/dist/Tabs/index.js +1 -0
- package/dist/Tabs/style.d.ts +94 -0
- package/dist/Tabs/style.js +1 -0
- package/dist/TabsContext/TabsContext.d.ts +10 -0
- package/dist/TabsContext/TabsContext.js +1 -0
- package/dist/TabsContext/context.d.ts +8 -0
- package/dist/TabsContext/context.js +3 -0
- package/dist/TabsContext/index.d.ts +2 -0
- package/dist/TabsContext/index.js +1 -0
- package/dist/Textarea/Textarea.d.ts +16 -0
- package/dist/Textarea/Textarea.js +1 -0
- package/dist/Textarea/index.d.ts +2 -0
- package/dist/Textarea/index.js +1 -0
- package/dist/Textarea/style.d.ts +160 -0
- package/dist/Textarea/style.js +1 -0
- package/dist/ThemeProvider/ThemeContext.d.ts +8 -0
- package/dist/ThemeProvider/ThemeContext.js +1 -0
- package/dist/ThemeProvider/ThemeProvider.d.ts +8 -0
- package/dist/ThemeProvider/ThemeProvider.js +1 -0
- package/dist/ThemeProvider/componentsTV.d.ts +1498 -0
- package/dist/ThemeProvider/componentsTV.js +1 -0
- package/dist/ThemeProvider/index.d.ts +3 -0
- package/dist/ThemeProvider/index.js +1 -0
- package/dist/Typography/Typography.d.ts +15 -0
- package/dist/Typography/Typography.js +1 -0
- package/dist/Typography/index.d.ts +2 -0
- package/dist/Typography/index.js +1 -0
- package/dist/Typography/style.d.ts +154 -0
- package/dist/Typography/style.js +1 -0
- package/dist/_chunks/dist-C-sN40SQ.js +1 -0
- package/dist/icons/Alert.d.ts +3 -0
- package/dist/icons/Alert.js +1 -0
- package/dist/icons/AngleDown.d.ts +3 -0
- package/dist/icons/AngleDown.js +1 -0
- package/dist/icons/AngleUp.d.ts +3 -0
- package/dist/icons/AngleUp.js +1 -0
- package/dist/icons/CheckboxChecked.d.ts +3 -0
- package/dist/icons/CheckboxChecked.js +1 -0
- package/dist/icons/CheckboxUnchecked.d.ts +3 -0
- package/dist/icons/CheckboxUnchecked.js +1 -0
- package/dist/icons/Checkmark.d.ts +3 -0
- package/dist/icons/Checkmark.js +1 -0
- package/dist/icons/Cross.d.ts +3 -0
- package/dist/icons/Cross.js +1 -0
- package/dist/icons/Error.d.ts +3 -0
- package/dist/icons/Error.js +1 -0
- package/dist/icons/Info.d.ts +3 -0
- package/dist/icons/Info.js +1 -0
- package/dist/icons/RadioChecked.d.ts +3 -0
- package/dist/icons/RadioChecked.js +1 -0
- package/dist/icons/RadioUnchecked.d.ts +3 -0
- package/dist/icons/RadioUnchecked.js +1 -0
- package/dist/icons/Warning.d.ts +3 -0
- package/dist/icons/Warning.js +1 -0
- package/dist/index.css +6 -0
- package/dist/index.d.ts +137 -0
- package/dist/index.js +1 -0
- package/dist/styles/createTheme.d.ts +4 -0
- package/dist/styles/createTheme.js +2 -0
- package/dist/styles/index.d.ts +8 -0
- package/dist/styles/index.js +1 -0
- package/dist/styles/theme/colors.d.ts +24 -0
- package/dist/styles/theme/colors.js +1 -0
- package/dist/styles/theme/disabled.d.ts +10 -0
- package/dist/styles/theme/disabled.js +1 -0
- package/dist/styles/theme/index.d.ts +20 -0
- package/dist/styles/theme/index.js +1 -0
- package/dist/styles/theme/rounded.d.ts +11 -0
- package/dist/styles/theme/rounded.js +1 -0
- package/dist/styles/theme/shadow.d.ts +10 -0
- package/dist/styles/theme/shadow.js +1 -0
- package/dist/styles/theme/themeSchema.d.ts +4 -0
- package/dist/styles/theme/themeSchema.js +1 -0
- package/dist/styles/theme/typography.d.ts +29 -0
- package/dist/styles/theme/typography.js +1 -0
- package/dist/styles/theme/utilities.d.ts +7 -0
- package/dist/styles/theme/utilities.js +1 -0
- package/dist/styles/useTheme.d.ts +2 -0
- package/dist/styles/useTheme.js +1 -0
- package/dist/utils/asVariant.d.ts +2 -0
- package/dist/utils/asVariant.js +1 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.js +1 -0
- package/dist/utils/typedKeys.d.ts +2 -0
- package/dist/utils/typedKeys.js +1 -0
- package/package.json +257 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const spinner: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
|
|
3
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
4
|
+
base: string;
|
|
5
|
+
}>;
|
|
6
|
+
size: {
|
|
7
|
+
small: {
|
|
8
|
+
svg: string;
|
|
9
|
+
};
|
|
10
|
+
medium: {
|
|
11
|
+
svg: string;
|
|
12
|
+
};
|
|
13
|
+
large: {
|
|
14
|
+
svg: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
base: string;
|
|
19
|
+
svg: string;
|
|
20
|
+
}, undefined, {
|
|
21
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
22
|
+
base: string;
|
|
23
|
+
}>;
|
|
24
|
+
size: {
|
|
25
|
+
small: {
|
|
26
|
+
svg: string;
|
|
27
|
+
};
|
|
28
|
+
medium: {
|
|
29
|
+
svg: string;
|
|
30
|
+
};
|
|
31
|
+
large: {
|
|
32
|
+
svg: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
base: string;
|
|
37
|
+
svg: string;
|
|
38
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
39
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
40
|
+
base: string;
|
|
41
|
+
}>;
|
|
42
|
+
size: {
|
|
43
|
+
small: {
|
|
44
|
+
svg: string;
|
|
45
|
+
};
|
|
46
|
+
medium: {
|
|
47
|
+
svg: string;
|
|
48
|
+
};
|
|
49
|
+
large: {
|
|
50
|
+
svg: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
base: string;
|
|
55
|
+
svg: string;
|
|
56
|
+
}>>;
|
|
57
|
+
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
58
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
59
|
+
base: string;
|
|
60
|
+
}>;
|
|
61
|
+
size: {
|
|
62
|
+
small: {
|
|
63
|
+
svg: string;
|
|
64
|
+
};
|
|
65
|
+
medium: {
|
|
66
|
+
svg: string;
|
|
67
|
+
};
|
|
68
|
+
large: {
|
|
69
|
+
svg: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
base: string;
|
|
74
|
+
svg: string;
|
|
75
|
+
}, undefined, {
|
|
76
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
77
|
+
base: string;
|
|
78
|
+
}>;
|
|
79
|
+
size: {
|
|
80
|
+
small: {
|
|
81
|
+
svg: string;
|
|
82
|
+
};
|
|
83
|
+
medium: {
|
|
84
|
+
svg: string;
|
|
85
|
+
};
|
|
86
|
+
large: {
|
|
87
|
+
svg: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}, {
|
|
91
|
+
base: string;
|
|
92
|
+
svg: string;
|
|
93
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
94
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {
|
|
95
|
+
base: string;
|
|
96
|
+
}>;
|
|
97
|
+
size: {
|
|
98
|
+
small: {
|
|
99
|
+
svg: string;
|
|
100
|
+
};
|
|
101
|
+
medium: {
|
|
102
|
+
svg: string;
|
|
103
|
+
};
|
|
104
|
+
large: {
|
|
105
|
+
svg: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
}, {
|
|
109
|
+
base: string;
|
|
110
|
+
svg: string;
|
|
111
|
+
}>>;
|
|
112
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";import n from"../utils/asVariant.js";var r=(r=t)=>e({slots:{base:`inline-flex items-center justify-center`,svg:`animate-spin`},variants:{color:n(r.colors,e=>({base:e.ghost.text})),size:{small:{svg:`size-4`},medium:{svg:`size-6`},large:{svg:`size-8`}}}}),i=r();export{i as default,r as spinner};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps } from 'solid-js';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { ThemeColors } from '../styles/theme/colors';
|
|
4
|
+
import { default as switchDefaultStyles } from './style';
|
|
5
|
+
type SwitchVariants = VariantProps<typeof switchDefaultStyles>;
|
|
6
|
+
type SwitchSlotProps = {
|
|
7
|
+
base?: ComponentProps<"span">;
|
|
8
|
+
handle?: ComponentProps<"span">;
|
|
9
|
+
};
|
|
10
|
+
export type SwitchProps = {
|
|
11
|
+
checked?: boolean;
|
|
12
|
+
class?: string;
|
|
13
|
+
color?: keyof ThemeColors;
|
|
14
|
+
defaultChecked?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
disableTransition?: boolean;
|
|
17
|
+
id?: string;
|
|
18
|
+
onChange?: (event: Event, checked: boolean) => void;
|
|
19
|
+
size?: SwitchVariants["size"];
|
|
20
|
+
slotProps?: SwitchSlotProps;
|
|
21
|
+
} & Omit<ComponentProps<"input">, "type" | "onChange" | "size">;
|
|
22
|
+
declare const Switch: (props: SwitchProps) => import("solid-js").JSX.Element;
|
|
23
|
+
export default Switch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import{mergeProps as r,spread as i,template as a}from"solid-js/web";import{createMemo as o,createSignal as s,mergeProps as c,splitProps as l}from"solid-js";var u=a(`<span><span></span><input>`),d=a=>{let d=c({color:`default`,disableTransition:!1,size:`medium`},a),[f,p]=l(d,[`checked`,`class`,`color`,`defaultChecked`,`disabled`,`disableTransition`,`id`,`onChange`,`size`,`slotProps`,`children`,`type`,`size`]),m=n(),h=typeof f.checked==`boolean`,[g,_]=s(!!f.defaultChecked),v=o(()=>h?f.checked:g()),y=e=>{let t=e.currentTarget.checked;h||_(t),f.onChange?.(e,t)},b=o(()=>{let e={checked:v(),color:f.color,disabled:f.disabled,disableTransition:f.disableTransition,size:f.size};return m?m.componentsTV.switch(e):t(e)});return(()=>{var t=u(),n=t.firstChild,a=n.nextSibling;return i(t,r(()=>f.slotProps?.base,{get class(){return e(b().base(),f.slotProps?.base?.class)}}),!1,!0),i(n,r(()=>f.slotProps?.handle,{get class(){return e(b().handle(),f.slotProps?.handle?.class)}}),!1,!1),i(a,r(p,{get id(){return f.id},role:`switch`,type:`checkbox`,get checked(){return v()},onChange:y,get disabled(){return f.disabled},get class(){return e(b().input(),f.class)}}),!1,!1),t})()};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Switch.js";
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const switchTv: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
|
|
3
|
+
checked: {
|
|
4
|
+
true: {};
|
|
5
|
+
false: {};
|
|
6
|
+
};
|
|
7
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
8
|
+
disabled: {
|
|
9
|
+
true: {
|
|
10
|
+
base: string[];
|
|
11
|
+
};
|
|
12
|
+
false: {};
|
|
13
|
+
};
|
|
14
|
+
disableTransition: {
|
|
15
|
+
true: {};
|
|
16
|
+
false: {
|
|
17
|
+
base: string;
|
|
18
|
+
handle: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
small: {
|
|
23
|
+
base: string;
|
|
24
|
+
handle: string;
|
|
25
|
+
};
|
|
26
|
+
medium: {
|
|
27
|
+
base: string;
|
|
28
|
+
handle: string;
|
|
29
|
+
};
|
|
30
|
+
large: {
|
|
31
|
+
base: string;
|
|
32
|
+
handle: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
base: string[];
|
|
37
|
+
handle: string[];
|
|
38
|
+
input: string;
|
|
39
|
+
}, undefined, {
|
|
40
|
+
checked: {
|
|
41
|
+
true: {};
|
|
42
|
+
false: {};
|
|
43
|
+
};
|
|
44
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
45
|
+
disabled: {
|
|
46
|
+
true: {
|
|
47
|
+
base: string[];
|
|
48
|
+
};
|
|
49
|
+
false: {};
|
|
50
|
+
};
|
|
51
|
+
disableTransition: {
|
|
52
|
+
true: {};
|
|
53
|
+
false: {
|
|
54
|
+
base: string;
|
|
55
|
+
handle: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
size: {
|
|
59
|
+
small: {
|
|
60
|
+
base: string;
|
|
61
|
+
handle: string;
|
|
62
|
+
};
|
|
63
|
+
medium: {
|
|
64
|
+
base: string;
|
|
65
|
+
handle: string;
|
|
66
|
+
};
|
|
67
|
+
large: {
|
|
68
|
+
base: string;
|
|
69
|
+
handle: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
base: string[];
|
|
74
|
+
handle: string[];
|
|
75
|
+
input: string;
|
|
76
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
77
|
+
checked: {
|
|
78
|
+
true: {};
|
|
79
|
+
false: {};
|
|
80
|
+
};
|
|
81
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
82
|
+
disabled: {
|
|
83
|
+
true: {
|
|
84
|
+
base: string[];
|
|
85
|
+
};
|
|
86
|
+
false: {};
|
|
87
|
+
};
|
|
88
|
+
disableTransition: {
|
|
89
|
+
true: {};
|
|
90
|
+
false: {
|
|
91
|
+
base: string;
|
|
92
|
+
handle: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
size: {
|
|
96
|
+
small: {
|
|
97
|
+
base: string;
|
|
98
|
+
handle: string;
|
|
99
|
+
};
|
|
100
|
+
medium: {
|
|
101
|
+
base: string;
|
|
102
|
+
handle: string;
|
|
103
|
+
};
|
|
104
|
+
large: {
|
|
105
|
+
base: string;
|
|
106
|
+
handle: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
}, {
|
|
110
|
+
base: string[];
|
|
111
|
+
handle: string[];
|
|
112
|
+
input: string;
|
|
113
|
+
}>>;
|
|
114
|
+
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
115
|
+
checked: {
|
|
116
|
+
true: {};
|
|
117
|
+
false: {};
|
|
118
|
+
};
|
|
119
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
120
|
+
disabled: {
|
|
121
|
+
true: {
|
|
122
|
+
base: string[];
|
|
123
|
+
};
|
|
124
|
+
false: {};
|
|
125
|
+
};
|
|
126
|
+
disableTransition: {
|
|
127
|
+
true: {};
|
|
128
|
+
false: {
|
|
129
|
+
base: string;
|
|
130
|
+
handle: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
size: {
|
|
134
|
+
small: {
|
|
135
|
+
base: string;
|
|
136
|
+
handle: string;
|
|
137
|
+
};
|
|
138
|
+
medium: {
|
|
139
|
+
base: string;
|
|
140
|
+
handle: string;
|
|
141
|
+
};
|
|
142
|
+
large: {
|
|
143
|
+
base: string;
|
|
144
|
+
handle: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}, {
|
|
148
|
+
base: string[];
|
|
149
|
+
handle: string[];
|
|
150
|
+
input: string;
|
|
151
|
+
}, undefined, {
|
|
152
|
+
checked: {
|
|
153
|
+
true: {};
|
|
154
|
+
false: {};
|
|
155
|
+
};
|
|
156
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
157
|
+
disabled: {
|
|
158
|
+
true: {
|
|
159
|
+
base: string[];
|
|
160
|
+
};
|
|
161
|
+
false: {};
|
|
162
|
+
};
|
|
163
|
+
disableTransition: {
|
|
164
|
+
true: {};
|
|
165
|
+
false: {
|
|
166
|
+
base: string;
|
|
167
|
+
handle: string;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
size: {
|
|
171
|
+
small: {
|
|
172
|
+
base: string;
|
|
173
|
+
handle: string;
|
|
174
|
+
};
|
|
175
|
+
medium: {
|
|
176
|
+
base: string;
|
|
177
|
+
handle: string;
|
|
178
|
+
};
|
|
179
|
+
large: {
|
|
180
|
+
base: string;
|
|
181
|
+
handle: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
}, {
|
|
185
|
+
base: string[];
|
|
186
|
+
handle: string[];
|
|
187
|
+
input: string;
|
|
188
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
189
|
+
checked: {
|
|
190
|
+
true: {};
|
|
191
|
+
false: {};
|
|
192
|
+
};
|
|
193
|
+
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
194
|
+
disabled: {
|
|
195
|
+
true: {
|
|
196
|
+
base: string[];
|
|
197
|
+
};
|
|
198
|
+
false: {};
|
|
199
|
+
};
|
|
200
|
+
disableTransition: {
|
|
201
|
+
true: {};
|
|
202
|
+
false: {
|
|
203
|
+
base: string;
|
|
204
|
+
handle: string;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
size: {
|
|
208
|
+
small: {
|
|
209
|
+
base: string;
|
|
210
|
+
handle: string;
|
|
211
|
+
};
|
|
212
|
+
medium: {
|
|
213
|
+
base: string;
|
|
214
|
+
handle: string;
|
|
215
|
+
};
|
|
216
|
+
large: {
|
|
217
|
+
base: string;
|
|
218
|
+
handle: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
}, {
|
|
222
|
+
base: string[];
|
|
223
|
+
handle: string[];
|
|
224
|
+
input: string;
|
|
225
|
+
}>>;
|
|
226
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";import n from"../utils/asVariant.js";import r from"../utils/typedKeys.js";var i=(i=t)=>e({slots:{base:[`relative`,i.rounded.full,i.focusWithin],handle:[`absolute translate-y-[2px] translate-x-[2px]`,`bg-white shadow-sm`,i.rounded.full],input:`absolute inset-0 w-full h-full opacity-0 outline-none`},variants:{checked:{true:{},false:{}},color:n(i.colors,()=>({})),disabled:{true:{base:[`opacity-50`]},false:{}},disableTransition:{true:{},false:{base:`transition-background duration-300`,handle:`transition-translate duration-300`}},size:{small:{base:`w-8 h-5`,handle:`size-4`},medium:{base:`w-10 h-6`,handle:`size-5`},large:{base:`w-12 h-7`,handle:`size-6`}}},compoundVariants:[...r(i.colors).flatMap(e=>[{color:e,checked:!1,class:{base:`bg-neutral-300 dark:bg-neutral-700`}},{color:e,checked:!0,class:{base:[i.colors[e].solid.background]}}]),{checked:!0,size:`small`,class:{handle:`translate-x-[14px]`}},{checked:!0,size:`medium`,class:{handle:`translate-x-[18px]`}},{checked:!0,size:`large`,class:{handle:`translate-x-[22px]`}},{color:`default`,checked:!0,class:{handle:`dark:bg-neutral-900`}}]}),a=i();export{a as default,i as switchTv};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JSXElement } from 'solid-js';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { ButtonProps } from '../Button';
|
|
4
|
+
import { default as tabDefaultStyles } from './style';
|
|
5
|
+
type TabVariants = VariantProps<typeof tabDefaultStyles>;
|
|
6
|
+
type TabSlotProps = {
|
|
7
|
+
icon?: NonNullable<ButtonProps["slotProps"]>["startIcon"];
|
|
8
|
+
};
|
|
9
|
+
export type TabProps = {
|
|
10
|
+
class?: string;
|
|
11
|
+
icon?: JSXElement;
|
|
12
|
+
iconPosition?: TabVariants["iconPosition"];
|
|
13
|
+
label?: string;
|
|
14
|
+
value: string;
|
|
15
|
+
slotProps?: TabSlotProps;
|
|
16
|
+
} & Omit<ButtonProps, "fullWidth" | "variant" | "color" | "slotProps">;
|
|
17
|
+
declare const Tab: (props: TabProps) => import("solid-js").JSX.Element;
|
|
18
|
+
export default Tab;
|
package/dist/Tab/Tab.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import r from"../Button/Button.js";import"../Button/index.js";import{useTabsContext as i}from"../TabsContext/context.js";import{useTabsContentContext as a}from"../Tabs/TabsContentContext.js";import{createComponent as o,mergeProps as s}from"solid-js/web";import{createMemo as c,mergeProps as l,splitProps as u}from"solid-js";var d=d=>{let f=l({iconPosition:`top`},d),[p,m]=u(f,[`class`,`icon`,`iconPosition`,`label`,`value`,`slotProps`,`children`]),h=n(),g=i(`Tab`),_=a(),v=c(()=>g.activeTabValue()===p.value),y=e=>{g.handleChange(e,p.value)},b=c(()=>{let e={selected:v(),orientation:_?.orientation()??`horizontal`,iconPosition:p.iconPosition};return h?h.componentsTV.tab(e):t(e)}),x=c(()=>{let e=g.tabId();if(e)return`${e}-tabpanel-${p.value}`}),S=c(()=>{let e=g.tabId();if(e)return`${e}-tab-${p.value}`});return o(r,s({get"aria-controls"(){return x()},get"aria-selected"(){return v()},get id(){return S()},role:`tab`,get tabIndex(){return v()?0:-1}},m,{as:`button`,onClick:y,variant:`ghost`,get class(){return e(b(),p.class)},get startIcon(){return p.icon},get slotProps(){return{startIcon:p.slotProps?.icon}},get children(){return p.label}}))};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Tab.js";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const tab: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
|
|
3
|
+
iconPosition: {
|
|
4
|
+
start: "flex-row";
|
|
5
|
+
end: "flex-row-reverse";
|
|
6
|
+
top: "flex-col";
|
|
7
|
+
bottom: "flex-col-reverse";
|
|
8
|
+
};
|
|
9
|
+
orientation: {
|
|
10
|
+
horizontal: "";
|
|
11
|
+
vertical: "";
|
|
12
|
+
};
|
|
13
|
+
selected: {
|
|
14
|
+
true: "";
|
|
15
|
+
false: "";
|
|
16
|
+
};
|
|
17
|
+
}, undefined, string[], {
|
|
18
|
+
iconPosition: {
|
|
19
|
+
start: "flex-row";
|
|
20
|
+
end: "flex-row-reverse";
|
|
21
|
+
top: "flex-col";
|
|
22
|
+
bottom: "flex-col-reverse";
|
|
23
|
+
};
|
|
24
|
+
orientation: {
|
|
25
|
+
horizontal: "";
|
|
26
|
+
vertical: "";
|
|
27
|
+
};
|
|
28
|
+
selected: {
|
|
29
|
+
true: "";
|
|
30
|
+
false: "";
|
|
31
|
+
};
|
|
32
|
+
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
33
|
+
iconPosition: {
|
|
34
|
+
start: "flex-row";
|
|
35
|
+
end: "flex-row-reverse";
|
|
36
|
+
top: "flex-col";
|
|
37
|
+
bottom: "flex-col-reverse";
|
|
38
|
+
};
|
|
39
|
+
orientation: {
|
|
40
|
+
horizontal: "";
|
|
41
|
+
vertical: "";
|
|
42
|
+
};
|
|
43
|
+
selected: {
|
|
44
|
+
true: "";
|
|
45
|
+
false: "";
|
|
46
|
+
};
|
|
47
|
+
}, undefined>>;
|
|
48
|
+
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
49
|
+
iconPosition: {
|
|
50
|
+
start: "flex-row";
|
|
51
|
+
end: "flex-row-reverse";
|
|
52
|
+
top: "flex-col";
|
|
53
|
+
bottom: "flex-col-reverse";
|
|
54
|
+
};
|
|
55
|
+
orientation: {
|
|
56
|
+
horizontal: "";
|
|
57
|
+
vertical: "";
|
|
58
|
+
};
|
|
59
|
+
selected: {
|
|
60
|
+
true: "";
|
|
61
|
+
false: "";
|
|
62
|
+
};
|
|
63
|
+
}, undefined, string[], {
|
|
64
|
+
iconPosition: {
|
|
65
|
+
start: "flex-row";
|
|
66
|
+
end: "flex-row-reverse";
|
|
67
|
+
top: "flex-col";
|
|
68
|
+
bottom: "flex-col-reverse";
|
|
69
|
+
};
|
|
70
|
+
orientation: {
|
|
71
|
+
horizontal: "";
|
|
72
|
+
vertical: "";
|
|
73
|
+
};
|
|
74
|
+
selected: {
|
|
75
|
+
true: "";
|
|
76
|
+
false: "";
|
|
77
|
+
};
|
|
78
|
+
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
79
|
+
iconPosition: {
|
|
80
|
+
start: "flex-row";
|
|
81
|
+
end: "flex-row-reverse";
|
|
82
|
+
top: "flex-col";
|
|
83
|
+
bottom: "flex-col-reverse";
|
|
84
|
+
};
|
|
85
|
+
orientation: {
|
|
86
|
+
horizontal: "";
|
|
87
|
+
vertical: "";
|
|
88
|
+
};
|
|
89
|
+
selected: {
|
|
90
|
+
true: "";
|
|
91
|
+
false: "";
|
|
92
|
+
};
|
|
93
|
+
}, undefined>>;
|
|
94
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";var n=(n=t)=>e({base:[`py-2 px-4 min-w-15 min-h-8 items-center justify-center gap-y-0 gap-x-1 text-auto`,n.rounded.none],variants:{iconPosition:{start:`flex-row`,end:`flex-row-reverse`,top:`flex-col`,bottom:`flex-col-reverse`},orientation:{horizontal:``,vertical:``},selected:{true:``,false:``}},compoundVariants:[{orientation:`horizontal`,selected:!0,class:`shadow-[inset_0_-2px_0_currentColor]`},{orientation:`vertical`,selected:!0,class:[`ltr:shadow-[inset_-2px_0px_0_currentColor]`,`rtl:shadow-[inset_2px_0px_0_currentColor]`]}]}),r=n();export{r as default,n as tab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import{useTabsContext as t}from"../TabsContext/context.js";import{insert as n,mergeProps as r,spread as i,template as a}from"solid-js/web";import{createMemo as o,splitProps as s}from"solid-js";var c=a(`<div role=tabpanel>`),l=a=>{let[l,u]=s(a,[`class`,`children`,`value`]),d=t(`TabPanel`),f=o(()=>l.value===d.activeTabValue()),p=o(()=>{let e=d.tabId();if(e)return`${e}-tab-${l.value}`}),m=o(()=>{let e=d.tabId();if(e)return`${e}-tabpanel-${l.value}`});return(()=>{var t=c();return i(t,r({get"aria-labelledby"(){return p()},get id(){return m()}},u,{get hidden(){return!f()},get class(){return e(l.class)}}),!1,!0),n(t,()=>l.children),t})()};export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./TabPanel.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import{TableContext as r}from"../TableContext/TableContext.js";import"../TableContext/index.js";import{createComponent as i,insert as a,mergeProps as o,spread as s,template as c}from"solid-js/web";import{createMemo as l,mergeProps as u,splitProps as d}from"solid-js";var f=c(`<table>`),p=c=>{let p=u({dense:!1},c),[m,h]=d(p,[`children`,`class`,`dense`]),g=n(),_=l(()=>g?g.componentsTV.table():t()),v={dense:()=>m.dense};return(()=>{var t=f();return s(t,o(h,{get class(){return e(_(),m.class)}}),!1,!0),a(t,i(r.Provider,{value:v,get children(){return m.children}})),t})()};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./Table.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const table: (theme?: Theme) => import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
3
|
+
declare const _default: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, string[], {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../_chunks/dist-C-sN40SQ.js";import t from"../styles/theme/index.js";var n=(n=t)=>e({base:[`w-full border-collapse border-spacing-0 text-sm`,n.typography.colors.textPrimary]}),r=n();export{r as default,n as table};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{spread as e,template as t}from"solid-js/web";import"solid-js";var n=t(`<tbody>`),r=t=>(()=>{var r=n();return e(r,t,!1,!1),r})();export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./TableBody.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from 'solid-js';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { default as tableCellDefaultStyles } from './style';
|
|
4
|
+
type TableCellVariants = VariantProps<typeof tableCellDefaultStyles>;
|
|
5
|
+
export type TableCellProps = {
|
|
6
|
+
as?: "th" | "td";
|
|
7
|
+
class?: string;
|
|
8
|
+
align?: TableCellVariants["align"];
|
|
9
|
+
} & ComponentProps<"th" | "td">;
|
|
10
|
+
declare const TableCell: (props: TableCellProps) => import("solid-js").JSX.Element;
|
|
11
|
+
export default TableCell;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as n}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import{useTableContext as r}from"../TableContext/TableContext.js";import"../TableContext/index.js";import{useTableHeadContext as i}from"../TableHeadContext/TableHeadContext.js";import"../TableHeadContext/index.js";import{Dynamic as a,createComponent as o,mergeProps as s}from"solid-js/web";import{createMemo as c,mergeProps as l,splitProps as u}from"solid-js";var d=d=>{let f=l({align:`left`},d),[p,m]=u(f,[`align`,`as`,`class`,`children`]),h=n(),g=r(),_=i(),v=c(()=>_?.isHead||p.as===`th`?`th`:`td`),y=c(()=>{let e={align:p.align,dense:g.dense()};return h?h.componentsTV.tableCell(e):t(e)});return o(a,s({get component(){return v()}},m,{get class(){return e(y(),p.class)},get children(){return p.children}}))};export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./TableCell.js";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Theme } from '../styles/theme';
|
|
2
|
+
export declare const tableCell: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
|
|
3
|
+
dense: {
|
|
4
|
+
true: "py-1.5 px-2";
|
|
5
|
+
false: "py-3 px-3.5";
|
|
6
|
+
};
|
|
7
|
+
align: {
|
|
8
|
+
left: "text-left";
|
|
9
|
+
center: "text-center";
|
|
10
|
+
right: "text-right";
|
|
11
|
+
justify: "text-justify";
|
|
12
|
+
};
|
|
13
|
+
}, undefined, string[], {
|
|
14
|
+
dense: {
|
|
15
|
+
true: "py-1.5 px-2";
|
|
16
|
+
false: "py-3 px-3.5";
|
|
17
|
+
};
|
|
18
|
+
align: {
|
|
19
|
+
left: "text-left";
|
|
20
|
+
center: "text-center";
|
|
21
|
+
right: "text-right";
|
|
22
|
+
justify: "text-justify";
|
|
23
|
+
};
|
|
24
|
+
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
25
|
+
dense: {
|
|
26
|
+
true: "py-1.5 px-2";
|
|
27
|
+
false: "py-3 px-3.5";
|
|
28
|
+
};
|
|
29
|
+
align: {
|
|
30
|
+
left: "text-left";
|
|
31
|
+
center: "text-center";
|
|
32
|
+
right: "text-right";
|
|
33
|
+
justify: "text-justify";
|
|
34
|
+
};
|
|
35
|
+
}, undefined>>;
|
|
36
|
+
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
37
|
+
dense: {
|
|
38
|
+
true: "py-1.5 px-2";
|
|
39
|
+
false: "py-3 px-3.5";
|
|
40
|
+
};
|
|
41
|
+
align: {
|
|
42
|
+
left: "text-left";
|
|
43
|
+
center: "text-center";
|
|
44
|
+
right: "text-right";
|
|
45
|
+
justify: "text-justify";
|
|
46
|
+
};
|
|
47
|
+
}, undefined, string[], {
|
|
48
|
+
dense: {
|
|
49
|
+
true: "py-1.5 px-2";
|
|
50
|
+
false: "py-3 px-3.5";
|
|
51
|
+
};
|
|
52
|
+
align: {
|
|
53
|
+
left: "text-left";
|
|
54
|
+
center: "text-center";
|
|
55
|
+
right: "text-right";
|
|
56
|
+
justify: "text-justify";
|
|
57
|
+
};
|
|
58
|
+
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
59
|
+
dense: {
|
|
60
|
+
true: "py-1.5 px-2";
|
|
61
|
+
false: "py-3 px-3.5";
|
|
62
|
+
};
|
|
63
|
+
align: {
|
|
64
|
+
left: "text-left";
|
|
65
|
+
center: "text-center";
|
|
66
|
+
right: "text-right";
|
|
67
|
+
justify: "text-justify";
|
|
68
|
+
};
|
|
69
|
+
}, undefined>>;
|
|
70
|
+
export default _default;
|