@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.
Files changed (90) hide show
  1. package/README.md +3 -3
  2. package/dist/components/SimpleTable/SimpleTable.stories.d.ts +2 -2
  3. package/dist/components/SimpleTable/TableTypes.d.ts +1 -1
  4. package/dist/components/SimpleTable/utils/generateTableColumns.d.ts +1 -1
  5. package/dist/components/banner/Banner.stories.d.ts +2 -2
  6. package/dist/components/banner/index.d.ts +1 -0
  7. package/dist/components/breadcrumbs/Breadcrumbs.stories.d.ts +2 -2
  8. package/dist/components/button/Button.stories.d.ts +2 -2
  9. package/dist/components/button/google/GoogleButton.stories.d.ts +2 -2
  10. package/dist/components/button/index.d.ts +4 -5
  11. package/dist/components/button/microsoft/MicrosoftButton.stories.d.ts +2 -2
  12. package/dist/components/button/spinner/SpinnerButton.stories.d.ts +2 -2
  13. package/dist/components/card/Card.stories.d.ts +2 -2
  14. package/dist/components/card/index.d.ts +1 -0
  15. package/dist/components/form/Form.stories.d.ts +2 -2
  16. package/dist/components/form/section/FormSection.stories.d.ts +2 -2
  17. package/dist/components/input/Input.stories.d.ts +2 -2
  18. package/dist/components/input/InputTypes.d.ts +3 -1
  19. package/dist/components/input/components/token/Token.stories.d.ts +2 -2
  20. package/dist/components/layout/Layout.stories.d.ts +2 -2
  21. package/dist/components/link/Link.stories.d.ts +2 -2
  22. package/dist/components/loading/LoadingIndicator.stories.d.ts +2 -2
  23. package/dist/components/modal/Modal.stories.d.ts +2 -2
  24. package/dist/components/navigation/NavigationMenu.stories.d.ts +2 -2
  25. package/dist/components/tabs/TabsWrapper.stories.d.ts +2 -2
  26. package/dist/components/text/Text.stories.d.ts +2 -2
  27. package/dist/components/toast/Toast.stories.d.ts +2 -2
  28. package/dist/components/toolbar/Toolbar.stories.d.ts +2 -2
  29. package/dist/hooks/useToast.d.ts +1 -2
  30. package/dist/theme/components/checkbox.d.ts +1 -1
  31. package/dist/theme/components/code.d.ts +9 -3
  32. package/dist/theme/components/form-error.d.ts +1 -2
  33. package/dist/theme/components/link.d.ts +1 -1
  34. package/dist/theme/components/menu.d.ts +2 -1
  35. package/dist/theme/components/modal.d.ts +15 -11
  36. package/dist/theme/components/switch.d.ts +2 -1
  37. package/dist/theme/components/tabs.d.ts +4 -4
  38. package/dist/theme/foundations/colors.d.ts +225 -22
  39. package/dist/theme/foundations/typography.d.ts +10 -9
  40. package/dist/theme/styles.d.ts +0 -3
  41. package/dist/ui-core.cjs.development.js +296 -243
  42. package/dist/ui-core.cjs.development.js.map +1 -1
  43. package/dist/ui-core.cjs.production.min.js +1 -1
  44. package/dist/ui-core.cjs.production.min.js.map +1 -1
  45. package/dist/ui-core.esm.js +296 -244
  46. package/dist/ui-core.esm.js.map +1 -1
  47. package/package.json +4 -9
  48. package/src/components/SimpleTable/SimpleTable.tsx +1 -1
  49. package/src/components/SimpleTable/TableTypes.ts +1 -1
  50. package/src/components/SimpleTable/components/loading/index.tsx +2 -2
  51. package/src/components/SimpleTable/components/text/index.tsx +2 -2
  52. package/src/components/banner/index.tsx +18 -5
  53. package/src/components/breadcrumbs/components/icon/index.tsx +3 -3
  54. package/src/components/breadcrumbs/components/label/index.tsx +1 -1
  55. package/src/components/button/index.tsx +6 -6
  56. package/src/components/card/index.tsx +12 -10
  57. package/src/components/icons/chevron/down/index.tsx +1 -1
  58. package/src/components/icons/settings/index.tsx +1 -1
  59. package/src/components/input/InputTypes.ts +4 -1
  60. package/src/components/input/StackedMultiSelect/index.tsx +10 -3
  61. package/src/components/input/StackedNumberInput/StackedNumberInput.tsx +2 -2
  62. package/src/components/input/StackedPilledInput/index.tsx +11 -3
  63. package/src/components/input/StackedSelect/index.tsx +1 -5
  64. package/src/components/input/components/dropdown/index.tsx +8 -8
  65. package/src/components/input/components/label/index.tsx +2 -2
  66. package/src/components/input/components/token/index.tsx +1 -1
  67. package/src/components/input/index.tsx +1 -2
  68. package/src/components/link/index.tsx +1 -1
  69. package/src/components/loading/index.tsx +1 -1
  70. package/src/components/navigation/components/header/index.tsx +1 -1
  71. package/src/components/navigation/components/items/index.tsx +1 -1
  72. package/src/components/select/index.tsx +0 -19
  73. package/src/components/toast/index.tsx +2 -2
  74. package/src/components/toolbar/components/breadcrumbs/item/index.tsx +2 -2
  75. package/src/components/toolbar/components/dropdown/index.tsx +2 -2
  76. package/src/theme/components/alert.ts +4 -4
  77. package/src/theme/components/button.ts +50 -50
  78. package/src/theme/components/form-error.ts +3 -5
  79. package/src/theme/components/form-label.ts +1 -1
  80. package/src/theme/components/form.ts +2 -2
  81. package/src/theme/components/input.ts +3 -3
  82. package/src/theme/components/link.ts +4 -13
  83. package/src/theme/components/menu.ts +1 -1
  84. package/src/theme/components/modal.ts +17 -11
  85. package/src/theme/components/table.ts +2 -2
  86. package/src/theme/components/tabs.ts +6 -6
  87. package/src/theme/foundations/colors.ts +89 -37
  88. package/src/theme/foundations/shadows.ts +3 -3
  89. package/src/theme/foundations/typography.ts +3 -2
  90. package/src/theme/styles.ts +0 -3
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.27.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.label.primary.dark }}>
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]]: string | 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.fill.action} />
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.fill.action}
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.label.primary.light}>{primaryText}</Text>
20
- <Text color={colors.label.secondary.light}>{secondaryText}</Text>
19
+ <Text color={colors.text.primary}>{primaryText}</Text>
20
+ <Text color={colors.text.secondary}>{secondaryText}</Text>
21
21
  </Box>
