@utilitywarehouse/hearth-react 0.24.12 → 0.24.14

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.
Files changed (91) hide show
  1. package/dist/{chunk-UTE5RHF4.cjs → chunk-4ON6DQZJ.cjs} +2 -2
  2. package/dist/{chunk-UTE5RHF4.cjs.map → chunk-4ON6DQZJ.cjs.map} +1 -1
  3. package/dist/{chunk-RAGTJ42O.cjs → chunk-54YG4VNB.cjs} +2 -2
  4. package/dist/chunk-54YG4VNB.cjs.map +1 -0
  5. package/dist/chunk-6TYBHIC2.js +2 -0
  6. package/dist/chunk-6TYBHIC2.js.map +1 -0
  7. package/dist/chunk-7G6BT4OO.cjs +2 -0
  8. package/dist/chunk-7G6BT4OO.cjs.map +1 -0
  9. package/dist/{chunk-GPAYGYZH.js → chunk-ASZ5QB34.js} +2 -2
  10. package/dist/{chunk-BOAZZ3M5.js → chunk-EBURNEZX.js} +2 -2
  11. package/dist/{chunk-5KFRH5PO.cjs → chunk-F3EHAH7K.cjs} +2 -2
  12. package/dist/{chunk-5KFRH5PO.cjs.map → chunk-F3EHAH7K.cjs.map} +1 -1
  13. package/dist/{chunk-A4NBYHRK.cjs → chunk-G3CRGGF6.cjs} +2 -2
  14. package/dist/{chunk-A4NBYHRK.cjs.map → chunk-G3CRGGF6.cjs.map} +1 -1
  15. package/dist/{chunk-3X4OUIX3.js → chunk-IURJIQKN.js} +2 -2
  16. package/dist/chunk-IURJIQKN.js.map +1 -0
  17. package/dist/{chunk-IOT26OHP.cjs → chunk-JZQVIOQX.cjs} +2 -2
  18. package/dist/chunk-JZQVIOQX.cjs.map +1 -0
  19. package/dist/{chunk-ZQ7NMBKB.cjs → chunk-M4MJVBSH.cjs} +2 -2
  20. package/dist/{chunk-ZQ7NMBKB.cjs.map → chunk-M4MJVBSH.cjs.map} +1 -1
  21. package/dist/{chunk-653IBOPH.js → chunk-NR4OJSWV.js} +2 -2
  22. package/dist/{chunk-MSINIKJ2.js → chunk-OOCWGQ7U.js} +2 -2
  23. package/dist/{chunk-JG6KNQFN.js → chunk-PCWD2HFO.js} +2 -2
  24. package/dist/chunk-PCWD2HFO.js.map +1 -0
  25. package/dist/{chunk-YZFHSU4C.js → chunk-PEIZ5YXW.js} +2 -2
  26. package/dist/{chunk-CQREUEXQ.js → chunk-QCMTR2BT.js} +2 -2
  27. package/dist/{chunk-HTEERNAS.js → chunk-QEKBLSE3.js} +2 -2
  28. package/dist/{chunk-2I2OGFJW.cjs → chunk-TWJIJADO.cjs} +2 -2
  29. package/dist/{chunk-2I2OGFJW.cjs.map → chunk-TWJIJADO.cjs.map} +1 -1
  30. package/dist/{chunk-MUI6HRA4.cjs → chunk-ZFWAO4WB.cjs} +2 -2
  31. package/dist/{chunk-MUI6HRA4.cjs.map → chunk-ZFWAO4WB.cjs.map} +1 -1
  32. package/dist/{chunk-ZWMK4MOC.cjs → chunk-ZZOECKRZ.cjs} +2 -2
  33. package/dist/{chunk-ZWMK4MOC.cjs.map → chunk-ZZOECKRZ.cjs.map} +1 -1
  34. package/dist/components/Accordion/Accordion.cjs +1 -1
  35. package/dist/components/Accordion/Accordion.js +1 -1
  36. package/dist/components/Checkbox/Checkbox.cjs +1 -1
  37. package/dist/components/Checkbox/Checkbox.js +1 -1
  38. package/dist/components/CheckboxTile/CheckboxTile.cjs +1 -1
  39. package/dist/components/CheckboxTile/CheckboxTile.js +1 -1
  40. package/dist/components/Combobox/Combobox.cjs +1 -1
  41. package/dist/components/Combobox/Combobox.js +1 -1
  42. package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -1
  43. package/dist/components/CurrencyInput/CurrencyInput.js +1 -1
  44. package/dist/components/DateInput/DateInput.cjs +1 -1
  45. package/dist/components/DateInput/DateInput.js +1 -1
  46. package/dist/components/DatePicker/DatePicker.cjs +1 -1
  47. package/dist/components/DatePicker/DatePicker.js +1 -1
  48. package/dist/components/DescriptionList/DescriptionList.cjs +1 -1
  49. package/dist/components/DescriptionList/DescriptionList.js +1 -1
  50. package/dist/components/FormField/FormField.cjs +1 -1
  51. package/dist/components/FormField/FormField.js +1 -1
  52. package/dist/components/List/List.cjs +1 -1
  53. package/dist/components/List/List.js +1 -1
  54. package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
  55. package/dist/components/PasswordInput/PasswordInput.js +1 -1
  56. package/dist/components/Radio/Radio.cjs +1 -1
  57. package/dist/components/Radio/Radio.js +1 -1
  58. package/dist/components/RadioTile/RadioTile.cjs +1 -1
  59. package/dist/components/RadioTile/RadioTile.js +1 -1
  60. package/dist/components/SearchInput/SearchInput.cjs +1 -1
  61. package/dist/components/SearchInput/SearchInput.js +1 -1
  62. package/dist/components/SectionHeader/SectionHeader.cjs +1 -1
  63. package/dist/components/SectionHeader/SectionHeader.js +1 -1
  64. package/dist/components/Select/Select.cjs +1 -1
  65. package/dist/components/Select/Select.js +1 -1
  66. package/dist/components/TextArea/TextArea.cjs +1 -1
  67. package/dist/components/TextArea/TextArea.js +1 -1
  68. package/dist/components/TextInput/TextInput.cjs +1 -1
  69. package/dist/components/TextInput/TextInput.js +1 -1
  70. package/dist/components/VerificationInput/VerificationInput.cjs +1 -1
  71. package/dist/components/VerificationInput/VerificationInput.js +1 -1
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.cjs.map +1 -1
  74. package/dist/index.js +1 -1
  75. package/package.json +3 -3
  76. package/styles.css +1 -1
  77. package/dist/chunk-3X4OUIX3.js.map +0 -1
  78. package/dist/chunk-IOT26OHP.cjs.map +0 -1
  79. package/dist/chunk-JG6KNQFN.js.map +0 -1
  80. package/dist/chunk-RAGTJ42O.cjs.map +0 -1
  81. package/dist/chunk-S5V6IROT.js +0 -2
  82. package/dist/chunk-S5V6IROT.js.map +0 -1
  83. package/dist/chunk-SM7U7QUN.cjs +0 -2
  84. package/dist/chunk-SM7U7QUN.cjs.map +0 -1
  85. /package/dist/{chunk-GPAYGYZH.js.map → chunk-ASZ5QB34.js.map} +0 -0
  86. /package/dist/{chunk-BOAZZ3M5.js.map → chunk-EBURNEZX.js.map} +0 -0
  87. /package/dist/{chunk-653IBOPH.js.map → chunk-NR4OJSWV.js.map} +0 -0
  88. /package/dist/{chunk-MSINIKJ2.js.map → chunk-OOCWGQ7U.js.map} +0 -0
  89. /package/dist/{chunk-YZFHSU4C.js.map → chunk-PEIZ5YXW.js.map} +0 -0
  90. /package/dist/{chunk-CQREUEXQ.js.map → chunk-QCMTR2BT.js.map} +0 -0
  91. /package/dist/{chunk-HTEERNAS.js.map → chunk-QEKBLSE3.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHSQ6V6UTcjs = require('./chunk-HSQ6V6UT.cjs');var _chunk3EK2M2AAcjs = require('./chunk-3EK2M2AA.cjs');var _chunkZQ7NMBKBcjs = require('./chunk-ZQ7NMBKB.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var m="DescriptionList",a=_chunk7LZI6HLWcjs.b.call(void 0, m),g= exports.a =c=>{let{className:d,heading:t,headingElement:f,helperText:P,trailingContent:x,children:D,direction:N,validationText:v,validationStatus:C,...L}=_chunkVCSJTDQRcjs.a.call(void 0, c,_chunkRDNRX35Pcjs.a),h={heading:t,headingElement:f,helperText:P,trailingContent:x,validationText:v,validationStatus:C};return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkGVVJQBRKcjs.a.call(void 0, a,d),children:[t?_jsxruntime.jsx.call(void 0, _chunkZQ7NMBKBcjs.a,{...h}):null,_jsxruntime.jsx.call(void 0, _chunk3EK2M2AAcjs.a,{asChild:!0,className:`${a}Container`,role:"list",children:_jsxruntime.jsx.call(void 0, "dl",{role:"list",...L,children:_jsxruntime.jsx.call(void 0, _chunkHSQ6V6UTcjs.a.Provider,{value:{direction:N},children:D})})})]})};g.displayName=m;exports.a = g;
2
- //# sourceMappingURL=chunk-UTE5RHF4.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHSQ6V6UTcjs = require('./chunk-HSQ6V6UT.cjs');var _chunk3EK2M2AAcjs = require('./chunk-3EK2M2AA.cjs');var _chunkM4MJVBSHcjs = require('./chunk-M4MJVBSH.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var m="DescriptionList",a=_chunk7LZI6HLWcjs.b.call(void 0, m),g= exports.a =c=>{let{className:d,heading:t,headingElement:f,helperText:P,trailingContent:x,children:D,direction:N,validationText:v,validationStatus:C,...L}=_chunkVCSJTDQRcjs.a.call(void 0, c,_chunkRDNRX35Pcjs.a),h={heading:t,headingElement:f,helperText:P,trailingContent:x,validationText:v,validationStatus:C};return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkGVVJQBRKcjs.a.call(void 0, a,d),children:[t?_jsxruntime.jsx.call(void 0, _chunkM4MJVBSHcjs.a,{...h}):null,_jsxruntime.jsx.call(void 0, _chunk3EK2M2AAcjs.a,{asChild:!0,className:`${a}Container`,role:"list",children:_jsxruntime.jsx.call(void 0, "dl",{role:"list",...L,children:_jsxruntime.jsx.call(void 0, _chunkHSQ6V6UTcjs.a.Provider,{value:{direction:N},children:D})})})]})};g.displayName=m;exports.a = g;
2
+ //# sourceMappingURL=chunk-4ON6DQZJ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-UTE5RHF4.cjs","../src/components/DescriptionList/DescriptionList.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","DescriptionList","props","className","heading","headingElement","helperText","trailingContent","children","direction","validationText","validationStatus","listProps","extractProps","marginPropDefs","sectionHeaderProps","jsxs","cn","jsx","SectionHeader","Flex"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,+CCsC1R,IA3BEA,CAAAA,CAAiB,iBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAmBC,CAAAA,EAAgC,CAC9D,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaX,CAAOY,mBAAc,CAAA,CAEhCC,CAAAA,CAAqB,CACzB,OAAA,CAAAX,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAG,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CAEA,OACEK,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,iCAAAA,CAAGlB,CAAoBI,CAAS,CAAA,CAC7C,QAAA,CAAA,CAAAC,CAAAA,CAAUc,6BAAAA,mBAACC,CAAA,CAAe,GAAGJ,CAAAA,CAAoB,CAAA,CAAK,IAAA,CACvDG,6BAAAA,mBAACE,CAAA,CAAK,OAAA,CAAO,CAAA,CAAA,CAAC,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-UTE5RHF4.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 { SectionHeader } from '../SectionHeader/SectionHeader';\nimport type { DescriptionListProps } from './DescriptionList.props';\nimport { DescriptionListContext } from './DescriptionList.context';\nimport { Flex } from '../Flex/Flex';\n\nconst COMPONENT_NAME = 'DescriptionList';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const DescriptionList = (props: DescriptionListProps) => {\n const {\n className,\n heading,\n headingElement,\n helperText,\n trailingContent,\n children,\n direction,\n validationText,\n validationStatus,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const sectionHeaderProps = {\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n };\n\n return (\n <div className={cn(componentClassName, className)}>\n {heading ? <SectionHeader {...sectionHeaderProps} /> : null}\n <Flex asChild className={`${componentClassName}Container`} role=\"list\">\n <dl role=\"list\" {...listProps}>\n <DescriptionListContext.Provider value={{ direction }}>\n {children}\n </DescriptionListContext.Provider>\n </dl>\n </Flex>\n </div>\n );\n};\n\nDescriptionList.displayName = COMPONENT_NAME;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-4ON6DQZJ.cjs","../src/components/DescriptionList/DescriptionList.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","DescriptionList","props","className","heading","headingElement","helperText","trailingContent","children","direction","validationText","validationStatus","listProps","extractProps","marginPropDefs","sectionHeaderProps","jsxs","cn","jsx","SectionHeader","Flex"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,+CCsC1R,IA3BEA,CAAAA,CAAiB,iBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAmBC,CAAAA,EAAgC,CAC9D,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaX,CAAOY,mBAAc,CAAA,CAEhCC,CAAAA,CAAqB,CACzB,OAAA,CAAAX,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAG,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CAEA,OACEK,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,iCAAAA,CAAGlB,CAAoBI,CAAS,CAAA,CAC7C,QAAA,CAAA,CAAAC,CAAAA,CAAUc,6BAAAA,mBAACC,CAAA,CAAe,GAAGJ,CAAAA,CAAoB,CAAA,CAAK,IAAA,CACvDG,6BAAAA,mBAACE,CAAA,CAAK,OAAA,CAAO,CAAA,CAAA,CAAC,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-4ON6DQZJ.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 { SectionHeader } from '../SectionHeader/SectionHeader';\nimport type { DescriptionListProps } from './DescriptionList.props';\nimport { DescriptionListContext } from './DescriptionList.context';\nimport { Flex } from '../Flex/Flex';\n\nconst COMPONENT_NAME = 'DescriptionList';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const DescriptionList = (props: DescriptionListProps) => {\n const {\n className,\n heading,\n headingElement,\n helperText,\n trailingContent,\n children,\n direction,\n validationText,\n validationStatus,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const sectionHeaderProps = {\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n };\n\n return (\n <div className={cn(componentClassName, className)}>\n {heading ? <SectionHeader {...sectionHeaderProps} /> : null}\n <Flex asChild className={`${componentClassName}Container`} role=\"list\">\n <dl role=\"list\" {...listProps}>\n <DescriptionListContext.Provider value={{ direction }}>\n {children}\n </DescriptionListContext.Provider>\n </dl>\n </Flex>\n </div>\n );\n};\n\nDescriptionList.displayName = COMPONENT_NAME;\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNFPIFSDDcjs = require('./chunk-NFPIFSDD.cjs');var _chunkY36SCAZGcjs = require('./chunk-Y36SCAZG.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var v="TextInput",E=_chunk7LZI6HLWcjs.b.call(void 0, v),M= exports.a =y=>{let{className:P,validationStatus:i,validationText:r,label:N,labelVariant:F,helperText:t,children:O,id:g,disabled:e,readOnly:n,hideLabel:B,required:o,placeholder:C,"aria-describedby":D,...V}=_chunkVCSJTDQRcjs.a.call(void 0, y,_chunkRDNRX35Pcjs.a),{id:l,labelId:s,helperTextId:p,validationTextId:d}=_chunkITZEACMWcjs.a.call(void 0, {providedId:g,prefix:"text-input"}),a=!n&&!e,q={id:l,labelId:s,helperTextId:p,validationTextId:d,label:N,labelVariant:F,helperText:t,validationText:a?r:void 0,validationStatus:a?i:void 0,hideLabel:B,required:o},w=_chunkDSW76HKTcjs.a.call(void 0, D,t?p:void 0,a&&r!==void 0?d:void 0);return _jsxruntime.jsx.call(void 0, _chunkY36SCAZGcjs.a,{"data-disabled":e?"":void 0,...q,children:_jsxruntime.jsx.call(void 0, _chunkNFPIFSDDcjs.a,{className:_chunkGVVJQBRKcjs.a.call(void 0, E,P),spellCheck:"false",id:l,required:o,disabled:e,readOnly:n,placeholder:e?void 0:C,"aria-labelledby":s,"aria-describedby":w,"aria-invalid":i==="invalid"?!0:void 0,"aria-errormessage":i==="invalid"?d:void 0,...V,children:O})})};M.displayName=v;exports.a = M;
2
- //# sourceMappingURL=chunk-RAGTJ42O.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNFPIFSDDcjs = require('./chunk-NFPIFSDD.cjs');var _chunkY36SCAZGcjs = require('./chunk-Y36SCAZG.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var v="TextInput",E=_chunk7LZI6HLWcjs.b.call(void 0, v),M= exports.a =y=>{let{className:P,validationStatus:i,validationText:r,label:N,labelVariant:F,helperText:t,children:O,id:g,disabled:e,readOnly:n,hideLabel:B,required:o,placeholder:C,"aria-describedby":D,...V}=_chunkVCSJTDQRcjs.a.call(void 0, y,_chunkRDNRX35Pcjs.a),{id:l,labelId:s,helperTextId:p,validationTextId:d}=_chunkITZEACMWcjs.a.call(void 0, {providedId:g,prefix:"text-input"}),a=!n&&!e,q={id:l,labelId:s,helperTextId:p,validationTextId:d,label:N,labelVariant:F,helperText:t,validationText:a?r:void 0,validationStatus:a?i:void 0,hideLabel:B,required:o},w=_chunkDSW76HKTcjs.a.call(void 0, D,t?p:void 0,a&&r!==void 0?d:void 0);return _jsxruntime.jsx.call(void 0, _chunkY36SCAZGcjs.a,{className:_chunkGVVJQBRKcjs.a.call(void 0, E,P),"data-disabled":e?"":void 0,...q,children:_jsxruntime.jsx.call(void 0, _chunkNFPIFSDDcjs.a,{spellCheck:"false",id:l,required:o,disabled:e,readOnly:n,placeholder:e?void 0:C,"aria-labelledby":s,"aria-describedby":w,"aria-invalid":i==="invalid"?!0:void 0,"aria-errormessage":i==="invalid"?d:void 0,...V,children:O})})};M.displayName=v;exports.a = M;
2
+ //# sourceMappingURL=chunk-54YG4VNB.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-54YG4VNB.cjs","../src/components/TextInput/TextInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","TextInput","props","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,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,+CCmEjU,IAvDAA,CAAAA,CAAiB,WAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAaC,CAAAA,EAA0B,CAClD,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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CAAyB,KAAA,CAAA,CAAdI,CAAAA,CACzB,iBAAA,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,CAAA,CAEAR,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-54YG4VNB.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 } from '../InputBase/InputBase';\nimport { FormField } from '../FormField/FormField';\n\nconst COMPONENT_NAME = 'TextInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const TextInput = (props: TextInputProps) => {\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 {...formFieldProps}\n >\n <InputBase\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,2 @@
1
+ import{a as I}from"./chunk-HECLKFB5.js";import{a as v}from"./chunk-HP5ULTGW.js";import{a as c}from"./chunk-W6VYE222.js";import{a as b}from"./chunk-L4OZ3M5X.js";import{a as P}from"./chunk-DVGYWBKQ.js";import{a as u}from"./chunk-BMY6GUJM.js";import{a as p}from"./chunk-MSHCGZ4G.js";import{b as f}from"./chunk-TXDSZ3MR.js";import{unstable_OneTimePasswordField as t}from"radix-ui";import{jsx as a,jsxs as C}from"react/jsx-runtime";var y="VerificationInput",T=f(y),E=N=>{let{className:O,disabled:r,readOnly:d,label:F,labelVariant:x,helperText:n,validationText:s,validationStatus:i,required:V,id:h,"aria-describedby":w,ref:S,...D}=u(N,c),{id:R,labelId:l,helperTextId:m,validationTextId:o}=b({providedId:h,prefix:"verification-input"}),e=!d&&!r,_={id:R,labelId:l,helperTextId:m,validationTextId:o,label:F,labelVariant:x,helperText:n,validationText:e?s:void 0,validationStatus:e?i:void 0,required:V},g=P(w,n?m:void 0,e&&s!==void 0?o:void 0);return a(v,{className:p(T,O),"data-disabled":r?"":void 0,..._,children:C(t.Root,{className:`${T}Root`,disabled:r,readOnly:d,"aria-labelledby":l,"aria-describedby":g,"aria-invalid":i==="invalid"?!0:void 0,"aria-errormessage":i==="invalid"?o:void 0,"data-validation-status":e?i:void 0,...D,children:[Array.from({length:6}).map((H,A)=>a(t.Input,{asChild:!0,children:a(I,{})},A)),a(t.HiddenInput,{ref:S})]})})};E.displayName=y;export{E as a};
2
+ //# sourceMappingURL=chunk-6TYBHIC2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/VerificationInput/VerificationInput.tsx"],"sourcesContent":["'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';\n\nconst COMPONENT_NAME = 'VerificationInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const VerificationInput = (props: VerificationInputProps) => {\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 ref,\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 {...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\nVerificationInput.displayName = COMPONENT_NAME;\n"],"mappings":"gUAEA,OAAS,iCAAiCA,MAAqC,WAiEzE,OAaM,OAAAC,EAbN,QAAAC,MAAA,oBAtDN,IAAMC,EAAiB,oBACjBC,EAAqBC,EAAiBF,CAAc,EAE7CG,EAAqBC,GAAkC,CAClE,GAAM,CACJ,UAAAC,EACA,SAAAC,EACA,SAAAC,EACA,MAAAC,EACA,aAAAC,EACA,WAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,SAAAC,EACA,GAAIC,EACJ,mBAAoBC,EACpB,IAAAC,EACA,GAAGC,CACL,EAAIC,EAAad,EAAOe,CAAc,EAEhC,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,EAAc,iBAAAC,CAAiB,EAAIC,EAAO,CAC7D,WAAAV,EACA,OAAQ,oBACV,CAAC,EAEKW,EAAyB,CAAClB,GAAY,CAACD,EAEvCoB,EAAiB,CACrB,GAAAN,EACA,QAAAC,EACA,aAAAC,EACA,iBAAAC,EACA,MAAAf,EACA,aAAAC,EACA,WAAAC,EACA,eAAgBe,EAAiBd,EAAiB,OAClD,iBAAkBc,EAAiBb,EAAmB,OACtD,SAAAC,CACF,EAEMc,EAAuBC,EAC3Bb,EACEL,EAAaY,EAAe,OAC9BG,GAAkBd,IAAmB,OAAYY,EAAmB,MACtE,EAIA,OACEzB,EAAC+B,EAAA,CACC,UAAWC,EAAG7B,EAAoBI,CAAS,EAC3C,gBAAeC,EAAW,GAAK,OAC9B,GAAGoB,EAEJ,SAAA3B,EAACgC,EAA8B,KAA9B,CACC,UAAW,GAAG9B,CAAkB,OAChC,SAAUK,EACV,SAAUC,EACV,kBAAiBc,EACjB,mBAAkBM,EAClB,eAAcf,IAAqB,UAAY,GAAO,OACtD,oBAAmBA,IAAqB,UAAYW,EAAmB,OACvE,yBAAwBE,EAAiBb,EAAmB,OAC3D,GAAGK,EAEH,gBAAM,KAAK,CAAE,OAnBI,CAmBoB,CAAC,EAAE,IAAI,CAACe,EAAGC,IAC/CnC,EAACiC,EAA8B,MAA9B,CAA4C,QAAO,GAClD,SAAAjC,EAACoC,EAAA,EAAU,GAD6BD,CAE1C,CACD,EAEDnC,EAACiC,EAA8B,YAA9B,CAA0C,IAAKf,EAAK,GACvD,EACF,CAEJ,EAEAb,EAAkB,YAAcH","names":["OneTimePasswordFieldPrimitive","jsx","jsxs","COMPONENT_NAME","componentClassName","withGlobalPrefix","VerificationInput","props","className","disabled","readOnly","label","labelVariant","helperText","validationText","validationStatus","required","providedId","ariaDescribedby","ref","verificationInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","FormField","cn","OneTimePasswordFieldPrimitive","_","i","InputBase"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNFPIFSDDcjs = require('./chunk-NFPIFSDD.cjs');var _chunkY36SCAZGcjs = require('./chunk-Y36SCAZG.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var y="VerificationInput",T=_chunk7LZI6HLWcjs.b.call(void 0, y),E= exports.a =N=>{let{className:O,disabled:r,readOnly:d,label:F,labelVariant:x,helperText:n,validationText:s,validationStatus:i,required:V,id:h,"aria-describedby":w,ref:S,...D}=_chunkVCSJTDQRcjs.a.call(void 0, N,_chunkRDNRX35Pcjs.a),{id:R,labelId:l,helperTextId:m,validationTextId:o}=_chunkITZEACMWcjs.a.call(void 0, {providedId:h,prefix:"verification-input"}),e=!d&&!r,_={id:R,labelId:l,helperTextId:m,validationTextId:o,label:F,labelVariant:x,helperText:n,validationText:e?s:void 0,validationStatus:e?i:void 0,required:V},g=_chunkDSW76HKTcjs.a.call(void 0, w,n?m:void 0,e&&s!==void 0?o:void 0);return _jsxruntime.jsx.call(void 0, _chunkY36SCAZGcjs.a,{className:_chunkGVVJQBRKcjs.a.call(void 0, T,O),"data-disabled":r?"":void 0,..._,children:_jsxruntime.jsxs.call(void 0, _radixui.unstable_OneTimePasswordField.Root,{className:`${T}Root`,disabled:r,readOnly:d,"aria-labelledby":l,"aria-describedby":g,"aria-invalid":i==="invalid"?!0:void 0,"aria-errormessage":i==="invalid"?o:void 0,"data-validation-status":e?i:void 0,...D,children:[Array.from({length:6}).map((H,A)=>_jsxruntime.jsx.call(void 0, _radixui.unstable_OneTimePasswordField.Input,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkNFPIFSDDcjs.a,{})},A)),_jsxruntime.jsx.call(void 0, _radixui.unstable_OneTimePasswordField.HiddenInput,{ref:S})]})})};E.displayName=y;exports.a = E;
2
+ //# sourceMappingURL=chunk-7G6BT4OO.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-7G6BT4OO.cjs","../src/components/VerificationInput/VerificationInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","VerificationInput","props","className","disabled","readOnly","label","labelVariant","helperText","validationText","validationStatus","required","providedId","ariaDescribedby","ref","verificationInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","jsx","FormField","cn","jsxs","OneTimePasswordFieldPrimitive"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,mCCExP,+CAiEzE,IAtDAA,CAAAA,CAAiB,mBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAqBC,CAAAA,EAAkC,CAClE,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,kBAAA,CAAoBC,CAAAA,CACpB,GAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAad,CAAOe,mBAAc,CAAA,CAEhC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAAA,CAAc,gBAAA,CAAAC,CAAiB,CAAA,CAAIC,iCAAAA,CACtD,UAAA,CAAAV,CAAAA,CACA,MAAA,CAAQ,oBACV,CAAC,CAAA,CAEKW,CAAAA,CAAyB,CAAClB,CAAAA,EAAY,CAACD,CAAAA,CAEvCoB,CAAAA,CAAiB,CACrB,EAAA,CAAAN,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,KAAA,CAAAf,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAgBe,CAAAA,CAAiBd,CAAAA,CAAiB,KAAA,CAAA,CAClD,gBAAA,CAAkBc,CAAAA,CAAiBb,CAAAA,CAAmB,KAAA,CAAA,CACtD,QAAA,CAAAC,CACF,CAAA,CAEMc,CAAAA,CAAuBC,iCAAAA,CAC3Bb,CACEL,CAAAA,CAAaY,CAAAA,CAAe,KAAA,CAAA,CAC9BG,CAAAA,EAAkBd,CAAAA,GAAmB,KAAA,CAAA,CAAYY,CAAAA,CAAmB,KAAA,CACtE,CAAA,CAIA,OACEM,6BAAAA,mBAACC,CAAA,CACC,SAAA,CAAWC,iCAAAA,CAAG9B,CAAoBI,CAAS,CAAA,CAC3C,eAAA,CAAeC,CAAAA,CAAW,EAAA,CAAK,KAAA,CAAA,CAC9B,GAAGoB,CAAAA,CAEJ,QAAA,CAAAM,8BAAAA,sCAACC,CAA8B,IAAA,CAA9B,CACC,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-7G6BT4OO.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';\n\nconst COMPONENT_NAME = 'VerificationInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const VerificationInput = (props: VerificationInputProps) => {\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 ref,\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 {...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\nVerificationInput.displayName = COMPONENT_NAME;\n"]}
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-FMZOD4P2.js";import{a as n}from"./chunk-Z6OGYQ26.js";import{a as p}from"./chunk-MSINIKJ2.js";import{a as s}from"./chunk-W6VYE222.js";import{a as e}from"./chunk-BMY6GUJM.js";import{a as o}from"./chunk-MSHCGZ4G.js";import{b as r}from"./chunk-TXDSZ3MR.js";import{jsx as i,jsxs as u}from"react/jsx-runtime";var m="DescriptionList",a=r(m),g=c=>{let{className:d,heading:t,headingElement:f,helperText:P,trailingContent:x,children:D,direction:N,validationText:v,validationStatus:C,...L}=e(c,s),h={heading:t,headingElement:f,helperText:P,trailingContent:x,validationText:v,validationStatus:C};return u("div",{className:o(a,d),children:[t?i(p,{...h}):null,i(n,{asChild:!0,className:`${a}Container`,role:"list",children:i("dl",{role:"list",...L,children:i(l.Provider,{value:{direction:N},children:D})})})]})};g.displayName=m;export{g as a};
2
- //# sourceMappingURL=chunk-GPAYGYZH.js.map
1
+ import{a as l}from"./chunk-FMZOD4P2.js";import{a as n}from"./chunk-Z6OGYQ26.js";import{a as p}from"./chunk-OOCWGQ7U.js";import{a as s}from"./chunk-W6VYE222.js";import{a as e}from"./chunk-BMY6GUJM.js";import{a as o}from"./chunk-MSHCGZ4G.js";import{b as r}from"./chunk-TXDSZ3MR.js";import{jsx as i,jsxs as u}from"react/jsx-runtime";var m="DescriptionList",a=r(m),g=c=>{let{className:d,heading:t,headingElement:f,helperText:P,trailingContent:x,children:D,direction:N,validationText:v,validationStatus:C,...L}=e(c,s),h={heading:t,headingElement:f,helperText:P,trailingContent:x,validationText:v,validationStatus:C};return u("div",{className:o(a,d),children:[t?i(p,{...h}):null,i(n,{asChild:!0,className:`${a}Container`,role:"list",children:i("dl",{role:"list",...L,children:i(l.Provider,{value:{direction:N},children:D})})})]})};g.displayName=m;export{g as a};
2
+ //# sourceMappingURL=chunk-ASZ5QB34.js.map
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-3X4OUIX3.js";import{a as d}from"./chunk-BCK2XQ4L.js";import{a as f}from"./chunk-OVKYZ4TW.js";import{a as m}from"./chunk-L4OZ3M5X.js";import{a as p}from"./chunk-MSHCGZ4G.js";import{b as u}from"./chunk-TXDSZ3MR.js";import i from"react";import{EyeOffSmallIcon as T,EyeSmallIcon as g}from"@utilitywarehouse/hearth-react-icons";import{Fragment as O,jsx as o,jsxs as R}from"react/jsx-runtime";var b="PasswordInput",x=u(b),N=({className:y,disabled:l,id:I,ref:w,...E})=>{let v=i.useRef(null),e=w||v,[s,S]=i.useState(!1),[n,a]=i.useState(!1),M=i.useCallback(()=>{let t=!s,r=!n;S(t),a(r)},[s,n]);i.useEffect(()=>{let t=null;e&&typeof e=="object"&&e.current&&(t=e.current);let r=()=>{t?.type&&(t.type="password")};return t&&t.form!==null&&t.form.addEventListener("submit",r),()=>{t?.form&&t.form.removeEventListener("submit",r)}},[e]);let P=`Your password is ${s?"shown":"hidden"}!`;i.useEffect(()=>{setTimeout(()=>{a(!1)},1500)},[n]);let{id:h}=m({providedId:I,prefix:"password-input"});return R(O,{children:[o(c,{ref:e,className:p(x,y),type:s?"text":"password",disabled:l,id:h,...E,children:o(d,{placement:"suffix",children:o(f,{type:"button",label:"toggle password visibility",onClick:M,disabled:l,"aria-pressed":s,children:s?o(g,{}):o(T,{})})})}),o("div",{"data-visually-hidden":!0,"aria-live":"assertive",role:"status",children:n?P:""})]})};N.displayName=b;export{N as a};
2
- //# sourceMappingURL=chunk-BOAZZ3M5.js.map
1
+ import{a as c}from"./chunk-IURJIQKN.js";import{a as d}from"./chunk-BCK2XQ4L.js";import{a as f}from"./chunk-OVKYZ4TW.js";import{a as m}from"./chunk-L4OZ3M5X.js";import{a as p}from"./chunk-MSHCGZ4G.js";import{b as u}from"./chunk-TXDSZ3MR.js";import i from"react";import{EyeOffSmallIcon as T,EyeSmallIcon as g}from"@utilitywarehouse/hearth-react-icons";import{Fragment as O,jsx as o,jsxs as R}from"react/jsx-runtime";var b="PasswordInput",x=u(b),N=({className:y,disabled:l,id:I,ref:w,...E})=>{let v=i.useRef(null),e=w||v,[s,S]=i.useState(!1),[n,a]=i.useState(!1),M=i.useCallback(()=>{let t=!s,r=!n;S(t),a(r)},[s,n]);i.useEffect(()=>{let t=null;e&&typeof e=="object"&&e.current&&(t=e.current);let r=()=>{t?.type&&(t.type="password")};return t&&t.form!==null&&t.form.addEventListener("submit",r),()=>{t?.form&&t.form.removeEventListener("submit",r)}},[e]);let P=`Your password is ${s?"shown":"hidden"}!`;i.useEffect(()=>{setTimeout(()=>{a(!1)},1500)},[n]);let{id:h}=m({providedId:I,prefix:"password-input"});return R(O,{children:[o(c,{ref:e,className:p(x,y),type:s?"text":"password",disabled:l,id:h,...E,children:o(d,{placement:"suffix",children:o(f,{type:"button",label:"toggle password visibility",onClick:M,disabled:l,"aria-pressed":s,children:s?o(g,{}):o(T,{})})})}),o("div",{"data-visually-hidden":!0,"aria-live":"assertive",role:"status",children:n?P:""})]})};N.displayName=b;export{N as a};
2
+ //# sourceMappingURL=chunk-EBURNEZX.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK4RWSELNcjs = require('./chunk-K4RWSELN.cjs');var _chunkSLDUN6XUcjs = require('./chunk-SLDUN6XU.cjs');var _chunkZQ7NMBKBcjs = require('./chunk-ZQ7NMBKB.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var P="List",t=_chunk7LZI6HLWcjs.b.call(void 0, P),b= exports.a =h=>{let{as:e="ul",className:u,colorScheme:i=void 0,variant:a,heading:r,headingElement:C,helperText:v,trailingContent:x,validationText:T,validationStatus:L,children:n,paddingNone:S,...s}=_chunkVCSJTDQRcjs.a.call(void 0, h,_chunkRDNRX35Pcjs.a),E={heading:r,headingElement:C,helperText:v,trailingContent:x,validationText:T,validationStatus:L},d={"data-padding-none":S?"":void 0};return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkGVVJQBRKcjs.a.call(void 0, t,u),children:[r?_jsxruntime.jsx.call(void 0, _chunkZQ7NMBKBcjs.a,{...E}):null,a===void 0||i===void 0?_jsxruntime.jsx.call(void 0, _chunkSLDUN6XUcjs.a,{asChild:!0,className:`${t}Container`,role:"list",...d,children:_jsxruntime.jsx.call(void 0, e,{...s,children:n})}):_jsxruntime.jsx.call(void 0, _chunkK4RWSELNcjs.a,{className:`${t}Container`,paddingNone:!0,variant:a,colorScheme:i,children:_jsxruntime.jsx.call(void 0, e,{role:"list",...s,...d,children:n})})]})};b.displayName=P;exports.a = b;
2
- //# sourceMappingURL=chunk-5KFRH5PO.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK4RWSELNcjs = require('./chunk-K4RWSELN.cjs');var _chunkSLDUN6XUcjs = require('./chunk-SLDUN6XU.cjs');var _chunkM4MJVBSHcjs = require('./chunk-M4MJVBSH.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var P="List",t=_chunk7LZI6HLWcjs.b.call(void 0, P),b= exports.a =h=>{let{as:e="ul",className:u,colorScheme:i=void 0,variant:a,heading:r,headingElement:C,helperText:v,trailingContent:x,validationText:T,validationStatus:L,children:n,paddingNone:S,...s}=_chunkVCSJTDQRcjs.a.call(void 0, h,_chunkRDNRX35Pcjs.a),E={heading:r,headingElement:C,helperText:v,trailingContent:x,validationText:T,validationStatus:L},d={"data-padding-none":S?"":void 0};return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkGVVJQBRKcjs.a.call(void 0, t,u),children:[r?_jsxruntime.jsx.call(void 0, _chunkM4MJVBSHcjs.a,{...E}):null,a===void 0||i===void 0?_jsxruntime.jsx.call(void 0, _chunkSLDUN6XUcjs.a,{asChild:!0,className:`${t}Container`,role:"list",...d,children:_jsxruntime.jsx.call(void 0, e,{...s,children:n})}):_jsxruntime.jsx.call(void 0, _chunkK4RWSELNcjs.a,{className:`${t}Container`,paddingNone:!0,variant:a,colorScheme:i,children:_jsxruntime.jsx.call(void 0, e,{role:"list",...s,...d,children:n})})]})};b.displayName=P;exports.a = b;
2
+ //# sourceMappingURL=chunk-F3EHAH7K.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-5KFRH5PO.cjs","../src/components/List/List.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","List","props","Tag","className","colorScheme","variant","heading","headingElement","helperText","trailingContent","validationText","validationStatus","children","paddingNone","listProps","extractProps","marginPropDefs","sectionHeaderProps","dataAttributeProps","jsxs","cn","jsx","SectionHeader","Box"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,+CC2C1R,IAlCEA,CAAAA,CAAiB,MAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAQC,CAAAA,EAAqB,CACxC,GAAM,CACJ,EAAA,CAAIC,CAAAA,CAAM,IAAA,CACV,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,KAAA,CAAA,CACd,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAad,CAAOe,mBAAc,CAAA,CAEhCC,CAAAA,CAAqB,CACzB,OAAA,CAAAX,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CAEMO,CAAAA,CAAqB,CACzB,mBAAA,CAAqBL,CAAAA,CAAc,EAAA,CAAK,KAAA,CAC1C,CAAA,CAEA,OACEM,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,iCAAAA,CAAGtB,CAAoBK,CAAS,CAAA,CAC7C,QAAA,CAAA,CAAAG,CAAAA,CAAUe,6BAAAA,mBAACC,CAAA,CAAe,GAAGL,CAAAA,CAAoB,CAAA,CAAK,IAAA,CACtDZ,CAAAA,GAAY,KAAA,CAAA,EAAaD,CAAAA,GAAgB,KAAA,CAAA,CACxCiB,6BAAAA,mBAACE,CAAA,CACC,OAAA,CAAO,CAAA,CAAA,CACP,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-5KFRH5PO.cjs","sourcesContent":[null,"import { cn } from '../../helpers/cn';\nimport type { ListProps } from './List.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Card } from '../Card/Card';\nimport { Box } from '../Box/Box';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\n\nconst COMPONENT_NAME = 'List';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const List = (props: ListProps) => {\n const {\n as: Tag = 'ul',\n className,\n colorScheme = undefined,\n variant,\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n children,\n paddingNone,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const sectionHeaderProps = {\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n };\n\n const dataAttributeProps = {\n 'data-padding-none': paddingNone ? '' : undefined,\n };\n\n return (\n <div className={cn(componentClassName, className)}>\n {heading ? <SectionHeader {...sectionHeaderProps} /> : null}\n {variant === undefined || colorScheme === undefined ? (\n <Box\n asChild\n className={`${componentClassName}Container`}\n role=\"list\"\n {...dataAttributeProps}\n >\n <Tag {...listProps}>{children}</Tag>\n </Box>\n ) : (\n <Card\n className={`${componentClassName}Container`}\n paddingNone\n variant={variant}\n colorScheme={colorScheme}\n >\n <Tag role=\"list\" {...listProps} {...dataAttributeProps}>\n {children}\n </Tag>\n </Card>\n )}\n </div>\n );\n};\n\nList.displayName = COMPONENT_NAME;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-F3EHAH7K.cjs","../src/components/List/List.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","List","props","Tag","className","colorScheme","variant","heading","headingElement","helperText","trailingContent","validationText","validationStatus","children","paddingNone","listProps","extractProps","marginPropDefs","sectionHeaderProps","dataAttributeProps","jsxs","cn","jsx","SectionHeader","Box"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,+CC2C1R,IAlCEA,CAAAA,CAAiB,MAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAQC,CAAAA,EAAqB,CACxC,GAAM,CACJ,EAAA,CAAIC,CAAAA,CAAM,IAAA,CACV,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,KAAA,CAAA,CACd,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAad,CAAOe,mBAAc,CAAA,CAEhCC,CAAAA,CAAqB,CACzB,OAAA,CAAAX,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CAEMO,CAAAA,CAAqB,CACzB,mBAAA,CAAqBL,CAAAA,CAAc,EAAA,CAAK,KAAA,CAC1C,CAAA,CAEA,OACEM,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,iCAAAA,CAAGtB,CAAoBK,CAAS,CAAA,CAC7C,QAAA,CAAA,CAAAG,CAAAA,CAAUe,6BAAAA,mBAACC,CAAA,CAAe,GAAGL,CAAAA,CAAoB,CAAA,CAAK,IAAA,CACtDZ,CAAAA,GAAY,KAAA,CAAA,EAAaD,CAAAA,GAAgB,KAAA,CAAA,CACxCiB,6BAAAA,mBAACE,CAAA,CACC,OAAA,CAAO,CAAA,CAAA,CACP,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-F3EHAH7K.cjs","sourcesContent":[null,"import { cn } from '../../helpers/cn';\nimport type { ListProps } from './List.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Card } from '../Card/Card';\nimport { Box } from '../Box/Box';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\n\nconst COMPONENT_NAME = 'List';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const List = (props: ListProps) => {\n const {\n as: Tag = 'ul',\n className,\n colorScheme = undefined,\n variant,\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n children,\n paddingNone,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const sectionHeaderProps = {\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n };\n\n const dataAttributeProps = {\n 'data-padding-none': paddingNone ? '' : undefined,\n };\n\n return (\n <div className={cn(componentClassName, className)}>\n {heading ? <SectionHeader {...sectionHeaderProps} /> : null}\n {variant === undefined || colorScheme === undefined ? (\n <Box\n asChild\n className={`${componentClassName}Container`}\n role=\"list\"\n {...dataAttributeProps}\n >\n <Tag {...listProps}>{children}</Tag>\n </Box>\n ) : (\n <Card\n className={`${componentClassName}Container`}\n paddingNone\n variant={variant}\n colorScheme={colorScheme}\n >\n <Tag role=\"list\" {...listProps} {...dataAttributeProps}>\n {children}\n </Tag>\n </Card>\n )}\n </div>\n );\n};\n\nList.displayName = COMPONENT_NAME;\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; }var _chunkRAGTJ42Ocjs = require('./chunk-RAGTJ42O.cjs');var _chunkRH3MHHIScjs = require('./chunk-RH3MHHIS.cjs');var _chunkAGPVWUNAcjs = require('./chunk-AGPVWUNA.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _jsxruntime = require('react/jsx-runtime');var b="PasswordInput",x=_chunk7LZI6HLWcjs.b.call(void 0, b),N= exports.a =({className:y,disabled:l,id:I,ref:w,...E})=>{let v=_react2.default.useRef(null),e=w||v,[s,S]=_react2.default.useState(!1),[n,a]=_react2.default.useState(!1),M=_react2.default.useCallback(()=>{let t=!s,r=!n;S(t),a(r)},[s,n]);_react2.default.useEffect(()=>{let t=null;e&&typeof e=="object"&&e.current&&(t=e.current);let r=()=>{_optionalChain([t, 'optionalAccess', _ => _.type])&&(t.type="password")};return t&&t.form!==null&&t.form.addEventListener("submit",r),()=>{_optionalChain([t, 'optionalAccess', _2 => _2.form])&&t.form.removeEventListener("submit",r)}},[e]);let P=`Your password is ${s?"shown":"hidden"}!`;_react2.default.useEffect(()=>{setTimeout(()=>{a(!1)},1500)},[n]);let{id:h}=_chunkITZEACMWcjs.a.call(void 0, {providedId:I,prefix:"password-input"});return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkRAGTJ42Ocjs.a,{ref:e,className:_chunkGVVJQBRKcjs.a.call(void 0, x,y),type:s?"text":"password",disabled:l,id:h,...E,children:_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkAGPVWUNAcjs.a,{type:"button",label:"toggle password visibility",onClick:M,disabled:l,"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:n?P:""})]})};N.displayName=b;exports.a = N;
2
- //# sourceMappingURL=chunk-A4NBYHRK.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; }var _chunk54YG4VNBcjs = require('./chunk-54YG4VNB.cjs');var _chunkRH3MHHIScjs = require('./chunk-RH3MHHIS.cjs');var _chunkAGPVWUNAcjs = require('./chunk-AGPVWUNA.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _jsxruntime = require('react/jsx-runtime');var b="PasswordInput",x=_chunk7LZI6HLWcjs.b.call(void 0, b),N= exports.a =({className:y,disabled:l,id:I,ref:w,...E})=>{let v=_react2.default.useRef(null),e=w||v,[s,S]=_react2.default.useState(!1),[n,a]=_react2.default.useState(!1),M=_react2.default.useCallback(()=>{let t=!s,r=!n;S(t),a(r)},[s,n]);_react2.default.useEffect(()=>{let t=null;e&&typeof e=="object"&&e.current&&(t=e.current);let r=()=>{_optionalChain([t, 'optionalAccess', _ => _.type])&&(t.type="password")};return t&&t.form!==null&&t.form.addEventListener("submit",r),()=>{_optionalChain([t, 'optionalAccess', _2 => _2.form])&&t.form.removeEventListener("submit",r)}},[e]);let P=`Your password is ${s?"shown":"hidden"}!`;_react2.default.useEffect(()=>{setTimeout(()=>{a(!1)},1500)},[n]);let{id:h}=_chunkITZEACMWcjs.a.call(void 0, {providedId:I,prefix:"password-input"});return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk54YG4VNBcjs.a,{ref:e,className:_chunkGVVJQBRKcjs.a.call(void 0, x,y),type:s?"text":"password",disabled:l,id:h,...E,children:_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkAGPVWUNAcjs.a,{type:"button",label:"toggle password visibility",onClick:M,disabled:l,"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:n?P:""})]})};N.displayName=b;exports.a = N;
2
+ //# sourceMappingURL=chunk-G3CRGGF6.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-A4NBYHRK.cjs","../src/components/PasswordInput/PasswordInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","PasswordInput","className","disabled","providedId","forwardedRef","props","defaultRef","React","inputRef","visible","setVisible","showVisibilityMessage","setShowVisibilityMessage","handleVisibility","newVisibilityState","newVisibilityMessageState","currentElement","handleSubmit","visibilityMessage","id","useIds","jsxs","Fragment","jsx","TextInput","cn","InputSlot","UnstyledIconButton","EyeSmallIcon","EyeOffSmallIcon"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,4ECInO,wEAK4B,+CA+D1C,IA5DEA,CAAAA,CAAiB,eAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAgB,CAAC,CAC5B,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,GAAA,CAAKC,CAAAA,CACL,GAAGC,CACL,CAAA,CAAA,EAA0B,CACxB,IAAMC,CAAAA,CAAaC,eAAAA,CAAM,MAAA,CAAgC,IAAI,CAAA,CACvDC,CAAAA,CAAWJ,CAAAA,EAAgBE,CAAAA,CAC3B,CAACG,CAAAA,CAASC,CAAU,CAAA,CAAIH,eAAAA,CAAM,QAAA,CAAS,CAAA,CAAK,CAAA,CAC5C,CAACI,CAAAA,CAAuBC,CAAwB,CAAA,CAAIL,eAAAA,CAAM,QAAA,CAAS,CAAA,CAAK,CAAA,CAExEM,CAAAA,CAAmBN,eAAAA,CAAM,WAAA,CAAY,CAAA,CAAA,EAAM,CAC/C,IAAMO,CAAAA,CAAqB,CAACL,CAAAA,CACtBM,CAAAA,CAA4B,CAACJ,CAAAA,CACnCD,CAAAA,CAAWI,CAAkB,CAAA,CAC7BF,C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GAAA,CAAKhB,CAAAA,CACL,SAAA,CAAWiB,iCAAAA,CAAG3B,CAAoBG,CAAS,CAAA,CAC3C,IAAA,CAAMQ,CAAAA,CAAU,MAAA,CAAS,UAAA,CACzB,QAAA,CAAUP,CAAAA,CACV,EAAA,CAAIiB,CAAAA,CACH,GAAGd,CAAAA,CAEJ,QAAA,CAAAkB,6BAAAA,mBAACG,CAAA,CAAU,SAAA,CAAU,QAAA,CACnB,QAAA,CAAAH,6BAAAA,mBAACI,CAAA,CACC,IAAA,CAAK,QAAA,CACL,KAAA,CAAM,4BAAA,CACN,OAAA,CAASd,CAAAA,CACT,QAAA,CAAUX,CAAAA,CACV,cAAA,CAAcO,CAAAA,CAEb,QAAA,CAAAA,CAAAA,CAAUc,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,CAAAZ,CAAAA,CAAwBO,CAAAA,CAAoB,EAAA,CAC/C,CAAA,CAAA,CACF,CAEJ,CAAA,CAEAlB,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-A4NBYHRK.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { cn } from '../../helpers/cn';\nimport React 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';\n\nconst COMPONENT_NAME = 'PasswordInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const PasswordInput = ({\n className,\n disabled,\n id: providedId,\n ref: forwardedRef,\n ...props\n}: PasswordInputProps) => {\n const defaultRef = React.useRef<HTMLInputElement | null>(null);\n const inputRef = forwardedRef || defaultRef;\n const [visible, setVisible] = React.useState(false);\n const [showVisibilityMessage, setShowVisibilityMessage] = React.useState(false);\n\n const handleVisibility = React.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 React.useEffect(() => {\n // Get the ref value and ensure proper typing\n let currentElement: HTMLInputElement | null = null;\n if (inputRef && typeof inputRef === 'object' && inputRef.current) {\n // Type assertion to ensure TypeScript understands this is a valid ref object\n const refObject = inputRef as React.RefObject<HTMLInputElement>;\n currentElement = refObject.current;\n }\n\n const handleSubmit = () => {\n if (currentElement?.type) {\n currentElement.type = 'password';\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 }, [inputRef]);\n\n const visibilityMessage = `Your password is ${visible ? 'shown' : 'hidden'}!`;\n\n React.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 {...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\nPasswordInput.displayName = COMPONENT_NAME;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-G3CRGGF6.cjs","../src/components/PasswordInput/PasswordInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","PasswordInput","className","disabled","providedId","forwardedRef","props","defaultRef","React","inputRef","visible","setVisible","showVisibilityMessage","setShowVisibilityMessage","handleVisibility","newVisibilityState","newVisibilityMessageState","currentElement","handleSubmit","visibilityMessage","id","useIds","jsxs","Fragment","jsx","TextInput","cn","InputSlot","UnstyledIconButton","EyeSmallIcon","EyeOffSmallIcon"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,4ECInO,wEAK4B,+CA+D1C,IA5DEA,CAAAA,CAAiB,eAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAgB,CAAC,CAC5B,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,GAAA,CAAKC,CAAAA,CACL,GAAGC,CACL,CAAA,CAAA,EAA0B,CACxB,IAAMC,CAAAA,CAAaC,eAAAA,CAAM,MAAA,CAAgC,IAAI,CAAA,CACvDC,CAAAA,CAAWJ,CAAAA,EAAgBE,CAAAA,CAC3B,CAACG,CAAAA,CAASC,CAAU,CAAA,CAAIH,eAAAA,CAAM,QAAA,CAAS,CAAA,CAAK,CAAA,CAC5C,CAACI,CAAAA,CAAuBC,CAAwB,CAAA,CAAIL,eAAAA,CAAM,QAAA,CAAS,CAAA,CAAK,CAAA,CAExEM,CAAAA,CAAmBN,eAAAA,CAAM,WAAA,CAAY,CAAA,CAAA,EAAM,CAC/C,IAAMO,CAAAA,C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CAAC,CAAA,CAE9D,OACEkB,8BAAAA,oBAAAC,CAAA,CACE,QAAA,CAAA,CAAAC,6BAAAA,mBAACC,CAAA,CACC,GAAA,CAAKhB,CAAAA,CACL,SAAA,CAAWiB,iCAAAA,CAAG3B,CAAoBG,CAAS,CAAA,CAC3C,IAAA,CAAMQ,CAAAA,CAAU,MAAA,CAAS,UAAA,CACzB,QAAA,CAAUP,CAAAA,CACV,EAAA,CAAIiB,CAAAA,CACH,GAAGd,CAAAA,CAEJ,QAAA,CAAAkB,6BAAAA,mBAACG,CAAA,CAAU,SAAA,CAAU,QAAA,CACnB,QAAA,CAAAH,6BAAAA,mBAACI,CAAA,CACC,IAAA,CAAK,QAAA,CACL,KAAA,CAAM,4BAAA,CACN,OAAA,CAASd,CAAAA,CACT,QAAA,CAAUX,CAAAA,CACV,cAAA,CAAcO,CAAAA,CAEb,QAAA,CAAAA,CAAAA,CAAUc,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,CAAAZ,CAAAA,CAAwBO,CAAAA,CAAoB,EAAA,CAC/C,CAAA,CAAA,CACF,CAEJ,CAAA,CAEAlB,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-G3CRGGF6.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { cn } from '../../helpers/cn';\nimport React 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';\n\nconst COMPONENT_NAME = 'PasswordInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const PasswordInput = ({\n className,\n disabled,\n id: providedId,\n ref: forwardedRef,\n ...props\n}: PasswordInputProps) => {\n const defaultRef = React.useRef<HTMLInputElement | null>(null);\n const inputRef = forwardedRef || defaultRef;\n const [visible, setVisible] = React.useState(false);\n const [showVisibilityMessage, setShowVisibilityMessage] = React.useState(false);\n\n const handleVisibility = React.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 React.useEffect(() => {\n // Get the ref value and ensure proper typing\n let currentElement: HTMLInputElement | null = null;\n if (inputRef && typeof inputRef === 'object' && inputRef.current) {\n // Type assertion to ensure TypeScript understands this is a valid ref object\n const refObject = inputRef as React.RefObject<HTMLInputElement>;\n currentElement = refObject.current;\n }\n\n const handleSubmit = () => {\n if (currentElement?.type) {\n currentElement.type = 'password';\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 }, [inputRef]);\n\n const visibilityMessage = `Your password is ${visible ? 'shown' : 'hidden'}!`;\n\n React.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 {...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\nPasswordInput.displayName = COMPONENT_NAME;\n"]}
@@ -1,2 +1,2 @@
1
- import{a as I}from"./chunk-HECLKFB5.js";import{a as T}from"./chunk-HP5ULTGW.js";import{a as c}from"./chunk-W6VYE222.js";import{a as b}from"./chunk-L4OZ3M5X.js";import{a as x}from"./chunk-DVGYWBKQ.js";import{a as f}from"./chunk-BMY6GUJM.js";import{a as m}from"./chunk-MSHCGZ4G.js";import{b as u}from"./chunk-TXDSZ3MR.js";import{jsx as h}from"react/jsx-runtime";var v="TextInput",E=u(v),M=y=>{let{className:P,validationStatus:i,validationText:r,label:N,labelVariant:F,helperText:t,children:O,id:g,disabled:e,readOnly:n,hideLabel:B,required:o,placeholder:C,"aria-describedby":D,...V}=f(y,c),{id:l,labelId:s,helperTextId:p,validationTextId:d}=b({providedId:g,prefix:"text-input"}),a=!n&&!e,q={id:l,labelId:s,helperTextId:p,validationTextId:d,label:N,labelVariant:F,helperText:t,validationText:a?r:void 0,validationStatus:a?i:void 0,hideLabel:B,required:o},w=x(D,t?p:void 0,a&&r!==void 0?d:void 0);return h(T,{"data-disabled":e?"":void 0,...q,children:h(I,{className:m(E,P),spellCheck:"false",id:l,required:o,disabled:e,readOnly:n,placeholder:e?void 0:C,"aria-labelledby":s,"aria-describedby":w,"aria-invalid":i==="invalid"?!0:void 0,"aria-errormessage":i==="invalid"?d:void 0,...V,children:O})})};M.displayName=v;export{M as a};
2
- //# sourceMappingURL=chunk-3X4OUIX3.js.map
1
+ import{a as I}from"./chunk-HECLKFB5.js";import{a as T}from"./chunk-HP5ULTGW.js";import{a as c}from"./chunk-W6VYE222.js";import{a as b}from"./chunk-L4OZ3M5X.js";import{a as x}from"./chunk-DVGYWBKQ.js";import{a as f}from"./chunk-BMY6GUJM.js";import{a as m}from"./chunk-MSHCGZ4G.js";import{b as u}from"./chunk-TXDSZ3MR.js";import{jsx as h}from"react/jsx-runtime";var v="TextInput",E=u(v),M=y=>{let{className:P,validationStatus:i,validationText:r,label:N,labelVariant:F,helperText:t,children:O,id:g,disabled:e,readOnly:n,hideLabel:B,required:o,placeholder:C,"aria-describedby":D,...V}=f(y,c),{id:l,labelId:s,helperTextId:p,validationTextId:d}=b({providedId:g,prefix:"text-input"}),a=!n&&!e,q={id:l,labelId:s,helperTextId:p,validationTextId:d,label:N,labelVariant:F,helperText:t,validationText:a?r:void 0,validationStatus:a?i:void 0,hideLabel:B,required:o},w=x(D,t?p:void 0,a&&r!==void 0?d:void 0);return h(T,{className:m(E,P),"data-disabled":e?"":void 0,...q,children:h(I,{spellCheck:"false",id:l,required:o,disabled:e,readOnly:n,placeholder:e?void 0:C,"aria-labelledby":s,"aria-describedby":w,"aria-invalid":i==="invalid"?!0:void 0,"aria-errormessage":i==="invalid"?d:void 0,...V,children:O})})};M.displayName=v;export{M as a};
2
+ //# sourceMappingURL=chunk-IURJIQKN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/TextInput/TextInput.tsx"],"sourcesContent":["'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 } from '../InputBase/InputBase';\nimport { FormField } from '../FormField/FormField';\n\nconst COMPONENT_NAME = 'TextInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const TextInput = (props: TextInputProps) => {\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 {...formFieldProps}\n >\n <InputBase\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"],"mappings":"gUAmEM,cAAAA,MAAA,oBAvDN,IAAMC,EAAiB,YACjBC,EAAqBC,EAAiBF,CAAc,EAE7CG,EAAaC,GAA0B,CAClD,GAAM,CACJ,UAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,MAAAC,EACA,aAAAC,EACA,WAAAC,EACA,SAAAC,EACA,GAAIC,EACJ,SAAAC,EACA,SAAAC,EACA,UAAAC,EACA,SAAAC,EACA,YAAAC,EACA,mBAAoBC,EACpB,GAAGC,CACL,EAAIC,EAAahB,EAAOiB,CAAc,EAEhC,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,EAAc,iBAAAC,CAAiB,EAAIC,EAAO,CAC7D,WAAAd,EACA,OAAQ,YACV,CAAC,EAEKe,EAAyB,CAACb,GAAY,CAACD,EAEvCe,EAAiB,CACrB,GAAAN,EACA,QAAAC,EACA,aAAAC,EACA,iBAAAC,EACA,MAAAjB,EACA,aAAAC,EACA,WAAAC,EACA,eAAgBiB,EAAiBpB,EAAiB,OAClD,iBAAkBoB,EAAiBrB,EAAmB,OACtD,UAAAS,EACA,SAAAC,CACF,EAEMa,EAAuBC,EAC3BZ,EACER,EAAac,EAAe,OAC9BG,GAAkBpB,IAAmB,OAAYkB,EAAmB,MACtE,EAEA,OACE1B,EAACgC,EAAA,CACC,UAAWC,EAAG/B,EAAoBI,CAAS,EAC3C,gBAAeQ,EAAW,GAAK,OAC9B,GAAGe,EAEJ,SAAA7B,EAACkC,EAAA,CACC,WAAW,QACX,GAAIX,EACJ,SAAUN,EACV,SAAUH,EACV,SAAUC,EACV,YAAcD,EAAyB,OAAdI,EACzB,kBAAiBM,EACjB,mBAAkBM,EAClB,eAAcvB,IAAqB,UAAY,GAAO,OACtD,oBAAmBA,IAAqB,UAAYmB,EAAmB,OACtE,GAAGN,EAEH,SAAAR,EACH,EACF,CAEJ,EAEAR,EAAU,YAAcH","names":["jsx","COMPONENT_NAME","componentClassName","withGlobalPrefix","TextInput","props","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","FormField","cn","InputBase"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkY36SCAZGcjs = require('./chunk-Y36SCAZG.cjs');var _chunkSLDUN6XUcjs = require('./chunk-SLDUN6XU.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var y="TextArea",z=_chunk7LZI6HLWcjs.b.call(void 0, y),E= exports.a =P=>{let{className:g,validationStatus:e,validationText:t,label:A,labelVariant:N,helperText:o,id:I,disabled:a,readOnly:n,required:s,placeholder:F,"aria-describedby":w,resize:H,rows:O=3,minHeight:B,maxHeight:C,...D}=_chunkVCSJTDQRcjs.a.call(void 0, P,_chunkRDNRX35Pcjs.a),{id:l,labelId:m,helperTextId:p,validationTextId:i}=_chunkITZEACMWcjs.a.call(void 0, {providedId:I,prefix:"textarea"}),r=!n&&!a,V={id:l,labelId:m,helperTextId:p,validationTextId:i,label:A,labelVariant:N,helperText:o,validationText:r?t:void 0,validationStatus:r?e:void 0,required:s},q=_chunkDSW76HKTcjs.a.call(void 0, w,o?p:void 0,r&&t!==void 0?i:void 0);return _jsxruntime.jsx.call(void 0, _chunkY36SCAZGcjs.a,{"data-validation-status":e||void 0,"data-disabled":a?"":void 0,...V,children:_jsxruntime.jsx.call(void 0, _chunkSLDUN6XUcjs.a,{asChild:!0,className:_chunkGVVJQBRKcjs.a.call(void 0, z,g),minHeight:B,maxHeight:C,children:_jsxruntime.jsx.call(void 0, "textarea",{id:l,rows:O,required:s,disabled:a,readOnly:n,placeholder:a?void 0:F,"aria-labelledby":m,"aria-describedby":q,"aria-invalid":e==="invalid"?!0:void 0,"aria-errormessage":e==="invalid"?i:void 0,"data-resize":H,...D})})})};E.displayName=y;exports.a = E;
2
- //# sourceMappingURL=chunk-IOT26OHP.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkY36SCAZGcjs = require('./chunk-Y36SCAZG.cjs');var _chunkSLDUN6XUcjs = require('./chunk-SLDUN6XU.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var y="TextArea",z=_chunk7LZI6HLWcjs.b.call(void 0, y),E= exports.a =P=>{let{className:g,validationStatus:e,validationText:t,label:A,labelVariant:N,helperText:o,id:I,disabled:a,readOnly:n,required:s,placeholder:F,"aria-describedby":w,resize:H,rows:O=3,minHeight:B,maxHeight:C,...D}=_chunkVCSJTDQRcjs.a.call(void 0, P,_chunkRDNRX35Pcjs.a),{id:l,labelId:m,helperTextId:p,validationTextId:i}=_chunkITZEACMWcjs.a.call(void 0, {providedId:I,prefix:"textarea"}),r=!n&&!a,V={id:l,labelId:m,helperTextId:p,validationTextId:i,label:A,labelVariant:N,helperText:o,validationText:r?t:void 0,validationStatus:r?e:void 0,required:s},q=_chunkDSW76HKTcjs.a.call(void 0, w,o?p:void 0,r&&t!==void 0?i:void 0);return _jsxruntime.jsx.call(void 0, _chunkY36SCAZGcjs.a,{"data-validation-status":e||void 0,"data-disabled":a?"":void 0,className:_chunkGVVJQBRKcjs.a.call(void 0, z,g),...V,children:_jsxruntime.jsx.call(void 0, _chunkSLDUN6XUcjs.a,{asChild:!0,minHeight:B,maxHeight:C,children:_jsxruntime.jsx.call(void 0, "textarea",{id:l,rows:O,required:s,disabled:a,readOnly:n,placeholder:a?void 0:F,"aria-labelledby":m,"aria-describedby":q,"aria-invalid":e==="invalid"?!0:void 0,"aria-errormessage":e==="invalid"?i:void 0,"data-resize":H,...D})})})};E.displayName=y;exports.a = E;
2
+ //# sourceMappingURL=chunk-JZQVIOQX.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-JZQVIOQX.cjs","../src/components/TextArea/TextArea.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","TextArea","props","className","validationStatus","validationText","label","labelVariant","helperText","providedId","disabled","readOnly","required","placeholder","ariaDescribedby","resize","rows","minHeight","maxHeight","textAreaProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","jsx","FormField","cn","Box"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,+CCsE/T,IA1DFA,CAAAA,CAAiB,UAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAYC,CAAAA,EAAyB,CAChD,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,EAAA,CAAIC,CAAAA,CACJ,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,kBAAA,CAAoBC,CAAAA,CACpB,MAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CAAO,CAAA,CACP,SAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAalB,CAAOmB,mBAAc,CAAA,CAEhC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAAA,CAAc,gBAAA,CAAAC,CAAiB,CAAA,CAAIC,iCAAAA,CACtD,UAAA,CAAAjB,CAAAA,CACA,MAAA,CAAQ,UACV,CAAC,CAAA,CAEKkB,CAAAA,CAAyB,CAAChB,CAAAA,EAAY,CAACD,CAAAA,CAE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A,CAAO,KAAA,CAAA,CACtD,mBAAA,CAAmBA,CAAAA,GAAqB,SAAA,CAAYqB,CAAAA,CAAmB,KAAA,CAAA,CACvE,aAAA,CAAaV,CAAAA,CACZ,GAAGI,CAAAA,CACN,CAAA,CACF,CAAA,CACF,CAEJ,CAAA,CAEAlB,CAAAA,CAAS,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-JZQVIOQX.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { useIds } from '../../hooks/use-ids';\nimport type { TextAreaProps } from './TextArea.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { FormField } from '../FormField/FormField';\nimport { Box } from '../Box/Box';\n\nconst COMPONENT_NAME = 'TextArea';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const TextArea = (props: TextAreaProps) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n id: providedId,\n disabled,\n readOnly,\n required,\n placeholder,\n 'aria-describedby': ariaDescribedby,\n resize,\n rows = 3,\n minHeight,\n maxHeight,\n ...textAreaProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'textarea',\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 return (\n <FormField\n data-validation-status={validationStatus ? validationStatus : undefined}\n data-disabled={disabled ? '' : undefined}\n className={cn(componentClassName, className)}\n {...formFieldProps}\n >\n <Box asChild minHeight={minHeight} maxHeight={maxHeight}>\n <textarea\n id={id}\n rows={rows}\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 data-resize={resize}\n {...textAreaProps}\n />\n </Box>\n </FormField>\n );\n};\n\nTextArea.displayName = COMPONENT_NAME;\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGDUSUD7Qcjs = require('./chunk-GDUSUD7Q.cjs');var _chunkE6ACS2DRcjs = require('./chunk-E6ACS2DR.cjs');var _chunkAKGZKHVScjs = require('./chunk-AKGZKHVS.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var p="SectionHeader",l=_chunk7LZI6HLWcjs.b.call(void 0, p),g= exports.a =({className:c,heading:H,id:f,headingElement:N="div",helperText:o,trailingContent:i,validationText:n,validationStatus:r,...u})=>{let T=r!==void 0&&n!==void 0;return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkGVVJQBRKcjs.a.call(void 0, l,c),children:[_jsxruntime.jsx.call(void 0, _chunkE6ACS2DRcjs.a,{asChild:!0,size:"md",id:f,...u,children:_jsxruntime.jsx.call(void 0, N,{children:H})}),o?_jsxruntime.jsx.call(void 0, _chunkAKGZKHVScjs.a,{children:o}):null,T?_jsxruntime.jsx.call(void 0, _chunkGDUSUD7Qcjs.a,{status:r,children:n}):null,i?_jsxruntime.jsx.call(void 0, "span",{className:`${l}TrailingContent`,children:i}):null]})};g.displayName=p;exports.a = g;
2
- //# sourceMappingURL=chunk-ZQ7NMBKB.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGDUSUD7Qcjs = require('./chunk-GDUSUD7Q.cjs');var _chunkAKGZKHVScjs = require('./chunk-AKGZKHVS.cjs');var _chunkE6ACS2DRcjs = require('./chunk-E6ACS2DR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _jsxruntime = require('react/jsx-runtime');var p="SectionHeader",l=_chunk7LZI6HLWcjs.b.call(void 0, p),g= exports.a =({className:c,heading:H,id:f,headingElement:N="div",helperText:o,trailingContent:i,validationText:n,validationStatus:r,...u})=>{let T=r!==void 0&&n!==void 0;return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkGVVJQBRKcjs.a.call(void 0, l,c),children:[_jsxruntime.jsx.call(void 0, _chunkE6ACS2DRcjs.a,{asChild:!0,size:"md",id:f,...u,children:_jsxruntime.jsx.call(void 0, N,{children:H})}),o?_jsxruntime.jsx.call(void 0, _chunkAKGZKHVScjs.a,{children:o}):null,T?_jsxruntime.jsx.call(void 0, _chunkGDUSUD7Qcjs.a,{status:r,children:n}):null,i?_jsxruntime.jsx.call(void 0, "span",{className:`${l}TrailingContent`,children:i}):null]})};g.displayName=p;exports.a = g;
2
+ //# sourceMappingURL=chunk-M4MJVBSH.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZQ7NMBKB.cjs","../src/components/SectionHeader/SectionHeader.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","SectionHeader","className","heading","id","HeadingEl","helperText","trailingContent","validationText","validationStatus","props","showValidationText","jsxs","cn","jsx","Heading","HelperText","ValidationText"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,+CCuBnM,IAhBEA,CAAAA,CAAiB,eAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAgB,CAAC,CAC5B,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,EAAA,CAAAC,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAAY,KAAA,CAC5B,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAA,EAA0B,CACxB,IAAMC,CAAAA,CAAqBF,CAAAA,GAAqB,KAAA,CAAA,EAAaD,CAAAA,GAAmB,KAAA,CAAA,CAChF,OACEI,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,iCAAAA,CAAGd,CAAoBG,CAAS,CAAA,CAC9C,QAAA,CAAA,CAAAY,6BAAAA,mBAACC,CAAA,CAAQ,OAAA,CAAO,CAAA,CAAA,CAAC,IAAA,CAAK,IAAA,CAAK,EAAA,CAAIX,CAAAA,CAAK,GAAGM,CAAAA,CACrC,QAAA,CAAAI,6BAAAA,CAACT,CAAA,CAAW,QAAA,CAAAF,CAAAA,CAAQ,CAAA,CACtB,CAAA,CACCG,CAAAA,CAAaQ,6BAAAA,mBAACE,CAAA,CAAY,QAAA,CAAAV,CAAAA,CAAW,CAAA,CAAgB,IAAA,CACrDK,CAAAA,CACCG,6BAAAA,mBAACG,CAAA,CAAe,MAAA,CAAQR,CAAAA,CAAmB,QAAA,CAAAD,CAAAA,CAAe,CAAA,CACxD,IAAA,CAEHD,CAAAA,CACCO,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZQ7NMBKB.cjs","sourcesContent":[null,"import { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Heading } from '../Heading/Heading';\nimport { HelperText } from '../HelperText/HelperText';\nimport type { SectionHeaderProps } from './SectionHeader.props';\nimport { ValidationText } from '../ValidationText/ValidationText';\n\nconst COMPONENT_NAME = 'SectionHeader';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const SectionHeader = ({\n className,\n heading,\n id,\n headingElement: HeadingEl = 'div',\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n ...props\n}: SectionHeaderProps) => {\n const showValidationText = validationStatus !== undefined && validationText !== undefined;\n return (\n <div className={cn(componentClassName, className)}>\n <Heading asChild size=\"md\" id={id} {...props}>\n <HeadingEl>{heading}</HeadingEl>\n </Heading>\n {helperText ? <HelperText>{helperText}</HelperText> : null}\n {showValidationText ? (\n <ValidationText status={validationStatus}>{validationText}</ValidationText>\n ) : null}\n\n {trailingContent ? (\n <span className={`${componentClassName}TrailingContent`}>{trailingContent}</span>\n ) : null}\n </div>\n );\n};\n\nSectionHeader.displayName = COMPONENT_NAME;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-M4MJVBSH.cjs","../src/components/SectionHeader/SectionHeader.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","SectionHeader","className","heading","id","HeadingEl","helperText","trailingContent","validationText","validationStatus","props","showValidationText","jsxs","cn","jsx","Heading","HelperText","ValidationText"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,+CCuBnM,IAhBEA,CAAAA,CAAiB,eAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAgB,CAAC,CAC5B,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,EAAA,CAAAC,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAAY,KAAA,CAC5B,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAA,EAA0B,CACxB,IAAMC,CAAAA,CAAqBF,CAAAA,GAAqB,KAAA,CAAA,EAAaD,CAAAA,GAAmB,KAAA,CAAA,CAChF,OACEI,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,iCAAAA,CAAGd,CAAoBG,CAAS,CAAA,CAC9C,QAAA,CAAA,CAAAY,6BAAAA,mBAACC,CAAA,CAAQ,OAAA,CAAO,CAAA,CAAA,CAAC,IAAA,CAAK,IAAA,CAAK,EAAA,CAAIX,CAAAA,CAAK,GAAGM,CAAAA,CACrC,QAAA,CAAAI,6BAAAA,CAACT,CAAA,CAAW,QAAA,CAAAF,CAAAA,CAAQ,CAAA,CACtB,CAAA,CACCG,CAAAA,CAAaQ,6BAAAA,mBAACE,CAAA,CAAY,QAAA,CAAAV,CAAAA,CAAW,CAAA,CAAgB,IAAA,CACrDK,CAAAA,CACCG,6BAAAA,mBAACG,CAAA,CAAe,MAAA,CAAQR,CAAAA,CAAmB,QAAA,CAAAD,CAAAA,CAAe,CAAA,CACxD,IAAA,CAEHD,CAAAA,CACCO,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-M4MJVBSH.cjs","sourcesContent":[null,"import { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Heading } from '../Heading/Heading';\nimport { HelperText } from '../HelperText/HelperText';\nimport type { SectionHeaderProps } from './SectionHeader.props';\nimport { ValidationText } from '../ValidationText/ValidationText';\n\nconst COMPONENT_NAME = 'SectionHeader';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const SectionHeader = ({\n className,\n heading,\n id,\n headingElement: HeadingEl = 'div',\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n ...props\n}: SectionHeaderProps) => {\n const showValidationText = validationStatus !== undefined && validationText !== undefined;\n return (\n <div className={cn(componentClassName, className)}>\n <Heading asChild size=\"md\" id={id} {...props}>\n <HeadingEl>{heading}</HeadingEl>\n </Heading>\n {helperText ? <HelperText>{helperText}</HelperText> : null}\n {showValidationText ? (\n <ValidationText status={validationStatus}>{validationText}</ValidationText>\n ) : null}\n\n {trailingContent ? (\n <span className={`${componentClassName}TrailingContent`}>{trailingContent}</span>\n ) : null}\n </div>\n );\n};\n\nSectionHeader.displayName = COMPONENT_NAME;\n"]}
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-MSINIKJ2.js";import{a as e}from"./chunk-W6VYE222.js";import{a as i}from"./chunk-BMY6GUJM.js";import{a as r}from"./chunk-MSHCGZ4G.js";import{b as t}from"./chunk-TXDSZ3MR.js";import{Accordion as R}from"radix-ui";import{jsx as n,jsxs as x}from"react/jsx-runtime";var s="Accordion",g=t(s),u=p=>{let{className:a,type:m="multiple",heading:o,headingElement:d="h2",helperText:l,trailingContent:f,validationText:P,validationStatus:A,...N}=i(p,e),h={heading:o,headingElement:d,helperText:l,trailingContent:f,validationText:P,validationStatus:A},v={type:m,...N};return x("div",{className:r(g,a),children:[o?n(c,{...h}):null,n(R.Root,{...v})]})};u.displayName=s;export{u as a};
2
- //# sourceMappingURL=chunk-653IBOPH.js.map
1
+ import{a as c}from"./chunk-OOCWGQ7U.js";import{a as e}from"./chunk-W6VYE222.js";import{a as i}from"./chunk-BMY6GUJM.js";import{a as r}from"./chunk-MSHCGZ4G.js";import{b as t}from"./chunk-TXDSZ3MR.js";import{Accordion as R}from"radix-ui";import{jsx as n,jsxs as x}from"react/jsx-runtime";var s="Accordion",g=t(s),u=p=>{let{className:a,type:m="multiple",heading:o,headingElement:d="h2",helperText:l,trailingContent:f,validationText:P,validationStatus:A,...N}=i(p,e),h={heading:o,headingElement:d,helperText:l,trailingContent:f,validationText:P,validationStatus:A},v={type:m,...N};return x("div",{className:r(g,a),children:[o?n(c,{...h}):null,n(R.Root,{...v})]})};u.displayName=s;export{u as a};
2
+ //# sourceMappingURL=chunk-NR4OJSWV.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-KDZZFFY7.js";import{a as d}from"./chunk-IASCN6R2.js";import{a as s}from"./chunk-BGVTBES4.js";import{a}from"./chunk-MSHCGZ4G.js";import{b as t}from"./chunk-TXDSZ3MR.js";import{jsx as e,jsxs as x}from"react/jsx-runtime";var p="SectionHeader",l=t(p),g=({className:c,heading:H,id:f,headingElement:N="div",helperText:o,trailingContent:i,validationText:n,validationStatus:r,...u})=>{let T=r!==void 0&&n!==void 0;return x("div",{className:a(l,c),children:[e(d,{asChild:!0,size:"md",id:f,...u,children:e(N,{children:H})}),o?e(s,{children:o}):null,T?e(m,{status:r,children:n}):null,i?e("span",{className:`${l}TrailingContent`,children:i}):null]})};g.displayName=p;export{g as a};
2
- //# sourceMappingURL=chunk-MSINIKJ2.js.map
1
+ import{a as m}from"./chunk-KDZZFFY7.js";import{a as s}from"./chunk-BGVTBES4.js";import{a as d}from"./chunk-IASCN6R2.js";import{a}from"./chunk-MSHCGZ4G.js";import{b as t}from"./chunk-TXDSZ3MR.js";import{jsx as e,jsxs as x}from"react/jsx-runtime";var p="SectionHeader",l=t(p),g=({className:c,heading:H,id:f,headingElement:N="div",helperText:o,trailingContent:i,validationText:n,validationStatus:r,...u})=>{let T=r!==void 0&&n!==void 0;return x("div",{className:a(l,c),children:[e(d,{asChild:!0,size:"md",id:f,...u,children:e(N,{children:H})}),o?e(s,{children:o}):null,T?e(m,{status:r,children:n}):null,i?e("span",{className:`${l}TrailingContent`,children:i}):null]})};g.displayName=p;export{g as a};
2
+ //# sourceMappingURL=chunk-OOCWGQ7U.js.map
@@ -1,2 +1,2 @@
1
- import{a as v}from"./chunk-HP5ULTGW.js";import{a as b}from"./chunk-2XO2KEZO.js";import{a as u}from"./chunk-W6VYE222.js";import{a as h}from"./chunk-L4OZ3M5X.js";import{a as T}from"./chunk-DVGYWBKQ.js";import{a as c}from"./chunk-BMY6GUJM.js";import{a as f}from"./chunk-MSHCGZ4G.js";import{b as x}from"./chunk-TXDSZ3MR.js";import{jsx as d}from"react/jsx-runtime";var y="TextArea",z=x(y),E=P=>{let{className:g,validationStatus:e,validationText:t,label:A,labelVariant:N,helperText:o,id:I,disabled:a,readOnly:n,required:s,placeholder:F,"aria-describedby":w,resize:H,rows:O=3,minHeight:B,maxHeight:C,...D}=c(P,u),{id:l,labelId:m,helperTextId:p,validationTextId:i}=h({providedId:I,prefix:"textarea"}),r=!n&&!a,V={id:l,labelId:m,helperTextId:p,validationTextId:i,label:A,labelVariant:N,helperText:o,validationText:r?t:void 0,validationStatus:r?e:void 0,required:s},q=T(w,o?p:void 0,r&&t!==void 0?i:void 0);return d(v,{"data-validation-status":e||void 0,"data-disabled":a?"":void 0,...V,children:d(b,{asChild:!0,className:f(z,g),minHeight:B,maxHeight:C,children:d("textarea",{id:l,rows:O,required:s,disabled:a,readOnly:n,placeholder:a?void 0:F,"aria-labelledby":m,"aria-describedby":q,"aria-invalid":e==="invalid"?!0:void 0,"aria-errormessage":e==="invalid"?i:void 0,"data-resize":H,...D})})})};E.displayName=y;export{E as a};
2
- //# sourceMappingURL=chunk-JG6KNQFN.js.map
1
+ import{a as v}from"./chunk-HP5ULTGW.js";import{a as b}from"./chunk-2XO2KEZO.js";import{a as u}from"./chunk-W6VYE222.js";import{a as h}from"./chunk-L4OZ3M5X.js";import{a as T}from"./chunk-DVGYWBKQ.js";import{a as c}from"./chunk-BMY6GUJM.js";import{a as f}from"./chunk-MSHCGZ4G.js";import{b as x}from"./chunk-TXDSZ3MR.js";import{jsx as d}from"react/jsx-runtime";var y="TextArea",z=x(y),E=P=>{let{className:g,validationStatus:e,validationText:t,label:A,labelVariant:N,helperText:o,id:I,disabled:a,readOnly:n,required:s,placeholder:F,"aria-describedby":w,resize:H,rows:O=3,minHeight:B,maxHeight:C,...D}=c(P,u),{id:l,labelId:m,helperTextId:p,validationTextId:i}=h({providedId:I,prefix:"textarea"}),r=!n&&!a,V={id:l,labelId:m,helperTextId:p,validationTextId:i,label:A,labelVariant:N,helperText:o,validationText:r?t:void 0,validationStatus:r?e:void 0,required:s},q=T(w,o?p:void 0,r&&t!==void 0?i:void 0);return d(v,{"data-validation-status":e||void 0,"data-disabled":a?"":void 0,className:f(z,g),...V,children:d(b,{asChild:!0,minHeight:B,maxHeight:C,children:d("textarea",{id:l,rows:O,required:s,disabled:a,readOnly:n,placeholder:a?void 0:F,"aria-labelledby":m,"aria-describedby":q,"aria-invalid":e==="invalid"?!0:void 0,"aria-errormessage":e==="invalid"?i:void 0,"data-resize":H,...D})})})};E.displayName=y;export{E as a};
2
+ //# sourceMappingURL=chunk-PCWD2HFO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/TextArea/TextArea.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { useIds } from '../../hooks/use-ids';\nimport type { TextAreaProps } from './TextArea.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { FormField } from '../FormField/FormField';\nimport { Box } from '../Box/Box';\n\nconst COMPONENT_NAME = 'TextArea';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const TextArea = (props: TextAreaProps) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n id: providedId,\n disabled,\n readOnly,\n required,\n placeholder,\n 'aria-describedby': ariaDescribedby,\n resize,\n rows = 3,\n minHeight,\n maxHeight,\n ...textAreaProps\n } = extractProps(props, marginPropDefs);\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'textarea',\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 return (\n <FormField\n data-validation-status={validationStatus ? validationStatus : undefined}\n data-disabled={disabled ? '' : undefined}\n className={cn(componentClassName, className)}\n {...formFieldProps}\n >\n <Box asChild minHeight={minHeight} maxHeight={maxHeight}>\n <textarea\n id={id}\n rows={rows}\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 data-resize={resize}\n {...textAreaProps}\n />\n </Box>\n </FormField>\n );\n};\n\nTextArea.displayName = COMPONENT_NAME;\n"],"mappings":"gUAsEQ,cAAAA,MAAA,oBA1DR,IAAMC,EAAiB,WACjBC,EAAqBC,EAAiBF,CAAc,EAE7CG,EAAYC,GAAyB,CAChD,GAAM,CACJ,UAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,MAAAC,EACA,aAAAC,EACA,WAAAC,EACA,GAAIC,EACJ,SAAAC,EACA,SAAAC,EACA,SAAAC,EACA,YAAAC,EACA,mBAAoBC,EACpB,OAAAC,EACA,KAAAC,EAAO,EACP,UAAAC,EACA,UAAAC,EACA,GAAGC,CACL,EAAIC,EAAalB,EAAOmB,CAAc,EAEhC,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,EAAc,iBAAAC,CAAiB,EAAIC,EAAO,CAC7D,WAAAjB,EACA,OAAQ,UACV,CAAC,EAEKkB,EAAyB,CAAChB,GAAY,CAACD,EAEvCkB,EAAiB,CACrB,GAAAN,EACA,QAAAC,EACA,aAAAC,EACA,iBAAAC,EACA,MAAAnB,EACA,aAAAC,EACA,WAAAC,EACA,eAAgBmB,EAAiBtB,EAAiB,OAClD,iBAAkBsB,EAAiBvB,EAAmB,OACtD,SAAAQ,CACF,EAEMiB,EAAuBC,EAC3BhB,EACEN,EAAagB,EAAe,OAC9BG,GAAkBtB,IAAmB,OAAYoB,EAAmB,MACtE,EAEA,OACE5B,EAACkC,EAAA,CACC,yBAAwB3B,GAAsC,OAC9D,gBAAeM,EAAW,GAAK,OAC/B,UAAWsB,EAAGjC,EAAoBI,CAAS,EAC1C,GAAGyB,EAEJ,SAAA/B,EAACoC,EAAA,CAAI,QAAO,GAAC,UAAWhB,EAAW,UAAWC,EAC5C,SAAArB,EAAC,YACC,GAAIyB,EACJ,KAAMN,EACN,SAAUJ,EACV,SAAUF,EACV,SAAUC,EACV,YAAcD,EAAyB,OAAdG,EACzB,kBAAiBU,EACjB,mBAAkBM,EAClB,eAAczB,IAAqB,UAAY,GAAO,OACtD,oBAAmBA,IAAqB,UAAYqB,EAAmB,OACvE,cAAaV,EACZ,GAAGI,EACN,EACF,EACF,CAEJ,EAEAlB,EAAS,YAAcH","names":["jsx","COMPONENT_NAME","componentClassName","withGlobalPrefix","TextArea","props","className","validationStatus","validationText","label","labelVariant","helperText","providedId","disabled","readOnly","required","placeholder","ariaDescribedby","resize","rows","minHeight","maxHeight","textAreaProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","FormField","cn","Box"]}
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-3X4OUIX3.js";import{a as n}from"./chunk-BCK2XQ4L.js";import{a as s}from"./chunk-OVKYZ4TW.js";import{a as i}from"./chunk-WGT24RID.js";import{a}from"./chunk-L4OZ3M5X.js";import{a as l}from"./chunk-MSHCGZ4G.js";import{b as u}from"./chunk-TXDSZ3MR.js";import{CloseSmallIcon as E,SearchMediumIcon as C}from"@utilitywarehouse/hearth-react-icons";import*as o from"react";import{jsx as t,jsxs as H}from"react/jsx-runtime";var f="SearchInput",P=u(f),B=({className:I,disabled:c,value:r,onClear:p,loading:d,hideLabel:h=!0,helperText:S,id:y,ref:x,...b})=>{let R=o.useRef(null),e=x||R,M=o.useCallback(T=>{typeof p!="function"||T.button!==0||(p(),e&&typeof e=="object"&&e.current&&e.current.focus())},[e,p]),{id:N}=a({providedId:y,prefix:"search-input"});return H(m,{ref:e,className:l(P,I),type:"search",enterKeyHint:"search",disabled:c,hideLabel:h,helperText:S,value:r,id:N,...b,children:[t(n,{placement:"prefix",children:t(C,{})}),d?t(n,{placement:"suffix",children:t(i,{size:"xs",color:"primary"})}):null,r!==void 0&&String(r).length>0?t(n,{placement:"suffix",children:t(s,{type:"button",label:"clear search",onClick:M,disabled:c,children:t(E,{})})}):null]})};B.displayName=f;export{B as a};
2
- //# sourceMappingURL=chunk-YZFHSU4C.js.map
1
+ import{a as m}from"./chunk-IURJIQKN.js";import{a as n}from"./chunk-BCK2XQ4L.js";import{a as s}from"./chunk-OVKYZ4TW.js";import{a as i}from"./chunk-WGT24RID.js";import{a}from"./chunk-L4OZ3M5X.js";import{a as l}from"./chunk-MSHCGZ4G.js";import{b as u}from"./chunk-TXDSZ3MR.js";import{CloseSmallIcon as E,SearchMediumIcon as C}from"@utilitywarehouse/hearth-react-icons";import*as o from"react";import{jsx as t,jsxs as H}from"react/jsx-runtime";var f="SearchInput",P=u(f),B=({className:I,disabled:c,value:r,onClear:p,loading:d,hideLabel:h=!0,helperText:S,id:y,ref:x,...b})=>{let R=o.useRef(null),e=x||R,M=o.useCallback(T=>{typeof p!="function"||T.button!==0||(p(),e&&typeof e=="object"&&e.current&&e.current.focus())},[e,p]),{id:N}=a({providedId:y,prefix:"search-input"});return H(m,{ref:e,className:l(P,I),type:"search",enterKeyHint:"search",disabled:c,hideLabel:h,helperText:S,value:r,id:N,...b,children:[t(n,{placement:"prefix",children:t(C,{})}),d?t(n,{placement:"suffix",children:t(i,{size:"xs",color:"primary"})}):null,r!==void 0&&String(r).length>0?t(n,{placement:"suffix",children:t(s,{type:"button",label:"clear search",onClick:M,disabled:c,children:t(E,{})})}):null]})};B.displayName=f;export{B as a};
2
+ //# sourceMappingURL=chunk-PEIZ5YXW.js.map
@@ -1,2 +1,2 @@
1
- import{a as E}from"./chunk-3X4OUIX3.js";import{a as x}from"./chunk-MMQEBBH2.js";import{a as T}from"./chunk-BCK2XQ4L.js";import{a as R}from"./chunk-MSHCGZ4G.js";import{b as v}from"./chunk-TXDSZ3MR.js";import*as r from"react";import{jsx as p}from"react/jsx-runtime";var P="CurrencyInput",z=v(P),O=({className:D,disabled:M,value:f,onChange:g,placeholder:N="0.00",disableGroupSeparators:d,ref:V,...b})=>{let[w,S]=r.useState(""),B=r.useRef(null),o=r.useRef(null),t=V||B,h=f!==void 0,C=h?String(f??""):w,i=e=>{if(!e)return"";let c=e.split("."),n=c[0]||"";d||(n=n.replace(/\B(?=(\d{3})+(?!\d))/g,","));let s=c[1];return s!==void 0?n+"."+s:n},H=e=>{let c=e.target.value,n=e.target.selectionStart||0,s=i(C),y=c.replace(/[^\d.]/g,""),u=y.split("."),I=u.length>2?u[0]+"."+u.slice(1).join(""):y,m=I.split("."),a=m[1]!==void 0?m[0]+"."+m[1].substring(0,2):I;if(d)o.current=null;else{let l=i(a),L=(s.slice(0,Math.min(n,s.length)).match(/,/g)||[]).length,j=(l.slice(0,Math.min(n,l.length)).match(/,/g)||[]).length-L;o.current=n+j}if(h||S(a),g&&t&&typeof t=="object"&&t.current){let l={...e,target:{...e.target,value:a},currentTarget:{...e.currentTarget,value:a}};g(l)}};return r.useEffect(()=>{t&&typeof t=="object"&&t.current&&o.current!==null&&(t.current.setSelectionRange(o.current,o.current),o.current=null)}),p(E,{ref:t,className:R(z,D),type:"text",inputMode:"decimal",disabled:M,value:i(C),onChange:H,placeholder:N,...b,children:p(T,{placement:"prefix",children:p(x,{size:"3xl",children:"\xA3"})})})};O.displayName=P;export{O as a};
2
- //# sourceMappingURL=chunk-CQREUEXQ.js.map
1
+ import{a as E}from"./chunk-IURJIQKN.js";import{a as x}from"./chunk-MMQEBBH2.js";import{a as T}from"./chunk-BCK2XQ4L.js";import{a as R}from"./chunk-MSHCGZ4G.js";import{b as v}from"./chunk-TXDSZ3MR.js";import*as r from"react";import{jsx as p}from"react/jsx-runtime";var P="CurrencyInput",z=v(P),O=({className:D,disabled:M,value:f,onChange:g,placeholder:N="0.00",disableGroupSeparators:d,ref:V,...b})=>{let[w,S]=r.useState(""),B=r.useRef(null),o=r.useRef(null),t=V||B,h=f!==void 0,C=h?String(f??""):w,i=e=>{if(!e)return"";let c=e.split("."),n=c[0]||"";d||(n=n.replace(/\B(?=(\d{3})+(?!\d))/g,","));let s=c[1];return s!==void 0?n+"."+s:n},H=e=>{let c=e.target.value,n=e.target.selectionStart||0,s=i(C),y=c.replace(/[^\d.]/g,""),u=y.split("."),I=u.length>2?u[0]+"."+u.slice(1).join(""):y,m=I.split("."),a=m[1]!==void 0?m[0]+"."+m[1].substring(0,2):I;if(d)o.current=null;else{let l=i(a),L=(s.slice(0,Math.min(n,s.length)).match(/,/g)||[]).length,j=(l.slice(0,Math.min(n,l.length)).match(/,/g)||[]).length-L;o.current=n+j}if(h||S(a),g&&t&&typeof t=="object"&&t.current){let l={...e,target:{...e.target,value:a},currentTarget:{...e.currentTarget,value:a}};g(l)}};return r.useEffect(()=>{t&&typeof t=="object"&&t.current&&o.current!==null&&(t.current.setSelectionRange(o.current,o.current),o.current=null)}),p(E,{ref:t,className:R(z,D),type:"text",inputMode:"decimal",disabled:M,value:i(C),onChange:H,placeholder:N,...b,children:p(T,{placement:"prefix",children:p(x,{size:"3xl",children:"\xA3"})})})};O.displayName=P;export{O as a};
2
+ //# sourceMappingURL=chunk-QCMTR2BT.js.map
@@ -1,2 +1,2 @@
1
- import{a as g}from"./chunk-GENAMX6B.js";import{a as f}from"./chunk-2XO2KEZO.js";import{a as N}from"./chunk-MSINIKJ2.js";import{a as c}from"./chunk-W6VYE222.js";import{a as p}from"./chunk-BMY6GUJM.js";import{a as m}from"./chunk-MSHCGZ4G.js";import{b as l}from"./chunk-TXDSZ3MR.js";import{jsx as o,jsxs as y}from"react/jsx-runtime";var P="List",t=l(P),b=h=>{let{as:e="ul",className:u,colorScheme:i=void 0,variant:a,heading:r,headingElement:C,helperText:v,trailingContent:x,validationText:T,validationStatus:L,children:n,paddingNone:S,...s}=p(h,c),E={heading:r,headingElement:C,helperText:v,trailingContent:x,validationText:T,validationStatus:L},d={"data-padding-none":S?"":void 0};return y("div",{className:m(t,u),children:[r?o(N,{...E}):null,a===void 0||i===void 0?o(f,{asChild:!0,className:`${t}Container`,role:"list",...d,children:o(e,{...s,children:n})}):o(g,{className:`${t}Container`,paddingNone:!0,variant:a,colorScheme:i,children:o(e,{role:"list",...s,...d,children:n})})]})};b.displayName=P;export{b as a};
2
- //# sourceMappingURL=chunk-HTEERNAS.js.map
1
+ import{a as g}from"./chunk-GENAMX6B.js";import{a as f}from"./chunk-2XO2KEZO.js";import{a as N}from"./chunk-OOCWGQ7U.js";import{a as c}from"./chunk-W6VYE222.js";import{a as p}from"./chunk-BMY6GUJM.js";import{a as m}from"./chunk-MSHCGZ4G.js";import{b as l}from"./chunk-TXDSZ3MR.js";import{jsx as o,jsxs as y}from"react/jsx-runtime";var P="List",t=l(P),b=h=>{let{as:e="ul",className:u,colorScheme:i=void 0,variant:a,heading:r,headingElement:C,helperText:v,trailingContent:x,validationText:T,validationStatus:L,children:n,paddingNone:S,...s}=p(h,c),E={heading:r,headingElement:C,helperText:v,trailingContent:x,validationText:T,validationStatus:L},d={"data-padding-none":S?"":void 0};return y("div",{className:m(t,u),children:[r?o(N,{...E}):null,a===void 0||i===void 0?o(f,{asChild:!0,className:`${t}Container`,role:"list",...d,children:o(e,{...s,children:n})}):o(g,{className:`${t}Container`,paddingNone:!0,variant:a,colorScheme:i,children:o(e,{role:"list",...s,...d,children:n})})]})};b.displayName=P;export{b as a};
2
+ //# sourceMappingURL=chunk-QEKBLSE3.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZQ7NMBKBcjs = require('./chunk-ZQ7NMBKB.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var s="Accordion",g=_chunk7LZI6HLWcjs.b.call(void 0, s),u= exports.a =p=>{let{className:a,type:m="multiple",heading:o,headingElement:d="h2",helperText:l,trailingContent:f,validationText:P,validationStatus:A,...N}=_chunkVCSJTDQRcjs.a.call(void 0, p,_chunkRDNRX35Pcjs.a),h={heading:o,headingElement:d,helperText:l,trailingContent:f,validationText:P,validationStatus:A},v={type:m,...N};return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkGVVJQBRKcjs.a.call(void 0, g,a),children:[o?_jsxruntime.jsx.call(void 0, _chunkZQ7NMBKBcjs.a,{...h}):null,_jsxruntime.jsx.call(void 0, _radixui.Accordion.Root,{...v})]})};u.displayName=s;exports.a = u;
2
- //# sourceMappingURL=chunk-2I2OGFJW.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkM4MJVBSHcjs = require('./chunk-M4MJVBSH.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkVCSJTDQRcjs = require('./chunk-VCSJTDQR.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var s="Accordion",g=_chunk7LZI6HLWcjs.b.call(void 0, s),u= exports.a =p=>{let{className:a,type:m="multiple",heading:o,headingElement:d="h2",helperText:l,trailingContent:f,validationText:P,validationStatus:A,...N}=_chunkVCSJTDQRcjs.a.call(void 0, p,_chunkRDNRX35Pcjs.a),h={heading:o,headingElement:d,helperText:l,trailingContent:f,validationText:P,validationStatus:A},v={type:m,...N};return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkGVVJQBRKcjs.a.call(void 0, g,a),children:[o?_jsxruntime.jsx.call(void 0, _chunkM4MJVBSHcjs.a,{...h}):null,_jsxruntime.jsx.call(void 0, _radixui.Accordion.Root,{...v})]})};u.displayName=s;exports.a = u;
2
+ //# sourceMappingURL=chunk-TWJIJADO.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-2I2OGFJW.cjs","../src/components/Accordion/Accordion.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Accordion","props","className","type","heading","headingElement","helperText","trailingContent","validationText","validationStatus","restProps","extractProps","marginPropDefs","sectionHeaderProps","accordionProps","jsxs","cn","jsx","SectionHeader","AccordionPrimitive"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,mCCM5J,+CAmC5C,IA9BEA,CAAAA,CAAiB,WAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAaC,CAAAA,EAA0B,CAClD,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CAAO,UAAA,CACP,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CAAiB,IAAA,CACjB,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaV,CAAOW,mBAAc,CAAA,CAEhCC,CAAAA,CAAqB,CACzB,OAAA,CAAAT,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CAEMK,CAAAA,CAAiB,CAAE,IAAA,CAAAX,CAAAA,CAAM,GAAGO,CAAU,CAAA,CAI5C,OACEK,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,iCAAAA,CAAGlB,CAAoBI,CAAS,CAAA,CAC7C,QAAA,CAAA,CAAAE,CAAAA,CAAUa,6BAAAA,mBAACC,CAAA,CAAe,GAAGL,CAAAA,CAAoB,CAAA,CAAK,IAAA,CACvDI,6BAAAA,kBAACE,CAAmB,IAAA,CAAnB,CAAyB,GAAGL,CAAAA,CAAgB,CAAA,CAAA,CAC/C,CAEJ,CAAA,CAEAd,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-2I2OGFJW.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { AccordionProps } from './Accordion.props';\nimport { Accordion as AccordionPrimitive } from 'radix-ui';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst COMPONENT_NAME = 'Accordion';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const Accordion = (props: AccordionProps) => {\n const {\n className,\n type = 'multiple',\n heading,\n headingElement = 'h2',\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n ...restProps\n } = extractProps(props, marginPropDefs);\n\n const sectionHeaderProps = {\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n };\n\n const accordionProps = { type, ...restProps } as React.ComponentPropsWithRef<\n typeof AccordionPrimitive.Root\n >;\n\n return (\n <div className={cn(componentClassName, className)}>\n {heading ? <SectionHeader {...sectionHeaderProps} /> : null}\n <AccordionPrimitive.Root {...accordionProps} />\n </div>\n );\n};\n\nAccordion.displayName = COMPONENT_NAME;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-TWJIJADO.cjs","../src/components/Accordion/Accordion.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Accordion","props","className","type","heading","headingElement","helperText","trailingContent","validationText","validationStatus","restProps","extractProps","marginPropDefs","sectionHeaderProps","accordionProps","jsxs","cn","jsx","SectionHeader","AccordionPrimitive"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,mCCM5J,+CAmC5C,IA9BEA,CAAAA,CAAiB,WAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAaC,CAAAA,EAA0B,CAClD,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CAAO,UAAA,CACP,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CAAiB,IAAA,CACjB,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaV,CAAOW,mBAAc,CAAA,CAEhCC,CAAAA,CAAqB,CACzB,OAAA,CAAAT,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CAEMK,CAAAA,CAAiB,CAAE,IAAA,CAAAX,CAAAA,CAAM,GAAGO,CAAU,CAAA,CAI5C,OACEK,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,iCAAAA,CAAGlB,CAAoBI,CAAS,CAAA,CAC7C,QAAA,CAAA,CAAAE,CAAAA,CAAUa,6BAAAA,mBAACC,CAAA,CAAe,GAAGL,CAAAA,CAAoB,CAAA,CAAK,IAAA,CACvDI,6BAAAA,kBAACE,CAAmB,IAAA,CAAnB,CAAyB,GAAGL,CAAAA,CAAgB,CAAA,CAAA,CAC/C,CAEJ,CAAA,CAEAd,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-TWJIJADO.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { AccordionProps } from './Accordion.props';\nimport { Accordion as AccordionPrimitive } from 'radix-ui';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst COMPONENT_NAME = 'Accordion';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const Accordion = (props: AccordionProps) => {\n const {\n className,\n type = 'multiple',\n heading,\n headingElement = 'h2',\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n ...restProps\n } = extractProps(props, marginPropDefs);\n\n const sectionHeaderProps = {\n heading,\n headingElement,\n helperText,\n trailingContent,\n validationText,\n validationStatus,\n };\n\n const accordionProps = { type, ...restProps } as React.ComponentPropsWithRef<\n typeof AccordionPrimitive.Root\n >;\n\n return (\n <div className={cn(componentClassName, className)}>\n {heading ? <SectionHeader {...sectionHeaderProps} /> : null}\n <AccordionPrimitive.Root {...accordionProps} />\n </div>\n );\n};\n\nAccordion.displayName = COMPONENT_NAME;\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkRAGTJ42Ocjs = require('./chunk-RAGTJ42O.cjs');var _chunkRH3MHHIScjs = require('./chunk-RH3MHHIS.cjs');var _chunkAGPVWUNAcjs = require('./chunk-AGPVWUNA.cjs');var _chunkT3TZBSFXcjs = require('./chunk-T3TZBSFX.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _react = require('react'); var o = _interopRequireWildcard(_react);var _jsxruntime = require('react/jsx-runtime');var f="SearchInput",P=_chunk7LZI6HLWcjs.b.call(void 0, f),B= exports.a =({className:I,disabled:c,value:r,onClear:p,loading:d,hideLabel:h=!0,helperText:S,id:y,ref:x,...b})=>{let R=o.useRef(null),e=x||R,M=o.useCallback(T=>{typeof p!="function"||T.button!==0||(p(),e&&typeof e=="object"&&e.current&&e.current.focus())},[e,p]),{id:N}=_chunkITZEACMWcjs.a.call(void 0, {providedId:y,prefix:"search-input"});return _jsxruntime.jsxs.call(void 0, _chunkRAGTJ42Ocjs.a,{ref:e,className:_chunkGVVJQBRKcjs.a.call(void 0, P,I),type:"search",enterKeyHint:"search",disabled:c,hideLabel:h,helperText:S,value:r,id:N,...b,children:[_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"prefix",children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SearchMediumIcon,{})}),d?_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkT3TZBSFXcjs.a,{size:"xs",color:"primary"})}):null,r!==void 0&&String(r).length>0?_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkAGPVWUNAcjs.a,{type:"button",label:"clear search",onClick:M,disabled:c,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.CloseSmallIcon,{})})}):null]})};B.displayName=f;exports.a = B;
2
- //# sourceMappingURL=chunk-MUI6HRA4.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunk54YG4VNBcjs = require('./chunk-54YG4VNB.cjs');var _chunkRH3MHHIScjs = require('./chunk-RH3MHHIS.cjs');var _chunkAGPVWUNAcjs = require('./chunk-AGPVWUNA.cjs');var _chunkT3TZBSFXcjs = require('./chunk-T3TZBSFX.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _react = require('react'); var o = _interopRequireWildcard(_react);var _jsxruntime = require('react/jsx-runtime');var f="SearchInput",P=_chunk7LZI6HLWcjs.b.call(void 0, f),B= exports.a =({className:I,disabled:c,value:r,onClear:p,loading:d,hideLabel:h=!0,helperText:S,id:y,ref:x,...b})=>{let R=o.useRef(null),e=x||R,M=o.useCallback(T=>{typeof p!="function"||T.button!==0||(p(),e&&typeof e=="object"&&e.current&&e.current.focus())},[e,p]),{id:N}=_chunkITZEACMWcjs.a.call(void 0, {providedId:y,prefix:"search-input"});return _jsxruntime.jsxs.call(void 0, _chunk54YG4VNBcjs.a,{ref:e,className:_chunkGVVJQBRKcjs.a.call(void 0, P,I),type:"search",enterKeyHint:"search",disabled:c,hideLabel:h,helperText:S,value:r,id:N,...b,children:[_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"prefix",children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SearchMediumIcon,{})}),d?_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkT3TZBSFXcjs.a,{size:"xs",color:"primary"})}):null,r!==void 0&&String(r).length>0?_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkAGPVWUNAcjs.a,{type:"button",label:"clear search",onClick:M,disabled:c,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.CloseSmallIcon,{})})}):null]})};B.displayName=f;exports.a = B;
2
+ //# sourceMappingURL=chunk-ZFWAO4WB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-MUI6HRA4.cjs","../src/components/SearchInput/SearchInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","SearchInput","className","disabled","value","onClear","loading","hideLabel","helperText","providedId","forwardedRef","props","defaultRef","inputRef","handleClear","event","id","useIds","jsxs","TextInput","cn","jsx","InputSlot","SearchMediumIcon","Spinner","UnstyledIconButton","CloseSmallIcon"],"mappings":"AAAA,mZAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,wDAAyC,wECSxO,uEAE1B,+CAqCnB,IAnCEA,CAAAA,CAAiB,aAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAc,CAAC,CAC1B,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CAAY,CAAA,CAAA,CACZ,UAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,GAAA,CAAKC,CAAAA,CACL,GAAGC,CACL,CAAA,CAAA,EAAwB,CACtB,IAAMC,CAAAA,CAAmB,CAAA,CAAA,MAAA,CAAgC,IAAI,CAAA,CACvDC,CAAAA,CAAWH,CAAAA,EAAgBE,CAAAA,CAE3BE,CAAAA,CAAoB,CAAA,CAAA,WAAA,CACvBC,CAAAA,EAA+C,CAC1C,OAAOV,CAAAA,EAAY,UAAA,EAAcU,CAAAA,CAAM,MAAA,GAAW,CAAA,EAAA,CAGtDV,CAAAA,CAAQ,CAAA,CAEJQ,CAAAA,EAAY,OAAOA,CAAAA,EAAa,QAAA,EAAYA,CAAAA,CAAS,OAAA,EACvDA,CAAAA,CAAS,OAAA,CAAQ,KAAA,CAAM,CAAA,CAE3B,CAAA,CACA,CAACA,CAAAA,CAAUR,CAAO,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/home/runner/work/hearth/hearth/packages/react/dist/chunk-MUI6HRA4.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { cn } from '../../helpers/cn';\nimport { TextInput } from '../TextInput/TextInput';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport type { SearchInputProps } from './SearchInput.props';\nimport { Spinner } from '../Spinner/Spinner';\nimport { CloseSmallIcon, SearchMediumIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useIds } from '../../hooks/use-ids';\nimport * as React from 'react';\n\nconst COMPONENT_NAME = 'SearchInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const SearchInput = ({\n className,\n disabled,\n value,\n onClear,\n loading,\n hideLabel = true,\n helperText,\n id: providedId,\n ref: forwardedRef,\n ...props\n}: SearchInputProps) => {\n const defaultRef = React.useRef<HTMLInputElement | null>(null);\n const inputRef = forwardedRef || defaultRef;\n\n const handleClear = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (typeof onClear !== 'function' || event.button !== 0) {\n return;\n }\n onClear();\n\n if (inputRef && typeof inputRef === 'object' && inputRef.current) {\n inputRef.current.focus();\n }\n },\n [inputRef, onClear]\n );\n\n const { id } = useIds({ providedId, prefix: 'search-input' });\n\n return (\n <TextInput\n ref={inputRef}\n className={cn(componentClassName, className)}\n type=\"search\"\n enterKeyHint=\"search\"\n disabled={disabled}\n hideLabel={hideLabel}\n helperText={helperText}\n value={value}\n id={id}\n {...props}\n >\n <InputSlot placement=\"prefix\">\n <SearchMediumIcon />\n </InputSlot>\n {loading ? (\n <InputSlot placement=\"suffix\">\n <Spinner size=\"xs\" color=\"primary\" />\n </InputSlot>\n ) : null}\n {value !== undefined && String(value).length > 0 ? (\n <InputSlot placement=\"suffix\">\n <UnstyledIconButton\n type=\"button\"\n label=\"clear search\"\n onClick={handleClear}\n disabled={disabled}\n >\n <CloseSmallIcon />\n </UnstyledIconButton>\n </InputSlot>\n ) : null}\n </TextInput>\n );\n};\n\nSearchInput.displayName = COMPONENT_NAME;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZFWAO4WB.cjs","../src/components/SearchInput/SearchInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","SearchInput","className","disabled","value","onClear","loading","hideLabel","helperText","providedId","forwardedRef","props","defaultRef","inputRef","handleClear","event","id","useIds","jsxs","TextInput","cn","jsx","InputSlot","SearchMediumIcon","Spinner","UnstyledIconButton","CloseSmallIcon"],"mappings":"AAAA,mZAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,wDAAyC,wECSxO,uEAE1B,+CAqCnB,IAnCEA,CAAAA,CAAiB,aAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAc,CAAC,CAC1B,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CAAY,CAAA,CAAA,CACZ,UAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,GAAA,CAAKC,CAAAA,CACL,GAAGC,CACL,CAAA,CAAA,EAAwB,CACtB,IAAMC,CAAAA,CAAmB,CAAA,CAAA,MAAA,CAAgC,IAAI,CAAA,CACvDC,CAAAA,CAAWH,CAAAA,EAAgBE,CAAAA,CAE3BE,CAAAA,CAAoB,CAAA,CAAA,WAAA,CACvBC,CAAAA,EAA+C,CAC1C,OAAOV,CAAAA,EAAY,UAAA,EAAcU,CAAAA,CAAM,MAAA,GAAW,CAAA,EAAA,CAGtDV,CAAAA,CAAQ,CAAA,CAEJQ,CAAAA,EAAY,OAAOA,CAAAA,EAAa,QAAA,EAAYA,CAAAA,CAAS,OAAA,EACvDA,C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AA,CAAA,CACN,CAEJ,CAAA,CAEAzB,CAAAA,CAAY,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZFWAO4WB.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { cn } from '../../helpers/cn';\nimport { TextInput } from '../TextInput/TextInput';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport type { SearchInputProps } from './SearchInput.props';\nimport { Spinner } from '../Spinner/Spinner';\nimport { CloseSmallIcon, SearchMediumIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useIds } from '../../hooks/use-ids';\nimport * as React from 'react';\n\nconst COMPONENT_NAME = 'SearchInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const SearchInput = ({\n className,\n disabled,\n value,\n onClear,\n loading,\n hideLabel = true,\n helperText,\n id: providedId,\n ref: forwardedRef,\n ...props\n}: SearchInputProps) => {\n const defaultRef = React.useRef<HTMLInputElement | null>(null);\n const inputRef = forwardedRef || defaultRef;\n\n const handleClear = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (typeof onClear !== 'function' || event.button !== 0) {\n return;\n }\n onClear();\n\n if (inputRef && typeof inputRef === 'object' && inputRef.current) {\n inputRef.current.focus();\n }\n },\n [inputRef, onClear]\n );\n\n const { id } = useIds({ providedId, prefix: 'search-input' });\n\n return (\n <TextInput\n ref={inputRef}\n className={cn(componentClassName, className)}\n type=\"search\"\n enterKeyHint=\"search\"\n disabled={disabled}\n hideLabel={hideLabel}\n helperText={helperText}\n value={value}\n id={id}\n {...props}\n >\n <InputSlot placement=\"prefix\">\n <SearchMediumIcon />\n </InputSlot>\n {loading ? (\n <InputSlot placement=\"suffix\">\n <Spinner size=\"xs\" color=\"primary\" />\n </InputSlot>\n ) : null}\n {value !== undefined && String(value).length > 0 ? (\n <InputSlot placement=\"suffix\">\n <UnstyledIconButton\n type=\"button\"\n label=\"clear search\"\n onClick={handleClear}\n disabled={disabled}\n >\n <CloseSmallIcon />\n </UnstyledIconButton>\n </InputSlot>\n ) : null}\n </TextInput>\n );\n};\n\nSearchInput.displayName = COMPONENT_NAME;\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkRAGTJ42Ocjs = require('./chunk-RAGTJ42O.cjs');var _chunk5FIJOHVScjs = require('./chunk-5FIJOHVS.cjs');var _chunkRH3MHHIScjs = require('./chunk-RH3MHHIS.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _react = require('react'); var r = _interopRequireWildcard(_react);var _jsxruntime = require('react/jsx-runtime');var P="CurrencyInput",z=_chunk7LZI6HLWcjs.b.call(void 0, P),O= exports.a =({className:D,disabled:M,value:f,onChange:g,placeholder:N="0.00",disableGroupSeparators:d,ref:V,...b})=>{let[w,S]=r.useState(""),B=r.useRef(null),o=r.useRef(null),t=V||B,h=f!==void 0,C=h?String(_nullishCoalesce(f, () => (""))):w,i=e=>{if(!e)return"";let c=e.split("."),n=c[0]||"";d||(n=n.replace(/\B(?=(\d{3})+(?!\d))/g,","));let s=c[1];return s!==void 0?n+"."+s:n},H=e=>{let c=e.target.value,n=e.target.selectionStart||0,s=i(C),y=c.replace(/[^\d.]/g,""),u=y.split("."),I=u.length>2?u[0]+"."+u.slice(1).join(""):y,m=I.split("."),a=m[1]!==void 0?m[0]+"."+m[1].substring(0,2):I;if(d)o.current=null;else{let l=i(a),L=(s.slice(0,Math.min(n,s.length)).match(/,/g)||[]).length,j=(l.slice(0,Math.min(n,l.length)).match(/,/g)||[]).length-L;o.current=n+j}if(h||S(a),g&&t&&typeof t=="object"&&t.current){let l={...e,target:{...e.target,value:a},currentTarget:{...e.currentTarget,value:a}};g(l)}};return r.useEffect(()=>{t&&typeof t=="object"&&t.current&&o.current!==null&&(t.current.setSelectionRange(o.current,o.current),o.current=null)}),_jsxruntime.jsx.call(void 0, _chunkRAGTJ42Ocjs.a,{ref:t,className:_chunkGVVJQBRKcjs.a.call(void 0, z,D),type:"text",inputMode:"decimal",disabled:M,value:i(C),onChange:H,placeholder:N,...b,children:_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"prefix",children:_jsxruntime.jsx.call(void 0, _chunk5FIJOHVScjs.a,{size:"3xl",children:"\xA3"})})})};O.displayName=P;exports.a = O;
2
- //# sourceMappingURL=chunk-ZWMK4MOC.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunk54YG4VNBcjs = require('./chunk-54YG4VNB.cjs');var _chunk5FIJOHVScjs = require('./chunk-5FIJOHVS.cjs');var _chunkRH3MHHIScjs = require('./chunk-RH3MHHIS.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _react = require('react'); var r = _interopRequireWildcard(_react);var _jsxruntime = require('react/jsx-runtime');var P="CurrencyInput",z=_chunk7LZI6HLWcjs.b.call(void 0, P),O= exports.a =({className:D,disabled:M,value:f,onChange:g,placeholder:N="0.00",disableGroupSeparators:d,ref:V,...b})=>{let[w,S]=r.useState(""),B=r.useRef(null),o=r.useRef(null),t=V||B,h=f!==void 0,C=h?String(_nullishCoalesce(f, () => (""))):w,i=e=>{if(!e)return"";let c=e.split("."),n=c[0]||"";d||(n=n.replace(/\B(?=(\d{3})+(?!\d))/g,","));let s=c[1];return s!==void 0?n+"."+s:n},H=e=>{let c=e.target.value,n=e.target.selectionStart||0,s=i(C),y=c.replace(/[^\d.]/g,""),u=y.split("."),I=u.length>2?u[0]+"."+u.slice(1).join(""):y,m=I.split("."),a=m[1]!==void 0?m[0]+"."+m[1].substring(0,2):I;if(d)o.current=null;else{let l=i(a),L=(s.slice(0,Math.min(n,s.length)).match(/,/g)||[]).length,j=(l.slice(0,Math.min(n,l.length)).match(/,/g)||[]).length-L;o.current=n+j}if(h||S(a),g&&t&&typeof t=="object"&&t.current){let l={...e,target:{...e.target,value:a},currentTarget:{...e.currentTarget,value:a}};g(l)}};return r.useEffect(()=>{t&&typeof t=="object"&&t.current&&o.current!==null&&(t.current.setSelectionRange(o.current,o.current),o.current=null)}),_jsxruntime.jsx.call(void 0, _chunk54YG4VNBcjs.a,{ref:t,className:_chunkGVVJQBRKcjs.a.call(void 0, z,D),type:"text",inputMode:"decimal",disabled:M,value:i(C),onChange:H,placeholder:N,...b,children:_jsxruntime.jsx.call(void 0, _chunkRH3MHHIScjs.a,{placement:"prefix",children:_jsxruntime.jsx.call(void 0, _chunk5FIJOHVScjs.a,{size:"3xl",children:"\xA3"})})})};O.displayName=P;exports.a = O;
2
+ //# sourceMappingURL=chunk-ZZOECKRZ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZWMK4MOC.cjs","../src/components/CurrencyInput/CurrencyInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","CurrencyInput","className","disabled","controlledValue","onChange","placeholder","disableGroupSeparators","forwardedRef","props","internalValue","setInternalValue","localRef","cursorPositionRef","inputRef","isControlled","numericValue","formatValue","value","parts","integerPart","decimalPart","handleChange","input","cursorPosition","previousDisplayValue","cleaned","sanitized","finalParts","limitedValue","newDisplayValue","oldCommasBeforeCursor","commaDiff","syntheticEvent","jsx","TextInput","cn","InputSlot","DetailText"],"mappings":"AAAA,ufAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECErL,+CAmIf,IA1HFA,CAAAA,CAAiB,eAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAgB,CAAC,CAC5B,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAOC,CAAAA,CACP,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,MAAA,CACd,sBAAA,CAAAC,CAAAA,CACA,GAAA,CAAKC,CAAAA,CACL,GAAGC,CACL,CAAA,CAAA,EAA0B,CAExB,GAAM,CAACC,CAAAA,CAAeC,CAAgB,CAAA,CAAU,CAAA,CAAA,QAAA,CAAiB,EAAE,CAAA,CAC7DC,CAAAA,CAAiB,CAAA,CAAA,MAAA,CAAyB,IAAI,CAAA,CAC9CC,CAAAA,CAA0B,CAAA,CAAA,MAAA,CAAsB,IAAI,CAAA,CAGpDC,CAAAA,CAAWN,CAAAA,EAAgBI,CAAAA,CAE3BG,CAAAA,CAAeX,CAAAA,GAAoB,KAAA,CAAA,CACnCY,CAAAA,CAAeD,CAAAA,CAAe,MAAA,kBAAOX,CAAAA,SAAmB,IAAE,CAAA,CAAIM,CAAAA,CAG9DO,CAAAA,CAAeC,CAAAA,EAA0B,CAC7C,EAAA,CAAI,CAACA,CAAAA,CAAO,MAAO,EAAA,CAEnB,IAAMC,CAAAA,CAAQD,CAAAA,CAAM,KAAA,CAAM,GAAG,CAAA,CACzBE,CAAAA,CAAcD,CAAAA,CAAM,CAAC,CAAA,EAAK,EAAA,CAEzBZ,CAAAA,EAAAA,CACHa,CAAAA,CAAcA,CAAAA,CAAY,OAAA,CAAQ,uBAAA,CAAyB,GA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AA,CACL,SAAA,CAAU,SAAA,CACV,QAAA,CAAUC,CAAAA,CACV,KAAA,CAAOc,CAAAA,CAAYD,CAAY,CAAA,CAC/B,QAAA,CAAUM,CAAAA,CACV,WAAA,CAAahB,CAAAA,CACZ,GAAGG,CAAAA,CAEJ,QAAA,CAAAyB,6BAAAA,mBAACG,CAAA,CAAU,SAAA,CAAU,QAAA,CACnB,QAAA,CAAAH,6BAAAA,mBAACI,CAAA,CAAW,IAAA,CAAK,KAAA,CAAM,QAAA,CAAA,MAAA,CAAC,CAAA,CAC1B,CAAA,CACF,CAEJ,CAAA,CAEArC,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZWMK4MOC.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../helpers/cn';\nimport type { ChangeEvent } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { TextInput } from '../TextInput/TextInput';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport type { CurrencyInputProps } from './CurrencyInput.props';\nimport { DetailText } from '../DetailText/DetailText';\n\nconst COMPONENT_NAME = 'CurrencyInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const CurrencyInput = ({\n className,\n disabled,\n value: controlledValue,\n onChange,\n placeholder = '0.00',\n disableGroupSeparators,\n ref: forwardedRef,\n ...props\n}: CurrencyInputProps) => {\n const maxDecimals = 2;\n const [internalValue, setInternalValue] = React.useState<string>('');\n const localRef = React.useRef<HTMLInputElement>(null);\n const cursorPositionRef = React.useRef<number | null>(null);\n\n // Use forwarded ref if provided, otherwise use internal ref\n const inputRef = forwardedRef || localRef;\n\n const isControlled = controlledValue !== undefined;\n const numericValue = isControlled ? String(controlledValue ?? '') : internalValue;\n\n // Format value for display\n const formatValue = (value: string): string => {\n if (!value) return '';\n\n const parts = value.split('.');\n let integerPart = parts[0] || '';\n\n if (!disableGroupSeparators) {\n integerPart = integerPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n }\n\n const decimalPart = parts[1];\n return decimalPart !== undefined ? integerPart + '.' + decimalPart : integerPart;\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>): void => {\n const input = e.target.value;\n const cursorPosition = e.target.selectionStart || 0;\n const previousDisplayValue = formatValue(numericValue);\n\n // Remove all non-digits except decimal\n const cleaned = input.replace(/[^\\d.]/g, '');\n\n // Ensure only one decimal point\n const parts = cleaned.split('.');\n const sanitized = parts.length > 2 ? parts[0] + '.' + parts.slice(1).join('') : cleaned;\n\n // Limit decimal places\n const finalParts = sanitized.split('.');\n const limitedValue =\n finalParts[1] !== undefined\n ? finalParts[0] + '.' + finalParts[1].substring(0, maxDecimals)\n : sanitized;\n\n // Calculate new cursor position\n if (!disableGroupSeparators) {\n const newDisplayValue = formatValue(limitedValue);\n const oldCommasBeforeCursor = (\n previousDisplayValue\n .slice(0, Math.min(cursorPosition, previousDisplayValue.length))\n .match(/,/g) || []\n ).length;\n const newCommasBeforeCursor = (\n newDisplayValue.slice(0, Math.min(cursorPosition, newDisplayValue.length)).match(/,/g) || []\n ).length;\n const commaDiff = newCommasBeforeCursor - oldCommasBeforeCursor;\n cursorPositionRef.current = cursorPosition + commaDiff;\n } else {\n cursorPositionRef.current = null;\n }\n if (!isControlled) {\n setInternalValue(limitedValue);\n }\n\n // Return numeric value WITHOUT commas\n if (onChange && inputRef && typeof inputRef === 'object' && inputRef.current) {\n const syntheticEvent = {\n ...e,\n target: {\n ...e.target,\n value: limitedValue, // Raw numeric value without commas\n },\n currentTarget: {\n ...e.currentTarget,\n value: limitedValue,\n },\n } as ChangeEvent<HTMLInputElement>;\n\n onChange(syntheticEvent);\n }\n };\n\n // Restore cursor position after render\n React.useEffect(() => {\n if (\n inputRef &&\n typeof inputRef === 'object' &&\n inputRef.current &&\n cursorPositionRef.current !== null\n ) {\n inputRef.current.setSelectionRange(cursorPositionRef.current, cursorPositionRef.current);\n cursorPositionRef.current = null;\n }\n });\n\n return (\n <TextInput\n ref={inputRef}\n className={cn(componentClassName, className)}\n type=\"text\"\n inputMode=\"decimal\"\n disabled={disabled}\n value={formatValue(numericValue)} // Display with commas\n onChange={handleChange}\n placeholder={placeholder}\n {...props}\n >\n <InputSlot placement=\"prefix\">\n <DetailText size=\"3xl\">£</DetailText>\n </InputSlot>\n </TextInput>\n );\n};\n\nCurrencyInput.displayName = COMPONENT_NAME;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZZOECKRZ.cjs","../src/components/CurrencyInput/CurrencyInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","CurrencyInput","className","disabled","controlledValue","onChange","placeholder","disableGroupSeparators","forwardedRef","props","internalValue","setInternalValue","localRef","cursorPositionRef","inputRef","isControlled","numericValue","formatValue","value","parts","integerPart","decimalPart","handleChange","input","cursorPosition","previousDisplayValue","cleaned","sanitized","finalParts","limitedValue","newDisplayValue","oldCommasBeforeCursor","commaDiff","syntheticEvent","jsx","TextInput","cn","InputSlot","DetailText"],"mappings":"AAAA,ufAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECErL,+CAmIf,IA1HFA,CAAAA,CAAiB,eAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAgB,CAAC,CAC5B,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAOC,CAAAA,CACP,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,MAAA,CACd,sBAAA,CAAAC,CAAAA,CACA,GAAA,CAAKC,CAAAA,CACL,GAAGC,CACL,CAAA,CAAA,EAA0B,CAExB,GAAM,CAACC,CAAAA,CAAeC,CAAgB,CAAA,CAAU,CAAA,CAAA,QAAA,CAAiB,EAAE,CAAA,CAC7DC,CAAAA,CAAiB,CAAA,CAAA,MAAA,CAAyB,IAAI,CAAA,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,KAAA,CAAOA,CACT,CACF,CAAA,CAEAxB,CAAAA,CAAS4B,CAAc,CACzB,CACF,CAAA,CAGA,OAAM,CAAA,CAAA,SAAA,CAAU,CAAA,CAAA,EAAM,CAElBnB,CAAAA,EACA,OAAOA,CAAAA,EAAa,QAAA,EACpBA,CAAAA,CAAS,OAAA,EACTD,CAAAA,CAAkB,OAAA,GAAY,IAAA,EAAA,CAE9BC,CAAAA,CAAS,OAAA,CAAQ,iBAAA,CAAkBD,CAAAA,CAAkB,OAAA,CAASA,CAAAA,CAAkB,OAAO,CAAA,CACvFA,CAAAA,CAAkB,OAAA,CAAU,IAAA,CAEhC,CAAC,CAAA,CAGCqB,6BAAAA,mBAACC,CAAA,CACC,GAAA,CAAKrB,CAAAA,CACL,SAAA,CAAWsB,iCAAAA,CAAGrC,CAAoBG,CAAS,CAAA,CAC3C,IAAA,CAAK,MAAA,CACL,SAAA,CAAU,SAAA,CACV,QAAA,CAAUC,CAAAA,CACV,KAAA,CAAOc,CAAAA,CAAYD,CAAY,CAAA,CAC/B,QAAA,CAAUM,CAAAA,CACV,WAAA,CAAahB,CAAAA,CACZ,GAAGG,CAAAA,CAEJ,QAAA,CAAAyB,6BAAAA,mBAACG,CAAA,CAAU,SAAA,CAAU,QAAA,CACnB,QAAA,CAAAH,6BAAAA,mBAACI,CAAA,CAAW,IAAA,CAAK,KAAA,CAAM,QAAA,CAAA,MAAA,CAAC,CAAA,CAC1B,CAAA,CACF,CAEJ,CAAA,CAEArC,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-ZZOECKRZ.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../helpers/cn';\nimport type { ChangeEvent } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { TextInput } from '../TextInput/TextInput';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport type { CurrencyInputProps } from './CurrencyInput.props';\nimport { DetailText } from '../DetailText/DetailText';\n\nconst COMPONENT_NAME = 'CurrencyInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const CurrencyInput = ({\n className,\n disabled,\n value: controlledValue,\n onChange,\n placeholder = '0.00',\n disableGroupSeparators,\n ref: forwardedRef,\n ...props\n}: CurrencyInputProps) => {\n const maxDecimals = 2;\n const [internalValue, setInternalValue] = React.useState<string>('');\n const localRef = React.useRef<HTMLInputElement>(null);\n const cursorPositionRef = React.useRef<number | null>(null);\n\n // Use forwarded ref if provided, otherwise use internal ref\n const inputRef = forwardedRef || localRef;\n\n const isControlled = controlledValue !== undefined;\n const numericValue = isControlled ? String(controlledValue ?? '') : internalValue;\n\n // Format value for display\n const formatValue = (value: string): string => {\n if (!value) return '';\n\n const parts = value.split('.');\n let integerPart = parts[0] || '';\n\n if (!disableGroupSeparators) {\n integerPart = integerPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n }\n\n const decimalPart = parts[1];\n return decimalPart !== undefined ? integerPart + '.' + decimalPart : integerPart;\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>): void => {\n const input = e.target.value;\n const cursorPosition = e.target.selectionStart || 0;\n const previousDisplayValue = formatValue(numericValue);\n\n // Remove all non-digits except decimal\n const cleaned = input.replace(/[^\\d.]/g, '');\n\n // Ensure only one decimal point\n const parts = cleaned.split('.');\n const sanitized = parts.length > 2 ? parts[0] + '.' + parts.slice(1).join('') : cleaned;\n\n // Limit decimal places\n const finalParts = sanitized.split('.');\n const limitedValue =\n finalParts[1] !== undefined\n ? finalParts[0] + '.' + finalParts[1].substring(0, maxDecimals)\n : sanitized;\n\n // Calculate new cursor position\n if (!disableGroupSeparators) {\n const newDisplayValue = formatValue(limitedValue);\n const oldCommasBeforeCursor = (\n previousDisplayValue\n .slice(0, Math.min(cursorPosition, previousDisplayValue.length))\n .match(/,/g) || []\n ).length;\n const newCommasBeforeCursor = (\n newDisplayValue.slice(0, Math.min(cursorPosition, newDisplayValue.length)).match(/,/g) || []\n ).length;\n const commaDiff = newCommasBeforeCursor - oldCommasBeforeCursor;\n cursorPositionRef.current = cursorPosition + commaDiff;\n } else {\n cursorPositionRef.current = null;\n }\n if (!isControlled) {\n setInternalValue(limitedValue);\n }\n\n // Return numeric value WITHOUT commas\n if (onChange && inputRef && typeof inputRef === 'object' && inputRef.current) {\n const syntheticEvent = {\n ...e,\n target: {\n ...e.target,\n value: limitedValue, // Raw numeric value without commas\n },\n currentTarget: {\n ...e.currentTarget,\n value: limitedValue,\n },\n } as ChangeEvent<HTMLInputElement>;\n\n onChange(syntheticEvent);\n }\n };\n\n // Restore cursor position after render\n React.useEffect(() => {\n if (\n inputRef &&\n typeof inputRef === 'object' &&\n inputRef.current &&\n cursorPositionRef.current !== null\n ) {\n inputRef.current.setSelectionRange(cursorPositionRef.current, cursorPositionRef.current);\n cursorPositionRef.current = null;\n }\n });\n\n return (\n <TextInput\n ref={inputRef}\n className={cn(componentClassName, className)}\n type=\"text\"\n inputMode=\"decimal\"\n disabled={disabled}\n value={formatValue(numericValue)} // Display with commas\n onChange={handleChange}\n placeholder={placeholder}\n {...props}\n >\n <InputSlot placement=\"prefix\">\n <DetailText size=\"3xl\">£</DetailText>\n </InputSlot>\n </TextInput>\n );\n};\n\nCurrencyInput.displayName = COMPONENT_NAME;\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunk2I2OGFJWcjs = require('../../chunk-2I2OGFJW.cjs');require('../../chunk-ZQ7NMBKB.cjs');require('../../chunk-GDUSUD7Q.cjs');require('../../chunk-E6ACS2DR.cjs');require('../../chunk-XAXJGYIO.cjs');require('../../chunk-AKGZKHVS.cjs');require('../../chunk-62YYP3R3.cjs');require('../../chunk-OFJZI7N7.cjs');require('../../chunk-Q2IHR4F5.cjs');require('../../chunk-SYIQVRDT.cjs');require('../../chunk-R7DFRCL2.cjs');require('../../chunk-YJZUEXUT.cjs');require('../../chunk-RDNRX35P.cjs');require('../../chunk-76HQAMKU.cjs');require('../../chunk-VCSJTDQR.cjs');require('../../chunk-JHPCQWHT.cjs');require('../../chunk-GVVJQBRK.cjs');require('../../chunk-APOGD4A3.cjs');require('../../chunk-A4KDLDVY.cjs');require('../../chunk-7LZI6HLW.cjs');require('../../chunk-6MWZLLVG.cjs');require('../../chunk-AURLQ3VG.cjs');exports.Accordion = _chunk2I2OGFJWcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkTWJIJADOcjs = require('../../chunk-TWJIJADO.cjs');require('../../chunk-M4MJVBSH.cjs');require('../../chunk-GDUSUD7Q.cjs');require('../../chunk-AKGZKHVS.cjs');require('../../chunk-E6ACS2DR.cjs');require('../../chunk-XAXJGYIO.cjs');require('../../chunk-62YYP3R3.cjs');require('../../chunk-OFJZI7N7.cjs');require('../../chunk-Q2IHR4F5.cjs');require('../../chunk-SYIQVRDT.cjs');require('../../chunk-R7DFRCL2.cjs');require('../../chunk-YJZUEXUT.cjs');require('../../chunk-RDNRX35P.cjs');require('../../chunk-76HQAMKU.cjs');require('../../chunk-VCSJTDQR.cjs');require('../../chunk-JHPCQWHT.cjs');require('../../chunk-GVVJQBRK.cjs');require('../../chunk-APOGD4A3.cjs');require('../../chunk-A4KDLDVY.cjs');require('../../chunk-7LZI6HLW.cjs');require('../../chunk-6MWZLLVG.cjs');require('../../chunk-AURLQ3VG.cjs');exports.Accordion = _chunkTWJIJADOcjs.a;
2
2
  //# sourceMappingURL=Accordion.cjs.map