@hyphen/hyphen-components 5.7.0 → 5.7.2
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/dist/css/index.css +2 -2
- package/dist/css/utilities.css +13 -1
- package/dist/css/variables.css +6 -2
- package/dist/hyphen-components.cjs.development.js +2 -1
- package/dist/hyphen-components.cjs.development.js.map +1 -1
- package/dist/hyphen-components.cjs.production.min.js +1 -1
- package/dist/hyphen-components.cjs.production.min.js.map +1 -1
- package/dist/hyphen-components.esm.js +2 -1
- package/dist/hyphen-components.esm.js.map +1 -1
- package/dist/lib/tokens.d.ts +2 -2
- package/package.json +3 -3
- package/src/components/Alert/Alert.module.scss +1 -1
- package/src/components/Alert/Alert.tsx +1 -0
- package/src/components/Button/Button.stories.tsx +5 -3
- package/src/components/CheckboxInput/CheckboxInput.stories.tsx +5 -5
- package/src/components/CheckboxInput/components/Checkbox.module.scss +6 -3
package/dist/lib/tokens.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export declare const BREAKPOINTS: Breakpoint[];
|
|
|
7
7
|
export declare const BASE_COLOR_OPTIONS: ("black" | "white" | "magenta" | "primary-50" | "primary-100" | "primary-200" | "primary-300" | "primary-400" | "primary-500" | "primary-600" | "primary-700" | "primary-800" | "primary-900" | "green-50" | "green-100" | "green-200" | "green-300" | "green-400" | "green-500" | "green-600" | "green-700" | "green-800" | "green-900" | "blue-50" | "blue-100" | "blue-200" | "blue-300" | "blue-400" | "blue-500" | "blue-600" | "blue-700" | "blue-800" | "blue-900" | "purple-50" | "purple-100" | "purple-200" | "purple-300" | "purple-400" | "purple-500" | "purple-600" | "purple-700" | "purple-800" | "purple-900" | "yellow-50" | "yellow-100" | "yellow-200" | "yellow-300" | "yellow-400" | "yellow-500" | "yellow-600" | "yellow-700" | "yellow-800" | "yellow-900" | "red-50" | "red-100" | "red-200" | "red-300" | "red-400" | "red-500" | "red-600" | "red-700" | "red-800" | "red-900" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-400" | "grey-500" | "grey-600" | "grey-700" | "grey-800" | "grey-900")[];
|
|
8
8
|
export declare const BASE_COLOR_NAMES: ("black" | "white" | "magenta" | "primary" | "green" | "blue" | "purple" | "yellow" | "red" | "grey")[];
|
|
9
9
|
export declare const FONT_COLOR_OPTIONS: ("info" | "base" | "black" | "white" | "grey" | "secondary" | "tertiary" | "inverse" | "disabled" | "success" | "success-disabled" | "warn" | "warn-disabled" | "danger" | "danger-input" | "danger-disabled" | "button-primary" | "button-primary-hover" | "button-primary-active" | "button-secondary" | "button-secondary-hover" | "button-secondary-active" | "button-tertiary" | "button-tertiary-hover" | "button-tertiary-active" | "button-danger" | "button-danger-hover" | "button-danger-active" | "toast" | "toast-error" | "tooltip" | "placeholder" | "brand-yellow" | "brand-orange" | "brand-magenta" | "brand-dark-grey" | "brand-cyan" | "brand-pink" | "brand-light-purple" | "brand-medium-purple" | "brand-dark-purple")[];
|
|
10
|
-
export declare const BACKGROUND_COLOR_OPTIONS: ("info" | "black" | "white" | "primary" | "secondary" | "tertiary" | "inverse" | "disabled" | "success" | "danger" | "button-primary" | "button-primary-hover" | "button-primary-active" | "button-secondary" | "button-secondary-hover" | "button-secondary-active" | "button-tertiary" | "button-tertiary-hover" | "button-tertiary-active" | "button-danger" | "button-danger-hover" | "button-danger-active" | "toast" | "toast-error" | "tooltip" | "brand-yellow" | "brand-orange" | "brand-magenta" | "brand-dark-grey" | "brand-cyan" | "brand-pink" | "brand-light-purple" | "brand-medium-purple" | "brand-dark-purple" | "error" | "warning" | "transparent" | "toggle-group-item-hover" | "toggle-group-item-active" | "scrollbar-thumb" | "scrollbar-track" | "modal" | "slider" | "brand-gradient" | "brand-gradient-reverse" | "brand-gradient-purple" | "brand-gradient-purple-reverse" | "brand-gradient-cyan" | "brand-gradient-cyan-reverse" | "chart-1" | "chart-2" | "chart-3")[];
|
|
11
|
-
export declare const BORDER_COLOR_OPTIONS: ("info" | "black" | "white" | "inverse" | "danger" | "button-primary" | "button-primary-hover" | "button-primary-active" | "button-secondary" | "button-secondary-hover" | "button-secondary-active" | "button-tertiary" | "button-tertiary-hover" | "button-tertiary-active" | "toast" | "toast-error" | "brand-yellow" | "brand-orange" | "brand-magenta" | "brand-dark-grey" | "brand-cyan" | "brand-pink" | "brand-light-purple" | "brand-medium-purple" | "brand-dark-purple" | "warning" | "transparent" | "default" | "subtle" | "hover" | "active" | "sidebar-rail-hover")[];
|
|
10
|
+
export declare const BACKGROUND_COLOR_OPTIONS: ("info" | "black" | "white" | "primary" | "secondary" | "tertiary" | "inverse" | "disabled" | "success" | "danger" | "button-primary" | "button-primary-hover" | "button-primary-active" | "button-secondary" | "button-secondary-hover" | "button-secondary-active" | "button-tertiary" | "button-tertiary-hover" | "button-tertiary-active" | "button-danger" | "button-danger-hover" | "button-danger-active" | "toast" | "toast-error" | "tooltip" | "brand-yellow" | "brand-orange" | "brand-magenta" | "brand-dark-grey" | "brand-cyan" | "brand-pink" | "brand-light-purple" | "brand-medium-purple" | "brand-dark-purple" | "error" | "warning" | "transparent" | "toggle-group-item-hover" | "toggle-group-item-active" | "scrollbar-thumb" | "scrollbar-track" | "modal" | "slider" | "checkbox-checked" | "brand-gradient" | "brand-gradient-reverse" | "brand-gradient-purple" | "brand-gradient-purple-reverse" | "brand-gradient-cyan" | "brand-gradient-cyan-reverse" | "chart-1" | "chart-2" | "chart-3")[];
|
|
11
|
+
export declare const BORDER_COLOR_OPTIONS: ("info" | "black" | "white" | "inverse" | "danger" | "button-primary" | "button-primary-hover" | "button-primary-active" | "button-secondary" | "button-secondary-hover" | "button-secondary-active" | "button-tertiary" | "button-tertiary-hover" | "button-tertiary-active" | "toast" | "toast-error" | "brand-yellow" | "brand-orange" | "brand-magenta" | "brand-dark-grey" | "brand-cyan" | "brand-pink" | "brand-light-purple" | "brand-medium-purple" | "brand-dark-purple" | "warning" | "transparent" | "default" | "subtle" | "hover" | "active" | "sidebar-rail-hover" | "checkbox")[];
|
|
12
12
|
export declare const FONT_SIZE_OPTIONS: ("xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "base" | "2xs" | "4xl" | "5xl" | "6xl" | "7xl" | "form-label" | "form-help-text")[];
|
|
13
13
|
export declare const FONT_FAMILY_OPTIONS: ("monospace" | "body" | "brand")[];
|
|
14
14
|
export declare const FONT_WEIGHT_OPTIONS: ("form-label" | "form-help-text" | "light" | "normal" | "medium" | "semibold" | "bold")[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyphen/hyphen-components",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "@hyphen"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"react": ">=16"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
|
-
"node": ">=
|
|
51
|
+
"node": ">=20"
|
|
52
52
|
},
|
|
53
53
|
"size-limit": [
|
|
54
54
|
{
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@emotion/react": "^11.14.0",
|
|
65
|
-
"@hyphen/hyphen-design-tokens": "^4.39.
|
|
65
|
+
"@hyphen/hyphen-design-tokens": "^4.39.1",
|
|
66
66
|
"@popperjs/core": "^2.11.8",
|
|
67
67
|
"@radix-ui/react-collapsible": "^1.1.11",
|
|
68
68
|
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
@@ -94,11 +94,13 @@ export const IconButton = () => (
|
|
|
94
94
|
|
|
95
95
|
export const Loading = () => (
|
|
96
96
|
<Box direction="row" gap="md">
|
|
97
|
-
<Button isLoading
|
|
98
|
-
|
|
97
|
+
<Button isLoading aria-label="primary loading">
|
|
98
|
+
Primary Loading
|
|
99
|
+
</Button>
|
|
100
|
+
<Button variant="secondary" isLoading aria-label="secondary loading">
|
|
99
101
|
Secondary Loading
|
|
100
102
|
</Button>
|
|
101
|
-
<Button variant="tertiary" isLoading>
|
|
103
|
+
<Button variant="tertiary" isLoading aria-label="tertiary loading">
|
|
102
104
|
Tertiary Loading
|
|
103
105
|
</Button>
|
|
104
106
|
</Box>
|
|
@@ -40,13 +40,13 @@ export const States = () => (
|
|
|
40
40
|
isChecked={false}
|
|
41
41
|
/>
|
|
42
42
|
<CheckboxInput
|
|
43
|
-
id="
|
|
43
|
+
id="statesChecked"
|
|
44
44
|
label="Checked"
|
|
45
45
|
onChange={() => {}}
|
|
46
46
|
isChecked={true}
|
|
47
47
|
/>
|
|
48
48
|
<CheckboxInput
|
|
49
|
-
id="
|
|
49
|
+
id="statesIndeterminate"
|
|
50
50
|
label="Indeterminate"
|
|
51
51
|
onChange={() => {}}
|
|
52
52
|
isChecked={true}
|
|
@@ -69,7 +69,7 @@ export const IndeterminateCheckboxes = () => {
|
|
|
69
69
|
</Box>
|
|
70
70
|
<Box gap="sm">
|
|
71
71
|
<CheckboxInput
|
|
72
|
-
id="
|
|
72
|
+
id="intdeterminateParent"
|
|
73
73
|
label="Parent"
|
|
74
74
|
onChange={handleParentChange}
|
|
75
75
|
isChecked={exampleOneChildOne || exampleOneChildTwo}
|
|
@@ -77,13 +77,13 @@ export const IndeterminateCheckboxes = () => {
|
|
|
77
77
|
/>
|
|
78
78
|
<Box padding="0 0 0 sm" gap="sm">
|
|
79
79
|
<CheckboxInput
|
|
80
|
-
id="
|
|
80
|
+
id="indeterminateChildOne"
|
|
81
81
|
label="Child One"
|
|
82
82
|
onChange={(event) => setExampleOneChildOne(event.target.checked)}
|
|
83
83
|
isChecked={exampleOneChildOne}
|
|
84
84
|
/>
|
|
85
85
|
<CheckboxInput
|
|
86
|
-
id="
|
|
86
|
+
id="indeterminateChildTwo"
|
|
87
87
|
label="Child Two"
|
|
88
88
|
onChange={(event) => setExampleOneChildTwo(event.target.checked)}
|
|
89
89
|
isChecked={exampleOneChildTwo}
|
|
@@ -67,15 +67,18 @@ $lg-dimension: 36px;
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
input + div {
|
|
70
|
-
background: var(
|
|
71
|
-
|
|
70
|
+
background: var(
|
|
71
|
+
--form-control-background-color,
|
|
72
|
+
var(--color-background-primary)
|
|
73
|
+
);
|
|
74
|
+
color: var(--form-control-checkbox-color, var(--color-border-checkbox));
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
input:checked + div,
|
|
75
78
|
input:indeterminate + div {
|
|
76
79
|
color: var(
|
|
77
80
|
--form-control-checkbox-color-checked,
|
|
78
|
-
var(--color-
|
|
81
|
+
var(--color-background-checkbox-checked)
|
|
79
82
|
);
|
|
80
83
|
}
|
|
81
84
|
|