@utilitywarehouse/hearth-react 0.8.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-37VTNO3H.js +2 -0
- package/dist/chunk-37VTNO3H.js.map +1 -0
- package/dist/{chunk-M7JJH7UU.js → chunk-52UMCRWP.js} +2 -2
- package/dist/{chunk-66T22MXP.cjs → chunk-6XA4O3M3.cjs} +2 -2
- package/dist/{chunk-66T22MXP.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-KRLNL2VW.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-MYVMGI3E.cjs → chunk-EPKZSK2V.cjs} +2 -2
- package/dist/{chunk-MYVMGI3E.cjs.map → chunk-EPKZSK2V.cjs.map} +1 -1
- package/dist/{chunk-JLHY5GT7.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-IO77OE2Y.js +2 -0
- package/dist/chunk-IO77OE2Y.js.map +1 -0
- package/dist/{chunk-AADLVX32.cjs → chunk-KNZRWJJE.cjs} +2 -2
- package/dist/{chunk-AADLVX32.cjs.map → chunk-KNZRWJJE.cjs.map} +1 -1
- package/dist/{chunk-JTVPVO3R.cjs → chunk-KQP63BAK.cjs} +2 -2
- package/dist/{chunk-JTVPVO3R.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-MMH5KK7U.cjs → chunk-M5L7GYFB.cjs} +2 -2
- package/dist/{chunk-MMH5KK7U.cjs.map → chunk-M5L7GYFB.cjs.map} +1 -1
- package/dist/{chunk-OK7GLQBU.cjs → chunk-MBMSU7AI.cjs} +2 -2
- package/dist/{chunk-OK7GLQBU.cjs.map → chunk-MBMSU7AI.cjs.map} +1 -1
- package/dist/chunk-OENWMR2C.cjs +2 -0
- package/dist/chunk-OENWMR2C.cjs.map +1 -0
- package/dist/{chunk-F2ES3FZC.cjs → chunk-PEC5UK3V.cjs} +2 -2
- package/dist/{chunk-F2ES3FZC.cjs.map → chunk-PEC5UK3V.cjs.map} +1 -1
- package/dist/{chunk-44M3HSOB.js → chunk-PGPMMXR6.js} +2 -2
- package/dist/{chunk-FED7OYNV.cjs → chunk-PYYVUI5W.cjs} +2 -2
- package/dist/{chunk-FED7OYNV.cjs.map → chunk-PYYVUI5W.cjs.map} +1 -1
- package/dist/{chunk-LSSHFMRD.js → chunk-QV4D3AS6.js} +2 -2
- package/dist/{chunk-PPOYG7AT.js → chunk-T236DCNC.js} +2 -2
- package/dist/{chunk-YZ26DXQZ.js → chunk-TRQYHK6F.js} +2 -2
- package/dist/{chunk-WZA32VXG.cjs → chunk-V2Z3FLZS.cjs} +2 -2
- package/dist/{chunk-WZA32VXG.cjs.map → chunk-V2Z3FLZS.cjs.map} +1 -1
- package/dist/{chunk-QG2PPXGR.js → chunk-VBIUSNIN.js} +2 -2
- package/dist/{chunk-HCP77JZ2.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/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/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/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 +3 -3
- package/styles.css +1 -1
- package/dist/chunk-RL3MTR6O.cjs +0 -2
- package/dist/chunk-RL3MTR6O.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-M7JJH7UU.js.map → chunk-52UMCRWP.js.map} +0 -0
- /package/dist/{chunk-KRLNL2VW.js.map → chunk-BDXQRSF4.js.map} +0 -0
- /package/dist/{chunk-JLHY5GT7.js.map → chunk-EVTSIFYV.js.map} +0 -0
- /package/dist/{chunk-44M3HSOB.js.map → chunk-PGPMMXR6.js.map} +0 -0
- /package/dist/{chunk-LSSHFMRD.js.map → chunk-QV4D3AS6.js.map} +0 -0
- /package/dist/{chunk-PPOYG7AT.js.map → chunk-T236DCNC.js.map} +0 -0
- /package/dist/{chunk-YZ26DXQZ.js.map → chunk-TRQYHK6F.js.map} +0 -0
- /package/dist/{chunk-QG2PPXGR.js.map → chunk-VBIUSNIN.js.map} +0 -0
- /package/dist/{chunk-HCP77JZ2.js.map → chunk-YXZJ5SGZ.js.map} +0 -0
|
@@ -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"]}
|
|
@@ -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,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,IAAMC,CAAAA,CAAgB,CACpB,GAAGF,CAAAA,CACH,QAAA,CAAAN,CAAAA,CACA,QAAA,CAAAD,CAAAA,CACA,KAAA,CAAAJ,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CACF,CAAA,CACMW,CAAAA,CAAsB,CAC1B,KAAA,CAAOjB,CAAAA,CACP,SAAA,CAAAC,CAAAA,CACA,IAAA,CAAAY,CAAAA,CACA,QAAA,CAAAN,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CACF,CAAA,CAEA,OACE,CAAA,CAAA,aAAA,CAACM,mBAAAA,CAAA,CAAc,GAAA,CAAKH,CAAAA,CAAM,GAAGC,CAAAA,CAAAA,CAC3B,CAAA,CAAA,aAAA,CAACG,mBAAAA,CAAgB,IAAA,CAAhB,CACC,OAAA,CAAO,CAAA,CAAA,CACP,SAAA,CAAWC,4BAAAA,CAAKxB,CAAoBM,CAAS,CAAA,CAC5C,GAAGe,CAAAA,CACJ,WAAA,CAAahB,CAAAA,GAAc,QAAA,CAAW,UAAA,CAAa,YAAA,CAAA,CAEnD,CAAA,CAAA,aAAA,CAACoB,mBAAAA,CAAA,CAAK,KAAA,CAAOrB,CAAAA,CAAAA,CAAeD,CAAS,CACvC,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
|
|
@@ -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-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 T}from"./chunk-PJXMEG7B.js";import{
|
|
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"]}
|
|
@@ -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
|
-
"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
|
|
@@ -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-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","useFormGroupBase","showHelperText","showLabel","clsx","RadixRadioGroup","Flex","Label","HelperText"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECA9N,wEAEN,mCAI6B,IASxCA,CAAAA,CAAgB,OAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAgB5CC,CAAAA,aAAc,CAAA,CAAA,UAAA,CACzB,CACE,CACE,EAAA,CAAIC,CAAAA,CACJ,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,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,CAAAZ,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CACtE,CAAE,kBAAA,CAAAa,CAAAA,CAAoB,kBAAA,CAAoBC,CAAgB,CAAA,CAAIC,iCAAAA,CAAiB,CAC/EC,CAAAA,CAAyB,CAACH,CAAAA,EAAsBX,CAAAA,GAAe,KAAA,CAAA,CAC/De,CAAAA,CAAY,CAAC,CAAChB,CAAAA,CACpB,OACE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWiB,4BAAAA,CAAKrB,CAAoBO,CAAS,CAAA,CAAA,CAChD,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,uBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAACe,mBAAAA,CAAgB,IAAA,CAAhB,CACC,GAAA,CAAKX,CAAAA,CACJ,GAAGD,CAAAA,CACJ,EAAA,CAAIE,CAAAA,CACJ,kBAAA,CAAkBO,CAAAA,CAAiBL,CAAAA,CAAeG,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","cl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AAA,CAAA,IAAa,CAAA,CAAKrB,eAAAA,CAAA,aAAA,CAACsB,iCAAAA,CAAA,IAAgB,CACjD,CACF,CACF,CAAA,CACAtB,eAAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,sBAAA,CAAoB,CAAA,CAAA,CAAC,WAAA,CAAU,WAAA,CAAY,IAAA,CAAK,QAAA,CAAA,CAClDS,CAAAA,CAAwBO,CAAAA,CAAoB,EAC/C,CACF,CAEJ,CACF,CAAA,CAEAjB,CAAAA,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","showHelperText","showLabel","clsx","RadixCheckbox","TickSmallIcon","Flex","Label","HelperText"],"mappings":"AAAA,u/BAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECAvQ,wEAEN,wEAMa,mCAIY,IAIpCA,CAAAA,CAAgB,cAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAqB,CAAA,CAAA,UAAA,CAChC,CACE,CACE,SAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,IAAA,CACR,eAAA,CAAAC,CAAAA,CACA,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,CAAAb,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CACtEc,CAAAA,CAAUC,iCAAAA,CAAiB,CAC3BC,CAAAA,CAAkBC,iCAAAA,CAAiB,CACnCC,CAAAA,iBAAUF,CAAAA,2BAAiB,KAAA,6BAAO,QAAA,mBAASd,CAAK,GAAA,CAChDiB,CAAAA,iB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A,aAAA,CAACC,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAA,CACd,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CAAM,EAAA,CAAIhB,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAAC,SAAA,CAAU,sBAAA,CAAA,CAC1DJ,CAAAA,CACAF,CACH,CAAA,CACCiB,CAAAA,CACC,CAAA,CAAA,aAAA,CAACO,mBAAAA,CAAA,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"]}
|
|
@@ -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 _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkTIOWEGWWcjs = require('./chunk-TIOWEGWW.cjs');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 _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkTIOWEGWWcjs = require('./chunk-TIOWEGWW.cjs');var _chunkHSPOCJ5Acjs = require('./chunk-HSPOCJ5A.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.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 F="FormGroupBase",M=_chunk4H5JT5ORcjs.b.call(void 0, F),S= exports.a =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}=_chunk5DRU6TDWcjs.a.call(void 0, g,_chunkLAVQWQP2cjs.a),{id:w,labelId:n,helperTextId:m,validationTextId:s}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:E,prefix:"fieldset"}),D=!!i,p=!!r,o=!!(a&&t),f=o&&a==="invalid",c=_chunkDSW76HKTcjs.a.call(void 0, 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:_clsx2.default.call(void 0, M,N),ref:I,...V,disabled:l,id:w,"data-disabled":l?"":void 0,"aria-errormessage":d||f?s:void 0,"aria-labelledby":_nullishCoalesce(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(_chunkLVPYDLKGcjs.a,{direction:"column",alignItems:"start",className:"hearth-HelperTextContainer"},r?e.createElement(_chunkK5BEIZDAcjs.a,{id:m,disabled:l},r):null,o?e.createElement(_chunkTIOWEGWWcjs.a,{id:s,status:a},t):null):null):null,e.createElement(_chunkHSPOCJ5Acjs.b,{value:L},P))});S.displayName=F;exports.a = S;
|
|
2
|
+
//# sourceMappingURL=chunk-MBMSU7AI.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-MBMSU7AI.cjs","../src/components/FormGroupBase/FormGroupBase.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","FormGroupBase","props","ref","children","className","providedId","label","helperText","validationText","validationStatus","disabled","ariaLabelledby","ariaDescribedby","ariaErrorMessage","fieldsetProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","hasLabel","hasHelperText","showValidationText","showInvalid","ariaDescribedbyValue","mergeIds","value","clsx","Flex","HelperText","ValidationText","FormGroupBaseProvider"],"mappings":"AAAA,ulBAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECAzV,wEAON,IAOXA,CAAAA,CAAgB,eAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAsB,CAAA,CAAA,UAAA,CACjC,CAACC,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WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-MBMSU7AI.cjs","sourcesContent":[null,"import * as React from 'react';\nimport type { ElementRef } from 'react';\nimport { useIds } from '../../hooks/use-ids';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { Flex } from '../Flex/Flex';\nimport { HelperText } from '../HelperText/HelperText';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport clsx from 'clsx';\nimport type { FormGroupBaseProps } from './FormGroupBase.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { FormGroupBaseProvider } from './FormGroupBase.context';\n\nconst componentName = 'FormGroupBase';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype FormGroupBaseElement = ElementRef<'fieldset'>;\n\nexport const FormGroupBase = React.forwardRef<FormGroupBaseElement, FormGroupBaseProps>(\n (props, ref) => {\n const {\n children,\n className,\n id: providedId,\n label,\n helperText,\n validationText,\n validationStatus,\n disabled,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-errormessage': ariaErrorMessage,\n ...fieldsetProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'fieldset',\n });\n const hasLabel = Boolean(label);\n const hasHelperText = Boolean(helperText);\n const showValidationText = Boolean(validationStatus && validationText);\n const showInvalid = showValidationText && validationStatus === 'invalid';\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby || !!helperText ? helperTextId : undefined,\n ariaErrorMessage || showValidationText ? validationTextId : undefined\n );\n const value = {\n hasGroupHelperText: hasHelperText,\n hasGroupValidationText: Boolean(\n validationStatus !== undefined && validationText !== undefined\n ),\n 'aria-describedby': ariaDescribedbyValue,\n };\n\n return (\n <fieldset\n className={clsx(componentClassName, className)}\n ref={ref}\n {...fieldsetProps}\n disabled={disabled}\n id={id}\n data-disabled={disabled ? '' : undefined}\n aria-errormessage={ariaErrorMessage || showInvalid ? validationTextId : undefined}\n aria-labelledby={ariaLabelledby ?? (Boolean(label) ? labelId : undefined)}\n aria-invalid={showInvalid}\n aria-describedby={ariaDescribedbyValue}\n >\n {hasLabel ? (\n <>\n <legend id={labelId} className=\"hearth-Legend\">\n {label}\n </legend>\n {hasHelperText || showValidationText ? (\n <Flex direction=\"column\" alignItems=\"start\" className=\"hearth-HelperTextContainer\">\n {helperText ? (\n <HelperText id={helperTextId} disabled={disabled}>\n {helperText}\n </HelperText>\n ) : null}\n {showValidationText ? (\n <ValidationText id={validationTextId} status={validationStatus}>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n ) : null}\n </>\n ) : null}\n <FormGroupBaseProvider value={value}>{children}</FormGroupBaseProvider>\n </fieldset>\n );\n }\n);\n\nFormGroupBase.displayName = componentName;\n"]}
|
|
@@ -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 _chunkI5YVANFZcjs = require('./chunk-I5YVANFZ.cjs');var _chunkUICIKADYcjs = require('./chunk-UICIKADY.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 s="Badge",P=_chunk4H5JT5ORcjs.b.call(void 0, s),B= exports.a =e.forwardRef((p,f)=>{let{className:n,colorScheme:c="info",flatBase:d,...i}=_chunk5DRU6TDWcjs.a.call(void 0, p,_chunkI5YVANFZcjs.a,_chunkLAVQWQP2cjs.a,_chunkUICIKADYcjs.a),l={"data-colorscheme":c,"data-bottom-radius-zero":d?"":void 0};return e.createElement("span",{ref:f,className:_clsx2.default.call(void 0, P,n),...l,...i})});B.displayName=s;exports.a = B;
|
|
2
|
+
//# sourceMappingURL=chunk-OENWMR2C.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-OENWMR2C.cjs","../src/components/Badge/Badge.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","Badge","props","ref","className","colorScheme","flatBase","badgeProps","extractProps","badgePropDefs","marginPropDefs","textTransformPropDefs","dataAttributeProps","clsx"],"mappings":"AAAA,mfAAwC,wDAAoC,wDAAyC,wDAAyC,wDAAyC,uECAhL,wEAGN,IAQXA,CAAAA,CAAgB,OAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAc,CAAA,CAAA,UAAA,CAAqC,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CAC9E,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,MAAA,CACd,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaN,CAAOO,mBAAAA,CAAeC,mBAAAA,CAAgBC,mBAAqB,CAAA,CACtEC,CAAAA,CAAqB,CACzB,kBAAA,CAAoBP,CAAAA,CACpB,yBAAA,CAA2BC,CAAAA,CAAW,EAAA,CAAK,KAAA,CAC7C,CAAA,CACA,OACE,CAAA,CAAA,aAAA,CAAC,MAAA,CAAA,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWU,4BAAAA,CAAKd,CAAoBK,CAAS,CAAA,CAC5C,GAAGQ,CAAAA,CACH,GAAGL,CAAAA,CACN,CAEJ,CAAC,CAAA,CAEDN,CAAAA,CAAM,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-OENWMR2C.cjs","sourcesContent":[null,"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"]}
|
|
@@ -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 _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.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 _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var T="Checkbox",B=_chunk4H5JT5ORcjs.b.call(void 0, T),j= exports.a =e.forwardRef((P,g)=>{let{id:F,label:c,helperText:l,className:G,disabled:i,onCheckedChange:s,value:o="on","aria-labelledby":H,image:L,...v}=_chunk5DRU6TDWcjs.a.call(void 0, P,_chunkLAVQWQP2cjs.a),{id:m,labelId:n,helperTextId:d}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:F,prefix:"checkbox"}),r=_chunkHSPOCJ5Acjs.c.call(void 0, ),a=_chunkUDOWEUCMcjs.c.call(void 0, ),w=_optionalChain([a, 'optionalAccess', _ => _.value, 'optionalAccess', _2 => _2.includes, 'call', _3 => _3(o)]),E=_optionalChain([r, 'optionalAccess', _4 => _4.hasGroupHelperText]),S=r?r["aria-describedby"]:"",b=!E&&!!l,p=!!c;return e.createElement(_chunkLVPYDLKGcjs.a,{className:_clsx2.default.call(void 0, B,G),"data-disabled":i?"":void 0},e.createElement(_radixui.Checkbox.Root,{ref:g,className:"hearth-CheckboxRoot",name:_optionalChain([a, 'optionalAccess', _5 => _5.name]),checked:w,value:o,...v,id:m,disabled:i,"aria-describedby":b?d:S,"aria-labelledby":H||p?n:void 0,onCheckedChange:h=>{r&&(h?_optionalChain([a, 'optionalAccess', _6 => _6.onItemCheck, 'call', _7 => _7(o)]):_optionalChain([a, 'optionalAccess', _8 => _8.onItemUncheck, 'call', _9 => _9(o)])),s&&s(h)}},e.createElement(_radixui.Checkbox.Indicator,{asChild:!0,className:"hearth-CheckboxIndicator"},e.createElement(_hearthreacticons.TickSmallIcon,null))),p?e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column",gap:"50"},e.createElement(_chunkGFWH3VRNcjs.a,{id:n,htmlFor:m,disableUserSelect:!0,className:"hearth-CheckboxLabel"},L,c),b?e.createElement(_chunkK5BEIZDAcjs.a,{id:d,disableUserSelect:!0},l):null):null)});j.displayName=T;exports.a = j;
|
|
2
|
+
//# sourceMappingURL=chunk-PEC5UK3V.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-PEC5UK3V.cjs","../src/components/Checkbox/Checkbox.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","Checkbox","props","ref","providedId","label","helperText","className","disabled","onCheckedChange","value","ariaLabelledby","image","checkboxProps","extractProps","marginPropDefs","id","labelId","helperTextId","useIds","context","useFormGroupBase","checkboxContext","useCheckboxGroup","checked","hasGroupHelperText","ariaDescribedby","showHelperText","showLabel","Flex","clsx","RadixCheckbox","TickSmallIcon","Label","HelperText"],"mappings":"AAAA,u/BAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECAzV,wEACN,wEAMa,mCAKY,IAIpCA,CAAAA,CAAgB,UAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAiB,CAAA,CAAA,UAAA,CAA2C,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACvF,GAAM,CACJ,EAAA,CAAIC,CAAAA,CACJ,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,IAAA,CACR,iBAAA,CAAmBC,CAAAA,CACnB,KAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaZ,CAAOa,mBAAc,CAAA,CAChC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAf,CAAAA,CAAY,MAAA,CAAQ,UAAW,CAAC,CAAA,CACzEgB,CAAAA,CAAUC,iCAAAA,CAAiB,CAC3BC,CAAAA,CAAkBC,iCAAAA,CAAiB,CACnCC,CAAAA,iBAAUF,CAAAA,2BAAiB,KAAA,6BAAO,QAAA,mBAASZ,CAAK,GAAA,CAChDe,CAAAA,iBAAqBL,CAAAA,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CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,IAAA,CAAA,CAC3B,CAAA,CAAA,aAAA,CAACI,mBAAAA,CAAA,CAAM,EAAA,CAAIhB,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAAC,SAAA,CAAU,sBAAA,CAAA,CAC1DJ,CAAAA,CACAP,CACH,CAAA,CACCsB,CAAAA,CACC,CAAA,CAAA,aAAA,CAACO,mBAAAA,CAAA,CAAW,EAAA,CAAIhB,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CZ,CACH,CAAA,CACE,IACN,CAAA,CACE,IACN,CAEJ,CAAC,CAAA,CAEDL,CAAAA,CAAS,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-PEC5UK3V.cjs","sourcesContent":[null,"import * as React from 'react';\nimport clsx from 'clsx';\nimport type { CheckboxProps } from './Checkbox.props';\nimport { Flex } from '../Flex/Flex';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport type { ElementRef } from 'react';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { useIds } from '../../hooks/use-ids';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { Checkbox as RadixCheckbox } from 'radix-ui';\nimport { useCheckboxGroup } from '../CheckboxGroup/CheckboxGroup.context';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst componentName = 'Checkbox';\nconst componentClassName = withGlobalPrefix(componentName);\n\nexport type CheckboxElement = ElementRef<'button'>;\n\nexport const Checkbox = React.forwardRef<CheckboxElement, CheckboxProps>((props, ref) => {\n const {\n id: providedId,\n label,\n helperText,\n className,\n disabled,\n onCheckedChange,\n value = 'on',\n 'aria-labelledby': ariaLabelledby,\n image,\n ...checkboxProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'checkbox' });\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\n return (\n <Flex className={clsx(componentClassName, className)} data-disabled={disabled ? '' : undefined}>\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...checkboxProps}\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 {showLabel ? (\n <Flex direction=\"column\" gap=\"50\">\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 ) : null}\n </Flex>\n );\n});\n\nCheckbox.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-EVTSIFYV.js";import{b as C}from"./chunk-T64W7Q7K.js";import{a as h}from"./chunk-432A6CLH.js";import{b as f}from"./chunk-4PEMW3UE.js";import*as o from"react";import U from"clsx";import{useControllableState as z}from"@radix-ui/react-use-controllable-state";var x="CheckboxGroup",A=f(x),S=o.forwardRef(({disabled:r,required:c,label:G,helperText:b,validationText:d,validationStatus:v,value:m,contentWidth:p="fit-content",direction:n="column",defaultValue:s,onValueChange:l,children:i,className:P,name:u,...R},N)=>{let w={...R,disabled:r,required:c,label:G,helperText:b,validationText:d,validationStatus:v},y={width:p,direction:n,name:u,required:c,disabled:r,defaultValue:s,value:m,onValueChange:l,children:i},[E=[],e]=z({prop:m,defaultProp:s||[],onChange:l}),F=o.useCallback(t=>e((a=[])=>[...a,t]),[e]),I=o.useCallback(t=>e((a=[])=>a.filter(B=>B!==t)),[e]),g={name:u,value:E,onItemCheck:F,onItemUncheck:I};return o.createElement(k,{ref:N,className:U(A,P),...w},o.createElement(h,{...y,className:"hearth-CheckboxGroupContent","data-orientation":n==="column"?"vertical":"horizontal","data-disabled":r?"":void 0,width:p},o.createElement(C,{value:g},i)))});S.displayName=x;export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PGPMMXR6.js.map
|