@indico-data/design-system 1.0.50 → 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/Icon/Icon.stories.d.ts +2 -2
- package/lib/components/Icon/indicons.d.ts +1 -0
- package/lib/components/dropdowns/types.d.ts +0 -1
- package/lib/components/inputs/RadioButtons/RadioButtons.d.ts +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.esm.js +9 -8
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +9 -8
- package/lib/index.js.map +1 -1
- package/lib/tokens/colors.d.ts +1 -0
- package/lib/types.d.ts +1 -0
- package/package.json +27 -27
- package/src/components/Icon/indicons.tsx +7 -4
- 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/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/lib/types.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ declare const allIcons: {
|
|
|
46
46
|
readonly dashboard: import("react/jsx-runtime").JSX.Element;
|
|
47
47
|
readonly 'data-and-access': import("react/jsx-runtime").JSX.Element;
|
|
48
48
|
readonly database: import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
readonly document: import("react/jsx-runtime").JSX.Element;
|
|
49
50
|
readonly date: import("react/jsx-runtime").JSX.Element;
|
|
50
51
|
readonly draggable: import("react/jsx-runtime").JSX.Element;
|
|
51
52
|
readonly droplet: import("react/jsx-runtime").JSX.Element;
|
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",
|
|
@@ -254,6 +254,11 @@ const indicons = {
|
|
|
254
254
|
<path d="M448 73.143v45.714C448 159.143 347.667 192 224 192S0 159.143 0 118.857V73.143C0 32.857 100.333 0 224 0s224 32.857 224 73.143zM448 176v102.857C448 319.143 347.667 352 224 352S0 319.143 0 278.857V176c48.125 33.143 136.208 48.572 224 48.572S399.874 209.143 448 176zm0 160v102.857C448 479.143 347.667 512 224 512S0 479.143 0 438.857V336c48.125 33.143 136.208 48.572 224 48.572S399.874 369.143 448 336z" />
|
|
255
255
|
</svg>
|
|
256
256
|
),
|
|
257
|
+
document: (
|
|
258
|
+
<svg viewBox="0 0 24 24">
|
|
259
|
+
<path d="M15.6.3q-.45-.3-.9-.3H3.9c-.8 0-1.5.9-1.5 1.7v20.6c0 .8.7 1.7 1.5 1.7H20c.8 0 1.5-.9 1.5-1.7V6.8c0-.3-.1-.6-.3-.8zm4.1 21.8H4.3V1.9h10.1V6c0 .7.5 1.2 1.2 1.2h4.1z" />
|
|
260
|
+
</svg>
|
|
261
|
+
),
|
|
257
262
|
date: (
|
|
258
263
|
<svg viewBox="0 0 50 50" fill="currentColor">
|
|
259
264
|
<path d="m24 28.15q-0.75 0-1.25-0.525t-0.5-1.225q0-0.75 0.5-1.275t1.25-0.525 1.25 0.525 0.5 1.275q0 0.7-0.5 1.225t-1.25 0.525zm-8 0q-0.75 0-1.25-0.525t-0.5-1.225q0-0.75 0.5-1.275t1.25-0.525 1.25 0.525 0.5 1.275q0 0.7-0.5 1.225t-1.25 0.525zm16 0q-0.75 0-1.25-0.525t-0.5-1.225q0-0.75 0.5-1.275t1.25-0.525 1.25 0.525 0.5 1.275q0 0.7-0.5 1.225t-1.25 0.525zm-8 7.85q-0.75 0-1.25-0.525t-0.5-1.225q0-0.75 0.5-1.275t1.25-0.525 1.25 0.525 0.5 1.275q0 0.7-0.5 1.225t-1.25 0.525zm-8 0q-0.75 0-1.25-0.525t-0.5-1.225q0-0.75 0.5-1.275t1.25-0.525 1.25 0.525 0.5 1.275q0 0.7-0.5 1.225t-1.25 0.525zm16 0q-0.75 0-1.25-0.525t-0.5-1.225q0-0.75 0.5-1.275t1.25-0.525 1.25 0.525 0.5 1.275q0 0.7-0.5 1.225t-1.25 0.525zm-22.1 7q-1.2 0-2.05-0.85t-0.85-2.05v-28.95q0-1.15 0.85-2.025t2.05-0.875h3.7v-3.5h2.5v3.5h15.9v-3.5h2.45v3.5h3.65q1.2 0 2.05 0.875t0.85 2.025v28.95q0 1.2-0.85 2.05t-2.05 0.85zm0-2.25h28.2q0.25 0 0.45-0.2t0.2-0.45v-19.85h-29.5v19.85q0 0.25 0.2 0.45t0.45 0.2zm-0.65-22.75h29.5v-6.85q0-0.25-0.2-0.425t-0.45-0.175h-28.2q-0.25 0-0.45 0.175t-0.2 0.425zm0 0v-6.85q0-0.25 0-0.425t0-0.175 0 0.175 0 0.425v6.85z" />
|
|
@@ -738,10 +743,8 @@ const indicons = {
|
|
|
738
743
|
</svg>
|
|
739
744
|
),
|
|
740
745
|
text: (
|
|
741
|
-
<svg viewBox="0 0
|
|
742
|
-
<
|
|
743
|
-
<path d="M25.4,90.3V23.4H0V9.7h64.5v13.7H39.1v66.9H25.4z M70.6,90.3V49.2H54.8V35.5H100v13.7H84.3v41.2H70.6z" />
|
|
744
|
-
</g>
|
|
746
|
+
<svg viewBox="0 0 24 24">
|
|
747
|
+
<path d="M16 4V2H0v2h7v18h2V4zM24.2 9h-10v2h4v11h2V11h4z" />
|
|
745
748
|
</svg>
|
|
746
749
|
),
|
|
747
750
|
'thumbs-down': (
|
|
@@ -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 (
|