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.
Files changed (83) hide show
  1. package/dist/AccordionContext/AccordionContext.js +1 -1
  2. package/dist/AccordionDetails/AccordionDetails.d.ts +2 -1
  3. package/dist/AccordionDetails/AccordionDetails.js +1 -1
  4. package/dist/AccordionDetails/style.d.ts +48 -0
  5. package/dist/AccordionDetails/style.js +1 -1
  6. package/dist/AccordionSummary/AccordionSummary.d.ts +6 -4
  7. package/dist/AccordionSummary/AccordionSummary.js +1 -1
  8. package/dist/Alert/Alert.d.ts +8 -6
  9. package/dist/Alert/Alert.js +1 -1
  10. package/dist/Alert/style.d.ts +6 -0
  11. package/dist/Alert/style.js +1 -1
  12. package/dist/Avatar/Avatar.d.ts +5 -3
  13. package/dist/Avatar/Avatar.js +1 -1
  14. package/dist/Avatar/style.js +1 -1
  15. package/dist/Badge/Badge.d.ts +7 -5
  16. package/dist/Badge/Badge.js +1 -1
  17. package/dist/Badge/style.js +1 -1
  18. package/dist/Breadcrumbs/Breadcrumbs.d.ts +7 -5
  19. package/dist/Breadcrumbs/Breadcrumbs.js +1 -1
  20. package/dist/Button/Button.d.ts +8 -6
  21. package/dist/Button/Button.js +1 -1
  22. package/dist/Button/style.js +1 -1
  23. package/dist/CardFooter/style.d.ts +2 -2
  24. package/dist/CardFooter/style.js +1 -1
  25. package/dist/CardTitle/CardTitle.d.ts +4 -4
  26. package/dist/Checkbox/Checkbox.d.ts +5 -3
  27. package/dist/Checkbox/Checkbox.js +1 -1
  28. package/dist/Chip/Chip.d.ts +6 -4
  29. package/dist/Chip/Chip.js +1 -1
  30. package/dist/Chip/style.d.ts +6 -18
  31. package/dist/Chip/style.js +1 -1
  32. package/dist/Dialog/Dialog.d.ts +7 -4
  33. package/dist/Dialog/Dialog.js +1 -1
  34. package/dist/Dialog/style.js +1 -1
  35. package/dist/DialogTitle/DialogTitle.d.ts +4 -4
  36. package/dist/Divider/Divider.d.ts +7 -0
  37. package/dist/Divider/Divider.js +1 -1
  38. package/dist/Divider/style.d.ts +138 -18
  39. package/dist/Divider/style.js +1 -1
  40. package/dist/IconButton/IconButton.d.ts +4 -3
  41. package/dist/IconButton/style.js +1 -1
  42. package/dist/Input/Input.d.ts +7 -5
  43. package/dist/Input/Input.js +1 -1
  44. package/dist/Input/style.js +1 -1
  45. package/dist/Link/style.d.ts +6 -6
  46. package/dist/Link/style.js +1 -1
  47. package/dist/Progress/Progress.d.ts +7 -5
  48. package/dist/Progress/Progress.js +1 -1
  49. package/dist/Progress/style.js +1 -1
  50. package/dist/Radio/Radio.d.ts +5 -3
  51. package/dist/Radio/Radio.js +1 -1
  52. package/dist/Select/Select.d.ts +10 -2
  53. package/dist/Select/Select.js +1 -1
  54. package/dist/Select/style.d.ts +156 -78
  55. package/dist/Select/style.js +1 -1
  56. package/dist/Skeleton/Skeleton.d.ts +2 -2
  57. package/dist/Skeleton/Skeleton.js +1 -1
  58. package/dist/Spinner/Spinner.d.ts +1 -1
  59. package/dist/Spinner/Spinner.js +1 -1
  60. package/dist/Switch/Switch.d.ts +6 -4
  61. package/dist/Switch/Switch.js +1 -1
  62. package/dist/Switch/style.js +1 -1
  63. package/dist/Tab/style.js +1 -1
  64. package/dist/TableCell/TableCell.js +1 -1
  65. package/dist/TableContext/TableContext.d.ts +1 -1
  66. package/dist/TableContext/TableContext.js +1 -1
  67. package/dist/TabsContext/context.js +1 -1
  68. package/dist/ThemeProvider/componentsTV.d.ts +178 -58
  69. package/dist/index.js +1 -1
  70. package/dist/styles/createTheme.js +2 -1
  71. package/dist/styles/index.js +1 -1
  72. package/dist/styles/theme/colors.js +1 -1
  73. package/dist/styles/theme/disabled.js +1 -1
  74. package/dist/styles/theme/themeSchema.js +1 -1
  75. package/dist/styles/theme/utilities.js +1 -1
  76. package/dist/styles/useTheme.js +1 -1
  77. package/dist/types/ExtendedComponentProps.d.ts +6 -0
  78. package/dist/types/ExtendedComponentProps.js +0 -0
  79. package/dist/types/Prettify.d.ts +3 -0
  80. package/dist/types/Prettify.js +0 -0
  81. package/package.json +11 -2
  82. package/dist/_chunks/createTheme-DT5vPeEE.js +0 -2
  83. package/dist/_chunks/themeSchema-BFl6XiaJ.js +0 -1
