braid-design-system 32.1.1 → 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 +125 -0
- package/codemod/dist/wrapper.js +102 -104
- package/dist/ToastContext.chunk.cjs +21 -21
- package/dist/ToastContext.chunk.mjs +41 -41
- package/dist/Toggle.chunk.cjs +19 -29
- package/dist/Toggle.chunk.mjs +24 -34
- package/dist/reset.d.ts +190 -91
- package/dist/side-effects/lib/themes/baseTokens/apac.cjs +7 -8
- package/dist/side-effects/lib/themes/baseTokens/apac.mjs +6 -8
- package/dist/side-effects/lib/themes/makeRuntimeTokens.cjs +3 -9
- package/dist/side-effects/lib/themes/makeRuntimeTokens.mjs +3 -8
- 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/Button/Button.css.cjs +24 -23
- package/dist/styles/lib/components/Button/Button.css.mjs +25 -24
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.cjs +1 -5
- package/dist/styles/lib/components/TooltipRenderer/TooltipRenderer.css.mjs +1 -5
- package/dist/styles/lib/components/private/Keyline/Keyline.css.cjs +4 -0
- package/dist/styles/lib/components/private/Keyline/Keyline.css.mjs +5 -1
- package/dist/styles/lib/css/negativeMargin/negativeMargin.css.cjs +4 -9
- package/dist/styles/lib/css/negativeMargin/negativeMargin.css.mjs +1 -6
- package/dist/styles/lib/css/typography.css.cjs +1 -16
- package/dist/styles/lib/css/typography.css.mjs +1 -16
- package/dist/styles/lib/themes/docs/tokens.cjs +8 -8
- package/dist/styles/lib/themes/docs/tokens.mjs +6 -8
- package/dist/styles/lib/themes/makeVanillaTheme.cjs +22 -9
- package/dist/styles/lib/themes/makeVanillaTheme.mjs +22 -9
- package/dist/styles/lib/themes/wireframe/tokens.cjs +25 -29
- package/dist/styles/lib/themes/wireframe/tokens.mjs +23 -29
- package/package.json +3 -2
- package/dist/styles/lib/components/Badge/Badge.css.cjs +0 -27
- package/dist/styles/lib/components/Badge/Badge.css.mjs +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,130 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 32.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- **Box, atoms, vars:** Add `small` to border radius scale ([#1253](https://github.com/seek-oss/braid-design-system/pull/1253))
|
|
8
|
+
|
|
9
|
+
Extends the border radius scale to include `small` as a step below `standard`.
|
|
10
|
+
This addition is to support an upcoming design uplift that requires greater fidelity in the scale.
|
|
11
|
+
Note, the new value is also available as a responsive property.
|
|
12
|
+
|
|
13
|
+
**EXAMPLE USAGE:**
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<Box borderRadius="small" />;
|
|
17
|
+
|
|
18
|
+
{
|
|
19
|
+
/* Or responsively: */
|
|
20
|
+
}
|
|
21
|
+
<Box borderRadius={{ mobile: 'small', tablet: 'standard' }} />;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { atoms } from 'braid-design-system/css';
|
|
26
|
+
|
|
27
|
+
atoms({ borderRadius: 'small' });
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { vars } from 'braid-design-system/css';
|
|
32
|
+
|
|
33
|
+
const radius = vars.borderRadius.small;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- **theme:** Add support for defining line heights with lineGap ([#1267](https://github.com/seek-oss/braid-design-system/pull/1267))
|
|
37
|
+
|
|
38
|
+
Provide support for themes to define their typographic line heights via `lineGap`.
|
|
39
|
+
This allows us to reason about the white space between wrapping lines of text in the same way we think about `Stack` spacing.
|
|
40
|
+
|
|
41
|
+
For a visual preview of this mental model head over to the [Capsize website].
|
|
42
|
+
|
|
43
|
+
[Capsize website]: https://seek-oss.github.io/capsize/
|
|
44
|
+
|
|
45
|
+
- Add `xxxlarge` to the space scale ([#1262](https://github.com/seek-oss/braid-design-system/pull/1262))
|
|
46
|
+
|
|
47
|
+
Extends the range of the space scale to include `xxxlarge`.
|
|
48
|
+
This addition is to support an upcoming design uplift that requires greater fidelity in the scale.
|
|
49
|
+
Note, the new value is also available as a responsive property.
|
|
50
|
+
|
|
51
|
+
**EXAMPLE USAGE:**
|
|
52
|
+
|
|
53
|
+
```jsx
|
|
54
|
+
<Stack space="xxxlarge">...</Stack>;
|
|
55
|
+
|
|
56
|
+
{
|
|
57
|
+
/* Or responsively: */
|
|
58
|
+
}
|
|
59
|
+
<Stack space={{ mobile: 'large', tablet: 'xxxlarge' }}>...</Stack>;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { atoms } from 'braid-design-system/css';
|
|
64
|
+
|
|
65
|
+
atoms({ paddingY: 'xxxlarge' });
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { vars } from 'braid-design-system/css';
|
|
70
|
+
|
|
71
|
+
const space = vars.space.xxxlarge;
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- **theme:** Add support for webfonts beyond Google Fonts ([#1255](https://github.com/seek-oss/braid-design-system/pull/1255))
|
|
77
|
+
|
|
78
|
+
Previously the `webFont` on the theme was the `familyName` and was being used to construct a link tag to a Google Fonts stylesheet and provide to consumers via a runtime token.
|
|
79
|
+
To enable fonts beyond Google Fonts, we are changing `webFont` to be a URL.
|
|
80
|
+
|
|
81
|
+
This does not impact existing themes (as there are no themes currently with a web font), and the contract of the runtime token (a constructed link tag) remains unchanged.
|
|
82
|
+
|
|
83
|
+
- **MenuRenderer:** Hide overflow on menu ([#1264](https://github.com/seek-oss/braid-design-system/pull/1264))
|
|
84
|
+
|
|
85
|
+
Fixes a bug where the selection/highlight for a `MenuItem` could extend outside of the menu itself.
|
|
86
|
+
|
|
87
|
+
- **Badge:** Adjust height to support different typographic scales ([#1257](https://github.com/seek-oss/braid-design-system/pull/1257))
|
|
88
|
+
|
|
89
|
+
Adjusts the height of `Badge` to be driven by the capHeight of `xsmall` text plus vertical padding, rather than `xsmall` line height.
|
|
90
|
+
This enables different typographic scales across themes, while ensuring the `Badge` height is relative.
|
|
91
|
+
|
|
92
|
+
- **RadioItem, Toggle:** Use formAccent border when selected ([#1251](https://github.com/seek-oss/braid-design-system/pull/1251))
|
|
93
|
+
|
|
94
|
+
Switch to using the `formAccent` border colour, rather than the `field` border color, when in the selected state (e.g. `checked` for `RadioItem`, `on` for `Toggle`).
|
|
95
|
+
|
|
96
|
+
- Fix error reading `standard` of undefined ([#1256](https://github.com/seek-oss/braid-design-system/pull/1256))
|
|
97
|
+
|
|
98
|
+
The use of dynamic property access left some styles exposed to being marked as unused and tree shaken away.
|
|
99
|
+
|
|
100
|
+
Refactoring these styles to be explicitly referenced to ensure this will not be the case.
|
|
101
|
+
|
|
102
|
+
- **TooltipRenderer:** Refine padding to complement radius scale ([#1263](https://github.com/seek-oss/braid-design-system/pull/1263))
|
|
103
|
+
|
|
104
|
+
Removes the custom padding on tooltips in favour of using the space scale.
|
|
105
|
+
Previously, a custom value was used to complement the over sized radius which has now be reduced.
|
|
106
|
+
|
|
107
|
+
- **Button, ButtonLink:** Improve support for different typographic scales ([#1259](https://github.com/seek-oss/braid-design-system/pull/1259))
|
|
108
|
+
|
|
109
|
+
Ensure the height of a `small` sized `Button` is not reliant on the text line height.
|
|
110
|
+
|
|
111
|
+
This enables different typographic scales across themes, while ensuring the `Button` height is relative.
|
|
112
|
+
|
|
113
|
+
- **Alert, Card, useToast:** Decouple keyline width from space scale ([#1266](https://github.com/seek-oss/braid-design-system/pull/1266))
|
|
114
|
+
|
|
115
|
+
Previously the keyline width on the left determined its width using the space scale.
|
|
116
|
+
Re-aligning this to use the grid unit to enable themes with larger space scales.
|
|
117
|
+
|
|
118
|
+
- Improve consistency of border radius usage across components ([#1253](https://github.com/seek-oss/braid-design-system/pull/1253))
|
|
119
|
+
|
|
120
|
+
Over time, individual components have reached for a larger radius in the scale, rather than increasing the scale at a theme level. This resulted in inconsistent use across the system, preventing uplift of the scale.
|
|
121
|
+
|
|
122
|
+
Re-aligning all components to use the scale consistently enables themes to apply very different radius scales — enabling an upcoming design uplift theme.
|
|
123
|
+
|
|
124
|
+
- **Dialog, Drawer:** Reduce space between title and description ([#1265](https://github.com/seek-oss/braid-design-system/pull/1265))
|
|
125
|
+
|
|
126
|
+
Reducing the space between `title` and `description` to `small` to improve association of the header block content
|
|
127
|
+
|
|
3
128
|
## 32.1.1
|
|
4
129
|
|
|
5
130
|
### Patch Changes
|
package/codemod/dist/wrapper.js
CHANGED
|
@@ -115018,7 +115018,7 @@ var require_lib29 = __commonJS({
|
|
|
115018
115018
|
value: true
|
|
115019
115019
|
});
|
|
115020
115020
|
exports2.default = annotateAsPure;
|
|
115021
|
-
var _t =
|
|
115021
|
+
var _t = require_lib23();
|
|
115022
115022
|
var {
|
|
115023
115023
|
addComment
|
|
115024
115024
|
} = _t;
|
|
@@ -247063,9 +247063,9 @@ var require_prettier = __commonJS({
|
|
|
247063
247063
|
"node_modules/core-js/internals/ie8-dom-define.js"(exports22, module22) {
|
|
247064
247064
|
var DESCRIPTORS = require_descriptors();
|
|
247065
247065
|
var fails = require_fails();
|
|
247066
|
-
var
|
|
247066
|
+
var createElement2 = require_document_create_element();
|
|
247067
247067
|
module22.exports = !DESCRIPTORS && !fails(function() {
|
|
247068
|
-
return Object.defineProperty(
|
|
247068
|
+
return Object.defineProperty(createElement2("div"), "a", {
|
|
247069
247069
|
get: function() {
|
|
247070
247070
|
return 7;
|
|
247071
247071
|
}
|
|
@@ -285396,7 +285396,7 @@ var require_react_development = __commonJS({
|
|
|
285396
285396
|
}
|
|
285397
285397
|
return element;
|
|
285398
285398
|
};
|
|
285399
|
-
function
|
|
285399
|
+
function createElement2(type2, config, children) {
|
|
285400
285400
|
var propName;
|
|
285401
285401
|
var props = {};
|
|
285402
285402
|
var key2 = null;
|
|
@@ -286472,7 +286472,7 @@ var require_react_development = __commonJS({
|
|
|
286472
286472
|
error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
286473
286473
|
}
|
|
286474
286474
|
}
|
|
286475
|
-
var element =
|
|
286475
|
+
var element = createElement2.apply(this, arguments);
|
|
286476
286476
|
if (element == null) {
|
|
286477
286477
|
return element;
|
|
286478
286478
|
}
|
|
@@ -298771,11 +298771,11 @@ var require_react_reconciler_development = __commonJS({
|
|
|
298771
298771
|
module2.exports = function $$$reconciler($$$hostConfig) {
|
|
298772
298772
|
var exports3 = {};
|
|
298773
298773
|
"use strict";
|
|
298774
|
-
var
|
|
298774
|
+
var React4 = require_react();
|
|
298775
298775
|
var _assign = require_object_assign();
|
|
298776
298776
|
var Scheduler = require_scheduler();
|
|
298777
298777
|
var tracing = require_tracing();
|
|
298778
|
-
var ReactSharedInternals =
|
|
298778
|
+
var ReactSharedInternals = React4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
298779
298779
|
function warn(format) {
|
|
298780
298780
|
{
|
|
298781
298781
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -301359,7 +301359,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
301359
301359
|
}
|
|
301360
301360
|
var fakeInternalInstance = {};
|
|
301361
301361
|
var isArray = Array.isArray;
|
|
301362
|
-
var emptyRefsObject = new
|
|
301362
|
+
var emptyRefsObject = new React4.Component().refs;
|
|
301363
301363
|
var didWarnAboutStateAssignmentForComponent;
|
|
301364
301364
|
var didWarnAboutUninitializedState;
|
|
301365
301365
|
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
|
|
@@ -311668,9 +311668,9 @@ var require_react_reconciler = __commonJS({
|
|
|
311668
311668
|
}
|
|
311669
311669
|
});
|
|
311670
311670
|
|
|
311671
|
-
// ../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.
|
|
311671
|
+
// ../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.0_patch_hash=bohigvh5hpnbocmxkl4e5ainua/node_modules/yoga-layout-prebuilt/yoga-layout/dist/YGEnums.js
|
|
311672
311672
|
var require_YGEnums = __commonJS({
|
|
311673
|
-
"../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.
|
|
311673
|
+
"../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.0_patch_hash=bohigvh5hpnbocmxkl4e5ainua/node_modules/yoga-layout-prebuilt/yoga-layout/dist/YGEnums.js"(exports2, module2) {
|
|
311674
311674
|
"use strict";
|
|
311675
311675
|
var CONSTANTS = {
|
|
311676
311676
|
ALIGN_COUNT: 8,
|
|
@@ -311755,9 +311755,9 @@ var require_YGEnums = __commonJS({
|
|
|
311755
311755
|
}
|
|
311756
311756
|
});
|
|
311757
311757
|
|
|
311758
|
-
// ../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.
|
|
311758
|
+
// ../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.0_patch_hash=bohigvh5hpnbocmxkl4e5ainua/node_modules/yoga-layout-prebuilt/yoga-layout/dist/entry-common.js
|
|
311759
311759
|
var require_entry_common = __commonJS({
|
|
311760
|
-
"../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.
|
|
311760
|
+
"../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.0_patch_hash=bohigvh5hpnbocmxkl4e5ainua/node_modules/yoga-layout-prebuilt/yoga-layout/dist/entry-common.js"(exports2, module2) {
|
|
311761
311761
|
"use strict";
|
|
311762
311762
|
var _extends = Object.assign || function(target) {
|
|
311763
311763
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -311978,9 +311978,9 @@ var require_entry_common = __commonJS({
|
|
|
311978
311978
|
}
|
|
311979
311979
|
});
|
|
311980
311980
|
|
|
311981
|
-
// ../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.
|
|
311981
|
+
// ../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.0_patch_hash=bohigvh5hpnbocmxkl4e5ainua/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js
|
|
311982
311982
|
var require_nbind = __commonJS({
|
|
311983
|
-
"../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.
|
|
311983
|
+
"../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.0_patch_hash=bohigvh5hpnbocmxkl4e5ainua/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js"(exports, module) {
|
|
311984
311984
|
(function(root, wrapper) {
|
|
311985
311985
|
if (typeof define == "function" && define.amd)
|
|
311986
311986
|
define([], function() {
|
|
@@ -314315,7 +314315,8 @@ var require_nbind = __commonJS({
|
|
|
314315
314315
|
}
|
|
314316
314316
|
_nbind.throwError = throwError;
|
|
314317
314317
|
_nbind.bigEndian = false;
|
|
314318
|
-
_a = _typeModule(_typeModule)
|
|
314318
|
+
var _a = _typeModule(_typeModule);
|
|
314319
|
+
_nbind.Type = _a.Type, _nbind.makeType = _a.makeType, _nbind.getComplexType = _a.getComplexType, _nbind.structureList = _a.structureList;
|
|
314319
314320
|
var BindType = function(_super) {
|
|
314320
314321
|
__extends(BindType2, _super);
|
|
314321
314322
|
function BindType2() {
|
|
@@ -339556,9 +339557,9 @@ var require_nbind = __commonJS({
|
|
|
339556
339557
|
}
|
|
339557
339558
|
});
|
|
339558
339559
|
|
|
339559
|
-
// ../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.
|
|
339560
|
+
// ../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.0_patch_hash=bohigvh5hpnbocmxkl4e5ainua/node_modules/yoga-layout-prebuilt/yoga-layout/dist/entry-browser.js
|
|
339560
339561
|
var require_entry_browser = __commonJS({
|
|
339561
|
-
"../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.
|
|
339562
|
+
"../../../node_modules/.pnpm/yoga-layout-prebuilt@1.10.0_patch_hash=bohigvh5hpnbocmxkl4e5ainua/node_modules/yoga-layout-prebuilt/yoga-layout/dist/entry-browser.js"(exports2, module2) {
|
|
339562
339563
|
"use strict";
|
|
339563
339564
|
var Yoga = require_entry_common();
|
|
339564
339565
|
var nbind = require_nbind();
|
|
@@ -361502,9 +361503,9 @@ var require_core5 = __commonJS({
|
|
|
361502
361503
|
return true;
|
|
361503
361504
|
}
|
|
361504
361505
|
},
|
|
361505
|
-
render(
|
|
361506
|
-
return
|
|
361507
|
-
|
|
361506
|
+
render(createElement2) {
|
|
361507
|
+
return createElement2("pre", {}, [
|
|
361508
|
+
createElement2("code", {
|
|
361508
361509
|
class: this.className,
|
|
361509
361510
|
domProps: { innerHTML: this.highlighted }
|
|
361510
361511
|
})
|
|
@@ -401533,6 +401534,11 @@ var import_prettier = __toESM(require_prettier());
|
|
|
401533
401534
|
var import_plugin_syntax_jsx = __toESM(require_lib35());
|
|
401534
401535
|
var import_plugin_syntax_typescript = __toESM(require_lib22());
|
|
401535
401536
|
|
|
401537
|
+
// ../src/plugin-deprecate/isBraidImport.ts
|
|
401538
|
+
var braidConsumer = /braid-design-system(?:\/css)?$/;
|
|
401539
|
+
var braidInternal = /braid-src\/lib(?:\/(css|components))?$/;
|
|
401540
|
+
var isBraidImport = (importSource) => braidConsumer.test(importSource) || braidInternal.test(importSource);
|
|
401541
|
+
|
|
401536
401542
|
// ../src/plugin-deprecate/plugin-deprecate-atoms.ts
|
|
401537
401543
|
var import_core2 = __toESM(require_lib34());
|
|
401538
401544
|
|
|
@@ -401540,10 +401546,11 @@ var import_core2 = __toESM(require_lib34());
|
|
|
401540
401546
|
var import_core = __toESM(require_lib34());
|
|
401541
401547
|
|
|
401542
401548
|
// ../src/warning-renderer/warning.tsx
|
|
401543
|
-
var
|
|
401549
|
+
var import_react2 = __toESM(require_react());
|
|
401544
401550
|
var import_ink4 = __toESM(require_build2());
|
|
401545
401551
|
|
|
401546
401552
|
// ../src/warning-renderer/codeFrame.tsx
|
|
401553
|
+
var import_react = __toESM(require_react());
|
|
401547
401554
|
var import_ink3 = __toESM(require_build2());
|
|
401548
401555
|
|
|
401549
401556
|
// ../src/ink/ink-to-string.ts
|
|
@@ -401577,7 +401584,7 @@ var SyntaxHighlight = ({ code, language, theme }) => {
|
|
|
401577
401584
|
() => (0, import_cli_highlight.highlight)(code, { language, theme }),
|
|
401578
401585
|
[code, language, theme]
|
|
401579
401586
|
);
|
|
401580
|
-
return
|
|
401587
|
+
return /* @__PURE__ */ React.createElement(import_ink2.Text, null, highlightedCode);
|
|
401581
401588
|
};
|
|
401582
401589
|
var SyntaxHighlight_default = SyntaxHighlight;
|
|
401583
401590
|
|
|
@@ -401588,23 +401595,23 @@ var CodeLine = ({
|
|
|
401588
401595
|
lineNumberWidth,
|
|
401589
401596
|
highlight: highlight2
|
|
401590
401597
|
}) => {
|
|
401591
|
-
const propIndicatorLength = highlight2 ?
|
|
401592
|
-
|
|
401593
|
-
|
|
401594
|
-
|
|
401595
|
-
|
|
401596
|
-
|
|
401597
|
-
|
|
401598
|
-
|
|
401599
|
-
|
|
401600
|
-
|
|
401601
|
-
|
|
401602
|
-
|
|
401603
|
-
|
|
401604
|
-
|
|
401605
|
-
|
|
401606
|
-
|
|
401607
|
-
|
|
401598
|
+
const propIndicatorLength = highlight2 ? /* @__PURE__ */ import_react.default.createElement(import_ink3.Box, null, /* @__PURE__ */ import_react.default.createElement(import_ink3.Box, {
|
|
401599
|
+
width: highlight2.start
|
|
401600
|
+
}), /* @__PURE__ */ import_react.default.createElement(import_ink3.Text, {
|
|
401601
|
+
color: "yellow"
|
|
401602
|
+
}, "".padStart(highlight2.end - highlight2.start, "^"))) : null;
|
|
401603
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ink3.Box, {
|
|
401604
|
+
alignItems: "flex-start"
|
|
401605
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ink3.Box, {
|
|
401606
|
+
width: lineNumberWidth + 3,
|
|
401607
|
+
alignItems: "flex-end",
|
|
401608
|
+
flexDirection: "column"
|
|
401609
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_ink3.Text, null, lineNumber, " \u2502 "), highlight2 ? /* @__PURE__ */ import_react.default.createElement(import_ink3.Text, null, "\u2502 ") : null), /* @__PURE__ */ import_react.default.createElement(import_ink3.Box, {
|
|
401610
|
+
flexDirection: "column"
|
|
401611
|
+
}, /* @__PURE__ */ import_react.default.createElement(SyntaxHighlight_default, {
|
|
401612
|
+
code,
|
|
401613
|
+
language: "tsx"
|
|
401614
|
+
}), propIndicatorLength));
|
|
401608
401615
|
};
|
|
401609
401616
|
var CodeFrame = ({ code, location }) => {
|
|
401610
401617
|
const codeLines = code.split("\n");
|
|
@@ -401619,11 +401626,22 @@ var CodeFrame = ({ code, location }) => {
|
|
|
401619
401626
|
3,
|
|
401620
401627
|
...[beforeLineNumber, codeLineNumber, afterLineNumber].filter(Boolean).map((lineNumber) => lineNumber.toString().length)
|
|
401621
401628
|
);
|
|
401622
|
-
return
|
|
401623
|
-
|
|
401624
|
-
|
|
401625
|
-
|
|
401626
|
-
|
|
401629
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ink3.Box, {
|
|
401630
|
+
flexDirection: "column"
|
|
401631
|
+
}, /* @__PURE__ */ import_react.default.createElement(CodeLine, {
|
|
401632
|
+
code: beforeLine,
|
|
401633
|
+
lineNumber: beforeLineNumber,
|
|
401634
|
+
lineNumberWidth: longestLineNumberLength
|
|
401635
|
+
}), /* @__PURE__ */ import_react.default.createElement(CodeLine, {
|
|
401636
|
+
code: codeLine,
|
|
401637
|
+
lineNumber: codeLineNumber,
|
|
401638
|
+
lineNumberWidth: longestLineNumberLength,
|
|
401639
|
+
highlight: { start: start.column, end: end.column }
|
|
401640
|
+
}), /* @__PURE__ */ import_react.default.createElement(CodeLine, {
|
|
401641
|
+
code: afterLine,
|
|
401642
|
+
lineNumber: afterLineNumber,
|
|
401643
|
+
lineNumberWidth: longestLineNumberLength
|
|
401644
|
+
}));
|
|
401627
401645
|
};
|
|
401628
401646
|
|
|
401629
401647
|
// ../src/warning-renderer/warning.tsx
|
|
@@ -401635,69 +401653,49 @@ var UntraceableImportWarning = ({
|
|
|
401635
401653
|
variableName,
|
|
401636
401654
|
propName,
|
|
401637
401655
|
importSource
|
|
401638
|
-
}) =>
|
|
401639
|
-
|
|
401640
|
-
|
|
401641
|
-
|
|
401642
|
-
|
|
401643
|
-
|
|
401644
|
-
|
|
401645
|
-
|
|
401646
|
-
|
|
401647
|
-
|
|
401648
|
-
|
|
401649
|
-
{"\u2019, but is imported from \u2018"}
|
|
401650
|
-
{importSource}
|
|
401651
|
-
{"\u2019."}
|
|
401652
|
-
</import_ink4.Text>
|
|
401653
|
-
<import_ink4.Text>You should check that there are no usages of deprecated values in that file.</import_ink4.Text>
|
|
401654
|
-
</import_react.Fragment>
|
|
401655
|
-
{importLocation ? <import_react.Fragment>
|
|
401656
|
-
<import_ink4.Text dimColor>Imported at</import_ink4.Text>
|
|
401657
|
-
<CodeFrame code={code} location={importLocation} />
|
|
401658
|
-
</import_react.Fragment> : null}
|
|
401659
|
-
{propLocation ? <import_react.Fragment>
|
|
401660
|
-
<import_ink4.Text dimColor>Used at</import_ink4.Text>
|
|
401661
|
-
<CodeFrame code={code} location={propLocation} />
|
|
401662
|
-
</import_react.Fragment> : null}
|
|
401663
|
-
</Stack>;
|
|
401656
|
+
}) => /* @__PURE__ */ import_react2.default.createElement(Stack, null, /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, null, "Untraceable import."), /* @__PURE__ */ import_react2.default.createElement(import_react2.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, null, "Variable \u201C", variableName, "\u201D is assigned to", " ", propName ? `the \u2018${propName}\u2019` : "a", " prop on \u2018", componentName, "\u2019, but is imported from \u2018", importSource, "\u2019."), /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, null, "You should check that there are no usages of deprecated values in that file.")), importLocation ? /* @__PURE__ */ import_react2.default.createElement(import_react2.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, {
|
|
401657
|
+
dimColor: true
|
|
401658
|
+
}, "Imported at"), /* @__PURE__ */ import_react2.default.createElement(CodeFrame, {
|
|
401659
|
+
code,
|
|
401660
|
+
location: importLocation
|
|
401661
|
+
})) : null, propLocation ? /* @__PURE__ */ import_react2.default.createElement(import_react2.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, {
|
|
401662
|
+
dimColor: true
|
|
401663
|
+
}, "Used at"), /* @__PURE__ */ import_react2.default.createElement(CodeFrame, {
|
|
401664
|
+
code,
|
|
401665
|
+
location: propLocation
|
|
401666
|
+
})) : null);
|
|
401664
401667
|
var renderUntraceableImportWarning = (props) => `
|
|
401665
|
-
${renderToString(
|
|
401668
|
+
${renderToString(/* @__PURE__ */ import_react2.default.createElement(UntraceableImportWarning, {
|
|
401669
|
+
...props
|
|
401670
|
+
}))}
|
|
401666
401671
|
|
|
401667
401672
|
`;
|
|
401668
|
-
var Stack = ({ children }) =>
|
|
401669
|
-
|
|
401670
|
-
|
|
401671
|
-
|
|
401673
|
+
var Stack = ({ children }) => /* @__PURE__ */ import_react2.default.createElement(import_ink4.Box, {
|
|
401674
|
+
flexDirection: "column"
|
|
401675
|
+
}, import_react2.default.Children.toArray(children).map((child, index) => /* @__PURE__ */ import_react2.default.createElement(import_react2.Fragment, {
|
|
401676
|
+
key: index
|
|
401677
|
+
}, index ? /* @__PURE__ */ import_react2.default.createElement(import_ink4.Box, {
|
|
401678
|
+
paddingTop: 1
|
|
401679
|
+
}) : null, child)));
|
|
401672
401680
|
var UntraceablePropertyWarning = ({
|
|
401673
401681
|
code,
|
|
401674
401682
|
componentName,
|
|
401675
401683
|
propLocation
|
|
401676
|
-
}) =>
|
|
401677
|
-
|
|
401678
|
-
|
|
401679
|
-
|
|
401680
|
-
{"The following object is being spread onto "}
|
|
401681
|
-
{componentName}
|
|
401682
|
-
{" and contains computed properties."}
|
|
401683
|
-
</import_ink4.Text> : null}
|
|
401684
|
-
<import_ink4.Text>You should check that there are no usages of deprecated properties in this object.</import_ink4.Text>
|
|
401685
|
-
</import_react.Fragment>
|
|
401686
|
-
{propLocation ? <CodeFrame code={code} location={propLocation} /> : null}
|
|
401687
|
-
</Stack>;
|
|
401684
|
+
}) => /* @__PURE__ */ import_react2.default.createElement(Stack, null, /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, null, "Untraceable computed object property."), /* @__PURE__ */ import_react2.default.createElement(import_react2.Fragment, null, componentName ? /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, null, "The following object is being spread onto ", componentName, " and contains computed properties.") : null, /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, null, "You should check that there are no usages of deprecated properties in this object.")), propLocation ? /* @__PURE__ */ import_react2.default.createElement(CodeFrame, {
|
|
401685
|
+
code,
|
|
401686
|
+
location: propLocation
|
|
401687
|
+
}) : null);
|
|
401688
401688
|
var renderUntraceablePropertyWarning = (props) => `
|
|
401689
|
-
${renderToString(
|
|
401689
|
+
${renderToString(/* @__PURE__ */ import_react2.default.createElement(UntraceablePropertyWarning, {
|
|
401690
|
+
...props
|
|
401691
|
+
}))}
|
|
401690
401692
|
|
|
401691
401693
|
`;
|
|
401692
|
-
var RecursiveDepthWarning = ({ filePath }) =>
|
|
401693
|
-
<import_ink4.Text>File parsing depth limit met.</import_ink4.Text>
|
|
401694
|
-
{filePath ? <import_react.Fragment>
|
|
401695
|
-
<import_ink4.Text>You may want to manually check the following file:</import_ink4.Text>
|
|
401696
|
-
<import_ink4.Text>{filePath}</import_ink4.Text>
|
|
401697
|
-
</import_react.Fragment> : null}
|
|
401698
|
-
</Stack>;
|
|
401694
|
+
var RecursiveDepthWarning = ({ filePath }) => /* @__PURE__ */ import_react2.default.createElement(Stack, null, /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, null, "File parsing depth limit met."), filePath ? /* @__PURE__ */ import_react2.default.createElement(import_react2.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, null, "You may want to manually check the following file:"), /* @__PURE__ */ import_react2.default.createElement(import_ink4.Text, null, filePath)) : null);
|
|
401699
401695
|
var renderRecursiveDepthWarning = (props) => `
|
|
401700
|
-
${renderToString(
|
|
401696
|
+
${renderToString(/* @__PURE__ */ import_react2.default.createElement(RecursiveDepthWarning, {
|
|
401697
|
+
...props
|
|
401698
|
+
}))}
|
|
401701
401699
|
|
|
401702
401700
|
`;
|
|
401703
401701
|
|
|
@@ -401870,7 +401868,7 @@ function plugin_deprecate_atoms_default() {
|
|
|
401870
401868
|
enter(path) {
|
|
401871
401869
|
const bodyPath = path.get("body");
|
|
401872
401870
|
for (const statement of bodyPath) {
|
|
401873
|
-
if (import_core2.types.isImportDeclaration(statement.node) &&
|
|
401871
|
+
if (import_core2.types.isImportDeclaration(statement.node) && isBraidImport(statement.node.source.value)) {
|
|
401874
401872
|
for (const specifier of statement.node.specifiers) {
|
|
401875
401873
|
if (import_core2.types.isImportSpecifier(specifier) && import_core2.types.isIdentifier(specifier.imported) && Boolean(this.deprecations[specifier.imported.name])) {
|
|
401876
401874
|
this.importNames.set(
|
|
@@ -401936,7 +401934,7 @@ function plugin_deprecate_props_default() {
|
|
|
401936
401934
|
enter(path) {
|
|
401937
401935
|
const bodyPath = path.get("body");
|
|
401938
401936
|
for (const statement of bodyPath) {
|
|
401939
|
-
if (import_core3.types.isImportDeclaration(statement.node) &&
|
|
401937
|
+
if (import_core3.types.isImportDeclaration(statement.node) && isBraidImport(statement.node.source.value)) {
|
|
401940
401938
|
for (const specifier of statement.node.specifiers) {
|
|
401941
401939
|
if (import_core3.types.isImportSpecifier(specifier) && import_core3.types.isIdentifier(specifier.imported) && Boolean(this.deprecations[specifier.imported.name])) {
|
|
401942
401940
|
this.importNames.set(
|
|
@@ -402120,7 +402118,7 @@ function plugin_deprecate_vars_default() {
|
|
|
402120
402118
|
enter(path) {
|
|
402121
402119
|
const bodyPath = path.get("body");
|
|
402122
402120
|
for (const statement of bodyPath) {
|
|
402123
|
-
if (import_core4.types.isImportDeclaration(statement.node) &&
|
|
402121
|
+
if (import_core4.types.isImportDeclaration(statement.node) && isBraidImport(statement.node.source.value)) {
|
|
402124
402122
|
for (const specifier of statement.node.specifiers) {
|
|
402125
402123
|
if (import_core4.types.isImportSpecifier(specifier) && import_core4.types.isIdentifier(specifier.imported) && specifier.imported.name === "vars") {
|
|
402126
402124
|
const binding = path.scope.getBinding(specifier.local.name);
|
|
@@ -402130,7 +402128,7 @@ function plugin_deprecate_vars_default() {
|
|
|
402130
402128
|
for (const refPath of binding.referencePaths) {
|
|
402131
402129
|
walk({
|
|
402132
402130
|
path: refPath,
|
|
402133
|
-
deprecations: this.deprecations.vars,
|
|
402131
|
+
deprecations: this.deprecations.vars || {},
|
|
402134
402132
|
code: this.file.code,
|
|
402135
402133
|
filename: this.filename,
|
|
402136
402134
|
metadata: this.file.metadata
|
|
@@ -402162,7 +402160,7 @@ function plugin_import_update_default() {
|
|
|
402162
402160
|
enter(path) {
|
|
402163
402161
|
const bodyPath = path.get("body");
|
|
402164
402162
|
for (const statement of bodyPath) {
|
|
402165
|
-
if (import_core5.types.isImportDeclaration(statement.node) &&
|
|
402163
|
+
if (import_core5.types.isImportDeclaration(statement.node) && isBraidImport(statement.node.source.value)) {
|
|
402166
402164
|
const relocations = Object.keys(relocationMap);
|
|
402167
402165
|
statement.node.specifiers = statement.node.specifiers.filter(
|
|
402168
402166
|
(specifier) => {
|
|
@@ -402275,7 +402273,7 @@ function plugin_prop_rename_default() {
|
|
|
402275
402273
|
enter(path) {
|
|
402276
402274
|
const bodyPath = path.get("body");
|
|
402277
402275
|
for (const statement of bodyPath) {
|
|
402278
|
-
if (import_core6.types.isImportDeclaration(statement.node) &&
|
|
402276
|
+
if (import_core6.types.isImportDeclaration(statement.node) && isBraidImport(statement.node.source.value)) {
|
|
402279
402277
|
for (const specifier of statement.node.specifiers) {
|
|
402280
402278
|
if (import_core6.types.isImportSpecifier(specifier) && import_core6.types.isIdentifier(specifier.imported) && Boolean(this.renames[specifier.imported.name])) {
|
|
402281
402279
|
this.importNames.set(
|
|
@@ -402416,8 +402414,8 @@ function babelRecast({
|
|
|
402416
402414
|
}
|
|
402417
402415
|
const { ast: transformedAST, metadata } = transformResult;
|
|
402418
402416
|
return {
|
|
402419
|
-
warnings: metadata ? metadata.warnings
|
|
402420
|
-
hasChanged: metadata ? metadata.hasChanged
|
|
402417
|
+
warnings: (metadata == null ? void 0 : metadata.warnings) ?? [],
|
|
402418
|
+
hasChanged: (metadata == null ? void 0 : metadata.hasChanged) ?? false,
|
|
402421
402419
|
source: (0, import_recast.print)(transformedAST).code
|
|
402422
402420
|
};
|
|
402423
402421
|
} catch (e) {
|
|
@@ -462,14 +462,20 @@ const resolveResponsiveProp = (value, mobileAtoms, tabletAtoms, desktopAtoms, wi
|
|
|
462
462
|
const wideAtom = wideAtoms[wide];
|
|
463
463
|
return clsx__default.default(mobileAtom, tabletAtom, desktopAtom, wideAtom);
|
|
464
464
|
};
|
|
465
|
+
const directionStyles = {
|
|
466
|
+
top: styles_lib_css_negativeMargin_negativeMargin_css_cjs.top,
|
|
467
|
+
right: styles_lib_css_negativeMargin_negativeMargin_css_cjs.right,
|
|
468
|
+
bottom: styles_lib_css_negativeMargin_negativeMargin_css_cjs.bottom,
|
|
469
|
+
left: styles_lib_css_negativeMargin_negativeMargin_css_cjs.left
|
|
470
|
+
};
|
|
465
471
|
const negativeMargin = (direction, space) => space ? clsx__default.default([
|
|
466
472
|
direction === "top" || direction === "bottom" ? styles_lib_css_negativeMargin_negativeMargin_css_cjs.preventCollapsePseudo[direction] : void 0,
|
|
467
473
|
resolveResponsiveProp(
|
|
468
474
|
space,
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
475
|
+
directionStyles[direction].mobile,
|
|
476
|
+
directionStyles[direction].tablet,
|
|
477
|
+
directionStyles[direction].desktop,
|
|
478
|
+
directionStyles[direction].wide
|
|
473
479
|
)
|
|
474
480
|
]) : null;
|
|
475
481
|
const alignToDisplay = {
|
|
@@ -638,7 +644,7 @@ function textStyles({
|
|
|
638
644
|
styles_lib_css_typography_css_cjs.fontFamily,
|
|
639
645
|
styles_lib_css_typography_css_cjs.fontWeight[weight],
|
|
640
646
|
styles_lib_css_typography_css_cjs.tone[tone],
|
|
641
|
-
|
|
647
|
+
(baseline ? styles_lib_css_typography_css_cjs.textSizeTrimmed : styles_lib_css_typography_css_cjs.textSizeUntrimmed)[size]
|
|
642
648
|
];
|
|
643
649
|
}
|
|
644
650
|
const Truncate = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", className: styles_lib_components_private_Truncate_Truncate_css_cjs.truncate, children });
|
|
@@ -1195,8 +1201,8 @@ const Keyline = ({ tone, borderRadius: borderRadius2 }) => {
|
|
|
1195
1201
|
component: "span",
|
|
1196
1202
|
height: "full",
|
|
1197
1203
|
display: "inlineBlock",
|
|
1198
|
-
paddingLeft: "xxsmall",
|
|
1199
1204
|
className: [
|
|
1205
|
+
styles_lib_components_private_Keyline_Keyline_css_cjs.width,
|
|
1200
1206
|
styles_lib_components_private_Keyline_Keyline_css_cjs.tone[tone],
|
|
1201
1207
|
styles_lib_components_private_Keyline_Keyline_css_cjs.lightMode[backgroundLightness.lightMode],
|
|
1202
1208
|
styles_lib_components_private_Keyline_Keyline_css_cjs.darkMode[backgroundLightness.darkMode]
|
|
@@ -1210,7 +1216,7 @@ const boxShadowForVariant = {
|
|
|
1210
1216
|
default: "borderField",
|
|
1211
1217
|
disabled: "borderNeutralLight",
|
|
1212
1218
|
focus: "outlineFocus",
|
|
1213
|
-
|
|
1219
|
+
formAccent: "borderFormAccent",
|
|
1214
1220
|
critical: "borderCritical"
|
|
1215
1221
|
};
|
|
1216
1222
|
const FieldOverlay = ({ variant, ...restProps }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1413,7 +1419,7 @@ const ButtonLoader = () => /* @__PURE__ */ jsxRuntime.jsxs(Box, { "aria-hidden":
|
|
|
1413
1419
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", className: styles_lib_components_Button_Button_css_cjs.loadingDot, children: "." })
|
|
1414
1420
|
] });
|
|
1415
1421
|
const transparentPaddingX = "small";
|
|
1416
|
-
const buttonRadius = "
|
|
1422
|
+
const buttonRadius = "standard";
|
|
1417
1423
|
const ButtonOverlays = ({
|
|
1418
1424
|
variant = "solid",
|
|
1419
1425
|
tone,
|
|
@@ -1480,7 +1486,6 @@ const ButtonText = ({
|
|
|
1480
1486
|
iconPosition = "leading",
|
|
1481
1487
|
variant = "solid",
|
|
1482
1488
|
tone,
|
|
1483
|
-
labelSpacing = true,
|
|
1484
1489
|
bleed
|
|
1485
1490
|
}) => {
|
|
1486
1491
|
const lightness = useBackgroundLightness();
|
|
@@ -1503,9 +1508,8 @@ const ButtonText = ({
|
|
|
1503
1508
|
flexWrap: "wrap",
|
|
1504
1509
|
overflow: "hidden",
|
|
1505
1510
|
pointerEvents: "none",
|
|
1506
|
-
paddingX:
|
|
1507
|
-
|
|
1508
|
-
className: labelSpacing && size === "standard" ? styles_lib_css_typography_css_cjs.touchableText.standard : void 0,
|
|
1511
|
+
paddingX: labelPaddingX,
|
|
1512
|
+
className: styles_lib_components_Button_Button_css_cjs.padToMinHeight,
|
|
1509
1513
|
background: tone === "neutral" && variant !== "solid" ? {
|
|
1510
1514
|
lightMode: lightness.lightMode === "light" ? "customLight" : "customDark",
|
|
1511
1515
|
darkMode: lightness.darkMode === "light" ? "customLight" : "customDark"
|
|
@@ -1515,8 +1519,8 @@ const ButtonText = ({
|
|
|
1515
1519
|
{
|
|
1516
1520
|
tone: stylesForVariant.textTone,
|
|
1517
1521
|
weight: "medium",
|
|
1522
|
+
align: "center",
|
|
1518
1523
|
size,
|
|
1519
|
-
baseline: false,
|
|
1520
1524
|
children: [
|
|
1521
1525
|
icon && iconPosition === "leading" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1522
1526
|
AvoidWidowIcon,
|
|
@@ -1683,7 +1687,7 @@ const TooltipTextDefaultsProvider = ({
|
|
|
1683
1687
|
}
|
|
1684
1688
|
);
|
|
1685
1689
|
};
|
|
1686
|
-
const borderRadius$1 = "
|
|
1690
|
+
const borderRadius$1 = "large";
|
|
1687
1691
|
const TooltipContent = ({
|
|
1688
1692
|
children,
|
|
1689
1693
|
opacity,
|
|
@@ -1702,12 +1706,8 @@ const TooltipContent = ({
|
|
|
1702
1706
|
boxShadow: "large",
|
|
1703
1707
|
background: "customDark",
|
|
1704
1708
|
borderRadius: borderRadius$1,
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.maxWidth,
|
|
1708
|
-
styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.translateZ0,
|
|
1709
|
-
styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.padding
|
|
1710
|
-
],
|
|
1709
|
+
padding: "small",
|
|
1710
|
+
className: [styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.background, styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.maxWidth, styles_lib_components_TooltipRenderer_TooltipRenderer_css_cjs.translateZ0],
|
|
1711
1711
|
children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipTextDefaultsProvider, { children: [
|
|
1712
1712
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { position: "relative", zIndex: 1, children }),
|
|
1713
1713
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2148,7 +2148,7 @@ const toneToIcon = {
|
|
|
2148
2148
|
positive: IconPositive
|
|
2149
2149
|
};
|
|
2150
2150
|
const toastDuration = 1e4;
|
|
2151
|
-
const borderRadius = "
|
|
2151
|
+
const borderRadius = "large";
|
|
2152
2152
|
const Action = ({ label, onClick, removeToast }) => {
|
|
2153
2153
|
const handleClick = React.useCallback(() => {
|
|
2154
2154
|
removeToast();
|