@utilitywarehouse/hearth-react 0.28.5 → 0.28.7

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 (88) hide show
  1. package/dist/chunk-3JR42C7A.cjs +4 -0
  2. package/dist/chunk-3JR42C7A.cjs.map +1 -0
  3. package/dist/{chunk-OVA734KB.js → chunk-4MVOWO3N.js} +2 -2
  4. package/dist/{chunk-532LXT53.cjs → chunk-4RY5R4WP.cjs} +2 -2
  5. package/dist/{chunk-532LXT53.cjs.map → chunk-4RY5R4WP.cjs.map} +1 -1
  6. package/dist/{chunk-DCYTDNZJ.cjs → chunk-5WSWLE65.cjs} +2 -2
  7. package/dist/{chunk-DCYTDNZJ.cjs.map → chunk-5WSWLE65.cjs.map} +1 -1
  8. package/dist/{chunk-DZFBYAZS.cjs → chunk-AJ5IMDF7.cjs} +2 -2
  9. package/dist/{chunk-DZFBYAZS.cjs.map → chunk-AJ5IMDF7.cjs.map} +1 -1
  10. package/dist/{chunk-ELZCUXOF.js → chunk-BLJICJ25.js} +2 -2
  11. package/dist/{chunk-IJEAGF5P.js → chunk-CWFPBMHK.js} +2 -2
  12. package/dist/{chunk-K2KJOTK6.cjs → chunk-CYDSMVAB.cjs} +2 -2
  13. package/dist/{chunk-K2KJOTK6.cjs.map → chunk-CYDSMVAB.cjs.map} +1 -1
  14. package/dist/{chunk-RJEPGGSO.cjs → chunk-FIB3MNPF.cjs} +2 -2
  15. package/dist/{chunk-RJEPGGSO.cjs.map → chunk-FIB3MNPF.cjs.map} +1 -1
  16. package/dist/{chunk-DV6OIZAD.js → chunk-HY32GRZP.js} +1 -1
  17. package/dist/chunk-HY32GRZP.js.map +1 -0
  18. package/dist/{chunk-UB26YGO2.js → chunk-IFYUDAKY.js} +2 -2
  19. package/dist/{chunk-VMCOB5RI.js → chunk-JVPVSNKC.js} +2 -2
  20. package/dist/{chunk-NHWKB2FY.cjs → chunk-KCMPH25C.cjs} +2 -2
  21. package/dist/{chunk-NHWKB2FY.cjs.map → chunk-KCMPH25C.cjs.map} +1 -1
  22. package/dist/{chunk-KXQRENCH.js → chunk-MJF6EV5G.js} +2 -2
  23. package/dist/chunk-MJPMYOQU.js +4 -0
  24. package/dist/{chunk-BH26BAVZ.js.map → chunk-MJPMYOQU.js.map} +1 -1
  25. package/dist/{chunk-Y2CHQFKQ.cjs → chunk-OHPQ5IRM.cjs} +2 -2
  26. package/dist/{chunk-Y2CHQFKQ.cjs.map → chunk-OHPQ5IRM.cjs.map} +1 -1
  27. package/dist/{chunk-MQCN5ROD.cjs → chunk-RKGHQAJP.cjs} +2 -2
  28. package/dist/{chunk-MQCN5ROD.cjs.map → chunk-RKGHQAJP.cjs.map} +1 -1
  29. package/dist/{chunk-CYQ2HZJT.cjs → chunk-S5NL27AO.cjs} +2 -2
  30. package/dist/{chunk-CYQ2HZJT.cjs.map → chunk-S5NL27AO.cjs.map} +1 -1
  31. package/dist/{chunk-ABES5BZY.js → chunk-TLCA3FQZ.js} +2 -2
  32. package/dist/chunk-VS3M7PIV.js +4 -0
  33. package/dist/chunk-VS3M7PIV.js.map +1 -0
  34. package/dist/{chunk-47STNW4L.js → chunk-W5DRITCP.js} +2 -2
  35. package/dist/{chunk-VQTJYNUH.cjs → chunk-WSD52THL.cjs} +1 -1
  36. package/dist/chunk-WSD52THL.cjs.map +1 -0
  37. package/dist/chunk-XC5UQYDF.cjs +4 -0
  38. package/dist/chunk-XC5UQYDF.cjs.map +1 -0
  39. package/dist/{chunk-U5HEXERR.js → chunk-ZTJPE3CB.js} +2 -2
  40. package/dist/components/Checkbox/Checkbox.cjs +1 -1
  41. package/dist/components/Checkbox/Checkbox.js +1 -1
  42. package/dist/components/CheckboxGroup/CheckboxGroup.cjs +1 -1
  43. package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -1
  44. package/dist/components/CheckboxTile/CheckboxTile.cjs +1 -1
  45. package/dist/components/CheckboxTile/CheckboxTile.js +1 -1
  46. package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -1
  47. package/dist/components/CurrencyInput/CurrencyInput.d.ts.map +1 -1
  48. package/dist/components/CurrencyInput/CurrencyInput.js +1 -1
  49. package/dist/components/DateInput/DateInput.cjs +1 -1
  50. package/dist/components/DateInput/DateInput.js +1 -1
  51. package/dist/components/FormGroupBase/FormGroupBase.cjs +1 -1
  52. package/dist/components/FormGroupBase/FormGroupBase.context.cjs +1 -1
  53. package/dist/components/FormGroupBase/FormGroupBase.context.d.ts.map +1 -1
  54. package/dist/components/FormGroupBase/FormGroupBase.context.js +1 -1
  55. package/dist/components/FormGroupBase/FormGroupBase.js +1 -1
  56. package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
  57. package/dist/components/ProgressBar/ProgressBar.js +1 -1
  58. package/dist/components/Radio/Radio.cjs +1 -1
  59. package/dist/components/Radio/Radio.js +1 -1
  60. package/dist/components/RadioGroup/RadioGroup.cjs +1 -1
  61. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  62. package/dist/components/RadioTile/RadioTile.cjs +1 -1
  63. package/dist/components/RadioTile/RadioTile.js +1 -1
  64. package/dist/index.cjs +1 -1
  65. package/dist/index.cjs.map +1 -1
  66. package/dist/index.js +1 -1
  67. package/dist/utils/media.cjs +1 -1
  68. package/dist/utils/media.js +1 -1
  69. package/package.json +11 -9
  70. package/styles.css +3 -3
  71. package/dist/chunk-ATVVUK6H.js +0 -4
  72. package/dist/chunk-ATVVUK6H.js.map +0 -1
  73. package/dist/chunk-BH26BAVZ.js +0 -4
  74. package/dist/chunk-DV6OIZAD.js.map +0 -1
  75. package/dist/chunk-IBV6HLNK.cjs +0 -4
  76. package/dist/chunk-IBV6HLNK.cjs.map +0 -1
  77. package/dist/chunk-RK63BBOY.cjs +0 -4
  78. package/dist/chunk-RK63BBOY.cjs.map +0 -1
  79. package/dist/chunk-VQTJYNUH.cjs.map +0 -1
  80. /package/dist/{chunk-OVA734KB.js.map → chunk-4MVOWO3N.js.map} +0 -0
  81. /package/dist/{chunk-ELZCUXOF.js.map → chunk-BLJICJ25.js.map} +0 -0
  82. /package/dist/{chunk-IJEAGF5P.js.map → chunk-CWFPBMHK.js.map} +0 -0
  83. /package/dist/{chunk-UB26YGO2.js.map → chunk-IFYUDAKY.js.map} +0 -0
  84. /package/dist/{chunk-VMCOB5RI.js.map → chunk-JVPVSNKC.js.map} +0 -0
  85. /package/dist/{chunk-KXQRENCH.js.map → chunk-MJF6EV5G.js.map} +0 -0
  86. /package/dist/{chunk-ABES5BZY.js.map → chunk-TLCA3FQZ.js.map} +0 -0
  87. /package/dist/{chunk-47STNW4L.js.map → chunk-W5DRITCP.js.map} +0 -0
  88. /package/dist/{chunk-U5HEXERR.js.map → chunk-ZTJPE3CB.js.map} +0 -0