@@ -1,124 +1,202 @@
1
1
  import { Theme } from '../styles/theme';
2
2
  export declare const select: (theme?: Theme) => import('tailwind-variants').TVReturnType<{
3
- color: Record<"default" | "success" | "warning" | "info" | "error", string>;
3
+ color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
4
4
  disabled: {
5
- true: "";
6
- false: "";
5
+ true: {};
6
+ false: {};
7
7
  };
8
8
  variant: {
9
- filled: "";
10
- ghost: "";
11
- outlined: "border border-1";
9
+ filled: {};
10
+ ghost: {};
11
+ outlined: {
12
+ base: string;
13
+ };
12
14
  };
13
15
  size: {
14
- small: "py-1 px-1.5 h-6 text-sm";
15
- medium: "py-1 px-1.5 h-8 text-sm";
16
- large: "py-1.5 px-2 h-10 text-md";
16
+ small: {
17
+ base: string;
18
+ };
19
+ medium: {
20
+ base: string;
21
+ };
22
+ large: {
23
+ base: string;
24
+ };
17
25
  };
18
26
  fullWidth: {
19
- true: "w-full";
20
- false: "";
21
- };
22
- }, undefined, string[], {
23
- color: Record<"default" | "success" | "warning" | "info" | "error", string>;
27
+ true: {
28
+ base: string;
29
+ };
30
+ false: {};
31
+ };
32
+ }, {
33
+ base: string[];
34
+ option: string[];
35
+ }, undefined, {
36
+ color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
24
37
  disabled: {
25
- true: "";
26
- false: "";
38
+ true: {};
39
+ false: {};
27
40
  };
28
41
  variant: {
29
- filled: "";
30
- ghost: "";
31
- outlined: "border border-1";
42
+ filled: {};
43
+ ghost: {};
44
+ outlined: {
45
+ base: string;
46
+ };
32
47
  };
33
48
  size: {
34
- small: "py-1 px-1.5 h-6 text-sm";
35
- medium: "py-1 px-1.5 h-8 text-sm";
36
- large: "py-1.5 px-2 h-10 text-md";
49
+ small: {
50
+ base: string;
51
+ };
52
+ medium: {
53
+ base: string;
54
+ };
55
+ large: {
56
+ base: string;
57
+ };
37
58
  };
38
59
  fullWidth: {
39
- true: "w-full";
40
- false: "";
41
- };
42
- }, undefined, import('tailwind-variants').TVReturnTypeLike<{
43
- color: Record<"default" | "success" | "warning" | "info" | "error", string>;
60
+ true: {
61
+ base: string;
62
+ };
63
+ false: {};
64
+ };
65
+ }, {
66
+ base: string[];
67
+ option: string[];
68
+ }, import('tailwind-variants').TVReturnTypeLike<{
69
+ color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
44
70
  disabled: {
45
- true: "";
46
- false: "";
71
+ true: {};
72
+ false: {};
47
73
  };
48
74
  variant: {
49
- filled: "";
50
- ghost: "";
51
- outlined: "border border-1";
75
+ filled: {};
76
+ ghost: {};
77
+ outlined: {
78
+ base: string;
79
+ };
52
80
  };
53
81
  size: {
54
- small: "py-1 px-1.5 h-6 text-sm";
55
- medium: "py-1 px-1.5 h-8 text-sm";
56
- large: "py-1.5 px-2 h-10 text-md";
82
+ small: {
83
+ base: string;
84
+ };
85
+ medium: {
86
+ base: string;
87
+ };
88
+ large: {
89
+ base: string;
90
+ };
57
91
  };
58
92
  fullWidth: {
59
- true: "w-full";
60
- false: "";
61
- };
62
- }, undefined>>;
93
+ true: {
94
+ base: string;
95
+ };
96
+ false: {};
97
+ };
98
+ }, {
99
+ base: string[];
100
+ option: string[];
101
+ }>>;
63
102
  declare const _default: import('tailwind-variants').TVReturnType<{
64
- color: Record<"default" | "success" | "warning" | "info" | "error", string>;
103
+ color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
65
104
  disabled: {
66
- true: "";
67
- false: "";
105
+ true: {};
106
+ false: {};
68
107
  };
69
108
  variant: {
70
- filled: "";
71
- ghost: "";
72
- outlined: "border border-1";
109
+ filled: {};
110
+ ghost: {};
111
+ outlined: {
112
+ base: string;
113
+ };
73
114
  };
74
115
  size: {
75
- small: "py-1 px-1.5 h-6 text-sm";
76
- medium: "py-1 px-1.5 h-8 text-sm";
77
- large: "py-1.5 px-2 h-10 text-md";
116
+ small: {
117
+ base: string;
118
+ };
119
+ medium: {
120
+ base: string;
121
+ };
122
+ large: {
123
+ base: string;
124
+ };
78
125
  };
79
126
  fullWidth: {
80
- true: "w-full";
81
- false: "";
82
- };
83
- }, undefined, string[], {
84
- color: Record<"default" | "success" | "warning" | "info" | "error", string>;
127
+ true: {
128
+ base: string;
129
+ };
130
+ false: {};
131
+ };
132
+ }, {
133
+ base: string[];
134
+ option: string[];
135
+ }, undefined, {
136
+ color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
85
137
  disabled: {
86
- true: "";
87
- false: "";
138
+ true: {};
139
+ false: {};
88
140
  };
89
141
  variant: {
90
- filled: "";
91
- ghost: "";
92
- outlined: "border border-1";
142
+ filled: {};
143
+ ghost: {};
144
+ outlined: {
145
+ base: string;
146
+ };
93
147
  };
94
148
  size: {
95
- small: "py-1 px-1.5 h-6 text-sm";
96
- medium: "py-1 px-1.5 h-8 text-sm";
97
- large: "py-1.5 px-2 h-10 text-md";
149
+ small: {
150
+ base: string;
151
+ };
152
+ medium: {
153
+ base: string;
154
+ };
155
+ large: {
156
+ base: string;
157
+ };
98
158
  };
99
159
  fullWidth: {
100
- true: "w-full";
101
- false: "";
102
- };
103
- }, undefined, import('tailwind-variants').TVReturnTypeLike<{
104
- color: Record<"default" | "success" | "warning" | "info" | "error", string>;
160
+ true: {
161
+ base: string;
162
+ };
163
+ false: {};
164
+ };
165
+ }, {
166
+ base: string[];
167
+ option: string[];
168
+ }, import('tailwind-variants').TVReturnTypeLike<{
169
+ color: Record<"default" | "success" | "warning" | "info" | "error", {}>;
105
170
  disabled: {
106
- true: "";
107
- false: "";
171
+ true: {};
172
+ false: {};
108
173
  };
109
174
  variant: {
110
- filled: "";
111
- ghost: "";
112
- outlined: "border border-1";
175
+ filled: {};
176
+ ghost: {};
177
+ outlined: {
178
+ base: string;
179
+ };
113
180
  };
114
181
  size: {
115
- small: "py-1 px-1.5 h-6 text-sm";
116
- medium: "py-1 px-1.5 h-8 text-sm";
117
- large: "py-1.5 px-2 h-10 text-md";
182
+ small: {
183
+ base: string;
184
+ };
185
+ medium: {
186
+ base: string;
187
+ };
188
+ large: {
189
+ base: string;
190
+ };
118
191
  };
119
192
  fullWidth: {
120
- true: "w-full";
121
- false: "";
122
- };
123
- }, undefined>>;
193
+ true: {
194
+ base: string;
195
+ };
196
+ false: {};
197
+ };
198
+ }, {
199
+ base: string[];
200
+ option: string[];
201
+ }>>;
124
202
  export default _default;
