@lunar-js/lunar 0.0.1
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/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +41 -0
- package/dist/components/composite/Card/Card.d.ts +64 -0
- package/dist/components/composite/Card/Card.d.ts.map +1 -0
- package/dist/components/composite/Card/Card.js +86 -0
- package/dist/components/composite/Card/Card.js.map +1 -0
- package/dist/components/composite/Card/card.css.js +62 -0
- package/dist/components/composite/Card/card.css.js.map +1 -0
- package/dist/components/composite/Dialog/Dialog.d.ts +45 -0
- package/dist/components/composite/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/composite/Dialog/Dialog.js +117 -0
- package/dist/components/composite/Dialog/Dialog.js.map +1 -0
- package/dist/components/composite/Dialog/DialogProvider.d.ts +11 -0
- package/dist/components/composite/Dialog/DialogProvider.d.ts.map +1 -0
- package/dist/components/composite/Dialog/DialogProvider.js +19 -0
- package/dist/components/composite/Dialog/DialogProvider.js.map +1 -0
- package/dist/components/composite/Dialog/dialog.css.js +104 -0
- package/dist/components/composite/Dialog/dialog.css.js.map +1 -0
- package/dist/components/primitives/Button/Button.d.ts +27 -0
- package/dist/components/primitives/Button/Button.d.ts.map +1 -0
- package/dist/components/primitives/Button/Button.js +25 -0
- package/dist/components/primitives/Button/Button.js.map +1 -0
- package/dist/components/primitives/Button/button.css.d.ts +16 -0
- package/dist/components/primitives/Button/button.css.d.ts.map +1 -0
- package/dist/components/primitives/Button/button.css.js +202 -0
- package/dist/components/primitives/Button/button.css.js.map +1 -0
- package/dist/components/primitives/Button/button.types.d.ts +8 -0
- package/dist/components/primitives/Button/button.types.d.ts.map +1 -0
- package/dist/components/primitives/Input/Input.d.ts +12 -0
- package/dist/components/primitives/Input/Input.d.ts.map +1 -0
- package/dist/components/primitives/Input/Input.js +21 -0
- package/dist/components/primitives/Input/Input.js.map +1 -0
- package/dist/components/primitives/Input/input.css.js +54 -0
- package/dist/components/primitives/Input/input.css.js.map +1 -0
- package/dist/components/primitives/Label/Label.d.ts +13 -0
- package/dist/components/primitives/Label/Label.d.ts.map +1 -0
- package/dist/components/primitives/Label/Label.js +22 -0
- package/dist/components/primitives/Label/Label.js.map +1 -0
- package/dist/components/primitives/Label/label.css.js +35 -0
- package/dist/components/primitives/Label/label.css.js.map +1 -0
- package/dist/components/primitives/Typography/Text.d.ts +40 -0
- package/dist/components/primitives/Typography/Text.d.ts.map +1 -0
- package/dist/components/primitives/Typography/Text.js +28 -0
- package/dist/components/primitives/Typography/Text.js.map +1 -0
- package/dist/components/primitives/Typography/text.css.d.ts +31 -0
- package/dist/components/primitives/Typography/text.css.d.ts.map +1 -0
- package/dist/components/primitives/Typography/text.css.js +1019 -0
- package/dist/components/primitives/Typography/text.css.js.map +1 -0
- package/dist/components/primitives/Typography/text.types.d.ts +10 -0
- package/dist/components/primitives/Typography/text.types.d.ts.map +1 -0
- package/dist/constants/theming.d.ts +10 -0
- package/dist/constants/theming.d.ts.map +1 -0
- package/dist/constants/theming.js +11 -0
- package/dist/constants/theming.js.map +1 -0
- package/dist/hooks/dialog.d.ts +7 -0
- package/dist/hooks/dialog.d.ts.map +1 -0
- package/dist/hooks/dialog.js +14 -0
- package/dist/hooks/dialog.js.map +1 -0
- package/dist/hooks/refs.js +23 -0
- package/dist/hooks/refs.js.map +1 -0
- package/dist/hooks/theme.d.ts +7 -0
- package/dist/hooks/theme.d.ts.map +1 -0
- package/dist/hooks/theme.js +14 -0
- package/dist/hooks/theme.js.map +1 -0
- package/dist/hooks/utils.js +6 -0
- package/dist/hooks/utils.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +20 -0
- package/dist/styles.css.d.ts +4 -0
- package/dist/styles.css.js +5 -0
- package/dist/themes/ThemeProvider/ThemeProvider.d.ts +19 -0
- package/dist/themes/ThemeProvider/ThemeProvider.d.ts.map +1 -0
- package/dist/themes/ThemeProvider/ThemeProvider.js +25 -0
- package/dist/themes/ThemeProvider/ThemeProvider.js.map +1 -0
- package/dist/themes/regal.css.d.ts +5 -0
- package/dist/themes/regal.css.d.ts.map +1 -0
- package/dist/themes/regal.css.js +720 -0
- package/dist/themes/regal.css.js.map +1 -0
- package/dist/themes/styles/color-scheme.css.d.ts +6 -0
- package/dist/themes/styles/color-scheme.css.d.ts.map +1 -0
- package/dist/themes/styles/color-scheme.css.js +9 -0
- package/dist/themes/styles/color-scheme.css.js.map +1 -0
- package/dist/themes/styles/utilities.d.ts +125 -0
- package/dist/themes/styles/utilities.d.ts.map +1 -0
- package/dist/themes/styles/utilities.js +129 -0
- package/dist/themes/styles/utilities.js.map +1 -0
- package/dist/themes/tokens/primitives/borders.d.ts +22 -0
- package/dist/themes/tokens/primitives/borders.d.ts.map +1 -0
- package/dist/themes/tokens/primitives/borders.js +23 -0
- package/dist/themes/tokens/primitives/borders.js.map +1 -0
- package/dist/themes/tokens/primitives/colors.d.ts +100 -0
- package/dist/themes/tokens/primitives/colors.d.ts.map +1 -0
- package/dist/themes/tokens/primitives/colors.js +101 -0
- package/dist/themes/tokens/primitives/colors.js.map +1 -0
- package/dist/themes/tokens/primitives/shadows.d.ts +14 -0
- package/dist/themes/tokens/primitives/shadows.d.ts.map +1 -0
- package/dist/themes/tokens/primitives/shadows.js +15 -0
- package/dist/themes/tokens/primitives/shadows.js.map +1 -0
- package/dist/themes/tokens/primitives/spacing.d.ts +41 -0
- package/dist/themes/tokens/primitives/spacing.d.ts.map +1 -0
- package/dist/themes/tokens/primitives/spacing.js +42 -0
- package/dist/themes/tokens/primitives/spacing.js.map +1 -0
- package/dist/themes/tokens/primitives/typography.d.ts +105 -0
- package/dist/themes/tokens/primitives/typography.d.ts.map +1 -0
- package/dist/themes/tokens/primitives/typography.js +106 -0
- package/dist/themes/tokens/primitives/typography.js.map +1 -0
- package/dist/themes/tokens/semantic/borders.js +23 -0
- package/dist/themes/tokens/semantic/borders.js.map +1 -0
- package/dist/themes/tokens/semantic/colors.js +145 -0
- package/dist/themes/tokens/semantic/colors.js.map +1 -0
- package/dist/themes/tokens/semantic/shadows.js +15 -0
- package/dist/themes/tokens/semantic/shadows.js.map +1 -0
- package/dist/themes/tokens/semantic/spacing.js +70 -0
- package/dist/themes/tokens/semantic/spacing.js.map +1 -0
- package/dist/themes/tokens/semantic/typography.js +34 -0
- package/dist/themes/tokens/semantic/typography.js.map +1 -0
- package/dist/themes/tokens/tokens.css.d.ts +714 -0
- package/dist/themes/tokens/tokens.css.d.ts.map +1 -0
- package/dist/themes/tokens/tokens.css.js +36 -0
- package/dist/themes/tokens/tokens.css.js.map +1 -0
- package/dist/types/theming.d.ts +7 -0
- package/dist/types/theming.d.ts.map +1 -0
- package/package.json +80 -0
- package/src/components/composite/Card/Card.tsx +62 -0
- package/src/components/composite/Card/card.css.ts +79 -0
- package/src/components/composite/Dialog/Dialog.tsx +150 -0
- package/src/components/composite/Dialog/DialogProvider.tsx +21 -0
- package/src/components/composite/Dialog/dialog.css.ts +137 -0
- package/src/components/primitives/Button/Button.tsx +35 -0
- package/src/components/primitives/Button/button.css.ts +236 -0
- package/src/components/primitives/Button/button.types.ts +23 -0
- package/src/components/primitives/Input/Input.tsx +13 -0
- package/src/components/primitives/Input/input.css.ts +64 -0
- package/src/components/primitives/Label/Label.tsx +15 -0
- package/src/components/primitives/Label/label.css.ts +39 -0
- package/src/components/primitives/Typography/Text.tsx +55 -0
- package/src/components/primitives/Typography/text.css.ts +1091 -0
- package/src/components/primitives/Typography/text.types.ts +55 -0
- package/src/constants/theming.ts +16 -0
- package/src/hooks/dialog.ts +15 -0
- package/src/hooks/refs.ts +34 -0
- package/src/hooks/theme.ts +15 -0
- package/src/hooks/utils.ts +3 -0
- package/src/index.css.ts +26 -0
- package/src/index.ts +111 -0
- package/src/themes/ThemeProvider/ThemeProvider.tsx +39 -0
- package/src/themes/regal.css.ts +741 -0
- package/src/themes/styles/color-scheme.css.ts +11 -0
- package/src/themes/styles/utilities.ts +140 -0
- package/src/themes/tokens/primitives/borders.ts +21 -0
- package/src/themes/tokens/primitives/colors.ts +114 -0
- package/src/themes/tokens/primitives/shadows.ts +12 -0
- package/src/themes/tokens/primitives/spacing.ts +39 -0
- package/src/themes/tokens/primitives/typography.ts +125 -0
- package/src/themes/tokens/semantic/borders.ts +21 -0
- package/src/themes/tokens/semantic/colors.ts +166 -0
- package/src/themes/tokens/semantic/shadows.ts +12 -0
- package/src/themes/tokens/semantic/spacing.ts +75 -0
- package/src/themes/tokens/semantic/typography.ts +35 -0
- package/src/themes/tokens/tokens.css.ts +42 -0
- package/src/types/theming.ts +14 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { type CSSProperties, type StyleRule } from '@vanilla-extract/css';
|
|
2
|
+
|
|
3
|
+
import { COLORS__PURE } from '../tokens/primitives/colors.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Helper function to create a motion-safe style object with custom CSS properties.
|
|
7
|
+
* Returns a style object that wraps the provided styles in a `prefers-reduced-motion: no-preference` media query,
|
|
8
|
+
* ensuring animations only run when users haven't requested reduced motion.
|
|
9
|
+
*
|
|
10
|
+
* This function returns a style object that must be used with vanilla-extract's `style()` function or `recipe()` function.
|
|
11
|
+
*
|
|
12
|
+
* @param styles - CSS properties object (e.g., { transition: 'opacity 0.3s ease', transform: 'scale(1.1)' })
|
|
13
|
+
* @returns A style object that applies the CSS properties only when motion is preferred
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { style } from '@vanilla-extract/css';
|
|
17
|
+
* import { withSafeTransition } from './utilities.css.ts';
|
|
18
|
+
*
|
|
19
|
+
* const fadeTransition = style([
|
|
20
|
+
* withSafeTransition({
|
|
21
|
+
* transition: 'transform 0.2s ease-out, opacity 0.2s ease-out',
|
|
22
|
+
* transform: 'translateY(0)'
|
|
23
|
+
* }),
|
|
24
|
+
* {
|
|
25
|
+
* // Additional styles can be added here
|
|
26
|
+
* padding: '16px'
|
|
27
|
+
* }
|
|
28
|
+
* ]);
|
|
29
|
+
*/
|
|
30
|
+
const withSafeTransition = (styles: StyleRule): StyleRule => ({
|
|
31
|
+
'@media': {
|
|
32
|
+
'(prefers-reduced-motion: no-preference)': styles,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Helper function to create a custom focus outline style object.
|
|
38
|
+
* Returns a style object with focus-visible outline that follows the design system's outline pattern.
|
|
39
|
+
* Supports an optional selector parameter for targeting specific pseudo-selectors or child elements.
|
|
40
|
+
*
|
|
41
|
+
* This function returns a style object that must be used with vanilla-extract's `style()` function or `recipe()` function.
|
|
42
|
+
*
|
|
43
|
+
* @param outlineColor - The color for the focus outline (e.g., '#0066cc', 'rgb(255, 0, 0)', CSS custom properties)
|
|
44
|
+
* @param selector - Optional selector prefix for the focus-visible state (e.g., '&', '& > button', defaults to '')
|
|
45
|
+
* @returns A style object with custom focus outline styling that uses dynamic selector keys
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* import { style } from '@vanilla-extract/css';
|
|
49
|
+
* import { recipe } from '@vanilla-extract/recipes';
|
|
50
|
+
* import { withCustomOutline } from './utilities.css.ts';
|
|
51
|
+
*
|
|
52
|
+
* const redOutlineButton = style([
|
|
53
|
+
* withCustomOutline('#ff0000'),
|
|
54
|
+
* {
|
|
55
|
+
* padding: '8px 16px',
|
|
56
|
+
* background: 'white'
|
|
57
|
+
* }
|
|
58
|
+
* ]);
|
|
59
|
+
*
|
|
60
|
+
* // Example with custom selector
|
|
61
|
+
* const parentWithFocusableChild = style([
|
|
62
|
+
* withCustomOutline('#0066cc', '& > button'),
|
|
63
|
+
* {
|
|
64
|
+
* padding: '12px'
|
|
65
|
+
* }
|
|
66
|
+
* ]);
|
|
67
|
+
*
|
|
68
|
+
* const buttonVariants = recipe({
|
|
69
|
+
* base: [
|
|
70
|
+
* withCustomOutline(themeContract.colors.shadow.interactive),
|
|
71
|
+
* {
|
|
72
|
+
* // other base styles
|
|
73
|
+
* padding: '12px 24px'
|
|
74
|
+
* }
|
|
75
|
+
* ],
|
|
76
|
+
* variants: {
|
|
77
|
+
* // variant styles
|
|
78
|
+
* }
|
|
79
|
+
* });
|
|
80
|
+
*/
|
|
81
|
+
const withCustomOutline = (outlineColor: string, selector = ''): Record<`${string}:focus-visible`, CSSProperties> => ({
|
|
82
|
+
[`${selector}:focus-visible`]: {
|
|
83
|
+
boxShadow: `0px 0px 0px 0px, ${COLORS__PURE.transparent} 0px 0px 0px 0px, ${COLORS__PURE.transparent} 0px 0px 0px 0px, ${outlineColor} 0px 0px 0px 3px, ${outlineColor} 0px 1px 2px 0px`,
|
|
84
|
+
outline: '2px solid transparent',
|
|
85
|
+
outlineOffset: '2px',
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Helper function to create a responsive style object with breakpoint media queries.
|
|
91
|
+
* Returns a style object that applies the provided styles only when the viewport width
|
|
92
|
+
* meets or exceeds the specified breakpoint value.
|
|
93
|
+
*
|
|
94
|
+
* This function returns a style object that must be used with vanilla-extract's `style()` function or `recipe()` function.
|
|
95
|
+
*
|
|
96
|
+
* @param breakpoint - The minimum viewport width for the media query (e.g., '768px', '1024px', '48rem')
|
|
97
|
+
* @param styles - CSS properties object to apply at the breakpoint (e.g., { fontSize: '1.5rem', padding: '24px' })
|
|
98
|
+
* @returns A style object that applies the CSS properties only when the viewport width meets the breakpoint
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* import { style } from '@vanilla-extract/css';
|
|
102
|
+
* import { recipe } from '@vanilla-extract/recipes';
|
|
103
|
+
* import { withBreakpoint } from './utilities.css.ts';
|
|
104
|
+
*
|
|
105
|
+
* const responsiveText = style([
|
|
106
|
+
* withBreakpoint('768px', {
|
|
107
|
+
* fontSize: '1.5rem',
|
|
108
|
+
* lineHeight: '1.4'
|
|
109
|
+
* }),
|
|
110
|
+
* {
|
|
111
|
+
* // Base styles
|
|
112
|
+
* fontSize: '1rem',
|
|
113
|
+
* lineHeight: '1.6'
|
|
114
|
+
* }
|
|
115
|
+
* ]);
|
|
116
|
+
*
|
|
117
|
+
* const cardVariants = recipe({
|
|
118
|
+
* base: [
|
|
119
|
+
* withBreakpoint('1024px', {
|
|
120
|
+
* padding: '32px',
|
|
121
|
+
* maxWidth: '800px'
|
|
122
|
+
* }),
|
|
123
|
+
* {
|
|
124
|
+
* // base styles
|
|
125
|
+
* padding: '16px',
|
|
126
|
+
* maxWidth: '100%'
|
|
127
|
+
* }
|
|
128
|
+
* ],
|
|
129
|
+
* variants: {
|
|
130
|
+
* // variant styles
|
|
131
|
+
* }
|
|
132
|
+
* });
|
|
133
|
+
*/
|
|
134
|
+
const withBreakpoint = (breakpoint: string, styles: CSSProperties): StyleRule => ({
|
|
135
|
+
'@media': {
|
|
136
|
+
[`(min-width: ${breakpoint})`]: styles,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
export { withSafeTransition, withCustomOutline, withBreakpoint };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const BORDER_RADIUS = {
|
|
2
|
+
none: '0',
|
|
3
|
+
sm: '0.125rem', // 2px
|
|
4
|
+
base: '0.25rem', // 4px
|
|
5
|
+
md: '0.375rem', // 6px
|
|
6
|
+
lg: '0.5rem', // 8px
|
|
7
|
+
xl: '0.75rem', // 12px
|
|
8
|
+
'2xl': '1rem', // 16px
|
|
9
|
+
'3xl': '1.5rem', // 24px
|
|
10
|
+
full: '9999px',
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
const BORDER_WIDTH = {
|
|
14
|
+
0: '0',
|
|
15
|
+
1: '1px',
|
|
16
|
+
2: '2px',
|
|
17
|
+
4: '4px',
|
|
18
|
+
8: '8px',
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export { BORDER_WIDTH, BORDER_RADIUS };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
const COLORS__PURE = {
|
|
2
|
+
white: '1 0 0',
|
|
3
|
+
black: '0 0 0',
|
|
4
|
+
transparent: 'transparent',
|
|
5
|
+
} as const;
|
|
6
|
+
|
|
7
|
+
const COLORS__STONE = {
|
|
8
|
+
50: '0.98 0.005 50',
|
|
9
|
+
100: '0.92 0.010 50',
|
|
10
|
+
200: '0.85 0.014 50',
|
|
11
|
+
300: '0.75 0.018 50',
|
|
12
|
+
400: '0.65 0.022 50',
|
|
13
|
+
500: '0.55 0.024 50',
|
|
14
|
+
600: '0.45 0.022 50',
|
|
15
|
+
700: '0.35 0.018 50',
|
|
16
|
+
800: '0.25 0.014 50',
|
|
17
|
+
900: '0.18 0.010 50',
|
|
18
|
+
950: '0.12 0.006 50',
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
const COLORS__RED = {
|
|
22
|
+
50: '0.98 0.02 20',
|
|
23
|
+
100: '0.92 0.05 20',
|
|
24
|
+
200: '0.85 0.10 20',
|
|
25
|
+
300: '0.75 0.16 20',
|
|
26
|
+
400: '0.65 0.23 20',
|
|
27
|
+
500: '0.55 0.26 20',
|
|
28
|
+
600: '0.45 0.24 20',
|
|
29
|
+
700: '0.35 0.21 20',
|
|
30
|
+
800: '0.25 0.17 20',
|
|
31
|
+
900: '0.18 0.12 20',
|
|
32
|
+
950: '0.12 0.08 20',
|
|
33
|
+
} as const;
|
|
34
|
+
|
|
35
|
+
const COLORS__GREEN = {
|
|
36
|
+
50: '0.98 0.02 140',
|
|
37
|
+
100: '0.92 0.05 140',
|
|
38
|
+
200: '0.85 0.10 140',
|
|
39
|
+
300: '0.75 0.15 140',
|
|
40
|
+
400: '0.65 0.22 140',
|
|
41
|
+
500: '0.55 0.25 140',
|
|
42
|
+
600: '0.45 0.23 140',
|
|
43
|
+
700: '0.35 0.20 140',
|
|
44
|
+
800: '0.25 0.16 140',
|
|
45
|
+
900: '0.18 0.12 140',
|
|
46
|
+
950: '0.12 0.08 140',
|
|
47
|
+
} as const;
|
|
48
|
+
|
|
49
|
+
const COLORS__GOLD = {
|
|
50
|
+
50: '0.98 0.025 84.44',
|
|
51
|
+
100: '0.94 0.05 84.44',
|
|
52
|
+
200: '0.88 0.09 84.44',
|
|
53
|
+
300: '0.82 0.13 84.44',
|
|
54
|
+
400: '0.78 0.155 84.44',
|
|
55
|
+
500: '0.7446 0.161 84.44',
|
|
56
|
+
600: '0.65 0.155 84.44',
|
|
57
|
+
700: '0.52 0.14 84.44',
|
|
58
|
+
800: '0.38 0.11 84.44',
|
|
59
|
+
900: '0.26 0.08 84.44',
|
|
60
|
+
950: '0.17 0.05 84.44',
|
|
61
|
+
} as const;
|
|
62
|
+
|
|
63
|
+
const COLORS__PEARL = {
|
|
64
|
+
50: '0.995 0.002 260',
|
|
65
|
+
100: '0.955 0.004 260',
|
|
66
|
+
200: '0.90 0.006 260',
|
|
67
|
+
300: '0.80 0.008 260',
|
|
68
|
+
400: '0.72 0.010 260',
|
|
69
|
+
500: '0.68 0.012 260',
|
|
70
|
+
600: '0.50 0.013 260',
|
|
71
|
+
700: '0.40 0.014 260',
|
|
72
|
+
800: '0.38 0.013 260',
|
|
73
|
+
900: '0.25 0.011 260',
|
|
74
|
+
950: '0.15 0.009 260',
|
|
75
|
+
} as const;
|
|
76
|
+
|
|
77
|
+
const COLORS__YELLOW = {
|
|
78
|
+
50: '0.98 0.03 91.6',
|
|
79
|
+
100: '0.94 0.05 91.6',
|
|
80
|
+
200: '0.89 0.08 91.6',
|
|
81
|
+
300: '0.86 0.12 91.6',
|
|
82
|
+
400: '0.84 0.16 91.6',
|
|
83
|
+
500: '0.831 0.1805 91.6',
|
|
84
|
+
600: '0.75 0.17 91.6',
|
|
85
|
+
700: '0.65 0.15 91.6',
|
|
86
|
+
800: '0.52 0.12 91.6',
|
|
87
|
+
900: '0.38 0.09 91.6',
|
|
88
|
+
950: '0.26 0.06 91.6',
|
|
89
|
+
} as const;
|
|
90
|
+
|
|
91
|
+
const COLORS__BLUE = {
|
|
92
|
+
50: '0.95 0.03 246.61',
|
|
93
|
+
100: '0.90 0.06 246.61',
|
|
94
|
+
200: '0.83 0.12 246.61',
|
|
95
|
+
300: '0.75 0.16 246.61',
|
|
96
|
+
400: '0.68 0.18 246.61',
|
|
97
|
+
500: '0.6079 0.1983 246.61',
|
|
98
|
+
600: '0.52 0.18 246.61',
|
|
99
|
+
700: '0.42 0.15 246.61',
|
|
100
|
+
800: '0.32 0.12 246.61',
|
|
101
|
+
900: '0.22 0.08 246.61',
|
|
102
|
+
950: '0.15 0.05 246.61',
|
|
103
|
+
} as const;
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
COLORS__PURE,
|
|
107
|
+
COLORS__STONE,
|
|
108
|
+
COLORS__RED,
|
|
109
|
+
COLORS__GREEN,
|
|
110
|
+
COLORS__GOLD,
|
|
111
|
+
COLORS__PEARL,
|
|
112
|
+
COLORS__YELLOW,
|
|
113
|
+
COLORS__BLUE,
|
|
114
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const BOX_SHADOW = {
|
|
2
|
+
none: 'none',
|
|
3
|
+
sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
|
|
4
|
+
base: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
|
|
5
|
+
md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
|
|
6
|
+
lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
|
|
7
|
+
xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
|
|
8
|
+
'2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)',
|
|
9
|
+
inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export { BOX_SHADOW };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const SPACING = {
|
|
2
|
+
0: '0',
|
|
3
|
+
px: '1px',
|
|
4
|
+
0.5: '0.125rem', // 2px
|
|
5
|
+
1: '0.25rem', // 4px
|
|
6
|
+
1.5: '0.375rem', // 6px
|
|
7
|
+
2: '0.5rem', // 8px
|
|
8
|
+
2.5: '0.625rem', // 10px
|
|
9
|
+
3: '0.75rem', // 12px
|
|
10
|
+
3.5: '0.875rem', // 14px
|
|
11
|
+
4: '1rem', // 16px
|
|
12
|
+
5: '1.25rem', // 20px
|
|
13
|
+
6: '1.5rem', // 24px
|
|
14
|
+
7: '1.75rem', // 28px
|
|
15
|
+
8: '2rem', // 32px
|
|
16
|
+
9: '2.25rem', // 36px
|
|
17
|
+
10: '2.5rem', // 40px
|
|
18
|
+
11: '2.75rem', // 44px
|
|
19
|
+
12: '3rem', // 48px
|
|
20
|
+
14: '3.5rem', // 56px
|
|
21
|
+
16: '4rem', // 64px
|
|
22
|
+
20: '5rem', // 80px
|
|
23
|
+
24: '6rem', // 96px
|
|
24
|
+
28: '7rem', // 112px
|
|
25
|
+
32: '8rem', // 128px
|
|
26
|
+
36: '9rem', // 144px
|
|
27
|
+
40: '10rem', // 160px
|
|
28
|
+
44: '11rem', // 176px
|
|
29
|
+
48: '12rem', // 192px
|
|
30
|
+
52: '13rem', // 208px
|
|
31
|
+
56: '14rem', // 224px
|
|
32
|
+
60: '15rem', // 240px
|
|
33
|
+
64: '16rem', // 256px
|
|
34
|
+
72: '18rem', // 288px
|
|
35
|
+
80: '20rem', // 320px
|
|
36
|
+
96: '24rem', // 384px
|
|
37
|
+
} as const;
|
|
38
|
+
|
|
39
|
+
export { SPACING };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
const FONT_FAMILY = {
|
|
2
|
+
sans: {
|
|
3
|
+
primary: 'ui-sans-serif',
|
|
4
|
+
system: 'system-ui',
|
|
5
|
+
fallback: 'sans-serif',
|
|
6
|
+
emoji: {
|
|
7
|
+
apple: '"Apple Color Emoji"',
|
|
8
|
+
segoeUI: '"Segoe UI Emoji"',
|
|
9
|
+
segoeSymbol: '"Segoe UI Symbol"',
|
|
10
|
+
noto: '"Noto Color Emoji"',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
serif: {
|
|
14
|
+
primary: 'ui-serif',
|
|
15
|
+
georgia: 'Georgia',
|
|
16
|
+
cambria: 'Cambria',
|
|
17
|
+
timesNewRoman: '"Times New Roman"',
|
|
18
|
+
times: 'Times',
|
|
19
|
+
fallback: 'serif',
|
|
20
|
+
},
|
|
21
|
+
mono: {
|
|
22
|
+
primary: 'ui-monospace',
|
|
23
|
+
sfMono: 'SFMono-Regular',
|
|
24
|
+
menlo: '"Menlo"',
|
|
25
|
+
monaco: '"Monaco"',
|
|
26
|
+
consolas: '"Consolas"',
|
|
27
|
+
liberation: '"Liberation Mono"',
|
|
28
|
+
courierNew: '"Courier New"',
|
|
29
|
+
fallback: 'monospace',
|
|
30
|
+
},
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
const FONT_SIZE = {
|
|
34
|
+
'3xs': '0.625rem', // 10px
|
|
35
|
+
'2xs': '0.6875rem', // 11px
|
|
36
|
+
xs: '0.9375rem', // 15px
|
|
37
|
+
sm: '1.09375rem', // 17.5px
|
|
38
|
+
base: '1.25rem', // 20px
|
|
39
|
+
lg: '1.40625rem', // 22.5px
|
|
40
|
+
xl: '1.5625rem', // 25px
|
|
41
|
+
'2xl': '1.875rem', // 30px
|
|
42
|
+
'3xl': '2.34375rem', // 37.5px
|
|
43
|
+
'4xl': '2.8125rem', // 45px
|
|
44
|
+
'5xl': '3.75rem', // 60px
|
|
45
|
+
'6xl': '4.6875rem', // 75px
|
|
46
|
+
'7xl': '5.625rem', // 90px
|
|
47
|
+
'8xl': '7.5rem', // 120px
|
|
48
|
+
'9xl': '10rem', // 160px
|
|
49
|
+
} as const;
|
|
50
|
+
|
|
51
|
+
const FONT_WEIGHT = {
|
|
52
|
+
thin: '100',
|
|
53
|
+
extralight: '200',
|
|
54
|
+
light: '300',
|
|
55
|
+
normal: '400',
|
|
56
|
+
medium: '500',
|
|
57
|
+
semibold: '600',
|
|
58
|
+
bold: '700',
|
|
59
|
+
extrabold: '800',
|
|
60
|
+
black: '900',
|
|
61
|
+
} as const;
|
|
62
|
+
|
|
63
|
+
const LINE_HEIGHT = {
|
|
64
|
+
none: '1',
|
|
65
|
+
tight: '1.25',
|
|
66
|
+
snug: '1.375',
|
|
67
|
+
normal: '1.5',
|
|
68
|
+
relaxed: '1.625',
|
|
69
|
+
loose: '2',
|
|
70
|
+
3: '.75rem',
|
|
71
|
+
4: '1rem',
|
|
72
|
+
5: '1.25rem',
|
|
73
|
+
6: '1.5rem',
|
|
74
|
+
7: '1.75rem',
|
|
75
|
+
8: '2rem',
|
|
76
|
+
9: '2.25rem',
|
|
77
|
+
10: '2.5rem',
|
|
78
|
+
} as const;
|
|
79
|
+
|
|
80
|
+
const LINE_HEIGHT__TIGHT = {
|
|
81
|
+
'3xs': '0.75rem', // 12px (10 × 1.14 = 11.4 → 12px)
|
|
82
|
+
'2xs': '0.75rem', // 12px (11 × 1.14 = 12.54 → 12px)
|
|
83
|
+
xs: '1rem', // 16px (15 × 1.14 = 17.1 → 16px)
|
|
84
|
+
sm: '1.25rem', // 20px (17.5 × 1.14 = 19.95 → 20px)
|
|
85
|
+
base: '1.5rem', // 24px (20 × 1.14 = 22.8 → 24px)
|
|
86
|
+
lg: '1.75rem', // 28px (22.5 × 1.14 = 25.65 → 28px)
|
|
87
|
+
xl: '1.75rem', // 28px (25 × 1.14 = 28.5 → 28px)
|
|
88
|
+
'2xl': '2.25rem', // 36px (30 × 1.14 = 34.2 → 36px)
|
|
89
|
+
'3xl': '2.75rem', // 44px (37.5 × 1.14 = 42.75 → 44px)
|
|
90
|
+
'4xl': '3.25rem', // 52px (45 × 1.14 = 51.3 → 52px)
|
|
91
|
+
'5xl': '4.25rem', // 68px (60 × 1.14 = 68.4 → 68px)
|
|
92
|
+
'6xl': '5.5rem', // 88px (75 × 1.14 = 85.5 → 88px)
|
|
93
|
+
'7xl': '6.5rem', // 104px (90 × 1.14 = 102.6 → 104px)
|
|
94
|
+
'8xl': '8.5rem', // 136px (120 × 1.14 = 136.8 → 136px)
|
|
95
|
+
'9xl': '11.5rem', // 184px (160 × 1.14 = 182.4 → 184px)
|
|
96
|
+
} as const;
|
|
97
|
+
|
|
98
|
+
const LINE_HEIGHT__RELAXED = {
|
|
99
|
+
'3xs': '1rem', // 16px (10 × 1.5 = 15 → 16px)
|
|
100
|
+
'2xs': '1rem', // 16px (11 × 1.5 = 16.5 → 16px)
|
|
101
|
+
xs: '1.5rem', // 24px (15 × 1.5 = 22.5 → 24px)
|
|
102
|
+
sm: '1.75rem', // 28px (17.5 × 1.5 = 26.25 → 28px)
|
|
103
|
+
base: '2rem', // 32px (20 × 1.5 = 30 → 32px)
|
|
104
|
+
lg: '2.25rem', // 36px (22.5 × 1.5 = 33.75 → 36px)
|
|
105
|
+
xl: '2.25rem', // 36px (25 × 1.5 = 37.5 → 36px)
|
|
106
|
+
'2xl': '2.75rem', // 44px (30 × 1.5 = 45 → 44px)
|
|
107
|
+
'3xl': '3.5rem', // 56px (37.5 × 1.5 = 56.25 → 56px)
|
|
108
|
+
'4xl': '4.25rem', // 68px (45 × 1.5 = 67.5 → 68px)
|
|
109
|
+
'5xl': '5.75rem', // 92px (60 × 1.5 = 90 → 92px)
|
|
110
|
+
'6xl': '7rem', // 112px (75 × 1.5 = 112.5 → 112px)
|
|
111
|
+
'7xl': '8.5rem', // 136px (90 × 1.5 = 135 → 136px)
|
|
112
|
+
'8xl': '11.25rem', // 180px (120 × 1.5 = 180 → 180px)
|
|
113
|
+
'9xl': '15rem', // 240px (160 × 1.5 = 240 → 240px)
|
|
114
|
+
} as const;
|
|
115
|
+
|
|
116
|
+
const LETTER_SPACING = {
|
|
117
|
+
tighter: '-0.05em',
|
|
118
|
+
tight: '-0.025em',
|
|
119
|
+
normal: '0em',
|
|
120
|
+
wide: '0.025em',
|
|
121
|
+
wider: '0.05em',
|
|
122
|
+
widest: '0.1em',
|
|
123
|
+
} as const;
|
|
124
|
+
|
|
125
|
+
export { FONT_FAMILY, FONT_SIZE, FONT_WEIGHT, LINE_HEIGHT, LINE_HEIGHT__TIGHT, LINE_HEIGHT__RELAXED, LETTER_SPACING };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const BORDER_RADIUS = {
|
|
2
|
+
none: null,
|
|
3
|
+
sm: null,
|
|
4
|
+
base: null,
|
|
5
|
+
md: null,
|
|
6
|
+
lg: null,
|
|
7
|
+
xl: null,
|
|
8
|
+
'2xl': null,
|
|
9
|
+
'3xl': null,
|
|
10
|
+
full: null,
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
const BORDER_WIDTH = {
|
|
14
|
+
0: null,
|
|
15
|
+
1: null,
|
|
16
|
+
2: null,
|
|
17
|
+
4: null,
|
|
18
|
+
8: null,
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export { BORDER_RADIUS, BORDER_WIDTH };
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
const ACTION_COLORS = {
|
|
2
|
+
action: {
|
|
3
|
+
bg: {
|
|
4
|
+
primary: {
|
|
5
|
+
default: null,
|
|
6
|
+
hover: null,
|
|
7
|
+
active: null,
|
|
8
|
+
disabled: null,
|
|
9
|
+
},
|
|
10
|
+
secondary: {
|
|
11
|
+
default: null,
|
|
12
|
+
hover: null,
|
|
13
|
+
active: null,
|
|
14
|
+
disabled: null,
|
|
15
|
+
},
|
|
16
|
+
outline: {
|
|
17
|
+
default: null,
|
|
18
|
+
hover: null,
|
|
19
|
+
active: null,
|
|
20
|
+
disabled: null,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
color: {
|
|
24
|
+
primary: null,
|
|
25
|
+
outline: {
|
|
26
|
+
disabled: null,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
destructive: {
|
|
30
|
+
default: null,
|
|
31
|
+
hover: null,
|
|
32
|
+
active: null,
|
|
33
|
+
disabled: null,
|
|
34
|
+
},
|
|
35
|
+
ghost: {
|
|
36
|
+
default: null,
|
|
37
|
+
hover: null,
|
|
38
|
+
active: null,
|
|
39
|
+
disabled: null,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
} as const;
|
|
43
|
+
|
|
44
|
+
const BORDER_COLORS = {
|
|
45
|
+
border: {
|
|
46
|
+
default: null,
|
|
47
|
+
subtle: null,
|
|
48
|
+
strong: null,
|
|
49
|
+
interactive: {
|
|
50
|
+
default: null,
|
|
51
|
+
hover: null,
|
|
52
|
+
active: null,
|
|
53
|
+
},
|
|
54
|
+
focus: null,
|
|
55
|
+
success: null,
|
|
56
|
+
warning: null,
|
|
57
|
+
error: null,
|
|
58
|
+
info: null,
|
|
59
|
+
action: {
|
|
60
|
+
primary: null,
|
|
61
|
+
secondary: null,
|
|
62
|
+
destructive: null,
|
|
63
|
+
disabled: null,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
} as const;
|
|
67
|
+
|
|
68
|
+
const TEXT_COLORS = {
|
|
69
|
+
text: {
|
|
70
|
+
primary: null,
|
|
71
|
+
secondary: null,
|
|
72
|
+
tertiary: null,
|
|
73
|
+
interactive: {
|
|
74
|
+
default: null,
|
|
75
|
+
hover: null,
|
|
76
|
+
active: null,
|
|
77
|
+
},
|
|
78
|
+
success: null,
|
|
79
|
+
warning: null,
|
|
80
|
+
error: null,
|
|
81
|
+
info: null,
|
|
82
|
+
inverse: null,
|
|
83
|
+
disabled: null,
|
|
84
|
+
},
|
|
85
|
+
} as const;
|
|
86
|
+
|
|
87
|
+
const SURFACE_COLORS = {
|
|
88
|
+
surface: {
|
|
89
|
+
bg: {
|
|
90
|
+
primary: null,
|
|
91
|
+
secondary: null,
|
|
92
|
+
tertiary: null,
|
|
93
|
+
interactive: {
|
|
94
|
+
default: null,
|
|
95
|
+
hover: null,
|
|
96
|
+
active: null,
|
|
97
|
+
},
|
|
98
|
+
success: null,
|
|
99
|
+
warning: null,
|
|
100
|
+
error: null,
|
|
101
|
+
info: null,
|
|
102
|
+
overlay: null,
|
|
103
|
+
disabled: null,
|
|
104
|
+
inverse: null,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
} as const;
|
|
108
|
+
|
|
109
|
+
const ICON_COLORS = {
|
|
110
|
+
icon: {
|
|
111
|
+
primary: null,
|
|
112
|
+
secondary: null,
|
|
113
|
+
tertiary: null,
|
|
114
|
+
interactive: {
|
|
115
|
+
default: null,
|
|
116
|
+
hover: null,
|
|
117
|
+
active: null,
|
|
118
|
+
},
|
|
119
|
+
success: null,
|
|
120
|
+
warning: null,
|
|
121
|
+
error: null,
|
|
122
|
+
info: null,
|
|
123
|
+
inverse: null,
|
|
124
|
+
disabled: null,
|
|
125
|
+
},
|
|
126
|
+
} as const;
|
|
127
|
+
|
|
128
|
+
const INPUT_COLORS = {
|
|
129
|
+
input: {
|
|
130
|
+
bg: {
|
|
131
|
+
default: null,
|
|
132
|
+
hover: null,
|
|
133
|
+
focus: null,
|
|
134
|
+
disabled: null,
|
|
135
|
+
error: null,
|
|
136
|
+
},
|
|
137
|
+
border: {
|
|
138
|
+
default: null,
|
|
139
|
+
hover: null,
|
|
140
|
+
focus: null,
|
|
141
|
+
error: null,
|
|
142
|
+
disabled: null,
|
|
143
|
+
},
|
|
144
|
+
text: {
|
|
145
|
+
default: null,
|
|
146
|
+
placeholder: null,
|
|
147
|
+
disabled: null,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
} as const;
|
|
151
|
+
|
|
152
|
+
const SHADOW_COLORS = {
|
|
153
|
+
shadow: {
|
|
154
|
+
default: null,
|
|
155
|
+
subtle: null,
|
|
156
|
+
strong: null,
|
|
157
|
+
interactive: null,
|
|
158
|
+
focus: null,
|
|
159
|
+
destructive: null,
|
|
160
|
+
success: null,
|
|
161
|
+
warning: null,
|
|
162
|
+
error: null,
|
|
163
|
+
},
|
|
164
|
+
} as const;
|
|
165
|
+
|
|
166
|
+
export { SURFACE_COLORS, BORDER_COLORS, ACTION_COLORS, TEXT_COLORS, ICON_COLORS, INPUT_COLORS, SHADOW_COLORS };
|