@indico-data/design-system 1.0.51 → 1.0.52
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/.eslintrc.js +5 -0
- package/lib/components/dropdowns/types.d.ts +0 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/inputs/RadioButtons/RadioButtons.d.ts +1 -0
- package/lib/index.d.ts +10 -1
- package/lib/index.esm.js +16 -10
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +16 -9
- package/lib/index.js.map +1 -1
- package/lib/tokens/colors.d.ts +1 -0
- package/package.json +27 -27
- package/src/components/inputs/RadioButtons/RadioButtons.tsx +4 -2
- package/src/components/inputs/RadioGroup/RadioGroup.tsx +4 -5
- package/src/tokens/colors.ts +1 -0
- package/lib/components/Navigation/Drawer/constants.d.ts +0 -3
package/lib/tokens/colors.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export declare const allColors: {
|
|
|
56
56
|
readonly flamingo: "#f861b6";
|
|
57
57
|
readonly flirt: "#910870";
|
|
58
58
|
readonly forestGreen: "#1f7f1f";
|
|
59
|
+
readonly frostedOver: "#DCEAFD";
|
|
59
60
|
readonly geraldine: "#fe9486";
|
|
60
61
|
readonly grannysmith: "#92e959";
|
|
61
62
|
readonly green: "#4caf50";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indico-data/design-system",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"svgo": "^3.2.0",
|
|
39
39
|
"tslib": "^2.6.2",
|
|
40
40
|
"uuid": "^9.0.1",
|
|
41
|
-
"webpack": "^5.
|
|
41
|
+
"webpack": "^5.90.1",
|
|
42
42
|
"webpack-cli": "^5.1.4",
|
|
43
43
|
"webpack-dev-server": "^4.15.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@babel/core": "^7.23.
|
|
46
|
+
"@babel/core": "^7.23.9",
|
|
47
47
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
48
|
-
"@babel/preset-env": "^7.23.
|
|
48
|
+
"@babel/preset-env": "^7.23.9",
|
|
49
49
|
"@babel/preset-react": "^7.23.3",
|
|
50
50
|
"@babel/preset-typescript": "^7.23.3",
|
|
51
51
|
"@react-aria/button": "^3.9.1",
|
|
@@ -55,32 +55,32 @@
|
|
|
55
55
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
56
56
|
"@rollup/plugin-terser": "^0.4.4",
|
|
57
57
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
58
|
-
"@storybook/addon-a11y": "^7.6.
|
|
59
|
-
"@storybook/addon-docs": "^7.6.
|
|
60
|
-
"@storybook/addon-essentials": "^7.6.
|
|
61
|
-
"@storybook/addon-interactions": "^7.6.
|
|
62
|
-
"@storybook/addon-links": "^7.6.
|
|
63
|
-
"@storybook/addon-onboarding": "^1.0.
|
|
58
|
+
"@storybook/addon-a11y": "^7.6.13",
|
|
59
|
+
"@storybook/addon-docs": "^7.6.13",
|
|
60
|
+
"@storybook/addon-essentials": "^7.6.13",
|
|
61
|
+
"@storybook/addon-interactions": "^7.6.13",
|
|
62
|
+
"@storybook/addon-links": "^7.6.13",
|
|
63
|
+
"@storybook/addon-onboarding": "^1.0.11",
|
|
64
64
|
"@storybook/addon-styling": "^1.3.7",
|
|
65
65
|
"@storybook/addon-styling-webpack": "^0.0.6",
|
|
66
|
-
"@storybook/addon-themes": "^7.6.
|
|
67
|
-
"@storybook/blocks": "^7.6.
|
|
68
|
-
"@storybook/react": "^7.6.
|
|
69
|
-
"@storybook/react-webpack5": "^7.6.
|
|
70
|
-
"@storybook/test": "^7.6.
|
|
66
|
+
"@storybook/addon-themes": "^7.6.13",
|
|
67
|
+
"@storybook/blocks": "^7.6.13",
|
|
68
|
+
"@storybook/react": "^7.6.13",
|
|
69
|
+
"@storybook/react-webpack5": "^7.6.13",
|
|
70
|
+
"@storybook/test": "^7.6.13",
|
|
71
71
|
"@storybook/test-runner": "^0.16.0",
|
|
72
72
|
"@testing-library/dom": "^9.3.4",
|
|
73
|
-
"@testing-library/jest-dom": "^6.2
|
|
74
|
-
"@testing-library/react": "^14.1
|
|
73
|
+
"@testing-library/jest-dom": "^6.4.2",
|
|
74
|
+
"@testing-library/react": "^14.2.1",
|
|
75
75
|
"@testing-library/user-event": "^14.5.2",
|
|
76
|
-
"@types/jest": "^29.5.
|
|
77
|
-
"@types/react": "^18.2.
|
|
76
|
+
"@types/jest": "^29.5.12",
|
|
77
|
+
"@types/react": "^18.2.55",
|
|
78
78
|
"@types/react-dom": "^18.2.18",
|
|
79
79
|
"@types/react-modal": "^3.16.3",
|
|
80
80
|
"@types/styled-components": "^5.1.34",
|
|
81
|
-
"@types/uuid": "^9.0.
|
|
82
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
83
|
-
"@typescript-eslint/parser": "^6.
|
|
81
|
+
"@types/uuid": "^9.0.8",
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
83
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
84
84
|
"babel-loader": "^9.1.3",
|
|
85
85
|
"babel-plugin-styled-components": "^2.1.4",
|
|
86
86
|
"babel-preset-react-app": "^10.0.1",
|
|
@@ -89,18 +89,18 @@
|
|
|
89
89
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
90
90
|
"jest": "^29.7.0",
|
|
91
91
|
"jest-environment-jsdom": "^29.7.0",
|
|
92
|
-
"lint-staged": "^15.2.
|
|
93
|
-
"postcss": "^8.4.
|
|
94
|
-
"prettier": "3.2.
|
|
92
|
+
"lint-staged": "^15.2.2",
|
|
93
|
+
"postcss": "^8.4.34",
|
|
94
|
+
"prettier": "3.2.5",
|
|
95
95
|
"react": "^18.2.0",
|
|
96
96
|
"react-dom": "^18.2.0",
|
|
97
|
-
"react-router-dom": "^6.
|
|
97
|
+
"react-router-dom": "^6.22.0",
|
|
98
98
|
"react-select": "^5.8.0",
|
|
99
99
|
"rollup": "^4.9.6",
|
|
100
100
|
"rollup-plugin-dts": "^6.1.0",
|
|
101
101
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
102
102
|
"rollup-plugin-postcss": "^4.0.2",
|
|
103
|
-
"storybook": "^7.6.
|
|
103
|
+
"storybook": "^7.6.13",
|
|
104
104
|
"styled-components": "^6.1.8",
|
|
105
105
|
"ts-loader": "^9.5.1",
|
|
106
106
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
|
@@ -15,6 +15,7 @@ type Props = {
|
|
|
15
15
|
labelColor: string;
|
|
16
16
|
hoverAndSelectedColor: string;
|
|
17
17
|
focusRingColor: string;
|
|
18
|
+
value: string;
|
|
18
19
|
} & RadioGroupProps &
|
|
19
20
|
PermafrostComponent;
|
|
20
21
|
|
|
@@ -25,16 +26,17 @@ type Props = {
|
|
|
25
26
|
* `label` prop, or include an `aria-label` or `aria-labelledby` attribute.
|
|
26
27
|
*/
|
|
27
28
|
export function RadioGroup({ children, ...props }: Props) {
|
|
28
|
-
const { color, hideFocusRing, labelColor, hoverAndSelectedColor, focusRingColor } = props;
|
|
29
|
+
const { value, color, hideFocusRing, labelColor, hoverAndSelectedColor, focusRingColor } = props;
|
|
29
30
|
return (
|
|
30
31
|
<StyledRadioGroup
|
|
31
32
|
{...props}
|
|
32
|
-
hideFocusRing
|
|
33
|
+
hideFocusRing={hideFocusRing}
|
|
33
34
|
data-cy={props['data-cy']}
|
|
34
35
|
color={color}
|
|
35
36
|
labelColor={labelColor}
|
|
36
37
|
hoverAndSelectedColor={hoverAndSelectedColor}
|
|
37
38
|
focusRingColor={focusRingColor}
|
|
39
|
+
value={value}
|
|
38
40
|
>
|
|
39
41
|
{children}
|
|
40
42
|
</StyledRadioGroup>
|
|
@@ -49,10 +49,10 @@ export function RadioGroup(props: RadioGroupProps) {
|
|
|
49
49
|
isReadOnly: isReadOnly || false,
|
|
50
50
|
lastFocusedValue,
|
|
51
51
|
name: name || '',
|
|
52
|
-
selectedValue: value,
|
|
53
|
-
setLastFocusedValue,
|
|
54
|
-
setSelectedValue: onChange,
|
|
55
52
|
defaultValue,
|
|
53
|
+
value,
|
|
54
|
+
setLastFocusedValue,
|
|
55
|
+
onChange: onChange ? (value: string) => onChange(value) : undefined,
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
const state = useRadioGroupState(radioGroupState);
|
|
@@ -100,8 +100,7 @@ export function Radio(
|
|
|
100
100
|
if (isVisuallySelected) {
|
|
101
101
|
isSelected = isVisuallySelected(state.selectedValue as string);
|
|
102
102
|
} else {
|
|
103
|
-
|
|
104
|
-
isSelected = state.selectedValue === props.value || state?.defaultValue === props.value;
|
|
103
|
+
isSelected = state.selectedValue === props.value;
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
return (
|
package/src/tokens/colors.ts
CHANGED