@cloudoperators/juno-ui-components 2.29.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/{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/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/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/{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/{Select.component-qFgtNL11.js → Select.component-BpoPsXOT.js} +1 -1
- package/build/Select.js +1 -1
- package/build/SelectOption.js +1 -1
- package/build/{Switch.component-B6d9ASOX.js → Switch.component-BxCFYGD_.js} +1 -1
- package/build/Switch.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/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/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/index.js +1 -1
- package/package.json +1 -1
- 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/NativeSelectOption.component-ozgJZgGf.js +0 -1
- package/build/NativeSelectOptionGroup.component-kDCnJXl8.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useContext,useState,useEffect,useMemo,useId}from"react";import{a as CheckboxGroupContext}from"./CheckboxGroup.component-
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useContext,useState,useEffect,useMemo,useId}from"react";import{a as CheckboxGroupContext}from"./CheckboxGroup.component-DJN7waSM.js";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-flex\n jn-items-center\n",inputstyles="\n jn-w-4\n jn-h-4\n jn-opacity-0\n jn-z-50\n",mockcheckboxstyles="\n jn-relative\n jn-w-4\n jn-h-4\n jn-rounded-sm\n jn-bg-theme-checkbox\n jn-cursor-pointer\n focus:jn-outline-none\n focus:jn-ring-2\n focus:jn-ring-theme-focus\n",mockfocusstyles="\n jn-ring-2\n jn-ring-theme-focus\n",mockcheckmarkstyles="\n jn-absolute\n jn-top-0\n jn-left-0\n jn-text-theme-checkbox-checked\n jn-fill-current\n",mockindeterminatestyles="\n jn-absolute\n jn-w-2\n jn-h-0.5\n jn-top-1.5\n jn-left-[.2rem]\n jn-inline-block\n jn-bg-theme-focus\n",mockdisabledstyles="\n jn-pointer-events-none\n jn-opacity-50\n jn-cursor-not-allowed\n",noBorderStyles="\n jn-border\n jn-border-transparent\n",errorstyles="\n jn-border\n jn-border-theme-error\n",successstyles="\n jn-border\n jn-border-theme-success\n",labelStyles="\n jn-leading-0\n jn-ml-2\n",iconStyles="\n jn-ml-1\n",hintStyles="\n jn-mt-0\n jn-ml-6\n",Checkbox=function(a){var b=a.checked,c=void 0!==b&&b,d=a.className,e=void 0===d?"":d,f=a.disabled,g=void 0!==f&&f,h=a.errortext,i=void 0===h?"":h,j=a.helptext,k=void 0===j?"":j,l=a.id,m=void 0===l?"":l,n=a.indeterminate,o=void 0!==n&&n,p=a.invalid,q=void 0!==p&&p,r=a.label,s=a.name,t=void 0===s?"":s,u=a.onChange,v=a.onClick,w=a.required,x=a.successtext,y=void 0===x?"":x,z=a.valid,A=void 0!==z&&z,B=a.value,C=__rest(a,["checked","className","disabled","errortext","helptext","id","indeterminate","invalid","label","name","onChange","onClick","required","successtext","valid","value"]),D=function(a){return"string"!=typeof a||0!==a.trim().length},E=useContext(CheckboxGroupContext),F=E||{},G=F.selectedOptions,H=F.name,I=F.disabled,J=F.handleCheckboxChange,K=F.updateSelectedValue,L=useState(function(){return E?!!(G&&G.includes(B)):!!c}()),M=L[0],N=L[1],O=useState(!1),P=O[0],Q=O[1],R=useState(!1),S=R[0],T=R[1],U=useState(!1),V=U[0],W=U[1],X=useState(!1),Y=X[0],Z=X[1];useEffect(function(){c&&E&&K&&K(B)},[]),useEffect(function(){E||N(c)},[c]);var $=useMemo(function(){return q||!!(i&&D(i))},[q,i]),_=useMemo(function(){return A||!!(y&&D(y))},[A,y]);useEffect(function(){Q(o)},[o]),useEffect(function(){W($)},[$]),useEffect(function(){Z(_)},[_]);var aa=function(){return E?!!(G&&G.includes(B)):M},ba=m||function(){return"juno-checkbox-"+useId()}();return React__default.createElement("div",{className:"jn-checkbox-outer"},React__default.createElement("div",{className:"jn-checkbox-wrapper ".concat(wrapperStyles)},React__default.createElement("div",__assign({className:"\n juno-checkbox \n ".concat(mockcheckboxstyles," \n ").concat(S?mockfocusstyles:""," \n ").concat(I||g?mockdisabledstyles:""," \n ").concat(V?errorstyles:""," \n ").concat(Y?successstyles:""," \n ").concat(V||Y?"":noBorderStyles,"\n ").concat(e,"\n ")},C),aa()?(React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"".concat(mockcheckmarkstyles),width:"16",height:"16",viewBox:"0 0 16 16"},React__default.createElement("polygon",{points:"5.75 11.15 2.6 8 1.55 9.05 5.75 13.25 14.75 4.25 13.7 3.2"}))):"",React__default.createElement("input",{checked:aa(),className:"\n ".concat(inputstyles," \n ").concat(V?"juno-checkbox-invalid":""," \n ").concat(Y?"juno-checkbox-valid":""," \n ").concat(I||g?"jn-cursor-not-allowed":"","\n "),disabled:I||g,id:ba,name:H||t,onBlur:function(){T(!1)},onChange:function(a){N(!M),J&&"function"==typeof J&&J(B),u&&u(a)},onClick:function(a){v&&v(a)},onFocus:function(){T(!0)},type:"checkbox",value:B}),P&&!aa()?React__default.createElement("div",{className:"".concat(mockindeterminatestyles)}):""),r&&D(r)?(React__default.createElement(React__default.Fragment,null,React__default.createElement(Label,{text:r,htmlFor:ba,disabled:I||g,required:void 0!==w&&w,className:"".concat(labelStyles)}),V?(React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error",size:"1.125rem",className:"\n ".concat(iconStyles,"\n ").concat(I||g?"jn-opacity-50":"","\n ")})):"",Y?(React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success",size:"1.125rem",className:"\n ".concat(iconStyles,"\n ").concat(g?"jn-opacity-50":"","\n ")})):"")):""),i&&D(i)?(React__default.createElement(FormHint,{text:i,variant:"error",className:"".concat(hintStyles)})):"",y&&D(y)?(React__default.createElement(FormHint,{text:y,variant:"success",className:"".concat(hintStyles)})):"",k&&D(k)?React__default.createElement(FormHint,{text:k,className:"".concat(hintStyles)}):"")};export{Checkbox as C};
|
package/build/Checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as Checkbox}from"./Checkbox.component-
|
|
1
|
+
export{C as Checkbox}from"./Checkbox.component-DxULmNji.js";import"./tslib.es6-bjGg6Bxl.js";import"react";import"./CheckboxGroup.component-DJN7waSM.js";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,b as __spreadArray}from"./tslib.es6-bjGg6Bxl.js";import React__default,{createContext,useState,useMemo,useEffect,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,b as __spreadArray}from"./tslib.es6-bjGg6Bxl.js";import React__default,{createContext,useState,useMemo,useEffect,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 checkboxgroupstyles="\n jn-mb-4\n jn-last:mb-0\n",groupstyles="\n jn-relative\n jn-rounded\n jn-border\n jn-py-1\n",defaultgroupstyles="\n jn-border-transparent\n",validgroupstyles="\n jn-border-theme-success\n jn-px-2\n",invalidgroupstyles="\n jn-border-theme-error\n jn-px-2\n",iconstyles="\n jn-absolute\n jn-right-2\n jn-top-1.5\n",CheckboxGroupContext=createContext(void 0),CheckboxGroup=function(a){var b=a.children,c=void 0===b?null:b,d=a.className,e=void 0===d?"":d,f=a.disabled,g=void 0!==f&&f,h=a.errortext,i=void 0===h?"":h,j=a.helptext,k=void 0===j?"":j,l=a.id,m=void 0===l?"":l,n=a.invalid,o=void 0!==n&&n,p=a.label,q=a.name,r=void 0===q?"":q,s=a.onChange,t=a.required,u=a.selected,v=a.successtext,w=void 0===v?"":v,x=a.valid,y=void 0!==x&&x,z=__rest(a,["children","className","disabled","errortext","helptext","id","invalid","label","name","onChange","required","selected","successtext","valid"]),A=function(a){return"string"!=typeof a||0!==a.trim().length},B=function(){return"juno-checkboxgroup-"+useId()},C=r||B(),D=m||B(),E=useState(u),F=E[0],G=E[1],H=useState(!1),I=H[0],J=H[1],K=useState(!1),L=K[0],M=K[1],N=useMemo(function(){return y||!!(w&&w.length)},[y,w]),O=useMemo(function(){return o||!!(i&&i.length)},[o,i]);useEffect(function(){u&&G(u)},[u]),useEffect(function(){J(N)},[N]),useEffect(function(){M(O)},[O]);return React__default.createElement(CheckboxGroupContext.Provider,{value:{selectedOptions:F,name:C,disabled:g,handleCheckboxChange:function(a){var b=a;F&&F.includes(a)?G(F.filter(function(a){return a!==b})):F&&!F.includes(a)?G(function(a){return __spreadArray(__spreadArray([],a||[],!0),[b],!1)}):G([b]),s&&s(a)},updateSelectedValue:function(a){u||G(function(b){return __spreadArray(__spreadArray([],b||[],!0),[a],!1)})}}},React__default.createElement("div",__assign({className:"\n juno-checkboxgroup \n ".concat(I?"juno-checkboxgroup-valid":""," \n ").concat(L?"juno-checkboxgroup-invalid":""," \n ").concat(checkboxgroupstyles," \n ").concat(e,"\n "),id:D,role:"group"},z),p&&A(p)?(React__default.createElement(Label,{text:p,htmlFor:D,disabled:g,required:void 0!==t&&t})):"",React__default.createElement("div",{className:"\n juno-checkbox-group-options \n ".concat(groupstyles," \n ").concat(I?validgroupstyles:""," \n ").concat(L?invalidgroupstyles:""," \n ").concat(I||L?"":defaultgroupstyles,"\n ")},L?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error",className:"".concat(iconstyles)}):"",I?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success",className:"".concat(iconstyles)}):"",c),i&&A(i)?React__default.createElement(FormHint,{text:i,variant:"error"}):"",w&&A(w)?React__default.createElement(FormHint,{text:w,variant:"success"}):"",k&&A(k)?React__default.createElement(FormHint,{text:k}):""))};export{CheckboxGroup as C,CheckboxGroupContext as a};
|
package/build/CheckboxGroup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as CheckboxGroup}from"./CheckboxGroup.component-
|
|
1
|
+
export{C as CheckboxGroup}from"./CheckboxGroup.component-DJN7waSM.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 from"react";import{C as Checkbox}from"./Checkbox.component-
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{C as Checkbox}from"./Checkbox.component-DxULmNji.js";import{w as withDeprecationWarning}from"./withDeprecationWarning.component-DQTD5UdI.js";var CheckboxRow=function(a){var b=a.value,c=void 0===b?"":b,d=a.checked,e=a.indeterminate,f=a.name,g=void 0===f?void 0:f,h=a.label,i=void 0===h?void 0:h,j=a.id,k=void 0===j?void 0:j,l=a.helptext,m=void 0===l?void 0:l,n=a.required,o=void 0===n?void 0:n,p=a.disabled,q=a.invalid,r=a.errortext,s=void 0===r?"":r,t=a.valid,u=a.successtext,v=void 0===u?"":u,w=a.className,x=void 0===w?"":w,y=a.onChange,z=__rest(a,["value","checked","indeterminate","name","label","id","helptext","required","disabled","invalid","errortext","valid","successtext","className","onChange"]);return React__default.createElement(Checkbox,__assign({value:c,checked:void 0!==d&&d,indeterminate:void 0!==e&&e,name:g,label:i,id:k,helptext:m,disabled:void 0!==p&&p,required:o,invalid:void 0!==q&&q,valid:void 0!==t&&t,errortext:s,successtext:v,className:x,onChange:y},z))},CheckboxRow_component=withDeprecationWarning(CheckboxRow,"CheckboxRow is deprecated and will be removed in future versions. To be future-proof, use Checkbox instead.");export{CheckboxRow_component as C};
|
package/build/CheckboxRow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as CheckboxRow}from"./CheckboxRow.component-
|
|
1
|
+
export{C as CheckboxRow}from"./CheckboxRow.component-CrN2DXEm.js";import"./tslib.es6-bjGg6Bxl.js";import"react";import"./Checkbox.component-DxULmNji.js";import"./CheckboxGroup.component-DJN7waSM.js";import"./Label.component-TbF3yilt.js";import"./Icon.component-7-ap-6Ys.js";import"./widgets-njngpHa5.js";import"./FormHint.component-B30ehV71.js";import"./withDeprecationWarning.component-DQTD5UdI.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import React__default,{useState,useEffect}from"react";import{p as pr}from"./headlessui-float-lyiwAWIX.js";import{o as offset,a as autoPlacement,s as size,b as shift}from"./floating-ui.react-dom-DmTNS6Kr.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";import{q as qe}from"./menu-DiwXZMR-.js";var menuStyles="\n jn-overflow-hidden\n jn-flex\n jn-flex-col\n jn-rounded\n jn-bg-theme-background-lvl-1\n",toggleStyles="\n hover:jn-text-theme-accent\n active:jn-text-theme-accent\n",toggleOpenStyle="\n jn-text-theme-accent\n",ContextMenu=function(a){var b=a.children,c=void 0===b?null:b,d=a.open,e=void 0!==d&&d,f=useState(!1),g=f[0],h=f[1];useEffect(function(){h(e)},[e]);var i=[offset(4),autoPlacement({crossAxis:!0,allowedPlacements:["top-start","top-end","bottom-start","bottom-end"]}),size({boundary:"viewport",apply:function(a){var b=a.availableWidth,c=a.availableHeight,d=a.elements;Object.assign(d.floating.style,{maxWidth:"".concat(b,"px"),maxHeight:"".concat(c,"px"),overflowY:"auto"})}}),shift()];return React__default.createElement(qe,null,React__default.createElement(pr,{middleware:i},React__default.createElement(qe.Button,{onClick:function(){h(!g)},className:"\n juno-contextmenu-toggle \n ".concat(toggleStyles," \n ").concat(g?toggleOpenStyle:"","\n ")},React__default.createElement(Icon,{icon:"moreVert"})),React__default.createElement(qe.Items,{className:"".concat(menuStyles)},c)))};export{ContextMenu as C};
|
package/build/ContextMenu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{C as ContextMenu}from"./ContextMenu.component-
|
|
1
|
+
export{C as ContextMenu}from"./ContextMenu.component-DyB2n7er.js";import"react";import"./headlessui-float-lyiwAWIX.js";import"react-dom";import"./keyboard-D0PLkOsr.js";import"./floating-ui.react-dom-DmTNS6Kr.js";import"./Icon.component-7-ap-6Ys.js";import"./tslib.es6-bjGg6Bxl.js";import"./widgets-njngpHa5.js";import"./menu-DiwXZMR-.js";import"./use-text-value-DK9HMXni.js";import"./use-tree-walker-BOLu2dNf.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{C as Checkbox}from"./Checkbox.component-
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{C as Checkbox}from"./Checkbox.component-DxULmNji.js";import{D as DataGridCell}from"./DataGridCell.component-DTZCr2iq.js";import"./CheckboxGroup.component-DJN7waSM.js";import"./Label.component-TbF3yilt.js";import"./Icon.component-7-ap-6Ys.js";import"./widgets-njngpHa5.js";import"./FormHint.component-B30ehV71.js";import"./DataGrid.component-BBT0bs34.js";var DataGridCheckboxCell=function(a){var b=a.selected,c=a.disabled,d=a.className,e=void 0===d?"":d,f=a.onChange,g=__rest(a,["selected","disabled","className","onChange"]);return React__default.createElement(DataGridCell,__assign({className:"juno-datagrid-checkbox-cell ".concat(e)},g),React__default.createElement(Checkbox,{disabled:void 0!==c&&c,checked:void 0!==b&&b,onChange:f}))};export{DataGridCheckboxCell};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{useState,useEffect}from"react";import PropTypes from"prop-types";import{I as Icon}from"./Icon.component-BVkaZqpA.js";import{S as Spinner}from"./Spinner.component-3BfGSLKB.js";const selectstyles=`
|
|
1
|
+
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{useState,useEffect}from"react";import PropTypes from"prop-types";import{I as Icon}from"./Icon.component-BVkaZqpA.js";import{S as Spinner}from"./Spinner.component-3BfGSLKB.js";import{T as TextInput}from"./TextInput.component-CkNlIlj0.js";const selectstyles=`
|
|
2
2
|
jn-w-full
|
|
3
3
|
jn-bg-theme-select
|
|
4
4
|
jn-text-theme-high
|
|
@@ -75,4 +75,29 @@ import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React_
|
|
|
75
75
|
`,NativeSelect=a=>{let{name:f=null,id:g="",children:b,className:h="",disabled:i=null,invalid:j=!1,valid:k=!1,loading:l=!1,error:m=!1,onChange:c,onClick:d,wrapperClassName:n="",...e}=a;const[o,p]=useState(!1),[q,r]=useState(!1),[s,t]=useState(!1),[u,v]=useState(!1);useEffect(()=>{p(l)},[l]),useEffect(()=>{r(j)},[j]),useEffect(()=>{t(k)},[k]),useEffect(()=>{v(m)},[m]);return React__default.createElement("div",{className:`
|
|
76
76
|
juno-select-wrapper
|
|
77
77
|
${wrapperstyles}
|
|
78
|
-
${n}`},React__default.createElement("select",_extends({name:f||"Unnamed Select",id:g,className:`juno-select ${selectstyles} ${q?"juno-select-invalid "+errorstyles:""} ${s?"juno-select-valid "+successstyles:""} ${u?"juno-select-error ":""} ${(()=>s||q?iconpaddingright:defaultpaddingright)()} ${h}`,onChange:a=>{c&&c(a)},onClick:a=>{d&&d(a)},disabled:i||o||u},e),b),React__default.createElement(a=>{let{disabled:b}=a;return o?React__default.createElement("div",{className:`juno-select-loading ${loadingStyles}`},React__default.createElement(Spinner,{className:`${loadingSpinnerStyles}`})):u?React__default.createElement("div",{className:`juno-select-errortext ${errorStyles}`},React__default.createElement(Icon,{icon:"errorOutline",color:"jn-text-theme-error",className:`${errorIconStyles}`})):React__default.createElement("div",{className:`${iconstyles} ${b?disablediconstyles:""} `},q?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}):null,s?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}):null,React__default.createElement(Icon,{icon:"expandMore"}))},{disabled:i}))};NativeSelect.propTypes={name:PropTypes.string,id:PropTypes.string,className:PropTypes.string,children:PropTypes.node,disabled:PropTypes.bool,invalid:PropTypes.bool,valid:PropTypes.bool,loading:PropTypes.bool,error:PropTypes.bool,onChange:PropTypes.func,onClick:PropTypes.func,wrapperClassName:PropTypes.string};
|
|
78
|
+
${n}`},React__default.createElement("select",_extends({name:f||"Unnamed Select",id:g,className:`juno-select ${selectstyles} ${q?"juno-select-invalid "+errorstyles:""} ${s?"juno-select-valid "+successstyles:""} ${u?"juno-select-error ":""} ${(()=>s||q?iconpaddingright:defaultpaddingright)()} ${h}`,onChange:a=>{c&&c(a)},onClick:a=>{d&&d(a)},disabled:i||o||u},e),b),React__default.createElement(a=>{let{disabled:b}=a;return o?React__default.createElement("div",{className:`juno-select-loading ${loadingStyles}`},React__default.createElement(Spinner,{className:`${loadingSpinnerStyles}`})):u?React__default.createElement("div",{className:`juno-select-errortext ${errorStyles}`},React__default.createElement(Icon,{icon:"errorOutline",color:"jn-text-theme-error",className:`${errorIconStyles}`})):React__default.createElement("div",{className:`${iconstyles} ${b?disablediconstyles:""} `},q?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}):null,s?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}):null,React__default.createElement(Icon,{icon:"expandMore"}))},{disabled:i}))};NativeSelect.propTypes={name:PropTypes.string,id:PropTypes.string,className:PropTypes.string,children:PropTypes.node,disabled:PropTypes.bool,invalid:PropTypes.bool,valid:PropTypes.bool,loading:PropTypes.bool,error:PropTypes.bool,onChange:PropTypes.func,onClick:PropTypes.func,wrapperClassName:PropTypes.string};const NativeSelectOption=a=>{let{value:c=null,label:d=null,disabled:e=!1,className:f="",...b}=a;return React__default.createElement("option",_extends({value:c,disabled:e,className:`juno-select-option ${f}`},b),d||c)};NativeSelectOption.propTypes={label:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),disabled:PropTypes.bool,className:PropTypes.string};const wrapperStyles=`
|
|
79
|
+
jn-flex
|
|
80
|
+
jn-relative
|
|
81
|
+
jn-p-px
|
|
82
|
+
jn-border
|
|
83
|
+
jn-rounded
|
|
84
|
+
jn-bg-theme-filter-input
|
|
85
|
+
`,defaultWrapperStyles=`
|
|
86
|
+
jn-border-theme-filter-input
|
|
87
|
+
`,errorWrapperStyles=`
|
|
88
|
+
jn-border-theme-error
|
|
89
|
+
`,selectStyles=`
|
|
90
|
+
jn-rounded-r-none
|
|
91
|
+
`,textInputStyles=`
|
|
92
|
+
jn-grow
|
|
93
|
+
jn-rounded-l-none
|
|
94
|
+
jn-pr-16
|
|
95
|
+
!jn-bg-theme-filter-input-textinput
|
|
96
|
+
focus:jn-z-40
|
|
97
|
+
`,iconWrapperStyles=`
|
|
98
|
+
jn-absolute
|
|
99
|
+
jn-flex
|
|
100
|
+
jn-right-2
|
|
101
|
+
jn-top-1.5
|
|
102
|
+
jn-z-50
|
|
103
|
+
`,FilterInput=a=>{let{keyLabel:d="Select Filter",options:e=[],selectedFilterKey:f="",onSelectedFilterKeyChange:g=void 0,valueLabel:h="Filter by Value",filterValue:i="",valuePlaceholder:j="",onFilterValueChange:k=void 0,onClear:l=void 0,onFilter:m=void 0,loading:n=!1,className:o="",error:p=!1,onKeyPress:b,...c}=a;const[q,r]=useState(f),[s,t]=useState(i),[u,v]=useState(1>e.length||n),[w,x]=useState(p);useEffect(()=>{t(i)},[i]),useEffect(()=>{r(f)},[f]),useEffect(()=>{1>e.length||n?(v(!0),t("")):v(!1)},[e,n]),useEffect(()=>{x(p)},[p]);return React__default.createElement("div",_extends({className:`juno-filter-input ${wrapperStyles} ${u?"juno-filter-input-loading ":""} ${w?"juno-filter-input-error ":""} ${w?errorWrapperStyles:defaultWrapperStyles} ${o}`},c),React__default.createElement("div",null,React__default.createElement(NativeSelect,{className:`juno-filter-input-select ${selectStyles}`,"aria-label":d,value:q,onChange:a=>{r(a.target.value),t(""),g&&g(a)},loading:u,error:w},React__default.createElement(NativeSelectOption,{label:d||"Select Filter",value:""}),e.map((a,b)=>React__default.createElement(NativeSelectOption,_extends({label:a.label,value:a.key,key:`${b}`},a))))),React__default.createElement(TextInput,{value:s,className:`${textInputStyles}`,"aria-label":h,onChange:a=>{t(a.target.value),k&&k(a)},onKeyPress:a=>{"Enter"===a.key&&m&&m&&m(s),b&&b(a)},disabled:u||w,placeholder:u?"Loading Filter Options\u2026":j}),React__default.createElement("div",{className:`${iconWrapperStyles}`},s&&s.length?React__default.createElement(Icon,{icon:"close",title:"Clear",size:"18",className:`jn-mr-2`,onClick:a=>{t(""),l&&l(a)}}):null,React__default.createElement(Icon,{icon:"filterAlt",title:"Filter",disabled:u||w,onClick:()=>{m&&m(s)}})))};FilterInput.propTypes={keyLabel:PropTypes.string,options:PropTypes.arrayOf(PropTypes.object),selectedFilterKey:PropTypes.string,onSelectedFilterKeyChange:PropTypes.func,valueLabel:PropTypes.string,filterValue:PropTypes.string,valuePlaceholder:PropTypes.string,onFilterValueChange:PropTypes.func,onClear:PropTypes.func,onKeyPress:PropTypes.func,loading:PropTypes.bool,className:PropTypes.string,onFilter:PropTypes.func,error:PropTypes.bool};export{FilterInput as F};
|
package/build/FilterInput.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{F as FilterInput}from"./FilterInput.component-
|
|
1
|
+
export{F as FilterInput}from"./FilterInput.component-CBfEzQ3x.js";import"./_rollupPluginBabelHelpers-B5fk9IVe.js";import"react";import"prop-types";import"./Icon.component-BVkaZqpA.js";import"./widgets-njngpHa5.js";import"./Spinner.component-3BfGSLKB.js";import"./TextInput.component-CkNlIlj0.js";import"./FormHint.component-BPhoMz7f.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{useState,useEffect}from"react";import PropTypes from"prop-types";import{F as FilterInput}from"./FilterInput.component-
|
|
1
|
+
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{useState,useEffect}from"react";import PropTypes from"prop-types";import{F as FilterInput}from"./FilterInput.component-CBfEzQ3x.js";const filterStyles=`
|
|
2
2
|
jn-mb-px
|
|
3
3
|
jn-bg-theme-filters
|
|
4
4
|
jn-rounded-t
|
package/build/Filters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{F as Filters}from"./Filters.component-
|
|
1
|
+
export{F as Filters}from"./Filters.component-Cu8sV-IL.js";import"./_rollupPluginBabelHelpers-B5fk9IVe.js";import"react";import"prop-types";import"./FilterInput.component-CBfEzQ3x.js";import"./Icon.component-BVkaZqpA.js";import"./widgets-njngpHa5.js";import"./Spinner.component-3BfGSLKB.js";import"./TextInput.component-CkNlIlj0.js";import"./FormHint.component-BPhoMz7f.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";var formBaseStyles="\n jn-mb-8\n",formTitleStyles="\n jn-text-2xl\n jn-font-bold\n jn-mb-4\n",Form=function(a){var b=a.title,c=void 0===b?"":b,d=a.className,e=void 0===d?"":d,f=a.children,g=__rest(a,["title","className","children"]);return React__default.createElement("form",__assign({className:"juno-form ".concat(formBaseStyles," ").concat(e)},g),c?React__default.createElement("h1",{className:"juno-form-heading ".concat(formTitleStyles)},c):null,f)};export{Form as F};
|
package/build/Form.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{F as Form}from"./Form.component-
|
|
1
|
+
export{F as Form}from"./Form.component-D-BE29tV.js";import"./tslib.es6-bjGg6Bxl.js";import"react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";var formHintBaseStyles="\n jn-text-xs\n jn-mt-1\n",getVariantStyles=function(a){return"success"===a?"jn-text-theme-success":"error"===a?"jn-text-theme-error":"jn-text-theme-light"},FormHint=function(a){var b=a.children,c=a.text,d=void 0===c?"":c,e=a.variant,f=void 0===e?"help":e,g=a.className,h=void 0===g?"":g,i=__rest(a,["children","text","variant","className"]);return React__default.createElement("div",__assign({className:"\n juno-form-hint \n juno-form-hint-".concat(f," \n ").concat(formHintBaseStyles," \n ").concat(getVariantStyles(f)," \n ").concat(h,"\n ")},i),b||d)};FormHint.displayName="FormHint";export{FormHint as F};
|
package/build/FormHint.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{F as FormHint}from"./FormHint.component-
|
|
1
|
+
export{F as FormHint}from"./FormHint.component-B30ehV71.js";import"./tslib.es6-bjGg6Bxl.js";import"react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";var formRowBaseStyles="\n jn-mb-2\n",FormRow=function(a){var b=a.children,c=a.className,d=void 0===c?"":c,e=__rest(a,["children","className"]);return React__default.createElement("div",__assign({className:"juno-form-row ".concat(formRowBaseStyles," ").concat(d)},e),b)};export{FormRow as F};
|
package/build/FormRow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{F as FormRow}from"./FormRow.component
|
|
1
|
+
export{F as FormRow}from"./FormRow.component--LSv8Yz8.js";import"./tslib.es6-bjGg6Bxl.js";import"react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";var formSectionBaseStyles="\n jn-mb-8\n jn-last:mb-0\n",headingStyles="\n jn-text-lg\n jn-font-bold\n jn-mb-4\n",FormSection=function(a){var b=a.title,c=void 0===b?"":b,d=a.children,e=a.className,f=void 0===e?"":e,g=__rest(a,["title","children","className"]);return React__default.createElement("section",__assign({className:"juno-form-section ".concat(formSectionBaseStyles," ").concat(f)},g),c?React__default.createElement("h1",{className:"juno-formsection-heading ".concat(headingStyles)},c):null,d)};export{FormSection as F};
|
package/build/FormSection.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{F as FormSection}from"./FormSection.component-
|
|
1
|
+
export{F as FormSection}from"./FormSection.component-D-txM2wI.js";import"./tslib.es6-bjGg6Bxl.js";import"react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useState,useEffect}from"react";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";import{S as Spinner}from"./Spinner.component-B_OKKh5D.js";var selectBaseClasses="\n jn-w-full\n jn-bg-theme-select\n jn-text-theme-high\n jn-appearance-none\n jn-text-base\n jn-pl-4\n jn-h-[2.375rem]\n jn-rounded-3px\n jn-bg-icon-arrow-down\n jn-bg-right\n jn-bg-no-repeat\n focus:jn-outline-none\n focus:jn-ring-2\n focus:jn-ring-theme-focus\n disabled:jn-opacity-50\n",wrapperBaseClasses="jn-relative",iconBaseClasses="\n jn-absolute\n jn-flex\n jn-right-2\n jn-top-1.5\n jn-pointer-events-none\n",iconDisabledClasses="jn-opacity-50",borderErrorClasses="jn-border jn-border-theme-error",borderSuccessClasses="jn-border jn-border-theme-success",stateClasses={loading:"\n jn-absolute\n jn-top-0\n jn-right-0\n jn-bottom-0\n jn-left-0\n jn-text-center\n jn-bg-theme-select\n jn-text-theme-high\n jn-text-base\n jn-rounded-3px\n jn-flex\n jn-flex-col\n jn-justify-center\n jn-select-none\n jn-cursor-not-allowed\n ",error:"\n jn-absolute\n jn-top-0\n jn-right-0\n jn-bottom-0\n jn-left-0\n jn-text-center\n jn-bg-theme-select\n jn-text-theme-high\n jn-text-base\n jn-rounded-3px\n jn-flex\n jn-flex-col\n jn-justify-center\n jn-select-none\n jn-cursor-not-allowed\n ",loadingSpinner:"jn-ml-auto jn-mr-auto",errorIcon:"jn-ml-auto jn-mr-auto",paddingIconRight:"jn-pr-[3.75rem]",paddingDefaultRight:"jn-pr-9"},SelectIcons=function(a){var b=a.isLoading,c=a.hasError,d=a.isInvalid,e=a.isValid,f=a.disabled;return b?(React__default.createElement("div",{className:"juno-select-loading ".concat(stateClasses.loading)},React__default.createElement(Spinner,{className:stateClasses.loadingSpinner}))):c?(React__default.createElement("div",{className:"juno-select-error-text ".concat(stateClasses.error)},React__default.createElement(Icon,{icon:"errorOutline",color:"jn-text-theme-error",className:stateClasses.errorIcon}))):(React__default.createElement("div",{className:"".concat(iconBaseClasses," ").concat(f?iconDisabledClasses:"")},d&&React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}),e&&React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}),React__default.createElement(Icon,{icon:"expandMore"})))},NativeSelect=function(a){var b=a.name,c=void 0===b?"Unnamed Select":b,d=a.id,e=void 0===d?"":d,f=a.children,g=a.className,h=void 0===g?"":g,i=a.disabled,j=void 0!==i&&i,k=a.invalid,l=void 0!==k&&k,m=a.valid,n=void 0!==m&&m,o=a.loading,p=void 0!==o&&o,q=a.error,r=void 0!==q&&q,s=a.onChange,t=a.onClick,u=a.wrapperClassName,v=void 0===u?"":u,w=__rest(a,["name","id","children","className","disabled","invalid","valid","loading","error","onChange","onClick","wrapperClassName"]),x=useState(p),y=x[0],z=x[1],A=useState(n),B=A[0],C=A[1],D=useState(l),E=D[0],F=D[1],G=useState(r),H=G[0],I=G[1];useEffect(function(){return z(p)},[p]),useEffect(function(){return C(n)},[n]),useEffect(function(){return F(l)},[l]),useEffect(function(){return I(r)},[r]);var J=B||E?stateClasses.paddingIconRight:stateClasses.paddingDefaultRight;return React__default.createElement("div",{className:"juno-select-wrapper ".concat(wrapperBaseClasses," ").concat(v)},React__default.createElement("select",__assign({name:c,id:e,className:"\n juno-select\n ".concat(selectBaseClasses,"\n ").concat(E?"juno-select-invalid "+borderErrorClasses:"","\n ").concat(B?"juno-select-valid "+borderSuccessClasses:"","\n ").concat(H?"juno-select-error":"","\n ").concat(J,"\n ").concat(h,"\n "),onChange:function(a){return s&&s(a)},onClick:function(a){return t&&t(a)},disabled:j||y||H},w),f),React__default.createElement(SelectIcons,{isLoading:y,hasError:H,isInvalid:E,isValid:B,disabled:j}))};export{NativeSelect as N};
|
package/build/NativeSelect.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{N as NativeSelect}from"./NativeSelect.component-
|
|
1
|
+
export{N as NativeSelect}from"./NativeSelect.component-BeYgemsP.js";import"./tslib.es6-bjGg6Bxl.js";import"react";import"./Icon.component-7-ap-6Ys.js";import"./widgets-njngpHa5.js";import"./Spinner.component-B_OKKh5D.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";var NativeSelectOption=function(a){var b=a.value,c=a.label,d=a.disabled,e=a.className,f=void 0===e?"":e,g=__rest(a,["value","label","disabled","className"]);return React__default.createElement("option",__assign({value:b,disabled:void 0!==d&&d,className:"juno-select-option ".concat(f)},g),c||b)};export{NativeSelectOption as N};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{N as NativeSelectOption}from"./NativeSelectOption.component-
|
|
1
|
+
export{N as NativeSelectOption}from"./NativeSelectOption.component-CLFcWbs7.js";import"./tslib.es6-bjGg6Bxl.js";import"react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";var NativeSelectOptionGroup=function(a){var b=a.label,c=void 0===b?"":b,d=a.disabled,e=a.className,f=void 0===e?"":e,g=a.children,h=__rest(a,["label","disabled","className","children"]);return React__default.createElement("optgroup",__assign({label:c,disabled:void 0!==d&&d,className:"juno-select-option-group ".concat(f)},h),g)};export{NativeSelectOptionGroup as N};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{N as NativeSelectOptionGroup}from"./NativeSelectOptionGroup.component-
|
|
1
|
+
export{N as NativeSelectOptionGroup}from"./NativeSelectOptionGroup.component-B9j74Fm2.js";import"./tslib.es6-bjGg6Bxl.js";import"react";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useContext,useState,useMemo,useEffect,useId}from"react";import{a as RadioGroupContext}from"./RadioGroup.component-
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useContext,useState,useMemo,useEffect,useId}from"react";import{a as RadioGroupContext}from"./RadioGroup.component-Cj0bQHOM.js";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-flex\n jn-items-center\n",inputstyles="\n jn-w-4\n jn-h-4\n jn-opacity-0\n jn-z-50\n",mockradiostyles="\n jn-relative\n jn-w-4\n jn-h-4\n jn-rounded-full\n jn-bg-theme-radio\n",checkedstyles="\n jn-absolute\n jn-block\n jn-bg-theme-radio-checked\n jn-rounded-full\n jn-w-3\n jn-h-3\n jn-top-[1px]\n jn-left-[1px]\n",mockfocusradiostyles="\n jn-outline-none\n jn-ring-2\n jn-ring-theme-focus\n",mockdisabledradiostyles="\n jn-opacity-50\n jn-cursor-not-allowed\n",noBorderStyles="\n jn-border\n jn-border-transparent\n",errorstyles="\n jn-border\n jn-border-theme-error\n",successstyles="\n jn-border\n jn-border-theme-success\n",labelStyles="\n jn-leading-0\n jn-ml-2\n",iconStyles="\n jn-ml-1\n",hintStyles="\n jn-mt-0\n jn-ml-6\n",Radio=function(a){var b=a.checked,c=void 0!==b&&b,d=a.className,e=void 0===d?"":d,f=a.disabled,g=void 0!==f&&f,h=a.errortext,i=void 0===h?"":h,j=a.helptext,k=void 0===j?"":j,l=a.id,m=void 0===l?void 0:l,n=a.invalid,o=void 0!==n&&n,p=a.label,q=void 0===p?void 0:p,r=a.name,s=void 0===r?void 0:r,t=a.onChange,u=void 0===t?void 0:t,v=a.onClick,w=void 0===v?void 0:v,x=a.required,y=a.successtext,z=void 0===y?"":y,A=a.valid,B=void 0!==A&&A,C=a.value,D=void 0===C?void 0:C,E=__rest(a,["checked","className","disabled","errortext","helptext","id","invalid","label","name","onChange","onClick","required","successtext","valid","value"]),F=function(a){return"string"!=typeof a||0!==a.trim().length},G=useContext(RadioGroupContext),H=G||{},I=H.selectedValue,J=H.onChange,K=H.name,L=H.updateSelectedValue,M=H.disabled,N=function(){return G?I===D:!!c},O=useState(function(){return N()}),P=O[0],Q=O[1],R=useState(!1),S=R[0],T=R[1],U=useState(!1),V=U[0],W=U[1],X=useState(!1),Y=X[0],Z=X[1],$=useMemo(function(){return o||!!(i&&F(i))},[o,i]),_=useMemo(function(){return B||!!(z&&F(z))},[B,z]);useEffect(function(){W($)},[$]),useEffect(function(){Z(_)},[_]),useEffect(function(){c&&G&&I===void 0&&L&&L(D)},[]),useEffect(function(){I||Q(c)},[c]);var aa=function(){return I?I===D:P},ba=m||function(){return"juno-radio-"+useId()}();return React__default.createElement("div",{className:"jn-radio-outer"},React__default.createElement("div",{className:"juno-radio-wrapper ".concat(wrapperStyles)},React__default.createElement("div",__assign({className:"\n juno-radio \n ".concat(mockradiostyles," \n ").concat(S?mockfocusradiostyles:""," \n ").concat(g?mockdisabledradiostyles:""," \n ").concat(V?errorstyles:""," \n ").concat(Y?successstyles:""," \n ").concat(V||Y?"":noBorderStyles,"\n ").concat(e,"\n ")},E),React__default.createElement("input",{checked:aa(),className:"\n ".concat(inputstyles," \n ").concat(V?"juno-radio-invalid":""," \n ").concat(Y?"juno-radio-valid":"","\n "),disabled:M||g,id:ba,onBlur:function(){T(!1)},onChange:function(){Q(!P),J&&"function"==typeof J&&I!==D&&J(D),u&&u(D)},onClick:function(a){w&&w(a)},onFocus:function(){T(!0)},name:K||s,type:"radio",value:D}),aa()?React__default.createElement("span",{className:"".concat(checkedstyles)}):""),q&&F(q)?(React__default.createElement(React__default.Fragment,null,React__default.createElement(Label,{className:"".concat(labelStyles),disabled:M||g,htmlFor:ba,required:void 0!==x&&x,text:q}),V?(React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error",size:"1.125rem",className:"\n ".concat(iconStyles,"\n ").concat(g?"jn-opacity-50":"","\n ")})):"",Y?(React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success",size:"1.125rem",className:"\n ".concat(iconStyles,"\n ").concat(g?"jn-opacity-50":"","\n ")})):"")):""),i&&F(i)?(React__default.createElement(FormHint,{text:i,variant:"error",className:"".concat(hintStyles)})):"",z&&F(z)?(React__default.createElement(FormHint,{text:z,variant:"success",className:"".concat(hintStyles)})):"",k&&F(k)?React__default.createElement(FormHint,{text:k,className:"".concat(hintStyles)}):"")};export{Radio as R};
|
package/build/Radio.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{R as Radio}from"./Radio.component-
|
|
1
|
+
export{R as Radio}from"./Radio.component-qjlCYiuP.js";import"./tslib.es6-bjGg6Bxl.js";import"react";import"./RadioGroup.component-Cj0bQHOM.js";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,{createContext,useState,useMemo,useEffect,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,{createContext,useState,useMemo,useEffect,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 radiogroupstyles="\n\tjn-mb-4\n\tlast:jn-mb-0\n",groupstyles="\n\tjn-relative\n\tjn-rounded\n\tjn-border\n\tjn-py-1\n",defaultgroupstyles="\n\tjn-border-transparent\n",validgroupstyles="\n\tjn-border-theme-success\n\tjn-px-2\n",invalidgroupstyles="\n\tjn-border-theme-error\n\tjn-px-2\n",iconstyles="\n\tjn-absolute\n\tjn-right-2\n\tjn-top-1.5\n",RadioGroupContext=createContext({}),RadioGroup=function(a){var b=a.children,c=void 0===b?null:b,d=a.className,e=void 0===d?"":d,f=a.disabled,g=void 0!==f&&f,h=a.errortext,i=void 0===h?"":h,j=a.helptext,k=void 0===j?"":j,l=a.id,m=void 0===l?"":l,n=a.invalid,o=void 0!==n&&n,p=a.label,q=void 0===p?"":p,r=a.name,s=a.onChange,t=a.required,u=a.selected,v=a.successtext,w=void 0===v?"":v,x=a.valid,y=void 0!==x&&x,z=__rest(a,["children","className","disabled","errortext","helptext","id","invalid","label","name","onChange","required","selected","successtext","valid"]),A=function(a){return"string"!=typeof a||0!==a.trim().length},B=function(){return"juno-radiogroup-"+useId()},C=r||B(),D=m||B(),E=useState(u),F=E[0],G=E[1],H=useState(!1),I=H[0],J=H[1],K=useState(!1),L=K[0],M=K[1],N=useMemo(function(){return y||!!(w&&w.length)},[y,w]),O=useMemo(function(){return o||!!(i&&i.length)},[o,i]);useEffect(function(){J(N)},[N]),useEffect(function(){M(O)},[O]),useEffect(function(){u&&G(u)},[u]);return(React__default.createElement(RadioGroupContext.Provider,{value:{selectedValue:F,name:C,onChange:function(a){G(a),s&&s(a)},updateSelectedValue:function(a){G(a)},disabled:g}},React__default.createElement("div",__assign({className:"\n juno-radiogroup \n ".concat(radiogroupstyles," \n ").concat(I?"juno-radiogroup-valid":""," \n ").concat(L?"juno-radiogroup-invalid":""," \n ").concat(e,"\n "),id:D,role:"radiogroup"},z),q&&A(q)?(React__default.createElement(Label,{text:q,htmlFor:D,disabled:g,required:void 0!==t&&t})):"",React__default.createElement("div",{className:"\n juno-checkbox-group-options \n ".concat(groupstyles," \n ").concat(I?validgroupstyles:""," \n ").concat(L?invalidgroupstyles:""," \n ").concat(I||L?"":defaultgroupstyles,"\n ")},L?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error",className:"".concat(iconstyles)}):"",I?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success",className:"".concat(iconstyles)}):"",c),i&&A(i)?React__default.createElement(FormHint,{text:i,variant:"error"}):"",w&&A(w)?React__default.createElement(FormHint,{text:w,variant:"success"}):"",k&&A(k)?React__default.createElement(FormHint,{text:k}):"")))};export{RadioGroup as R,RadioGroupContext as a};
|
package/build/RadioGroup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{R as RadioGroup}from"./RadioGroup.component-
|
|
1
|
+
export{R as RadioGroup}from"./RadioGroup.component-Cj0bQHOM.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 from"react";import{R as Radio}from"./Radio.component-
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";import{R as Radio}from"./Radio.component-qjlCYiuP.js";import{w as withDeprecationWarning}from"./withDeprecationWarning.component-DQTD5UdI.js";var RadioRow=function(a){var b=a.value,c=void 0===b?"":b,d=a.checked,e=a.name,f=void 0===e?void 0:e,g=a.label,h=void 0===g?void 0:g,i=a.id,j=void 0===i?void 0:i,k=a.helptext,l=void 0===k?"":k,m=a.className,n=void 0===m?"":m,o=a.disabled,p=a.required,q=a.errortext,r=void 0===q?"":q,s=a.valid,t=a.invalid,u=a.successtext,v=void 0===u?"":u,w=a.onChange,x=void 0===w?void 0:w,y=__rest(a,["value","checked","name","label","id","helptext","className","disabled","required","errortext","valid","invalid","successtext","onChange"]);return React__default.createElement(Radio,__assign({value:c,checked:void 0!==d&&d,name:f,label:h,id:j,helptext:l,disabled:void 0!==o&&o,required:void 0!==p&&p,invalid:t,valid:void 0!==s&&s,errortext:r,successtext:v,className:n,onChange:x},y))},RadioRow_component=withDeprecationWarning(RadioRow,"RadioRow is deprecated and will be removed in future versions. To be future-proof, use Radio instead.");export{RadioRow_component as R};
|
package/build/RadioRow.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{R as RadioRow}from"./RadioRow.component-
|
|
1
|
+
export{R as RadioRow}from"./RadioRow.component-CqrB8Bvr.js";import"./tslib.es6-bjGg6Bxl.js";import"react";import"./Radio.component-qjlCYiuP.js";import"./RadioGroup.component-Cj0bQHOM.js";import"./Label.component-TbF3yilt.js";import"./Icon.component-7-ap-6Ys.js";import"./widgets-njngpHa5.js";import"./FormHint.component-B30ehV71.js";import"./withDeprecationWarning.component-DQTD5UdI.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{createContext,useId,useState,useMemo,useEffect}from"react";import{L as Label}from"./Label.component-TbF3yilt.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";import{S as Spinner}from"./Spinner.component-B_OKKh5D.js";import{F as FormHint}from"./FormHint.component-
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{createContext,useId,useState,useMemo,useEffect}from"react";import{L as Label}from"./Label.component-TbF3yilt.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";import{S as Spinner}from"./Spinner.component-B_OKKh5D.js";import{F as FormHint}from"./FormHint.component-B30ehV71.js";import{p as pr}from"./headlessui-float-lyiwAWIX.js";import{o as offset,a as autoPlacement,s as size,b as shift}from"./floating-ui.react-dom-DmTNS6Kr.js";import{u as usePortalRef}from"./PortalProvider.component-nShveTMU.js";import{createPortal}from"react-dom";import{I as It}from"./listbox-CbPsJ3A1.js";var labelStyles="\n jn-no-wrap\n jn-pointer-events-none\n jn-top-2\n jn-left-4\n",toggleStyles="\n jn-appearance-none\n jn-h-[2.375rem]\n jn-inline-flex\n jn-items-center\n jn-px-4\n jn-rounded-3px\n jn-select-none\n jn-text-base\n focus:jn-outline-none\n focus:jn-ring-2\n focus:jn-ring-theme-focus\n",validToggleStyles="\n jn-border\n jn-border-theme-success\n",invalidToggleStyles="\n jn-border\n jn-border-theme-error\n",centeredIconStyles="\n jn-absolute\n jn-top-1/2\n jn-left-1/2\n jn-translate-y-[-50%]\n jn-translate-x-[-0.75rem]\n",menuStyles="\n jn-rounded\n jn-bg-theme-background-lvl-1\n jn-w-full\n jn-overflow-y-auto\n",truncateStyles="\n jn-block\n jn-h-6\n jn-overflow-hidden\n jn-text-ellipsis\n jn-whitespace-nowrap\n",SelectContext=createContext(void 0),Select=function(a){function b(a){if(z)return oa(a)||M||a.join(", ")||E;var b=Y.get(a);return b?b.displayName||M||a||E:M||a||E}var c=a.ariaLabel,d=void 0===c?"":c,e=a.children,f=void 0===e?null:e,g=a.className,h=void 0===g?"":g,i=a.defaultValue,j=a.disabled,k=void 0!==j&&j,l=a.error,m=void 0!==l&&l,n=a.errortext,o=void 0===n?"":n,p=a.helptext,q=void 0===p?"":p,r=a.id,s=void 0===r?"":r,t=a.invalid,u=void 0!==t&&t,v=a.label,w=a.loading,x=void 0!==w&&w,y=a.multiple,z=void 0!==y&&y,A=a.name,B=a.onChange,C=a.onValueChange,D=a.placeholder,E=void 0===D?"Select\u2026":D,F=a.required,G=a.successtext,H=void 0===G?"":G,I=a.truncateOptions,J=a.valid,K=void 0!==J&&J,L=a.value,M=a.valueLabel,N=a.variant,O=void 0===N?"default":N,P=a.width,Q=void 0===P?"full":P,R=a.wrapperClassName,S=void 0===R?"":R,T=__rest(a,["ariaLabel","children","className","defaultValue","disabled","error","errortext","helptext","id","invalid","label","loading","multiple","name","onChange","onValueChange","placeholder","required","successtext","truncateOptions","valid","value","valueLabel","variant","width","wrapperClassName"]),U=function(a){return"string"!=typeof a||0!==a.trim().length},V=s||function(){return"juno-select-"+useId()}(),W="juno-select-helptext-"+useId(),X=useState(new Map),Y=X[0],Z=X[1],$=useState(!1),_=$[0],aa=$[1],ba=useState(!1),ca=ba[0],da=ba[1],ea=useState(!1),fa=ea[0],ga=ea[1],ha=useState(!1),ia=ha[0],ja=ha[1],ka=useMemo(function(){return u||!!(o&&U(o))},[u,o]),la=useMemo(function(){return K||!!(H&&U(H))},[K,H]);useEffect(function(){aa(m)},[m]),useEffect(function(){da(ka)},[ka]),useEffect(function(){ga(la)},[la]),useEffect(function(){ja(x)},[x]);var ma=usePortalRef(),na=[offset(4),autoPlacement({crossAxis:!0,allowedPlacements:["bottom","top"]}),size({boundary:"viewport",apply:function(a){var b=a.availableWidth,c=a.availableHeight,d=a.elements;Object.assign(d.floating.style,{maxWidth:"".concat(b,"px"),maxHeight:"".concat(c,"px"),overflowY:"auto"})}}),shift()],oa=function(a){var b=function(a){var b,c=Y.get(a);if(c)return(null===(b=c.displayName)||void 0===b?void 0:b.length)?c.displayName:null},c=a.map(function(a){return b(a)}).filter(function(a){return a&&0<a.toString().trim().length});return c.join(", ")};return React__default.createElement(SelectContext.Provider,{value:{truncateOptions:void 0!==I&&I,addOptionValueAndLabel:function(a,b,c){Z(function(d){return new Map(d).set(a||c,{val:a,label:b,children:c,displayName:c||b||a})})}}},React__default.createElement("div",{className:"\n juno-select-wrapper \n jn-relative\n ".concat("auto"==Q?"jn-inline-block":"jn-block","\n ").concat("auto"==Q?"jn-w-auto":"jn-w-full","\n ").concat(S,"\n ")},React__default.createElement(It,{disabled:k||ia||_,multiple:z,name:A,onChange:function(a){B&&B(a||""),C&&C(a||"")},value:L,defaultValue:i},v&&U(v)?(React__default.createElement(It.Label,{as:Label,htmlFor:V,text:v,className:"".concat(labelStyles),disabled:k||ia||_,required:void 0!==F&&F,floating:!0,minimized:!0})):"",React__default.createElement(pr,{composable:!0,adaptiveWidth:!0,middleware:na},React__default.createElement(pr.Reference,null,React__default.createElement(It.Button,__assign({"aria-describedby":q?W:"","aria-label":d||v,as:"button",id:V,className:"\n juno-select-toggle\n ".concat(O&&O.length?"juno-select-toggle-"+O:"juno-select-toggle-default","\n ").concat("auto"==Q?"jn-w-auto":"jn-w-full","\n ").concat(toggleStyles,"\n ").concat(v&&U(v)?"jn-pt-[0.4rem]":"","\n ").concat(k?"juno-select-disabled jn-opacity-50 jn-cursor-not-allowed":"","\n ").concat(ia||_?"jn-justify-center":"jn-justify-between","\n ").concat(ca?"juno-select-invalid "+invalidToggleStyles:""," \n ").concat(fa?"juno-select-valid "+validToggleStyles:""," \n \n ").concat(ia?"juno-select-loading jn-cursor-not-allowed":"","\n ").concat(_?"juno-select-error jn-cursor-not-allowed":"","\n ").concat(h,"\n ")},T),function(a){var c=a.open,d=a.value;return _||ia?(React__default.createElement("span",{className:"".concat(centeredIconStyles)},_?(React__default.createElement(Icon,{icon:"errorOutline",color:"jn-text-theme-error",className:"jn-cursor-not-allowed"})):ia?(React__default.createElement(Spinner,{className:"jn-cursor-not-allowed"})):"")):(React__default.createElement(React__default.Fragment,null,React__default.createElement("span",{className:"".concat(truncateStyles)},b(d)),React__default.createElement("span",{className:"jn-flex"},fa?React__default.createElement(Icon,{icon:"checkCircle",color:"jn-text-theme-success"}):"",ca?React__default.createElement(Icon,{icon:"dangerous",color:"jn-text-theme-error"}):"",React__default.createElement("span",null,React__default.createElement(Icon,{icon:c?"expandLess":"expandMore"})))))})),createPortal(React__default.createElement(pr.Content,null,React__default.createElement(It.Options,{unmount:!1,className:"\n juno-select-menu\n ".concat(menuStyles,"\n ")},f)),ma?ma:document.body))),o&&U(o)?React__default.createElement(FormHint,{text:o,variant:"error"}):"",H&&U(H)?React__default.createElement(FormHint,{text:H,variant:"success"}):"",q&&U(q)?React__default.createElement(FormHint,{text:q,id:W}):""))};export{Select as S,SelectContext as a};
|
package/build/Select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{S as Select}from"./Select.component-
|
|
1
|
+
export{S as Select}from"./Select.component-BpoPsXOT.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"./Spinner.component-B_OKKh5D.js";import"./FormHint.component-B30ehV71.js";import"./headlessui-float-lyiwAWIX.js";import"react-dom";import"./keyboard-D0PLkOsr.js";import"./floating-ui.react-dom-DmTNS6Kr.js";import"./PortalProvider.component-nShveTMU.js";import"./listbox-CbPsJ3A1.js";import"./form-DXIqO3qN.js";import"./use-text-value-DK9HMXni.js";
|
package/build/SelectOption.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useContext,useEffect,Fragment}from"react";import{a as SelectContext}from"./Select.component-
|
|
1
|
+
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default,{useContext,useEffect,Fragment}from"react";import{a as SelectContext}from"./Select.component-BpoPsXOT.js";import{I as Icon}from"./Icon.component-7-ap-6Ys.js";import{I as It}from"./listbox-CbPsJ3A1.js";import"./Label.component-TbF3yilt.js";import"./Spinner.component-B_OKKh5D.js";import"./FormHint.component-B30ehV71.js";import"./headlessui-float-lyiwAWIX.js";import"react-dom";import"./keyboard-D0PLkOsr.js";import"./floating-ui.react-dom-DmTNS6Kr.js";import"./PortalProvider.component-nShveTMU.js";import"./widgets-njngpHa5.js";import"./form-DXIqO3qN.js";import"./use-text-value-DK9HMXni.js";var optionStyles="\n jn-flex\n jn-pt-[0.6875rem]\n jn-pb-[0.5rem]\n jn-pr-[0.875rem]\n jn-select-none\n data-[headlessui-state=active]:jn-outline-none\n data-[headlessui-state=active]:jn-ring-2\n data-[headlessui-state=active]:jn-ring-inset\n data-[headlessui-state=active]:jn-ring-theme-focus\n data-[headlessui-state=active]:jn-bg-theme-background-lvl-3\n",unselectedOptionStyles="\n jn-text-theme-default\n jn-pl-[2.375rem]\n",selectedOptionStyles="\n jn-text-theme-accent\n jn-pl-3.5\n",selectedIconStyles="\n jn-inline-block\n jn-mr-1.5\n jn-overflow-auto\n",disabledOptionLabelStyles="\n jn-opacity-50\n jn-cursor-not-allowed\n",truncateOptionStyles="\n jn-block\n jn-h-6\n jn-overflow-hidden\n jn-text-ellipsis\n jn-whitespace-nowrap\n",SelectOption=function(a){var b=a.children,c=a.className,d=void 0===c?"":c,e=a.disabled,f=void 0!==e&&e,g=a.value,h=void 0===g?"":g,i=a.label,j=__rest(a,["children","className","disabled","value","label"]),k=useContext(SelectContext),l=k||{truncateOptions:!1,addOptionValueAndLabel:function(){}},m=l.truncateOptions,n=l.addOptionValueAndLabel;return useEffect(function(){n(h,i,b)},[h,i,b]),(React__default.createElement(It.Option,{as:Fragment,disabled:f,value:h||b},function(a){var c=a.selected;return React__default.createElement("li",__assign({className:"\n juno-select-option \n jn-min-h-[2.5rem]\n ".concat(optionStyles,"\n ").concat(c?"juno-select-option-selected "+selectedOptionStyles:unselectedOptionStyles,"\n ").concat(f?"juno-select-option-disabled jn-opacity-50 jn-cursor-not-allowed":"","\n ").concat(m?"juno-select-option-truncate":"","\n ").concat(d,"\n ")},j),c?React__default.createElement(Icon,{icon:"check",size:"18",className:selectedIconStyles}):"",React__default.createElement("span",{className:"\n ".concat(f?disabledOptionLabelStyles:"","\n ").concat(m?truncateOptionStyles:"","\n ")},b||i||h))}))};export{SelectOption};
|
|
@@ -1 +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-
|
|
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 +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";
|
|
@@ -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,65 @@
|
|
|
1
|
+
import React, { ReactNode, ChangeEvent, MouseEvent, FC } from "react";
|
|
2
|
+
export interface NativeSelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Name of the select element.
|
|
5
|
+
* Used as a key for the selected value if a form is submitted.
|
|
6
|
+
*/
|
|
7
|
+
name?: string;
|
|
8
|
+
/**
|
|
9
|
+
* ID of the select element.
|
|
10
|
+
*/
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Additional CSS classes to apply to the select element for custom styling.
|
|
14
|
+
*/
|
|
15
|
+
className?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Elements to be rendered inside the select element.
|
|
18
|
+
* This can be any React node or a collection of React nodes.
|
|
19
|
+
* Typically, these are SelectOption or SelectOptionGroup components.
|
|
20
|
+
*/
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Disables the select element, making it unclickable.
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Highlights the select element as invalid, indicating incorrect user input or validation errors.
|
|
28
|
+
*/
|
|
29
|
+
invalid?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Highlights the select element as valid, indicating correct user input or successful validation.
|
|
32
|
+
*/
|
|
33
|
+
valid?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Displays a loading indicator over the select element.
|
|
36
|
+
* Used for async operations like fetching data.
|
|
37
|
+
*/
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Displays an error state over the select element, such as during data fetching errors.
|
|
41
|
+
* Should not be used for validation errors.
|
|
42
|
+
*/
|
|
43
|
+
error?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Event handler for the change event of the select element.
|
|
46
|
+
* Triggered when the user changes the selected option.
|
|
47
|
+
*/
|
|
48
|
+
onChange?: (event: ChangeEvent<HTMLSelectElement>) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Event handler for the click event on the select element.
|
|
51
|
+
* Triggered when the user clicks on the select element.
|
|
52
|
+
*/
|
|
53
|
+
onClick?: (event: MouseEvent<HTMLSelectElement>) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Additional CSS classes to apply to the outer wrapper of the select component for custom styling.
|
|
56
|
+
*/
|
|
57
|
+
wrapperClassName?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A basic, uncontrolled native HTML select component.
|
|
61
|
+
* Takes NativeSelectOption and NativeSelectOptionGroup children as options.
|
|
62
|
+
* Handles states such as loading, valid, invalid, and error.
|
|
63
|
+
*/
|
|
64
|
+
export declare const NativeSelect: FC<NativeSelectProps>;
|
|
65
|
+
//# sourceMappingURL=NativeSelect.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeSelect.component.d.ts","sourceRoot":"","sources":["../../../src/components/NativeSelect/NativeSelect.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAuB,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AA+E1F,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACtF;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;OAGG;IAEH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAE1D;;;OAGG;IAEH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAExD;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAmCD;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA4D9C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NativeSelect/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface NativeSelectOptionProps extends Omit<React.OptionHTMLAttributes<HTMLOptionElement>, "label" | "value"> {
|
|
3
|
+
/**
|
|
4
|
+
* A visible label for the option.
|
|
5
|
+
* It will be displayed to the user in the dropdown.
|
|
6
|
+
*/
|
|
7
|
+
label?: string | number;
|
|
8
|
+
/**
|
|
9
|
+
* The value that the option represents.
|
|
10
|
+
* It will be sent when submitting a form.
|
|
11
|
+
*/
|
|
12
|
+
value?: string | number;
|
|
13
|
+
/**
|
|
14
|
+
* Determines whether the option is disabled.
|
|
15
|
+
* If true, the option will be unselectable.
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Additional CSS classes to apply to the option for custom styling.
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The NativeSelectOption component represents an individual option in a dropdown list.
|
|
25
|
+
* It should be used inside the NativeSelect component to define each option.
|
|
26
|
+
*/
|
|
27
|
+
export declare const NativeSelectOption: React.FC<NativeSelectOptionProps>;
|
|
28
|
+
//# sourceMappingURL=NativeSelectOption.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeSelectOption.component.d.ts","sourceRoot":"","sources":["../../../src/components/NativeSelectOption/NativeSelectOption.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC9E;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEvB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAYhE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NativeSelectOption/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface NativeSelectOptionGroupProps extends React.OptgroupHTMLAttributes<HTMLOptGroupElement> {
|
|
3
|
+
/**
|
|
4
|
+
* A visible label for the option group.
|
|
5
|
+
* It will be displayed as the group heading in the dropdown.
|
|
6
|
+
*/
|
|
7
|
+
label?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Determines whether the option group is disabled.
|
|
10
|
+
* If true, all options within the group will also be disabled.
|
|
11
|
+
*/
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Additional CSS classes to apply to the option group for custom styling.
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Elements to be rendered within the option group.
|
|
19
|
+
* Typically, these should be NativeSelectOption components.
|
|
20
|
+
*/
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The NativeSelectOptionGroup component groups related options within a dropdown list.
|
|
25
|
+
* It should be used inside the <NativeSelect> component to group <NativeSelectOption> components.
|
|
26
|
+
*/
|
|
27
|
+
export declare const NativeSelectOptionGroup: React.FC<NativeSelectOptionGroupProps>;
|
|
28
|
+
//# sourceMappingURL=NativeSelectOptionGroup.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeSelectOptionGroup.component.d.ts","sourceRoot":"","sources":["../../../src/components/NativeSelectOptionGroup/NativeSelectOptionGroup.component.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,4BAA6B,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC;IACrG;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAY1E,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NativeSelectOptionGroup/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export{A as AppBody}from"./AppBody.component-DMNphrA9.js";export{A as AppIntro}from"./AppIntro.component-BnwrDrke.js";export{A as AppShell}from"./AppShell.component-kPo9ejh-.js";export{A as AppShellProvider}from"./AppShellProvider.component-CoGCOuox.js";export{B as Badge}from"./Badge.component-Bw_Sw1Jl.js";export{B as Box}from"./Box.component-B-zlG37z.js";export{B as Breadcrumb}from"./Breadcrumb.component-DmLZCJ80.js";export{B as BreadcrumbItem}from"./BreadcrumbItem.component-himz8R38.js";export{B as Button}from"./Button.component-Ck0-XKMD.js";export{B as ButtonRow}from"./ButtonRow.component-CgfANnke.js";export{C as Checkbox}from"./Checkbox.component-
|
|
1
|
+
export{A as AppBody}from"./AppBody.component-DMNphrA9.js";export{A as AppIntro}from"./AppIntro.component-BnwrDrke.js";export{A as AppShell}from"./AppShell.component-kPo9ejh-.js";export{A as AppShellProvider}from"./AppShellProvider.component-CoGCOuox.js";export{B as Badge}from"./Badge.component-Bw_Sw1Jl.js";export{B as Box}from"./Box.component-B-zlG37z.js";export{B as Breadcrumb}from"./Breadcrumb.component-DmLZCJ80.js";export{B as BreadcrumbItem}from"./BreadcrumbItem.component-himz8R38.js";export{B as Button}from"./Button.component-Ck0-XKMD.js";export{B as ButtonRow}from"./ButtonRow.component-CgfANnke.js";export{C as Checkbox}from"./Checkbox.component-DxULmNji.js";export{C as CheckboxRow}from"./CheckboxRow.component-CrN2DXEm.js";export{C as CheckboxGroup}from"./CheckboxGroup.component-DJN7waSM.js";export{C as Code}from"./Code.component-w7x4oiMK.js";export{C as CodeBlock}from"./CodeBlock.component-CXDUnHIb.js";export{C as ComboBox}from"./ComboBox.component-BpssbOYC.js";export{C as ComboBoxOption}from"./ComboBoxOption.component-D7XdDUph.js";export{C as ContentArea}from"./ContentArea.component-VS-3jOgO.js";export{C as ContentHeading}from"./ContentHeading.component-Io-M-spm.js";export{C as ContentAreaToolbar}from"./ContentAreaToolbar.component-Cr9XddQc.js";export{C as ContentAreaWrapper}from"./ContentAreaWrapper.component-D6yksmzo.js";export{C as ContentContainer}from"./ContentContainer.component-rfZz78lB.js";export{C as Container}from"./Container.component-B8M3UgGG.js";export{C as ContextMenu}from"./ContextMenu.component-DyB2n7er.js";export{D as DataList}from"./DataList.component-BYn0Gl6b.js";export{D as DataListCell}from"./DataListCell.component-C67qgCtq.js";export{D as DataListCheckboxCell}from"./DataListCheckboxCell.component-BXti2wK7.js";export{D as DataListRow}from"./DataListRow.component-RvjQ652d.js";export{D as DataGrid}from"./DataGrid.component-BBT0bs34.js";export{D as DataGridCell}from"./DataGridCell.component-DTZCr2iq.js";export{D as DataGridHeadCell}from"./DataGridHeadCell.component-Ce2yeOu8.js";export{D as DataGridRow}from"./DataGridRow.component-D0MKrB0t.js";export{D as DataGridToolbar}from"./DataGridToolbar.component-BxGtUy7D.js";export{D as DateTimePicker}from"./DateTimePicker.component-C2tX_eji.js";export{F as FilterInput}from"./FilterInput.component-CBfEzQ3x.js";export{F as FilterPill}from"./FilterPill.component-C9YwMkKe.js";export{F as Filters}from"./Filters.component-Cu8sV-IL.js";export{F as Form}from"./Form.component-D-BE29tV.js";export{F as FormattedText}from"./FormattedText.component-Dv5KRlOH.js";export{F as FormRow}from"./FormRow.component--LSv8Yz8.js";export{F as FormSection}from"./FormSection.component-D-txM2wI.js";export{G as Grid}from"./Grid.component-DhdNobry.js";export{G as GridRow}from"./GridRow.component-DP4HP_Ai.js";export{G as GridColumn}from"./GridColumn.component-Dn_zRSnd.js";export{I as Icon}from"./Icon.component-7-ap-6Ys.js";export{I as InputGroup}from"./InputGroup.component-BKBRJie5.js";export{I as IntroBox}from"./IntroBox.component-BuW5vo-r.js";export{J as JsonViewer}from"./JsonViewer.component-i75ln2HG.js";export{L as Label}from"./Label.component-TbF3yilt.js";export{L as LoadingIndicator}from"./LoadingIndicator.component-CjUcoOtA.js";export{M as MainContainer}from"./MainContainer.component-beO5Qib0.js";export{M as MainContainerInner}from"./MainContainerInner.component-Dp6YCm8D.js";export{M as MainTabs}from"./MainTabs.component-C4jnzeW8.js";export{M as Menu}from"./Menu.component-B2zPLmdP.js";export{M as MenuItem}from"./MenuItem.component-2A91klk9.js";export{M as MenuSection}from"./MenuSection.component-CXCYKlVr.js";export{M as Message}from"./Message.component-COHT30fL.js";import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{useState,useEffect,useRef,useId}from"react";import{createPortal}from"react-dom";import PropTypes from"prop-types";import{F as FocusTrap}from"./focus-trap-react-QYyPJKV2.js";import{B as Button}from"./Stack.component-fYvcWRNi.js";import{B as ButtonRow}from"./ButtonRow.component-CnJPyZ99.js";import{k as knownIcons,I as Icon}from"./Icon.component-BVkaZqpA.js";import{u as usePortalRef}from"./PortalProvider.component-B2hXHP-c.js";export{N as NativeSelect}from"./NativeSelect.component-BeYgemsP.js";export{N as NativeSelectOption}from"./NativeSelectOption.component-CLFcWbs7.js";export{N as NativeSelectOptionGroup}from"./NativeSelectOptionGroup.component-B9j74Fm2.js";export{P as Panel}from"./Panel.component-DW6z1JGn.js";export{P as PanelBody}from"./PanelBody.component-ejsCohbW.js";export{P as PanelFooter}from"./PanelFooter.component-B3HXAhmg.js";export{P as PageFooter}from"./PageFooter.component-CrlDnfPd.js";export{P as PageHeader}from"./PageHeader.component-QuQOQj_P.js";export{P as Pagination,S as SelectOption}from"./Pagination.component-6CTFGCb-.js";export{P as Pill}from"./Pill.component-CLGgHKga.js";export{a as PortalProvider,u as usePortalRef}from"./PortalProvider.component-nShveTMU.js";export{R as Radio}from"./Radio.component-qjlCYiuP.js";export{R as RadioGroup}from"./RadioGroup.component-Cj0bQHOM.js";export{R as RadioRow}from"./RadioRow.component-CqrB8Bvr.js";export{S as SearchInput}from"./SearchInput.component-CMboCbvO.js";export{S as Select}from"./Select.component-BfgCOLpX.js";export{S as SelectRow}from"./SelectRow.component-D3y6s-A2.js";export{S as ShadowRoot}from"./ShadowRoot.component-DZn4gLKB.js";export{S as SideNavigation}from"./SideNavigation.component-D9A0_YjX.js";export{S as SideNavigationItem}from"./SideNavigationItem.component-EiOe7rV_.js";export{S as Spinner}from"./Spinner.component-B_OKKh5D.js";export{S as Stack}from"./Stack.component-BNRLhyTo.js";export{a as StyleProvider}from"./StyleProvider.component-DpOVgdlo.js";export{S as Switch}from"./Switch.component-BxCFYGD_.js";export{S as SwitchRow}from"./SwitchRow.component-BNceFC47.js";export{T as Tab}from"./Tab.component-o-IJCaGX.js";export{T as TabList}from"./TabList.component-DeI4QJVH.js";export{T as TabNavigation}from"./TabNavigation.component-DlfET9Dg.js";export{T as TabNavigationItem}from"./TabNavigationItem.component-CgTEvAMf.js";export{T as TabPanel}from"./TabPanel.component-CSMpnrRv.js";export{T as Textarea}from"./Textarea.component-BrJM-k2b.js";export{T as Tabs}from"./Tabs.component-NQTjUypo.js";export{T as TextareaRow}from"./TextareaRow.component-DfVYxpvo.js";export{T as TextInput}from"./TextInput.component-D1qpmHfA.js";export{T as TextInputRow}from"./TextInputRow.component-DEWfa_NF.js";export{T as ThemeToggle}from"./ThemeToggle.component-CNb4Nbso.js";export{T as Toast}from"./Toast.component-Ck1OSJRg.js";export{T as Tooltip}from"./Tooltip.component-D23JdNpf.js";export{T as TooltipContent}from"./TooltipContent.component-A3crwGIj.js";export{T as TooltipTrigger}from"./TooltipTrigger.component-D5levpwF.js";export{T as TopNavigation}from"./TopNavigation.component-gPpoiPKf.js";export{T as TopNavigationItem}from"./TopNavigationItem.component-C99GMBgq.js";import"./tslib.es6-bjGg6Bxl.js";import"./FormHint.component-B30ehV71.js";import"./withDeprecationWarning.component-DQTD5UdI.js";import"./headlessui-float-lyiwAWIX.js";import"./keyboard-D0PLkOsr.js";import"./floating-ui.react-dom-DmTNS6Kr.js";import"./FormHint.component-BPhoMz7f.js";import"./Spinner.component-3BfGSLKB.js";import"./form-DXIqO3qN.js";import"./use-tree-walker-BOLu2dNf.js";import"./withDeprecationWarning.component-fIFVSC34.js";import"./menu-DiwXZMR-.js";import"./use-text-value-DK9HMXni.js";import"./TextInput.component-CkNlIlj0.js";import"./widgets-njngpHa5.js";import"./_commonjsHelpers-BxGi5vpY.js";import"./listbox-CbPsJ3A1.js";import"./FormRow.component-5oxVn9c0.js";import"./Navigation.component-Q2fi8-qR.js";import"./NavigationItem.component-DcH7SF-F.js";import"./ibm-plex-BfDpQmIi.js";import"./TabPanel-B6oG_h5d.js";import"./Textarea.component-4fIvQVeJ.js";const modalfooterstyles=`
|
|
2
2
|
jn-flex
|
|
3
3
|
jn-flex-row
|
|
4
4
|
jn-border-t
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React__default,{useState,useEffect}from"react";import PropTypes from"prop-types";import{I as Icon}from"./Icon.component-BVkaZqpA.js";import{p as pr}from"./headlessui-float-lyiwAWIX.js";import{o as offset,a as autoPlacement,s as size,b as shift}from"./floating-ui.react-dom-DmTNS6Kr.js";import{q as qe}from"./menu-DiwXZMR-.js";const menuStyles=`
|
|
2
|
-
jn-overflow-hidden
|
|
3
|
-
jn-flex
|
|
4
|
-
jn-flex-col
|
|
5
|
-
jn-rounded
|
|
6
|
-
jn-bg-theme-background-lvl-1
|
|
7
|
-
`,toggleStyles=`
|
|
8
|
-
hover:jn-text-theme-accent
|
|
9
|
-
active:jn-text-theme-accent
|
|
10
|
-
`,toggleOpenStyle=`
|
|
11
|
-
jn-text-theme-accent
|
|
12
|
-
`,ContextMenu=a=>{let{children:b=null,open:c=!1}=a;const[d,e]=useState(!1);useEffect(()=>{e(c)},[c]);const f=[offset(4),autoPlacement({crossAxis:!0,allowedPlacements:["top-start","top-end","bottom-start","bottom-end"]}),size({boundary:"viewport",apply(a){let{availableWidth:b,availableHeight:c,elements:d}=a;Object.assign(d.floating.style,{maxWidth:`${b}px`,maxHeight:`${c}px`,overflowY:"auto"})}}),shift()];return React__default.createElement(qe,null,React__default.createElement(pr,{middleware:f},React__default.createElement(qe.Button,{onClick:()=>{e(!d)},className:`
|
|
13
|
-
juno-contextmenu-toggle
|
|
14
|
-
${toggleStyles}
|
|
15
|
-
${d?toggleOpenStyle:""}
|
|
16
|
-
`},React__default.createElement(Icon,{icon:"moreVert"})),React__default.createElement(qe.Items,{className:`${menuStyles}`},b)))};ContextMenu.propTypes={className:PropTypes.string,children:PropTypes.node,icon:PropTypes.any,open:PropTypes.bool};export{ContextMenu as C};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default,{useState,useEffect}from"react";import PropTypes from"prop-types";import{N as NativeSelect}from"./NativeSelect.component-DtTnqH-z.js";import{N as NativeSelectOption}from"./NativeSelectOption.component-ozgJZgGf.js";import{T as TextInput}from"./TextInput.component-CkNlIlj0.js";import{I as Icon}from"./Icon.component-BVkaZqpA.js";const wrapperStyles=`
|
|
2
|
-
jn-flex
|
|
3
|
-
jn-relative
|
|
4
|
-
jn-p-px
|
|
5
|
-
jn-border
|
|
6
|
-
jn-rounded
|
|
7
|
-
jn-bg-theme-filter-input
|
|
8
|
-
`,defaultWrapperStyles=`
|
|
9
|
-
jn-border-theme-filter-input
|
|
10
|
-
`,errorWrapperStyles=`
|
|
11
|
-
jn-border-theme-error
|
|
12
|
-
`,selectStyles=`
|
|
13
|
-
jn-rounded-r-none
|
|
14
|
-
`,textInputStyles=`
|
|
15
|
-
jn-grow
|
|
16
|
-
jn-rounded-l-none
|
|
17
|
-
jn-pr-16
|
|
18
|
-
!jn-bg-theme-filter-input-textinput
|
|
19
|
-
focus:jn-z-40
|
|
20
|
-
`,iconWrapperStyles=`
|
|
21
|
-
jn-absolute
|
|
22
|
-
jn-flex
|
|
23
|
-
jn-right-2
|
|
24
|
-
jn-top-1.5
|
|
25
|
-
jn-z-50
|
|
26
|
-
`,FilterInput=a=>{let{keyLabel:d="Select Filter",options:e=[],selectedFilterKey:f="",onSelectedFilterKeyChange:g=void 0,valueLabel:h="Filter by Value",filterValue:i="",valuePlaceholder:j="",onFilterValueChange:k=void 0,onClear:l=void 0,onFilter:m=void 0,loading:n=!1,className:o="",error:p=!1,onKeyPress:b,...c}=a;const[q,r]=useState(f),[s,t]=useState(i),[u,v]=useState(1>e.length||n),[w,x]=useState(p);useEffect(()=>{t(i)},[i]),useEffect(()=>{r(f)},[f]),useEffect(()=>{1>e.length||n?(v(!0),t("")):v(!1)},[e,n]),useEffect(()=>{x(p)},[p]);return React__default.createElement("div",_extends({className:`juno-filter-input ${wrapperStyles} ${u?"juno-filter-input-loading ":""} ${w?"juno-filter-input-error ":""} ${w?errorWrapperStyles:defaultWrapperStyles} ${o}`},c),React__default.createElement("div",null,React__default.createElement(NativeSelect,{className:`juno-filter-input-select ${selectStyles}`,"aria-label":d,value:q,onChange:a=>{r(a.target.value),t(""),g&&g(a)},loading:u,error:w},React__default.createElement(NativeSelectOption,{label:d||"Select Filter",value:""}),e.map((a,b)=>React__default.createElement(NativeSelectOption,_extends({label:a.label,value:a.key,key:`${b}`},a))))),React__default.createElement(TextInput,{value:s,className:`${textInputStyles}`,"aria-label":h,onChange:a=>{t(a.target.value),k&&k(a)},onKeyPress:a=>{"Enter"===a.key&&m&&m&&m(s),b&&b(a)},disabled:u||w,placeholder:u?"Loading Filter Options\u2026":j}),React__default.createElement("div",{className:`${iconWrapperStyles}`},s&&s.length?React__default.createElement(Icon,{icon:"close",title:"Clear",size:"18",className:`jn-mr-2`,onClick:a=>{t(""),l&&l(a)}}):null,React__default.createElement(Icon,{icon:"filterAlt",title:"Filter",disabled:u||w,onClick:()=>{m&&m(s)}})))};FilterInput.propTypes={keyLabel:PropTypes.string,options:PropTypes.arrayOf(PropTypes.object),selectedFilterKey:PropTypes.string,onSelectedFilterKeyChange:PropTypes.func,valueLabel:PropTypes.string,filterValue:PropTypes.string,valuePlaceholder:PropTypes.string,onFilterValueChange:PropTypes.func,onClear:PropTypes.func,onKeyPress:PropTypes.func,loading:PropTypes.bool,className:PropTypes.string,onFilter:PropTypes.func,error:PropTypes.bool};export{FilterInput as F};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default from"react";import PropTypes from"prop-types";const formStyles=`
|
|
2
|
-
jn-mb-8
|
|
3
|
-
`,formHeading=`
|
|
4
|
-
jn-text-2xl
|
|
5
|
-
jn-font-bold
|
|
6
|
-
jn-mb-4
|
|
7
|
-
`,Form=a=>{let{title:c=null,className:d="",children:e=null,...b}=a;return React__default.createElement("form",_extends({className:`juno-form ${formStyles} ${d}`},b),c?React__default.createElement("h1",{className:`juno-form-heading ${formHeading}`},c):"",e)};Form.propTypes={title:PropTypes.string,className:PropTypes.string,children:PropTypes.node};export{Form as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as __rest,a as __assign}from"./tslib.es6-bjGg6Bxl.js";import React__default from"react";var baseStyles="\n jn-text-xs\n jn-mt-1\n",variantStyles=function(a){return"success"===a?"jn-text-theme-success":"error"===a?"jn-text-theme-error":"jn-text-theme-light"},FormHint=function(a){var b=a.children,c=void 0===b?null:b,d=a.text,e=void 0===d?"":d,f=a.variant,g=void 0===f?"help":f,h=a.className,i=__rest(a,["children","text","variant","className"]);return React__default.createElement("div",__assign({className:"\n juno-form-hint\n juno-form-hint-".concat(g,"\n ").concat(baseStyles,"\n ").concat(variantStyles(g),"\n ").concat(h,"\n ")},i),c||e)};FormHint.displayName="FormHint";export{FormHint as F};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default from"react";import PropTypes from"prop-types";const formSection=`
|
|
2
|
-
jn-mb-8
|
|
3
|
-
jn-last:mb-0
|
|
4
|
-
`,formSectionHeading=`
|
|
5
|
-
jn-text-lg
|
|
6
|
-
jn-font-bold
|
|
7
|
-
jn-mb-4
|
|
8
|
-
`,FormSection=a=>{let{title:c=null,children:d=null,className:e="",...b}=a;return React__default.createElement("section",_extends({className:`juno-form-section ${formSection} ${e}`},b),c?React__default.createElement("h1",{className:`juno-formsection-heading ${formSectionHeading}`},c):"",d)};FormSection.propTypes={title:PropTypes.string,className:PropTypes.string,children:PropTypes.node};export{FormSection as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default from"react";import PropTypes from"prop-types";const NativeSelectOption=a=>{let{value:c=null,label:d=null,disabled:e=!1,className:f="",...b}=a;return React__default.createElement("option",_extends({value:c,disabled:e,className:`juno-select-option ${f}`},b),d||c)};NativeSelectOption.propTypes={label:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),value:PropTypes.oneOfType([PropTypes.string,PropTypes.number]),disabled:PropTypes.bool,className:PropTypes.string};export{NativeSelectOption as N};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as _extends}from"./_rollupPluginBabelHelpers-B5fk9IVe.js";import React__default from"react";import PropTypes from"prop-types";const NativeSelectOptionGroup=a=>{let{label:d=null,disabled:e=!1,className:f="",children:b,...c}=a;return React__default.createElement("optgroup",_extends({label:d,disabled:e,className:`juno-select-option-group ${f}`},c),b)};NativeSelectOptionGroup.propTypes={label:PropTypes.string,disabled:PropTypes.bool,className:PropTypes.string,children:PropTypes.node};export{NativeSelectOptionGroup as N};
|