22
22
  );
23
23
  };
@@ -14,6 +14,7 @@ export interface BannerProps {
14
14
  buttonText?: string;
15
15
  onClick?: () => void;
16
16
  type?: 'condensed' | 'expanded';
17
+ centered?: boolean;
17
18
  }
18
19
 
19
20
  /**
@@ -25,6 +26,7 @@ export const Banner: React.FC<BannerProps> = ({
25
26
  buttonText,
26
27
  onClick,
27
28
  type = 'expanded',
29
+ centered = false,
28
30
  }) => {
29
31
  const Icon = useMemo(() => {
30
32
  switch (variant) {
@@ -42,15 +44,26 @@ export const Banner: React.FC<BannerProps> = ({
42
44
  }, [variant]);
43
45
 
44
46
  return (
45
- <Alert variant={variant} borderRadius="4px">
47
+ <Alert
48
+ variant={variant}
49
+ borderRadius="4px"
50
+ justifyContent={centered ? 'center' : undefined}
51
+ >
46
52
  <AlertDescription>
47
53
  <Flex
48
- flexDirection={type === 'condensed' ? 'row' : 'column'}
49
- alignItems={type === 'condensed' ? 'center' : ''}
54
+ flexDirection={centered || type === 'condensed' ? 'row' : 'column'}
55
+ alignItems={centered || type === 'condensed' ? 'center' : ''}
56
+ justifyContent={centered ? 'center' : undefined}
50
57
  minHeight="26px"
51
58
  >
52
- <Box pr="8px">{Icon}</Box>
53
- <Box flexGrow="1" pt={type === 'condensed' ? 0 : '8px'}>
59
+ <Box pr="8px" pt={!centered && type !== 'condensed' ? '8px' : 0}>
60
+ {Icon}
61
+ </Box>
62
+ <Box
63
+ flexGrow={centered ? undefined : '1'}
64
+ pt={!centered && type !== 'condensed' ? '8px' : 0}
65
+ textAlign={centered ? 'center' : 'left'}
66
+ >
54
67
  {message}
55
68
  </Box>
56
69
  {onClick && buttonText && (
@@ -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.label.primary.dark };
17
+ return { bg: '#0082FF', color: colors.text.onAccent };
18
18
  case 'complete':
19
- return { bg: '#7474800D', color: colors.label.primary.light };
19
+ return { bg: '#7474800D', color: colors.text.primary };
20
20
  case 'inactive':
21
- return { bg: '#7474800D', color: colors.label.primary.light };
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.label.primary.light} fontSize="13px">
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
- text: string;
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="8px"
29
- px="8px"
30
+ py={2}
31
+ px={2}
30
32
  height={height}
31
33
  overflowY="auto"
32
- width="206px"
33
- _notLast={{ marginBottom: '8px' }}
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="8px"
44
+ mb={2}
43
45
  >
44
46
  <Flex alignItems="center">
45
- <Box mr="4px">{leftIcon}</Box>
47
+ <Box mr={1}>{leftIcon}</Box>
46
48
  <Text
47
- color={colors.label.primary.light}
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: '8px' }}
65
- color={colors.label.primary.light}
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="8px">{child}</Box>;
75
+ return <Box mt={2}>{child}</Box>;
74
76
  }
75
77
  })}
76
78
  </Box>
@@ -14,7 +14,7 @@ export const ChevronDown: React.FC<ChevronDownProps> = ({ boxSize }) => {
14
14
  <ChevronDownIcon
15
15
  width={boxSize}
16
16
  height={boxSize}
17
- fill={colors.fill.action}
17
+ fill={colors.action.solid}
18
18
  />
19
19
  );
20
20
  };
@@ -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.fill.action} />
14
+ <SettingsIcon width={boxSize} height={boxSize} fill={colors.action.solid} />
15
15
  );
16
16
  };
@@ -22,9 +22,12 @@ export type InputType =
22
22
  export type FieldOption = {
23
23
  label: string;
24
24
  value: string | 'section_header';
25
- sortValue: number;
25
+ sortValue?: number;
26
26
  };
27
27
 
28
+ /** @deprecated use FieldOption[] directly */
29
+ export type FieldOptions = FieldOption[];
30
+
28
31
  export interface ValidationProps {
29
32
  isRequired: boolean;
30
33
  isInvalid?: boolean;
@@ -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[]>([]);
@@ -159,7 +160,9 @@ const StackedMultiSelect = React.forwardRef<
159
160
  });
