@protonradio/proton-ui 0.11.10 → 0.11.12
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/_virtual/jsx-runtime.cjs.js +2 -0
- package/dist/_virtual/jsx-runtime.cjs.js.map +1 -0
- package/dist/_virtual/jsx-runtime.es.js +5 -0
- package/dist/_virtual/jsx-runtime.es.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.development.cjs.js +2 -0
- package/dist/_virtual/react-jsx-runtime.development.cjs.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.development.es.js +5 -0
- package/dist/_virtual/react-jsx-runtime.development.es.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.cjs.js +2 -0
- package/dist/_virtual/react-jsx-runtime.production.min.cjs.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.es.js +5 -0
- package/dist/_virtual/react-jsx-runtime.production.min.es.js.map +1 -0
- package/dist/assets/svg/icons.svg.cjs.js +2 -0
- package/dist/assets/svg/icons.svg.cjs.js.map +1 -0
- package/dist/assets/svg/icons.svg.es.js +5 -0
- package/dist/assets/svg/icons.svg.es.js.map +1 -0
- package/dist/components/ActionMenu/ActionMenu.cjs.js +2 -0
- package/dist/components/ActionMenu/ActionMenu.cjs.js.map +1 -0
- package/dist/components/ActionMenu/ActionMenu.es.js +277 -0
- package/dist/components/ActionMenu/ActionMenu.es.js.map +1 -0
- package/dist/components/Badge/Badge.cjs.js +2 -0
- package/dist/components/Badge/Badge.cjs.js.map +1 -0
- package/dist/components/Badge/Badge.es.js +25 -0
- package/dist/components/Badge/Badge.es.js.map +1 -0
- package/dist/components/Banner/Banner.cjs.js +2 -0
- package/dist/components/Banner/Banner.cjs.js.map +1 -0
- package/dist/components/Banner/Banner.es.js +131 -0
- package/dist/components/Banner/Banner.es.js.map +1 -0
- package/dist/components/Button/Button.cjs.js +2 -0
- package/dist/components/Button/Button.cjs.js.map +1 -0
- package/dist/components/Button/Button.es.js +99 -0
- package/dist/components/Button/Button.es.js.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js +2 -0
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.es.js +51 -0
- package/dist/components/ButtonGroup/ButtonGroup.es.js.map +1 -0
- package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js +2 -0
- package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js.map +1 -0
- package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js +80 -0
- package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js.map +1 -0
- package/dist/components/DataTable/DataTable.cjs.js +2 -0
- package/dist/components/DataTable/DataTable.cjs.js.map +1 -0
- package/dist/components/DataTable/DataTable.es.js +137 -0
- package/dist/components/DataTable/DataTable.es.js.map +1 -0
- package/dist/components/Dialog/Dialog.cjs.js +2 -0
- package/dist/components/Dialog/Dialog.cjs.js.map +1 -0
- package/dist/components/Dialog/Dialog.es.js +15 -0
- package/dist/components/Dialog/Dialog.es.js.map +1 -0
- package/dist/components/Elevation/Elevation.cjs.js +2 -0
- package/dist/components/Elevation/Elevation.cjs.js.map +1 -0
- package/dist/components/Elevation/Elevation.es.js +33 -0
- package/dist/components/Elevation/Elevation.es.js.map +1 -0
- package/dist/components/Icon/Icon.cjs.js +2 -0
- package/dist/components/Icon/Icon.cjs.js.map +1 -0
- package/dist/components/Icon/Icon.es.js +42 -0
- package/dist/components/Icon/Icon.es.js.map +1 -0
- package/dist/components/ImageBackground/ImageBackground.cjs.js +2 -0
- package/dist/components/ImageBackground/ImageBackground.cjs.js.map +1 -0
- package/dist/components/ImageBackground/ImageBackground.es.js +55 -0
- package/dist/components/ImageBackground/ImageBackground.es.js.map +1 -0
- package/dist/components/Input/BaseInput/Input.cjs.js +2 -0
- package/dist/components/Input/BaseInput/Input.cjs.js.map +1 -0
- package/dist/components/Input/BaseInput/Input.es.js +186 -0
- package/dist/components/Input/BaseInput/Input.es.js.map +1 -0
- package/dist/components/Input/CopyInput/CopyInput.cjs.js +2 -0
- package/dist/components/Input/CopyInput/CopyInput.cjs.js.map +1 -0
- package/dist/components/Input/CopyInput/CopyInput.es.js +83 -0
- package/dist/components/Input/CopyInput/CopyInput.es.js.map +1 -0
- package/dist/components/Input/SearchInput/SearchInput.cjs.js +2 -0
- package/dist/components/Input/SearchInput/SearchInput.cjs.js.map +1 -0
- package/dist/components/Input/SearchInput/SearchInput.es.js +118 -0
- package/dist/components/Input/SearchInput/SearchInput.es.js.map +1 -0
- package/dist/components/Menu/MenuTrigger.cjs.js +2 -0
- package/dist/components/Menu/MenuTrigger.cjs.js.map +1 -0
- package/dist/components/Menu/MenuTrigger.es.js +89 -0
- package/dist/components/Menu/MenuTrigger.es.js.map +1 -0
- package/dist/components/Menu/PopoverMenu.cjs.js +2 -0
- package/dist/components/Menu/PopoverMenu.cjs.js.map +1 -0
- package/dist/components/Menu/PopoverMenu.es.js +122 -0
- package/dist/components/Menu/PopoverMenu.es.js.map +1 -0
- package/dist/components/Modal/Modal.cjs.js +2 -0
- package/dist/components/Modal/Modal.cjs.js.map +1 -0
- package/dist/components/Modal/Modal.es.js +122 -0
- package/dist/components/Modal/Modal.es.js.map +1 -0
- package/dist/components/Popover/Popover.cjs.js +2 -0
- package/dist/components/Popover/Popover.cjs.js.map +1 -0
- package/dist/components/Popover/Popover.es.js +54 -0
- package/dist/components/Popover/Popover.es.js.map +1 -0
- package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js +2 -0
- package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js.map +1 -0
- package/dist/components/ScreenOverlay/ScreenOverlay.es.js +44 -0
- package/dist/components/ScreenOverlay/ScreenOverlay.es.js.map +1 -0
- package/dist/components/Select/Select.cjs.js +2 -0
- package/dist/components/Select/Select.cjs.js.map +1 -0
- package/dist/components/Select/Select.es.js +228 -0
- package/dist/components/Select/Select.es.js.map +1 -0
- package/dist/components/Switch/Switch.cjs.js +2 -0
- package/dist/components/Switch/Switch.cjs.js.map +1 -0
- package/dist/components/Switch/Switch.es.js +40 -0
- package/dist/components/Switch/Switch.es.js.map +1 -0
- package/dist/components/Table/Collection/CompoundComponents.cjs.js +2 -0
- package/dist/components/Table/Collection/CompoundComponents.cjs.js.map +1 -0
- package/dist/components/Table/Collection/CompoundComponents.es.js +9 -0
- package/dist/components/Table/Collection/CompoundComponents.es.js.map +1 -0
- package/dist/components/Table/Collection/collectionParser.cjs.js +2 -0
- package/dist/components/Table/Collection/collectionParser.cjs.js.map +1 -0
- package/dist/components/Table/Collection/collectionParser.es.js +54 -0
- package/dist/components/Table/Collection/collectionParser.es.js.map +1 -0
- package/dist/components/Table/Collection/useTableCollection.cjs.js +2 -0
- package/dist/components/Table/Collection/useTableCollection.cjs.js.map +1 -0
- package/dist/components/Table/Collection/useTableCollection.es.js +59 -0
- package/dist/components/Table/Collection/useTableCollection.es.js.map +1 -0
- package/dist/components/Table/Table.cjs.js +2 -0
- package/dist/components/Table/Table.cjs.js.map +1 -0
- package/dist/components/Table/Table.es.js +89 -0
- package/dist/components/Table/Table.es.js.map +1 -0
- package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js +2 -0
- package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js.map +1 -0
- package/dist/components/Text/TextEllipsis/TextEllipsis.es.js +30 -0
- package/dist/components/Text/TextEllipsis/TextEllipsis.es.js.map +1 -0
- package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js +2 -0
- package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js.map +1 -0
- package/dist/components/Text/TextEmphasis/TextEmphasis.es.js +54 -0
- package/dist/components/Text/TextEmphasis/TextEmphasis.es.js.map +1 -0
- package/dist/components/ThemeProvider.cjs.js +2 -0
- package/dist/components/ThemeProvider.cjs.js.map +1 -0
- package/dist/components/ThemeProvider.es.js +42 -0
- package/dist/components/ThemeProvider.es.js.map +1 -0
- package/dist/components/Tombstone/Tombstone.cjs.js +2 -0
- package/dist/components/Tombstone/Tombstone.cjs.js.map +1 -0
- package/dist/components/Tombstone/Tombstone.es.js +35 -0
- package/dist/components/Tombstone/Tombstone.es.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.cjs.js +2 -0
- package/dist/components/Tooltip/Tooltip.cjs.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.es.js +78 -0
- package/dist/components/Tooltip/Tooltip.es.js.map +1 -0
- package/dist/components/Waveform/Waveform.cjs.js +2 -0
- package/dist/components/Waveform/Waveform.cjs.js.map +1 -0
- package/dist/components/Waveform/Waveform.es.js +163 -0
- package/dist/components/Waveform/Waveform.es.js.map +1 -0
- package/dist/components/Waveform/WaveformBar.cjs.js +2 -0
- package/dist/components/Waveform/WaveformBar.cjs.js.map +1 -0
- package/dist/components/Waveform/WaveformBar.es.js +74 -0
- package/dist/components/Waveform/WaveformBar.es.js.map +1 -0
- package/dist/constants/breakpoint.cjs.js +2 -0
- package/dist/constants/breakpoint.cjs.js.map +1 -0
- package/dist/{breakpoint-9y1_8U_b.mjs → constants/breakpoint.es.js} +2 -2
- package/dist/constants/breakpoint.es.js.map +1 -0
- package/dist/constants/placement.cjs.js +2 -0
- package/dist/constants/placement.cjs.js.map +1 -0
- package/dist/constants/placement.es.js +28 -0
- package/dist/constants/placement.es.js.map +1 -0
- package/dist/constants.cjs.js +1 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +3 -26
- package/dist/constants.es.js.map +1 -1
- package/dist/dark.cjs.js +1 -1
- package/dist/dark.cjs.js.map +1 -1
- package/dist/dark.es.js +8 -55
- package/dist/dark.es.js.map +1 -1
- package/dist/design/colors.cjs.js +2 -0
- package/dist/design/colors.cjs.js.map +1 -0
- package/dist/{colors-CWaj9dFz.mjs → design/colors.es.js} +7 -7
- package/dist/design/colors.es.js.map +1 -0
- package/dist/design/darkTheme/colors.cjs.js +2 -0
- package/dist/{colors-Ceyo4oCJ.mjs.map → design/darkTheme/colors.cjs.js.map} +1 -1
- package/dist/{colors-Ceyo4oCJ.mjs → design/darkTheme/colors.es.js} +13 -13
- package/dist/{colors-CebzFjpe.js.map → design/darkTheme/colors.es.js.map} +1 -1
- package/dist/design/darkTheme/stylesheet.cjs.js +2 -0
- package/dist/design/darkTheme/stylesheet.cjs.js.map +1 -0
- package/dist/design/darkTheme/stylesheet.es.js +52 -0
- package/dist/design/darkTheme/stylesheet.es.js.map +1 -0
- package/dist/design/generateStylesheet.cjs.js +2 -0
- package/dist/design/generateStylesheet.cjs.js.map +1 -0
- package/dist/design/generateStylesheet.es.js +26 -0
- package/dist/design/generateStylesheet.es.js.map +1 -0
- package/dist/design/lightTheme/colors.cjs.js +2 -0
- package/dist/{colors-DMkDnu4U.mjs.map → design/lightTheme/colors.cjs.js.map} +1 -1
- package/dist/{colors-DMkDnu4U.mjs → design/lightTheme/colors.es.js} +11 -11
- package/dist/{colors-DL1dYffC.js.map → design/lightTheme/colors.es.js.map} +1 -1
- package/dist/design/lightTheme/stylesheet.cjs.js +2 -0
- package/dist/design/lightTheme/stylesheet.cjs.js.map +1 -0
- package/dist/design/lightTheme/stylesheet.es.js +52 -0
- package/dist/design/lightTheme/stylesheet.es.js.map +1 -0
- package/dist/design/theme.cjs.js +2 -0
- package/dist/design/theme.cjs.js.map +1 -0
- package/dist/design/theme.es.js +12 -0
- package/dist/design/theme.es.js.map +1 -0
- package/dist/hooks/useBreakpoint.cjs.js +2 -0
- package/dist/hooks/useBreakpoint.cjs.js.map +1 -0
- package/dist/hooks/useBreakpoint.es.js +17 -0
- package/dist/hooks/useBreakpoint.es.js.map +1 -0
- package/dist/hooks/useIsClosing.cjs.js +2 -0
- package/dist/hooks/useIsClosing.cjs.js.map +1 -0
- package/dist/hooks/useIsClosing.es.js +30 -0
- package/dist/hooks/useIsClosing.es.js.map +1 -0
- package/dist/hooks/useLockBodyScroll.cjs.js +2 -0
- package/dist/hooks/useLockBodyScroll.cjs.js.map +1 -0
- package/dist/hooks/useLockBodyScroll.es.js +14 -0
- package/dist/hooks/useLockBodyScroll.es.js.map +1 -0
- package/dist/hooks/usePalette.cjs.js +2 -0
- package/dist/hooks/usePalette.cjs.js.map +1 -0
- package/dist/hooks/usePalette.es.js +37 -0
- package/dist/hooks/usePalette.es.js.map +1 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.cjs.js.map +1 -1
- package/dist/hooks.es.js +8 -37
- package/dist/hooks.es.js.map +1 -1
- package/dist/index.cjs.js +1 -36
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +60 -5421
- package/dist/index.es.js.map +1 -1
- package/dist/light.cjs.js +1 -1
- package/dist/light.cjs.js.map +1 -1
- package/dist/light.es.js +8 -55
- package/dist/light.es.js.map +1 -1
- package/dist/node_modules/@react-aria/button/dist/useButton.cjs.js +2 -0
- package/dist/node_modules/@react-aria/button/dist/useButton.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/button/dist/useButton.es.js +55 -0
- package/dist/node_modules/@react-aria/button/dist/useButton.es.js.map +1 -0
- package/dist/node_modules/@react-aria/dialog/dist/useDialog.cjs.js +2 -0
- package/dist/node_modules/@react-aria/dialog/dist/useDialog.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/dialog/dist/useDialog.es.js +44 -0
- package/dist/node_modules/@react-aria/dialog/dist/useDialog.es.js.map +1 -0
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.cjs.js +2 -0
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.es.js +437 -0
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.es.js.map +1 -0
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.cjs.js +2 -0
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.es.js +78 -0
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.es.js.map +1 -0
- package/dist/node_modules/@react-aria/i18n/dist/context.cjs.js +2 -0
- package/dist/node_modules/@react-aria/i18n/dist/context.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/i18n/dist/context.es.js +11 -0
- package/dist/node_modules/@react-aria/i18n/dist/context.es.js.map +1 -0
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.cjs.js +2 -0
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.es.js +30 -0
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.es.js.map +1 -0
- package/dist/node_modules/@react-aria/i18n/dist/utils.cjs.js +2 -0
- package/dist/node_modules/@react-aria/i18n/dist/utils.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/i18n/dist/utils.es.js +45 -0
- package/dist/node_modules/@react-aria/i18n/dist/utils.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/context.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/context.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/context.es.js +10 -0
- package/dist/node_modules/@react-aria/interactions/dist/context.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.es.js +29 -0
- package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.es.js +15 -0
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/textSelection.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/textSelection.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/textSelection.es.js +35 -0
- package/dist/node_modules/@react-aria/interactions/dist/textSelection.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.es.js +30 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.es.js +63 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.es.js +56 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js +42 -0
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.es.js +51 -0
- package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.es.js +13 -0
- package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js +8 -0
- package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/usePress.es.js +386 -0
- package/dist/node_modules/@react-aria/interactions/dist/usePress.es.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.cjs.js +2 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.es.js +92 -0
- package/dist/node_modules/@react-aria/interactions/dist/utils.es.js.map +1 -0
- package/dist/node_modules/@react-aria/label/dist/useField.cjs.js +2 -0
- package/dist/node_modules/@react-aria/label/dist/useField.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/label/dist/useField.es.js +36 -0
- package/dist/node_modules/@react-aria/label/dist/useField.es.js.map +1 -0
- package/dist/node_modules/@react-aria/label/dist/useLabel.cjs.js +2 -0
- package/dist/node_modules/@react-aria/label/dist/useLabel.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/label/dist/useLabel.es.js +23 -0
- package/dist/node_modules/@react-aria/label/dist/useLabel.es.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js +2 -0
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.es.js +16 -0
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.es.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.cjs.js +2 -0
- package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.es.js +70 -0
- package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.es.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.cjs.js +2 -0
- package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.es.js +32 -0
- package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.es.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/useOverlay.cjs.js +2 -0
- package/dist/node_modules/@react-aria/overlays/dist/useOverlay.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/useOverlay.es.js +53 -0
- package/dist/node_modules/@react-aria/overlays/dist/useOverlay.es.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.cjs.js +2 -0
- package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.es.js +100 -0
- package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.es.js.map +1 -0
- package/dist/node_modules/@react-aria/radio/dist/useRadio.cjs.js +2 -0
- package/dist/node_modules/@react-aria/radio/dist/useRadio.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/radio/dist/useRadio.es.js +70 -0
- package/dist/node_modules/@react-aria/radio/dist/useRadio.es.js.map +1 -0
- package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.cjs.js +2 -0
- package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.es.js +80 -0
- package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.es.js.map +1 -0
- package/dist/node_modules/@react-aria/radio/dist/utils.cjs.js +2 -0
- package/dist/node_modules/@react-aria/radio/dist/utils.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/radio/dist/utils.es.js +5 -0
- package/dist/node_modules/@react-aria/radio/dist/utils.es.js.map +1 -0
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.cjs.js +2 -0
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.es.js +19 -0
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.es.js.map +1 -0
- package/dist/node_modules/@react-aria/switch/dist/useSwitch.cjs.js +2 -0
- package/dist/node_modules/@react-aria/switch/dist/useSwitch.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/switch/dist/useSwitch.es.js +20 -0
- package/dist/node_modules/@react-aria/switch/dist/useSwitch.es.js.map +1 -0
- package/dist/node_modules/@react-aria/toggle/dist/useToggle.cjs.js +2 -0
- package/dist/node_modules/@react-aria/toggle/dist/useToggle.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/toggle/dist/useToggle.es.js +60 -0
- package/dist/node_modules/@react-aria/toggle/dist/useToggle.es.js.map +1 -0
- package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.cjs.js +2 -0
- package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.cjs.js.map +1 -0
- package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.es.js +41 -0
- package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.es.js.map +1 -0
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.cjs.js +2 -0
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.cjs.js.map +1 -0
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.es.js +110 -0
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.es.js.map +1 -0
- package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.cjs.js +2 -0
- package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.cjs.js.map +1 -0
- package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.es.js +30 -0
- package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.es.js.map +1 -0
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.cjs.js +2 -0
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.cjs.js.map +1 -0
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.es.js +35 -0
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.es.js.map +1 -0
- package/dist/node_modules/@react-stately/toggle/dist/useToggleState.cjs.js +2 -0
- package/dist/node_modules/@react-stately/toggle/dist/useToggleState.cjs.js.map +1 -0
- package/dist/node_modules/@react-stately/toggle/dist/useToggleState.es.js +22 -0
- package/dist/node_modules/@react-stately/toggle/dist/useToggleState.es.js.map +1 -0
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.cjs.js +2 -0
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.cjs.js.map +1 -0
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.es.js +31 -0
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.es.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.cjs.js +2 -0
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.cjs.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.es.js +9 -0
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.es.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.cjs.js +2 -0
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.cjs.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.es.js +8 -0
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.es.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.cjs.js +2 -0
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.cjs.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.es.js +13 -0
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.es.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.cjs.js +2 -0
- package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.cjs.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.es.js +9 -0
- package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.es.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.cjs.js +2 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.cjs.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.es.js +11 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.es.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.cjs.js +2 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.cjs.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.es.js +9 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.es.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.cjs.js +2 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.cjs.js.map +1 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.es.js +11 -0
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.es.js.map +1 -0
- package/dist/node_modules/color2k/dist/index.exports.import.es.cjs.js +2 -0
- package/dist/node_modules/color2k/dist/index.exports.import.es.cjs.js.map +1 -0
- package/dist/node_modules/color2k/dist/index.exports.import.es.es.js +171 -0
- package/dist/node_modules/color2k/dist/index.exports.import.es.es.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +23 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +609 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs.js +10 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +29 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js.map +1 -0
- package/dist/node_modules/react/jsx-runtime.cjs.js +2 -0
- package/dist/node_modules/react/jsx-runtime.cjs.js.map +1 -0
- package/dist/node_modules/react/jsx-runtime.es.js +9 -0
- package/dist/node_modules/react/jsx-runtime.es.js.map +1 -0
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js +2 -0
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js.map +1 -0
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js +37 -0
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js.map +1 -0
- package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js +2 -0
- package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js.map +1 -0
- package/dist/node_modules/react-aria-components/dist/Tooltip.es.js +98 -0
- package/dist/node_modules/react-aria-components/dist/Tooltip.es.js.map +1 -0
- package/dist/node_modules/react-aria-components/dist/utils.cjs.js +2 -0
- package/dist/node_modules/react-aria-components/dist/utils.cjs.js.map +1 -0
- package/dist/node_modules/react-aria-components/dist/utils.es.js +89 -0
- package/dist/node_modules/react-aria-components/dist/utils.es.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/theme.cjs.js +1 -1
- package/dist/theme.cjs.js.map +1 -1
- package/dist/theme.es.js +9 -15
- package/dist/theme.es.js.map +1 -1
- package/dist/utils/color2k.cjs.js +2 -0
- package/dist/utils/color2k.cjs.js.map +1 -0
- package/dist/utils/color2k.es.js +14 -0
- package/dist/utils/color2k.es.js.map +1 -0
- package/dist/utils/copy.cjs.js +2 -0
- package/dist/utils/copy.cjs.js.map +1 -0
- package/dist/utils/copy.es.js +31 -0
- package/dist/utils/copy.es.js.map +1 -0
- package/dist/utils/image.cjs.js +2 -0
- package/dist/utils/image.cjs.js.map +1 -0
- package/dist/utils/image.es.js +28 -0
- package/dist/utils/image.es.js.map +1 -0
- package/dist/utils/navigation.cjs.js +2 -0
- package/dist/utils/navigation.cjs.js.map +1 -0
- package/dist/utils/navigation.es.js +12 -0
- package/dist/utils/navigation.es.js.map +1 -0
- package/dist/utils/palette.cjs.js +2 -0
- package/dist/utils/palette.cjs.js.map +1 -0
- package/dist/utils/palette.es.js +183 -0
- package/dist/utils/palette.es.js.map +1 -0
- package/dist/utils/string.cjs.js +2 -0
- package/dist/utils/string.cjs.js.map +1 -0
- package/dist/utils/string.es.js +8 -0
- package/dist/utils/string.es.js.map +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +19 -15
- package/dist/utils.es.js.map +1 -1
- package/package.json +5 -5
- package/dist/breakpoint-9y1_8U_b.mjs.map +0 -1
- package/dist/breakpoint-DtqbboOa.js +0 -2
- package/dist/breakpoint-DtqbboOa.js.map +0 -1
- package/dist/color2k-CpDB_dpw.mjs +0 -168
- package/dist/color2k-CpDB_dpw.mjs.map +0 -1
- package/dist/color2k-DCgwXUem.js +0 -2
- package/dist/color2k-DCgwXUem.js.map +0 -1
- package/dist/colors-CWaj9dFz.mjs.map +0 -1
- package/dist/colors-CebzFjpe.js +0 -2
- package/dist/colors-CmSJBHaf.js +0 -2
- package/dist/colors-CmSJBHaf.js.map +0 -1
- package/dist/colors-DL1dYffC.js +0 -2
- package/dist/image-CUSfY1_T.js +0 -2
- package/dist/image-CUSfY1_T.js.map +0 -1
- package/dist/image-DFyN0Kd9.mjs +0 -207
- package/dist/image-DFyN0Kd9.mjs.map +0 -1
- package/dist/navigation-BB0MBIiR.js +0 -2
- package/dist/navigation-BB0MBIiR.js.map +0 -1
- package/dist/navigation-Bj7Pex9j.mjs +0 -43
- package/dist/navigation-Bj7Pex9j.mjs.map +0 -1
- package/dist/useBreakpoint-CjRyGKN-.mjs +0 -53
- package/dist/useBreakpoint-CjRyGKN-.mjs.map +0 -1
- package/dist/useBreakpoint-DA-JqOu3.js +0 -2
- package/dist/useBreakpoint-DA-JqOu3.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.es.js","sources":["../../../../../node_modules/@react-aria/radio/dist/utils.mjs"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ const $884aeceb3d67f00f$export$37b65e5b5444d35c = new WeakMap();\n\n\nexport {$884aeceb3d67f00f$export$37b65e5b5444d35c as radioGroupData};\n//# sourceMappingURL=utils.module.js.map\n"],"names":["$884aeceb3d67f00f$export$37b65e5b5444d35c"],"mappings":"AAUS,MAACA,IAA4C,oBAAI,QAAO;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(!1);function r(){return!1}function n(){return!0}function a(c){return()=>{}}function o(){return typeof e.useSyncExternalStore=="function"?e.useSyncExternalStore(a,r,n):e.useContext(t)}exports.useIsSSR=o;
|
|
2
|
+
//# sourceMappingURL=SSRProvider.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SSRProvider.cjs.js","sources":["../../../../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs"],"sourcesContent":["import $670gB$react, {useContext as $670gB$useContext, useState as $670gB$useState, useMemo as $670gB$useMemo, useLayoutEffect as $670gB$useLayoutEffect, useRef as $670gB$useRef} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $670gB$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $670gB$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $670gB$useState)(true);\n let value = (0, $670gB$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $670gB$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $670gB$react)['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'production' && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement((0, $670gB$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $670gB$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $670gB$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && process.env.NODE_ENV !== 'production') console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n let id = (0, $670gB$react).useId();\n let [didSSR] = (0, $670gB$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $670gB$react)['useId'] === 'function' ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $670gB$react)['useSyncExternalStore'] === 'function') return (0, $670gB$react)['useSyncExternalStore']($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $670gB$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId};\n//# sourceMappingURL=SSRProvider.module.js.map\n"],"names":["$b5e257d569688ac6$var$IsSSRContext","$670gB$react","$b5e257d569688ac6$var$getSnapshot","$b5e257d569688ac6$var$getServerSnapshot","$b5e257d569688ac6$var$subscribe","onStoreChange","$b5e257d569688ac6$export$535bd6ca7f90a273","$670gB$useContext"],"mappings":"yGA0BMA,EAAuDC,EAAc,cAAc,EAAK,EAgG9F,SAASC,GAAoC,CACzC,MAAO,EACX,CACA,SAASC,GAA0C,CAC/C,MAAO,EACX,CAEA,SAASC,EAAgCC,EAAe,CAEpD,MAAO,IAAI,CAAA,CACf,CACA,SAASC,GAA4C,CAEjD,OAAI,OAAWL,EAAc,sBAA4B,WAAuBA,EAAc,qBAAwBG,EAAiCF,EAAmCC,CAAuC,EAEtNI,EAAAA,WAAmBP,CAAkC,CACpE","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import e, { useContext as t } from "react";
|
|
2
|
+
const r = /* @__PURE__ */ e.createContext(!1);
|
|
3
|
+
function n() {
|
|
4
|
+
return !1;
|
|
5
|
+
}
|
|
6
|
+
function a() {
|
|
7
|
+
return !0;
|
|
8
|
+
}
|
|
9
|
+
function o(c) {
|
|
10
|
+
return () => {
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function u() {
|
|
14
|
+
return typeof e.useSyncExternalStore == "function" ? e.useSyncExternalStore(o, n, a) : t(r);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
u as useIsSSR
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=SSRProvider.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SSRProvider.es.js","sources":["../../../../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs"],"sourcesContent":["import $670gB$react, {useContext as $670gB$useContext, useState as $670gB$useState, useMemo as $670gB$useMemo, useLayoutEffect as $670gB$useLayoutEffect, useRef as $670gB$useRef} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $670gB$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $670gB$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $670gB$useState)(true);\n let value = (0, $670gB$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $670gB$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $670gB$react)['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && process.env.NODE_ENV !== 'production' && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement((0, $670gB$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $670gB$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $670gB$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && process.env.NODE_ENV !== 'production') console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n let id = (0, $670gB$react).useId();\n let [didSSR] = (0, $670gB$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $670gB$react)['useId'] === 'function' ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $670gB$react)['useSyncExternalStore'] === 'function') return (0, $670gB$react)['useSyncExternalStore']($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $670gB$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId};\n//# sourceMappingURL=SSRProvider.module.js.map\n"],"names":["$b5e257d569688ac6$var$IsSSRContext","$670gB$react","$b5e257d569688ac6$var$getSnapshot","$b5e257d569688ac6$var$getServerSnapshot","$b5e257d569688ac6$var$subscribe","onStoreChange","$b5e257d569688ac6$export$535bd6ca7f90a273","$670gB$useContext"],"mappings":";AA0BA,MAAMA,IAAuDC,gBAAAA,EAAc,cAAc,EAAK;AAgG9F,SAASC,IAAoC;AACzC,SAAO;AACX;AACA,SAASC,IAA0C;AAC/C,SAAO;AACX;AAEA,SAASC,EAAgCC,GAAe;AAEpD,SAAO,MAAI;AAAA,EAAA;AACf;AACA,SAASC,IAA4C;AAEjD,SAAI,OAAWL,EAAc,wBAA4B,aAAuBA,EAAc,qBAAwBG,GAAiCF,GAAmCC,CAAuC,IAEtNI,EAAmBP,CAAkC;AACpE;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../toggle/dist/useToggle.cjs.js");function n(s,i,l){let{labelProps:r,inputProps:t,isSelected:e,isPressed:d,isDisabled:o,isReadOnly:c}=a.useToggle(s,i,l);return{labelProps:r,inputProps:{...t,role:"switch",checked:e},isSelected:e,isPressed:d,isDisabled:o,isReadOnly:c}}exports.useSwitch=n;
|
|
2
|
+
//# sourceMappingURL=useSwitch.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSwitch.cjs.js","sources":["../../../../../node_modules/@react-aria/switch/dist/useSwitch.mjs"],"sourcesContent":["import {useToggle as $ifSyJ$useToggle} from \"@react-aria/toggle\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $b418ec0c85c52f27$export$d853f7095ae95f88(props, state, ref) {\n let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isPressed: isPressed, isDisabled: isDisabled, isReadOnly: isReadOnly } = (0, $ifSyJ$useToggle)(props, state, ref);\n return {\n labelProps: labelProps,\n inputProps: {\n ...inputProps,\n role: 'switch',\n checked: isSelected\n },\n isSelected: isSelected,\n isPressed: isPressed,\n isDisabled: isDisabled,\n isReadOnly: isReadOnly\n };\n}\n\n\nexport {$b418ec0c85c52f27$export$d853f7095ae95f88 as useSwitch};\n//# sourceMappingURL=useSwitch.module.js.map\n"],"names":["$b418ec0c85c52f27$export$d853f7095ae95f88","props","state","ref","labelProps","inputProps","isSelected","isPressed","isDisabled","isReadOnly","$ifSyJ$useToggle"],"mappings":"sIAaA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,WAAYC,EAAY,WAAYC,EAAY,WAAYC,EAAY,UAAWC,EAAW,WAAYC,EAAY,WAAYC,GAAmBC,EAAgB,UAAET,EAAOC,EAAOC,CAAG,EAC9L,MAAO,CACH,WAAYC,EACZ,WAAY,CACR,GAAGC,EACH,KAAM,SACN,QAASC,CACZ,EACD,WAAYA,EACZ,UAAWC,EACX,WAAYC,EACZ,WAAYC,CACpB,CACA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useToggle as p } from "../../toggle/dist/useToggle.es.js";
|
|
2
|
+
function b(s, i, l) {
|
|
3
|
+
let { labelProps: r, inputProps: d, isSelected: e, isPressed: t, isDisabled: o, isReadOnly: c } = p(s, i, l);
|
|
4
|
+
return {
|
|
5
|
+
labelProps: r,
|
|
6
|
+
inputProps: {
|
|
7
|
+
...d,
|
|
8
|
+
role: "switch",
|
|
9
|
+
checked: e
|
|
10
|
+
},
|
|
11
|
+
isSelected: e,
|
|
12
|
+
isPressed: t,
|
|
13
|
+
isDisabled: o,
|
|
14
|
+
isReadOnly: c
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
b as useSwitch
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useSwitch.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSwitch.es.js","sources":["../../../../../node_modules/@react-aria/switch/dist/useSwitch.mjs"],"sourcesContent":["import {useToggle as $ifSyJ$useToggle} from \"@react-aria/toggle\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $b418ec0c85c52f27$export$d853f7095ae95f88(props, state, ref) {\n let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isPressed: isPressed, isDisabled: isDisabled, isReadOnly: isReadOnly } = (0, $ifSyJ$useToggle)(props, state, ref);\n return {\n labelProps: labelProps,\n inputProps: {\n ...inputProps,\n role: 'switch',\n checked: isSelected\n },\n isSelected: isSelected,\n isPressed: isPressed,\n isDisabled: isDisabled,\n isReadOnly: isReadOnly\n };\n}\n\n\nexport {$b418ec0c85c52f27$export$d853f7095ae95f88 as useSwitch};\n//# sourceMappingURL=useSwitch.module.js.map\n"],"names":["$b418ec0c85c52f27$export$d853f7095ae95f88","props","state","ref","labelProps","inputProps","isSelected","isPressed","isDisabled","isReadOnly","$ifSyJ$useToggle"],"mappings":";AAaA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,YAAYC,GAAY,YAAYC,GAAY,YAAYC,GAAY,WAAWC,GAAW,YAAYC,GAAY,YAAYC,MAAmBC,EAAkBT,GAAOC,GAAOC,CAAG;AAC9L,SAAO;AAAA,IACH,YAAYC;AAAA,IACZ,YAAY;AAAA,MACR,GAAGC;AAAA,MACH,MAAM;AAAA,MACN,SAASC;AAAA,IACZ;AAAA,IACD,YAAYA;AAAA,IACZ,WAAWC;AAAA,IACX,YAAYC;AAAA,IACZ,YAAYC;AAAA,EACpB;AACA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@react-aria/utils"),g=require("../../interactions/dist/usePress.cjs.js"),_=require("../../interactions/dist/useFocusable.cjs.js");function $(s,r,o){let{isDisabled:a=!1,isReadOnly:i=!1,value:d,name:m,form:h,children:y,"aria-label":S,"aria-labelledby":C,validationState:P="valid",isInvalid:u,onPressStart:c,onPressEnd:b,onPressChange:p,onPress:n,onPressUp:v,onClick:f}=s,D=e=>{e.stopPropagation(),r.setSelected(e.target.checked)},k=y!=null,E=S!=null||C!=null;!k&&!E&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:O,isPressed:I}=g.usePress({onPressStart:c,onPressEnd:b,onPressChange:p,onPress:n,onPressUp:v,onClick:f,isDisabled:a}),{pressProps:L,isPressed:R}=g.usePress({onPressStart:c,onPressEnd:b,onPressChange:p,onPressUp:v,onClick:f,onPress(e){var t;n==null||n(e),r.toggle(),(t=o.current)===null||t===void 0||t.focus()},isDisabled:a||i}),{focusableProps:U}=_.useFocusable(s,o),q=l.mergeProps(O,U),F=l.filterDOMProps(s,{labelable:!0});return l.useFormReset(o,r.defaultSelected,r.setSelected),{labelProps:l.mergeProps(L,{onClick:e=>e.preventDefault()}),inputProps:l.mergeProps(F,{"aria-invalid":u||P==="invalid"||void 0,"aria-errormessage":s["aria-errormessage"],"aria-controls":s["aria-controls"],"aria-readonly":i||void 0,onChange:D,disabled:a,...d==null?{}:{value:d},name:m,form:h,type:"checkbox",...q}),isSelected:r.isSelected,isPressed:I||R,isDisabled:a,isReadOnly:i,isInvalid:u||P==="invalid"}}exports.useToggle=$;
|
|
2
|
+
//# sourceMappingURL=useToggle.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToggle.cjs.js","sources":["../../../../../node_modules/@react-aria/toggle/dist/useToggle.mjs"],"sourcesContent":["import {mergeProps as $bvdLj$mergeProps, filterDOMProps as $bvdLj$filterDOMProps, useFormReset as $bvdLj$useFormReset} from \"@react-aria/utils\";\nimport {usePress as $bvdLj$usePress, useFocusable as $bvdLj$useFocusable} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {\n let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, form: form, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;\n let onChange = (e)=>{\n // since we spread props on label, onChange will end up there as well as in here.\n // so we have to stop propagation at the lowest level that we care about\n e.stopPropagation();\n state.setSelected(e.target.checked);\n };\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $bvdLj$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $bvdLj$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPressUp: onPressUp,\n onClick: onClick,\n onPress (e) {\n var _ref_current;\n onPress === null || onPress === void 0 ? void 0 : onPress(e);\n state.toggle();\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n },\n isDisabled: isDisabled || isReadOnly\n });\n let { focusableProps: focusableProps } = (0, $bvdLj$useFocusable)(props, ref);\n let interactions = (0, $bvdLj$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $bvdLj$filterDOMProps)(props, {\n labelable: true\n });\n (0, $bvdLj$useFormReset)(ref, state.defaultSelected, state.setSelected);\n return {\n labelProps: (0, $bvdLj$mergeProps)(labelProps, {\n onClick: (e)=>e.preventDefault()\n }),\n inputProps: (0, $bvdLj$mergeProps)(domProps, {\n 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-controls': props['aria-controls'],\n 'aria-readonly': isReadOnly || undefined,\n onChange: onChange,\n disabled: isDisabled,\n ...value == null ? {} : {\n value: value\n },\n name: name,\n form: form,\n type: 'checkbox',\n ...interactions\n }),\n isSelected: state.isSelected,\n isPressed: isPressed || isLabelPressed,\n isDisabled: isDisabled,\n isReadOnly: isReadOnly,\n isInvalid: isInvalid || validationState === 'invalid'\n };\n}\n\n\nexport {$d2c8e2b0480f3f34$export$cbe85ee05b554577 as useToggle};\n//# sourceMappingURL=useToggle.module.js.map\n"],"names":["$d2c8e2b0480f3f34$export$cbe85ee05b554577","props","state","ref","isDisabled","isReadOnly","value","name","form","children","ariaLabel","ariaLabelledby","validationState","isInvalid","onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick","onChange","hasChildren","hasAriaLabel","pressProps","isPressed","$bvdLj$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$bvdLj$useFocusable","interactions","$bvdLj$mergeProps","domProps","$bvdLj$filterDOMProps","$bvdLj$useFormReset"],"mappings":"mOAeA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,WAAYC,EAAa,GAAO,WAAYC,EAAa,GAAO,MAAOC,EAAO,KAAMC,EAAM,KAAMC,EAAM,SAAUC,EAAU,aAAcC,EAAW,kBAAmBC,EAAgB,gBAAiBC,EAAkB,QAAS,UAAWC,EAAW,aAAcC,EAAc,WAAYC,EAAY,cAAeC,EAAe,QAASC,EAAS,UAAWC,EAAW,QAASC,CAAS,EAAGlB,EACzYmB,EAAY,GAAI,CAGhB,EAAE,gBAAe,EACjBlB,EAAM,YAAY,EAAE,OAAO,OAAO,CAC1C,EACQmB,EAAcZ,GAAY,KAC1Ba,EAAeZ,GAAa,MAAQC,GAAkB,KACtD,CAACU,GAAe,CAACC,GAAgB,QAAQ,IAAI,WAAa,cAAc,QAAQ,KAAK,kFAAkF,EAE3K,GAAI,CAAE,WAAYC,EAAY,UAAWC,CAAS,EAASC,WAAiB,CACxE,aAAcX,EACd,WAAYC,EACZ,cAAeC,EACf,QAASC,EACT,UAAWC,EACX,QAASC,EACT,WAAYf,CACpB,CAAK,EAEG,CAAE,WAAYsB,EAAY,UAAWC,CAAc,EAASF,WAAiB,CAC7E,aAAcX,EACd,WAAYC,EACZ,cAAeC,EACf,UAAWE,EACX,QAASC,EACT,QAAS,EAAG,CACR,IAAIS,EACJX,GAAY,MAAsCA,EAAQ,CAAC,EAC3Df,EAAM,OAAM,GACX0B,EAAezB,EAAI,WAAa,MAAQyB,IAAiB,QAAkBA,EAAa,MAAK,CACjG,EACD,WAAYxB,GAAcC,CAClC,CAAK,EACG,CAAE,eAAgBwB,CAAgB,EAAOC,EAAAA,aAAqB7B,EAAOE,CAAG,EACxE4B,EAAmBC,EAAAA,WAAmBT,EAAYM,CAAc,EAChEI,EAAeC,EAAqB,eAAEjC,EAAO,CAC7C,UAAW,EACnB,CAAK,EACD,OAAIkC,EAAAA,aAAqBhC,EAAKD,EAAM,gBAAiBA,EAAM,WAAW,EAC/D,CACH,WAAgB8B,EAAiB,WAAEN,EAAY,CAC3C,QAAU,GAAI,EAAE,eAAgB,CAC5C,CAAS,EACD,WAAgBM,EAAiB,WAAEC,EAAU,CACzC,eAAgBpB,GAAaD,IAAoB,WAAa,OAC9D,oBAAqBX,EAAM,mBAAmB,EAC9C,gBAAiBA,EAAM,eAAe,EACtC,gBAAiBI,GAAc,OAC/B,SAAUe,EACV,SAAUhB,EACV,GAAGE,GAAS,KAAO,GAAK,CACpB,MAAOA,CACV,EACD,KAAMC,EACN,KAAMC,EACN,KAAM,WACN,GAAGuB,CACf,CAAS,EACD,WAAY7B,EAAM,WAClB,UAAWsB,GAAaG,EACxB,WAAYvB,EACZ,WAAYC,EACZ,UAAWQ,GAAaD,IAAoB,SACpD,CACA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { mergeProps as d, filterDOMProps as _, useFormReset as F } from "@react-aria/utils";
|
|
2
|
+
import { usePress as m } from "../../interactions/dist/usePress.es.js";
|
|
3
|
+
import { useFocusable as N } from "../../interactions/dist/useFocusable.es.js";
|
|
4
|
+
function T(s, r, o) {
|
|
5
|
+
let { isDisabled: a = !1, isReadOnly: n = !1, value: t, name: g, form: h, children: C, "aria-label": y, "aria-labelledby": S, validationState: c = "valid", isInvalid: P, onPressStart: u, onPressEnd: b, onPressChange: f, onPress: l, onPressUp: p, onClick: v } = s, $ = (e) => {
|
|
6
|
+
e.stopPropagation(), r.setSelected(e.target.checked);
|
|
7
|
+
}, D = C != null, k = y != null || S != null;
|
|
8
|
+
!D && !k && process.env.NODE_ENV !== "production" && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
9
|
+
let { pressProps: E, isPressed: x } = m({
|
|
10
|
+
onPressStart: u,
|
|
11
|
+
onPressEnd: b,
|
|
12
|
+
onPressChange: f,
|
|
13
|
+
onPress: l,
|
|
14
|
+
onPressUp: p,
|
|
15
|
+
onClick: v,
|
|
16
|
+
isDisabled: a
|
|
17
|
+
}), { pressProps: O, isPressed: I } = m({
|
|
18
|
+
onPressStart: u,
|
|
19
|
+
onPressEnd: b,
|
|
20
|
+
onPressChange: f,
|
|
21
|
+
onPressUp: p,
|
|
22
|
+
onClick: v,
|
|
23
|
+
onPress(e) {
|
|
24
|
+
var i;
|
|
25
|
+
l == null || l(e), r.toggle(), (i = o.current) === null || i === void 0 || i.focus();
|
|
26
|
+
},
|
|
27
|
+
isDisabled: a || n
|
|
28
|
+
}), { focusableProps: L } = N(s, o), R = d(E, L), U = _(s, {
|
|
29
|
+
labelable: !0
|
|
30
|
+
});
|
|
31
|
+
return F(o, r.defaultSelected, r.setSelected), {
|
|
32
|
+
labelProps: d(O, {
|
|
33
|
+
onClick: (e) => e.preventDefault()
|
|
34
|
+
}),
|
|
35
|
+
inputProps: d(U, {
|
|
36
|
+
"aria-invalid": P || c === "invalid" || void 0,
|
|
37
|
+
"aria-errormessage": s["aria-errormessage"],
|
|
38
|
+
"aria-controls": s["aria-controls"],
|
|
39
|
+
"aria-readonly": n || void 0,
|
|
40
|
+
onChange: $,
|
|
41
|
+
disabled: a,
|
|
42
|
+
...t == null ? {} : {
|
|
43
|
+
value: t
|
|
44
|
+
},
|
|
45
|
+
name: g,
|
|
46
|
+
form: h,
|
|
47
|
+
type: "checkbox",
|
|
48
|
+
...R
|
|
49
|
+
}),
|
|
50
|
+
isSelected: r.isSelected,
|
|
51
|
+
isPressed: x || I,
|
|
52
|
+
isDisabled: a,
|
|
53
|
+
isReadOnly: n,
|
|
54
|
+
isInvalid: P || c === "invalid"
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
T as useToggle
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=useToggle.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToggle.es.js","sources":["../../../../../node_modules/@react-aria/toggle/dist/useToggle.mjs"],"sourcesContent":["import {mergeProps as $bvdLj$mergeProps, filterDOMProps as $bvdLj$filterDOMProps, useFormReset as $bvdLj$useFormReset} from \"@react-aria/utils\";\nimport {usePress as $bvdLj$usePress, useFocusable as $bvdLj$useFocusable} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {\n let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, form: form, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;\n let onChange = (e)=>{\n // since we spread props on label, onChange will end up there as well as in here.\n // so we have to stop propagation at the lowest level that we care about\n e.stopPropagation();\n state.setSelected(e.target.checked);\n };\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $bvdLj$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $bvdLj$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPressUp: onPressUp,\n onClick: onClick,\n onPress (e) {\n var _ref_current;\n onPress === null || onPress === void 0 ? void 0 : onPress(e);\n state.toggle();\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n },\n isDisabled: isDisabled || isReadOnly\n });\n let { focusableProps: focusableProps } = (0, $bvdLj$useFocusable)(props, ref);\n let interactions = (0, $bvdLj$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $bvdLj$filterDOMProps)(props, {\n labelable: true\n });\n (0, $bvdLj$useFormReset)(ref, state.defaultSelected, state.setSelected);\n return {\n labelProps: (0, $bvdLj$mergeProps)(labelProps, {\n onClick: (e)=>e.preventDefault()\n }),\n inputProps: (0, $bvdLj$mergeProps)(domProps, {\n 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-controls': props['aria-controls'],\n 'aria-readonly': isReadOnly || undefined,\n onChange: onChange,\n disabled: isDisabled,\n ...value == null ? {} : {\n value: value\n },\n name: name,\n form: form,\n type: 'checkbox',\n ...interactions\n }),\n isSelected: state.isSelected,\n isPressed: isPressed || isLabelPressed,\n isDisabled: isDisabled,\n isReadOnly: isReadOnly,\n isInvalid: isInvalid || validationState === 'invalid'\n };\n}\n\n\nexport {$d2c8e2b0480f3f34$export$cbe85ee05b554577 as useToggle};\n//# sourceMappingURL=useToggle.module.js.map\n"],"names":["$d2c8e2b0480f3f34$export$cbe85ee05b554577","props","state","ref","isDisabled","isReadOnly","value","name","form","children","ariaLabel","ariaLabelledby","validationState","isInvalid","onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick","onChange","hasChildren","hasAriaLabel","pressProps","isPressed","$bvdLj$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$bvdLj$useFocusable","interactions","$bvdLj$mergeProps","domProps","$bvdLj$filterDOMProps","$bvdLj$useFormReset"],"mappings":";;;AAeA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,YAAYC,IAAa,IAAO,YAAYC,IAAa,IAAO,OAAOC,GAAO,MAAMC,GAAM,MAAMC,GAAM,UAAUC,GAAU,cAAcC,GAAW,mBAAmBC,GAAgB,iBAAiBC,IAAkB,SAAS,WAAWC,GAAW,cAAcC,GAAc,YAAYC,GAAY,eAAeC,GAAe,SAASC,GAAS,WAAWC,GAAW,SAASC,EAAS,IAAGlB,GACzYmB,IAAW,CAAC,MAAI;AAGhB,MAAE,gBAAe,GACjBlB,EAAM,YAAY,EAAE,OAAO,OAAO;AAAA,EAC1C,GACQmB,IAAcZ,KAAY,MAC1Ba,IAAeZ,KAAa,QAAQC,KAAkB;AAC1D,EAAI,CAACU,KAAe,CAACC,KAAgB,QAAQ,IAAI,aAAa,gBAAc,QAAQ,KAAK,kFAAkF;AAE3K,MAAI,EAAE,YAAYC,GAAY,WAAWC,EAAS,IAASC,EAAiB;AAAA,IACxE,cAAcX;AAAA,IACd,YAAYC;AAAA,IACZ,eAAeC;AAAA,IACf,SAASC;AAAA,IACT,WAAWC;AAAA,IACX,SAASC;AAAA,IACT,YAAYf;AAAA,EACpB,CAAK,GAEG,EAAE,YAAYsB,GAAY,WAAWC,EAAc,IAASF,EAAiB;AAAA,IAC7E,cAAcX;AAAA,IACd,YAAYC;AAAA,IACZ,eAAeC;AAAA,IACf,WAAWE;AAAA,IACX,SAASC;AAAA,IACT,QAAS,GAAG;AACR,UAAIS;AACJ,MAAAX,KAAY,QAAsCA,EAAQ,CAAC,GAC3Df,EAAM,OAAM,IACX0B,IAAezB,EAAI,aAAa,QAAQyB,MAAiB,UAAkBA,EAAa,MAAK;AAAA,IACjG;AAAA,IACD,YAAYxB,KAAcC;AAAA,EAClC,CAAK,GACG,EAAE,gBAAgBwB,EAAgB,IAAOC,EAAqB7B,GAAOE,CAAG,GACxE4B,IAAmBC,EAAmBT,GAAYM,CAAc,GAChEI,IAAeC,EAAuBjC,GAAO;AAAA,IAC7C,WAAW;AAAA,EACnB,CAAK;AACD,SAAIkC,EAAqBhC,GAAKD,EAAM,iBAAiBA,EAAM,WAAW,GAC/D;AAAA,IACH,YAAgB8B,EAAmBN,GAAY;AAAA,MAC3C,SAAS,CAAC,MAAI,EAAE,eAAgB;AAAA,IAC5C,CAAS;AAAA,IACD,YAAgBM,EAAmBC,GAAU;AAAA,MACzC,gBAAgBpB,KAAaD,MAAoB,aAAa;AAAA,MAC9D,qBAAqBX,EAAM,mBAAmB;AAAA,MAC9C,iBAAiBA,EAAM,eAAe;AAAA,MACtC,iBAAiBI,KAAc;AAAA,MAC/B,UAAUe;AAAA,MACV,UAAUhB;AAAA,MACV,GAAGE,KAAS,OAAO,KAAK;AAAA,QACpB,OAAOA;AAAA,MACV;AAAA,MACD,MAAMC;AAAA,MACN,MAAMC;AAAA,MACN,MAAM;AAAA,MACN,GAAGuB;AAAA,IACf,CAAS;AAAA,IACD,YAAY7B,EAAM;AAAA,IAClB,WAAWsB,KAAaG;AAAA,IACxB,YAAYvB;AAAA,IACZ,YAAYC;AAAA,IACZ,WAAWQ,KAAaD,MAAoB;AAAA,EACpD;AACA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@react-aria/utils"),o=require("react"),p=require("../../interactions/dist/useFocusWithin.cjs.js"),u={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function c(s={}){let{style:e,isFocusable:t}=s,[i,n]=o.useState(!1),{focusWithinProps:l}=p.useFocusWithin({isDisabled:!t,onFocusWithinChange:a=>n(a)}),r=o.useMemo(()=>i?e:e?{...u,...e}:u,[i]);return{visuallyHiddenProps:{...l,style:r}}}function h(s){let{children:e,elementType:t="div",isFocusable:i,style:n,...l}=s,{visuallyHiddenProps:r}=c(s);return o.createElement(t,d.mergeProps(l,r),e)}exports.VisuallyHidden=h;exports.useVisuallyHidden=c;
|
|
2
|
+
//# sourceMappingURL=VisuallyHidden.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.cjs.js","sources":["../../../../../node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.mjs"],"sourcesContent":["import {mergeProps as $7JYt2$mergeProps} from \"@react-aria/utils\";\nimport $7JYt2$react, {useState as $7JYt2$useState, useMemo as $7JYt2$useMemo} from \"react\";\nimport {useFocusWithin as $7JYt2$useFocusWithin} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $5c3e21d68f1c4674$var$styles = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n width: '1px',\n whiteSpace: 'nowrap'\n};\nfunction $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {\n let { style: style, isFocusable: isFocusable } = props;\n let [isFocused, setFocused] = (0, $7JYt2$useState)(false);\n let { focusWithinProps: focusWithinProps } = (0, $7JYt2$useFocusWithin)({\n isDisabled: !isFocusable,\n onFocusWithinChange: (val)=>setFocused(val)\n });\n // If focused, don't hide the element.\n let combinedStyles = (0, $7JYt2$useMemo)(()=>{\n if (isFocused) return style;\n else if (style) return {\n ...$5c3e21d68f1c4674$var$styles,\n ...style\n };\n else return $5c3e21d68f1c4674$var$styles;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n isFocused\n ]);\n return {\n visuallyHiddenProps: {\n ...focusWithinProps,\n style: combinedStyles\n }\n };\n}\nfunction $5c3e21d68f1c4674$export$439d29a4e110a164(props) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let { children: children, elementType: Element = 'div', isFocusable: isFocusable, style: style, ...otherProps } = props;\n let { visuallyHiddenProps: visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(props);\n return /*#__PURE__*/ (0, $7JYt2$react).createElement(Element, (0, $7JYt2$mergeProps)(otherProps, visuallyHiddenProps), children);\n}\n\n\nexport {$5c3e21d68f1c4674$export$a966af930f325cab as useVisuallyHidden, $5c3e21d68f1c4674$export$439d29a4e110a164 as VisuallyHidden};\n//# sourceMappingURL=VisuallyHidden.module.js.map\n"],"names":["$5c3e21d68f1c4674$var$styles","$5c3e21d68f1c4674$export$a966af930f325cab","props","style","isFocusable","isFocused","setFocused","$7JYt2$useState","focusWithinProps","$7JYt2$useFocusWithin","val","combinedStyles","$7JYt2$useMemo","$5c3e21d68f1c4674$export$439d29a4e110a164","children","Element","otherProps","visuallyHiddenProps","$7JYt2$react","$7JYt2$mergeProps"],"mappings":"mMAiBMA,EAA+B,CACjC,OAAQ,EACR,KAAM,gBACN,SAAU,aACV,OAAQ,MACR,OAAQ,OACR,SAAU,SACV,QAAS,EACT,SAAU,WACV,MAAO,MACP,WAAY,QAChB,EACA,SAASC,EAA0CC,EAAQ,GAAI,CAC3D,GAAI,CAAE,MAAOC,EAAO,YAAaC,CAAW,EAAKF,EAC7C,CAACG,EAAWC,CAAU,EAAQC,EAAe,SAAE,EAAK,EACpD,CAAE,iBAAkBC,CAAkB,EAAOC,EAAAA,eAAuB,CACpE,WAAY,CAACL,EACb,oBAAsBM,GAAMJ,EAAWI,CAAG,CAClD,CAAK,EAEGC,EAAqBC,EAAAA,QAAgB,IACjCP,EAAkBF,EACbA,EAAc,CACnB,GAAGH,EACH,GAAGG,CACf,EACoBH,EAEb,CACCK,CACR,CAAK,EACD,MAAO,CACH,oBAAqB,CACjB,GAAGG,EACH,MAAOG,CACV,CACT,CACA,CACA,SAASE,EAA0CX,EAAO,CAEtD,GAAI,CAAE,SAAUY,EAAU,YAAaC,EAAU,MAAO,YAAaX,EAAa,MAAOD,EAAO,GAAGa,CAAU,EAAKd,EAC9G,CAAE,oBAAqBe,CAAqB,EAAGhB,EAA0CC,CAAK,EAClG,OAAyBgB,EAAc,cAAcH,EAAaI,EAAiB,WAAEH,EAAYC,CAAmB,EAAGH,CAAQ,CACnI","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { mergeProps as c } from "@react-aria/utils";
|
|
2
|
+
import d, { useState as u, useMemo as p } from "react";
|
|
3
|
+
import { useFocusWithin as f } from "../../interactions/dist/useFocusWithin.es.js";
|
|
4
|
+
const n = {
|
|
5
|
+
border: 0,
|
|
6
|
+
clip: "rect(0 0 0 0)",
|
|
7
|
+
clipPath: "inset(50%)",
|
|
8
|
+
height: "1px",
|
|
9
|
+
margin: "-1px",
|
|
10
|
+
overflow: "hidden",
|
|
11
|
+
padding: 0,
|
|
12
|
+
position: "absolute",
|
|
13
|
+
width: "1px",
|
|
14
|
+
whiteSpace: "nowrap"
|
|
15
|
+
};
|
|
16
|
+
function h(s = {}) {
|
|
17
|
+
let { style: e, isFocusable: t } = s, [i, r] = u(!1), { focusWithinProps: l } = f({
|
|
18
|
+
isDisabled: !t,
|
|
19
|
+
onFocusWithinChange: (a) => r(a)
|
|
20
|
+
}), o = p(() => i ? e : e ? {
|
|
21
|
+
...n,
|
|
22
|
+
...e
|
|
23
|
+
} : n, [
|
|
24
|
+
i
|
|
25
|
+
]);
|
|
26
|
+
return {
|
|
27
|
+
visuallyHiddenProps: {
|
|
28
|
+
...l,
|
|
29
|
+
style: o
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function b(s) {
|
|
34
|
+
let { children: e, elementType: t = "div", isFocusable: i, style: r, ...l } = s, { visuallyHiddenProps: o } = h(s);
|
|
35
|
+
return /* @__PURE__ */ d.createElement(t, c(l, o), e);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
b as VisuallyHidden,
|
|
39
|
+
h as useVisuallyHidden
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=VisuallyHidden.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.es.js","sources":["../../../../../node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.mjs"],"sourcesContent":["import {mergeProps as $7JYt2$mergeProps} from \"@react-aria/utils\";\nimport $7JYt2$react, {useState as $7JYt2$useState, useMemo as $7JYt2$useMemo} from \"react\";\nimport {useFocusWithin as $7JYt2$useFocusWithin} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $5c3e21d68f1c4674$var$styles = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n width: '1px',\n whiteSpace: 'nowrap'\n};\nfunction $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {\n let { style: style, isFocusable: isFocusable } = props;\n let [isFocused, setFocused] = (0, $7JYt2$useState)(false);\n let { focusWithinProps: focusWithinProps } = (0, $7JYt2$useFocusWithin)({\n isDisabled: !isFocusable,\n onFocusWithinChange: (val)=>setFocused(val)\n });\n // If focused, don't hide the element.\n let combinedStyles = (0, $7JYt2$useMemo)(()=>{\n if (isFocused) return style;\n else if (style) return {\n ...$5c3e21d68f1c4674$var$styles,\n ...style\n };\n else return $5c3e21d68f1c4674$var$styles;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n isFocused\n ]);\n return {\n visuallyHiddenProps: {\n ...focusWithinProps,\n style: combinedStyles\n }\n };\n}\nfunction $5c3e21d68f1c4674$export$439d29a4e110a164(props) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let { children: children, elementType: Element = 'div', isFocusable: isFocusable, style: style, ...otherProps } = props;\n let { visuallyHiddenProps: visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(props);\n return /*#__PURE__*/ (0, $7JYt2$react).createElement(Element, (0, $7JYt2$mergeProps)(otherProps, visuallyHiddenProps), children);\n}\n\n\nexport {$5c3e21d68f1c4674$export$a966af930f325cab as useVisuallyHidden, $5c3e21d68f1c4674$export$439d29a4e110a164 as VisuallyHidden};\n//# sourceMappingURL=VisuallyHidden.module.js.map\n"],"names":["$5c3e21d68f1c4674$var$styles","$5c3e21d68f1c4674$export$a966af930f325cab","props","style","isFocusable","isFocused","setFocused","$7JYt2$useState","focusWithinProps","$7JYt2$useFocusWithin","val","combinedStyles","$7JYt2$useMemo","$5c3e21d68f1c4674$export$439d29a4e110a164","children","Element","otherProps","visuallyHiddenProps","$7JYt2$react","$7JYt2$mergeProps"],"mappings":";;;AAiBA,MAAMA,IAA+B;AAAA,EACjC,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,OAAO;AAAA,EACP,YAAY;AAChB;AACA,SAASC,EAA0CC,IAAQ,IAAI;AAC3D,MAAI,EAAE,OAAOC,GAAO,aAAaC,EAAW,IAAKF,GAC7C,CAACG,GAAWC,CAAU,IAAQC,EAAiB,EAAK,GACpD,EAAE,kBAAkBC,EAAkB,IAAOC,EAAuB;AAAA,IACpE,YAAY,CAACL;AAAA,IACb,qBAAqB,CAACM,MAAMJ,EAAWI,CAAG;AAAA,EAClD,CAAK,GAEGC,IAAqBC,EAAgB,MACjCP,IAAkBF,IACbA,IAAc;AAAA,IACnB,GAAGH;AAAA,IACH,GAAGG;AAAA,EACf,IACoBH,GAEb;AAAA,IACCK;AAAA,EACR,CAAK;AACD,SAAO;AAAA,IACH,qBAAqB;AAAA,MACjB,GAAGG;AAAA,MACH,OAAOG;AAAA,IACV;AAAA,EACT;AACA;AACA,SAASE,EAA0CX,GAAO;AAEtD,MAAI,EAAE,UAAUY,GAAU,aAAaC,IAAU,OAAO,aAAaX,GAAa,OAAOD,GAAO,GAAGa,EAAU,IAAKd,GAC9G,EAAE,qBAAqBe,EAAqB,IAAGhB,EAA0CC,CAAK;AAClG,SAAyBgB,gBAAAA,EAAc,cAAcH,GAAaI,EAAmBH,GAAYC,CAAmB,GAAGH,CAAQ;AACnI;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),A={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},h={...A,customError:!0,valid:!1},s={isInvalid:!1,validationDetails:A,validationErrors:[]},x=r.createContext({}),y="__formValidationState"+Date.now();function R(e){if(e[y]){let{realtimeValidation:a,displayValidation:i,updateValidation:l,resetValidation:d,commitValidation:n}=e[y];return{realtimeValidation:a,displayValidation:i,updateValidation:l,resetValidation:d,commitValidation:n}}return F(e)}function F(e){let{isInvalid:a,validationState:i,name:l,value:d,builtinValidation:n,validate:f,validationBehavior:u="aria"}=e;i&&(a||(a=i==="invalid"));let v=a!==void 0?{isInvalid:a,validationErrors:[],validationDetails:h}:null,V=r.useMemo(()=>{if(!f||d==null)return null;let t=U(f,d);return T(t)},[f,d]);n!=null&&n.validationDetails.valid&&(n=void 0);let o=r.useContext(x),D=r.useMemo(()=>l?Array.isArray(l)?l.flatMap(t=>I(o[t])):I(o[l]):[],[o,l]),[C,L]=r.useState(o),[g,m]=r.useState(!1);o!==C&&(L(o),m(!1));let $=r.useMemo(()=>T(g?[]:D),[g,D]),M=r.useRef(s),[b,E]=r.useState(s),c=r.useRef(s),_=()=>{if(!O)return;p(!1);let t=V||n||M.current;S(t,c.current)||(c.current=t,E(t))},[O,p]=r.useState(!1);return r.useEffect(_),{realtimeValidation:v||$||V||n||s,displayValidation:u==="native"?v||$||b:v||$||V||n||b,updateValidation(t){u==="aria"&&!S(b,t)?E(t):M.current=t},resetValidation(){let t=s;S(t,c.current)||(c.current=t,E(t)),u==="native"&&p(!1),m(!0)},commitValidation(){u==="native"&&p(!0),m(!0)}}}function I(e){return e?Array.isArray(e)?e:[e]:[]}function U(e,a){if(typeof e=="function"){let i=e(a);if(i&&typeof i!="boolean")return I(i)}return[]}function T(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:h}:null}function S(e,a){return e===a?!0:!!e&&!!a&&e.isInvalid===a.isInvalid&&e.validationErrors.length===a.validationErrors.length&&e.validationErrors.every((i,l)=>i===a.validationErrors[l])&&Object.entries(e.validationDetails).every(([i,l])=>a.validationDetails[i]===l)}exports.DEFAULT_VALIDATION_RESULT=s;exports.FormValidationContext=x;exports.VALID_VALIDITY_STATE=A;exports.privateValidationStateProp=y;exports.useFormValidationState=R;
|
|
2
|
+
//# sourceMappingURL=useFormValidationState.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormValidationState.cjs.js","sources":["../../../../../node_modules/@react-stately/form/dist/useFormValidationState.mjs"],"sourcesContent":["import {createContext as $69F46$createContext, useMemo as $69F46$useMemo, useContext as $69F46$useContext, useState as $69F46$useState, useRef as $69F46$useRef, useEffect as $69F46$useEffect} from \"react\";\n\n/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $e5be200c675c3b3a$export$aca958c65c314e6c = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valueMissing: false,\n valid: true\n};\nconst $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE = {\n ...$e5be200c675c3b3a$export$aca958c65c314e6c,\n customError: true,\n valid: false\n};\nconst $e5be200c675c3b3a$export$dad6ae84456c676a = {\n isInvalid: false,\n validationDetails: $e5be200c675c3b3a$export$aca958c65c314e6c,\n validationErrors: []\n};\nconst $e5be200c675c3b3a$export$571b5131b7e65c11 = (0, $69F46$createContext)({});\nconst $e5be200c675c3b3a$export$a763b9476acd3eb = '__formValidationState' + Date.now();\nfunction $e5be200c675c3b3a$export$fc1a364ae1f3ff10(props) {\n // Private prop for parent components to pass state to children.\n if (props[$e5be200c675c3b3a$export$a763b9476acd3eb]) {\n let { realtimeValidation: realtimeValidation, displayValidation: displayValidation, updateValidation: updateValidation, resetValidation: resetValidation, commitValidation: commitValidation } = props[$e5be200c675c3b3a$export$a763b9476acd3eb];\n return {\n realtimeValidation: realtimeValidation,\n displayValidation: displayValidation,\n updateValidation: updateValidation,\n resetValidation: resetValidation,\n commitValidation: commitValidation\n };\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return $e5be200c675c3b3a$var$useFormValidationStateImpl(props);\n}\nfunction $e5be200c675c3b3a$var$useFormValidationStateImpl(props) {\n let { isInvalid: isInvalid, validationState: validationState, name: name, value: value, builtinValidation: builtinValidation, validate: validate, validationBehavior: validationBehavior = 'aria' } = props;\n // backward compatibility.\n if (validationState) isInvalid || (isInvalid = validationState === 'invalid');\n // If the isInvalid prop is controlled, update validation result in realtime.\n let controlledError = isInvalid !== undefined ? {\n isInvalid: isInvalid,\n validationErrors: [],\n validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE\n } : null;\n // Perform custom client side validation.\n let clientError = (0, $69F46$useMemo)(()=>{\n if (!validate || value == null) return null;\n let validateErrors = $e5be200c675c3b3a$var$runValidate(validate, value);\n return $e5be200c675c3b3a$var$getValidationResult(validateErrors);\n }, [\n validate,\n value\n ]);\n if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation = undefined;\n // Get relevant server errors from the form.\n let serverErrors = (0, $69F46$useContext)($e5be200c675c3b3a$export$571b5131b7e65c11);\n let serverErrorMessages = (0, $69F46$useMemo)(()=>{\n if (name) return Array.isArray(name) ? name.flatMap((name)=>$e5be200c675c3b3a$var$asArray(serverErrors[name])) : $e5be200c675c3b3a$var$asArray(serverErrors[name]);\n return [];\n }, [\n serverErrors,\n name\n ]);\n // Show server errors when the form gets a new value, and clear when the user changes the value.\n let [lastServerErrors, setLastServerErrors] = (0, $69F46$useState)(serverErrors);\n let [isServerErrorCleared, setServerErrorCleared] = (0, $69F46$useState)(false);\n if (serverErrors !== lastServerErrors) {\n setLastServerErrors(serverErrors);\n setServerErrorCleared(false);\n }\n let serverError = (0, $69F46$useMemo)(()=>$e5be200c675c3b3a$var$getValidationResult(isServerErrorCleared ? [] : serverErrorMessages), [\n isServerErrorCleared,\n serverErrorMessages\n ]);\n // Track the next validation state in a ref until commitValidation is called.\n let nextValidation = (0, $69F46$useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);\n let [currentValidity, setCurrentValidity] = (0, $69F46$useState)($e5be200c675c3b3a$export$dad6ae84456c676a);\n let lastError = (0, $69F46$useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);\n let commitValidation = ()=>{\n if (!commitQueued) return;\n setCommitQueued(false);\n let error = clientError || builtinValidation || nextValidation.current;\n if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {\n lastError.current = error;\n setCurrentValidity(error);\n }\n };\n let [commitQueued, setCommitQueued] = (0, $69F46$useState)(false);\n (0, $69F46$useEffect)(commitValidation);\n // realtimeValidation is used to update the native input element's state based on custom validation logic.\n // displayValidation is the currently displayed validation state that the user sees (e.g. on input change/form submit).\n // With validationBehavior=\"aria\", all errors are displayed in realtime rather than on submit.\n let realtimeValidation = controlledError || serverError || clientError || builtinValidation || $e5be200c675c3b3a$export$dad6ae84456c676a;\n let displayValidation = validationBehavior === 'native' ? controlledError || serverError || currentValidity : controlledError || serverError || clientError || builtinValidation || currentValidity;\n return {\n realtimeValidation: realtimeValidation,\n displayValidation: displayValidation,\n updateValidation (value) {\n // If validationBehavior is 'aria', update in realtime. Otherwise, store in a ref until commit.\n if (validationBehavior === 'aria' && !$e5be200c675c3b3a$var$isEqualValidation(currentValidity, value)) setCurrentValidity(value);\n else nextValidation.current = value;\n },\n resetValidation () {\n // Update the currently displayed validation state to valid on form reset,\n // even if the native validity says it isn't. It'll show again on the next form submit.\n let error = $e5be200c675c3b3a$export$dad6ae84456c676a;\n if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {\n lastError.current = error;\n setCurrentValidity(error);\n }\n // Do not commit validation after the next render. This avoids a condition where\n // useSelect calls commitValidation inside an onReset handler.\n if (validationBehavior === 'native') setCommitQueued(false);\n setServerErrorCleared(true);\n },\n commitValidation () {\n // Commit validation state so the user sees it on blur/change/submit. Also clear any server errors.\n // Wait until after the next render to commit so that the latest value has been validated.\n if (validationBehavior === 'native') setCommitQueued(true);\n setServerErrorCleared(true);\n }\n };\n}\nfunction $e5be200c675c3b3a$var$asArray(v) {\n if (!v) return [];\n return Array.isArray(v) ? v : [\n v\n ];\n}\nfunction $e5be200c675c3b3a$var$runValidate(validate, value) {\n if (typeof validate === 'function') {\n let e = validate(value);\n if (e && typeof e !== 'boolean') return $e5be200c675c3b3a$var$asArray(e);\n }\n return [];\n}\nfunction $e5be200c675c3b3a$var$getValidationResult(errors) {\n return errors.length ? {\n isInvalid: true,\n validationErrors: errors,\n validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE\n } : null;\n}\nfunction $e5be200c675c3b3a$var$isEqualValidation(a, b) {\n if (a === b) return true;\n return !!a && !!b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a, i)=>a === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v])=>b.validationDetails[k] === v);\n}\nfunction $e5be200c675c3b3a$export$75ee7c75d68f5b0e(...results) {\n let errors = new Set();\n let isInvalid = false;\n let validationDetails = {\n ...$e5be200c675c3b3a$export$aca958c65c314e6c\n };\n for (let v of results){\n var _validationDetails, _key;\n for (let e of v.validationErrors)errors.add(e);\n // Only these properties apply for checkboxes.\n isInvalid || (isInvalid = v.isInvalid);\n for(let key in validationDetails)(_validationDetails = validationDetails)[_key = key] || (_validationDetails[_key] = v.validationDetails[key]);\n }\n validationDetails.valid = !isInvalid;\n return {\n isInvalid: isInvalid,\n validationErrors: [\n ...errors\n ],\n validationDetails: validationDetails\n };\n}\n\n\nexport {$e5be200c675c3b3a$export$aca958c65c314e6c as VALID_VALIDITY_STATE, $e5be200c675c3b3a$export$dad6ae84456c676a as DEFAULT_VALIDATION_RESULT, $e5be200c675c3b3a$export$571b5131b7e65c11 as FormValidationContext, $e5be200c675c3b3a$export$a763b9476acd3eb as privateValidationStateProp, $e5be200c675c3b3a$export$fc1a364ae1f3ff10 as useFormValidationState, $e5be200c675c3b3a$export$75ee7c75d68f5b0e as mergeValidation};\n//# sourceMappingURL=useFormValidationState.module.js.map\n"],"names":["$e5be200c675c3b3a$export$aca958c65c314e6c","$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE","$e5be200c675c3b3a$export$dad6ae84456c676a","$e5be200c675c3b3a$export$571b5131b7e65c11","$69F46$createContext","$e5be200c675c3b3a$export$a763b9476acd3eb","$e5be200c675c3b3a$export$fc1a364ae1f3ff10","props","realtimeValidation","displayValidation","updateValidation","resetValidation","commitValidation","$e5be200c675c3b3a$var$useFormValidationStateImpl","isInvalid","validationState","name","value","builtinValidation","validate","validationBehavior","controlledError","clientError","$69F46$useMemo","validateErrors","$e5be200c675c3b3a$var$runValidate","$e5be200c675c3b3a$var$getValidationResult","serverErrors","$69F46$useContext","serverErrorMessages","$e5be200c675c3b3a$var$asArray","lastServerErrors","setLastServerErrors","$69F46$useState","isServerErrorCleared","setServerErrorCleared","serverError","nextValidation","$69F46$useRef","currentValidity","setCurrentValidity","lastError","commitQueued","setCommitQueued","error","$e5be200c675c3b3a$var$isEqualValidation","$69F46$useEffect","v","e","errors","a","b","i","k"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { createContext as U, useMemo as y, useContext as w, useState as c, useRef as T, useEffect as R } from "react";
|
|
2
|
+
const C = {
|
|
3
|
+
badInput: !1,
|
|
4
|
+
customError: !1,
|
|
5
|
+
patternMismatch: !1,
|
|
6
|
+
rangeOverflow: !1,
|
|
7
|
+
rangeUnderflow: !1,
|
|
8
|
+
stepMismatch: !1,
|
|
9
|
+
tooLong: !1,
|
|
10
|
+
tooShort: !1,
|
|
11
|
+
typeMismatch: !1,
|
|
12
|
+
valueMissing: !1,
|
|
13
|
+
valid: !0
|
|
14
|
+
}, L = {
|
|
15
|
+
...C,
|
|
16
|
+
customError: !0,
|
|
17
|
+
valid: !1
|
|
18
|
+
}, d = {
|
|
19
|
+
isInvalid: !1,
|
|
20
|
+
validationDetails: C,
|
|
21
|
+
validationErrors: []
|
|
22
|
+
}, B = U({}), g = "__formValidationState" + Date.now();
|
|
23
|
+
function P(a) {
|
|
24
|
+
if (a[g]) {
|
|
25
|
+
let { realtimeValidation: e, displayValidation: i, updateValidation: r, resetValidation: o, commitValidation: l } = a[g];
|
|
26
|
+
return {
|
|
27
|
+
realtimeValidation: e,
|
|
28
|
+
displayValidation: i,
|
|
29
|
+
updateValidation: r,
|
|
30
|
+
resetValidation: o,
|
|
31
|
+
commitValidation: l
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return Q(a);
|
|
35
|
+
}
|
|
36
|
+
function Q(a) {
|
|
37
|
+
let { isInvalid: e, validationState: i, name: r, value: o, builtinValidation: l, validate: f, validationBehavior: s = "aria" } = a;
|
|
38
|
+
i && (e || (e = i === "invalid"));
|
|
39
|
+
let v = e !== void 0 ? {
|
|
40
|
+
isInvalid: e,
|
|
41
|
+
validationErrors: [],
|
|
42
|
+
validationDetails: L
|
|
43
|
+
} : null, V = y(() => {
|
|
44
|
+
if (!f || o == null) return null;
|
|
45
|
+
let t = Y(f, o);
|
|
46
|
+
return h(t);
|
|
47
|
+
}, [
|
|
48
|
+
f,
|
|
49
|
+
o
|
|
50
|
+
]);
|
|
51
|
+
l != null && l.validationDetails.valid && (l = void 0);
|
|
52
|
+
let n = w(B), A = y(() => r ? Array.isArray(r) ? r.flatMap((t) => S(n[t])) : S(n[r]) : [], [
|
|
53
|
+
n,
|
|
54
|
+
r
|
|
55
|
+
]), [M, _] = c(n), [D, m] = c(!1);
|
|
56
|
+
n !== M && (_(n), m(!1));
|
|
57
|
+
let $ = y(() => h(D ? [] : A), [
|
|
58
|
+
D,
|
|
59
|
+
A
|
|
60
|
+
]), x = T(d), [b, E] = c(d), u = T(d), F = () => {
|
|
61
|
+
if (!O) return;
|
|
62
|
+
p(!1);
|
|
63
|
+
let t = V || l || x.current;
|
|
64
|
+
I(t, u.current) || (u.current = t, E(t));
|
|
65
|
+
}, [O, p] = c(!1);
|
|
66
|
+
return R(F), {
|
|
67
|
+
realtimeValidation: v || $ || V || l || d,
|
|
68
|
+
displayValidation: s === "native" ? v || $ || b : v || $ || V || l || b,
|
|
69
|
+
updateValidation(t) {
|
|
70
|
+
s === "aria" && !I(b, t) ? E(t) : x.current = t;
|
|
71
|
+
},
|
|
72
|
+
resetValidation() {
|
|
73
|
+
let t = d;
|
|
74
|
+
I(t, u.current) || (u.current = t, E(t)), s === "native" && p(!1), m(!0);
|
|
75
|
+
},
|
|
76
|
+
commitValidation() {
|
|
77
|
+
s === "native" && p(!0), m(!0);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function S(a) {
|
|
82
|
+
return a ? Array.isArray(a) ? a : [
|
|
83
|
+
a
|
|
84
|
+
] : [];
|
|
85
|
+
}
|
|
86
|
+
function Y(a, e) {
|
|
87
|
+
if (typeof a == "function") {
|
|
88
|
+
let i = a(e);
|
|
89
|
+
if (i && typeof i != "boolean") return S(i);
|
|
90
|
+
}
|
|
91
|
+
return [];
|
|
92
|
+
}
|
|
93
|
+
function h(a) {
|
|
94
|
+
return a.length ? {
|
|
95
|
+
isInvalid: !0,
|
|
96
|
+
validationErrors: a,
|
|
97
|
+
validationDetails: L
|
|
98
|
+
} : null;
|
|
99
|
+
}
|
|
100
|
+
function I(a, e) {
|
|
101
|
+
return a === e ? !0 : !!a && !!e && a.isInvalid === e.isInvalid && a.validationErrors.length === e.validationErrors.length && a.validationErrors.every((i, r) => i === e.validationErrors[r]) && Object.entries(a.validationDetails).every(([i, r]) => e.validationDetails[i] === r);
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
d as DEFAULT_VALIDATION_RESULT,
|
|
105
|
+
B as FormValidationContext,
|
|
106
|
+
C as VALID_VALIDITY_STATE,
|
|
107
|
+
g as privateValidationStateProp,
|
|
108
|
+
P as useFormValidationState
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=useFormValidationState.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormValidationState.es.js","sources":["../../../../../node_modules/@react-stately/form/dist/useFormValidationState.mjs"],"sourcesContent":["import {createContext as $69F46$createContext, useMemo as $69F46$useMemo, useContext as $69F46$useContext, useState as $69F46$useState, useRef as $69F46$useRef, useEffect as $69F46$useEffect} from \"react\";\n\n/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $e5be200c675c3b3a$export$aca958c65c314e6c = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valueMissing: false,\n valid: true\n};\nconst $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE = {\n ...$e5be200c675c3b3a$export$aca958c65c314e6c,\n customError: true,\n valid: false\n};\nconst $e5be200c675c3b3a$export$dad6ae84456c676a = {\n isInvalid: false,\n validationDetails: $e5be200c675c3b3a$export$aca958c65c314e6c,\n validationErrors: []\n};\nconst $e5be200c675c3b3a$export$571b5131b7e65c11 = (0, $69F46$createContext)({});\nconst $e5be200c675c3b3a$export$a763b9476acd3eb = '__formValidationState' + Date.now();\nfunction $e5be200c675c3b3a$export$fc1a364ae1f3ff10(props) {\n // Private prop for parent components to pass state to children.\n if (props[$e5be200c675c3b3a$export$a763b9476acd3eb]) {\n let { realtimeValidation: realtimeValidation, displayValidation: displayValidation, updateValidation: updateValidation, resetValidation: resetValidation, commitValidation: commitValidation } = props[$e5be200c675c3b3a$export$a763b9476acd3eb];\n return {\n realtimeValidation: realtimeValidation,\n displayValidation: displayValidation,\n updateValidation: updateValidation,\n resetValidation: resetValidation,\n commitValidation: commitValidation\n };\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return $e5be200c675c3b3a$var$useFormValidationStateImpl(props);\n}\nfunction $e5be200c675c3b3a$var$useFormValidationStateImpl(props) {\n let { isInvalid: isInvalid, validationState: validationState, name: name, value: value, builtinValidation: builtinValidation, validate: validate, validationBehavior: validationBehavior = 'aria' } = props;\n // backward compatibility.\n if (validationState) isInvalid || (isInvalid = validationState === 'invalid');\n // If the isInvalid prop is controlled, update validation result in realtime.\n let controlledError = isInvalid !== undefined ? {\n isInvalid: isInvalid,\n validationErrors: [],\n validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE\n } : null;\n // Perform custom client side validation.\n let clientError = (0, $69F46$useMemo)(()=>{\n if (!validate || value == null) return null;\n let validateErrors = $e5be200c675c3b3a$var$runValidate(validate, value);\n return $e5be200c675c3b3a$var$getValidationResult(validateErrors);\n }, [\n validate,\n value\n ]);\n if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation = undefined;\n // Get relevant server errors from the form.\n let serverErrors = (0, $69F46$useContext)($e5be200c675c3b3a$export$571b5131b7e65c11);\n let serverErrorMessages = (0, $69F46$useMemo)(()=>{\n if (name) return Array.isArray(name) ? name.flatMap((name)=>$e5be200c675c3b3a$var$asArray(serverErrors[name])) : $e5be200c675c3b3a$var$asArray(serverErrors[name]);\n return [];\n }, [\n serverErrors,\n name\n ]);\n // Show server errors when the form gets a new value, and clear when the user changes the value.\n let [lastServerErrors, setLastServerErrors] = (0, $69F46$useState)(serverErrors);\n let [isServerErrorCleared, setServerErrorCleared] = (0, $69F46$useState)(false);\n if (serverErrors !== lastServerErrors) {\n setLastServerErrors(serverErrors);\n setServerErrorCleared(false);\n }\n let serverError = (0, $69F46$useMemo)(()=>$e5be200c675c3b3a$var$getValidationResult(isServerErrorCleared ? [] : serverErrorMessages), [\n isServerErrorCleared,\n serverErrorMessages\n ]);\n // Track the next validation state in a ref until commitValidation is called.\n let nextValidation = (0, $69F46$useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);\n let [currentValidity, setCurrentValidity] = (0, $69F46$useState)($e5be200c675c3b3a$export$dad6ae84456c676a);\n let lastError = (0, $69F46$useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);\n let commitValidation = ()=>{\n if (!commitQueued) return;\n setCommitQueued(false);\n let error = clientError || builtinValidation || nextValidation.current;\n if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {\n lastError.current = error;\n setCurrentValidity(error);\n }\n };\n let [commitQueued, setCommitQueued] = (0, $69F46$useState)(false);\n (0, $69F46$useEffect)(commitValidation);\n // realtimeValidation is used to update the native input element's state based on custom validation logic.\n // displayValidation is the currently displayed validation state that the user sees (e.g. on input change/form submit).\n // With validationBehavior=\"aria\", all errors are displayed in realtime rather than on submit.\n let realtimeValidation = controlledError || serverError || clientError || builtinValidation || $e5be200c675c3b3a$export$dad6ae84456c676a;\n let displayValidation = validationBehavior === 'native' ? controlledError || serverError || currentValidity : controlledError || serverError || clientError || builtinValidation || currentValidity;\n return {\n realtimeValidation: realtimeValidation,\n displayValidation: displayValidation,\n updateValidation (value) {\n // If validationBehavior is 'aria', update in realtime. Otherwise, store in a ref until commit.\n if (validationBehavior === 'aria' && !$e5be200c675c3b3a$var$isEqualValidation(currentValidity, value)) setCurrentValidity(value);\n else nextValidation.current = value;\n },\n resetValidation () {\n // Update the currently displayed validation state to valid on form reset,\n // even if the native validity says it isn't. It'll show again on the next form submit.\n let error = $e5be200c675c3b3a$export$dad6ae84456c676a;\n if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {\n lastError.current = error;\n setCurrentValidity(error);\n }\n // Do not commit validation after the next render. This avoids a condition where\n // useSelect calls commitValidation inside an onReset handler.\n if (validationBehavior === 'native') setCommitQueued(false);\n setServerErrorCleared(true);\n },\n commitValidation () {\n // Commit validation state so the user sees it on blur/change/submit. Also clear any server errors.\n // Wait until after the next render to commit so that the latest value has been validated.\n if (validationBehavior === 'native') setCommitQueued(true);\n setServerErrorCleared(true);\n }\n };\n}\nfunction $e5be200c675c3b3a$var$asArray(v) {\n if (!v) return [];\n return Array.isArray(v) ? v : [\n v\n ];\n}\nfunction $e5be200c675c3b3a$var$runValidate(validate, value) {\n if (typeof validate === 'function') {\n let e = validate(value);\n if (e && typeof e !== 'boolean') return $e5be200c675c3b3a$var$asArray(e);\n }\n return [];\n}\nfunction $e5be200c675c3b3a$var$getValidationResult(errors) {\n return errors.length ? {\n isInvalid: true,\n validationErrors: errors,\n validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE\n } : null;\n}\nfunction $e5be200c675c3b3a$var$isEqualValidation(a, b) {\n if (a === b) return true;\n return !!a && !!b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a, i)=>a === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v])=>b.validationDetails[k] === v);\n}\nfunction $e5be200c675c3b3a$export$75ee7c75d68f5b0e(...results) {\n let errors = new Set();\n let isInvalid = false;\n let validationDetails = {\n ...$e5be200c675c3b3a$export$aca958c65c314e6c\n };\n for (let v of results){\n var _validationDetails, _key;\n for (let e of v.validationErrors)errors.add(e);\n // Only these properties apply for checkboxes.\n isInvalid || (isInvalid = v.isInvalid);\n for(let key in validationDetails)(_validationDetails = validationDetails)[_key = key] || (_validationDetails[_key] = v.validationDetails[key]);\n }\n validationDetails.valid = !isInvalid;\n return {\n isInvalid: isInvalid,\n validationErrors: [\n ...errors\n ],\n validationDetails: validationDetails\n };\n}\n\n\nexport {$e5be200c675c3b3a$export$aca958c65c314e6c as VALID_VALIDITY_STATE, $e5be200c675c3b3a$export$dad6ae84456c676a as DEFAULT_VALIDATION_RESULT, $e5be200c675c3b3a$export$571b5131b7e65c11 as FormValidationContext, $e5be200c675c3b3a$export$a763b9476acd3eb as privateValidationStateProp, $e5be200c675c3b3a$export$fc1a364ae1f3ff10 as useFormValidationState, $e5be200c675c3b3a$export$75ee7c75d68f5b0e as mergeValidation};\n//# sourceMappingURL=useFormValidationState.module.js.map\n"],"names":["$e5be200c675c3b3a$export$aca958c65c314e6c","$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE","$e5be200c675c3b3a$export$dad6ae84456c676a","$e5be200c675c3b3a$export$571b5131b7e65c11","$69F46$createContext","$e5be200c675c3b3a$export$a763b9476acd3eb","$e5be200c675c3b3a$export$fc1a364ae1f3ff10","props","realtimeValidation","displayValidation","updateValidation","resetValidation","commitValidation","$e5be200c675c3b3a$var$useFormValidationStateImpl","isInvalid","validationState","name","value","builtinValidation","validate","validationBehavior","controlledError","clientError","$69F46$useMemo","validateErrors","$e5be200c675c3b3a$var$runValidate","$e5be200c675c3b3a$var$getValidationResult","serverErrors","$69F46$useContext","serverErrorMessages","$e5be200c675c3b3a$var$asArray","lastServerErrors","setLastServerErrors","$69F46$useState","isServerErrorCleared","setServerErrorCleared","serverError","nextValidation","$69F46$useRef","currentValidity","setCurrentValidity","lastError","commitQueued","setCommitQueued","error","$e5be200c675c3b3a$var$isEqualValidation","$69F46$useEffect","v","e","errors","b","a","i","k"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),c=require("../../utils/dist/useControlledState.cjs.js");function r(t){let[n,e]=c.useControlledState(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const o=l.useCallback(()=>{e(!0)},[e]),s=l.useCallback(()=>{e(!1)},[e]),a=l.useCallback(()=>{e(!n)},[e,n]);return{isOpen:n,setOpen:e,open:o,close:s,toggle:a}}exports.useOverlayTriggerState=r;
|
|
2
|
+
//# sourceMappingURL=useOverlayTriggerState.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOverlayTriggerState.cjs.js","sources":["../../../../../node_modules/@react-stately/overlays/dist/useOverlayTriggerState.mjs"],"sourcesContent":["import {useCallback as $hnMvi$useCallback} from \"react\";\nimport {useControlledState as $hnMvi$useControlledState} from \"@react-stately/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $fc909762b330b746$export$61c6a8c84e605fb6(props) {\n let [isOpen, setOpen] = (0, $hnMvi$useControlledState)(props.isOpen, props.defaultOpen || false, props.onOpenChange);\n const open = (0, $hnMvi$useCallback)(()=>{\n setOpen(true);\n }, [\n setOpen\n ]);\n const close = (0, $hnMvi$useCallback)(()=>{\n setOpen(false);\n }, [\n setOpen\n ]);\n const toggle = (0, $hnMvi$useCallback)(()=>{\n setOpen(!isOpen);\n }, [\n setOpen,\n isOpen\n ]);\n return {\n isOpen: isOpen,\n setOpen: setOpen,\n open: open,\n close: close,\n toggle: toggle\n };\n}\n\n\nexport {$fc909762b330b746$export$61c6a8c84e605fb6 as useOverlayTriggerState};\n//# sourceMappingURL=useOverlayTriggerState.module.js.map\n"],"names":["$fc909762b330b746$export$61c6a8c84e605fb6","props","isOpen","setOpen","$hnMvi$useControlledState","open","$hnMvi$useCallback","close","toggle"],"mappings":"iKAeA,SAASA,EAA0CC,EAAO,CACtD,GAAI,CAACC,EAAQC,CAAO,EAAQC,EAAyB,mBAAEH,EAAM,OAAQA,EAAM,aAAe,GAAOA,EAAM,YAAY,EACnH,MAAMI,EAAWC,EAAAA,YAAoB,IAAI,CACrCH,EAAQ,EAAI,CACpB,EAAO,CACCA,CACR,CAAK,EACKI,EAAYD,EAAAA,YAAoB,IAAI,CACtCH,EAAQ,EAAK,CACrB,EAAO,CACCA,CACR,CAAK,EACKK,EAAaF,EAAAA,YAAoB,IAAI,CACvCH,EAAQ,CAACD,CAAM,CACvB,EAAO,CACCC,EACAD,CACR,CAAK,EACD,MAAO,CACH,OAAQA,EACR,QAASC,EACT,KAAME,EACN,MAAOE,EACP,OAAQC,CAChB,CACA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useCallback as o } from "react";
|
|
2
|
+
import { useControlledState as l } from "../../utils/dist/useControlledState.es.js";
|
|
3
|
+
function p(t) {
|
|
4
|
+
let [n, e] = l(t.isOpen, t.defaultOpen || !1, t.onOpenChange);
|
|
5
|
+
const a = o(() => {
|
|
6
|
+
e(!0);
|
|
7
|
+
}, [
|
|
8
|
+
e
|
|
9
|
+
]), s = o(() => {
|
|
10
|
+
e(!1);
|
|
11
|
+
}, [
|
|
12
|
+
e
|
|
13
|
+
]), c = o(() => {
|
|
14
|
+
e(!n);
|
|
15
|
+
}, [
|
|
16
|
+
e,
|
|
17
|
+
n
|
|
18
|
+
]);
|
|
19
|
+
return {
|
|
20
|
+
isOpen: n,
|
|
21
|
+
setOpen: e,
|
|
22
|
+
open: a,
|
|
23
|
+
close: s,
|
|
24
|
+
toggle: c
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
p as useOverlayTriggerState
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useOverlayTriggerState.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOverlayTriggerState.es.js","sources":["../../../../../node_modules/@react-stately/overlays/dist/useOverlayTriggerState.mjs"],"sourcesContent":["import {useCallback as $hnMvi$useCallback} from \"react\";\nimport {useControlledState as $hnMvi$useControlledState} from \"@react-stately/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $fc909762b330b746$export$61c6a8c84e605fb6(props) {\n let [isOpen, setOpen] = (0, $hnMvi$useControlledState)(props.isOpen, props.defaultOpen || false, props.onOpenChange);\n const open = (0, $hnMvi$useCallback)(()=>{\n setOpen(true);\n }, [\n setOpen\n ]);\n const close = (0, $hnMvi$useCallback)(()=>{\n setOpen(false);\n }, [\n setOpen\n ]);\n const toggle = (0, $hnMvi$useCallback)(()=>{\n setOpen(!isOpen);\n }, [\n setOpen,\n isOpen\n ]);\n return {\n isOpen: isOpen,\n setOpen: setOpen,\n open: open,\n close: close,\n toggle: toggle\n };\n}\n\n\nexport {$fc909762b330b746$export$61c6a8c84e605fb6 as useOverlayTriggerState};\n//# sourceMappingURL=useOverlayTriggerState.module.js.map\n"],"names":["$fc909762b330b746$export$61c6a8c84e605fb6","props","isOpen","setOpen","$hnMvi$useControlledState","open","$hnMvi$useCallback","close","toggle"],"mappings":";;AAeA,SAASA,EAA0CC,GAAO;AACtD,MAAI,CAACC,GAAQC,CAAO,IAAQC,EAA2BH,EAAM,QAAQA,EAAM,eAAe,IAAOA,EAAM,YAAY;AACnH,QAAMI,IAAWC,EAAoB,MAAI;AACrC,IAAAH,EAAQ,EAAI;AAAA,EACpB,GAAO;AAAA,IACCA;AAAA,EACR,CAAK,GACKI,IAAYD,EAAoB,MAAI;AACtC,IAAAH,EAAQ,EAAK;AAAA,EACrB,GAAO;AAAA,IACCA;AAAA,EACR,CAAK,GACKK,IAAaF,EAAoB,MAAI;AACvC,IAAAH,EAAQ,CAACD,CAAM;AAAA,EACvB,GAAO;AAAA,IACCC;AAAA,IACAD;AAAA,EACR,CAAK;AACD,SAAO;AAAA,IACH,QAAQA;AAAA,IACR,SAASC;AAAA,IACT,MAAME;AAAA,IACN,OAAOE;AAAA,IACP,QAAQC;AAAA,EAChB;AACA;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../../form/dist/useFormValidationState.cjs.js"),f=require("../../utils/dist/useControlledState.cjs.js"),u=require("react");let $=Math.round(Math.random()*1e10),b=0;function m(e){let n=u.useMemo(()=>e.name||`radio-group-${$}-${++b}`,[e.name]);var a;let[l,s]=f.useControlledState(e.value,(a=e.defaultValue)!==null&&a!==void 0?a:null,e.onChange),[c]=u.useState(l),[o,r]=u.useState(null),t=S.useFormValidationState({...e,value:l}),V=v=>{!e.isReadOnly&&!e.isDisabled&&(s(v),t.commitValidation())},d=t.displayValidation.isInvalid;var i;return{...t,name:n,selectedValue:l,defaultSelectedValue:e.value!==void 0?c:(i=e.defaultValue)!==null&&i!==void 0?i:null,setSelectedValue:V,lastFocusedValue:o,setLastFocusedValue:r,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(d?"invalid":null),isInvalid:d}}exports.useRadioGroupState=m;
|
|
2
|
+
//# sourceMappingURL=useRadioGroupState.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRadioGroupState.cjs.js","sources":["../../../../../node_modules/@react-stately/radio/dist/useRadioGroupState.mjs"],"sourcesContent":["import {useFormValidationState as $l55kx$useFormValidationState} from \"@react-stately/form\";\nimport {useControlledState as $l55kx$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $l55kx$useMemo, useState as $l55kx$useState} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nlet $a54cdc5c1942b639$var$instance = Math.round(Math.random() * 10000000000);\nlet $a54cdc5c1942b639$var$i = 0;\nfunction $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {\n // Preserved here for backward compatibility. React Aria now generates the name instead of stately.\n let name = (0, $l55kx$useMemo)(()=>props.name || `radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`, [\n props.name\n ]);\n var _props_defaultValue;\n let [selectedValue, setSelected] = (0, $l55kx$useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);\n let [initialValue] = (0, $l55kx$useState)(selectedValue);\n let [lastFocusedValue, setLastFocusedValue] = (0, $l55kx$useState)(null);\n let validation = (0, $l55kx$useFormValidationState)({\n ...props,\n value: selectedValue\n });\n let setSelectedValue = (value)=>{\n if (!props.isReadOnly && !props.isDisabled) {\n setSelected(value);\n validation.commitValidation();\n }\n };\n let isInvalid = validation.displayValidation.isInvalid;\n var _props_defaultValue1;\n return {\n ...validation,\n name: name,\n selectedValue: selectedValue,\n defaultSelectedValue: props.value !== undefined ? initialValue : (_props_defaultValue1 = props.defaultValue) !== null && _props_defaultValue1 !== void 0 ? _props_defaultValue1 : null,\n setSelectedValue: setSelectedValue,\n lastFocusedValue: lastFocusedValue,\n setLastFocusedValue: setLastFocusedValue,\n isDisabled: props.isDisabled || false,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || false,\n validationState: props.validationState || (isInvalid ? 'invalid' : null),\n isInvalid: isInvalid\n };\n}\n\n\nexport {$a54cdc5c1942b639$export$bca9d026f8e704eb as useRadioGroupState};\n//# sourceMappingURL=useRadioGroupState.module.js.map\n"],"names":["$a54cdc5c1942b639$var$instance","$a54cdc5c1942b639$var$i","$a54cdc5c1942b639$export$bca9d026f8e704eb","props","name","$l55kx$useMemo","_props_defaultValue","selectedValue","setSelected","$l55kx$useControlledState","initialValue","$l55kx$useState","lastFocusedValue","setLastFocusedValue","validation","$l55kx$useFormValidationState","setSelectedValue","value","isInvalid","_props_defaultValue1"],"mappings":"4NAiBA,IAAIA,EAAiC,KAAK,MAAM,KAAK,OAAM,EAAK,IAAW,EACvEC,EAA0B,EAC9B,SAASC,EAA0CC,EAAO,CAEtD,IAAIC,EAAWC,UAAgB,IAAIF,EAAM,MAAQ,eAAeH,CAA8B,IAAI,EAAEC,CAAuB,GAAI,CAC3HE,EAAM,IACd,CAAK,EACD,IAAIG,EACJ,GAAI,CAACC,EAAeC,CAAW,EAAQC,EAAyB,mBAAEN,EAAM,OAAQG,EAAsBH,EAAM,gBAAkB,MAAQG,IAAwB,OAASA,EAAsB,KAAMH,EAAM,QAAQ,EAC7M,CAACO,CAAY,EAAQC,EAAe,SAAEJ,CAAa,EACnD,CAACK,EAAkBC,CAAmB,EAAQF,EAAe,SAAE,IAAI,EACnEG,EAAiBC,yBAA+B,CAChD,GAAGZ,EACH,MAAOI,CACf,CAAK,EACGS,EAAoBC,GAAQ,CACxB,CAACd,EAAM,YAAc,CAACA,EAAM,aAC5BK,EAAYS,CAAK,EACjBH,EAAW,iBAAgB,EAEvC,EACQI,EAAYJ,EAAW,kBAAkB,UAC7C,IAAIK,EACJ,MAAO,CACH,GAAGL,EACH,KAAMV,EACN,cAAeG,EACf,qBAAsBJ,EAAM,QAAU,OAAYO,GAAgBS,EAAuBhB,EAAM,gBAAkB,MAAQgB,IAAyB,OAASA,EAAuB,KAClL,iBAAkBH,EAClB,iBAAkBJ,EAClB,oBAAqBC,EACrB,WAAYV,EAAM,YAAc,GAChC,WAAYA,EAAM,YAAc,GAChC,WAAYA,EAAM,YAAc,GAChC,gBAAiBA,EAAM,kBAAoBe,EAAY,UAAY,MACnE,UAAWA,CACnB,CACA","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useFormValidationState as v } from "../../form/dist/useFormValidationState.es.js";
|
|
2
|
+
import { useControlledState as m } from "../../utils/dist/useControlledState.es.js";
|
|
3
|
+
import { useMemo as r, useState as u } from "react";
|
|
4
|
+
let b = Math.round(Math.random() * 1e10), S = 0;
|
|
5
|
+
function y(e) {
|
|
6
|
+
let n = r(() => e.name || `radio-group-${b}-${++S}`, [
|
|
7
|
+
e.name
|
|
8
|
+
]);
|
|
9
|
+
var a;
|
|
10
|
+
let [l, s] = m(e.value, (a = e.defaultValue) !== null && a !== void 0 ? a : null, e.onChange), [c] = u(l), [o, f] = u(null), t = v({
|
|
11
|
+
...e,
|
|
12
|
+
value: l
|
|
13
|
+
}), V = ($) => {
|
|
14
|
+
!e.isReadOnly && !e.isDisabled && (s($), t.commitValidation());
|
|
15
|
+
}, d = t.displayValidation.isInvalid;
|
|
16
|
+
var i;
|
|
17
|
+
return {
|
|
18
|
+
...t,
|
|
19
|
+
name: n,
|
|
20
|
+
selectedValue: l,
|
|
21
|
+
defaultSelectedValue: e.value !== void 0 ? c : (i = e.defaultValue) !== null && i !== void 0 ? i : null,
|
|
22
|
+
setSelectedValue: V,
|
|
23
|
+
lastFocusedValue: o,
|
|
24
|
+
setLastFocusedValue: f,
|
|
25
|
+
isDisabled: e.isDisabled || !1,
|
|
26
|
+
isReadOnly: e.isReadOnly || !1,
|
|
27
|
+
isRequired: e.isRequired || !1,
|
|
28
|
+
validationState: e.validationState || (d ? "invalid" : null),
|
|
29
|
+
isInvalid: d
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
y as useRadioGroupState
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=useRadioGroupState.es.js.map
|