braid-design-system 34.7.0 → 34.8.0-docs-uplift-20260916013555
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/CHANGELOG.md +26 -0
- package/LICENSE +21 -0
- package/dist/lib/components/Accordion/Accordion.cjs +1 -2
- package/dist/lib/components/Accordion/Accordion.d.cts +2 -1
- package/dist/lib/components/Accordion/Accordion.d.mts +2 -1
- package/dist/lib/components/Accordion/Accordion.mjs +2 -2
- package/dist/lib/components/Accordion/Accordion.playroom.cjs +7 -2
- package/dist/lib/components/Accordion/Accordion.playroom.mjs +6 -1
- package/dist/lib/themes/docs/tokens.cjs +3 -3
- package/dist/lib/themes/docs/tokens.mjs +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 34.8.0-docs-uplift-20260916013555
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Accordion:** Deprecate `space` prop and update spacing defaults ([#2120](https://github.com/seek-oss/braid-design-system/pull/2120))
|
|
8
|
+
|
|
9
|
+
The `space` prop is now deprecated and will be removed in a future release. Spacing between items is now automatically derived from the `size` prop.
|
|
10
|
+
|
|
11
|
+
The following default spacing value has been updated:
|
|
12
|
+
|
|
13
|
+
| `dividers` | `size` | Previous default | New default |
|
|
14
|
+
| ---------- | ---------- | ---------------- | ----------- |
|
|
15
|
+
| `false` | `standard` | `large` | `medium` |
|
|
16
|
+
|
|
17
|
+
**MIGRATION GUIDE:**
|
|
18
|
+
|
|
19
|
+
If the updated default causes an undesired visual change, you can preserve the previous spacing by explicitly setting the `space` prop while migrating:
|
|
20
|
+
|
|
21
|
+
```diff
|
|
22
|
+
<Accordion
|
|
23
|
+
+ space="large"
|
|
24
|
+
dividers={false}
|
|
25
|
+
size="standard"
|
|
26
|
+
>
|
|
27
|
+
```
|
|
28
|
+
|
|
3
29
|
## 34.7.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 SEEK
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -26,7 +26,7 @@ const defaultSpaceForSize = {
|
|
|
26
26
|
undivided: {
|
|
27
27
|
xsmall: "medium",
|
|
28
28
|
small: "medium",
|
|
29
|
-
standard: "
|
|
29
|
+
standard: "medium",
|
|
30
30
|
large: "large"
|
|
31
31
|
}
|
|
32
32
|
};
|
|
@@ -68,4 +68,3 @@ const Accordion = ({ children, size = defaultSize, tone, weight, space: spacePro
|
|
|
68
68
|
//#endregion
|
|
69
69
|
exports.Accordion = Accordion;
|
|
70
70
|
exports.defaultSize = defaultSize;
|
|
71
|
-
exports.validSpaceValues = validSpaceValues;
|
|
@@ -11,9 +11,10 @@ interface AccordionProps {
|
|
|
11
11
|
size?: AccordionContextValue['size'];
|
|
12
12
|
tone?: AccordionContextValue['tone'];
|
|
13
13
|
weight?: AccordionContextValue['weight'];
|
|
14
|
+
/** @deprecated The spacing is now derived from the `size` prop and will be removed in a future release. */
|
|
14
15
|
space?: RequiredResponsiveValue<(typeof validSpaceValues)[number]>;
|
|
15
16
|
data?: DataAttributeMap;
|
|
16
17
|
}
|
|
17
18
|
declare const Accordion: FC<AccordionProps>;
|
|
18
19
|
//#endregion
|
|
19
|
-
export { Accordion, AccordionProps
|
|
20
|
+
export { Accordion, AccordionProps };
|
|
@@ -11,9 +11,10 @@ interface AccordionProps {
|
|
|
11
11
|
size?: AccordionContextValue['size'];
|
|
12
12
|
tone?: AccordionContextValue['tone'];
|
|
13
13
|
weight?: AccordionContextValue['weight'];
|
|
14
|
+
/** @deprecated The spacing is now derived from the `size` prop and will be removed in a future release. */
|
|
14
15
|
space?: RequiredResponsiveValue<(typeof validSpaceValues)[number]>;
|
|
15
16
|
data?: DataAttributeMap;
|
|
16
17
|
}
|
|
17
18
|
declare const Accordion: FC<AccordionProps>;
|
|
18
19
|
//#endregion
|
|
19
|
-
export { Accordion, AccordionProps
|
|
20
|
+
export { Accordion, AccordionProps };
|
|
@@ -24,7 +24,7 @@ const defaultSpaceForSize = {
|
|
|
24
24
|
undivided: {
|
|
25
25
|
xsmall: "medium",
|
|
26
26
|
small: "medium",
|
|
27
|
-
standard: "
|
|
27
|
+
standard: "medium",
|
|
28
28
|
large: "large"
|
|
29
29
|
}
|
|
30
30
|
};
|
|
@@ -64,4 +64,4 @@ const Accordion = ({ children, size = defaultSize, tone, weight, space: spacePro
|
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
66
|
//#endregion
|
|
67
|
-
export { Accordion, defaultSize
|
|
67
|
+
export { Accordion, defaultSize };
|
|
@@ -3,11 +3,16 @@ const require_Accordion = require("./Accordion.cjs");
|
|
|
3
3
|
const require_wireframeTheme_css = require("../../themes/wireframe/wireframeTheme.css.cjs");
|
|
4
4
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
5
|
//#region src/lib/components/Accordion/Accordion.playroom.tsx
|
|
6
|
+
const validSpaceValues = [
|
|
7
|
+
"medium",
|
|
8
|
+
"large",
|
|
9
|
+
"xlarge"
|
|
10
|
+
];
|
|
6
11
|
const spaceScale = ["none", ...Object.keys(require_wireframeTheme_css.default.space.space)];
|
|
7
12
|
const filterSpace = (space) => {
|
|
8
13
|
return require_sprinkles_css.mapResponsiveValue(space, (value) => {
|
|
9
|
-
if (spaceScale.includes(value) && !
|
|
10
|
-
return
|
|
14
|
+
if (spaceScale.includes(value) && !validSpaceValues.includes(value)) throw new Error(`To ensure adequate space for touch targets, 'space' prop values must be one of the following: ${validSpaceValues.map((x) => `"${x}"`).join(", ")}`);
|
|
15
|
+
return validSpaceValues.includes(value) ? value : "medium";
|
|
11
16
|
});
|
|
12
17
|
};
|
|
13
18
|
const Accordion = ({ space, size, tone, weight, ...restProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Accordion.Accordion, {
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { mapResponsiveValue } from "../../css/atoms/sprinkles.css.mjs";
|
|
2
|
-
import { Accordion as Accordion$1
|
|
2
|
+
import { Accordion as Accordion$1 } from "./Accordion.mjs";
|
|
3
3
|
import wireframeTheme_css_default from "../../themes/wireframe/wireframeTheme.css.mjs";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/lib/components/Accordion/Accordion.playroom.tsx
|
|
6
|
+
const validSpaceValues = [
|
|
7
|
+
"medium",
|
|
8
|
+
"large",
|
|
9
|
+
"xlarge"
|
|
10
|
+
];
|
|
6
11
|
const spaceScale = ["none", ...Object.keys(wireframeTheme_css_default.space.space)];
|
|
7
12
|
const filterSpace = (space) => {
|
|
8
13
|
return mapResponsiveValue(space, (value) => {
|
|
@@ -234,9 +234,9 @@ const tokens = {
|
|
|
234
234
|
neutralActive: (0, polished.darken)(.05, require_palette.palette.grey["800"]),
|
|
235
235
|
neutralHover: (0, polished.lighten)(.05, require_palette.palette.grey["800"]),
|
|
236
236
|
neutralLight: require_palette.palette.grey["100"],
|
|
237
|
-
neutralSoft: require_palette.palette.grey["
|
|
238
|
-
neutralSoftActive: (0, polished.darken)(.05, require_palette.palette.grey["
|
|
239
|
-
neutralSoftHover: (0, polished.darken)(.025, require_palette.palette.grey["
|
|
237
|
+
neutralSoft: require_palette.palette.grey["75"],
|
|
238
|
+
neutralSoftActive: (0, polished.darken)(.05, require_palette.palette.grey["75"]),
|
|
239
|
+
neutralSoftHover: (0, polished.darken)(.025, require_palette.palette.grey["75"]),
|
|
240
240
|
positive: require_palette.palette.mint["700"],
|
|
241
241
|
positiveLight: require_palette.palette.mint["100"],
|
|
242
242
|
promote: require_palette.palette.violet["600"],
|
|
@@ -234,9 +234,9 @@ const tokens = {
|
|
|
234
234
|
neutralActive: darken(.05, palette.grey["800"]),
|
|
235
235
|
neutralHover: lighten(.05, palette.grey["800"]),
|
|
236
236
|
neutralLight: palette.grey["100"],
|
|
237
|
-
neutralSoft: palette.grey["
|
|
238
|
-
neutralSoftActive: darken(.05, palette.grey["
|
|
239
|
-
neutralSoftHover: darken(.025, palette.grey["
|
|
237
|
+
neutralSoft: palette.grey["75"],
|
|
238
|
+
neutralSoftActive: darken(.05, palette.grey["75"]),
|
|
239
|
+
neutralSoftHover: darken(.025, palette.grey["75"]),
|
|
240
240
|
positive: palette.mint["700"],
|
|
241
241
|
positiveLight: palette.mint["100"],
|
|
242
242
|
promote: palette.violet["600"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-design-system",
|
|
3
|
-
"version": "34.
|
|
3
|
+
"version": "34.8.0-docs-uplift-20260916013555",
|
|
4
4
|
"description": "Themeable design system for the SEEK Group",
|
|
5
5
|
"homepage": "https://seek-oss.github.io/braid-design-system/",
|
|
6
6
|
"bugs": {
|
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
"@babel/core": "^7.26.0",
|
|
130
130
|
"@babel/plugin-transform-typescript": "^7.20.13",
|
|
131
131
|
"@babel/types": "^7.26.0",
|
|
132
|
+
"@braid-design-system/source.macro": "1.0.0",
|
|
132
133
|
"@capsizecss/metrics": "^4.0.0",
|
|
133
134
|
"@storybook/react-webpack5": "^10.2.7",
|
|
134
135
|
"@svgr/core": "^5.5.0",
|
|
@@ -164,8 +165,7 @@
|
|
|
164
165
|
"skott": "^0.32.1",
|
|
165
166
|
"storybook": "^10.2.7",
|
|
166
167
|
"svgo": "^2.8.0",
|
|
167
|
-
"title-case": "^3.0.3"
|
|
168
|
-
"@braid-design-system/source.macro": "1.0.0"
|
|
168
|
+
"title-case": "^3.0.3"
|
|
169
169
|
},
|
|
170
170
|
"peerDependencies": {
|
|
171
171
|
"react": "^18 || ^19",
|