rocksolidjs 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dist/Accordion/index.js +1 -1
- package/dist/Accordion/style.js +1 -1
- package/dist/AccordionContext/AccordionContext.js +1 -1
- package/dist/AccordionContext/index.js +1 -1
- package/dist/AccordionDetails/AccordionDetails.d.ts +2 -1
- package/dist/AccordionDetails/AccordionDetails.js +1 -1
- package/dist/AccordionDetails/index.js +1 -1
- package/dist/AccordionDetails/style.d.ts +48 -0
- package/dist/AccordionDetails/style.js +1 -1
- package/dist/AccordionSummary/AccordionSummary.d.ts +6 -4
- package/dist/AccordionSummary/AccordionSummary.js +1 -1
- package/dist/AccordionSummary/index.js +1 -1
- package/dist/AccordionSummary/style.js +1 -1
- package/dist/Alert/Alert.d.ts +8 -6
- package/dist/Alert/Alert.js +1 -1
- package/dist/Alert/index.js +1 -1
- package/dist/Alert/style.d.ts +6 -0
- package/dist/Alert/style.js +1 -1
- package/dist/Avatar/Avatar.d.ts +5 -3
- package/dist/Avatar/Avatar.js +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar/style.js +1 -1
- package/dist/Backdrop/index.js +1 -1
- package/dist/Backdrop/style.js +1 -1
- package/dist/Badge/Badge.d.ts +7 -5
- package/dist/Badge/Badge.js +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge/style.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +7 -5
- package/dist/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/Breadcrumbs/style.js +1 -1
- package/dist/Button/Button.d.ts +8 -6
- package/dist/Button/Button.js +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/Button/style.js +1 -1
- package/dist/Card/Card.js +1 -1
- package/dist/Card/index.js +1 -1
- package/dist/Card/style.js +1 -1
- package/dist/CardContent/index.js +1 -1
- package/dist/CardContent/style.js +1 -1
- package/dist/CardDescription/index.js +1 -1
- package/dist/CardDescription/style.js +1 -1
- package/dist/CardFooter/index.js +1 -1
- package/dist/CardFooter/style.d.ts +2 -2
- package/dist/CardFooter/style.js +1 -1
- package/dist/CardHeader/index.js +1 -1
- package/dist/CardHeader/style.js +1 -1
- package/dist/CardTitle/CardTitle.d.ts +4 -4
- package/dist/CardTitle/index.js +1 -1
- package/dist/CardTitle/style.js +1 -1
- package/dist/Checkbox/Checkbox.d.ts +5 -3
- package/dist/Checkbox/Checkbox.js +1 -1
- package/dist/Checkbox/index.js +1 -1
- package/dist/Checkbox/style.js +1 -1
- package/dist/Chip/Chip.d.ts +6 -4
- package/dist/Chip/Chip.js +1 -1
- package/dist/Chip/index.js +1 -1
- package/dist/Chip/style.d.ts +6 -18
- package/dist/Chip/style.js +1 -1
- package/dist/Dialog/Dialog.d.ts +7 -4
- package/dist/Dialog/Dialog.js +1 -1
- package/dist/Dialog/index.js +1 -1
- package/dist/Dialog/style.js +1 -1
- package/dist/DialogActions/index.js +1 -1
- package/dist/DialogActions/style.js +1 -1
- package/dist/DialogContent/index.js +1 -1
- package/dist/DialogContent/style.js +1 -1
- package/dist/DialogTitle/DialogTitle.d.ts +4 -4
- package/dist/DialogTitle/index.js +1 -1
- package/dist/DialogTitle/style.js +1 -1
- package/dist/Divider/Divider.d.ts +7 -0
- package/dist/Divider/Divider.js +1 -1
- package/dist/Divider/index.js +1 -1
- package/dist/Divider/style.d.ts +138 -18
- package/dist/Divider/style.js +1 -1
- package/dist/IconButton/IconButton.d.ts +4 -3
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/style.js +1 -1
- package/dist/Input/Input.d.ts +7 -5
- package/dist/Input/Input.js +1 -1
- package/dist/Input/index.js +1 -1
- package/dist/Input/style.js +1 -1
- package/dist/Label/Label.js +1 -1
- package/dist/Label/index.js +1 -1
- package/dist/Label/style.js +1 -1
- package/dist/Link/Link.js +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/Link/style.d.ts +6 -6
- package/dist/Link/style.js +1 -1
- package/dist/Progress/Progress.d.ts +7 -5
- package/dist/Progress/Progress.js +1 -1
- package/dist/Progress/index.js +1 -1
- package/dist/Progress/style.js +1 -1
- package/dist/Radio/Radio.d.ts +5 -3
- package/dist/Radio/Radio.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/Radio/style.js +1 -1
- package/dist/RadioGroup/index.js +1 -1
- package/dist/RadioGroupContext/index.js +1 -1
- package/dist/Select/Select.d.ts +10 -2
- package/dist/Select/Select.js +1 -1
- package/dist/Select/index.js +1 -1
- package/dist/Select/style.d.ts +156 -78
- package/dist/Select/style.js +1 -1
- package/dist/Skeleton/Skeleton.d.ts +2 -2
- package/dist/Skeleton/Skeleton.js +1 -1
- package/dist/Skeleton/index.js +1 -1
- package/dist/Skeleton/style.js +1 -1
- package/dist/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/Spinner.js +1 -1
- package/dist/Spinner/index.js +1 -1
- package/dist/Spinner/style.js +1 -1
- package/dist/Switch/Switch.d.ts +6 -4
- package/dist/Switch/Switch.js +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/Switch/style.js +1 -1
- package/dist/Tab/Tab.js +1 -1
- package/dist/Tab/index.js +1 -1
- package/dist/Tab/style.js +1 -1
- package/dist/TabPanel/index.js +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Table/style.js +1 -1
- package/dist/TableBody/index.js +1 -1
- package/dist/TableCell/TableCell.js +1 -1
- package/dist/TableCell/index.js +1 -1
- package/dist/TableCell/style.js +1 -1
- package/dist/TableContext/TableContext.d.ts +1 -1
- package/dist/TableContext/TableContext.js +1 -1
- package/dist/TableContext/index.js +1 -1
- package/dist/TableFooter/index.js +1 -1
- package/dist/TableFooter/style.js +1 -1
- package/dist/TableHead/index.js +1 -1
- package/dist/TableHeadContext/index.js +1 -1
- package/dist/TableRow/index.js +1 -1
- package/dist/TableRow/style.js +1 -1
- package/dist/Tabs/Tabs.js +1 -1
- package/dist/Tabs/index.js +1 -1
- package/dist/Tabs/style.js +1 -1
- package/dist/TabsContext/context.js +1 -1
- package/dist/TabsContext/index.js +1 -1
- package/dist/Textarea/Textarea.js +1 -1
- package/dist/Textarea/index.js +1 -1
- package/dist/Textarea/style.js +1 -1
- package/dist/ThemeProvider/componentsTV.d.ts +178 -58
- package/dist/ThemeProvider/index.js +1 -1
- package/dist/Typography/Typography.js +1 -1
- package/dist/Typography/index.js +1 -1
- package/dist/Typography/style.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/createTheme.js +2 -2
- package/dist/styles/index.js +1 -1
- package/dist/styles/theme/colors.js +1 -1
- package/dist/styles/theme/disabled.js +1 -1
- package/dist/styles/theme/themeSchema.js +1 -1
- package/dist/styles/theme/utilities.js +1 -1
- package/dist/styles/useTheme.js +1 -1
- package/dist/types/ExtendedComponentProps.d.ts +6 -0
- package/dist/types/ExtendedComponentProps.js +0 -0
- package/dist/types/Prettify.d.ts +3 -0
- package/dist/types/Prettify.js +0 -0
- package/dist/utils/cn.js +1 -1
- package/package.json +18 -8
- package/dist/_chunks/dist-C-sN40SQ.js +0 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ RockSolid is a modern UI component library built with **SolidJS** and **Tailwind
|
|
|
4
4
|
|
|
5
5
|
It provides accessible, customizable, and reusable components for building modern web applications.
|
|
6
6
|
|
|
7
|
+
[Read the Documentation](https://rocksolidjs.com/)
|
|
8
|
+
|
|
7
9
|
## Features
|
|
8
10
|
|
|
9
11
|
- Built with SolidJS
|
|
@@ -20,14 +22,13 @@ Before installing RockSolid, make sure your project has the following dependenci
|
|
|
20
22
|
|
|
21
23
|
- SolidJS
|
|
22
24
|
- Tailwind CSS
|
|
23
|
-
- Tailwind Variants
|
|
24
25
|
|
|
25
26
|
If you are starting a new SolidJS project, set up SolidJS and Tailwind CSS first.
|
|
26
27
|
|
|
27
28
|
Install the required dependencies:
|
|
28
29
|
|
|
29
30
|
```bash
|
|
30
|
-
npm install solid-js tailwindcss
|
|
31
|
+
npm install solid-js tailwindcss
|
|
31
32
|
```
|
|
32
33
|
|
|
33
34
|
## Installation
|
|
@@ -45,6 +46,8 @@ Import the RockSolid stylesheet into your application's global CSS file:
|
|
|
45
46
|
```css
|
|
46
47
|
@import "tailwindcss";
|
|
47
48
|
@import "rocksolidjs/index.css";
|
|
49
|
+
/* Provide the relative path of the rocksolidjs package */
|
|
50
|
+
@source "../node_modules/rocksolidjs";
|
|
48
51
|
```
|
|
49
52
|
|
|
50
53
|
Make sure Tailwind CSS is configured in your project.
|
|
@@ -83,7 +86,8 @@ RockSolid is written in TypeScript and provides type definitions for components,
|
|
|
83
86
|
|
|
84
87
|
## Documentation
|
|
85
88
|
|
|
86
|
-
For detailed information about components, theming, accessibility, and customization, see the RockSolid documentation.
|
|
89
|
+
For detailed information about components, theming, accessibility, and customization, see the [RockSolid documentation.](https://rocksolidjs.com/)
|
|
90
|
+
|
|
87
91
|
|
|
88
92
|
## License
|
|
89
93
|
|
package/dist/Accordion/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./Accordion.js";
|
|
1
|
+
import e from"./Accordion.js";export{e as default};
|
package/dist/Accordion/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`border-t border-l border-r`,`first-of-type:rounded-t-sm`,`last-of-type:border-b`,`last-of-type:rounded-b-sm`,n.divider]}),r=n();export{n as accordion,r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as e,useContext as t}from"solid-js";var n=e(),r=()=>{let e=t(n);if(!e)throw Error(`
|
|
1
|
+
import{createContext as e,useContext as t}from"solid-js";var n=e(),r=()=>{let e=t(n);if(!e)throw Error(`AccordionSummary and AccordionDetails must be used inside an Accordion component.`);return e};export{n as AccordionContext,r as useAccordionContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./AccordionContext.js";
|
|
1
|
+
import{AccordionContext as e,useAccordionContext as t}from"./AccordionContext.js";export{e as AccordionContext,t as useAccordionContext};
|
|
@@ -3,6 +3,7 @@ export type AccordionDetailsProps = {
|
|
|
3
3
|
children?: JSXElement;
|
|
4
4
|
class?: string;
|
|
5
5
|
onTransitionEnd?: (event: TransitionEvent) => void;
|
|
6
|
-
|
|
6
|
+
ref?: (element: HTMLDivElement) => void;
|
|
7
|
+
} & Omit<ComponentProps<"div">, "ref">;
|
|
7
8
|
declare const AccordionDetails: (props: AccordionDetailsProps) => import("solid-js").JSX.Element;
|
|
8
9
|
export default AccordionDetails;
|
|
@@ -1 +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{useAccordionContext as r}from"../AccordionContext/AccordionContext.js";import"../AccordionContext/index.js";import{className as i,effect as a,insert as o,mergeProps as s,spread as c,template as l,use as u}from"solid-js/web";import{createMemo as d,createRenderEffect as f,onMount as p,splitProps as m}from"solid-js";var h=l(`<div><div>`),g=l=>{let[g,_]=m(l,[`class`,`children`,`onTransitionEnd`]),v=n(),
|
|
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{useAccordionContext as r}from"../AccordionContext/AccordionContext.js";import"../AccordionContext/index.js";import{className as i,effect as a,insert as o,mergeProps as s,spread as c,template as l,use as u}from"solid-js/web";import{createMemo as d,createRenderEffect as f,onMount as p,splitProps as m}from"solid-js";var h=l(`<div><div>`),g=l=>{let[g,_]=m(l,[`class`,`children`,`onTransitionEnd`,`ref`]),v=!0,y=n(),b=r(),x,S=()=>b.isExpanded(),C=S(),w=C,T=()=>{if(b.disableTransition()||v){let e=S()?`auto`:`0px`;x&&(x.style.height=e);return}let e=S()?x?.scrollHeight??0:0;x&&(!S()&&w&&(x.style.height=`${x?.scrollHeight??0}px`),x.offsetHeight,w=!1,x.style.height=`${e}px`)},E=d(()=>{let e={expanded:C,disableTransition:b.disableTransition()};return y?y.componentsTV.accordionDetails(e):t(e)});p(()=>{T(),v=!1}),f(()=>{T()});let D=e=>{e.target===x&&e.propertyName===`height`&&S()&&(w=!0,x.style.height=`auto`),g.onTransitionEnd?.(e)},O=d(()=>{let e=b.accordionId();if(e)return{"aria-labelledby":`accordion-${e}-summary`,id:`accordion-${e}-details`,role:`region`}});return(()=>{var t=h(),n=t.firstChild;return u(e=>{x=e,g.ref?.(e)},t),c(t,s(O,_,{get class(){return e(E().base(),g.class)},onTransitionEnd:D}),!1,!0),o(n,()=>g.children),a(()=>i(n,E().content())),t})()};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./AccordionDetails.js";
|
|
1
|
+
import e from"./AccordionDetails.js";export{e as default};
|
|
@@ -6,6 +6,14 @@ export declare const accordionDetails: (theme?: Theme) => import('tailwind-varia
|
|
|
6
6
|
base: string;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
+
expanded: {
|
|
10
|
+
true: {
|
|
11
|
+
base: string;
|
|
12
|
+
};
|
|
13
|
+
false: {
|
|
14
|
+
base: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
9
17
|
}, {
|
|
10
18
|
base: string[];
|
|
11
19
|
content: string[];
|
|
@@ -16,6 +24,14 @@ export declare const accordionDetails: (theme?: Theme) => import('tailwind-varia
|
|
|
16
24
|
base: string;
|
|
17
25
|
};
|
|
18
26
|
};
|
|
27
|
+
expanded: {
|
|
28
|
+
true: {
|
|
29
|
+
base: string;
|
|
30
|
+
};
|
|
31
|
+
false: {
|
|
32
|
+
base: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
19
35
|
}, {
|
|
20
36
|
base: string[];
|
|
21
37
|
content: string[];
|
|
@@ -26,6 +42,14 @@ export declare const accordionDetails: (theme?: Theme) => import('tailwind-varia
|
|
|
26
42
|
base: string;
|
|
27
43
|
};
|
|
28
44
|
};
|
|
45
|
+
expanded: {
|
|
46
|
+
true: {
|
|
47
|
+
base: string;
|
|
48
|
+
};
|
|
49
|
+
false: {
|
|
50
|
+
base: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
29
53
|
}, {
|
|
30
54
|
base: string[];
|
|
31
55
|
content: string[];
|
|
@@ -37,6 +61,14 @@ declare const _default: import('tailwind-variants').TVReturnType<{
|
|
|
37
61
|
base: string;
|
|
38
62
|
};
|
|
39
63
|
};
|
|
64
|
+
expanded: {
|
|
65
|
+
true: {
|
|
66
|
+
base: string;
|
|
67
|
+
};
|
|
68
|
+
false: {
|
|
69
|
+
base: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
40
72
|
}, {
|
|
41
73
|
base: string[];
|
|
42
74
|
content: string[];
|
|
@@ -47,6 +79,14 @@ declare const _default: import('tailwind-variants').TVReturnType<{
|
|
|
47
79
|
base: string;
|
|
48
80
|
};
|
|
49
81
|
};
|
|
82
|
+
expanded: {
|
|
83
|
+
true: {
|
|
84
|
+
base: string;
|
|
85
|
+
};
|
|
86
|
+
false: {
|
|
87
|
+
base: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
50
90
|
}, {
|
|
51
91
|
base: string[];
|
|
52
92
|
content: string[];
|
|
@@ -57,6 +97,14 @@ declare const _default: import('tailwind-variants').TVReturnType<{
|
|
|
57
97
|
base: string;
|
|
58
98
|
};
|
|
59
99
|
};
|
|
100
|
+
expanded: {
|
|
101
|
+
true: {
|
|
102
|
+
base: string;
|
|
103
|
+
};
|
|
104
|
+
false: {
|
|
105
|
+
base: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
60
108
|
}, {
|
|
61
109
|
base: string[];
|
|
62
110
|
content: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({slots:{base:[`overflow-hidden`,n.typography.colors.textPrimary],content:[`pt-2 pb-3 px-4`,n.typography.variants.body2]},variants:{disableTransition:{true:{},false:{base:`transition-[height] duration-300`}},expanded:{true:{base:`h-auto`},false:{base:`h-0`}}}}),r=n();export{n as accordionDetails,r as default};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ComponentProps, JSXElement } from 'solid-js';
|
|
2
|
+
import { Prettify } from '../types/Prettify';
|
|
3
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
2
4
|
import { ButtonProps } from '../Button';
|
|
3
|
-
type AccordionSummarySlotProps = {
|
|
4
|
-
button?: ButtonProps
|
|
5
|
-
icon?: NonNullable<ButtonProps["slotProps"]>["endIcon"];
|
|
6
|
-
}
|
|
5
|
+
type AccordionSummarySlotProps = Prettify<{
|
|
6
|
+
button?: Prettify<ButtonProps<"button"> & WithExtendedComponentProps>;
|
|
7
|
+
icon?: NonNullable<ButtonProps<"button">["slotProps"]>["endIcon"];
|
|
8
|
+
}>;
|
|
7
9
|
export type AccordionSummaryProps = {
|
|
8
10
|
children?: JSXElement;
|
|
9
11
|
class?: string;
|
|
@@ -1 +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{useAccordionContext as r}from"../AccordionContext/AccordionContext.js";import"../AccordionContext/index.js";import i from"../Button/Button.js";import"../Button/index.js";import a from"../icons/AngleUp.js";import o from"../icons/AngleDown.js";import{createComponent as s,insert as c,mergeProps as l,spread as u,template as d}from"solid-js/web";import{createMemo as f,mergeProps as p,splitProps as m}from"solid-js";var h=d(`<div>`),g=d=>{let g=p({collapsedIcon:s(a,{class
|
|
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{useAccordionContext as r}from"../AccordionContext/AccordionContext.js";import"../AccordionContext/index.js";import"../types/Prettify.js";import"../types/ExtendedComponentProps.js";import i from"../Button/Button.js";import"../Button/index.js";import a from"../icons/AngleUp.js";import o from"../icons/AngleDown.js";import{createComponent as s,insert as c,mergeProps as l,spread as u,template as d}from"solid-js/web";import{createMemo as f,mergeProps as p,splitProps as m}from"solid-js";var h=d(`<div>`),g=d=>{let g=p({collapsedIcon:s(a,{get class(){return e(`text-lg`)}}),expandedIcon:s(o,{get class(){return e(`text-lg`)}})},d),[_,v]=m(g,[`children`,`collapsedIcon`,`expandedIcon`,`slotProps`]),y=n(),b=r(),x=f(()=>b.isExpanded()?_.expandedIcon:_.collapsedIcon),S=f(()=>y?y.componentsTV.accordionSummary():t()),C=f(()=>{let e=b.accordionId(),t={"aria-expanded":b.isExpanded()};return e?{...t,"aria-controls":`accordion-${e}-details`,id:`accordion-${e}-summary`}:t});return(()=>{var t=h();return u(t,v,!1,!0),c(t,s(i,l(C,()=>_.slotProps?.button,{get onClick(){return b.onToggleExpand},get endIcon(){return x()},get disabled(){return b.isDisabled()},variant:`ghost`,get class(){return e([S(),_.slotProps?.button?.class])},get slotProps(){return{startIcon:_.slotProps?.button?.slotProps?.startIcon,endIcon:_.slotProps?.icon}},fullWidth:!0,get children(){return _.children}}))),t})()};export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./AccordionSummary.js";
|
|
1
|
+
import e from"./AccordionSummary.js";export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`px-3 h-full min-h-10 justify-between gap-2`,`text-left rtl:text-right`,n.rounded.small]}),r=n();export{n as accordionSummary,r as default};
|
package/dist/Alert/Alert.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { ComponentProps, JSXElement, ValidComponent } from 'solid-js';
|
|
2
|
+
import { Prettify } from '../types/Prettify';
|
|
3
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
2
4
|
import { VariantProps } from 'tailwind-variants';
|
|
3
5
|
import { TypographyProps } from '../Typography';
|
|
4
6
|
import { IconButtonProps } from '../IconButton';
|
|
5
7
|
import { ThemeColors } from '../styles/theme/colors';
|
|
6
8
|
import { default as alertDefaultStyles } from './style';
|
|
7
9
|
type AlertVariants = VariantProps<typeof alertDefaultStyles>;
|
|
8
|
-
type AlertSlotProps = {
|
|
9
|
-
icon?: TypographyProps
|
|
10
|
-
content?: TypographyProps
|
|
11
|
-
action?: ComponentProps<"div">;
|
|
12
|
-
closeButton?: IconButtonProps
|
|
13
|
-
}
|
|
10
|
+
type AlertSlotProps = Prettify<{
|
|
11
|
+
icon?: Prettify<TypographyProps & WithExtendedComponentProps>;
|
|
12
|
+
content?: Prettify<TypographyProps & WithExtendedComponentProps>;
|
|
13
|
+
action?: Prettify<ComponentProps<"div"> & WithExtendedComponentProps>;
|
|
14
|
+
closeButton?: Prettify<Omit<IconButtonProps, "as"> & WithExtendedComponentProps>;
|
|
15
|
+
}>;
|
|
14
16
|
export type AlertProps<T extends ValidComponent = "div"> = {
|
|
15
17
|
action?: JSXElement;
|
|
16
18
|
as?: T;
|
package/dist/Alert/Alert.js
CHANGED
|
@@ -1 +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"../Typography/Typography.js";import"../Typography/index.js";import i from"../IconButton/IconButton.js";import"../IconButton/index.js";import a from"../icons/Alert.js";import o from"../icons/Error.js";import s from"../icons/Checkmark.js";import c from"../icons/Info.js";import l from"../icons/Warning.js";import u from"../icons/Cross.js";import{Dynamic as d,createComponent as f,insert as p,memo as m,mergeProps as h,spread as g,template as _}from"solid-js/web";import{createMemo as v,mergeProps as y,splitProps as b}from"solid-js";var x=_(`<div>`),S=_=>{let S=y({color:`default`,variant:`filled`},_),[C,w]=b(S,[`as`,`action`,`children`,`class`,`color`,`icon`,`onClose`,`slotProps`,`variant`]),T=n(),E=v(()=>{if(C.icon)return C.icon;switch(C.color){case`success`:return f(s,{});case`info`:return f(c,{});case`warning`:return f(l,{});case`error`:return f(o,{});default:return f(a,{})}}),D=v(()=>{let e={color:C.color,variant:C.variant};return T?T.componentsTV.alert(e):t(e)});return f(d,h({role:`alert`},w,{get component(){return C.as??`div`},get class(){return e(D().base(),C.class)},get children(){return[m(()=>m(()=>!!E())()?f(r,h({as:`span`},()=>
|
|
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"../types/Prettify.js";import"../types/ExtendedComponentProps.js";import r from"../Typography/Typography.js";import"../Typography/index.js";import i from"../IconButton/IconButton.js";import"../IconButton/index.js";import a from"../icons/Alert.js";import o from"../icons/Error.js";import s from"../icons/Checkmark.js";import c from"../icons/Info.js";import l from"../icons/Warning.js";import u from"../icons/Cross.js";import{Dynamic as d,createComponent as f,insert as p,memo as m,mergeProps as h,spread as g,template as _}from"solid-js/web";import{createMemo as v,mergeProps as y,splitProps as b}from"solid-js";import"tailwind-variants";var x=_(`<div>`),S=_=>{let S=y({color:`default`,variant:`filled`},_),[C,w]=b(S,[`as`,`action`,`children`,`class`,`color`,`icon`,`onClose`,`slotProps`,`variant`]),T=n(),E=v(()=>{if(C.icon!==null){if(C.icon)return C.icon;switch(C.color){case`success`:return f(s,{});case`info`:return f(c,{});case`warning`:return f(l,{});case`error`:return f(o,{});default:return f(a,{})}}}),D=v(()=>{let e={color:C.color,variant:C.variant};return T?T.componentsTV.alert(e):t(e)}),O=v(()=>C.slotProps);return f(d,h({role:`alert`},w,{get component(){return C.as??`div`},get class(){return e(D().base(),C.class)},get children(){return[m(()=>m(()=>!!E())()?f(r,h({as:`span`},()=>O()?.icon,{get class(){return e(D().icon(),O()?.icon?.class)},get children(){return E()}})):null),f(r,h({as:`div`,variant:`inherit`},()=>O()?.content,{get class(){return e(D().content(),O()?.content?.class)},get children(){return C.children}})),m(()=>m(()=>!!C.action)()?(()=>{var e=x();return g(e,h(()=>O()?.action),!1,!0),p(e,()=>C.action),e})():null),m(()=>m(()=>typeof C.onClose==`function`)()?f(i,h({"aria-label":`Close`,get color(){return C.color},size:`small`},()=>O()?.closeButton,{get onClick(){return C.onClose},get class(){return e(D().closeButton(),O()?.closeButton?.class)},get children(){return f(u,{})}})):null)]}}))};export{S as default};
|
package/dist/Alert/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./Alert.js";
|
|
1
|
+
import e from"./Alert.js";export{e as default};
|
package/dist/Alert/style.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare const alert: (theme?: Theme) => import('tailwind-variants').TVRet
|
|
|
12
12
|
base: string[];
|
|
13
13
|
content: string;
|
|
14
14
|
icon: string;
|
|
15
|
+
closeButton: string[];
|
|
15
16
|
}, undefined, {
|
|
16
17
|
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
17
18
|
variant: {
|
|
@@ -25,6 +26,7 @@ export declare const alert: (theme?: Theme) => import('tailwind-variants').TVRet
|
|
|
25
26
|
base: string[];
|
|
26
27
|
content: string;
|
|
27
28
|
icon: string;
|
|
29
|
+
closeButton: string[];
|
|
28
30
|
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
29
31
|
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
30
32
|
variant: {
|
|
@@ -38,6 +40,7 @@ export declare const alert: (theme?: Theme) => import('tailwind-variants').TVRet
|
|
|
38
40
|
base: string[];
|
|
39
41
|
content: string;
|
|
40
42
|
icon: string;
|
|
43
|
+
closeButton: string[];
|
|
41
44
|
}>>;
|
|
42
45
|
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
43
46
|
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
@@ -52,6 +55,7 @@ declare const _default: import('tailwind-variants').TVReturnType<{
|
|
|
52
55
|
base: string[];
|
|
53
56
|
content: string;
|
|
54
57
|
icon: string;
|
|
58
|
+
closeButton: string[];
|
|
55
59
|
}, undefined, {
|
|
56
60
|
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
57
61
|
variant: {
|
|
@@ -65,6 +69,7 @@ declare const _default: import('tailwind-variants').TVReturnType<{
|
|
|
65
69
|
base: string[];
|
|
66
70
|
content: string;
|
|
67
71
|
icon: string;
|
|
72
|
+
closeButton: string[];
|
|
68
73
|
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
69
74
|
color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
|
|
70
75
|
variant: {
|
|
@@ -78,5 +83,6 @@ declare const _default: import('tailwind-variants').TVReturnType<{
|
|
|
78
83
|
base: string[];
|
|
79
84
|
content: string;
|
|
80
85
|
icon: string;
|
|
86
|
+
closeButton: string[];
|
|
81
87
|
}>>;
|
|
82
88
|
export default _default;
|
package/dist/Alert/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import t from"../utils/asVariant.js";import n from"../utils/typedKeys.js";import{tv as r}from"tailwind-variants";var i=[`solid`,`filled`,`outlined`],a=(a=e)=>r({slots:{base:[`flex items-center gap-2 w-full py-2 px-3 min-w-0 min-h-10`,a.rounded.small,a.typography.variants.body2],content:`grow-1 min-w-0`,icon:`text-lg shrink-0`,closeButton:[`hover:bg-black/15 hover:dark:bg-white/15`,`active:bg-black/25 active:dark:bg-white/25`,`text-[inherit] dark:text-[inherit]`]},variants:{color:t(a.colors,()=>({})),variant:{solid:{},filled:{},outlined:{base:`border border-1`}}},compoundVariants:[...n(a.colors).flatMap(e=>i.map(t=>{let n=a.colors[e][t];return{color:e,variant:t,class:{base:[n.background,n.text,n.border]}}}))]}),o=a();export{a as alert,o as default};
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ComponentProps, ValidComponent } from 'solid-js';
|
|
2
|
+
import { Prettify } from '../types/Prettify';
|
|
3
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
2
4
|
import { VariantProps } from 'tailwind-variants';
|
|
3
5
|
import { ThemeColors } from '../styles/theme/colors';
|
|
4
6
|
import { default as avatarDefaultStyles } from './style';
|
|
5
7
|
type AvatarVariants = VariantProps<typeof avatarDefaultStyles>;
|
|
6
|
-
type AvatarSlotProps = {
|
|
7
|
-
img?: ComponentProps<"img">;
|
|
8
|
-
}
|
|
8
|
+
type AvatarSlotProps = Prettify<{
|
|
9
|
+
img?: Prettify<ComponentProps<"img"> & WithExtendedComponentProps>;
|
|
10
|
+
}>;
|
|
9
11
|
export type AvatarProps<T extends ValidComponent = "div"> = {
|
|
10
12
|
alt?: string;
|
|
11
13
|
as?: T;
|
package/dist/Avatar/Avatar.js
CHANGED
|
@@ -1 +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{Dynamic as r,createComponent as i,memo as a,mergeProps as o,spread as s,template as c}from"solid-js/web";import{createMemo as l,createSignal as u,mergeProps as d,splitProps as f}from"solid-js";var p=c(`<img>`),m=e=>e.trim().split(/\s+/).filter(Boolean).map(e=>e[0]).slice(0,2).join(``).toUpperCase(),h=c=>{let h=d({color:`default`,rounded:`full`,size:`medium`},c),[g,_]=f(h,[`as`,`alt`,`class`,`color`,`children`,`rounded`,`size`,`slotProps`,`src`]),v=n(),[y,b]=u(g.src&&typeof g.src==`string`),x=()=>m(g.alt
|
|
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"../types/Prettify.js";import"../types/ExtendedComponentProps.js";import{Dynamic as r,createComponent as i,memo as a,mergeProps as o,spread as s,template as c}from"solid-js/web";import{createMemo as l,createSignal as u,mergeProps as d,splitProps as f}from"solid-js";import"tailwind-variants";var p=c(`<img>`),m=e=>e.trim().split(/\s+/).filter(Boolean).map(e=>e[0]).slice(0,2).join(``).toUpperCase(),h=c=>{let h=d({color:`default`,rounded:`full`,size:`medium`},c),[g,_]=f(h,[`as`,`alt`,`class`,`color`,`children`,`rounded`,`size`,`slotProps`,`src`]),v=n(),[y,b]=u(g.src&&typeof g.src==`string`),x=l(()=>m(g.alt||g.children||``)),S=e=>{b(!1),g.slotProps?.img?.onError(e)},C=l(()=>{let e={rounded:g.rounded,color:g.color,size:g.size};return v?v.componentsTV.avatar(e):t(e)});return i(r,o(_,{get component(){return g.as??`div`},get class(){return e(C().base(),g.class)},get children(){return a(()=>!!y())()?(()=>{var t=p();return s(t,o(()=>g.slotProps?.img,{get src(){return g.src},get alt(){return x()},onError:S,get class(){return e(C().img(),g.slotProps?.img?.class)}}),!1,!1),t})():x()}}))};export{h as default};
|
package/dist/Avatar/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./Avatar.js";
|
|
1
|
+
import e from"./Avatar.js";export{e as default};
|
package/dist/Avatar/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import t from"../utils/asVariant.js";import{tv as n}from"tailwind-variants";var r=(r=e)=>n({slots:{base:[`size-8 grid place-items-center shrink-0 select-none`,r.typography.variants.body2],img:`w-full h-full rounded-[inherit]`},variants:{color:t(r.colors,e=>({base:[e.solid.background,e.solid.text]})),rounded:t(r.rounded,e=>({base:e})),size:{small:{base:`size-6 text-sm`},medium:{base:`size-8 text-sm`},large:{base:`size-10 text-md`}}}}),i=r();export{r as avatar,i as default};
|
package/dist/Backdrop/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./Backdrop.js";
|
|
1
|
+
import e from"./Backdrop.js";export{e as default};
|
package/dist/Backdrop/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`fixed inset-0 w-full h-full z-50`,`flex justify-center items-center`,`bg-black/50 backdrop-blur-sm`]}),r=n();export{n as backdrop,r as default};
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { ComponentProps, JSXElement
|
|
1
|
+
import { ComponentProps, JSXElement } from 'solid-js';
|
|
2
|
+
import { Prettify } from '../types/Prettify';
|
|
3
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
2
4
|
import { VariantProps } from 'tailwind-variants';
|
|
3
5
|
import { ThemeColors } from '../styles/theme/colors';
|
|
4
6
|
import { default as badgeDefaultStyles } from './style';
|
|
5
7
|
type BadgeVariants = VariantProps<typeof badgeDefaultStyles>;
|
|
6
|
-
type BadgeSlotProps = {
|
|
7
|
-
badge?: ComponentProps<"span">;
|
|
8
|
-
}
|
|
8
|
+
type BadgeSlotProps = Prettify<{
|
|
9
|
+
badge?: Prettify<ComponentProps<"span"> & WithExtendedComponentProps>;
|
|
10
|
+
}>;
|
|
9
11
|
export type BadgeProps = {
|
|
10
12
|
badgeContent?: JSXElement;
|
|
11
13
|
class?: string;
|
|
@@ -17,5 +19,5 @@ export type BadgeProps = {
|
|
|
17
19
|
};
|
|
18
20
|
slotProps?: BadgeSlotProps;
|
|
19
21
|
} & ComponentProps<"span">;
|
|
20
|
-
declare const Badge: (props:
|
|
22
|
+
declare const Badge: (props: BadgeProps) => import("solid-js").JSX.Element;
|
|
21
23
|
export default Badge;
|
package/dist/Badge/Badge.js
CHANGED
|
@@ -1 +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{insert as r,mergeProps as i,spread as a,template as o}from"solid-js/web";import{createMemo as s,mergeProps as c,splitProps as l}from"solid-js";var u=o(`<span><span>`),d=o=>{let d=c({color:`default`,overlap:`circle`},o),[f,p]=l(d,[`badgeContent`,`children`,`class`,`color`,`position`,`overlap`,`slotProps`]),m=n(),h=s(()=>f.badgeContent===void 0),g=s(()=>{let e={color:f.color,overlap:f.overlap,xPos:f.position?.x??`right`,yPos:f.position?.y??`top`,empty:h()};return m?m.componentsTV.badge(e):t(e)});return(()=>{var t=u(),n=t.firstChild;return a(t,i(p,{get class(){return e(g().base(),f.class)}}),!1,!0),r(t,()=>f.children,n),a(n,i({get"aria-hidden"(){return h()}},()=>f.slotProps?.badge,{get class(){return e(g().badge(),f.slotProps?.badge?.class)}}),!1,!0),r(n,()=>f.badgeContent),t})()};export{d as default};
|
|
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"../types/Prettify.js";import"../types/ExtendedComponentProps.js";import{insert as r,mergeProps as i,spread as a,template as o}from"solid-js/web";import{createMemo as s,mergeProps as c,splitProps as l}from"solid-js";import"tailwind-variants";var u=o(`<span><span>`),d=o=>{let d=c({color:`default`,overlap:`circle`},o),[f,p]=l(d,[`badgeContent`,`children`,`class`,`color`,`position`,`overlap`,`slotProps`]),m=n(),h=s(()=>f.badgeContent===void 0),g=s(()=>{let e={color:f.color,overlap:f.overlap,xPos:f.position?.x??`right`,yPos:f.position?.y??`top`,empty:h()};return m?m.componentsTV.badge(e):t(e)});return(()=>{var t=u(),n=t.firstChild;return a(t,i(p,{get class(){return e(g().base(),f.class)}}),!1,!0),r(t,()=>f.children,n),a(n,i({get"aria-hidden"(){return h()}},()=>f.slotProps?.badge,{get class(){return e(g().badge(),f.slotProps?.badge?.class)}}),!1,!0),r(n,()=>f.badgeContent),t})()};export{d as default};
|
package/dist/Badge/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./Badge.js";
|
|
1
|
+
import e from"./Badge.js";export{e as default};
|
package/dist/Badge/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import t from"../utils/asVariant.js";import{tv as n}from"tailwind-variants";var r=(r=e)=>n({slots:{base:`relative`,badge:[`absolute grid place-items-center leading-0 select-none`,`text-xs font-semibold`,r.rounded.full]},variants:{color:t(r.colors,e=>({badge:[e.solid.background,e.solid.text]})),yPos:{top:{badge:`top-0 -translate-y-1/2`},bottom:{badge:`bottom-0 translate-y-1/2`}},xPos:{left:{badge:`left-0 -translate-x-1/2`},right:{badge:`right-0 translate-x-1/2`}},overlap:{circle:{},rect:{}},empty:{true:{badge:`min-w-2 min-h-2 w-2 h-2`},false:{badge:[`p-1 min-w-4 min-h-4 w-fit-content h-4`,`leading-0 grid place-items-center`]}}},compoundVariants:[{overlap:`circle`,xPos:`left`,class:{badge:`left-[15%]`}},{overlap:`circle`,xPos:`right`,class:{badge:`right-[15%]`}},{overlap:`circle`,yPos:`top`,class:{badge:`top-[15%]`}},{overlap:`circle`,yPos:`bottom`,class:{badge:`bottom-[15%]`}}]}),i=r();export{r as badge,i as default};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ComponentProps, JSXElement, ValidComponent } from 'solid-js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { Prettify } from '../types/Prettify';
|
|
3
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
4
|
+
type BreadcrumbsSlotProps = Prettify<{
|
|
5
|
+
ol?: Prettify<ComponentProps<"ol"> & WithExtendedComponentProps>;
|
|
6
|
+
li?: Prettify<ComponentProps<"li"> & WithExtendedComponentProps>;
|
|
7
|
+
seperator?: Prettify<ComponentProps<"li"> & WithExtendedComponentProps>;
|
|
8
|
+
}>;
|
|
7
9
|
export type BreadcrumbsProps<T extends ValidComponent = "nav"> = {
|
|
8
10
|
as?: T;
|
|
9
11
|
class?: string;
|
|
@@ -1 +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{Dynamic as r,createComponent as i,insert as a,memo as o,mergeProps as s,
|
|
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"../types/Prettify.js";import"../types/ExtendedComponentProps.js";import{Dynamic as r,createComponent as i,insert as a,memo as o,mergeProps as s,setAttribute as c,spread as l,template as u}from"solid-js/web";import{For as d,children as f,createMemo as p,mergeProps as m,splitProps as h}from"solid-js";var g=u(`<ol>`),_=u(`<li>`),v=u=>{let v=m({seperator:`/`},u),[y,b]=h(v,[`as`,`children`,`class`,`seperator`,`slotProps`]),x=n(),S=f(()=>y.children).toArray(),C=p(()=>x?x.componentsTV.breadcrumbs():t());return i(r,s(b,{get component(){return y.as??`nav`},get class(){return e(C().base(),y.class)},get children(){var t=g();return l(t,s(()=>y.slotProps?.ol,{get class(){return e(C().ol(),y.slotProps?.ol?.class)}}),!1,!0),a(t,i(d,{each:S,children:(e,t)=>[(()=>{var t=_();return l(t,s(()=>y.slotProps?.li),!1,!0),a(t,e),t})(),o(()=>o(()=>t()!==S.length-1)()?(()=>{var e=_();return c(e,`aria-hidden`,!0),l(e,s(()=>y.slotProps?.seperator),!1,!0),a(e,()=>y.seperator),e})():null)]})),t}}))};export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./Breadcrumbs.js";
|
|
1
|
+
import e from"./Breadcrumbs.js";export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({slots:{base:[n.typography.variants.body2,n.typography.colors.textTertiary],ol:`flex items-center flex-wrap gap-2`}}),r=n();export{n as breadcrumbs,r as default};
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ComponentProps, JSXElement, ValidComponent } from 'solid-js';
|
|
2
|
+
import { Prettify } from '../types/Prettify';
|
|
3
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
2
4
|
import { VariantProps } from 'tailwind-variants';
|
|
3
5
|
import { ThemeColors } from '../styles/theme/colors';
|
|
4
6
|
import { default as buttonDefaultStyles } from './style';
|
|
5
7
|
type ButtonVariants = VariantProps<typeof buttonDefaultStyles>;
|
|
6
|
-
type ButtonSlotProps = {
|
|
7
|
-
startIcon?: ComponentProps<"span">;
|
|
8
|
-
endIcon?: ComponentProps<"span">;
|
|
9
|
-
}
|
|
10
|
-
export type ButtonProps<T extends ValidComponent = "button"
|
|
8
|
+
type ButtonSlotProps = Prettify<{
|
|
9
|
+
startIcon?: Prettify<ComponentProps<"span"> & WithExtendedComponentProps>;
|
|
10
|
+
endIcon?: Prettify<ComponentProps<"span"> & WithExtendedComponentProps>;
|
|
11
|
+
}>;
|
|
12
|
+
export type ButtonProps<T extends ValidComponent = "button"> = {
|
|
11
13
|
as?: T;
|
|
12
14
|
color?: keyof ThemeColors;
|
|
13
15
|
disabled?: ButtonVariants["disabled"];
|
|
@@ -20,5 +22,5 @@ export type ButtonProps<T extends ValidComponent = "button" | "span"> = {
|
|
|
20
22
|
children?: JSXElement;
|
|
21
23
|
class?: string;
|
|
22
24
|
} & ComponentProps<T>;
|
|
23
|
-
declare const Button: <T extends ValidComponent = "button"
|
|
25
|
+
declare const Button: <T extends ValidComponent = "button">(props: ButtonProps<T>) => import("solid-js").JSX.Element;
|
|
24
26
|
export default Button;
|
package/dist/Button/Button.js
CHANGED
|
@@ -1 +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{Dynamic as r,createComponent as i,insert as a,memo as o,mergeProps as s,spread as c,template as l}from"solid-js/web";import{
|
|
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"../types/Prettify.js";import"../types/ExtendedComponentProps.js";import{Dynamic as r,createComponent as i,insert as a,memo as o,mergeProps as s,spread as c,template as l}from"solid-js/web";import{Show as u,createMemo as d,mergeProps as f,splitProps as p}from"solid-js";import"tailwind-variants";var m=l(`<span>`),h=l=>{let h=f({as:`button`,color:`default`,variant:`solid`,size:`medium`},l),[g,_]=p(h,[`as`,`children`,`class`,`color`,`disabled`,`endIcon`,`fullWidth`,`size`,`startIcon`,`variant`,`slotProps`]),v=n(),y=d(()=>{let e={color:g.color,disabled:g.disabled,fullWidth:g.fullWidth,size:g.size,variant:g.variant};return v?v.componentsTV.button(e):t(e)});return i(r,s({get component(){return g.as||`button`}},_,{get class(){return e(y().base(),g.class)},get disabled(){return g.disabled},get children(){return[i(u,{get when(){return g.startIcon},get children(){var t=m();return c(t,s(()=>g.slotProps?.startIcon,{get class(){return e(y().startIcon(),g.slotProps?.startIcon?.class)}}),!1,!0),a(t,()=>g.startIcon),t}}),o(()=>g.children),i(u,{get when(){return g.endIcon},get children(){var t=m();return c(t,s(()=>g.slotProps?.endIcon,{get class(){return e(y().endIcon(),g.slotProps?.endIcon?.class)}}),!1,!0),a(t,()=>g.endIcon),t}})]}}))};export{h as default};
|
package/dist/Button/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./Button.js";
|
|
1
|
+
import e from"./Button.js";export{e as default};
|
package/dist/Button/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import t from"../utils/asVariant.js";import n from"../utils/typedKeys.js";import{tv as r}from"tailwind-variants";var i=Object.keys(e.colors.default),a=(a=e)=>r({slots:{base:[`inline-flex justify-center items-center gap-2`,`font-normal align-middle`,a.rounded.small,a.focus],startIcon:`leading-[1] shrink-0`,endIcon:`leading-[1] shrink-0`},variants:{color:t(a.colors,()=>({})),variant:{...t(a.colors.default,()=>``),outlined:{base:`border`}},disabled:{true:{base:`pointer-events-none`},false:{base:`cursor-pointer`}},size:{small:{base:`py-[2px] px-2 text-sm min-h-6`},medium:{base:`py-1 px-3 text-sm min-h-8`},large:{base:`py-2 px-5 text-md gap-3 min-h-10`}},fullWidth:{true:{base:`w-full`},false:``}},compoundVariants:[...n(a.colors).flatMap(e=>i.map(t=>{let n=a.colors[e][t];return[{color:e,variant:t,disabled:!1,class:{base:[n.background,n.border,n.hover,n.active,n.text]}},{color:e,variant:t,disabled:!0,class:{base:[a.disabled.text,[`outlined`].includes(t)?a.disabled.border:``,[`solid`,`filled`].includes(t)?a.disabled.background:``]}}]}).flat())]}),o=a();export{a as button,o as default};
|
package/dist/Card/Card.js
CHANGED
|
@@ -1 +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{insert as r,mergeProps as i,spread as a,template as o}from"solid-js/web";import{createMemo as s,mergeProps as c,splitProps as l}from"solid-js";var u=o(`<div>`),d=o=>{let d=c({variant:`outlined`},o),[f,p]=l(d,[`children`,`class`,`variant`]),m=n(),h=s(()=>{let e={variant:f.variant};return m?m.componentsTV.card(e):t(e)});return(()=>{var t=u();return a(t,i(p,{get class(){return e(h(),f.class)}}),!1,!0),r(t,()=>f.children),t})()};export{d as default};
|
|
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{insert as r,mergeProps as i,spread as a,template as o}from"solid-js/web";import{createMemo as s,mergeProps as c,splitProps as l}from"solid-js";import"tailwind-variants";var u=o(`<div>`),d=o=>{let d=c({variant:`outlined`},o),[f,p]=l(d,[`children`,`class`,`variant`]),m=n(),h=s(()=>{let e={variant:f.variant};return m?m.componentsTV.card(e):t(e)});return(()=>{var t=u();return a(t,i(p,{get class(){return e(h(),f.class)}}),!1,!0),r(t,()=>f.children),t})()};export{d as default};
|
package/dist/Card/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./Card.js";
|
|
1
|
+
import e from"./Card.js";export{e as default};
|
package/dist/Card/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[n.rounded.small],variants:{variant:{filled:[`bg-neutral-100 dark:bg-neutral-900`,n.typography.colors.textSecondary,n.shadow.small],elevated:[`bg-white dark:bg-neutral-800`,`dark:border dark:border-white/10`,n.shadow.medium],outlined:[`bg-transparent border overflow-hidden`,n.divider],ghost:[`bg-transparent`]}}}),r=n();export{n as card,r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./CardContent.js";
|
|
1
|
+
import e from"./CardContent.js";export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`px-4 py-2`,n.typography.variants.body2,n.typography.colors.textSecondary]}),r=n();export{n as cardContent,r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./CardDescription.js";
|
|
1
|
+
import e from"./CardDescription.js";export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`pt-1`,n.typography.variants.body2,n.typography.colors.textSecondary]}),r=n();export{n as cardDescription,r as default};
|
package/dist/CardFooter/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./CardFooter.js";
|
|
1
|
+
import e from"./CardFooter.js";export{e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Theme } from '../styles/theme';
|
|
2
|
-
export declare const cardFooter: (_theme?: Theme) => import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex items-center gap-2 px-4
|
|
3
|
-
declare const _default: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex items-center gap-2 px-4
|
|
2
|
+
export declare const cardFooter: (_theme?: Theme) => import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex items-center gap-2 px-4 pt-3 pb-4", {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
3
|
+
declare const _default: import('tailwind-variants').TVReturnType<{} | {} | {}, undefined, "flex items-center gap-2 px-4 pt-3 pb-4", {} | {}, undefined, import('tailwind-variants').TVReturnTypeLike<unknown, undefined>>;
|
|
4
4
|
export default _default;
|
package/dist/CardFooter/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:`flex items-center gap-2 px-4 pt-3 pb-4`}),r=n();export{n as cardFooter,r as default};
|
package/dist/CardHeader/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./CardHeader.js";
|
|
1
|
+
import e from"./CardHeader.js";export{e as default};
|
package/dist/CardHeader/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:`px-4 pt-4 pb-2`}),r=n();export{n as cardHeader,r as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { JSXElement } from 'solid-js';
|
|
1
|
+
import { JSXElement, ValidComponent } from 'solid-js';
|
|
2
2
|
import { TypographyProps } from '../Typography/Typography';
|
|
3
|
-
export type CardTitleProps = {
|
|
3
|
+
export type CardTitleProps<T extends ValidComponent = "h2"> = {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: JSXElement;
|
|
6
|
-
} & TypographyProps
|
|
7
|
-
declare const CardTitle: (props: CardTitleProps) => import("solid-js").JSX.Element;
|
|
6
|
+
} & TypographyProps<T>;
|
|
7
|
+
declare const CardTitle: <T extends ValidComponent = "h2">(props: CardTitleProps<T>) => import("solid-js").JSX.Element;
|
|
8
8
|
export default CardTitle;
|
package/dist/CardTitle/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./CardTitle.js";
|
|
1
|
+
import e from"./CardTitle.js";export{e as default};
|
package/dist/CardTitle/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[n.typography.variants.h5,n.typography.colors.textPrimary]}),r=n();export{n as cardTitle,r as default};
|