@utilitywarehouse/hearth-react 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2O7CWEQY.js +2 -0
- package/dist/chunk-2O7CWEQY.js.map +1 -0
- package/dist/chunk-3NXXZ66J.js +2 -0
- package/dist/chunk-3NXXZ66J.js.map +1 -0
- package/dist/chunk-3NY5JW7O.cjs +2 -0
- package/dist/chunk-3NY5JW7O.cjs.map +1 -0
- package/dist/{chunk-PFQOYDXS.js → chunk-44M3HSOB.js} +2 -2
- package/dist/{chunk-SQC6TTIC.cjs → chunk-66T22MXP.cjs} +2 -2
- package/dist/{chunk-SQC6TTIC.cjs.map → chunk-66T22MXP.cjs.map} +1 -1
- package/dist/{chunk-6LS3OYJB.cjs → chunk-AADLVX32.cjs} +2 -2
- package/dist/chunk-AADLVX32.cjs.map +1 -0
- package/dist/{chunk-AOJOLYXJ.cjs → chunk-F2ES3FZC.cjs} +1 -1
- package/dist/{chunk-AOJOLYXJ.cjs.map → chunk-F2ES3FZC.cjs.map} +1 -1
- package/dist/{chunk-EIZVSH76.cjs → chunk-FED7OYNV.cjs} +2 -2
- package/dist/{chunk-EIZVSH76.cjs.map → chunk-FED7OYNV.cjs.map} +1 -1
- package/dist/{chunk-SEYBIGHK.js → chunk-HCP77JZ2.js} +2 -2
- package/dist/{chunk-3M5GFHDO.cjs → chunk-IAKA53GQ.cjs} +1 -1
- package/dist/{chunk-3M5GFHDO.cjs.map → chunk-IAKA53GQ.cjs.map} +1 -1
- package/dist/{chunk-IOPJMAFL.js → chunk-INZC24ME.js} +2 -2
- package/dist/{chunk-FHBLIK6L.cjs → chunk-JDRGWJC4.cjs} +1 -1
- package/dist/{chunk-FHBLIK6L.cjs.map → chunk-JDRGWJC4.cjs.map} +1 -1
- package/dist/{chunk-X472IBQX.js → chunk-JLHY5GT7.js} +2 -2
- package/dist/{chunk-BNMQKKQG.cjs → chunk-JTVPVO3R.cjs} +2 -2
- package/dist/{chunk-BNMQKKQG.cjs.map → chunk-JTVPVO3R.cjs.map} +1 -1
- package/dist/{chunk-HJOJ2HKF.js → chunk-KRLNL2VW.js} +2 -2
- package/dist/chunk-LSSHFMRD.js +2 -0
- package/dist/{chunk-ZIV2RZZI.js.map → chunk-LSSHFMRD.js.map} +1 -1
- package/dist/{chunk-2GYFUPYX.js → chunk-M7JJH7UU.js} +2 -2
- package/dist/{chunk-YWGTX6NX.cjs → chunk-MGVROLEY.cjs} +1 -1
- package/dist/{chunk-YWGTX6NX.cjs.map → chunk-MGVROLEY.cjs.map} +1 -1
- package/dist/{chunk-3XA37DA3.cjs → chunk-MMH5KK7U.cjs} +1 -1
- package/dist/{chunk-3XA37DA3.cjs.map → chunk-MMH5KK7U.cjs.map} +1 -1
- package/dist/{chunk-NPVOVECB.cjs → chunk-MYVMGI3E.cjs} +2 -2
- package/dist/chunk-MYVMGI3E.cjs.map +1 -0
- package/dist/{chunk-KAWXU6RF.js → chunk-ODYEBO3I.js} +2 -2
- package/dist/{chunk-NMWYVOB5.cjs → chunk-OK7GLQBU.cjs} +1 -1
- package/dist/{chunk-NMWYVOB5.cjs.map → chunk-OK7GLQBU.cjs.map} +1 -1
- package/dist/chunk-PPOYG7AT.js +2 -0
- package/dist/{chunk-HKAUNENU.js.map → chunk-PPOYG7AT.js.map} +1 -1
- package/dist/{chunk-L5X63HCH.js → chunk-QG2PPXGR.js} +2 -2
- package/dist/{chunk-TBYXQUBP.js → chunk-TQIXFWV6.js} +2 -2
- package/dist/chunk-UMWTPGDS.cjs +2 -0
- package/dist/chunk-UMWTPGDS.cjs.map +1 -0
- package/dist/{chunk-OUOHGXSD.cjs → chunk-WZA32VXG.cjs} +2 -2
- package/dist/{chunk-OUOHGXSD.cjs.map → chunk-WZA32VXG.cjs.map} +1 -1
- package/dist/{chunk-UA7DGD3T.js → chunk-YZ26DXQZ.js} +2 -2
- 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/FormGroupBase/FormGroupBase.cjs +1 -1
- package/dist/components/FormGroupBase/FormGroupBase.js +1 -1
- package/dist/components/List/List.cjs +1 -1
- package/dist/components/List/List.cjs.map +1 -1
- package/dist/components/List/List.d.cts +1 -1
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/List.props.d.cts +2 -13
- package/dist/components/List/List.props.d.ts +2 -13
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/Radio/Radio.cjs +1 -1
- package/dist/components/Radio/Radio.js +1 -1
- package/dist/components/RadioCard/RadioCard.cjs +1 -1
- package/dist/components/RadioCard/RadioCard.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.cjs +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioTile/RadioTile.cjs +1 -1
- package/dist/components/RadioTile/RadioTile.js +1 -1
- package/dist/components/SearchInput/SearchInput.cjs +1 -1
- package/dist/components/SearchInput/SearchInput.js +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.cts +0 -4
- package/dist/components/SectionHeader/SectionHeader.d.ts +0 -4
- package/dist/components/SectionHeader/SectionHeader.js +1 -1
- package/dist/components/SectionHeader/SectionHeader.props.cjs +1 -2
- package/dist/components/SectionHeader/SectionHeader.props.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.props.d.cts +6 -39
- package/dist/components/SectionHeader/SectionHeader.props.d.ts +6 -39
- package/dist/components/SectionHeader/SectionHeader.props.js +0 -1
- package/dist/components/TextArea/TextArea.cjs +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextInput/TextInput.cjs +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
- package/styles.css +1 -1
- package/dist/chunk-2HATIMMN.cjs +0 -2
- package/dist/chunk-2HATIMMN.cjs.map +0 -1
- package/dist/chunk-6LS3OYJB.cjs.map +0 -1
- package/dist/chunk-HKAUNENU.js +0 -2
- package/dist/chunk-HLGSJ7VZ.js +0 -2
- package/dist/chunk-HLGSJ7VZ.js.map +0 -1
- package/dist/chunk-LX55FQR5.js +0 -2
- package/dist/chunk-LX55FQR5.js.map +0 -1
- package/dist/chunk-NPVOVECB.cjs.map +0 -1
- package/dist/chunk-QFVIQ5MD.cjs +0 -2
- package/dist/chunk-QFVIQ5MD.cjs.map +0 -1
- package/dist/chunk-RL2GY4IW.js +0 -2
- package/dist/chunk-RL2GY4IW.js.map +0 -1
- package/dist/chunk-TBOBX6LG.cjs +0 -2
- package/dist/chunk-TBOBX6LG.cjs.map +0 -1
- package/dist/chunk-ZIV2RZZI.js +0 -2
- /package/dist/{chunk-PFQOYDXS.js.map → chunk-44M3HSOB.js.map} +0 -0
- /package/dist/{chunk-SEYBIGHK.js.map → chunk-HCP77JZ2.js.map} +0 -0
- /package/dist/{chunk-IOPJMAFL.js.map → chunk-INZC24ME.js.map} +0 -0
- /package/dist/{chunk-X472IBQX.js.map → chunk-JLHY5GT7.js.map} +0 -0
- /package/dist/{chunk-HJOJ2HKF.js.map → chunk-KRLNL2VW.js.map} +0 -0
- /package/dist/{chunk-2GYFUPYX.js.map → chunk-M7JJH7UU.js.map} +0 -0
- /package/dist/{chunk-KAWXU6RF.js.map → chunk-ODYEBO3I.js.map} +0 -0
- /package/dist/{chunk-L5X63HCH.js.map → chunk-QG2PPXGR.js.map} +0 -0
- /package/dist/{chunk-TBYXQUBP.js.map → chunk-TQIXFWV6.js.map} +0 -0
- /package/dist/{chunk-UA7DGD3T.js.map → chunk-YZ26DXQZ.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as d}from"./chunk-3NXXZ66J.js";import{a as f}from"./chunk-B3LRMWN3.js";import{a as c}from"./chunk-4H4MW2WO.js";import{a as p}from"./chunk-XQ5A24NX.js";import{a as l}from"./chunk-RTGGS5XX.js";import{b as n}from"./chunk-4PEMW3UE.js";import*as e from"react";import C from"clsx";var h="List",E=n(h),R=e.forwardRef((L,r)=>{let{as:t="ul",className:N,colorScheme:o=void 0,variant:a,heading:i,headingElement:g,helperText:x,link:P,children:m,...s}=l(L,p),u={heading:i,headingElement:g,helperText:x,link:P};return e.createElement("div",{className:C(E,N)},i?e.createElement(d,{...u}):null,a===void 0||o===void 0?e.createElement(c,{asChild:!0,className:"hearth-ListContainer",role:"list"},e.createElement(t,{ref:r,...s},m)):e.createElement(f,{className:"hearth-ListContainer",paddingNone:!0,variant:a,colorScheme:o},e.createElement(t,{ref:r,role:"list",...s},m)))});R.displayName=h;export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2O7CWEQY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/List/List.tsx"],"sourcesContent":["import * as React from 'react';\nimport clsx from 'clsx';\nimport { type ListProps } from './List.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { Card } from '../Card/Card';\nimport { Box } from '../Box/Box';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\n\nconst componentName = 'List';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype ListElement = ElementRef<'ol'>;\n\nexport const List = React.forwardRef<ListElement, ListProps>((props, ref) => {\n const {\n as: Tag = 'ul',\n className,\n colorScheme = undefined,\n variant,\n heading,\n headingElement,\n helperText,\n link,\n children,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const headerProps = {\n heading,\n headingElement,\n helperText,\n link,\n };\n\n return (\n <div className={clsx(componentClassName, className)}>\n {heading ? <SectionHeader {...headerProps} /> : null}\n {variant === undefined || colorScheme === undefined ? (\n <Box asChild className=\"hearth-ListContainer\" role=\"list\">\n <Tag ref={ref} {...listProps}>\n {children}\n </Tag>\n </Box>\n ) : (\n <Card\n className=\"hearth-ListContainer\"\n paddingNone\n variant={variant}\n colorScheme={colorScheme}\n >\n <Tag ref={ref} role=\"list\" {...listProps}>\n {children}\n </Tag>\n </Card>\n )}\n </div>\n );\n});\n\nList.displayName = componentName;\n"],"mappings":"gPAAA,UAAYA,MAAW,QACvB,OAAOC,MAAU,OAUjB,IAAMC,EAAgB,OAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAa,aAAmC,CAACC,EAAOC,IAAQ,CAC3E,GAAM,CACJ,GAAIC,EAAM,KACV,UAAAC,EACA,YAAAC,EAAc,OACd,QAAAC,EACA,QAAAC,EACA,eAAAC,EACA,WAAAC,EACA,KAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAAIC,EAAaZ,EAAOa,CAAc,EAEhCC,EAAc,CAClB,QAAAR,EACA,eAAAC,EACA,WAAAC,EACA,KAAAC,CACF,EAEA,OACE,gBAAC,OAAI,UAAWM,EAAKlB,EAAoBM,CAAS,GAC/CG,EAAU,gBAACU,EAAA,CAAe,GAAGF,EAAa,EAAK,KAC/CT,IAAY,QAAaD,IAAgB,OACxC,gBAACa,EAAA,CAAI,QAAO,GAAC,UAAU,uBAAuB,KAAK,QACjD,gBAACf,EAAA,CAAI,IAAKD,EAAM,GAAGU,GAChBD,CACH,CACF,EAEA,gBAACQ,EAAA,CACC,UAAU,uBACV,YAAW,GACX,QAASb,EACT,YAAaD,GAEb,gBAACF,EAAA,CAAI,IAAKD,EAAK,KAAK,OAAQ,GAAGU,GAC5BD,CACH,CACF,CAEJ,CAEJ,CAAC,EAEDX,EAAK,YAAcH","names":["React","clsx","componentName","componentClassName","withGlobalPrefix","List","props","ref","Tag","className","colorScheme","variant","heading","headingElement","helperText","link","children","listProps","extractProps","marginPropDefs","headerProps","clsx","SectionHeader","Box","Card"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as r}from"./chunk-3YTV62G7.js";import{a as i}from"./chunk-JPYVWTDN.js";import{b as o}from"./chunk-4PEMW3UE.js";import*as e from"react";import s from"clsx";var m="SectionHeader",f=o(m),H=e.forwardRef(({className:a,heading:n,id:d,headingElement:l="div",helperText:t,link:c,...p})=>e.createElement("div",{className:s(f,a)},e.createElement(r,{asChild:!0,size:"md",id:d,...p},e.createElement(l,null,n)),t?e.createElement(i,{disableUserSelect:!0},t):null,c));H.displayName=m;export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3NXXZ66J.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SectionHeader/SectionHeader.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Heading } from '../Heading/Heading';\nimport { HelperText } from '../HelperText/HelperText';\nimport { SectionHeaderProps } from './SectionHeader.props';\n\nconst componentName = 'SectionHeader';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype SectionHeaderElement = ElementRef<'div'>;\n\nexport const SectionHeader = React.forwardRef<SectionHeaderElement, SectionHeaderProps>(\n ({ className, heading, id, headingElement: HeadingEl = 'div', helperText, link, ...props }) => {\n return (\n <div className={clsx(componentClassName, className)}>\n <Heading asChild size=\"md\" id={id} {...props}>\n <HeadingEl>{heading}</HeadingEl>\n </Heading>\n {helperText ? <HelperText disableUserSelect>{helperText}</HelperText> : null}\n {link}\n </div>\n );\n }\n);\n\nSectionHeader.displayName = componentName;\n"],"mappings":"wHAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAU,OAQjB,IAAMC,EAAgB,gBAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAsB,aACjC,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAAC,EAAI,eAAgBC,EAAY,MAAO,WAAAC,EAAY,KAAAC,EAAM,GAAGC,CAAM,IAErF,gBAAC,OAAI,UAAWC,EAAKV,EAAoBG,CAAS,GAChD,gBAACQ,EAAA,CAAQ,QAAO,GAAC,KAAK,KAAK,GAAIN,EAAK,GAAGI,GACrC,gBAACH,EAAA,KAAWF,CAAQ,CACtB,EACCG,EAAa,gBAACK,EAAA,CAAW,kBAAiB,IAAEL,CAAW,EAAgB,KACvEC,CACH,CAGN,EAEAN,EAAc,YAAcH","names":["React","clsx","componentName","componentClassName","withGlobalPrefix","SectionHeader","className","heading","id","HeadingEl","helperText","link","props","clsx","Heading","HelperText"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkUMWTPGDScjs = require('./chunk-UMWTPGDS.cjs');var _chunkASOT2I4Dcjs = require('./chunk-ASOT2I4D.cjs');var _chunkVPZS4ZLEcjs = require('./chunk-VPZS4ZLE.cjs');var _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunk5DRU6TDWcjs = require('./chunk-5DRU6TDW.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var h="List",E=_chunk4H5JT5ORcjs.b.call(void 0, h),R= exports.a =e.forwardRef((L,r)=>{let{as:t="ul",className:N,colorScheme:o=void 0,variant:a,heading:i,headingElement:g,helperText:x,link:P,children:m,...s}=_chunk5DRU6TDWcjs.a.call(void 0, L,_chunkLAVQWQP2cjs.a),u={heading:i,headingElement:g,helperText:x,link:P};return e.createElement("div",{className:_clsx2.default.call(void 0, E,N)},i?e.createElement(_chunkUMWTPGDScjs.a,{...u}):null,a===void 0||o===void 0?e.createElement(_chunkVPZS4ZLEcjs.a,{asChild:!0,className:"hearth-ListContainer",role:"list"},e.createElement(t,{ref:r,...s},m)):e.createElement(_chunkASOT2I4Dcjs.a,{className:"hearth-ListContainer",paddingNone:!0,variant:a,colorScheme:o},e.createElement(t,{ref:r,role:"list",...s},m)))});R.displayName=h;exports.a = R;
|
|
2
|
+
//# sourceMappingURL=chunk-3NY5JW7O.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-3NY5JW7O.cjs","../src/components/List/List.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","List","props","ref","Tag","className","colorScheme","variant","heading","headingElement","helperText","link","children","listProps","extractProps","marginPropDefs","headerProps","clsx","SectionHeader","Box","Card"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECA9N,wEACN,IAUXA,CAAAA,CAAgB,MAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAa,CAAA,CAAA,UAAA,CAAmC,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CAC3E,GAAM,CACJ,EAAA,CAAIC,CAAAA,CAAM,IAAA,CACV,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,KAAA,CAAA,CACd,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaZ,CAAOa,mBAAc,CAAA,CAEhCC,CAAAA,CAAc,CAClB,OAAA,CAAAR,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CACF,CAAA,CAEA,OACE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWM,4BAAAA,CAAKlB,CAAoBM,CAAS,CAAA,CAAA,CAC/CG,CAAAA,CAAU,CAAA,CAAA,aAAA,CAACU,mBAAAA,CAAA,CAAe,GAAGF,CAAAA,CAAa,CAAA,CAAK,IAAA,CAC/CT,CAAAA,GAAY,KAAA,CAAA,EAAaD,CAAAA,GAAgB,KAAA,CAAA,CACxC,CAAA,CAAA,aAAA,CAACa,mBAAAA,CAAA,CAAI,OAAA,CAAO,CAAA,CAAA,CAAC,SAAA,CAAU,sBAAA,CAAuB,IAAA,CAAK,MAAA,CAAA,CACjD,CAAA,CAAA,aAAA,CAACf,CAAAA,CAAA,CAAI,GAAA,CAAKD,CAAAA,CAAM,GAAGU,CAAAA,CAAAA,CAChBD,CACH,CACF,CAAA,CAEA,CAAA,CAAA,aAAA,CAACQ,mBAAAA,CAAA,CACC,SAAA,CAAU,sBAAA,CACV,WAAA,CAAW,CAAA,CAAA,CACX,OAAA,CAASb,CAAAA,CACT,WAAA,CAAaD,CAAAA,CAAAA,CAEb,CAAA,CAAA,aAAA,CAACF,CAAAA,CAAA,CAAI,GAAA,CAAKD,CAAAA,CAAK,IAAA,CAAK,MAAA,CAAQ,GAAGU,CAAAA,CAAAA,CAC5BD,CACH,CACF,CAEJ,CAEJ,CAAC,CAAA,CAEDX,CAAAA,CAAK,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-3NY5JW7O.cjs","sourcesContent":[null,"import * as React from 'react';\nimport clsx from 'clsx';\nimport { type ListProps } from './List.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { Card } from '../Card/Card';\nimport { Box } from '../Box/Box';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { SectionHeader } from '../SectionHeader/SectionHeader';\n\nconst componentName = 'List';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype ListElement = ElementRef<'ol'>;\n\nexport const List = React.forwardRef<ListElement, ListProps>((props, ref) => {\n const {\n as: Tag = 'ul',\n className,\n colorScheme = undefined,\n variant,\n heading,\n headingElement,\n helperText,\n link,\n children,\n ...listProps\n } = extractProps(props, marginPropDefs);\n\n const headerProps = {\n heading,\n headingElement,\n helperText,\n link,\n };\n\n return (\n <div className={clsx(componentClassName, className)}>\n {heading ? <SectionHeader {...headerProps} /> : null}\n {variant === undefined || colorScheme === undefined ? (\n <Box asChild className=\"hearth-ListContainer\" role=\"list\">\n <Tag ref={ref} {...listProps}>\n {children}\n </Tag>\n </Box>\n ) : (\n <Card\n className=\"hearth-ListContainer\"\n paddingNone\n variant={variant}\n colorScheme={colorScheme}\n >\n <Tag ref={ref} role=\"list\" {...listProps}>\n {children}\n </Tag>\n </Card>\n )}\n </div>\n );\n});\n\nList.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-JLHY5GT7.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-44M3HSOB.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 _chunkOK7GLQBUcjs = require('./chunk-OK7GLQBU.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(_chunkOK7GLQBUcjs.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-66T22MXP.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-66T22MXP.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,Q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-66T22MXP.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"]}
|
|
@@ -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 _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkHSPOCJ5Acjs = require('./chunk-HSPOCJ5A.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:
|
|
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 _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkHSPOCJ5Acjs = require('./chunk-HSPOCJ5A.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-AADLVX32.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-AADLVX32.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,C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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-AADLVX32.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
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 _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkHSPOCJ5Acjs = require('./chunk-HSPOCJ5A.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-
|
|
2
|
+
//# sourceMappingURL=chunk-F2ES3FZC.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-F2ES3FZC.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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CAAAA,CAAiBT,CAAAA,CAAeQ,CAAAA,CAClD,iBAAA,CAAiBf,CAAAA,EAAkBiB,CAAAA,CAAYX,CAAAA,CAAU,KAAA,CAAA,CACzD,eAAA,CAAkBO,CAAAA,EAAqB,CACjCJ,CAAAA,EAAAA,CACEI,CAAAA,iBACFF,CAAAA,6BAAiB,WAAA,mBAAYZ,CAAK,GAAA,iBAElCY,CAAAA,6BAAiB,aAAA,mBAAcZ,CAAK,GAAA,CAAA,CAGpCD,CAAAA,EACFA,CAAAA,CAAgBe,CAAO,CAE3B,CAAA,CAAA,CAEA,CAAA,CAAA,aAAA,CAACO,iBAAAA,CAAc,SAAA,CAAd,CAAwB,OAAA,CAAO,CAAA,CAAA,CAAC,SAAA,CAAU,0BAAA,CAAA,CACzC,CAAA,CAAA,aAAA,CAACC,+BAAAA,CAAA,IAAc,CACjB,CACF,CAAA,CACCJ,CAAAA,CACC,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-F2ES3FZC.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
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk24SSG67Rcjs = require('./chunk-24SSG67R.cjs');var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk24SSG67Rcjs = require('./chunk-24SSG67R.cjs');var _chunkJDRGWJC4cjs = require('./chunk-JDRGWJC4.cjs');var _chunkPZSLW42Xcjs = require('./chunk-PZSLW42X.cjs');var _chunkM6LIAICLcjs = require('./chunk-M6LIAICL.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="SearchInput",T=_chunk4H5JT5ORcjs.b.call(void 0, f),E= exports.a =_react2.default.forwardRef(({className:i,disabled:l,value:o,onClear:r,loading:s,...a},I)=>{let h=_react2.default.useRef(null),t=I||h,S=_react2.default.useCallback(x=>{typeof r!="function"||x.button!==0||(r(),t&&typeof t=="object"&&t.current&&t.current.focus())},[t,r]);return _react2.default.createElement(_chunkJDRGWJC4cjs.a,{ref:t,className:_clsx2.default.call(void 0, T,i),type:"search",role:"search",enterKeyHint:"search",disabled:l,hideLabel:!0,value:o,...a},_react2.default.createElement(_chunk24SSG67Rcjs.a,{placement:"prefix"},_react2.default.createElement(_hearthreacticons.SearchMediumIcon,null)),s?_react2.default.createElement(_chunk24SSG67Rcjs.a,{placement:"suffix"},_react2.default.createElement(_chunkM6LIAICLcjs.a,{size:"xs",color:"grey1000"})):null,o!==void 0&&String(o).length>0?_react2.default.createElement(_chunk24SSG67Rcjs.a,{placement:"suffix"},_react2.default.createElement(_chunkPZSLW42Xcjs.a,{type:"button",label:"clear search",onClick:S,disabled:l},_react2.default.createElement(_hearthreacticons.CloseSmallIcon,null))):null)});E.displayName=f;exports.a = E;
|
|
2
|
+
//# sourceMappingURL=chunk-FED7OYNV.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-FED7OYNV.cjs","../src/components/SearchInput/SearchInput.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","SearchInput","React","className","disabled","value","onClear","loading","props","forwardedRef","defaultRef","inputRef","handleClear","event","TextInput","clsx","TextInputSlot","SearchMediumIcon","Spinner","UnstyledIconButton","CloseSmallIcon"],"mappings":"AAAA,iOAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wECE3L,4EACC,wEAM+B,IAE3CA,CAAAA,CAAgB,aAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAcC,eAAAA,CAAM,UAAA,CAC/B,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAAA,CAAU,KAAA,CAAAC,CAAAA,CAAO,OAAA,CAAAC,CAAAA,CAAS,OAAA,CAAAC,CAAAA,CAAS,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAAiB,CAC5E,IAAM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AA,CAACc,mBAAAA,CAAA,CAAc,SAAA,CAAU,QAAA,CAAA,CACvBd,eAAAA,CAAA,aAAA,CAACiB,mBAAAA,CAAA,CACC,IAAA,CAAK,QAAA,CACL,KAAA,CAAM,cAAA,CACN,OAAA,CAASP,CAAAA,CACT,QAAA,CAAUR,CAAAA,CAAAA,CAEVF,eAAAA,CAAA,aAAA,CAACkB,gCAAAA,CAAA,IAAe,CAClB,CACF,CAAA,CACE,IACN,CAEJ,CACF,CAAA,CAEAnB,CAAAA,CAAY,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-FED7OYNV.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 { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { SearchInputProps } from './SearchInput.props';\nimport { Spinner } from '../Spinner/Spinner';\nimport { CloseSmallIcon, SearchMediumIcon } from '@utilitywarehouse/hearth-react-icons';\n\nconst componentName = 'SearchInput';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype SearchInputElement = ElementRef<'input'>;\n\nexport const SearchInput = React.forwardRef<SearchInputElement, SearchInputProps>(\n ({ className, disabled, value, onClear, loading, ...props }, forwardedRef) => {\n const defaultRef = React.useRef<HTMLInputElement | null>(null);\n const inputRef = forwardedRef || defaultRef;\n\n const handleClear = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (typeof onClear !== 'function' || event.button !== 0) {\n return;\n }\n onClear();\n\n if (inputRef && typeof inputRef === 'object' && inputRef.current) {\n inputRef.current.focus();\n }\n },\n [inputRef, onClear]\n );\n\n return (\n <TextInput\n ref={inputRef}\n className={clsx(componentClassName, className)}\n type=\"search\"\n role=\"search\"\n enterKeyHint=\"search\"\n disabled={disabled}\n hideLabel\n value={value}\n {...props}\n >\n <TextInputSlot placement=\"prefix\">\n <SearchMediumIcon />\n </TextInputSlot>\n {loading ? (\n <TextInputSlot placement=\"suffix\">\n <Spinner size=\"xs\" color=\"grey1000\" />\n </TextInputSlot>\n ) : null}\n {value !== undefined && String(value).length > 0 ? (\n <TextInputSlot placement=\"suffix\">\n <UnstyledIconButton\n type=\"button\"\n label=\"clear search\"\n onClick={handleClear}\n disabled={disabled}\n >\n <CloseSmallIcon />\n </UnstyledIconButton>\n </TextInputSlot>\n ) : null}\n </TextInput>\n );\n }\n);\n\nSearchInput.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-PUVKWSFV.js";import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-PUVKWSFV.js";import{a as p}from"./chunk-TQIXFWV6.js";import{a as m}from"./chunk-X3PGQ2KF.js";import{b as a}from"./chunk-4PEMW3UE.js";import v from"clsx";import t from"react";import{EyeOffSmallIcon as S,EyeSmallIcon as x}from"@utilitywarehouse/hearth-react-icons";var f="PasswordInput",P=a(f),h=t.forwardRef(({className:d,disabled:r,...c},b)=>{let y=t.useRef(null),s=b||y,[o,w]=t.useState(!1),[n,l]=t.useState(!1),I=t.useCallback(()=>{let e=!o,i=!n;w(e),l(i)},[o,n]);t.useEffect(()=>{let e=null;s&&typeof s=="object"&&s.current&&(e=s.current);let i=()=>{e?.type&&(e.type="password")};return e&&e.form!==null&&e.form.addEventListener("submit",i),()=>{e?.form&&e.form.removeEventListener("submit",i)}},[s]);let E=`Your password is ${o?"shown":"hidden"}!`;return t.useEffect(()=>{setTimeout(()=>{l(!1)},1500)},[n]),t.createElement(t.Fragment,null,t.createElement(p,{ref:s,className:v(P,d),type:o?"text":"password",disabled:r,...c},t.createElement(u,{placement:"suffix"},t.createElement(m,{type:"button",label:"toggle password visibility",onClick:I,disabled:r,"aria-pressed":o},o?t.createElement(x,null):t.createElement(S,null)))),t.createElement("div",{"data-visually-hidden":!0,"aria-live":"assertive",role:"status"},n?E:""))});h.displayName=f;export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HCP77JZ2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkTIOWEGWWcjs = require('./chunk-TIOWEGWW.cjs');var _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunk7TQMVZ2Rcjs = require('./chunk-7TQMVZ2R.cjs');var _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.cjs');var _chunk5DRU6TDWcjs = require('./chunk-5DRU6TDW.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var g="TextArea",U=_chunk4H5JT5ORcjs.b.call(void 0, g),q= exports.a =e.forwardRef((I,N)=>{let{className:P,validationStatus:a,validationText:d,label:R,helperText:i,id:w,disabled:r,readOnly:l,required:n,placeholder:F,resize:E,rows:S=3,...V}=_chunk5DRU6TDWcjs.a.call(void 0, I,_chunkLAVQWQP2cjs.a),{id:s,labelId:m,helperTextId:p,validationTextId:o}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:w,prefix:"textarea"}),f=!l&&!r&&a!==void 0&&d!==void 0,B=_chunkDSW76HKTcjs.a.call(void 0, i?p:void 0,f?o:void 0);return e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column",gap:"75",className:_clsx2.default.call(void 0, U,P),"data-validation-status":a||void 0,"data-disabled":r?"":void 0},e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column"},e.createElement(_chunkGFWH3VRNcjs.a,{htmlFor:s,id:m,disableUserSelect:!0,fontWeight:"semibold"},R,n?null:e.createElement(_chunk7TQMVZ2Rcjs.a,{as:"span",marginLeft:"50"},"(optional)")),i?e.createElement(_chunkK5BEIZDAcjs.a,{id:p,disableUserSelect:!0},i):null),e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column",className:"hearth-TextAreaRoot"},e.createElement("textarea",{ref:N,id:s,rows:S,required:n,disabled:r,readOnly:l,placeholder:r?void 0:F,"aria-labelledby":m,"aria-describedby":B,"aria-invalid":a==="invalid"?!0:void 0,"aria-errormessage":a==="invalid"?o:void 0,"data-resize":E,...V})),f?e.createElement(_chunkTIOWEGWWcjs.a,{status:a,disableUserSelect:!0,id:o},d):null)});q.displayName=g;exports.a = q;
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-IAKA53GQ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-IAKA53GQ.cjs","../src/components/TextArea/TextArea.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","TextArea","props","ref","className","validationStatus","validationText","label","helperText","providedId","disabled","readOnly","required","placeholder","resize","rows","textAreaProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidationText","ariaDescribedbyValue","mergeIds","Flex","clsx","Label","BodyText","HelperText","ValidationText"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDA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,CACvE,aAAA,CAAaR,CAAAA,CACZ,GAAGE,CAAAA,CACN,CACF,CAAA,CACCQ,CAAAA,CACC,CAAA,CAAA,aAAA,CAACQ,mBAAAA,CAAA,CAAe,MAAA,CAAQ3B,CAAAA,CAAkB,iBAAA,CAAiB,CAAA,CAAA,CAAC,EAAA,CAAIiB,CAAAA,CAAAA,CAC7DhB,CACH,CAAA,CACE,IACN,CAEJ,CAAC,CAAA,CAEDL,CAAAA,CAAS,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-IAKA53GQ.cjs","sourcesContent":[null,"import * as React from 'react';\nimport type { ElementRef } from 'react';\n\nimport clsx from 'clsx';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { useIds } from '../../hooks/use-ids';\nimport { TextAreaProps } from './TextArea.props';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport { Flex } from '../Flex/Flex';\nimport { BodyText } from '../BodyText/BodyText';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'TextArea';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype TextAreaElement = ElementRef<'textarea'>;\n\nexport const TextArea = React.forwardRef<TextAreaElement, TextAreaProps>((props, ref) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\n helperText,\n id: providedId,\n disabled,\n readOnly,\n required,\n placeholder,\n resize,\n rows = 3,\n ...textAreaProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'textarea',\n });\n\n const showValidationText = Boolean(\n !readOnly && !disabled && validationStatus !== undefined && validationText !== undefined\n );\n\n const ariaDescribedbyValue = mergeIds(\n !!helperText ? helperTextId : undefined,\n showValidationText ? validationTextId : undefined\n );\n\n return (\n <Flex\n direction=\"column\"\n gap=\"75\"\n className={clsx(componentClassName, className)}\n data-validation-status={validationStatus ? validationStatus : undefined}\n data-disabled={disabled ? '' : undefined}\n >\n <Flex direction=\"column\">\n <Label htmlFor={id} id={labelId} disableUserSelect fontWeight=\"semibold\">\n {label}\n {required ? null : (\n <BodyText as=\"span\" marginLeft=\"50\">\n (optional)\n </BodyText>\n )}\n </Label>\n {helperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n <Flex direction=\"column\" className=\"hearth-TextAreaRoot\">\n <textarea\n ref={ref}\n id={id}\n rows={rows}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={!disabled ? placeholder : undefined}\n aria-labelledby={labelId}\n aria-describedby={ariaDescribedbyValue}\n aria-invalid={validationStatus === 'invalid' ? true : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n data-resize={resize}\n {...textAreaProps}\n />\n </Flex>\n {showValidationText ? (\n <ValidationText status={validationStatus} disableUserSelect id={validationTextId}>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n );\n});\n\nTextArea.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as y}from"./chunk-PJXMEG7B.js";import{a as h}from"./chunk-C2M7FEJX.js";import{a as T}from"./chunk-JPYVWTDN.js";import{a as t}from"./chunk-432A6CLH.js";import{a as b}from"./chunk-VBMXLPU5.js";import{a as u}from"./chunk-XQ5A24NX.js";import{a as v}from"./chunk-QC4ZMGCU.js";import{a as c}from"./chunk-RTGGS5XX.js";import{b as x}from"./chunk-4PEMW3UE.js";import{a as A}from"./chunk-DVGYWBKQ.js";import*as e from"react";import L from"clsx";var g="TextArea",U=x(g),q=e.forwardRef((I,N)=>{let{className:P,validationStatus:a,validationText:d,label:R,helperText:i,id:w,disabled:r,readOnly:l,required:n,placeholder:F,resize:E,rows:S=3,...V}=c(I,u),{id:s,labelId:m,helperTextId:p,validationTextId:o}=v({providedId:w,prefix:"textarea"}),f=!l&&!r&&a!==void 0&&d!==void 0,B=A(i?p:void 0,f?o:void 0);return e.createElement(t,{direction:"column",gap:"75",className:L(U,P),"data-validation-status":a||void 0,"data-disabled":r?"":void 0},e.createElement(t,{direction:"column"},e.createElement(h,{htmlFor:s,id:m,disableUserSelect:!0,fontWeight:"semibold"},R,n?null:e.createElement(b,{as:"span",marginLeft:"50"},"(optional)")),i?e.createElement(T,{id:p,disableUserSelect:!0},i):null),e.createElement(t,{direction:"column",className:"hearth-TextAreaRoot"},e.createElement("textarea",{ref:N,id:s,rows:S,required:n,disabled:r,readOnly:l,placeholder:r?void 0:F,"aria-labelledby":m,"aria-describedby":B,"aria-invalid":a==="invalid"?!0:void 0,"aria-errormessage":a==="invalid"?o:void 0,"data-resize":E,...V})),f?e.createElement(y,{status:a,disableUserSelect:!0,id:o},d):null)});q.displayName=g;export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-INZC24ME.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkTIOWEGWWcjs = require('./chunk-TIOWEGWW.cjs');var _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunk7TQMVZ2Rcjs = require('./chunk-7TQMVZ2R.cjs');var _chunkLAVQWQP2cjs = require('./chunk-LAVQWQP2.cjs');var _chunkTMWB3U4Xcjs = require('./chunk-TMWB3U4X.cjs');var _chunk5DRU6TDWcjs = require('./chunk-5DRU6TDW.cjs');var _chunk4H5JT5ORcjs = require('./chunk-4H5JT5OR.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _react = require('react'); var _react2 = _interopRequireDefault(_react);var P="TextInput",j=_chunk4H5JT5ORcjs.b.call(void 0, P),k= exports.a =_react2.default.forwardRef((E,L)=>{let{className:N,validationStatus:t,validationText:d,label:F,helperText:r,children:w,id:D,disabled:n,readOnly:l,hideLabel:H,required:s,placeholder:S,"aria-describedby":V,...q}=_chunk5DRU6TDWcjs.a.call(void 0, E,_chunkLAVQWQP2cjs.a),{id:p,labelId:m,helperTextId:u,validationTextId:o}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:D,prefix:"input"}),f=!l&&!n&&t!==void 0&&d!==void 0,B=_chunkDSW76HKTcjs.a.call(void 0, V,r?u:void 0,f?o:void 0),U=_react2.default.useRef(null),i=L||U;return _react2.default.createElement(_chunkLVPYDLKGcjs.a,{className:_clsx2.default.call(void 0, j,N),direction:"column",gap:"75","data-validation-status":t||void 0,"data-disabled":n?"":void 0,onPointerDown:C=>{if(!C.target.closest("input, button, a")&&i&&typeof i=="object"&&i.current){let M=i.current;requestAnimationFrame(()=>{M.focus()})}}},_react2.default.createElement(_chunkLVPYDLKGcjs.a,{direction:"column","data-visually-hidden":H?"":void 0},_react2.default.createElement(_chunkGFWH3VRNcjs.a,{htmlFor:p,id:m,disableUserSelect:!0,fontWeight:"semibold"},F,s?null:_react2.default.createElement(_chunk7TQMVZ2Rcjs.a,{as:"span",marginLeft:"50"},"(optional)")),r?_react2.default.createElement(_chunkK5BEIZDAcjs.a,{id:u,disableUserSelect:!0},r):null),_react2.default.createElement("div",{className:"hearth-TextInputRoot"},_react2.default.createElement("input",{ref:i,spellCheck:"false",id:p,required:s,disabled:n,readOnly:l,placeholder:n?void 0:S,"aria-labelledby":m,"aria-describedby":B,"aria-invalid":t==="invalid"?!0:void 0,"aria-errormessage":t==="invalid"?o:void 0,...q}),w),f?_react2.default.createElement(_chunkTIOWEGWWcjs.a,{status:t,disableUserSelect:!0,id:o},d):null)});k.displayName=P;exports.a = k;
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-JDRGWJC4.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-JDRGWJC4.cjs","../src/components/TextInput/TextInput.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","TextInput","React","props","forwardedRef","className","validationStatus","validationText","label","helperText","children","providedId","disabled","readOnly","hideLabel","required","placeholder","ariaDescribedby","textInputProps","extractProps","marginPropDefs","id","labelId","helperTextId","validationTextId","useIds","showValidationText","ariaDescribedbyValue","mergeIds","defaultRef","inputRef","Flex","clsx","event","input","Label","BodyText","HelperText","ValidationText"],"mappings":"AAAA,iOAAwC,wDAAyC,wDAAyC,wDAAoC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wECInY,4EACC,IAUZA,CAAAA,CAAgB,WAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAYC,eAAAA,CAAM,UAAA,CAC7B,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAiB,CACvB,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,kBAAA,CAAoBC,CAAAA,CACpB,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAahB,CAAOiB,mBAAc,CAAA,CAChC,CAAE,EAAA,CAAAC,CAAAA,CAAI,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AAA,CAAiB,CAAA,CAAA,CAAC,EAAA,CAAIkB,CAAAA,CAAAA,CAC7DjB,CACH,CAAA,CACE,IACN,CAEJ,CACF,CAAA,CAEAN,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-JDRGWJC4.cjs","sourcesContent":[null,"import type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { TextInputProps } from './TextInput.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport clsx from 'clsx';\nimport React from 'react';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useIds } from '../../hooks/use-ids';\nimport { ValidationText } from '../ValidationText/ValidationText';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { BodyText } from '../BodyText/BodyText';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'TextInput';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype TextInputElement = ElementRef<'input'>;\n\nexport const TextInput = React.forwardRef<TextInputElement, TextInputProps>(\n (props, forwardedRef) => {\n const {\n className,\n validationStatus,\n validationText,\n label,\n helperText,\n children,\n id: providedId,\n disabled,\n readOnly,\n hideLabel,\n required,\n placeholder,\n 'aria-describedby': ariaDescribedby,\n ...textInputProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'input',\n });\n\n const showValidationText = Boolean(\n !readOnly && !disabled && validationStatus !== undefined && validationText !== undefined\n );\n const ariaDescribedbyValue = mergeIds(\n ariaDescribedby,\n !!helperText ? helperTextId : undefined,\n showValidationText ? validationTextId : undefined\n );\n\n const defaultRef = React.useRef<HTMLInputElement>(null);\n const inputRef = forwardedRef || defaultRef;\n return (\n <Flex\n className={clsx(componentClassName, className)}\n direction=\"column\"\n gap=\"75\"\n data-validation-status={validationStatus ? validationStatus : undefined}\n data-disabled={disabled ? '' : undefined}\n onPointerDown={event => {\n // avoid losing focus when users click on non-interactive slot elements, such as icons\n const target = event.target as HTMLElement;\n if (target.closest('input, button, a')) return;\n\n if (inputRef && typeof inputRef === 'object' && inputRef.current) {\n const input = inputRef.current;\n requestAnimationFrame(() => {\n input.focus();\n });\n }\n }}\n >\n <Flex direction=\"column\" data-visually-hidden={hideLabel ? '' : undefined}>\n <Label htmlFor={id} id={labelId} disableUserSelect fontWeight=\"semibold\">\n {label}\n {required ? null : (\n <BodyText as=\"span\" marginLeft=\"50\">\n (optional)\n </BodyText>\n )}\n </Label>\n {helperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n <div className=\"hearth-TextInputRoot\">\n <input\n ref={inputRef}\n spellCheck=\"false\"\n id={id}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n placeholder={!disabled ? placeholder : undefined}\n aria-labelledby={labelId}\n aria-describedby={ariaDescribedbyValue}\n aria-invalid={validationStatus === 'invalid' ? true : undefined}\n aria-errormessage={validationStatus === 'invalid' ? validationTextId : undefined}\n {...textInputProps}\n />\n {children}\n </div>\n {showValidationText ? (\n <ValidationText status={validationStatus} disableUserSelect id={validationTextId}>\n {validationText}\n </ValidationText>\n ) : null}\n </Flex>\n );\n }\n);\n\nTextInput.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as T}from"./chunk-PJXMEG7B.js";import{a as B}from"./chunk-JPYVWTDN.js";import{b as v}from"./chunk-5OLLJKEO.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-JLHY5GT7.js.map
|
|
@@ -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 _chunk24SSG67Rcjs = require('./chunk-24SSG67R.cjs');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 _chunk24SSG67Rcjs = require('./chunk-24SSG67R.cjs');var _chunkJDRGWJC4cjs = require('./chunk-JDRGWJC4.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-JTVPVO3R.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-JTVPVO3R.cjs","../src/components/PasswordInput/PasswordInput.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","PasswordInput","React","className","disabled","props","forwardedRef","defaultRef","inputRef","visible","setVisible","showVisibilityMessage","setShowVisibilityMessage","handleVisibility","newVisibilityState","newVisibilityMessageState","currentElement","handleSubmit","visibilityMessage","TextInput","clsx","TextInputSlot","UnstyledIconButton","EyeSmallIcon","EyeOffSmallIcon"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAyC,wDAAyC,wECElJ,4EACC,wEAK4B,IAExCA,CAAAA,CAAgB,eAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAgBC,eAAAA,CAAM,UAAA,CACjC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAAA,CAAU,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAAiB,CACnD,IAAMC,CAAAA,CAAaL,eAAAA,CAAM,MAAA,CAAgC,IAAI,CAAA,CACvDM,CAAAA,CAAWF,CAAAA,EAAgBC,CAAAA,CAC3B,CAACE,CAAAA,CAASC,CAAU,CAAA,CAAIR,eAAAA,CAAM,QAAA,CAAS,CAAA,CAAK,CAAA,CAC5C,CAACS,CAAAA,CAAuBC,CAAwB,CAAA,C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,CAACD,CAAqB,CAAC,CAAA,CAGxBT,eAAAA,CAAA,aAAA,CAAAA,eAAAA,CAAA,QAAA,CAAA,IAAA,CACEA,eAAAA,CAAA,aAAA,CAACiB,mBAAAA,CAAA,CACC,GAAA,CAAKX,CAAAA,CACL,SAAA,CAAWY,4BAAAA,CAAKrB,CAAoBI,CAAS,CAAA,CAC7C,IAAA,CAAMM,CAAAA,CAAU,MAAA,CAAS,UAAA,CACzB,QAAA,CAAUL,CAAAA,CACT,GAAGC,CAAAA,CAAAA,CAEJH,eAAAA,CAAA,aAAA,CAACmB,mBAAAA,CAAA,CAAc,SAAA,CAAU,QAAA,CAAA,CACvBnB,eAAAA,CAAA,aAAA,CAACoB,mBAAAA,CAAA,CACC,IAAA,CAAK,QAAA,CACL,KAAA,CAAM,4BAAA,CACN,OAAA,CAAST,CAAAA,CACT,QAAA,CAAUT,CAAAA,CACV,cAAA,CAAcK,CAAAA,CAAAA,CAEbA,CAAAA,CAAUP,eAAAA,CAAA,aAAA,CAACqB,8BAAAA,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-JTVPVO3R.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
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-C2M7FEJX.js";import{a as x}from"./chunk-JPYVWTDN.js";import{c as C}from"./chunk-5OLLJKEO.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-KRLNL2VW.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as n}from"./chunk-C2M7FEJX.js";import{a as p}from"./chunk-JPYVWTDN.js";import{c as f}from"./chunk-5OLLJKEO.js";import{a as l}from"./chunk-432A6CLH.js";import{a as c}from"./chunk-QC4ZMGCU.js";import{b as s}from"./chunk-4PEMW3UE.js";import*as e from"react";import E from"clsx";import{RadioGroup as R}from"radix-ui";var b="Radio",F=s(b),H=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}=c({providedId:u,prefix:"radio"}),{hasGroupHelperText:G,"aria-describedby":v}=f(),m=!G&&r!==void 0,w=!!o;return e.createElement("div",{className:E(F,x)},e.createElement("div",{className:"hearth-RadioContainer"},e.createElement(R.Item,{ref:N,...I,id:i,"aria-describedby":m?d:v,"aria-labelledby":a||(o?t:void 0),className:"hearth-RadioItem"},e.createElement(R.Indicator,{className:"hearth-RadioIndicator"}))),w?e.createElement(l,{direction:"column",gap:"50"},e.createElement(n,{id:t,htmlFor:i,disableUserSelect:!0,fontWeight:y},h,o),m?e.createElement(p,{id:d,disableUserSelect:!0},r):null):null)});H.displayName=b;export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LSSHFMRD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Radio/Radio.tsx"],"sourcesContent":["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
|
|
1
|
+
{"version":3,"sources":["../src/components/Radio/Radio.tsx"],"sourcesContent":["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"],"mappings":"gPAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAU,OAIjB,OAAS,cAAcC,MAAuB,WAS9C,IAAMC,EAAgB,QAChBC,EAAqBC,EAAiBF,CAAa,EAgB5CG,EAAc,aACzB,CACE,CACE,GAAIC,EACJ,MAAAC,EACA,WAAAC,EACA,MAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,kBAAmBC,EACnB,GAAGC,CACL,EACAC,IACG,CACH,GAAM,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAZ,EAAY,OAAQ,OAAQ,CAAC,EACtE,CAAE,mBAAAa,EAAoB,mBAAoBC,CAAgB,EAAIC,EAAiB,EAC/EC,EAAyB,CAACH,GAAsBX,IAAe,OAC/De,EAAY,CAAC,CAAChB,EACpB,OACE,gBAAC,OAAI,UAAWiB,EAAKrB,EAAoBO,CAAS,GAChD,gBAAC,OAAI,UAAU,yBACb,gBAACe,EAAgB,KAAhB,CACC,IAAKX,EACJ,GAAGD,EACJ,GAAIE,EACJ,mBAAkBO,EAAiBL,EAAeG,EAClD,kBAAiBR,IAAkCL,EAAQS,EAAU,QACrE,UAAU,oBAEV,gBAACS,EAAgB,UAAhB,CAA0B,UAAU,wBAAwB,CAC/D,CACF,EACCF,EACC,gBAACG,EAAA,CAAK,UAAU,SAAS,IAAI,MAC3B,gBAACC,EAAA,CAAM,GAAIX,EAAS,QAASD,EAAI,kBAAiB,GAAC,WAAYJ,GAC5DF,EACAF,CACH,EACCe,EACC,gBAACM,EAAA,CAAW,GAAIX,EAAc,kBAAiB,IAC5CT,CACH,EACE,IACN,EACE,IACN,CAEJ,CACF,EAEAH,EAAM,YAAcH","names":["React","clsx","RadixRadioGroup","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"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-PUVKWSFV.js";import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-PUVKWSFV.js";import{a as c}from"./chunk-TQIXFWV6.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-M7JJH7UU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.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 a = _interopRequireWildcard(_react);var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _radixui = require('radix-ui');var n="RadioCard",u=_chunk4H5JT5ORcjs.b.call(void 0, n),x= exports.a =a.forwardRef((c,R)=>{let{className:f,children:b,id:h,label:e,"aria-labelledby":o,image:C,...N}=_chunk5DRU6TDWcjs.a.call(void 0, c,_chunkLAVQWQP2cjs.a),{id:r,labelId:i}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:h,prefix:"radio"});return a.createElement(_radixui.RadioGroup.Item,{ref:R,className:_clsx2.default.call(void 0, u,f),...N,id:r,"aria-labelledby":o||(e?i:void 0)},a.createElement("div",{className:"hearth-RadioContainer"},a.createElement("div",{className:"hearth-RadioItem"},a.createElement(_radixui.RadioGroup.Indicator,{className:"hearth-RadioIndicator"})),a.createElement(_chunkGFWH3VRNcjs.a,{id:i,htmlFor:r,disableUserSelect:!0,fontWeight:"semibold",className:"hearth-RadioLabel"},C,e)),b)});x.displayName=n;exports.a = x;
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-MGVROLEY.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-MGVROLEY.cjs","../src/components/RadioCard/RadioCard.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","RadioCard","props","ref","className","children","providedId","label","ariaLabelledby","image","radioCardProps","extractProps","marginPropDefs","id","labelId","useIds","RadixRadioGroup","clsx","Label"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECArL,wEACN,mCAQ6B,IAExCA,CAAAA,CAAgB,WAAA,CAChBC,CAAAA,CAAqBC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ACAF,CACH,CACF,CAAA,CACCF,CACH,CAEJ,CAAC,CAAA,CAEDJ,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-MGVROLEY.cjs","sourcesContent":[null,"import * as React from 'react';\nimport clsx from 'clsx';\nimport type { ElementRef } from 'react';\nimport type { RadioCardProps } from './RadioCard.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { useIds } from '../../hooks/use-ids';\nimport { Label } from '../Label/Label';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\n\nconst componentName = 'RadioCard';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioCardElement = ElementRef<'button'>;\n\nexport const RadioCard = React.forwardRef<RadioCardElement, RadioCardProps>((props, ref) => {\n const {\n className,\n children,\n id: providedId,\n label,\n 'aria-labelledby': ariaLabelledby,\n image,\n ...radioCardProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId } = useIds({ providedId, prefix: 'radio' });\n return (\n <RadixRadioGroup.Item\n ref={ref}\n className={clsx(componentClassName, className)}\n {...radioCardProps}\n id={id}\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 <Label\n id={labelId}\n htmlFor={id}\n disableUserSelect\n fontWeight=\"semibold\"\n className=\"hearth-RadioLabel\"\n >\n {image}\n {label}\n </Label>\n </div>\n {children}\n </RadixRadioGroup.Item>\n );\n});\n\nRadioCard.displayName = componentName;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkGFWH3VRNcjs = require('./chunk-GFWH3VRN.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkHSPOCJ5Acjs = require('./chunk-HSPOCJ5A.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-
|
|
2
|
+
//# sourceMappingURL=chunk-MMH5KK7U.cjs.map
|