@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.
Files changed (43) hide show
  1. package/dist/chunk-3B4SYPW2.mjs +18 -0
  2. package/dist/{chunk-7WADY6QI.mjs → chunk-6U5W7RS7.mjs} +1 -1
  3. package/dist/{chunk-5GRQZPPR.mjs → chunk-BLEVU2FW.mjs} +1 -1
  4. package/dist/{chunk-U45XCA4S.mjs → chunk-FJNSTLAL.mjs} +1 -1
  5. package/dist/chunk-KWWWVBJL.mjs +212 -0
  6. package/dist/{chunk-2QIDY5NZ.mjs → chunk-MW7UVOSP.mjs} +2 -2
  7. package/dist/{chunk-YYN3SHJ5.mjs → chunk-NQJBJXX3.mjs} +3 -3
  8. package/dist/{chunk-W2RCO7SN.mjs → chunk-R47OQZR5.mjs} +1 -0
  9. package/dist/{chunk-CJ7TG72B.mjs → chunk-TYA6TT57.mjs} +1 -1
  10. package/dist/{chunk-CO6ANWRA.mjs → chunk-XUL76UJD.mjs} +1 -1
  11. package/dist/colors/index.js +1 -1
  12. package/dist/colors/index.mjs +2 -2
  13. package/dist/colors/semantic.js +1 -1
  14. package/dist/colors/semantic.mjs +1 -1
  15. package/dist/colors.js +1 -1
  16. package/dist/colors.mjs +2 -2
  17. package/dist/components/button.js +1 -0
  18. package/dist/components/button.mjs +1 -1
  19. package/dist/components/chip.js +3 -3
  20. package/dist/components/chip.mjs +1 -1
  21. package/dist/components/index.d.ts +2 -0
  22. package/dist/components/index.js +236 -7
  23. package/dist/components/index.mjs +18 -10
  24. package/dist/components/modal.d.ts +1 -1
  25. package/dist/components/pagination.js +1 -1
  26. package/dist/components/pagination.mjs +1 -1
  27. package/dist/components/spacer.d.ts +27 -0
  28. package/dist/components/spacer.js +42 -0
  29. package/dist/components/spacer.mjs +6 -0
  30. package/dist/components/spinner.js +1 -1
  31. package/dist/components/spinner.mjs +1 -1
  32. package/dist/components/table.d.ts +277 -0
  33. package/dist/components/table.js +236 -0
  34. package/dist/components/table.mjs +6 -0
  35. package/dist/components/user.js +2 -2
  36. package/dist/components/user.mjs +1 -1
  37. package/dist/index.d.ts +5 -2
  38. package/dist/index.js +241 -12
  39. package/dist/index.mjs +21 -13
  40. package/dist/plugin.js +1 -1
  41. package/dist/plugin.mjs +3 -3
  42. package/package.json +2 -2
  43. /package/dist/{chunk-NP4SOC4S.mjs → chunk-RH7YHIQY.mjs} +0 -0
