@hyphen/hyphen-components 2.24.1 → 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 +570 -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 +552 -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 +629 -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
|
@@ -20,6 +20,7 @@ import Select, { components } from 'react-select';
|
|
|
20
20
|
import AsyncCreatableSelect from 'react-select/async-creatable';
|
|
21
21
|
import AsyncSelect from 'react-select/async';
|
|
22
22
|
import CreatableSelect from 'react-select/creatable';
|
|
23
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
23
24
|
import { v4 } from 'uuid';
|
|
24
25
|
|
|
25
26
|
function _extends() {
|
|
@@ -31,6 +32,9 @@ function _extends() {
|
|
|
31
32
|
return n;
|
|
32
33
|
}, _extends.apply(null, arguments);
|
|
33
34
|
}
|
|
35
|
+
function _objectDestructuringEmpty(t) {
|
|
36
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
37
|
+
}
|
|
34
38
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
35
39
|
if (null == r) return {};
|
|
36
40
|
var t = {};
|
|
@@ -247,7 +251,7 @@ Component, props, getDefault) {
|
|
|
247
251
|
|
|
248
252
|
var styles$w = {"box-transition":"Box-module_box-transition__eQx8C"};
|
|
249
253
|
|
|
250
|
-
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"];
|
|
251
255
|
/**
|
|
252
256
|
* A `<Box>` is a layout component to build UIs with consistent padding and spacing between
|
|
253
257
|
* elements.
|
|
@@ -334,7 +338,7 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
334
338
|
width = _ref$width === void 0 ? undefined : _ref$width,
|
|
335
339
|
_ref$zIndex = _ref.zIndex,
|
|
336
340
|
zIndex = _ref$zIndex === void 0 ? undefined : _ref$zIndex,
|
|
337
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
341
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
338
342
|
var heightCss = getDimensionCss('h', height);
|
|
339
343
|
var widthCss = getDimensionCss('w', width);
|
|
340
344
|
var maxHeightCss = getDimensionCss('mh', maxHeight);
|
|
@@ -485,14 +489,14 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
485
489
|
});
|
|
486
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'];
|
|
487
491
|
|
|
488
|
-
var _excluded$
|
|
492
|
+
var _excluded$K = ["className", "name", "color", "size"];
|
|
489
493
|
var Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
490
494
|
var _ref$className = _ref.className,
|
|
491
495
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
492
496
|
name = _ref.name,
|
|
493
497
|
color = _ref.color,
|
|
494
498
|
size = _ref.size,
|
|
495
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
499
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$K);
|
|
496
500
|
var IconComponent = icons[name];
|
|
497
501
|
if (!IconComponent) console.error("Icon '" + name + "' not found"); // eslint-disable-line no-console
|
|
498
502
|
var iconClasses = classNames(className, generateResponsiveClasses('font-color', color), generateResponsiveClasses('font-size', size));
|
|
@@ -531,7 +535,7 @@ var ALERT_ICONS_MAP = {
|
|
|
531
535
|
}
|
|
532
536
|
};
|
|
533
537
|
|
|
534
|
-
var _excluded$
|
|
538
|
+
var _excluded$J = ["className", "closeText", "hasIcon", "isCompact", "isClosable", "message", "onClose", "render", "title", "variant"];
|
|
535
539
|
var Alert = function Alert(_ref) {
|
|
536
540
|
var _ref$className = _ref.className,
|
|
537
541
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
@@ -553,7 +557,7 @@ var Alert = function Alert(_ref) {
|
|
|
553
557
|
title = _ref$title === void 0 ? '' : _ref$title,
|
|
554
558
|
_ref$variant = _ref.variant,
|
|
555
559
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
556
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
560
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$J);
|
|
557
561
|
var handleClose = function handleClose(event) {
|
|
558
562
|
if (!onClose) return;
|
|
559
563
|
onClose(event);
|
|
@@ -607,7 +611,7 @@ var Alert = function Alert(_ref) {
|
|
|
607
611
|
|
|
608
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"};
|
|
609
613
|
|
|
610
|
-
var _excluded$
|
|
614
|
+
var _excluded$I = ["className", "message", "variant", "size"];
|
|
611
615
|
var Badge = function Badge(_ref) {
|
|
612
616
|
var _classNames;
|
|
613
617
|
var _ref$className = _ref.className,
|
|
@@ -618,7 +622,7 @@ var Badge = function Badge(_ref) {
|
|
|
618
622
|
variant = _ref$variant === void 0 ? 'light-grey' : _ref$variant,
|
|
619
623
|
_ref$size = _ref.size,
|
|
620
624
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
621
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
625
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
622
626
|
var responsiveClasses = generateResponsiveClasses('size', size).map(function (c) {
|
|
623
627
|
return styles$u[c];
|
|
624
628
|
});
|
|
@@ -753,7 +757,7 @@ var handleReactRouterClick = function handleReactRouterClick(event, onClick, tar
|
|
|
753
757
|
|
|
754
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"};
|
|
755
759
|
|
|
756
|
-
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"];
|
|
757
761
|
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
758
762
|
var _classNames, _extends2;
|
|
759
763
|
var _ref$children = _ref.children,
|
|
@@ -796,7 +800,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
796
800
|
type = _ref$type === void 0 ? undefined : _ref$type,
|
|
797
801
|
_ref$variant = _ref.variant,
|
|
798
802
|
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
799
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
803
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
800
804
|
var disabled = isLoading || isDisabled;
|
|
801
805
|
var responsiveClasses = generateResponsiveClasses('size', size).map(function (c) {
|
|
802
806
|
return styles$s[c];
|
|
@@ -850,7 +854,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
850
854
|
}, _extends2.onFocus = handleFocus, _extends2.ref = ref, _extends2.type = type || (as !== 'a' && !href ? 'button' : undefined), _extends2.tabIndex = tabIndex, _extends2), restProps), buttonContent);
|
|
851
855
|
});
|
|
852
856
|
|
|
853
|
-
var _excluded$
|
|
857
|
+
var _excluded$G = ["background", "borderColor", "borderWidth", "children", "display", "padding"];
|
|
854
858
|
var CardFooter = function CardFooter(_ref) {
|
|
855
859
|
var _ref$background = _ref.background,
|
|
856
860
|
background = _ref$background === void 0 ? 'secondary' : _ref$background,
|
|
@@ -864,7 +868,7 @@ var CardFooter = function CardFooter(_ref) {
|
|
|
864
868
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
865
869
|
_ref$padding = _ref.padding,
|
|
866
870
|
padding = _ref$padding === void 0 ? '2xl' : _ref$padding,
|
|
867
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
871
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
868
872
|
return React__default.createElement(Box, _extends({
|
|
869
873
|
display: display,
|
|
870
874
|
padding: padding,
|
|
@@ -885,7 +889,7 @@ var HEADING_DEFAULT_SIZE_MAP = {
|
|
|
885
889
|
|
|
886
890
|
var styles$r = {"heading":"Heading-module_heading__zKyv7"};
|
|
887
891
|
|
|
888
|
-
var _excluded$
|
|
892
|
+
var _excluded$F = ["as", "children", "className", "color", "size"];
|
|
889
893
|
var Heading = function Heading(_ref) {
|
|
890
894
|
var _classNames;
|
|
891
895
|
var _ref$as = _ref.as,
|
|
@@ -894,7 +898,7 @@ var Heading = function Heading(_ref) {
|
|
|
894
898
|
className = _ref.className,
|
|
895
899
|
color = _ref.color,
|
|
896
900
|
size = _ref.size,
|
|
897
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
901
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
898
902
|
var element = getElementType(Heading, {
|
|
899
903
|
as: as
|
|
900
904
|
});
|
|
@@ -905,7 +909,7 @@ var Heading = function Heading(_ref) {
|
|
|
905
909
|
}, restProps), children);
|
|
906
910
|
};
|
|
907
911
|
|
|
908
|
-
var _excluded$
|
|
912
|
+
var _excluded$E = ["childGap", "children", "className", "display", "padding", "title"];
|
|
909
913
|
var CardHeader = function CardHeader(_ref) {
|
|
910
914
|
var _ref$childGap = _ref.childGap,
|
|
911
915
|
childGap = _ref$childGap === void 0 ? '2xs' : _ref$childGap,
|
|
@@ -919,7 +923,7 @@ var CardHeader = function CardHeader(_ref) {
|
|
|
919
923
|
padding = _ref$padding === void 0 ? '2xl' : _ref$padding,
|
|
920
924
|
_ref$title = _ref.title,
|
|
921
925
|
title = _ref$title === void 0 ? null : _ref$title,
|
|
922
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
926
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
923
927
|
var renderTitle = function renderTitle() {
|
|
924
928
|
return typeof title === 'string' ? React__default.createElement(Heading, {
|
|
925
929
|
size: "sm",
|
|
@@ -936,7 +940,7 @@ var CardHeader = function CardHeader(_ref) {
|
|
|
936
940
|
|
|
937
941
|
var styles$q = {"card-section-border":"Card-module_card-section-border__OefDX"};
|
|
938
942
|
|
|
939
|
-
var _excluded$
|
|
943
|
+
var _excluded$D = ["background", "borderColor", "borderWidth", "children", "childGap", "gap", "className", "display", "padding", "subdued", "title"];
|
|
940
944
|
var CardSection = function CardSection(_ref) {
|
|
941
945
|
var _classNames;
|
|
942
946
|
var _ref$background = _ref.background,
|
|
@@ -961,7 +965,7 @@ var CardSection = function CardSection(_ref) {
|
|
|
961
965
|
subdued = _ref$subdued === void 0 ? undefined : _ref$subdued,
|
|
962
966
|
_ref$title = _ref.title,
|
|
963
967
|
title = _ref$title === void 0 ? undefined : _ref$title,
|
|
964
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
968
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
965
969
|
var renderTitle = typeof title === 'string' ? React__default.createElement(Box, {
|
|
966
970
|
className: "m-bottom-md"
|
|
967
971
|
}, React__default.createElement(Box, {
|
|
@@ -984,7 +988,7 @@ var CardSection = function CardSection(_ref) {
|
|
|
984
988
|
}, children));
|
|
985
989
|
};
|
|
986
990
|
|
|
987
|
-
var _excluded$
|
|
991
|
+
var _excluded$C = ["children", "subdued", "overflow", "display", "width"];
|
|
988
992
|
var CardBaseComponent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
989
993
|
var children = _ref.children,
|
|
990
994
|
subdued = _ref.subdued,
|
|
@@ -994,7 +998,7 @@ var CardBaseComponent = /*#__PURE__*/React__default.forwardRef(function (_ref, r
|
|
|
994
998
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
995
999
|
_ref$width = _ref.width,
|
|
996
1000
|
width = _ref$width === void 0 ? '100' : _ref$width,
|
|
997
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1001
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
998
1002
|
return React__default.createElement(Box, _extends({
|
|
999
1003
|
background: subdued ? 'secondary' : 'primary',
|
|
1000
1004
|
borderWidth: "sm",
|
|
@@ -1017,7 +1021,7 @@ var Card = /*#__PURE__*/function () {
|
|
|
1017
1021
|
return Card;
|
|
1018
1022
|
}();
|
|
1019
1023
|
|
|
1020
|
-
var _excluded$
|
|
1024
|
+
var _excluded$B = ["className", "error", "isChecked", "isDisabled", "isIndeterminate"];
|
|
1021
1025
|
var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
1022
1026
|
var _ref$className = _ref.className,
|
|
1023
1027
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
@@ -1029,7 +1033,7 @@ var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
|
1029
1033
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
1030
1034
|
_ref$isIndeterminate = _ref.isIndeterminate,
|
|
1031
1035
|
isIndeterminate = _ref$isIndeterminate === void 0 ? false : _ref$isIndeterminate,
|
|
1032
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1036
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
1033
1037
|
var color = 'base';
|
|
1034
1038
|
var name = 'checkbox-btn';
|
|
1035
1039
|
if (isChecked) name = 'checkbox-btn-checked';else name = 'checkbox-btn';
|
|
@@ -1054,7 +1058,7 @@ var CheckboxIcon = function CheckboxIcon(_ref) {
|
|
|
1054
1058
|
|
|
1055
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"};
|
|
1056
1060
|
|
|
1057
|
-
var _excluded$
|
|
1061
|
+
var _excluded$A = ["className", "display", "id", "isChecked", "label", "labelledby", "onChange", "error", "isDisabled", "isHidden", "isIndeterminate", "isRequired", "onBlur", "onFocus", "size", "value"];
|
|
1058
1062
|
var Checkbox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
1059
1063
|
var _ref2;
|
|
1060
1064
|
var _ref$className = _ref.className,
|
|
@@ -1084,7 +1088,7 @@ var Checkbox = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1084
1088
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
1085
1089
|
_ref$value = _ref.value,
|
|
1086
1090
|
value = _ref$value === void 0 ? undefined : _ref$value,
|
|
1087
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1091
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$A);
|
|
1088
1092
|
var inputRef = React__default.useRef(null);
|
|
1089
1093
|
React__default.useEffect(function () {
|
|
1090
1094
|
if (inputRef != null && inputRef.current) {
|
|
@@ -1173,7 +1177,7 @@ var HelpText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1173
1177
|
}, children);
|
|
1174
1178
|
});
|
|
1175
1179
|
|
|
1176
|
-
var _excluded$
|
|
1180
|
+
var _excluded$z = ["children", "inputId", "className", "display", "helpText", "isDisabled", "isFieldRequired", "isRadioInputLabel", "requiredIndicator", "margin", "padding"];
|
|
1177
1181
|
var FormLabel = function FormLabel(_ref) {
|
|
1178
1182
|
var _classNames;
|
|
1179
1183
|
var children = _ref.children,
|
|
@@ -1195,7 +1199,7 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
1195
1199
|
margin = _ref$margin === void 0 ? '0' : _ref$margin,
|
|
1196
1200
|
_ref$padding = _ref.padding,
|
|
1197
1201
|
padding = _ref$padding === void 0 ? '0' : _ref$padding,
|
|
1198
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1202
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$z);
|
|
1199
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));
|
|
1200
1204
|
return React__default.createElement(Box, _extends({
|
|
1201
1205
|
as: "label",
|
|
@@ -1208,7 +1212,7 @@ var FormLabel = function FormLabel(_ref) {
|
|
|
1208
1212
|
}, restProps), children, isFieldRequired && requiredIndicator && React__default.createElement("span", null, requiredIndicator), helpText && React__default.createElement(HelpText, null, helpText));
|
|
1209
1213
|
};
|
|
1210
1214
|
|
|
1211
|
-
var _excluded$
|
|
1215
|
+
var _excluded$y = ["id", "isChecked", "label", "onChange", "className", "error", "hideLabel", "helpText", "isDisabled", "isIndeterminate", "isRequired", "onBlur", "onFocus", "requiredIndicator", "size"];
|
|
1212
1216
|
var labelMarginSizeMap = {
|
|
1213
1217
|
sm: '2xs 0 0 0',
|
|
1214
1218
|
md: 'xs 0 0 0',
|
|
@@ -1253,7 +1257,7 @@ var CheckboxInput = function CheckboxInput(_ref2) {
|
|
|
1253
1257
|
requiredIndicator = _ref2$requiredIndicat === void 0 ? ' *' : _ref2$requiredIndicat,
|
|
1254
1258
|
_ref2$size = _ref2.size,
|
|
1255
1259
|
size = _ref2$size === void 0 ? 'md' : _ref2$size,
|
|
1256
|
-
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
1260
|
+
restProps = _objectWithoutPropertiesLoose(_ref2, _excluded$y);
|
|
1257
1261
|
var handleBlur = function handleBlur(event) {
|
|
1258
1262
|
if (onBlur) onBlur(event);
|
|
1259
1263
|
};
|
|
@@ -1301,7 +1305,7 @@ var CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
|
1301
1305
|
|
|
1302
1306
|
var styles$l = {};
|
|
1303
1307
|
|
|
1304
|
-
var _excluded$
|
|
1308
|
+
var _excluded$x = ["children", "dayClassName", "maxDate", "minDate", "monthsShown", "openToDate", "startDate", "selected", "selectsRange", "showTwoColumnMonthYearPicker", "showFullMonthYearPicker", "showMonthYearPicker", "className", "formatWeekDay"];
|
|
1305
1309
|
var DatePicker = function DatePicker(_ref) {
|
|
1306
1310
|
var _ref$children = _ref.children,
|
|
1307
1311
|
children = _ref$children === void 0 ? null : _ref$children,
|
|
@@ -1333,7 +1337,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
1333
1337
|
formatWeekDay = _ref$formatWeekDay === void 0 ? function (formattedDate) {
|
|
1334
1338
|
return formattedDate[0];
|
|
1335
1339
|
} : _ref$formatWeekDay,
|
|
1336
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1340
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
1337
1341
|
var datePickerClasses = classNames(styles$l['react-datepicker'], className);
|
|
1338
1342
|
return React__default.createElement(ReactDatePicker, _extends({
|
|
1339
1343
|
inline: true,
|
|
@@ -1353,7 +1357,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
1353
1357
|
}, restProps), children);
|
|
1354
1358
|
};
|
|
1355
1359
|
|
|
1356
|
-
var _excluded$
|
|
1360
|
+
var _excluded$w = ["label", "hideLabel", "children", "error", "id", "isRequired", "helpText", "isDisabled", "requiredIndicator", "width"];
|
|
1357
1361
|
var FormControl = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
1358
1362
|
var label = _ref.label,
|
|
1359
1363
|
hideLabel = _ref.hideLabel,
|
|
@@ -1366,7 +1370,7 @@ var FormControl = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1366
1370
|
requiredIndicator = _ref.requiredIndicator,
|
|
1367
1371
|
_ref$width = _ref.width,
|
|
1368
1372
|
width = _ref$width === void 0 ? '100' : _ref$width,
|
|
1369
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1373
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
1370
1374
|
var labelProps = {
|
|
1371
1375
|
inputId: id,
|
|
1372
1376
|
helpText: helpText,
|
|
@@ -1394,7 +1398,7 @@ function getAutoCompleteValue(value) {
|
|
|
1394
1398
|
|
|
1395
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"};
|
|
1396
1400
|
|
|
1397
|
-
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"];
|
|
1398
1402
|
var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1399
1403
|
var _ref2;
|
|
1400
1404
|
var id = _ref.id,
|
|
@@ -1438,7 +1442,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
1438
1442
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
1439
1443
|
_ref$type = _ref.type,
|
|
1440
1444
|
type = _ref$type === void 0 ? 'text' : _ref$type,
|
|
1441
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1445
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
1442
1446
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
1443
1447
|
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$k['text-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
1444
1448
|
return styles$k[c];
|
|
@@ -1587,7 +1591,7 @@ var BREAKPOINTS = /*#__PURE__*/[].concat(Object.entries(designTokens.size.breakp
|
|
|
1587
1591
|
var Z_INDEX_VALUES = designTokens.size['z-index'];
|
|
1588
1592
|
// export const BOX_SHADOW_VALUES = designTokens.size['box-shadow'];
|
|
1589
1593
|
|
|
1590
|
-
var _excluded$
|
|
1594
|
+
var _excluded$u = ["className", "isOpen", "children", "content", "arrowColor", "contentContainerProps", "hasArrow", "offsetFromTarget", "onClickOutside", "placement", "withPortal", "portalTarget", "trapFocus"];
|
|
1591
1595
|
var contentContainerDefaults = {
|
|
1592
1596
|
background: 'primary',
|
|
1593
1597
|
padding: 'sm',
|
|
@@ -1616,7 +1620,7 @@ var Popover = function Popover(_ref) {
|
|
|
1616
1620
|
portalTarget = _ref.portalTarget,
|
|
1617
1621
|
_ref$trapFocus = _ref.trapFocus,
|
|
1618
1622
|
trapFocus = _ref$trapFocus === void 0 ? false : _ref$trapFocus,
|
|
1619
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1623
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
1620
1624
|
var triggerRef = useRef(null);
|
|
1621
1625
|
var popperRef = useRef(null);
|
|
1622
1626
|
var _useState = useState(null),
|
|
@@ -1722,7 +1726,7 @@ var Popover = function Popover(_ref) {
|
|
|
1722
1726
|
withPortal && portalTarget ? createPortal(renderPopperContent(), portalTarget) : renderPopperContent()));
|
|
1723
1727
|
};
|
|
1724
1728
|
|
|
1725
|
-
var _excluded$
|
|
1729
|
+
var _excluded$t = ["datePickerProps", "textInputProps", "dateFormat", "dateOptions", "popoverProps"];
|
|
1726
1730
|
var defaultDatePickerProps = {
|
|
1727
1731
|
selected: null,
|
|
1728
1732
|
selectsRange: false
|
|
@@ -1742,7 +1746,7 @@ var DateInput = function DateInput(_ref) {
|
|
|
1742
1746
|
dateOptions = _ref$dateOptions === void 0 ? undefined : _ref$dateOptions,
|
|
1743
1747
|
_ref$popoverProps = _ref.popoverProps,
|
|
1744
1748
|
popoverProps = _ref$popoverProps === void 0 ? _extends({}, defaultPopoverProps) : _ref$popoverProps,
|
|
1745
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1749
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
1746
1750
|
var mergedDatePickerProps = _extends({}, defaultDatePickerProps, datePickerProps);
|
|
1747
1751
|
var mergedPopoverProps = _extends({}, defaultPopoverProps, popoverProps);
|
|
1748
1752
|
var mergedTextInputProps = _extends({}, defaultTextInputProps, textInputProps);
|
|
@@ -1819,14 +1823,14 @@ var DateInput = function DateInput(_ref) {
|
|
|
1819
1823
|
var ENTER = 13;
|
|
1820
1824
|
var SPACE = 32;
|
|
1821
1825
|
|
|
1822
|
-
var _excluded$
|
|
1826
|
+
var _excluded$s = ["children", "display", "isDetailsOpen", "onToggle"];
|
|
1823
1827
|
var DetailsSummary = function DetailsSummary(_ref) {
|
|
1824
1828
|
var children = _ref.children,
|
|
1825
1829
|
_ref$display = _ref.display,
|
|
1826
1830
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1827
1831
|
isDetailsOpen = _ref.isDetailsOpen,
|
|
1828
1832
|
onToggle = _ref.onToggle,
|
|
1829
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1833
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
1830
1834
|
var handleClick = function handleClick(event) {
|
|
1831
1835
|
// Needed to avoid default `details` behavior on a click event and keep this as controlled component.
|
|
1832
1836
|
event.preventDefault();
|
|
@@ -1864,14 +1868,14 @@ var DetailsSummary = function DetailsSummary(_ref) {
|
|
|
1864
1868
|
|
|
1865
1869
|
var styles$i = {"details-reset":"Details-module_details-reset__HWtSD"};
|
|
1866
1870
|
|
|
1867
|
-
var _excluded$
|
|
1871
|
+
var _excluded$r = ["children", "className", "display", "isOpen"];
|
|
1868
1872
|
var DetailsBaseComponent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
1869
1873
|
var children = _ref.children,
|
|
1870
1874
|
className = _ref.className,
|
|
1871
1875
|
_ref$display = _ref.display,
|
|
1872
1876
|
display = _ref$display === void 0 ? 'block' : _ref$display,
|
|
1873
1877
|
isOpen = _ref.isOpen,
|
|
1874
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1878
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
1875
1879
|
var detailsClasses = classNames(className, styles$i['details-reset'], styles$i.details);
|
|
1876
1880
|
return React__default.createElement(Box, _extends({
|
|
1877
1881
|
as: "details",
|
|
@@ -2010,13 +2014,13 @@ var Drawer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2010
2014
|
}, renderHeader(), content)))));
|
|
2011
2015
|
});
|
|
2012
2016
|
|
|
2013
|
-
var _excluded$
|
|
2014
|
-
_excluded2 = ["className", "sideOffset"],
|
|
2015
|
-
_excluded3 = ["className", "inset"],
|
|
2016
|
-
_excluded4 = ["className"],
|
|
2017
|
-
_excluded5 = ["className"],
|
|
2018
|
-
_excluded6 = ["className", "inset", "children"],
|
|
2019
|
-
_excluded7 = ["className"];
|
|
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"];
|
|
2020
2024
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2021
2025
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
2022
2026
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
@@ -2026,10 +2030,10 @@ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
|
2026
2030
|
var DropdownMenuItem = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
2027
2031
|
var className = _ref.className,
|
|
2028
2032
|
inset = _ref.inset,
|
|
2029
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2033
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
2030
2034
|
return React__default.createElement(DropdownMenuPrimitive.Item, _extends({
|
|
2031
2035
|
ref: ref,
|
|
2032
|
-
className: classNames('font-size-sm position-relative cursor-default display-flex br-sm align-items-center p-sm g-sm
|
|
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)
|
|
2033
2037
|
}, props));
|
|
2034
2038
|
});
|
|
2035
2039
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
@@ -2037,7 +2041,7 @@ var DropdownMenuContent = /*#__PURE__*/React__default.forwardRef(function (_ref2
|
|
|
2037
2041
|
var className = _ref2.className,
|
|
2038
2042
|
_ref2$sideOffset = _ref2.sideOffset,
|
|
2039
2043
|
sideOffset = _ref2$sideOffset === void 0 ? 4 : _ref2$sideOffset,
|
|
2040
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
2044
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
|
|
2041
2045
|
return React__default.createElement(DropdownMenuPrimitive.Portal, null, React__default.createElement(DropdownMenuPrimitive.Content, _extends({
|
|
2042
2046
|
ref: ref,
|
|
2043
2047
|
sideOffset: sideOffset,
|
|
@@ -2051,7 +2055,7 @@ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
|
2051
2055
|
var DropdownMenuLabel = /*#__PURE__*/React__default.forwardRef(function (_ref3, ref) {
|
|
2052
2056
|
var className = _ref3.className,
|
|
2053
2057
|
inset = _ref3.inset,
|
|
2054
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
2058
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3$1);
|
|
2055
2059
|
return React__default.createElement(DropdownMenuPrimitive.Label, _extends({
|
|
2056
2060
|
ref: ref,
|
|
2057
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)
|
|
@@ -2060,7 +2064,7 @@ var DropdownMenuLabel = /*#__PURE__*/React__default.forwardRef(function (_ref3,
|
|
|
2060
2064
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2061
2065
|
var DropdownMenuSeparator = /*#__PURE__*/React__default.forwardRef(function (_ref4, ref) {
|
|
2062
2066
|
var className = _ref4.className,
|
|
2063
|
-
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
2067
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4$1);
|
|
2064
2068
|
return React__default.createElement(DropdownMenuPrimitive.Separator, _extends({
|
|
2065
2069
|
ref: ref,
|
|
2066
2070
|
className: classNames('h-2xs m-v-xs bw-top-sm border-color-subtle', className),
|
|
@@ -2073,7 +2077,7 @@ var DropdownMenuSeparator = /*#__PURE__*/React__default.forwardRef(function (_re
|
|
|
2073
2077
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
2074
2078
|
var DropdownMenuShortcut = function DropdownMenuShortcut(_ref5) {
|
|
2075
2079
|
var className = _ref5.className,
|
|
2076
|
-
props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
2080
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded5$1);
|
|
2077
2081
|
return React__default.createElement("span", _extends({
|
|
2078
2082
|
className: classNames('m-left-auto font-size-xs font-color-tertiary', className),
|
|
2079
2083
|
style: {
|
|
@@ -2086,7 +2090,7 @@ var DropdownMenuSubTrigger = /*#__PURE__*/React__default.forwardRef(function (_r
|
|
|
2086
2090
|
var className = _ref6.className,
|
|
2087
2091
|
inset = _ref6.inset,
|
|
2088
2092
|
children = _ref6.children,
|
|
2089
|
-
props = _objectWithoutPropertiesLoose(_ref6, _excluded6);
|
|
2093
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded6$1);
|
|
2090
2094
|
return React__default.createElement(DropdownMenuPrimitive.SubTrigger, _extends({
|
|
2091
2095
|
ref: ref,
|
|
2092
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)
|
|
@@ -2098,7 +2102,7 @@ var DropdownMenuSubTrigger = /*#__PURE__*/React__default.forwardRef(function (_r
|
|
|
2098
2102
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
2099
2103
|
var DropdownMenuSubContent = /*#__PURE__*/React__default.forwardRef(function (_ref7, ref) {
|
|
2100
2104
|
var className = _ref7.className,
|
|
2101
|
-
props = _objectWithoutPropertiesLoose(_ref7, _excluded7);
|
|
2105
|
+
props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
|
|
2102
2106
|
return React__default.createElement(DropdownMenuPrimitive.SubContent, _extends({
|
|
2103
2107
|
ref: ref,
|
|
2104
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)
|
|
@@ -2106,7 +2110,7 @@ var DropdownMenuSubContent = /*#__PURE__*/React__default.forwardRef(function (_r
|
|
|
2106
2110
|
});
|
|
2107
2111
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
2108
2112
|
|
|
2109
|
-
var _excluded$
|
|
2113
|
+
var _excluded$p = ["field", "form", "onChange", "id", "label"];
|
|
2110
2114
|
var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
2111
2115
|
var _ref$field = _ref.field,
|
|
2112
2116
|
name = _ref$field.name,
|
|
@@ -2119,7 +2123,7 @@ var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
|
2119
2123
|
onChange = _ref.onChange,
|
|
2120
2124
|
id = _ref.id,
|
|
2121
2125
|
label = _ref.label,
|
|
2122
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2126
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
2123
2127
|
return React__default.createElement(CheckboxInput, _extends({}, props, {
|
|
2124
2128
|
id: id,
|
|
2125
2129
|
label: label,
|
|
@@ -2130,7 +2134,7 @@ var FormikCheckboxInput = function FormikCheckboxInput(_ref) {
|
|
|
2130
2134
|
}));
|
|
2131
2135
|
};
|
|
2132
2136
|
|
|
2133
|
-
var _excluded$
|
|
2137
|
+
var _excluded$o = ["className", "isSelected", "isDisabled", "error"];
|
|
2134
2138
|
var RadioInputIcon = function RadioInputIcon(_ref) {
|
|
2135
2139
|
var _ref$className = _ref.className,
|
|
2136
2140
|
className = _ref$className === void 0 ? undefined : _ref$className,
|
|
@@ -2140,7 +2144,7 @@ var RadioInputIcon = function RadioInputIcon(_ref) {
|
|
|
2140
2144
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
2141
2145
|
_ref$error = _ref.error,
|
|
2142
2146
|
error = _ref$error === void 0 ? null : _ref$error,
|
|
2143
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2147
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
2144
2148
|
var color = 'secondary';
|
|
2145
2149
|
var name = 'radio-btn-unchecked';
|
|
2146
2150
|
if (isSelected && isDisabled) {
|
|
@@ -2233,7 +2237,7 @@ var RadioInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
2233
2237
|
|
|
2234
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-"};
|
|
2235
2239
|
|
|
2236
|
-
var _excluded$
|
|
2240
|
+
var _excluded$n = ["name", "onChange", "options", "className", "description", "direction", "error", "isDisabled", "isRequired", "onBlur", "onFocus", "requiredIndicator", "size", "title", "value"];
|
|
2237
2241
|
var RadioGroup = function RadioGroup(_ref) {
|
|
2238
2242
|
var _classNames;
|
|
2239
2243
|
var name = _ref.name,
|
|
@@ -2263,7 +2267,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
2263
2267
|
title = _ref$title === void 0 ? undefined : _ref$title,
|
|
2264
2268
|
_ref$value = _ref.value,
|
|
2265
2269
|
value = _ref$value === void 0 ? undefined : _ref$value,
|
|
2266
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2270
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
2267
2271
|
var groupClasses = classNames('hyphen-components__variables__form-control', className, (_classNames = {}, _classNames[styles$f.loading] = error, _classNames));
|
|
2268
2272
|
return React__default.createElement("div", _extends({
|
|
2269
2273
|
className: classNames(styles$f['radio-group'], groupClasses)
|
|
@@ -2293,7 +2297,7 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
2293
2297
|
}))), error && typeof error !== 'boolean' && React__default.createElement(InputValidationMessage, null, error));
|
|
2294
2298
|
};
|
|
2295
2299
|
|
|
2296
|
-
var _excluded$
|
|
2300
|
+
var _excluded$m = ["field", "form", "onChange", "options"];
|
|
2297
2301
|
var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
2298
2302
|
var _ref$field = _ref.field,
|
|
2299
2303
|
name = _ref$field.name,
|
|
@@ -2305,7 +2309,7 @@ var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
|
2305
2309
|
errors = _ref$form.errors,
|
|
2306
2310
|
onChange = _ref.onChange,
|
|
2307
2311
|
options = _ref.options,
|
|
2308
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2312
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
2309
2313
|
return React__default.createElement(RadioGroup, _extends({}, props, {
|
|
2310
2314
|
options: options,
|
|
2311
2315
|
name: name,
|
|
@@ -2318,7 +2322,7 @@ var FormikRadioGroup = function FormikRadioGroup(_ref) {
|
|
|
2318
2322
|
|
|
2319
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"};
|
|
2320
2324
|
|
|
2321
|
-
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"];
|
|
2322
2326
|
function SelectInput(props) {
|
|
2323
2327
|
var _ref, _classNames;
|
|
2324
2328
|
var id = props.id,
|
|
@@ -2361,7 +2365,7 @@ function SelectInput(props) {
|
|
|
2361
2365
|
requiredIndicator = _props$requiredIndica === void 0 ? ' *' : _props$requiredIndica,
|
|
2362
2366
|
_props$size = props.size,
|
|
2363
2367
|
size = _props$size === void 0 ? 'md' : _props$size,
|
|
2364
|
-
restProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
2368
|
+
restProps = _objectWithoutPropertiesLoose(props, _excluded$l);
|
|
2365
2369
|
var handleChange = function handleChange(values) {
|
|
2366
2370
|
var simulatedEventPayloadType = {
|
|
2367
2371
|
target: {
|
|
@@ -2434,7 +2438,7 @@ function SelectInput(props) {
|
|
|
2434
2438
|
})), error && typeof error !== 'boolean' && React__default.createElement(InputValidationMessage, null, error));
|
|
2435
2439
|
}
|
|
2436
2440
|
|
|
2437
|
-
var _excluded$
|
|
2441
|
+
var _excluded$k = ["field", "form", "onChange", "id", "label", "options", "error"];
|
|
2438
2442
|
var FormikSelectInput = function FormikSelectInput(_ref) {
|
|
2439
2443
|
var _ref$field = _ref.field,
|
|
2440
2444
|
name = _ref$field.name,
|
|
@@ -2449,7 +2453,7 @@ var FormikSelectInput = function FormikSelectInput(_ref) {
|
|
|
2449
2453
|
label = _ref.label,
|
|
2450
2454
|
options = _ref.options,
|
|
2451
2455
|
errorProp = _ref.error,
|
|
2452
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2456
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
2453
2457
|
var errorMessage;
|
|
2454
2458
|
var error = errorProp != null ? errorProp : getIn(touched, name) && getIn(errors, name);
|
|
2455
2459
|
if (typeof error === 'string') {
|
|
@@ -2577,7 +2581,7 @@ var SelectInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2577
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));
|
|
2578
2582
|
});
|
|
2579
2583
|
|
|
2580
|
-
var _excluded$
|
|
2584
|
+
var _excluded$j = ["field", "form", "onChange", "id", "label", "options"];
|
|
2581
2585
|
var FormikSelectInputInset = function FormikSelectInputInset(_ref) {
|
|
2582
2586
|
var _ref$field = _ref.field,
|
|
2583
2587
|
name = _ref$field.name,
|
|
@@ -2591,7 +2595,7 @@ var FormikSelectInputInset = function FormikSelectInputInset(_ref) {
|
|
|
2591
2595
|
id = _ref.id,
|
|
2592
2596
|
label = _ref.label,
|
|
2593
2597
|
options = _ref.options,
|
|
2594
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2598
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
2595
2599
|
return React__default.createElement(SelectInputInset, _extends({}, props, {
|
|
2596
2600
|
id: id,
|
|
2597
2601
|
label: label,
|
|
@@ -2689,7 +2693,7 @@ var TextareaInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2689
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));
|
|
2690
2694
|
});
|
|
2691
2695
|
|
|
2692
|
-
var _excluded$
|
|
2696
|
+
var _excluded$i = ["field", "form", "onChange", "id", "label"];
|
|
2693
2697
|
var FormikTextareaInputInset = function FormikTextareaInputInset(_ref) {
|
|
2694
2698
|
var _ref$field = _ref.field,
|
|
2695
2699
|
name = _ref$field.name,
|
|
@@ -2702,7 +2706,7 @@ var FormikTextareaInputInset = function FormikTextareaInputInset(_ref) {
|
|
|
2702
2706
|
onChange = _ref.onChange,
|
|
2703
2707
|
id = _ref.id,
|
|
2704
2708
|
label = _ref.label,
|
|
2705
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2709
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
2706
2710
|
return React__default.createElement(TextareaInputInset, _extends({}, props, {
|
|
2707
2711
|
id: id,
|
|
2708
2712
|
label: label,
|
|
@@ -2829,7 +2833,7 @@ var TextInputInset = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
2829
2833
|
}, suffix)), helpText && React__default.createElement(HelpText, null, helpText), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
2830
2834
|
});
|
|
2831
2835
|
|
|
2832
|
-
var _excluded$
|
|
2836
|
+
var _excluded$h = ["field", "form", "onChange", "id", "label"];
|
|
2833
2837
|
var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
2834
2838
|
var _ref$field = _ref.field,
|
|
2835
2839
|
name = _ref$field.name,
|
|
@@ -2842,7 +2846,7 @@ var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
|
2842
2846
|
onChange = _ref.onChange,
|
|
2843
2847
|
id = _ref.id,
|
|
2844
2848
|
label = _ref.label,
|
|
2845
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2849
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
2846
2850
|
return React__default.createElement(TextInputInset, _extends({}, props, {
|
|
2847
2851
|
id: id,
|
|
2848
2852
|
label: label,
|
|
@@ -2856,7 +2860,7 @@ var FormikTextInputInset = function FormikTextInputInset(_ref) {
|
|
|
2856
2860
|
|
|
2857
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"};
|
|
2858
2862
|
|
|
2859
|
-
var _excluded$
|
|
2863
|
+
var _excluded$g = ["autoFocus", "label", "hideLabel", "helpText", "error", "id", "isDisabled", "isRequired", "name", "value", "options", "onChange", "placeholder", "requiredIndicator", "size"];
|
|
2860
2864
|
var SelectInputNative = function SelectInputNative(_ref) {
|
|
2861
2865
|
var _ref2;
|
|
2862
2866
|
var _ref$autoFocus = _ref.autoFocus,
|
|
@@ -2878,7 +2882,7 @@ var SelectInputNative = function SelectInputNative(_ref) {
|
|
|
2878
2882
|
requiredIndicator = _ref$requiredIndicato === void 0 ? ' *' : _ref$requiredIndicato,
|
|
2879
2883
|
_ref$size = _ref.size,
|
|
2880
2884
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
2881
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2885
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
2882
2886
|
var placeholderOption = {
|
|
2883
2887
|
value: '',
|
|
2884
2888
|
label: placeholder
|
|
@@ -2924,7 +2928,7 @@ var SelectInputNative = function SelectInputNative(_ref) {
|
|
|
2924
2928
|
}))));
|
|
2925
2929
|
};
|
|
2926
2930
|
|
|
2927
|
-
var _excluded$
|
|
2931
|
+
var _excluded$f = ["field", "form", "onChange", "options", "id", "label"];
|
|
2928
2932
|
var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
2929
2933
|
var _ref$field = _ref.field,
|
|
2930
2934
|
name = _ref$field.name,
|
|
@@ -2938,7 +2942,7 @@ var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
|
2938
2942
|
options = _ref.options,
|
|
2939
2943
|
id = _ref.id,
|
|
2940
2944
|
label = _ref.label,
|
|
2941
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2945
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
2942
2946
|
return React__default.createElement(SelectInputNative, _extends({}, props, {
|
|
2943
2947
|
options: options,
|
|
2944
2948
|
id: id,
|
|
@@ -2951,7 +2955,7 @@ var FormikSelectInputNative = function FormikSelectInputNative(_ref) {
|
|
|
2951
2955
|
}));
|
|
2952
2956
|
};
|
|
2953
2957
|
|
|
2954
|
-
var _excluded$
|
|
2958
|
+
var _excluded$e = ["field", "form", "onChange", "id", "label"];
|
|
2955
2959
|
var FormikTextInput = function FormikTextInput(_ref) {
|
|
2956
2960
|
var _ref$field = _ref.field,
|
|
2957
2961
|
name = _ref$field.name,
|
|
@@ -2964,7 +2968,7 @@ var FormikTextInput = function FormikTextInput(_ref) {
|
|
|
2964
2968
|
onChange = _ref.onChange,
|
|
2965
2969
|
id = _ref.id,
|
|
2966
2970
|
label = _ref.label,
|
|
2967
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2971
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
2968
2972
|
return React__default.createElement(TextInput, _extends({}, props, {
|
|
2969
2973
|
id: id,
|
|
2970
2974
|
label: label,
|
|
@@ -2978,7 +2982,7 @@ var FormikTextInput = function FormikTextInput(_ref) {
|
|
|
2978
2982
|
|
|
2979
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"};
|
|
2980
2984
|
|
|
2981
|
-
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"];
|
|
2982
2986
|
var TextareaInput = function TextareaInput(_ref) {
|
|
2983
2987
|
var _ref2;
|
|
2984
2988
|
var id = _ref.id,
|
|
@@ -3018,7 +3022,7 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
3018
3022
|
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
3019
3023
|
_ref$size = _ref.size,
|
|
3020
3024
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
3021
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3025
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
3022
3026
|
var responsiveClasses = generateResponsiveClasses('size', size);
|
|
3023
3027
|
var inputWrapperClasses = classNames.apply(void 0, ['hyphen-components__variables__form-control', styles$9['textarea-input-wrapper']].concat(responsiveClasses.map(function (c) {
|
|
3024
3028
|
return styles$9[c];
|
|
@@ -3062,7 +3066,7 @@ var TextareaInput = function TextareaInput(_ref) {
|
|
|
3062
3066
|
}, inputProps))), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
3063
3067
|
};
|
|
3064
3068
|
|
|
3065
|
-
var _excluded$
|
|
3069
|
+
var _excluded$c = ["field", "form", "onChange", "id", "label"];
|
|
3066
3070
|
var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
3067
3071
|
var _ref$field = _ref.field,
|
|
3068
3072
|
name = _ref$field.name,
|
|
@@ -3075,7 +3079,7 @@ var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
|
3075
3079
|
onChange = _ref.onChange,
|
|
3076
3080
|
id = _ref.id,
|
|
3077
3081
|
label = _ref.label,
|
|
3078
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3082
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
3079
3083
|
return React__default.createElement(TextareaInput, _extends({}, props, {
|
|
3080
3084
|
id: id,
|
|
3081
3085
|
label: label,
|
|
@@ -3087,7 +3091,7 @@ var FormikTextareaInput = function FormikTextareaInput(_ref) {
|
|
|
3087
3091
|
}));
|
|
3088
3092
|
};
|
|
3089
3093
|
|
|
3090
|
-
var _excluded$
|
|
3094
|
+
var _excluded$b = ["id", "name", "label", "onChange", "value", "dateDisplayOptions", "endTime", "interval", "locales", "placeholder", "startTime"];
|
|
3091
3095
|
var TimePicker = function TimePicker(_ref) {
|
|
3092
3096
|
var id = _ref.id,
|
|
3093
3097
|
name = _ref.name,
|
|
@@ -3109,7 +3113,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
3109
3113
|
placeholder = _ref$placeholder === void 0 ? 'HH:MM' : _ref$placeholder,
|
|
3110
3114
|
_ref$startTime = _ref.startTime,
|
|
3111
3115
|
startTime = _ref$startTime === void 0 ? undefined : _ref$startTime,
|
|
3112
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3116
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
3113
3117
|
var generateTimes = function generateTimes() {
|
|
3114
3118
|
var first = new Date();
|
|
3115
3119
|
first.setHours((startTime == null ? void 0 : startTime.hour) || 0, (startTime == null ? void 0 : startTime.minute) || 0, 0, 0);
|
|
@@ -3137,7 +3141,7 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
3137
3141
|
}));
|
|
3138
3142
|
};
|
|
3139
3143
|
|
|
3140
|
-
var _excluded$
|
|
3144
|
+
var _excluded$a = ["field", "form", "options", "onChange"];
|
|
3141
3145
|
var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
3142
3146
|
var _ref$field = _ref.field,
|
|
3143
3147
|
name = _ref$field.name,
|
|
@@ -3149,7 +3153,7 @@ var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
|
3149
3153
|
errors = _ref$form.errors,
|
|
3150
3154
|
options = _ref.options,
|
|
3151
3155
|
onChange = _ref.onChange,
|
|
3152
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3156
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
3153
3157
|
return React__default.createElement(TimePicker, _extends({}, props, {
|
|
3154
3158
|
name: name,
|
|
3155
3159
|
onBlur: onBlur,
|
|
@@ -3160,7 +3164,7 @@ var FormikTimePicker = function FormikTimePicker(_ref) {
|
|
|
3160
3164
|
}));
|
|
3161
3165
|
};
|
|
3162
3166
|
|
|
3163
|
-
var _excluded$
|
|
3167
|
+
var _excluded$9 = ["id", "name", "label", "onChange", "value", "dateDisplayOptions", "endTime", "interval", "locales", "placeholder", "startTime"];
|
|
3164
3168
|
var TimePickerNative = function TimePickerNative(_ref) {
|
|
3165
3169
|
var id = _ref.id,
|
|
3166
3170
|
name = _ref.name,
|
|
@@ -3182,7 +3186,7 @@ var TimePickerNative = function TimePickerNative(_ref) {
|
|
|
3182
3186
|
placeholder = _ref$placeholder === void 0 ? 'HH:MM' : _ref$placeholder,
|
|
3183
3187
|
_ref$startTime = _ref.startTime,
|
|
3184
3188
|
startTime = _ref$startTime === void 0 ? undefined : _ref$startTime,
|
|
3185
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3189
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
3186
3190
|
var generateTimes = function generateTimes() {
|
|
3187
3191
|
var first = new Date();
|
|
3188
3192
|
first.setHours((startTime == null ? void 0 : startTime.hour) || 0, (startTime == null ? void 0 : startTime.minute) || 0, 0, 0);
|
|
@@ -3211,7 +3215,7 @@ var TimePickerNative = function TimePickerNative(_ref) {
|
|
|
3211
3215
|
}));
|
|
3212
3216
|
};
|
|
3213
3217
|
|
|
3214
|
-
var _excluded$
|
|
3218
|
+
var _excluded$8 = ["field", "form", "onChange"];
|
|
3215
3219
|
var FormikTimePickerNative = function FormikTimePickerNative(_ref) {
|
|
3216
3220
|
var _ref$field = _ref.field,
|
|
3217
3221
|
name = _ref$field.name,
|
|
@@ -3222,7 +3226,7 @@ var FormikTimePickerNative = function FormikTimePickerNative(_ref) {
|
|
|
3222
3226
|
touched = _ref$form.touched,
|
|
3223
3227
|
errors = _ref$form.errors,
|
|
3224
3228
|
onChange = _ref.onChange,
|
|
3225
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3229
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
3226
3230
|
return React__default.createElement(TimePickerNative, _extends({}, props, {
|
|
3227
3231
|
name: name,
|
|
3228
3232
|
onBlur: onBlur,
|
|
@@ -3323,7 +3327,7 @@ var Toggle = function Toggle(_ref) {
|
|
|
3323
3327
|
}, helpText)))), error && error !== true && React__default.createElement(InputValidationMessage, null, error));
|
|
3324
3328
|
};
|
|
3325
3329
|
|
|
3326
|
-
var _excluded$
|
|
3330
|
+
var _excluded$7 = ["field", "form"];
|
|
3327
3331
|
var FormikToggle = function FormikToggle(_ref) {
|
|
3328
3332
|
var _ref$field = _ref.field,
|
|
3329
3333
|
name = _ref$field.name,
|
|
@@ -3333,7 +3337,7 @@ var FormikToggle = function FormikToggle(_ref) {
|
|
|
3333
3337
|
_ref$form = _ref.form,
|
|
3334
3338
|
touched = _ref$form.touched,
|
|
3335
3339
|
errors = _ref$form.errors,
|
|
3336
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3340
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
3337
3341
|
return React__default.createElement(Toggle, _extends({
|
|
3338
3342
|
error: getIn(touched, name) && getIn(errors, name),
|
|
3339
3343
|
isChecked: value,
|
|
@@ -3342,7 +3346,7 @@ var FormikToggle = function FormikToggle(_ref) {
|
|
|
3342
3346
|
}, props));
|
|
3343
3347
|
};
|
|
3344
3348
|
|
|
3345
|
-
var _excluded$
|
|
3349
|
+
var _excluded$6 = ["children", "padding", "direction", "alignItems", "justifyContent", "gap", "style"];
|
|
3346
3350
|
var ModalFooter = function ModalFooter(_ref) {
|
|
3347
3351
|
var children = _ref.children,
|
|
3348
3352
|
padding = _ref.padding,
|
|
@@ -3355,7 +3359,7 @@ var ModalFooter = function ModalFooter(_ref) {
|
|
|
3355
3359
|
_ref$gap = _ref.gap,
|
|
3356
3360
|
gap = _ref$gap === void 0 ? 'md' : _ref$gap,
|
|
3357
3361
|
style = _ref.style,
|
|
3358
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3362
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
3359
3363
|
return React__default.createElement(Box, _extends({
|
|
3360
3364
|
padding: padding,
|
|
3361
3365
|
direction: direction,
|
|
@@ -3398,7 +3402,7 @@ var ModalHeader = function ModalHeader(_ref) {
|
|
|
3398
3402
|
}));
|
|
3399
3403
|
};
|
|
3400
3404
|
|
|
3401
|
-
var _excluded$
|
|
3405
|
+
var _excluded$5 = ["children", "flex", "overflow", "height"];
|
|
3402
3406
|
var ModalBody = function ModalBody(_ref) {
|
|
3403
3407
|
var children = _ref.children,
|
|
3404
3408
|
_ref$flex = _ref.flex,
|
|
@@ -3407,7 +3411,7 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
3407
3411
|
overflow = _ref$overflow === void 0 ? 'auto' : _ref$overflow,
|
|
3408
3412
|
_ref$height = _ref.height,
|
|
3409
3413
|
height = _ref$height === void 0 ? '100' : _ref$height,
|
|
3410
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3414
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
3411
3415
|
return React__default.createElement(Box, _extends({
|
|
3412
3416
|
flex: flex,
|
|
3413
3417
|
overflow: overflow,
|
|
@@ -3420,7 +3424,7 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
3420
3424
|
|
|
3421
3425
|
var styles$7 = {"modal-close":"Modal-module_modal-close__1YmMa","modal":"Modal-module_modal__yNG-7","modal-content":"Modal-module_modal-content__GMtBm"};
|
|
3422
3426
|
|
|
3423
|
-
var _excluded$
|
|
3427
|
+
var _excluded$4 = ["ariaLabel", "ariaLabelledBy", "allowPinchZoom", "children", "className", "containerRef", "fullScreenMobile", "initialFocusRef", "isOpen", "maxWidth", "onDismiss", "overflow"];
|
|
3424
3428
|
var ModalBaseComponent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
3425
3429
|
var _classNames;
|
|
3426
3430
|
var ariaLabel = _ref.ariaLabel,
|
|
@@ -3440,7 +3444,7 @@ var ModalBaseComponent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
3440
3444
|
onDismiss = _ref.onDismiss,
|
|
3441
3445
|
_ref$overflow = _ref.overflow,
|
|
3442
3446
|
overflow = _ref$overflow === void 0 ? 'hidden' : _ref$overflow,
|
|
3443
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3447
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
3444
3448
|
var activateFocusLock = useCallback(function () {
|
|
3445
3449
|
setTimeout(function () {
|
|
3446
3450
|
if (initialFocusRef && initialFocusRef.current) {
|
|
@@ -3666,7 +3670,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
3666
3670
|
|
|
3667
3671
|
var styles$6 = {"slider":"RangeInput-module_slider__Z6D68","disabled":"RangeInput-module_disabled__gyu72"};
|
|
3668
3672
|
|
|
3669
|
-
var _excluded$
|
|
3673
|
+
var _excluded$3 = ["value", "max", "id", "onChange", "className", "isDisabled"];
|
|
3670
3674
|
var RangeInput = function RangeInput(_ref) {
|
|
3671
3675
|
var _classNames;
|
|
3672
3676
|
var _ref$value = _ref.value,
|
|
@@ -3678,7 +3682,7 @@ var RangeInput = function RangeInput(_ref) {
|
|
|
3678
3682
|
className = _ref.className,
|
|
3679
3683
|
_ref$isDisabled = _ref.isDisabled,
|
|
3680
3684
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
3681
|
-
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3685
|
+
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
3682
3686
|
var currentProgress = value > 0 ? value / max * 100 : 0;
|
|
3683
3687
|
return React__default.createElement("input", _extends({}, restProps, {
|
|
3684
3688
|
id: id,
|
|
@@ -3757,6 +3761,450 @@ var ResponsiveProvider = function ResponsiveProvider(_ref) {
|
|
|
3757
3761
|
}, children);
|
|
3758
3762
|
};
|
|
3759
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
|
+
|
|
3760
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"};
|
|
3761
4209
|
|
|
3762
4210
|
var styles$4 = {"table-body":"TableBody-module_table-body__Y5WbD","striped":"TableBody-module_striped__5MlEr","hover":"TableBody-module_hover__2CRgY"};
|
|
@@ -4751,28 +5199,6 @@ var useBreakpoint = function useBreakpoint() {
|
|
|
4751
5199
|
};
|
|
4752
5200
|
};
|
|
4753
5201
|
|
|
4754
|
-
var desktopBreakpoint = /*#__PURE__*/BREAKPOINTS.find(function (b) {
|
|
4755
|
-
return b.name === 'desktop';
|
|
4756
|
-
});
|
|
4757
|
-
var MOBILE_BREAKPOINT = desktopBreakpoint ? desktopBreakpoint.minWidth : 0; // min width in pixels
|
|
4758
|
-
function useIsMobile() {
|
|
4759
|
-
var _React$useState = React.useState(undefined),
|
|
4760
|
-
isMobile = _React$useState[0],
|
|
4761
|
-
setIsMobile = _React$useState[1];
|
|
4762
|
-
React.useEffect(function () {
|
|
4763
|
-
var mql = window.matchMedia("(max-width: " + (MOBILE_BREAKPOINT - 1) + "px)");
|
|
4764
|
-
var onChange = function onChange() {
|
|
4765
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
4766
|
-
};
|
|
4767
|
-
mql.addEventListener('change', onChange);
|
|
4768
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
4769
|
-
return function () {
|
|
4770
|
-
return mql.removeEventListener('change', onChange);
|
|
4771
|
-
};
|
|
4772
|
-
}, []);
|
|
4773
|
-
return !!isMobile;
|
|
4774
|
-
}
|
|
4775
|
-
|
|
4776
5202
|
var useOpenClose = function useOpenClose(props) {
|
|
4777
5203
|
if (props === void 0) {
|
|
4778
5204
|
props = {};
|
|
@@ -4826,5 +5252,5 @@ var useTheme = function useTheme() {
|
|
|
4826
5252
|
return context;
|
|
4827
5253
|
};
|
|
4828
5254
|
|
|
4829
|
-
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, 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 };
|
|
4830
5256
|
//# sourceMappingURL=hyphen-components.esm.js.map
|