braid-design-system 32.3.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 +30 -0
- package/dist/Toggle.chunk.cjs +18 -9
- package/dist/Toggle.chunk.mjs +24 -15
- 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/Textarea/Highlight/Highlight.css.cjs +5 -8
- package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.mjs +5 -8
- 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/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 32.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **RadioItem, Checkbox:** Fix stacking context behaviour ([#1284](https://github.com/seek-oss/braid-design-system/pull/1284))
|
|
8
|
+
|
|
9
|
+
A `RadioItem` and `Checkbox` previously created a new stacking context with an elevated `z-index` applied on hover, resulting in their labels overlaying other elements in an unpredictable ways — most noticable when [toggling nested content].
|
|
10
|
+
|
|
11
|
+
For example, toggling nested content containing an `Autosuggest`, would see the list of suggestions list would be overlayed by the next `RadioItem` on hover.
|
|
12
|
+
|
|
13
|
+
To fix this, the `z-index` is no longer elevated on hover, and additionally the nested content container applies an elevated index when the field is **checked**.
|
|
14
|
+
|
|
15
|
+
[toggling nested content]: https://seek-oss.github.io/braid-design-system/components/RadioGroup#toggling-nested-content
|
|
16
|
+
|
|
17
|
+
- **Textarea:** Adjust `highlightRange` background to support different line heights ([#1279](https://github.com/seek-oss/braid-design-system/pull/1279))
|
|
18
|
+
|
|
19
|
+
Remove the vertical padding on the highlight element to prevent the background colour overlapping the wavy underline in themes with tighter line heights.
|
|
20
|
+
|
|
21
|
+
- **MenuItemCheckbox:** Align checkbox size with a `small` Checkbox ([#1276](https://github.com/seek-oss/braid-design-system/pull/1276))
|
|
22
|
+
|
|
23
|
+
Align the size of a `MenuItemCheckbox` with a `small` sized `Checkbox`.
|
|
24
|
+
|
|
25
|
+
- **Checkbox, RadioItem:** Fix alignment with updated Badge layout ([#1280](https://github.com/seek-oss/braid-design-system/pull/1280))
|
|
26
|
+
|
|
27
|
+
Improve layout to work with updated Badge layout which is no longer driven by line height.
|
|
28
|
+
|
|
29
|
+
- **MonthPicker:** Reduce space between fields ([#1277](https://github.com/seek-oss/braid-design-system/pull/1277))
|
|
30
|
+
|
|
31
|
+
Reduce the space between the month and year fields.
|
|
32
|
+
|
|
3
33
|
## 32.3.0
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
package/dist/Toggle.chunk.cjs
CHANGED
|
@@ -28,6 +28,7 @@ const styles_lib_components_private_Modal_Modal_css_cjs = require("./styles/lib/
|
|
|
28
28
|
const styles_lib_css_lineHeightContainer_css_cjs = require("./styles/lib/css/lineHeightContainer.css.cjs");
|
|
29
29
|
const styles_lib_components_List_List_css_cjs = require("./styles/lib/components/List/List.css.cjs");
|
|
30
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");
|
|
31
32
|
const styles_lib_components_MenuItem_useMenuItem_css_cjs = require("./styles/lib/components/MenuItem/useMenuItem.css.cjs");
|
|
32
33
|
const styles_lib_components_MenuRenderer_MenuRenderer_css_cjs = require("./styles/lib/components/MenuRenderer/MenuRenderer.css.cjs");
|
|
33
34
|
const styles_lib_components_OverflowMenu_OverflowMenu_css_cjs = require("./styles/lib/components/OverflowMenu/OverflowMenu.css.cjs");
|
|
@@ -3946,7 +3947,7 @@ const StyledInput = React.forwardRef(
|
|
|
3946
3947
|
zIndex: 1,
|
|
3947
3948
|
className: [
|
|
3948
3949
|
styles_lib_components_private_InlineField_InlineField_css_cjs.realField,
|
|
3949
|
-
styles_lib_components_private_InlineField_InlineField_css_cjs.
|
|
3950
|
+
styles_lib_components_private_InlineField_InlineField_css_cjs.sizeVars[size],
|
|
3950
3951
|
isMixed ? styles_lib_components_private_InlineField_InlineField_css_cjs.isMixed : void 0
|
|
3951
3952
|
],
|
|
3952
3953
|
cursor: !disabled ? "pointer" : void 0,
|
|
@@ -3967,7 +3968,7 @@ const StyledInput = React.forwardRef(
|
|
|
3967
3968
|
{
|
|
3968
3969
|
flexShrink: 0,
|
|
3969
3970
|
position: "relative",
|
|
3970
|
-
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]],
|
|
3971
3972
|
background: fieldBackground,
|
|
3972
3973
|
borderRadius: fieldBorderRadius,
|
|
3973
3974
|
children: [
|
|
@@ -4047,7 +4048,14 @@ const InlineField = React.forwardRef(
|
|
|
4047
4048
|
const messageId = `${id}-message`;
|
|
4048
4049
|
const descriptionId = `${id}-description`;
|
|
4049
4050
|
const hasMessage = message || reserveMessageSpace;
|
|
4050
|
-
|
|
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: [
|
|
4051
4059
|
/* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Box, { display: "flex", children: [
|
|
4052
4060
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4053
4061
|
StyledInput,
|
|
@@ -4074,7 +4082,7 @@ const InlineField = React.forwardRef(
|
|
|
4074
4082
|
}
|
|
4075
4083
|
),
|
|
4076
4084
|
/* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Box, { paddingLeft: "small", flexGrow: 1, children: [
|
|
4077
|
-
/* @__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: [
|
|
4078
4086
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4079
4087
|
ToastContext.Box,
|
|
4080
4088
|
{
|
|
@@ -4083,7 +4091,7 @@ const InlineField = React.forwardRef(
|
|
|
4083
4091
|
userSelect: "none",
|
|
4084
4092
|
display: "block",
|
|
4085
4093
|
cursor: !disabled ? "pointer" : void 0,
|
|
4086
|
-
className:
|
|
4094
|
+
className: ToastContext.virtualTouchable(),
|
|
4087
4095
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4088
4096
|
ToastContext.Text,
|
|
4089
4097
|
{
|
|
@@ -4095,12 +4103,13 @@ const InlineField = React.forwardRef(
|
|
|
4095
4103
|
)
|
|
4096
4104
|
}
|
|
4097
4105
|
),
|
|
4098
|
-
badge ?
|
|
4099
|
-
] }),
|
|
4106
|
+
badge ? React.cloneElement(badge, { bleedY: true }) : null
|
|
4107
|
+
] }) }),
|
|
4100
4108
|
description ? /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Box, { paddingTop: "small", children: /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Text, { tone: "secondary", size, id: descriptionId, children: description }) }) : null,
|
|
4101
4109
|
children ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4102
4110
|
ToastContext.Box,
|
|
4103
4111
|
{
|
|
4112
|
+
position: "relative",
|
|
4104
4113
|
display: "none",
|
|
4105
4114
|
paddingTop: "small",
|
|
4106
4115
|
className: styles_lib_components_private_InlineField_InlineField_css_cjs.children,
|
|
@@ -5499,7 +5508,7 @@ const MenuItemCheckbox = ({
|
|
|
5499
5508
|
background: { lightMode: "surface" },
|
|
5500
5509
|
marginRight: "small",
|
|
5501
5510
|
flexShrink: 0,
|
|
5502
|
-
className:
|
|
5511
|
+
className: styles_lib_components_MenuItemCheckbox_MenuItemCheckbox_css_cjs.checkboxSize,
|
|
5503
5512
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5504
5513
|
ToastContext.Box,
|
|
5505
5514
|
{
|
|
@@ -5790,7 +5799,7 @@ const MonthPicker = ({
|
|
|
5790
5799
|
] })
|
|
5791
5800
|
}
|
|
5792
5801
|
);
|
|
5793
|
-
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: [
|
|
5794
5803
|
/* @__PURE__ */ jsxRuntime.jsx(ToastContext.Column, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5795
5804
|
Dropdown,
|
|
5796
5805
|
{
|
package/dist/Toggle.chunk.mjs
CHANGED
|
@@ -27,6 +27,7 @@ import { headingRoot, headingFocus, pointerEventsAll, maxSize, closeIconOffset,
|
|
|
27
27
|
import { lineHeightContainer } from "./styles/lib/css/lineHeightContainer.css.mjs";
|
|
28
28
|
import { currentColor, size, minCharacterWidth, trimGutter } from "./styles/lib/components/List/List.css.mjs";
|
|
29
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";
|
|
30
31
|
import { menuItem } from "./styles/lib/components/MenuItem/useMenuItem.css.mjs";
|
|
31
32
|
import { backdrop as backdrop$2, menuIsClosed, width as width$1, placementBottom } from "./styles/lib/components/MenuRenderer/MenuRenderer.css.mjs";
|
|
32
33
|
import { triggerOffset } from "./styles/lib/components/OverflowMenu/OverflowMenu.css.mjs";
|
|
@@ -34,19 +35,19 @@ import { isMobile } from "is-mobile";
|
|
|
34
35
|
import { field as field$1 } from "./styles/lib/components/Dropdown/Dropdown.css.mjs";
|
|
35
36
|
import { nativeInput } from "./styles/lib/components/MonthPicker/MonthPicker.css.mjs";
|
|
36
37
|
import { hover, background, current, lightModeCurrentKeyline, darkModeCurrentKeyline } from "./styles/lib/components/Pagination/Pagination.css.mjs";
|
|
37
|
-
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";
|
|
38
39
|
import { starSpacing, textSpacing, lightModeStarColor, darkModeStarColor } from "./styles/lib/components/Rating/Rating.css.mjs";
|
|
39
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";
|
|
40
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";
|
|
41
42
|
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
42
43
|
import { clearGutter } from "./styles/lib/components/Tag/Tag.css.mjs";
|
|
43
|
-
import { root as root$
|
|
44
|
+
import { root as root$4, caution, critical } from "./styles/lib/components/Textarea/Highlight/Highlight.css.mjs";
|
|
44
45
|
import { highlights, field as field$2 } from "./styles/lib/components/Textarea/Textarea.css.mjs";
|
|
45
46
|
import { select, focusOverlay as focusOverlay$3 } from "./styles/lib/components/TextDropdown/TextDropdown.css.mjs";
|
|
46
47
|
import { root as root$1, up, left, right } from "./styles/lib/components/icons/IconChevron/IconChevron.css.mjs";
|
|
47
48
|
import { secondaryIconSpace, field, placeholderColor, iconSpace, verticalDivider, focusOverlay, hoverOverlay } from "./styles/lib/components/private/Field/Field.css.mjs";
|
|
48
49
|
import { columnsWide, columnsDesktop, columnsTablet, columnsMobile } from "./styles/lib/components/Tiles/Tiles.css.mjs";
|
|
49
|
-
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";
|
|
50
51
|
const ThemeNameConsumer = ({ children: children2 }) => children2(useThemeName());
|
|
51
52
|
const useColor = () => useBraidTheme().color;
|
|
52
53
|
const useBreakpoint = () => {
|
|
@@ -3938,7 +3939,7 @@ const StyledInput = forwardRef(
|
|
|
3938
3939
|
zIndex: 1,
|
|
3939
3940
|
className: [
|
|
3940
3941
|
realField,
|
|
3941
|
-
|
|
3942
|
+
sizeVars[size2],
|
|
3942
3943
|
isMixed$1 ? isMixed : void 0
|
|
3943
3944
|
],
|
|
3944
3945
|
cursor: !disabled ? "pointer" : void 0,
|
|
@@ -3959,7 +3960,7 @@ const StyledInput = forwardRef(
|
|
|
3959
3960
|
{
|
|
3960
3961
|
flexShrink: 0,
|
|
3961
3962
|
position: "relative",
|
|
3962
|
-
className: [fakeField,
|
|
3963
|
+
className: [fakeField, sizeVars[size2]],
|
|
3963
3964
|
background: fieldBackground,
|
|
3964
3965
|
borderRadius: fieldBorderRadius,
|
|
3965
3966
|
children: [
|
|
@@ -4039,7 +4040,14 @@ const InlineField = forwardRef(
|
|
|
4039
4040
|
const messageId = `${id}-message`;
|
|
4040
4041
|
const descriptionId = `${id}-description`;
|
|
4041
4042
|
const hasMessage = message || reserveMessageSpace;
|
|
4042
|
-
|
|
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: [
|
|
4043
4051
|
/* @__PURE__ */ jsxs(Box, { display: "flex", children: [
|
|
4044
4052
|
/* @__PURE__ */ jsx(
|
|
4045
4053
|
StyledInput,
|
|
@@ -4066,7 +4074,7 @@ const InlineField = forwardRef(
|
|
|
4066
4074
|
}
|
|
4067
4075
|
),
|
|
4068
4076
|
/* @__PURE__ */ jsxs(Box, { paddingLeft: "small", flexGrow: 1, children: [
|
|
4069
|
-
/* @__PURE__ */ jsxs(Inline, { space: "small", children: [
|
|
4077
|
+
/* @__PURE__ */ jsx(Box, { className: [sizeVars[size2], labelOffset], children: /* @__PURE__ */ jsxs(Inline, { space: "small", alignY: "center", children: [
|
|
4070
4078
|
/* @__PURE__ */ jsx(
|
|
4071
4079
|
Box,
|
|
4072
4080
|
{
|
|
@@ -4075,7 +4083,7 @@ const InlineField = forwardRef(
|
|
|
4075
4083
|
userSelect: "none",
|
|
4076
4084
|
display: "block",
|
|
4077
4085
|
cursor: !disabled ? "pointer" : void 0,
|
|
4078
|
-
className:
|
|
4086
|
+
className: virtualTouchable(),
|
|
4079
4087
|
children: /* @__PURE__ */ jsx(
|
|
4080
4088
|
Text,
|
|
4081
4089
|
{
|
|
@@ -4087,12 +4095,13 @@ const InlineField = forwardRef(
|
|
|
4087
4095
|
)
|
|
4088
4096
|
}
|
|
4089
4097
|
),
|
|
4090
|
-
badge ?
|
|
4091
|
-
] }),
|
|
4098
|
+
badge ? cloneElement(badge, { bleedY: true }) : null
|
|
4099
|
+
] }) }),
|
|
4092
4100
|
description ? /* @__PURE__ */ jsx(Box, { paddingTop: "small", children: /* @__PURE__ */ jsx(Text, { tone: "secondary", size: size2, id: descriptionId, children: description }) }) : null,
|
|
4093
4101
|
children$1 ? /* @__PURE__ */ jsx(
|
|
4094
4102
|
Box,
|
|
4095
4103
|
{
|
|
4104
|
+
position: "relative",
|
|
4096
4105
|
display: "none",
|
|
4097
4106
|
paddingTop: "small",
|
|
4098
4107
|
className: children,
|
|
@@ -5491,7 +5500,7 @@ const MenuItemCheckbox = ({
|
|
|
5491
5500
|
background: { lightMode: "surface" },
|
|
5492
5501
|
marginRight: "small",
|
|
5493
5502
|
flexShrink: 0,
|
|
5494
|
-
className:
|
|
5503
|
+
className: checkboxSize,
|
|
5495
5504
|
children: /* @__PURE__ */ jsx(
|
|
5496
5505
|
Box,
|
|
5497
5506
|
{
|
|
@@ -5782,7 +5791,7 @@ const MonthPicker = ({
|
|
|
5782
5791
|
] })
|
|
5783
5792
|
}
|
|
5784
5793
|
);
|
|
5785
|
-
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: [
|
|
5786
5795
|
/* @__PURE__ */ jsx(Column, { children: /* @__PURE__ */ jsx(
|
|
5787
5796
|
Dropdown,
|
|
5788
5797
|
{
|
|
@@ -7533,7 +7542,7 @@ const Tag = ({
|
|
|
7533
7542
|
);
|
|
7534
7543
|
};
|
|
7535
7544
|
const styleForTone = { caution, critical };
|
|
7536
|
-
const Highlight = ({ children: children2, tone: tone2 }) => /* @__PURE__ */ jsx(Box, { component: "mark", className: [root$
|
|
7545
|
+
const Highlight = ({ children: children2, tone: tone2 }) => /* @__PURE__ */ jsx(Box, { component: "mark", className: [root$4, styleForTone[tone2]], children: children2 });
|
|
7537
7546
|
const formatRanges = (value, highlightRanges, tone2) => {
|
|
7538
7547
|
if (highlightRanges && value) {
|
|
7539
7548
|
let lastEnd = 0;
|
|
@@ -7951,7 +7960,7 @@ const Toggle = forwardRef(
|
|
|
7951
7960
|
zIndex: 0,
|
|
7952
7961
|
display: "flex",
|
|
7953
7962
|
flexDirection: align === "left" ? void 0 : "rowReverse",
|
|
7954
|
-
className: root$
|
|
7963
|
+
className: root$5,
|
|
7955
7964
|
...buildDataAttributes({ data, validateRestProps: restProps }),
|
|
7956
7965
|
children: [
|
|
7957
7966
|
/* @__PURE__ */ jsx(
|
|
@@ -7968,7 +7977,7 @@ const Toggle = forwardRef(
|
|
|
7968
7977
|
opacity: 0,
|
|
7969
7978
|
className: [
|
|
7970
7979
|
realField$1,
|
|
7971
|
-
realFieldPosition
|
|
7980
|
+
realFieldPosition[size2],
|
|
7972
7981
|
fieldSize[size2]
|
|
7973
7982
|
],
|
|
7974
7983
|
ref: forwardedRef
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const fileScope = require("@vanilla-extract/css/fileScope");
|
|
3
|
+
const css = require("@vanilla-extract/css");
|
|
4
|
+
const cssUtils = require("@vanilla-extract/css-utils");
|
|
5
|
+
const styles_lib_css_responsiveStyle_cjs = require("../../css/responsiveStyle.cjs");
|
|
6
|
+
const styles_lib_themes_vars_css_cjs = require("../../themes/vars.css.cjs");
|
|
7
|
+
fileScope.setFileScope("src/lib/components/MenuItemCheckbox/MenuItemCheckbox.css.ts?used", "braid-design-system");
|
|
8
|
+
const checkboxFieldSize = styles_lib_themes_vars_css_cjs.vars.inlineFieldSize.small;
|
|
9
|
+
const menuItemCapHeight = css.createVar("menuItemCapHeight");
|
|
10
|
+
const crop = css.createVar("crop");
|
|
11
|
+
const checkboxSize = css.style([styles_lib_css_responsiveStyle_cjs.responsiveStyle({
|
|
12
|
+
mobile: {
|
|
13
|
+
vars: {
|
|
14
|
+
[menuItemCapHeight]: styles_lib_themes_vars_css_cjs.vars.textSize.standard.mobile.capHeight,
|
|
15
|
+
[crop]: cssUtils.calc(checkboxFieldSize).subtract(menuItemCapHeight).divide(2).negate().toString()
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
tablet: {
|
|
19
|
+
vars: {
|
|
20
|
+
[menuItemCapHeight]: styles_lib_themes_vars_css_cjs.vars.textSize.standard.tablet.capHeight
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}), {
|
|
24
|
+
height: checkboxFieldSize,
|
|
25
|
+
width: checkboxFieldSize,
|
|
26
|
+
marginTop: crop,
|
|
27
|
+
marginBottom: crop
|
|
28
|
+
}], "checkboxSize");
|
|
29
|
+
fileScope.endFileScope();
|
|
30
|
+
exports.checkboxSize = checkboxSize;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { createVar, style } from "@vanilla-extract/css";
|
|
3
|
+
import { calc } from "@vanilla-extract/css-utils";
|
|
4
|
+
import { responsiveStyle } from "../../css/responsiveStyle.mjs";
|
|
5
|
+
import { vars } from "../../themes/vars.css.mjs";
|
|
6
|
+
setFileScope("src/lib/components/MenuItemCheckbox/MenuItemCheckbox.css.ts?used", "braid-design-system");
|
|
7
|
+
const checkboxFieldSize = vars.inlineFieldSize.small;
|
|
8
|
+
const menuItemCapHeight = createVar("menuItemCapHeight");
|
|
9
|
+
const crop = createVar("crop");
|
|
10
|
+
const checkboxSize = style([responsiveStyle({
|
|
11
|
+
mobile: {
|
|
12
|
+
vars: {
|
|
13
|
+
[menuItemCapHeight]: vars.textSize.standard.mobile.capHeight,
|
|
14
|
+
[crop]: calc(checkboxFieldSize).subtract(menuItemCapHeight).divide(2).negate().toString()
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
tablet: {
|
|
18
|
+
vars: {
|
|
19
|
+
[menuItemCapHeight]: vars.textSize.standard.tablet.capHeight
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}), {
|
|
23
|
+
height: checkboxFieldSize,
|
|
24
|
+
width: checkboxFieldSize,
|
|
25
|
+
marginTop: crop,
|
|
26
|
+
marginBottom: crop
|
|
27
|
+
}], "checkboxSize");
|
|
28
|
+
endFileScope();
|
|
29
|
+
export {
|
|
30
|
+
checkboxSize
|
|
31
|
+
};
|
|
@@ -5,20 +5,17 @@ const styles_lib_css_atoms_atoms_cjs = require("../../../css/atoms/atoms.cjs");
|
|
|
5
5
|
const styles_lib_css_colorModeStyle_cjs = require("../../../css/colorModeStyle.cjs");
|
|
6
6
|
const styles_lib_themes_vars_css_cjs = require("../../../themes/vars.css.cjs");
|
|
7
7
|
fileScope.setFileScope("src/lib/components/Textarea/Highlight/Highlight.css.ts?used", "braid-design-system");
|
|
8
|
-
const space =
|
|
9
|
-
const lineThickness = 2;
|
|
8
|
+
const space = "2px";
|
|
10
9
|
const root = css.style([styles_lib_css_atoms_atoms_cjs.atoms({
|
|
11
10
|
borderRadius: "small"
|
|
12
11
|
}), {
|
|
13
|
-
padding: space
|
|
14
|
-
margin:
|
|
12
|
+
padding: `0 ${space}`,
|
|
13
|
+
margin: `0 -${space}`,
|
|
15
14
|
textDecoration: "underline",
|
|
16
15
|
textDecorationStyle: "wavy",
|
|
17
16
|
textDecorationSkipInk: "none",
|
|
18
|
-
textDecorationThickness:
|
|
19
|
-
textUnderlineOffset: 2
|
|
20
|
-
paddingBottom: lineThickness / 2,
|
|
21
|
-
marginBottom: -(lineThickness / 2)
|
|
17
|
+
textDecorationThickness: 2,
|
|
18
|
+
textUnderlineOffset: 2
|
|
22
19
|
}], "root");
|
|
23
20
|
const critical = css.style(styles_lib_css_colorModeStyle_cjs.colorModeStyle({
|
|
24
21
|
lightMode: {
|
|
@@ -4,20 +4,17 @@ import { atoms } from "../../../css/atoms/atoms.mjs";
|
|
|
4
4
|
import { colorModeStyle } from "../../../css/colorModeStyle.mjs";
|
|
5
5
|
import { vars } from "../../../themes/vars.css.mjs";
|
|
6
6
|
setFileScope("src/lib/components/Textarea/Highlight/Highlight.css.ts?used", "braid-design-system");
|
|
7
|
-
const space =
|
|
8
|
-
const lineThickness = 2;
|
|
7
|
+
const space = "2px";
|
|
9
8
|
const root = style([atoms({
|
|
10
9
|
borderRadius: "small"
|
|
11
10
|
}), {
|
|
12
|
-
padding: space
|
|
13
|
-
margin:
|
|
11
|
+
padding: `0 ${space}`,
|
|
12
|
+
margin: `0 -${space}`,
|
|
14
13
|
textDecoration: "underline",
|
|
15
14
|
textDecorationStyle: "wavy",
|
|
16
15
|
textDecorationSkipInk: "none",
|
|
17
|
-
textDecorationThickness:
|
|
18
|
-
textUnderlineOffset: 2
|
|
19
|
-
paddingBottom: lineThickness / 2,
|
|
20
|
-
marginBottom: -(lineThickness / 2)
|
|
16
|
+
textDecorationThickness: 2,
|
|
17
|
+
textUnderlineOffset: 2
|
|
21
18
|
}], "root");
|
|
22
19
|
const critical = style(colorModeStyle({
|
|
23
20
|
lightMode: {
|
|
@@ -5,48 +5,48 @@ const cssUtils = require("@vanilla-extract/css-utils");
|
|
|
5
5
|
const styles_lib_themes_vars_css_cjs = require("../../../themes/vars.css.cjs");
|
|
6
6
|
const styles_lib_components_private_touchable_hitArea_cjs = require("../touchable/hitArea.cjs");
|
|
7
7
|
const styles_lib_components_private_touchable_debugTouchable_cjs = require("../touchable/debugTouchable.cjs");
|
|
8
|
+
const styles_lib_css_responsiveStyle_cjs = require("../../../css/responsiveStyle.cjs");
|
|
8
9
|
fileScope.setFileScope("src/lib/components/private/InlineField/InlineField.css.ts?used", "braid-design-system");
|
|
9
10
|
const sizes = {
|
|
10
11
|
standard: "standard",
|
|
11
12
|
small: "small"
|
|
12
13
|
};
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
const fieldSize = css.createVar("fieldSize");
|
|
15
|
+
const labelCapHeight = css.createVar("labelCapHeight");
|
|
16
|
+
const sizeVars = css.styleVariants(sizes, (size) => styles_lib_css_responsiveStyle_cjs.responsiveStyle({
|
|
17
|
+
mobile: {
|
|
18
|
+
vars: {
|
|
19
|
+
[fieldSize]: styles_lib_themes_vars_css_cjs.vars.inlineFieldSize[size],
|
|
20
|
+
[labelCapHeight]: styles_lib_themes_vars_css_cjs.vars.textSize[size].mobile.capHeight
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
tablet: {
|
|
24
|
+
vars: {
|
|
25
|
+
[labelCapHeight]: styles_lib_themes_vars_css_cjs.vars.textSize[size].tablet.capHeight
|
|
26
|
+
}
|
|
16
27
|
}
|
|
17
|
-
}, "
|
|
28
|
+
}), "sizeVars");
|
|
29
|
+
const hitAreaOffset = cssUtils.calc(styles_lib_components_private_touchable_hitArea_cjs.hitArea).subtract(fieldSize).divide(2).negate().toString();
|
|
18
30
|
const realField = css.style([{
|
|
19
31
|
width: styles_lib_components_private_touchable_hitArea_cjs.hitArea,
|
|
20
|
-
height: styles_lib_components_private_touchable_hitArea_cjs.hitArea
|
|
32
|
+
height: styles_lib_components_private_touchable_hitArea_cjs.hitArea,
|
|
33
|
+
top: hitAreaOffset,
|
|
34
|
+
left: hitAreaOffset
|
|
21
35
|
}, styles_lib_components_private_touchable_debugTouchable_cjs.debugTouchable()], "realField");
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, "
|
|
29
|
-
const fakeField = css.style({}, "fakeField");
|
|
30
|
-
const fakeFieldSize = css.styleVariants(sizes, (size) => ({
|
|
31
|
-
height: styles_lib_themes_vars_css_cjs.vars.inlineFieldSize[size],
|
|
32
|
-
width: styles_lib_themes_vars_css_cjs.vars.inlineFieldSize[size]
|
|
33
|
-
}), "fakeFieldSize");
|
|
34
|
-
const badgeOffset = css.styleVariants(sizes, (size) => {
|
|
35
|
-
const offset = cssUtils.calc(styles_lib_themes_vars_css_cjs.vars.inlineFieldSize[size]).subtract(styles_lib_themes_vars_css_cjs.vars.textSize.xsmall.mobile.lineHeight).divide(2).toString();
|
|
36
|
-
return {
|
|
37
|
-
paddingTop: offset,
|
|
38
|
-
paddingBottom: offset
|
|
39
|
-
};
|
|
40
|
-
}, "badgeOffset");
|
|
41
|
-
const labelOffset = css.styleVariants(sizes, (size) => ({
|
|
42
|
-
paddingTop: cssUtils.calc(styles_lib_themes_vars_css_cjs.vars.inlineFieldSize[size]).subtract(styles_lib_themes_vars_css_cjs.vars.textSize[size].mobile.capHeight).divide(2).toString()
|
|
43
|
-
}), "labelOffset");
|
|
36
|
+
const fakeField = css.style({
|
|
37
|
+
height: fieldSize,
|
|
38
|
+
width: fieldSize
|
|
39
|
+
}, "fakeField");
|
|
40
|
+
const labelOffset = css.style({
|
|
41
|
+
paddingTop: cssUtils.calc(fieldSize).subtract(labelCapHeight).divide(2).toString()
|
|
42
|
+
}, "labelOffset");
|
|
44
43
|
const isMixed = css.style({}, "isMixed");
|
|
45
44
|
const children = css.style({
|
|
46
45
|
selectors: {
|
|
47
46
|
[`${realField}:checked ~ * &,
|
|
48
47
|
${realField}${isMixed} ~ * &`]: {
|
|
49
|
-
display: "block"
|
|
48
|
+
display: "block",
|
|
49
|
+
zIndex: 1
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}, "children");
|
|
@@ -99,17 +99,14 @@ const radioScale = css.style({
|
|
|
99
99
|
}, "radioScale");
|
|
100
100
|
const radioIndicator = [indicator, radioScale];
|
|
101
101
|
fileScope.endFileScope();
|
|
102
|
-
exports.badgeOffset = badgeOffset;
|
|
103
102
|
exports.checkboxIndicator = checkboxIndicator;
|
|
104
103
|
exports.children = children;
|
|
105
104
|
exports.fakeField = fakeField;
|
|
106
|
-
exports.fakeFieldSize = fakeFieldSize;
|
|
107
105
|
exports.focusOverlay = focusOverlay;
|
|
108
106
|
exports.hoverOverlay = hoverOverlay;
|
|
109
107
|
exports.isMixed = isMixed;
|
|
110
108
|
exports.labelOffset = labelOffset;
|
|
111
109
|
exports.radioIndicator = radioIndicator;
|
|
112
110
|
exports.realField = realField;
|
|
113
|
-
exports.realFieldPosition = realFieldPosition;
|
|
114
|
-
exports.root = root;
|
|
115
111
|
exports.selected = selected;
|
|
112
|
+
exports.sizeVars = sizeVars;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
2
|
+
import { createVar, styleVariants, style } from "@vanilla-extract/css";
|
|
3
3
|
import { calc } from "@vanilla-extract/css-utils";
|
|
4
4
|
import { vars } from "../../../themes/vars.css.mjs";
|
|
5
5
|
import { hitArea } from "../touchable/hitArea.mjs";
|
|
6
6
|
import { debugTouchable } from "../touchable/debugTouchable.mjs";
|
|
7
|
+
import { responsiveStyle } from "../../../css/responsiveStyle.mjs";
|
|
7
8
|
setFileScope("src/lib/components/private/InlineField/InlineField.css.ts?used", "braid-design-system");
|
|
8
9
|
const sizes = {
|
|
9
10
|
standard: "standard",
|
|
10
11
|
small: "small"
|
|
11
12
|
};
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const fieldSize = createVar("fieldSize");
|
|
14
|
+
const labelCapHeight = createVar("labelCapHeight");
|
|
15
|
+
const sizeVars = styleVariants(sizes, (size) => responsiveStyle({
|
|
16
|
+
mobile: {
|
|
17
|
+
vars: {
|
|
18
|
+
[fieldSize]: vars.inlineFieldSize[size],
|
|
19
|
+
[labelCapHeight]: vars.textSize[size].mobile.capHeight
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
tablet: {
|
|
23
|
+
vars: {
|
|
24
|
+
[labelCapHeight]: vars.textSize[size].tablet.capHeight
|
|
25
|
+
}
|
|
15
26
|
}
|
|
16
|
-
}, "
|
|
27
|
+
}), "sizeVars");
|
|
28
|
+
const hitAreaOffset = calc(hitArea).subtract(fieldSize).divide(2).negate().toString();
|
|
17
29
|
const realField = style([{
|
|
18
30
|
width: hitArea,
|
|
19
|
-
height: hitArea
|
|
31
|
+
height: hitArea,
|
|
32
|
+
top: hitAreaOffset,
|
|
33
|
+
left: hitAreaOffset
|
|
20
34
|
}, debugTouchable()], "realField");
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}, "
|
|
28
|
-
const fakeField = style({}, "fakeField");
|
|
29
|
-
const fakeFieldSize = styleVariants(sizes, (size) => ({
|
|
30
|
-
height: vars.inlineFieldSize[size],
|
|
31
|
-
width: vars.inlineFieldSize[size]
|
|
32
|
-
}), "fakeFieldSize");
|
|
33
|
-
const badgeOffset = styleVariants(sizes, (size) => {
|
|
34
|
-
const offset = calc(vars.inlineFieldSize[size]).subtract(vars.textSize.xsmall.mobile.lineHeight).divide(2).toString();
|
|
35
|
-
return {
|
|
36
|
-
paddingTop: offset,
|
|
37
|
-
paddingBottom: offset
|
|
38
|
-
};
|
|
39
|
-
}, "badgeOffset");
|
|
40
|
-
const labelOffset = styleVariants(sizes, (size) => ({
|
|
41
|
-
paddingTop: calc(vars.inlineFieldSize[size]).subtract(vars.textSize[size].mobile.capHeight).divide(2).toString()
|
|
42
|
-
}), "labelOffset");
|
|
35
|
+
const fakeField = style({
|
|
36
|
+
height: fieldSize,
|
|
37
|
+
width: fieldSize
|
|
38
|
+
}, "fakeField");
|
|
39
|
+
const labelOffset = style({
|
|
40
|
+
paddingTop: calc(fieldSize).subtract(labelCapHeight).divide(2).toString()
|
|
41
|
+
}, "labelOffset");
|
|
43
42
|
const isMixed = style({}, "isMixed");
|
|
44
43
|
const children = style({
|
|
45
44
|
selectors: {
|
|
46
45
|
[`${realField}:checked ~ * &,
|
|
47
46
|
${realField}${isMixed} ~ * &`]: {
|
|
48
|
-
display: "block"
|
|
47
|
+
display: "block",
|
|
48
|
+
zIndex: 1
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}, "children");
|
|
@@ -99,18 +99,15 @@ const radioScale = style({
|
|
|
99
99
|
const radioIndicator = [indicator, radioScale];
|
|
100
100
|
endFileScope();
|
|
101
101
|
export {
|
|
102
|
-
badgeOffset,
|
|
103
102
|
checkboxIndicator,
|
|
104
103
|
children,
|
|
105
104
|
fakeField,
|
|
106
|
-
fakeFieldSize,
|
|
107
105
|
focusOverlay,
|
|
108
106
|
hoverOverlay,
|
|
109
107
|
isMixed,
|
|
110
108
|
labelOffset,
|
|
111
109
|
radioIndicator,
|
|
112
110
|
realField,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
selected
|
|
111
|
+
selected,
|
|
112
|
+
sizeVars
|
|
116
113
|
};
|