braid-design-system 32.2.0 → 32.3.1
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 +119 -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 +70 -30
- package/dist/Toggle.chunk.mjs +80 -40
- package/dist/reset.d.ts +22 -4
- package/dist/styles/lib/components/MenuItemCheckbox/MenuItemCheckbox.css.cjs +30 -0
- package/dist/styles/lib/components/MenuItemCheckbox/MenuItemCheckbox.css.mjs +31 -0
- 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 +33 -5
- package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.mjs +33 -5
- 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/components/private/InlineField/InlineField.css.cjs +29 -32
- package/dist/styles/lib/components/private/InlineField/InlineField.css.mjs +31 -34
- 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.cjs
CHANGED
|
@@ -21,12 +21,14 @@ const reactRemoveScroll = require("react-remove-scroll");
|
|
|
21
21
|
const styles_lib_components_Autosuggest_Autosuggest_css_cjs = require("./styles/lib/components/Autosuggest/Autosuggest.css.cjs");
|
|
22
22
|
const matchHighlights = require("autosuggest-highlight/match/index.js");
|
|
23
23
|
const clsx = require("clsx");
|
|
24
|
+
const styles_lib_components_private_Keyline_Keyline_css_cjs = require("./styles/lib/components/private/Keyline/Keyline.css.cjs");
|
|
24
25
|
const FocusLock = require("react-focus-lock");
|
|
25
26
|
const styles_lib_components_private_Modal_ModalExternalGutter_cjs = require("./styles/lib/components/private/Modal/ModalExternalGutter.cjs");
|
|
26
27
|
const styles_lib_components_private_Modal_Modal_css_cjs = require("./styles/lib/components/private/Modal/Modal.css.cjs");
|
|
27
28
|
const styles_lib_css_lineHeightContainer_css_cjs = require("./styles/lib/css/lineHeightContainer.css.cjs");
|
|
28
29
|
const styles_lib_components_List_List_css_cjs = require("./styles/lib/components/List/List.css.cjs");
|
|
29
30
|
const styles_lib_components_Loader_Loader_css_cjs = require("./styles/lib/components/Loader/Loader.css.cjs");
|
|
31
|
+
const styles_lib_components_MenuItemCheckbox_MenuItemCheckbox_css_cjs = require("./styles/lib/components/MenuItemCheckbox/MenuItemCheckbox.css.cjs");
|
|
30
32
|
const styles_lib_components_MenuItem_useMenuItem_css_cjs = require("./styles/lib/components/MenuItem/useMenuItem.css.cjs");
|
|
31
33
|
const styles_lib_components_MenuRenderer_MenuRenderer_css_cjs = require("./styles/lib/components/MenuRenderer/MenuRenderer.css.cjs");
|
|
32
34
|
const styles_lib_components_OverflowMenu_OverflowMenu_css_cjs = require("./styles/lib/components/OverflowMenu/OverflowMenu.css.cjs");
|
|
@@ -2268,7 +2270,8 @@ const Alert = ({
|
|
|
2268
2270
|
{
|
|
2269
2271
|
id,
|
|
2270
2272
|
background: backgroundForTone[tone],
|
|
2271
|
-
|
|
2273
|
+
paddingY: "medium",
|
|
2274
|
+
paddingX: "gutter",
|
|
2272
2275
|
borderRadius: borderRadius$3,
|
|
2273
2276
|
position: "relative",
|
|
2274
2277
|
overflow: "hidden",
|
|
@@ -2342,8 +2345,7 @@ const Alert = ({
|
|
|
2342
2345
|
boxShadow: { lightMode: borderForTone[tone] },
|
|
2343
2346
|
visible: true
|
|
2344
2347
|
}
|
|
2345
|
-
)
|
|
2346
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToastContext.Keyline, { tone, borderRadius: borderRadius$3 })
|
|
2348
|
+
)
|
|
2347
2349
|
]
|
|
2348
2350
|
}
|
|
2349
2351
|
);
|
|
@@ -2456,10 +2458,11 @@ const FieldLabel = ({
|
|
|
2456
2458
|
description ? /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Box, { paddingTop: label ? "xxsmall" : void 0, paddingBottom: "xxsmall", children: /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Text, { tone: "secondary", id: descriptionId, children: description }) }) : null
|
|
2457
2459
|
] });
|
|
2458
2460
|
};
|
|
2459
|
-
const tones$1 = ["neutral", "critical", "positive"];
|
|
2461
|
+
const tones$1 = ["neutral", "critical", "positive", "caution"];
|
|
2460
2462
|
const icon = {
|
|
2461
2463
|
critical: /* @__PURE__ */ jsxRuntime.jsx(ToastContext.IconCritical, { tone: "critical" }),
|
|
2462
|
-
positive: /* @__PURE__ */ jsxRuntime.jsx(ToastContext.IconPositive, { tone: "positive" })
|
|
2464
|
+
positive: /* @__PURE__ */ jsxRuntime.jsx(ToastContext.IconPositive, { tone: "positive" }),
|
|
2465
|
+
caution: /* @__PURE__ */ jsxRuntime.jsx(IconCaution, { tone: "caution" })
|
|
2463
2466
|
};
|
|
2464
2467
|
const FieldMessage = ({
|
|
2465
2468
|
id,
|
|
@@ -3749,6 +3752,36 @@ const ButtonLink = React.forwardRef(
|
|
|
3749
3752
|
}
|
|
3750
3753
|
);
|
|
3751
3754
|
ButtonLink.displayName = "ButtonLink";
|
|
3755
|
+
const Keyline = ({ tone, borderRadius: borderRadius2 }) => {
|
|
3756
|
+
const backgroundLightness = ToastContext.useBackgroundLightness();
|
|
3757
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3758
|
+
ToastContext.Box,
|
|
3759
|
+
{
|
|
3760
|
+
component: "span",
|
|
3761
|
+
position: "absolute",
|
|
3762
|
+
top: 0,
|
|
3763
|
+
bottom: 0,
|
|
3764
|
+
left: 0,
|
|
3765
|
+
overflow: "hidden",
|
|
3766
|
+
borderRadius: borderRadius2,
|
|
3767
|
+
className: [styles_lib_components_private_Keyline_Keyline_css_cjs.noRadiusOnRight, styles_lib_components_private_Keyline_Keyline_css_cjs.largestWidth],
|
|
3768
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3769
|
+
ToastContext.Box,
|
|
3770
|
+
{
|
|
3771
|
+
component: "span",
|
|
3772
|
+
height: "full",
|
|
3773
|
+
display: "inlineBlock",
|
|
3774
|
+
className: [
|
|
3775
|
+
styles_lib_components_private_Keyline_Keyline_css_cjs.width,
|
|
3776
|
+
styles_lib_components_private_Keyline_Keyline_css_cjs.tone[tone],
|
|
3777
|
+
styles_lib_components_private_Keyline_Keyline_css_cjs.lightMode[backgroundLightness.lightMode],
|
|
3778
|
+
styles_lib_components_private_Keyline_Keyline_css_cjs.darkMode[backgroundLightness.darkMode]
|
|
3779
|
+
]
|
|
3780
|
+
}
|
|
3781
|
+
)
|
|
3782
|
+
}
|
|
3783
|
+
);
|
|
3784
|
+
};
|
|
3752
3785
|
const validCardComponents = [
|
|
3753
3786
|
"div",
|
|
3754
3787
|
"article",
|
|
@@ -3791,7 +3824,7 @@ const Card = ({
|
|
|
3791
3824
|
borderRadius: resolvedRounding,
|
|
3792
3825
|
...ToastContext.buildDataAttributes({ data, validateRestProps: restProps }),
|
|
3793
3826
|
children: [
|
|
3794
|
-
tone ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3827
|
+
tone ? /* @__PURE__ */ jsxRuntime.jsx(Keyline, { tone, borderRadius: resolvedRounding }) : null,
|
|
3795
3828
|
children
|
|
3796
3829
|
]
|
|
3797
3830
|
}
|
|
@@ -3914,7 +3947,7 @@ const StyledInput = React.forwardRef(
|
|
|
3914
3947
|
zIndex: 1,
|
|
3915
3948
|
className: [
|
|
3916
3949
|
styles_lib_components_private_InlineField_InlineField_css_cjs.realField,
|
|
3917
|
-
styles_lib_components_private_InlineField_InlineField_css_cjs.
|
|
3950
|
+
styles_lib_components_private_InlineField_InlineField_css_cjs.sizeVars[size],
|
|
3918
3951
|
isMixed ? styles_lib_components_private_InlineField_InlineField_css_cjs.isMixed : void 0
|
|
3919
3952
|
],
|
|
3920
3953
|
cursor: !disabled ? "pointer" : void 0,
|
|
@@ -3935,7 +3968,7 @@ const StyledInput = React.forwardRef(
|
|
|
3935
3968
|
{
|
|
3936
3969
|
flexShrink: 0,
|
|
3937
3970
|
position: "relative",
|
|
3938
|
-
className: [styles_lib_components_private_InlineField_InlineField_css_cjs.fakeField, styles_lib_components_private_InlineField_InlineField_css_cjs.
|
|
3971
|
+
className: [styles_lib_components_private_InlineField_InlineField_css_cjs.fakeField, styles_lib_components_private_InlineField_InlineField_css_cjs.sizeVars[size]],
|
|
3939
3972
|
background: fieldBackground,
|
|
3940
3973
|
borderRadius: fieldBorderRadius,
|
|
3941
3974
|
children: [
|
|
@@ -4015,7 +4048,14 @@ const InlineField = React.forwardRef(
|
|
|
4015
4048
|
const messageId = `${id}-message`;
|
|
4016
4049
|
const descriptionId = `${id}-description`;
|
|
4017
4050
|
const hasMessage = message || reserveMessageSpace;
|
|
4018
|
-
|
|
4051
|
+
if (process.env.NODE_ENV !== "production") {
|
|
4052
|
+
if (badge && badge.props.bleedY !== void 0) {
|
|
4053
|
+
console.warn(
|
|
4054
|
+
`Badge elements cannot set the \`bleedY\` prop when passed to a ${type.charAt(0).toUpperCase()}${type.slice(1)} component`
|
|
4055
|
+
);
|
|
4056
|
+
}
|
|
4057
|
+
}
|
|
4058
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Box, { position: "relative", children: [
|
|
4019
4059
|
/* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Box, { display: "flex", children: [
|
|
4020
4060
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4021
4061
|
StyledInput,
|
|
@@ -4042,7 +4082,7 @@ const InlineField = React.forwardRef(
|
|
|
4042
4082
|
}
|
|
4043
4083
|
),
|
|
4044
4084
|
/* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Box, { paddingLeft: "small", flexGrow: 1, children: [
|
|
4045
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Inline, { space: "small", children: [
|
|
4085
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToastContext.Box, { className: [styles_lib_components_private_InlineField_InlineField_css_cjs.sizeVars[size], styles_lib_components_private_InlineField_InlineField_css_cjs.labelOffset], children: /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Inline, { space: "small", alignY: "center", children: [
|
|
4046
4086
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4047
4087
|
ToastContext.Box,
|
|
4048
4088
|
{
|
|
@@ -4051,7 +4091,7 @@ const InlineField = React.forwardRef(
|
|
|
4051
4091
|
userSelect: "none",
|
|
4052
4092
|
display: "block",
|
|
4053
4093
|
cursor: !disabled ? "pointer" : void 0,
|
|
4054
|
-
className:
|
|
4094
|
+
className: ToastContext.virtualTouchable(),
|
|
4055
4095
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4056
4096
|
ToastContext.Text,
|
|
4057
4097
|
{
|
|
@@ -4063,12 +4103,13 @@ const InlineField = React.forwardRef(
|
|
|
4063
4103
|
)
|
|
4064
4104
|
}
|
|
4065
4105
|
),
|
|
4066
|
-
badge ?
|
|
4067
|
-
] }),
|
|
4106
|
+
badge ? React.cloneElement(badge, { bleedY: true }) : null
|
|
4107
|
+
] }) }),
|
|
4068
4108
|
description ? /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Box, { paddingTop: "small", children: /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Text, { tone: "secondary", size, id: descriptionId, children: description }) }) : null,
|
|
4069
4109
|
children ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4070
4110
|
ToastContext.Box,
|
|
4071
4111
|
{
|
|
4112
|
+
position: "relative",
|
|
4072
4113
|
display: "none",
|
|
4073
4114
|
paddingTop: "small",
|
|
4074
4115
|
className: styles_lib_components_private_InlineField_InlineField_css_cjs.children,
|
|
@@ -5467,7 +5508,7 @@ const MenuItemCheckbox = ({
|
|
|
5467
5508
|
background: { lightMode: "surface" },
|
|
5468
5509
|
marginRight: "small",
|
|
5469
5510
|
flexShrink: 0,
|
|
5470
|
-
className:
|
|
5511
|
+
className: styles_lib_components_MenuItemCheckbox_MenuItemCheckbox_css_cjs.checkboxSize,
|
|
5471
5512
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5472
5513
|
ToastContext.Box,
|
|
5473
5514
|
{
|
|
@@ -5758,7 +5799,7 @@ const MonthPicker = ({
|
|
|
5758
5799
|
] })
|
|
5759
5800
|
}
|
|
5760
5801
|
);
|
|
5761
|
-
const customFieldGroup = /* @__PURE__ */ jsxRuntime.jsx(FieldGroup, { id, tone, disabled, ...restProps, children: (fieldGroupProps) => /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Columns, { space: "
|
|
5802
|
+
const customFieldGroup = /* @__PURE__ */ jsxRuntime.jsx(FieldGroup, { id, tone, disabled, ...restProps, children: (fieldGroupProps) => /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Columns, { space: "small", children: [
|
|
5762
5803
|
/* @__PURE__ */ jsxRuntime.jsx(ToastContext.Column, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5763
5804
|
Dropdown,
|
|
5764
5805
|
{
|
|
@@ -7508,17 +7549,9 @@ const Tag = ({
|
|
|
7508
7549
|
}
|
|
7509
7550
|
);
|
|
7510
7551
|
};
|
|
7511
|
-
const
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
component: "mark",
|
|
7515
|
-
borderRadius: "small",
|
|
7516
|
-
background: { lightMode: "criticalLight", darkMode: "critical" },
|
|
7517
|
-
className: styles_lib_components_Textarea_Highlight_Highlight_css_cjs.root,
|
|
7518
|
-
children
|
|
7519
|
-
}
|
|
7520
|
-
);
|
|
7521
|
-
const formatRanges = (value, highlightRanges) => {
|
|
7552
|
+
const styleForTone = { caution: styles_lib_components_Textarea_Highlight_Highlight_css_cjs.caution, critical: styles_lib_components_Textarea_Highlight_Highlight_css_cjs.critical };
|
|
7553
|
+
const Highlight = ({ children, tone }) => /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Box, { component: "mark", className: [styles_lib_components_Textarea_Highlight_Highlight_css_cjs.root, styleForTone[tone]], children });
|
|
7554
|
+
const formatRanges = (value, highlightRanges, tone) => {
|
|
7522
7555
|
if (highlightRanges && value) {
|
|
7523
7556
|
let lastEnd = 0;
|
|
7524
7557
|
const validatedAndSortedRanges = highlightRanges.sort((a, b) => a.start > b.start ? 1 : -1).reduce((acc, { end, start }) => {
|
|
@@ -7545,7 +7578,9 @@ const formatRanges = (value, highlightRanges) => {
|
|
|
7545
7578
|
])
|
|
7546
7579
|
).reduce((acc, { text, highlight }, i) => {
|
|
7547
7580
|
if (text) {
|
|
7548
|
-
acc.push(
|
|
7581
|
+
acc.push(
|
|
7582
|
+
highlight ? /* @__PURE__ */ jsxRuntime.jsx(Highlight, { tone, children: text }, i) : text
|
|
7583
|
+
);
|
|
7549
7584
|
}
|
|
7550
7585
|
return acc;
|
|
7551
7586
|
}, []);
|
|
@@ -7592,6 +7627,8 @@ const Textarea = React.forwardRef(
|
|
|
7592
7627
|
lines = 3,
|
|
7593
7628
|
lineLimit,
|
|
7594
7629
|
grow = true,
|
|
7630
|
+
tone,
|
|
7631
|
+
spellCheck,
|
|
7595
7632
|
...restProps
|
|
7596
7633
|
}, ref) => {
|
|
7597
7634
|
const [rows, setRows] = React.useState(lines);
|
|
@@ -7605,13 +7642,15 @@ const Textarea = React.forwardRef(
|
|
|
7605
7642
|
[highlightsRef]
|
|
7606
7643
|
);
|
|
7607
7644
|
const inputLength = String(value).length;
|
|
7608
|
-
const
|
|
7609
|
-
const
|
|
7645
|
+
const hasExceededCharacterLimit = characterLimit && inputLength > characterLimit;
|
|
7646
|
+
const highlightTone = !hasExceededCharacterLimit && (tone === "critical" || tone === "caution") ? tone : "critical";
|
|
7647
|
+
const highlightRanges = hasExceededCharacterLimit ? [{ start: characterLimit }] : highlightRangesProp;
|
|
7610
7648
|
const hasHighlights = highlightRanges.length > 0;
|
|
7611
7649
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7612
7650
|
Field,
|
|
7613
7651
|
{
|
|
7614
7652
|
...restProps,
|
|
7653
|
+
tone,
|
|
7615
7654
|
value,
|
|
7616
7655
|
icon: void 0,
|
|
7617
7656
|
prefix: void 0,
|
|
@@ -7642,7 +7681,7 @@ const Textarea = React.forwardRef(
|
|
|
7642
7681
|
left: 0,
|
|
7643
7682
|
className: [styles_lib_components_Textarea_Textarea_css_cjs.highlights, className],
|
|
7644
7683
|
...fieldProps,
|
|
7645
|
-
children: formatRanges(String(value), highlightRanges)
|
|
7684
|
+
children: formatRanges(String(value), highlightRanges, highlightTone)
|
|
7646
7685
|
}
|
|
7647
7686
|
) : null,
|
|
7648
7687
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7669,6 +7708,7 @@ const Textarea = React.forwardRef(
|
|
|
7669
7708
|
onPaste,
|
|
7670
7709
|
onScroll: hasHighlights ? (event) => updateScroll(event.currentTarget.scrollTop) : void 0,
|
|
7671
7710
|
placeholder: !restProps.disabled ? placeholder : void 0,
|
|
7711
|
+
spellCheck,
|
|
7672
7712
|
className: [styles_lib_components_Textarea_Textarea_css_cjs.field, className],
|
|
7673
7713
|
...fieldProps,
|
|
7674
7714
|
ref
|
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,32 +20,34 @@ 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";
|
|
26
27
|
import { lineHeightContainer } from "./styles/lib/css/lineHeightContainer.css.mjs";
|
|
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";
|
|
30
|
+
import { checkboxSize } from "./styles/lib/components/MenuItemCheckbox/MenuItemCheckbox.css.mjs";
|
|
29
31
|
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";
|
|
32
|
+
import { backdrop as backdrop$2, menuIsClosed, width as width$1, placementBottom } from "./styles/lib/components/MenuRenderer/MenuRenderer.css.mjs";
|
|
31
33
|
import { triggerOffset } from "./styles/lib/components/OverflowMenu/OverflowMenu.css.mjs";
|
|
32
34
|
import { isMobile } from "is-mobile";
|
|
33
35
|
import { field as field$1 } from "./styles/lib/components/Dropdown/Dropdown.css.mjs";
|
|
34
36
|
import { nativeInput } from "./styles/lib/components/MonthPicker/MonthPicker.css.mjs";
|
|
35
37
|
import { hover, background, current, lightModeCurrentKeyline, darkModeCurrentKeyline } from "./styles/lib/components/Pagination/Pagination.css.mjs";
|
|
36
|
-
import { realField,
|
|
38
|
+
import { realField, sizeVars, isMixed, fakeField, selected, focusOverlay as focusOverlay$1, hoverOverlay as hoverOverlay$1, checkboxIndicator, radioIndicator, labelOffset, children } from "./styles/lib/components/private/InlineField/InlineField.css.mjs";
|
|
37
39
|
import { starSpacing, textSpacing, lightModeStarColor, darkModeStarColor } from "./styles/lib/components/Rating/Rating.css.mjs";
|
|
38
|
-
import { step, tone as tone$
|
|
40
|
+
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
41
|
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
42
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
41
43
|
import { clearGutter } from "./styles/lib/components/Tag/Tag.css.mjs";
|
|
42
|
-
import { root as root$
|
|
44
|
+
import { root as root$4, caution, critical } from "./styles/lib/components/Textarea/Highlight/Highlight.css.mjs";
|
|
43
45
|
import { highlights, field as field$2 } from "./styles/lib/components/Textarea/Textarea.css.mjs";
|
|
44
46
|
import { select, focusOverlay as focusOverlay$3 } from "./styles/lib/components/TextDropdown/TextDropdown.css.mjs";
|
|
45
47
|
import { root as root$1, up, left, right } from "./styles/lib/components/icons/IconChevron/IconChevron.css.mjs";
|
|
46
48
|
import { secondaryIconSpace, field, placeholderColor, iconSpace, verticalDivider, focusOverlay, hoverOverlay } from "./styles/lib/components/private/Field/Field.css.mjs";
|
|
47
49
|
import { columnsWide, columnsDesktop, columnsTablet, columnsMobile } from "./styles/lib/components/Tiles/Tiles.css.mjs";
|
|
48
|
-
import { root as root$
|
|
50
|
+
import { root as root$5, realField as realField$1, realFieldPosition, fieldSize, slideContainer, slideContainerSize, slideTrack, slideTrackMask, slideTrackBgLightMode, slideTrackBgDarkMode, slideTrackSelected, slider, icon as icon$1, focusOverlay as focusOverlay$4, hoverOverlay as hoverOverlay$2, label } from "./styles/lib/components/Toggle/Toggle.css.mjs";
|
|
49
51
|
const ThemeNameConsumer = ({ children: children2 }) => children2(useThemeName());
|
|
50
52
|
const useColor = () => useBraidTheme().color;
|
|
51
53
|
const useBreakpoint = () => {
|
|
@@ -2260,7 +2262,8 @@ const Alert = ({
|
|
|
2260
2262
|
{
|
|
2261
2263
|
id,
|
|
2262
2264
|
background: backgroundForTone[tone2],
|
|
2263
|
-
|
|
2265
|
+
paddingY: "medium",
|
|
2266
|
+
paddingX: "gutter",
|
|
2264
2267
|
borderRadius: borderRadius$3,
|
|
2265
2268
|
position: "relative",
|
|
2266
2269
|
overflow: "hidden",
|
|
@@ -2334,8 +2337,7 @@ const Alert = ({
|
|
|
2334
2337
|
boxShadow: { lightMode: borderForTone[tone2] },
|
|
2335
2338
|
visible: true
|
|
2336
2339
|
}
|
|
2337
|
-
)
|
|
2338
|
-
/* @__PURE__ */ jsx(Keyline, { tone: tone2, borderRadius: borderRadius$3 })
|
|
2340
|
+
)
|
|
2339
2341
|
]
|
|
2340
2342
|
}
|
|
2341
2343
|
);
|
|
@@ -2448,10 +2450,11 @@ const FieldLabel = ({
|
|
|
2448
2450
|
description ? /* @__PURE__ */ jsx(Box, { paddingTop: label2 ? "xxsmall" : void 0, paddingBottom: "xxsmall", children: /* @__PURE__ */ jsx(Text, { tone: "secondary", id: descriptionId, children: description }) }) : null
|
|
2449
2451
|
] });
|
|
2450
2452
|
};
|
|
2451
|
-
const tones$1 = ["neutral", "critical", "positive"];
|
|
2453
|
+
const tones$1 = ["neutral", "critical", "positive", "caution"];
|
|
2452
2454
|
const icon = {
|
|
2453
2455
|
critical: /* @__PURE__ */ jsx(IconCritical, { tone: "critical" }),
|
|
2454
|
-
positive: /* @__PURE__ */ jsx(IconPositive, { tone: "positive" })
|
|
2456
|
+
positive: /* @__PURE__ */ jsx(IconPositive, { tone: "positive" }),
|
|
2457
|
+
caution: /* @__PURE__ */ jsx(IconCaution, { tone: "caution" })
|
|
2455
2458
|
};
|
|
2456
2459
|
const FieldMessage = ({
|
|
2457
2460
|
id,
|
|
@@ -3741,6 +3744,36 @@ const ButtonLink = forwardRef(
|
|
|
3741
3744
|
}
|
|
3742
3745
|
);
|
|
3743
3746
|
ButtonLink.displayName = "ButtonLink";
|
|
3747
|
+
const Keyline = ({ tone: tone2, borderRadius: borderRadius2 }) => {
|
|
3748
|
+
const backgroundLightness = useBackgroundLightness();
|
|
3749
|
+
return /* @__PURE__ */ jsx(
|
|
3750
|
+
Box,
|
|
3751
|
+
{
|
|
3752
|
+
component: "span",
|
|
3753
|
+
position: "absolute",
|
|
3754
|
+
top: 0,
|
|
3755
|
+
bottom: 0,
|
|
3756
|
+
left: 0,
|
|
3757
|
+
overflow: "hidden",
|
|
3758
|
+
borderRadius: borderRadius2,
|
|
3759
|
+
className: [noRadiusOnRight, largestWidth],
|
|
3760
|
+
children: /* @__PURE__ */ jsx(
|
|
3761
|
+
Box,
|
|
3762
|
+
{
|
|
3763
|
+
component: "span",
|
|
3764
|
+
height: "full",
|
|
3765
|
+
display: "inlineBlock",
|
|
3766
|
+
className: [
|
|
3767
|
+
width,
|
|
3768
|
+
tone$1[tone2],
|
|
3769
|
+
lightMode[backgroundLightness.lightMode],
|
|
3770
|
+
darkMode[backgroundLightness.darkMode]
|
|
3771
|
+
]
|
|
3772
|
+
}
|
|
3773
|
+
)
|
|
3774
|
+
}
|
|
3775
|
+
);
|
|
3776
|
+
};
|
|
3744
3777
|
const validCardComponents = [
|
|
3745
3778
|
"div",
|
|
3746
3779
|
"article",
|
|
@@ -3906,7 +3939,7 @@ const StyledInput = forwardRef(
|
|
|
3906
3939
|
zIndex: 1,
|
|
3907
3940
|
className: [
|
|
3908
3941
|
realField,
|
|
3909
|
-
|
|
3942
|
+
sizeVars[size2],
|
|
3910
3943
|
isMixed$1 ? isMixed : void 0
|
|
3911
3944
|
],
|
|
3912
3945
|
cursor: !disabled ? "pointer" : void 0,
|
|
@@ -3927,7 +3960,7 @@ const StyledInput = forwardRef(
|
|
|
3927
3960
|
{
|
|
3928
3961
|
flexShrink: 0,
|
|
3929
3962
|
position: "relative",
|
|
3930
|
-
className: [fakeField,
|
|
3963
|
+
className: [fakeField, sizeVars[size2]],
|
|
3931
3964
|
background: fieldBackground,
|
|
3932
3965
|
borderRadius: fieldBorderRadius,
|
|
3933
3966
|
children: [
|
|
@@ -4007,7 +4040,14 @@ const InlineField = forwardRef(
|
|
|
4007
4040
|
const messageId = `${id}-message`;
|
|
4008
4041
|
const descriptionId = `${id}-description`;
|
|
4009
4042
|
const hasMessage = message || reserveMessageSpace;
|
|
4010
|
-
|
|
4043
|
+
if (process.env.NODE_ENV !== "production") {
|
|
4044
|
+
if (badge && badge.props.bleedY !== void 0) {
|
|
4045
|
+
console.warn(
|
|
4046
|
+
`Badge elements cannot set the \`bleedY\` prop when passed to a ${type.charAt(0).toUpperCase()}${type.slice(1)} component`
|
|
4047
|
+
);
|
|
4048
|
+
}
|
|
4049
|
+
}
|
|
4050
|
+
return /* @__PURE__ */ jsxs(Box, { position: "relative", children: [
|
|
4011
4051
|
/* @__PURE__ */ jsxs(Box, { display: "flex", children: [
|
|
4012
4052
|
/* @__PURE__ */ jsx(
|
|
4013
4053
|
StyledInput,
|
|
@@ -4034,7 +4074,7 @@ const InlineField = forwardRef(
|
|
|
4034
4074
|
}
|
|
4035
4075
|
),
|
|
4036
4076
|
/* @__PURE__ */ jsxs(Box, { paddingLeft: "small", flexGrow: 1, children: [
|
|
4037
|
-
/* @__PURE__ */ jsxs(Inline, { space: "small", children: [
|
|
4077
|
+
/* @__PURE__ */ jsx(Box, { className: [sizeVars[size2], labelOffset], children: /* @__PURE__ */ jsxs(Inline, { space: "small", alignY: "center", children: [
|
|
4038
4078
|
/* @__PURE__ */ jsx(
|
|
4039
4079
|
Box,
|
|
4040
4080
|
{
|
|
@@ -4043,7 +4083,7 @@ const InlineField = forwardRef(
|
|
|
4043
4083
|
userSelect: "none",
|
|
4044
4084
|
display: "block",
|
|
4045
4085
|
cursor: !disabled ? "pointer" : void 0,
|
|
4046
|
-
className:
|
|
4086
|
+
className: virtualTouchable(),
|
|
4047
4087
|
children: /* @__PURE__ */ jsx(
|
|
4048
4088
|
Text,
|
|
4049
4089
|
{
|
|
@@ -4055,12 +4095,13 @@ const InlineField = forwardRef(
|
|
|
4055
4095
|
)
|
|
4056
4096
|
}
|
|
4057
4097
|
),
|
|
4058
|
-
badge ?
|
|
4059
|
-
] }),
|
|
4098
|
+
badge ? cloneElement(badge, { bleedY: true }) : null
|
|
4099
|
+
] }) }),
|
|
4060
4100
|
description ? /* @__PURE__ */ jsx(Box, { paddingTop: "small", children: /* @__PURE__ */ jsx(Text, { tone: "secondary", size: size2, id: descriptionId, children: description }) }) : null,
|
|
4061
4101
|
children$1 ? /* @__PURE__ */ jsx(
|
|
4062
4102
|
Box,
|
|
4063
4103
|
{
|
|
4104
|
+
position: "relative",
|
|
4064
4105
|
display: "none",
|
|
4065
4106
|
paddingTop: "small",
|
|
4066
4107
|
className: children,
|
|
@@ -5172,7 +5213,7 @@ const borderRadius$1 = "large";
|
|
|
5172
5213
|
function Menu({
|
|
5173
5214
|
offsetSpace,
|
|
5174
5215
|
align,
|
|
5175
|
-
width:
|
|
5216
|
+
width: width2,
|
|
5176
5217
|
placement,
|
|
5177
5218
|
children: children2,
|
|
5178
5219
|
open,
|
|
@@ -5200,7 +5241,7 @@ function Menu({
|
|
|
5200
5241
|
overflow: "hidden",
|
|
5201
5242
|
className: [
|
|
5202
5243
|
!open && menuIsClosed,
|
|
5203
|
-
|
|
5244
|
+
width2 !== "content" && width$1[width2],
|
|
5204
5245
|
placement === "top" && placementBottom
|
|
5205
5246
|
],
|
|
5206
5247
|
children: [
|
|
@@ -5459,7 +5500,7 @@ const MenuItemCheckbox = ({
|
|
|
5459
5500
|
background: { lightMode: "surface" },
|
|
5460
5501
|
marginRight: "small",
|
|
5461
5502
|
flexShrink: 0,
|
|
5462
|
-
className:
|
|
5503
|
+
className: checkboxSize,
|
|
5463
5504
|
children: /* @__PURE__ */ jsx(
|
|
5464
5505
|
Box,
|
|
5465
5506
|
{
|
|
@@ -5750,7 +5791,7 @@ const MonthPicker = ({
|
|
|
5750
5791
|
] })
|
|
5751
5792
|
}
|
|
5752
5793
|
);
|
|
5753
|
-
const customFieldGroup = /* @__PURE__ */ jsx(FieldGroup, { id, tone: tone2, disabled, ...restProps, children: (fieldGroupProps) => /* @__PURE__ */ jsxs(Columns, { space: "
|
|
5794
|
+
const customFieldGroup = /* @__PURE__ */ jsx(FieldGroup, { id, tone: tone2, disabled, ...restProps, children: (fieldGroupProps) => /* @__PURE__ */ jsxs(Columns, { space: "small", children: [
|
|
5754
5795
|
/* @__PURE__ */ jsx(Column, { children: /* @__PURE__ */ jsx(
|
|
5755
5796
|
Dropdown,
|
|
5756
5797
|
{
|
|
@@ -6598,7 +6639,7 @@ const Step = ({ complete: complete2 = false, id, children: children2 }) => {
|
|
|
6598
6639
|
cursor: interactable ? "pointer" : void 0,
|
|
6599
6640
|
pointerEvents: !interactable && !active2 ? "none" : void 0,
|
|
6600
6641
|
"aria-current": active2 ? "step" : void 0,
|
|
6601
|
-
className: [step, tone$
|
|
6642
|
+
className: [step, tone$2[tone2]],
|
|
6602
6643
|
onClick: interactable ? () => {
|
|
6603
6644
|
if (onClick) {
|
|
6604
6645
|
onClick(stepNumber);
|
|
@@ -7500,17 +7541,9 @@ const Tag = ({
|
|
|
7500
7541
|
}
|
|
7501
7542
|
);
|
|
7502
7543
|
};
|
|
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) => {
|
|
7544
|
+
const styleForTone = { caution, critical };
|
|
7545
|
+
const Highlight = ({ children: children2, tone: tone2 }) => /* @__PURE__ */ jsx(Box, { component: "mark", className: [root$4, styleForTone[tone2]], children: children2 });
|
|
7546
|
+
const formatRanges = (value, highlightRanges, tone2) => {
|
|
7514
7547
|
if (highlightRanges && value) {
|
|
7515
7548
|
let lastEnd = 0;
|
|
7516
7549
|
const validatedAndSortedRanges = highlightRanges.sort((a, b) => a.start > b.start ? 1 : -1).reduce((acc, { end, start }) => {
|
|
@@ -7537,7 +7570,9 @@ const formatRanges = (value, highlightRanges) => {
|
|
|
7537
7570
|
])
|
|
7538
7571
|
).reduce((acc, { text, highlight: highlight2 }, i) => {
|
|
7539
7572
|
if (text) {
|
|
7540
|
-
acc.push(
|
|
7573
|
+
acc.push(
|
|
7574
|
+
highlight2 ? /* @__PURE__ */ jsx(Highlight, { tone: tone2, children: text }, i) : text
|
|
7575
|
+
);
|
|
7541
7576
|
}
|
|
7542
7577
|
return acc;
|
|
7543
7578
|
}, []);
|
|
@@ -7584,6 +7619,8 @@ const Textarea = forwardRef(
|
|
|
7584
7619
|
lines = 3,
|
|
7585
7620
|
lineLimit,
|
|
7586
7621
|
grow = true,
|
|
7622
|
+
tone: tone2,
|
|
7623
|
+
spellCheck,
|
|
7587
7624
|
...restProps
|
|
7588
7625
|
}, ref) => {
|
|
7589
7626
|
const [rows, setRows] = useState(lines);
|
|
@@ -7597,13 +7634,15 @@ const Textarea = forwardRef(
|
|
|
7597
7634
|
[highlightsRef]
|
|
7598
7635
|
);
|
|
7599
7636
|
const inputLength = String(value).length;
|
|
7600
|
-
const
|
|
7601
|
-
const
|
|
7637
|
+
const hasExceededCharacterLimit = characterLimit && inputLength > characterLimit;
|
|
7638
|
+
const highlightTone = !hasExceededCharacterLimit && (tone2 === "critical" || tone2 === "caution") ? tone2 : "critical";
|
|
7639
|
+
const highlightRanges = hasExceededCharacterLimit ? [{ start: characterLimit }] : highlightRangesProp;
|
|
7602
7640
|
const hasHighlights = highlightRanges.length > 0;
|
|
7603
7641
|
return /* @__PURE__ */ jsx(
|
|
7604
7642
|
Field,
|
|
7605
7643
|
{
|
|
7606
7644
|
...restProps,
|
|
7645
|
+
tone: tone2,
|
|
7607
7646
|
value,
|
|
7608
7647
|
icon: void 0,
|
|
7609
7648
|
prefix: void 0,
|
|
@@ -7634,7 +7673,7 @@ const Textarea = forwardRef(
|
|
|
7634
7673
|
left: 0,
|
|
7635
7674
|
className: [highlights, className],
|
|
7636
7675
|
...fieldProps,
|
|
7637
|
-
children: formatRanges(String(value), highlightRanges)
|
|
7676
|
+
children: formatRanges(String(value), highlightRanges, highlightTone)
|
|
7638
7677
|
}
|
|
7639
7678
|
) : null,
|
|
7640
7679
|
/* @__PURE__ */ jsx(
|
|
@@ -7661,6 +7700,7 @@ const Textarea = forwardRef(
|
|
|
7661
7700
|
onPaste,
|
|
7662
7701
|
onScroll: hasHighlights ? (event) => updateScroll(event.currentTarget.scrollTop) : void 0,
|
|
7663
7702
|
placeholder: !restProps.disabled ? placeholder : void 0,
|
|
7703
|
+
spellCheck,
|
|
7664
7704
|
className: [field$2, className],
|
|
7665
7705
|
...fieldProps,
|
|
7666
7706
|
ref
|
|
@@ -7920,7 +7960,7 @@ const Toggle = forwardRef(
|
|
|
7920
7960
|
zIndex: 0,
|
|
7921
7961
|
display: "flex",
|
|
7922
7962
|
flexDirection: align === "left" ? void 0 : "rowReverse",
|
|
7923
|
-
className: root$
|
|
7963
|
+
className: root$5,
|
|
7924
7964
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
7925
7965
|
children: [
|
|
7926
7966
|
/* @__PURE__ */ jsx(
|
|
@@ -7937,7 +7977,7 @@ const Toggle = forwardRef(
|
|
|
7937
7977
|
opacity: 0,
|
|
7938
7978
|
className: [
|
|
7939
7979
|
realField$1,
|
|
7940
|
-
realFieldPosition
|
|
7980
|
+
realFieldPosition[size2],
|
|
7941
7981
|
fieldSize[size2]
|
|
7942
7982
|
],
|
|
7943
7983
|
ref: forwardedRef
|
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;
|