@cloudoperators/juno-ui-components 2.31.0 → 2.33.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/AppBody.component-C9lIZEeC.js +5 -0
- package/build/AppBody.js +1 -1
- package/build/AppShell.component-Hk_XAW1E.js +1 -0
- package/build/AppShell.js +1 -1
- package/build/{AppShellProvider.component-CoGCOuox.js → AppShellProvider.component-Be1Q5mjZ.js} +1 -1
- package/build/AppShellProvider.js +1 -1
- package/build/Badge.component-CLaF9Up0.js +15 -0
- package/build/Badge.js +1 -1
- package/build/Box.component-V4TDnAgb.js +10 -0
- package/build/Box.js +1 -1
- package/build/Breadcrumb.component-BSGoKK2S.js +1 -0
- package/build/Breadcrumb.js +1 -1
- package/build/BreadcrumbItem.component-C99Dj0IW.js +14 -0
- package/build/BreadcrumbItem.js +1 -1
- package/build/Button.component-liw0UuGT.js +56 -0
- package/build/Button.js +1 -1
- package/build/ButtonRow.component-CzhKhK_N.js +1 -0
- package/build/ButtonRow.js +1 -1
- package/build/Checkbox.component-DgDvGt3W.js +77 -0
- package/build/Checkbox.js +1 -1
- package/build/CheckboxGroup.component-B_uoXPNo.js +33 -0
- package/build/CheckboxGroup.js +1 -1
- package/build/CheckboxRow.component-DzLTV4cd.js +1 -0
- package/build/CheckboxRow.js +1 -1
- package/build/Code.component-mlP3SwWy.js +4 -0
- package/build/Code.js +1 -1
- package/build/CodeBlock.component-CZxYJPlk.js +45 -0
- package/build/CodeBlock.js +1 -1
- package/build/ComboBox.component-CVfbabwk.js +115 -0
- package/build/ComboBox.js +1 -1
- package/build/ComboBoxOption.js +39 -1
- package/build/Container.component-xJsCyUG8.js +4 -0
- package/build/Container.js +1 -1
- package/build/ContentAreaToolbar.component-HPXE3xVK.js +8 -0
- package/build/ContentAreaToolbar.js +1 -1
- package/build/ContentContainer.component-8A2F9nlM.js +8 -0
- package/build/ContentContainer.js +1 -1
- package/build/ContentHeading.component-iyxxB3V8.js +6 -0
- package/build/ContentHeading.js +1 -1
- package/build/ContextMenu.component-B24LaAwt.js +16 -0
- package/build/ContextMenu.js +1 -1
- package/build/DataGrid.component-Dt5OQxY5.js +4 -0
- package/build/DataGrid.js +1 -1
- package/build/DataGridCell.component-Gy81mVxf.js +13 -0
- package/build/DataGridCell.js +1 -1
- package/build/DataGridCheckboxCell.js +1 -1
- package/build/DataGridFoot.js +1 -1
- package/build/DataGridHeadCell.component-4DKn7eQ9.js +6 -0
- package/build/DataGridHeadCell.js +1 -1
- package/build/DataGridRow.component-CBEnaLYU.js +3 -0
- package/build/DataGridRow.js +1 -1
- package/build/DataGridToolbar.component-BfgKal7m.js +10 -0
- package/build/DataGridToolbar.js +1 -1
- package/build/{DateTimePicker.component-BMkIzxY0.js → DateTimePicker.component-BysBjc0a.js} +3 -3
- package/build/DateTimePicker.js +1 -1
- package/build/Form.component-C-FIXwo-.js +7 -0
- package/build/Form.js +1 -1
- package/build/FormHint.component-C7TZlbwG.js +10 -0
- package/build/FormHint.js +1 -1
- package/build/FormRow.component-CbFLRaDK.js +3 -0
- package/build/FormRow.component-OkQblu_q.js +3 -0
- package/build/FormRow.js +1 -1
- package/build/FormSection.component-DDGHfPV5.js +8 -0
- package/build/FormSection.js +1 -1
- package/build/FormattedText.component-Oc4b8IPi.js +1 -0
- package/build/FormattedText.js +1 -1
- package/build/Grid.component-BG4AMsb5.js +1 -0
- package/build/Grid.js +1 -1
- package/build/GridColumn.component-BmzNy9N0.js +4 -0
- package/build/GridColumn.js +1 -1
- package/build/GridRow.component-Cf7FxOjh.js +5 -0
- package/build/GridRow.js +1 -1
- package/build/HeaderContainer.component-CWj3SLQY.js +13 -0
- package/build/HeaderContainer.js +1 -0
- package/build/Icon.component-ClhnejN0.js +20 -0
- package/build/Icon.js +1 -1
- package/build/InputGroup.component-Cjl_JYFs.js +4 -0
- package/build/InputGroup.js +1 -1
- package/build/IntroBox.component-BmoEq45u.js +31 -0
- package/build/IntroBox.js +1 -1
- package/build/JsonViewer.component-lHoI-LCD.js +1 -0
- package/build/JsonViewer.js +1 -1
- package/build/Label.component-BYZfB1oK.js +37 -0
- package/build/Label.js +1 -1
- package/build/LoadingIndicator.component-CsNzFwe2.js +1 -0
- package/build/LoadingIndicator.js +1 -1
- package/build/MainContainer.component-DV_tQlek.js +5 -0
- package/build/MainContainer.js +1 -1
- package/build/MainContainerInner.component-DhiRjgBx.js +14 -0
- package/build/MainContainerInner.js +1 -1
- package/build/MainTabs.component-DtTHcxTg.js +1 -0
- package/build/MainTabs.js +1 -1
- package/build/Menu.component-vFmV6jCc.js +17 -0
- package/build/Menu.js +1 -1
- package/build/MenuItem.component-ddsy5_so.js +32 -0
- package/build/MenuItem.js +1 -1
- package/build/MenuSection.component-CteHwLJX.js +11 -0
- package/build/MenuSection.js +1 -1
- package/build/Message.component-A7V1Flcl.js +27 -0
- package/build/Message.js +1 -1
- package/build/Modal.js +31 -1
- package/build/ModalFooter.component-BK0doJJO.js +11 -0
- package/build/ModalFooter.js +1 -1
- package/build/NativeSelect.component-BaWaK11P.js +63 -0
- package/build/NativeSelect.js +1 -1
- package/build/NativeSelectOption.component-BWRxjRz0.js +1 -0
- package/build/NativeSelectOption.js +1 -1
- package/build/NativeSelectOptionGroup.component-GFuGvLsz.js +1 -0
- package/build/NativeSelectOptionGroup.js +1 -1
- package/build/Navigation.component-DaabNHev.js +3 -0
- package/build/Navigation.js +1 -1
- package/build/NavigationItem.component-DI0SMWsi.js +19 -0
- package/build/NavigationItem.js +1 -1
- package/build/PageFooter.component-CeD5DCjY.js +18 -0
- package/build/PageFooter.js +1 -1
- package/build/PageHeader.component-DqYR6Yyo.js +33 -0
- package/build/PageHeader.js +1 -1
- package/build/Pagination.js +5 -1
- package/build/Panel.js +33 -1
- package/build/PanelBody.js +4 -1
- package/build/PanelFooter.js +11 -1
- package/build/Pill.component-BjuSYnxs.js +28 -0
- package/build/Pill.js +1 -1
- package/build/PortalProvider.component-CVldWJIG.js +1 -0
- package/build/PortalProvider.js +1 -1
- package/build/Radio.component-DiZc-eBh.js +67 -0
- package/build/Radio.js +1 -1
- package/build/RadioGroup.component-XH90kWYR.js +33 -0
- package/build/RadioGroup.js +1 -1
- package/build/RadioRow.component-B-HE4xRC.js +1 -0
- package/build/RadioRow.js +1 -1
- package/build/SearchInput.component-QwymruVn.js +1 -0
- package/build/SearchInput.js +1 -1
- package/build/SecretText.component-jsJWpOK1.js +40 -0
- package/build/SecretText.js +1 -40
- package/build/Select.component-B61pnCf7.js +64 -0
- package/build/Select.js +1 -1
- package/build/SelectOption.component-GxWRy28M.js +42 -0
- package/build/SelectOption.js +1 -1
- package/build/{Select.component-DNPTrdQs.js → SelectRow.component-DKK8MJOk.js} +2 -2
- package/build/SelectRow.js +1 -1
- package/build/ShadowRoot.component-DU_Ra-K3.js +1 -0
- package/build/ShadowRoot.js +1 -1
- package/build/SideNavigation.component-D9IErRcv.js +4 -0
- package/build/SideNavigation.js +1 -1
- package/build/SideNavigationItem.component-5ChkLMgz.js +17 -0
- package/build/SideNavigationItem.js +1 -1
- package/build/Spinner.component-CO095KvL.js +16 -0
- package/build/Spinner.js +1 -1
- package/build/Stack.component-Pe-1jf3W.js +5 -0
- package/build/Stack.js +1 -1
- package/build/{StyleProvider.component-DpOVgdlo.js → StyleProvider.component-CqbWBDF7.js} +1 -1
- package/build/StyleProvider.js +1 -1
- package/build/Switch.component-1reoDymi.js +54 -0
- package/build/Switch.js +1 -1
- package/build/{SwitchRow.component-BNceFC47.js → SwitchRow.component-CmboUtfc.js} +1 -1
- package/build/SwitchRow.js +1 -1
- package/build/Tab.component-SEUcCOS8.js +16 -0
- package/build/Tab.js +1 -1
- package/build/TabList.component-sHDWBb5I.js +12 -0
- package/build/TabList.js +1 -1
- package/build/TabNavigation.component-Cc2F9AVl.js +8 -0
- package/build/TabNavigation.js +1 -1
- package/build/TabNavigationItem.component-D9KvESL0.js +22 -0
- package/build/TabNavigationItem.js +1 -1
- package/build/TabPanel.component-DlnS5hSa.js +1 -0
- package/build/TabPanel.js +1 -1
- package/build/Tabs.component-BRM3cTLV.js +1 -0
- package/build/Tabs.js +1 -1
- package/build/TextInput.component-AyfJ3U8z.js +59 -0
- package/build/TextInput.js +1 -1
- package/build/TextInputRow.component-fXXdeFjF.js +1 -0
- package/build/TextInputRow.js +1 -1
- package/build/Textarea.component-DgYR9jem.js +58 -0
- package/build/Textarea.js +1 -1
- package/build/{Textarea.component-4fIvQVeJ.js → TextareaRow.component-DcyMqrAg.js} +2 -2
- package/build/TextareaRow.js +1 -1
- package/build/{ThemeToggle.component-CNb4Nbso.js → ThemeToggle.component-C15TCL63.js} +1 -1
- package/build/ThemeToggle.js +1 -1
- package/build/Toast.component-x0WA9szy.js +12 -0
- package/build/Toast.js +1 -1
- package/build/Tooltip.component-AWJGzfXT.js +1 -0
- package/build/Tooltip.js +1 -1
- package/build/TooltipContent.component-Go8u2Bz4.js +14 -0
- package/build/TooltipContent.js +1 -1
- package/build/TooltipTrigger.component-CYpGzL4I.js +1 -0
- package/build/TooltipTrigger.js +1 -1
- package/build/TopNavigation.component-CkGidYsu.js +5 -0
- package/build/TopNavigation.js +1 -1
- package/build/TopNavigationItem.component-CqIlCTjB.js +26 -0
- package/build/TopNavigationItem.js +1 -1
- package/build/components/AppShell/AppShell.component.d.ts.map +1 -1
- package/build/components/ContentAreaToolbar/ContentAreaToolbar.component.d.ts +17 -0
- package/build/components/ContentAreaToolbar/ContentAreaToolbar.component.d.ts.map +1 -0
- package/build/components/ContentAreaToolbar/index.d.ts +2 -0
- package/build/components/ContentAreaToolbar/index.d.ts.map +1 -0
- package/build/components/ContentContainer/ContentContainer.component.d.ts +14 -7
- package/build/components/ContentContainer/ContentContainer.component.d.ts.map +1 -1
- package/build/components/ContentHeading/ContentHeading.component.d.ts +18 -9
- package/build/components/ContentHeading/ContentHeading.component.d.ts.map +1 -1
- package/build/components/HeaderContainer/HeaderContainer.component.d.ts +10 -0
- package/build/components/HeaderContainer/HeaderContainer.component.d.ts.map +1 -0
- package/build/components/HeaderContainer/index.d.ts +2 -0
- package/build/components/HeaderContainer/index.d.ts.map +1 -0
- package/build/components/Pagination/Pagination.component.d.ts +72 -0
- package/build/components/Pagination/Pagination.component.d.ts.map +1 -0
- package/build/components/Pagination/index.d.ts +2 -0
- package/build/components/Pagination/index.d.ts.map +1 -0
- package/build/components/Panel/Panel.component.d.ts +39 -0
- package/build/components/Panel/Panel.component.d.ts.map +1 -0
- package/build/components/Panel/index.d.ts +2 -0
- package/build/components/Panel/index.d.ts.map +1 -0
- package/build/components/PanelBody/PanelBody.component.d.ts +23 -0
- package/build/components/PanelBody/PanelBody.component.d.ts.map +1 -0
- package/build/components/PanelBody/index.d.ts +2 -0
- package/build/components/PanelBody/index.d.ts.map +1 -0
- package/build/components/PanelFooter/PanelFooter.component.d.ts +19 -0
- package/build/components/PanelFooter/PanelFooter.component.d.ts.map +1 -0
- package/build/components/PanelFooter/index.d.ts +2 -0
- package/build/components/PanelFooter/index.d.ts.map +1 -0
- package/build/components/SecretText/SecretText.component.d.ts +78 -0
- package/build/components/SecretText/SecretText.component.d.ts.map +1 -0
- package/build/components/SecretText/index.d.ts +2 -0
- package/build/components/SecretText/index.d.ts.map +1 -0
- package/build/components/Select/Select.component.d.ts +2 -2
- package/build/components/Select/Select.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/hooks/useEndlessScrollList.d.ts +17 -0
- package/build/hooks/useEndlessScrollList.d.ts.map +1 -0
- package/build/hooks/useEndlessScrollList.js +60 -0
- package/build/hooks/useLocalStorage.d.ts.map +1 -1
- package/build/ibm-plex-DkmjUb78.js +1 -0
- package/build/index.js +184 -17
- package/build/withDeprecationWarning.component-CsAFJ740.js +1 -0
- package/build/withDeprecationWarning.js +1 -1
- package/package.json +1 -1
- package/build/AppBody.component-DMNphrA9.js +0 -1
- package/build/AppShell.component-kPo9ejh-.js +0 -1
- package/build/Badge.component-Bw_Sw1Jl.js +0 -1
- package/build/Box.component-B-zlG37z.js +0 -1
- package/build/Breadcrumb.component-DmLZCJ80.js +0 -1
- package/build/BreadcrumbItem.component-himz8R38.js +0 -1
- package/build/Button.component-Ck0-XKMD.js +0 -1
- package/build/ButtonRow.component-CgfANnke.js +0 -1
- package/build/ButtonRow.component-CnJPyZ99.js +0 -1
- package/build/Checkbox.component-DxULmNji.js +0 -1
- package/build/CheckboxGroup.component-DJN7waSM.js +0 -1
- package/build/CheckboxRow.component-CrN2DXEm.js +0 -1
- package/build/Code.component-CIzbcpEn.js +0 -1
- package/build/CodeBlock.component-CXDUnHIb.js +0 -1
- package/build/ComboBox.component-Bv_9h8jb.js +0 -1
- package/build/Container.component-B8M3UgGG.js +0 -1
- package/build/ContentArea.component-VS-3jOgO.js +0 -5
- package/build/ContentArea.js +0 -1
- package/build/ContentAreaToolbar.component-Cr9XddQc.js +0 -8
- package/build/ContentAreaWrapper.component-D6yksmzo.js +0 -7
- package/build/ContentAreaWrapper.js +0 -1
- package/build/ContentContainer.component-rfZz78lB.js +0 -1
- package/build/ContentHeading.component-Io-M-spm.js +0 -1
- package/build/ContextMenu.component-DH-m8O-z.js +0 -1
- package/build/DataGrid.component-BBT0bs34.js +0 -1
- package/build/DataGridCell.component-DTZCr2iq.js +0 -1
- package/build/DataGridHeadCell.component-Ce2yeOu8.js +0 -1
- package/build/DataGridRow.component-D0MKrB0t.js +0 -1
- package/build/DataGridToolbar.component-BxGtUy7D.js +0 -1
- package/build/Form.component-D-BE29tV.js +0 -1
- package/build/FormHint.component-B30ehV71.js +0 -1
- package/build/FormRow.component--LSv8Yz8.js +0 -1
- package/build/FormRow.component-5oxVn9c0.js +0 -3
- package/build/FormSection.component-D-txM2wI.js +0 -1
- package/build/FormattedText.component-Dv5KRlOH.js +0 -1
- package/build/Grid.component-DhdNobry.js +0 -1
- package/build/GridColumn.component-Dn_zRSnd.js +0 -1
- package/build/GridRow.component-DP4HP_Ai.js +0 -1
- package/build/Icon.component-7-ap-6Ys.js +0 -1
- package/build/InputGroup.component-BKBRJie5.js +0 -1
- package/build/IntroBox.component-BuW5vo-r.js +0 -1
- package/build/JsonViewer.component-i75ln2HG.js +0 -1
- package/build/Label.component-TbF3yilt.js +0 -1
- package/build/LoadingIndicator.component-CjUcoOtA.js +0 -1
- package/build/MainContainer.component-beO5Qib0.js +0 -1
- package/build/MainContainerInner.component-Dp6YCm8D.js +0 -1
- package/build/MainTabs.component-C4jnzeW8.js +0 -1
- package/build/Menu.component-B2zPLmdP.js +0 -1
- package/build/MenuItem.component-2A91klk9.js +0 -1
- package/build/MenuSection.component-CXCYKlVr.js +0 -1
- package/build/Message.component-COHT30fL.js +0 -1
- package/build/ModalFooter.component-vqu5JEqH.js +0 -1
- package/build/NativeSelect.component-BeYgemsP.js +0 -1
- package/build/NativeSelectOption.component-CLFcWbs7.js +0 -1
- package/build/NativeSelectOptionGroup.component-B9j74Fm2.js +0 -1
- package/build/Navigation.component-Q2fi8-qR.js +0 -1
- package/build/NavigationItem.component-DcH7SF-F.js +0 -1
- package/build/PageFooter.component-CrlDnfPd.js +0 -1
- package/build/PageHeader.component-QuQOQj_P.js +0 -1
- package/build/Pagination.component-D7vw3gPl.js +0 -50
- package/build/Panel.component-DW6z1JGn.js +0 -35
- package/build/PanelBody.component-ejsCohbW.js +0 -6
- package/build/PanelFooter.component-B3HXAhmg.js +0 -11
- package/build/Pill.component-CLGgHKga.js +0 -1
- package/build/PortalProvider.component-nShveTMU.js +0 -1
- package/build/Radio.component-qjlCYiuP.js +0 -1
- package/build/RadioGroup.component-Cj0bQHOM.js +0 -1
- package/build/RadioRow.component-CqrB8Bvr.js +0 -1
- package/build/SearchInput.component-CMboCbvO.js +0 -1
- package/build/Select.component-zF_9SDqa.js +0 -1
- package/build/SelectRow.component-D0F2VY1t.js +0 -1
- package/build/ShadowRoot.component-DZn4gLKB.js +0 -1
- package/build/SideNavigation.component-D9A0_YjX.js +0 -1
- package/build/SideNavigationItem.component-EiOe7rV_.js +0 -1
- package/build/Spinner.component-B_OKKh5D.js +0 -1
- package/build/Stack.component-BNRLhyTo.js +0 -1
- package/build/Stack.component-fYvcWRNi.js +0 -60
- package/build/Switch.component-BxCFYGD_.js +0 -1
- package/build/Tab.component-o-IJCaGX.js +0 -1
- package/build/TabList.component-DeI4QJVH.js +0 -1
- package/build/TabNavigation.component-DlfET9Dg.js +0 -1
- package/build/TabNavigationItem.component-CgTEvAMf.js +0 -1
- package/build/TabPanel.component-CSMpnrRv.js +0 -1
- package/build/Tabs.component-NQTjUypo.js +0 -1
- package/build/TextInput.component-D1qpmHfA.js +0 -1
- package/build/TextInputRow.component-DEWfa_NF.js +0 -1
- package/build/Textarea.component-BrJM-k2b.js +0 -1
- package/build/TextareaRow.component-DfVYxpvo.js +0 -1
- package/build/Toast.component-Ck1OSJRg.js +0 -1
- package/build/Tooltip.component-pZQW88UK.js +0 -1
- package/build/TooltipContent.component-Cfo0dBzg.js +0 -1
- package/build/TooltipTrigger.component-Cp9J4Mh7.js +0 -1
- package/build/TopNavigation.component-gPpoiPKf.js +0 -1
- package/build/TopNavigationItem.component-C99GMBgq.js +0 -1
- package/build/ibm-plex-BfDpQmIi.js +0 -1
- package/build/tslib.es6-bjGg6Bxl.js +0 -1
- package/build/withDeprecationWarning.component-DQTD5UdI.js +0 -1
- package/build/withDeprecationWarning.component-fIFVSC34.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useState,useEffect,useMemo,useId}from"react";import{L as Label}from"./Label.component-TbF3yilt.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";import{F as FormHint}from"./FormHint.component-B30ehV71.js";var switchBaseStyles="\n jn-rounded-full\n jn-relative\n jn-p-0\n jn-leading-0\n jn-border\n jn-g-theme-default\n focus:jn-outline-none\n focus:jn-ring-2\n focus:jn-ring-theme-focus\n disabled:jn-opacity-50\n disabled:jn-cursor-not-allowed\n",borderBaseStyles="\n jn-border-theme-switch-default\n",switchWrapperStyles="\n jn-flex\n jn-flex-row\n jn-items-center\n",handleBaseStyles="\n jn-inline-block\n jn-absolute\n jn-top-[1px]\n jn-rounded-full\n jn-bg-theme-switch-handle\n jn-border-theme-default\n",handleOnStyles="\n jn-right-[1px] \n jn-bg-theme-switch-handle-checked\n",handleOffStyles="\n jn-left-[1px]\n",validBaseStyles="\n jn-border-theme-success\n",invalidBaseStyles="\n jn-border-theme-error\n",iconBaseStyles="\n jn-inline-block \n jn-ml-1 \n jn-leading-1\n jn-mt-[-.2rem]\n",hintBaseStyles="\n jn-mt-0\n",isNotEmptyString=function(a){return"string"==typeof a&&0<a.trim().length},getSwitchSizeStyles=function(a){return"small"===a?"jn-w-[1.75rem] jn-h-4":"large"===a?"jn-w-[3.125rem] jn-h-[1.6875rem]":"jn-w-switch-default jn-h-switch-default"},getHandleSizeStyles=function(a){return"small"===a?"jn-w-[0.75rem] jn-h-[0.75rem]":"large"===a?"jn-w-[1.4375rem] jn-h-[1.4375rem]":"jn-w-switch-handle-default jn-h-switch-handle-default"},renderValidationIcon=function(a,b,c){var d="".concat(iconBaseStyles," ").concat(c?"jn-opacity-50":"");return a?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error",size:"1.125rem",className:d}):b?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success",size:"1.125rem",className:d}):null},renderFormHint=function(a,b,c){return isNotEmptyString(a)?React__default.createElement(FormHint,{text:a,variant:"error",className:hintBaseStyles}):isNotEmptyString(b)?React__default.createElement(FormHint,{text:b,variant:"success",className:hintBaseStyles}):isNotEmptyString(c)?React__default.createElement(FormHint,{text:c,className:hintBaseStyles}):null},Switch=function(a){var b=a.name,c=void 0===b?"":b,d=a.id,e=void 0===d?"":d,f=a.label,g=void 0===f?void 0:f,h=a.required,i=a.size,j=void 0===i?"default":i,k=a.on,l=void 0!==k&&k,m=a.disabled,n=void 0!==m&&m,o=a.invalid,p=void 0!==o&&o,q=a.valid,r=void 0!==q&&q,s=a.helptext,t=void 0===s?"":s,u=a.errortext,v=void 0===u?"":u,w=a.successtext,x=void 0===w?"":w,y=a.className,z=void 0===y?"":y,A=a.onChange,B=void 0===A?void 0:A,C=a.onClick,D=void 0===C?void 0:C,E=a.wrapperClassName,F=void 0===E?"":E,G=__rest(a,["name","id","label","required","size","on","disabled","invalid","valid","helptext","errortext","successtext","className","onChange","onClick","wrapperClassName"]),H=useState(l),I=H[0],J=H[1],K=useState(!1),L=K[0],M=K[1],N=useState(!1),O=N[0],P=N[1];useEffect(function(){J(l)},[l]);var Q=useMemo(function(){return p||!!isNotEmptyString(v)},[p,v]),R=useMemo(function(){return r||!!isNotEmptyString(x)},[r,x]);useEffect(function(){M(Q)},[Q]),useEffect(function(){P(R)},[R]);var S=e||function(){return"juno-switch-"+useId()}();return React__default.createElement("div",null,React__default.createElement("span",{className:"\n juno-switch-wrapper \n ".concat(switchWrapperStyles,"\n ").concat(F,"\n ")},React__default.createElement("button",__assign({type:"button",role:"switch",name:c,id:S,"aria-checked":I,disabled:n,onClick:function(a){J(!I),D&&D(a),B&&B(a)},className:"\n juno-switch \n juno-switch-".concat(j," \n ").concat(switchBaseStyles," \n ").concat(getSwitchSizeStyles(j)," \n ").concat(L?"juno-switch-invalid "+invalidBaseStyles:""," \n ").concat(O?"juno-switch-valid "+validBaseStyles:""," \n ").concat(O||L?"":borderBaseStyles," \n ").concat(z)},G),React__default.createElement("span",{className:"juno-switch-handle ".concat(handleBaseStyles," ").concat(getHandleSizeStyles(j)," ").concat(I?handleOnStyles:handleOffStyles)})),React__default.createElement(Label,{text:g,htmlFor:S,className:"jn-ml-2",disabled:n,required:void 0!==h&&h}),renderValidationIcon(L,O,n)),renderFormHint(v,x,t))};export{Switch as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{T as Tab$1}from"./TabPanel-B6oG_h5d.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";var tabStyles="\n jn-flex\n jn-font-bold\n jn-px-[1.5625rem]\n jn-items-center\n jn-cursor-pointer\n focus:jn-outline-none \n",disabledTabStyles="\n jn-pointer-events-none\n jn-opacity-50\n",selectedTabStyles="\n jn-border-b-[3px]\n jn-border-theme-tab-active-bottom\n",iconStyles="\n jn-mr-2\n",Tab=function(a){var b=a.children,c=void 0===b?null:b,d=a.label,e=void 0===d?"":d,f=a.icon,g=a.disabled,h=a.className,i=void 0===h?"":h,j=__rest(a,["children","label","icon","disabled","className"]);return React__default.createElement(Tab$1,__assign({className:"juno-tab ".concat(tabStyles," ").concat(i),disabledClassName:"juno-tab-disabled ".concat(disabledTabStyles),selectedClassName:"juno-tab-selected ".concat(selectedTabStyles),disabled:void 0!==g&&g},j),f?React__default.createElement(Icon,{icon:f,size:"18",className:"".concat(iconStyles)}):null,c||e)};Tab.tabsRole="Tab";export{Tab as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{a as TabList$1}from"./TabPanel-B6oG_h5d.js";import{u as useTabsContext}from"./Tabs.component-NQTjUypo.js";var tabListStyles="\n jn-flex\n jn-h-[3.4375rem]\n",getVariantStyles=function(a){return"main"===a?"jn-bg-theme-tab-navigation-top":"codeblocks"===a?"\n jn-text-sm\n jn-bg-theme-code-block\n jn-border-b-[1px]\n jn-border-theme-codeblock-bar \n ":"\n jn-border-b-[1px] \n jn-border-theme-tab-navigation-content-bottom\n "},TabList=function(a){var b=a.variant,c=void 0===b?"content":b,d=a.children,e=void 0===d?null:d,f=__rest(a,["variant","children"]),g=useTabsContext()||{},h=g.variant||c;return React__default.createElement(TabList$1,__assign({className:"juno-tablist juno-tablist-".concat(h," ").concat(tabListStyles," ").concat(getVariantStyles(h))},f),e)};TabList.tabsRole="TabList";export{TabList as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{createContext}from"react";import{N as Navigation}from"./Navigation.component-Q2fi8-qR.js";var tabNavStyles="\n jn-flex\n",TabNavigationContext=createContext(void 0),TabNavigation=function(a){var b=a.activeItem,c=void 0===b?"":b,d=a.ariaLabel,e=a.children,f=void 0===e?null:e,g=a.className,h=void 0===g?"":g,i=a.disabled,j=a.onActiveItemChange,k=a.tabStyle,l=void 0===k?"main":k,m=__rest(a,["activeItem","ariaLabel","children","className","disabled","onActiveItemChange","tabStyle"]);return React__default.createElement(TabNavigationContext.Provider,{value:{tabStyle:l}},React__default.createElement(Navigation,__assign({activeItem:c,ariaLabel:d,className:"\n juno-tabnavigation \n juno-tabnavigation-".concat(l," \n ").concat(tabNavStyles," \n ").concat(h,"\n "),disabled:void 0!==i&&i,onActiveItemChange:j},m),f))};export{TabNavigation as T,TabNavigationContext as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useContext}from"react";import{N as NavigationItem}from"./NavigationItem.component-DcH7SF-F.js";import{a as TabNavigationContext}from"./TabNavigation.component-DlfET9Dg.js";var tabNavItemStyles="\n jn-flex\n jn-items-center\n jn-text-theme-default\n jn-font-bold\n jn-py-[0.875rem]\n jn-px-[1.5625rem]\n jn-border-b-[3px]\n focus-visible:jn-outline-none\n focus-visible:jn-ring-2\n focus-visible:jn-ring-theme-focus\n",tabNavActiveItemStyles="\n jn-text-theme-high\n jn-font-bold\n jn-border-b-[3px]\n jn-border-theme-tab-active-bottom\n",TabNavigationItem=function(a){var b=a.active,c=a.ariaLabel,d=a.children,e=void 0===d?null:d,f=a.className,g=void 0===f?"":f,h=a.disabled,i=a.href,j=a.icon,k=a.label,l=void 0===k?"":k,m=a.onClick,n=a.value,o=void 0===n?"":n,p=__rest(a,["active","ariaLabel","children","className","disabled","href","icon","label","onClick","value"]),q=useContext(TabNavigationContext),r=(q||{}).tabStyle;return React__default.createElement(NavigationItem,__assign({active:void 0!==b&&b,activeItemStyles:tabNavActiveItemStyles,ariaLabel:c,className:"\n juno-tabnavigation-item \n ".concat(r?"juno-tabnavigation-"+r+"-item":"","\n ").concat(tabNavItemStyles," \n ").concat(g,"\n "),disabled:void 0!==h&&h,href:i,icon:j,inactiveItemStyles:"".concat("content"===r?"jn-border-theme-tab-content-inactive-bottom":"jn-border-transparent"),label:l,onClick:m,value:o},p),e)};export{TabNavigationItem as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{b as TabPanel$1}from"./TabPanel-B6oG_h5d.js";var TabPanel=function(a){var b=a.children,c=void 0===b?null:b,d=a.className,e=void 0===d?"":d,f=__rest(a,["children","className"]);return React__default.createElement(TabPanel$1,__assign({className:"juno-tabpanel ".concat(e),selectedClassName:"juno-tabpanel-selected"},f),c)};TabPanel.tabsRole="TabPanel";export{TabPanel as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useState,useEffect}from"react";import{c as Tabs$1}from"./TabPanel-B6oG_h5d.js";var TabsContext=React__default.createContext({}),useTabsContext=function(){return React__default.useContext(TabsContext)},Tabs=function(a){var b=a.children,c=void 0===b?null:b,d=a.defaultIndex,e=a.selectedIndex,f=a.onSelect,g=a.variant,h=void 0===g?"content":g,i=a.className,j=void 0===i?"":i,k=__rest(a,["children","defaultIndex","selectedIndex","onSelect","variant","className"]),l=useState(e),m=l[0],n=l[1];useEffect(function(){n(e)},[e]);return React__default.createElement(TabsContext.Provider,{value:{variant:h}},React__default.createElement(Tabs$1,__assign({className:"juno-tabs juno-tabs-".concat(h," ").concat(j),defaultIndex:d,selectedIndex:m,onSelect:function(a){f&&f(a)}},k),c))};Tabs.tabsRole="Tabs";export{Tabs as T,useTabsContext as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useRef,useState,useEffect,useMemo,useId}from"react";import{L as Label}from"./Label.component-TbF3yilt.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";import{F as FormHint}from"./FormHint.component-B30ehV71.js";var textinputstyles="\n jn-bg-theme-textinput\n jn-text-theme-textinput\n jn-border\n jn-text-base\n jn-leading-4\n jn-px-4\n jn-h-textinput\n jn-rounded-3px\n focus:jn-outline-none\n focus:jn-ring-2\n focus:jn-ring-theme-focus\n disabled:jn-opacity-50\n autofill:jn-bg-theme-textinput-autofill\n autofill:jn-text-theme-textinput-autofill\n peer\n",defaultborderstyles="\n jn-border-theme-textinput-default\n",invalidstyles="\n jn-border-theme-error\n",validstyles="\n jn-border-theme-success\n",withLabelStyles="\n jn-pt-[1.125rem] \n jn-pb-1\n",noLabelStyles="\n jn-py-4\n",wrapperStyles="\n jn-inline-block\n jn-relative\n",labelStyles="\n peer-autofill:jn-text-theme-textinput-autofill-label\n jn-pointer-events-none\n jn-top-2\n jn-left-[0.9375rem]\n",iconcontainerstyles="\n jn-inline-flex\n jn-absolute\n jn-top-[.4rem]\n jn-right-3\n",disablediconstyles="\n jn-opacity-50\n",hintStyles="\n jn-mt-0\n",TextInput=function(a){var b=a.value,c=void 0===b?"":b,d=a.id,e=void 0===d?"":d,f=a.name,g=void 0===f?void 0:f,h=a.placeholder,i=void 0===h?"":h,j=a.disabled,k=void 0!==j&&j,l=a.readOnly,m=a.required,n=a.invalid,o=void 0!==n&&n,p=a.valid,q=void 0!==p&&p,r=a.autoFocus,s=a.className,t=void 0===s?"":s,u=a.autoComplete,v=void 0===u?"off":u,w=a.helptext,x=void 0===w?"":w,y=a.successtext,z=void 0===y?"":y,A=a.errortext,B=void 0===A?"":A,C=a.onChange,D=void 0===C?void 0:C,E=a.onFocus,F=void 0===E?void 0:E,G=a.onBlur,H=void 0===G?void 0:G,I=a.type,J=void 0===I?void 0:I,K=a.label,L=void 0===K?void 0:K,M=a.width,N=void 0===M?"full":M,O=a.wrapperClassName,P=void 0===O?"":O,Q=__rest(a,["value","id","name","placeholder","disabled","readOnly","required","invalid","valid","autoFocus","className","autoComplete","helptext","successtext","errortext","onChange","onFocus","onBlur","type","label","width","wrapperClassName"]),R=function(a){return"string"!=typeof a||0!==a.trim().length},S=useRef(null),T=useState(""),U=T[0],V=T[1],W=useState(!1),X=W[0],Y=W[1],Z=useState(!1),$=Z[0],_=Z[1],aa=useState(!1),ba=aa[0],ca=aa[1];useEffect(function(){document.hasFocus()&&S.current.contains(document.activeElement)&&Y(!0)},[]),useEffect(function(){V(c)},[c]);var da=useMemo(function(){return o||!!(B&&R(B))},[o,B]),ea=useMemo(function(){return q||!!(z&&R(z))},[q,z]);useEffect(function(){_(da)},[da]),useEffect(function(){ca(ea)},[ea]);var fa=e||function(){return"juno-textinput-"+useId()}();return React__default.createElement("div",null,React__default.createElement("span",{className:"\n juno-textinput-wrapper \n ".concat(wrapperStyles,"\n ").concat("auto"==N?"jn-inline-block":"jn-block","\n ").concat("auto"==N?"jn-w-auto":"jn-w-full","\n ").concat(P,"\n ")},React__default.createElement("input",__assign({type:J,name:g,autoComplete:v,value:U,id:fa,ref:S,placeholder:i,disabled:k,readOnly:void 0!==l&&l,autoFocus:void 0!==r&&r,onChange:function(a){V(a.target.value),D&&D(a)},onFocus:function(a){Y(!0),F&&F(a)},onBlur:function(a){Y(!1),H&&H(a)},className:"juno-textinput \n ".concat(textinputstyles,"\n ").concat(L?withLabelStyles:noLabelStyles,"\n ").concat($?"juno-textinput-invalid "+invalidstyles:""," \n ").concat(ba?"juno-textinput-valid "+validstyles:""," \n ").concat(ba||$?"":defaultborderstyles," \n ").concat("auto"==N?"jn-w-auto":"jn-w-full","\n ").concat(t,"\n ")},Q)),L&&L.length?(React__default.createElement(Label,{text:L,htmlFor:fa,className:"".concat(labelStyles),disabled:k,required:void 0!==m&&m,floating:!0,minimized:!!(i||X||U&&R(U))})):"",React__default.createElement(function(a){var b=a.disabled;return ba||$?(React__default.createElement("div",{className:"juno-textinput-row-icon-container ".concat(iconcontainerstyles," ").concat(b?disablediconstyles:"")},$?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}):null,ba?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}):null)):""},{disabled:k})),B&&R(B)?(React__default.createElement(FormHint,{text:B,variant:"error",className:"".concat(hintStyles)})):"",z&&R(z)?(React__default.createElement(FormHint,{text:z,variant:"success",className:"".concat(hintStyles)})):"",x&&R(x)?React__default.createElement(FormHint,{text:x,className:"".concat(hintStyles)}):"")};export{TextInput as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default from"react";import PropTypes from"prop-types";import{T as TextInput}from"./TextInput.component-CkNlIlj0.js";import{F as FormRow}from"./FormRow.component-5oxVn9c0.js";import{w as withDeprecationWarning}from"./withDeprecationWarning.component-fIFVSC34.js";const TextInputRow=a=>{let{type:c=null,value:d="",name:e="",label:f="",id:g="",placeholder:h="",helptext:i="",required:j=!1,invalid:k=!1,errortext:l="",valid:m=!1,successtext:n="",autoFocus:o=!1,className:p="",disabled:q=!1,onChange:r=void 0,onFocus:s=void 0,onBlur:t=void 0,...b}=a;return React__default.createElement(FormRow,null,React__default.createElement(TextInput,_extends({type:c,value:d,name:e,id:g,label:f,required:j,placeholder:h,disabled:q,invalid:k,valid:m,autoFocus:o,onChange:r,errortext:l,helptext:i,successtext:n,className:p,onFocus:s,onBlur:t},b)))};TextInputRow.propTypes={type:PropTypes.oneOf(["text","password","email","tel","url","number"]),value:PropTypes.string,name:PropTypes.string,label:PropTypes.string,id:PropTypes.string,placeholder:PropTypes.string,helptext:PropTypes.node,required:PropTypes.bool,invalid:PropTypes.bool,errortext:PropTypes.string,valid:PropTypes.bool,successtext:PropTypes.string,autoFocus:PropTypes.bool,className:PropTypes.string,disabled:PropTypes.bool,onChange:PropTypes.func,onFocus:PropTypes.func,onBlur:PropTypes.func};var TextInputRow_component=withDeprecationWarning(TextInputRow,"TextInputRow is deprecated and will be removed in future versions. To be future-proof, use TextInput instead.");export{TextInputRow_component as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useRef,useState,useEffect,useMemo,useId}from"react";import{L as Label}from"./Label.component-TbF3yilt.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";import{F as FormHint}from"./FormHint.component-B30ehV71.js";var wrapperStyles="\n jn-inline-block\n jn-relative\n",textareastyles="\n jn-bg-theme-textinput\n jn-text-theme-textinput\n jn-border\n jn-text-base\n jn-leading-4\n jn-px-4\n jn-rounded-3px\n jn-align-top\n focus:jn-outline-none\n focus:jn-ring-2\n focus:jn-ring-theme-focus\n disabled:jn-opacity-50\n disabled:jn-cursor-not-allowed\n",defaultborderstyles="\n jn-border-theme-textinput-default\n",invalidstyles="\n jn-border-theme-error\n",validstyles="\n jn-border-theme-success\n",withLabelStyles="\n jn-pt-[1.125rem] \n jn-pb-1\n",noLabelStyles="\n jn-py-4\n",labelStyles="\n jn-pointer-events-none\n jn-top-2\n jn-left-[0.9375rem]\n jn-pr-4\n jn-bg-theme-textinput\n",iconcontainerstyles="\n jn-inline-flex\n jn-absolute\n jn-top-[.4rem]\n jn-right-3\n",disablediconstyles="\n jn-opacity-50\n",hintStyles="\n jn-mt-0\n",Textarea=function(a){var b=a.name,c=a.value,d=void 0===c?"":c,e=a.id,f=void 0===e?"":e,g=a.placeholder,h=void 0===g?"":g,i=a.disabled,j=void 0!==i&&i,k=a.readOnly,l=a.required,m=a.invalid,n=void 0!==m&&m,o=a.valid,p=void 0!==o&&o,q=a.autoFocus,r=a.className,s=void 0===r?"":r,t=a.autoComplete,u=void 0===t?"off":t,v=a.helptext,w=void 0===v?"":v,x=a.successtext,y=void 0===x?"":x,z=a.errortext,A=void 0===z?"":z,B=a.onChange,C=void 0===B?void 0:B,D=a.onFocus,E=void 0===D?void 0:D,F=a.onBlur,G=void 0===F?void 0:F,H=a.label,I=void 0===H?void 0:H,J=a.width,K=void 0===J?"full":J,L=a.wrapperClassName,M=void 0===L?"":L,N=__rest(a,["name","value","id","placeholder","disabled","readOnly","required","invalid","valid","autoFocus","className","autoComplete","helptext","successtext","errortext","onChange","onFocus","onBlur","label","width","wrapperClassName"]),O=function(a){return"string"!=typeof a||0!==a.trim().length},P=useRef(null),Q=useState(""),R=Q[0],S=Q[1],T=useState(!1),U=T[0],V=T[1],W=useState(!1),X=W[0],Y=W[1],Z=useState(!1),$=Z[0],_=Z[1];useEffect(function(){document.hasFocus()&&P.current&&P.current.contains(document.activeElement)&&V(!0)},[]),useEffect(function(){S(d.toString())},[d]);var aa=useMemo(function(){return n||!!(A&&O(A))},[n,A]),ba=useMemo(function(){return p||!!(y&&O(y))},[p,y]);useEffect(function(){Y(aa)},[aa]),useEffect(function(){_(ba)},[ba]);var ca=f||function(){return"juno-textarea-"+useId()}();return React__default.createElement("div",null,React__default.createElement("div",{className:"\n juno-textarea-wrapper \n ".concat(wrapperStyles,"\n ").concat("auto"==K?"jn-inline-block":"jn-block","\n ").concat("auto"==K?"jn-w-auto":"jn-w-full","\n ").concat(M,"\n ")},I&&I.length?(React__default.createElement(Label,{text:I,htmlFor:ca,className:"".concat(labelStyles),disabled:j,required:void 0!==l&&l,floating:!0,minimized:!!(h||U||R&&R.length)})):"",React__default.createElement("textarea",__assign({name:b,autoComplete:u,value:R,id:ca,ref:P,placeholder:h,disabled:j,readOnly:void 0!==k&&k,autoFocus:void 0!==q&&q,onChange:function(a){S(a.target.value),C&&C(a)},onFocus:function(a){V(!0),E&&E(a)},onBlur:function(a){V(!1),G&&G(a)},className:"juno-textarea \n ".concat(textareastyles,"\n ").concat(I?withLabelStyles:noLabelStyles,"\n ").concat(X?"juno-textarea-invalid "+invalidstyles:""," \n ").concat($?"juno-textarea-valid "+validstyles:""," \n ").concat($||X?"":defaultborderstyles," \n ").concat("auto"==K?"jn-w-auto":"jn-w-full","\n ").concat(s,"\n ")},N)),React__default.createElement(function(a){var b=a.disabled;return $||X?(React__default.createElement("div",{className:"juno-textinput-row-icon-container ".concat(iconcontainerstyles," ").concat(b?disablediconstyles:"")},X?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}):null,$?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}):null)):""},{disabled:j})),A&&O(A)?(React__default.createElement(FormHint,{text:A,variant:"error",className:"".concat(hintStyles)})):"",y&&O(y)?(React__default.createElement(FormHint,{text:y,variant:"success",className:"".concat(hintStyles)})):"",w&&O(w)?React__default.createElement(FormHint,{text:w,className:"".concat(hintStyles)}):"")};export{Textarea as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default from"react";import PropTypes from"prop-types";import{T as Textarea}from"./Textarea.component-4fIvQVeJ.js";import{F as FormRow}from"./FormRow.component-5oxVn9c0.js";import{w as withDeprecationWarning}from"./withDeprecationWarning.component-fIFVSC34.js";const TextareaRow=a=>{let{value:c="",name:d=null,label:e=null,id:f=null,placeholder:g=null,required:h=null,invalid:i=!1,errortext:j="",valid:k=!1,successtext:l="",helptext:m=null,className:n="",disabled:o=null,onChange:p=void 0,...b}=a;return React__default.createElement(FormRow,null,React__default.createElement(Textarea,_extends({value:c,name:d,id:f,label:e,required:h,placeholder:g,disabled:o,invalid:i,valid:k,onChange:p,errortext:j,helptext:m,successtext:l,className:n},b)))};TextareaRow.propTypes={value:PropTypes.string,name:PropTypes.string,label:PropTypes.string,id:PropTypes.string,helptext:PropTypes.node,placeholder:PropTypes.string,required:PropTypes.bool,invalid:PropTypes.bool,errortext:PropTypes.string,valid:PropTypes.bool,successtext:PropTypes.string,className:PropTypes.string,disabled:PropTypes.bool,onChange:PropTypes.func};var TextareaRow_component=withDeprecationWarning(TextareaRow,"TextareaRow is deprecated and will be removed in future versions. To be future-proof, use Textarea instead.");export{TextareaRow_component as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useState,useEffect}from"react";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";var toastStyles="\n jn-bg-theme-background-lvl-1\n jn-text-theme-high \n jn-inline-flex\t\n jn-items-start\n jn-p-2\n jn-mb-8\n jn-rounded\n",toastStylesText="\n jn-mx-4\n jn-max-w-full\n",getMuiIcon=function(a){return"error"===a?"dangerous":a},Toast=function(a){var b=a.variant,c=void 0===b?"info":b,d=a.children,e=void 0===d?null:d,f=a.text,g=void 0===f?"":f,h=a.autoDismiss,i=void 0!==h&&h,j=a.autoDismissTimeout,k=void 0===j?1e4:j,l=a.onDismiss,m=a.className,n=void 0===m?"":m,o=__rest(a,["variant","children","text","autoDismiss","autoDismissTimeout","onDismiss","className"]),p=useState(!0),q=p[0],r=p[1],s=React__default.useRef(setTimeout(function(){return t()},k));React__default.useEffect(function(){return function(){return clearTimeout(s.current)}},[]),useEffect(function(){i&&(clearTimeout(s.current),s.current=setTimeout(function(){return t()},k))},[i,k]);var t=function(){r(!1),l&&l()};return React__default.createElement(React__default.Fragment,null,q&&(React__default.createElement("div",__assign({className:"juno-toast juno-toast-".concat(c," ").concat(toastStyles," ").concat(n)},o),React__default.createElement(Icon,{icon:getMuiIcon(c),color:"jn-text-theme-"+c,className:"jn-shrink-0"}),React__default.createElement("div",{className:"juno-toast-text ".concat(toastStylesText)},e?e:g),React__default.createElement(Icon,{icon:"close",onClick:t,className:"juno-message-close-button jn-opacity-50 hover:jn-opacity-100 jn-shrink-0"}))))};export{Toast as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as __assign,_ as __rest}from"./tslib.es6-bjGg6Bxl.js";import*as React from"react";import React__default,{useLayoutEffect,useEffect,useRef,useState}from"react";import{g as getOverflowAncestors,u as useFloating$1,c as autoUpdate,o as offset,f as flip,s as shift}from"./floating-ui.react-dom-Bx8TUz-v.js";import"react-dom";function getNodeName(a){return isNode(a)?(a.nodeName||"").toLowerCase():"#document"}function getWindow(a){var b;return(null==a||null==(b=a.ownerDocument)?void 0:b.defaultView)||window}function getDocumentElement(a){var b;return null==(b=(isNode(a)?a.ownerDocument:a.document)||window.document)?void 0:b.documentElement}function isNode(a){return a instanceof Node||a instanceof getWindow(a).Node}function isElement(a){return a instanceof Element||a instanceof getWindow(a).Element}function isHTMLElement(a){return a instanceof HTMLElement||a instanceof getWindow(a).HTMLElement}function isShadowRoot(a){return"undefined"!=typeof ShadowRoot&&(a instanceof ShadowRoot||a instanceof getWindow(a).ShadowRoot)}function isLastTraversableNode(a){return["html","body","#document"].includes(getNodeName(a))}function getComputedStyle(a){return getWindow(a).getComputedStyle(a)}function getParentNode(a){if("html"===getNodeName(a))return a;const b=a.assignedSlot||a.parentNode||isShadowRoot(a)&&a.host||getDocumentElement(a);return isShadowRoot(b)?b.host:b}function activeElement(a){let b=a.activeElement;for(;null!=(null==(c=b)||null==(d=c.shadowRoot)?void 0:d.activeElement);){var c,d;b=b.shadowRoot.activeElement}return b}function contains(a,b){if(!a||!b)return!1;const c=b.getRootNode&&b.getRootNode();if(a.contains(b))return!0;if(c&&isShadowRoot(c))for(let c=b;c;){if(a===c)return!0;c=c.parentNode||c.host}return!1}function getPlatform(){const a=navigator.userAgentData;return null!=a&&a.platform?a.platform:navigator.platform}function getUserAgent(){const a=navigator.userAgentData;return a&&Array.isArray(a.brands)?a.brands.map(a=>{let{brand:b,version:c}=a;return b+"/"+c}).join(" "):navigator.userAgent}function isVirtualClick(a){if(0===a.mozInputSource&&a.isTrusted)return!0;const b=/Android/i;return(b.test(getPlatform())||b.test(getUserAgent()))&&a.pointerType?"click"===a.type&&1===a.buttons:0===a.detail&&!a.pointerType}function isVirtualPointerEvent(a){return 0===a.width&&0===a.height||1===a.width&&1===a.height&&0===a.pressure&&0===a.detail&&"mouse"!==a.pointerType||1>a.width&&1>a.height&&0===a.pressure&&0===a.detail}function isMouseLikePointerType(a,b){const c=["mouse","pen"];return b||c.push("",void 0),c.includes(a)}function isReactEvent(a){return"nativeEvent"in a}function isRootElement(a){return a.matches("html,body")}function getDocument(a){return(null==a?void 0:a.ownerDocument)||document}function isEventTargetWithin(a,b){if(null==b)return!1;if("composedPath"in a)return a.composedPath().includes(b);const c=a;return null!=c.target&&b.contains(c.target)}function getTarget(a){return"composedPath"in a?a.composedPath()[0]:a.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement(a){return isHTMLElement(a)&&a.matches(TYPEABLE_SELECTOR)}function useMergeRefs(a){return React.useMemo(()=>a.every(a=>null==a)?null:b=>{a.forEach(a=>{"function"==typeof a?a(b):null!=a&&(a.current=b)})},a)}var index="undefined"==typeof document?useEffect:useLayoutEffect;let serverHandoffComplete=!1,count=0;const genId=()=>"floating-ui-"+count++;function useFloatingId(){const[a,b]=React.useState(()=>serverHandoffComplete?genId():void 0);return index(()=>{null==a&&b(genId())},[]),React.useEffect(()=>{serverHandoffComplete||(serverHandoffComplete=!0)},[]),a}const useReactId=React["useId".toString()],useId=useReactId||useFloatingId;function createPubSub(){const a=new Map;return{emit(b,c){var d;null==(d=a.get(b))?void 0: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 createAttribute(a){return"data-floating-ui-"+a}function useLatestRef(a){const b=useRef(a);return index(()=>{b.current=a}),b}const safePolygonIdentifier=createAttribute("safe-polygon");function getDelay(a,b,c){return c&&!isMouseLikePointerType(c)?0:"number"==typeof a?a:null==a?void 0:a[b]}function useHover(a,b){void 0===b&&(b={});const{open:c,onOpenChange:d,dataRef:e,events:f,elements:{domReference:h,floating:i},refs:g}=a,{enabled:j=!0,delay:k=0,handleClose:l=null,mouseOnly:m=!1,restMs:n=0,move:o=!0}=b,p=useFloatingTree(),q=useFloatingParentNodeId(),r=useLatestRef(l),s=useLatestRef(k),t=React.useRef(),u=React.useRef(),v=React.useRef(),w=React.useRef(),x=React.useRef(!0),y=React.useRef(!1),z=React.useRef(()=>{}),A=React.useCallback(()=>{var a;const b=null==(a=e.current.openEvent)?void 0:a.type;return(null==b?void 0:b.includes("mouse"))&&"mousedown"!==b},[e]);React.useEffect(()=>{function a(){clearTimeout(u.current),clearTimeout(w.current),x.current=!0}if(j)return f.on("dismiss",a),()=>{f.off("dismiss",a)}},[j,f]),React.useEffect(()=>{function a(a){A()&&d(!1,a)}if(!j||!r.current||!c)return;const b=getDocument(i).documentElement;return b.addEventListener("mouseleave",a),()=>{b.removeEventListener("mouseleave",a)}},[i,c,d,j,r,e,A]);const B=React.useCallback(function(a,b){void 0===b&&(b=!0);const c=getDelay(s.current,"close",t.current);c&&!v.current?(clearTimeout(u.current),u.current=setTimeout(()=>d(!1,a),c)):b&&(clearTimeout(u.current),d(!1,a))},[s,d]),C=React.useCallback(()=>{z.current(),v.current=void 0},[]),D=React.useCallback(()=>{if(y.current){const a=getDocument(g.floating.current).body;a.style.pointerEvents="",a.removeAttribute(safePolygonIdentifier),y.current=!1}},[g]);return React.useEffect(()=>{function b(){return!!e.current.openEvent&&["click","mousedown"].includes(e.current.openEvent.type)}function f(a){if(clearTimeout(u.current),x.current=!1,!(m&&!isMouseLikePointerType(t.current)||0<n&&0===getDelay(s.current,"open"))){const b=getDelay(s.current,"open",t.current);b?u.current=setTimeout(()=>{d(!0,a)},b):d(!0,a)}}function g(d){if(b())return;z.current();const e=getDocument(i);if(clearTimeout(w.current),r.current){c||clearTimeout(u.current),v.current=r.current({...a,tree:p,x:d.clientX,y:d.clientY,onClose(){D(),C(),B(d)}});const b=v.current;return e.addEventListener("mousemove",b),void(z.current=()=>{e.removeEventListener("mousemove",b)})}const f="touch"!==t.current||!contains(i,d.relatedTarget);f&&B(d)}function k(c){b()||(null==r.current?void 0:r.current({...a,tree:p,x:c.clientX,y:c.clientY,onClose(){D(),C(),B(c)}})(c))}if(j&&isElement(h)){const a=h;return c&&a.addEventListener("mouseleave",k),null==i?void 0:i.addEventListener("mouseleave",k),o&&a.addEventListener("mousemove",f,{once:!0}),a.addEventListener("mouseenter",f),a.addEventListener("mouseleave",g),()=>{c&&a.removeEventListener("mouseleave",k),null==i?void 0:i.removeEventListener("mouseleave",k),o&&a.removeEventListener("mousemove",f),a.removeEventListener("mouseenter",f),a.removeEventListener("mouseleave",g)}}},[h,i,j,a,m,n,o,B,C,D,d,c,p,s,r,e]),index(()=>{var a;if(j&&c&&null!=(a=r.current)&&a.__options.blockPointerEvents&&A()){const a=getDocument(i).body;if(a.setAttribute(safePolygonIdentifier,""),a.style.pointerEvents="none",y.current=!0,isElement(h)&&i){var b,d;const a=h,c=null==p||null==(b=p.nodesRef.current.find(a=>a.id===q))||null==(d=b.context)?void 0:d.elements.floating;return c&&(c.style.pointerEvents=""),a.style.pointerEvents="auto",i.style.pointerEvents="auto",()=>{a.style.pointerEvents="",i.style.pointerEvents=""}}}},[j,c,q,i,h,p,r,e,A]),index(()=>{c||(t.current=void 0,C(),D())},[c,C,D]),React.useEffect(()=>()=>{C(),clearTimeout(u.current),clearTimeout(w.current),D()},[j,h,C,D]),React.useMemo(()=>{function a(a){t.current=a.pointerType}return j?{reference:{onPointerDown:a,onPointerEnter:a,onMouseMove(a){c||0===n||(clearTimeout(w.current),w.current=setTimeout(()=>{x.current||d(!0,a.nativeEvent)},n))}},floating:{onMouseEnter(){clearTimeout(u.current)},onMouseLeave(a){f.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),B(a.nativeEvent,!1)}}}:{}},[f,j,n,c,d,B])}function getChildren(a,b){let c=a.filter(a=>{var c;return a.parentId===b&&(null==(c=a.context)?void 0:c.open)}),d=c;for(;d.length;)d=a.filter(a=>{var b;return null==(b=d)?void 0:b.some(b=>{var c;return a.parentId===b.id&&(null==(c=a.context)?void 0:c.open)})}),c=c.concat(d);return c}function isButtonTarget(a){return isHTMLElement(a.target)&&"BUTTON"===a.target.tagName}function isSpaceIgnored(a){return isTypeableElement(a)}function useClick(a,b){void 0===b&&(b={});const{open:c,onOpenChange:d,dataRef:e,elements:{domReference:f}}=a,{enabled:g=!0,event:h="click",toggle:i=!0,ignoreMouse:j=!1,keyboardHandlers:k=!0}=b,l=React.useRef(),m=React.useRef(!1);return React.useMemo(()=>g?{reference:{onPointerDown(a){l.current=a.pointerType},onMouseDown(a){0!==a.button||isMouseLikePointerType(l.current,!0)&&j||"click"===h||(c&&i&&(!e.current.openEvent||"mousedown"===e.current.openEvent.type)?d(!1,a.nativeEvent):(a.preventDefault(),d(!0,a.nativeEvent)))},onClick(a){return"mousedown"===h&&l.current?void(l.current=void 0):void(isMouseLikePointerType(l.current,!0)&&j||(c&&i&&(!e.current.openEvent||"click"===e.current.openEvent.type)?d(!1,a.nativeEvent):d(!0,a.nativeEvent)))},onKeyDown(a){l.current=void 0,a.defaultPrevented||!k||isButtonTarget(a)||(" "===a.key&&!isSpaceIgnored(f)&&(a.preventDefault(),m.current=!0),"Enter"===a.key&&(c&&i?d(!1,a.nativeEvent):d(!0,a.nativeEvent)))},onKeyUp(a){a.defaultPrevented||!k||isButtonTarget(a)||isSpaceIgnored(f)||" "===a.key&&m.current&&(m.current=!1,c&&i?d(!1,a.nativeEvent):d(!0,a.nativeEvent))}}}:{},[g,e,h,j,k,f,i,c,d])}const useInsertionEffect=React["useInsertionEffect".toString()],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)},[])}const bubbleHandlerKeys={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},captureHandlerKeys={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},normalizeBubblesProp=a=>{var b,c;return{escapeKeyBubbles:"boolean"==typeof a?a:null!=(b=null==a?void 0:a.escapeKey)&&b,outsidePressBubbles:"boolean"==typeof a?a:!(null!=(c=null==a?void 0:a.outsidePress))||c}};function useDismiss(a,b){void 0===b&&(b={});const{open:c,onOpenChange:d,events:e,nodeId:f,elements:{reference:h,domReference:i,floating:j},dataRef:g}=a,{enabled:l=!0,escapeKey:m=!0,outsidePress:n=!0,outsidePressEvent:o="pointerdown",referencePress:p=!1,referencePressEvent:q="pointerdown",ancestorScroll:r=!1,bubbles:k}=b,s=useFloatingTree(),t=null!=useFloatingParentNodeId(),u=useEffectEvent("function"==typeof n?n:()=>!1),v="function"==typeof n?u:n,w=React.useRef(!1),{escapeKeyBubbles:x,outsidePressBubbles:y}=normalizeBubblesProp(k),z=useEffectEvent(a=>{if(c&&l&&m&&"Escape"===a.key){const b=s?getChildren(s.nodesRef.current,f):[];if(!x&&(a.stopPropagation(),0<b.length)){let a=!0;if(b.forEach(b=>{var c;if(null!=(c=b.context)&&c.open&&!b.context.dataRef.current.__escapeKeyBubbles)return void(a=!1)}),!a)return}e.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),d(!1,isReactEvent(a)?a.nativeEvent:a)}}),A=useEffectEvent(a=>{const b=w.current;if(w.current=!1,b)return;if("function"==typeof v&&!v(a))return;const c=getTarget(a),g="["+createAttribute("inert")+"]",h=getDocument(j).querySelectorAll(g);let k=isElement(c)?c:null;for(;k&&!isLastTraversableNode(k);){const a=getParentNode(k);if(a===getDocument(j).body||!isElement(a))break;else k=a}if(!(h.length&&isElement(c)&&!isRootElement(c)&&!contains(c,j)&&Array.from(h).every(a=>!contains(k,a)))){if(isHTMLElement(c)&&j){const b=0<c.clientWidth&&c.scrollWidth>c.clientWidth,d=0<c.clientHeight&&c.scrollHeight>c.clientHeight;let e=d&&a.offsetX>c.clientWidth;if(d){const b="rtl"===getComputedStyle(c).direction;b&&(e=a.offsetX<=c.offsetWidth-c.clientWidth)}if(e||b&&a.offsetY>c.clientHeight)return}const b=s&&getChildren(s.nodesRef.current,f).some(b=>{var c;return isEventTargetWithin(a,null==(c=b.context)?void 0:c.elements.floating)});if(!(isEventTargetWithin(a,j)||isEventTargetWithin(a,i)||b)){const b=s?getChildren(s.nodesRef.current,f):[];if(0<b.length){let a=!0;if(b.forEach(b=>{var c;if(null!=(c=b.context)&&c.open&&!b.context.dataRef.current.__outsidePressBubbles)return void(a=!1)}),!a)return}e.emit("dismiss",{type:"outsidePress",data:{returnFocus:t?{preventScroll:!0}:isVirtualClick(a)||isVirtualPointerEvent(a)}}),d(!1,a)}}});return React.useEffect(()=>{function a(a){d(!1,a)}if(!c||!l)return;g.current.__escapeKeyBubbles=x,g.current.__outsidePressBubbles=y;const b=getDocument(j);m&&b.addEventListener("keydown",z),v&&b.addEventListener(o,A);let e=[];return r&&(isElement(i)&&(e=getOverflowAncestors(i)),isElement(j)&&(e=e.concat(getOverflowAncestors(j))),!isElement(h)&&h&&h.contextElement&&(e=e.concat(getOverflowAncestors(h.contextElement)))),e=e.filter(a=>{var c;return a!==(null==(c=b.defaultView)?void 0:c.visualViewport)}),e.forEach(b=>{b.addEventListener("scroll",a,{passive:!0})}),()=>{m&&b.removeEventListener("keydown",z),v&&b.removeEventListener(o,A),e.forEach(b=>{b.removeEventListener("scroll",a)})}},[g,j,i,h,m,v,o,c,d,r,l,x,y,z,A]),React.useEffect(()=>{w.current=!1},[v,o]),React.useMemo(()=>l?{reference:{onKeyDown:z,[bubbleHandlerKeys[q]]:a=>{p&&(e.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),d(!1,a.nativeEvent))}},floating:{onKeyDown:z,[captureHandlerKeys[o]]:()=>{w.current=!0}}}:{},[l,e,p,o,q,d,z])}let devMessageSet;"production"!==process.env.NODE_ENV&&(devMessageSet=new Set);function useFloating(a){var b;void 0===a&&(a={});const{open:e=!1,onOpenChange:c,nodeId:d}=a;if("production"!==process.env.NODE_ENV){var f;const b="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if(null!=(f=a.elements)&&f.reference&&!isElement(a.elements.reference)){var g;if(!(null!=(g=devMessageSet)&&g.has(b))){var h;null==(h=devMessageSet)?void 0:h.add(b),console.error(b)}}}const[i,j]=React.useState(null),k=(null==(b=a.elements)?void 0:b.reference)||i,l=useFloating$1(a),m=useFloatingTree(),n=useEffectEvent((a,b)=>{a&&(p.current.openEvent=b),null==c?void 0:c(a,b)}),o=React.useRef(null),p=React.useRef({}),q=React.useState(()=>createPubSub())[0],r=useId(),s=React.useCallback(a=>{const b=isElement(a)?{getBoundingClientRect:()=>a.getBoundingClientRect(),contextElement:a}:a;l.refs.setReference(b)},[l.refs]),t=React.useCallback(a=>{(isElement(a)||null===a)&&(o.current=a,j(a)),(isElement(l.refs.reference.current)||null===l.refs.reference.current||null!==a&&!isElement(a))&&l.refs.setReference(a)},[l.refs]),u=React.useMemo(()=>({...l.refs,setReference:t,setPositionReference:s,domReference:o}),[l.refs,t,s]),v=React.useMemo(()=>({...l.elements,domReference:k}),[l.elements,k]),w=React.useMemo(()=>({...l,refs:u,elements:v,dataRef:p,nodeId:d,floatingId:r,events:q,open:e,onOpenChange:n}),[l,d,r,q,e,n,u,v]);return index(()=>{const a=null==m?void 0:m.nodesRef.current.find(a=>a.id===d);a&&(a.context=w)}),React.useMemo(()=>({...l,context:w,refs:u,elements:v}),[l,u,v,w])}function useFocus(a,b){void 0===b&&(b={});const{open:c,onOpenChange:d,dataRef:e,events:f,refs:g,elements:{floating:h,domReference:i}}=a,{enabled:j=!0,keyboardOnly:k=!0}=b,l=React.useRef(""),m=React.useRef(!1),n=React.useRef();return React.useEffect(()=>{function a(){!c&&isHTMLElement(i)&&i===activeElement(getDocument(i))&&(m.current=!0)}if(!j)return;const b=getDocument(h),d=b.defaultView||window;return d.addEventListener("blur",a),()=>{d.removeEventListener("blur",a)}},[h,i,c,j]),React.useEffect(()=>{function a(a){("referencePress"===a.type||"escapeKey"===a.type)&&(m.current=!0)}if(j)return f.on("dismiss",a),()=>{f.off("dismiss",a)}},[f,j]),React.useEffect(()=>()=>{clearTimeout(n.current)},[]),React.useMemo(()=>j?{reference:{onPointerDown(a){let{pointerType:b}=a;l.current=b,m.current=!!(b&&k)},onMouseLeave(){m.current=!1},onFocus(a){var b;m.current||"focus"===a.type&&"mousedown"===(null==(b=e.current.openEvent)?void 0:b.type)&&isEventTargetWithin(e.current.openEvent,i)||d(!0,a.nativeEvent)},onBlur(a){m.current=!1;const b=a.relatedTarget,c=isElement(b)&&b.hasAttribute(createAttribute("focus-guard"))&&"outside"===b.getAttribute("data-type");n.current=setTimeout(()=>{contains(g.floating.current,b)||contains(i,b)||c||d(!1,a.nativeEvent)})}}}:{},[j,k,i,g,e,d])}function mergeProps(a,b,c){const d=new Map;return{...("floating"===c&&{tabIndex:-1}),...a,...b.map(a=>a?a[c]:null).concat(a).reduce((a,b)=>b?(Object.entries(b).forEach(b=>{let[c,e]=b;if(0!==c.indexOf("on"))a[c]=e;else if(d.has(c)||d.set(c,[]),"function"==typeof e){var f;null==(f=d.get(c))?void 0:f.push(e),a[c]=function(){for(var a,b=arguments.length,e=Array(b),f=0;f<b;f++)e[f]=arguments[f];return null==(a=d.get(c))?void 0:a.map(a=>a(...e)).find(a=>void 0!==a)}}}),a):a,{})}}function useInteractions(a){void 0===a&&(a=[]);const b=a,c=React.useCallback(b=>mergeProps(b,a,"reference"),b),d=React.useCallback(b=>mergeProps(b,a,"floating"),b),e=React.useCallback(b=>mergeProps(b,a,"item"),a.map(a=>null==a?void 0:a.item));return React.useMemo(()=>({getReferenceProps:c,getFloatingProps:d,getItemProps:e}),[c,d,e])}function useRole(a,b){void 0===b&&(b={});const{open:c,floatingId:d}=a,{enabled:e=!0,role:f="dialog"}=b,g=useId();return React.useMemo(()=>{const a={id:d,role:f};return e?"tooltip"===f?{reference:{"aria-describedby":c?d:void 0},floating:a}:{reference:{"aria-expanded":c?"true":"false","aria-haspopup":"alertdialog"===f?"dialog":f,"aria-controls":c?d:void 0,...("listbox"===f&&{role:"combobox"}),...("menu"===f&&{id:g})},floating:{...a,...("menu"===f&&{"aria-labelledby":g})}}:{}},[e,f,c,d,g])}var useTooltip=function(a){var b=void 0===a?{}:a,c=b.initialOpen,d=b.variant,e=b.placement,f=void 0===e?"top":e,g=b.triggerEvent,h=void 0===g?"click":g,i=b.open,j=b.onOpenChange,k=b.disabled,l=void 0!==k&&k,m=useState(void 0!==c&&c),n=m[0],o=m[1],p=null!==i&&void 0!==i?i:n,q=null!==j&&void 0!==j?j:o,r=useFloating({placement:f,open:p,onOpenChange:q,whileElementsMounted:autoUpdate,middleware:[offset(5),flip(),shift()]}),s=r.context,t=useClick(s,{enabled:null==i&&!1===l&&"click"===h}),u=useHover(s,{move:!1,enabled:null==i&&!1===l&&"hover"===h}),v=useFocus(s,{enabled:null==i}),w=useDismiss(s),x=useRole(s,{role:"tooltip"}),y=useInteractions([t,u,v,w,x]);return React__default.useMemo(function(){return __assign(__assign({open:p,setOpen:q,variant:d,disabled:l},y),r)},[p,q,d,l,y,r])},TooltipContext=React__default.createContext(null),useTooltipState=function(){var a=React__default.useContext(TooltipContext);if(null==a)throw new Error("Tooltip components must be wrapped in <Tooltip />");return a};function Tooltip(a){var b=a.initialOpen,c=a.placement,d=void 0===c?"top":c,e=a.variant,f=a.open,g=a.triggerEvent,h=void 0===g?"click":g,i=a.disabled,j=a.children,k=void 0===j?null:j,l=__rest(a,["initialOpen","placement","variant","open","triggerEvent","disabled","children"]),m=useTooltip({initialOpen:void 0!==b&&b,placement:d,variant:e,open:f,triggerEvent:h,disabled:void 0!==i&&i,props:l});return React__default.createElement(TooltipContext.Provider,{value:m},k)}export{Tooltip as T,useMergeRefs as a,useTooltipState as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{u as useTooltipState,a as useMergeRefs}from"./Tooltip.component-pZQW88UK.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";var popoverStyles="\n jn-bg-theme-background-lvl-1\n jn-text-theme-high \n jn-inline-flex\t\n jn-items-center\n jn-p-2\n jn-rounded\n jn-drop-shadow-[0_0_4px_rgba(0,0,0,0.15)]\n",popoverTextStyles="\n jn-mx-4\n jn-max-w-full\n",popoverIconStyles="\n jn-shrink-0\n",getIcon=function(a){return"error"===a?"dangerous":a},TooltipContent=React__default.forwardRef(function(a,b){var c=a.className,d=void 0===c?"":c,e=a.children,f=void 0===e?null:e,g=__rest(a,["className","children"]),h=useTooltipState(),i=useMergeRefs([h.refs.setFloating,b]),j=h.variant;return React__default.createElement(React__default.Fragment,null,h.open&&(React__default.createElement("div",__assign({className:"juno-tooltip juno-tooltip-".concat(j," ").concat(popoverStyles," ").concat(d),ref:i,style:__assign({},h.floatingStyles)},h.getFloatingProps(g)),j&&(React__default.createElement(Icon,{icon:getIcon(j),color:"jn-text-theme-".concat(j),className:"juno-tooltip-popover-icon ".concat(popoverIconStyles)})),React__default.createElement("p",{className:"".concat(popoverTextStyles)},f))))});export{TooltipContent as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{u as useTooltipState,a as useMergeRefs}from"./Tooltip.component-pZQW88UK.js";var TooltipTrigger=React__default.forwardRef(function(a,b){var c=a.children,d=void 0===c?null:c,e=a.asChild,f=a.className,g=void 0===f?"":f,h=__rest(a,["children","asChild","className"]),i=useTooltipState(),j=useMergeRefs([i.refs.setReference,b]);if(void 0!==e&&e&&React__default.isValidElement(d)){var k=d.props,l=k.ref,m=useMergeRefs([i.refs.setReference,b,l]),n=__assign(__assign(__assign({ref:m},h),k),{"data-state":i.open?"open":"closed",className:k.className+"".concat(i.disabled&&" jn-cursor-default")}),o=i.getReferenceProps(n);return React__default.cloneElement(d,o)}return React__default.createElement("button",__assign({ref:j,"data-state":i.open?"open":"closed"},i.getReferenceProps(h),{className:"".concat(g," ").concat(i.disabled&&" jn-cursor-default")}),d)});export{TooltipTrigger as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{N as Navigation}from"./Navigation.component-Q2fi8-qR.js";var topNavStyles="\n jn-flex\n jn-bg-theme-background-lvl-1\n jn-gap-0\n",TopNavigation=function(a){var b=a.activeItem,c=void 0===b?"":b,d=a.ariaLabel,e=a.children,f=void 0===e?null:e,g=a.className,h=void 0===g?"":g,i=a.disabled,j=a.onActiveItemChange,k=__rest(a,["activeItem","ariaLabel","children","className","disabled","onActiveItemChange"]);return React__default.createElement(Navigation,__assign({activeItem:c,ariaLabel:d,className:"juno-topnavigation ".concat(topNavStyles," ").concat(h),disabled:void 0!==i&&i,onActiveItemChange:j},k),f)};export{TopNavigation as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{N as NavigationItem}from"./NavigationItem.component-DcH7SF-F.js";var topNavItemStyles="\n jn-flex\n jn-items-center\n jn-grow-0\n jn-box-border\n jn-justify-start\n jn-text-theme-default\n jn-font-bold\n jn-leading-6\n jn-py-[0.875rem]\n jn-px-[1.9rem]\n jn-text-theme-default\n jn-bg-theme-topnavigation-item\n hover:jn-text-theme-high\n hover:jn-bg-theme-topnavigation-item-active\n active:jn-text-theme-high\n active:jn-bg-theme-topnavigation-item-active\n focus-visible:jn-outline-none\n focus-visible:jn-ring-2\n focus-visible:jn-ring-theme-focus\n",topNavActiveItemStyles="\n jn-font-bold\n jn-text-theme-high\n jn-bg-theme-topnavigation-item-active\n jn-border-b-[3px]\n",TopNavigationItem=function(a){var b=a.active,c=a.ariaLabel,d=a.children,e=void 0===d?null:d,f=a.className,g=void 0===f?"":f,h=a.disabled,i=a.href,j=void 0===i?"":i,k=a.icon,l=void 0===k?null:k,m=a.label,n=void 0===m?"":m,o=a.onClick,p=void 0===o?void 0:o,q=a.value,r=void 0===q?"":q,s=__rest(a,["active","ariaLabel","children","className","disabled","href","icon","label","onClick","value"]);return React__default.createElement(NavigationItem,__assign({active:void 0!==b&&b,activeItemStyles:topNavActiveItemStyles,ariaLabel:c,className:"juno-topnavigation-item ".concat(topNavItemStyles," ").concat(g),disabled:void 0!==h&&h,icon:l,label:n,href:j,onClick:p,value:r},s),e)};export{TopNavigationItem as T};
|