@bigbinary/neeto-atoms 1.0.118 → 1.0.119
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/{Alert-BN00VOZx.js → Alert-D5GO59Aj.js} +2 -2
- package/dist/{Alert-BN00VOZx.js.map → Alert-D5GO59Aj.js.map} +1 -1
- package/dist/{Button-C4c_dj-f.js → Button-DkIQvxAe.js} +2 -1
- package/dist/Button-DkIQvxAe.js.map +1 -0
- package/dist/{Combobox-NgubHftk.js → Combobox-CCstgdEa.js} +27 -23
- package/dist/{Combobox-NgubHftk.js.map → Combobox-CCstgdEa.js.map} +1 -1
- package/dist/{DataTable-X455U4hi.js → DataTable-Dd2QcXL-.js} +2 -2
- package/dist/{DataTable-X455U4hi.js.map → DataTable-Dd2QcXL-.js.map} +1 -1
- package/dist/{Empty-DINS0Uu4.js → Empty-Rbdjvttt.js} +2 -2
- package/dist/{Empty-DINS0Uu4.js.map → Empty-Rbdjvttt.js.map} +1 -1
- package/dist/{HelpIcon-xh488VXs.js → HelpIcon-EjtPpYCx.js} +2 -2
- package/dist/{HelpIcon-xh488VXs.js.map → HelpIcon-EjtPpYCx.js.map} +1 -1
- package/dist/{Input-W8foyOcS.js → Input-Dm5ILPH3.js} +10 -13
- package/dist/Input-Dm5ILPH3.js.map +1 -0
- package/dist/{Label-B-R4PNNq.js → Label-Cr83bru_.js} +2 -2
- package/dist/{Label-B-R4PNNq.js.map → Label-Cr83bru_.js.map} +1 -1
- package/dist/{Select-CLfVAG_p.js → Select-CLSJgvl6.js} +2 -2
- package/dist/{Select-CLfVAG_p.js.map → Select-CLSJgvl6.js.map} +1 -1
- package/dist/{button-CePY5zne.js → button-DTkEk06V.js} +2 -1
- package/dist/button-DTkEk06V.js.map +1 -0
- package/dist/cjs/{Alert-BTheamzj.js → Alert-CXPGm6RG.js} +2 -2
- package/dist/cjs/{Alert-BTheamzj.js.map → Alert-CXPGm6RG.js.map} +1 -1
- package/dist/cjs/{Button-DJSysuyG.js → Button-CeSFPW-p.js} +2 -1
- package/dist/cjs/Button-CeSFPW-p.js.map +1 -0
- package/dist/cjs/{Combobox-PAGcNUr6.js → Combobox-ChwUxTXb.js} +27 -23
- package/dist/cjs/{Combobox-PAGcNUr6.js.map → Combobox-ChwUxTXb.js.map} +1 -1
- package/dist/cjs/{DataTable-CnMgor8P.js → DataTable-DQXIJu3I.js} +2 -2
- package/dist/cjs/{DataTable-CnMgor8P.js.map → DataTable-DQXIJu3I.js.map} +1 -1
- package/dist/cjs/{Empty-Bqt-TucD.js → Empty-CPyvZsWq.js} +2 -2
- package/dist/cjs/{Empty-Bqt-TucD.js.map → Empty-CPyvZsWq.js.map} +1 -1
- package/dist/cjs/{HelpIcon-BF1ePUQf.js → HelpIcon-CmaOmNLN.js} +2 -2
- package/dist/cjs/{HelpIcon-BF1ePUQf.js.map → HelpIcon-CmaOmNLN.js.map} +1 -1
- package/dist/cjs/{Input-DIq7T9D0.js → Input-DFvMBpiU.js} +8 -11
- package/dist/cjs/Input-DFvMBpiU.js.map +1 -0
- package/dist/cjs/{Label-CpsdGBV8.js → Label-BVVCdGCQ.js} +2 -2
- package/dist/cjs/{Label-CpsdGBV8.js.map → Label-BVVCdGCQ.js.map} +1 -1
- package/dist/cjs/{Select-DFz2VIUv.js → Select-BjWAZwbk.js} +2 -2
- package/dist/cjs/{Select-DFz2VIUv.js.map → Select-BjWAZwbk.js.map} +1 -1
- package/dist/cjs/{button-CSBhDSDJ.js → button-CDZTqJzs.js} +2 -1
- package/dist/cjs/button-CDZTqJzs.js.map +1 -0
- package/dist/cjs/components/Alert.js +5 -4
- package/dist/cjs/components/Alert.js.map +1 -1
- package/dist/cjs/components/Button.js +2 -2
- package/dist/cjs/components/Checkbox.js +3 -3
- package/dist/cjs/components/ColorPicker.js +1 -1
- package/dist/cjs/components/DataTable.js +3 -3
- package/dist/cjs/components/DatePicker.js +3 -3
- package/dist/cjs/components/Dialog.js +3 -2
- package/dist/cjs/components/Dialog.js.map +1 -1
- package/dist/cjs/components/DropdownMenu.js +2 -2
- package/dist/cjs/components/Empty.js +3 -3
- package/dist/cjs/components/Input.js +5 -5
- package/dist/cjs/components/Label.js +4 -4
- package/dist/cjs/components/MultiEmailInput.js +3 -3
- package/dist/cjs/components/Pagination.js +1 -1
- package/dist/cjs/components/RadioGroup.js +3 -3
- package/dist/cjs/components/Select.js +7 -6
- package/dist/cjs/components/Select.js.map +1 -1
- package/dist/cjs/components/Sheet.js +3 -2
- package/dist/cjs/components/Sheet.js.map +1 -1
- package/dist/cjs/components/Slider.js +3 -3
- package/dist/cjs/components/Switch.js +3 -3
- package/dist/cjs/components/Textarea.js +3 -3
- package/dist/cjs/components/TimePicker.js +3 -3
- package/dist/cjs/components/TreeSelect.js +3 -3
- package/dist/cjs/components/index.js +14 -13
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/{dialog-CGblgaX5.js → dialog-Bnk4GUFC.js} +2 -2
- package/dist/cjs/{dialog-CGblgaX5.js.map → dialog-Bnk4GUFC.js.map} +1 -1
- package/dist/cjs/formik/ActionBlock.js +2 -2
- package/dist/cjs/formik/BlockNavigation.js +4 -3
- package/dist/cjs/formik/BlockNavigation.js.map +1 -1
- package/dist/cjs/formik/Button.js +2 -2
- package/dist/cjs/formik/Checkbox.js +3 -3
- package/dist/cjs/formik/Input.js +5 -5
- package/dist/cjs/formik/MultiEmailInput.js +3 -3
- package/dist/cjs/formik/RadioGroup.js +3 -3
- package/dist/cjs/formik/Select.js +7 -6
- package/dist/cjs/formik/Select.js.map +1 -1
- package/dist/cjs/formik/Slider.js +3 -3
- package/dist/cjs/formik/Switch.js +3 -3
- package/dist/cjs/formik/Textarea.js +3 -3
- package/dist/cjs/formik/TreeSelect.js +3 -3
- package/dist/cjs/formik/index.js +9 -8
- package/dist/cjs/formik/index.js.map +1 -1
- package/dist/cjs/index.js +14 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/{input-group-DZ-c2jRZ.js → input-group-BQqwtQF2.js} +2 -2
- package/dist/cjs/{input-group-DZ-c2jRZ.js.map → input-group-BQqwtQF2.js.map} +1 -1
- package/dist/cjs/primitives/AlertDialog.js +8 -38
- package/dist/cjs/primitives/AlertDialog.js.map +1 -1
- package/dist/cjs/primitives/Button.js +1 -1
- package/dist/cjs/primitives/Calendar.js +1 -1
- package/dist/cjs/primitives/Carousel.js +1 -1
- package/dist/cjs/primitives/Combobox.js +4 -3
- package/dist/cjs/primitives/Combobox.js.map +1 -1
- package/dist/cjs/primitives/Command.js +3 -3
- package/dist/cjs/primitives/Dialog.js +4 -2
- package/dist/cjs/primitives/Dialog.js.map +1 -1
- package/dist/cjs/primitives/Field.js +3 -3
- package/dist/cjs/primitives/InputGroup.js +2 -2
- package/dist/cjs/primitives/Pagination.js +1 -1
- package/dist/cjs/primitives/Sheet.js +4 -2
- package/dist/cjs/primitives/Sheet.js.map +1 -1
- package/dist/cjs/primitives/Sidebar.js +2 -2
- package/dist/cjs/primitives/index.js +8 -7
- package/dist/cjs/primitives/index.js.map +1 -1
- package/dist/cjs/{sheet-BMQ9juND.js → sheet-CQ82jJkC.js} +2 -2
- package/dist/cjs/{sheet-BMQ9juND.js.map → sheet-CQ82jJkC.js.map} +1 -1
- package/dist/cjs/useAriaHiddenCleanup-CT0To2AH.js +47 -0
- package/dist/cjs/useAriaHiddenCleanup-CT0To2AH.js.map +1 -0
- package/dist/components/Alert.js +5 -4
- package/dist/components/Alert.js.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button.js +2 -2
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ColorPicker.js +1 -1
- package/dist/components/DataTable.js +3 -3
- package/dist/components/DatePicker.js +3 -3
- package/dist/components/Dialog.js +3 -2
- package/dist/components/Dialog.js.map +1 -1
- package/dist/components/DropdownMenu.js +2 -2
- package/dist/components/Empty.js +3 -3
- package/dist/components/Input/Input.d.ts +6 -1
- package/dist/components/Input.js +5 -5
- package/dist/components/Label.js +4 -4
- package/dist/components/MultiEmailInput.js +3 -3
- package/dist/components/Pagination.js +1 -1
- package/dist/components/RadioGroup.js +3 -3
- package/dist/components/Select.js +7 -6
- package/dist/components/Select.js.map +1 -1
- package/dist/components/Sheet.js +3 -2
- package/dist/components/Sheet.js.map +1 -1
- package/dist/components/Slider.js +3 -3
- package/dist/components/Switch.js +3 -3
- package/dist/components/Textarea.js +3 -3
- package/dist/components/TimePicker.js +3 -3
- package/dist/components/TreeSelect.js +3 -3
- package/dist/components/index.js +14 -13
- package/dist/components/index.js.map +1 -1
- package/dist/{dialog-CqXuhXNS.js → dialog-BG8Tjl78.js} +2 -2
- package/dist/{dialog-CqXuhXNS.js.map → dialog-BG8Tjl78.js.map} +1 -1
- package/dist/formik/ActionBlock.js +2 -2
- package/dist/formik/BlockNavigation.js +4 -3
- package/dist/formik/BlockNavigation.js.map +1 -1
- package/dist/formik/Button.js +2 -2
- package/dist/formik/Checkbox.js +3 -3
- package/dist/formik/Input.js +5 -5
- package/dist/formik/MultiEmailInput.js +3 -3
- package/dist/formik/RadioGroup.js +3 -3
- package/dist/formik/Select.js +7 -6
- package/dist/formik/Select.js.map +1 -1
- package/dist/formik/Slider.js +3 -3
- package/dist/formik/Switch.js +3 -3
- package/dist/formik/Textarea.js +3 -3
- package/dist/formik/TreeSelect.js +3 -3
- package/dist/formik/index.js +9 -8
- package/dist/formik/index.js.map +1 -1
- package/dist/hooks/useAriaHiddenCleanup.d.ts +20 -0
- package/dist/index.css +6 -0
- package/dist/index.js +14 -13
- package/dist/index.js.map +1 -1
- package/dist/{input-group-DuITGkyB.js → input-group-Ba2bJ2DW.js} +2 -2
- package/dist/{input-group-DuITGkyB.js.map → input-group-Ba2bJ2DW.js.map} +1 -1
- package/dist/primitives/AlertDialog.js +8 -38
- package/dist/primitives/AlertDialog.js.map +1 -1
- package/dist/primitives/Button.d.ts +1 -1
- package/dist/primitives/Button.js +2 -2
- package/dist/primitives/Calendar.js +1 -1
- package/dist/primitives/Carousel.js +1 -1
- package/dist/primitives/Combobox.js +4 -3
- package/dist/primitives/Combobox.js.map +1 -1
- package/dist/primitives/Command.js +3 -3
- package/dist/primitives/Dialog.js +4 -2
- package/dist/primitives/Dialog.js.map +1 -1
- package/dist/primitives/Field.js +3 -3
- package/dist/primitives/InputGroup.js +2 -2
- package/dist/primitives/Pagination.js +1 -1
- package/dist/primitives/Sheet.js +4 -2
- package/dist/primitives/Sheet.js.map +1 -1
- package/dist/primitives/Sidebar.js +2 -2
- package/dist/primitives/index.js +8 -7
- package/dist/primitives/index.js.map +1 -1
- package/dist/shadcn/components/button.d.ts +2 -2
- package/dist/{sheet-B9oDGvvX.js → sheet-BD8c3_Va.js} +2 -2
- package/dist/{sheet-B9oDGvvX.js.map → sheet-BD8c3_Va.js.map} +1 -1
- package/dist/useAriaHiddenCleanup-BIUbPJ6V.js +45 -0
- package/dist/useAriaHiddenCleanup-BIUbPJ6V.js.map +1 -0
- package/package.json +2 -1
- package/dist/Button-C4c_dj-f.js.map +0 -1
- package/dist/Input-W8foyOcS.js.map +0 -1
- package/dist/button-CePY5zne.js.map +0 -1
- package/dist/cjs/Button-DJSysuyG.js.map +0 -1
- package/dist/cjs/Input-DIq7T9D0.js.map +0 -1
- package/dist/cjs/button-CSBhDSDJ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockNavigation.js","sources":["../../src/formik/BlockNavigation/hooks/useNavPrompt.ts","../../src/formik/BlockNavigation/BlockNavigationAlert.tsx","../../src/formik/BlockNavigation/index.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { useHistory } from \"react-router-dom\";\n\ninterface UseNavPromptOptions {\n /** Whether navigation should be blocked. */\n shouldBlock?: boolean;\n}\n\ninterface UseNavPromptReturn {\n /** Whether a navigation attempt is currently blocked. */\n isBlocked: boolean;\n /** Unblock and continue the pending navigation. */\n continueNavigation: () => void;\n /** Dismiss the prompt without navigating. */\n hidePrompt: () => void;\n}\n\nconst useNavPrompt = ({\n shouldBlock = true,\n}: UseNavPromptOptions): UseNavPromptReturn => {\n const [isBlocked, setIsBlocked] = useState(false);\n\n const history = useHistory();\n\n const unblockRef = useRef<(() => void) | undefined>(undefined);\n const navRef = useRef<{ transition: string; action: string } | null>(null);\n\n const handleNavigation = useCallback(\n (action: string, transition: string) => {\n switch (action) {\n case \"PUSH\":\n history.push(transition);\n break;\n case \"REPLACE\":\n history.replace(transition);\n break;\n case \"POP\":\n history.goBack();\n break;\n }\n },\n [history]\n );\n\n const continueNavigation = useCallback(() => {\n if (isBlocked && unblockRef.current) {\n unblockRef.current();\n setIsBlocked(false);\n if (navRef.current) {\n const { action, transition } = navRef.current;\n handleNavigation(action, transition);\n }\n }\n }, [isBlocked, handleNavigation]);\n\n const hidePrompt = useCallback(() => setIsBlocked(false), []);\n\n useEffect(() => {\n if (shouldBlock) {\n unblockRef.current = history.block(\n (transition: { pathname: string }, action: string) => {\n setIsBlocked(true);\n navRef.current = { transition: transition.pathname, action };\n\n return false;\n }\n ) as unknown as () => void;\n\n return () => {\n unblockRef.current?.();\n };\n }\n\n return undefined;\n }, [shouldBlock, history]);\n\n return { isBlocked, continueNavigation, hidePrompt };\n};\n\nexport { useNavPrompt };\nexport type { UseNavPromptOptions, UseNavPromptReturn };\n","import { useRef } from \"react\";\n\nimport { Button } from \"src/components/Button\";\nimport { Dialog } from \"src/components/Dialog\";\n\nexport interface BlockNavigationAlertProps {\n /** Whether the alert dialog is open. */\n isOpen?: boolean;\n /** Called when the dialog should close. */\n onClose?: () => void;\n /** Called when the user chooses to stay. */\n onSubmit?: () => void;\n /** Called when the user chooses to discard and leave. */\n onDiscardChanges?: () => void;\n /** Custom title for the alert. */\n title?: string;\n /** Custom message for the alert body. */\n message?: string;\n /** Custom label for the discard/cancel button. */\n cancelButtonLabel?: string;\n /** Custom label for the stay/submit button. */\n submitButtonLabel?: string;\n}\n\nconst BlockNavigationAlert = ({\n isOpen = false,\n onClose,\n onSubmit,\n onDiscardChanges,\n title = \"You have unsaved changes\",\n message = \"Are you sure you want to leave? All unsaved changes will be lost.\",\n cancelButtonLabel = \"Discard and leave\",\n submitButtonLabel = \"Stay on this page\",\n}: BlockNavigationAlertProps) => {\n const submitButtonRef = useRef<HTMLButtonElement>(null);\n\n return (\n <Dialog\n isOpen={isOpen}\n onClose={onClose ?? (() => {})}\n closeButton\n closeOnEsc\n closeOnOutsideClick\n initialFocusRef={submitButtonRef}\n size=\"medium\"\n data-testid=\"alert-box\"\n >\n <Dialog.Header>\n <Dialog.Title data-testid=\"alert-title\">{title}</Dialog.Title>\n </Dialog.Header>\n <Dialog.Body>\n <p\n data-testid=\"alert-message\"\n className=\"text-sm text-muted-foreground\"\n >\n {message}\n </p>\n </Dialog.Body>\n <Dialog.Footer className=\"flex items-center justify-end gap-2\">\n <Button\n data-testid=\"alert-cancel-button\"\n label={cancelButtonLabel}\n variant=\"destructive\"\n onClick={onDiscardChanges}\n />\n <Button\n data-testid=\"alert-submit-button\"\n label={submitButtonLabel}\n ref={submitButtonRef}\n onClick={onSubmit}\n />\n </Dialog.Footer>\n </Dialog>\n );\n};\n\nBlockNavigationAlert.displayName = \"BlockNavigationAlert\";\n\nexport { BlockNavigationAlert };\n","import { useFormikContext } from \"formik\";\n\nimport { useNavPrompt } from \"./hooks/useNavPrompt\";\n\nimport {\n BlockNavigationAlert,\n type BlockNavigationAlertProps,\n} from \"./BlockNavigationAlert\";\n\nexport interface FormikBlockNavigationProps extends Omit<\n BlockNavigationAlertProps,\n \"isOpen\" | \"onClose\" | \"onSubmit\" | \"onDiscardChanges\"\n> {\n /** Force the navigation block regardless of Formik dirty state. */\n isDirty?: boolean;\n}\n\nconst FormikBlockNavigation = ({\n isDirty = false,\n ...otherProps\n}: FormikBlockNavigationProps) => {\n const formikContext = useFormikContext();\n const shouldBlock =\n isDirty || (Boolean(formikContext) && Boolean(formikContext.dirty));\n\n const { isBlocked, continueNavigation, hidePrompt } = useNavPrompt({\n shouldBlock,\n });\n\n const handleDiscardChanges = () => {\n if (formikContext) formikContext.resetForm();\n hidePrompt();\n continueNavigation();\n };\n\n return (\n <BlockNavigationAlert\n isOpen={isBlocked}\n onClose={hidePrompt}\n onDiscardChanges={handleDiscardChanges}\n onSubmit={hidePrompt}\n {...otherProps}\n />\n );\n};\n\nFormikBlockNavigation.displayName = \"FormikBlockNavigation\";\n\nexport { FormikBlockNavigation };\nexport type { BlockNavigationAlertProps };\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BlockNavigation.js","sources":["../../src/formik/BlockNavigation/hooks/useNavPrompt.ts","../../src/formik/BlockNavigation/BlockNavigationAlert.tsx","../../src/formik/BlockNavigation/index.tsx"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { useHistory } from \"react-router-dom\";\n\ninterface UseNavPromptOptions {\n /** Whether navigation should be blocked. */\n shouldBlock?: boolean;\n}\n\ninterface UseNavPromptReturn {\n /** Whether a navigation attempt is currently blocked. */\n isBlocked: boolean;\n /** Unblock and continue the pending navigation. */\n continueNavigation: () => void;\n /** Dismiss the prompt without navigating. */\n hidePrompt: () => void;\n}\n\nconst useNavPrompt = ({\n shouldBlock = true,\n}: UseNavPromptOptions): UseNavPromptReturn => {\n const [isBlocked, setIsBlocked] = useState(false);\n\n const history = useHistory();\n\n const unblockRef = useRef<(() => void) | undefined>(undefined);\n const navRef = useRef<{ transition: string; action: string } | null>(null);\n\n const handleNavigation = useCallback(\n (action: string, transition: string) => {\n switch (action) {\n case \"PUSH\":\n history.push(transition);\n break;\n case \"REPLACE\":\n history.replace(transition);\n break;\n case \"POP\":\n history.goBack();\n break;\n }\n },\n [history]\n );\n\n const continueNavigation = useCallback(() => {\n if (isBlocked && unblockRef.current) {\n unblockRef.current();\n setIsBlocked(false);\n if (navRef.current) {\n const { action, transition } = navRef.current;\n handleNavigation(action, transition);\n }\n }\n }, [isBlocked, handleNavigation]);\n\n const hidePrompt = useCallback(() => setIsBlocked(false), []);\n\n useEffect(() => {\n if (shouldBlock) {\n unblockRef.current = history.block(\n (transition: { pathname: string }, action: string) => {\n setIsBlocked(true);\n navRef.current = { transition: transition.pathname, action };\n\n return false;\n }\n ) as unknown as () => void;\n\n return () => {\n unblockRef.current?.();\n };\n }\n\n return undefined;\n }, [shouldBlock, history]);\n\n return { isBlocked, continueNavigation, hidePrompt };\n};\n\nexport { useNavPrompt };\nexport type { UseNavPromptOptions, UseNavPromptReturn };\n","import { useRef } from \"react\";\n\nimport { Button } from \"src/components/Button\";\nimport { Dialog } from \"src/components/Dialog\";\n\nexport interface BlockNavigationAlertProps {\n /** Whether the alert dialog is open. */\n isOpen?: boolean;\n /** Called when the dialog should close. */\n onClose?: () => void;\n /** Called when the user chooses to stay. */\n onSubmit?: () => void;\n /** Called when the user chooses to discard and leave. */\n onDiscardChanges?: () => void;\n /** Custom title for the alert. */\n title?: string;\n /** Custom message for the alert body. */\n message?: string;\n /** Custom label for the discard/cancel button. */\n cancelButtonLabel?: string;\n /** Custom label for the stay/submit button. */\n submitButtonLabel?: string;\n}\n\nconst BlockNavigationAlert = ({\n isOpen = false,\n onClose,\n onSubmit,\n onDiscardChanges,\n title = \"You have unsaved changes\",\n message = \"Are you sure you want to leave? All unsaved changes will be lost.\",\n cancelButtonLabel = \"Discard and leave\",\n submitButtonLabel = \"Stay on this page\",\n}: BlockNavigationAlertProps) => {\n const submitButtonRef = useRef<HTMLButtonElement>(null);\n\n return (\n <Dialog\n isOpen={isOpen}\n onClose={onClose ?? (() => {})}\n closeButton\n closeOnEsc\n closeOnOutsideClick\n initialFocusRef={submitButtonRef}\n size=\"medium\"\n data-testid=\"alert-box\"\n >\n <Dialog.Header>\n <Dialog.Title data-testid=\"alert-title\">{title}</Dialog.Title>\n </Dialog.Header>\n <Dialog.Body>\n <p\n data-testid=\"alert-message\"\n className=\"text-sm text-muted-foreground\"\n >\n {message}\n </p>\n </Dialog.Body>\n <Dialog.Footer className=\"flex items-center justify-end gap-2\">\n <Button\n data-testid=\"alert-cancel-button\"\n label={cancelButtonLabel}\n variant=\"destructive\"\n onClick={onDiscardChanges}\n />\n <Button\n data-testid=\"alert-submit-button\"\n label={submitButtonLabel}\n ref={submitButtonRef}\n onClick={onSubmit}\n />\n </Dialog.Footer>\n </Dialog>\n );\n};\n\nBlockNavigationAlert.displayName = \"BlockNavigationAlert\";\n\nexport { BlockNavigationAlert };\n","import { useFormikContext } from \"formik\";\n\nimport { useNavPrompt } from \"./hooks/useNavPrompt\";\n\nimport {\n BlockNavigationAlert,\n type BlockNavigationAlertProps,\n} from \"./BlockNavigationAlert\";\n\nexport interface FormikBlockNavigationProps extends Omit<\n BlockNavigationAlertProps,\n \"isOpen\" | \"onClose\" | \"onSubmit\" | \"onDiscardChanges\"\n> {\n /** Force the navigation block regardless of Formik dirty state. */\n isDirty?: boolean;\n}\n\nconst FormikBlockNavigation = ({\n isDirty = false,\n ...otherProps\n}: FormikBlockNavigationProps) => {\n const formikContext = useFormikContext();\n const shouldBlock =\n isDirty || (Boolean(formikContext) && Boolean(formikContext.dirty));\n\n const { isBlocked, continueNavigation, hidePrompt } = useNavPrompt({\n shouldBlock,\n });\n\n const handleDiscardChanges = () => {\n if (formikContext) formikContext.resetForm();\n hidePrompt();\n continueNavigation();\n };\n\n return (\n <BlockNavigationAlert\n isOpen={isBlocked}\n onClose={hidePrompt}\n onDiscardChanges={handleDiscardChanges}\n onSubmit={hidePrompt}\n {...otherProps}\n />\n );\n};\n\nFormikBlockNavigation.displayName = \"FormikBlockNavigation\";\n\nexport { FormikBlockNavigation };\nexport type { BlockNavigationAlertProps };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAM,eAAe,CAAC;AAAA,EACpB,WAAA,GAAc;AAChB,CAAA,KAA+C;AAC7C,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,CAAA,GAAI,SAAS,KAAK,CAAA;AAEhD,EAAA,MAAM,UAAU,UAAA,EAAW;AAE3B,EAAA,M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AkB,oBAAA;AAAA,MAClB,QAAA,EAAU,UAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,qBAAA,CAAsB,WAAA,GAAc,uBAAA;;;;"}
|
package/dist/formik/Button.js
CHANGED
|
@@ -2,12 +2,12 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { useFormikContext } from 'formik';
|
|
4
4
|
import { equals } from 'ramda';
|
|
5
|
-
import { b as Button } from '../Button-
|
|
5
|
+
import { b as Button } from '../Button-DkIQvxAe.js';
|
|
6
6
|
import 'react-router-dom';
|
|
7
7
|
import '../utils-BJnb9o5c.js';
|
|
8
8
|
import '../renderIcon-C6twJSqH.js';
|
|
9
9
|
import '../primitives/Button.js';
|
|
10
|
-
import '../button-
|
|
10
|
+
import '../button-DTkEk06V.js';
|
|
11
11
|
import '../index-Bo3AAQJp.js';
|
|
12
12
|
import '../index-CfriMyrd.js';
|
|
13
13
|
import '../index-BtkPdosV.js';
|
package/dist/formik/Checkbox.js
CHANGED
|
@@ -20,7 +20,7 @@ import 'react-dom';
|
|
|
20
20
|
import '../fieldIds-VpluAAMl.js';
|
|
21
21
|
import '../hyphenize-TRhMI0tl.js';
|
|
22
22
|
import '../primitives/Field.js';
|
|
23
|
-
import '../HelpIcon-
|
|
23
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
24
24
|
import '../primitives/Tooltip.js';
|
|
25
25
|
import '../tooltip-BUYRFmEv.js';
|
|
26
26
|
import '../index-BNPynZWM.js';
|
|
@@ -37,10 +37,10 @@ import '../index-Bo3AAQJp.js';
|
|
|
37
37
|
import '../primitives/HoverCard.js';
|
|
38
38
|
import '../Typography-CmILccNh.js';
|
|
39
39
|
import '../index-CfriMyrd.js';
|
|
40
|
-
import '../Button-
|
|
40
|
+
import '../Button-DkIQvxAe.js';
|
|
41
41
|
import 'react-router-dom';
|
|
42
42
|
import '../primitives/Button.js';
|
|
43
|
-
import '../button-
|
|
43
|
+
import '../button-DTkEk06V.js';
|
|
44
44
|
import '../primitives/Spinner.js';
|
|
45
45
|
import 'react-i18next';
|
|
46
46
|
import '../loader-circle-DycHUAWN.js';
|
package/dist/formik/Input.js
CHANGED
|
@@ -2,10 +2,10 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { Field, getIn } from 'formik';
|
|
4
4
|
import { dissoc } from 'ramda';
|
|
5
|
-
import { I as Input } from '../Input-
|
|
5
|
+
import { I as Input } from '../Input-Dm5ILPH3.js';
|
|
6
6
|
import '../utils-BJnb9o5c.js';
|
|
7
7
|
import '../primitives/Field.js';
|
|
8
|
-
import '../HelpIcon-
|
|
8
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
9
9
|
import '../primitives/Tooltip.js';
|
|
10
10
|
import '../tooltip-BUYRFmEv.js';
|
|
11
11
|
import '../index-DNzunGHb.js';
|
|
@@ -32,17 +32,17 @@ import '../index-Bo3AAQJp.js';
|
|
|
32
32
|
import '../primitives/HoverCard.js';
|
|
33
33
|
import '../Typography-CmILccNh.js';
|
|
34
34
|
import '../index-CfriMyrd.js';
|
|
35
|
-
import '../Button-
|
|
35
|
+
import '../Button-DkIQvxAe.js';
|
|
36
36
|
import 'react-router-dom';
|
|
37
37
|
import '../primitives/Button.js';
|
|
38
|
-
import '../button-
|
|
38
|
+
import '../button-DTkEk06V.js';
|
|
39
39
|
import '../primitives/Spinner.js';
|
|
40
40
|
import 'react-i18next';
|
|
41
41
|
import '../loader-circle-DycHUAWN.js';
|
|
42
42
|
import '../label-YEsizr2c.js';
|
|
43
43
|
import '../separator-ByRsc-y-.js';
|
|
44
44
|
import '../primitives/InputGroup.js';
|
|
45
|
-
import '../input-group-
|
|
45
|
+
import '../input-group-Ba2bJ2DW.js';
|
|
46
46
|
import '../input-CNbQc_tG.js';
|
|
47
47
|
import '../textarea-BZIsQ5UD.js';
|
|
48
48
|
import '../fieldIds-VpluAAMl.js';
|
|
@@ -6,7 +6,7 @@ import { M as MultiEmailInput } from '../MultiEmailInput-D2uHxkeV.js';
|
|
|
6
6
|
import 'react-i18next';
|
|
7
7
|
import '../utils-BJnb9o5c.js';
|
|
8
8
|
import '../primitives/Field.js';
|
|
9
|
-
import '../HelpIcon-
|
|
9
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
10
10
|
import '../primitives/Tooltip.js';
|
|
11
11
|
import '../tooltip-BUYRFmEv.js';
|
|
12
12
|
import '../index-DNzunGHb.js';
|
|
@@ -33,10 +33,10 @@ import '../index-Bo3AAQJp.js';
|
|
|
33
33
|
import '../primitives/HoverCard.js';
|
|
34
34
|
import '../Typography-CmILccNh.js';
|
|
35
35
|
import '../index-CfriMyrd.js';
|
|
36
|
-
import '../Button-
|
|
36
|
+
import '../Button-DkIQvxAe.js';
|
|
37
37
|
import 'react-router-dom';
|
|
38
38
|
import '../primitives/Button.js';
|
|
39
|
-
import '../button-
|
|
39
|
+
import '../button-DTkEk06V.js';
|
|
40
40
|
import '../primitives/Spinner.js';
|
|
41
41
|
import '../loader-circle-DycHUAWN.js';
|
|
42
42
|
import '../label-YEsizr2c.js';
|
|
@@ -23,7 +23,7 @@ import '../index-yFgkK_AM.js';
|
|
|
23
23
|
import '../primitives/Label.js';
|
|
24
24
|
import '../label-YEsizr2c.js';
|
|
25
25
|
import '../primitives/Field.js';
|
|
26
|
-
import '../HelpIcon-
|
|
26
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
27
27
|
import '../primitives/Tooltip.js';
|
|
28
28
|
import '../tooltip-BUYRFmEv.js';
|
|
29
29
|
import '../index-BNPynZWM.js';
|
|
@@ -39,10 +39,10 @@ import '../index-Bo3AAQJp.js';
|
|
|
39
39
|
import '../primitives/HoverCard.js';
|
|
40
40
|
import '../Typography-CmILccNh.js';
|
|
41
41
|
import '../index-CfriMyrd.js';
|
|
42
|
-
import '../Button-
|
|
42
|
+
import '../Button-DkIQvxAe.js';
|
|
43
43
|
import 'react-router-dom';
|
|
44
44
|
import '../primitives/Button.js';
|
|
45
|
-
import '../button-
|
|
45
|
+
import '../button-DTkEk06V.js';
|
|
46
46
|
import '../primitives/Spinner.js';
|
|
47
47
|
import 'react-i18next';
|
|
48
48
|
import '../loader-circle-DycHUAWN.js';
|
package/dist/formik/Select.js
CHANGED
|
@@ -2,13 +2,13 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { useField, useFormikContext, getIn } from 'formik';
|
|
4
4
|
import { dissoc } from 'ramda';
|
|
5
|
-
import { S as Select } from '../Select-
|
|
5
|
+
import { S as Select } from '../Select-CLSJgvl6.js';
|
|
6
6
|
import '../fieldIds-VpluAAMl.js';
|
|
7
7
|
import '../hyphenize-TRhMI0tl.js';
|
|
8
8
|
import '../SelectFieldWrapper-D370CD4o.js';
|
|
9
9
|
import '../primitives/Field.js';
|
|
10
10
|
import '../utils-BJnb9o5c.js';
|
|
11
|
-
import '../HelpIcon-
|
|
11
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
12
12
|
import '../primitives/Tooltip.js';
|
|
13
13
|
import '../tooltip-BUYRFmEv.js';
|
|
14
14
|
import '../index-DNzunGHb.js';
|
|
@@ -35,17 +35,18 @@ import '../index-Bo3AAQJp.js';
|
|
|
35
35
|
import '../primitives/HoverCard.js';
|
|
36
36
|
import '../Typography-CmILccNh.js';
|
|
37
37
|
import '../index-CfriMyrd.js';
|
|
38
|
-
import '../Button-
|
|
38
|
+
import '../Button-DkIQvxAe.js';
|
|
39
39
|
import 'react-router-dom';
|
|
40
40
|
import '../primitives/Button.js';
|
|
41
|
-
import '../button-
|
|
41
|
+
import '../button-DTkEk06V.js';
|
|
42
42
|
import '../primitives/Spinner.js';
|
|
43
43
|
import 'react-i18next';
|
|
44
44
|
import '../loader-circle-DycHUAWN.js';
|
|
45
45
|
import '../label-YEsizr2c.js';
|
|
46
46
|
import '../separator-ByRsc-y-.js';
|
|
47
|
-
import '../Combobox-
|
|
48
|
-
import '../
|
|
47
|
+
import '../Combobox-CCstgdEa.js';
|
|
48
|
+
import '../useAriaHiddenCleanup-BIUbPJ6V.js';
|
|
49
|
+
import '../input-group-Ba2bJ2DW.js';
|
|
49
50
|
import '../input-CNbQc_tG.js';
|
|
50
51
|
import '../textarea-BZIsQ5UD.js';
|
|
51
52
|
import '../chevron-down-BNi0ntys.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../src/formik/Select.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport { useField, useFormikContext, getIn } from \"formik\";\nimport { dissoc } from \"ramda\";\n\nimport { Select, SelectProps } from \"src/components/Select\";\n\nexport type FormikSelectProps = SelectProps & {\n /** Formik field name. */\n name: string;\n};\n\nconst FormikSelect = forwardRef<HTMLInputElement, FormikSelectProps>(\n (props, ref) => {\n const { name, onOpenChange, onChange: onChangeProp, ...otherProps } = props;\n const [field, meta, { setValue, setTouched }] = useField(name);\n const { status = {}, setStatus } = useFormikContext();\n const fieldStatus = getIn(status, name);\n\n const selectProps = {\n ...otherProps,\n ref,\n error: meta.touched ? meta.error || fieldStatus : \"\",\n name: field.name,\n value: field.value,\n onOpenChange: (open: boolean) => {\n if (!open) setTouched(true, false);\n onOpenChange?.(open);\n },\n onChange: (value: unknown) => {\n setStatus(dissoc(name, status));\n setValue(value);\n (onChangeProp as ((v: unknown) => void) | undefined)?.(value);\n },\n };\n\n return <Select {...(selectProps as SelectProps)} />;\n }\n);\n\nFormikSelect.displayName = \"FormikSelect\";\n\nexport { FormikSelect };\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../src/formik/Select.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport { useField, useFormikContext, getIn } from \"formik\";\nimport { dissoc } from \"ramda\";\n\nimport { Select, SelectProps } from \"src/components/Select\";\n\nexport type FormikSelectProps = SelectProps & {\n /** Formik field name. */\n name: string;\n};\n\nconst FormikSelect = forwardRef<HTMLInputElement, FormikSelectProps>(\n (props, ref) => {\n const { name, onOpenChange, onChange: onChangeProp, ...otherProps } = props;\n const [field, meta, { setValue, setTouched }] = useField(name);\n const { status = {}, setStatus } = useFormikContext();\n const fieldStatus = getIn(status, name);\n\n const selectProps = {\n ...otherProps,\n ref,\n error: meta.touched ? meta.error || fieldStatus : \"\",\n name: field.name,\n value: field.value,\n onOpenChange: (open: boolean) => {\n if (!open) setTouched(true, false);\n onOpenChange?.(open);\n },\n onChange: (value: unknown) => {\n setStatus(dissoc(name, status));\n setValue(value);\n (onChangeProp as ((v: unknown) => void) | undefined)?.(value);\n },\n };\n\n return <Select {...(selectProps as SelectProps)} />;\n }\n);\n\nFormikSelect.displayName = \"FormikSelect\";\n\nexport { FormikSelect };\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,YAAA,GAAe,UAAA;AAAA,EACnB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,IAAA,EAAM,YAAA,EAAc,UAAU,YAAA,EAAc,GAAG,YAAW,GAAI,KAAA;AACtE,IAAA,MAAM,CAAC,OAAO,IAAA,EAAM,EAAE,UAAU,UAAA,EAAY,CAAA,GAAI,QAAA,CAAS,IAAI,CAAA;AAC7D,IAAA,MAAM,EAAE,MAAA,GAAS,EAAC,EAAG,SAAA,KAAc,gBAAA,EAAiB;AACpD,IAAA,MAAM,WAAA,GAAc,KAAA,CAAM,MAAA,EAAQ,IAAI,CAAA;AAEtC,IAAA,MAAM,WAAA,GAAc;AAAA,MAClB,GAAG,UAAA;AAAA,MACH,GAAA;AAAA,MACA,KAAA,EAAO,IAAA,CAAK,OAAA,GAAU,IAAA,CAAK,SAAS,WAAA,GAAc,EAAA;AAAA,MAClD,MAAM,KAAA,CAAM,IAAA;AAAA,MACZ,OAAO,KAAA,CAAM,KAAA;AAAA,MACb,YAAA,EAAc,CAAC,IAAA,KAAkB;AAC/B,QAAA,IAAI,CAAC,IAAA,EAAM,UAAA,CAAW,IAAA,EAAM,KAAK,CAAA;AACjC,QAAA,YAAA,GAAe,IAAI,CAAA;AAAA,MACrB,CAAA;AAAA,MACA,QAAA,EAAU,CAAC,KAAA,KAAmB;AAC5B,QAAA,SAAA,CAAU,MAAA,CAAO,IAAA,EAAM,MAAM,CAAC,CAAA;AAC9B,QAAA,QAAA,CAAS,KAAK,CAAA;AACd,QAAC,eAAsD,KAAK,CAAA;AAAA,MAC9D;AAAA,KACF;AAEA,IAAA,uBAAO,GAAA,CAAC,MAAA,EAAA,EAAQ,GAAI,WAAA,EAA6B,CAAA;AAAA,EACnD;AACF;AAEA,YAAA,CAAa,WAAA,GAAc,cAAA;;;;"}
|
package/dist/formik/Slider.js
CHANGED
|
@@ -18,7 +18,7 @@ import '../index-DhnfW8wQ.js';
|
|
|
18
18
|
import 'react-dom';
|
|
19
19
|
import '../index-Dd1i1d2M.js';
|
|
20
20
|
import '../primitives/Field.js';
|
|
21
|
-
import '../HelpIcon-
|
|
21
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
22
22
|
import '../primitives/Tooltip.js';
|
|
23
23
|
import '../tooltip-BUYRFmEv.js';
|
|
24
24
|
import '../index-BNPynZWM.js';
|
|
@@ -37,10 +37,10 @@ import '../index-Bo3AAQJp.js';
|
|
|
37
37
|
import '../primitives/HoverCard.js';
|
|
38
38
|
import '../Typography-CmILccNh.js';
|
|
39
39
|
import '../index-CfriMyrd.js';
|
|
40
|
-
import '../Button-
|
|
40
|
+
import '../Button-DkIQvxAe.js';
|
|
41
41
|
import 'react-router-dom';
|
|
42
42
|
import '../primitives/Button.js';
|
|
43
|
-
import '../button-
|
|
43
|
+
import '../button-DTkEk06V.js';
|
|
44
44
|
import '../primitives/Spinner.js';
|
|
45
45
|
import 'react-i18next';
|
|
46
46
|
import '../loader-circle-DycHUAWN.js';
|
package/dist/formik/Switch.js
CHANGED
|
@@ -5,7 +5,7 @@ import { S as Switch } from '../Switch-C9fqpoNR.js';
|
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../primitives/Field.js';
|
|
7
7
|
import '../utils-BJnb9o5c.js';
|
|
8
|
-
import '../HelpIcon-
|
|
8
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
9
9
|
import '../primitives/Tooltip.js';
|
|
10
10
|
import '../tooltip-BUYRFmEv.js';
|
|
11
11
|
import '../index-DNzunGHb.js';
|
|
@@ -32,10 +32,10 @@ import '../index-Bo3AAQJp.js';
|
|
|
32
32
|
import '../primitives/HoverCard.js';
|
|
33
33
|
import '../Typography-CmILccNh.js';
|
|
34
34
|
import '../index-CfriMyrd.js';
|
|
35
|
-
import '../Button-
|
|
35
|
+
import '../Button-DkIQvxAe.js';
|
|
36
36
|
import 'react-router-dom';
|
|
37
37
|
import '../primitives/Button.js';
|
|
38
|
-
import '../button-
|
|
38
|
+
import '../button-DTkEk06V.js';
|
|
39
39
|
import '../primitives/Spinner.js';
|
|
40
40
|
import 'react-i18next';
|
|
41
41
|
import '../loader-circle-DycHUAWN.js';
|
package/dist/formik/Textarea.js
CHANGED
|
@@ -5,7 +5,7 @@ import { dissoc } from 'ramda';
|
|
|
5
5
|
import { T as Textarea } from '../Textarea-CUe09-sr.js';
|
|
6
6
|
import '../utils-BJnb9o5c.js';
|
|
7
7
|
import '../primitives/Field.js';
|
|
8
|
-
import '../HelpIcon-
|
|
8
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
9
9
|
import '../primitives/Tooltip.js';
|
|
10
10
|
import '../tooltip-BUYRFmEv.js';
|
|
11
11
|
import '../index-DNzunGHb.js';
|
|
@@ -32,10 +32,10 @@ import '../index-Bo3AAQJp.js';
|
|
|
32
32
|
import '../primitives/HoverCard.js';
|
|
33
33
|
import '../Typography-CmILccNh.js';
|
|
34
34
|
import '../index-CfriMyrd.js';
|
|
35
|
-
import '../Button-
|
|
35
|
+
import '../Button-DkIQvxAe.js';
|
|
36
36
|
import 'react-router-dom';
|
|
37
37
|
import '../primitives/Button.js';
|
|
38
|
-
import '../button-
|
|
38
|
+
import '../button-DTkEk06V.js';
|
|
39
39
|
import '../primitives/Spinner.js';
|
|
40
40
|
import 'react-i18next';
|
|
41
41
|
import '../loader-circle-DycHUAWN.js';
|
|
@@ -24,7 +24,7 @@ import '../index-yFgkK_AM.js';
|
|
|
24
24
|
import '../index-Cor698lu.js';
|
|
25
25
|
import '../SelectFieldWrapper-D370CD4o.js';
|
|
26
26
|
import '../primitives/Field.js';
|
|
27
|
-
import '../HelpIcon-
|
|
27
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
28
28
|
import '../primitives/Tooltip.js';
|
|
29
29
|
import '../tooltip-BUYRFmEv.js';
|
|
30
30
|
import '../index-CSggBaQF.js';
|
|
@@ -35,10 +35,10 @@ import '../index-Bo3AAQJp.js';
|
|
|
35
35
|
import '../primitives/HoverCard.js';
|
|
36
36
|
import '../Typography-CmILccNh.js';
|
|
37
37
|
import '../index-CfriMyrd.js';
|
|
38
|
-
import '../Button-
|
|
38
|
+
import '../Button-DkIQvxAe.js';
|
|
39
39
|
import 'react-router-dom';
|
|
40
40
|
import '../primitives/Button.js';
|
|
41
|
-
import '../button-
|
|
41
|
+
import '../button-DTkEk06V.js';
|
|
42
42
|
import '../primitives/Spinner.js';
|
|
43
43
|
import 'react-i18next';
|
|
44
44
|
import '../loader-circle-DycHUAWN.js';
|
package/dist/formik/index.js
CHANGED
|
@@ -15,10 +15,10 @@ import 'react/jsx-runtime';
|
|
|
15
15
|
import 'react';
|
|
16
16
|
import 'formik';
|
|
17
17
|
import 'ramda';
|
|
18
|
-
import '../Input-
|
|
18
|
+
import '../Input-Dm5ILPH3.js';
|
|
19
19
|
import '../utils-BJnb9o5c.js';
|
|
20
20
|
import '../primitives/Field.js';
|
|
21
|
-
import '../HelpIcon-
|
|
21
|
+
import '../HelpIcon-EjtPpYCx.js';
|
|
22
22
|
import '../primitives/Tooltip.js';
|
|
23
23
|
import '../tooltip-BUYRFmEv.js';
|
|
24
24
|
import '../index-DNzunGHb.js';
|
|
@@ -45,17 +45,17 @@ import '../index-Bo3AAQJp.js';
|
|
|
45
45
|
import '../primitives/HoverCard.js';
|
|
46
46
|
import '../Typography-CmILccNh.js';
|
|
47
47
|
import '../index-CfriMyrd.js';
|
|
48
|
-
import '../Button-
|
|
48
|
+
import '../Button-DkIQvxAe.js';
|
|
49
49
|
import 'react-router-dom';
|
|
50
50
|
import '../primitives/Button.js';
|
|
51
|
-
import '../button-
|
|
51
|
+
import '../button-DTkEk06V.js';
|
|
52
52
|
import '../primitives/Spinner.js';
|
|
53
53
|
import 'react-i18next';
|
|
54
54
|
import '../loader-circle-DycHUAWN.js';
|
|
55
55
|
import '../label-YEsizr2c.js';
|
|
56
56
|
import '../separator-ByRsc-y-.js';
|
|
57
57
|
import '../primitives/InputGroup.js';
|
|
58
|
-
import '../input-group-
|
|
58
|
+
import '../input-group-Ba2bJ2DW.js';
|
|
59
59
|
import '../input-CNbQc_tG.js';
|
|
60
60
|
import '../textarea-BZIsQ5UD.js';
|
|
61
61
|
import '../fieldIds-VpluAAMl.js';
|
|
@@ -63,9 +63,10 @@ import '../hyphenize-TRhMI0tl.js';
|
|
|
63
63
|
import '../withIconSize-BonoFXeH.js';
|
|
64
64
|
import '../Textarea-CUe09-sr.js';
|
|
65
65
|
import '../primitives/Textarea.js';
|
|
66
|
-
import '../Select-
|
|
66
|
+
import '../Select-CLSJgvl6.js';
|
|
67
67
|
import '../SelectFieldWrapper-D370CD4o.js';
|
|
68
|
-
import '../Combobox-
|
|
68
|
+
import '../Combobox-CCstgdEa.js';
|
|
69
|
+
import '../useAriaHiddenCleanup-BIUbPJ6V.js';
|
|
69
70
|
import '../chevron-down-BNi0ntys.js';
|
|
70
71
|
import '../x-_o2T3n6D.js';
|
|
71
72
|
import '../check-Cpkv29p1.js';
|
|
@@ -96,6 +97,6 @@ import '../redux-BKH6DnBB.js';
|
|
|
96
97
|
import '../MultiEmailInput-D2uHxkeV.js';
|
|
97
98
|
import '../Dialog-Yw34WDqY.js';
|
|
98
99
|
import '../primitives/Dialog.js';
|
|
99
|
-
import '../dialog-
|
|
100
|
+
import '../dialog-BG8Tjl78.js';
|
|
100
101
|
import '../DialogTrigger-a3diAOif.js';
|
|
101
102
|
//# sourceMappingURL=index.js.map
|
package/dist/formik/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* neeto-atoms ships two independent `aria-hidden` lock systems: Base UI's
|
|
3
|
+
* `markOthers` (Dialog, Sheet, Combobox) and the `aria-hidden` package pulled in
|
|
4
|
+
* by the Radix based primitives (Popover, Menu, Drawer, …). Each keeps its own
|
|
5
|
+
* reference counts, so when a Radix popup hides the page first and Base UI opens
|
|
6
|
+
* on top of it, Base UI records the page as "hidden by someone else" and skips
|
|
7
|
+
* removing `aria-hidden` when its own last popup closes. The page then stays out
|
|
8
|
+
* of the accessibility tree with nothing open.
|
|
9
|
+
*
|
|
10
|
+
* Mount this alongside a Base UI popup. It watches for `aria-hidden` being
|
|
11
|
+
* applied by a lock and clears those, and only those, once every lock has let go
|
|
12
|
+
* — an `aria-hidden` the page put there itself is never observed being applied
|
|
13
|
+
* and so is never touched.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useAriaHiddenCleanup: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Renders nothing; mount it inside the portal so the cleanup is scoped to the
|
|
18
|
+
* lifetime of the popup rather than to the component that declares it.
|
|
19
|
+
*/
|
|
20
|
+
export declare const AriaHiddenCleanup: () => null;
|
package/dist/index.css
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
--color-popover-foreground: var(--popover-foreground);
|
|
23
23
|
--color-primary: var(--primary);
|
|
24
24
|
--color-primary-foreground: var(--primary-foreground);
|
|
25
|
+
--color-brand: var(--brand);
|
|
26
|
+
--color-brand-foreground: var(--brand-foreground);
|
|
25
27
|
--color-secondary: var(--secondary);
|
|
26
28
|
--color-secondary-foreground: var(--secondary-foreground);
|
|
27
29
|
--color-muted: var(--muted);
|
|
@@ -93,6 +95,8 @@
|
|
|
93
95
|
--popover-foreground: oklch(0.145 0 0);
|
|
94
96
|
--primary: oklch(0.205 0 0);
|
|
95
97
|
--primary-foreground: oklch(0.985 0 0);
|
|
98
|
+
--brand: oklch(0.5349 0.1023 173.46);
|
|
99
|
+
--brand-foreground: oklch(1 0 0);
|
|
96
100
|
--secondary: oklch(0.97 0 0);
|
|
97
101
|
--secondary-foreground: oklch(0.205 0 0);
|
|
98
102
|
--muted: oklch(0.97 0 0);
|
|
@@ -153,6 +157,8 @@
|
|
|
153
157
|
--popover-foreground: oklch(0.985 0 0);
|
|
154
158
|
--primary: oklch(0.922 0 0);
|
|
155
159
|
--primary-foreground: oklch(0.205 0 0);
|
|
160
|
+
--brand: oklch(0.55 0.102 173.46);
|
|
161
|
+
--brand-foreground: oklch(1 0 0);
|
|
156
162
|
--secondary: oklch(0.269 0 0);
|
|
157
163
|
--secondary-foreground: oklch(0.985 0 0);
|
|
158
164
|
--muted: oklch(0.269 0 0);
|
package/dist/index.js
CHANGED
|
@@ -5,27 +5,27 @@ export { DropdownMenu } from './components/DropdownMenu.js';
|
|
|
5
5
|
export { u as useIsMobile } from './use-mobile-QbHL72cX.js';
|
|
6
6
|
export { c as cn } from './utils-BJnb9o5c.js';
|
|
7
7
|
export { A as Accordion } from './Accordion-DVMgPBum.js';
|
|
8
|
-
export { A as Alert } from './Alert-
|
|
8
|
+
export { A as Alert } from './Alert-D5GO59Aj.js';
|
|
9
9
|
export { A as Avatar } from './Avatar-Dg5-X_dH.js';
|
|
10
10
|
export { B as Badge } from './Badge-Bl5cyQ5Q.js';
|
|
11
|
-
export { b as Button } from './Button-
|
|
11
|
+
export { b as Button } from './Button-DkIQvxAe.js';
|
|
12
12
|
export { C as Callout } from './Callout-DJGi3MQR.js';
|
|
13
13
|
export { C as Checkbox } from './Checkbox-BalUzegZ.js';
|
|
14
14
|
export { C as ColorPicker } from './ColorPicker-ClnRUq9y.js';
|
|
15
|
-
export { D as DataTable, u as useColumnOrdering, a as useColumnPinning, b as useColumnVisibility, c as useTablePagination, d as useTableSelection, e as useTableSort } from './DataTable-
|
|
15
|
+
export { D as DataTable, u as useColumnOrdering, a as useColumnPinning, b as useColumnVisibility, c as useTablePagination, d as useTableSelection, e as useTableSort } from './DataTable-Dd2QcXL-.js';
|
|
16
16
|
export { D as DatePicker } from './DatePicker-Ds_csFkl.js';
|
|
17
17
|
export { D as Dialog } from './Dialog-Yw34WDqY.js';
|
|
18
18
|
export { D as DirectionProvider } from './DirectionProvider-weqLz_BJ.js';
|
|
19
|
-
export { E as Empty } from './Empty-
|
|
20
|
-
export { I as Input } from './Input-
|
|
19
|
+
export { E as Empty } from './Empty-Rbdjvttt.js';
|
|
20
|
+
export { I as Input } from './Input-Dm5ILPH3.js';
|
|
21
21
|
export { K as Kbd } from './Kbd-CKfR8HlC.js';
|
|
22
|
-
export { L as Label } from './Label-
|
|
22
|
+
export { L as Label } from './Label-Cr83bru_.js';
|
|
23
23
|
export { M as MultiEmailInput } from './MultiEmailInput-D2uHxkeV.js';
|
|
24
24
|
export { P as Pagination } from './Pagination-yjG8uCpV.js';
|
|
25
25
|
export { P as Popover } from './Popover-BHGvcdV2.js';
|
|
26
26
|
export { P as Progress } from './Progress-DbtLbWf8.js';
|
|
27
27
|
export { R as RadioGroup } from './RadioGroup-CBXByAMW.js';
|
|
28
|
-
export { S as Select } from './Select-
|
|
28
|
+
export { S as Select } from './Select-CLSJgvl6.js';
|
|
29
29
|
export { S as Sheet } from './Sheet-D1MWtg1q.js';
|
|
30
30
|
export { S as Slider } from './Slider-CxQdlyHZ.js';
|
|
31
31
|
export { S as Spinner } from './Spinner-vfggfvEp.js';
|
|
@@ -70,7 +70,7 @@ import './index-yFgkK_AM.js';
|
|
|
70
70
|
import './index-DT56XkyA.js';
|
|
71
71
|
import './hyphenize-TRhMI0tl.js';
|
|
72
72
|
import './primitives/Button.js';
|
|
73
|
-
import './button-
|
|
73
|
+
import './button-DTkEk06V.js';
|
|
74
74
|
import './index-Bo3AAQJp.js';
|
|
75
75
|
import './index-CfriMyrd.js';
|
|
76
76
|
import './primitives/ButtonGroup.js';
|
|
@@ -81,7 +81,8 @@ import './primitives/Accordion.js';
|
|
|
81
81
|
import './chevron-up-Bf2G3AAU.js';
|
|
82
82
|
import './index-0o2E3Cnw.js';
|
|
83
83
|
import './primitives/Dialog.js';
|
|
84
|
-
import './
|
|
84
|
+
import './useAriaHiddenCleanup-BIUbPJ6V.js';
|
|
85
|
+
import './dialog-BG8Tjl78.js';
|
|
85
86
|
import './x-_o2T3n6D.js';
|
|
86
87
|
import './DialogTrigger-a3diAOif.js';
|
|
87
88
|
import './useOpenInteractionType-CVfxIsuz.js';
|
|
@@ -103,7 +104,7 @@ import './primitives/Checkbox.js';
|
|
|
103
104
|
import './index-30QpKM0j.js';
|
|
104
105
|
import './fieldIds-VpluAAMl.js';
|
|
105
106
|
import './primitives/Field.js';
|
|
106
|
-
import './HelpIcon-
|
|
107
|
+
import './HelpIcon-EjtPpYCx.js';
|
|
107
108
|
import './label-YEsizr2c.js';
|
|
108
109
|
import 'react-colorful';
|
|
109
110
|
import './primitives/Popover.js';
|
|
@@ -119,7 +120,7 @@ import 'dayjs';
|
|
|
119
120
|
import 'dayjs/plugin/customParseFormat';
|
|
120
121
|
import './primitives/Empty.js';
|
|
121
122
|
import './primitives/InputGroup.js';
|
|
122
|
-
import './input-group-
|
|
123
|
+
import './input-group-Ba2bJ2DW.js';
|
|
123
124
|
import './input-CNbQc_tG.js';
|
|
124
125
|
import './textarea-BZIsQ5UD.js';
|
|
125
126
|
import './withIconSize-BonoFXeH.js';
|
|
@@ -129,9 +130,9 @@ import './primitives/HoverCard.js';
|
|
|
129
130
|
import './primitives/Progress.js';
|
|
130
131
|
import './primitives/RadioGroup.js';
|
|
131
132
|
import './SelectFieldWrapper-D370CD4o.js';
|
|
132
|
-
import './Combobox-
|
|
133
|
+
import './Combobox-CCstgdEa.js';
|
|
133
134
|
import './primitives/Sheet.js';
|
|
134
|
-
import './sheet-
|
|
135
|
+
import './sheet-BD8c3_Va.js';
|
|
135
136
|
import './primitives/Slider.js';
|
|
136
137
|
import './primitives/Switch.js';
|
|
137
138
|
import './primitives/Tabs.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/utils/timezone.ts"],"sourcesContent":["import type { Dayjs } from \"dayjs\";\nimport { dayjs } from \"@bigbinary/neeto-commons-frontend/utils\";\n\n/**\n * Apply the configured timezone to a date value.\n * Strips the original timezone and reinterprets via neetocommons' dayjs wrapper.\n * Handles both single dates and arrays (for date ranges).\n */\nexport const getTimezoneAppliedDateTime = (\n inputDateTime: Dayjs | Dayjs[] | null\n): Dayjs | (Dayjs | null)[] | null => {\n const apply = (date: Dayjs | null): Dayjs | null =>\n date && typeof date.format === \"function\"\n ? dayjs(date.format(\"YYYY-MM-DD HH:mm:ss\"))\n : null;\n\n return Array.isArray(inputDateTime)\n ? inputDateTime.map(apply)\n : apply(inputDateTime);\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/utils/timezone.ts"],"sourcesContent":["import type { Dayjs } from \"dayjs\";\nimport { dayjs } from \"@bigbinary/neeto-commons-frontend/utils\";\n\n/**\n * Apply the configured timezone to a date value.\n * Strips the original timezone and reinterprets via neetocommons' dayjs wrapper.\n * Handles both single dates and arrays (for date ranges).\n */\nexport const getTimezoneAppliedDateTime = (\n inputDateTime: Dayjs | Dayjs[] | null\n): Dayjs | (Dayjs | null)[] | null => {\n const apply = (date: Dayjs | null): Dayjs | null =>\n date && typeof date.format === \"function\"\n ? dayjs(date.format(\"YYYY-MM-DD HH:mm:ss\"))\n : null;\n\n return Array.isArray(inputDateTime)\n ? inputDateTime.map(apply)\n : apply(inputDateTime);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,MAAM,0BAAA,GAA6B,CACxC,aAAA,KACoC;AACpC,EAAA,MAAM,KAAA,GAAQ,CAAC,IAAA,KACb,IAAA,IAAQ,OAAO,IAAA,CAAK,MAAA,KAAW,UAAA,GAC3B,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,qBAAqB,CAAC,CAAA,GACxC,IAAA;AAEN,EAAA,OAAO,KAAA,CAAM,QAAQ,aAAa,CAAA,GAC9B,cAAc,GAAA,CAAI,KAAK,CAAA,GACvB,KAAA,CAAM,aAAa,CAAA;AACzB;;;;"}
|
|
@@ -2,7 +2,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { c as cva } from './index-Bo3AAQJp.js';
|
|
4
4
|
import { c as cn } from './utils-BJnb9o5c.js';
|
|
5
|
-
import { B as Button } from './button-
|
|
5
|
+
import { B as Button } from './button-DTkEk06V.js';
|
|
6
6
|
import { I as Input } from './input-CNbQc_tG.js';
|
|
7
7
|
import { T as Textarea } from './textarea-BZIsQ5UD.js';
|
|
8
8
|
|
|
@@ -132,4 +132,4 @@ const InputGroupTextarea = React.forwardRef(({ className, ...props }, ref) => /*
|
|
|
132
132
|
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
133
133
|
|
|
134
134
|
export { InputGroupInput as I, InputGroupTextarea as a, InputGroup as b, InputGroupAddon as c, InputGroupText as d, InputGroupButton as e };
|
|
135
|
-
//# sourceMappingURL=input-group-
|
|
135
|
+
//# sourceMappingURL=input-group-Ba2bJ2DW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group-
|
|
1
|
+
{"version":3,"file":"input-group-Ba2bJ2DW.js","sources":["../src/shadcn/components/input-group.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"src/shadcn/lib/utils\"\nimport { Button } from \"src/shadcn/components/button\"\nimport { Input } from \"src/shadcn/components/input\"\nimport { Textarea } from \"src/shadcn/components/textarea\"\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst inputGroupAddonVariants = cva(\n \"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n align: {\n \"inline-start\":\n \"order-first ps-2 has-[>button]:ms-[-0.3rem] has-[>kbd]:ms-[-0.15rem]\",\n \"inline-end\":\n \"order-last pe-2 has-[>button]:me-[-0.3rem] has-[>kbd]:me-[-0.15rem]\",\n \"block-start\":\n \"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2\",\n \"block-end\":\n \"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n }\n)\n\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus()\n }}\n {...props}\n />\n )\n}\n\nconst inputGroupButtonVariants = cva(\n \"flex items-center gap-2 text-sm shadow-none\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\":\n \"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n }\n)\n\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> &\n VariantProps<typeof inputGroupButtonVariants>) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n )\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n className={cn(\n \"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst InputGroupInput = React.forwardRef<\n HTMLInputElement,\n React.ComponentProps<\"input\">\n>(({ className, ...props }, ref) => (\n <Input\n ref={ref}\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n className\n )}\n {...props}\n />\n))\n\nInputGroupInput.displayName = \"InputGroupInput\"\n\nconst InputGroupTextarea = React.forwardRef<\n HTMLTextAreaElement,\n React.ComponentProps<\"textarea\">\n>(({ className, ...props }, ref) => (\n <Textarea\n ref={ref}\n data-slot=\"input-group-control\"\n className={cn(\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent\",\n className\n )}\n {...props}\n />\n))\n\nInputGroupTextarea.displayName = \"InputGroupTextarea\"\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n}\n"],"names":[],"mappings":";;;;;;;;AAQA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACxE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,IAAA,EAAK,OAAA;AAAA,MACL,SAAA,EAAW,EAAA;AAAA,QACT,ulCAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;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