160
161
 
161
162
  setLocalOptions(prevLocalOptions =>
162
- [...prevLocalOptions, option].sort((a, b) => a.sortValue - b.sortValue)
163
+ [...prevLocalOptions, option].sort(
164
+ (a, b) => (a.sortValue ?? 0) - (b.sortValue ?? 0)
165
+ )
163
166
  );
164
167
 
165
168
  setLocalValues(prevLocalValues =>
@@ -258,6 +261,10 @@ const StackedMultiSelect = React.forwardRef<
258
261
  );
259
262
  }, [localOptions, searchValue]);
260
263
 
264
+ useEffect(() => {
265
+ if (isFocussed) searchRef.current?.focus();
266
+ }, [isFocussed]);
267
+
261
268
  const handleInput = (e: React.ChangeEvent<HTMLInputElement>) => {
262
269
  const initialOptionIndex =
263
270
  filteredOptions[0]?.value === 'section_header' ? 1 : 0;
@@ -323,7 +330,7 @@ const StackedMultiSelect = React.forwardRef<
323
330
  </Box>
324
331
  ))
325
332
  ) : (
326
- <Text color={colors.label.secondary.light} fontSize="13px">
333
+ <Text color={colors.text.secondary} fontSize="13px">
327
334
  {placeholder}
328
335
  </Text>
329
336
  )}
