@vaneui/ui 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -1
- package/dist/components/ui/classes/typographyClasses.d.ts +1 -7
- package/dist/components/ui/props/index.d.ts +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +79 -85
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +122 -84
- package/dist/index.js.map +1 -1
- package/dist/ui.css +4 -4
- package/package.json +19 -9
package/README.md
CHANGED
|
@@ -116,6 +116,18 @@ npm run build
|
|
|
116
116
|
|
|
117
117
|
# Watch mode for development
|
|
118
118
|
npm run watch
|
|
119
|
+
|
|
120
|
+
# Verify package contents
|
|
121
|
+
npm run verify-package
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Publishing the Package
|
|
125
|
+
|
|
126
|
+
Before publishing, the package automatically runs the build process and verifies that all required files are present. This ensures that the published package contains all necessary files for users.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Publish the package
|
|
130
|
+
npm publish
|
|
119
131
|
```
|
|
120
132
|
|
|
121
133
|
### Component Development Guidelines
|
|
@@ -144,4 +156,4 @@ When contributing to this project:
|
|
|
144
156
|
|
|
145
157
|
## License
|
|
146
158
|
|
|
147
|
-
This project is licensed under the ISC License.
|
|
159
|
+
This project is licensed under the ISC License.
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const fontWeightClasses: Record<FontWeightKey, string>;
|
|
3
|
-
export declare const fontStyleClasses: Record<FontStyleKey, string>;
|
|
4
|
-
export declare const fontFamilyClasses: Record<FontFamilyKey, string>;
|
|
5
|
-
export declare const textDecorationClasses: Record<TextDecorationKey, string>;
|
|
6
|
-
export declare const textTransformClasses: Record<TextTransformKey, string>;
|
|
7
|
-
export declare const textAlignClasses: Record<TextAlignKey, string>;
|
|
1
|
+
import { SizeKey, TextAppearanceKey } from "../props/keys";
|
|
8
2
|
export declare const filledTextAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
9
3
|
export declare const textAppearanceClasses: Record<TextAppearanceKey, string>;
|
|
10
4
|
export declare const textSizeClasses: Record<SizeKey, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './keys';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export { Divider } from "./components/ui/divider";
|
|
|
4
4
|
export { Chip } from "./components/ui/chip";
|
|
5
5
|
export { Section, Container, Col, Row, Stack, Grid3, Grid4, Card } from "./components/ui/layout";
|
|
6
6
|
export { Text, Title, Link, List, ListItem, SectionTitle, PageTitle } from "./components/ui/typography";
|
|
7
|
-
export { ThemeProvider, useTheme, type ThemeProps, type ThemeDefaults, type ThemeProviderProps, type PartialTheme,
|
|
8
|
-
export
|
|
7
|
+
export { ThemeProvider, useTheme, defaultTheme, COMPONENT_KEYS, type ThemeProps, type ThemeDefaults, type ThemeProviderProps, type PartialTheme, type ComponentKey, } from './components/themeContext';
|
|
8
|
+
export * from "./components/ui/props/index";
|
package/dist/index.esm.js
CHANGED
|
@@ -314,83 +314,6 @@ PositionTheme.defaultClasses = {
|
|
|
314
314
|
static: "static"
|
|
315
315
|
};
|
|
316
316
|
|
|
317
|
-
const fontWeightClasses = {
|
|
318
|
-
thin: "font-thin",
|
|
319
|
-
extralight: "font-extralight",
|
|
320
|
-
light: "font-light",
|
|
321
|
-
normal: "font-normal",
|
|
322
|
-
medium: "font-medium",
|
|
323
|
-
semibold: "font-semibold",
|
|
324
|
-
bold: "font-bold",
|
|
325
|
-
extrabold: "font-extrabold",
|
|
326
|
-
black: "font-black",
|
|
327
|
-
};
|
|
328
|
-
const fontStyleClasses = {
|
|
329
|
-
italic: "italic",
|
|
330
|
-
notItalic: "not-italic",
|
|
331
|
-
};
|
|
332
|
-
const fontFamilyClasses = {
|
|
333
|
-
sans: "font-sans",
|
|
334
|
-
serif: "font-serif",
|
|
335
|
-
mono: "font-mono",
|
|
336
|
-
};
|
|
337
|
-
const textDecorationClasses = {
|
|
338
|
-
underline: "underline",
|
|
339
|
-
lineThrough: "line-through",
|
|
340
|
-
noUnderline: "no-underline",
|
|
341
|
-
overline: "overline",
|
|
342
|
-
};
|
|
343
|
-
const textTransformClasses = {
|
|
344
|
-
uppercase: "uppercase",
|
|
345
|
-
lowercase: "lowercase",
|
|
346
|
-
capitalize: "capitalize",
|
|
347
|
-
normalCase: "normal-case",
|
|
348
|
-
};
|
|
349
|
-
const textAlignClasses = {
|
|
350
|
-
textLeft: "text-left",
|
|
351
|
-
textCenter: "text-center",
|
|
352
|
-
textRight: "text-right",
|
|
353
|
-
textJustify: "text-justify",
|
|
354
|
-
};
|
|
355
|
-
// Text appearance classes for filled buttons (all white text)
|
|
356
|
-
const filledTextAppearanceClasses = {
|
|
357
|
-
default: "text-white",
|
|
358
|
-
primary: "text-white",
|
|
359
|
-
secondary: "text-white",
|
|
360
|
-
tertiary: "text-white",
|
|
361
|
-
muted: "text-white",
|
|
362
|
-
link: "text-white",
|
|
363
|
-
accent: "text-white",
|
|
364
|
-
success: "text-white",
|
|
365
|
-
danger: "text-white",
|
|
366
|
-
warning: "text-white",
|
|
367
|
-
info: "text-white",
|
|
368
|
-
transparent: "text-transparent",
|
|
369
|
-
};
|
|
370
|
-
// Default text appearance classes (for non-button components)
|
|
371
|
-
const textAppearanceClasses = {
|
|
372
|
-
default: "text-(--text-color-default)",
|
|
373
|
-
primary: "text-(--text-color-primary)",
|
|
374
|
-
secondary: "text-(--text-color-secondary)",
|
|
375
|
-
tertiary: "text-(--text-color-tertiary)",
|
|
376
|
-
muted: "text-(--text-color-muted)",
|
|
377
|
-
link: "text-(--text-color-link)",
|
|
378
|
-
accent: "text-(--text-color-accent)",
|
|
379
|
-
success: "text-(--text-color-success)",
|
|
380
|
-
danger: "text-(--text-color-danger)",
|
|
381
|
-
warning: "text-(--text-color-warning)",
|
|
382
|
-
info: "text-(--text-color-info)",
|
|
383
|
-
transparent: "text-transparent",
|
|
384
|
-
};
|
|
385
|
-
// Text size classes
|
|
386
|
-
const textSizeClasses = {
|
|
387
|
-
xs: "text-xs",
|
|
388
|
-
sm: "text-sm",
|
|
389
|
-
md: "text-base",
|
|
390
|
-
lg: "text-lg",
|
|
391
|
-
xl: "text-xl",
|
|
392
|
-
};
|
|
393
|
-
|
|
394
317
|
class FontStyleTheme extends BaseTheme {
|
|
395
318
|
constructor(initial) {
|
|
396
319
|
super();
|
|
@@ -404,7 +327,10 @@ class FontStyleTheme extends BaseTheme {
|
|
|
404
327
|
return [key ? this[key] : '']; // No default for font style
|
|
405
328
|
}
|
|
406
329
|
}
|
|
407
|
-
FontStyleTheme.defaultClasses =
|
|
330
|
+
FontStyleTheme.defaultClasses = {
|
|
331
|
+
italic: "italic",
|
|
332
|
+
notItalic: "not-italic",
|
|
333
|
+
};
|
|
408
334
|
|
|
409
335
|
class FontFamilyTheme extends BaseTheme {
|
|
410
336
|
constructor(initial) {
|
|
@@ -419,7 +345,11 @@ class FontFamilyTheme extends BaseTheme {
|
|
|
419
345
|
return [this[key !== null && key !== void 0 ? key : 'sans'] || ''];
|
|
420
346
|
}
|
|
421
347
|
}
|
|
422
|
-
FontFamilyTheme.defaultClasses =
|
|
348
|
+
FontFamilyTheme.defaultClasses = {
|
|
349
|
+
sans: "font-sans",
|
|
350
|
+
serif: "font-serif",
|
|
351
|
+
mono: "font-mono",
|
|
352
|
+
};
|
|
423
353
|
|
|
424
354
|
class FontWeightTheme extends BaseTheme {
|
|
425
355
|
constructor(initial) {
|
|
@@ -434,7 +364,17 @@ class FontWeightTheme extends BaseTheme {
|
|
|
434
364
|
return [this[key !== null && key !== void 0 ? key : 'normal'] || '']; // Default to 'normal' if no key is provided
|
|
435
365
|
}
|
|
436
366
|
}
|
|
437
|
-
FontWeightTheme.defaultClasses =
|
|
367
|
+
FontWeightTheme.defaultClasses = {
|
|
368
|
+
thin: "font-thin",
|
|
369
|
+
extralight: "font-extralight",
|
|
370
|
+
light: "font-light",
|
|
371
|
+
normal: "font-normal",
|
|
372
|
+
medium: "font-medium",
|
|
373
|
+
semibold: "font-semibold",
|
|
374
|
+
bold: "font-bold",
|
|
375
|
+
extrabold: "font-extrabold",
|
|
376
|
+
black: "font-black",
|
|
377
|
+
};
|
|
438
378
|
|
|
439
379
|
class TextDecorationTheme extends BaseTheme {
|
|
440
380
|
constructor(initial) {
|
|
@@ -449,7 +389,12 @@ class TextDecorationTheme extends BaseTheme {
|
|
|
449
389
|
return [key ? this[key] : '']; // No default for text decoration
|
|
450
390
|
}
|
|
451
391
|
}
|
|
452
|
-
TextDecorationTheme.defaultClasses =
|
|
392
|
+
TextDecorationTheme.defaultClasses = {
|
|
393
|
+
underline: "underline",
|
|
394
|
+
lineThrough: "line-through",
|
|
395
|
+
noUnderline: "no-underline",
|
|
396
|
+
overline: "overline",
|
|
397
|
+
};
|
|
453
398
|
|
|
454
399
|
class TextTransformTheme extends BaseTheme {
|
|
455
400
|
constructor(initial) {
|
|
@@ -464,7 +409,12 @@ class TextTransformTheme extends BaseTheme {
|
|
|
464
409
|
return [key ? this[key] : '']; // No default for text transform
|
|
465
410
|
}
|
|
466
411
|
}
|
|
467
|
-
TextTransformTheme.defaultClasses =
|
|
412
|
+
TextTransformTheme.defaultClasses = {
|
|
413
|
+
uppercase: "uppercase",
|
|
414
|
+
lowercase: "lowercase",
|
|
415
|
+
capitalize: "capitalize",
|
|
416
|
+
normalCase: "normal-case",
|
|
417
|
+
};
|
|
468
418
|
|
|
469
419
|
class TextAlignTheme extends BaseTheme {
|
|
470
420
|
constructor(initial) {
|
|
@@ -479,7 +429,12 @@ class TextAlignTheme extends BaseTheme {
|
|
|
479
429
|
return [key ? this[key] : '']; // No default for text align
|
|
480
430
|
}
|
|
481
431
|
}
|
|
482
|
-
TextAlignTheme.defaultClasses =
|
|
432
|
+
TextAlignTheme.defaultClasses = {
|
|
433
|
+
textLeft: "text-left",
|
|
434
|
+
textCenter: "text-center",
|
|
435
|
+
textRight: "text-right",
|
|
436
|
+
textJustify: "text-justify",
|
|
437
|
+
};
|
|
483
438
|
|
|
484
439
|
const isObject = (item) => {
|
|
485
440
|
return item !== null && typeof item === 'object' && !Array.isArray(item);
|
|
@@ -3591,6 +3546,45 @@ PyTheme.defaultClasses = {
|
|
|
3591
3546
|
noPadding: "py-0"
|
|
3592
3547
|
};
|
|
3593
3548
|
|
|
3549
|
+
// Text appearance classes for filled buttons (all white text)
|
|
3550
|
+
const filledTextAppearanceClasses = {
|
|
3551
|
+
default: "text-white",
|
|
3552
|
+
primary: "text-white",
|
|
3553
|
+
secondary: "text-white",
|
|
3554
|
+
tertiary: "text-white",
|
|
3555
|
+
muted: "text-white",
|
|
3556
|
+
link: "text-white",
|
|
3557
|
+
accent: "text-white",
|
|
3558
|
+
success: "text-white",
|
|
3559
|
+
danger: "text-white",
|
|
3560
|
+
warning: "text-white",
|
|
3561
|
+
info: "text-white",
|
|
3562
|
+
transparent: "text-transparent",
|
|
3563
|
+
};
|
|
3564
|
+
// Default text appearance classes (for non-button components)
|
|
3565
|
+
const textAppearanceClasses = {
|
|
3566
|
+
default: "text-(--text-color-default)",
|
|
3567
|
+
primary: "text-(--text-color-primary)",
|
|
3568
|
+
secondary: "text-(--text-color-secondary)",
|
|
3569
|
+
tertiary: "text-(--text-color-tertiary)",
|
|
3570
|
+
muted: "text-(--text-color-muted)",
|
|
3571
|
+
link: "text-(--text-color-link)",
|
|
3572
|
+
accent: "text-(--text-color-accent)",
|
|
3573
|
+
success: "text-(--text-color-success)",
|
|
3574
|
+
danger: "text-(--text-color-danger)",
|
|
3575
|
+
warning: "text-(--text-color-warning)",
|
|
3576
|
+
info: "text-(--text-color-info)",
|
|
3577
|
+
transparent: "text-transparent",
|
|
3578
|
+
};
|
|
3579
|
+
// Text size classes
|
|
3580
|
+
const textSizeClasses = {
|
|
3581
|
+
xs: "text-xs",
|
|
3582
|
+
sm: "text-sm",
|
|
3583
|
+
md: "text-base",
|
|
3584
|
+
lg: "text-lg",
|
|
3585
|
+
xl: "text-xl",
|
|
3586
|
+
};
|
|
3587
|
+
|
|
3594
3588
|
class TextAppearanceTheme extends BaseTheme {
|
|
3595
3589
|
constructor(initialOverrides) {
|
|
3596
3590
|
super();
|
|
@@ -4128,7 +4122,7 @@ const createTypographyComponentTheme = (tag, base = "text-balance", textSizeMap
|
|
|
4128
4122
|
}, defaults);
|
|
4129
4123
|
};
|
|
4130
4124
|
// Page title specific theme
|
|
4131
|
-
const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracking-
|
|
4125
|
+
const pageTitleTheme = createTypographyComponentTheme("h1", "text-balance tracking-tight w-fit", {
|
|
4132
4126
|
xs: "text-3xl max-lg:text-2xl max-md:text-xl",
|
|
4133
4127
|
sm: "text-4xl max-lg:text-3xl max-md:text-2xl",
|
|
4134
4128
|
md: "text-5xl max-lg:text-4xl max-md:text-3xl",
|
|
@@ -4719,5 +4713,5 @@ const List = (props) => {
|
|
|
4719
4713
|
return jsx(ThemedComponent, { theme: theme.list, propsToOmit: TYPOGRAPHY_COMPONENT_KEYS, ...props });
|
|
4720
4714
|
};
|
|
4721
4715
|
|
|
4722
|
-
export { Badge, Button, COMPONENT_KEYS, Card, Chip, Col, Container, Divider, Grid3, Grid4, Link, List, ListItem, PageTitle, Row, Section, SectionTitle, Stack, Text, ThemeProvider, Title, defaultTheme, useTheme };
|
|
4716
|
+
export { APPEARANCE_KEYS, BADGE_KEYS, BASE_COMPONENT_KEYS, BORDER_KEYS, BREAKPOINT_KEYS, BUTTON_KEYS, Badge, Button, CARD_KEYS, CHIP_KEYS, COL_KEYS, COMPONENT_KEYS, CONTAINER_KEYS, Card, Chip, Col, Container, DIRECTION_REVERSE_KEYS, DISPLAY_KEYS, DIVIDER_KEYS, Divider, EXCLUSIVE_KEY_GROUPS, FLEX_DIRECTION_KEYS, FONT_FAMILY_KEYS, FONT_KEYS, FONT_STYLE_KEYS, FONT_WEIGHT_KEYS, GAP_KEYS, GRID_KEYS, Grid3, Grid4, HIDE_KEYS, ITEMS_KEYS, JUSTIFY_KEYS, Link, List, ListItem, MODE_KEYS, PADDING_KEYS, PILL_KEYS, POSITION_KEYS, PageTitle, RING_KEYS, ROUNDED_KEYS, ROW_KEYS, Row, SECTION_KEYS, SHADOW_KEYS, SHAPE_KEYS, SHARP_KEYS, SIZE_KEYS, STACK_KEYS, Section, SectionTitle, Stack, TEXT_ALIGN_KEYS, TEXT_APPEARANCE_KEYS, TEXT_DECORATION_KEYS, TEXT_TRANSFORM_KEYS, TYPOGRAPHY_COMPONENT_KEYS, Text, ThemeProvider, Title, VARIANT_KEYS, WRAP_KEYS, defaultTheme, useTheme };
|
|
4723
4717
|
//# sourceMappingURL=index.esm.js.map
|