@cloudoperators/juno-ui-components 2.28.0 → 2.30.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/{AppShellProvider.component-OYNJWgl1.js → AppShellProvider.component-CoGCOuox.js} +1 -1
- package/build/AppShellProvider.js +1 -1
- package/build/{ButtonRow.component-DlpAnXKj.js → ButtonRow.component-CnJPyZ99.js} +1 -1
- package/build/{Checkbox.component-O8sJ_9IS.js → Checkbox.component-DxULmNji.js} +1 -1
- package/build/Checkbox.js +1 -1
- package/build/{CheckboxGroup.component-78sw6_Rv.js → CheckboxGroup.component-DJN7waSM.js} +1 -1
- package/build/CheckboxGroup.js +1 -1
- package/build/{CheckboxRow.component-n5GWBEDU.js → CheckboxRow.component-CrN2DXEm.js} +1 -1
- package/build/CheckboxRow.js +1 -1
- package/build/CodeBlock.component-CXDUnHIb.js +1 -0
- package/build/CodeBlock.js +1 -1
- package/build/ContextMenu.component-DyB2n7er.js +1 -0
- package/build/ContextMenu.js +1 -1
- package/build/DataGridCheckboxCell.js +1 -1
- package/build/{NativeSelect.component-DtTnqH-z.js → FilterInput.component-CBfEzQ3x.js} +27 -2
- package/build/FilterInput.js +1 -1
- package/build/{Filters.component-CPqHl_ZP.js → Filters.component-Cu8sV-IL.js} +1 -1
- package/build/Filters.js +1 -1
- package/build/Form.component-D-BE29tV.js +1 -0
- package/build/Form.js +1 -1
- package/build/FormHint.component-B30ehV71.js +1 -0
- package/build/FormHint.js +1 -1
- package/build/FormRow.component--LSv8Yz8.js +1 -0
- package/build/FormRow.js +1 -1
- package/build/FormSection.component-D-txM2wI.js +1 -0
- package/build/FormSection.js +1 -1
- package/build/Grid.component-DhdNobry.js +1 -0
- package/build/Grid.js +1 -1
- package/build/GridColumn.component-Dn_zRSnd.js +1 -0
- package/build/GridColumn.js +1 -1
- package/build/GridRow.component-DP4HP_Ai.js +1 -0
- package/build/GridRow.js +1 -1
- package/build/Menu.component-B2zPLmdP.js +1 -0
- package/build/Menu.js +1 -1
- package/build/MenuItem.component-2A91klk9.js +1 -0
- package/build/MenuItem.js +1 -1
- package/build/MenuSection.component-CXCYKlVr.js +1 -0
- package/build/MenuSection.js +1 -1
- package/build/NativeSelect.component-BeYgemsP.js +1 -0
- package/build/NativeSelect.js +1 -1
- package/build/NativeSelectOption.component-CLFcWbs7.js +1 -0
- package/build/NativeSelectOption.js +1 -1
- package/build/NativeSelectOptionGroup.component-B9j74Fm2.js +1 -0
- package/build/NativeSelectOptionGroup.js +1 -1
- package/build/{Pagination.component-Dmf8HSAf.js → Pagination.component-6CTFGCb-.js} +1 -1
- package/build/Pagination.js +1 -1
- package/build/{Radio.component-D5E4PrMW.js → Radio.component-qjlCYiuP.js} +1 -1
- package/build/Radio.js +1 -1
- package/build/{RadioGroup.component-C8y2zs-R.js → RadioGroup.component-Cj0bQHOM.js} +1 -1
- package/build/RadioGroup.js +1 -1
- package/build/{RadioRow.component-BuAImxFY.js → RadioRow.component-CqrB8Bvr.js} +1 -1
- package/build/RadioRow.js +1 -1
- package/build/SecretText.js +1 -1
- package/build/{Select.component-qFgtNL11.js → Select.component-BpoPsXOT.js} +1 -1
- package/build/Select.js +1 -1
- package/build/SelectOption.js +1 -1
- package/build/{Button.component-BKRhw0J0.js → Stack.component-fYvcWRNi.js} +5 -1
- package/build/{StyleProvider.component-BJXpG1ZL.js → StyleProvider.component-DpOVgdlo.js} +1 -1
- package/build/StyleProvider.js +1 -1
- package/build/Switch.component-BxCFYGD_.js +1 -0
- package/build/Switch.js +1 -1
- package/build/{Switch.component-D3qUVHCF.js → SwitchRow.component-BNceFC47.js} +2 -2
- package/build/SwitchRow.js +1 -1
- package/build/{TextInput.component-BBTA8JYe.js → TextInput.component-D1qpmHfA.js} +1 -1
- package/build/TextInput.js +1 -1
- package/build/{Textarea.component-Bn-CfmYI.js → Textarea.component-BrJM-k2b.js} +1 -1
- package/build/Textarea.js +1 -1
- package/build/{ThemeToggle.component-CNiLRHO4.js → ThemeToggle.component-CNb4Nbso.js} +1 -1
- package/build/ThemeToggle.js +1 -1
- package/build/components/AppShellProvider/AppShellProvider.component.d.ts +22 -0
- package/build/components/AppShellProvider/AppShellProvider.component.d.ts.map +1 -0
- package/build/components/CodeBlock/CodeBlock.component.d.ts +24 -0
- package/build/components/CodeBlock/CodeBlock.component.d.ts.map +1 -0
- package/build/components/CodeBlock/index.d.ts +2 -0
- package/build/components/CodeBlock/index.d.ts.map +1 -0
- package/build/components/ContextMenu/ContextMenu.component.d.ts +11 -0
- package/build/components/ContextMenu/ContextMenu.component.d.ts.map +1 -0
- package/build/components/ContextMenu/index.d.ts +2 -0
- package/build/components/ContextMenu/index.d.ts.map +1 -0
- package/build/components/Form/Form.component.d.ts +22 -0
- package/build/components/Form/Form.component.d.ts.map +1 -0
- package/build/components/Form/index.d.ts +2 -0
- package/build/components/Form/index.d.ts.map +1 -0
- package/build/components/FormHint/FormHint.component.d.ts +18 -8
- package/build/components/FormHint/FormHint.component.d.ts.map +1 -1
- package/build/components/FormRow/FormRow.component.d.ts +18 -0
- package/build/components/FormRow/FormRow.component.d.ts.map +1 -0
- package/build/components/FormRow/index.d.ts +2 -0
- package/build/components/FormRow/index.d.ts.map +1 -0
- package/build/components/FormSection/FormSection.component.d.ts +21 -0
- package/build/components/FormSection/FormSection.component.d.ts.map +1 -0
- package/build/components/FormSection/index.d.ts +2 -0
- package/build/components/FormSection/index.d.ts.map +1 -0
- package/build/components/Grid/Grid.component.d.ts +22 -0
- package/build/components/Grid/Grid.component.d.ts.map +1 -0
- package/build/components/Grid/index.d.ts +2 -0
- package/build/components/Grid/index.d.ts.map +1 -0
- package/build/components/GridColumn/GridColumn.component.d.ts +29 -0
- package/build/components/GridColumn/GridColumn.component.d.ts.map +1 -0
- package/build/components/GridColumn/index.d.ts +2 -0
- package/build/components/GridColumn/index.d.ts.map +1 -0
- package/build/components/GridRow/GridRow.component.d.ts +18 -0
- package/build/components/GridRow/GridRow.component.d.ts.map +1 -0
- package/build/components/GridRow/index.d.ts +2 -0
- package/build/components/GridRow/index.d.ts.map +1 -0
- package/build/components/JsonViewer/JsonViewer.component.d.ts +1 -1
- package/build/components/JsonViewer/JsonViewer.component.d.ts.map +1 -1
- package/build/components/Menu/Menu.component.d.ts +17 -0
- package/build/components/Menu/Menu.component.d.ts.map +1 -0
- package/build/components/Menu/index.d.ts +2 -0
- package/build/components/Menu/index.d.ts.map +1 -0
- package/build/components/MenuItem/MenuItem.component.d.ts +24 -0
- package/build/components/MenuItem/MenuItem.component.d.ts.map +1 -0
- package/build/components/MenuItem/index.d.ts +2 -0
- package/build/components/MenuItem/index.d.ts.map +1 -0
- package/build/components/MenuSection/MenuSection.component.d.ts +12 -0
- package/build/components/MenuSection/MenuSection.component.d.ts.map +1 -0
- package/build/components/MenuSection/index.d.ts +2 -0
- package/build/components/MenuSection/index.d.ts.map +1 -0
- package/build/components/NativeSelect/NativeSelect.component.d.ts +65 -0
- package/build/components/NativeSelect/NativeSelect.component.d.ts.map +1 -0
- package/build/components/NativeSelect/index.d.ts +2 -0
- package/build/components/NativeSelect/index.d.ts.map +1 -0
- package/build/components/NativeSelectOption/NativeSelectOption.component.d.ts +28 -0
- package/build/components/NativeSelectOption/NativeSelectOption.component.d.ts.map +1 -0
- package/build/components/NativeSelectOption/index.d.ts +2 -0
- package/build/components/NativeSelectOption/index.d.ts.map +1 -0
- package/build/components/NativeSelectOptionGroup/NativeSelectOptionGroup.component.d.ts +28 -0
- package/build/components/NativeSelectOptionGroup/NativeSelectOptionGroup.component.d.ts.map +1 -0
- package/build/components/NativeSelectOptionGroup/index.d.ts +2 -0
- package/build/components/NativeSelectOptionGroup/index.d.ts.map +1 -0
- package/build/components/StyleProvider/StyleProvider.component.d.ts +2 -1
- package/build/components/StyleProvider/StyleProvider.component.d.ts.map +1 -1
- package/build/components/Switch/Switch.component.d.ts +77 -0
- package/build/components/Switch/Switch.component.d.ts.map +1 -0
- package/build/components/Switch/index.d.ts +2 -0
- package/build/components/Switch/index.d.ts.map +1 -0
- package/build/ibm-plex-BfDpQmIi.js +1 -0
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/build/CodeBlock.component-BnqSUSJi.js +0 -48
- package/build/ContextMenu.component-Cy6taTZ_.js +0 -16
- package/build/FilterInput.component-DGKAGon-.js +0 -26
- package/build/Form.component-DnZ1t2Ji.js +0 -7
- package/build/FormHint.component-Dkh3ieaZ.js +0 -1
- package/build/FormSection.component-CBaG8F_I.js +0 -8
- package/build/Grid.component-DZToHwWP.js +0 -1
- package/build/GridColumn.component-CTrDBjxI.js +0 -28
- package/build/GridRow.component-XRlLoWMg.js +0 -5
- package/build/Menu.component-Dw3i5vRh.js +0 -17
- package/build/MenuItem.component-C9O5Fl8B.js +0 -32
- package/build/MenuSection.component-Dg5PpsbU.js +0 -11
- package/build/NativeSelectOption.component-ozgJZgGf.js +0 -1
- package/build/NativeSelectOptionGroup.component-kDCnJXl8.js +0 -1
- package/build/Stack.component-D-jW201_.js +0 -5
- package/build/SwitchRow.component-C1sGisCh.js +0 -1
- package/build/ibm-plex-Ryg6-k3L.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import React__default,{useRef,useState,useInsertionEffect,useCallback,useEffect,useMemo,createContext}from"react";import PropTypes from"prop-types";import ReactDOM__default from"react-dom";import{c as css_248z,a as css_248z$1,t as tailwindTheme}from"./ibm-plex-
|
|
1
|
+
import React__default,{useRef,useState,useInsertionEffect,useCallback,useEffect,useMemo,createContext}from"react";import PropTypes from"prop-types";import ReactDOM__default from"react-dom";import{c as css_248z,a as css_248z$1,t as tailwindTheme}from"./ibm-plex-BfDpQmIi.js";const ShadowRoot=a=>{let{mode:b="open",delegatesFocus:c=!1,children:d=null}=a;const e=useRef(),[f,g]=useState();return React__default.useEffect(()=>{e.current&&g(e.current.attachShadow({delegatesFocus:c,mode:b}))},[]),React__default.createElement("div",{ref:e,"data-shadow-host":"true",style:{height:"100%"}},f&&ReactDOM__default.createPortal(d,f))};ShadowRoot.propTypes={mode:PropTypes.oneOf(["open","closed"]),delegatesFocus:PropTypes.bool,children:PropTypes.node};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};Fonts.propTypes={inline:PropTypes.bool};const 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};GlobalStyles.propTypes={inline:PropTypes.bool};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(),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.propTypes={children:PropTypes.node,stylesWrapper:PropTypes.oneOf(["head","inline","shadowRoot"]),theme:PropTypes.string,shadowRootMode:PropTypes.oneOf(["open","closed"])},StyleProvider.useStyles=()=>React__default.useContext(StylesContext);export{ShadowRoot as S,StyleProvider as a};
|
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-DZn4gLKB.js";import{c as css_248z,a as css_248z$1,t as tailwindTheme}from"./ibm-plex-
|
|
1
|
+
import React__default,{useInsertionEffect,useState,createContext,useRef,useCallback,useEffect,useMemo}from"react";import{S as ShadowRoot}from"./ShadowRoot.component-DZn4gLKB.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";var STYLE_ID="juno-style-provider-golbal-fonts",Fonts=function(a){var b,c=a.inline;return useInsertionEffect(function(){if(!c&&!document.querySelector("[id=\"".concat(STYLE_ID,"\"]"))){var a=document.createElement("style");a.setAttribute("id",STYLE_ID),a.innerHTML=css_248z.toString(),document.head.appendChild(a)}},[]),c?React__default.createElement("style",(b={},b["data-".concat(STYLE_ID)]="",b),css_248z.toString()):null},styles=css_248z$1.toString(),GLOBAL_STYLE_ID="juno-style-provider-global-styles",GlobalStyles=function(a){var b,c=a.inline;return useInsertionEffect(function(){if(!(c||document.querySelector("[id=\"".concat(GLOBAL_STYLE_ID,"\"]")))){var a=document.createElement("style");a.setAttribute("id",GLOBAL_STYLE_ID),a.appendChild(document.createTextNode(styles)),document.head.append(a)}},[]),c?React__default.createElement("style",(b={},b["data-".concat(GLOBAL_STYLE_ID)]="",b),styles):null};function useLocalStorage(a,b){var c=useState(function(){try{var c=window.localStorage.getItem(a);return c?JSON.parse(c):b}catch(a){return console.log("Juno Error: useLocalStorage error: ",a),b}}),d=c[0],e=c[1];return[d,function(c){try{var f=c instanceof Function?c(d):c;e(f),window.localStorage.setItem(a,JSON.stringify(f))}catch(a){return console.log("Juno Error: useLocalStorage error: ",a),b}}]}var StylesContext=createContext(void 0),APP_BODY_CSS_CLASS_NAME="juno-app-body",DEFAULT_THEME_NAME="theme-dark",StyleProvider=function(a){var b=a.stylesWrapper,c=void 0===b?"inline":b,d=a.theme,e=a.children,f=void 0===e?null:e,g=a.shadowRootMode,h=d||DEFAULT_THEME_NAME,i=useLocalStorage("juno-theme",h),j=i[0],k=i[1],l=useRef(j),m=useRef(APP_BODY_CSS_CLASS_NAME+" "+h),n=useRef(null),o=useCallback(function(a){var b=a.children;return"shadowRoot"===c?React__default.createElement(ShadowRoot,{mode:g},b):b},[c,g]),p=useCallback(function(a){n.current&&"string"==typeof a&&(n.current.classList.add(a),m.current=n.current.className)},[]),q=useCallback(function(a){n.current&&"string"==typeof a&&(n.current.classList.remove(a),m.current=n.current.className)},[]),r=useCallback(function(a){n.current&&"string"==typeof a&&(n.current.classList.remove(l.current),n.current.classList.add(a),l.current=a,m.current=n.current.className,k(a))},[n.current,l.current]);return useEffect(function(){n.current&&r(d||DEFAULT_THEME_NAME)},[d]),useMemo(function(){return React__default.createElement(o,null,React__default.createElement(Fonts,{inline:"head"!==c}),React__default.createElement(GlobalStyles,{inline:"head"!==c}),React__default.createElement(StylesContext.Provider,{value:{styles:styles,theme:tailwindTheme,currentTheme:l.current,setThemeClass:r,addCssClass:p,removeCssClass:q}},React__default.createElement("div",{className:m.current,ref:n},f)))},[c,f,g,m.current,r])};StyleProvider.useStyles=function(){return React__default.useContext(StylesContext)};export{StyleProvider};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
package/build/Switch.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{S as Switch}from"./Switch.component-
|
|
1
|
+
export{S as Switch}from"./Switch.component-BxCFYGD_.js";import"./tslib.es6-bjGg6Bxl.js";import"react";import"./Label.component-TbF3yilt.js";import"./Icon.component-7-ap-6Ys.js";import"./widgets-njngpHa5.js";import"./FormHint.component-B30ehV71.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{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 switchWrapperStyles=`
|
|
1
|
+
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{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 switchWrapperStyles=`
|
|
2
2
|
jn-flex
|
|
3
3
|
jn-flex-row
|
|
4
4
|
jn-items-center
|
|
@@ -51,4 +51,4 @@ import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React_
|
|
|
51
51
|
${v?"juno-switch-invalid "+invalidbasestyles:""}
|
|
52
52
|
${x?"juno-switch-valid "+validbasestyles:""}
|
|
53
53
|
${x||v?"":defaultborderstyles}
|
|
54
|
-
${o}`},b),React__default.createElement("span",{className:`juno-switch-handle ${handlebasestyles} ${handlesizestyles(g)} ${t?handleonstyles:handleoffstyles}`})),React__default.createElement(Label,{text:e,htmlFor:B,className:"jn-ml-2",disabled:i,required:f}),v?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error",size:"1.125rem",className:`${iconstyles} ${i?"jn-opacity-50":""}`}):"",x?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success",size:"1.125rem",className:`${iconstyles} ${i?"jn-opacity-50":""}`}):""),m&&s(m)?React__default.createElement(FormHint,{text:m,variant:"error",className:`${hintStyles}`}):"",n&&s(n)?React__default.createElement(FormHint,{text:n,variant:"success",className:`${hintStyles}`}):"",l&&s(l)?React__default.createElement(FormHint,{text:l,className:`${hintStyles}`}):"")};Switch.propTypes={name:PropTypes.string,id:PropTypes.string,label:PropTypes.string,required:PropTypes.bool,size:PropTypes.oneOf(["small","default","large"]),on:PropTypes.bool,disabled:PropTypes.bool,invalid:PropTypes.bool,valid:PropTypes.bool,helptext:PropTypes.node,errortext:PropTypes.node,successtext:PropTypes.node,className:PropTypes.string,onChange:PropTypes.func,onClick:PropTypes.func,wrapperClassName:PropTypes.string};
|
|
54
|
+
${o}`},b),React__default.createElement("span",{className:`juno-switch-handle ${handlebasestyles} ${handlesizestyles(g)} ${t?handleonstyles:handleoffstyles}`})),React__default.createElement(Label,{text:e,htmlFor:B,className:"jn-ml-2",disabled:i,required:f}),v?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error",size:"1.125rem",className:`${iconstyles} ${i?"jn-opacity-50":""}`}):"",x?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success",size:"1.125rem",className:`${iconstyles} ${i?"jn-opacity-50":""}`}):""),m&&s(m)?React__default.createElement(FormHint,{text:m,variant:"error",className:`${hintStyles}`}):"",n&&s(n)?React__default.createElement(FormHint,{text:n,variant:"success",className:`${hintStyles}`}):"",l&&s(l)?React__default.createElement(FormHint,{text:l,className:`${hintStyles}`}):"")};Switch.propTypes={name:PropTypes.string,id:PropTypes.string,label:PropTypes.string,required:PropTypes.bool,size:PropTypes.oneOf(["small","default","large"]),on:PropTypes.bool,disabled:PropTypes.bool,invalid:PropTypes.bool,valid:PropTypes.bool,helptext:PropTypes.node,errortext:PropTypes.node,successtext:PropTypes.node,className:PropTypes.string,onChange:PropTypes.func,onClick:PropTypes.func,wrapperClassName:PropTypes.string};const SwitchRow=a=>{let{name:c=null,label:d=null,id:e=null,on:f=!1,disabled:g=null,helptext:h=null,required:i=null,invalid:j=!1,errortext:k="",valid:l=!1,successtext:m="",className:n="",onChange:o=void 0,onClick:p=void 0,...b}=a;return React__default.createElement(FormRow,null,React__default.createElement(Switch,_extends({name:c,label:d,onChange:o,onClick:p,id:e,on:f,disabled:g,invalid:j,required:i,valid:l,errortext:k,helptext:h,successtext:m,className:n},b)))};SwitchRow.propTypes={name:PropTypes.string,label:PropTypes.string,id:PropTypes.string,on:PropTypes.bool,disabled:PropTypes.bool,helptext:PropTypes.node,required:PropTypes.bool,invalid:PropTypes.bool,errortext:PropTypes.string,valid:PropTypes.bool,successtext:PropTypes.string,className:PropTypes.string,onChange:PropTypes.func,onClick:PropTypes.func};var SwitchRow_component=withDeprecationWarning(SwitchRow,"SwitchRow is deprecated and will be removed in future versions. To be future-proof, use Switch instead.");export{SwitchRow_component as S};
|
package/build/SwitchRow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{S as SwitchRow}from"./SwitchRow.component-
|
|
1
|
+
export{S as SwitchRow}from"./SwitchRow.component-BNceFC47.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";
|
|
@@ -1 +1 @@
|
|
|
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-
|
|
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};
|
package/build/TextInput.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as TextInput}from"./TextInput.component-
|
|
1
|
+
export{T as TextInput}from"./TextInput.component-D1qpmHfA.js";import"./tslib.es6-bjGg6Bxl.js";import"react";import"./Label.component-TbF3yilt.js";import"./Icon.component-7-ap-6Ys.js";import"./widgets-njngpHa5.js";import"./FormHint.component-B30ehV71.js";
|
|
@@ -1 +1 @@
|
|
|
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-
|
|
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};
|
package/build/Textarea.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as Textarea}from"./Textarea.component-
|
|
1
|
+
export{T as Textarea}from"./Textarea.component-BrJM-k2b.js";import"./tslib.es6-bjGg6Bxl.js";import"react";import"./Label.component-TbF3yilt.js";import"./Icon.component-7-ap-6Ys.js";import"./widgets-njngpHa5.js";import"./FormHint.component-B30ehV71.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default from"react";import PropTypes from"prop-types";import{a as StyleProvider}from"./StyleProvider.component-
|
|
1
|
+
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default from"react";import PropTypes from"prop-types";import{a as StyleProvider}from"./StyleProvider.component-DpOVgdlo.js";import{I as Icon}from"./Icon.component-BVkaZqpA.js";const toggleStyles=`
|
|
2
2
|
jn-inline-flex
|
|
3
3
|
jn-justify-center
|
|
4
4
|
jn-items-center
|
package/build/ThemeToggle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as ThemeToggle}from"./ThemeToggle.component-
|
|
1
|
+
export{T as ThemeToggle}from"./ThemeToggle.component-CNb4Nbso.js";import"./_rollupPluginBabelHelpers-B5fk9IVe.js";import"react";import"prop-types";import"./StyleProvider.component-DpOVgdlo.js";import"react-dom";import"./ibm-plex-BfDpQmIi.js";import"./_commonjsHelpers-BxGi5vpY.js";import"./Icon.component-BVkaZqpA.js";import"./widgets-njngpHa5.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* This provider acts as a wrapper for Juno apps. It renders a StyleProvider and PortalProvider
|
|
4
|
+
*/
|
|
5
|
+
export declare const AppShellProvider: ({ shadowRoot, shadowRootMode, stylesWrapper, theme, children, }: AppShellProviderProps) => React.JSX.Element;
|
|
6
|
+
export type AppShellStyleWrapper = "head" | "inline";
|
|
7
|
+
interface WrapperProps {
|
|
8
|
+
/** React nodes or a collection of React nodes to be rendered as content. */
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
/** Whether the app is rendered inside a ShadowRoot. Only choose false if the app is meant to run as a stand-alone application. */
|
|
11
|
+
shadowRoot?: boolean;
|
|
12
|
+
/** Shadow root mode */
|
|
13
|
+
shadowRootMode?: ShadowRootMode;
|
|
14
|
+
}
|
|
15
|
+
export interface AppShellProviderProps extends WrapperProps {
|
|
16
|
+
/** Where app stylesheets are imported. This is only relevant if shadowRoot === false. If you use a ShadowRoot the styles must be inline. */
|
|
17
|
+
stylesWrapper?: AppShellStyleWrapper;
|
|
18
|
+
/** theme: theme-dark or theme-light */
|
|
19
|
+
theme?: "theme-dark" | "theme-light";
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=AppShellProvider.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppShellProvider.component.d.ts","sourceRoot":"","sources":["../../../src/components/AppShellProvider/AppShellProvider.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAiBzB;;GAEG;AACH,eAAO,MAAM,gBAAgB,oEAM1B,qBAAqB,sBAQvB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEpD,UAAU,YAAY;IACpB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,kIAAkI;IAClI,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uBAAuB;IACvB,cAAc,CAAC,EAAE,cAAc,CAAA;CAChC;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,4IAA4I;IAC5I,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,uCAAuC;IACvC,KAAK,CAAC,EAAE,YAAY,GAAG,aAAa,CAAA;CACrC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/** A basic CodeBlock component. Accepts a content prop or children. Will render a pre-wrapped code element. */
|
|
3
|
+
export declare const CodeBlock: ({ content, children, heading, wrap, size, copy, lang, className, ...props }: CodeBlockProps) => React.JSX.Element;
|
|
4
|
+
type CodeBlockSize = "auto" | "small" | "medium" | "large";
|
|
5
|
+
export interface CodeBlockProps {
|
|
6
|
+
/** The content to render. Will override children if passed. */
|
|
7
|
+
content?: string | object;
|
|
8
|
+
/** The children to render. Will be overridden by content prop if passed as well. */
|
|
9
|
+
children?: React.ReactNode | object;
|
|
10
|
+
/** Pass at title to render. Will look like a single tab. */
|
|
11
|
+
heading?: string;
|
|
12
|
+
/** Set whether the code should wrap or not. Default is true. */
|
|
13
|
+
wrap?: boolean;
|
|
14
|
+
/** Set the size of the CodeBlock. Default is "auto" */
|
|
15
|
+
size?: CodeBlockSize;
|
|
16
|
+
/** Render a button to copy the code to the clipboard. Defaults to true */
|
|
17
|
+
copy?: boolean;
|
|
18
|
+
/** Pass a lang prop. Passing "json" will render a fully-featured JsonView. Will also add a data-lang-attribute to the codeblock */
|
|
19
|
+
lang?: string;
|
|
20
|
+
/** Add a custom className to the wrapper of the CodeBlock */
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=CodeBlock.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeBlock.component.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/CodeBlock.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAsG5D,gHAAgH;AAChH,eAAO,MAAM,SAAS,gFAUnB,cAAc,sBA6DhB,CAAA;AAED,KAAK,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE1D,MAAM,WAAW,cAAc;IAC7B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;IACnC,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gEAAgE;IAChE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,uDAAuD;IACvD,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,mIAAmI;IACnI,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CodeBlock/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { KnownIcons } from "../Icon/Icon.component";
|
|
3
|
+
export interface ContextMenuProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
icon?: KnownIcons;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** A context menu with a toggle. */
|
|
10
|
+
export declare const ContextMenu: React.FC<ContextMenuProps>;
|
|
11
|
+
//# sourceMappingURL=ContextMenu.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextMenu.component.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/ContextMenu.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAKlD,OAAO,EAAQ,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAgCzD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,oCAAoC;AACpC,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsDlD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContextMenu/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { ReactNode, FormHTMLAttributes } from "react";
|
|
2
|
+
export interface FormProps extends FormHTMLAttributes<HTMLFormElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Title for the form.
|
|
5
|
+
*/
|
|
6
|
+
title?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Additional CSS classes to apply to the form for custom styling.
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Content to render inside the form.
|
|
13
|
+
* This can include FormSections, FormGroups, and other form elements.
|
|
14
|
+
*/
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A Form component used to encapsulate FormSections and/or FormGroups.
|
|
19
|
+
* Can be used to build complex forms with structured sections.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Form: React.FC<FormProps>;
|
|
22
|
+
//# sourceMappingURL=Form.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.component.d.ts","sourceRoot":"","sources":["../../../src/components/Form/Form.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAY5D,MAAM,WAAW,SAAU,SAAQ,kBAAkB,CAAC,eAAe,CAAC;IACpE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAOpC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
type FormHintVariant = "help" | "error" | "success";
|
|
3
|
-
export declare const FormHint: {
|
|
4
|
-
({ children, text, variant, className, ...props }: FormHintProps): React.JSX.Element;
|
|
5
|
-
displayName: string;
|
|
6
|
-
};
|
|
7
3
|
export interface FormHintProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
8
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* The content to render as a hint for a form element.
|
|
6
|
+
* If children are provided, they will take precedence over text.
|
|
7
|
+
*/
|
|
9
8
|
children?: ReactNode;
|
|
10
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* The text to render as a hint for a form element.
|
|
11
|
+
* Overridden by children, if provided.
|
|
12
|
+
*/
|
|
11
13
|
text?: ReactNode | string;
|
|
12
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The variant of the hint ("help", "error", or "success") determining its appearance.
|
|
16
|
+
*/
|
|
13
17
|
variant?: FormHintVariant;
|
|
14
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* Additional CSS classes to apply to the form hint for custom styling.
|
|
20
|
+
*/
|
|
15
21
|
className?: string;
|
|
16
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* A FormHint component used to provide contextual help, error, or success messages associated with form elements.
|
|
25
|
+
*/
|
|
26
|
+
export declare const FormHint: React.FC<FormHintProps>;
|
|
17
27
|
export {};
|
|
18
28
|
//# sourceMappingURL=FormHint.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormHint.component.d.ts","sourceRoot":"","sources":["../../../src/components/FormHint/FormHint.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOxC,KAAK,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"FormHint.component.d.ts","sourceRoot":"","sources":["../../../src/components/FormHint/FormHint.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOxC,KAAK,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAEnD,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC1E;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAEzB;;OAEG;IACH,OAAO,CAAC,EAAE,eAAe,CAAA;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAaD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqB5C,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface FormRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Content to render inside FormRow.
|
|
5
|
+
* Typically, these will be form elements such as TextInput, Textarea, Select, Radio, CheckboxGroups, etc.
|
|
6
|
+
*/
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Additional CSS classes to apply to the FormRow for custom styling.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A generic FormRow component used to layout and structure form elements.
|
|
15
|
+
* It serves as a container for form elements such as TextInput, Textarea, Select, Radio, CheckboxGroups etc.
|
|
16
|
+
*/
|
|
17
|
+
export declare const FormRow: React.FC<FormRowProps>;
|
|
18
|
+
//# sourceMappingURL=FormRow.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormRow.component.d.ts","sourceRoot":"","sources":["../../../src/components/FormRow/FormRow.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACxE;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAM1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormRow/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from "react";
|
|
2
|
+
export interface FormSectionProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Title for the form section.
|
|
5
|
+
*/
|
|
6
|
+
title?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Additional CSS classes to apply to the form section for custom styling.
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Content to be rendered within the form section.
|
|
13
|
+
* This can include form elements and other React nodes.
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* FormSection component for grouping form elements within complex forms.
|
|
19
|
+
*/
|
|
20
|
+
export declare const FormSection: React.FC<FormSectionProps>;
|
|
21
|
+
//# sourceMappingURL=FormSection.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSection.component.d.ts","sourceRoot":"","sources":["../../../src/components/FormSection/FormSection.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAa7C,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,WAAW,CAAC;IACnE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAOlD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormSection/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Controls whether columns should auto-size.
|
|
5
|
+
* If true, this will override the default 12-column grid layout.
|
|
6
|
+
*/
|
|
7
|
+
auto?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Elements to be rendered within the grid.
|
|
10
|
+
*/
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Additional CSS classes to apply to the grid for custom styling.
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A general-use grid component.
|
|
19
|
+
* Used in conjunction with GridColumn and GridRow components to create a flexible grid layout.
|
|
20
|
+
*/
|
|
21
|
+
export declare const Grid: React.FC<GridProps>;
|
|
22
|
+
//# sourceMappingURL=Grid.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.component.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/Grid.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAQpC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Grid/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface GridColumnProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* The number of columns to span the column over.
|
|
5
|
+
*/
|
|
6
|
+
cols?: number;
|
|
7
|
+
/**
|
|
8
|
+
* The width in percent.
|
|
9
|
+
* If a width is given, it will override the 'cols' prop.
|
|
10
|
+
*/
|
|
11
|
+
width?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Determines whether the column should set an auto width.
|
|
14
|
+
*/
|
|
15
|
+
auto?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Additional CSS classes to apply to the grid column for custom styling.
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Content to be rendered inside the column.
|
|
22
|
+
*/
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A flexible grid column component used within a Grid.
|
|
27
|
+
*/
|
|
28
|
+
export declare const GridColumn: React.FC<GridColumnProps>;
|
|
29
|
+
//# sourceMappingURL=GridColumn.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridColumn.component.d.ts","sourceRoot":"","sources":["../../../src/components/GridColumn/GridColumn.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAmCzB,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6BhD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GridColumn/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Elements to be rendered within the grid row.
|
|
5
|
+
* Typically, these would be GridColumn components.
|
|
6
|
+
*/
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Additional CSS classes to apply to the grid row for custom styling.
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A grid row container to hold GridColumn elements inside a Grid.
|
|
15
|
+
* This component ensures that its children are wrapped correctly in a flexbox layout.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GridRow: React.FC<GridRowProps>;
|
|
18
|
+
//# sourceMappingURL=GridRow.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridRow.component.d.ts","sourceRoot":"","sources":["../../../src/components/GridRow/GridRow.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACxE;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAM1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GridRow/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -7,7 +7,7 @@ export declare const JsonViewer: ({ data, showRoot, toolbar, theme, expanded, in
|
|
|
7
7
|
type ThemeType = "dark" | "light";
|
|
8
8
|
export interface JsonViewerProps extends Omit<React.HTMLProps<HTMLDivElement>, "data"> {
|
|
9
9
|
/** Pass a valid json. Required. */
|
|
10
|
-
data: object | object[];
|
|
10
|
+
data: string | object | object[];
|
|
11
11
|
/** pass a styles object */
|
|
12
12
|
style?: object;
|
|
13
13
|
/** show toolbar */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonViewer.component.d.ts","sourceRoot":"","sources":["../../../src/components/JsonViewer/JsonViewer.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,OAAO,EAAsC,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AA0B3F,eAAO,MAAM,iBAAiB,UAAW,OAAO,KAAG,kBAiBlD,CAAA;AA4SD,qDAAqD;AACrD,eAAO,MAAM,UAAU,oGAWpB,eAAe,sBA0CjB,CAAA;AAED,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;AAEjC,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACpF,oCAAoC;IAEpC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"JsonViewer.component.d.ts","sourceRoot":"","sources":["../../../src/components/JsonViewer/JsonViewer.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,OAAO,EAAsC,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AA0B3F,eAAO,MAAM,iBAAiB,UAAW,OAAO,KAAG,kBAiBlD,CAAA;AA4SD,qDAAqD;AACrD,eAAO,MAAM,UAAU,oGAWpB,eAAe,sBA0CjB,CAAA;AAED,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;AAEjC,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACpF,oCAAoC;IAEpC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;IAChC,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,eAAe,GAAG,SAAS,GAAG,IAAI,CAAA;IACjD,sHAAsH;IACtH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAE3B,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAE3B,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface MenuProps {
|
|
3
|
+
/** The children to render in the MenuSection */
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
/** Whether the Menu will be in normal or small variant */
|
|
6
|
+
variant?: "small" | "normal";
|
|
7
|
+
/** Pass a custom className to the menu */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
interface MenuContextType {
|
|
11
|
+
variant: "small" | "normal";
|
|
12
|
+
}
|
|
13
|
+
export declare const MenuContext: React.Context<MenuContextType | undefined>;
|
|
14
|
+
/** A generic menu component */
|
|
15
|
+
export declare const Menu: React.FC<MenuProps>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=Menu.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.component.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/Menu.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAmB5C,MAAM,WAAW,SAAS;IACxB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC5B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAA;CAC5B;AACD,eAAO,MAAM,WAAW,4CAAwD,CAAA;AAEhF,+BAA+B;AAC/B,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAwBpC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { MouseEvent, FC } from "react";
|
|
2
|
+
import { KnownIconsEnum } from "../Icon/Icon.component";
|
|
3
|
+
export interface MenuItemProps {
|
|
4
|
+
/** Children of the menu item */
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/** Pass a custom className to the menu item */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Whether the menu item is disabled */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Pass the name of an icon the button should show. Can be any icon included with Juno. */
|
|
11
|
+
icon?: keyof typeof KnownIconsEnum;
|
|
12
|
+
/** The label of the menu item. Will take precedence over children passed to the component. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Pass an href to the menu item. Will result in the menu item being rendered as an `<a>`. */
|
|
15
|
+
href?: string;
|
|
16
|
+
/** Pass an onClick handler to the menu item. Will result in the menu item being rendered as a `<button>`. */
|
|
17
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
A menu item to be used inside Menu.
|
|
21
|
+
Can render `<a>`, `<button>`, or `<div>` based on props.
|
|
22
|
+
*/
|
|
23
|
+
export declare const MenuItem: FC<MenuItemProps>;
|
|
24
|
+
//# sourceMappingURL=MenuItem.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuItem.component.d.ts","sourceRoot":"","sources":["../../../src/components/MenuItem/MenuItem.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAc,UAAU,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,EAAQ,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAiC7D,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2FAA2F;IAC3F,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAA;IAClC,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8FAA8F;IAC9F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6GAA6G;IAE7G,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;CACzD;AAMD;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CA4CtC,CAAA"}
|