@utilitywarehouse/hearth-react 0.6.3 → 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-36ODTS5I.cjs +2 -0
- package/dist/{chunk-5AWM4ERT.cjs.map → chunk-36ODTS5I.cjs.map} +1 -1
- package/dist/chunk-3H4IVELC.js +2 -0
- package/dist/chunk-3H4IVELC.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-3Z52FZHQ.cjs → chunk-3SAPF75E.cjs} +1 -1
- package/dist/{chunk-3Z52FZHQ.cjs.map → chunk-3SAPF75E.cjs.map} +1 -1
- package/dist/{chunk-PFQOYDXS.js → chunk-44M3HSOB.js} +2 -2
- package/dist/{chunk-HWRNOXB7.cjs → chunk-5VAJ2RVV.cjs} +2 -2
- package/dist/chunk-5VAJ2RVV.cjs.map +1 -0
- 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-767BW3FR.cjs +2 -0
- package/dist/{chunk-YNORYVOI.cjs.map → chunk-767BW3FR.cjs.map} +1 -1
- package/dist/chunk-AADLVX32.cjs +2 -0
- package/dist/chunk-AADLVX32.cjs.map +1 -0
- package/dist/chunk-AANBZTA3.js +2 -0
- package/dist/chunk-AANBZTA3.js.map +1 -0
- package/dist/{chunk-PWOQMLDP.cjs → chunk-ASOT2I4D.cjs} +2 -2
- package/dist/{chunk-PWOQMLDP.cjs.map → chunk-ASOT2I4D.cjs.map} +1 -1
- package/dist/chunk-B3LRMWN3.js +2 -0
- package/dist/chunk-B3LRMWN3.js.map +1 -0
- package/dist/{chunk-CZ4ZQOCW.cjs → chunk-F2ES3FZC.cjs} +2 -2
- package/dist/chunk-F2ES3FZC.cjs.map +1 -0
- 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-XQABL7CF.cjs → chunk-FMPQYBX6.cjs} +2 -2
- package/dist/{chunk-XQABL7CF.cjs.map → chunk-FMPQYBX6.cjs.map} +1 -1
- package/dist/{chunk-RZBDN63O.js → chunk-GHI2ZILJ.js} +2 -2
- package/dist/{chunk-SEYBIGHK.js → chunk-HCP77JZ2.js} +2 -2
- package/dist/{chunk-EZNMHH6L.js → chunk-HPVG54NM.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-IQVUWGJM.js +2 -0
- package/dist/chunk-IQVUWGJM.js.map +1 -0
- package/dist/{chunk-FHBLIK6L.cjs → chunk-JDRGWJC4.cjs} +1 -1
- package/dist/{chunk-FHBLIK6L.cjs.map → chunk-JDRGWJC4.cjs.map} +1 -1
- package/dist/{chunk-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-KRLNL2VW.js +2 -0
- package/dist/chunk-KRLNL2VW.js.map +1 -0
- package/dist/{chunk-BVGQ6X5L.cjs → chunk-L5TSA74S.cjs} +2 -2
- package/dist/{chunk-BVGQ6X5L.cjs.map → chunk-L5TSA74S.cjs.map} +1 -1
- package/dist/chunk-LSSHFMRD.js +2 -0
- package/dist/chunk-LSSHFMRD.js.map +1 -0
- package/dist/{chunk-2GYFUPYX.js → chunk-M7JJH7UU.js} +2 -2
- package/dist/{chunk-PH3THV4W.cjs → chunk-MGVROLEY.cjs} +2 -2
- package/dist/chunk-MGVROLEY.cjs.map +1 -0
- package/dist/{chunk-5QZW2CVP.cjs → chunk-MMH5KK7U.cjs} +2 -2
- package/dist/chunk-MMH5KK7U.cjs.map +1 -0
- package/dist/chunk-MYVMGI3E.cjs +2 -0
- package/dist/chunk-MYVMGI3E.cjs.map +1 -0
- package/dist/chunk-ODYEBO3I.js +2 -0
- package/dist/chunk-ODYEBO3I.js.map +1 -0
- 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-UI5CTQSR.js → chunk-OOPBPESB.js} +1 -1
- package/dist/{chunk-UI5CTQSR.js.map → chunk-OOPBPESB.js.map} +1 -1
- package/dist/{chunk-XZ2XMTZO.cjs → chunk-PGOZUBLD.cjs} +2 -2
- package/dist/{chunk-XZ2XMTZO.cjs.map → chunk-PGOZUBLD.cjs.map} +1 -1
- package/dist/chunk-PPOYG7AT.js +2 -0
- package/dist/chunk-PPOYG7AT.js.map +1 -0
- package/dist/chunk-QG2PPXGR.js +2 -0
- package/dist/chunk-QG2PPXGR.js.map +1 -0
- package/dist/{chunk-EUCZQAPW.js → chunk-QU6MOXKC.js} +2 -2
- package/dist/{chunk-TIT5OSKO.cjs → chunk-RL3MTR6O.cjs} +2 -2
- package/dist/{chunk-TIT5OSKO.cjs.map → chunk-RL3MTR6O.cjs.map} +1 -1
- package/dist/{chunk-3EQZ2BD2.js → chunk-T7E5IU2T.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-W2RI5BYP.cjs +2 -0
- package/dist/chunk-W2RI5BYP.cjs.map +1 -0
- package/dist/chunk-WTFBLJ7Z.js +2 -0
- package/dist/chunk-WTFBLJ7Z.js.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-PRACO7UD.cjs → chunk-XHTH6CYB.cjs} +2 -2
- package/dist/chunk-XHTH6CYB.cjs.map +1 -0
- package/dist/{chunk-LSUQTVRS.cjs → chunk-XWYIDHCQ.cjs} +2 -2
- package/dist/{chunk-LSUQTVRS.cjs.map → chunk-XWYIDHCQ.cjs.map} +1 -1
- package/dist/chunk-YGKRSQ7L.js +2 -0
- package/dist/{chunk-6FV37POV.js.map → chunk-YGKRSQ7L.js.map} +1 -1
- package/dist/{chunk-UA7DGD3T.js → chunk-YZ26DXQZ.js} +2 -2
- package/dist/chunk-ZAYXQ36V.js +2 -0
- package/dist/chunk-ZAYXQ36V.js.map +1 -0
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/Alert.props.d.cts +2 -2
- package/dist/components/Alert/Alert.props.d.ts +2 -2
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.d.cts +1 -0
- package/dist/components/Badge/Badge.d.ts +1 -0
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Badge/Badge.props.cjs +1 -1
- package/dist/components/Badge/Badge.props.d.cts +18 -5
- package/dist/components/Badge/Badge.props.d.ts +18 -5
- package/dist/components/Badge/Badge.props.js +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/ButtonBase/ButtonBase.cjs +1 -1
- package/dist/components/ButtonBase/ButtonBase.js +1 -1
- package/dist/components/ButtonBase/ButtonBase.props.cjs +1 -1
- package/dist/components/ButtonBase/ButtonBase.props.d.cts +3 -3
- package/dist/components/ButtonBase/ButtonBase.props.d.ts +3 -3
- package/dist/components/ButtonBase/ButtonBase.props.js +1 -1
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Card/Card.props.cjs +1 -1
- package/dist/components/Card/Card.props.d.cts +1 -1
- package/dist/components/Card/Card.props.d.ts +1 -1
- package/dist/components/Card/Card.props.js +1 -1
- package/dist/components/Card/CardAction.cjs +1 -1
- package/dist/components/Card/CardAction.js +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/Checkbox.props.d.cts +2 -0
- package/dist/components/Checkbox/Checkbox.props.d.ts +2 -0
- 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/DetailText/DetailText.cjs +1 -1
- package/dist/components/DetailText/DetailText.js +1 -1
- package/dist/components/DetailText/DetailText.props.cjs +1 -1
- package/dist/components/DetailText/DetailText.props.js +1 -1
- package/dist/components/FormGroupBase/FormGroupBase.cjs +1 -1
- package/dist/components/FormGroupBase/FormGroupBase.js +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.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 +3 -14
- package/dist/components/List/List.props.d.ts +3 -14
- 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/Radio/Radio.props.d.cts +2 -0
- package/dist/components/Radio/Radio.props.d.ts +2 -0
- 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 +2 -2
- package/dist/chunk-2HATIMMN.cjs +0 -2
- package/dist/chunk-2HATIMMN.cjs.map +0 -1
- package/dist/chunk-4L7UQYRQ.js +0 -2
- package/dist/chunk-4L7UQYRQ.js.map +0 -1
- package/dist/chunk-5AWM4ERT.cjs +0 -2
- package/dist/chunk-5QZW2CVP.cjs.map +0 -1
- package/dist/chunk-6FV37POV.js +0 -2
- package/dist/chunk-AQ322MFR.js +0 -2
- package/dist/chunk-AQ322MFR.js.map +0 -1
- package/dist/chunk-BJTA5F56.js +0 -2
- package/dist/chunk-BJTA5F56.js.map +0 -1
- package/dist/chunk-BX5DJRCU.cjs +0 -2
- package/dist/chunk-BX5DJRCU.cjs.map +0 -1
- package/dist/chunk-CZ4ZQOCW.cjs.map +0 -1
- package/dist/chunk-FU75MK27.cjs +0 -2
- package/dist/chunk-FU75MK27.cjs.map +0 -1
- package/dist/chunk-GOKA6XUX.js +0 -2
- package/dist/chunk-GOKA6XUX.js.map +0 -1
- package/dist/chunk-GOKFUDH4.js +0 -2
- package/dist/chunk-GOKFUDH4.js.map +0 -1
- package/dist/chunk-HLGSJ7VZ.js +0 -2
- package/dist/chunk-HLGSJ7VZ.js.map +0 -1
- package/dist/chunk-HWRNOXB7.cjs.map +0 -1
- package/dist/chunk-JM4RYNG3.js +0 -2
- package/dist/chunk-JM4RYNG3.js.map +0 -1
- package/dist/chunk-KX5PFWQG.js +0 -2
- package/dist/chunk-KX5PFWQG.js.map +0 -1
- package/dist/chunk-LMVWLJME.cjs +0 -2
- package/dist/chunk-LMVWLJME.cjs.map +0 -1
- package/dist/chunk-LX55FQR5.js +0 -2
- package/dist/chunk-LX55FQR5.js.map +0 -1
- package/dist/chunk-MVVYXPVV.js +0 -2
- package/dist/chunk-MVVYXPVV.js.map +0 -1
- package/dist/chunk-N6WTU5IQ.cjs +0 -2
- package/dist/chunk-N6WTU5IQ.cjs.map +0 -1
- package/dist/chunk-NO2QV3A4.js +0 -2
- package/dist/chunk-NO2QV3A4.js.map +0 -1
- package/dist/chunk-PH3THV4W.cjs.map +0 -1
- package/dist/chunk-PRACO7UD.cjs.map +0 -1
- package/dist/chunk-RA6OQJHG.js +0 -2
- package/dist/chunk-RA6OQJHG.js.map +0 -1
- package/dist/chunk-TBOBX6LG.cjs +0 -2
- package/dist/chunk-TBOBX6LG.cjs.map +0 -1
- package/dist/chunk-TKOS3BOP.js +0 -2
- package/dist/chunk-TKOS3BOP.js.map +0 -1
- package/dist/chunk-YNORYVOI.cjs +0 -2
- package/dist/chunk-ZZCBHLRO.js +0 -2
- package/dist/chunk-ZZCBHLRO.js.map +0 -1
- /package/dist/{chunk-PFQOYDXS.js.map → chunk-44M3HSOB.js.map} +0 -0
- /package/dist/{chunk-RZBDN63O.js.map → chunk-GHI2ZILJ.js.map} +0 -0
- /package/dist/{chunk-SEYBIGHK.js.map → chunk-HCP77JZ2.js.map} +0 -0
- /package/dist/{chunk-EZNMHH6L.js.map → chunk-HPVG54NM.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-2GYFUPYX.js.map → chunk-M7JJH7UU.js.map} +0 -0
- /package/dist/{chunk-EUCZQAPW.js.map → chunk-QU6MOXKC.js.map} +0 -0
- /package/dist/{chunk-3EQZ2BD2.js.map → chunk-T7E5IU2T.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
package/dist/chunk-2HATIMMN.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SectionHeader/SectionHeader.props.ts"],"names":["sizes","sectionHeaderPropDefs"],"mappings":"AASA,6EAAMA,CAAAA,CAAQ,CAAC,IAAA,CAAM,IAAA,CAAM,IAAA,CAAM,IAAI,CAAA,CAExBC,CAAAA,aAAwB,CACnC,IAAA,CAAM,CAAE,SAAA,CAAW,MAAA,CAAQ,MAAA,CAAQD,CAAAA,CAAO,UAAA,CAAY,CAAA,CAAA,CAAO,OAAA,CAAS,IAAK,CAC7E,CAAA,CAAA,cAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-2HATIMMN.cjs","sourcesContent":["import { ComponentType } from 'react';\nimport { MarginProps } from '../../props/margin.props';\nimport { PropDef } from '../../props/prop-def';\nimport { TextAlignProps } from '../../props/text-align.props';\nimport { TextTransformProps } from '../../props/text-transform.props';\nimport { TextWrapProps } from '../../props/text-wrap.props';\nimport type { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\nimport { LinkProps } from '../Link/Link.props';\n\nconst sizes = ['sm', 'md', 'lg', 'xl'] as const;\n\nexport const sectionHeaderPropDefs = {\n size: { className: 'size', tokens: sizes, responsive: false, default: 'md' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport interface SectionHeaderProps\n extends ComponentPropsWithout<'h2', RemovedProps>,\n TextAlignProps,\n TextTransformProps,\n TextWrapProps,\n MarginProps {\n /**\n * Actual string to display as section header\n */\n heading?: string;\n /**\n * @default h2\n */\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'div';\n /**\n * Set the text size styles.\n * @default md\n */\n size?: (typeof sizes)[number];\n /**\n * Optional helper text to provide additional context or instructions.\n */\n helperText?: string;\n /**\n * Optional configuration of link at the side.\n * Both linkText and linkHref need to be present for the link to appear.\n */\n linkText?: string;\n linkHref?: LinkProps['href'];\n /**\n * @default Chevron\n */\n linkIcon?: ComponentType;\n linkIconPosition?: 'left' | 'right';\n /**\n * @default true\n */\n linkShowIcon?: boolean;\n /**\n * @default _self\n */\n linkTarget?: React.HTMLAttributeAnchorTarget | undefined;\n}\n"]}
|
package/dist/chunk-4L7UQYRQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunk-BJTA5F56.js";import{a as f}from"./chunk-XQ5A24NX.js";import{a as p}from"./chunk-RTGGS5XX.js";import{b as c}from"./chunk-4PEMW3UE.js";import*as e from"react";import{Slot as w}from"radix-ui";import h from"clsx";var b="ButtonBase",B=c(b),R=e.forwardRef((a,n)=>{let{colorScheme:C,inverted:N,className:s,disabled:t,onClick:r,asChild:P,children:i,...m}=p(a,u,f),{variant:o="solid"}=a,d={"data-colorscheme":C||(o==="emphasis"||o==="solid"?"yellow":"grey"),"data-inverted":N?"":void 0},l=P?w.Root:"button";return o==="emphasis"?e.createElement(l,{ref:n,"aria-disabled":t||void 0,className:h(B,s),onClick:t?void 0:r,...d,...m},e.createElement("span",{className:"hearth-shadow"}),e.createElement("span",{className:"hearth-front"},i)):e.createElement(l,{ref:n,"aria-disabled":t||void 0,className:h(B,s),onClick:t?void 0:r,...d,...m},i)});R.displayName=b;export{R as a};
|
|
2
|
-
//# sourceMappingURL=chunk-4L7UQYRQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ButtonBase/ButtonBase.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport clsx from 'clsx';\nimport { buttonBasePropDefs, ButtonBaseProps } from './ButtonBase.props';\nimport type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'ButtonBase';\nconst componentClassName = withGlobalPrefix(componentName);\n\nexport type ButtonBaseElement = ElementRef<'button'>;\n\nexport const ButtonBase = React.forwardRef<ButtonBaseElement, ButtonBaseProps>((props, ref) => {\n const {\n colorScheme,\n inverted,\n className,\n disabled,\n onClick,\n asChild,\n children,\n ...buttonBaseProps\n } = extractProps(props, buttonBasePropDefs, marginPropDefs);\n const { variant = 'solid' } = props;\n\n const defaultColorScheme = variant === 'emphasis' || variant === 'solid' ? 'yellow' : 'grey';\n const dataAttributeProps = {\n 'data-colorscheme': colorScheme || defaultColorScheme,\n 'data-inverted': inverted ? '' : undefined,\n };\n\n const Component = asChild ? Slot.Root : 'button';\n\n // We're rendering a different component here so that we don't have to apply\n // transitions to box-shadow, which causes re-paints on every frame, heavily\n // impacting performance.\n if (variant === 'emphasis') {\n return (\n <Component\n ref={ref}\n aria-disabled={disabled || undefined}\n className={clsx(componentClassName, className)}\n // as we're using aria-disabled instead of disabled then we need to\n // disable the onClick event\n onClick={disabled ? undefined : onClick}\n {...dataAttributeProps}\n {...buttonBaseProps}\n >\n <span className=\"hearth-shadow\"></span>\n <span className=\"hearth-front\">{children}</span>\n </Component>\n );\n }\n return (\n <Component\n ref={ref}\n aria-disabled={disabled || undefined}\n className={clsx(componentClassName, className)}\n onClick={disabled ? undefined : onClick}\n {...dataAttributeProps}\n {...buttonBaseProps}\n >\n {children}\n </Component>\n );\n});\n\nButtonBase.displayName = componentName;\n"],"mappings":"gKAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,WACrB,OAAOC,MAAU,OAOjB,IAAMC,EAAgB,aAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAmB,aAA+C,CAACC,EAAOC,IAAQ,CAC7F,GAAM,CACJ,YAAAC,EACA,SAAAC,EACA,UAAAC,EACA,SAAAC,EACA,QAAAC,EACA,QAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAAIC,EAAaV,EAAOW,EAAoBC,CAAc,EACpD,CAAE,QAAAC,EAAU,OAAQ,EAAIb,EAGxBc,EAAqB,CACzB,mBAAoBZ,IAFKW,IAAY,YAAcA,IAAY,QAAU,SAAW,QAGpF,gBAAiBV,EAAW,GAAK,MACnC,EAEMY,EAAYR,EAAUS,EAAK,KAAO,SAKxC,OAAIH,IAAY,WAEZ,gBAACE,EAAA,CACC,IAAKd,EACL,gBAAeI,GAAY,OAC3B,UAAWY,EAAKpB,EAAoBO,CAAS,EAG7C,QAASC,EAAW,OAAYC,EAC/B,GAAGQ,EACH,GAAGL,GAEJ,gBAAC,QAAK,UAAU,gBAAgB,EAChC,gBAAC,QAAK,UAAU,gBAAgBD,CAAS,CAC3C,EAIF,gBAACO,EAAA,CACC,IAAKd,EACL,gBAAeI,GAAY,OAC3B,UAAWY,EAAKpB,EAAoBO,CAAS,EAC7C,QAASC,EAAW,OAAYC,EAC/B,GAAGQ,EACH,GAAGL,GAEHD,CACH,CAEJ,CAAC,EAEDT,EAAW,YAAcH","names":["React","Slot","clsx","componentName","componentClassName","withGlobalPrefix","ButtonBase","props","ref","colorScheme","inverted","className","disabled","onClick","asChild","children","buttonBaseProps","extractProps","buttonBasePropDefs","marginPropDefs","variant","dataAttributeProps","Component","Slot","clsx"]}
|
package/dist/chunk-5AWM4ERT.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-5QZW2CVP.cjs","../src/components/CheckboxTile/CheckboxTile.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","CheckboxTile","className","providedId","disabled","value","onCheckedChange","label","helperText","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","context","useFormGroupBase","checkboxContext","useCheckboxGroup","checked","hasGroupHelperText","ariaDescribedby","showHelperText","showLabel","clsx","RadixCheckbox","TickSmallIcon","Flex","Label","HelperText"],"mappings":"AAAA,u/BAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECAvQ,wEAEN,wEAMa,mCAIY,IAIpCA,CAAAA,CAAgB,cAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAqB,CAAA,CAAA,UAAA,CAChC,CACE,CACE,SAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,IAAA,CACR,eAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,iBAAA,CAAmBC,CAAAA,CACnB,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,GAAM,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAZ,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CACtEa,CAAAA,CAAUC,iCAAAA,CAAiB,CAC3BC,CAAAA,CAAkBC,iCAAAA,CAAiB,CACnCC,CAAAA,iBAAUF,CAAAA,2BAAiB,KAAA,6BAAO,QAAA,mBAASb,CAAK,GAAA,CAChDgB,CAAAA,iBAAqBL,CAAAA,6BAAS,oBAAA,CAC9BM,CAAAA,CAAkBN,CAAAA,CAAUA,CAAAA,CAAQ,kBAAkB,CAAA,CAAI,EAAA,CAC1DO,CAAAA,CAAiB,CAACF,CAAAA,EAAsB,CAAC,CAACb,CAAAA,CAC1CgB,CAAAA,CAAY,CAAC,CAACjB,CAAAA,CACpB,OACE,CAAA,CAAA,aAAA,CAAC,OAAA,CAAA,CACC,SAAA,CAAWkB,4BAAAA,CAAK1B,CAAoBG,CAAS,CAAA,CAC7C,eAAA,CAAeE,CAAAA,CAAW,EAAA,CAAK,KAAA,CAAA,CAAA,CAE/B,CAAA,CAAA,aAAA,CAACsB,iBAAAA,CAAc,IAAA,CAAd,CACC,GAAA,CAAKf,CAAAA,CACL,SAAA,CAAU,qBAAA,CACV,IAAA,iBAAMO,CAAAA,6BAAiB,MAAA,CACvB,OAAA,CAASE,CAAAA,CACT,KAAA,CAAOf,CAAAA,CACN,GAAGK,CAAAA,CACJ,EAAA,CAAIE,CAAAA,CACJ,QAAA,CAAUR,CAAAA,CACV,kBAAA,CAAkBmB,CAAAA,CAAiBT,CAAAA,CAAeQ,CAAAA,CAClD,iBAAA,CAAiBb,CAAAA,EAAkBe,CAAAA,CAAYX,CAAAA,CAAU,KAAA,CAAA,CACzD,eAAA,CAAkBO,CAAAA,EAAqB,CACjCJ,CAAAA,EAAAA,CACEI,CAAAA,iBACFF,CAAAA,6BAAiB,WAAA,mBAAYb,CAAK,GAAA,iBAElCa,CAAAA,6BAAiB,aAAA,mBAAcb,CAAK,GAAA,CAAA,CAGpCC,CAAAA,EACFA,CAAAA,CAAgBc,CAAO,CAE3B,CAAA,CAAA,CAEA,CAAA,CAAA,aAAA,CAACM,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,CACA,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAA,CACd,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CAAM,EAAA,CAAIhB,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC/CL,CACH,CAAA,CACCgB,CAAAA,CACC,CAAA,CAAA,aAAA,CAACO,mBAAAA,CAAA,CAAW,EAAA,CAAIhB,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CN,CACH,CAAA,CACE,IACN,CACF,CAEJ,CACF,CAAA,CAEAP,CAAAA,CAAa,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-5QZW2CVP.cjs","sourcesContent":[null,"import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { CheckboxTileProps } from './CheckboxTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { useIds } from '../../hooks/use-ids';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { Checkbox as RadixCheckbox } from 'radix-ui';\nimport { useCheckboxGroup } from '../CheckboxGroup/CheckboxGroup.context';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst componentName = 'CheckboxTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CheckboxTileElement = ElementRef<'button'>;\n\nexport const CheckboxTile = React.forwardRef<CheckboxTileElement, CheckboxTileProps>(\n (\n {\n className,\n id: providedId,\n disabled,\n value = 'on',\n onCheckedChange,\n label,\n helperText,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const context = useFormGroupBase();\n const checkboxContext = useCheckboxGroup();\n const checked = checkboxContext?.value?.includes(value);\n const hasGroupHelperText = context?.hasGroupHelperText;\n const ariaDescribedby = context ? context['aria-describedby'] : '';\n const showHelperText = !hasGroupHelperText && !!helperText;\n const showLabel = !!label;\n return (\n <label\n className={clsx(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n >\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...props}\n id={id}\n disabled={disabled}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby || showLabel ? labelId : undefined}\n onCheckedChange={(checked: boolean) => {\n if (context) {\n if (checked) {\n checkboxContext?.onItemCheck(value);\n } else {\n checkboxContext?.onItemUncheck(value);\n }\n }\n if (onCheckedChange) {\n onCheckedChange(checked);\n }\n }}\n >\n <RadixCheckbox.Indicator asChild className=\"hearth-CheckboxIndicator\">\n <TickSmallIcon />\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </label>\n );\n }\n);\n\nCheckboxTile.displayName = componentName;\n"]}
|
package/dist/chunk-6FV37POV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-RA6OQJHG.js";import{a as r}from"./chunk-AFZ3OJUA.js";import{a as t}from"./chunk-RTGGS5XX.js";import{b as o}from"./chunk-4PEMW3UE.js";import*as e from"react";import i from"clsx";var m="Badge",g=o(m),P=e.forwardRef((s,p)=>{let{className:n,colorScheme:c="blue",flatBase:f,...d}=t(s,a,r),l={"data-colorscheme":c,"data-bottom-radius-zero":f?"":void 0};return e.createElement("span",{ref:p,className:i(g,n),...l,...d})});P.displayName=m;export{P as a};
|
|
2
|
-
//# sourceMappingURL=chunk-6FV37POV.js.map
|
package/dist/chunk-AQ322MFR.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as R}from"./chunk-C2M7FEJX.js";import{a as u}from"./chunk-JPYVWTDN.js";import{c as y}from"./chunk-5OLLJKEO.js";import{c as I}from"./chunk-T64W7Q7K.js";import{a}from"./chunk-432A6CLH.js";import{a as k}from"./chunk-XQ5A24NX.js";import{a as C}from"./chunk-QC4ZMGCU.js";import{a as f}from"./chunk-RTGGS5XX.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 N="Checkbox",D=h(N),B=e.forwardRef((P,g)=>{let{id:F,label:c,helperText:l,className:G,disabled:i,onCheckedChange:s,value:o="on","aria-labelledby":H,...v}=f(P,k),{id:m,labelId:n,helperTextId:d}=C({providedId:F,prefix:"checkbox"}),r=y(),t=I(),w=t?.value?.includes(o),E=r?.hasGroupHelperText,L=r?r["aria-describedby"]:"",p=!E&&!!l,b=!!c;return e.createElement(a,{gap:"100",className:S(D,G),"data-disabled":i?"":void 0},e.createElement(T.Root,{ref:g,className:"hearth-CheckboxRoot",name:t?.name,checked:w,value:o,...v,id:m,disabled:i,"aria-describedby":p?d:L,"aria-labelledby":H||b?n:void 0,onCheckedChange:x=>{r&&(x?t?.onItemCheck(o):t?.onItemUncheck(o)),s&&s(x)}},e.createElement(T.Indicator,{asChild:!0,className:"hearth-CheckboxIndicator"},e.createElement(U,null))),b?e.createElement(a,{direction:"column",gap:"50"},e.createElement(R,{id:n,htmlFor:m,disableUserSelect:!0},c),p?e.createElement(u,{id:d,disableUserSelect:!0},l):null):null)});B.displayName=N;export{B as a};
|
|
2
|
-
//# sourceMappingURL=chunk-AQ322MFR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["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 ...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\n gap=\"100\"\n className={clsx(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n >\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...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>\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"],"mappings":"mWAAA,UAAYA,MAAW,QACvB,OAAOC,MAAU,OAMjB,OAAS,iBAAAC,MAAqB,uCAK9B,OAAS,YAAYC,MAAqB,WAI1C,IAAMC,EAAgB,WAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAiB,aAA2C,CAACC,EAAOC,IAAQ,CACvF,GAAM,CACJ,GAAIC,EACJ,MAAAC,EACA,WAAAC,EACA,UAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,MAAAC,EAAQ,KACR,kBAAmBC,EACnB,GAAGC,CACL,EAAIC,EAAaX,EAAOY,CAAc,EAChC,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAd,EAAY,OAAQ,UAAW,CAAC,EACzEe,EAAUC,EAAiB,EAC3BC,EAAkBC,EAAiB,EACnCC,EAAUF,GAAiB,OAAO,SAASX,CAAK,EAChDc,EAAqBL,GAAS,mBAC9BM,EAAkBN,EAAUA,EAAQ,kBAAkB,EAAI,GAC1DO,EAAiB,CAACF,GAAsB,CAAC,CAAClB,EAC1CqB,EAAY,CAAC,CAACtB,EAEpB,OACE,gBAACuB,EAAA,CACC,IAAI,MACJ,UAAWC,EAAK9B,EAAoBQ,CAAS,EAC7C,gBAAeC,EAAW,GAAK,QAE/B,gBAACsB,EAAc,KAAd,CACC,IAAK3B,EACL,UAAU,sBACV,KAAMkB,GAAiB,KACvB,QAASE,EACT,MAAOb,EACN,GAAGE,EACJ,GAAIG,EACJ,SAAUP,EACV,mBAAkBkB,EAAiBT,EAAeQ,EAClD,kBAAiBd,GAAkBgB,EAAYX,EAAU,OACzD,gBAAkBO,GAAqB,CACjCJ,IACEI,EACFF,GAAiB,YAAYX,CAAK,EAElCW,GAAiB,cAAcX,CAAK,GAGpCD,GACFA,EAAgBc,CAAO,CAE3B,GAEA,gBAACO,EAAc,UAAd,CAAwB,QAAO,GAAC,UAAU,4BACzC,gBAACC,EAAA,IAAc,CACjB,CACF,EACCJ,EACC,gBAACC,EAAA,CAAK,UAAU,SAAS,IAAI,MAC3B,gBAACI,EAAA,CAAM,GAAIhB,EAAS,QAASD,EAAI,kBAAiB,IAC/CV,CACH,EACCqB,EACC,gBAACO,EAAA,CAAW,GAAIhB,EAAc,kBAAiB,IAC5CX,CACH,EACE,IACN,EACE,IACN,CAEJ,CAAC,EAEDL,EAAS,YAAcH","names":["React","clsx","TickSmallIcon","RadixCheckbox","componentName","componentClassName","withGlobalPrefix","Checkbox","props","ref","providedId","label","helperText","className","disabled","onCheckedChange","value","ariaLabelledby","checkboxProps","extractProps","marginPropDefs","id","labelId","helperTextId","useIds","context","useFormGroupBase","checkboxContext","useCheckboxGroup","checked","hasGroupHelperText","ariaDescribedby","showHelperText","showLabel","Flex","clsx","RadixCheckbox","TickSmallIcon","Label","HelperText"]}
|
package/dist/chunk-BJTA5F56.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ButtonBase/ButtonBase.props.ts"],"sourcesContent":["import { MarginProps } from '../../props/margin.props';\nimport { PropDef } from '../../props/prop-def';\nimport { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\n\nconst variants = ['emphasis', 'solid', 'outline', 'ghost'] as const;\n\nexport const buttonBasePropDefs = {\n variant: { className: 'variant', tokens: variants, responsive: false, default: 'solid' },\n} satisfies {\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport type ButtonBaseProps = ComponentPropsWithout<'button', RemovedProps> &\n MarginProps &\n (\n | {\n /**\n * Sets the button's visual variant\n */\n variant?: 'emphasis';\n /**\n * Sets the button's colour scheme\n */\n colorScheme?: 'yellow';\n asChild?: never;\n }\n | {\n /**\n * Sets the button's visual variant\n */\n variant?: 'solid';\n /**\n * Sets the button's colour scheme\n */\n colorScheme?: 'yellow' | 'green' | 'red';\n }\n | {\n variant?: 'outline' | 'ghost';\n colorScheme?: 'grey' | 'green' | 'red';\n }\n ) & {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n /**\n * Indicate when the button is in a loading state, will also disable the button.\n */\n loading?: boolean;\n /** Inverts the component colours, for use on darker surface colours. */\n inverted?: boolean;\n };\n"],"mappings":"AAIA,IAAMA,EAAW,CAAC,WAAY,QAAS,UAAW,OAAO,EAE5CC,EAAqB,CAChC,QAAS,CAAE,UAAW,UAAW,OAAQD,EAAU,WAAY,GAAO,QAAS,OAAQ,CACzF","names":["variants","buttonBasePropDefs"]}
|
package/dist/chunk-BX5DJRCU.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/Badge.props.ts"],"names":["variants","badgePropDefs"],"mappings":"AAIA,6EAAMA,CAAAA,CAAW,CAAC,OAAA,CAAS,SAAS,CAAA,CAEvBC,CAAAA,aAAgB,CAC3B,OAAA,CAAS,CAAE,SAAA,CAAW,SAAA,CAAW,MAAA,CAAQD,CAAAA,CAAU,UAAA,CAAY,CAAA,CAAA,CAAO,OAAA,CAAS,OAAQ,CACzF,CAAA,CAAA,cAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-BX5DJRCU.cjs","sourcesContent":["import { PropDef } from '../../props/prop-def';\nimport { TextTransformProps } from '../../props/text-transform.props';\nimport { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\n\nconst variants = ['solid', 'outline'] as const;\n\nexport const badgePropDefs = {\n variant: { className: 'variant', tokens: variants, responsive: false, default: 'solid' },\n} satisfies {\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport interface BadgeProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n TextTransformProps {\n /**\n * Sets the badges's visual variant\n * @default solid\n */\n variant?: (typeof variants)[number];\n /**\n * Sets the colour scheme.\n * @default blue\n */\n colorScheme?: 'blue' | 'green' | 'red' | 'orange' | 'grey';\n /**\n * Removes the bottom radius, set when the Badge sits directly above another container\n * @default false\n */\n flatBase?: boolean;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-CZ4ZQOCW.cjs","../src/components/Checkbox/Checkbox.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","Checkbox","props","ref","providedId","label","helperText","className","disabled","onCheckedChange","value","ariaLabelledby","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,wDAAoC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECApV,wEACN,wEAMa,mCAKY,IAIpCA,CAAAA,CAAgB,UAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAiB,CAAA,CAAA,UAAA,CAA2C,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACvF,GAAM,CACJ,EAAA,CAAIC,CAAAA,CACJ,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,IAAA,CACR,iBAAA,CAAmBC,CAAAA,CACnB,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaX,CAAOY,mBAAc,CAAA,CAChC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAd,CAAAA,CAAY,MAAA,CAAQ,UAAW,CAAC,CAAA,CACzEe,CAAAA,CAAUC,iCAAAA,CAAiB,CAC3BC,CAAAA,CAAkBC,iCAAAA,CAAiB,CACnCC,CAAAA,iBAAUF,CAAAA,2BAAiB,KAAA,6BAAO,QAAA,mBAASX,CAAK,GAAA,CAChDc,CAAAA,iBAAqBL,CAAAA,6BAAS,oBAAA,CAC9BM,CAAAA,CAAkBN,CAAAA,CAAUA,CAAAA,CAAQ,kBAAkB,CAAA,CAAI,EAAA,CAC1DO,CAAAA,CAAiB,CAACF,CAAAA,EAAsB,CAAC,CAAClB,CAAAA,CAC1CqB,CAAAA,CAAY,CAAC,CAACtB,CAAAA,CAEpB,OACE,CAAA,CAAA,aAAA,CAACuB,mBAAAA,CAAA,CACC,GAAA,CAAI,KAAA,CACJ,SAAA,CAAWC,4BAAAA,CAAK9B,CAAoBQ,CAAS,CAAA,CAC7C,eAAA,CAAeC,CAAAA,CAAW,EAAA,CAAK,KAAA,CAAA,CAAA,CAE/B,CAAA,CAAA,aAAA,CAACsB,iBAAAA,CAAc,IAAA,CAAd,CACC,GAAA,CAAK3B,CAAAA,CACL,SAAA,CAAU,qBAAA,CACV,IAAA,iBAAMkB,CAAAA,6BAAiB,MAAA,CACvB,OAAA,CAASE,CAAAA,CACT,KAAA,CAAOb,CAAAA,CACN,GAAGE,CAAAA,CACJ,EAAA,CAAIG,CAAAA,CACJ,QAAA,CAAUP,CAAAA,CACV,kBAAA,CAAkBkB,CAAAA,CAAiBT,CAAAA,CAAeQ,CAAAA,CAClD,iBAAA,CAAiBd,CAAAA,EAAkBgB,CAAAA,CAAYX,CAAAA,CAAU,KAAA,CAAA,CACzD,eAAA,CAAkBO,CAAAA,EAAqB,CACjCJ,CAAAA,EAAAA,CACEI,CAAAA,iBACFF,CAAAA,6BAAiB,WAAA,mBAAYX,CAAK,GAAA,iBAElCW,CAAAA,6BAAiB,aAAA,mBAAcX,CAAK,GAAA,CAAA,CAGpCD,CAAAA,EACFA,CAAAA,CAAgBc,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,CAAA,CAC/CV,CACH,CAAA,CACCqB,CAAAA,CACC,CAAA,CAAA,aAAA,CAACO,mBAAAA,CAAA,CAAW,EAAA,CAAIhB,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CX,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-CZ4ZQOCW.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 ...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\n gap=\"100\"\n className={clsx(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n >\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...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>\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"]}
|
package/dist/chunk-FU75MK27.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkTBOBX6LGcjs = require('./chunk-TBOBX6LG.cjs');var _chunkPWOQMLDPcjs = require('./chunk-PWOQMLDP.cjs');var _chunkVPZS4ZLEcjs = require('./chunk-VPZS4ZLE.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 y="List",B=_chunk4H5JT5ORcjs.b.call(void 0, y),I= exports.a =e.forwardRef((g,r)=>{let{as:i="ul",className:L,colorScheme:a=void 0,heading:t,headingElement:u="div",helperText:o,linkText:N,linkHref:T,children:n,variant:l,id:P,"aria-labelledby":v,"aria-describedby":C,...s}=_chunk5DRU6TDWcjs.a.call(void 0, g,_chunkLAVQWQP2cjs.a),{id:E,labelId:H,helperTextId:R}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:P,prefix:"list"}),d={id:E,role:"list","aria-labelledby":_nullishCoalesce(v, () => ((t?H:void 0))),"aria-describedby":_nullishCoalesce(C, () => ((o?R:void 0)))};return e.createElement("div",{className:_clsx2.default.call(void 0, B,L)},e.createElement(_chunkTBOBX6LGcjs.a,{id:"listHeader",helperText:o,heading:t,linkHref:T,linkText:N,as:u}),l===void 0||a===void 0?e.createElement(_chunkVPZS4ZLEcjs.a,{asChild:!0,className:"hearth-ListContainer"},e.createElement(i,{ref:r,...s,...d},n)):e.createElement(_chunkPWOQMLDPcjs.a,{className:"hearth-ListContainer",paddingNone:!0,variant:l,colorScheme:a},e.createElement(i,{ref:r,...s,...d},n)))});I.displayName=y;exports.a = I;
|
|
2
|
-
//# sourceMappingURL=chunk-FU75MK27.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-FU75MK27.cjs","../src/components/List/List.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","List","props","ref","Tag","className","colorScheme","heading","HeadingEl","helperText","linkText","linkHref","children","variant","providedId","ariaLabelledby","ariaDescribedby","listProps","extractProps","marginPropDefs","id","labelId","helperTextId","useIds","listAriaProps","clsx","SectionHeader","Box","Card"],"mappings":"AAAA,ulBAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECAvQ,wEACN,IAWXA,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,cAAA,CAAgBC,CAAAA,CAAY,KAAA,CAC5B,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,iBAAA,CAAmBC,CAAAA,CACnB,kBAAA,CAAoBC,CAAAA,CACpB,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAahB,CAAOiB,mBAAc,CAAA,CAChC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CACpC,UAAA,CAAAT,CAAAA,CACA,MAAA,CAAQ,MACV,CAAC,CAAA,CACKU,CAAAA,CAAgB,CACpB,EAAA,CAAAJ,CAAAA,CACA,IAAA,CAAM,MAAA,CACL,iBAAA,kBAAoBL,CAAAA,SAAAA,CAA2BR,CAAAA,CAAWc,CAAAA,CAAU,KAAA,CAAA,GAAA,CACpE,kBAAA,kBAAqBL,CAAAA,SAAAA,CAA4BP,CAAAA,CAAca,CAAAA,CAAe,KAAA,CAAA,GACjF,CAAA,CAEA,OACE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWG,4BAAAA,CAAK1B,CAAoBM,CAAS,CAAA,CAAA,CAChD,CAAA,CAAA,aAAA,CAACqB,mBAAAA,CAAA,CACC,EAAA,CAAG,YAAA,CACH,UAAA,CAAYjB,CAAAA,CACZ,OAAA,CAASF,CAAAA,CACT,QAAA,CAAUI,CAAAA,CACV,QAAA,CAAUD,CAAAA,CACV,EAAA,CAAIF,CAAAA,CACN,CAAA,CACCK,CAAAA,GAAY,KAAA,CAAA,EAAaP,CAAAA,GAAgB,KAAA,CAAA,CACxC,CAAA,CAAA,aAAA,CAACqB,mBAAAA,CAAA,CAAI,OAAA,CAAO,CAAA,CAAA,CAAC,SAAA,CAAU,sBAAA,CAAA,CACrB,CAAA,CAAA,aAAA,CAACvB,CAAAA,CAAA,CAAI,GAAA,CAAKD,CAAAA,CAAM,GAAGc,CAAAA,CAAY,GAAGO,CAAAA,CAAAA,CAC/BZ,CACH,CACF,CAAA,CAEA,CAAA,CAAA,aAAA,CAACgB,mBAAAA,CAAA,CACC,SAAA,CAAU,sBAAA,CACV,WAAA,CAAW,CAAA,CAAA,CACX,OAAA,CAASf,CAAAA,CACT,WAAA,CAAaP,CAAAA,CAAAA,CAEb,CAAA,CAAA,aAAA,CAACF,CAAAA,CAAA,CAAI,GAAA,CAAKD,CAAAA,CAAM,GAAGc,CAAAA,CAAY,GAAGO,CAAAA,CAAAA,CAC/BZ,CACH,CACF,CAEJ,CAEJ,CAAC,CAAA,CAEDX,CAAAA,CAAK,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-FU75MK27.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 { useIds } from '../../hooks/use-ids';\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 heading,\n headingElement: HeadingEl = 'div',\n helperText,\n linkText,\n linkHref,\n children,\n variant,\n id: providedId,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n ...listProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId } = useIds({\n providedId,\n prefix: 'list',\n });\n const listAriaProps = {\n id,\n role: 'list',\n ['aria-labelledby']: ariaLabelledby ?? (Boolean(heading) ? labelId : undefined),\n ['aria-describedby']: ariaDescribedby ?? (Boolean(helperText) ? helperTextId : undefined),\n };\n\n return (\n <div className={clsx(componentClassName, className)}>\n <SectionHeader\n id=\"listHeader\"\n helperText={helperText}\n heading={heading}\n linkHref={linkHref}\n linkText={linkText}\n as={HeadingEl}\n />\n {variant === undefined || colorScheme === undefined ? (\n <Box asChild className=\"hearth-ListContainer\">\n <Tag ref={ref} {...listProps} {...listAriaProps}>\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} {...listProps} {...listAriaProps}>\n {children}\n </Tag>\n </Card>\n )}\n </div>\n );\n});\n\nList.displayName = componentName;\n"]}
|
package/dist/chunk-GOKA6XUX.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-C2M7FEJX.js";import{a as m}from"./chunk-XQ5A24NX.js";import{a as l}from"./chunk-QC4ZMGCU.js";import{a as t}from"./chunk-RTGGS5XX.js";import{b as d}from"./chunk-4PEMW3UE.js";import*as a from"react";import I from"clsx";import{RadioGroup as p}from"radix-ui";var n="RadioCard",N=d(n),u=a.forwardRef((c,f)=>{let{className:R,children:b,id:h,label:o,"aria-labelledby":r,...C}=t(c,m),{id:e,labelId:i}=l({providedId:h,prefix:"radio"});return a.createElement(p.Item,{ref:f,className:I(N,R),...C,id:e,"aria-labelledby":r||(o?i:void 0)},a.createElement("div",{className:"hearth-RadioContainer"},a.createElement("div",{className:"hearth-RadioItem"},a.createElement(p.Indicator,{className:"hearth-RadioIndicator"})),a.createElement(s,{id:i,htmlFor:e,disableUserSelect:!0,fontWeight:"semibold"},o)),b)});u.displayName=n;export{u as a};
|
|
2
|
-
//# sourceMappingURL=chunk-GOKA6XUX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/RadioCard/RadioCard.tsx"],"sourcesContent":["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 ...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 id={labelId} htmlFor={id} disableUserSelect fontWeight=\"semibold\">\n {label}\n </Label>\n </div>\n {children}\n </RadixRadioGroup.Item>\n );\n});\n\nRadioCard.displayName = componentName;\n"],"mappings":"wMAAA,UAAYA,MAAW,QACvB,OAAOC,MAAU,OAQjB,OAAS,cAAcC,MAAuB,WAE9C,IAAMC,EAAgB,YAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAkB,aAA6C,CAACC,EAAOC,IAAQ,CAC1F,GAAM,CACJ,UAAAC,EACA,SAAAC,EACA,GAAIC,EACJ,MAAAC,EACA,kBAAmBC,EACnB,GAAGC,CACL,EAAIC,EAAaR,EAAOS,CAAc,EAChC,CAAE,GAAAC,EAAI,QAAAC,CAAQ,EAAIC,EAAO,CAAE,WAAAR,EAAY,OAAQ,OAAQ,CAAC,EAC9D,OACE,gBAACT,EAAgB,KAAhB,CACC,IAAKM,EACL,UAAWY,EAAKhB,EAAoBK,CAAS,EAC5C,GAAGK,EACJ,GAAIG,EACJ,kBAAiBJ,IAAkCD,EAAQM,EAAU,SAErE,gBAAC,OAAI,UAAU,yBACb,gBAAC,OAAI,UAAU,oBACb,gBAAChB,EAAgB,UAAhB,CAA0B,UAAU,wBAAwB,CAC/D,EACA,gBAACmB,EAAA,CAAM,GAAIH,EAAS,QAASD,EAAI,kBAAiB,GAAC,WAAW,YAC3DL,CACH,CACF,EACCF,CACH,CAEJ,CAAC,EAEDJ,EAAU,YAAcH","names":["React","clsx","RadixRadioGroup","componentName","componentClassName","withGlobalPrefix","RadioCard","props","ref","className","children","providedId","label","ariaLabelledby","radioCardProps","extractProps","marginPropDefs","id","labelId","useIds","clsx","Label"]}
|
package/dist/chunk-GOKFUDH4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as b}from"./chunk-LX55FQR5.js";import{a as x}from"./chunk-TKOS3BOP.js";import{a as f}from"./chunk-4H4MW2WO.js";import{a as c}from"./chunk-XQ5A24NX.js";import{a as h}from"./chunk-QC4ZMGCU.js";import{a as p}from"./chunk-RTGGS5XX.js";import{b as m}from"./chunk-4PEMW3UE.js";import*as e from"react";import k from"clsx";var y="List",B=m(y),I=e.forwardRef((g,r)=>{let{as:i="ul",className:L,colorScheme:a=void 0,heading:t,headingElement:u="div",helperText:o,linkText:N,linkHref:T,children:n,variant:l,id:P,"aria-labelledby":v,"aria-describedby":C,...s}=p(g,c),{id:E,labelId:H,helperTextId:R}=h({providedId:P,prefix:"list"}),d={id:E,role:"list","aria-labelledby":v??(t?H:void 0),"aria-describedby":C??(o?R:void 0)};return e.createElement("div",{className:k(B,L)},e.createElement(b,{id:"listHeader",helperText:o,heading:t,linkHref:T,linkText:N,as:u}),l===void 0||a===void 0?e.createElement(f,{asChild:!0,className:"hearth-ListContainer"},e.createElement(i,{ref:r,...s,...d},n)):e.createElement(x,{className:"hearth-ListContainer",paddingNone:!0,variant:l,colorScheme:a},e.createElement(i,{ref:r,...s,...d},n)))});I.displayName=y;export{I as a};
|
|
2
|
-
//# sourceMappingURL=chunk-GOKFUDH4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 { useIds } from '../../hooks/use-ids';\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 heading,\n headingElement: HeadingEl = 'div',\n helperText,\n linkText,\n linkHref,\n children,\n variant,\n id: providedId,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n ...listProps\n } = extractProps(props, marginPropDefs);\n const { id, labelId, helperTextId } = useIds({\n providedId,\n prefix: 'list',\n });\n const listAriaProps = {\n id,\n role: 'list',\n ['aria-labelledby']: ariaLabelledby ?? (Boolean(heading) ? labelId : undefined),\n ['aria-describedby']: ariaDescribedby ?? (Boolean(helperText) ? helperTextId : undefined),\n };\n\n return (\n <div className={clsx(componentClassName, className)}>\n <SectionHeader\n id=\"listHeader\"\n helperText={helperText}\n heading={heading}\n linkHref={linkHref}\n linkText={linkText}\n as={HeadingEl}\n />\n {variant === undefined || colorScheme === undefined ? (\n <Box asChild className=\"hearth-ListContainer\">\n <Tag ref={ref} {...listProps} {...listAriaProps}>\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} {...listProps} {...listAriaProps}>\n {children}\n </Tag>\n </Card>\n )}\n </div>\n );\n});\n\nList.displayName = componentName;\n"],"mappings":"wRAAA,UAAYA,MAAW,QACvB,OAAOC,MAAU,OAWjB,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,eAAgBC,EAAY,MAC5B,WAAAC,EACA,SAAAC,EACA,SAAAC,EACA,SAAAC,EACA,QAAAC,EACA,GAAIC,EACJ,kBAAmBC,EACnB,mBAAoBC,EACpB,GAAGC,CACL,EAAIC,EAAahB,EAAOiB,CAAc,EAChC,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAC3C,WAAAT,EACA,OAAQ,MACV,CAAC,EACKU,EAAgB,CACpB,GAAAJ,EACA,KAAM,OACL,kBAAoBL,IAA2BR,EAAWc,EAAU,QACpE,mBAAqBL,IAA4BP,EAAca,EAAe,OACjF,EAEA,OACE,gBAAC,OAAI,UAAWG,EAAK1B,EAAoBM,CAAS,GAChD,gBAACqB,EAAA,CACC,GAAG,aACH,WAAYjB,EACZ,QAASF,EACT,SAAUI,EACV,SAAUD,EACV,GAAIF,EACN,EACCK,IAAY,QAAaP,IAAgB,OACxC,gBAACqB,EAAA,CAAI,QAAO,GAAC,UAAU,wBACrB,gBAACvB,EAAA,CAAI,IAAKD,EAAM,GAAGc,EAAY,GAAGO,GAC/BZ,CACH,CACF,EAEA,gBAACgB,EAAA,CACC,UAAU,uBACV,YAAW,GACX,QAASf,EACT,YAAaP,GAEb,gBAACF,EAAA,CAAI,IAAKD,EAAM,GAAGc,EAAY,GAAGO,GAC/BZ,CACH,CACF,CAEJ,CAEJ,CAAC,EAEDX,EAAK,YAAcH","names":["React","clsx","componentName","componentClassName","withGlobalPrefix","List","props","ref","Tag","className","colorScheme","heading","HeadingEl","helperText","linkText","linkHref","children","variant","providedId","ariaLabelledby","ariaDescribedby","listProps","extractProps","marginPropDefs","id","labelId","helperTextId","useIds","listAriaProps","clsx","SectionHeader","Box","Card"]}
|
package/dist/chunk-HLGSJ7VZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SectionHeader/SectionHeader.props.ts"],"sourcesContent":["import { ComponentType } from 'react';\nimport { MarginProps } from '../../props/margin.props';\nimport { PropDef } from '../../props/prop-def';\nimport { TextAlignProps } from '../../props/text-align.props';\nimport { TextTransformProps } from '../../props/text-transform.props';\nimport { TextWrapProps } from '../../props/text-wrap.props';\nimport type { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\nimport { LinkProps } from '../Link/Link.props';\n\nconst sizes = ['sm', 'md', 'lg', 'xl'] as const;\n\nexport const sectionHeaderPropDefs = {\n size: { className: 'size', tokens: sizes, responsive: false, default: 'md' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n};\n\nexport interface SectionHeaderProps\n extends ComponentPropsWithout<'h2', RemovedProps>,\n TextAlignProps,\n TextTransformProps,\n TextWrapProps,\n MarginProps {\n /**\n * Actual string to display as section header\n */\n heading?: string;\n /**\n * @default h2\n */\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'div';\n /**\n * Set the text size styles.\n * @default md\n */\n size?: (typeof sizes)[number];\n /**\n * Optional helper text to provide additional context or instructions.\n */\n helperText?: string;\n /**\n * Optional configuration of link at the side.\n * Both linkText and linkHref need to be present for the link to appear.\n */\n linkText?: string;\n linkHref?: LinkProps['href'];\n /**\n * @default Chevron\n */\n linkIcon?: ComponentType;\n linkIconPosition?: 'left' | 'right';\n /**\n * @default true\n */\n linkShowIcon?: boolean;\n /**\n * @default _self\n */\n linkTarget?: React.HTMLAttributeAnchorTarget | undefined;\n}\n"],"mappings":"AASA,IAAMA,EAAQ,CAAC,KAAM,KAAM,KAAM,IAAI,EAExBC,EAAwB,CACnC,KAAM,CAAE,UAAW,OAAQ,OAAQD,EAAO,WAAY,GAAO,QAAS,IAAK,CAC7E","names":["sizes","sectionHeaderPropDefs"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DetailText/DetailText.props.ts"],"names":["sizes","colorValues","detailTextPropDefs"],"mappings":"AAQA,6EAAMA,CAAAA,CAAQ,CAAC,IAAA,CAAM,IAAA,CAAM,IAAA,CAAM,IAAA,CAAM,KAAA,CAAO,KAAA,CAAO,KAAK,CAAA,CACpDC,CAAAA,CAAc,CAAC,MAAA,CAAQ,OAAA,CAAS,SAAS,CAAA,CAElCC,CAAAA,aAAqB,CAChC,IAAA,CAAM,CAAE,SAAA,CAAW,MAAA,CAAQ,MAAA,CAAQF,CAAAA,CAAO,UAAA,CAAY,CAAA,CAAA,CAAM,OAAA,CAAS,IAAK,CAAA,CAC1E,KAAA,CAAO,CAAE,SAAA,CAAW,YAAA,CAAc,MAAA,CAAQC,CAAAA,CAAa,UAAA,CAAY,CAAA,CAAA,CAAO,OAAA,CAAS,MAAO,CAC5F,CAAA,CAAA,cAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-HWRNOXB7.cjs","sourcesContent":["import { MarginProps } from '../../props/margin.props';\nimport { PropDef } from '../../props/prop-def';\nimport { TextAlignProps } from '../../props/text-align.props';\nimport { TextTransformProps } from '../../props/text-transform.props';\nimport { TextWrapProps } from '../../props/text-wrap.props';\nimport type { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\nimport type { Responsive } from '../../types/responsive';\n\nconst sizes = ['sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl'] as const;\nconst colorValues = ['text', 'valid', 'invalid'] as const;\n\nexport const detailTextPropDefs = {\n size: { className: 'size', tokens: sizes, responsive: true, default: 'md' },\n color: { className: 'text-color', tokens: colorValues, responsive: false, default: 'text' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n color: PropDef<(typeof colorValues)[number]>;\n};\n\ninterface CommonDetailTextProps\n extends TextAlignProps,\n TextTransformProps,\n TextWrapProps,\n MarginProps {\n /**\n * @default span\n */\n as?: 'p' | 'div' | 'span';\n /** Change the default rendered element for the one passed as a child, merging their props and behavior. */\n asChild?: boolean;\n /**\n * Set the text size styles.\n * @default md\n */\n size?: Responsive<(typeof sizes)[number]>;\n /**\n * Set the text color\n * @default text\n */\n color?: Responsive<(typeof colorValues)[number]>;\n /** Inverts the component colours, for use on darker surface colours. */\n inverted?: boolean;\n}\ntype DetailTextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype DetailTextSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype DetailTextPProps = { as?: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\nexport type DetailTextProps = CommonDetailTextProps &\n (DetailTextSpanProps | DetailTextDivProps | DetailTextPProps);\n"]}
|
package/dist/chunk-JM4RYNG3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-C2M7FEJX.js";import{a as n}from"./chunk-JPYVWTDN.js";import{c as f}from"./chunk-5OLLJKEO.js";import{a as s}from"./chunk-432A6CLH.js";import{a as p}from"./chunk-QC4ZMGCU.js";import{b as m}from"./chunk-4PEMW3UE.js";import*as e from"react";import N from"clsx";import{RadioGroup as R}from"radix-ui";var b="RadioTile",G=m(b),v=e.forwardRef(({className:u,id:x,label:o,helperText:i,"aria-labelledby":r,...T},h)=>{let{id:a,labelId:t,helperTextId:d}=p({providedId:x,prefix:"radio"}),{hasGroupHelperText:y,"aria-describedby":I}=f(),l=!y&&i!==void 0;return e.createElement(R.Item,{ref:h,className:N(G,u),...T,id:a,"aria-describedby":l?d:I,"aria-labelledby":r||(o?t:void 0)},e.createElement("div",{className:"hearth-RadioContainer"},e.createElement("div",{className:"hearth-RadioItem"},e.createElement(R.Indicator,{className:"hearth-RadioIndicator"})),e.createElement(s,{direction:"column"},e.createElement(c,{id:t,htmlFor:a,disableUserSelect:!0},o),l?e.createElement(n,{id:d,disableUserSelect:!0},i):null)))});v.displayName=b;export{v as a};
|
|
2
|
-
//# sourceMappingURL=chunk-JM4RYNG3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/RadioTile/RadioTile.tsx"],"sourcesContent":["import * as React from 'react';\nimport clsx from 'clsx';\nimport type { ElementRef } from 'react';\nimport type { RadioTileProps } from './RadioTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { useIds } from '../../hooks/use-ids';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst componentName = 'RadioTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioTileElement = ElementRef<'button'>;\n\nexport const RadioTile = React.forwardRef<RadioTileElement, RadioTileProps>(\n (\n { className, id: providedId, label, helperText, 'aria-labelledby': ariaLabelledby, ...props },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFormGroupBase();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n return (\n <RadixRadioGroup.Item\n ref={ref}\n className={clsx(componentClassName, className)}\n {...props}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n >\n <div className=\"hearth-RadioContainer\">\n <div className=\"hearth-RadioItem\">\n <RadixRadioGroup.Indicator className=\"hearth-RadioIndicator\" />\n </div>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </div>\n </RadixRadioGroup.Item>\n );\n }\n);\n\nRadioTile.displayName = componentName;\n"],"mappings":"gPAAA,UAAYA,MAAW,QACvB,OAAOC,MAAU,OAIjB,OAAS,cAAcC,MAAuB,WAO9C,IAAMC,EAAgB,YAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAkB,aAC7B,CACE,CAAE,UAAAC,EAAW,GAAIC,EAAY,MAAAC,EAAO,WAAAC,EAAY,kBAAmBC,EAAgB,GAAGC,CAAM,EAC5FC,IACG,CACH,GAAM,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAT,EAAY,OAAQ,OAAQ,CAAC,EACtE,CAAE,mBAAAU,EAAoB,mBAAoBC,CAAgB,EAAIC,EAAiB,EAC/EC,EAAyB,CAACH,GAAsBR,IAAe,OACrE,OACE,gBAACY,EAAgB,KAAhB,CACC,IAAKT,EACL,UAAWU,EAAKnB,EAAoBG,CAAS,EAC5C,GAAGK,EACJ,GAAIE,EACJ,mBAAkBO,EAAiBL,EAAeG,EAClD,kBAAiBR,IAAkCF,EAAQM,EAAU,SAErE,gBAAC,OAAI,UAAU,yBACb,gBAAC,OAAI,UAAU,oBACb,gBAACO,EAAgB,UAAhB,CAA0B,UAAU,wBAAwB,CAC/D,EACA,gBAACE,EAAA,CAAK,UAAU,UACd,gBAACC,EAAA,CAAM,GAAIV,EAAS,QAASD,EAAI,kBAAiB,IAC/CL,CACH,EACCY,EACC,gBAACK,EAAA,CAAW,GAAIV,EAAc,kBAAiB,IAC5CN,CACH,EACE,IACN,CACF,CACF,CAEJ,CACF,EAEAJ,EAAU,YAAcH","names":["React","clsx","RadixRadioGroup","componentName","componentClassName","withGlobalPrefix","RadioTile","className","providedId","label","helperText","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFormGroupBase","showHelperText","RadixRadioGroup","clsx","Flex","Label","HelperText"]}
|
package/dist/chunk-KX5PFWQG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-C2M7FEJX.js";import{a as n}from"./chunk-JPYVWTDN.js";import{c as f}from"./chunk-5OLLJKEO.js";import{a as l}from"./chunk-432A6CLH.js";import{a as p}from"./chunk-QC4ZMGCU.js";import{b as s}from"./chunk-4PEMW3UE.js";import*as e from"react";import w from"clsx";import{RadioGroup as R}from"radix-ui";var b="Radio",E=s(b),F=e.forwardRef(({id:h,label:o,helperText:a,className:u,labelFontWeight:x,"aria-labelledby":r,...y},I)=>{let{id:i,labelId:t,helperTextId:d}=p({providedId:h,prefix:"radio"}),{hasGroupHelperText:N,"aria-describedby":G}=f(),m=!N&&a!==void 0,v=!!o;return e.createElement("div",{className:w(E,u)},e.createElement("div",{className:"hearth-RadioContainer"},e.createElement(R.Item,{ref:I,...y,id:i,"aria-describedby":m?d:G,"aria-labelledby":r||(o?t:void 0),className:"hearth-RadioItem"},e.createElement(R.Indicator,{className:"hearth-RadioIndicator"}))),v?e.createElement(l,{direction:"column",gap:"50"},e.createElement(c,{id:t,htmlFor:i,disableUserSelect:!0,fontWeight:x,className:"hearth-RadioLabel"},o),m?e.createElement(n,{id:d,disableUserSelect:!0},a):null):null)});F.displayName=b;export{F as a};
|
|
2
|
-
//# sourceMappingURL=chunk-KX5PFWQG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 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\n id={labelId}\n htmlFor={id}\n disableUserSelect\n fontWeight={labelFontWeight}\n className=\"hearth-RadioLabel\"\n >\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,UAAAC,EACA,gBAAAC,EACA,kBAAmBC,EACnB,GAAGC,CACL,EACAC,IACG,CACH,GAAM,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAX,EAAY,OAAQ,OAAQ,CAAC,EACtE,CAAE,mBAAAY,EAAoB,mBAAoBC,CAAgB,EAAIC,EAAiB,EAC/EC,EAAyB,CAACH,GAAsBV,IAAe,OAC/Dc,EAAY,CAAC,CAACf,EACpB,OACE,gBAAC,OAAI,UAAWgB,EAAKpB,EAAoBM,CAAS,GAChD,gBAAC,OAAI,UAAU,yBACb,gBAACe,EAAgB,KAAhB,CACC,IAAKX,EACJ,GAAGD,EACJ,GAAIE,EACJ,mBAAkBO,EAAiBL,EAAeG,EAClD,kBAAiBR,IAAkCJ,EAAQQ,EAAU,QACrE,UAAU,oBAEV,gBAACS,EAAgB,UAAhB,CAA0B,UAAU,wBAAwB,CAC/D,CACF,EACCF,EACC,gBAACG,EAAA,CAAK,UAAU,SAAS,IAAI,MAC3B,gBAACC,EAAA,CACC,GAAIX,EACJ,QAASD,EACT,kBAAiB,GACjB,WAAYJ,EACZ,UAAU,qBAETH,CACH,EACCc,EACC,gBAACM,EAAA,CAAW,GAAIX,EAAc,kBAAiB,IAC5CR,CACH,EACE,IACN,EACE,IACN,CAEJ,CACF,EAEAH,EAAM,YAAcH","names":["React","clsx","RadixRadioGroup","componentName","componentClassName","withGlobalPrefix","Radio","providedId","label","helperText","className","labelFontWeight","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFormGroupBase","showHelperText","showLabel","clsx","RadixRadioGroup","Flex","Label","HelperText"]}
|
package/dist/chunk-LMVWLJME.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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="RadioTile",G=_chunk4H5JT5ORcjs.b.call(void 0, b),v= exports.a =e.forwardRef(({className:u,id:x,label:o,helperText:i,"aria-labelledby":r,...T},h)=>{let{id:a,labelId:t,helperTextId:d}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:x,prefix:"radio"}),{hasGroupHelperText:y,"aria-describedby":I}=_chunkHSPOCJ5Acjs.c.call(void 0, ),l=!y&&i!==void 0;return e.createElement(_radixui.RadioGroup.Item,{ref:h,className:_clsx2.default.call(void 0, G,u),...T,id:a,"aria-describedby":l?d:I,"aria-labelledby":r||(o?t:void 0)},e.createElement("div",{className:"hearth-RadioContainer"},e.createElement("div",{className:"hearth-RadioItem"},e.createElement(_radixui.RadioGroup.Indicator,{className:"hearth-RadioIndicator"})),e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column"},e.createElement(_chunkGFWH3VRNcjs.a,{id:t,htmlFor:a,disableUserSelect:!0},o),l?e.createElement(_chunkK5BEIZDAcjs.a,{id:d,disableUserSelect:!0},i):null)))});v.displayName=b;exports.a = v;
|
|
2
|
-
//# sourceMappingURL=chunk-LMVWLJME.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-LMVWLJME.cjs","../src/components/RadioTile/RadioTile.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","RadioTile","className","providedId","label","helperText","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","hasGroupHelperText","ariaDescribedby","useFormGroupBase","showHelperText","RadixRadioGroup","clsx","Flex","Label","HelperText"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECA9N,wEACN,mCAI6B,IAOxCA,CAAAA,CAAgB,WAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAkB,CAAA,CAAA,UAAA,CAC7B,CACE,CAAE,SAAA,CAAAC,CAAAA,CAAW,EAAA,CAAIC,CAAAA,CAAY,KAAA,CAAAC,CAAAA,CAAO,UAAA,CAAAC,CAAAA,CAAY,iBAAA,CAAmBC,CAAAA,CAAgB,GAAGC,CAAM,CAAA,CAC5FC,CAAAA,CAAAA,EACG,CACH,GAAM,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAT,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CACtE,CAAE,kBAAA,CAAAU,CAAAA,CAAoB,kBAAA,CAAoBC,CAAgB,CAAA,CAAIC,iCAAAA,CAAiB,CAC/EC,CAAAA,CAAyB,CAACH,CAAAA,EAAsBR,CAAAA,GAAe,KAAA,CAAA,CACrE,OACE,CAAA,CAAA,aAAA,CAACY,mBAAAA,CAAgB,IAAA,CAAhB,CACC,GAAA,CAAKT,CAAAA,CACL,SAAA,CAAWU,4BAAAA,CAAKnB,CAAoBG,CAAS,CAAA,CAC5C,GAAGK,CAAAA,CACJ,EAAA,CAAIE,CAAAA,CACJ,kBAAA,CAAkBO,CAAAA,CAAiBL,CAAAA,CAAeG,CAAAA,CAClD,iBAAA,CAAiBR,CAAAA,EAAAA,CAAkCF,CAAAA,CAAQM,CAAAA,CAAU,KAAA,CAAA,CAAA,CAAA,CAErE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,uBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,kBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAACO,mBAAAA,CAAgB,SAAA,CAAhB,CAA0B,SAAA,CAAU,uBAAA,CAAwB,CAC/D,CAAA,CACA,CAAA,CAAA,aAAA,CAACE,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAA,CACd,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CAAM,EAAA,CAAIV,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC/CL,CACH,CAAA,CACCY,CAAAA,CACC,CAAA,CAAA,aAAA,CAACK,mBAAAA,CAAA,CAAW,EAAA,CAAIV,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CN,CACH,CAAA,CACE,IACN,CACF,CACF,CAEJ,CACF,CAAA,CAEAJ,CAAAA,CAAU,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-LMVWLJME.cjs","sourcesContent":[null,"import * as React from 'react';\nimport clsx from 'clsx';\nimport type { ElementRef } from 'react';\nimport type { RadioTileProps } from './RadioTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { RadioGroup as RadixRadioGroup } from 'radix-ui';\nimport { useIds } from '../../hooks/use-ids';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst componentName = 'RadioTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype RadioTileElement = ElementRef<'button'>;\n\nexport const RadioTile = React.forwardRef<RadioTileElement, RadioTileProps>(\n (\n { className, id: providedId, label, helperText, 'aria-labelledby': ariaLabelledby, ...props },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const { hasGroupHelperText, 'aria-describedby': ariaDescribedby } = useFormGroupBase();\n const showHelperText = Boolean(!hasGroupHelperText && helperText !== undefined);\n return (\n <RadixRadioGroup.Item\n ref={ref}\n className={clsx(componentClassName, className)}\n {...props}\n id={id}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby ? ariaLabelledby : label ? labelId : undefined}\n >\n <div className=\"hearth-RadioContainer\">\n <div className=\"hearth-RadioItem\">\n <RadixRadioGroup.Indicator className=\"hearth-RadioIndicator\" />\n </div>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </div>\n </RadixRadioGroup.Item>\n );\n }\n);\n\nRadioTile.displayName = componentName;\n"]}
|
package/dist/chunk-LX55FQR5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as g}from"./chunk-HLGSJ7VZ.js";import{a as x}from"./chunk-3YTV62G7.js";import{a as h}from"./chunk-JPYVWTDN.js";import{a as d}from"./chunk-432A6CLH.js";import{a as S}from"./chunk-FGPP4NKK.js";import{a as p}from"./chunk-LFUFY26R.js";import{a as c}from"./chunk-AFZ3OJUA.js";import{a as f}from"./chunk-VV7AHCQF.js";import{a as s}from"./chunk-XQ5A24NX.js";import{a as H}from"./chunk-QC4ZMGCU.js";import{a as l}from"./chunk-RTGGS5XX.js";import{b as a}from"./chunk-4PEMW3UE.js";import*as e from"react";import k from"clsx";import{ChevronRightSmallIcon as L}from"@utilitywarehouse/hearth-react-icons";var P="SectionHeader",b=a(P),y=e.forwardRef(({size:I,...T})=>{let{className:u,heading:v,as:E="div",helperText:r,linkText:o,linkHref:t,linkIconPosition:i="right",linkShowIcon:n=!0,linkTarget:N="_self",linkIcon:m=L,id:R}=l({size:I,...T},g,p,c,f,s),{labelId:w,helperTextId:D}=H({providedId:R,prefix:"sectionHeader"}),C=t&&o;return e.createElement("div",{className:k(b,u)},e.createElement(d,{direction:"column",flexGrow:"1",className:k("hearth-SectionHeaderTextContent")},e.createElement(x,{asChild:!0,size:"md",id:w},e.createElement(E,null,v)),r?e.createElement(h,{id:D,disableUserSelect:!0},r):null),C?e.createElement(S,{href:t,target:N},n&&i==="left"&&e.createElement(m,null),o,n&&i==="right"&&e.createElement(m,null)):null)});y.displayName=P;export{y as a};
|
|
2
|
-
//# sourceMappingURL=chunk-LX55FQR5.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SectionHeader/SectionHeader.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport type { ElementRef } from 'react';\nimport { extractProps } from '../../helpers/extract-props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { useIds } from '../../hooks/use-ids';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { textAlignPropDefs } from '../../props/text-align.props';\nimport { textTransformPropDefs } from '../../props/text-transform.props';\nimport { textWrapPropDefs } from '../../props/text-wrap.props';\nimport { Flex } from '../Flex/Flex';\nimport { Heading } from '../Heading/Heading';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Link } from '../Link/Link';\nimport { sectionHeaderPropDefs, 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 ({ size, ...props }) => {\n const {\n className,\n heading,\n as: SectionHeaderEl = 'div',\n helperText,\n linkText,\n linkHref,\n linkIconPosition = 'right',\n linkShowIcon = true,\n linkTarget = '_self',\n linkIcon: SectionHeaderLinkIcon = ChevronRightSmallIcon,\n id: providedId,\n } = extractProps(\n { size, ...props },\n sectionHeaderPropDefs,\n textAlignPropDefs,\n textTransformPropDefs,\n textWrapPropDefs,\n marginPropDefs\n );\n const { labelId, helperTextId } = useIds({\n providedId,\n prefix: 'sectionHeader',\n });\n const showLink = linkHref && linkText;\n return (\n <div className={clsx(componentClassName, className)}>\n <Flex direction=\"column\" flexGrow=\"1\" className={clsx('hearth-SectionHeaderTextContent')}>\n <Heading asChild size=\"md\" id={labelId}>\n <SectionHeaderEl>{heading}</SectionHeaderEl>\n </Heading>\n {helperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n {showLink ? (\n <Link href={linkHref} target={linkTarget}>\n {linkShowIcon && linkIconPosition === 'left' && <SectionHeaderLinkIcon />}\n {linkText}\n {linkShowIcon && linkIconPosition === 'right' && <SectionHeaderLinkIcon />}\n </Link>\n ) : null}\n </div>\n );\n }\n);\n\nSectionHeader.displayName = componentName;\n"],"mappings":"geAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAU,OAEjB,OAAS,yBAAAC,MAA6B,uCAetC,IAAMC,EAAgB,gBAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAsB,aACjC,CAAC,CAAE,KAAAC,EAAM,GAAGC,CAAM,IAAM,CACtB,GAAM,CACJ,UAAAC,EACA,QAAAC,EACA,GAAIC,EAAkB,MACtB,WAAAC,EACA,SAAAC,EACA,SAAAC,EACA,iBAAAC,EAAmB,QACnB,aAAAC,EAAe,GACf,WAAAC,EAAa,QACb,SAAUC,EAAwBC,EAClC,GAAIC,CACN,EAAIC,EACF,CAAE,KAAAd,EAAM,GAAGC,CAAM,EACjBc,EACAC,EACAC,EACAC,EACAC,CACF,EACM,CAAE,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CACvC,WAAAT,EACA,OAAQ,eACV,CAAC,EACKU,EAAWhB,GAAYD,EAC7B,OACE,gBAAC,OAAI,UAAWkB,EAAK3B,EAAoBK,CAAS,GAChD,gBAACuB,EAAA,CAAK,UAAU,SAAS,SAAS,IAAI,UAAWD,EAAK,iCAAiC,GACrF,gBAACE,EAAA,CAAQ,QAAO,GAAC,KAAK,KAAK,GAAIN,GAC7B,gBAAChB,EAAA,KAAiBD,CAAQ,CAC5B,EACCE,EACC,gBAACsB,EAAA,CAAW,GAAIN,EAAc,kBAAiB,IAC5ChB,CACH,EACE,IACN,EACCkB,EACC,gBAACK,EAAA,CAAK,KAAMrB,EAAU,OAAQG,GAC3BD,GAAgBD,IAAqB,QAAU,gBAACG,EAAA,IAAsB,EACtEL,EACAG,GAAgBD,IAAqB,SAAW,gBAACG,EAAA,IAAsB,CAC1E,EACE,IACN,CAEJ,CACF,EAEAZ,EAAc,YAAcH","names":["React","clsx","ChevronRightSmallIcon","componentName","componentClassName","withGlobalPrefix","SectionHeader","size","props","className","heading","SectionHeaderEl","helperText","linkText","linkHref","linkIconPosition","linkShowIcon","linkTarget","SectionHeaderLinkIcon","ChevronRightSmallIcon","providedId","extractProps","sectionHeaderPropDefs","textAlignPropDefs","textTransformPropDefs","textWrapPropDefs","marginPropDefs","labelId","helperTextId","useIds","showLink","clsx","Flex","Heading","HelperText","Link"]}
|
package/dist/chunk-MVVYXPVV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as k}from"./chunk-C2M7FEJX.js";import{a as f}from"./chunk-JPYVWTDN.js";import{c as C}from"./chunk-5OLLJKEO.js";import{c as u}from"./chunk-T64W7Q7K.js";import{a as x}from"./chunk-432A6CLH.js";import{a as h}from"./chunk-QC4ZMGCU.js";import{b as p}from"./chunk-4PEMW3UE.js";import*as e from"react";import P from"clsx";import{TickSmallIcon as S}from"@utilitywarehouse/hearth-react-icons";import{Checkbox as T}from"radix-ui";var R="CheckboxTile",U=p(R),B=e.forwardRef(({className:I,id:y,disabled:a,value:o="on",onCheckedChange:i,label:c,helperText:l,"aria-labelledby":N,...G},H)=>{let{id:m,labelId:s,helperTextId:n}=h({providedId:y,prefix:"radio"}),r=C(),t=u(),w=t?.value?.includes(o),E=r?.hasGroupHelperText,F=r?r["aria-describedby"]:"",d=!E&&!!l,L=!!c;return e.createElement("label",{className:P(U,I),"data-disabled":a?"":void 0},e.createElement(T.Root,{ref:H,className:"hearth-CheckboxRoot",name:t?.name,checked:w,value:o,...G,id:m,disabled:a,"aria-describedby":d?n:F,"aria-labelledby":N||L?s:void 0,onCheckedChange:b=>{r&&(b?t?.onItemCheck(o):t?.onItemUncheck(o)),i&&i(b)}},e.createElement(T.Indicator,{asChild:!0,className:"hearth-CheckboxIndicator"},e.createElement(S,null))),e.createElement(x,{direction:"column"},e.createElement(k,{id:s,htmlFor:m,disableUserSelect:!0},c),d?e.createElement(f,{id:n,disableUserSelect:!0},l):null))});B.displayName=R;export{B as a};
|
|
2
|
-
//# sourceMappingURL=chunk-MVVYXPVV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CheckboxTile/CheckboxTile.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { CheckboxTileProps } from './CheckboxTile.props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ElementRef } from 'react';\nimport { useIds } from '../../hooks/use-ids';\nimport { TickSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { Label } from '../Label/Label';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Flex } from '../Flex/Flex';\nimport { Checkbox as RadixCheckbox } from 'radix-ui';\nimport { useCheckboxGroup } from '../CheckboxGroup/CheckboxGroup.context';\nimport { useFormGroupBase } from '../FormGroupBase/FormGroupBase.context';\n\nconst componentName = 'CheckboxTile';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CheckboxTileElement = ElementRef<'button'>;\n\nexport const CheckboxTile = React.forwardRef<CheckboxTileElement, CheckboxTileProps>(\n (\n {\n className,\n id: providedId,\n disabled,\n value = 'on',\n onCheckedChange,\n label,\n helperText,\n 'aria-labelledby': ariaLabelledby,\n ...props\n },\n ref\n ) => {\n const { id, labelId, helperTextId } = useIds({ providedId, prefix: 'radio' });\n const context = useFormGroupBase();\n const checkboxContext = useCheckboxGroup();\n const checked = checkboxContext?.value?.includes(value);\n const hasGroupHelperText = context?.hasGroupHelperText;\n const ariaDescribedby = context ? context['aria-describedby'] : '';\n const showHelperText = !hasGroupHelperText && !!helperText;\n const showLabel = !!label;\n return (\n <label\n className={clsx(componentClassName, className)}\n data-disabled={disabled ? '' : undefined}\n >\n <RadixCheckbox.Root\n ref={ref}\n className=\"hearth-CheckboxRoot\"\n name={checkboxContext?.name}\n checked={checked}\n value={value}\n {...props}\n id={id}\n disabled={disabled}\n aria-describedby={showHelperText ? helperTextId : ariaDescribedby}\n aria-labelledby={ariaLabelledby || showLabel ? labelId : undefined}\n onCheckedChange={(checked: boolean) => {\n if (context) {\n if (checked) {\n checkboxContext?.onItemCheck(value);\n } else {\n checkboxContext?.onItemUncheck(value);\n }\n }\n if (onCheckedChange) {\n onCheckedChange(checked);\n }\n }}\n >\n <RadixCheckbox.Indicator asChild className=\"hearth-CheckboxIndicator\">\n <TickSmallIcon />\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n <Flex direction=\"column\">\n <Label id={labelId} htmlFor={id} disableUserSelect>\n {label}\n </Label>\n {showHelperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n </label>\n );\n }\n);\n\nCheckboxTile.displayName = componentName;\n"],"mappings":"wRAAA,UAAYA,MAAW,QAEvB,OAAOC,MAAU,OAMjB,OAAS,iBAAAC,MAAqB,uCAI9B,OAAS,YAAYC,MAAqB,WAI1C,IAAMC,EAAgB,eAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAqB,aAChC,CACE,CACE,UAAAC,EACA,GAAIC,EACJ,SAAAC,EACA,MAAAC,EAAQ,KACR,gBAAAC,EACA,MAAAC,EACA,WAAAC,EACA,kBAAmBC,EACnB,GAAGC,CACL,EACAC,IACG,CACH,GAAM,CAAE,GAAAC,EAAI,QAAAC,EAAS,aAAAC,CAAa,EAAIC,EAAO,CAAE,WAAAZ,EAAY,OAAQ,OAAQ,CAAC,EACtEa,EAAUC,EAAiB,EAC3BC,EAAkBC,EAAiB,EACnCC,EAAUF,GAAiB,OAAO,SAASb,CAAK,EAChDgB,EAAqBL,GAAS,mBAC9BM,EAAkBN,EAAUA,EAAQ,kBAAkB,EAAI,GAC1DO,EAAiB,CAACF,GAAsB,CAAC,CAACb,EAC1CgB,EAAY,CAAC,CAACjB,EACpB,OACE,gBAAC,SACC,UAAWkB,EAAK1B,EAAoBG,CAAS,EAC7C,gBAAeE,EAAW,GAAK,QAE/B,gBAACsB,EAAc,KAAd,CACC,IAAKf,EACL,UAAU,sBACV,KAAMO,GAAiB,KACvB,QAASE,EACT,MAAOf,EACN,GAAGK,EACJ,GAAIE,EACJ,SAAUR,EACV,mBAAkBmB,EAAiBT,EAAeQ,EAClD,kBAAiBb,GAAkBe,EAAYX,EAAU,OACzD,gBAAkBO,GAAqB,CACjCJ,IACEI,EACFF,GAAiB,YAAYb,CAAK,EAElCa,GAAiB,cAAcb,CAAK,GAGpCC,GACFA,EAAgBc,CAAO,CAE3B,GAEA,gBAACM,EAAc,UAAd,CAAwB,QAAO,GAAC,UAAU,4BACzC,gBAACC,EAAA,IAAc,CACjB,CACF,EACA,gBAACC,EAAA,CAAK,UAAU,UACd,gBAACC,EAAA,CAAM,GAAIhB,EAAS,QAASD,EAAI,kBAAiB,IAC/CL,CACH,EACCgB,EACC,gBAACO,EAAA,CAAW,GAAIhB,EAAc,kBAAiB,IAC5CN,CACH,EACE,IACN,CACF,CAEJ,CACF,EAEAP,EAAa,YAAcH","names":["React","clsx","TickSmallIcon","RadixCheckbox","componentName","componentClassName","withGlobalPrefix","CheckboxTile","className","providedId","disabled","value","onCheckedChange","label","helperText","ariaLabelledby","props","ref","id","labelId","helperTextId","useIds","context","useFormGroupBase","checkboxContext","useCheckboxGroup","checked","hasGroupHelperText","ariaDescribedby","showHelperText","showLabel","clsx","RadixCheckbox","TickSmallIcon","Flex","Label","HelperText"]}
|
package/dist/chunk-N6WTU5IQ.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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",E=_chunk4H5JT5ORcjs.b.call(void 0, b),F= exports.a =e.forwardRef(({id:h,label:o,helperText:a,className:u,labelFontWeight:x,"aria-labelledby":r,...y},I)=>{let{id:i,labelId:t,helperTextId:d}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:h,prefix:"radio"}),{hasGroupHelperText:N,"aria-describedby":G}=_chunkHSPOCJ5Acjs.c.call(void 0, ),m=!N&&a!==void 0,v=!!o;return e.createElement("div",{className:_clsx2.default.call(void 0, E,u)},e.createElement("div",{className:"hearth-RadioContainer"},e.createElement(_radixui.RadioGroup.Item,{ref:I,...y,id:i,"aria-describedby":m?d:G,"aria-labelledby":r||(o?t:void 0),className:"hearth-RadioItem"},e.createElement(_radixui.RadioGroup.Indicator,{className:"hearth-RadioIndicator"}))),v?e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column",gap:"50"},e.createElement(_chunkGFWH3VRNcjs.a,{id:t,htmlFor:i,disableUserSelect:!0,fontWeight:x,className:"hearth-RadioLabel"},o),m?e.createElement(_chunkK5BEIZDAcjs.a,{id:d,disableUserSelect:!0},a):null):null)});F.displayName=b;exports.a = F;
|
|
2
|
-
//# sourceMappingURL=chunk-N6WTU5IQ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-N6WTU5IQ.cjs","../src/components/Radio/Radio.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","Radio","providedId","label","helperText","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,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAmBC,CAAAA,CACnB,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,GAAM,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAX,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CACtE,CAAE,kBAAA,CAAAY,CAAAA,CAAoB,kBAAA,CAAoBC,CAAgB,CAAA,CAAIC,iCAAAA,CAAiB,CAC/EC,CAAAA,CAAyB,CAACH,CAAAA,EAAsBV,CAAAA,GAAe,KAAA,CAAA,CAC/Dc,CAAAA,CAAY,CAAC,CAACf,CAAAA,CACpB,OACE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWgB,4BAAAA,CAAKpB,CAAoBM,CAAS,CAAA,CAAA,CAChD,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,uBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAACe,mBAAAA,CAAgB,IAAA,CAAhB,CACC,GAAA,CAAKX,CAAAA,CACJ,GAAGD,CAAAA,CACJ,EAAA,CAAIE,CAAAA,CACJ,kBAAA,CAAkBO,CAAAA,CAAiBL,CAAAA,CAAeG,CAAAA,CAClD,iBAAA,CAAiBR,CAAAA,EAAAA,CAAkCJ,CAAAA,CAAQQ,CAAAA,CAAU,KAAA,CAAA,CAAA,CACrE,SAAA,CAAU,kBAAA,CAAA,CAEV,CAAA,CAAA,aAAA,CAACS,mBAAAA,CAAgB,SAAA,CAAhB,CAA0B,SAAA,CAAU,uBAAA,CAAwB,CAC/D,CACF,CAAA,CACCF,CAAAA,CACC,CAAA,CAAA,aAAA,CAACG,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAS,GAAA,CAAI,IAAA,CAAA,CAC3B,CAAA,CAAA,aAAA,CAACC,mBAAAA,CAAA,CACC,EAAA,CAAIX,CAAAA,CACJ,OAAA,CAASD,CAAAA,CACT,iBAAA,CAAiB,CAAA,CAAA,CACjB,UAAA,CAAYJ,CAAAA,CACZ,SAAA,CAAU,mBAAA,CAAA,CAETH,CACH,CAAA,CACCc,CAAAA,CACC,CAAA,CAAA,aAAA,CAACM,mBAAAA,CAAA,CAAW,EAAA,CAAIX,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5CR,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-N6WTU5IQ.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 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\n id={labelId}\n htmlFor={id}\n disableUserSelect\n fontWeight={labelFontWeight}\n className=\"hearth-RadioLabel\"\n >\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"]}
|
package/dist/chunk-NO2QV3A4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as p}from"./chunk-EUCZQAPW.js";import{a as s}from"./chunk-432A6CLH.js";import{a as d}from"./chunk-VBMXLPU5.js";import{a as f}from"./chunk-X3PGQ2KF.js";import{a as c}from"./chunk-XQ5A24NX.js";import{a as m}from"./chunk-RTGGS5XX.js";import{b as a}from"./chunk-4PEMW3UE.js";import*as e from"react";import t from"clsx";import{CloseSmallIcon as N,InfoMediumIcon as P,TickCircleMediumIcon as B,WarningMediumIcon as u}from"@utilitywarehouse/hearth-react-icons";var x="Alert",o=a(x),E=e.forwardRef((y,C)=>{let A={blue:P,green:B,orange:u,red:u},{children:I,className:g,colorScheme:r="blue",onClose:l,text:n,title:i,...h}=m(y,c),v=A[r];return e.createElement("div",{ref:C,className:t(o,g),role:"alert","aria-live":"assertive","aria-atomic":"true","data-colorScheme":r,...h},e.createElement(v,{"aria-hidden":"true"}),e.createElement("div",{className:t(`${o}Content`)},e.createElement(s,{direction:"column"},i?e.createElement(p,null,i):null,n?e.createElement(d,null,n):null),I),l?e.createElement(f,{onClick:l,className:t(`${o}CloseButton`),title:"Close",label:"Close alert"},e.createElement(N,null)):null)});E.displayName=x;export{E as a};
|
|
2
|
-
//# sourceMappingURL=chunk-NO2QV3A4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Alert/Alert.tsx"],"sourcesContent":["import type { ElementRef } from 'react';\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { extractProps } from '../../helpers/extract-props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { AlertProps } from './Alert.props';\nimport {\n CloseSmallIcon,\n InfoMediumIcon,\n TickCircleMediumIcon,\n WarningMediumIcon,\n} from '@utilitywarehouse/hearth-react-icons';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { BodyText } from '../BodyText/BodyText';\nimport { DetailText } from '../DetailText/DetailText';\nimport { Flex } from '../Flex/Flex';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\n\nconst componentName = 'Alert';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype AlertElement = ElementRef<'div'>;\n\nexport const Alert = React.forwardRef<AlertElement, AlertProps>((props, ref) => {\n const icons = {\n blue: InfoMediumIcon,\n green: TickCircleMediumIcon,\n orange: WarningMediumIcon,\n red: WarningMediumIcon,\n };\n const {\n children,\n className,\n colorScheme = 'blue',\n onClose,\n text,\n title,\n ...alertProps\n } = extractProps(props, marginPropDefs);\n\n const AlertIcon = icons[colorScheme];\n\n return (\n <div\n ref={ref}\n className={clsx(componentClassName, className)}\n role=\"alert\" // Adding role for dynamic alerts\n aria-live=\"assertive\" // Making it announced immediately\n aria-atomic=\"true\" // Ensuring the entire alert is read as a whole\n data-colorScheme={colorScheme}\n {...alertProps}\n >\n <AlertIcon aria-hidden=\"true\" />\n <div className={clsx(`${componentClassName}Content`)}>\n <Flex direction=\"column\">\n {title ? <DetailText>{title}</DetailText> : null}\n {text ? <BodyText>{text}</BodyText> : null}\n </Flex>\n {children}\n </div>\n {onClose ? (\n <UnstyledIconButton\n onClick={onClose}\n className={clsx(`${componentClassName}CloseButton`)}\n title=\"Close\"\n label=\"Close alert\"\n >\n <CloseSmallIcon />\n </UnstyledIconButton>\n ) : null}\n </div>\n );\n});\n\nAlert.displayName = componentName;\n"],"mappings":"wRACA,UAAYA,MAAW,QACvB,OAAOC,MAAU,OAIjB,OACE,kBAAAC,EACA,kBAAAC,EACA,wBAAAC,EACA,qBAAAC,MACK,uCAOP,IAAMC,EAAgB,QAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAc,aAAqC,CAACC,EAAOC,IAAQ,CAC9E,IAAMC,EAAQ,CACZ,KAAMC,EACN,MAAOC,EACP,OAAQC,EACR,IAAKA,CACP,EACM,CACJ,SAAAC,EACA,UAAAC,EACA,YAAAC,EAAc,OACd,QAAAC,EACA,KAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EAAIC,EAAab,EAAOc,CAAc,EAEhCC,EAAYb,EAAMM,CAAW,EAEnC,OACE,gBAAC,OACC,IAAKP,EACL,UAAWe,EAAKnB,EAAoBU,CAAS,EAC7C,KAAK,QACL,YAAU,YACV,cAAY,OACZ,mBAAkBC,EACjB,GAAGI,GAEJ,gBAACG,EAAA,CAAU,cAAY,OAAO,EAC9B,gBAAC,OAAI,UAAWC,EAAK,GAAGnB,CAAkB,SAAS,GACjD,gBAACoB,EAAA,CAAK,UAAU,UACbN,EAAQ,gBAACO,EAAA,KAAYP,CAAM,EAAgB,KAC3CD,EAAO,gBAACS,EAAA,KAAUT,CAAK,EAAc,IACxC,EACCJ,CACH,EACCG,EACC,gBAACW,EAAA,CACC,QAASX,EACT,UAAWO,EAAK,GAAGnB,CAAkB,aAAa,EAClD,MAAM,QACN,MAAM,eAEN,gBAACwB,EAAA,IAAe,CAClB,EACE,IACN,CAEJ,CAAC,EAEDtB,EAAM,YAAcH","names":["React","clsx","CloseSmallIcon","InfoMediumIcon","TickCircleMediumIcon","WarningMediumIcon","componentName","componentClassName","withGlobalPrefix","Alert","props","ref","icons","InfoMediumIcon","TickCircleMediumIcon","WarningMediumIcon","children","className","colorScheme","onClose","text","title","alertProps","extractProps","marginPropDefs","AlertIcon","clsx","Flex","DetailText","BodyText","UnstyledIconButton","CloseSmallIcon"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-PH3THV4W.cjs","../src/components/RadioCard/RadioCard.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","RadioCard","props","ref","className","children","providedId","label","ariaLabelledby","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,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAkB,CAAA,CAAA,UAAA,CAA6C,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CAC1F,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CACJ,KAAA,CAAAC,CAAAA,CACA,iBAAA,CAAmBC,CAAAA,CACnB,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaR,CAAOS,mBAAc,CAAA,CAChC,CAAE,EAAA,CAAAC,CAAAA,CAAI,OAAA,CAAAC,CAAQ,CAAA,CAAIC,iCAAAA,CAAS,UAAA,CAAAR,CAAAA,CAAY,MAAA,CAAQ,OAAQ,CAAC,CAAA,CAC9D,OACE,CAAA,CAAA,aAAA,CAACS,mBAAAA,CAAgB,IAAA,CAAhB,CACC,GAAA,CAAKZ,CAAAA,CACL,SAAA,CAAWa,4BAAAA,CAAKjB,CAAoBK,CAAS,CAAA,CAC5C,GAAGK,CAAAA,CACJ,EAAA,CAAIG,CAAAA,CACJ,iBAAA,CAAiBJ,CAAAA,EAAAA,CAAkCD,CAAAA,CAAQM,CAAAA,CAAU,KAAA,CAAA,CAAA,CAAA,CAErE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,uBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,kBAAA,CAAA,CACb,CAAA,CAAA,aAAA,CAACE,mBAAAA,CAAgB,SAAA,CAAhB,CAA0B,SAAA,CAAU,uBAAA,CAAwB,CAC/D,CAAA,CACA,CAAA,CAAA,aAAA,CAACE,mBAAAA,CAAA,CAAM,EAAA,CAAIJ,CAAAA,CAAS,OAAA,CAASD,CAAAA,CAAI,iBAAA,CAAiB,CAAA,CAAA,CAAC,UAAA,CAAW,UAAA,CAAA,CAC3DL,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-PH3THV4W.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 ...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 id={labelId} htmlFor={id} disableUserSelect fontWeight=\"semibold\">\n {label}\n </Label>\n </div>\n {children}\n </RadixRadioGroup.Item>\n );\n});\n\nRadioCard.displayName = componentName;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-PRACO7UD.cjs","../src/components/ButtonBase/ButtonBase.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","ButtonBase","props","ref","colorScheme","inverted","className","disabled","onClick","asChild","children","buttonBaseProps","extractProps","buttonBasePropDefs","marginPropDefs","variant","dataAttributeProps","Component","Slot","clsx"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,uECA5I,mCACF,wEACJ,IAOXA,CAAAA,CAAgB,YAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAmB,CAAA,CAAA,UAAA,CAA+C,CAACC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CAC7F,GAAM,CACJ,WAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaV,CAAOW,mBAAAA,CAAoBC,mBAAc,CAAA,CACpD,CAAE,OAAA,CAAAC,CAAAA,CAAU,OAAQ,CAAA,CAAIb,CAAAA,CAGxBc,CAAAA,CAAqB,CACzB,kBAAA,CAAoBZ,CAAAA,EAAAA,CAFKW,CAAAA,GAAY,UAAA,EAAcA,CAAAA,GAAY,OAAA,CAAU,QAAA,CAAW,MAAA,CAAA,CAGpF,eAAA,CAAiBV,CAAAA,CAAW,EAAA,CAAK,KAAA,CACnC,CAAA,CAEMY,CAAAA,CAAYR,CAAAA,CAAUS,aAAAA,CAAK,IAAA,CAAO,QAAA,CAKxC,OAAIH,CAAAA,GAAY,UAAA,CAEZ,CAAA,CAAA,aAAA,CAACE,CAAAA,CAAA,CACC,GAAA,CAAKd,CAAAA,CACL,eAAA,CAAeI,CAAAA,EAAY,KAAA,CAAA,CAC3B,SAAA,CAAWY,4BAAAA,CAAKpB,CAAoBO,CAAS,CAAA,CAG7C,OAAA,CAASC,CAAAA,CAAW,KAAA,CAAA,CAAYC,CAAAA,CAC/B,GAAGQ,CAAAA,CACH,GAAGL,CAAAA,CAAAA,CAEJ,CAAA,CAAA,aAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,eAAA,CAAgB,CAAA,CAChC,CAAA,CAAA,aAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,cAAA,CAAA,CAAgBD,CAAS,CAC3C,CAAA,CAIF,CAAA,CAAA,aAAA,CAACO,CAAAA,CAAA,CACC,GAAA,CAAKd,CAAAA,CACL,eAAA,CAAeI,CAAAA,EAAY,KAAA,CAAA,CAC3B,SAAA,CAAWY,4BAAAA,CAAKpB,CAAoBO,CAAS,CAAA,CAC7C,OAAA,CAASC,CAAAA,CAAW,KAAA,CAAA,CAAYC,CAAAA,CAC/B,GAAGQ,CAAAA,CACH,GAAGL,CAAAA,CAAAA,CAEHD,CACH,CAEJ,CAAC,CAAA,CAEDT,CAAAA,CAAW,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-PRACO7UD.cjs","sourcesContent":[null,"import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport clsx from 'clsx';\nimport { buttonBasePropDefs, ButtonBaseProps } from './ButtonBase.props';\nimport type { ElementRef } from 'react';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\n\nconst componentName = 'ButtonBase';\nconst componentClassName = withGlobalPrefix(componentName);\n\nexport type ButtonBaseElement = ElementRef<'button'>;\n\nexport const ButtonBase = React.forwardRef<ButtonBaseElement, ButtonBaseProps>((props, ref) => {\n const {\n colorScheme,\n inverted,\n className,\n disabled,\n onClick,\n asChild,\n children,\n ...buttonBaseProps\n } = extractProps(props, buttonBasePropDefs, marginPropDefs);\n const { variant = 'solid' } = props;\n\n const defaultColorScheme = variant === 'emphasis' || variant === 'solid' ? 'yellow' : 'grey';\n const dataAttributeProps = {\n 'data-colorscheme': colorScheme || defaultColorScheme,\n 'data-inverted': inverted ? '' : undefined,\n };\n\n const Component = asChild ? Slot.Root : 'button';\n\n // We're rendering a different component here so that we don't have to apply\n // transitions to box-shadow, which causes re-paints on every frame, heavily\n // impacting performance.\n if (variant === 'emphasis') {\n return (\n <Component\n ref={ref}\n aria-disabled={disabled || undefined}\n className={clsx(componentClassName, className)}\n // as we're using aria-disabled instead of disabled then we need to\n // disable the onClick event\n onClick={disabled ? undefined : onClick}\n {...dataAttributeProps}\n {...buttonBaseProps}\n >\n <span className=\"hearth-shadow\"></span>\n <span className=\"hearth-front\">{children}</span>\n </Component>\n );\n }\n return (\n <Component\n ref={ref}\n aria-disabled={disabled || undefined}\n className={clsx(componentClassName, className)}\n onClick={disabled ? undefined : onClick}\n {...dataAttributeProps}\n {...buttonBaseProps}\n >\n {children}\n </Component>\n );\n});\n\nButtonBase.displayName = componentName;\n"]}
|
package/dist/chunk-RA6OQJHG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/Badge.props.ts"],"sourcesContent":["import { PropDef } from '../../props/prop-def';\nimport { TextTransformProps } from '../../props/text-transform.props';\nimport { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\n\nconst variants = ['solid', 'outline'] as const;\n\nexport const badgePropDefs = {\n variant: { className: 'variant', tokens: variants, responsive: false, default: 'solid' },\n} satisfies {\n variant: PropDef<(typeof variants)[number]>;\n};\n\nexport interface BadgeProps\n extends ComponentPropsWithout<'span', RemovedProps>,\n TextTransformProps {\n /**\n * Sets the badges's visual variant\n * @default solid\n */\n variant?: (typeof variants)[number];\n /**\n * Sets the colour scheme.\n * @default blue\n */\n colorScheme?: 'blue' | 'green' | 'red' | 'orange' | 'grey';\n /**\n * Removes the bottom radius, set when the Badge sits directly above another container\n * @default false\n */\n flatBase?: boolean;\n}\n"],"mappings":"AAIA,IAAMA,EAAW,CAAC,QAAS,SAAS,EAEvBC,EAAgB,CAC3B,QAAS,CAAE,UAAW,UAAW,OAAQD,EAAU,WAAY,GAAO,QAAS,OAAQ,CACzF","names":["variants","badgePropDefs"]}
|
package/dist/chunk-TBOBX6LG.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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 _chunk2HATIMMNcjs = require('./chunk-2HATIMMN.cjs');var _chunkVAVAHKMUcjs = require('./chunk-VAVAHKMU.cjs');var _chunkK5BEIZDAcjs = require('./chunk-K5BEIZDA.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunkIC3LY76Gcjs = require('./chunk-IC3LY76G.cjs');var _chunk6XA5OQRTcjs = require('./chunk-6XA5OQRT.cjs');var _chunkUICIKADYcjs = require('./chunk-UICIKADY.cjs');var _chunk3Q4XWRALcjs = require('./chunk-3Q4XWRAL.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 P="SectionHeader",b=_chunk4H5JT5ORcjs.b.call(void 0, P),y= exports.a =e.forwardRef(({size:I,...T})=>{let{className:u,heading:v,as:E="div",helperText:r,linkText:o,linkHref:t,linkIconPosition:i="right",linkShowIcon:n=!0,linkTarget:N="_self",linkIcon:m=_hearthreacticons.ChevronRightSmallIcon,id:R}=_chunk5DRU6TDWcjs.a.call(void 0, {size:I,...T},_chunk2HATIMMNcjs.a,_chunk6XA5OQRTcjs.a,_chunkUICIKADYcjs.a,_chunk3Q4XWRALcjs.a,_chunkLAVQWQP2cjs.a),{labelId:w,helperTextId:D}=_chunkTMWB3U4Xcjs.a.call(void 0, {providedId:R,prefix:"sectionHeader"}),C=t&&o;return e.createElement("div",{className:_clsx2.default.call(void 0, b,u)},e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column",flexGrow:"1",className:_clsx2.default.call(void 0, "hearth-SectionHeaderTextContent")},e.createElement(_chunkVAVAHKMUcjs.a,{asChild:!0,size:"md",id:w},e.createElement(E,null,v)),r?e.createElement(_chunkK5BEIZDAcjs.a,{id:D,disableUserSelect:!0},r):null),C?e.createElement(_chunkIC3LY76Gcjs.a,{href:t,target:N},n&&i==="left"&&e.createElement(m,null),o,n&&i==="right"&&e.createElement(m,null)):null)});y.displayName=P;exports.a = y;
|
|
2
|
-
//# sourceMappingURL=chunk-TBOBX6LG.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-TBOBX6LG.cjs","../src/components/SectionHeader/SectionHeader.tsx"],"names":["componentName","componentClassName","withGlobalPrefix","SectionHeader","size","props","className","heading","SectionHeaderEl","helperText","linkText","linkHref","linkIconPosition","linkShowIcon","linkTarget","SectionHeaderLinkIcon","ChevronRightSmallIcon","providedId","extractProps","sectionHeaderPropDefs","textAlignPropDefs","textTransformPropDefs","textWrapPropDefs","marginPropDefs","labelId","helperTextId","useIds","showLink","clsx","Flex","Heading","HelperText","Link"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,uECApd,wEAEN,wEAEqB,IAehCA,CAAAA,CAAgB,eAAA,CAChBC,CAAAA,CAAqBC,iCAAAA,CAA8B,CAAA,CAI5CC,CAAAA,aAAsB,CAAA,CAAA,UAAA,CACjC,CAAC,CAAE,IAAA,CAAAC,CAAAA,CAAM,GAAGC,CAAM,CAAA,CAAA,EAAM,CACtB,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,EAAA,CAAIC,CAAAA,CAAkB,KAAA,CACtB,UAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CAAmB,OAAA,CACnB,YAAA,CAAAC,CAAAA,CAAe,CAAA,CAAA,CACf,UAAA,CAAAC,CAAAA,CAAa,OAAA,CACb,QAAA,CAAUC,CAAAA,CAAwBC,uCAAAA,CAClC,EAAA,CAAIC,CACN,CAAA,CAAIC,iCAAAA,CACA,IAAA,CAAAd,CAAAA,CAAM,GAAGC,CAAM,CAAA,CACjBc,mBAAAA,CACAC,mBAAAA,CACAC,mBAAAA,CACAC,mBAAAA,CACAC,mBACF,CAAA,CACM,CAAE,OAAA,CAAAC,CAAAA,CAAS,YAAA,CAAAC,CAAa,CAAA,CAAIC,iCAAAA,CAChC,UAAA,CAAAT,CAAAA,CACA,MAAA,CAAQ,eACV,CAAC,CAAA,CACKU,CAAAA,CAAWhB,CAAAA,EAAYD,CAAAA,CAC7B,OACE,CAAA,CAAA,aAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWkB,4BAAAA,CAAK3B,CAAoBK,CAAS,CAAA,CAAA,CAChD,CAAA,CAAA,aAAA,CAACuB,mBAAAA,CAAA,CAAK,SAAA,CAAU,QAAA,CAAS,QAAA,CAAS,GAAA,CAAI,SAAA,CAAWD,4BAAAA,iCAAsC,CAAA,CAAA,CACrF,CAAA,CAAA,aAAA,CAACE,mBAAAA,CAAA,CAAQ,OAAA,CAAO,CAAA,CAAA,CAAC,IAAA,CAAK,IAAA,CAAK,EAAA,CAAIN,CAAAA,CAAAA,CAC7B,CAAA,CAAA,aAAA,CAAChB,CAAAA,CAAA,IAAA,CAAiBD,CAAQ,CAC5B,CAAA,CACCE,CAAAA,CACC,CAAA,CAAA,aAAA,CAACsB,mBAAAA,CAAA,CAAW,EAAA,CAAIN,CAAAA,CAAc,iBAAA,CAAiB,CAAA,CAAA,CAAA,CAC5ChB,CACH,CAAA,CACE,IACN,CAAA,CACCkB,CAAAA,CACC,CAAA,CAAA,aAAA,CAACK,mBAAAA,CAAA,CAAK,IAAA,CAAMrB,CAAAA,CAAU,MAAA,CAAQG,CAAAA,CAAAA,CAC3BD,CAAAA,EAAgBD,CAAAA,GAAqB,MAAA,EAAU,CAAA,CAAA,aAAA,CAACG,CAAAA,CAAA,IAAsB,CAAA,CACtEL,CAAAA,CACAG,CAAAA,EAAgBD,CAAAA,GAAqB,OAAA,EAAW,CAAA,CAAA,aAAA,CAACG,CAAAA,CAAA,IAAsB,CAC1E,CAAA,CACE,IACN,CAEJ,CACF,CAAA,CAEAZ,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-TBOBX6LG.cjs","sourcesContent":[null,"import * as React from 'react';\n\nimport clsx from 'clsx';\n\nimport { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport type { ElementRef } from 'react';\nimport { extractProps } from '../../helpers/extract-props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { useIds } from '../../hooks/use-ids';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { textAlignPropDefs } from '../../props/text-align.props';\nimport { textTransformPropDefs } from '../../props/text-transform.props';\nimport { textWrapPropDefs } from '../../props/text-wrap.props';\nimport { Flex } from '../Flex/Flex';\nimport { Heading } from '../Heading/Heading';\nimport { HelperText } from '../HelperText/HelperText';\nimport { Link } from '../Link/Link';\nimport { sectionHeaderPropDefs, 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 ({ size, ...props }) => {\n const {\n className,\n heading,\n as: SectionHeaderEl = 'div',\n helperText,\n linkText,\n linkHref,\n linkIconPosition = 'right',\n linkShowIcon = true,\n linkTarget = '_self',\n linkIcon: SectionHeaderLinkIcon = ChevronRightSmallIcon,\n id: providedId,\n } = extractProps(\n { size, ...props },\n sectionHeaderPropDefs,\n textAlignPropDefs,\n textTransformPropDefs,\n textWrapPropDefs,\n marginPropDefs\n );\n const { labelId, helperTextId } = useIds({\n providedId,\n prefix: 'sectionHeader',\n });\n const showLink = linkHref && linkText;\n return (\n <div className={clsx(componentClassName, className)}>\n <Flex direction=\"column\" flexGrow=\"1\" className={clsx('hearth-SectionHeaderTextContent')}>\n <Heading asChild size=\"md\" id={labelId}>\n <SectionHeaderEl>{heading}</SectionHeaderEl>\n </Heading>\n {helperText ? (\n <HelperText id={helperTextId} disableUserSelect>\n {helperText}\n </HelperText>\n ) : null}\n </Flex>\n {showLink ? (\n <Link href={linkHref} target={linkTarget}>\n {linkShowIcon && linkIconPosition === 'left' && <SectionHeaderLinkIcon />}\n {linkText}\n {linkShowIcon && linkIconPosition === 'right' && <SectionHeaderLinkIcon />}\n </Link>\n ) : null}\n </div>\n );\n }\n);\n\nSectionHeader.displayName = componentName;\n"]}
|
package/dist/chunk-TKOS3BOP.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as c}from"./chunk-UI5CTQSR.js";import{a as l}from"./chunk-432A6CLH.js";import{a as f}from"./chunk-HTXCYMDE.js";import{a as s}from"./chunk-BXITMQY6.js";import{a as i}from"./chunk-V6DSC6VC.js";import{a as p}from"./chunk-WOH4H47Z.js";import{a}from"./chunk-XQ5A24NX.js";import{a as t}from"./chunk-EUTKQ2DV.js";import{a as m}from"./chunk-RTGGS5XX.js";import{b as e}from"./chunk-4PEMW3UE.js";import{a as o}from"./chunk-TLHGRJDQ.js";import*as r from"react";import N from"clsx";var d="Card",R=e(d),E=r.forwardRef((n,P)=>{let{className:x,as:C="div",children:D,colorScheme:h="white",...g}=m(n,f,i,c,a,t,p,s);return r.createElement(l,{ref:P,asChild:!0,className:N(R,x),"data-colorscheme":o(h),...g},r.createElement(C,null,D))});E.displayName=d;export{E as a};
|
|
2
|
-
//# sourceMappingURL=chunk-TKOS3BOP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Card/Card.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ElementRef } from 'react';\n\nimport clsx from 'clsx';\n\nimport { cardPropDefs, CardProps } from './Card.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { sizePropDefs } from '../../props/size.props';\nimport { gridItemPropDefs } from '../../props/grid-item.props';\nimport { flexItemPropDefs } from '../../props/flex-item.props';\nimport { Flex } from '../Flex/Flex';\nimport { flexPropDefs, FlexProps } from '../Flex/Flex.props';\nimport { kebabCase } from '../../helpers/kebab-case';\nimport { gapPropDefs } from '../../props/gap.props';\n\nconst componentName = 'Card';\nconst componentClassName = withGlobalPrefix(componentName);\n\ntype CardElement = ElementRef<'div'>;\n\nexport const Card = React.forwardRef<CardElement, CardProps>((props, ref) => {\n const {\n className,\n as: Tag = 'div',\n children,\n colorScheme = 'white',\n ...cardProps\n } = extractProps(\n props,\n flexPropDefs,\n gapPropDefs,\n cardPropDefs,\n marginPropDefs,\n sizePropDefs,\n gridItemPropDefs,\n flexItemPropDefs\n );\n\n return (\n <Flex\n ref={ref}\n asChild\n className={clsx(componentClassName, className)}\n data-colorscheme={kebabCase(colorScheme)}\n {...(cardProps as FlexProps)}\n >\n <Tag>{children}</Tag>\n </Flex>\n );\n});\n\nCard.displayName = componentName;\n"],"mappings":"mbAAA,UAAYA,MAAW,QAGvB,OAAOC,MAAU,OAcjB,IAAMC,EAAgB,OAChBC,EAAqBC,EAAiBF,CAAa,EAI5CG,EAAa,aAAmC,CAACC,EAAOC,IAAQ,CAC3E,GAAM,CACJ,UAAAC,EACA,GAAIC,EAAM,MACV,SAAAC,EACA,YAAAC,EAAc,QACd,GAAGC,CACL,EAAIC,EACFP,EACAQ,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,CACF,EAEA,OACE,gBAACC,EAAA,CACC,IAAKd,EACL,QAAO,GACP,UAAWe,EAAKnB,EAAoBK,CAAS,EAC7C,mBAAkBe,EAAUZ,CAAW,EACtC,GAAIC,GAEL,gBAACH,EAAA,KAAKC,CAAS,CACjB,CAEJ,CAAC,EAEDL,EAAK,YAAcH","names":["React","clsx","componentName","componentClassName","withGlobalPrefix","Card","props","ref","className","Tag","children","colorScheme","cardProps","extractProps","flexPropDefs","gapPropDefs","cardPropDefs","marginPropDefs","sizePropDefs","gridItemPropDefs","flexItemPropDefs","Flex","clsx","kebabCase"]}
|
package/dist/chunk-YNORYVOI.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
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 _chunkXZ2XMTZOcjs = require('./chunk-XZ2XMTZO.cjs');var _chunkLVPYDLKGcjs = require('./chunk-LVPYDLKG.cjs');var _chunk7TQMVZ2Rcjs = require('./chunk-7TQMVZ2R.cjs');var _chunkPZSLW42Xcjs = require('./chunk-PZSLW42X.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 _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var x="Alert",o=_chunk4H5JT5ORcjs.b.call(void 0, x),E= exports.a =e.forwardRef((y,C)=>{let A={blue:_hearthreacticons.InfoMediumIcon,green:_hearthreacticons.TickCircleMediumIcon,orange:_hearthreacticons.WarningMediumIcon,red:_hearthreacticons.WarningMediumIcon},{children:I,className:g,colorScheme:r="blue",onClose:l,text:n,title:i,...h}=_chunk5DRU6TDWcjs.a.call(void 0, y,_chunkLAVQWQP2cjs.a),v=A[r];return e.createElement("div",{ref:C,className:_clsx2.default.call(void 0, o,g),role:"alert","aria-live":"assertive","aria-atomic":"true","data-colorScheme":r,...h},e.createElement(v,{"aria-hidden":"true"}),e.createElement("div",{className:_clsx2.default.call(void 0, `${o}Content`)},e.createElement(_chunkLVPYDLKGcjs.a,{direction:"column"},i?e.createElement(_chunkXZ2XMTZOcjs.a,null,i):null,n?e.createElement(_chunk7TQMVZ2Rcjs.a,null,n):null),I),l?e.createElement(_chunkPZSLW42Xcjs.a,{onClick:l,className:_clsx2.default.call(void 0, `${o}CloseButton`),title:"Close",label:"Close alert"},e.createElement(_hearthreacticons.CloseSmallIcon,null)):null)});E.displayName=x;exports.a = E;
|
|
2
|
-
//# sourceMappingURL=chunk-YNORYVOI.cjs.map
|
package/dist/chunk-ZZCBHLRO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/DetailText/DetailText.props.ts"],"sourcesContent":["import { MarginProps } from '../../props/margin.props';\nimport { PropDef } from '../../props/prop-def';\nimport { TextAlignProps } from '../../props/text-align.props';\nimport { TextTransformProps } from '../../props/text-transform.props';\nimport { TextWrapProps } from '../../props/text-wrap.props';\nimport type { ComponentPropsWithout, RemovedProps } from '../../types/component-props';\nimport type { Responsive } from '../../types/responsive';\n\nconst sizes = ['sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl'] as const;\nconst colorValues = ['text', 'valid', 'invalid'] as const;\n\nexport const detailTextPropDefs = {\n size: { className: 'size', tokens: sizes, responsive: true, default: 'md' },\n color: { className: 'text-color', tokens: colorValues, responsive: false, default: 'text' },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n color: PropDef<(typeof colorValues)[number]>;\n};\n\ninterface CommonDetailTextProps\n extends TextAlignProps,\n TextTransformProps,\n TextWrapProps,\n MarginProps {\n /**\n * @default span\n */\n as?: 'p' | 'div' | 'span';\n /** Change the default rendered element for the one passed as a child, merging their props and behavior. */\n asChild?: boolean;\n /**\n * Set the text size styles.\n * @default md\n */\n size?: Responsive<(typeof sizes)[number]>;\n /**\n * Set the text color\n * @default text\n */\n color?: Responsive<(typeof colorValues)[number]>;\n /** Inverts the component colours, for use on darker surface colours. */\n inverted?: boolean;\n}\ntype DetailTextDivProps = { as: 'div' } & ComponentPropsWithout<'div', RemovedProps>;\ntype DetailTextSpanProps = { as: 'span' } & ComponentPropsWithout<'span', RemovedProps>;\ntype DetailTextPProps = { as?: 'p' } & ComponentPropsWithout<'p', RemovedProps>;\nexport type DetailTextProps = CommonDetailTextProps &\n (DetailTextSpanProps | DetailTextDivProps | DetailTextPProps);\n"],"mappings":"AAQA,IAAMA,EAAQ,CAAC,KAAM,KAAM,KAAM,KAAM,MAAO,MAAO,KAAK,EACpDC,EAAc,CAAC,OAAQ,QAAS,SAAS,EAElCC,EAAqB,CAChC,KAAM,CAAE,UAAW,OAAQ,OAAQF,EAAO,WAAY,GAAM,QAAS,IAAK,EAC1E,MAAO,CAAE,UAAW,aAAc,OAAQC,EAAa,WAAY,GAAO,QAAS,MAAO,CAC5F","names":["sizes","colorValues","detailTextPropDefs"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|