@vaneui/ui 0.2.1-alpha.20250901145733.e9c8d4d → 0.2.2-alpha.20250907183237.5f63365
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/index.esm.js +280 -441
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +280 -440
- package/dist/index.js.map +1 -1
- package/dist/playground/src/App.d.ts +2 -0
- package/dist/playground/src/index.d.ts +2 -0
- package/dist/{components → src/components}/tests/utils/propOmissionTestUtils.d.ts +4 -9
- package/dist/src/components/tests/visual-decoration.test.d.ts +1 -0
- package/dist/{components → src/components}/themedComponent.d.ts +4 -2
- package/dist/src/components/ui/badge.d.ts +2 -0
- package/dist/src/components/ui/button.d.ts +2 -0
- package/dist/src/components/ui/card.d.ts +2 -0
- package/dist/{components → src/components}/ui/checkbox.d.ts +3 -4
- package/dist/src/components/ui/chip.d.ts +2 -0
- package/dist/src/components/ui/classes/radiusClasses.d.ts +3 -0
- package/dist/{components → src/components}/ui/code.d.ts +3 -4
- package/dist/src/components/ui/col.d.ts +2 -0
- package/dist/src/components/ui/container.d.ts +2 -0
- package/dist/{components → src/components}/ui/divider.d.ts +3 -4
- package/dist/src/components/ui/grid.d.ts +4 -0
- package/dist/{components → src/components}/ui/img.d.ts +3 -4
- package/dist/{components → src/components}/ui/label.d.ts +3 -4
- package/dist/{components → src/components}/ui/props/keys.d.ts +6 -5
- package/dist/src/components/ui/row.d.ts +2 -0
- package/dist/src/components/ui/section.d.ts +2 -0
- package/dist/src/components/ui/stack.d.ts +2 -0
- package/dist/src/components/ui/theme/appearance/appearanceTheme.d.ts +20 -0
- package/dist/{components → src/components}/ui/theme/appearance/genericVariantTheme.d.ts +4 -7
- package/dist/src/components/ui/theme/appearance/shadowAppearanceTheme.d.ts +21 -0
- package/dist/src/components/ui/theme/layout/borderTheme.d.ts +9 -0
- package/dist/src/components/ui/theme/layout/directionTheme.d.ts +10 -0
- package/dist/src/components/ui/theme/layout/displayTheme.d.ts +17 -0
- package/dist/src/components/ui/theme/layout/hideTheme.d.ts +11 -0
- package/dist/src/components/ui/theme/layout/itemsTheme.d.ts +11 -0
- package/dist/src/components/ui/theme/layout/justifyTheme.d.ts +14 -0
- package/dist/src/components/ui/theme/layout/overflowTheme.d.ts +21 -0
- package/dist/src/components/ui/theme/layout/positionTheme.d.ts +11 -0
- package/dist/{components → src/components}/ui/theme/layout/radiusTheme.d.ts +1 -6
- package/dist/src/components/ui/theme/layout/ringTheme.d.ts +9 -0
- package/dist/src/components/ui/theme/layout/wrapTheme.d.ts +9 -0
- package/dist/src/components/ui/theme/list/listStyleTheme.d.ts +8 -0
- package/dist/src/components/ui/theme/size/breakpointTheme.d.ts +11 -0
- package/dist/{components → src/components}/ui/theme/size/gapTheme.d.ts +6 -4
- package/dist/{components → src/components}/ui/theme/size/paddingTheme.d.ts +6 -4
- package/dist/{components → src/components}/ui/theme/size/plTheme.d.ts +0 -3
- package/dist/{components → src/components}/ui/theme/size/pxTheme.d.ts +0 -3
- package/dist/{components → src/components}/ui/theme/size/pyTheme.d.ts +0 -3
- package/dist/{components → src/components}/ui/theme/size/sizeTheme.d.ts +6 -3
- package/dist/src/components/ui/theme/typography/fontFamilyTheme.d.ts +8 -0
- package/dist/src/components/ui/theme/typography/fontStyleTheme.d.ts +8 -0
- package/dist/src/components/ui/theme/typography/fontWeightTheme.d.ts +15 -0
- package/dist/src/components/ui/theme/typography/textAlignTheme.d.ts +10 -0
- package/dist/src/components/ui/theme/typography/textDecorationTheme.d.ts +10 -0
- package/dist/src/components/ui/theme/typography/textTransformTheme.d.ts +10 -0
- package/dist/{components → src/components}/ui/theme/typographyTheme.d.ts +1 -1
- package/dist/{components → src/components}/ui/typography.d.ts +9 -10
- package/dist/{components → src/components}/utils/componentUtils.d.ts +1 -1
- package/package.json +9 -2
- package/dist/components/examples/ref-usage-examples.d.ts +0 -29
- package/dist/components/examples/theme-types-strictness-compile-check.d.ts +0 -5
- package/dist/components/ui/badge.d.ts +0 -3
- package/dist/components/ui/button.d.ts +0 -3
- package/dist/components/ui/card.d.ts +0 -3
- package/dist/components/ui/chip.d.ts +0 -3
- package/dist/components/ui/classes/radiusClasses.d.ts +0 -5
- package/dist/components/ui/col.d.ts +0 -3
- package/dist/components/ui/container.d.ts +0 -3
- package/dist/components/ui/grid.d.ts +0 -5
- package/dist/components/ui/row.d.ts +0 -3
- package/dist/components/ui/section.d.ts +0 -3
- package/dist/components/ui/stack.d.ts +0 -3
- package/dist/components/ui/theme/appearance/appearanceTheme.d.ts +0 -11
- package/dist/components/ui/theme/appearance/shadowAppearanceTheme.d.ts +0 -13
- package/dist/components/ui/theme/layout/borderTheme.d.ts +0 -10
- package/dist/components/ui/theme/layout/directionTheme.d.ts +0 -10
- package/dist/components/ui/theme/layout/displayTheme.d.ts +0 -10
- package/dist/components/ui/theme/layout/hideTheme.d.ts +0 -10
- package/dist/components/ui/theme/layout/itemsTheme.d.ts +0 -10
- package/dist/components/ui/theme/layout/justifyTheme.d.ts +0 -10
- package/dist/components/ui/theme/layout/overflowTheme.d.ts +0 -10
- package/dist/components/ui/theme/layout/positionTheme.d.ts +0 -10
- package/dist/components/ui/theme/layout/ringTheme.d.ts +0 -10
- package/dist/components/ui/theme/layout/wrapTheme.d.ts +0 -10
- package/dist/components/ui/theme/list/listStyleTheme.d.ts +0 -10
- package/dist/components/ui/theme/size/breakpointTheme.d.ts +0 -10
- package/dist/components/ui/theme/typography/fontFamilyTheme.d.ts +0 -9
- package/dist/components/ui/theme/typography/fontStyleTheme.d.ts +0 -10
- package/dist/components/ui/theme/typography/fontWeightTheme.d.ts +0 -10
- package/dist/components/ui/theme/typography/textAlignTheme.d.ts +0 -10
- package/dist/components/ui/theme/typography/textDecorationTheme.d.ts +0 -10
- package/dist/components/ui/theme/typography/textTransformTheme.d.ts +0 -10
- /package/dist/{components → src/components}/complex/sharer.d.ts +0 -0
- /package/dist/{components → src/components}/tests/badge.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/button.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/card.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/checkbox.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/chip.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/code.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/col.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/componentThemeCoverage.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/container.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/deepMerge.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/divider.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/extra-classes.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/grid.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/grid2.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/img.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/label.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/link.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/linkable.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/list.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/nested-theme-providers-simple.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/nested-theme-providers.test.d.ts +0 -0
- /package/dist/{components/tests/prop-filtering.test.d.ts → src/components/tests/pickFirstTruthyKeyByCategory.test.d.ts} +0 -0
- /package/dist/{components/tests/prop-types-validation.test.d.ts → src/components/tests/prop-filtering.test.d.ts} +0 -0
- /package/dist/{components → src/components}/tests/prop-omission-edge-cases.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/prop-omission.test.d.ts +0 -0
- /package/dist/{components/tests/theme-collections.test.d.ts → src/components/tests/prop-types-validation.test.d.ts} +0 -0
- /package/dist/{components → src/components}/tests/ref-support-comprehensive.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/ref-support.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/row.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/section.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/stack.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/text.test.d.ts +0 -0
- /package/dist/{components/tests/visual-decoration.test.d.ts → src/components/tests/theme-collections.test.d.ts} +0 -0
- /package/dist/{components → src/components}/tests/theme-override.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/theme-types-strictness.test.d.ts +0 -0
- /package/dist/{components → src/components}/tests/title.test.d.ts +0 -0
- /package/dist/{components → src/components}/themeContext.d.ts +0 -0
- /package/dist/{components → src/components}/ui/classes/appearanceClasses.d.ts +0 -0
- /package/dist/{components → src/components}/ui/classes/typographyClasses.d.ts +0 -0
- /package/dist/{components → src/components}/ui/layout.d.ts +0 -0
- /package/dist/{components → src/components}/ui/props/index.d.ts +0 -0
- /package/dist/{components → src/components}/ui/props/props.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/badgeTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/buttonTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/cardTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/checkboxTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/chipTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/codeTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/colTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/common/ComponentTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/common/baseTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/containerTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/defaults.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/dividerTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/gridTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/imgTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/labelTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/rowTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/sectionTheme.d.ts +0 -0
- /package/dist/{components → src/components}/ui/theme/stackTheme.d.ts +0 -0
- /package/dist/{components → src/components}/utils/deepMerge.d.ts +0 -0
- /package/dist/{components → src/components}/utils/deepPartial.d.ts +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{setupTests.d.ts → src/setupTests.d.ts} +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -32,6 +32,11 @@ const COMPONENT_PROPS_CATEGORY = [
|
|
|
32
32
|
...VARIANT,
|
|
33
33
|
'mode',
|
|
34
34
|
];
|
|
35
|
+
/**
|
|
36
|
+
* Describes what the @ComponentKeys.appearance can be applied to
|
|
37
|
+
* @see ComponentKeys.appearance
|
|
38
|
+
*/
|
|
39
|
+
const APPEARANCE_CATEGORY = ['text', 'border', 'ring', 'shadow', 'bg', 'accent'];
|
|
35
40
|
const ComponentKeys = {
|
|
36
41
|
appearance: ['default', 'accent', 'primary', 'secondary', 'tertiary', 'success', 'danger', 'warning', 'info', 'link'],
|
|
37
42
|
border: ['border', 'noBorder'],
|
|
@@ -118,244 +123,163 @@ const ComponentCategories = {
|
|
|
118
123
|
};
|
|
119
124
|
|
|
120
125
|
class HideTheme extends BaseTheme {
|
|
121
|
-
constructor(
|
|
122
|
-
super();
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
constructor() {
|
|
127
|
+
super(...arguments);
|
|
128
|
+
this.xsHide = "max-xs:hidden";
|
|
129
|
+
this.smHide = "max-sm:hidden";
|
|
130
|
+
this.mdHide = "max-md:hidden";
|
|
131
|
+
this.lgHide = "max-lg:hidden";
|
|
132
|
+
this.xlHide = "max-xl:hidden";
|
|
127
133
|
}
|
|
128
134
|
getClasses(extractedKeys) {
|
|
129
|
-
|
|
130
|
-
return [key ? this[key] : ''];
|
|
135
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.hide) ? this[extractedKeys.hide] : ''];
|
|
131
136
|
}
|
|
132
137
|
}
|
|
133
|
-
HideTheme.defaultClasses = {
|
|
134
|
-
xsHide: "max-xs:hidden",
|
|
135
|
-
smHide: "max-sm:hidden",
|
|
136
|
-
mdHide: "max-md:hidden",
|
|
137
|
-
lgHide: "max-lg:hidden",
|
|
138
|
-
xlHide: "max-xl:hidden"
|
|
139
|
-
};
|
|
140
138
|
|
|
141
139
|
class ItemsTheme extends BaseTheme {
|
|
142
|
-
constructor(
|
|
143
|
-
super();
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
constructor() {
|
|
141
|
+
super(...arguments);
|
|
142
|
+
this.itemsStart = "items-start";
|
|
143
|
+
this.itemsEnd = "items-end";
|
|
144
|
+
this.itemsCenter = "items-center";
|
|
145
|
+
this.itemsBaseline = "items-baseline";
|
|
146
|
+
this.itemsStretch = "items-stretch";
|
|
148
147
|
}
|
|
149
148
|
getClasses(extractedKeys) {
|
|
150
|
-
|
|
151
|
-
return [pickedKey && this[pickedKey] ? this[pickedKey] : ''];
|
|
149
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.items) && this[extractedKeys.items] ? this[extractedKeys.items] : ''];
|
|
152
150
|
}
|
|
153
151
|
}
|
|
154
|
-
ItemsTheme.defaultClasses = {
|
|
155
|
-
itemsStart: "items-start",
|
|
156
|
-
itemsEnd: "items-end",
|
|
157
|
-
itemsCenter: "items-center",
|
|
158
|
-
itemsBaseline: "items-baseline",
|
|
159
|
-
itemsStretch: "items-stretch",
|
|
160
|
-
};
|
|
161
152
|
|
|
162
153
|
class JustifyTheme extends BaseTheme {
|
|
163
|
-
constructor(
|
|
164
|
-
super();
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
154
|
+
constructor() {
|
|
155
|
+
super(...arguments);
|
|
156
|
+
this.justifyStart = "justify-start";
|
|
157
|
+
this.justifyEnd = "justify-end";
|
|
158
|
+
this.justifyCenter = "justify-center";
|
|
159
|
+
this.justifyBetween = "justify-between";
|
|
160
|
+
this.justifyAround = "justify-around";
|
|
161
|
+
this.justifyEvenly = "justify-evenly";
|
|
162
|
+
this.justifyStretch = "justify-stretch";
|
|
163
|
+
this.justifyBaseline = "justify-baseline";
|
|
169
164
|
}
|
|
170
165
|
getClasses(extractedKeys) {
|
|
171
|
-
|
|
172
|
-
return [key ? this[key] : ''];
|
|
166
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.justify) ? this[extractedKeys.justify] : ''];
|
|
173
167
|
}
|
|
174
168
|
}
|
|
175
|
-
JustifyTheme.defaultClasses = {
|
|
176
|
-
justifyStart: "justify-start",
|
|
177
|
-
justifyEnd: "justify-end",
|
|
178
|
-
justifyCenter: "justify-center",
|
|
179
|
-
justifyBetween: "justify-between",
|
|
180
|
-
justifyAround: "justify-around",
|
|
181
|
-
justifyEvenly: "justify-evenly",
|
|
182
|
-
justifyStretch: "justify-stretch",
|
|
183
|
-
justifyBaseline: "justify-baseline",
|
|
184
|
-
};
|
|
185
169
|
|
|
186
170
|
class PositionTheme extends BaseTheme {
|
|
187
|
-
constructor(
|
|
188
|
-
super();
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
171
|
+
constructor() {
|
|
172
|
+
super(...arguments);
|
|
173
|
+
this.relative = "relative";
|
|
174
|
+
this.absolute = "absolute";
|
|
175
|
+
this.fixed = "fixed";
|
|
176
|
+
this.sticky = "sticky";
|
|
177
|
+
this.static = "static";
|
|
193
178
|
}
|
|
194
179
|
getClasses(extractedKeys) {
|
|
195
|
-
|
|
196
|
-
return [key ? this[key] : ''];
|
|
180
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.position) ? this[extractedKeys.position] : ''];
|
|
197
181
|
}
|
|
198
182
|
}
|
|
199
|
-
PositionTheme.defaultClasses = {
|
|
200
|
-
relative: "relative",
|
|
201
|
-
absolute: "absolute",
|
|
202
|
-
fixed: "fixed",
|
|
203
|
-
sticky: "sticky",
|
|
204
|
-
static: "static"
|
|
205
|
-
};
|
|
206
183
|
|
|
207
184
|
class FontStyleTheme extends BaseTheme {
|
|
208
|
-
constructor(
|
|
209
|
-
super();
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : FontStyleTheme.defaultClasses[key];
|
|
213
|
-
});
|
|
185
|
+
constructor() {
|
|
186
|
+
super(...arguments);
|
|
187
|
+
this.italic = "italic";
|
|
188
|
+
this.notItalic = "not-italic";
|
|
214
189
|
}
|
|
215
190
|
getClasses(extractedKeys) {
|
|
216
|
-
|
|
217
|
-
return [key ? this[key] : '']; // No default for font style
|
|
191
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.fontStyle) ? this[extractedKeys.fontStyle] : ''];
|
|
218
192
|
}
|
|
219
193
|
}
|
|
220
|
-
FontStyleTheme.defaultClasses = {
|
|
221
|
-
italic: "italic",
|
|
222
|
-
notItalic: "not-italic",
|
|
223
|
-
};
|
|
224
194
|
|
|
225
195
|
class FontFamilyTheme extends BaseTheme {
|
|
226
|
-
constructor(
|
|
227
|
-
super();
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
});
|
|
196
|
+
constructor() {
|
|
197
|
+
super(...arguments);
|
|
198
|
+
this.sans = "font-sans";
|
|
199
|
+
this.serif = "font-serif";
|
|
200
|
+
this.mono = "font-mono";
|
|
232
201
|
}
|
|
233
202
|
getClasses(extractedKeys) {
|
|
234
|
-
|
|
235
|
-
if (key === undefined)
|
|
236
|
-
return [];
|
|
237
|
-
return [this[key]];
|
|
203
|
+
return (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.fontFamily) ? [this[extractedKeys.fontFamily]] : [];
|
|
238
204
|
}
|
|
239
205
|
}
|
|
240
|
-
FontFamilyTheme.defaultClasses = {
|
|
241
|
-
sans: "font-sans",
|
|
242
|
-
serif: "font-serif",
|
|
243
|
-
mono: "font-mono",
|
|
244
|
-
};
|
|
245
206
|
|
|
246
207
|
class FontWeightTheme extends BaseTheme {
|
|
247
|
-
constructor(
|
|
248
|
-
super();
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
208
|
+
constructor() {
|
|
209
|
+
super(...arguments);
|
|
210
|
+
this.thin = "font-thin";
|
|
211
|
+
this.extralight = "font-extralight";
|
|
212
|
+
this.light = "font-light";
|
|
213
|
+
this.normal = "font-normal";
|
|
214
|
+
this.medium = "font-medium";
|
|
215
|
+
this.semibold = "font-semibold";
|
|
216
|
+
this.bold = "font-bold";
|
|
217
|
+
this.extrabold = "font-extrabold";
|
|
218
|
+
this.black = "font-black";
|
|
253
219
|
}
|
|
254
220
|
getClasses(extractedKeys) {
|
|
255
|
-
|
|
256
|
-
if (key === undefined)
|
|
257
|
-
return [];
|
|
258
|
-
return [this[key]];
|
|
221
|
+
return (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.fontWeight) ? [this[extractedKeys.fontWeight]] : [];
|
|
259
222
|
}
|
|
260
223
|
}
|
|
261
|
-
FontWeightTheme.defaultClasses = {
|
|
262
|
-
thin: "font-thin",
|
|
263
|
-
extralight: "font-extralight",
|
|
264
|
-
light: "font-light",
|
|
265
|
-
normal: "font-normal",
|
|
266
|
-
medium: "font-medium",
|
|
267
|
-
semibold: "font-semibold",
|
|
268
|
-
bold: "font-bold",
|
|
269
|
-
extrabold: "font-extrabold",
|
|
270
|
-
black: "font-black",
|
|
271
|
-
};
|
|
272
224
|
|
|
273
225
|
class TextDecorationTheme extends BaseTheme {
|
|
274
|
-
constructor(
|
|
275
|
-
super();
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
226
|
+
constructor() {
|
|
227
|
+
super(...arguments);
|
|
228
|
+
this.underline = "underline";
|
|
229
|
+
this.lineThrough = "line-through";
|
|
230
|
+
this.noUnderline = "no-underline";
|
|
231
|
+
this.overline = "overline";
|
|
280
232
|
}
|
|
281
233
|
getClasses(extractedKeys) {
|
|
282
|
-
|
|
283
|
-
return [key ? this[key] : '']; // No default for text decoration
|
|
234
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.textDecoration) ? this[extractedKeys.textDecoration] : ''];
|
|
284
235
|
}
|
|
285
236
|
}
|
|
286
|
-
TextDecorationTheme.defaultClasses = {
|
|
287
|
-
underline: "underline",
|
|
288
|
-
lineThrough: "line-through",
|
|
289
|
-
noUnderline: "no-underline",
|
|
290
|
-
overline: "overline",
|
|
291
|
-
};
|
|
292
237
|
|
|
293
238
|
class TextTransformTheme extends BaseTheme {
|
|
294
|
-
constructor(
|
|
295
|
-
super();
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
239
|
+
constructor() {
|
|
240
|
+
super(...arguments);
|
|
241
|
+
this.uppercase = "uppercase";
|
|
242
|
+
this.lowercase = "lowercase";
|
|
243
|
+
this.capitalize = "capitalize";
|
|
244
|
+
this.normalCase = "normal-case";
|
|
300
245
|
}
|
|
301
246
|
getClasses(extractedKeys) {
|
|
302
|
-
|
|
303
|
-
return [key ? this[key] : '']; // No default for text transform
|
|
247
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.textTransform) ? this[extractedKeys.textTransform] : ''];
|
|
304
248
|
}
|
|
305
249
|
}
|
|
306
|
-
TextTransformTheme.defaultClasses = {
|
|
307
|
-
uppercase: "uppercase",
|
|
308
|
-
lowercase: "lowercase",
|
|
309
|
-
capitalize: "capitalize",
|
|
310
|
-
normalCase: "normal-case",
|
|
311
|
-
};
|
|
312
250
|
|
|
313
251
|
class TextAlignTheme extends BaseTheme {
|
|
314
|
-
constructor(
|
|
315
|
-
super();
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
252
|
+
constructor() {
|
|
253
|
+
super(...arguments);
|
|
254
|
+
this.textLeft = "text-left";
|
|
255
|
+
this.textCenter = "text-center";
|
|
256
|
+
this.textRight = "text-right";
|
|
257
|
+
this.textJustify = "text-justify";
|
|
320
258
|
}
|
|
321
259
|
getClasses(extractedKeys) {
|
|
322
|
-
|
|
323
|
-
return [key ? this[key] : '']; // No default for text align
|
|
260
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.textAlign) ? this[extractedKeys.textAlign] : ''];
|
|
324
261
|
}
|
|
325
262
|
}
|
|
326
|
-
TextAlignTheme.defaultClasses = {
|
|
327
|
-
textLeft: "text-left",
|
|
328
|
-
textCenter: "text-center",
|
|
329
|
-
textRight: "text-right",
|
|
330
|
-
textJustify: "text-justify",
|
|
331
|
-
};
|
|
332
263
|
|
|
333
264
|
class DisplayTheme extends BaseTheme {
|
|
334
|
-
constructor(
|
|
335
|
-
super();
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
265
|
+
constructor() {
|
|
266
|
+
super(...arguments);
|
|
267
|
+
this.inline = "inline";
|
|
268
|
+
this.block = "block";
|
|
269
|
+
this.inlineBlock = "inline-block";
|
|
270
|
+
this.flex = "flex";
|
|
271
|
+
this.inlineFlex = "inline-flex";
|
|
272
|
+
this.grid = "grid";
|
|
273
|
+
this.inlineGrid = "inline-grid";
|
|
274
|
+
this.contents = "contents";
|
|
275
|
+
this.table = "table";
|
|
276
|
+
this.tableCell = "table-cell";
|
|
277
|
+
this.hidden = "hidden";
|
|
340
278
|
}
|
|
341
279
|
getClasses(extractedKeys) {
|
|
342
|
-
|
|
343
|
-
return [key && this[key] ? this[key] : ''];
|
|
280
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.display) && this[extractedKeys.display] ? this[extractedKeys.display] : ''];
|
|
344
281
|
}
|
|
345
282
|
}
|
|
346
|
-
DisplayTheme.defaultClasses = {
|
|
347
|
-
inline: "inline",
|
|
348
|
-
block: "block",
|
|
349
|
-
inlineBlock: "inline-block",
|
|
350
|
-
flex: "flex",
|
|
351
|
-
inlineFlex: "inline-flex",
|
|
352
|
-
grid: "grid",
|
|
353
|
-
inlineGrid: "inline-grid",
|
|
354
|
-
contents: "contents",
|
|
355
|
-
table: "table",
|
|
356
|
-
tableCell: "table-cell",
|
|
357
|
-
hidden: "hidden"
|
|
358
|
-
};
|
|
359
283
|
|
|
360
284
|
const CLASS_PART_SEPARATOR = '-';
|
|
361
285
|
const createClassGroupUtils = config => {
|
|
@@ -3069,35 +2993,28 @@ const getDefaultConfig = () => {
|
|
|
3069
2993
|
const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
|
|
3070
2994
|
|
|
3071
2995
|
class OverflowTheme extends BaseTheme {
|
|
3072
|
-
constructor(
|
|
3073
|
-
super();
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
2996
|
+
constructor() {
|
|
2997
|
+
super(...arguments);
|
|
2998
|
+
this.overflowAuto = 'overflow-auto';
|
|
2999
|
+
this.overflowHidden = 'overflow-hidden';
|
|
3000
|
+
this.overflowClip = 'overflow-clip';
|
|
3001
|
+
this.overflowVisible = 'overflow-visible';
|
|
3002
|
+
this.overflowScroll = 'overflow-scroll';
|
|
3003
|
+
this.overflowXAuto = 'overflow-x-auto';
|
|
3004
|
+
this.overflowYAuto = 'overflow-y-auto';
|
|
3005
|
+
this.overflowXHidden = 'overflow-x-hidden';
|
|
3006
|
+
this.overflowYHidden = 'overflow-y-hidden';
|
|
3007
|
+
this.overflowXClip = 'overflow-x-clip';
|
|
3008
|
+
this.overflowYClip = 'overflow-y-clip';
|
|
3009
|
+
this.overflowXVisible = 'overflow-x-visible';
|
|
3010
|
+
this.overflowYVisible = 'overflow-y-visible';
|
|
3011
|
+
this.overflowXScroll = 'overflow-x-scroll';
|
|
3012
|
+
this.overflowYScroll = 'overflow-y-scroll';
|
|
3078
3013
|
}
|
|
3079
3014
|
getClasses(extractedKeys) {
|
|
3080
|
-
|
|
3081
|
-
return [key && this[key] ? this[key] : ''];
|
|
3015
|
+
return [(extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.overflow) && this[extractedKeys.overflow] ? this[extractedKeys.overflow] : ''];
|
|
3082
3016
|
}
|
|
3083
3017
|
}
|
|
3084
|
-
OverflowTheme.defaultClasses = {
|
|
3085
|
-
overflowAuto: 'overflow-auto',
|
|
3086
|
-
overflowHidden: 'overflow-hidden',
|
|
3087
|
-
overflowClip: 'overflow-clip',
|
|
3088
|
-
overflowVisible: 'overflow-visible',
|
|
3089
|
-
overflowScroll: 'overflow-scroll',
|
|
3090
|
-
overflowXAuto: 'overflow-x-auto',
|
|
3091
|
-
overflowYAuto: 'overflow-y-auto',
|
|
3092
|
-
overflowXHidden: 'overflow-x-hidden',
|
|
3093
|
-
overflowYHidden: 'overflow-y-hidden',
|
|
3094
|
-
overflowXClip: 'overflow-x-clip',
|
|
3095
|
-
overflowYClip: 'overflow-y-clip',
|
|
3096
|
-
overflowXVisible: 'overflow-x-visible',
|
|
3097
|
-
overflowYVisible: 'overflow-y-visible',
|
|
3098
|
-
overflowXScroll: 'overflow-x-scroll',
|
|
3099
|
-
overflowYScroll: 'overflow-y-scroll',
|
|
3100
|
-
};
|
|
3101
3018
|
|
|
3102
3019
|
/**
|
|
3103
3020
|
* Pick the first truthy key from props using a ComponentKeys category name.
|
|
@@ -3176,7 +3093,7 @@ class ComponentTheme {
|
|
|
3176
3093
|
};
|
|
3177
3094
|
walk(this.themes);
|
|
3178
3095
|
// Apply extra classes based on extracted keys
|
|
3179
|
-
for (const [
|
|
3096
|
+
for (const [, value] of Object.entries(extractedKeys)) {
|
|
3180
3097
|
if (value && this.extraClasses[value]) {
|
|
3181
3098
|
const existingClasses = this.extraClasses[value];
|
|
3182
3099
|
if (existingClasses !== undefined) {
|
|
@@ -3218,6 +3135,11 @@ class ComponentTheme {
|
|
|
3218
3135
|
class SizeTheme extends BaseTheme {
|
|
3219
3136
|
constructor(sizeMap, useDefaultKey = true) {
|
|
3220
3137
|
super();
|
|
3138
|
+
this.xs = "";
|
|
3139
|
+
this.sm = "";
|
|
3140
|
+
this.md = "";
|
|
3141
|
+
this.lg = "";
|
|
3142
|
+
this.xl = "";
|
|
3221
3143
|
this.useDefaultKey = useDefaultKey;
|
|
3222
3144
|
ComponentKeys.size.forEach((key) => {
|
|
3223
3145
|
var _a;
|
|
@@ -3227,35 +3149,30 @@ class SizeTheme extends BaseTheme {
|
|
|
3227
3149
|
getClasses(extractedKeys) {
|
|
3228
3150
|
var _a;
|
|
3229
3151
|
const size = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : (this.useDefaultKey ? 'md' : undefined);
|
|
3230
|
-
|
|
3231
|
-
return [this[size]];
|
|
3232
|
-
else
|
|
3233
|
-
return [''];
|
|
3152
|
+
return size ? [this[size]] : [''];
|
|
3234
3153
|
}
|
|
3235
3154
|
}
|
|
3236
3155
|
|
|
3237
3156
|
class GapTheme extends BaseTheme {
|
|
3238
3157
|
constructor(sizeMap) {
|
|
3239
3158
|
super();
|
|
3240
|
-
this.
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3159
|
+
this.xs = 'gap-2';
|
|
3160
|
+
this.sm = 'gap-3';
|
|
3161
|
+
this.md = 'gap-4';
|
|
3162
|
+
this.lg = 'gap-5';
|
|
3163
|
+
this.xl = 'gap-6';
|
|
3164
|
+
if (sizeMap) {
|
|
3165
|
+
ComponentKeys.size.forEach((key) => {
|
|
3166
|
+
if (sizeMap[key] !== undefined) {
|
|
3167
|
+
this[key] = sizeMap[key];
|
|
3168
|
+
}
|
|
3169
|
+
});
|
|
3170
|
+
}
|
|
3247
3171
|
}
|
|
3248
3172
|
getClasses(extractedKeys) {
|
|
3249
3173
|
var _a;
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
// If noGap is true, return empty array (no gap classes)
|
|
3253
|
-
if (gap === 'noGap') {
|
|
3254
|
-
return [];
|
|
3255
|
-
}
|
|
3256
|
-
// If gap is true or undefined, apply gap classes based on size
|
|
3257
|
-
if (gap === 'gap') {
|
|
3258
|
-
const gapClass = this[size];
|
|
3174
|
+
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.gap) === 'gap') {
|
|
3175
|
+
const gapClass = this[(_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md'];
|
|
3259
3176
|
return gapClass ? [gapClass] : [];
|
|
3260
3177
|
}
|
|
3261
3178
|
return [];
|
|
@@ -3287,21 +3204,22 @@ class RadiusTheme extends BaseTheme {
|
|
|
3287
3204
|
static createUITheme(customRounded) {
|
|
3288
3205
|
return new RadiusTheme(customRounded || uiBorderRadiusClasses);
|
|
3289
3206
|
}
|
|
3290
|
-
static createLayoutTheme(
|
|
3291
|
-
return new RadiusTheme(
|
|
3207
|
+
static createLayoutTheme() {
|
|
3208
|
+
return new RadiusTheme(layoutBorderRadiusClasses);
|
|
3292
3209
|
}
|
|
3293
3210
|
getClasses(extractedKeys) {
|
|
3294
3211
|
var _a, _b;
|
|
3295
|
-
const size = (_a = extractedKeys
|
|
3296
|
-
const shape = (_b = extractedKeys
|
|
3212
|
+
const size = (_a = extractedKeys.size) !== null && _a !== void 0 ? _a : 'md';
|
|
3213
|
+
const shape = (_b = extractedKeys.shape) !== null && _b !== void 0 ? _b : 'rounded';
|
|
3297
3214
|
switch (shape) {
|
|
3298
3215
|
case 'pill':
|
|
3299
3216
|
return [this.pill];
|
|
3300
3217
|
case 'sharp':
|
|
3301
3218
|
return [this.sharp];
|
|
3302
|
-
case 'rounded':
|
|
3219
|
+
case 'rounded': {
|
|
3303
3220
|
const roundedClass = this.rounded[size];
|
|
3304
3221
|
return roundedClass ? [roundedClass] : [];
|
|
3222
|
+
}
|
|
3305
3223
|
default:
|
|
3306
3224
|
return [];
|
|
3307
3225
|
}
|
|
@@ -3309,81 +3227,53 @@ class RadiusTheme extends BaseTheme {
|
|
|
3309
3227
|
}
|
|
3310
3228
|
|
|
3311
3229
|
class BorderTheme extends BaseTheme {
|
|
3312
|
-
constructor(
|
|
3313
|
-
super();
|
|
3314
|
-
this.
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
active: "",
|
|
3318
|
-
};
|
|
3319
|
-
ComponentKeys.mode.forEach((key) => {
|
|
3320
|
-
var _a;
|
|
3321
|
-
this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : this.defaultClasses[key];
|
|
3322
|
-
});
|
|
3230
|
+
constructor() {
|
|
3231
|
+
super(...arguments);
|
|
3232
|
+
this.base = "border";
|
|
3233
|
+
this.hover = "";
|
|
3234
|
+
this.active = "";
|
|
3323
3235
|
}
|
|
3324
3236
|
getClasses(extractedKeys) {
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
return [];
|
|
3329
|
-
}
|
|
3330
|
-
// Only apply border classes if border is explicitly true
|
|
3331
|
-
if (border === 'border') {
|
|
3332
|
-
return ComponentKeys.mode.map(mode => this[mode] || '').filter(Boolean);
|
|
3333
|
-
}
|
|
3334
|
-
return [];
|
|
3237
|
+
return (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.border) === "border"
|
|
3238
|
+
? ComponentKeys.mode.map((mode) => this[mode])
|
|
3239
|
+
: [];
|
|
3335
3240
|
}
|
|
3336
3241
|
}
|
|
3337
3242
|
|
|
3338
3243
|
class RingTheme extends BaseTheme {
|
|
3339
|
-
constructor(
|
|
3340
|
-
super();
|
|
3341
|
-
this.
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
active: "active:ring active:ring-inset",
|
|
3345
|
-
};
|
|
3346
|
-
ComponentKeys.mode.forEach((key) => {
|
|
3347
|
-
var _a;
|
|
3348
|
-
this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : this.defaultClasses[key];
|
|
3349
|
-
});
|
|
3244
|
+
constructor() {
|
|
3245
|
+
super(...arguments);
|
|
3246
|
+
this.base = "ring ring-inset";
|
|
3247
|
+
this.hover = "";
|
|
3248
|
+
this.active = "";
|
|
3350
3249
|
}
|
|
3351
3250
|
getClasses(extractedKeys) {
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
return [];
|
|
3356
|
-
}
|
|
3357
|
-
// Only apply ring classes if ring is explicitly true
|
|
3358
|
-
if (ring === 'ring') {
|
|
3359
|
-
return ComponentKeys.mode.map(mode => this[mode] || '').filter(Boolean);
|
|
3360
|
-
}
|
|
3361
|
-
return [];
|
|
3251
|
+
return (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.ring) === 'ring'
|
|
3252
|
+
? ComponentKeys.mode.map(mode => this[mode] || '').filter(Boolean)
|
|
3253
|
+
: [];
|
|
3362
3254
|
}
|
|
3363
3255
|
}
|
|
3364
3256
|
|
|
3365
3257
|
class PaddingTheme extends BaseTheme {
|
|
3366
3258
|
constructor(initial) {
|
|
3367
3259
|
super();
|
|
3368
|
-
this.
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3260
|
+
this.xs = "";
|
|
3261
|
+
this.sm = "";
|
|
3262
|
+
this.md = "";
|
|
3263
|
+
this.lg = "";
|
|
3264
|
+
this.xl = "";
|
|
3265
|
+
if (initial) {
|
|
3266
|
+
ComponentKeys.size.forEach((key) => {
|
|
3267
|
+
if (initial[key] !== undefined) {
|
|
3268
|
+
this[key] = initial[key];
|
|
3269
|
+
}
|
|
3270
|
+
});
|
|
3271
|
+
}
|
|
3375
3272
|
}
|
|
3376
3273
|
getClasses(extractedKeys) {
|
|
3377
3274
|
var _a;
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
// If noPadding is true, return empty array (no padding classes)
|
|
3381
|
-
if (padding === 'noPadding') {
|
|
3382
|
-
return [];
|
|
3383
|
-
}
|
|
3384
|
-
// If padding is true or undefined, apply padding classes based on size
|
|
3385
|
-
if (padding === 'padding' || padding === undefined) {
|
|
3386
|
-
const paddingClass = this[size];
|
|
3275
|
+
if ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === 'padding' || (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.padding) === undefined) {
|
|
3276
|
+
const paddingClass = this[(_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.size) !== null && _a !== void 0 ? _a : 'md'];
|
|
3387
3277
|
return paddingClass ? [paddingClass] : [];
|
|
3388
3278
|
}
|
|
3389
3279
|
return [];
|
|
@@ -3393,13 +3283,12 @@ class PaddingTheme extends BaseTheme {
|
|
|
3393
3283
|
class PxTheme extends PaddingTheme {
|
|
3394
3284
|
constructor(sizeMap) {
|
|
3395
3285
|
super(sizeMap);
|
|
3396
|
-
this.defaultClasses = {
|
|
3397
|
-
xs: "px-2", sm: "px-4", md: "px-6", lg: "px-8", xl: "px-10"
|
|
3398
|
-
};
|
|
3399
3286
|
// Override with PxTheme's default classes if no custom sizeMap provided
|
|
3400
3287
|
if (!sizeMap) {
|
|
3401
3288
|
ComponentKeys.size.forEach((key) => {
|
|
3402
|
-
this[key] =
|
|
3289
|
+
this[key] = {
|
|
3290
|
+
xs: "px-2", sm: "px-4", md: "px-6", lg: "px-8", xl: "px-10"
|
|
3291
|
+
}[key];
|
|
3403
3292
|
});
|
|
3404
3293
|
}
|
|
3405
3294
|
}
|
|
@@ -3408,26 +3297,35 @@ class PxTheme extends PaddingTheme {
|
|
|
3408
3297
|
class PyTheme extends PaddingTheme {
|
|
3409
3298
|
constructor(sizeMap) {
|
|
3410
3299
|
super(sizeMap);
|
|
3411
|
-
this.defaultClasses = {
|
|
3412
|
-
xs: "py-2", sm: "py-4", md: "py-6", lg: "py-8", xl: "py-10"
|
|
3413
|
-
};
|
|
3414
3300
|
// Override with PyTheme's default classes if no custom sizeMap provided
|
|
3415
3301
|
if (!sizeMap) {
|
|
3416
3302
|
ComponentKeys.size.forEach((key) => {
|
|
3417
|
-
this[key] =
|
|
3303
|
+
this[key] = {
|
|
3304
|
+
xs: "py-2", sm: "py-4", md: "py-6", lg: "py-8", xl: "py-10"
|
|
3305
|
+
}[key];
|
|
3418
3306
|
});
|
|
3419
3307
|
}
|
|
3420
3308
|
}
|
|
3421
3309
|
}
|
|
3422
3310
|
|
|
3423
3311
|
class AppearanceTheme extends BaseTheme {
|
|
3424
|
-
constructor(config, transparentClasses) {
|
|
3312
|
+
constructor(config, category, transparentClasses) {
|
|
3425
3313
|
super();
|
|
3426
3314
|
Object.assign(this, config);
|
|
3315
|
+
this.category = category;
|
|
3427
3316
|
this.transparentClasses = transparentClasses;
|
|
3428
3317
|
}
|
|
3429
3318
|
getClasses(extractedKeys) {
|
|
3430
3319
|
var _a;
|
|
3320
|
+
if (this.category === 'border' && extractedKeys.border === 'noBorder') {
|
|
3321
|
+
return [];
|
|
3322
|
+
}
|
|
3323
|
+
if (this.category === 'ring' && extractedKeys.ring === 'noRing') {
|
|
3324
|
+
return [];
|
|
3325
|
+
}
|
|
3326
|
+
if (this.category === 'shadow' && extractedKeys.shadow === 'noShadow') {
|
|
3327
|
+
return [];
|
|
3328
|
+
}
|
|
3431
3329
|
// Check for specific transparent styles first
|
|
3432
3330
|
if (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.transparent) {
|
|
3433
3331
|
const transparentClass = ((_a = this.transparentClasses) === null || _a === void 0 ? void 0 : _a[extractedKeys.transparent]) || '';
|
|
@@ -3443,7 +3341,7 @@ class AppearanceTheme extends BaseTheme {
|
|
|
3443
3341
|
}
|
|
3444
3342
|
return [];
|
|
3445
3343
|
}
|
|
3446
|
-
static createTheme(src = {}) {
|
|
3344
|
+
static createTheme(src = {}, category) {
|
|
3447
3345
|
const config = Object.fromEntries(ComponentKeys.appearance.map(textKey => [
|
|
3448
3346
|
textKey,
|
|
3449
3347
|
Object.fromEntries(ComponentKeys.mode.map(modeKey => {
|
|
@@ -3454,7 +3352,7 @@ class AppearanceTheme extends BaseTheme {
|
|
|
3454
3352
|
];
|
|
3455
3353
|
})),
|
|
3456
3354
|
]));
|
|
3457
|
-
return new AppearanceTheme(config, src.base);
|
|
3355
|
+
return new AppearanceTheme(config, category, src.base);
|
|
3458
3356
|
}
|
|
3459
3357
|
}
|
|
3460
3358
|
|
|
@@ -3770,21 +3668,21 @@ class GenericVariantTheme extends BaseTheme {
|
|
|
3770
3668
|
getClasses(extractedKeys) {
|
|
3771
3669
|
var _a;
|
|
3772
3670
|
const variantKey = (_a = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.variant) !== null && _a !== void 0 ? _a : 'outline';
|
|
3773
|
-
const
|
|
3774
|
-
if (!
|
|
3671
|
+
const activeTheme = this[variantKey];
|
|
3672
|
+
if (!activeTheme) {
|
|
3775
3673
|
return [];
|
|
3776
3674
|
}
|
|
3777
|
-
return
|
|
3675
|
+
return activeTheme.getClasses(extractedKeys);
|
|
3778
3676
|
}
|
|
3779
3677
|
// used for button, bages, chips, etc
|
|
3780
3678
|
static createUIElementTextTheme() {
|
|
3781
3679
|
return new GenericVariantTheme({
|
|
3782
3680
|
outline: AppearanceTheme.createTheme({
|
|
3783
3681
|
base: textAppearanceClasses
|
|
3784
|
-
}),
|
|
3682
|
+
}, 'text'),
|
|
3785
3683
|
filled: AppearanceTheme.createTheme({
|
|
3786
3684
|
base: filledTextAppearanceClasses
|
|
3787
|
-
})
|
|
3685
|
+
}, 'text')
|
|
3788
3686
|
});
|
|
3789
3687
|
}
|
|
3790
3688
|
static createUIElementShadowTheme() {
|
|
@@ -3799,170 +3697,121 @@ class GenericVariantTheme extends BaseTheme {
|
|
|
3799
3697
|
filled: ShadowAppearanceTheme.createLayoutTheme({})
|
|
3800
3698
|
});
|
|
3801
3699
|
}
|
|
3802
|
-
static createBorderAppearanceTheme() {
|
|
3803
|
-
return new GenericVariantTheme({
|
|
3804
|
-
outline: AppearanceTheme.createTheme({ base: borderAppearanceClasses }),
|
|
3805
|
-
filled: AppearanceTheme.createTheme({ base: filledBorderAppearanceClasses })
|
|
3806
|
-
});
|
|
3807
|
-
}
|
|
3808
3700
|
static createUIElementBorderTheme() {
|
|
3809
3701
|
return new GenericVariantTheme({
|
|
3810
3702
|
outline: AppearanceTheme.createTheme({
|
|
3811
3703
|
base: borderAppearanceClasses
|
|
3812
|
-
}),
|
|
3704
|
+
}, 'border'),
|
|
3813
3705
|
filled: AppearanceTheme.createTheme({
|
|
3814
3706
|
base: filledBorderAppearanceClasses
|
|
3815
|
-
})
|
|
3707
|
+
}, 'border')
|
|
3816
3708
|
});
|
|
3817
3709
|
}
|
|
3818
3710
|
static createUIElementRingTheme() {
|
|
3819
3711
|
return new GenericVariantTheme({
|
|
3820
3712
|
outline: AppearanceTheme.createTheme({
|
|
3821
3713
|
base: ringAppearanceClasses
|
|
3822
|
-
}),
|
|
3714
|
+
}, 'ring'),
|
|
3823
3715
|
filled: AppearanceTheme.createTheme({
|
|
3824
3716
|
base: filledRingAppearanceClasses
|
|
3825
|
-
})
|
|
3826
|
-
});
|
|
3827
|
-
}
|
|
3828
|
-
static createBgAppearanceTheme() {
|
|
3829
|
-
return new GenericVariantTheme({
|
|
3830
|
-
outline: AppearanceTheme.createTheme({
|
|
3831
|
-
base: backgroundAppearanceClasses,
|
|
3832
|
-
hover: hoverBackgroundAppearanceClasses,
|
|
3833
|
-
active: activeBackgroundAppearanceClasses
|
|
3834
|
-
}),
|
|
3835
|
-
filled: AppearanceTheme.createTheme({
|
|
3836
|
-
base: filledBackgroundAppearanceClasses,
|
|
3837
|
-
hover: filledHoverBackgroundAppearanceClasses,
|
|
3838
|
-
active: filledActiveBackgroundAppearanceClasses
|
|
3839
|
-
})
|
|
3717
|
+
}, 'ring')
|
|
3840
3718
|
});
|
|
3841
3719
|
}
|
|
3842
3720
|
static createCheckboxBgAppearanceTheme() {
|
|
3843
3721
|
return new GenericVariantTheme({
|
|
3844
3722
|
outline: AppearanceTheme.createTheme({
|
|
3845
3723
|
base: backgroundAppearanceClasses,
|
|
3846
|
-
}),
|
|
3724
|
+
}, 'bg'),
|
|
3847
3725
|
filled: AppearanceTheme.createTheme({
|
|
3848
3726
|
base: backgroundAppearanceClasses,
|
|
3849
|
-
})
|
|
3727
|
+
}, 'bg')
|
|
3850
3728
|
});
|
|
3851
3729
|
}
|
|
3852
|
-
static
|
|
3730
|
+
static createBgAppearanceTheme() {
|
|
3853
3731
|
return new GenericVariantTheme({
|
|
3854
3732
|
outline: AppearanceTheme.createTheme({
|
|
3855
3733
|
base: backgroundAppearanceClasses,
|
|
3856
3734
|
hover: hoverBackgroundAppearanceClasses,
|
|
3857
3735
|
active: activeBackgroundAppearanceClasses
|
|
3858
|
-
}),
|
|
3736
|
+
}, 'bg'),
|
|
3859
3737
|
filled: AppearanceTheme.createTheme({
|
|
3860
3738
|
base: filledBackgroundAppearanceClasses,
|
|
3861
3739
|
hover: filledHoverBackgroundAppearanceClasses,
|
|
3862
3740
|
active: filledActiveBackgroundAppearanceClasses
|
|
3863
|
-
})
|
|
3864
|
-
});
|
|
3865
|
-
}
|
|
3866
|
-
static createSimpleBgAppearanceTheme() {
|
|
3867
|
-
return new GenericVariantTheme({
|
|
3868
|
-
outline: AppearanceTheme.createTheme({
|
|
3869
|
-
base: backgroundAppearanceClasses,
|
|
3870
|
-
}),
|
|
3871
|
-
filled: AppearanceTheme.createTheme({
|
|
3872
|
-
base: filledBackgroundAppearanceClasses,
|
|
3873
|
-
})
|
|
3741
|
+
}, 'bg')
|
|
3874
3742
|
});
|
|
3875
3743
|
}
|
|
3876
3744
|
static createSimpleUIElementBgAppearanceTheme() {
|
|
3877
3745
|
return new GenericVariantTheme({
|
|
3878
3746
|
outline: AppearanceTheme.createTheme({
|
|
3879
3747
|
base: backgroundAppearanceClasses,
|
|
3880
|
-
}),
|
|
3748
|
+
}, 'bg'),
|
|
3881
3749
|
filled: AppearanceTheme.createTheme({
|
|
3882
3750
|
base: filledBackgroundAppearanceClasses,
|
|
3883
|
-
})
|
|
3751
|
+
}, 'bg')
|
|
3884
3752
|
});
|
|
3885
3753
|
}
|
|
3886
3754
|
static createAccentColorAppearanceTheme() {
|
|
3887
3755
|
return new GenericVariantTheme({
|
|
3888
3756
|
outline: AppearanceTheme.createTheme({
|
|
3889
3757
|
base: accentColorAppearanceClasses
|
|
3890
|
-
}),
|
|
3758
|
+
}, 'accent'),
|
|
3891
3759
|
filled: AppearanceTheme.createTheme({
|
|
3892
3760
|
base: filledAccentColorAppearanceClasses
|
|
3893
|
-
})
|
|
3761
|
+
}, 'accent')
|
|
3894
3762
|
});
|
|
3895
3763
|
}
|
|
3896
3764
|
static createCheckedAppearanceTheme() {
|
|
3897
3765
|
return new GenericVariantTheme({
|
|
3898
3766
|
outline: AppearanceTheme.createTheme({
|
|
3899
3767
|
base: checkedBackgroundAppearanceClasses
|
|
3900
|
-
}),
|
|
3768
|
+
}, 'bg'),
|
|
3901
3769
|
filled: AppearanceTheme.createTheme({
|
|
3902
3770
|
base: filledCheckedBackgroundAppearanceClasses
|
|
3903
|
-
})
|
|
3771
|
+
}, 'bg')
|
|
3904
3772
|
});
|
|
3905
3773
|
}
|
|
3906
3774
|
static createLayoutBgAppearanceTheme() {
|
|
3907
3775
|
return new GenericVariantTheme({
|
|
3908
3776
|
outline: AppearanceTheme.createTheme({
|
|
3909
3777
|
base: layoutBackgroundAppearanceClasses
|
|
3910
|
-
}),
|
|
3778
|
+
}, 'bg'),
|
|
3911
3779
|
filled: AppearanceTheme.createTheme({
|
|
3912
3780
|
base: layoutFilledBackgroundAppearanceClasses
|
|
3913
|
-
})
|
|
3781
|
+
}, 'bg')
|
|
3914
3782
|
});
|
|
3915
3783
|
}
|
|
3916
3784
|
}
|
|
3917
3785
|
|
|
3918
3786
|
class WrapTheme extends BaseTheme {
|
|
3919
|
-
constructor(
|
|
3920
|
-
super();
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
});
|
|
3787
|
+
constructor() {
|
|
3788
|
+
super(...arguments);
|
|
3789
|
+
this.flexWrap = "flex-wrap";
|
|
3790
|
+
this.flexNoWrap = "flex-nowrap";
|
|
3791
|
+
this.flexWrapReverse = "flex-wrap-reverse";
|
|
3925
3792
|
}
|
|
3926
3793
|
getClasses(extractedKeys) {
|
|
3927
|
-
|
|
3928
|
-
return key ? [this[key]] : [];
|
|
3794
|
+
return (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.wrap) ? [this[extractedKeys.wrap]] : [];
|
|
3929
3795
|
}
|
|
3930
3796
|
}
|
|
3931
|
-
WrapTheme.defaultClasses = {
|
|
3932
|
-
flexWrap: "flex-wrap",
|
|
3933
|
-
flexNoWrap: "flex-nowrap",
|
|
3934
|
-
flexWrapReverse: "flex-wrap-reverse"
|
|
3935
|
-
};
|
|
3936
3797
|
|
|
3937
3798
|
class DirectionTheme extends BaseTheme {
|
|
3938
|
-
constructor(
|
|
3939
|
-
super();
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3799
|
+
constructor() {
|
|
3800
|
+
super(...arguments);
|
|
3801
|
+
this.row = "flex-row";
|
|
3802
|
+
this.column = "flex-col";
|
|
3803
|
+
this.rowReverse = "flex-row-reverse";
|
|
3804
|
+
this.columnReverse = "flex-col-reverse";
|
|
3943
3805
|
}
|
|
3944
3806
|
getClasses(extractedKeys) {
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
direction = "columnReverse";
|
|
3951
|
-
break;
|
|
3952
|
-
case "row":
|
|
3953
|
-
direction = "rowReverse";
|
|
3954
|
-
break;
|
|
3955
|
-
}
|
|
3956
|
-
}
|
|
3807
|
+
const direction = (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.reverse) === 'reverse'
|
|
3808
|
+
? ((extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.flexDirection) === "column" ? "columnReverse"
|
|
3809
|
+
: (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.flexDirection) === "row" ? "rowReverse"
|
|
3810
|
+
: extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.flexDirection)
|
|
3811
|
+
: extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.flexDirection;
|
|
3957
3812
|
return direction ? [this[direction]] : [];
|
|
3958
3813
|
}
|
|
3959
3814
|
}
|
|
3960
|
-
DirectionTheme.defaultClasses = {
|
|
3961
|
-
row: "flex-row",
|
|
3962
|
-
column: "flex-col",
|
|
3963
|
-
rowReverse: "flex-row-reverse",
|
|
3964
|
-
columnReverse: "flex-col-reverse",
|
|
3965
|
-
};
|
|
3966
3815
|
|
|
3967
3816
|
/**
|
|
3968
3817
|
* Default props for all components using the existing ThemeDefaults type
|
|
@@ -4188,7 +4037,7 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
4188
4037
|
text: new SizeTheme({ xs: 'text-xs', sm: 'text-sm', md: 'text-base', lg: 'text-lg', xl: 'text-xl' }),
|
|
4189
4038
|
},
|
|
4190
4039
|
appearance: {
|
|
4191
|
-
background: GenericVariantTheme.
|
|
4040
|
+
background: GenericVariantTheme.createBgAppearanceTheme(),
|
|
4192
4041
|
text: GenericVariantTheme.createUIElementTextTheme(),
|
|
4193
4042
|
border: GenericVariantTheme.createUIElementBorderTheme(),
|
|
4194
4043
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
@@ -4203,7 +4052,7 @@ const defaultButtonTheme = new ComponentTheme("button", "w-fit h-fit cursor-poin
|
|
|
4203
4052
|
flexDirection: new DirectionTheme(),
|
|
4204
4053
|
},
|
|
4205
4054
|
typography: defaultTypographyTheme,
|
|
4206
|
-
}, themeDefaults.button, BUTTON_CATEGORIES, (props
|
|
4055
|
+
}, themeDefaults.button, BUTTON_CATEGORIES, (props) => {
|
|
4207
4056
|
// Determine tag based on href prop
|
|
4208
4057
|
return props.href ? "a" : "button";
|
|
4209
4058
|
});
|
|
@@ -4231,7 +4080,7 @@ const defaultBadgeTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4231
4080
|
flexDirection: new DirectionTheme(),
|
|
4232
4081
|
},
|
|
4233
4082
|
typography: defaultTypographyTheme,
|
|
4234
|
-
}, themeDefaults.badge, BADGE_CATEGORIES, (props
|
|
4083
|
+
}, themeDefaults.badge, BADGE_CATEGORIES, (props) => {
|
|
4235
4084
|
return props.href ? "a" : "span";
|
|
4236
4085
|
});
|
|
4237
4086
|
|
|
@@ -4258,7 +4107,7 @@ const defaultChipTheme = new ComponentTheme("span", "w-fit h-fit transition-all
|
|
|
4258
4107
|
flexDirection: new DirectionTheme(),
|
|
4259
4108
|
},
|
|
4260
4109
|
typography: defaultTypographyTheme,
|
|
4261
|
-
}, themeDefaults.chip, CHIP_CATEGORIES, (props
|
|
4110
|
+
}, themeDefaults.chip, CHIP_CATEGORIES, (props) => {
|
|
4262
4111
|
return props.href ? "a" : "span";
|
|
4263
4112
|
});
|
|
4264
4113
|
|
|
@@ -4331,7 +4180,7 @@ const deepClone = (source) => {
|
|
|
4331
4180
|
};
|
|
4332
4181
|
const findGroup = (key) => {
|
|
4333
4182
|
// Check each group in ComponentKeys to find which one contains this key
|
|
4334
|
-
for (const [
|
|
4183
|
+
for (const [, group] of Object.entries(ComponentKeys)) {
|
|
4335
4184
|
if (group.includes(key)) {
|
|
4336
4185
|
return group;
|
|
4337
4186
|
}
|
|
@@ -4367,32 +4216,22 @@ const mergeDefaults = (baseDefaults, overrideDefaults) => {
|
|
|
4367
4216
|
class PlTheme extends PaddingTheme {
|
|
4368
4217
|
constructor(sizeMap) {
|
|
4369
4218
|
super(sizeMap);
|
|
4370
|
-
this.defaultClasses = {
|
|
4371
|
-
xs: "pl-2", sm: "pl-4", md: "pl-6", lg: "pl-8", xl: "pl-10"
|
|
4372
|
-
};
|
|
4373
4219
|
// Override with PlTheme's default classes if no custom sizeMap provided
|
|
4374
4220
|
if (!sizeMap) {
|
|
4375
4221
|
ComponentKeys.size.forEach((key) => {
|
|
4376
|
-
this[key] =
|
|
4222
|
+
this[key] = {
|
|
4223
|
+
xs: "pl-2", sm: "pl-4", md: "pl-6", lg: "pl-8", xl: "pl-10"
|
|
4224
|
+
}[key];
|
|
4377
4225
|
});
|
|
4378
4226
|
}
|
|
4379
4227
|
}
|
|
4380
4228
|
}
|
|
4381
4229
|
|
|
4382
4230
|
class ListStyleTheme extends BaseTheme {
|
|
4383
|
-
constructor(
|
|
4384
|
-
super();
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
this[key] = (_a = initial === null || initial === void 0 ? void 0 : initial[key]) !== null && _a !== void 0 ? _a : this.getDefaultClass(key);
|
|
4388
|
-
});
|
|
4389
|
-
}
|
|
4390
|
-
getDefaultClass(key) {
|
|
4391
|
-
const defaultClasses = {
|
|
4392
|
-
disc: 'list-disc',
|
|
4393
|
-
decimal: 'list-decimal',
|
|
4394
|
-
};
|
|
4395
|
-
return defaultClasses[key];
|
|
4231
|
+
constructor() {
|
|
4232
|
+
super(...arguments);
|
|
4233
|
+
this.disc = 'list-disc';
|
|
4234
|
+
this.decimal = 'list-decimal';
|
|
4396
4235
|
}
|
|
4397
4236
|
getClasses(extractedKeys) {
|
|
4398
4237
|
const listStyle = extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.listStyle;
|
|
@@ -4414,7 +4253,7 @@ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap
|
|
|
4414
4253
|
},
|
|
4415
4254
|
typography: defaultTypographyTheme,
|
|
4416
4255
|
layout: defaultLayoutTheme,
|
|
4417
|
-
}, defaults, TYPOGRAPHY_CATEGORIES, (props
|
|
4256
|
+
}, defaults, TYPOGRAPHY_CATEGORIES, (props) => {
|
|
4418
4257
|
// Determine tag based on href prop
|
|
4419
4258
|
return props.href ? "a" : tag;
|
|
4420
4259
|
});
|
|
@@ -4472,37 +4311,27 @@ const listTheme = new ComponentTheme("ul", "list-inside", {
|
|
|
4472
4311
|
typography: defaultTypographyTheme,
|
|
4473
4312
|
layout: defaultLayoutTheme,
|
|
4474
4313
|
listStyle: new ListStyleTheme(),
|
|
4475
|
-
}, themeDefaults.list, LIST_CATEGORIES, (props
|
|
4476
|
-
// Determine tag based on list style from props
|
|
4314
|
+
}, themeDefaults.list, LIST_CATEGORIES, (props) => {
|
|
4315
|
+
// Determine tag based on list style from props
|
|
4477
4316
|
const componentProps = props;
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
const hasDecimal = (componentProps === null || componentProps === void 0 ? void 0 : componentProps.decimal) || (defaultsRecord === null || defaultsRecord === void 0 ? void 0 : defaultsRecord.decimal);
|
|
4317
|
+
// Check if decimal is set in props
|
|
4318
|
+
const hasDecimal = componentProps === null || componentProps === void 0 ? void 0 : componentProps.decimal;
|
|
4481
4319
|
return hasDecimal ? "ol" : "ul";
|
|
4482
4320
|
});
|
|
4483
4321
|
|
|
4484
4322
|
class BreakpointTheme extends BaseTheme {
|
|
4485
|
-
constructor(
|
|
4486
|
-
super();
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4323
|
+
constructor() {
|
|
4324
|
+
super(...arguments);
|
|
4325
|
+
this.xsCol = "max-xs:flex-col";
|
|
4326
|
+
this.smCol = "max-sm:flex-col";
|
|
4327
|
+
this.mdCol = "max-md:flex-col";
|
|
4328
|
+
this.lgCol = "max-lg:flex-col";
|
|
4329
|
+
this.xlCol = "max-xl:flex-col";
|
|
4491
4330
|
}
|
|
4492
4331
|
getClasses(extractedKeys) {
|
|
4493
|
-
|
|
4494
|
-
if (!key)
|
|
4495
|
-
return [];
|
|
4496
|
-
return [this[key] || ''];
|
|
4332
|
+
return (extractedKeys === null || extractedKeys === void 0 ? void 0 : extractedKeys.breakpoint) ? [this[extractedKeys.breakpoint] || ''] : [];
|
|
4497
4333
|
}
|
|
4498
4334
|
}
|
|
4499
|
-
BreakpointTheme.defaultClasses = {
|
|
4500
|
-
xsCol: "max-xs:flex-col",
|
|
4501
|
-
smCol: "max-sm:flex-col",
|
|
4502
|
-
mdCol: "max-md:flex-col",
|
|
4503
|
-
lgCol: "max-lg:flex-col",
|
|
4504
|
-
xlCol: "max-xl:flex-col"
|
|
4505
|
-
};
|
|
4506
4335
|
|
|
4507
4336
|
const defaultCardTheme = new ComponentTheme("div", "", {
|
|
4508
4337
|
size: {
|
|
@@ -4539,7 +4368,7 @@ const defaultCardTheme = new ComponentTheme("div", "", {
|
|
|
4539
4368
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4540
4369
|
},
|
|
4541
4370
|
typography: defaultTypographyTheme,
|
|
4542
|
-
}, themeDefaults.card, CARD_CATEGORIES, (props
|
|
4371
|
+
}, themeDefaults.card, CARD_CATEGORIES, (props) => {
|
|
4543
4372
|
return props.href ? "a" : "div";
|
|
4544
4373
|
});
|
|
4545
4374
|
|
|
@@ -4563,7 +4392,7 @@ const defaultRowTheme = new ComponentTheme("div", "", {
|
|
|
4563
4392
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4564
4393
|
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
4565
4394
|
}
|
|
4566
|
-
}, themeDefaults.row, ROW_CATEGORIES, (props
|
|
4395
|
+
}, themeDefaults.row, ROW_CATEGORIES, (props) => {
|
|
4567
4396
|
// Determine tag based on href prop
|
|
4568
4397
|
return props.href ? "a" : "div";
|
|
4569
4398
|
});
|
|
@@ -4575,7 +4404,7 @@ const defaultDividerTheme = new ComponentTheme("div", "h-px w-full", {
|
|
|
4575
4404
|
appearance: {
|
|
4576
4405
|
background: AppearanceTheme.createTheme({
|
|
4577
4406
|
base: bgBorderAppearanceClasses,
|
|
4578
|
-
}),
|
|
4407
|
+
}, 'bg'),
|
|
4579
4408
|
},
|
|
4580
4409
|
layout: defaultLayoutTheme,
|
|
4581
4410
|
}, themeDefaults.divider, DIVIDER_CATEGORIES);
|
|
@@ -4606,7 +4435,7 @@ const defaultContainerTheme = new ComponentTheme("div", "flex-col mx-auto w-full
|
|
|
4606
4435
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4607
4436
|
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
4608
4437
|
}
|
|
4609
|
-
}, themeDefaults.container, CONTAINER_CATEGORIES, (props
|
|
4438
|
+
}, themeDefaults.container, CONTAINER_CATEGORIES, (props) => {
|
|
4610
4439
|
return props.href ? "a" : "div";
|
|
4611
4440
|
});
|
|
4612
4441
|
|
|
@@ -4629,7 +4458,7 @@ const defaultColTheme = new ComponentTheme("div", "", {
|
|
|
4629
4458
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4630
4459
|
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
4631
4460
|
}
|
|
4632
|
-
}, themeDefaults.col, COL_CATEGORIES, (props
|
|
4461
|
+
}, themeDefaults.col, COL_CATEGORIES, (props) => {
|
|
4633
4462
|
return props.href ? "a" : "div";
|
|
4634
4463
|
});
|
|
4635
4464
|
|
|
@@ -4655,7 +4484,7 @@ const defaultStackTheme = new ComponentTheme("div", "", {
|
|
|
4655
4484
|
ring: GenericVariantTheme.createUIElementRingTheme(),
|
|
4656
4485
|
shadow: GenericVariantTheme.createLayoutShadowTheme(),
|
|
4657
4486
|
}
|
|
4658
|
-
}, themeDefaults.stack, STACK_CATEGORIES, (props
|
|
4487
|
+
}, themeDefaults.stack, STACK_CATEGORIES, (props) => {
|
|
4659
4488
|
return props.href ? "a" : "div";
|
|
4660
4489
|
});
|
|
4661
4490
|
|
|
@@ -4693,7 +4522,7 @@ const defaultSectionTheme = new ComponentTheme("div", "w-full flex-col", {
|
|
|
4693
4522
|
ring: new RingTheme(),
|
|
4694
4523
|
radius: RadiusTheme.createLayoutTheme(),
|
|
4695
4524
|
},
|
|
4696
|
-
}, themeDefaults.section, SECTION_CATEGORIES, (props
|
|
4525
|
+
}, themeDefaults.section, SECTION_CATEGORIES, (props) => {
|
|
4697
4526
|
return props.href ? "a" : "div";
|
|
4698
4527
|
});
|
|
4699
4528
|
|
|
@@ -4717,13 +4546,13 @@ const gridSubThemes = {
|
|
|
4717
4546
|
flexDirection: new DirectionTheme(),
|
|
4718
4547
|
},
|
|
4719
4548
|
};
|
|
4720
|
-
const defaultGrid2Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES, (props
|
|
4549
|
+
const defaultGrid2Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-2", gridSubThemes, themeDefaults.grid2, GRID_CATEGORIES, (props) => {
|
|
4721
4550
|
return props.href ? "a" : "div";
|
|
4722
4551
|
});
|
|
4723
|
-
const defaultGrid3Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-3", gridSubThemes, themeDefaults.grid3, GRID_CATEGORIES, (props
|
|
4552
|
+
const defaultGrid3Theme = new ComponentTheme("div", "grid-cols-1 md:grid-cols-3", gridSubThemes, themeDefaults.grid3, GRID_CATEGORIES, (props) => {
|
|
4724
4553
|
return props.href ? "a" : "div";
|
|
4725
4554
|
});
|
|
4726
|
-
const defaultGrid4Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, themeDefaults.grid4, GRID_CATEGORIES, (props
|
|
4555
|
+
const defaultGrid4Theme = new ComponentTheme("div", "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4", gridSubThemes, themeDefaults.grid4, GRID_CATEGORIES, (props) => {
|
|
4727
4556
|
return props.href ? "a" : "div";
|
|
4728
4557
|
});
|
|
4729
4558
|
|
|
@@ -4987,15 +4816,25 @@ const Checkbox = forwardRef(function Checkbox(props, ref) {
|
|
|
4987
4816
|
filled, outline,
|
|
4988
4817
|
// Shape props
|
|
4989
4818
|
pill, sharp, rounded,
|
|
4990
|
-
//
|
|
4991
|
-
|
|
4819
|
+
// Extract input HTML attributes
|
|
4820
|
+
checked, defaultChecked, disabled, name, value, onChange, onBlur, onFocus, required, readOnly,
|
|
4821
|
+
// Other HTML attributes
|
|
4822
|
+
id, className, tabIndex, 'aria-label': ariaLabel, ...remainingProps } = props;
|
|
4992
4823
|
const themeProps = {
|
|
4993
4824
|
xs, sm, md, lg, xl,
|
|
4994
4825
|
default: defaultProp, accent, primary, secondary, tertiary, success, danger, warning, info, transparent,
|
|
4995
4826
|
filled, outline,
|
|
4996
4827
|
pill, sharp, rounded
|
|
4997
4828
|
};
|
|
4998
|
-
|
|
4829
|
+
const inputProps = {
|
|
4830
|
+
type: "checkbox",
|
|
4831
|
+
checked, defaultChecked, disabled, name, value, onChange, onBlur, onFocus, required, readOnly,
|
|
4832
|
+
id, tabIndex, 'aria-label': ariaLabel,
|
|
4833
|
+
className, // Apply className to the input element
|
|
4834
|
+
...remainingProps,
|
|
4835
|
+
...themeProps
|
|
4836
|
+
};
|
|
4837
|
+
return (jsxs(ThemedComponent, { theme: theme.checkbox.wrapper, ref: ref, ...themeProps, children: [jsx(ThemedComponent, { theme: theme.checkbox.input, ...inputProps }), jsx(ThemedComponent, { theme: theme.checkbox.check, ...themeProps, children: theme.checkbox.check.themes.checkElement() })] }));
|
|
4999
4838
|
});
|
|
5000
4839
|
|
|
5001
4840
|
const Label = forwardRef(function Label(props, ref) {
|
|
@@ -5081,5 +4920,5 @@ const List = forwardRef(function List(props, ref) {
|
|
|
5081
4920
|
return jsx(ThemedComponent, { ref: ref, theme: theme.list, ...props });
|
|
5082
4921
|
});
|
|
5083
4922
|
|
|
5084
|
-
export { BADGE_CATEGORIES, BREAKPOINT, BUTTON_CATEGORIES, Badge, Button, CARD_CATEGORIES, CHECKBOX_CATEGORIES, CHIP_CATEGORIES, CODE_CATEGORIES, COL_CATEGORIES, COMPONENT, COMPONENT_PROPS_CATEGORY, CONTAINER_CATEGORIES, Card, Checkbox, Chip, Code, Col, ComponentCategories, ComponentKeys, Container, DIVIDER_CATEGORIES, Divider, GRID_CATEGORIES, Grid2, Grid3, Grid4, IMG_CATEGORIES, INTERACTIVE_CATEGORIES, Img, LABEL_CATEGORIES, LAYOUT_CORE, LAYOUT_FLEX, LAYOUT_FULL, LIST_CATEGORIES, LIST_STYLE, Label, Link, List, ListItem, PADDING, PageTitle, ROW_CATEGORIES, Row, SECTION_CATEGORIES, SHAPE, STACK_CATEGORIES, Section, SectionTitle, Stack, TYPOGRAPHY_CATEGORIES, TYPOGRAPHY_FULL, TYPOGRAPHY_STYLE, Text, ThemeProvider, Title, VARIANT, VISUAL_CORE, VISUAL_DECORATION, VISUAL_FULL, defaultTheme, themeDefaults, useTheme };
|
|
4923
|
+
export { APPEARANCE_CATEGORY, BADGE_CATEGORIES, BREAKPOINT, BUTTON_CATEGORIES, Badge, Button, CARD_CATEGORIES, CHECKBOX_CATEGORIES, CHIP_CATEGORIES, CODE_CATEGORIES, COL_CATEGORIES, COMPONENT, COMPONENT_PROPS_CATEGORY, CONTAINER_CATEGORIES, Card, Checkbox, Chip, Code, Col, ComponentCategories, ComponentKeys, Container, DIVIDER_CATEGORIES, Divider, GRID_CATEGORIES, Grid2, Grid3, Grid4, IMG_CATEGORIES, INTERACTIVE_CATEGORIES, Img, LABEL_CATEGORIES, LAYOUT_CORE, LAYOUT_FLEX, LAYOUT_FULL, LIST_CATEGORIES, LIST_STYLE, Label, Link, List, ListItem, PADDING, PageTitle, ROW_CATEGORIES, Row, SECTION_CATEGORIES, SHAPE, STACK_CATEGORIES, Section, SectionTitle, Stack, TYPOGRAPHY_CATEGORIES, TYPOGRAPHY_FULL, TYPOGRAPHY_STYLE, Text, ThemeProvider, Title, VARIANT, VISUAL_CORE, VISUAL_DECORATION, VISUAL_FULL, defaultTheme, themeDefaults, useTheme };
|
|
5085
4924
|
//# sourceMappingURL=index.esm.js.map
|