@doist/reactist 24.1.5-beta → 25.0.0-beta
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/dist/reactist.cjs.development.js +227 -177
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/badge/badge.js.map +1 -1
- package/es/badge/badge.module.css.js +1 -1
- package/es/box/box.js +94 -19
- package/es/box/box.js.map +1 -1
- package/es/button/button.js +93 -18
- package/es/button/button.js.map +1 -1
- package/es/button/button.module.css.js +4 -0
- package/es/button/button.module.css.js.map +1 -0
- package/es/index.js +2 -3
- package/es/index.js.map +1 -1
- package/es/loading/loading.js.map +1 -1
- package/es/menu/menu.js.map +1 -1
- package/es/modal/modal.js +2 -2
- package/es/modal/modal.js.map +1 -1
- package/es/password-field/password-field.js +2 -2
- package/es/password-field/password-field.js.map +1 -1
- package/es/toast/static-toast.js +2 -2
- package/es/toast/static-toast.js.map +1 -1
- package/es/utils/polymorphism.js.map +1 -1
- package/lib/badge/badge.d.ts +1 -1
- package/lib/badge/badge.js.map +1 -1
- package/lib/badge/badge.module.css.js +1 -1
- package/lib/box/box.d.ts +2 -1
- package/lib/box/box.js +1 -1
- package/lib/box/box.js.map +1 -1
- package/lib/button/button.d.ts +123 -11
- package/lib/button/button.js +1 -1
- package/lib/button/button.js.map +1 -1
- package/lib/button/button.module.css.js +2 -0
- package/lib/button/button.module.css.js.map +1 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +1 -1
- package/lib/loading/loading.d.ts +2 -2
- package/lib/loading/loading.js.map +1 -1
- package/lib/menu/menu.d.ts +1 -2
- package/lib/menu/menu.js.map +1 -1
- package/lib/modal/modal.d.ts +5 -8
- package/lib/modal/modal.js +1 -1
- package/lib/modal/modal.js.map +1 -1
- package/lib/password-field/password-field.js +1 -1
- package/lib/password-field/password-field.js.map +1 -1
- package/lib/toast/static-toast.js +1 -1
- package/lib/toast/static-toast.js.map +1 -1
- package/lib/utils/common-types.d.ts +19 -0
- package/lib/utils/polymorphism.d.ts +1 -19
- package/lib/utils/polymorphism.js.map +1 -1
- package/package.json +1 -1
- package/styles/alert.css +2 -2
- package/styles/badge.css +1 -1
- package/styles/badge.module.css.css +1 -1
- package/styles/{base-button.css → button.css} +2 -2
- package/styles/button.module.css.css +1 -0
- package/styles/modal.css +2 -2
- package/styles/password-field.css +2 -2
- package/styles/reactist.css +2 -2
- package/styles/static-toast.css +2 -2
- package/styles/use-toasts.css +2 -2
- package/es/base-button/base-button.js +0 -75
- package/es/base-button/base-button.js.map +0 -1
- package/es/base-button/base-button.module.css.js +0 -4
- package/es/base-button/base-button.module.css.js.map +0 -1
- package/es/button-link/button-link.js +0 -38
- package/es/button-link/button-link.js.map +0 -1
- package/lib/base-button/base-button.d.ts +0 -80
- package/lib/base-button/base-button.js +0 -2
- package/lib/base-button/base-button.js.map +0 -1
- package/lib/base-button/base-button.module.css.js +0 -2
- package/lib/base-button/base-button.module.css.js.map +0 -1
- package/lib/base-button/index.d.ts +0 -1
- package/lib/button-link/button-link-story-wrapper.d.ts +0 -7
- package/lib/button-link/button-link.d.ts +0 -13
- package/lib/button-link/button-link.js +0 -2
- package/lib/button-link/button-link.js.map +0 -1
- package/lib/button-link/button-link.test.d.ts +0 -1
- package/lib/button-link/index.d.ts +0 -1
- package/styles/base-button.module.css.css +0 -1
|
@@ -201,9 +201,62 @@ var modules_89b7671c = {"minWidth-0":"_68ab48ca","minWidth-xsmall":"_6fa2b565","
|
|
|
201
201
|
var modules_8b5c09cb = {"gap-none":"_64ed24f4","gap-xsmall":"_2580a74b","gap-small":"c68f8bf6","gap-medium":"_43e5f8e9","gap-large":"_966b120f","gap-xlarge":"f957894c","gap-xxlarge":"_8cca104b","tablet-gap-none":"_5797cee2","tablet-gap-xsmall":"_9015672f","tablet-gap-small":"_7ec86eec","tablet-gap-medium":"_714d7179","tablet-gap-large":"ae1deb59","tablet-gap-xlarge":"e1cfce55","tablet-gap-xxlarge":"_168a8ff8","desktop-gap-none":"_43e2b619","desktop-gap-xsmall":"_0ea9bf88","desktop-gap-small":"d451307a","desktop-gap-medium":"bf93cf66","desktop-gap-large":"_1430cddf","desktop-gap-xlarge":"fa00c93e","desktop-gap-xxlarge":"_6f3aee54"};
|
|
202
202
|
|
|
203
203
|
const _excluded = ["as", "position", "display", "flexDirection", "flexWrap", "flexGrow", "flexShrink", "gap", "alignItems", "justifyContent", "alignSelf", "overflow", "width", "height", "background", "border", "borderRadius", "minWidth", "maxWidth", "textAlign", "padding", "paddingY", "paddingX", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "margin", "marginY", "marginX", "marginTop", "marginRight", "marginBottom", "marginLeft", "className", "children"];
|
|
204
|
-
const Box = /*#__PURE__*/polymorphicComponent(function Box(_ref, ref) {
|
|
205
|
-
var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
|
|
206
204
|
|
|
205
|
+
function getBoxClassNames({
|
|
206
|
+
position = 'static',
|
|
207
|
+
display,
|
|
208
|
+
flexDirection = 'row',
|
|
209
|
+
flexWrap,
|
|
210
|
+
flexGrow,
|
|
211
|
+
flexShrink,
|
|
212
|
+
gap,
|
|
213
|
+
alignItems,
|
|
214
|
+
justifyContent,
|
|
215
|
+
alignSelf,
|
|
216
|
+
overflow,
|
|
217
|
+
width,
|
|
218
|
+
height,
|
|
219
|
+
background,
|
|
220
|
+
border,
|
|
221
|
+
borderRadius,
|
|
222
|
+
minWidth,
|
|
223
|
+
maxWidth,
|
|
224
|
+
textAlign,
|
|
225
|
+
padding,
|
|
226
|
+
paddingY,
|
|
227
|
+
paddingX,
|
|
228
|
+
paddingTop,
|
|
229
|
+
paddingRight,
|
|
230
|
+
paddingBottom,
|
|
231
|
+
paddingLeft,
|
|
232
|
+
margin,
|
|
233
|
+
marginY,
|
|
234
|
+
marginX,
|
|
235
|
+
marginTop,
|
|
236
|
+
marginRight,
|
|
237
|
+
marginBottom,
|
|
238
|
+
marginLeft,
|
|
239
|
+
className
|
|
240
|
+
}) {
|
|
241
|
+
var _ref, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
|
|
242
|
+
|
|
243
|
+
const resolvedPaddingTop = (_ref = paddingTop != null ? paddingTop : paddingY) != null ? _ref : padding;
|
|
244
|
+
const resolvedPaddingRight = (_ref2 = paddingRight != null ? paddingRight : paddingX) != null ? _ref2 : padding;
|
|
245
|
+
const resolvedPaddingBottom = (_ref3 = paddingBottom != null ? paddingBottom : paddingY) != null ? _ref3 : padding;
|
|
246
|
+
const resolvedPaddingLeft = (_ref4 = paddingLeft != null ? paddingLeft : paddingX) != null ? _ref4 : padding;
|
|
247
|
+
const resolvedMarginTop = (_ref5 = marginTop != null ? marginTop : marginY) != null ? _ref5 : margin;
|
|
248
|
+
const resolvedMarginRight = (_ref6 = marginRight != null ? marginRight : marginX) != null ? _ref6 : margin;
|
|
249
|
+
const resolvedMarginBottom = (_ref7 = marginBottom != null ? marginBottom : marginY) != null ? _ref7 : margin;
|
|
250
|
+
const resolvedMarginLeft = (_ref8 = marginLeft != null ? marginLeft : marginX) != null ? _ref8 : margin;
|
|
251
|
+
const omitFlex = !display || typeof display === 'string' && display !== 'flex' && display !== 'inlineFlex';
|
|
252
|
+
return classNames(className, modules_54d944f2.box, display ? getClassNames(modules_54d944f2, 'display', display) : null, position !== 'static' ? getClassNames(modules_54d944f2, 'position', position) : null, minWidth != null ? getClassNames(modules_89b7671c, 'minWidth', String(minWidth)) : null, getClassNames(modules_89b7671c, 'maxWidth', maxWidth), getClassNames(modules_54d944f2, 'textAlign', textAlign), // padding
|
|
253
|
+
getClassNames(modules_b537a8ee, 'paddingTop', resolvedPaddingTop), getClassNames(modules_b537a8ee, 'paddingRight', resolvedPaddingRight), getClassNames(modules_b537a8ee, 'paddingBottom', resolvedPaddingBottom), getClassNames(modules_b537a8ee, 'paddingLeft', resolvedPaddingLeft), // margin
|
|
254
|
+
getClassNames(modules_131405ac, 'marginTop', resolvedMarginTop), getClassNames(modules_131405ac, 'marginRight', resolvedMarginRight), getClassNames(modules_131405ac, 'marginBottom', resolvedMarginBottom), getClassNames(modules_131405ac, 'marginLeft', resolvedMarginLeft), // flex props
|
|
255
|
+
omitFlex ? null : getClassNames(modules_54d944f2, 'flexDirection', flexDirection), omitFlex ? null : getClassNames(modules_54d944f2, 'flexWrap', flexWrap), omitFlex ? null : getClassNames(modules_54d944f2, 'alignItems', alignItems), omitFlex ? null : getClassNames(modules_54d944f2, 'justifyContent', justifyContent), alignSelf != null ? getClassNames(modules_54d944f2, 'alignSelf', alignSelf) : null, flexShrink != null ? getClassNames(modules_54d944f2, 'flexShrink', String(flexShrink)) : null, flexGrow != null ? getClassNames(modules_54d944f2, 'flexGrow', String(flexGrow)) : null, gap ? getClassNames(modules_8b5c09cb, 'gap', gap) : null, // other props
|
|
256
|
+
getClassNames(modules_54d944f2, 'overflow', overflow), width != null ? getClassNames(modules_89b7671c, 'width', String(width)) : null, getClassNames(modules_54d944f2, 'height', height), getClassNames(modules_54d944f2, 'bg', background), borderRadius !== 'none' ? getClassNames(modules_54d944f2, 'borderRadius', borderRadius) : null, border !== 'none' ? getClassNames(modules_54d944f2, 'border', border) : null);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const Box = /*#__PURE__*/polymorphicComponent(function Box(_ref9, ref) {
|
|
207
260
|
let {
|
|
208
261
|
as: component = 'div',
|
|
209
262
|
position = 'static',
|
|
@@ -241,24 +294,46 @@ const Box = /*#__PURE__*/polymorphicComponent(function Box(_ref, ref) {
|
|
|
241
294
|
marginLeft,
|
|
242
295
|
className,
|
|
243
296
|
children
|
|
244
|
-
} =
|
|
245
|
-
props = _objectWithoutProperties(
|
|
246
|
-
|
|
247
|
-
const resolvedPaddingTop = (_ref2 = paddingTop != null ? paddingTop : paddingY) != null ? _ref2 : padding;
|
|
248
|
-
const resolvedPaddingRight = (_ref3 = paddingRight != null ? paddingRight : paddingX) != null ? _ref3 : padding;
|
|
249
|
-
const resolvedPaddingBottom = (_ref4 = paddingBottom != null ? paddingBottom : paddingY) != null ? _ref4 : padding;
|
|
250
|
-
const resolvedPaddingLeft = (_ref5 = paddingLeft != null ? paddingLeft : paddingX) != null ? _ref5 : padding;
|
|
251
|
-
const resolvedMarginTop = (_ref6 = marginTop != null ? marginTop : marginY) != null ? _ref6 : margin;
|
|
252
|
-
const resolvedMarginRight = (_ref7 = marginRight != null ? marginRight : marginX) != null ? _ref7 : margin;
|
|
253
|
-
const resolvedMarginBottom = (_ref8 = marginBottom != null ? marginBottom : marginY) != null ? _ref8 : margin;
|
|
254
|
-
const resolvedMarginLeft = (_ref9 = marginLeft != null ? marginLeft : marginX) != null ? _ref9 : margin;
|
|
255
|
-
const omitFlex = !display || typeof display === 'string' && display !== 'flex' && display !== 'inlineFlex';
|
|
297
|
+
} = _ref9,
|
|
298
|
+
props = _objectWithoutProperties(_ref9, _excluded);
|
|
299
|
+
|
|
256
300
|
return /*#__PURE__*/React.createElement(component, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
257
|
-
className:
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
301
|
+
className: getBoxClassNames({
|
|
302
|
+
position,
|
|
303
|
+
display,
|
|
304
|
+
flexDirection,
|
|
305
|
+
flexWrap,
|
|
306
|
+
flexGrow,
|
|
307
|
+
flexShrink,
|
|
308
|
+
gap,
|
|
309
|
+
alignItems,
|
|
310
|
+
justifyContent,
|
|
311
|
+
alignSelf,
|
|
312
|
+
overflow,
|
|
313
|
+
width,
|
|
314
|
+
height,
|
|
315
|
+
background,
|
|
316
|
+
border,
|
|
317
|
+
borderRadius,
|
|
318
|
+
minWidth,
|
|
319
|
+
maxWidth,
|
|
320
|
+
textAlign,
|
|
321
|
+
padding,
|
|
322
|
+
paddingY,
|
|
323
|
+
paddingX,
|
|
324
|
+
paddingTop,
|
|
325
|
+
paddingRight,
|
|
326
|
+
paddingBottom,
|
|
327
|
+
paddingLeft,
|
|
328
|
+
margin,
|
|
329
|
+
marginY,
|
|
330
|
+
marginX,
|
|
331
|
+
marginTop,
|
|
332
|
+
marginRight,
|
|
333
|
+
marginBottom,
|
|
334
|
+
marginLeft,
|
|
335
|
+
className
|
|
336
|
+
}),
|
|
262
337
|
ref
|
|
263
338
|
}), children);
|
|
264
339
|
});
|
|
@@ -448,6 +523,30 @@ const HiddenVisually = /*#__PURE__*/polymorphicComponent(function HiddenVisually
|
|
|
448
523
|
}));
|
|
449
524
|
});
|
|
450
525
|
|
|
526
|
+
var modules_c7f5018f = {"svg":"_51539197","spinner":"_54fbe2b3","tint":"a0c466ed","fill":"_745b73d3"};
|
|
527
|
+
|
|
528
|
+
function Spinner({
|
|
529
|
+
size = 24
|
|
530
|
+
}) {
|
|
531
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
532
|
+
"aria-hidden": true,
|
|
533
|
+
width: size,
|
|
534
|
+
height: size,
|
|
535
|
+
viewBox: "0 0 24 24",
|
|
536
|
+
className: modules_c7f5018f.svg,
|
|
537
|
+
"data-chromatic": "ignore"
|
|
538
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
539
|
+
fill: "none",
|
|
540
|
+
fillRule: "nonzero"
|
|
541
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
542
|
+
className: modules_c7f5018f.tint,
|
|
543
|
+
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
544
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
545
|
+
className: modules_c7f5018f.fill,
|
|
546
|
+
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
547
|
+
})));
|
|
548
|
+
}
|
|
549
|
+
|
|
451
550
|
var modules_95f1407a = {"tooltip":"_487c82cd"};
|
|
452
551
|
|
|
453
552
|
function Tooltip({
|
|
@@ -494,129 +593,110 @@ function Tooltip({
|
|
|
494
593
|
}, withArrow ? /*#__PURE__*/React.createElement(react.TooltipArrow, null) : null, typeof content === 'function' ? content() : content) : null);
|
|
495
594
|
}
|
|
496
595
|
|
|
497
|
-
var
|
|
498
|
-
|
|
499
|
-
function Spinner({
|
|
500
|
-
size = 24
|
|
501
|
-
}) {
|
|
502
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
503
|
-
"aria-hidden": true,
|
|
504
|
-
width: size,
|
|
505
|
-
height: size,
|
|
506
|
-
viewBox: "0 0 24 24",
|
|
507
|
-
className: modules_c7f5018f.svg,
|
|
508
|
-
"data-chromatic": "ignore"
|
|
509
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
510
|
-
fill: "none",
|
|
511
|
-
fillRule: "nonzero"
|
|
512
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
513
|
-
className: modules_c7f5018f.tint,
|
|
514
|
-
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
515
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
516
|
-
className: modules_c7f5018f.fill,
|
|
517
|
-
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
518
|
-
})));
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
var modules_b9569bce = {"baseButton":"_8313bd46","label":"_0051d171","shape-rounded":"_8eb8f0fa","size-small":"_8b7f1a82","size-normal":"_5e45d59f","size-large":"_95951888","disabled":"_43792df1","iconButton":"_8644eccb","startIcon":"a44d4350","endIcon":"_073e1aa4","variant-primary":"_7a4dbd5f","variant-secondary":"_54d56775","variant-tertiary":"_907a61ca","variant-quaternary":"f169a390","tone-destructive":"ccb3eb8c"};
|
|
596
|
+
var modules_5357ebb8 = {"baseButton":"_3930afa0","label":"_90654824","shape-rounded":"c05d17c2","size-small":"_1e29d236","size-normal":"_7246d092","size-large":"_2d084671","disabled":"_2b0b9d95","iconButton":"abd5766f","startIcon":"_380e7c73","endIcon":"_20fe4105","variant-primary":"_7ea1378e","variant-secondary":"_64ee8afd","variant-tertiary":"_650176bf","variant-quaternary":"aa19cb97","tone-destructive":"_7a2d9a8c"};
|
|
522
597
|
|
|
523
|
-
const _excluded$6 = ["
|
|
598
|
+
const _excluded$6 = ["variant", "tone", "size", "shape", "type", "disabled", "loading", "tooltip", "render", "onClick", "exceptionallySetClassName", "children", "startIcon", "endIcon", "width", "align"],
|
|
599
|
+
_excluded2$1 = ["variant", "tone", "size", "shape", "type", "disabled", "loading", "tooltip", "render", "onClick", "exceptionallySetClassName", "children", "icon"];
|
|
524
600
|
|
|
525
601
|
function preventDefault(event) {
|
|
526
602
|
event.preventDefault();
|
|
527
603
|
}
|
|
528
604
|
/**
|
|
529
|
-
*
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
* @see Button
|
|
533
|
-
* @see ButtonLink
|
|
605
|
+
* A button element that displays a text label and optionally a start or end icon. It follows the
|
|
606
|
+
* [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
|
|
534
607
|
*/
|
|
535
608
|
|
|
536
609
|
|
|
537
|
-
const
|
|
610
|
+
const Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
538
611
|
let {
|
|
539
|
-
as = 'div',
|
|
540
612
|
variant,
|
|
541
613
|
tone = 'normal',
|
|
542
614
|
size = 'normal',
|
|
543
615
|
shape = 'normal',
|
|
616
|
+
type = 'button',
|
|
544
617
|
disabled = false,
|
|
545
618
|
loading = false,
|
|
546
619
|
tooltip,
|
|
620
|
+
render,
|
|
547
621
|
onClick,
|
|
548
622
|
exceptionallySetClassName,
|
|
549
623
|
children,
|
|
550
624
|
startIcon,
|
|
551
625
|
endIcon,
|
|
552
|
-
icon,
|
|
553
626
|
width = 'auto',
|
|
554
627
|
align = 'center'
|
|
555
628
|
} = _ref,
|
|
556
629
|
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
557
630
|
|
|
558
631
|
const isDisabled = loading || disabled;
|
|
559
|
-
const buttonElement = /*#__PURE__*/React.createElement(
|
|
560
|
-
|
|
632
|
+
const buttonElement = /*#__PURE__*/React.createElement(react.Role.button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
633
|
+
render: render,
|
|
634
|
+
type: render != null ? undefined : type,
|
|
561
635
|
ref: ref,
|
|
562
636
|
"aria-disabled": isDisabled,
|
|
563
637
|
onClick: isDisabled ? preventDefault : onClick,
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
638
|
+
className: classNames([getBoxClassNames({
|
|
639
|
+
width
|
|
640
|
+
}), exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8["variant-" + variant], modules_5357ebb8["tone-" + tone], modules_5357ebb8["size-" + size], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, disabled ? modules_5357ebb8.disabled : null])
|
|
641
|
+
}), /*#__PURE__*/React.createElement(React.Fragment, null, startIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
567
642
|
display: "flex",
|
|
568
|
-
className:
|
|
643
|
+
className: modules_5357ebb8.startIcon,
|
|
569
644
|
"aria-hidden": true
|
|
570
645
|
}, loading && !endIcon ? /*#__PURE__*/React.createElement(Spinner, null) : startIcon) : null, children ? /*#__PURE__*/React.createElement(Box, {
|
|
571
646
|
as: "span",
|
|
572
|
-
className:
|
|
647
|
+
className: modules_5357ebb8.label,
|
|
573
648
|
overflow: "hidden",
|
|
574
649
|
width: width === 'full' ? 'full' : undefined,
|
|
575
650
|
textAlign: width === 'auto' ? 'center' : align
|
|
576
651
|
}, children) : null, endIcon || loading && !startIcon ? /*#__PURE__*/React.createElement(Box, {
|
|
577
652
|
display: "flex",
|
|
578
|
-
className:
|
|
653
|
+
className: modules_5357ebb8.endIcon,
|
|
579
654
|
"aria-hidden": true
|
|
580
|
-
}, loading ? /*#__PURE__*/React.createElement(Spinner, null) : endIcon) : null));
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
return tooltipContent ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
584
|
-
content: tooltipContent
|
|
655
|
+
}, loading ? /*#__PURE__*/React.createElement(Spinner, null) : endIcon) : null));
|
|
656
|
+
return tooltip ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
657
|
+
content: tooltip
|
|
585
658
|
}, buttonElement) : buttonElement;
|
|
586
659
|
});
|
|
587
|
-
|
|
588
|
-
const _excluded$7 = ["variant", "tone", "size", "type", "disabled", "exceptionallySetClassName"];
|
|
589
660
|
/**
|
|
590
|
-
* A
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
* @see ButtonLink
|
|
661
|
+
* A button element that displays an icon only, visually, though it is semantically labelled. It
|
|
662
|
+
* also makes sure to always show a tooltip with its label. It follows the
|
|
663
|
+
* [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
|
|
594
664
|
*/
|
|
595
665
|
|
|
596
|
-
const
|
|
666
|
+
const IconButton = /*#__PURE__*/React.forwardRef(function Button(_ref2, ref) {
|
|
597
667
|
let {
|
|
598
668
|
variant,
|
|
599
669
|
tone = 'normal',
|
|
600
670
|
size = 'normal',
|
|
671
|
+
shape = 'normal',
|
|
601
672
|
type = 'button',
|
|
602
673
|
disabled = false,
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
674
|
+
loading = false,
|
|
675
|
+
tooltip,
|
|
676
|
+
render,
|
|
677
|
+
onClick,
|
|
678
|
+
exceptionallySetClassName,
|
|
679
|
+
children,
|
|
680
|
+
icon
|
|
681
|
+
} = _ref2,
|
|
682
|
+
props = _objectWithoutProperties(_ref2, _excluded2$1);
|
|
606
683
|
|
|
607
|
-
|
|
608
|
-
|
|
684
|
+
const isDisabled = loading || disabled;
|
|
685
|
+
const buttonElement = /*#__PURE__*/React.createElement(react.Role.button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
686
|
+
render: render,
|
|
687
|
+
type: render != null ? undefined : type,
|
|
609
688
|
ref: ref,
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
689
|
+
"aria-disabled": isDisabled,
|
|
690
|
+
onClick: isDisabled ? preventDefault : onClick,
|
|
691
|
+
className: classNames([exceptionallySetClassName, modules_5357ebb8.baseButton, modules_5357ebb8["variant-" + variant], modules_5357ebb8["tone-" + tone], modules_5357ebb8["size-" + size], shape === 'rounded' ? modules_5357ebb8['shape-rounded'] : null, modules_5357ebb8.iconButton, disabled ? modules_5357ebb8.disabled : null])
|
|
692
|
+
}), loading && /*#__PURE__*/React.createElement(Spinner, null) || icon);
|
|
693
|
+
const tooltipContent = tooltip === undefined ? props['aria-label'] : tooltip;
|
|
694
|
+
return tooltipContent ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
695
|
+
content: tooltipContent
|
|
696
|
+
}, buttonElement) : buttonElement;
|
|
617
697
|
});
|
|
618
698
|
|
|
619
|
-
const _excluded$
|
|
699
|
+
const _excluded$7 = ["tone"];
|
|
620
700
|
const alertIconForTone = {
|
|
621
701
|
info: AlertInfoIcon,
|
|
622
702
|
positive: AlertPositiveIcon,
|
|
@@ -628,7 +708,7 @@ function AlertIcon(_ref) {
|
|
|
628
708
|
let {
|
|
629
709
|
tone
|
|
630
710
|
} = _ref,
|
|
631
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
711
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
632
712
|
|
|
633
713
|
const Icon = alertIconForTone[tone];
|
|
634
714
|
return Icon ? /*#__PURE__*/React.createElement(Icon, _objectSpread2({}, props)) : null;
|
|
@@ -764,7 +844,7 @@ function useId(providedId) {
|
|
|
764
844
|
|
|
765
845
|
var modules_afa80466 = {"banner":"c1dffd60","banner-info":"_9d552538","banner-promotion":"d797752e","title":"_8cd610da","title-without-description":"_78ea5373","title-info":"_319c73fa","title-promotion":"fc84253f","description":"af4bd758","description-info":"b95a8c07","description-promotion":"_3c33f615"};
|
|
766
846
|
|
|
767
|
-
const _excluded$
|
|
847
|
+
const _excluded$8 = ["id", "tone", "icon", "title", "description", "action"];
|
|
768
848
|
const Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
769
849
|
let {
|
|
770
850
|
id,
|
|
@@ -774,7 +854,7 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
|
774
854
|
description,
|
|
775
855
|
action
|
|
776
856
|
} = _ref,
|
|
777
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
857
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
778
858
|
|
|
779
859
|
const titleId = useId();
|
|
780
860
|
const descriptionId = useId();
|
|
@@ -816,7 +896,7 @@ const Banner = /*#__PURE__*/React.forwardRef(function Banner(_ref, ref) {
|
|
|
816
896
|
}, action) : null));
|
|
817
897
|
});
|
|
818
898
|
|
|
819
|
-
const _excluded$
|
|
899
|
+
const _excluded$9 = ["size", "exceptionallySetClassName"];
|
|
820
900
|
const sizeMapping = {
|
|
821
901
|
xsmall: 16,
|
|
822
902
|
small: 24,
|
|
@@ -831,7 +911,7 @@ function Loading(_ref) {
|
|
|
831
911
|
size = 'small',
|
|
832
912
|
exceptionallySetClassName
|
|
833
913
|
} = _ref,
|
|
834
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
914
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
835
915
|
|
|
836
916
|
const numericSize = (_sizeMapping$size = sizeMapping[size]) != null ? _sizeMapping$size : sizeMapping.small;
|
|
837
917
|
const ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
|
|
@@ -874,7 +954,7 @@ function Notice({
|
|
|
874
954
|
|
|
875
955
|
var modules_a9637dd3 = {"text":"a83bd4e0","size-caption":"_266d6623","size-copy":"a8d37c6e","size-subtitle":"_39f4eb1f","weight-semibold":"_7be5c531","weight-bold":"e214ff2e","tone-secondary":"_6a3e5ade","tone-danger":"_8f5b5f2b","tone-positive":"_9ae47ae4","lineClampMultipleLines":"_969f18f7","lineClamp-1":"_2f303ac3","lineClamp-2":"d3e04245","lineClamp-3":"_33411704","lineClamp-4":"bfc32640","lineClamp-5":"f813c82f"};
|
|
876
956
|
|
|
877
|
-
const _excluded$
|
|
957
|
+
const _excluded$a = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
|
|
878
958
|
const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
879
959
|
let {
|
|
880
960
|
as,
|
|
@@ -886,7 +966,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
|
886
966
|
lineClamp,
|
|
887
967
|
exceptionallySetClassName
|
|
888
968
|
} = _ref,
|
|
889
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
969
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
890
970
|
|
|
891
971
|
const lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp != null ? lineClamp : 1) > 1;
|
|
892
972
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -902,7 +982,7 @@ const Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
|
902
982
|
|
|
903
983
|
var modules_d11e18f0 = {"stackedToastsView":"_616cc3f3","toastContainer":"_1b5f8e86","slot":"ce2e3476"};
|
|
904
984
|
|
|
905
|
-
const _excluded$
|
|
985
|
+
const _excluded$b = ["message", "description", "icon", "action", "onDismiss", "dismissLabel"];
|
|
906
986
|
/**
|
|
907
987
|
* A toast that shows a message, and an optional action associated with it.
|
|
908
988
|
*
|
|
@@ -927,7 +1007,7 @@ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref,
|
|
|
927
1007
|
onDismiss,
|
|
928
1008
|
dismissLabel = 'Close'
|
|
929
1009
|
} = _ref,
|
|
930
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1010
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
931
1011
|
|
|
932
1012
|
return /*#__PURE__*/React__default.createElement(Box, _objectSpread2({
|
|
933
1013
|
ref: ref,
|
|
@@ -951,7 +1031,7 @@ const StaticToast = /*#__PURE__*/React__default.forwardRef(function Toast(_ref,
|
|
|
951
1031
|
variant: "tertiary",
|
|
952
1032
|
size: "small",
|
|
953
1033
|
onClick: action.onClick
|
|
954
|
-
}, action.label) : action) : null, onDismiss ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, /*#__PURE__*/React__default.createElement(
|
|
1034
|
+
}, action.label) : action) : null, onDismiss ? /*#__PURE__*/React__default.createElement(ToastContentSlot, null, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
955
1035
|
variant: "quaternary",
|
|
956
1036
|
size: "small",
|
|
957
1037
|
onClick: onDismiss,
|
|
@@ -1148,7 +1228,7 @@ function useToastsAnimation() {
|
|
|
1148
1228
|
};
|
|
1149
1229
|
}
|
|
1150
1230
|
|
|
1151
|
-
const _excluded$
|
|
1231
|
+
const _excluded$c = ["toastId"];
|
|
1152
1232
|
/** @private */
|
|
1153
1233
|
|
|
1154
1234
|
const InternalToast = /*#__PURE__*/React__default.forwardRef(function InternalToast({
|
|
@@ -1279,7 +1359,7 @@ function ToastsProvider({
|
|
|
1279
1359
|
let {
|
|
1280
1360
|
toastId
|
|
1281
1361
|
} = _ref,
|
|
1282
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1362
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
1283
1363
|
|
|
1284
1364
|
return /*#__PURE__*/React__default.createElement(InternalToast, _objectSpread2({
|
|
1285
1365
|
key: toastId,
|
|
@@ -1355,7 +1435,7 @@ function Toast(props) {
|
|
|
1355
1435
|
|
|
1356
1436
|
var modules_949d2ff4 = {"heading":"bff24867","weight-medium":"_9b540c61","weight-light":"c6729907","tone-secondary":"d6507f70","tone-danger":"d1846d93","size-largest":"_7cbdd1ba","size-larger":"b3e14969","size-smaller":"be14a265","lineClampMultipleLines":"_71391f13","lineClamp-1":"_97298b1b","lineClamp-2":"_6d357d76","lineClamp-3":"d820b451","lineClamp-4":"_8d37487d","lineClamp-5":"_5215b4d7"};
|
|
1357
1437
|
|
|
1358
|
-
const _excluded$
|
|
1438
|
+
const _excluded$d = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
|
|
1359
1439
|
const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
1360
1440
|
let {
|
|
1361
1441
|
level,
|
|
@@ -1367,7 +1447,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
1367
1447
|
align,
|
|
1368
1448
|
exceptionallySetClassName
|
|
1369
1449
|
} = _ref,
|
|
1370
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1450
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
1371
1451
|
|
|
1372
1452
|
// In TypeScript v4.1, this would be properly recognized without needing the type assertion
|
|
1373
1453
|
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
|
|
@@ -1386,7 +1466,7 @@ const Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
|
1386
1466
|
|
|
1387
1467
|
var modules_8ebe6db0 = {"prose":"_560c1e08","darkModeTypography":"_8b53b13e"};
|
|
1388
1468
|
|
|
1389
|
-
const _excluded$
|
|
1469
|
+
const _excluded$e = ["darkModeTypography", "exceptionallySetClassName"];
|
|
1390
1470
|
/**
|
|
1391
1471
|
* Used to style HTML you don’t control, like HTML content generated from Markdown.
|
|
1392
1472
|
*/
|
|
@@ -1396,54 +1476,23 @@ function Prose(_ref) {
|
|
|
1396
1476
|
darkModeTypography,
|
|
1397
1477
|
exceptionallySetClassName
|
|
1398
1478
|
} = _ref,
|
|
1399
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1479
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
1400
1480
|
|
|
1401
1481
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1402
1482
|
className: [modules_8ebe6db0.prose, darkModeTypography ? modules_8ebe6db0.darkModeTypography : null, exceptionallySetClassName]
|
|
1403
1483
|
}));
|
|
1404
1484
|
}
|
|
1405
1485
|
|
|
1406
|
-
const _excluded$g = ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"];
|
|
1407
|
-
/**
|
|
1408
|
-
* A semantic link that looks like a button, exactly matching the `Button` component in all visual
|
|
1409
|
-
* aspects.
|
|
1410
|
-
*
|
|
1411
|
-
* @see Button
|
|
1412
|
-
*/
|
|
1413
|
-
|
|
1414
|
-
const ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, ref) {
|
|
1415
|
-
let {
|
|
1416
|
-
as = 'a',
|
|
1417
|
-
variant,
|
|
1418
|
-
tone = 'normal',
|
|
1419
|
-
size = 'normal',
|
|
1420
|
-
exceptionallySetClassName,
|
|
1421
|
-
openInNewTab = false
|
|
1422
|
-
} = _ref,
|
|
1423
|
-
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
1424
|
-
|
|
1425
|
-
return /*#__PURE__*/React.createElement(BaseButton, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1426
|
-
as: as,
|
|
1427
|
-
ref: ref,
|
|
1428
|
-
variant: variant,
|
|
1429
|
-
tone: tone,
|
|
1430
|
-
size: size,
|
|
1431
|
-
exceptionallySetClassName: exceptionallySetClassName,
|
|
1432
|
-
target: openInNewTab ? '_blank' : undefined,
|
|
1433
|
-
rel: openInNewTab ? 'noopener noreferrer' : undefined
|
|
1434
|
-
}));
|
|
1435
|
-
});
|
|
1436
|
-
|
|
1437
1486
|
var modules_3d05deee = {"container":"fdc181b3"};
|
|
1438
1487
|
|
|
1439
|
-
const _excluded$
|
|
1488
|
+
const _excluded$f = ["as", "openInNewTab", "exceptionallySetClassName"];
|
|
1440
1489
|
const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
|
|
1441
1490
|
let {
|
|
1442
1491
|
as = 'a',
|
|
1443
1492
|
openInNewTab = false,
|
|
1444
1493
|
exceptionallySetClassName
|
|
1445
1494
|
} = _ref,
|
|
1446
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1495
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
1447
1496
|
|
|
1448
1497
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
1449
1498
|
as: as,
|
|
@@ -1455,7 +1504,7 @@ const TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref)
|
|
|
1455
1504
|
}));
|
|
1456
1505
|
});
|
|
1457
1506
|
|
|
1458
|
-
const _excluded$
|
|
1507
|
+
const _excluded$g = ["checked", "indeterminate", "disabled"];
|
|
1459
1508
|
const svgPath = {
|
|
1460
1509
|
checked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm-2.457 4.293l-5.293 5.293-1.793-1.793a1 1 0 1 0-1.414 1.414l2.5 2.5a1 1 0 0 0 1.414 0l6-6a1 1 0 1 0-1.414-1.414z',
|
|
1461
1510
|
unchecked: 'M18 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h12zm0 1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1z',
|
|
@@ -1494,7 +1543,7 @@ function CheckboxIcon(_ref) {
|
|
|
1494
1543
|
indeterminate,
|
|
1495
1544
|
disabled
|
|
1496
1545
|
} = _ref,
|
|
1497
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1546
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
1498
1547
|
|
|
1499
1548
|
const pathKey = getPathKey({
|
|
1500
1549
|
checked,
|
|
@@ -1546,7 +1595,7 @@ function useForkRef(...refs) {
|
|
|
1546
1595
|
refs);
|
|
1547
1596
|
}
|
|
1548
1597
|
|
|
1549
|
-
const _excluded$
|
|
1598
|
+
const _excluded$h = ["label", "icon", "disabled", "indeterminate", "defaultChecked", "onChange"];
|
|
1550
1599
|
const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref, ref) {
|
|
1551
1600
|
var _ref2, _props$checked, _props$checked2;
|
|
1552
1601
|
|
|
@@ -1558,7 +1607,7 @@ const CheckboxField = /*#__PURE__*/React.forwardRef(function CheckboxField(_ref,
|
|
|
1558
1607
|
defaultChecked,
|
|
1559
1608
|
onChange
|
|
1560
1609
|
} = _ref,
|
|
1561
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1610
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
1562
1611
|
|
|
1563
1612
|
const isControlledComponent = typeof props.checked === 'boolean';
|
|
1564
1613
|
|
|
@@ -1771,7 +1820,7 @@ function BaseField({
|
|
|
1771
1820
|
|
|
1772
1821
|
var modules_aaf25250 = {"inputWrapper":"dea25485","bordered":"_80b6b376","error":"_1a32867a","slot":"dbbd207e"};
|
|
1773
1822
|
|
|
1774
|
-
const _excluded$
|
|
1823
|
+
const _excluded$i = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startSlot", "endSlot"];
|
|
1775
1824
|
const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
1776
1825
|
let {
|
|
1777
1826
|
variant = 'default',
|
|
@@ -1789,7 +1838,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1789
1838
|
startSlot,
|
|
1790
1839
|
endSlot
|
|
1791
1840
|
} = _ref,
|
|
1792
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1841
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
1793
1842
|
|
|
1794
1843
|
const internalRef = React.useRef(null);
|
|
1795
1844
|
const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
|
|
@@ -1834,12 +1883,12 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
|
|
|
1834
1883
|
}, endSlot) : null));
|
|
1835
1884
|
});
|
|
1836
1885
|
|
|
1837
|
-
const _excluded$
|
|
1886
|
+
const _excluded$j = ["togglePasswordLabel"];
|
|
1838
1887
|
const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, ref) {
|
|
1839
1888
|
let {
|
|
1840
1889
|
togglePasswordLabel = 'Toggle password visibility'
|
|
1841
1890
|
} = _ref,
|
|
1842
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1891
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
1843
1892
|
|
|
1844
1893
|
const [isPasswordVisible, setPasswordVisible] = React.useState(false);
|
|
1845
1894
|
const Icon = isPasswordVisible ? PasswordVisibleIcon : PasswordHiddenIcon;
|
|
@@ -1847,7 +1896,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
|
|
|
1847
1896
|
ref: ref,
|
|
1848
1897
|
// @ts-expect-error TextField does not support type="password", so we override the type check here
|
|
1849
1898
|
type: isPasswordVisible ? 'text' : 'password',
|
|
1850
|
-
endSlot: /*#__PURE__*/React.createElement(
|
|
1899
|
+
endSlot: /*#__PURE__*/React.createElement(IconButton, {
|
|
1851
1900
|
variant: "quaternary",
|
|
1852
1901
|
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
1853
1902
|
"aria-hidden": true
|
|
@@ -1860,7 +1909,7 @@ const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref,
|
|
|
1860
1909
|
|
|
1861
1910
|
var modules_1fa9b208 = {"selectWrapper":"b930bb07","bordered":"e1f620b6","error":"_7e87474e"};
|
|
1862
1911
|
|
|
1863
|
-
const _excluded$
|
|
1912
|
+
const _excluded$k = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "children", "hidden", "aria-describedby"];
|
|
1864
1913
|
const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref) {
|
|
1865
1914
|
let {
|
|
1866
1915
|
variant = 'default',
|
|
@@ -1876,7 +1925,7 @@ const SelectField = /*#__PURE__*/React.forwardRef(function SelectField(_ref, ref
|
|
|
1876
1925
|
hidden,
|
|
1877
1926
|
'aria-describedby': ariaDescribedBy
|
|
1878
1927
|
} = _ref,
|
|
1879
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1928
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
1880
1929
|
|
|
1881
1930
|
return /*#__PURE__*/React.createElement(BaseField, {
|
|
1882
1931
|
variant: variant,
|
|
@@ -1914,7 +1963,7 @@ function SelectChevron(props) {
|
|
|
1914
1963
|
|
|
1915
1964
|
var modules_8e05f7c9 = {"container":"bae487be","disabled":"_408d32a0","checked":"_99b0ead7","toggle":"_5af09fb5","label":"a66e1846","handle":"_0dcf70ec","keyFocused":"_1f5e7fd4"};
|
|
1916
1965
|
|
|
1917
|
-
const _excluded$
|
|
1966
|
+
const _excluded$l = ["label", "hint", "disabled", "hidden", "defaultChecked", "id", "aria-describedby", "aria-label", "aria-labelledby", "onChange"];
|
|
1918
1967
|
const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref) {
|
|
1919
1968
|
var _ref2, _props$checked, _props$checked2;
|
|
1920
1969
|
|
|
@@ -1930,7 +1979,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
|
|
|
1930
1979
|
'aria-labelledby': originalAriaLabelledby,
|
|
1931
1980
|
onChange
|
|
1932
1981
|
} = _ref,
|
|
1933
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1982
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
1934
1983
|
|
|
1935
1984
|
const id = useId(originalId);
|
|
1936
1985
|
const hintId = useId();
|
|
@@ -1990,7 +2039,7 @@ const SwitchField = /*#__PURE__*/React.forwardRef(function SwitchField(_ref, ref
|
|
|
1990
2039
|
|
|
1991
2040
|
var modules_2728c236 = {"textAreaContainer":"_55ccf266","innerContainer":"_89bb7098","bordered":"_02a47358","error":"_704ff540","autoExpand":"_145ca8f0"};
|
|
1992
2041
|
|
|
1993
|
-
const _excluded$
|
|
2042
|
+
const _excluded$m = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "hidden", "aria-describedby", "rows", "autoExpand"];
|
|
1994
2043
|
const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
1995
2044
|
let {
|
|
1996
2045
|
variant = 'default',
|
|
@@ -2007,7 +2056,7 @@ const TextArea = /*#__PURE__*/React.forwardRef(function TextArea(_ref, ref) {
|
|
|
2007
2056
|
rows,
|
|
2008
2057
|
autoExpand = false
|
|
2009
2058
|
} = _ref,
|
|
2010
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2059
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
2011
2060
|
|
|
2012
2061
|
const containerRef = React.useRef(null);
|
|
2013
2062
|
const internalRef = React.useRef(null);
|
|
@@ -2090,7 +2139,7 @@ function emailToIndex(email, maxIndex) {
|
|
|
2090
2139
|
|
|
2091
2140
|
var modules_08f3eeac = {"avatar":"_38a1be89","size-xxs":"d32e92ae","size-xs":"_0667d719","size-s":"cf529fcf","size-m":"_6e268eab","size-l":"d64c62cf","size-xl":"_44fb77de","size-xxl":"_01f85e0e","size-xxxl":"_41a5fe19","tablet-size-xxs":"_6ab1577d","tablet-size-xs":"b52a4963","tablet-size-s":"_714a8419","tablet-size-m":"_81cd4d51","tablet-size-l":"bf0a4edb","tablet-size-xl":"e4f0dabd","tablet-size-xxl":"_67ea065d","tablet-size-xxxl":"_2af7f76f","desktop-size-xxs":"_759081dc","desktop-size-xs":"_8290d1c1","desktop-size-s":"_48ea172d","desktop-size-m":"_758f6641","desktop-size-l":"f9ada088","desktop-size-xl":"d3bb7470","desktop-size-xxl":"_9a312ee3","desktop-size-xxxl":"a1d30c23"};
|
|
2092
2141
|
|
|
2093
|
-
const _excluded$
|
|
2142
|
+
const _excluded$n = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
|
|
2094
2143
|
const AVATAR_COLORS = ['#fcc652', '#e9952c', '#e16b2d', '#d84b40', '#e8435a', '#e5198a', '#ad3889', '#86389c', '#a8a8a8', '#98be2f', '#5d9d50', '#5f9f85', '#5bbcb6', '#32a3bf', '#2bafeb', '#2d88c3', '#3863cc', '#5e5e5e'];
|
|
2095
2144
|
|
|
2096
2145
|
function Avatar(_ref) {
|
|
@@ -2102,7 +2151,7 @@ function Avatar(_ref) {
|
|
|
2102
2151
|
colorList = AVATAR_COLORS,
|
|
2103
2152
|
exceptionallySetClassName
|
|
2104
2153
|
} = _ref,
|
|
2105
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2154
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
2106
2155
|
|
|
2107
2156
|
const userInitials = getInitials(user.name) || getInitials(user.email);
|
|
2108
2157
|
const avatarSize = size ? size : 'l';
|
|
@@ -2122,16 +2171,16 @@ function Avatar(_ref) {
|
|
|
2122
2171
|
|
|
2123
2172
|
Avatar.displayName = 'Avatar';
|
|
2124
2173
|
|
|
2125
|
-
var modules_33c7c985 = {"badge":"
|
|
2174
|
+
var modules_33c7c985 = {"badge":"c6ba5977","badge-info":"cf731337","badge-positive":"_7cfc5738","badge-promote":"_63691069","badge-attention":"_28ffb572","badge-warning":"_89e77f92"};
|
|
2126
2175
|
|
|
2127
|
-
const _excluded$
|
|
2176
|
+
const _excluded$o = ["tone", "label"];
|
|
2128
2177
|
|
|
2129
2178
|
function Badge(_ref) {
|
|
2130
2179
|
let {
|
|
2131
2180
|
tone,
|
|
2132
2181
|
label
|
|
2133
2182
|
} = _ref,
|
|
2134
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2183
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
2135
2184
|
|
|
2136
2185
|
return /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2137
2186
|
as: "span" // It enables putting the badge inside a button (https://stackoverflow.com/a/12982334)
|
|
@@ -2143,8 +2192,8 @@ function Badge(_ref) {
|
|
|
2143
2192
|
|
|
2144
2193
|
var modules_8f59d13b = {"overlay":"_8aa86dd3","fadein":"_20c07ee6","fitContent":"_713bc08f","container":"_45139719","full":"ec8619a2","large":"_86a1d5a4","medium":"_11d61de3","small":"aee19643","xlarge":"fe449c81","expand":"_61ffb38f","buttonContainer":"_49ffdac0","headerContent":"ee92ccb3"};
|
|
2145
2194
|
|
|
2146
|
-
const _excluded$
|
|
2147
|
-
_excluded2$
|
|
2195
|
+
const _excluded$p = ["isOpen", "onDismiss", "height", "width", "exceptionallySetClassName", "exceptionallySetOverlayClassName", "autoFocus", "hideOnEscape", "hideOnInteractOutside", "children", "portalElement", "onKeyDown"],
|
|
2196
|
+
_excluded2$2 = ["children", "button", "withDivider", "exceptionallySetClassName"],
|
|
2148
2197
|
_excluded3 = ["exceptionallySetClassName", "children"],
|
|
2149
2198
|
_excluded4 = ["exceptionallySetClassName", "withDivider"],
|
|
2150
2199
|
_excluded5 = ["children"];
|
|
@@ -2182,7 +2231,7 @@ function Modal(_ref) {
|
|
|
2182
2231
|
portalElement,
|
|
2183
2232
|
onKeyDown
|
|
2184
2233
|
} = _ref,
|
|
2185
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2234
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
2186
2235
|
|
|
2187
2236
|
const setOpen = React.useCallback(visible => {
|
|
2188
2237
|
if (!visible) {
|
|
@@ -2298,7 +2347,7 @@ function ModalCloseButton(props) {
|
|
|
2298
2347
|
setIsMounted(true);
|
|
2299
2348
|
}
|
|
2300
2349
|
}, [isMounted]);
|
|
2301
|
-
return /*#__PURE__*/React.createElement(
|
|
2350
|
+
return /*#__PURE__*/React.createElement(IconButton, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2302
2351
|
variant: "quaternary",
|
|
2303
2352
|
onClick: onDismiss,
|
|
2304
2353
|
icon: /*#__PURE__*/React.createElement(CloseIcon, null),
|
|
@@ -2320,7 +2369,7 @@ function ModalHeader(_ref2) {
|
|
|
2320
2369
|
withDivider = false,
|
|
2321
2370
|
exceptionallySetClassName
|
|
2322
2371
|
} = _ref2,
|
|
2323
|
-
props = _objectWithoutProperties(_ref2, _excluded2$
|
|
2372
|
+
props = _objectWithoutProperties(_ref2, _excluded2$2);
|
|
2324
2373
|
|
|
2325
2374
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
2326
2375
|
as: "header",
|
|
@@ -2418,8 +2467,8 @@ function ModalActions(_ref5) {
|
|
|
2418
2467
|
|
|
2419
2468
|
var modules_40c67f5b = {"tab":"e96bf360","track":"_430e252d","tab-neutral":"f631ccbe","tab-themed":"_6ba96acc","track-neutral":"ef4cd8d3","track-themed":"_344b3b10"};
|
|
2420
2469
|
|
|
2421
|
-
const _excluded$
|
|
2422
|
-
_excluded2$
|
|
2470
|
+
const _excluded$q = ["as", "children", "id", "exceptionallySetClassName"],
|
|
2471
|
+
_excluded2$3 = ["children", "space"],
|
|
2423
2472
|
_excluded3$1 = ["children", "id", "as", "render"];
|
|
2424
2473
|
const TabsContext = /*#__PURE__*/React.createContext(null);
|
|
2425
2474
|
/**
|
|
@@ -2464,7 +2513,7 @@ const Tab = /*#__PURE__*/polymorphicComponent(function Tab(_ref2, ref) {
|
|
|
2464
2513
|
id,
|
|
2465
2514
|
exceptionallySetClassName
|
|
2466
2515
|
} = _ref2,
|
|
2467
|
-
props = _objectWithoutProperties(_ref2, _excluded$
|
|
2516
|
+
props = _objectWithoutProperties(_ref2, _excluded$q);
|
|
2468
2517
|
|
|
2469
2518
|
const tabContextValue = React.useContext(TabsContext);
|
|
2470
2519
|
if (!tabContextValue) return null;
|
|
@@ -2490,7 +2539,7 @@ function TabList(_ref3) {
|
|
|
2490
2539
|
children,
|
|
2491
2540
|
space
|
|
2492
2541
|
} = _ref3,
|
|
2493
|
-
props = _objectWithoutProperties(_ref3, _excluded2$
|
|
2542
|
+
props = _objectWithoutProperties(_ref3, _excluded2$3);
|
|
2494
2543
|
|
|
2495
2544
|
const tabContextValue = React.useContext(TabsContext);
|
|
2496
2545
|
|
|
@@ -2573,8 +2622,8 @@ function TabAwareSlot({
|
|
|
2573
2622
|
}) : null;
|
|
2574
2623
|
}
|
|
2575
2624
|
|
|
2576
|
-
const _excluded$
|
|
2577
|
-
_excluded2$
|
|
2625
|
+
const _excluded$r = ["children", "onItemSelect"],
|
|
2626
|
+
_excluded2$4 = ["exceptionallySetClassName"],
|
|
2578
2627
|
_excluded3$2 = ["as"],
|
|
2579
2628
|
_excluded4$1 = ["exceptionallySetClassName", "modal"],
|
|
2580
2629
|
_excluded5$1 = ["value", "children", "onSelect", "hideOnSelect", "onClick", "exceptionallySetClassName", "as"],
|
|
@@ -2595,7 +2644,7 @@ function Menu(_ref) {
|
|
|
2595
2644
|
children,
|
|
2596
2645
|
onItemSelect
|
|
2597
2646
|
} = _ref,
|
|
2598
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2647
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
2599
2648
|
|
|
2600
2649
|
const [anchorRect, setAnchorRect] = React.useState(null);
|
|
2601
2650
|
const getAnchorRect = React.useMemo(() => anchorRect ? () => anchorRect : null, [anchorRect]);
|
|
@@ -2621,7 +2670,7 @@ const MenuButton = /*#__PURE__*/polymorphicComponent(function MenuButton(_ref2,
|
|
|
2621
2670
|
let {
|
|
2622
2671
|
exceptionallySetClassName
|
|
2623
2672
|
} = _ref2,
|
|
2624
|
-
props = _objectWithoutProperties(_ref2, _excluded2$
|
|
2673
|
+
props = _objectWithoutProperties(_ref2, _excluded2$4);
|
|
2625
2674
|
|
|
2626
2675
|
const {
|
|
2627
2676
|
menuStore
|
|
@@ -2810,7 +2859,7 @@ const MenuGroup = /*#__PURE__*/polymorphicComponent(function MenuGroup(_ref6, re
|
|
|
2810
2859
|
}, label) : null, children);
|
|
2811
2860
|
});
|
|
2812
2861
|
|
|
2813
|
-
const _excluded$
|
|
2862
|
+
const _excluded$s = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
|
|
2814
2863
|
/**
|
|
2815
2864
|
* @deprecated
|
|
2816
2865
|
*/
|
|
@@ -2826,7 +2875,7 @@ const Button$1 = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
|
2826
2875
|
onClick,
|
|
2827
2876
|
children
|
|
2828
2877
|
} = _ref,
|
|
2829
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2878
|
+
props = _objectWithoutProperties(_ref, _excluded$s);
|
|
2830
2879
|
|
|
2831
2880
|
const className = classNames('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
|
|
2832
2881
|
'reactist_button--loading': loading
|
|
@@ -2849,7 +2898,7 @@ Button$1.defaultProps = {
|
|
|
2849
2898
|
disabled: false
|
|
2850
2899
|
};
|
|
2851
2900
|
|
|
2852
|
-
const _excluded$
|
|
2901
|
+
const _excluded$t = ["children", "onClick", "tooltip", "className"];
|
|
2853
2902
|
|
|
2854
2903
|
class Box$1 extends React.Component {
|
|
2855
2904
|
constructor(props, context) {
|
|
@@ -3002,7 +3051,7 @@ const Trigger = /*#__PURE__*/React.forwardRef(function Trigger(_ref, ref) {
|
|
|
3002
3051
|
tooltip,
|
|
3003
3052
|
className
|
|
3004
3053
|
} = _ref,
|
|
3005
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3054
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
3006
3055
|
|
|
3007
3056
|
function handleClick(event) {
|
|
3008
3057
|
event.preventDefault();
|
|
@@ -3129,7 +3178,7 @@ function ColorItem({
|
|
|
3129
3178
|
|
|
3130
3179
|
ColorItem.displayName = 'ColorItem';
|
|
3131
3180
|
|
|
3132
|
-
const _excluded$
|
|
3181
|
+
const _excluded$u = ["children", "className", "translateKey", "isMac"];
|
|
3133
3182
|
// Support for setting up how to translate modifiers globally.
|
|
3134
3183
|
//
|
|
3135
3184
|
|
|
@@ -3211,7 +3260,7 @@ function KeyboardShortcut(_ref) {
|
|
|
3211
3260
|
translateKey = globalTranslateKey,
|
|
3212
3261
|
isMac = (_navigator$platform$t = (_navigator$platform = navigator.platform) == null ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) != null ? _navigator$platform$t : false
|
|
3213
3262
|
} = _ref,
|
|
3214
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3263
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
3215
3264
|
|
|
3216
3265
|
const shortcuts = typeof children === 'string' ? [children] : children;
|
|
3217
3266
|
return /*#__PURE__*/React.createElement("span", _objectSpread2({
|
|
@@ -3626,7 +3675,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
3626
3675
|
});
|
|
3627
3676
|
Input.displayName = 'Input';
|
|
3628
3677
|
|
|
3629
|
-
const _excluded$
|
|
3678
|
+
const _excluded$v = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
|
|
3630
3679
|
|
|
3631
3680
|
function Select(_ref) {
|
|
3632
3681
|
let {
|
|
@@ -3637,7 +3686,7 @@ function Select(_ref) {
|
|
|
3637
3686
|
className = '',
|
|
3638
3687
|
defaultValue
|
|
3639
3688
|
} = _ref,
|
|
3640
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
3689
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$v);
|
|
3641
3690
|
|
|
3642
3691
|
const selectClassName = classNames('reactist_select', {
|
|
3643
3692
|
disabled
|
|
@@ -3667,7 +3716,6 @@ exports.Badge = Badge;
|
|
|
3667
3716
|
exports.Banner = Banner;
|
|
3668
3717
|
exports.Box = Box;
|
|
3669
3718
|
exports.Button = Button;
|
|
3670
|
-
exports.ButtonLink = ButtonLink;
|
|
3671
3719
|
exports.COLORS = COLORS;
|
|
3672
3720
|
exports.CheckboxField = CheckboxField;
|
|
3673
3721
|
exports.ColorPicker = ColorPicker;
|
|
@@ -3682,6 +3730,7 @@ exports.Divider = Divider;
|
|
|
3682
3730
|
exports.Heading = Heading;
|
|
3683
3731
|
exports.Hidden = Hidden;
|
|
3684
3732
|
exports.HiddenVisually = HiddenVisually;
|
|
3733
|
+
exports.IconButton = IconButton;
|
|
3685
3734
|
exports.Inline = Inline;
|
|
3686
3735
|
exports.KeyCapturer = KeyCapturer;
|
|
3687
3736
|
exports.KeyboardShortcut = KeyboardShortcut;
|
|
@@ -3720,5 +3769,6 @@ exports.Time = Time;
|
|
|
3720
3769
|
exports.Toast = Toast;
|
|
3721
3770
|
exports.ToastsProvider = ToastsProvider;
|
|
3722
3771
|
exports.Tooltip = Tooltip;
|
|
3772
|
+
exports.getBoxClassNames = getBoxClassNames;
|
|
3723
3773
|
exports.useToasts = useToasts;
|
|
3724
3774
|
//# sourceMappingURL=reactist.cjs.development.js.map
|