braid-design-system 32.1.0 → 32.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +133 -0
- package/codemod/dist/wrapper.js +181 -183
- package/color-mode/query-param/index.d.ts +1 -0
- package/color-mode/query-param/package.json +1 -1
- package/css/index.d.ts +1 -0
- package/css/package.json +1 -1
- package/dist/ToastContext.chunk.cjs +21 -21
- package/dist/ToastContext.chunk.mjs +120 -120
- package/dist/Toggle.chunk.cjs +22 -32
- package/dist/Toggle.chunk.mjs +199 -209
- package/dist/color-mode/query-param.mjs +1 -1
- package/dist/css.d.ts +1 -667
- package/dist/css.mjs +7 -7
- package/dist/index.d.ts +1 -3952
- package/dist/index.mjs +164 -164
- package/dist/playroom/FrameComponent.d.ts +1 -323
- package/dist/playroom/FrameComponent.mjs +4 -4
- package/dist/playroom/components.d.ts +1 -4027
- package/dist/playroom/components.mjs +124 -124
- package/dist/playroom/scope.d.ts +1 -385
- package/dist/playroom/scope.mjs +4 -4
- package/dist/playroom/snippets.d.ts +1 -7
- package/dist/playroomState.chunk.cjs +1 -1
- package/dist/playroomState.chunk.mjs +3 -3
- package/dist/reset.d.ts +5075 -1
- package/dist/side-effects/lib/components/BraidProvider/BraidProvider.mjs +12 -12
- package/dist/side-effects/lib/css/reset/index.mjs +1 -1
- package/dist/side-effects/lib/css/reset/resetTracker.mjs +2 -2
- package/dist/side-effects/lib/themes/baseTokens/apac.cjs +8 -9
- package/dist/side-effects/lib/themes/baseTokens/apac.mjs +8 -10
- package/dist/side-effects/lib/themes/index.mjs +5 -5
- package/dist/side-effects/lib/themes/makeRuntimeTokens.cjs +4 -10
- package/dist/side-effects/lib/themes/makeRuntimeTokens.mjs +5 -10
- package/dist/side-effects/lib/themes/tokenType.cjs +15 -0
- package/dist/side-effects/lib/themes/tokenType.mjs +16 -0
- package/dist/styles/lib/components/Accordion/AccordionItem.css.mjs +3 -3
- package/dist/styles/lib/components/Alert/Alert.css.mjs +3 -3
- package/dist/styles/lib/components/Autosuggest/Autosuggest.css.mjs +6 -6
- package/dist/styles/lib/components/Button/Button.css.cjs +24 -23
- package/dist/styles/lib/components/Button/Button.css.mjs +39 -38
- package/dist/styles/lib/components/ButtonIcon/ButtonIcon.css.mjs +1 -1
- package/dist/styles/lib/components/Column/Column.css.mjs +3 -3
- package/dist/styles/lib/components/ContentBlock/ContentBlock.css.mjs +1 -1
- package/dist/styles/lib/components/Divider/Divider.css.mjs +7 -7
- package/dist/styles/lib/components/Dropdown/Dropdown.css.mjs +2 -2
- package/dist/styles/lib/components/Hidden/Hidden.css.mjs +1 -1
- package/dist/styles/lib/components/HiddenVisually/HiddenVisually.css.mjs +1 -1
- package/dist/styles/lib/components/List/List.css.mjs +4 -4
- package/dist/styles/lib/components/Loader/Loader.css.mjs +7 -7
- package/dist/styles/lib/components/MenuItem/useMenuItem.css.mjs +1 -1
- package/dist/styles/lib/components/MenuRenderer/MenuRenderer.css.mjs +5 -5
- package/dist/styles/lib/components/MonthPicker/MonthPicker.css.mjs +1 -1
- package/dist/styles/lib/components/OverflowMenu/OverflowMenu.css.mjs +1 -1
- package/dist/styles/lib/components/Pagination/Pagination.css.mjs +6 -6
- package/dist/styles/lib/components/Rating/Rating.css.mjs +6 -6
- package/dist/styles/lib/components/Stepper/Stepper.css.mjs +21 -21
- package/dist/styles/lib/components/Tabs/Tabs.css.mjs +17 -17
- package/dist/styles/lib/components/Tag/Tag.css.mjs +1 -1
- package/dist/styles/lib/components/TextDropdown/TextDropdown.css.mjs +4 -4
- package/dist/styles/lib/components/TextLink/TextLink.css.mjs +8 -8
- package/dist/styles/lib/components/Textarea/Highlight/Highlight.css.mjs +1 -1
- package/dist/styles/lib/components/Textarea/Textarea.css.mjs +3 -3
- package/dist/styles/lib/components/Tiles/Tiles.css.mjs +5 -5
- package/dist/styles/lib/components/Toggle/Toggle.css.mjs +20 -20
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.cjs +1 -5
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs +7 -11
- package/dist/styles/lib/components/icons/IconArrow/IconArrow.css.mjs +4 -4
- package/dist/styles/lib/components/icons/IconChevron/IconChevron.css.mjs +4 -4
- package/dist/styles/lib/components/icons/IconThumb/IconThumb.css.mjs +2 -2
- package/dist/styles/lib/components/private/AvoidWidowIcon/AvoidWidowIcon.css.mjs +1 -1
- package/dist/styles/lib/components/private/Field/Field.css.mjs +8 -8
- package/dist/styles/lib/components/private/InlineField/InlineField.css.mjs +17 -17
- package/dist/styles/lib/components/private/Keyline/Keyline.css.cjs +4 -0
- package/dist/styles/lib/components/private/Keyline/Keyline.css.mjs +11 -7
- package/dist/styles/lib/components/private/Modal/Modal.css.mjs +16 -16
- package/dist/styles/lib/components/private/Modal/ModalExternalGutter.mjs +1 -1
- package/dist/styles/lib/components/private/Placeholder/Placeholder.css.mjs +6 -6
- package/dist/styles/lib/components/private/Truncate/Truncate.css.mjs +1 -1
- package/dist/styles/lib/components/private/hideFocusRings/hideFocusRings.css.mjs +2 -2
- package/dist/styles/lib/components/private/hideFocusRings/hideFocusRingsDataAttribute.mjs +1 -1
- package/dist/styles/lib/components/private/touchable/debugTouchable.mjs +1 -1
- package/dist/styles/lib/components/private/touchable/hitArea.mjs +1 -1
- package/dist/styles/lib/components/private/touchable/virtualTouchable.css.mjs +4 -4
- package/dist/styles/lib/components/private/touchable/virtualTouchableRules.mjs +2 -2
- package/dist/styles/lib/components/useToast/Toast.css.mjs +1 -1
- package/dist/styles/lib/css/atoms/atomicProperties.mjs +6 -6
- package/dist/styles/lib/css/atoms/atoms.mjs +3 -3
- package/dist/styles/lib/css/atoms/sprinkles.css.mjs +8 -8
- package/dist/styles/lib/css/breakpoints.mjs +2 -2
- package/dist/styles/lib/css/colorModeStyle.mjs +2 -2
- package/dist/styles/lib/css/lineHeightContainer.css.mjs +3 -3
- package/dist/styles/lib/css/negativeMargin/negativeMargin.css.cjs +4 -9
- package/dist/styles/lib/css/negativeMargin/negativeMargin.css.mjs +3 -8
- package/dist/styles/lib/css/reset/reset.css.mjs +3 -3
- package/dist/styles/lib/css/responsiveStyle.cjs +2 -2
- package/dist/styles/lib/css/responsiveStyle.mjs +3 -3
- package/dist/styles/lib/css/textAlignedToIcon.css.mjs +3 -3
- package/dist/styles/lib/css/typography.css.cjs +1 -16
- package/dist/styles/lib/css/typography.css.mjs +5 -20
- package/dist/styles/lib/hooks/useIcon/icon.css.mjs +8 -8
- package/dist/styles/lib/themes/apac/apacTheme.css.mjs +3 -3
- package/dist/styles/lib/themes/apac/tokens.mjs +2 -2
- package/dist/styles/lib/themes/docs/docsTheme.css.mjs +3 -3
- package/dist/styles/lib/themes/docs/tokens.cjs +8 -8
- package/dist/styles/lib/themes/docs/tokens.mjs +8 -10
- package/dist/styles/lib/themes/makeBraidTheme.mjs +4 -4
- package/dist/styles/lib/themes/makeVanillaTheme.cjs +23 -10
- package/dist/styles/lib/themes/makeVanillaTheme.mjs +23 -10
- package/dist/styles/lib/themes/seekBusiness/seekBusinessTheme.css.mjs +3 -3
- package/dist/styles/lib/themes/seekBusiness/tokens.mjs +2 -2
- package/dist/styles/lib/themes/vars.css.mjs +3 -3
- package/dist/styles/lib/themes/wireframe/tokens.cjs +25 -29
- package/dist/styles/lib/themes/wireframe/tokens.mjs +25 -31
- package/dist/styles/lib/themes/wireframe/wireframeTheme.css.mjs +3 -3
- package/dist/styles/lib/utils/index.mjs +6 -6
- package/dist/test.d.ts +1 -890
- package/dist/test.mjs +2 -2
- package/dist/themes/apac.d.ts +1 -137
- package/dist/themes/apac.mjs +2 -2
- package/dist/themes/docs.d.ts +1 -137
- package/dist/themes/docs.mjs +2 -2
- package/dist/themes/seekBusiness.d.ts +1 -137
- package/dist/themes/seekBusiness.mjs +2 -2
- package/dist/themes/wireframe.d.ts +1 -137
- package/dist/themes/wireframe.mjs +2 -2
- package/package.json +4 -3
- package/playroom/FrameComponent/index.d.ts +2 -0
- package/playroom/FrameComponent/package.json +1 -1
- package/playroom/components/index.d.ts +1 -0
- package/playroom/components/package.json +1 -1
- package/playroom/scope/index.d.ts +2 -0
- package/playroom/scope/package.json +1 -1
- package/playroom/snippets/index.d.ts +2 -0
- package/playroom/snippets/package.json +1 -1
- package/reset/index.d.ts +1 -0
- package/reset/package.json +1 -1
- package/test/index.d.ts +1 -0
- package/test/package.json +1 -1
- package/themes/apac/index.d.ts +2 -0
- package/themes/apac/package.json +1 -1
- package/themes/docs/index.d.ts +2 -0
- package/themes/docs/package.json +1 -1
- package/themes/seekBusiness/index.d.ts +2 -0
- package/themes/seekBusiness/package.json +1 -1
- package/themes/wireframe/index.d.ts +2 -0
- package/themes/wireframe/package.json +1 -1
- package/dist/styles/lib/components/Badge/Badge.css.cjs +0 -27
- package/dist/styles/lib/components/Badge/Badge.css.mjs +0 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { debugTouchable } from "./debugTouchable.mjs";
|
|
4
|
+
import { virtualTouchableRules } from "./virtualTouchableRules.mjs";
|
|
5
5
|
setFileScope("src/lib/components/private/touchable/virtualTouchable.css.ts?used", "braid-design-system");
|
|
6
6
|
const virtualTouchable = style([{
|
|
7
7
|
position: "relative",
|
|
@@ -23,6 +23,6 @@ const yAxisOnly = style({
|
|
|
23
23
|
}, "yAxisOnly");
|
|
24
24
|
endFileScope();
|
|
25
25
|
export {
|
|
26
|
-
virtualTouchable
|
|
27
|
-
yAxisOnly
|
|
26
|
+
virtualTouchable,
|
|
27
|
+
yAxisOnly
|
|
28
28
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { hitArea } from "./hitArea.mjs";
|
|
2
2
|
const virtualTouchableRules = {
|
|
3
3
|
transform: "translateY(-50%)",
|
|
4
4
|
minHeight: hitArea,
|
|
@@ -7,5 +7,5 @@ const virtualTouchableRules = {
|
|
|
7
7
|
top: "50%"
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
virtualTouchableRules
|
|
10
|
+
virtualTouchableRules
|
|
11
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { vars } from "../../themes/vars.css.mjs";
|
|
2
2
|
const sizes = {
|
|
3
3
|
full: "100%",
|
|
4
4
|
touchable: vars.touchableSize
|
|
@@ -120,9 +120,9 @@ const responsiveProperties = {
|
|
|
120
120
|
textAlign: ["left", "center", "right"]
|
|
121
121
|
};
|
|
122
122
|
export {
|
|
123
|
-
colorProperties
|
|
124
|
-
pseudoProperties
|
|
125
|
-
responsiveProperties
|
|
126
|
-
space
|
|
127
|
-
unresponsiveProperties
|
|
123
|
+
colorProperties,
|
|
124
|
+
pseudoProperties,
|
|
125
|
+
responsiveProperties,
|
|
126
|
+
space,
|
|
127
|
+
unresponsiveProperties
|
|
128
128
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { base, element } from "../reset/reset.css.mjs";
|
|
2
|
+
import { sprinkles } from "./sprinkles.css.mjs";
|
|
3
3
|
const atoms = ({ reset, ...rest }) => {
|
|
4
4
|
if (!reset) {
|
|
5
5
|
return sprinkles(rest);
|
|
@@ -9,5 +9,5 @@ const atoms = ({ reset, ...rest }) => {
|
|
|
9
9
|
return `${base}${elementReset ? ` ${elementReset}` : ""}${sprinklesClasses ? ` ${sprinklesClasses}` : ""}`;
|
|
10
10
|
};
|
|
11
11
|
export {
|
|
12
|
-
atoms
|
|
12
|
+
atoms
|
|
13
13
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
3
|
import { defineProperties, createSprinkles, createNormalizeValueFn, createMapValueFn } from "@vanilla-extract/sprinkles";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { breakpoints, breakpointNames } from "../breakpoints.mjs";
|
|
5
|
+
import { unresponsiveProperties, pseudoProperties, colorProperties, responsiveProperties } from "./atomicProperties.mjs";
|
|
6
6
|
setFileScope("src/lib/css/atoms/sprinkles.css.ts?used", "braid-design-system");
|
|
7
7
|
const unresponsiveAtomicProperties = defineProperties({
|
|
8
8
|
properties: unresponsiveProperties,
|
|
@@ -67,10 +67,10 @@ const mapResponsiveValue = createMapValueFn(responsiveAtomicProperties);
|
|
|
67
67
|
const mapColorModeValue = createMapValueFn(colorAtomicProperties);
|
|
68
68
|
endFileScope();
|
|
69
69
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
normalizeResponsiveValue
|
|
75
|
-
sprinkles
|
|
70
|
+
colorModeSelectors,
|
|
71
|
+
darkMode,
|
|
72
|
+
mapColorModeValue,
|
|
73
|
+
mapResponsiveValue,
|
|
74
|
+
normalizeResponsiveValue,
|
|
75
|
+
sprinkles
|
|
76
76
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { colorModeSelectors } from "./atoms/sprinkles.css.mjs";
|
|
2
2
|
const makeSelector = (mode, styles) => !styles || Object.keys(styles).length === 0 ? {} : {
|
|
3
3
|
[colorModeSelectors[mode]]: styles
|
|
4
4
|
};
|
|
@@ -14,5 +14,5 @@ const colorModeStyle = ({
|
|
|
14
14
|
} : {}
|
|
15
15
|
});
|
|
16
16
|
export {
|
|
17
|
-
colorModeStyle
|
|
17
|
+
colorModeStyle
|
|
18
18
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { styleVariants } from "@vanilla-extract/css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { responsiveStyle } from "./responsiveStyle.mjs";
|
|
4
|
+
import { vars } from "../themes/vars.css.mjs";
|
|
5
5
|
setFileScope("src/lib/css/lineHeightContainer.css.ts?used", "braid-design-system");
|
|
6
6
|
const lineHeightContainer = styleVariants(vars.textSize, ({
|
|
7
7
|
mobile,
|
|
@@ -16,5 +16,5 @@ const lineHeightContainer = styleVariants(vars.textSize, ({
|
|
|
16
16
|
}), "lineHeightContainer");
|
|
17
17
|
endFileScope();
|
|
18
18
|
export {
|
|
19
|
-
lineHeightContainer
|
|
19
|
+
lineHeightContainer
|
|
20
20
|
};
|
|
@@ -54,13 +54,8 @@ const right = {
|
|
|
54
54
|
wide: stylesForBreakpoint("wide", "marginRight")
|
|
55
55
|
};
|
|
56
56
|
fileScope.endFileScope();
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
bottom,
|
|
60
|
-
left,
|
|
61
|
-
preventCollapsePseudo,
|
|
62
|
-
right,
|
|
63
|
-
top
|
|
64
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
57
|
+
exports.bottom = bottom;
|
|
58
|
+
exports.left = left;
|
|
65
59
|
exports.preventCollapsePseudo = preventCollapsePseudo;
|
|
66
|
-
exports.
|
|
60
|
+
exports.right = right;
|
|
61
|
+
exports.top = top;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style, styleVariants } from "@vanilla-extract/css";
|
|
3
3
|
import { calc } from "@vanilla-extract/css-utils";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { space } from "../atoms/atomicProperties.mjs";
|
|
5
|
+
import { responsiveStyle } from "../responsiveStyle.mjs";
|
|
6
6
|
setFileScope("src/lib/css/negativeMargin/negativeMargin.css.ts?used", "braid-design-system");
|
|
7
7
|
const stylesForBreakpoint = (bp, property, mapToStyle) => styleVariants(space, (value) => {
|
|
8
8
|
const styleRule = {
|
|
@@ -53,15 +53,10 @@ const right = {
|
|
|
53
53
|
wide: stylesForBreakpoint("wide", "marginRight")
|
|
54
54
|
};
|
|
55
55
|
endFileScope();
|
|
56
|
-
|
|
57
|
-
__proto__: null,
|
|
56
|
+
export {
|
|
58
57
|
bottom,
|
|
59
58
|
left,
|
|
60
59
|
preventCollapsePseudo,
|
|
61
60
|
right,
|
|
62
61
|
top
|
|
63
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
64
|
-
export {
|
|
65
|
-
preventCollapsePseudo as p,
|
|
66
|
-
styles as s
|
|
67
62
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import {
|
|
3
|
+
import { hideFocusRingsDataAttribute } from "../../components/private/hideFocusRings/hideFocusRingsDataAttribute.mjs";
|
|
4
4
|
setFileScope("src/lib/css/reset/reset.css.ts?used", "braid-design-system");
|
|
5
5
|
const base = style({
|
|
6
6
|
margin: 0,
|
|
@@ -107,6 +107,6 @@ const element = {
|
|
|
107
107
|
};
|
|
108
108
|
endFileScope();
|
|
109
109
|
export {
|
|
110
|
-
base
|
|
111
|
-
element
|
|
110
|
+
base,
|
|
111
|
+
element
|
|
112
112
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const omit = require("lodash/omit");
|
|
3
|
-
const mapValues = require("lodash/mapValues");
|
|
2
|
+
const omit = require("lodash/omit.js");
|
|
3
|
+
const mapValues = require("lodash/mapValues.js");
|
|
4
4
|
const styles_lib_css_breakpoints_cjs = require("./breakpoints.cjs");
|
|
5
5
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
6
6
|
const omit__default = /* @__PURE__ */ _interopDefaultCompat(omit);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import omit from "lodash/omit.js";
|
|
2
2
|
import mapValues from "lodash/mapValues.js";
|
|
3
|
-
import {
|
|
3
|
+
import { breakpoints } from "./breakpoints.mjs";
|
|
4
4
|
const breakpointQuery = mapValues(
|
|
5
5
|
omit(breakpoints, "mobile"),
|
|
6
6
|
(bp) => `screen and (min-width: ${bp}px)`
|
|
@@ -29,6 +29,6 @@ const responsiveStyle = ({
|
|
|
29
29
|
} : {}
|
|
30
30
|
});
|
|
31
31
|
export {
|
|
32
|
-
breakpointQuery
|
|
33
|
-
responsiveStyle
|
|
32
|
+
breakpointQuery,
|
|
33
|
+
responsiveStyle
|
|
34
34
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
3
|
import { calc } from "@vanilla-extract/css-utils";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { responsiveStyle } from "./responsiveStyle.mjs";
|
|
5
|
+
import { vars } from "../themes/vars.css.mjs";
|
|
6
6
|
setFileScope("src/lib/css/textAlignedToIcon.css.ts?used", "braid-design-system");
|
|
7
7
|
const calculateForBreakpoint = (breakpoint) => {
|
|
8
8
|
const type = vars.textSize.standard[breakpoint];
|
|
@@ -20,5 +20,5 @@ const textAlignedToIcon = {
|
|
|
20
20
|
};
|
|
21
21
|
endFileScope();
|
|
22
22
|
export {
|
|
23
|
-
textAlignedToIcon
|
|
23
|
+
textAlignedToIcon
|
|
24
24
|
};
|
|
@@ -158,21 +158,6 @@ const touchableText = css.styleVariants(styles_lib_themes_vars_css_cjs.vars.text
|
|
|
158
158
|
tablet: makeTouchableSpacing(styles_lib_themes_vars_css_cjs.vars.touchableSize, textDefinition.tablet.lineHeight)
|
|
159
159
|
}), "touchableText");
|
|
160
160
|
fileScope.endFileScope();
|
|
161
|
-
const styles = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
162
|
-
__proto__: null,
|
|
163
|
-
darkModeNeutralOverride,
|
|
164
|
-
darkModeTone,
|
|
165
|
-
fontFamily,
|
|
166
|
-
fontWeight,
|
|
167
|
-
heading,
|
|
168
|
-
headingWeight,
|
|
169
|
-
lightModeNeutralOverride,
|
|
170
|
-
lightModeTone,
|
|
171
|
-
textSizeTrimmed,
|
|
172
|
-
textSizeUntrimmed,
|
|
173
|
-
tone,
|
|
174
|
-
touchableText
|
|
175
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
176
161
|
exports.darkModeNeutralOverride = darkModeNeutralOverride;
|
|
177
162
|
exports.darkModeTone = darkModeTone;
|
|
178
163
|
exports.fontFamily = fontFamily;
|
|
@@ -181,7 +166,7 @@ exports.heading = heading;
|
|
|
181
166
|
exports.headingWeight = headingWeight;
|
|
182
167
|
exports.lightModeNeutralOverride = lightModeNeutralOverride;
|
|
183
168
|
exports.lightModeTone = lightModeTone;
|
|
184
|
-
exports.
|
|
169
|
+
exports.textSizeTrimmed = textSizeTrimmed;
|
|
185
170
|
exports.textSizeUntrimmed = textSizeUntrimmed;
|
|
186
171
|
exports.tone = tone;
|
|
187
172
|
exports.touchableText = touchableText;
|
|
@@ -2,10 +2,10 @@ import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
|
2
2
|
import { style, styleVariants, createThemeContract, assignVars } from "@vanilla-extract/css";
|
|
3
3
|
import { calc } from "@vanilla-extract/css-utils";
|
|
4
4
|
import { createTextStyle } from "@capsizecss/vanilla-extract";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { vars } from "../themes/vars.css.mjs";
|
|
6
|
+
import { breakpointQuery, responsiveStyle } from "./responsiveStyle.mjs";
|
|
7
|
+
import { colorModeStyle } from "./colorModeStyle.mjs";
|
|
8
|
+
import { mapToProperty } from "../utils/index.mjs";
|
|
9
9
|
setFileScope("src/lib/css/typography.css.ts?used", "braid-design-system");
|
|
10
10
|
const fontFamily = style({
|
|
11
11
|
fontFamily: vars.fontFamily
|
|
@@ -157,8 +157,7 @@ const touchableText = styleVariants(vars.textSize, (textDefinition) => responsiv
|
|
|
157
157
|
tablet: makeTouchableSpacing(vars.touchableSize, textDefinition.tablet.lineHeight)
|
|
158
158
|
}), "touchableText");
|
|
159
159
|
endFileScope();
|
|
160
|
-
|
|
161
|
-
__proto__: null,
|
|
160
|
+
export {
|
|
162
161
|
darkModeNeutralOverride,
|
|
163
162
|
darkModeTone,
|
|
164
163
|
fontFamily,
|
|
@@ -171,18 +170,4 @@ const styles = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
171
170
|
textSizeUntrimmed,
|
|
172
171
|
tone,
|
|
173
172
|
touchableText
|
|
174
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
175
|
-
export {
|
|
176
|
-
lightModeNeutralOverride as a,
|
|
177
|
-
darkModeNeutralOverride as b,
|
|
178
|
-
fontWeight as c,
|
|
179
|
-
darkModeTone as d,
|
|
180
|
-
textSizeUntrimmed as e,
|
|
181
|
-
fontFamily as f,
|
|
182
|
-
touchableText as g,
|
|
183
|
-
headingWeight as h,
|
|
184
|
-
heading as i,
|
|
185
|
-
lightModeTone as l,
|
|
186
|
-
styles as s,
|
|
187
|
-
tone as t
|
|
188
173
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style, styleVariants } from "@vanilla-extract/css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { responsiveStyle } from "../../css/responsiveStyle.mjs";
|
|
4
|
+
import { vars } from "../../themes/vars.css.mjs";
|
|
5
5
|
setFileScope("src/lib/hooks/useIcon/icon.css.ts?used", "braid-design-system");
|
|
6
6
|
const iconScaleIncrease = 0.2;
|
|
7
7
|
const size = style({
|
|
@@ -58,10 +58,10 @@ const blockWidths = styleVariants(vars.textSize, ({
|
|
|
58
58
|
}), "blockWidths");
|
|
59
59
|
endFileScope();
|
|
60
60
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
cropToTextSize
|
|
64
|
-
|
|
65
|
-
inlineCrop
|
|
66
|
-
size
|
|
61
|
+
alignY,
|
|
62
|
+
blockWidths,
|
|
63
|
+
cropToTextSize,
|
|
64
|
+
inline,
|
|
65
|
+
inlineCrop,
|
|
66
|
+
size
|
|
67
67
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { tokens } from "./tokens.mjs";
|
|
3
|
+
import { makeBraidTheme } from "../makeBraidTheme.mjs";
|
|
4
4
|
setFileScope("src/lib/themes/apac/apacTheme.css.ts?used", "braid-design-system");
|
|
5
5
|
const apacTheme_css = makeBraidTheme(tokens);
|
|
6
6
|
endFileScope();
|
|
7
7
|
export {
|
|
8
|
-
apacTheme_css
|
|
8
|
+
apacTheme_css
|
|
9
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { darken, lighten } from "polished";
|
|
2
|
-
import {
|
|
2
|
+
import { makeTokens, palette } from "../../../../side-effects/lib/themes/baseTokens/apac.mjs";
|
|
3
3
|
const brandAccent = palette.seekPink["500"];
|
|
4
4
|
const brandAccentSoft = palette.seekPink["50"];
|
|
5
5
|
const tokens = makeTokens({
|
|
@@ -15,5 +15,5 @@ const tokens = makeTokens({
|
|
|
15
15
|
brandAccentSoftHover: darken(0.025, brandAccentSoft)
|
|
16
16
|
});
|
|
17
17
|
export {
|
|
18
|
-
tokens
|
|
18
|
+
tokens
|
|
19
19
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { tokens } from "./tokens.mjs";
|
|
3
|
+
import { makeBraidTheme } from "../makeBraidTheme.mjs";
|
|
4
4
|
setFileScope("src/lib/themes/docs/docsTheme.css.ts?used", "braid-design-system");
|
|
5
5
|
const docsTheme_css = makeBraidTheme(tokens);
|
|
6
6
|
endFileScope();
|
|
7
7
|
export {
|
|
8
|
-
docsTheme_css
|
|
8
|
+
docsTheme_css
|
|
9
9
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const appleSystemMetrics = require("@capsizecss/metrics/appleSystem.js");
|
|
2
3
|
const polished = require("polished");
|
|
3
4
|
const sideEffects_lib_themes_baseTokens_apac_cjs = require("../../../../side-effects/lib/themes/baseTokens/apac.cjs");
|
|
5
|
+
const sideEffects_lib_themes_tokenType_cjs = require("../../../../side-effects/lib/themes/tokenType.cjs");
|
|
6
|
+
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
7
|
+
const appleSystemMetrics__default = /* @__PURE__ */ _interopDefaultCompat(appleSystemMetrics);
|
|
4
8
|
const brandAccent = sideEffects_lib_themes_baseTokens_apac_cjs.palette.grey["900"];
|
|
5
9
|
const formAccent = sideEffects_lib_themes_baseTokens_apac_cjs.palette.indigo["600"];
|
|
6
10
|
const focus = polished.rgba("#1e90ff", 0.7);
|
|
@@ -15,13 +19,7 @@ const tokens = {
|
|
|
15
19
|
typography: {
|
|
16
20
|
fontFamily: '-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
17
21
|
webFont: null,
|
|
18
|
-
fontMetrics:
|
|
19
|
-
capHeight: 1443,
|
|
20
|
-
ascent: 1950,
|
|
21
|
-
descent: -494,
|
|
22
|
-
lineGap: 0,
|
|
23
|
-
unitsPerEm: 2048
|
|
24
|
-
},
|
|
22
|
+
fontMetrics: sideEffects_lib_themes_tokenType_cjs.extractFontMetricsForTheme(appleSystemMetrics__default.default),
|
|
25
23
|
fontWeight: {
|
|
26
24
|
regular: 400,
|
|
27
25
|
medium: 500,
|
|
@@ -134,7 +132,8 @@ const tokens = {
|
|
|
134
132
|
medium: 5,
|
|
135
133
|
large: 8,
|
|
136
134
|
xlarge: 11,
|
|
137
|
-
xxlarge: 15
|
|
135
|
+
xxlarge: 15,
|
|
136
|
+
xxxlarge: 20
|
|
138
137
|
},
|
|
139
138
|
transforms: {
|
|
140
139
|
touchable: "scale(0.97)"
|
|
@@ -145,6 +144,7 @@ const tokens = {
|
|
|
145
144
|
},
|
|
146
145
|
border: {
|
|
147
146
|
radius: {
|
|
147
|
+
small: "4px",
|
|
148
148
|
standard: "6px",
|
|
149
149
|
large: "8px",
|
|
150
150
|
xlarge: "12px"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import appleSystemMetrics from "@capsizecss/metrics/appleSystem.js";
|
|
1
2
|
import { rgba, darken, lighten } from "polished";
|
|
2
|
-
import {
|
|
3
|
+
import { palette } from "../../../../side-effects/lib/themes/baseTokens/apac.mjs";
|
|
4
|
+
import { extractFontMetricsForTheme } from "../../../../side-effects/lib/themes/tokenType.mjs";
|
|
3
5
|
const brandAccent = palette.grey["900"];
|
|
4
6
|
const formAccent = palette.indigo["600"];
|
|
5
7
|
const focus = rgba("#1e90ff", 0.7);
|
|
@@ -14,13 +16,7 @@ const tokens = {
|
|
|
14
16
|
typography: {
|
|
15
17
|
fontFamily: '-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
16
18
|
webFont: null,
|
|
17
|
-
fontMetrics:
|
|
18
|
-
capHeight: 1443,
|
|
19
|
-
ascent: 1950,
|
|
20
|
-
descent: -494,
|
|
21
|
-
lineGap: 0,
|
|
22
|
-
unitsPerEm: 2048
|
|
23
|
-
},
|
|
19
|
+
fontMetrics: extractFontMetricsForTheme(appleSystemMetrics),
|
|
24
20
|
fontWeight: {
|
|
25
21
|
regular: 400,
|
|
26
22
|
medium: 500,
|
|
@@ -133,7 +129,8 @@ const tokens = {
|
|
|
133
129
|
medium: 5,
|
|
134
130
|
large: 8,
|
|
135
131
|
xlarge: 11,
|
|
136
|
-
xxlarge: 15
|
|
132
|
+
xxlarge: 15,
|
|
133
|
+
xxxlarge: 20
|
|
137
134
|
},
|
|
138
135
|
transforms: {
|
|
139
136
|
touchable: "scale(0.97)"
|
|
@@ -144,6 +141,7 @@ const tokens = {
|
|
|
144
141
|
},
|
|
145
142
|
border: {
|
|
146
143
|
radius: {
|
|
144
|
+
small: "4px",
|
|
147
145
|
standard: "6px",
|
|
148
146
|
large: "8px",
|
|
149
147
|
xlarge: "12px"
|
|
@@ -251,5 +249,5 @@ const tokens = {
|
|
|
251
249
|
}
|
|
252
250
|
};
|
|
253
251
|
export {
|
|
254
|
-
tokens
|
|
252
|
+
tokens
|
|
255
253
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createTheme } from "@vanilla-extract/css";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { vars } from "./vars.css.mjs";
|
|
3
|
+
import { makeVanillaTheme } from "./makeVanillaTheme.mjs";
|
|
4
|
+
import { makeRuntimeTokens } from "../../../side-effects/lib/themes/makeRuntimeTokens.mjs";
|
|
5
5
|
const makeBraidTheme = (tokens) => ({
|
|
6
6
|
...makeRuntimeTokens(tokens),
|
|
7
7
|
vanillaTheme: createTheme(vars, makeVanillaTheme(tokens), tokens.name)
|
|
8
8
|
});
|
|
9
9
|
export {
|
|
10
|
-
makeBraidTheme
|
|
10
|
+
makeBraidTheme
|
|
11
11
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const mapValues = require("lodash/mapValues");
|
|
2
|
+
const mapValues = require("lodash/mapValues.js");
|
|
3
3
|
const core = require("@capsizecss/core");
|
|
4
4
|
const vanillaExtract = require("@capsizecss/vanilla-extract");
|
|
5
5
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
@@ -15,13 +15,26 @@ const fontSizeToCapHeight = (grid, definition, fontMetrics) => {
|
|
|
15
15
|
fontSize: tablet.fontSize,
|
|
16
16
|
fontMetrics
|
|
17
17
|
});
|
|
18
|
+
const mobileConfig = "lineGap" in mobile ? {
|
|
19
|
+
fontSize: mobile.fontSize,
|
|
20
|
+
lineGap: mobile.lineGap
|
|
21
|
+
} : {
|
|
22
|
+
fontSize: mobile.fontSize,
|
|
23
|
+
leading: mobile.rows * grid
|
|
24
|
+
};
|
|
25
|
+
const tabletConfig = "lineGap" in tablet ? {
|
|
26
|
+
fontSize: tablet.fontSize,
|
|
27
|
+
lineGap: tablet.lineGap
|
|
28
|
+
} : {
|
|
29
|
+
fontSize: tablet.fontSize,
|
|
30
|
+
leading: tablet.rows * grid
|
|
31
|
+
};
|
|
18
32
|
const {
|
|
19
33
|
fontSize: mobileFontSize,
|
|
20
34
|
lineHeight: mobileLineHeight,
|
|
21
35
|
...mobileTrims
|
|
22
36
|
} = vanillaExtract.precomputeValues({
|
|
23
|
-
|
|
24
|
-
leading: mobile.rows * grid,
|
|
37
|
+
...mobileConfig,
|
|
25
38
|
fontMetrics
|
|
26
39
|
});
|
|
27
40
|
const {
|
|
@@ -29,8 +42,7 @@ const fontSizeToCapHeight = (grid, definition, fontMetrics) => {
|
|
|
29
42
|
lineHeight: tabletLineHeight,
|
|
30
43
|
...tabletTrims
|
|
31
44
|
} = vanillaExtract.precomputeValues({
|
|
32
|
-
|
|
33
|
-
leading: tablet.rows * grid,
|
|
45
|
+
...tabletConfig,
|
|
34
46
|
fontMetrics
|
|
35
47
|
});
|
|
36
48
|
return {
|
|
@@ -56,8 +68,12 @@ const makeVanillaTheme = (braidTokens) => {
|
|
|
56
68
|
const { name, displayName, ...tokens } = braidTokens;
|
|
57
69
|
const { webFont, ...typography } = tokens.typography;
|
|
58
70
|
const { foreground, background } = tokens.color;
|
|
71
|
+
const textSize = mapValues__default.default(
|
|
72
|
+
tokens.typography.text,
|
|
73
|
+
(definition) => fontSizeToCapHeight(tokens.grid, definition, typography.fontMetrics)
|
|
74
|
+
);
|
|
59
75
|
const getInlineFieldSize = (size) => {
|
|
60
|
-
const scale =
|
|
76
|
+
const scale = parseInt(textSize[size].mobile.lineHeight, 10) / 42;
|
|
61
77
|
return px(tokens.grid * Math.round(tokens.touchableSize * scale));
|
|
62
78
|
};
|
|
63
79
|
const resolvedTokens = {
|
|
@@ -73,10 +89,7 @@ const makeVanillaTheme = (braidTokens) => {
|
|
|
73
89
|
backgroundColor: background,
|
|
74
90
|
fontFamily: typography.fontFamily,
|
|
75
91
|
fontMetrics: mapValues__default.default(typography.fontMetrics, String),
|
|
76
|
-
textSize
|
|
77
|
-
tokens.typography.text,
|
|
78
|
-
(definition) => fontSizeToCapHeight(tokens.grid, definition, typography.fontMetrics)
|
|
79
|
-
),
|
|
92
|
+
textSize,
|
|
80
93
|
textWeight: mapValues__default.default(typography.fontWeight, String),
|
|
81
94
|
headingLevel: mapValues__default.default(
|
|
82
95
|
tokens.typography.heading.level,
|