@@ -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({base:[`border-0 outline-0`,a.rounded.small,a.focus],variants:{color:t(a.colors,()=>``),disabled:{true:``,false:``},variant:{filled:``,ghost:``,outlined:`border border-1`},size:{small:`py-1 px-1.5 h-6 text-sm`,medium:`py-1 px-1.5 h-8 text-sm`,large:`py-1.5 px-2 h-10 text-md`},fullWidth:{true:`w-full`,false:``}},compoundVariants:[...n(a.colors).flatMap(e=>i.flatMap(t=>{let n=a.colors[e][t];return[{color:e,variant:t,disabled:!1,class:[n.background,n.border,n.text]},{color:e,variant:t,disabled:!0,class:[t===`filled`?a.disabled.background:``,t===`outlined`?a.disabled.border:``,a.disabled.text]}]}))]}),o=a();export{o as default,a as select};
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:[`border-0 outline-0`,a.rounded.small,a.focus],option:[`bg-white dark:bg-neutral-950`,`text-neutral-50 dark:text-white`]},variants:{color:t(a.colors,()=>({})),disabled:{true:{},false:{}},variant:{filled:{},ghost:{},outlined:{base:`border border-1`}},size:{small:{base:`py-1 px-1.5 h-6 text-sm`},medium:{base:`py-1 px-1.5 h-8 text-sm`},large:{base:`py-1.5 px-2 h-10 text-md`}},fullWidth:{true:{base:`w-full`},false:{}}},compoundVariants:[...n(a.colors).flatMap(e=>i.flatMap(t=>{let n=a.colors[e][t];return[{color:e,variant:t,disabled:!1,class:{base:[n.background,n.border,n.text]}},{color:e,variant:t,disabled:!0,class:{base:[t===`filled`?a.disabled.background:``,t===`outlined`?a.disabled.border:``,a.disabled.text]}}]}))]}),o=a();export{o as default,a as select};
@@ -1,9 +1,9 @@
1
- import { ComponentProps, ParentProps } from 'solid-js';
1
+ import { ComponentProps } from 'solid-js';
2
2
  import { VariantProps } from 'tailwind-variants';
