@xqmsg/ui-core 0.27.0 → 0.29.0
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 +3 -3
- package/dist/components/SimpleTable/SimpleTable.stories.d.ts +2 -2
- package/dist/components/SimpleTable/TableTypes.d.ts +1 -1
- package/dist/components/SimpleTable/utils/generateTableColumns.d.ts +1 -1
- package/dist/components/banner/Banner.stories.d.ts +2 -2
- package/dist/components/banner/index.d.ts +1 -0
- package/dist/components/breadcrumbs/Breadcrumbs.stories.d.ts +2 -2
- package/dist/components/button/Button.stories.d.ts +2 -2
- package/dist/components/button/google/GoogleButton.stories.d.ts +2 -2
- package/dist/components/button/index.d.ts +4 -5
- package/dist/components/button/microsoft/MicrosoftButton.stories.d.ts +2 -2
- package/dist/components/button/spinner/SpinnerButton.stories.d.ts +2 -2
- package/dist/components/card/Card.stories.d.ts +2 -2
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/form/Form.stories.d.ts +2 -2
- package/dist/components/form/section/FormSection.stories.d.ts +2 -2
- package/dist/components/input/Input.stories.d.ts +2 -2
- package/dist/components/input/InputTypes.d.ts +3 -1
- package/dist/components/input/components/token/Token.stories.d.ts +2 -2
- package/dist/components/layout/Layout.stories.d.ts +2 -2
- package/dist/components/link/Link.stories.d.ts +2 -2
- package/dist/components/loading/LoadingIndicator.stories.d.ts +2 -2
- package/dist/components/modal/Modal.stories.d.ts +2 -2
- package/dist/components/navigation/NavigationMenu.stories.d.ts +2 -2
- package/dist/components/tabs/TabsWrapper.stories.d.ts +2 -2
- package/dist/components/text/Text.stories.d.ts +2 -2
- package/dist/components/toast/Toast.stories.d.ts +2 -2
- package/dist/components/toolbar/Toolbar.stories.d.ts +2 -2
- package/dist/hooks/useToast.d.ts +1 -2
- package/dist/theme/components/checkbox.d.ts +1 -1
- package/dist/theme/components/code.d.ts +9 -3
- package/dist/theme/components/form-error.d.ts +1 -2
- package/dist/theme/components/link.d.ts +1 -1
- package/dist/theme/components/menu.d.ts +2 -1
- package/dist/theme/components/modal.d.ts +15 -11
- package/dist/theme/components/switch.d.ts +2 -1
- package/dist/theme/components/tabs.d.ts +4 -4
- package/dist/theme/foundations/colors.d.ts +225 -22
- package/dist/theme/foundations/typography.d.ts +10 -9
- package/dist/theme/styles.d.ts +0 -3
- package/dist/ui-core.cjs.development.js +296 -243
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +296 -244
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +4 -9
- package/src/components/SimpleTable/SimpleTable.tsx +1 -1
- package/src/components/SimpleTable/TableTypes.ts +1 -1
- package/src/components/SimpleTable/components/loading/index.tsx +2 -2
- package/src/components/SimpleTable/components/text/index.tsx +2 -2
- package/src/components/banner/index.tsx +18 -5
- package/src/components/breadcrumbs/components/icon/index.tsx +3 -3
- package/src/components/breadcrumbs/components/label/index.tsx +1 -1
- package/src/components/button/index.tsx +6 -6
- package/src/components/card/index.tsx +12 -10
- package/src/components/icons/chevron/down/index.tsx +1 -1
- package/src/components/icons/settings/index.tsx +1 -1
- package/src/components/input/InputTypes.ts +4 -1
- package/src/components/input/StackedMultiSelect/index.tsx +10 -3
- package/src/components/input/StackedNumberInput/StackedNumberInput.tsx +2 -2
- package/src/components/input/StackedPilledInput/index.tsx +11 -3
- package/src/components/input/StackedSelect/index.tsx +1 -5
- package/src/components/input/components/dropdown/index.tsx +8 -8
- package/src/components/input/components/label/index.tsx +2 -2
- package/src/components/input/components/token/index.tsx +1 -1
- package/src/components/input/index.tsx +1 -2
- package/src/components/link/index.tsx +1 -1
- package/src/components/loading/index.tsx +1 -1
- package/src/components/navigation/components/header/index.tsx +1 -1
- package/src/components/navigation/components/items/index.tsx +1 -1
- package/src/components/select/index.tsx +0 -19
- package/src/components/toast/index.tsx +2 -2
- package/src/components/toolbar/components/breadcrumbs/item/index.tsx +2 -2
- package/src/components/toolbar/components/dropdown/index.tsx +2 -2
- package/src/theme/components/alert.ts +4 -4
- package/src/theme/components/button.ts +50 -50
- package/src/theme/components/form-error.ts +3 -5
- package/src/theme/components/form-label.ts +1 -1
- package/src/theme/components/form.ts +2 -2
- package/src/theme/components/input.ts +3 -3
- package/src/theme/components/link.ts +4 -13
- package/src/theme/components/menu.ts +1 -1
- package/src/theme/components/modal.ts +17 -11
- package/src/theme/components/table.ts +2 -2
- package/src/theme/components/tabs.ts +6 -6
- package/src/theme/foundations/colors.ts +89 -37
- package/src/theme/foundations/shadows.ts +3 -3
- package/src/theme/foundations/typography.ts +3 -2
- package/src/theme/styles.ts +0 -3
|
@@ -12,26 +12,26 @@ const baseStyle = {
|
|
|
12
12
|
width: '100%',
|
|
13
13
|
fontSize: '13px',
|
|
14
14
|
textAlign: 'left',
|
|
15
|
-
color: colors.
|
|
15
|
+
color: colors.text.primary,
|
|
16
16
|
lineHeight: '16px',
|
|
17
17
|
},
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
function variantPositive() {
|
|
21
21
|
return {
|
|
22
|
-
container: { bg: colors.
|
|
22
|
+
container: { bg: colors.status.success.fill },
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function variantWarning() {
|
|
27
27
|
return {
|
|
28
|
-
container: { bg: colors.
|
|
28
|
+
container: { bg: colors.status.warning.fill },
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function variantError() {
|
|
33
33
|
return {
|
|
34
|
-
container: { bg: colors.fill
|
|
34
|
+
container: { bg: colors.status.danger.fill },
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -5,8 +5,8 @@ const baseStyle = defineStyle({
|
|
|
5
5
|
borderRadius: '4px',
|
|
6
6
|
fontSize: '13px',
|
|
7
7
|
fontWeight: 400,
|
|
8
|
-
bg: colors.
|
|
9
|
-
color: colors.
|
|
8
|
+
bg: colors.action.solid,
|
|
9
|
+
color: colors.text.onAccent,
|
|
10
10
|
h: '26px',
|
|
11
11
|
border: 'none',
|
|
12
12
|
px: '8px',
|
|
@@ -20,11 +20,11 @@ const baseStyle = defineStyle({
|
|
|
20
20
|
pointerEvents: 'none',
|
|
21
21
|
},
|
|
22
22
|
_hover: {
|
|
23
|
-
bg: colors.
|
|
23
|
+
bg: colors.action.solid,
|
|
24
24
|
},
|
|
25
25
|
_active: {
|
|
26
|
-
color: colors.
|
|
27
|
-
bg: colors.
|
|
26
|
+
color: colors.text.onAccent,
|
|
27
|
+
bg: colors.action.solid,
|
|
28
28
|
bgGradient: colors.fill.light.quaternary,
|
|
29
29
|
},
|
|
30
30
|
_focus: {
|
|
@@ -41,17 +41,17 @@ const variantSecondary = () => {
|
|
|
41
41
|
return {
|
|
42
42
|
...baseStyle,
|
|
43
43
|
color: colors.black,
|
|
44
|
-
bg: colors.
|
|
44
|
+
bg: colors.surface.canvas,
|
|
45
45
|
_hover: {
|
|
46
|
-
bg: colors.
|
|
46
|
+
bg: colors.surface.canvas,
|
|
47
47
|
},
|
|
48
48
|
_active: {
|
|
49
49
|
color: colors.black,
|
|
50
|
-
bg: colors.
|
|
50
|
+
bg: colors.surface.canvas,
|
|
51
51
|
bgGradient: colors.fill.light.quaternary,
|
|
52
52
|
},
|
|
53
53
|
_focus: {
|
|
54
|
-
bg: colors.
|
|
54
|
+
bg: colors.surface.canvas,
|
|
55
55
|
},
|
|
56
56
|
};
|
|
57
57
|
};
|
|
@@ -59,22 +59,22 @@ const variantSecondary = () => {
|
|
|
59
59
|
const variantTertiary = () => {
|
|
60
60
|
return {
|
|
61
61
|
...baseStyle,
|
|
62
|
-
color: colors.
|
|
63
|
-
bg: colors.
|
|
62
|
+
color: colors.text.onAccent,
|
|
63
|
+
bg: colors.fill.dark.subtle,
|
|
64
64
|
_hover: {
|
|
65
|
-
bg: colors.
|
|
65
|
+
bg: colors.fill.dark.subtle,
|
|
66
66
|
},
|
|
67
67
|
_active: {
|
|
68
|
-
color: colors.
|
|
69
|
-
bg: colors.
|
|
68
|
+
color: colors.text.onAccent,
|
|
69
|
+
bg: colors.fill.dark.strong,
|
|
70
70
|
},
|
|
71
71
|
_focus: {
|
|
72
|
-
color: colors.
|
|
73
|
-
bg: colors.
|
|
72
|
+
color: colors.text.onAccent,
|
|
73
|
+
bg: colors.fill.dark.subtle,
|
|
74
74
|
},
|
|
75
75
|
_disabled: {
|
|
76
|
-
backgroundColor: colors.
|
|
77
|
-
color:
|
|
76
|
+
backgroundColor: colors.fill.dark.subtle,
|
|
77
|
+
color: 'gray.500',
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
80
|
};
|
|
@@ -83,22 +83,22 @@ const variantDanger = () => {
|
|
|
83
83
|
return {
|
|
84
84
|
...baseStyle,
|
|
85
85
|
fontWeight: '400',
|
|
86
|
-
color: colors.
|
|
87
|
-
bg: colors.
|
|
86
|
+
color: colors.text.onAccent,
|
|
87
|
+
bg: colors.action.danger,
|
|
88
88
|
_hover: {
|
|
89
|
-
bg: colors.
|
|
89
|
+
bg: colors.action.danger,
|
|
90
90
|
},
|
|
91
91
|
_active: {
|
|
92
|
-
color: colors.
|
|
93
|
-
bg: colors.
|
|
92
|
+
color: colors.text.onAccent,
|
|
93
|
+
bg: colors.action.danger,
|
|
94
94
|
},
|
|
95
95
|
_focus: {
|
|
96
|
-
color: colors.
|
|
97
|
-
bg: colors.
|
|
96
|
+
color: colors.text.onAccent,
|
|
97
|
+
bg: colors.action.danger,
|
|
98
98
|
},
|
|
99
99
|
_disabled: {
|
|
100
|
-
backgroundColor: colors.
|
|
101
|
-
color: colors.
|
|
100
|
+
backgroundColor: colors.action.danger,
|
|
101
|
+
color: colors.text.secondary,
|
|
102
102
|
},
|
|
103
103
|
};
|
|
104
104
|
};
|
|
@@ -106,7 +106,7 @@ const variantDanger = () => {
|
|
|
106
106
|
const variantPrimaryFlat = () => {
|
|
107
107
|
return {
|
|
108
108
|
...baseStyle,
|
|
109
|
-
bg: colors.
|
|
109
|
+
bg: colors.action.solid,
|
|
110
110
|
bgGradient: null,
|
|
111
111
|
minWidth: '120px',
|
|
112
112
|
padding: '10px 16px',
|
|
@@ -129,17 +129,17 @@ const variantSecondaryFlat = () => {
|
|
|
129
129
|
...variantPrimaryFlat(),
|
|
130
130
|
fontWeight: '400',
|
|
131
131
|
color: colors.black,
|
|
132
|
-
bg: colors.
|
|
132
|
+
bg: colors.surface.canvas,
|
|
133
133
|
_hover: {
|
|
134
|
-
bg: colors.
|
|
134
|
+
bg: colors.surface.canvas,
|
|
135
135
|
},
|
|
136
136
|
_active: {
|
|
137
137
|
color: colors.black,
|
|
138
|
-
bg: colors.
|
|
138
|
+
bg: colors.surface.canvas,
|
|
139
139
|
bgGradient: colors.fill.light.quaternary,
|
|
140
140
|
},
|
|
141
141
|
_focus: {
|
|
142
|
-
bg: colors.
|
|
142
|
+
bg: colors.surface.canvas,
|
|
143
143
|
},
|
|
144
144
|
};
|
|
145
145
|
};
|
|
@@ -147,22 +147,22 @@ const variantTertiaryFlat = () => {
|
|
|
147
147
|
return {
|
|
148
148
|
...variantPrimaryFlat(),
|
|
149
149
|
fontWeight: '400',
|
|
150
|
-
color: colors.
|
|
151
|
-
bg: colors.
|
|
150
|
+
color: colors.text.onAccent,
|
|
151
|
+
bg: colors.fill.dark.subtle,
|
|
152
152
|
_hover: {
|
|
153
|
-
bg: colors.
|
|
153
|
+
bg: colors.fill.dark.subtle,
|
|
154
154
|
},
|
|
155
155
|
_active: {
|
|
156
|
-
color: colors.
|
|
157
|
-
bg: colors.
|
|
156
|
+
color: colors.text.onAccent,
|
|
157
|
+
bg: colors.fill.dark.strong,
|
|
158
158
|
},
|
|
159
159
|
_focus: {
|
|
160
|
-
color: colors.
|
|
161
|
-
bg: colors.
|
|
160
|
+
color: colors.text.onAccent,
|
|
161
|
+
bg: colors.fill.dark.subtle,
|
|
162
162
|
},
|
|
163
163
|
_disabled: {
|
|
164
|
-
backgroundColor: colors.
|
|
165
|
-
color:
|
|
164
|
+
backgroundColor: colors.fill.dark.subtle,
|
|
165
|
+
color: 'gray.500',
|
|
166
166
|
},
|
|
167
167
|
};
|
|
168
168
|
};
|
|
@@ -170,22 +170,22 @@ const variantDangerFlat = () => {
|
|
|
170
170
|
return {
|
|
171
171
|
...variantPrimaryFlat(),
|
|
172
172
|
fontWeight: '400',
|
|
173
|
-
color: colors.
|
|
174
|
-
bg: colors.
|
|
173
|
+
color: colors.text.onAccent,
|
|
174
|
+
bg: colors.action.danger,
|
|
175
175
|
_hover: {
|
|
176
|
-
bg: colors.
|
|
176
|
+
bg: colors.action.danger,
|
|
177
177
|
},
|
|
178
178
|
_active: {
|
|
179
|
-
color: colors.
|
|
180
|
-
bg: colors.
|
|
179
|
+
color: colors.text.onAccent,
|
|
180
|
+
bg: colors.action.danger,
|
|
181
181
|
},
|
|
182
182
|
_focus: {
|
|
183
|
-
color: colors.
|
|
184
|
-
bg: colors.
|
|
183
|
+
color: colors.text.onAccent,
|
|
184
|
+
bg: colors.action.danger,
|
|
185
185
|
},
|
|
186
186
|
_disabled: {
|
|
187
|
-
backgroundColor: colors.
|
|
188
|
-
color: colors.
|
|
187
|
+
backgroundColor: colors.action.danger,
|
|
188
|
+
color: colors.text.secondary,
|
|
189
189
|
},
|
|
190
190
|
};
|
|
191
191
|
};
|
|
@@ -4,10 +4,8 @@ const parts = ['text', 'icon'];
|
|
|
4
4
|
|
|
5
5
|
function baseStyleText() {
|
|
6
6
|
return {
|
|
7
|
-
color: colors.
|
|
8
|
-
|
|
9
|
-
bottom: 0,
|
|
10
|
-
// mt: 1,
|
|
7
|
+
color: colors.text.danger,
|
|
8
|
+
mt: 1,
|
|
11
9
|
ml: 1,
|
|
12
10
|
fontSize: '11px',
|
|
13
11
|
};
|
|
@@ -16,7 +14,7 @@ function baseStyleText() {
|
|
|
16
14
|
function baseStyleIcon() {
|
|
17
15
|
return {
|
|
18
16
|
ml: 1,
|
|
19
|
-
color: colors.
|
|
17
|
+
color: colors.text.danger,
|
|
20
18
|
};
|
|
21
19
|
}
|
|
22
20
|
|
|
@@ -5,7 +5,7 @@ const parts = ['requiredIndicator', 'helperText'];
|
|
|
5
5
|
function baseStyleRequiredIndicator() {
|
|
6
6
|
return {
|
|
7
7
|
ml: 1,
|
|
8
|
-
color: colors.
|
|
8
|
+
color: colors.text.danger,
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ function baseStyleHelperText() {
|
|
|
13
13
|
return {
|
|
14
14
|
// mt: 1,
|
|
15
15
|
ml: 1,
|
|
16
|
-
color: colors.
|
|
16
|
+
color: colors.text.secondary,
|
|
17
17
|
fontSize: '11px',
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -7,7 +7,7 @@ const baseStyle = {
|
|
|
7
7
|
fontSize: '13px',
|
|
8
8
|
h: '26px',
|
|
9
9
|
'::placeholder': {
|
|
10
|
-
color: colors.
|
|
10
|
+
color: colors.text.secondary,
|
|
11
11
|
},
|
|
12
12
|
py: '5px',
|
|
13
13
|
px: '8px',
|
|
@@ -17,7 +17,7 @@ const baseStyle = {
|
|
|
17
17
|
opacity: 1,
|
|
18
18
|
cursor: 'not-allowed',
|
|
19
19
|
bg: colors.fill.light.quaternary,
|
|
20
|
-
color: colors.
|
|
20
|
+
color: colors.text.secondary,
|
|
21
21
|
border: '1px solid',
|
|
22
22
|
borderColor: '#9999991A',
|
|
23
23
|
},
|
|
@@ -27,7 +27,7 @@ const baseStyle = {
|
|
|
27
27
|
borderColor: colors.border.focus,
|
|
28
28
|
},
|
|
29
29
|
_placeholder: {
|
|
30
|
-
color: colors.
|
|
30
|
+
color: colors.text.secondary,
|
|
31
31
|
},
|
|
32
32
|
},
|
|
33
33
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { getColor } from '@chakra-ui/theme-tools';
|
|
2
1
|
import colors from '../foundations/colors';
|
|
3
2
|
|
|
4
3
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
4
|
type Dict = Record<string, any>;
|
|
6
5
|
|
|
7
6
|
const baseStyle = {
|
|
8
|
-
color: colors.
|
|
7
|
+
color: colors.action.solid,
|
|
9
8
|
textDecoration: 'underline',
|
|
10
9
|
transition: 'none',
|
|
11
10
|
_hover: {
|
|
@@ -17,7 +16,6 @@ function variantSidebar() {
|
|
|
17
16
|
return {
|
|
18
17
|
display: 'flex',
|
|
19
18
|
alignItems: 'center',
|
|
20
|
-
// height: '56px',
|
|
21
19
|
pl: 4,
|
|
22
20
|
pr: 4,
|
|
23
21
|
py: 2,
|
|
@@ -44,23 +42,16 @@ function variantSidebar() {
|
|
|
44
42
|
// and not only for a child sub route match. I did it as a separate variant instead of a
|
|
45
43
|
// prop to get around React complaining that the dom element was not recognized.
|
|
46
44
|
function variantSidebarExact() {
|
|
47
|
-
// props: Dict
|
|
48
45
|
const base = variantSidebar();
|
|
49
|
-
// const { theme } = props;
|
|
50
|
-
// const primaryColor = getColor(theme, 'primary.500');
|
|
51
46
|
|
|
52
47
|
return {
|
|
53
48
|
...base,
|
|
54
|
-
'&.active': {
|
|
55
|
-
// ...base['&.active'],
|
|
56
|
-
// boxShadow: `inset 3px 0 0 0 ${primaryColor}`,
|
|
57
|
-
},
|
|
49
|
+
'&.active': {},
|
|
58
50
|
};
|
|
59
51
|
}
|
|
60
52
|
|
|
61
|
-
function variantSubNavigation(
|
|
62
|
-
const
|
|
63
|
-
const primaryColor = getColor(theme, 'primary.500');
|
|
53
|
+
function variantSubNavigation(_props: Dict) {
|
|
54
|
+
const primaryColor = colors.action.solid;
|
|
64
55
|
|
|
65
56
|
return {
|
|
66
57
|
display: 'block',
|
|
@@ -37,7 +37,7 @@ function baseStyleItem(props: Dict) {
|
|
|
37
37
|
transition: 'background 50ms ease-in 0s',
|
|
38
38
|
_hover: {
|
|
39
39
|
color: colors.white,
|
|
40
|
-
background: colors.
|
|
40
|
+
background: colors.action.solid,
|
|
41
41
|
},
|
|
42
42
|
_active: {
|
|
43
43
|
bg: mode(`gray.200`, `whiteAlpha.200`)(props),
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import colors from '../foundations/colors';
|
|
2
|
+
|
|
1
3
|
const parts = [
|
|
2
4
|
'overlay',
|
|
3
5
|
'dialogContainer',
|
|
@@ -9,30 +11,34 @@ const parts = [
|
|
|
9
11
|
];
|
|
10
12
|
|
|
11
13
|
const baseStyle = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
overlay: {
|
|
15
|
+
backdropFilter: 'blur(25px)',
|
|
16
|
+
},
|
|
17
|
+
dialog: {
|
|
18
|
+
width: 'fit-content',
|
|
19
|
+
height: 'fit-content',
|
|
20
|
+
background: colors.coolGray,
|
|
21
|
+
},
|
|
16
22
|
header: {
|
|
17
|
-
pt:
|
|
18
|
-
px:
|
|
19
|
-
pb:
|
|
23
|
+
pt: 8,
|
|
24
|
+
px: 8,
|
|
25
|
+
pb: 4,
|
|
20
26
|
fontSize: '18px',
|
|
21
27
|
fontWeight: 600,
|
|
22
28
|
lineHeight: '26px',
|
|
23
29
|
},
|
|
24
30
|
body: {
|
|
25
31
|
pt: 0,
|
|
26
|
-
pb:
|
|
27
|
-
px:
|
|
32
|
+
pb: 8,
|
|
33
|
+
px: 8,
|
|
28
34
|
fontSize: '13px',
|
|
29
35
|
fontWeight: 400,
|
|
30
36
|
lineHeight: '16px',
|
|
31
37
|
whiteSpace: 'pre-line',
|
|
32
38
|
},
|
|
33
39
|
footer: {
|
|
34
|
-
py:
|
|
35
|
-
px:
|
|
40
|
+
py: 4,
|
|
41
|
+
px: 8,
|
|
36
42
|
display: 'flex',
|
|
37
43
|
justifyContent: 'flex-end',
|
|
38
44
|
width: '100%',
|
|
@@ -3,9 +3,9 @@ import colors from '../foundations/colors';
|
|
|
3
3
|
const parts = ['th', 'td', 'tr', 'body', 'thead'];
|
|
4
4
|
|
|
5
5
|
const baseStyle = {
|
|
6
|
-
thead: { bg: colors.
|
|
6
|
+
thead: { bg: colors.surface.canvas },
|
|
7
7
|
th: {
|
|
8
|
-
bg: colors.
|
|
8
|
+
bg: colors.surface.canvas,
|
|
9
9
|
padding: '5px 8px !important',
|
|
10
10
|
fontSize: '13px',
|
|
11
11
|
},
|
|
@@ -55,7 +55,7 @@ const baseStyle = (props: Dict) => {
|
|
|
55
55
|
const sizes = {
|
|
56
56
|
sm: {
|
|
57
57
|
tab: {
|
|
58
|
-
py:
|
|
58
|
+
py: 1,
|
|
59
59
|
px: 6,
|
|
60
60
|
fontSize: '0.85rem',
|
|
61
61
|
},
|
|
@@ -63,14 +63,14 @@ const sizes = {
|
|
|
63
63
|
md: {
|
|
64
64
|
tab: {
|
|
65
65
|
fontSize: '1rem',
|
|
66
|
-
py:
|
|
66
|
+
py: 3,
|
|
67
67
|
px: 6,
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
lg: {
|
|
71
71
|
tab: {
|
|
72
72
|
fontSize: { base: '1rem', sm: '1.15rem' },
|
|
73
|
-
py:
|
|
73
|
+
py: 3,
|
|
74
74
|
px: 6,
|
|
75
75
|
},
|
|
76
76
|
},
|
|
@@ -206,12 +206,12 @@ const variantSimple = {
|
|
|
206
206
|
position: 'relative',
|
|
207
207
|
borderColor: 'transparent',
|
|
208
208
|
'&.active': {
|
|
209
|
-
color: colors.
|
|
209
|
+
color: colors.action.solid,
|
|
210
210
|
bg: 'transparent',
|
|
211
|
-
borderBottom: `1px solid ${colors.
|
|
211
|
+
borderBottom: `1px solid ${colors.action.solid}`,
|
|
212
212
|
},
|
|
213
213
|
_selected: {
|
|
214
|
-
color: colors.
|
|
214
|
+
color: colors.action.solid,
|
|
215
215
|
bg: 'transparent',
|
|
216
216
|
_after: {
|
|
217
217
|
content: '""',
|
|
@@ -63,60 +63,113 @@ const green: ColorHues = {
|
|
|
63
63
|
900: 'hsl(138, 42%, 6%)',
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
// ─── Canonical semantic tokens ────────────────────────────────────────────────
|
|
67
|
+
|
|
68
|
+
const text = {
|
|
69
|
+
primary: '#000000', // body text
|
|
70
|
+
secondary: '#3C3C4399', // de-emphasised text
|
|
71
|
+
tertiary: '#3C3C4366', // hint / placeholder level — lighter than secondary
|
|
72
|
+
onAccent: '#FFFFFF', // text on coloured (blue/red) surfaces
|
|
73
|
+
danger: red[500], // form-error text and required indicator
|
|
71
74
|
};
|
|
72
75
|
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
default: '#D9D9D9',
|
|
76
|
-
light: '#99999919A',
|
|
76
|
+
const surface = {
|
|
77
|
+
canvas: '#FFFFFF', // page / card / table-header background
|
|
77
78
|
};
|
|
78
79
|
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
const action = {
|
|
81
|
+
solid: '#0082ff', // primary interactive blue (buttons, links, spinners)
|
|
82
|
+
danger: red[600], // danger button fill; also used for focus rings
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const status = {
|
|
86
|
+
success: { fill: '#d8f1b8' },
|
|
87
|
+
warning: { fill: '#ffefb4' },
|
|
88
|
+
danger: { fill: '#ffbdb9' },
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const border = {
|
|
92
|
+
focus: '#3A6CD980',
|
|
93
|
+
default: '#D9D9D9',
|
|
94
|
+
/** @deprecated typo was '#99999919A' — kept for compat, use inline '#9999991A' */
|
|
95
|
+
light: '#9999991A',
|
|
82
96
|
};
|
|
83
97
|
|
|
84
98
|
const fill = {
|
|
85
99
|
light: {
|
|
86
|
-
primary:
|
|
87
|
-
secondary:
|
|
88
|
-
tertiary:
|
|
100
|
+
primary: '#74748033',
|
|
101
|
+
secondary: '#74748029',
|
|
102
|
+
tertiary: '#7474801F',
|
|
89
103
|
quaternary: '#7474800D',
|
|
90
104
|
},
|
|
105
|
+
// translucent "dark glass" fills — previously named blur.*
|
|
106
|
+
dark: {
|
|
107
|
+
subtle: '#2A2A2A60', // tertiary button default bg
|
|
108
|
+
strong: '#111111A6', // tertiary button pressed bg
|
|
109
|
+
},
|
|
110
|
+
// ─── deprecated aliases ───────────────────────────────────────────────────
|
|
111
|
+
/** @deprecated use colors.action.solid */
|
|
112
|
+
action: '#0082ff',
|
|
113
|
+
/** @deprecated use colors.status.success.fill */
|
|
91
114
|
success: '#d8f1b8',
|
|
92
|
-
|
|
115
|
+
/** @deprecated use colors.status.danger.fill */
|
|
116
|
+
error: '#ffbdb9',
|
|
117
|
+
/** @deprecated use colors.status.warning.fill */
|
|
93
118
|
warning: '#ffefb4',
|
|
94
|
-
action: '#0082ff',
|
|
95
119
|
};
|
|
96
120
|
|
|
121
|
+
// ─── Deprecated compat aliases ────────────────────────────────────────────────
|
|
122
|
+
// Keep old top-level keys so consumer repos don't break on upgrade.
|
|
123
|
+
// Remove these in the next major version.
|
|
124
|
+
|
|
125
|
+
/** @deprecated use colors.text.* and colors.surface.canvas */
|
|
126
|
+
const label = {
|
|
127
|
+
primary: { light: text.primary, dark: text.onAccent },
|
|
128
|
+
secondary: { light: text.secondary },
|
|
129
|
+
tertiary: { light: text.tertiary, dark: '#EBEBF52E' },
|
|
130
|
+
error: text.danger,
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/** @deprecated use colors.fill.dark.subtle / colors.fill.dark.strong */
|
|
134
|
+
const blur = {
|
|
135
|
+
quaternary: { dark: fill.dark.subtle },
|
|
136
|
+
tertiary: { dark: fill.dark.strong },
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/** @deprecated colors.semantic.* was a parallel action palette — use colors.action / colors.status instead */
|
|
97
140
|
const semantic = {
|
|
98
|
-
action:
|
|
141
|
+
action: '#488ef7',
|
|
99
142
|
success: '#5fcf65',
|
|
100
143
|
warning: '#f8c352',
|
|
101
|
-
error:
|
|
144
|
+
error: '#f96057',
|
|
102
145
|
};
|
|
103
146
|
|
|
104
147
|
export const colors = {
|
|
105
|
-
|
|
106
|
-
|
|
148
|
+
// canonical
|
|
149
|
+
text,
|
|
150
|
+
surface,
|
|
151
|
+
action,
|
|
152
|
+
status,
|
|
107
153
|
border,
|
|
108
154
|
fill,
|
|
155
|
+
// deprecated compat
|
|
156
|
+
label,
|
|
157
|
+
blur,
|
|
109
158
|
semantic,
|
|
159
|
+
// misc
|
|
110
160
|
transparent: 'transparent',
|
|
111
|
-
current:
|
|
112
|
-
black:
|
|
113
|
-
white:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
161
|
+
current: 'currentColor',
|
|
162
|
+
black: '#000000',
|
|
163
|
+
white: '#FFFFFF',
|
|
164
|
+
/** @deprecated */
|
|
165
|
+
lightBlue: '#29abe2',
|
|
166
|
+
coolGray: '#F6F7FB',
|
|
167
|
+
/** @deprecated */
|
|
168
|
+
darkBlue: '#292f4c',
|
|
169
|
+
/** @deprecated */
|
|
170
|
+
backdrop: '#fbfcff',
|
|
118
171
|
whiteAlpha: {
|
|
119
|
-
50:
|
|
172
|
+
50: 'rgba(255, 255, 255, 0.04)',
|
|
120
173
|
100: 'rgba(255, 255, 255, 0.06)',
|
|
121
174
|
200: 'rgba(255, 255, 255, 0.08)',
|
|
122
175
|
300: 'rgba(255, 255, 255, 0.16)',
|
|
@@ -127,9 +180,8 @@ export const colors = {
|
|
|
127
180
|
800: 'rgba(255, 255, 255, 0.80)',
|
|
128
181
|
900: 'rgba(255, 255, 255, 0.92)',
|
|
129
182
|
},
|
|
130
|
-
|
|
131
183
|
blackAlpha: {
|
|
132
|
-
50:
|
|
184
|
+
50: 'rgba(0, 0, 0, 0.04)',
|
|
133
185
|
100: 'rgba(0, 0, 0, 0.06)',
|
|
134
186
|
200: 'rgba(0, 0, 0, 0.08)',
|
|
135
187
|
300: 'rgba(0, 0, 0, 0.16)',
|
|
@@ -140,26 +192,26 @@ export const colors = {
|
|
|
140
192
|
800: 'rgba(0, 0, 0, 0.80)',
|
|
141
193
|
900: 'rgba(0, 0, 0, 0.92)',
|
|
142
194
|
},
|
|
143
|
-
|
|
144
195
|
gray: {
|
|
145
|
-
50:
|
|
196
|
+
50: 'hsl(240, 3%, 94%)',
|
|
146
197
|
100: 'hsl(210, 3%, 87%)',
|
|
147
|
-
200: 'hsl(220, 4%, 69%)',
|
|
198
|
+
200: 'hsl(220, 4%, 69%)',
|
|
148
199
|
300: 'hsl(225, 4%, 56%)',
|
|
149
200
|
400: 'hsl(222, 4%, 44%)',
|
|
150
201
|
500: 'hsl(224, 6%, 38%)',
|
|
151
202
|
600: 'hsl(227, 6%, 30%)',
|
|
152
|
-
700: 'hsl(230, 5%, 23%)',
|
|
203
|
+
700: 'hsl(230, 5%, 23%)',
|
|
153
204
|
800: 'hsl(216, 6%, 15%)',
|
|
154
205
|
900: 'hsl(240, 5%, 4%)',
|
|
155
206
|
},
|
|
156
|
-
|
|
157
207
|
red,
|
|
158
208
|
orange,
|
|
159
209
|
green,
|
|
160
210
|
blue,
|
|
161
211
|
};
|
|
162
212
|
|
|
163
|
-
|
|
213
|
+
/** Canonical alias — prefer this over `colors` for new code */
|
|
214
|
+
export const tokens = colors;
|
|
164
215
|
|
|
216
|
+
export type Colors = typeof colors;
|
|
165
217
|
export default colors as Colors;
|
|
@@ -9,9 +9,9 @@ const shadows = {
|
|
|
9
9
|
xl:
|
|
10
10
|
'0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
|
|
11
11
|
'2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
|
|
12
|
-
insetOutline:
|
|
13
|
-
outline:
|
|
14
|
-
outlineDanger600: `0 0 0 2px ${colors.
|
|
12
|
+
insetOutline: `inset 0 0 0 2px ${colors.action.solid}`,
|
|
13
|
+
outline: `0 0 0 2px ${colors.action.solid}`,
|
|
14
|
+
outlineDanger600: `0 0 0 2px ${colors.action.danger}`,
|
|
15
15
|
inner: 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
|
|
16
16
|
none: 'none',
|
|
17
17
|
'dark-lg':
|