@utilitywarehouse/hearth-react 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2O7CWEQY.js +2 -0
- package/dist/chunk-2O7CWEQY.js.map +1 -0
- package/dist/chunk-37VTNO3H.js +2 -0
- package/dist/chunk-37VTNO3H.js.map +1 -0
- package/dist/chunk-3NXXZ66J.js +2 -0
- package/dist/chunk-3NXXZ66J.js.map +1 -0
- package/dist/chunk-3NY5JW7O.cjs +2 -0
- package/dist/chunk-3NY5JW7O.cjs.map +1 -0
- package/dist/{chunk-2GYFUPYX.js → chunk-52UMCRWP.js} +2 -2
- package/dist/{chunk-SQC6TTIC.cjs → chunk-6XA4O3M3.cjs} +2 -2
- package/dist/{chunk-SQC6TTIC.cjs.map → chunk-6XA4O3M3.cjs.map} +1 -1
- package/dist/chunk-7UIP3FE3.js +2 -0
- package/dist/chunk-7UIP3FE3.js.map +1 -0
- package/dist/{chunk-HJOJ2HKF.js → chunk-BDXQRSF4.js} +2 -2
- package/dist/chunk-BLIB3FDC.cjs +2 -0
- package/dist/chunk-BLIB3FDC.cjs.map +1 -0
- package/dist/chunk-DKLZOG5K.js +2 -0
- package/dist/chunk-DKLZOG5K.js.map +1 -0
- package/dist/chunk-EDUYBNHP.cjs +2 -0
- package/dist/chunk-EDUYBNHP.cjs.map +1 -0
- package/dist/{chunk-NPVOVECB.cjs → chunk-EPKZSK2V.cjs} +2 -2
- package/dist/chunk-EPKZSK2V.cjs.map +1 -0
- package/dist/{chunk-X472IBQX.js → chunk-EVTSIFYV.js} +2 -2
- package/dist/chunk-F65OZ2UR.cjs +2 -0
- package/dist/chunk-F65OZ2UR.cjs.map +1 -0
- package/dist/{chunk-W2RI5BYP.cjs → chunk-I5YVANFZ.cjs} +1 -1
- package/dist/chunk-I5YVANFZ.cjs.map +1 -0
- package/dist/{chunk-3M5GFHDO.cjs → chunk-IAKA53GQ.cjs} +1 -1
- package/dist/{chunk-3M5GFHDO.cjs.map → chunk-IAKA53GQ.cjs.map} +1 -1
- package/dist/{chunk-IOPJMAFL.js → chunk-INZC24ME.js} +2 -2
- package/dist/chunk-IO77OE2Y.js +2 -0
- package/dist/chunk-IO77OE2Y.js.map +1 -0
- package/dist/{chunk-FHBLIK6L.cjs → chunk-JDRGWJC4.cjs} +1 -1
- package/dist/{chunk-FHBLIK6L.cjs.map → chunk-JDRGWJC4.cjs.map} +1 -1
- package/dist/{chunk-6LS3OYJB.cjs → chunk-KNZRWJJE.cjs} +2 -2
- package/dist/chunk-KNZRWJJE.cjs.map +1 -0
- package/dist/{chunk-BNMQKKQG.cjs → chunk-KQP63BAK.cjs} +2 -2
- package/dist/{chunk-BNMQKKQG.cjs.map → chunk-KQP63BAK.cjs.map} +1 -1
- package/dist/{chunk-ZAYXQ36V.js → chunk-LS6BEGH4.js} +1 -1
- package/dist/chunk-LS6BEGH4.js.map +1 -0
- package/dist/{chunk-3XA37DA3.cjs → chunk-M5L7GYFB.cjs} +2 -2
- package/dist/{chunk-3XA37DA3.cjs.map → chunk-M5L7GYFB.cjs.map} +1 -1
- package/dist/{chunk-NMWYVOB5.cjs → chunk-MBMSU7AI.cjs} +2 -2
- package/dist/{chunk-NMWYVOB5.cjs.map → chunk-MBMSU7AI.cjs.map} +1 -1
- package/dist/{chunk-YWGTX6NX.cjs → chunk-MGVROLEY.cjs} +1 -1
- package/dist/{chunk-YWGTX6NX.cjs.map → chunk-MGVROLEY.cjs.map} +1 -1
- package/dist/{chunk-KAWXU6RF.js → chunk-ODYEBO3I.js} +2 -2
- package/dist/chunk-OENWMR2C.cjs +2 -0
- package/dist/chunk-OENWMR2C.cjs.map +1 -0
- package/dist/{chunk-AOJOLYXJ.cjs → chunk-PEC5UK3V.cjs} +2 -2
- package/dist/{chunk-AOJOLYXJ.cjs.map → chunk-PEC5UK3V.cjs.map} +1 -1
- package/dist/{chunk-PFQOYDXS.js → chunk-PGPMMXR6.js} +2 -2
- package/dist/{chunk-EIZVSH76.cjs → chunk-PYYVUI5W.cjs} +2 -2
- package/dist/{chunk-EIZVSH76.cjs.map → chunk-PYYVUI5W.cjs.map} +1 -1
- package/dist/chunk-QV4D3AS6.js +2 -0
- package/dist/{chunk-ZIV2RZZI.js.map → chunk-QV4D3AS6.js.map} +1 -1
- package/dist/chunk-T236DCNC.js +2 -0
- package/dist/{chunk-HKAUNENU.js.map → chunk-T236DCNC.js.map} +1 -1
- package/dist/{chunk-TBYXQUBP.js → chunk-TQIXFWV6.js} +2 -2
- package/dist/{chunk-UA7DGD3T.js → chunk-TRQYHK6F.js} +2 -2
- package/dist/chunk-UMWTPGDS.cjs +2 -0
- package/dist/chunk-UMWTPGDS.cjs.map +1 -0
- package/dist/{chunk-OUOHGXSD.cjs → chunk-V2Z3FLZS.cjs} +2 -2
- package/dist/{chunk-OUOHGXSD.cjs.map → chunk-V2Z3FLZS.cjs.map} +1 -1
- package/dist/{chunk-L5X63HCH.js → chunk-VBIUSNIN.js} +2 -2
- package/dist/{chunk-SEYBIGHK.js → chunk-YXZJ5SGZ.js} +2 -2
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.d.cts +2 -1
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Badge/Badge.props.cjs +1 -1
- package/dist/components/Badge/Badge.props.d.cts +2 -1
- package/dist/components/Badge/Badge.props.d.ts +2 -1
- package/dist/components/Badge/Badge.props.js +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.cjs +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/dist/components/CheckboxTile/CheckboxTile.cjs +1 -1
- package/dist/components/CheckboxTile/CheckboxTile.js +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.cjs +2 -0
- package/dist/components/CurrencyInput/CurrencyInput.cjs.map +1 -0
- package/dist/components/CurrencyInput/CurrencyInput.d.cts +11 -0
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +11 -0
- package/dist/components/CurrencyInput/CurrencyInput.js +2 -0
- package/dist/components/CurrencyInput/CurrencyInput.js.map +1 -0
- package/dist/components/CurrencyInput/CurrencyInput.props.cjs +1 -0
- package/dist/components/CurrencyInput/CurrencyInput.props.cjs.map +1 -0
- package/dist/components/CurrencyInput/CurrencyInput.props.d.cts +10 -0
- package/dist/components/CurrencyInput/CurrencyInput.props.d.ts +10 -0
- package/dist/components/CurrencyInput/CurrencyInput.props.js +1 -0
- package/dist/components/CurrencyInput/CurrencyInput.props.js.map +1 -0
- package/dist/components/FormGroupBase/FormGroupBase.cjs +1 -1
- package/dist/components/FormGroupBase/FormGroupBase.js +1 -1
- package/dist/components/IconContainer/IconContainer.cjs +2 -0
- package/dist/components/IconContainer/IconContainer.cjs.map +1 -0
- package/dist/components/IconContainer/IconContainer.d.cts +9 -0
- package/dist/components/IconContainer/IconContainer.d.ts +9 -0
- package/dist/components/IconContainer/IconContainer.js +2 -0
- package/dist/components/IconContainer/IconContainer.js.map +1 -0
- package/dist/components/IconContainer/IconContainer.props.cjs +2 -0
- package/dist/components/IconContainer/IconContainer.props.cjs.map +1 -0
- package/dist/components/IconContainer/IconContainer.props.d.cts +45 -0
- package/dist/components/IconContainer/IconContainer.props.d.ts +45 -0
- package/dist/components/IconContainer/IconContainer.props.js +2 -0
- package/dist/components/IconContainer/IconContainer.props.js.map +1 -0
- package/dist/components/List/List.cjs +1 -1
- package/dist/components/List/List.cjs.map +1 -1
- package/dist/components/List/List.d.cts +1 -1
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/List.props.d.cts +2 -13
- package/dist/components/List/List.props.d.ts +2 -13
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/Radio/Radio.cjs +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RadioCard/RadioCard.cjs +1 -1
- package/dist/components/RadioCard/RadioCard.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.cjs +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioTile/RadioTile.cjs +1 -1
- package/dist/components/RadioTile/RadioTile.js +1 -1
- package/dist/components/SearchInput/SearchInput.cjs +1 -1
- package/dist/components/SearchInput/SearchInput.js +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.cts +0 -4
- package/dist/components/SectionHeader/SectionHeader.d.ts +0 -4
- package/dist/components/SectionHeader/SectionHeader.js +1 -1
- package/dist/components/SectionHeader/SectionHeader.props.cjs +1 -2
- package/dist/components/SectionHeader/SectionHeader.props.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.props.d.cts +6 -39
- package/dist/components/SectionHeader/SectionHeader.props.d.ts +6 -39
- package/dist/components/SectionHeader/SectionHeader.props.js +0 -1
- package/dist/components/TextArea/TextArea.cjs +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextInput/TextInput.cjs +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/styles.css +1 -1
- package/dist/chunk-2HATIMMN.cjs +0 -2
- package/dist/chunk-2HATIMMN.cjs.map +0 -1
- package/dist/chunk-6LS3OYJB.cjs.map +0 -1
- package/dist/chunk-HKAUNENU.js +0 -2
- package/dist/chunk-HLGSJ7VZ.js +0 -2
- package/dist/chunk-HLGSJ7VZ.js.map +0 -1
- package/dist/chunk-LX55FQR5.js +0 -2
- package/dist/chunk-LX55FQR5.js.map +0 -1
- package/dist/chunk-NPVOVECB.cjs.map +0 -1
- package/dist/chunk-QFVIQ5MD.cjs +0 -2
- package/dist/chunk-QFVIQ5MD.cjs.map +0 -1
- package/dist/chunk-RL2GY4IW.js +0 -2
- package/dist/chunk-RL2GY4IW.js.map +0 -1
- package/dist/chunk-RL3MTR6O.cjs +0 -2
- package/dist/chunk-RL3MTR6O.cjs.map +0 -1
- package/dist/chunk-TBOBX6LG.cjs +0 -2
- package/dist/chunk-TBOBX6LG.cjs.map +0 -1
- package/dist/chunk-W2RI5BYP.cjs.map +0 -1
- package/dist/chunk-YGKRSQ7L.js +0 -2
- package/dist/chunk-YGKRSQ7L.js.map +0 -1
- package/dist/chunk-ZAYXQ36V.js.map +0 -1
- package/dist/chunk-ZIV2RZZI.js +0 -2
- /package/dist/{chunk-2GYFUPYX.js.map → chunk-52UMCRWP.js.map} +0 -0
- /package/dist/{chunk-HJOJ2HKF.js.map → chunk-BDXQRSF4.js.map} +0 -0
- /package/dist/{chunk-X472IBQX.js.map → chunk-EVTSIFYV.js.map} +0 -0
- /package/dist/{chunk-IOPJMAFL.js.map → chunk-INZC24ME.js.map} +0 -0
- /package/dist/{chunk-KAWXU6RF.js.map → chunk-ODYEBO3I.js.map} +0 -0
- /package/dist/{chunk-PFQOYDXS.js.map → chunk-PGPMMXR6.js.map} +0 -0
- /package/dist/{chunk-TBYXQUBP.js.map → chunk-TQIXFWV6.js.map} +0 -0
- /package/dist/{chunk-UA7DGD3T.js.map → chunk-TRQYHK6F.js.map} +0 -0
- /package/dist/{chunk-L5X63HCH.js.map → chunk-VBIUSNIN.js.map} +0 -0
- /package/dist/{chunk-SEYBIGHK.js.map → chunk-YXZJ5SGZ.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as d}from"./chunk-3NXXZ66J.js";import{a as f}from"./chunk-B3LRMWN3.js";import{a as c}from"./chunk-4H4MW2WO.js";import{a as p}from"./chunk-XQ5A24NX.js";import{a as l}from"./chunk-RTGGS5XX.js";import{b as n}from"./chunk-4PEMW3UE.js";import*as e from"react";import C from"clsx";var h="List",E=n(h),R=e.forwardRef((L,r)=>{let{as:t="ul",className:N,colorScheme:o=void 0,variant:a,heading:i,headingElement:g,helperText:x,link:P,children:m,...s}=l(L,p),u={heading:i,headingElement:g,helperText:x,link:P};return e.createElement("div",{className:C(E,N)},i?e.createElement(d,{...u}):null,a===void 0||o===void 0?e.createElement(c,{asChild:!0,className:"hearth-ListContainer",role:"list"},e.createElement(t,{ref:r,...s},m)):e.createElement(f,{className:"hearth-ListContainer",paddingNone:!0,variant:a,colorScheme:o},e.createElement(t,{ref:r,role:"list",...s},m)))});R.displayName=h;export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2O7CWEQY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/List/List.tsx"],"sourcesContent":["import * as React from 'react';\nimport clsx from 'clsx';\nimport { type ListProps } from './List.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\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 componentName = 'List';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype ListElement = ElementRef<'ol'>;\n\nexport const List = React.forwardRef<ListElement, ListProps>((props, ref) => {\n const {\n as: Tag = 'ul',\n className,\n colorScheme = undefined,\n variant,\n heading,\n headingElement,\n helperText,\n link,\n children,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const headerProps = {\n heading,\n headingElement,\n helperText,\n link,\n };\n\n return (\n <div className={clsx(componentClassName, className)}>\n {heading ? <SectionHeader {...headerProps} /> : null}\n {variant === undefined || colorScheme === undefined ? (\n <Box asChild className=\"hearth-ListContainer\" role=\"list\">\n <Tag ref={ref} {...listProps}>\n {children}\n </Tag>\n </Box>\n ) : (\n <Card\n className=\"hearth-ListContainer\"\n paddingNone\n variant={variant}\n colorScheme={colorScheme}\n >\n <Tag ref={ref} role=\"list\" {...listProps}>\n {children}\n </Tag>\n </Card>\n )}\n </div>\n );\n});\n\nList.displayName = componentName;\n"],"mappings":"gPAAA,UAAYA,MAAW,QACvB,OAAOC,MAAU,OAUjB,IAAMC,EAAgB,OAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAa,aAAmC,CAACC,EAAOC,IAAQ,CAC3E,GAAM,CACJ,GAAIC,EAAM,KACV,UAAAC,EACA,YAAAC,EAAc,OACd,QAAAC,EACA,QAAAC,EACA,eAAAC,EACA,WAAAC,EACA,KAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAAIC,EAAaZ,EAAOa,CAAc,EAEhCC,EAAc,CAClB,QAAAR,EACA,eAAAC,EACA,WAAAC,EACA,KAAAC,CACF,EAEA,OACE,gBAAC,OAAI,UAAWM,EAAKlB,EAAoBM,CAAS,GAC/CG,EAAU,gBAACU,EAAA,CAAe,GAAGF,EAAa,EAAK,KAC/CT,IAAY,QAAaD,IAAgB,OACxC,gBAACa,EAAA,CAAI,QAAO,GAAC,UAAU,uBAAuB,KAAK,QACjD,gBAACf,EAAA,CAAI,IAAKD,EAAM,GAAGU,GAChBD,CACH,CACF,EAEA,gBAACQ,EAAA,CACC,UAAU,uBACV,YAAW,GACX,QAASb,EACT,YAAaD,GAEb,gBAACF,EAAA,CAAI,IAAKD,EAAK,KAAK,OAAQ,GAAGU,GAC5BD,CACH,CACF,CAEJ,CAEJ,CAAC,EAEDX,EAAK,YAAcH","names":["React","clsx","componentName","componentClassName","withGlobalPrefix","List","props","ref","Tag","className","colorScheme","variant","heading","headingElement","helperText","link","children","listProps","extractProps","marginPropDefs","headerProps","clsx","SectionHeader","Box","Card"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as m}from"./chunk-LS6BEGH4.js";import{a}from"./chunk-AFZ3OJUA.js";import{a as t}from"./chunk-XQ5A24NX.js";import{a as r}from"./chunk-RTGGS5XX.js";import{b as o}from"./chunk-4PEMW3UE.js";import*as e from"react";import g from"clsx";var s="Badge",P=o(s),B=e.forwardRef((p,f)=>{let{className:n,colorScheme:c="info",flatBase:d,...i}=r(p,m,t,a),l={"data-colorscheme":c,"data-bottom-radius-zero":d?"":void 0};return e.createElement("span",{ref:f,className:g(P,n),...l,...i})});B.displayName=s;export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-37VTNO3H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/Badge.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ElementRef } from 'react';\n\nimport clsx from 'clsx';\n\nimport { badgePropDefs, BadgeProps } from './Badge.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { textTransformPropDefs } from '../../props/text-transform.props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'Badge';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype BadgeElement = ElementRef<'span'>;\n\nexport const Badge = React.forwardRef<BadgeElement, BadgeProps>((props, ref) => {\n const {\n className,\n colorScheme = 'info',\n flatBase,\n ...badgeProps\n } = extractProps(props, badgePropDefs, marginPropDefs, textTransformPropDefs);\n const dataAttributeProps = {\n 'data-colorscheme': colorScheme,\n 'data-bottom-radius-zero': flatBase ? '' : undefined,\n };\n return (\n <span\n ref={ref}\n className={clsx(componentClassName, className)}\n {...dataAttributeProps}\n {...badgeProps}\n />\n );\n});\n\nBadge.displayName = componentName;\n"],"mappings":"mMAAA,UAAYA,MAAW,QAGvB,OAAOC,MAAU,OAQjB,IAAMC,EAAgB,QAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAc,aAAqC,CAACC,EAAOC,IAAQ,CAC9E,GAAM,CACJ,UAAAC,EACA,YAAAC,EAAc,OACd,SAAAC,EACA,GAAGC,CACL,EAAIC,EAAaN,EAAOO,EAAeC,EAAgBC,CAAqB,EACtEC,EAAqB,CACzB,mBAAoBP,EACpB,0BAA2BC,EAAW,GAAK,MAC7C,EACA,OACE,gBAAC,QACC,IAAKH,EACL,UAAWU,EAAKd,EAAoBK,CAAS,EAC5C,GAAGQ,EACH,GAAGL,EACN,CAEJ,CAAC,EAEDN,EAAM,YAAcH","names":["React","clsx","componentName","componentClassName","withGlobalPrefix","Badge","props","ref","className","colorScheme","flatBase","badgeProps","extractProps","badgePropDefs","marginPropDefs","textTransformPropDefs","dataAttributeProps","clsx"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as r}from"./chunk-3YTV62G7.js";import{a as i}from"./chunk-JPYVWTDN.js";import{b as o}from"./chunk-4PEMW3UE.js";import*as e from"react";import s from"clsx";var m="SectionHeader",f=o(m),H=e.forwardRef(({className:a,heading:n,id:d,headingElement:l="div",helperText:t,link:c,...p})=>e.createElement("div",{className:s(f,a)},e.createElement(r,{asChild:!0,size:"md",id:d,...p},e.createElement(l,null,n)),t?e.createElement(i,{disableUserSelect:!0},t):null,c));H.displayName=m;export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3NXXZ66J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SectionHeader/SectionHeader.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Heading } from '../Heading/Heading';\nimport { HelperText } from '../HelperText/HelperText';\nimport { SectionHeaderProps } from './SectionHeader.props';\n\nconst componentName = 'SectionHeader';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype SectionHeaderElement = ElementRef<'div'>;\n\nexport const SectionHeader = React.forwardRef<SectionHeaderElement, SectionHeaderProps>(\n ({ className, heading, id, headingElement: HeadingEl = 'div', helperText, link, ...props }) => {\n return (\n <div className={clsx(componentClassName, className)}>\n <Heading asChild size=\"md\" id={id} {...props}>\n <HeadingEl>{heading}</HeadingEl>\n </Heading>\n {helperText ? <HelperText disableUserSelect>{helperText}</HelperText> : null}\n {link}\n </div>\n );\n }\n);\n\nSectionHeader.displayName = componentName;\n"],"mappings":"wHAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAU,OAQjB,IAAMC,EAAgB,gBAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAsB,aACjC,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAAC,EAAI,eAAgBC,EAAY,MAAO,WAAAC,EAAY,KAAAC,EAAM,GAAGC,CAAM,IAErF,gBAAC,OAAI,UAAWC,EAAKV,EAAoBG,CAAS,GAChD,gBAACQ,EAAA,CAAQ,QAAO,GAAC,KAAK,KAAK,GAAIN,EAAK,GAAGI,GACrC,gBAACH,EAAA,KAAWF,CAAQ,CACtB,EACCG,EAAa,gBAACK,EAAA,CAAW,kBAAiB,IAAEL,CAAW,EAAgB,KACvEC,CACH,CAGN,EAEAN,EAAc,YAAcH","names":["React","clsx","componentName","componentClassName","withGlobalPrefix","SectionHeader","className","heading","id","HeadingEl","helperText","link","props","clsx","Heading","HelperText"]}
|
|
@@ -0,0 +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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkUMWTPGDScjs = require('./chunk-UMWTPGDS.cjs');var _chunkASOT2I4Dcjs = require('./chunk-ASOT2I4D.cjs');var _chunkVPZS4ZLEcjs = require('./chunk-VPZS4ZLE.cjs');var _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunk5DRU6TDWcjs = require('./chunk-5DRU6TDW.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var h="List",E=_chunk4H5JT5ORcjs.b.call(void 0, h),R= exports.a =e.forwardRef((L,r)=>{let{as:t="ul",className:N,colorScheme:o=void 0,variant:a,heading:i,headingElement:g,helperText:x,link:P,children:m,...s}=_chunk5DRU6TDWcjs.a.call(void 0, L,_chunkLAVQWQP2cjs.a),u={heading:i,headingElement:g,helperText:x,link:P};return e.createElement("div",{className:_clsx2.default.call(void 0, E,N)},i?e.createElement(_chunkUMWTPGDScjs.a,{...u}):null,a===void 0||o===void 0?e.createElement(_chunkVPZS4ZLEcjs.a,{asChild:!0,className:"hearth-ListContainer",role:"list"},e.createElement(t,{ref:r,...s},m)):e.createElement(_chunkASOT2I4Dcjs.a,{className:"hearth-ListContainer",paddingNone:!0,variant:a,colorScheme:o},e.createElement(t,{ref:r,role:"list",...s},m)))});R.displayName=h;exports.a = R;
|
|
2
|
+
//# sourceMappingURL=chunk-3NY5JW7O.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-3NY5JW7O.cjs","../src/components/List/List.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","List","props","ref","Tag","className","colorScheme","variant","heading","headingElement","helperText","link","children","listProps","extractProps","marginPropDefs","headerProps","clsx","SectionHeader","Box","Card"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECA9N,wEACN,IAUXA,CAAAA,CAAgB,MAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAa,CAAA,CAAA,UAAA,CAAmC,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CAC3E,GAAM,CACJ,EAAA,CAAIC,CAAAA,CAAM,IAAA,CACV,SAAA,CAAAC,CAAAA,CACA,WAAA,CA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CAEDX,CAAAA,CAAK,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-3NY5JW7O.cjs","sourcesContent":[null,"import * as React from 'react';\nimport clsx from 'clsx';\nimport { type ListProps } from './List.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\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 componentName = 'List';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype ListElement = ElementRef<'ol'>;\n\nexport const List = React.forwardRef<ListElement, ListProps>((props, ref) => {\n const {\n as: Tag = 'ul',\n className,\n colorScheme = undefined,\n variant,\n heading,\n headingElement,\n helperText,\n link,\n children,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const headerProps = {\n heading,\n headingElement,\n helperText,\n link,\n };\n\n return (\n <div className={clsx(componentClassName, className)}>\n {heading ? <SectionHeader {...headerProps} /> : null}\n {variant === undefined || colorScheme === undefined ? (\n <Box asChild className=\"hearth-ListContainer\" role=\"list\">\n <Tag ref={ref} {...listProps}>\n {children}\n </Tag>\n </Box>\n ) : (\n <Card\n className=\"hearth-ListContainer\"\n paddingNone\n variant={variant}\n colorScheme={colorScheme}\n >\n <Tag ref={ref} role=\"list\" {...listProps}>\n {children}\n </Tag>\n </Card>\n )}\n </div>\n );\n});\n\nList.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-TQIXFWV6.js";import{a as n}from"./chunk-PUVKWSFV.js";import{a as u}from"./chunk-X3PGQ2KF.js";import{a as m}from"./chunk-AAWHD26E.js";import{b as p}from"./chunk-4PEMW3UE.js";import d from"clsx";import e from"react";import{CloseSmallIcon as y,SearchMediumIcon as b}from"@utilitywarehouse/hearth-react-icons";var f="SearchInput",T=p(f),E=e.forwardRef(({className:i,disabled:l,value:o,onClear:r,loading:s,...a},I)=>{let h=e.useRef(null),t=I||h,S=e.useCallback(x=>{typeof r!="function"||x.button!==0||(r(),t&&typeof t=="object"&&t.current&&t.current.focus())},[t,r]);return e.createElement(c,{ref:t,className:d(T,i),type:"search",role:"search",enterKeyHint:"search",disabled:l,hideLabel:!0,value:o,...a},e.createElement(n,{placement:"prefix"},e.createElement(b,null)),s?e.createElement(n,{placement:"suffix"},e.createElement(m,{size:"xs",color:"grey1000"})):null,o!==void 0&&String(o).length>0?e.createElement(n,{placement:"suffix"},e.createElement(u,{type:"button",label:"clear search",onClick:S,disabled:l},e.createElement(y,null))):null)});E.displayName=f;export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-52UMCRWP.js.map
|
|
@@ -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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkMBMSU7AIcjs = require('./chunk-MBMSU7AI.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _react = require('react'); var o = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _radixui = require('radix-ui');var s="RadioGroup",C=_chunk4H5JT5ORcjs.b.call(void 0, s),v= exports.a =o.forwardRef(({children:R,contentWidth:r,direction:t="column",className:l,label:f,helperText:n,validationText:d,validationStatus:u,required:a,disabled:e,loop:c,defaultValue:G,value:x,onValueChange:P,name:h,...w},E)=>{let F={...w,disabled:e,required:a,label:f,helperText:n,validationText:d,validationStatus:u},N={width:r,direction:t,name:h,required:a,disabled:e,loop:c,defaultValue:G,value:x,onValueChange:P};return o.createElement(_chunkMBMSU7AIcjs.a,{ref:E,...F},o.createElement(_radixui.RadioGroup.Root,{asChild:!0,className:_clsx2.default.call(void 0, C,l),...N,orientation:t==="column"?"vertical":"horizontal"},o.createElement(_chunkLVPYDLKGcjs.a,{width:r},R)))});v.displayName=s;exports.a = v;
|
|
2
|
+
//# sourceMappingURL=chunk-6XA4O3M3.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-6XA4O3M3.cjs","../src/components/RadioGroup/RadioGroup.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","RadioGroup","children","contentWidth","direction","className","label","helperText","validationText","validationStatus","required","disabled","loop","defaultValue","value","onValueChange","name","props","ref","fieldsetProps","radioGroupRootProps","FormGroupBase","RadixRadioGroup","clsx","Flex"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,uECAnG,wEAEN,mCAE6B,IAOxCA,CAAAA,CAAgB,YAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAmB,CAAA,CAAA,UAAA,CAC9B,CACE,CACE,QAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CAAY,QAAA,CACZ,SAAA,CAA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ACvC,CACF,CAEJ,CACF,CAAA,CAEAD,CAAAA,CAAW,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-6XA4O3M3.cjs","sourcesContent":[null,"import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { RadioGroupProps } from './RadioGroup.props';\nimport { Flex } from '../Flex/Flex';\nimport { FormGroupBase } from '../FormGroupBase/FormGroupBase';\n\nconst componentName = 'RadioGroup';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioGroupElement = ElementRef<'fieldset'>;\n\nexport const RadioGroup = React.forwardRef<RadioGroupElement, RadioGroupProps>(\n (\n {\n children,\n contentWidth,\n direction = 'column',\n className,\n label,\n helperText,\n validationText,\n validationStatus,\n required,\n disabled,\n loop,\n defaultValue,\n value,\n onValueChange,\n name,\n ...props\n },\n ref\n ) => {\n const fieldsetProps = {\n ...props,\n disabled,\n required,\n label,\n helperText,\n validationText,\n validationStatus,\n };\n const radioGroupRootProps = {\n width: contentWidth,\n direction,\n name,\n required,\n disabled,\n loop,\n defaultValue,\n value,\n onValueChange,\n };\n\n return (\n <FormGroupBase ref={ref} {...fieldsetProps}>\n <RadixRadioGroup.Root\n asChild\n className={clsx(componentClassName, className)}\n {...radioGroupRootProps}\n orientation={direction === 'column' ? 'vertical' : 'horizontal'}\n >\n <Flex width={contentWidth}>{children}</Flex>\n </RadixRadioGroup.Root>\n </FormGroupBase>\n );\n }\n);\n\nRadioGroup.displayName = componentName;\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as n}from"./chunk-TQIXFWV6.js";import{a as p}from"./chunk-PUVKWSFV.js";import{a as r}from"./chunk-QU6MOXKC.js";import{b as t}from"./chunk-4PEMW3UE.js";import f from"clsx";import e from"react";var o="CurrencyInput",s=t(o),x=e.forwardRef(({className:m,disabled:l,value:u,placeholder:i="0.00",...a},c)=>e.createElement(n,{ref:c,className:f(s,m),type:"number",inputMode:"decimal",min:"0",step:"0.01",disabled:l,value:u,placeholder:i,...a},e.createElement(p,{placement:"prefix"},e.createElement(r,{size:"3xl"},"\xA3"))));x.displayName=o;export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7UIP3FE3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/CurrencyInput/CurrencyInput.tsx"],"sourcesContent":["import type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { TextInput } from '../TextInput/TextInput';\nimport { TextInputSlot } from '../TextInputSlot/TextInputSlot';\nimport { CurrencyInputProps } from './CurrencyInput.props';\nimport { DetailText } from '../DetailText/DetailText';\n\nconst componentName = 'CurrencyInput';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CurrencyInputElement = ElementRef<'input'>;\n\nexport const CurrencyInput = React.forwardRef<CurrencyInputElement, CurrencyInputProps>(\n ({ className, disabled, value, placeholder = '0.00', ...props }, ref) => {\n return (\n <TextInput\n ref={ref}\n className={clsx(componentClassName, className)}\n type=\"number\"\n inputMode=\"decimal\"\n min=\"0\"\n step=\"0.01\"\n disabled={disabled}\n value={value}\n placeholder={placeholder}\n {...props}\n >\n <TextInputSlot placement=\"prefix\">\n <DetailText size=\"3xl\">£</DetailText>\n </TextInputSlot>\n </TextInput>\n );\n }\n);\n\nCurrencyInput.displayName = componentName;\n"],"mappings":"gKAEA,OAAOA,MAAU,OACjB,OAAOC,MAAW,QAMlB,IAAMC,EAAgB,gBAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAgBC,EAAM,WACjC,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,MAAAC,EAAO,YAAAC,EAAc,OAAQ,GAAGC,CAAM,EAAGC,IAE7DN,EAAA,cAACO,EAAA,CACC,IAAKD,EACL,UAAWE,EAAKX,EAAoBI,CAAS,EAC7C,KAAK,SACL,UAAU,UACV,IAAI,IACJ,KAAK,OACL,SAAUC,EACV,MAAOC,EACP,YAAaC,EACZ,GAAGC,GAEJL,EAAA,cAACS,EAAA,CAAc,UAAU,UACvBT,EAAA,cAACU,EAAA,CAAW,KAAK,OAAM,MAAC,CAC1B,CACF,CAGN,EAEAX,EAAc,YAAcH","names":["clsx","React","componentName","componentClassName","withGlobalPrefix","CurrencyInput","React","className","disabled","value","placeholder","props","ref","TextInput","clsx","TextInputSlot","DetailText"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as C}from"./chunk-5OLLJKEO.js";import{a as f}from"./chunk-C2M7FEJX.js";import{a as x}from"./chunk-JPYVWTDN.js";import{c as u}from"./chunk-T64W7Q7K.js";import{a as p}from"./chunk-432A6CLH.js";import{a as k}from"./chunk-QC4ZMGCU.js";import{b as h}from"./chunk-4PEMW3UE.js";import*as e from"react";import S from"clsx";import{TickSmallIcon as U}from"@utilitywarehouse/hearth-react-icons";import{Checkbox as T}from"radix-ui";var R="CheckboxTile",B=h(R),D=e.forwardRef(({className:I,id:y,disabled:a,value:o="on",onCheckedChange:c,label:i,helperText:l,image:N,"aria-labelledby":G,...H},w)=>{let{id:m,labelId:s,helperTextId:n}=k({providedId:y,prefix:"radio"}),r=C(),t=u(),E=t?.value?.includes(o),F=r?.hasGroupHelperText,L=r?r["aria-describedby"]:"",b=!F&&!!l,P=!!i;return e.createElement("label",{className:S(B,I),"data-disabled":a?"":void 0},e.createElement(T.Root,{ref:w,className:"hearth-CheckboxRoot",name:t?.name,checked:E,value:o,...H,id:m,disabled:a,"aria-describedby":b?n:L,"aria-labelledby":G||P?s:void 0,onCheckedChange:d=>{r&&(d?t?.onItemCheck(o):t?.onItemUncheck(o)),c&&c(d)}},e.createElement(T.Indicator,{asChild:!0,className:"hearth-CheckboxIndicator"},e.createElement(U,null))),e.createElement(p,{direction:"column"},e.createElement(f,{id:s,htmlFor:m,disableUserSelect:!0,className:"hearth-CheckboxLabel"},N,i),b?e.createElement(x,{id:n,disableUserSelect:!0},l):null))});D.displayName=R;export{D as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BDXQRSF4.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var e=["sm","md","lg"],s=["emphasis","subtle"],o= exports.a ={size:{className:"size",tokens:e,responsive:!0,default:"md"},variant:{className:"variant",tokens:s,responsive:!1,default:"subtle"}};exports.a = o;
|
|
2
|
+
//# sourceMappingURL=chunk-BLIB3FDC.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/IconContainer/IconContainer.props.ts"],"names":["sizes","variants","iconContainerPropDefs"],"mappings":"AAKA,6EAAMA,CAAAA,CAAQ,CAAC,IAAA,CAAM,IAAA,CAAM,IAAI,CAAA,CACzBC,CAAAA,CAAW,CAAC,UAAA,CAAY,QAAQ,CAAA,CAEzBC,CAAAA,aAAwB,CACnC,IAAA,CAAM,CAAE,SAAA,CAAW,MAAA,CAAQ,MAAA,CAAQF,CAAAA,CAAO,UAAA,CAAY,CAAA,CAAA,CAAM,OAAA,CAAS,IAAK,CAAA,CAC1E,OAAA,CAAS,CAAE,SAAA,CAAW,SAAA,CAAW,MAAA,CAAQC,CAAAA,CAAU,UAAA,CAAY,CAAA,CAAA,CAAO,OAAA,CAAS,QAAS,CAC1F,CAAA,CAAA,cAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-BLIB3FDC.cjs","sourcesContent":["import { MarginProps } from '../../props/margin.props';\nimport { PropDef } from '../../props/prop-def';\nimport { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\nimport { Responsive } from '../../types/responsive';\n\nconst sizes = ['sm', 'md', 'lg'] as const;\nconst variants = ['emphasis', 'subtle'] as const;\n\nexport const iconContainerPropDefs = {\n size: { className: 'size', tokens: sizes, responsive: true, default: 'md' },\n variant: { className: 'variant', tokens: variants, responsive: false, default: 'subtle' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport interface IconContainerProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps {\n /**\n * Sets the container size.\n * @default md\n */\n size?: Responsive<(typeof sizes)[number]>;\n /**\n * Sets the container's visual variant\n * @default subtle\n */\n variant?: (typeof variants)[number];\n /**\n * Sets the colour scheme.\n * @default pig\n */\n colorScheme?: 'energy' | 'mobile' | 'broadband' | 'insurance' | 'cashback' | 'pig' | 'highlight';\n /**\n * Removes the container radius\n * @default false\n */\n radiusNone?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-IO77OE2Y.js";import{a as n}from"./chunk-XQ5A24NX.js";import{a as r}from"./chunk-RTGGS5XX.js";import{b as e}from"./chunk-4PEMW3UE.js";import*as o from"react";import d from"clsx";var a="IconContainer",C=e(a),P=o.forwardRef((m,c)=>{let{className:i,colorScheme:s="pig",radiusNone:p,...f}=r(m,t,n),l={"data-colorscheme":s,"data-radius-zero":p?"":void 0};return o.createElement("span",{ref:c,className:d(C,i),...l,...f})});P.displayName=a;export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DKLZOG5K.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/IconContainer/IconContainer.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ElementRef } from 'react';\n\nimport clsx from 'clsx';\n\nimport { iconContainerPropDefs, IconContainerProps } from './IconContainer.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'IconContainer';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype IconContainerElement = ElementRef<'span'>;\n\nexport const IconContainer = React.forwardRef<IconContainerElement, IconContainerProps>(\n (props, ref) => {\n const {\n className,\n colorScheme = 'pig',\n radiusNone,\n ...iconContainerProps\n } = extractProps(props, iconContainerPropDefs, marginPropDefs);\n const dataAttributeProps = {\n 'data-colorscheme': colorScheme,\n 'data-radius-zero': radiusNone ? '' : undefined,\n };\n return (\n <span\n ref={ref}\n className={clsx(componentClassName, className)}\n {...dataAttributeProps}\n {...iconContainerProps}\n />\n );\n }\n);\n\nIconContainer.displayName = componentName;\n"],"mappings":"gKAAA,UAAYA,MAAW,QAGvB,OAAOC,MAAU,OAOjB,IAAMC,EAAgB,gBAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAsB,aACjC,CAACC,EAAOC,IAAQ,CACd,GAAM,CACJ,UAAAC,EACA,YAAAC,EAAc,MACd,WAAAC,EACA,GAAGC,CACL,EAAIC,EAAaN,EAAOO,EAAuBC,CAAc,EACvDC,EAAqB,CACzB,mBAAoBN,EACpB,mBAAoBC,EAAa,GAAK,MACxC,EACA,OACE,gBAAC,QACC,IAAKH,EACL,UAAWS,EAAKb,EAAoBK,CAAS,EAC5C,GAAGO,EACH,GAAGJ,EACN,CAEJ,CACF,EAEAN,EAAc,YAAcH","names":["React","clsx","componentName","componentClassName","withGlobalPrefix","IconContainer","props","ref","className","colorScheme","radiusNone","iconContainerProps","extractProps","iconContainerPropDefs","marginPropDefs","dataAttributeProps","clsx"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkJDRGWJC4cjs = require('./chunk-JDRGWJC4.cjs');var _chunk24SSG67Rcjs = require('./chunk-24SSG67R.cjs');var _chunkPGOZUBLDcjs = require('./chunk-PGOZUBLD.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _react = require('react'); var _react2 = _interopRequireDefault(_react);var o="CurrencyInput",s=_chunk4H5JT5ORcjs.b.call(void 0, o),x= exports.a =_react2.default.forwardRef(({className:m,disabled:l,value:u,placeholder:i="0.00",...a},c)=>_react2.default.createElement(_chunkJDRGWJC4cjs.a,{ref:c,className:_clsx2.default.call(void 0, s,m),type:"number",inputMode:"decimal",min:"0",step:"0.01",disabled:l,value:u,placeholder:i,...a},_react2.default.createElement(_chunk24SSG67Rcjs.a,{placement:"prefix"},_react2.default.createElement(_chunkPGOZUBLDcjs.a,{size:"3xl"},"\xA3"))));x.displayName=o;exports.a = x;
|
|
2
|
+
//# sourceMappingURL=chunk-EDUYBNHP.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-EDUYBNHP.cjs","../src/components/CurrencyInput/CurrencyInput.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","CurrencyInput","React","className","disabled","value","placeholder","props","ref","TextInput","clsx","TextInputSlot","DetailText"],"mappings":"AAAA,iOAAwC,wDAAyC,wDAAyC,wDAAyC,wECElJ,4EACC,IAMZA,CAAAA,CAAgB,eAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAgBC,eAAAA,CAAM,UAAA,CACjC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAAA,CAAU,KAAA,CAAAC,CAAAA,CAAO,WAAA,CAAAC,CAAAA,CAAc,MAAA,CAAQ,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAE7DN,eAAAA,CAAA,aAAA,CAACO,mBAAAA,CAAA,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,4BAAAA,CAAKX,CAAoBI,CAAS,CAAA,CAC7C,IAAA,CAAK,QAAA,CACL,SAAA,CAAU,SAAA,CACV,GAAA,CAAI,GAAA,CACJ,IAAA,CAAK,MAAA,CACL,QAAA,CAAUC,CAAAA,CACV,KAAA,CAAOC,CAAAA,CACP,WAAA,CAAaC,CAAAA,CACZ,GAAGC,CAAAA,CAAAA,CAEJL,eAAAA,CAAA,aAAA,CAACS,mBAAAA,CAAA,CAAc,SAAA,CAAU,QAAA,CAAA,CACvBT,eAAAA,CAAA,aAAA,CAACU,mBAAAA,CAAA,CAAW,IAAA,CAAK,KAAA,CAAA,CAAM,MAAC,CAC1B,CACF,CAGN,CAAA,CAEAX,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-EDUYBNHP.cjs","sourcesContent":[null,"import type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { TextInput } from '../TextInput/TextInput';\nimport { TextInputSlot } from '../TextInputSlot/TextInputSlot';\nimport { CurrencyInputProps } from './CurrencyInput.props';\nimport { DetailText } from '../DetailText/DetailText';\n\nconst componentName = 'CurrencyInput';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CurrencyInputElement = ElementRef<'input'>;\n\nexport const CurrencyInput = React.forwardRef<CurrencyInputElement, CurrencyInputProps>(\n ({ className, disabled, value, placeholder = '0.00', ...props }, ref) => {\n return (\n <TextInput\n ref={ref}\n className={clsx(componentClassName, className)}\n type=\"number\"\n inputMode=\"decimal\"\n min=\"0\"\n step=\"0.01\"\n disabled={disabled}\n value={value}\n placeholder={placeholder}\n {...props}\n >\n <TextInputSlot placement=\"prefix\">\n <DetailText size=\"3xl\">£</DetailText>\n </TextInputSlot>\n </TextInput>\n );\n }\n);\n\nCurrencyInput.displayName = componentName;\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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkHSPOCJ5Acjs = require('./chunk-HSPOCJ5A.cjs');var _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _radixui = require('radix-ui');var b="RadioTile",v=_chunk4H5JT5ORcjs.b.call(void 0, b),E= exports.a =e.forwardRef(({className:u,id:x,label:o,helperText:i,image:T,"aria-labelledby":r,...h},y)=>{let{id:a,labelId:t,helperTextId:d}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:x,prefix:"radio"}),{hasGroupHelperText:I,"aria-describedby":N}=_chunkHSPOCJ5Acjs.c.call(void 0, ),l=!I&&i!==void 0;return e.createElement(_radixui.RadioGroup.Item,{ref:y,className:_clsx2.default.call(void 0, v,u),...h,id:a,"aria-describedby":l?d:N,"aria-labelledby":r||(o?t:void 0)},e.createElement("div",{className:"hearth-RadioContainer"},e.createElement("div",{className:"hearth-RadioItem"},e.createElement(_radixui.RadioGroup.Indicator,{className:"hearth-RadioIndicator"})),e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column"},e.createElement(_chunkGFWH3VRNcjs.a,{id:t,htmlFor:a,disableUserSelect:!0},T,o),l?e.createElement(_chunkK5BEIZDAcjs.a,{id:d,disableUserSelect:!0},i):null)))});E.displayName=b;exports.a = E;
|
|
2
|
+
//# sourceMappingURL=chunk-EPKZSK2V.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-EPKZSK2V.cjs","../src/components/RadioTile/RadioTile.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","RadioTile","className","providedId","label","helperText","image","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFormGroupBase","showHelperText","RadixRadioGroup","clsx","Flex","Label","HelperText"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECA9N,wEACN,mCAI6B,IAOxCA,CAAAA,CAAgB,WAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAkB,CAAA,CAAA,UAAA,CAC7B,CACE,CACE,SAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,iBAAA,CAAmBC,CAAAA,CACnB,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,GAAM,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAV,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CACtE,CAAE,kBAAA,CAAAW,CAAAA,CAAoB,kBAAA,CAAoBC,CAAgB,CAAA,CAAIC,iCAAAA,CAAiB,CAC/EC,CAAAA,CAAyB,CAACH,CAAAA,EAAsBT,CAAAA,GAAe,KAAA,CAAA,CACrE,OACE,CAAA,CAAA,aAAA,CAACa,mBAAAA,CAAgB,IAAA,CAAhB,CACC,GAAA,CAAKT,CAAAA,CACL,SAAA,CAAWU,4BAAAA,CAAKpB,CAAoBG,CAAS,CAAA,CAC5C,GAAGM,CAAAA,CACJ,EAAA,CAAIE,CAAAA,CACJ,kBAAA,CAAkBO,CAAAA,CAAiBL,CAAAA,CAAeG,CAAAA,CAClD,iBAAA,CAAiBR,CAAAA,EAAAA,CAAkCH,CAAAA,CAAQO,CAAAA,CAAU,KAAA,CAAA,CAAA,CAAA,CAErE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,uBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,kBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAACO,mBAAAA,CAAgB,SAAA,CAAhB,CAA0B,SAAA,CAAU,uBAAA,CAAwB,CAC/D,CAAA,CACA,CAAA,CAAA,aAAA,CAACE,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAA,CACd,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CAAM,EAAA,CAAIV,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC/CJ,CAAAA,CACAF,CACH,CAAA,CACCa,CAAAA,CACC,CAAA,CAAA,aAAA,CAACK,mBAAAA,CAAA,CAAW,EAAA,CAAIV,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CP,CACH,CAAA,CACE,IACN,CACF,CACF,CAEJ,CACF,CAAA,CAEAJ,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-EPKZSK2V.cjs","sourcesContent":[null,"import * as React from 'react';\nimport clsx from 'clsx';\nimport type { ElementRef } from 'react';\nimport type { RadioTileProps } from './RadioTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { useIds } from '../../hooks/use-ids';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst componentName = 'RadioTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioTileElement = ElementRef<'button'>;\n\nexport const RadioTile = React.forwardRef<RadioTileElement, RadioTileProps>(\n (\n {\n className,\n id: providedId,\n label,\n helperText,\n image,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFormGroupBase();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n return (\n <RadixRadioGroup.Item\n ref={ref}\n className={clsx(componentClassName, className)}\n {...props}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n >\n <div className=\"hearth-RadioContainer\">\n <div className=\"hearth-RadioItem\">\n <RadixRadioGroup.Indicator className=\"hearth-RadioIndicator\" />\n </div>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {image}\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </div>\n </RadixRadioGroup.Item>\n );\n }\n);\n\nRadioTile.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T}from"./chunk-PJXMEG7B.js";import{b as v}from"./chunk-5OLLJKEO.js";import{a as B}from"./chunk-JPYVWTDN.js";import{a as h}from"./chunk-432A6CLH.js";import{a as x}from"./chunk-XQ5A24NX.js";import{a as y}from"./chunk-QC4ZMGCU.js";import{a as b}from"./chunk-RTGGS5XX.js";import{b as u}from"./chunk-4PEMW3UE.js";import{a as G}from"./chunk-DVGYWBKQ.js";import*as e from"react";import C from"clsx";var F="FormGroupBase",M=u(F),S=e.forwardRef((g,I)=>{let{children:P,className:N,id:E,label:i,helperText:r,validationText:t,validationStatus:a,disabled:l,"aria-labelledby":H,"aria-describedby":R,"aria-errormessage":d,...V}=b(g,x),{id:w,labelId:n,helperTextId:m,validationTextId:s}=y({providedId:E,prefix:"fieldset"}),D=!!i,p=!!r,o=!!(a&&t),f=o&&a==="invalid",c=G(R||r?m:void 0,d||o?s:void 0),L={hasGroupHelperText:p,hasGroupValidationText:a!==void 0&&t!==void 0,"aria-describedby":c};return e.createElement("fieldset",{className:C(M,N),ref:I,...V,disabled:l,id:w,"data-disabled":l?"":void 0,"aria-errormessage":d||f?s:void 0,"aria-labelledby":H??(i?n:void 0),"aria-invalid":f,"aria-describedby":c},D?e.createElement(e.Fragment,null,e.createElement("legend",{id:n,className:"hearth-Legend"},i),p||o?e.createElement(h,{direction:"column",alignItems:"start",className:"hearth-HelperTextContainer"},r?e.createElement(B,{id:m,disabled:l},r):null,o?e.createElement(T,{id:s,status:a},t):null):null):null,e.createElement(v,{value:L},P))});S.displayName=F;export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EVTSIFYV.js.map
|
|
@@ -0,0 +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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkBLIB3FDCcjs = require('./chunk-BLIB3FDC.cjs');var _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunk5DRU6TDWcjs = require('./chunk-5DRU6TDW.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _react = require('react'); var o = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var a="IconContainer",C=_chunk4H5JT5ORcjs.b.call(void 0, a),P= exports.a =o.forwardRef((m,c)=>{let{className:i,colorScheme:s="pig",radiusNone:p,...f}=_chunk5DRU6TDWcjs.a.call(void 0, m,_chunkBLIB3FDCcjs.a,_chunkLAVQWQP2cjs.a),l={"data-colorscheme":s,"data-radius-zero":p?"":void 0};return o.createElement("span",{ref:c,className:_clsx2.default.call(void 0, C,i),...l,...f})});P.displayName=a;exports.a = P;
|
|
2
|
+
//# sourceMappingURL=chunk-F65OZ2UR.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-F65OZ2UR.cjs","../src/components/IconContainer/IconContainer.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","IconContainer","props","ref","className","colorScheme","radiusNone","iconContainerProps","extractProps","iconContainerPropDefs","marginPropDefs","dataAttributeProps","clsx"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,uECA5I,wEAGN,IAOXA,CAAAA,CAAgB,eAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAsB,CAAA,CAAA,UAAA,CACjC,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACd,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,KAAA,CACd,UAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaN,CAAOO,mBAAAA,CAAuBC,mBAAc,CAAA,CACvDC,CAAAA,CAAqB,CACzB,kBAAA,CAAoBN,CAAAA,CACpB,kBAAA,CAAoBC,CAAAA,CAAa,EAAA,CAAK,KAAA,CACxC,CAAA,CACA,OACE,CAAA,CAAA,aAAA,CAAC,MAAA,CAAA,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWS,4BAAAA,CAAKb,CAAoBK,CAAS,CAAA,CAC5C,GAAGO,CAAAA,CACH,GAAGJ,CAAAA,CACN,CAEJ,CACF,CAAA,CAEAN,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-F65OZ2UR.cjs","sourcesContent":[null,"import * as React from 'react';\nimport type { ElementRef } from 'react';\n\nimport clsx from 'clsx';\n\nimport { iconContainerPropDefs, IconContainerProps } from './IconContainer.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'IconContainer';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype IconContainerElement = ElementRef<'span'>;\n\nexport const IconContainer = React.forwardRef<IconContainerElement, IconContainerProps>(\n (props, ref) => {\n const {\n className,\n colorScheme = 'pig',\n radiusNone,\n ...iconContainerProps\n } = extractProps(props, iconContainerPropDefs, marginPropDefs);\n const dataAttributeProps = {\n 'data-colorscheme': colorScheme,\n 'data-radius-zero': radiusNone ? '' : undefined,\n };\n return (\n <span\n ref={ref}\n className={clsx(componentClassName, className)}\n {...dataAttributeProps}\n {...iconContainerProps}\n />\n );\n }\n);\n\nIconContainer.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var e=["emphasis","subtle","outline"],s=["sm","md"],o= exports.a ={variant:{className:"variant",tokens:e,responsive:!1,default:"subtle"},size:{className:"size",tokens:s,responsive:!0,default:"md"}};exports.a = o;
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-I5YVANFZ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/Badge.props.ts"],"names":["variants","sizes","badgePropDefs"],"mappings":"AAMA,6EAAMA,CAAAA,CAAW,CAAC,UAAA,CAAY,QAAA,CAAU,SAAS,CAAA,CAC3CC,CAAAA,CAAQ,CAAC,IAAA,CAAM,IAAI,CAAA,CAEZC,CAAAA,aAAgB,CAC3B,OAAA,CAAS,CAAE,SAAA,CAAW,SAAA,CAAW,MAAA,CAAQF,CAAAA,CAAU,UAAA,CAAY,CAAA,CAAA,CAAO,OAAA,CAAS,QAAS,CAAA,CACxF,IAAA,CAAM,CAAE,SAAA,CAAW,MAAA,CAAQ,MAAA,CAAQC,CAAAA,CAAO,UAAA,CAAY,CAAA,CAAA,CAAM,OAAA,CAAS,IAAK,CAC5E,CAAA,CAAA,cAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-I5YVANFZ.cjs","sourcesContent":["import { MarginProps } from '../../props/margin.props';\nimport { PropDef } from '../../props/prop-def';\nimport { TextTransformProps } from '../../props/text-transform.props';\nimport { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\nimport { Responsive } from '../../types/responsive';\n\nconst variants = ['emphasis', 'subtle', 'outline'] as const;\nconst sizes = ['sm', 'md'] as const;\n\nexport const badgePropDefs = {\n variant: { className: 'variant', tokens: variants, responsive: false, default: 'subtle' },\n size: { className: 'size', tokens: sizes, responsive: true, default: 'md' },\n} satisfies {\n variant: PropDef<(typeof variants)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport interface BadgeProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps,\n TextTransformProps {\n /**\n * Sets the badges's visual variant\n * @default subtle\n */\n variant?: (typeof variants)[number];\n /**\n * Sets the badge size.\n * @default md\n */\n size?: Responsive<(typeof sizes)[number]>;\n /**\n * Sets the colour scheme.\n * @default info\n */\n colorScheme?:\n | 'info'\n | 'positive'\n | 'danger'\n | 'warning'\n | 'functional'\n | 'energy'\n | 'mobile'\n | 'broadband'\n | 'insurance'\n | 'cashback'\n | 'pig'\n | 'highlight';\n /**\n * Removes the bottom radius, set when the Badge sits directly above another container\n * @default false\n */\n flatBase?: boolean;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkTIOWEGWWcjs = require('./chunk-TIOWEGWW.cjs');var _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunk7TQMVZ2Rcjs = require('./chunk-7TQMVZ2R.cjs');var _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.cjs');var _chunk5DRU6TDWcjs = require('./chunk-5DRU6TDW.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var g="TextArea",U=_chunk4H5JT5ORcjs.b.call(void 0, g),q= exports.a =e.forwardRef((I,N)=>{let{className:P,validationStatus:a,validationText:d,label:R,helperText:i,id:w,disabled:r,readOnly:l,required:n,placeholder:F,resize:E,rows:S=3,...V}=_chunk5DRU6TDWcjs.a.call(void 0, I,_chunkLAVQWQP2cjs.a),{id:s,labelId:m,helperTextId:p,validationTextId:o}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:w,prefix:"textarea"}),f=!l&&!r&&a!==void 0&&d!==void 0,B=_chunkDSW76HKTcjs.a.call(void 0, i?p:void 0,f?o:void 0);return e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column",gap:"75",className:_clsx2.default.call(void 0, U,P),"data-validation-status":a||void 0,"data-disabled":r?"":void 0},e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column"},e.createElement(_chunkGFWH3VRNcjs.a,{htmlFor:s,id:m,disableUserSelect:!0,fontWeight:"semibold"},R,n?null:e.createElement(_chunk7TQMVZ2Rcjs.a,{as:"span",marginLeft:"50"},"(optional)")),i?e.createElement(_chunkK5BEIZDAcjs.a,{id:p,disableUserSelect:!0},i):null),e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column",className:"hearth-TextAreaRoot"},e.createElement("textarea",{ref:N,id:s,rows:S,required:n,disabled:r,readOnly:l,placeholder:r?void 0:F,"aria-labelledby":m,"aria-describedby":B,"aria-invalid":a==="invalid"?!0:void 0,"aria-errormessage":a==="invalid"?o:void 0,"data-resize":E,...V})),f?e.createElement(_chunkTIOWEGWWcjs.a,{status:a,disableUserSelect:!0,id:o},d):null)});q.displayName=g;exports.a = q;
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-IAKA53GQ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-IAKA53GQ.cjs","../src/components/TextArea/TextArea.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","TextArea","props","ref","className","validationStatus","validationText","label","helperText","providedId","disabled","readOnly","required","placeholder","resize","rows","textAreaProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidationText","ariaDescribedbyValue","mergeIds","Flex","clsx","Label","BodyText","HelperText","ValidationText"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECAlY,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ACF,CAAA,CACCQ,CAAAA,CACC,CAAA,CAAA,aAAA,CAACQ,mBAAAA,CAAA,CAAe,MAAA,CAAQ3B,CAAAA,CAAkB,iBAAA,CAAiB,CAAA,CAAA,CAAC,EAAA,CAAIiB,CAAAA,CAAAA,CAC7DhB,CACH,CAAA,CACE,IACN,CAEJ,CAAC,CAAA,CAEDL,CAAAA,CAAS,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-IAKA53GQ.cjs","sourcesContent":[null,"import * as React from 'react';\nimport type { ElementRef } from 'react';\n\nimport clsx from 'clsx';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { useIds } from '../../hooks/use-ids';\nimport { TextAreaProps } from './TextArea.props';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport { Flex } from '../Flex/Flex';\nimport { BodyText } from '../BodyText/BodyText';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'TextArea';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype TextAreaElement = ElementRef<'textarea'>;\n\nexport const TextArea = React.forwardRef<TextAreaElement, TextAreaProps>((props, ref) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\n helperText,\n id: providedId,\n disabled,\n readOnly,\n required,\n placeholder,\n resize,\n rows = 3,\n ...textAreaProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'textarea',\n });\n\n const showValidationText = Boolean(\n !readOnly && !disabled && validationStatus !== undefined && validationText !== undefined\n );\n\n const ariaDescribedbyValue = mergeIds(\n !!helperText ? helperTextId : undefined,\n showValidationText ? validationTextId : undefined\n );\n\n return (\n <Flex\n direction=\"column\"\n gap=\"75\"\n className={clsx(componentClassName, className)}\n data-validation-status={validationStatus ? validationStatus : undefined}\n data-disabled={disabled ? '' : undefined}\n >\n <Flex direction=\"column\">\n <Label htmlFor={id} id={labelId} disableUserSelect fontWeight=\"semibold\">\n {label}\n {required ? null : (\n <BodyText as=\"span\" marginLeft=\"50\">\n (optional)\n </BodyText>\n )}\n </Label>\n {helperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n <Flex direction=\"column\" className=\"hearth-TextAreaRoot\">\n <textarea\n ref={ref}\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 </Flex>\n {showValidationText ? (\n <ValidationText status={validationStatus} disableUserSelect id={validationTextId}>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n );\n});\n\nTextArea.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as y}from"./chunk-PJXMEG7B.js";import{a as h}from"./chunk-C2M7FEJX.js";import{a as T}from"./chunk-JPYVWTDN.js";import{a as t}from"./chunk-432A6CLH.js";import{a as b}from"./chunk-VBMXLPU5.js";import{a as u}from"./chunk-XQ5A24NX.js";import{a as v}from"./chunk-QC4ZMGCU.js";import{a as c}from"./chunk-RTGGS5XX.js";import{b as x}from"./chunk-4PEMW3UE.js";import{a as A}from"./chunk-DVGYWBKQ.js";import*as e from"react";import L from"clsx";var g="TextArea",U=x(g),q=e.forwardRef((I,N)=>{let{className:P,validationStatus:a,validationText:d,label:R,helperText:i,id:w,disabled:r,readOnly:l,required:n,placeholder:F,resize:E,rows:S=3,...V}=c(I,u),{id:s,labelId:m,helperTextId:p,validationTextId:o}=v({providedId:w,prefix:"textarea"}),f=!l&&!r&&a!==void 0&&d!==void 0,B=A(i?p:void 0,f?o:void 0);return e.createElement(t,{direction:"column",gap:"75",className:L(U,P),"data-validation-status":a||void 0,"data-disabled":r?"":void 0},e.createElement(t,{direction:"column"},e.createElement(h,{htmlFor:s,id:m,disableUserSelect:!0,fontWeight:"semibold"},R,n?null:e.createElement(b,{as:"span",marginLeft:"50"},"(optional)")),i?e.createElement(T,{id:p,disableUserSelect:!0},i):null),e.createElement(t,{direction:"column",className:"hearth-TextAreaRoot"},e.createElement("textarea",{ref:N,id:s,rows:S,required:n,disabled:r,readOnly:l,placeholder:r?void 0:F,"aria-labelledby":m,"aria-describedby":B,"aria-invalid":a==="invalid"?!0:void 0,"aria-errormessage":a==="invalid"?o:void 0,"data-resize":E,...V})),f?e.createElement(y,{status:a,disableUserSelect:!0,id:o},d):null)});q.displayName=g;export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-INZC24ME.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/IconContainer/IconContainer.props.ts"],"sourcesContent":["import { MarginProps } from '../../props/margin.props';\nimport { PropDef } from '../../props/prop-def';\nimport { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\nimport { Responsive } from '../../types/responsive';\n\nconst sizes = ['sm', 'md', 'lg'] as const;\nconst variants = ['emphasis', 'subtle'] as const;\n\nexport const iconContainerPropDefs = {\n size: { className: 'size', tokens: sizes, responsive: true, default: 'md' },\n variant: { className: 'variant', tokens: variants, responsive: false, default: 'subtle' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport interface IconContainerProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps {\n /**\n * Sets the container size.\n * @default md\n */\n size?: Responsive<(typeof sizes)[number]>;\n /**\n * Sets the container's visual variant\n * @default subtle\n */\n variant?: (typeof variants)[number];\n /**\n * Sets the colour scheme.\n * @default pig\n */\n colorScheme?: 'energy' | 'mobile' | 'broadband' | 'insurance' | 'cashback' | 'pig' | 'highlight';\n /**\n * Removes the container radius\n * @default false\n */\n radiusNone?: boolean;\n}\n"],"mappings":"AAKA,IAAMA,EAAQ,CAAC,KAAM,KAAM,IAAI,EACzBC,EAAW,CAAC,WAAY,QAAQ,EAEzBC,EAAwB,CACnC,KAAM,CAAE,UAAW,OAAQ,OAAQF,EAAO,WAAY,GAAM,QAAS,IAAK,EAC1E,QAAS,CAAE,UAAW,UAAW,OAAQC,EAAU,WAAY,GAAO,QAAS,QAAS,CAC1F","names":["sizes","variants","iconContainerPropDefs"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkTIOWEGWWcjs = require('./chunk-TIOWEGWW.cjs');var _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunk7TQMVZ2Rcjs = require('./chunk-7TQMVZ2R.cjs');var _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.cjs');var _chunk5DRU6TDWcjs = require('./chunk-5DRU6TDW.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _react = require('react'); var _react2 = _interopRequireDefault(_react);var P="TextInput",j=_chunk4H5JT5ORcjs.b.call(void 0, P),k= exports.a =_react2.default.forwardRef((E,L)=>{let{className:N,validationStatus:t,validationText:d,label:F,helperText:r,children:w,id:D,disabled:n,readOnly:l,hideLabel:H,required:s,placeholder:S,"aria-describedby":V,...q}=_chunk5DRU6TDWcjs.a.call(void 0, E,_chunkLAVQWQP2cjs.a),{id:p,labelId:m,helperTextId:u,validationTextId:o}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:D,prefix:"input"}),f=!l&&!n&&t!==void 0&&d!==void 0,B=_chunkDSW76HKTcjs.a.call(void 0, V,r?u:void 0,f?o:void 0),U=_react2.default.useRef(null),i=L||U;return _react2.default.createElement(_chunkLVPYDLKGcjs.a,{className:_clsx2.default.call(void 0, j,N),direction:"column",gap:"75","data-validation-status":t||void 0,"data-disabled":n?"":void 0,onPointerDown:C=>{if(!C.target.closest("input, button, a")&&i&&typeof i=="object"&&i.current){let M=i.current;requestAnimationFrame(()=>{M.focus()})}}},_react2.default.createElement(_chunkLVPYDLKGcjs.a,{direction:"column","data-visually-hidden":H?"":void 0},_react2.default.createElement(_chunkGFWH3VRNcjs.a,{htmlFor:p,id:m,disableUserSelect:!0,fontWeight:"semibold"},F,s?null:_react2.default.createElement(_chunk7TQMVZ2Rcjs.a,{as:"span",marginLeft:"50"},"(optional)")),r?_react2.default.createElement(_chunkK5BEIZDAcjs.a,{id:u,disableUserSelect:!0},r):null),_react2.default.createElement("div",{className:"hearth-TextInputRoot"},_react2.default.createElement("input",{ref:i,spellCheck:"false",id:p,required:s,disabled:n,readOnly:l,placeholder:n?void 0:S,"aria-labelledby":m,"aria-describedby":B,"aria-invalid":t==="invalid"?!0:void 0,"aria-errormessage":t==="invalid"?o:void 0,...q}),w),f?_react2.default.createElement(_chunkTIOWEGWWcjs.a,{status:t,disableUserSelect:!0,id:o},d):null)});k.displayName=P;exports.a = k;
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-JDRGWJC4.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-JDRGWJC4.cjs","../src/components/TextInput/TextInput.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","TextInput","React","props","forwardedRef","className","validationStatus","validationText","label","helperText","children","providedId","disabled","readOnly","hideLabel","required","placeholder","ariaDescribedby","textInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidationText","ariaDescribedbyValue","mergeIds","defaultRef","inputRef","Flex","clsx","event","input","Label","BodyText","HelperText","ValidationText"],"mappings":"AAAA,iOAAwC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wECInY,4EACC,IAUZA,CAAAA,CAAgB,WAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAYC,eAAAA,CAAM,UAAA,CAC7B,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAiB,CACvB,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,kBAAA,CAAoBC,CAAAA,CACpB,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAahB,CAAOiB,mBAAc,CAAA,CAChC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAAA,CAAc,gBAAA,CAAAC,CAAiB,CAAA,CAAIC,iCAAAA,CACtD,UAAA,CAAAd,CAAAA,CACA,MAAA,CAAQ,OACV,CAAC,CAAA,CAEKe,CAAAA,CACJ,CAACb,CAAAA,EAAY,CAACD,CAAAA,EAAYN,CAAAA,GAAqB,KAAA,CAAA,EAAaC,CAAAA,GAAm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AAA,CAAA,aAAA,CAACkC,mBAAAA,CAAA,CAAS,EAAA,CAAG,MAAA,CAAO,UAAA,CAAW,IAAA,CAAA,CAAK,YAEpC,CAEJ,CAAA,CACC3B,CAAAA,CACCP,eAAAA,CAAA,aAAA,CAACmC,mBAAAA,CAAA,CAAW,EAAA,CAAId,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5Cd,CACH,CAAA,CACE,IACN,CAAA,CACAP,eAAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,sBAAA,CAAA,CACbA,eAAAA,CAAA,aAAA,CAAC,OAAA,CAAA,CACC,GAAA,CAAK4B,CAAAA,CACL,UAAA,CAAW,OAAA,CACX,EAAA,CAAIT,CAAAA,CACJ,QAAA,CAAUN,CAAAA,CACV,QAAA,CAAUH,CAAAA,CACV,QAAA,CAAUC,CAAAA,CACV,WAAA,CAAcD,CAAAA,CAAyB,KAAA,CAAA,CAAdI,CAAAA,CACzB,iBAAA,CAAiBM,CAAAA,CACjB,kBAAA,CAAkBK,CAAAA,CAClB,cAAA,CAAcrB,CAAAA,GAAqB,SAAA,CAAY,CAAA,CAAA,CAAO,KAAA,CAAA,CACtD,mBAAA,CAAmBA,CAAAA,GAAqB,SAAA,CAAYkB,CAAAA,CAAmB,KAAA,CAAA,CACtE,GAAGN,CAAAA,CACN,CAAA,CACCR,CACH,CAAA,CACCgB,CAAAA,CACCxB,eAAAA,CAAA,aAAA,CAACoC,mBAAAA,CAAA,CAAe,MAAA,CAAQhC,CAAAA,CAAkB,iBAAA,CAAiB,CAAA,CAAA,CAAC,EAAA,CAAIkB,CAAAA,CAAAA,CAC7DjB,CACH,CAAA,CACE,IACN,CAEJ,CACF,CAAA,CAEAN,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-JDRGWJC4.cjs","sourcesContent":[null,"import type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { TextInputProps } from './TextInput.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useIds } from '../../hooks/use-ids';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { BodyText } from '../BodyText/BodyText';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'TextInput';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype TextInputElement = ElementRef<'input'>;\n\nexport const TextInput = React.forwardRef<TextInputElement, TextInputProps>(\n (props, forwardedRef) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\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 const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'input',\n });\n\n const showValidationText = Boolean(\n !readOnly && !disabled && validationStatus !== undefined && validationText !== undefined\n );\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby,\n !!helperText ? helperTextId : undefined,\n showValidationText ? validationTextId : undefined\n );\n\n const defaultRef = React.useRef<HTMLInputElement>(null);\n const inputRef = forwardedRef || defaultRef;\n return (\n <Flex\n className={clsx(componentClassName, className)}\n direction=\"column\"\n gap=\"75\"\n data-validation-status={validationStatus ? validationStatus : undefined}\n data-disabled={disabled ? '' : undefined}\n onPointerDown={event => {\n // avoid losing focus when users click on non-interactive slot elements, such as icons\n const target = event.target as HTMLElement;\n if (target.closest('input, button, a')) return;\n\n if (inputRef && typeof inputRef === 'object' && inputRef.current) {\n const input = inputRef.current;\n requestAnimationFrame(() => {\n input.focus();\n });\n }\n }}\n >\n <Flex direction=\"column\" data-visually-hidden={hideLabel ? '' : undefined}>\n <Label htmlFor={id} id={labelId} disableUserSelect fontWeight=\"semibold\">\n {label}\n {required ? null : (\n <BodyText as=\"span\" marginLeft=\"50\">\n (optional)\n </BodyText>\n )}\n </Label>\n {helperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n <div className=\"hearth-TextInputRoot\">\n <input\n ref={inputRef}\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 </div>\n {showValidationText ? (\n <ValidationText status={validationStatus} disableUserSelect id={validationTextId}>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n );\n }\n);\n\nTextInput.displayName = componentName;\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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkHSPOCJ5Acjs = require('./chunk-HSPOCJ5A.cjs');var _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _radixui = require('radix-ui');var b="Radio",F=_chunk4H5JT5ORcjs.b.call(void 0, b),H= exports.a =e.forwardRef(({id:u,label:o,helperText:r,image:h,className:x,labelFontWeight:y,"aria-labelledby":a,...I},N)=>{let{id:i,labelId:t,helperTextId:d}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:u,prefix:"radio"}),{hasGroupHelperText:G,"aria-describedby":v}=_chunkHSPOCJ5Acjs.c.call(void 0, ),m=!G&&r!==void 0,w=!!o;return e.createElement("div",{className:_clsx2.default.call(void 0, F,x)},e.createElement("div",{className:"hearth-RadioContainer"},e.createElement(_radixui.RadioGroup.Item,{ref:N,...I,id:i,"aria-describedby":m?d:v,"aria-labelledby":a||(o?t:void 0),className:"hearth-RadioItem"},e.createElement(_radixui.RadioGroup.Indicator,{className:"hearth-RadioIndicator"}))),w?e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column",gap:"50"},e.createElement(_chunkGFWH3VRNcjs.a,{id:t,htmlFor:i,disableUserSelect:!0,fontWeight:y},h,o),m?e.createElement(_chunkK5BEIZDAcjs.a,{id:d,disableUserSelect:!0},r):null):null)});H.displayName=b;exports.a = H;
|
|
2
|
+
//# sourceMappingURL=chunk-KNZRWJJE.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-KNZRWJJE.cjs","../src/components/Radio/Radio.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","Radio","providedId","label","helperText","image","className","labelFontWeight","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFormGroupB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G,CAAAA,CAClD,iBAAA,CAAiBR,CAAAA,EAAAA,CAAkCL,CAAAA,CAAQS,CAAAA,CAAU,KAAA,CAAA,CAAA,CACrE,SAAA,CAAU,kBAAA,CAAA,CAEV,CAAA,CAAA,aAAA,CAACS,mBAAAA,CAAgB,SAAA,CAAhB,CAA0B,SAAA,CAAU,uBAAA,CAAwB,CAC/D,CACF,CAAA,CACCF,CAAAA,CACC,CAAA,CAAA,aAAA,CAACG,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,IAAA,CAAA,CAC3B,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CAAM,EAAA,CAAIX,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAAC,UAAA,CAAYJ,CAAAA,CAAAA,CAC5DF,CAAAA,CACAF,CACH,CAAA,CACCe,CAAAA,CACC,CAAA,CAAA,aAAA,CAACM,mBAAAA,CAAA,CAAW,EAAA,CAAIX,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CT,CACH,CAAA,CACE,IACN,CAAA,CACE,IACN,CAEJ,CACF,CAAA,CAEAH,CAAAA,CAAM,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-KNZRWJJE.cjs","sourcesContent":[null,"import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport type { RadioProps } from './Radio.props';\n\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Flex } from '../Flex/Flex';\nimport { Label } from '../Label/Label';\nimport { useIds } from '../../hooks/use-ids';\nimport { HelperText } from '../HelperText/HelperText';\nimport type { ElementRef } from 'react';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst componentName = 'Radio';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioElement = ElementRef<'button'>;\n\n/**\n * `Radio` can be used to choose between a set of more than two options.\n *\n * `Radio` should always be used with a `RadioGroup` or `RadioGridGroup` to\n * handle the state control and layout.\n *\n * `Radio` is, by default, appropriately labelled when using\n * the `label` prop, if you do not provide a label, you must specify an\n * `aria-label` or `aria-labelledby` for accessibility.\n *\n * > This component does not need to be wrapped in a `ThemeProvider` and can be used standalone with other component libraries.\n */\nexport const Radio = React.forwardRef<RadioElement, RadioProps>(\n (\n {\n id: providedId,\n label,\n helperText,\n image,\n className,\n labelFontWeight,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFormGroupBase();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n const showLabel = !!label;\n return (\n <div className={clsx(componentClassName, className)}>\n <div className=\"hearth-RadioContainer\">\n <RadixRadioGroup.Item\n ref={ref}\n {...props}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n className=\"hearth-RadioItem\"\n >\n <RadixRadioGroup.Indicator className=\"hearth-RadioIndicator\" />\n </RadixRadioGroup.Item>\n </div>\n {showLabel ? (\n <Flex direction=\"column\" gap=\"50\">\n <Label id={labelId} htmlFor={id} disableUserSelect fontWeight={labelFontWeight}>\n {image}\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n ) : null}\n </div>\n );\n }\n);\n\nRadio.displayName = componentName;\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
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
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 _chunkJDRGWJC4cjs = require('./chunk-JDRGWJC4.cjs');var _chunk24SSG67Rcjs = require('./chunk-24SSG67R.cjs');var _chunkPZSLW42Xcjs = require('./chunk-PZSLW42X.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var f="PasswordInput",P=_chunk4H5JT5ORcjs.b.call(void 0, f),h= exports.a =_react2.default.forwardRef(({className:d,disabled:r,...c},b)=>{let y=_react2.default.useRef(null),s=b||y,[o,w]=_react2.default.useState(!1),[n,l]=_react2.default.useState(!1),I=_react2.default.useCallback(()=>{let e=!o,i=!n;w(e),l(i)},[o,n]);_react2.default.useEffect(()=>{let e=null;s&&typeof s=="object"&&s.current&&(e=s.current);let i=()=>{_optionalChain([e, 'optionalAccess', _ => _.type])&&(e.type="password")};return e&&e.form!==null&&e.form.addEventListener("submit",i),()=>{_optionalChain([e, 'optionalAccess', _2 => _2.form])&&e.form.removeEventListener("submit",i)}},[s]);let E=`Your password is ${o?"shown":"hidden"}!`;return _react2.default.useEffect(()=>{setTimeout(()=>{l(!1)},1500)},[n]),_react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement(_chunkJDRGWJC4cjs.a,{ref:s,className:_clsx2.default.call(void 0, P,d),type:o?"text":"password",disabled:r,...c},_react2.default.createElement(_chunk24SSG67Rcjs.a,{placement:"suffix"},_react2.default.createElement(_chunkPZSLW42Xcjs.a,{type:"button",label:"toggle password visibility",onClick:I,disabled:r,"aria-pressed":o},o?_react2.default.createElement(_hearthreacticons.EyeSmallIcon,null):_react2.default.createElement(_hearthreacticons.EyeOffSmallIcon,null)))),_react2.default.createElement("div",{"data-visually-hidden":!0,"aria-live":"assertive",role:"status"},n?E:""))});h.displayName=f;exports.a = h;
|
|
2
|
+
//# sourceMappingURL=chunk-KQP63BAK.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-KQP63BAK.cjs","../src/components/PasswordInput/PasswordInput.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","PasswordInput","React","className","disabled","props","forwardedRef","defaultRef","inputRef","visible","setVisible","showVisibilityMessage","setShowVisibilityMessage","handleVisibility","newVisibilityState","newVisibilityMessageState","currentElement","handleSubmit","visibilityMessage","TextInput","clsx","TextInputSlot","UnstyledIconButton","EyeSmallIcon","EyeOffSmallIcon"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAyC,wDAAyC,wECElJ,4EACC,wEAK4B,IAExCA,CAAAA,CAAgB,eAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAgBC,eAAAA,CAAM,UAAA,CACjC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAAA,CAAU,G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AAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-KQP63BAK.cjs","sourcesContent":[null,"import type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { PasswordInputProps } from './PasswordInput.props';\nimport { TextInput } from '../TextInput/TextInput';\nimport { TextInputSlot } from '../TextInputSlot/TextInputSlot';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { EyeOffSmallIcon, EyeSmallIcon } from '@utilitywarehouse/hearth-react-icons';\n\nconst componentName = 'PasswordInput';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype PasswordInputElement = ElementRef<'input'>;\n\nexport const PasswordInput = React.forwardRef<PasswordInputElement, PasswordInputProps>(\n ({ className, disabled, ...props }, forwardedRef) => {\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 return (\n <>\n <TextInput\n ref={inputRef}\n className={clsx(componentClassName, className)}\n type={visible ? 'text' : 'password'}\n disabled={disabled}\n {...props}\n >\n <TextInputSlot 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 </TextInputSlot>\n </TextInput>\n <div data-visually-hidden aria-live=\"assertive\" role=\"status\">\n {showVisibilityMessage ? visibilityMessage : ''}\n </div>\n </>\n );\n }\n);\n\nPasswordInput.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var e=["emphasis","subtle","outline"],s=["sm","md"],o={variant:{className:"variant",tokens:e,responsive:!1,default:"subtle"},size:{className:"size",tokens:s,responsive:!0,default:"md"}};export{o as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-LS6BEGH4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/Badge.props.ts"],"sourcesContent":["import { MarginProps } from '../../props/margin.props';\nimport { PropDef } from '../../props/prop-def';\nimport { TextTransformProps } from '../../props/text-transform.props';\nimport { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\nimport { Responsive } from '../../types/responsive';\n\nconst variants = ['emphasis', 'subtle', 'outline'] as const;\nconst sizes = ['sm', 'md'] as const;\n\nexport const badgePropDefs = {\n variant: { className: 'variant', tokens: variants, responsive: false, default: 'subtle' },\n size: { className: 'size', tokens: sizes, responsive: true, default: 'md' },\n} satisfies {\n variant: PropDef<(typeof variants)[number]>;\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport interface BadgeProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n MarginProps,\n TextTransformProps {\n /**\n * Sets the badges's visual variant\n * @default subtle\n */\n variant?: (typeof variants)[number];\n /**\n * Sets the badge size.\n * @default md\n */\n size?: Responsive<(typeof sizes)[number]>;\n /**\n * Sets the colour scheme.\n * @default info\n */\n colorScheme?:\n | 'info'\n | 'positive'\n | 'danger'\n | 'warning'\n | 'functional'\n | 'energy'\n | 'mobile'\n | 'broadband'\n | 'insurance'\n | 'cashback'\n | 'pig'\n | 'highlight';\n /**\n * Removes the bottom radius, set when the Badge sits directly above another container\n * @default false\n */\n flatBase?: boolean;\n}\n"],"mappings":"AAMA,IAAMA,EAAW,CAAC,WAAY,SAAU,SAAS,EAC3CC,EAAQ,CAAC,KAAM,IAAI,EAEZC,EAAgB,CAC3B,QAAS,CAAE,UAAW,UAAW,OAAQF,EAAU,WAAY,GAAO,QAAS,QAAS,EACxF,KAAM,CAAE,UAAW,OAAQ,OAAQC,EAAO,WAAY,GAAM,QAAS,IAAK,CAC5E","names":["variants","sizes","badgePropDefs"]}
|
|
@@ -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 _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
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
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 _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 _chunkHSPOCJ5Acjs = require('./chunk-HSPOCJ5A.cjs');var _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkUDOWEUCMcjs = require('./chunk-UDOWEUCM.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var R="CheckboxTile",B=_chunk4H5JT5ORcjs.b.call(void 0, R),D= exports.a =e.forwardRef(({className:I,id:y,disabled:a,value:o="on",onCheckedChange:c,label:i,helperText:l,image:N,"aria-labelledby":G,...H},w)=>{let{id:m,labelId:s,helperTextId:n}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:y,prefix:"radio"}),r=_chunkHSPOCJ5Acjs.c.call(void 0, ),t=_chunkUDOWEUCMcjs.c.call(void 0, ),E=_optionalChain([t, 'optionalAccess', _ => _.value, 'optionalAccess', _2 => _2.includes, 'call', _3 => _3(o)]),F=_optionalChain([r, 'optionalAccess', _4 => _4.hasGroupHelperText]),L=r?r["aria-describedby"]:"",b=!F&&!!l,P=!!i;return e.createElement("label",{className:_clsx2.default.call(void 0, B,I),"data-disabled":a?"":void 0},e.createElement(_radixui.Checkbox.Root,{ref:w,className:"hearth-CheckboxRoot",name:_optionalChain([t, 'optionalAccess', _5 => _5.name]),checked:E,value:o,...H,id:m,disabled:a,"aria-describedby":b?n:L,"aria-labelledby":G||P?s:void 0,onCheckedChange:d=>{r&&(d?_optionalChain([t, 'optionalAccess', _6 => _6.onItemCheck, 'call', _7 => _7(o)]):_optionalChain([t, 'optionalAccess', _8 => _8.onItemUncheck, 'call', _9 => _9(o)])),c&&c(d)}},e.createElement(_radixui.Checkbox.Indicator,{asChild:!0,className:"hearth-CheckboxIndicator"},e.createElement(_hearthreacticons.TickSmallIcon,null))),e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column"},e.createElement(_chunkGFWH3VRNcjs.a,{id:s,htmlFor:m,disableUserSelect:!0,className:"hearth-CheckboxLabel"},N,i),b?e.createElement(_chunkK5BEIZDAcjs.a,{id:n,disableUserSelect:!0},l):null))});D.displayName=R;exports.a = D;
|
|
2
|
+
//# sourceMappingURL=chunk-M5L7GYFB.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-M5L7GYFB.cjs","../src/components/CheckboxTile/CheckboxTile.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","CheckboxTile","className","providedId","disabled","value","onCheckedChange","label","helperText","image","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","context","useFormGroupBase","checkboxContext","useCheckboxGroup","checked","hasGroupHelperText","ariaDescribedby","showH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,CAAW,EAAA,CAAIhB,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CP,CACH,CAAA,CACE,IACN,CACF,CAEJ,CACF,CAAA,CAEAP,CAAAA,CAAa,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-M5L7GYFB.cjs","sourcesContent":[null,"import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { CheckboxTileProps } from './CheckboxTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { useIds } from '../../hooks/use-ids';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { Checkbox as RadixCheckbox } from 'radix-ui';\nimport { useCheckboxGroup } from '../CheckboxGroup/CheckboxGroup.context';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst componentName = 'CheckboxTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CheckboxTileElement = ElementRef<'button'>;\n\nexport const CheckboxTile = React.forwardRef<CheckboxTileElement, CheckboxTileProps>(\n (\n {\n className,\n id: providedId,\n disabled,\n value = 'on',\n onCheckedChange,\n label,\n helperText,\n image,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const context = useFormGroupBase();\n const checkboxContext = useCheckboxGroup();\n const checked = checkboxContext?.value?.includes(value);\n const hasGroupHelperText = context?.hasGroupHelperText;\n const ariaDescribedby = context ? context['aria-describedby'] : '';\n const showHelperText = !hasGroupHelperText && !!helperText;\n const showLabel = !!label;\n return (\n <label\n className={clsx(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n >\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...props}\n id={id}\n disabled={disabled}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby || showLabel ? labelId : undefined}\n onCheckedChange={(checked: boolean) => {\n if (context) {\n if (checked) {\n checkboxContext?.onItemCheck(value);\n } else {\n checkboxContext?.onItemUncheck(value);\n }\n }\n if (onCheckedChange) {\n onCheckedChange(checked);\n }\n }}\n >\n <RadixCheckbox.Indicator asChild className=\"hearth-CheckboxIndicator\">\n <TickSmallIcon />\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect className=\"hearth-CheckboxLabel\">\n {image}\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </label>\n );\n }\n);\n\nCheckboxTile.displayName = componentName;\n"]}
|