braid-design-system 34.2.0 → 34.3.0
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 +24 -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/Autosuggest/Autosuggest.playroom.d.cts +2 -2
- package/dist/lib/components/Autosuggest/Autosuggest.playroom.d.mts +2 -2
- package/dist/lib/components/Box/BoxRenderer.d.cts +2 -2
- package/dist/lib/components/Box/BoxRenderer.d.mts +2 -2
- package/dist/lib/components/BraidTestProvider/BraidTestProvider.d.cts +2 -2
- package/dist/lib/components/BraidTestProvider/BraidTestProvider.d.mts +2 -2
- package/dist/lib/components/Button/Button.d.mts +1 -0
- package/dist/lib/components/Dialog/Dialog.d.mts +1 -0
- package/dist/lib/components/Drawer/Drawer.d.mts +1 -0
- package/dist/lib/components/Inline/Inline.cjs +4 -4
- package/dist/lib/components/Inline/Inline.css.cjs +4 -1
- package/dist/lib/components/Inline/Inline.css.mjs +3 -1
- package/dist/lib/components/Inline/Inline.d.cts +1 -0
- package/dist/lib/components/Inline/Inline.d.mts +1 -0
- package/dist/lib/components/Inline/Inline.mjs +5 -5
- package/dist/lib/components/MenuItem/useMenuItem.d.mts +1 -0
- package/dist/lib/components/MenuRenderer/MenuRenderer.d.mts +1 -0
- package/dist/lib/components/MonthPicker/MonthPicker.d.cts +2 -2
- package/dist/lib/components/MonthPicker/MonthPicker.d.mts +2 -2
- package/dist/lib/components/RadioGroup/RadioGroup.d.cts +2 -2
- package/dist/lib/components/RadioGroup/RadioGroup.d.mts +2 -2
- package/dist/lib/components/Stepper/StepperContext.d.mts +1 -0
- package/dist/lib/components/Tag/Tag.playroom.d.cts +2 -2
- package/dist/lib/components/Tag/Tag.playroom.d.mts +2 -2
- package/dist/lib/components/TextDropdown/TextDropdown.d.cts +2 -2
- package/dist/lib/components/TextDropdown/TextDropdown.d.mts +2 -2
- package/dist/lib/components/TextLink/TextLink.d.mts +1 -0
- package/dist/lib/components/Textarea/Textarea.cjs +1 -0
- package/dist/lib/components/Textarea/Textarea.css.cjs +5 -1
- package/dist/lib/components/Textarea/Textarea.css.mjs +5 -2
- package/dist/lib/components/Textarea/Textarea.mjs +2 -1
- package/dist/lib/components/TooltipRenderer/TooltipRenderer.d.mts +1 -0
- package/dist/lib/components/icons/IconContainer.d.mts +1 -0
- package/dist/lib/components/private/Field/Field.d.mts +1 -0
- package/dist/lib/components/private/FieldGroup/FieldGroup.d.mts +1 -0
- package/dist/lib/components/private/Modal/ModalContent.d.mts +1 -0
- package/dist/lib/components/private/Typography/Typography.d.mts +1 -0
- package/dist/lib/playroom/FrameComponent.d.cts +2 -2
- package/dist/lib/playroom/FrameComponent.d.mts +2 -2
- package/dist/lib/playroom/components/Placeholder/Placeholder.d.cts +2 -2
- package/dist/lib/playroom/components/Placeholder/Placeholder.d.mts +2 -2
- package/dist/lib/playroom/components/PlaceholderHeader/PlaceholderHeader.d.cts +4 -4
- package/dist/lib/playroom/components/PlaceholderHeader/PlaceholderHeader.d.mts +4 -4
- package/dist/lib/playroom/playroomState.d.mts +1 -0
- package/dist/lib/playroom/snippets/Inline.cjs +4 -0
- package/dist/lib/playroom/snippets/Inline.mjs +4 -0
- package/dist/lib/playroom/snippets/SteppedSection.cjs +1 -1
- package/dist/lib/playroom/snippets/SteppedSection.mjs +1 -1
- package/dist/lib/themes/baseTokens/nvl.cjs +8 -8
- package/dist/lib/themes/baseTokens/nvl.mjs +8 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 34.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Inline:** Add _noWrap_ prop to support single-row compositions ([#2069](https://github.com/seek-oss/braid-design-system/pull/2069))
|
|
8
|
+
|
|
9
|
+
**EXAMPLE USAGE:**
|
|
10
|
+
|
|
11
|
+
```jsx
|
|
12
|
+
<Inline space="small" noWrap>
|
|
13
|
+
<Placeholder width={20} height={48} />
|
|
14
|
+
<Placeholder width={80} height={48} />
|
|
15
|
+
<Placeholder width={40} height={48} />
|
|
16
|
+
</Inline>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- **Textarea:** Ensure focus ring displays correctly ([#2066](https://github.com/seek-oss/braid-design-system/pull/2066))
|
|
22
|
+
|
|
23
|
+
- **Heading:** Increase line height to improve legibility ([#2073](https://github.com/seek-oss/braid-design-system/pull/2073))
|
|
24
|
+
|
|
25
|
+
Increases the line height of all `Heading` levels to improve legibility of wrapping lines of text — focusing on reducing the collision of diacritical marks in Thai Script.
|
|
26
|
+
|
|
3
27
|
## 34.2.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
|
@@ -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: () => "" | "_bdsdm=1" | "_bdsdm=2" | "
|
|
46
|
+
declare const getColorModeQueryParam: () => "_bdsdm=0" | "_bdsdm=1" | "_bdsdm=2" | "";
|
|
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: () => "" | "_bdsdm=1" | "_bdsdm=2" | "
|
|
46
|
+
declare const getColorModeQueryParam: () => "_bdsdm=0" | "_bdsdm=1" | "_bdsdm=2" | "";
|
|
47
47
|
//#endregion
|
|
48
48
|
export { colorModeQueryParamCheck, getColorModeQueryParam };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AutosuggestBaseProps, AutosuggestLabelProps } from "./Autosuggest.cjs";
|
|
2
2
|
import { StateProp } from "../../playroom/playroomState.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
import { Optional } from "utility-types";
|
|
5
5
|
|
|
6
6
|
//#region src/lib/components/Autosuggest/Autosuggest.playroom.d.ts
|
|
@@ -12,6 +12,6 @@ declare function Autosuggest<Value>({
|
|
|
12
12
|
onClear,
|
|
13
13
|
tabIndex,
|
|
14
14
|
...restProps
|
|
15
|
-
}: PlayroomAutosuggestProps<Value>):
|
|
15
|
+
}: PlayroomAutosuggestProps<Value>): react.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { Autosuggest };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AutosuggestBaseProps, AutosuggestLabelProps } from "./Autosuggest.mjs";
|
|
2
2
|
import { StateProp } from "../../playroom/playroomState.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react from "react";
|
|
4
4
|
import { Optional } from "utility-types";
|
|
5
5
|
|
|
6
6
|
//#region src/lib/components/Autosuggest/Autosuggest.playroom.d.ts
|
|
@@ -12,6 +12,6 @@ declare function Autosuggest<Value>({
|
|
|
12
12
|
onClear,
|
|
13
13
|
tabIndex,
|
|
14
14
|
...restProps
|
|
15
|
-
}: PlayroomAutosuggestProps<Value>):
|
|
15
|
+
}: PlayroomAutosuggestProps<Value>): react.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { Autosuggest };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Atoms } from "../../css/atoms/atoms.cjs";
|
|
2
2
|
import { BoxShadow } from "../../css/atoms/atomicProperties.cjs";
|
|
3
3
|
import { BoxBaseProps, SimpleBackground } from "./Box.cjs";
|
|
4
|
+
import * as react from "react";
|
|
4
5
|
import { ReactElement } from "react";
|
|
5
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/lib/components/Box/BoxRenderer.d.ts
|
|
8
8
|
interface BoxRendererProps extends BoxBaseProps {
|
|
@@ -18,6 +18,6 @@ declare const BoxRenderer: ({
|
|
|
18
18
|
background,
|
|
19
19
|
boxShadow,
|
|
20
20
|
...props
|
|
21
|
-
}: BoxRendererProps) =>
|
|
21
|
+
}: BoxRendererProps) => react.JSX.Element | null;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { BoxRenderer };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Atoms } from "../../css/atoms/atoms.mjs";
|
|
2
2
|
import { BoxShadow } from "../../css/atoms/atomicProperties.mjs";
|
|
3
3
|
import { BoxBaseProps, SimpleBackground } from "./Box.mjs";
|
|
4
|
+
import * as react from "react";
|
|
4
5
|
import { ReactElement } from "react";
|
|
5
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/lib/components/Box/BoxRenderer.d.ts
|
|
8
8
|
interface BoxRendererProps extends BoxBaseProps {
|
|
@@ -18,6 +18,6 @@ declare const BoxRenderer: ({
|
|
|
18
18
|
background,
|
|
19
19
|
boxShadow,
|
|
20
20
|
...props
|
|
21
|
-
}: BoxRendererProps) =>
|
|
21
|
+
}: BoxRendererProps) => react.JSX.Element | null;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { BoxRenderer };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Breakpoint } from "../../css/breakpoints.cjs";
|
|
2
2
|
import { BraidProviderProps } from "../BraidProvider/BraidProvider.cjs";
|
|
3
3
|
import { index_d_exports } from "../../themes/index.cjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/lib/components/BraidTestProvider/BraidTestProvider.d.ts
|
|
7
7
|
interface BraidTestProviderProps extends Omit<BraidProviderProps, 'theme' | 'styleBody'> {
|
|
@@ -12,6 +12,6 @@ declare const BraidTestProvider: ({
|
|
|
12
12
|
themeName,
|
|
13
13
|
breakpoint,
|
|
14
14
|
...restProps
|
|
15
|
-
}: BraidTestProviderProps) =>
|
|
15
|
+
}: BraidTestProviderProps) => react.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { BraidTestProvider };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Breakpoint } from "../../css/breakpoints.mjs";
|
|
2
2
|
import { BraidProviderProps } from "../BraidProvider/BraidProvider.mjs";
|
|
3
3
|
import { index_d_exports } from "../../themes/index.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/lib/components/BraidTestProvider/BraidTestProvider.d.ts
|
|
7
7
|
interface BraidTestProviderProps extends Omit<BraidProviderProps, 'theme' | 'styleBody'> {
|
|
@@ -12,6 +12,6 @@ declare const BraidTestProvider: ({
|
|
|
12
12
|
themeName,
|
|
13
13
|
breakpoint,
|
|
14
14
|
...restProps
|
|
15
|
-
}: BraidTestProviderProps) =>
|
|
15
|
+
}: BraidTestProviderProps) => react.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { BraidTestProvider };
|
|
@@ -3,6 +3,7 @@ import { UseIconProps } from "../../hooks/useIcon/index.mjs";
|
|
|
3
3
|
import { buttonTones } from "./buttonTones.mjs";
|
|
4
4
|
import * as react from "react";
|
|
5
5
|
import { AllHTMLAttributes, ReactElement, ReactNode } from "react";
|
|
6
|
+
|
|
6
7
|
//#region src/lib/components/Button/Button.d.ts
|
|
7
8
|
declare const buttonVariants: readonly ["solid", "ghost", "soft", "transparent"];
|
|
8
9
|
declare const buttonSizes: readonly ["standard", "small"];
|
|
@@ -8,7 +8,7 @@ assert = require_runtime.__toESM(assert);
|
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
|
|
10
10
|
//#region src/lib/components/Inline/Inline.tsx
|
|
11
|
-
const Inline = ({ space = "none", align, alignY, collapseBelow, reverse = false, component = "div", data, children, ...restProps }) => {
|
|
11
|
+
const Inline = ({ space = "none", align, alignY, collapseBelow, reverse = false, component = "div", data, children, noWrap = false, ...restProps }) => {
|
|
12
12
|
(0, assert.default)(!reverse || reverse && collapseBelow, "The `reverse` prop should only be applied in combination with the `collapseBelow` prop.\nIf you do not want to collapse responsively, it is recommended to reorder the content directly.\n\nSee documentation for details: https://seek-oss.github.io/braid-design-system/components/Inline#reversing-the-order");
|
|
13
13
|
const { collapseMobile, collapseTablet, collapseDesktop, collapsibleAlignmentProps } = require_collapsibleAlignmentProps.resolveCollapsibleAlignmentProps({
|
|
14
14
|
align,
|
|
@@ -21,13 +21,13 @@ const Inline = ({ space = "none", align, alignY, collapseBelow, reverse = false,
|
|
|
21
21
|
component,
|
|
22
22
|
...collapsibleAlignmentProps,
|
|
23
23
|
gap: space,
|
|
24
|
-
flexWrap: "wrap",
|
|
25
|
-
className: collapseBelow ? {
|
|
24
|
+
flexWrap: noWrap ? "nowrap" : "wrap",
|
|
25
|
+
className: [collapseBelow ? {
|
|
26
26
|
[require_Inline_css.fitContentMobile]: !collapseMobile,
|
|
27
27
|
[require_Inline_css.fitContentTablet]: !collapseTablet,
|
|
28
28
|
[require_Inline_css.fitContentDesktop]: !collapseDesktop,
|
|
29
29
|
[require_Inline_css.fitContentWide]: true
|
|
30
|
-
} : require_Inline_css.fitContentMobile,
|
|
30
|
+
} : require_Inline_css.fitContentMobile, noWrap && require_Inline_css.preventShrink],
|
|
31
31
|
...require_buildDataAttributes.default({
|
|
32
32
|
data,
|
|
33
33
|
validateRestProps: restProps
|
|
@@ -9,6 +9,7 @@ const fitContentMobile = (0, _vanilla_extract_css.style)({}, "fitContentMobile")
|
|
|
9
9
|
const fitContentTablet = (0, _vanilla_extract_css.style)({}, "fitContentTablet");
|
|
10
10
|
const fitContentDesktop = (0, _vanilla_extract_css.style)({}, "fitContentDesktop");
|
|
11
11
|
const fitContentWide = (0, _vanilla_extract_css.style)({}, "fitContentWide");
|
|
12
|
+
const preventShrink = (0, _vanilla_extract_css.style)({}, "preventShrink");
|
|
12
13
|
const fitContentStyleRule = {
|
|
13
14
|
flexBasis: "auto",
|
|
14
15
|
width: "auto",
|
|
@@ -18,6 +19,7 @@ const fitContentStyleRule = {
|
|
|
18
19
|
(0, _vanilla_extract_css.globalStyle)(`${fitContentTablet} > *`, require_responsiveStyle.responsiveStyle({ tablet: fitContentStyleRule }));
|
|
19
20
|
(0, _vanilla_extract_css.globalStyle)(`${fitContentDesktop} > *`, require_responsiveStyle.responsiveStyle({ desktop: fitContentStyleRule }));
|
|
20
21
|
(0, _vanilla_extract_css.globalStyle)(`${fitContentWide} > *`, require_responsiveStyle.responsiveStyle({ wide: fitContentStyleRule }));
|
|
22
|
+
(0, _vanilla_extract_css.globalStyle)(`${preventShrink} > *`, { flexShrink: 0 });
|
|
21
23
|
(0, _vanilla_extract_css_fileScope.endFileScope)();
|
|
22
24
|
|
|
23
25
|
//#endregion
|
|
@@ -25,4 +27,5 @@ exports.fitContentDesktop = fitContentDesktop;
|
|
|
25
27
|
exports.fitContentMobile = fitContentMobile;
|
|
26
28
|
exports.fitContentStyleRule = fitContentStyleRule;
|
|
27
29
|
exports.fitContentTablet = fitContentTablet;
|
|
28
|
-
exports.fitContentWide = fitContentWide;
|
|
30
|
+
exports.fitContentWide = fitContentWide;
|
|
31
|
+
exports.preventShrink = preventShrink;
|
|
@@ -8,6 +8,7 @@ const fitContentMobile = style({}, "fitContentMobile");
|
|
|
8
8
|
const fitContentTablet = style({}, "fitContentTablet");
|
|
9
9
|
const fitContentDesktop = style({}, "fitContentDesktop");
|
|
10
10
|
const fitContentWide = style({}, "fitContentWide");
|
|
11
|
+
const preventShrink = style({}, "preventShrink");
|
|
11
12
|
const fitContentStyleRule = {
|
|
12
13
|
flexBasis: "auto",
|
|
13
14
|
width: "auto",
|
|
@@ -17,7 +18,8 @@ globalStyle(`${fitContentMobile} > *`, fitContentStyleRule);
|
|
|
17
18
|
globalStyle(`${fitContentTablet} > *`, responsiveStyle({ tablet: fitContentStyleRule }));
|
|
18
19
|
globalStyle(`${fitContentDesktop} > *`, responsiveStyle({ desktop: fitContentStyleRule }));
|
|
19
20
|
globalStyle(`${fitContentWide} > *`, responsiveStyle({ wide: fitContentStyleRule }));
|
|
21
|
+
globalStyle(`${preventShrink} > *`, { flexShrink: 0 });
|
|
20
22
|
endFileScope();
|
|
21
23
|
|
|
22
24
|
//#endregion
|
|
23
|
-
export { fitContentDesktop, fitContentMobile, fitContentStyleRule, fitContentTablet, fitContentWide };
|
|
25
|
+
export { fitContentDesktop, fitContentMobile, fitContentStyleRule, fitContentTablet, fitContentWide, preventShrink };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import buildDataAttributes_default from "../private/buildDataAttributes.mjs";
|
|
2
2
|
import { Box } from "../Box/Box.mjs";
|
|
3
|
-
import { fitContentDesktop, fitContentMobile, fitContentTablet, fitContentWide } from "./Inline.css.mjs";
|
|
3
|
+
import { fitContentDesktop, fitContentMobile, fitContentTablet, fitContentWide, preventShrink } from "./Inline.css.mjs";
|
|
4
4
|
import { resolveCollapsibleAlignmentProps } from "../../utils/collapsibleAlignmentProps.mjs";
|
|
5
5
|
import assert from "assert";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/lib/components/Inline/Inline.tsx
|
|
9
|
-
const Inline = ({ space = "none", align, alignY, collapseBelow, reverse = false, component = "div", data, children, ...restProps }) => {
|
|
9
|
+
const Inline = ({ space = "none", align, alignY, collapseBelow, reverse = false, component = "div", data, children, noWrap = false, ...restProps }) => {
|
|
10
10
|
assert(!reverse || reverse && collapseBelow, "The `reverse` prop should only be applied in combination with the `collapseBelow` prop.\nIf you do not want to collapse responsively, it is recommended to reorder the content directly.\n\nSee documentation for details: https://seek-oss.github.io/braid-design-system/components/Inline#reversing-the-order");
|
|
11
11
|
const { collapseMobile, collapseTablet, collapseDesktop, collapsibleAlignmentProps } = resolveCollapsibleAlignmentProps({
|
|
12
12
|
align,
|
|
@@ -19,13 +19,13 @@ const Inline = ({ space = "none", align, alignY, collapseBelow, reverse = false,
|
|
|
19
19
|
component,
|
|
20
20
|
...collapsibleAlignmentProps,
|
|
21
21
|
gap: space,
|
|
22
|
-
flexWrap: "wrap",
|
|
23
|
-
className: collapseBelow ? {
|
|
22
|
+
flexWrap: noWrap ? "nowrap" : "wrap",
|
|
23
|
+
className: [collapseBelow ? {
|
|
24
24
|
[fitContentMobile]: !collapseMobile,
|
|
25
25
|
[fitContentTablet]: !collapseTablet,
|
|
26
26
|
[fitContentDesktop]: !collapseDesktop,
|
|
27
27
|
[fitContentWide]: true
|
|
28
|
-
} : fitContentMobile,
|
|
28
|
+
} : fitContentMobile, noWrap && preventShrink],
|
|
29
29
|
...buildDataAttributes_default({
|
|
30
30
|
data,
|
|
31
31
|
validateRestProps: restProps
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DataAttributeMap } from "../private/buildDataAttributes.mjs";
|
|
2
2
|
import { BadgeProps } from "../Badge/Badge.mjs";
|
|
3
3
|
import { ReactElement, ReactNode } from "react";
|
|
4
|
+
|
|
4
5
|
//#region src/lib/components/MenuItem/useMenuItem.d.ts
|
|
5
6
|
type MenuItemTone = 'critical' | undefined;
|
|
6
7
|
interface UseMenuItemProps {
|
|
@@ -3,6 +3,7 @@ import { DataAttributeMap } from "../private/buildDataAttributes.mjs";
|
|
|
3
3
|
import { PopoverProps } from "../private/Popover/Popover.mjs";
|
|
4
4
|
import { width as width$1 } from "./MenuRenderer.css.mjs";
|
|
5
5
|
import { FC, KeyboardEvent, MouseEvent, ReactNode, Ref } from "react";
|
|
6
|
+
|
|
6
7
|
//#region src/lib/components/MenuRenderer/MenuRenderer.d.ts
|
|
7
8
|
interface TriggerProps {
|
|
8
9
|
'aria-haspopup': boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldGroupBaseProps, FieldLabelVariant } from "../private/FieldGroup/FieldGroup.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/components/MonthPicker/MonthPicker.d.ts
|
|
5
5
|
interface MonthPickerValue {
|
|
@@ -39,7 +39,7 @@ declare const MonthPicker: {
|
|
|
39
39
|
tabIndex,
|
|
40
40
|
monthNames,
|
|
41
41
|
...restProps
|
|
42
|
-
}: MonthPickerProps):
|
|
42
|
+
}: MonthPickerProps): react.JSX.Element;
|
|
43
43
|
displayName: string;
|
|
44
44
|
};
|
|
45
45
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldGroupBaseProps, FieldLabelVariant } from "../private/FieldGroup/FieldGroup.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/components/MonthPicker/MonthPicker.d.ts
|
|
5
5
|
interface MonthPickerValue {
|
|
@@ -39,7 +39,7 @@ declare const MonthPicker: {
|
|
|
39
39
|
tabIndex,
|
|
40
40
|
monthNames,
|
|
41
41
|
...restProps
|
|
42
|
-
}: MonthPickerProps):
|
|
42
|
+
}: MonthPickerProps): react.JSX.Element;
|
|
43
43
|
displayName: string;
|
|
44
44
|
};
|
|
45
45
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InlineFieldProps } from "../private/InlineField/InlineField.cjs";
|
|
2
2
|
import { FieldGroupBaseProps, FieldLabelVariant } from "../private/FieldGroup/FieldGroup.cjs";
|
|
3
3
|
import { RadioItemProps } from "./RadioItem.cjs";
|
|
4
|
+
import * as react from "react";
|
|
4
5
|
import { FormEvent, ReactElement } from "react";
|
|
5
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/lib/components/RadioGroup/RadioGroup.d.ts
|
|
8
8
|
type RadioGroupBaseProps<Value = NonNullable<string | number>> = FieldGroupBaseProps & {
|
|
@@ -25,7 +25,7 @@ declare const RadioGroup: {
|
|
|
25
25
|
tone,
|
|
26
26
|
size,
|
|
27
27
|
...props
|
|
28
|
-
}: RadioGroupProps):
|
|
28
|
+
}: RadioGroupProps): react.JSX.Element;
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InlineFieldProps } from "../private/InlineField/InlineField.mjs";
|
|
2
2
|
import { FieldGroupBaseProps, FieldLabelVariant } from "../private/FieldGroup/FieldGroup.mjs";
|
|
3
3
|
import { RadioItemProps } from "./RadioItem.mjs";
|
|
4
|
+
import * as react from "react";
|
|
4
5
|
import { FormEvent, ReactElement } from "react";
|
|
5
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/lib/components/RadioGroup/RadioGroup.d.ts
|
|
8
8
|
type RadioGroupBaseProps<Value = NonNullable<string | number>> = FieldGroupBaseProps & {
|
|
@@ -25,7 +25,7 @@ declare const RadioGroup: {
|
|
|
25
25
|
tone,
|
|
26
26
|
size,
|
|
27
27
|
...props
|
|
28
|
-
}: RadioGroupProps):
|
|
28
|
+
}: RadioGroupProps): react.JSX.Element;
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { tone as tone$1 } from "./Stepper.css.mjs";
|
|
2
2
|
import { KeyboardEvent, ReactNode } from "react";
|
|
3
|
+
|
|
3
4
|
//#region src/lib/components/Stepper/StepperContext.d.ts
|
|
4
5
|
type StepperMode = 'linear' | 'non-linear';
|
|
5
6
|
type StepperTone = Exclude<keyof typeof tone$1, 'formAccent'>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TagProps } from "./Tag.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/components/Tag/Tag.playroom.d.ts
|
|
5
5
|
declare const Tag: ({
|
|
6
6
|
icon,
|
|
7
7
|
size,
|
|
8
8
|
...restProps
|
|
9
|
-
}: TagProps) =>
|
|
9
|
+
}: TagProps) => react.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Tag };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TagProps } from "./Tag.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/components/Tag/Tag.playroom.d.ts
|
|
5
5
|
declare const Tag: ({
|
|
6
6
|
icon,
|
|
7
7
|
size,
|
|
8
8
|
...restProps
|
|
9
|
-
}: TagProps) =>
|
|
9
|
+
}: TagProps) => react.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Tag };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataAttributeMap } from "../private/buildDataAttributes.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/components/TextDropdown/TextDropdown.d.ts
|
|
5
5
|
interface TextDropdownOption<Value> {
|
|
@@ -27,6 +27,6 @@ declare function TextDropdown<Value>({
|
|
|
27
27
|
data,
|
|
28
28
|
tabIndex,
|
|
29
29
|
...restProps
|
|
30
|
-
}: TextDropdownProps<Value>):
|
|
30
|
+
}: TextDropdownProps<Value>): react.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { TextDropdown, TextDropdownProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataAttributeMap } from "../private/buildDataAttributes.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/components/TextDropdown/TextDropdown.d.ts
|
|
5
5
|
interface TextDropdownOption<Value> {
|
|
@@ -27,6 +27,6 @@ declare function TextDropdown<Value>({
|
|
|
27
27
|
data,
|
|
28
28
|
tabIndex,
|
|
29
29
|
...restProps
|
|
30
|
-
}: TextDropdownProps<Value>):
|
|
30
|
+
}: TextDropdownProps<Value>): react.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { TextDropdown, TextDropdownProps };
|
|
@@ -3,6 +3,7 @@ import { DataAttributeMap } from "../private/buildDataAttributes.mjs";
|
|
|
3
3
|
import { UseIconProps } from "../../hooks/useIcon/index.mjs";
|
|
4
4
|
import * as react from "react";
|
|
5
5
|
import { ReactElement } from "react";
|
|
6
|
+
|
|
6
7
|
//#region src/lib/components/TextLink/TextLink.d.ts
|
|
7
8
|
interface TextLinkStyles {
|
|
8
9
|
weight?: 'regular' | 'weak';
|
|
@@ -52,6 +52,7 @@ const Textarea = (0, react.forwardRef)(({ value, onChange, onBlur, onFocus, onPa
|
|
|
52
52
|
zIndex: 0,
|
|
53
53
|
background,
|
|
54
54
|
borderRadius,
|
|
55
|
+
className: require_Textarea_css.focusRing,
|
|
55
56
|
children: [
|
|
56
57
|
hasHighlights ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
|
|
57
58
|
ref: highlightsRef,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
2
2
|
const require_vars_css = require('../../themes/vars.css.cjs');
|
|
3
|
+
const require_outlineStyle = require('../../css/outlineStyle.cjs');
|
|
3
4
|
const require_fieldPaddingX = require('../private/Field/fieldPaddingX.cjs');
|
|
4
5
|
let _vanilla_extract_css_fileScope = require("@vanilla-extract/css/fileScope");
|
|
5
6
|
let _vanilla_extract_css = require("@vanilla-extract/css");
|
|
@@ -9,8 +10,10 @@ let _vanilla_extract_css = require("@vanilla-extract/css");
|
|
|
9
10
|
const field = (0, _vanilla_extract_css.style)({
|
|
10
11
|
resize: "vertical",
|
|
11
12
|
background: "transparent",
|
|
12
|
-
minHeight: require_vars_css.vars.touchableSize
|
|
13
|
+
minHeight: require_vars_css.vars.touchableSize,
|
|
14
|
+
outline: "none"
|
|
13
15
|
}, "field");
|
|
16
|
+
const focusRing = (0, _vanilla_extract_css.style)(require_outlineStyle.outlineStyle("&:focus-within"), "focusRing");
|
|
14
17
|
const highlights = (0, _vanilla_extract_css.style)({
|
|
15
18
|
color: "transparent !important",
|
|
16
19
|
wordBreak: "break-word",
|
|
@@ -33,5 +36,6 @@ const scrollbarBorderOffset = (0, _vanilla_extract_css.style)({ borderRight: `${
|
|
|
33
36
|
//#endregion
|
|
34
37
|
exports.clipScrollBar = clipScrollBar;
|
|
35
38
|
exports.field = field;
|
|
39
|
+
exports.focusRing = focusRing;
|
|
36
40
|
exports.highlights = highlights;
|
|
37
41
|
exports.scrollbarBorderOffset = scrollbarBorderOffset;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vars } from "../../themes/vars.css.mjs";
|
|
2
|
+
import { outlineStyle } from "../../css/outlineStyle.mjs";
|
|
2
3
|
import { fieldPaddingX } from "../private/Field/fieldPaddingX.mjs";
|
|
3
4
|
import { endFileScope, setFileScope } from "@vanilla-extract/css/fileScope";
|
|
4
5
|
import { style } from "@vanilla-extract/css";
|
|
@@ -8,8 +9,10 @@ setFileScope("src/lib/components/Textarea/Textarea.css.ts", "braid-design-system
|
|
|
8
9
|
const field = style({
|
|
9
10
|
resize: "vertical",
|
|
10
11
|
background: "transparent",
|
|
11
|
-
minHeight: vars.touchableSize
|
|
12
|
+
minHeight: vars.touchableSize,
|
|
13
|
+
outline: "none"
|
|
12
14
|
}, "field");
|
|
15
|
+
const focusRing = style(outlineStyle("&:focus-within"), "focusRing");
|
|
13
16
|
const highlights = style({
|
|
14
17
|
color: "transparent !important",
|
|
15
18
|
wordBreak: "break-word",
|
|
@@ -30,4 +33,4 @@ const scrollbarBorderOffset = style({ borderRight: `${vars.borderWidth.standard}
|
|
|
30
33
|
endFileScope();
|
|
31
34
|
|
|
32
35
|
//#endregion
|
|
33
|
-
export { clipScrollBar, field, highlights, scrollbarBorderOffset };
|
|
36
|
+
export { clipScrollBar, field, focusRing, highlights, scrollbarBorderOffset };
|
|
@@ -2,7 +2,7 @@ import { Box } from "../Box/Box.mjs";
|
|
|
2
2
|
import { Field } from "../private/Field/Field.mjs";
|
|
3
3
|
import { getCharacterLimitStatus } from "../private/Field/getCharacterLimitStatus.mjs";
|
|
4
4
|
import { formatRanges } from "./formatRanges.mjs";
|
|
5
|
-
import { clipScrollBar, field, highlights, scrollbarBorderOffset } from "./Textarea.css.mjs";
|
|
5
|
+
import { clipScrollBar, field, focusRing, highlights, scrollbarBorderOffset } from "./Textarea.css.mjs";
|
|
6
6
|
import { forwardRef, useCallback, useRef, useState } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
@@ -51,6 +51,7 @@ const Textarea = forwardRef(({ value, onChange, onBlur, onFocus, onPaste, placeh
|
|
|
51
51
|
zIndex: 0,
|
|
52
52
|
background,
|
|
53
53
|
borderRadius,
|
|
54
|
+
className: focusRing,
|
|
54
55
|
children: [
|
|
55
56
|
hasHighlights ? /* @__PURE__ */ jsx(Box, {
|
|
56
57
|
ref: highlightsRef,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNodeNoStrings } from "../private/ReactNodeNoStrings.mjs";
|
|
2
2
|
import { PopoverProps } from "../private/Popover/Popover.mjs";
|
|
3
3
|
import { FC, ReactNode, RefCallback } from "react";
|
|
4
|
+
|
|
4
5
|
//#region src/lib/components/TooltipRenderer/TooltipRenderer.d.ts
|
|
5
6
|
interface TriggerProps {
|
|
6
7
|
ref: RefCallback<HTMLElement>;
|
|
@@ -2,6 +2,7 @@ import { DataAttributeMap } from "../buildDataAttributes.mjs";
|
|
|
2
2
|
import { FieldLabelProps } from "../../FieldLabel/FieldLabel.mjs";
|
|
3
3
|
import { FieldMessageProps } from "../../FieldMessage/FieldMessage.mjs";
|
|
4
4
|
import { AllHTMLAttributes, ReactNode } from "react";
|
|
5
|
+
|
|
5
6
|
//#region src/lib/components/private/Field/Field.d.ts
|
|
6
7
|
type FormElementProps = AllHTMLAttributes<HTMLFormElement>;
|
|
7
8
|
type FieldLabelVariant = {
|
|
@@ -2,6 +2,7 @@ import { DataAttributeMap } from "../buildDataAttributes.mjs";
|
|
|
2
2
|
import { FieldLabelProps } from "../../FieldLabel/FieldLabel.mjs";
|
|
3
3
|
import { FieldMessageProps } from "../../FieldMessage/FieldMessage.mjs";
|
|
4
4
|
import { AllHTMLAttributes } from "react";
|
|
5
|
+
|
|
5
6
|
//#region src/lib/components/private/FieldGroup/FieldGroup.d.ts
|
|
6
7
|
type FormElementProps = AllHTMLAttributes<HTMLFormElement>;
|
|
7
8
|
type FieldLabelVariant = {
|
|
@@ -2,6 +2,7 @@ import { ReactNodeNoStrings } from "../ReactNodeNoStrings.mjs";
|
|
|
2
2
|
import { DataAttributeMap } from "../buildDataAttributes.mjs";
|
|
3
3
|
import { BoxProps } from "../../Box/Box.mjs";
|
|
4
4
|
import { ReactNode, Ref } from "react";
|
|
5
|
+
|
|
5
6
|
//#region src/lib/components/private/Modal/ModalContent.d.ts
|
|
6
7
|
type ModalContentCommonProps = {
|
|
7
8
|
id?: string;
|
|
@@ -2,6 +2,7 @@ import { DataAttributeMap } from "../buildDataAttributes.mjs";
|
|
|
2
2
|
import { BoxProps } from "../../Box/Box.mjs";
|
|
3
3
|
import { UseIconProps } from "../../../hooks/useIcon/index.mjs";
|
|
4
4
|
import { ReactElement, ReactNode } from "react";
|
|
5
|
+
|
|
5
6
|
//#region src/lib/components/private/Typography/Typography.d.ts
|
|
6
7
|
interface TypographyProps extends Pick<BoxProps, 'id' | 'component'> {
|
|
7
8
|
children?: ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BraidTheme } from "../themes/makeBraidTheme.cjs";
|
|
2
|
+
import * as react from "react";
|
|
2
3
|
import { ReactNode } from "react";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/playroom/FrameComponent.d.ts
|
|
6
6
|
interface Props {
|
|
@@ -12,6 +12,6 @@ declare const _default: ({
|
|
|
12
12
|
theme,
|
|
13
13
|
children,
|
|
14
14
|
frameSettings
|
|
15
|
-
}: Props) =>
|
|
15
|
+
}: Props) => react.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { _default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BraidTheme } from "../themes/makeBraidTheme.mjs";
|
|
2
|
+
import * as react from "react";
|
|
2
3
|
import { ReactNode } from "react";
|
|
3
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/lib/playroom/FrameComponent.d.ts
|
|
6
6
|
interface Props {
|
|
@@ -12,6 +12,6 @@ declare const _default: ({
|
|
|
12
12
|
theme,
|
|
13
13
|
children,
|
|
14
14
|
frameSettings
|
|
15
|
-
}: Props) =>
|
|
15
|
+
}: Props) => react.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { _default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as react from "react";
|
|
1
2
|
import { ReactNode } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/playroom/components/Placeholder/Placeholder.d.ts
|
|
5
5
|
interface PlaceholderProps {
|
|
@@ -17,6 +17,6 @@ declare const Placeholder: ({
|
|
|
17
17
|
shape,
|
|
18
18
|
image,
|
|
19
19
|
imageSize
|
|
20
|
-
}: PlaceholderProps) =>
|
|
20
|
+
}: PlaceholderProps) => react.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { Placeholder };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import * as react from "react";
|
|
1
2
|
import { ReactNode } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/playroom/components/Placeholder/Placeholder.d.ts
|
|
5
5
|
interface PlaceholderProps {
|
|
@@ -17,6 +17,6 @@ declare const Placeholder: ({
|
|
|
17
17
|
shape,
|
|
18
18
|
image,
|
|
19
19
|
imageSize
|
|
20
|
-
}: PlaceholderProps) =>
|
|
20
|
+
}: PlaceholderProps) => react.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { Placeholder };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import * as react from "react";
|
|
1
2
|
import { FC } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/playroom/components/PlaceholderHeader/PlaceholderHeader.d.ts
|
|
5
5
|
declare const logoForBrand: {
|
|
6
|
-
seek:
|
|
7
|
-
jobsdb:
|
|
8
|
-
jobstreet:
|
|
6
|
+
seek: react.JSX.Element;
|
|
7
|
+
jobsdb: react.JSX.Element;
|
|
8
|
+
jobstreet: react.JSX.Element;
|
|
9
9
|
};
|
|
10
10
|
interface PlaceholderHeaderProps {
|
|
11
11
|
brand?: keyof typeof logoForBrand;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import * as react from "react";
|
|
1
2
|
import { FC } from "react";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/playroom/components/PlaceholderHeader/PlaceholderHeader.d.ts
|
|
5
5
|
declare const logoForBrand: {
|
|
6
|
-
seek:
|
|
7
|
-
jobsdb:
|
|
8
|
-
jobstreet:
|
|
6
|
+
seek: react.JSX.Element;
|
|
7
|
+
jobsdb: react.JSX.Element;
|
|
8
|
+
jobstreet: react.JSX.Element;
|
|
9
9
|
};
|
|
10
10
|
interface PlaceholderHeaderProps {
|
|
11
11
|
brand?: keyof typeof logoForBrand;
|
|
@@ -12,6 +12,10 @@ const snippets = [
|
|
|
12
12
|
{
|
|
13
13
|
description: "Responsive space",
|
|
14
14
|
code: "<Inline space={{ mobile: \"small\", tablet: \"large\" }}>\n <Placeholder width={48} height={48} />\n <Placeholder width={48} height={48} />\n <Placeholder width={48} height={48} />\n</Inline>"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
description: "No wrap",
|
|
18
|
+
code: "<Inline space=\"small\" noWrap>\n <Placeholder width={48} height={48} />\n <Placeholder width={48} height={48} />\n <Placeholder width={48} height={48} />\n</Inline>"
|
|
15
19
|
}
|
|
16
20
|
];
|
|
17
21
|
|
|
@@ -11,6 +11,10 @@ const snippets = [
|
|
|
11
11
|
{
|
|
12
12
|
description: "Responsive space",
|
|
13
13
|
code: "<Inline space={{ mobile: \"small\", tablet: \"large\" }}>\n <Placeholder width={48} height={48} />\n <Placeholder width={48} height={48} />\n <Placeholder width={48} height={48} />\n</Inline>"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
description: "No wrap",
|
|
17
|
+
code: "<Inline space=\"small\" noWrap>\n <Placeholder width={48} height={48} />\n <Placeholder width={48} height={48} />\n <Placeholder width={48} height={48} />\n</Inline>"
|
|
14
18
|
}
|
|
15
19
|
];
|
|
16
20
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const snippets = [{
|
|
4
4
|
group: "Sections",
|
|
5
5
|
name: "Stepped Section",
|
|
6
|
-
code: "<PageBlock width=\"medium\">\n {setDefaultState(\"progress\", 1)}\n {setDefaultState(\"activeStep\", 1)}\n <Stack space=\"large\">\n <Stepper\n label=\"Stepped Block\"\n align=\"left\"\n progress={getState(\"progress\")}\n activeStep={getState(\"activeStep\")}\n onStepClick={({ stepNumber }) => setState(\"activeStep\", stepNumber)}\n >\n <Step>Step 1</Step>\n <Step>Step 2</Step>\n <Step>Step 3</Step>\n <Step>Step 4</Step>\n
|
|
6
|
+
code: "<PageBlock width=\"medium\">\n {setDefaultState(\"progress\", 1)}\n {setDefaultState(\"activeStep\", 1)}\n <Stack space=\"large\">\n <Stepper\n label=\"Stepped Block\"\n align=\"left\"\n progress={getState(\"progress\")}\n activeStep={getState(\"activeStep\")}\n onStepClick={({ stepNumber }) => setState(\"activeStep\", stepNumber)}\n >\n <Step>Step 1</Step>\n <Step>Step 2</Step>\n <Step>Step 3</Step>\n <Step>Step 4</Step>\n </Stepper>\n\n {getState(\"activeStep\") === 1 && (\n <Placeholder label=\"Step content 1\" height={400} />\n )}\n {getState(\"activeStep\") === 2 && (\n <Placeholder label=\"Step content 2\" height={400} />\n )}\n {getState(\"activeStep\") === 3 && (\n <Placeholder label=\"Step content 3\" height={400} />\n )}\n {getState(\"activeStep\") === 4 && (\n <Placeholder label=\"Step content 4\" height={400} />\n )}\n\n <Spread space=\"small\">\n <Actions>\n {getState(\"activeStep\") > 1 && (\n <Button\n variant=\"soft\"\n icon={<IconArrow direction=\"left\" />}\n onClick={() => setState(\"activeStep\", getState(\"activeStep\") - 1)}\n >\n Back\n </Button>\n )}\n </Actions>\n <Actions>\n {getState(\"activeStep\") < 4 ? (\n <Button\n variant=\"solid\"\n tone=\"formAccent\"\n icon={<IconArrow direction=\"right\" />}\n iconPosition=\"trailing\"\n onClick={() => {\n const newStep = getState(\"activeStep\") + 1\n setState(\"activeStep\", newStep)\n if (newStep > getState(\"progress\")) {\n setState(\"progress\", newStep)\n }\n }}\n >\n Continue\n </Button>\n ) : (\n <Button\n variant=\"solid\"\n tone=\"brandAccent\"\n icon={<IconSend />}\n iconPosition=\"trailing\"\n >\n Submit\n </Button>\n )}\n </Actions>\n </Spread>\n </Stack>\n</PageBlock>"
|
|
7
7
|
}];
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const snippets = [{
|
|
3
3
|
group: "Sections",
|
|
4
4
|
name: "Stepped Section",
|
|
5
|
-
code: "<PageBlock width=\"medium\">\n {setDefaultState(\"progress\", 1)}\n {setDefaultState(\"activeStep\", 1)}\n <Stack space=\"large\">\n <Stepper\n label=\"Stepped Block\"\n align=\"left\"\n progress={getState(\"progress\")}\n activeStep={getState(\"activeStep\")}\n onStepClick={({ stepNumber }) => setState(\"activeStep\", stepNumber)}\n >\n <Step>Step 1</Step>\n <Step>Step 2</Step>\n <Step>Step 3</Step>\n <Step>Step 4</Step>\n
|
|
5
|
+
code: "<PageBlock width=\"medium\">\n {setDefaultState(\"progress\", 1)}\n {setDefaultState(\"activeStep\", 1)}\n <Stack space=\"large\">\n <Stepper\n label=\"Stepped Block\"\n align=\"left\"\n progress={getState(\"progress\")}\n activeStep={getState(\"activeStep\")}\n onStepClick={({ stepNumber }) => setState(\"activeStep\", stepNumber)}\n >\n <Step>Step 1</Step>\n <Step>Step 2</Step>\n <Step>Step 3</Step>\n <Step>Step 4</Step>\n </Stepper>\n\n {getState(\"activeStep\") === 1 && (\n <Placeholder label=\"Step content 1\" height={400} />\n )}\n {getState(\"activeStep\") === 2 && (\n <Placeholder label=\"Step content 2\" height={400} />\n )}\n {getState(\"activeStep\") === 3 && (\n <Placeholder label=\"Step content 3\" height={400} />\n )}\n {getState(\"activeStep\") === 4 && (\n <Placeholder label=\"Step content 4\" height={400} />\n )}\n\n <Spread space=\"small\">\n <Actions>\n {getState(\"activeStep\") > 1 && (\n <Button\n variant=\"soft\"\n icon={<IconArrow direction=\"left\" />}\n onClick={() => setState(\"activeStep\", getState(\"activeStep\") - 1)}\n >\n Back\n </Button>\n )}\n </Actions>\n <Actions>\n {getState(\"activeStep\") < 4 ? (\n <Button\n variant=\"solid\"\n tone=\"formAccent\"\n icon={<IconArrow direction=\"right\" />}\n iconPosition=\"trailing\"\n onClick={() => {\n const newStep = getState(\"activeStep\") + 1\n setState(\"activeStep\", newStep)\n if (newStep > getState(\"progress\")) {\n setState(\"progress\", newStep)\n }\n }}\n >\n Continue\n </Button>\n ) : (\n <Button\n variant=\"solid\"\n tone=\"brandAccent\"\n icon={<IconSend />}\n iconPosition=\"trailing\"\n >\n Submit\n </Button>\n )}\n </Actions>\n </Spread>\n </Stack>\n</PageBlock>"
|
|
6
6
|
}];
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
@@ -40,41 +40,41 @@ const makeTokens = ({ name, displayName, brandAccent, brandAccentLight, brandAcc
|
|
|
40
40
|
"1": {
|
|
41
41
|
mobile: {
|
|
42
42
|
fontSize: 28,
|
|
43
|
-
lineGap:
|
|
43
|
+
lineGap: 17
|
|
44
44
|
},
|
|
45
45
|
tablet: {
|
|
46
46
|
fontSize: 36,
|
|
47
|
-
lineGap:
|
|
47
|
+
lineGap: 22
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"2": {
|
|
51
51
|
mobile: {
|
|
52
52
|
fontSize: 24,
|
|
53
|
-
lineGap:
|
|
53
|
+
lineGap: 15
|
|
54
54
|
},
|
|
55
55
|
tablet: {
|
|
56
56
|
fontSize: 30,
|
|
57
|
-
lineGap:
|
|
57
|
+
lineGap: 18
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"3": {
|
|
61
61
|
mobile: {
|
|
62
62
|
fontSize: 22,
|
|
63
|
-
lineGap:
|
|
63
|
+
lineGap: 14
|
|
64
64
|
},
|
|
65
65
|
tablet: {
|
|
66
66
|
fontSize: 24,
|
|
67
|
-
lineGap:
|
|
67
|
+
lineGap: 15
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"4": {
|
|
71
71
|
mobile: {
|
|
72
72
|
fontSize: 20,
|
|
73
|
-
lineGap:
|
|
73
|
+
lineGap: 12
|
|
74
74
|
},
|
|
75
75
|
tablet: {
|
|
76
76
|
fontSize: 20,
|
|
77
|
-
lineGap:
|
|
77
|
+
lineGap: 12
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -39,41 +39,41 @@ const makeTokens = ({ name, displayName, brandAccent, brandAccentLight, brandAcc
|
|
|
39
39
|
"1": {
|
|
40
40
|
mobile: {
|
|
41
41
|
fontSize: 28,
|
|
42
|
-
lineGap:
|
|
42
|
+
lineGap: 17
|
|
43
43
|
},
|
|
44
44
|
tablet: {
|
|
45
45
|
fontSize: 36,
|
|
46
|
-
lineGap:
|
|
46
|
+
lineGap: 22
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"2": {
|
|
50
50
|
mobile: {
|
|
51
51
|
fontSize: 24,
|
|
52
|
-
lineGap:
|
|
52
|
+
lineGap: 15
|
|
53
53
|
},
|
|
54
54
|
tablet: {
|
|
55
55
|
fontSize: 30,
|
|
56
|
-
lineGap:
|
|
56
|
+
lineGap: 18
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"3": {
|
|
60
60
|
mobile: {
|
|
61
61
|
fontSize: 22,
|
|
62
|
-
lineGap:
|
|
62
|
+
lineGap: 14
|
|
63
63
|
},
|
|
64
64
|
tablet: {
|
|
65
65
|
fontSize: 24,
|
|
66
|
-
lineGap:
|
|
66
|
+
lineGap: 15
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"4": {
|
|
70
70
|
mobile: {
|
|
71
71
|
fontSize: 20,
|
|
72
|
-
lineGap:
|
|
72
|
+
lineGap: 12
|
|
73
73
|
},
|
|
74
74
|
tablet: {
|
|
75
75
|
fontSize: 20,
|
|
76
|
-
lineGap:
|
|
76
|
+
lineGap: 12
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|