@@ -0,0 +1,277 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
4
+
5
+ /**
6
+ * Table **Tailwind Variants** component
7
+ *
8
+ * @example
9
+ * ```js
10
+ * const {base, table, thead, tbody, tr, th, td, tfoot} = table({...})
11
+ *
12
+ * <div className={base()}>
13
+ * <table className={table()}>
14
+ * <thead className={thead()}>
15
+ * <tr className={tr()}>
16
+ * <th className={th()}>...</th>
17
+ * <th className={th()}>...</th>
18
+ * </tr>
19
+ * </thead>
20
+ * <tbody className={tbody()}>
21
+ * <tr className={tr()}>
22
+ * <td className={td()}>...</td>
23
+ * <td className={td()}>...</td>
24
+ * </tr>
25
+ * <tr className={tr()}>
26
+ * <td className={td()}>...</td>
27
+ * <td className={td()}>...</td>
28
+ * </tr>
29
+ * </tbody>
30
+ * <tfoot className={tfoot()}>
31
+ * <tr className={tr()}>
32
+ * <td className={td()}>...</td>
33
+ * <td className={td()}>...</td>
34
+ * </tr>
35
+ * </tfoot>
36
+ * </table>
37
+ * </div>
38
+ * ```
39
+ */
40
+ declare const table: tailwind_variants.TVReturnType<{
41
+ color: {
42
+ neutral: {
43
+ td: string;
44
+ };
45
+ primary: {
46
+ td: string;
47
+ };
48
+ secondary: {
49
+ td: string;
50
+ };
51
+ success: {
52
+ td: string;
53
+ };
54
+ warning: {
55
+ td: string;
56
+ };
57
+ danger: {
58
+ td: string;
59
+ };
60
+ };
61
+ layout: {
62
+ auto: {
63
+ table: string;
64
+ };
65
+ fixed: {
66
+ table: string;
67
+ };
68
+ };
69
+ radius: {
70
+ none: {
71
+ base: string;
72
+ };
73
+ base: {
74
+ base: string;
75
+ };
76
+ sm: {
77
+ base: string;
78
+ };
79
+ md: {
80
+ base: string;
81
+ };
82
+ lg: {
83
+ base: string;
84
+ };
85
+ xl: {
86
+ base: string;
87
+ };
88
+ "2xl": {
89
+ base: string;
90
+ };
91
+ };
92
+ shadow: {
93
+ none: {
94
+ base: string;
95
+ };
96
+ sm: {
97
+ base: string;
98
+ };
99
+ md: {
100
+ base: string;
101
+ };
102
+ lg: {
103
+ base: string;
104
+ };
105
+ xl: {
106
+ base: string;
107
+ };
108
+ "2xl": {
109
+ base: string;
110
+ };
111
+ inner: {
112
+ base: string;
113
+ };
114
+ };
115
+ hideHeader: {
116
+ true: {
117
+ thead: string;
118
+ };
119
+ };
120
+ isStriped: {
121
+ true: {
122
+ td: string[];
123
+ };
124
+ };
125
+ isHeaderSticky: {
126
+ true: {
127
+ thead: string;
128
+ };
129
+ };
130
+ isSelectable: {
131
+ true: {
132
+ tr: string;
133
+ td: string[];
134
+ };
135
+ };
136
+ isMultiSelectable: {
137
+ true: {
138
+ td: string[];
139
+ };
140
+ false: {
141
+ td: string[];
142
+ };
143
+ };
144
+ fullWidth: {
145
+ true: {
146
+ base: string;
147
+ table: string;
148
+ };
149
+ };
150
+ }, unknown, {
151
+ base: string[];
152
+ table: string;
153
+ thead: string;
154
+ tbody: string;
155
+ tr: string[];
156
+ th: string[];
157
+ td: string[];
158
+ tfoot: string;
159
+ sortIcon: string[];
160
+ emptyWrapper: string;
161
+ loadingWrapper: string;
162
+ }, undefined, undefined, tailwind_variants_dist_config.TVConfig<{
163
+ color: {
164
+ neutral: {
165
+ td: string;
166
+ };
167
+ primary: {
168
+ td: string;
169
+ };
170
+ secondary: {
171
+ td: string;
172
+ };
173
+ success: {
174
+ td: string;
175
+ };
176
+ warning: {
177
+ td: string;
178
+ };
179
+ danger: {
180
+ td: string;
181
+ };
182
+ };
183
+ layout: {
184
+ auto: {
185
+ table: string;
186
+ };
187
+ fixed: {
188
+ table: string;
189
+ };
190
+ };
191
+ radius: {
192
+ none: {
193
+ base: string;
194
+ };
195
+ base: {
196
+ base: string;
197
+ };
198
+ sm: {
199
+ base: string;
200
+ };
201
+ md: {
202
+ base: string;
203
+ };
204
+ lg: {
205
+ base: string;
206
+ };
207
+ xl: {
208
+ base: string;
209
+ };
210
+ "2xl": {
211
+ base: string;
212
+ };
213
+ };
214
+ shadow: {
215
+ none: {
216
+ base: string;
217
+ };
218
+ sm: {
219
+ base: string;
220
+ };
221
+ md: {
222
+ base: string;
223
+ };
224
+ lg: {
225
+ base: string;
226
+ };
227
+ xl: {
228
+ base: string;
229
+ };
230
+ "2xl": {
231
+ base: string;
232
+ };
233
+ inner: {
234
+ base: string;
235
+ };
236
+ };
237
+ hideHeader: {
238
+ true: {
239
+ thead: string;
240
+ };
241
+ };
242
+ isStriped: {
243
+ true: {
244
+ td: string[];
245
+ };
246
+ };
247
+ isHeaderSticky: {
248
+ true: {
249
+ thead: string;
250
+ };
251
+ };
252
+ isSelectable: {
253
+ true: {
254
+ tr: string;
255
+ td: string[];
256
+ };
257
+ };
258
+ isMultiSelectable: {
259
+ true: {
260
+ td: string[];
261
+ };
262
+ false: {
263
+ td: string[];
264
+ };
265
+ };
266
+ fullWidth: {
267
+ true: {
268
+ base: string;
269
+ table: string;
270
+ };
271
+ };
272
+ }, unknown>>;
273
+ type TableVariantProps = VariantProps<typeof table>;
274
+ type TableSlots = keyof ReturnType<typeof table>;
275
+ type TableReturnType = ReturnType<typeof table>;
276
+
277
+ export { TableReturnType, TableSlots, TableVariantProps, table };
@@ -0,0 +1,236 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/table.ts
21
+ var table_exports = {};
22
+ __export(table_exports, {
23
+ table: () => table
24
+ });
25
+ module.exports = __toCommonJS(table_exports);
26
+ var import_tailwind_variants = require("tailwind-variants");
27
+ var focusRing = [
28
+ "data-[focus-visible=true]:outline-none",
29
+ "data-[focus-visible=true]:ring-2",
30
+ "data-[focus-visible=true]:ring-primary",
31
+ "data-[focus-visible=true]:ring-offset-2",
32
+ "data-[focus-visible=true]:ring-offset-background",
33
+ "data-[focus-visible=true]:dark:ring-offset-background-dark"
34
+ ];
35
+ var table = (0, import_tailwind_variants.tv)({
36
+ slots: {
37
+ base: [
38
+ "p-4",
39
+ "flex",
40
+ "flex-col",
41
+ "relative",
42
+ "justify-between",
43
+ "gap-4",
44
+ "border",
45
+ "border-neutral-100",
46
+ "overflow-auto"
47
+ ],
48
+ table: "min-w-full h-auto",
49
+ thead: "[&>tr]:first:rounded-lg",
50
+ tbody: "",
51
+ tr: ["group", "outline-none", ...focusRing],
52
+ th: [
53
+ "group",
54
+ "px-3",
55
+ "h-10",
56
+ "text-left",
57
+ "align-middle",
58
+ "bg-neutral-100",
59
+ "text-neutral-500",
60
+ "text-xs",
61
+ "font-semibold",
62
+ "first:rounded-l-lg",
63
+ "last:rounded-r-lg",
64
+ "outline-none",
65
+ "data-[sortable=true]:transition-colors",
66
+ "data-[sortable=true]:cursor-pointer",
67
+ "data-[hover=true]:text-neutral-400",
68
+ ...focusRing
69
+ ],
70
+ td: [
71
+ "py-2",
72
+ "px-3",
73
+ "relative",
74
+ "align-middle",
75
+ "whitespace-normal",
76
+ "text-sm",
77
+ "font-normal",
78
+ "outline-none",
79
+ ...focusRing,
80
+ "before:content-['']",
81
+ "before:absolute",
82
+ "before:-z-[1]",
83
+ "before:inset-0",
84
+ "before:opacity-0",
85
+ "data-[selected=true]:before:opacity-100",
86
+ "group-data-[disabled=true]:text-neutral-300"
87
+ ],
88
+ tfoot: "",
89
+ sortIcon: [
90
+ "ml-2",
91
+ "mb-px",
92
+ "opacity-0",
93
+ "text-inherit",
94
+ "inline-block",
95
+ "transition-transform-opacity",
96
+ "data-[visible=true]:opacity-100",
97
+ "group-data-[hover=true]:opacity-100",
98
+ "data-[direction=ascending]:rotate-180"
99
+ ],
100
+ emptyWrapper: "text-neutral-400 align-middle text-center h-40",
101
+ loadingWrapper: "absolute inset-0 flex items-center justify-center"
102
+ },
103
+ variants: {
104
+ color: {
105
+ neutral: {
106
+ td: "before:bg-neutral-200 dark:before:bg-neutral-100 data-[selected=true]:text-neutral-foreground"
107
+ },
108
+ primary: {
109
+ td: "before:bg-primary-50 data-[selected=true]:text-primary"
110
+ },
111
+ secondary: {
112
+ td: "before:bg-secondary-100 data-[selected=true]:text-secondary"
113
+ },
114
+ success: {
115
+ td: "before:bg-success-50 data-[selected=true]:text-success"
116
+ },
117
+ warning: {
118
+ td: "before:bg-warning-50 data-[selected=true]:text-warning"
119
+ },
120
+ danger: {
121
+ td: "before:bg-danger-50 data-[selected=true]:text-danger"
122
+ }
123
+ },
124
+ layout: {
125
+ auto: {
126
+ table: "table-auto"
127
+ },
128
+ fixed: {
129
+ table: "table-fixed"
130
+ }
131
+ },
132
+ radius: {
133
+ none: {
134
+ base: "rounded-none"
135
+ },
136
+ base: {
137
+ base: "rounded"
138
+ },
139
+ sm: {
140
+ base: "rounded-sm"
141
+ },
142
+ md: {
143
+ base: "rounded-md"
144
+ },
145
+ lg: {
146
+ base: "rounded-lg"
147
+ },
148
+ xl: {
149
+ base: "rounded-xl"
150
+ },
151
+ "2xl": {
152
+ base: "rounded-2xl"
153
+ }
154
+ },
155
+ shadow: {
156
+ none: {
157
+ base: "shadow-none"
158
+ },
159
+ sm: {
160
+ base: "shadow-sm"
161
+ },
162
+ md: {
163
+ base: "shadow-md"
164
+ },
165
+ lg: {
166
+ base: "shadow-lg"
167
+ },
168
+ xl: {
169
+ base: "shadow-xl"
170
+ },
171
+ "2xl": {
172
+ base: "shadow-2xl"
173
+ },
174
+ inner: {
175
+ base: "shadow-inner"
176
+ }
177
+ },
178
+ hideHeader: {
179
+ true: {
180
+ thead: "hidden"
181
+ }
182
+ },
183
+ isStriped: {
184
+ true: {
185
+ td: [
186
+ "group-data-[odd=true]:before:bg-neutral-100",
187
+ "group-data-[odd=true]:before:opacity-100"
188
+ ]
189
+ }
190
+ },
191
+ isHeaderSticky: {
192
+ true: {
193
+ thead: "sticky top-0 z-10 [&>tr]:first:shadow"
194
+ }
195
+ },
196
+ isSelectable: {
197
+ true: {
198
+ tr: "cursor-default",
199
+ td: ["group-data-[hover=true]:before:opacity-70"]
200
+ }
201
+ },
202
+ isMultiSelectable: {
203
+ true: {
204
+ td: [
205
+ "group-data-[first=true]:first:before:rounded-tl-lg",
206
+ "group-data-[first=true]:last:before:rounded-tr-lg",
207
+ "group-data-[middle=true]:before:rounded-none",
208
+ "group-data-[last=true]:first:before:rounded-bl-lg",
209
+ "group-data-[last=true]:last:before:rounded-br-lg"
210
+ ]
211
+ },
212
+ false: {
213
+ td: ["first:before:rounded-l-lg", "last:before:rounded-r-lg"]
214
+ }
215
+ },
216
+ fullWidth: {
217
+ true: {
218
+ base: "w-full",
219
+ table: "w-full"
220
+ }
221
+ }
222
+ },
223
+ defaultVariants: {
224
+ layout: "auto",
225
+ shadow: "lg",
226
+ radius: "xl",
227
+ color: "neutral",
228
+ hideHeader: false,
229
+ isStriped: false,
230
+ fullWidth: true
231
+ }
232
+ });
233
+ // Annotate the CommonJS export names for ESM import in node:
234
+ 0 && (module.exports = {
235
+ table
236
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ table
3
+ } from "../chunk-KWWWVBJL.mjs";
4
+ export {
5
+ table
6
+ };
@@ -36,8 +36,8 @@ var user = (0, import_tailwind_variants.tv)({
36
36
  "data-[focus-visible=true]:dark:ring-offset-background-dark"
37
37
  ],
38
38
  wrapper: "inline-flex flex-col items-start",
39
- name: "text-sm text-foreground dark:text-foreground-dark",
40
- description: "text-xs text-neutral-500"
39
+ name: "text-sm text-inherit",
40
+ description: "text-xs text-neutral-400"
41
41
  }
42
42
  });
