@cloudoperators/juno-ui-components 2.30.0 → 2.32.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-BNckh29Y.js +1 -0
- package/build/AppShell.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/ContentContainer.component-wLeOohOT.js +8 -0
- package/build/ContentContainer.js +1 -1
- package/build/ContentHeading.component-bhh41uEk.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-C2tX_eji.js → DateTimePicker.component-BMkIzxY0.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.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/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/{Stack.component-fYvcWRNi.js → Pagination.component-CHvISPAw.js} +51 -2
- package/build/Pagination.js +1 -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-CwIj9-lM.js +64 -0
- package/build/{Select.component-BfgCOLpX.js → Select.component-DNPTrdQs.js} +1 -1
- package/build/Select.js +1 -1
- package/build/SelectOption.js +42 -1
- package/build/{SelectRow.component-D3y6s-A2.js → SelectRow.component-D0F2VY1t.js} +1 -1
- 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.js +1 -1
- package/build/Switch.component-1reoDymi.js +54 -0
- package/build/Switch.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/Textarea.component-DgYR9jem.js +58 -0
- package/build/Textarea.js +1 -1
- package/build/{Textarea.component-4fIvQVeJ.js → TextareaRow.component-DSJ_PFIw.js} +2 -2
- package/build/TextareaRow.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/{ComboBox.component-BpssbOYC.js → combobox-JmdrroKh.js} +2 -116
- package/build/components/Code/Code.component.d.ts +11 -0
- package/build/components/Code/Code.component.d.ts.map +1 -0
- package/build/components/Code/index.d.ts +2 -0
- package/build/components/Code/index.d.ts.map +1 -0
- package/build/components/ComboBox/ComboBox.component.d.ts +69 -0
- package/build/components/ComboBox/ComboBox.component.d.ts.map +1 -0
- package/build/components/ComboBox/index.d.ts +2 -0
- package/build/components/ComboBox/index.d.ts.map +1 -0
- package/build/components/ComboBoxOption/ComboBoxOption.component.d.ts +15 -0
- package/build/components/ComboBoxOption/ComboBoxOption.component.d.ts.map +1 -0
- package/build/components/ComboBoxOption/index.d.ts +2 -0
- package/build/components/ComboBoxOption/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/{floating-ui.react-dom-DmTNS6Kr.js → floating-ui.react-dom-Bx8TUz-v.js} +1 -1
- package/build/{headlessui-float-lyiwAWIX.js → headlessui-float-BQHnLFxQ.js} +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/index.js +154 -2
- 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-w7x4oiMK.js +0 -4
- package/build/CodeBlock.component-CXDUnHIb.js +0 -1
- package/build/ComboBoxOption.component-D7XdDUph.js +0 -39
- package/build/Container.component-B8M3UgGG.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-DyB2n7er.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/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-6CTFGCb-.js +0 -50
- 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-BpoPsXOT.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/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/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-D23JdNpf.js +0 -1
- package/build/TooltipContent.component-A3crwGIj.js +0 -1
- package/build/TooltipTrigger.component-D5levpwF.js +0 -1
- package/build/TopNavigation.component-gPpoiPKf.js +0 -1
- package/build/TopNavigationItem.component-C99GMBgq.js +0 -1
- package/build/tslib.es6-bjGg6Bxl.js +0 -1
- package/build/withDeprecationWarning.component-DQTD5UdI.js +0 -1
package/build/StyleProvider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import React__default,{useInsertionEffect,useState,createContext,useRef,useCallback,useEffect,useMemo}from"react";import{S as ShadowRoot}from"./ShadowRoot.component-
|
|
1
|
+
import React__default,{useInsertionEffect,useState,createContext,useRef,useCallback,useEffect,useMemo}from"react";import{S as ShadowRoot}from"./ShadowRoot.component-DU_Ra-K3.js";import{c as css_248z,a as css_248z$1,t as tailwindTheme}from"./ibm-plex-BfDpQmIi.js";import"react-dom";import"./_commonjsHelpers-BxGi5vpY.js";const STYLE_ID="juno-style-provider-golbal-fonts",Fonts=a=>{let{inline:b}=a;return useInsertionEffect(()=>{if(!b&&!document.querySelector(`[id="${STYLE_ID}"]`)){const a=document.createElement("style");a.setAttribute("id",STYLE_ID),a.innerHTML=css_248z.toString(),document.head.appendChild(a)}},[]),b?React__default.createElement("style",{[`data-${STYLE_ID}`]:""},css_248z.toString()):null},styles=css_248z$1.toString(),GLOBAL_STYLE_ID="juno-style-provider-global-styles",GlobalStyles=a=>{let{inline:b}=a;return useInsertionEffect(()=>{if(!(b||document.querySelector(`[id="${GLOBAL_STYLE_ID}"]`))){const a=document.createElement("style");a.setAttribute("id",GLOBAL_STYLE_ID),a.appendChild(document.createTextNode(styles)),document.head.append(a)}},[]),b?React__default.createElement("style",{[`data-${GLOBAL_STYLE_ID}`]:""},styles):null};function useLocalStorage(a,b){const[c,d]=useState(()=>{try{const c=window.localStorage.getItem(a);return c?JSON.parse(c):b}catch(a){return console.log("Juno Error: useLocalStorage error: ",a),b}});return[c,e=>{try{const b=e instanceof Function?e(c):e;d(b),window.localStorage.setItem(a,JSON.stringify(b))}catch(a){return console.log("Juno Error: useLocalStorage error: ",a),b}}]}const StylesContext=createContext(void 0),APP_BODY_CSS_CLASS_NAME="juno-app-body",DEFAULT_THEME_NAME="theme-dark",StyleProvider=a=>{let{stylesWrapper:d="inline",theme:b,children:e=null,shadowRootMode:c}=a;const f=b||DEFAULT_THEME_NAME,[g,h]=useLocalStorage("juno-theme",f),i=useRef(g),j=useRef(APP_BODY_CSS_CLASS_NAME+" "+f),k=useRef(null),l=useCallback(a=>{let{children:b}=a;return"shadowRoot"===d?React__default.createElement(ShadowRoot,{mode:c},b):b},[d,c]),m=useCallback(a=>{k.current&&"string"==typeof a&&(k.current.classList.add(a),j.current=k.current.className)},[]),n=useCallback(a=>{k.current&&"string"==typeof a&&(k.current.classList.remove(a),j.current=k.current.className)},[]),o=useCallback(a=>{k.current&&"string"==typeof a&&(k.current.classList.remove(i.current),k.current.classList.add(a),i.current=a,j.current=k.current.className,h(a))},[k.current,i.current]);return useEffect(()=>{k.current&&o(b||DEFAULT_THEME_NAME)},[b]),useMemo(()=>(React__default.createElement(l,null,React__default.createElement(Fonts,{inline:"head"!==d}),React__default.createElement(GlobalStyles,{inline:"head"!==d}),React__default.createElement(StylesContext.Provider,{value:{styles,theme:tailwindTheme,currentTheme:i.current,setThemeClass:o,addCssClass:m,removeCssClass:n}},React__default.createElement("div",{className:j.current,ref:k},e)))),[d,e,c,j.current,o])};StyleProvider.useStyles=()=>React__default.useContext(StylesContext);export{StyleProvider};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React__default,{useState,useEffect,useMemo,useId}from"react";import{L as Label}from"./Label.component-BYZfB1oK.js";import{I as Icon}from"./Icon.component-ClhnejN0.js";import{F as FormHint}from"./FormHint.component-C7TZlbwG.js";const switchBaseStyles=`
|
|
2
|
+
jn-rounded-full
|
|
3
|
+
jn-relative
|
|
4
|
+
jn-p-0
|
|
5
|
+
jn-leading-0
|
|
6
|
+
jn-border
|
|
7
|
+
jn-g-theme-default
|
|
8
|
+
focus:jn-outline-none
|
|
9
|
+
focus:jn-ring-2
|
|
10
|
+
focus:jn-ring-theme-focus
|
|
11
|
+
disabled:jn-opacity-50
|
|
12
|
+
disabled:jn-cursor-not-allowed
|
|
13
|
+
`,borderBaseStyles=`
|
|
14
|
+
jn-border-theme-switch-default
|
|
15
|
+
`,switchWrapperStyles=`
|
|
16
|
+
jn-flex
|
|
17
|
+
jn-flex-row
|
|
18
|
+
jn-items-center
|
|
19
|
+
`,handleBaseStyles=`
|
|
20
|
+
jn-inline-block
|
|
21
|
+
jn-absolute
|
|
22
|
+
jn-top-[1px]
|
|
23
|
+
jn-rounded-full
|
|
24
|
+
jn-bg-theme-switch-handle
|
|
25
|
+
jn-border-theme-default
|
|
26
|
+
`,handleOnStyles=`
|
|
27
|
+
jn-right-[1px]
|
|
28
|
+
jn-bg-theme-switch-handle-checked
|
|
29
|
+
`,handleOffStyles=`
|
|
30
|
+
jn-left-[1px]
|
|
31
|
+
`,validBaseStyles=`
|
|
32
|
+
jn-border-theme-success
|
|
33
|
+
`,invalidBaseStyles=`
|
|
34
|
+
jn-border-theme-error
|
|
35
|
+
`,iconBaseStyles=`
|
|
36
|
+
jn-inline-block
|
|
37
|
+
jn-ml-1
|
|
38
|
+
jn-leading-1
|
|
39
|
+
jn-mt-[-.2rem]
|
|
40
|
+
`,hintBaseStyles=`
|
|
41
|
+
jn-mt-0
|
|
42
|
+
`,isNotEmptyString=a=>"string"==typeof a&&0<a.trim().length,getSwitchSizeStyles=a=>"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=a=>"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=(a,b,c)=>{const d=`${iconBaseStyles} ${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=(a,b,c)=>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=a=>{let{name:c="",id:d="",label:e=void 0,required:f=!1,size:g="default",on:h=!1,disabled:i=!1,invalid:j=!1,valid:k=!1,helptext:l="",errortext:m="",successtext:n="",className:o="",onChange:p=void 0,onClick:q=void 0,wrapperClassName:r="",...b}=a;const[s,t]=useState(h),[u,v]=useState(!1),[w,x]=useState(!1);useEffect(()=>{t(h)},[h]);const y=useMemo(()=>j||!!isNotEmptyString(m),[j,m]),z=useMemo(()=>k||!!isNotEmptyString(n),[k,n]);useEffect(()=>{v(y)},[y]),useEffect(()=>{x(z)},[z]);const A=d||(()=>"juno-switch-"+useId())();return React__default.createElement("div",null,React__default.createElement("span",{className:`
|
|
43
|
+
juno-switch-wrapper
|
|
44
|
+
${switchWrapperStyles}
|
|
45
|
+
${r}
|
|
46
|
+
`},React__default.createElement("button",{type:"button",role:"switch",name:c,id:A,"aria-checked":s,disabled:i,onClick:a=>{t(!s),q&&q(a),p&&p(a)},className:`
|
|
47
|
+
juno-switch
|
|
48
|
+
juno-switch-${g}
|
|
49
|
+
${switchBaseStyles}
|
|
50
|
+
${getSwitchSizeStyles(g)}
|
|
51
|
+
${u?"juno-switch-invalid "+invalidBaseStyles:""}
|
|
52
|
+
${w?"juno-switch-valid "+validBaseStyles:""}
|
|
53
|
+
${w||u?"":borderBaseStyles}
|
|
54
|
+
${o}`,...b},React__default.createElement("span",{className:`juno-switch-handle ${handleBaseStyles} ${getHandleSizeStyles(g)} ${s?handleOnStyles:handleOffStyles}`})),React__default.createElement(Label,{text:e,htmlFor:A,className:"jn-ml-2",disabled:i,required:f}),renderValidationIcon(u,w,i)),renderFormHint(m,n,l))};export{Switch as S};
|
package/build/Switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{S as Switch}from"./Switch.component-
|
|
1
|
+
export{S as Switch}from"./Switch.component-1reoDymi.js";import"react";import"./Label.component-BYZfB1oK.js";import"./Icon.component-ClhnejN0.js";import"./widgets-njngpHa5.js";import"./FormHint.component-C7TZlbwG.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React__default from"react";import{T as Tab$1}from"./TabPanel-B6oG_h5d.js";import{I as Icon}from"./Icon.component-ClhnejN0.js";const tabStyles=`
|
|
2
|
+
jn-flex
|
|
3
|
+
jn-font-bold
|
|
4
|
+
jn-px-[1.5625rem]
|
|
5
|
+
jn-items-center
|
|
6
|
+
jn-cursor-pointer
|
|
7
|
+
focus:jn-outline-none
|
|
8
|
+
`,disabledTabStyles=`
|
|
9
|
+
jn-pointer-events-none
|
|
10
|
+
jn-opacity-50
|
|
11
|
+
`,selectedTabStyles=`
|
|
12
|
+
jn-border-b-[3px]
|
|
13
|
+
jn-border-theme-tab-active-bottom
|
|
14
|
+
`,iconStyles=`
|
|
15
|
+
jn-mr-2
|
|
16
|
+
`,Tab=a=>{let{children:d=null,label:e="",icon:b,disabled:f=!1,className:g="",...c}=a;return React__default.createElement(Tab$1,{className:`juno-tab ${tabStyles} ${g}`,disabledClassName:`juno-tab-disabled ${disabledTabStyles}`,selectedClassName:`juno-tab-selected ${selectedTabStyles}`,disabled:f,...c},b?React__default.createElement(Icon,{icon:b,size:"18",className:`${iconStyles}`}):null,d||e)};Tab.tabsRole="Tab";export{Tab as T};
|
package/build/Tab.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as Tab}from"./Tab.component-
|
|
1
|
+
export{T as Tab}from"./Tab.component-SEUcCOS8.js";import"react";import"./TabPanel-B6oG_h5d.js";import"prop-types";import"./Icon.component-ClhnejN0.js";import"./widgets-njngpHa5.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React__default from"react";import{a as TabList$1}from"./TabPanel-B6oG_h5d.js";import{u as useTabsContext}from"./Tabs.component-BRM3cTLV.js";const tabListStyles=`
|
|
2
|
+
jn-flex
|
|
3
|
+
jn-h-[3.4375rem]
|
|
4
|
+
`,getVariantStyles=a=>"main"===a?`jn-bg-theme-tab-navigation-top`:"codeblocks"===a?`
|
|
5
|
+
jn-text-sm
|
|
6
|
+
jn-bg-theme-code-block
|
|
7
|
+
jn-border-b-[1px]
|
|
8
|
+
jn-border-theme-codeblock-bar
|
|
9
|
+
`:`
|
|
10
|
+
jn-border-b-[1px]
|
|
11
|
+
jn-border-theme-tab-navigation-content-bottom
|
|
12
|
+
`,TabList=a=>{let{variant:c="content",children:d=null,...b}=a;const e=useTabsContext()||{},f=e.variant||c;return React__default.createElement(TabList$1,{className:`juno-tablist juno-tablist-${f} ${tabListStyles} ${getVariantStyles(f)}`,...b},d)};TabList.tabsRole="TabList";export{TabList as T};
|
package/build/TabList.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TabList}from"./TabList.component-
|
|
1
|
+
export{T as TabList}from"./TabList.component-sHDWBb5I.js";import"react";import"./TabPanel-B6oG_h5d.js";import"prop-types";import"./Tabs.component-BRM3cTLV.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React__default,{createContext}from"react";import{N as Navigation}from"./Navigation.component-DaabNHev.js";const tabNavStyles=`
|
|
2
|
+
jn-flex
|
|
3
|
+
`,TabNavigationContext=createContext(void 0),TabNavigation=a=>{let{activeItem:e="",ariaLabel:b,children:f=null,className:g="",disabled:h=!1,onActiveItemChange:c,tabStyle:i="main",...d}=a;return React__default.createElement(TabNavigationContext.Provider,{value:{tabStyle:i}},React__default.createElement(Navigation,{activeItem:e,ariaLabel:b,className:`
|
|
4
|
+
juno-tabnavigation
|
|
5
|
+
juno-tabnavigation-${i}
|
|
6
|
+
${tabNavStyles}
|
|
7
|
+
${g}
|
|
8
|
+
`,disabled:h,onActiveItemChange:c,...d},f))};export{TabNavigation as T,TabNavigationContext as a};
|
package/build/TabNavigation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TabNavigation}from"./TabNavigation.component-
|
|
1
|
+
export{T as TabNavigation}from"./TabNavigation.component-Cc2F9AVl.js";import"react";import"./Navigation.component-DaabNHev.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React__default,{useContext}from"react";import{N as NavigationItem}from"./NavigationItem.component-DI0SMWsi.js";import{a as TabNavigationContext}from"./TabNavigation.component-Cc2F9AVl.js";const tabNavItemStyles=`
|
|
2
|
+
jn-flex
|
|
3
|
+
jn-items-center
|
|
4
|
+
jn-text-theme-default
|
|
5
|
+
jn-font-bold
|
|
6
|
+
jn-py-[0.875rem]
|
|
7
|
+
jn-px-[1.5625rem]
|
|
8
|
+
jn-border-b-[3px]
|
|
9
|
+
focus-visible:jn-outline-none
|
|
10
|
+
focus-visible:jn-ring-2
|
|
11
|
+
focus-visible:jn-ring-theme-focus
|
|
12
|
+
`,tabNavActiveItemStyles=`
|
|
13
|
+
jn-text-theme-high
|
|
14
|
+
jn-font-bold
|
|
15
|
+
jn-border-b-[3px]
|
|
16
|
+
jn-border-theme-tab-active-bottom
|
|
17
|
+
`,TabNavigationItem=a=>{let{active:g=!1,ariaLabel:b,children:h=null,className:i="",disabled:j=!1,href:c,icon:d,label:k="",onClick:e,value:l="",...f}=a;const m=useContext(TabNavigationContext),{tabStyle:n}=m||{};return React__default.createElement(NavigationItem,{active:g,activeItemStyles:tabNavActiveItemStyles,ariaLabel:b,className:`
|
|
18
|
+
juno-tabnavigation-item
|
|
19
|
+
${n?"juno-tabnavigation-"+n+"-item":""}
|
|
20
|
+
${tabNavItemStyles}
|
|
21
|
+
${i}
|
|
22
|
+
`,disabled:j,href:c,icon:d,inactiveItemStyles:`${"content"===n?"jn-border-theme-tab-content-inactive-bottom":"jn-border-transparent"}`,label:k,onClick:e,value:l,...f},h)};export{TabNavigationItem as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TabNavigationItem}from"./TabNavigationItem.component-
|
|
1
|
+
export{T as TabNavigationItem}from"./TabNavigationItem.component-D9KvESL0.js";import"react";import"./NavigationItem.component-DI0SMWsi.js";import"./Navigation.component-DaabNHev.js";import"./Icon.component-ClhnejN0.js";import"./widgets-njngpHa5.js";import"./TabNavigation.component-Cc2F9AVl.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React__default from"react";import{b as TabPanel$1}from"./TabPanel-B6oG_h5d.js";const TabPanel=a=>{let{children:c=null,className:d="",...b}=a;return React__default.createElement(TabPanel$1,{className:`juno-tabpanel ${d}`,selectedClassName:"juno-tabpanel-selected",...b},c)};TabPanel.tabsRole="TabPanel";export{TabPanel as T};
|
package/build/TabPanel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TabPanel}from"./TabPanel.component-
|
|
1
|
+
export{T as TabPanel}from"./TabPanel.component-DlnS5hSa.js";import"react";import"./TabPanel-B6oG_h5d.js";import"prop-types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React__default,{useState,useEffect}from"react";import{c as Tabs$1}from"./TabPanel-B6oG_h5d.js";const TabsContext=React__default.createContext({}),useTabsContext=()=>React__default.useContext(TabsContext),Tabs=a=>{let{children:f=null,defaultIndex:b,selectedIndex:c,onSelect:d,variant:g="content",className:h="",...e}=a;const[i,j]=useState(c);useEffect(()=>{j(c)},[c]);return React__default.createElement(TabsContext.Provider,{value:{variant:g}},React__default.createElement(Tabs$1,{className:`juno-tabs juno-tabs-${g} ${h}`,defaultIndex:b,selectedIndex:i,onSelect:a=>{d&&d(a)},...e},f))};Tabs.tabsRole="Tabs";export{Tabs as T,useTabsContext as u};
|
package/build/Tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as Tabs}from"./Tabs.component-
|
|
1
|
+
export{T as Tabs}from"./Tabs.component-BRM3cTLV.js";import"react";import"./TabPanel-B6oG_h5d.js";import"prop-types";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React__default,{useRef,useState,useEffect,useMemo,useId}from"react";import{L as Label}from"./Label.component-BYZfB1oK.js";import{I as Icon}from"./Icon.component-ClhnejN0.js";import{F as FormHint}from"./FormHint.component-C7TZlbwG.js";const textinputstyles=`
|
|
2
|
+
jn-bg-theme-textinput
|
|
3
|
+
jn-text-theme-textinput
|
|
4
|
+
jn-border
|
|
5
|
+
jn-text-base
|
|
6
|
+
jn-leading-4
|
|
7
|
+
jn-px-4
|
|
8
|
+
jn-h-textinput
|
|
9
|
+
jn-rounded-3px
|
|
10
|
+
focus:jn-outline-none
|
|
11
|
+
focus:jn-ring-2
|
|
12
|
+
focus:jn-ring-theme-focus
|
|
13
|
+
disabled:jn-opacity-50
|
|
14
|
+
autofill:jn-bg-theme-textinput-autofill
|
|
15
|
+
autofill:jn-text-theme-textinput-autofill
|
|
16
|
+
peer
|
|
17
|
+
`,defaultborderstyles=`
|
|
18
|
+
jn-border-theme-textinput-default
|
|
19
|
+
`,invalidstyles=`
|
|
20
|
+
jn-border-theme-error
|
|
21
|
+
`,validstyles=`
|
|
22
|
+
jn-border-theme-success
|
|
23
|
+
`,withLabelStyles=`
|
|
24
|
+
jn-pt-[1.125rem]
|
|
25
|
+
jn-pb-1
|
|
26
|
+
`,noLabelStyles=`
|
|
27
|
+
jn-py-4
|
|
28
|
+
`,wrapperStyles=`
|
|
29
|
+
jn-inline-block
|
|
30
|
+
jn-relative
|
|
31
|
+
`,labelStyles=`
|
|
32
|
+
peer-autofill:jn-text-theme-textinput-autofill-label
|
|
33
|
+
jn-pointer-events-none
|
|
34
|
+
jn-top-2
|
|
35
|
+
jn-left-[0.9375rem]
|
|
36
|
+
`,iconcontainerstyles=`
|
|
37
|
+
jn-inline-flex
|
|
38
|
+
jn-absolute
|
|
39
|
+
jn-top-[.4rem]
|
|
40
|
+
jn-right-3
|
|
41
|
+
`,disablediconstyles=`
|
|
42
|
+
jn-opacity-50
|
|
43
|
+
`,hintStyles=`
|
|
44
|
+
jn-mt-0
|
|
45
|
+
`,TextInput=a=>{let{value:c="",id:d="",name:e=void 0,placeholder:f="",disabled:g=!1,readOnly:h=!1,required:i=!1,invalid:j=!1,valid:k=!1,autoFocus:l=!1,className:m="",autoComplete:n="off",helptext:o="",successtext:p="",errortext:q="",onChange:r=void 0,onFocus:s=void 0,onBlur:t=void 0,type:u=void 0,label:v=void 0,width:w="full",wrapperClassName:x="",...b}=a;const y=a=>"string"!=typeof a||0!==a.trim().length,z=useRef(null),[A,B]=useState(""),[C,D]=useState(!1),[E,F]=useState(!1),[G,H]=useState(!1);useEffect(()=>{document.hasFocus()&&z.current.contains(document.activeElement)&&D(!0)},[]),useEffect(()=>{B(c)},[c]);const I=useMemo(()=>j||!!(q&&y(q)),[j,q]),J=useMemo(()=>k||!!(p&&y(p)),[k,p]);useEffect(()=>{F(I)},[I]),useEffect(()=>{H(J)},[J]);const K=d||(()=>"juno-textinput-"+useId())();return React__default.createElement("div",null,React__default.createElement("span",{className:`
|
|
46
|
+
juno-textinput-wrapper
|
|
47
|
+
${wrapperStyles}
|
|
48
|
+
${"auto"==w?"jn-inline-block":"jn-block"}
|
|
49
|
+
${"auto"==w?"jn-w-auto":"jn-w-full"}
|
|
50
|
+
${x}
|
|
51
|
+
`},React__default.createElement("input",{type:u,name:e,autoComplete:n,value:A,id:K,ref:z,placeholder:f,disabled:g,readOnly:h,autoFocus:l,onChange:a=>{B(a.target.value),r&&r(a)},onFocus:a=>{D(!0),s&&s(a)},onBlur:a=>{D(!1),t&&t(a)},className:`juno-textinput
|
|
52
|
+
${textinputstyles}
|
|
53
|
+
${v?withLabelStyles:noLabelStyles}
|
|
54
|
+
${E?"juno-textinput-invalid "+invalidstyles:""}
|
|
55
|
+
${G?"juno-textinput-valid "+validstyles:""}
|
|
56
|
+
${G||E?"":defaultborderstyles}
|
|
57
|
+
${"auto"==w?"jn-w-auto":"jn-w-full"}
|
|
58
|
+
${m}
|
|
59
|
+
`,...b}),v&&v.length?(React__default.createElement(Label,{text:v,htmlFor:K,className:`${labelStyles}`,disabled:g,required:i,floating:!0,minimized:!!(f||C||A&&y(A))})):"",React__default.createElement(a=>{let{disabled:b}=a;return G||E?(React__default.createElement("div",{className:`juno-textinput-row-icon-container ${iconcontainerstyles} ${b?disablediconstyles:""}`},E?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}):null,G?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}):null)):""},{disabled:g})),q&&y(q)?(React__default.createElement(FormHint,{text:q,variant:"error",className:`${hintStyles}`})):"",p&&y(p)?(React__default.createElement(FormHint,{text:p,variant:"success",className:`${hintStyles}`})):"",o&&y(o)?React__default.createElement(FormHint,{text:o,className:`${hintStyles}`}):"")};export{TextInput as T};
|
package/build/TextInput.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TextInput}from"./TextInput.component-
|
|
1
|
+
export{T as TextInput}from"./TextInput.component-AyfJ3U8z.js";import"react";import"./Label.component-BYZfB1oK.js";import"./Icon.component-ClhnejN0.js";import"./widgets-njngpHa5.js";import"./FormHint.component-C7TZlbwG.js";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React__default,{useRef,useState,useEffect,useMemo,useId}from"react";import{L as Label}from"./Label.component-BYZfB1oK.js";import{I as Icon}from"./Icon.component-ClhnejN0.js";import{F as FormHint}from"./FormHint.component-C7TZlbwG.js";const wrapperStyles=`
|
|
2
|
+
jn-inline-block
|
|
3
|
+
jn-relative
|
|
4
|
+
`,textareastyles=`
|
|
5
|
+
jn-bg-theme-textinput
|
|
6
|
+
jn-text-theme-textinput
|
|
7
|
+
jn-border
|
|
8
|
+
jn-text-base
|
|
9
|
+
jn-leading-4
|
|
10
|
+
jn-px-4
|
|
11
|
+
jn-rounded-3px
|
|
12
|
+
jn-align-top
|
|
13
|
+
focus:jn-outline-none
|
|
14
|
+
focus:jn-ring-2
|
|
15
|
+
focus:jn-ring-theme-focus
|
|
16
|
+
disabled:jn-opacity-50
|
|
17
|
+
disabled:jn-cursor-not-allowed
|
|
18
|
+
`,defaultborderstyles=`
|
|
19
|
+
jn-border-theme-textinput-default
|
|
20
|
+
`,invalidstyles=`
|
|
21
|
+
jn-border-theme-error
|
|
22
|
+
`,validstyles=`
|
|
23
|
+
jn-border-theme-success
|
|
24
|
+
`,withLabelStyles=`
|
|
25
|
+
jn-pt-[1.125rem]
|
|
26
|
+
jn-pb-1
|
|
27
|
+
`,noLabelStyles=`
|
|
28
|
+
jn-py-4
|
|
29
|
+
`,labelStyles=`
|
|
30
|
+
jn-pointer-events-none
|
|
31
|
+
jn-top-2
|
|
32
|
+
jn-left-[0.9375rem]
|
|
33
|
+
jn-pr-4
|
|
34
|
+
jn-bg-theme-textinput
|
|
35
|
+
`,iconcontainerstyles=`
|
|
36
|
+
jn-inline-flex
|
|
37
|
+
jn-absolute
|
|
38
|
+
jn-top-[.4rem]
|
|
39
|
+
jn-right-3
|
|
40
|
+
`,disablediconstyles=`
|
|
41
|
+
jn-opacity-50
|
|
42
|
+
`,hintStyles=`
|
|
43
|
+
jn-mt-0
|
|
44
|
+
`,Textarea=a=>{let{name:b,value:d="",id:e="",placeholder:f="",disabled:g=!1,readOnly:h=!1,required:i=!1,invalid:j=!1,valid:k=!1,autoFocus:l=!1,className:m="",autoComplete:n="off",helptext:o="",successtext:p="",errortext:q="",onChange:r=void 0,onFocus:s=void 0,onBlur:t=void 0,label:u=void 0,width:v="full",wrapperClassName:w="",...c}=a;const x=a=>"string"!=typeof a||0!==a.trim().length,y=useRef(null),[z,A]=useState(""),[B,C]=useState(!1),[D,E]=useState(!1),[F,G]=useState(!1);useEffect(()=>{document.hasFocus()&&y.current&&y.current.contains(document.activeElement)&&C(!0)},[]),useEffect(()=>{A(d.toString())},[d]);const H=useMemo(()=>j||!!(q&&x(q)),[j,q]),I=useMemo(()=>k||!!(p&&x(p)),[k,p]);useEffect(()=>{E(H)},[H]),useEffect(()=>{G(I)},[I]);const J=e||(()=>"juno-textarea-"+useId())();return React__default.createElement("div",null,React__default.createElement("div",{className:`
|
|
45
|
+
juno-textarea-wrapper
|
|
46
|
+
${wrapperStyles}
|
|
47
|
+
${"auto"==v?"jn-inline-block":"jn-block"}
|
|
48
|
+
${"auto"==v?"jn-w-auto":"jn-w-full"}
|
|
49
|
+
${w}
|
|
50
|
+
`},u&&u.length?(React__default.createElement(Label,{text:u,htmlFor:J,className:`${labelStyles}`,disabled:g,required:i,floating:!0,minimized:!!(f||B||z&&z.length)})):"",React__default.createElement("textarea",{name:b,autoComplete:n,value:z,id:J,ref:y,placeholder:f,disabled:g,readOnly:h,autoFocus:l,onChange:a=>{A(a.target.value),r&&r(a)},onFocus:a=>{C(!0),s&&s(a)},onBlur:a=>{C(!1),t&&t(a)},className:`juno-textarea
|
|
51
|
+
${textareastyles}
|
|
52
|
+
${u?withLabelStyles:noLabelStyles}
|
|
53
|
+
${D?"juno-textarea-invalid "+invalidstyles:""}
|
|
54
|
+
${F?"juno-textarea-valid "+validstyles:""}
|
|
55
|
+
${F||D?"":defaultborderstyles}
|
|
56
|
+
${"auto"==v?"jn-w-auto":"jn-w-full"}
|
|
57
|
+
${m}
|
|
58
|
+
`,...c}),React__default.createElement(a=>{let{disabled:b}=a;return F||D?(React__default.createElement("div",{className:`juno-textinput-row-icon-container ${iconcontainerstyles} ${b?disablediconstyles:""}`},D?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}):null,F?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}):null)):""},{disabled:g})),q&&x(q)?(React__default.createElement(FormHint,{text:q,variant:"error",className:`${hintStyles}`})):"",p&&x(p)?(React__default.createElement(FormHint,{text:p,variant:"success",className:`${hintStyles}`})):"",o&&x(o)?React__default.createElement(FormHint,{text:o,className:`${hintStyles}`}):"")};export{Textarea as T};
|
package/build/Textarea.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as Textarea}from"./Textarea.component-
|
|
1
|
+
export{T as Textarea}from"./Textarea.component-DgYR9jem.js";import"react";import"./Label.component-BYZfB1oK.js";import"./Icon.component-ClhnejN0.js";import"./widgets-njngpHa5.js";import"./FormHint.component-C7TZlbwG.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{useRef,useState,useEffect,useMemo,useId}from"react";import PropTypes from"prop-types";import{L as Label,F as FormHint}from"./FormHint.component-BPhoMz7f.js";import{I as Icon}from"./Icon.component-BVkaZqpA.js";const wrapperStyles=`
|
|
1
|
+
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{useRef,useState,useEffect,useMemo,useId}from"react";import PropTypes from"prop-types";import{L as Label,F as FormHint}from"./FormHint.component-BPhoMz7f.js";import{I as Icon}from"./Icon.component-BVkaZqpA.js";import{F as FormRow}from"./FormRow.component-5oxVn9c0.js";import{w as withDeprecationWarning}from"./withDeprecationWarning.component-fIFVSC34.js";const wrapperStyles=`
|
|
2
2
|
jn-inline-block
|
|
3
3
|
jn-relative
|
|
4
4
|
`,textareastyles=`
|
|
@@ -55,4 +55,4 @@ import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React_
|
|
|
55
55
|
${E||C?"":defaultborderstyles}
|
|
56
56
|
${"auto"==u?"jn-w-auto":"jn-w-full"}
|
|
57
57
|
${l}
|
|
58
|
-
`},b)),React__default.createElement(a=>{let{disabled:b}=a;return E||C?React__default.createElement("div",{className:`juno-textinput-row-icon-container ${iconcontainerstyles} ${b?disablediconstyles:""}`},C?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}):null,E?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}):null):""},{disabled:f})),p&&w(p)?React__default.createElement(FormHint,{text:p,variant:"error",className:`${hintStyles}`}):"",o&&w(o)?React__default.createElement(FormHint,{text:o,variant:"success",className:`${hintStyles}`}):"",n&&w(n)?React__default.createElement(FormHint,{text:n,className:`${hintStyles}`}):"")};Textarea.propTypes={name:PropTypes.string,label:PropTypes.string,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),id:PropTypes.string,placeholder:PropTypes.string,disabled:PropTypes.bool,readOnly:PropTypes.bool,required:PropTypes.bool,invalid:PropTypes.bool,valid:PropTypes.bool,autoFocus:PropTypes.bool,className:PropTypes.string,autoComplete:PropTypes.string,onChange:PropTypes.func,onFocus:PropTypes.func,onBlur:PropTypes.func,helptext:PropTypes.node,successtext:PropTypes.node,errortext:PropTypes.node,width:PropTypes.oneOf(["full","auto"]),wrapperClassName:PropTypes.string};
|
|
58
|
+
`},b)),React__default.createElement(a=>{let{disabled:b}=a;return E||C?React__default.createElement("div",{className:`juno-textinput-row-icon-container ${iconcontainerstyles} ${b?disablediconstyles:""}`},C?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}):null,E?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}):null):""},{disabled:f})),p&&w(p)?React__default.createElement(FormHint,{text:p,variant:"error",className:`${hintStyles}`}):"",o&&w(o)?React__default.createElement(FormHint,{text:o,variant:"success",className:`${hintStyles}`}):"",n&&w(n)?React__default.createElement(FormHint,{text:n,className:`${hintStyles}`}):"")};Textarea.propTypes={name:PropTypes.string,label:PropTypes.string,value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),id:PropTypes.string,placeholder:PropTypes.string,disabled:PropTypes.bool,readOnly:PropTypes.bool,required:PropTypes.bool,invalid:PropTypes.bool,valid:PropTypes.bool,autoFocus:PropTypes.bool,className:PropTypes.string,autoComplete:PropTypes.string,onChange:PropTypes.func,onFocus:PropTypes.func,onBlur:PropTypes.func,helptext:PropTypes.node,successtext:PropTypes.node,errortext:PropTypes.node,width:PropTypes.oneOf(["full","auto"]),wrapperClassName:PropTypes.string};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};
|
package/build/TextareaRow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TextareaRow}from"./TextareaRow.component-
|
|
1
|
+
export{T as TextareaRow}from"./TextareaRow.component-DSJ_PFIw.js";import"./_rollupPluginBabelHelpers-B5fk9IVe.js";import"react";import"prop-types";import"./FormHint.component-BPhoMz7f.js";import"./Icon.component-BVkaZqpA.js";import"./widgets-njngpHa5.js";import"./FormRow.component-5oxVn9c0.js";import"./withDeprecationWarning.component-fIFVSC34.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React__default,{useState,useEffect}from"react";import{I as Icon}from"./Icon.component-ClhnejN0.js";const toastStyles=`
|
|
2
|
+
jn-bg-theme-background-lvl-1
|
|
3
|
+
jn-text-theme-high
|
|
4
|
+
jn-inline-flex
|
|
5
|
+
jn-items-start
|
|
6
|
+
jn-p-2
|
|
7
|
+
jn-mb-8
|
|
8
|
+
jn-rounded
|
|
9
|
+
`,toastStylesText=`
|
|
10
|
+
jn-mx-4
|
|
11
|
+
jn-max-w-full
|
|
12
|
+
`,getMuiIcon=a=>"error"===a?"dangerous":a,Toast=a=>{let{variant:d="info",children:e=null,text:f="",autoDismiss:g=!1,autoDismissTimeout:h=1e4,onDismiss:b,className:i="",...c}=a;const[j,k]=useState(!0),l=React__default.useRef(setTimeout(()=>m(),h));React__default.useEffect(()=>()=>clearTimeout(l.current),[]),useEffect(()=>{g&&(clearTimeout(l.current),l.current=setTimeout(()=>m(),h))},[g,h]);const m=()=>{k(!1),b&&b()};return React__default.createElement(React__default.Fragment,null,j&&(React__default.createElement("div",{className:`juno-toast juno-toast-${d} ${toastStyles} ${i}`,...c},React__default.createElement(Icon,{icon:getMuiIcon(d),color:"jn-text-theme-"+d,className:"jn-shrink-0"}),React__default.createElement("div",{className:`juno-toast-text ${toastStylesText}`},e?e:f),React__default.createElement(Icon,{icon:"close",onClick:m,className:"juno-message-close-button jn-opacity-50 hover:jn-opacity-100 jn-shrink-0"}))))};export{Toast as T};
|
package/build/Toast.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as Toast}from"./Toast.component-
|
|
1
|
+
export{T as Toast}from"./Toast.component-x0WA9szy.js";import"react";import"./Icon.component-ClhnejN0.js";import"./widgets-njngpHa5.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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])}const useTooltip=function(){let{initialOpen:d=!1,variant:a,placement:e="top",triggerEvent:f="click",open:b,onOpenChange:c,disabled:g=!1}=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};const[h,i]=useState(d),j=b??h,k=c??i,l=useFloating({placement:e,open:j,onOpenChange:k,whileElementsMounted:autoUpdate,middleware:[offset(5),flip(),shift()]}),m=l.context,n=useClick(m,{enabled:null==b&&!1===g&&"click"===f}),o=useHover(m,{move:!1,enabled:null==b&&!1===g&&"hover"===f}),p=useFocus(m,{enabled:null==b}),q=useDismiss(m),r=useRole(m,{role:"tooltip"}),s=useInteractions([n,o,p,q,r]);return React__default.useMemo(()=>({open:j,setOpen:k,variant:a,disabled:g,...s,...l}),[j,k,a,g,s,l])},TooltipContext=React__default.createContext(null),useTooltipState=()=>{const a=React__default.useContext(TooltipContext);if(null==a)throw new Error("Tooltip components must be wrapped in <Tooltip />");return a};function Tooltip(a){let{initialOpen:e=!1,placement:f="top",variant:b,open:c,triggerEvent:g="click",disabled:h=!1,children:i=null,...d}=a;const j=useTooltip({initialOpen:e,placement:f,variant:b,open:c,triggerEvent:g,disabled:h,props:d});return React__default.createElement(TooltipContext.Provider,{value:j},i)}export{Tooltip as T,useMergeRefs as a,useTooltipState as u};
|
package/build/Tooltip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as Tooltip}from"./Tooltip.component-
|
|
1
|
+
export{T as Tooltip}from"./Tooltip.component-AWJGzfXT.js";import"react";import"./floating-ui.react-dom-Bx8TUz-v.js";import"react-dom";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React__default from"react";import{u as useTooltipState,a as useMergeRefs}from"./Tooltip.component-AWJGzfXT.js";import{I as Icon}from"./Icon.component-ClhnejN0.js";const popoverStyles=`
|
|
2
|
+
jn-bg-theme-background-lvl-1
|
|
3
|
+
jn-text-theme-high
|
|
4
|
+
jn-inline-flex
|
|
5
|
+
jn-items-center
|
|
6
|
+
jn-p-2
|
|
7
|
+
jn-rounded
|
|
8
|
+
jn-drop-shadow-[0_0_4px_rgba(0,0,0,0.15)]
|
|
9
|
+
`,popoverTextStyles=`
|
|
10
|
+
jn-mx-4
|
|
11
|
+
jn-max-w-full
|
|
12
|
+
`,popoverIconStyles=`
|
|
13
|
+
jn-shrink-0
|
|
14
|
+
`,getIcon=a=>"error"===a?"dangerous":a,TooltipContent=React__default.forwardRef(function(a,b){let{className:d="",children:e=null,...c}=a;const f=useTooltipState(),g=useMergeRefs([f.refs.setFloating,b]),h=f.variant;return React__default.createElement(React__default.Fragment,null,f.open&&(React__default.createElement("div",{className:`juno-tooltip juno-tooltip-${h} ${popoverStyles} ${d}`,ref:g,style:{...f.floatingStyles},...f.getFloatingProps(c)},h&&(React__default.createElement(Icon,{icon:getIcon(h),color:`jn-text-theme-${h}`,className:`juno-tooltip-popover-icon ${popoverIconStyles}`})),React__default.createElement("p",{className:`${popoverTextStyles}`},e))))});export{TooltipContent as T};
|
package/build/TooltipContent.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TooltipContent}from"./TooltipContent.component-
|
|
1
|
+
export{T as TooltipContent}from"./TooltipContent.component-Go8u2Bz4.js";import"react";import"./Tooltip.component-AWJGzfXT.js";import"./floating-ui.react-dom-Bx8TUz-v.js";import"react-dom";import"./Icon.component-ClhnejN0.js";import"./widgets-njngpHa5.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React__default from"react";import{u as useTooltipState,a as useMergeRefs}from"./Tooltip.component-AWJGzfXT.js";const TooltipTrigger=React__default.forwardRef(function(a,b){let{children:d=null,asChild:e=!1,className:f="",...c}=a;const g=useTooltipState(),h=useMergeRefs([g.refs.setReference,b]);if(e&&React__default.isValidElement(d)){const a=d.props,e=a.ref,f=useMergeRefs([g.refs.setReference,b,e]),h={ref:f,...c,...a,"data-state":g.open?"open":"closed",className:a.className+`${g.disabled&&" jn-cursor-default"}`},i=g.getReferenceProps(h);return React__default.cloneElement(d,i)}return React__default.createElement("button",{ref:h,"data-state":g.open?"open":"closed",...g.getReferenceProps(c),className:`${f} ${g.disabled&&" jn-cursor-default"}`},d)});export{TooltipTrigger as T};
|
package/build/TooltipTrigger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TooltipTrigger}from"./TooltipTrigger.component-
|
|
1
|
+
export{T as TooltipTrigger}from"./TooltipTrigger.component-CYpGzL4I.js";import"react";import"./Tooltip.component-AWJGzfXT.js";import"./floating-ui.react-dom-Bx8TUz-v.js";import"react-dom";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React__default from"react";import{N as Navigation}from"./Navigation.component-DaabNHev.js";const topNavStyles=`
|
|
2
|
+
jn-flex
|
|
3
|
+
jn-bg-theme-background-lvl-1
|
|
4
|
+
jn-gap-0
|
|
5
|
+
`,TopNavigation=a=>{let{activeItem:e="",ariaLabel:b,children:f=null,className:g="",disabled:h=!1,onActiveItemChange:c,...d}=a;return React__default.createElement(Navigation,{activeItem:e,ariaLabel:b,className:`juno-topnavigation ${topNavStyles} ${g}`,disabled:h,onActiveItemChange:c,...d},f)};export{TopNavigation as T};
|
package/build/TopNavigation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TopNavigation}from"./TopNavigation.component-
|
|
1
|
+
export{T as TopNavigation}from"./TopNavigation.component-CkGidYsu.js";import"react";import"./Navigation.component-DaabNHev.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React__default from"react";import{N as NavigationItem}from"./NavigationItem.component-DI0SMWsi.js";const topNavItemStyles=`
|
|
2
|
+
jn-flex
|
|
3
|
+
jn-items-center
|
|
4
|
+
jn-grow-0
|
|
5
|
+
jn-box-border
|
|
6
|
+
jn-justify-start
|
|
7
|
+
jn-text-theme-default
|
|
8
|
+
jn-font-bold
|
|
9
|
+
jn-leading-6
|
|
10
|
+
jn-py-[0.875rem]
|
|
11
|
+
jn-px-[1.9rem]
|
|
12
|
+
jn-text-theme-default
|
|
13
|
+
jn-bg-theme-topnavigation-item
|
|
14
|
+
hover:jn-text-theme-high
|
|
15
|
+
hover:jn-bg-theme-topnavigation-item-active
|
|
16
|
+
active:jn-text-theme-high
|
|
17
|
+
active:jn-bg-theme-topnavigation-item-active
|
|
18
|
+
focus-visible:jn-outline-none
|
|
19
|
+
focus-visible:jn-ring-2
|
|
20
|
+
focus-visible:jn-ring-theme-focus
|
|
21
|
+
`,topNavActiveItemStyles=`
|
|
22
|
+
jn-font-bold
|
|
23
|
+
jn-text-theme-high
|
|
24
|
+
jn-bg-theme-topnavigation-item-active
|
|
25
|
+
jn-border-b-[3px]
|
|
26
|
+
`,TopNavigationItem=a=>{let{active:d=!1,ariaLabel:b,children:e=null,className:f="",disabled:g=!1,href:h="",icon:i=null,label:j="",onClick:k=void 0,value:l="",...c}=a;return React__default.createElement(NavigationItem,{active:d,activeItemStyles:topNavActiveItemStyles,ariaLabel:b,className:`juno-topnavigation-item ${topNavItemStyles} ${f}`,disabled:g,icon:i,label:j,href:h,onClick:k,value:l,...c},e)};export{TopNavigationItem as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TopNavigationItem}from"./TopNavigationItem.component-
|
|
1
|
+
export{T as TopNavigationItem}from"./TopNavigationItem.component-CqIlCTjB.js";import"react";import"./NavigationItem.component-DI0SMWsi.js";import"./Navigation.component-DaabNHev.js";import"./Icon.component-ClhnejN0.js";import"./widgets-njngpHa5.js";
|