3
3
  import { default as skeletonDefaultStyles } from './style';
4
4
  type SkeletonVariants = VariantProps<typeof skeletonDefaultStyles>;
5
5
  export type SkeletonProps = {
6
6
  variant?: SkeletonVariants["variant"];
7
7
  } & ComponentProps<"span">;
8
- declare const Skeleton: (props: ParentProps<SkeletonProps>) => import("solid-js").JSX.Element;
8
+ declare const Skeleton: (props: SkeletonProps) => import("solid-js").JSX.Element;
9
9
  export default Skeleton;
@@ -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(`<span>`),u=a=>{let u=s({variant:`rectangle`},a),[d,f]=c(u,[`children`,`class`,`variant`]),p=n(),m=o(()=>{let e={variant:d.variant};return p?p.componentsTV.skeleton(e):t(e)});return(()=>{var t=l();return i(t,r(f,{get class(){return e(m(),d.class)}}),!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{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(`<span>`),u=a=>{let u=s({variant:`rectangle`},a),[d,f]=c(u,[`class`,`variant`,`children`]),p=n(),m=o(()=>{let e={variant:d.variant};return p?p.componentsTV.skeleton(e):t(e)});return(()=>{var t=l();return i(t,r(f,{get class(){return e(m(),d.class)}}),!1,!1),t})()};export{u as default};
@@ -3,7 +3,7 @@ import { VariantProps } from 'tailwind-variants';
3
3
  import { ThemeColors } from '../styles/theme/colors';
4
4
  import { default as spinnerDefaultStyles } from './style';
5
5
  type SpinnerVariants = VariantProps<typeof spinnerDefaultStyles>;
6
- type SpinnerProps = {
6
+ export type SpinnerProps = {
7
7
  class?: string;
8
8
  color?: keyof ThemeColors;
9
9
  label?: 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{effect as r,insert as i,mergeProps as a,setAttribute as o,spread as s,template as c}from"solid-js/web";import{createMemo as l,createUniqueId as u,mergeProps as d,splitProps as f}from"solid-js";import"tailwind-variants";var p=c(`<span role=status><svg viewBox="0 0 24 24"fill=none><circle cx=12 cy=12 r=9 stroke=currentColor stroke-width=3 opacity=0.45></circle><path d="M21 12a9 9 0 0 0-9-9"stroke=currentColor stroke-width=3 stroke-linecap=round></path></svg><span class=sr-only>`),m=c=>{let m=d({color:`default`,size:`medium`},c),[h,g]=f(m,[`class`,`color`,`label`,`size`,`children`]),_=n(),v=u(),y=l(()=>{let e={color:h.color,size:h.size};return _?_.componentsTV.spinner(e):t(e)});return(()=>{var t=p(),n=t.firstChild,c=n.nextSibling;return s(t,a(g,{"aria-labelledby":v,get class(){return e(y().base(),h.class)}}),!1,!0),o(n,`aria-hidden`,!0),o(c,`id`,v),i(c,()=>h.label??`Loading`),r(()=>o(n,`class`,e(y().svg()))),t})()};export{m as Spinner,m 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{className as r,effect as i,insert as a,mergeProps as o,setAttribute as s,spread as c,template as l}from"solid-js/web";import{createMemo as u,createUniqueId as d,mergeProps as f,splitProps as p}from"solid-js";import"tailwind-variants";var m=l(`<span role=status><svg viewBox="0 0 24 24"fill=none><circle cx=12 cy=12 r=9 stroke=currentColor stroke-width=3 opacity=0.45></circle><path d="M21 12a9 9 0 0 0-9-9"stroke=currentColor stroke-width=3 stroke-linecap=round></path></svg><span>`),h=l=>{let h=f({color:`default`,size:`medium`},l),[g,_]=p(h,[`class`,`color`,`label`,`size`,`children`]),v=n(),y=d(),b=u(()=>{let e={color:g.color,size:g.size};return v?v.componentsTV.spinner(e):t(e)});return(()=>{var t=m(),n=t.firstChild,l=n.nextSibling;return c(t,o(_,{"aria-labelledby":y,get class(){return e(b().base(),g.class)}}),!1,!0),s(n,`aria-hidden`,!0),s(l,`id`,y),a(l,()=>g.label??`Loading`),i(t=>{var i=e(b().svg()),a=e(`sr-only`);return i!==t.e&&s(n,`class`,t.e=i),a!==t.t&&r(l,t.t=a),t},{e:void 0,t:void 0}),t})()};export{h as Spinner,h as default};
@@ -1,12 +1,14 @@
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 switchDefaultStyles } from './style';
5
7
  type SwitchVariants = VariantProps<typeof switchDefaultStyles>;
6
- type SwitchSlotProps = {
7
- base?: ComponentProps<"span">;
8
- handle?: ComponentProps<"span">;
9
- };
8
+ type SwitchSlotProps = Prettify<{
9
+ base?: Prettify<ComponentProps<"span"> & WithExtendedComponentProps>;
10
+ handle?: Prettify<ComponentProps<"span"> & WithExtendedComponentProps>;
11
+ }>;
10
12
  export type SwitchProps = {
11
13
  checked?: boolean;
12
14
  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{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";import"tailwind-variants";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};
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,createSignal as s,mergeProps as c,splitProps as l}from"solid-js";import"tailwind-variants";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`]),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};
@@ -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=(i=e)=>r({slots:{base:[`relative`,i.rounded.full,i.focusWithin],handle:[`absolute translate-y-[2px]`,`ltr:translate-x-[2px] rtl:-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:t(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:[...n(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:`ltr:translate-x-[14px] rtl:-translate-x-[14px]`}},{checked:!0,size:`medium`,class:{handle:`ltr:translate-x-[18px] rtl:-translate-x-[18px]`}},{checked:!0,size:`large`,class:{handle:`ltr:translate-x-[22px] rtl:-translate-x-[22px]`}},{color:`default`,checked:!0,class:{handle:`dark:bg-neutral-900`}}]}),a=i();export{a as default,i as switchTv};
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=(i=e)=>r({slots:{base:[`relative`,i.rounded.full,i.focusWithin],handle:[`absolute translate-y-[2px]`,`ltr:translate-x-[2px] rtl:-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:t(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:[...n(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:`ltr:translate-x-[14px] rtl:-translate-x-[14px]`}},{checked:!0,size:`medium`,class:{handle:`ltr:translate-x-[18px] rtl:-translate-x-[18px]`}},{checked:!0,size:`large`,class:{handle:`ltr:translate-x-[22px] rtl:-translate-x-[22px]`}},{color:`default`,checked:!0,class:{handle:`dark:bg-neutral-900`}}]}),a=i();export{a as default,i as switchTv};
package/dist/Tab/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:[`py-2 px-4 min-w-15 min-h-8 items-center justify-center gap-y-0 gap-x-1`,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};
1
+ import e from"../styles/theme/index.js";import{tv as t}from"tailwind-variants";var n=(n=e)=>t({base:[`py-2 px-4 min-w-15 min-h-8`,`items-center justify-center gap-y-0 gap-x-1`,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};
@@ -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{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";import"tailwind-variants";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};
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";import"tailwind-variants";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};
@@ -3,4 +3,4 @@ export type TableContextValue = {
3
3
  dense: Accessor<boolean>;
4
4
  };
5
5
  export declare const TableContext: import('solid-js').Context<TableContextValue | undefined>;
6
- export declare const useTableContext: () => TableContextValue;
6
+ export declare const useTableContext: () => TableContextValue | undefined;
@@ -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(`useTableContext must be used inside TableContextProvider`);return e};export{n as TableContext,r as useTableContext};
1
+ import{createContext as e,useContext as t}from"solid-js";var n=e(),r=()=>t(n);export{n as TableContext,r as useTableContext};
@@ -1,3 +1,3 @@
1
1
  import{createContext as e,useContext as t}from"solid-js";var n=e(),r=e=>{let r=t(n);if(!r)throw Error(`
2
- ${e} must be used inside TabsContext
2
+ ${e} must be used inside TabsContext component.
3
3
  `.trim());return r};export{n as Tabs_Context,r as useTabsContext};