@@ -353,7 +360,7 @@ const StackedMultiSelect = React.forwardRef<
353
360
  loading={loadingOptions}
354
361
  >
355
362
  <Input
356
- autoFocus
363
+ ref={searchRef}
357
364
  value={searchValue}
358
365
  onChange={handleInput}
359
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={(_: string, valueAsNumber: number) =>
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
- : String(valueAsNumber),
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.label.secondary.light}
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.label.primary
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.label.primary
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)
@@ -80,11 +80,7 @@ const StackedSelect = React.forwardRef<HTMLInputElement, StackedSelectProps>(
80
80
  setSearchValue('');
81
81
  });
82
82
 
83
- const handleOnSelectItem = (option: {
84
- label: string;
85
- value: string;
86
- sortValue: number;
87
- }) => {
83
+ const handleOnSelectItem = (option: FieldOption) => {
88
84
  if (handleOnChange) {
89
85
  handleOnChange(option.value);
90
86
  }
@@ -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.label.primary.light}
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.label.primary.light}
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.label.secondary.light}
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.label.primary.dark
102
- : colors.label.primary.light
101
+ ? colors.text.onAccent
102
+ : colors.text.primary
103
103
  }
104
104
  _hover={{
105
- color: colors.label.primary.dark,
106
- bg: colors.fill.action,
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.fill.action : 'inherit'}
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.label.error}>
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.fill.action} />
40
+ <QuestionIcon boxSize="13px" ml={1} color={colors.action.solid} />
41
41
  </Box>
42
42
  </PopoverTrigger>
43
43
  <PopoverContent>
@@ -47,7 +47,7 @@ const Token: React.FC<TokenProps> = ({
47
47
  <Text
48
48
  whiteSpace="nowrap"
49
49
  wordBreak="break-word"
50
- color={colors.label.primary.light}
50
+ color={colors.text.primary}
51
51
  fontSize={isMobile ? '17px' : '13px'}
52
52
  lineHeight="1.5"
53
53
  pr="2px"
@@ -319,8 +319,7 @@ export function Input<T extends FieldValues>({
319
319
  (!nonLabeledInputs.includes(inputType) &&
320
320
  variant !== 'mobile' &&
321
321
  label) ||
322
- helperText ||
323
- isInvalid
322
+ helperText
324
323
  ? 5
325
324
  : 0
326
325
  }
@@ -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.fill.action}>
29
+ <Text variant="description-large" pl="2px" color={colors.action.solid}>
30
30
  {text}
31
31
  </Text>
32
32
  </Flex>
@@ -29,7 +29,7 @@ export const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({
29
29
  >
30
30
  <Spinner
31
31
  size={size}
32
- color={colors.fill.action}
32
+ color={colors.action.solid}
33
33
  flex="none"
34
34
  thickness={thickness}
35
35
  speed={speed}
@@ -19,7 +19,7 @@ export const NavigationMenuHeader: React.FC<NavigationMenuHeaderProps> = ({
19
19
  height="26px"
20
20
  width="204px"
21
21
  fontSize="12px"
22
- color={colors.label.secondary.light}
22
+ color={colors.text.secondary}
23
23
  >
24
24
  {label}
25
25
  </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.label.primary}
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.label.primary.dark}>
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.fill.action}
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.label.primary.light
62
- : colors.label.secondary.light
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.label.secondary.light}
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.label.primary.light}
66
+ color={colors.text.primary}
67
67
  whiteSpace="nowrap"
68
68
  id={option.value}
69
69
  >