braid-design-system 32.2.0 → 32.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 +89 -0
- package/codemod/dist/wrapper.js +1221 -21034
- package/dist/ToastContext.chunk.cjs +52 -80
- package/dist/ToastContext.chunk.mjs +88 -116
- package/dist/Toggle.chunk.cjs +52 -21
- package/dist/Toggle.chunk.mjs +58 -27
- package/dist/reset.d.ts +22 -4
- package/dist/styles/lib/components/Stepper/Stepper.css.cjs +8 -7
- package/dist/styles/lib/components/Stepper/Stepper.css.mjs +8 -7
- package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.cjs +34 -3
- package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.mjs +34 -3
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.cjs +0 -4
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs +0 -4
- package/dist/styles/lib/css/atoms/atomicProperties.cjs +2 -0
- package/dist/styles/lib/css/atoms/atomicProperties.mjs +2 -0
- package/package.json +2 -2
package/dist/Toggle.chunk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useThemeName, useResponsiveValue, Stack, Box, buildDataAttributes, Divider, useIcon, virtualTouchable, Columns, Column, Inline, Text, Overlay, ActionsContext, useBackground, iconContainerSize, IconClear,
|
|
1
|
+
import { useThemeName, useResponsiveValue, Stack, Box, buildDataAttributes, Divider, useIcon, virtualTouchable, Columns, Column, Inline, Text, Overlay, ActionsContext, useBackground, iconContainerSize, IconClear, IconPositive, IconCritical, TextContext, HeadingContext, textStyles, FieldOverlay, ButtonIcon, Bleed, useColoredBoxClasses, BackgroundProvider, ButtonContainer, useButtonStyles, ButtonOverlays, ButtonText, useBackgroundLightness, resolveResponsiveRangeProps, optimizeResponsiveArray, Typography, BraidPortal, TextLinkButton, AvoidWidowIcon, useDefaultTextProps, flattenChildren, DefaultTextPropsProvider, iconSize, Hidden, useSpace, negativeMargin, resolveResponsiveProp } from "./ToastContext.chunk.mjs";
|
|
2
2
|
import { useBraidTheme, useLinkComponent } from "./side-effects/lib/components/BraidProvider/BraidProvider.mjs";
|
|
3
3
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
4
4
|
import assert from "assert";
|
|
@@ -20,6 +20,7 @@ import { RemoveScroll } from "react-remove-scroll";
|
|
|
20
20
|
import { backdrop, backdropVisible, menu, groupHeading } from "./styles/lib/components/Autosuggest/Autosuggest.css.mjs";
|
|
21
21
|
import matchHighlights from "autosuggest-highlight/match/index.js";
|
|
22
22
|
import clsx from "clsx";
|
|
23
|
+
import { noRadiusOnRight, largestWidth, width, tone as tone$1, lightMode, darkMode } from "./styles/lib/components/private/Keyline/Keyline.css.mjs";
|
|
23
24
|
import FocusLock from "react-focus-lock";
|
|
24
25
|
import { externalGutter } from "./styles/lib/components/private/Modal/ModalExternalGutter.mjs";
|
|
25
26
|
import { headingRoot, headingFocus, pointerEventsAll, maxSize, closeIconOffset, resetStackingContext, backdrop as backdrop$1, horiztontalTransition, modalContainer, entrance, exit, fixedStackingContext } from "./styles/lib/components/private/Modal/Modal.css.mjs";
|
|
@@ -27,7 +28,7 @@ import { lineHeightContainer } from "./styles/lib/css/lineHeightContainer.css.mj
|
|
|
27
28
|
import { currentColor, size, minCharacterWidth, trimGutter } from "./styles/lib/components/List/List.css.mjs";
|
|
28
29
|
import { rootSize, delay, size as size$1, currentColor as currentColor$1, circle } from "./styles/lib/components/Loader/Loader.css.mjs";
|
|
29
30
|
import { menuItem } from "./styles/lib/components/MenuItem/useMenuItem.css.mjs";
|
|
30
|
-
import { backdrop as backdrop$2, menuIsClosed, width, placementBottom } from "./styles/lib/components/MenuRenderer/MenuRenderer.css.mjs";
|
|
31
|
+
import { backdrop as backdrop$2, menuIsClosed, width as width$1, placementBottom } from "./styles/lib/components/MenuRenderer/MenuRenderer.css.mjs";
|
|
31
32
|
import { triggerOffset } from "./styles/lib/components/OverflowMenu/OverflowMenu.css.mjs";
|
|
32
33
|
import { isMobile } from "is-mobile";
|
|
33
34
|
import { field as field$1 } from "./styles/lib/components/Dropdown/Dropdown.css.mjs";
|
|
@@ -35,11 +36,11 @@ import { nativeInput } from "./styles/lib/components/MonthPicker/MonthPicker.css
|
|
|
35
36
|
import { hover, background, current, lightModeCurrentKeyline, darkModeCurrentKeyline } from "./styles/lib/components/Pagination/Pagination.css.mjs";
|
|
36
37
|
import { realField, realFieldPosition, isMixed, fakeField, fakeFieldSize, selected, focusOverlay as focusOverlay$1, hoverOverlay as hoverOverlay$1, checkboxIndicator, radioIndicator, root as root$4, labelOffset, badgeOffset, children } from "./styles/lib/components/private/InlineField/InlineField.css.mjs";
|
|
37
38
|
import { starSpacing, textSpacing, lightModeStarColor, darkModeStarColor } from "./styles/lib/components/Rating/Rating.css.mjs";
|
|
38
|
-
import { step, tone as tone$
|
|
39
|
+
import { step, tone as tone$2, progressTrack, progressTrackCentered, progressLine, progressUnfilled, indicatorContainer, focusOverlay as focusOverlay$2, indicator, highlight, complete, active, inner, tick, stretch, stretchLastAboveTablet } from "./styles/lib/components/Stepper/Stepper.css.mjs";
|
|
39
40
|
import { tab, cropToIconX, hoveredTab, tabFocusRing, scroll as scroll$1, nowrap, mask, marginAuto, divider, tabUnderline, tabUnderlineActiveDarkMode, underlineLeft, underlineWidth, tabPanel, tabPanelFocusRing } from "./styles/lib/components/Tabs/Tabs.css.mjs";
|
|
40
41
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
41
42
|
import { clearGutter } from "./styles/lib/components/Tag/Tag.css.mjs";
|
|
42
|
-
import { root as root$5 } from "./styles/lib/components/Textarea/Highlight/Highlight.css.mjs";
|
|
43
|
+
import { root as root$5, caution, critical } from "./styles/lib/components/Textarea/Highlight/Highlight.css.mjs";
|
|
43
44
|
import { highlights, field as field$2 } from "./styles/lib/components/Textarea/Textarea.css.mjs";
|
|
44
45
|
import { select, focusOverlay as focusOverlay$3 } from "./styles/lib/components/TextDropdown/TextDropdown.css.mjs";
|
|
45
46
|
import { root as root$1, up, left, right } from "./styles/lib/components/icons/IconChevron/IconChevron.css.mjs";
|
|
@@ -2260,7 +2261,8 @@ const Alert = ({
|
|
|
2260
2261
|
{
|
|
2261
2262
|
id,
|
|
2262
2263
|
background: backgroundForTone[tone2],
|
|
2263
|
-
|
|
2264
|
+
paddingY: "medium",
|
|
2265
|
+
paddingX: "gutter",
|
|
2264
2266
|
borderRadius: borderRadius$3,
|
|
2265
2267
|
position: "relative",
|
|
2266
2268
|
overflow: "hidden",
|
|
@@ -2334,8 +2336,7 @@ const Alert = ({
|
|
|
2334
2336
|
boxShadow: { lightMode: borderForTone[tone2] },
|
|
2335
2337
|
visible: true
|
|
2336
2338
|
}
|
|
2337
|
-
)
|
|
2338
|
-
/* @__PURE__ */ jsx(Keyline, { tone: tone2, borderRadius: borderRadius$3 })
|
|
2339
|
+
)
|
|
2339
2340
|
]
|
|
2340
2341
|
}
|
|
2341
2342
|
);
|
|
@@ -2448,10 +2449,11 @@ const FieldLabel = ({
|
|
|
2448
2449
|
description ? /* @__PURE__ */ jsx(Box, { paddingTop: label2 ? "xxsmall" : void 0, paddingBottom: "xxsmall", children: /* @__PURE__ */ jsx(Text, { tone: "secondary", id: descriptionId, children: description }) }) : null
|
|
2449
2450
|
] });
|
|
2450
2451
|
};
|
|
2451
|
-
const tones$1 = ["neutral", "critical", "positive"];
|
|
2452
|
+
const tones$1 = ["neutral", "critical", "positive", "caution"];
|
|
2452
2453
|
const icon = {
|
|
2453
2454
|
critical: /* @__PURE__ */ jsx(IconCritical, { tone: "critical" }),
|
|
2454
|
-
positive: /* @__PURE__ */ jsx(IconPositive, { tone: "positive" })
|
|
2455
|
+
positive: /* @__PURE__ */ jsx(IconPositive, { tone: "positive" }),
|
|
2456
|
+
caution: /* @__PURE__ */ jsx(IconCaution, { tone: "caution" })
|
|
2455
2457
|
};
|
|
2456
2458
|
const FieldMessage = ({
|
|
2457
2459
|
id,
|
|
@@ -3741,6 +3743,36 @@ const ButtonLink = forwardRef(
|
|
|
3741
3743
|
}
|
|
3742
3744
|
);
|
|
3743
3745
|
ButtonLink.displayName = "ButtonLink";
|
|
3746
|
+
const Keyline = ({ tone: tone2, borderRadius: borderRadius2 }) => {
|
|
3747
|
+
const backgroundLightness = useBackgroundLightness();
|
|
3748
|
+
return /* @__PURE__ */ jsx(
|
|
3749
|
+
Box,
|
|
3750
|
+
{
|
|
3751
|
+
component: "span",
|
|
3752
|
+
position: "absolute",
|
|
3753
|
+
top: 0,
|
|
3754
|
+
bottom: 0,
|
|
3755
|
+
left: 0,
|
|
3756
|
+
overflow: "hidden",
|
|
3757
|
+
borderRadius: borderRadius2,
|
|
3758
|
+
className: [noRadiusOnRight, largestWidth],
|
|
3759
|
+
children: /* @__PURE__ */ jsx(
|
|
3760
|
+
Box,
|
|
3761
|
+
{
|
|
3762
|
+
component: "span",
|
|
3763
|
+
height: "full",
|
|
3764
|
+
display: "inlineBlock",
|
|
3765
|
+
className: [
|
|
3766
|
+
width,
|
|
3767
|
+
tone$1[tone2],
|
|
3768
|
+
lightMode[backgroundLightness.lightMode],
|
|
3769
|
+
darkMode[backgroundLightness.darkMode]
|
|
3770
|
+
]
|
|
3771
|
+
}
|
|
3772
|
+
)
|
|
3773
|
+
}
|
|
3774
|
+
);
|
|
3775
|
+
};
|
|
3744
3776
|
const validCardComponents = [
|
|
3745
3777
|
"div",
|
|
3746
3778
|
"article",
|
|
@@ -5172,7 +5204,7 @@ const borderRadius$1 = "large";
|
|
|
5172
5204
|
function Menu({
|
|
5173
5205
|
offsetSpace,
|
|
5174
5206
|
align,
|
|
5175
|
-
width:
|
|
5207
|
+
width: width2,
|
|
5176
5208
|
placement,
|
|
5177
5209
|
children: children2,
|
|
5178
5210
|
open,
|
|
@@ -5200,7 +5232,7 @@ function Menu({
|
|
|
5200
5232
|
overflow: "hidden",
|
|
5201
5233
|
className: [
|
|
5202
5234
|
!open && menuIsClosed,
|
|
5203
|
-
|
|
5235
|
+
width2 !== "content" && width$1[width2],
|
|
5204
5236
|
placement === "top" && placementBottom
|
|
5205
5237
|
],
|
|
5206
5238
|
children: [
|
|
@@ -6598,7 +6630,7 @@ const Step = ({ complete: complete2 = false, id, children: children2 }) => {
|
|
|
6598
6630
|
cursor: interactable ? "pointer" : void 0,
|
|
6599
6631
|
pointerEvents: !interactable && !active2 ? "none" : void 0,
|
|
6600
6632
|
"aria-current": active2 ? "step" : void 0,
|
|
6601
|
-
className: [step, tone$
|
|
6633
|
+
className: [step, tone$2[tone2]],
|
|
6602
6634
|
onClick: interactable ? () => {
|
|
6603
6635
|
if (onClick) {
|
|
6604
6636
|
onClick(stepNumber);
|
|
@@ -7500,17 +7532,9 @@ const Tag = ({
|
|
|
7500
7532
|
}
|
|
7501
7533
|
);
|
|
7502
7534
|
};
|
|
7503
|
-
const
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
component: "mark",
|
|
7507
|
-
borderRadius: "small",
|
|
7508
|
-
background: { lightMode: "criticalLight", darkMode: "critical" },
|
|
7509
|
-
className: root$5,
|
|
7510
|
-
children: children2
|
|
7511
|
-
}
|
|
7512
|
-
);
|
|
7513
|
-
const formatRanges = (value, highlightRanges) => {
|
|
7535
|
+
const styleForTone = { caution, critical };
|
|
7536
|
+
const Highlight = ({ children: children2, tone: tone2 }) => /* @__PURE__ */ jsx(Box, { component: "mark", className: [root$5, styleForTone[tone2]], children: children2 });
|
|
7537
|
+
const formatRanges = (value, highlightRanges, tone2) => {
|
|
7514
7538
|
if (highlightRanges && value) {
|
|
7515
7539
|
let lastEnd = 0;
|
|
7516
7540
|
const validatedAndSortedRanges = highlightRanges.sort((a, b) => a.start > b.start ? 1 : -1).reduce((acc, { end, start }) => {
|
|
@@ -7537,7 +7561,9 @@ const formatRanges = (value, highlightRanges) => {
|
|
|
7537
7561
|
])
|
|
7538
7562
|
).reduce((acc, { text, highlight: highlight2 }, i) => {
|
|
7539
7563
|
if (text) {
|
|
7540
|
-
acc.push(
|
|
7564
|
+
acc.push(
|
|
7565
|
+
highlight2 ? /* @__PURE__ */ jsx(Highlight, { tone: tone2, children: text }, i) : text
|
|
7566
|
+
);
|
|
7541
7567
|
}
|
|
7542
7568
|
return acc;
|
|
7543
7569
|
}, []);
|
|
@@ -7584,6 +7610,8 @@ const Textarea = forwardRef(
|
|
|
7584
7610
|
lines = 3,
|
|
7585
7611
|
lineLimit,
|
|
7586
7612
|
grow = true,
|
|
7613
|
+
tone: tone2,
|
|
7614
|
+
spellCheck,
|
|
7587
7615
|
...restProps
|
|
7588
7616
|
}, ref) => {
|
|
7589
7617
|
const [rows, setRows] = useState(lines);
|
|
@@ -7597,13 +7625,15 @@ const Textarea = forwardRef(
|
|
|
7597
7625
|
[highlightsRef]
|
|
7598
7626
|
);
|
|
7599
7627
|
const inputLength = String(value).length;
|
|
7600
|
-
const
|
|
7601
|
-
const
|
|
7628
|
+
const hasExceededCharacterLimit = characterLimit && inputLength > characterLimit;
|
|
7629
|
+
const highlightTone = !hasExceededCharacterLimit && (tone2 === "critical" || tone2 === "caution") ? tone2 : "critical";
|
|
7630
|
+
const highlightRanges = hasExceededCharacterLimit ? [{ start: characterLimit }] : highlightRangesProp;
|
|
7602
7631
|
const hasHighlights = highlightRanges.length > 0;
|
|
7603
7632
|
return /* @__PURE__ */ jsx(
|
|
7604
7633
|
Field,
|
|
7605
7634
|
{
|
|
7606
7635
|
...restProps,
|
|
7636
|
+
tone: tone2,
|
|
7607
7637
|
value,
|
|
7608
7638
|
icon: void 0,
|
|
7609
7639
|
prefix: void 0,
|
|
@@ -7634,7 +7664,7 @@ const Textarea = forwardRef(
|
|
|
7634
7664
|
left: 0,
|
|
7635
7665
|
className: [highlights, className],
|
|
7636
7666
|
...fieldProps,
|
|
7637
|
-
children: formatRanges(String(value), highlightRanges)
|
|
7667
|
+
children: formatRanges(String(value), highlightRanges, highlightTone)
|
|
7638
7668
|
}
|
|
7639
7669
|
) : null,
|
|
7640
7670
|
/* @__PURE__ */ jsx(
|
|
@@ -7661,6 +7691,7 @@ const Textarea = forwardRef(
|
|
|
7661
7691
|
onPaste,
|
|
7662
7692
|
onScroll: hasHighlights ? (event) => updateScroll(event.currentTarget.scrollTop) : void 0,
|
|
7663
7693
|
placeholder: !restProps.disabled ? placeholder : void 0,
|
|
7694
|
+
spellCheck,
|
|
7664
7695
|
className: [field$2, className],
|
|
7665
7696
|
...fieldProps,
|
|
7666
7697
|
ref
|
package/dist/reset.d.ts
CHANGED
|
@@ -754,6 +754,20 @@ declare const colorAtomicProperties: {
|
|
|
754
754
|
darkMode: string;
|
|
755
755
|
};
|
|
756
756
|
};
|
|
757
|
+
borderBrandAccent: {
|
|
758
|
+
defaultClass: string;
|
|
759
|
+
conditions: {
|
|
760
|
+
lightMode: string;
|
|
761
|
+
darkMode: string;
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
borderBrandAccentLight: {
|
|
765
|
+
defaultClass: string;
|
|
766
|
+
conditions: {
|
|
767
|
+
lightMode: string;
|
|
768
|
+
darkMode: string;
|
|
769
|
+
};
|
|
770
|
+
};
|
|
757
771
|
borderBrandAccentLarge: {
|
|
758
772
|
defaultClass: string;
|
|
759
773
|
conditions: {
|
|
@@ -2280,9 +2294,9 @@ declare const sprinkles: ((props: {
|
|
|
2280
2294
|
lightMode?: "brandAccent" | "caution" | "cautionLight" | "critical" | "criticalLight" | "formAccent" | "info" | "infoLight" | "neutral" | "neutralLight" | "positive" | "positiveLight" | "promote" | "promoteLight" | "body" | "bodyDark" | "brand" | "brandAccentActive" | "brandAccentHover" | "brandAccentSoft" | "brandAccentSoftActive" | "brandAccentSoftHover" | "criticalActive" | "criticalHover" | "criticalSoft" | "criticalSoftActive" | "criticalSoftHover" | "formAccentActive" | "formAccentHover" | "formAccentSoft" | "formAccentSoftActive" | "formAccentSoftHover" | "neutralActive" | "neutralHover" | "neutralSoft" | "neutralSoftActive" | "neutralSoftHover" | "surface" | "surfaceDark" | undefined;
|
|
2281
2295
|
darkMode?: "brandAccent" | "caution" | "cautionLight" | "critical" | "criticalLight" | "formAccent" | "info" | "infoLight" | "neutral" | "neutralLight" | "positive" | "positiveLight" | "promote" | "promoteLight" | "body" | "bodyDark" | "brand" | "brandAccentActive" | "brandAccentHover" | "brandAccentSoft" | "brandAccentSoftActive" | "brandAccentSoftHover" | "criticalActive" | "criticalHover" | "criticalSoft" | "criticalSoftActive" | "criticalSoftHover" | "formAccentActive" | "formAccentHover" | "formAccentSoft" | "formAccentSoftActive" | "formAccentSoftHover" | "neutralActive" | "neutralHover" | "neutralSoft" | "neutralSoftActive" | "neutralSoftHover" | "surface" | "surfaceDark" | undefined;
|
|
2282
2296
|
}) | undefined;
|
|
2283
|
-
readonly boxShadow?: ("small" | "medium" | "large" | "borderBrandAccentLarge" | "borderBrandAccentLightLarge" | "borderCaution" | "borderCautionLight" | "borderCritical" | "borderCriticalLarge" | "borderCriticalLight" | "borderCriticalLightLarge" | "borderField" | "borderFormAccent" | "borderFormAccentLarge" | "borderFormAccentLight" | "borderFormAccentLightLarge" | "borderInfo" | "borderInfoLight" | "borderNeutral" | "borderNeutralLarge" | "borderNeutralInverted" | "borderNeutralInvertedLarge" | "borderNeutralLight" | "borderPositive" | "borderPositiveLight" | "borderPromote" | "borderPromoteLight" | "outlineFocus" | {
|
|
2284
|
-
lightMode?: "small" | "medium" | "large" | "borderBrandAccentLarge" | "borderBrandAccentLightLarge" | "borderCaution" | "borderCautionLight" | "borderCritical" | "borderCriticalLarge" | "borderCriticalLight" | "borderCriticalLightLarge" | "borderField" | "borderFormAccent" | "borderFormAccentLarge" | "borderFormAccentLight" | "borderFormAccentLightLarge" | "borderInfo" | "borderInfoLight" | "borderNeutral" | "borderNeutralLarge" | "borderNeutralInverted" | "borderNeutralInvertedLarge" | "borderNeutralLight" | "borderPositive" | "borderPositiveLight" | "borderPromote" | "borderPromoteLight" | "outlineFocus" | undefined;
|
|
2285
|
-
darkMode?: "small" | "medium" | "large" | "borderBrandAccentLarge" | "borderBrandAccentLightLarge" | "borderCaution" | "borderCautionLight" | "borderCritical" | "borderCriticalLarge" | "borderCriticalLight" | "borderCriticalLightLarge" | "borderField" | "borderFormAccent" | "borderFormAccentLarge" | "borderFormAccentLight" | "borderFormAccentLightLarge" | "borderInfo" | "borderInfoLight" | "borderNeutral" | "borderNeutralLarge" | "borderNeutralInverted" | "borderNeutralInvertedLarge" | "borderNeutralLight" | "borderPositive" | "borderPositiveLight" | "borderPromote" | "borderPromoteLight" | "outlineFocus" | undefined;
|
|
2297
|
+
readonly boxShadow?: ("small" | "medium" | "large" | "borderBrandAccent" | "borderBrandAccentLight" | "borderBrandAccentLarge" | "borderBrandAccentLightLarge" | "borderCaution" | "borderCautionLight" | "borderCritical" | "borderCriticalLarge" | "borderCriticalLight" | "borderCriticalLightLarge" | "borderField" | "borderFormAccent" | "borderFormAccentLarge" | "borderFormAccentLight" | "borderFormAccentLightLarge" | "borderInfo" | "borderInfoLight" | "borderNeutral" | "borderNeutralLarge" | "borderNeutralInverted" | "borderNeutralInvertedLarge" | "borderNeutralLight" | "borderPositive" | "borderPositiveLight" | "borderPromote" | "borderPromoteLight" | "outlineFocus" | {
|
|
2298
|
+
lightMode?: "small" | "medium" | "large" | "borderBrandAccent" | "borderBrandAccentLight" | "borderBrandAccentLarge" | "borderBrandAccentLightLarge" | "borderCaution" | "borderCautionLight" | "borderCritical" | "borderCriticalLarge" | "borderCriticalLight" | "borderCriticalLightLarge" | "borderField" | "borderFormAccent" | "borderFormAccentLarge" | "borderFormAccentLight" | "borderFormAccentLightLarge" | "borderInfo" | "borderInfoLight" | "borderNeutral" | "borderNeutralLarge" | "borderNeutralInverted" | "borderNeutralInvertedLarge" | "borderNeutralLight" | "borderPositive" | "borderPositiveLight" | "borderPromote" | "borderPromoteLight" | "outlineFocus" | undefined;
|
|
2299
|
+
darkMode?: "small" | "medium" | "large" | "borderBrandAccent" | "borderBrandAccentLight" | "borderBrandAccentLarge" | "borderBrandAccentLightLarge" | "borderCaution" | "borderCautionLight" | "borderCritical" | "borderCriticalLarge" | "borderCriticalLight" | "borderCriticalLightLarge" | "borderField" | "borderFormAccent" | "borderFormAccentLarge" | "borderFormAccentLight" | "borderFormAccentLightLarge" | "borderInfo" | "borderInfoLight" | "borderNeutral" | "borderNeutralLarge" | "borderNeutralInverted" | "borderNeutralInvertedLarge" | "borderNeutralLight" | "borderPositive" | "borderPositiveLight" | "borderPromote" | "borderPromoteLight" | "outlineFocus" | undefined;
|
|
2286
2300
|
}) | undefined;
|
|
2287
2301
|
}) => string) & {
|
|
2288
2302
|
properties: Set<"background" | "borderRadius" | "transition" | "transform" | "alignItems" | "bottom" | "boxShadow" | "cursor" | "display" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "height" | "inset" | "justifyContent" | "left" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxWidth" | "minWidth" | "opacity" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "right" | "textAlign" | "top" | "userSelect" | "width" | "zIndex" | "margin" | "outline" | "overflow" | "padding" | "paddingY" | "paddingX" | "marginY" | "marginX">;
|
|
@@ -2626,6 +2640,8 @@ interface Atoms extends Sprinkles {
|
|
|
2626
2640
|
}
|
|
2627
2641
|
|
|
2628
2642
|
declare const boxShadow: {
|
|
2643
|
+
borderBrandAccent: string;
|
|
2644
|
+
borderBrandAccentLight: string;
|
|
2629
2645
|
borderBrandAccentLarge: string;
|
|
2630
2646
|
borderBrandAccentLightLarge: string;
|
|
2631
2647
|
borderCaution: string;
|
|
@@ -2866,7 +2882,7 @@ interface FieldLabelProps {
|
|
|
2866
2882
|
}
|
|
2867
2883
|
declare const FieldLabel$1: ({ id, htmlFor, label, disabled, secondaryLabel, tertiaryLabel, description, descriptionId, data, }: FieldLabelProps) => JSX.Element | null;
|
|
2868
2884
|
|
|
2869
|
-
declare const tones$1: readonly ["neutral", "critical", "positive"];
|
|
2885
|
+
declare const tones$1: readonly ["neutral", "critical", "positive", "caution"];
|
|
2870
2886
|
type FieldTone = (typeof tones$1)[number];
|
|
2871
2887
|
interface FieldMessageProps {
|
|
2872
2888
|
id: string;
|
|
@@ -3515,6 +3531,7 @@ type RadioGroupBaseProps<Value = NonNullable<string | number>> = FieldGroupBaseP
|
|
|
3515
3531
|
onChange: (event: FormEvent<HTMLInputElement>) => void;
|
|
3516
3532
|
name?: string;
|
|
3517
3533
|
size?: InlineFieldProps['size'];
|
|
3534
|
+
tone?: Extract<FieldGroupBaseProps['tone'], 'critical' | 'positive' | 'neutral'>;
|
|
3518
3535
|
};
|
|
3519
3536
|
type RadioGroupLabelProps = FieldLabelVariant;
|
|
3520
3537
|
type RadioGroupProps<Value = NonNullable<string | number>> = RadioGroupBaseProps<Value> & RadioGroupLabelProps;
|
|
@@ -3658,6 +3675,7 @@ type TextareaBaseProps = Omit<FieldBaseProps, 'value' | 'labelId' | 'secondaryMe
|
|
|
3658
3675
|
onFocus?: NativeTextareaProps['onFocus'];
|
|
3659
3676
|
onPaste?: NativeTextareaProps['onPaste'];
|
|
3660
3677
|
placeholder?: NativeTextareaProps['placeholder'];
|
|
3678
|
+
spellCheck?: NativeTextareaProps['spellCheck'];
|
|
3661
3679
|
highlightRanges?: Array<{
|
|
3662
3680
|
start: number;
|
|
3663
3681
|
end?: number;
|
|
@@ -10,6 +10,7 @@ const styles_lib_components_private_hideFocusRings_hideFocusRingsDataAttribute_c
|
|
|
10
10
|
fileScope.setFileScope("src/lib/components/Stepper/Stepper.css.ts?used", "braid-design-system");
|
|
11
11
|
const baseColourVar = css.createVar("baseColourVar");
|
|
12
12
|
const highlightVar = css.createVar("highlightVar");
|
|
13
|
+
const stepIndicatorSize = styles_lib_themes_vars_css_cjs.vars.inlineFieldSize.small;
|
|
13
14
|
const tone = {
|
|
14
15
|
formAccent: css.style(styles_lib_css_colorModeStyle_cjs.colorModeStyle({
|
|
15
16
|
lightMode: {
|
|
@@ -54,8 +55,8 @@ const step = css.style({
|
|
|
54
55
|
const indicator = css.style([styles_lib_css_atoms_atoms_cjs.atoms({
|
|
55
56
|
display: "block"
|
|
56
57
|
}), {
|
|
57
|
-
height:
|
|
58
|
-
width:
|
|
58
|
+
height: stepIndicatorSize,
|
|
59
|
+
width: stepIndicatorSize,
|
|
59
60
|
color: baseColourVar
|
|
60
61
|
}], "indicator");
|
|
61
62
|
const stretch = css.style({
|
|
@@ -114,13 +115,13 @@ const dotSize = 2;
|
|
|
114
115
|
const progressTrack = css.style({
|
|
115
116
|
background: `repeating-linear-gradient(90deg, ${baseColourVar}, ${baseColourVar} ${dotSize}px, transparent ${dotSize}px, transparent ${dotSize * 2}px)`,
|
|
116
117
|
height: styles_lib_themes_vars_css_cjs.vars.borderWidth.large,
|
|
117
|
-
width: `${cssUtils.calc("100%").subtract(
|
|
118
|
-
top: `${cssUtils.calc(
|
|
119
|
-
left: `${cssUtils.calc(
|
|
118
|
+
width: `${cssUtils.calc("100%").subtract(stepIndicatorSize).subtract(cssUtils.calc(styles_lib_themes_vars_css_cjs.vars.space[progressBarGap]).multiply(2))}`,
|
|
119
|
+
top: `${cssUtils.calc(stepIndicatorSize).subtract(styles_lib_themes_vars_css_cjs.vars.borderWidth.large).divide(2)}`,
|
|
120
|
+
left: `${cssUtils.calc(stepIndicatorSize).add(styles_lib_themes_vars_css_cjs.vars.space[progressBarGap])}`
|
|
120
121
|
}, "progressTrack");
|
|
121
122
|
const progressTrackCentered = css.style(styles_lib_css_responsiveStyle_cjs.responsiveStyle({
|
|
122
123
|
tablet: {
|
|
123
|
-
left: `${cssUtils.calc("50%").add(cssUtils.calc(
|
|
124
|
+
left: `${cssUtils.calc("50%").add(cssUtils.calc(stepIndicatorSize).divide(2)).add(styles_lib_themes_vars_css_cjs.vars.space[progressBarGap])}`
|
|
124
125
|
}
|
|
125
126
|
}), "progressTrackCentered");
|
|
126
127
|
const progressLine = css.style({
|
|
@@ -131,7 +132,7 @@ const progressUnfilled = css.style({
|
|
|
131
132
|
transform: "translateX(-101%)"
|
|
132
133
|
}, "progressUnfilled");
|
|
133
134
|
const indicatorContainer = css.style({
|
|
134
|
-
width:
|
|
135
|
+
width: stepIndicatorSize,
|
|
135
136
|
selectors: {
|
|
136
137
|
[`${step}:active &`]: {
|
|
137
138
|
transform: styles_lib_themes_vars_css_cjs.vars.transform.touchable
|
|
@@ -9,6 +9,7 @@ import { hideFocusRingsDataAttribute } from "../private/hideFocusRings/hideFocus
|
|
|
9
9
|
setFileScope("src/lib/components/Stepper/Stepper.css.ts?used", "braid-design-system");
|
|
10
10
|
const baseColourVar = createVar("baseColourVar");
|
|
11
11
|
const highlightVar = createVar("highlightVar");
|
|
12
|
+
const stepIndicatorSize = vars.inlineFieldSize.small;
|
|
12
13
|
const tone = {
|
|
13
14
|
formAccent: style(colorModeStyle({
|
|
14
15
|
lightMode: {
|
|
@@ -53,8 +54,8 @@ const step = style({
|
|
|
53
54
|
const indicator = style([atoms({
|
|
54
55
|
display: "block"
|
|
55
56
|
}), {
|
|
56
|
-
height:
|
|
57
|
-
width:
|
|
57
|
+
height: stepIndicatorSize,
|
|
58
|
+
width: stepIndicatorSize,
|
|
58
59
|
color: baseColourVar
|
|
59
60
|
}], "indicator");
|
|
60
61
|
const stretch = style({
|
|
@@ -113,13 +114,13 @@ const dotSize = 2;
|
|
|
113
114
|
const progressTrack = style({
|
|
114
115
|
background: `repeating-linear-gradient(90deg, ${baseColourVar}, ${baseColourVar} ${dotSize}px, transparent ${dotSize}px, transparent ${dotSize * 2}px)`,
|
|
115
116
|
height: vars.borderWidth.large,
|
|
116
|
-
width: `${calc("100%").subtract(
|
|
117
|
-
top: `${calc(
|
|
118
|
-
left: `${calc(
|
|
117
|
+
width: `${calc("100%").subtract(stepIndicatorSize).subtract(calc(vars.space[progressBarGap]).multiply(2))}`,
|
|
118
|
+
top: `${calc(stepIndicatorSize).subtract(vars.borderWidth.large).divide(2)}`,
|
|
119
|
+
left: `${calc(stepIndicatorSize).add(vars.space[progressBarGap])}`
|
|
119
120
|
}, "progressTrack");
|
|
120
121
|
const progressTrackCentered = style(responsiveStyle({
|
|
121
122
|
tablet: {
|
|
122
|
-
left: `${calc("50%").add(calc(
|
|
123
|
+
left: `${calc("50%").add(calc(stepIndicatorSize).divide(2)).add(vars.space[progressBarGap])}`
|
|
123
124
|
}
|
|
124
125
|
}), "progressTrackCentered");
|
|
125
126
|
const progressLine = style({
|
|
@@ -130,7 +131,7 @@ const progressUnfilled = style({
|
|
|
130
131
|
transform: "translateX(-101%)"
|
|
131
132
|
}, "progressUnfilled");
|
|
132
133
|
const indicatorContainer = style({
|
|
133
|
-
width:
|
|
134
|
+
width: stepIndicatorSize,
|
|
134
135
|
selectors: {
|
|
135
136
|
[`${step}:active &`]: {
|
|
136
137
|
transform: vars.transform.touchable
|
|
@@ -1,11 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
3
|
const css = require("@vanilla-extract/css");
|
|
4
|
+
const styles_lib_css_atoms_atoms_cjs = require("../../../css/atoms/atoms.cjs");
|
|
5
|
+
const styles_lib_css_colorModeStyle_cjs = require("../../../css/colorModeStyle.cjs");
|
|
6
|
+
const styles_lib_themes_vars_css_cjs = require("../../../themes/vars.css.cjs");
|
|
4
7
|
fileScope.setFileScope("src/lib/components/Textarea/Highlight/Highlight.css.ts?used", "braid-design-system");
|
|
5
8
|
const space = 2;
|
|
6
|
-
const
|
|
9
|
+
const lineThickness = 2;
|
|
10
|
+
const root = css.style([styles_lib_css_atoms_atoms_cjs.atoms({
|
|
11
|
+
borderRadius: "small"
|
|
12
|
+
}), {
|
|
7
13
|
padding: space,
|
|
8
|
-
margin: -space
|
|
9
|
-
|
|
14
|
+
margin: -space,
|
|
15
|
+
textDecoration: "underline",
|
|
16
|
+
textDecorationStyle: "wavy",
|
|
17
|
+
textDecorationSkipInk: "none",
|
|
18
|
+
textDecorationThickness: lineThickness,
|
|
19
|
+
textUnderlineOffset: 2,
|
|
20
|
+
paddingBottom: lineThickness / 2,
|
|
21
|
+
marginBottom: -(lineThickness / 2)
|
|
22
|
+
}], "root");
|
|
23
|
+
const critical = css.style(styles_lib_css_colorModeStyle_cjs.colorModeStyle({
|
|
24
|
+
lightMode: {
|
|
25
|
+
textDecorationColor: styles_lib_themes_vars_css_cjs.vars.borderColor.critical,
|
|
26
|
+
background: styles_lib_themes_vars_css_cjs.vars.backgroundColor.criticalLight
|
|
27
|
+
},
|
|
28
|
+
darkMode: {
|
|
29
|
+
textDecorationColor: styles_lib_themes_vars_css_cjs.vars.borderColor.criticalLight
|
|
30
|
+
}
|
|
31
|
+
}), "critical");
|
|
32
|
+
const caution = css.style([{
|
|
33
|
+
textDecorationColor: styles_lib_themes_vars_css_cjs.vars.borderColor.caution
|
|
34
|
+
}, styles_lib_css_colorModeStyle_cjs.colorModeStyle({
|
|
35
|
+
lightMode: {
|
|
36
|
+
background: styles_lib_themes_vars_css_cjs.vars.backgroundColor.cautionLight
|
|
37
|
+
}
|
|
38
|
+
})], "caution");
|
|
10
39
|
fileScope.endFileScope();
|
|
40
|
+
exports.caution = caution;
|
|
41
|
+
exports.critical = critical;
|
|
11
42
|
exports.root = root;
|
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
+
import { atoms } from "../../../css/atoms/atoms.mjs";
|
|
4
|
+
import { colorModeStyle } from "../../../css/colorModeStyle.mjs";
|
|
5
|
+
import { vars } from "../../../themes/vars.css.mjs";
|
|
3
6
|
setFileScope("src/lib/components/Textarea/Highlight/Highlight.css.ts?used", "braid-design-system");
|
|
4
7
|
const space = 2;
|
|
5
|
-
const
|
|
8
|
+
const lineThickness = 2;
|
|
9
|
+
const root = style([atoms({
|
|
10
|
+
borderRadius: "small"
|
|
11
|
+
}), {
|
|
6
12
|
padding: space,
|
|
7
|
-
margin: -space
|
|
8
|
-
|
|
13
|
+
margin: -space,
|
|
14
|
+
textDecoration: "underline",
|
|
15
|
+
textDecorationStyle: "wavy",
|
|
16
|
+
textDecorationSkipInk: "none",
|
|
17
|
+
textDecorationThickness: lineThickness,
|
|
18
|
+
textUnderlineOffset: 2,
|
|
19
|
+
paddingBottom: lineThickness / 2,
|
|
20
|
+
marginBottom: -(lineThickness / 2)
|
|
21
|
+
}], "root");
|
|
22
|
+
const critical = style(colorModeStyle({
|
|
23
|
+
lightMode: {
|
|
24
|
+
textDecorationColor: vars.borderColor.critical,
|
|
25
|
+
background: vars.backgroundColor.criticalLight
|
|
26
|
+
},
|
|
27
|
+
darkMode: {
|
|
28
|
+
textDecorationColor: vars.borderColor.criticalLight
|
|
29
|
+
}
|
|
30
|
+
}), "critical");
|
|
31
|
+
const caution = style([{
|
|
32
|
+
textDecorationColor: vars.borderColor.caution
|
|
33
|
+
}, colorModeStyle({
|
|
34
|
+
lightMode: {
|
|
35
|
+
background: vars.backgroundColor.cautionLight
|
|
36
|
+
}
|
|
37
|
+
})], "caution");
|
|
9
38
|
endFileScope();
|
|
10
39
|
export {
|
|
40
|
+
caution,
|
|
41
|
+
critical,
|
|
11
42
|
root
|
|
12
43
|
};
|
|
@@ -8,9 +8,6 @@ const constants = {
|
|
|
8
8
|
maxWidth: "260px",
|
|
9
9
|
arrowSize: "12px"
|
|
10
10
|
};
|
|
11
|
-
const background = css.style({
|
|
12
|
-
background: styles_lib_themes_vars_css_cjs.vars.foregroundColor.neutral
|
|
13
|
-
}, "background");
|
|
14
11
|
const maxWidth = css.style({
|
|
15
12
|
maxWidth: constants.maxWidth
|
|
16
13
|
}, "maxWidth");
|
|
@@ -58,7 +55,6 @@ const arrow = css.style({
|
|
|
58
55
|
}, "arrow");
|
|
59
56
|
fileScope.endFileScope();
|
|
60
57
|
exports.arrow = arrow;
|
|
61
|
-
exports.background = background;
|
|
62
58
|
exports.maxWidth = maxWidth;
|
|
63
59
|
exports.translateZ0 = translateZ0;
|
|
64
60
|
exports.verticalOffsetBeforeEntrance = verticalOffsetBeforeEntrance;
|
|
@@ -7,9 +7,6 @@ const constants = {
|
|
|
7
7
|
maxWidth: "260px",
|
|
8
8
|
arrowSize: "12px"
|
|
9
9
|
};
|
|
10
|
-
const background = style({
|
|
11
|
-
background: vars.foregroundColor.neutral
|
|
12
|
-
}, "background");
|
|
13
10
|
const maxWidth = style({
|
|
14
11
|
maxWidth: constants.maxWidth
|
|
15
12
|
}, "maxWidth");
|
|
@@ -58,7 +55,6 @@ const arrow = style({
|
|
|
58
55
|
endFileScope();
|
|
59
56
|
export {
|
|
60
57
|
arrow,
|
|
61
|
-
background,
|
|
62
58
|
maxWidth,
|
|
63
59
|
translateZ0,
|
|
64
60
|
verticalOffsetBeforeEntrance
|
|
@@ -10,6 +10,8 @@ const space = {
|
|
|
10
10
|
};
|
|
11
11
|
const boxShadow = {
|
|
12
12
|
...styles_lib_themes_vars_css_cjs.vars.shadow,
|
|
13
|
+
borderBrandAccent: `inset 0 0 0 ${styles_lib_themes_vars_css_cjs.vars.borderWidth.standard} ${styles_lib_themes_vars_css_cjs.vars.borderColor.brandAccent}`,
|
|
14
|
+
borderBrandAccentLight: `inset 0 0 0 ${styles_lib_themes_vars_css_cjs.vars.borderWidth.standard} ${styles_lib_themes_vars_css_cjs.vars.borderColor.brandAccentLight}`,
|
|
13
15
|
borderBrandAccentLarge: `inset 0 0 0 ${styles_lib_themes_vars_css_cjs.vars.borderWidth.large} ${styles_lib_themes_vars_css_cjs.vars.borderColor.brandAccent}`,
|
|
14
16
|
borderBrandAccentLightLarge: `inset 0 0 0 ${styles_lib_themes_vars_css_cjs.vars.borderWidth.large} ${styles_lib_themes_vars_css_cjs.vars.borderColor.brandAccentLight}`,
|
|
15
17
|
borderCaution: `inset 0 0 0 ${styles_lib_themes_vars_css_cjs.vars.borderWidth.standard} ${styles_lib_themes_vars_css_cjs.vars.borderColor.caution}`,
|
|
@@ -9,6 +9,8 @@ const space = {
|
|
|
9
9
|
};
|
|
10
10
|
const boxShadow = {
|
|
11
11
|
...vars.shadow,
|
|
12
|
+
borderBrandAccent: `inset 0 0 0 ${vars.borderWidth.standard} ${vars.borderColor.brandAccent}`,
|
|
13
|
+
borderBrandAccentLight: `inset 0 0 0 ${vars.borderWidth.standard} ${vars.borderColor.brandAccentLight}`,
|
|
12
14
|
borderBrandAccentLarge: `inset 0 0 0 ${vars.borderWidth.large} ${vars.borderColor.brandAccent}`,
|
|
13
15
|
borderBrandAccentLightLarge: `inset 0 0 0 ${vars.borderWidth.large} ${vars.borderColor.brandAccentLight}`,
|
|
14
16
|
borderCaution: `inset 0 0 0 ${vars.borderWidth.standard} ${vars.borderColor.caution}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braid-design-system",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.3.0",
|
|
4
4
|
"description": "Themeable design system for the SEEK Group",
|
|
5
5
|
"homepage": "https://seek-oss.github.io/braid-design-system/",
|
|
6
6
|
"bugs": {
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"react-dom": "^18.2.0",
|
|
184
184
|
"react-router-dom": "^6.3.0",
|
|
185
185
|
"sanitize-html": "^2.7.0",
|
|
186
|
-
"sku": "11.
|
|
186
|
+
"sku": "11.8.1",
|
|
187
187
|
"svgo": "^2.8.0",
|
|
188
188
|
"title-case": "^3.0.3"
|
|
189
189
|
},
|