@nextui-org/theme 0.0.0-dev-v2-20230421004240 → 0.0.0-dev-v2-20230423212921
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/chunk-3B4SYPW2.mjs +18 -0
- package/dist/{chunk-7WADY6QI.mjs → chunk-6U5W7RS7.mjs} +1 -1
- package/dist/{chunk-5GRQZPPR.mjs → chunk-BLEVU2FW.mjs} +1 -1
- package/dist/{chunk-U45XCA4S.mjs → chunk-FJNSTLAL.mjs} +1 -1
- package/dist/chunk-KWWWVBJL.mjs +212 -0
- package/dist/{chunk-2QIDY5NZ.mjs → chunk-MW7UVOSP.mjs} +2 -2
- package/dist/{chunk-YYN3SHJ5.mjs → chunk-NQJBJXX3.mjs} +3 -3
- package/dist/{chunk-W2RCO7SN.mjs → chunk-R47OQZR5.mjs} +1 -0
- package/dist/{chunk-CJ7TG72B.mjs → chunk-TYA6TT57.mjs} +1 -1
- package/dist/{chunk-CO6ANWRA.mjs → chunk-XUL76UJD.mjs} +1 -1
- package/dist/colors/index.js +1 -1
- package/dist/colors/index.mjs +2 -2
- package/dist/colors/semantic.js +1 -1
- package/dist/colors/semantic.mjs +1 -1
- package/dist/colors.js +1 -1
- package/dist/colors.mjs +2 -2
- package/dist/components/button.js +1 -0
- package/dist/components/button.mjs +1 -1
- package/dist/components/chip.js +3 -3
- package/dist/components/chip.mjs +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +236 -7
- package/dist/components/index.mjs +18 -10
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/pagination.mjs +1 -1
- package/dist/components/spacer.d.ts +27 -0
- package/dist/components/spacer.js +42 -0
- package/dist/components/spacer.mjs +6 -0
- package/dist/components/spinner.js +1 -1
- package/dist/components/spinner.mjs +1 -1
- package/dist/components/table.d.ts +277 -0
- package/dist/components/table.js +236 -0
- package/dist/components/table.mjs +6 -0
- package/dist/components/user.js +2 -2
- package/dist/components/user.mjs +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +241 -12
- package/dist/index.mjs +21 -13
- package/dist/plugin.js +1 -1
- package/dist/plugin.mjs +3 -3
- package/package.json +2 -2
- /package/dist/{chunk-NP4SOC4S.mjs → chunk-RH7YHIQY.mjs} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/components/spacer.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var spacer = tv({
|
|
4
|
+
base: "w-px h-px inline-block",
|
|
5
|
+
variants: {
|
|
6
|
+
isInline: {
|
|
7
|
+
true: "inline-block",
|
|
8
|
+
false: "block"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
isInline: false
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
spacer
|
|
18
|
+
};
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
// src/components/table.ts
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
var focusRing = [
|
|
4
|
+
"data-[focus-visible=true]:outline-none",
|
|
5
|
+
"data-[focus-visible=true]:ring-2",
|
|
6
|
+
"data-[focus-visible=true]:ring-primary",
|
|
7
|
+
"data-[focus-visible=true]:ring-offset-2",
|
|
8
|
+
"data-[focus-visible=true]:ring-offset-background",
|
|
9
|
+
"data-[focus-visible=true]:dark:ring-offset-background-dark"
|
|
10
|
+
];
|
|
11
|
+
var table = tv({
|
|
12
|
+
slots: {
|
|
13
|
+
base: [
|
|
14
|
+
"p-4",
|
|
15
|
+
"flex",
|
|
16
|
+
"flex-col",
|
|
17
|
+
"relative",
|
|
18
|
+
"justify-between",
|
|
19
|
+
"gap-4",
|
|
20
|
+
"border",
|
|
21
|
+
"border-neutral-100",
|
|
22
|
+
"overflow-auto"
|
|
23
|
+
],
|
|
24
|
+
table: "min-w-full h-auto",
|
|
25
|
+
thead: "[&>tr]:first:rounded-lg",
|
|
26
|
+
tbody: "",
|
|
27
|
+
tr: ["group", "outline-none", ...focusRing],
|
|
28
|
+
th: [
|
|
29
|
+
"group",
|
|
30
|
+
"px-3",
|
|
31
|
+
"h-10",
|
|
32
|
+
"text-left",
|
|
33
|
+
"align-middle",
|
|
34
|
+
"bg-neutral-100",
|
|
35
|
+
"text-neutral-500",
|
|
36
|
+
"text-xs",
|
|
37
|
+
"font-semibold",
|
|
38
|
+
"first:rounded-l-lg",
|
|
39
|
+
"last:rounded-r-lg",
|
|
40
|
+
"outline-none",
|
|
41
|
+
"data-[sortable=true]:transition-colors",
|
|
42
|
+
"data-[sortable=true]:cursor-pointer",
|
|
43
|
+
"data-[hover=true]:text-neutral-400",
|
|
44
|
+
...focusRing
|
|
45
|
+
],
|
|
46
|
+
td: [
|
|
47
|
+
"py-2",
|
|
48
|
+
"px-3",
|
|
49
|
+
"relative",
|
|
50
|
+
"align-middle",
|
|
51
|
+
"whitespace-normal",
|
|
52
|
+
"text-sm",
|
|
53
|
+
"font-normal",
|
|
54
|
+
"outline-none",
|
|
55
|
+
...focusRing,
|
|
56
|
+
"before:content-['']",
|
|
57
|
+
"before:absolute",
|
|
58
|
+
"before:-z-[1]",
|
|
59
|
+
"before:inset-0",
|
|
60
|
+
"before:opacity-0",
|
|
61
|
+
"data-[selected=true]:before:opacity-100",
|
|
62
|
+
"group-data-[disabled=true]:text-neutral-300"
|
|
63
|
+
],
|
|
64
|
+
tfoot: "",
|
|
65
|
+
sortIcon: [
|
|
66
|
+
"ml-2",
|
|
67
|
+
"mb-px",
|
|
68
|
+
"opacity-0",
|
|
69
|
+
"text-inherit",
|
|
70
|
+
"inline-block",
|
|
71
|
+
"transition-transform-opacity",
|
|
72
|
+
"data-[visible=true]:opacity-100",
|
|
73
|
+
"group-data-[hover=true]:opacity-100",
|
|
74
|
+
"data-[direction=ascending]:rotate-180"
|
|
75
|
+
],
|
|
76
|
+
emptyWrapper: "text-neutral-400 align-middle text-center h-40",
|
|
77
|
+
loadingWrapper: "absolute inset-0 flex items-center justify-center"
|
|
78
|
+
},
|
|
79
|
+
variants: {
|
|
80
|
+
color: {
|
|
81
|
+
neutral: {
|
|
82
|
+
td: "before:bg-neutral-200 dark:before:bg-neutral-100 data-[selected=true]:text-neutral-foreground"
|
|
83
|
+
},
|
|
84
|
+
primary: {
|
|
85
|
+
td: "before:bg-primary-50 data-[selected=true]:text-primary"
|
|
86
|
+
},
|
|
87
|
+
secondary: {
|
|
88
|
+
td: "before:bg-secondary-100 data-[selected=true]:text-secondary"
|
|
89
|
+
},
|
|
90
|
+
success: {
|
|
91
|
+
td: "before:bg-success-50 data-[selected=true]:text-success"
|
|
92
|
+
},
|
|
93
|
+
warning: {
|
|
94
|
+
td: "before:bg-warning-50 data-[selected=true]:text-warning"
|
|
95
|
+
},
|
|
96
|
+
danger: {
|
|
97
|
+
td: "before:bg-danger-50 data-[selected=true]:text-danger"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
layout: {
|
|
101
|
+
auto: {
|
|
102
|
+
table: "table-auto"
|
|
103
|
+
},
|
|
104
|
+
fixed: {
|
|
105
|
+
table: "table-fixed"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
radius: {
|
|
109
|
+
none: {
|
|
110
|
+
base: "rounded-none"
|
|
111
|
+
},
|
|
112
|
+
base: {
|
|
113
|
+
base: "rounded"
|
|
114
|
+
},
|
|
115
|
+
sm: {
|
|
116
|
+
base: "rounded-sm"
|
|
117
|
+
},
|
|
118
|
+
md: {
|
|
119
|
+
base: "rounded-md"
|
|
120
|
+
},
|
|
121
|
+
lg: {
|
|
122
|
+
base: "rounded-lg"
|
|
123
|
+
},
|
|
124
|
+
xl: {
|
|
125
|
+
base: "rounded-xl"
|
|
126
|
+
},
|
|
127
|
+
"2xl": {
|
|
128
|
+
base: "rounded-2xl"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
shadow: {
|
|
132
|
+
none: {
|
|
133
|
+
base: "shadow-none"
|
|
134
|
+
},
|
|
135
|
+
sm: {
|
|
136
|
+
base: "shadow-sm"
|
|
137
|
+
},
|
|
138
|
+
md: {
|
|
139
|
+
base: "shadow-md"
|
|
140
|
+
},
|
|
141
|
+
lg: {
|
|
142
|
+
base: "shadow-lg"
|
|
143
|
+
},
|
|
144
|
+
xl: {
|
|
145
|
+
base: "shadow-xl"
|
|
146
|
+
},
|
|
147
|
+
"2xl": {
|
|
148
|
+
base: "shadow-2xl"
|
|
149
|
+
},
|
|
150
|
+
inner: {
|
|
151
|
+
base: "shadow-inner"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
hideHeader: {
|
|
155
|
+
true: {
|
|
156
|
+
thead: "hidden"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
isStriped: {
|
|
160
|
+
true: {
|
|
161
|
+
td: [
|
|
162
|
+
"group-data-[odd=true]:before:bg-neutral-100",
|
|
163
|
+
"group-data-[odd=true]:before:opacity-100"
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
isHeaderSticky: {
|
|
168
|
+
true: {
|
|
169
|
+
thead: "sticky top-0 z-10 [&>tr]:first:shadow"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
isSelectable: {
|
|
173
|
+
true: {
|
|
174
|
+
tr: "cursor-default",
|
|
175
|
+
td: ["group-data-[hover=true]:before:opacity-70"]
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
isMultiSelectable: {
|
|
179
|
+
true: {
|
|
180
|
+
td: [
|
|
181
|
+
"group-data-[first=true]:first:before:rounded-tl-lg",
|
|
182
|
+
"group-data-[first=true]:last:before:rounded-tr-lg",
|
|
183
|
+
"group-data-[middle=true]:before:rounded-none",
|
|
184
|
+
"group-data-[last=true]:first:before:rounded-bl-lg",
|
|
185
|
+
"group-data-[last=true]:last:before:rounded-br-lg"
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
false: {
|
|
189
|
+
td: ["first:before:rounded-l-lg", "last:before:rounded-r-lg"]
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
fullWidth: {
|
|
193
|
+
true: {
|
|
194
|
+
base: "w-full",
|
|
195
|
+
table: "w-full"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
defaultVariants: {
|
|
200
|
+
layout: "auto",
|
|
201
|
+
shadow: "lg",
|
|
202
|
+
radius: "xl",
|
|
203
|
+
color: "neutral",
|
|
204
|
+
hideHeader: false,
|
|
205
|
+
isStriped: false,
|
|
206
|
+
fullWidth: true
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
export {
|
|
211
|
+
table
|
|
212
|
+
};
|
|
@@ -12,8 +12,8 @@ var user = tv({
|
|
|
12
12
|
"data-[focus-visible=true]:dark:ring-offset-background-dark"
|
|
13
13
|
],
|
|
14
14
|
wrapper: "inline-flex flex-col items-start",
|
|
15
|
-
name: "text-sm text-
|
|
16
|
-
description: "text-xs text-neutral-
|
|
15
|
+
name: "text-sm text-inherit",
|
|
16
|
+
description: "text-xs text-neutral-400"
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -29,10 +29,10 @@ var chip = tv({
|
|
|
29
29
|
variant: {
|
|
30
30
|
solid: {},
|
|
31
31
|
bordered: {
|
|
32
|
-
base: "border-1.5
|
|
32
|
+
base: "border-1.5 bg-transparent"
|
|
33
33
|
},
|
|
34
34
|
light: {
|
|
35
|
-
base: "
|
|
35
|
+
base: "bg-transparent"
|
|
36
36
|
},
|
|
37
37
|
flat: {},
|
|
38
38
|
faded: {
|
|
@@ -40,7 +40,7 @@ var chip = tv({
|
|
|
40
40
|
},
|
|
41
41
|
shadow: {},
|
|
42
42
|
dot: {
|
|
43
|
-
base: "border-1.5 border-neutral text-foreground
|
|
43
|
+
base: "border-1.5 border-neutral text-foreground bg-transparent"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
color: {
|
|
@@ -304,7 +304,7 @@ var pagination = tv({
|
|
|
304
304
|
"data-[focus-visible=true]:ring-offset-2",
|
|
305
305
|
"data-[focus-visible=true]:ring-offset-background",
|
|
306
306
|
"data-[focus-visible=true]:dark:ring-offset-background-dark",
|
|
307
|
-
"data-[disabled=true]:
|
|
307
|
+
"data-[disabled=true]:text-neutral-300",
|
|
308
308
|
"data-[disabled=true]:pointer-events-none"
|
|
309
309
|
]
|
|
310
310
|
},
|
package/dist/colors/index.js
CHANGED
package/dist/colors/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
colors
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-BLEVU2FW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
semanticColors
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-FJNSTLAL.mjs";
|
|
7
7
|
import "../chunk-37PIXVP4.mjs";
|
|
8
8
|
import "../chunk-M63AFAHO.mjs";
|
|
9
9
|
import {
|
package/dist/colors/semantic.js
CHANGED
package/dist/colors/semantic.mjs
CHANGED
package/dist/colors.js
CHANGED
package/dist/colors.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./chunk-WQEDQHKX.mjs";
|
|
2
2
|
import {
|
|
3
3
|
colors
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BLEVU2FW.mjs";
|
|
5
5
|
import {
|
|
6
6
|
semanticColors
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FJNSTLAL.mjs";
|
|
8
8
|
import "./chunk-37PIXVP4.mjs";
|
|
9
9
|
import "./chunk-M63AFAHO.mjs";
|
|
10
10
|
import {
|
package/dist/components/chip.js
CHANGED
|
@@ -132,10 +132,10 @@ var chip = (0, import_tailwind_variants.tv)({
|
|
|
132
132
|
variant: {
|
|
133
133
|
solid: {},
|
|
134
134
|
bordered: {
|
|
135
|
-
base: "border-1.5
|
|
135
|
+
base: "border-1.5 bg-transparent"
|
|
136
136
|
},
|
|
137
137
|
light: {
|
|
138
|
-
base: "
|
|
138
|
+
base: "bg-transparent"
|
|
139
139
|
},
|
|
140
140
|
flat: {},
|
|
141
141
|
faded: {
|
|
@@ -143,7 +143,7 @@ var chip = (0, import_tailwind_variants.tv)({
|
|
|
143
143
|
},
|
|
144
144
|
shadow: {},
|
|
145
145
|
dot: {
|
|
146
|
-
base: "border-1.5 border-neutral text-foreground
|
|
146
|
+
base: "border-1.5 border-neutral text-foreground bg-transparent"
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
149
|
color: {
|
package/dist/components/chip.mjs
CHANGED
|
@@ -30,5 +30,7 @@ export { dropdownMenu } from './dropdown-menu.js';
|
|
|
30
30
|
export { ImageSlots, ImageVariantProps, image } from './image.js';
|
|
31
31
|
export { ModalSlots, ModalVariantProps, modal } from './modal.js';
|
|
32
32
|
export { NavbarSlots, NavbarVariantProps, navbar } from './navbar.js';
|
|
33
|
+
export { TableReturnType, TableSlots, TableVariantProps, table } from './table.js';
|
|
34
|
+
export { SpacerVariantProps, spacer } from './spacer.js';
|
|
33
35
|
import 'tailwind-variants';
|
|
34
36
|
import 'tailwind-variants/dist/config';
|