@ahrowe/ui 0.7.1 → 0.8.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/dist/esm/common/animatedLogo/animatedLogo.mjs +2 -0
- package/dist/esm/common/animatedLogo/animatedLogo.mjs.map +1 -0
- package/dist/esm/common/animatedLogo/animatedLogo.module.mjs +2 -0
- package/dist/esm/common/animatedLogo/animatedLogo.module.mjs.map +1 -0
- package/dist/esm/common/dropdown/dropdown.mjs +1 -1
- package/dist/esm/common/dropdown/dropdown.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/animatedLogo/animatedLogo.d.ts +4 -0
- package/dist/types/package/common/animatedLogo/animatedLogo.types.d.ts +27 -0
- package/dist/types/package/common/animatedLogo/index.d.ts +2 -0
- package/dist/types/package/index.d.ts +2 -0
- package/docs/AnimatedLogo.md +60 -0
- package/docs/CLAUDE.md +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"./animatedLogo.module.mjs";import{useEffect as t,useRef as n,useState as r}from"react";import i from"classnames";import{jsx as a}from"react/jsx-runtime";var o=`M 1.292 0.278 C -0.41 4.855 3.185 6.433 0.344 8.916 Q 3.923 10.712 5.361 14.001 Q 6.128 14.398 6.876 14.003 Q 8.439 10.632 11.86 8.912 C 8.893 6.387 12.578 5.159 10.86 0.255 Q 8.655 1.166 7.391 3.377 Q 6.092 2.93 4.843 3.38 Q 3.246 0.883 1.292 0.278 Z M 1.663 1.28 Q 2.413 1.635 3.195 2.718 Q 2.083 2.778 1.595 3.884 Q 1.309 2.7 1.663 1.28 M 3.802 7.908 Q 4.426 8.069 3.284 9.003 Q 3.824 9.32 4.557 10.141 Q 4.812 10.869 4.849 11.671 Q 4.371 10.09 2.642 9.144 Q 2.438 9.033 2.609 8.922 Q 3.229 8.537 3.802 7.908 M 8.469 7.927 Q 8.955 8.469 9.646 8.926 Q 9.791 9.032 9.647 9.136 Q 7.821 10.157 7.389 11.702 Q 7.464 10.869 7.709 10.119 Q 8.219 9.53 8.956 9.025 Q 7.81 7.927 8.469 7.927`,s=`0.244 0.155 11.72 14.25`;function c(c){let{path:l=o,viewBox:u=s,size:d=96,color:f,duration:p=4.2,loop:m=!0,fill:h=!0,spin:g=!1,scale:_=!1,className:v,style:y,classNames:b,styles:x,...S}=c,C=n(null),[w,T]=r(!1);t(()=>{let e=C.current;if(!e)return;T(!1);let t=e.getTotalLength();e.style.setProperty(`--animated-logo-length`,String(t)),e.style.strokeDasharray=String(t),e.style.strokeDashoffset=String(t);let n=requestAnimationFrame(()=>T(!0));return()=>cancelAnimationFrame(n)},[l]);let E={animationDuration:`${p}s`,...f?{stroke:f,fill:f}:void 0,...x?.path};return a(`svg`,{...S,className:i(e.animatedLogo,v),style:{width:d,height:d,...y},viewBox:u,xmlns:`http://www.w3.org/2000/svg`,children:a(`g`,{className:i(w&&_&&(m?e.animatedLogoScaleLoop:e.animatedLogoScaleOnce)),style:{animationDuration:`${p}s`},children:a(`g`,{className:i(w&&g&&(m?e.animatedLogoSpinLoop:e.animatedLogoSpinOnce)),style:{animationDuration:`${p}s`},children:a(`path`,{ref:C,className:i(e.animatedLogoPath,w&&(m?h?e.animatedLogoPathLoop:e.animatedLogoPathLoopNoFill:h?e.animatedLogoPathOnce:e.animatedLogoPathOnceNoFill),b?.path),style:E,strokeWidth:.1,strokeLinejoin:`round`,strokeLinecap:`round`,d:l})})})})}export{c as default};
|
|
2
|
+
//# sourceMappingURL=animatedLogo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animatedLogo.mjs","names":[],"sources":["../../../../package/common/animatedLogo/animatedLogo.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport type { CSSProperties, ReactElement } from 'react';\nimport cx from 'classnames';\n\nimport type { AnimatedLogoProps } from './animatedLogo.types';\nimport styles from './animatedLogo.module.pcss';\n\nconst DEFAULT_PATH =\n 'M 1.292 0.278 C -0.41 4.855 3.185 6.433 0.344 8.916 Q 3.923 10.712 5.361 14.001 Q 6.128 14.398 6.876 14.003 Q 8.439 10.632 11.86 8.912 C 8.893 6.387 12.578 5.159 10.86 0.255 Q 8.655 1.166 7.391 3.377 Q 6.092 2.93 4.843 3.38 Q 3.246 0.883 1.292 0.278 Z M 1.663 1.28 Q 2.413 1.635 3.195 2.718 Q 2.083 2.778 1.595 3.884 Q 1.309 2.7 1.663 1.28 M 3.802 7.908 Q 4.426 8.069 3.284 9.003 Q 3.824 9.32 4.557 10.141 Q 4.812 10.869 4.849 11.671 Q 4.371 10.09 2.642 9.144 Q 2.438 9.033 2.609 8.922 Q 3.229 8.537 3.802 7.908 M 8.469 7.927 Q 8.955 8.469 9.646 8.926 Q 9.791 9.032 9.647 9.136 Q 7.821 10.157 7.389 11.702 Q 7.464 10.869 7.709 10.119 Q 8.219 9.53 8.956 9.025 Q 7.81 7.927 8.469 7.927';\n\nconst DEFAULT_VIEW_BOX = '0.244 0.155 11.72 14.25';\n\nfunction AnimatedLogo(props: AnimatedLogoProps): ReactElement {\n const {\n path = DEFAULT_PATH,\n viewBox = DEFAULT_VIEW_BOX,\n size = 96,\n color,\n duration = 4.2,\n loop = true,\n fill = true,\n spin = false,\n scale = false,\n className,\n style,\n classNames,\n styles: slotStyles,\n ...rest\n } = props;\n\n const pathRef = useRef<SVGPathElement>(null);\n const [ready, setReady] = useState(false);\n\n useEffect(() => {\n const pathEl = pathRef.current;\n if (!pathEl) return;\n\n setReady(false);\n const length = pathEl.getTotalLength();\n pathEl.style.setProperty('--animated-logo-length', String(length));\n pathEl.style.strokeDasharray = String(length);\n pathEl.style.strokeDashoffset = String(length);\n\n const frame = requestAnimationFrame(() => setReady(true));\n return () => cancelAnimationFrame(frame);\n }, [path]);\n\n const pathStyle: CSSProperties = {\n animationDuration: `${duration}s`,\n ...(color ? { stroke: color, fill: color } : undefined),\n ...slotStyles?.path,\n };\n\n return (\n <svg\n {...rest}\n className={cx(styles.animatedLogo, className)}\n style={{ width: size, height: size, ...style }}\n viewBox={viewBox}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g\n className={cx(ready && scale && (loop ? styles.animatedLogoScaleLoop : styles.animatedLogoScaleOnce))}\n style={{ animationDuration: `${duration}s` }}\n >\n <g\n className={cx(ready && spin && (loop ? styles.animatedLogoSpinLoop : styles.animatedLogoSpinOnce))}\n style={{ animationDuration: `${duration}s` }}\n >\n <path\n ref={pathRef}\n className={cx(\n styles.animatedLogoPath,\n ready &&\n (loop\n ? fill\n ? styles.animatedLogoPathLoop\n : styles.animatedLogoPathLoopNoFill\n : fill\n ? styles.animatedLogoPathOnce\n : styles.animatedLogoPathOnceNoFill),\n classNames?.path\n )}\n style={pathStyle}\n strokeWidth={0.1}\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n d={path}\n />\n </g>\n </g>\n </svg>\n );\n}\n\nexport default AnimatedLogo;\n"],"mappings":"uKAOA,IAAM,EACJ,8qBAEI,EAAmB,0BAEzB,SAAS,EAAa,EAAwC,CAC5D,GAAM,CACJ,OAAO,EACP,UAAU,EACV,OAAO,GACP,QACA,WAAW,IACX,OAAO,GACP,OAAO,GACP,OAAO,GACP,QAAQ,GACR,YACA,QACA,aACA,OAAQ,EACR,GAAG,GACD,EAEE,EAAU,EAAuB,IAAI,EACrC,CAAC,EAAO,GAAY,EAAS,EAAK,EAExC,MAAgB,CACd,IAAM,EAAS,EAAQ,QACvB,GAAI,CAAC,EAAQ,OAEb,EAAS,EAAK,EACd,IAAM,EAAS,EAAO,eAAe,EACrC,EAAO,MAAM,YAAY,yBAA0B,OAAO,CAAM,CAAC,EACjE,EAAO,MAAM,gBAAkB,OAAO,CAAM,EAC5C,EAAO,MAAM,iBAAmB,OAAO,CAAM,EAE7C,IAAM,EAAQ,0BAA4B,EAAS,EAAI,CAAC,EACxD,UAAa,qBAAqB,CAAK,CACzC,EAAG,CAAC,CAAI,CAAC,EAET,IAAM,EAA2B,CAC/B,kBAAmB,GAAG,EAAS,GAC/B,GAAI,EAAQ,CAAE,OAAQ,EAAO,KAAM,CAAM,EAAI,IAAA,GAC7C,GAAG,GAAY,IACjB,EAEA,OACE,EAAC,MAAD,CACE,GAAI,EACJ,UAAW,EAAG,EAAO,aAAc,CAAS,EAC5C,MAAO,CAAE,MAAO,EAAM,OAAQ,EAAM,GAAG,CAAM,EACpC,UACT,MAAM,sCAEN,EAAC,IAAD,CACE,UAAW,EAAG,GAAS,IAAU,EAAO,EAAO,sBAAwB,EAAO,sBAAsB,EACpG,MAAO,CAAE,kBAAmB,GAAG,EAAS,EAAG,WAE3C,EAAC,IAAD,CACE,UAAW,EAAG,GAAS,IAAS,EAAO,EAAO,qBAAuB,EAAO,qBAAqB,EACjG,MAAO,CAAE,kBAAmB,GAAG,EAAS,EAAG,WAE3C,EAAC,OAAD,CACE,IAAK,EACL,UAAW,EACT,EAAO,iBACP,IACG,EACG,EACE,EAAO,qBACP,EAAO,2BACT,EACE,EAAO,qBACP,EAAO,4BACf,GAAY,IACd,EACA,MAAO,EACP,YAAa,GACb,eAAe,QACf,cAAc,QACd,EAAG,CACJ,CAAA,CACA,CAAA,CACF,CAAA,CACA,CAAA,CAET"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={animatedLogo:`animatedLogo_7zZx1`,"animatedLogo-path":`animatedLogo-path_pP1g2`,animatedLogoPath:`animatedLogo-path_pP1g2`,"animatedLogo-pathLoop":`animatedLogo-pathLoop_i83B-`,animatedLogoPathLoop:`animatedLogo-pathLoop_i83B-`,animatedLogoRevealLoop:`animatedLogoRevealLoop_lH4zm`,"animatedLogo-pathOnce":`animatedLogo-pathOnce_gEYxA`,animatedLogoPathOnce:`animatedLogo-pathOnce_gEYxA`,animatedLogoRevealOnce:`animatedLogoRevealOnce_NEt2W`,"animatedLogo-pathLoopNoFill":`animatedLogo-pathLoopNoFill_M3ewW`,animatedLogoPathLoopNoFill:`animatedLogo-pathLoopNoFill_M3ewW`,animatedLogoRevealLoopNoFill:`animatedLogoRevealLoopNoFill_mfZJo`,"animatedLogo-pathOnceNoFill":`animatedLogo-pathOnceNoFill_hiqiK`,animatedLogoPathOnceNoFill:`animatedLogo-pathOnceNoFill_hiqiK`,animatedLogoRevealOnceNoFill:`animatedLogoRevealOnceNoFill_sdu0s`,"animatedLogo-spinLoop":`animatedLogo-spinLoop_Lfz9H`,animatedLogoSpinLoop:`animatedLogo-spinLoop_Lfz9H`,"animatedLogo-spinOnce":`animatedLogo-spinOnce_pXZUX`,animatedLogoSpinOnce:`animatedLogo-spinOnce_pXZUX`,"animatedLogo-scaleLoop":`animatedLogo-scaleLoop_yox9X`,animatedLogoScaleLoop:`animatedLogo-scaleLoop_yox9X`,"animatedLogo-scaleOnce":`animatedLogo-scaleOnce_ZNKV7`,animatedLogoScaleOnce:`animatedLogo-scaleOnce_ZNKV7`,animatedLogoRotateLoop:`animatedLogoRotateLoop_oPtfw`,animatedLogoRotateOnce:`animatedLogoRotateOnce_Ia1H1`,animatedLogoGrowLoop:`animatedLogoGrowLoop_lZjug`,animatedLogoGrowOnce:`animatedLogoGrowOnce_xHfCV`};export{e as default};
|
|
2
|
+
//# sourceMappingURL=animatedLogo.module.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animatedLogo.module.mjs","names":[],"sources":["../../../../package/common/animatedLogo/animatedLogo.module.pcss"],"sourcesContent":[".animatedLogo {\n display: inline-block;\n overflow: visible;\n\n &-path {\n stroke: var(--primary-color);\n fill: var(--primary-color);\n fill-opacity: 0;\n }\n\n &-pathLoop {\n animation-name: animatedLogoRevealLoop;\n animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);\n animation-iteration-count: infinite;\n }\n\n &-pathOnce {\n animation-name: animatedLogoRevealOnce;\n animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n\n &-pathLoopNoFill {\n animation-name: animatedLogoRevealLoopNoFill;\n animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);\n animation-iteration-count: infinite;\n }\n\n &-pathOnceNoFill {\n animation-name: animatedLogoRevealOnceNoFill;\n animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n\n &-spinLoop,\n &-spinOnce,\n &-scaleLoop,\n &-scaleOnce {\n display: inline-block;\n transform-box: fill-box;\n transform-origin: center;\n animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);\n }\n\n &-spinLoop {\n animation-name: animatedLogoRotateLoop;\n animation-iteration-count: infinite;\n }\n\n &-spinOnce {\n animation-name: animatedLogoRotateOnce;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n\n &-scaleLoop {\n animation-name: animatedLogoGrowLoop;\n animation-iteration-count: infinite;\n }\n\n &-scaleOnce {\n animation-name: animatedLogoGrowOnce;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n\n @media (prefers-reduced-motion: reduce) {\n &-pathLoop,\n &-pathOnce {\n animation: none;\n fill-opacity: 1;\n stroke-dashoffset: 0;\n }\n\n &-pathLoopNoFill,\n &-pathOnceNoFill {\n animation: none;\n stroke-dashoffset: 0;\n }\n\n &-spinLoop,\n &-spinOnce,\n &-scaleLoop,\n &-scaleOnce {\n animation: none;\n }\n }\n}\n\n@keyframes animatedLogoRevealLoop {\n 0% {\n stroke-dashoffset: var(--animated-logo-length);\n fill-opacity: 0;\n }\n\n 38% {\n stroke-dashoffset: 0;\n fill-opacity: 0;\n }\n\n 62% {\n fill-opacity: 1;\n }\n\n 86% {\n fill-opacity: 1;\n }\n\n 96% {\n stroke-dashoffset: 0;\n fill-opacity: 0;\n }\n\n 100% {\n stroke-dashoffset: var(--animated-logo-length);\n fill-opacity: 0;\n }\n}\n\n@keyframes animatedLogoRevealOnce {\n 0% {\n stroke-dashoffset: var(--animated-logo-length);\n fill-opacity: 0;\n }\n\n 45% {\n stroke-dashoffset: 0;\n fill-opacity: 0;\n }\n\n 100% {\n fill-opacity: 1;\n }\n}\n\n@keyframes animatedLogoRevealLoopNoFill {\n 0% {\n stroke-dashoffset: var(--animated-logo-length);\n }\n\n 38% {\n stroke-dashoffset: 0;\n }\n\n 86% {\n stroke-dashoffset: 0;\n }\n\n 100% {\n stroke-dashoffset: var(--animated-logo-length);\n }\n}\n\n@keyframes animatedLogoRevealOnceNoFill {\n 0% {\n stroke-dashoffset: var(--animated-logo-length);\n }\n\n 45% {\n stroke-dashoffset: 0;\n }\n\n 100% {\n stroke-dashoffset: 0;\n }\n}\n\n@keyframes animatedLogoRotateLoop {\n 0% {\n transform: rotate(180deg);\n }\n\n 38% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(0deg);\n }\n}\n\n@keyframes animatedLogoRotateOnce {\n 0% {\n transform: rotate(180deg);\n }\n\n 45% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(0deg);\n }\n}\n\n@keyframes animatedLogoGrowLoop {\n 0% {\n transform: scale(0);\n }\n\n 38% {\n transform: scale(1);\n }\n\n 100% {\n transform: scale(1);\n }\n}\n\n@keyframes animatedLogoGrowOnce {\n 0% {\n transform: scale(0);\n }\n\n 45% {\n transform: scale(1);\n }\n\n 100% {\n transform: scale(1);\n }\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useComponentDefaults as e}from"../configProvider/useComponentDefaults.mjs";import t from"../bodyEnd/bodyEnd.mjs";import{useFloatingPosition as n}from"../floatingMenu/useFloatingPosition.mjs";import r from"../tooltip/tooltip.mjs";import ee from"../infiniteBlock/infiniteBlock.mjs";import i from"./dropdown.module.mjs";import{useEffect as a,useRef as o,useState as s}from"react";import c from"classnames";import{FontAwesomeIcon as te}from"@fortawesome/react-fontawesome";import{faChevronDown as ne}from"@fortawesome/free-solid-svg-icons";import{jsx as l,jsxs as u}from"react/jsx-runtime";import
|
|
1
|
+
import{useComponentDefaults as e}from"../configProvider/useComponentDefaults.mjs";import t from"../bodyEnd/bodyEnd.mjs";import{useFloatingPosition as n}from"../floatingMenu/useFloatingPosition.mjs";import r from"../tooltip/tooltip.mjs";import ee from"../infiniteBlock/infiniteBlock.mjs";import i from"./dropdown.module.mjs";import{useEffect as a,useRef as o,useState as s}from"react";import c from"classnames";import{FontAwesomeIcon as te}from"@fortawesome/react-fontawesome";import{faChevronDown as ne}from"@fortawesome/free-solid-svg-icons";import{jsx as l,jsxs as u}from"react/jsx-runtime";import d from"downshift";function f(f){let{errorMessage:p=``,className:m=``,label:h=``,value:re=``,isValid:ie=!0,tabIndex:g=0,isRequired:ae=!1,customProps:_={},isRow:oe=!1,disabled:v=!1,readOnly:y=!1,onScroll:se=()=>Promise.resolve(),onClick:b,onChange:x,onFocus:ce=null,onBlur:S=null,onMouseEnter:C=null,onMouseLeave:le=null,dropdownLabel:ue,isDropdownListWider:w=!1,inputClassName:T=``,dropDownIconClassName:E=``,dropDownClassName:D=``,formValidator:O=null,labelClassName:de=``,dropDownInputClassName:fe=``,items:k=[],useMatLabelStyle:A=!0,alwaysFloatLabel:j=!1,placeholder:M=``,plainStyle:N=!1,scrollToSelected:P=!1,reactRef:F,...I}=e(`Dropdown`,f),[L,R]=s(!1),[z,B]=s(!1),[,V]=s(0),H=o(O),U=o(null),W=o(null),[G,pe]=s(!1),[me,he]=s(10);a(()=>{if(G){let e=U.current?.getBoundingClientRect();he(e?.width??10)}},[G]),n({isOpen:G,triggerRef:U,anchorRef:W,panelRef:W,flipClassName:i.dropdownInputListAnimFlip}),a(()=>{if(H.current=O,!H.current)return;H.current.label=h??``,H.current.validate();let e=()=>V(e=>e+1);return H.current.registerOnUpdateListener(e),()=>H.current?.removeOnUpdateListener(e)},[O,h]);let ge=e=>{B(!0),C?.(e)},_e=e=>{B(!1),le?.(e)},ve=e=>{R(!0),ce?.(e)},ye=e=>{H.current&&(H.current.touched=!0),R(!1),S?.(e)},be=()=>O?O.touched&&O.hasError():!ie||!!p,K=()=>!!(ae||O?.validators.find(e=>e.validatorId===`required`)),xe=e=>{O?(O.set(e),x?.(O.value,_)):x?.(e,_)},q=ue,J=O?O.value:re,Y=be();k.forEach(e=>{e.key===J&&(q=e.label)});let X=q||J,Z=X==null||typeof X==`string`&&X.trim()===``,Q=K()?l(`span`,{className:i.requiredMark,children:`*`}):null,Se=h&&K()?`${h} *`:h,$=L&&!y;return u(`div`,{...I,className:c(m,i.dropdownLabel,i.dropdown,{[i.dropdownLabelColumn]:!oe}),onMouseEnter:ge,onMouseLeave:_e,children:[l(d,{...y?{isOpen:!1}:{},onChange:e=>xe((e||{key:``}).key),itemToString:e=>e?String(e.key):``,selectedItem:k.find(e=>e.key===J)??null,onStateChange:e=>{typeof e.isOpen==`boolean`&&pe(e.isOpen)},stateReducer:(e,t)=>P&&Object.prototype.hasOwnProperty.call(t,`isOpen`)?{...t,highlightedIndex:t.isOpen?k.indexOf(e.selectedItem):null}:t,children:({getItemProps:e,getMenuProps:n,getToggleButtonProps:r,isOpen:a,selectedItem:o,highlightedIndex:s,setHighlightedIndex:d})=>l(`div`,{children:u(`div`,{ref:U,onFocus:ve,onBlur:ye,className:c(i.dropdownInput,{[i.dropdownInputPlain]:N,[i.dropdownInputReadOnly]:y&&!v},fe),children:[l(`button`,{tabIndex:g,type:`button`,disabled:v,"aria-readonly":y||void 0,style:w?{padding:`6px`,border:`none`}:{},className:c(i.dropdownInputButton,{[i.dropdownInputButtonDisabled]:v,[i.dropdownInputButtonReadOnly]:y&&!v},T),...r(),onClick:e=>{r().onClick?.(e),b?.(e)},ref:F,children:Z?`\xA0`:X}),l(`button`,{type:`button`,tabIndex:-1,disabled:v,className:c(i.dropdownInputButtonIcon,E),...r(),onClick:e=>{r().onClick?.(e),b?.(e)},children:!v&&!y&&l(te,{icon:ne,className:c(i.dropdownInputButtonIconArrow,{[i.dropdownInputButtonIconArrowOpen]:a})})}),!v&&!y&&a?l(t,{children:l(`div`,{...n({ref:e=>{W.current=e},"aria-label":h||M||void 0},{suppressRefError:!0}),className:c(i.dropdownInputListAnim,{[i.dropdownInputListAnimWider]:w}),style:{width:`${me}px`},children:l(ee,{onScroll:se,className:i.dropdownInputList,setHighlightedIndex:d,children:k.map((t,n)=>l(`div`,{...e({index:n,item:t,disabled:!!t.disabled}),className:c(i.dropdownInputListItem,D,{[i.dropdownInputListItemActive]:s===n,[i.dropdownInputListItemSelected]:o===t,[i.dropdownInputListItemDisabled]:!!t.disabled}),children:t.label},t.key))})})}):null,l(`fieldset`,{className:c(i.dropdownFieldset,{[i.dropdownBorderPlain]:N,[i.dropdownBorderFocused]:$,[i.dropdownBorderInvalid]:Y,[i.dropdownBorderError]:Y}),children:l(`legend`,{className:c(i.dropdownFieldsetLegend,{[i.dropdownFieldsetLegendActive]:A&&(j||$||!Z)}),children:l(`span`,{children:Se})})}),A&&h&&u(`div`,{className:c(i.dropdownMatLabel,{[i.dropdownMatLabelFloating]:j||$||!Z}),children:[h,Q]}),A&&M&&l(`div`,{className:c(i.dropdownPlaceholder,$&&!q&&i.dropdownPlaceholderShown),children:M})]})})}),h&&!A&&u(`div`,{className:c(i.dropdownLabelText,de),children:[h,Q]}),l(r,{variant:`error`,message:O?O.getCurrentErrorMessage():p||``,isVisible:Y&&(L||z)})]})}export{f as default};
|
|
2
2
|
//# sourceMappingURL=dropdown.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.mjs","names":[],"sources":["../../../../package/common/dropdown/dropdown.tsx"],"sourcesContent":["import React, { useState, useEffect, useRef } from 'react';\nimport cx from 'classnames';\nimport InfiniteBlock from 'components/common/infiniteBlock';\nimport BodyEnd from 'components/common/bodyEnd';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronDown as dropdownIcon } from '@fortawesome/free-solid-svg-icons';\nimport Downshift, { StateChangeOptions, DownshiftState } from 'downshift';\nimport Tooltip from 'components/common/tooltip';\n\nimport { useFloatingPosition } from '../floatingMenu/useFloatingPosition';\nimport { useComponentDefaults } from '../configProvider';\nimport styles from './dropdown.module.pcss';\nimport type { DropdownProps, DropdownItem } from './dropdown.types';\n\nfunction Dropdown(props: DropdownProps) {\n const {\n errorMessage = '',\n className = '',\n label = '',\n value = '',\n isValid = true,\n tabIndex = 0,\n isRequired = false,\n customProps = {},\n isRow = false,\n disabled = false,\n readOnly = false,\n onScroll = () => Promise.resolve(),\n onClick,\n onChange,\n onFocus: onFocusProp = null,\n onBlur: onBlurProp = null,\n onMouseEnter: onMouseEnterProp = null,\n onMouseLeave: onMouseLeaveProp = null,\n dropdownLabel: dropdownLabelProp,\n isDropdownListWider = false,\n inputClassName = '',\n dropDownIconClassName = '',\n dropDownClassName = '',\n formValidator = null,\n labelClassName = '',\n dropDownInputClassName = '',\n items = [],\n useMatLabelStyle = true,\n alwaysFloatLabel = false,\n placeholder = '',\n plainStyle = false,\n scrollToSelected = false,\n reactRef,\n ...rest\n } = useComponentDefaults('Dropdown', props);\n const [isFocused, setIsFocused] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const [, forceUpdate] = useState(0);\n const fvRef = useRef(formValidator);\n const triggerRef = useRef<HTMLDivElement>(null);\n const anchorRef = useRef<HTMLDivElement>(null);\n const [menuIsOpen, setMenuIsOpen] = useState(false);\n const [triggerWidth, setTriggerWidth] = useState(10);\n\n useEffect(() => {\n if (menuIsOpen) {\n const rect = triggerRef.current?.getBoundingClientRect();\n setTriggerWidth(rect?.width ?? 10);\n }\n }, [menuIsOpen]);\n\n useFloatingPosition({\n isOpen: menuIsOpen,\n triggerRef,\n anchorRef,\n panelRef: anchorRef,\n flipClassName: styles.dropdownInputListAnimFlip,\n });\n\n useEffect(() => {\n fvRef.current = formValidator;\n if (!fvRef.current) return;\n fvRef.current.label = label ?? '';\n fvRef.current.validate();\n const listener = () => forceUpdate(n => n + 1);\n fvRef.current.registerOnUpdateListener(listener);\n return () => fvRef.current?.removeOnUpdateListener(listener);\n }, [formValidator, label]);\n\n const onMouseEnterHandler = (event: React.MouseEvent) => {\n setIsHovered(true);\n onMouseEnterProp?.(event);\n };\n\n const onMouseLeaveHandler = (event: React.MouseEvent) => {\n setIsHovered(false);\n onMouseLeaveProp?.(event);\n };\n\n const onFocusHandler = (event: React.FocusEvent) => {\n setIsFocused(true);\n onFocusProp?.(event);\n };\n\n const onBlurHandler = (event: React.FocusEvent) => {\n if (fvRef.current) fvRef.current.touched = true;\n setIsFocused(false);\n onBlurProp?.(event);\n };\n\n const hasError = (): boolean => {\n return formValidator\n ? (formValidator.touched && formValidator.hasError())\n : (!isValid || !!errorMessage);\n };\n\n const computedIsRequired = (): boolean => {\n return !!(isRequired || formValidator?.validators.find(\n (v) => (v as { validatorId?: string }).validatorId === 'required'\n ));\n };\n\n const onChangeHandler = (val: string | number): void => {\n if (formValidator) {\n formValidator.set(val);\n onChange?.(formValidator.value, customProps);\n } else {\n onChange?.(val, customProps);\n }\n };\n\n let dropdownLabel = dropdownLabelProp;\n const currentValue = formValidator ? formValidator.value as string | number : value;\n const hasErr = hasError();\n\n items.forEach((item: DropdownItem) => {\n if (item.key === currentValue) {\n dropdownLabel = item.label as string;\n }\n });\n\n const displayValue = dropdownLabel || currentValue;\n const isDisplayBlank =\n displayValue == null ||\n (typeof displayValue === 'string' && displayValue.trim() === '');\n\n const requiredMark = computedIsRequired() ? <span className={styles.requiredMark}>*</span> : null;\n const editedLabel = label && computedIsRequired() ? `${label} *` : label;\n\n const showFocus = isFocused && !readOnly;\n\n return (\n <div\n {...rest}\n className={cx(className, styles.dropdownLabel, styles.dropdown, {\n [styles.dropdownLabelColumn]: !isRow,\n })}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n >\n <Downshift\n {...(readOnly ? { isOpen: false } : {})}\n onChange={(selection: DropdownItem | null) => onChangeHandler((selection || { key: '' }).key)}\n itemToString={(item: DropdownItem | null) => (item ? String(item.key) : '')}\n selectedItem={items.find((el) => el.key === currentValue) ?? null}\n onStateChange={(changes: StateChangeOptions<DropdownItem>) => {\n if (typeof changes.isOpen === 'boolean') setMenuIsOpen(changes.isOpen);\n }}\n stateReducer={(state: DownshiftState<DropdownItem>, changes: StateChangeOptions<DropdownItem>) => {\n if (scrollToSelected && Object.prototype.hasOwnProperty.call(changes, 'isOpen')) {\n return {\n ...changes,\n highlightedIndex: changes.isOpen ? items.indexOf(state.selectedItem as DropdownItem) : null,\n };\n }\n return changes;\n }}\n >\n {({\n getItemProps,\n getToggleButtonProps,\n isOpen,\n selectedItem,\n highlightedIndex,\n setHighlightedIndex,\n }) => (\n <div>\n <div\n ref={triggerRef}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n className={cx(\n styles.dropdownInput,\n {\n [styles.dropdownInputPlain]: plainStyle,\n [styles.dropdownInputReadOnly]: readOnly && !disabled,\n },\n dropDownInputClassName\n )}\n >\n <button\n tabIndex={tabIndex}\n type=\"button\"\n disabled={disabled}\n aria-readonly={readOnly || undefined}\n style={isDropdownListWider ? { padding: '6px', border: 'none' } : {}}\n className={cx(\n styles.dropdownInputButton,\n {\n [styles.dropdownInputButtonDisabled]: disabled,\n [styles.dropdownInputButtonReadOnly]: readOnly && !disabled,\n },\n inputClassName\n )}\n {...getToggleButtonProps()}\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n getToggleButtonProps().onClick?.(e);\n onClick?.(e);\n }}\n ref={reactRef}\n >\n {/* Non-breaking space when blank (same text-node layout as a\n real value) so the button keeps a full line of height. */}\n {isDisplayBlank ? '\\u00A0' : displayValue}\n </button>\n <button\n type=\"button\"\n tabIndex={-1}\n disabled={disabled}\n className={cx(styles.dropdownInputButtonIcon, dropDownIconClassName)}\n {...getToggleButtonProps()}\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n getToggleButtonProps().onClick?.(e);\n onClick?.(e);\n }}\n >\n {!disabled && !readOnly && (\n <FontAwesomeIcon\n icon={dropdownIcon}\n className={cx(styles.dropdownInputButtonIconArrow, {\n [styles.dropdownInputButtonIconArrowOpen]: isOpen,\n })}\n />\n )}\n </button>\n {!disabled && !readOnly && isOpen ? (\n <BodyEnd>\n <div\n ref={anchorRef}\n className={cx(styles.dropdownInputListAnim, {\n [styles.dropdownInputListAnimWider]: isDropdownListWider,\n })}\n style={{ width: `${triggerWidth}px` }}\n >\n <InfiniteBlock\n onScroll={onScroll}\n className={styles.dropdownInputList}\n setHighlightedIndex={setHighlightedIndex}\n >\n {items.map((item: DropdownItem, index: number) => (\n <div\n key={item.key}\n {...getItemProps({ index, item, disabled: !!item.disabled })}\n className={cx(styles.dropdownInputListItem, dropDownClassName, {\n [styles.dropdownInputListItemActive]: highlightedIndex === index,\n [styles.dropdownInputListItemSelected]: selectedItem === item,\n [styles.dropdownInputListItemDisabled]: !!item.disabled,\n })}\n >\n {item.label}\n </div>\n ))}\n </InfiniteBlock>\n </div>\n </BodyEnd>\n ) : null}\n <fieldset\n className={cx(styles.dropdownFieldset, {\n [styles.dropdownBorderPlain]: plainStyle,\n [styles.dropdownBorderFocused]: showFocus,\n [styles.dropdownBorderInvalid]: hasErr,\n [styles.dropdownBorderError]: hasErr,\n })}\n >\n <legend\n className={cx(styles.dropdownFieldsetLegend, {\n [styles.dropdownFieldsetLegendActive]:\n useMatLabelStyle && (alwaysFloatLabel || showFocus || !isDisplayBlank),\n })}\n >\n <span>{editedLabel}</span>\n </legend>\n </fieldset>\n {useMatLabelStyle && label && (\n <div\n className={cx(styles.dropdownMatLabel, {\n [styles.dropdownMatLabelFloating]: alwaysFloatLabel || showFocus || !isDisplayBlank,\n })}\n >\n {label}\n {requiredMark}\n </div>\n )}\n {useMatLabelStyle && placeholder && (\n <div\n className={cx(\n styles.dropdownPlaceholder,\n showFocus && !dropdownLabel && styles.dropdownPlaceholderShown\n )}\n >\n {placeholder}\n </div>\n )}\n </div>\n </div>\n )}\n </Downshift>\n {label && !useMatLabelStyle && (\n <div className={cx(styles.dropdownLabelText, labelClassName)}>\n {label}\n {requiredMark}\n </div>\n )}\n <Tooltip\n variant=\"error\"\n message={formValidator ? formValidator.getCurrentErrorMessage() : (errorMessage || '')}\n isVisible={hasErr && (isFocused || isHovered)}\n />\n </div>\n );\n}\n\nexport default Dropdown;\n"],"mappings":"2mBAcA,SAAS,EAAS,EAAsB,CACtC,GAAM,CACN,eAAe,GACf,aAAY,GACZ,QAAQ,GACR,QAAQ,GACR,WAAU,GACV,YAAW,EACX,cAAa,GACb,cAAc,CAAC,EACf,SAAQ,GACR,WAAW,GACX,WAAW,GACX,gBAAiB,QAAQ,QAAQ,EACjC,UACA,WACA,QAAS,EAAc,KACvB,OAAQ,GAAa,KACrB,aAAc,EAAmB,KACjC,aAAc,EAAmB,KACjC,cAAe,EACf,sBAAsB,GACtB,iBAAiB,GACjB,wBAAwB,GACxB,oBAAoB,GACpB,gBAAgB,KAChB,kBAAiB,GACjB,0BAAyB,GACzB,QAAQ,CAAC,EACT,mBAAmB,GACnB,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,WACA,GAAG,GACC,EAAqB,WAAY,CAAK,EACpC,CAAC,EAAW,GAAgB,EAAS,EAAK,EAC1C,CAAC,EAAW,GAAgB,EAAS,EAAK,EAC1C,EAAG,GAAe,EAAS,CAAC,EAC5B,EAAQ,EAAO,CAAa,EAC5B,EAAa,EAAuB,IAAI,EACxC,EAAY,EAAuB,IAAI,EACvC,CAAC,EAAY,IAAiB,EAAS,EAAK,EAC5C,CAAC,GAAc,IAAmB,EAAS,EAAE,EAEnD,MAAgB,CACd,GAAI,EAAY,CACd,IAAM,EAAO,EAAW,SAAS,sBAAsB,EACvD,GAAgB,GAAM,OAAS,EAAE,CACnC,CACF,EAAG,CAAC,CAAU,CAAC,EAEf,EAAoB,CAClB,OAAQ,EACR,aACA,YACA,SAAU,EACV,cAAe,EAAO,yBACxB,CAAC,EAED,MAAgB,CAEd,GADA,EAAM,QAAU,EACZ,CAAC,EAAM,QAAS,OACpB,EAAM,QAAQ,MAAQ,GAAS,GAC/B,EA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AAO,oBACP,GAAa,CAAC,GAAiB,EAAO,wBACxC,WAEC,CACE,CAAA,CAEJ,GACF,CAAA,CAEE,CAAA,EACV,GAAS,CAAC,GACT,EAAC,MAAD,CAAK,UAAW,EAAG,EAAO,kBAAmB,EAAc,WAA3D,CACG,EACA,CACE,IAEP,EAAC,EAAD,CACE,QAAQ,QACR,QAAS,EAAgB,EAAc,uBAAuB,EAAK,GAAgB,GACnF,UAAW,IAAW,GAAa,EACpC,CAAA,CACE,GAET"}
|
|
1
|
+
{"version":3,"file":"dropdown.mjs","names":[],"sources":["../../../../package/common/dropdown/dropdown.tsx"],"sourcesContent":["import React, { useState, useEffect, useRef } from 'react';\nimport cx from 'classnames';\nimport InfiniteBlock from 'components/common/infiniteBlock';\nimport BodyEnd from 'components/common/bodyEnd';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronDown as dropdownIcon } from '@fortawesome/free-solid-svg-icons';\nimport Downshift, { StateChangeOptions, DownshiftState } from 'downshift';\nimport Tooltip from 'components/common/tooltip';\n\nimport { useFloatingPosition } from '../floatingMenu/useFloatingPosition';\nimport { useComponentDefaults } from '../configProvider';\nimport styles from './dropdown.module.pcss';\nimport type { DropdownProps, DropdownItem } from './dropdown.types';\n\nfunction Dropdown(props: DropdownProps) {\n const {\n errorMessage = '',\n className = '',\n label = '',\n value = '',\n isValid = true,\n tabIndex = 0,\n isRequired = false,\n customProps = {},\n isRow = false,\n disabled = false,\n readOnly = false,\n onScroll = () => Promise.resolve(),\n onClick,\n onChange,\n onFocus: onFocusProp = null,\n onBlur: onBlurProp = null,\n onMouseEnter: onMouseEnterProp = null,\n onMouseLeave: onMouseLeaveProp = null,\n dropdownLabel: dropdownLabelProp,\n isDropdownListWider = false,\n inputClassName = '',\n dropDownIconClassName = '',\n dropDownClassName = '',\n formValidator = null,\n labelClassName = '',\n dropDownInputClassName = '',\n items = [],\n useMatLabelStyle = true,\n alwaysFloatLabel = false,\n placeholder = '',\n plainStyle = false,\n scrollToSelected = false,\n reactRef,\n ...rest\n } = useComponentDefaults('Dropdown', props);\n const [isFocused, setIsFocused] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const [, forceUpdate] = useState(0);\n const fvRef = useRef(formValidator);\n const triggerRef = useRef<HTMLDivElement>(null);\n const anchorRef = useRef<HTMLDivElement>(null);\n const [menuIsOpen, setMenuIsOpen] = useState(false);\n const [triggerWidth, setTriggerWidth] = useState(10);\n\n useEffect(() => {\n if (menuIsOpen) {\n const rect = triggerRef.current?.getBoundingClientRect();\n setTriggerWidth(rect?.width ?? 10);\n }\n }, [menuIsOpen]);\n\n useFloatingPosition({\n isOpen: menuIsOpen,\n triggerRef,\n anchorRef,\n panelRef: anchorRef,\n flipClassName: styles.dropdownInputListAnimFlip,\n });\n\n useEffect(() => {\n fvRef.current = formValidator;\n if (!fvRef.current) return;\n fvRef.current.label = label ?? '';\n fvRef.current.validate();\n const listener = () => forceUpdate(n => n + 1);\n fvRef.current.registerOnUpdateListener(listener);\n return () => fvRef.current?.removeOnUpdateListener(listener);\n }, [formValidator, label]);\n\n const onMouseEnterHandler = (event: React.MouseEvent) => {\n setIsHovered(true);\n onMouseEnterProp?.(event);\n };\n\n const onMouseLeaveHandler = (event: React.MouseEvent) => {\n setIsHovered(false);\n onMouseLeaveProp?.(event);\n };\n\n const onFocusHandler = (event: React.FocusEvent) => {\n setIsFocused(true);\n onFocusProp?.(event);\n };\n\n const onBlurHandler = (event: React.FocusEvent) => {\n if (fvRef.current) fvRef.current.touched = true;\n setIsFocused(false);\n onBlurProp?.(event);\n };\n\n const hasError = (): boolean => {\n return formValidator\n ? (formValidator.touched && formValidator.hasError())\n : (!isValid || !!errorMessage);\n };\n\n const computedIsRequired = (): boolean => {\n return !!(isRequired || formValidator?.validators.find(\n (v) => (v as { validatorId?: string }).validatorId === 'required'\n ));\n };\n\n const onChangeHandler = (val: string | number): void => {\n if (formValidator) {\n formValidator.set(val);\n onChange?.(formValidator.value, customProps);\n } else {\n onChange?.(val, customProps);\n }\n };\n\n let dropdownLabel = dropdownLabelProp;\n const currentValue = formValidator ? formValidator.value as string | number : value;\n const hasErr = hasError();\n\n items.forEach((item: DropdownItem) => {\n if (item.key === currentValue) {\n dropdownLabel = item.label as string;\n }\n });\n\n const displayValue = dropdownLabel || currentValue;\n const isDisplayBlank =\n displayValue == null ||\n (typeof displayValue === 'string' && displayValue.trim() === '');\n\n const requiredMark = computedIsRequired() ? <span className={styles.requiredMark}>*</span> : null;\n const editedLabel = label && computedIsRequired() ? `${label} *` : label;\n\n const showFocus = isFocused && !readOnly;\n\n return (\n <div\n {...rest}\n className={cx(className, styles.dropdownLabel, styles.dropdown, {\n [styles.dropdownLabelColumn]: !isRow,\n })}\n onMouseEnter={onMouseEnterHandler}\n onMouseLeave={onMouseLeaveHandler}\n >\n <Downshift\n {...(readOnly ? { isOpen: false } : {})}\n onChange={(selection: DropdownItem | null) => onChangeHandler((selection || { key: '' }).key)}\n itemToString={(item: DropdownItem | null) => (item ? String(item.key) : '')}\n selectedItem={items.find((el) => el.key === currentValue) ?? null}\n onStateChange={(changes: StateChangeOptions<DropdownItem>) => {\n if (typeof changes.isOpen === 'boolean') setMenuIsOpen(changes.isOpen);\n }}\n stateReducer={(state: DownshiftState<DropdownItem>, changes: StateChangeOptions<DropdownItem>) => {\n if (scrollToSelected && Object.prototype.hasOwnProperty.call(changes, 'isOpen')) {\n return {\n ...changes,\n highlightedIndex: changes.isOpen ? items.indexOf(state.selectedItem as DropdownItem) : null,\n };\n }\n return changes;\n }}\n >\n {({\n getItemProps,\n getMenuProps,\n getToggleButtonProps,\n isOpen,\n selectedItem,\n highlightedIndex,\n setHighlightedIndex,\n }) => (\n <div>\n <div\n ref={triggerRef}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n className={cx(\n styles.dropdownInput,\n {\n [styles.dropdownInputPlain]: plainStyle,\n [styles.dropdownInputReadOnly]: readOnly && !disabled,\n },\n dropDownInputClassName\n )}\n >\n <button\n tabIndex={tabIndex}\n type=\"button\"\n disabled={disabled}\n aria-readonly={readOnly || undefined}\n style={isDropdownListWider ? { padding: '6px', border: 'none' } : {}}\n className={cx(\n styles.dropdownInputButton,\n {\n [styles.dropdownInputButtonDisabled]: disabled,\n [styles.dropdownInputButtonReadOnly]: readOnly && !disabled,\n },\n inputClassName\n )}\n {...getToggleButtonProps()}\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n getToggleButtonProps().onClick?.(e);\n onClick?.(e);\n }}\n ref={reactRef}\n >\n {/* Non-breaking space when blank (same text-node layout as a\n real value) so the button keeps a full line of height. */}\n {isDisplayBlank ? '\\u00A0' : displayValue}\n </button>\n <button\n type=\"button\"\n tabIndex={-1}\n disabled={disabled}\n className={cx(styles.dropdownInputButtonIcon, dropDownIconClassName)}\n {...getToggleButtonProps()}\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n getToggleButtonProps().onClick?.(e);\n onClick?.(e);\n }}\n >\n {!disabled && !readOnly && (\n <FontAwesomeIcon\n icon={dropdownIcon}\n className={cx(styles.dropdownInputButtonIconArrow, {\n [styles.dropdownInputButtonIconArrowOpen]: isOpen,\n })}\n />\n )}\n </button>\n {!disabled && !readOnly && isOpen ? (\n <BodyEnd>\n <div\n {...getMenuProps(\n {\n ref: (node: HTMLDivElement | null) => {\n anchorRef.current = node;\n },\n 'aria-label': label || placeholder || undefined,\n },\n { suppressRefError: true }\n )}\n className={cx(styles.dropdownInputListAnim, {\n [styles.dropdownInputListAnimWider]: isDropdownListWider,\n })}\n style={{ width: `${triggerWidth}px` }}\n >\n <InfiniteBlock\n onScroll={onScroll}\n className={styles.dropdownInputList}\n setHighlightedIndex={setHighlightedIndex}\n >\n {items.map((item: DropdownItem, index: number) => (\n <div\n key={item.key}\n {...getItemProps({ index, item, disabled: !!item.disabled })}\n className={cx(styles.dropdownInputListItem, dropDownClassName, {\n [styles.dropdownInputListItemActive]: highlightedIndex === index,\n [styles.dropdownInputListItemSelected]: selectedItem === item,\n [styles.dropdownInputListItemDisabled]: !!item.disabled,\n })}\n >\n {item.label}\n </div>\n ))}\n </InfiniteBlock>\n </div>\n </BodyEnd>\n ) : null}\n <fieldset\n className={cx(styles.dropdownFieldset, {\n [styles.dropdownBorderPlain]: plainStyle,\n [styles.dropdownBorderFocused]: showFocus,\n [styles.dropdownBorderInvalid]: hasErr,\n [styles.dropdownBorderError]: hasErr,\n })}\n >\n <legend\n className={cx(styles.dropdownFieldsetLegend, {\n [styles.dropdownFieldsetLegendActive]:\n useMatLabelStyle && (alwaysFloatLabel || showFocus || !isDisplayBlank),\n })}\n >\n <span>{editedLabel}</span>\n </legend>\n </fieldset>\n {useMatLabelStyle && label && (\n <div\n className={cx(styles.dropdownMatLabel, {\n [styles.dropdownMatLabelFloating]: alwaysFloatLabel || showFocus || !isDisplayBlank,\n })}\n >\n {label}\n {requiredMark}\n </div>\n )}\n {useMatLabelStyle && placeholder && (\n <div\n className={cx(\n styles.dropdownPlaceholder,\n showFocus && !dropdownLabel && styles.dropdownPlaceholderShown\n )}\n >\n {placeholder}\n </div>\n )}\n </div>\n </div>\n )}\n </Downshift>\n {label && !useMatLabelStyle && (\n <div className={cx(styles.dropdownLabelText, labelClassName)}>\n {label}\n {requiredMark}\n </div>\n )}\n <Tooltip\n variant=\"error\"\n message={formValidator ? formValidator.getCurrentErrorMessage() : (errorMessage || '')}\n isVisible={hasErr && (isFocused || isHovered)}\n />\n </div>\n );\n}\n\nexport default Dropdown;\n"],"mappings":"0mBAcA,SAAS,EAAS,EAAsB,CACtC,GAAM,CACN,eAAe,GACf,YAAY,GACZ,QAAQ,GACR,SAAQ,GACR,WAAU,GACV,WAAW,EACX,cAAa,GACb,cAAc,CAAC,EACf,SAAQ,GACR,WAAW,GACX,WAAW,GACX,gBAAiB,QAAQ,QAAQ,EACjC,UACA,WACA,QAAS,GAAc,KACvB,OAAQ,EAAa,KACrB,aAAc,EAAmB,KACjC,aAAc,GAAmB,KACjC,cAAe,GACf,sBAAsB,GACtB,iBAAiB,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 +1 @@
|
|
|
1
|
-
import{AccordionStyleType as e}from"./common/accordion/accordion.types.mjs";import t from"./common/configProvider/configProvider.mjs";import{useComponentDefaults as n}from"./common/configProvider/useComponentDefaults.mjs";import r from"./common/accordion/accordion.mjs";import i from"./common/loading/spinnerLoading/index.mjs";import{ButtonSize as a,ButtonStyleType as o,ButtonType as s}from"./common/button/button.types.mjs";import c from"./common/ripple/ripple.mjs";import l from"./common/button/button.mjs";import u from"./common/actionButtons/actionButtons.mjs";import d from"./common/interactableDiv/index.mjs";import f from"./common/actionIcon/actionIcon.mjs";import{BadgePosition as
|
|
1
|
+
import{AccordionStyleType as e}from"./common/accordion/accordion.types.mjs";import t from"./common/configProvider/configProvider.mjs";import{useComponentDefaults as n}from"./common/configProvider/useComponentDefaults.mjs";import r from"./common/accordion/accordion.mjs";import i from"./common/loading/spinnerLoading/index.mjs";import{ButtonSize as a,ButtonStyleType as o,ButtonType as s}from"./common/button/button.types.mjs";import c from"./common/ripple/ripple.mjs";import l from"./common/button/button.mjs";import u from"./common/actionButtons/actionButtons.mjs";import d from"./common/interactableDiv/index.mjs";import f from"./common/actionIcon/actionIcon.mjs";import p from"./common/animatedLogo/animatedLogo.mjs";import{BadgePosition as m,BadgeStyleType as h}from"./common/badge/badge.types.mjs";import g from"./common/badge/badge.mjs";import _ from"./common/avatar/avatar.mjs";import v from"./common/avatar/avatarGroup.mjs";import y from"./common/bodyEnd/bodyEnd.mjs";import{CardStyleType as b}from"./common/card/card.types.mjs";import x from"./common/card/Card.mjs";import S from"./common/card/CardHeader.mjs";import C from"./common/card/CardMedia.mjs";import w from"./common/card/CardContent.mjs";import T from"./common/card/CardActions.mjs";import E from"./common/checkbox/checkbox.mjs";import{ChipStyleType as D}from"./common/chip/chip.types.mjs";import O from"./common/chip/chip.mjs";import k from"./common/chip/chipContainer.mjs";import{Align as A}from"./common/floatingMenu/floatingMenu.types.mjs";import j from"./common/floatingMenu/floatingMenu.mjs";import M from"./common/tooltip/tooltip.mjs";import{InputType as N}from"./common/input/input.types.mjs";import P from"./common/input/input.mjs";import F from"./common/colorPicker/colorPicker.mjs";import I from"./common/modal/modal.mjs";import L from"./common/confirmModal/confirmModal.mjs";import{getLocale as R,mapLocale as z,setLocale as B}from"./services/localization.mjs";import V from"./common/infiniteBlock/infiniteBlock.mjs";import H from"./common/dropdown/dropdown.mjs";import U from"./common/datePicker/datePicker.mjs";import{DividerTextPosition as W}from"./common/divider/divider.types.mjs";import G from"./common/divider/divider.mjs";import K from"./common/drawer/drawer.mjs";import{DropZoneReturnType as q,DropZoneStatus as J}from"./common/dropZone/dropZone.types.mjs";import Y from"./common/dropZone/dropZone.mjs";import X from"./common/emptyState/emptyState.mjs";import Z from"./common/fab/fab.mjs";import Q from"./common/iconPicker/iconPicker.mjs";import $ from"./common/idleManager/idleManager.mjs";import ee from"./common/inputDropdown/inputDropdown.mjs";import te from"./common/kanbanBoard/KanbanColumn.mjs";import ne from"./common/kanbanBoard/KanbanBoard.mjs";import re from"./common/searchInput/searchInput.mjs";import ie from"./common/klipyPicker/klipyPicker.mjs";import ae from"./common/loading/iconLoading/index.mjs";import oe from"./common/numberInput/index.mjs";import se from"./common/optionPicker/optionPicker.mjs";import ce from"./common/overscroll/overscroll.mjs";import le from"./common/progressBar/progressBar.mjs";import ue from"./common/roomDrawer/roomDrawer.mjs";import de from"./common/roomViewer/roomViewer.mjs";import fe from"./common/scrollbarProvider/index.mjs";import{SectionHeaderSize as pe}from"./common/sectionHeader/sectionHeader.types.mjs";import me from"./common/sectionHeader/sectionHeader.mjs";import{SkeletonAnimation as he,SkeletonVariant as ge}from"./common/skeleton/skeleton.types.mjs";import _e from"./common/skeleton/skeleton.mjs";import ve from"./common/stepper/stepper.mjs";import ye from"./common/sticky/sticky.mjs";import be from"./common/switch/switch.mjs";import xe from"./common/tabHeader/tabHeader.mjs";import Se from"./common/textarea/textarea.mjs";import{defaultTheme as Ce}from"./common/themeProvider/defaultTheme.mjs";import we from"./common/themeProvider/themeProvider.mjs";import{useTheme as Te}from"./common/themeProvider/useTheme.mjs";import Ee from"./common/timeInput/timeInput.mjs";import{showToast as De}from"./common/toast/toastService.mjs";import Oe from"./common/toast/toastProvider.mjs";import ke from"./common/virtualList/virtualList.mjs";import Ae from"./common/wizard/wizard.mjs";import je from"./services/formValidation/FormValidatorGroupWithForm.mjs";import Me from"./services/formValidation/validatableComponent.mjs";import{useFormValidatorGroup as Ne}from"./services/formValidation/useFormValidatorGroup.mjs";import{FormValidator as Pe,Validators as Fe,useFormValidator as Ie}from"./services/formValidation/index.mjs";import{hasEightPasswordChars as Le,hasOnePasswordDigit as Re,hasOnePasswordLetter as ze,isBic as Be,isDate as Ve,isEmail as He,isISODate as Ue,isNumber as We,isPassword as Ge,isURL as Ke}from"@ahrowe/form-validation";export{r as Accordion,e as AccordionStyleType,u as ActionButtons,f as ActionIcon,A as Align,p as AnimatedLogo,_ as Avatar,v as AvatarGroup,g as Badge,m as BadgePosition,h as BadgeStyleType,y as BodyEnd,l as Button,a as ButtonSize,o as ButtonStyleType,s as ButtonType,x as Card,T as CardActions,w as CardContent,S as CardHeader,C as CardMedia,b as CardStyleType,E as Checkbox,O as Chip,k as ChipContainer,D as ChipStyleType,F as ColorPicker,t as ConfigProvider,L as ConfirmModal,U as DatePicker,G as Divider,W as DividerTextPosition,K as Drawer,Y as DropZone,q as DropZoneReturnType,J as DropZoneStatus,H as Dropdown,X as EmptyState,Z as Fab,j as FloatingMenu,Pe as FormValidator,je as FormValidatorGroup,ae as IconLoading,Q as IconPicker,$ as IdleManager,V as InfiniteBlock,P as Input,ee as InputDropdown,N as InputType,d as InteractableDiv,ne as KanbanBoard,te as KanbanColumn,ie as KlipyPicker,I as Modal,oe as NumberInput,se as OptionPicker,ce as Overscroll,le as ProgressBar,c as Ripple,ue as RoomDrawer,de as RoomViewer,fe as ScrollbarProvider,re as SearchInput,me as SectionHeader,pe as SectionHeaderSize,_e as Skeleton,he as SkeletonAnimation,ge as SkeletonVariant,i as SpinnerLoading,ve as Stepper,ye as Sticky,be as Switch,xe as TabHeader,Se as Textarea,we as ThemeProvider,Ee as TimeInput,Oe as ToastProvider,M as Tooltip,Me as ValidatableComponent,Fe as Validators,ke as VirtualList,Ae as Wizard,Ce as defaultTheme,R as getLocale,Le as hasEightPasswordChars,Re as hasOnePasswordDigit,ze as hasOnePasswordLetter,Be as isBic,Ve as isDate,He as isEmail,Ue as isISODate,We as isNumber,Ge as isPassword,Ke as isURL,z as mapLocale,B as setLocale,De as showToast,n as useComponentDefaults,Ie as useFormValidator,Ne as useFormValidatorGroup,Te as useTheme};
|