braid-design-system 34.0.2 → 34.0.4
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 +22 -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/AccordionContext.d.mts +0 -2
- package/dist/lib/components/Box/Box.playroom.cjs +1 -0
- package/dist/lib/components/Box/Box.playroom.mjs +1 -0
- package/dist/lib/components/Button/Button.d.mts +0 -3
- package/dist/lib/components/Columns/ColumnsContext.d.mts +0 -5
- package/dist/lib/components/Dialog/Dialog.d.mts +0 -3
- package/dist/lib/components/Drawer/Drawer.d.mts +0 -3
- package/dist/lib/components/Hidden/Hidden.d.cts +1 -1
- package/dist/lib/components/Hidden/Hidden.d.mts +1 -1
- package/dist/lib/components/Hidden/Hidden.playroom.cjs +10 -0
- package/dist/lib/components/Hidden/Hidden.playroom.d.cts +7 -0
- package/dist/lib/components/Hidden/Hidden.playroom.d.mts +7 -0
- package/dist/lib/components/Hidden/Hidden.playroom.mjs +9 -0
- package/dist/lib/components/HiddenVisually/HiddenVisually.playroom.cjs +10 -0
- package/dist/lib/components/HiddenVisually/HiddenVisually.playroom.d.cts +7 -0
- package/dist/lib/components/HiddenVisually/HiddenVisually.playroom.d.mts +7 -0
- package/dist/lib/components/HiddenVisually/HiddenVisually.playroom.mjs +9 -0
- package/dist/lib/components/MenuItem/useMenuItem.d.mts +0 -3
- package/dist/lib/components/MenuRenderer/MenuRenderer.d.mts +0 -2
- package/dist/lib/components/Stack/Stack.playroom.cjs +52 -5
- package/dist/lib/components/Stack/Stack.playroom.mjs +53 -6
- package/dist/lib/components/Stepper/StepperContext.d.mts +0 -2
- package/dist/lib/components/Tabs/Tab.d.mts +0 -2
- package/dist/lib/components/Tabs/TabListContext.d.mts +0 -2
- package/dist/lib/components/TextLink/TextLink.d.mts +0 -3
- package/dist/lib/components/Textarea/Textarea.cjs +9 -3
- package/dist/lib/components/Textarea/Textarea.mjs +9 -3
- package/dist/lib/components/TooltipRenderer/TooltipRenderer.d.mts +0 -2
- package/dist/lib/components/icons/IconContainer.d.mts +0 -3
- package/dist/lib/components/icons/SVGTypes.d.mts +0 -2
- package/dist/lib/components/index.d.mts +0 -2
- package/dist/lib/components/private/Field/Field.d.mts +0 -3
- package/dist/lib/components/private/FieldGroup/FieldGroup.d.mts +0 -4
- package/dist/lib/components/private/Modal/Modal.d.mts +0 -3
- package/dist/lib/components/private/Modal/ModalContent.d.mts +0 -2
- package/dist/lib/components/private/Typography/Typography.d.mts +0 -2
- package/dist/lib/css/typography.css.d.mts +0 -2
- package/dist/lib/hooks/useIcon/index.d.mts +0 -1
- package/dist/lib/playroom/FrameComponent.cjs +15 -27
- package/dist/lib/playroom/FrameComponent.d.cts +3 -1
- package/dist/lib/playroom/FrameComponent.d.mts +3 -1
- package/dist/lib/playroom/FrameComponent.mjs +16 -28
- package/dist/lib/playroom/SpaceDebugContext.cjs +8 -0
- package/dist/lib/playroom/SpaceDebugContext.mjs +7 -0
- package/dist/lib/playroom/components/DebugSpace/DebugSpace.cjs +86 -0
- package/dist/lib/playroom/components/DebugSpace/DebugSpace.css.cjs +34 -0
- package/dist/lib/playroom/components/DebugSpace/DebugSpace.css.mjs +28 -0
- package/dist/lib/playroom/components/DebugSpace/DebugSpace.mjs +85 -0
- package/dist/lib/playroom/components.cjs +2 -2
- package/dist/lib/playroom/components.d.cts +2 -2
- package/dist/lib/playroom/components.d.mts +2 -2
- package/dist/lib/playroom/components.mjs +2 -2
- package/dist/lib/playroom/playroomState.d.cts +1 -1
- package/dist/lib/playroom/playroomState.d.mts +1 -3
- package/dist/lib/playroom/snippets/Accordion.cjs +7 -7
- package/dist/lib/playroom/snippets/Accordion.mjs +7 -7
- package/dist/lib/playroom/snippets/Actions.cjs +2 -2
- package/dist/lib/playroom/snippets/Actions.mjs +2 -2
- package/dist/lib/playroom/snippets/Alert.cjs +6 -6
- package/dist/lib/playroom/snippets/Alert.mjs +6 -6
- package/dist/lib/playroom/snippets/Autosuggest.cjs +6 -6
- package/dist/lib/playroom/snippets/Autosuggest.mjs +6 -6
- package/dist/lib/playroom/snippets/Badge.cjs +13 -13
- package/dist/lib/playroom/snippets/Badge.mjs +13 -13
- package/dist/lib/playroom/snippets/Bleed.cjs +7 -7
- package/dist/lib/playroom/snippets/Bleed.mjs +7 -7
- package/dist/lib/playroom/snippets/Button.cjs +20 -20
- package/dist/lib/playroom/snippets/Button.mjs +20 -20
- package/dist/lib/playroom/snippets/ButtonIcon.cjs +5 -5
- package/dist/lib/playroom/snippets/ButtonIcon.mjs +5 -5
- package/dist/lib/playroom/snippets/Card.cjs +4 -4
- package/dist/lib/playroom/snippets/Card.mjs +4 -4
- package/dist/lib/playroom/snippets/Checkbox.cjs +6 -6
- package/dist/lib/playroom/snippets/Checkbox.mjs +6 -6
- package/dist/lib/playroom/snippets/Columns.cjs +5 -5
- package/dist/lib/playroom/snippets/Columns.mjs +5 -5
- package/dist/lib/playroom/snippets/ContentBlock.cjs +5 -5
- package/dist/lib/playroom/snippets/ContentBlock.mjs +5 -5
- package/dist/lib/playroom/snippets/Dialog.cjs +6 -6
- package/dist/lib/playroom/snippets/Dialog.mjs +6 -6
- package/dist/lib/playroom/snippets/Disclosure.cjs +1 -1
- package/dist/lib/playroom/snippets/Disclosure.mjs +1 -1
- package/dist/lib/playroom/snippets/Divider.cjs +2 -2
- package/dist/lib/playroom/snippets/Divider.mjs +2 -2
- package/dist/lib/playroom/snippets/Drawer.cjs +4 -4
- package/dist/lib/playroom/snippets/Drawer.mjs +4 -4
- package/dist/lib/playroom/snippets/Dropdown.cjs +7 -7
- package/dist/lib/playroom/snippets/Dropdown.mjs +7 -7
- package/dist/lib/playroom/snippets/FieldLabel.cjs +3 -3
- package/dist/lib/playroom/snippets/FieldLabel.mjs +3 -3
- package/dist/lib/playroom/snippets/FieldMessage.cjs +4 -4
- package/dist/lib/playroom/snippets/FieldMessage.mjs +4 -4
- package/dist/lib/playroom/snippets/Heading.cjs +9 -9
- package/dist/lib/playroom/snippets/Heading.mjs +9 -9
- package/dist/lib/playroom/snippets/Inline.cjs +3 -3
- package/dist/lib/playroom/snippets/Inline.mjs +3 -3
- package/dist/lib/playroom/snippets/List.cjs +8 -8
- package/dist/lib/playroom/snippets/List.mjs +8 -8
- package/dist/lib/playroom/snippets/Loader.cjs +1 -1
- package/dist/lib/playroom/snippets/Loader.mjs +1 -1
- package/dist/lib/playroom/snippets/MenuRenderer.cjs +5 -5
- package/dist/lib/playroom/snippets/MenuRenderer.mjs +5 -5
- package/dist/lib/playroom/snippets/MonthPicker.cjs +7 -7
- package/dist/lib/playroom/snippets/MonthPicker.mjs +7 -7
- package/dist/lib/playroom/snippets/Notice.cjs +4 -4
- package/dist/lib/playroom/snippets/Notice.mjs +4 -4
- package/dist/lib/playroom/snippets/OverflowMenu.cjs +2 -2
- package/dist/lib/playroom/snippets/OverflowMenu.mjs +2 -2
- package/dist/lib/playroom/snippets/Page.cjs +2 -2
- package/dist/lib/playroom/snippets/Page.mjs +2 -2
- package/dist/lib/playroom/snippets/PageBlock.cjs +4 -4
- package/dist/lib/playroom/snippets/PageBlock.mjs +4 -4
- package/dist/lib/playroom/snippets/Pagination.cjs +1 -1
- package/dist/lib/playroom/snippets/Pagination.mjs +1 -1
- package/dist/lib/playroom/snippets/PasswordField.cjs +6 -6
- package/dist/lib/playroom/snippets/PasswordField.mjs +6 -6
- package/dist/lib/playroom/snippets/RadioGroup.cjs +7 -7
- package/dist/lib/playroom/snippets/RadioGroup.mjs +7 -7
- package/dist/lib/playroom/snippets/Rating.cjs +4 -4
- package/dist/lib/playroom/snippets/Rating.mjs +4 -4
- package/dist/lib/playroom/snippets/Secondary.cjs +1 -1
- package/dist/lib/playroom/snippets/Secondary.mjs +1 -1
- package/dist/lib/playroom/snippets/Spread.cjs +4 -4
- package/dist/lib/playroom/snippets/Spread.mjs +4 -4
- package/dist/lib/playroom/snippets/Stack.cjs +9 -9
- package/dist/lib/playroom/snippets/Stack.mjs +9 -9
- package/dist/lib/playroom/snippets/Stepper.cjs +4 -4
- package/dist/lib/playroom/snippets/Stepper.mjs +4 -4
- package/dist/lib/playroom/snippets/Strong.cjs +1 -1
- package/dist/lib/playroom/snippets/Strong.mjs +1 -1
- package/dist/lib/playroom/snippets/Table.cjs +3 -3
- package/dist/lib/playroom/snippets/Table.mjs +3 -3
- package/dist/lib/playroom/snippets/Tabs.cjs +6 -6
- package/dist/lib/playroom/snippets/Tabs.mjs +6 -6
- package/dist/lib/playroom/snippets/Tag.cjs +5 -5
- package/dist/lib/playroom/snippets/Tag.mjs +5 -5
- package/dist/lib/playroom/snippets/Text.cjs +9 -9
- package/dist/lib/playroom/snippets/Text.mjs +9 -9
- package/dist/lib/playroom/snippets/TextDropdown.cjs +3 -3
- package/dist/lib/playroom/snippets/TextDropdown.mjs +3 -3
- package/dist/lib/playroom/snippets/TextField.cjs +8 -8
- package/dist/lib/playroom/snippets/TextField.mjs +8 -8
- package/dist/lib/playroom/snippets/TextLink.cjs +3 -3
- package/dist/lib/playroom/snippets/TextLink.mjs +3 -3
- package/dist/lib/playroom/snippets/Textarea.cjs +10 -10
- package/dist/lib/playroom/snippets/Textarea.mjs +10 -10
- package/dist/lib/playroom/snippets/Tiles.cjs +2 -2
- package/dist/lib/playroom/snippets/Tiles.mjs +2 -2
- package/dist/lib/playroom/snippets/Toggle.cjs +5 -5
- package/dist/lib/playroom/snippets/Toggle.mjs +5 -5
- package/dist/lib/playroom/snippets/TooltipRenderer.cjs +1 -1
- package/dist/lib/playroom/snippets/TooltipRenderer.mjs +1 -1
- package/dist/lib/playroom/snippets/blocks.cjs +59 -0
- package/dist/lib/playroom/snippets/blocks.mjs +58 -0
- package/dist/lib/playroom/snippets/layouts.cjs +22 -0
- package/dist/lib/playroom/snippets/layouts.mjs +21 -0
- package/dist/lib/playroom/snippets.cjs +22 -5
- package/dist/lib/playroom/snippets.d.cts +2 -6
- package/dist/lib/playroom/snippets.d.mts +2 -6
- package/dist/lib/playroom/snippets.mjs +22 -5
- package/dist/lib/playroom/useScope.d.mts +0 -1
- package/dist/lib/utils/align.d.mts +0 -2
- package/dist/playroom/components.cjs +4 -4
- package/dist/playroom/components.d.cts +2 -2
- package/dist/playroom/components.d.mts +2 -2
- package/dist/playroom/components.mjs +2 -2
- package/dist/playroom/frameSettings.cjs +15 -0
- package/dist/playroom/frameSettings.d.cts +8 -0
- package/dist/playroom/frameSettings.d.mts +8 -0
- package/dist/playroom/frameSettings.mjs +13 -0
- package/dist/playroom/snippets.d.cts +2 -2
- package/dist/playroom/snippets.d.mts +2 -2
- package/dist/playroom/snippets.mjs +2 -2
- package/dist/reset.d.mts +1 -1
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 34.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- playroom: Add "layout" and "block" recipes to snippets ([#2009](https://github.com/seek-oss/braid-design-system/pull/2009))
|
|
8
|
+
|
|
9
|
+
- playroom: Add support for frameSettings ([#2006](https://github.com/seek-oss/braid-design-system/pull/2006))
|
|
10
|
+
|
|
11
|
+
Introduce new `frameSettings` for Playroom to configure frame options for specific frames.
|
|
12
|
+
|
|
13
|
+
Settings added:
|
|
14
|
+
- **Stack Debug**: Show highlight overlays of stack spacing to help review spacing and layout.
|
|
15
|
+
- **Dark Mode**: Switch the colour mode to dark mode (only used by pages embedded in native apps currently).
|
|
16
|
+
|
|
17
|
+
## 34.0.3
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- **Textarea:** Add support for automatic shrinking height with the `grow` prop (`true` by default). ([#2000](https://github.com/seek-oss/braid-design-system/pull/2000))
|
|
22
|
+
|
|
23
|
+
Automatically shrink and grow height with content when using the `grow` prop.
|
|
24
|
+
|
|
3
25
|
## 34.0.2
|
|
4
26
|
|
|
5
27
|
### Patch 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: () => "
|
|
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 };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { DataAttributeMap } from "../private/buildDataAttributes.mjs";
|
|
2
|
-
import "../Box/Box.mjs";
|
|
3
2
|
import { UseIconProps } from "../../hooks/useIcon/index.mjs";
|
|
4
3
|
import { buttonTones } from "./buttonTones.mjs";
|
|
5
4
|
import * as react from "react";
|
|
6
5
|
import { AllHTMLAttributes, ReactElement, ReactNode } from "react";
|
|
7
|
-
import "react/jsx-runtime";
|
|
8
|
-
|
|
9
6
|
//#region src/lib/components/Button/Button.d.ts
|
|
10
7
|
declare const buttonVariants: readonly ["solid", "ghost", "soft", "transparent"];
|
|
11
8
|
declare const buttonSizes: readonly ["standard", "small"];
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import "../../css/atoms/sprinkles.css.mjs";
|
|
2
|
-
import "../../css/atoms/atoms.mjs";
|
|
3
|
-
import "../../utils/align.mjs";
|
|
4
|
-
import "react";
|
|
5
|
-
|
|
6
1
|
//#region src/lib/components/Columns/ColumnsContext.d.ts
|
|
7
2
|
declare const validColumnsComponents: readonly ["div", "span", "p", "article", "section", "main", "nav", "aside", "ul", "ol", "li"];
|
|
8
3
|
//#endregion
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import "../private/Modal/ModalContent.mjs";
|
|
2
1
|
import { ModalProps } from "../private/Modal/Modal.mjs";
|
|
3
2
|
import { FC } from "react";
|
|
4
|
-
import "react/jsx-runtime";
|
|
5
|
-
|
|
6
3
|
//#region src/lib/components/Dialog/Dialog.d.ts
|
|
7
4
|
declare const modalStyle: {
|
|
8
5
|
readonly position: "center";
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import "../private/Modal/ModalContent.mjs";
|
|
2
1
|
import { ModalProps } from "../private/Modal/Modal.mjs";
|
|
3
2
|
import { FC } from "react";
|
|
4
|
-
import "react/jsx-runtime";
|
|
5
|
-
|
|
6
3
|
//#region src/lib/components/Drawer/Drawer.d.ts
|
|
7
4
|
declare const validWidths: readonly ["small", "medium", "large"];
|
|
8
5
|
declare const validPositions: readonly ["left", "right"];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_Hidden = require('./Hidden.cjs');
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
|
|
5
|
+
//#region src/lib/components/Hidden/Hidden.playroom.tsx
|
|
6
|
+
const Hidden = ({ ...restProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Hidden.Hidden, { ...restProps });
|
|
7
|
+
Hidden.__isHidden__ = true;
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.Hidden = Hidden;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Hidden as Hidden$1 } from "./Hidden.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/components/Hidden/Hidden.playroom.tsx
|
|
5
|
+
const Hidden = ({ ...restProps }) => /* @__PURE__ */ jsx(Hidden$1, { ...restProps });
|
|
6
|
+
Hidden.__isHidden__ = true;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Hidden };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_HiddenVisually = require('./HiddenVisually.cjs');
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
|
|
5
|
+
//#region src/lib/components/HiddenVisually/HiddenVisually.playroom.tsx
|
|
6
|
+
const HiddenVisually = ({ ...restProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_HiddenVisually.HiddenVisually, { ...restProps });
|
|
7
|
+
HiddenVisually.__isHiddenVisually__ = true;
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.HiddenVisually = HiddenVisually;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HiddenVisually as HiddenVisually$1 } from "./HiddenVisually.cjs";
|
|
2
|
+
import { ComponentProps, FC } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/components/HiddenVisually/HiddenVisually.playroom.d.ts
|
|
5
|
+
declare const HiddenVisually: FC<ComponentProps<typeof HiddenVisually$1>>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { HiddenVisually };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HiddenVisually as HiddenVisually$1 } from "./HiddenVisually.mjs";
|
|
2
|
+
import { ComponentProps, FC } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/components/HiddenVisually/HiddenVisually.playroom.d.ts
|
|
5
|
+
declare const HiddenVisually: FC<ComponentProps<typeof HiddenVisually$1>>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { HiddenVisually };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HiddenVisually as HiddenVisually$1 } from "./HiddenVisually.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/components/HiddenVisually/HiddenVisually.playroom.tsx
|
|
5
|
+
const HiddenVisually = ({ ...restProps }) => /* @__PURE__ */ jsx(HiddenVisually$1, { ...restProps });
|
|
6
|
+
HiddenVisually.__isHiddenVisually__ = true;
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { HiddenVisually };
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { DataAttributeMap } from "../private/buildDataAttributes.mjs";
|
|
2
|
-
import "../Box/Box.mjs";
|
|
3
2
|
import { BadgeProps } from "../Badge/Badge.mjs";
|
|
4
3
|
import { ReactElement, ReactNode } from "react";
|
|
5
|
-
import "react/jsx-runtime";
|
|
6
|
-
|
|
7
4
|
//#region src/lib/components/MenuItem/useMenuItem.d.ts
|
|
8
5
|
type MenuItemTone = 'critical' | undefined;
|
|
9
6
|
interface UseMenuItemProps {
|
|
@@ -3,8 +3,6 @@ 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
|
-
import "react/jsx-runtime";
|
|
7
|
-
|
|
8
6
|
//#region src/lib/components/MenuRenderer/MenuRenderer.d.ts
|
|
9
7
|
interface TriggerProps {
|
|
10
8
|
'aria-haspopup': boolean;
|
|
@@ -1,14 +1,61 @@
|
|
|
1
1
|
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_BreakpointContext = require('../BraidProvider/BreakpointContext.cjs');
|
|
3
|
+
const require_sprinkles_css = require('../../css/atoms/sprinkles.css.cjs');
|
|
4
|
+
const require_flattenChildren = require('../../utils/flattenChildren.cjs');
|
|
2
5
|
const require_Stack = require('./Stack.cjs');
|
|
6
|
+
const require_resolveResponsiveRangeProps = require('../../utils/resolveResponsiveRangeProps.cjs');
|
|
3
7
|
const require_cleanSpaceValue = require('../../playroom/cleanSpaceValue.cjs');
|
|
8
|
+
const require_SpaceDebugContext = require('../../playroom/SpaceDebugContext.cjs');
|
|
9
|
+
const require_DebugSpace = require('../../playroom/components/DebugSpace/DebugSpace.cjs');
|
|
10
|
+
let react = require("react");
|
|
4
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
12
|
|
|
6
13
|
//#region src/lib/components/Stack/Stack.playroom.tsx
|
|
7
|
-
const Stack = ({ space, align, ...restProps }) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
const Stack = ({ space, align, children, ...restProps }) => {
|
|
15
|
+
const debug = (0, react.useContext)(require_SpaceDebugContext.default);
|
|
16
|
+
const breakpointName = (0, react.useContext)(require_BreakpointContext.breakpointContext) ?? "mobile";
|
|
17
|
+
const c = (0, react.useMemo)(() => debug ? react.Children.toArray(require_flattenChildren.default(children)).filter((child) => {
|
|
18
|
+
if (child && (0, react.isValidElement)(child)) {
|
|
19
|
+
if (child.type.__isBox__) {
|
|
20
|
+
const { display } = child.props;
|
|
21
|
+
if (!display) return true;
|
|
22
|
+
const { mobile, tablet = mobile, desktop = tablet, wide = desktop } = require_sprinkles_css.normalizeResponsiveValue(display);
|
|
23
|
+
return {
|
|
24
|
+
mobile: mobile !== "none",
|
|
25
|
+
tablet: tablet !== "none",
|
|
26
|
+
desktop: desktop !== "none",
|
|
27
|
+
wide: wide !== "none"
|
|
28
|
+
}[breakpointName];
|
|
29
|
+
}
|
|
30
|
+
if (child.type.__isHidden__) {
|
|
31
|
+
const { above, below } = child.props;
|
|
32
|
+
const [hiddenOnMobile, hiddenOnTablet, hiddenOnDesktop, hiddenOnWide] = require_resolveResponsiveRangeProps.resolveResponsiveRangeProps({
|
|
33
|
+
above,
|
|
34
|
+
below
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
mobile: !hiddenOnMobile,
|
|
38
|
+
tablet: !hiddenOnTablet,
|
|
39
|
+
desktop: !hiddenOnDesktop,
|
|
40
|
+
wide: !hiddenOnWide
|
|
41
|
+
}[breakpointName];
|
|
42
|
+
}
|
|
43
|
+
if (child.type.__isHiddenVisually__) return false;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
}).map((child, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [debug && index > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DebugSpace.DebugSpace, { space }) : null, child] }, index)) : children, [
|
|
47
|
+
debug,
|
|
48
|
+
children,
|
|
49
|
+
breakpointName,
|
|
50
|
+
space
|
|
51
|
+
]);
|
|
52
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Stack.Stack, {
|
|
53
|
+
space: debug ? "none" : require_cleanSpaceValue.cleanSpaceValue(space) || "none",
|
|
54
|
+
align: typeof align !== "boolean" ? align : void 0,
|
|
55
|
+
...restProps,
|
|
56
|
+
children: debug ? c : children
|
|
57
|
+
});
|
|
58
|
+
};
|
|
12
59
|
|
|
13
60
|
//#endregion
|
|
14
61
|
exports.Stack = Stack;
|
|
@@ -1,13 +1,60 @@
|
|
|
1
|
+
import { breakpointContext } from "../BraidProvider/BreakpointContext.mjs";
|
|
2
|
+
import { normalizeResponsiveValue } from "../../css/atoms/sprinkles.css.mjs";
|
|
3
|
+
import flattenChildren from "../../utils/flattenChildren.mjs";
|
|
1
4
|
import { Stack as Stack$1 } from "./Stack.mjs";
|
|
5
|
+
import { resolveResponsiveRangeProps } from "../../utils/resolveResponsiveRangeProps.mjs";
|
|
2
6
|
import { cleanSpaceValue } from "../../playroom/cleanSpaceValue.mjs";
|
|
3
|
-
import
|
|
7
|
+
import SpaceDebugContext_default from "../../playroom/SpaceDebugContext.mjs";
|
|
8
|
+
import { DebugSpace } from "../../playroom/components/DebugSpace/DebugSpace.mjs";
|
|
9
|
+
import { Children, Fragment, isValidElement, useContext, useMemo } from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
11
|
|
|
5
12
|
//#region src/lib/components/Stack/Stack.playroom.tsx
|
|
6
|
-
const Stack = ({ space, align, ...restProps }) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
const Stack = ({ space, align, children, ...restProps }) => {
|
|
14
|
+
const debug = useContext(SpaceDebugContext_default);
|
|
15
|
+
const breakpointName = useContext(breakpointContext) ?? "mobile";
|
|
16
|
+
const c = useMemo(() => debug ? Children.toArray(flattenChildren(children)).filter((child) => {
|
|
17
|
+
if (child && isValidElement(child)) {
|
|
18
|
+
if (child.type.__isBox__) {
|
|
19
|
+
const { display } = child.props;
|
|
20
|
+
if (!display) return true;
|
|
21
|
+
const { mobile, tablet = mobile, desktop = tablet, wide = desktop } = normalizeResponsiveValue(display);
|
|
22
|
+
return {
|
|
23
|
+
mobile: mobile !== "none",
|
|
24
|
+
tablet: tablet !== "none",
|
|
25
|
+
desktop: desktop !== "none",
|
|
26
|
+
wide: wide !== "none"
|
|
27
|
+
}[breakpointName];
|
|
28
|
+
}
|
|
29
|
+
if (child.type.__isHidden__) {
|
|
30
|
+
const { above, below } = child.props;
|
|
31
|
+
const [hiddenOnMobile, hiddenOnTablet, hiddenOnDesktop, hiddenOnWide] = resolveResponsiveRangeProps({
|
|
32
|
+
above,
|
|
33
|
+
below
|
|
34
|
+
});
|
|
35
|
+
return {
|
|
36
|
+
mobile: !hiddenOnMobile,
|
|
37
|
+
tablet: !hiddenOnTablet,
|
|
38
|
+
desktop: !hiddenOnDesktop,
|
|
39
|
+
wide: !hiddenOnWide
|
|
40
|
+
}[breakpointName];
|
|
41
|
+
}
|
|
42
|
+
if (child.type.__isHiddenVisually__) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}).map((child, index) => /* @__PURE__ */ jsxs(Fragment, { children: [debug && index > 0 ? /* @__PURE__ */ jsx(DebugSpace, { space }) : null, child] }, index)) : children, [
|
|
46
|
+
debug,
|
|
47
|
+
children,
|
|
48
|
+
breakpointName,
|
|
49
|
+
space
|
|
50
|
+
]);
|
|
51
|
+
return /* @__PURE__ */ jsx(Stack$1, {
|
|
52
|
+
space: debug ? "none" : cleanSpaceValue(space) || "none",
|
|
53
|
+
align: typeof align !== "boolean" ? align : void 0,
|
|
54
|
+
...restProps,
|
|
55
|
+
children: debug ? c : children
|
|
56
|
+
});
|
|
57
|
+
};
|
|
11
58
|
|
|
12
59
|
//#endregion
|
|
13
60
|
export { Stack };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { tone as tone$1 } from "./Stepper.css.mjs";
|
|
2
2
|
import { KeyboardEvent, ReactNode } from "react";
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
|
|
5
3
|
//#region src/lib/components/Stepper/StepperContext.d.ts
|
|
6
4
|
type StepperMode = 'linear' | 'non-linear';
|
|
7
5
|
type StepperTone = Exclude<keyof typeof tone$1, 'formAccent'>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import "../../themes/tokenType.mjs";
|
|
2
1
|
import { DataAttributeMap } from "../private/buildDataAttributes.mjs";
|
|
3
2
|
import { TextProps } from "../Text/Text.mjs";
|
|
4
3
|
import { BadgeProps } from "../Badge/Badge.mjs";
|
|
5
|
-
import "./TabListContext.mjs";
|
|
6
4
|
import { FC, ReactElement, ReactNode } from "react";
|
|
7
5
|
|
|
8
6
|
//#region src/lib/components/Tabs/Tab.d.ts
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import "../../css/atoms/atoms.mjs";
|
|
2
1
|
import { LinkComponentProps } from "../BraidProvider/BraidProvider.mjs";
|
|
3
2
|
import { DataAttributeMap } from "../private/buildDataAttributes.mjs";
|
|
4
3
|
import { UseIconProps } from "../../hooks/useIcon/index.mjs";
|
|
5
4
|
import * as react from "react";
|
|
6
5
|
import { ReactElement } from "react";
|
|
7
|
-
import "react/jsx-runtime";
|
|
8
|
-
|
|
9
6
|
//#region src/lib/components/TextLink/TextLink.d.ts
|
|
10
7
|
interface TextLinkStyles {
|
|
11
8
|
weight?: 'regular' | 'weak';
|
|
@@ -11,11 +11,17 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
11
11
|
const pxToInt = (str) => typeof str === "string" ? parseInt(str.replace("px", ""), 10) : 0;
|
|
12
12
|
const calculateLines = (target, lines, lineLimit) => {
|
|
13
13
|
const { paddingBottom, paddingTop, lineHeight } = window.getComputedStyle(target);
|
|
14
|
-
|
|
14
|
+
const lineHeightCannotBeAccuratelyCalculated = !lineHeight.endsWith("px");
|
|
15
|
+
const heightSetByUser = Boolean(target.style.height);
|
|
16
|
+
if (lineHeightCannotBeAccuratelyCalculated || heightSetByUser) return lines;
|
|
15
17
|
const padding = pxToInt(paddingTop) + pxToInt(paddingBottom);
|
|
16
|
-
|
|
18
|
+
target.style.height = "0";
|
|
19
|
+
const scrollHeight = target.scrollHeight;
|
|
20
|
+
target.style.height = "";
|
|
21
|
+
const currentRows = Math.floor((scrollHeight - padding) / pxToInt(lineHeight));
|
|
17
22
|
if (target && target.value === "") return lines;
|
|
18
|
-
|
|
23
|
+
const linesWithLimitApplied = typeof lineLimit === "number" ? Math.min(currentRows, lineLimit) : currentRows;
|
|
24
|
+
return Math.max(linesWithLimitApplied, lines);
|
|
19
25
|
};
|
|
20
26
|
const Textarea = (0, react.forwardRef)(({ value, onChange, onBlur, onFocus, onPaste, placeholder, characterLimit, highlightRanges: highlightRangesProp = [], lines = 3, lineLimit, grow = true, tone, spellCheck, ...restProps }, ref) => {
|
|
21
27
|
const [rows, setRows] = (0, react.useState)(lines);
|
|
@@ -10,11 +10,17 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
const pxToInt = (str) => typeof str === "string" ? parseInt(str.replace("px", ""), 10) : 0;
|
|
11
11
|
const calculateLines = (target, lines, lineLimit) => {
|
|
12
12
|
const { paddingBottom, paddingTop, lineHeight } = window.getComputedStyle(target);
|
|
13
|
-
|
|
13
|
+
const lineHeightCannotBeAccuratelyCalculated = !lineHeight.endsWith("px");
|
|
14
|
+
const heightSetByUser = Boolean(target.style.height);
|
|
15
|
+
if (lineHeightCannotBeAccuratelyCalculated || heightSetByUser) return lines;
|
|
14
16
|
const padding = pxToInt(paddingTop) + pxToInt(paddingBottom);
|
|
15
|
-
|
|
17
|
+
target.style.height = "0";
|
|
18
|
+
const scrollHeight = target.scrollHeight;
|
|
19
|
+
target.style.height = "";
|
|
20
|
+
const currentRows = Math.floor((scrollHeight - padding) / pxToInt(lineHeight));
|
|
16
21
|
if (target && target.value === "") return lines;
|
|
17
|
-
|
|
22
|
+
const linesWithLimitApplied = typeof lineLimit === "number" ? Math.min(currentRows, lineLimit) : currentRows;
|
|
23
|
+
return Math.max(linesWithLimitApplied, lines);
|
|
18
24
|
};
|
|
19
25
|
const Textarea = forwardRef(({ value, onChange, onBlur, onFocus, onPaste, placeholder, characterLimit, highlightRanges: highlightRangesProp = [], lines = 3, lineLimit, grow = true, tone, spellCheck, ...restProps }, ref) => {
|
|
20
26
|
const [rows, setRows] = useState(lines);
|
|
@@ -1,8 +1,6 @@
|
|
|
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
|
-
import "react/jsx-runtime";
|
|
5
|
-
|
|
6
4
|
//#region src/lib/components/TooltipRenderer/TooltipRenderer.d.ts
|
|
7
5
|
interface TriggerProps {
|
|
8
6
|
ref: RefCallback<HTMLElement>;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import "../Box/Box.mjs";
|
|
2
1
|
import { UseIconProps } from "../../hooks/useIcon/index.mjs";
|
|
3
2
|
import { ReactElement } from "react";
|
|
4
|
-
import "react/jsx-runtime";
|
|
5
|
-
|
|
6
3
|
//#region src/lib/components/icons/IconContainer.d.ts
|
|
7
4
|
type IconContainerProps = UseIconProps;
|
|
8
5
|
//#endregion
|
|
@@ -192,8 +192,6 @@ import { IconVisibility } from "./icons/IconVisibility/IconVisibility.mjs";
|
|
|
192
192
|
import { IconWorkExperience } from "./icons/IconWorkExperience/IconWorkExperience.mjs";
|
|
193
193
|
import { IconZoomIn } from "./icons/IconZoomIn/IconZoomIn.mjs";
|
|
194
194
|
import { IconZoomOut } from "./icons/IconZoomOut/IconZoomOut.mjs";
|
|
195
|
-
import "./icons/index.mjs";
|
|
196
|
-
|
|
197
195
|
//#region src/lib/components/index.d.ts
|
|
198
196
|
type LinkComponent = LinkComponent$1;
|
|
199
197
|
//#endregion
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { DataAttributeMap } from "../buildDataAttributes.mjs";
|
|
2
|
-
import "../../Box/Box.mjs";
|
|
3
2
|
import { FieldLabelProps } from "../../FieldLabel/FieldLabel.mjs";
|
|
4
3
|
import { FieldMessageProps } from "../../FieldMessage/FieldMessage.mjs";
|
|
5
4
|
import { AllHTMLAttributes, ReactNode } from "react";
|
|
6
|
-
import "react/jsx-runtime";
|
|
7
|
-
|
|
8
5
|
//#region src/lib/components/private/Field/Field.d.ts
|
|
9
6
|
type FormElementProps = AllHTMLAttributes<HTMLFormElement>;
|
|
10
7
|
type FieldLabelVariant = {
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import "../ReactNodeNoStrings.mjs";
|
|
2
1
|
import { DataAttributeMap } from "../buildDataAttributes.mjs";
|
|
3
2
|
import { FieldLabelProps } from "../../FieldLabel/FieldLabel.mjs";
|
|
4
3
|
import { FieldMessageProps } from "../../FieldMessage/FieldMessage.mjs";
|
|
5
|
-
import "../../Stack/Stack.mjs";
|
|
6
4
|
import { AllHTMLAttributes } from "react";
|
|
7
|
-
import "react/jsx-runtime";
|
|
8
|
-
|
|
9
5
|
//#region src/lib/components/private/FieldGroup/FieldGroup.d.ts
|
|
10
6
|
type FormElementProps = AllHTMLAttributes<HTMLFormElement>;
|
|
11
7
|
type FieldLabelVariant = {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { ModalContentProps } from "./ModalContent.mjs";
|
|
2
|
-
import "react";
|
|
3
|
-
import "react/jsx-runtime";
|
|
4
|
-
|
|
5
2
|
//#region src/lib/components/private/Modal/Modal.d.ts
|
|
6
3
|
interface ModalProps extends Omit<ModalContentProps, 'onClose' | 'scrollLock' | 'headingRef' | 'modalRef'> {
|
|
7
4
|
open: boolean;
|
|
@@ -2,8 +2,6 @@ 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
|
-
import "react/jsx-runtime";
|
|
6
|
-
|
|
7
5
|
//#region src/lib/components/private/Modal/ModalContent.d.ts
|
|
8
6
|
interface ModalContentProps {
|
|
9
7
|
id?: string;
|
|
@@ -2,8 +2,6 @@ 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
|
-
import "react/jsx-runtime";
|
|
6
|
-
|
|
7
5
|
//#region src/lib/components/private/Typography/Typography.d.ts
|
|
8
6
|
interface TypographyProps extends Pick<BoxProps, 'id' | 'component'> {
|
|
9
7
|
children?: ReactNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DataAttributeMap } from "../../components/private/buildDataAttributes.mjs";
|
|
2
|
-
import "../../components/Box/Box.mjs";
|
|
3
2
|
import { textSizeUntrimmed, tone as tone$1 } from "../../css/typography.css.mjs";
|
|
4
3
|
import { OptionalTitle } from "../../components/icons/SVGTypes.mjs";
|
|
5
4
|
|
|
@@ -4,6 +4,7 @@ const require_BraidProvider = require('../components/BraidProvider/BraidProvider
|
|
|
4
4
|
const require_useResponsiveValue = require('../components/useResponsiveValue/useResponsiveValue.cjs');
|
|
5
5
|
const require_ToastContext = require('../components/useToast/ToastContext.cjs');
|
|
6
6
|
const require_playroomState = require('./playroomState.cjs');
|
|
7
|
+
const require_SpaceDebugContext = require('./SpaceDebugContext.cjs');
|
|
7
8
|
let react = require("react");
|
|
8
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
10
|
|
|
@@ -20,34 +21,21 @@ const PlayroomLink = require_BraidProvider.makeLinkComponent(({ href, onClick, .
|
|
|
20
21
|
const ResponsiveReady = ({ children }) => {
|
|
21
22
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: require_useResponsiveValue.useResponsiveValue()({ mobile: true }) ?? false ? children : null });
|
|
22
23
|
};
|
|
23
|
-
var FrameComponent_default = ({ theme, children }) => {
|
|
24
|
+
var FrameComponent_default = ({ theme, children, frameSettings }) => {
|
|
25
|
+
const stackDebug = (0, react.useMemo)(() => frameSettings.stackDebug, [frameSettings.stackDebug]);
|
|
26
|
+
const darkMode$1 = (0, react.useMemo)(() => frameSettings.darkMode, [frameSettings.darkMode]);
|
|
24
27
|
(0, react.useEffect)(() => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
document.documentElement.classList.remove(require_sprinkles_css.darkMode);
|
|
37
|
-
code = "";
|
|
38
|
-
}
|
|
39
|
-
if (code.length > longestTrigger) code = code.substr(code.length - longestTrigger);
|
|
40
|
-
};
|
|
41
|
-
window.addEventListener("keydown", colorModeToggle);
|
|
42
|
-
return () => {
|
|
43
|
-
window.removeEventListener("keydown", colorModeToggle);
|
|
44
|
-
};
|
|
45
|
-
}, []);
|
|
46
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { dangerouslySetInnerHTML: { __html: theme.webFonts.map((font) => font.linkTag).join("") } }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_playroomState.PlayroomStateProvider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_BraidProvider.BraidProvider, {
|
|
47
|
-
theme,
|
|
48
|
-
linkComponent: PlayroomLink,
|
|
49
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ToastContext.ToastProvider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResponsiveReady, { children }) })
|
|
50
|
-
}) })] });
|
|
28
|
+
if (darkMode$1) document.documentElement.classList.add(require_sprinkles_css.darkMode);
|
|
29
|
+
else document.documentElement.classList.remove(require_sprinkles_css.darkMode);
|
|
30
|
+
}, [darkMode$1]);
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_SpaceDebugContext.default.Provider, {
|
|
32
|
+
value: stackDebug,
|
|
33
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { dangerouslySetInnerHTML: { __html: theme.webFonts.map((font) => font.linkTag).join("") } }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_playroomState.PlayroomStateProvider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_BraidProvider.BraidProvider, {
|
|
34
|
+
theme,
|
|
35
|
+
linkComponent: PlayroomLink,
|
|
36
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ToastContext.ToastProvider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResponsiveReady, { children }) })
|
|
37
|
+
}) })]
|
|
38
|
+
});
|
|
51
39
|
};
|
|
52
40
|
|
|
53
41
|
//#endregion
|