@utilitywarehouse/hearth-react 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-A5H4YOM6.cjs → chunk-2SARAHFU.cjs} +2 -2
- package/dist/{chunk-A5H4YOM6.cjs.map → chunk-2SARAHFU.cjs.map} +1 -1
- package/dist/{chunk-TTW4NON4.cjs → chunk-4MHZWLS2.cjs} +2 -2
- package/dist/{chunk-TTW4NON4.cjs.map → chunk-4MHZWLS2.cjs.map} +1 -1
- package/dist/chunk-5DXUL2KU.js +4 -0
- package/dist/chunk-5DXUL2KU.js.map +1 -0
- package/dist/{chunk-IPBCLSDB.cjs → chunk-5QRJL6UW.cjs} +2 -2
- package/dist/{chunk-IPBCLSDB.cjs.map → chunk-5QRJL6UW.cjs.map} +1 -1
- package/dist/{chunk-U65H447D.js → chunk-6IRARDPS.js} +2 -2
- package/dist/{chunk-YAI34QHN.cjs → chunk-6KXYZVJN.cjs} +2 -2
- package/dist/{chunk-YAI34QHN.cjs.map → chunk-6KXYZVJN.cjs.map} +1 -1
- package/dist/{chunk-2MQ6FGCP.js → chunk-7NJTXQHW.js} +2 -2
- package/dist/{chunk-VME2FDDL.cjs → chunk-7WXDYJ5U.cjs} +2 -2
- package/dist/{chunk-VME2FDDL.cjs.map → chunk-7WXDYJ5U.cjs.map} +1 -1
- package/dist/{chunk-IEKB4IRY.js → chunk-7XIK7LLA.js} +2 -2
- package/dist/{chunk-FSOQCT7B.js → chunk-CJY6YNF5.js} +2 -2
- package/dist/{chunk-YEZ6N62U.cjs → chunk-D3FV2G2K.cjs} +2 -2
- package/dist/{chunk-YEZ6N62U.cjs.map → chunk-D3FV2G2K.cjs.map} +1 -1
- package/dist/{chunk-RVXQZ4CI.cjs → chunk-DMSNZZQN.cjs} +2 -2
- package/dist/{chunk-RVXQZ4CI.cjs.map → chunk-DMSNZZQN.cjs.map} +1 -1
- package/dist/{chunk-XIAQD5M3.js → chunk-DVLDTXUF.js} +1 -1
- package/dist/chunk-DVLDTXUF.js.map +1 -0
- package/dist/{chunk-YMTA7AWP.cjs → chunk-E5YFELWJ.cjs} +2 -2
- package/dist/{chunk-YMTA7AWP.cjs.map → chunk-E5YFELWJ.cjs.map} +1 -1
- package/dist/{chunk-ORVVLS3D.cjs → chunk-E7RWLZ6B.cjs} +2 -2
- package/dist/{chunk-ORVVLS3D.cjs.map → chunk-E7RWLZ6B.cjs.map} +1 -1
- package/dist/{chunk-Q4GDPLX2.cjs → chunk-EP4MMAP6.cjs} +2 -2
- package/dist/{chunk-Q4GDPLX2.cjs.map → chunk-EP4MMAP6.cjs.map} +1 -1
- package/dist/{chunk-WAS47BSQ.js → chunk-HNEATDAD.js} +2 -2
- package/dist/{chunk-GLKPD2GP.cjs → chunk-HTOFU56R.cjs} +2 -2
- package/dist/{chunk-GLKPD2GP.cjs.map → chunk-HTOFU56R.cjs.map} +1 -1
- package/dist/{chunk-6VZAQBWM.js → chunk-I4T6DB7C.js} +2 -2
- package/dist/{chunk-XDTM63KX.js → chunk-IUDPPU6Y.js} +2 -2
- package/dist/chunk-JQCRVBOS.cjs +4 -0
- package/dist/chunk-JQCRVBOS.cjs.map +1 -0
- package/dist/chunk-JR7ICHKY.js +4 -0
- package/dist/chunk-JR7ICHKY.js.map +1 -0
- package/dist/{chunk-R6KCU4S7.cjs → chunk-JX2VGWJ3.cjs} +2 -2
- package/dist/{chunk-R6KCU4S7.cjs.map → chunk-JX2VGWJ3.cjs.map} +1 -1
- package/dist/{chunk-Y2YBHHIX.js → chunk-KIIFWAVB.js} +2 -2
- package/dist/{chunk-BXDF7Z4R.js → chunk-KQ3JAXE7.js} +2 -2
- package/dist/{chunk-L3VPQN5T.js → chunk-MPISYSSZ.js} +2 -2
- package/dist/{chunk-SQYBDCZ2.js → chunk-MW7SI5T2.js} +2 -2
- package/dist/{chunk-QVE4N4F2.js → chunk-ORELQCOQ.js} +2 -2
- package/dist/{chunk-5ZMW3NVB.cjs → chunk-PJ75GGDC.cjs} +2 -2
- package/dist/{chunk-5ZMW3NVB.cjs.map → chunk-PJ75GGDC.cjs.map} +1 -1
- package/dist/{chunk-LRFEHB5Y.js → chunk-QMEEGJCL.js} +2 -2
- package/dist/{chunk-BVXR3BGZ.cjs → chunk-RCYT6RC3.cjs} +2 -2
- package/dist/{chunk-BVXR3BGZ.cjs.map → chunk-RCYT6RC3.cjs.map} +1 -1
- package/dist/{chunk-H5WVT3CU.cjs → chunk-RF5NDA46.cjs} +2 -2
- package/dist/{chunk-H5WVT3CU.cjs.map → chunk-RF5NDA46.cjs.map} +1 -1
- package/dist/{chunk-CVKTRCKW.js → chunk-VBDGOOQY.js} +2 -2
- package/dist/{chunk-BB2SOLJS.cjs → chunk-VLUEL3DZ.cjs} +2 -2
- package/dist/{chunk-BB2SOLJS.cjs.map → chunk-VLUEL3DZ.cjs.map} +1 -1
- package/dist/{chunk-VZM5CVIO.js → chunk-W35QJTJH.js} +2 -2
- package/dist/{chunk-BDJRXINR.js → chunk-W5ILI7GF.js} +2 -2
- package/dist/{chunk-RG53XPCM.cjs → chunk-WDL4OS5J.cjs} +2 -2
- package/dist/{chunk-RG53XPCM.cjs.map → chunk-WDL4OS5J.cjs.map} +1 -1
- package/dist/{chunk-HE73I4VO.cjs → chunk-WZK6FJX2.cjs} +2 -2
- package/dist/{chunk-HE73I4VO.cjs.map → chunk-WZK6FJX2.cjs.map} +1 -1
- package/dist/chunk-X6LQNBB5.cjs +4 -0
- package/dist/chunk-X6LQNBB5.cjs.map +1 -0
- package/dist/{chunk-TWRSAJ3F.cjs → chunk-XX6G7GZM.cjs} +1 -1
- package/dist/{chunk-TWRSAJ3F.cjs.map → chunk-XX6G7GZM.cjs.map} +1 -1
- package/dist/{chunk-JCNQCBO7.cjs → chunk-Y4F4NDRZ.cjs} +2 -2
- package/dist/{chunk-JCNQCBO7.cjs.map → chunk-Y4F4NDRZ.cjs.map} +1 -1
- package/dist/{chunk-QUPHSWAC.js → chunk-YABVOAPK.js} +2 -2
- package/dist/{chunk-VVBUEPWH.js → chunk-YGXTCDT6.js} +2 -2
- package/dist/{chunk-PEG7JY2N.js → chunk-YJ4SM4XE.js} +2 -2
- package/dist/components/Breadcrumbs/BreadcrumbItem.cjs +1 -1
- package/dist/components/Breadcrumbs/BreadcrumbItem.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/CurrencyInput/CurrencyInput.cjs +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/List/ListItemButton.cjs +1 -1
- package/dist/components/List/ListItemButton.js +1 -1
- package/dist/components/List/ListItemContent.cjs +1 -1
- package/dist/components/List/ListItemContent.d.ts.map +1 -1
- package/dist/components/List/ListItemContent.js +1 -1
- package/dist/components/List/ListItemLink.cjs +1 -1
- package/dist/components/List/ListItemLink.js +1 -1
- package/dist/components/Pagination/Pagination.cjs +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressBar/ProgressBarCircular.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBarCircular.js +1 -1
- package/dist/components/ProgressBar/ProgressBarLinear.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBarLinear.js +1 -1
- package/dist/components/ProgressStepper/ProgressStepperText.cjs +4 -0
- package/dist/components/ProgressStepper/ProgressStepperText.cjs.map +1 -0
- package/dist/components/ProgressStepper/ProgressStepperText.d.ts +10 -0
- package/dist/components/ProgressStepper/ProgressStepperText.d.ts.map +1 -0
- package/dist/components/ProgressStepper/ProgressStepperText.js +4 -0
- package/dist/components/ProgressStepper/ProgressStepperText.js.map +1 -0
- package/dist/components/ProgressStepper/ProgressStepperText.props.cjs +3 -0
- package/dist/components/ProgressStepper/ProgressStepperText.props.cjs.map +1 -0
- package/dist/components/ProgressStepper/ProgressStepperText.props.d.ts +13 -0
- package/dist/components/ProgressStepper/ProgressStepperText.props.d.ts.map +1 -0
- package/dist/components/ProgressStepper/ProgressStepperText.props.js +3 -0
- package/dist/components/ProgressStepper/ProgressStepperText.props.js.map +1 -0
- package/dist/components/SearchInput/SearchInput.cjs +1 -1
- package/dist/components/SearchInput/SearchInput.js +1 -1
- package/dist/components/Table/TablePagination.cjs +1 -1
- package/dist/components/Table/TablePagination.js +1 -1
- package/dist/components/TextInput/TextInput.cjs +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/components/Toast/ToastActionButton.cjs +1 -1
- package/dist/components/Toast/ToastActionButton.d.ts +6 -0
- package/dist/components/Toast/ToastActionButton.d.ts.map +1 -1
- package/dist/components/Toast/ToastActionButton.js +1 -1
- package/dist/components/Toast/ToastActionButton.props.d.ts +7 -1
- package/dist/components/Toast/ToastActionButton.props.d.ts.map +1 -1
- package/dist/components/VerificationInput/VerificationInput.cjs +1 -1
- package/dist/components/VerificationInput/VerificationInput.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/public/llms/components/accordion.md +0 -10
- package/public/llms/components/breadcrumbs.md +0 -5
- package/public/llms/components/button.md +0 -14
- package/public/llms/components/card-accordion.md +0 -10
- package/public/llms/components/card.md +0 -11
- package/public/llms/components/checkbox-tile.md +1 -1
- package/public/llms/components/checkbox.md +1 -1
- package/public/llms/components/chip.md +1 -8
- package/public/llms/components/combobox.md +0 -8
- package/public/llms/components/description-list.md +0 -7
- package/public/llms/components/expandable-card.md +3 -12
- package/public/llms/components/highlight-banner.md +1 -1
- package/public/llms/components/icon-button.md +0 -11
- package/public/llms/components/icon-container.md +0 -9
- package/public/llms/components/inline-link.md +0 -7
- package/public/llms/components/label.md +1 -1
- package/public/llms/components/link.md +0 -8
- package/public/llms/components/list.md +0 -12
- package/public/llms/components/menu.md +0 -9
- package/public/llms/components/modal.md +0 -10
- package/public/llms/components/pagination.md +0 -11
- package/public/llms/components/progress-stepper.md +73 -5
- package/public/llms/components/radio-group.md +1 -40
- package/public/llms/components/search-input.md +0 -8
- package/public/llms/components/segmented-control.md +0 -5
- package/public/llms/components/skeleton.md +0 -8
- package/public/llms/components/table.md +0 -6
- package/public/llms/components/tabs.md +0 -10
- package/public/llms/components/text-area.md +0 -9
- package/public/llms/components/text-input.md +0 -9
- package/public/llms/components/timeline.md +1 -7
- package/public/llms/components/toast.md +0 -11
- package/public/llms/components/toggle-button-card.md +1 -9
- package/public/llms/components/toggle-button.md +0 -7
- package/public/llms/components/tooltip.md +0 -8
- package/public/llms/components/unstyled-icon-button.md +0 -8
- package/public/llms/docs/getting-started.md +1 -9
- package/public/llms/docs/migration/v0.md +0 -21
- package/styles.css +2 -2
- package/dist/chunk-4WLYFPTV.cjs +0 -4
- package/dist/chunk-4WLYFPTV.cjs.map +0 -1
- package/dist/chunk-HDCOVVAG.js +0 -4
- package/dist/chunk-HDCOVVAG.js.map +0 -1
- package/dist/chunk-XIAQD5M3.js.map +0 -1
- /package/dist/{chunk-U65H447D.js.map → chunk-6IRARDPS.js.map} +0 -0
- /package/dist/{chunk-2MQ6FGCP.js.map → chunk-7NJTXQHW.js.map} +0 -0
- /package/dist/{chunk-IEKB4IRY.js.map → chunk-7XIK7LLA.js.map} +0 -0
- /package/dist/{chunk-FSOQCT7B.js.map → chunk-CJY6YNF5.js.map} +0 -0
- /package/dist/{chunk-WAS47BSQ.js.map → chunk-HNEATDAD.js.map} +0 -0
- /package/dist/{chunk-6VZAQBWM.js.map → chunk-I4T6DB7C.js.map} +0 -0
- /package/dist/{chunk-XDTM63KX.js.map → chunk-IUDPPU6Y.js.map} +0 -0
- /package/dist/{chunk-Y2YBHHIX.js.map → chunk-KIIFWAVB.js.map} +0 -0
- /package/dist/{chunk-BXDF7Z4R.js.map → chunk-KQ3JAXE7.js.map} +0 -0
- /package/dist/{chunk-L3VPQN5T.js.map → chunk-MPISYSSZ.js.map} +0 -0
- /package/dist/{chunk-SQYBDCZ2.js.map → chunk-MW7SI5T2.js.map} +0 -0
- /package/dist/{chunk-QVE4N4F2.js.map → chunk-ORELQCOQ.js.map} +0 -0
- /package/dist/{chunk-LRFEHB5Y.js.map → chunk-QMEEGJCL.js.map} +0 -0
- /package/dist/{chunk-CVKTRCKW.js.map → chunk-VBDGOOQY.js.map} +0 -0
- /package/dist/{chunk-VZM5CVIO.js.map → chunk-W35QJTJH.js.map} +0 -0
- /package/dist/{chunk-BDJRXINR.js.map → chunk-W5ILI7GF.js.map} +0 -0
- /package/dist/{chunk-QUPHSWAC.js.map → chunk-YABVOAPK.js.map} +0 -0
- /package/dist/{chunk-VVBUEPWH.js.map → chunk-YGXTCDT6.js.map} +0 -0
- /package/dist/{chunk-PEG7JY2N.js.map → chunk-YJ4SM4XE.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
|
-
var _chunkBTRH4U6Lcjs = require('./chunk-BTRH4U6L.cjs');var
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunkBTRH4U6Lcjs = require('./chunk-BTRH4U6L.cjs');var _chunkHHKQ3ZBDcjs = require('./chunk-HHKQ3ZBD.cjs');var _chunkHMT3R4UWcjs = require('./chunk-HMT3R4UW.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _chunk5XQBCR7Qcjs = require('./chunk-5XQBCR7Q.cjs');var _chunkZSLWPF2Ucjs = require('./chunk-ZSLWPF2U.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var d="IconButton",f=_chunk4Q432K4Wcjs.b.call(void 0, d),z= exports.a =_react.forwardRef.call(void 0, (o,u)=>{let{className:P,label:N,disabled:S,loading:t,children:n,asChild:r,...b}=_chunkZPJNQBTNcjs.a.call(void 0, o,_chunkBTRH4U6Lcjs.a),C=_chunk5XQBCR7Qcjs.a.call(void 0, o.size||"md",{md:"sm",sm:"xs"}),I=t?_chunkZSLWPF2Ucjs.a.call(void 0, {asChild:r,children:n},()=>_jsxruntime.jsx.call(void 0, _chunkHHKQ3ZBDcjs.a,{size:C,currentColor:!0})):n;return _jsxruntime.jsx.call(void 0, _chunkHMT3R4UWcjs.a,{ref:u,className:_chunkONNSZMWFcjs.a.call(void 0, f,P),"aria-label":N,disabled:S||t,"data-testid":f,asChild:r,...b,children:I})});z.displayName=d;exports.a = z;
|
|
4
|
+
//# sourceMappingURL=chunk-2SARAHFU.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-2SARAHFU.cjs","../src/components/IconButton/IconButton.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","IconButton","forwardRef","props","ref","className","label","disabled","loading","children","asChild","iconButtonProps","extractProps","iconButtonPropDefs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CAAA,CAEDf,CAAAA,CAAW,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-2SARAHFU.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport { iconButtonPropDefs } from './IconButton.props';\nimport type { IconButtonProps } from './IconButton.props';\nimport { ButtonBase, ButtonBaseElement } from '../ButtonBase/ButtonBase';\nimport { extractProps } from '../../helpers/extract-props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Spinner } from '../Spinner/Spinner';\nimport type { SpinnerProps } from '../Spinner/Spinner.props';\nimport { getSubtree } from '../../helpers/get-subtree';\nimport { getResponsiveTranslation } from '../../helpers/get-responsive-translation';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'IconButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\n/**\n * Use IconButton to trigger an action using a single icon, when space is\n * limited or an action needs to be shown quickly and visually. Since it has\n * no visible text, a `label` prop is required to provide an accessible name.\n *\n * @summary A button that triggers an action using a single icon, with no visible text.\n */\nexport const IconButton = forwardRef<ButtonBaseElement, IconButtonProps>((props, ref) => {\n const { className, label, disabled, loading, children, asChild, ...iconButtonProps } =\n extractProps(props, iconButtonPropDefs);\n\n const spinnerSize = getResponsiveTranslation(props.size || 'md', { md: 'sm', sm: 'xs' });\n const content = loading\n ? getSubtree({ asChild, children }, () => (\n <Spinner size={spinnerSize as SpinnerProps['size']} currentColor />\n ))\n : children;\n\n return (\n <ButtonBase\n ref={ref}\n className={cn(componentClassName, className)}\n aria-label={label}\n disabled={disabled || loading}\n data-testid={componentClassName}\n asChild={asChild}\n {...iconButtonProps}\n >\n {content}\n </ButtonBase>\n );\n});\n\nIconButton.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 _chunkZ6OA4XPPcjs = require('./chunk-Z6OA4XPP.cjs');var _chunkB2HYSLUXcjs = require('./chunk-B2HYSLUX.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkHIF6HKZ3cjs = require('./chunk-HIF6HKZ3.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 v="TextInput",y=_chunk4Q432K4Wcjs.b.call(void 0, v),k= exports.a =_react.forwardRef.call(void 0, (P,N)=>{let{className:B,validationStatus:i,validationText:d,label:F,labelVariant:E,helperText:r,children:O,id:g,disabled:e,readOnly:n,hideLabel:w,required:o,placeholder:C,"aria-describedby":D,...V}=_chunkZPJNQBTNcjs.a.call(void 0, P,_chunkOB7O3UFLcjs.a),{id:l,labelId:s,helperTextId:p,validationTextId:a}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:g,prefix:"text-input"}),t=!n&&!e,q={id:l,labelId:s,helperTextId:p,validationTextId:a,label:F,labelVariant:E,helperText:r,validationText:t?d:void 0,validationStatus:t?i:void 0,hideLabel:w,required:o},M=_chunkHIF6HKZ3cjs.a.call(void 0, D,r?p:void 0,t&&d!==void 0?a:void 0);return _jsxruntime.jsx.call(void 0, _chunkZ6OA4XPPcjs.a,{className:_chunkONNSZMWFcjs.a.call(void 0, y,B),"data-disabled":e?"":void 0,"data-testid":y,...q,children:_jsxruntime.jsx.call(void 0, _chunkB2HYSLUXcjs.a,{ref:N,spellCheck:"false",id:l,required:o,disabled:e,readOnly:n,placeholder:e?void 0:C,"aria-labelledby":s,"aria-describedby":M,"aria-invalid":i==="invalid"?!0:void 0,"aria-errormessage":i==="invalid"?a:void 0,...V,children:O})})});k.displayName=v;exports.a = k;
|
|
4
|
+
//# sourceMappingURL=chunk-4MHZWLS2.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-4MHZWLS2.cjs","../src/components/TextInput/TextInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","TextInput","forwardRef","props","ref","className","validationStatus","validationText","label","labelVariant","helperText","children","providedId","disabled","readOnly","hideLabel","required","placeholder","ariaDescribedby","textInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","jsx","FormField","cn","InputBase"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCS5S,+CAkErB,IAhEAA,CAAAA,CAAiB,WAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAU7CC,CAAAA,aAAYC,+BAAAA,CAA8CC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACpF,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,kBAAA,CAAoBC,CAAAA,CACpB,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAajB,CAAOkB,mBAAc,CAAA,CAEhC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAA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AAA,CAAiBM,CAAAA,CACjB,kBAAA,CAAkBM,CAAAA,CAClB,cAAA,CAAcvB,CAAAA,GAAqB,SAAA,CAAY,CAAA,CAAA,CAAO,KAAA,CAAA,CACtD,mBAAA,CAAmBA,CAAAA,GAAqB,SAAA,CAAYmB,CAAAA,CAAmB,KAAA,CAAA,CACtE,GAAGN,CAAAA,CAEH,QAAA,CAAAR,CAAAA,CACH,CAAA,CACF,CAEJ,CAAC,CAAA,CAEDV,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-4MHZWLS2.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { TextInputProps } from './TextInput.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { cn } from '../../helpers/cn';\nimport { useIds } from '../../hooks/use-ids';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { InputBase, type InputBaseElement } from '../InputBase/InputBase';\nimport { FormField } from '../FormField/FormField';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'TextInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\n/**\n * Use TextInput for a single-line text or data entry field. For passwords,\n * search, currency, one-time passcodes, or dates, use PasswordInput,\n * SearchInput, CurrencyInput, VerificationInput, or DateInput instead. A\n * `label` is required and should be clear and descriptive to guide the user.\n *\n * @summary A single-line text input field for entering text and data.\n */\nexport const TextInput = forwardRef<InputBaseElement, TextInputProps>((props, ref) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n children,\n id: providedId,\n disabled,\n readOnly,\n hideLabel,\n required,\n placeholder,\n 'aria-describedby': ariaDescribedby,\n ...textInputProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'text-input',\n });\n\n const showValidation = Boolean(!readOnly && !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 hideLabel,\n required,\n };\n\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby,\n !!helperText ? helperTextId : undefined,\n showValidation && validationText !== undefined ? validationTextId : undefined\n );\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <InputBase\n ref={ref}\n spellCheck=\"false\"\n id={id}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={!disabled ? placeholder : undefined}\n aria-labelledby={labelId}\n aria-describedby={ariaDescribedbyValue}\n aria-invalid={validationStatus === 'invalid' ? true : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n {...textInputProps}\n >\n {children}\n </InputBase>\n </FormField>\n );\n});\n\nTextInput.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import{a}from"./chunk-JWPVXXER.js";import{a as l}from"./chunk-4MNQRAHO.js";import{a as f}from"./chunk-XVM5ECBR.js";import{a as s}from"./chunk-J3AJBV4B.js";import{b as p}from"./chunk-PDEVCIQ3.js";import{forwardRef as x}from"react";import{Fragment as u,jsx as t,jsxs as e}from"react/jsx-runtime";var C="ListItemContent",o=p(C),y=x(({heading:c,leadingContent:m,trailingContent:n,helperText:r,className:d,badge:v,badgePlacement:N="bottom",children:i,...I},L)=>t("div",{ref:L,className:s(o,d),...I,children:i||e(u,{children:[m||null,e(l,{direction:N==="top"?"column-reverse":"column",className:`${o}MainContent`,children:[e("div",{children:[t(f,{size:"lg",children:c}),r?t(a,{children:r}):null]}),v]}),t("div",{className:`${o}TrailingContent`,children:n||null})]})}));y.displayName=C;export{y as a};
|
|
4
|
+
//# sourceMappingURL=chunk-5DXUL2KU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/List/ListItemContent.tsx"],"sourcesContent":["import { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ListItemContentProps } from './ListItemContent.props';\nimport { cn } from '../../helpers/cn';\nimport { BodyText } from '../BodyText/BodyText';\nimport type { ComponentRef } from 'react';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'ListItemContent';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ListItemContentElement = ComponentRef<'div'>;\n\n/**\n * Use ListItemContent to lay out the heading, helper text, leading/trailing\n * content, and badge of a single item within a `List`. `ListItemLink` and\n * `ListItemButton` build on top of it for interactive list items.\n *\n * @summary Lays out the content of a single List item.\n */\nexport const ListItemContent = forwardRef<ListItemContentElement, ListItemContentProps>(\n (\n {\n heading,\n leadingContent,\n trailingContent,\n helperText,\n className,\n badge,\n badgePlacement = 'bottom',\n children,\n ...props\n },\n ref\n ) => {\n return (\n <div ref={ref} className={cn(componentClassName, className)} {...props}>\n {children ? (\n children\n ) : (\n <>\n {leadingContent ? leadingContent : null}\n <Flex\n direction={badgePlacement === 'top' ? 'column-reverse' : 'column'}\n className={`${componentClassName}MainContent`}\n >\n <div>\n <BodyText size=\"lg\">{heading}</BodyText>\n {helperText ? <HelperText>{helperText}</HelperText> : null}\n </div>\n {badge}\n </Flex>\n <div className={`${componentClassName}TrailingContent`}>\n {trailingContent ? trailingContent : null}\n </div>\n </>\n )}\n </div>\n );\n }\n);\n\nListItemContent.displayName = COMPONENT_NAME;\n"],"mappings":";;mMAOA,OAAS,cAAAA,MAAkB,QAkCjB,mBAAAC,EAOM,OAAAC,EADF,QAAAC,MANJ,oBAhCV,IAAMC,EAAiB,kBACjBC,EAAqBC,EAAiBF,CAAc,EAW7CG,EAAkBP,EAC7B,CACE,CACE,QAAAQ,EACA,eAAAC,EACA,gBAAAC,EACA,WAAAC,EACA,UAAAC,EACA,MAAAC,EACA,eAAAC,EAAiB,SACjB,SAAAC,EACA,GAAGC,CACL,EACAC,IAGEf,EAAC,OAAI,IAAKe,EAAK,UAAWC,EAAGb,EAAoBO,CAAS,EAAI,GAAGI,EAC9D,SAAAD,GAGCZ,EAAAF,EAAA,CACG,UAAAQ,GAAkC,KACnCN,EAACgB,EAAA,CACC,UAAWL,IAAmB,MAAQ,iBAAmB,SACzD,UAAW,GAAGT,CAAkB,cAEhC,UAAAF,EAAC,OACC,UAAAD,EAACkB,EAAA,CAAS,KAAK,KAAM,SAAAZ,EAAQ,EAC5BG,EAAaT,EAACmB,EAAA,CAAY,SAAAV,EAAW,EAAgB,MACxD,EACCE,GACH,EACAX,EAAC,OAAI,UAAW,GAAGG,CAAkB,kBAClC,SAAAK,GAAoC,KACvC,GACF,EAEJ,CAGN,EAEAH,EAAgB,YAAcH","names":["forwardRef","Fragment","jsx","jsxs","COMPONENT_NAME","componentClassName","withGlobalPrefix","ListItemContent","heading","leadingContent","trailingContent","helperText","className","badge","badgePlacement","children","props","ref","cn","Flex","BodyText","HelperText"]}
|
|
@@ -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 _chunkX2RF6SG2cjs = require('./chunk-X2RF6SG2.cjs');var _chunk3ESB267Xcjs = require('./chunk-3ESB267X.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var l="ProgressBarCircular",r=_chunk4Q432K4Wcjs.b.call(void 0, l),d= exports.a =_react.forwardRef.call(void 0, ({value:i,label:m,labelId:n,valueText:c,...p},g)=>_jsxruntime.jsxs.call(void 0, "div",{ref:g,className:r,...p,style:{"--h-value":`${i}`},children:[_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[_jsxruntime.jsx.call(void 0, "circle",{className:`${r}Track`}),_jsxruntime.jsx.call(void 0, "circle",{className:`${r}Indicator`})]}),_jsxruntime.jsxs.call(void 0, "div",{className:`${r}Content`,children:[_jsxruntime.jsx.call(void 0, _chunk3ESB267Xcjs.a,{children:c}),_jsxruntime.jsx.call(void 0, _chunkX2RF6SG2cjs.a,{id:n,children:m})]})]}));d.displayName=l;exports.a = d;
|
|
4
|
+
//# sourceMappingURL=chunk-5QRJL6UW.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-5QRJL6UW.cjs","../src/components/ProgressBar/ProgressBarCircular.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","ProgressBarCircular","forwardRef","value","label","labelId","valueText","props","ref","jsxs"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,8BCF/F,+CAsBnB,IAfFA,CAAAA,CAAiB,qBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAU7CC,CAAAA,aAAsBC,+BAAAA,CAChC,CAAE,KAAA,CAAAC,CAAAA,CAAO,KAAA,CAAAC,CAAAA,CAAO,OAAA,CAAAC,CAAAA,CAAS,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAE7CC,8BAAAA,KAAC,CAAA,CAAI,GAAA,CAAKD,CAAAA,CAAK,SAAA,CAAWT,CAAAA,CAAqB,GAAGQ,CAAAA,CAAO,KAAA,CAAO,CAAE,WAAA,CAAa,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-5QRJL6UW.cjs","sourcesContent":[null,"import { forwardRef } from 'react';\nimport type { ProgressBarInternalProps } from './ProgressBar.props';\nimport { ProgressBarLabel } from './ProgressBarLabel';\nimport { ProgressBarValueText } from './ProgressBarValueText';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ComponentRef } from 'react';\n\nconst COMPONENT_NAME = 'ProgressBarCircular';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ProgressBarCircularElement = ComponentRef<'div'>;\n\ndeclare module 'react' {\n interface CSSProperties {\n '--h-value'?: string;\n }\n}\n\nexport const ProgressBarCircular = forwardRef<ProgressBarCircularElement, ProgressBarInternalProps>(\n ({ value, label, labelId, valueText, ...props }, ref) => {\n return (\n <div ref={ref} className={componentClassName} {...props} style={{ '--h-value': `${value}` }}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" role=\"img\" aria-hidden=\"true\">\n <circle className={`${componentClassName}Track`} />\n <circle className={`${componentClassName}Indicator`} />\n </svg>\n <div className={`${componentClassName}Content`}>\n <ProgressBarValueText>{valueText}</ProgressBarValueText>\n <ProgressBarLabel id={labelId}>{label}</ProgressBarLabel>\n </div>\n </div>\n );\n }\n);\n\nProgressBarCircular.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 g}from"./chunk-2WWK2BTL.js";import{a as B}from"./chunk-W35QJTJH.js";import{a as v}from"./chunk-YABVOAPK.js";import{a as u}from"./chunk-OPPG3NOC.js";import{a as P}from"./chunk-7X24J4CX.js";import{a as d}from"./chunk-32MOX6DL.js";import{a as f}from"./chunk-KGEVWEVL.js";import{a as n}from"./chunk-J3AJBV4B.js";import{b as c}from"./chunk-PDEVCIQ3.js";import{forwardRef as R}from"react";import{jsx as b,jsxs as I}from"react/jsx-runtime";var N="ProgressBar",x=c(N),D=R((h,y)=>{let{className:C,variant:o="linear",colorScheme:s="default",value:T,min:e=0,max:r=100,label:E,formatValueText:t,"aria-valuetext":M,hideLabel:V,...w}=f(h,g,u),{labelId:l}=P({prefix:"progress"}),a=s==="success"?r:Math.max(e,Math.min(T,r)),m=d(a,e,r),i=t?t(a):`${m}%`,p={value:m,label:E,valueText:i,labelId:l,hideLabel:V};return I("div",{ref:y,className:n(x,C),role:"progressbar","aria-valuenow":a,"aria-valuemin":e,"aria-valuemax":r,"aria-valuetext":M||i,"aria-labelledby":l,"data-colorscheme":s,"data-testid":x,...w,children:[o==="linear"?b(v,{...p}):null,o==="circular"?b(B,{...p}):null]})});D.displayName=N;export{D as a};
|
|
4
|
+
//# sourceMappingURL=chunk-6IRARDPS.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 _chunkZ6OA4XPPcjs = require('./chunk-Z6OA4XPP.cjs');var _chunkB2HYSLUXcjs = require('./chunk-B2HYSLUX.cjs');var _chunkOB7O3UFLcjs = require('./chunk-OB7O3UFL.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkHIF6HKZ3cjs = require('./chunk-HIF6HKZ3.cjs');var _chunkZPJNQBTNcjs = require('./chunk-ZPJNQBTN.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _radixui = require('radix-ui');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var T="VerificationInput",n=_chunk4Q432K4Wcjs.b.call(void 0, T),A= exports.a =_react.forwardRef.call(void 0, (N,O)=>{let{className:V,disabled:a,readOnly:d,label:x,labelVariant:F,helperText:s,validationText:l,validationStatus:e,required:R,id:w,"aria-describedby":h,...E}=_chunkZPJNQBTNcjs.a.call(void 0, N,_chunkOB7O3UFLcjs.a),{id:S,labelId:m,helperTextId:p,validationTextId:r}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:w,prefix:"verification-input"}),i=!d&&!a,C={id:S,labelId:m,helperTextId:p,validationTextId:r,label:x,labelVariant:F,helperText:s,validationText:i?l:void 0,validationStatus:i?e:void 0,required:R},D=_chunkHIF6HKZ3cjs.a.call(void 0, h,s?p:void 0,i&&l!==void 0?r:void 0);return _jsxruntime.jsx.call(void 0, _chunkZ6OA4XPPcjs.a,{className:_chunkONNSZMWFcjs.a.call(void 0, n,V),"data-disabled":a?"":void 0,"data-testid":n,...C,children:_jsxruntime.jsxs.call(void 0, _radixui.unstable_OneTimePasswordField.Root,{className:`${n}Root`,disabled:a,readOnly:d,"aria-labelledby":m,"aria-describedby":D,"aria-invalid":e==="invalid"?!0:void 0,"aria-errormessage":e==="invalid"?r:void 0,"data-validation-status":i?e:void 0,...E,children:[Array.from({length:6}).map((B,_)=>_jsxruntime.jsx.call(void 0, _radixui.unstable_OneTimePasswordField.Input,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkB2HYSLUXcjs.a,{})},_)),_jsxruntime.jsx.call(void 0, _radixui.unstable_OneTimePasswordField.HiddenInput,{ref:O})]})})});A.displayName=T;exports.a = A;
|
|
4
|
+
//# sourceMappingURL=chunk-6KXYZVJN.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-6KXYZVJN.cjs","../src/components/VerificationInput/VerificationInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","VerificationInput","forwardRef","props","ref","className","disabled","readOnly","label","labelVariant","helperText","validationText","validationStatus","required","providedId","ariaDescribedby","verificationInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","jsx","FormField","cn","jsxs","OneTimePasswordFieldPrimitive"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,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Z,CACEL,CAAAA,CAAaW,CAAAA,CAAe,KAAA,CAAA,CAC9BG,CAAAA,EAAkBb,CAAAA,GAAmB,KAAA,CAAA,CAAYW,CAAAA,CAAmB,KAAA,CACtE,CAAA,CAIA,OACEM,6BAAAA,mBAACC,CAAA,CACC,SAAA,CAAWC,iCAAAA,CAAG/B,CAAoBM,CAAS,CAAA,CAC3C,eAAA,CAAeC,CAAAA,CAAW,EAAA,CAAK,KAAA,CAAA,CAC/B,aAAA,CAAaP,CAAAA,CACZ,GAAG0B,CAAAA,CAEJ,QAAA,CAAAM,8BAAAA,sCAACC,CAA8B,IAAA,CAA9B,CACC,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-6KXYZVJN.cjs","sourcesContent":[null,"'use client';\n\nimport { unstable_OneTimePasswordField as OneTimePasswordFieldPrimitive } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { VerificationInputProps } from './VerificationInput.props';\nimport { FormField } from '../FormField/FormField';\nimport { useIds } from '../../hooks/use-ids';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { InputBase } from '../InputBase/InputBase';\nimport { cn } from '../../helpers/cn';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\n\nconst COMPONENT_NAME = 'VerificationInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport type VerificationInputElement = ComponentRef<'input'>;\n\n/**\n * Use VerificationInput to let users enter a one-time password (OTP) sent via\n * SMS, email, or an authenticator app. For general text entry, use TextInput;\n * for passwords, use PasswordInput instead. A `label` is required.\n *\n * @summary An input for entering a one-time password (OTP).\n */\nexport const VerificationInput = forwardRef<VerificationInputElement, VerificationInputProps>(\n (props, ref) => {\n const {\n className,\n disabled,\n readOnly,\n label,\n labelVariant,\n helperText,\n validationText,\n validationStatus,\n required,\n id: providedId,\n 'aria-describedby': ariaDescribedby,\n ...verificationInputProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'verification-input',\n });\n\n const showValidation = Boolean(!readOnly && !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 };\n\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby,\n !!helperText ? helperTextId : undefined,\n showValidation && validationText !== undefined ? validationTextId : undefined\n );\n\n const PASSWORD_LENGTH = 6;\n\n return (\n <FormField\n className={cn(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n data-testid={componentClassName}\n {...formFieldProps}\n >\n <OneTimePasswordFieldPrimitive.Root\n className={`${componentClassName}Root`}\n disabled={disabled}\n readOnly={readOnly}\n aria-labelledby={labelId}\n aria-describedby={ariaDescribedbyValue}\n aria-invalid={validationStatus === 'invalid' ? true : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n data-validation-status={showValidation ? validationStatus : undefined}\n {...verificationInputProps}\n >\n {Array.from({ length: PASSWORD_LENGTH }).map((_, i) => (\n <OneTimePasswordFieldPrimitive.Input key={i} asChild>\n <InputBase />\n </OneTimePasswordFieldPrimitive.Input>\n ))}\n\n <OneTimePasswordFieldPrimitive.HiddenInput ref={ref} />\n </OneTimePasswordFieldPrimitive.Root>\n </FormField>\n );\n }\n);\n\nVerificationInput.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as T}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as T}from"./chunk-QMEEGJCL.js";import{a as x}from"./chunk-AATRPKYT.js";import{a as M}from"./chunk-TJHI42VN.js";import{a as E}from"./chunk-J3AJBV4B.js";import{b as v}from"./chunk-PDEVCIQ3.js";import{forwardRef as A,useState as _,useRef as P,useEffect as k}from"react";import{useMergedRefs as q}from"@base-ui/utils/useMergedRefs";import{jsx as p}from"react/jsx-runtime";var D="CurrencyInput",B=v(D),F=A(({className:R,disabled:w,value:m,onChange:f,placeholder:N="0.00",disableGroupSeparators:g,defaultValue:d,...S},V)=>{let[b,H]=_(typeof d=="string"?d:""),r=P(null),n=P(null),L=q(V,r),h=m!==void 0,C=h?String(m??""):b,l=t=>{if(!t)return"";let o=t.split("."),e=o[0]||"";g||(e=e.replace(/\B(?=(\d{3})+(?!\d))/g,","));let s=o[1];return s!==void 0?e+"."+s:e},z=t=>{let o=t.target.value,e=t.target.selectionStart||0,s=l(C),I=o.replace(/[^\d.]/g,""),c=I.split("."),y=c.length>2?c[0]+"."+c.slice(1).join(""):I,u=y.split("."),i=u[1]!==void 0?u[0]+"."+u[1].substring(0,2):y;if(g)n.current=null;else{let a=l(i),O=(s.slice(0,Math.min(e,s.length)).match(/,/g)||[]).length,j=(a.slice(0,Math.min(e,a.length)).match(/,/g)||[]).length-O;n.current=e+j}if(h||H(i),f){let a={...t,target:{...t.target,value:i},currentTarget:{...t.currentTarget,value:i}};f(a)}};return k(()=>{r&&typeof r=="object"&&r.current&&n.current!==null&&(r.current.setSelectionRange(n.current,n.current),n.current=null)}),p(T,{ref:L,className:E(B,R),type:"text",inputMode:"decimal",disabled:w,value:l(C),onChange:z,placeholder:N,"data-testid":B,...S,children:p(M,{placement:"prefix",children:p(x,{size:"3xl",children:"\xA3"})})})});F.displayName=D;export{F as a};
|
|
4
|
+
//# sourceMappingURL=chunk-7NJTXQHW.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 _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkN4PBDFEJcjs = require('./chunk-N4PBDFEJ.cjs');var _chunkIAFYIHVPcjs = require('./chunk-IAFYIHVP.cjs');var _chunkZ6OA4XPPcjs = require('./chunk-Z6OA4XPP.cjs');var _chunkB2HYSLUXcjs = require('./chunk-B2HYSLUX.cjs');var _chunkY4KCRRDDcjs = require('./chunk-Y4KCRRDD.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-7WXDYJ5U.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,i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CAAS,OAAA,CAAO,CAAA,CAAA,CACnC,QAAA,CAAAN,6BAAAA,mBAACO,CAAA,CAAmB,IAAA,CAAK,QAAA,CAAS,KAAA,CAAM,iBAAA,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-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-7WXDYJ5U.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,wDAAmC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,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,cAA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ACU,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-7WXDYJ5U.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 client";
|
|
2
2
|
|
|
3
|
-
import{a as l}from"./chunk-
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as l}from"./chunk-ORELQCOQ.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-7XIK7LLA.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import{a as
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
import{a as p}from"./chunk-MD3VAECH.js";import{a as N}from"./chunk-MPISYSSZ.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-CJY6YNF5.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 _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkVLUEL3DZcjs = require('./chunk-VLUEL3DZ.cjs');var _chunkDLU27EEOcjs = require('./chunk-DLU27EEO.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 _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var b="Pagination",s=_chunk4Q432K4Wcjs.b.call(void 0, 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= exports.a =_react.forwardRef.call(void 0, (a,i)=>{let{className:e,currentPage:n,totalPages:t,onPageChange:r,condensed:d=!1,hideSkipButtons:u=!1,as:C="div",...g}=_chunkZPJNQBTNcjs.a.call(void 0, a,_chunkOB7O3UFLcjs.a),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 _jsxruntime.jsx.call(void 0, _radixui.Slot.Root,{ref:i,"aria-label":"pagination",className:_chunkONNSZMWFcjs.a.call(void 0, s,e),"data-testid":s,...g,children:_jsxruntime.jsx.call(void 0, C,{children:_jsxruntime.jsxs.call(void 0, "div",{className:`${s}Container`,children:[_jsxruntime.jsxs.call(void 0, "div",{className:`${s}Controllers`,children:[!u&&_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"Go to first page",onClick:k,disabled:n===1,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SkipFirstSmallIcon,{})}),_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"Go to previous page",onClick:P,disabled:n===1,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronLeftSmallIcon,{})})]}),d?_jsxruntime.jsxs.call(void 0, _chunkDLU27EEOcjs.a,{size:"md",color:"primary",children:["Page ",n," of ",t]}):_jsxruntime.jsx.call(void 0, "div",{children:_jsxruntime.jsx.call(void 0, "ol",{className:`${s}Pages`,children:B.map((l,$)=>{if(l===m)return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, _chunkDLU27EEOcjs.a,{size:"md",color:"primary",className:`${s}Ellipsis`,children:m})},`ellipsis-${$}`);let h=l===n;return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, _chunkVLUEL3DZcjs.a,{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)})})}),_jsxruntime.jsxs.call(void 0, "div",{className:`${s}Controllers`,children:[_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"Go to next page",onClick:E,disabled:n===t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronRightSmallIcon,{})}),!u&&_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{label:"Go to last page",onClick:L,disabled:n===t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SkipLastSmallIcon,{})})]})]})})})});w.displayName=b;exports.a = w;
|
|
4
|
+
//# sourceMappingURL=chunk-D3FV2G2K.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-D3FV2G2K.cjs","../src/components/Pagination/Pagination.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","ELLIPSIS","MAX_VISIBLE_ITEMS","generatePageNumbers","currentPage","totalPages","_","i","pages","isNearStart","isNearEnd","Pagination","forwardRef","props","ref","className","onPageChange","condensed","hideSkipButtons","Tag","paginationProps","extractProps","marginPropDefs","handlePrevious","handleNext","handleFirst","handleLast","jsx","Slot","cn","jsxs"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCAnQ,wEAOpB,mCAQc,+CA8GX,IA3GJA,CAAAA,CAAiB,YAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAIpDC,CAAAA,CAAW,KAAA,CACXC,CAAAA,CAAoB,CAAA,CAMpBC,CAAAA,CAAsB,CAC1BC,CAAAA,CACAC,CAAAA,CAAAA,EACoC,CAEpC,EAAA,CAAIA,CAAAA,EAAcH,CAAAA,CAChB,OAAO,KAAA,CAAM,IAAA,CAAK,CAAE,MAAA,CAAQG,CAAW,CAAA,CAAG,CAACC,CAAAA,CAAGC,CAAAA,CAAAA,EAAMA,CAAAA,CAAI,CAAC,CAAA,CAG3D,IAAMC,CAAAA,CAAyC,CAAC,CAAA,CAG1CC,CAAAA,CAAcL,CAAAA,EAAe,CAAA,CAC7BM,CAAAA,CAAYN,CAAAA,CAAcC,CAA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AAoBC,CAAAA,CAAaC,CAAU,CAAA,CAEnDkB,CAAAA,CAAiB,CAAA,CAAA,EAAM,CACvBnB,CAAAA,CAAc,CAAA,EAChBY,CAAAA,CAAaZ,CAAAA,CAAc,CAAC,CAEhC,CAAA,CAEMoB,CAAAA,CAAa,CAAA,CAAA,EAAM,CACnBpB,CAAAA,CAAcC,CAAAA,EAChBW,CAAAA,CAAaZ,CAAAA,CAAc,CAAC,CAEhC,CAAA,CAEMqB,CAAAA,CAAc,CAAA,CAAA,EAAM,CACpBrB,CAAAA,GAAgB,CAAA,EAClBY,CAAAA,CAAa,CAAC,CAElB,CAAA,CAEMU,CAAAA,CAAa,CAAA,CAAA,EAAM,CACnBtB,CAAAA,GAAgBC,CAAAA,EAClBW,CAAAA,CAAaX,CAAU,CAE3B,CAAA,CAEA,OACEsB,6BAAAA,aAACC,CAAK,IAAA,CAAL,CACC,GAAA,CAAKd,CAAAA,CACL,YAAA,CAAW,YAAA,CACX,SAAA,CAAWe,iCAAAA,CAAG9B,CAAoBgB,CAAS,CAAA,CAC3C,aAAA,CAAahB,CAAAA,CACZ,GAAGqB,CAAAA,CAEJ,QAAA,CAAAO,6BAAAA,CAACR,CAAA,CACC,QAAA,CAAAW,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-D3FV2G2K.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport {\n ChevronLeftSmallIcon,\n ChevronRightSmallIcon,\n SkipFirstSmallIcon,\n SkipLastSmallIcon,\n} from '@utilitywarehouse/hearth-react-icons';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { Button } from '../Button/Button';\nimport { BodyText } from '../BodyText/BodyText';\nimport type { PaginationProps } from './Pagination.props';\nimport { Slot } from 'radix-ui';\nimport type { ComponentRef } from 'react';\n\nconst COMPONENT_NAME = 'Pagination';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype PaginationElement = ComponentRef<'div'>;\n\nconst ELLIPSIS = '...';\nconst MAX_VISIBLE_ITEMS = 7;\n\n/**\n * Generates the array of page numbers and ellipsis to display\n * Max visible items is 7 (including ellipses)\n */\nconst generatePageNumbers = (\n currentPage: number,\n totalPages: number\n): Array<number | typeof ELLIPSIS> => {\n // If total pages fit within max visible items, show all\n if (totalPages <= MAX_VISIBLE_ITEMS) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages: Array<number | typeof ELLIPSIS> = [];\n\n // Determine if current page is close to start or end\n const isNearStart = currentPage <= 4;\n const isNearEnd = currentPage > totalPages - 4;\n\n if (isNearStart) {\n // Page 1-4 selected: 1, 2, 3, 4, 5, ..., last\n pages.push(1, 2, 3, 4, 5);\n pages.push(ELLIPSIS);\n pages.push(totalPages);\n } else if (isNearEnd) {\n // Page (totalPages-4) to totalPages selected: 1, ..., last-4, last-3, last-2, last-1, last\n pages.push(1);\n pages.push(ELLIPSIS);\n pages.push(totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1, totalPages);\n } else {\n // Middle pages: 1, ..., current-1, current, current+1, ..., last\n pages.push(1);\n pages.push(ELLIPSIS);\n pages.push(currentPage - 1, currentPage, currentPage + 1);\n pages.push(ELLIPSIS);\n pages.push(totalPages);\n }\n\n return pages;\n};\n\n/**\n * Use Pagination to let users navigate through multiple pages of content, such\n * as search results or a paginated table. It automatically condenses to a\n * maximum of 7 visible page numbers (using ellipses) for large page counts.\n * Render `as=\"nav\"` when it acts as a standalone navigation landmark — in that\n * case also provide an `id` for accessibility. Use the `condensed` prop for\n * compact spaces where only a page count needs to be shown.\n *\n * @summary A control for navigating between pages of paginated content.\n */\nexport const Pagination = forwardRef<PaginationElement, PaginationProps>((props, ref) => {\n const {\n className,\n currentPage,\n totalPages,\n onPageChange,\n condensed = false,\n hideSkipButtons = false,\n as: Tag = 'div',\n ...paginationProps\n } = extractProps(props, marginPropDefs);\n\n const pages = generatePageNumbers(currentPage, totalPages);\n\n const handlePrevious = () => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNext = () => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1);\n }\n };\n\n const handleFirst = () => {\n if (currentPage !== 1) {\n onPageChange(1);\n }\n };\n\n const handleLast = () => {\n if (currentPage !== totalPages) {\n onPageChange(totalPages);\n }\n };\n\n return (\n <Slot.Root\n ref={ref}\n aria-label=\"pagination\"\n className={cn(componentClassName, className)}\n data-testid={componentClassName}\n {...paginationProps}\n >\n <Tag>\n <div className={`${componentClassName}Container`}>\n <div className={`${componentClassName}Controllers`}>\n {!hideSkipButtons && (\n <UnstyledIconButton\n label=\"Go to first page\"\n onClick={handleFirst}\n disabled={currentPage === 1}\n >\n <SkipFirstSmallIcon />\n </UnstyledIconButton>\n )}\n\n <UnstyledIconButton\n label=\"Go to previous page\"\n onClick={handlePrevious}\n disabled={currentPage === 1}\n >\n <ChevronLeftSmallIcon />\n </UnstyledIconButton>\n </div>\n\n {condensed ? (\n <BodyText size=\"md\" color=\"primary\">\n Page {currentPage} of {totalPages}\n </BodyText>\n ) : (\n <div>\n <ol className={`${componentClassName}Pages`}>\n {pages.map((page, index) => {\n if (page === ELLIPSIS) {\n return (\n <li key={`ellipsis-${index}`}>\n <BodyText\n size=\"md\"\n color=\"primary\"\n className={`${componentClassName}Ellipsis`}\n >\n {ELLIPSIS}\n </BodyText>\n </li>\n );\n }\n const isActive = page === currentPage;\n return (\n <li key={page}>\n <Button\n className={`${componentClassName}Page`}\n variant=\"ghost\"\n colorScheme=\"functional\"\n onClick={() => onPageChange(page)}\n data-active={isActive ? '' : undefined}\n aria-label={`Go to page ${page}`}\n aria-current={isActive ? 'page' : undefined}\n >\n {page}\n </Button>\n </li>\n );\n })}\n </ol>\n </div>\n )}\n\n <div className={`${componentClassName}Controllers`}>\n <UnstyledIconButton\n label=\"Go to next page\"\n onClick={handleNext}\n disabled={currentPage === totalPages}\n >\n <ChevronRightSmallIcon />\n </UnstyledIconButton>\n\n {!hideSkipButtons && (\n <UnstyledIconButton\n label=\"Go to last page\"\n onClick={handleLast}\n disabled={currentPage === totalPages}\n >\n <SkipLastSmallIcon />\n </UnstyledIconButton>\n )}\n </div>\n </div>\n </Tag>\n </Slot.Root>\n );\n});\n\nPagination.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 _chunkD3FV2G2Kcjs = require('./chunk-D3FV2G2K.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var t="TablePagination",p=_chunk4Q432K4Wcjs.b.call(void 0, t),l= exports.a =_react.forwardRef.call(void 0, ({className:e,...i},r)=>_jsxruntime.jsx.call(void 0, _chunkD3FV2G2Kcjs.a,{ref:r,className:_chunkONNSZMWFcjs.a.call(void 0, p,e),...i,as:"div"}));l.displayName=t;exports.a = l;
|
|
4
|
+
//# sourceMappingURL=chunk-DMSNZZQN.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-DMSNZZQN.cjs","../src/components/Table/TablePagination.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","TablePagination","forwardRef","className","props","ref","jsx","Pagination","cn"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,8BCF/F,+CAgBrB,IARAA,CAAAA,CAAiB,iBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAkBC,+BAAAA,CAC5B,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAEtBC,6BAAAA,mBAACC,CAAA,CAAW,GAAA,CAAKF,CAAAA,CAAK,SAAA,CAAWG,iCAAAA,CAAGT,CAAoBI,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,EAAA,CAAG,KAAA,CAAM,CAG9F,CAAA,CAEAH,CAAAA,CAAgB,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-DMSNZZQN.cjs","sourcesContent":[null,"import { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\n\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Pagination } from '../Pagination/Pagination';\nimport type { TablePaginationProps } from './TablePagination.props';\n\nconst COMPONENT_NAME = 'TablePagination';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype TablePaginationElement = ComponentRef<'div'>;\n\nexport const TablePagination = forwardRef<TablePaginationElement, TablePaginationProps>(\n ({ className, ...props }, ref) => {\n return (\n <Pagination ref={ref} className={cn(componentClassName, className)} {...props} as=\"div\" />\n );\n }\n);\n\nTablePagination.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import{a as r}from"./chunk-HT2SSVNF.js";import{a as e}from"./chunk-UMCDT4ZD.js";import{a as n}from"./chunk-J3AJBV4B.js";import{b as i}from"./chunk-PDEVCIQ3.js";import{forwardRef as f}from"react";import{Toast as l}from"radix-ui";import{jsx as t}from"react/jsx-runtime";var s="ToastActionButton",u=i(s),T=f(({className:m,altText:o,children:a,...p},c)=>(e(!o,"ToastActionButton: `altText` is required."),t(l.Action,{className:n(u,m),asChild:!0,altText:o,children:t(r,{color:"inverted",asChild:!0,children:t("button",{ref:c,type:"button",...p,children:a})})})));T.displayName=s;export{T as a};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-DVLDTXUF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Toast/ToastActionButton.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { Toast as ToastPrimitive } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ToastActionButtonProps } from './ToastActionButton.props';\nimport { cn } from '../../helpers/cn';\nimport { warn } from '../../helpers/logger';\nimport { InlineLink } from '../InlineLink/InlineLink';\n\nconst COMPONENT_NAME = 'ToastActionButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ToastActionButtonElement = ComponentRef<'button'>;\n\n/**\n * Use ToastActionButton to render an actionable button inside a `Toast`, such\n * as an \"Undo\" or \"Retry\" action.\n *\n * @summary An actionable button within a Toast.\n */\nexport const ToastActionButton = forwardRef<ToastActionButtonElement, ToastActionButtonProps>(\n ({ className, altText, children, ...props }, ref) => {\n warn(!altText, 'ToastActionButton: `altText` is required.');\n\n return (\n <ToastPrimitive.Action\n className={cn(componentClassName, className)}\n asChild\n altText={altText}\n >\n <InlineLink color=\"inverted\" asChild>\n <button ref={ref} type=\"button\" {...props}>\n {children}\n </button>\n </InlineLink>\n </ToastPrimitive.Action>\n );\n }\n);\n\nToastActionButton.displayName = COMPONENT_NAME;\n"],"mappings":";;gKAEA,OAAS,cAAAA,MAAkB,QAE3B,OAAS,SAASC,MAAsB,WA6B9B,cAAAC,MAAA,oBAtBV,IAAMC,EAAiB,oBACjBC,EAAqBC,EAAiBF,CAAc,EAU7CG,EAAoBC,EAC/B,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,SAAAC,EAAU,GAAGC,CAAM,EAAGC,KAC3CC,EAAK,CAACJ,EAAS,2CAA2C,EAGxDP,EAACY,EAAe,OAAf,CACC,UAAWC,EAAGX,EAAoBI,CAAS,EAC3C,QAAO,GACP,QAASC,EAET,SAAAP,EAACc,EAAA,CAAW,MAAM,WAAW,QAAO,GAClC,SAAAd,EAAC,UAAO,IAAKU,EAAK,KAAK,SAAU,GAAGD,EACjC,SAAAD,EACH,EACF,EACF,EAGN,EAEAJ,EAAkB,YAAcH","names":["forwardRef","ToastPrimitive","jsx","COMPONENT_NAME","componentClassName","withGlobalPrefix","ToastActionButton","forwardRef","className","altText","children","props","ref","warn","ToastPrimitive","cn","InlineLink"]}
|
|
@@ -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
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
var _chunk4MHZWLS2cjs = require('./chunk-4MHZWLS2.cjs');var _chunkWFVKT4MGcjs = require('./chunk-WFVKT4MG.cjs');var _chunkIAFYIHVPcjs = require('./chunk-IAFYIHVP.cjs');var _chunkRIHABKWYcjs = require('./chunk-RIHABKWY.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _useMergedRefs = require('@base-ui/utils/useMergedRefs');var _jsxruntime = require('react/jsx-runtime');var w="PasswordInput",I=_chunk4Q432K4Wcjs.b.call(void 0, w),L= exports.a =_react.forwardRef.call(void 0, ({className:E,disabled:r,id:v,...M},P)=>{let e=_react.useRef.call(void 0, null),S=_useMergedRefs.useMergedRefs.call(void 0, P,e),[s,l]=_react.useState.call(void 0, !1),[i,a]=_react.useState.call(void 0, !1),h=_react.useCallback.call(void 0, ()=>{let t=!s,n=!i;l(t),a(n)},[s,i]);_react.useEffect.call(void 0, ()=>{let t=null;e&&typeof e=="object"&&e.current&&(t=e.current);let n=()=>{_optionalChain([t, 'optionalAccess', _ => _.type])&&(t.type="password",l(!1))};return t&&t.form!==null&&t.form.addEventListener("submit",n),()=>{_optionalChain([t, 'optionalAccess', _2 => _2.form])&&t.form.removeEventListener("submit",n)}},[e]);let g=`Your password is ${s?"shown":"hidden"}!`;_react.useEffect.call(void 0, ()=>{setTimeout(()=>{a(!1)},1500)},[i]);let{id:O}=_chunkRIHABKWYcjs.a.call(void 0, {providedId:v,prefix:"password-input"});return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk4MHZWLS2cjs.a,{ref:S,className:_chunkONNSZMWFcjs.a.call(void 0, I,E),type:s?"text":"password",disabled:r,id:O,"data-testid":I,...M,children:_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkWFVKT4MGcjs.a,{type:"button",label:"toggle password visibility",onClick:h,disabled:r,"aria-pressed":s,children:s?_jsxruntime.jsx.call(void 0, _hearthreacticons.EyeSmallIcon,{}):_jsxruntime.jsx.call(void 0, _hearthreacticons.EyeOffSmallIcon,{})})})}),_jsxruntime.jsx.call(void 0, "div",{"data-visually-hidden":!0,"aria-live":"assertive",role:"status",children:i?g:""})]})});L.displayName=w;exports.a = L;
|
|
4
|
+
//# sourceMappingURL=chunk-E5YFELWJ.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-E5YFELWJ.cjs","../src/components/PasswordInput/PasswordInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","PasswordInput","forwardRef","className","disabled","providedId","props","forwardedRef","internalRef","useRef","inputRef","useMergedRefs","visible","setVisible","useState","showVisibilityMessage","setShowVisibilityMessage","handleVisibility","useCallback","newVisibilityState","newVisibilityMessageState","useEffect","currentElement","handleSubmit","visibilityMessage","id","useIds","jsxs","Fragment","jsx","TextInput","cn","InputSlot","UnstyledIconButton","EyeSmallIcon","EyeOffSmallIcon"],"mappings":"AAAA,ylBAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCEhL,wEAMvB,6DAGhB,+CAmExB,IAjEAA,CAAAA,CAAiB,eAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAU7CC,CAAAA,aAAgBC,+BAAAA,CAC1B,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAAA,CAAU,EAAA,CAAIC,CAAAA,CAAY,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAAiB,CACnE,IAAMC,CAAAA,CAAcC,2BAAAA,IAAoC,CAAA,CAClDC,CAAAA,CAAWC,0CAAAA,CAAcJ,CAAcC,CAAW,CAAA,CAElD,CAACI,CAAAA,CAASC,CAAU,CAAA,CAAIC,6BAAAA,CAAS,CAAK,CAAA,CACtC,CAACC,CAAAA,CAAuBC,CAAwB,CAAA,CAAIF,6BAAAA,CAAS,CAAK,CAAA,CAElEG,CAAAA,CAAmBC,gCAAAA,CAAY,CAAA,EAAM,CACzC,IAAMC,CAAAA,CAAqB,CAACP,CAAAA,CACtBQ,CAAAA,CAA4B,CAACL,CAAAA,CACnCF,CAAAA,CAAWM,CAAkB,CAAA,CAC7BH,CAAAA,CAAyBI,CAAyB,CACpD,CAAA,CAAG,CAACR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CAAAA,CAAGhC,CAAoBI,CAAS,CAAA,CAC3C,IAAA,CAAMS,CAAAA,CAAU,MAAA,CAAS,UAAA,CACzB,QAAA,CAAUR,CAAAA,CACV,EAAA,CAAIqB,CAAAA,CACJ,aAAA,CAAa1B,CAAAA,CACZ,GAAGO,CAAAA,CAEJ,QAAA,CAAAuB,6BAAAA,mBAACG,CAAA,CAAU,SAAA,CAAU,QAAA,CACnB,QAAA,CAAAH,6BAAAA,mBAACI,CAAA,CACC,IAAA,CAAK,QAAA,CACL,KAAA,CAAM,4BAAA,CACN,OAAA,CAAShB,CAAAA,CACT,QAAA,CAAUb,CAAAA,CACV,cAAA,CAAcQ,CAAAA,CAEb,QAAA,CAAAA,CAAAA,CAAUiB,6BAAAA,8BAACK,CAAA,CAAA,CAAa,CAAA,CAAKL,6BAAAA,iCAACM,CAAA,CAAA,CAAgB,CAAA,CACjD,CAAA,CACF,CAAA,CACF,CAAA,CACAN,6BAAAA,KAAC,CAAA,CAAI,sBAAA,CAAoB,CAAA,CAAA,CAAC,WAAA,CAAU,WAAA,CAAY,IAAA,CAAK,QAAA,CAClD,QAAA,CAAAd,CAAAA,CAAwBS,CAAAA,CAAoB,EAAA,CAC/C,CAAA,CAAA,CACF,CAEJ,CACF,CAAA,CAEAvB,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-E5YFELWJ.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { cn } from '../../helpers/cn';\nimport { forwardRef, useRef, useState, useCallback, useEffect } from 'react';\nimport type { RefObject } from 'react';\nimport type { PasswordInputProps } from './PasswordInput.props';\nimport { TextInput } from '../TextInput/TextInput';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { EyeOffSmallIcon, EyeSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useIds } from '../../hooks/use-ids';\nimport type { InputBaseElement } from '../InputBase/InputBase';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\n\nconst COMPONENT_NAME = 'PasswordInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\n/**\n * Use PasswordInput to securely collect a user's password, with a built-in\n * control for toggling visibility of the entered value. It automatically\n * resets to hidden when its parent form is submitted. For general text entry\n * use TextInput instead, and for search input use SearchInput.\n *\n * @summary An input for securely entering a password, with a visibility toggle.\n */\nexport const PasswordInput = forwardRef<InputBaseElement, PasswordInputProps>(\n ({ className, disabled, id: providedId, ...props }, forwardedRef) => {\n const internalRef = useRef<HTMLInputElement | null>(null);\n const inputRef = useMergedRefs(forwardedRef, internalRef);\n\n const [visible, setVisible] = useState(false);\n const [showVisibilityMessage, setShowVisibilityMessage] = useState(false);\n\n const handleVisibility = useCallback(() => {\n const newVisibilityState = !visible;\n const newVisibilityMessageState = !showVisibilityMessage;\n setVisible(newVisibilityState);\n setShowVisibilityMessage(newVisibilityMessageState);\n }, [visible, showVisibilityMessage]);\n\n // If the PasswordInput is inside a form we should switch the input type\n // back to password when its parent form is submitted\n useEffect(() => {\n // Get the ref value and ensure proper typing\n let currentElement: HTMLInputElement | null = null;\n if (internalRef && typeof internalRef === 'object' && internalRef.current) {\n // Type assertion to ensure TypeScript understands this is a valid ref object\n const refObject = internalRef as RefObject<HTMLInputElement>;\n currentElement = refObject.current;\n }\n\n const handleSubmit = () => {\n if (currentElement?.type) {\n currentElement.type = 'password';\n setVisible(false);\n }\n };\n\n if (currentElement && currentElement.form !== null) {\n currentElement.form.addEventListener('submit', handleSubmit);\n }\n return () => {\n if (currentElement?.form) {\n currentElement.form.removeEventListener('submit', handleSubmit);\n }\n };\n }, [internalRef]);\n\n const visibilityMessage = `Your password is ${visible ? 'shown' : 'hidden'}!`;\n\n useEffect(() => {\n setTimeout(() => {\n setShowVisibilityMessage(false);\n }, 1500);\n }, [showVisibilityMessage]);\n\n const { id } = useIds({ providedId, prefix: 'password-input' });\n\n return (\n <>\n <TextInput\n ref={inputRef}\n className={cn(componentClassName, className)}\n type={visible ? 'text' : 'password'}\n disabled={disabled}\n id={id}\n data-testid={componentClassName}\n {...props}\n >\n <InputSlot placement=\"suffix\">\n <UnstyledIconButton\n type=\"button\"\n label=\"toggle password visibility\"\n onClick={handleVisibility}\n disabled={disabled}\n aria-pressed={visible}\n >\n {visible ? <EyeSmallIcon /> : <EyeOffSmallIcon />}\n </UnstyledIconButton>\n </InputSlot>\n </TextInput>\n <div data-visually-hidden aria-live=\"assertive\" role=\"status\">\n {showVisibilityMessage ? visibilityMessage : ''}\n </div>\n </>\n );\n }\n);\n\nPasswordInput.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 _chunkJQCRVBOScjs = require('./chunk-JQCRVBOS.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _chunkZSLWPF2Ucjs = require('./chunk-ZSLWPF2U.cjs');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var p="ListItemLink",b=_chunk4Q432K4Wcjs.b.call(void 0, p),g= exports.a =_react.forwardRef.call(void 0, ({className:s,heading:L,helperText:f,leadingContent:c,trailingContent:o,badge:a,badgePlacement:l,children:I,asChild:e,...C},k)=>{let N={heading:L,helperText:f,leadingContent:c,badge:a,badgePlacement:l},P=e?_radixui.Slot.Root:"a";return _jsxruntime.jsx.call(void 0, P,{ref:k,className:_chunkONNSZMWFcjs.a.call(void 0, b,s),...C,children:_chunkZSLWPF2Ucjs.a.call(void 0, {asChild:e,children:I},R=>_jsxruntime.jsx.call(void 0, _chunkJQCRVBOScjs.a,{trailingContent:o||_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronRightSmallIcon,{}),...N,children:R}))})});g.displayName=p;exports.a = g;
|
|
4
|
+
//# sourceMappingURL=chunk-E7RWLZ6B.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-E7RWLZ6B.cjs","../src/components/List/ListItemLink.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","ListItemLink","forwardRef","className","heading","helperText","leadingContent","trailingContent","badge","badgePlacement","children","asChild","props","ref","contentProps","Component","Slot","jsx","cn","getSubtree","ListItemContent","ChevronRightSmallIcon"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wECG7H,mCAEjB,8BAGM,+CA2CsC,IAzC3DA,CAAAA,CAAiB,cAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAY7CC,CAAAA,aAAeC,+BAAAA,CAExB,CACE,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,IAAMC,CAAAA,CAAe,CACnB,OAAA,CAAAV,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,KAAA,CAAAE,CAAAA,CACA,cAAA,CAAAC,CACF,CAAA,CACMM,CAAAA,CAAYJ,CAAAA,CAAUK,aAAAA,CAAK,IAAA,CAAO,GAAA,CACxC,OACEC,6BAAAA,CAACF,CAAA,CAAU,GAAA,CAAKF,CAAAA,CAAK,SAAA,CAAWK,iCAAAA,CAAGnB,CAAoBI,CAAS,CAAA,CAAI,GAAGS,CAAAA,CACpE,QAAA,CAAAO,iCAAAA,CAAa,OAAA,CAAAR,CAAAA,CAAS,QAAA,CAAAD,CAAS,CAAA,CAAGA,CAAAA,EACjCO,6BAAAA,mBAACG,CAAA,CACC,eAAA,CAAiBb,CAAAA,EAAoCU,6BAAAA,uCAACI,CAAA,CAAA,CAAsB,CAAA,CAC3E,GAAGP,CAAAA,CAEH,QAAA,CAAAJ,CAAAA,CACH,CACD,CAAA,CACH,CAEJ,CACF,CAAA,CAEAT,CAAAA,CAAa,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-E7RWLZ6B.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport type { ListItemLinkProps } from './ListItemLink.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { ListItemContent } from './ListItemContent';\nimport { Slot } from 'radix-ui';\nimport { getSubtree } from '../../helpers/get-subtree';\nimport type { ComponentRef } from 'react';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'ListItemLink';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ListItemLinkElement = ComponentRef<'a'>;\n\n/**\n * Use ListItemLink for a `List` item that navigates to another page or\n * location, rendering an `a` element with a trailing chevron icon by\n * default. Use `asChild` to render as a different element, such as a\n * framework `Link` component.\n *\n * @summary A List item that renders as a link.\n */\nexport const ListItemLink = forwardRef<ListItemLinkElement, ListItemLinkProps>(\n (\n {\n className,\n heading,\n helperText,\n leadingContent,\n trailingContent,\n badge,\n badgePlacement,\n children,\n asChild,\n ...props\n },\n ref\n ) => {\n const contentProps = {\n heading,\n helperText,\n leadingContent,\n badge,\n badgePlacement,\n };\n const Component = asChild ? Slot.Root : 'a';\n return (\n <Component ref={ref} className={cn(componentClassName, className)} {...props}>\n {getSubtree({ asChild, children }, children => (\n <ListItemContent\n trailingContent={trailingContent ? trailingContent : <ChevronRightSmallIcon />}\n {...contentProps}\n >\n {children}\n </ListItemContent>\n ))}\n </Component>\n );\n }\n);\n\nListItemLink.displayName = COMPONENT_NAME;\n"]}
|