@utilitywarehouse/hearth-react 0.29.3 → 0.29.4
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/{chunk-OJJSCBNA.cjs → chunk-3O4EY4LN.cjs} +2 -2
- package/dist/{chunk-OJJSCBNA.cjs.map → chunk-3O4EY4LN.cjs.map} +1 -1
- package/dist/{chunk-E2LJWMLE.cjs → chunk-4RY5R4WP.cjs} +2 -2
- package/dist/{chunk-E2LJWMLE.cjs.map → chunk-4RY5R4WP.cjs.map} +1 -1
- package/dist/{chunk-YSR4CFOP.cjs → chunk-74E6KM4O.cjs} +2 -2
- package/dist/{chunk-YSR4CFOP.cjs.map → chunk-74E6KM4O.cjs.map} +1 -1
- package/dist/{chunk-SL432TNM.js → chunk-7EK77SDW.js} +2 -2
- package/dist/{chunk-73VMS5OD.js → chunk-7YZPBUKR.js} +2 -2
- package/dist/{chunk-DCWWJSTL.js → chunk-BLJICJ25.js} +2 -2
- package/dist/{chunk-2OQIOTXW.cjs → chunk-BM5LWFCB.cjs} +2 -2
- package/dist/{chunk-2OQIOTXW.cjs.map → chunk-BM5LWFCB.cjs.map} +1 -1
- package/dist/{chunk-IPMH4SYG.cjs → chunk-D4AQHXLR.cjs} +2 -2
- package/dist/{chunk-IPMH4SYG.cjs.map → chunk-D4AQHXLR.cjs.map} +1 -1
- package/dist/{chunk-FMIVCYNP.js → chunk-HJEUUACJ.js} +2 -2
- package/dist/{chunk-6G4AP5WK.cjs → chunk-HLBSLEBS.cjs} +2 -2
- package/dist/{chunk-6G4AP5WK.cjs.map → chunk-HLBSLEBS.cjs.map} +1 -1
- package/dist/{chunk-EVB4UA2I.js → chunk-INJ6SL3W.js} +2 -2
- package/dist/{chunk-X2ZTEWSG.cjs → chunk-LWHIBSW2.cjs} +2 -2
- package/dist/{chunk-X2ZTEWSG.cjs.map → chunk-LWHIBSW2.cjs.map} +1 -1
- package/dist/{chunk-LE64MJST.js → chunk-MIVYZGEV.js} +2 -2
- package/dist/{chunk-TRRQVHDM.js → chunk-MJF6EV5G.js} +2 -2
- package/dist/{chunk-A7MSM3LN.cjs → chunk-O3NS4CL4.cjs} +2 -2
- package/dist/{chunk-A7MSM3LN.cjs.map → chunk-O3NS4CL4.cjs.map} +1 -1
- package/dist/{chunk-FLO4EWFQ.js → chunk-OH5J7HR2.js} +2 -2
- package/dist/{chunk-IGURU76C.cjs → chunk-PTRHEB7E.cjs} +2 -2
- package/dist/{chunk-IGURU76C.cjs.map → chunk-PTRHEB7E.cjs.map} +1 -1
- package/dist/{chunk-A55R2RMG.cjs → chunk-RKGHQAJP.cjs} +2 -2
- package/dist/{chunk-A55R2RMG.cjs.map → chunk-RKGHQAJP.cjs.map} +1 -1
- package/dist/{chunk-2DFZ6RNJ.js → chunk-RU4YPNKV.js} +2 -2
- package/dist/{chunk-ILOOUMED.cjs → chunk-S5NL27AO.cjs} +2 -2
- package/dist/{chunk-ILOOUMED.cjs.map → chunk-S5NL27AO.cjs.map} +1 -1
- package/dist/{chunk-XNIY324T.js → chunk-W5DRITCP.js} +2 -2
- package/dist/{chunk-Y472C5BW.js → chunk-Z6W64KTC.js} +2 -2
- package/dist/components/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/CheckboxTile/CheckboxTile.cjs +1 -1
- package/dist/components/CheckboxTile/CheckboxTile.js +1 -1
- package/dist/components/Combobox/Combobox.cjs +1 -1
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/DescriptionList/DescriptionList.cjs +1 -1
- package/dist/components/DescriptionList/DescriptionList.js +1 -1
- package/dist/components/ExpandableCard/ExpandableCardGroup.cjs +1 -1
- package/dist/components/ExpandableCard/ExpandableCardGroup.js +1 -1
- package/dist/components/HighlightBanner/HighlightBanner.props.d.ts +2 -1
- package/dist/components/HighlightBanner/HighlightBanner.props.d.ts.map +1 -1
- package/dist/components/List/List.cjs +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/RadioTile/RadioTile.cjs +1 -1
- package/dist/components/RadioTile/RadioTile.js +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs +1 -1
- package/dist/components/SectionHeader/SectionHeader.js +1 -1
- package/dist/components/Skeleton/SkeletonBodyText.cjs +1 -1
- package/dist/components/Skeleton/SkeletonBodyText.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -2
- package/public/llms/components/combobox.md +2 -0
- package/public/llms/components/highlight-banner.md +42 -12
- package/public/llms/docs/common-props/colour.md +14 -0
- package/public/llms/docs/getting-started.md +1 -1
- package/public/llms.txt +0 -1
- package/scripts/init-ai.js +1 -1
- package/public/llms/docs/changelog.md +0 -1430
- /package/dist/{chunk-SL432TNM.js.map → chunk-7EK77SDW.js.map} +0 -0
- /package/dist/{chunk-73VMS5OD.js.map → chunk-7YZPBUKR.js.map} +0 -0
- /package/dist/{chunk-DCWWJSTL.js.map → chunk-BLJICJ25.js.map} +0 -0
- /package/dist/{chunk-FMIVCYNP.js.map → chunk-HJEUUACJ.js.map} +0 -0
- /package/dist/{chunk-EVB4UA2I.js.map → chunk-INJ6SL3W.js.map} +0 -0
- /package/dist/{chunk-LE64MJST.js.map → chunk-MIVYZGEV.js.map} +0 -0
- /package/dist/{chunk-TRRQVHDM.js.map → chunk-MJF6EV5G.js.map} +0 -0
- /package/dist/{chunk-FLO4EWFQ.js.map → chunk-OH5J7HR2.js.map} +0 -0
- /package/dist/{chunk-2DFZ6RNJ.js.map → chunk-RU4YPNKV.js.map} +0 -0
- /package/dist/{chunk-XNIY324T.js.map → chunk-W5DRITCP.js.map} +0 -0
- /package/dist/{chunk-Y472C5BW.js.map → chunk-Z6W64KTC.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var _chunkHINGYWQGcjs = require('./chunk-HINGYWQG.cjs');var _chunkR7JGZXZ7cjs = require('./chunk-R7JGZXZ7.cjs');var _chunkJ7FFTG2Ecjs = require('./chunk-J7FFTG2E.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkHINGYWQGcjs = require('./chunk-HINGYWQG.cjs');var _chunkR7JGZXZ7cjs = require('./chunk-R7JGZXZ7.cjs');var _chunkJ7FFTG2Ecjs = require('./chunk-J7FFTG2E.cjs');var _chunkIWYX25BFcjs = require('./chunk-IWYX25BF.cjs');var _chunkLYHXMFNXcjs = require('./chunk-LYHXMFNX.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var H="SectionHeader",o=_chunk4Q432K4Wcjs.b.call(void 0, H),P= exports.a =_react.forwardRef.call(void 0, ({className:x,heading:N,id:C,headingElement:E="div",helperText:t,trailingContent:n,validationText:r,validationStatus:i,direction:S,...u},T)=>{let g=i!==void 0&&r!==void 0;return _jsxruntime.jsxs.call(void 0, _chunkLYHXMFNXcjs.a,{ref:T,className:_chunkONNSZMWFcjs.a.call(void 0, o,x),direction:S,"data-testid":o,...u,children:[_jsxruntime.jsxs.call(void 0, _chunkIWYX25BFcjs.a,{className:`${o}Content`,children:[_jsxruntime.jsx.call(void 0, _chunkJ7FFTG2Ecjs.a,{asChild:!0,size:"md",id:C,children:_jsxruntime.jsx.call(void 0, E,{children:N})}),t?_jsxruntime.jsx.call(void 0, _chunkR7JGZXZ7cjs.a,{children:t}):null,g?_jsxruntime.jsx.call(void 0, _chunkHINGYWQGcjs.a,{status:i,children:r}):null]}),n?_jsxruntime.jsx.call(void 0, "span",{className:`${o}TrailingContent`,children:n}):null]})});P.displayName=H;exports.a = P;
|
|
4
|
+
//# sourceMappingURL=chunk-3O4EY4LN.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-3O4EY4LN.cjs","../src/components/SectionHeader/SectionHeader.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","SectionHeader","forwardRef","className","heading","id","HeadingEl","helperText","trailingContent","validationText","validationStatus","direction","props","ref","showValidationText","jsxs","Flex","cn","Box"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCFnQ,+CA0CnB,IA/BFA,CAAAA,CAAiB,eAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAgBC,+BAAAA,CAEzB,CACE,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,EAAA,CAAAC,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAAY,KAAA,CAC5B,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,IAAMC,CAAAA,CAAqBJ,CAAAA,GAAqB,KAAA,CAAA,EAAaD,CAAAA,GAAmB,KAAA,CAAA,CAEhF,OACEM,8BAAAA,mBAACC,CAAA,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWI,iCAAAA,CAAGlB,CAAoBI,CAAS,CAAA,CAC3C,SAAA,CAAWQ,CAAAA,CACX,aAAA,CAAaZ,CAAAA,CACZ,GAAGa,CAAAA,CAEJ,QAAA,CAAA,CAAAG,8BAAAA,mBAACG,CAAA,CAAI,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-3O4EY4LN.cjs","sourcesContent":[null,"import { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Heading } from '../Heading/Heading';\nimport { HelperText } from '../HelperText/HelperText';\nimport type { SectionHeaderProps } from './SectionHeader.props';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport { Box } from '../Box/Box';\nimport { Flex } from '../Flex/Flex';\n\nconst COMPONENT_NAME = 'SectionHeader';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype SectionHeaderElement = ComponentRef<'div'>;\n\nexport const SectionHeader = forwardRef<SectionHeaderElement, SectionHeaderProps>(\n (\n {\n className,\n heading,\n id,\n headingElement: HeadingEl = 'div',\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n direction,\n ...props\n },\n ref\n ) => {\n const showValidationText = validationStatus !== undefined && validationText !== undefined;\n\n return (\n <Flex\n ref={ref}\n className={cn(componentClassName, className)}\n direction={direction}\n data-testid={componentClassName}\n {...props}\n >\n <Box className={`${componentClassName}Content`}>\n <Heading asChild size=\"md\" id={id}>\n <HeadingEl>{heading}</HeadingEl>\n </Heading>\n {helperText ? <HelperText>{helperText}</HelperText> : null}\n {showValidationText ? (\n <ValidationText status={validationStatus}>{validationText}</ValidationText>\n ) : null}\n </Box>\n\n {trailingContent ? (\n <span className={`${componentClassName}TrailingContent`}>{trailingContent}</span>\n ) : null}\n </Flex>\n );\n }\n);\n\nSectionHeader.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
|
-
var _chunkWSD52THLcjs = require('./chunk-WSD52THL.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkWSD52THLcjs = require('./chunk-WSD52THL.cjs');var _chunkCCO2SEEDcjs = require('./chunk-CCO2SEED.cjs');var _chunkDR4D5JX2cjs = require('./chunk-DR4D5JX2.cjs');var _chunkHINGYWQGcjs = require('./chunk-HINGYWQG.cjs');var _chunkR7JGZXZ7cjs = require('./chunk-R7JGZXZ7.cjs');var _chunkLYHXMFNXcjs = require('./chunk-LYHXMFNX.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkHIF6HKZ3cjs = require('./chunk-HIF6HKZ3.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var g="CheckboxTile",d=_chunk4Q432K4Wcjs.b.call(void 0, g),J= exports.a =_react.forwardRef.call(void 0, (w,H)=>{let{className:S,id:E,disabled:c,value:i="on",onCheckedChange:m,label:b,helperText:a,image:F,"aria-labelledby":L,validationStatus:r,validationText:l,...U}=w,{id:p,labelId:h,helperTextId:x,validationTextId:n}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:E,prefix:"checkboxtile"}),e=_chunkWSD52THLcjs.c.call(void 0, ),t=_chunkDR4D5JX2cjs.c.call(void 0, ),D=_optionalChain([t, 'optionalAccess', _2 => _2.value, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4(i)]),M=_optionalChain([e, 'optionalAccess', _5 => _5.hasGroupHelperText]),O=_optionalChain([e, 'optionalAccess', _6 => _6.hasGroupValidationText]),A=e?e["aria-describedby"]:"",B=!M&&!!a,_=!!b,f=!O&&r!==void 0&&l!==void 0,$=_chunkHIF6HKZ3cjs.a.call(void 0, A,a?x:void 0,f&&l!==void 0?n:void 0);return _jsxruntime.jsxs.call(void 0, "label",{className:_chunkONNSZMWFcjs.a.call(void 0, d,S),"data-testid":d,"data-disabled":c?"":void 0,children:[_jsxruntime.jsx.call(void 0, _radixui.Checkbox.Root,{ref:H,className:"h-CheckboxRoot",name:_optionalChain([t, 'optionalAccess', _7 => _7.name]),checked:D,value:i,...U,id:p,disabled:c,"aria-describedby":$,"aria-labelledby":L||_?h:void 0,"aria-errormessage":r==="invalid"?n:void 0,onCheckedChange:u=>{e&&(u?_optionalChain([t, 'optionalAccess', _8 => _8.onItemCheck, 'call', _9 => _9(i)]):_optionalChain([t, 'optionalAccess', _10 => _10.onItemUncheck, 'call', _11 => _11(i)])),m&&m(u)},children:_jsxruntime.jsx.call(void 0, _radixui.Checkbox.Indicator,{asChild:!0,className:`${d}Indicator`,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.TickSmallIcon,{})})}),_jsxruntime.jsxs.call(void 0, _chunkLYHXMFNXcjs.a,{direction:"column",children:[_jsxruntime.jsxs.call(void 0, _chunkCCO2SEEDcjs.a,{id:h,htmlFor:p,disableUserSelect:!0,children:[F,b]}),B?_jsxruntime.jsx.call(void 0, _chunkR7JGZXZ7cjs.a,{id:x,disableUserSelect:!0,children:a}):null,f?_jsxruntime.jsx.call(void 0, _chunkHINGYWQGcjs.a,{id:n,status:r,disableUserSelect:!0,children:l}):null]})]})});J.displayName=g;exports.a = J;
|
|
4
|
+
//# sourceMappingURL=chunk-4RY5R4WP.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-4RY5R4WP.cjs","../src/components/CheckboxTile/CheckboxTile.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","CheckboxTile","forwardRef","props","ref","className","providedId","disabled","value","onCheckedChange","label","helperText","image","ariaLabelledby","validationStatus","validationText","restProps","id","labelId","helperTextId","validationTextId","useIds","context","useFormGroupBase","checkboxContext","useCheckboxGroup","checked","hasGroupHelperText","hasGroupValidationText","ariaDescribedby","showHelperText","showLabel","showValidation","ariaDescribedbyValue","mergeIds","jsxs","cn","jsx","CheckboxPrimitive"],"mappings":"AAAA,ylBAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wECG3X,mCAIgB,8BAOnB,+CA2EjB,IAvEJA,CAAAA,CAAiB,cAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAeC,+BAAAA,CAAgDC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACzF,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,IAAA,CACR,eAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,iBAAA,CAAmBC,CAAAA,CACnB,gBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIb,CAAAA,CAEE,CAAE,EAAA,CAAAc,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAAA,CAAc,gBAAA,CAAAC,CAAiB,CAAA,CAAIC,iCAAAA,CACtD,UAAA,CAAAf,CAAAA,CACA,MAAA,CAAQ,cACV,CAAC,CAAA,CACKgB,CAAAA,CAAUC,iCAAAA,CAAiB,CAC3BC,CAAAA,CAAkBC,iCAAA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AmBJ,CAAAA,GAAqB,SAAA,CAAYM,CAAAA,CAAmB,KAAA,CAAA,CACvE,eAAA,CAAkBM,CAAAA,EAAqB,CACjCJ,CAAAA,EAAAA,CACEI,CAAAA,iBACFF,CAAAA,6BAAiB,WAAA,mBAAYhB,CAAK,GAAA,iBAElCgB,CAAAA,+BAAiB,aAAA,qBAAchB,CAAK,GAAA,CAAA,CAGpCC,CAAAA,EACFA,CAAAA,CAAgBiB,CAAO,CAE3B,CAAA,CAEA,QAAA,CAAAW,6BAAAA,iBAACC,CAAkB,SAAA,CAAlB,CAA4B,OAAA,CAAO,CAAA,CAAA,CAAC,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-4RY5R4WP.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { useIds } from '../../hooks/use-ids';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport { useCheckboxGroup } from '../CheckboxGroup/CheckboxGroup.context';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\nimport type { CheckboxProps } from '../Checkbox/Checkbox.props';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport type { ComponentRef } from 'react';\nimport { forwardRef } from 'react';\n\ntype CheckboxTileElement = ComponentRef<'button'>;\n\nconst COMPONENT_NAME = 'CheckboxTile';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const CheckboxTile = forwardRef<CheckboxTileElement, CheckboxProps>((props, ref) => {\n const {\n className,\n id: providedId,\n disabled,\n value = 'on',\n onCheckedChange,\n label,\n helperText,\n image,\n 'aria-labelledby': ariaLabelledby,\n validationStatus,\n validationText,\n ...restProps\n } = props;\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'checkboxtile',\n });\n const context = useFormGroupBase();\n const checkboxContext = useCheckboxGroup();\n const checked = checkboxContext?.value?.includes(value);\n const hasGroupHelperText = context?.hasGroupHelperText;\n const hasGroupValidationText = context?.hasGroupValidationText;\n const ariaDescribedby = context ? context['aria-describedby'] : '';\n const showHelperText = !hasGroupHelperText && !!helperText;\n const showLabel = !!label;\n const showValidation =\n !hasGroupValidationText && validationStatus !== undefined && validationText !== undefined;\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby,\n !!helperText ? helperTextId : undefined,\n showValidation && validationText !== undefined ? validationTextId : undefined\n );\n\n return (\n <label\n className={cn(componentClassName, className)}\n data-testid={componentClassName}\n data-disabled={disabled ? '' : undefined}\n >\n <CheckboxPrimitive.Root\n ref={ref}\n className=\"h-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...restProps}\n id={id}\n disabled={disabled}\n aria-describedby={ariaDescribedbyValue}\n aria-labelledby={ariaLabelledby || showLabel ? labelId : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n onCheckedChange={(checked: boolean) => {\n if (context) {\n if (checked) {\n checkboxContext?.onItemCheck(value);\n } else {\n checkboxContext?.onItemUncheck(value);\n }\n }\n if (onCheckedChange) {\n onCheckedChange(checked);\n }\n }}\n >\n <CheckboxPrimitive.Indicator asChild className={`${componentClassName}Indicator`}>\n <TickSmallIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {image}\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n {showValidation ? (\n <ValidationText id={validationTextId} status={validationStatus} disableUserSelect>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n </label>\n );\n});\n\nCheckboxTile.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var _chunk3GKKDE55cjs = require('./chunk-3GKKDE55.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunk3GKKDE55cjs = require('./chunk-3GKKDE55.cjs');var _chunk3O4EY4LNcjs = require('./chunk-3O4EY4LN.cjs');var _chunkIWYX25BFcjs = require('./chunk-IWYX25BF.cjs');var _chunkLYHXMFNXcjs = require('./chunk-LYHXMFNX.cjs');var _chunkHI7GZDRAcjs = require('./chunk-HI7GZDRA.cjs');var _chunkMV7VYPO6cjs = require('./chunk-MV7VYPO6.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var c="DescriptionList",o=_chunk4Q432K4Wcjs.b.call(void 0, c),F= exports.a =_react.forwardRef.call(void 0, (d,f)=>{let{className:x,style:P,heading:i,headingElement:D,helperText:h,trailingContent:C,children:L,direction:N,validationText:v,validationStatus:y,width:E,maxWidth:g,minWidth:u,...w}=_chunkMV7VYPO6cjs.a.call(void 0, d,_chunkHI7GZDRAcjs.a),R={style:P,width:E,maxWidth:g,minWidth:u},T={heading:i,headingElement:D,helperText:h,trailingContent:C,validationText:v,validationStatus:y};return _jsxruntime.jsxs.call(void 0, _chunkIWYX25BFcjs.a,{className:_chunkONNSZMWFcjs.a.call(void 0, o,x),"data-testid":o,...R,children:[i?_jsxruntime.jsx.call(void 0, _chunk3O4EY4LNcjs.a,{...T}):null,_jsxruntime.jsx.call(void 0, _chunkLYHXMFNXcjs.a,{asChild:!0,className:`${o}Container`,role:"list",children:_jsxruntime.jsx.call(void 0, "dl",{ref:f,role:"list",...w,children:_jsxruntime.jsx.call(void 0, _chunk3GKKDE55cjs.a.Provider,{value:{direction:N},children:L})})})]})});F.displayName=c;exports.a = F;
|
|
4
|
+
//# sourceMappingURL=chunk-74E6KM4O.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-74E6KM4O.cjs","../src/components/DescriptionList/DescriptionList.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","DescriptionList","forwardRef","props","ref","className","style","heading","headingElement","helperText","trailingContent","children","direction","validationText","validationStatus","width","maxWidth","minWidth","listProps","extractProps","marginPropDefs","containerProps","sectionHeaderProps","jsxs","Box","cn","jsx","SectionHeader","Flex"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAoC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCAvS,+CAgDrB,IApCAA,CAAAA,CAAiB,iBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAkBC,+BAAAA,CAC5BC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACd,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAahB,CAAOiB,mBAAc,CAAA,CAEhCC,CAAAA,CAAiB,CAAE,KAAA,CAAAf,CAAAA,CAAO,KAAA,CAAAS,CAAAA,CAAO,QAAA,CAAAC,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAEpDK,CAAAA,CAAqB,CACzB,OAAA,CAAAf,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAG,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CAEA,OACES,8BAAAA,mBAACC,CAAA,CACC,SAAA,CAAWC,iCAAAA,CAAG1B,CAAoBM,CAAS,CAAA,CAC3C,aAAA,CAAaN,CAAAA,CACZ,GAAGsB,CAAAA,CAEH,QAAA,CAAA,CAAAd,CAAAA,CAAUmB,6BAAAA,mBAACC,CAAA,CAAe,GAAGL,CAAAA,CAAoB,CAAA,CAAK,IAAA,CACvDI,6BAAAA,mBAACE,CAAA,CAAK,OAAA,CAAO,CAAA,CAAA,CAAC,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-74E6KM4O.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\nimport type { DescriptionListProps } from './DescriptionList.props';\nimport { DescriptionListContext } from './DescriptionList.context';\nimport { Flex } from '../Flex/Flex';\nimport { Box } from '../Box/Box';\n\nconst COMPONENT_NAME = 'DescriptionList';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype DescriptionListElement = ComponentRef<'dl'>;\n\nexport const DescriptionList = forwardRef<DescriptionListElement, DescriptionListProps>(\n (props, ref) => {\n const {\n className,\n style,\n heading,\n headingElement,\n helperText,\n trailingContent,\n children,\n direction,\n validationText,\n validationStatus,\n width,\n maxWidth,\n minWidth,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const containerProps = { style, width, maxWidth, minWidth };\n\n const sectionHeaderProps = {\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n };\n\n return (\n <Box\n className={cn(componentClassName, className)}\n data-testid={componentClassName}\n {...containerProps}\n >\n {heading ? <SectionHeader {...sectionHeaderProps} /> : null}\n <Flex asChild className={`${componentClassName}Container`} role=\"list\">\n <dl ref={ref} role=\"list\" {...listProps}>\n <DescriptionListContext.Provider value={{ direction }}>\n {children}\n </DescriptionListContext.Provider>\n </dl>\n </Flex>\n </Box>\n );\n }\n);\n\nDescriptionList.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as h}from"./chunk-DSMK364F.js";import{a as N}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as h}from"./chunk-DSMK364F.js";import{a as N}from"./chunk-RU4YPNKV.js";import{a as L}from"./chunk-OSK2N5OU.js";import{a as u}from"./chunk-KBX2N5VR.js";import{a as C}from"./chunk-7X24J4CX.js";import{a as g}from"./chunk-UWZUYMW4.js";import{a as c}from"./chunk-J3AJBV4B.js";import{b}from"./chunk-PDEVCIQ3.js";import{forwardRef as M}from"react";import{jsx as e,jsxs as V}from"react/jsx-runtime";var y="List",a=b(y),O=M((P,o)=>{let{id:v,as:t="ul",className:x,colorScheme:r=void 0,variant:n,heading:i,headingElement:T,helperText:E,trailingContent:H,validationText:S,validationStatus:B,children:l,paddingNone:I,"aria-label":d,"aria-labelledby":R,...s}=g(P,u),w={heading:i,headingElement:T,helperText:E,trailingContent:H,validationText:S,validationStatus:B},{id:m,labelId:p}=C({providedId:v,prefix:"list"}),f={"aria-label":d,"aria-labelledby":R??(!!i&&!d?p:void 0),"data-padding-none":I?"":void 0};return V("div",{className:c(a,x),"data-testid":a,children:[i?e(N,{id:p,...w}):null,n===void 0||r===void 0?e(L,{asChild:!0,id:m,className:`${a}Container`,role:"list",...f,children:e(t,{ref:o,...s,children:l})}):e(h,{className:`${a}Container`,paddingNone:!0,variant:n,colorScheme:r,children:e(t,{ref:o,role:"list",id:m,...s,...f,children:l})})]})});O.displayName=y;export{O as a};
|
|
4
|
+
//# sourceMappingURL=chunk-7EK77SDW.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as f}from"./chunk-MB2NMZ2I.js";import{a as
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as f}from"./chunk-MB2NMZ2I.js";import{a as l}from"./chunk-OSK2N5OU.js";import{a as p}from"./chunk-P22N5ZWP.js";import{a}from"./chunk-UWZUYMW4.js";import{a as e}from"./chunk-J3AJBV4B.js";import{b as s}from"./chunk-PDEVCIQ3.js";import{forwardRef as E}from"react";import{jsx as o}from"react/jsx-runtime";var y="SkeletonBodyText",d=s(y),R=E((c,t)=>{let{lines:r="1",className:m,margin:x,marginTop:g,marginRight:B,marginBottom:T,marginLeft:k,marginX:N,marginY:P,width:h,maxWidth:S,minWidth:u,...n}=a(c,f),i={margin:x,marginTop:g,marginRight:B,marginBottom:T,marginLeft:k,marginX:N,marginY:P,width:h,maxWidth:S,minWidth:u};return r==="1"?o(l,{as:"div",ref:t,className:e(d,m),...i,...n}):o(p,{ref:t,direction:"column",gap:"75",...i,children:Array.from({length:Number(r)},(v,C)=>o("div",{className:e(d,m),...n},C))})});R.displayName=y;export{R as a};
|
|
4
|
+
//# sourceMappingURL=chunk-7YZPBUKR.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{c as u}from"./chunk-HY32GRZP.js";import{a as R}from"./chunk-G3WPDRZY.js";import{a as f}from"./chunk-TNRHOO5R.js";import{a as
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{c as u}from"./chunk-HY32GRZP.js";import{a as R}from"./chunk-G3WPDRZY.js";import{a as f}from"./chunk-TNRHOO5R.js";import{a as n}from"./chunk-OSK2N5OU.js";import{a as c}from"./chunk-P22N5ZWP.js";import{a as b}from"./chunk-7X24J4CX.js";import{a as p}from"./chunk-J3AJBV4B.js";import{b as e}from"./chunk-PDEVCIQ3.js";import{forwardRef as M}from"react";import{RadioGroup as x}from"radix-ui";import{jsx as o,jsxs as i}from"react/jsx-runtime";var I="RadioTile",T=e(I),O=M(({className:N,id:y,label:r,helperText:t,image:P,"aria-labelledby":a,badge:v,flex:C,flexBasis:G,flexShrink:h,flexGrow:B,...E},F)=>{let{id:d,labelId:m,helperTextId:l}=b({providedId:y,prefix:"radio"}),{hasGroupHelperText:H,"aria-describedby":w}=u(),s=!H&&t!==void 0;return o(n,{asChild:!0,"data-testid":T,...{flex:C,flexBasis:G,flexShrink:h,flexGrow:B},children:o(x.Item,{ref:F,className:p(T,N),...E,id:d,"aria-describedby":s?l:w,"aria-labelledby":a||(r?m:void 0),children:i("div",{className:e("RadioContainer"),children:[o("div",{className:e("RadioItem"),children:o(x.Indicator,{className:e("RadioIndicator")})}),i(c,{direction:"column",alignItems:"start",children:[i(R,{id:m,htmlFor:d,disableUserSelect:!0,children:[P,r]}),s?o(f,{id:l,disableUserSelect:!0,children:t}):null,v]})]})})})});O.displayName=I;export{O as a};
|
|
4
|
+
//# sourceMappingURL=chunk-BLJICJ25.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunk3O4EY4LNcjs = require('./chunk-3O4EY4LN.cjs');var _chunkHI7GZDRAcjs = require('./chunk-HI7GZDRA.cjs');var _chunkMV7VYPO6cjs = require('./chunk-MV7VYPO6.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var d="ExpandableCardGroup",n=_chunk4Q432K4Wcjs.b.call(void 0, d),h= exports.a =_react.forwardRef.call(void 0, (m,i)=>{let{className:l,heading:e,headingElement:s="h2",helperText:f,trailingContent:C,children:E,...c}=_chunkMV7VYPO6cjs.a.call(void 0, m,_chunkHI7GZDRAcjs.a);return _jsxruntime.jsxs.call(void 0, "div",{ref:i,className:_chunkONNSZMWFcjs.a.call(void 0, n,l),"data-testid":n,...c,children:[e?_jsxruntime.jsx.call(void 0, _chunk3O4EY4LNcjs.a,{heading:e,headingElement:s,helperText:f,trailingContent:C}):null,E]})});h.displayName=d;exports.a = h;
|
|
4
|
+
//# sourceMappingURL=chunk-BM5LWFCB.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-BM5LWFCB.cjs","../src/components/ExpandableCard/ExpandableCardGroup.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","ExpandableCardGroup","forwardRef","props","ref","className","heading","headingElement","helperText","trailingContent","children","restProps","extractProps","marginPropDefs","jsxs","cn","jsx","SectionHeader"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAoC,wDAAyC,wDAAyC,8BCA5K,+CA2BrB,IAlBAA,CAAAA,CAAiB,qBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAsBC,+BAAAA,CAChCC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACd,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CAAiB,IAAA,CACjB,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaT,CAAOU,mBAAc,CAAA,CAEtC,OACEC,8BAAAA,KAAC,CAAA,CACC,GAAA,CAAKV,CAAAA,CACL,SAAA,CAAWW,iCAAAA,CAAGhB,CAAoBM,CAAS,CAAA,CAC3C,aAAA,CAAaN,CAAAA,CACZ,GAAGY,CAAAA,CAEH,QAAA,CAAA,CAAAL,CAAAA,CACCU,6BAAAA,mBAACC,CAAA,CACC,OAAA,CAASX,CAAAA,CACT,cAAA,CAAgBC,CAAAA,CAChB,UAAA,CAAYC,CAAAA,CACZ,eAAA,CAAiBC,CAAAA,CACnB,CAAA,CACE,IAAA,CACHC,CAAAA,CAAAA,CACH,CAEJ,CACF,CAAA,CAEAT,CAAAA,CAAoB,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-BM5LWFCB.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport type { ExpandableCardGroupProps } from './ExpandableCardGroup.props';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\n\nconst COMPONENT_NAME = 'ExpandableCardGroup';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ExpandableCardGroupElement = ComponentRef<'div'>;\n\nexport const ExpandableCardGroup = forwardRef<ExpandableCardGroupElement, ExpandableCardGroupProps>(\n (props, ref) => {\n const {\n className,\n heading,\n headingElement = 'h2',\n helperText,\n trailingContent,\n children,\n ...restProps\n } = extractProps(props, marginPropDefs);\n\n return (\n <div\n ref={ref}\n className={cn(componentClassName, className)}\n data-testid={componentClassName}\n {...restProps}\n >\n {heading ? (\n <SectionHeader\n heading={heading}\n headingElement={headingElement}\n helperText={helperText}\n trailingContent={trailingContent}\n />\n ) : null}\n {children}\n </div>\n );\n }\n);\n\nExpandableCardGroup.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunk3O4EY4LNcjs = require('./chunk-3O4EY4LN.cjs');var _chunkHI7GZDRAcjs = require('./chunk-HI7GZDRA.cjs');var _chunkMV7VYPO6cjs = require('./chunk-MV7VYPO6.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var m="Accordion",c=_chunk4Q432K4Wcjs.b.call(void 0, m),g= exports.a =_react.forwardRef.call(void 0, (s,a)=>{let{className:d,type:f="multiple",heading:o,headingElement:l="h2",helperText:P,trailingContent:A,validationText:h,validationStatus:v,...C}=_chunkMV7VYPO6cjs.a.call(void 0, s,_chunkHI7GZDRAcjs.a),N={heading:o,headingElement:l,helperText:P,trailingContent:A,validationText:h,validationStatus:v},R={type:f,...C};return _jsxruntime.jsxs.call(void 0, "div",{ref:a,className:_chunkONNSZMWFcjs.a.call(void 0, c,d),"data-testid":c,children:[o?_jsxruntime.jsx.call(void 0, _chunk3O4EY4LNcjs.a,{...N}):null,_jsxruntime.jsx.call(void 0, _radixui.Accordion.Root,{...R})]})});g.displayName=m;exports.a = g;
|
|
4
|
+
//# sourceMappingURL=chunk-D4AQHXLR.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-D4AQHXLR.cjs","../src/components/Accordion/Accordion.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Accordion","forwardRef","props","ref","className","type","heading","headingElement","helperText","trailingContent","validationText","validationStatus","restProps","extractProps","marginPropDef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CAEDhB,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-D4AQHXLR.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport type { ComponentPropsWithRef, ComponentRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { AccordionProps } from './Accordion.props';\nimport { Accordion as AccordionPrimitive } from 'radix-ui';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst COMPONENT_NAME = 'Accordion';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype AccordionElement = ComponentRef<'div'>;\n\nexport const Accordion = forwardRef<AccordionElement, AccordionProps>((props, ref) => {\n const {\n className,\n type = 'multiple',\n heading,\n headingElement = 'h2',\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n ...restProps\n } = extractProps(props, marginPropDefs);\n\n const sectionHeaderProps = {\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n };\n\n const accordionProps = { type, ...restProps } as ComponentPropsWithRef<\n typeof AccordionPrimitive.Root\n >;\n\n return (\n <div ref={ref} className={cn(componentClassName, className)} data-testid={componentClassName}>\n {heading ? <SectionHeader {...sectionHeaderProps} /> : null}\n <AccordionPrimitive.Root {...accordionProps} />\n </div>\n );\n});\n\nAccordion.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as l}from"./chunk-NMFPRBPK.js";import{a}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as l}from"./chunk-NMFPRBPK.js";import{a}from"./chunk-RU4YPNKV.js";import{a as p}from"./chunk-OSK2N5OU.js";import{a as m}from"./chunk-P22N5ZWP.js";import{a as n}from"./chunk-KBX2N5VR.js";import{a as s}from"./chunk-UWZUYMW4.js";import{a as e}from"./chunk-J3AJBV4B.js";import{b as r}from"./chunk-PDEVCIQ3.js";import{forwardRef as B}from"react";import{jsx as t,jsxs as H}from"react/jsx-runtime";var c="DescriptionList",o=r(c),F=B((d,f)=>{let{className:x,style:P,heading:i,headingElement:D,helperText:h,trailingContent:C,children:L,direction:N,validationText:v,validationStatus:y,width:E,maxWidth:g,minWidth:u,...w}=s(d,n),R={style:P,width:E,maxWidth:g,minWidth:u},T={heading:i,headingElement:D,helperText:h,trailingContent:C,validationText:v,validationStatus:y};return H(p,{className:e(o,x),"data-testid":o,...R,children:[i?t(a,{...T}):null,t(m,{asChild:!0,className:`${o}Container`,role:"list",children:t("dl",{ref:f,role:"list",...w,children:t(l.Provider,{value:{direction:N},children:L})})})]})});F.displayName=c;export{F as a};
|
|
4
|
+
//# sourceMappingURL=chunk-HJEUUACJ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }"use client";
|
|
2
2
|
|
|
3
|
-
var _chunkKANPKMABcjs = require('./chunk-KANPKMAB.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkKANPKMABcjs = require('./chunk-KANPKMAB.cjs');var _chunk3O4EY4LNcjs = require('./chunk-3O4EY4LN.cjs');var _chunkIWYX25BFcjs = require('./chunk-IWYX25BF.cjs');var _chunkHI7GZDRAcjs = require('./chunk-HI7GZDRA.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkMV7VYPO6cjs = require('./chunk-MV7VYPO6.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var y="List",a=_chunk4Q432K4Wcjs.b.call(void 0, y),O= exports.a =_react.forwardRef.call(void 0, (P,o)=>{let{id:v,as:t="ul",className:x,colorScheme:r=void 0,variant:n,heading:i,headingElement:T,helperText:E,trailingContent:H,validationText:S,validationStatus:B,children:l,paddingNone:I,"aria-label":d,"aria-labelledby":R,...s}=_chunkMV7VYPO6cjs.a.call(void 0, P,_chunkHI7GZDRAcjs.a),w={heading:i,headingElement:T,helperText:E,trailingContent:H,validationText:S,validationStatus:B},{id:m,labelId:p}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:v,prefix:"list"}),f={"aria-label":d,"aria-labelledby":_nullishCoalesce(R, () => ((!!i&&!d?p:void 0))),"data-padding-none":I?"":void 0};return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkONNSZMWFcjs.a.call(void 0, a,x),"data-testid":a,children:[i?_jsxruntime.jsx.call(void 0, _chunk3O4EY4LNcjs.a,{id:p,...w}):null,n===void 0||r===void 0?_jsxruntime.jsx.call(void 0, _chunkIWYX25BFcjs.a,{asChild:!0,id:m,className:`${a}Container`,role:"list",...f,children:_jsxruntime.jsx.call(void 0, t,{ref:o,...s,children:l})}):_jsxruntime.jsx.call(void 0, _chunkKANPKMABcjs.a,{className:`${a}Container`,paddingNone:!0,variant:n,colorScheme:r,children:_jsxruntime.jsx.call(void 0, t,{ref:o,role:"list",id:m,...s,...f,children:l})})]})});O.displayName=y;exports.a = O;
|
|
4
|
+
//# sourceMappingURL=chunk-HLBSLEBS.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-HLBSLEBS.cjs","../src/components/List/List.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","List","forwardRef","props","ref","providedId","Tag","className","colorScheme","variant","heading","headingElement","helperText","trailingContent","validationText","validationStatus","children","paddingNone","ariaLabel","ariaLabelledby","listProps","extractProps","mar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A,SAAAA,CADT,CAAA,CAAQT,CAAAA,EACkC,CAACQ,CAAAA,CAAYO,CAAAA,CAAU,KAAA,CAAA,GAAA,CAKlF,mBAAA,CAAqBR,CAAAA,CAAc,EAAA,CAAK,KAAA,CAC1C,CAAA,CAEA,OACEW,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,iCAAAA,CAAG9B,CAAoBQ,CAAS,CAAA,CAAG,aAAA,CAAaR,CAAAA,CAC7D,QAAA,CAAA,CAAAW,CAAAA,CAAUoB,6BAAAA,mBAACC,CAAA,CAAc,EAAA,CAAIN,CAAAA,CAAU,GAAGF,CAAAA,CAAoB,CAAA,CAAK,IAAA,CACnEd,CAAAA,GAAY,KAAA,CAAA,EAAaD,CAAAA,GAAgB,KAAA,CAAA,CACxCsB,6BAAAA,mBAACE,CAAA,CACC,OAAA,CAAO,CAAA,CAAA,CACP,EAAA,CAAIR,CAAAA,CACJ,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-HLBSLEBS.cjs","sourcesContent":[null,"import { forwardRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport type { ListProps } from './List.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Card } from '../Card/Card';\nimport { Box } from '../Box/Box';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\nimport { useIds } from '../../hooks/use-ids';\nimport type { ComponentRef } from 'react';\n\nconst COMPONENT_NAME = 'List';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ListElement = ComponentRef<'ol'>;\n\nexport const List = forwardRef<ListElement, ListProps>((props, ref) => {\n const {\n id: providedId,\n as: Tag = 'ul',\n className,\n colorScheme = undefined,\n variant,\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n children,\n paddingNone,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const sectionHeaderProps = {\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n };\n\n const { id, labelId } = useIds({ providedId, prefix: 'list' });\n\n const hasHeading = Boolean(heading);\n const ariaLabelledbyValue = ariaLabelledby ?? (hasHeading && !ariaLabel ? labelId : undefined);\n\n const attributeProps = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledbyValue,\n 'data-padding-none': paddingNone ? '' : undefined,\n };\n\n return (\n <div className={cn(componentClassName, className)} data-testid={componentClassName}>\n {heading ? <SectionHeader id={labelId} {...sectionHeaderProps} /> : null}\n {variant === undefined || colorScheme === undefined ? (\n <Box\n asChild\n id={id}\n className={`${componentClassName}Container`}\n role=\"list\"\n {...attributeProps}\n >\n <Tag ref={ref} {...listProps}>\n {children}\n </Tag>\n </Box>\n ) : (\n <Card\n className={`${componentClassName}Container`}\n paddingNone\n variant={variant}\n colorScheme={colorScheme}\n >\n <Tag ref={ref} role=\"list\" id={id} {...listProps} {...attributeProps}>\n {children}\n </Tag>\n </Card>\n )}\n </div>\n );\n});\n\nList.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as p}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as p}from"./chunk-RU4YPNKV.js";import{a as t}from"./chunk-KBX2N5VR.js";import{a}from"./chunk-UWZUYMW4.js";import{a as r}from"./chunk-J3AJBV4B.js";import{b as o}from"./chunk-PDEVCIQ3.js";import{forwardRef as x}from"react";import{jsx as u,jsxs as b}from"react/jsx-runtime";var d="ExpandableCardGroup",n=o(d),h=x((m,i)=>{let{className:l,heading:e,headingElement:s="h2",helperText:f,trailingContent:C,children:E,...c}=a(m,t);return b("div",{ref:i,className:r(n,l),"data-testid":n,...c,children:[e?u(p,{heading:e,headingElement:s,helperText:f,trailingContent:C}):null,E]})});h.displayName=d;export{h as a};
|
|
4
|
+
//# sourceMappingURL=chunk-INJ6SL3W.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkKVTEX62Ycjs = require('./chunk-KVTEX62Y.cjs');var _chunkIAFYIHVPcjs = require('./chunk-IAFYIHVP.cjs');var _chunk6N56N622cjs = require('./chunk-6N56N622.cjs');var _chunkB2HYSLUXcjs = require('./chunk-B2HYSLUX.cjs');var _chunkY4KCRRDDcjs = require('./chunk-Y4KCRRDD.cjs');var _chunkMOXUZLUZcjs = require('./chunk-MOXUZLUZ.cjs');var _chunkR3Q7TFDCcjs = require('./chunk-R3Q7TFDC.cjs');var _chunkHI7GZDRAcjs = require('./chunk-HI7GZDRA.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkMV7VYPO6cjs = require('./chunk-MV7VYPO6.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _combobox = require('@base-ui/react/combobox');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var T="Combobox",i=_chunk4Q432K4Wcjs.b.call(void 0, T);function K(s){let{className:g,children:p,triggerOnlyOnType:c,validationStatus:A,validationText:O,label:B,labelVariant:V,helperText:E,id:F,disabled:t,required:w,noOptionsFoundText:M,statusText:d,loading:R,hideLabel:L,placeholder:U,...$}=_chunkMV7VYPO6cjs.a.call(void 0, s,_chunkHI7GZDRAcjs.a),{id:u,labelId:k,helperTextId:q,validationTextId:z}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:F,prefix:"combobox"}),f=!t,D={id:u,labelId:k,helperTextId:q,validationTextId:z,label:B,labelVariant:V,helperText:E,validationText:f?O:void 0,validationStatus:f?A:void 0,required:w,hideLabel:L},G=!!d||!!s.items||!!p;return _jsxruntime.jsx.call(void 0, _chunk6N56N622cjs.a,{className:_chunkONNSZMWFcjs.a.call(void 0, i,g),"data-disabled":t?"":void 0,"data-testid":i,...D,children:_jsxruntime.jsxs.call(void 0, _combobox.Combobox.Root,{openOnInputClick:!c,...$,children:[_jsxruntime.jsx.call(void 0, _combobox.Combobox.Input,{render:_jsxruntime.jsxs.call(void 0, _chunkB2HYSLUXcjs.a,{id:u,disabled:t,placeholder:U,children:[_jsxruntime.jsx.call(void 0, _combobox.Combobox.Trigger,{disabled:t,render:_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"prefix",asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkMOXUZLUZcjs.a,{type:"button",label:"Open popup",disabled:t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SearchMediumIcon,{})})})}),R?_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkR3Q7TFDCcjs.a,{size:"xs",color:"primary"})}):null,_jsxruntime.jsx.call(void 0, _combobox.Combobox.Clear,{render:_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"suffix",asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkMOXUZLUZcjs.a,{type:"button",label:"Clear selection",disabled:t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.CloseSmallIcon,{})})})}),c?null:_jsxruntime.jsx.call(void 0, _combobox.Combobox.Trigger,{disabled:t,render:_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"suffix",asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkMOXUZLUZcjs.a,{type:"button",label:"Open popup",disabled:t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ExpandSmallIcon,{})})})})]})}),G?_jsxruntime.jsx.call(void 0, _combobox.Combobox.Portal,{children:_jsxruntime.jsx.call(void 0, _combobox.Combobox.Positioner,{side:"bottom",sideOffset:16,align:"start",alignOffset:-47,children:_jsxruntime.jsxs.call(void 0, _combobox.Combobox.Popup,{className:`${i}Popup`,children:[d?_jsxruntime.jsx.call(void 0, _combobox.Combobox.Status,{className:`${i}StatusText`,children:d}):null,s.items?_jsxruntime.jsx.call(void 0, _chunkY4KCRRDDcjs.a,{className:`${i}Empty`,children:M}):null,_jsxruntime.jsxs.call(void 0, _radixui.ScrollArea.Root,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaRoot"),type:"auto",children:[_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Viewport,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaViewport"),children:_jsxruntime.jsx.call(void 0, _combobox.Combobox.List,{className:`${i}List`,children:p||(b=>_jsxruntime.jsx.call(void 0, _chunkKVTEX62Ycjs.a,{value:b,children:b},b))})}),_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Scrollbar,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaScrollbar"),orientation:"vertical",children:_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Thumb,{className:_chunk4Q432K4Wcjs.b.call(void 0, "ScrollAreaThumb")})})]})]})})}):null]})})}K.displayName=T;exports.a = K;
|
|
4
|
+
//# sourceMappingURL=chunk-LWHIBSW2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-X2ZTEWSG.cjs","../src/components/Combobox/Combobox.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Combobox","props","className","children","triggerOnlyOnType","validationStatus","validationText","label","labelVariant","helperText","providedId","disabled","required","noOptionsFoundText","statusText","loading","hideLabel","placeholder","comboboxProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","popupHasContent","jsx","FormField","cn","jsxs","ComboboxPrimitive","InputBase","InputSlot","U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wB,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-X2ZTEWSG.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { useIds } from '../../hooks/use-ids';\nimport { FormField } from '../FormField/FormField';\nimport type { ComboboxProps } from './Combobox.props';\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';\nimport { InputBase } from '../InputBase/InputBase';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport {\n CloseSmallIcon,\n ExpandSmallIcon,\n SearchMediumIcon,\n} from '@utilitywarehouse/hearth-react-icons';\nimport { ComboboxItem } from './ComboboxItem';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { ComboboxEmpty } from './ComboboxEmpty';\nimport { Spinner } from '../Spinner/Spinner';\n\nconst COMPONENT_NAME = 'Combobox';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport function Combobox<Value, Multiple extends boolean | undefined = false>(\n props: ComboboxProps<Value, Multiple>\n) {\n const {\n className,\n children,\n triggerOnlyOnType,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n id: providedId,\n disabled,\n required,\n noOptionsFoundText,\n statusText,\n loading,\n hideLabel,\n placeholder,\n ...comboboxProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'combobox',\n });\n\n const showValidation = !disabled;\n\n const formFieldProps = {\n id,\n labelId,\n helperTextId,\n validationTextId,\n label,\n labelVariant,\n helperText,\n validationText: showValidation ? validationText : undefined,\n validationStatus: showValidation ? validationStatus : undefined,\n required,\n hideLabel,\n };\n\n const popupHasContent = Boolean(statusText) || Boolean(props.items) || Boolean(children);\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <ComboboxPrimitive.Root openOnInputClick={!triggerOnlyOnType} {...comboboxProps}>\n <ComboboxPrimitive.Input\n render={\n <InputBase id={id} disabled={disabled} placeholder={placeholder}>\n <ComboboxPrimitive.Trigger\n disabled={disabled}\n render={\n <InputSlot placement=\"prefix\" asChild>\n <UnstyledIconButton type=\"button\" label=\"Open popup\" disabled={disabled}>\n <SearchMediumIcon />\n </UnstyledIconButton>\n </InputSlot>\n }\n />\n {loading ? (\n <InputSlot placement=\"suffix\">\n <Spinner size=\"xs\" color=\"primary\" />\n </InputSlot>\n ) : null}\n <ComboboxPrimitive.Clear\n render={\n <InputSlot placement=\"suffix\" asChild>\n <UnstyledIconButton type=\"button\" label=\"Clear selection\" disabled={disabled}>\n <CloseSmallIcon />\n </UnstyledIconButton>\n </InputSlot>\n }\n />\n {triggerOnlyOnType ? null : (\n <ComboboxPrimitive.Trigger\n disabled={disabled}\n render={\n <InputSlot placement=\"suffix\" asChild>\n <UnstyledIconButton type=\"button\" label=\"Open popup\" disabled={disabled}>\n <ExpandSmallIcon />\n </UnstyledIconButton>\n </InputSlot>\n }\n />\n )}\n </InputBase>\n }\n />\n\n {popupHasContent ? (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side=\"bottom\"\n sideOffset={16}\n align=\"start\"\n alignOffset={-47}\n >\n <ComboboxPrimitive.Popup className={`${componentClassName}Popup`}>\n {statusText ? (\n <ComboboxPrimitive.Status className={`${componentClassName}StatusText`}>\n {statusText}\n </ComboboxPrimitive.Status>\n ) : null}\n {props.items ? (\n <ComboboxEmpty className={`${componentClassName}Empty`}>\n {noOptionsFoundText}\n </ComboboxEmpty>\n ) : null}\n <ScrollAreaPrimitive.Root\n className={withGlobalPrefix('ScrollAreaRoot')}\n type=\"auto\"\n >\n <ScrollAreaPrimitive.Viewport className={withGlobalPrefix('ScrollAreaViewport')}>\n <ComboboxPrimitive.List className={`${componentClassName}List`}>\n {children\n ? children\n : (item: string) => (\n <ComboboxItem key={item} value={item}>\n {item}\n </ComboboxItem>\n )}\n </ComboboxPrimitive.List>\n </ScrollAreaPrimitive.Viewport>\n <ScrollAreaPrimitive.Scrollbar\n className={withGlobalPrefix('ScrollAreaScrollbar')}\n orientation=\"vertical\"\n >\n <ScrollAreaPrimitive.Thumb className={withGlobalPrefix('ScrollAreaThumb')} />\n </ScrollAreaPrimitive.Scrollbar>\n </ScrollAreaPrimitive.Root>\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n ) : null}\n </ComboboxPrimitive.Root>\n </FormField>\n );\n}\n\nCombobox.displayName = COMPONENT_NAME;\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-LWHIBSW2.cjs","../src/components/Combobox/Combobox.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Combobox","props","className","children","triggerOnlyOnType","validationStatus","validationText","label","labelVariant","helperText","providedId","disabled","required","noOptionsFoundText","statusText","loading","hideLabel","placeholder","comboboxProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","popupHasContent","jsx","FormField","cn","jsxs","ComboboxPrimitive","InputBase","InputSlot","UnstyledIconButton","SearchMediumIcon","Spinner","CloseSmallIcon","ExpandSmallIcon"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,mDCOxb,wEAOvC,mCAE2C,+CAgEtC,IA3DNA,CAAAA,CAAiB,UAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAEnD,SAASC,CAAAA,CACdC,CAAAA,CACA,CACA,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAA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A,CAAkB,QAAA,CAAUzB,CAAAA,CAClE,QAAA,CAAAkB,6BAAAA,gCAACU,CAAA,CAAA,CAAe,CAAA,CAClB,CAAA,CACF,CAAA,CAEJ,CAAA,CACCnC,CAAAA,CAAoB,IAAA,CACnByB,6BAAAA,kBAACI,CAAkB,OAAA,CAAlB,CACC,QAAA,CAAUtB,CAAAA,CACV,MAAA,CACEkB,6BAAAA,mBAACM,CAAA,CAAU,SAAA,CAAU,QAAA,CAAS,OAAA,CAAO,CAAA,CAAA,CACnC,QAAA,CAAAN,6BAAAA,mBAACO,CAAA,CAAmB,IAAA,CAAK,QAAA,CAAS,KAAA,CAAM,YAAA,CAAa,QAAA,CAAUzB,CAAAA,CAC7D,QAAA,CAAAkB,6BAAAA,iCAACW,CAAA,CAAA,CAAgB,CAAA,CACnB,CAAA,CACF,CAAA,CAEJ,CAAA,CAAA,CAEJ,CAAA,CAEJ,CAAA,CAECZ,CAAAA,CACCC,6BAAAA,kBAACI,CAAkB,MAAA,CAAlB,CACC,QAAA,CAAAJ,6BAAAA,kBAACI,CAAkB,UAAA,CAAlB,CACC,IAAA,CAAK,QAAA,CACL,UAAA,CAAY,EAAA,CACZ,KAAA,CAAM,OAAA,CACN,WAAA,CAAa,CAAA,EAAA,CAEb,QAAA,CAAAD,8BAAAA,kBAACC,CAAkB,KAAA,CAAlB,CAAwB,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-LWHIBSW2.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { useIds } from '../../hooks/use-ids';\nimport { FormField } from '../FormField/FormField';\nimport type { ComboboxProps } from './Combobox.props';\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';\nimport { InputBase } from '../InputBase/InputBase';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport {\n CloseSmallIcon,\n ExpandSmallIcon,\n SearchMediumIcon,\n} from '@utilitywarehouse/hearth-react-icons';\nimport { ComboboxItem } from './ComboboxItem';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { ComboboxEmpty } from './ComboboxEmpty';\nimport { Spinner } from '../Spinner/Spinner';\n\nconst COMPONENT_NAME = 'Combobox';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport function Combobox<Value, Multiple extends boolean | undefined = false>(\n props: ComboboxProps<Value, Multiple>\n) {\n const {\n className,\n children,\n triggerOnlyOnType,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n id: providedId,\n disabled,\n required,\n noOptionsFoundText,\n statusText,\n loading,\n hideLabel,\n placeholder,\n ...comboboxProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'combobox',\n });\n\n const showValidation = !disabled;\n\n const formFieldProps = {\n id,\n labelId,\n helperTextId,\n validationTextId,\n label,\n labelVariant,\n helperText,\n validationText: showValidation ? validationText : undefined,\n validationStatus: showValidation ? validationStatus : undefined,\n required,\n hideLabel,\n };\n\n const popupHasContent = Boolean(statusText) || Boolean(props.items) || Boolean(children);\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <ComboboxPrimitive.Root openOnInputClick={!triggerOnlyOnType} {...comboboxProps}>\n <ComboboxPrimitive.Input\n render={\n <InputBase id={id} disabled={disabled} placeholder={placeholder}>\n <ComboboxPrimitive.Trigger\n disabled={disabled}\n render={\n <InputSlot placement=\"prefix\" asChild>\n <UnstyledIconButton type=\"button\" label=\"Open popup\" disabled={disabled}>\n <SearchMediumIcon />\n </UnstyledIconButton>\n </InputSlot>\n }\n />\n {loading ? (\n <InputSlot placement=\"suffix\">\n <Spinner size=\"xs\" color=\"primary\" />\n </InputSlot>\n ) : null}\n <ComboboxPrimitive.Clear\n render={\n <InputSlot placement=\"suffix\" asChild>\n <UnstyledIconButton type=\"button\" label=\"Clear selection\" disabled={disabled}>\n <CloseSmallIcon />\n </UnstyledIconButton>\n </InputSlot>\n }\n />\n {triggerOnlyOnType ? null : (\n <ComboboxPrimitive.Trigger\n disabled={disabled}\n render={\n <InputSlot placement=\"suffix\" asChild>\n <UnstyledIconButton type=\"button\" label=\"Open popup\" disabled={disabled}>\n <ExpandSmallIcon />\n </UnstyledIconButton>\n </InputSlot>\n }\n />\n )}\n </InputBase>\n }\n />\n\n {popupHasContent ? (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side=\"bottom\"\n sideOffset={16}\n align=\"start\"\n alignOffset={-47}\n >\n <ComboboxPrimitive.Popup className={`${componentClassName}Popup`}>\n {statusText ? (\n <ComboboxPrimitive.Status className={`${componentClassName}StatusText`}>\n {statusText}\n </ComboboxPrimitive.Status>\n ) : null}\n {props.items ? (\n <ComboboxEmpty className={`${componentClassName}Empty`}>\n {noOptionsFoundText}\n </ComboboxEmpty>\n ) : null}\n <ScrollAreaPrimitive.Root\n className={withGlobalPrefix('ScrollAreaRoot')}\n type=\"auto\"\n >\n <ScrollAreaPrimitive.Viewport className={withGlobalPrefix('ScrollAreaViewport')}>\n <ComboboxPrimitive.List className={`${componentClassName}List`}>\n {children\n ? children\n : (item: string) => (\n <ComboboxItem key={item} value={item}>\n {item}\n </ComboboxItem>\n )}\n </ComboboxPrimitive.List>\n </ScrollAreaPrimitive.Viewport>\n <ScrollAreaPrimitive.Scrollbar\n className={withGlobalPrefix('ScrollAreaScrollbar')}\n orientation=\"vertical\"\n >\n <ScrollAreaPrimitive.Thumb className={withGlobalPrefix('ScrollAreaThumb')} />\n </ScrollAreaPrimitive.Scrollbar>\n </ScrollAreaPrimitive.Root>\n </ComboboxPrimitive.Popup>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n ) : null}\n </ComboboxPrimitive.Root>\n </FormField>\n );\n}\n\nCombobox.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as N}from"./chunk-5W2RN3FO.js";import{a as r}from"./chunk-TJHI42VN.js";import{a as y}from"./chunk-E3MGR5UM.js";import{a as v}from"./chunk-ZL7L2WXW.js";import{a as h}from"./chunk-L7XVQXSE.js";import{a}from"./chunk-QU7IEHHO.js";import{a as S}from"./chunk-TMANFFPP.js";import{a as P}from"./chunk-KBX2N5VR.js";import{a as I}from"./chunk-7X24J4CX.js";import{a as C}from"./chunk-UWZUYMW4.js";import{a as x}from"./chunk-J3AJBV4B.js";import{b as l}from"./chunk-PDEVCIQ3.js";import{Combobox as e}from"@base-ui/react/combobox";import{CloseSmallIcon as H,ExpandSmallIcon as _,SearchMediumIcon as J}from"@utilitywarehouse/hearth-react-icons";import{ScrollArea as n}from"radix-ui";import{jsx as o,jsxs as m}from"react/jsx-runtime";var T="Combobox",i=l(T);function K(s){let{className:g,children:p,triggerOnlyOnType:c,validationStatus:A,validationText:O,label:B,labelVariant:V,helperText:E,id:F,disabled:t,required:w,noOptionsFoundText:M,statusText:d,loading:R,hideLabel:L,placeholder:U,...$}=C(s,P),{id:u,labelId:k,helperTextId:q,validationTextId:z}=I({providedId:F,prefix:"combobox"}),f=!t,D={id:u,labelId:k,helperTextId:q,validationTextId:z,label:B,labelVariant:V,helperText:E,validationText:f?O:void 0,validationStatus:f?A:void 0,required:w,hideLabel:L},G=!!d||!!s.items||!!p;return o(y,{className:x(i,g),"data-disabled":t?"":void 0,"data-testid":i,...D,children:m(e.Root,{openOnInputClick:!c,...$,children:[o(e.Input,{render:m(v,{id:u,disabled:t,placeholder:U,children:[o(e.Trigger,{disabled:t,render:o(r,{placement:"prefix",asChild:!0,children:o(a,{type:"button",label:"Open popup",disabled:t,children:o(J,{})})})}),R?o(r,{placement:"suffix",children:o(S,{size:"xs",color:"primary"})}):null,o(e.Clear,{render:o(r,{placement:"suffix",asChild:!0,children:o(a,{type:"button",label:"Clear selection",disabled:t,children:o(H,{})})})}),c?null:o(e.Trigger,{disabled:t,render:o(r,{placement:"suffix",asChild:!0,children:o(a,{type:"button",label:"Open popup",disabled:t,children:o(_,{})})})})]})}),G?o(e.Portal,{children:o(e.Positioner,{side:"bottom",sideOffset:16,align:"start",alignOffset:-47,children:m(e.Popup,{className:`${i}Popup`,children:[d?o(e.Status,{className:`${i}StatusText`,children:d}):null,s.items?o(h,{className:`${i}Empty`,children:M}):null,m(n.Root,{className:l("ScrollAreaRoot"),type:"auto",children:[o(n.Viewport,{className:l("ScrollAreaViewport"),children:o(e.List,{className:`${i}List`,children:p||(b=>o(N,{value:b,children:b},b))})}),o(n.Scrollbar,{className:l("ScrollAreaScrollbar"),orientation:"vertical",children:o(n.Thumb,{className:l("ScrollAreaThumb")})})]})]})})}):null]})})}K.displayName=T;export{K as a};
|
|
4
|
+
//# sourceMappingURL=chunk-MIVYZGEV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{c as G}from"./chunk-HY32GRZP.js";import{
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{c as G}from"./chunk-HY32GRZP.js";import{a as y}from"./chunk-G3WPDRZY.js";import{c as R}from"./chunk-YRTWVR3H.js";import{a as v}from"./chunk-O2LCPVY5.js";import{a as I}from"./chunk-TNRHOO5R.js";import{a as T}from"./chunk-P22N5ZWP.js";import{a as N}from"./chunk-7X24J4CX.js";import{a as P}from"./chunk-VKE2TXPE.js";import{a as C}from"./chunk-J3AJBV4B.js";import{b as k}from"./chunk-PDEVCIQ3.js";import{TickSmallIcon as q}from"@utilitywarehouse/hearth-react-icons";import{Checkbox as V}from"radix-ui";import{forwardRef as z}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var g="CheckboxTile",d=k(g),J=z((w,H)=>{let{className:S,id:E,disabled:c,value:i="on",onCheckedChange:m,label:b,helperText:a,image:F,"aria-labelledby":L,validationStatus:r,validationText:l,...U}=w,{id:p,labelId:h,helperTextId:x,validationTextId:n}=N({providedId:E,prefix:"checkboxtile"}),e=G(),t=R(),D=t?.value?.includes(i),M=e?.hasGroupHelperText,O=e?.hasGroupValidationText,A=e?e["aria-describedby"]:"",B=!M&&!!a,_=!!b,f=!O&&r!==void 0&&l!==void 0,$=P(A,a?x:void 0,f&&l!==void 0?n:void 0);return s("label",{className:C(d,S),"data-testid":d,"data-disabled":c?"":void 0,children:[o(V.Root,{ref:H,className:"h-CheckboxRoot",name:t?.name,checked:D,value:i,...U,id:p,disabled:c,"aria-describedby":$,"aria-labelledby":L||_?h:void 0,"aria-errormessage":r==="invalid"?n:void 0,onCheckedChange:u=>{e&&(u?t?.onItemCheck(i):t?.onItemUncheck(i)),m&&m(u)},children:o(V.Indicator,{asChild:!0,className:`${d}Indicator`,children:o(q,{})})}),s(T,{direction:"column",children:[s(y,{id:h,htmlFor:p,disableUserSelect:!0,children:[F,b]}),B?o(I,{id:x,disableUserSelect:!0,children:a}):null,f?o(v,{id:n,status:r,disableUserSelect:!0,children:l}):null]})]})});J.displayName=g;export{J as a};
|
|
4
|
+
//# sourceMappingURL=chunk-MJF6EV5G.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var _chunkEU7QBTGKcjs = require('./chunk-EU7QBTGK.cjs');var _chunkMOXUZLUZcjs = require('./chunk-MOXUZLUZ.cjs');var _chunkR3Q7TFDCcjs = require('./chunk-R3Q7TFDC.cjs');var _chunkJ7FFTG2Ecjs = require('./chunk-J7FFTG2E.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkEU7QBTGKcjs = require('./chunk-EU7QBTGK.cjs');var _chunkMOXUZLUZcjs = require('./chunk-MOXUZLUZ.cjs');var _chunkR3Q7TFDCcjs = require('./chunk-R3Q7TFDC.cjs');var _chunkJ7FFTG2Ecjs = require('./chunk-J7FFTG2E.cjs');var _chunkIWYX25BFcjs = require('./chunk-IWYX25BF.cjs');var _chunkLYHXMFNXcjs = require('./chunk-LYHXMFNX.cjs');var _chunkTVVHDQIWcjs = require('./chunk-TVVHDQIW.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _radixui = require('radix-ui');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var D="Modal",i=_chunk4Q432K4Wcjs.b.call(void 0, D),A= exports.a =_react.forwardRef.call(void 0, ({className:M,image:v,forceMount:h,container:B,heading:x,description:t,hideCloseButton:f,fullScreen:I,loading:l,loadingText:r,loadingHeading:n,loadingDescription:s,children:$,...w},b)=>{let O={forceMount:h,container:B},u=!!v,T=!!(l?(r||n)&&s:t);return _jsxruntime.jsx.call(void 0, _radixui.Dialog.Portal,{...O,children:_jsxruntime.jsx.call(void 0, _radixui.Dialog.Overlay,{className:_chunk4Q432K4Wcjs.b.call(void 0, "Overlay"),children:_jsxruntime.jsx.call(void 0, "div",{className:`${i}Scroll`,children:_jsxruntime.jsx.call(void 0, "div",{className:`${i}ScrollPadding`,children:_jsxruntime.jsxs.call(void 0, _radixui.Dialog.Content,{ref:b,className:_chunkONNSZMWFcjs.a.call(void 0, i,M),"data-contains-image":u?"":void 0,"data-hide-close-button":f?"":void 0,"data-full-screen":I?"":void 0,"data-testid":i,...T?{}:{"aria-describedby":void 0},...w,children:[_jsxruntime.jsx.call(void 0, _chunkEU7QBTGKcjs.a,{children:_jsxruntime.jsx.call(void 0, _chunkMOXUZLUZcjs.a,{type:"button",label:"Close","data-visually-hidden":f?"":void 0,className:`${i}CloseIconButton`,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.CloseMediumIcon,{})})}),_jsxruntime.jsxs.call(void 0, "div",{className:`${i}OuterContainer`,children:[l?null:_jsxruntime.jsxs.call(void 0, "div",{className:`${i}InnerContainer`,children:[u?_jsxruntime.jsx.call(void 0, "div",{className:`${i}Image`,children:v}):null,_jsxruntime.jsxs.call(void 0, "div",{className:`${i}Header`,children:[_jsxruntime.jsx.call(void 0, _chunkIWYX25BFcjs.a,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _radixui.Dialog.Title,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkJ7FFTG2Ecjs.a,{size:"lg",wrap:"wrap",children:x})})}),t?_jsxruntime.jsx.call(void 0, _radixui.Dialog.Description,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkTVVHDQIWcjs.a,{size:"md",as:"span",children:t})}):null]})]}),l?_jsxruntime.jsxs.call(void 0, _chunkLYHXMFNXcjs.a,{direction:"column",gap:"300",alignItems:"center",paddingY:"200",width:"100%",children:[_jsxruntime.jsx.call(void 0, _chunkR3Q7TFDCcjs.a,{size:"lg"}),_jsxruntime.jsxs.call(void 0, "div",{className:`${i}LoadingHeader`,children:[_jsxruntime.jsx.call(void 0, _chunkIWYX25BFcjs.a,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _radixui.Dialog.Title,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkJ7FFTG2Ecjs.a,{size:"lg",textAlign:"center",wrap:"wrap",children:n||r||"Loading"})})}),(r||n)&&s?_jsxruntime.jsx.call(void 0, _radixui.Dialog.Description,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkTVVHDQIWcjs.a,{size:"md",as:"span",textAlign:"center",children:s})}):null]})]}):$]})]})})})})})});A.displayName=D;exports.a = A;
|
|
4
|
+
//# sourceMappingURL=chunk-O3NS4CL4.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-O3NS4CL4.cjs","../src/components/Modal/Modal.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Modal","forwardRef","className","image","forceMount","container","heading","description","hideCloseButton","fullScreen","loading","loadingText","loadingHeading","loadingDescription","children","props","ref","portalProps","containsImage","hasDescription","jsx","DialogPrimitive"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,mCCAtU,wEAMV,8BAML,+CAwDP,IArDdA,CAAAA,CAAiB,OAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAQC,+BAAAA,CAEjB,CACE,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,IAAMC,CAAAA,CAAc,CAAE,UAAA,CAAAb,CAAAA,CAAY,SAAA,CAAAC,CAAU,CAAA,CACtCa,CAAAA,CAAgB,CAAA,CAAQf,CAAAA,CACxBgB,CAAAA,CAAiB,CAAA,CAAA,CACrBT,CAAAA,CAAAA,CAAWC,CAAAA,EAAeC,CAAAA,CAAAA,EAAmBC,CAAAA,CAAqBN,CAAAA,CAAAA,CAGpE,OACEa,6BAAAA,eAACC,CAAgB,MAAA,CAAhB,CAAwB,GAAGJ,CAAAA,CAC1B,QAAA,CAAAG,6BAAAA,eAACC,CAAgB,OAAA,CAAhB,CAAwB,SAAA,CAAWtB,iCAAAA,SAA0B,CAAA,CAC5D,QAAA,CAAAqB,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-O3NS4CL4.cjs","sourcesContent":[null,"'use client';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ModalProps } from './Modal.props';\nimport { Heading } from '../Heading/Heading';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { CloseMediumIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { BodyText } from '../BodyText/BodyText';\nimport { ModalClose } from './ModalClose';\nimport { Box } from '../Box/Box';\nimport { Flex } from '../Flex/Flex';\nimport { Spinner } from '../Spinner/Spinner';\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\n\nconst COMPONENT_NAME = 'Modal';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ModalElement = ComponentRef<'div'>;\n\nexport const Modal = forwardRef<ModalElement, ModalProps>(\n (\n {\n className,\n image,\n forceMount,\n container,\n heading,\n description,\n hideCloseButton,\n fullScreen,\n loading,\n loadingText,\n loadingHeading,\n loadingDescription,\n children,\n ...props\n },\n ref\n ) => {\n const portalProps = { forceMount, container };\n const containsImage = Boolean(image);\n const hasDescription = Boolean(\n loading ? (loadingText || loadingHeading) && loadingDescription : description\n );\n\n return (\n <DialogPrimitive.Portal {...portalProps}>\n <DialogPrimitive.Overlay className={withGlobalPrefix('Overlay')}>\n <div className={`${componentClassName}Scroll`}>\n <div className={`${componentClassName}ScrollPadding`}>\n <DialogPrimitive.Content\n ref={ref}\n className={cn(componentClassName, className)}\n data-contains-image={containsImage ? '' : undefined}\n data-hide-close-button={hideCloseButton ? '' : undefined}\n data-full-screen={fullScreen ? '' : undefined}\n data-testid={componentClassName}\n {...(hasDescription ? {} : { 'aria-describedby': undefined })}\n {...props}\n >\n <ModalClose>\n <UnstyledIconButton\n type=\"button\"\n label=\"Close\"\n data-visually-hidden={hideCloseButton ? '' : undefined}\n className={`${componentClassName}CloseIconButton`}\n >\n <CloseMediumIcon />\n </UnstyledIconButton>\n </ModalClose>\n <div className={`${componentClassName}OuterContainer`}>\n {!loading ? (\n <div className={`${componentClassName}InnerContainer`}>\n {containsImage ? (\n <div className={`${componentClassName}Image`}>{image}</div>\n ) : null}\n <div className={`${componentClassName}Header`}>\n <Box asChild>\n <DialogPrimitive.Title asChild>\n <Heading size=\"lg\" wrap=\"wrap\">\n {heading}\n </Heading>\n </DialogPrimitive.Title>\n </Box>\n {description ? (\n <DialogPrimitive.Description asChild>\n <BodyText size=\"md\" as=\"span\">\n {description}\n </BodyText>\n </DialogPrimitive.Description>\n ) : null}\n </div>\n </div>\n ) : null}\n\n {loading ? (\n <Flex\n direction=\"column\"\n gap=\"300\"\n alignItems=\"center\"\n paddingY=\"200\"\n width=\"100%\"\n >\n <Spinner size=\"lg\" />\n <div className={`${componentClassName}LoadingHeader`}>\n <Box asChild>\n <DialogPrimitive.Title asChild>\n <Heading size=\"lg\" textAlign=\"center\" wrap=\"wrap\">\n {loadingHeading || loadingText || 'Loading'}\n </Heading>\n </DialogPrimitive.Title>\n </Box>\n {(loadingText || loadingHeading) && loadingDescription ? (\n <DialogPrimitive.Description asChild>\n <BodyText size=\"md\" as=\"span\" textAlign=\"center\">\n {loadingDescription}\n </BodyText>\n </DialogPrimitive.Description>\n ) : null}\n </div>\n </Flex>\n ) : (\n children\n )}\n </div>\n </DialogPrimitive.Content>\n </div>\n </div>\n </DialogPrimitive.Overlay>\n </DialogPrimitive.Portal>\n );\n }\n);\n\nModal.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as n}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as n}from"./chunk-RU4YPNKV.js";import{a as i}from"./chunk-KBX2N5VR.js";import{a as e}from"./chunk-UWZUYMW4.js";import{a as t}from"./chunk-J3AJBV4B.js";import{b as r}from"./chunk-PDEVCIQ3.js";import{forwardRef as y}from"react";import{Accordion as E}from"radix-ui";import{jsx as p,jsxs as u}from"react/jsx-runtime";var m="Accordion",c=r(m),g=y((s,a)=>{let{className:d,type:f="multiple",heading:o,headingElement:l="h2",helperText:P,trailingContent:A,validationText:h,validationStatus:v,...C}=e(s,i),N={heading:o,headingElement:l,helperText:P,trailingContent:A,validationText:h,validationStatus:v},R={type:f,...C};return u("div",{ref:a,className:t(c,d),"data-testid":c,children:[o?p(n,{...N}):null,p(E.Root,{...R})]})});g.displayName=m;export{g as a};
|
|
4
|
+
//# sourceMappingURL=chunk-OH5J7HR2.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var _chunk2XTXL6ZEcjs = require('./chunk-2XTXL6ZE.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunk2XTXL6ZEcjs = require('./chunk-2XTXL6ZE.cjs');var _chunkIWYX25BFcjs = require('./chunk-IWYX25BF.cjs');var _chunkLYHXMFNXcjs = require('./chunk-LYHXMFNX.cjs');var _chunkMV7VYPO6cjs = require('./chunk-MV7VYPO6.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var y="SkeletonBodyText",d=_chunk4Q432K4Wcjs.b.call(void 0, y),R= exports.a =_react.forwardRef.call(void 0, (c,t)=>{let{lines:r="1",className:m,margin:x,marginTop:g,marginRight:B,marginBottom:T,marginLeft:k,marginX:N,marginY:P,width:h,maxWidth:S,minWidth:u,...n}=_chunkMV7VYPO6cjs.a.call(void 0, c,_chunk2XTXL6ZEcjs.a),i={margin:x,marginTop:g,marginRight:B,marginBottom:T,marginLeft:k,marginX:N,marginY:P,width:h,maxWidth:S,minWidth:u};return r==="1"?_jsxruntime.jsx.call(void 0, _chunkIWYX25BFcjs.a,{as:"div",ref:t,className:_chunkONNSZMWFcjs.a.call(void 0, d,m),...i,...n}):_jsxruntime.jsx.call(void 0, _chunkLYHXMFNXcjs.a,{ref:t,direction:"column",gap:"75",...i,children:Array.from({length:Number(r)},(v,C)=>_jsxruntime.jsx.call(void 0, "div",{className:_chunkONNSZMWFcjs.a.call(void 0, d,m),...n},C))})});R.displayName=y;exports.a = R;
|
|
4
|
+
//# sourceMappingURL=chunk-PTRHEB7E.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-PTRHEB7E.cjs","../src/components/Skeleton/SkeletonBodyText.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","SkeletonBodyText","forwardRef","props","ref","lines","className","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","width","maxWidth","minWidth","skeletonBodyTextProps","extractProps","skeletonBodyTextPropDefs","styleProps","jsx","Box","cn","Flex","_","index"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,wDAAyC,8BCArN,+CA+CnB,IAtCFA,CAAAA,CAAiB,kBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAmBC,+BAAAA,CAC7BC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACd,GAAM,CACJ,KAAA,CAAAC,CAAAA,CAAQ,GAAA,CACR,SAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,WAAA,CA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AAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-PTRHEB7E.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { skeletonBodyTextPropDefs, type SkeletonBodyTextProps } from './SkeletonBodyText.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { Flex } from '../Flex/Flex';\nimport { Box } from '../Box/Box';\n\nconst COMPONENT_NAME = 'SkeletonBodyText';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype SkeletonBodyTextElement = ComponentRef<'div'>;\n\nexport const SkeletonBodyText = forwardRef<SkeletonBodyTextElement, SkeletonBodyTextProps>(\n (props, ref) => {\n const {\n lines = '1',\n className,\n margin,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n marginX,\n marginY,\n width,\n maxWidth,\n minWidth,\n ...skeletonBodyTextProps\n } = extractProps(props, skeletonBodyTextPropDefs);\n\n const styleProps = {\n margin,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n marginX,\n marginY,\n width,\n maxWidth,\n minWidth,\n };\n\n if (lines === '1') {\n return (\n <Box\n as=\"div\"\n ref={ref}\n className={cn(componentClassName, className)}\n {...styleProps}\n {...skeletonBodyTextProps}\n />\n );\n }\n\n return (\n <Flex ref={ref} direction=\"column\" gap=\"75\" {...styleProps}>\n {Array.from({ length: Number(lines) }, (_, index) => (\n <div\n key={index}\n className={cn(componentClassName, className)}\n {...skeletonBodyTextProps}\n />\n ))}\n </Flex>\n );\n }\n);\n\nSkeletonBodyText.displayName = COMPONENT_NAME;\n"]}
|