@xqmsg/ui-core 0.28.1 → 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/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 +2 -0
- 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 +281 -235
- 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 +281 -236
- 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/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 +3 -0
- package/src/components/input/StackedMultiSelect/index.tsx +7 -2
- package/src/components/input/StackedNumberInput/StackedNumberInput.tsx +2 -2
- package/src/components/input/StackedPilledInput/index.tsx +11 -3
- 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
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.29.0",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"trailingComma": "es5"
|
|
38
38
|
},
|
|
39
39
|
"name": "@xqmsg/ui-core",
|
|
40
|
+
"packageManager": "pnpm@11.8.0",
|
|
40
41
|
"author": {
|
|
41
42
|
"name": "XQ",
|
|
42
43
|
"email": "ike@xqmsg.com",
|
|
@@ -87,8 +88,7 @@
|
|
|
87
88
|
"tsdx": "^0.14.1",
|
|
88
89
|
"tslib": "^2.5.0",
|
|
89
90
|
"typescript": "^4.8.2",
|
|
90
|
-
"yalc": "^1.0.0-pre.53"
|
|
91
|
-
"yarn-audit-fix": "^9.3.10"
|
|
91
|
+
"yalc": "^1.0.0-pre.53"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
94
|
"@chakra-ui/icons": "^2.0.19",
|
|
@@ -113,10 +113,5 @@
|
|
|
113
113
|
"react-router-dom": "^5.3.3",
|
|
114
114
|
"react-select": "^5.7.3",
|
|
115
115
|
"yup": "^0.32.11"
|
|
116
|
-
},
|
|
117
|
-
"resolutions": {
|
|
118
|
-
"framer-motion": "6.4.1",
|
|
119
|
-
"**/@typescript-eslint/eslint-plugin": "^5.59.5",
|
|
120
|
-
"**/@typescript-eslint/parser": "^5.59.5"
|
|
121
116
|
}
|
|
122
|
-
}
|
|
117
|
+
}
|
|
@@ -60,7 +60,7 @@ export function SimpleTable<T extends ReadonlyTableColumns>({
|
|
|
60
60
|
>
|
|
61
61
|
{(headers || columnsWidths) && (
|
|
62
62
|
<Thead>
|
|
63
|
-
<Tr _odd={{ bg: colors.
|
|
63
|
+
<Tr _odd={{ bg: colors.surface.canvas }}>
|
|
64
64
|
{columnsAsConst.map((column, idx) => (
|
|
65
65
|
<Th key={idx} width={columnsWidths?.[column as T[number]]}>
|
|
66
66
|
{headers && headers[column as T[number]]}
|
|
@@ -9,7 +9,7 @@ export type TableHeaders<K extends ReadonlyTableColumns> = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export type TableColumnsWidths<K extends ReadonlyTableColumns> = {
|
|
12
|
-
[k in K[number]]
|
|
12
|
+
[k in K[number]]?: string | number;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export type TableRow<K extends ReadonlyTableColumns> = {
|
|
@@ -26,7 +26,7 @@ export const TableLoadingRows: React.FC<TableLoadingRowsProps> = ({
|
|
|
26
26
|
borderTopColor={colors.fill.light.quaternary}
|
|
27
27
|
>
|
|
28
28
|
{isLoading ? (
|
|
29
|
-
<Spinner size="lg" color={colors.
|
|
29
|
+
<Spinner size="lg" color={colors.action.solid} />
|
|
30
30
|
) : (
|
|
31
31
|
<IconButton
|
|
32
32
|
aria-label="Fetch more rows"
|
|
@@ -34,7 +34,7 @@ export const TableLoadingRows: React.FC<TableLoadingRowsProps> = ({
|
|
|
34
34
|
fontSize={typography.fontSizes['3xl']}
|
|
35
35
|
bg="transparent"
|
|
36
36
|
shadow="none"
|
|
37
|
-
color={colors.
|
|
37
|
+
color={colors.action.solid}
|
|
38
38
|
type="button"
|
|
39
39
|
variant="outline"
|
|
40
40
|
onClick={onLoadMore}
|
|
@@ -16,8 +16,8 @@ export const TableText: React.FC<TableTextProps> = ({
|
|
|
16
16
|
}) => {
|
|
17
17
|
return (
|
|
18
18
|
<Box>
|
|
19
|
-
<Text color={colors.
|
|
20
|
-
<Text color={colors.
|
|
19
|
+
<Text color={colors.text.primary}>{primaryText}</Text>
|
|
20
|
+
<Text color={colors.text.secondary}>{secondaryText}</Text>
|
|
21
21
|
</Box>
|
|
22
22
|
);
|
|
23
23
|
};
|
|
@@ -14,11 +14,11 @@ export const Icon: React.FC<IconProps> = ({ step, status }) => {
|
|
|
14
14
|
const getColors = useMemo(() => {
|
|
15
15
|
switch (status) {
|
|
16
16
|
case 'active':
|
|
17
|
-
return { bg: '#0082FF', color: colors.
|
|
17
|
+
return { bg: '#0082FF', color: colors.text.onAccent };
|
|
18
18
|
case 'complete':
|
|
19
|
-
return { bg: '#7474800D', color: colors.
|
|
19
|
+
return { bg: '#7474800D', color: colors.text.primary };
|
|
20
20
|
case 'inactive':
|
|
21
|
-
return { bg: '#7474800D', color: colors.
|
|
21
|
+
return { bg: '#7474800D', color: colors.text.primary };
|
|
22
22
|
}
|
|
23
23
|
}, [status]);
|
|
24
24
|
|
|
@@ -12,7 +12,7 @@ export interface LabelProps {
|
|
|
12
12
|
export const Label: React.FC<LabelProps> = ({ label }) => {
|
|
13
13
|
return (
|
|
14
14
|
<Box pl="8px">
|
|
15
|
-
<Text color={colors.
|
|
15
|
+
<Text color={colors.text.primary} fontSize="13px">
|
|
16
16
|
{label}
|
|
17
17
|
</Text>
|
|
18
18
|
</Box>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { Button as ChakraButton } from '@chakra-ui/react';
|
|
3
3
|
import buttonTheme from '../../theme/components/button';
|
|
4
4
|
|
|
5
5
|
export interface ButtonProps {
|
|
6
|
-
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/** @deprecated use children */
|
|
8
|
+
text?: string;
|
|
7
9
|
onClick?: () => void;
|
|
8
10
|
width: 'variable' | 'fixed';
|
|
9
11
|
variant?: keyof typeof buttonTheme.variants;
|
|
@@ -16,11 +18,9 @@ export interface ButtonProps {
|
|
|
16
18
|
color?: string;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
/**
|
|
20
|
-
* A functional React component utilized to render the `Button` component
|
|
21
|
-
*/
|
|
22
21
|
export const Button: React.FC<ButtonProps> = ({
|
|
23
22
|
onClick,
|
|
23
|
+
children,
|
|
24
24
|
text,
|
|
25
25
|
type = 'button',
|
|
26
26
|
ariaLabel,
|
|
@@ -45,7 +45,7 @@ export const Button: React.FC<ButtonProps> = ({
|
|
|
45
45
|
leftIcon={leftIcon}
|
|
46
46
|
color={color}
|
|
47
47
|
>
|
|
48
|
-
{text}
|
|
48
|
+
{children ?? text}
|
|
49
49
|
</ChakraButton>
|
|
50
50
|
);
|
|
51
51
|
};
|
|
@@ -9,6 +9,7 @@ export interface CardProps {
|
|
|
9
9
|
leftIcon?: JSX.Element;
|
|
10
10
|
children: ReactNode | null;
|
|
11
11
|
height?: string | number;
|
|
12
|
+
width?: string | number;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -19,18 +20,19 @@ export const Card: React.FC<CardProps> = ({
|
|
|
19
20
|
leftIcon,
|
|
20
21
|
children,
|
|
21
22
|
height = 'auto',
|
|
23
|
+
width = '206px',
|
|
22
24
|
}) => {
|
|
23
25
|
return (
|
|
24
26
|
<Box
|
|
25
27
|
bg={colors.fill.light.quaternary}
|
|
26
28
|
borderRadius="4px"
|
|
27
29
|
border={`.5px solid ${colors.border.default}`}
|
|
28
|
-
py=
|
|
29
|
-
px=
|
|
30
|
+
py={2}
|
|
31
|
+
px={2}
|
|
30
32
|
height={height}
|
|
31
33
|
overflowY="auto"
|
|
32
|
-
width=
|
|
33
|
-
_notLast={{ marginBottom:
|
|
34
|
+
width={width}
|
|
35
|
+
_notLast={{ marginBottom: 2 }}
|
|
34
36
|
>
|
|
35
37
|
{title && (
|
|
36
38
|
<Flex
|
|
@@ -39,12 +41,12 @@ export const Card: React.FC<CardProps> = ({
|
|
|
39
41
|
justifyContent="start"
|
|
40
42
|
textDecoration="none"
|
|
41
43
|
_hover={{ textDecoration: 'none' }}
|
|
42
|
-
mb=
|
|
44
|
+
mb={2}
|
|
43
45
|
>
|
|
44
46
|
<Flex alignItems="center">
|
|
45
|
-
<Box mr=
|
|
47
|
+
<Box mr={1}>{leftIcon}</Box>
|
|
46
48
|
<Text
|
|
47
|
-
color={colors.
|
|
49
|
+
color={colors.text.primary}
|
|
48
50
|
fontSize={typography.fontSizes.sm}
|
|
49
51
|
fontWeight={typography.fontWeights.medium}
|
|
50
52
|
>
|
|
@@ -61,8 +63,8 @@ export const Card: React.FC<CardProps> = ({
|
|
|
61
63
|
return (
|
|
62
64
|
<Text
|
|
63
65
|
as="div"
|
|
64
|
-
_notLast={{ marginBottom:
|
|
65
|
-
color={colors.
|
|
66
|
+
_notLast={{ marginBottom: 2 }}
|
|
67
|
+
color={colors.text.primary}
|
|
66
68
|
fontSize={typography.fontSizes.xs}
|
|
67
69
|
fontWeight={typography.fontWeights.normal}
|
|
68
70
|
>
|
|
@@ -70,7 +72,7 @@ export const Card: React.FC<CardProps> = ({
|
|
|
70
72
|
</Text>
|
|
71
73
|
);
|
|
72
74
|
} else {
|
|
73
|
-
return <Box mt=
|
|
75
|
+
return <Box mt={2}>{child}</Box>;
|
|
74
76
|
}
|
|
75
77
|
})}
|
|
76
78
|
</Box>
|
|
@@ -11,6 +11,6 @@ export interface SettingsProps {
|
|
|
11
11
|
*/
|
|
12
12
|
export const Settings: React.FC<SettingsProps> = ({ boxSize }) => {
|
|
13
13
|
return (
|
|
14
|
-
<SettingsIcon width={boxSize} height={boxSize} fill={colors.
|
|
14
|
+
<SettingsIcon width={boxSize} height={boxSize} fill={colors.action.solid} />
|
|
15
15
|
);
|
|
16
16
|
};
|
|
@@ -45,6 +45,7 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
45
45
|
const dropdownMenuRef = useRef<HTMLDivElement>(null);
|
|
46
46
|
const scrollRef = useRef<HTMLDivElement>(null);
|
|
47
47
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
48
|
+
const searchRef = useRef<HTMLInputElement>(null);
|
|
48
49
|
|
|
49
50
|
const [isInit, setIsInit] = useState(false);
|
|
50
51
|
const [localValues, setLocalValues] = useState<FieldOption[]>([]);
|
|
@@ -260,6 +261,10 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
260
261
|
);
|
|
261
262
|
}, [localOptions, searchValue]);
|
|
262
263
|
|
|
264
|
+
useEffect(() => {
|
|
265
|
+
if (isFocussed) searchRef.current?.focus();
|
|
266
|
+
}, [isFocussed]);
|
|
267
|
+
|
|
263
268
|
const handleInput = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
264
269
|
const initialOptionIndex =
|
|
265
270
|
filteredOptions[0]?.value === 'section_header' ? 1 : 0;
|
|
@@ -325,7 +330,7 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
325
330
|
</Box>
|
|
326
331
|
))
|
|
327
332
|
) : (
|
|
328
|
-
<Text color={colors.
|
|
333
|
+
<Text color={colors.text.secondary} fontSize="13px">
|
|
329
334
|
{placeholder}
|
|
330
335
|
</Text>
|
|
331
336
|
)}
|
|
@@ -355,7 +360,7 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
355
360
|
loading={loadingOptions}
|
|
356
361
|
>
|
|
357
362
|
<Input
|
|
358
|
-
|
|
363
|
+
ref={searchRef}
|
|
359
364
|
value={searchValue}
|
|
360
365
|
onChange={handleInput}
|
|
361
366
|
disabled={loadingOptions}
|
|
@@ -82,7 +82,7 @@ const StackedNumberInput = React.forwardRef<
|
|
|
82
82
|
max={max}
|
|
83
83
|
step={step}
|
|
84
84
|
precision={precision}
|
|
85
|
-
onChange={(
|
|
85
|
+
onChange={(valueAsString: string, valueAsNumber: number) =>
|
|
86
86
|
onChange?.({
|
|
87
87
|
target: {
|
|
88
88
|
name,
|
|
@@ -90,7 +90,7 @@ const StackedNumberInput = React.forwardRef<
|
|
|
90
90
|
? ''
|
|
91
91
|
: precision === 0
|
|
92
92
|
? String(Math.round(valueAsNumber))
|
|
93
|
-
:
|
|
93
|
+
: valueAsString,
|
|
94
94
|
},
|
|
95
95
|
} as React.ChangeEvent<HTMLInputElement>)
|
|
96
96
|
}
|
|
@@ -402,7 +402,7 @@ const StackedPilledInput = React.forwardRef<
|
|
|
402
402
|
: null}
|
|
403
403
|
{!lastestFormValueToArray.length && !isFocussed ? (
|
|
404
404
|
<Text
|
|
405
|
-
color={colors.
|
|
405
|
+
color={colors.text.secondary}
|
|
406
406
|
fontSize={isMobile ? '17px' : '13px'}
|
|
407
407
|
pointerEvents="none"
|
|
408
408
|
>
|
|
@@ -423,13 +423,17 @@ const StackedPilledInput = React.forwardRef<
|
|
|
423
423
|
border="none"
|
|
424
424
|
height="auto"
|
|
425
425
|
color={
|
|
426
|
-
tokenIndex !== null ? 'transparent' : colors.
|
|
426
|
+
tokenIndex !== null ? 'transparent' : colors.text.primary
|
|
427
427
|
}
|
|
428
428
|
_focus={{ boxShadow: 'none !important' }}
|
|
429
429
|
value={localValue}
|
|
430
430
|
onChange={handleOnChange}
|
|
431
431
|
ref={inputRef}
|
|
432
432
|
onFocus={() => setIsFocussed(true)}
|
|
433
|
+
onBlur={() => {
|
|
434
|
+
setIsFocussed(false);
|
|
435
|
+
setTokenIndex(null);
|
|
436
|
+
}}
|
|
433
437
|
fontSize={isMobile ? '17px' : '13px'}
|
|
434
438
|
lineHeight={1.5}
|
|
435
439
|
placeholder={
|
|
@@ -454,13 +458,17 @@ const StackedPilledInput = React.forwardRef<
|
|
|
454
458
|
border="none"
|
|
455
459
|
height="auto"
|
|
456
460
|
color={
|
|
457
|
-
tokenIndex !== null ? 'transparent' : colors.
|
|
461
|
+
tokenIndex !== null ? 'transparent' : colors.text.primary
|
|
458
462
|
}
|
|
459
463
|
_focus={{ boxShadow: 'none !important' }}
|
|
460
464
|
value={localValue}
|
|
461
465
|
onChange={handleOnChange}
|
|
462
466
|
ref={inputRef}
|
|
463
467
|
onFocus={() => setIsFocussed(true)}
|
|
468
|
+
onBlur={() => {
|
|
469
|
+
setIsFocussed(false);
|
|
470
|
+
setTokenIndex(null);
|
|
471
|
+
}}
|
|
464
472
|
placeholder={
|
|
465
473
|
isMobile && label && lastestFormValueToArray.length === 0
|
|
466
474
|
? (label as string)
|
|
@@ -34,7 +34,7 @@ export const Dropdown: React.FC<DropdownProps> = ({
|
|
|
34
34
|
px="8px"
|
|
35
35
|
py="4px"
|
|
36
36
|
width="100%"
|
|
37
|
-
color={colors.
|
|
37
|
+
color={colors.text.primary}
|
|
38
38
|
bg="inherit"
|
|
39
39
|
whiteSpace="nowrap"
|
|
40
40
|
>
|
|
@@ -53,7 +53,7 @@ export const Dropdown: React.FC<DropdownProps> = ({
|
|
|
53
53
|
px="8px"
|
|
54
54
|
py="4px"
|
|
55
55
|
width="100%"
|
|
56
|
-
color={colors.
|
|
56
|
+
color={colors.text.primary}
|
|
57
57
|
bg="inherit"
|
|
58
58
|
whiteSpace="nowrap"
|
|
59
59
|
>
|
|
@@ -67,7 +67,7 @@ export const Dropdown: React.FC<DropdownProps> = ({
|
|
|
67
67
|
options[idx + 1] &&
|
|
68
68
|
options[idx + 1].value !== 'section_header' && (
|
|
69
69
|
<Box
|
|
70
|
-
color={colors.
|
|
70
|
+
color={colors.text.secondary}
|
|
71
71
|
fontSize="13px"
|
|
72
72
|
width="100%"
|
|
73
73
|
fontWeight="bold"
|
|
@@ -98,16 +98,16 @@ export const Dropdown: React.FC<DropdownProps> = ({
|
|
|
98
98
|
width="100%"
|
|
99
99
|
color={
|
|
100
100
|
optionIndex === idx
|
|
101
|
-
? colors.
|
|
102
|
-
: colors.
|
|
101
|
+
? colors.text.onAccent
|
|
102
|
+
: colors.text.primary
|
|
103
103
|
}
|
|
104
104
|
_hover={{
|
|
105
|
-
color: colors.
|
|
106
|
-
bg: colors.
|
|
105
|
+
color: colors.text.onAccent,
|
|
106
|
+
bg: colors.action.solid,
|
|
107
107
|
borderRadius: '4px',
|
|
108
108
|
width: '100%',
|
|
109
109
|
}}
|
|
110
|
-
bg={optionIndex === idx ? colors.
|
|
110
|
+
bg={optionIndex === idx ? colors.action.solid : 'inherit'}
|
|
111
111
|
whiteSpace="nowrap"
|
|
112
112
|
id={option.value}
|
|
113
113
|
>
|
|
@@ -29,7 +29,7 @@ export const Label: React.FC<LabelProps> = ({
|
|
|
29
29
|
<FormLabel display="flex" ml="0">
|
|
30
30
|
{label}
|
|
31
31
|
{isRequired && (
|
|
32
|
-
<Box ml={1} color={colors.
|
|
32
|
+
<Box ml={1} color={colors.text.danger}>
|
|
33
33
|
*
|
|
34
34
|
</Box>
|
|
35
35
|
)}
|
|
@@ -37,7 +37,7 @@ export const Label: React.FC<LabelProps> = ({
|
|
|
37
37
|
<Popover trigger="hover" placement="top">
|
|
38
38
|
<PopoverTrigger>
|
|
39
39
|
<Box as="span">
|
|
40
|
-
<QuestionIcon boxSize="13px" ml={1} color={colors.
|
|
40
|
+
<QuestionIcon boxSize="13px" ml={1} color={colors.action.solid} />
|
|
41
41
|
</Box>
|
|
42
42
|
</PopoverTrigger>
|
|
43
43
|
<PopoverContent>
|
|
@@ -26,7 +26,7 @@ export const Link: React.FC<LinkProps> = ({ variant, text, onClick }) => {
|
|
|
26
26
|
return (
|
|
27
27
|
<Flex alignItems="flex-start" cursor="pointer" onClick={onClick}>
|
|
28
28
|
{getIcon}
|
|
29
|
-
<Text variant="description-large" pl="2px" color={colors.
|
|
29
|
+
<Text variant="description-large" pl="2px" color={colors.action.solid}>
|
|
30
30
|
{text}
|
|
31
31
|
</Text>
|
|
32
32
|
</Flex>
|
|
@@ -60,7 +60,7 @@ export const NavigationMenuItem: React.FC<NavigationMenuItemProps> = ({
|
|
|
60
60
|
px="4px"
|
|
61
61
|
height="26px"
|
|
62
62
|
width="204px"
|
|
63
|
-
color={colors.
|
|
63
|
+
color={colors.text.primary}
|
|
64
64
|
bg={isSelected ? colors.fill.light.quaternary : 'transparent'}
|
|
65
65
|
borderRadius="4px"
|
|
66
66
|
fontSize="13px"
|
|
@@ -65,24 +65,6 @@ export function SelectNative<T extends FieldValues = FieldValues>({
|
|
|
65
65
|
clearErrors,
|
|
66
66
|
...props
|
|
67
67
|
}: SelectNativeProps<T>): React.ReactElement {
|
|
68
|
-
// const [selectedOption, setSelectedOption] = useState(
|
|
69
|
-
// options ? options[0] ?? '' : ''
|
|
70
|
-
// );
|
|
71
|
-
|
|
72
|
-
const style = {
|
|
73
|
-
cursor: 'pointer',
|
|
74
|
-
color: 'var(--chakra-colors-blue-500)',
|
|
75
|
-
height: '48px',
|
|
76
|
-
fontSize: '17px',
|
|
77
|
-
lineHeight: '20px',
|
|
78
|
-
fontWeight: 400,
|
|
79
|
-
padding: '12px 16px 12px 0px',
|
|
80
|
-
borderRadius: 0,
|
|
81
|
-
border: '0.5px solid rgba(153, 153, 153, 0.1)',
|
|
82
|
-
borderLeft: 'none',
|
|
83
|
-
borderRight: 'none',
|
|
84
|
-
};
|
|
85
|
-
|
|
86
68
|
const handleOnSelectItem = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
|
87
69
|
const selectedValue = e.target.value;
|
|
88
70
|
const selectedOption = options?.find(
|
|
@@ -115,7 +97,6 @@ export function SelectNative<T extends FieldValues = FieldValues>({
|
|
|
115
97
|
disabled={disabled ?? false}
|
|
116
98
|
onChange={handleOnSelectItem}
|
|
117
99
|
defaultValue={defaultValue}
|
|
118
|
-
style={style}
|
|
119
100
|
>
|
|
120
101
|
{options &&
|
|
121
102
|
options.map(i => {
|
|
@@ -50,13 +50,13 @@ export const Toast: React.FC<ToastProps> = ({
|
|
|
50
50
|
borderRadius="8px"
|
|
51
51
|
>
|
|
52
52
|
<Box pr="8px">{Icon}</Box>
|
|
53
|
-
<Text pr="16px" fontSize="13px" color={colors.
|
|
53
|
+
<Text pr="16px" fontSize="13px" color={colors.text.onAccent}>
|
|
54
54
|
{message}
|
|
55
55
|
</Text>
|
|
56
56
|
{onClick && buttonText && (
|
|
57
57
|
<Flex ml="auto" justifyContent="flex-end">
|
|
58
58
|
<Button
|
|
59
|
-
color={colors.
|
|
59
|
+
color={colors.action.solid}
|
|
60
60
|
style={{
|
|
61
61
|
background: 'transparent',
|
|
62
62
|
border: 'transparent',
|
|
@@ -58,8 +58,8 @@ export const ToolbarBreadcrumbItem: React.FC<ToolbarBreadcrumbItemProps> = ({
|
|
|
58
58
|
<Box
|
|
59
59
|
color={
|
|
60
60
|
page === 'current'
|
|
61
|
-
? colors.
|
|
62
|
-
: colors.
|
|
61
|
+
? colors.text.primary
|
|
62
|
+
: colors.text.secondary
|
|
63
63
|
}
|
|
64
64
|
fontSize="13px"
|
|
65
65
|
letterSpacing="0.02em"
|
|
@@ -31,7 +31,7 @@ export const Dropdown: React.FC<DropdownProps> = ({
|
|
|
31
31
|
options[idx + 1] &&
|
|
32
32
|
options[idx + 1].value !== 'section_header' && (
|
|
33
33
|
<Box
|
|
34
|
-
color={colors.
|
|
34
|
+
color={colors.text.secondary}
|
|
35
35
|
fontSize="13px"
|
|
36
36
|
width="fit-content"
|
|
37
37
|
fontWeight="bold"
|
|
@@ -63,7 +63,7 @@ export const Dropdown: React.FC<DropdownProps> = ({
|
|
|
63
63
|
px="8px"
|
|
64
64
|
py="4px"
|
|
65
65
|
width="100%"
|
|
66
|
-
color={colors.
|
|
66
|
+
color={colors.text.primary}
|
|
67
67
|
whiteSpace="nowrap"
|
|
68
68
|
id={option.value}
|
|
69
69
|
>
|
|
@@ -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
|
|