@hyphen/hyphen-components 2.24.0 → 2.25.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/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 +666 -110
- 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 +634 -111
- package/dist/hyphen-components.esm.js.map +1 -1
- package/dist/index.d.ts +2 -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 +629 -0
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useBreakpoint/useBreakpoint.ts +1 -1
- package/src/index.ts +2 -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
|
@@ -14,11 +14,13 @@ import '@hyphen/hyphen-design-tokens/build/assets/icons';
|
|
|
14
14
|
import ReactModal from 'react-modal';
|
|
15
15
|
import FocusLock from 'react-focus-lock';
|
|
16
16
|
import { RemoveScroll } from 'react-remove-scroll';
|
|
17
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
17
18
|
import { getIn } from 'formik';
|
|
18
19
|
import Select, { components } from 'react-select';
|
|
19
20
|
import AsyncCreatableSelect from 'react-select/async-creatable';
|
|
20
21
|
import AsyncSelect from 'react-select/async';
|
|
21
22
|
import CreatableSelect from 'react-select/creatable';
|
|
23
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
22
24
|
import { v4 } from 'uuid';
|
|
23
25
|
|
|
24
26
|
function _extends() {
|
|
@@ -30,6 +32,9 @@ function _extends() {
|
|
|
30
32
|
return n;
|
|
31
33
|
}, _extends.apply(null, arguments);
|
|
32
34
|
}
|
|
35
|
+
function _objectDestructuringEmpty(t) {
|
|
36
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
37
|
+
}
|
|
33
38
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
34
39
|
if (null == r) return {};
|
|
35
40
|
var t = {};
|
|
@@ -246,7 +251,7 @@ Component, props, getDefault) {
|
|
|
246
251
|
|
|
247
252
|
var styles$w = {"box-transition":"Box-module_box-transition__eQx8C"};
|
|
248
253
|
|
|
249
|
-
var _excluded$
|
|
254
|
+
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"];
|
|
250
255
|
/**
|
|
251
256
|
* A `<Box>` is a layout component to build UIs with consistent padding and spacing between
|
|
252
257
|
* elements.
|
|
@@ -333,7 +338,7 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
333
338
|
width = _ref$width === void 0 ? undefined : _ref$width,
|
|
334
339
|
_ref$zIndex = _ref.zIndex,
|
|
335
340
|
zIndex = _ref$zIndex === void 0 ? undefined : _ref$zIndex,
|
|
336
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
341
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
337
342
|
var heightCss = getDimensionCss('h', height);
|
|
338
343
|
var widthCss = getDimensionCss('w', width);
|
|
339
344
|
var maxHeightCss = getDimensionCss('mh', maxHeight);
|
|
@@ -484,14 +489,14 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
484
489
|
});
|
|
485
490
|
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'];
|
|
486
491
|
|
|
487
|
-
var _excluded$
|
|
492
|
+
var _excluded$K = ["className", "name", "color", "size"];
|
|
488
493
|
var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
489
494
|
var _ref$className = _ref.className,
|
|
490
495
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
491
496
|
name = _ref.name,
|
|
492
497
|
color = _ref.color,
|
|
493
498
|
size = _ref.size,
|
|
494
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
499
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$K);
|
|
495
500
|
var IconComponent = icons[name];
|
|
496
501
|
if (!IconComponent) console.error("Icon '" + name + "' not found"); // eslint-disable-line no-console
|
|
497
502
|
var iconClasses = classNames(className, generateResponsiveClasses('font-color', color), generateResponsiveClasses('font-size', size));
|
|
@@ -530,7 +535,7 @@ var ALERT_ICONS_MAP = {
|
|
|
530
535
|
}
|
|
531
536
|
};
|
|
532
537
|
|
|
533
|
-
var _excluded$
|
|
538
|
+
var _excluded$J = ["className", "closeText", "hasIcon", "isCompact", "isClosable", "message", "onClose", "render", "title", "variant"];
|
|
534
539
|
var Alert = function Alert(_ref) {
|
|
535
540
|
var _ref$className = _ref.className,
|
|
536
541
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -552,7 +557,7 @@ var Alert = function Alert(_ref) {
|
|
|
552
557
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
553
558
|
_ref$variant = _ref.variant,
|
|
554
559
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
555
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
560
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$J);
|
|
556
561
|
var handleClose = function handleClose(event) {
|
|
557
562
|
if (!onClose) return;
|
|
558
563
|
onClose(event);
|
|
@@ -606,7 +611,7 @@ var Alert = function Alert(_ref) {
|
|
|
606
611
|
|
|
607
612
|
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"};
|
|
608
613
|
|
|
609
|
-
var _excluded$
|
|
614
|
+
var _excluded$I = ["className", "message", "variant", "size"];
|
|
610
615
|
var Badge = function Badge(_ref) {
|
|
611
616
|
var _classNames;
|
|
612
617
|
var _ref$className = _ref.className,
|
|
@@ -617,7 +622,7 @@ var Badge = function Badge(_ref) {
|
|
|
617
622
|
variant = _ref$variant === void 0 ? 'light-grey' : _ref$variant,
|
|
618
623
|
_ref$size = _ref.size,
|
|
619
624
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
620
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
625
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
621
626
|
var responsiveClasses = generateResponsiveClasses('size', size).map(function (c) {
|
|
622
627
|
return styles$u[c];
|
|
623
628
|
});
|
|
@@ -752,7 +757,7 @@ var handleReactRouterClick = function handleReactRouterClick(event, onClick, tar
|
|
|
752
757
|
|
|
753
758
|
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"};
|
|
754
759
|
|
|
755
|
-
var _excluded$
|
|
760
|
+
var _excluded$H = ["children", "as", "className", "fullWidth", "id", "href", "iconPrefix", "iconSuffix", "isDisabled", "isLoading", "navigate", "onClick", "onFocus", "onBlur", "shadow", "size", "tabIndex", "target", "type", "variant"];
|
|
756
761
|
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
757
762
|
var _classNames, _extends2;
|
|
758
763
|
var _ref$children = _ref.children,
|
|
@@ -795,7 +800,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
795
800
|
type = _ref$type === void 0 ? undefined : _ref$type,
|
|
796
801
|
_ref$variant = _ref.variant,
|
|
797
802
|
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
798
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
803
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
799
804
|
var disabled = isLoading || isDisabled;
|
|
800
805
|
var responsiveClasses = generateResponsiveClasses('size', size).map(function (c) {
|
|
801
806
|
return styles$s[c];
|
|
@@ -849,7 +854,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
849
854
|
}, _extends2.onFocus = handleFocus, _extends2.ref = ref, _extends2.type = type || (as !== 'a' && !href ? 'button' : undefined), _extends2.tabIndex = tabIndex, _extends2), restProps), buttonContent);
|
|
850
855
|
});
|
|
851
856
|
|
|
852
|
-
var _excluded$
|
|
857
|
+
var _excluded$G = ["background", "borderColor", "borderWidth", "children", "display", "padding"];
|
|
853
858
|
var CardFooter = function CardFooter(_ref) {
|
|
854
859
|
var _ref$background = _ref.background,
|
|
855
860
|
background = _ref$background === void 0 ? 'secondary' : _ref$background,
|
|
@@ -863,7 +868,7 @@ var CardFooter = function CardFooter(_ref) {
|
|
|
863
868
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
864
869
|
_ref$padding = _ref.padding,
|
|
865
870
|
padding = _ref$padding === void 0 ? '2xl' : _ref$padding,
|
|
866
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
871
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
867
872
|
return React__default.createElement(Box, _extends({
|
|
868
873
|
display: display,
|
|
869
874
|
padding: padding,
|
|
@@ -884,7 +889,7 @@ var HEADING_DEFAULT_SIZE_MAP = {
|
|
|
884
889
|
|
|
885
890
|
var styles$r = {"heading":"Heading-module_heading__zKyv7"};
|
|
886
891
|
|
|
887
|
-
var _excluded$
|
|
892
|
+
var _excluded$F = ["as", "children", "className", "color", "size"];
|
|
888
893
|
var Heading = function Heading(_ref) {
|
|
889
894
|
var _classNames;
|
|
890
895
|
var _ref$as = _ref.as,
|
|
@@ -893,7 +898,7 @@ var Heading = function Heading(_ref) {
|
|
|
893
898
|
className = _ref.className,
|
|
894
899
|
color = _ref.color,
|
|
895
900
|
size = _ref.size,
|
|
896
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
901
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
897
902
|
var element = getElementType(Heading, {
|
|
898
903
|
as: as
|
|
899
904
|
});
|
|
@@ -904,7 +909,7 @@ var Heading = function Heading(_ref) {
|
|
|
904
909
|
}, restProps), children);
|
|
905
910
|
};
|
|
906
911
|
|
|
907
|
-
var _excluded$
|
|
912
|
+
var _excluded$E = ["childGap", "children", "className", "display", "padding", "title"];
|
|
908
913
|
var CardHeader = function CardHeader(_ref) {
|
|
909
914
|
var _ref$childGap = _ref.childGap,
|
|
910
915
|
childGap = _ref$childGap === void 0 ? '2xs' : _ref$childGap,
|
|
@@ -918,7 +923,7 @@ var CardHeader = function CardHeader(_ref) {
|
|
|
918
923
|
padding = _ref$padding === void 0 ? '2xl' : _ref$padding,
|
|
919
924
|
_ref$title = _ref.title,
|
|
920
925
|
title = _ref$title === void 0 ? null : _ref$title,
|
|
921
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
926
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
922
927
|
var renderTitle = function renderTitle() {
|
|
923
928
|
return typeof title === 'string' ? React__default.createElement(Heading, {
|
|
924
929
|
size: "sm",
|
|
@@ -935,7 +940,7 @@ var CardHeader = function CardHeader(_ref) {
|
|
|
935
940
|
|
|
936
941
|
var styles$q = {"card-section-border":"Card-module_card-section-border__OefDX"};
|
|
937
942
|
|
|
938
|
-
var _excluded$
|
|
943
|
+
var _excluded$D = ["background", "borderColor", "borderWidth", "children", "childGap", "gap", "className", "display", "padding", "subdued", "title"];
|
|
939
944
|
var CardSection = function CardSection(_ref) {
|
|
940
945
|
var _classNames;
|
|
941
946
|
var _ref$background = _ref.background,
|
|
@@ -960,7 +965,7 @@ var CardSection = function CardSection(_ref) {
|
|
|
960
965
|
subdued = _ref$subdued === void 0 ? undefined : _ref$subdued,
|
|
961
966
|
_ref$title = _ref.title,
|
|
962
967
|
title = _ref$title === void 0 ? undefined : _ref$title,
|
|
963
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
968
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
964
969
|
var renderTitle = typeof title === 'string' ? React__default.createElement(Box, {
|
|
965
970
|
className: "m-bottom-md"
|
|
966
971
|
}, React__default.createElement(Box, {
|
|
@@ -983,7 +988,7 @@ var CardSection = function CardSection(_ref) {
|
|
|
983
988
|
}, children));
|
|
984
989
|
};
|
|
985
990
|
|
|
986
|
-
var _excluded$
|
|
991
|
+
var _excluded$C = ["children", "subdued", "overflow", "display", "width"];
|
|
987
992
|
var CardBaseComponent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
988
993
|
var children = _ref.children,
|
|
989
994
|
subdued = _ref.subdued,
|
|
@@ -993,7 +998,7 @@ var CardBaseComponent = /*#__PURE__*/React__default.forwardRef(function (_ref, r
|
|
|
993
998
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
994
999
|
_ref$width = _ref.width,
|
|
995
1000
|
width = _ref$width === void 0 ? '100' : _ref$width,
|
|
996
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1001
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
997
1002
|
return React__default.createElement(Box, _extends({
|
|
998
1003
|
background: subdued ? 'secondary' : 'primary',
|
|
999
1004
|
borderWidth: "sm",
|
|
@@ -1016,7 +1021,7 @@ var Card = /*#__PURE__*/function () {
|
|
|
1016
1021
|
return Card;
|
|
1017
1022
|
}();
|
|
1018
1023
|
|
|
1019
|
-
var _excluded$
|
|
1024
|
+
var _excluded$B = ["className", "error", "isChecked", "isDisabled", "isIndeterminate"];
|
|
1020
1025
|
var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
1021
1026
|
var _ref$className = _ref.className,
|
|
1022
1027
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
@@ -1028,7 +1033,7 @@ var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
|
1028
1033
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
1029
1034
|
_ref$isIndeterminate = _ref.isIndeterminate,
|
|
1030
1035
|
isIndeterminate = _ref$isIndeterminate === void 0 ? false : _ref$isIndeterminate,
|
|
1031
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1036
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
1032
1037
|
var color = 'base';
|
|
1033
1038
|
var name = 'checkbox-btn';
|
|
1034
1039
|
if (isChecked) name = 'checkbox-btn-checked';else name = 'checkbox-btn';
|
|
@@ -1053,7 +1058,7 @@ var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
|
1053
1058
|
|
|
1054
1059
|
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"};
|
|
1055
1060
|
|
|
1056
|
-
var _excluded$
|
|
1061
|
+
var _excluded$A = ["className", "display", "id", "isChecked", "label", "labelledby", "onChange", "error", "isDisabled", "isHidden", "isIndeterminate", "isRequired", "onBlur", "onFocus", "size", "value"];
|
|
1057
1062
|
var Checkbox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
1058
1063
|
var _ref2;
|
|
1059
1064
|
var _ref$className = _ref.className,
|
|
@@ -1083,7 +1088,7 @@ var Checkbox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1083
1088
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
1084
1089
|
_ref$value = _ref.value,
|
|
1085
1090
|
value = _ref$value === void 0 ? undefined : _ref$value,
|
|
1086
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1091
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
1087
1092
|
var inputRef = React__default.useRef(null);
|
|
1088
1093
|
React__default.useEffect(function () {
|
|
1089
1094
|
if (inputRef != null && inputRef.current) {
|
|
@@ -1172,7 +1177,7 @@ var HelpText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1172
1177
|
}, children);
|
|
1173
1178
|
});
|
|
1174
1179
|
|
|
1175
|
-
var _excluded$
|
|
1180
|
+
var _excluded$z = ["children", "inputId", "className", "display", "helpText", "isDisabled", "isFieldRequired", "isRadioInputLabel", "requiredIndicator", "margin", "padding"];
|
|
1176
1181
|
var FormLabel = function FormLabel(_ref) {
|
|
1177
1182
|
var _classNames;
|
|
1178
1183
|
var children = _ref.children,
|
|
@@ -1194,7 +1199,7 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
1194
1199
|
margin = _ref$margin === void 0 ? '0' : _ref$margin,
|
|
1195
1200
|
_ref$padding = _ref.padding,
|
|
1196
1201
|
padding = _ref$padding === void 0 ? '0' : _ref$padding,
|
|
1197
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1202
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
1198
1203
|
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));
|
|
1199
1204
|
return React__default.createElement(Box, _extends({
|
|
1200
1205
|
as: "label",
|
|
@@ -1207,7 +1212,7 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
1207
1212
|
}, restProps), children, isFieldRequired && requiredIndicator && React__default.createElement("span", null, requiredIndicator), helpText && React__default.createElement(HelpText, null, helpText));
|
|
1208
1213
|
};
|
|
1209
1214
|
|
|
1210
|
-
var _excluded$
|
|
1215
|
+
var _excluded$y = ["id", "isChecked", "label", "onChange", "className", "error", "hideLabel", "helpText", "isDisabled", "isIndeterminate", "isRequired", "onBlur", "onFocus", "requiredIndicator", "size"];
|
|
1211
1216
|
var labelMarginSizeMap = {
|
|
1212
1217
|
sm: '2xs 0 0 0',
|
|
1213
1218
|
md: 'xs 0 0 0',
|
|
@@ -1252,7 +1257,7 @@ var CheckboxInput = function CheckboxInput(_ref2) {
|
|
|
1252
1257
|
requiredIndicator = _ref2$requiredIndicat === void 0 ? ' *' : _ref2$requiredIndicat,
|
|
1253
1258
|
_ref2$size = _ref2.size,
|
|
1254
1259
|
size = _ref2$size === void 0 ? 'md' : _ref2$size,
|
|
1255
|
-
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
1260
|
+
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded$y);
|
|
1256
1261
|
var handleBlur = function handleBlur(event) {
|
|
1257
1262
|
if (onBlur) onBlur(event);
|
|
1258
1263
|
};
|
|
@@ -1300,7 +1305,7 @@ var CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
|
1300
1305
|
|
|
1301
1306
|
var styles$l = {};
|
|
1302
1307
|
|
|
1303
|
-
var _excluded$
|
|
1308
|
+
var _excluded$x = ["children", "dayClassName", "maxDate", "minDate", "monthsShown", "openToDate", "startDate", "selected", "selectsRange", "showTwoColumnMonthYearPicker", "showFullMonthYearPicker", "showMonthYearPicker", "className", "formatWeekDay"];
|
|
1304
1309
|
var DatePicker = function DatePicker(_ref) {
|
|
1305
1310
|
var _ref$children = _ref.children,
|
|
1306
1311
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
@@ -1332,7 +1337,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
1332
1337
|
formatWeekDay = _ref$formatWeekDay === void 0 ? function (formattedDate) {
|
|
1333
1338
|
return formattedDate[0];
|
|
1334
1339
|
} : _ref$formatWeekDay,
|
|
1335
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1340
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
1336
1341
|
var datePickerClasses = classNames(styles$l['react-datepicker'], className);
|
|
1337
1342
|
return React__default.createElement(ReactDatePicker, _extends({
|
|
1338
1343
|
inline: true,
|
|
@@ -1352,7 +1357,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
1352
1357
|
}, restProps), children);
|
|
1353
1358
|
};
|
|
1354
1359
|
|
|
1355
|
-
var _excluded$
|
|
1360
|
+
var _excluded$w = ["label", "hideLabel", "children", "error", "id", "isRequired", "helpText", "isDisabled", "requiredIndicator", "width"];
|
|
1356
1361
|
var FormControl = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
1357
1362
|
var label = _ref.label,
|
|
1358
1363
|
hideLabel = _ref.hideLabel,
|
|
@@ -1365,7 +1370,7 @@ var FormControl = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1365
1370
|
requiredIndicator = _ref.requiredIndicator,
|
|
1366
1371
|
_ref$width = _ref.width,
|
|
1367
1372
|
width = _ref$width === void 0 ? '100' : _ref$width,
|
|
1368
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1373
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
1369
1374
|
var labelProps = {
|
|
1370
1375
|
inputId: id,
|
|
1371
1376
|
helpText: helpText,
|
|
@@ -1393,7 +1398,7 @@ function getAutoCompleteValue(value) {
|
|
|
1393
1398
|
|
|
1394
1399
|
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"};
|
|
1395
1400
|
|
|
1396
|
-
var _excluded$
|
|
1401
|
+
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"];
|
|
1397
1402
|
var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1398
1403
|
var _ref2;
|
|
1399
1404
|
var id = _ref.id,
|
|
@@ -1437,7 +1442,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1437
1442
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
1438
1443
|
_ref$type = _ref.type,
|
|
1439
1444
|
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
1440
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1445
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
1441
1446
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
1442
1447
|
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$k['text-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
1443
1448
|
return styles$k[c];
|
|
@@ -1586,7 +1591,7 @@ var BREAKPOINTS = /*#__PURE__*/[].concat(Object.entries(designTokens.size.breakp
|
|
|
1586
1591
|
var Z_INDEX_VALUES = designTokens.size['z-index'];
|
|
1587
1592
|
// export const BOX_SHADOW_VALUES = designTokens.size['box-shadow'];
|
|
1588
1593
|
|
|
1589
|
-
var _excluded$
|
|
1594
|
+
var _excluded$u = ["className", "isOpen", "children", "content", "arrowColor", "contentContainerProps", "hasArrow", "offsetFromTarget", "onClickOutside", "placement", "withPortal", "portalTarget", "trapFocus"];
|
|
1590
1595
|
var contentContainerDefaults = {
|
|
1591
1596
|
background: 'primary',
|
|
1592
1597
|
padding: 'sm',
|
|
@@ -1615,7 +1620,7 @@ var Popover = function Popover(_ref) {
|
|
|
1615
1620
|
portalTarget = _ref.portalTarget,
|
|
1616
1621
|
_ref$trapFocus = _ref.trapFocus,
|
|
1617
1622
|
trapFocus = _ref$trapFocus === void 0 ? false : _ref$trapFocus,
|
|
1618
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1623
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
1619
1624
|
var triggerRef = useRef(null);
|
|
1620
1625
|
var popperRef = useRef(null);
|
|
1621
1626
|
var _useState = useState(null),
|
|
@@ -1721,7 +1726,7 @@ var Popover = function Popover(_ref) {
|
|
|
1721
1726
|
withPortal && portalTarget ? createPortal(renderPopperContent(), portalTarget) : renderPopperContent()));
|
|
1722
1727
|
};
|
|
1723
1728
|
|
|
1724
|
-
var _excluded$
|
|
1729
|
+
var _excluded$t = ["datePickerProps", "textInputProps", "dateFormat", "dateOptions", "popoverProps"];
|
|
1725
1730
|
var defaultDatePickerProps = {
|
|
1726
1731
|
selected: null,
|
|
1727
1732
|
selectsRange: false
|
|
@@ -1741,7 +1746,7 @@ var DateInput = function DateInput(_ref) {
|
|
|
1741
1746
|
dateOptions = _ref$dateOptions === void 0 ? undefined : _ref$dateOptions,
|
|
1742
1747
|
_ref$popoverProps = _ref.popoverProps,
|
|
1743
1748
|
popoverProps = _ref$popoverProps === void 0 ? _extends({}, defaultPopoverProps) : _ref$popoverProps,
|
|
1744
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1749
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
1745
1750
|
var mergedDatePickerProps = _extends({}, defaultDatePickerProps, datePickerProps);
|
|
1746
1751
|
var mergedPopoverProps = _extends({}, defaultPopoverProps, popoverProps);
|
|
1747
1752
|
var mergedTextInputProps = _extends({}, defaultTextInputProps, textInputProps);
|
|
@@ -1818,14 +1823,14 @@ var DateInput = function DateInput(_ref) {
|
|
|
1818
1823
|
var ENTER = 13;
|
|
1819
1824
|
var SPACE = 32;
|
|
1820
1825
|
|
|
1821
|
-
var _excluded$
|
|
1826
|
+
var _excluded$s = ["children", "display", "isDetailsOpen", "onToggle"];
|
|
1822
1827
|
var DetailsSummary = function DetailsSummary(_ref) {
|
|
1823
1828
|
var children = _ref.children,
|
|
1824
1829
|
_ref$display = _ref.display,
|
|
1825
1830
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1826
1831
|
isDetailsOpen = _ref.isDetailsOpen,
|
|
1827
1832
|
onToggle = _ref.onToggle,
|
|
1828
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1833
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
1829
1834
|
var handleClick = function handleClick(event) {
|
|
1830
1835
|
// Needed to avoid default `details` behavior on a click event and keep this as controlled component.
|
|
1831
1836
|
event.preventDefault();
|
|
@@ -1863,14 +1868,14 @@ var DetailsSummary = function DetailsSummary(_ref) {
|
|
|
1863
1868
|
|
|
1864
1869
|
var styles$i = {"details-reset":"Details-module_details-reset__HWtSD"};
|
|
1865
1870
|
|
|
1866
|
-
var _excluded$
|
|
1871
|
+
var _excluded$r = ["children", "className", "display", "isOpen"];
|
|
1867
1872
|
var DetailsBaseComponent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
1868
1873
|
var children = _ref.children,
|
|
1869
1874
|
className = _ref.className,
|
|
1870
1875
|
_ref$display = _ref.display,
|
|
1871
1876
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1872
1877
|
isOpen = _ref.isOpen,
|
|
1873
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1878
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
1874
1879
|
var detailsClasses = classNames(className, styles$i['details-reset'], styles$i.details);
|
|
1875
1880
|
return React__default.createElement(Box, _extends({
|
|
1876
1881
|
as: "details",
|
|
@@ -2009,7 +2014,103 @@ var Drawer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2009
2014
|
}, renderHeader(), content)))));
|
|
2010
2015
|
});
|
|
2011
2016
|
|
|
2012
|
-
var _excluded$
|
|
2017
|
+
var _excluded$q = ["className", "inset"],
|
|
2018
|
+
_excluded2$1 = ["className", "sideOffset"],
|
|
2019
|
+
_excluded3$1 = ["className", "inset"],
|
|
2020
|
+
_excluded4$1 = ["className"],
|
|
2021
|
+
_excluded5$1 = ["className"],
|
|
2022
|
+
_excluded6$1 = ["className", "inset", "children"],
|
|
2023
|
+
_excluded7$1 = ["className"];
|
|
2024
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2025
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
2026
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
2027
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
2028
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
2029
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
2030
|
+
var DropdownMenuItem = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
2031
|
+
var className = _ref.className,
|
|
2032
|
+
inset = _ref.inset,
|
|
2033
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
2034
|
+
return React__default.createElement(DropdownMenuPrimitive.Item, _extends({
|
|
2035
|
+
ref: ref,
|
|
2036
|
+
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)
|
|
2037
|
+
}, props));
|
|
2038
|
+
});
|
|
2039
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2040
|
+
var DropdownMenuContent = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
2041
|
+
var className = _ref2.className,
|
|
2042
|
+
_ref2$sideOffset = _ref2.sideOffset,
|
|
2043
|
+
sideOffset = _ref2$sideOffset === void 0 ? 4 : _ref2$sideOffset,
|
|
2044
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
|
|
2045
|
+
return React__default.createElement(DropdownMenuPrimitive.Portal, null, React__default.createElement(DropdownMenuPrimitive.Content, _extends({
|
|
2046
|
+
ref: ref,
|
|
2047
|
+
sideOffset: sideOffset,
|
|
2048
|
+
className: classNames('z-index-popover p-xs minw-7xl overflow-hidden br-sm bw-sm border-color-subtle background-color-primary font-color-base shadow-md', className),
|
|
2049
|
+
style: {
|
|
2050
|
+
width: 'var(--radix-dropdown-menu-trigger-width)'
|
|
2051
|
+
}
|
|
2052
|
+
}, props)));
|
|
2053
|
+
});
|
|
2054
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
2055
|
+
var DropdownMenuLabel = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
2056
|
+
var className = _ref3.className,
|
|
2057
|
+
inset = _ref3.inset,
|
|
2058
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$1);
|
|
2059
|
+
return React__default.createElement(DropdownMenuPrimitive.Label, _extends({
|
|
2060
|
+
ref: ref,
|
|
2061
|
+
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)
|
|
2062
|
+
}, props));
|
|
2063
|
+
});
|
|
2064
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2065
|
+
var DropdownMenuSeparator = /*#__PURE__*/React__default.forwardRef(function (_ref4, ref) {
|
|
2066
|
+
var className = _ref4.className,
|
|
2067
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4$1);
|
|
2068
|
+
return React__default.createElement(DropdownMenuPrimitive.Separator, _extends({
|
|
2069
|
+
ref: ref,
|
|
2070
|
+
className: classNames('h-2xs m-v-xs bw-top-sm border-color-subtle', className),
|
|
2071
|
+
style: {
|
|
2072
|
+
marginLeft: 'calc(var(--size-spacing-md)*-1)',
|
|
2073
|
+
marginRight: 'calc(var(--size-spacing-md)*-1)'
|
|
2074
|
+
}
|
|
2075
|
+
}, props));
|
|
2076
|
+
});
|
|
2077
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
2078
|
+
var DropdownMenuShortcut = function DropdownMenuShortcut(_ref5) {
|
|
2079
|
+
var className = _ref5.className,
|
|
2080
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded5$1);
|
|
2081
|
+
return React__default.createElement("span", _extends({
|
|
2082
|
+
className: classNames('m-left-auto font-size-xs font-color-tertiary', className),
|
|
2083
|
+
style: {
|
|
2084
|
+
letterSpacing: '0.5px'
|
|
2085
|
+
}
|
|
2086
|
+
}, props));
|
|
2087
|
+
};
|
|
2088
|
+
DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
|
|
2089
|
+
var DropdownMenuSubTrigger = /*#__PURE__*/React__default.forwardRef(function (_ref6, ref) {
|
|
2090
|
+
var className = _ref6.className,
|
|
2091
|
+
inset = _ref6.inset,
|
|
2092
|
+
children = _ref6.children,
|
|
2093
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded6$1);
|
|
2094
|
+
return React__default.createElement(DropdownMenuPrimitive.SubTrigger, _extends({
|
|
2095
|
+
ref: ref,
|
|
2096
|
+
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)
|
|
2097
|
+
}, props), children, React__default.createElement(Icon, {
|
|
2098
|
+
name: "caret-sm-right",
|
|
2099
|
+
className: "m-left-auto"
|
|
2100
|
+
}));
|
|
2101
|
+
});
|
|
2102
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
2103
|
+
var DropdownMenuSubContent = /*#__PURE__*/React__default.forwardRef(function (_ref7, ref) {
|
|
2104
|
+
var className = _ref7.className,
|
|
2105
|
+
props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
2106
|
+
return React__default.createElement(DropdownMenuPrimitive.SubContent, _extends({
|
|
2107
|
+
ref: ref,
|
|
2108
|
+
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)
|
|
2109
|
+
}, props));
|
|
2110
|
+
});
|
|
2111
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
2112
|
+
|
|
2113
|
+
var _excluded$p = ["field", "form", "onChange", "id", "label"];
|
|
2013
2114
|
var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
2014
2115
|
var _ref$field = _ref.field,
|
|
2015
2116
|
name = _ref$field.name,
|
|
@@ -2022,7 +2123,7 @@ var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
|
2022
2123
|
onChange = _ref.onChange,
|
|
2023
2124
|
id = _ref.id,
|
|
2024
2125
|
label = _ref.label,
|
|
2025
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2126
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
2026
2127
|
return React__default.createElement(CheckboxInput, _extends({}, props, {
|
|
2027
2128
|
id: id,
|
|
2028
2129
|
label: label,
|
|
@@ -2033,7 +2134,7 @@ var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
|
2033
2134
|
}));
|
|
2034
2135
|
};
|
|
2035
2136
|
|
|
2036
|
-
var _excluded$
|
|
2137
|
+
var _excluded$o = ["className", "isSelected", "isDisabled", "error"];
|
|
2037
2138
|
var RadioInputIcon = function RadioInputIcon(_ref) {
|
|
2038
2139
|
var _ref$className = _ref.className,
|
|
2039
2140
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
@@ -2043,7 +2144,7 @@ var RadioInputIcon = function RadioInputIcon(_ref) {
|
|
|
2043
2144
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
2044
2145
|
_ref$error = _ref.error,
|
|
2045
2146
|
error = _ref$error === void 0 ? null : _ref$error,
|
|
2046
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2147
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
2047
2148
|
var color = 'secondary';
|
|
2048
2149
|
var name = 'radio-btn-unchecked';
|
|
2049
2150
|
if (isSelected && isDisabled) {
|
|
@@ -2136,7 +2237,7 @@ var RadioInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
2136
2237
|
|
|
2137
2238
|
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-"};
|
|
2138
2239
|
|
|
2139
|
-
var _excluded$
|
|
2240
|
+
var _excluded$n = ["name", "onChange", "options", "className", "description", "direction", "error", "isDisabled", "isRequired", "onBlur", "onFocus", "requiredIndicator", "size", "title", "value"];
|
|
2140
2241
|
var RadioGroup = function RadioGroup(_ref) {
|
|
2141
2242
|
var _classNames;
|
|
2142
2243
|
var name = _ref.name,
|
|
@@ -2166,7 +2267,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
2166
2267
|
title = _ref$title === void 0 ? undefined : _ref$title,
|
|
2167
2268
|
_ref$value = _ref.value,
|
|
2168
2269
|
value = _ref$value === void 0 ? undefined : _ref$value,
|
|
2169
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2270
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
2170
2271
|
var groupClasses = classNames('hyphen-components__variables__form-control', className, (_classNames = {}, _classNames[styles$f.loading] = error, _classNames));
|
|
2171
2272
|
return React__default.createElement("div", _extends({
|
|
2172
2273
|
className: classNames(styles$f['radio-group'], groupClasses)
|
|
@@ -2196,7 +2297,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
2196
2297
|
}))), error && typeof error !== 'boolean' && React__default.createElement(InputValidationMessage, null, error));
|
|
2197
2298
|
};
|
|
2198
2299
|
|
|
2199
|
-
var _excluded$
|
|
2300
|
+
var _excluded$m = ["field", "form", "onChange", "options"];
|
|
2200
2301
|
var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
2201
2302
|
var _ref$field = _ref.field,
|
|
2202
2303
|
name = _ref$field.name,
|
|
@@ -2208,7 +2309,7 @@ var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
|
2208
2309
|
errors = _ref$form.errors,
|
|
2209
2310
|
onChange = _ref.onChange,
|
|
2210
2311
|
options = _ref.options,
|
|
2211
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2312
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
2212
2313
|
return React__default.createElement(RadioGroup, _extends({}, props, {
|
|
2213
2314
|
options: options,
|
|
2214
2315
|
name: name,
|
|
@@ -2221,7 +2322,7 @@ var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
|
2221
2322
|
|
|
2222
2323
|
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"};
|
|
2223
2324
|
|
|
2224
|
-
var _excluded$
|
|
2325
|
+
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"];
|
|
2225
2326
|
function SelectInput(props) {
|
|
2226
2327
|
var _ref, _classNames;
|
|
2227
2328
|
var id = props.id,
|
|
@@ -2264,7 +2365,7 @@ function SelectInput(props) {
|
|
|
2264
2365
|
requiredIndicator = _props$requiredIndica === void 0 ? ' *' : _props$requiredIndica,
|
|
2265
2366
|
_props$size = props.size,
|
|
2266
2367
|
size = _props$size === void 0 ? 'md' : _props$size,
|
|
2267
|
-
restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2368
|
+
restProps = _objectWithoutPropertiesLoose(props, _excluded$l);
|
|
2268
2369
|
var handleChange = function handleChange(values) {
|
|
2269
2370
|
var simulatedEventPayloadType = {
|
|
2270
2371
|
target: {
|
|
@@ -2337,7 +2438,7 @@ function SelectInput(props) {
|
|
|
2337
2438
|
})), error && typeof error !== 'boolean' && React__default.createElement(InputValidationMessage, null, error));
|
|
2338
2439
|
}
|
|
2339
2440
|
|
|
2340
|
-
var _excluded$
|
|
2441
|
+
var _excluded$k = ["field", "form", "onChange", "id", "label", "options", "error"];
|
|
2341
2442
|
var FormikSelectInput = function FormikSelectInput(_ref) {
|
|
2342
2443
|
var _ref$field = _ref.field,
|
|
2343
2444
|
name = _ref$field.name,
|
|
@@ -2352,7 +2453,7 @@ var FormikSelectInput = function FormikSelectInput(_ref) {
|
|
|
2352
2453
|
label = _ref.label,
|
|
2353
2454
|
options = _ref.options,
|
|
2354
2455
|
errorProp = _ref.error,
|
|
2355
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2456
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
2356
2457
|
var errorMessage;
|
|
2357
2458
|
var error = errorProp != null ? errorProp : getIn(touched, name) && getIn(errors, name);
|
|
2358
2459
|
if (typeof error === 'string') {
|
|
@@ -2480,7 +2581,7 @@ var SelectInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2480
2581
|
}, 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));
|
|
2481
2582
|
});
|
|
2482
2583
|
|
|
2483
|
-
var _excluded$
|
|
2584
|
+
var _excluded$j = ["field", "form", "onChange", "id", "label", "options"];
|
|
2484
2585
|
var FormikSelectInputInset = function FormikSelectInputInset(_ref) {
|
|
2485
2586
|
var _ref$field = _ref.field,
|
|
2486
2587
|
name = _ref$field.name,
|
|
@@ -2494,7 +2595,7 @@ var FormikSelectInputInset = function FormikSelectInputInset(_ref) {
|
|
|
2494
2595
|
id = _ref.id,
|
|
2495
2596
|
label = _ref.label,
|
|
2496
2597
|
options = _ref.options,
|
|
2497
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2598
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
2498
2599
|
return React__default.createElement(SelectInputInset, _extends({}, props, {
|
|
2499
2600
|
id: id,
|
|
2500
2601
|
label: label,
|
|
@@ -2592,7 +2693,7 @@ var TextareaInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2592
2693
|
}, 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));
|
|
2593
2694
|
});
|
|
2594
2695
|
|
|
2595
|
-
var _excluded$
|
|
2696
|
+
var _excluded$i = ["field", "form", "onChange", "id", "label"];
|
|
2596
2697
|
var FormikTextareaInputInset = function FormikTextareaInputInset(_ref) {
|
|
2597
2698
|
var _ref$field = _ref.field,
|
|
2598
2699
|
name = _ref$field.name,
|
|
@@ -2605,7 +2706,7 @@ var FormikTextareaInputInset = function FormikTextareaInputInset(_ref) {
|
|
|
2605
2706
|
onChange = _ref.onChange,
|
|
2606
2707
|
id = _ref.id,
|
|
2607
2708
|
label = _ref.label,
|
|
2608
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2709
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
2609
2710
|
return React__default.createElement(TextareaInputInset, _extends({}, props, {
|
|
2610
2711
|
id: id,
|
|
2611
2712
|
label: label,
|
|
@@ -2732,7 +2833,7 @@ var TextInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2732
2833
|
}, suffix)), helpText && React__default.createElement(HelpText, null, helpText), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
2733
2834
|
});
|
|
2734
2835
|
|
|
2735
|
-
var _excluded$
|
|
2836
|
+
var _excluded$h = ["field", "form", "onChange", "id", "label"];
|
|
2736
2837
|
var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
2737
2838
|
var _ref$field = _ref.field,
|
|
2738
2839
|
name = _ref$field.name,
|
|
@@ -2745,7 +2846,7 @@ var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
|
2745
2846
|
onChange = _ref.onChange,
|
|
2746
2847
|
id = _ref.id,
|
|
2747
2848
|
label = _ref.label,
|
|
2748
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2849
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
2749
2850
|
return React__default.createElement(TextInputInset, _extends({}, props, {
|
|
2750
2851
|
id: id,
|
|
2751
2852
|
label: label,
|
|
@@ -2759,7 +2860,7 @@ var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
|
2759
2860
|
|
|
2760
2861
|
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"};
|
|
2761
2862
|
|
|
2762
|
-
var _excluded$
|
|
2863
|
+
var _excluded$g = ["autoFocus", "label", "hideLabel", "helpText", "error", "id", "isDisabled", "isRequired", "name", "value", "options", "onChange", "placeholder", "requiredIndicator", "size"];
|
|
2763
2864
|
var SelectInputNative = function SelectInputNative(_ref) {
|
|
2764
2865
|
var _ref2;
|
|
2765
2866
|
var _ref$autoFocus = _ref.autoFocus,
|
|
@@ -2781,7 +2882,7 @@ var SelectInputNative = function SelectInputNative(_ref) {
|
|
|
2781
2882
|
requiredIndicator = _ref$requiredIndicato === void 0 ? ' *' : _ref$requiredIndicato,
|
|
2782
2883
|
_ref$size = _ref.size,
|
|
2783
2884
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
2784
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2885
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
2785
2886
|
var placeholderOption = {
|
|
2786
2887
|
value: '',
|
|
2787
2888
|
label: placeholder
|
|
@@ -2827,7 +2928,7 @@ var SelectInputNative = function SelectInputNative(_ref) {
|
|
|
2827
2928
|
}))));
|
|
2828
2929
|
};
|
|
2829
2930
|
|
|
2830
|
-
var _excluded$
|
|
2931
|
+
var _excluded$f = ["field", "form", "onChange", "options", "id", "label"];
|
|
2831
2932
|
var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
2832
2933
|
var _ref$field = _ref.field,
|
|
2833
2934
|
name = _ref$field.name,
|
|
@@ -2841,7 +2942,7 @@ var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
|
2841
2942
|
options = _ref.options,
|
|
2842
2943
|
id = _ref.id,
|
|
2843
2944
|
label = _ref.label,
|
|
2844
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2945
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
2845
2946
|
return React__default.createElement(SelectInputNative, _extends({}, props, {
|
|
2846
2947
|
options: options,
|
|
2847
2948
|
id: id,
|
|
@@ -2854,7 +2955,7 @@ var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
|
2854
2955
|
}));
|
|
2855
2956
|
};
|
|
2856
2957
|
|
|
2857
|
-
var _excluded$
|
|
2958
|
+
var _excluded$e = ["field", "form", "onChange", "id", "label"];
|
|
2858
2959
|
var FormikTextInput = function FormikTextInput(_ref) {
|
|
2859
2960
|
var _ref$field = _ref.field,
|
|
2860
2961
|
name = _ref$field.name,
|
|
@@ -2867,7 +2968,7 @@ var FormikTextInput = function FormikTextInput(_ref) {
|
|
|
2867
2968
|
onChange = _ref.onChange,
|
|
2868
2969
|
id = _ref.id,
|
|
2869
2970
|
label = _ref.label,
|
|
2870
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2971
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
2871
2972
|
return React__default.createElement(TextInput, _extends({}, props, {
|
|
2872
2973
|
id: id,
|
|
2873
2974
|
label: label,
|
|
@@ -2881,7 +2982,7 @@ var FormikTextInput = function FormikTextInput(_ref) {
|
|
|
2881
2982
|
|
|
2882
2983
|
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"};
|
|
2883
2984
|
|
|
2884
|
-
var _excluded$
|
|
2985
|
+
var _excluded$d = ["id", "label", "onChange", "value", "autoComplete", "autoFocus", "className", "error", "helpText", "hideLabel", "isDisabled", "isRequired", "maxLength", "name", "onBlur", "onFocus", "placeholder", "requiredIndicator", "resize", "rows", "size"];
|
|
2885
2986
|
var TextareaInput = function TextareaInput(_ref) {
|
|
2886
2987
|
var _ref2;
|
|
2887
2988
|
var id = _ref.id,
|
|
@@ -2921,7 +3022,7 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
2921
3022
|
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
2922
3023
|
_ref$size = _ref.size,
|
|
2923
3024
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
2924
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3025
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
2925
3026
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
2926
3027
|
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$9['textarea-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
2927
3028
|
return styles$9[c];
|
|
@@ -2965,7 +3066,7 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
2965
3066
|
}, inputProps))), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
2966
3067
|
};
|
|
2967
3068
|
|
|
2968
|
-
var _excluded$
|
|
3069
|
+
var _excluded$c = ["field", "form", "onChange", "id", "label"];
|
|
2969
3070
|
var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
2970
3071
|
var _ref$field = _ref.field,
|
|
2971
3072
|
name = _ref$field.name,
|
|
@@ -2978,7 +3079,7 @@ var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
|
2978
3079
|
onChange = _ref.onChange,
|
|
2979
3080
|
id = _ref.id,
|
|
2980
3081
|
label = _ref.label,
|
|
2981
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3082
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
2982
3083
|
return React__default.createElement(TextareaInput, _extends({}, props, {
|
|
2983
3084
|
id: id,
|
|
2984
3085
|
label: label,
|
|
@@ -2990,7 +3091,7 @@ var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
|
2990
3091
|
}));
|
|
2991
3092
|
};
|
|
2992
3093
|
|
|
2993
|
-
var _excluded$
|
|
3094
|
+
var _excluded$b = ["id", "name", "label", "onChange", "value", "dateDisplayOptions", "endTime", "interval", "locales", "placeholder", "startTime"];
|
|
2994
3095
|
var TimePicker = function TimePicker(_ref) {
|
|
2995
3096
|
var id = _ref.id,
|
|
2996
3097
|
name = _ref.name,
|
|
@@ -3012,7 +3113,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
3012
3113
|
placeholder = _ref$placeholder === void 0 ? 'HH:MM' : _ref$placeholder,
|
|
3013
3114
|
_ref$startTime = _ref.startTime,
|
|
3014
3115
|
startTime = _ref$startTime === void 0 ? undefined : _ref$startTime,
|
|
3015
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3116
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
3016
3117
|
var generateTimes = function generateTimes() {
|
|
3017
3118
|
var first = new Date();
|
|
3018
3119
|
first.setHours((startTime == null ? void 0 : startTime.hour) || 0, (startTime == null ? void 0 : startTime.minute) || 0, 0, 0);
|
|
@@ -3040,7 +3141,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
3040
3141
|
}));
|
|
3041
3142
|
};
|
|
3042
3143
|
|
|
3043
|
-
var _excluded$
|
|
3144
|
+
var _excluded$a = ["field", "form", "options", "onChange"];
|
|
3044
3145
|
var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
3045
3146
|
var _ref$field = _ref.field,
|
|
3046
3147
|
name = _ref$field.name,
|
|
@@ -3052,7 +3153,7 @@ var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
|
3052
3153
|
errors = _ref$form.errors,
|
|
3053
3154
|
options = _ref.options,
|
|
3054
3155
|
onChange = _ref.onChange,
|
|
3055
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3156
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
3056
3157
|
return React__default.createElement(TimePicker, _extends({}, props, {
|
|
3057
3158
|
name: name,
|
|
3058
3159
|
onBlur: onBlur,
|
|
@@ -3063,7 +3164,7 @@ var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
|
3063
3164
|
}));
|
|
3064
3165
|
};
|
|
3065
3166
|
|
|
3066
|
-
var _excluded$
|
|
3167
|
+
var _excluded$9 = ["id", "name", "label", "onChange", "value", "dateDisplayOptions", "endTime", "interval", "locales", "placeholder", "startTime"];
|
|
3067
3168
|
var TimePickerNative = function TimePickerNative(_ref) {
|
|
3068
3169
|
var id = _ref.id,
|
|
3069
3170
|
name = _ref.name,
|
|
@@ -3085,7 +3186,7 @@ var TimePickerNative = function TimePickerNative(_ref) {
|
|
|
3085
3186
|
placeholder = _ref$placeholder === void 0 ? 'HH:MM' : _ref$placeholder,
|
|
3086
3187
|
_ref$startTime = _ref.startTime,
|
|
3087
3188
|
startTime = _ref$startTime === void 0 ? undefined : _ref$startTime,
|
|
3088
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3189
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
3089
3190
|
var generateTimes = function generateTimes() {
|
|
3090
3191
|
var first = new Date();
|
|
3091
3192
|
first.setHours((startTime == null ? void 0 : startTime.hour) || 0, (startTime == null ? void 0 : startTime.minute) || 0, 0, 0);
|
|
@@ -3114,7 +3215,7 @@ var TimePickerNative = function TimePickerNative(_ref) {
|
|
|
3114
3215
|
}));
|
|
3115
3216
|
};
|
|
3116
3217
|
|
|
3117
|
-
var _excluded$
|
|
3218
|
+
var _excluded$8 = ["field", "form", "onChange"];
|
|
3118
3219
|
var FormikTimePickerNative = function FormikTimePickerNative(_ref) {
|
|
3119
3220
|
var _ref$field = _ref.field,
|
|
3120
3221
|
name = _ref$field.name,
|
|
@@ -3125,7 +3226,7 @@ var FormikTimePickerNative = function FormikTimePickerNative(_ref) {
|
|
|
3125
3226
|
touched = _ref$form.touched,
|
|
3126
3227
|
errors = _ref$form.errors,
|
|
3127
3228
|
onChange = _ref.onChange,
|
|
3128
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3229
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
3129
3230
|
return React__default.createElement(TimePickerNative, _extends({}, props, {
|
|
3130
3231
|
name: name,
|
|
3131
3232
|
onBlur: onBlur,
|
|
@@ -3226,7 +3327,7 @@ var Toggle = function Toggle(_ref) {
|
|
|
3226
3327
|
}, helpText)))), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
3227
3328
|
};
|
|
3228
3329
|
|
|
3229
|
-
var _excluded$
|
|
3330
|
+
var _excluded$7 = ["field", "form"];
|
|
3230
3331
|
var FormikToggle = function FormikToggle(_ref) {
|
|
3231
3332
|
var _ref$field = _ref.field,
|
|
3232
3333
|
name = _ref$field.name,
|
|
@@ -3236,7 +3337,7 @@ var FormikToggle = function FormikToggle(_ref) {
|
|
|
3236
3337
|
_ref$form = _ref.form,
|
|
3237
3338
|
touched = _ref$form.touched,
|
|
3238
3339
|
errors = _ref$form.errors,
|
|
3239
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3340
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
3240
3341
|
return React__default.createElement(Toggle, _extends({
|
|
3241
3342
|
error: getIn(touched, name) && getIn(errors, name),
|
|
3242
3343
|
isChecked: value,
|
|
@@ -3245,7 +3346,7 @@ var FormikToggle = function FormikToggle(_ref) {
|
|
|
3245
3346
|
}, props));
|
|
3246
3347
|
};
|
|
3247
3348
|
|
|
3248
|
-
var _excluded$
|
|
3349
|
+
var _excluded$6 = ["children", "padding", "direction", "alignItems", "justifyContent", "gap", "style"];
|
|
3249
3350
|
var ModalFooter = function ModalFooter(_ref) {
|
|
3250
3351
|
var children = _ref.children,
|
|
3251
3352
|
padding = _ref.padding,
|
|
@@ -3258,7 +3359,7 @@ var ModalFooter = function ModalFooter(_ref) {
|
|
|
3258
3359
|
_ref$gap = _ref.gap,
|
|
3259
3360
|
gap = _ref$gap === void 0 ? 'md' : _ref$gap,
|
|
3260
3361
|
style = _ref.style,
|
|
3261
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3362
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
3262
3363
|
return React__default.createElement(Box, _extends({
|
|
3263
3364
|
padding: padding,
|
|
3264
3365
|
direction: direction,
|
|
@@ -3301,7 +3402,7 @@ var ModalHeader = function ModalHeader(_ref) {
|
|
|
3301
3402
|
}));
|
|
3302
3403
|
};
|
|
3303
3404
|
|
|
3304
|
-
var _excluded$
|
|
3405
|
+
var _excluded$5 = ["children", "flex", "overflow", "height"];
|
|
3305
3406
|
var ModalBody = function ModalBody(_ref) {
|
|
3306
3407
|
var children = _ref.children,
|
|
3307
3408
|
_ref$flex = _ref.flex,
|
|
@@ -3310,7 +3411,7 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
3310
3411
|
overflow = _ref$overflow === void 0 ? 'auto' : _ref$overflow,
|
|
3311
3412
|
_ref$height = _ref.height,
|
|
3312
3413
|
height = _ref$height === void 0 ? '100' : _ref$height,
|
|
3313
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3414
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
3314
3415
|
return React__default.createElement(Box, _extends({
|
|
3315
3416
|
flex: flex,
|
|
3316
3417
|
overflow: overflow,
|
|
@@ -3323,7 +3424,7 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
3323
3424
|
|
|
3324
3425
|
var styles$7 = {"modal-close":"Modal-module_modal-close__1YmMa","modal":"Modal-module_modal__yNG-7","modal-content":"Modal-module_modal-content__GMtBm"};
|
|
3325
3426
|
|
|
3326
|
-
var _excluded$
|
|
3427
|
+
var _excluded$4 = ["ariaLabel", "ariaLabelledBy", "allowPinchZoom", "children", "className", "containerRef", "fullScreenMobile", "initialFocusRef", "isOpen", "maxWidth", "onDismiss", "overflow"];
|
|
3327
3428
|
var ModalBaseComponent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3328
3429
|
var _classNames;
|
|
3329
3430
|
var ariaLabel = _ref.ariaLabel,
|
|
@@ -3343,7 +3444,7 @@ var ModalBaseComponent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3343
3444
|
onDismiss = _ref.onDismiss,
|
|
3344
3445
|
_ref$overflow = _ref.overflow,
|
|
3345
3446
|
overflow = _ref$overflow === void 0 ? 'hidden' : _ref$overflow,
|
|
3346
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3447
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
3347
3448
|
var activateFocusLock = useCallback(function () {
|
|
3348
3449
|
setTimeout(function () {
|
|
3349
3450
|
if (initialFocusRef && initialFocusRef.current) {
|
|
@@ -3569,7 +3670,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
3569
3670
|
|
|
3570
3671
|
var styles$6 = {"slider":"RangeInput-module_slider__Z6D68","disabled":"RangeInput-module_disabled__gyu72"};
|
|
3571
3672
|
|
|
3572
|
-
var _excluded$
|
|
3673
|
+
var _excluded$3 = ["value", "max", "id", "onChange", "className", "isDisabled"];
|
|
3573
3674
|
var RangeInput = function RangeInput(_ref) {
|
|
3574
3675
|
var _classNames;
|
|
3575
3676
|
var _ref$value = _ref.value,
|
|
@@ -3581,7 +3682,7 @@ var RangeInput = function RangeInput(_ref) {
|
|
|
3581
3682
|
className = _ref.className,
|
|
3582
3683
|
_ref$isDisabled = _ref.isDisabled,
|
|
3583
3684
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
3584
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3685
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
3585
3686
|
var currentProgress = value > 0 ? value / max * 100 : 0;
|
|
3586
3687
|
return React__default.createElement("input", _extends({}, restProps, {
|
|
3587
3688
|
id: id,
|
|
@@ -3660,6 +3761,450 @@ var ResponsiveProvider = function ResponsiveProvider(_ref) {
|
|
|
3660
3761
|
}, children);
|
|
3661
3762
|
};
|
|
3662
3763
|
|
|
3764
|
+
var desktopBreakpoint = /*#__PURE__*/BREAKPOINTS.find(function (b) {
|
|
3765
|
+
return b.name === 'desktop';
|
|
3766
|
+
});
|
|
3767
|
+
var MOBILE_BREAKPOINT = desktopBreakpoint ? desktopBreakpoint.minWidth : 0; // min width in pixels
|
|
3768
|
+
function useIsMobile() {
|
|
3769
|
+
var _React$useState = React.useState(undefined),
|
|
3770
|
+
isMobile = _React$useState[0],
|
|
3771
|
+
setIsMobile = _React$useState[1];
|
|
3772
|
+
React.useEffect(function () {
|
|
3773
|
+
var mql = window.matchMedia("(max-width: " + (MOBILE_BREAKPOINT - 1) + "px)");
|
|
3774
|
+
var onChange = function onChange() {
|
|
3775
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3776
|
+
};
|
|
3777
|
+
mql.addEventListener('change', onChange);
|
|
3778
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3779
|
+
return function () {
|
|
3780
|
+
return mql.removeEventListener('change', onChange);
|
|
3781
|
+
};
|
|
3782
|
+
}, []);
|
|
3783
|
+
return !!isMobile;
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
var _excluded$2 = ["defaultOpen", "open", "onOpenChange", "className", "style", "children"],
|
|
3787
|
+
_excluded2 = ["side", "collapsible", "className", "children"],
|
|
3788
|
+
_excluded3 = ["className", "onClick"],
|
|
3789
|
+
_excluded4 = ["className"],
|
|
3790
|
+
_excluded5 = ["className"],
|
|
3791
|
+
_excluded6 = ["className"],
|
|
3792
|
+
_excluded7 = ["className"],
|
|
3793
|
+
_excluded8 = ["className"],
|
|
3794
|
+
_excluded9 = ["className"],
|
|
3795
|
+
_excluded10 = ["asChild", "isActive", "icon", "className"],
|
|
3796
|
+
_excluded11 = ["className"],
|
|
3797
|
+
_excluded12 = ["className"],
|
|
3798
|
+
_excluded13 = ["className"],
|
|
3799
|
+
_excluded14 = ["asChild", "isActive", "className"],
|
|
3800
|
+
_excluded15 = ["className", "asChild"],
|
|
3801
|
+
_excluded16 = ["className"],
|
|
3802
|
+
_excluded17 = ["className"];
|
|
3803
|
+
var SIDEBAR_COOKIE_NAME = 'sidebar:state';
|
|
3804
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
3805
|
+
var SIDEBAR_WIDTH = '16rem';
|
|
3806
|
+
var SIDEBAR_WIDTH_ICON = '3rem';
|
|
3807
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = '[';
|
|
3808
|
+
var SidebarContext = /*#__PURE__*/React__default.createContext(null);
|
|
3809
|
+
function useSidebar() {
|
|
3810
|
+
var context = React__default.useContext(SidebarContext);
|
|
3811
|
+
if (!context) {
|
|
3812
|
+
throw new Error('useSidebar must be used within a SidebarProvider.');
|
|
3813
|
+
}
|
|
3814
|
+
return context;
|
|
3815
|
+
}
|
|
3816
|
+
var SidebarProvider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3817
|
+
var _ref$defaultOpen = _ref.defaultOpen,
|
|
3818
|
+
defaultOpen = _ref$defaultOpen === void 0 ? true : _ref$defaultOpen,
|
|
3819
|
+
openProp = _ref.open,
|
|
3820
|
+
setOpenProp = _ref.onOpenChange,
|
|
3821
|
+
className = _ref.className,
|
|
3822
|
+
style = _ref.style,
|
|
3823
|
+
children = _ref.children,
|
|
3824
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
3825
|
+
var isMobile = useIsMobile();
|
|
3826
|
+
var _useState = useState(openProp != null ? openProp : defaultOpen),
|
|
3827
|
+
openMobile = _useState[0],
|
|
3828
|
+
setOpenMobile = _useState[1];
|
|
3829
|
+
// Manages sidebar open state with a fallback to internal state when openProp is not provided
|
|
3830
|
+
var _useState2 = useState(openProp != null ? openProp : defaultOpen),
|
|
3831
|
+
_open = _useState2[0],
|
|
3832
|
+
_setOpen = _useState2[1];
|
|
3833
|
+
var open = openProp != null ? openProp : _open;
|
|
3834
|
+
var setOpen = useCallback(function (value) {
|
|
3835
|
+
var newOpenState = typeof value === 'function' ? value(open) : value;
|
|
3836
|
+
if (newOpenState !== open) {
|
|
3837
|
+
if (setOpenProp) {
|
|
3838
|
+
setOpenProp(newOpenState);
|
|
3839
|
+
} else {
|
|
3840
|
+
_setOpen(newOpenState);
|
|
3841
|
+
}
|
|
3842
|
+
// Set cookie only if state changes
|
|
3843
|
+
document.cookie = SIDEBAR_COOKIE_NAME + "=" + newOpenState + "; path=/; max-age=" + SIDEBAR_COOKIE_MAX_AGE;
|
|
3844
|
+
}
|
|
3845
|
+
}, [setOpenProp, open]);
|
|
3846
|
+
// Toggle sidebar based on screen type
|
|
3847
|
+
var toggleSidebar = useCallback(function () {
|
|
3848
|
+
isMobile ? setOpenMobile(function (open) {
|
|
3849
|
+
return !open;
|
|
3850
|
+
}) : setOpen(function (open) {
|
|
3851
|
+
return !open;
|
|
3852
|
+
});
|
|
3853
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
3854
|
+
// Keydown event handler for toggling sidebar
|
|
3855
|
+
useEffect(function () {
|
|
3856
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
3857
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
3858
|
+
event.preventDefault();
|
|
3859
|
+
toggleSidebar();
|
|
3860
|
+
}
|
|
3861
|
+
};
|
|
3862
|
+
window.addEventListener('keydown', handleKeyDown);
|
|
3863
|
+
return function () {
|
|
3864
|
+
return window.removeEventListener('keydown', handleKeyDown);
|
|
3865
|
+
};
|
|
3866
|
+
}, [toggleSidebar]);
|
|
3867
|
+
// Update open state when `isMobile` changes
|
|
3868
|
+
useEffect(function () {
|
|
3869
|
+
if (isMobile && open) {
|
|
3870
|
+
setOpenMobile(open);
|
|
3871
|
+
}
|
|
3872
|
+
}, [isMobile, open]);
|
|
3873
|
+
// Assign state for data attributes
|
|
3874
|
+
var state = open ? 'expanded' : 'collapsed';
|
|
3875
|
+
var contextValue = useMemo(function () {
|
|
3876
|
+
return {
|
|
3877
|
+
state: state,
|
|
3878
|
+
open: open,
|
|
3879
|
+
setOpen: setOpen,
|
|
3880
|
+
isMobile: isMobile,
|
|
3881
|
+
openMobile: openMobile,
|
|
3882
|
+
setOpenMobile: setOpenMobile,
|
|
3883
|
+
toggleSidebar: toggleSidebar
|
|
3884
|
+
};
|
|
3885
|
+
}, [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]);
|
|
3886
|
+
return React__default.createElement(SidebarContext.Provider, {
|
|
3887
|
+
value: contextValue
|
|
3888
|
+
}, React__default.createElement("div", _extends({
|
|
3889
|
+
style: _extends({
|
|
3890
|
+
'--sidebar-width': SIDEBAR_WIDTH,
|
|
3891
|
+
'--sidebar-width-icon': SIDEBAR_WIDTH_ICON,
|
|
3892
|
+
minBlockSize: '100svh'
|
|
3893
|
+
}, style),
|
|
3894
|
+
className: classNames('display-flex w-100 background-color-secondary', className),
|
|
3895
|
+
ref: ref
|
|
3896
|
+
}, props), children));
|
|
3897
|
+
});
|
|
3898
|
+
SidebarProvider.displayName = 'SidebarProvider';
|
|
3899
|
+
var Sidebar = /*#__PURE__*/React__default.forwardRef(function (_ref2, ref) {
|
|
3900
|
+
var _ref2$side = _ref2.side,
|
|
3901
|
+
side = _ref2$side === void 0 ? 'left' : _ref2$side,
|
|
3902
|
+
_ref2$collapsible = _ref2.collapsible,
|
|
3903
|
+
collapsible = _ref2$collapsible === void 0 ? 'offcanvas' : _ref2$collapsible,
|
|
3904
|
+
className = _ref2.className,
|
|
3905
|
+
children = _ref2.children,
|
|
3906
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
3907
|
+
var _useSidebar = useSidebar(),
|
|
3908
|
+
isMobile = _useSidebar.isMobile,
|
|
3909
|
+
state = _useSidebar.state,
|
|
3910
|
+
openMobile = _useSidebar.openMobile,
|
|
3911
|
+
setOpenMobile = _useSidebar.setOpenMobile;
|
|
3912
|
+
if (isMobile) {
|
|
3913
|
+
return React__default.createElement(Drawer, {
|
|
3914
|
+
isOpen: openMobile,
|
|
3915
|
+
onDismiss: function onDismiss() {
|
|
3916
|
+
return setOpenMobile(false);
|
|
3917
|
+
},
|
|
3918
|
+
placement: side
|
|
3919
|
+
}, React__default.createElement(Box, {
|
|
3920
|
+
"data-sidebar": "sidebar",
|
|
3921
|
+
"data-mobile": "true"
|
|
3922
|
+
}, children));
|
|
3923
|
+
}
|
|
3924
|
+
if (collapsible === 'none') {
|
|
3925
|
+
return React__default.createElement("div", _extends({
|
|
3926
|
+
className: classNames('display-flex h-100 font-size-xs flex-direction-column background-color-secondary font-color-base', className),
|
|
3927
|
+
style: {
|
|
3928
|
+
width: 'var(--sidebar-width)'
|
|
3929
|
+
},
|
|
3930
|
+
ref: ref
|
|
3931
|
+
}, props), children);
|
|
3932
|
+
}
|
|
3933
|
+
return React__default.createElement(Box, {
|
|
3934
|
+
ref: ref,
|
|
3935
|
+
background: "primary",
|
|
3936
|
+
display: {
|
|
3937
|
+
base: 'none',
|
|
3938
|
+
desktop: 'block'
|
|
3939
|
+
},
|
|
3940
|
+
color: "base",
|
|
3941
|
+
fontSize: "sm",
|
|
3942
|
+
"data-state": state,
|
|
3943
|
+
"data-collapsible": collapsible,
|
|
3944
|
+
"data-side": side
|
|
3945
|
+
}, React__default.createElement("div", {
|
|
3946
|
+
style: {
|
|
3947
|
+
animationTimingFunction: 'var(--sidebar-transition-timing, linear)',
|
|
3948
|
+
transitionTimingFunction: 'var(--sidebar-transition-timing, linear)',
|
|
3949
|
+
transitionDuration: 'var(--sidebar-transition-duration, 200ms)',
|
|
3950
|
+
animationDuration: 'var(--sidebar-transition-duration, 200ms)',
|
|
3951
|
+
transitionProperty: 'width',
|
|
3952
|
+
width: state === 'collapsed' ? '0' : 'var(--sidebar-width)',
|
|
3953
|
+
height: '100svh'
|
|
3954
|
+
},
|
|
3955
|
+
className: classNames('position-relative', className)
|
|
3956
|
+
}), React__default.createElement("div", _extends({
|
|
3957
|
+
className: classNames('position-fixed display-none display-flex-desktop ', className),
|
|
3958
|
+
style: {
|
|
3959
|
+
left: state === 'expanded' ? '0' : 'calc(var(--sidebar-width)*-1)',
|
|
3960
|
+
top: '0',
|
|
3961
|
+
bottom: '0',
|
|
3962
|
+
zIndex: 'var(--size-z-index-drawer)',
|
|
3963
|
+
transitionProperty: 'left, right, width',
|
|
3964
|
+
width: 'var(--sidebar-width)',
|
|
3965
|
+
height: '100svh'
|
|
3966
|
+
}
|
|
3967
|
+
}, props), React__default.createElement("div", {
|
|
3968
|
+
"data-sidebar": "sidebar",
|
|
3969
|
+
className: "display-flex h-100 w-100 flex-direction-column background-color-secondary font-color-base"
|
|
3970
|
+
}, children)));
|
|
3971
|
+
});
|
|
3972
|
+
Sidebar.displayName = 'Sidebar';
|
|
3973
|
+
var SidebarTrigger = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
3974
|
+
var className = _ref3.className,
|
|
3975
|
+
_onClick = _ref3.onClick,
|
|
3976
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
3977
|
+
var _useSidebar2 = useSidebar(),
|
|
3978
|
+
toggleSidebar = _useSidebar2.toggleSidebar;
|
|
3979
|
+
return React__default.createElement(Button, _extends({
|
|
3980
|
+
ref: ref,
|
|
3981
|
+
"data-sidebar": "trigger",
|
|
3982
|
+
variant: "tertiary",
|
|
3983
|
+
size: "sm",
|
|
3984
|
+
iconPrefix: "dock-left",
|
|
3985
|
+
className: className,
|
|
3986
|
+
onClick: function onClick(event) {
|
|
3987
|
+
_onClick == null || _onClick(event);
|
|
3988
|
+
toggleSidebar();
|
|
3989
|
+
},
|
|
3990
|
+
"aria-label": "toggle sidebar"
|
|
3991
|
+
}, props));
|
|
3992
|
+
});
|
|
3993
|
+
SidebarTrigger.displayName = 'SidebarTrigger';
|
|
3994
|
+
var SidebarInset = /*#__PURE__*/React__default.forwardRef(function (_ref4, ref) {
|
|
3995
|
+
var className = _ref4.className,
|
|
3996
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
3997
|
+
return React__default.createElement("main", _extends({
|
|
3998
|
+
ref: ref,
|
|
3999
|
+
className: classNames('display-flex flex-auto flex-direction-column g-lg align-items-flex-start p-lg background-color-secondary', className)
|
|
4000
|
+
}, props));
|
|
4001
|
+
});
|
|
4002
|
+
SidebarInset.displayName = 'SidebarInset';
|
|
4003
|
+
var SidebarHeader = /*#__PURE__*/React__default.forwardRef(function (_ref5, ref) {
|
|
4004
|
+
var className = _ref5.className,
|
|
4005
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
4006
|
+
return React__default.createElement("div", _extends({
|
|
4007
|
+
ref: ref,
|
|
4008
|
+
"data-sidebar": "header",
|
|
4009
|
+
className: classNames('display-flex g-sm p-v-md p-h-md p-right-0-desktop', className)
|
|
4010
|
+
}, props));
|
|
4011
|
+
});
|
|
4012
|
+
SidebarHeader.displayName = 'SidebarHeader';
|
|
4013
|
+
var SidebarFooter = /*#__PURE__*/React__default.forwardRef(function (_ref6, ref) {
|
|
4014
|
+
var className = _ref6.className,
|
|
4015
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded6);
|
|
4016
|
+
return React__default.createElement("div", _extends({
|
|
4017
|
+
ref: ref,
|
|
4018
|
+
"data-sidebar": "footer",
|
|
4019
|
+
className: classNames('display-flex g-sm p-v-md p-h-md p-right-0-desktop', className)
|
|
4020
|
+
}, props));
|
|
4021
|
+
});
|
|
4022
|
+
SidebarFooter.displayName = 'SidebarFooter';
|
|
4023
|
+
var SidebarContent = /*#__PURE__*/React__default.forwardRef(function (_ref7, ref) {
|
|
4024
|
+
var className = _ref7.className,
|
|
4025
|
+
props = _objectWithoutPropertiesLoose(_ref7, _excluded7);
|
|
4026
|
+
return React__default.createElement("div", _extends({
|
|
4027
|
+
ref: ref,
|
|
4028
|
+
"data-sidebar": "content",
|
|
4029
|
+
className: classNames('display-flex flex-direction-column g-xl minh-0 flex-auto overflow-auto', className)
|
|
4030
|
+
}, props));
|
|
4031
|
+
});
|
|
4032
|
+
SidebarContent.displayName = 'SidebarContent';
|
|
4033
|
+
var SidebarMenu = /*#__PURE__*/React__default.forwardRef(function (_ref8, ref) {
|
|
4034
|
+
var className = _ref8.className,
|
|
4035
|
+
props = _objectWithoutPropertiesLoose(_ref8, _excluded8);
|
|
4036
|
+
return React__default.createElement("ul", _extends({
|
|
4037
|
+
ref: ref,
|
|
4038
|
+
"data-sidebar": "menu",
|
|
4039
|
+
className: classNames('display-flex flex-direction-column w-100 minw-0 g-xs p-0 m-0', className),
|
|
4040
|
+
style: {
|
|
4041
|
+
listStyle: 'none'
|
|
4042
|
+
}
|
|
4043
|
+
}, props));
|
|
4044
|
+
});
|
|
4045
|
+
SidebarMenu.displayName = 'SidebarMenu';
|
|
4046
|
+
var SidebarMenuItem = /*#__PURE__*/React__default.forwardRef(function (_ref9, ref) {
|
|
4047
|
+
var className = _ref9.className,
|
|
4048
|
+
props = _objectWithoutPropertiesLoose(_ref9, _excluded9);
|
|
4049
|
+
return React__default.createElement("li", _extends({
|
|
4050
|
+
ref: ref,
|
|
4051
|
+
"data-sidebar": "menu-item",
|
|
4052
|
+
className: classNames('font-size-sm position-relative', className)
|
|
4053
|
+
}, props));
|
|
4054
|
+
});
|
|
4055
|
+
SidebarMenuItem.displayName = 'SidebarMenuItem';
|
|
4056
|
+
var SidebarMenuButton = /*#__PURE__*/React__default.forwardRef(function (_ref10, ref) {
|
|
4057
|
+
var _ref10$asChild = _ref10.asChild,
|
|
4058
|
+
asChild = _ref10$asChild === void 0 ? false : _ref10$asChild,
|
|
4059
|
+
_ref10$isActive = _ref10.isActive,
|
|
4060
|
+
isActive = _ref10$isActive === void 0 ? false : _ref10$isActive,
|
|
4061
|
+
className = _ref10.className,
|
|
4062
|
+
props = _objectWithoutPropertiesLoose(_ref10, _excluded10);
|
|
4063
|
+
var Comp = asChild ? Slot : 'button';
|
|
4064
|
+
var button = React__default.createElement(Comp, _extends({
|
|
4065
|
+
ref: ref,
|
|
4066
|
+
"data-sidebar": "menu-button",
|
|
4067
|
+
"data-active": isActive,
|
|
4068
|
+
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', {
|
|
4069
|
+
'background-color-tertiary': isActive,
|
|
4070
|
+
'background-color-transparent': !isActive
|
|
4071
|
+
}, className)
|
|
4072
|
+
}, props), props.children);
|
|
4073
|
+
return button;
|
|
4074
|
+
});
|
|
4075
|
+
SidebarMenuButton.displayName = 'SidebarMenuButton';
|
|
4076
|
+
var SidebarGroup = /*#__PURE__*/React__default.forwardRef(function (_ref11, ref) {
|
|
4077
|
+
var className = _ref11.className,
|
|
4078
|
+
props = _objectWithoutPropertiesLoose(_ref11, _excluded11);
|
|
4079
|
+
return React__default.createElement("div", _extends({
|
|
4080
|
+
ref: ref,
|
|
4081
|
+
"data-sidebar": "group",
|
|
4082
|
+
className: classNames('position-relative p-h-md p-right-0-desktop display-flex w-100 minw-0 flex-direction-column', className)
|
|
4083
|
+
}, props));
|
|
4084
|
+
});
|
|
4085
|
+
SidebarGroup.displayName = 'SidebarGroup';
|
|
4086
|
+
var SidebarGroupLabel = /*#__PURE__*/React__default.forwardRef(function (_ref12, ref) {
|
|
4087
|
+
var className = _ref12.className,
|
|
4088
|
+
props = _objectWithoutPropertiesLoose(_ref12, _excluded12);
|
|
4089
|
+
return React__default.createElement("div", _extends({
|
|
4090
|
+
ref: ref,
|
|
4091
|
+
"data-sidebar": "group-label",
|
|
4092
|
+
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)
|
|
4093
|
+
}, props));
|
|
4094
|
+
});
|
|
4095
|
+
SidebarGroupLabel.displayName = 'SidebarGroupLabel';
|
|
4096
|
+
var SidebarMenuSub = /*#__PURE__*/React__default.forwardRef(function (_ref13, ref) {
|
|
4097
|
+
var className = _ref13.className,
|
|
4098
|
+
props = _objectWithoutPropertiesLoose(_ref13, _excluded13);
|
|
4099
|
+
return React__default.createElement("ul", _extends({
|
|
4100
|
+
ref: ref,
|
|
4101
|
+
"data-sidebar": "menu-sub",
|
|
4102
|
+
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),
|
|
4103
|
+
style: {
|
|
4104
|
+
listStyle: 'none'
|
|
4105
|
+
}
|
|
4106
|
+
}, props));
|
|
4107
|
+
});
|
|
4108
|
+
SidebarMenuSub.displayName = 'SidebarMenuSub';
|
|
4109
|
+
var SidebarMenuSubItem = /*#__PURE__*/React__default.forwardRef(function (_ref14, ref) {
|
|
4110
|
+
var props = _extends({}, (_objectDestructuringEmpty(_ref14), _ref14));
|
|
4111
|
+
return React__default.createElement("li", _extends({
|
|
4112
|
+
ref: ref
|
|
4113
|
+
}, props));
|
|
4114
|
+
});
|
|
4115
|
+
SidebarMenuSubItem.displayName = 'SidebarMenuSubItem';
|
|
4116
|
+
var SidebarMenuSubButton = /*#__PURE__*/React__default.forwardRef(function (_ref15, ref) {
|
|
4117
|
+
var _ref15$asChild = _ref15.asChild,
|
|
4118
|
+
asChild = _ref15$asChild === void 0 ? false : _ref15$asChild,
|
|
4119
|
+
isActive = _ref15.isActive,
|
|
4120
|
+
className = _ref15.className,
|
|
4121
|
+
props = _objectWithoutPropertiesLoose(_ref15, _excluded14);
|
|
4122
|
+
var Comp = asChild ? Slot : 'a';
|
|
4123
|
+
return React__default.createElement(Comp, _extends({
|
|
4124
|
+
ref: ref,
|
|
4125
|
+
"data-sidebar": "menu-sub-button",
|
|
4126
|
+
"data-active": isActive,
|
|
4127
|
+
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', {
|
|
4128
|
+
'background-color-tertiary': isActive,
|
|
4129
|
+
'background-color-transparent': !isActive
|
|
4130
|
+
}, className)
|
|
4131
|
+
}, props));
|
|
4132
|
+
});
|
|
4133
|
+
SidebarMenuSubButton.displayName = 'SidebarMenuSubButton';
|
|
4134
|
+
var SidebarMenuAction = /*#__PURE__*/React__default.forwardRef(function (_ref16, ref) {
|
|
4135
|
+
var className = _ref16.className,
|
|
4136
|
+
_ref16$asChild = _ref16.asChild,
|
|
4137
|
+
asChild = _ref16$asChild === void 0 ? false : _ref16$asChild,
|
|
4138
|
+
props = _objectWithoutPropertiesLoose(_ref16, _excluded15);
|
|
4139
|
+
var Comp = asChild ? Slot : 'button';
|
|
4140
|
+
return React__default.createElement(Comp, _extends({
|
|
4141
|
+
ref: ref,
|
|
4142
|
+
"data-sidebar": "menu-action",
|
|
4143
|
+
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),
|
|
4144
|
+
style: {
|
|
4145
|
+
top: 'var(--size-spacing-xs)',
|
|
4146
|
+
right: 'var(--size-spacing-xs)'
|
|
4147
|
+
}
|
|
4148
|
+
}, props));
|
|
4149
|
+
});
|
|
4150
|
+
SidebarMenuAction.displayName = 'SidebarMenuAction';
|
|
4151
|
+
var SidebarRail = /*#__PURE__*/React__default.forwardRef(function (_ref17, ref) {
|
|
4152
|
+
var className = _ref17.className,
|
|
4153
|
+
props = _objectWithoutPropertiesLoose(_ref17, _excluded16);
|
|
4154
|
+
var _useSidebar3 = useSidebar(),
|
|
4155
|
+
open = _useSidebar3.open,
|
|
4156
|
+
toggleSidebar = _useSidebar3.toggleSidebar;
|
|
4157
|
+
var caretIcon = open ? 'caret-sm-left' : 'caret-sm-right';
|
|
4158
|
+
return React__default.createElement("button", _extends({
|
|
4159
|
+
ref: ref,
|
|
4160
|
+
"data-sidebar": "rail",
|
|
4161
|
+
"aria-label": "Toggle Sidebar",
|
|
4162
|
+
tabIndex: -1,
|
|
4163
|
+
onClick: toggleSidebar,
|
|
4164
|
+
title: "Toggle Sidebar",
|
|
4165
|
+
className: classNames('hover-show-child display-flex p-top-5xl justify-content-center position-absolute background-color-transparent bw-0', {
|
|
4166
|
+
'cursor-w-resize': open,
|
|
4167
|
+
'cursor-e-resize': !open
|
|
4168
|
+
}, className),
|
|
4169
|
+
style: {
|
|
4170
|
+
top: '0',
|
|
4171
|
+
bottom: '0',
|
|
4172
|
+
right: '-1rem',
|
|
4173
|
+
width: '1rem',
|
|
4174
|
+
zIndex: '-1'
|
|
4175
|
+
}
|
|
4176
|
+
}, props), React__default.createElement(Box, {
|
|
4177
|
+
radius: "xl",
|
|
4178
|
+
background: "primary",
|
|
4179
|
+
color: "secondary",
|
|
4180
|
+
borderWidth: "sm",
|
|
4181
|
+
padding: "xs",
|
|
4182
|
+
margin: "0 0 0 sm",
|
|
4183
|
+
shadow: "xs",
|
|
4184
|
+
className: classNames('hover-child', {
|
|
4185
|
+
'cursor-w-resize': open,
|
|
4186
|
+
'cursor-e-resize': !open
|
|
4187
|
+
}, className)
|
|
4188
|
+
}, React__default.createElement(Icon, {
|
|
4189
|
+
name: caretIcon
|
|
4190
|
+
})));
|
|
4191
|
+
});
|
|
4192
|
+
SidebarRail.displayName = 'SidebarRail';
|
|
4193
|
+
var SidebarMenuBadge = /*#__PURE__*/React__default.forwardRef(function (_ref18, ref) {
|
|
4194
|
+
var className = _ref18.className,
|
|
4195
|
+
props = _objectWithoutPropertiesLoose(_ref18, _excluded17);
|
|
4196
|
+
return React__default.createElement("div", _extends({
|
|
4197
|
+
ref: ref,
|
|
4198
|
+
"data-sidebar": "menu-badge",
|
|
4199
|
+
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),
|
|
4200
|
+
style: {
|
|
4201
|
+
top: 'var(--size-spacing-sm)',
|
|
4202
|
+
right: 'var(--size-spacing-xs)'
|
|
4203
|
+
}
|
|
4204
|
+
}, props));
|
|
4205
|
+
});
|
|
4206
|
+
SidebarMenuBadge.displayName = 'SidebarMenuBadge';
|
|
4207
|
+
|
|
3663
4208
|
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"};
|
|
3664
4209
|
|
|
3665
4210
|
var styles$4 = {"table-body":"TableBody-module_table-body__Y5WbD","striped":"TableBody-module_striped__5MlEr","hover":"TableBody-module_hover__2CRgY"};
|
|
@@ -4654,28 +5199,6 @@ var useBreakpoint = function useBreakpoint() {
|
|
|
4654
5199
|
};
|
|
4655
5200
|
};
|
|
4656
5201
|
|
|
4657
|
-
var desktopBreakpoint = /*#__PURE__*/BREAKPOINTS.find(function (b) {
|
|
4658
|
-
return b.name === 'desktop';
|
|
4659
|
-
});
|
|
4660
|
-
var MOBILE_BREAKPOINT = desktopBreakpoint ? desktopBreakpoint.minWidth : 0; // min width in pixels
|
|
4661
|
-
function useIsMobile() {
|
|
4662
|
-
var _React$useState = React.useState(undefined),
|
|
4663
|
-
isMobile = _React$useState[0],
|
|
4664
|
-
setIsMobile = _React$useState[1];
|
|
4665
|
-
React.useEffect(function () {
|
|
4666
|
-
var mql = window.matchMedia("(max-width: " + (MOBILE_BREAKPOINT - 1) + "px)");
|
|
4667
|
-
var onChange = function onChange() {
|
|
4668
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
4669
|
-
};
|
|
4670
|
-
mql.addEventListener('change', onChange);
|
|
4671
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
4672
|
-
return function () {
|
|
4673
|
-
return mql.removeEventListener('change', onChange);
|
|
4674
|
-
};
|
|
4675
|
-
}, []);
|
|
4676
|
-
return !!isMobile;
|
|
4677
|
-
}
|
|
4678
|
-
|
|
4679
5202
|
var useOpenClose = function useOpenClose(props) {
|
|
4680
5203
|
if (props === void 0) {
|
|
4681
5204
|
props = {};
|
|
@@ -4729,5 +5252,5 @@ var useTheme = function useTheme() {
|
|
|
4729
5252
|
return context;
|
|
4730
5253
|
};
|
|
4731
5254
|
|
|
4732
|
-
export { Alert, Badge, Box, Button, Card, CardBaseComponent, Checkbox, CheckboxInput, Collapsible, CollapsibleContent, CollapsibleTrigger, DateInput, DatePicker, Details, DetailsBaseComponent, DetailsSummary, Drawer, FormControl, FormLabel, FormikCheckboxInput, FormikRadioGroup, FormikSelectInput, FormikSelectInputInset, FormikSelectInputNative, FormikTextInput, FormikTextInputInset, FormikTextareaInput, FormikTextareaInputInset, FormikTimePicker, FormikTimePickerNative, FormikToggle, Heading, Icon, Modal, ModalBaseComponent, Pagination, Popover, RadioGroup, RangeInput, ResponsiveContext, ResponsiveProvider, SelectInput, SelectInputInset, SelectInputNative, Spinner, Table, TextInput, TextInputInset, TextareaInput, TextareaInputInset, ThemeProvider, ThemeProviderContext, TimePicker, TimePickerNative, ToastContainer, Toggle, boxPropsKeys, createRectRef, toast, useBreakpoint, useIsMobile, useIsomorphicLayoutEffect, useOpenClose, useTheme, useToasts, useWindowSize };
|
|
5255
|
+
export { Alert, Badge, Box, Button, Card, CardBaseComponent, Checkbox, CheckboxInput, Collapsible, CollapsibleContent, CollapsibleTrigger, DateInput, DatePicker, Details, DetailsBaseComponent, DetailsSummary, Drawer, 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, FormikToggle, 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, Table, TextInput, TextInputInset, TextareaInput, TextareaInputInset, ThemeProvider, ThemeProviderContext, TimePicker, TimePickerNative, ToastContainer, Toggle, boxPropsKeys, createRectRef, toast, useBreakpoint, useIsMobile, useIsomorphicLayoutEffect, useOpenClose, useSidebar, useTheme, useToasts, useWindowSize };
|
|
4733
5256
|
//# sourceMappingURL=hyphen-components.esm.js.map
|