@cloudoperators/juno-ui-components 2.33.0 → 2.34.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/build/AppIntro.component-91Jmkg84.js +6 -0
- package/build/AppIntro.js +1 -1
- package/build/AppShellProvider.component-BjmVKqm3.js +1 -0
- package/build/AppShellProvider.js +1 -1
- package/build/{combobox-JmdrroKh.js → ComboBox.component-C_o5JV1E.js} +116 -2
- package/build/ComboBox.js +1 -1
- package/build/ComboBoxOption.component-eoxGAIUR.js +39 -0
- package/build/ComboBoxOption.js +1 -39
- package/build/ContentHeading.component-PfFZgbyn.js +6 -0
- package/build/ContentHeading.js +1 -1
- package/build/{ContextMenu.component-B24LaAwt.js → ContextMenu.component-DlJ1uBM8.js} +2 -2
- package/build/ContextMenu.js +1 -1
- package/build/{DataListCheckboxCell.component-BXti2wK7.js → DataListCheckboxCell.component-DW-8rAEg.js} +1 -1
- package/build/DataListCheckboxCell.js +1 -1
- package/build/{DataListRow.component-RvjQ652d.js → DataListRow.component-D1aTHdBf.js} +1 -1
- package/build/DataListRow.js +1 -1
- package/build/DateTimePicker.component-7SGTFaqc.js +59 -0
- package/build/DateTimePicker.js +1 -1
- package/build/{FilterInput.component-CBfEzQ3x.js → FilterInput.component-QgiC1wRg.js} +1 -1
- package/build/FilterInput.js +1 -1
- package/build/{FilterPill.component-C9YwMkKe.js → FilterPill.component-SegGevVb.js} +1 -1
- package/build/FilterPill.js +1 -1
- package/build/{Filters.component-Cu8sV-IL.js → Filters.component-CfG9WSqS.js} +1 -1
- package/build/Filters.js +1 -1
- package/build/{Icon.component-BVkaZqpA.js → Icon.component-DGyhPa1P.js} +1 -1
- package/build/Modal.component-B7pUHHA6.js +31 -0
- package/build/Modal.js +1 -31
- package/build/Pagination.component-D5sXkuw6.js +5 -0
- package/build/Pagination.js +1 -5
- package/build/Panel.component-Z0UKil-U.js +33 -0
- package/build/Panel.js +1 -33
- package/build/PanelBody.component-CbwJTG-C.js +4 -0
- package/build/PanelBody.js +1 -4
- package/build/PanelFooter.component-C5-ea5YD.js +11 -0
- package/build/PanelFooter.js +1 -11
- package/build/{Select.component-B61pnCf7.js → Select.component-BlpCRnuM.js} +3 -3
- package/build/Select.js +1 -1
- package/build/{SelectOption.component-GxWRy28M.js → SelectOption.component-C7NysL8S.js} +1 -1
- package/build/SelectOption.js +1 -1
- package/build/{SelectRow.component-DKK8MJOk.js → SelectRow.component-DhPz6KOs.js} +4 -4
- package/build/SelectRow.js +1 -1
- package/build/StyleProvider.component-bYqFN-bx.js +1 -0
- package/build/StyleProvider.js +1 -1
- package/build/{SwitchRow.component-CmboUtfc.js → SwitchRow.component-BeG5g1_U.js} +1 -1
- package/build/SwitchRow.js +1 -1
- package/build/{TextInput.component-CkNlIlj0.js → TextInput.component-Bh7t1tSB.js} +1 -1
- package/build/{TextInputRow.component-fXXdeFjF.js → TextInputRow.component-D7NCrZz7.js} +1 -1
- package/build/TextInputRow.js +1 -1
- package/build/{TextareaRow.component-DcyMqrAg.js → TextareaRow.component-ClRuP_M4.js} +1 -1
- package/build/TextareaRow.js +1 -1
- package/build/{ThemeToggle.component-C15TCL63.js → ThemeToggle.component-BqqY9D8j.js} +2 -2
- package/build/ThemeToggle.js +1 -1
- package/build/{Tooltip.component-AWJGzfXT.js → Tooltip.component-Bjg6qJkQ.js} +1 -1
- package/build/Tooltip.js +1 -1
- package/build/{TooltipContent.component-Go8u2Bz4.js → TooltipContent.component-CU4HX5GI.js} +1 -1
- package/build/TooltipContent.js +1 -1
- package/build/{TooltipTrigger.component-CYpGzL4I.js → TooltipTrigger.component-Bs5zgkGw.js} +1 -1
- package/build/TooltipTrigger.js +1 -1
- package/build/{_commonjsHelpers-BxGi5vpY.js → _commonjsHelpers-BXRXMh56.js} +1 -1
- package/build/components/AppBody/AppBody.component.d.ts +2 -2
- package/build/components/AppBody/AppBody.component.d.ts.map +1 -1
- package/build/components/AppIntro/AppIntro.component.d.ts +11 -0
- package/build/components/AppIntro/AppIntro.component.d.ts.map +1 -0
- package/build/components/AppIntro/index.d.ts +2 -0
- package/build/components/AppIntro/index.d.ts.map +1 -0
- package/build/components/AppShell/AppShell.component.d.ts +2 -2
- package/build/components/AppShell/AppShell.component.d.ts.map +1 -1
- package/build/components/AppShellProvider/AppShellProvider.component.d.ts +1 -1
- package/build/components/AppShellProvider/AppShellProvider.component.d.ts.map +1 -1
- package/build/components/AppShellProvider/index.d.ts +2 -0
- package/build/components/AppShellProvider/index.d.ts.map +1 -0
- package/build/components/Badge/Badge.component.d.ts +1 -1
- package/build/components/Badge/Badge.component.d.ts.map +1 -1
- package/build/components/Box/Box.component.d.ts +1 -1
- package/build/components/Box/Box.component.d.ts.map +1 -1
- package/build/components/Breadcrumb/Breadcrumb.component.d.ts +1 -1
- package/build/components/Breadcrumb/Breadcrumb.component.d.ts.map +1 -1
- package/build/components/BreadcrumbItem/BreadcrumbItem.component.d.ts +1 -5
- package/build/components/BreadcrumbItem/BreadcrumbItem.component.d.ts.map +1 -1
- package/build/components/Button/Button.component.d.ts +3 -3
- package/build/components/Button/Button.component.d.ts.map +1 -1
- package/build/components/ButtonRow/ButtonRow.component.d.ts +2 -2
- package/build/components/ButtonRow/ButtonRow.component.d.ts.map +1 -1
- package/build/components/Checkbox/Checkbox.component.d.ts +2 -2
- package/build/components/Checkbox/Checkbox.component.d.ts.map +1 -1
- package/build/components/CheckboxGroup/CheckboxGroup.component.d.ts +2 -2
- package/build/components/CheckboxGroup/CheckboxGroup.component.d.ts.map +1 -1
- package/build/components/CodeBlock/CodeBlock.component.d.ts +2 -2
- package/build/components/CodeBlock/CodeBlock.component.d.ts.map +1 -1
- package/build/components/ComboBox/ComboBox.component.d.ts +1 -1
- package/build/components/ComboBox/ComboBox.component.d.ts.map +1 -1
- package/build/components/Container/Container.component.d.ts +2 -2
- package/build/components/Container/Container.component.d.ts.map +1 -1
- package/build/components/ContentContainer/ContentContainer.component.d.ts +5 -0
- package/build/components/ContentContainer/ContentContainer.component.d.ts.map +1 -1
- package/build/components/ContentHeading/ContentHeading.component.d.ts +8 -0
- package/build/components/ContentHeading/ContentHeading.component.d.ts.map +1 -1
- package/build/components/DataGrid/DataGrid.component.d.ts +2 -2
- package/build/components/DataGrid/DataGrid.component.d.ts.map +1 -1
- package/build/components/DataGridCell/DataGridCell.component.d.ts +3 -3
- package/build/components/DataGridCell/DataGridCell.component.d.ts.map +1 -1
- package/build/components/DataGridCheckboxCell/DataGridCheckboxCell.component.d.ts +2 -2
- package/build/components/DataGridCheckboxCell/DataGridCheckboxCell.component.d.ts.map +1 -1
- package/build/components/DataGridFoot/DataGridFoot.component.d.ts +2 -2
- package/build/components/DataGridFoot/DataGridFoot.component.d.ts.map +1 -1
- package/build/components/DataGridHeadCell/DataGridHeadCell.component.d.ts +1 -1
- package/build/components/DataGridHeadCell/DataGridHeadCell.component.d.ts.map +1 -1
- package/build/components/DataGridRow/DataGridRow.component.d.ts +1 -1
- package/build/components/DataGridRow/DataGridRow.component.d.ts.map +1 -1
- package/build/components/DataGridToolbar/DataGridToolbar.component.d.ts +2 -2
- package/build/components/DataGridToolbar/DataGridToolbar.component.d.ts.map +1 -1
- package/build/components/DateTimePicker/DateTimePicker.component.d.ts +159 -0
- package/build/components/DateTimePicker/DateTimePicker.component.d.ts.map +1 -0
- package/build/components/DateTimePicker/index.d.ts +2 -0
- package/build/components/DateTimePicker/index.d.ts.map +1 -0
- package/build/components/FormHint/FormHint.component.d.ts +1 -1
- package/build/components/FormHint/FormHint.component.d.ts.map +1 -1
- package/build/components/FormattedText/FormattedText.component.d.ts +2 -8
- package/build/components/FormattedText/FormattedText.component.d.ts.map +1 -1
- package/build/components/Icon/Icon.component.d.ts +3 -3
- package/build/components/Icon/Icon.component.d.ts.map +1 -1
- package/build/components/InputGroup/InputGroup.component.d.ts +1 -1
- package/build/components/InputGroup/InputGroup.component.d.ts.map +1 -1
- package/build/components/IntroBox/IntroBox.component.d.ts +2 -2
- package/build/components/IntroBox/IntroBox.component.d.ts.map +1 -1
- package/build/components/JsonViewer/JsonViewer.component.d.ts +1 -1
- package/build/components/JsonViewer/JsonViewer.component.d.ts.map +1 -1
- package/build/components/Label/Label.component.d.ts +1 -1
- package/build/components/Label/Label.component.d.ts.map +1 -1
- package/build/components/LoadingIndicator/LoadingIndicator.component.d.ts +1 -1
- package/build/components/LoadingIndicator/LoadingIndicator.component.d.ts.map +1 -1
- package/build/components/MainContainer/MainContainer.component.d.ts +2 -2
- package/build/components/MainContainer/MainContainer.component.d.ts.map +1 -1
- package/build/components/MainContainerInner/MainContainerInner.component.d.ts +2 -2
- package/build/components/MainContainerInner/MainContainerInner.component.d.ts.map +1 -1
- package/build/components/MainTabs/MainTabs.component.d.ts +2 -2
- package/build/components/MainTabs/MainTabs.component.d.ts.map +1 -1
- package/build/components/Menu/Menu.component.d.ts +1 -1
- package/build/components/Menu/Menu.component.d.ts.map +1 -1
- package/build/components/MenuItem/MenuItem.component.d.ts +1 -1
- package/build/components/MenuItem/MenuItem.component.d.ts.map +1 -1
- package/build/components/MenuSection/MenuSection.component.d.ts +1 -1
- package/build/components/MenuSection/MenuSection.component.d.ts.map +1 -1
- package/build/components/Message/Message.component.d.ts +1 -5
- package/build/components/Message/Message.component.d.ts.map +1 -1
- package/build/components/Modal/Modal.component.d.ts +3 -3
- package/build/components/Modal/Modal.component.d.ts.map +1 -1
- package/build/components/ModalFooter/ModalFooter.component.d.ts +3 -3
- package/build/components/ModalFooter/ModalFooter.component.d.ts.map +1 -1
- package/build/components/Navigation/Navigation.component.d.ts +2 -2
- package/build/components/Navigation/Navigation.component.d.ts.map +1 -1
- package/build/components/NavigationItem/NavigationItem.component.d.ts +2 -2
- package/build/components/NavigationItem/NavigationItem.component.d.ts.map +1 -1
- package/build/components/PageFooter/PageFooter.component.d.ts +2 -2
- package/build/components/PageFooter/PageFooter.component.d.ts.map +1 -1
- package/build/components/PageHeader/PageHeader.component.d.ts +2 -2
- package/build/components/PageHeader/PageHeader.component.d.ts.map +1 -1
- package/build/components/Pill/Pill.component.d.ts +1 -1
- package/build/components/Pill/Pill.component.d.ts.map +1 -1
- package/build/components/Radio/Radio.component.d.ts +2 -2
- package/build/components/Radio/Radio.component.d.ts.map +1 -1
- package/build/components/RadioGroup/RadioGroup.component.d.ts +2 -2
- package/build/components/RadioGroup/RadioGroup.component.d.ts.map +1 -1
- package/build/components/Select/Select.component.d.ts +1 -1
- package/build/components/Select/Select.component.d.ts.map +1 -1
- package/build/components/SelectDivider/SelectDivider.component.d.ts +1 -1
- package/build/components/SelectDivider/SelectDivider.component.d.ts.map +1 -1
- package/build/components/SelectOption/SelectOption.component.d.ts +2 -2
- package/build/components/SelectOption/SelectOption.component.d.ts.map +1 -1
- package/build/components/ShadowRoot/ShadowRoot.component.d.ts +1 -1
- package/build/components/ShadowRoot/ShadowRoot.component.d.ts.map +1 -1
- package/build/components/SideNavigation/SideNavigation.component.d.ts +2 -2
- package/build/components/SideNavigation/SideNavigation.component.d.ts.map +1 -1
- package/build/components/SideNavigationItem/SideNavigationItem.component.d.ts +2 -2
- package/build/components/SideNavigationItem/SideNavigationItem.component.d.ts.map +1 -1
- package/build/components/Spinner/Spinner.component.d.ts +3 -3
- package/build/components/Spinner/Spinner.component.d.ts.map +1 -1
- package/build/components/Stack/Stack.component.d.ts +3 -3
- package/build/components/Stack/Stack.component.d.ts.map +1 -1
- package/build/components/Switch/Switch.component.d.ts +1 -1
- package/build/components/Switch/Switch.component.d.ts.map +1 -1
- package/build/components/TabList/TabList.component.d.ts +1 -1
- package/build/components/TabList/TabList.component.d.ts.map +1 -1
- package/build/components/TabNavigation/TabNavigation.component.d.ts +2 -2
- package/build/components/TabNavigation/TabNavigation.component.d.ts.map +1 -1
- package/build/components/TabNavigationItem/TabNavigationItem.component.d.ts +2 -2
- package/build/components/TabNavigationItem/TabNavigationItem.component.d.ts.map +1 -1
- package/build/components/TabPanel/TabPanel.component.d.ts +2 -1
- package/build/components/TabPanel/TabPanel.component.d.ts.map +1 -1
- package/build/components/TextInput/TextInput.component.d.ts +1 -1
- package/build/components/TextInput/TextInput.component.d.ts.map +1 -1
- package/build/components/Textarea/Textarea.component.d.ts +3 -3
- package/build/components/Textarea/Textarea.component.d.ts.map +1 -1
- package/build/components/ThemeToggle/ThemeToggle.component.d.ts +31 -0
- package/build/components/ThemeToggle/ThemeToggle.component.d.ts.map +1 -0
- package/build/components/ThemeToggle/index.d.ts +2 -0
- package/build/components/ThemeToggle/index.d.ts.map +1 -0
- package/build/components/Toast/Toast.component.d.ts +2 -4
- package/build/components/Toast/Toast.component.d.ts.map +1 -1
- package/build/components/Tooltip/Tooltip.component.d.ts +6 -7
- package/build/components/Tooltip/Tooltip.component.d.ts.map +1 -1
- package/build/components/Tooltip/useTooltip.d.ts +4 -4
- package/build/components/TooltipContent/TooltipContent.component.d.ts +1 -1
- package/build/components/TooltipContent/TooltipContent.component.d.ts.map +1 -1
- package/build/components/TooltipTrigger/TooltipTrigger.component.d.ts +1 -1
- package/build/components/TooltipTrigger/TooltipTrigger.component.d.ts.map +1 -1
- package/build/components/TopNavigation/TopNavigation.component.d.ts +2 -2
- package/build/components/TopNavigation/TopNavigation.component.d.ts.map +1 -1
- package/build/components/TopNavigationItem/TopNavigationItem.component.d.ts +2 -2
- package/build/components/TopNavigationItem/TopNavigationItem.component.d.ts.map +1 -1
- package/build/floating-ui.react-dom-DFre3-Br.js +1 -0
- package/build/headlessui-float-n1IxyQhp.js +15 -0
- package/build/hooks/useEndlessScrollList.d.ts +1 -1
- package/build/hooks/useEndlessScrollList.d.ts.map +1 -1
- package/build/hooks/useEndlessScrollList.js +2 -2
- package/build/index.js +3 -352
- package/package.json +68 -68
- package/build/AppIntro.component-BnwrDrke.js +0 -6
- package/build/AppShellProvider.component-Be1Q5mjZ.js +0 -1
- package/build/ComboBox.component-CVfbabwk.js +0 -115
- package/build/ContentHeading.component-iyxxB3V8.js +0 -6
- package/build/DateTimePicker.component-BysBjc0a.js +0 -59
- package/build/PortalProvider.component-B2hXHP-c.js +0 -1
- package/build/StyleProvider.component-CqbWBDF7.js +0 -1
- package/build/floating-ui.react-dom-Bx8TUz-v.js +0 -1
- package/build/focus-trap-react-QYyPJKV2.js +0 -1
- package/build/headlessui-float-BQHnLFxQ.js +0 -10
- package/build/ibm-plex-DkmjUb78.js +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./themeToggle.scss";
|
|
3
|
+
export interface ThemeToggleProps {
|
|
4
|
+
/**
|
|
5
|
+
* Additional CSS classes for custom styling.
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* If true, the ThemeToggle will be disabled and not respond to user input.
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* HTML id attribute for the ThemeToggle.
|
|
14
|
+
*/
|
|
15
|
+
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* HTML name attribute for the ThemeToggle.
|
|
18
|
+
*/
|
|
19
|
+
name?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Callback function that is called when the theme is toggled.
|
|
22
|
+
*/
|
|
23
|
+
onToggleTheme?: (...args: unknown[]) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* ThemeToggle is a button component that toggles between Light and Dark UI Themes.
|
|
27
|
+
* This component requires a StyleProvider context to function, which is automatically provided by the Juno AppShell.
|
|
28
|
+
* If not using the AppShell, include a StyleProvider manually.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ThemeToggle: React.FC<ThemeToggleProps>;
|
|
31
|
+
//# sourceMappingURL=ThemeToggle.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeToggle.component.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeToggle/ThemeToggle.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,oBAAoB,CAAA;AAoB3B,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IAEH,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;CAC7C;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsClD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ThemeToggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
type IconType = "info" | "warning" | "danger" | "error" | "success";
|
|
3
|
-
export interface ToastProps {
|
|
3
|
+
export interface ToastProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/** Specify a semantic variant */
|
|
5
5
|
variant?: IconType;
|
|
6
6
|
/** Pass child nodes to be rendered as contents */
|
|
@@ -15,12 +15,10 @@ export interface ToastProps {
|
|
|
15
15
|
onDismiss?: () => unknown;
|
|
16
16
|
/** Pass an optional className */
|
|
17
17
|
className?: string;
|
|
18
|
-
/** Pass any optional properties */
|
|
19
|
-
[x: string]: any;
|
|
20
18
|
}
|
|
21
19
|
/**
|
|
22
20
|
A Toast component. Use for short-lived, temporary/transient messaging to users relating to their current usage context, e.g. 'Edits changed successfully'. For more general, persistent messaging, e.g. 'Our servers will be down for maintenance all weekend', use Message instead.
|
|
23
21
|
*/
|
|
24
|
-
export declare const Toast:
|
|
22
|
+
export declare const Toast: React.FC<ToastProps>;
|
|
25
23
|
export {};
|
|
26
24
|
//# sourceMappingURL=Toast.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.component.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAA;AA0BlD,KAAK,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AACnE,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Toast.component.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAA;AA0BlD,KAAK,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAA;AACnE,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtE,iCAAiC;IACjC,OAAO,CAAC,EAAE,QAAQ,CAAA;IAClB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oJAAoJ;IACpJ,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kHAAkH;IAClH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,OAAO,CAAA;IACzB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;EAEE;AAEF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAgDtC,CAAA"}
|
|
@@ -6,8 +6,8 @@ import { ToolTipVariant, TooltipPlacement } from "./ToolTip.types";
|
|
|
6
6
|
* @returns TooltipContext
|
|
7
7
|
*/
|
|
8
8
|
export declare const useTooltipState: () => {
|
|
9
|
-
placement: import("@floating-ui/
|
|
10
|
-
strategy: import("@floating-ui/
|
|
9
|
+
placement: import("@floating-ui/utils").Placement;
|
|
10
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
11
11
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
12
12
|
x: number;
|
|
13
13
|
y: number;
|
|
@@ -27,8 +27,8 @@ export declare const useTooltipState: () => {
|
|
|
27
27
|
context: {
|
|
28
28
|
x: number;
|
|
29
29
|
y: number;
|
|
30
|
-
placement: import("@floating-ui/
|
|
31
|
-
strategy: import("@floating-ui/
|
|
30
|
+
placement: import("@floating-ui/utils").Placement;
|
|
31
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
32
32
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
33
33
|
isPositioned: boolean;
|
|
34
34
|
update: () => void;
|
|
@@ -50,7 +50,7 @@ export declare const useTooltipState: () => {
|
|
|
50
50
|
variant: ToolTipVariant | undefined;
|
|
51
51
|
disabled: boolean;
|
|
52
52
|
};
|
|
53
|
-
interface TooltipProps {
|
|
53
|
+
export interface TooltipProps extends React.HTMLAttributes<HTMLElement> {
|
|
54
54
|
variant?: ToolTipVariant;
|
|
55
55
|
/** Uncontrolled Tooltip: Choose which event should trigger the opening of the tooltip (click or hover) */
|
|
56
56
|
triggerEvent?: "click" | "hover";
|
|
@@ -71,6 +71,5 @@ interface TooltipProps {
|
|
|
71
71
|
* you configure the event type that should open the tooltip (click or hover) or alternatively you can use it as a controlled component where you set the
|
|
72
72
|
* open state and handle the events that open/close the tooltip yourself.
|
|
73
73
|
*/
|
|
74
|
-
export declare
|
|
75
|
-
export {};
|
|
74
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
76
75
|
//# sourceMappingURL=Tooltip.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.component.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAOlE;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Tooltip.component.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAOlE;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;oBAyDg8L,MAAO,aAAa;;;kBAAiV,MAAO,gBAAgB;;;;;;;;;;;;;;;;wBAA5X,MAAO,aAAa;;2CAAzzL,CAAC;;iBAA0D,MAAO,gBAAgB;;;;;;iCAlEjN,CAAC,EAAC,MAEzD,SAAS;gCAGF,CAAA,EAAC,MAAO,SAAS;4BAIF,CAAC,EAAC,MAAO,SAC9B;;;;;CAOD,CAAA;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAErE,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,0GAA0G;IAC1G,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAA;IAChC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,8LAA8L;IAC9L,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mIAAmI;IACnI,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;wJACoJ;IACpJ,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,sEAAsE;IACtE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED;;;;GAIG;AAEH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAsB1C,CAAA"}
|
|
@@ -17,8 +17,8 @@ export interface UseTooltipProps {
|
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
19
|
export declare const useTooltip: ({ initialOpen, variant, placement, triggerEvent, open: controlledOpen, onOpenChange: setControlledOpen, disabled, }?: UseTooltipProps) => {
|
|
20
|
-
placement: import("@floating-ui/
|
|
21
|
-
strategy: import("@floating-ui/
|
|
20
|
+
placement: import("@floating-ui/utils").Placement;
|
|
21
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
22
22
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
23
23
|
x: number;
|
|
24
24
|
y: number;
|
|
@@ -38,8 +38,8 @@ export declare const useTooltip: ({ initialOpen, variant, placement, triggerEven
|
|
|
38
38
|
context: {
|
|
39
39
|
x: number;
|
|
40
40
|
y: number;
|
|
41
|
-
placement: import("@floating-ui/
|
|
42
|
-
strategy: import("@floating-ui/
|
|
41
|
+
placement: import("@floating-ui/utils").Placement;
|
|
42
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
43
43
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
44
44
|
isPositioned: boolean;
|
|
45
45
|
update: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export interface TooltipContentProps {
|
|
2
|
+
export interface TooltipContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
/** Pass child nodes to display in the tooltip */
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
/** Pass a className to render to the icon button*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipContent.component.d.ts","sourceRoot":"","sources":["../../../src/components/TooltipContent/TooltipContent.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TooltipContent.component.d.ts","sourceRoot":"","sources":["../../../src/components/TooltipContent/TooltipContent.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAmCzB,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/E,iDAAiD;IACjD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,yFAmCzB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export interface TooltipTriggerProps {
|
|
2
|
+
export interface TooltipTriggerProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
3
|
/** If true, the child you passed to the TooltipTrigger is rendered as the trigger element, instead of the default trigger component. This is useful if you e.g. want to use a Button or Icon as the trigger. */
|
|
4
4
|
asChild?: boolean;
|
|
5
5
|
/** Pass child nodes to display in the tooltip */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipTrigger.component.d.ts","sourceRoot":"","sources":["../../../src/components/TooltipTrigger/TooltipTrigger.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"TooltipTrigger.component.d.ts","sourceRoot":"","sources":["../../../src/components/TooltipTrigger/TooltipTrigger.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC5E,gNAAgN;IAChN,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID;;GAEG;AACH,eAAO,MAAM,cAAc,yFAsCzB,CAAA"}
|
|
@@ -3,10 +3,10 @@ import React from "react";
|
|
|
3
3
|
A generic horizontal top level navigation component. To be placed below the application header but above application content.
|
|
4
4
|
Place `TopNavigationItem` elements as children.
|
|
5
5
|
*/
|
|
6
|
-
export declare const TopNavigation:
|
|
6
|
+
export declare const TopNavigation: React.FC<TopNavigationProps>;
|
|
7
7
|
type ItemKeyType = string | React.ReactNode;
|
|
8
8
|
type ActiveItemChangeHandler = (value: ItemKeyType) => void;
|
|
9
|
-
export interface TopNavigationProps {
|
|
9
|
+
export interface TopNavigationProps extends React.HTMLAttributes<HTMLElement> {
|
|
10
10
|
/** The active navigation item by label */
|
|
11
11
|
activeItem?: string;
|
|
12
12
|
/** The aria-label of the navigation. Specify when there are more than one elements with an implicit or explicit `role="navigation"` on a page/view. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavigation.component.d.ts","sourceRoot":"","sources":["../../../src/components/TopNavigation/TopNavigation.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB;;;EAGE;AAEF,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"TopNavigation.component.d.ts","sourceRoot":"","sources":["../../../src/components/TopNavigation/TopNavigation.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB;;;EAGE;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqBtD,CAAA;AAED,KAAK,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;AAG3C,KAAK,uBAAuB,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;AAE3D,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC3E,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,uJAAuJ;IACvJ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,uBAAuB,CAAA;CAC7C"}
|
|
@@ -3,8 +3,8 @@ import { KnownIcons } from "../Icon/Icon.component";
|
|
|
3
3
|
/**
|
|
4
4
|
An individual item of a top level navigation. Place inside TopNavigation.
|
|
5
5
|
*/
|
|
6
|
-
export declare const TopNavigationItem:
|
|
7
|
-
export interface TopNavigationItemProps {
|
|
6
|
+
export declare const TopNavigationItem: React.FC<TopNavigationItemProps>;
|
|
7
|
+
export interface TopNavigationItemProps extends React.HTMLAttributes<HTMLElement> {
|
|
8
8
|
/** Whether the item is the currently active item */
|
|
9
9
|
active?: boolean;
|
|
10
10
|
/** The aria label of the item */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavigationItem.component.d.ts","sourceRoot":"","sources":["../../../src/components/TopNavigationItem/TopNavigationItem.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AA+BnD;;EAEE;AACF,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"TopNavigationItem.component.d.ts","sourceRoot":"","sources":["../../../src/components/TopNavigationItem/TopNavigationItem.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AA+BnD;;EAEE;AACF,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA8B9D,CAAA;AAED,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC/E,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8HAA8H;IAC9H,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wBAAwB;IACxB,IAAI,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;IACxB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mHAAmH;IACnH,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAC9C,gPAAgP;IAChP,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as React from"react";import{useLayoutEffect,useEffect}from"react";import*as ReactDOM from"react-dom";function hasWindow(){return"undefined"!=typeof window}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return null==(t=(isNode(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function isNode(e){return!!hasWindow()&&(e instanceof Node||e instanceof getWindow(e).Node)}function isElement(e){return!!hasWindow()&&(e instanceof Element||e instanceof getWindow(e).Element)}function isHTMLElement(e){return!!hasWindow()&&(e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement)}function isShadowRoot(e){return!!(hasWindow()&&"undefined"!=typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot)}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=getComputedStyle(e);return /auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(t){return!1}})}function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function getContainingBlock(e){for(let t=getParentNode(e);isHTMLElement(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return!!("undefined"!=typeof CSS&&CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if("html"===getNodeName(e))return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=getNearestOverflowAncestor(e),l=o===(null==(i=e.ownerDocument)?void 0:i.body),r=getWindow(o);if(l){const e=getFrameElement(r);return t.concat(r,r.visualViewport||[],isOverflowElement(o)?o:[],e&&n?getOverflowAncestors(e):[])}return t.concat(o,getOverflowAncestors(o,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const sides=["top","right","bottom","left"],alignments=["start","end"],placements=sides.reduce((e,t)=>e.concat(t,t+"-"+alignments[0],t+"-"+alignments[1]),[]),min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(e,t,n){return max(e,min(t,n))}function evaluate(e,t){return"function"==typeof e?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return"x"===e?"y":"x"}function getAxisLength(e){return"y"===e?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){void 0===n&&(n=!1);const i=getAlignment(e),o=getAlignmentAxis(e),l=getAxisLength(o);let r="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[l]>t.floating[l]&&(r=getOppositePlacement(r)),[r,getOppositePlacement(r)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,e=>oppositeAlignmentMap[e])}function getSideList(e,t,n){const i=["left","right"],o=["right","left"];return"top"===e||"bottom"===e?n?t?o:i:t?i:o:"left"===e||"right"===e?t?["top","bottom"]:["bottom","top"]:[]}function getOppositeAxisPlacements(e,t,n,i){const o=getAlignment(e);let l=getSideList(getSide(e),"start"===n,i);return o&&(l=l.map(e=>e+"-"+o),t&&(l=l.concat(l.map(getOppositeAlignmentPlacement)))),l}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,e=>oppositeSideMap[e])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return"number"==typeof e?{top:e,right:e,bottom:e,left:e}:expandPaddingObject(e)}function rectToClientRect(e){const{x:t,y:n,width:i,height:o}=e;return{width:i,height:o,top:n,left:t,right:t+i,bottom:n+o,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:i,floating:o}=e;const l=getSideAxis(t),r=getAlignmentAxis(t),a=getAxisLength(r),s=getSide(t),d="y"===l,f=i.x+i.width/2-o.width/2,c=i.y+i.height/2-o.height/2,m=i[a]/2-o[a]/2;let g;switch(g="top"===s?{x:f,y:i.y-o.height}:"bottom"===s?{x:f,y:i.y+i.height}:"right"===s?{x:i.x+i.width,y:c}:"left"===s?{x:i.x-o.width,y:c}:{x:i.x,y:i.y},getAlignment(t)){case"start":g[r]-=m*(n&&d?-1:1);break;case"end":g[r]+=m*(n&&d?-1:1)}return g}const computePosition$1=async(e,t,n)=>{const{placement:l="bottom",strategy:r="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),d=await(null==o.isRTL?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:m}=computeCoordsFromPlacement(f,l,d),g=l,h={},p=0;for(let a=0;a<s.length;a++){const{name:n,fn:i}=s[a],{x:u,y:x,data:y,reset:w}=await i({x:c,y:m,initialPlacement:l,placement:g,strategy:r,middlewareData:h,rects:f,platform:o,elements:{reference:e,floating:t}});c=null==u?c:u,m=null==x?m:x,h={...h,[n]:{...h[n],...y}},w&&50>=p&&(p++,"object"==typeof w&&(w.placement&&(g=w.placement),w.rects&&(f=!0===w.rects?await o.getElementRects({reference:e,floating:t,strategy:r}):w.rects),{x:c,y:m}=computeCoordsFromPlacement(f,g,d)),a=-1)}return{x:c,y:m,placement:g,strategy:r,middlewareData:h}};async function detectOverflow(e,t){var n;void 0===t&&(t={});const{x:i,y:o,platform:l,rects:r,elements:a,strategy:s}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:m=!1,padding:g=0}=evaluate(t,e),h=getPaddingObject(g),p="floating"===c?"reference":"floating",u=a[m?p:c],x=rectToClientRect(await l.getClippingRect({element:!(null!=(n=await(null==l.isElement?void 0:l.isElement(u))))||n?u:u.contextElement||(await(null==l.getDocumentElement?void 0:l.getDocumentElement(a.floating))),boundary:d,rootBoundary:f,strategy:s})),y="floating"===c?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,w=await(null==l.getOffsetParent?void 0:l.getOffsetParent(a.floating)),b=(await(null==l.isElement?void 0:l.isElement(w)))?(await(null==l.getScale?void 0:l.getScale(w)))||{x:1,y:1}:{x:1,y:1},v=rectToClientRect(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:s}):y);return{top:(x.top-v.top+h.top)/b.y,bottom:(v.bottom-x.bottom+h.bottom)/b.y,left:(x.left-v.left+h.left)/b.x,right:(v.right-x.right+h.right)/b.x}}const arrow$3=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:o,rects:l,platform:r,elements:a,middlewareData:s}=t,{element:d,padding:f=0}=evaluate(e,t)||{};if(null==d)return{};const c=getPaddingObject(f),m={x:n,y:i},g=getAlignmentAxis(o),h=getAxisLength(g),p=await r.getDimensions(d),u="y"===g,x=u?"top":"left",y=u?"bottom":"right",w=u?"clientHeight":"clientWidth",b=l.reference[h]+l.reference[g]-m[g]-l.floating[h],v=m[g]-l.reference[g],R=await(null==r.getOffsetParent?void 0:r.getOffsetParent(d));let L=R?R[w]:0;L&&(await(null==r.isElement?void 0:r.isElement(R)))||(L=a.floating[w]||l.floating[h]);const P=L/2-p[h]/2-1,T=min(c[x],P),A=min(c[y],P),D=T,E=L-p[h]-A,S=L/2-p[h]/2+(b/2-v/2),C=clamp(D,S,E),O=!s.arrow&&null!=getAlignment(o)&&S!==C&&0>l.reference[h]/2-(S<D?T:A)-p[h]/2,H=O?S<D?S-D:S-E:0;return{[g]:m[g]+H,data:{[g]:C,centerOffset:S-C-H,...(O&&{alignmentOffset:H})},reset:O}}});function getPlacementList(e,t,n){const i=e?[...n.filter(t=>getAlignment(t)===e),...n.filter(t=>getAlignment(t)!==e)]:n.filter(e=>getSide(e)===e);return i.filter(n=>!e||getAlignment(n)===e||!!t&&getOppositeAlignmentPlacement(n)!==n)}const autoPlacement$2=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,o;const{rects:l,middlewareData:r,placement:a,platform:s,elements:d}=t,{crossAxis:m=!1,alignment:f,allowedPlacements:g=placements,autoAlignment:h=!0,...c}=evaluate(e,t),p=void 0!==f||g===placements?getPlacementList(f||null,h,g):g,u=await detectOverflow(t,c),x=(null==(n=r.autoPlacement)?void 0:n.index)||0,y=p[x];if(null==y)return{};const w=getAlignmentSides(y,l,await(null==s.isRTL?void 0:s.isRTL(d.floating)));if(a!==y)return{reset:{placement:p[0]}};const b=[u[getSide(y)],u[w[0]],u[w[1]]],v=[...((null==(i=r.autoPlacement)?void 0:i.overflows)||[]),{placement:y,overflows:b}],R=p[x+1];if(R)return{data:{index:x+1,overflows:v},reset:{placement:R}};const L=v.map(e=>{const t=getAlignment(e.placement);return[e.placement,t&&m?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),P=L.filter(e=>e[2].slice(0,getAlignment(e[0])?2:3).every(e=>0>=e)),T=(null==(o=P[0])?void 0:o[0])||L[0][0];return T===a?{}:{data:{index:x+1,overflows:v},reset:{placement:T}}}}},flip$2=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:l,rects:r,initialPlacement:a,platform:s,elements:d}=t,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:u=!0,...c}=evaluate(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const x=getSide(o),y=getSideAxis(a),w=getSide(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(d.floating)),v=f||(w||!u?[getOppositePlacement(a)]:getExpandedPlacements(a)),R="none"!==p;!f&&R&&v.push(...getOppositeAxisPlacements(a,u,p,b));const L=[a,...v],P=await detectOverflow(t,c),T=[];let A=(null==(i=l.flip)?void 0:i.overflows)||[];if(m&&T.push(P[x]),g){const e=getAlignmentSides(o,r,b);T.push(P[e[0]],P[e[1]])}if(A=[...A,{placement:o,overflows:T}],!T.every(e=>0>=e)){var D,E;const e=((null==(D=l.flip)?void 0:D.index)||0)+1,t=L[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(E=A.filter(e=>0>=e.overflows[0]).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(h){case"bestFit":{var S;const e=null==(S=A.filter(e=>{if(R){const t=getSideAxis(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>0<e).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:S[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>0<=e[t])}const hide$1=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=evaluate(e,t);switch(o){case"referenceHidden":{const e=await detectOverflow(t,{...i,elementContext:"reference"}),o=getSideOffsets(e,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:isAnySideFullyClipped(o)}}}case"escaped":{const e=await detectOverflow(t,{...i,altBoundary:!0}),o=getSideOffsets(e,n.floating);return{data:{escapedOffsets:o,escaped:isAnySideFullyClipped(o)}}}default:return{}}}}};async function convertValueToCoords(e,t){const{placement:n,platform:i,elements:o}=e,l=await(null==i.isRTL?void 0:i.isRTL(o.floating)),r=getSide(n),a=getAlignment(n),s="y"===getSideAxis(n),d=["left","top"].includes(r)?-1:1,f=l&&s?-1:1,c=evaluate(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:h}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&"number"==typeof h&&(g="end"===a?-1*h:h),s?{x:g*f,y:m*d}:{x:m*d,y:g*f}}const offset$2=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:l,placement:r,middlewareData:a}=t,s=await convertValueToCoords(t,e);return r===(null==(n=a.offset)?void 0:n.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:o+s.x,y:l+s.y,data:{...s,placement:r}}}}},shift$2=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=evaluate(e,t),d={x:n,y:i},f=await detectOverflow(t,l),c=getSideAxis(getSide(o)),m=getOppositeAxis(c);let g=d[m],h=d[c];if(r){const e="y"===m?"top":"left",t="y"===m?"bottom":"right",n=g+f[e],i=g-f[t];g=clamp(n,g,i)}if(a){const e="y"===c?"top":"left",t="y"===c?"bottom":"right",n=h+f[e],i=h-f[t];h=clamp(n,h,i)}const p=s.fn({...t,[m]:g,[c]:h});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[m]:r,[c]:a}}}}}},size$2=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:o,rects:l,platform:r,elements:a}=t,{apply:d=()=>{},...s}=evaluate(e,t),f=await detectOverflow(t,s),c=getSide(o),m=getAlignment(o),g="y"===getSideAxis(o),{width:h,height:p}=l.floating;let u,x;"top"===c||"bottom"===c?(u=c,x=m===((await(null==r.isRTL?void 0:r.isRTL(a.floating)))?"start":"end")?"left":"right"):(x=c,u="end"===m?"top":"bottom");const y=p-f.top-f.bottom,w=h-f.left-f.right,b=min(p-f[u],y),v=min(h-f[x],w),R=!t.middlewareData.shift;let L=b,P=v;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(P=w),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(L=y),R&&!m){const e=max(f.left,0),t=max(f.right,0),n=max(f.top,0),i=max(f.bottom,0);g?P=h-2*(0!==e||0!==t?e+t:max(f.left,f.right)):L=p-2*(0!==n||0!==i?n+i:max(f.top,f.bottom))}await d({...t,availableWidth:P,availableHeight:L});const T=await r.getDimensions(a.floating);return h!==T.width||p!==T.height?{reset:{rects:!0}}:{}}}};function getCssDimensions(e){const t=getComputedStyle(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=isHTMLElement(e),l=o?e.offsetWidth:n,r=o?e.offsetHeight:i,a=round(n)!==l||round(i)!==r;return a&&(n=l,i=r),{width:n,height:i,$:a}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){var t=Number.isFinite;const n=unwrapElement(e);if(!isHTMLElement(n))return createCoords(1);const i=n.getBoundingClientRect(),{width:o,height:l,$:r}=getCssDimensions(n);let a=(r?round(i.width):i.width)/o,s=(r?round(i.height):i.height)/l;return a&&t(a)||(a=1),s&&t(s)||(s=1),{x:a,y:s}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return isWebKit()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:noOffsets}function shouldAddVisualOffsets(e,t,n){return void 0===t&&(t=!1),n&&(!t||n===getWindow(e))&&t}function getBoundingClientRect(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),l=unwrapElement(e);let r=createCoords(1);t&&(i?isElement(i)&&(r=getScale(i)):r=getScale(e));const a=shouldAddVisualOffsets(l,n,i)?getVisualOffsets(l):createCoords(0);let s=(o.left+a.x)/r.x,d=(o.top+a.y)/r.y,f=o.width/r.x,c=o.height/r.y;if(l){const e=getWindow(l),t=i&&isElement(i)?getWindow(i):i;let n=e,o=getFrameElement(n);for(;o&&i&&t!==n;){const e=getScale(o),t=o.getBoundingClientRect(),i=getComputedStyle(o),l=t.left+(o.clientLeft+parseFloat(i.paddingLeft))*e.x,r=t.top+(o.clientTop+parseFloat(i.paddingTop))*e.y;s*=e.x,d*=e.y,f*=e.x,c*=e.y,s+=l,d+=r,n=getWindow(o),o=getFrameElement(n)}}return rectToClientRect({width:f,height:c,x:s,y:d})}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const l="fixed"===o,r=getDocumentElement(i),a=!!t&&isTopLayer(t.floating);if(i===r||a&&l)return n;let s={scrollLeft:0,scrollTop:0},d=createCoords(1);const f=createCoords(0),c=isHTMLElement(i);if((c||!c&&!l)&&(("body"!==getNodeName(i)||isOverflowElement(r))&&(s=getNodeScroll(i)),isHTMLElement(i))){const e=getBoundingClientRect(i);d=getScale(i),f.x=e.x+i.clientLeft,f.y=e.y+i.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-s.scrollLeft*d.x+f.x,y:n.y*d.y-s.scrollTop*d.y+f.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),i=e.ownerDocument.body,o=max(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=max(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+getWindowScrollBarX(e);const a=-n.scrollTop;return"rtl"===getComputedStyle(i).direction&&(r+=max(t.clientWidth,i.clientWidth)-o),{width:o,height:l,x:r,y:a}}function getViewportRect(e,t){const n=getWindow(e),i=getDocumentElement(e),o=n.visualViewport;let l=i.clientWidth,r=i.clientHeight,a=0,s=0;if(o){l=o.width,r=o.height;const e=isWebKit();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:l,height:r,x:a,y:s}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,"fixed"===t),i=n.top+e.clientTop,o=n.left+e.clientLeft,l=isHTMLElement(e)?getScale(e):createCoords(1),r=e.clientWidth*l.x,a=e.clientHeight*l.y,s=o*l.x,d=i*l.y;return{width:r,height:a,x:s,y:d}}function getClientRectFromClippingAncestor(e,t,n){let i;if("viewport"===t)i=getViewportRect(e,n);else if("document"===t)i=getDocumentRect(getDocumentElement(e));else if(isElement(t))i=getInnerBoundingClientRect(t,n);else{const n=getVisualOffsets(e);i={...t,x:t.x-n.x,y:t.y-n.y}}return rectToClientRect(i)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n!==t&&isElement(n)&&!isLastTraversableNode(n)&&("fixed"===getComputedStyle(n).position||hasFixedPositionAncestor(n,t))}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let i=getOverflowAncestors(e,[],!1).filter(e=>isElement(e)&&"body"!==getNodeName(e)),o=null;const l="fixed"===getComputedStyle(e).position;for(let n=l?getParentNode(e):e;isElement(n)&&!isLastTraversableNode(n);){const t=getComputedStyle(n),r=isContainingBlock(n);r||"fixed"!==t.position||(o=null);const a=l?!r&&!o:!r&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||isOverflowElement(n)&&!r&&hasFixedPositionAncestor(e,n);a?i=i.filter(e=>e!==n):o=t,n=getParentNode(n)}return t.set(e,i),i}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const l="clippingAncestors"===n?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),r=[...l,i],a=r[0],s=r.reduce((e,n)=>{const i=getClientRectFromClippingAncestor(t,n,o);return e.top=max(i.top,e.top),e.right=min(i.right,e.right),e.bottom=min(i.bottom,e.bottom),e.left=max(i.left,e.left),e},getClientRectFromClippingAncestor(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const i=isHTMLElement(t),o=getDocumentElement(t),l="fixed"===n,r=getBoundingClientRect(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const s=createCoords(0);if(i||!i&&!l)if(("body"!==getNodeName(t)||isOverflowElement(o))&&(a=getNodeScroll(t)),i){const e=getBoundingClientRect(t,!0,l,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=getWindowScrollBarX(o));let d=0,f=0;if(o&&!i&&!l){const e=o.getBoundingClientRect();f=e.top+a.scrollTop,d=e.left+a.scrollLeft-getWindowScrollBarX(o,e)}const c=r.left+a.scrollLeft-s.x-d,m=r.top+a.scrollTop-s.y-f;return{x:c,y:m,width:r.width,height:r.height}}function isStaticPositioned(e){return"static"===getComputedStyle(e).position}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||"fixed"===getComputedStyle(e).position)return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement(e)){for(let t=getParentNode(e);t&&!isLastTraversableNode(t);){if(isElement(t)&&!isStaticPositioned(t))return t;t=getParentNode(t)}return n}let i=getTrueOffsetParent(e,t);for(;i&&isTableElement(i)&&isStaticPositioned(i);)i=getTrueOffsetParent(i,t);return i&&isLastTraversableNode(i)&&isStaticPositioned(i)&&!isContainingBlock(i)?n:i||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,i=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function isRTL(e){return"rtl"===getComputedStyle(e).direction}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function observeMove(e,t){function n(){var e;clearTimeout(o),null==(e=l)||e.disconnect(),l=null}function i(a,s){function d(e){const t=e[0].intersectionRatio;if(t!==s){if(!w)return i();t?i(!1,t):o=setTimeout(()=>{i(!1,1e-7)},1e3)}w=!1}void 0===a&&(a=!1),void 0===s&&(s=1),n();const{left:f,top:c,width:m,height:g}=e.getBoundingClientRect();if(a||t(),!m||!g)return;const h=floor(c),p=floor(r.clientWidth-(f+m)),u=floor(r.clientHeight-(c+g)),x=floor(f),y={rootMargin:-h+"px "+-p+"px "+-u+"px "+-x+"px",threshold:max(0,min(1,s))||1};let w=!0;try{l=new IntersectionObserver(d,{...y,root:r.ownerDocument})}catch(t){l=new IntersectionObserver(d,y)}l.observe(e)}let o,l=null;const r=getDocumentElement(e);return i(!0),n}function autoUpdate(e,t,n,i){function o(){const t=getBoundingClientRect(e);u&&(t.x!==u.x||t.y!==u.y||t.width!==u.width||t.height!==u.height)&&n(),u=t,p=requestAnimationFrame(o)}void 0===i&&(i={});const{ancestorScroll:l=!0,ancestorResize:r=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:d=!1}=i,f=unwrapElement(e),c=l||r?[...(f?getOverflowAncestors(f):[]),...getOverflowAncestors(t)]:[];c.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),r&&e.addEventListener("resize",n)});const m=f&&s?observeMove(f,n):null;let g=-1,h=null;a&&(h=new ResizeObserver(e=>{let[i]=e;i&&i.target===f&&h&&(h.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),f&&!d&&h.observe(f),h.observe(t));let p,u=d?getBoundingClientRect(e):null;return d&&o(),n(),()=>{var e;c.forEach(e=>{l&&e.removeEventListener("scroll",n),r&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=h)||e.disconnect(),h=null,d&&cancelAnimationFrame(p)}}const offset$1=offset$2,autoPlacement$1=autoPlacement$2,shift$1=shift$2,flip$1=flip$2,size$1=size$2,hide=hide$1,arrow$2=arrow$3,computePosition=(e,t,n)=>{const i=new Map,o={platform,...n},l={...o.platform,_c:i};return computePosition$1(e,t,{...o,platform:l})};var index="undefined"==typeof document?useEffect:useLayoutEffect;function deepEqual(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,o,l;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;0!=o--;)if(!deepEqual(e[o],t[o]))return!1;return!0}if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!{}.hasOwnProperty.call(t,l[o]))return!1;for(o=n;0!=o--;){const n=l[o];if(!("_owner"===n&&e.$$typeof)&&!deepEqual(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){if("undefined"==typeof window)return 1;const t=e.ownerDocument.defaultView||window;return t.devicePixelRatio||1}function roundByDPR(e,t){const n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){const t=React.useRef(e);return index(()=>{t.current=e}),t}function useFloating(e){void 0===e&&(e={});const{placement:o="bottom",strategy:l="absolute",middleware:r=[],platform:t,elements:{reference:s,floating:d}={},transform:a=!0,whileElementsMounted:n,open:i}=e,[f,c]=React.useState({x:0,y:0,strategy:l,placement:o,middlewareData:{},isPositioned:!1}),[m,g]=React.useState(r);deepEqual(m,r)||g(r);const[h,p]=React.useState(null),[u,x]=React.useState(null),y=React.useCallback(e=>{e!==R.current&&(R.current=e,p(e))},[]),w=React.useCallback(e=>{e!==L.current&&(L.current=e,x(e))},[]),b=s||h,v=d||u,R=React.useRef(null),L=React.useRef(null),P=React.useRef(f),T=useLatestRef(n),A=useLatestRef(t),D=useLatestRef(i),E=React.useCallback(()=>{if(R.current&&L.current){const e={placement:o,strategy:l,middleware:m};A.current&&(e.platform=A.current),computePosition(R.current,L.current,e).then(e=>{const t={...e,isPositioned:!1!==D.current};S.current&&!deepEqual(P.current,t)&&(P.current=t,ReactDOM.flushSync(()=>{c(t)}))})}},[m,o,l,A,D]);index(()=>{!1===i&&P.current.isPositioned&&(P.current.isPositioned=!1,c(e=>({...e,isPositioned:!1})))},[i]);const S=React.useRef(!1);index(()=>(S.current=!0,()=>{S.current=!1}),[]),index(()=>{if(b&&(R.current=b),v&&(L.current=v),b&&v){if(T.current)return T.current(b,v,E);E()}},[b,v,E,T,null!=n]);const C=React.useMemo(()=>({reference:R,floating:L,setReference:y,setFloating:w}),[y,w]),O=React.useMemo(()=>({reference:b,floating:v}),[b,v]),H=React.useMemo(()=>{const e={position:l,left:0,top:0};if(!O.floating)return e;const t=roundByDPR(O.floating,f.x),n=roundByDPR(O.floating,f.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...(1.5<=getDPR(O.floating)&&{willChange:"transform"})}:{position:l,left:t,top:n}},[l,a,O.floating,f.x,f.y]);return React.useMemo(()=>({...f,update:E,refs:C,elements:O,floatingStyles:H}),[f,E,C,O,H])}const arrow$1=e=>{function t(e){return{}.hasOwnProperty.call(e,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:o}="function"==typeof e?e(n):e;return i&&t(i)?null==i.current?{}:arrow$2({element:i.current,padding:o}).fn(n):i?arrow$2({element:i,padding:o}).fn(n):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift=(e,t)=>({...shift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),autoPlacement=(e,t)=>({...autoPlacement$1(e),options:[e,t]}),arrow=(e,t)=>({...arrow$1(e),options:[e,t]});export{autoPlacement as a,shift as b,autoUpdate as c,offset$1 as d,flip$1 as e,flip as f,getOverflowAncestors as g,shift$1 as h,isElement as i,autoPlacement$1 as j,arrow as k,hide as l,offset as o,size as s,useFloating as u};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import*as React from"react";import React__default,{useRef,useEffect,useContext,createContext,useState,Fragment,useCallback,useMemo,useLayoutEffect,forwardRef,isValidElement}from"react";import{createPortal}from"react-dom";import{l as l$1,o,v as t,U as U$2,y as y$1,w as T,n,z as s,A as l$2,C,u,g as o$1,p,q as s$1,O,B as v$1,d,E as t$1,s as s$2,b as u$1}from"./keyboard-D0PLkOsr.js";import{u as useFloating$1,i as isElement,c as autoUpdate,d as offset,e as flip,h as shift,j as autoPlacement,k as arrow,l as hide}from"./floating-ui.react-dom-DFre3-Br.js";function f$1(){let a=useRef(!1);return l$1(()=>(a.current=!0,()=>{a.current=!1}),[]),a}function c$1(a){let b=o(a),c=useRef(!1);useEffect(()=>(c.current=!1,()=>{c.current=!0,t(()=>{c.current&&b()})}),[b])}let e=createContext(!1);function a(){return useContext(e)}function F(b){let c=a(),d=useContext(_),f=n(b),[e,g]=useState(()=>{if(!c&&null!==d||s.isServer)return null;let a=null==f?void 0:f.getElementById("headlessui-portal-root");if(a)return a;if(null===f)return null;let b=f.createElement("div");return b.setAttribute("id","headlessui-portal-root"),f.body.appendChild(b)});return useEffect(()=>{null!==e&&(null!=f&&f.body.contains(e)||null==f||f.body.appendChild(e))},[e,f]),useEffect(()=>{c||null!==d&&g(d.current)},[d,g,c]),e}let U$1=Fragment;function N(b,c){let d=useRef(null),e=y$1(T(a=>{d.current=a}),c),a=n(d),g=F(d),[h]=useState(()=>{var b;return s.isServer?null:null==(b=null==a?void 0:a.createElement("div"))?null:b}),j=useContext(f),i=l$2();return l$1(()=>{g&&h&&!g.contains(h)&&(h.setAttribute("data-headlessui-portal",""),g.appendChild(h))},[g,h]),l$1(()=>{if(h&&j)return j.register(h)},[j,h]),c$1(()=>{var a;g&&h&&(h instanceof Node&&g.contains(h)&&g.removeChild(h),0>=g.childNodes.length&&(null==(a=g.parentElement)||a.removeChild(g)))}),i?g&&h?createPortal(C({ourProps:{ref:e},theirProps:b,defaultTag:U$1,name:"Portal"}),h):null:null}let S$1=Fragment,_=createContext(null);function j(a,b){let{target:c,...d}=a,e={ref:y$1(b)};return React__default.createElement(_.Provider,{value:c},C({ourProps:e,theirProps:d,defaultTag:S$1,name:"Popover.Group"}))}let f=createContext(null),D$1=U$2(N),I$1=U$2(j),te=Object.assign(D$1,{Group:I$1});function c(){let b=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,[a,c]=useState(b),d=f$1(),e=useCallback(a=>{d.current&&c(b=>b|a)},[a,d]),f=useCallback(b=>!!(a&b),[a]),h=useCallback(a=>{d.current&&c(b=>b&~a)},[c,d]),i=useCallback(a=>{d.current&&c(b=>b^a)},[c]);return{flags:a,addFlag:e,hasFlag:f,removeFlag:h,toggleFlag:i}}function l(a){let b={called:!1};return function(){if(!b.called)return b.called=!0,a(...arguments)}}function g(a){for(var b=arguments.length,c=Array(1<b?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];a&&0<c.length&&a.classList.add(...c)}function v(a){for(var b=arguments.length,c=Array(1<b?b-1:0),d=1;d<b;d++)c[d-1]=arguments[d];a&&0<c.length&&a.classList.remove(...c)}function b(b,c){let d=o$1();if(!b)return d.dispose;let{transitionDuration:e,transitionDelay:f}=getComputedStyle(b),[a,g]=[e,f].map(a=>{let[b=0]=a.split(",").filter(Boolean).map(a=>a.includes("ms")?parseFloat(a):1e3*parseFloat(a)).sort((a,b)=>b-a);return b}),h=a+g;if(0!==h){d.group(a=>{a.setTimeout(()=>{c(),a.dispose()},h),a.addEventListener(b,"transitionrun",b=>{b.target===b.currentTarget&&a.dispose()})});let a=d.addEventListener(b,"transitionend",b=>{b.target===b.currentTarget&&(c(),a())})}else c();return d.add(()=>c()),d.dispose}function M$1(c,d,e,f){let h=e?"enter":"leave",a=o$1(),i=void 0===f?()=>{}:l(f);"enter"==h&&(c.removeAttribute("hidden"),c.style.display="");let j=u(h,{enter:()=>d.enter,leave:()=>d.leave}),k=u(h,{enter:()=>d.enterTo,leave:()=>d.leaveTo}),m=u(h,{enter:()=>d.enterFrom,leave:()=>d.leaveFrom});return v(c,...d.base,...d.enter,...d.enterTo,...d.enterFrom,...d.leave,...d.leaveFrom,...d.leaveTo,...d.entered),g(c,...d.base,...j,...m),a.nextFrame(()=>{v(c,...d.base,...j,...m),g(c,...d.base,...j,...k),b(c,()=>(v(c,...d.base,...j),g(c,...d.base,...d.entered),i()))}),a.dispose}function D(b){let{immediate:f,container:g,direction:h,classes:j,onStart:k,onStop:a}=b,c=f$1(),l=p(),d=s$1(h);l$1(()=>{f&&(d.current="enter")},[f]),l$1(()=>{let b=o$1();l.add(b.dispose);let e=g.current;if(e&&"idle"!==d.current&&c.current)return b.dispose(),k.current(d.current),b.add(M$1(e,j.current,"enter"===d.current,()=>{b.dispose(),a.current(d.current)})),b.dispose},[h])}function S(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return a.split(/\s+/).filter(a=>1<a.length)}let I=createContext(null);I.displayName="TransitionContext";var Se=(a=>(a.Visible="visible",a.Hidden="hidden",a))(Se||{});function ye(){let a=useContext(I);if(null===a)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return a}function xe(){let a=useContext(M);if(null===a)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return a}let M=createContext(null);M.displayName="NestingContext";function U(a){return"children"in a?U(a.children):0<a.current.filter(a=>{let{el:b}=a;return null!==b.current}).filter(a=>{let{state:b}=a;return"visible"===b}).length}function se(a,b){let c=s$1(a),f=useRef([]),e=f$1(),j=p(),k=o(function(b){let d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:v$1.Hidden,g=f.current.findIndex(a=>{let{el:c}=a;return c===b});-1!==g&&(u(d,{[v$1.Unmount](){f.current.splice(g,1)},[v$1.Hidden](){f.current[g].state="hidden"}}),j.microTask(()=>{var a;!U(f)&&e.current&&(null==(a=c.current)||a.call(c))}))}),l=o(b=>{let a=f.current.find(c=>{let{el:d}=c;return d===b});return a?"visible"!==a.state&&(a.state="visible"):f.current.push({el:b,state:"visible"}),()=>k(b,v$1.Unmount)}),m=useRef([]),h=useRef(Promise.resolve()),n=useRef({enter:[],leave:[],idle:[]}),q=o((c,d,e)=>{m.current.splice(0),b&&(b.chains.current[d]=b.chains.current[d].filter(a=>{let[b]=a;return b!==c})),null==b||b.chains.current[d].push([c,new Promise(a=>{m.current.push(a)})]),null==b||b.chains.current[d].push([c,new Promise(a=>{Promise.all(n.current[d].map(a=>{let[b,c]=a;return c})).then(()=>a())})]),"enter"===d?h.current=h.current.then(()=>null==b?void 0:b.wait.current).then(()=>e(d)):e(d)}),g=o((b,c,d)=>{Promise.all(n.current[c].splice(0).map(a=>{let[b,c]=a;return c})).then(()=>{var a;null==(a=m.current.shift())||a()}).then(()=>d(c))});return useMemo(()=>({children:f,register:l,unregister:k,onStart:q,onStop:g,wait:h,chains:n}),[l,k,f,q,g,n,h])}function Ne(){}let Pe$1=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function ae(a){var b;let c={};for(let d of Pe$1)c[d]=null==(b=a[d])?Ne:b;return c}function Re(a){let b=useRef(ae(a));return useEffect(()=>{b.current=ae(a)},[a]),b}let De$1="div",le=O.RenderStrategy;function He(b,m){var n,q;let{beforeEnter:t,afterEnter:r,beforeLeave:s,afterLeave:y,enter:A,enterFrom:p,enterTo:x,entered:h,leave:v,leaveFrom:E,leaveTo:g,...F}=b,i=useRef(null),e=y$1(i,m),a=null==(n=F.unmount)||n?v$1.Unmount:v$1.Hidden,{show:I,appear:f,initial:J}=ye(),[N,l]=useState(I?"visible":"hidden"),j=xe(),{register:z,unregister:L}=j;useEffect(()=>z(i),[z,i]),useEffect(()=>{if(a===v$1.Hidden&&i.current)return I&&"visible"!==N?void l("visible"):u(N,{hidden:()=>L(i),visible:()=>z(i)})},[N,i,z,L,I,a]);let O=s$1({base:S(F.className),enter:S(A),enterFrom:S(p),enterTo:S(x),entered:S(h),leave:S(v),leaveFrom:S(E),leaveTo:S(g)}),k=Re({beforeEnter:t,afterEnter:r,beforeLeave:s,afterLeave:y}),R=l$2();useEffect(()=>{if(R&&"visible"===N&&null===i.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[i,N,R]);let G=f&&I&&J,K=(()=>!R||J&&!f?"idle":I?"enter":"leave")(),T=c(0),H=o(a=>u(a,{enter:()=>{T.addFlag(d.Opening),k.current.beforeEnter()},leave:()=>{T.addFlag(d.Closing),k.current.beforeLeave()},idle:()=>{}})),V=o(a=>u(a,{enter:()=>{T.removeFlag(d.Opening),k.current.afterEnter()},leave:()=>{T.removeFlag(d.Closing),k.current.afterLeave()},idle:()=>{}})),W=se(()=>{l("hidden"),L(i)},j),w=useRef(!1);D({immediate:G,container:i,classes:O,direction:K,onStart:s$1(a=>{w.current=!0,W.onStart(i,a,H)}),onStop:s$1(a=>{w.current=!1,W.onStop(i,a,V),"leave"!==a||U(W)||(l("hidden"),L(i))})});let B=F;return G?B={...B,className:t$1(F.className,...O.current.enter,...O.current.enterFrom)}:w.current&&(B.className=t$1(F.className,null==(q=i.current)?void 0:q.className),""===B.className&&delete B.className),React__default.createElement(M.Provider,{value:W},React__default.createElement(s$2,{value:u(N,{visible:d.Open,hidden:d.Closed})|T.flags},C({ourProps:{ref:e},theirProps:B,defaultTag:De$1,features:le,visible:"visible"===N,name:"Transition.Child"})))}function Fe$1(b,c){let{show:j,appear:l=!1,unmount:m=!0,...k}=b,n=useRef(null),p=y$1(n,c);l$2();let q=u$1();if(void 0===j&&null!==q&&(j=(q&d.Open)===d.Open),![!0,!1].includes(j))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[h,s]=useState(j?"visible":"hidden"),t=se(()=>{s("hidden")}),[g,u]=useState(!0),i=useRef([j]);l$1(()=>{!1!==g&&i.current[i.current.length-1]!==j&&(i.current.push(j),u(!1))},[i,j]);let e=useMemo(()=>({show:j,appear:l,initial:g}),[j,l,g]);useEffect(()=>{if(j)s("visible");else if(!U(t))s("hidden");else{let a=n.current;if(!a)return;let b=a.getBoundingClientRect();0===b.x&&0===b.y&&0===b.width&&0===b.height&&s("hidden")}},[j,t]);let a={unmount:m},v=o(()=>{var a;g&&u(!1),null==(a=b.beforeEnter)||a.call(b)}),f=o(()=>{var a;g&&u(!1),null==(a=b.beforeLeave)||a.call(b)});return React__default.createElement(M.Provider,{value:t},React__default.createElement(I.Provider,{value:e},C({ourProps:{...a,as:Fragment,children:React__default.createElement(ue,{ref:p,...a,...k,beforeEnter:v,beforeLeave:f})},theirProps:{},defaultTag:Fragment,features:le,visible:"visible"===h,name:"Transition"})))}function _e(a,b){let c=null!==useContext(I),d=null!==u$1();return React__default.createElement(React__default.Fragment,null,!c&&d?React__default.createElement(q,{ref:b,...a}):React__default.createElement(ue,{ref:b,...a}))}let q=U$2(Fe$1),ue=U$2(He),Le=U$2(_e),qe=Object.assign(q,{Child:Le,Root:q});const SafeReact={...React},useInsertionEffect=SafeReact.useInsertionEffect,useSafeInsertionEffect=useInsertionEffect||(a=>a());function useEffectEvent(a){const b=React.useRef(()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")});return useSafeInsertionEffect(()=>{b.current=a}),React.useCallback(function(){for(var a=arguments.length,c=Array(a),d=0;d<a;d++)c[d]=arguments[d];return null==b.current?void 0:b.current(...c)},[])}var index="undefined"==typeof document?useEffect:useLayoutEffect;let serverHandoffComplete=!1,count=0;const genId=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+count++;function useFloatingId(){const[a,b]=React.useState(()=>serverHandoffComplete?genId():void 0);return index(()=>{null==a&&b(genId())},[]),React.useEffect(()=>{serverHandoffComplete=!0},[]),a}const useReactId=SafeReact.useId,useId=useReactId||useFloatingId;let devMessageSet;"production"!==process.env.NODE_ENV&&(devMessageSet=new Set);function error(){for(var a,b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];const e="Floating UI: "+c.join(" ");if(!(null!=(a=devMessageSet)&&a.has(e))){var f;null==(f=devMessageSet)||f.add(e),console.error(e)}}function createPubSub(){const a=new Map;return{emit(b,c){var d;null==(d=a.get(b))||d.forEach(a=>a(c))},on(b,c){a.set(b,[...(a.get(b)||[]),c])},off(b,c){var d;a.set(b,(null==(d=a.get(b))?void 0:d.filter(a=>a!==c))||[])}}}const FloatingNodeContext=React.createContext(null),FloatingTreeContext=React.createContext(null),useFloatingParentNodeId=()=>{var a;return(null==(a=React.useContext(FloatingNodeContext))?void 0:a.id)||null},useFloatingTree=()=>React.useContext(FloatingTreeContext);function useFloatingRootContext(a){const{open:d=!1,onOpenChange:b,elements:c}=a,e=useId(),f=React.useRef({}),[g]=React.useState(()=>createPubSub()),h=null!=useFloatingParentNodeId();if("production"!==process.env.NODE_ENV){const a=c.reference;a&&!isElement(a)&&error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[i,j]=React.useState(c.reference),k=useEffectEvent((a,c,d)=>{f.current.openEvent=a?c:void 0,g.emit("openchange",{open:a,event:c,reason:d,nested:h}),null==b||b(a,c,d)}),l=React.useMemo(()=>({setPositionReference:j}),[]),m=React.useMemo(()=>({reference:i||c.reference||null,floating:c.floating||null,domReference:c.reference}),[i,c.reference,c.floating]);return React.useMemo(()=>({dataRef:f,open:d,onOpenChange:k,elements:m,events:g,floatingId:e,refs:l}),[d,k,m,g,e,l])}function useFloating(a){void 0===a&&(a={});const{nodeId:b}=a,c=useFloatingRootContext({...a,elements:{reference:null,floating:null,...a.elements}}),d=a.rootContext||c,e=d.elements,[f,g]=React.useState(null),[h,i]=React.useState(null),j=null==e?void 0:e.domReference,k=j||f,l=React.useRef(null),m=useFloatingTree();index(()=>{k&&(l.current=k)},[k]);const n=useFloating$1({...a,elements:{...e,...(h&&{reference:h})}}),o=React.useCallback(a=>{const b=isElement(a)?{getBoundingClientRect:()=>a.getBoundingClientRect(),contextElement:a}:a;i(b),n.refs.setReference(b)},[n.refs]),p=React.useCallback(a=>{(isElement(a)||null===a)&&(l.current=a,g(a)),(isElement(n.refs.reference.current)||null===n.refs.reference.current||null!==a&&!isElement(a))&&n.refs.setReference(a)},[n.refs]),q=React.useMemo(()=>({...n.refs,setReference:p,setPositionReference:o,domReference:l}),[n.refs,p,o]),r=React.useMemo(()=>({...n.elements,domReference:k}),[n.elements,k]),s=React.useMemo(()=>({...n,...d,refs:q,elements:r,nodeId:b}),[n,q,r,b,d]);return index(()=>{d.dataRef.current.floatingContext=s;const a=null==m?void 0:m.nodesRef.current.find(a=>a.id===b);a&&(a.context=s)}),React.useMemo(()=>({...n,context:s,refs:q,elements:r}),[n,q,r,s])}var et,Vt=Object.defineProperty,Nt=(a,b,c)=>b in a?Vt(a,b,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[b]=c,Pe=(a,b,c)=>Nt(a,"symbol"==typeof b?b:b+"",c),Fe={exports:{}},re={};function rr(){function a(a,h,i){var j,k={},l=null,m=null;for(j in void 0!==i&&(l=""+i),void 0!==h.key&&(l=""+h.key),void 0!==h.ref&&(m=h.ref),h)b.call(h,j)&&!g.hasOwnProperty(j)&&(k[j]=h[j]);if(a&&a.defaultProps)for(j in h=a.defaultProps,h)void 0===k[j]&&(k[j]=h[j]);return{$$typeof:c,type:a,key:l,ref:m,props:k,_owner:e.current}}if(et)return re;et=1;var c=Symbol.for("react.element"),b=Object.prototype.hasOwnProperty,e=React__default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};return re.Fragment=Symbol.for("react.fragment"),re.jsx=a,re.jsxs=a,re}var tt,ne={};function nr(){return tt||(tt=1,"production"!==process.env.NODE_ENV&&function(){function a(a){if(null===a||"object"!=typeof a)return null;var c=b&&a[b]||a["@@iterator"];return"function"==typeof c?c:null}function j(b){{for(var d=arguments.length,e=Array(1<d?d-1:0),a=1;a<d;a++)e[a-1]=arguments[a];h("error",b,e)}}function h(b,d,e){{var f=E.ReactDebugCurrentFrame,c=f.getStackAddendum();""!==c&&(d+="%s",e=e.concat([c]));var g=e.map(function(a){return a+""});g.unshift("Warning: "+d),Function.prototype.apply.call(console[b],console,g)}}function t(a){return!!("string"==typeof a||"function"==typeof a||a===n||a===s||!1||a===r||a===d||a===w||!1||a===R||!1||!1||!1||"object"==typeof a&&null!==a&&(a.$$typeof===v||a.$$typeof===f||a.$$typeof===l||a.$$typeof===u||a.$$typeof===g||a.$$typeof===ca||void 0!==a.getModuleId))}function k(b,d,e){var a=b.displayName;if(a)return a;var c=d.displayName||d.name||"";return""===c?e:e+"("+c+")"}function q(a){return a.displayName||"Context"}function y(b){if(null==b)return null;if("number"==typeof b.tag&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof b)return b.displayName||b.name||null;if("string"==typeof b)return b;switch(b){case n:return"Fragment";case o:return"Portal";case s:return"Profiler";case r:return"StrictMode";case d:return"Suspense";case w:return"SuspenseList"}if("object"==typeof b)switch(b.$$typeof){case u:var e=b;return q(e)+".Consumer";case l:var h=b;return q(h._context)+".Provider";case g:return k(b,b.render,"ForwardRef");case f:var a=b.displayName||null;return null===a?y(b.type)||"Memo":a;case v:{var c=b,i=c._payload,p=c._init;try{return y(p(i))}catch{return null}}}return null}function c(){}function A(){{if(0===M){D=console.log,ea=console.info,fa=console.warn,ga=console.error,ha=console.group,ia=console.groupCollapsed,ja=console.groupEnd;var a={configurable:!0,enumerable:!0,value:c,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}M++}}function e(){{if(M--,0==M){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ka({},a,{value:D}),info:ka({},a,{value:ea}),warn:ka({},a,{value:fa}),error:ka({},a,{value:ga}),group:ka({},a,{value:ha}),groupCollapsed:ka({},a,{value:ia}),groupEnd:ka({},a,{value:ja})})}0>M&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}function B(b,d,e){{if(void 0===la)try{throw Error()}catch(b){var a=b.stack.trim().match(/\n( *(at )?)/);la=a&&a[1]||""}return`
|
|
2
|
+
`+la+b}}function m(b,d){if(!b||oa)return"";{var f=ma.get(b);if(void 0!==f)return f}var a;oa=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var i;i=na.current,na.current=null,A();try{if(d){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(j,[])}catch(b){a=b}Reflect.construct(b,[],j)}else{try{j.call()}catch(b){a=b}b.call(j.prototype)}}else{try{throw Error()}catch(b){a=b}b()}}catch(c){if(c&&a&&"string"==typeof c.stack){for(var l=c.stack.split(`
|
|
3
|
+
`),h=a.stack.split(`
|
|
4
|
+
`),m=l.length-1,n=h.length-1;1<=m&&0<=n&&l[m]!==h[n];)n--;for(;1<=m&&0<=n;m--,n--)if(l[m]!==h[n]){if(1!==m||1!==n)do if(m--,n--,0>n||l[m]!==h[n]){var k=`
|
|
5
|
+
`+l[m].replace(" at new "," at ");return b.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",b.displayName)),"function"==typeof b&&ma.set(b,k),k}while(1<=m&&0<=n);break}}}finally{oa=!1,na.current=i,e(),Error.prepareStackTrace=g}var o=b?b.displayName||b.name:"",p=o?B(o):"";return"function"==typeof b&&ma.set(b,p),p}function C(b,c,d){return m(b,!1)}function F(a){var b=a.prototype;return!!(b&&b.isReactComponent)}function H(b,e,h){if(null==b)return"";if("function"==typeof b)return m(b,F(b));if("string"==typeof b)return B(b);switch(b){case d:return B("Suspense");case w:return B("SuspenseList")}if("object"==typeof b)switch(b.$$typeof){case g:return C(b.render);case f:return H(b.type,e,h);case v:{var a=b,c=a._payload,i=a._init;try{return H(i(c),e,h)}catch{}}}return""}function x(b){if(b){var c=b._owner,d=H(b.type,b._source,c?c.type:null);va.setExtraStackFrame(d)}else va.setExtraStackFrame(null)}function p(b,d,e,a,c){{var f=Function.call.bind(ta);for(var g in b)if(f(b,g)){var i=void 0;try{if("function"!=typeof b[g]){var k=Error((a||"React class")+": "+e+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof b[g]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}i=b[g](d,g,a,e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(a){i=a}i&&!(i instanceof Error)&&(x(c),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",e,g,typeof i),x(null)),i instanceof Error&&!(i.message in ua)&&(ua[i.message]=!0,x(c),j("Failed %s type: %s",e,i.message),x(null))}}}function J(a){return wa(a)}function i(b){{var c="function"==typeof Symbol&&Symbol.toStringTag,d=c&&b[Symbol.toStringTag]||b.constructor.name||"Object";return d}}function I(a){try{return K(a),!1}catch{return!0}}function K(a){return""+a}function L(a){if(I(a))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",i(a)),K(a)}function N(a){if(ta.call(a,"ref")){var b=Object.getOwnPropertyDescriptor(a,"ref").get;if(b&&b.isReactWarning)return!1}return void 0!==a.ref}function O(a){if(ta.call(a,"key")){var b=Object.getOwnPropertyDescriptor(a,"key").get;if(b&&b.isReactWarning)return!1}return void 0!==a.key}function P(b,c){if("string"==typeof b.ref&&xa.current&&c&&xa.current.stateNode!==c){var d=y(xa.current.type);sa[d]||(j("Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref",y(xa.current.type),b.ref),sa[d]=!0)}}function Q(b,c){{var d=function(){qa||(qa=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",c))};d.isReactWarning=!0,Object.defineProperty(b,"key",{get:d,configurable:!0})}}function S(b,c){{var d=function(){ra||(ra=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",c))};d.isReactWarning=!0,Object.defineProperty(b,"ref",{get:d,configurable:!0})}}function V(b,d,e,a,c){{var f,g={},i=null,j=null;for(f in void 0!==e&&(L(e),i=""+e),O(d)&&(L(d.key),i=""+d.key),N(d)&&(j=d.ref,P(d,c)),d)ta.call(d,f)&&!ya.hasOwnProperty(f)&&(g[f]=d[f]);if(b&&b.defaultProps){var k=b.defaultProps;for(f in k)void 0===g[f]&&(g[f]=k[f])}if(i||j){var l="function"==typeof b?b.displayName||b.name||"Unknown":b;i&&Q(g,l),j&&S(g,l)}return Aa(b,i,j,c,a,xa.current,g)}}function T(b){if(b){var c=b._owner,d=H(b.type,b._source,c?c.type:null);Ca.setExtraStackFrame(d)}else Ca.setExtraStackFrame(null)}function U(a){return"object"==typeof a&&null!==a&&a.$$typeof===da}function W(){{if(Ba.current){var a=y(Ba.current.type);if(a)return`
|
|
6
|
+
|
|
7
|
+
Check the render method of \``+a+"`."}return""}}function X(a){return""}function Y(b){{var c=W();if(!c){var d="string"==typeof b?b:b.displayName||b.name;d&&(c=`
|
|
8
|
+
|
|
9
|
+
Check the top-level render call using <`+d+">.")}return c}}function Z(b,d){{if(!b._store||b._store.validated||null!=b.key)return;b._store.validated=!0;var e=Y(d);if(Da[e])return;Da[e]=!0;var a="";b&&b._owner&&b._owner!==Ba.current&&(a=" It was passed a child from "+y(b._owner.type)+"."),T(b),j("Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.",e,a),T(null)}}function $(b,d){{if("object"!=typeof b)return;if(J(b))for(var e,f=0;f<b.length;f++)e=b[f],U(e)&&Z(e,d);else if(U(b))b._store&&(b._store.validated=!0);else if(b){var g=a(b);if("function"==typeof g&&g!==b.entries)for(var h,i=g.call(b);!(h=i.next()).done;)U(h.value)&&Z(h.value,d)}}}function _(b){{var d=b.type;if(null==d||"string"==typeof d)return;var e;if("function"==typeof d)e=d.propTypes;else if("object"==typeof d&&(d.$$typeof===g||d.$$typeof===f))e=d.propTypes;else return;if(e){var h=y(d);p(e,b.props,"prop",h,b)}else if(void 0!==d.PropTypes&&!za){za=!0;var c=y(d);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",c||"Unknown")}"function"!=typeof d.getDefaultProps||d.getDefaultProps.isReactClassApproved||j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function aa(b){{for(var d,e=Object.keys(b.props),f=0;f<e.length;f++)if(d=e[f],"children"!==d&&"key"!==d){T(b),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",d),T(null);break}null!==b.ref&&(T(b),j("Invalid attribute `ref` supplied to `React.Fragment`."),T(null))}}function ba(b,d,e,a,c,f){{var g=t(b);if(!g){var i="";(void 0===b||"object"==typeof b&&null!==b&&0===Object.keys(b).length)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var l=X();i+=l?l:W();var m;null===b?m="null":J(b)?m="array":void 0!==b&&b.$$typeof===da?(m="<"+(y(b.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):m=typeof b,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,i)}var o=V(b,d,e,c,f);if(null==o)return o;if(g){var p=d.children;if(void 0!==p)if(!a)$(p,b);else if(J(p)){for(var r=0;r<p.length;r++)$(p[r],b);Object.freeze&&Object.freeze(p)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.")}if(ta.call(d,"key")){var s=y(b),u=Object.keys(d).filter(function(a){return"key"!==a}),k=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}";if(!Ea[s+k]){var v=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
|
|
10
|
+
let props = %s;
|
|
11
|
+
<%s {...props} />
|
|
12
|
+
React keys must be passed directly to JSX without using spread:
|
|
13
|
+
let props = %s;
|
|
14
|
+
<%s key={someKey} {...props} />`,k,s,v,s),Ea[s+k]=!0}}return b===n?aa(o):_(o),o}}var ca,da=Symbol.for("react.element"),o=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b=Symbol.iterator,E=React__default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ca=Symbol.for("react.module.reference");var D,ea,fa,ga,ha,ia,ja,ka=Object.assign,M=0;c.__reactDisabledLog=!0;var la,ma,na=E.ReactCurrentDispatcher,oa=!1;{var pa="function"==typeof WeakMap?WeakMap:Map;ma=new pa}var qa,ra,sa,ta=Object.prototype.hasOwnProperty,ua={},va=E.ReactDebugCurrentFrame,wa=Array.isArray,xa=E.ReactCurrentOwner,ya={key:!0,ref:!0,__self:!0,__source:!0};sa={};var za,Aa=function(b,d,e,a,c,f,g){var i={$$typeof:da,type:b,key:d,ref:e,props:g,_owner:f};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:c}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i},Ba=E.ReactCurrentOwner,Ca=E.ReactDebugCurrentFrame;za=!1;var Da={},Ea={};ne.Fragment=n,ne.jsx=function a(b,c,d){return ba(b,c,d,!1)},ne.jsxs=function a(b,c,d){return ba(b,c,d,!0)}}()),ne}Fe.exports="production"===process.env.NODE_ENV?rr():nr();var y=Fe.exports;function ir(a){return"u"<typeof window?1:(a.ownerDocument.defaultView||window).devicePixelRatio||1}function rt(a,b){const c=ir(a);return Math.round(b*c)/c}class or{constructor(){Pe(this,"current",this.detect()),Pe(this,"currentId",0)}set(a){this.current!==a&&(this.currentId=0,this.current=a)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"u"<typeof window||"u"<typeof document?"server":"client"}}const ie=new or,ot=(a,b)=>{ie.isServer?useEffect(a,b):useLayoutEffect(a,b)},Oe={serverHandoffComplete:!1};function ar(){const[a,b]=useState(Oe.serverHandoffComplete);return useEffect(()=>{!0!==a&&b(!0)},[a]),useEffect(()=>{!1===Oe.serverHandoffComplete&&(Oe.serverHandoffComplete=!0)},[]),a}const sr=React__default.useId??function(){const a=ar(),[b,c]=React__default.useState(a?()=>ie.nextId():null);return ot(()=>{null===b&&c(ie.nextId())},[b]),null==b?void 0:`${b}`};function ur(a,b,c,d){useEffect(()=>{const e=[];("number"==typeof d.offset||"object"==typeof d.offset||"function"==typeof d.offset)&&e.push(offset(d.offset)),(!0===d.flip||"number"==typeof d.flip||"object"==typeof d.flip)&&e.push(flip({padding:"number"==typeof d.flip?d.flip:void 0,...("object"==typeof d.flip?d.flip:{})})),(!0===d.shift||"number"==typeof d.shift||"object"==typeof d.shift)&&e.push(shift({padding:"number"==typeof d.shift?d.shift:void 0,...("object"==typeof d.shift?d.shift:{})})),(!0===d.autoPlacement||"object"==typeof d.autoPlacement)&&e.push(autoPlacement("object"==typeof d.autoPlacement?d.autoPlacement:void 0)),e.push(...("function"==typeof d.middleware?d.middleware({referenceEl:b.reference,floatingEl:b.floating}):d.middleware||[])),(!0===d.arrow||"number"==typeof d.arrow)&&e.push(arrow({element:c,padding:!0===d.arrow?0:d.arrow})),(!0===d.hide||"object"==typeof d.hide||Array.isArray(d.hide))&&(Array.isArray(d.hide)?d.hide:[d.hide]).forEach(a=>{e.push(hide("object"==typeof a?a:void 0))}),a(e)},[d.offset,d.shift,d.flip,d.arrow,d.autoPlacement,d.hide,d.middleware])}function cr(a,b,c){useEffect(()=>{if(a&&ie.isClient&&"u">typeof ResizeObserver&&b.current&&b.current instanceof Element){const a=new ResizeObserver(a=>{let[b]=a;const d=b.borderBoxSize.reduce((a,b)=>{let{inlineSize:c}=b;return a+c},0);c(d)});return a.observe(b.current),()=>{a.disconnect(),c(null)}}},[])}const lr=a=>"top"===a?"origin-bottom":"bottom"===a?"origin-top":"left"===a?"origin-right":"right"===a?"origin-left":"top-start"===a||"right-end"===a?"origin-bottom-left":"top-end"===a||"left-end"===a?"origin-bottom-right":"right-start"===a||"bottom-start"===a?"origin-top-left":"left-start"===a||"bottom-end"===a?"origin-top-right":"origin-center";function fr(a,b){return useMemo(()=>"function"==typeof a.originClass?a.originClass(b):"string"==typeof a.originClass?a.originClass:a.tailwindcssOriginClass?lr(b):"",[b,a.originClass,a.tailwindcssOriginClass])}function at(a,b){if(a in b){const f=b[a];for(var c=arguments.length,d=Array(2<c?c-2:0),e=2;e<c;e++)d[e-2]=arguments[e];return"function"==typeof f?f(...d):f}const f=new Error(`Tried to handle "${a}" but there is no handler defined. Only defined handlers are: ${Object.keys(b).map(a=>`"${a}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(f,at),f}function st(a){return ie.isServer?null:a instanceof Node?a.ownerDocument:a&&Object.prototype.hasOwnProperty.call(a,"current")&&a.current instanceof Node?a.current.ownerDocument:document}const nt=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map("test"===process.env.NODE_ENV?a=>`${a}:not([tabindex='-1']):not([style*='display: none'])`:a=>`${a}:not([tabindex='-1'])`).join(",");var ut=(a=>(a[a.Strict=0]="Strict",a[a.Loose=1]="Loose",a))(ut||{});function dr(a){let b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0;var c;return a!==(null==(c=st(a))?void 0:c.body)&&at(b,{0(){return a.matches(nt)},1(){for(let b=a;null!==b;){if(b.matches(nt))return!0;b=b.parentElement}return!1}})}function vr(a){const b=useRef(a);return ot(()=>{b.current=a},[a]),b}function $(a,b,c){const d=vr(b);useEffect(()=>{function b(a){d.current(a)}return document.addEventListener(a,b,c),()=>document.removeEventListener(a,b,c)},[a,c])}function hr(a,b){function c(c,f){if(e.current&&!c.defaultPrevented){const e=function b(a){return"function"==typeof a?b(a()):Array.isArray(a)||a instanceof Set?a:[a]}(a),d=f(c);if(null!==d&&d.getRootNode().contains(d)){for(const a of e){if(null===a)continue;const b=a instanceof HTMLElement?a:a.current;if(null!=b&&b.contains(d)||c.composed&&c.composedPath().includes(b))return}return(!dr(d,ut.Loose)&&-1!==d.tabIndex&&c.preventDefault(),b(c,d))}}}let d=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];const e=useRef(!1);useEffect("test"===process.env.NODE_ENV?()=>{e.current=d}:()=>{requestAnimationFrame(()=>{e.current=d})},[d]);const f=useRef(null);$("mousedown",a=>{var b,c;e.current&&(f.current=(null==(c=null==(b=a.composedPath)?void 0:b.call(a))?void 0:c[0])||a.target)},!0),$("click",a=>{f.current&&(c(a,()=>f.current),f.current=null)},!0),$("blur",a=>c(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}const de=new Map,De=createContext(null);De.displayName="ReferenceContext";const Ie=createContext(null);Ie.displayName="FloatingContext";const oe=createContext(null);oe.displayName="ArrowContext";function ct(a){const b=useContext(De);if(null===b){const b=new Error(`<${a} /> is missing a parent <Float /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(b,ct),b}return b}function lt(a){const b=useContext(Ie);if(null===b){const b=new Error(`<${a} /> is missing a parent <Float /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(b,lt),b}return b}function ft(a){const b=useContext(oe);if(null===b){const b=new Error(`<${a} /> is missing a parent <Float /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(b,ft),b}return b}function dt(a,b,c,d){let{key:e,...f}=c;const{referenceRef:h}=d,i=b;if(i.as===Fragment)return y.jsx(a.type,{...a.props,...f,ref:h},e);const j=i.as||"div";return y.jsx(j,{...f,ref:h,children:y.jsx(a.type,{...a.props})},e)}function $e(a,c,e,h){function i(a){return b.portal?p.current?y.jsx(te,{children:a}):y.jsx(Fragment,{}):a}function j(a){const c={...v,...n,ref:o};if(a.type===Fragment)return y.jsx(Fragment,{});if(b.as===Fragment)return y.jsx(a.type,{...a.props,...c},m);const d=b.as||"div";return y.jsx(d,{...c,children:y.jsx(a.type,{...a.props})},m)}function k(){return p.current?b.transitionChild?y.jsx(qe.Child,{as:Fragment,...u,children:y.jsx(a.type,{...a.props})}):y.jsx(qe,{as:Fragment,...u,children:y.jsx(a.type,{...a.props})}):y.jsx(Fragment,{})}let{key:m,...n}=e;const{floatingRef:o,props:l,mounted:p,setShow:g,referenceHidden:d,escaped:q,placement:f,floatingStyles:r,referenceElWidth:s}=h,b={...l,...c},t=fr(b,f),u={show:!!p.current&&b.show,unmount:!1!==a.props.unmount&&void 0,enter:`${b.enter||""} ${t}`,enterFrom:`${b.enterFrom||""}`,enterTo:`${b.enterTo||""}`,leave:`${b.leave||""} ${t}`,leaveFrom:`${b.leaveFrom||""}`,leaveTo:`${b.leaveTo||""}`,beforeEnter:()=>{g(!0)},afterLeave:()=>{g(!1)}},v={className:[d?b.referenceHiddenClass:void 0,q?b.escapedClass:void 0].filter(a=>!!a).join(" "),style:{...r,zIndex:b.zIndex||9999}};if(b.adaptiveWidth&&"number"==typeof s){const a={attribute:"width",...("object"==typeof b.adaptiveWidth?b.adaptiveWidth:{})};v.style[a.attribute]=`${s}px`}return i(j(k()))}function vt(a,c){let[e,h]=a;var i,k;const m=sr(),n=useRef(!1),[o,l]=useState(),[p,g]=useState(void 0),[d,q]=useState(void 0),f=useRef(null),r=useMemo(()=>({show:c.onShow||(()=>{}),hide:c.onHide||(()=>{}),update:c.onUpdate||(()=>{})}),[c.onShow,c.onHide,c.onUpdate]),{placement:s,update:b,refs:t,floatingStyles:u,isPositioned:v,middlewareData:w}=useFloating({placement:c.placement||"bottom-start",strategy:c.strategy,middleware:o,transform:!c.dialog&&(c.transform??!1)}),[x,y]=useState(null);useEffect(()=>{n.current=!0},[]),useEffect(()=>{e&&!de.get(m)?(de.set(m,!0),r.show()):!e&&de.get(m)&&(de.delete(m),r.hide())},[e]);const z=useCallback(()=>{b(),r.update()},[b,r]);useEffect(z,[c.placement,c.strategy,o]),ur(l,t,f,c),useEffect(()=>{var a,b;(!0===c.hide||"object"==typeof c.hide||Array.isArray(c.hide))&&(g((null==(a=w.hide)?void 0:a.referenceHidden)||!v),q(null==(b=w.hide)?void 0:b.escaped))},[w,c.hide,v]),cr(!!c.adaptiveWidth,t.reference,y),useEffect(()=>{if(t.reference.current&&t.floating.current&&e)return!1===c.autoUpdate?()=>{}:autoUpdate(t.reference.current,t.floating.current,z,"object"==typeof c.autoUpdate?c.autoUpdate:void 0)},[e,z,t]);const j=useRef(!0);useEffect(()=>{!(t.reference.current instanceof Element)&&t.reference.current&&t.floating.current&&j.current&&(j.current=!1,z(),window.requestAnimationFrame(()=>{j.current=!0,z()}))},[t]);const A={referenceRef:t.setReference,placement:s},B={floatingRef:t.setFloating,props:c,mounted:n,setShow:h,referenceHidden:p,escaped:d,placement:s,floatingStyles:u,referenceElWidth:x},C={arrowRef:f,placement:s,x:null==(i=w.arrow)?void 0:i.x,y:null==(k=w.arrow)?void 0:k.y};return{referenceApi:A,floatingApi:B,arrowApi:C,placement:s,update:z,refs:t,middlewareData:w}}const ht=forwardRef((a,c)=>{function e(b){if(a.as===Fragment||!a.as)return y.jsx(Fragment,{children:b});const d=a.as;return y.jsx(d,{ref:c,className:a.className,children:b})}const[h,i]=useState(a.show??!1),{referenceApi:j,floatingApi:k,arrowApi:l,placement:m}=vt([h,i],a),g={placement:m},[d,n]="function"==typeof a.children?a.children(g):a.children;if(!isValidElement(d))return console.warn("<Float /> is missing a reference and floating element."),y.jsx(Fragment,{});if(a.composable||a.dialog)return e(y.jsx(De.Provider,{value:j,children:y.jsx(Ie.Provider,{value:k,children:y.jsx(oe.Provider,{value:l,children:"function"==typeof a.children?a.children(g):a.children})})},"FloatingNode"));const f=dt(d,{as:Fragment},{key:"reference-node"},j),o=$e(n,{as:a.floatingAs||"div"},{},k);return e([f,y.jsx(oe.Provider,{value:l,children:o},"floating-node")])});ht.displayName="Float";function gr(a){if(!a.children)return y.jsx(Fragment,{});const b=useMemo(()=>{const{as:b,children:c,...d}=a;return d},[a]),c=ct("Float.Reference"),{placement:d}=c,e={placement:d};return dt("function"==typeof a.children?a.children(e):a.children,{...a,as:a.as||Fragment},b,c)}function mr(a){if(!a.children)return y.jsx(Fragment,{});const b=useMemo(()=>{const{as:c,enter:e,enterFrom:h,enterTo:g,leave:d,leaveFrom:i,leaveTo:f,originClass:j,tailwindcssOriginClass:k,transitionChild:b,children:l,...m}=a;return m},[a]),c=lt("Float.Content"),{placement:d}=c,e={placement:d};return $e("function"==typeof a.children?a.children(e):a.children,{...a,as:a.as||"div"},b,c)}function yr(a){const{arrowRef:b,placement:c,x:e,y:f}=ft("Float.Arrow"),h=useMemo(()=>{const{as:b,offset:c,children:d,...e}=a;return e},[a]),i={top:"bottom",right:"left",bottom:"top",left:"right"}[c.split("-")[0]],j={left:b.current&&"number"==typeof e?`${rt(b.current,e)}px`:void 0,top:b.current&&"number"==typeof f?`${rt(b.current,f)}px`:void 0,right:void 0,bottom:void 0,[i]:`${-1*(a.offset??4)}px`,...h.style};if(a.as===Fragment){const d={placement:c},e="function"==typeof a.children?a.children(d):a.children;return e&&isValidElement(e)?y.jsx(e.type,{...e.props,ref:b,style:j}):y.jsx(Fragment,{})}const g=a.as||"div";return y.jsx(g,{ref:b,...h,style:j,children:a.children})}function We(a){function b(){h&&i(!1)}let{onInitial:c,children:e,...f}=a;const[h,i]=useState(f.show??!1),j=useMemo(()=>{const{as:a,show:b,placement:c,strategy:d,offset:e,shift:g,flip:h,arrow:i,autoPlacement:k,autoUpdate:j,zIndex:l,enter:m,enterFrom:n,enterTo:o,leave:p,leaveFrom:q,leaveTo:r,originClass:s,tailwindcssOriginClass:t,portal:u,transform:v,middleware:w,onShow:x,onHide:y,onUpdate:z,...A}=f;return A},[f]),{floatingApi:k,arrowApi:l,placement:g,refs:d}=vt([h,i],f);if(useEffect(()=>{i(f.show??!1)},[f.show]),c({show:h,setShow:i,placement:g,refs:d}),!e)return y.jsx(Fragment,{});const m=$e("function"==typeof e?e({placement:g,close:b}):e,{...f,as:f.as||Fragment,show:h},j,k);return y.jsx(oe.Provider,{value:l,children:m})}function br(a){function b(a){let{setShow:b,refs:c}=a;$("contextmenu",a=>{a.preventDefault(),c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:a.clientX,y:a.clientY,top:a.clientY,left:a.clientX,right:a.clientX,bottom:a.clientY}}}),b(!0)}),hr(c.floating,()=>{b(!1)})}const[c,d]=useState(!1);return useEffect(()=>(d(!0),()=>{d(!1)}),[]),c?y.jsx(We,{flip:!0,...a,show:!1,portal:!0,onInitial:b}):y.jsx(Fragment,{})}function wr(a){function b(a){function e(){h(!0)}function b(){h(!1)}function d(a){i.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:a.clientX,y:a.clientY,top:a.clientY,left:a.clientX,right:a.clientX,bottom:a.clientY}}})}function g(a){e(),d(a)}function f(a){e(),d(a.touches[0])}let{setShow:h,refs:i}=a;const j=st(i.floating);j&&(useEffect(()=>{if((c||void 0===c)&&!j.getElementById("headlesui-float-cursor-style")){const a=j.createElement("style");return(j.head||j.getElementsByTagName("head")[0]).appendChild(a),a.id="headlesui-float-cursor-style",a.appendChild(j.createTextNode(["*, *::before, *::after {"," cursor: none !important;","}",".headlesui-float-cursor-root {"," pointer-events: none !important;","}"].join(`
|
|
15
|
+
`))),()=>{var a;return null==(a=j.getElementById("headlesui-float-cursor-style"))?void 0:a.remove()}}},[c]),"ontouchstart"in window||0<navigator.maxTouchPoints?($("touchstart",f),$("touchend",b),$("touchmove",f)):($("mouseenter",g),$("mouseleave",b),$("mousemove",g)))}let{globalHideCursor:c,...d}=a;const[e,f]=useState(!1);return useEffect(()=>(f(!0),()=>{f(!1)}),[]),e?y.jsx(We,{...d,portal:!0,className:"headlesui-float-cursor-root",onInitial:b}):y.jsx(Fragment,{})}const Sr=Object.assign(ht,{Reference:gr,Content:mr,Arrow:yr,Virtual:We,ContextMenu:br,Cursor:wr});export{Sr as S};
|
|
@@ -6,7 +6,7 @@ interface UseEndlessScrollListOptions {
|
|
|
6
6
|
showRef?: boolean;
|
|
7
7
|
refFunction?: RefFunction;
|
|
8
8
|
}
|
|
9
|
-
type RefFunction = (node: Element) =>
|
|
9
|
+
type RefFunction = (node: Element) => undefined;
|
|
10
10
|
export declare const useEndlessScrollList: (items: unknown[], options?: UseEndlessScrollListOptions) => {
|
|
11
11
|
scrollListItems: unknown[] | undefined;
|
|
12
12
|
iterator: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEndlessScrollList.d.ts","sourceRoot":"","sources":["../src/hooks/useEndlessScrollList.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuE,MAAM,OAAO,CAAA;AAgB3F,UAAU,2BAA2B;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;
|
|
1
|
+
{"version":3,"file":"useEndlessScrollList.d.ts","sourceRoot":"","sources":["../src/hooks/useEndlessScrollList.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuE,MAAM,OAAO,CAAA;AAgB3F,UAAU,2BAA2B;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B;AAED,KAAK,WAAW,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,SAAS,CAAA;AAE/C,eAAO,MAAM,oBAAoB,UAAW,OAAO,EAAE,YAAW,2BAA2B;;;wBA4CrE,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO;;CA0B3F,CAAA"}
|
|
@@ -41,7 +41,7 @@ const useEndlessScrollList = (items, options = {}) => {
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
if (node)
|
|
44
|
-
|
|
44
|
+
observer.current.observe(node);
|
|
45
45
|
}, [items, isAddingItems]);
|
|
46
46
|
const iterator = useMemo(() => {
|
|
47
47
|
return {
|
|
@@ -50,7 +50,7 @@ const useEndlessScrollList = (items, options = {}) => {
|
|
|
50
50
|
return (React.createElement(React.Fragment, null,
|
|
51
51
|
content,
|
|
52
52
|
isAddingItems && options?.showLoading !== false && (React.createElement(React.Fragment, null, options?.loadingObject ? options.loadingObject : React.createElement("span", { id: "endlessScrollListLoading" }, "Loading..."))),
|
|
53
|
-
options?.showRef !== false && (React.createElement(React.Fragment, null, options?.refFunction ? (options.refFunction(lastLisItemRef)) : (React.createElement("span", { id: "endlessScrollListLastItemRef", ref: lastLisItemRef }))))));
|
|
53
|
+
options?.showRef !== false && (React.createElement(React.Fragment, null, options?.refFunction ? ((options.refFunction(lastLisItemRef) ?? null)) : (React.createElement("span", { id: "endlessScrollListLastItemRef", ref: lastLisItemRef }))))));
|
|
54
54
|
},
|
|
55
55
|
};
|
|
56
56
|
}, [scrollListItems, lastLisItemRef]);
|