@atom-learning/components 10.0.1 → 10.2.0-beta.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/action-icon/ActionIcon.d.ts +4 -3
- package/dist/components/action-icon/ActionIcon.js +5 -3
- package/dist/components/action-icon/ActionIcon.js.map +1 -1
- package/dist/components/badge/BadgeText.js +1 -1
- package/dist/components/badge/BadgeText.js.map +1 -1
- package/dist/components/banner/BannerContainer.js.map +1 -1
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +1 -0
- package/dist/components/banner/banner-regular/BannerRegularActions.js +1 -1
- package/dist/components/banner/banner-regular/BannerRegularActions.js.map +1 -1
- package/dist/components/banner/banner-regular/BannerRegularDismiss.d.ts +5 -3
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +9 -2
- package/dist/components/banner/banner-slim/BannerSlimDismiss.d.ts +5 -3
- package/dist/components/button/Button.d.ts +2 -2
- package/dist/components/button/Button.js +21 -17
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/calendar/Calendar.js +2 -2
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/carousel/Carousel.js.map +1 -1
- package/dist/components/checkbox-group/CheckboxGroupAllItem.js +3 -2
- package/dist/components/checkbox-group/CheckboxGroupAllItem.js.map +1 -1
- package/dist/components/checkbox-group/CheckboxGroupChecked.context.js +1 -1
- package/dist/components/checkbox-group/CheckboxGroupChecked.context.js.map +1 -1
- package/dist/components/checkbox-group/CheckboxGroupMounted.context.js +1 -1
- package/dist/components/checkbox-group/CheckboxGroupMounted.context.js.map +1 -1
- package/dist/components/chip/Chip.js +2 -2
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/create-password-field/CreatePasswordField.js +5 -5
- package/dist/components/create-password-field/CreatePasswordField.js.map +1 -1
- package/dist/components/data-table/DataTableHeaderCell.js +8 -8
- package/dist/components/data-table/DataTableHeaderCell.js.map +1 -1
- package/dist/components/data-table/DataTableSelectAllRowsCheckbox.js.map +1 -1
- package/dist/components/data-table/getNewAsyncData.js +1 -1
- package/dist/components/data-table/getNewAsyncData.js.map +1 -1
- package/dist/components/date-input/DateInput.js.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +2 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.d.ts +2 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +18 -13
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js.map +1 -1
- package/dist/components/file-drop/FileDrop.js +2 -2
- package/dist/components/file-drop/FileDrop.js.map +1 -1
- package/dist/components/form/useFieldError.js +2 -1
- package/dist/components/form/useFieldError.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/link/Link.d.ts +2 -2
- package/dist/components/link/Link.js +13 -9
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/navigation/NavigationMenu.d.ts +2 -1
- package/dist/components/navigation/NavigationMenu.js +1 -1
- package/dist/components/navigation/NavigationMenu.js.map +1 -1
- package/dist/components/navigation/NavigationMenuLink.d.ts +2 -1
- package/dist/components/navigation/NavigationMenuLink.js +28 -13
- package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +4 -2
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +4 -2
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js +5 -3
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
- package/dist/components/number-input/NumberInputStepper.d.ts +5 -3
- package/dist/components/pagination/PaginationItems.js +2 -2
- package/dist/components/pagination/PaginationItems.js.map +1 -1
- package/dist/components/pagination/PaginationNextButton.d.ts +5 -3
- package/dist/components/pagination/PaginationPreviousButton.d.ts +5 -3
- package/dist/components/pagination/pagination.helper.js +5 -3
- package/dist/components/pagination/pagination.helper.js.map +1 -1
- package/dist/components/router-provider/Router.d.ts +9 -0
- package/dist/components/router-provider/Router.js +7 -0
- package/dist/components/router-provider/Router.js.map +1 -0
- package/dist/components/router-provider/RouterProvider.d.ts +16 -0
- package/dist/components/router-provider/RouterProvider.js +23 -0
- package/dist/components/router-provider/RouterProvider.js.map +1 -0
- package/dist/components/select-menu/SelectMenu.d.ts +16 -9
- package/dist/components/select-menu/SelectMenu.js +6 -4
- package/dist/components/select-menu/SelectMenu.js.map +1 -1
- package/dist/components/select-menu/SelectMenuContent.d.ts +5 -3
- package/dist/components/select-menu/SelectMenuContent.js +24 -65
- package/dist/components/select-menu/SelectMenuContent.js.map +1 -1
- package/dist/components/select-menu/SelectMenuItem.d.ts +5 -3
- package/dist/components/select-menu/SelectMenuItem.js +15 -15
- package/dist/components/select-menu/SelectMenuItem.js.map +1 -1
- package/dist/components/select-menu/SelectMenuLabel.d.ts +2 -2
- package/dist/components/select-menu/SelectMenuLabel.js +2 -2
- package/dist/components/select-menu/SelectMenuLabel.js.map +1 -1
- package/dist/components/select-menu/SelectMenuSeparator.d.ts +2 -2
- package/dist/components/select-menu/SelectMenuSeparator.js +2 -2
- package/dist/components/select-menu/SelectMenuSeparator.js.map +1 -1
- package/dist/components/select-menu/SelectMenuTrigger.d.ts +3 -2
- package/dist/components/select-menu/SelectMenuTrigger.js +12 -12
- package/dist/components/select-menu/SelectMenuTrigger.js.map +1 -1
- package/dist/components/select-menu-field/SelectMenuField.js +5 -5
- package/dist/components/select-menu-field/SelectMenuField.js.map +1 -1
- package/dist/components/slider/Slider.js.map +1 -1
- package/dist/components/slider-field/SliderField.js +2 -1
- package/dist/components/slider-field/SliderField.js.map +1 -1
- package/dist/components/sortable/Handle.d.ts +5 -3
- package/dist/components/stepper/Stepper.js +1 -1
- package/dist/components/stepper/Stepper.js.map +1 -1
- package/dist/components/stepper/StepperSteps.js +7 -5
- package/dist/components/stepper/StepperSteps.js.map +1 -1
- package/dist/components/table/useStickyColumnsCss.js +1 -1
- package/dist/components/table/useStickyColumnsCss.js.map +1 -1
- package/dist/components/tile-interactive/TileInteractive.d.ts +5 -3
- package/dist/components/tile-interactive/TileInteractive.js +4 -2
- package/dist/components/tile-interactive/TileInteractive.js.map +1 -1
- package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +5 -2
- package/dist/components/top-bar/TopBar.d.ts +4 -2
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +239 -218
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -1
- package/dist/styled.js +15 -11
- package/dist/styled.js.map +1 -1
- package/dist/utilities/hooks/useResizeObserver.js +1 -3
- package/dist/utilities/hooks/useResizeObserver.js.map +1 -1
- package/dist/utilities/uri/index.js +2 -1
- package/dist/utilities/uri/index.js.map +1 -1
- package/package.json +15 -7
- package/src/utilities.css +1 -1
- package/dist/types/navigatorActions.types.d.ts +0 -5
package/dist/index.cjs.js
CHANGED
|
@@ -41,8 +41,8 @@ let tailwind_variants = require("tailwind-variants");
|
|
|
41
41
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
42
42
|
let _atom_learning_icons = require("@atom-learning/icons");
|
|
43
43
|
let _radix_ui_react_slot = require("@radix-ui/react-slot");
|
|
44
|
-
let
|
|
45
|
-
|
|
44
|
+
let tiny_invariant = require("tiny-invariant");
|
|
45
|
+
tiny_invariant = __toESM(tiny_invariant, 1);
|
|
46
46
|
let _radix_ui_react_tooltip = require("@radix-ui/react-tooltip");
|
|
47
47
|
let _radix_ui_react_alert_dialog = require("@radix-ui/react-alert-dialog");
|
|
48
48
|
let throttle_debounce = require("throttle-debounce");
|
|
@@ -79,8 +79,8 @@ let _radix_ui_react_navigation_menu = require("@radix-ui/react-navigation-menu")
|
|
|
79
79
|
_radix_ui_react_navigation_menu = __toESM(_radix_ui_react_navigation_menu, 1);
|
|
80
80
|
let _radix_ui_react_progress = require("@radix-ui/react-progress");
|
|
81
81
|
_radix_ui_react_progress = __toESM(_radix_ui_react_progress, 1);
|
|
82
|
-
let
|
|
83
|
-
|
|
82
|
+
let react_aria_components = require("react-aria-components");
|
|
83
|
+
react_aria_components = __toESM(react_aria_components, 1);
|
|
84
84
|
let _radix_ui_react_slider = require("@radix-ui/react-slider");
|
|
85
85
|
let _radix_ui_react_switch = require("@radix-ui/react-switch");
|
|
86
86
|
_radix_ui_react_switch = __toESM(_radix_ui_react_switch, 1);
|
|
@@ -90,7 +90,9 @@ let react_player_vimeo_js = require("react-player/vimeo.js");
|
|
|
90
90
|
react_player_vimeo_js = __toESM(react_player_vimeo_js, 1);
|
|
91
91
|
//#region src/styled.tsx
|
|
92
92
|
tailwind_variants.defaultConfig.twMerge = false;
|
|
93
|
-
var
|
|
93
|
+
var ARBITRARY_NUMBER_RE = /^\[[\d.]+\]$/;
|
|
94
|
+
var isArbitraryNumber = (value) => ARBITRARY_NUMBER_RE.test(value) || !Number.isNaN(Number(value));
|
|
95
|
+
var DATA_STATE_VARIANT_RE = /^data-\[state=[^\]]+\]:/;
|
|
94
96
|
var twMerge = (0, tailwind_merge.extendTailwindMerge)({ extend: {
|
|
95
97
|
classGroups: {
|
|
96
98
|
capsize: [{ capsize: ["none", isArbitraryNumber] }],
|
|
@@ -112,11 +114,12 @@ var Theme = ({ children, theme }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
|
112
114
|
var createTheme = (config) => Object.fromEntries(Object.values(config).flatMap((tokens) => Object.entries(tokens).map(([token, value]) => [`--${token}`, value])));
|
|
113
115
|
function styled(el, styles, options) {
|
|
114
116
|
const variantKeys = Object.keys(styles.variants || {});
|
|
117
|
+
const variantKeySet = new Set(variantKeys);
|
|
115
118
|
const enableResponsiveVariants = options?.enableResponsiveVariants === true;
|
|
116
119
|
const tvFn = (0, tailwind_variants.tv)(styles);
|
|
117
120
|
const Comp = (props) => {
|
|
118
|
-
const { ref
|
|
119
|
-
const additionalStyles = enableResponsiveVariants ? variantKeys.
|
|
121
|
+
const { ref } = props;
|
|
122
|
+
const additionalStyles = enableResponsiveVariants ? variantKeys.flatMap((variantKey) => {
|
|
120
123
|
const responsiveVariantConfig = props[variantKey];
|
|
121
124
|
const variantStyles = styles.variants[variantKey];
|
|
122
125
|
if (typeof responsiveVariantConfig === "object" && responsiveVariantConfig && !Array.isArray(responsiveVariantConfig)) return Object.entries(responsiveVariantConfig).flatMap(([key, val]) => {
|
|
@@ -128,16 +131,17 @@ function styled(el, styles, options) {
|
|
|
128
131
|
return [];
|
|
129
132
|
});
|
|
130
133
|
return [];
|
|
131
|
-
})
|
|
132
|
-
const cls = tvFn(variantKeys.length > 0 ? Object.fromEntries(Object.entries(props).
|
|
134
|
+
}) : [];
|
|
135
|
+
const cls = tvFn(variantKeys.length > 0 ? Object.fromEntries(Object.entries(props).flatMap(([key, value]) => {
|
|
136
|
+
if (!variantKeySet.has(key)) return [];
|
|
133
137
|
const variantConfig = styles.variants?.[key];
|
|
134
138
|
if (variantConfig && "true" in variantConfig && "false" in variantConfig) {
|
|
135
|
-
if (value === true || value === false) return [key, value];
|
|
136
|
-
return [key, null];
|
|
139
|
+
if (value === true || value === false) return [[key, value]];
|
|
140
|
+
return [[key, null]];
|
|
137
141
|
}
|
|
138
|
-
return [key, value];
|
|
142
|
+
return [[key, value]];
|
|
139
143
|
})) : {});
|
|
140
|
-
const filteredProps = Object.fromEntries(Object.entries(props).filter(([key]) => !
|
|
144
|
+
const filteredProps = Object.fromEntries(Object.entries(props).filter(([key]) => !variantKeySet.has(key) && key !== "as" && key !== "__wrapperClasses"));
|
|
141
145
|
const mergedClassName = (0, clsx.default)(cls, additionalStyles).trim();
|
|
142
146
|
const propsClassName = props.className;
|
|
143
147
|
const wrapperClasses = props.__wrapperClasses;
|
|
@@ -146,7 +150,7 @@ function styled(el, styles, options) {
|
|
|
146
150
|
if (typeof el === "string") {
|
|
147
151
|
const { className: _, ...restFilteredProps } = filteredProps;
|
|
148
152
|
const finalClassName = wrapperClasses && propsClassName ? twMerge(mergedClassName, wrapperClasses, propsClassName) : wrapperClasses ? twMerge(mergedClassName, wrapperClasses) : propsClassName ? (() => {
|
|
149
|
-
if (propsClassName.split(" ").some((cls) =>
|
|
153
|
+
if (propsClassName.split(" ").some((cls) => DATA_STATE_VARIANT_RE.test(cls))) return twMerge(propsClassName, mergedClassName);
|
|
150
154
|
else return twMerge(mergedClassName, propsClassName);
|
|
151
155
|
})() : twMerge(mergedClassName);
|
|
152
156
|
return react.default.createElement(props.as || elementType, {
|
|
@@ -178,7 +182,7 @@ function styled(el, styles, options) {
|
|
|
178
182
|
ref
|
|
179
183
|
};
|
|
180
184
|
if (isStyledComponent) {
|
|
181
|
-
const hasDataAttributeVariants = propsClassName ? propsClassName.split(" ").some((cls) =>
|
|
185
|
+
const hasDataAttributeVariants = propsClassName ? propsClassName.split(" ").some((cls) => DATA_STATE_VARIANT_RE.test(cls)) : false;
|
|
182
186
|
const mergedPropsAndComponent = propsClassName ? hasDataAttributeVariants ? twMerge(propsClassName, mergedClassName) : twMerge(mergedClassName, propsClassName) : mergedClassName;
|
|
183
187
|
propsForComponent.__wrapperClasses = mergedClassName;
|
|
184
188
|
propsForComponent.className = mergedPropsAndComponent || void 0;
|
|
@@ -499,12 +503,31 @@ var OptionalTooltipWrapper = ({ hasTooltip, label, tooltipSide, children }) => {
|
|
|
499
503
|
OptionalTooltipWrapper.displayName = "OptionalTooltipWrapper";
|
|
500
504
|
//#endregion
|
|
501
505
|
//#region src/utilities/uri/index.ts
|
|
502
|
-
var
|
|
506
|
+
var EXTERNAL_URL_RE = /^https?:\/\//;
|
|
507
|
+
var isExternalUrl = (url) => !!url && EXTERNAL_URL_RE.test(url);
|
|
503
508
|
var getExternalAnchorProps = (url) => isExternalUrl(url) ? {
|
|
504
509
|
target: "_blank",
|
|
505
510
|
rel: "noopener noreferrer"
|
|
506
511
|
} : {};
|
|
507
512
|
//#endregion
|
|
513
|
+
//#region src/components/router-provider/RouterProvider.tsx
|
|
514
|
+
var RouterContext = react.createContext({});
|
|
515
|
+
var RouterProvider = ({ link, children }) => {
|
|
516
|
+
const value = react.useMemo(() => ({ link }), [link]);
|
|
517
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RouterContext.Provider, {
|
|
518
|
+
value,
|
|
519
|
+
children
|
|
520
|
+
});
|
|
521
|
+
};
|
|
522
|
+
var isAbsoluteUrl = (url) => /^https?:\/\//.test(url || "");
|
|
523
|
+
var EMPTY = {};
|
|
524
|
+
var useRouterLinkProps = (href, { reloadDocument } = {}) => {
|
|
525
|
+
const { link } = react.useContext(RouterContext);
|
|
526
|
+
if (!link || !href || isAbsoluteUrl(href) || reloadDocument) return EMPTY;
|
|
527
|
+
return { as: link };
|
|
528
|
+
};
|
|
529
|
+
RouterProvider.displayName = "Router.Provider";
|
|
530
|
+
//#endregion
|
|
508
531
|
//#region src/components/action-icon/ActionIcon.constants.ts
|
|
509
532
|
var ActionIconSizeMap = {
|
|
510
533
|
xs: "sm",
|
|
@@ -609,16 +632,17 @@ var StyledButton$5 = styled("button", {
|
|
|
609
632
|
isRounded: { true: ["rounded-full"] }
|
|
610
633
|
}
|
|
611
634
|
}, { enableResponsiveVariants: true });
|
|
612
|
-
var ActionIcon = ({ ref, children, theme = "primary", appearance = "simple", size = "sm", label, href, disabled, hasTooltip = true, tooltipSide, ...rest }) => {
|
|
635
|
+
var ActionIcon = ({ ref, children, theme = "primary", appearance = "simple", size = "sm", label, href, disabled, hasTooltip = true, tooltipSide, reloadDocument, ...rest }) => {
|
|
613
636
|
const INVALID_CHILDREN_MESSAGE = `A single ${Icon.name} component is permitted as a child of ActionIcon`;
|
|
614
|
-
(0,
|
|
637
|
+
(0, tiny_invariant.default)(react.Children.count(children) === 1, INVALID_CHILDREN_MESSAGE);
|
|
638
|
+
const routerLinkProps = useRouterLinkProps(href, { reloadDocument });
|
|
615
639
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OptionalTooltipWrapper, {
|
|
616
640
|
hasTooltip,
|
|
617
641
|
label,
|
|
618
642
|
tooltipSide,
|
|
619
643
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledButton$5, {
|
|
620
644
|
...href ? {
|
|
621
|
-
as: "a",
|
|
645
|
+
as: routerLinkProps.as || "a",
|
|
622
646
|
href: disabled ? void 0 : href,
|
|
623
647
|
onClick: void 0,
|
|
624
648
|
"aria-disabled": !!disabled
|
|
@@ -633,7 +657,7 @@ var ActionIcon = ({ ref, children, theme = "primary", appearance = "simple", siz
|
|
|
633
657
|
disabled,
|
|
634
658
|
children: react.Children.map(children, (child) => {
|
|
635
659
|
if (!react.isValidElement(child)) throw new Error(INVALID_CHILDREN_MESSAGE);
|
|
636
|
-
(0,
|
|
660
|
+
(0, tiny_invariant.default)(child.type === Icon, `Children of type ${child?.type} aren't permitted. Only an ${Icon.name} component is allowed in ActionIcon`);
|
|
637
661
|
return react.cloneElement(child, { size: ActionIconSizeMap[size] });
|
|
638
662
|
})
|
|
639
663
|
})
|
|
@@ -884,23 +908,26 @@ var WithLoader = ({ size, children }) => /* @__PURE__ */ (0, react_jsx_runtime.j
|
|
|
884
908
|
size,
|
|
885
909
|
children
|
|
886
910
|
})] });
|
|
887
|
-
var Button = (({ ref, children, as, href, isLoading = false, onClick, disabled, ...rest }) =>
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
href,
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
children
|
|
902
|
-
|
|
903
|
-
|
|
911
|
+
var Button = (({ ref, children, as, href, isLoading = false, onClick, disabled, reloadDocument, ...rest }) => {
|
|
912
|
+
const routerLinkProps = useRouterLinkProps(href, { reloadDocument });
|
|
913
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledButton, {
|
|
914
|
+
as: as || routerLinkProps.as || (href ? "a" : void 0),
|
|
915
|
+
...!disabled && !isLoading && {
|
|
916
|
+
href,
|
|
917
|
+
onClick
|
|
918
|
+
},
|
|
919
|
+
isLoading,
|
|
920
|
+
type: !href ? "button" : void 0,
|
|
921
|
+
disabled,
|
|
922
|
+
...rest,
|
|
923
|
+
...getExternalAnchorProps(href),
|
|
924
|
+
ref,
|
|
925
|
+
children: isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WithLoader, {
|
|
926
|
+
size: rest.size,
|
|
927
|
+
children
|
|
928
|
+
}) : children
|
|
929
|
+
});
|
|
930
|
+
});
|
|
904
931
|
//#endregion
|
|
905
932
|
//#region src/components/heading/Heading.tsx
|
|
906
933
|
var Heading = styled("h2", {
|
|
@@ -1228,15 +1255,18 @@ var StyledLink = styled("a", {
|
|
|
1228
1255
|
},
|
|
1229
1256
|
defaultVariants: { size: "md" }
|
|
1230
1257
|
}, { enableResponsiveVariants: true });
|
|
1231
|
-
var Link = (({ ref, as, disabled, href, ...rest }) =>
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1258
|
+
var Link = (({ ref, as, disabled, href, reloadDocument, ...rest }) => {
|
|
1259
|
+
const routerLinkProps = useRouterLinkProps(href, { reloadDocument });
|
|
1260
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledLink, {
|
|
1261
|
+
as: as || routerLinkProps.as || (!href ? "button" : void 0),
|
|
1262
|
+
noCapsize: !href ? true : void 0,
|
|
1263
|
+
href,
|
|
1264
|
+
...disabled && { disabled: true },
|
|
1265
|
+
...rest,
|
|
1266
|
+
...getExternalAnchorProps(href),
|
|
1267
|
+
ref
|
|
1268
|
+
});
|
|
1269
|
+
});
|
|
1240
1270
|
//#endregion
|
|
1241
1271
|
//#region src/components/image/ImageCredit.tsx
|
|
1242
1272
|
var overlayControlClasses = [
|
|
@@ -1657,9 +1687,7 @@ var useResizeObserver = ({ delay = 500, elements, onResize }) => {
|
|
|
1657
1687
|
elements.forEach((element) => {
|
|
1658
1688
|
if (element) observer.observe(element);
|
|
1659
1689
|
});
|
|
1660
|
-
return () =>
|
|
1661
|
-
elements.forEach((element) => element && observer.unobserve(element));
|
|
1662
|
-
};
|
|
1690
|
+
return () => observer.disconnect();
|
|
1663
1691
|
}, [observer, elements]);
|
|
1664
1692
|
return observer;
|
|
1665
1693
|
};
|
|
@@ -1669,7 +1697,7 @@ var ObserveBadgeTextOverflow = ({ elRef }) => {
|
|
|
1669
1697
|
const { setIsOverflowing } = react.use(BadgeContext);
|
|
1670
1698
|
useResizeObserver({
|
|
1671
1699
|
delay: 0,
|
|
1672
|
-
elements: [elRef],
|
|
1700
|
+
elements: react.useMemo(() => [elRef], [elRef]),
|
|
1673
1701
|
onResize: () => {
|
|
1674
1702
|
if (!elRef?.scrollWidth || !elRef?.clientWidth) return;
|
|
1675
1703
|
setIsOverflowing?.(elRef.scrollWidth > elRef.clientWidth);
|
|
@@ -1945,14 +1973,14 @@ var BannerRegularActions = ({ children, className, ...rest }) => {
|
|
|
1945
1973
|
const { size } = useBannerContext();
|
|
1946
1974
|
const gap = typeof size === "string" ? toGap[size] : "gap-2 md:gap-4";
|
|
1947
1975
|
const direction = typeof size === "string" ? toDirection$1[size] : "flex-col md:flex-row";
|
|
1948
|
-
(0,
|
|
1976
|
+
(0, tiny_invariant.default)(react.Children.count(children) <= MAX_ALLOWED_CHILDREN, `A maximum of ${MAX_ALLOWED_CHILDREN} ${BannerRegularButton.displayName} component(s) are permitted as children of ${BannerRegularActions.displayName}`);
|
|
1949
1977
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1950
1978
|
className: cn("flex", gap, direction, className),
|
|
1951
1979
|
...rest,
|
|
1952
1980
|
children: react.Children.map(children, (child, index) => {
|
|
1953
1981
|
if (child == null) return child;
|
|
1954
1982
|
if (!react.isValidElement(child)) throw new Error(`Child passed to ${BannerRegularActions.displayName} is not a valid element`);
|
|
1955
|
-
(0,
|
|
1983
|
+
(0, tiny_invariant.default)(child.type === BannerRegularButton, `Children of type ${child?.type} aren't permitted. Only an ${BannerRegularButton.displayName} component is allowed in ${BannerRegularActions.displayName}`);
|
|
1956
1984
|
const propsToInject = { appearance: index > 0 ? "outline" : void 0 };
|
|
1957
1985
|
return react.cloneElement(child, propsToInject);
|
|
1958
1986
|
})
|
|
@@ -2653,7 +2681,7 @@ var generateNewCheckedFn = (currentChecked) => {
|
|
|
2653
2681
|
const newCheckedSet = new Set(currentChecked);
|
|
2654
2682
|
if (newItemChecked) newCheckedSet.add(itemValue);
|
|
2655
2683
|
else newCheckedSet.delete(itemValue);
|
|
2656
|
-
return
|
|
2684
|
+
return [...newCheckedSet];
|
|
2657
2685
|
};
|
|
2658
2686
|
};
|
|
2659
2687
|
var CheckboxGroupCheckedProvider = ({ checked: controlledChecked, defaultChecked = [], onCheckedChange, ...rest }) => {
|
|
@@ -2701,7 +2729,7 @@ var CheckboxGroupMountedProvider = (props) => {
|
|
|
2701
2729
|
const newMountedSet = new Set(prevMounted);
|
|
2702
2730
|
if (newItemMounted) newMountedSet.add(itemValue);
|
|
2703
2731
|
else newMountedSet.delete(itemValue);
|
|
2704
|
-
return
|
|
2732
|
+
return [...newMountedSet];
|
|
2705
2733
|
});
|
|
2706
2734
|
}, [handleItemMountedChangeFurtherUpContext]);
|
|
2707
2735
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckboxGroupMountedContext, {
|
|
@@ -2727,8 +2755,9 @@ var CheckboxGroupAllItem = ({ onCheckedChange, title = "all", ...rest }) => {
|
|
|
2727
2755
|
onCheckedChange: handleItemCheckedChange,
|
|
2728
2756
|
checked: (() => {
|
|
2729
2757
|
if (!checkedItems.length || !mountedItems.length) return false;
|
|
2730
|
-
|
|
2731
|
-
if (mountedItems.
|
|
2758
|
+
const checkedSet = new Set(checkedItems);
|
|
2759
|
+
if (mountedItems.every((mountedItem) => checkedSet.has(mountedItem))) return true;
|
|
2760
|
+
if (mountedItems.some((mountedItem) => checkedSet.has(mountedItem))) return "indeterminate";
|
|
2732
2761
|
return false;
|
|
2733
2762
|
})(),
|
|
2734
2763
|
title,
|
|
@@ -3234,9 +3263,10 @@ var InlineFieldWrapper = ({ align = "start", children, className, description, d
|
|
|
3234
3263
|
InlineFieldWrapper.displayName = "InlineFieldWrapper";
|
|
3235
3264
|
//#endregion
|
|
3236
3265
|
//#region src/components/form/useFieldError.ts
|
|
3266
|
+
var FIELD_PATH_SEPARATOR_RE = /[,[\].]+?/;
|
|
3237
3267
|
var useFieldError = (fieldName) => {
|
|
3238
3268
|
const { errors } = (0, react_hook_form.useFormContext)();
|
|
3239
|
-
const fieldPath = fieldName.split(
|
|
3269
|
+
const fieldPath = fieldName.split(FIELD_PATH_SEPARATOR_RE).filter(Boolean);
|
|
3240
3270
|
const getErrors = () => (0, dlv.default)(errors, fieldPath);
|
|
3241
3271
|
return { error: getErrors()?.message };
|
|
3242
3272
|
};
|
|
@@ -3309,14 +3339,14 @@ var ChipContent = ({ children, ...rest }) => {
|
|
|
3309
3339
|
const isSingleChild = childrenArray.length <= 1;
|
|
3310
3340
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledChipContent, {
|
|
3311
3341
|
...rest,
|
|
3312
|
-
children: childrenArray.map((child
|
|
3342
|
+
children: childrenArray.map((child) => {
|
|
3313
3343
|
if (!isSingleChild && typeof child === "string") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3314
3344
|
className: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
3315
3345
|
children: child
|
|
3316
3346
|
}, child);
|
|
3317
3347
|
if (react.isValidElement(child) && child.type === Icon) {
|
|
3318
3348
|
const iconProps = child.props;
|
|
3319
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChipIcon, { ...iconProps },
|
|
3349
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChipIcon, { ...iconProps }, child.key);
|
|
3320
3350
|
}
|
|
3321
3351
|
return child;
|
|
3322
3352
|
})
|
|
@@ -3905,6 +3935,10 @@ var PasswordField = ({ className, hideLabel, label = "Password", name, prompt =
|
|
|
3905
3935
|
PasswordField.displayName = "PasswordField";
|
|
3906
3936
|
//#endregion
|
|
3907
3937
|
//#region src/components/create-password-field/CreatePasswordField.tsx
|
|
3938
|
+
var getMessageTheme = (result, isFocused) => {
|
|
3939
|
+
if (result) return "success";
|
|
3940
|
+
return isFocused ? "neutral" : "error";
|
|
3941
|
+
};
|
|
3908
3942
|
var CreatePasswordField = ({ validate, defaultValidation, messageDirection = "row", label = "Create a password", name = "password", className, validation, appearance, ...rest }) => {
|
|
3909
3943
|
const { formState, control } = (0, react_hook_form.useFormContext)();
|
|
3910
3944
|
const [isFocused, setIsFocused] = react.useState(false);
|
|
@@ -3914,17 +3948,13 @@ var CreatePasswordField = ({ validate, defaultValidation, messageDirection = "ro
|
|
|
3914
3948
|
const validatePassword = react.useCallback(async (password) => {
|
|
3915
3949
|
const result = await validate(password);
|
|
3916
3950
|
if (result) {
|
|
3917
|
-
(0,
|
|
3951
|
+
(0, tiny_invariant.default)(typeof result === "object", "The validate function must return an object");
|
|
3918
3952
|
setValidationResult(result);
|
|
3919
3953
|
return Object.values(result).every((isValid) => isValid);
|
|
3920
3954
|
}
|
|
3921
3955
|
return false;
|
|
3922
3956
|
}, [setValidationResult]);
|
|
3923
3957
|
const handleChange = react.useMemo(() => (0, throttle_debounce.throttle)(500, validatePassword), [validatePassword]);
|
|
3924
|
-
const getMessageTheme = (result, isFocused) => {
|
|
3925
|
-
if (result) return "success";
|
|
3926
|
-
return isFocused ? "neutral" : "error";
|
|
3927
|
-
};
|
|
3928
3958
|
const showValidation = control.mode.isOnBlur && (isFocused || touched) || control.mode.isOnSubmit && (isFocused || formState.isSubmitted && error);
|
|
3929
3959
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3930
3960
|
className,
|
|
@@ -3974,8 +4004,8 @@ var getNewAsyncData = async (getAsyncData, asyncDataOptions, paginationState, so
|
|
|
3974
4004
|
sortDirection: asyncDataOptions?.sortDirection ?? getSortDirection(sorting),
|
|
3975
4005
|
globalFilter: asyncDataOptions.globalFilter ?? globalFilter
|
|
3976
4006
|
});
|
|
3977
|
-
(0,
|
|
3978
|
-
(0,
|
|
4007
|
+
(0, tiny_invariant.default)(Array.isArray(newData?.results), "The getAsyncData function must return an object with a property `result` which must be an array");
|
|
4008
|
+
(0, tiny_invariant.default)(newData && Number.isInteger(newData.total) && newData.total >= 0, "The getAsyncData function must return an object with a property `total` which must be a positive integer or zero");
|
|
3979
4009
|
return newData;
|
|
3980
4010
|
};
|
|
3981
4011
|
//#endregion
|
|
@@ -4266,7 +4296,7 @@ var useStickyColumnsStyle = ({ numberOfStickyColumns, wrapperRef }) => {
|
|
|
4266
4296
|
const generateColumnsStyle = react.useCallback(() => {
|
|
4267
4297
|
let accWidth = 0;
|
|
4268
4298
|
const tableHeaderCells = wrapperRef.current?.querySelectorAll("th");
|
|
4269
|
-
return
|
|
4299
|
+
return [...tableHeaderCells || []].slice(0, numberOfStickyColumns).reduce((acc, column, index) => {
|
|
4270
4300
|
const elementNumber = index + 1;
|
|
4271
4301
|
const styleObject = {
|
|
4272
4302
|
...acc,
|
|
@@ -4975,18 +5005,18 @@ var SortIcon = ({ direction }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Ico
|
|
|
4975
5005
|
size: "sm",
|
|
4976
5006
|
className: "stroke-primary-900 absolute left-1"
|
|
4977
5007
|
});
|
|
5008
|
+
var handleKeyDown = (event, callback) => {
|
|
5009
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
5010
|
+
event.preventDefault();
|
|
5011
|
+
callback(event);
|
|
5012
|
+
}
|
|
5013
|
+
};
|
|
4978
5014
|
var DataTableHeaderCell = ({ header, includeTotal = false, totalSuffix = "items", children, className, ...rest }) => {
|
|
4979
5015
|
const sortDirection = header.column.getIsSorted();
|
|
4980
5016
|
const { isSortable: isSortableTable, getRowModel } = useDataTable();
|
|
4981
5017
|
const isDataColumn = header.column.getCanSort();
|
|
4982
5018
|
const totalRows = getRowModel()?.rows?.length;
|
|
4983
5019
|
const { hoverProps, isHovered } = (0, react_aria.useHover)({});
|
|
4984
|
-
const handleKeyDown = (event, callback) => {
|
|
4985
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
4986
|
-
event.preventDefault();
|
|
4987
|
-
callback(event);
|
|
4988
|
-
}
|
|
4989
|
-
};
|
|
4990
5020
|
const headerSortingHandler = header.column.getToggleSortingHandler();
|
|
4991
5021
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledTableHeaderCell, {
|
|
4992
5022
|
isSortable: isSortableTable && isDataColumn,
|
|
@@ -5005,7 +5035,7 @@ var DataTableHeaderCell = ({ header, includeTotal = false, totalSuffix = "items"
|
|
|
5005
5035
|
className: cn("flex", "items-center", "relative", "size-6", "ml-2", isHovered ? "bg-primary-200" : "bg-primary-100", "rounded-sm"),
|
|
5006
5036
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SortIcon, { direction: sortDirection })
|
|
5007
5037
|
}),
|
|
5008
|
-
includeTotal
|
|
5038
|
+
includeTotal ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StyledCount, {
|
|
5009
5039
|
size: "sm",
|
|
5010
5040
|
weight: "normal",
|
|
5011
5041
|
children: [
|
|
@@ -5015,7 +5045,7 @@ var DataTableHeaderCell = ({ header, includeTotal = false, totalSuffix = "items"
|
|
|
5015
5045
|
totalSuffix,
|
|
5016
5046
|
")"
|
|
5017
5047
|
]
|
|
5018
|
-
})
|
|
5048
|
+
}) : null
|
|
5019
5049
|
]
|
|
5020
5050
|
})
|
|
5021
5051
|
});
|
|
@@ -5456,7 +5486,7 @@ var getPaginationElementsToRender = (currentPage, pagesCount, visibleElementsCou
|
|
|
5456
5486
|
if (canFitViewAllPopover) visiblePagesCount -= 1;
|
|
5457
5487
|
if (canFitEdgePage) visiblePagesCount -= 1;
|
|
5458
5488
|
const firstPage = paginationPages[0];
|
|
5459
|
-
const lastPage = paginationPages
|
|
5489
|
+
const lastPage = paginationPages.at(-1);
|
|
5460
5490
|
/**
|
|
5461
5491
|
* If we're truncating and current page is at the start of the page list,
|
|
5462
5492
|
* render the initial truncated page list, e.g.
|
|
@@ -5531,14 +5561,16 @@ var getPaginationElementsToRender = (currentPage, pagesCount, visibleElementsCou
|
|
|
5531
5561
|
};
|
|
5532
5562
|
var findNextAvailablePage = (startPage, disabledPages, pagesCount) => {
|
|
5533
5563
|
if (startPage > pagesCount) return;
|
|
5564
|
+
const disabledSet = new Set(disabledPages);
|
|
5534
5565
|
let nextPage = startPage;
|
|
5535
|
-
while (
|
|
5566
|
+
while (disabledSet.has(nextPage)) nextPage++;
|
|
5536
5567
|
return nextPage;
|
|
5537
5568
|
};
|
|
5538
5569
|
var findPreviousAvailablePage = (startPage, disabledPages) => {
|
|
5539
5570
|
if (startPage < 1) return;
|
|
5571
|
+
const disabledSet = new Set(disabledPages);
|
|
5540
5572
|
let previousPage = startPage;
|
|
5541
|
-
while (
|
|
5573
|
+
while (disabledSet.has(previousPage)) previousPage--;
|
|
5542
5574
|
return previousPage;
|
|
5543
5575
|
};
|
|
5544
5576
|
//#endregion
|
|
@@ -5853,9 +5885,9 @@ var PaginationPreviousButton = (props) => {
|
|
|
5853
5885
|
//#region src/components/pagination/PaginationItems.tsx
|
|
5854
5886
|
var PaginationItems = () => {
|
|
5855
5887
|
const { paginationItems } = usePagination();
|
|
5856
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: paginationItems.map((paginationItem
|
|
5888
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: paginationItems.map((paginationItem) => {
|
|
5857
5889
|
switch (paginationItem) {
|
|
5858
|
-
case VIEW_ALL_POPOVER: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationPopover, {}, paginationItem
|
|
5890
|
+
case VIEW_ALL_POPOVER: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationPopover, {}, paginationItem);
|
|
5859
5891
|
case GO_TO_PREVIOUS_PAGE: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationPreviousButton, {}, paginationItem);
|
|
5860
5892
|
case GO_TO_NEXT_PAGE: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationNextButton, {}, paginationItem);
|
|
5861
5893
|
default: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PaginationPage, { pageNumber: paginationItem }, paginationItem);
|
|
@@ -6136,7 +6168,7 @@ var StyledButton$2 = styled(Button, {
|
|
|
6136
6168
|
});
|
|
6137
6169
|
var offsetWeekdayNames = (weekdayNames, firstDayOfWeek) => {
|
|
6138
6170
|
const start = weekdayNames.slice(0, firstDayOfWeek);
|
|
6139
|
-
return weekdayNames.slice(firstDayOfWeek)
|
|
6171
|
+
return [...weekdayNames.slice(firstDayOfWeek), ...start];
|
|
6140
6172
|
};
|
|
6141
6173
|
var Calendar = ({ className, refDateSelected, refDateToday, firstDayOfWeek = 0, monthNames = monthNamesShort, weekdayNames = weekdayNamesShort, labels = DEFAULT_LABELS, date: dateProp, minDate, maxDate, setYear, ...rest }) => {
|
|
6142
6174
|
const [fallbackDate] = react.useState(() => /* @__PURE__ */ new Date());
|
|
@@ -6198,7 +6230,7 @@ var Calendar = ({ className, refDateSelected, refDateToday, firstDayOfWeek = 0,
|
|
|
6198
6230
|
onClick: () => handleSetYear(year),
|
|
6199
6231
|
selected: isCurrentYear,
|
|
6200
6232
|
children: year
|
|
6201
|
-
},
|
|
6233
|
+
}, year);
|
|
6202
6234
|
})
|
|
6203
6235
|
}),
|
|
6204
6236
|
!showYears && calendars.map(({ month, year, weeks }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
@@ -6780,19 +6812,23 @@ DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
|
6780
6812
|
//#endregion
|
|
6781
6813
|
//#region src/components/dropdown-menu/DropdownMenuLinkItem.tsx
|
|
6782
6814
|
var StyledLink$2 = styled("a", { base: ["no-underline"] });
|
|
6783
|
-
var DropdownMenuLinkItem = ({ children, href, target, rel, download, ...rest }) =>
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6815
|
+
var DropdownMenuLinkItem = ({ children, href, reloadDocument, target, rel, download, ...rest }) => {
|
|
6816
|
+
const routerLinkProps = useRouterLinkProps(href, { reloadDocument });
|
|
6817
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownMenuItem, {
|
|
6818
|
+
...rest,
|
|
6819
|
+
asChild: true,
|
|
6820
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledLink$2, {
|
|
6821
|
+
as: routerLinkProps.as,
|
|
6822
|
+
href,
|
|
6823
|
+
target,
|
|
6824
|
+
rel,
|
|
6825
|
+
download,
|
|
6826
|
+
role: "menuitem",
|
|
6827
|
+
...getExternalAnchorProps(href),
|
|
6828
|
+
children
|
|
6829
|
+
})
|
|
6830
|
+
});
|
|
6831
|
+
};
|
|
6796
6832
|
//#endregion
|
|
6797
6833
|
//#region src/components/dropdown-menu/DropdownMenuSeparator.tsx
|
|
6798
6834
|
var DropdownMenuSeparator = styled(_radix_ui_react_dropdown_menu.Separator, { base: [
|
|
@@ -7302,19 +7338,33 @@ var StyledLink$1 = styled(_radix_ui_react_navigation_menu.Link, {
|
|
|
7302
7338
|
]
|
|
7303
7339
|
} }
|
|
7304
7340
|
});
|
|
7305
|
-
var NavigationMenuLink = ({ ref, children, href, disabled, className, variant = "link", ...rest }) =>
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7341
|
+
var NavigationMenuLink = ({ ref, children, href, disabled, className, variant = "link", reloadDocument, ...rest }) => {
|
|
7342
|
+
const RouterLink = useRouterLinkProps(href, { reloadDocument }).as;
|
|
7343
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListItem, { children: disabled ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DisabledButton, {
|
|
7344
|
+
disabled: true,
|
|
7345
|
+
className,
|
|
7346
|
+
children
|
|
7347
|
+
}) : RouterLink ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledLink$1, {
|
|
7348
|
+
href,
|
|
7349
|
+
ref,
|
|
7350
|
+
elementType: variant,
|
|
7351
|
+
className,
|
|
7352
|
+
asChild: true,
|
|
7353
|
+
...rest,
|
|
7354
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RouterLink, {
|
|
7355
|
+
href,
|
|
7356
|
+
children
|
|
7357
|
+
})
|
|
7358
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledLink$1, {
|
|
7359
|
+
href,
|
|
7360
|
+
ref,
|
|
7361
|
+
elementType: variant,
|
|
7362
|
+
className,
|
|
7363
|
+
...getExternalAnchorProps(href),
|
|
7364
|
+
...rest,
|
|
7365
|
+
children
|
|
7366
|
+
}) });
|
|
7367
|
+
};
|
|
7318
7368
|
//#endregion
|
|
7319
7369
|
//#region src/components/navigation/NavigationMenuDropdownItem.tsx
|
|
7320
7370
|
var NavigationMenuDropdownItem = ({ ref, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NavigationMenuLink, {
|
|
@@ -7357,7 +7407,7 @@ var NavigationMenuComponent = ({ children, className, ...rest }) => {
|
|
|
7357
7407
|
}, [react.Children.toArray(children).length]);
|
|
7358
7408
|
react.useEffect(() => {
|
|
7359
7409
|
let timer;
|
|
7360
|
-
if (activeItem === "") timer = setTimeout(
|
|
7410
|
+
if (activeItem === "") timer = setTimeout(setOffset, 200, null);
|
|
7361
7411
|
return () => {
|
|
7362
7412
|
if (timer !== null) clearTimeout(timer);
|
|
7363
7413
|
};
|
|
@@ -7582,9 +7632,10 @@ var StyledNavigationMenuVerticalLink = styled(_radix_ui_react_navigation_menu.Li
|
|
|
7582
7632
|
lg: ["min-h-12"]
|
|
7583
7633
|
} }
|
|
7584
7634
|
});
|
|
7585
|
-
var NavigationMenuVerticalLink = ({ as, href, children, ...rest }) => {
|
|
7586
|
-
const
|
|
7587
|
-
const
|
|
7635
|
+
var NavigationMenuVerticalLink = ({ as, href, children, reloadDocument, ...rest }) => {
|
|
7636
|
+
const routerLinkProps = useRouterLinkProps(href, { reloadDocument });
|
|
7637
|
+
const Component = as || routerLinkProps.as || (href ? "a" : "button");
|
|
7638
|
+
const componentProps = as || routerLinkProps.as ? {} : href ? getExternalAnchorProps(href) : { type: "button" };
|
|
7588
7639
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NavigationMenuVerticalItem, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledNavigationMenuVerticalLink, {
|
|
7589
7640
|
size: "lg",
|
|
7590
7641
|
href,
|
|
@@ -8150,6 +8201,9 @@ var RadioCard = ({ children, isFullWidth = false, size = "md", align = "left", .
|
|
|
8150
8201
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children })]
|
|
8151
8202
|
});
|
|
8152
8203
|
//#endregion
|
|
8204
|
+
//#region src/components/router-provider/Router.ts
|
|
8205
|
+
var Router = { Provider: RouterProvider };
|
|
8206
|
+
//#endregion
|
|
8153
8207
|
//#region src/components/radio-card/RadioCardGroup.tsx
|
|
8154
8208
|
var RadioCardGroup = ({ className, children, size, isFullWidth, align, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_radio_group.Root, {
|
|
8155
8209
|
...rest,
|
|
@@ -8503,72 +8557,33 @@ var SelectMenuContext = react.createContext({
|
|
|
8503
8557
|
var useSelectMenuContext = () => react.use(SelectMenuContext);
|
|
8504
8558
|
//#endregion
|
|
8505
8559
|
//#region src/components/select-menu/SelectMenuContent.tsx
|
|
8506
|
-
var Content$2 = styled(
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
popper: ["max-h-(--radix-select-content-available-height)", "min-w-(--radix-select-trigger-width)"],
|
|
8525
|
-
"item-aligned": []
|
|
8526
|
-
} }
|
|
8527
|
-
});
|
|
8528
|
-
var Viewport = styled(_radix_ui_react_select.Viewport, {
|
|
8529
|
-
base: ["p-1", "w-full"],
|
|
8530
|
-
variants: { position: {
|
|
8531
|
-
popper: ["h-(--radix-select-content-available-height)"],
|
|
8532
|
-
"item-aligned": []
|
|
8533
|
-
} }
|
|
8534
|
-
});
|
|
8535
|
-
var ScrollUpButton = styled(_radix_ui_react_select.ScrollUpButton, { base: [
|
|
8536
|
-
"flex",
|
|
8537
|
-
"items-center",
|
|
8538
|
-
"justify-center",
|
|
8539
|
-
"h-6",
|
|
8540
|
-
"cursor-default"
|
|
8541
|
-
] });
|
|
8542
|
-
var ScrollDownButton = styled(_radix_ui_react_select.ScrollDownButton, { base: [
|
|
8543
|
-
"flex",
|
|
8544
|
-
"items-center",
|
|
8545
|
-
"justify-center",
|
|
8546
|
-
"h-6",
|
|
8547
|
-
"cursor-default"
|
|
8548
|
-
] });
|
|
8549
|
-
var SelectMenuContent = ({ ref, children, position = "popper", sideOffset = 4, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Content$2, {
|
|
8560
|
+
var Content$2 = styled(react_aria_components.Popover, { base: [
|
|
8561
|
+
"bg-white",
|
|
8562
|
+
"rounded-md",
|
|
8563
|
+
"shadow-lg",
|
|
8564
|
+
"z-10",
|
|
8565
|
+
"overflow-hidden",
|
|
8566
|
+
"will-change-transform",
|
|
8567
|
+
"min-w-[var(--trigger-width)]",
|
|
8568
|
+
"max-w-[min(calc(100vw-(--spacing(4))),--spacing(100))]"
|
|
8569
|
+
] }, { enablePolymorphism: false });
|
|
8570
|
+
var Viewport = styled(react_aria_components.ListBox, { base: [
|
|
8571
|
+
"max-h-[inherit]",
|
|
8572
|
+
"w-full",
|
|
8573
|
+
"overflow-auto",
|
|
8574
|
+
"p-1",
|
|
8575
|
+
"outline-none"
|
|
8576
|
+
] }, { enablePolymorphism: false });
|
|
8577
|
+
var SelectMenuContent = ({ ref, children, offset = 4, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Content$2, {
|
|
8550
8578
|
ref,
|
|
8551
|
-
|
|
8552
|
-
|
|
8579
|
+
offset,
|
|
8580
|
+
containerPadding: 8,
|
|
8553
8581
|
...rest,
|
|
8554
|
-
children:
|
|
8555
|
-
|
|
8556
|
-
is: _atom_learning_icons.ChevronUp,
|
|
8557
|
-
className: "text-grey-700 size-4"
|
|
8558
|
-
}) }),
|
|
8559
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Viewport, {
|
|
8560
|
-
position,
|
|
8561
|
-
children
|
|
8562
|
-
}),
|
|
8563
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollDownButton, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
8564
|
-
is: _atom_learning_icons.ChevronDown,
|
|
8565
|
-
className: "text-grey-700 size-4"
|
|
8566
|
-
}) })
|
|
8567
|
-
]
|
|
8568
|
-
}) });
|
|
8582
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Viewport, { children })
|
|
8583
|
+
});
|
|
8569
8584
|
//#endregion
|
|
8570
8585
|
//#region src/components/select-menu/SelectMenuItem.tsx
|
|
8571
|
-
var Item = styled(
|
|
8586
|
+
var Item = styled(react_aria_components.ListBoxItem, {
|
|
8572
8587
|
base: [
|
|
8573
8588
|
"relative",
|
|
8574
8589
|
"flex",
|
|
@@ -8579,11 +8594,11 @@ var Item = styled(_radix_ui_react_select.Item, {
|
|
|
8579
8594
|
"cursor-pointer",
|
|
8580
8595
|
"rounded-sm",
|
|
8581
8596
|
"outline-none",
|
|
8582
|
-
"data-disabled:cursor-not-allowed",
|
|
8583
|
-
"data-disabled:opacity-30",
|
|
8584
|
-
"data-
|
|
8585
|
-
"data-
|
|
8586
|
-
"data-
|
|
8597
|
+
"data-[disabled]:cursor-not-allowed",
|
|
8598
|
+
"data-[disabled]:opacity-30",
|
|
8599
|
+
"data-[hovered]:bg-grey-100",
|
|
8600
|
+
"data-[focused]:bg-grey-100",
|
|
8601
|
+
"data-[focus-visible]:outline-none"
|
|
8587
8602
|
],
|
|
8588
8603
|
variants: { size: {
|
|
8589
8604
|
sm: [
|
|
@@ -8603,26 +8618,26 @@ var Item = styled(_radix_ui_react_select.Item, {
|
|
|
8603
8618
|
"pr-6"
|
|
8604
8619
|
]
|
|
8605
8620
|
} }
|
|
8606
|
-
});
|
|
8607
|
-
var SelectMenuItem = ({
|
|
8621
|
+
}, { enablePolymorphism: false });
|
|
8622
|
+
var SelectMenuItem = ({ children, textValue, ...rest }) => {
|
|
8608
8623
|
const { size } = useSelectMenuContext();
|
|
8609
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
8610
|
-
ref,
|
|
8624
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Item, {
|
|
8611
8625
|
size,
|
|
8626
|
+
textValue: textValue ?? (typeof children === "string" ? children : void 0),
|
|
8612
8627
|
...rest,
|
|
8613
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
8628
|
+
children: ({ isSelected }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8614
8629
|
className: "absolute left-2 inline-flex items-center",
|
|
8615
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
8630
|
+
children: isSelected && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
8616
8631
|
is: _atom_learning_icons.Ok,
|
|
8617
8632
|
className: size === "sm" ? "size-3" : "size-4"
|
|
8618
8633
|
})
|
|
8619
|
-
}),
|
|
8634
|
+
}), children] })
|
|
8620
8635
|
});
|
|
8621
8636
|
};
|
|
8622
8637
|
//#endregion
|
|
8623
8638
|
//#region src/components/select-menu/SelectMenuLabel.tsx
|
|
8624
8639
|
var SelectMenuLabel = ({ className, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
|
|
8625
|
-
as:
|
|
8640
|
+
as: react_aria_components.Header,
|
|
8626
8641
|
size: "sm",
|
|
8627
8642
|
className: cn("p-2", "mb-1", "text-text-subtle", className),
|
|
8628
8643
|
...rest
|
|
@@ -8630,7 +8645,7 @@ var SelectMenuLabel = ({ className, ...rest }) => /* @__PURE__ */ (0, react_jsx_
|
|
|
8630
8645
|
SelectMenuLabel.displayName = "SelectMenuLabel";
|
|
8631
8646
|
//#endregion
|
|
8632
8647
|
//#region src/components/select-menu/SelectMenuSeparator.tsx
|
|
8633
|
-
var SelectMenuSeparator = styled(
|
|
8648
|
+
var SelectMenuSeparator = styled(react_aria_components.Separator, { base: [
|
|
8634
8649
|
"h-px",
|
|
8635
8650
|
"bg-grey-200",
|
|
8636
8651
|
"my-2",
|
|
@@ -8638,7 +8653,7 @@ var SelectMenuSeparator = styled(_radix_ui_react_select.Separator, { base: [
|
|
|
8638
8653
|
] }, { enablePolymorphism: false });
|
|
8639
8654
|
//#endregion
|
|
8640
8655
|
//#region src/components/select-menu/SelectMenuTrigger.tsx
|
|
8641
|
-
var Trigger$2 = styled(
|
|
8656
|
+
var Trigger$2 = styled(react_aria_components.Button, {
|
|
8642
8657
|
base: [
|
|
8643
8658
|
"appearance-none",
|
|
8644
8659
|
"rounded-md",
|
|
@@ -8656,11 +8671,11 @@ var Trigger$2 = styled(_radix_ui_react_select.Trigger, {
|
|
|
8656
8671
|
"hover:cursor-pointer",
|
|
8657
8672
|
"disabled:opacity-30",
|
|
8658
8673
|
"disabled:cursor-not-allowed",
|
|
8659
|
-
"focus:outline-2",
|
|
8660
|
-
"focus:outline-blue-800",
|
|
8661
|
-
"focus:outline-offset-1",
|
|
8662
|
-
"focus:outline-solid",
|
|
8663
|
-
"focus:z-1"
|
|
8674
|
+
"data-[focus-visible]:outline-2",
|
|
8675
|
+
"data-[focus-visible]:outline-blue-800",
|
|
8676
|
+
"data-[focus-visible]:outline-offset-1",
|
|
8677
|
+
"data-[focus-visible]:outline-solid",
|
|
8678
|
+
"data-[focus-visible]:z-1"
|
|
8664
8679
|
],
|
|
8665
8680
|
variants: {
|
|
8666
8681
|
size: {
|
|
@@ -8687,9 +8702,9 @@ var Trigger$2 = styled(_radix_ui_react_select.Trigger, {
|
|
|
8687
8702
|
white: ["bg-white"],
|
|
8688
8703
|
grey: ["bg-grey-100"]
|
|
8689
8704
|
},
|
|
8690
|
-
state: { error: ["bg-danger-light", "focus:outline-danger"] }
|
|
8705
|
+
state: { error: ["bg-danger-light", "data-[focus-visible]:outline-danger"] }
|
|
8691
8706
|
}
|
|
8692
|
-
});
|
|
8707
|
+
}, { enablePolymorphism: false });
|
|
8693
8708
|
var TriggerIcon = styled(Icon, {
|
|
8694
8709
|
base: [
|
|
8695
8710
|
"absolute",
|
|
@@ -8712,9 +8727,9 @@ var SelectMenuTrigger = ({ ref, placeholder, children, ...rest }) => {
|
|
|
8712
8727
|
theme,
|
|
8713
8728
|
state,
|
|
8714
8729
|
...rest,
|
|
8715
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
8716
|
-
|
|
8717
|
-
children
|
|
8730
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.SelectValue, {
|
|
8731
|
+
className: "truncate",
|
|
8732
|
+
children: ({ isPlaceholder, selectedText }) => isPlaceholder ? placeholder ?? "" : children ?? selectedText
|
|
8718
8733
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TriggerIcon, {
|
|
8719
8734
|
is: _atom_learning_icons.ChevronDown,
|
|
8720
8735
|
size
|
|
@@ -8723,7 +8738,7 @@ var SelectMenuTrigger = ({ ref, placeholder, children, ...rest }) => {
|
|
|
8723
8738
|
};
|
|
8724
8739
|
//#endregion
|
|
8725
8740
|
//#region src/components/select-menu/SelectMenu.tsx
|
|
8726
|
-
var SelectMenuRoot = ({ size = "md", theme = "grey", state, children, ...rest }) => {
|
|
8741
|
+
var SelectMenuRoot = ({ size = "md", theme = "grey", state, className, children, ...rest }) => {
|
|
8727
8742
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectMenuContext, {
|
|
8728
8743
|
value: react.useMemo(() => ({
|
|
8729
8744
|
size,
|
|
@@ -8734,7 +8749,8 @@ var SelectMenuRoot = ({ size = "md", theme = "grey", state, children, ...rest })
|
|
|
8734
8749
|
theme,
|
|
8735
8750
|
state
|
|
8736
8751
|
]),
|
|
8737
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
8752
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Select, {
|
|
8753
|
+
className: cn("w-full", className),
|
|
8738
8754
|
...rest,
|
|
8739
8755
|
children
|
|
8740
8756
|
})
|
|
@@ -8744,7 +8760,7 @@ var SelectMenu = /* @__PURE__ */ Object.assign(SelectMenuRoot, {
|
|
|
8744
8760
|
Trigger: SelectMenuTrigger,
|
|
8745
8761
|
Content: SelectMenuContent,
|
|
8746
8762
|
Item: SelectMenuItem,
|
|
8747
|
-
Group:
|
|
8763
|
+
Group: react_aria_components.ListBoxSection,
|
|
8748
8764
|
Label: SelectMenuLabel,
|
|
8749
8765
|
Separator: SelectMenuSeparator
|
|
8750
8766
|
});
|
|
@@ -8771,17 +8787,17 @@ var SelectMenuField = ({ className, hideLabel, children, name, label, validation
|
|
|
8771
8787
|
prompt,
|
|
8772
8788
|
required: Boolean(validation?.required),
|
|
8773
8789
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SelectMenu, {
|
|
8774
|
-
|
|
8775
|
-
|
|
8790
|
+
"aria-label": label,
|
|
8791
|
+
selectedKey: value === "" ? null : value,
|
|
8792
|
+
onSelectionChange: onChange,
|
|
8776
8793
|
size,
|
|
8777
8794
|
theme: formTheme,
|
|
8778
|
-
disabled,
|
|
8795
|
+
isDisabled: disabled,
|
|
8779
8796
|
...error && { state: "error" },
|
|
8780
8797
|
...rest,
|
|
8781
8798
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectMenu.Trigger, {
|
|
8782
8799
|
ref,
|
|
8783
|
-
placeholder
|
|
8784
|
-
"aria-label": label
|
|
8800
|
+
placeholder
|
|
8785
8801
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectMenu.Content, { children })]
|
|
8786
8802
|
})
|
|
8787
8803
|
});
|
|
@@ -9036,7 +9052,8 @@ var Slider = /* @__PURE__ */ Object.assign(SliderComponent, {
|
|
|
9036
9052
|
});
|
|
9037
9053
|
//#endregion
|
|
9038
9054
|
//#region src/components/slider-field/SliderField.tsx
|
|
9039
|
-
var
|
|
9055
|
+
var DEFAULT_STEPS = [];
|
|
9056
|
+
var SliderField = ({ className, hideLabel, label, name, defaultValue, value, validation, outputLabel, min = 0, max = 100, steps = DEFAULT_STEPS, ...rest }) => {
|
|
9040
9057
|
const { control, setValue } = (0, react_hook_form.useFormContext)();
|
|
9041
9058
|
const { field: { ref, onChange, value: innerValue, name: innerName } } = (0, react_hook_form.useController)({
|
|
9042
9059
|
name,
|
|
@@ -9577,14 +9594,16 @@ var StepperStepsContainer = styled("div", {
|
|
|
9577
9594
|
});
|
|
9578
9595
|
var StepperSteps = ({ className }) => {
|
|
9579
9596
|
const { steps, goToStep, activeStep, viewedSteps, allowSkip, direction, hideLabels, completedSteps, showCompletedIcons } = useStepper();
|
|
9597
|
+
const viewedStepsSet = new Set(viewedSteps);
|
|
9598
|
+
const completedStepsSet = new Set(completedSteps);
|
|
9580
9599
|
const getBulletStatus = (index) => {
|
|
9581
9600
|
const activeBullet = steps[index];
|
|
9582
9601
|
if (activeBullet.status) return activeBullet.status;
|
|
9583
9602
|
if (completedSteps.length === steps.length) return Status.SUCCESS;
|
|
9584
|
-
if (activeStep === index &&
|
|
9603
|
+
if (activeStep === index && completedStepsSet.has(activeStep)) return Status.REVIEWED;
|
|
9585
9604
|
if (activeStep === index) return Status.ACTIVE;
|
|
9586
|
-
if (
|
|
9587
|
-
if (
|
|
9605
|
+
if (completedStepsSet.has(index)) return Status.COMPLETED;
|
|
9606
|
+
if (viewedStepsSet.has(index)) return Status.VIEWED;
|
|
9588
9607
|
return Status.DEFAULT;
|
|
9589
9608
|
};
|
|
9590
9609
|
const getSeparatorStatus = (index) => {
|
|
@@ -9610,12 +9629,12 @@ var StepperSteps = ({ className }) => {
|
|
|
9610
9629
|
canInteract: allowSkip,
|
|
9611
9630
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepperStepBullet, {
|
|
9612
9631
|
as: allowSkip ? "button" : "div",
|
|
9613
|
-
onClick: () => allowSkip &&
|
|
9632
|
+
onClick: () => allowSkip && viewedStepsSet.has(index) ? goToStep?.(index) : void 0,
|
|
9614
9633
|
status: bulletStatus,
|
|
9615
9634
|
"aria-current": index === activeStep ? "step" : void 0,
|
|
9616
9635
|
"aria-label": !step.label ? `step ${index + 1}` : "",
|
|
9617
9636
|
"aria-labelledby": step.label ? `step-${index}` : void 0,
|
|
9618
|
-
className: allowSkip &&
|
|
9637
|
+
className: allowSkip && viewedStepsSet.has(index) ? "cursor-pointer" : "cursor-auto",
|
|
9619
9638
|
children: step.status === Status.SUCCESS || showCompletedIcons && bulletStatus === Status.COMPLETED ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { is: _atom_learning_icons.Ok }) : index + 1
|
|
9620
9639
|
}), step.label && !hideLabels && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepperStepLabel, {
|
|
9621
9640
|
as: "span",
|
|
@@ -9631,7 +9650,7 @@ var StepperSteps = ({ className }) => {
|
|
|
9631
9650
|
//#endregion
|
|
9632
9651
|
//#region src/components/stepper/Stepper.tsx
|
|
9633
9652
|
var StepperComponent = ({ children, stepCount, allowSkip, onComplete, onStepChange, direction = "horizontal", steps, hideLabels = false, showCompletedIcons = false, className }) => {
|
|
9634
|
-
(0,
|
|
9653
|
+
(0, tiny_invariant.default)(!(stepCount && steps), "`Stepper` should only be given one of `stepCount` or `steps`. When both are provided, `steps` will be used and `stepCount` will be ignored.");
|
|
9635
9654
|
const count = steps?.length || stepCount || 0;
|
|
9636
9655
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepperProvider, {
|
|
9637
9656
|
stepCount: count,
|
|
@@ -10039,9 +10058,10 @@ var StyledTileInteractive = styled(Tile, { base: [
|
|
|
10039
10058
|
"not-disabled:transition-transform",
|
|
10040
10059
|
"not-disabled:translate-y-0"
|
|
10041
10060
|
] });
|
|
10042
|
-
var TileInteractive = ({ ref, onClick, href, type = "button", as, ...rest }) => {
|
|
10061
|
+
var TileInteractive = ({ ref, onClick, href, type = "button", as, reloadDocument, ...rest }) => {
|
|
10062
|
+
const routerLinkProps = useRouterLinkProps(href, { reloadDocument });
|
|
10043
10063
|
const elementSpecificProps = !!href ? {
|
|
10044
|
-
as: as || "a",
|
|
10064
|
+
as: as || routerLinkProps.as || "a",
|
|
10045
10065
|
href,
|
|
10046
10066
|
onClick: void 0
|
|
10047
10067
|
} : {
|
|
@@ -11039,12 +11059,12 @@ var FileDrop = ({ children, accept, multiple, onDrop, ...rest }) => {
|
|
|
11039
11059
|
const handleDrop = (fileList) => {
|
|
11040
11060
|
if (!fileList) return;
|
|
11041
11061
|
setIsDragging(false);
|
|
11042
|
-
const files =
|
|
11062
|
+
const files = [...fileList];
|
|
11043
11063
|
onDrop(files);
|
|
11044
11064
|
setFiles(files);
|
|
11045
11065
|
};
|
|
11046
11066
|
const handleKeyDown = (event) => {
|
|
11047
|
-
if (
|
|
11067
|
+
if ("Space" === event.key || "Enter" === event.key) fileUploadInputRef.current?.click();
|
|
11048
11068
|
};
|
|
11049
11069
|
const value = react.useMemo(() => ({
|
|
11050
11070
|
isDragging,
|
|
@@ -11147,6 +11167,7 @@ exports.RadioButtonField = RadioButtonField;
|
|
|
11147
11167
|
exports.RadioButtonGroup = RadioButtonGroup;
|
|
11148
11168
|
exports.RadioCard = RadioCard;
|
|
11149
11169
|
exports.RadioCardGroup = RadioCardGroup;
|
|
11170
|
+
exports.Router = Router;
|
|
11150
11171
|
exports.SearchField = SearchField;
|
|
11151
11172
|
exports.SearchInput = SearchInput;
|
|
11152
11173
|
exports.SectionMessage = SectionMessage;
|