@hyphen/hyphen-components 4.13.0 → 5.0.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/dist/components/Formik/{FormikToggle/FormikToggle.d.ts → FormikSwitch/FormikSwitch.d.ts} +2 -2
- package/dist/components/Formik/FormikToggleGroup/FormikToggleGroup.d.ts +17 -0
- package/dist/components/Switch/Switch.d.ts +64 -0
- package/dist/components/Switch/Switch.stories.d.ts +12 -0
- package/dist/components/Toggle/Toggle.d.ts +7 -64
- package/dist/components/Toggle/Toggle.stories.d.ts +3 -5
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +19 -0
- package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +11 -0
- package/dist/css/index.css +3 -1
- package/dist/css/utilities.css +13 -1
- package/dist/css/variables.css +6 -2
- package/dist/hyphen-components.cjs.development.js +335 -239
- package/dist/hyphen-components.cjs.development.js.map +1 -1
- package/dist/hyphen-components.cjs.production.min.js +1 -1
- package/dist/hyphen-components.cjs.production.min.js.map +1 -1
- package/dist/hyphen-components.esm.js +329 -239
- package/dist/hyphen-components.esm.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/lib/tokens.d.ts +1 -1
- package/package.json +18 -16
- package/src/components/Formik/Formik.stories.tsx +39 -2
- package/src/components/Formik/{FormikToggle/FormikToggle.test.tsx → FormikSwitch/FormikSwitch.test.tsx} +3 -3
- package/src/components/Formik/{FormikToggle/FormikToggle.tsx → FormikSwitch/FormikSwitch.tsx} +4 -4
- package/src/components/Formik/FormikToggleGroup/FormikToggleGroup.test.tsx +117 -0
- package/src/components/Formik/FormikToggleGroup/FormikToggleGroup.tsx +55 -0
- package/src/components/Switch/Switch.mdx +47 -0
- package/src/components/Switch/Switch.module.scss +294 -0
- package/src/components/Switch/Switch.stories.tsx +128 -0
- package/src/components/{Toggle/Toggle.test.tsx → Switch/Switch.test.tsx} +75 -75
- package/src/components/Switch/Switch.tsx +185 -0
- package/src/components/Toggle/Toggle.mdx +11 -31
- package/src/components/Toggle/Toggle.module.scss +32 -280
- package/src/components/Toggle/Toggle.stories.tsx +28 -113
- package/src/components/Toggle/Toggle.tsx +27 -180
- package/src/components/ToggleGroup/ToggleGroup.mdx +39 -0
- package/src/components/ToggleGroup/ToggleGroup.module.scss +46 -0
- package/src/components/ToggleGroup/ToggleGroup.stories.tsx +103 -0
- package/src/components/ToggleGroup/ToggleGroup.tsx +88 -0
- package/src/index.ts +4 -1
|
@@ -21,7 +21,9 @@ import Select, { components } from 'react-select';
|
|
|
21
21
|
import AsyncCreatableSelect from 'react-select/async-creatable';
|
|
22
22
|
import AsyncSelect from 'react-select/async';
|
|
23
23
|
import CreatableSelect from 'react-select/creatable';
|
|
24
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
24
25
|
import { v4 } from 'uuid';
|
|
26
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
25
27
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
26
28
|
|
|
27
29
|
function _extends() {
|
|
@@ -250,9 +252,9 @@ Component, props, getDefault) {
|
|
|
250
252
|
return defaultProps.as || 'div';
|
|
251
253
|
}
|
|
252
254
|
|
|
253
|
-
var styles$
|
|
255
|
+
var styles$A = {"box-transition":"Box-module_box-transition__eQx8C"};
|
|
254
256
|
|
|
255
|
-
var _excluded$
|
|
257
|
+
var _excluded$Q = ["as", "alignItems", "alignContent", "alignSelf", "background", "borderColor", "borderWidth", "children", "childGap", "className", "color", "columnGap", "cursor", "display", "direction", "flex", "fontFamily", "fontSize", "focus", "fontWeight", "gap", "height", "hover", "justifyContent", "margin", "maxHeight", "minHeight", "maxWidth", "minWidth", "overflow", "padding", "position", "radius", "rowGap", "shadow", "style", "textAlign", "wrap", "width", "zIndex"];
|
|
256
258
|
/**
|
|
257
259
|
* A `<Box>` is a layout component to build UIs with consistent padding and spacing between
|
|
258
260
|
* elements.
|
|
@@ -339,7 +341,7 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
339
341
|
width = _ref$width === void 0 ? undefined : _ref$width,
|
|
340
342
|
_ref$zIndex = _ref.zIndex,
|
|
341
343
|
zIndex = _ref$zIndex === void 0 ? undefined : _ref$zIndex,
|
|
342
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
344
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$Q);
|
|
343
345
|
var heightCss = getDimensionCss('h', height);
|
|
344
346
|
var widthCss = getDimensionCss('w', width);
|
|
345
347
|
var maxHeightCss = getDimensionCss('mh', maxHeight);
|
|
@@ -388,7 +390,7 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
388
390
|
var boxClasses = classNames.apply(void 0, [className, cssShorthandToClasses('m', margin), cssShorthandToClasses('p', padding), cssShorthandToClasses('br', radius), cssShorthandToClasses('g', gap), cssShorthandToClasses('cg', columnGap), cssShorthandToClasses('rg', rowGap), heightCss.classes, maxHeightCss.classes, minHeightCss.classes, maxWidthCss.classes, minWidthCss.classes, widthCss.classes, flexDirectionClasses, generateResponsiveClasses('display', display), generateResponsiveClasses('justify-content', justifyContent), generateResponsiveClasses('align-items', alignItems), generateResponsiveClasses('align-content', alignContent), generateResponsiveClasses('align-self', alignSelf), generateResponsiveClasses('font-family', fontFamily), generateResponsiveClasses('font-size', fontSize), generateResponsiveClasses('overflow', overflow), generateResponsiveClasses('shadow', shadow), generateResponsiveClasses('flex', flex), cssShorthandToClasses('bw', borderWidth), generateResponsiveClasses('font-weight', fontWeight), generateResponsiveClasses('text-align', textAlign), generateResponsiveClasses('position', position), generateResponsiveClasses('z-index', zIndex)].concat(hoverClasses != null ? hoverClasses : [], focusClasses != null ? focusClasses : [], [(_ref3 = {
|
|
389
391
|
'flex-wrap': isFlexBox && wrap,
|
|
390
392
|
'flex-nowrap': isFlexBox && wrap === false
|
|
391
|
-
}, _ref3["background-color-" + background] = background, _ref3["font-color-" + color] = color, _ref3["border-color-" + borderColor] = borderColor, _ref3["cursor-" + cursor] = cursor, _ref3[styles$
|
|
393
|
+
}, _ref3["background-color-" + background] = background, _ref3["font-color-" + color] = color, _ref3["border-color-" + borderColor] = borderColor, _ref3["cursor-" + cursor] = cursor, _ref3[styles$A['box-transition']] = hover || focus, _ref3)]));
|
|
392
394
|
var boxStyles = _extends({}, style, heightCss.styles, maxHeightCss.styles, maxWidthCss.styles, widthCss.styles, minHeightCss.styles, minWidthCss.styles);
|
|
393
395
|
/**
|
|
394
396
|
* Creates an object that maps the flex direction to either `right` or `bottom`
|
|
@@ -490,14 +492,14 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
490
492
|
});
|
|
491
493
|
var boxPropsKeys = ['as', 'alignItems', 'alignContent', 'alignSelf', 'background', 'borderColor', 'borderWidth', 'className', 'childGap', 'children', 'color', 'columnGap', 'cursor', 'direction', 'display', 'flex', 'focus', 'fontFamily', 'fontSize', 'fontWeight', 'gap', 'height', 'hover', 'justifyContent', 'margin', 'maxHeight', 'minHeight', 'maxWidth', 'minWidth', 'overflow', 'padding', 'position', 'radius', 'rowGap', 'shadow', 'style', 'textAlign', 'wrap', 'width', 'zIndex'];
|
|
492
494
|
|
|
493
|
-
var _excluded$
|
|
495
|
+
var _excluded$P = ["className", "name", "color", "size"];
|
|
494
496
|
var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
495
497
|
var _ref$className = _ref.className,
|
|
496
498
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
497
499
|
name = _ref.name,
|
|
498
500
|
color = _ref.color,
|
|
499
501
|
size = _ref.size,
|
|
500
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
502
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$P);
|
|
501
503
|
var IconComponent = icons[name];
|
|
502
504
|
if (!IconComponent) console.error("Icon '" + name + "' not found"); // eslint-disable-line no-console
|
|
503
505
|
var iconClasses = classNames(className, generateResponsiveClasses('font-color', color), generateResponsiveClasses('font-size', size));
|
|
@@ -515,7 +517,7 @@ var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
515
517
|
}, "???");
|
|
516
518
|
});
|
|
517
519
|
|
|
518
|
-
var styles$
|
|
520
|
+
var styles$z = {"alert":"Alert-module_alert__zP4AL","close-icon":"Alert-module_close-icon__zs4Xk","alert-heading":"Alert-module_alert-heading__VguTk","alert__default":"Alert-module_alert__default__-pcBw","alert__info":"Alert-module_alert__info__UZeOd","alert__success":"Alert-module_alert__success__o2IHF","alert__warning":"Alert-module_alert__warning__lzTY-","alert__danger":"Alert-module_alert__danger__M-XFh","alert__icon__default":"Alert-module_alert__icon__default__cCx9C","alert__icon__info":"Alert-module_alert__icon__info__2W0Bi","alert__icon__success":"Alert-module_alert__icon__success__NBCDO","alert__icon__warning":"Alert-module_alert__icon__warning__nY4hy","alert__icon__danger":"Alert-module_alert__icon__danger__NcOrf"};
|
|
519
521
|
|
|
520
522
|
// eslint-disable-next-line import/prefer-default-export
|
|
521
523
|
var ALERT_ICONS_MAP = {
|
|
@@ -536,7 +538,7 @@ var ALERT_ICONS_MAP = {
|
|
|
536
538
|
}
|
|
537
539
|
};
|
|
538
540
|
|
|
539
|
-
var _excluded$
|
|
541
|
+
var _excluded$O = ["className", "closeText", "hasIcon", "isCompact", "isClosable", "message", "onClose", "render", "title", "variant"];
|
|
540
542
|
var Alert = function Alert(_ref) {
|
|
541
543
|
var _ref$className = _ref.className,
|
|
542
544
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -558,7 +560,7 @@ var Alert = function Alert(_ref) {
|
|
|
558
560
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
559
561
|
_ref$variant = _ref.variant,
|
|
560
562
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
561
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
563
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$O);
|
|
562
564
|
var handleClose = function handleClose(event) {
|
|
563
565
|
if (!onClose) return;
|
|
564
566
|
onClose(event);
|
|
@@ -566,7 +568,7 @@ var Alert = function Alert(_ref) {
|
|
|
566
568
|
var renderAlertIcon = function renderAlertIcon() {
|
|
567
569
|
return React__default.createElement(Box, {
|
|
568
570
|
fontSize: "md",
|
|
569
|
-
className: styles$
|
|
571
|
+
className: styles$z["alert__icon__" + variant]
|
|
570
572
|
}, React__default.createElement(Icon, {
|
|
571
573
|
name: ALERT_ICONS_MAP[variant].icon,
|
|
572
574
|
"data-testid": "alert-icon-" + variant + "-test-id"
|
|
@@ -579,7 +581,7 @@ var Alert = function Alert(_ref) {
|
|
|
579
581
|
return React__default.createElement(Box, {
|
|
580
582
|
margin: "0 0 0 auto",
|
|
581
583
|
color: "secondary",
|
|
582
|
-
className: styles$
|
|
584
|
+
className: styles$z['close-icon']
|
|
583
585
|
}, React__default.createElement("button", {
|
|
584
586
|
type: "button",
|
|
585
587
|
onClick: handleClose,
|
|
@@ -589,7 +591,7 @@ var Alert = function Alert(_ref) {
|
|
|
589
591
|
"data-testid": "alert-close-icon-test-id"
|
|
590
592
|
})));
|
|
591
593
|
};
|
|
592
|
-
var alertContainerClasses = classNames(styles$
|
|
594
|
+
var alertContainerClasses = classNames(styles$z["alert__" + variant], styles$z.alert, className);
|
|
593
595
|
return React__default.createElement(Box, _extends({
|
|
594
596
|
alignItems: "flex-start",
|
|
595
597
|
gap: "md",
|
|
@@ -606,13 +608,13 @@ var Alert = function Alert(_ref) {
|
|
|
606
608
|
as: "h4",
|
|
607
609
|
fontSize: "sm",
|
|
608
610
|
fontWeight: "semibold",
|
|
609
|
-
className: styles$
|
|
611
|
+
className: styles$z['alert-heading']
|
|
610
612
|
}, title), message && (typeof message === 'string' ? React__default.createElement("p", null, message) : message))), isClosable && renderCloseIcon());
|
|
611
613
|
};
|
|
612
614
|
|
|
613
|
-
var styles$
|
|
615
|
+
var styles$y = {"badge":"Badge-module_badge__ZbEBU","size-sm":"Badge-module_size-sm__rL8a6","size-md":"Badge-module_size-md__kf6IH","size-lg":"Badge-module_size-lg__of6XJ","inverse":"Badge-module_inverse__qZCFA","purple":"Badge-module_purple__rX-xW","green":"Badge-module_green__W03uU","red":"Badge-module_red__fl2jg","blue":"Badge-module_blue__C7kyV","yellow":"Badge-module_yellow__gGZ6R","light-grey":"Badge-module_light-grey__Wtrhx","dark-grey":"Badge-module_dark-grey__X-807","hyphen":"Badge-module_hyphen__9pe7x","size-sm-tablet":"Badge-module_size-sm-tablet__6xMVk","size-md-tablet":"Badge-module_size-md-tablet__4w-7I","size-lg-tablet":"Badge-module_size-lg-tablet__8xyRF","size-sm-desktop":"Badge-module_size-sm-desktop__Ayf5L","size-md-desktop":"Badge-module_size-md-desktop__XSq7m","size-lg-desktop":"Badge-module_size-lg-desktop__Baw3S","size-sm-hd":"Badge-module_size-sm-hd__Da6Au","size-md-hd":"Badge-module_size-md-hd__-VNMk","size-lg-hd":"Badge-module_size-lg-hd__6MOwL"};
|
|
614
616
|
|
|
615
|
-
var _excluded$
|
|
617
|
+
var _excluded$N = ["className", "message", "variant", "size"];
|
|
616
618
|
var Badge = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
617
619
|
var _classNames;
|
|
618
620
|
var _ref$className = _ref.className,
|
|
@@ -623,11 +625,11 @@ var Badge = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
623
625
|
variant = _ref$variant === void 0 ? 'light-grey' : _ref$variant,
|
|
624
626
|
_ref$size = _ref.size,
|
|
625
627
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
626
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
628
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$N);
|
|
627
629
|
var responsiveClasses = generateResponsiveClasses('size', size).map(function (c) {
|
|
628
|
-
return styles$
|
|
630
|
+
return styles$y[c];
|
|
629
631
|
});
|
|
630
|
-
var badgeClasses = classNames(styles$
|
|
632
|
+
var badgeClasses = classNames(styles$y.badge, className, responsiveClasses, (_classNames = {}, _classNames[styles$y[variant]] = variant, _classNames));
|
|
631
633
|
return React__default.createElement(Box, _extends({
|
|
632
634
|
ref: ref,
|
|
633
635
|
className: badgeClasses,
|
|
@@ -635,13 +637,13 @@ var Badge = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
635
637
|
}, restProps), message);
|
|
636
638
|
});
|
|
637
639
|
|
|
638
|
-
var styles$
|
|
640
|
+
var styles$x = {"spinner":"Spinner-module_spinner__SZoUP","spin":"Spinner-module_spin__Yk0wm"};
|
|
639
641
|
|
|
640
642
|
var Spinner = function Spinner(_ref) {
|
|
641
643
|
var className = _ref.className,
|
|
642
644
|
_ref$size = _ref.size,
|
|
643
645
|
size = _ref$size === void 0 ? 'md' : _ref$size;
|
|
644
|
-
var classes = classNames(className, styles$
|
|
646
|
+
var classes = classNames(className, styles$x.spinner);
|
|
645
647
|
var sizeInPixels = function sizeInPixels() {
|
|
646
648
|
var pixels;
|
|
647
649
|
if (size === 'sm') pixels = '12';
|
|
@@ -728,9 +730,9 @@ var Spinner = function Spinner(_ref) {
|
|
|
728
730
|
}))));
|
|
729
731
|
};
|
|
730
732
|
|
|
731
|
-
var styles$
|
|
733
|
+
var styles$w = {"button":"Button-module_button__18Bed","size-sm":"Button-module_size-sm__6Xrjw","size-md":"Button-module_size-md__BkuGu","size-lg":"Button-module_size-lg__JVYWV","primary":"Button-module_primary__st6yY","secondary":"Button-module_secondary__j-3rj","tertiary":"Button-module_tertiary__Nd7xM","danger":"Button-module_danger__Hxs5n","size-sm-tablet":"Button-module_size-sm-tablet__9XaSx","size-md-tablet":"Button-module_size-md-tablet__YQxaI","size-lg-tablet":"Button-module_size-lg-tablet__h3l97","size-sm-desktop":"Button-module_size-sm-desktop__8tTsg","size-md-desktop":"Button-module_size-md-desktop__OCdDi","size-lg-desktop":"Button-module_size-lg-desktop__uFc4f","size-sm-hd":"Button-module_size-sm-hd__INFfD","size-md-hd":"Button-module_size-md-hd__8e2mW","size-lg-hd":"Button-module_size-lg-hd__DH60l","loading":"Button-module_loading__QfItr","label":"Button-module_label__1PsXG","full-width":"Button-module_full-width__qDri6","spinner-wrapper":"Button-module_spinner-wrapper__rALNw"};
|
|
732
734
|
|
|
733
|
-
var _excluded$
|
|
735
|
+
var _excluded$M = ["asChild", "children", "className", "fullWidth", "iconPrefix", "iconSuffix", "isDisabled", "isLoading", "onClick", "onBlur", "onFocus", "shadow", "size", "type", "variant"];
|
|
734
736
|
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
735
737
|
var _classNames;
|
|
736
738
|
var asChild = _ref.asChild,
|
|
@@ -751,12 +753,12 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
751
753
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
752
754
|
_ref$variant = _ref.variant,
|
|
753
755
|
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
754
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
756
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$M);
|
|
755
757
|
var disabled = isLoading || isDisabled;
|
|
756
758
|
var responsiveClasses = generateResponsiveClasses('size', size).map(function (c) {
|
|
757
|
-
return styles$
|
|
759
|
+
return styles$w[c];
|
|
758
760
|
}).filter(Boolean);
|
|
759
|
-
var buttonClasses = classNames('hyphen-components__variables__form-control', styles$
|
|
761
|
+
var buttonClasses = classNames('hyphen-components__variables__form-control', styles$w.button, className, responsiveClasses, generateResponsiveClasses('shadow', shadow), (_classNames = {}, _classNames[styles$w.loading] = isLoading, _classNames[styles$w[variant]] = variant, _classNames[styles$w['full-width']] = fullWidth, _classNames));
|
|
760
762
|
var handleClick = !disabled ? onClick : undefined;
|
|
761
763
|
var handleBlur = !disabled ? onBlur : undefined;
|
|
762
764
|
var handleFocus = !disabled ? onFocus : undefined;
|
|
@@ -773,18 +775,18 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
773
775
|
}, !asChild && {
|
|
774
776
|
type: type
|
|
775
777
|
}, restProps), isLoading && React__default.createElement(Spinner, {
|
|
776
|
-
className: styles$
|
|
778
|
+
className: styles$w['spinner-wrapper']
|
|
777
779
|
}), iconPrefix && React__default.createElement(Icon, {
|
|
778
|
-
className: styles$
|
|
780
|
+
className: styles$w.label,
|
|
779
781
|
name: iconPrefix,
|
|
780
782
|
"aria-hidden": "true",
|
|
781
783
|
focusable: "false",
|
|
782
784
|
"data-testid": "prefixIcon",
|
|
783
785
|
size: size === 'md' ? 'sm' : size
|
|
784
786
|
}), children && React__default.createElement(Slottable, null, asChild ? children : React__default.createElement("span", {
|
|
785
|
-
className: styles$
|
|
787
|
+
className: styles$w.label
|
|
786
788
|
}, children)), iconSuffix && React__default.createElement(Icon, {
|
|
787
|
-
className: styles$
|
|
789
|
+
className: styles$w.label,
|
|
788
790
|
name: iconSuffix,
|
|
789
791
|
"aria-hidden": "true",
|
|
790
792
|
focusable: "false",
|
|
@@ -794,7 +796,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
794
796
|
});
|
|
795
797
|
Button.displayName = 'Button';
|
|
796
798
|
|
|
797
|
-
var _excluded$
|
|
799
|
+
var _excluded$L = ["background", "borderColor", "borderWidth", "children", "display", "padding"];
|
|
798
800
|
var CardFooter = function CardFooter(_ref) {
|
|
799
801
|
var _ref$background = _ref.background,
|
|
800
802
|
background = _ref$background === void 0 ? 'secondary' : _ref$background,
|
|
@@ -808,7 +810,7 @@ var CardFooter = function CardFooter(_ref) {
|
|
|
808
810
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
809
811
|
_ref$padding = _ref.padding,
|
|
810
812
|
padding = _ref$padding === void 0 ? '2xl' : _ref$padding,
|
|
811
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
813
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
812
814
|
return React__default.createElement(Box, _extends({
|
|
813
815
|
display: display,
|
|
814
816
|
padding: padding,
|
|
@@ -827,9 +829,9 @@ var HEADING_DEFAULT_SIZE_MAP = {
|
|
|
827
829
|
h6: 'sm'
|
|
828
830
|
};
|
|
829
831
|
|
|
830
|
-
var styles$
|
|
832
|
+
var styles$v = {"heading":"Heading-module_heading__zKyv7"};
|
|
831
833
|
|
|
832
|
-
var _excluded$
|
|
834
|
+
var _excluded$K = ["as", "children", "className", "color", "size"];
|
|
833
835
|
var Heading = function Heading(_ref) {
|
|
834
836
|
var _classNames;
|
|
835
837
|
var _ref$as = _ref.as,
|
|
@@ -838,23 +840,23 @@ var Heading = function Heading(_ref) {
|
|
|
838
840
|
className = _ref.className,
|
|
839
841
|
color = _ref.color,
|
|
840
842
|
size = _ref.size,
|
|
841
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
843
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$K);
|
|
842
844
|
var element = getElementType(Heading, {
|
|
843
845
|
as: as
|
|
844
846
|
});
|
|
845
847
|
var headingSize = size || HEADING_DEFAULT_SIZE_MAP[as];
|
|
846
|
-
var classes = classNames(styles$
|
|
848
|
+
var classes = classNames(styles$v.heading, className, generateResponsiveClasses('heading', headingSize), (_classNames = {}, _classNames["font-color-" + color] = color, _classNames));
|
|
847
849
|
return createElement(element, _extends({
|
|
848
850
|
className: classes
|
|
849
851
|
}, restProps), children);
|
|
850
852
|
};
|
|
851
853
|
|
|
852
|
-
var _excluded$
|
|
854
|
+
var _excluded$J = ["children", "title", "description"];
|
|
853
855
|
var CardHeader = function CardHeader(_ref) {
|
|
854
856
|
var children = _ref.children,
|
|
855
857
|
title = _ref.title,
|
|
856
858
|
description = _ref.description,
|
|
857
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
859
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$J);
|
|
858
860
|
return React__default.createElement(Box, _extends({
|
|
859
861
|
padding: "2xl",
|
|
860
862
|
direction: "row",
|
|
@@ -875,9 +877,9 @@ var CardHeader = function CardHeader(_ref) {
|
|
|
875
877
|
}, description) : description)), children);
|
|
876
878
|
};
|
|
877
879
|
|
|
878
|
-
var styles$
|
|
880
|
+
var styles$u = {"card-section-border":"Card-module_card-section-border__OefDX"};
|
|
879
881
|
|
|
880
|
-
var _excluded$
|
|
882
|
+
var _excluded$I = ["background", "borderColor", "borderWidth", "children", "childGap", "gap", "className", "display", "padding", "subdued", "title"];
|
|
881
883
|
var CardSection = function CardSection(_ref) {
|
|
882
884
|
var _classNames;
|
|
883
885
|
var _ref$background = _ref.background,
|
|
@@ -902,7 +904,7 @@ var CardSection = function CardSection(_ref) {
|
|
|
902
904
|
subdued = _ref$subdued === void 0 ? undefined : _ref$subdued,
|
|
903
905
|
_ref$title = _ref.title,
|
|
904
906
|
title = _ref$title === void 0 ? undefined : _ref$title,
|
|
905
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
907
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
906
908
|
var renderTitle = typeof title === 'string' ? React__default.createElement(Box, {
|
|
907
909
|
className: "m-bottom-md"
|
|
908
910
|
}, React__default.createElement(Box, {
|
|
@@ -911,7 +913,7 @@ var CardSection = function CardSection(_ref) {
|
|
|
911
913
|
fontSize: "sm",
|
|
912
914
|
color: "base"
|
|
913
915
|
}, title)) : title;
|
|
914
|
-
var sectionClasses = classNames((_classNames = {}, _classNames[styles$
|
|
916
|
+
var sectionClasses = classNames((_classNames = {}, _classNames[styles$u['card-section-border']] = borderColor === undefined && borderWidth === undefined, _classNames[styles$u['card-subdued']] = subdued, _classNames), className);
|
|
915
917
|
return React__default.createElement(Box, _extends({
|
|
916
918
|
background: background,
|
|
917
919
|
borderColor: borderColor,
|
|
@@ -925,7 +927,7 @@ var CardSection = function CardSection(_ref) {
|
|
|
925
927
|
}, children));
|
|
926
928
|
};
|
|
927
929
|
|
|
928
|
-
var _excluded$
|
|
930
|
+
var _excluded$H = ["children", "subdued", "overflow", "display", "width"];
|
|
929
931
|
var CardBaseComponent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
930
932
|
var children = _ref.children,
|
|
931
933
|
subdued = _ref.subdued,
|
|
@@ -935,7 +937,7 @@ var CardBaseComponent = /*#__PURE__*/React__default.forwardRef(function (_ref, r
|
|
|
935
937
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
936
938
|
_ref$width = _ref.width,
|
|
937
939
|
width = _ref$width === void 0 ? '100' : _ref$width,
|
|
938
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
940
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
939
941
|
return React__default.createElement(Box, _extends({
|
|
940
942
|
background: subdued ? 'secondary' : 'primary',
|
|
941
943
|
borderWidth: "sm",
|
|
@@ -958,7 +960,7 @@ var Card = /*#__PURE__*/function () {
|
|
|
958
960
|
return Card;
|
|
959
961
|
}();
|
|
960
962
|
|
|
961
|
-
var _excluded$
|
|
963
|
+
var _excluded$G = ["className", "error", "isChecked", "isDisabled", "isIndeterminate"];
|
|
962
964
|
var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
963
965
|
var _ref$className = _ref.className,
|
|
964
966
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
@@ -970,7 +972,7 @@ var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
|
970
972
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
971
973
|
_ref$isIndeterminate = _ref.isIndeterminate,
|
|
972
974
|
isIndeterminate = _ref$isIndeterminate === void 0 ? false : _ref$isIndeterminate,
|
|
973
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
975
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
974
976
|
var color = 'base';
|
|
975
977
|
var name = 'checkbox-btn';
|
|
976
978
|
if (isChecked) name = 'checkbox-btn-checked';else name = 'checkbox-btn';
|
|
@@ -993,9 +995,9 @@ var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
|
993
995
|
}));
|
|
994
996
|
};
|
|
995
997
|
|
|
996
|
-
var styles$
|
|
998
|
+
var styles$t = {"checkbox":"Checkbox-module_checkbox__dY-7P","size-sm":"Checkbox-module_size-sm__mJkMQ","size-md":"Checkbox-module_size-md__I2s8g","size-lg":"Checkbox-module_size-lg__rFFnb","hidden":"Checkbox-module_hidden__2y7Zr","size-sm-tablet":"Checkbox-module_size-sm-tablet__GhQUW","size-md-tablet":"Checkbox-module_size-md-tablet__XRHf4","size-lg-tablet":"Checkbox-module_size-lg-tablet__quoAJ","size-sm-desktop":"Checkbox-module_size-sm-desktop__fqeEc","size-md-desktop":"Checkbox-module_size-md-desktop__9a278","size-lg-desktop":"Checkbox-module_size-lg-desktop__WQnv0","size-sm-hd":"Checkbox-module_size-sm-hd__X3yIF","size-md-hd":"Checkbox-module_size-md-hd__6T0dF","size-lg-hd":"Checkbox-module_size-lg-hd__UXCt1"};
|
|
997
999
|
|
|
998
|
-
var _excluded$
|
|
1000
|
+
var _excluded$F = ["className", "display", "id", "isChecked", "label", "labelledby", "onChange", "error", "isDisabled", "isHidden", "isIndeterminate", "isRequired", "onBlur", "onFocus", "size", "value"];
|
|
999
1001
|
var Checkbox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
1000
1002
|
var _ref2;
|
|
1001
1003
|
var _ref$className = _ref.className,
|
|
@@ -1025,7 +1027,7 @@ var Checkbox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1025
1027
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
1026
1028
|
_ref$value = _ref.value,
|
|
1027
1029
|
value = _ref$value === void 0 ? undefined : _ref$value,
|
|
1028
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1030
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
1029
1031
|
var inputRef = React__default.useRef(null);
|
|
1030
1032
|
React__default.useEffect(function () {
|
|
1031
1033
|
if (inputRef != null && inputRef.current) {
|
|
@@ -1059,11 +1061,11 @@ var Checkbox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1059
1061
|
value: value
|
|
1060
1062
|
});
|
|
1061
1063
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
1062
|
-
var containerClasses = classNames.apply(void 0, [styles$
|
|
1063
|
-
return styles$
|
|
1064
|
-
}), [(_ref2 = {}, _ref2[styles$
|
|
1064
|
+
var containerClasses = classNames.apply(void 0, [styles$t.checkbox, className].concat(responsiveClasses.map(function (c) {
|
|
1065
|
+
return styles$t[c];
|
|
1066
|
+
}), [(_ref2 = {}, _ref2[styles$t.hidden] = isHidden, _ref2)]));
|
|
1065
1067
|
var iconClasses = classNames.apply(void 0, responsiveClasses.map(function (c) {
|
|
1066
|
-
return styles$
|
|
1068
|
+
return styles$t[c];
|
|
1067
1069
|
}));
|
|
1068
1070
|
return React__default.createElement(Box, _extends({
|
|
1069
1071
|
display: display,
|
|
@@ -1086,35 +1088,35 @@ var Checkbox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1086
1088
|
}));
|
|
1087
1089
|
});
|
|
1088
1090
|
|
|
1089
|
-
var styles$
|
|
1091
|
+
var styles$s = {"input-validation-message":"InputValidationMessage-module_input-validation-message__4MMMK"};
|
|
1090
1092
|
|
|
1091
1093
|
var InputValidationMessage = function InputValidationMessage(_ref) {
|
|
1092
1094
|
var children = _ref.children,
|
|
1093
1095
|
_ref$size = _ref.size,
|
|
1094
1096
|
size = _ref$size === void 0 ? 'sm' : _ref$size;
|
|
1095
|
-
var classes = classNames('hyphen-components__variables__form-control', styles$
|
|
1097
|
+
var classes = classNames('hyphen-components__variables__form-control', styles$s['input-validation-message'], 'font-color-danger', "font-size-" + size, 'm-top-sm');
|
|
1096
1098
|
return React__default.createElement("div", {
|
|
1097
1099
|
className: classes
|
|
1098
1100
|
}, children);
|
|
1099
1101
|
};
|
|
1100
1102
|
|
|
1101
|
-
var styles$
|
|
1103
|
+
var styles$r = {"label":"FormLabel-module_label__qTUB9","radio-input-label":"FormLabel-module_radio-input-label__IpAiN","disabled":"FormLabel-module_disabled__83oiH","sm":"FormLabel-module_sm__6PwRr"};
|
|
1102
1104
|
|
|
1103
|
-
var styles$
|
|
1105
|
+
var styles$q = {"help-text":"HelpText-module_help-text__8WodW"};
|
|
1104
1106
|
|
|
1105
1107
|
var HelpText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1106
1108
|
var children = _ref.children,
|
|
1107
1109
|
className = _ref.className;
|
|
1108
1110
|
return React__default.createElement(Box, {
|
|
1109
1111
|
ref: ref,
|
|
1110
|
-
className: classNames('hyphen-components__variables__form-control', styles$
|
|
1112
|
+
className: classNames('hyphen-components__variables__form-control', styles$q['help-text'], className),
|
|
1111
1113
|
display: "block",
|
|
1112
1114
|
color: "secondary",
|
|
1113
1115
|
fontSize: "sm"
|
|
1114
1116
|
}, children);
|
|
1115
1117
|
});
|
|
1116
1118
|
|
|
1117
|
-
var _excluded$
|
|
1119
|
+
var _excluded$E = ["children", "inputId", "className", "display", "helpText", "isDisabled", "isFieldRequired", "isRadioInputLabel", "requiredIndicator", "margin", "padding", "size"];
|
|
1118
1120
|
var FormLabel = function FormLabel(_ref) {
|
|
1119
1121
|
var _classNames;
|
|
1120
1122
|
var children = _ref.children,
|
|
@@ -1138,8 +1140,8 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
1138
1140
|
padding = _ref$padding === void 0 ? '0' : _ref$padding,
|
|
1139
1141
|
_ref$size = _ref.size,
|
|
1140
1142
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
1141
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1142
|
-
var labelClasses = classNames('hyphen-components__variables__form-control', styles$
|
|
1143
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
1144
|
+
var labelClasses = classNames('hyphen-components__variables__form-control', styles$r.label, className, (_classNames = {}, _classNames[styles$r.sm] = size === 'sm', _classNames[styles$r.disabled] = isDisabled, _classNames[styles$r['radio-input-label']] = isRadioInputLabel, _classNames));
|
|
1143
1145
|
return React__default.createElement(Box, _extends({
|
|
1144
1146
|
as: "label",
|
|
1145
1147
|
id: inputId + "Label",
|
|
@@ -1151,7 +1153,7 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
1151
1153
|
}, restProps), children, isFieldRequired && requiredIndicator && React__default.createElement("span", null, requiredIndicator), helpText && React__default.createElement(HelpText, null, helpText));
|
|
1152
1154
|
};
|
|
1153
1155
|
|
|
1154
|
-
var _excluded$
|
|
1156
|
+
var _excluded$D = ["id", "isChecked", "label", "onChange", "className", "error", "hideLabel", "helpText", "isDisabled", "isIndeterminate", "isRequired", "onBlur", "onFocus", "requiredIndicator", "size"];
|
|
1155
1157
|
var labelMarginSizeMap = {
|
|
1156
1158
|
sm: '2xs 0 0 0',
|
|
1157
1159
|
md: 'xs 0 0 0',
|
|
@@ -1196,7 +1198,7 @@ var CheckboxInput = function CheckboxInput(_ref2) {
|
|
|
1196
1198
|
requiredIndicator = _ref2$requiredIndicat === void 0 ? ' *' : _ref2$requiredIndicat,
|
|
1197
1199
|
_ref2$size = _ref2.size,
|
|
1198
1200
|
size = _ref2$size === void 0 ? 'md' : _ref2$size,
|
|
1199
|
-
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
1201
|
+
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded$D);
|
|
1200
1202
|
var handleBlur = function handleBlur(event) {
|
|
1201
1203
|
if (onBlur) onBlur(event);
|
|
1202
1204
|
};
|
|
@@ -1242,9 +1244,9 @@ var Collapsible = CollapsiblePrimitive.Root;
|
|
|
1242
1244
|
var CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
1243
1245
|
var CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
1244
1246
|
|
|
1245
|
-
var styles$
|
|
1247
|
+
var styles$p = {};
|
|
1246
1248
|
|
|
1247
|
-
var _excluded$
|
|
1249
|
+
var _excluded$C = ["children", "dayClassName", "maxDate", "minDate", "monthsShown", "openToDate", "startDate", "selected", "selectsRange", "showTwoColumnMonthYearPicker", "showFullMonthYearPicker", "showMonthYearPicker", "className", "formatWeekDay"];
|
|
1248
1250
|
var DatePicker = function DatePicker(_ref) {
|
|
1249
1251
|
var _ref$children = _ref.children,
|
|
1250
1252
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
@@ -1276,8 +1278,8 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
1276
1278
|
formatWeekDay = _ref$formatWeekDay === void 0 ? function (formattedDate) {
|
|
1277
1279
|
return formattedDate[0];
|
|
1278
1280
|
} : _ref$formatWeekDay,
|
|
1279
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1280
|
-
var datePickerClasses = classNames(styles$
|
|
1281
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
1282
|
+
var datePickerClasses = classNames(styles$p['react-datepicker'], className);
|
|
1281
1283
|
return React__default.createElement(ReactDatePicker, _extends({
|
|
1282
1284
|
inline: true,
|
|
1283
1285
|
calendarClassName: datePickerClasses,
|
|
@@ -1296,7 +1298,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
1296
1298
|
}, restProps), children);
|
|
1297
1299
|
};
|
|
1298
1300
|
|
|
1299
|
-
var _excluded$
|
|
1301
|
+
var _excluded$B = ["label", "hideLabel", "children", "error", "id", "isRequired", "helpText", "isDisabled", "requiredIndicator", "width"];
|
|
1300
1302
|
var FormControl = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
1301
1303
|
var label = _ref.label,
|
|
1302
1304
|
hideLabel = _ref.hideLabel,
|
|
@@ -1309,7 +1311,7 @@ var FormControl = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1309
1311
|
requiredIndicator = _ref.requiredIndicator,
|
|
1310
1312
|
_ref$width = _ref.width,
|
|
1311
1313
|
width = _ref$width === void 0 ? '100' : _ref$width,
|
|
1312
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1314
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
1313
1315
|
var labelProps = {
|
|
1314
1316
|
inputId: id,
|
|
1315
1317
|
helpText: helpText,
|
|
@@ -1335,9 +1337,9 @@ function getAutoCompleteValue(value) {
|
|
|
1335
1337
|
return value;
|
|
1336
1338
|
}
|
|
1337
1339
|
|
|
1338
|
-
var styles$
|
|
1340
|
+
var styles$o = {"text-input-wrapper":"TextInput-module_text-input-wrapper__HCnQD","size-sm":"TextInput-module_size-sm__qWJn7","prefix":"TextInput-module_prefix__-wFO9","suffix":"TextInput-module_suffix__327yL","clear-button":"TextInput-module_clear-button__LUJpO","is-clearable":"TextInput-module_is-clearable__ExAY3","size-md":"TextInput-module_size-md__UFPtt","size-lg":"TextInput-module_size-lg__Hjfez","disabled":"TextInput-module_disabled__lrifj","size-sm-tablet":"TextInput-module_size-sm-tablet__neC5C","size-md-tablet":"TextInput-module_size-md-tablet__u29oc","size-lg-tablet":"TextInput-module_size-lg-tablet__3PUB3","size-sm-desktop":"TextInput-module_size-sm-desktop__kA12V","size-md-desktop":"TextInput-module_size-md-desktop__yLJGr","size-lg-desktop":"TextInput-module_size-lg-desktop__A1pcS","size-sm-hd":"TextInput-module_size-sm-hd__f7Thr","size-md-hd":"TextInput-module_size-md-hd__Tsnqc","size-lg-hd":"TextInput-module_size-lg-hd__XLMos","error":"TextInput-module_error__p6zZq","text-input-label":"TextInput-module_text-input-label__3PlSG"};
|
|
1339
1341
|
|
|
1340
|
-
var _excluded$
|
|
1342
|
+
var _excluded$A = ["id", "label", "onChange", "value", "autoComplete", "autoFocus", "error", "helpText", "hideLabel", "inputProps", "isDisabled", "isRequired", "maxLength", "name", "onBlur", "onClear", "onFocus", "prefix", "placeholder", "requiredIndicator", "suffix", "size", "type"];
|
|
1341
1343
|
var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1342
1344
|
var _ref2;
|
|
1343
1345
|
var id = _ref.id,
|
|
@@ -1381,12 +1383,12 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1381
1383
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
1382
1384
|
_ref$type = _ref.type,
|
|
1383
1385
|
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
1384
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1386
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
1385
1387
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
1386
|
-
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$
|
|
1387
|
-
return styles$
|
|
1388
|
-
}), [(_ref2 = {}, _ref2[styles$
|
|
1389
|
-
var clearBtnClasses = classNames(styles$
|
|
1388
|
+
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$o['text-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
1389
|
+
return styles$o[c];
|
|
1390
|
+
}), [(_ref2 = {}, _ref2[styles$o.error] = error, _ref2[styles$o.disabled] = isDisabled, _ref2[styles$o['is-clearable']] = onClear, _ref2)]));
|
|
1391
|
+
var clearBtnClasses = classNames(styles$o['clear-button'], styles$o.md);
|
|
1390
1392
|
var renderClearIcon = function renderClearIcon() {
|
|
1391
1393
|
var handleKeyPress = function handleKeyPress(event) {
|
|
1392
1394
|
if (event.keyCode === 13 && onClear) onClear(event);
|
|
@@ -1445,17 +1447,17 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1445
1447
|
}, prefix && React__default.createElement(Box, {
|
|
1446
1448
|
color: "secondary",
|
|
1447
1449
|
background: "secondary",
|
|
1448
|
-
className: classNames(styles$
|
|
1450
|
+
className: classNames(styles$o.prefix, 'ws-nowrap')
|
|
1449
1451
|
}, prefix), React__default.createElement(Box, _extends({
|
|
1450
1452
|
as: "input"
|
|
1451
1453
|
}, computedInputProps)), !!onClear && !!value && renderClearIcon(), suffix && React__default.createElement(Box, {
|
|
1452
1454
|
color: "secondary",
|
|
1453
1455
|
background: "secondary",
|
|
1454
|
-
className: classNames(styles$
|
|
1456
|
+
className: classNames(styles$o.suffix, 'ws-nowrap')
|
|
1455
1457
|
}, suffix)));
|
|
1456
1458
|
});
|
|
1457
1459
|
|
|
1458
|
-
var styles$
|
|
1460
|
+
var styles$n = {"popover":"Popover-module_popover__rvS3X","fadeIn":"Popover-module_fadeIn__0btE5","popover-arrow":"Popover-module_popover-arrow__SLtPW"};
|
|
1459
1461
|
|
|
1460
1462
|
// eslint-disable-next-line import/prefer-default-export
|
|
1461
1463
|
var getColumnKeys = function getColumnKeys(columns) {
|
|
@@ -1533,7 +1535,7 @@ var BREAKPOINTS = /*#__PURE__*/[].concat(Object.entries(designTokens.size.breakp
|
|
|
1533
1535
|
var Z_INDEX_VALUES = designTokens.size['z-index'];
|
|
1534
1536
|
// export const BOX_SHADOW_VALUES = designTokens.size['box-shadow'];
|
|
1535
1537
|
|
|
1536
|
-
var _excluded$
|
|
1538
|
+
var _excluded$z = ["className", "isOpen", "children", "content", "arrowColor", "contentContainerProps", "hasArrow", "offsetFromTarget", "onClickOutside", "placement", "withPortal", "portalTarget", "trapFocus"];
|
|
1537
1539
|
var contentContainerDefaults = {
|
|
1538
1540
|
background: 'primary',
|
|
1539
1541
|
padding: 'sm',
|
|
@@ -1562,7 +1564,7 @@ var Popover = function Popover(_ref) {
|
|
|
1562
1564
|
portalTarget = _ref.portalTarget,
|
|
1563
1565
|
_ref$trapFocus = _ref.trapFocus,
|
|
1564
1566
|
trapFocus = _ref$trapFocus === void 0 ? false : _ref$trapFocus,
|
|
1565
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1567
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
1566
1568
|
var triggerRef = useRef(null);
|
|
1567
1569
|
var popperRef = useRef(null);
|
|
1568
1570
|
var _useState = useState(null),
|
|
@@ -1616,14 +1618,14 @@ var Popover = function Popover(_ref) {
|
|
|
1616
1618
|
attributes = _usePopper.attributes;
|
|
1617
1619
|
var containerBoxProps = _extends({}, contentContainerDefaults, contentContainerProps);
|
|
1618
1620
|
var computedArrowColor = arrowColor || containerBoxProps.background;
|
|
1619
|
-
var arrowClasses = classNames(styles$
|
|
1621
|
+
var arrowClasses = classNames(styles$n['popover-arrow'], "background-color-" + computedArrowColor, {
|
|
1620
1622
|
'display-none': !hasArrow
|
|
1621
1623
|
});
|
|
1622
1624
|
var renderPopperContent = function renderPopperContent() {
|
|
1623
1625
|
var renderPopperBox = function renderPopperBox() {
|
|
1624
1626
|
return React__default.createElement(Box, _extends({
|
|
1625
1627
|
ref: popperRef,
|
|
1626
|
-
className: classNames(styles$
|
|
1628
|
+
className: classNames(styles$n.popover, className),
|
|
1627
1629
|
style: popperStyles.popper,
|
|
1628
1630
|
role: "dialog",
|
|
1629
1631
|
"aria-label": "Popover",
|
|
@@ -1668,7 +1670,7 @@ var Popover = function Popover(_ref) {
|
|
|
1668
1670
|
withPortal && portalTarget ? createPortal(renderPopperContent(), portalTarget) : renderPopperContent()));
|
|
1669
1671
|
};
|
|
1670
1672
|
|
|
1671
|
-
var _excluded$
|
|
1673
|
+
var _excluded$y = ["datePickerProps", "textInputProps", "dateFormat", "dateOptions", "popoverProps"];
|
|
1672
1674
|
var defaultDatePickerProps = {
|
|
1673
1675
|
selected: null,
|
|
1674
1676
|
selectsRange: false
|
|
@@ -1688,7 +1690,7 @@ var DateInput = function DateInput(_ref) {
|
|
|
1688
1690
|
dateOptions = _ref$dateOptions === void 0 ? undefined : _ref$dateOptions,
|
|
1689
1691
|
_ref$popoverProps = _ref.popoverProps,
|
|
1690
1692
|
popoverProps = _ref$popoverProps === void 0 ? _extends({}, defaultPopoverProps) : _ref$popoverProps,
|
|
1691
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1693
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
1692
1694
|
var mergedDatePickerProps = _extends({}, defaultDatePickerProps, datePickerProps);
|
|
1693
1695
|
var mergedPopoverProps = _extends({}, defaultPopoverProps, popoverProps);
|
|
1694
1696
|
var mergedTextInputProps = _extends({}, defaultTextInputProps, textInputProps);
|
|
@@ -1765,14 +1767,14 @@ var DateInput = function DateInput(_ref) {
|
|
|
1765
1767
|
var ENTER = 13;
|
|
1766
1768
|
var SPACE = 32;
|
|
1767
1769
|
|
|
1768
|
-
var _excluded$
|
|
1770
|
+
var _excluded$x = ["children", "display", "isDetailsOpen", "onToggle"];
|
|
1769
1771
|
var DetailsSummary = function DetailsSummary(_ref) {
|
|
1770
1772
|
var children = _ref.children,
|
|
1771
1773
|
_ref$display = _ref.display,
|
|
1772
1774
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1773
1775
|
isDetailsOpen = _ref.isDetailsOpen,
|
|
1774
1776
|
onToggle = _ref.onToggle,
|
|
1775
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1777
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
1776
1778
|
var handleClick = function handleClick(event) {
|
|
1777
1779
|
// Needed to avoid default `details` behavior on a click event and keep this as controlled component.
|
|
1778
1780
|
event.preventDefault();
|
|
@@ -1808,17 +1810,17 @@ var DetailsSummary = function DetailsSummary(_ref) {
|
|
|
1808
1810
|
}), children);
|
|
1809
1811
|
};
|
|
1810
1812
|
|
|
1811
|
-
var styles$
|
|
1813
|
+
var styles$m = {"details-reset":"Details-module_details-reset__HWtSD"};
|
|
1812
1814
|
|
|
1813
|
-
var _excluded$
|
|
1815
|
+
var _excluded$w = ["children", "className", "display", "isOpen"];
|
|
1814
1816
|
var DetailsBaseComponent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
1815
1817
|
var children = _ref.children,
|
|
1816
1818
|
className = _ref.className,
|
|
1817
1819
|
_ref$display = _ref.display,
|
|
1818
1820
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1819
1821
|
isOpen = _ref.isOpen,
|
|
1820
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1821
|
-
var detailsClasses = classNames(className, styles$
|
|
1822
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
1823
|
+
var detailsClasses = classNames(className, styles$m['details-reset'], styles$m.details);
|
|
1822
1824
|
return React__default.createElement(Box, _extends({
|
|
1823
1825
|
as: "details",
|
|
1824
1826
|
className: detailsClasses,
|
|
@@ -1835,10 +1837,10 @@ var Details = /*#__PURE__*/function () {
|
|
|
1835
1837
|
return Details;
|
|
1836
1838
|
}();
|
|
1837
1839
|
|
|
1838
|
-
var styles$
|
|
1840
|
+
var styles$l = {"drawer":"Drawer-module_drawer__IKoOm","hide-overlay-right":"Drawer-module_hide-overlay-right__FANA9","hide-overlay-left":"Drawer-module_hide-overlay-left__xZFa3","hide-overlay-bottom":"Drawer-module_hide-overlay-bottom__11EB1","hide-overlay-top":"Drawer-module_hide-overlay-top__kEsV5","drawer-content":"Drawer-module_drawer-content__zZ9xR","left":"Drawer-module_left__pwTcW","right":"Drawer-module_right__EzGpI","bottom":"Drawer-module_bottom__r3Q5Z","top":"Drawer-module_top__xQejO"};
|
|
1839
1841
|
|
|
1840
|
-
var _excluded$
|
|
1841
|
-
_excluded2$
|
|
1842
|
+
var _excluded$v = ["defaultIsOpen", "open", "onOpenChange", "className", "children"],
|
|
1843
|
+
_excluded2$3 = ["asChild", "onClick"],
|
|
1842
1844
|
_excluded3$2 = ["className"],
|
|
1843
1845
|
_excluded4$2 = ["className", "onClick", "onClose"],
|
|
1844
1846
|
_excluded5$2 = ["className"];
|
|
@@ -1857,7 +1859,7 @@ var DrawerProvider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1857
1859
|
setOpenProp = _ref.onOpenChange,
|
|
1858
1860
|
className = _ref.className,
|
|
1859
1861
|
children = _ref.children,
|
|
1860
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1862
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
1861
1863
|
var _useState = useState(openProp != null ? openProp : defaultIsOpen),
|
|
1862
1864
|
_open = _useState[0],
|
|
1863
1865
|
_setOpen = _useState[1];
|
|
@@ -1898,7 +1900,7 @@ var DrawerTrigger = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref)
|
|
|
1898
1900
|
var _ref2$asChild = _ref2.asChild,
|
|
1899
1901
|
asChild = _ref2$asChild === void 0 ? false : _ref2$asChild,
|
|
1900
1902
|
onClick = _ref2.onClick,
|
|
1901
|
-
triggerProps = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
1903
|
+
triggerProps = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
|
|
1902
1904
|
var context = useContext(DrawerContext);
|
|
1903
1905
|
var isStandalone = !context;
|
|
1904
1906
|
var handleClick = function handleClick(event) {
|
|
@@ -1976,8 +1978,8 @@ var Drawer = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
1976
1978
|
}, [initialFocusRef]);
|
|
1977
1979
|
var dynamicWidth = width;
|
|
1978
1980
|
var dynamicStyle = (_dynamicStyle = {}, _dynamicStyle['--drawer-width'] = dynamicWidth, _dynamicStyle);
|
|
1979
|
-
var overlayClassnames = classNames(styles$
|
|
1980
|
-
var contentClassnames = classNames(styles$
|
|
1981
|
+
var overlayClassnames = classNames(styles$l.overlay, styles$l.drawer, (_classNames = {}, _classNames[styles$l['hide-overlay']] = hideOverlay, _classNames[styles$l["hide-overlay-" + placement]] = hideOverlay, _classNames['position-fixed'] = containerRef === undefined, _classNames['position-absolute'] = containerRef !== undefined, _classNames));
|
|
1982
|
+
var contentClassnames = classNames(styles$l['drawer-content'], styles$l[placement], (_classNames2 = {}, _classNames2[styles$l['hide-overlay']] = hideOverlay, _classNames2));
|
|
1981
1983
|
var parentElement = containerRef != null && containerRef.current ? containerRef.current : document.body;
|
|
1982
1984
|
var isDisabledFocusLock = hideOverlay || dangerouslyBypassFocusLock;
|
|
1983
1985
|
var isDisabledRemoveScroll = hideOverlay || dangerouslyBypassScrollLock;
|
|
@@ -2081,8 +2083,8 @@ var DrawerContent = /*#__PURE__*/React__default.forwardRef(function (_ref7, ref)
|
|
|
2081
2083
|
}, props));
|
|
2082
2084
|
});
|
|
2083
2085
|
|
|
2084
|
-
var _excluded$
|
|
2085
|
-
_excluded2$
|
|
2086
|
+
var _excluded$u = ["className", "inset"],
|
|
2087
|
+
_excluded2$2 = ["className", "sideOffset"],
|
|
2086
2088
|
_excluded3$1 = ["className", "inset"],
|
|
2087
2089
|
_excluded4$1 = ["className"],
|
|
2088
2090
|
_excluded5$1 = ["className"],
|
|
@@ -2097,7 +2099,7 @@ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
|
2097
2099
|
var DropdownMenuItem = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
2098
2100
|
var className = _ref.className,
|
|
2099
2101
|
inset = _ref.inset,
|
|
2100
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2102
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
2101
2103
|
return React__default.createElement(DropdownMenuPrimitive.Item, _extends({
|
|
2102
2104
|
ref: ref,
|
|
2103
2105
|
className: classNames('font-size-sm position-relative cursor-default display-flex br-sm align-items-center p-sm g-sm outline-none', inset && 'p-left-md', !props.disabled && 'hover:background-color-secondary focus:background-color-secondary', props.disabled && 'cursor-not-allowed font-color-disabled', className)
|
|
@@ -2108,7 +2110,7 @@ var DropdownMenuContent = /*#__PURE__*/React__default.forwardRef(function (_ref2
|
|
|
2108
2110
|
var className = _ref2.className,
|
|
2109
2111
|
_ref2$sideOffset = _ref2.sideOffset,
|
|
2110
2112
|
sideOffset = _ref2$sideOffset === void 0 ? 4 : _ref2$sideOffset,
|
|
2111
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$
|
|
2113
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$2);
|
|
2112
2114
|
return React__default.createElement(DropdownMenuPrimitive.Portal, null, React__default.createElement(DropdownMenuPrimitive.Content, _extends({
|
|
2113
2115
|
ref: ref,
|
|
2114
2116
|
sideOffset: sideOffset,
|
|
@@ -2177,7 +2179,7 @@ var DropdownMenuSubContent = /*#__PURE__*/React__default.forwardRef(function (_r
|
|
|
2177
2179
|
});
|
|
2178
2180
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
2179
2181
|
|
|
2180
|
-
var _excluded$
|
|
2182
|
+
var _excluded$t = ["field", "form", "onChange", "id", "label"];
|
|
2181
2183
|
var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
2182
2184
|
var _ref$field = _ref.field,
|
|
2183
2185
|
name = _ref$field.name,
|
|
@@ -2190,7 +2192,7 @@ var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
|
2190
2192
|
onChange = _ref.onChange,
|
|
2191
2193
|
id = _ref.id,
|
|
2192
2194
|
label = _ref.label,
|
|
2193
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2195
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
2194
2196
|
return React__default.createElement(CheckboxInput, _extends({}, props, {
|
|
2195
2197
|
id: id,
|
|
2196
2198
|
label: label,
|
|
@@ -2201,7 +2203,7 @@ var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
|
2201
2203
|
}));
|
|
2202
2204
|
};
|
|
2203
2205
|
|
|
2204
|
-
var _excluded$
|
|
2206
|
+
var _excluded$s = ["className", "isSelected", "isDisabled", "error"];
|
|
2205
2207
|
var RadioInputIcon = function RadioInputIcon(_ref) {
|
|
2206
2208
|
var _ref$className = _ref.className,
|
|
2207
2209
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
@@ -2211,7 +2213,7 @@ var RadioInputIcon = function RadioInputIcon(_ref) {
|
|
|
2211
2213
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
2212
2214
|
_ref$error = _ref.error,
|
|
2213
2215
|
error = _ref$error === void 0 ? null : _ref$error,
|
|
2214
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2216
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
2215
2217
|
var color = 'secondary';
|
|
2216
2218
|
var name = 'radio-btn-unchecked';
|
|
2217
2219
|
if (isSelected && isDisabled) {
|
|
@@ -2233,7 +2235,7 @@ var RadioInputIcon = function RadioInputIcon(_ref) {
|
|
|
2233
2235
|
}));
|
|
2234
2236
|
};
|
|
2235
2237
|
|
|
2236
|
-
var styles$
|
|
2238
|
+
var styles$k = {"size-sm":"RadioInput-module_size-sm__6DLmn","size-md":"RadioInput-module_size-md__wiJ4R","size-lg":"RadioInput-module_size-lg__pX8S8","radio-container":"RadioInput-module_radio-container__EBRgV","hidden":"RadioInput-module_hidden__KF4as","size-sm-tablet":"RadioInput-module_size-sm-tablet__x7edi","size-md-tablet":"RadioInput-module_size-md-tablet__T-HTa","size-lg-tablet":"RadioInput-module_size-lg-tablet__0Hkim","size-sm-desktop":"RadioInput-module_size-sm-desktop__HjeWG","size-md-desktop":"RadioInput-module_size-md-desktop__3Y1fn","size-lg-desktop":"RadioInput-module_size-lg-desktop__z3nKW","size-sm-hd":"RadioInput-module_size-sm-hd__oxAR7","size-md-hd":"RadioInput-module_size-md-hd__ws7ro","size-lg-hd":"RadioInput-module_size-lg-hd__87uii"};
|
|
2237
2239
|
|
|
2238
2240
|
var RadioInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
2239
2241
|
var _classNames;
|
|
@@ -2257,7 +2259,7 @@ var RadioInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
2257
2259
|
_ref$size = _ref.size,
|
|
2258
2260
|
size = _ref$size === void 0 ? 'md' : _ref$size;
|
|
2259
2261
|
var responsiveClasses = classNames.apply(void 0, generateResponsiveClasses('size', size).map(function (c) {
|
|
2260
|
-
return styles$
|
|
2262
|
+
return styles$k[c];
|
|
2261
2263
|
}));
|
|
2262
2264
|
var labelProps = {
|
|
2263
2265
|
inputId: option.id,
|
|
@@ -2266,7 +2268,7 @@ var RadioInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
2266
2268
|
isRadioInputLabel: true,
|
|
2267
2269
|
justifyContent: 'center'
|
|
2268
2270
|
};
|
|
2269
|
-
var containerClasses = classNames('hyphen-components__variables__form-control', className, styles$
|
|
2271
|
+
var containerClasses = classNames('hyphen-components__variables__form-control', className, styles$k['radio-container'], responsiveClasses, (_classNames = {}, _classNames[styles$k.hidden] = isHidden, _classNames));
|
|
2270
2272
|
return React__default.createElement(React__default.Fragment, null, option && React__default.createElement(Box, {
|
|
2271
2273
|
className: containerClasses,
|
|
2272
2274
|
key: option.id,
|
|
@@ -2302,9 +2304,9 @@ var RadioInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
2302
2304
|
}), option.label && React__default.createElement(FormLabel, _extends({}, labelProps), option.label)));
|
|
2303
2305
|
});
|
|
2304
2306
|
|
|
2305
|
-
var styles$
|
|
2307
|
+
var styles$j = {"radio-group":"RadioGroup-module_radio-group__FWPcT","fieldset":"RadioGroup-module_fieldset__PEUXI","legend":"RadioGroup-module_legend__tcfV7","description":"RadioGroup-module_description__8fzM-"};
|
|
2306
2308
|
|
|
2307
|
-
var _excluded$
|
|
2309
|
+
var _excluded$r = ["name", "onChange", "options", "className", "description", "direction", "error", "isDisabled", "isRequired", "onBlur", "onFocus", "requiredIndicator", "size", "title", "value"];
|
|
2308
2310
|
var RadioGroup = function RadioGroup(_ref) {
|
|
2309
2311
|
var _classNames;
|
|
2310
2312
|
var name = _ref.name,
|
|
@@ -2334,20 +2336,20 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
2334
2336
|
title = _ref$title === void 0 ? undefined : _ref$title,
|
|
2335
2337
|
_ref$value = _ref.value,
|
|
2336
2338
|
value = _ref$value === void 0 ? undefined : _ref$value,
|
|
2337
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2338
|
-
var groupClasses = classNames('hyphen-components__variables__form-control', className, (_classNames = {}, _classNames[styles$
|
|
2339
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
2340
|
+
var groupClasses = classNames('hyphen-components__variables__form-control', className, (_classNames = {}, _classNames[styles$j.loading] = error, _classNames));
|
|
2339
2341
|
return React__default.createElement("div", _extends({
|
|
2340
|
-
className: classNames(styles$
|
|
2342
|
+
className: classNames(styles$j['radio-group'], groupClasses)
|
|
2341
2343
|
}, restProps), React__default.createElement("fieldset", {
|
|
2342
|
-
className: styles$
|
|
2344
|
+
className: styles$j.fieldset
|
|
2343
2345
|
}, (title || description) && React__default.createElement("legend", {
|
|
2344
|
-
className: styles$
|
|
2346
|
+
className: styles$j.legend
|
|
2345
2347
|
}, title, isRequired && React__default.createElement("span", null, requiredIndicator), description && React__default.createElement("div", {
|
|
2346
|
-
className: styles$
|
|
2348
|
+
className: styles$j.description
|
|
2347
2349
|
}, description)), React__default.createElement(Box, {
|
|
2348
2350
|
direction: direction,
|
|
2349
2351
|
gap: "sm",
|
|
2350
|
-
className: styles$
|
|
2352
|
+
className: styles$j.options
|
|
2351
2353
|
}, options && options.map(function (option) {
|
|
2352
2354
|
return React__default.createElement(RadioInput, {
|
|
2353
2355
|
key: option.id,
|
|
@@ -2364,7 +2366,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
2364
2366
|
}))), error && typeof error !== 'boolean' && React__default.createElement(InputValidationMessage, null, error));
|
|
2365
2367
|
};
|
|
2366
2368
|
|
|
2367
|
-
var _excluded$
|
|
2369
|
+
var _excluded$q = ["field", "form", "onChange", "options"];
|
|
2368
2370
|
var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
2369
2371
|
var _ref$field = _ref.field,
|
|
2370
2372
|
name = _ref$field.name,
|
|
@@ -2376,7 +2378,7 @@ var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
|
2376
2378
|
errors = _ref$form.errors,
|
|
2377
2379
|
onChange = _ref.onChange,
|
|
2378
2380
|
options = _ref.options,
|
|
2379
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2381
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
2380
2382
|
return React__default.createElement(RadioGroup, _extends({}, props, {
|
|
2381
2383
|
options: options,
|
|
2382
2384
|
name: name,
|
|
@@ -2387,9 +2389,9 @@ var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
|
2387
2389
|
}));
|
|
2388
2390
|
};
|
|
2389
2391
|
|
|
2390
|
-
var styles$
|
|
2392
|
+
var styles$i = {"react-select-icon":"SelectInput-module_react-select-icon__PvocB","size-sm":"SelectInput-module_size-sm__PKB-J","size-md":"SelectInput-module_size-md__n9Fj8","size-lg":"SelectInput-module_size-lg__LQ-uG","error":"SelectInput-module_error__Avf98","size-sm-tablet":"SelectInput-module_size-sm-tablet__2Dg01","size-md-tablet":"SelectInput-module_size-md-tablet__-iOSg","size-lg-tablet":"SelectInput-module_size-lg-tablet__9xmuJ","size-sm-desktop":"SelectInput-module_size-sm-desktop__tOWI4","size-md-desktop":"SelectInput-module_size-md-desktop__vo-UC","size-lg-desktop":"SelectInput-module_size-lg-desktop__nxQdj","size-sm-hd":"SelectInput-module_size-sm-hd__qamTH","size-md-hd":"SelectInput-module_size-md-hd__Cf8hk","size-lg-hd":"SelectInput-module_size-lg-hd__E4-mZ","disabled":"SelectInput-module_disabled__4ezAy","select-input-label":"SelectInput-module_select-input-label__eqEYa"};
|
|
2391
2393
|
|
|
2392
|
-
var _excluded$
|
|
2394
|
+
var _excluded$p = ["id", "label", "onChange", "options", "value", "autoFocus", "className", "error", "helpText", "hideLabel", "isClearable", "isAsync", "isCreatable", "isDisabled", "isMulti", "isRequired", "menuPortalTarget", "name", "onFocus", "onBlur", "placeholder", "requiredIndicator", "size"];
|
|
2393
2395
|
function SelectInput(props) {
|
|
2394
2396
|
var _ref, _classNames;
|
|
2395
2397
|
var id = props.id,
|
|
@@ -2432,7 +2434,7 @@ function SelectInput(props) {
|
|
|
2432
2434
|
requiredIndicator = _props$requiredIndica === void 0 ? ' *' : _props$requiredIndica,
|
|
2433
2435
|
_props$size = props.size,
|
|
2434
2436
|
size = _props$size === void 0 ? 'md' : _props$size,
|
|
2435
|
-
restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2437
|
+
restProps = _objectWithoutPropertiesLoose(props, _excluded$p);
|
|
2436
2438
|
var handleChange = function handleChange(values) {
|
|
2437
2439
|
var simulatedEventPayloadType = {
|
|
2438
2440
|
target: {
|
|
@@ -2450,13 +2452,13 @@ function SelectInput(props) {
|
|
|
2450
2452
|
};
|
|
2451
2453
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
2452
2454
|
var wrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', 'select-input-wrapper', className].concat(responsiveClasses.map(function (c) {
|
|
2453
|
-
return styles$
|
|
2454
|
-
}), [(_ref = {}, _ref[styles$
|
|
2455
|
-
var inputClasses = classNames('react-select', (_classNames = {}, _classNames[styles$
|
|
2455
|
+
return styles$i[c];
|
|
2456
|
+
}), [(_ref = {}, _ref[styles$i.disabled] = isDisabled, _ref)]));
|
|
2457
|
+
var inputClasses = classNames('react-select', (_classNames = {}, _classNames[styles$i.error] = error, _classNames));
|
|
2456
2458
|
var labelProps = {
|
|
2457
2459
|
inputId: id,
|
|
2458
2460
|
helpText: helpText,
|
|
2459
|
-
className: styles$
|
|
2461
|
+
className: styles$i['select-input-label'],
|
|
2460
2462
|
isDisabled: isDisabled,
|
|
2461
2463
|
isFieldRequired: isRequired,
|
|
2462
2464
|
requiredIndicator: requiredIndicator
|
|
@@ -2505,7 +2507,7 @@ function SelectInput(props) {
|
|
|
2505
2507
|
})), error && typeof error !== 'boolean' && React__default.createElement(InputValidationMessage, null, error));
|
|
2506
2508
|
}
|
|
2507
2509
|
|
|
2508
|
-
var _excluded$
|
|
2510
|
+
var _excluded$o = ["field", "form", "onChange", "id", "label", "options", "error"];
|
|
2509
2511
|
var FormikSelectInput = function FormikSelectInput(_ref) {
|
|
2510
2512
|
var _ref$field = _ref.field,
|
|
2511
2513
|
name = _ref$field.name,
|
|
@@ -2520,7 +2522,7 @@ var FormikSelectInput = function FormikSelectInput(_ref) {
|
|
|
2520
2522
|
label = _ref.label,
|
|
2521
2523
|
options = _ref.options,
|
|
2522
2524
|
errorProp = _ref.error,
|
|
2523
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2525
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
2524
2526
|
var errorMessage;
|
|
2525
2527
|
var error = errorProp != null ? errorProp : getIn(touched, name) && getIn(errors, name);
|
|
2526
2528
|
if (typeof error === 'string') {
|
|
@@ -2543,7 +2545,7 @@ var FormikSelectInput = function FormikSelectInput(_ref) {
|
|
|
2543
2545
|
}, props));
|
|
2544
2546
|
};
|
|
2545
2547
|
|
|
2546
|
-
var styles$
|
|
2548
|
+
var styles$h = {"text-input-wrapper":"SelectInputInset-module_text-input-wrapper__hZ4Fy","size-md":"SelectInputInset-module_size-md__6MFcV","select-input-label":"SelectInputInset-module_select-input-label__6XdR6","clear-button":"SelectInputInset-module_clear-button__xbZaY","size-lg":"SelectInputInset-module_size-lg__i2Bzf","disabled":"SelectInputInset-module_disabled__DYSr2","size-md-tablet":"SelectInputInset-module_size-md-tablet__xwoPz","size-lg-tablet":"SelectInputInset-module_size-lg-tablet__2DgFa","size-md-desktop":"SelectInputInset-module_size-md-desktop__MfemS","size-lg-desktop":"SelectInputInset-module_size-lg-desktop__etLGJ","size-md-hd":"SelectInputInset-module_size-md-hd__NWb1q","size-lg-hd":"SelectInputInset-module_size-lg-hd__ycjXC","error":"SelectInputInset-module_error__j-jgS"};
|
|
2547
2549
|
|
|
2548
2550
|
var SelectInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
2549
2551
|
var _ref2;
|
|
@@ -2585,10 +2587,10 @@ var SelectInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2585
2587
|
};
|
|
2586
2588
|
var optionsWithPlaceholder = [_extends({}, placeholderOption)].concat(options);
|
|
2587
2589
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
2588
|
-
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$
|
|
2589
|
-
return styles$
|
|
2590
|
-
}), [(_ref2 = {}, _ref2[styles$
|
|
2591
|
-
var clearBtnClasses = classNames(styles$
|
|
2590
|
+
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$h['text-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
2591
|
+
return styles$h[c];
|
|
2592
|
+
}), [(_ref2 = {}, _ref2[styles$h.error] = error, _ref2[styles$h.disabled] = isDisabled, _ref2[styles$h['is-clearable']] = onClear, _ref2)]));
|
|
2593
|
+
var clearBtnClasses = classNames(styles$h['clear-button'], styles$h.md);
|
|
2592
2594
|
var renderClearIcon = function renderClearIcon() {
|
|
2593
2595
|
var handleKeyPress = function handleKeyPress(event) {
|
|
2594
2596
|
if (event.keyCode === 13 && onClear) onClear(event);
|
|
@@ -2643,12 +2645,12 @@ var SelectInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2643
2645
|
}, option.label);
|
|
2644
2646
|
})), !!onClear && !!value && renderClearIcon(), React__default.createElement("label", {
|
|
2645
2647
|
htmlFor: id,
|
|
2646
|
-
className: styles$
|
|
2648
|
+
className: styles$h['select-input-label'],
|
|
2647
2649
|
id: id + "Label"
|
|
2648
2650
|
}, label, isRequired && requiredIndicator && React__default.createElement("span", null, requiredIndicator))), helpText && React__default.createElement(HelpText, null, helpText), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
2649
2651
|
});
|
|
2650
2652
|
|
|
2651
|
-
var _excluded$
|
|
2653
|
+
var _excluded$n = ["field", "form", "onChange", "id", "label", "options"];
|
|
2652
2654
|
var FormikSelectInputInset = function FormikSelectInputInset(_ref) {
|
|
2653
2655
|
var _ref$field = _ref.field,
|
|
2654
2656
|
name = _ref$field.name,
|
|
@@ -2662,7 +2664,7 @@ var FormikSelectInputInset = function FormikSelectInputInset(_ref) {
|
|
|
2662
2664
|
id = _ref.id,
|
|
2663
2665
|
label = _ref.label,
|
|
2664
2666
|
options = _ref.options,
|
|
2665
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2667
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
2666
2668
|
return React__default.createElement(SelectInputInset, _extends({}, props, {
|
|
2667
2669
|
id: id,
|
|
2668
2670
|
label: label,
|
|
@@ -2675,7 +2677,7 @@ var FormikSelectInputInset = function FormikSelectInputInset(_ref) {
|
|
|
2675
2677
|
}));
|
|
2676
2678
|
};
|
|
2677
2679
|
|
|
2678
|
-
var styles$
|
|
2680
|
+
var styles$g = {"text-input-wrapper":"TextareaInputInset-module_text-input-wrapper__0VNFI","size-md":"TextareaInputInset-module_size-md__Hkdpr","text-input-label":"TextareaInputInset-module_text-input-label__yHDss","size-lg":"TextareaInputInset-module_size-lg__wOXof","disabled":"TextareaInputInset-module_disabled__U-Fpa","size-md-tablet":"TextareaInputInset-module_size-md-tablet__KnN-9","size-lg-tablet":"TextareaInputInset-module_size-lg-tablet__oJ0ib","size-md-desktop":"TextareaInputInset-module_size-md-desktop__uBIxD","size-lg-desktop":"TextareaInputInset-module_size-lg-desktop__3qmko","size-md-hd":"TextareaInputInset-module_size-md-hd__6340p","size-lg-hd":"TextareaInputInset-module_size-lg-hd__PtVQT","error":"TextareaInputInset-module_error__sxX-U","textarea-resize-both":"TextareaInputInset-module_textarea-resize-both__53-Ff","textarea-resize-horizontal":"TextareaInputInset-module_textarea-resize-horizontal__X0ibH","textarea-resize-vertical":"TextareaInputInset-module_textarea-resize-vertical__YlsyR","textarea-resize-none":"TextareaInputInset-module_textarea-resize-none__p0eJB"};
|
|
2679
2681
|
|
|
2680
2682
|
var TextareaInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
2681
2683
|
var _ref2, _classNames;
|
|
@@ -2718,9 +2720,9 @@ var TextareaInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2718
2720
|
_ref$type = _ref.type,
|
|
2719
2721
|
type = _ref$type === void 0 ? 'text' : _ref$type;
|
|
2720
2722
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
2721
|
-
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$
|
|
2722
|
-
return styles$
|
|
2723
|
-
}), [(_ref2 = {}, _ref2[styles$
|
|
2723
|
+
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$g['text-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
2724
|
+
return styles$g[c];
|
|
2725
|
+
}), [(_ref2 = {}, _ref2[styles$g.disabled] = isDisabled, _ref2)]));
|
|
2724
2726
|
var computedInputProps = _extends({}, inputProps, {
|
|
2725
2727
|
// These are spread first so that we don't have top level props overwritten by the user.
|
|
2726
2728
|
'aria-required': isRequired,
|
|
@@ -2729,7 +2731,7 @@ var TextareaInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2729
2731
|
'aria-labelledby': label ? id + "Label" : undefined,
|
|
2730
2732
|
autoComplete: getAutoCompleteValue(autoComplete),
|
|
2731
2733
|
autoFocus: autoFocus,
|
|
2732
|
-
className: classNames(styles$
|
|
2734
|
+
className: classNames(styles$g["textarea-resize-" + resize], (_classNames = {}, _classNames[styles$g.error] = error, _classNames)),
|
|
2733
2735
|
disabled: isDisabled,
|
|
2734
2736
|
id: id,
|
|
2735
2737
|
maxLength: maxLength,
|
|
@@ -2755,12 +2757,12 @@ var TextareaInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2755
2757
|
as: "textarea"
|
|
2756
2758
|
}, computedInputProps)), React__default.createElement("label", {
|
|
2757
2759
|
htmlFor: id,
|
|
2758
|
-
className: styles$
|
|
2760
|
+
className: styles$g['text-input-label'],
|
|
2759
2761
|
id: id + "Label"
|
|
2760
2762
|
}, label, isRequired && requiredIndicator && React__default.createElement("span", null, requiredIndicator))), helpText && React__default.createElement(HelpText, null, helpText), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
2761
2763
|
});
|
|
2762
2764
|
|
|
2763
|
-
var _excluded$
|
|
2765
|
+
var _excluded$m = ["field", "form", "onChange", "id", "label"];
|
|
2764
2766
|
var FormikTextareaInputInset = function FormikTextareaInputInset(_ref) {
|
|
2765
2767
|
var _ref$field = _ref.field,
|
|
2766
2768
|
name = _ref$field.name,
|
|
@@ -2773,7 +2775,7 @@ var FormikTextareaInputInset = function FormikTextareaInputInset(_ref) {
|
|
|
2773
2775
|
onChange = _ref.onChange,
|
|
2774
2776
|
id = _ref.id,
|
|
2775
2777
|
label = _ref.label,
|
|
2776
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2778
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
2777
2779
|
return React__default.createElement(TextareaInputInset, _extends({}, props, {
|
|
2778
2780
|
id: id,
|
|
2779
2781
|
label: label,
|
|
@@ -2785,7 +2787,7 @@ var FormikTextareaInputInset = function FormikTextareaInputInset(_ref) {
|
|
|
2785
2787
|
}));
|
|
2786
2788
|
};
|
|
2787
2789
|
|
|
2788
|
-
var styles$
|
|
2790
|
+
var styles$f = {"text-input-wrapper":"TextInputInset-module_text-input-wrapper__qQzOh","size-md":"TextInputInset-module_size-md__Lg91X","label-input-wrapper":"TextInputInset-module_label-input-wrapper__opMsd","text-input-label":"TextInputInset-module_text-input-label__zADJM","prefix":"TextInputInset-module_prefix__i-iby","suffix":"TextInputInset-module_suffix__r9ZnM","clear-button":"TextInputInset-module_clear-button__kV9pf","size-lg":"TextInputInset-module_size-lg__ggigL","disabled":"TextInputInset-module_disabled__udCEB","size-md-tablet":"TextInputInset-module_size-md-tablet__adPUS","size-lg-tablet":"TextInputInset-module_size-lg-tablet__HZTUo","size-md-desktop":"TextInputInset-module_size-md-desktop__Pjze7","size-lg-desktop":"TextInputInset-module_size-lg-desktop__5ov91","size-md-hd":"TextInputInset-module_size-md-hd__jyglU","size-lg-hd":"TextInputInset-module_size-lg-hd__ymgTS","error":"TextInputInset-module_error__LZghB"};
|
|
2789
2791
|
|
|
2790
2792
|
var TextInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
2791
2793
|
var _ref2;
|
|
@@ -2829,10 +2831,10 @@ var TextInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2829
2831
|
_ref$type = _ref.type,
|
|
2830
2832
|
type = _ref$type === void 0 ? 'text' : _ref$type;
|
|
2831
2833
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
2832
|
-
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$
|
|
2833
|
-
return styles$
|
|
2834
|
-
}), [(_ref2 = {}, _ref2[styles$
|
|
2835
|
-
var clearBtnClasses = classNames(styles$
|
|
2834
|
+
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$f['text-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
2835
|
+
return styles$f[c];
|
|
2836
|
+
}), [(_ref2 = {}, _ref2[styles$f.error] = error, _ref2[styles$f.disabled] = isDisabled, _ref2[styles$f['is-clearable']] = onClear, _ref2)]));
|
|
2837
|
+
var clearBtnClasses = classNames(styles$f['clear-button'], styles$f.md);
|
|
2836
2838
|
var renderClearIcon = function renderClearIcon() {
|
|
2837
2839
|
var handleKeyPress = function handleKeyPress(event) {
|
|
2838
2840
|
if (event.keyCode === 13 && onClear) onClear(event);
|
|
@@ -2881,7 +2883,7 @@ var TextInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2881
2883
|
alignItems: "center",
|
|
2882
2884
|
justifyContent: "center",
|
|
2883
2885
|
background: "secondary",
|
|
2884
|
-
className: classNames(styles$
|
|
2886
|
+
className: classNames(styles$f.prefix, 'ws-nowrap')
|
|
2885
2887
|
}, prefix), React__default.createElement(Box, {
|
|
2886
2888
|
direction: "row",
|
|
2887
2889
|
position: "relative",
|
|
@@ -2891,16 +2893,16 @@ var TextInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2891
2893
|
as: "input"
|
|
2892
2894
|
}, computedInputProps)), !!onClear && !!value && renderClearIcon(), React__default.createElement("label", {
|
|
2893
2895
|
htmlFor: id,
|
|
2894
|
-
className: styles$
|
|
2896
|
+
className: styles$f['text-input-label'],
|
|
2895
2897
|
id: id + "Label"
|
|
2896
2898
|
}, label, isRequired && requiredIndicator && React__default.createElement("span", null, requiredIndicator))), suffix && React__default.createElement(Box, {
|
|
2897
2899
|
color: "base",
|
|
2898
2900
|
background: "secondary",
|
|
2899
|
-
className: classNames(styles$
|
|
2901
|
+
className: classNames(styles$f.suffix, 'ws-nowrap')
|
|
2900
2902
|
}, suffix)), helpText && React__default.createElement(HelpText, null, helpText), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
2901
2903
|
});
|
|
2902
2904
|
|
|
2903
|
-
var _excluded$
|
|
2905
|
+
var _excluded$l = ["field", "form", "onChange", "id", "label"];
|
|
2904
2906
|
var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
2905
2907
|
var _ref$field = _ref.field,
|
|
2906
2908
|
name = _ref$field.name,
|
|
@@ -2913,7 +2915,7 @@ var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
|
2913
2915
|
onChange = _ref.onChange,
|
|
2914
2916
|
id = _ref.id,
|
|
2915
2917
|
label = _ref.label,
|
|
2916
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2918
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
2917
2919
|
return React__default.createElement(TextInputInset, _extends({}, props, {
|
|
2918
2920
|
id: id,
|
|
2919
2921
|
label: label,
|
|
@@ -2925,9 +2927,9 @@ var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
|
2925
2927
|
}));
|
|
2926
2928
|
};
|
|
2927
2929
|
|
|
2928
|
-
var styles$
|
|
2930
|
+
var styles$e = {"select-input-native-wrapper":"SelectInputNative-module_select-input-native-wrapper__-vvFm","disabled":"SelectInputNative-module_disabled__gKmV4","size-sm":"SelectInputNative-module_size-sm__7Ql4z","size-md":"SelectInputNative-module_size-md__ofleh","size-lg":"SelectInputNative-module_size-lg__ewS-6","size-sm-tablet":"SelectInputNative-module_size-sm-tablet__3wbFA","size-md-tablet":"SelectInputNative-module_size-md-tablet__nLo2t","size-lg-tablet":"SelectInputNative-module_size-lg-tablet__fLu2T","size-sm-desktop":"SelectInputNative-module_size-sm-desktop__aUL7D","size-md-desktop":"SelectInputNative-module_size-md-desktop__s1uoc","size-lg-desktop":"SelectInputNative-module_size-lg-desktop__Ri2Ka","size-sm-hd":"SelectInputNative-module_size-sm-hd__RVm4G","size-md-hd":"SelectInputNative-module_size-md-hd__m4Rqf","size-lg-hd":"SelectInputNative-module_size-lg-hd__V6i8b","error":"SelectInputNative-module_error__RBOZT","text-input-label":"SelectInputNative-module_text-input-label__-YjDc"};
|
|
2929
2931
|
|
|
2930
|
-
var _excluded$
|
|
2932
|
+
var _excluded$k = ["autoFocus", "label", "hideLabel", "helpText", "error", "id", "isDisabled", "isRequired", "name", "value", "options", "onChange", "placeholder", "requiredIndicator", "size"];
|
|
2931
2933
|
var SelectInputNative = function SelectInputNative(_ref) {
|
|
2932
2934
|
var _ref2;
|
|
2933
2935
|
var _ref$autoFocus = _ref.autoFocus,
|
|
@@ -2949,16 +2951,16 @@ var SelectInputNative = function SelectInputNative(_ref) {
|
|
|
2949
2951
|
requiredIndicator = _ref$requiredIndicato === void 0 ? ' *' : _ref$requiredIndicato,
|
|
2950
2952
|
_ref$size = _ref.size,
|
|
2951
2953
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
2952
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2954
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
2953
2955
|
var placeholderOption = {
|
|
2954
2956
|
value: '',
|
|
2955
2957
|
label: placeholder
|
|
2956
2958
|
};
|
|
2957
2959
|
var optionsWithPlaceholder = [_extends({}, placeholderOption)].concat(options);
|
|
2958
2960
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
2959
|
-
var selectWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$
|
|
2960
|
-
return styles$
|
|
2961
|
-
}), [(_ref2 = {}, _ref2[styles$
|
|
2961
|
+
var selectWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$e['select-input-native-wrapper']].concat(responsiveClasses.map(function (className) {
|
|
2962
|
+
return styles$e[className];
|
|
2963
|
+
}), [(_ref2 = {}, _ref2[styles$e.disabled] = isDisabled, _ref2[styles$e.error] = error, _ref2)]));
|
|
2962
2964
|
return React__default.createElement(FormControl, _extends({
|
|
2963
2965
|
label: label,
|
|
2964
2966
|
hideLabel: hideLabel,
|
|
@@ -2995,7 +2997,7 @@ var SelectInputNative = function SelectInputNative(_ref) {
|
|
|
2995
2997
|
}))));
|
|
2996
2998
|
};
|
|
2997
2999
|
|
|
2998
|
-
var _excluded$
|
|
3000
|
+
var _excluded$j = ["field", "form", "onChange", "options", "id", "label"];
|
|
2999
3001
|
var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
3000
3002
|
var _ref$field = _ref.field,
|
|
3001
3003
|
name = _ref$field.name,
|
|
@@ -3009,7 +3011,7 @@ var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
|
3009
3011
|
options = _ref.options,
|
|
3010
3012
|
id = _ref.id,
|
|
3011
3013
|
label = _ref.label,
|
|
3012
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3014
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
3013
3015
|
return React__default.createElement(SelectInputNative, _extends({}, props, {
|
|
3014
3016
|
options: options,
|
|
3015
3017
|
id: id,
|
|
@@ -3022,7 +3024,7 @@ var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
|
3022
3024
|
}));
|
|
3023
3025
|
};
|
|
3024
3026
|
|
|
3025
|
-
var _excluded$
|
|
3027
|
+
var _excluded$i = ["field", "form", "onChange", "id", "label"];
|
|
3026
3028
|
var FormikTextInput = function FormikTextInput(_ref) {
|
|
3027
3029
|
var _ref$field = _ref.field,
|
|
3028
3030
|
name = _ref$field.name,
|
|
@@ -3035,7 +3037,7 @@ var FormikTextInput = function FormikTextInput(_ref) {
|
|
|
3035
3037
|
onChange = _ref.onChange,
|
|
3036
3038
|
id = _ref.id,
|
|
3037
3039
|
label = _ref.label,
|
|
3038
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3040
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
3039
3041
|
return React__default.createElement(TextInput, _extends({}, props, {
|
|
3040
3042
|
id: id,
|
|
3041
3043
|
label: label,
|
|
@@ -3047,9 +3049,9 @@ var FormikTextInput = function FormikTextInput(_ref) {
|
|
|
3047
3049
|
}));
|
|
3048
3050
|
};
|
|
3049
3051
|
|
|
3050
|
-
var styles$
|
|
3052
|
+
var styles$d = {"textarea-input-wrapper":"TextareaInput-module_textarea-input-wrapper__mJBZN","size-sm":"TextareaInput-module_size-sm__-YCcV","size-md":"TextareaInput-module_size-md__uPOvN","size-lg":"TextareaInput-module_size-lg__P5SYv","size-sm-tablet":"TextareaInput-module_size-sm-tablet__rYP2T","size-md-tablet":"TextareaInput-module_size-md-tablet__D1PYq","size-lg-tablet":"TextareaInput-module_size-lg-tablet__N-UED","size-sm-desktop":"TextareaInput-module_size-sm-desktop__Z-Zdg","size-md-desktop":"TextareaInput-module_size-md-desktop__W3jIm","size-lg-desktop":"TextareaInput-module_size-lg-desktop__XLwk0","size-sm-hd":"TextareaInput-module_size-sm-hd__KP21d","size-md-hd":"TextareaInput-module_size-md-hd__3me0R","size-lg-hd":"TextareaInput-module_size-lg-hd__BcgC-","error":"TextareaInput-module_error__JpCpt","textarea-input-label":"TextareaInput-module_textarea-input-label__1zb77","textarea-resize-both":"TextareaInput-module_textarea-resize-both__Gn3Zh","textarea-resize-horizontal":"TextareaInput-module_textarea-resize-horizontal__0aRED","textarea-resize-vertical":"TextareaInput-module_textarea-resize-vertical__DbKar","textarea-resize-none":"TextareaInput-module_textarea-resize-none__l6dRF"};
|
|
3051
3053
|
|
|
3052
|
-
var _excluded$
|
|
3054
|
+
var _excluded$h = ["id", "label", "onChange", "value", "autoComplete", "autoFocus", "className", "error", "helpText", "hideLabel", "isDisabled", "isRequired", "maxLength", "name", "onBlur", "onFocus", "placeholder", "requiredIndicator", "resize", "rows", "size"];
|
|
3053
3055
|
var TextareaInput = function TextareaInput(_ref) {
|
|
3054
3056
|
var _ref2;
|
|
3055
3057
|
var id = _ref.id,
|
|
@@ -3089,11 +3091,11 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
3089
3091
|
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
3090
3092
|
_ref$size = _ref.size,
|
|
3091
3093
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
3092
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3094
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
3093
3095
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
3094
|
-
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$
|
|
3095
|
-
return styles$
|
|
3096
|
-
}), [(_ref2 = {}, _ref2[styles$
|
|
3096
|
+
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$d['textarea-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
3097
|
+
return styles$d[c];
|
|
3098
|
+
}), [(_ref2 = {}, _ref2[styles$d.error] = error, _ref2[styles$d.disabled] = isDisabled, _ref2)]));
|
|
3097
3099
|
var inputProps = {
|
|
3098
3100
|
'aria-required': isRequired,
|
|
3099
3101
|
'aria-invalid': !!error,
|
|
@@ -3101,7 +3103,7 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
3101
3103
|
'aria-labelledby': label && !hideLabel ? id + "Label" : undefined,
|
|
3102
3104
|
autoComplete: getAutoCompleteValue(autoComplete),
|
|
3103
3105
|
autoFocus: autoFocus,
|
|
3104
|
-
className: classNames(styles$
|
|
3106
|
+
className: classNames(styles$d["textarea-resize-" + resize]),
|
|
3105
3107
|
disabled: isDisabled,
|
|
3106
3108
|
id: id,
|
|
3107
3109
|
maxLength: maxLength,
|
|
@@ -3117,7 +3119,7 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
3117
3119
|
var labelProps = {
|
|
3118
3120
|
inputId: id,
|
|
3119
3121
|
helpText: helpText,
|
|
3120
|
-
className: styles$
|
|
3122
|
+
className: styles$d['textarea-input-label'],
|
|
3121
3123
|
isDisabled: isDisabled,
|
|
3122
3124
|
isFieldRequired: isRequired,
|
|
3123
3125
|
requiredIndicator: requiredIndicator
|
|
@@ -3133,7 +3135,7 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
3133
3135
|
}, inputProps))), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
3134
3136
|
};
|
|
3135
3137
|
|
|
3136
|
-
var _excluded$
|
|
3138
|
+
var _excluded$g = ["field", "form", "onChange", "id", "label"];
|
|
3137
3139
|
var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
3138
3140
|
var _ref$field = _ref.field,
|
|
3139
3141
|
name = _ref$field.name,
|
|
@@ -3146,7 +3148,7 @@ var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
|
3146
3148
|
onChange = _ref.onChange,
|
|
3147
3149
|
id = _ref.id,
|
|
3148
3150
|
label = _ref.label,
|
|
3149
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3151
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
3150
3152
|
return React__default.createElement(TextareaInput, _extends({}, props, {
|
|
3151
3153
|
id: id,
|
|
3152
3154
|
label: label,
|
|
@@ -3158,7 +3160,7 @@ var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
|
3158
3160
|
}));
|
|
3159
3161
|
};
|
|
3160
3162
|
|
|
3161
|
-
var _excluded$
|
|
3163
|
+
var _excluded$f = ["id", "name", "label", "onChange", "value", "dateDisplayOptions", "endTime", "interval", "locales", "placeholder", "startTime"];
|
|
3162
3164
|
var TimePicker = function TimePicker(_ref) {
|
|
3163
3165
|
var id = _ref.id,
|
|
3164
3166
|
name = _ref.name,
|
|
@@ -3180,7 +3182,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
3180
3182
|
placeholder = _ref$placeholder === void 0 ? 'HH:MM' : _ref$placeholder,
|
|
3181
3183
|
_ref$startTime = _ref.startTime,
|
|
3182
3184
|
startTime = _ref$startTime === void 0 ? undefined : _ref$startTime,
|
|
3183
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3185
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
3184
3186
|
var generateTimes = function generateTimes() {
|
|
3185
3187
|
var first = new Date();
|
|
3186
3188
|
first.setHours((startTime == null ? void 0 : startTime.hour) || 0, (startTime == null ? void 0 : startTime.minute) || 0, 0, 0);
|
|
@@ -3208,7 +3210,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
3208
3210
|
}));
|
|
3209
3211
|
};
|
|
3210
3212
|
|
|
3211
|
-
var _excluded$
|
|
3213
|
+
var _excluded$e = ["field", "form", "options", "onChange"];
|
|
3212
3214
|
var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
3213
3215
|
var _ref$field = _ref.field,
|
|
3214
3216
|
name = _ref$field.name,
|
|
@@ -3220,7 +3222,7 @@ var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
|
3220
3222
|
errors = _ref$form.errors,
|
|
3221
3223
|
options = _ref.options,
|
|
3222
3224
|
onChange = _ref.onChange,
|
|
3223
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3225
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
3224
3226
|
return React__default.createElement(TimePicker, _extends({}, props, {
|
|
3225
3227
|
name: name,
|
|
3226
3228
|
onBlur: onBlur,
|
|
@@ -3231,7 +3233,7 @@ var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
|
3231
3233
|
}));
|
|
3232
3234
|
};
|
|
3233
3235
|
|
|
3234
|
-
var _excluded$
|
|
3236
|
+
var _excluded$d = ["id", "name", "label", "onChange", "value", "dateDisplayOptions", "endTime", "interval", "locales", "placeholder", "startTime"];
|
|
3235
3237
|
var TimePickerNative = function TimePickerNative(_ref) {
|
|
3236
3238
|
var id = _ref.id,
|
|
3237
3239
|
name = _ref.name,
|
|
@@ -3253,7 +3255,7 @@ var TimePickerNative = function TimePickerNative(_ref) {
|
|
|
3253
3255
|
placeholder = _ref$placeholder === void 0 ? 'HH:MM' : _ref$placeholder,
|
|
3254
3256
|
_ref$startTime = _ref.startTime,
|
|
3255
3257
|
startTime = _ref$startTime === void 0 ? undefined : _ref$startTime,
|
|
3256
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3258
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
3257
3259
|
var generateTimes = function generateTimes() {
|
|
3258
3260
|
var first = new Date();
|
|
3259
3261
|
first.setHours((startTime == null ? void 0 : startTime.hour) || 0, (startTime == null ? void 0 : startTime.minute) || 0, 0, 0);
|
|
@@ -3282,7 +3284,7 @@ var TimePickerNative = function TimePickerNative(_ref) {
|
|
|
3282
3284
|
}));
|
|
3283
3285
|
};
|
|
3284
3286
|
|
|
3285
|
-
var _excluded$
|
|
3287
|
+
var _excluded$c = ["field", "form", "onChange"];
|
|
3286
3288
|
var FormikTimePickerNative = function FormikTimePickerNative(_ref) {
|
|
3287
3289
|
var _ref$field = _ref.field,
|
|
3288
3290
|
name = _ref$field.name,
|
|
@@ -3293,7 +3295,7 @@ var FormikTimePickerNative = function FormikTimePickerNative(_ref) {
|
|
|
3293
3295
|
touched = _ref$form.touched,
|
|
3294
3296
|
errors = _ref$form.errors,
|
|
3295
3297
|
onChange = _ref.onChange,
|
|
3296
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3298
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
3297
3299
|
return React__default.createElement(TimePickerNative, _extends({}, props, {
|
|
3298
3300
|
name: name,
|
|
3299
3301
|
onBlur: onBlur,
|
|
@@ -3303,9 +3305,9 @@ var FormikTimePickerNative = function FormikTimePickerNative(_ref) {
|
|
|
3303
3305
|
}));
|
|
3304
3306
|
};
|
|
3305
3307
|
|
|
3306
|
-
var styles$
|
|
3308
|
+
var styles$c = {"thumb-size-sm":"Switch-module_thumb-size-sm__0cIei","thumb-size-md":"Switch-module_thumb-size-md__wB9aa","thumb-size-lg":"Switch-module_thumb-size-lg__sD9d9","track-size-sm":"Switch-module_track-size-sm__6dGMb","track-size-md":"Switch-module_track-size-md__XXrdH","track-size-lg":"Switch-module_track-size-lg__Rm3qX","thumb-size-sm-tablet":"Switch-module_thumb-size-sm-tablet__kMoMh","thumb-size-md-tablet":"Switch-module_thumb-size-md-tablet__xWxiX","thumb-size-lg-tablet":"Switch-module_thumb-size-lg-tablet__sFOqF","track-size-sm-tablet":"Switch-module_track-size-sm-tablet__iaxm-","track-size-md-tablet":"Switch-module_track-size-md-tablet__UJUGh","track-size-lg-tablet":"Switch-module_track-size-lg-tablet__Azrsy","thumb-size-sm-desktop":"Switch-module_thumb-size-sm-desktop__8HEdQ","thumb-size-md-desktop":"Switch-module_thumb-size-md-desktop__Zc9eN","thumb-size-lg-desktop":"Switch-module_thumb-size-lg-desktop__nctEB","track-size-sm-desktop":"Switch-module_track-size-sm-desktop__M4yd-","track-size-md-desktop":"Switch-module_track-size-md-desktop__4PYHn","track-size-lg-desktop":"Switch-module_track-size-lg-desktop__3fzJY","thumb-size-sm-hd":"Switch-module_thumb-size-sm-hd__No76h","thumb-size-md-hd":"Switch-module_thumb-size-md-hd__3MR-O","thumb-size-lg-hd":"Switch-module_thumb-size-lg-hd__4AQ8O","track-size-sm-hd":"Switch-module_track-size-sm-hd__gQTpP","track-size-md-hd":"Switch-module_track-size-md-hd__JOSCe","track-size-lg-hd":"Switch-module_track-size-lg-hd__CBQq3","disabled":"Switch-module_disabled__VeSGJ","switch-thumb":"Switch-module_switch-thumb__bTWJz","switch-track":"Switch-module_switch-track__rAmhp","error":"Switch-module_error__OBYv6","switch-input":"Switch-module_switch-input__oQwtt"};
|
|
3307
3309
|
|
|
3308
|
-
var
|
|
3310
|
+
var Switch = function Switch(_ref) {
|
|
3309
3311
|
var _classNames, _ref2;
|
|
3310
3312
|
var id = _ref.id,
|
|
3311
3313
|
isChecked = _ref.isChecked,
|
|
@@ -3339,12 +3341,12 @@ var Toggle = function Toggle(_ref) {
|
|
|
3339
3341
|
var handleFocus = function handleFocus(event) {
|
|
3340
3342
|
if (onFocus) onFocus(event);
|
|
3341
3343
|
};
|
|
3342
|
-
var wrapperClasses = classNames('hyphen-components__variables__form-control', (_classNames = {}, _classNames[styles$
|
|
3343
|
-
var trackClasses = classNames.apply(void 0, [styles$
|
|
3344
|
-
return styles$
|
|
3345
|
-
}), [(_ref2 = {}, _ref2[styles$
|
|
3346
|
-
var thumbClasses = classNames.apply(void 0, [styles$
|
|
3347
|
-
return styles$
|
|
3344
|
+
var wrapperClasses = classNames('hyphen-components__variables__form-control', (_classNames = {}, _classNames[styles$c.disabled] = isDisabled, _classNames));
|
|
3345
|
+
var trackClasses = classNames.apply(void 0, [styles$c['switch-track']].concat(generateResponsiveClasses('track-size', size).map(function (c) {
|
|
3346
|
+
return styles$c[c];
|
|
3347
|
+
}), [(_ref2 = {}, _ref2[styles$c.error] = error, _ref2)]));
|
|
3348
|
+
var thumbClasses = classNames.apply(void 0, [styles$c['switch-thumb']].concat(generateResponsiveClasses('thumb-size', size).map(function (c) {
|
|
3349
|
+
return styles$c[c];
|
|
3348
3350
|
})));
|
|
3349
3351
|
var inputProps = {
|
|
3350
3352
|
'aria-required': isRequired,
|
|
@@ -3359,7 +3361,7 @@ var Toggle = function Toggle(_ref) {
|
|
|
3359
3361
|
onFocus: handleFocus,
|
|
3360
3362
|
required: isRequired,
|
|
3361
3363
|
type: 'checkbox',
|
|
3362
|
-
className: styles$
|
|
3364
|
+
className: styles$c['switch-input']
|
|
3363
3365
|
};
|
|
3364
3366
|
var labelProps = {
|
|
3365
3367
|
inputId: id,
|
|
@@ -3379,10 +3381,10 @@ var Toggle = function Toggle(_ref) {
|
|
|
3379
3381
|
}, React__default.createElement(FormLabel, _extends({}, labelProps), React__default.createElement("input", _extends({}, inputProps)), React__default.createElement("span", {
|
|
3380
3382
|
"aria-hidden": "true",
|
|
3381
3383
|
className: trackClasses,
|
|
3382
|
-
"data-testid": "
|
|
3384
|
+
"data-testid": "switchTrack"
|
|
3383
3385
|
}, React__default.createElement("span", {
|
|
3384
3386
|
className: thumbClasses,
|
|
3385
|
-
"data-testid": "
|
|
3387
|
+
"data-testid": "switchThumb"
|
|
3386
3388
|
})), !hideLabel && React__default.createElement(Box, {
|
|
3387
3389
|
gap: "2xs",
|
|
3388
3390
|
className: helpText && (size === 'md' || size === 'lg') ? 'm-top-2xs' : ''
|
|
@@ -3395,8 +3397,8 @@ var Toggle = function Toggle(_ref) {
|
|
|
3395
3397
|
}, helpText)))), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
3396
3398
|
};
|
|
3397
3399
|
|
|
3398
|
-
var _excluded$
|
|
3399
|
-
var
|
|
3400
|
+
var _excluded$b = ["field", "form"];
|
|
3401
|
+
var FormikSwitch = function FormikSwitch(_ref) {
|
|
3400
3402
|
var _ref$field = _ref.field,
|
|
3401
3403
|
name = _ref$field.name,
|
|
3402
3404
|
onBlur = _ref$field.onBlur,
|
|
@@ -3405,8 +3407,8 @@ var FormikToggle = function FormikToggle(_ref) {
|
|
|
3405
3407
|
_ref$form = _ref.form,
|
|
3406
3408
|
touched = _ref$form.touched,
|
|
3407
3409
|
errors = _ref$form.errors,
|
|
3408
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3409
|
-
return React__default.createElement(
|
|
3410
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
3411
|
+
return React__default.createElement(Switch, _extends({
|
|
3410
3412
|
error: getIn(touched, name) && getIn(errors, name),
|
|
3411
3413
|
isChecked: value,
|
|
3412
3414
|
onBlur: onBlur,
|
|
@@ -3414,7 +3416,80 @@ var FormikToggle = function FormikToggle(_ref) {
|
|
|
3414
3416
|
}, props));
|
|
3415
3417
|
};
|
|
3416
3418
|
|
|
3417
|
-
var
|
|
3419
|
+
var styles$b = {"item":"ToggleGroup-module_item__dIBO0","outline":"ToggleGroup-module_outline__d5OlO"};
|
|
3420
|
+
|
|
3421
|
+
var _excluded$a = ["className", "variant", "children", "gap", "error"],
|
|
3422
|
+
_excluded2$1 = ["className", "children", "value", "variant"];
|
|
3423
|
+
var ToggleGroupContext = /*#__PURE__*/createContext({
|
|
3424
|
+
variant: 'default'
|
|
3425
|
+
});
|
|
3426
|
+
var ToggleGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3427
|
+
var className = _ref.className,
|
|
3428
|
+
_ref$variant = _ref.variant,
|
|
3429
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
3430
|
+
children = _ref.children,
|
|
3431
|
+
_ref$gap = _ref.gap,
|
|
3432
|
+
gap = _ref$gap === void 0 ? 'xs' : _ref$gap,
|
|
3433
|
+
error = _ref.error,
|
|
3434
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
3435
|
+
return React__default.createElement("div", null, React__default.createElement(ToggleGroupPrimitive.Root, _extends({
|
|
3436
|
+
ref: ref,
|
|
3437
|
+
className: classNames('display-flex align-items-center justify-content-start', className, cssShorthandToClasses('g', gap))
|
|
3438
|
+
}, props), React__default.createElement(ToggleGroupContext.Provider, {
|
|
3439
|
+
value: {
|
|
3440
|
+
variant: variant
|
|
3441
|
+
}
|
|
3442
|
+
}, children)), error && React__default.createElement(InputValidationMessage, null, error));
|
|
3443
|
+
});
|
|
3444
|
+
var ToggleGroupItem = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
3445
|
+
var className = _ref2.className,
|
|
3446
|
+
children = _ref2.children,
|
|
3447
|
+
value = _ref2.value,
|
|
3448
|
+
variant = _ref2.variant,
|
|
3449
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
|
|
3450
|
+
var _useContext = useContext(ToggleGroupContext),
|
|
3451
|
+
contextVariant = _useContext.variant;
|
|
3452
|
+
var appliedVariant = variant || contextVariant;
|
|
3453
|
+
return React__default.createElement(ToggleGroupPrimitive.Item, _extends({
|
|
3454
|
+
ref: ref,
|
|
3455
|
+
className: classNames(styles$b.item, appliedVariant === 'outline' && styles$b.outline, className),
|
|
3456
|
+
value: value
|
|
3457
|
+
}, props), children);
|
|
3458
|
+
});
|
|
3459
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
3460
|
+
|
|
3461
|
+
var _excluded$9 = ["field", "form", "options"];
|
|
3462
|
+
var FormikToggleGroup = function FormikToggleGroup(_ref) {
|
|
3463
|
+
var _ref$field = _ref.field,
|
|
3464
|
+
name = _ref$field.name,
|
|
3465
|
+
onBlur = _ref$field.onBlur,
|
|
3466
|
+
value = _ref$field.value,
|
|
3467
|
+
_ref$form = _ref.form,
|
|
3468
|
+
touched = _ref$form.touched,
|
|
3469
|
+
errors = _ref$form.errors,
|
|
3470
|
+
setFieldValue = _ref$form.setFieldValue,
|
|
3471
|
+
options = _ref.options,
|
|
3472
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
3473
|
+
console.log(getIn(touched, name), getIn(errors, name));
|
|
3474
|
+
return React__default.createElement(ToggleGroup, _extends({}, props, {
|
|
3475
|
+
name: name,
|
|
3476
|
+
onBlur: onBlur,
|
|
3477
|
+
onValueChange: function onValueChange(value) {
|
|
3478
|
+
return setFieldValue(name, value);
|
|
3479
|
+
},
|
|
3480
|
+
value: value,
|
|
3481
|
+
error: getIn(touched, name) && getIn(errors, name),
|
|
3482
|
+
type: "single"
|
|
3483
|
+
}), options.map(function (option) {
|
|
3484
|
+
return React__default.createElement(ToggleGroupItem, {
|
|
3485
|
+
value: option.value,
|
|
3486
|
+
key: option.id,
|
|
3487
|
+
disabled: !!option.disabled
|
|
3488
|
+
}, option.label);
|
|
3489
|
+
}));
|
|
3490
|
+
};
|
|
3491
|
+
|
|
3492
|
+
var _excluded$8 = ["children", "padding", "direction", "alignItems", "justifyContent", "gap", "style"];
|
|
3418
3493
|
var ModalFooter = function ModalFooter(_ref) {
|
|
3419
3494
|
var children = _ref.children,
|
|
3420
3495
|
padding = _ref.padding,
|
|
@@ -3427,7 +3502,7 @@ var ModalFooter = function ModalFooter(_ref) {
|
|
|
3427
3502
|
_ref$gap = _ref.gap,
|
|
3428
3503
|
gap = _ref$gap === void 0 ? 'md' : _ref$gap,
|
|
3429
3504
|
style = _ref.style,
|
|
3430
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3505
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
3431
3506
|
return React__default.createElement(Box, _extends({
|
|
3432
3507
|
padding: padding,
|
|
3433
3508
|
direction: direction,
|
|
@@ -3471,7 +3546,7 @@ var ModalHeader = function ModalHeader(_ref) {
|
|
|
3471
3546
|
}));
|
|
3472
3547
|
};
|
|
3473
3548
|
|
|
3474
|
-
var _excluded$
|
|
3549
|
+
var _excluded$7 = ["children", "flex", "overflow", "height"];
|
|
3475
3550
|
var ModalBody = function ModalBody(_ref) {
|
|
3476
3551
|
var children = _ref.children,
|
|
3477
3552
|
_ref$flex = _ref.flex,
|
|
@@ -3480,7 +3555,7 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
3480
3555
|
overflow = _ref$overflow === void 0 ? 'auto' : _ref$overflow,
|
|
3481
3556
|
_ref$height = _ref.height,
|
|
3482
3557
|
height = _ref$height === void 0 ? '100' : _ref$height,
|
|
3483
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3558
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
3484
3559
|
return React__default.createElement(Box, _extends({
|
|
3485
3560
|
flex: flex,
|
|
3486
3561
|
overflow: overflow,
|
|
@@ -3491,9 +3566,9 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
3491
3566
|
}, restProps), children);
|
|
3492
3567
|
};
|
|
3493
3568
|
|
|
3494
|
-
var styles$
|
|
3569
|
+
var styles$a = {"modal-close":"Modal-module_modal-close__1YmMa","modal":"Modal-module_modal__yNG-7","modal-content":"Modal-module_modal-content__GMtBm"};
|
|
3495
3570
|
|
|
3496
|
-
var _excluded$
|
|
3571
|
+
var _excluded$6 = ["ariaLabel", "ariaLabelledBy", "allowPinchZoom", "children", "className", "containerRef", "fullScreenMobile", "initialFocusRef", "isOpen", "maxWidth", "onDismiss", "overflow"];
|
|
3497
3572
|
var ModalBaseComponent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3498
3573
|
var _classNames;
|
|
3499
3574
|
var ariaLabel = _ref.ariaLabel,
|
|
@@ -3513,7 +3588,7 @@ var ModalBaseComponent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3513
3588
|
onDismiss = _ref.onDismiss,
|
|
3514
3589
|
_ref$overflow = _ref.overflow,
|
|
3515
3590
|
overflow = _ref$overflow === void 0 ? 'hidden' : _ref$overflow,
|
|
3516
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3591
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
3517
3592
|
var activateFocusLock = useCallback(function () {
|
|
3518
3593
|
setTimeout(function () {
|
|
3519
3594
|
if (initialFocusRef && initialFocusRef.current) {
|
|
@@ -3522,10 +3597,10 @@ var ModalBaseComponent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3522
3597
|
}, 100);
|
|
3523
3598
|
}, [initialFocusRef]);
|
|
3524
3599
|
var maxWidthCss = getDimensionCss('mw', maxWidth);
|
|
3525
|
-
var overlayClassnames = classNames(styles$
|
|
3600
|
+
var overlayClassnames = classNames(styles$a.overlay, styles$a.modal, {
|
|
3526
3601
|
fullscreen: fullScreenMobile
|
|
3527
3602
|
});
|
|
3528
|
-
var contentClassnames = classNames(styles$
|
|
3603
|
+
var contentClassnames = classNames(styles$a['modal-content'], className, maxWidthCss.classes, (_classNames = {}, _classNames["overflow-" + overflow] = overflow, _classNames));
|
|
3529
3604
|
if (!isOpen) return null;
|
|
3530
3605
|
var parentElement = containerRef != null && containerRef.current ? containerRef.current : undefined;
|
|
3531
3606
|
return React__default.createElement(FocusLock, {
|
|
@@ -3737,9 +3812,9 @@ var Pagination = function Pagination(_ref) {
|
|
|
3737
3812
|
}, isTotalVisible && activeListRangeText));
|
|
3738
3813
|
};
|
|
3739
3814
|
|
|
3740
|
-
var styles$
|
|
3815
|
+
var styles$9 = {"slider":"RangeInput-module_slider__Z6D68","disabled":"RangeInput-module_disabled__gyu72"};
|
|
3741
3816
|
|
|
3742
|
-
var _excluded$
|
|
3817
|
+
var _excluded$5 = ["value", "max", "id", "onChange", "className", "isDisabled"];
|
|
3743
3818
|
var RangeInput = function RangeInput(_ref) {
|
|
3744
3819
|
var _classNames;
|
|
3745
3820
|
var _ref$value = _ref.value,
|
|
@@ -3751,7 +3826,7 @@ var RangeInput = function RangeInput(_ref) {
|
|
|
3751
3826
|
className = _ref.className,
|
|
3752
3827
|
_ref$isDisabled = _ref.isDisabled,
|
|
3753
3828
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
3754
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3829
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
3755
3830
|
var currentProgress = value > 0 ? value / max * 100 : 0;
|
|
3756
3831
|
return React__default.createElement("input", _extends({}, restProps, {
|
|
3757
3832
|
id: id,
|
|
@@ -3762,7 +3837,7 @@ var RangeInput = function RangeInput(_ref) {
|
|
|
3762
3837
|
"aria-valuemax": max,
|
|
3763
3838
|
"aria-valuenow": value,
|
|
3764
3839
|
"aria-label": "range input",
|
|
3765
|
-
className: classNames(styles$
|
|
3840
|
+
className: classNames(styles$9.slider, className, (_classNames = {}, _classNames[styles$9.disabled] = isDisabled, _classNames)),
|
|
3766
3841
|
onChange: onChange,
|
|
3767
3842
|
disabled: isDisabled,
|
|
3768
3843
|
style: {
|
|
@@ -3852,9 +3927,9 @@ function useIsMobile() {
|
|
|
3852
3927
|
return !!isMobile;
|
|
3853
3928
|
}
|
|
3854
3929
|
|
|
3855
|
-
var styles$
|
|
3930
|
+
var styles$8 = {"rail":"Sidebar-module_rail__nWu0Q"};
|
|
3856
3931
|
|
|
3857
|
-
var _excluded$
|
|
3932
|
+
var _excluded$4 = ["defaultOpen", "open", "onOpenChange", "className", "style", "children"],
|
|
3858
3933
|
_excluded2 = ["side", "collapsible", "className", "children"],
|
|
3859
3934
|
_excluded3 = ["className", "onClick"],
|
|
3860
3935
|
_excluded4 = ["className"],
|
|
@@ -3892,7 +3967,7 @@ var SidebarProvider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3892
3967
|
className = _ref.className,
|
|
3893
3968
|
style = _ref.style,
|
|
3894
3969
|
children = _ref.children,
|
|
3895
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3970
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
3896
3971
|
var isMobile = useIsMobile();
|
|
3897
3972
|
var _useState = useState(function () {
|
|
3898
3973
|
return isMobile ? false : openProp != null ? openProp : defaultOpen;
|
|
@@ -4243,7 +4318,7 @@ var SidebarRail = /*#__PURE__*/React__default.forwardRef(function (_ref17, ref)
|
|
|
4243
4318
|
tabIndex: -1,
|
|
4244
4319
|
onClick: toggleSidebar,
|
|
4245
4320
|
title: "Toggle Sidebar [",
|
|
4246
|
-
className: classNames(styles$
|
|
4321
|
+
className: classNames(styles$8.rail, 'hover-show-child background-color-transparent display-flex p-top-5xl p-left-xl p-right-0 justify-content-center position-absolute', {
|
|
4247
4322
|
'cursor-w-resize': open,
|
|
4248
4323
|
'cursor-e-resize': !open
|
|
4249
4324
|
}, className),
|
|
@@ -4289,13 +4364,13 @@ var SidebarMenuBadge = /*#__PURE__*/React__default.forwardRef(function (_ref18,
|
|
|
4289
4364
|
});
|
|
4290
4365
|
SidebarMenuBadge.displayName = 'SidebarMenuBadge';
|
|
4291
4366
|
|
|
4292
|
-
var styles$
|
|
4367
|
+
var styles$7 = {"container":"Table-module_container__BsXT7","loading-mask":"Table-module_loading-mask__qoRPG","scroll-container":"Table-module_scroll-container__5WV5T","table":"Table-module_table__-ZPCW","auto":"Table-module_auto__1R8wm","fixed":"Table-module_fixed__T-EXg","borderless":"Table-module_borderless__BbsqE","scrollable":"Table-module_scrollable__Apjbs","scrollable-x":"Table-module_scrollable-x__mguJX","scrollable-y":"Table-module_scrollable-y__292qB","table-bordered":"Table-module_table-bordered__wM9u-","full-height":"Table-module_full-height__MlrSg"};
|
|
4293
4368
|
|
|
4294
|
-
var styles$
|
|
4369
|
+
var styles$6 = {"table-body":"TableBody-module_table-body__Y5WbD","striped":"TableBody-module_striped__5MlEr","hover":"TableBody-module_hover__2CRgY"};
|
|
4295
4370
|
|
|
4296
|
-
var styles$
|
|
4371
|
+
var styles$5 = {"table-row":"TableRow-module_table-row__-Y9FQ","hoverable":"TableRow-module_hoverable__53-l9"};
|
|
4297
4372
|
|
|
4298
|
-
var styles$
|
|
4373
|
+
var styles$4 = {"table-cell":"TableBodyCell-module_table-cell__pKl29","borderless":"TableBodyCell-module_borderless__qwKQA","compact":"TableBodyCell-module_compact__zfdBf","truncated":"TableBodyCell-module_truncated__4YtPF","sticky-column-left":"TableBodyCell-module_sticky-column-left__tKIGW","sticky-column-right":"TableBodyCell-module_sticky-column-right__680hS","sticky-column":"TableBodyCell-module_sticky-column__QpEbV","align-right":"TableBodyCell-module_align-right__j-VqN","align-center":"TableBodyCell-module_align-center__saqzC"};
|
|
4299
4374
|
|
|
4300
4375
|
var TableBodyCell = function TableBodyCell(_ref) {
|
|
4301
4376
|
var _classNames;
|
|
@@ -4318,7 +4393,7 @@ var TableBodyCell = function TableBodyCell(_ref) {
|
|
|
4318
4393
|
_ref$width = _ref.width,
|
|
4319
4394
|
width = _ref$width === void 0 ? undefined : _ref$width;
|
|
4320
4395
|
var columnIsSticky = sticky === 'left' || sticky === 'right';
|
|
4321
|
-
var tableCellClasses = classNames(styles$
|
|
4396
|
+
var tableCellClasses = classNames(styles$4['table-cell'], (_classNames = {}, _classNames[styles$4.truncated] = truncateOverflow, _classNames[styles$4.compact] = isCompact, _classNames[styles$4.borderless] = isBorderless, _classNames[styles$4['sticky-column']] = columnIsSticky, _classNames[styles$4['sticky-column-left']] = sticky === 'left', _classNames[styles$4['sticky-column-right']] = sticky === 'right', _classNames[styles$4['align-right']] = align === 'right', _classNames[styles$4['align-center']] = align === 'center', _classNames), className);
|
|
4322
4397
|
return React__default.createElement(Box, {
|
|
4323
4398
|
as: columnIsSticky ? 'th' : 'td',
|
|
4324
4399
|
className: tableCellClasses,
|
|
@@ -4332,7 +4407,7 @@ var TableBodyCell = function TableBodyCell(_ref) {
|
|
|
4332
4407
|
}, children === null || typeof children === 'undefined' || children === '' ? emptyCellPlaceholder : children);
|
|
4333
4408
|
};
|
|
4334
4409
|
|
|
4335
|
-
var styles$
|
|
4410
|
+
var styles$3 = {"table-header-cell":"TableHeaderCell-module_table-header-cell__aufSm","sortable":"TableHeaderCell-module_sortable__qjrkY","borderless":"TableHeaderCell-module_borderless__uos2k","truncated":"TableHeaderCell-module_truncated__wmNfw","compact":"TableHeaderCell-module_compact__ujtrZ","sticky-header":"TableHeaderCell-module_sticky-header__PEP9t","sticky-column-left":"TableHeaderCell-module_sticky-column-left__t8qIz","sticky-column-right":"TableHeaderCell-module_sticky-column-right__6D8-X","sticky-column":"TableHeaderCell-module_sticky-column__g9ybV","align-right":"TableHeaderCell-module_align-right__Qw0YQ","align-center":"TableHeaderCell-module_align-center__1RmCS","heading":"TableHeaderCell-module_heading__fEcYT","sort-icon":"TableHeaderCell-module_sort-icon__SHgic"};
|
|
4336
4411
|
|
|
4337
4412
|
// eslint-disable-line import/prefer-default-export
|
|
4338
4413
|
var TableHeaderCell = function TableHeaderCell(_ref) {
|
|
@@ -4391,7 +4466,7 @@ var TableHeaderCell = function TableHeaderCell(_ref) {
|
|
|
4391
4466
|
});
|
|
4392
4467
|
};
|
|
4393
4468
|
return React__default.createElement("span", {
|
|
4394
|
-
className: styles$
|
|
4469
|
+
className: styles$3['sort-icon']
|
|
4395
4470
|
}, renderArrows());
|
|
4396
4471
|
};
|
|
4397
4472
|
var handleKeyPress = function handleKeyPress(event) {
|
|
@@ -4412,7 +4487,7 @@ var TableHeaderCell = function TableHeaderCell(_ref) {
|
|
|
4412
4487
|
});
|
|
4413
4488
|
onSort(eventWithKey);
|
|
4414
4489
|
};
|
|
4415
|
-
var tableHeaderClasses = classNames(styles$
|
|
4490
|
+
var tableHeaderClasses = classNames(styles$3['table-header-cell'], (_classNames = {}, _classNames[styles$3.sortable] = isSortable, _classNames[styles$3.compact] = isCompact, _classNames[styles$3.truncated] = truncateOverflow, _classNames[styles$3.borderless] = isBorderless, _classNames[styles$3['sticky-header']] = hasStickyHeader, _classNames[styles$3['sticky-column']] = sticky === 'left' || sticky === 'right', _classNames[styles$3['sticky-column-left']] = sticky === 'left', _classNames[styles$3['sticky-column-right']] = sticky === 'right', _classNames[styles$3['align-right']] = align === 'right', _classNames[styles$3['align-center']] = align === 'center', _classNames), className);
|
|
4416
4491
|
return React__default.createElement(Box, {
|
|
4417
4492
|
as: "th",
|
|
4418
4493
|
display: "table-cell",
|
|
@@ -4424,7 +4499,7 @@ var TableHeaderCell = function TableHeaderCell(_ref) {
|
|
|
4424
4499
|
onKeyDown: handleKeyPress,
|
|
4425
4500
|
scope: "col"
|
|
4426
4501
|
}, React__default.createElement("div", {
|
|
4427
|
-
className: styles$
|
|
4502
|
+
className: styles$3.heading
|
|
4428
4503
|
}, column.heading, isSortable && renderIcon()));
|
|
4429
4504
|
};
|
|
4430
4505
|
|
|
@@ -4457,7 +4532,7 @@ var TableRow = function TableRow(_ref) {
|
|
|
4457
4532
|
rowIndex = _ref$rowIndex === void 0 ? undefined : _ref$rowIndex,
|
|
4458
4533
|
_ref$truncateOverflow = _ref.truncateOverflow,
|
|
4459
4534
|
truncateOverflow = _ref$truncateOverflow === void 0 ? false : _ref$truncateOverflow;
|
|
4460
|
-
var tableRowClasses = classNames(styles$
|
|
4535
|
+
var tableRowClasses = classNames(styles$5['table-row'], (_classNames = {}, _classNames[styles$5.hoverable] = isHoverable, _classNames), className);
|
|
4461
4536
|
var renderCellContent = function renderCellContent(column) {
|
|
4462
4537
|
if (column.render) {
|
|
4463
4538
|
var cellValue = column.dataKey && row ? row[column.dataKey] : undefined;
|
|
@@ -4526,7 +4601,7 @@ var TableBody = function TableBody(_ref) {
|
|
|
4526
4601
|
isStriped = _ref$isStriped === void 0 ? false : _ref$isStriped,
|
|
4527
4602
|
_ref$truncateOverflow = _ref.truncateOverflow,
|
|
4528
4603
|
truncateOverflow = _ref$truncateOverflow === void 0 ? false : _ref$truncateOverflow;
|
|
4529
|
-
var tableBodyClasses = classNames(styles$
|
|
4604
|
+
var tableBodyClasses = classNames(styles$6['table-body'], (_classNames = {}, _classNames[styles$6.striped] = isStriped, _classNames[styles$6.hover] = hoverableRows, _classNames), className);
|
|
4530
4605
|
return React__default.createElement("tbody", {
|
|
4531
4606
|
className: tableBodyClasses
|
|
4532
4607
|
}, rows.map(function (row, rowIndex) {
|
|
@@ -4611,13 +4686,13 @@ var Table = function Table(_ref) {
|
|
|
4611
4686
|
useFixedTableLayout = _ref$useFixedTableLay === void 0 ? false : _ref$useFixedTableLay,
|
|
4612
4687
|
_ref$truncateOverflow = _ref.truncateOverflow,
|
|
4613
4688
|
truncateOverflow = _ref$truncateOverflow === void 0 ? false : _ref$truncateOverflow;
|
|
4614
|
-
var containerClasses = classNames(styles$
|
|
4615
|
-
var scrollContainerClasses = classNames(styles$
|
|
4616
|
-
var tableClasses = classNames(styles$
|
|
4689
|
+
var containerClasses = classNames(styles$7.container, (_classNames = {}, _classNames[styles$7['full-height']] = !!(isScrollable != null && isScrollable.y), _classNames));
|
|
4690
|
+
var scrollContainerClasses = classNames(styles$7['scroll-container'], (_classNames2 = {}, _classNames2[styles$7.scrollable] = !!(isScrollable != null && isScrollable.x) || !!(isScrollable != null && isScrollable.y), _classNames2[styles$7['scrollable-x']] = !!(isScrollable != null && isScrollable.x), _classNames2[styles$7['scrollable-y']] = !!(isScrollable != null && isScrollable.y), _classNames2), className);
|
|
4691
|
+
var tableClasses = classNames(styles$7.table, (_classNames3 = {}, _classNames3[styles$7.fixed] = useFixedTableLayout, _classNames3[styles$7.striped] = isStriped, _classNames3[styles$7.borderless] = isBorderless, _classNames3[styles$7.compact] = isCompact, _classNames3));
|
|
4617
4692
|
return React__default.createElement("div", {
|
|
4618
4693
|
className: containerClasses
|
|
4619
4694
|
}, isLoading && React__default.createElement("div", {
|
|
4620
|
-
className: styles$
|
|
4695
|
+
className: styles$7['loading-mask']
|
|
4621
4696
|
}, React__default.createElement(Spinner, {
|
|
4622
4697
|
size: "xl"
|
|
4623
4698
|
})), React__default.createElement("div", {
|
|
@@ -4648,7 +4723,7 @@ var Table = function Table(_ref) {
|
|
|
4648
4723
|
}))));
|
|
4649
4724
|
};
|
|
4650
4725
|
|
|
4651
|
-
var _excluded$
|
|
4726
|
+
var _excluded$3 = ["children", "defaultTheme", "storageKey"];
|
|
4652
4727
|
var initialState = {
|
|
4653
4728
|
theme: 'system',
|
|
4654
4729
|
setTheme: function setTheme() {
|
|
@@ -4662,7 +4737,7 @@ function ThemeProvider(_ref) {
|
|
|
4662
4737
|
defaultTheme = _ref$defaultTheme === void 0 ? 'system' : _ref$defaultTheme,
|
|
4663
4738
|
_ref$storageKey = _ref.storageKey,
|
|
4664
4739
|
storageKey = _ref$storageKey === void 0 ? 'hyphen-ui-theme' : _ref$storageKey,
|
|
4665
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4740
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
4666
4741
|
var _useState = useState(function () {
|
|
4667
4742
|
return localStorage.getItem(storageKey) || defaultTheme;
|
|
4668
4743
|
}),
|
|
@@ -4692,13 +4767,13 @@ function ThemeProvider(_ref) {
|
|
|
4692
4767
|
}), children);
|
|
4693
4768
|
}
|
|
4694
4769
|
|
|
4695
|
-
var styles$
|
|
4770
|
+
var styles$2 = {"toast-notification":"ToastNotification-module_toast-notification__2xiTW","toast-error":"ToastNotification-module_toast-error__4ArAY","toast-dismiss":"ToastNotification-module_toast-dismiss__xxmkb","toast-notification-enter-top":"ToastNotification-module_toast-notification-enter-top__ZZDCr","toast-notification-exit-top":"ToastNotification-module_toast-notification-exit-top__fOIkZ","toast-notification-enter-bottom":"ToastNotification-module_toast-notification-enter-bottom__So3w7","toast-notification-exit-bottom":"ToastNotification-module_toast-notification-exit-bottom__DDthi","toast-notification-exit-left":"ToastNotification-module_toast-notification-exit-left__Fh1hC","toast-notification-exit-right":"ToastNotification-module_toast-notification-exit-right__C1jQ9","toast-notification-fade-in":"ToastNotification-module_toast-notification-fade-in__JlSGi","toast-notification-fade-out":"ToastNotification-module_toast-notification-fade-out__r6q4Q"};
|
|
4696
4771
|
|
|
4697
4772
|
var getAnimationClass = function getAnimationClass(position, visible) {
|
|
4698
4773
|
var verticalPosition = position.includes('top') ? 'top' : 'bottom';
|
|
4699
4774
|
var horizontalPosition = position.includes('left') ? 'left' : 'right';
|
|
4700
4775
|
var isCentered = position.includes('center');
|
|
4701
|
-
var _ref = prefersReducedMotion() ? [styles$
|
|
4776
|
+
var _ref = prefersReducedMotion() ? [styles$2['toast-notification-fade-in'], styles$2['toast-notification-fade-out']] : [styles$2["toast-notification-enter-" + verticalPosition], styles$2["toast-notification-exit-" + (isCentered ? verticalPosition : horizontalPosition)]],
|
|
4702
4777
|
enter = _ref[0],
|
|
4703
4778
|
exit = _ref[1];
|
|
4704
4779
|
return visible ? enter : exit;
|
|
@@ -4732,7 +4807,7 @@ var renderDismissIcon = function renderDismissIcon(toast, onDismiss) {
|
|
|
4732
4807
|
return React__default.createElement(Box, {
|
|
4733
4808
|
as: "button",
|
|
4734
4809
|
borderWidth: "0",
|
|
4735
|
-
className: styles$
|
|
4810
|
+
className: styles$2['toast-dismiss'],
|
|
4736
4811
|
padding: "0 0 0 sm",
|
|
4737
4812
|
alignItems: "center",
|
|
4738
4813
|
justifyContent: "center",
|
|
@@ -4763,9 +4838,9 @@ var ToastNotification = /*#__PURE__*/React__default.memo(function (_ref2) {
|
|
|
4763
4838
|
}
|
|
4764
4839
|
}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
4765
4840
|
var animationClass = toast != null && toast.height ? getAnimationClass(toast.position || position, toast.visible) : undefined;
|
|
4766
|
-
var classes = classNames(toast.className, styles$
|
|
4841
|
+
var classes = classNames(toast.className, styles$2['toast-notification'], animationClass, (_classNames = {
|
|
4767
4842
|
'toast-notification--not-visible': !toast.visible
|
|
4768
|
-
}, _classNames[styles$
|
|
4843
|
+
}, _classNames[styles$2['toast-error']] = toast.type === 'error', _classNames));
|
|
4769
4844
|
return React__default.createElement(Box, {
|
|
4770
4845
|
alignItems: "center",
|
|
4771
4846
|
maxWidth: "300px",
|
|
@@ -5138,7 +5213,7 @@ var useToasts = function useToasts(toastOptions) {
|
|
|
5138
5213
|
};
|
|
5139
5214
|
};
|
|
5140
5215
|
|
|
5141
|
-
var _excluded$
|
|
5216
|
+
var _excluded$2 = ["children", "containerStyle", "containerClassName", "gutter", "position", "reverseOrder", "toastOptions"];
|
|
5142
5217
|
var createRectRef = function createRectRef(onRect) {
|
|
5143
5218
|
return function (el) {
|
|
5144
5219
|
if (el) {
|
|
@@ -5199,7 +5274,7 @@ var ToastContainer = function ToastContainer(_ref) {
|
|
|
5199
5274
|
_ref$reverseOrder = _ref.reverseOrder,
|
|
5200
5275
|
reverseOrder = _ref$reverseOrder === void 0 ? false : _ref$reverseOrder,
|
|
5201
5276
|
toastOptions = _ref.toastOptions,
|
|
5202
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5277
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
5203
5278
|
var _useToasts = useToasts(toastOptions),
|
|
5204
5279
|
toasts = _useToasts.toasts,
|
|
5205
5280
|
handlers = _useToasts.handlers;
|
|
@@ -5237,6 +5312,21 @@ var ToastContainer = function ToastContainer(_ref) {
|
|
|
5237
5312
|
}));
|
|
5238
5313
|
};
|
|
5239
5314
|
|
|
5315
|
+
var styles$1 = {"item":"Toggle-module_item__NQ7iu","outline":"Toggle-module_outline__tR6T1"};
|
|
5316
|
+
|
|
5317
|
+
var _excluded$1 = ["className", "variant", "children"];
|
|
5318
|
+
var Toggle = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
5319
|
+
var className = _ref.className,
|
|
5320
|
+
_ref$variant = _ref.variant,
|
|
5321
|
+
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
5322
|
+
children = _ref.children,
|
|
5323
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
5324
|
+
return React__default.createElement(TogglePrimitive.Root, _extends({
|
|
5325
|
+
ref: ref,
|
|
5326
|
+
className: classNames(styles$1.item, variant === 'outline' && styles$1.outline, className)
|
|
5327
|
+
}, props), children);
|
|
5328
|
+
});
|
|
5329
|
+
|
|
5240
5330
|
var styles = {"TooltipContent":"Tooltip-module_TooltipContent__wLEZU","tooltip-slideUpAndFade":"Tooltip-module_tooltip-slideUpAndFade__Y05jp","tooltip-slideRightAndFade":"Tooltip-module_tooltip-slideRightAndFade__K04p9","tooltip-slideDownAndFade":"Tooltip-module_tooltip-slideDownAndFade__1wMd-","tooltip-slideLeftAndFade":"Tooltip-module_tooltip-slideLeftAndFade__iQ1fp"};
|
|
5241
5331
|
|
|
5242
5332
|
var _excluded = ["className", "sideOffset"];
|
|
@@ -5356,5 +5446,5 @@ var useTheme = function useTheme() {
|
|
|
5356
5446
|
return context;
|
|
5357
5447
|
};
|
|
5358
5448
|
|
|
5359
|
-
export { Alert, Badge, Box, Button, Card, CardBaseComponent, Checkbox, CheckboxInput, Collapsible, CollapsibleContent, CollapsibleTrigger, DateInput, DatePicker, Details, DetailsBaseComponent, DetailsSummary, Drawer, DrawerCloseButton, DrawerContent, DrawerHeader, DrawerProvider, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FormControl, FormLabel, FormikCheckboxInput, FormikRadioGroup, FormikSelectInput, FormikSelectInputInset, FormikSelectInputNative, FormikTextInput, FormikTextInputInset, FormikTextareaInput, FormikTextareaInputInset, FormikTimePicker, FormikTimePickerNative,
|
|
5449
|
+
export { Alert, Badge, Box, Button, Card, CardBaseComponent, Checkbox, CheckboxInput, Collapsible, CollapsibleContent, CollapsibleTrigger, DateInput, DatePicker, Details, DetailsBaseComponent, DetailsSummary, Drawer, DrawerCloseButton, DrawerContent, DrawerHeader, DrawerProvider, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FormControl, FormLabel, FormikCheckboxInput, FormikRadioGroup, FormikSelectInput, FormikSelectInputInset, FormikSelectInputNative, FormikSwitch, FormikTextInput, FormikTextInputInset, FormikTextareaInput, FormikTextareaInputInset, FormikTimePicker, FormikTimePickerNative, FormikToggleGroup, Heading, Icon, Modal, ModalBaseComponent, Pagination, Popover, RadioGroup, RangeInput, ResponsiveContext, ResponsiveProvider, SelectInput, SelectInputInset, SelectInputNative, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarTrigger, Spinner, Switch, Table, TextInput, TextInputInset, TextareaInput, TextareaInputInset, ThemeProvider, ThemeProviderContext, TimePicker, TimePickerNative, ToastContainer, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, boxPropsKeys, createRectRef, toast, useBreakpoint, useDrawer, useIsMobile, useIsomorphicLayoutEffect, useOpenClose, useSidebar, useTheme, useToasts, useWindowSize };
|
|
5360
5450
|
//# sourceMappingURL=hyphen-components.esm.js.map
|