@utilitywarehouse/hearth-react 0.32.2 → 0.32.3
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-AOWHE3JS.cjs → chunk-2DOX5QRE.cjs} +2 -2
- package/dist/{chunk-AOWHE3JS.cjs.map → chunk-2DOX5QRE.cjs.map} +1 -1
- package/dist/{chunk-TBO5GN3I.js → chunk-5JUZLZBK.js} +2 -2
- package/dist/{chunk-KWBAJWSJ.cjs → chunk-5UEDHPFN.cjs} +2 -2
- package/dist/{chunk-KWBAJWSJ.cjs.map → chunk-5UEDHPFN.cjs.map} +1 -1
- package/dist/{chunk-75OLYAFB.cjs → chunk-6BVOGEQF.cjs} +2 -2
- package/dist/{chunk-75OLYAFB.cjs.map → chunk-6BVOGEQF.cjs.map} +1 -1
- package/dist/{chunk-X2QPGOUI.cjs → chunk-6GC2HQ72.cjs} +2 -2
- package/dist/{chunk-X2QPGOUI.cjs.map → chunk-6GC2HQ72.cjs.map} +1 -1
- package/dist/{chunk-VME2FDDL.cjs → chunk-6SR47BVO.cjs} +2 -2
- package/dist/{chunk-VME2FDDL.cjs.map → chunk-6SR47BVO.cjs.map} +1 -1
- package/dist/{chunk-4VB6TWFP.cjs → chunk-BB2SOLJS.cjs} +2 -2
- package/dist/{chunk-4VB6TWFP.cjs.map → chunk-BB2SOLJS.cjs.map} +1 -1
- package/dist/{chunk-UXKDDMKT.js → chunk-BHZ3HDCP.js} +2 -2
- package/dist/{chunk-SWIT4LGB.cjs → chunk-CICNJKHM.cjs} +2 -2
- package/dist/{chunk-SWIT4LGB.cjs.map → chunk-CICNJKHM.cjs.map} +1 -1
- package/dist/{chunk-ZPQZJIT3.cjs → chunk-CTVFJHPG.cjs} +2 -2
- package/dist/{chunk-ZPQZJIT3.cjs.map → chunk-CTVFJHPG.cjs.map} +1 -1
- package/dist/{chunk-OQ7TRS57.js → chunk-DYMXUQM4.js} +2 -2
- package/dist/{chunk-7ILZKQOQ.js → chunk-F2ZTXLIG.js} +2 -2
- package/dist/{chunk-S7R53S6F.js → chunk-FL2DCYWI.js} +2 -2
- package/dist/{chunk-TR7MKE7F.js → chunk-FSOQCT7B.js} +2 -2
- package/dist/{chunk-XAJGQUSC.js → chunk-KNPNKYUS.js} +2 -2
- package/dist/{chunk-2YZ3O2PW.js → chunk-L3VPQN5T.js} +2 -2
- package/dist/{chunk-NNELZC2A.cjs → chunk-LFHNFACK.cjs} +2 -2
- package/dist/{chunk-NNELZC2A.cjs.map → chunk-LFHNFACK.cjs.map} +1 -1
- package/dist/{chunk-KKHWPT5B.js → chunk-PGDFEVA5.js} +2 -2
- package/dist/{chunk-N2PQS6HG.js → chunk-PJCXETFD.js} +2 -2
- package/dist/{chunk-P4FX42C6.cjs → chunk-Q55UUMCD.cjs} +2 -2
- package/dist/{chunk-P4FX42C6.cjs.map → chunk-Q55UUMCD.cjs.map} +1 -1
- package/dist/{chunk-LOKIAOWS.js → chunk-QIPIWJCI.js} +2 -2
- package/dist/{chunk-NV5OZD3V.cjs → chunk-RVXQZ4CI.cjs} +2 -2
- package/dist/{chunk-NV5OZD3V.cjs.map → chunk-RVXQZ4CI.cjs.map} +1 -1
- package/dist/{chunk-XCT44JDG.js → chunk-S4U7KSTZ.js} +2 -2
- package/dist/{chunk-IOXDXAHO.cjs → chunk-UB5EHJ4P.cjs} +2 -2
- package/dist/{chunk-IOXDXAHO.cjs.map → chunk-UB5EHJ4P.cjs.map} +1 -1
- package/dist/{chunk-HNPNWQMD.js → chunk-V4BZIPQB.js} +2 -2
- package/dist/{chunk-3SXNUUIV.cjs → chunk-VZ37XNSE.cjs} +2 -2
- package/dist/{chunk-3SXNUUIV.cjs.map → chunk-VZ37XNSE.cjs.map} +1 -1
- package/dist/{chunk-BDJRXINR.js → chunk-WJCO5MYG.js} +2 -2
- package/dist/{chunk-L7I7AUWH.cjs → chunk-XL66CZU5.cjs} +2 -2
- package/dist/{chunk-L7I7AUWH.cjs.map → chunk-XL66CZU5.cjs.map} +1 -1
- package/dist/{chunk-CKE63SKW.js → chunk-Y2YBHHIX.js} +2 -2
- package/dist/{chunk-LA3N4ST5.js → chunk-Y36QMGRW.js} +2 -2
- package/dist/{chunk-KKJEZRGJ.cjs → chunk-YEZ6N62U.cjs} +2 -2
- package/dist/{chunk-KKJEZRGJ.cjs.map → chunk-YEZ6N62U.cjs.map} +1 -1
- package/dist/{chunk-XZBPR3WG.cjs → chunk-ZKHAEQHH.cjs} +2 -2
- package/dist/{chunk-XZBPR3WG.cjs.map → chunk-ZKHAEQHH.cjs.map} +1 -1
- package/dist/components/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/CardAccordion/CardAccordion.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordion.js +1 -1
- package/dist/components/CardAccordion/CardAccordionButton.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordionButton.js +1 -1
- package/dist/components/CardAccordion/CardAccordionItem.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordionItem.js +1 -1
- package/dist/components/Combobox/Combobox.cjs +1 -1
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.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/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/Pagination/Pagination.cjs +1 -1
- package/dist/components/Pagination/Pagination.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/components/Table/TablePagination.cjs +1 -1
- package/dist/components/Table/TablePagination.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 +4 -4
- package/public/llms/docs/getting-started.md +1 -1
- package/styles.css +1 -1
- /package/dist/{chunk-TBO5GN3I.js.map → chunk-5JUZLZBK.js.map} +0 -0
- /package/dist/{chunk-UXKDDMKT.js.map → chunk-BHZ3HDCP.js.map} +0 -0
- /package/dist/{chunk-OQ7TRS57.js.map → chunk-DYMXUQM4.js.map} +0 -0
- /package/dist/{chunk-7ILZKQOQ.js.map → chunk-F2ZTXLIG.js.map} +0 -0
- /package/dist/{chunk-S7R53S6F.js.map → chunk-FL2DCYWI.js.map} +0 -0
- /package/dist/{chunk-TR7MKE7F.js.map → chunk-FSOQCT7B.js.map} +0 -0
- /package/dist/{chunk-XAJGQUSC.js.map → chunk-KNPNKYUS.js.map} +0 -0
- /package/dist/{chunk-2YZ3O2PW.js.map → chunk-L3VPQN5T.js.map} +0 -0
- /package/dist/{chunk-KKHWPT5B.js.map → chunk-PGDFEVA5.js.map} +0 -0
- /package/dist/{chunk-N2PQS6HG.js.map → chunk-PJCXETFD.js.map} +0 -0
- /package/dist/{chunk-LOKIAOWS.js.map → chunk-QIPIWJCI.js.map} +0 -0
- /package/dist/{chunk-XCT44JDG.js.map → chunk-S4U7KSTZ.js.map} +0 -0
- /package/dist/{chunk-HNPNWQMD.js.map → chunk-V4BZIPQB.js.map} +0 -0
- /package/dist/{chunk-BDJRXINR.js.map → chunk-WJCO5MYG.js.map} +0 -0
- /package/dist/{chunk-CKE63SKW.js.map → chunk-Y2YBHHIX.js.map} +0 -0
- /package/dist/{chunk-LA3N4ST5.js.map → chunk-Y36QMGRW.js.map} +0 -0
|
@@ -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 _chunkGS47QEXRcjs = require('./chunk-GS47QEXR.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkGS47QEXRcjs = require('./chunk-GS47QEXR.cjs');var _chunkXL66CZU5cjs = require('./chunk-XL66CZU5.cjs');var _chunkIVFMFU6Ucjs = require('./chunk-IVFMFU6U.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.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}=_chunkZPJNQBTNcjs.a.call(void 0, P,_chunkOB7O3UFLcjs.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, _chunkXL66CZU5cjs.a,{id:p,...w}):null,n===void 0||r===void 0?_jsxruntime.jsx.call(void 0, _chunkIVFMFU6Ucjs.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, _chunkGS47QEXRcjs.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-2DOX5QRE.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-2DOX5QRE.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","marginPropDefs","sectionHeaderProps","id","labelId","useIds","attributeProps","jsxs","cn","jsx","SectionHeader","Box"],"mappings":"AAAA,yLAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAoC,8BCFvS,+CAoEvB,IAxDEA,CAAAA,CAAiB,MAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAc7CC,CAAAA,aAAOC,+BAAAA,CAAoCC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACrE,GAAM,CACJ,EAAA,CAAIC,CAAAA,CACJ,EAAA,CAAIC,CAAAA,CAAM,IAAA,CACV,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,KAAA,CAAA,CACd,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA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IR,CAAAA,CACJ,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-2DOX5QRE.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\n/**\n * Use List to display a list of items, with support for visual variants,\n * colour schemes, a heading, and helper text. Use ListItem for simple text\n * content, or as a container for more complex or interactive content such as\n * ListItemContent, ListItemButton, or ListItemLink. `variant` and\n * `colorScheme` must be used together — if either is left `undefined`, the\n * list falls back to its default appearance.\n *\n * @summary A list of items with an optional heading, helper text, and style variants.\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 l}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as l}from"./chunk-Y36QMGRW.js";import{b as p}from"./chunk-YWMUOY43.js";import{a as d}from"./chunk-OPPG3NOC.js";import{a as s}from"./chunk-KGEVWEVL.js";import{a}from"./chunk-J3AJBV4B.js";import{b as c}from"./chunk-PDEVCIQ3.js";import{Children as N,forwardRef as V,isValidElement as y,useEffect as E,useState as R}from"react";import{Accordion as w}from"radix-ui";import{jsx as f}from"react/jsx-runtime";var C="CardAccordion",m=c(C),I=V((u,A)=>{let{className:P,children:t,value:r,onValueChange:e,...h}=s(u,d),[v,n]=R(r);E(()=>{r!==void 0&&n(r)},[r]);let g={...h,type:"single",collapsible:!1,value:v,onValueChange:o=>{n(o),e&&e(o)}},i=(N.map(t,o=>y(o)&&o.type===l?o.props.value:null)??[]).filter(Boolean);return i.length===0?(process.env.NODE_ENV!=="production"&&console.error('[CardAccordion]: No CardAccordionItem children with a "value" prop were found. CardAccordion requires at least one CardAccordionItem child.'),null):f(w.Root,{ref:A,className:a(m,P),"data-testid":m,...g,children:f(p,{steps:i,onValueChange:e,setCurrentValue:n,children:t})})});I.displayName=C;export{I as a};
|
|
4
|
+
//# sourceMappingURL=chunk-5JUZLZBK.js.map
|
|
@@ -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 _chunkS45VPPZEcjs = require('./chunk-S45VPPZE.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkS45VPPZEcjs = require('./chunk-S45VPPZE.cjs');var _chunkBB2SOLJScjs = require('./chunk-BB2SOLJS.cjs');var _chunkMJNIIRVPcjs = require('./chunk-MJNIIRVP.cjs');var _chunkGS47QEXRcjs = require('./chunk-GS47QEXR.cjs');var _chunkRAIRXO6Fcjs = require('./chunk-RAIRXO6F.cjs');var _chunkPWY25JDNcjs = require('./chunk-PWY25JDN.cjs');var _chunkQKGE3FJXcjs = require('./chunk-QKGE3FJX.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.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 N="CardAccordionItem",n=_chunk4Q432K4Wcjs.b.call(void 0, N),_= exports.a =_react.forwardRef.call(void 0, ({className:x,title:S,description:c,headingElement:T="h3",summaryTitle:s,summaryDescription:l,children:R,value:o,onEditClick:y,...B},M)=>{let{setCurrentStep:z,setPreviousSteps:O,getStep:$,steps:d}=_chunkMJNIIRVPcjs.c.call(void 0, ),r=$(o),w=r==="current"?"emphasis":"subtle",F=r==="current"?"neutralStrong":"neutralSubtle",p=_react.useRef.call(void 0, null),f=_react.useRef.call(void 0, !1),{labelId:t,helperTextId:u}=_chunkRIHABKWYcjs.a.call(void 0, {prefix:"card-accordion-item"});return _react.useEffect.call(void 0, ()=>{if(!f.current){f.current=!0;return}r==="current"&&_optionalChain([p, 'access', _2 => _2.current, 'optionalAccess', _3 => _3.focus, 'call', _4 => _4()])},[r]),_jsxruntime.jsx.call(void 0, _radixui.Accordion.Item,{asChild:!0,ref:M,className:_chunkONNSZMWFcjs.a.call(void 0, n,x),disabled:r==="future","data-step":r,value:o,...B,children:_jsxruntime.jsx.call(void 0, _chunkGS47QEXRcjs.a,{variant:w,colorScheme:F,direction:"column",children:_jsxruntime.jsxs.call(void 0, _chunkS45VPPZEcjs.b,{value:{value:o},children:[_jsxruntime.jsx.call(void 0, _radixui.Accordion.Header,{className:`${n}Header`,asChild:!0,children:_jsxruntime.jsxs.call(void 0, T,{children:[_jsxruntime.jsx.call(void 0, _radixui.Accordion.Trigger,{ref:p,className:`${n}Trigger`,"aria-labelledby":t,"aria-describedby":c?u:void 0,children:_jsxruntime.jsxs.call(void 0, _chunkQKGE3FJXcjs.a,{direction:"column",children:[r==="previous"&&s?_jsxruntime.jsx.call(void 0, _chunkPWY25JDNcjs.a,{asChild:!0,size:"md",id:t,children:_jsxruntime.jsx.call(void 0, "div",{children:s})}):_jsxruntime.jsx.call(void 0, _chunkPWY25JDNcjs.a,{asChild:!0,size:"md",id:t,children:_jsxruntime.jsx.call(void 0, "div",{children:S})}),c?_jsxruntime.jsx.call(void 0, _chunkRAIRXO6Fcjs.a,{id:u,children:c}):null]})}),r==="previous"?_jsxruntime.jsx.call(void 0, _chunkBB2SOLJScjs.a,{size:"sm",variant:"ghost",colorScheme:"functional","aria-describedby":t,onClick:k=>{z(o),d&&O(d.slice(0,d.indexOf(o))),_optionalChain([y, 'optionalCall', _5 => _5(k)])},children:"Edit"}):null]})}),r==="previous"&&l?l:null,r==="current"?_jsxruntime.jsx.call(void 0, _radixui.Accordion.Content,{className:`${n}Content`,children:R}):null]})})})});_.displayName=N;exports.a = _;
|
|
4
|
+
//# sourceMappingURL=chunk-5UEDHPFN.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-5UEDHPFN.cjs","../src/components/CardAccordion/CardAccordionItem.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","CardAccordionItem","forwardRef","className","title","description","HeadingElement","summaryTitle","summaryDescription","children","value","onEditClick","props","ref","setCurrentStep","setPreviousSteps","getStep","steps","useCardAccordion","step","variant","colorScheme","triggerRef","useRef","hasMountedRef","labelId","helperTextId","useIds","useEffect","jsx","AccordionPrimitive","cn","Card","jsxs","CardAccordionItemProvider"],"mappings":"AAAA,ylBAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCA3W,mCAIE,+CAgF9B,IArEZA,CAAAA,CAAiB,mBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAY7CC,CAAAA,aAAoBC,+BAAAA,CAE7B,CACE,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAAiB,IAAA,CACjC,YAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,GAAM,CAAE,cAAA,CAAAC,CAAAA,CAAgB,gBAAA,CAAAC,CAAAA,CAAkB,OAAA,CAAAC,CAAAA,CAAS,KAAA,CAAAC,CAAM,CAAA,CAAIC,iCAAAA,CA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,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-5UEDHPFN.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef, useEffect, useRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { CardAccordionItemProps } from './CardAccordionItem.props';\nimport { Accordion as AccordionPrimitive } from 'radix-ui';\nimport type { ComponentRef } from 'react';\nimport { Card } from '../Card/Card';\nimport { Button } from '../Button/Button';\nimport { Flex } from '../Flex/Flex';\nimport { Heading } from '../Heading/Heading';\nimport { HelperText } from '../HelperText/HelperText';\nimport { useIds } from '../../hooks/use-ids';\nimport { CardAccordionItemProvider } from './CardAccordionItem.context';\nimport { useCardAccordion } from './CardAccordion.context';\n\nconst COMPONENT_NAME = 'CardAccordionItem';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype CardAccordionItemElement = ComponentRef<'div'>;\n\n/**\n * Use CardAccordionItem for each step within a CardAccordion. Requires a\n * unique `value` and a `title`. Once a step becomes `previous`,\n * `summaryTitle`/`summaryDescription` (if set) replace the current view and\n * an Edit button (wired via `onEditClick`) lets users return to it.\n *\n * @summary A single step within a CardAccordion.\n */\nexport const CardAccordionItem = forwardRef<CardAccordionItemElement, CardAccordionItemProps>(\n (\n {\n className,\n title,\n description,\n headingElement: HeadingElement = 'h3',\n summaryTitle,\n summaryDescription,\n children,\n value,\n onEditClick,\n ...props\n },\n ref\n ) => {\n const { setCurrentStep, setPreviousSteps, getStep, steps } = useCardAccordion();\n const step = getStep(value);\n const variant = step === 'current' ? 'emphasis' : 'subtle';\n const colorScheme = step === 'current' ? 'neutralStrong' : 'neutralSubtle';\n const triggerRef = useRef<HTMLButtonElement>(null);\n const hasMountedRef = useRef(false);\n\n const { labelId, helperTextId } = useIds({ prefix: 'card-accordion-item' });\n\n useEffect(() => {\n if (!hasMountedRef.current) {\n hasMountedRef.current = true;\n return;\n }\n\n if (step === 'current') {\n triggerRef.current?.focus();\n }\n }, [step]);\n\n return (\n <AccordionPrimitive.Item\n asChild\n ref={ref}\n className={cn(componentClassName, className)}\n disabled={step === 'future'}\n data-step={step}\n value={value}\n {...props}\n >\n <Card variant={variant} colorScheme={colorScheme} direction=\"column\">\n <CardAccordionItemProvider value={{ value }}>\n <AccordionPrimitive.Header className={`${componentClassName}Header`} asChild>\n <HeadingElement>\n <AccordionPrimitive.Trigger\n ref={triggerRef}\n className={`${componentClassName}Trigger`}\n aria-labelledby={labelId}\n aria-describedby={description ? helperTextId : undefined}\n >\n <Flex direction=\"column\">\n {step === 'previous' && Boolean(summaryTitle) ? (\n <Heading asChild size=\"md\" id={labelId}>\n <div>{summaryTitle}</div>\n </Heading>\n ) : (\n <Heading asChild size=\"md\" id={labelId}>\n <div>{title}</div>\n </Heading>\n )}\n {description ? <HelperText id={helperTextId}>{description}</HelperText> : null}\n </Flex>\n </AccordionPrimitive.Trigger>\n {step === 'previous' ? (\n <Button\n size=\"sm\"\n variant=\"ghost\"\n colorScheme=\"functional\"\n aria-describedby={labelId}\n onClick={e => {\n setCurrentStep(value);\n if (steps) {\n setPreviousSteps(steps.slice(0, steps.indexOf(value)));\n }\n onEditClick?.(e);\n }}\n >\n Edit\n </Button>\n ) : null}\n </HeadingElement>\n </AccordionPrimitive.Header>\n {step === 'previous' && summaryDescription ? summaryDescription : null}\n {step === 'current' ? (\n <AccordionPrimitive.Content className={`${componentClassName}Content`}>\n {children}\n </AccordionPrimitive.Content>\n ) : null}\n </CardAccordionItemProvider>\n </Card>\n </AccordionPrimitive.Item>\n );\n }\n);\n\nCardAccordionItem.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -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 _chunkQKGE3FJXcjs = require('./chunk-QKGE3FJX.cjs');var _chunkIVFMFU6Ucjs = require('./chunk-IVFMFU6U.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.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}=_chunkZPJNQBTNcjs.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, _chunkIVFMFU6Ucjs.a,{as:"div",ref:t,className:_chunkONNSZMWFcjs.a.call(void 0, d,m),...i,...n}):_jsxruntime.jsx.call(void 0, _chunkQKGE3FJXcjs.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-6BVOGEQF.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-6BVOGEQF.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,+CAuDnB,IA9CFA,CAAAA,CAAiB,kBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAY7CC,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,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaf,CAAOgB,mBAAwB,CAAA,CAE1CC,CAAAA,CAAa,CACjB,MAAA,CAAAb,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CACF,CAAA,CAEA,OAAIX,CAAAA,GAAU,GAAA,CAEVgB,6BAAAA,mBAACC,CAAA,CACC,EAAA,CAAG,KAAA,CACH,GAAA,CAAKlB,CAAAA,CACL,SAAA,CAAWmB,iCAAAA,CAAGxB,CAAoBO,CAAS,CAAA,CAC1C,GAAGc,CAAAA,CACH,GAAGH,CAAAA,CACN,CAAA,CAKFI,6BAAAA,mBAACG,CAAA,CAAK,GAAA,CAAKpB,CAAAA,CAAK,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,IAAA,CAAM,GAAGgB,CAAAA,CAC7C,QAAA,CAAA,KAAA,CAAM,IAAA,CAAK,CAAE,MAAA,CAAQ,MAAA,CAAOf,CAAK,CAAE,CAAA,CAAG,CAACoB,CAAAA,CAAGC,CAAAA,CAAAA,EACzCL,6BAAAA,KAAC,CAAA,CAEC,SAAA,CAAWE,iCAAAA,CAAGxB,CAAoBO,CAAS,CAAA,CAC1C,GAAGW,CAAAA,CAAAA,CAFCS,CAGP,CACD,CAAA,CACH,CAEJ,CACF,CAAA,CAEAzB,CAAAA,CAAiB,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-6BVOGEQF.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\n/**\n * Use SkeletonBodyText as a loading placeholder for BodyText content, inside\n * a Skeleton wrapper. It supports multiple lines via the `lines` prop and the\n * same size props as BodyText. For placeholder headings, use SkeletonHeading;\n * for arbitrary shapes like images or avatars, use SkeletonBox instead.\n *\n * @summary A loading placeholder for BodyText content, supporting multiple lines.\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"]}
|
|
@@ -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 _chunkXL66CZU5cjs = require('./chunk-XL66CZU5.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.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 s="Accordion",p=_chunk4Q432K4Wcjs.b.call(void 0, s),u= exports.a =_react.forwardRef.call(void 0, (a,d)=>{let{className:l,type:o="multiple",heading:t,headingElement:f="h2",helperText:P,trailingContent:A,validationText:h,validationStatus:v,collapsible:C,...N}=_chunkZPJNQBTNcjs.a.call(void 0, a,_chunkOB7O3UFLcjs.a),R={heading:t,headingElement:f,helperText:P,trailingContent:A,validationText:h,validationStatus:v},y={type:o,...N,...o==="single"?{collapsible:C}:{}};return _jsxruntime.jsxs.call(void 0, "div",{ref:d,className:_chunkONNSZMWFcjs.a.call(void 0, p,l),"data-testid":p,children:[t?_jsxruntime.jsx.call(void 0, _chunkXL66CZU5cjs.a,{...R}):null,_jsxruntime.jsx.call(void 0, _radixui.Accordion.Root,{...y})]})});u.displayName=s;exports.a = u;
|
|
4
|
+
//# sourceMappingURL=chunk-6GC2HQ72.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-6GC2HQ72.cjs","../src/components/Accordion/Accordion.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Accordion","forwardRef","props","ref","className","type","heading","headingElement","helperText","trailingContent","validationText","validationStatus","collapsible","restProps","extractProps","marginPropDefs","sectionHeaderProps","accordionProps","jsxs","cn","jsx","SectionHeader","AccordionPrimitive"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCAjL,mCAKqB,+CAoD5C,IA/CEA,CAAAA,CAAiB,WAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAc7CC,CAAAA,aAAYC,+BAAAA,CAA8CC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACpF,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CAAO,UAAA,CACP,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CAAiB,IAAA,CACjB,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaZ,CAAOa,mBAAc,CAAA,CAEhCC,CAAAA,CAAqB,CACzB,OAAA,CAAAV,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CAEMM,CAAAA,CAAiB,CACrB,IAAA,CAAAZ,CAAAA,CACA,GAAGQ,CAAAA,CAGH,GAAIR,CAAAA,GAAS,QAAA,CAAW,CAAE,WAAA,CAAAO,CAAY,CAAA,CAAI,CAAC,CAC7C,CAAA,CAEA,OACEM,8BAAAA,KAAC,CAAA,CAAI,GAAA,CAAKf,CAAAA,CAAK,SAAA,CAAWgB,iCAAAA,CAAGrB,CAAoBM,CAAS,CAAA,CAAG,aAAA,CAAaN,CAAAA,CACvE,QAAA,CAAA,CAAAQ,CAAAA,CAAUc,6BAAAA,mBAACC,CAAA,CAAe,GAAGL,CAAAA,CAAoB,CAAA,CAAK,IAAA,CACvDI,6BAAAA,kBAACE,CAAmB,IAAA,CAAnB,CAAyB,GAAGL,CAAAA,CAAgB,CAAA,CAAA,CAC/C,CAEJ,CAAC,CAAA,CAEDjB,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-6GC2HQ72.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\n/**\n * Use Accordion to let users expand or collapse individual content sections,\n * presenting a large amount of information in a compact, organised interface.\n * Compose it with `AccordionItem`, `AccordionHeader`, `AccordionTrigger`, and\n * `AccordionContent` for each disclosure item. The `type` prop is required and\n * determines whether one (`single`) or multiple (`multiple`) items can be\n * expanded at once.\n *\n * @summary A vertically stacked set of expandable and collapsible content sections.\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 collapsible,\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 = {\n type,\n ...restProps,\n // `collapsible` is only valid for `type=\"single\"` — Radix doesn't strip it for\n // `type=\"multiple\"`, so passing it regardless would leak onto the DOM node.\n ...(type === 'single' ? { collapsible } : {}),\n } as ComponentPropsWithRef<typeof AccordionPrimitive.Root>;\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 strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkY4KCRRDDcjs = require('./chunk-Y4KCRRDD.cjs');var _chunkN4PBDFEJcjs = require('./chunk-N4PBDFEJ.cjs');var _chunkIAFYIHVPcjs = require('./chunk-IAFYIHVP.cjs');var _chunkB2HYSLUXcjs = require('./chunk-B2HYSLUX.cjs');var _chunkZ6OA4XPPcjs = require('./chunk-Z6OA4XPP.cjs');var _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkHHKQ3ZBDcjs = require('./chunk-HHKQ3ZBD.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.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,...$}=_chunkZPJNQBTNcjs.a.call(void 0, s,_chunkOB7O3UFLcjs.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, _chunkZ6OA4XPPcjs.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, _chunkWFVKT4MGcjs.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, _chunkHHKQ3ZBDcjs.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, _chunkWFVKT4MGcjs.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, _chunkWFVKT4MGcjs.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, _chunkN4PBDFEJcjs.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-6SR47BVO.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-VME2FDDL.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,+CA0EtC,IArENA,CAAAA,CAAiB,UAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAYnD,SAASC,CAAAA,CACdC,CAAAA,CACA,CACA,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,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AA,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-VME2FDDL.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\n/**\n * Use Combobox to let users type to filter results and select from a\n * predefined list of options. Pass options via the `items` prop to have them\n * rendered automatically, or render `ComboboxItem` children yourself for more\n * control. Set `triggerOnlyOnType` when the user must type before options are\n * surfaced (e.g. a postcode or address lookup); leave it unset when there is a\n * predefined list to choose from by clicking.\n *\n * @summary A text input that lets users filter and select from a list of options.\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-6SR47BVO.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,+CA0EtC,IArENA,CAAAA,CAAiB,UAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAYnD,SAASC,CAAAA,CACdC,CAAAA,CACA,CACA,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,GAAGC,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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-6SR47BVO.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\n/**\n * Use Combobox to let users type to filter results and select from a\n * predefined list of options. Pass options via the `items` prop to have them\n * rendered automatically, or render `ComboboxItem` children yourself for more\n * control. Set `triggerOnlyOnType` when the user must type before options are\n * surfaced (e.g. a postcode or address lookup); leave it unset when there is a\n * predefined list to choose from by clicking.\n *\n * @summary A text input that lets users filter and select from a list of options.\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 strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkOTQHBR7Ccjs = require('./chunk-OTQHBR7C.cjs');var _chunkHMT3R4UWcjs = require('./chunk-HMT3R4UW.cjs');var _chunkHHKQ3ZBDcjs = require('./chunk-HHKQ3ZBD.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _chunkZSLWPF2Ucjs = require('./chunk-ZSLWPF2U.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var c="Button",t=_chunk4Q432K4Wcjs.b.call(void 0, c),h= exports.a =_react.forwardRef.call(void 0, (f,u)=>{let{className:B,children:r,disabled:N,loading:e,asChild:n,...b}=_chunkZPJNQBTNcjs.a.call(void 0, f,_chunkOTQHBR7Ccjs.a),P=e?_chunkZSLWPF2Ucjs.a.call(void 0, {asChild:n,children:r},C=>_jsxruntime.jsxs.call(void 0, "div",{className:`${t}Loading`,children:[_jsxruntime.jsx.call(void 0, "div",{children:_jsxruntime.jsx.call(void 0, _chunkHHKQ3ZBDcjs.a,{size:"xs",currentColor:!0})}),_jsxruntime.jsx.call(void 0, "span",{className:`${t}Hidden`,children:C})]})):r;return _jsxruntime.jsx.call(void 0, _chunkHMT3R4UWcjs.a,{ref:u,className:_chunkONNSZMWFcjs.a.call(void 0, t,B),disabled:N||e,"aria-label":e?"Loading":void 0,"data-testid":t,asChild:n,...b,children:P})});h.displayName=c;exports.a = h;
|
|
4
|
+
//# sourceMappingURL=chunk-BB2SOLJS.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-BB2SOLJS.cjs","../src/components/Button/Button.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Button","forwardRef","props","ref","className","children","disabled","loading","asChild","buttonProps","extractProps","buttonPropDefs","content","getSubtree","jsxs"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCQnQ,+CAsBnB,IApBFA,CAAAA,CAAiB,QAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAY7CC,CAAAA,aAASC,+BAAAA,CAA4CC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CAC/E,GAAM,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAAA,CAAU,QAAA,CAAAC,CAAAA,CAAU,OAAA,CAAAC,CAAAA,CAAS,OAAA,CAAAC,CAAAA,CAAS,GAAGC,CAAY,CAAA,CAAIC,iCAAAA,CAC1ER,CACAS,mBACF,CAAA,CACMC,CAAAA,CAAUL,CAAAA,CACZM,iCAAAA,CAAa,OAAA,CAAAL,CAAAA,CAAS,QAAA,CAAAH,CAAS,CAAA,CAAGA,CAAAA,EAChCS,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-BB2SOLJS.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 { ButtonBase, ButtonBaseElement } from '../ButtonBase/ButtonBase';\nimport { buttonPropDefs } from './Button.props';\nimport type { ButtonProps } from './Button.props';\nimport { Spinner } from '../Spinner/Spinner';\nimport { getSubtree } from '../../helpers/get-subtree';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'Button';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\n/**\n * Use Button to trigger an action or event, such as submitting a form or\n * displaying a dialog. Use the `variant` prop to convey emphasis: `emphasis`\n * and `solid` for primary actions, `outline` for medium-emphasis, non-critical\n * actions, and `ghost` for the lowest-prominence actions. For actions that\n * navigate somewhere, use a link instead, or render Button `asChild` with an\n * anchor or router link.\n *\n * @summary Triggers an action or event, such as submitting a form or displaying a dialog.\n */\nexport const Button = forwardRef<ButtonBaseElement, ButtonProps>((props, ref) => {\n const { className, children, disabled, loading, asChild, ...buttonProps } = extractProps(\n props,\n buttonPropDefs\n );\n const content = loading\n ? getSubtree({ asChild, children }, children => (\n <div className={`${componentClassName}Loading`}>\n <div>\n <Spinner size=\"xs\" currentColor />\n </div>\n <span className={`${componentClassName}Hidden`}>{children}</span>\n </div>\n ))\n : children;\n return (\n <ButtonBase\n ref={ref}\n className={cn(componentClassName, className)}\n disabled={disabled || loading}\n aria-label={loading ? 'Loading' : undefined}\n data-testid={componentClassName}\n asChild={asChild}\n {...buttonProps}\n >\n {content}\n </ButtonBase>\n );\n});\n\nButton.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as R}from"./chunk-GBTQPGQG.js";import{c as u}from"./chunk-HY32GRZP.js";import{a as f}from"./chunk-JWPVXXER.js";import{a as
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as R}from"./chunk-GBTQPGQG.js";import{c as u}from"./chunk-HY32GRZP.js";import{a as f}from"./chunk-JWPVXXER.js";import{a as c}from"./chunk-4MNQRAHO.js";import{a as n}from"./chunk-RXW6PYP7.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-BHZ3HDCP.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 _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkHHKQ3ZBDcjs = require('./chunk-HHKQ3ZBD.cjs');var _chunkPWY25JDNcjs = require('./chunk-PWY25JDN.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkEU7QBTGKcjs = require('./chunk-EU7QBTGK.cjs');var _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkHHKQ3ZBDcjs = require('./chunk-HHKQ3ZBD.cjs');var _chunkPWY25JDNcjs = require('./chunk-PWY25JDN.cjs');var _chunkQKGE3FJXcjs = require('./chunk-QKGE3FJX.cjs');var _chunkIVFMFU6Ucjs = require('./chunk-IVFMFU6U.cjs');var _chunkDLU27EEOcjs = require('./chunk-DLU27EEO.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:x,container:h,heading:B,description:t,hideCloseButton:f,fullScreen:I,loading:l,loadingText:r,loadingHeading:n,loadingDescription:s,children:$,...b},O)=>{let T={forceMount:x,container:h},u=!!v,w=!!(l?(r||n)&&s:t);return _jsxruntime.jsx.call(void 0, _radixui.Dialog.Portal,{...T,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:O,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,...w?{}:{"aria-describedby":void 0},...b,children:[_jsxruntime.jsx.call(void 0, _chunkEU7QBTGKcjs.a,{children:_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.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, _chunkIVFMFU6Ucjs.a,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _radixui.Dialog.Title,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkPWY25JDNcjs.a,{size:"lg",textWrap:"wrap",children:B})})}),t?_jsxruntime.jsx.call(void 0, _radixui.Dialog.Description,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkDLU27EEOcjs.a,{size:"md",as:"span",children:t})}):null]})]}),l?_jsxruntime.jsxs.call(void 0, _chunkQKGE3FJXcjs.a,{direction:"column",gap:"300",alignItems:"center",paddingY:"200",width:"100%",children:[_jsxruntime.jsx.call(void 0, _chunkHHKQ3ZBDcjs.a,{size:"lg"}),_jsxruntime.jsxs.call(void 0, "div",{className:`${i}LoadingHeader`,children:[_jsxruntime.jsx.call(void 0, _chunkIVFMFU6Ucjs.a,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _radixui.Dialog.Title,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkPWY25JDNcjs.a,{size:"lg",textAlign:"center",textWrap:"wrap",children:n||r||"Loading"})})}),(r||n)&&s?_jsxruntime.jsx.call(void 0, _radixui.Dialog.Description,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkDLU27EEOcjs.a,{size:"md",as:"span",textAlign:"center",children:s})}):null]})]}):$]})]})})})})})});A.displayName=D;exports.a = A;
|
|
4
|
+
//# sourceMappingURL=chunk-CICNJKHM.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-CICNJKHM.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,+CAkEP,IA/DdA,CAAAA,CAAiB,OAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAc7CC,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-CICNJKHM.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\n/**\n * Use Modal to overlay content that requests a decision from the user or\n * informs them of important information, without navigating to a new page.\n * Modal must be wrapped in a ModalRoot, and is typically composed with\n * ModalTrigger, ModalContent, ModalFooter, and ModalClose. Pass `heading` and\n * `description` for standard content, or custom children alongside\n * ModalFooter for more control over layout.\n *\n * @summary An overlay that requests a decision or displays important information.\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\" textWrap=\"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\" textWrap=\"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 strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var _chunkS45VPPZEcjs = require('./chunk-S45VPPZE.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkS45VPPZEcjs = require('./chunk-S45VPPZE.cjs');var _chunkBB2SOLJScjs = require('./chunk-BB2SOLJS.cjs');var _chunkMJNIIRVPcjs = require('./chunk-MJNIIRVP.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var v="CardAccordionButton",g=_chunk4Q432K4Wcjs.b.call(void 0, v),N= exports.a =_react.forwardRef.call(void 0, ({className:s,children:u,action:x,onClick:o,...m},p)=>{let{steps:r,setPreviousSteps:d,setCurrentStep:f,previousSteps:n}=_chunkMJNIIRVPcjs.c.call(void 0, ),e=_chunkS45VPPZEcjs.c.call(void 0, );return x==="next"?_jsxruntime.jsx.call(void 0, _chunkBB2SOLJScjs.a,{ref:p,className:_chunkONNSZMWFcjs.a.call(void 0, g,s),type:"button",...m,variant:"solid",colorScheme:"highlight","data-action":"next",onClick:i=>{if(o&&o(i),d(t=>[...t,e.value]),r){let t=r.indexOf(e.value);t>=0&&t<r.length-1&&f(r[t+1])}},children:u||"Next"}):_jsxruntime.jsx.call(void 0, _chunkBB2SOLJScjs.a,{ref:p,className:_chunkONNSZMWFcjs.a.call(void 0, g,s),type:"button",...m,variant:"outline",colorScheme:"functional","data-action":"previous",onClick:i=>{if(o&&o(i),n.length>0){let t=n[n.length-1];f(t),d(l=>l.slice(0,l.indexOf(e.value)))}},children:u||"Previous"})});N.displayName=v;exports.a = N;
|
|
4
|
+
//# sourceMappingURL=chunk-CTVFJHPG.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-CTVFJHPG.cjs","../src/components/CardAccordion/CardAccordionButton.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","CardAccordionButton","forwardRef","className","children","action","onClick","props","ref","steps","setPreviousSteps","setCurrentStep","previousSteps","useCardAccordion","context","useCardAccordionItem","jsx","Button","cn","e","prev","currentIndex","lastStep"],"mappings":"AAA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CAAW,CAEpD,CACF,CAAA,CAEC,QAAA,CAAAjB,CAAAA,EAAY,MAAA,CACf,CAAA,CAKFY,6BAAAA,mBAACC,CAAA,CACC,GAAA,CAAKT,CAAAA,CACL,SAAA,CAAWU,iCAAAA,CAAGnB,CAAoBI,CAAS,CAAA,CAC3C,IAAA,CAAK,QAAA,CACJ,GAAGI,CAAAA,CACJ,OAAA,CAAQ,SAAA,CACR,WAAA,CAAY,YAAA,CACZ,aAAA,CAAY,UAAA,CACZ,OAAA,CAASY,CAAAA,EAAK,CAIZ,EAAA,CAHIb,CAAAA,EACFA,CAAAA,CAAQa,CAAC,CAAA,CAEPP,CAAAA,CAAc,MAAA,CAAS,CAAA,CAAG,CAC5B,IAAMU,CAAAA,CAAWV,CAAAA,CAAcA,CAAAA,CAAc,MAAA,CAAS,CAAC,CAAA,CACvDD,CAAAA,CAAeW,CAAQ,CAAA,CACvBZ,CAAAA,CAAkBU,CAAAA,EAAwBA,CAAAA,CAAK,KAAA,CAAM,CAAA,CAAGA,CAAAA,CAAK,OAAA,CAAQN,CAAAA,CAAQ,KAAK,CAAC,CAAC,CACtF,CACF,CAAA,CAEC,QAAA,CAAAV,CAAAA,EAAY,UAAA,CACf,CAEJ,CACF,CAAA,CAEAH,CAAAA,CAAoB,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-CTVFJHPG.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ComponentRef } from 'react';\nimport { Button } from '../Button/Button';\nimport type { CardAccordionButtonProps } from './CardAccordionButton.props';\nimport { useCardAccordion } from './CardAccordion.context';\nimport { useCardAccordionItem } from './CardAccordionItem.context';\n\nconst COMPONENT_NAME = 'CardAccordionButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype CardAccordionButtonElement = ComponentRef<'button'>;\n\n/**\n * Use CardAccordionButton inside a CardAccordionItem to navigate between\n * steps of a CardAccordion.\n *\n * @summary A step-navigation button for a CardAccordionItem.\n */\nexport const CardAccordionButton = forwardRef<CardAccordionButtonElement, CardAccordionButtonProps>(\n ({ className, children, action, onClick, ...props }, ref) => {\n const { steps, setPreviousSteps, setCurrentStep, previousSteps } = useCardAccordion();\n const context = useCardAccordionItem();\n\n if (action === 'next') {\n return (\n <Button\n ref={ref}\n className={cn(componentClassName, className)}\n type=\"button\"\n {...props}\n variant=\"solid\"\n colorScheme=\"highlight\"\n data-action=\"next\"\n onClick={e => {\n if (onClick) {\n onClick(e);\n }\n\n setPreviousSteps((prev: Array<string>) => [...prev, context.value]);\n if (steps) {\n const currentIndex = steps.indexOf(context.value);\n if (currentIndex >= 0 && currentIndex < steps.length - 1) {\n setCurrentStep(steps[currentIndex + 1] as string);\n }\n }\n }}\n >\n {children || 'Next'}\n </Button>\n );\n }\n\n return (\n <Button\n ref={ref}\n className={cn(componentClassName, className)}\n type=\"button\"\n {...props}\n variant=\"outline\"\n colorScheme=\"functional\"\n data-action=\"previous\"\n onClick={e => {\n if (onClick) {\n onClick(e);\n }\n if (previousSteps.length > 0) {\n const lastStep = previousSteps[previousSteps.length - 1] as string;\n setCurrentStep(lastStep);\n setPreviousSteps((prev: Array<string>) => prev.slice(0, prev.indexOf(context.value)));\n }\n }}\n >\n {children || 'Previous'}\n </Button>\n );\n }\n);\n\nCardAccordionButton.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-PJCXETFD.js";import{a as t}from"./chunk-OPPG3NOC.js";import{a}from"./chunk-KGEVWEVL.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-DYMXUQM4.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as N}from"./chunk-57OFJSBQ.js";import{a as y}from"./chunk-MD3VAECH.js";import{a as g}from"./chunk-DAEIJDP7.js";import{a as c}from"./chunk-3KEOP2WO.js";import{a as
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as N}from"./chunk-57OFJSBQ.js";import{a as y}from"./chunk-MD3VAECH.js";import{a as g}from"./chunk-DAEIJDP7.js";import{a as c}from"./chunk-3KEOP2WO.js";import{a as P}from"./chunk-4MNQRAHO.js";import{a as m}from"./chunk-RXW6PYP7.js";import{a as p}from"./chunk-XVM5ECBR.js";import{a as C}from"./chunk-J3AJBV4B.js";import{b as d}from"./chunk-PDEVCIQ3.js";import{Dialog as o}from"radix-ui";import{CloseMediumIcon as z}from"@utilitywarehouse/hearth-react-icons";import{forwardRef as E}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var D="Modal",i=d(D),A=E(({className:M,image:v,forceMount:x,container:h,heading:B,description:t,hideCloseButton:f,fullScreen:I,loading:l,loadingText:r,loadingHeading:n,loadingDescription:s,children:$,...b},O)=>{let T={forceMount:x,container:h},u=!!v,w=!!(l?(r||n)&&s:t);return e(o.Portal,{...T,children:e(o.Overlay,{className:d("Overlay"),children:e("div",{className:`${i}Scroll`,children:e("div",{className:`${i}ScrollPadding`,children:a(o.Content,{ref:O,className:C(i,M),"data-contains-image":u?"":void 0,"data-hide-close-button":f?"":void 0,"data-full-screen":I?"":void 0,"data-testid":i,...w?{}:{"aria-describedby":void 0},...b,children:[e(N,{children:e(y,{type:"button",label:"Close","data-visually-hidden":f?"":void 0,className:`${i}CloseIconButton`,children:e(z,{})})}),a("div",{className:`${i}OuterContainer`,children:[l?null:a("div",{className:`${i}InnerContainer`,children:[u?e("div",{className:`${i}Image`,children:v}):null,a("div",{className:`${i}Header`,children:[e(m,{asChild:!0,children:e(o.Title,{asChild:!0,children:e(c,{size:"lg",textWrap:"wrap",children:B})})}),t?e(o.Description,{asChild:!0,children:e(p,{size:"md",as:"span",children:t})}):null]})]}),l?a(P,{direction:"column",gap:"300",alignItems:"center",paddingY:"200",width:"100%",children:[e(g,{size:"lg"}),a("div",{className:`${i}LoadingHeader`,children:[e(m,{asChild:!0,children:e(o.Title,{asChild:!0,children:e(c,{size:"lg",textAlign:"center",textWrap:"wrap",children:n||r||"Loading"})})}),(r||n)&&s?e(o.Description,{asChild:!0,children:e(p,{size:"md",as:"span",textAlign:"center",children:s})}):null]})]}):$]})]})})})})})});A.displayName=D;export{A as a};
|
|
4
|
+
//# sourceMappingURL=chunk-F2ZTXLIG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as x}from"./chunk-PPBAWDAY.js";import{a as M}from"./chunk-WYLVXCEC.js";import{a as N}from"./chunk-UDOSOH3G.js";import{a as w}from"./chunk-OPPG3NOC.js";import{a as D}from"./chunk-7X24J4CX.js";import{a as g}from"./chunk-VKE2TXPE.js";import{a as v}from"./chunk-KGEVWEVL.js";import{a as k}from"./chunk-J3AJBV4B.js";import{b}from"./chunk-PDEVCIQ3.js";import ee from"react-datepicker";import{offset as ae}from"@floating-ui/dom";import{Portal as te}from"radix-ui";import{forwardRef as oe,useState as V}from"react";import{jsx as o}from"react/jsx-runtime";var T="DatePicker",e=b(T),re=oe((E,I)=>{let{className:O,onChange:d,onCalendarOpen:l,onCalendarClose:p,validationStatus:r,validationText:c,label:H,labelVariant:R,helperText:m,id:S,disabled:f,readOnly:y,required:P,disableTodayIndicator:F,...$}=v(E,w),[A,u]=V(!1),[a,s]=V("days"),{id:Y,labelId:C,helperTextId:h,validationTextId:n}=D({providedId:S,prefix:"date-picker"}),i=!y&&!f,K={id:Y,labelId:C,helperTextId:h,validationTextId:n,label:H,labelVariant:R,helperText:m,validationText:i?c:void 0,validationStatus:i?r:void 0,required:P},L=g(m?h:void 0,i&&c!==void 0?n:void 0),W={days:"days",months:"days",years:"months"},q={days:"months",months:"years",years:"days"},B=(t,j)=>{a!=="days"&&s(W[a]),d!==void 0&&d(t,j)},G=()=>{u(!0),l&&l()},_=()=>{u(!1),s("days"),p&&p()},z={customInput:o(x,{ref:I,className:"","data-calendar-state":A?"open":"closed"}),renderCustomHeader:t=>o(M,{...t,view:a,onClick:()=>{s(q[a])},disableTodayIndicator:F})},J={"aria-labelledby":C,"aria-describedby":L,"aria-invalid":r==="invalid"?!0:void 0,"aria-errormessage":r==="invalid"?n:void 0},Q={calendarClassName:`${e}Calendar`,dayClassName:()=>`${e}Day`,weekClassName:()=>`${e}Week`,monthClassName:()=>`${e}Month`,yearClassName:()=>`${e}Year`,popperClassName:`${e}Popper`},U={required:P,disabled:f,readOnly:y,calendarStartDay:1,showIcon:!1,dateFormat:"dd/MM/yyyy",formatWeekDay:t=>t.toString().charAt(0)},X={showPopperArrow:!1,popperModifiers:[ae(-6)],popperPlacement:"bottom-start",popperProps:{strategy:"fixed"},popperContainer:te.Root},Z={...{onChange:B,onCalendarClose:_,onCalendarOpen:G},...U,...J,...X,...Q,...{showMonthYearPicker:a==="months",showYearPicker:a==="years",shouldCloseOnSelect:a==="days",closeOnScroll:!0},...z,...$};return o(N,{className:k(e,O),"data-testid":e,...K,children:o(ee,{...Z,selectsRange:!1,selectsMultiple:!1})})});re.displayName=T;export{re as a};
|
|
4
|
+
//# sourceMappingURL=chunk-FL2DCYWI.js.map
|
|
@@ -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-L3VPQN5T.js";import{a as p}from"./chunk-MD3VAECH.js";import{a as f}from"./chunk-XVM5ECBR.js";import{a as v}from"./chunk-OPPG3NOC.js";import{a as I}from"./chunk-KGEVWEVL.js";import{a as y}from"./chunk-J3AJBV4B.js";import{b as S}from"./chunk-PDEVCIQ3.js";import{forwardRef as x}from"react";import{ChevronLeftSmallIcon as T,ChevronRightSmallIcon as A,SkipFirstSmallIcon as G,SkipLastSmallIcon as R}from"@utilitywarehouse/hearth-react-icons";import{Slot as U}from"radix-ui";import{jsx as o,jsxs as c}from"react/jsx-runtime";var b="Pagination",s=S(b),m="...",M=7,_=(a,i)=>{if(i<=M)return Array.from({length:i},(r,d)=>d+1);let e=[],n=a<=4,t=a>i-4;return n?(e.push(1,2,3,4,5),e.push(m),e.push(i)):t?(e.push(1),e.push(m),e.push(i-4,i-3,i-2,i-1,i)):(e.push(1),e.push(m),e.push(a-1,a,a+1),e.push(m),e.push(i)),e},w=x((a,i)=>{let{className:e,currentPage:n,totalPages:t,onPageChange:r,condensed:d=!1,hideSkipButtons:u=!1,as:C="div",...g}=I(a,v),B=_(n,t),P=()=>{n>1&&r(n-1)},E=()=>{n<t&&r(n+1)},k=()=>{n!==1&&r(1)},L=()=>{n!==t&&r(t)};return o(U.Root,{ref:i,"aria-label":"pagination",className:y(s,e),"data-testid":s,...g,children:o(C,{children:c("div",{className:`${s}Container`,children:[c("div",{className:`${s}Controllers`,children:[!u&&o(p,{label:"Go to first page",onClick:k,disabled:n===1,children:o(G,{})}),o(p,{label:"Go to previous page",onClick:P,disabled:n===1,children:o(T,{})})]}),d?c(f,{size:"md",color:"primary",children:["Page ",n," of ",t]}):o("div",{children:o("ol",{className:`${s}Pages`,children:B.map((l,$)=>{if(l===m)return o("li",{children:o(f,{size:"md",color:"primary",className:`${s}Ellipsis`,children:m})},`ellipsis-${$}`);let h=l===n;return o("li",{children:o(N,{className:`${s}Page`,variant:"ghost",colorScheme:"functional",onClick:()=>r(l),"data-active":h?"":void 0,"aria-label":`Go to page ${l}`,"aria-current":h?"page":void 0,children:l})},l)})})}),c("div",{className:`${s}Controllers`,children:[o(p,{label:"Go to next page",onClick:E,disabled:n===t,children:o(A,{})}),!u&&o(p,{label:"Go to last page",onClick:L,disabled:n===t,children:o(R,{})})]})]})})})});w.displayName=b;export{w as a};
|
|
4
|
+
//# sourceMappingURL=chunk-FSOQCT7B.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as c}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as c}from"./chunk-PJCXETFD.js";import{a as n}from"./chunk-OPPG3NOC.js";import{a as i}from"./chunk-KGEVWEVL.js";import{a as r}from"./chunk-J3AJBV4B.js";import{b as e}from"./chunk-PDEVCIQ3.js";import{forwardRef as g}from"react";import{Accordion as E}from"radix-ui";import{jsx as m,jsxs as x}from"react/jsx-runtime";var s="Accordion",p=e(s),u=g((a,d)=>{let{className:l,type:o="multiple",heading:t,headingElement:f="h2",helperText:P,trailingContent:A,validationText:h,validationStatus:v,collapsible:C,...N}=i(a,n),R={heading:t,headingElement:f,helperText:P,trailingContent:A,validationText:h,validationStatus:v},y={type:o,...N,...o==="single"?{collapsible:C}:{}};return x("div",{ref:d,className:r(p,l),"data-testid":p,children:[t?m(c,{...R}):null,m(E.Root,{...y})]})});u.displayName=s;export{u as a};
|
|
4
|
+
//# sourceMappingURL=chunk-KNPNKYUS.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as d}from"./chunk-ZAS7UCT3.js";import{a as p}from"./chunk-JEJLX5DM.js";import{a as l}from"./chunk-DAEIJDP7.js";import{a as i}from"./chunk-KGEVWEVL.js";import{a as s}from"./chunk-J3AJBV4B.js";import{b as a}from"./chunk-PDEVCIQ3.js";import{a as m}from"./chunk-VCC5YQTQ.js";import{forwardRef as g}from"react";import{jsx as o,jsxs as v}from"react/jsx-runtime";var c="Button",t=a(c),h=g((f,u)=>{let{className:B,children:r,disabled:N,loading:e,asChild:n,...b}=i(f,d),P=e?m({asChild:n,children:r},C=>v("div",{className:`${t}Loading`,children:[o("div",{children:o(l,{size:"xs",currentColor:!0})}),o("span",{className:`${t}Hidden`,children:C})]})):r;return o(p,{ref:u,className:s(t,B),disabled:N||e,"aria-label":e?"Loading":void 0,"data-testid":t,asChild:n,...b,children:P})});h.displayName=c;export{h as a};
|
|
4
|
+
//# sourceMappingURL=chunk-L3VPQN5T.js.map
|