braid-design-system 32.1.0 → 32.2.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 +133 -0
- package/codemod/dist/wrapper.js +181 -183
- package/color-mode/query-param/index.d.ts +1 -0
- package/color-mode/query-param/package.json +1 -1
- package/css/index.d.ts +1 -0
- package/css/package.json +1 -1
- package/dist/ToastContext.chunk.cjs +21 -21
- package/dist/ToastContext.chunk.mjs +120 -120
- package/dist/Toggle.chunk.cjs +22 -32
- package/dist/Toggle.chunk.mjs +199 -209
- package/dist/color-mode/query-param.mjs +1 -1
- package/dist/css.d.ts +1 -667
- package/dist/css.mjs +7 -7
- package/dist/index.d.ts +1 -3952
- package/dist/index.mjs +164 -164
- package/dist/playroom/FrameComponent.d.ts +1 -323
- package/dist/playroom/FrameComponent.mjs +4 -4
- package/dist/playroom/components.d.ts +1 -4027
- package/dist/playroom/components.mjs +124 -124
- package/dist/playroom/scope.d.ts +1 -385
- package/dist/playroom/scope.mjs +4 -4
- package/dist/playroom/snippets.d.ts +1 -7
- package/dist/playroomState.chunk.cjs +1 -1
- package/dist/playroomState.chunk.mjs +3 -3
- package/dist/reset.d.ts +5075 -1
- package/dist/side-effects/lib/components/BraidProvider/BraidProvider.mjs +12 -12
- package/dist/side-effects/lib/css/reset/index.mjs +1 -1
- package/dist/side-effects/lib/css/reset/resetTracker.mjs +2 -2
- package/dist/side-effects/lib/themes/baseTokens/apac.cjs +8 -9
- package/dist/side-effects/lib/themes/baseTokens/apac.mjs +8 -10
- package/dist/side-effects/lib/themes/index.mjs +5 -5
- package/dist/side-effects/lib/themes/makeRuntimeTokens.cjs +4 -10
- package/dist/side-effects/lib/themes/makeRuntimeTokens.mjs +5 -10
- package/dist/side-effects/lib/themes/tokenType.cjs +15 -0
- package/dist/side-effects/lib/themes/tokenType.mjs +16 -0
- package/dist/styles/lib/components/Accordion/AccordionItem.css.mjs +3 -3
- package/dist/styles/lib/components/Alert/Alert.css.mjs +3 -3
- package/dist/styles/lib/components/Autosuggest/Autosuggest.css.mjs +6 -6
- package/dist/styles/lib/components/Button/Button.css.cjs +24 -23
- package/dist/styles/lib/components/Button/Button.css.mjs +39 -38
- package/dist/styles/lib/components/ButtonIcon/ButtonIcon.css.mjs +1 -1
- package/dist/styles/lib/components/Column/Column.css.mjs +3 -3
- package/dist/styles/lib/components/ContentBlock/ContentBlock.css.mjs +1 -1
- package/dist/styles/lib/components/Divider/Divider.css.mjs +7 -7
- package/dist/styles/lib/components/Dropdown/Dropdown.css.mjs +2 -2
- package/dist/styles/lib/components/Hidden/Hidden.css.mjs +1 -1
- package/dist/styles/lib/components/HiddenVisually/HiddenVisually.css.mjs +1 -1
- package/dist/styles/lib/components/List/List.css.mjs +4 -4
- package/dist/styles/lib/components/Loader/Loader.css.mjs +7 -7
- package/dist/styles/lib/components/MenuItem/useMenuItem.css.mjs +1 -1
- package/dist/styles/lib/components/MenuRenderer/MenuRenderer.css.mjs +5 -5
- package/dist/styles/lib/components/MonthPicker/MonthPicker.css.mjs +1 -1
- package/dist/styles/lib/components/OverflowMenu/OverflowMenu.css.mjs +1 -1
- package/dist/styles/lib/components/Pagination/Pagination.css.mjs +6 -6
- package/dist/styles/lib/components/Rating/Rating.css.mjs +6 -6
- package/dist/styles/lib/components/Stepper/Stepper.css.mjs +21 -21
- package/dist/styles/lib/components/Tabs/Tabs.css.mjs +17 -17
- package/dist/styles/lib/components/Tag/Tag.css.mjs +1 -1
- package/dist/styles/lib/components/TextDropdown/TextDropdown.css.mjs +4 -4
- package/dist/styles/lib/components/TextLink/TextLink.css.mjs +8 -8
- package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.mjs +1 -1
- package/dist/styles/lib/components/Textarea/Textarea.css.mjs +3 -3
- package/dist/styles/lib/components/Tiles/Tiles.css.mjs +5 -5
- package/dist/styles/lib/components/Toggle/Toggle.css.mjs +20 -20
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.cjs +1 -5
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs +7 -11
- package/dist/styles/lib/components/icons/IconArrow/IconArrow.css.mjs +4 -4
- package/dist/styles/lib/components/icons/IconChevron/IconChevron.css.mjs +4 -4
- package/dist/styles/lib/components/icons/IconThumb/IconThumb.css.mjs +2 -2
- package/dist/styles/lib/components/private/AvoidWidowIcon/AvoidWidowIcon.css.mjs +1 -1
- package/dist/styles/lib/components/private/Field/Field.css.mjs +8 -8
- package/dist/styles/lib/components/private/InlineField/InlineField.css.mjs +17 -17
- package/dist/styles/lib/components/private/Keyline/Keyline.css.cjs +4 -0
- package/dist/styles/lib/components/private/Keyline/Keyline.css.mjs +11 -7
- package/dist/styles/lib/components/private/Modal/Modal.css.mjs +16 -16
- package/dist/styles/lib/components/private/Modal/ModalExternalGutter.mjs +1 -1
- package/dist/styles/lib/components/private/Placeholder/Placeholder.css.mjs +6 -6
- package/dist/styles/lib/components/private/Truncate/Truncate.css.mjs +1 -1
- package/dist/styles/lib/components/private/hideFocusRings/hideFocusRings.css.mjs +2 -2
- package/dist/styles/lib/components/private/hideFocusRings/hideFocusRingsDataAttribute.mjs +1 -1
- package/dist/styles/lib/components/private/touchable/debugTouchable.mjs +1 -1
- package/dist/styles/lib/components/private/touchable/hitArea.mjs +1 -1
- package/dist/styles/lib/components/private/touchable/virtualTouchable.css.mjs +4 -4
- package/dist/styles/lib/components/private/touchable/virtualTouchableRules.mjs +2 -2
- package/dist/styles/lib/components/useToast/Toast.css.mjs +1 -1
- package/dist/styles/lib/css/atoms/atomicProperties.mjs +6 -6
- package/dist/styles/lib/css/atoms/atoms.mjs +3 -3
- package/dist/styles/lib/css/atoms/sprinkles.css.mjs +8 -8
- package/dist/styles/lib/css/breakpoints.mjs +2 -2
- package/dist/styles/lib/css/colorModeStyle.mjs +2 -2
- package/dist/styles/lib/css/lineHeightContainer.css.mjs +3 -3
- package/dist/styles/lib/css/negativeMargin/negativeMargin.css.cjs +4 -9
- package/dist/styles/lib/css/negativeMargin/negativeMargin.css.mjs +3 -8
- package/dist/styles/lib/css/reset/reset.css.mjs +3 -3
- package/dist/styles/lib/css/responsiveStyle.cjs +2 -2
- package/dist/styles/lib/css/responsiveStyle.mjs +3 -3
- package/dist/styles/lib/css/textAlignedToIcon.css.mjs +3 -3
- package/dist/styles/lib/css/typography.css.cjs +1 -16
- package/dist/styles/lib/css/typography.css.mjs +5 -20
- package/dist/styles/lib/hooks/useIcon/icon.css.mjs +8 -8
- package/dist/styles/lib/themes/apac/apacTheme.css.mjs +3 -3
- package/dist/styles/lib/themes/apac/tokens.mjs +2 -2
- package/dist/styles/lib/themes/docs/docsTheme.css.mjs +3 -3
- package/dist/styles/lib/themes/docs/tokens.cjs +8 -8
- package/dist/styles/lib/themes/docs/tokens.mjs +8 -10
- package/dist/styles/lib/themes/makeBraidTheme.mjs +4 -4
- package/dist/styles/lib/themes/makeVanillaTheme.cjs +23 -10
- package/dist/styles/lib/themes/makeVanillaTheme.mjs +23 -10
- package/dist/styles/lib/themes/seekBusiness/seekBusinessTheme.css.mjs +3 -3
- package/dist/styles/lib/themes/seekBusiness/tokens.mjs +2 -2
- package/dist/styles/lib/themes/vars.css.mjs +3 -3
- package/dist/styles/lib/themes/wireframe/tokens.cjs +25 -29
- package/dist/styles/lib/themes/wireframe/tokens.mjs +25 -31
- package/dist/styles/lib/themes/wireframe/wireframeTheme.css.mjs +3 -3
- package/dist/styles/lib/utils/index.mjs +6 -6
- package/dist/test.d.ts +1 -890
- package/dist/test.mjs +2 -2
- package/dist/themes/apac.d.ts +1 -137
- package/dist/themes/apac.mjs +2 -2
- package/dist/themes/docs.d.ts +1 -137
- package/dist/themes/docs.mjs +2 -2
- package/dist/themes/seekBusiness.d.ts +1 -137
- package/dist/themes/seekBusiness.mjs +2 -2
- package/dist/themes/wireframe.d.ts +1 -137
- package/dist/themes/wireframe.mjs +2 -2
- package/package.json +4 -3
- package/playroom/FrameComponent/index.d.ts +2 -0
- package/playroom/FrameComponent/package.json +1 -1
- package/playroom/components/index.d.ts +1 -0
- package/playroom/components/package.json +1 -1
- package/playroom/scope/index.d.ts +2 -0
- package/playroom/scope/package.json +1 -1
- package/playroom/snippets/index.d.ts +2 -0
- package/playroom/snippets/package.json +1 -1
- package/reset/index.d.ts +1 -0
- package/reset/package.json +1 -1
- package/test/index.d.ts +1 -0
- package/test/package.json +1 -1
- package/themes/apac/index.d.ts +2 -0
- package/themes/apac/package.json +1 -1
- package/themes/docs/index.d.ts +2 -0
- package/themes/docs/package.json +1 -1
- package/themes/seekBusiness/index.d.ts +2 -0
- package/themes/seekBusiness/package.json +1 -1
- package/themes/wireframe/index.d.ts +2 -0
- package/themes/wireframe/package.json +1 -1
- package/dist/styles/lib/components/Badge/Badge.css.cjs +0 -27
- package/dist/styles/lib/components/Badge/Badge.css.mjs +0 -28
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../dist/color-mode/query-param";
|
package/css/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../dist/css";
|
package/css/package.json
CHANGED
|
@@ -462,14 +462,20 @@ const resolveResponsiveProp = (value, mobileAtoms, tabletAtoms, desktopAtoms, wi
|
|
|
462
462
|
const wideAtom = wideAtoms[wide];
|
|
463
463
|
return clsx__default.default(mobileAtom, tabletAtom, desktopAtom, wideAtom);
|
|
464
464
|
};
|
|
465
|
+
const directionStyles = {
|
|
466
|
+
top: styles_lib_css_negativeMargin_negativeMargin_css_cjs.top,
|
|
467
|
+
right: styles_lib_css_negativeMargin_negativeMargin_css_cjs.right,
|
|
468
|
+
bottom: styles_lib_css_negativeMargin_negativeMargin_css_cjs.bottom,
|
|
469
|
+
left: styles_lib_css_negativeMargin_negativeMargin_css_cjs.left
|
|
470
|
+
};
|
|
465
471
|
const negativeMargin = (direction, space) => space ? clsx__default.default([
|
|
466
472
|
direction === "top" || direction === "bottom" ? styles_lib_css_negativeMargin_negativeMargin_css_cjs.preventCollapsePseudo[direction] : void 0,
|
|
467
473
|
resolveResponsiveProp(
|
|
468
474
|
space,
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
475
|
+
directionStyles[direction].mobile,
|
|
476
|
+
directionStyles[direction].tablet,
|
|
477
|
+
directionStyles[direction].desktop,
|
|
478
|
+
directionStyles[direction].wide
|
|
473
479
|
)
|
|
474
480
|
]) : null;
|
|
475
481
|
const alignToDisplay = {
|
|
@@ -638,7 +644,7 @@ function textStyles({
|
|
|
638
644
|
styles_lib_css_typography_css_cjs.fontFamily,
|
|
639
645
|
styles_lib_css_typography_css_cjs.fontWeight[weight],
|
|
640
646
|
styles_lib_css_typography_css_cjs.tone[tone],
|
|
641
|
-
|
|
647
|
+
(baseline ? styles_lib_css_typography_css_cjs.textSizeTrimmed : styles_lib_css_typography_css_cjs.textSizeUntrimmed)[size]
|
|
642
648
|
];
|
|
643
649
|
}
|
|
644
650
|
const Truncate = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", className: styles_lib_components_private_Truncate_Truncate_css_cjs.truncate, children });
|
|
@@ -1195,8 +1201,8 @@ const Keyline = ({ tone, borderRadius: borderRadius2 }) => {
|
|
|
1195
1201
|
component: "span",
|
|
1196
1202
|
height: "full",
|
|
1197
1203
|
display: "inlineBlock",
|
|
1198
|
-
paddingLeft: "xxsmall",
|
|
1199
1204
|
className: [
|
|
1205
|
+
styles_lib_components_private_Keyline_Keyline_css_cjs.width,
|
|
1200
1206
|
styles_lib_components_private_Keyline_Keyline_css_cjs.tone[tone],
|
|
1201
1207
|
styles_lib_components_private_Keyline_Keyline_css_cjs.lightMode[backgroundLightness.lightMode],
|
|
1202
1208
|
styles_lib_components_private_Keyline_Keyline_css_cjs.darkMode[backgroundLightness.darkMode]
|
|
@@ -1210,7 +1216,7 @@ const boxShadowForVariant = {
|
|
|
1210
1216
|
default: "borderField",
|
|
1211
1217
|
disabled: "borderNeutralLight",
|
|
1212
1218
|
focus: "outlineFocus",
|
|
1213
|
-
|
|
1219
|
+
formAccent: "borderFormAccent",
|
|
1214
1220
|
critical: "borderCritical"
|
|
1215
1221
|
};
|
|
1216
1222
|
const FieldOverlay = ({ variant, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1413,7 +1419,7 @@ const ButtonLoader = () => /* @__PURE__ */ jsxRuntime.jsxs(Box, { "aria-hidden":
|
|
|
1413
1419
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", className: styles_lib_components_Button_Button_css_cjs.loadingDot, children: "." })
|
|
1414
1420
|
] });
|
|
1415
1421
|
const transparentPaddingX = "small";
|
|
1416
|
-
const buttonRadius = "
|
|
1422
|
+
const buttonRadius = "standard";
|
|
1417
1423
|
const ButtonOverlays = ({
|
|
1418
1424
|
variant = "solid",
|
|
1419
1425
|
tone,
|
|
@@ -1480,7 +1486,6 @@ const ButtonText = ({
|
|
|
1480
1486
|
iconPosition = "leading",
|
|
1481
1487
|
variant = "solid",
|
|
1482
1488
|
tone,
|
|
1483
|
-
labelSpacing = true,
|
|
1484
1489
|
bleed
|
|
1485
1490
|
}) => {
|
|
1486
1491
|
const lightness = useBackgroundLightness();
|
|
@@ -1503,9 +1508,8 @@ const ButtonText = ({
|
|
|
1503
1508
|
flexWrap: "wrap",
|
|
1504
1509
|
overflow: "hidden",
|
|
1505
1510
|
pointerEvents: "none",
|
|
1506
|
-
paddingX:
|
|
1507
|
-
|
|
1508
|
-
className: labelSpacing && size === "standard" ? styles_lib_css_typography_css_cjs.touchableText.standard : void 0,
|
|
1511
|
+
paddingX: labelPaddingX,
|
|
1512
|
+
className: styles_lib_components_Button_Button_css_cjs.padToMinHeight,
|
|
1509
1513
|
background: tone === "neutral" && variant !== "solid" ? {
|
|
1510
1514
|
lightMode: lightness.lightMode === "light" ? "customLight" : "customDark",
|
|
1511
1515
|
darkMode: lightness.darkMode === "light" ? "customLight" : "customDark"
|
|
@@ -1515,8 +1519,8 @@ const ButtonText = ({
|
|
|
1515
1519
|
{
|
|
1516
1520
|
tone: stylesForVariant.textTone,
|
|
1517
1521
|
weight: "medium",
|
|
1522
|
+
align: "center",
|
|
1518
1523
|
size,
|
|
1519
|
-
baseline: false,
|
|
1520
1524
|
children: [
|
|
1521
1525
|
icon && iconPosition === "leading" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1522
1526
|
AvoidWidowIcon,
|
|
@@ -1683,7 +1687,7 @@ const TooltipTextDefaultsProvider = ({
|
|
|
1683
1687
|
}
|
|
1684
1688
|
);
|
|
1685
1689
|
};
|
|
1686
|
-
const borderRadius$1 = "
|
|
1690
|
+
const borderRadius$1 = "large";
|
|
1687
1691
|
const TooltipContent = ({
|
|
1688
1692
|
children,
|
|
1689
1693
|
opacity,
|
|
@@ -1702,12 +1706,8 @@ const TooltipContent = ({
|
|
|
1702
1706
|
boxShadow: "large",
|
|
1703
1707
|
background: "customDark",
|
|
1704
1708
|
borderRadius: borderRadius$1,
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.maxWidth,
|
|
1708
|
-
styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.translateZ0,
|
|
1709
|
-
styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.padding
|
|
1710
|
-
],
|
|
1709
|
+
padding: "small",
|
|
1710
|
+
className: [styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.background, styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.maxWidth, styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.translateZ0],
|
|
1711
1711
|
children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipTextDefaultsProvider, { children: [
|
|
1712
1712
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { position: "relative", zIndex: 1, children }),
|
|
1713
1713
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2148,7 +2148,7 @@ const toneToIcon = {
|
|
|
2148
2148
|
positive: IconPositive
|
|
2149
2149
|
};
|
|
2150
2150
|
const toastDuration = 1e4;
|
|
2151
|
-
const borderRadius = "
|
|
2151
|
+
const borderRadius = "large";
|
|
2152
2152
|
const Action = ({ label, onClick, removeToast }) => {
|
|
2153
2153
|
const handleClick = React.useCallback(() => {
|
|
2154
2154
|
removeToast();
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import React, { createContext, useContext, forwardRef, createElement, useEffect, Children, isValidElement, cloneElement, useMemo, useState, useRef, useCallback, useLayoutEffect, Fragment as Fragment$1, useReducer } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useBraidTheme, VanillaThemeContainer, breakpointContext, useLinkComponent } from "./side-effects/lib/components/BraidProvider/BraidProvider.mjs";
|
|
3
|
+
import { breakpointNames } from "./styles/lib/css/breakpoints.mjs";
|
|
4
4
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
5
5
|
import { createPortal } from "react-dom";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import dedent from "dedent";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { base } from "./styles/lib/css/reset/reset.css.mjs";
|
|
9
|
+
import { atoms } from "./styles/lib/css/atoms/atoms.mjs";
|
|
10
|
+
import { mapColorModeValue, sprinkles, mapResponsiveValue, normalizeResponsiveValue } from "./styles/lib/css/atoms/sprinkles.css.mjs";
|
|
11
|
+
import { lightModeTone, darkModeTone, lightModeNeutralOverride, darkModeNeutralOverride, fontFamily, fontWeight, tone, textSizeTrimmed, textSizeUntrimmed } from "./styles/lib/css/typography.css.mjs";
|
|
12
12
|
import assert from "assert";
|
|
13
13
|
import { isFragment } from "react-is";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
14
|
+
import { base as base$1, strong, regular, lightModeWeight, darkModeWeight } from "./styles/lib/components/Divider/Divider.css.mjs";
|
|
15
|
+
import { hiddenOnPrint } from "./styles/lib/components/Hidden/Hidden.css.mjs";
|
|
16
|
+
import { preventCollapsePseudo, top, right, bottom, left } from "./styles/lib/css/negativeMargin/negativeMargin.css.mjs";
|
|
17
|
+
import { column, width, columnContent } from "./styles/lib/components/Column/Column.css.mjs";
|
|
18
|
+
import { marginAuto } from "./styles/lib/components/ContentBlock/ContentBlock.css.mjs";
|
|
19
|
+
import { truncate } from "./styles/lib/components/private/Truncate/Truncate.css.mjs";
|
|
20
|
+
import { nowrap } from "./styles/lib/components/private/AvoidWidowIcon/AvoidWidowIcon.css.mjs";
|
|
21
|
+
import { virtualTouchable as virtualTouchable$1, yAxisOnly } from "./styles/lib/components/private/touchable/virtualTouchable.css.mjs";
|
|
22
|
+
import { weakLink, regularLinkLightMode, regularLinkDarkMode, base as base$2, visitedLightMode, visitedDarkMode } from "./styles/lib/components/TextLink/TextLink.css.mjs";
|
|
23
|
+
import { lineHeightContainer } from "./styles/lib/css/lineHeightContainer.css.mjs";
|
|
24
|
+
import { size, inlineCrop, inline, alignY, cropToTextSize, blockWidths } from "./styles/lib/hooks/useIcon/icon.css.mjs";
|
|
25
|
+
import { hideFocusRingsClassName } from "./styles/lib/components/private/hideFocusRings/hideFocusRings.css.mjs";
|
|
26
|
+
import { focusOverlay, hoverOverlay, invertedBackgroundsLightMode, invertedBackgroundsDarkMode, forceActive, activeOverlay, padToMinHeight, root, standard, small, bleedVerticallyToCapHeight, loadingDot } from "./styles/lib/components/Button/Button.css.mjs";
|
|
27
27
|
import { usePopperTooltip } from "react-popper-tooltip";
|
|
28
28
|
import isMobile from "is-mobile";
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
29
|
+
import { verticalOffsetBeforeEntrance, translateZ0, background, maxWidth, arrow } from "./styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs";
|
|
30
|
+
import { button } from "./styles/lib/components/ButtonIcon/ButtonIcon.css.mjs";
|
|
31
|
+
import { noRadiusOnRight, largestWidth, width as width$1, tone as tone$1, lightMode, darkMode } from "./styles/lib/components/private/Keyline/Keyline.css.mjs";
|
|
32
|
+
import { toast } from "./styles/lib/components/useToast/Toast.css.mjs";
|
|
33
33
|
const TextContext = createContext(null);
|
|
34
34
|
const BraidPortal = ({ children, container }) => {
|
|
35
35
|
const { vanillaTheme } = useBraidTheme();
|
|
@@ -455,14 +455,20 @@ const resolveResponsiveProp = (value, mobileAtoms, tabletAtoms, desktopAtoms, wi
|
|
|
455
455
|
const wideAtom = wideAtoms[wide];
|
|
456
456
|
return clsx(mobileAtom, tabletAtom, desktopAtom, wideAtom);
|
|
457
457
|
};
|
|
458
|
+
const directionStyles = {
|
|
459
|
+
top,
|
|
460
|
+
right,
|
|
461
|
+
bottom,
|
|
462
|
+
left
|
|
463
|
+
};
|
|
458
464
|
const negativeMargin = (direction, space) => space ? clsx([
|
|
459
465
|
direction === "top" || direction === "bottom" ? preventCollapsePseudo[direction] : void 0,
|
|
460
466
|
resolveResponsiveProp(
|
|
461
467
|
space,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
468
|
+
directionStyles[direction].mobile,
|
|
469
|
+
directionStyles[direction].tablet,
|
|
470
|
+
directionStyles[direction].desktop,
|
|
471
|
+
directionStyles[direction].wide
|
|
466
472
|
)
|
|
467
473
|
]) : null;
|
|
468
474
|
const alignToDisplay = {
|
|
@@ -631,7 +637,7 @@ function textStyles({
|
|
|
631
637
|
fontFamily,
|
|
632
638
|
fontWeight[weight],
|
|
633
639
|
tone[tone$12],
|
|
634
|
-
|
|
640
|
+
(baseline ? textSizeTrimmed : textSizeUntrimmed)[size2]
|
|
635
641
|
];
|
|
636
642
|
}
|
|
637
643
|
const Truncate = ({ children }) => /* @__PURE__ */ jsx(Box, { component: "span", className: truncate, children });
|
|
@@ -875,7 +881,7 @@ const Columns = ({
|
|
|
875
881
|
const Column = ({
|
|
876
882
|
children,
|
|
877
883
|
data,
|
|
878
|
-
width: width$
|
|
884
|
+
width: width$12,
|
|
879
885
|
...restProps
|
|
880
886
|
}) => {
|
|
881
887
|
const {
|
|
@@ -895,11 +901,11 @@ const Column = ({
|
|
|
895
901
|
component,
|
|
896
902
|
display: component === "span" ? "block" : void 0,
|
|
897
903
|
minWidth: 0,
|
|
898
|
-
width: width$
|
|
899
|
-
flexShrink: width$
|
|
904
|
+
width: width$12 !== "content" ? "full" : void 0,
|
|
905
|
+
flexShrink: width$12 === "content" ? 0 : void 0,
|
|
900
906
|
className: [
|
|
901
907
|
column,
|
|
902
|
-
width$
|
|
908
|
+
width$12 !== "content" ? width[width$12] : null
|
|
903
909
|
],
|
|
904
910
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
905
911
|
children: /* @__PURE__ */ jsx(
|
|
@@ -1188,8 +1194,8 @@ const Keyline = ({ tone: tone2, borderRadius: borderRadius2 }) => {
|
|
|
1188
1194
|
component: "span",
|
|
1189
1195
|
height: "full",
|
|
1190
1196
|
display: "inlineBlock",
|
|
1191
|
-
paddingLeft: "xxsmall",
|
|
1192
1197
|
className: [
|
|
1198
|
+
width$1,
|
|
1193
1199
|
tone$1[tone2],
|
|
1194
1200
|
lightMode[backgroundLightness.lightMode],
|
|
1195
1201
|
darkMode[backgroundLightness.darkMode]
|
|
@@ -1203,7 +1209,7 @@ const boxShadowForVariant = {
|
|
|
1203
1209
|
default: "borderField",
|
|
1204
1210
|
disabled: "borderNeutralLight",
|
|
1205
1211
|
focus: "outlineFocus",
|
|
1206
|
-
|
|
1212
|
+
formAccent: "borderFormAccent",
|
|
1207
1213
|
critical: "borderCritical"
|
|
1208
1214
|
};
|
|
1209
1215
|
const FieldOverlay = ({ variant, ...restProps }) => /* @__PURE__ */ jsx(
|
|
@@ -1241,10 +1247,10 @@ const Bleed = ({
|
|
|
1241
1247
|
space,
|
|
1242
1248
|
horizontal,
|
|
1243
1249
|
vertical,
|
|
1244
|
-
top,
|
|
1245
|
-
bottom,
|
|
1246
|
-
left,
|
|
1247
|
-
right,
|
|
1250
|
+
top: top2,
|
|
1251
|
+
bottom: bottom2,
|
|
1252
|
+
left: left2,
|
|
1253
|
+
right: right2,
|
|
1248
1254
|
children,
|
|
1249
1255
|
component = "div",
|
|
1250
1256
|
data,
|
|
@@ -1255,10 +1261,10 @@ const Bleed = ({
|
|
|
1255
1261
|
component,
|
|
1256
1262
|
display: component === "span" ? "block" : void 0,
|
|
1257
1263
|
className: [
|
|
1258
|
-
negativeMargin("top",
|
|
1259
|
-
negativeMargin("bottom",
|
|
1260
|
-
negativeMargin("left",
|
|
1261
|
-
negativeMargin("right",
|
|
1264
|
+
negativeMargin("top", top2 || vertical || space),
|
|
1265
|
+
negativeMargin("bottom", bottom2 || vertical || space),
|
|
1266
|
+
negativeMargin("left", left2 || horizontal || space),
|
|
1267
|
+
negativeMargin("right", right2 || horizontal || space)
|
|
1262
1268
|
],
|
|
1263
1269
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
1264
1270
|
children: /* @__PURE__ */ jsx(
|
|
@@ -1406,7 +1412,7 @@ const ButtonLoader = () => /* @__PURE__ */ jsxs(Box, { "aria-hidden": true, comp
|
|
|
1406
1412
|
/* @__PURE__ */ jsx(Box, { component: "span", className: loadingDot, children: "." })
|
|
1407
1413
|
] });
|
|
1408
1414
|
const transparentPaddingX = "small";
|
|
1409
|
-
const buttonRadius = "
|
|
1415
|
+
const buttonRadius = "standard";
|
|
1410
1416
|
const ButtonOverlays = ({
|
|
1411
1417
|
variant = "solid",
|
|
1412
1418
|
tone: tone2,
|
|
@@ -1473,7 +1479,6 @@ const ButtonText = ({
|
|
|
1473
1479
|
iconPosition = "leading",
|
|
1474
1480
|
variant = "solid",
|
|
1475
1481
|
tone: tone2,
|
|
1476
|
-
labelSpacing = true,
|
|
1477
1482
|
bleed
|
|
1478
1483
|
}) => {
|
|
1479
1484
|
const lightness = useBackgroundLightness();
|
|
@@ -1496,9 +1501,8 @@ const ButtonText = ({
|
|
|
1496
1501
|
flexWrap: "wrap",
|
|
1497
1502
|
overflow: "hidden",
|
|
1498
1503
|
pointerEvents: "none",
|
|
1499
|
-
paddingX:
|
|
1500
|
-
|
|
1501
|
-
className: labelSpacing && size2 === "standard" ? touchableText.standard : void 0,
|
|
1504
|
+
paddingX: labelPaddingX,
|
|
1505
|
+
className: padToMinHeight,
|
|
1502
1506
|
background: tone2 === "neutral" && variant !== "solid" ? {
|
|
1503
1507
|
lightMode: lightness.lightMode === "light" ? "customLight" : "customDark",
|
|
1504
1508
|
darkMode: lightness.darkMode === "light" ? "customLight" : "customDark"
|
|
@@ -1508,8 +1512,8 @@ const ButtonText = ({
|
|
|
1508
1512
|
{
|
|
1509
1513
|
tone: stylesForVariant.textTone,
|
|
1510
1514
|
weight: "medium",
|
|
1515
|
+
align: "center",
|
|
1511
1516
|
size: size2,
|
|
1512
|
-
baseline: false,
|
|
1513
1517
|
children: [
|
|
1514
1518
|
icon && iconPosition === "leading" ? /* @__PURE__ */ jsx(
|
|
1515
1519
|
AvoidWidowIcon,
|
|
@@ -1676,7 +1680,7 @@ const TooltipTextDefaultsProvider = ({
|
|
|
1676
1680
|
}
|
|
1677
1681
|
);
|
|
1678
1682
|
};
|
|
1679
|
-
const borderRadius$1 = "
|
|
1683
|
+
const borderRadius$1 = "large";
|
|
1680
1684
|
const TooltipContent = ({
|
|
1681
1685
|
children,
|
|
1682
1686
|
opacity,
|
|
@@ -1695,12 +1699,8 @@ const TooltipContent = ({
|
|
|
1695
1699
|
boxShadow: "large",
|
|
1696
1700
|
background: "customDark",
|
|
1697
1701
|
borderRadius: borderRadius$1,
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
maxWidth,
|
|
1701
|
-
translateZ0,
|
|
1702
|
-
padding$1
|
|
1703
|
-
],
|
|
1702
|
+
padding: "small",
|
|
1703
|
+
className: [background, maxWidth, translateZ0],
|
|
1704
1704
|
children: /* @__PURE__ */ jsxs(TooltipTextDefaultsProvider, { children: [
|
|
1705
1705
|
/* @__PURE__ */ jsx(Box, { position: "relative", zIndex: 1, children }),
|
|
1706
1706
|
/* @__PURE__ */ jsx(
|
|
@@ -2141,7 +2141,7 @@ const toneToIcon = {
|
|
|
2141
2141
|
positive: IconPositive
|
|
2142
2142
|
};
|
|
2143
2143
|
const toastDuration = 1e4;
|
|
2144
|
-
const borderRadius = "
|
|
2144
|
+
const borderRadius = "large";
|
|
2145
2145
|
const Action = ({ label, onClick, removeToast }) => {
|
|
2146
2146
|
const handleClick = useCallback(() => {
|
|
2147
2147
|
removeToast();
|
|
@@ -2300,15 +2300,15 @@ const useFlipList = () => {
|
|
|
2300
2300
|
Array.from(refs.entries()).forEach(([id, element]) => {
|
|
2301
2301
|
if (element) {
|
|
2302
2302
|
const prevTop = positions.get(id);
|
|
2303
|
-
const { top, height } = element.getBoundingClientRect();
|
|
2304
|
-
if (typeof prevTop === "number" && prevTop !==
|
|
2303
|
+
const { top: top2, height } = element.getBoundingClientRect();
|
|
2304
|
+
if (typeof prevTop === "number" && prevTop !== top2) {
|
|
2305
2305
|
animations.push({
|
|
2306
2306
|
element,
|
|
2307
2307
|
transition: entranceTransition,
|
|
2308
2308
|
transforms: [
|
|
2309
2309
|
{
|
|
2310
2310
|
property: "transform",
|
|
2311
|
-
from: `translateY(${prevTop -
|
|
2311
|
+
from: `translateY(${prevTop - top2}px)`
|
|
2312
2312
|
}
|
|
2313
2313
|
]
|
|
2314
2314
|
});
|
|
@@ -2517,65 +2517,65 @@ const useToast = () => {
|
|
|
2517
2517
|
);
|
|
2518
2518
|
};
|
|
2519
2519
|
export {
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2520
|
+
ActionsContext,
|
|
2521
|
+
AvoidWidowIcon,
|
|
2522
|
+
BackgroundProvider,
|
|
2523
|
+
Bleed,
|
|
2524
|
+
Box,
|
|
2525
|
+
BraidPortal,
|
|
2526
|
+
Button,
|
|
2527
|
+
ButtonContainer,
|
|
2528
|
+
ButtonIcon,
|
|
2529
|
+
ButtonOverlays,
|
|
2530
|
+
ButtonText,
|
|
2531
|
+
Column,
|
|
2532
|
+
Columns,
|
|
2533
|
+
ContentBlock,
|
|
2534
|
+
DefaultTextPropsProvider,
|
|
2535
|
+
Divider,
|
|
2536
|
+
FieldOverlay,
|
|
2537
|
+
HeadingContext,
|
|
2538
|
+
Hidden,
|
|
2539
|
+
IconClear,
|
|
2540
|
+
IconCritical,
|
|
2541
|
+
IconPositive,
|
|
2542
|
+
IconRenderer,
|
|
2543
|
+
Inline,
|
|
2544
|
+
Keyline,
|
|
2545
|
+
Overlay,
|
|
2546
|
+
PublicBox,
|
|
2547
|
+
Stack,
|
|
2548
|
+
Text,
|
|
2549
|
+
TextContext,
|
|
2550
|
+
TextLink,
|
|
2551
|
+
TextLinkButton,
|
|
2552
|
+
ToastProvider,
|
|
2553
|
+
TooltipRenderer,
|
|
2554
|
+
Typography,
|
|
2555
|
+
buildDataAttributes,
|
|
2556
|
+
buttonIconVariants,
|
|
2557
|
+
buttonVariants,
|
|
2558
|
+
flattenChildren,
|
|
2559
|
+
iconContainerSize,
|
|
2560
|
+
iconSize,
|
|
2561
|
+
negativeMargin,
|
|
2562
|
+
optimizeResponsiveArray,
|
|
2563
|
+
resolveResponsiveProp,
|
|
2564
|
+
resolveResponsiveRangeProps,
|
|
2565
|
+
textStyles,
|
|
2566
|
+
useBackground,
|
|
2567
|
+
useBackgroundLightness,
|
|
2568
|
+
useButtonStyles,
|
|
2569
|
+
useColoredBoxClasses,
|
|
2570
|
+
useDefaultTextProps,
|
|
2571
|
+
useIcon,
|
|
2572
|
+
useResponsiveValue,
|
|
2573
|
+
useSpace,
|
|
2574
|
+
useThemeName,
|
|
2575
|
+
useToast,
|
|
2576
|
+
validBleedComponents,
|
|
2577
|
+
validColumnsComponents,
|
|
2578
|
+
validInlineComponents,
|
|
2579
|
+
validStackComponents,
|
|
2580
|
+
virtualTouchable
|
|
2581
2581
|
};
|