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
|
@@ -2,11 +2,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import assert from "assert";
|
|
3
3
|
import dedent from "dedent";
|
|
4
4
|
import { useEffect, createContext, useState, useContext, forwardRef } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { ensureResetImported } from "../../css/reset/resetTracker.mjs";
|
|
6
|
+
import { hideFocusRingsDataAttribute } from "../../../../styles/lib/components/private/hideFocusRings/hideFocusRingsDataAttribute.mjs";
|
|
7
|
+
import { breakpoints } from "../../../../styles/lib/css/breakpoints.mjs";
|
|
8
|
+
import { darkMode } from "../../../../styles/lib/css/atoms/sprinkles.css.mjs";
|
|
9
|
+
import { lightModeTone, darkModeTone } from "../../../../styles/lib/css/typography.css.mjs";
|
|
10
10
|
const hideFocusRings = () => document.body.setAttribute(hideFocusRingsDataAttribute, "true");
|
|
11
11
|
const showFocusRings = () => document.body.removeAttribute(hideFocusRingsDataAttribute);
|
|
12
12
|
const useHideFocusRings = (enabled = true) => {
|
|
@@ -146,11 +146,11 @@ const BraidProvider = ({
|
|
|
146
146
|
] });
|
|
147
147
|
};
|
|
148
148
|
export {
|
|
149
|
-
BraidProvider
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
breakpointContext
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
149
|
+
BraidProvider,
|
|
150
|
+
BraidTestProviderContext,
|
|
151
|
+
VanillaThemeContainer,
|
|
152
|
+
breakpointContext,
|
|
153
|
+
makeLinkComponent,
|
|
154
|
+
useBraidTheme,
|
|
155
|
+
useLinkComponent
|
|
156
156
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { markResetImported } from "./resetTracker.mjs";
|
|
2
2
|
import "../../../../styles/lib/css/reset/reset.css.mjs";
|
|
3
3
|
import "../../../../styles/lib/css/atoms/sprinkles.css.mjs";
|
|
4
4
|
if (process.env.NODE_ENV === "development") {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const robotoMetrics = require("@capsizecss/metrics/roboto.js");
|
|
2
3
|
const polished = require("polished");
|
|
3
|
-
const merge = require("lodash/merge");
|
|
4
|
+
const merge = require("lodash/merge.js");
|
|
5
|
+
const sideEffects_lib_themes_tokenType_cjs = require("../tokenType.cjs");
|
|
4
6
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
7
|
+
const robotoMetrics__default = /* @__PURE__ */ _interopDefaultCompat(robotoMetrics);
|
|
5
8
|
const merge__default = /* @__PURE__ */ _interopDefaultCompat(merge);
|
|
6
9
|
const palette = {
|
|
7
10
|
grey: {
|
|
@@ -184,13 +187,7 @@ const makeTokens = ({
|
|
|
184
187
|
typography: {
|
|
185
188
|
fontFamily: 'Roboto, "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif',
|
|
186
189
|
webFont: null,
|
|
187
|
-
fontMetrics:
|
|
188
|
-
capHeight: 1456,
|
|
189
|
-
ascent: 1900,
|
|
190
|
-
descent: -500,
|
|
191
|
-
lineGap: 0,
|
|
192
|
-
unitsPerEm: 2048
|
|
193
|
-
},
|
|
190
|
+
fontMetrics: sideEffects_lib_themes_tokenType_cjs.extractFontMetricsForTheme(robotoMetrics__default.default),
|
|
194
191
|
fontWeight: {
|
|
195
192
|
regular: 400,
|
|
196
193
|
medium: 500,
|
|
@@ -303,7 +300,8 @@ const makeTokens = ({
|
|
|
303
300
|
medium: 5,
|
|
304
301
|
large: 8,
|
|
305
302
|
xlarge: 12,
|
|
306
|
-
xxlarge: 24
|
|
303
|
+
xxlarge: 24,
|
|
304
|
+
xxxlarge: 30
|
|
307
305
|
},
|
|
308
306
|
transforms: {
|
|
309
307
|
touchable: "scale(0.95)"
|
|
@@ -314,6 +312,7 @@ const makeTokens = ({
|
|
|
314
312
|
},
|
|
315
313
|
border: {
|
|
316
314
|
radius: {
|
|
315
|
+
small: "2px",
|
|
317
316
|
standard: "4px",
|
|
318
317
|
large: "6px",
|
|
319
318
|
xlarge: "10px"
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import robotoMetrics from "@capsizecss/metrics/roboto.js";
|
|
1
2
|
import { rgba, darken, saturate, lighten } from "polished";
|
|
2
3
|
import merge from "lodash/merge.js";
|
|
4
|
+
import { extractFontMetricsForTheme } from "../tokenType.mjs";
|
|
3
5
|
const palette = {
|
|
4
6
|
grey: {
|
|
5
7
|
900: "#0E131B",
|
|
@@ -181,13 +183,7 @@ const makeTokens = ({
|
|
|
181
183
|
typography: {
|
|
182
184
|
fontFamily: 'Roboto, "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif',
|
|
183
185
|
webFont: null,
|
|
184
|
-
fontMetrics:
|
|
185
|
-
capHeight: 1456,
|
|
186
|
-
ascent: 1900,
|
|
187
|
-
descent: -500,
|
|
188
|
-
lineGap: 0,
|
|
189
|
-
unitsPerEm: 2048
|
|
190
|
-
},
|
|
186
|
+
fontMetrics: extractFontMetricsForTheme(robotoMetrics),
|
|
191
187
|
fontWeight: {
|
|
192
188
|
regular: 400,
|
|
193
189
|
medium: 500,
|
|
@@ -300,7 +296,8 @@ const makeTokens = ({
|
|
|
300
296
|
medium: 5,
|
|
301
297
|
large: 8,
|
|
302
298
|
xlarge: 12,
|
|
303
|
-
xxlarge: 24
|
|
299
|
+
xxlarge: 24,
|
|
300
|
+
xxxlarge: 30
|
|
304
301
|
},
|
|
305
302
|
transforms: {
|
|
306
303
|
touchable: "scale(0.95)"
|
|
@@ -311,6 +308,7 @@ const makeTokens = ({
|
|
|
311
308
|
},
|
|
312
309
|
border: {
|
|
313
310
|
radius: {
|
|
311
|
+
small: "2px",
|
|
314
312
|
standard: "4px",
|
|
315
313
|
large: "6px",
|
|
316
314
|
xlarge: "10px"
|
|
@@ -432,6 +430,6 @@ const makeTokens = ({
|
|
|
432
430
|
return merge(tokens, tokenOverrides);
|
|
433
431
|
};
|
|
434
432
|
export {
|
|
435
|
-
makeTokens
|
|
436
|
-
palette
|
|
433
|
+
makeTokens,
|
|
434
|
+
palette
|
|
437
435
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { apacTheme_css } from "../../../styles/lib/themes/apac/apacTheme.css.mjs";
|
|
2
|
+
import { seekBusinessTheme_css } from "../../../styles/lib/themes/seekBusiness/seekBusinessTheme.css.mjs";
|
|
3
|
+
import { wireframe } from "../../../styles/lib/themes/wireframe/wireframeTheme.css.mjs";
|
|
4
|
+
import { docsTheme_css } from "../../../styles/lib/themes/docs/docsTheme.css.mjs";
|
|
5
5
|
const themes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
6
|
__proto__: null,
|
|
7
7
|
apac: apacTheme_css,
|
|
@@ -10,5 +10,5 @@ const themes = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
10
10
|
wireframe
|
|
11
11
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
12
12
|
export {
|
|
13
|
-
themes
|
|
13
|
+
themes
|
|
14
14
|
};
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const mapValues = require("lodash/mapValues");
|
|
3
|
-
const values = require("lodash/values");
|
|
2
|
+
const mapValues = require("lodash/mapValues.js");
|
|
4
3
|
const styles_lib_utils_index_cjs = require("../../../styles/lib/utils/index.cjs");
|
|
5
4
|
const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
|
|
6
5
|
const mapValues__default = /* @__PURE__ */ _interopDefaultCompat(mapValues);
|
|
7
|
-
const
|
|
8
|
-
const makeWebFonts = ({ webFont, fontWeight }) => {
|
|
6
|
+
const makeWebFonts = (webFont) => {
|
|
9
7
|
if (!webFont) {
|
|
10
8
|
return [];
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
const linkTag = `<link href="https://fonts.googleapis.com/css?family=${encodeURIComponent(
|
|
14
|
-
`${webFont}:${weights.sort().join(",")}`
|
|
15
|
-
)}" rel="stylesheet" />`;
|
|
16
|
-
return [{ linkTag }];
|
|
10
|
+
return [{ linkTag: `<link href="${webFont}" rel="stylesheet" />` }];
|
|
17
11
|
};
|
|
18
12
|
const makeRuntimeTokens = (tokens) => ({
|
|
19
13
|
name: tokens.name,
|
|
@@ -22,7 +16,7 @@ const makeRuntimeTokens = (tokens) => ({
|
|
|
22
16
|
lightMode: tokens.color.background.body,
|
|
23
17
|
darkMode: tokens.color.background.bodyDark
|
|
24
18
|
},
|
|
25
|
-
webFonts: makeWebFonts(tokens.typography),
|
|
19
|
+
webFonts: makeWebFonts(tokens.typography.webFont),
|
|
26
20
|
space: {
|
|
27
21
|
grid: tokens.grid,
|
|
28
22
|
space: tokens.space
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import mapValues from "lodash/mapValues.js";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const makeWebFonts = ({ webFont, fontWeight }) => {
|
|
2
|
+
import { isLight } from "../../../styles/lib/utils/index.mjs";
|
|
3
|
+
const makeWebFonts = (webFont) => {
|
|
5
4
|
if (!webFont) {
|
|
6
5
|
return [];
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
const linkTag = `<link href="https://fonts.googleapis.com/css?family=${encodeURIComponent(
|
|
10
|
-
`${webFont}:${weights.sort().join(",")}`
|
|
11
|
-
)}" rel="stylesheet" />`;
|
|
12
|
-
return [{ linkTag }];
|
|
7
|
+
return [{ linkTag: `<link href="${webFont}" rel="stylesheet" />` }];
|
|
13
8
|
};
|
|
14
9
|
const makeRuntimeTokens = (tokens) => ({
|
|
15
10
|
name: tokens.name,
|
|
@@ -18,7 +13,7 @@ const makeRuntimeTokens = (tokens) => ({
|
|
|
18
13
|
lightMode: tokens.color.background.body,
|
|
19
14
|
darkMode: tokens.color.background.bodyDark
|
|
20
15
|
},
|
|
21
|
-
webFonts: makeWebFonts(tokens.typography),
|
|
16
|
+
webFonts: makeWebFonts(tokens.typography.webFont),
|
|
22
17
|
space: {
|
|
23
18
|
grid: tokens.grid,
|
|
24
19
|
space: tokens.space
|
|
@@ -44,5 +39,5 @@ const makeRuntimeTokens = (tokens) => ({
|
|
|
44
39
|
)
|
|
45
40
|
});
|
|
46
41
|
export {
|
|
47
|
-
makeRuntimeTokens
|
|
42
|
+
makeRuntimeTokens
|
|
48
43
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const extractFontMetricsForTheme = ({
|
|
3
|
+
capHeight,
|
|
4
|
+
ascent,
|
|
5
|
+
descent,
|
|
6
|
+
lineGap,
|
|
7
|
+
unitsPerEm
|
|
8
|
+
}) => ({
|
|
9
|
+
capHeight,
|
|
10
|
+
ascent,
|
|
11
|
+
descent,
|
|
12
|
+
lineGap,
|
|
13
|
+
unitsPerEm
|
|
14
|
+
});
|
|
15
|
+
exports.extractFontMetricsForTheme = extractFontMetricsForTheme;
|
|
@@ -1,7 +1,7 @@
|
|
|
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 {
|
|
4
|
+
import { vars } from "../../themes/vars.css.mjs";
|
|
5
5
|
setFileScope("src/lib/components/Accordion/AccordionItem.css.ts?used", "braid-design-system");
|
|
6
6
|
const button = style({}, "button");
|
|
7
7
|
const focusRing = style({
|
|
@@ -17,6 +17,6 @@ const focusRing = style({
|
|
|
17
17
|
}, "focusRing");
|
|
18
18
|
endFileScope();
|
|
19
19
|
export {
|
|
20
|
-
button
|
|
21
|
-
focusRing
|
|
20
|
+
button,
|
|
21
|
+
focusRing
|
|
22
22
|
};
|
|
@@ -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 "../../css/responsiveStyle.mjs";
|
|
5
|
+
import { vars } from "../../themes/vars.css.mjs";
|
|
6
6
|
setFileScope("src/lib/components/Autosuggest/Autosuggest.css.ts?used", "braid-design-system");
|
|
7
7
|
const backdrop = style({
|
|
8
8
|
width: "100vw",
|
|
@@ -27,8 +27,8 @@ const groupHeading = style({
|
|
|
27
27
|
}, "groupHeading");
|
|
28
28
|
endFileScope();
|
|
29
29
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
groupHeading
|
|
33
|
-
menu
|
|
30
|
+
backdrop,
|
|
31
|
+
backdropVisible,
|
|
32
|
+
groupHeading,
|
|
33
|
+
menu
|
|
34
34
|
};
|
|
@@ -7,9 +7,6 @@ const styles_lib_css_colorModeStyle_cjs = require("../../css/colorModeStyle.cjs"
|
|
|
7
7
|
const styles_lib_css_responsiveStyle_cjs = require("../../css/responsiveStyle.cjs");
|
|
8
8
|
const styles_lib_themes_vars_css_cjs = require("../../themes/vars.css.cjs");
|
|
9
9
|
fileScope.setFileScope("src/lib/components/Button/Button.css.ts?used", "braid-design-system");
|
|
10
|
-
const constants = {
|
|
11
|
-
smallButtonPaddingSize: "xsmall"
|
|
12
|
-
};
|
|
13
10
|
const root = css.style({
|
|
14
11
|
textDecoration: "none"
|
|
15
12
|
}, "root");
|
|
@@ -35,28 +32,32 @@ const focusOverlay = css.style({
|
|
|
35
32
|
}
|
|
36
33
|
}
|
|
37
34
|
}, "focusOverlay");
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const height = size === "small" ? cssUtils.calc.add(cssUtils.calc.multiply(styles_lib_themes_vars_css_cjs.vars.space[constants.smallButtonPaddingSize], 2), styles_lib_themes_vars_css_cjs.vars.textSize.small[breakpoint].lineHeight) : styles_lib_themes_vars_css_cjs.vars.touchableSize;
|
|
42
|
-
const value = cssUtils.calc(height).subtract(styles_lib_themes_vars_css_cjs.vars.textSize[size][breakpoint].capHeight).divide(2).negate().toString();
|
|
43
|
-
return {
|
|
44
|
-
marginTop: value,
|
|
45
|
-
marginBottom: value
|
|
46
|
-
};
|
|
35
|
+
const minHeightValueForSize = {
|
|
36
|
+
standard: styles_lib_themes_vars_css_cjs.vars.touchableSize,
|
|
37
|
+
small: cssUtils.calc.multiply(styles_lib_themes_vars_css_cjs.vars.touchableSize, 0.8)
|
|
47
38
|
};
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
tablet: stylesForBreakpoint("tablet", "standard")
|
|
53
|
-
}),
|
|
54
|
-
[`${small}&`]: styles_lib_css_responsiveStyle_cjs.responsiveStyle({
|
|
55
|
-
mobile: stylesForBreakpoint("mobile", "small"),
|
|
56
|
-
tablet: stylesForBreakpoint("tablet", "small")
|
|
57
|
-
})
|
|
39
|
+
const capHeightToMinHeight = css.createVar("capHeightToMinHeight");
|
|
40
|
+
const paddingVarForBreakpoint = (size, breakpoint) => ({
|
|
41
|
+
vars: {
|
|
42
|
+
[capHeightToMinHeight]: cssUtils.calc(minHeightValueForSize[size]).subtract(styles_lib_themes_vars_css_cjs.vars.textSize[size][breakpoint].capHeight).divide(2).toString()
|
|
58
43
|
}
|
|
44
|
+
});
|
|
45
|
+
const standard = css.style(styles_lib_css_responsiveStyle_cjs.responsiveStyle({
|
|
46
|
+
mobile: paddingVarForBreakpoint("standard", "mobile"),
|
|
47
|
+
tablet: paddingVarForBreakpoint("standard", "tablet")
|
|
48
|
+
}), "standard");
|
|
49
|
+
const small = css.style(styles_lib_css_responsiveStyle_cjs.responsiveStyle({
|
|
50
|
+
mobile: paddingVarForBreakpoint("small", "mobile"),
|
|
51
|
+
tablet: paddingVarForBreakpoint("small", "tablet")
|
|
52
|
+
}), "small");
|
|
53
|
+
const bleedVerticallyToCapHeight = css.style({
|
|
54
|
+
marginTop: cssUtils.calc.negate(capHeightToMinHeight),
|
|
55
|
+
marginBottom: cssUtils.calc.negate(capHeightToMinHeight)
|
|
59
56
|
}, "bleedVerticallyToCapHeight");
|
|
57
|
+
const padToMinHeight = css.style({
|
|
58
|
+
paddingTop: capHeightToMinHeight,
|
|
59
|
+
paddingBottom: capHeightToMinHeight
|
|
60
|
+
}, "padToMinHeight");
|
|
60
61
|
const dot1 = css.keyframes({
|
|
61
62
|
"14%": {
|
|
62
63
|
opacity: 0
|
|
@@ -134,13 +135,13 @@ const invertedBackgroundsDarkMode = css.styleVariants({
|
|
|
134
135
|
fileScope.endFileScope();
|
|
135
136
|
exports.activeOverlay = activeOverlay;
|
|
136
137
|
exports.bleedVerticallyToCapHeight = bleedVerticallyToCapHeight;
|
|
137
|
-
exports.constants = constants;
|
|
138
138
|
exports.focusOverlay = focusOverlay;
|
|
139
139
|
exports.forceActive = forceActive;
|
|
140
140
|
exports.hoverOverlay = hoverOverlay;
|
|
141
141
|
exports.invertedBackgroundsDarkMode = invertedBackgroundsDarkMode;
|
|
142
142
|
exports.invertedBackgroundsLightMode = invertedBackgroundsLightMode;
|
|
143
143
|
exports.loadingDot = loadingDot;
|
|
144
|
+
exports.padToMinHeight = padToMinHeight;
|
|
144
145
|
exports.root = root;
|
|
145
146
|
exports.small = small;
|
|
146
147
|
exports.standard = standard;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { style, keyframes, styleVariants } from "@vanilla-extract/css";
|
|
2
|
+
import { style, createVar, keyframes, styleVariants } from "@vanilla-extract/css";
|
|
3
3
|
import { calc } from "@vanilla-extract/css-utils";
|
|
4
4
|
import { rgba } from "polished";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { colorModeStyle } from "../../css/colorModeStyle.mjs";
|
|
6
|
+
import { responsiveStyle } from "../../css/responsiveStyle.mjs";
|
|
7
|
+
import { vars } from "../../themes/vars.css.mjs";
|
|
8
8
|
setFileScope("src/lib/components/Button/Button.css.ts?used", "braid-design-system");
|
|
9
|
-
const constants = {
|
|
10
|
-
smallButtonPaddingSize: "xsmall"
|
|
11
|
-
};
|
|
12
9
|
const root = style({
|
|
13
10
|
textDecoration: "none"
|
|
14
11
|
}, "root");
|
|
@@ -34,28 +31,32 @@ const focusOverlay = style({
|
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
}, "focusOverlay");
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const height = size === "small" ? calc.add(calc.multiply(vars.space[constants.smallButtonPaddingSize], 2), vars.textSize.small[breakpoint].lineHeight) : vars.touchableSize;
|
|
41
|
-
const value = calc(height).subtract(vars.textSize[size][breakpoint].capHeight).divide(2).negate().toString();
|
|
42
|
-
return {
|
|
43
|
-
marginTop: value,
|
|
44
|
-
marginBottom: value
|
|
45
|
-
};
|
|
34
|
+
const minHeightValueForSize = {
|
|
35
|
+
standard: vars.touchableSize,
|
|
36
|
+
small: calc.multiply(vars.touchableSize, 0.8)
|
|
46
37
|
};
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
tablet: stylesForBreakpoint("tablet", "standard")
|
|
52
|
-
}),
|
|
53
|
-
[`${small}&`]: responsiveStyle({
|
|
54
|
-
mobile: stylesForBreakpoint("mobile", "small"),
|
|
55
|
-
tablet: stylesForBreakpoint("tablet", "small")
|
|
56
|
-
})
|
|
38
|
+
const capHeightToMinHeight = createVar("capHeightToMinHeight");
|
|
39
|
+
const paddingVarForBreakpoint = (size, breakpoint) => ({
|
|
40
|
+
vars: {
|
|
41
|
+
[capHeightToMinHeight]: calc(minHeightValueForSize[size]).subtract(vars.textSize[size][breakpoint].capHeight).divide(2).toString()
|
|
57
42
|
}
|
|
43
|
+
});
|
|
44
|
+
const standard = style(responsiveStyle({
|
|
45
|
+
mobile: paddingVarForBreakpoint("standard", "mobile"),
|
|
46
|
+
tablet: paddingVarForBreakpoint("standard", "tablet")
|
|
47
|
+
}), "standard");
|
|
48
|
+
const small = style(responsiveStyle({
|
|
49
|
+
mobile: paddingVarForBreakpoint("small", "mobile"),
|
|
50
|
+
tablet: paddingVarForBreakpoint("small", "tablet")
|
|
51
|
+
}), "small");
|
|
52
|
+
const bleedVerticallyToCapHeight = style({
|
|
53
|
+
marginTop: calc.negate(capHeightToMinHeight),
|
|
54
|
+
marginBottom: calc.negate(capHeightToMinHeight)
|
|
58
55
|
}, "bleedVerticallyToCapHeight");
|
|
56
|
+
const padToMinHeight = style({
|
|
57
|
+
paddingTop: capHeightToMinHeight,
|
|
58
|
+
paddingBottom: capHeightToMinHeight
|
|
59
|
+
}, "padToMinHeight");
|
|
59
60
|
const dot1 = keyframes({
|
|
60
61
|
"14%": {
|
|
61
62
|
opacity: 0
|
|
@@ -132,16 +133,16 @@ const invertedBackgroundsDarkMode = styleVariants({
|
|
|
132
133
|
}, "invertedBackgroundsDarkMode");
|
|
133
134
|
endFileScope();
|
|
134
135
|
export {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
standard
|
|
136
|
+
activeOverlay,
|
|
137
|
+
bleedVerticallyToCapHeight,
|
|
138
|
+
focusOverlay,
|
|
139
|
+
forceActive,
|
|
140
|
+
hoverOverlay,
|
|
141
|
+
invertedBackgroundsDarkMode,
|
|
142
|
+
invertedBackgroundsLightMode,
|
|
143
|
+
loadingDot,
|
|
144
|
+
padToMinHeight,
|
|
145
|
+
root,
|
|
146
|
+
small,
|
|
147
|
+
standard
|
|
147
148
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style, createThemeContract, assignVars, styleVariants } from "@vanilla-extract/css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { colorModeStyle } from "../../css/colorModeStyle.mjs";
|
|
4
|
+
import { vars } from "../../themes/vars.css.mjs";
|
|
5
5
|
setFileScope("src/lib/components/Divider/Divider.css.ts?used", "braid-design-system");
|
|
6
6
|
const base = style({
|
|
7
7
|
height: vars.borderWidth.standard
|
|
@@ -46,9 +46,9 @@ const darkModeWeight = styleVariants({
|
|
|
46
46
|
}, "darkModeWeight");
|
|
47
47
|
endFileScope();
|
|
48
48
|
export {
|
|
49
|
-
base
|
|
50
|
-
darkModeWeight
|
|
51
|
-
lightModeWeight
|
|
52
|
-
regular
|
|
53
|
-
strong
|
|
49
|
+
base,
|
|
50
|
+
darkModeWeight,
|
|
51
|
+
lightModeWeight,
|
|
52
|
+
regular,
|
|
53
|
+
strong
|
|
54
54
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style } from "@vanilla-extract/css";
|
|
3
|
-
import {
|
|
3
|
+
import { vars } from "../../themes/vars.css.mjs";
|
|
4
4
|
setFileScope("src/lib/components/Dropdown/Dropdown.css.ts?used", "braid-design-system");
|
|
5
5
|
const field = style({
|
|
6
6
|
paddingRight: vars.touchableSize
|
|
7
7
|
}, "field");
|
|
8
8
|
endFileScope();
|
|
9
9
|
export {
|
|
10
|
-
field
|
|
10
|
+
field
|
|
11
11
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { styleVariants, style, keyframes } 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/components/Loader/Loader.css.ts?used", "braid-design-system");
|
|
6
6
|
const rootSize = styleVariants(vars.textSize, ({
|
|
7
7
|
mobile,
|
|
@@ -75,9 +75,9 @@ const delay = style({
|
|
|
75
75
|
}, "delay");
|
|
76
76
|
endFileScope();
|
|
77
77
|
export {
|
|
78
|
-
circle
|
|
79
|
-
currentColor
|
|
80
|
-
delay
|
|
81
|
-
rootSize
|
|
82
|
-
size
|
|
78
|
+
circle,
|
|
79
|
+
currentColor,
|
|
80
|
+
delay,
|
|
81
|
+
rootSize,
|
|
82
|
+
size
|
|
83
83
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { style, createVar, styleVariants } from "@vanilla-extract/css";
|
|
3
3
|
import { calc } from "@vanilla-extract/css-utils";
|
|
4
|
-
import {
|
|
4
|
+
import { vars } from "../../themes/vars.css.mjs";
|
|
5
5
|
setFileScope("src/lib/components/MenuRenderer/MenuRenderer.css.ts?used", "braid-design-system");
|
|
6
6
|
const backdrop = style({
|
|
7
7
|
width: "100vw",
|
|
@@ -34,8 +34,8 @@ const placementBottom = style({
|
|
|
34
34
|
}, "placementBottom");
|
|
35
35
|
endFileScope();
|
|
36
36
|
export {
|
|
37
|
-
backdrop
|
|
38
|
-
menuIsClosed
|
|
39
|
-
placementBottom
|
|
40
|
-
width
|
|
37
|
+
backdrop,
|
|
38
|
+
menuIsClosed,
|
|
39
|
+
placementBottom,
|
|
40
|
+
width
|
|
41
41
|
};
|