@grantbii/design-system 1.0.64 → 1.0.65
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grantbii/design-system",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.65",
|
|
4
4
|
"description": "Grantbii's Design System",
|
|
5
5
|
"homepage": "https://design.grantbii.com",
|
|
6
6
|
"repository": {
|
|
@@ -18,39 +18,39 @@
|
|
|
18
18
|
"build-storybook": "storybook build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@grantbii/ui-base": "1.0.
|
|
21
|
+
"@grantbii/ui-base": "1.0.17",
|
|
22
22
|
"@phosphor-icons/react": "^2.1.10",
|
|
23
23
|
"country-flag-icons": "^1.5.19",
|
|
24
|
-
"next": "^15.
|
|
25
|
-
"react": "^19.1.
|
|
26
|
-
"react-dom": "^19.1.
|
|
24
|
+
"next": "^15.5.0",
|
|
25
|
+
"react": "^19.1.1",
|
|
26
|
+
"react-dom": "^19.1.1",
|
|
27
27
|
"react-dropzone": "^14.3.8",
|
|
28
28
|
"react-spinners": "^0.17.0",
|
|
29
29
|
"styled-components": "^6.1.19"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@chromatic-com/storybook": "^4.1.
|
|
33
|
-
"@eslint/js": "^9.
|
|
34
|
-
"@next/eslint-plugin-next": "^15.
|
|
35
|
-
"@storybook/addon-a11y": "^9.1.
|
|
36
|
-
"@storybook/addon-docs": "^9.1.
|
|
37
|
-
"@storybook/addon-onboarding": "^9.1.
|
|
38
|
-
"@storybook/addon-vitest": "^9.1.
|
|
39
|
-
"@storybook/nextjs-vite": "^9.1.
|
|
32
|
+
"@chromatic-com/storybook": "^4.1.1",
|
|
33
|
+
"@eslint/js": "^9.34.0",
|
|
34
|
+
"@next/eslint-plugin-next": "^15.5.0",
|
|
35
|
+
"@storybook/addon-a11y": "^9.1.3",
|
|
36
|
+
"@storybook/addon-docs": "^9.1.3",
|
|
37
|
+
"@storybook/addon-onboarding": "^9.1.3",
|
|
38
|
+
"@storybook/addon-vitest": "^9.1.3",
|
|
39
|
+
"@storybook/nextjs-vite": "^9.1.3",
|
|
40
40
|
"@types/node": "^20",
|
|
41
|
-
"@types/react": "^19",
|
|
42
|
-
"@types/react-dom": "^19",
|
|
41
|
+
"@types/react": "^19.1.11",
|
|
42
|
+
"@types/react-dom": "^19.1.7",
|
|
43
43
|
"@vitest/browser": "^3.2.4",
|
|
44
44
|
"@vitest/coverage-v8": "^3.2.4",
|
|
45
|
-
"eslint": "^9.
|
|
46
|
-
"eslint-config-next": "15.
|
|
47
|
-
"eslint-plugin-storybook": "^9.1.
|
|
45
|
+
"eslint": "^9.34.0",
|
|
46
|
+
"eslint-config-next": "15.5.0",
|
|
47
|
+
"eslint-plugin-storybook": "^9.1.3",
|
|
48
48
|
"husky": "^9.1.7",
|
|
49
49
|
"lint-staged": "^16.1.5",
|
|
50
50
|
"playwright": "^1.54.2",
|
|
51
51
|
"prettier": "^3.6.2",
|
|
52
|
-
"storybook": "^9.1.
|
|
53
|
-
"typescript": "^5.
|
|
52
|
+
"storybook": "^9.1.3",
|
|
53
|
+
"typescript": "^5.9.2",
|
|
54
54
|
"vitest": "^3.2.4"
|
|
55
55
|
},
|
|
56
56
|
"lint-staged": {
|
|
@@ -3,39 +3,28 @@ import { RadioButtons } from "@/.";
|
|
|
3
3
|
import { Location } from "@grantbii/ui-base/grant/enums";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
const RadioButtonsExample = ({ controlled }) => {
|
|
6
|
-
const [
|
|
6
|
+
const [selectedLocation, setSelectedLocation] = useState("");
|
|
7
7
|
const controlledProps = {
|
|
8
|
-
options:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
label: Location.HONG_KONG,
|
|
17
|
-
value: Location.HONG_KONG,
|
|
18
|
-
checked: location === Location.HONG_KONG,
|
|
19
|
-
onClick: () => setLocation(Location.HONG_KONG),
|
|
20
|
-
},
|
|
21
|
-
],
|
|
8
|
+
options: Object.values(Location)
|
|
9
|
+
.filter((location) => location !== Location.UNKNOWN)
|
|
10
|
+
.map((location) => ({
|
|
11
|
+
label: location,
|
|
12
|
+
value: location,
|
|
13
|
+
checked: selectedLocation === location,
|
|
14
|
+
onClick: () => setSelectedLocation(location),
|
|
15
|
+
})),
|
|
22
16
|
};
|
|
23
17
|
return (_jsx(RadioButtons, Object.assign({}, (controlled ? controlledProps : uncontrolledProps))));
|
|
24
18
|
};
|
|
25
19
|
const uncontrolledProps = {
|
|
26
20
|
name: "location",
|
|
27
|
-
options:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
label: Location.HONG_KONG,
|
|
35
|
-
value: Location.HONG_KONG,
|
|
36
|
-
onChange: () => alert(`Selected ${Location.HONG_KONG}!`),
|
|
37
|
-
},
|
|
38
|
-
],
|
|
21
|
+
options: Object.values(Location)
|
|
22
|
+
.filter((location) => location !== Location.UNKNOWN)
|
|
23
|
+
.map((location) => ({
|
|
24
|
+
label: location,
|
|
25
|
+
value: location,
|
|
26
|
+
onChange: () => alert(`Selected ${location}!`),
|
|
27
|
+
})),
|
|
39
28
|
};
|
|
40
29
|
const meta = {
|
|
41
30
|
title: "Molecules/Radio Buttons",
|