@utilitywarehouse/hearth-react 0.27.0 → 0.27.1
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-AIIE6JMY.cjs → chunk-2KARZLZU.cjs} +2 -2
- package/dist/{chunk-AIIE6JMY.cjs.map → chunk-2KARZLZU.cjs.map} +1 -1
- package/dist/{chunk-DE5BKSI3.cjs → chunk-36MSNHIL.cjs} +2 -2
- package/dist/{chunk-DE5BKSI3.cjs.map → chunk-36MSNHIL.cjs.map} +1 -1
- package/dist/{chunk-ZH7SR563.js → chunk-44ZX2JJW.js} +2 -2
- package/dist/{chunk-UVU22AEF.cjs → chunk-52B6XMQI.cjs} +2 -2
- package/dist/{chunk-UVU22AEF.cjs.map → chunk-52B6XMQI.cjs.map} +1 -1
- package/dist/{chunk-QGNDSOQC.js → chunk-6N6MNMGG.js} +2 -2
- package/dist/{chunk-G34BBZ7U.cjs → chunk-APW7C7H2.cjs} +2 -2
- package/dist/{chunk-G34BBZ7U.cjs.map → chunk-APW7C7H2.cjs.map} +1 -1
- package/dist/{chunk-NDN7PJ42.js → chunk-BZAXRDZQ.js} +2 -2
- package/dist/{chunk-EHLQIYCL.cjs → chunk-CK7ZJEBE.cjs} +2 -2
- package/dist/{chunk-EHLQIYCL.cjs.map → chunk-CK7ZJEBE.cjs.map} +1 -1
- package/dist/{chunk-WOOG43NY.cjs → chunk-FD576BTF.cjs} +2 -2
- package/dist/{chunk-WOOG43NY.cjs.map → chunk-FD576BTF.cjs.map} +1 -1
- package/dist/{chunk-GWI5OETU.js → chunk-FIJEAHCA.js} +2 -2
- package/dist/{chunk-WM3AYPCW.cjs → chunk-FTRSH2J7.cjs} +2 -2
- package/dist/{chunk-WM3AYPCW.cjs.map → chunk-FTRSH2J7.cjs.map} +1 -1
- package/dist/{chunk-AD65S3KX.cjs → chunk-G5XZ7UTK.cjs} +2 -2
- package/dist/{chunk-AD65S3KX.cjs.map → chunk-G5XZ7UTK.cjs.map} +1 -1
- package/dist/{chunk-4OOAH426.js → chunk-JG4RZISS.js} +2 -2
- package/dist/{chunk-THHRR6OT.cjs → chunk-K2BVT625.cjs} +2 -2
- package/dist/{chunk-THHRR6OT.cjs.map → chunk-K2BVT625.cjs.map} +1 -1
- package/dist/{chunk-PWHZMMV6.js → chunk-KB7GFWRG.js} +2 -2
- package/dist/{chunk-KTCSP4YV.js → chunk-LE4NJACS.js} +2 -2
- package/dist/{chunk-YYSSHR6Z.js → chunk-LLW642QV.js} +2 -2
- package/dist/{chunk-JLYHGQKS.cjs → chunk-LSBGG7BC.cjs} +2 -2
- package/dist/{chunk-JLYHGQKS.cjs.map → chunk-LSBGG7BC.cjs.map} +1 -1
- package/dist/{chunk-OWG2R6MC.js → chunk-M5G5UVM3.js} +2 -2
- package/dist/{chunk-3QZDSSCV.cjs → chunk-MIAH2FDS.cjs} +2 -2
- package/dist/{chunk-3QZDSSCV.cjs.map → chunk-MIAH2FDS.cjs.map} +1 -1
- package/dist/{chunk-L2ILLMXB.cjs → chunk-NEXY7YBO.cjs} +2 -2
- package/dist/{chunk-L2ILLMXB.cjs.map → chunk-NEXY7YBO.cjs.map} +1 -1
- package/dist/{chunk-AHL7WYJC.cjs → chunk-NM2EQJVO.cjs} +2 -2
- package/dist/{chunk-AHL7WYJC.cjs.map → chunk-NM2EQJVO.cjs.map} +1 -1
- package/dist/{chunk-JLRZA7PB.cjs → chunk-PCKLZDAU.cjs} +2 -2
- package/dist/{chunk-JLRZA7PB.cjs.map → chunk-PCKLZDAU.cjs.map} +1 -1
- package/dist/{chunk-FNYP4XEH.cjs → chunk-PF45VCCU.cjs} +2 -2
- package/dist/{chunk-FNYP4XEH.cjs.map → chunk-PF45VCCU.cjs.map} +1 -1
- package/dist/{chunk-SBI42FOX.js → chunk-PRTN3N7S.js} +2 -2
- package/dist/{chunk-5TCF6LEE.cjs → chunk-QECLLZBZ.cjs} +2 -2
- package/dist/{chunk-5TCF6LEE.cjs.map → chunk-QECLLZBZ.cjs.map} +1 -1
- package/dist/{chunk-CCTJWF7V.js → chunk-R5RMRTUC.js} +2 -2
- package/dist/{chunk-LCLERW5C.js → chunk-SMGYDONN.js} +2 -2
- package/dist/{chunk-JFLOPIA6.js → chunk-TERKAM4U.js} +2 -2
- package/dist/{chunk-JFLOPIA6.js.map → chunk-TERKAM4U.js.map} +1 -1
- package/dist/{chunk-W3LBXFMS.cjs → chunk-U24YD3QA.cjs} +2 -2
- package/dist/{chunk-W3LBXFMS.cjs.map → chunk-U24YD3QA.cjs.map} +1 -1
- package/dist/{chunk-RDNYVYDY.js → chunk-UMDK7PJZ.js} +2 -2
- package/dist/{chunk-HDLPHJ7F.js → chunk-VIEURU2B.js} +2 -2
- package/dist/{chunk-HQKD7WEM.js → chunk-WJYMMYTV.js} +2 -2
- package/dist/{chunk-USXIE43L.cjs → chunk-WVTMK6FI.cjs} +2 -2
- package/dist/{chunk-USXIE43L.cjs.map → chunk-WVTMK6FI.cjs.map} +1 -1
- package/dist/{chunk-OUYQX7BT.cjs → chunk-X2M7WVUC.cjs} +2 -2
- package/dist/{chunk-OUYQX7BT.cjs.map → chunk-X2M7WVUC.cjs.map} +1 -1
- package/dist/{chunk-QXKP4H2B.js → chunk-XIJYJ2BI.js} +2 -2
- package/dist/{chunk-QMYHFYU3.js → chunk-XW2L4M6A.js} +2 -2
- package/dist/{chunk-SLMGGROC.js → chunk-YILRLZ3W.js} +2 -2
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/AlertIconButton.cjs +1 -1
- package/dist/components/Alert/AlertIconButton.js +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/CardAccordion/CardAccordion.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordion.js +1 -1
- package/dist/components/CardAccordion/CardAccordionButton.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordionButton.js +1 -1
- package/dist/components/CardAccordion/CardAccordionItem.cjs +1 -1
- package/dist/components/CardAccordion/CardAccordionItem.js +1 -1
- package/dist/components/Combobox/Combobox.cjs +1 -1
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DatePicker/DatePickerHeader.cjs +1 -1
- package/dist/components/DatePicker/DatePickerHeader.js +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Pagination/Pagination.cjs +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/SearchInput/SearchInput.cjs +1 -1
- package/dist/components/SearchInput/SearchInput.js +1 -1
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Table/TablePagination.cjs +1 -1
- package/dist/components/Table/TablePagination.js +1 -1
- package/dist/components/Tabs/TabsList.cjs +1 -1
- package/dist/components/Tabs/TabsList.js +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/UnstyledIconButton/UnstyledIconButton.cjs +1 -1
- package/dist/components/UnstyledIconButton/UnstyledIconButton.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 +1 -1
- package/styles.css +1 -1
- /package/dist/{chunk-ZH7SR563.js.map → chunk-44ZX2JJW.js.map} +0 -0
- /package/dist/{chunk-QGNDSOQC.js.map → chunk-6N6MNMGG.js.map} +0 -0
- /package/dist/{chunk-NDN7PJ42.js.map → chunk-BZAXRDZQ.js.map} +0 -0
- /package/dist/{chunk-GWI5OETU.js.map → chunk-FIJEAHCA.js.map} +0 -0
- /package/dist/{chunk-4OOAH426.js.map → chunk-JG4RZISS.js.map} +0 -0
- /package/dist/{chunk-PWHZMMV6.js.map → chunk-KB7GFWRG.js.map} +0 -0
- /package/dist/{chunk-KTCSP4YV.js.map → chunk-LE4NJACS.js.map} +0 -0
- /package/dist/{chunk-YYSSHR6Z.js.map → chunk-LLW642QV.js.map} +0 -0
- /package/dist/{chunk-OWG2R6MC.js.map → chunk-M5G5UVM3.js.map} +0 -0
- /package/dist/{chunk-SBI42FOX.js.map → chunk-PRTN3N7S.js.map} +0 -0
- /package/dist/{chunk-CCTJWF7V.js.map → chunk-R5RMRTUC.js.map} +0 -0
- /package/dist/{chunk-LCLERW5C.js.map → chunk-SMGYDONN.js.map} +0 -0
- /package/dist/{chunk-RDNYVYDY.js.map → chunk-UMDK7PJZ.js.map} +0 -0
- /package/dist/{chunk-HDLPHJ7F.js.map → chunk-VIEURU2B.js.map} +0 -0
- /package/dist/{chunk-HQKD7WEM.js.map → chunk-WJYMMYTV.js.map} +0 -0
- /package/dist/{chunk-QXKP4H2B.js.map → chunk-XIJYJ2BI.js.map} +0 -0
- /package/dist/{chunk-QMYHFYU3.js.map → chunk-XW2L4M6A.js.map} +0 -0
- /package/dist/{chunk-SLMGGROC.js.map → chunk-YILRLZ3W.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFNQSPLEHcjs = require('./chunk-FNQSPLEH.cjs');var _chunkGMGCV7XTcjs = require('./chunk-GMGCV7XT.cjs');var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFNQSPLEHcjs = require('./chunk-FNQSPLEH.cjs');var _chunkGMGCV7XTcjs = require('./chunk-GMGCV7XT.cjs');var _chunkMIAH2FDScjs = require('./chunk-MIAH2FDS.cjs');var _chunkTZUHNZFDcjs = require('./chunk-TZUHNZFD.cjs');var _chunkXAC5V5L2cjs = require('./chunk-XAC5V5L2.cjs');var _chunk2PMYKOVOcjs = require('./chunk-2PMYKOVO.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _radixui = require('radix-ui');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var u="IconButton",z=_chunk7LZI6HLWcjs.b.call(void 0, u),E= exports.a =_react.forwardRef.call(void 0, (t,B)=>{let{className:d,label:P,disabled:S,loading:n,children:r,asChild:e,...b}=_chunk2PMYKOVOcjs.a.call(void 0, t,_chunkFNQSPLEHcjs.a),C=_chunkTZUHNZFDcjs.a.call(void 0, t.size||"md",{md:"sm",sm:"xs"}),N=e?_radixui.Slot.Root:"button";return _jsxruntime.jsx.call(void 0, _chunkGMGCV7XTcjs.a,{ref:B,className:_chunkGVVJQBRKcjs.a.call(void 0, z,d),"aria-label":P,disabled:S||n,asChild:!0,...b,children:_jsxruntime.jsx.call(void 0, N,{children:n?_chunkXAC5V5L2cjs.a.call(void 0, {asChild:e,children:r},()=>_jsxruntime.jsx.call(void 0, _chunkMIAH2FDScjs.a,{size:C,currentColor:!0})):r})})});E.displayName=u;exports.a = E;
|
|
2
|
+
//# sourceMappingURL=chunk-2KARZLZU.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-2KARZLZU.cjs","../src/components/IconButton/IconButton.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","IconButton","forwardRef","props","ref","className","label","disabled","loading","children","asChild","iconButtonProps","extractProps","iconButtonPropDefs","spinnerSize","getResponsiveTranslation","Component","Slot","jsx","ButtonBase","cn","getSubtree","Spinner"],"mappings":"AAAA,iIAAwC,wDAAoC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,m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th/packages/react/dist/chunk-2KARZLZU.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport { iconButtonPropDefs } from './IconButton.props';\nimport type { IconButtonProps } from './IconButton.props';\nimport { ButtonBase, ButtonBaseElement } from '../ButtonBase/ButtonBase';\nimport { extractProps } from '../../helpers/extract-props';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { Spinner } from '../Spinner/Spinner';\nimport type { SpinnerProps } from '../Spinner/Spinner.props';\nimport { Slot } from 'radix-ui';\nimport { getSubtree } from '../../helpers/get-subtree';\nimport { getResponsiveTranslation } from '../../helpers/get-responsive-translation';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'IconButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const IconButton = forwardRef<ButtonBaseElement, IconButtonProps>((props, ref) => {\n const { className, label, disabled, loading, children, asChild, ...iconButtonProps } =\n extractProps(props, iconButtonPropDefs);\n\n const spinnerSize = getResponsiveTranslation(props.size || 'md', { md: 'sm', sm: 'xs' });\n const Component = asChild ? Slot.Root : 'button';\n\n return (\n <ButtonBase\n ref={ref}\n className={cn(componentClassName, className)}\n aria-label={label}\n disabled={disabled || loading}\n asChild\n {...iconButtonProps}\n >\n <Component>\n {loading\n ? getSubtree({ asChild, children }, () => (\n <Spinner size={spinnerSize as SpinnerProps['size']} currentColor />\n ))\n : children}\n </Component>\n </ButtonBase>\n );\n});\n\nIconButton.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkI4RZNGF6cjs = require('./chunk-I4RZNGF6.cjs');var _chunk3BDGBDPOcjs = require('./chunk-3BDGBDPO.cjs');var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkI4RZNGF6cjs = require('./chunk-I4RZNGF6.cjs');var _chunk3BDGBDPOcjs = require('./chunk-3BDGBDPO.cjs');var _chunk52B6XMQIcjs = require('./chunk-52B6XMQI.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _react = require('react');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _useMergedRefs = require('@base-ui/utils/useMergedRefs');var _jsxruntime = require('react/jsx-runtime');var I="PasswordInput",V=_chunk7LZI6HLWcjs.b.call(void 0, I),L= exports.a =_react.forwardRef.call(void 0, ({className:w,disabled:r,id:E,...v},M)=>{let e=_react.useRef.call(void 0, null),P=_useMergedRefs.useMergedRefs.call(void 0, M,e),[s,l]=_react.useState.call(void 0, !1),[i,a]=_react.useState.call(void 0, !1),S=_react.useCallback.call(void 0, ()=>{let t=!s,n=!i;l(t),a(n)},[s,i]);_react.useEffect.call(void 0, ()=>{let t=null;e&&typeof e=="object"&&e.current&&(t=e.current);let n=()=>{_optionalChain([t, 'optionalAccess', _ => _.type])&&(t.type="password",l(!1))};return t&&t.form!==null&&t.form.addEventListener("submit",n),()=>{_optionalChain([t, 'optionalAccess', _2 => _2.form])&&t.form.removeEventListener("submit",n)}},[e]);let h=`Your password is ${s?"shown":"hidden"}!`;_react.useEffect.call(void 0, ()=>{setTimeout(()=>{a(!1)},1500)},[i]);let{id:g}=_chunkITZEACMWcjs.a.call(void 0, {providedId:E,prefix:"password-input"});return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkI4RZNGF6cjs.a,{ref:P,className:_chunkGVVJQBRKcjs.a.call(void 0, V,w),type:s?"text":"password",disabled:r,id:g,...v,children:_jsxruntime.jsx.call(void 0, _chunk3BDGBDPOcjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{type:"button",label:"toggle password visibility",onClick:S,disabled:r,"aria-pressed":s,children:s?_jsxruntime.jsx.call(void 0, _hearthreacticons.EyeSmallIcon,{}):_jsxruntime.jsx.call(void 0, _hearthreacticons.EyeOffSmallIcon,{})})})}),_jsxruntime.jsx.call(void 0, "div",{"data-visually-hidden":!0,"aria-live":"assertive",role:"status",children:i?h:""})]})});L.displayName=I;exports.a = L;
|
|
2
|
+
//# sourceMappingURL=chunk-36MSNHIL.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-36MSNHIL.cjs","../src/components/PasswordInput/PasswordInput.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","PasswordInput","forwardRef","className","disabled","providedId","props","forwardedRef","internalRef","useRef","inputRef","useMergedRefs","visible","setVisible","useState","showVisibilityMessage","setShowVisibilityMessage","handleVisibility","useCallback","newVisibilityState","newVisibilityMessageState","useEffect","currentElement","handleSubmit","visibilityMessage","id","useIds","jsxs","Fragment","jsx","TextInput","cn","InputSlot","UnstyledIconButton","Ey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,CAEb,QAAA,CAAAA,CAAAA,CAAUiB,6BAAAA,8BAACK,CAAA,CAAA,CAAa,CAAA,CAAKL,6BAAAA,iCAACM,CAAA,CAAA,CAAgB,CAAA,CACjD,CAAA,CACF,CAAA,CACF,CAAA,CACAN,6BAAAA,KAAC,CAAA,CAAI,sBAAA,CAAoB,CAAA,CAAA,CAAC,WAAA,CAAU,WAAA,CAAY,IAAA,CAAK,QAAA,CAClD,QAAA,CAAAd,CAAAA,CAAwBS,CAAAA,CAAoB,EAAA,CAC/C,CAAA,CAAA,CACF,CAEJ,CACF,CAAA,CAEAvB,CAAAA,CAAc,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-36MSNHIL.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { cn } from '../../helpers/cn';\nimport { forwardRef, useRef, useState, useCallback, useEffect } from 'react';\nimport type { RefObject } from 'react';\nimport type { PasswordInputProps } from './PasswordInput.props';\nimport { TextInput } from '../TextInput/TextInput';\nimport { InputSlot } from '../InputSlot/InputSlot';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { EyeOffSmallIcon, EyeSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { useIds } from '../../hooks/use-ids';\nimport type { InputBaseElement } from '../InputBase/InputBase';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\n\nconst COMPONENT_NAME = 'PasswordInput';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const PasswordInput = forwardRef<InputBaseElement, PasswordInputProps>(\n ({ className, disabled, id: providedId, ...props }, forwardedRef) => {\n const internalRef = useRef<HTMLInputElement | null>(null);\n const inputRef = useMergedRefs(forwardedRef, internalRef);\n\n const [visible, setVisible] = useState(false);\n const [showVisibilityMessage, setShowVisibilityMessage] = useState(false);\n\n const handleVisibility = useCallback(() => {\n const newVisibilityState = !visible;\n const newVisibilityMessageState = !showVisibilityMessage;\n setVisible(newVisibilityState);\n setShowVisibilityMessage(newVisibilityMessageState);\n }, [visible, showVisibilityMessage]);\n\n // If the PasswordInput is inside a form we should switch the input type\n // back to password when its parent form is submitted\n useEffect(() => {\n // Get the ref value and ensure proper typing\n let currentElement: HTMLInputElement | null = null;\n if (internalRef && typeof internalRef === 'object' && internalRef.current) {\n // Type assertion to ensure TypeScript understands this is a valid ref object\n const refObject = internalRef as RefObject<HTMLInputElement>;\n currentElement = refObject.current;\n }\n\n const handleSubmit = () => {\n if (currentElement?.type) {\n currentElement.type = 'password';\n setVisible(false);\n }\n };\n\n if (currentElement && currentElement.form !== null) {\n currentElement.form.addEventListener('submit', handleSubmit);\n }\n return () => {\n if (currentElement?.form) {\n currentElement.form.removeEventListener('submit', handleSubmit);\n }\n };\n }, [internalRef]);\n\n const visibilityMessage = `Your password is ${visible ? 'shown' : 'hidden'}!`;\n\n useEffect(() => {\n setTimeout(() => {\n setShowVisibilityMessage(false);\n }, 1500);\n }, [showVisibilityMessage]);\n\n const { id } = useIds({ providedId, prefix: 'password-input' });\n\n return (\n <>\n <TextInput\n ref={inputRef}\n className={cn(componentClassName, className)}\n type={visible ? 'text' : 'password'}\n disabled={disabled}\n id={id}\n {...props}\n >\n <InputSlot placement=\"suffix\">\n <UnstyledIconButton\n type=\"button\"\n label=\"toggle password visibility\"\n onClick={handleVisibility}\n disabled={disabled}\n aria-pressed={visible}\n >\n {visible ? <EyeSmallIcon /> : <EyeOffSmallIcon />}\n </UnstyledIconButton>\n </InputSlot>\n </TextInput>\n <div data-visually-hidden aria-live=\"assertive\" role=\"status\">\n {showVisibilityMessage ? visibilityMessage : ''}\n </div>\n </>\n );\n }\n);\n\nPasswordInput.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as b}from"./chunk-LE4NJACS.js";import{a as u}from"./chunk-MSHCGZ4G.js";import{b as v}from"./chunk-TXDSZ3MR.js";import{forwardRef as B,useCallback as l,useLayoutEffect as P,useRef as T,useState as f}from"react";import{Tabs as k}from"radix-ui";import{ChevronLeftSmallIcon as A,ChevronRightSmallIcon as H}from"@utilitywarehouse/hearth-react-icons";import{jsx as n,jsxs as S}from"react/jsx-runtime";var g="TabsList",s=v(g),U=B(({className:I,children:R,...y},C)=>{let m=T(null),c=T(null),[E,N]=f(0),[W,w]=f(0),[h,M]=f(!1),[p,O]=f(!1),a=l(()=>{let e=m.current;if(!e)return;let t=e.querySelector("."+v('Tab[data-state="active"]'));t&&(N(t.offsetLeft),w(t.offsetWidth))},[]),i=l(()=>{let e=c.current;if(!e)return;let t=e.scrollWidth>e.clientWidth+1,r=t&&e.scrollLeft>0,o=t&&e.scrollLeft+e.clientWidth<e.scrollWidth-1;M(r),O(o)},[]);P(()=>{a(),i();let e=m.current,t=c.current;if(!e&&!t)return;let r=new ResizeObserver(()=>{a(),i()});e&&r.observe(e),t&&r.observe(t);let o=new MutationObserver(()=>{a(),i()});e&&o.observe(e,{subtree:!0,attributes:!0,attributeFilter:["data-state"],childList:!0});let L=()=>i();return t?.addEventListener("scroll",L,{passive:!0}),()=>{r.disconnect(),o.disconnect(),t?.removeEventListener("scroll",L)}},[a,i]);let d=l(e=>{let t=c.current;if(!t)return;let r=t.clientWidth*.6,o=Math.max(0,Math.min(t.scrollLeft+e*r,t.scrollWidth-t.clientWidth));t.scrollTo({left:o,behavior:"smooth"})},[]),$=l(()=>d(-1),[d]),x=l(()=>d(1),[d]);return S(k.List,{ref:C,className:u(s,I),...y,children:[h?n("div",{className:`${s}ScrollButtonLeft`,"aria-hidden":!0,children:n(b,{label:"scroll left",tabIndex:-1,onClick:$,children:n(A,{})})}):null,n("div",{className:u(`${s}Scroll`),"data-scroll-left":h?"":void 0,"data-scroll-right":p?"":void 0,ref:c,children:S("div",{className:`${s}Container`,ref:m,children:[R,n("div",{className:`${s}Indicator`,style:{transform:`translateX(${E}px)`,width:`${W}px`}})]})}),p?n("div",{className:`${s}ScrollButtonRight`,"aria-hidden":!0,children:n(b,{label:"scroll right",tabIndex:-1,onClick:x,children:n(H,{})})}):null]})});U.displayName=g;export{U as a};
|
|
2
|
+
//# sourceMappingURL=chunk-44ZX2JJW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4A44P3G7cjs = require('./chunk-4A44P3G7.cjs');var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4A44P3G7cjs = require('./chunk-4A44P3G7.cjs');var _chunkMIAH2FDScjs = require('./chunk-MIAH2FDS.cjs');var _chunkTZUHNZFDcjs = require('./chunk-TZUHNZFD.cjs');var _chunkXAC5V5L2cjs = require('./chunk-XAC5V5L2.cjs');var _chunk2PMYKOVOcjs = require('./chunk-2PMYKOVO.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _react = require('react');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var f="UnstyledIconButton",R=_chunk7LZI6HLWcjs.b.call(void 0, f),z= exports.a =_react.forwardRef.call(void 0, (o,u)=>{let{className:y,children:n,label:C,disabled:t,inverted:B,loading:e,onClick:I,asChild:r,...P}=_chunk2PMYKOVOcjs.a.call(void 0, o,_chunk4A44P3G7cjs.a),b=_chunkTZUHNZFDcjs.a.call(void 0, o.size||"md",{md:"sm",sm:"xs"}),S=r?_radixui.Slot.Root:"button";return _jsxruntime.jsx.call(void 0, S,{ref:u,className:_chunkGVVJQBRKcjs.a.call(void 0, R,y),"aria-label":C,"aria-disabled":t||e,"data-inverted":B?"":void 0,onClick:t?void 0:I,...P,children:e?_chunkXAC5V5L2cjs.a.call(void 0, {asChild:r,children:n},()=>_jsxruntime.jsx.call(void 0, _chunkMIAH2FDScjs.a,{size:b,currentColor:!0})):n})});z.displayName=f;exports.a = z;
|
|
2
|
+
//# sourceMappingURL=chunk-52B6XMQI.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-52B6XMQI.cjs","../src/components/UnstyledIconButton/UnstyledIconButton.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","UnstyledIconButton","forwardRef","props","ref","className","children","label","disabled","inverted","loading","onClick","asChild","unstyledIconButtonProps","extractProps","unstyledIconButtonPropDefs","spinnerSize","getResponsiveTranslation","Component","Slot","jsx","cn","getSubtree","Spinner"],"mappings":"AAAA,iIAAmC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCE9P,mCASN,+CAsCP,IAlCRA,CAAAA,CAAiB,oBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAqBC,+BAAAA,CAC/BC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACd,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAIC,iCAAAA,CAAaX,CAAOY,mBAA0B,CAAA,CAE5CC,CAAAA,CAAcC,iCAAAA,CAAyBd,CAAM,IAAA,EAAQ,IAAA,CAAM,CAAE,EAAA,CAAI,IAAA,CAAM,EAAA,CAAI,IAAK,CAAC,CAAA,CACjFe,CAAAA,CAAYN,CAAAA,CAAUO,aAAAA,CAAK,IAAA,CAAO,QAAA,CAExC,OACEC,6BAAAA,CAACF,CAAA,CACC,GAAA,CAAKd,CAAAA,CACL,SAAA,CAAWiB,iCAAAA,CAAGtB,CAAoBM,CAAS,CAAA,CAC3C,YAAA,CAAYE,CAAAA,CACZ,eAAA,CAAeC,CAAAA,EAAYE,CAAAA,CAC3B,eAAA,CAAeD,CAAAA,CAAW,EAAA,CAAK,KAAA,CAAA,CAC/B,OAAA,CAASD,CAAAA,CAAW,KAAA,CAAA,CAAYG,CAAAA,CAC/B,GAAGE,CAAAA,CAEH,QAAA,CAAAH,CAAAA,CACGY,iCAAAA,CAAa,OAAA,CAAAV,CAAAA,CAAS,QAAA,CAAAN,CAAS,CAAA,CAAG,CAAA,CAAA,EAChCc,6BAAAA,mBAACG,CAAA,CAAQ,IAAA,CAAMP,CAAAA,CAAqC,YAAA,CAAY,CAAA,CAAA,CAAC,CAClE,CAAA,CACDV,CAAAA,CACN,CAEJ,CACF,CAAA,CAEAL,CAAAA,CAAmB,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-52B6XMQI.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { unstyledIconButtonPropDefs } from './UnstyledIconButton.props';\nimport type { UnstyledIconButtonProps } from './UnstyledIconButton.props';\nimport { extractProps } from '../../helpers/extract-props';\nimport { Spinner } from '../Spinner/Spinner';\nimport type { SpinnerProps } from '../Spinner/Spinner.props';\nimport { Slot } from 'radix-ui';\nimport { getSubtree } from '../../helpers/get-subtree';\nimport { getResponsiveTranslation } from '../../helpers/get-responsive-translation';\n\nconst COMPONENT_NAME = 'UnstyledIconButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype UnstyledIconButtonElement = ComponentRef<'button'>;\n\nexport const UnstyledIconButton = forwardRef<UnstyledIconButtonElement, UnstyledIconButtonProps>(\n (props, ref) => {\n const {\n className,\n children,\n label,\n disabled,\n inverted,\n loading,\n onClick,\n asChild,\n ...unstyledIconButtonProps\n } = extractProps(props, unstyledIconButtonPropDefs);\n\n const spinnerSize = getResponsiveTranslation(props.size || 'md', { md: 'sm', sm: 'xs' });\n const Component = asChild ? Slot.Root : 'button';\n\n return (\n <Component\n ref={ref}\n className={cn(componentClassName, className)}\n aria-label={label}\n aria-disabled={disabled || loading}\n data-inverted={inverted ? '' : undefined}\n onClick={disabled ? undefined : onClick}\n {...unstyledIconButtonProps}\n >\n {loading\n ? getSubtree({ asChild, children }, () => (\n <Spinner size={spinnerSize as SpinnerProps['size']} currentColor />\n ))\n : children}\n </Component>\n );\n }\n);\n\nUnstyledIconButton.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N}from"./chunk-RXNMDTWY.js";import{a as r}from"./chunk-SCXGXWII.js";import{a as y}from"./chunk-AU7ZUL4L.js";import{a as v}from"./chunk-BUC2OOMQ.js";import{a as T}from"./chunk-PJUL4CK3.js";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as N}from"./chunk-RXNMDTWY.js";import{a as r}from"./chunk-SCXGXWII.js";import{a as y}from"./chunk-AU7ZUL4L.js";import{a as v}from"./chunk-BUC2OOMQ.js";import{a as T}from"./chunk-PJUL4CK3.js";import{a as l}from"./chunk-LE4NJACS.js";import{a as S}from"./chunk-TERKAM4U.js";import{a as P}from"./chunk-W6VYE222.js";import{a as I}from"./chunk-L4OZ3M5X.js";import{a as C}from"./chunk-3YGJL4CL.js";import{a as x}from"./chunk-MSHCGZ4G.js";import{b as i}from"./chunk-TXDSZ3MR.js";import{Combobox as e}from"@base-ui/react/combobox";import{CloseSmallIcon as z,ExpandSmallIcon as D,SearchMediumIcon as G}from"@utilitywarehouse/hearth-react-icons";import{ScrollArea as a}from"radix-ui";import{jsx as o,jsxs as n}from"react/jsx-runtime";var g="Combobox",m=i(g);function _(p){let{className:h,children:d,triggerOnlyOnType:b,validationStatus:A,validationText:O,label:V,labelVariant:B,helperText:E,id:F,disabled:t,required:w,noOptionsFoundText:M,statusText:u,loading:R,...U}=C(p,P),{id:c,labelId:L,helperTextId:$,validationTextId:k}=I({providedId:F,prefix:"combobox"}),f=!t,q={id:c,labelId:L,helperTextId:$,validationTextId:k,label:V,labelVariant:B,helperText:E,validationText:f?O:void 0,validationStatus:f?A:void 0,required:w};return o(y,{className:x(m,h),"data-disabled":t?"":void 0,...q,children:n(e.Root,{openOnInputClick:!b,...U,children:[o(e.Input,{render:n(v,{id:c,disabled:t,children:[o(e.Trigger,{disabled:t,render:o(r,{placement:"prefix",asChild:!0,children:o(l,{type:"button",label:"Open popup",disabled:t,children:o(G,{})})})}),R?o(r,{placement:"suffix",children:o(S,{size:"xs",color:"primary"})}):null,o(e.Clear,{render:o(r,{placement:"suffix",asChild:!0,children:o(l,{type:"button",label:"Clear selection",disabled:t,children:o(z,{})})})}),b?null:o(e.Trigger,{disabled:t,render:o(r,{placement:"suffix",asChild:!0,children:o(l,{type:"button",label:"Open popup",disabled:t,children:o(D,{})})})})]})}),o(e.Portal,{children:o(e.Positioner,{side:"bottom",sideOffset:16,align:"start",alignOffset:-47,children:n(e.Popup,{className:`${m}Popup`,children:[u?o(e.Status,{children:u}):null,p.items?o(T,{className:`${m}Empty`,children:M}):null,n(a.Root,{className:i("ScrollAreaRoot"),type:"auto",children:[o(a.Viewport,{className:i("ScrollAreaViewport"),children:o(e.List,{className:`${m}List`,children:d||(s=>o(N,{value:s,children:s},s))})}),o(a.Scrollbar,{className:i("ScrollAreaScrollbar"),orientation:"vertical",children:o(a.Thumb,{className:i("ScrollAreaThumb")})})]})]})})})]})})}_.displayName=g;export{_ as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6N6MNMGG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFTRSH2J7cjs = require('./chunk-FTRSH2J7.cjs');var _chunk52B6XMQIcjs = require('./chunk-52B6XMQI.cjs');var _chunkGSNW5OZJcjs = require('./chunk-GSNW5OZJ.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunk2PMYKOVOcjs = require('./chunk-2PMYKOVO.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _react = require('react');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var b="Pagination",a=_chunk7LZI6HLWcjs.b.call(void 0, b),m="...",M=7,_=(s,i)=>{if(i<=M)return Array.from({length:i},(r,d)=>d+1);let e=[],n=s<=4,t=s>i-4;return n?(e.push(1,2,3,4,5),e.push(m),e.push(i)):t?(e.push(1),e.push(m),e.push(i-4,i-3,i-2,i-1,i)):(e.push(1),e.push(m),e.push(s-1,s,s+1),e.push(m),e.push(i)),e},w= exports.a =_react.forwardRef.call(void 0, (s,i)=>{let{className:e,currentPage:n,totalPages:t,onPageChange:r,condensed:d=!1,hideSkipButtons:u=!1,as:C="div",...g}=_chunk2PMYKOVOcjs.a.call(void 0, s,_chunkRDNRX35Pcjs.a),B=_(n,t),P=()=>{n>1&&r(n-1)},E=()=>{n<t&&r(n+1)},k=()=>{n!==1&&r(1)},L=()=>{n!==t&&r(t)};return _jsxruntime.jsx.call(void 0, _radixui.Slot.Root,{ref:i,"aria-label":"pagination",className:_chunkGVVJQBRKcjs.a.call(void 0, a,e),...g,children:_jsxruntime.jsx.call(void 0, C,{children:_jsxruntime.jsxs.call(void 0, "div",{className:`${a}Container`,children:[_jsxruntime.jsxs.call(void 0, "div",{className:`${a}Controllers`,children:[!u&&_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{label:"Go to first page",onClick:k,disabled:n===1,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SkipFirstSmallIcon,{})}),_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{label:"Go to previous page",onClick:P,disabled:n===1,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronLeftSmallIcon,{})})]}),d?_jsxruntime.jsxs.call(void 0, _chunkGSNW5OZJcjs.a,{size:"md",color:"primary",children:["Page ",n," of ",t]}):_jsxruntime.jsx.call(void 0, "div",{children:_jsxruntime.jsx.call(void 0, "ol",{className:`${a}Pages`,children:B.map((l,$)=>{if(l===m)return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, _chunkGSNW5OZJcjs.a,{size:"md",color:"primary",className:`${a}Ellipsis`,children:m})},`ellipsis-${$}`);let h=l===n;return _jsxruntime.jsx.call(void 0, "li",{children:_jsxruntime.jsx.call(void 0, _chunkFTRSH2J7cjs.a,{className:`${a}Page`,variant:"ghost",colorScheme:"functional",onClick:()=>r(l),"data-active":h?"":void 0,"aria-label":`Go to page ${l}`,"aria-current":h?"page":void 0,children:l})},l)})})}),_jsxruntime.jsxs.call(void 0, "div",{className:`${a}Controllers`,children:[_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{label:"Go to next page",onClick:E,disabled:n===t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronRightSmallIcon,{})}),!u&&_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{label:"Go to last page",onClick:L,disabled:n===t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SkipLastSmallIcon,{})})]})]})})})});w.displayName=b;exports.a = w;
|
|
2
|
+
//# sourceMappingURL=chunk-APW7C7H2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-APW7C7H2.cjs","../src/components/Pagination/Pagination.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","ELLIPSIS","MAX_VISIBLE_ITEMS","generatePageNumbers","currentPage","totalPages","_","i","pages","isNearStart","isNearEnd","Pagination","forwardRef","props","ref","className","onPageChange","condensed","hideSkipButtons","Tag","paginationProps","extractProps","marginPropDefs","handlePrevious","handleNext","handleFirst","handleLast","jsx","Slot","cn","jsxs"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,8BCEnQ,wEAOpB,mCAQc,+CAmGX,IAhGJA,CAAAA,CAAiB,YAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAIpDC,CAAAA,CAAW,KAAA,CACXC,CAAAA,CAAoB,CAAA,CAMpBC,CAAAA,CAAsB,CAC1BC,CAAAA,CACAC,CAAAA,CAAAA,EACoC,CAEpC,EAAA,CAAIA,CAAAA,EAAcH,CAAAA,CAChB,OAAO,KAAA,CAAM,IAAA,CAAK,CAAE,MAAA,CAAQG,CAAW,CAAA,CAAG,CAACC,CAAAA,CAAGC,CAAAA,CAAAA,EAAMA,CAAAA,CAAI,CAAC,CAAA,CAG3D,IAAMC,CAAAA,CAAyC,CAAC,CAAA,CAG1CC,CAAAA,CAAcL,CAAAA,EAAe,CAAA,CAC7BM,CAAAA,CAAYN,CAAAA,CAAcC,CAAAA,CAAa,CAAA,CAE7C,OAAII,CAAAA,CAAAA,CAEFD,CAAAA,CAAM,IAAA,CAAK,CAAA,CAAG,CAAA,CAAG,CAAA,CAAG,CAAA,CAAG,CAAC,CAAA,CACxBA,CAAAA,CAAM,IAAA,CAAKP,CAAQ,CAAA,CACnBO,CAAAA,CAAM,IAAA,CAAKH,CAAU,CAAA,CAAA,CACZK,CAAAA,CAAAA,CAETF,CAAAA,CAAM,IAAA,CAAK,CAAC,CAAA,CACZA,CAAAA,CAAM,IAAA,CAAKP,CAAQ,CAAA,CACnBO,CAAAA,CAAM,I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,CAAa,CAAC,CAElB,CAAA,CAEMU,CAAAA,CAAa,CAAA,CAAA,EAAM,CACnBtB,CAAAA,GAAgBC,CAAAA,EAClBW,CAAAA,CAAaX,CAAU,CAE3B,CAAA,CAEA,OACEsB,6BAAAA,aAACC,CAAK,IAAA,CAAL,CACC,GAAA,CAAKd,CAAAA,CACL,YAAA,CAAW,YAAA,CACX,SAAA,CAAWe,iCAAAA,CAAG9B,CAAoBgB,CAAS,CAAA,CAC1C,GAAGK,CAAAA,CAEJ,QAAA,CAAAO,6BAAAA,CAACR,CAAA,CACC,QAAA,CAAAW,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-APW7C7H2.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport { cn } from '../../helpers/cn';\nimport {\n ChevronLeftSmallIcon,\n ChevronRightSmallIcon,\n SkipFirstSmallIcon,\n SkipLastSmallIcon,\n} from '@utilitywarehouse/hearth-react-icons';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { Button } from '../Button/Button';\nimport { BodyText } from '../BodyText/BodyText';\nimport type { PaginationProps } from './Pagination.props';\nimport { Slot } from 'radix-ui';\nimport type { ComponentRef } from 'react';\n\nconst COMPONENT_NAME = 'Pagination';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype PaginationElement = ComponentRef<'div'>;\n\nconst ELLIPSIS = '...';\nconst MAX_VISIBLE_ITEMS = 7;\n\n/**\n * Generates the array of page numbers and ellipsis to display\n * Max visible items is 7 (including ellipses)\n */\nconst generatePageNumbers = (\n currentPage: number,\n totalPages: number\n): Array<number | typeof ELLIPSIS> => {\n // If total pages fit within max visible items, show all\n if (totalPages <= MAX_VISIBLE_ITEMS) {\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages: Array<number | typeof ELLIPSIS> = [];\n\n // Determine if current page is close to start or end\n const isNearStart = currentPage <= 4;\n const isNearEnd = currentPage > totalPages - 4;\n\n if (isNearStart) {\n // Page 1-4 selected: 1, 2, 3, 4, 5, ..., last\n pages.push(1, 2, 3, 4, 5);\n pages.push(ELLIPSIS);\n pages.push(totalPages);\n } else if (isNearEnd) {\n // Page (totalPages-4) to totalPages selected: 1, ..., last-4, last-3, last-2, last-1, last\n pages.push(1);\n pages.push(ELLIPSIS);\n pages.push(totalPages - 4, totalPages - 3, totalPages - 2, totalPages - 1, totalPages);\n } else {\n // Middle pages: 1, ..., current-1, current, current+1, ..., last\n pages.push(1);\n pages.push(ELLIPSIS);\n pages.push(currentPage - 1, currentPage, currentPage + 1);\n pages.push(ELLIPSIS);\n pages.push(totalPages);\n }\n\n return pages;\n};\n\nexport const Pagination = forwardRef<PaginationElement, PaginationProps>((props, ref) => {\n const {\n className,\n currentPage,\n totalPages,\n onPageChange,\n condensed = false,\n hideSkipButtons = false,\n as: Tag = 'div',\n ...paginationProps\n } = extractProps(props, marginPropDefs);\n\n const pages = generatePageNumbers(currentPage, totalPages);\n\n const handlePrevious = () => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNext = () => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1);\n }\n };\n\n const handleFirst = () => {\n if (currentPage !== 1) {\n onPageChange(1);\n }\n };\n\n const handleLast = () => {\n if (currentPage !== totalPages) {\n onPageChange(totalPages);\n }\n };\n\n return (\n <Slot.Root\n ref={ref}\n aria-label=\"pagination\"\n className={cn(componentClassName, className)}\n {...paginationProps}\n >\n <Tag>\n <div className={`${componentClassName}Container`}>\n <div className={`${componentClassName}Controllers`}>\n {!hideSkipButtons && (\n <UnstyledIconButton\n label=\"Go to first page\"\n onClick={handleFirst}\n disabled={currentPage === 1}\n >\n <SkipFirstSmallIcon />\n </UnstyledIconButton>\n )}\n\n <UnstyledIconButton\n label=\"Go to previous page\"\n onClick={handlePrevious}\n disabled={currentPage === 1}\n >\n <ChevronLeftSmallIcon />\n </UnstyledIconButton>\n </div>\n\n {condensed ? (\n <BodyText size=\"md\" color=\"primary\">\n Page {currentPage} of {totalPages}\n </BodyText>\n ) : (\n <div>\n <ol className={`${componentClassName}Pages`}>\n {pages.map((page, index) => {\n if (page === ELLIPSIS) {\n return (\n <li key={`ellipsis-${index}`}>\n <BodyText\n size=\"md\"\n color=\"primary\"\n className={`${componentClassName}Ellipsis`}\n >\n {ELLIPSIS}\n </BodyText>\n </li>\n );\n }\n const isActive = page === currentPage;\n return (\n <li key={page}>\n <Button\n className={`${componentClassName}Page`}\n variant=\"ghost\"\n colorScheme=\"functional\"\n onClick={() => onPageChange(page)}\n data-active={isActive ? '' : undefined}\n aria-label={`Go to page ${page}`}\n aria-current={isActive ? 'page' : undefined}\n >\n {page}\n </Button>\n </li>\n );\n })}\n </ol>\n </div>\n )}\n\n <div className={`${componentClassName}Controllers`}>\n <UnstyledIconButton\n label=\"Go to next page\"\n onClick={handleNext}\n disabled={currentPage === totalPages}\n >\n <ChevronRightSmallIcon />\n </UnstyledIconButton>\n\n {!hideSkipButtons && (\n <UnstyledIconButton\n label=\"Go to last page\"\n onClick={handleLast}\n disabled={currentPage === totalPages}\n >\n <SkipLastSmallIcon />\n </UnstyledIconButton>\n )}\n </div>\n </div>\n </Tag>\n </Slot.Root>\n );\n});\n\nPagination.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-ULGWVVAS.js";import{a as l}from"./chunk-XZNPGGRR.js";import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-ULGWVVAS.js";import{a as l}from"./chunk-XZNPGGRR.js";import{a as d}from"./chunk-TERKAM4U.js";import{a as m}from"./chunk-6HGFQT5H.js";import{a as i}from"./chunk-3YGJL4CL.js";import{a as s}from"./chunk-MSHCGZ4G.js";import{b as a}from"./chunk-TXDSZ3MR.js";import{Slot as g}from"radix-ui";import{forwardRef as h}from"react";import{jsx as o,jsxs as E}from"react/jsx-runtime";var f="Button",n=a(f),v=h((u,c)=>{let{className:B,children:r,disabled:N,loading:t,asChild:e,...b}=i(u,l),C=e?g.Root:"button";return o(p,{ref:c,className:s(n,B),disabled:N||t,"aria-label":t?"Loading":void 0,asChild:!0,...b,children:o(C,{children:t?m({asChild:e,children:r},P=>E("div",{className:`${n}Loading`,children:[o("div",{children:o(d,{size:"xs",currentColor:!0})}),o("span",{className:`${n}Hidden`,children:P})]})):r})})});v.displayName=f;export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BZAXRDZQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk52B6XMQIcjs = require('./chunk-52B6XMQI.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _react = require('react');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _jsxruntime = require('react/jsx-runtime');var r="AlertIconButton",u=_chunk7LZI6HLWcjs.b.call(void 0, r),I= exports.a =_react.forwardRef.call(void 0, ({children:l,label:m="Alert action",title:c="Alert action",className:p,...s},i)=>_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{ref:i,className:_chunkGVVJQBRKcjs.a.call(void 0, u,p),label:m,title:c,...s,children:l||_jsxruntime.jsx.call(void 0, _hearthreacticons.ChevronRightSmallIcon,{})}));I.displayName=r;exports.a = I;
|
|
2
|
+
//# sourceMappingURL=chunk-CK7ZJEBE.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-CK7ZJEBE.cjs","../src/components/Alert/AlertIconButton.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","AlertIconButton","forwardRef","children","label","title","className","props","ref","jsx","UnstyledIconButton","cn","ChevronRightSmallIcon"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,8BCE/F,wEACW,+CAsBjB,IAffA,CAAAA,CAAiB,iBAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAkBC,+BAAAA,CAC5B,CAAE,QAAA,CAAAC,CAAAA,CAAU,KAAA,CAAAC,CAAAA,CAAQ,cAAA,CAAgB,KAAA,CAAAC,CAAAA,CAAQ,cAAA,CAAgB,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAEhFC,6BAAAA,mBAACC,CAAA,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,iCAAAA,CAAGZ,CAAoBO,CAAS,CAAA,CAC3C,KAAA,CAAOF,CAAAA,CACP,KAAA,CAAOC,CAAAA,CACN,GAAGE,CAAAA,CAEH,QAAA,CAAAJ,CAAAA,EAAYM,6BAAAA,uCAACG,CAAA,CAAA,CAAsB,CAAA,CACtC,CAGN,CAAA,CAEAX,CAAAA,CAAgB,WAAA,CAAcH,CAAAA,CAAAA,cAAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-CK7ZJEBE.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport { ChevronRightSmallIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport type { UnstyledIconButtonProps } from '../UnstyledIconButton/UnstyledIconButton.props';\nimport type { ComponentRef } from 'react';\n\nconst COMPONENT_NAME = 'AlertIconButton';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype AlertIconButtonElement = ComponentRef<'button'>;\n\nexport const AlertIconButton = forwardRef<AlertIconButtonElement, UnstyledIconButtonProps>(\n ({ children, label = 'Alert action', title = 'Alert action', className, ...props }, ref) => {\n return (\n <UnstyledIconButton\n ref={ref}\n className={cn(componentClassName, className)}\n label={label}\n title={title}\n {...props}\n >\n {children || <ChevronRightSmallIcon />}\n </UnstyledIconButton>\n );\n }\n);\n\nAlertIconButton.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkPF45VCCUcjs = require('./chunk-PF45VCCU.cjs');var _chunkRG6ZJE6Ucjs = require('./chunk-RG6ZJE6U.cjs');var _chunkG6XM6XMUcjs = require('./chunk-G6XM6XMU.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkDSW76HKTcjs = require('./chunk-DSW76HKT.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunk2PMYKOVOcjs = require('./chunk-2PMYKOVO.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _reactdatepicker = require('react-datepicker'); var _reactdatepicker2 = _interopRequireDefault(_reactdatepicker);var _dom = require('@floating-ui/dom');var _radixui = require('radix-ui');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var T="DatePicker",a=_chunk7LZI6HLWcjs.b.call(void 0, T),re= exports.a =_react.forwardRef.call(void 0, (E,I)=>{let{className:O,onChange:d,onCalendarOpen:l,onCalendarClose:p,validationStatus:r,validationText:c,label:H,labelVariant:R,helperText:m,id:S,disabled:f,readOnly:y,required:P,disableTodayIndicator:F,...$}=_chunk2PMYKOVOcjs.a.call(void 0, E,_chunkRDNRX35Pcjs.a),[A,u]=_react.useState.call(void 0, !1),[e,s]=_react.useState.call(void 0, "days"),{id:Y,labelId:C,helperTextId:h,validationTextId:n}=_chunkITZEACMWcjs.a.call(void 0, {providedId:S,prefix:"date-picker"}),i=!y&&!f,K={id:Y,labelId:C,helperTextId:h,validationTextId:n,label:H,labelVariant:R,helperText:m,validationText:i?c:void 0,validationStatus:i?r:void 0,required:P},L=_chunkDSW76HKTcjs.a.call(void 0, m?h:void 0,i&&c!==void 0?n:void 0),W={days:"days",months:"days",years:"months"},q={days:"months",months:"years",years:"days"},B=(t,j)=>{e!=="days"&&s(W[e]),d!==void 0&&d(t,j)},G=()=>{u(!0),l&&l()},_=()=>{u(!1),s("days"),p&&p()},z={customInput:_jsxruntime.jsx.call(void 0, _chunkRG6ZJE6Ucjs.a,{ref:I,className:"","data-calendar-state":A?"open":"closed"}),renderCustomHeader:t=>_jsxruntime.jsx.call(void 0, _chunkPF45VCCUcjs.a,{...t,view:e,onClick:()=>{s(q[e])},disableTodayIndicator:F})},J={"aria-labelledby":C,"aria-describedby":L,"aria-invalid":r==="invalid"?!0:void 0,"aria-errormessage":r==="invalid"?n:void 0},Q={calendarClassName:`${a}Calendar`,dayClassName:()=>`${a}Day`,weekClassName:()=>`${a}Week`,monthClassName:()=>`${a}Month`,yearClassName:()=>`${a}Year`,popperClassName:`${a}Popper`},U={required:P,disabled:f,readOnly:y,calendarStartDay:1,showIcon:!1,dateFormat:"dd/MM/yyyy",formatWeekDay:t=>t.toString().charAt(0)},X={showPopperArrow:!1,popperModifiers:[_dom.offset.call(void 0, -6)],popperPlacement:"bottom-start",popperProps:{strategy:"fixed"},popperContainer:_radixui.Portal.Root},Z={...{onChange:B,onCalendarClose:_,onCalendarOpen:G},...U,...J,...X,...Q,...{showMonthYearPicker:e==="months",showYearPicker:e==="years",shouldCloseOnSelect:e==="days",closeOnScroll:!0},...z,...$};return _jsxruntime.jsx.call(void 0, _chunkG6XM6XMUcjs.a,{className:_chunkGVVJQBRKcjs.a.call(void 0, a,O),...K,children:_jsxruntime.jsx.call(void 0, _reactdatepicker2.default,{...Z,selectsRange:!1,selectsMultiple:!1})})});re.displayName=T;exports.a = re;
|
|
2
|
+
//# sourceMappingURL=chunk-FD576BTF.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-FD576BTF.cjs","../src/components/DatePicker/DatePicker.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","DatePicker","forwardRef","props","ref","className","onChange","onCalendarOpen","onCalendarClose","validationStatus","validationText","label","labelVariant","helperText","providedId","disabled","readOnly","required","disableTodayIndicator","datePickerProps","extractProps","marginPropDefs","calendarOpen","setCalendarOpen","useState","view","setView","id","labelId","helperTextId","validationTextId","useIds","showValidation","formFieldProps","ariaDescribedbyValue","mergeIds","prevView","nextView","handleChange","date","event","handleCalendarOpen","handleCalendarClose","customComponents","jsx","DatePickerTrigger","DatePickerHeader","ariaProps","classNameProps"],"mappings":"AAAA,iOAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAoC,qHCG3U,uCAKT,mCAOA,8BACc,+CAgG/B,IA7FAA,CAAAA,CAAiB,YAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,EAAAA,aAAaC,+BAAAA,CAAgDC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CACvF,GAAM,CACJ,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CA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oBM,CAAAA,CACpB,cAAA,CAAgBzB,CAAAA,GAAqB,SAAA,CAAY,CAAA,CAAA,CAAO,KAAA,CAAA,CACxD,mBAAA,CAAqBA,CAAAA,GAAqB,SAAA,CAAYqB,CAAAA,CAAmB,KAAA,CAC3E,CAAA,CAEMkB,CAAAA,CAAiB,CACrB,iBAAA,CAAmB,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-FD576BTF.cjs","sourcesContent":[null,"'use client';\n\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport DatePickerPrimitive from 'react-datepicker';\nimport type { ReactDatePickerCustomHeaderProps } from 'react-datepicker';\nimport { extractProps } from '../../helpers/extract-props';\nimport { marginPropDefs } from '../../props/margin.props';\nimport { cn } from '../../helpers/cn';\nimport { offset } from '@floating-ui/dom';\nimport type { DatePickerProps, View } from './DatePicker.props';\nimport { DatePickerTrigger } from './DatePickerTrigger';\nimport { DatePickerHeader } from './DatePickerHeader';\nimport { FormField } from '../FormField/FormField';\nimport { useIds } from '../../hooks/use-ids';\nimport { mergeIds } from '../../helpers/merge-ids';\nimport { Portal } from 'radix-ui';\nimport { forwardRef, useState } from 'react';\nimport type { ComponentRef, MouseEvent, KeyboardEvent } from 'react';\n\nconst COMPONENT_NAME = 'DatePicker';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype DatePickerElement = ComponentRef<'button'>;\n\nexport const DatePicker = forwardRef<DatePickerElement, DatePickerProps>((props, ref) => {\n const {\n className,\n onChange,\n onCalendarOpen,\n onCalendarClose,\n validationStatus,\n validationText,\n label,\n labelVariant,\n helperText,\n id: providedId,\n disabled,\n readOnly,\n required,\n disableTodayIndicator,\n ...datePickerProps\n } = extractProps(props, marginPropDefs);\n\n const [calendarOpen, setCalendarOpen] = useState(false);\n const [view, setView] = useState<View>('days');\n\n const { id, labelId, helperTextId, validationTextId } = useIds({\n providedId,\n prefix: 'date-picker',\n });\n\n const showValidation = Boolean(!readOnly && !disabled);\n\n const formFieldProps = {\n id,\n labelId,\n helperTextId,\n validationTextId,\n label,\n labelVariant,\n helperText,\n validationText: showValidation ? validationText : undefined,\n validationStatus: showValidation ? validationStatus : undefined,\n required,\n };\n\n const ariaDescribedbyValue = mergeIds(\n !!helperText ? helperTextId : undefined,\n showValidation && validationText !== undefined ? validationTextId : undefined\n );\n\n const prevView: { [key in View]: View } = {\n days: 'days',\n months: 'days',\n years: 'months',\n };\n\n const nextView: { [key in View]: View } = {\n days: 'months',\n months: 'years',\n years: 'days',\n };\n\n const handleChange = (\n date: Date | null,\n event?: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>\n ) => {\n if (view !== 'days') {\n setView(prevView[view]);\n }\n if (onChange !== undefined) {\n onChange(date, event);\n }\n };\n\n const handleCalendarOpen = () => {\n setCalendarOpen(true);\n if (onCalendarOpen) {\n onCalendarOpen();\n }\n };\n\n const handleCalendarClose = () => {\n setCalendarOpen(false);\n setView('days');\n if (onCalendarClose) {\n onCalendarClose();\n }\n };\n\n const customComponents = {\n customInput: (\n <DatePickerTrigger\n ref={ref}\n className=\"\"\n data-calendar-state={calendarOpen ? 'open' : 'closed'}\n />\n ),\n renderCustomHeader: (props: ReactDatePickerCustomHeaderProps) => (\n <DatePickerHeader\n {...props}\n view={view}\n onClick={() => {\n setView(nextView[view]);\n }}\n disableTodayIndicator={disableTodayIndicator}\n />\n ),\n };\n\n const ariaProps = {\n 'aria-labelledby': labelId,\n 'aria-describedby': ariaDescribedbyValue,\n 'aria-invalid': validationStatus === 'invalid' ? true : undefined,\n 'aria-errormessage': validationStatus === 'invalid' ? validationTextId : undefined,\n };\n\n const classNameProps = {\n calendarClassName: `${componentClassName}Calendar`,\n dayClassName: () => `${componentClassName}Day`,\n weekClassName: () => `${componentClassName}Week`,\n monthClassName: () => `${componentClassName}Month`,\n yearClassName: () => `${componentClassName}Year`,\n popperClassName: `${componentClassName}Popper`,\n };\n\n const defaultProps = {\n required,\n disabled,\n readOnly,\n calendarStartDay: 1,\n showIcon: false,\n dateFormat: 'dd/MM/yyyy',\n formatWeekDay: (day: Date) => day.toString().charAt(0),\n };\n\n const popperProps = {\n showPopperArrow: false,\n popperModifiers: [offset(-6)],\n popperPlacement: 'bottom-start',\n popperProps: { strategy: 'fixed' },\n popperContainer: Portal.Root,\n };\n\n const eventHandlingProps = {\n onChange: handleChange,\n onCalendarClose: handleCalendarClose,\n onCalendarOpen: handleCalendarOpen,\n };\n\n const stateProps = {\n showMonthYearPicker: view === 'months',\n showYearPicker: view === 'years',\n shouldCloseOnSelect: view === 'days',\n closeOnScroll: true,\n };\n\n const reactDatePickerProps = {\n ...eventHandlingProps,\n ...defaultProps,\n ...ariaProps,\n ...popperProps,\n ...classNameProps,\n ...stateProps,\n ...customComponents,\n ...datePickerProps,\n };\n\n return (\n <FormField className={cn(componentClassName, className)} {...formFieldProps}>\n <DatePickerPrimitive\n {...reactDatePickerProps}\n // @ts-expect-error having to be explicit about these types to ensure onChange type is correct\n selectsRange={false}\n // @ts-expect-error having to be explicit about these types to ensure onChange type is correct\n selectsMultiple={false}\n />\n </FormField>\n );\n});\n\nDatePicker.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-HVBEPWCY.js";import{a as d}from"./chunk-SCXGXWII.js";import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-HVBEPWCY.js";import{a as d}from"./chunk-SCXGXWII.js";import{a as u}from"./chunk-LE4NJACS.js";import{a as f}from"./chunk-L4OZ3M5X.js";import{a as p}from"./chunk-MSHCGZ4G.js";import{b as m}from"./chunk-TXDSZ3MR.js";import{forwardRef as O,useRef as R,useState as b,useCallback as T,useEffect as y}from"react";import{EyeOffSmallIcon as x,EyeSmallIcon as B}from"@utilitywarehouse/hearth-react-icons";import{useMergedRefs as N}from"@base-ui/utils/useMergedRefs";import{Fragment as j,jsx as o,jsxs as C}from"react/jsx-runtime";var I="PasswordInput",V=m(I),L=O(({className:w,disabled:r,id:E,...v},M)=>{let e=R(null),P=N(M,e),[s,l]=b(!1),[i,a]=b(!1),S=T(()=>{let t=!s,n=!i;l(t),a(n)},[s,i]);y(()=>{let t=null;e&&typeof e=="object"&&e.current&&(t=e.current);let n=()=>{t?.type&&(t.type="password",l(!1))};return t&&t.form!==null&&t.form.addEventListener("submit",n),()=>{t?.form&&t.form.removeEventListener("submit",n)}},[e]);let h=`Your password is ${s?"shown":"hidden"}!`;y(()=>{setTimeout(()=>{a(!1)},1500)},[i]);let{id:g}=f({providedId:E,prefix:"password-input"});return C(j,{children:[o(c,{ref:P,className:p(V,w),type:s?"text":"password",disabled:r,id:g,...v,children:o(d,{placement:"suffix",children:o(u,{type:"button",label:"toggle password visibility",onClick:S,disabled:r,"aria-pressed":s,children:s?o(B,{}):o(x,{})})})}),o("div",{"data-visually-hidden":!0,"aria-live":"assertive",role:"status",children:i?h:""})]})});L.displayName=I;export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FIJEAHCA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGMGCV7XTcjs = require('./chunk-GMGCV7XT.cjs');var _chunkXKYU3KUYcjs = require('./chunk-XKYU3KUY.cjs');var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGMGCV7XTcjs = require('./chunk-GMGCV7XT.cjs');var _chunkXKYU3KUYcjs = require('./chunk-XKYU3KUY.cjs');var _chunkMIAH2FDScjs = require('./chunk-MIAH2FDS.cjs');var _chunkXAC5V5L2cjs = require('./chunk-XAC5V5L2.cjs');var _chunk2PMYKOVOcjs = require('./chunk-2PMYKOVO.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _radixui = require('radix-ui');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var f="Button",n=_chunk7LZI6HLWcjs.b.call(void 0, f),v= exports.a =_react.forwardRef.call(void 0, (u,c)=>{let{className:B,children:r,disabled:N,loading:t,asChild:e,...b}=_chunk2PMYKOVOcjs.a.call(void 0, u,_chunkXKYU3KUYcjs.a),C=e?_radixui.Slot.Root:"button";return _jsxruntime.jsx.call(void 0, _chunkGMGCV7XTcjs.a,{ref:c,className:_chunkGVVJQBRKcjs.a.call(void 0, n,B),disabled:N||t,"aria-label":t?"Loading":void 0,asChild:!0,...b,children:_jsxruntime.jsx.call(void 0, C,{children:t?_chunkXAC5V5L2cjs.a.call(void 0, {asChild:e,children:r},P=>_jsxruntime.jsxs.call(void 0, "div",{className:`${n}Loading`,children:[_jsxruntime.jsx.call(void 0, "div",{children:_jsxruntime.jsx.call(void 0, _chunkMIAH2FDScjs.a,{size:"xs",currentColor:!0})}),_jsxruntime.jsx.call(void 0, "span",{className:`${n}Hidden`,children:P})]})):r})})});v.displayName=f;exports.a = v;
|
|
2
|
+
//# sourceMappingURL=chunk-FTRSH2J7.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-FTRSH2J7.cjs","../src/components/Button/Button.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Button","forwardRef","props","ref","className","children","disabled","loading","asChild","buttonProps","extractProps","buttonPropDefs","Component","Slot","jsx","ButtonBase","cn","getSubtree","jsxs"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,mCCSzQ,8BAEM,+CAuBb,IArBRA,CAAAA,CAAiB,QAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAE7CC,CAAAA,aAASC,+BAAAA,CAA4CC,CAAAA,CAAOC,CAAAA,CAAAA,EAAQ,CAC/E,GAAM,CAAE,SAAA,CAAAC,CAAAA,CAAW,QAAA,CAAAC,CAAAA,CAAU,QAAA,CAAAC,CAAAA,CAAU,OAAA,CAAAC,CAAAA,CAAS,OAAA,CAAAC,CAAAA,CAAS,GAAGC,CAAY,CAAA,CAAIC,iCAAAA,CAC1ER,CACAS,mBACF,CAAA,CACMC,CAAAA,CAAYJ,CAAAA,CAAUK,aAAAA,CAAK,IAAA,CAAO,QAAA,CACxC,OACEC,6BAAAA,mBAACC,CAAA,CACC,GAAA,CAAKZ,CAAAA,CACL,SAAA,CAAWa,iCAAAA,CAAGlB,CAAoBM,CAAS,CAAA,CAC3C,QAAA,CAAUE,CAAAA,EAAYC,CAAAA,CACtB,YAAA,CAAYA,CAAAA,CAAU,SAAA,CAAY,KAAA,CAAA,CAClC,OAAA,CAAO,CAAA,CAAA,CACN,GAAGE,CAAAA,CAEJ,QAAA,CAAAK,6BAAAA,CAACF,CAAA,CACE,QAAA,CAAAL,CAAAA,CACGU,iCAAAA,CAAa,OAAA,CAAAT,CAAAA,CAAS,QAAA,CAAAH,CAAS,CAAA,CAAGA,CAAAA,EAChCa,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-FTRSH2J7.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport { extractProps } from '../../helpers/extract-props';\nimport { ButtonBase, ButtonBaseElement } from '../ButtonBase/ButtonBase';\nimport { buttonPropDefs } from './Button.props';\nimport type { ButtonProps } from './Button.props';\nimport { Spinner } from '../Spinner/Spinner';\nimport { Slot } from 'radix-ui';\nimport { getSubtree } from '../../helpers/get-subtree';\nimport { forwardRef } from 'react';\n\nconst COMPONENT_NAME = 'Button';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\nexport const Button = forwardRef<ButtonBaseElement, ButtonProps>((props, ref) => {\n const { className, children, disabled, loading, asChild, ...buttonProps } = extractProps(\n props,\n buttonPropDefs\n );\n const Component = asChild ? Slot.Root : 'button';\n return (\n <ButtonBase\n ref={ref}\n className={cn(componentClassName, className)}\n disabled={disabled || loading}\n aria-label={loading ? 'Loading' : undefined}\n asChild\n {...buttonProps}\n >\n <Component>\n {loading\n ? getSubtree({ asChild, children }, children => (\n <div className={`${componentClassName}Loading`}>\n <div>\n <Spinner size=\"xs\" currentColor />\n </div>\n <span className={`${componentClassName}Hidden`}>{children}</span>\n </div>\n ))\n : children}\n </Component>\n </ButtonBase>\n );\n});\n\nButton.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3NUYSZWUcjs = require('./chunk-3NUYSZWU.cjs');var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3NUYSZWUcjs = require('./chunk-3NUYSZWU.cjs');var _chunk52B6XMQIcjs = require('./chunk-52B6XMQI.cjs');var _chunkMIAH2FDScjs = require('./chunk-MIAH2FDS.cjs');var _chunkSAE6HTLTcjs = require('./chunk-SAE6HTLT.cjs');var _chunkZHZGWTWUcjs = require('./chunk-ZHZGWTWU.cjs');var _chunkFBHDWLJZcjs = require('./chunk-FBHDWLJZ.cjs');var _chunkGSNW5OZJcjs = require('./chunk-GSNW5OZJ.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _radixui = require('radix-ui');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var N="Modal",o=_chunk7LZI6HLWcjs.b.call(void 0, N),b= exports.a =_react.forwardRef.call(void 0, ({className:y,image:r,forceMount:M,container:D,heading:I,description:n,hideCloseButton:m,fullScreen:h,loading:d,loadingText:s,children:w,...x},B)=>{let $={forceMount:M,container:D},p=!!r;return _jsxruntime.jsx.call(void 0, _radixui.Dialog.Portal,{...$,children:_jsxruntime.jsx.call(void 0, _radixui.Dialog.Overlay,{className:_chunk7LZI6HLWcjs.b.call(void 0, "Overlay"),children:_jsxruntime.jsx.call(void 0, "div",{className:`${o}Scroll`,children:_jsxruntime.jsx.call(void 0, "div",{className:`${o}ScrollPadding`,children:_jsxruntime.jsxs.call(void 0, _radixui.Dialog.Content,{ref:B,className:_chunkGVVJQBRKcjs.a.call(void 0, o,y),"data-contains-image":p?"":void 0,"data-hide-close-button":m?"":void 0,"data-full-screen":h?"":void 0,...x,children:[_jsxruntime.jsx.call(void 0, _chunk3NUYSZWUcjs.a,{children:_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{type:"button",label:"Close","data-visually-hidden":m?"":void 0,className:`${o}CloseIconButton`,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.CloseMediumIcon,{})})}),_jsxruntime.jsxs.call(void 0, "div",{className:`${o}OuterContainer`,children:[d?null:_jsxruntime.jsxs.call(void 0, "div",{className:`${o}InnerContainer`,children:[p?_jsxruntime.jsx.call(void 0, "div",{className:`${o}Image`,children:r}):null,_jsxruntime.jsxs.call(void 0, "div",{className:`${o}Header`,children:[_jsxruntime.jsx.call(void 0, _chunkZHZGWTWUcjs.a,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _radixui.Dialog.Title,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkSAE6HTLTcjs.a,{size:"lg",wrap:"wrap",children:I})})}),n?_jsxruntime.jsx.call(void 0, _radixui.Dialog.Description,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkGSNW5OZJcjs.a,{size:"md",as:"span",children:n})}):null]})]}),d?_jsxruntime.jsxs.call(void 0, _chunkFBHDWLJZcjs.a,{direction:"column",gap:"300",alignItems:"center",paddingY:"200",width:"100%",children:[_jsxruntime.jsx.call(void 0, _chunkMIAH2FDScjs.a,{size:"lg"}),s?_jsxruntime.jsx.call(void 0, _radixui.Dialog.Title,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkSAE6HTLTcjs.a,{size:"lg",textAlign:"center",wrap:"wrap",children:s})}):null]}):w]})]})})})})})});b.displayName=N;exports.a = b;
|
|
2
|
+
//# sourceMappingURL=chunk-G5XZ7UTK.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-G5XZ7UTK.cjs","../src/components/Modal/Modal.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Modal","forwardRef","className","image","forceMount","container","heading","description","hideCloseButton","fullScreen","loading","loadingText","children","props","ref","portalProps","containsImage","jsx","DialogPrimitive"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,wDAAyC,mCCEtU,wEAMV,8BAML,+CAiDP,IA9CdA,CAAAA,CAAiB,OAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAQC,+BAAAA,CAEjB,CACE,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,IAAMC,CAAAA,CAAc,CAAE,UAAA,CAAAX,CAAAA,CAAY,SAAA,CAAAC,CAAU,CAAA,CACtCW,CAAAA,CAAgB,CAAA,CAAQb,CAAAA,CAE9B,OACEc,6BAAAA,eAACC,CAAgB,MAAA,CAAhB,CAAwB,GAAGH,CAAAA,CAC1B,QAAA,CAAAE,6BAAAA,eAACC,CAAgB,OAAA,CAAhB,CAAwB,SAAA,CAAWnB,iCAAAA,SAA0B,CAAA,CAC5D,QAAA,CAAAkB,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-G5XZ7UTK.cjs","sourcesContent":[null,"'use client';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { cn } from '../../helpers/cn';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ModalProps } from './Modal.props';\nimport { Heading } from '../Heading/Heading';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { CloseMediumIcon } from '@utilitywarehouse/hearth-react-icons';\nimport { BodyText } from '../BodyText/BodyText';\nimport { ModalClose } from './ModalClose';\nimport { Box } from '../Box/Box';\nimport { Flex } from '../Flex/Flex';\nimport { Spinner } from '../Spinner/Spinner';\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\n\nconst COMPONENT_NAME = 'Modal';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ModalElement = ComponentRef<'div'>;\n\nexport const Modal = forwardRef<ModalElement, ModalProps>(\n (\n {\n className,\n image,\n forceMount,\n container,\n heading,\n description,\n hideCloseButton,\n fullScreen,\n loading,\n loadingText,\n children,\n ...props\n },\n ref\n ) => {\n const portalProps = { forceMount, container };\n const containsImage = Boolean(image);\n\n return (\n <DialogPrimitive.Portal {...portalProps}>\n <DialogPrimitive.Overlay className={withGlobalPrefix('Overlay')}>\n <div className={`${componentClassName}Scroll`}>\n <div className={`${componentClassName}ScrollPadding`}>\n <DialogPrimitive.Content\n ref={ref}\n className={cn(componentClassName, className)}\n data-contains-image={containsImage ? '' : undefined}\n data-hide-close-button={hideCloseButton ? '' : undefined}\n data-full-screen={fullScreen ? '' : undefined}\n {...props}\n >\n <ModalClose>\n <UnstyledIconButton\n type=\"button\"\n label=\"Close\"\n data-visually-hidden={hideCloseButton ? '' : undefined}\n className={`${componentClassName}CloseIconButton`}\n >\n <CloseMediumIcon />\n </UnstyledIconButton>\n </ModalClose>\n <div className={`${componentClassName}OuterContainer`}>\n {!loading ? (\n <div className={`${componentClassName}InnerContainer`}>\n {containsImage ? (\n <div className={`${componentClassName}Image`}>{image}</div>\n ) : null}\n <div className={`${componentClassName}Header`}>\n <Box asChild>\n <DialogPrimitive.Title asChild>\n <Heading size=\"lg\" wrap=\"wrap\">\n {heading}\n </Heading>\n </DialogPrimitive.Title>\n </Box>\n {description ? (\n <DialogPrimitive.Description asChild>\n <BodyText size=\"md\" as=\"span\">\n {description}\n </BodyText>\n </DialogPrimitive.Description>\n ) : null}\n </div>\n </div>\n ) : null}\n\n {loading ? (\n <Flex\n direction=\"column\"\n gap=\"300\"\n alignItems=\"center\"\n paddingY=\"200\"\n width=\"100%\"\n >\n <Spinner size=\"lg\" />\n {loadingText ? (\n <DialogPrimitive.Title asChild>\n <Heading size=\"lg\" textAlign=\"center\" wrap=\"wrap\">\n {loadingText}\n </Heading>\n </DialogPrimitive.Title>\n ) : null}\n </Flex>\n ) : (\n children\n )}\n </div>\n </DialogPrimitive.Content>\n </div>\n </div>\n </DialogPrimitive.Overlay>\n </DialogPrimitive.Portal>\n );\n }\n);\n\nModal.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as B}from"./chunk-GZJ2XWN6.js";import{c as A}from"./chunk-LCR2NNVM.js";import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as B}from"./chunk-GZJ2XWN6.js";import{c as A}from"./chunk-LCR2NNVM.js";import{a}from"./chunk-BZAXRDZQ.js";import{a as c}from"./chunk-MSHCGZ4G.js";import{b as C}from"./chunk-TXDSZ3MR.js";import{forwardRef as y}from"react";import{jsx as h}from"react/jsx-runtime";var v="CardAccordionButton",g=C(v),N=y(({className:s,children:u,action:x,onClick:o,...m},p)=>{let{steps:r,setPreviousSteps:d,setCurrentStep:f,previousSteps:n}=A(),e=B();return x==="next"?h(a,{ref:p,className:c(g,s),type:"button",...m,variant:"solid",colorScheme:"highlight","data-action":"next",onClick:i=>{if(o&&o(i),d(t=>[...t,e.value]),r){let t=r.indexOf(e.value);t>=0&&t<r.length-1&&f(r[t+1])}},children:u||"Next"}):h(a,{ref:p,className:c(g,s),type:"button",...m,variant:"outline",colorScheme:"functional","data-action":"previous",onClick:i=>{if(o&&o(i),n.length>0){let t=n[n.length-1];f(t),d(l=>l.slice(0,l.indexOf(e.value)))}},children:u||"Previous"})});N.displayName=v;export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JG4RZISS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk52B6XMQIcjs = require('./chunk-52B6XMQI.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _react = require('react');var _radixui = require('radix-ui');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _jsxruntime = require('react/jsx-runtime');var m="Toast",r=_chunk7LZI6HLWcjs.b.call(void 0, m),P= exports.a =_react.forwardRef.call(void 0, ({className:a,icon:n,description:p,showDismissButton:l,children:c,...f},T)=>_jsxruntime.jsxs.call(void 0, _radixui.Toast.Root,{ref:T,className:_chunkGVVJQBRKcjs.a.call(void 0, r,a),...f,children:[n,_jsxruntime.jsx.call(void 0, _radixui.Toast.Description,{asChild:!0,children:_jsxruntime.jsx.call(void 0, "div",{className:`${r}Description`,children:p})}),c,l?_jsxruntime.jsx.call(void 0, _radixui.Toast.Close,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{label:"Dismiss toast",inverted:!0,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.CloseMediumIcon,{})})}):null]}));P.displayName=m;exports.a = P;
|
|
2
|
+
//# sourceMappingURL=chunk-K2BVT625.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/hearth/hearth/packages/react/dist/chunk-K2BVT625.cjs","../src/components/Toast/Toast.tsx"],"names":["COMPONENT_NAME","componentClassName","withGlobalPrefix","Toast","forwardRef","className","icon","description","showDismissButton","children","props","ref","jsxs","ToastPrimitive","cn","jsx"],"mappings":"AAAA,iIAAwC,wDAAyC,wDAAyC,8BCE/F,mCAEa,wEAKR,+CAU1B,IARAA,CAAAA,CAAiB,OAAA,CACjBC,CAAAA,CAAqBC,iCAAAA,CAA+B,CAAA,CAI7CC,CAAAA,aAAQC,+BAAAA,CAClB,CAAE,SAAA,CAAAC,CAAAA,CAAW,IAAA,CAAAC,CAAAA,CAAM,WAAA,CAAAC,CAAAA,CAAa,iBAAA,CAAAC,CAAAA,CAAmB,QAAA,CAAAC,CAAAA,CAAU,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAEtEC,8BAAAA,cAACC,CAAe,IAAA,CAAf,CAAoB,GAAA,CAAKF,CAAAA,CAAK,SAAA,CAAWG,iCAAAA,CAAGb,CAAoBI,CAAS,CAAA,CAAI,GAAGK,CAAAA,CAC9E,QAAA,CAAA,CAAAJ,CAAAA,CACDS,6BAAAA,cAACF,CAAe,WAAA,CAAf,CAA2B,OAAA,CAAO,CAAA,CAAA,CACjC,QAAA,CAAAE,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAW,CAAA,EAAA","file":"/home/runner/work/hearth/hearth/packages/react/dist/chunk-K2BVT625.cjs","sourcesContent":[null,"'use client';\n\nimport { forwardRef } from 'react';\nimport type { ComponentRef } from 'react';\nimport { Toast as ToastPrimitive } from 'radix-ui';\nimport { withGlobalPrefix } from '../../helpers/with-global-prefix';\nimport type { ToastProps } from './Toast.props';\nimport { cn } from '../../helpers/cn';\nimport { UnstyledIconButton } from '../UnstyledIconButton/UnstyledIconButton';\nimport { CloseMediumIcon } from '@utilitywarehouse/hearth-react-icons';\n\nconst COMPONENT_NAME = 'Toast';\nconst componentClassName = withGlobalPrefix(COMPONENT_NAME);\n\ntype ToastElement = ComponentRef<'li'>;\n\nexport const Toast = forwardRef<ToastElement, ToastProps>(\n ({ className, icon, description, showDismissButton, children, ...props }, ref) => {\n return (\n <ToastPrimitive.Root ref={ref} className={cn(componentClassName, className)} {...props}>\n {icon}\n <ToastPrimitive.Description asChild>\n <div className={`${componentClassName}Description`}>{description}</div>\n </ToastPrimitive.Description>\n {children}\n {showDismissButton ? (\n <ToastPrimitive.Close asChild>\n <UnstyledIconButton label=\"Dismiss toast\" inverted>\n <CloseMediumIcon />\n </UnstyledIconButton>\n </ToastPrimitive.Close>\n ) : null}\n </ToastPrimitive.Root>\n );\n }\n);\n\nToast.displayName = COMPONENT_NAME;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-5XWIPRFU.js";import{a as C}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P}from"./chunk-5XWIPRFU.js";import{a as C}from"./chunk-LE4NJACS.js";import{a as u}from"./chunk-TERKAM4U.js";import{a as t}from"./chunk-YX2VUB37.js";import{a as f}from"./chunk-OZDYJ34E.js";import{a as v}from"./chunk-HDJB5NMN.js";import{a as g}from"./chunk-7SZ47OMW.js";import{a as c}from"./chunk-MSHCGZ4G.js";import{b as l}from"./chunk-TXDSZ3MR.js";import{Dialog as i}from"radix-ui";import{CloseMediumIcon as O}from"@utilitywarehouse/hearth-react-icons";import{forwardRef as T}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var N="Modal",o=l(N),b=T(({className:y,image:r,forceMount:M,container:D,heading:I,description:n,hideCloseButton:m,fullScreen:h,loading:d,loadingText:s,children:w,...x},B)=>{let $={forceMount:M,container:D},p=!!r;return e(i.Portal,{...$,children:e(i.Overlay,{className:l("Overlay"),children:e("div",{className:`${o}Scroll`,children:e("div",{className:`${o}ScrollPadding`,children:a(i.Content,{ref:B,className:c(o,y),"data-contains-image":p?"":void 0,"data-hide-close-button":m?"":void 0,"data-full-screen":h?"":void 0,...x,children:[e(P,{children:e(C,{type:"button",label:"Close","data-visually-hidden":m?"":void 0,className:`${o}CloseIconButton`,children:e(O,{})})}),a("div",{className:`${o}OuterContainer`,children:[d?null:a("div",{className:`${o}InnerContainer`,children:[p?e("div",{className:`${o}Image`,children:r}):null,a("div",{className:`${o}Header`,children:[e(f,{asChild:!0,children:e(i.Title,{asChild:!0,children:e(t,{size:"lg",wrap:"wrap",children:I})})}),n?e(i.Description,{asChild:!0,children:e(g,{size:"md",as:"span",children:n})}):null]})]}),d?a(v,{direction:"column",gap:"300",alignItems:"center",paddingY:"200",width:"100%",children:[e(u,{size:"lg"}),s?e(i.Title,{asChild:!0,children:e(t,{size:"lg",textAlign:"center",wrap:"wrap",children:s})}):null]}):w]})]})})})})})});b.displayName=N;export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KB7GFWRG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-6TPV5POJ.js";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-6TPV5POJ.js";import{a as l}from"./chunk-TERKAM4U.js";import{a as d}from"./chunk-JBNKX7O7.js";import{a as m}from"./chunk-6HGFQT5H.js";import{a as p}from"./chunk-3YGJL4CL.js";import{a as s}from"./chunk-MSHCGZ4G.js";import{b as i}from"./chunk-TXDSZ3MR.js";import{forwardRef as N}from"react";import{Slot as U}from"radix-ui";import{jsx as c}from"react/jsx-runtime";var f="UnstyledIconButton",R=i(f),z=N((o,u)=>{let{className:y,children:n,label:C,disabled:t,inverted:B,loading:e,onClick:I,asChild:r,...P}=p(o,a),b=d(o.size||"md",{md:"sm",sm:"xs"}),S=r?U.Root:"button";return c(S,{ref:u,className:s(R,y),"aria-label":C,"aria-disabled":t||e,"data-inverted":B?"":void 0,onClick:t?void 0:I,...P,children:e?m({asChild:r,children:n},()=>c(l,{size:b,currentColor:!0})):n})});z.displayName=f;export{z as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LE4NJACS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-LE4NJACS.js";import{a as d}from"./chunk-HDJB5NMN.js";import{a as r}from"./chunk-7SZ47OMW.js";import{a as p}from"./chunk-W6VYE222.js";import{a as c}from"./chunk-3YGJL4CL.js";import{a as s}from"./chunk-MSHCGZ4G.js";import{b as a}from"./chunk-TXDSZ3MR.js";import{forwardRef as h}from"react";import{CloseSmallIcon as B,InfoMediumIcon as g,TickCircleMediumIcon as M,WarningMediumIcon as u}from"@utilitywarehouse/hearth-react-icons";import{jsx as o,jsxs as n}from"react/jsx-runtime";var C="Alert",l=a(C),T=h((v,y)=>{let A={info:g,positive:M,warning:u,danger:u},{children:N,className:x,colorScheme:i="info",onClose:m,text:e,title:t,...I}=c(v,p),P=A[i];return n("div",{ref:y,className:s(l,x),role:"alert","aria-live":"assertive","aria-atomic":"true","data-colorscheme":i,...I,children:[o(P,{"aria-hidden":"true"}),n("div",{className:`${l}Content`,children:[t||e?n(d,{direction:"column",children:[t?o(r,{as:"span",size:"md",weight:"semibold",children:t}):null,e?o(r,{as:"div",children:e}):null]}):null,N]}),m?o(f,{onClick:m,className:`${l}CloseButton`,title:"Close",label:"Close alert",children:o(B,{})}):null]})});T.displayName=C;export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LLW642QV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLCYTX42Acjs = require('./chunk-LCYTX42A.cjs');var _chunk3BDGBDPOcjs = require('./chunk-3BDGBDPO.cjs');var _chunkG6XM6XMUcjs = require('./chunk-G6XM6XMU.cjs');var _chunkHH35BGGPcjs = require('./chunk-HH35BGGP.cjs');var _chunk342EX54Xcjs = require('./chunk-342EX54X.cjs');var
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLCYTX42Acjs = require('./chunk-LCYTX42A.cjs');var _chunk3BDGBDPOcjs = require('./chunk-3BDGBDPO.cjs');var _chunkG6XM6XMUcjs = require('./chunk-G6XM6XMU.cjs');var _chunkHH35BGGPcjs = require('./chunk-HH35BGGP.cjs');var _chunk342EX54Xcjs = require('./chunk-342EX54X.cjs');var _chunk52B6XMQIcjs = require('./chunk-52B6XMQI.cjs');var _chunkMIAH2FDScjs = require('./chunk-MIAH2FDS.cjs');var _chunkRDNRX35Pcjs = require('./chunk-RDNRX35P.cjs');var _chunkITZEACMWcjs = require('./chunk-ITZEACMW.cjs');var _chunk2PMYKOVOcjs = require('./chunk-2PMYKOVO.cjs');var _chunkGVVJQBRKcjs = require('./chunk-GVVJQBRK.cjs');var _chunk7LZI6HLWcjs = require('./chunk-7LZI6HLW.cjs');var _combobox = require('@base-ui/react/combobox');var _hearthreacticons = require('@utilitywarehouse/hearth-react-icons');var _radixui = require('radix-ui');var _jsxruntime = require('react/jsx-runtime');var g="Combobox",m=_chunk7LZI6HLWcjs.b.call(void 0, g);function _(p){let{className:h,children:d,triggerOnlyOnType:b,validationStatus:A,validationText:O,label:V,labelVariant:B,helperText:E,id:F,disabled:t,required:w,noOptionsFoundText:M,statusText:u,loading:R,...U}=_chunk2PMYKOVOcjs.a.call(void 0, p,_chunkRDNRX35Pcjs.a),{id:c,labelId:L,helperTextId:$,validationTextId:k}=_chunkITZEACMWcjs.a.call(void 0, {providedId:F,prefix:"combobox"}),f=!t,q={id:c,labelId:L,helperTextId:$,validationTextId:k,label:V,labelVariant:B,helperText:E,validationText:f?O:void 0,validationStatus:f?A:void 0,required:w};return _jsxruntime.jsx.call(void 0, _chunkG6XM6XMUcjs.a,{className:_chunkGVVJQBRKcjs.a.call(void 0, m,h),"data-disabled":t?"":void 0,...q,children:_jsxruntime.jsxs.call(void 0, _combobox.Combobox.Root,{openOnInputClick:!b,...U,children:[_jsxruntime.jsx.call(void 0, _combobox.Combobox.Input,{render:_jsxruntime.jsxs.call(void 0, _chunkHH35BGGPcjs.a,{id:c,disabled:t,children:[_jsxruntime.jsx.call(void 0, _combobox.Combobox.Trigger,{disabled:t,render:_jsxruntime.jsx.call(void 0, _chunk3BDGBDPOcjs.a,{placement:"prefix",asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{type:"button",label:"Open popup",disabled:t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.SearchMediumIcon,{})})})}),R?_jsxruntime.jsx.call(void 0, _chunk3BDGBDPOcjs.a,{placement:"suffix",children:_jsxruntime.jsx.call(void 0, _chunkMIAH2FDScjs.a,{size:"xs",color:"primary"})}):null,_jsxruntime.jsx.call(void 0, _combobox.Combobox.Clear,{render:_jsxruntime.jsx.call(void 0, _chunk3BDGBDPOcjs.a,{placement:"suffix",asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{type:"button",label:"Clear selection",disabled:t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.CloseSmallIcon,{})})})}),b?null:_jsxruntime.jsx.call(void 0, _combobox.Combobox.Trigger,{disabled:t,render:_jsxruntime.jsx.call(void 0, _chunk3BDGBDPOcjs.a,{placement:"suffix",asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunk52B6XMQIcjs.a,{type:"button",label:"Open popup",disabled:t,children:_jsxruntime.jsx.call(void 0, _hearthreacticons.ExpandSmallIcon,{})})})})]})}),_jsxruntime.jsx.call(void 0, _combobox.Combobox.Portal,{children:_jsxruntime.jsx.call(void 0, _combobox.Combobox.Positioner,{side:"bottom",sideOffset:16,align:"start",alignOffset:-47,children:_jsxruntime.jsxs.call(void 0, _combobox.Combobox.Popup,{className:`${m}Popup`,children:[u?_jsxruntime.jsx.call(void 0, _combobox.Combobox.Status,{children:u}):null,p.items?_jsxruntime.jsx.call(void 0, _chunk342EX54Xcjs.a,{className:`${m}Empty`,children:M}):null,_jsxruntime.jsxs.call(void 0, _radixui.ScrollArea.Root,{className:_chunk7LZI6HLWcjs.b.call(void 0, "ScrollAreaRoot"),type:"auto",children:[_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Viewport,{className:_chunk7LZI6HLWcjs.b.call(void 0, "ScrollAreaViewport"),children:_jsxruntime.jsx.call(void 0, _combobox.Combobox.List,{className:`${m}List`,children:d||(s=>_jsxruntime.jsx.call(void 0, _chunkLCYTX42Acjs.a,{value:s,children:s},s))})}),_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Scrollbar,{className:_chunk7LZI6HLWcjs.b.call(void 0, "ScrollAreaScrollbar"),orientation:"vertical",children:_jsxruntime.jsx.call(void 0, _radixui.ScrollArea.Thumb,{className:_chunk7LZI6HLWcjs.b.call(void 0, "ScrollAreaThumb")})})]})]})})})]})})}_.displayName=g;exports.a = _;
|
|
2
|
+
//# sourceMappingURL=chunk-LSBGG7BC.cjs.map
|