braid-design-system 34.6.2 → 34.8.0-docs-uplift-20260914032958
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 +54 -0
- package/LICENSE +21 -0
- package/dist/color-mode/query-param.d.cts +1 -1
- package/dist/color-mode/query-param.d.mts +1 -1
- 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/components/Actions/Actions.cjs +0 -1
- package/dist/lib/components/Actions/Actions.mjs +1 -1
- package/dist/lib/components/ButtonIcon/ButtonIcon.cjs +16 -2
- package/dist/lib/components/ButtonIcon/ButtonIcon.d.cts +1 -1
- package/dist/lib/components/ButtonIcon/ButtonIcon.d.mts +1 -1
- package/dist/lib/components/ButtonIcon/ButtonIcon.mjs +16 -2
- package/dist/lib/components/Inline/Inline.d.cts +3 -3
- package/dist/lib/components/Inline/Inline.d.mts +3 -3
- package/dist/lib/components/MenuRenderer/MenuRenderer.css.cjs +0 -17
- package/dist/lib/components/MenuRenderer/MenuRenderer.css.mjs +1 -17
- package/dist/lib/components/MonthPicker/MonthPicker.d.cts +1 -1
- package/dist/lib/components/MonthPicker/MonthPicker.d.mts +1 -1
- package/dist/lib/components/Pagination/Pagination.css.cjs +0 -1
- package/dist/lib/components/Pagination/Pagination.css.mjs +0 -1
- package/dist/lib/components/Rating/Rating.cjs +1 -0
- package/dist/lib/components/Rating/Rating.mjs +1 -0
- package/dist/lib/components/Stepper/StepperContext.cjs +30 -20
- package/dist/lib/components/Stepper/StepperContext.mjs +30 -20
- package/dist/lib/components/TooltipRenderer/TooltipRenderer.cjs +0 -2
- package/dist/lib/components/TooltipRenderer/TooltipRenderer.mjs +1 -1
- package/dist/lib/components/private/InlineField/InlineField.css.cjs +0 -1
- package/dist/lib/components/private/InlineField/InlineField.css.mjs +1 -1
- package/dist/lib/components/private/InlineField/StyledInput.d.cts +1 -1
- package/dist/lib/components/private/InlineField/StyledInput.d.mts +1 -1
- package/dist/lib/components/private/Popover/Popover.css.cjs +1 -3
- package/dist/lib/components/private/Popover/Popover.css.mjs +2 -3
- package/dist/lib/components/private/Popover/Popover.d.cts +1 -1
- package/dist/lib/components/private/Popover/Popover.d.mts +1 -1
- package/dist/lib/css/atoms/sprinkles.css.d.cts +1 -1
- package/dist/lib/css/atoms/sprinkles.css.d.mts +1 -1
- package/dist/lib/playroom/snippets/ButtonIcon.cjs +4 -0
- package/dist/lib/playroom/snippets/ButtonIcon.mjs +4 -0
- package/dist/lib/themes/docs/tokens.cjs +3 -3
- package/dist/lib/themes/docs/tokens.mjs +3 -3
- package/dist/lib/themes/tokenType.d.cts +1 -1
- package/dist/lib/themes/tokenType.d.mts +1 -1
- package/dist/lib/utils/a11y/index.cjs +0 -2
- package/dist/lib/utils/a11y/index.mjs +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 34.8.0-docs-uplift-20260914032958
|
|
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
|
+
|
|
29
|
+
## 34.7.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- **ButtonIcon:** Add `brandAccent` tone ([#2125](https://github.com/seek-oss/braid-design-system/pull/2125))
|
|
34
|
+
|
|
35
|
+
Introduces support for the `brandAccent` tone on `ButtonIcon`.
|
|
36
|
+
|
|
37
|
+
**EXAMPLE USAGE:**
|
|
38
|
+
|
|
39
|
+
```jsx
|
|
40
|
+
<ButtonIcon tone="brandAccent" icon={<IconAdd />} label="Add" />
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- **ButtonIcon:** Default accent tones to `solid` when `variant` is omitted ([#2125](https://github.com/seek-oss/braid-design-system/pull/2125))
|
|
44
|
+
|
|
45
|
+
Accent tones (`formAccent`, `brandAccent`) now default to `solid` when `variant` is omitted — existing `formAccent` usage can pass `variant="soft"` to keep the previous look.
|
|
46
|
+
|
|
47
|
+
**EXAMPLE USAGE:**
|
|
48
|
+
|
|
49
|
+
```jsx
|
|
50
|
+
<ButtonIcon tone="formAccent" icon={<IconAdd />} label="Add" />
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- **Rating:** Expose the star graphic with `role="img"` so the `aria-label` is announced reliably by assistive technologies. ([#2122](https://github.com/seek-oss/braid-design-system/pull/2122))
|
|
56
|
+
|
|
3
57
|
## 34.6.2
|
|
4
58
|
|
|
5
59
|
### Patch 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.
|
|
@@ -43,6 +43,6 @@ declare const colorModeQueryParamCheck: string;
|
|
|
43
43
|
*
|
|
44
44
|
* @returns Braid color mode preference as query string parameter
|
|
45
45
|
*/
|
|
46
|
-
declare const getColorModeQueryParam: () => "
|
|
46
|
+
declare const getColorModeQueryParam: () => "" | "_bdsdm=1" | "_bdsdm=2" | "_bdsdm=0";
|
|
47
47
|
//#endregion
|
|
48
48
|
export { colorModeQueryParamCheck, getColorModeQueryParam };
|
|
@@ -43,6 +43,6 @@ declare const colorModeQueryParamCheck: string;
|
|
|
43
43
|
*
|
|
44
44
|
* @returns Braid color mode preference as query string parameter
|
|
45
45
|
*/
|
|
46
|
-
declare const getColorModeQueryParam: () => "
|
|
46
|
+
declare const getColorModeQueryParam: () => "" | "_bdsdm=1" | "_bdsdm=2" | "_bdsdm=0";
|
|
47
47
|
//#endregion
|
|
48
48
|
export { colorModeQueryParamCheck, getColorModeQueryParam };
|
|
@@ -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) => {
|
|
@@ -19,7 +19,11 @@ const buttonIconVariants = [
|
|
|
19
19
|
"transparent",
|
|
20
20
|
"solid"
|
|
21
21
|
];
|
|
22
|
-
const buttonIconTones = [
|
|
22
|
+
const buttonIconTones = [
|
|
23
|
+
"neutral",
|
|
24
|
+
"formAccent",
|
|
25
|
+
"brandAccent"
|
|
26
|
+
];
|
|
23
27
|
const buttonIconSizes = [
|
|
24
28
|
"small",
|
|
25
29
|
"standard",
|
|
@@ -30,7 +34,17 @@ const padding = {
|
|
|
30
34
|
standard: "xsmall",
|
|
31
35
|
large: "xsmall"
|
|
32
36
|
};
|
|
33
|
-
const
|
|
37
|
+
const resolveToneAndVariant = ({ variant: variantProp, tone: toneProp }) => {
|
|
38
|
+
return {
|
|
39
|
+
variant: variantProp ?? (toneProp === "formAccent" || toneProp === "brandAccent" ? "solid" : "soft"),
|
|
40
|
+
tone: toneProp ?? "neutral"
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
const ButtonIconContent = (0, react.forwardRef)(({ icon, label, id, size = "standard", tone: toneProp, variant: variantProp, type = "button", bleed, tooltipPlacement, loading, onClick, onMouseDown, onKeyUp, onKeyDown, "aria-haspopup": ariaHasPopUp, "aria-expanded": ariaExpanded, "aria-describedby": ariaDescribedBy, "aria-pressed": ariaPressed, tabIndex, data, ...restProps }, forwardedRef) => {
|
|
44
|
+
const { tone, variant } = resolveToneAndVariant({
|
|
45
|
+
variant: variantProp,
|
|
46
|
+
tone: toneProp
|
|
47
|
+
});
|
|
34
48
|
const { root, content } = require_Button.useButtonStyles({
|
|
35
49
|
variant,
|
|
36
50
|
tone,
|
|
@@ -4,7 +4,7 @@ import { ButtonStyleProps } from "../Button/Button.cjs";
|
|
|
4
4
|
import { AllHTMLAttributes, ReactElement } from "react";
|
|
5
5
|
//#region src/lib/components/ButtonIcon/ButtonIcon.d.ts
|
|
6
6
|
declare const buttonIconVariants: Array<Extract<ButtonStyleProps['variant'], 'soft' | 'transparent' | 'solid'>>;
|
|
7
|
-
declare const buttonIconTones: Array<Extract<ButtonStyleProps['tone'], 'neutral' | 'formAccent'>>;
|
|
7
|
+
declare const buttonIconTones: Array<Extract<ButtonStyleProps['tone'], 'neutral' | 'formAccent' | 'brandAccent'>>;
|
|
8
8
|
declare const buttonIconSizes: readonly ["small", "standard", "large"];
|
|
9
9
|
type ButtonIconSize = (typeof buttonIconSizes)[number];
|
|
10
10
|
type NativeButtonProps = AllHTMLAttributes<HTMLButtonElement>;
|
|
@@ -4,7 +4,7 @@ import { ButtonStyleProps } from "../Button/Button.mjs";
|
|
|
4
4
|
import { AllHTMLAttributes, ReactElement } from "react";
|
|
5
5
|
//#region src/lib/components/ButtonIcon/ButtonIcon.d.ts
|
|
6
6
|
declare const buttonIconVariants: Array<Extract<ButtonStyleProps['variant'], 'soft' | 'transparent' | 'solid'>>;
|
|
7
|
-
declare const buttonIconTones: Array<Extract<ButtonStyleProps['tone'], 'neutral' | 'formAccent'>>;
|
|
7
|
+
declare const buttonIconTones: Array<Extract<ButtonStyleProps['tone'], 'neutral' | 'formAccent' | 'brandAccent'>>;
|
|
8
8
|
declare const buttonIconSizes: readonly ["small", "standard", "large"];
|
|
9
9
|
type ButtonIconSize = (typeof buttonIconSizes)[number];
|
|
10
10
|
type NativeButtonProps = AllHTMLAttributes<HTMLButtonElement>;
|
|
@@ -17,7 +17,11 @@ const buttonIconVariants = [
|
|
|
17
17
|
"transparent",
|
|
18
18
|
"solid"
|
|
19
19
|
];
|
|
20
|
-
const buttonIconTones = [
|
|
20
|
+
const buttonIconTones = [
|
|
21
|
+
"neutral",
|
|
22
|
+
"formAccent",
|
|
23
|
+
"brandAccent"
|
|
24
|
+
];
|
|
21
25
|
const buttonIconSizes = [
|
|
22
26
|
"small",
|
|
23
27
|
"standard",
|
|
@@ -28,7 +32,17 @@ const padding = {
|
|
|
28
32
|
standard: "xsmall",
|
|
29
33
|
large: "xsmall"
|
|
30
34
|
};
|
|
31
|
-
const
|
|
35
|
+
const resolveToneAndVariant = ({ variant: variantProp, tone: toneProp }) => {
|
|
36
|
+
return {
|
|
37
|
+
variant: variantProp ?? (toneProp === "formAccent" || toneProp === "brandAccent" ? "solid" : "soft"),
|
|
38
|
+
tone: toneProp ?? "neutral"
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const ButtonIconContent = forwardRef(({ icon, label, id, size = "standard", tone: toneProp, variant: variantProp, type = "button", bleed, tooltipPlacement, loading, onClick, onMouseDown, onKeyUp, onKeyDown, "aria-haspopup": ariaHasPopUp, "aria-expanded": ariaExpanded, "aria-describedby": ariaDescribedBy, "aria-pressed": ariaPressed, tabIndex, data, ...restProps }, forwardedRef) => {
|
|
42
|
+
const { tone, variant } = resolveToneAndVariant({
|
|
43
|
+
variant: variantProp,
|
|
44
|
+
tone: toneProp
|
|
45
|
+
});
|
|
32
46
|
const { root, content } = useButtonStyles({
|
|
33
47
|
variant,
|
|
34
48
|
tone,
|
|
@@ -4,14 +4,14 @@ import { DataAttributeMap } from "../private/buildDataAttributes.cjs";
|
|
|
4
4
|
import { CollapsibleAlignmentProps } from "../../utils/collapsibleAlignmentProps.cjs";
|
|
5
5
|
import { FC } from "react";
|
|
6
6
|
//#region src/lib/components/Inline/Inline.d.ts
|
|
7
|
-
|
|
7
|
+
type ValidInlineComponent = 'div' | 'span' | 'p' | 'nav' | 'ul' | 'ol' | 'li';
|
|
8
8
|
type InlineProps = CollapsibleAlignmentProps & {
|
|
9
9
|
space: ResponsiveSpace;
|
|
10
|
-
component?:
|
|
10
|
+
component?: ValidInlineComponent;
|
|
11
11
|
data?: DataAttributeMap;
|
|
12
12
|
children: ReactNodeNoStrings;
|
|
13
13
|
noWrap?: boolean;
|
|
14
14
|
};
|
|
15
15
|
declare const Inline: FC<InlineProps>;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { Inline, InlineProps
|
|
17
|
+
export { Inline, InlineProps };
|
|
@@ -4,14 +4,14 @@ import { DataAttributeMap } from "../private/buildDataAttributes.mjs";
|
|
|
4
4
|
import { CollapsibleAlignmentProps } from "../../utils/collapsibleAlignmentProps.mjs";
|
|
5
5
|
import { FC } from "react";
|
|
6
6
|
//#region src/lib/components/Inline/Inline.d.ts
|
|
7
|
-
|
|
7
|
+
type ValidInlineComponent = 'div' | 'span' | 'p' | 'nav' | 'ul' | 'ol' | 'li';
|
|
8
8
|
type InlineProps = CollapsibleAlignmentProps & {
|
|
9
9
|
space: ResponsiveSpace;
|
|
10
|
-
component?:
|
|
10
|
+
component?: ValidInlineComponent;
|
|
11
11
|
data?: DataAttributeMap;
|
|
12
12
|
children: ReactNodeNoStrings;
|
|
13
13
|
noWrap?: boolean;
|
|
14
14
|
};
|
|
15
15
|
declare const Inline: FC<InlineProps>;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { Inline, InlineProps
|
|
17
|
+
export { Inline, InlineProps };
|
|
@@ -5,22 +5,6 @@ let _vanilla_extract_css_utils = require("@vanilla-extract/css-utils");
|
|
|
5
5
|
//#region src/lib/components/MenuRenderer/MenuRenderer.css.ts
|
|
6
6
|
(0, _vanilla_extract_css_fileScope.setFileScope)("src/lib/components/MenuRenderer/MenuRenderer.css.ts", "braid-design-system");
|
|
7
7
|
const menuYPadding = (0, _vanilla_extract_css.createVar)("menuYPadding");
|
|
8
|
-
(0, _vanilla_extract_css.style)({
|
|
9
|
-
width: "100vw",
|
|
10
|
-
height: "100vh"
|
|
11
|
-
}, "backdrop");
|
|
12
|
-
const triggerVars = {
|
|
13
|
-
top: (0, _vanilla_extract_css.createVar)("triggerVars_top"),
|
|
14
|
-
left: (0, _vanilla_extract_css.createVar)("triggerVars_left"),
|
|
15
|
-
bottom: (0, _vanilla_extract_css.createVar)("triggerVars_bottom"),
|
|
16
|
-
right: (0, _vanilla_extract_css.createVar)("triggerVars_right")
|
|
17
|
-
};
|
|
18
|
-
(0, _vanilla_extract_css.style)({
|
|
19
|
-
top: triggerVars.bottom,
|
|
20
|
-
bottom: triggerVars.top,
|
|
21
|
-
left: triggerVars.left,
|
|
22
|
-
right: triggerVars.right
|
|
23
|
-
}, "menuPosition");
|
|
24
8
|
const widthVar = (0, _vanilla_extract_css.createVar)("widthVar");
|
|
25
9
|
const baseWidth = (0, _vanilla_extract_css.style)({ width: (0, _vanilla_extract_css_utils.calc)(widthVar).divide(4).toString() }, "baseWidth");
|
|
26
10
|
const { small, medium, large } = require_vars_css.vars.contentWidth;
|
|
@@ -34,5 +18,4 @@ const menuHeightLimit = (0, _vanilla_extract_css.style)({ maxHeight: (0, _vanill
|
|
|
34
18
|
//#endregion
|
|
35
19
|
exports.menuHeightLimit = menuHeightLimit;
|
|
36
20
|
exports.menuYPadding = menuYPadding;
|
|
37
|
-
exports.triggerVars = triggerVars;
|
|
38
21
|
exports.width = width;
|
|
@@ -5,22 +5,6 @@ import { calc } from "@vanilla-extract/css-utils";
|
|
|
5
5
|
//#region src/lib/components/MenuRenderer/MenuRenderer.css.ts
|
|
6
6
|
setFileScope("src/lib/components/MenuRenderer/MenuRenderer.css.ts", "braid-design-system");
|
|
7
7
|
const menuYPadding = createVar("menuYPadding");
|
|
8
|
-
style({
|
|
9
|
-
width: "100vw",
|
|
10
|
-
height: "100vh"
|
|
11
|
-
}, "backdrop");
|
|
12
|
-
const triggerVars = {
|
|
13
|
-
top: createVar("triggerVars_top"),
|
|
14
|
-
left: createVar("triggerVars_left"),
|
|
15
|
-
bottom: createVar("triggerVars_bottom"),
|
|
16
|
-
right: createVar("triggerVars_right")
|
|
17
|
-
};
|
|
18
|
-
style({
|
|
19
|
-
top: triggerVars.bottom,
|
|
20
|
-
bottom: triggerVars.top,
|
|
21
|
-
left: triggerVars.left,
|
|
22
|
-
right: triggerVars.right
|
|
23
|
-
}, "menuPosition");
|
|
24
8
|
const widthVar = createVar("widthVar");
|
|
25
9
|
const baseWidth = style({ width: calc(widthVar).divide(4).toString() }, "baseWidth");
|
|
26
10
|
const { small, medium, large } = vars.contentWidth;
|
|
@@ -32,4 +16,4 @@ const width = styleVariants({
|
|
|
32
16
|
const menuHeightLimit = style({ maxHeight: calc(vars.touchableSize).multiply(9.5).add(calc(menuYPadding).multiply(2)).toString() }, "menuHeightLimit");
|
|
33
17
|
endFileScope();
|
|
34
18
|
//#endregion
|
|
35
|
-
export { menuHeightLimit, menuYPadding,
|
|
19
|
+
export { menuHeightLimit, menuYPadding, width };
|
|
@@ -11,7 +11,6 @@ const focusRing = (0, _vanilla_extract_css.style)([{ outlineOffset: 0 }, require
|
|
|
11
11
|
borderRadius
|
|
12
12
|
})], "focusRing");
|
|
13
13
|
const hover = (0, _vanilla_extract_css.style)({}, "hover");
|
|
14
|
-
(0, _vanilla_extract_css.style)(require_colorModeStyle.colorModeStyle({ lightMode: { opacity: .3 } }), "lightModeCurrentKeyline");
|
|
15
14
|
const darkModeCurrentKeyline = (0, _vanilla_extract_css.style)(require_colorModeStyle.colorModeStyle({ darkMode: { opacity: .3 } }), "darkModeCurrentKeyline");
|
|
16
15
|
const current = (0, _vanilla_extract_css.style)({ opacity: .075 }, "current");
|
|
17
16
|
const background = (0, _vanilla_extract_css.style)({ selectors: { [`${hover}:hover &:not(${current})`]: { opacity: .5 } } }, "background");
|
|
@@ -11,7 +11,6 @@ const focusRing = style([{ outlineOffset: 0 }, atoms({
|
|
|
11
11
|
borderRadius
|
|
12
12
|
})], "focusRing");
|
|
13
13
|
const hover = style({}, "hover");
|
|
14
|
-
style(colorModeStyle({ lightMode: { opacity: .3 } }), "lightModeCurrentKeyline");
|
|
15
14
|
const darkModeCurrentKeyline = style(colorModeStyle({ darkMode: { opacity: .3 } }), "darkModeCurrentKeyline");
|
|
16
15
|
const current = style({ opacity: .075 }, "current");
|
|
17
16
|
const background = style({ selectors: { [`${hover}:hover &:not(${current})`]: { opacity: .5 } } }, "background");
|
|
@@ -45,6 +45,7 @@ const Rating = ({ rating, size = "standard", weight, variant = "full", tone = "b
|
|
|
45
45
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
|
|
46
46
|
component: "span",
|
|
47
47
|
className: require_Rating_css.inlineFlex,
|
|
48
|
+
role: "img",
|
|
48
49
|
"aria-label": ariaLabel || `${rating.toFixed(1)} out of ${ratingArr.length}`,
|
|
49
50
|
children: variant === "minimal" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RatingStar, {
|
|
50
51
|
percent: 100,
|
|
@@ -42,6 +42,7 @@ const Rating = ({ rating, size = "standard", weight, variant = "full", tone = "b
|
|
|
42
42
|
children: [/* @__PURE__ */ jsx(Box, {
|
|
43
43
|
component: "span",
|
|
44
44
|
className: inlineFlex,
|
|
45
|
+
role: "img",
|
|
45
46
|
"aria-label": ariaLabel || `${rating.toFixed(1)} out of ${ratingArr.length}`,
|
|
46
47
|
children: variant === "minimal" ? /* @__PURE__ */ jsx(RatingStar, {
|
|
47
48
|
percent: 100,
|
|
@@ -6,6 +6,16 @@ const StepContext = (0, react.createContext)({
|
|
|
6
6
|
stepNumber: 0,
|
|
7
7
|
isLast: false
|
|
8
8
|
});
|
|
9
|
+
const NAV_RIGHT = 0;
|
|
10
|
+
const NAV_DOWN = 1;
|
|
11
|
+
const NAV_LEFT = 2;
|
|
12
|
+
const NAV_UP = 3;
|
|
13
|
+
const NAV_HOME = 4;
|
|
14
|
+
const NAV_END = 5;
|
|
15
|
+
const NAV_TAB = 6;
|
|
16
|
+
const NAV_CLICKED = 7;
|
|
17
|
+
const NAV_FOCUSED = 8;
|
|
18
|
+
const NAV_BLURRED = 9;
|
|
9
19
|
const StepperContext = (0, react.createContext)(null);
|
|
10
20
|
const getNextStep = (moveAmount, current, maxStep) => {
|
|
11
21
|
if (current === null) return moveAmount > 0 ? 1 : maxStep;
|
|
@@ -18,34 +28,34 @@ const StepperContextProvider = ({ children, activeStep, stepCount: stepCountProp
|
|
|
18
28
|
const stepCount = isLinear ? progress : stepCountProp;
|
|
19
29
|
const [stepperState, dispatch] = (0, react.useReducer)((state, action) => {
|
|
20
30
|
switch (action.type) {
|
|
21
|
-
case
|
|
22
|
-
case
|
|
31
|
+
case NAV_UP:
|
|
32
|
+
case NAV_LEFT: return {
|
|
23
33
|
...state,
|
|
24
34
|
focusedStep: getNextStep(-1, state.focusedStep, stepCount)
|
|
25
35
|
};
|
|
26
|
-
case
|
|
27
|
-
case
|
|
36
|
+
case NAV_DOWN:
|
|
37
|
+
case NAV_RIGHT: return {
|
|
28
38
|
...state,
|
|
29
39
|
focusedStep: getNextStep(1, state.focusedStep, stepCount)
|
|
30
40
|
};
|
|
31
|
-
case
|
|
41
|
+
case NAV_HOME: return {
|
|
32
42
|
...state,
|
|
33
43
|
focusedStep: 1
|
|
34
44
|
};
|
|
35
|
-
case
|
|
45
|
+
case NAV_END: return {
|
|
36
46
|
...state,
|
|
37
47
|
focusedStep: stepCount
|
|
38
48
|
};
|
|
39
|
-
case
|
|
40
|
-
case
|
|
49
|
+
case NAV_BLURRED:
|
|
50
|
+
case NAV_TAB: return {
|
|
41
51
|
...state,
|
|
42
52
|
focusedStep: null
|
|
43
53
|
};
|
|
44
|
-
case
|
|
54
|
+
case NAV_CLICKED: return {
|
|
45
55
|
...state,
|
|
46
56
|
focusedStep: action.value
|
|
47
57
|
};
|
|
48
|
-
case
|
|
58
|
+
case NAV_FOCUSED: return {
|
|
49
59
|
...state,
|
|
50
60
|
focusedStep: state.focusedStep === null ? activeStep : state.focusedStep
|
|
51
61
|
};
|
|
@@ -64,27 +74,27 @@ const StepperContextProvider = ({ children, activeStep, stepCount: stepCountProp
|
|
|
64
74
|
const targetKey = require_normalizeKey.normalizeKey(event);
|
|
65
75
|
if (targetKey === "Tab") return;
|
|
66
76
|
const action = {
|
|
67
|
-
ArrowRight: { type:
|
|
68
|
-
ArrowLeft: { type:
|
|
69
|
-
ArrowUp: { type:
|
|
70
|
-
ArrowDown: { type:
|
|
71
|
-
Home: { type:
|
|
72
|
-
End: { type:
|
|
77
|
+
ArrowRight: { type: NAV_RIGHT },
|
|
78
|
+
ArrowLeft: { type: NAV_LEFT },
|
|
79
|
+
ArrowUp: { type: NAV_UP },
|
|
80
|
+
ArrowDown: { type: NAV_DOWN },
|
|
81
|
+
Home: { type: NAV_HOME },
|
|
82
|
+
End: { type: NAV_END }
|
|
73
83
|
};
|
|
74
84
|
if (action[targetKey]) dispatch(action[targetKey]);
|
|
75
85
|
};
|
|
76
86
|
const onKeyDown = (event) => {
|
|
77
87
|
const targetKey = require_normalizeKey.normalizeKey(event);
|
|
78
88
|
if (targetKey === "Tab") {
|
|
79
|
-
dispatch({ type:
|
|
89
|
+
dispatch({ type: NAV_TAB });
|
|
80
90
|
return;
|
|
81
91
|
}
|
|
82
92
|
if (targetKey.indexOf("Arrow") === 0 || ["Home", "End"].includes(targetKey)) event.preventDefault();
|
|
83
93
|
};
|
|
84
|
-
const onFocus = () => dispatch({ type:
|
|
85
|
-
const onBlur = () => dispatch({ type:
|
|
94
|
+
const onFocus = () => dispatch({ type: NAV_FOCUSED });
|
|
95
|
+
const onBlur = () => dispatch({ type: NAV_BLURRED });
|
|
86
96
|
const onClick = (index) => dispatch({
|
|
87
|
-
type:
|
|
97
|
+
type: NAV_CLICKED,
|
|
88
98
|
value: index
|
|
89
99
|
});
|
|
90
100
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepperContext.Provider, {
|
|
@@ -6,6 +6,16 @@ const StepContext = createContext({
|
|
|
6
6
|
stepNumber: 0,
|
|
7
7
|
isLast: false
|
|
8
8
|
});
|
|
9
|
+
const NAV_RIGHT = 0;
|
|
10
|
+
const NAV_DOWN = 1;
|
|
11
|
+
const NAV_LEFT = 2;
|
|
12
|
+
const NAV_UP = 3;
|
|
13
|
+
const NAV_HOME = 4;
|
|
14
|
+
const NAV_END = 5;
|
|
15
|
+
const NAV_TAB = 6;
|
|
16
|
+
const NAV_CLICKED = 7;
|
|
17
|
+
const NAV_FOCUSED = 8;
|
|
18
|
+
const NAV_BLURRED = 9;
|
|
9
19
|
const StepperContext = createContext(null);
|
|
10
20
|
const getNextStep = (moveAmount, current, maxStep) => {
|
|
11
21
|
if (current === null) return moveAmount > 0 ? 1 : maxStep;
|
|
@@ -18,34 +28,34 @@ const StepperContextProvider = ({ children, activeStep, stepCount: stepCountProp
|
|
|
18
28
|
const stepCount = isLinear ? progress : stepCountProp;
|
|
19
29
|
const [stepperState, dispatch] = useReducer((state, action) => {
|
|
20
30
|
switch (action.type) {
|
|
21
|
-
case
|
|
22
|
-
case
|
|
31
|
+
case NAV_UP:
|
|
32
|
+
case NAV_LEFT: return {
|
|
23
33
|
...state,
|
|
24
34
|
focusedStep: getNextStep(-1, state.focusedStep, stepCount)
|
|
25
35
|
};
|
|
26
|
-
case
|
|
27
|
-
case
|
|
36
|
+
case NAV_DOWN:
|
|
37
|
+
case NAV_RIGHT: return {
|
|
28
38
|
...state,
|
|
29
39
|
focusedStep: getNextStep(1, state.focusedStep, stepCount)
|
|
30
40
|
};
|
|
31
|
-
case
|
|
41
|
+
case NAV_HOME: return {
|
|
32
42
|
...state,
|
|
33
43
|
focusedStep: 1
|
|
34
44
|
};
|
|
35
|
-
case
|
|
45
|
+
case NAV_END: return {
|
|
36
46
|
...state,
|
|
37
47
|
focusedStep: stepCount
|
|
38
48
|
};
|
|
39
|
-
case
|
|
40
|
-
case
|
|
49
|
+
case NAV_BLURRED:
|
|
50
|
+
case NAV_TAB: return {
|
|
41
51
|
...state,
|
|
42
52
|
focusedStep: null
|
|
43
53
|
};
|
|
44
|
-
case
|
|
54
|
+
case NAV_CLICKED: return {
|
|
45
55
|
...state,
|
|
46
56
|
focusedStep: action.value
|
|
47
57
|
};
|
|
48
|
-
case
|
|
58
|
+
case NAV_FOCUSED: return {
|
|
49
59
|
...state,
|
|
50
60
|
focusedStep: state.focusedStep === null ? activeStep : state.focusedStep
|
|
51
61
|
};
|
|
@@ -64,27 +74,27 @@ const StepperContextProvider = ({ children, activeStep, stepCount: stepCountProp
|
|
|
64
74
|
const targetKey = normalizeKey(event);
|
|
65
75
|
if (targetKey === "Tab") return;
|
|
66
76
|
const action = {
|
|
67
|
-
ArrowRight: { type:
|
|
68
|
-
ArrowLeft: { type:
|
|
69
|
-
ArrowUp: { type:
|
|
70
|
-
ArrowDown: { type:
|
|
71
|
-
Home: { type:
|
|
72
|
-
End: { type:
|
|
77
|
+
ArrowRight: { type: NAV_RIGHT },
|
|
78
|
+
ArrowLeft: { type: NAV_LEFT },
|
|
79
|
+
ArrowUp: { type: NAV_UP },
|
|
80
|
+
ArrowDown: { type: NAV_DOWN },
|
|
81
|
+
Home: { type: NAV_HOME },
|
|
82
|
+
End: { type: NAV_END }
|
|
73
83
|
};
|
|
74
84
|
if (action[targetKey]) dispatch(action[targetKey]);
|
|
75
85
|
};
|
|
76
86
|
const onKeyDown = (event) => {
|
|
77
87
|
const targetKey = normalizeKey(event);
|
|
78
88
|
if (targetKey === "Tab") {
|
|
79
|
-
dispatch({ type:
|
|
89
|
+
dispatch({ type: NAV_TAB });
|
|
80
90
|
return;
|
|
81
91
|
}
|
|
82
92
|
if (targetKey.indexOf("Arrow") === 0 || ["Home", "End"].includes(targetKey)) event.preventDefault();
|
|
83
93
|
};
|
|
84
|
-
const onFocus = () => dispatch({ type:
|
|
85
|
-
const onBlur = () => dispatch({ type:
|
|
94
|
+
const onFocus = () => dispatch({ type: NAV_FOCUSED });
|
|
95
|
+
const onBlur = () => dispatch({ type: NAV_BLURRED });
|
|
86
96
|
const onClick = (index) => dispatch({
|
|
87
|
-
type:
|
|
97
|
+
type: NAV_CLICKED,
|
|
88
98
|
value: index
|
|
89
99
|
});
|
|
90
100
|
return /* @__PURE__ */ jsx(StepperContext.Provider, {
|
|
@@ -156,5 +156,3 @@ const TooltipRenderer = ({ id, tooltip, placement = "top", children }) => {
|
|
|
156
156
|
//#endregion
|
|
157
157
|
exports.TooltipContent = TooltipContent;
|
|
158
158
|
exports.TooltipRenderer = TooltipRenderer;
|
|
159
|
-
exports.TooltipTextDefaultsProvider = TooltipTextDefaultsProvider;
|
|
160
|
-
exports.offsetSpace = offsetSpace;
|
|
@@ -67,7 +67,6 @@ exports.disabledRadioIndicator = disabledRadioIndicator;
|
|
|
67
67
|
exports.fakeField = fakeField;
|
|
68
68
|
exports.hideBorderOnDarkBackgroundInLightMode = hideBorderOnDarkBackgroundInLightMode;
|
|
69
69
|
exports.hoverOverlay = hoverOverlay;
|
|
70
|
-
exports.indicator = indicator;
|
|
71
70
|
exports.isMixed = isMixed;
|
|
72
71
|
exports.labelOffset = labelOffset;
|
|
73
72
|
exports.radioIndicator = radioIndicator;
|
|
@@ -61,4 +61,4 @@ const radioIndicator = [indicator, style({
|
|
|
61
61
|
}, "radioScale")];
|
|
62
62
|
endFileScope();
|
|
63
63
|
//#endregion
|
|
64
|
-
export { checkboxIndicator, children, disabledRadioIndicator, fakeField, hideBorderOnDarkBackgroundInLightMode, hoverOverlay,
|
|
64
|
+
export { checkboxIndicator, children, disabledRadioIndicator, fakeField, hideBorderOnDarkBackgroundInLightMode, hoverOverlay, isMixed, labelOffset, radioIndicator, realField, selected, sizeVars };
|
|
@@ -10,10 +10,9 @@ const backdrop = (0, _vanilla_extract_css.style)({
|
|
|
10
10
|
}, "backdrop");
|
|
11
11
|
const placementModifier = (0, _vanilla_extract_css.createVar)("placementModifier");
|
|
12
12
|
const invertPlacement = (0, _vanilla_extract_css.style)({ vars: { [placementModifier]: "-1" } }, "invertPlacement");
|
|
13
|
-
const transitionThreshold = "xxsmall";
|
|
14
13
|
const popupAnimation = (0, _vanilla_extract_css.keyframes)({ from: {
|
|
15
14
|
opacity: 0,
|
|
16
|
-
transform: `translateY(${(0, _vanilla_extract_css_utils.calc)(require_vars_css.vars.space[
|
|
15
|
+
transform: `translateY(${(0, _vanilla_extract_css_utils.calc)(require_vars_css.vars.space["xxsmall"]).multiply((0, _vanilla_extract_css.fallbackVar)(placementModifier, "1"))})`
|
|
17
16
|
} }, "popupAnimation");
|
|
18
17
|
const animation = (0, _vanilla_extract_css.style)({
|
|
19
18
|
animationName: popupAnimation,
|
|
@@ -29,4 +28,3 @@ exports.animation = animation;
|
|
|
29
28
|
exports.backdrop = backdrop;
|
|
30
29
|
exports.delayVisibility = delayVisibility;
|
|
31
30
|
exports.invertPlacement = invertPlacement;
|
|
32
|
-
exports.transitionThreshold = transitionThreshold;
|
|
@@ -10,10 +10,9 @@ const backdrop = style({
|
|
|
10
10
|
}, "backdrop");
|
|
11
11
|
const placementModifier = createVar("placementModifier");
|
|
12
12
|
const invertPlacement = style({ vars: { [placementModifier]: "-1" } }, "invertPlacement");
|
|
13
|
-
const transitionThreshold = "xxsmall";
|
|
14
13
|
const popupAnimation = keyframes({ from: {
|
|
15
14
|
opacity: 0,
|
|
16
|
-
transform: `translateY(${calc(vars.space[
|
|
15
|
+
transform: `translateY(${calc(vars.space["xxsmall"]).multiply(fallbackVar(placementModifier, "1"))})`
|
|
17
16
|
} }, "popupAnimation");
|
|
18
17
|
const animation = style({
|
|
19
18
|
animationName: popupAnimation,
|
|
@@ -25,4 +24,4 @@ const animation = style({
|
|
|
25
24
|
const delayVisibility = style({ animationDelay: "250ms" }, "delayVisibility");
|
|
26
25
|
endFileScope();
|
|
27
26
|
//#endregion
|
|
28
|
-
export { animation, backdrop, delayVisibility, invertPlacement
|
|
27
|
+
export { animation, backdrop, delayVisibility, invertPlacement };
|
|
@@ -4,7 +4,7 @@ import { ConditionalValue, RequiredConditionalValue } from "@vanilla-extract/spr
|
|
|
4
4
|
declare const colorAtomicProperties: {
|
|
5
5
|
conditions: {
|
|
6
6
|
defaultCondition: "lightMode";
|
|
7
|
-
conditionNames: ("
|
|
7
|
+
conditionNames: ("lightMode" | "darkMode")[];
|
|
8
8
|
};
|
|
9
9
|
styles: {
|
|
10
10
|
readonly background: {
|
|
@@ -4,7 +4,7 @@ import { ConditionalValue, RequiredConditionalValue } from "@vanilla-extract/spr
|
|
|
4
4
|
declare const colorAtomicProperties: {
|
|
5
5
|
conditions: {
|
|
6
6
|
defaultCondition: "lightMode";
|
|
7
|
-
conditionNames: ("
|
|
7
|
+
conditionNames: ("lightMode" | "darkMode")[];
|
|
8
8
|
};
|
|
9
9
|
styles: {
|
|
10
10
|
readonly background: {
|
|
@@ -23,6 +23,10 @@ const snippets = [
|
|
|
23
23
|
{
|
|
24
24
|
description: "Form accent",
|
|
25
25
|
code: "<ButtonIcon tone=\"formAccent\" icon={<IconAdd />} label=\"Add\" />"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
description: "Brand accent",
|
|
29
|
+
code: "<ButtonIcon tone=\"brandAccent\" icon={<IconAdd />} label=\"Add\" />"
|
|
26
30
|
}
|
|
27
31
|
];
|
|
28
32
|
//#endregion
|
|
@@ -23,6 +23,10 @@ const snippets = [
|
|
|
23
23
|
{
|
|
24
24
|
description: "Form accent",
|
|
25
25
|
code: "<ButtonIcon tone=\"formAccent\" icon={<IconAdd />} label=\"Add\" />"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
description: "Brand accent",
|
|
29
|
+
code: "<ButtonIcon tone=\"brandAccent\" icon={<IconAdd />} label=\"Add\" />"
|
|
26
30
|
}
|
|
27
31
|
];
|
|
28
32
|
//#endregion
|
|
@@ -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"],
|
|
@@ -103,8 +103,6 @@ function getAccessibleVariant(color, background) {
|
|
|
103
103
|
return findClosestAccessibleDarkerColor(color, background ?? getLightVariant(color), AA_TEXT_CONTRAST);
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
|
-
exports.contrast = contrast;
|
|
107
|
-
exports.findClosestAccessibleDarkerColor = findClosestAccessibleDarkerColor;
|
|
108
106
|
exports.findClosestAccessibleLighterColor = findClosestAccessibleLighterColor;
|
|
109
107
|
exports.getAccessibleVariant = getAccessibleVariant;
|
|
110
108
|
exports.getLightVariant = getLightVariant;
|
|
@@ -103,4 +103,4 @@ function getAccessibleVariant(color, background) {
|
|
|
103
103
|
return findClosestAccessibleDarkerColor(color, background ?? getLightVariant(color), AA_TEXT_CONTRAST);
|
|
104
104
|
}
|
|
105
105
|
//#endregion
|
|
106
|
-
export {
|
|
106
|
+
export { findClosestAccessibleLighterColor, getAccessibleVariant, getLightVariant };
|
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-20260914032958",
|
|
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",
|