rocksolidjs 0.1.2 → 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/dist/AccordionContext/AccordionContext.js +1 -1
- package/dist/AccordionDetails/AccordionDetails.d.ts +2 -1
- package/dist/AccordionDetails/AccordionDetails.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/Alert/Alert.d.ts +8 -6
- package/dist/Alert/Alert.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/style.js +1 -1
- package/dist/Badge/Badge.d.ts +7 -5
- package/dist/Badge/Badge.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/Button/Button.d.ts +8 -6
- package/dist/Button/Button.js +1 -1
- package/dist/Button/style.js +1 -1
- package/dist/CardFooter/style.d.ts +2 -2
- package/dist/CardFooter/style.js +1 -1
- package/dist/CardTitle/CardTitle.d.ts +4 -4
- package/dist/Checkbox/Checkbox.d.ts +5 -3
- package/dist/Checkbox/Checkbox.js +1 -1
- package/dist/Chip/Chip.d.ts +6 -4
- package/dist/Chip/Chip.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/style.js +1 -1
- package/dist/DialogTitle/DialogTitle.d.ts +4 -4
- package/dist/Divider/Divider.d.ts +7 -0
- package/dist/Divider/Divider.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/style.js +1 -1
- package/dist/Input/Input.d.ts +7 -5
- package/dist/Input/Input.js +1 -1
- package/dist/Input/style.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/style.js +1 -1
- package/dist/Radio/Radio.d.ts +5 -3
- package/dist/Radio/Radio.js +1 -1
- package/dist/Select/Select.d.ts +10 -2
- package/dist/Select/Select.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/Spinner/Spinner.d.ts +1 -1
- package/dist/Spinner/Spinner.js +1 -1
- package/dist/Switch/Switch.d.ts +6 -4
- package/dist/Switch/Switch.js +1 -1
- package/dist/Switch/style.js +1 -1
- package/dist/Tab/style.js +1 -1
- package/dist/TableCell/TableCell.js +1 -1
- package/dist/TableContext/TableContext.d.ts +1 -1
- package/dist/TableContext/TableContext.js +1 -1
- package/dist/TabsContext/context.js +1 -1
- package/dist/ThemeProvider/componentsTV.d.ts +178 -58
- package/dist/index.js +1 -1
- package/dist/styles/createTheme.js +2 -1
- 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/package.json +11 -2
- package/dist/_chunks/createTheme-DT5vPeEE.js +0 -2
- package/dist/_chunks/themeSchema-BFl6XiaJ.js +0 -1
|
@@ -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 DialogTitleProps = {
|
|
3
|
+
export type DialogTitleProps<T extends ValidComponent = "h3"> = {
|
|
4
4
|
class?: string;
|
|
5
5
|
children?: JSXElement;
|
|
6
|
-
} & TypographyProps
|
|
7
|
-
declare const DialogTitle: (props: DialogTitleProps) => import("solid-js").JSX.Element;
|
|
6
|
+
} & TypographyProps<T>;
|
|
7
|
+
declare const DialogTitle: <T extends ValidComponent = "h3">(props: DialogTitleProps<T>) => import("solid-js").JSX.Element;
|
|
8
8
|
export default DialogTitle;
|
|
@@ -1,11 +1,18 @@
|
|
|
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 { default as dividerDefaultStyles } from './style';
|
|
4
6
|
type DividerVariants = VariantProps<typeof dividerDefaultStyles>;
|
|
7
|
+
type DividerSlotProps = Prettify<{
|
|
8
|
+
divider?: Prettify<ComponentProps<"span"> & WithExtendedComponentProps>;
|
|
9
|
+
}>;
|
|
5
10
|
export type DividerProps<T extends ValidComponent = "div"> = {
|
|
11
|
+
align?: DividerVariants["align"];
|
|
6
12
|
as?: T;
|
|
7
13
|
class?: string;
|
|
8
14
|
orientation?: DividerVariants["orientation"];
|
|
15
|
+
slotProps?: DividerSlotProps;
|
|
9
16
|
} & ComponentProps<T>;
|
|
10
17
|
declare const Divider: <T extends ValidComponent = "div">(props: DividerProps<T>) => import("solid-js").JSX.Element;
|
|
11
18
|
export default Divider;
|
package/dist/Divider/Divider.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,mergeProps as
|
|
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{Show as l,createMemo as u,mergeProps as d,splitProps as f}from"solid-js";import"tailwind-variants";var p=c(`<span>`),m=c=>{let m=d({align:`center`,orientation:`horizontal`},c),[h,g]=f(m,[`align`,`as`,`class`,`children`,`orientation`,`slotProps`]),_=n(),v=u(()=>!!h.children),y=u(()=>{let e={align:h.align,hasChildren:v(),orientation:h.orientation};return _?_.componentsTV.divider(e):t(e)});return i(r,o({role:`separator`,get"aria-orientation"(){return h.orientation===`horizontal`?`horizontal`:`vertical`}},g,{get component(){return h.as||`div`},get class(){return e(y().base(),h.class)},get children(){return[(()=>{var t=p();return s(t,o(()=>h.slotProps?.divider,{get class(){return e(y().divider(),y().beforeDivider(),h.slotProps?.divider?.class)}}),!1,!1),t})(),i(l,{get when(){return v()},get children(){return[a(()=>h.children),(()=>{var t=p();return s(t,o(()=>h.slotProps?.divider,{get class(){return e(y().divider(),y().afterDivider(),h.slotProps?.divider?.class)}}),!1,!1),t})()]}})]}}))};export{m as default};
|
package/dist/Divider/style.d.ts
CHANGED
|
@@ -1,34 +1,154 @@
|
|
|
1
1
|
import { Theme } from '../styles/theme';
|
|
2
2
|
export declare const divider: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
|
|
3
|
+
align: {
|
|
4
|
+
start: {};
|
|
5
|
+
center: {};
|
|
6
|
+
end: {};
|
|
7
|
+
};
|
|
8
|
+
hasChildren: {
|
|
9
|
+
true: {};
|
|
10
|
+
false: {};
|
|
11
|
+
};
|
|
3
12
|
orientation: {
|
|
4
|
-
horizontal:
|
|
5
|
-
|
|
13
|
+
horizontal: {
|
|
14
|
+
base: string;
|
|
15
|
+
divider: string;
|
|
16
|
+
};
|
|
17
|
+
vertical: {
|
|
18
|
+
base: string;
|
|
19
|
+
divider: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
base: string[];
|
|
24
|
+
divider: string[];
|
|
25
|
+
beforeDivider: string;
|
|
26
|
+
afterDivider: string;
|
|
27
|
+
}, undefined, {
|
|
28
|
+
align: {
|
|
29
|
+
start: {};
|
|
30
|
+
center: {};
|
|
31
|
+
end: {};
|
|
32
|
+
};
|
|
33
|
+
hasChildren: {
|
|
34
|
+
true: {};
|
|
35
|
+
false: {};
|
|
6
36
|
};
|
|
7
|
-
}, undefined, string[], {
|
|
8
37
|
orientation: {
|
|
9
|
-
horizontal:
|
|
10
|
-
|
|
38
|
+
horizontal: {
|
|
39
|
+
base: string;
|
|
40
|
+
divider: string;
|
|
41
|
+
};
|
|
42
|
+
vertical: {
|
|
43
|
+
base: string;
|
|
44
|
+
divider: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}, {
|
|
48
|
+
base: string[];
|
|
49
|
+
divider: string[];
|
|
50
|
+
beforeDivider: string;
|
|
51
|
+
afterDivider: string;
|
|
52
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
53
|
+
align: {
|
|
54
|
+
start: {};
|
|
55
|
+
center: {};
|
|
56
|
+
end: {};
|
|
57
|
+
};
|
|
58
|
+
hasChildren: {
|
|
59
|
+
true: {};
|
|
60
|
+
false: {};
|
|
11
61
|
};
|
|
12
|
-
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
13
62
|
orientation: {
|
|
14
|
-
horizontal:
|
|
15
|
-
|
|
63
|
+
horizontal: {
|
|
64
|
+
base: string;
|
|
65
|
+
divider: string;
|
|
66
|
+
};
|
|
67
|
+
vertical: {
|
|
68
|
+
base: string;
|
|
69
|
+
divider: string;
|
|
70
|
+
};
|
|
16
71
|
};
|
|
17
|
-
},
|
|
72
|
+
}, {
|
|
73
|
+
base: string[];
|
|
74
|
+
divider: string[];
|
|
75
|
+
beforeDivider: string;
|
|
76
|
+
afterDivider: string;
|
|
77
|
+
}>>;
|
|
18
78
|
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
79
|
+
align: {
|
|
80
|
+
start: {};
|
|
81
|
+
center: {};
|
|
82
|
+
end: {};
|
|
83
|
+
};
|
|
84
|
+
hasChildren: {
|
|
85
|
+
true: {};
|
|
86
|
+
false: {};
|
|
87
|
+
};
|
|
19
88
|
orientation: {
|
|
20
|
-
horizontal:
|
|
21
|
-
|
|
89
|
+
horizontal: {
|
|
90
|
+
base: string;
|
|
91
|
+
divider: string;
|
|
92
|
+
};
|
|
93
|
+
vertical: {
|
|
94
|
+
base: string;
|
|
95
|
+
divider: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
}, {
|
|
99
|
+
base: string[];
|
|
100
|
+
divider: string[];
|
|
101
|
+
beforeDivider: string;
|
|
102
|
+
afterDivider: string;
|
|
103
|
+
}, undefined, {
|
|
104
|
+
align: {
|
|
105
|
+
start: {};
|
|
106
|
+
center: {};
|
|
107
|
+
end: {};
|
|
108
|
+
};
|
|
109
|
+
hasChildren: {
|
|
110
|
+
true: {};
|
|
111
|
+
false: {};
|
|
22
112
|
};
|
|
23
|
-
}, undefined, string[], {
|
|
24
113
|
orientation: {
|
|
25
|
-
horizontal:
|
|
26
|
-
|
|
114
|
+
horizontal: {
|
|
115
|
+
base: string;
|
|
116
|
+
divider: string;
|
|
117
|
+
};
|
|
118
|
+
vertical: {
|
|
119
|
+
base: string;
|
|
120
|
+
divider: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
}, {
|
|
124
|
+
base: string[];
|
|
125
|
+
divider: string[];
|
|
126
|
+
beforeDivider: string;
|
|
127
|
+
afterDivider: string;
|
|
128
|
+
}, import('tailwind-variants').TVReturnTypeLike<{
|
|
129
|
+
align: {
|
|
130
|
+
start: {};
|
|
131
|
+
center: {};
|
|
132
|
+
end: {};
|
|
133
|
+
};
|
|
134
|
+
hasChildren: {
|
|
135
|
+
true: {};
|
|
136
|
+
false: {};
|
|
27
137
|
};
|
|
28
|
-
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
29
138
|
orientation: {
|
|
30
|
-
horizontal:
|
|
31
|
-
|
|
139
|
+
horizontal: {
|
|
140
|
+
base: string;
|
|
141
|
+
divider: string;
|
|
142
|
+
};
|
|
143
|
+
vertical: {
|
|
144
|
+
base: string;
|
|
145
|
+
divider: string;
|
|
146
|
+
};
|
|
32
147
|
};
|
|
33
|
-
},
|
|
148
|
+
}, {
|
|
149
|
+
base: string[];
|
|
150
|
+
divider: string[];
|
|
151
|
+
beforeDivider: string;
|
|
152
|
+
afterDivider: string;
|
|
153
|
+
}>>;
|
|
34
154
|
export default _default;
|
package/dist/Divider/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({slots:{base:[`flex items-center gap-1.5`,n.typography.colors.textPrimary,n.typography.variants.body2],divider:[n.divider],beforeDivider:``,afterDivider:``},variants:{align:{start:{},center:{},end:{}},hasChildren:{true:{},false:{}},orientation:{horizontal:{base:`w-full`,divider:`border-t`},vertical:{base:`flex-col h-auto self-stretch`,divider:`border-l`}}},compoundVariants:[{hasChildren:!0,orientation:`horizontal`,align:`start`,class:{beforeDivider:`w-[10%]`,afterDivider:`w-[90%]`}},{hasChildren:!0,orientation:`horizontal`,align:`center`,class:{beforeDivider:`w-[50%]`,afterDivider:`w-[50%]`}},{hasChildren:!0,orientation:`horizontal`,align:`end`,class:{beforeDivider:`w-[90%]`,afterDivider:`w-[10%]`}},{hasChildren:!0,orientation:`vertical`,align:`start`,class:{beforeDivider:`h-[10%]`,afterDivider:`h-[90%]`}},{hasChildren:!0,orientation:`vertical`,align:`center`,class:{beforeDivider:`h-[50%]`,afterDivider:`h-[50%]`}},{hasChildren:!0,orientation:`vertical`,align:`end`,class:{beforeDivider:`h-[90%]`,afterDivider:`h-[10%]`}},{hasChildren:!1,orientation:`horizontal`,class:{beforeDivider:`w-full`}},{hasChildren:!1,orientation:`vertical`,class:{beforeDivider:`h-full`}}]}),r=n();export{r as default,n as divider};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ValidComponent } from 'solid-js';
|
|
1
2
|
import { ButtonProps } from '../Button';
|
|
2
|
-
export type IconButtonProps = {
|
|
3
|
+
export type IconButtonProps<T extends ValidComponent = "button"> = {
|
|
3
4
|
class?: string;
|
|
4
|
-
} & Omit<ButtonProps
|
|
5
|
-
declare const IconButton: (props: IconButtonProps) => import("solid-js").JSX.Element;
|
|
5
|
+
} & Omit<ButtonProps<T>, "fullWidth" | "startIcon" | "endIcon" | "variant" | "slotProps">;
|
|
6
|
+
declare const IconButton: <T extends ValidComponent = "button">(props: IconButtonProps<T>) => import("solid-js").JSX.Element;
|
|
6
7
|
export default IconButton;
|
package/dist/IconButton/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`px-0 py-0 min-h-[initial]`,`flex justify-center items-center shrink-0`,n.rounded.full],variants:{size:{small:`size-6 text-lg`,medium:`size-8 text-2xl`,large:`size-10 text-3xl`}}}),r=n();export{r as default,n as iconButton};
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`px-0 py-0 min-h-[initial]`,`inline-flex justify-center items-center shrink-0`,n.rounded.full],variants:{size:{small:`size-6 text-lg`,medium:`size-8 text-2xl`,large:`size-10 text-3xl`}}}),r=n();export{r as default,n as iconButton};
|
package/dist/Input/Input.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ComponentProps, JSX } from 'solid-js';
|
|
2
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { Prettify } from '../types/Prettify';
|
|
4
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
3
5
|
import { ThemeColors } from '../styles/theme/colors';
|
|
4
6
|
import { default as inputDefaultStyles } from './style';
|
|
5
7
|
type InputVariants = VariantProps<typeof inputDefaultStyles>;
|
|
6
|
-
type InputSlotProps = {
|
|
7
|
-
base?: ComponentProps<"div">;
|
|
8
|
-
prefix?: ComponentProps<"span">;
|
|
9
|
-
suffix?: ComponentProps<"span">;
|
|
10
|
-
}
|
|
8
|
+
type InputSlotProps = Prettify<{
|
|
9
|
+
base?: Prettify<ComponentProps<"div"> & WithExtendedComponentProps>;
|
|
10
|
+
prefix?: Prettify<ComponentProps<"span"> & WithExtendedComponentProps>;
|
|
11
|
+
suffix?: Prettify<ComponentProps<"span"> & WithExtendedComponentProps>;
|
|
12
|
+
}>;
|
|
11
13
|
type InputTypes = "number" | "search" | "time" | "image" | "text" | "color" | "date" | "datetime-local" | "email" | "file" | "month" | "password" | "tel" | "url" | "week";
|
|
12
14
|
export type InputProps = {
|
|
13
15
|
class?: string;
|
package/dist/Input/Input.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{
|
|
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{createComponent as r,insert as i,mergeProps as a,spread as o,template as s}from"solid-js/web";import{Show as c,createMemo as l,mergeProps as u,splitProps as d}from"solid-js";import"tailwind-variants";var f=s(`<span>`),p=s(`<div><input>`),m=s=>{let m=u({color:`default`,disabled:!1,variant:`outlined`,size:`medium`,type:`text`},s),[h,g]=d(m,[`class`,`color`,`disabled`,`fullWidth`,`inputSize`,`prefix`,`size`,`slotProps`,`suffix`,`type`,`variant`,`children`]),_=n(),v=l(()=>{let e={color:h.color,disabled:h.disabled,variant:h.variant,size:h.size,fullWidth:h.fullWidth};return _?_.componentsTV.input(e):t(e)});return(()=>{var t=p(),n=t.firstChild;return o(t,a(()=>h.slotProps?.base,{get class(){return e(v().base(),h.slotProps?.base?.class)}}),!1,!0),i(t,r(c,{get when(){return h.prefix},get children(){var t=f();return o(t,a(()=>h.slotProps?.prefix,{get class(){return e(v().prefix(),h.slotProps?.prefix?.class)}}),!1,!0),i(t,()=>h.prefix),t}}),n),o(n,a(g,{get type(){return h.type},get disabled(){return h.disabled},get size(){return h.inputSize},get class(){return e(v().input(),h.class)}}),!1,!1),i(t,r(c,{get when(){return h.suffix},get children(){var t=f();return o(t,a(()=>h.slotProps?.suffix,{get class(){return e(v().suffix(),h.slotProps?.suffix?.class)}}),!1,!0),i(t,()=>h.suffix),t}}),null),t})()};export{m as default};
|
package/dist/Input/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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=[`filled`,`outlined`,`ghost`],a=(a=e)=>r({slots:{base:[`inline-flex items-center overflow-hidden`,a.rounded.small,a.focusWithin],input:[`w-full h-full border-0 outline-0`],prefix:`leading-1 shrink-0 ps-1.5 pe-1`,suffix:`leading-1 shrink-0 ps-1 pe-1.5`},variants:{color:t(a.colors,()=>``),disabled:{true:{},false:{}},fullWidth:{true:{base:`w-full`},false:{}},size:{small:{base:`h-6 text-sm`,input:`py-1 px-1.5`},medium:{base:`h-8 text-sm`,input:`py-1 px-1.5`},large:{base:`h-10 text-md`,input:`py-1.5 px-2`}},variant:{filled:{},ghost:{},outlined:{base:`border border-1`}}},compoundVariants:[...n(a.colors).flatMap(e=>i.flatMap(t=>{let n=a.colors[e][t];return[{color:e,disabled:!1,variant:t,class:{base:[n.background,n.border,n.text],prefix:[n.text],suffix:[n.text]}},{color:e,disabled:!0,variant:t,class:{base:[t===`filled`?a.disabled.background:``,t===`outlined`?a.disabled.border:``,a.disabled.text],prefix:[a.disabled.text],suffix:[a.disabled.text]}}]}))]}),o=a();export{o as default,a as input};
|
|
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=[`filled`,`outlined`,`ghost`],a=(a=e)=>r({slots:{base:[`inline-flex items-center overflow-hidden`,a.rounded.small,a.focusWithin],input:[`w-full h-full border-0 outline-0`],prefix:`leading-[1] shrink-0 ps-1.5 pe-1`,suffix:`leading-[1] shrink-0 ps-1 pe-1.5`},variants:{color:t(a.colors,()=>``),disabled:{true:{},false:{}},fullWidth:{true:{base:`w-full`},false:{}},size:{small:{base:`h-6 text-sm`,input:`py-1 px-1.5`},medium:{base:`h-8 text-sm`,input:`py-1 px-1.5`},large:{base:`h-10 text-md`,input:`py-1.5 px-2`}},variant:{filled:{},ghost:{},outlined:{base:`border border-1`}}},compoundVariants:[...n(a.colors).flatMap(e=>i.flatMap(t=>{let n=a.colors[e][t];return[{color:e,disabled:!1,variant:t,class:{base:[n.background,n.border,n.text],prefix:[n.text],suffix:[n.text]}},{color:e,disabled:!0,variant:t,class:{base:[t===`filled`?a.disabled.background:``,t===`outlined`?a.disabled.border:``,a.disabled.text],prefix:[a.disabled.text],suffix:[a.disabled.text]}}]}))]}),o=a();export{o as default,a as input};
|
package/dist/Link/style.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { Theme } from '../styles/theme';
|
|
2
2
|
export declare const link: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
|
|
3
3
|
underline: {
|
|
4
|
-
none: "";
|
|
4
|
+
none: "no-underline";
|
|
5
5
|
hover: "hover:underline";
|
|
6
6
|
always: "underline";
|
|
7
7
|
};
|
|
8
8
|
}, undefined, string[], {
|
|
9
9
|
underline: {
|
|
10
|
-
none: "";
|
|
10
|
+
none: "no-underline";
|
|
11
11
|
hover: "hover:underline";
|
|
12
12
|
always: "underline";
|
|
13
13
|
};
|
|
14
14
|
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
15
15
|
underline: {
|
|
16
|
-
none: "";
|
|
16
|
+
none: "no-underline";
|
|
17
17
|
hover: "hover:underline";
|
|
18
18
|
always: "underline";
|
|
19
19
|
};
|
|
20
20
|
}, undefined>>;
|
|
21
21
|
declare const _default: import('tailwind-variants').TVReturnType<{
|
|
22
22
|
underline: {
|
|
23
|
-
none: "";
|
|
23
|
+
none: "no-underline";
|
|
24
24
|
hover: "hover:underline";
|
|
25
25
|
always: "underline";
|
|
26
26
|
};
|
|
27
27
|
}, undefined, string[], {
|
|
28
28
|
underline: {
|
|
29
|
-
none: "";
|
|
29
|
+
none: "no-underline";
|
|
30
30
|
hover: "hover:underline";
|
|
31
31
|
always: "underline";
|
|
32
32
|
};
|
|
33
33
|
}, undefined, import('tailwind-variants').TVReturnTypeLike<{
|
|
34
34
|
underline: {
|
|
35
|
-
none: "";
|
|
35
|
+
none: "no-underline";
|
|
36
36
|
hover: "hover:underline";
|
|
37
37
|
always: "underline";
|
|
38
38
|
};
|
package/dist/Link/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`block`,n.rounded.small,n.focus],variants:{underline:{none
|
|
1
|
+
import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`block`,n.rounded.small,n.focus],variants:{underline:{none:`no-underline`,hover:`hover:underline`,always:`underline`}}}),r=n();export{r as default,n as link};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ComponentProps, JSX } from 'solid-js';
|
|
2
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { Prettify } from '../types/Prettify';
|
|
4
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
3
5
|
import { ThemeColors } from '../styles/theme/colors';
|
|
4
6
|
import { default as progressDefaultStyles } from './style';
|
|
5
7
|
type ProgressVariants = VariantProps<typeof progressDefaultStyles>;
|
|
6
|
-
type ProgressSlotProps = {
|
|
7
|
-
fill?: {
|
|
8
|
+
type ProgressSlotProps = Prettify<{
|
|
9
|
+
fill?: Prettify<{
|
|
8
10
|
style?: JSX.CSSProperties;
|
|
9
|
-
} & Omit<ComponentProps<"span">, "style">;
|
|
10
|
-
}
|
|
11
|
+
} & Omit<ComponentProps<"span">, "style"> & WithExtendedComponentProps>;
|
|
12
|
+
}>;
|
|
11
13
|
export type ProgressProps = {
|
|
12
14
|
class?: string;
|
|
13
15
|
color?: keyof ThemeColors;
|
|
@@ -16,6 +18,6 @@ export type ProgressProps = {
|
|
|
16
18
|
value?: number;
|
|
17
19
|
size?: ProgressVariants["size"];
|
|
18
20
|
slotProps?: ProgressSlotProps;
|
|
19
|
-
} &
|
|
21
|
+
} & ComponentProps<"div">;
|
|
20
22
|
declare const Progress: (props: ProgressProps) => JSX.Element;
|
|
21
23
|
export default Progress;
|
|
@@ -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{mergeProps as r,spread as i,template as a}from"solid-js/web";import{createMemo as o,mergeProps as s,splitProps as c}from"solid-js";import"tailwind-variants";var l=a(`<div role=progressbar><span>`),u=a=>{let u=s({color:`default`,max:100,min:0,size:`medium`},a),[d,f]=c(u,[`color`,`class`,`max`,`min`,`slotProps`,`size`,`value`,`children`]),p=n(),m=o(()=>{let e=d.min,t=d.max,n=d.value;return Math.min(100,Math.max(0,(n-e)/(t-e)*100))}),h=o(()=>{let e={color:d.color,size:d.size};return p?p.componentsTV.progress(e):t(e)});return(()=>{var t=l(),n=t.firstChild;return i(t,r({get"aria-valuemax"(){return d.max},get"aria-valuemin"(){return d.min},get"aria-valuenow"(){return d.value}},f,{get class(){return e(h().base(),d.class)}}),!1,!0),i(n,r(()=>d.slotProps?.fill,{get class(){return e(h().fill(),d.slotProps?.fill?.class)},get style(){return{...d.slotProps?.fill?.style,width:`${m()}%`}}}),!1,!1),t})()};export{u 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{mergeProps as r,spread as i,template as a}from"solid-js/web";import{createMemo as o,mergeProps as s,splitProps as c}from"solid-js";import"tailwind-variants";var l=a(`<div role=progressbar><span>`),u=a=>{let u=s({color:`default`,max:100,min:0,value:0,size:`medium`},a),[d,f]=c(u,[`color`,`class`,`max`,`min`,`slotProps`,`size`,`value`,`children`]),p=n(),m=o(()=>{let e=d.min,t=d.max,n=d.value;return Math.min(100,Math.max(0,(n-e)/(t-e)*100))}),h=o(()=>{let e={color:d.color,size:d.size};return p?p.componentsTV.progress(e):t(e)});return(()=>{var t=l(),n=t.firstChild;return i(t,r({get"aria-valuemax"(){return d.max},get"aria-valuemin"(){return d.min},get"aria-valuenow"(){return d.value}},f,{get class(){return e(h().base(),d.class)}}),!1,!0),i(n,r(()=>d.slotProps?.fill,{get class(){return e(h().fill(),d.slotProps?.fill?.class)},get style(){return{...d.slotProps?.fill?.style,width:`${m()}%`}}}),!1,!1),t})()};export{u as default};
|
package/dist/Progress/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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:[`block w-full overflow-hidden`,`bg-neutral-300 dark:bg-neutral-700`,r.rounded.
|
|
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:[`block w-full overflow-hidden`,`bg-neutral-300 dark:bg-neutral-700`,r.rounded.full],fill:[`block h-full rounded-[inherit]`,`transition-[width] duration-150`]},variants:{color:t(r.colors,e=>({fill:[e.solid.background]})),size:{small:{base:`h-1`},medium:{base:`h-2`},large:{base:`h-4`}}}}),i=r();export{i as default,r as progress};
|
package/dist/Radio/Radio.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ComponentProps } from 'solid-js';
|
|
2
|
+
import { Prettify } from '../types/Prettify';
|
|
3
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
2
4
|
import { IconButtonProps } from '../IconButton';
|
|
3
|
-
type RadioSlotProps = {
|
|
4
|
-
base?: ComponentProps<"span">;
|
|
5
|
-
}
|
|
5
|
+
type RadioSlotProps = Prettify<{
|
|
6
|
+
base?: Prettify<ComponentProps<"span"> & WithExtendedComponentProps>;
|
|
7
|
+
}>;
|
|
6
8
|
export type RadioProps = {
|
|
7
9
|
class?: string;
|
|
8
10
|
checked?: boolean;
|
package/dist/Radio/Radio.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"../IconButton/IconButton.js";import"../IconButton/index.js";import{useRadioGroupContext as i}from"../RadioGroupContext/RadioGroupContext.js";import"../RadioGroupContext/index.js";import a from"../icons/RadioChecked.js";import o from"../icons/RadioUnchecked.js";import{createComponent as s,memo as c,mergeProps as l,spread as u,template as d}from"solid-js/web";import{createMemo as f,createSignal as p,splitProps as m}from"solid-js";var h=d(`<input>`),g=d=>{let[g,_]=m(d,[`checked`,`class`,`color`,`defaultChecked`,`disabled`,`name`,`onChange`,`size`,`slotProps`,`value`,`children`]),v=n(),y=i(),b=typeof g.checked==`boolean`,[x,S]=p(!!g.defaultChecked),C=f(()=>y?y.value()===g.value:b?g.checked:x()),w=e=>{let t=e.target,n=t.checked,r=t.value;!y&&!b&&S(n),g.onChange?.(e),y?.onChange(e,r)},T=f(()=>{let e={checked:C(),disabled:g.disabled};return v?v.componentsTV.radio(e):t(e)});return s(r,l(()=>g.slotProps?.base,{as:`span`,get class(){return e(T().base(),g.slotProps?.base?.class)},get color(){return g.color},get size(){return g.size},get disabled(){return g.disabled},get children(){return[c(()=>c(()=>!!C())()?s(a,{}):s(o,{})),(()=>{var t=h();return u(t,l({get name(){return y?.name?.()??g.name}},_,{type:`radio`,get checked(){return C()},onChange:w,get disabled(){return g.disabled},get value(){return g.value},get class(){return e(T().input(),g.class)}}),!1,!1),t})()]}}))};export{g 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 r from"../IconButton/IconButton.js";import"../IconButton/index.js";import{useRadioGroupContext as i}from"../RadioGroupContext/RadioGroupContext.js";import"../RadioGroupContext/index.js";import a from"../icons/RadioChecked.js";import o from"../icons/RadioUnchecked.js";import{createComponent as s,memo as c,mergeProps as l,spread as u,template as d}from"solid-js/web";import{createMemo as f,createSignal as p,splitProps as m}from"solid-js";var h=d(`<input>`),g=d=>{let[g,_]=m(d,[`checked`,`class`,`color`,`defaultChecked`,`disabled`,`name`,`onChange`,`size`,`slotProps`,`value`,`children`]),v=n(),y=i(),b=typeof g.checked==`boolean`,[x,S]=p(!!g.defaultChecked),C=f(()=>y?y.value()===g.value:b?g.checked:x()),w=e=>{let t=e.target,n=t.checked,r=t.value;!y&&!b&&S(n),g.onChange?.(e),y?.onChange(e,r)},T=f(()=>{let e={checked:C(),disabled:g.disabled};return v?v.componentsTV.radio(e):t(e)});return s(r,l(()=>g.slotProps?.base,{as:`span`,get class(){return e(T().base(),g.slotProps?.base?.class)},get color(){return g.color},get size(){return g.size},get disabled(){return g.disabled},get children(){return[c(()=>c(()=>!!C())()?s(a,{}):s(o,{})),(()=>{var t=h();return u(t,l({get name(){return y?.name?.()??g.name}},_,{type:`radio`,get checked(){return C()},onChange:w,get disabled(){return g.disabled},get value(){return g.value},get class(){return e(T().input(),g.class)}}),!1,!1),t})()]}}))};export{g as default};
|
package/dist/Select/Select.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { ComponentProps } from 'solid-js';
|
|
2
2
|
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { Prettify } from '../types/Prettify';
|
|
4
|
+
import { WithExtendedComponentProps } from '../types/ExtendedComponentProps';
|
|
3
5
|
import { ThemeColors } from '../styles/theme/colors';
|
|
4
6
|
import { default as selectDefaultStyles } from './style';
|
|
5
7
|
type SelectVariants = VariantProps<typeof selectDefaultStyles>;
|
|
8
|
+
type SelectSlotProps = Prettify<{
|
|
9
|
+
option?: Prettify<ComponentProps<"option"> & WithExtendedComponentProps>;
|
|
10
|
+
}>;
|
|
6
11
|
export type SelectOption = {
|
|
7
12
|
label: string;
|
|
8
13
|
value: string;
|
|
@@ -13,10 +18,13 @@ export type SelectProps = {
|
|
|
13
18
|
color?: keyof ThemeColors;
|
|
14
19
|
disabled?: boolean;
|
|
15
20
|
fullWidth?: boolean;
|
|
16
|
-
onChange?: (event:
|
|
21
|
+
onChange?: (event: Event) => void;
|
|
17
22
|
options?: SelectOption[];
|
|
23
|
+
ref?: (elem: HTMLSelectElement) => void;
|
|
18
24
|
size?: SelectVariants["size"];
|
|
25
|
+
slotProps?: SelectSlotProps;
|
|
26
|
+
value?: string;
|
|
19
27
|
variant?: SelectVariants["variant"];
|
|
20
|
-
} & Omit<ComponentProps<"select">, "multiple" | "onChange">;
|
|
28
|
+
} & Omit<ComponentProps<"select">, "multiple" | "onChange" | "ref">;
|
|
21
29
|
declare const Select: (props: SelectProps) => import("solid-js").JSX.Element;
|
|
22
30
|
export default Select;
|
package/dist/Select/Select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../utils/cn.js";import t from"./style.js";import{useThemeContext as
|
|
1
|
+
import e from"../utils/cn.js";import t from"../styles/theme/index.js";import n from"./style.js";import{useThemeContext as r}from"../ThemeProvider/ThemeContext.js";import"../ThemeProvider/index.js";import"../types/Prettify.js";import"../types/ExtendedComponentProps.js";import{createComponent as i,insert as a,mergeProps as o,spread as s,template as c,use as l}from"solid-js/web";import{For as u,createEffect as d,createMemo as f,mergeProps as p,splitProps as m}from"solid-js";import"tailwind-variants";var h=c(`<select>`),g=c(`<option>`),_=c=>{let _=p({color:`default`,disabled:!1,variant:`outlined`,size:`medium`},c),[v,y]=m(_,[`class`,`color`,`disabled`,`fullWidth`,`options`,`ref`,`size`,`slotProps`,`value`,`variant`,`children`,`multiple`]),b,x=r(),S=f(()=>{let e={color:v.color,disabled:v.disabled,fullWidth:v.fullWidth,size:v.size,variant:v.variant};return x?x.componentsTV.select(e):n(e)}),C=f(()=>v.options??[]);return d(()=>{b.value=v.value??``}),(()=>{var n=h();return l(e=>{b=e,v.ref?.(e)},n),s(n,o(y,{multiple:!1,get disabled(){return v.disabled},get class(){return e(S().base(),v.class)}}),!1,!0),a(n,i(u,{get each(){return C()},children:n=>(()=>{var r=g();return s(r,o(()=>v.slotProps?.option,{get value(){return n.value},get disabled(){return n.disabled},get class(){return e(S().option(),n.disabled?t.disabled.text:``,v.slotProps?.option?.class)}}),!1,!0),a(r,()=>n.label),r})()})),n})()};export{_ as default};
|