@nextui-org/theme 2.1.12 → 2.1.13
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-6XG3Y4GM.mjs → chunk-5QVKTCUZ.mjs} +28 -26
- package/dist/{chunk-RNXUUR27.mjs → chunk-D4RGWEG7.mjs} +32 -22
- package/dist/{chunk-TLWI2J7W.mjs → chunk-DNEFEC5I.mjs} +36 -28
- package/dist/components/index.js +68 -50
- package/dist/components/index.mjs +2 -2
- package/dist/components/input.d.ts +80 -10
- package/dist/components/input.js +32 -22
- package/dist/components/input.mjs +1 -1
- package/dist/components/select.d.ts +63 -7
- package/dist/components/select.js +36 -28
- package/dist/components/select.mjs +1 -1
- package/dist/index.js +96 -76
- package/dist/index.mjs +3 -3
- package/dist/plugin.js +28 -26
- package/dist/plugin.mjs +1 -1
- package/package.json +1 -1
|
@@ -37,13 +37,14 @@ import mapKeys from "lodash.mapkeys";
|
|
|
37
37
|
import kebabCase from "lodash.kebabcase";
|
|
38
38
|
import deepMerge from "deepmerge";
|
|
39
39
|
var DEFAULT_PREFIX = "nextui";
|
|
40
|
+
var parsedColorsCache = {};
|
|
40
41
|
var resolveConfig = (themes = {}, defaultTheme, prefix) => {
|
|
41
42
|
const resolved = {
|
|
42
43
|
variants: [],
|
|
43
44
|
utilities: {},
|
|
44
45
|
colors: {}
|
|
45
46
|
};
|
|
46
|
-
|
|
47
|
+
for (const [themeName, { extend, layout, colors }] of Object.entries(themes)) {
|
|
47
48
|
let cssSelector = `.${themeName},[data-theme="${themeName}"]`;
|
|
48
49
|
const scheme = themeName === "light" || themeName === "dark" ? themeName : extend;
|
|
49
50
|
if (themeName === defaultTheme) {
|
|
@@ -58,11 +59,13 @@ var resolveConfig = (themes = {}, defaultTheme, prefix) => {
|
|
|
58
59
|
name: themeName,
|
|
59
60
|
definition: [`&.${themeName}`, `&[data-theme='${themeName}']`]
|
|
60
61
|
});
|
|
61
|
-
|
|
62
|
+
for (const [colorName, colorValue] of Object.entries(flatColors)) {
|
|
62
63
|
if (!colorValue)
|
|
63
64
|
return;
|
|
64
65
|
try {
|
|
65
|
-
const
|
|
66
|
+
const parsedColor = parsedColorsCache[colorValue] || Color(colorValue).hsl().round().array();
|
|
67
|
+
parsedColorsCache[colorValue] = parsedColor;
|
|
68
|
+
const [h, s, l, defaultAlphaValue] = parsedColor;
|
|
66
69
|
const nextuiColorVariable = `--${prefix}-${colorName}`;
|
|
67
70
|
const nextuiOpacityVariable = `--${prefix}-${colorName}-opacity`;
|
|
68
71
|
resolved.utilities[cssSelector][nextuiColorVariable] = `${h} ${s}% ${l}%`;
|
|
@@ -81,32 +84,31 @@ var resolveConfig = (themes = {}, defaultTheme, prefix) => {
|
|
|
81
84
|
} catch (error) {
|
|
82
85
|
console.log("error", error == null ? void 0 : error.message);
|
|
83
86
|
}
|
|
84
|
-
}
|
|
85
|
-
|
|
87
|
+
}
|
|
88
|
+
for (const [key, value] of Object.entries(flatLayout)) {
|
|
86
89
|
if (!value)
|
|
87
90
|
return;
|
|
91
|
+
const layoutVariablePrefix = `--${prefix}-${key}`;
|
|
88
92
|
if (typeof value === "object") {
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
resolved.utilities[cssSelector][
|
|
92
|
-
}
|
|
93
|
-
} else if (key === "spacing-unit") {
|
|
94
|
-
const layoutVariable = `--${prefix}-${key}`;
|
|
95
|
-
resolved.utilities[cssSelector][layoutVariable] = value;
|
|
96
|
-
const spacingScale = generateSpacingScale(Number(value));
|
|
97
|
-
forEach(spacingScale, (v, k) => {
|
|
98
|
-
const layoutVariable2 = `--${prefix}-${key}-${k}`;
|
|
99
|
-
resolved.utilities[cssSelector][layoutVariable2] = v;
|
|
100
|
-
});
|
|
93
|
+
for (const [nestedKey, nestedValue] of Object.entries(value)) {
|
|
94
|
+
const nestedLayoutVariable = `${layoutVariablePrefix}-${nestedKey}`;
|
|
95
|
+
resolved.utilities[cssSelector][nestedLayoutVariable] = nestedValue;
|
|
96
|
+
}
|
|
101
97
|
} else {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
if (key === "spacing-unit") {
|
|
99
|
+
resolved.utilities[cssSelector][layoutVariablePrefix] = value;
|
|
100
|
+
const spacingScale = generateSpacingScale(Number(value));
|
|
101
|
+
for (const [scaleKey, scaleValue] of Object.entries(spacingScale)) {
|
|
102
|
+
const spacingVariable = `${layoutVariablePrefix}-${scaleKey}`;
|
|
103
|
+
resolved.utilities[cssSelector][spacingVariable] = scaleValue;
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
const formattedValue = layoutVariablePrefix.includes("opacity") && typeof value === "number" ? value.toString().replace(/^0\./, ".") : value;
|
|
107
|
+
resolved.utilities[cssSelector][layoutVariablePrefix] = formattedValue;
|
|
105
108
|
}
|
|
106
|
-
resolved.utilities[cssSelector][layoutVariable] = value;
|
|
107
109
|
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
110
112
|
return resolved;
|
|
111
113
|
};
|
|
112
114
|
var corePlugin = (themes = {}, defaultTheme, prefix, addCommonColors) => {
|
|
@@ -136,8 +138,8 @@ var corePlugin = (themes = {}, defaultTheme, prefix, addCommonColors) => {
|
|
|
136
138
|
...baseStyles(prefix)
|
|
137
139
|
}
|
|
138
140
|
});
|
|
139
|
-
addUtilities({ ...resolved.utilities, ...utilities });
|
|
140
|
-
resolved.variants.forEach((variant) => {
|
|
141
|
+
addUtilities({ ...resolved == null ? void 0 : resolved.utilities, ...utilities });
|
|
142
|
+
resolved == null ? void 0 : resolved.variants.forEach((variant) => {
|
|
141
143
|
addVariant(variant.name, variant.definition);
|
|
142
144
|
});
|
|
143
145
|
},
|
|
@@ -146,7 +148,7 @@ var corePlugin = (themes = {}, defaultTheme, prefix, addCommonColors) => {
|
|
|
146
148
|
extend: {
|
|
147
149
|
colors: {
|
|
148
150
|
...addCommonColors ? commonColors : {},
|
|
149
|
-
...resolved.colors
|
|
151
|
+
...resolved == null ? void 0 : resolved.colors
|
|
150
152
|
},
|
|
151
153
|
scale: {
|
|
152
154
|
"80": "0.8",
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
// src/components/input.ts
|
|
10
10
|
var input = tv({
|
|
11
11
|
slots: {
|
|
12
|
-
base:
|
|
12
|
+
base: "group flex flex-col",
|
|
13
13
|
label: [
|
|
14
14
|
"absolute",
|
|
15
15
|
"z-10",
|
|
@@ -18,15 +18,19 @@ var input = tv({
|
|
|
18
18
|
"subpixel-antialiased",
|
|
19
19
|
"block",
|
|
20
20
|
"text-small",
|
|
21
|
-
"text-foreground-500"
|
|
21
|
+
"text-foreground-500",
|
|
22
|
+
"opacity-70",
|
|
23
|
+
"group-data-[filled-within=true]:opacity-100"
|
|
22
24
|
],
|
|
23
25
|
mainWrapper: "h-full",
|
|
24
26
|
inputWrapper: "relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-sm px-3 gap-3",
|
|
25
27
|
innerWrapper: "inline-flex w-full items-center h-full box-border",
|
|
26
28
|
input: [
|
|
29
|
+
"opacity-70",
|
|
27
30
|
"w-full font-normal bg-transparent !outline-none placeholder:text-foreground-500 focus-visible:outline-none",
|
|
28
31
|
"data-[has-start-content=true]:ps-1.5",
|
|
29
|
-
"data-[has-end-content=true]:pe-1.5"
|
|
32
|
+
"data-[has-end-content=true]:pe-1.5",
|
|
33
|
+
"group-data-[has-value=true]:opacity-100"
|
|
30
34
|
],
|
|
31
35
|
clearButton: [
|
|
32
36
|
"p-2",
|
|
@@ -45,7 +49,7 @@ var input = tv({
|
|
|
45
49
|
"rounded-full",
|
|
46
50
|
...dataFocusVisibleClasses
|
|
47
51
|
],
|
|
48
|
-
helperWrapper: "
|
|
52
|
+
helperWrapper: "p-1 flex relative flex-col gap-1.5",
|
|
49
53
|
description: "text-tiny text-foreground-400",
|
|
50
54
|
errorMessage: "text-tiny text-danger"
|
|
51
55
|
},
|
|
@@ -56,7 +60,9 @@ var input = tv({
|
|
|
56
60
|
"bg-default-100",
|
|
57
61
|
"data-[hover=true]:bg-default-200",
|
|
58
62
|
"group-data-[focus=true]:bg-default-100"
|
|
59
|
-
]
|
|
63
|
+
],
|
|
64
|
+
input: "placeholder:text-default-foreground",
|
|
65
|
+
label: "text-default-foreground"
|
|
60
66
|
},
|
|
61
67
|
faded: {
|
|
62
68
|
inputWrapper: [
|
|
@@ -64,15 +70,19 @@ var input = tv({
|
|
|
64
70
|
"border-medium",
|
|
65
71
|
"border-default-200",
|
|
66
72
|
"data-[hover=true]:border-default-400"
|
|
67
|
-
]
|
|
73
|
+
],
|
|
74
|
+
input: "placeholder:text-default-foreground",
|
|
75
|
+
label: "text-default-foreground"
|
|
68
76
|
},
|
|
69
77
|
bordered: {
|
|
70
78
|
inputWrapper: [
|
|
71
79
|
"border-medium",
|
|
72
80
|
"border-default-200",
|
|
73
81
|
"data-[hover=true]:border-default-400",
|
|
74
|
-
"group-data-[focus=true]:border-foreground"
|
|
75
|
-
]
|
|
82
|
+
"group-data-[focus=true]:border-default-foreground"
|
|
83
|
+
],
|
|
84
|
+
input: "placeholder:text-foreground",
|
|
85
|
+
label: "text-foreground"
|
|
76
86
|
},
|
|
77
87
|
underlined: {
|
|
78
88
|
inputWrapper: [
|
|
@@ -89,7 +99,7 @@ var input = tv({
|
|
|
89
99
|
"after:content-['']",
|
|
90
100
|
"after:w-0",
|
|
91
101
|
"after:origin-center",
|
|
92
|
-
"after:bg-foreground",
|
|
102
|
+
"after:bg-default-foreground",
|
|
93
103
|
"after:absolute",
|
|
94
104
|
"after:left-1/2",
|
|
95
105
|
"after:-translate-x-1/2",
|
|
@@ -97,11 +107,15 @@ var input = tv({
|
|
|
97
107
|
"after:h-[2px]",
|
|
98
108
|
"group-data-[focus=true]:after:w-full"
|
|
99
109
|
],
|
|
100
|
-
innerWrapper: "pb-1"
|
|
110
|
+
innerWrapper: "pb-1",
|
|
111
|
+
input: "placeholder:text-foreground",
|
|
112
|
+
label: "text-foreground"
|
|
101
113
|
}
|
|
102
114
|
},
|
|
103
115
|
color: {
|
|
104
|
-
default: {
|
|
116
|
+
default: {
|
|
117
|
+
label: "group-data-[filled-within=true]:opacity-80"
|
|
118
|
+
},
|
|
105
119
|
primary: {},
|
|
106
120
|
secondary: {},
|
|
107
121
|
success: {},
|
|
@@ -470,13 +484,6 @@ var input = tv({
|
|
|
470
484
|
]
|
|
471
485
|
}
|
|
472
486
|
},
|
|
473
|
-
{
|
|
474
|
-
labelPlacement: "inside",
|
|
475
|
-
color: "default",
|
|
476
|
-
class: {
|
|
477
|
-
label: "group-data-[filled-within=true]:text-foreground-600"
|
|
478
|
-
}
|
|
479
|
-
},
|
|
480
487
|
{
|
|
481
488
|
isInvalid: true,
|
|
482
489
|
variant: "flat",
|
|
@@ -552,11 +559,9 @@ var input = tv({
|
|
|
552
559
|
label: [
|
|
553
560
|
"pb-0",
|
|
554
561
|
"z-20",
|
|
555
|
-
"opacity-60",
|
|
556
562
|
"top-1/2",
|
|
557
563
|
"-translate-y-1/2",
|
|
558
|
-
"group-data-[filled-within=true]:left-0"
|
|
559
|
-
"group-data-[filled-within=true]:opacity-100"
|
|
564
|
+
"group-data-[filled-within=true]:left-0"
|
|
560
565
|
]
|
|
561
566
|
}
|
|
562
567
|
},
|
|
@@ -569,7 +574,6 @@ var input = tv({
|
|
|
569
574
|
{
|
|
570
575
|
labelPlacement: ["inside"],
|
|
571
576
|
variant: "flat",
|
|
572
|
-
size: ["md", "lg"],
|
|
573
577
|
class: {
|
|
574
578
|
innerWrapper: "pb-0.5"
|
|
575
579
|
}
|
|
@@ -767,6 +771,12 @@ var input = tv({
|
|
|
767
771
|
class: {
|
|
768
772
|
input: "transition-height !duration-100 motion-reduce:transition-none"
|
|
769
773
|
}
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
labelPlacement: ["inside", "outside"],
|
|
777
|
+
class: {
|
|
778
|
+
label: ["pe-2", "max-w-full", "text-ellipsis", "overflow-hidden"]
|
|
779
|
+
}
|
|
770
780
|
}
|
|
771
781
|
]
|
|
772
782
|
});
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
// src/components/select.ts
|
|
9
9
|
var select = tv({
|
|
10
10
|
slots: {
|
|
11
|
-
base: ["group inline-flex flex-col relative w-full"
|
|
11
|
+
base: ["group inline-flex flex-col relative w-full"],
|
|
12
12
|
label: [
|
|
13
13
|
"block",
|
|
14
14
|
"absolute",
|
|
@@ -17,18 +17,26 @@ var select = tv({
|
|
|
17
17
|
"subpixel-antialiased",
|
|
18
18
|
"text-small",
|
|
19
19
|
"text-foreground-500",
|
|
20
|
-
"pointer-events-none"
|
|
20
|
+
"pointer-events-none",
|
|
21
|
+
"opacity-70",
|
|
22
|
+
"group-data-[filled=true]:opacity-100"
|
|
21
23
|
],
|
|
22
24
|
mainWrapper: "w-full flex flex-col",
|
|
23
25
|
trigger: "relative px-3 gap-3 w-full inline-flex flex-row items-center shadow-sm outline-none tap-highlight-transparent",
|
|
24
26
|
innerWrapper: "inline-flex h-full w-[calc(100%_-_theme(spacing.unit-6))] min-h-unit-4 items-center gap-1.5 box-border",
|
|
25
27
|
selectorIcon: "absolute right-3 w-unit-4 h-unit-4",
|
|
26
28
|
spinner: "absolute right-3",
|
|
27
|
-
value: [
|
|
29
|
+
value: [
|
|
30
|
+
"font-normal",
|
|
31
|
+
"w-full",
|
|
32
|
+
"text-left",
|
|
33
|
+
"opacity-70",
|
|
34
|
+
"group-data-[has-value=true]:opacity-100"
|
|
35
|
+
],
|
|
28
36
|
listboxWrapper: "scroll-py-6 max-h-64 w-full",
|
|
29
37
|
listbox: "",
|
|
30
38
|
popoverContent: "w-full p-1 overflow-hidden",
|
|
31
|
-
helperWrapper: "
|
|
39
|
+
helperWrapper: "p-1 flex relative flex-col gap-1.5",
|
|
32
40
|
description: "text-tiny text-foreground-400",
|
|
33
41
|
errorMessage: "text-tiny text-danger"
|
|
34
42
|
},
|
|
@@ -39,7 +47,9 @@ var select = tv({
|
|
|
39
47
|
"bg-default-100",
|
|
40
48
|
"data-[hover=true]:bg-default-200",
|
|
41
49
|
"group-data-[focus=true]:bg-default-100"
|
|
42
|
-
]
|
|
50
|
+
],
|
|
51
|
+
label: "text-default-foreground",
|
|
52
|
+
value: "placeholder:text-default-foreground"
|
|
43
53
|
},
|
|
44
54
|
faded: {
|
|
45
55
|
trigger: [
|
|
@@ -47,16 +57,21 @@ var select = tv({
|
|
|
47
57
|
"border-medium",
|
|
48
58
|
"border-default-200",
|
|
49
59
|
"data-[hover=true]:border-default-400"
|
|
50
|
-
]
|
|
60
|
+
],
|
|
61
|
+
label: "text-default-foreground",
|
|
62
|
+
value: "placeholder:text-default-foreground"
|
|
51
63
|
},
|
|
52
64
|
bordered: {
|
|
53
65
|
trigger: [
|
|
54
66
|
"border-medium",
|
|
55
67
|
"border-default-200",
|
|
56
68
|
"data-[hover=true]:border-default-400",
|
|
57
|
-
"data-[open=true]:border-foreground",
|
|
58
|
-
"data-[focus=true]:border-foreground"
|
|
59
|
-
|
|
69
|
+
"data-[open=true]:border-default-foreground",
|
|
70
|
+
"data-[focus=true]:border-default-foreground",
|
|
71
|
+
"data-[focus=true]:border-default-foreground"
|
|
72
|
+
],
|
|
73
|
+
label: "text-foreground",
|
|
74
|
+
value: "placeholder:text-foreground"
|
|
60
75
|
},
|
|
61
76
|
underlined: {
|
|
62
77
|
trigger: [
|
|
@@ -73,7 +88,7 @@ var select = tv({
|
|
|
73
88
|
"after:content-['']",
|
|
74
89
|
"after:w-0",
|
|
75
90
|
"after:origin-center",
|
|
76
|
-
"after:bg-foreground",
|
|
91
|
+
"after:bg-default-foreground",
|
|
77
92
|
"after:absolute",
|
|
78
93
|
"after:left-1/2",
|
|
79
94
|
"after:-translate-x-1/2",
|
|
@@ -81,12 +96,14 @@ var select = tv({
|
|
|
81
96
|
"after:h-[2px]",
|
|
82
97
|
"data-[open=true]:after:w-full",
|
|
83
98
|
"data-[focus=true]:after:w-full"
|
|
84
|
-
]
|
|
99
|
+
],
|
|
100
|
+
label: "text-foreground",
|
|
101
|
+
value: "placeholder:text-foreground"
|
|
85
102
|
}
|
|
86
103
|
},
|
|
87
104
|
color: {
|
|
88
105
|
default: {
|
|
89
|
-
|
|
106
|
+
label: "group-data-[filled=true]:opacity-80"
|
|
90
107
|
},
|
|
91
108
|
primary: {},
|
|
92
109
|
secondary: {},
|
|
@@ -447,13 +464,6 @@ var select = tv({
|
|
|
447
464
|
]
|
|
448
465
|
}
|
|
449
466
|
},
|
|
450
|
-
{
|
|
451
|
-
labelPlacement: "inside",
|
|
452
|
-
color: "default",
|
|
453
|
-
class: {
|
|
454
|
-
label: "group-data-[filled=true]:text-foreground-600"
|
|
455
|
-
}
|
|
456
|
-
},
|
|
457
467
|
{
|
|
458
468
|
isInvalid: true,
|
|
459
469
|
variant: "flat",
|
|
@@ -512,15 +522,7 @@ var select = tv({
|
|
|
512
522
|
isMultiline: false,
|
|
513
523
|
class: {
|
|
514
524
|
base: "group relative justify-end",
|
|
515
|
-
label: [
|
|
516
|
-
"pb-0",
|
|
517
|
-
"z-20",
|
|
518
|
-
"opacity-60",
|
|
519
|
-
"top-1/2",
|
|
520
|
-
"-translate-y-1/2",
|
|
521
|
-
"group-data-[filled=true]:opacity-100",
|
|
522
|
-
"group-data-[filled=true]:left-0"
|
|
523
|
-
]
|
|
525
|
+
label: ["pb-0", "z-20", "top-1/2", "-translate-y-1/2", "group-data-[filled=true]:left-0"]
|
|
524
526
|
}
|
|
525
527
|
},
|
|
526
528
|
{
|
|
@@ -672,6 +674,12 @@ var select = tv({
|
|
|
672
674
|
],
|
|
673
675
|
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_12px)]"
|
|
674
676
|
}
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
labelPlacement: ["inside", "outside"],
|
|
680
|
+
class: {
|
|
681
|
+
label: ["pe-2", "max-w-full", "text-ellipsis", "overflow-hidden"]
|
|
682
|
+
}
|
|
675
683
|
}
|
|
676
684
|
]
|
|
677
685
|
});
|
package/dist/components/index.js
CHANGED
|
@@ -3736,7 +3736,7 @@ var circularProgress = tv({
|
|
|
3736
3736
|
// src/components/input.ts
|
|
3737
3737
|
var input = tv({
|
|
3738
3738
|
slots: {
|
|
3739
|
-
base:
|
|
3739
|
+
base: "group flex flex-col",
|
|
3740
3740
|
label: [
|
|
3741
3741
|
"absolute",
|
|
3742
3742
|
"z-10",
|
|
@@ -3745,15 +3745,19 @@ var input = tv({
|
|
|
3745
3745
|
"subpixel-antialiased",
|
|
3746
3746
|
"block",
|
|
3747
3747
|
"text-small",
|
|
3748
|
-
"text-foreground-500"
|
|
3748
|
+
"text-foreground-500",
|
|
3749
|
+
"opacity-70",
|
|
3750
|
+
"group-data-[filled-within=true]:opacity-100"
|
|
3749
3751
|
],
|
|
3750
3752
|
mainWrapper: "h-full",
|
|
3751
3753
|
inputWrapper: "relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-sm px-3 gap-3",
|
|
3752
3754
|
innerWrapper: "inline-flex w-full items-center h-full box-border",
|
|
3753
3755
|
input: [
|
|
3756
|
+
"opacity-70",
|
|
3754
3757
|
"w-full font-normal bg-transparent !outline-none placeholder:text-foreground-500 focus-visible:outline-none",
|
|
3755
3758
|
"data-[has-start-content=true]:ps-1.5",
|
|
3756
|
-
"data-[has-end-content=true]:pe-1.5"
|
|
3759
|
+
"data-[has-end-content=true]:pe-1.5",
|
|
3760
|
+
"group-data-[has-value=true]:opacity-100"
|
|
3757
3761
|
],
|
|
3758
3762
|
clearButton: [
|
|
3759
3763
|
"p-2",
|
|
@@ -3772,7 +3776,7 @@ var input = tv({
|
|
|
3772
3776
|
"rounded-full",
|
|
3773
3777
|
...dataFocusVisibleClasses
|
|
3774
3778
|
],
|
|
3775
|
-
helperWrapper: "
|
|
3779
|
+
helperWrapper: "p-1 flex relative flex-col gap-1.5",
|
|
3776
3780
|
description: "text-tiny text-foreground-400",
|
|
3777
3781
|
errorMessage: "text-tiny text-danger"
|
|
3778
3782
|
},
|
|
@@ -3783,7 +3787,9 @@ var input = tv({
|
|
|
3783
3787
|
"bg-default-100",
|
|
3784
3788
|
"data-[hover=true]:bg-default-200",
|
|
3785
3789
|
"group-data-[focus=true]:bg-default-100"
|
|
3786
|
-
]
|
|
3790
|
+
],
|
|
3791
|
+
input: "placeholder:text-default-foreground",
|
|
3792
|
+
label: "text-default-foreground"
|
|
3787
3793
|
},
|
|
3788
3794
|
faded: {
|
|
3789
3795
|
inputWrapper: [
|
|
@@ -3791,15 +3797,19 @@ var input = tv({
|
|
|
3791
3797
|
"border-medium",
|
|
3792
3798
|
"border-default-200",
|
|
3793
3799
|
"data-[hover=true]:border-default-400"
|
|
3794
|
-
]
|
|
3800
|
+
],
|
|
3801
|
+
input: "placeholder:text-default-foreground",
|
|
3802
|
+
label: "text-default-foreground"
|
|
3795
3803
|
},
|
|
3796
3804
|
bordered: {
|
|
3797
3805
|
inputWrapper: [
|
|
3798
3806
|
"border-medium",
|
|
3799
3807
|
"border-default-200",
|
|
3800
3808
|
"data-[hover=true]:border-default-400",
|
|
3801
|
-
"group-data-[focus=true]:border-foreground"
|
|
3802
|
-
]
|
|
3809
|
+
"group-data-[focus=true]:border-default-foreground"
|
|
3810
|
+
],
|
|
3811
|
+
input: "placeholder:text-foreground",
|
|
3812
|
+
label: "text-foreground"
|
|
3803
3813
|
},
|
|
3804
3814
|
underlined: {
|
|
3805
3815
|
inputWrapper: [
|
|
@@ -3816,7 +3826,7 @@ var input = tv({
|
|
|
3816
3826
|
"after:content-['']",
|
|
3817
3827
|
"after:w-0",
|
|
3818
3828
|
"after:origin-center",
|
|
3819
|
-
"after:bg-foreground",
|
|
3829
|
+
"after:bg-default-foreground",
|
|
3820
3830
|
"after:absolute",
|
|
3821
3831
|
"after:left-1/2",
|
|
3822
3832
|
"after:-translate-x-1/2",
|
|
@@ -3824,11 +3834,15 @@ var input = tv({
|
|
|
3824
3834
|
"after:h-[2px]",
|
|
3825
3835
|
"group-data-[focus=true]:after:w-full"
|
|
3826
3836
|
],
|
|
3827
|
-
innerWrapper: "pb-1"
|
|
3837
|
+
innerWrapper: "pb-1",
|
|
3838
|
+
input: "placeholder:text-foreground",
|
|
3839
|
+
label: "text-foreground"
|
|
3828
3840
|
}
|
|
3829
3841
|
},
|
|
3830
3842
|
color: {
|
|
3831
|
-
default: {
|
|
3843
|
+
default: {
|
|
3844
|
+
label: "group-data-[filled-within=true]:opacity-80"
|
|
3845
|
+
},
|
|
3832
3846
|
primary: {},
|
|
3833
3847
|
secondary: {},
|
|
3834
3848
|
success: {},
|
|
@@ -4197,13 +4211,6 @@ var input = tv({
|
|
|
4197
4211
|
]
|
|
4198
4212
|
}
|
|
4199
4213
|
},
|
|
4200
|
-
{
|
|
4201
|
-
labelPlacement: "inside",
|
|
4202
|
-
color: "default",
|
|
4203
|
-
class: {
|
|
4204
|
-
label: "group-data-[filled-within=true]:text-foreground-600"
|
|
4205
|
-
}
|
|
4206
|
-
},
|
|
4207
4214
|
{
|
|
4208
4215
|
isInvalid: true,
|
|
4209
4216
|
variant: "flat",
|
|
@@ -4279,11 +4286,9 @@ var input = tv({
|
|
|
4279
4286
|
label: [
|
|
4280
4287
|
"pb-0",
|
|
4281
4288
|
"z-20",
|
|
4282
|
-
"opacity-60",
|
|
4283
4289
|
"top-1/2",
|
|
4284
4290
|
"-translate-y-1/2",
|
|
4285
|
-
"group-data-[filled-within=true]:left-0"
|
|
4286
|
-
"group-data-[filled-within=true]:opacity-100"
|
|
4291
|
+
"group-data-[filled-within=true]:left-0"
|
|
4287
4292
|
]
|
|
4288
4293
|
}
|
|
4289
4294
|
},
|
|
@@ -4296,7 +4301,6 @@ var input = tv({
|
|
|
4296
4301
|
{
|
|
4297
4302
|
labelPlacement: ["inside"],
|
|
4298
4303
|
variant: "flat",
|
|
4299
|
-
size: ["md", "lg"],
|
|
4300
4304
|
class: {
|
|
4301
4305
|
innerWrapper: "pb-0.5"
|
|
4302
4306
|
}
|
|
@@ -4494,6 +4498,12 @@ var input = tv({
|
|
|
4494
4498
|
class: {
|
|
4495
4499
|
input: "transition-height !duration-100 motion-reduce:transition-none"
|
|
4496
4500
|
}
|
|
4501
|
+
},
|
|
4502
|
+
{
|
|
4503
|
+
labelPlacement: ["inside", "outside"],
|
|
4504
|
+
class: {
|
|
4505
|
+
label: ["pe-2", "max-w-full", "text-ellipsis", "overflow-hidden"]
|
|
4506
|
+
}
|
|
4497
4507
|
}
|
|
4498
4508
|
]
|
|
4499
4509
|
});
|
|
@@ -6012,7 +6022,7 @@ var skeleton = tv({
|
|
|
6012
6022
|
// src/components/select.ts
|
|
6013
6023
|
var select = tv({
|
|
6014
6024
|
slots: {
|
|
6015
|
-
base: ["group inline-flex flex-col relative w-full"
|
|
6025
|
+
base: ["group inline-flex flex-col relative w-full"],
|
|
6016
6026
|
label: [
|
|
6017
6027
|
"block",
|
|
6018
6028
|
"absolute",
|
|
@@ -6021,18 +6031,26 @@ var select = tv({
|
|
|
6021
6031
|
"subpixel-antialiased",
|
|
6022
6032
|
"text-small",
|
|
6023
6033
|
"text-foreground-500",
|
|
6024
|
-
"pointer-events-none"
|
|
6034
|
+
"pointer-events-none",
|
|
6035
|
+
"opacity-70",
|
|
6036
|
+
"group-data-[filled=true]:opacity-100"
|
|
6025
6037
|
],
|
|
6026
6038
|
mainWrapper: "w-full flex flex-col",
|
|
6027
6039
|
trigger: "relative px-3 gap-3 w-full inline-flex flex-row items-center shadow-sm outline-none tap-highlight-transparent",
|
|
6028
6040
|
innerWrapper: "inline-flex h-full w-[calc(100%_-_theme(spacing.unit-6))] min-h-unit-4 items-center gap-1.5 box-border",
|
|
6029
6041
|
selectorIcon: "absolute right-3 w-unit-4 h-unit-4",
|
|
6030
6042
|
spinner: "absolute right-3",
|
|
6031
|
-
value: [
|
|
6043
|
+
value: [
|
|
6044
|
+
"font-normal",
|
|
6045
|
+
"w-full",
|
|
6046
|
+
"text-left",
|
|
6047
|
+
"opacity-70",
|
|
6048
|
+
"group-data-[has-value=true]:opacity-100"
|
|
6049
|
+
],
|
|
6032
6050
|
listboxWrapper: "scroll-py-6 max-h-64 w-full",
|
|
6033
6051
|
listbox: "",
|
|
6034
6052
|
popoverContent: "w-full p-1 overflow-hidden",
|
|
6035
|
-
helperWrapper: "
|
|
6053
|
+
helperWrapper: "p-1 flex relative flex-col gap-1.5",
|
|
6036
6054
|
description: "text-tiny text-foreground-400",
|
|
6037
6055
|
errorMessage: "text-tiny text-danger"
|
|
6038
6056
|
},
|
|
@@ -6043,7 +6061,9 @@ var select = tv({
|
|
|
6043
6061
|
"bg-default-100",
|
|
6044
6062
|
"data-[hover=true]:bg-default-200",
|
|
6045
6063
|
"group-data-[focus=true]:bg-default-100"
|
|
6046
|
-
]
|
|
6064
|
+
],
|
|
6065
|
+
label: "text-default-foreground",
|
|
6066
|
+
value: "placeholder:text-default-foreground"
|
|
6047
6067
|
},
|
|
6048
6068
|
faded: {
|
|
6049
6069
|
trigger: [
|
|
@@ -6051,16 +6071,21 @@ var select = tv({
|
|
|
6051
6071
|
"border-medium",
|
|
6052
6072
|
"border-default-200",
|
|
6053
6073
|
"data-[hover=true]:border-default-400"
|
|
6054
|
-
]
|
|
6074
|
+
],
|
|
6075
|
+
label: "text-default-foreground",
|
|
6076
|
+
value: "placeholder:text-default-foreground"
|
|
6055
6077
|
},
|
|
6056
6078
|
bordered: {
|
|
6057
6079
|
trigger: [
|
|
6058
6080
|
"border-medium",
|
|
6059
6081
|
"border-default-200",
|
|
6060
6082
|
"data-[hover=true]:border-default-400",
|
|
6061
|
-
"data-[open=true]:border-foreground",
|
|
6062
|
-
"data-[focus=true]:border-foreground"
|
|
6063
|
-
|
|
6083
|
+
"data-[open=true]:border-default-foreground",
|
|
6084
|
+
"data-[focus=true]:border-default-foreground",
|
|
6085
|
+
"data-[focus=true]:border-default-foreground"
|
|
6086
|
+
],
|
|
6087
|
+
label: "text-foreground",
|
|
6088
|
+
value: "placeholder:text-foreground"
|
|
6064
6089
|
},
|
|
6065
6090
|
underlined: {
|
|
6066
6091
|
trigger: [
|
|
@@ -6077,7 +6102,7 @@ var select = tv({
|
|
|
6077
6102
|
"after:content-['']",
|
|
6078
6103
|
"after:w-0",
|
|
6079
6104
|
"after:origin-center",
|
|
6080
|
-
"after:bg-foreground",
|
|
6105
|
+
"after:bg-default-foreground",
|
|
6081
6106
|
"after:absolute",
|
|
6082
6107
|
"after:left-1/2",
|
|
6083
6108
|
"after:-translate-x-1/2",
|
|
@@ -6085,12 +6110,14 @@ var select = tv({
|
|
|
6085
6110
|
"after:h-[2px]",
|
|
6086
6111
|
"data-[open=true]:after:w-full",
|
|
6087
6112
|
"data-[focus=true]:after:w-full"
|
|
6088
|
-
]
|
|
6113
|
+
],
|
|
6114
|
+
label: "text-foreground",
|
|
6115
|
+
value: "placeholder:text-foreground"
|
|
6089
6116
|
}
|
|
6090
6117
|
},
|
|
6091
6118
|
color: {
|
|
6092
6119
|
default: {
|
|
6093
|
-
|
|
6120
|
+
label: "group-data-[filled=true]:opacity-80"
|
|
6094
6121
|
},
|
|
6095
6122
|
primary: {},
|
|
6096
6123
|
secondary: {},
|
|
@@ -6451,13 +6478,6 @@ var select = tv({
|
|
|
6451
6478
|
]
|
|
6452
6479
|
}
|
|
6453
6480
|
},
|
|
6454
|
-
{
|
|
6455
|
-
labelPlacement: "inside",
|
|
6456
|
-
color: "default",
|
|
6457
|
-
class: {
|
|
6458
|
-
label: "group-data-[filled=true]:text-foreground-600"
|
|
6459
|
-
}
|
|
6460
|
-
},
|
|
6461
6481
|
{
|
|
6462
6482
|
isInvalid: true,
|
|
6463
6483
|
variant: "flat",
|
|
@@ -6516,15 +6536,7 @@ var select = tv({
|
|
|
6516
6536
|
isMultiline: false,
|
|
6517
6537
|
class: {
|
|
6518
6538
|
base: "group relative justify-end",
|
|
6519
|
-
label: [
|
|
6520
|
-
"pb-0",
|
|
6521
|
-
"z-20",
|
|
6522
|
-
"opacity-60",
|
|
6523
|
-
"top-1/2",
|
|
6524
|
-
"-translate-y-1/2",
|
|
6525
|
-
"group-data-[filled=true]:opacity-100",
|
|
6526
|
-
"group-data-[filled=true]:left-0"
|
|
6527
|
-
]
|
|
6539
|
+
label: ["pb-0", "z-20", "top-1/2", "-translate-y-1/2", "group-data-[filled=true]:left-0"]
|
|
6528
6540
|
}
|
|
6529
6541
|
},
|
|
6530
6542
|
{
|
|
@@ -6676,6 +6688,12 @@ var select = tv({
|
|
|
6676
6688
|
],
|
|
6677
6689
|
base: "data-[has-label=true]:mt-[calc(theme(fontSize.small)_+_12px)]"
|
|
6678
6690
|
}
|
|
6691
|
+
},
|
|
6692
|
+
{
|
|
6693
|
+
labelPlacement: ["inside", "outside"],
|
|
6694
|
+
class: {
|
|
6695
|
+
label: ["pe-2", "max-w-full", "text-ellipsis", "overflow-hidden"]
|
|
6696
|
+
}
|
|
6679
6697
|
}
|
|
6680
6698
|
]
|
|
6681
6699
|
});
|