43
43
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  user
3
- } from "../chunk-2QIDY5NZ.mjs";
3
+ } from "../chunk-MW7UVOSP.mjs";
4
4
  export {
5
5
  user
6
6
  };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ export { VariantProps, tv } from 'tailwind-variants';
1
3
  export { AvatarSlots, AvatarVariantProps, avatar } from './components/avatar.js';
2
4
  export { AvatarGroupVariantProps, avatarGroup } from './components/avatar-group.js';
3
5
  export { CardReturnType, CardSlots, CardVariantProps, card } from './components/card.js';
@@ -30,12 +32,13 @@ export { dropdownMenu } from './components/dropdown-menu.js';
30
32
  export { ImageSlots, ImageVariantProps, image } from './components/image.js';
31
33
  export { ModalSlots, ModalVariantProps, modal } from './components/modal.js';
32
34
  export { NavbarSlots, NavbarVariantProps, navbar } from './components/navbar.js';
35
+ export { TableReturnType, TableSlots, TableVariantProps, table } from './components/table.js';
36
+ export { SpacerVariantProps, spacer } from './components/spacer.js';
33
37
  export { absoluteFullClasses, baseStyles, focusVisibleClasses, ringClasses, translateCenterClasses } from './utils/classes.js';
34
38
  export { SlotsToClasses } from './utils/types.js';
35
39
  export { colorVariants } from './utils/variants.js';
36
40
  export { colors } from './colors/index.js';
37
41
  export { Colors, ColorsWithScheme, ConfigFunction, ConfigObject, DefaultThemeType, NextUIConfig, nextui } from './plugin.js';
38
- export { VariantProps, tv } from 'tailwind-variants';
39
42
  export { BaseColors, ColorScale, SemanticBaseColors, SemanticColors } from './colors/types.js';
40
43
  export { commonColors } from './colors/common.js';
41
44
  export { semanticColors } from './colors/semantic.js';
@@ -43,6 +46,6 @@ import 'tailwind-variants/dist/config';
43
46
  import 'tailwindcss';
44
47
  import 'tailwindcss/types/config';
45
48
 
46
- declare const cn: (...classes: any) => string;
49
+ declare const cn: (...classes: any) => tailwind_variants.CnReturn;
47
50
 
48
51
  export { cn };