@@ -1,4 +0,0 @@
1
- "use client";
2
-
3
- import{a as x}from"./chunk-D6UBBAMJ.js";import{a as v}from"./chunk-3P7KZ263.js";import{a as T}from"./chunk-TJHI42VN.js";import{a as y}from"./chunk-J3AJBV4B.js";import{b as E}from"./chunk-PDEVCIQ3.js";import{forwardRef as j,useState as A,useRef as M,useEffect as _}from"react";import{useMergedRefs as k}from"@base-ui/utils/useMergedRefs";import{jsx as m}from"react/jsx-runtime";var B="CurrencyInput",P=E(B),q=j(({className:D,disabled:R,value:p,onChange:f,placeholder:w="0.00",disableGroupSeparators:g,...N},V)=>{let[S,b]=A(""),r=M(null),n=M(null),H=k(V,r),d=p!==void 0,h=d?String(p??""):S,i=t=>{if(!t)return"";let o=t.split("."),e=o[0]||"";g||(e=e.replace(/\B(?=(\d{3})+(?!\d))/g,","));let s=o[1];return s!==void 0?e+"."+s:e},L=t=>{let o=t.target.value,e=t.target.selectionStart||0,s=i(h),C=o.replace(/[^\d.]/g,""),c=C.split("."),I=c.length>2?c[0]+"."+c.slice(1).join(""):C,u=I.split("."),a=u[1]!==void 0?u[0]+"."+u[1].substring(0,2):I;if(g)n.current=null;else{let l=i(a),z=(s.slice(0,Math.min(e,s.length)).match(/,/g)||[]).length,O=(l.slice(0,Math.min(e,l.length)).match(/,/g)||[]).length-z;n.current=e+O}if(d||b(a),f){let l={...t,target:{...t.target,value:a},currentTarget:{...t.currentTarget,value:a}};f(l)}};return _(()=>{r&&typeof r=="object"&&r.current&&n.current!==null&&(r.current.setSelectionRange(n.current,n.current),n.current=null)}),m(x,{ref:H,className:y(P,D),type:"text",inputMode:"decimal",disabled:R,value:i(h),onChange:L,placeholder:w,"data-testid":P,...N,children:m(T,{placement:"prefix",children:m(v,{size:"3xl",children:"\xA3"})})})});q.displayName=B;export{q as a};
4
- //# sourceMappingURL=chunk-ATVVUK6H.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/CurrencyInput/CurrencyInput.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, useState, useRef, useEffect } 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';\nimport type { InputBaseElement } from '../InputBase/InputBase';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\n\nconst COMPONENT_NAME = 'CurrencyInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const CurrencyInput = forwardRef<InputBaseElement, CurrencyInputProps>(\n (\n {\n className,\n disabled,\n value: controlledValue,\n onChange,\n placeholder = '0.00',\n disableGroupSeparators,\n ...props\n },\n forwardedRef\n ) => {\n const maxDecimals = 2;\n const [internalValue, setInternalValue] = useState<string>('');\n const internalRef = useRef<HTMLInputElement>(null);\n const cursorPositionRef = useRef<number | null>(null);\n\n // Merge forwarded ref (if any) with internal ref\n const inputRef = useMergedRefs(forwardedRef, internalRef);\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 []\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) {\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 useEffect(() => {\n if (\n internalRef &&\n typeof internalRef === 'object' &&\n internalRef.current &&\n cursorPositionRef.current !== null\n ) {\n internalRef.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 data-testid={componentClassName}\n {...props}\n >\n <InputSlot placement=\"prefix\">\n <DetailText size=\"3xl\">£</DetailText>\n </InputSlot>\n </TextInput>\n );\n }\n);\n\nCurrencyInput.displayName = COMPONENT_NAME;\n"],"mappings":";;wMAEA,OAAS,cAAAA,EAAY,YAAAC,EAAU,UAAAC,EAAQ,aAAAC,MAAiB,QASxD,OAAS,iBAAAC,MAAqB,+BAiIpB,cAAAC,MAAA,oBA/HV,IAAMC,EAAiB,gBACjBC,EAAqBC,EAAiBF,CAAc,EAE7CG,EAAgBC,EAC3B,CACE,CACE,UAAAC,EACA,SAAAC,EACA,MAAOC,EACP,SAAAC,EACA,YAAAC,EAAc,OACd,uBAAAC,EACA,GAAGC,CACL,EACAC,IACG,CAEH,GAAM,CAACC,EAAeC,CAAgB,EAAIC,EAAiB,EAAE,EACvDC,EAAcC,EAAyB,IAAI,EAC3CC,EAAoBD,EAAsB,IAAI,EAG9CE,EAAWrB,EAAcc,EAAcI,CAAW,EAElDI,EAAeb,IAAoB,OACnCc,EAAeD,EAAe,OAAOb,GAAmB,EAAE,EAAIM,EAG9DS,EAAeC,GAA0B,CAC7C,GAAI,CAACA,EAAO,MAAO,GAEnB,IAAMC,EAAQD,EAAM,MAAM,GAAG,EACzBE,EAAcD,EAAM,CAAC,GAAK,GAEzBd,IACHe,EAAcA,EAAY,QAAQ,wBAAyB,GAAG,GAGhE,IAAMC,EAAcF,EAAM,CAAC,EAC3B,OAAOE,IAAgB,OAAYD,EAAc,IAAMC,EAAcD,CACvE,EAEME,EAAgBC,GAA2C,CAC/D,IAAMC,EAAQD,EAAE,OAAO,MACjBE,EAAiBF,EAAE,OAAO,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Y,EAC/B,SAAUM,EACV,YAAalB,EACb,cAAaR,EACZ,GAAGU,EAEJ,SAAAZ,EAAC4C,EAAA,CAAU,UAAU,SACnB,SAAA5C,EAAC6C,EAAA,CAAW,KAAK,MAAM,gBAAC,EAC1B,EACF,CAEJ,CACF,EAEAzC,EAAc,YAAcH","names":["forwardRef","useState","useRef","useEffect","useMergedRefs","jsx","COMPONENT_NAME","componentClassName","withGlobalPrefix","CurrencyInput","forwardRef","className","disabled","controlledValue","onChange","placeholder","disableGroupSeparators","props","forwardedRef","internalValue","setInternalValue","useState","internalRef","useRef","cursorPositionRef","inputRef","isControlled","numericValue","formatValue","value","parts","integerPart","decimalPart","handleChange","e","input","cursorPosition","previousDisplayValue","cleaned","sanitized","finalParts","limitedValue","newDisplayValue","oldCommasBeforeCursor","commaDiff","syntheticEvent","useEffect","TextInput","cn","InputSlot","DetailText"]}
@@ -1,4 +0,0 @@
1
- "use client";
2
-
3
- import{a as t}from"./chunk-RZBVPNTV.js";var o="px",f=100,a=n=>`@media (min-width: ${n})`,e=Object.keys(t);function r(n){let i=t[n];return i===0?"@media all":a(i+o)}function s(n){return`@media not all and (min-width:${t[n]+o})`}function d(n,i){return`@media (min-width:${t[n]+o}) and (max-width:${t[i]-f/100+o})`}function l(n){return e.indexOf(n)+1<e.length?d(n,e[e.indexOf(n)+1]):r(n)}function m(n){let i=e.indexOf(n);if(i===0)return r(e[1]);if(i===e.length-1)return s(e[i]);let p=e[e.indexOf(n)+1];return d(n,p).replace("@media","@media not all and")}var u={above:r,below:s,between:d,only:l,not:m,mobile:"@media all",tablet:a(t.tablet+o),desktop:a(t.desktop+o),wide:a(t.wide+o)};export{u as a};
4
- //# sourceMappingURL=chunk-BH26BAVZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/FormGroupBase/FormGroupBase.context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport type FormGroupBaseContextValue = {\n hasGroupHelperText: boolean;\n hasGroupValidationText: boolean;\n 'aria-describedby'?: string;\n};\n\nexport const FormGroupBaseContext = createContext<FormGroupBaseContextValue>({\n hasGroupHelperText: false,\n hasGroupValidationText: false,\n} as FormGroupBaseContextValue);\n\nexport const FormGroupBaseProvider = FormGroupBaseContext.Provider;\n\nexport const useFormGroupBase = () => useContext(FormGroupBaseContext);\n"],"mappings":";;AAAA,OAAS,iBAAAA,EAAe,cAAAC,MAAkB,QAQnC,IAAMC,EAAuBF,EAAyC,CAC3E,mBAAoB,GACpB,uBAAwB,EAC1B,CAA8B,EAEjBG,EAAwBD,EAAqB,SAE7CE,EAAmB,IAAMH,EAAWC,CAAoB","names":["createContext","useContext","FormGroupBaseContext","FormGroupBaseProvider","useFormGroupBase"]}
@@ -1,4 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
-
3
- var _chunkF7ONREQHcjs = require('./chunk-F7ONREQH.cjs');var o="px",f=100,a=n=>`@media (min-width: ${n})`,e=Object.keys(_chunkF7ONREQHcjs.a);function r(n){let i=_chunkF7ONREQHcjs.a[n];return i===0?"@media all":a(i+o)}function s(n){return`@media not all and (min-width:${_chunkF7ONREQHcjs.a[n]+o})`}function d(n,i){return`@media (min-width:${_chunkF7ONREQHcjs.a[n]+o}) and (max-width:${_chunkF7ONREQHcjs.a[i]-f/100+o})`}function l(n){return e.indexOf(n)+1<e.length?d(n,e[e.indexOf(n)+1]):r(n)}function m(n){let i=e.indexOf(n);if(i===0)return r(e[1]);if(i===e.length-1)return s(e[i]);let p=e[e.indexOf(n)+1];return d(n,p).replace("@media","@media not all and")}var u={above:r,below:s,between:d,only:l,not:m,mobile:"@media all",tablet:a(_chunkF7ONREQHcjs.a.tablet+o),desktop:a(_chunkF7ONREQHcjs.a.desktop+o),wide:a(_chunkF7ONREQHcjs.a.wide+o)};exports.a = u;
4
- //# sourceMappingURL=chunk-IBV6HLNK.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-IBV6HLNK.cjs","../src/utils/media.ts"],"names":["unit","step","mq","breakpoint","keys","breakpoints","above","bp","below","between","start","end","only","not","keyIndex","media"],"mappings":"AAAA,qFAAY;AACZ;AACA,wDAAwC,ICIlCA,CAAAA,CAAO,IAAA,CACPC,CAAAA,CAAO,GAAA,CACPC,CAAAA,CAAMC,CAAAA,EAAuB,CAAA,mBAAA,EAAsBA,CAAU,CAAA,CAAA,CAAA,CAC7DC,CAAAA,CAAO,MAAA,CAAO,IAAA,CAAKC,mBAAW,CAAA,CAOpC,SAASC,CAAAA,CAAMH,CAAAA,CAAwB,CACrC,IAAMI,CAAAA,CAAKF,mBAAAA,CAAYF,CAAU,CAAA,CACjC,OAAII,CAAAA,GAAO,CAAA,CACF,YAAA,CAEFL,CAAAA,CAAGK,CAAAA,CAAKP,CAAI,CACrB,CAKA,SAASQ,CAAAA,CAAML,CAAAA,CAAwB,CACrC,MAAO,CAAA,8BAAA,EAAiCE,mBAAAA,CAAYF,CAAU,CAAA,CAAIH,CAAI,CAAA,CAAA,CACxE,CAKA,SAASS,CAAAA,CAAQC,CAAAA,CAAmBC,CAAAA,CAAiB,CACnD,MACE,CAAA,kBAAA,EAAqBN,mBAAAA,CAAYK,CAAK,CAAA,CAAIV,CAAI,CAAA,iBAAA,EAChCK,mBAAAA,CAAYM,CAAG,CAAA,CAAIV,CAAAA,CAAO,GAAA,CAAMD,CAAI,CAAA,CAAA,CAEtD,CAKA,SAASY,CAAAA,CAAKT,CAAAA,CAAwB,CACpC,OAAIC,CAAAA,CAAK,OAAA,CAAQD,CAAU,CAAA,CAAI,CAAA,CAAIC,CAAAA,CAAK,MAAA,CAC/BK,CAAAA,CAAQN,CAAAA,CAAYC,CAAAA,CAAKA,CAAAA,CAAK,OAAA,CAAQD,CAAU,CAAA,CAAI,CAAC,CAAe,CAAA,CAEtEG,CAAAA,CAAMH,CAAU,CACzB,CAKA,SAASU,CAAAA,CAAIV,CAAAA,CAAwB,CACnC,IAAMW,CAAAA,CAAWV,CAAAA,CAAK,OAAA,CAAQD,CAAU,CAAA,CACxC,EAAA,CAAIW,CAAAA,GAAa,CAAA,CACf,OAAOR,CAAAA,CAAMF,CAAAA,CAAK,CAAC,CAAe,CAAA,CAEpC,EAAA,CAAIU,CAAAA,GAAaV,CAAAA,CAAK,MAAA,CAAS,CAAA,CAC7B,OAAOI,CAAAA,CAAMJ,CAAAA,CAAKU,CAAQ,CAAe,CAAA,CAE3C,IAAMH,CAAAA,CAAMP,CAAAA,CAAKA,CAAAA,CAAK,OAAA,CAAQD,CAAoB,CAAA,CAAI,CAAC,CAAA,CACvD,OAAOM,CAAAA,CAAQN,CAAAA,CAAYQ,CAAG,CAAA,CAAE,OAAA,CAAQ,QAAA,CAAU,oBAAoB,CACxE,CAEO,IAAMI,CAAAA,CAAQ,CACnB,KAAA,CAAAT,CAAAA,CACA,KAAA,CAAAE,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,IAAA,CAAAG,CAAAA,CACA,GAAA,CAAAC,CAAAA,CAEA,MAAA,CAAQ,YAAA,CACR,MAAA,CAAQX,CAAAA,CAAGG,mBAAAA,CAAY,MAAA,CAASL,CAAI,CAAA,CACpC,OAAA,CAASE,CAAAA,CAAGG,mBAAAA,CAAY,OAAA,CAAUL,CAAI,CAAA,CACtC,IAAA,CAAME,CAAAA,CAAGG,mBAAAA,CAAY,IAAA,CAAOL,CAAI,CAClC,CAAA,CAAA,cAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-IBV6HLNK.cjs","sourcesContent":[null,"import { breakpoints } from '../tokens/breakpoints';\n\n/**\n * A lot of this file is directly copied from MUI - https://github.com/mui/material-ui/blob/next/packages/mui-system/src/createTheme/createBreakpoints.js\n */\n\nconst unit = 'px';\nconst step = 100;\nconst mq = (breakpoint: string) => `@media (min-width: ${breakpoint})`;\nconst keys = Object.keys(breakpoints);\n\ntype Breakpoint = keyof typeof breakpoints;\n\n/**\n * Returns a min-width media query string matching screen widths greater than the screen size given by the breakpoint.\n */\nfunction above(breakpoint: Breakpoint) {\n const bp = breakpoints[breakpoint];\n if (bp === 0) {\n return '@media all';\n }\n return mq(bp + unit);\n}\n\n/**\n * Returns a max-width media query string matching screen widths less than than the screen size given by the breakpoint.\n */\nfunction below(breakpoint: Breakpoint) {\n return `@media not all and (min-width:${breakpoints[breakpoint] + unit})`;\n}\n\n/**\n * Returns a media query string matching screen widths greater than the given start screen size and less than the given end screen size.\n */\nfunction between(start: Breakpoint, end: Breakpoint) {\n return (\n `@media (min-width:${breakpoints[start] + unit}) and ` +\n `(max-width:${breakpoints[end] - step / 100 + unit})`\n );\n}\n\n/**\n * Returns a media query string matching screen widths starting from the given screen size and stopping just before the next breakpoint.\n */\nfunction only(breakpoint: Breakpoint) {\n if (keys.indexOf(breakpoint) + 1 < keys.length) {\n return between(breakpoint, keys[keys.indexOf(breakpoint) + 1] as Breakpoint);\n }\n return above(breakpoint);\n}\n\n/**\n * Returns a media query string matching screen widths stopping at the given screen size and starting just before the next breakpoint.\n */\nfunction not(breakpoint: Breakpoint) {\n const keyIndex = keys.indexOf(breakpoint);\n if (keyIndex === 0) {\n return above(keys[1] as Breakpoint);\n }\n if (keyIndex === keys.length - 1) {\n return below(keys[keyIndex] as Breakpoint);\n }\n const end = keys[keys.indexOf(breakpoint as string) + 1] as Breakpoint;\n return between(breakpoint, end).replace('@media', '@media not all and');\n}\n\nexport const media = {\n above,\n below,\n between,\n only,\n not,\n /* mobile first media queries mirroring the design system breakpoint values */\n mobile: '@media all',\n tablet: mq(breakpoints.tablet + unit),\n desktop: mq(breakpoints.desktop + unit),\n wide: mq(breakpoints.wide + unit),\n};\n"]}
@@ -1,4 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }"use client";
2
-
3
- var _chunkQFKNUS4Ocjs = require('./chunk-QFKNUS4O.cjs');var _chunkR6HT7NNYcjs = require('./chunk-R6HT7NNY.cjs');var _chunkIAFYIHVPcjs = require('./chunk-IAFYIHVP.cjs');var _chunkONNSZMWFcjs = require('./chunk-ONNSZMWF.cjs');var _chunk4Q432K4Wcjs = require('./chunk-4Q432K4W.cjs');var _react = require('react');var _useMergedRefs = require('@base-ui/utils/useMergedRefs');var _jsxruntime = require('react/jsx-runtime');var B="CurrencyInput",P=_chunk4Q432K4Wcjs.b.call(void 0, B),q= exports.a =_react.forwardRef.call(void 0, ({className:D,disabled:R,value:p,onChange:f,placeholder:w="0.00",disableGroupSeparators:g,...N},V)=>{let[S,b]=_react.useState.call(void 0, ""),r=_react.useRef.call(void 0, null),n=_react.useRef.call(void 0, null),H=_useMergedRefs.useMergedRefs.call(void 0, V,r),d=p!==void 0,h=d?String(_nullishCoalesce(p, () => (""))):S,i=t=>{if(!t)return"";let o=t.split("."),e=o[0]||"";g||(e=e.replace(/\B(?=(\d{3})+(?!\d))/g,","));let s=o[1];return s!==void 0?e+"."+s:e},L=t=>{let o=t.target.value,e=t.target.selectionStart||0,s=i(h),C=o.replace(/[^\d.]/g,""),c=C.split("."),I=c.length>2?c[0]+"."+c.slice(1).join(""):C,u=I.split("."),a=u[1]!==void 0?u[0]+"."+u[1].substring(0,2):I;if(g)n.current=null;else{let l=i(a),z=(s.slice(0,Math.min(e,s.length)).match(/,/g)||[]).length,O=(l.slice(0,Math.min(e,l.length)).match(/,/g)||[]).length-z;n.current=e+O}if(d||b(a),f){let l={...t,target:{...t.target,value:a},currentTarget:{...t.currentTarget,value:a}};f(l)}};return _react.useEffect.call(void 0, ()=>{r&&typeof r=="object"&&r.current&&n.current!==null&&(r.current.setSelectionRange(n.current,n.current),n.current=null)}),_jsxruntime.jsx.call(void 0, _chunkQFKNUS4Ocjs.a,{ref:H,className:_chunkONNSZMWFcjs.a.call(void 0, P,D),type:"text",inputMode:"decimal",disabled:R,value:i(h),onChange:L,placeholder:w,"data-testid":P,...N,children:_jsxruntime.jsx.call(void 0, _chunkIAFYIHVPcjs.a,{placement:"prefix",children:_jsxruntime.jsx.call(void 0, _chunkR6HT7NNYcjs.a,{size:"3xl",children:"\xA3"})})})});q.displayName=B;exports.a = q;
4
- //# sourceMappingURL=chunk-RK63BBOY.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-RK63BBOY.cjs","../src/components/CurrencyInput/CurrencyInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","CurrencyInput","forwardRef","className","disabled","controlledValue","onChange","placeholder","disableGroupSeparators","props","forwardedRef","internalValue","setInternalValue","useState","internalRef","useRef","cursorPositionRef","inputRef","useMergedRefs","isControlled","numericValue","formatValue","value","parts","integerPart","decimalPart","handleChange","e","input","cursorPosition","previousDisplayValue","cleaned","sanitized","finalParts","limitedValue","newDisplayValue","oldCommasBeforeCursor","commaDiff","syntheticEvent","useEffect","jsx","TextInput","cn","InputSlot","DetailText"],"mappings":"AAAA,yLAAY;AACZ;AACA,wDAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCApJ,6DAS1B,+CAiIpB,IA/HJA,CAAAA,CAAiB,eAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAAgBC,+BAAAA,CAEzB,CACE,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,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CAEH,GAAM,CAACC,CAAAA,CAAeC,CAAgB,CAAA,CAAIC,6BAAAA,EAAmB,CAAA,CACvDC,CAAAA,CAAcC,2BAAAA,IAA6B,CAAA,CAC3CC,CAAAA,CAAoBD,2BAAAA,IAA0B,CAAA,CAG9CE,CAAAA,CAAWC,0CAAAA,CAAcR,CAAcI,CAAW,CAAA,CAElDK,CAAAA,C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A,EACZE,CAAAA,CAAkB,OAAA,GAAY,IAAA,EAAA,CAE9BF,CAAAA,CAAY,OAAA,CAAQ,iBAAA,CAAkBE,CAAAA,CAAkB,OAAA,CAASA,CAAAA,CAAkB,OAAO,CAAA,CAC1FA,CAAAA,CAAkB,OAAA,CAAU,IAAA,CAEhC,CAAC,CAAA,CAGCwB,6BAAAA,mBAACC,CAAA,CACC,GAAA,CAAKxB,CAAAA,CACL,SAAA,CAAWyB,iCAAAA,CAAG3C,CAAoBI,CAAS,CAAA,CAC3C,IAAA,CAAK,MAAA,CACL,SAAA,CAAU,SAAA,CACV,QAAA,CAAUC,CAAAA,CACV,KAAA,CAAOiB,CAAAA,CAAYD,CAAY,CAAA,CAC/B,QAAA,CAAUM,CAAAA,CACV,WAAA,CAAanB,CAAAA,CACb,aAAA,CAAaR,CAAAA,CACZ,GAAGU,CAAAA,CAEJ,QAAA,CAAA+B,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,CACF,CAAA,CAEA3C,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-RK63BBOY.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef, useState, useRef, useEffect } 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';\nimport type { InputBaseElement } from '../InputBase/InputBase';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\n\nconst COMPONENT_NAME = 'CurrencyInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const CurrencyInput = forwardRef<InputBaseElement, CurrencyInputProps>(\n (\n {\n className,\n disabled,\n value: controlledValue,\n onChange,\n placeholder = '0.00',\n disableGroupSeparators,\n ...props\n },\n forwardedRef\n ) => {\n const maxDecimals = 2;\n const [internalValue, setInternalValue] = useState<string>('');\n const internalRef = useRef<HTMLInputElement>(null);\n const cursorPositionRef = useRef<number | null>(null);\n\n // Merge forwarded ref (if any) with internal ref\n const inputRef = useMergedRefs(forwardedRef, internalRef);\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 []\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) {\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 useEffect(() => {\n if (\n internalRef &&\n typeof internalRef === 'object' &&\n internalRef.current &&\n cursorPositionRef.current !== null\n ) {\n internalRef.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 data-testid={componentClassName}\n {...props}\n >\n <InputSlot placement=\"prefix\">\n <DetailText size=\"3xl\">£</DetailText>\n </InputSlot>\n </TextInput>\n );\n }\n);\n\nCurrencyInput.displayName = COMPONENT_NAME;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-VQTJYNUH.cjs","../src/components/FormGroupBase/FormGroupBase.context.ts"],"names":["FormGroupBaseContext","createContext","FormGroupBaseProvider","useFormGroupBase","useContext"],"mappings":"AAAA,qFAAY;AACZ;ACDA,8BAA0C,IAQ7BA,CAAAA,CAAuBC,kCAAAA,CAClC,kBAAA,CAAoB,CAAA,CAAA,CACpB,sBAAA,CAAwB,CAAA,CAC1B,CAA8B,CAAA,CAEjBC,CAAAA,aAAwBF,CAAAA,CAAqB,QAAA,CAE7CG,CAAAA,aAAmB,CAAA,CAAA,EAAMC,+BAAAA,CAA+B,CAAA,CAAA,4CAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-VQTJYNUH.cjs","sourcesContent":[null,"import { createContext, useContext } from 'react';\n\nexport type FormGroupBaseContextValue = {\n hasGroupHelperText: boolean;\n hasGroupValidationText: boolean;\n 'aria-describedby'?: string;\n};\n\nexport const FormGroupBaseContext = createContext<FormGroupBaseContextValue>({\n hasGroupHelperText: false,\n hasGroupValidationText: false,\n} as FormGroupBaseContextValue);\n\nexport const FormGroupBaseProvider = FormGroupBaseContext.Provider;\n\nexport const useFormGroupBase = () => useContext(FormGroupBaseContext);\n"]}