@hyphen/hyphen-components 2.24.1 → 2.25.1
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/Sidebar/Sidebar.d.ts +50 -0
- package/dist/components/Sidebar/Sidebar.stories.d.ts +6 -0
- package/dist/css/reset.css +10 -0
- package/dist/css/utilities.css +331 -0
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hyphen-components.cjs.development.js +574 -125
- 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 +556 -126
- package/dist/hyphen-components.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +2 -1
- package/src/components/DropdownMenu/DropdownMenu.tsx +1 -1
- package/src/components/ResponsiveProvider/ResponsiveProvider.tsx +1 -1
- package/src/components/Sidebar/Sidebar.stories.tsx +392 -0
- package/src/components/Sidebar/Sidebar.tsx +633 -0
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useBreakpoint/useBreakpoint.ts +1 -1
- package/src/index.ts +1 -0
- package/src/styles/animation.scss +0 -1
- package/src/styles/reset.scss +10 -0
- package/src/styles/transform.scss +305 -0
- package/src/styles/utilities.scss +30 -2
- /package/dist/hooks/useIsomorphicLayoutEffect/{useIsomorphicLayouEffect.d.ts → useIsomorphicLayoutEffect.d.ts} +0 -0
- /package/src/hooks/useIsomorphicLayoutEffect/{useIsomorphicLayouEffect.ts → useIsomorphicLayoutEffect.ts} +0 -0
|
@@ -23,6 +23,7 @@ var Select = require('react-select');
|
|
|
23
23
|
var AsyncCreatableSelect = require('react-select/async-creatable');
|
|
24
24
|
var AsyncSelect = require('react-select/async');
|
|
25
25
|
var CreatableSelect = require('react-select/creatable');
|
|
26
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
26
27
|
var uuid = require('uuid');
|
|
27
28
|
|
|
28
29
|
function _interopNamespaceDefault(e) {
|
|
@@ -55,6 +56,9 @@ function _extends() {
|
|
|
55
56
|
return n;
|
|
56
57
|
}, _extends.apply(null, arguments);
|
|
57
58
|
}
|
|
59
|
+
function _objectDestructuringEmpty(t) {
|
|
60
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
61
|
+
}
|
|
58
62
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
59
63
|
if (null == r) return {};
|
|
60
64
|
var t = {};
|
|
@@ -271,7 +275,7 @@ Component, props, getDefault) {
|
|
|
271
275
|
|
|
272
276
|
var styles$w = {"box-transition":"Box-module_box-transition__eQx8C"};
|
|
273
277
|
|
|
274
|
-
var _excluded$
|
|
278
|
+
var _excluded$L = ["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"];
|
|
275
279
|
/**
|
|
276
280
|
* A `<Box>` is a layout component to build UIs with consistent padding and spacing between
|
|
277
281
|
* elements.
|
|
@@ -358,7 +362,7 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
358
362
|
width = _ref$width === void 0 ? undefined : _ref$width,
|
|
359
363
|
_ref$zIndex = _ref.zIndex,
|
|
360
364
|
zIndex = _ref$zIndex === void 0 ? undefined : _ref$zIndex,
|
|
361
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
365
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
362
366
|
var heightCss = getDimensionCss('h', height);
|
|
363
367
|
var widthCss = getDimensionCss('w', width);
|
|
364
368
|
var maxHeightCss = getDimensionCss('mh', maxHeight);
|
|
@@ -509,14 +513,14 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
509
513
|
});
|
|
510
514
|
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'];
|
|
511
515
|
|
|
512
|
-
var _excluded$
|
|
516
|
+
var _excluded$K = ["className", "name", "color", "size"];
|
|
513
517
|
var Icon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
514
518
|
var _ref$className = _ref.className,
|
|
515
519
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
516
520
|
name = _ref.name,
|
|
517
521
|
color = _ref.color,
|
|
518
522
|
size = _ref.size,
|
|
519
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
523
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$K);
|
|
520
524
|
var IconComponent = icons[name];
|
|
521
525
|
if (!IconComponent) console.error("Icon '" + name + "' not found"); // eslint-disable-line no-console
|
|
522
526
|
var iconClasses = classNames(className, generateResponsiveClasses('font-color', color), generateResponsiveClasses('font-size', size));
|
|
@@ -555,7 +559,7 @@ var ALERT_ICONS_MAP = {
|
|
|
555
559
|
}
|
|
556
560
|
};
|
|
557
561
|
|
|
558
|
-
var _excluded$
|
|
562
|
+
var _excluded$J = ["className", "closeText", "hasIcon", "isCompact", "isClosable", "message", "onClose", "render", "title", "variant"];
|
|
559
563
|
var Alert = function Alert(_ref) {
|
|
560
564
|
var _ref$className = _ref.className,
|
|
561
565
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -577,7 +581,7 @@ var Alert = function Alert(_ref) {
|
|
|
577
581
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
578
582
|
_ref$variant = _ref.variant,
|
|
579
583
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
580
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
584
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$J);
|
|
581
585
|
var handleClose = function handleClose(event) {
|
|
582
586
|
if (!onClose) return;
|
|
583
587
|
onClose(event);
|
|
@@ -631,7 +635,7 @@ var Alert = function Alert(_ref) {
|
|
|
631
635
|
|
|
632
636
|
var styles$u = {"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"};
|
|
633
637
|
|
|
634
|
-
var _excluded$
|
|
638
|
+
var _excluded$I = ["className", "message", "variant", "size"];
|
|
635
639
|
var Badge = function Badge(_ref) {
|
|
636
640
|
var _classNames;
|
|
637
641
|
var _ref$className = _ref.className,
|
|
@@ -642,7 +646,7 @@ var Badge = function Badge(_ref) {
|
|
|
642
646
|
variant = _ref$variant === void 0 ? 'light-grey' : _ref$variant,
|
|
643
647
|
_ref$size = _ref.size,
|
|
644
648
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
645
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
649
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
646
650
|
var responsiveClasses = generateResponsiveClasses('size', size).map(function (c) {
|
|
647
651
|
return styles$u[c];
|
|
648
652
|
});
|
|
@@ -777,7 +781,7 @@ var handleReactRouterClick = function handleReactRouterClick(event, onClick, tar
|
|
|
777
781
|
|
|
778
782
|
var styles$s = {"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"};
|
|
779
783
|
|
|
780
|
-
var _excluded$
|
|
784
|
+
var _excluded$H = ["children", "as", "className", "fullWidth", "id", "href", "iconPrefix", "iconSuffix", "isDisabled", "isLoading", "navigate", "onClick", "onFocus", "onBlur", "shadow", "size", "tabIndex", "target", "type", "variant"];
|
|
781
785
|
var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
782
786
|
var _classNames, _extends2;
|
|
783
787
|
var _ref$children = _ref.children,
|
|
@@ -820,7 +824,7 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
820
824
|
type = _ref$type === void 0 ? undefined : _ref$type,
|
|
821
825
|
_ref$variant = _ref.variant,
|
|
822
826
|
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
823
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
827
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
824
828
|
var disabled = isLoading || isDisabled;
|
|
825
829
|
var responsiveClasses = generateResponsiveClasses('size', size).map(function (c) {
|
|
826
830
|
return styles$s[c];
|
|
@@ -874,7 +878,7 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
874
878
|
}, _extends2.onFocus = handleFocus, _extends2.ref = ref, _extends2.type = type || (as !== 'a' && !href ? 'button' : undefined), _extends2.tabIndex = tabIndex, _extends2), restProps), buttonContent);
|
|
875
879
|
});
|
|
876
880
|
|
|
877
|
-
var _excluded$
|
|
881
|
+
var _excluded$G = ["background", "borderColor", "borderWidth", "children", "display", "padding"];
|
|
878
882
|
var CardFooter = function CardFooter(_ref) {
|
|
879
883
|
var _ref$background = _ref.background,
|
|
880
884
|
background = _ref$background === void 0 ? 'secondary' : _ref$background,
|
|
@@ -888,7 +892,7 @@ var CardFooter = function CardFooter(_ref) {
|
|
|
888
892
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
889
893
|
_ref$padding = _ref.padding,
|
|
890
894
|
padding = _ref$padding === void 0 ? '2xl' : _ref$padding,
|
|
891
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
895
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
892
896
|
return React.createElement(Box, _extends({
|
|
893
897
|
display: display,
|
|
894
898
|
padding: padding,
|
|
@@ -909,7 +913,7 @@ var HEADING_DEFAULT_SIZE_MAP = {
|
|
|
909
913
|
|
|
910
914
|
var styles$r = {"heading":"Heading-module_heading__zKyv7"};
|
|
911
915
|
|
|
912
|
-
var _excluded$
|
|
916
|
+
var _excluded$F = ["as", "children", "className", "color", "size"];
|
|
913
917
|
var Heading = function Heading(_ref) {
|
|
914
918
|
var _classNames;
|
|
915
919
|
var _ref$as = _ref.as,
|
|
@@ -918,7 +922,7 @@ var Heading = function Heading(_ref) {
|
|
|
918
922
|
className = _ref.className,
|
|
919
923
|
color = _ref.color,
|
|
920
924
|
size = _ref.size,
|
|
921
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
925
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
922
926
|
var element = getElementType(Heading, {
|
|
923
927
|
as: as
|
|
924
928
|
});
|
|
@@ -929,7 +933,7 @@ var Heading = function Heading(_ref) {
|
|
|
929
933
|
}, restProps), children);
|
|
930
934
|
};
|
|
931
935
|
|
|
932
|
-
var _excluded$
|
|
936
|
+
var _excluded$E = ["childGap", "children", "className", "display", "padding", "title"];
|
|
933
937
|
var CardHeader = function CardHeader(_ref) {
|
|
934
938
|
var _ref$childGap = _ref.childGap,
|
|
935
939
|
childGap = _ref$childGap === void 0 ? '2xs' : _ref$childGap,
|
|
@@ -943,7 +947,7 @@ var CardHeader = function CardHeader(_ref) {
|
|
|
943
947
|
padding = _ref$padding === void 0 ? '2xl' : _ref$padding,
|
|
944
948
|
_ref$title = _ref.title,
|
|
945
949
|
title = _ref$title === void 0 ? null : _ref$title,
|
|
946
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
950
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
947
951
|
var renderTitle = function renderTitle() {
|
|
948
952
|
return typeof title === 'string' ? React.createElement(Heading, {
|
|
949
953
|
size: "sm",
|
|
@@ -960,7 +964,7 @@ var CardHeader = function CardHeader(_ref) {
|
|
|
960
964
|
|
|
961
965
|
var styles$q = {"card-section-border":"Card-module_card-section-border__OefDX"};
|
|
962
966
|
|
|
963
|
-
var _excluded$
|
|
967
|
+
var _excluded$D = ["background", "borderColor", "borderWidth", "children", "childGap", "gap", "className", "display", "padding", "subdued", "title"];
|
|
964
968
|
var CardSection = function CardSection(_ref) {
|
|
965
969
|
var _classNames;
|
|
966
970
|
var _ref$background = _ref.background,
|
|
@@ -985,7 +989,7 @@ var CardSection = function CardSection(_ref) {
|
|
|
985
989
|
subdued = _ref$subdued === void 0 ? undefined : _ref$subdued,
|
|
986
990
|
_ref$title = _ref.title,
|
|
987
991
|
title = _ref$title === void 0 ? undefined : _ref$title,
|
|
988
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
992
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
989
993
|
var renderTitle = typeof title === 'string' ? React.createElement(Box, {
|
|
990
994
|
className: "m-bottom-md"
|
|
991
995
|
}, React.createElement(Box, {
|
|
@@ -1008,7 +1012,7 @@ var CardSection = function CardSection(_ref) {
|
|
|
1008
1012
|
}, children));
|
|
1009
1013
|
};
|
|
1010
1014
|
|
|
1011
|
-
var _excluded$
|
|
1015
|
+
var _excluded$C = ["children", "subdued", "overflow", "display", "width"];
|
|
1012
1016
|
var CardBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1013
1017
|
var children = _ref.children,
|
|
1014
1018
|
subdued = _ref.subdued,
|
|
@@ -1018,7 +1022,7 @@ var CardBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1018
1022
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1019
1023
|
_ref$width = _ref.width,
|
|
1020
1024
|
width = _ref$width === void 0 ? '100' : _ref$width,
|
|
1021
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1025
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
1022
1026
|
return React.createElement(Box, _extends({
|
|
1023
1027
|
background: subdued ? 'secondary' : 'primary',
|
|
1024
1028
|
borderWidth: "sm",
|
|
@@ -1041,7 +1045,7 @@ var Card = /*#__PURE__*/function () {
|
|
|
1041
1045
|
return Card;
|
|
1042
1046
|
}();
|
|
1043
1047
|
|
|
1044
|
-
var _excluded$
|
|
1048
|
+
var _excluded$B = ["className", "error", "isChecked", "isDisabled", "isIndeterminate"];
|
|
1045
1049
|
var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
1046
1050
|
var _ref$className = _ref.className,
|
|
1047
1051
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
@@ -1053,7 +1057,7 @@ var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
|
1053
1057
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
1054
1058
|
_ref$isIndeterminate = _ref.isIndeterminate,
|
|
1055
1059
|
isIndeterminate = _ref$isIndeterminate === void 0 ? false : _ref$isIndeterminate,
|
|
1056
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1060
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
1057
1061
|
var color = 'base';
|
|
1058
1062
|
var name = 'checkbox-btn';
|
|
1059
1063
|
if (isChecked) name = 'checkbox-btn-checked';else name = 'checkbox-btn';
|
|
@@ -1078,7 +1082,7 @@ var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
|
1078
1082
|
|
|
1079
1083
|
var styles$p = {"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"};
|
|
1080
1084
|
|
|
1081
|
-
var _excluded$
|
|
1085
|
+
var _excluded$A = ["className", "display", "id", "isChecked", "label", "labelledby", "onChange", "error", "isDisabled", "isHidden", "isIndeterminate", "isRequired", "onBlur", "onFocus", "size", "value"];
|
|
1082
1086
|
var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1083
1087
|
var _ref2;
|
|
1084
1088
|
var _ref$className = _ref.className,
|
|
@@ -1108,7 +1112,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1108
1112
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
1109
1113
|
_ref$value = _ref.value,
|
|
1110
1114
|
value = _ref$value === void 0 ? undefined : _ref$value,
|
|
1111
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1115
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
1112
1116
|
var inputRef = React.useRef(null);
|
|
1113
1117
|
React.useEffect(function () {
|
|
1114
1118
|
if (inputRef != null && inputRef.current) {
|
|
@@ -1197,7 +1201,7 @@ var HelpText = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1197
1201
|
}, children);
|
|
1198
1202
|
});
|
|
1199
1203
|
|
|
1200
|
-
var _excluded$
|
|
1204
|
+
var _excluded$z = ["children", "inputId", "className", "display", "helpText", "isDisabled", "isFieldRequired", "isRadioInputLabel", "requiredIndicator", "margin", "padding"];
|
|
1201
1205
|
var FormLabel = function FormLabel(_ref) {
|
|
1202
1206
|
var _classNames;
|
|
1203
1207
|
var children = _ref.children,
|
|
@@ -1219,7 +1223,7 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
1219
1223
|
margin = _ref$margin === void 0 ? '0' : _ref$margin,
|
|
1220
1224
|
_ref$padding = _ref.padding,
|
|
1221
1225
|
padding = _ref$padding === void 0 ? '0' : _ref$padding,
|
|
1222
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1226
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
1223
1227
|
var labelClasses = classNames('hyphen-components__variables__form-control', styles$n.label, className, (_classNames = {}, _classNames[styles$n.disabled] = isDisabled, _classNames[styles$n.disabled] = isDisabled, _classNames[styles$n['radio-input-label']] = isRadioInputLabel, _classNames));
|
|
1224
1228
|
return React.createElement(Box, _extends({
|
|
1225
1229
|
as: "label",
|
|
@@ -1232,7 +1236,7 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
1232
1236
|
}, restProps), children, isFieldRequired && requiredIndicator && React.createElement("span", null, requiredIndicator), helpText && React.createElement(HelpText, null, helpText));
|
|
1233
1237
|
};
|
|
1234
1238
|
|
|
1235
|
-
var _excluded$
|
|
1239
|
+
var _excluded$y = ["id", "isChecked", "label", "onChange", "className", "error", "hideLabel", "helpText", "isDisabled", "isIndeterminate", "isRequired", "onBlur", "onFocus", "requiredIndicator", "size"];
|
|
1236
1240
|
var labelMarginSizeMap = {
|
|
1237
1241
|
sm: '2xs 0 0 0',
|
|
1238
1242
|
md: 'xs 0 0 0',
|
|
@@ -1277,7 +1281,7 @@ var CheckboxInput = function CheckboxInput(_ref2) {
|
|
|
1277
1281
|
requiredIndicator = _ref2$requiredIndicat === void 0 ? ' *' : _ref2$requiredIndicat,
|
|
1278
1282
|
_ref2$size = _ref2.size,
|
|
1279
1283
|
size = _ref2$size === void 0 ? 'md' : _ref2$size,
|
|
1280
|
-
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
1284
|
+
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded$y);
|
|
1281
1285
|
var handleBlur = function handleBlur(event) {
|
|
1282
1286
|
if (onBlur) onBlur(event);
|
|
1283
1287
|
};
|
|
@@ -1325,7 +1329,7 @@ var CollapsibleContent = CollapsiblePrimitive__namespace.CollapsibleContent;
|
|
|
1325
1329
|
|
|
1326
1330
|
var styles$l = {};
|
|
1327
1331
|
|
|
1328
|
-
var _excluded$
|
|
1332
|
+
var _excluded$x = ["children", "dayClassName", "maxDate", "minDate", "monthsShown", "openToDate", "startDate", "selected", "selectsRange", "showTwoColumnMonthYearPicker", "showFullMonthYearPicker", "showMonthYearPicker", "className", "formatWeekDay"];
|
|
1329
1333
|
var DatePicker = function DatePicker(_ref) {
|
|
1330
1334
|
var _ref$children = _ref.children,
|
|
1331
1335
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
@@ -1357,7 +1361,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
1357
1361
|
formatWeekDay = _ref$formatWeekDay === void 0 ? function (formattedDate) {
|
|
1358
1362
|
return formattedDate[0];
|
|
1359
1363
|
} : _ref$formatWeekDay,
|
|
1360
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1364
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
1361
1365
|
var datePickerClasses = classNames(styles$l['react-datepicker'], className);
|
|
1362
1366
|
return React.createElement(ReactDatePicker, _extends({
|
|
1363
1367
|
inline: true,
|
|
@@ -1377,7 +1381,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
1377
1381
|
}, restProps), children);
|
|
1378
1382
|
};
|
|
1379
1383
|
|
|
1380
|
-
var _excluded$
|
|
1384
|
+
var _excluded$w = ["label", "hideLabel", "children", "error", "id", "isRequired", "helpText", "isDisabled", "requiredIndicator", "width"];
|
|
1381
1385
|
var FormControl = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1382
1386
|
var label = _ref.label,
|
|
1383
1387
|
hideLabel = _ref.hideLabel,
|
|
@@ -1390,7 +1394,7 @@ var FormControl = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1390
1394
|
requiredIndicator = _ref.requiredIndicator,
|
|
1391
1395
|
_ref$width = _ref.width,
|
|
1392
1396
|
width = _ref$width === void 0 ? '100' : _ref$width,
|
|
1393
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1397
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
1394
1398
|
var labelProps = {
|
|
1395
1399
|
inputId: id,
|
|
1396
1400
|
helpText: helpText,
|
|
@@ -1418,7 +1422,7 @@ function getAutoCompleteValue(value) {
|
|
|
1418
1422
|
|
|
1419
1423
|
var styles$k = {"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"};
|
|
1420
1424
|
|
|
1421
|
-
var _excluded$
|
|
1425
|
+
var _excluded$v = ["id", "label", "onChange", "value", "autoComplete", "autoFocus", "error", "helpText", "hideLabel", "inputProps", "isDisabled", "isRequired", "maxLength", "name", "onBlur", "onClear", "onFocus", "prefix", "placeholder", "requiredIndicator", "suffix", "size", "type"];
|
|
1422
1426
|
var TextInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1423
1427
|
var _ref2;
|
|
1424
1428
|
var id = _ref.id,
|
|
@@ -1462,7 +1466,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1462
1466
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
1463
1467
|
_ref$type = _ref.type,
|
|
1464
1468
|
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
1465
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1469
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
1466
1470
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
1467
1471
|
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$k['text-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
1468
1472
|
return styles$k[c];
|
|
@@ -1611,7 +1615,7 @@ var BREAKPOINTS = /*#__PURE__*/[].concat(Object.entries(designTokens.size.breakp
|
|
|
1611
1615
|
var Z_INDEX_VALUES = designTokens.size['z-index'];
|
|
1612
1616
|
// export const BOX_SHADOW_VALUES = designTokens.size['box-shadow'];
|
|
1613
1617
|
|
|
1614
|
-
var _excluded$
|
|
1618
|
+
var _excluded$u = ["className", "isOpen", "children", "content", "arrowColor", "contentContainerProps", "hasArrow", "offsetFromTarget", "onClickOutside", "placement", "withPortal", "portalTarget", "trapFocus"];
|
|
1615
1619
|
var contentContainerDefaults = {
|
|
1616
1620
|
background: 'primary',
|
|
1617
1621
|
padding: 'sm',
|
|
@@ -1640,7 +1644,7 @@ var Popover = function Popover(_ref) {
|
|
|
1640
1644
|
portalTarget = _ref.portalTarget,
|
|
1641
1645
|
_ref$trapFocus = _ref.trapFocus,
|
|
1642
1646
|
trapFocus = _ref$trapFocus === void 0 ? false : _ref$trapFocus,
|
|
1643
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1647
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
1644
1648
|
var triggerRef = React.useRef(null);
|
|
1645
1649
|
var popperRef = React.useRef(null);
|
|
1646
1650
|
var _useState = React.useState(null),
|
|
@@ -1746,7 +1750,7 @@ var Popover = function Popover(_ref) {
|
|
|
1746
1750
|
withPortal && portalTarget ? reactDom.createPortal(renderPopperContent(), portalTarget) : renderPopperContent()));
|
|
1747
1751
|
};
|
|
1748
1752
|
|
|
1749
|
-
var _excluded$
|
|
1753
|
+
var _excluded$t = ["datePickerProps", "textInputProps", "dateFormat", "dateOptions", "popoverProps"];
|
|
1750
1754
|
var defaultDatePickerProps = {
|
|
1751
1755
|
selected: null,
|
|
1752
1756
|
selectsRange: false
|
|
@@ -1766,7 +1770,7 @@ var DateInput = function DateInput(_ref) {
|
|
|
1766
1770
|
dateOptions = _ref$dateOptions === void 0 ? undefined : _ref$dateOptions,
|
|
1767
1771
|
_ref$popoverProps = _ref.popoverProps,
|
|
1768
1772
|
popoverProps = _ref$popoverProps === void 0 ? _extends({}, defaultPopoverProps) : _ref$popoverProps,
|
|
1769
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1773
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
1770
1774
|
var mergedDatePickerProps = _extends({}, defaultDatePickerProps, datePickerProps);
|
|
1771
1775
|
var mergedPopoverProps = _extends({}, defaultPopoverProps, popoverProps);
|
|
1772
1776
|
var mergedTextInputProps = _extends({}, defaultTextInputProps, textInputProps);
|
|
@@ -1843,14 +1847,14 @@ var DateInput = function DateInput(_ref) {
|
|
|
1843
1847
|
var ENTER = 13;
|
|
1844
1848
|
var SPACE = 32;
|
|
1845
1849
|
|
|
1846
|
-
var _excluded$
|
|
1850
|
+
var _excluded$s = ["children", "display", "isDetailsOpen", "onToggle"];
|
|
1847
1851
|
var DetailsSummary = function DetailsSummary(_ref) {
|
|
1848
1852
|
var children = _ref.children,
|
|
1849
1853
|
_ref$display = _ref.display,
|
|
1850
1854
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1851
1855
|
isDetailsOpen = _ref.isDetailsOpen,
|
|
1852
1856
|
onToggle = _ref.onToggle,
|
|
1853
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1857
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
1854
1858
|
var handleClick = function handleClick(event) {
|
|
1855
1859
|
// Needed to avoid default `details` behavior on a click event and keep this as controlled component.
|
|
1856
1860
|
event.preventDefault();
|
|
@@ -1888,14 +1892,14 @@ var DetailsSummary = function DetailsSummary(_ref) {
|
|
|
1888
1892
|
|
|
1889
1893
|
var styles$i = {"details-reset":"Details-module_details-reset__HWtSD"};
|
|
1890
1894
|
|
|
1891
|
-
var _excluded$
|
|
1895
|
+
var _excluded$r = ["children", "className", "display", "isOpen"];
|
|
1892
1896
|
var DetailsBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1893
1897
|
var children = _ref.children,
|
|
1894
1898
|
className = _ref.className,
|
|
1895
1899
|
_ref$display = _ref.display,
|
|
1896
1900
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1897
1901
|
isOpen = _ref.isOpen,
|
|
1898
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1902
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
1899
1903
|
var detailsClasses = classNames(className, styles$i['details-reset'], styles$i.details);
|
|
1900
1904
|
return React.createElement(Box, _extends({
|
|
1901
1905
|
as: "details",
|
|
@@ -2034,13 +2038,13 @@ var Drawer = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2034
2038
|
}, renderHeader(), content)))));
|
|
2035
2039
|
});
|
|
2036
2040
|
|
|
2037
|
-
var _excluded$
|
|
2038
|
-
_excluded2 = ["className", "sideOffset"],
|
|
2039
|
-
_excluded3 = ["className", "inset"],
|
|
2040
|
-
_excluded4 = ["className"],
|
|
2041
|
-
_excluded5 = ["className"],
|
|
2042
|
-
_excluded6 = ["className", "inset", "children"],
|
|
2043
|
-
_excluded7 = ["className"];
|
|
2041
|
+
var _excluded$q = ["className", "inset"],
|
|
2042
|
+
_excluded2$1 = ["className", "sideOffset"],
|
|
2043
|
+
_excluded3$1 = ["className", "inset"],
|
|
2044
|
+
_excluded4$1 = ["className"],
|
|
2045
|
+
_excluded5$1 = ["className"],
|
|
2046
|
+
_excluded6$1 = ["className", "inset", "children"],
|
|
2047
|
+
_excluded7$1 = ["className"];
|
|
2044
2048
|
var DropdownMenu = DropdownMenuPrimitive__namespace.Root;
|
|
2045
2049
|
var DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
2046
2050
|
var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
@@ -2050,10 +2054,10 @@ var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
|
2050
2054
|
var DropdownMenuItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
2051
2055
|
var className = _ref.className,
|
|
2052
2056
|
inset = _ref.inset,
|
|
2053
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2057
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
2054
2058
|
return React.createElement(DropdownMenuPrimitive__namespace.Item, _extends({
|
|
2055
2059
|
ref: ref,
|
|
2056
|
-
className: classNames('font-size-sm position-relative cursor-default display-flex br-sm align-items-center p-sm g-sm
|
|
2060
|
+
className: classNames('font-size-sm position-relative cursor-default display-flex br-sm align-items-center p-sm g-sm outline-none hover:background-color-secondary focus:background-color-secondary', inset && 'p-left-md', className)
|
|
2057
2061
|
}, props));
|
|
2058
2062
|
});
|
|
2059
2063
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
@@ -2061,7 +2065,7 @@ var DropdownMenuContent = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
2061
2065
|
var className = _ref2.className,
|
|
2062
2066
|
_ref2$sideOffset = _ref2.sideOffset,
|
|
2063
2067
|
sideOffset = _ref2$sideOffset === void 0 ? 4 : _ref2$sideOffset,
|
|
2064
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
2068
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
|
|
2065
2069
|
return React.createElement(DropdownMenuPrimitive__namespace.Portal, null, React.createElement(DropdownMenuPrimitive__namespace.Content, _extends({
|
|
2066
2070
|
ref: ref,
|
|
2067
2071
|
sideOffset: sideOffset,
|
|
@@ -2075,7 +2079,7 @@ DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displ
|
|
|
2075
2079
|
var DropdownMenuLabel = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
2076
2080
|
var className = _ref3.className,
|
|
2077
2081
|
inset = _ref3.inset,
|
|
2078
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
2082
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$1);
|
|
2079
2083
|
return React.createElement(DropdownMenuPrimitive__namespace.Label, _extends({
|
|
2080
2084
|
ref: ref,
|
|
2081
2085
|
className: classNames('display-flex align-items-center br-sm p-h-sm p-v-xs font-color-secondary font-size-xs font-weight-medium outline-none', inset && 'p-left-md', className)
|
|
@@ -2084,7 +2088,7 @@ var DropdownMenuLabel = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
2084
2088
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
2085
2089
|
var DropdownMenuSeparator = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
2086
2090
|
var className = _ref4.className,
|
|
2087
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
2091
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4$1);
|
|
2088
2092
|
return React.createElement(DropdownMenuPrimitive__namespace.Separator, _extends({
|
|
2089
2093
|
ref: ref,
|
|
2090
2094
|
className: classNames('h-2xs m-v-xs bw-top-sm border-color-subtle', className),
|
|
@@ -2097,7 +2101,7 @@ var DropdownMenuSeparator = /*#__PURE__*/React.forwardRef(function (_ref4, ref)
|
|
|
2097
2101
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive__namespace.Separator.displayName;
|
|
2098
2102
|
var DropdownMenuShortcut = function DropdownMenuShortcut(_ref5) {
|
|
2099
2103
|
var className = _ref5.className,
|
|
2100
|
-
props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
2104
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded5$1);
|
|
2101
2105
|
return React.createElement("span", _extends({
|
|
2102
2106
|
className: classNames('m-left-auto font-size-xs font-color-tertiary', className),
|
|
2103
2107
|
style: {
|
|
@@ -2110,7 +2114,7 @@ var DropdownMenuSubTrigger = /*#__PURE__*/React.forwardRef(function (_ref6, ref)
|
|
|
2110
2114
|
var className = _ref6.className,
|
|
2111
2115
|
inset = _ref6.inset,
|
|
2112
2116
|
children = _ref6.children,
|
|
2113
|
-
props = _objectWithoutPropertiesLoose(_ref6, _excluded6);
|
|
2117
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded6$1);
|
|
2114
2118
|
return React.createElement(DropdownMenuPrimitive__namespace.SubTrigger, _extends({
|
|
2115
2119
|
ref: ref,
|
|
2116
2120
|
className: classNames('display-flex cursor-default gap-xl align-items-center br-sm p-sm g-sm font-size-sm outline-none focus:background-color-secondary', inset && 'p-left-md', className)
|
|
@@ -2122,7 +2126,7 @@ var DropdownMenuSubTrigger = /*#__PURE__*/React.forwardRef(function (_ref6, ref)
|
|
|
2122
2126
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
2123
2127
|
var DropdownMenuSubContent = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
2124
2128
|
var className = _ref7.className,
|
|
2125
|
-
props = _objectWithoutPropertiesLoose(_ref7, _excluded7);
|
|
2129
|
+
props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
2126
2130
|
return React.createElement(DropdownMenuPrimitive__namespace.SubContent, _extends({
|
|
2127
2131
|
ref: ref,
|
|
2128
2132
|
className: classNames('z-index-popover minw-7xl overflow-hidden br-sm border-color-subtle bw-sm background-color-primary p-xs font-color-primary shadow-lg', className)
|
|
@@ -2130,7 +2134,7 @@ var DropdownMenuSubContent = /*#__PURE__*/React.forwardRef(function (_ref7, ref)
|
|
|
2130
2134
|
});
|
|
2131
2135
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
2132
2136
|
|
|
2133
|
-
var _excluded$
|
|
2137
|
+
var _excluded$p = ["field", "form", "onChange", "id", "label"];
|
|
2134
2138
|
var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
2135
2139
|
var _ref$field = _ref.field,
|
|
2136
2140
|
name = _ref$field.name,
|
|
@@ -2143,7 +2147,7 @@ var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
|
2143
2147
|
onChange = _ref.onChange,
|
|
2144
2148
|
id = _ref.id,
|
|
2145
2149
|
label = _ref.label,
|
|
2146
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2150
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
2147
2151
|
return React.createElement(CheckboxInput, _extends({}, props, {
|
|
2148
2152
|
id: id,
|
|
2149
2153
|
label: label,
|
|
@@ -2154,7 +2158,7 @@ var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
|
2154
2158
|
}));
|
|
2155
2159
|
};
|
|
2156
2160
|
|
|
2157
|
-
var _excluded$
|
|
2161
|
+
var _excluded$o = ["className", "isSelected", "isDisabled", "error"];
|
|
2158
2162
|
var RadioInputIcon = function RadioInputIcon(_ref) {
|
|
2159
2163
|
var _ref$className = _ref.className,
|
|
2160
2164
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
@@ -2164,7 +2168,7 @@ var RadioInputIcon = function RadioInputIcon(_ref) {
|
|
|
2164
2168
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
2165
2169
|
_ref$error = _ref.error,
|
|
2166
2170
|
error = _ref$error === void 0 ? null : _ref$error,
|
|
2167
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2171
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
2168
2172
|
var color = 'secondary';
|
|
2169
2173
|
var name = 'radio-btn-unchecked';
|
|
2170
2174
|
if (isSelected && isDisabled) {
|
|
@@ -2257,7 +2261,7 @@ var RadioInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2257
2261
|
|
|
2258
2262
|
var styles$f = {"radio-group":"RadioGroup-module_radio-group__FWPcT","fieldset":"RadioGroup-module_fieldset__PEUXI","legend":"RadioGroup-module_legend__tcfV7","description":"RadioGroup-module_description__8fzM-"};
|
|
2259
2263
|
|
|
2260
|
-
var _excluded$
|
|
2264
|
+
var _excluded$n = ["name", "onChange", "options", "className", "description", "direction", "error", "isDisabled", "isRequired", "onBlur", "onFocus", "requiredIndicator", "size", "title", "value"];
|
|
2261
2265
|
var RadioGroup = function RadioGroup(_ref) {
|
|
2262
2266
|
var _classNames;
|
|
2263
2267
|
var name = _ref.name,
|
|
@@ -2287,7 +2291,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
2287
2291
|
title = _ref$title === void 0 ? undefined : _ref$title,
|
|
2288
2292
|
_ref$value = _ref.value,
|
|
2289
2293
|
value = _ref$value === void 0 ? undefined : _ref$value,
|
|
2290
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2294
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
2291
2295
|
var groupClasses = classNames('hyphen-components__variables__form-control', className, (_classNames = {}, _classNames[styles$f.loading] = error, _classNames));
|
|
2292
2296
|
return React.createElement("div", _extends({
|
|
2293
2297
|
className: classNames(styles$f['radio-group'], groupClasses)
|
|
@@ -2317,7 +2321,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
2317
2321
|
}))), error && typeof error !== 'boolean' && React.createElement(InputValidationMessage, null, error));
|
|
2318
2322
|
};
|
|
2319
2323
|
|
|
2320
|
-
var _excluded$
|
|
2324
|
+
var _excluded$m = ["field", "form", "onChange", "options"];
|
|
2321
2325
|
var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
2322
2326
|
var _ref$field = _ref.field,
|
|
2323
2327
|
name = _ref$field.name,
|
|
@@ -2329,7 +2333,7 @@ var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
|
2329
2333
|
errors = _ref$form.errors,
|
|
2330
2334
|
onChange = _ref.onChange,
|
|
2331
2335
|
options = _ref.options,
|
|
2332
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2336
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
2333
2337
|
return React.createElement(RadioGroup, _extends({}, props, {
|
|
2334
2338
|
options: options,
|
|
2335
2339
|
name: name,
|
|
@@ -2342,7 +2346,7 @@ var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
|
2342
2346
|
|
|
2343
2347
|
var styles$e = {"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"};
|
|
2344
2348
|
|
|
2345
|
-
var _excluded$
|
|
2349
|
+
var _excluded$l = ["id", "label", "onChange", "options", "value", "autoFocus", "className", "error", "helpText", "hideLabel", "isClearable", "isAsync", "isCreatable", "isDisabled", "isMulti", "isRequired", "menuPortalTarget", "name", "onFocus", "onBlur", "placeholder", "requiredIndicator", "size"];
|
|
2346
2350
|
function SelectInput(props) {
|
|
2347
2351
|
var _ref, _classNames;
|
|
2348
2352
|
var id = props.id,
|
|
@@ -2385,7 +2389,7 @@ function SelectInput(props) {
|
|
|
2385
2389
|
requiredIndicator = _props$requiredIndica === void 0 ? ' *' : _props$requiredIndica,
|
|
2386
2390
|
_props$size = props.size,
|
|
2387
2391
|
size = _props$size === void 0 ? 'md' : _props$size,
|
|
2388
|
-
restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2392
|
+
restProps = _objectWithoutPropertiesLoose(props, _excluded$l);
|
|
2389
2393
|
var handleChange = function handleChange(values) {
|
|
2390
2394
|
var simulatedEventPayloadType = {
|
|
2391
2395
|
target: {
|
|
@@ -2458,7 +2462,7 @@ function SelectInput(props) {
|
|
|
2458
2462
|
})), error && typeof error !== 'boolean' && React.createElement(InputValidationMessage, null, error));
|
|
2459
2463
|
}
|
|
2460
2464
|
|
|
2461
|
-
var _excluded$
|
|
2465
|
+
var _excluded$k = ["field", "form", "onChange", "id", "label", "options", "error"];
|
|
2462
2466
|
var FormikSelectInput = function FormikSelectInput(_ref) {
|
|
2463
2467
|
var _ref$field = _ref.field,
|
|
2464
2468
|
name = _ref$field.name,
|
|
@@ -2473,7 +2477,7 @@ var FormikSelectInput = function FormikSelectInput(_ref) {
|
|
|
2473
2477
|
label = _ref.label,
|
|
2474
2478
|
options = _ref.options,
|
|
2475
2479
|
errorProp = _ref.error,
|
|
2476
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2480
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
2477
2481
|
var errorMessage;
|
|
2478
2482
|
var error = errorProp != null ? errorProp : formik.getIn(touched, name) && formik.getIn(errors, name);
|
|
2479
2483
|
if (typeof error === 'string') {
|
|
@@ -2601,7 +2605,7 @@ var SelectInputInset = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2601
2605
|
}, label, isRequired && requiredIndicator && React.createElement("span", null, requiredIndicator))), helpText && React.createElement(HelpText, null, helpText), error && error !== true && React.createElement(InputValidationMessage, null, error));
|
|
2602
2606
|
});
|
|
2603
2607
|
|
|
2604
|
-
var _excluded$
|
|
2608
|
+
var _excluded$j = ["field", "form", "onChange", "id", "label", "options"];
|
|
2605
2609
|
var FormikSelectInputInset = function FormikSelectInputInset(_ref) {
|
|
2606
2610
|
var _ref$field = _ref.field,
|
|
2607
2611
|
name = _ref$field.name,
|
|
@@ -2615,7 +2619,7 @@ var FormikSelectInputInset = function FormikSelectInputInset(_ref) {
|
|
|
2615
2619
|
id = _ref.id,
|
|
2616
2620
|
label = _ref.label,
|
|
2617
2621
|
options = _ref.options,
|
|
2618
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2622
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
2619
2623
|
return React.createElement(SelectInputInset, _extends({}, props, {
|
|
2620
2624
|
id: id,
|
|
2621
2625
|
label: label,
|
|
@@ -2713,7 +2717,7 @@ var TextareaInputInset = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2713
2717
|
}, label, isRequired && requiredIndicator && React.createElement("span", null, requiredIndicator))), helpText && React.createElement(HelpText, null, helpText), error && error !== true && React.createElement(InputValidationMessage, null, error));
|
|
2714
2718
|
});
|
|
2715
2719
|
|
|
2716
|
-
var _excluded$
|
|
2720
|
+
var _excluded$i = ["field", "form", "onChange", "id", "label"];
|
|
2717
2721
|
var FormikTextareaInputInset = function FormikTextareaInputInset(_ref) {
|
|
2718
2722
|
var _ref$field = _ref.field,
|
|
2719
2723
|
name = _ref$field.name,
|
|
@@ -2726,7 +2730,7 @@ var FormikTextareaInputInset = function FormikTextareaInputInset(_ref) {
|
|
|
2726
2730
|
onChange = _ref.onChange,
|
|
2727
2731
|
id = _ref.id,
|
|
2728
2732
|
label = _ref.label,
|
|
2729
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2733
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
2730
2734
|
return React.createElement(TextareaInputInset, _extends({}, props, {
|
|
2731
2735
|
id: id,
|
|
2732
2736
|
label: label,
|
|
@@ -2853,7 +2857,7 @@ var TextInputInset = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
2853
2857
|
}, suffix)), helpText && React.createElement(HelpText, null, helpText), error && error !== true && React.createElement(InputValidationMessage, null, error));
|
|
2854
2858
|
});
|
|
2855
2859
|
|
|
2856
|
-
var _excluded$
|
|
2860
|
+
var _excluded$h = ["field", "form", "onChange", "id", "label"];
|
|
2857
2861
|
var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
2858
2862
|
var _ref$field = _ref.field,
|
|
2859
2863
|
name = _ref$field.name,
|
|
@@ -2866,7 +2870,7 @@ var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
|
2866
2870
|
onChange = _ref.onChange,
|
|
2867
2871
|
id = _ref.id,
|
|
2868
2872
|
label = _ref.label,
|
|
2869
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2873
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
2870
2874
|
return React.createElement(TextInputInset, _extends({}, props, {
|
|
2871
2875
|
id: id,
|
|
2872
2876
|
label: label,
|
|
@@ -2880,7 +2884,7 @@ var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
|
2880
2884
|
|
|
2881
2885
|
var styles$a = {"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"};
|
|
2882
2886
|
|
|
2883
|
-
var _excluded$
|
|
2887
|
+
var _excluded$g = ["autoFocus", "label", "hideLabel", "helpText", "error", "id", "isDisabled", "isRequired", "name", "value", "options", "onChange", "placeholder", "requiredIndicator", "size"];
|
|
2884
2888
|
var SelectInputNative = function SelectInputNative(_ref) {
|
|
2885
2889
|
var _ref2;
|
|
2886
2890
|
var _ref$autoFocus = _ref.autoFocus,
|
|
@@ -2902,7 +2906,7 @@ var SelectInputNative = function SelectInputNative(_ref) {
|
|
|
2902
2906
|
requiredIndicator = _ref$requiredIndicato === void 0 ? ' *' : _ref$requiredIndicato,
|
|
2903
2907
|
_ref$size = _ref.size,
|
|
2904
2908
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
2905
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2909
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
2906
2910
|
var placeholderOption = {
|
|
2907
2911
|
value: '',
|
|
2908
2912
|
label: placeholder
|
|
@@ -2948,7 +2952,7 @@ var SelectInputNative = function SelectInputNative(_ref) {
|
|
|
2948
2952
|
}))));
|
|
2949
2953
|
};
|
|
2950
2954
|
|
|
2951
|
-
var _excluded$
|
|
2955
|
+
var _excluded$f = ["field", "form", "onChange", "options", "id", "label"];
|
|
2952
2956
|
var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
2953
2957
|
var _ref$field = _ref.field,
|
|
2954
2958
|
name = _ref$field.name,
|
|
@@ -2962,7 +2966,7 @@ var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
|
2962
2966
|
options = _ref.options,
|
|
2963
2967
|
id = _ref.id,
|
|
2964
2968
|
label = _ref.label,
|
|
2965
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2969
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
2966
2970
|
return React.createElement(SelectInputNative, _extends({}, props, {
|
|
2967
2971
|
options: options,
|
|
2968
2972
|
id: id,
|
|
@@ -2975,7 +2979,7 @@ var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
|
2975
2979
|
}));
|
|
2976
2980
|
};
|
|
2977
2981
|
|
|
2978
|
-
var _excluded$
|
|
2982
|
+
var _excluded$e = ["field", "form", "onChange", "id", "label"];
|
|
2979
2983
|
var FormikTextInput = function FormikTextInput(_ref) {
|
|
2980
2984
|
var _ref$field = _ref.field,
|
|
2981
2985
|
name = _ref$field.name,
|
|
@@ -2988,7 +2992,7 @@ var FormikTextInput = function FormikTextInput(_ref) {
|
|
|
2988
2992
|
onChange = _ref.onChange,
|
|
2989
2993
|
id = _ref.id,
|
|
2990
2994
|
label = _ref.label,
|
|
2991
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2995
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
2992
2996
|
return React.createElement(TextInput, _extends({}, props, {
|
|
2993
2997
|
id: id,
|
|
2994
2998
|
label: label,
|
|
@@ -3002,7 +3006,7 @@ var FormikTextInput = function FormikTextInput(_ref) {
|
|
|
3002
3006
|
|
|
3003
3007
|
var styles$9 = {"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"};
|
|
3004
3008
|
|
|
3005
|
-
var _excluded$
|
|
3009
|
+
var _excluded$d = ["id", "label", "onChange", "value", "autoComplete", "autoFocus", "className", "error", "helpText", "hideLabel", "isDisabled", "isRequired", "maxLength", "name", "onBlur", "onFocus", "placeholder", "requiredIndicator", "resize", "rows", "size"];
|
|
3006
3010
|
var TextareaInput = function TextareaInput(_ref) {
|
|
3007
3011
|
var _ref2;
|
|
3008
3012
|
var id = _ref.id,
|
|
@@ -3042,7 +3046,7 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
3042
3046
|
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
3043
3047
|
_ref$size = _ref.size,
|
|
3044
3048
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
3045
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3049
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
3046
3050
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
3047
3051
|
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$9['textarea-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
3048
3052
|
return styles$9[c];
|
|
@@ -3086,7 +3090,7 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
3086
3090
|
}, inputProps))), error && error !== true && React.createElement(InputValidationMessage, null, error));
|
|
3087
3091
|
};
|
|
3088
3092
|
|
|
3089
|
-
var _excluded$
|
|
3093
|
+
var _excluded$c = ["field", "form", "onChange", "id", "label"];
|
|
3090
3094
|
var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
3091
3095
|
var _ref$field = _ref.field,
|
|
3092
3096
|
name = _ref$field.name,
|
|
@@ -3099,7 +3103,7 @@ var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
|
3099
3103
|
onChange = _ref.onChange,
|
|
3100
3104
|
id = _ref.id,
|
|
3101
3105
|
label = _ref.label,
|
|
3102
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3106
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
3103
3107
|
return React.createElement(TextareaInput, _extends({}, props, {
|
|
3104
3108
|
id: id,
|
|
3105
3109
|
label: label,
|
|
@@ -3111,7 +3115,7 @@ var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
|
3111
3115
|
}));
|
|
3112
3116
|
};
|
|
3113
3117
|
|
|
3114
|
-
var _excluded$
|
|
3118
|
+
var _excluded$b = ["id", "name", "label", "onChange", "value", "dateDisplayOptions", "endTime", "interval", "locales", "placeholder", "startTime"];
|
|
3115
3119
|
var TimePicker = function TimePicker(_ref) {
|
|
3116
3120
|
var id = _ref.id,
|
|
3117
3121
|
name = _ref.name,
|
|
@@ -3133,7 +3137,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
3133
3137
|
placeholder = _ref$placeholder === void 0 ? 'HH:MM' : _ref$placeholder,
|
|
3134
3138
|
_ref$startTime = _ref.startTime,
|
|
3135
3139
|
startTime = _ref$startTime === void 0 ? undefined : _ref$startTime,
|
|
3136
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3140
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
3137
3141
|
var generateTimes = function generateTimes() {
|
|
3138
3142
|
var first = new Date();
|
|
3139
3143
|
first.setHours((startTime == null ? void 0 : startTime.hour) || 0, (startTime == null ? void 0 : startTime.minute) || 0, 0, 0);
|
|
@@ -3161,7 +3165,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
3161
3165
|
}));
|
|
3162
3166
|
};
|
|
3163
3167
|
|
|
3164
|
-
var _excluded$
|
|
3168
|
+
var _excluded$a = ["field", "form", "options", "onChange"];
|
|
3165
3169
|
var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
3166
3170
|
var _ref$field = _ref.field,
|
|
3167
3171
|
name = _ref$field.name,
|
|
@@ -3173,7 +3177,7 @@ var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
|
3173
3177
|
errors = _ref$form.errors,
|
|
3174
3178
|
options = _ref.options,
|
|
3175
3179
|
onChange = _ref.onChange,
|
|
3176
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3180
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
3177
3181
|
return React.createElement(TimePicker, _extends({}, props, {
|
|
3178
3182
|
name: name,
|
|
3179
3183
|
onBlur: onBlur,
|
|
@@ -3184,7 +3188,7 @@ var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
|
3184
3188
|
}));
|
|
3185
3189
|
};
|
|
3186
3190
|
|
|
3187
|
-
var _excluded$
|
|
3191
|
+
var _excluded$9 = ["id", "name", "label", "onChange", "value", "dateDisplayOptions", "endTime", "interval", "locales", "placeholder", "startTime"];
|
|
3188
3192
|
var TimePickerNative = function TimePickerNative(_ref) {
|
|
3189
3193
|
var id = _ref.id,
|
|
3190
3194
|
name = _ref.name,
|
|
@@ -3206,7 +3210,7 @@ var TimePickerNative = function TimePickerNative(_ref) {
|
|
|
3206
3210
|
placeholder = _ref$placeholder === void 0 ? 'HH:MM' : _ref$placeholder,
|
|
3207
3211
|
_ref$startTime = _ref.startTime,
|
|
3208
3212
|
startTime = _ref$startTime === void 0 ? undefined : _ref$startTime,
|
|
3209
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3213
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
3210
3214
|
var generateTimes = function generateTimes() {
|
|
3211
3215
|
var first = new Date();
|
|
3212
3216
|
first.setHours((startTime == null ? void 0 : startTime.hour) || 0, (startTime == null ? void 0 : startTime.minute) || 0, 0, 0);
|
|
@@ -3235,7 +3239,7 @@ var TimePickerNative = function TimePickerNative(_ref) {
|
|
|
3235
3239
|
}));
|
|
3236
3240
|
};
|
|
3237
3241
|
|
|
3238
|
-
var _excluded$
|
|
3242
|
+
var _excluded$8 = ["field", "form", "onChange"];
|
|
3239
3243
|
var FormikTimePickerNative = function FormikTimePickerNative(_ref) {
|
|
3240
3244
|
var _ref$field = _ref.field,
|
|
3241
3245
|
name = _ref$field.name,
|
|
@@ -3246,7 +3250,7 @@ var FormikTimePickerNative = function FormikTimePickerNative(_ref) {
|
|
|
3246
3250
|
touched = _ref$form.touched,
|
|
3247
3251
|
errors = _ref$form.errors,
|
|
3248
3252
|
onChange = _ref.onChange,
|
|
3249
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3253
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
3250
3254
|
return React.createElement(TimePickerNative, _extends({}, props, {
|
|
3251
3255
|
name: name,
|
|
3252
3256
|
onBlur: onBlur,
|
|
@@ -3347,7 +3351,7 @@ var Toggle = function Toggle(_ref) {
|
|
|
3347
3351
|
}, helpText)))), error && error !== true && React.createElement(InputValidationMessage, null, error));
|
|
3348
3352
|
};
|
|
3349
3353
|
|
|
3350
|
-
var _excluded$
|
|
3354
|
+
var _excluded$7 = ["field", "form"];
|
|
3351
3355
|
var FormikToggle = function FormikToggle(_ref) {
|
|
3352
3356
|
var _ref$field = _ref.field,
|
|
3353
3357
|
name = _ref$field.name,
|
|
@@ -3357,7 +3361,7 @@ var FormikToggle = function FormikToggle(_ref) {
|
|
|
3357
3361
|
_ref$form = _ref.form,
|
|
3358
3362
|
touched = _ref$form.touched,
|
|
3359
3363
|
errors = _ref$form.errors,
|
|
3360
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3364
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
3361
3365
|
return React.createElement(Toggle, _extends({
|
|
3362
3366
|
error: formik.getIn(touched, name) && formik.getIn(errors, name),
|
|
3363
3367
|
isChecked: value,
|
|
@@ -3366,7 +3370,7 @@ var FormikToggle = function FormikToggle(_ref) {
|
|
|
3366
3370
|
}, props));
|
|
3367
3371
|
};
|
|
3368
3372
|
|
|
3369
|
-
var _excluded$
|
|
3373
|
+
var _excluded$6 = ["children", "padding", "direction", "alignItems", "justifyContent", "gap", "style"];
|
|
3370
3374
|
var ModalFooter = function ModalFooter(_ref) {
|
|
3371
3375
|
var children = _ref.children,
|
|
3372
3376
|
padding = _ref.padding,
|
|
@@ -3379,7 +3383,7 @@ var ModalFooter = function ModalFooter(_ref) {
|
|
|
3379
3383
|
_ref$gap = _ref.gap,
|
|
3380
3384
|
gap = _ref$gap === void 0 ? 'md' : _ref$gap,
|
|
3381
3385
|
style = _ref.style,
|
|
3382
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3386
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
3383
3387
|
return React.createElement(Box, _extends({
|
|
3384
3388
|
padding: padding,
|
|
3385
3389
|
direction: direction,
|
|
@@ -3422,7 +3426,7 @@ var ModalHeader = function ModalHeader(_ref) {
|
|
|
3422
3426
|
}));
|
|
3423
3427
|
};
|
|
3424
3428
|
|
|
3425
|
-
var _excluded$
|
|
3429
|
+
var _excluded$5 = ["children", "flex", "overflow", "height"];
|
|
3426
3430
|
var ModalBody = function ModalBody(_ref) {
|
|
3427
3431
|
var children = _ref.children,
|
|
3428
3432
|
_ref$flex = _ref.flex,
|
|
@@ -3431,7 +3435,7 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
3431
3435
|
overflow = _ref$overflow === void 0 ? 'auto' : _ref$overflow,
|
|
3432
3436
|
_ref$height = _ref.height,
|
|
3433
3437
|
height = _ref$height === void 0 ? '100' : _ref$height,
|
|
3434
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3438
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
3435
3439
|
return React.createElement(Box, _extends({
|
|
3436
3440
|
flex: flex,
|
|
3437
3441
|
overflow: overflow,
|
|
@@ -3444,7 +3448,7 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
3444
3448
|
|
|
3445
3449
|
var styles$7 = {"modal-close":"Modal-module_modal-close__1YmMa","modal":"Modal-module_modal__yNG-7","modal-content":"Modal-module_modal-content__GMtBm"};
|
|
3446
3450
|
|
|
3447
|
-
var _excluded$
|
|
3451
|
+
var _excluded$4 = ["ariaLabel", "ariaLabelledBy", "allowPinchZoom", "children", "className", "containerRef", "fullScreenMobile", "initialFocusRef", "isOpen", "maxWidth", "onDismiss", "overflow"];
|
|
3448
3452
|
var ModalBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3449
3453
|
var _classNames;
|
|
3450
3454
|
var ariaLabel = _ref.ariaLabel,
|
|
@@ -3464,7 +3468,7 @@ var ModalBaseComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
3464
3468
|
onDismiss = _ref.onDismiss,
|
|
3465
3469
|
_ref$overflow = _ref.overflow,
|
|
3466
3470
|
overflow = _ref$overflow === void 0 ? 'hidden' : _ref$overflow,
|
|
3467
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3471
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
3468
3472
|
var activateFocusLock = React.useCallback(function () {
|
|
3469
3473
|
setTimeout(function () {
|
|
3470
3474
|
if (initialFocusRef && initialFocusRef.current) {
|
|
@@ -3690,7 +3694,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
3690
3694
|
|
|
3691
3695
|
var styles$6 = {"slider":"RangeInput-module_slider__Z6D68","disabled":"RangeInput-module_disabled__gyu72"};
|
|
3692
3696
|
|
|
3693
|
-
var _excluded$
|
|
3697
|
+
var _excluded$3 = ["value", "max", "id", "onChange", "className", "isDisabled"];
|
|
3694
3698
|
var RangeInput = function RangeInput(_ref) {
|
|
3695
3699
|
var _classNames;
|
|
3696
3700
|
var _ref$value = _ref.value,
|
|
@@ -3702,7 +3706,7 @@ var RangeInput = function RangeInput(_ref) {
|
|
|
3702
3706
|
className = _ref.className,
|
|
3703
3707
|
_ref$isDisabled = _ref.isDisabled,
|
|
3704
3708
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
3705
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3709
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
3706
3710
|
var currentProgress = value > 0 ? value / max * 100 : 0;
|
|
3707
3711
|
return React.createElement("input", _extends({}, restProps, {
|
|
3708
3712
|
id: id,
|
|
@@ -3781,6 +3785,454 @@ var ResponsiveProvider = function ResponsiveProvider(_ref) {
|
|
|
3781
3785
|
}, children);
|
|
3782
3786
|
};
|
|
3783
3787
|
|
|
3788
|
+
var desktopBreakpoint = /*#__PURE__*/BREAKPOINTS.find(function (b) {
|
|
3789
|
+
return b.name === 'desktop';
|
|
3790
|
+
});
|
|
3791
|
+
var MOBILE_BREAKPOINT = desktopBreakpoint ? desktopBreakpoint.minWidth : 0; // min width in pixels
|
|
3792
|
+
function useIsMobile() {
|
|
3793
|
+
var _React$useState = React__namespace.useState(undefined),
|
|
3794
|
+
isMobile = _React$useState[0],
|
|
3795
|
+
setIsMobile = _React$useState[1];
|
|
3796
|
+
React__namespace.useEffect(function () {
|
|
3797
|
+
var mql = window.matchMedia("(max-width: " + (MOBILE_BREAKPOINT - 1) + "px)");
|
|
3798
|
+
var onChange = function onChange() {
|
|
3799
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3800
|
+
};
|
|
3801
|
+
mql.addEventListener('change', onChange);
|
|
3802
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3803
|
+
return function () {
|
|
3804
|
+
return mql.removeEventListener('change', onChange);
|
|
3805
|
+
};
|
|
3806
|
+
}, []);
|
|
3807
|
+
return !!isMobile;
|
|
3808
|
+
}
|
|
3809
|
+
|
|
3810
|
+
var _excluded$2 = ["defaultOpen", "open", "onOpenChange", "className", "style", "children"],
|
|
3811
|
+
_excluded2 = ["side", "collapsible", "className", "children"],
|
|
3812
|
+
_excluded3 = ["className", "onClick"],
|
|
3813
|
+
_excluded4 = ["className"],
|
|
3814
|
+
_excluded5 = ["className"],
|
|
3815
|
+
_excluded6 = ["className"],
|
|
3816
|
+
_excluded7 = ["className"],
|
|
3817
|
+
_excluded8 = ["className"],
|
|
3818
|
+
_excluded9 = ["className"],
|
|
3819
|
+
_excluded10 = ["asChild", "isActive", "icon", "className"],
|
|
3820
|
+
_excluded11 = ["className"],
|
|
3821
|
+
_excluded12 = ["className"],
|
|
3822
|
+
_excluded13 = ["className"],
|
|
3823
|
+
_excluded14 = ["asChild", "isActive", "className"],
|
|
3824
|
+
_excluded15 = ["className", "asChild"],
|
|
3825
|
+
_excluded16 = ["className"],
|
|
3826
|
+
_excluded17 = ["className"];
|
|
3827
|
+
var SIDEBAR_COOKIE_NAME = 'sidebar:state';
|
|
3828
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
3829
|
+
var SIDEBAR_WIDTH = '16rem';
|
|
3830
|
+
var SIDEBAR_WIDTH_ICON = '3rem';
|
|
3831
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = '[';
|
|
3832
|
+
var SidebarContext = /*#__PURE__*/React.createContext(null);
|
|
3833
|
+
function useSidebar() {
|
|
3834
|
+
var context = React.useContext(SidebarContext);
|
|
3835
|
+
if (!context) {
|
|
3836
|
+
throw new Error('useSidebar must be used within a SidebarProvider.');
|
|
3837
|
+
}
|
|
3838
|
+
return context;
|
|
3839
|
+
}
|
|
3840
|
+
var SidebarProvider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3841
|
+
var _ref$defaultOpen = _ref.defaultOpen,
|
|
3842
|
+
defaultOpen = _ref$defaultOpen === void 0 ? true : _ref$defaultOpen,
|
|
3843
|
+
openProp = _ref.open,
|
|
3844
|
+
setOpenProp = _ref.onOpenChange,
|
|
3845
|
+
className = _ref.className,
|
|
3846
|
+
style = _ref.style,
|
|
3847
|
+
children = _ref.children,
|
|
3848
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
3849
|
+
var isMobile = useIsMobile();
|
|
3850
|
+
var _useState = React.useState(function () {
|
|
3851
|
+
return isMobile ? false : openProp != null ? openProp : defaultOpen;
|
|
3852
|
+
}),
|
|
3853
|
+
openMobile = _useState[0],
|
|
3854
|
+
setOpenMobile = _useState[1];
|
|
3855
|
+
// Manages sidebar open state with a fallback to internal state when openProp is not provided
|
|
3856
|
+
var _useState2 = React.useState(openProp != null ? openProp : defaultOpen),
|
|
3857
|
+
_open = _useState2[0],
|
|
3858
|
+
_setOpen = _useState2[1];
|
|
3859
|
+
var open = openProp != null ? openProp : _open;
|
|
3860
|
+
// Update open state when openProp or isMobile changes
|
|
3861
|
+
React.useEffect(function () {
|
|
3862
|
+
if (isMobile) {
|
|
3863
|
+
setOpenMobile(false); // Always start closed on mobile
|
|
3864
|
+
} else {
|
|
3865
|
+
_setOpen(openProp != null ? openProp : defaultOpen); // Use desktop state
|
|
3866
|
+
}
|
|
3867
|
+
}, [isMobile, openProp, defaultOpen]);
|
|
3868
|
+
var setOpen = React.useCallback(function (value) {
|
|
3869
|
+
var newOpenState = typeof value === 'function' ? value(open) : value;
|
|
3870
|
+
if (newOpenState !== open) {
|
|
3871
|
+
if (setOpenProp) {
|
|
3872
|
+
setOpenProp(newOpenState);
|
|
3873
|
+
} else {
|
|
3874
|
+
_setOpen(newOpenState);
|
|
3875
|
+
}
|
|
3876
|
+
// Set cookie only if state changes
|
|
3877
|
+
document.cookie = SIDEBAR_COOKIE_NAME + "=" + newOpenState + "; path=/; max-age=" + SIDEBAR_COOKIE_MAX_AGE;
|
|
3878
|
+
}
|
|
3879
|
+
}, [setOpenProp, open]);
|
|
3880
|
+
// Toggle sidebar based on screen type
|
|
3881
|
+
var toggleSidebar = React.useCallback(function () {
|
|
3882
|
+
isMobile ? setOpenMobile(function (open) {
|
|
3883
|
+
return !open;
|
|
3884
|
+
}) : setOpen(function (open) {
|
|
3885
|
+
return !open;
|
|
3886
|
+
});
|
|
3887
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
3888
|
+
// Keydown event handler for toggling sidebar
|
|
3889
|
+
React.useEffect(function () {
|
|
3890
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
3891
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
3892
|
+
event.preventDefault();
|
|
3893
|
+
toggleSidebar();
|
|
3894
|
+
}
|
|
3895
|
+
};
|
|
3896
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
3897
|
+
return function () {
|
|
3898
|
+
return window.removeEventListener('keydown', handleKeyDown);
|
|
3899
|
+
};
|
|
3900
|
+
}, [toggleSidebar]);
|
|
3901
|
+
// Assign state for data attributes
|
|
3902
|
+
var state = open ? 'expanded' : 'collapsed';
|
|
3903
|
+
var contextValue = React.useMemo(function () {
|
|
3904
|
+
return {
|
|
3905
|
+
state: state,
|
|
3906
|
+
open: open,
|
|
3907
|
+
setOpen: setOpen,
|
|
3908
|
+
isMobile: isMobile,
|
|
3909
|
+
openMobile: openMobile,
|
|
3910
|
+
setOpenMobile: setOpenMobile,
|
|
3911
|
+
toggleSidebar: toggleSidebar
|
|
3912
|
+
};
|
|
3913
|
+
}, [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]);
|
|
3914
|
+
return React.createElement(SidebarContext.Provider, {
|
|
3915
|
+
value: contextValue
|
|
3916
|
+
}, React.createElement("div", _extends({
|
|
3917
|
+
style: _extends({
|
|
3918
|
+
'--sidebar-width': SIDEBAR_WIDTH,
|
|
3919
|
+
'--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
|
|
3920
|
+
minBlockSize: '100svh'
|
|
3921
|
+
}, style),
|
|
3922
|
+
className: classNames('display-flex w-100 background-color-secondary', className),
|
|
3923
|
+
ref: ref
|
|
3924
|
+
}, props), children));
|
|
3925
|
+
});
|
|
3926
|
+
SidebarProvider.displayName = 'SidebarProvider';
|
|
3927
|
+
var Sidebar = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
3928
|
+
var _ref2$side = _ref2.side,
|
|
3929
|
+
side = _ref2$side === void 0 ? 'left' : _ref2$side,
|
|
3930
|
+
_ref2$collapsible = _ref2.collapsible,
|
|
3931
|
+
collapsible = _ref2$collapsible === void 0 ? 'offcanvas' : _ref2$collapsible,
|
|
3932
|
+
className = _ref2.className,
|
|
3933
|
+
children = _ref2.children,
|
|
3934
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
3935
|
+
var _useSidebar = useSidebar(),
|
|
3936
|
+
isMobile = _useSidebar.isMobile,
|
|
3937
|
+
state = _useSidebar.state,
|
|
3938
|
+
openMobile = _useSidebar.openMobile,
|
|
3939
|
+
setOpenMobile = _useSidebar.setOpenMobile;
|
|
3940
|
+
if (isMobile) {
|
|
3941
|
+
return React.createElement(Drawer, {
|
|
3942
|
+
isOpen: openMobile,
|
|
3943
|
+
onDismiss: function onDismiss() {
|
|
3944
|
+
return setOpenMobile(false);
|
|
3945
|
+
},
|
|
3946
|
+
placement: side
|
|
3947
|
+
}, React.createElement(Box, {
|
|
3948
|
+
"data-sidebar": "sidebar",
|
|
3949
|
+
"data-mobile": "true"
|
|
3950
|
+
}, children));
|
|
3951
|
+
}
|
|
3952
|
+
if (collapsible === 'none') {
|
|
3953
|
+
return React.createElement("div", _extends({
|
|
3954
|
+
className: classNames('display-flex h-100 font-size-xs flex-direction-column background-color-secondary font-color-base', className),
|
|
3955
|
+
style: {
|
|
3956
|
+
width: 'var(--sidebar-width)'
|
|
3957
|
+
},
|
|
3958
|
+
ref: ref
|
|
3959
|
+
}, props), children);
|
|
3960
|
+
}
|
|
3961
|
+
return React.createElement(Box, {
|
|
3962
|
+
ref: ref,
|
|
3963
|
+
background: "primary",
|
|
3964
|
+
display: {
|
|
3965
|
+
base: 'none',
|
|
3966
|
+
desktop: 'block'
|
|
3967
|
+
},
|
|
3968
|
+
color: "base",
|
|
3969
|
+
fontSize: "sm",
|
|
3970
|
+
"data-state": state,
|
|
3971
|
+
"data-collapsible": collapsible,
|
|
3972
|
+
"data-side": side
|
|
3973
|
+
}, React.createElement("div", {
|
|
3974
|
+
style: {
|
|
3975
|
+
animationTimingFunction: 'var(--sidebar-transition-timing, linear)',
|
|
3976
|
+
transitionTimingFunction: 'var(--sidebar-transition-timing, linear)',
|
|
3977
|
+
transitionDuration: 'var(--sidebar-transition-duration, 200ms)',
|
|
3978
|
+
animationDuration: 'var(--sidebar-transition-duration, 200ms)',
|
|
3979
|
+
transitionProperty: 'width',
|
|
3980
|
+
width: state === 'collapsed' ? '0' : 'var(--sidebar-width)',
|
|
3981
|
+
height: '100svh'
|
|
3982
|
+
},
|
|
3983
|
+
className: classNames('position-relative', className)
|
|
3984
|
+
}), React.createElement("div", _extends({
|
|
3985
|
+
className: classNames('position-fixed display-none display-flex-desktop ', className),
|
|
3986
|
+
style: {
|
|
3987
|
+
left: state === 'expanded' ? '0' : 'calc(var(--sidebar-width)*-1)',
|
|
3988
|
+
top: '0',
|
|
3989
|
+
bottom: '0',
|
|
3990
|
+
zIndex: 'var(--size-z-index-drawer)',
|
|
3991
|
+
transitionProperty: 'left, right, width',
|
|
3992
|
+
width: 'var(--sidebar-width)',
|
|
3993
|
+
height: '100svh'
|
|
3994
|
+
}
|
|
3995
|
+
}, props), React.createElement("div", {
|
|
3996
|
+
"data-sidebar": "sidebar",
|
|
3997
|
+
className: "display-flex h-100 w-100 flex-direction-column background-color-secondary font-color-base"
|
|
3998
|
+
}, children)));
|
|
3999
|
+
});
|
|
4000
|
+
Sidebar.displayName = 'Sidebar';
|
|
4001
|
+
var SidebarTrigger = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
4002
|
+
var className = _ref3.className,
|
|
4003
|
+
_onClick = _ref3.onClick,
|
|
4004
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
4005
|
+
var _useSidebar2 = useSidebar(),
|
|
4006
|
+
toggleSidebar = _useSidebar2.toggleSidebar;
|
|
4007
|
+
return React.createElement(Button, _extends({
|
|
4008
|
+
ref: ref,
|
|
4009
|
+
"data-sidebar": "trigger",
|
|
4010
|
+
variant: "tertiary",
|
|
4011
|
+
size: "sm",
|
|
4012
|
+
iconPrefix: "dock-left",
|
|
4013
|
+
className: classNames('m-left-sm m-left-0-tablet', className),
|
|
4014
|
+
onClick: function onClick(event) {
|
|
4015
|
+
_onClick == null || _onClick(event);
|
|
4016
|
+
toggleSidebar();
|
|
4017
|
+
},
|
|
4018
|
+
"aria-label": "toggle sidebar"
|
|
4019
|
+
}, props));
|
|
4020
|
+
});
|
|
4021
|
+
SidebarTrigger.displayName = 'SidebarTrigger';
|
|
4022
|
+
var SidebarInset = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
4023
|
+
var className = _ref4.className,
|
|
4024
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
4025
|
+
return React.createElement("main", _extends({
|
|
4026
|
+
ref: ref,
|
|
4027
|
+
className: classNames('display-flex flex-auto flex-direction-column g-lg align-items-flex-start p-h-0 p-top-lg p-bottom-0 p-lg-tablet background-color-secondary', className)
|
|
4028
|
+
}, props));
|
|
4029
|
+
});
|
|
4030
|
+
SidebarInset.displayName = 'SidebarInset';
|
|
4031
|
+
var SidebarHeader = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
4032
|
+
var className = _ref5.className,
|
|
4033
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
4034
|
+
return React.createElement("div", _extends({
|
|
4035
|
+
ref: ref,
|
|
4036
|
+
"data-sidebar": "header",
|
|
4037
|
+
className: classNames('display-flex g-sm p-v-md p-h-md p-right-0-desktop', className)
|
|
4038
|
+
}, props));
|
|
4039
|
+
});
|
|
4040
|
+
SidebarHeader.displayName = 'SidebarHeader';
|
|
4041
|
+
var SidebarFooter = /*#__PURE__*/React.forwardRef(function (_ref6, ref) {
|
|
4042
|
+
var className = _ref6.className,
|
|
4043
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded6);
|
|
4044
|
+
return React.createElement("div", _extends({
|
|
4045
|
+
ref: ref,
|
|
4046
|
+
"data-sidebar": "footer",
|
|
4047
|
+
className: classNames('display-flex g-sm p-v-md p-h-md p-right-0-desktop', className)
|
|
4048
|
+
}, props));
|
|
4049
|
+
});
|
|
4050
|
+
SidebarFooter.displayName = 'SidebarFooter';
|
|
4051
|
+
var SidebarContent = /*#__PURE__*/React.forwardRef(function (_ref7, ref) {
|
|
4052
|
+
var className = _ref7.className,
|
|
4053
|
+
props = _objectWithoutPropertiesLoose(_ref7, _excluded7);
|
|
4054
|
+
return React.createElement("div", _extends({
|
|
4055
|
+
ref: ref,
|
|
4056
|
+
"data-sidebar": "content",
|
|
4057
|
+
className: classNames('display-flex flex-direction-column g-xl minh-0 flex-auto overflow-auto', className)
|
|
4058
|
+
}, props));
|
|
4059
|
+
});
|
|
4060
|
+
SidebarContent.displayName = 'SidebarContent';
|
|
4061
|
+
var SidebarMenu = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
|
|
4062
|
+
var className = _ref8.className,
|
|
4063
|
+
props = _objectWithoutPropertiesLoose(_ref8, _excluded8);
|
|
4064
|
+
return React.createElement("ul", _extends({
|
|
4065
|
+
ref: ref,
|
|
4066
|
+
"data-sidebar": "menu",
|
|
4067
|
+
className: classNames('display-flex flex-direction-column w-100 minw-0 g-xs p-0 m-0', className),
|
|
4068
|
+
style: {
|
|
4069
|
+
listStyle: 'none'
|
|
4070
|
+
}
|
|
4071
|
+
}, props));
|
|
4072
|
+
});
|
|
4073
|
+
SidebarMenu.displayName = 'SidebarMenu';
|
|
4074
|
+
var SidebarMenuItem = /*#__PURE__*/React.forwardRef(function (_ref9, ref) {
|
|
4075
|
+
var className = _ref9.className,
|
|
4076
|
+
props = _objectWithoutPropertiesLoose(_ref9, _excluded9);
|
|
4077
|
+
return React.createElement("li", _extends({
|
|
4078
|
+
ref: ref,
|
|
4079
|
+
"data-sidebar": "menu-item",
|
|
4080
|
+
className: classNames('font-size-sm position-relative', className)
|
|
4081
|
+
}, props));
|
|
4082
|
+
});
|
|
4083
|
+
SidebarMenuItem.displayName = 'SidebarMenuItem';
|
|
4084
|
+
var SidebarMenuButton = /*#__PURE__*/React.forwardRef(function (_ref10, ref) {
|
|
4085
|
+
var _ref10$asChild = _ref10.asChild,
|
|
4086
|
+
asChild = _ref10$asChild === void 0 ? false : _ref10$asChild,
|
|
4087
|
+
_ref10$isActive = _ref10.isActive,
|
|
4088
|
+
isActive = _ref10$isActive === void 0 ? false : _ref10$isActive,
|
|
4089
|
+
className = _ref10.className,
|
|
4090
|
+
props = _objectWithoutPropertiesLoose(_ref10, _excluded10);
|
|
4091
|
+
var Comp = asChild ? reactSlot.Slot : 'button';
|
|
4092
|
+
var button = React.createElement(Comp, _extends({
|
|
4093
|
+
ref: ref,
|
|
4094
|
+
"data-sidebar": "menu-button",
|
|
4095
|
+
"data-active": isActive,
|
|
4096
|
+
className: classNames('display-flex w-100 flex-auto p-sm br-sm g-lg flex-direction-row flex-auto align-items-center font-size-sm bw-0 font-weight-medium text-align-left td-none hover:background-color-tertiary font-color-base cursor-pointer', {
|
|
4097
|
+
'background-color-tertiary': isActive,
|
|
4098
|
+
'background-color-transparent': !isActive
|
|
4099
|
+
}, className)
|
|
4100
|
+
}, props), props.children);
|
|
4101
|
+
return button;
|
|
4102
|
+
});
|
|
4103
|
+
SidebarMenuButton.displayName = 'SidebarMenuButton';
|
|
4104
|
+
var SidebarGroup = /*#__PURE__*/React.forwardRef(function (_ref11, ref) {
|
|
4105
|
+
var className = _ref11.className,
|
|
4106
|
+
props = _objectWithoutPropertiesLoose(_ref11, _excluded11);
|
|
4107
|
+
return React.createElement("div", _extends({
|
|
4108
|
+
ref: ref,
|
|
4109
|
+
"data-sidebar": "group",
|
|
4110
|
+
className: classNames('position-relative p-h-md p-right-0-desktop display-flex w-100 minw-0 flex-direction-column', className)
|
|
4111
|
+
}, props));
|
|
4112
|
+
});
|
|
4113
|
+
SidebarGroup.displayName = 'SidebarGroup';
|
|
4114
|
+
var SidebarGroupLabel = /*#__PURE__*/React.forwardRef(function (_ref12, ref) {
|
|
4115
|
+
var className = _ref12.className,
|
|
4116
|
+
props = _objectWithoutPropertiesLoose(_ref12, _excluded12);
|
|
4117
|
+
return React.createElement("div", _extends({
|
|
4118
|
+
ref: ref,
|
|
4119
|
+
"data-sidebar": "group-label",
|
|
4120
|
+
className: classNames('display-flex h-3xl align-items-center br-sm p-h-sm font-color-secondary font-size-xs font-weight-medium outline-none', className)
|
|
4121
|
+
}, props));
|
|
4122
|
+
});
|
|
4123
|
+
SidebarGroupLabel.displayName = 'SidebarGroupLabel';
|
|
4124
|
+
var SidebarMenuSub = /*#__PURE__*/React.forwardRef(function (_ref13, ref) {
|
|
4125
|
+
var className = _ref13.className,
|
|
4126
|
+
props = _objectWithoutPropertiesLoose(_ref13, _excluded13);
|
|
4127
|
+
return React.createElement("ul", _extends({
|
|
4128
|
+
ref: ref,
|
|
4129
|
+
"data-sidebar": "menu-sub",
|
|
4130
|
+
className: classNames('display-flex min-w-0 m-left-xl p-left-sm flex-direction-column g-2xs bw-left-sm border-color-default', className),
|
|
4131
|
+
style: {
|
|
4132
|
+
listStyle: 'none'
|
|
4133
|
+
}
|
|
4134
|
+
}, props));
|
|
4135
|
+
});
|
|
4136
|
+
SidebarMenuSub.displayName = 'SidebarMenuSub';
|
|
4137
|
+
var SidebarMenuSubItem = /*#__PURE__*/React.forwardRef(function (_ref14, ref) {
|
|
4138
|
+
var props = _extends({}, (_objectDestructuringEmpty(_ref14), _ref14));
|
|
4139
|
+
return React.createElement("li", _extends({
|
|
4140
|
+
ref: ref
|
|
4141
|
+
}, props));
|
|
4142
|
+
});
|
|
4143
|
+
SidebarMenuSubItem.displayName = 'SidebarMenuSubItem';
|
|
4144
|
+
var SidebarMenuSubButton = /*#__PURE__*/React.forwardRef(function (_ref15, ref) {
|
|
4145
|
+
var _ref15$asChild = _ref15.asChild,
|
|
4146
|
+
asChild = _ref15$asChild === void 0 ? false : _ref15$asChild,
|
|
4147
|
+
isActive = _ref15.isActive,
|
|
4148
|
+
className = _ref15.className,
|
|
4149
|
+
props = _objectWithoutPropertiesLoose(_ref15, _excluded14);
|
|
4150
|
+
var Comp = asChild ? reactSlot.Slot : 'a';
|
|
4151
|
+
return React.createElement(Comp, _extends({
|
|
4152
|
+
ref: ref,
|
|
4153
|
+
"data-sidebar": "menu-sub-button",
|
|
4154
|
+
"data-active": isActive,
|
|
4155
|
+
className: classNames('display-flex td-none h-4xl p-left-lg font-color-base minw-0 align-items-center gap-sm overflow-hidden br-sm outline-none hover:background-color-tertiary', {
|
|
4156
|
+
'background-color-tertiary': isActive,
|
|
4157
|
+
'background-color-transparent': !isActive
|
|
4158
|
+
}, className)
|
|
4159
|
+
}, props));
|
|
4160
|
+
});
|
|
4161
|
+
SidebarMenuSubButton.displayName = 'SidebarMenuSubButton';
|
|
4162
|
+
var SidebarMenuAction = /*#__PURE__*/React.forwardRef(function (_ref16, ref) {
|
|
4163
|
+
var className = _ref16.className,
|
|
4164
|
+
_ref16$asChild = _ref16.asChild,
|
|
4165
|
+
asChild = _ref16$asChild === void 0 ? false : _ref16$asChild,
|
|
4166
|
+
props = _objectWithoutPropertiesLoose(_ref16, _excluded15);
|
|
4167
|
+
var Comp = asChild ? reactSlot.Slot : 'button';
|
|
4168
|
+
return React.createElement(Comp, _extends({
|
|
4169
|
+
ref: ref,
|
|
4170
|
+
"data-sidebar": "menu-action",
|
|
4171
|
+
className: classNames('position-absolute lh-none p-xs font-color-secondary cursor-pointer hover:font-color-base minw-0 align-items-center bw-0 br-sm outline-none background-color-transparent hover:background-color-tertiary', className),
|
|
4172
|
+
style: {
|
|
4173
|
+
top: 'var(--size-spacing-xs)',
|
|
4174
|
+
right: 'var(--size-spacing-xs)'
|
|
4175
|
+
}
|
|
4176
|
+
}, props));
|
|
4177
|
+
});
|
|
4178
|
+
SidebarMenuAction.displayName = 'SidebarMenuAction';
|
|
4179
|
+
var SidebarRail = /*#__PURE__*/React.forwardRef(function (_ref17, ref) {
|
|
4180
|
+
var className = _ref17.className,
|
|
4181
|
+
props = _objectWithoutPropertiesLoose(_ref17, _excluded16);
|
|
4182
|
+
var _useSidebar3 = useSidebar(),
|
|
4183
|
+
open = _useSidebar3.open,
|
|
4184
|
+
toggleSidebar = _useSidebar3.toggleSidebar;
|
|
4185
|
+
var caretIcon = open ? 'caret-sm-left' : 'caret-sm-right';
|
|
4186
|
+
return React.createElement("button", _extends({
|
|
4187
|
+
ref: ref,
|
|
4188
|
+
"data-sidebar": "rail",
|
|
4189
|
+
"aria-label": "Toggle Sidebar",
|
|
4190
|
+
tabIndex: -1,
|
|
4191
|
+
onClick: toggleSidebar,
|
|
4192
|
+
title: "Toggle Sidebar",
|
|
4193
|
+
className: classNames('hover-show-child display-flex p-top-5xl justify-content-center position-absolute background-color-transparent bw-0', {
|
|
4194
|
+
'cursor-w-resize': open,
|
|
4195
|
+
'cursor-e-resize': !open
|
|
4196
|
+
}, className),
|
|
4197
|
+
style: {
|
|
4198
|
+
top: '0',
|
|
4199
|
+
bottom: '0',
|
|
4200
|
+
right: '-1rem',
|
|
4201
|
+
width: '1rem',
|
|
4202
|
+
zIndex: '-1'
|
|
4203
|
+
}
|
|
4204
|
+
}, props), React.createElement(Box, {
|
|
4205
|
+
radius: "xl",
|
|
4206
|
+
background: "primary",
|
|
4207
|
+
color: "secondary",
|
|
4208
|
+
borderWidth: "sm",
|
|
4209
|
+
padding: "xs",
|
|
4210
|
+
margin: "0 0 0 sm",
|
|
4211
|
+
shadow: "xs",
|
|
4212
|
+
className: classNames('hover-child', {
|
|
4213
|
+
'cursor-w-resize': open,
|
|
4214
|
+
'cursor-e-resize': !open
|
|
4215
|
+
}, className)
|
|
4216
|
+
}, React.createElement(Icon, {
|
|
4217
|
+
name: caretIcon
|
|
4218
|
+
})));
|
|
4219
|
+
});
|
|
4220
|
+
SidebarRail.displayName = 'SidebarRail';
|
|
4221
|
+
var SidebarMenuBadge = /*#__PURE__*/React.forwardRef(function (_ref18, ref) {
|
|
4222
|
+
var className = _ref18.className,
|
|
4223
|
+
props = _objectWithoutPropertiesLoose(_ref18, _excluded17);
|
|
4224
|
+
return React.createElement("div", _extends({
|
|
4225
|
+
ref: ref,
|
|
4226
|
+
"data-sidebar": "menu-badge",
|
|
4227
|
+
className: classNames('position-absolute font-size-xs cursor-default lh-none p-xs font-color-base minw-0 align-items-center bw-0 br-sm outline-none background-color-transparent', className),
|
|
4228
|
+
style: {
|
|
4229
|
+
top: 'var(--size-spacing-sm)',
|
|
4230
|
+
right: 'var(--size-spacing-xs)'
|
|
4231
|
+
}
|
|
4232
|
+
}, props));
|
|
4233
|
+
});
|
|
4234
|
+
SidebarMenuBadge.displayName = 'SidebarMenuBadge';
|
|
4235
|
+
|
|
3784
4236
|
var styles$5 = {"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"};
|
|
3785
4237
|
|
|
3786
4238
|
var styles$4 = {"table-body":"TableBody-module_table-body__Y5WbD","striped":"TableBody-module_striped__5MlEr","hover":"TableBody-module_hover__2CRgY"};
|
|
@@ -4775,28 +5227,6 @@ var useBreakpoint = function useBreakpoint() {
|
|
|
4775
5227
|
};
|
|
4776
5228
|
};
|
|
4777
5229
|
|
|
4778
|
-
var desktopBreakpoint = /*#__PURE__*/BREAKPOINTS.find(function (b) {
|
|
4779
|
-
return b.name === 'desktop';
|
|
4780
|
-
});
|
|
4781
|
-
var MOBILE_BREAKPOINT = desktopBreakpoint ? desktopBreakpoint.minWidth : 0; // min width in pixels
|
|
4782
|
-
function useIsMobile() {
|
|
4783
|
-
var _React$useState = React__namespace.useState(undefined),
|
|
4784
|
-
isMobile = _React$useState[0],
|
|
4785
|
-
setIsMobile = _React$useState[1];
|
|
4786
|
-
React__namespace.useEffect(function () {
|
|
4787
|
-
var mql = window.matchMedia("(max-width: " + (MOBILE_BREAKPOINT - 1) + "px)");
|
|
4788
|
-
var onChange = function onChange() {
|
|
4789
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
4790
|
-
};
|
|
4791
|
-
mql.addEventListener('change', onChange);
|
|
4792
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
4793
|
-
return function () {
|
|
4794
|
-
return mql.removeEventListener('change', onChange);
|
|
4795
|
-
};
|
|
4796
|
-
}, []);
|
|
4797
|
-
return !!isMobile;
|
|
4798
|
-
}
|
|
4799
|
-
|
|
4800
5230
|
var useOpenClose = function useOpenClose(props) {
|
|
4801
5231
|
if (props === void 0) {
|
|
4802
5232
|
props = {};
|
|
@@ -4907,6 +5337,24 @@ exports.ResponsiveProvider = ResponsiveProvider;
|
|
|
4907
5337
|
exports.SelectInput = SelectInput;
|
|
4908
5338
|
exports.SelectInputInset = SelectInputInset;
|
|
4909
5339
|
exports.SelectInputNative = SelectInputNative;
|
|
5340
|
+
exports.Sidebar = Sidebar;
|
|
5341
|
+
exports.SidebarContent = SidebarContent;
|
|
5342
|
+
exports.SidebarFooter = SidebarFooter;
|
|
5343
|
+
exports.SidebarGroup = SidebarGroup;
|
|
5344
|
+
exports.SidebarGroupLabel = SidebarGroupLabel;
|
|
5345
|
+
exports.SidebarHeader = SidebarHeader;
|
|
5346
|
+
exports.SidebarInset = SidebarInset;
|
|
5347
|
+
exports.SidebarMenu = SidebarMenu;
|
|
5348
|
+
exports.SidebarMenuAction = SidebarMenuAction;
|
|
5349
|
+
exports.SidebarMenuBadge = SidebarMenuBadge;
|
|
5350
|
+
exports.SidebarMenuButton = SidebarMenuButton;
|
|
5351
|
+
exports.SidebarMenuItem = SidebarMenuItem;
|
|
5352
|
+
exports.SidebarMenuSub = SidebarMenuSub;
|
|
5353
|
+
exports.SidebarMenuSubButton = SidebarMenuSubButton;
|
|
5354
|
+
exports.SidebarMenuSubItem = SidebarMenuSubItem;
|
|
5355
|
+
exports.SidebarProvider = SidebarProvider;
|
|
5356
|
+
exports.SidebarRail = SidebarRail;
|
|
5357
|
+
exports.SidebarTrigger = SidebarTrigger;
|
|
4910
5358
|
exports.Spinner = Spinner;
|
|
4911
5359
|
exports.Table = Table;
|
|
4912
5360
|
exports.TextInput = TextInput;
|
|
@@ -4926,6 +5374,7 @@ exports.useBreakpoint = useBreakpoint;
|
|
|
4926
5374
|
exports.useIsMobile = useIsMobile;
|
|
4927
5375
|
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
|
4928
5376
|
exports.useOpenClose = useOpenClose;
|
|
5377
|
+
exports.useSidebar = useSidebar;
|
|
4929
5378
|
exports.useTheme = useTheme;
|
|
4930
5379
|
exports.useToasts = useToasts;
|
|
4931
5380
|
exports.useWindowSize = useWindowSize;
|