@protonradio/proton-ui 0.11.7 → 0.11.8
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/{constants/breakpoint.es.js → breakpoint-9y1_8U_b.mjs} +2 -2
- package/dist/breakpoint-9y1_8U_b.mjs.map +1 -0
- package/dist/breakpoint-DtqbboOa.js +2 -0
- package/dist/breakpoint-DtqbboOa.js.map +1 -0
- package/dist/color2k-CpDB_dpw.mjs +168 -0
- package/dist/color2k-CpDB_dpw.mjs.map +1 -0
- package/dist/color2k-DCgwXUem.js +2 -0
- package/dist/color2k-DCgwXUem.js.map +1 -0
- package/dist/{design/colors.es.js → colors-CWaj9dFz.mjs} +7 -7
- package/dist/colors-CWaj9dFz.mjs.map +1 -0
- package/dist/colors-CebzFjpe.js +2 -0
- package/dist/{design/darkTheme/colors.es.js.map → colors-CebzFjpe.js.map} +1 -1
- package/dist/{design/darkTheme/colors.es.js → colors-Ceyo4oCJ.mjs} +13 -13
- package/dist/{design/darkTheme/colors.cjs.js.map → colors-Ceyo4oCJ.mjs.map} +1 -1
- package/dist/colors-CmSJBHaf.js +2 -0
- package/dist/colors-CmSJBHaf.js.map +1 -0
- package/dist/colors-DL1dYffC.js +2 -0
- package/dist/{design/lightTheme/colors.es.js.map → colors-DL1dYffC.js.map} +1 -1
- package/dist/{design/lightTheme/colors.es.js → colors-DMkDnu4U.mjs} +11 -11
- package/dist/{design/lightTheme/colors.cjs.js.map → colors-DMkDnu4U.mjs.map} +1 -1
- package/dist/constants.cjs.js +1 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +26 -3
- 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 +55 -8
- package/dist/dark.es.js.map +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.cjs.js.map +1 -1
- package/dist/hooks.es.js +37 -8
- package/dist/hooks.es.js.map +1 -1
- package/dist/image-CUSfY1_T.js +2 -0
- package/dist/image-CUSfY1_T.js.map +1 -0
- package/dist/image-DFyN0Kd9.mjs +207 -0
- package/dist/image-DFyN0Kd9.mjs.map +1 -0
- package/dist/index.cjs.js +30 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5340 -60
- 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 +55 -8
- package/dist/light.es.js.map +1 -1
- package/dist/navigation-BB0MBIiR.js +2 -0
- package/dist/navigation-BB0MBIiR.js.map +1 -0
- package/dist/navigation-Bj7Pex9j.mjs +43 -0
- package/dist/navigation-Bj7Pex9j.mjs.map +1 -0
- package/dist/theme.cjs.js +1 -1
- package/dist/theme.cjs.js.map +1 -1
- package/dist/theme.es.js +15 -9
- package/dist/theme.es.js.map +1 -1
- package/dist/useBreakpoint-CjRyGKN-.mjs +53 -0
- package/dist/useBreakpoint-CjRyGKN-.mjs.map +1 -0
- package/dist/useBreakpoint-DA-JqOu3.js +2 -0
- package/dist/useBreakpoint-DA-JqOu3.js.map +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +15 -19
- package/dist/utils.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/_virtual/jsx-runtime.cjs.js +0 -2
- package/dist/_virtual/jsx-runtime.cjs.js.map +0 -1
- package/dist/_virtual/jsx-runtime.es.js +0 -5
- package/dist/_virtual/jsx-runtime.es.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.cjs.js +0 -2
- package/dist/_virtual/react-jsx-runtime.development.cjs.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.es.js +0 -5
- package/dist/_virtual/react-jsx-runtime.development.es.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.min.cjs.js +0 -2
- package/dist/_virtual/react-jsx-runtime.production.min.cjs.js.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.min.es.js +0 -5
- package/dist/_virtual/react-jsx-runtime.production.min.es.js.map +0 -1
- package/dist/assets/svg/icons.svg.cjs.js +0 -2
- package/dist/assets/svg/icons.svg.cjs.js.map +0 -1
- package/dist/assets/svg/icons.svg.es.js +0 -5
- package/dist/assets/svg/icons.svg.es.js.map +0 -1
- package/dist/components/ActionMenu/ActionMenu.cjs.js +0 -2
- package/dist/components/ActionMenu/ActionMenu.cjs.js.map +0 -1
- package/dist/components/ActionMenu/ActionMenu.es.js +0 -262
- package/dist/components/ActionMenu/ActionMenu.es.js.map +0 -1
- package/dist/components/Badge/Badge.cjs.js +0 -2
- package/dist/components/Badge/Badge.cjs.js.map +0 -1
- package/dist/components/Badge/Badge.es.js +0 -25
- package/dist/components/Badge/Badge.es.js.map +0 -1
- package/dist/components/Banner/Banner.cjs.js +0 -2
- package/dist/components/Banner/Banner.cjs.js.map +0 -1
- package/dist/components/Banner/Banner.es.js +0 -131
- package/dist/components/Banner/Banner.es.js.map +0 -1
- package/dist/components/Button/Button.cjs.js +0 -2
- package/dist/components/Button/Button.cjs.js.map +0 -1
- package/dist/components/Button/Button.es.js +0 -99
- package/dist/components/Button/Button.es.js.map +0 -1
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js +0 -2
- package/dist/components/ButtonGroup/ButtonGroup.cjs.js.map +0 -1
- package/dist/components/ButtonGroup/ButtonGroup.es.js +0 -51
- package/dist/components/ButtonGroup/ButtonGroup.es.js.map +0 -1
- package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js +0 -2
- package/dist/components/ButtonWithSelect/ButtonWithSelect.cjs.js.map +0 -1
- package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js +0 -80
- package/dist/components/ButtonWithSelect/ButtonWithSelect.es.js.map +0 -1
- package/dist/components/DataTable/DataTable.cjs.js +0 -2
- package/dist/components/DataTable/DataTable.cjs.js.map +0 -1
- package/dist/components/DataTable/DataTable.es.js +0 -137
- package/dist/components/DataTable/DataTable.es.js.map +0 -1
- package/dist/components/Dialog/Dialog.cjs.js +0 -2
- package/dist/components/Dialog/Dialog.cjs.js.map +0 -1
- package/dist/components/Dialog/Dialog.es.js +0 -15
- package/dist/components/Dialog/Dialog.es.js.map +0 -1
- package/dist/components/Elevation/Elevation.cjs.js +0 -2
- package/dist/components/Elevation/Elevation.cjs.js.map +0 -1
- package/dist/components/Elevation/Elevation.es.js +0 -33
- package/dist/components/Elevation/Elevation.es.js.map +0 -1
- package/dist/components/Icon/Icon.cjs.js +0 -2
- package/dist/components/Icon/Icon.cjs.js.map +0 -1
- package/dist/components/Icon/Icon.es.js +0 -42
- package/dist/components/Icon/Icon.es.js.map +0 -1
- package/dist/components/ImageBackground/ImageBackground.cjs.js +0 -2
- package/dist/components/ImageBackground/ImageBackground.cjs.js.map +0 -1
- package/dist/components/ImageBackground/ImageBackground.es.js +0 -55
- package/dist/components/ImageBackground/ImageBackground.es.js.map +0 -1
- package/dist/components/Input/BaseInput/Input.cjs.js +0 -2
- package/dist/components/Input/BaseInput/Input.cjs.js.map +0 -1
- package/dist/components/Input/BaseInput/Input.es.js +0 -182
- package/dist/components/Input/BaseInput/Input.es.js.map +0 -1
- package/dist/components/Input/CopyInput/CopyInput.cjs.js +0 -2
- package/dist/components/Input/CopyInput/CopyInput.cjs.js.map +0 -1
- package/dist/components/Input/CopyInput/CopyInput.es.js +0 -83
- package/dist/components/Input/CopyInput/CopyInput.es.js.map +0 -1
- package/dist/components/Input/SearchInput/SearchInput.cjs.js +0 -2
- package/dist/components/Input/SearchInput/SearchInput.cjs.js.map +0 -1
- package/dist/components/Input/SearchInput/SearchInput.es.js +0 -118
- package/dist/components/Input/SearchInput/SearchInput.es.js.map +0 -1
- package/dist/components/Menu/MenuTrigger.cjs.js +0 -2
- package/dist/components/Menu/MenuTrigger.cjs.js.map +0 -1
- package/dist/components/Menu/MenuTrigger.es.js +0 -89
- package/dist/components/Menu/MenuTrigger.es.js.map +0 -1
- package/dist/components/Menu/PopoverMenu.cjs.js +0 -2
- package/dist/components/Menu/PopoverMenu.cjs.js.map +0 -1
- package/dist/components/Menu/PopoverMenu.es.js +0 -122
- package/dist/components/Menu/PopoverMenu.es.js.map +0 -1
- package/dist/components/Modal/Modal.cjs.js +0 -2
- package/dist/components/Modal/Modal.cjs.js.map +0 -1
- package/dist/components/Modal/Modal.es.js +0 -122
- package/dist/components/Modal/Modal.es.js.map +0 -1
- package/dist/components/Popover/Popover.cjs.js +0 -2
- package/dist/components/Popover/Popover.cjs.js.map +0 -1
- package/dist/components/Popover/Popover.es.js +0 -54
- package/dist/components/Popover/Popover.es.js.map +0 -1
- package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js +0 -2
- package/dist/components/ScreenOverlay/ScreenOverlay.cjs.js.map +0 -1
- package/dist/components/ScreenOverlay/ScreenOverlay.es.js +0 -44
- package/dist/components/ScreenOverlay/ScreenOverlay.es.js.map +0 -1
- package/dist/components/Select/Select.cjs.js +0 -2
- package/dist/components/Select/Select.cjs.js.map +0 -1
- package/dist/components/Select/Select.es.js +0 -224
- package/dist/components/Select/Select.es.js.map +0 -1
- package/dist/components/Switch/Switch.cjs.js +0 -2
- package/dist/components/Switch/Switch.cjs.js.map +0 -1
- package/dist/components/Switch/Switch.es.js +0 -40
- package/dist/components/Switch/Switch.es.js.map +0 -1
- package/dist/components/Table/Collection/CompoundComponents.cjs.js +0 -2
- package/dist/components/Table/Collection/CompoundComponents.cjs.js.map +0 -1
- package/dist/components/Table/Collection/CompoundComponents.es.js +0 -9
- package/dist/components/Table/Collection/CompoundComponents.es.js.map +0 -1
- package/dist/components/Table/Collection/collectionParser.cjs.js +0 -2
- package/dist/components/Table/Collection/collectionParser.cjs.js.map +0 -1
- package/dist/components/Table/Collection/collectionParser.es.js +0 -54
- package/dist/components/Table/Collection/collectionParser.es.js.map +0 -1
- package/dist/components/Table/Collection/useTableCollection.cjs.js +0 -2
- package/dist/components/Table/Collection/useTableCollection.cjs.js.map +0 -1
- package/dist/components/Table/Collection/useTableCollection.es.js +0 -59
- package/dist/components/Table/Collection/useTableCollection.es.js.map +0 -1
- package/dist/components/Table/Table.cjs.js +0 -2
- package/dist/components/Table/Table.cjs.js.map +0 -1
- package/dist/components/Table/Table.es.js +0 -89
- package/dist/components/Table/Table.es.js.map +0 -1
- package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js +0 -2
- package/dist/components/Text/TextEllipsis/TextEllipsis.cjs.js.map +0 -1
- package/dist/components/Text/TextEllipsis/TextEllipsis.es.js +0 -30
- package/dist/components/Text/TextEllipsis/TextEllipsis.es.js.map +0 -1
- package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js +0 -2
- package/dist/components/Text/TextEmphasis/TextEmphasis.cjs.js.map +0 -1
- package/dist/components/Text/TextEmphasis/TextEmphasis.es.js +0 -54
- package/dist/components/Text/TextEmphasis/TextEmphasis.es.js.map +0 -1
- package/dist/components/ThemeProvider.cjs.js +0 -2
- package/dist/components/ThemeProvider.cjs.js.map +0 -1
- package/dist/components/ThemeProvider.es.js +0 -43
- package/dist/components/ThemeProvider.es.js.map +0 -1
- package/dist/components/Tombstone/Tombstone.cjs.js +0 -2
- package/dist/components/Tombstone/Tombstone.cjs.js.map +0 -1
- package/dist/components/Tombstone/Tombstone.es.js +0 -35
- package/dist/components/Tombstone/Tombstone.es.js.map +0 -1
- package/dist/components/Tooltip/Tooltip.cjs.js +0 -2
- package/dist/components/Tooltip/Tooltip.cjs.js.map +0 -1
- package/dist/components/Tooltip/Tooltip.es.js +0 -78
- package/dist/components/Tooltip/Tooltip.es.js.map +0 -1
- package/dist/components/Waveform/Waveform.cjs.js +0 -2
- package/dist/components/Waveform/Waveform.cjs.js.map +0 -1
- package/dist/components/Waveform/Waveform.es.js +0 -163
- package/dist/components/Waveform/Waveform.es.js.map +0 -1
- package/dist/components/Waveform/WaveformBar.cjs.js +0 -2
- package/dist/components/Waveform/WaveformBar.cjs.js.map +0 -1
- package/dist/components/Waveform/WaveformBar.es.js +0 -74
- package/dist/components/Waveform/WaveformBar.es.js.map +0 -1
- package/dist/constants/breakpoint.cjs.js +0 -2
- package/dist/constants/breakpoint.cjs.js.map +0 -1
- package/dist/constants/breakpoint.es.js.map +0 -1
- package/dist/constants/placement.cjs.js +0 -2
- package/dist/constants/placement.cjs.js.map +0 -1
- package/dist/constants/placement.es.js +0 -28
- package/dist/constants/placement.es.js.map +0 -1
- package/dist/design/colors.cjs.js +0 -2
- package/dist/design/colors.cjs.js.map +0 -1
- package/dist/design/colors.es.js.map +0 -1
- package/dist/design/darkTheme/colors.cjs.js +0 -2
- package/dist/design/darkTheme/stylesheet.cjs.js +0 -2
- package/dist/design/darkTheme/stylesheet.cjs.js.map +0 -1
- package/dist/design/darkTheme/stylesheet.es.js +0 -52
- package/dist/design/darkTheme/stylesheet.es.js.map +0 -1
- package/dist/design/generateStylesheet.cjs.js +0 -2
- package/dist/design/generateStylesheet.cjs.js.map +0 -1
- package/dist/design/generateStylesheet.es.js +0 -26
- package/dist/design/generateStylesheet.es.js.map +0 -1
- package/dist/design/lightTheme/colors.cjs.js +0 -2
- package/dist/design/lightTheme/stylesheet.cjs.js +0 -2
- package/dist/design/lightTheme/stylesheet.cjs.js.map +0 -1
- package/dist/design/lightTheme/stylesheet.es.js +0 -52
- package/dist/design/lightTheme/stylesheet.es.js.map +0 -1
- package/dist/design/theme.cjs.js +0 -2
- package/dist/design/theme.cjs.js.map +0 -1
- package/dist/design/theme.es.js +0 -12
- package/dist/design/theme.es.js.map +0 -1
- package/dist/hooks/useBreakpoint.cjs.js +0 -2
- package/dist/hooks/useBreakpoint.cjs.js.map +0 -1
- package/dist/hooks/useBreakpoint.es.js +0 -17
- package/dist/hooks/useBreakpoint.es.js.map +0 -1
- package/dist/hooks/useIsClosing.cjs.js +0 -2
- package/dist/hooks/useIsClosing.cjs.js.map +0 -1
- package/dist/hooks/useIsClosing.es.js +0 -30
- package/dist/hooks/useIsClosing.es.js.map +0 -1
- package/dist/hooks/useLockBodyScroll.cjs.js +0 -2
- package/dist/hooks/useLockBodyScroll.cjs.js.map +0 -1
- package/dist/hooks/useLockBodyScroll.es.js +0 -14
- package/dist/hooks/useLockBodyScroll.es.js.map +0 -1
- package/dist/hooks/usePalette.cjs.js +0 -2
- package/dist/hooks/usePalette.cjs.js.map +0 -1
- package/dist/hooks/usePalette.es.js +0 -37
- package/dist/hooks/usePalette.es.js.map +0 -1
- package/dist/node_modules/@react-aria/button/dist/useButton.cjs.js +0 -2
- package/dist/node_modules/@react-aria/button/dist/useButton.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/button/dist/useButton.es.js +0 -47
- package/dist/node_modules/@react-aria/button/dist/useButton.es.js.map +0 -1
- package/dist/node_modules/@react-aria/dialog/dist/useDialog.cjs.js +0 -2
- package/dist/node_modules/@react-aria/dialog/dist/useDialog.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/dialog/dist/useDialog.es.js +0 -44
- package/dist/node_modules/@react-aria/dialog/dist/useDialog.es.js.map +0 -1
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.cjs.js +0 -2
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.es.js +0 -423
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.es.js.map +0 -1
- package/dist/node_modules/@react-aria/focus/dist/isElementVisible.cjs.js +0 -2
- package/dist/node_modules/@react-aria/focus/dist/isElementVisible.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/focus/dist/isElementVisible.es.js +0 -23
- package/dist/node_modules/@react-aria/focus/dist/isElementVisible.es.js.map +0 -1
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.cjs.js +0 -2
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.es.js +0 -76
- package/dist/node_modules/@react-aria/form/dist/useFormValidation.es.js.map +0 -1
- package/dist/node_modules/@react-aria/i18n/dist/context.cjs.js +0 -2
- package/dist/node_modules/@react-aria/i18n/dist/context.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/i18n/dist/context.es.js +0 -11
- package/dist/node_modules/@react-aria/i18n/dist/context.es.js.map +0 -1
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.cjs.js +0 -2
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.es.js +0 -30
- package/dist/node_modules/@react-aria/i18n/dist/useDefaultLocale.es.js.map +0 -1
- package/dist/node_modules/@react-aria/i18n/dist/utils.cjs.js +0 -2
- package/dist/node_modules/@react-aria/i18n/dist/utils.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/i18n/dist/utils.es.js +0 -45
- package/dist/node_modules/@react-aria/i18n/dist/utils.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/context.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/context.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/context.es.js +0 -10
- package/dist/node_modules/@react-aria/interactions/dist/context.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.es.js +0 -29
- package/dist/node_modules/@react-aria/interactions/dist/createEventHandler.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.es.js +0 -15
- package/dist/node_modules/@react-aria/interactions/dist/focusSafely.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/textSelection.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/textSelection.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/textSelection.es.js +0 -35
- package/dist/node_modules/@react-aria/interactions/dist/textSelection.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.es.js +0 -30
- package/dist/node_modules/@react-aria/interactions/dist/useFocus.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.es.js +0 -63
- package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.es.js +0 -56
- package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js +0 -42
- package/dist/node_modules/@react-aria/interactions/dist/useFocusable.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.es.js +0 -51
- package/dist/node_modules/@react-aria/interactions/dist/useInteractOutside.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.es.js +0 -13
- package/dist/node_modules/@react-aria/interactions/dist/useKeyboard.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/usePress.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/usePress.es.js +0 -375
- package/dist/node_modules/@react-aria/interactions/dist/usePress.es.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/utils.cjs.js +0 -2
- package/dist/node_modules/@react-aria/interactions/dist/utils.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/interactions/dist/utils.es.js +0 -92
- package/dist/node_modules/@react-aria/interactions/dist/utils.es.js.map +0 -1
- package/dist/node_modules/@react-aria/label/dist/useField.cjs.js +0 -2
- package/dist/node_modules/@react-aria/label/dist/useField.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/label/dist/useField.es.js +0 -36
- package/dist/node_modules/@react-aria/label/dist/useField.es.js.map +0 -1
- package/dist/node_modules/@react-aria/label/dist/useLabel.cjs.js +0 -2
- package/dist/node_modules/@react-aria/label/dist/useLabel.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/label/dist/useLabel.es.js +0 -23
- package/dist/node_modules/@react-aria/label/dist/useLabel.es.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js +0 -2
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.es.js +0 -16
- package/dist/node_modules/@react-aria/overlays/dist/Overlay.es.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.cjs.js +0 -2
- package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.es.js +0 -64
- package/dist/node_modules/@react-aria/overlays/dist/ariaHideOutside.es.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.cjs.js +0 -2
- package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.es.js +0 -30
- package/dist/node_modules/@react-aria/overlays/dist/useModalOverlay.es.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/useOverlay.cjs.js +0 -2
- package/dist/node_modules/@react-aria/overlays/dist/useOverlay.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/useOverlay.es.js +0 -53
- package/dist/node_modules/@react-aria/overlays/dist/useOverlay.es.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.cjs.js +0 -2
- package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.es.js +0 -98
- package/dist/node_modules/@react-aria/overlays/dist/usePreventScroll.es.js.map +0 -1
- package/dist/node_modules/@react-aria/radio/dist/useRadio.cjs.js +0 -2
- package/dist/node_modules/@react-aria/radio/dist/useRadio.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/radio/dist/useRadio.es.js +0 -58
- package/dist/node_modules/@react-aria/radio/dist/useRadio.es.js.map +0 -1
- package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.cjs.js +0 -2
- package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.es.js +0 -78
- package/dist/node_modules/@react-aria/radio/dist/useRadioGroup.es.js.map +0 -1
- package/dist/node_modules/@react-aria/radio/dist/utils.cjs.js +0 -2
- package/dist/node_modules/@react-aria/radio/dist/utils.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/radio/dist/utils.es.js +0 -5
- package/dist/node_modules/@react-aria/radio/dist/utils.es.js.map +0 -1
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.cjs.js +0 -2
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.es.js +0 -19
- package/dist/node_modules/@react-aria/ssr/dist/SSRProvider.es.js.map +0 -1
- package/dist/node_modules/@react-aria/switch/dist/useSwitch.cjs.js +0 -2
- package/dist/node_modules/@react-aria/switch/dist/useSwitch.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/switch/dist/useSwitch.es.js +0 -20
- package/dist/node_modules/@react-aria/switch/dist/useSwitch.es.js.map +0 -1
- package/dist/node_modules/@react-aria/toggle/dist/useToggle.cjs.js +0 -2
- package/dist/node_modules/@react-aria/toggle/dist/useToggle.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/toggle/dist/useToggle.es.js +0 -48
- package/dist/node_modules/@react-aria/toggle/dist/useToggle.es.js.map +0 -1
- package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.cjs.js +0 -2
- package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.cjs.js.map +0 -1
- package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.es.js +0 -41
- package/dist/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.es.js.map +0 -1
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.cjs.js +0 -2
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.cjs.js.map +0 -1
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.es.js +0 -110
- package/dist/node_modules/@react-stately/form/dist/useFormValidationState.es.js.map +0 -1
- package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.cjs.js +0 -2
- package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.cjs.js.map +0 -1
- package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.es.js +0 -30
- package/dist/node_modules/@react-stately/overlays/dist/useOverlayTriggerState.es.js.map +0 -1
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.cjs.js +0 -2
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.cjs.js.map +0 -1
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.es.js +0 -33
- package/dist/node_modules/@react-stately/radio/dist/useRadioGroupState.es.js.map +0 -1
- package/dist/node_modules/@react-stately/toggle/dist/useToggleState.cjs.js +0 -2
- package/dist/node_modules/@react-stately/toggle/dist/useToggleState.cjs.js.map +0 -1
- package/dist/node_modules/@react-stately/toggle/dist/useToggleState.es.js +0 -19
- package/dist/node_modules/@react-stately/toggle/dist/useToggleState.es.js.map +0 -1
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.cjs.js +0 -2
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.cjs.js.map +0 -1
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.es.js +0 -31
- package/dist/node_modules/@react-stately/utils/dist/useControlledState.es.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.cjs.js +0 -2
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.cjs.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.es.js +0 -9
- package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.es.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.cjs.js +0 -2
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.cjs.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.es.js +0 -8
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_get.es.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.cjs.js +0 -2
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.cjs.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.es.js +0 -13
- package/dist/node_modules/@swc/helpers/esm/_class_apply_descriptor_set.es.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.cjs.js +0 -2
- package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.cjs.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.es.js +0 -9
- package/dist/node_modules/@swc/helpers/esm/_class_extract_field_descriptor.es.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.cjs.js +0 -2
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.cjs.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.es.js +0 -11
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_get.es.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.cjs.js +0 -2
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.cjs.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.es.js +0 -9
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.es.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.cjs.js +0 -2
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.cjs.js.map +0 -1
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.es.js +0 -11
- package/dist/node_modules/@swc/helpers/esm/_class_private_field_set.es.js.map +0 -1
- package/dist/node_modules/color2k/dist/index.exports.import.es.cjs.js +0 -2
- package/dist/node_modules/color2k/dist/index.exports.import.es.cjs.js.map +0 -1
- package/dist/node_modules/color2k/dist/index.exports.import.es.es.js +0 -171
- package/dist/node_modules/color2k/dist/index.exports.import.es.es.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +0 -23
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +0 -609
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs.js +0 -10
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs.js.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js +0 -29
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.es.js.map +0 -1
- package/dist/node_modules/react/jsx-runtime.cjs.js +0 -2
- package/dist/node_modules/react/jsx-runtime.cjs.js.map +0 -1
- package/dist/node_modules/react/jsx-runtime.es.js +0 -9
- package/dist/node_modules/react/jsx-runtime.es.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js +0 -2
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.cjs.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js +0 -37
- package/dist/node_modules/react-aria-components/dist/OverlayArrow.es.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js +0 -2
- package/dist/node_modules/react-aria-components/dist/Tooltip.cjs.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/Tooltip.es.js +0 -97
- package/dist/node_modules/react-aria-components/dist/Tooltip.es.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/utils.cjs.js +0 -2
- package/dist/node_modules/react-aria-components/dist/utils.cjs.js.map +0 -1
- package/dist/node_modules/react-aria-components/dist/utils.es.js +0 -89
- package/dist/node_modules/react-aria-components/dist/utils.es.js.map +0 -1
- package/dist/utils/color2k.cjs.js +0 -2
- package/dist/utils/color2k.cjs.js.map +0 -1
- package/dist/utils/color2k.es.js +0 -14
- package/dist/utils/color2k.es.js.map +0 -1
- package/dist/utils/copy.cjs.js +0 -2
- package/dist/utils/copy.cjs.js.map +0 -1
- package/dist/utils/copy.es.js +0 -31
- package/dist/utils/copy.es.js.map +0 -1
- package/dist/utils/image.cjs.js +0 -2
- package/dist/utils/image.cjs.js.map +0 -1
- package/dist/utils/image.es.js +0 -28
- package/dist/utils/image.es.js.map +0 -1
- package/dist/utils/navigation.cjs.js +0 -2
- package/dist/utils/navigation.cjs.js.map +0 -1
- package/dist/utils/navigation.es.js +0 -12
- package/dist/utils/navigation.es.js.map +0 -1
- package/dist/utils/palette.cjs.js +0 -2
- package/dist/utils/palette.cjs.js.map +0 -1
- package/dist/utils/palette.es.js +0 -183
- package/dist/utils/palette.es.js.map +0 -1
- package/dist/utils/string.cjs.js +0 -2
- package/dist/utils/string.cjs.js.map +0 -1
- package/dist/utils/string.es.js +0 -8
- package/dist/utils/string.es.js.map +0 -1
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { useLayoutEffect as g, isIOS as T, chain as v, getScrollParent as w } from "@react-aria/utils";
|
|
2
|
-
const m = typeof document < "u" && window.visualViewport, y = /* @__PURE__ */ new Set([
|
|
3
|
-
"checkbox",
|
|
4
|
-
"radio",
|
|
5
|
-
"range",
|
|
6
|
-
"color",
|
|
7
|
-
"file",
|
|
8
|
-
"image",
|
|
9
|
-
"button",
|
|
10
|
-
"submit",
|
|
11
|
-
"reset"
|
|
12
|
-
]);
|
|
13
|
-
let a = 0, f;
|
|
14
|
-
function L(e = {}) {
|
|
15
|
-
let { isDisabled: t } = e;
|
|
16
|
-
g(() => {
|
|
17
|
-
if (!t)
|
|
18
|
-
return a++, a === 1 && (T() ? f = b() : f = S()), () => {
|
|
19
|
-
a--, a === 0 && f();
|
|
20
|
-
};
|
|
21
|
-
}, [
|
|
22
|
-
t
|
|
23
|
-
]);
|
|
24
|
-
}
|
|
25
|
-
function S() {
|
|
26
|
-
return v(r(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), r(document.documentElement, "overflow", "hidden"));
|
|
27
|
-
}
|
|
28
|
-
function b() {
|
|
29
|
-
let e, t, n = (c) => {
|
|
30
|
-
e = w(c.target, !0), !(e === document.documentElement && e === document.body) && e instanceof HTMLElement && window.getComputedStyle(e).overscrollBehavior === "auto" && (t = r(e, "overscrollBehavior", "contain"));
|
|
31
|
-
}, o = (c) => {
|
|
32
|
-
if (!e || e === document.documentElement || e === document.body) {
|
|
33
|
-
c.preventDefault();
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
e.scrollHeight === e.clientHeight && e.scrollWidth === e.clientWidth && c.preventDefault();
|
|
37
|
-
}, u = () => {
|
|
38
|
-
t && t();
|
|
39
|
-
}, s = (c) => {
|
|
40
|
-
let l = c.target;
|
|
41
|
-
x(l) && (h(), l.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
42
|
-
l.style.transform = "", m && (m.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
43
|
-
$(l);
|
|
44
|
-
}) : m.addEventListener("resize", () => $(l), {
|
|
45
|
-
once: !0
|
|
46
|
-
}));
|
|
47
|
-
}));
|
|
48
|
-
}, i = null, h = () => {
|
|
49
|
-
if (i) return;
|
|
50
|
-
let c = () => {
|
|
51
|
-
window.scrollTo(0, 0);
|
|
52
|
-
}, l = window.pageXOffset, p = window.pageYOffset;
|
|
53
|
-
i = v(d(window, "scroll", c), r(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), r(document.documentElement, "overflow", "hidden"), r(document.body, "marginTop", `-${p}px`), () => {
|
|
54
|
-
window.scrollTo(l, p);
|
|
55
|
-
}), window.scrollTo(0, 0);
|
|
56
|
-
}, E = v(d(document, "touchstart", n, {
|
|
57
|
-
passive: !1,
|
|
58
|
-
capture: !0
|
|
59
|
-
}), d(document, "touchmove", o, {
|
|
60
|
-
passive: !1,
|
|
61
|
-
capture: !0
|
|
62
|
-
}), d(document, "touchend", u, {
|
|
63
|
-
passive: !1,
|
|
64
|
-
capture: !0
|
|
65
|
-
}), d(document, "focus", s, !0));
|
|
66
|
-
return () => {
|
|
67
|
-
t == null || t(), i == null || i(), E();
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function r(e, t, n) {
|
|
71
|
-
let o = e.style[t];
|
|
72
|
-
return e.style[t] = n, () => {
|
|
73
|
-
e.style[t] = o;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function d(e, t, n, o) {
|
|
77
|
-
return e.addEventListener(t, n, o), () => {
|
|
78
|
-
e.removeEventListener(t, n, o);
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
function $(e) {
|
|
82
|
-
let t = document.scrollingElement || document.documentElement, n = e;
|
|
83
|
-
for (; n && n !== t; ) {
|
|
84
|
-
let o = w(n);
|
|
85
|
-
if (o !== document.documentElement && o !== document.body && o !== n) {
|
|
86
|
-
let u = o.getBoundingClientRect().top, s = n.getBoundingClientRect().top;
|
|
87
|
-
s > u + n.clientHeight && (o.scrollTop += s - u);
|
|
88
|
-
}
|
|
89
|
-
n = o.parentElement;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function x(e) {
|
|
93
|
-
return e instanceof HTMLInputElement && !y.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
94
|
-
}
|
|
95
|
-
export {
|
|
96
|
-
L as usePreventScroll
|
|
97
|
-
};
|
|
98
|
-
//# sourceMappingURL=usePreventScroll.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePreventScroll.es.js","sources":["../../../../../node_modules/@react-aria/overlays/dist/usePreventScroll.mjs"],"sourcesContent":["import {useLayoutEffect as $7mMvr$useLayoutEffect, isIOS as $7mMvr$isIOS, chain as $7mMvr$chain, getScrollParent as $7mMvr$getScrollParent} from \"@react-aria/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 */ \nconst $49c51c25361d4cd2$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;\n// HTML input types that do not cause the software keyboard to appear.\nconst $49c51c25361d4cd2$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n// The number of active usePreventScroll calls. Used to determine whether to revert back to the original page style/scroll position\nlet $49c51c25361d4cd2$var$preventScrollCount = 0;\nlet $49c51c25361d4cd2$var$restore;\nfunction $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {\n let { isDisabled: isDisabled } = options;\n (0, $7mMvr$useLayoutEffect)(()=>{\n if (isDisabled) return;\n $49c51c25361d4cd2$var$preventScrollCount++;\n if ($49c51c25361d4cd2$var$preventScrollCount === 1) {\n if ((0, $7mMvr$isIOS)()) $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollMobileSafari();\n else $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard();\n }\n return ()=>{\n $49c51c25361d4cd2$var$preventScrollCount--;\n if ($49c51c25361d4cd2$var$preventScrollCount === 0) $49c51c25361d4cd2$var$restore();\n };\n }, [\n isDisabled\n ]);\n}\n// For most browsers, all we need to do is set `overflow: hidden` on the root element, and\n// add some padding to prevent the page from shifting when the scrollbar is hidden.\nfunction $49c51c25361d4cd2$var$preventScrollStandard() {\n return (0, $7mMvr$chain)($49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'));\n}\n// Mobile Safari is a whole different beast. Even with overflow: hidden,\n// it still scrolls the page in many situations:\n//\n// 1. When the bottom toolbar and address bar are collapsed, page scrolling is always allowed.\n// 2. When the keyboard is visible, the viewport does not resize. Instead, the keyboard covers part of\n// it, so it becomes scrollable.\n// 3. When tapping on an input, the page always scrolls so that the input is centered in the visual viewport.\n// This may cause even fixed position elements to scroll off the screen.\n// 4. When using the next/previous buttons in the keyboard to navigate between inputs, the whole page always\n// scrolls, even if the input is inside a nested scrollable element that could be scrolled instead.\n//\n// In order to work around these cases, and prevent scrolling without jankiness, we do a few things:\n//\n// 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling\n// on the window.\n// 2. Set `overscroll-behavior: contain` on nested scrollable regions so they do not scroll the page when at\n// the top or bottom. Work around a bug where this does not work when the element does not actually overflow\n// by preventing default in a `touchmove` event.\n// 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.\n// 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top\n// of the page, which prevents it from scrolling the page. After the input is focused, scroll the element\n// into view ourselves, without scrolling the whole page.\n// 5. Offset the body by the scroll position using a negative margin and scroll to the top. This should appear the\n// same visually, but makes the actual scroll position always zero. This is required to make all of the\n// above work or Safari will still try to scroll the page when focusing an input.\n// 6. As a last resort, handle window scroll events, and scroll back to the top. This can happen when attempting\n// to navigate to an input with the next/previous buttons that's outside a modal.\nfunction $49c51c25361d4cd2$var$preventScrollMobileSafari() {\n let scrollable;\n let restoreScrollableStyles;\n let onTouchStart = (e)=>{\n // Store the nearest scrollable parent element from the element that the user touched.\n scrollable = (0, $7mMvr$getScrollParent)(e.target, true);\n if (scrollable === document.documentElement && scrollable === document.body) return;\n // Prevent scrolling up when at the top and scrolling down when at the bottom\n // of a nested scrollable area, otherwise mobile Safari will start scrolling\n // the window instead.\n if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === 'auto') restoreScrollableStyles = $49c51c25361d4cd2$var$setStyle(scrollable, 'overscrollBehavior', 'contain');\n };\n let onTouchMove = (e)=>{\n // Prevent scrolling the window.\n if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {\n e.preventDefault();\n return;\n }\n // overscroll-behavior should prevent scroll chaining, but currently does not\n // if the element doesn't actually overflow. https://bugs.webkit.org/show_bug.cgi?id=243452\n // This checks that both the width and height do not overflow, otherwise we might\n // block horizontal scrolling too. In that case, adding `touch-action: pan-x` to\n // the element will prevent vertical page scrolling. We can't add that automatically\n // because it must be set before the touchstart event.\n if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();\n };\n let onTouchEnd = ()=>{\n if (restoreScrollableStyles) restoreScrollableStyles();\n };\n let onFocus = (e)=>{\n let target = e.target;\n if ($49c51c25361d4cd2$var$willOpenKeyboard(target)) {\n setupStyles();\n // Apply a transform to trick Safari into thinking the input is at the top of the page\n // so it doesn't try to scroll it into view.\n target.style.transform = 'translateY(-2000px)';\n requestAnimationFrame(()=>{\n target.style.transform = '';\n // This will have prevented the browser from scrolling the focused element into view,\n // so we need to do this ourselves in a way that doesn't cause the whole page to scroll.\n if ($49c51c25361d4cd2$var$visualViewport) {\n if ($49c51c25361d4cd2$var$visualViewport.height < window.innerHeight) // If the keyboard is already visible, do this after one additional frame\n // to wait for the transform to be removed.\n requestAnimationFrame(()=>{\n $49c51c25361d4cd2$var$scrollIntoView(target);\n });\n else // Otherwise, wait for the visual viewport to resize before scrolling so we can\n // measure the correct position to scroll to.\n $49c51c25361d4cd2$var$visualViewport.addEventListener('resize', ()=>$49c51c25361d4cd2$var$scrollIntoView(target), {\n once: true\n });\n }\n });\n }\n };\n let restoreStyles = null;\n let setupStyles = ()=>{\n if (restoreStyles) return;\n let onWindowScroll = ()=>{\n // Last resort. If the window scrolled, scroll it back to the top.\n // It should always be at the top because the body will have a negative margin (see below).\n window.scrollTo(0, 0);\n };\n // Record the original scroll position so we can restore it.\n // Then apply a negative margin to the body to offset it by the scroll position. This will\n // enable us to scroll the window to the top, which is required for the rest of this to work.\n let scrollX = window.pageXOffset;\n let scrollY = window.pageYOffset;\n restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, 'scroll', onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'), $49c51c25361d4cd2$var$setStyle(document.body, 'marginTop', `-${scrollY}px`), ()=>{\n window.scrollTo(scrollX, scrollY);\n });\n // Scroll to the top. The negative margin on the body will make this appear the same.\n window.scrollTo(0, 0);\n };\n let removeEvents = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(document, 'touchstart', onTouchStart, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchmove', onTouchMove, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchend', onTouchEnd, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'focus', onFocus, true));\n return ()=>{\n // Restore styles and scroll the page back to where it was.\n restoreScrollableStyles === null || restoreScrollableStyles === void 0 ? void 0 : restoreScrollableStyles();\n restoreStyles === null || restoreStyles === void 0 ? void 0 : restoreStyles();\n removeEvents();\n };\n}\n// Sets a CSS property on an element, and returns a function to revert it to the previous value.\nfunction $49c51c25361d4cd2$var$setStyle(element, style, value) {\n let cur = element.style[style];\n element.style[style] = value;\n return ()=>{\n element.style[style] = cur;\n };\n}\n// Adds an event listener to an element, and returns a function to remove it.\nfunction $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {\n // internal function, so it's ok to ignore the difficult to fix type error\n // @ts-ignore\n target.addEventListener(event, handler, options);\n return ()=>{\n // @ts-ignore\n target.removeEventListener(event, handler, options);\n };\n}\nfunction $49c51c25361d4cd2$var$scrollIntoView(target) {\n let root = document.scrollingElement || document.documentElement;\n let nextTarget = target;\n while(nextTarget && nextTarget !== root){\n // Find the parent scrollable element and adjust the scroll position if the target is not already in view.\n let scrollable = (0, $7mMvr$getScrollParent)(nextTarget);\n if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {\n let scrollableTop = scrollable.getBoundingClientRect().top;\n let targetTop = nextTarget.getBoundingClientRect().top;\n if (targetTop > scrollableTop + nextTarget.clientHeight) scrollable.scrollTop += targetTop - scrollableTop;\n }\n nextTarget = scrollable.parentElement;\n }\n}\nfunction $49c51c25361d4cd2$var$willOpenKeyboard(target) {\n return target instanceof HTMLInputElement && !$49c51c25361d4cd2$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;\n}\n\n\nexport {$49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as usePreventScroll};\n//# sourceMappingURL=usePreventScroll.module.js.map\n"],"names":["$49c51c25361d4cd2$var$visualViewport","$49c51c25361d4cd2$var$nonTextInputTypes","$49c51c25361d4cd2$var$preventScrollCount","$49c51c25361d4cd2$var$restore","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","options","isDisabled","$7mMvr$useLayoutEffect","$7mMvr$isIOS","$49c51c25361d4cd2$var$preventScrollMobileSafari","$49c51c25361d4cd2$var$preventScrollStandard","$7mMvr$chain","$49c51c25361d4cd2$var$setStyle","scrollable","restoreScrollableStyles","onTouchStart","e","$7mMvr$getScrollParent","onTouchMove","onTouchEnd","onFocus","target","$49c51c25361d4cd2$var$willOpenKeyboard","setupStyles","$49c51c25361d4cd2$var$scrollIntoView","restoreStyles","onWindowScroll","scrollX","scrollY","$49c51c25361d4cd2$var$addEvent","removeEvents","element","style","value","cur","event","handler","root","nextTarget","scrollableTop","targetTop"],"mappings":";AAaA,MAAMA,IAAuC,OAAO,WAAa,OAAe,OAAO,gBAEjFC,IAA0C,oBAAI,IAAI;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AAED,IAAIC,IAA2C,GAC3CC;AACJ,SAASC,EAA0CC,IAAU,IAAI;AAC7D,MAAI,EAAE,YAAYC,EAAY,IAAGD;AACjC,EAAIE,EAAwB,MAAI;AAC5B,QAAI,CAAAD;AACJ,aAAAJ,KACIA,MAA6C,MACrCM,EAAY,IAAKL,IAAgCM,EAA+C,IACnGN,IAAgCO,EAA2C,IAE7E,MAAI;AACP,QAAAR,KACIA,MAA6C,KAAGC;MAChE;AAAA,EACA,GAAO;AAAA,IACCG;AAAA,EACR,CAAK;AACL;AAGA,SAASI,IAA8C;AACnD,SAAWC,EAAcC,EAA+B,SAAS,iBAAiB,gBAAgB,GAAG,OAAO,aAAa,SAAS,gBAAgB,WAAW,IAAI,GAAGA,EAA+B,SAAS,iBAAiB,YAAY,QAAQ,CAAC;AACtP;AA4BA,SAASH,IAAkD;AACvD,MAAII,GACAC,GACAC,IAAe,CAACC,MAAI;AAGpB,IADAH,IAAiBI,EAAwBD,EAAE,QAAQ,EAAI,GACnD,EAAAH,MAAe,SAAS,mBAAmBA,MAAe,SAAS,SAInEA,aAAsB,eAAe,OAAO,iBAAiBA,CAAU,EAAE,uBAAuB,WAAQC,IAA0BF,EAA+BC,GAAY,sBAAsB,SAAS;AAAA,EACxN,GACQK,IAAc,CAACF,MAAI;AAEnB,QAAI,CAACH,KAAcA,MAAe,SAAS,mBAAmBA,MAAe,SAAS,MAAM;AACxF,MAAAG,EAAE,eAAc;AAChB;AAAA,IACH;AAOD,IAAIH,EAAW,iBAAiBA,EAAW,gBAAgBA,EAAW,gBAAgBA,EAAW,eAAaG,EAAE,eAAc;AAAA,EACtI,GACQG,IAAa,MAAI;AACjB,IAAIL,KAAyBA;EACrC,GACQM,IAAU,CAACJ,MAAI;AACf,QAAIK,IAASL,EAAE;AACf,IAAIM,EAAuCD,CAAM,MAC7CE,KAGAF,EAAO,MAAM,YAAY,uBACzB,sBAAsB,MAAI;AACtB,MAAAA,EAAO,MAAM,YAAY,IAGrBrB,MACIA,EAAqC,SAAS,OAAO,cAEzD,sBAAsB,MAAI;AACtB,QAAAwB,EAAqCH,CAAM;AAAA,MACnE,CAAqB,IAGDrB,EAAqC,iBAAiB,UAAU,MAAIwB,EAAqCH,CAAM,GAAG;AAAA,QAC9G,MAAM;AAAA,MAC9B,CAAqB;AAAA,IAErB,CAAa;AAAA,EAEb,GACQI,IAAgB,MAChBF,IAAc,MAAI;AAClB,QAAIE,EAAe;AACnB,QAAIC,IAAiB,MAAI;AAGrB,aAAO,SAAS,GAAG,CAAC;AAAA,IAChC,GAIYC,IAAU,OAAO,aACjBC,IAAU,OAAO;AACrB,IAAAH,IAAoBd,EAAckB,EAA+B,QAAQ,UAAUH,CAAc,GAAGd,EAA+B,SAAS,iBAAiB,gBAAgB,GAAG,OAAO,aAAa,SAAS,gBAAgB,WAAW,IAAI,GAAGA,EAA+B,SAAS,iBAAiB,YAAY,QAAQ,GAAGA,EAA+B,SAAS,MAAM,aAAa,IAAIgB,CAAO,IAAI,GAAG,MAAI;AAC5Y,aAAO,SAASD,GAASC,CAAO;AAAA,IAC5C,CAAS,GAED,OAAO,SAAS,GAAG,CAAC;AAAA,EAC5B,GACQE,IAAmBnB,EAAckB,EAA+B,UAAU,cAAcd,GAAc;AAAA,IACtG,SAAS;AAAA,IACT,SAAS;AAAA,EACZ,CAAA,GAAGc,EAA+B,UAAU,aAAaX,GAAa;AAAA,IACnE,SAAS;AAAA,IACT,SAAS;AAAA,EACZ,CAAA,GAAGW,EAA+B,UAAU,YAAYV,GAAY;AAAA,IACjE,SAAS;AAAA,IACT,SAAS;AAAA,EACjB,CAAK,GAAGU,EAA+B,UAAU,SAAST,GAAS,EAAI,CAAC;AACpE,SAAO,MAAI;AAEP,IAAAN,KAA4B,QAAsDA,KAClFW,KAAkB,QAA4CA,KAC9DK;EACR;AACA;AAEA,SAASlB,EAA+BmB,GAASC,GAAOC,GAAO;AAC3D,MAAIC,IAAMH,EAAQ,MAAMC,CAAK;AAC7B,SAAAD,EAAQ,MAAMC,CAAK,IAAIC,GAChB,MAAI;AACP,IAAAF,EAAQ,MAAMC,CAAK,IAAIE;AAAA,EAC/B;AACA;AAEA,SAASL,EAA+BR,GAAQc,GAAOC,GAAS/B,GAAS;AAGrE,SAAAgB,EAAO,iBAAiBc,GAAOC,GAAS/B,CAAO,GACxC,MAAI;AAEP,IAAAgB,EAAO,oBAAoBc,GAAOC,GAAS/B,CAAO;AAAA,EAC1D;AACA;AACA,SAASmB,EAAqCH,GAAQ;AAClD,MAAIgB,IAAO,SAAS,oBAAoB,SAAS,iBAC7CC,IAAajB;AACjB,SAAMiB,KAAcA,MAAeD,KAAK;AAEpC,QAAIxB,IAAiBI,EAAwBqB,CAAU;AACvD,QAAIzB,MAAe,SAAS,mBAAmBA,MAAe,SAAS,QAAQA,MAAeyB,GAAY;AACtG,UAAIC,IAAgB1B,EAAW,sBAAqB,EAAG,KACnD2B,IAAYF,EAAW,sBAAqB,EAAG;AACnD,MAAIE,IAAYD,IAAgBD,EAAW,iBAAczB,EAAW,aAAa2B,IAAYD;AAAA,IAChG;AACD,IAAAD,IAAazB,EAAW;AAAA,EAC3B;AACL;AACA,SAASS,EAAuCD,GAAQ;AACpD,SAAOA,aAAkB,oBAAoB,CAACpB,EAAwC,IAAIoB,EAAO,IAAI,KAAKA,aAAkB,uBAAuBA,aAAkB,eAAeA,EAAO;AAC/L;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("./utils.cjs.js"),i=require("@react-aria/utils"),c=require("../../interactions/dist/usePress.cjs.js"),B=require("../../interactions/dist/useFocusable.cjs.js"),C=require("../../form/dist/useFormValidation.cjs.js");function M(r,e,o){let{value:l,children:t,"aria-label":b,"aria-labelledby":P}=r;const a=r.isDisabled||e.isDisabled;let p=t!=null,v=b!=null||P!=null;!p&&!v&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let u=e.selectedValue===l,f=s=>{s.stopPropagation(),e.setSelectedValue(l)},{pressProps:h,isPressed:m}=c.usePress({isDisabled:a}),{pressProps:V,isPressed:g}=c.usePress({isDisabled:a,onPress(){var s;e.setSelectedValue(l),(s=o.current)===null||s===void 0||s.focus()}}),{focusableProps:y}=B.useFocusable(i.mergeProps(r,{onFocus:()=>e.setLastFocusedValue(l)}),o),D=i.mergeProps(h,y),F=i.filterDOMProps(r,{labelable:!0}),d=-1;e.selectedValue!=null?e.selectedValue===l&&(d=0):(e.lastFocusedValue===l||e.lastFocusedValue==null)&&(d=0),a&&(d=void 0);let{name:I,descriptionId:q,errorMessageId:S,validationBehavior:n}=L.radioGroupData.get(e);return i.useFormReset(o,e.selectedValue,e.setSelectedValue),C.useFormValidation({validationBehavior:n},e,o),{labelProps:i.mergeProps(V,{onClick:s=>s.preventDefault()}),inputProps:i.mergeProps(F,{...D,type:"radio",name:I,tabIndex:d,disabled:a,required:e.isRequired&&n==="native",checked:u,value:l,onChange:f,"aria-describedby":[r["aria-describedby"],e.isInvalid?S:null,q].filter(Boolean).join(" ")||void 0}),isDisabled:a,isSelected:u,isPressed:m||g}}exports.useRadio=M;
|
|
2
|
-
//# sourceMappingURL=useRadio.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRadio.cjs.js","sources":["../../../../../node_modules/@react-aria/radio/dist/useRadio.mjs"],"sourcesContent":["import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {mergeProps as $5jJ3f$mergeProps, filterDOMProps as $5jJ3f$filterDOMProps, useFormReset as $5jJ3f$useFormReset} from \"@react-aria/utils\";\nimport {usePress as $5jJ3f$usePress, useFocusable as $5jJ3f$useFocusable} from \"@react-aria/interactions\";\nimport {useFormValidation as $5jJ3f$useFormValidation} from \"@react-aria/form\";\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\n\nfunction $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {\n let { value: value, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby } = props;\n const isDisabled = props.isDisabled || state.isDisabled;\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 let checked = state.selectedValue === value;\n let onChange = (e)=>{\n e.stopPropagation();\n state.setSelectedValue(value);\n };\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5jJ3f$usePress)({\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $5jJ3f$usePress)({\n isDisabled: isDisabled,\n onPress () {\n var _ref_current;\n state.setSelectedValue(value);\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n let { focusableProps: focusableProps } = (0, $5jJ3f$useFocusable)((0, $5jJ3f$mergeProps)(props, {\n onFocus: ()=>state.setLastFocusedValue(value)\n }), ref);\n let interactions = (0, $5jJ3f$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $5jJ3f$filterDOMProps)(props, {\n labelable: true\n });\n let tabIndex = -1;\n if (state.selectedValue != null) {\n if (state.selectedValue === value) tabIndex = 0;\n } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;\n if (isDisabled) tabIndex = undefined;\n let { name: name, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).get(state);\n (0, $5jJ3f$useFormReset)(ref, state.selectedValue, state.setSelectedValue);\n (0, $5jJ3f$useFormValidation)({\n validationBehavior: validationBehavior\n }, state, ref);\n return {\n labelProps: (0, $5jJ3f$mergeProps)(labelProps, {\n onClick: (e)=>e.preventDefault()\n }),\n inputProps: (0, $5jJ3f$mergeProps)(domProps, {\n ...interactions,\n type: 'radio',\n name: name,\n tabIndex: tabIndex,\n disabled: isDisabled,\n required: state.isRequired && validationBehavior === 'native',\n checked: checked,\n value: value,\n onChange: onChange,\n 'aria-describedby': [\n props['aria-describedby'],\n state.isInvalid ? errorMessageId : null,\n descriptionId\n ].filter(Boolean).join(' ') || undefined\n }),\n isDisabled: isDisabled,\n isSelected: checked,\n isPressed: isPressed || isLabelPressed\n };\n}\n\n\nexport {$0d5c49892c1215da$export$37b0961d2f4751e2 as useRadio};\n//# sourceMappingURL=useRadio.module.js.map\n"],"names":["$0d5c49892c1215da$export$37b0961d2f4751e2","props","state","ref","value","children","ariaLabel","ariaLabelledby","isDisabled","hasChildren","hasAriaLabel","checked","onChange","e","pressProps","isPressed","$5jJ3f$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$5jJ3f$useFocusable","$5jJ3f$mergeProps","interactions","domProps","$5jJ3f$filterDOMProps","tabIndex","name","descriptionId","errorMessageId","validationBehavior","$884aeceb3d67f00f$export$37b65e5b5444d35c","$5jJ3f$useFormReset","$5jJ3f$useFormValidation"],"mappings":"qTAmBA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,MAAOC,EAAO,SAAUC,EAAU,aAAcC,EAAW,kBAAmBC,CAAgB,EAAGN,EACvG,MAAMO,EAAaP,EAAM,YAAcC,EAAM,WAC7C,IAAIO,EAAcJ,GAAY,KAC1BK,EAAeJ,GAAa,MAAQC,GAAkB,KACtD,CAACE,GAAe,CAACC,GAAgB,QAAQ,IAAI,WAAa,cAAc,QAAQ,KAAK,kFAAkF,EAC3K,IAAIC,EAAUT,EAAM,gBAAkBE,EAClCQ,EAAYC,GAAI,CAChBA,EAAE,gBAAe,EACjBX,EAAM,iBAAiBE,CAAK,CACpC,EAEQ,CAAE,WAAYU,EAAY,UAAWC,CAAS,EAASC,WAAiB,CACxE,WAAYR,CACpB,CAAK,EAEG,CAAE,WAAYS,EAAY,UAAWC,CAAc,EAASF,WAAiB,CAC7E,WAAYR,EACZ,SAAW,CACP,IAAIW,EACJjB,EAAM,iBAAiBE,CAAK,GAC3Be,EAAehB,EAAI,WAAa,MAAQgB,IAAiB,QAAkBA,EAAa,MAAK,CACjG,CACT,CAAK,EACG,CAAE,eAAgBC,CAAgB,EAAOC,EAAAA,aAAyBC,EAAiB,WAAErB,EAAO,CAC5F,QAAS,IAAIC,EAAM,oBAAoBE,CAAK,CACpD,CAAK,EAAGD,CAAG,EACHoB,EAAmBD,EAAAA,WAAmBR,EAAYM,CAAc,EAChEI,EAAeC,EAAqB,eAAExB,EAAO,CAC7C,UAAW,EACnB,CAAK,EACGyB,EAAW,GACXxB,EAAM,eAAiB,KACnBA,EAAM,gBAAkBE,IAAOsB,EAAW,IACvCxB,EAAM,mBAAqBE,GAASF,EAAM,kBAAoB,QAAMwB,EAAW,GACtFlB,IAAYkB,EAAW,QAC3B,GAAI,CAAE,KAAMC,EAAM,cAAeC,EAAe,eAAgBC,EAAgB,mBAAoBC,CAAkB,EAASC,EAAyC,eAAE,IAAI7B,CAAK,EACnL,OAAI8B,EAAAA,aAAqB7B,EAAKD,EAAM,cAAeA,EAAM,gBAAgB,EACrE+B,oBAA0B,CAC1B,mBAAoBH,CAC5B,EAAO5B,EAAOC,CAAG,EACN,CACH,WAAgBmB,EAAiB,WAAEL,EAAY,CAC3C,QAAUJ,GAAIA,EAAE,eAAgB,CAC5C,CAAS,EACD,WAAgBS,EAAiB,WAAEE,EAAU,CACzC,GAAGD,EACH,KAAM,QACN,KAAMI,EACN,SAAUD,EACV,SAAUlB,EACV,SAAUN,EAAM,YAAc4B,IAAuB,SACrD,QAASnB,EACT,MAAOP,EACP,SAAUQ,EACV,mBAAoB,CAChBX,EAAM,kBAAkB,EACxBC,EAAM,UAAY2B,EAAiB,KACnCD,CACH,EAAC,OAAO,OAAO,EAAE,KAAK,GAAG,GAAK,MAC3C,CAAS,EACD,WAAYpB,EACZ,WAAYG,EACZ,UAAWI,GAAaG,CAChC,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { radioGroupData as L } from "./utils.es.js";
|
|
2
|
-
import { mergeProps as d, filterDOMProps as B, useFormReset as C } from "@react-aria/utils";
|
|
3
|
-
import { usePress as u } from "../../interactions/dist/usePress.es.js";
|
|
4
|
-
import { useFocusable as S } from "../../interactions/dist/useFocusable.es.js";
|
|
5
|
-
import { useFormValidation as k } from "../../form/dist/useFormValidation.es.js";
|
|
6
|
-
function N(i, e, r) {
|
|
7
|
-
let { value: l, children: t, "aria-label": b, "aria-labelledby": f } = i;
|
|
8
|
-
const s = i.isDisabled || e.isDisabled;
|
|
9
|
-
let p = t != null, P = b != null || f != null;
|
|
10
|
-
!p && !P && process.env.NODE_ENV !== "production" && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
11
|
-
let n = e.selectedValue === l, m = (a) => {
|
|
12
|
-
a.stopPropagation(), e.setSelectedValue(l);
|
|
13
|
-
}, { pressProps: v, isPressed: $ } = u({
|
|
14
|
-
isDisabled: s
|
|
15
|
-
}), { pressProps: h, isPressed: V } = u({
|
|
16
|
-
isDisabled: s,
|
|
17
|
-
onPress() {
|
|
18
|
-
var a;
|
|
19
|
-
e.setSelectedValue(l), (a = r.current) === null || a === void 0 || a.focus();
|
|
20
|
-
}
|
|
21
|
-
}), { focusableProps: D } = S(d(i, {
|
|
22
|
-
onFocus: () => e.setLastFocusedValue(l)
|
|
23
|
-
}), r), y = d(v, D), x = B(i, {
|
|
24
|
-
labelable: !0
|
|
25
|
-
}), o = -1;
|
|
26
|
-
e.selectedValue != null ? e.selectedValue === l && (o = 0) : (e.lastFocusedValue === l || e.lastFocusedValue == null) && (o = 0), s && (o = void 0);
|
|
27
|
-
let { name: I, descriptionId: g, errorMessageId: F, validationBehavior: c } = L.get(e);
|
|
28
|
-
return C(r, e.selectedValue, e.setSelectedValue), k({
|
|
29
|
-
validationBehavior: c
|
|
30
|
-
}, e, r), {
|
|
31
|
-
labelProps: d(h, {
|
|
32
|
-
onClick: (a) => a.preventDefault()
|
|
33
|
-
}),
|
|
34
|
-
inputProps: d(x, {
|
|
35
|
-
...y,
|
|
36
|
-
type: "radio",
|
|
37
|
-
name: I,
|
|
38
|
-
tabIndex: o,
|
|
39
|
-
disabled: s,
|
|
40
|
-
required: e.isRequired && c === "native",
|
|
41
|
-
checked: n,
|
|
42
|
-
value: l,
|
|
43
|
-
onChange: m,
|
|
44
|
-
"aria-describedby": [
|
|
45
|
-
i["aria-describedby"],
|
|
46
|
-
e.isInvalid ? F : null,
|
|
47
|
-
g
|
|
48
|
-
].filter(Boolean).join(" ") || void 0
|
|
49
|
-
}),
|
|
50
|
-
isDisabled: s,
|
|
51
|
-
isSelected: n,
|
|
52
|
-
isPressed: $ || V
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
N as useRadio
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=useRadio.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRadio.es.js","sources":["../../../../../node_modules/@react-aria/radio/dist/useRadio.mjs"],"sourcesContent":["import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {mergeProps as $5jJ3f$mergeProps, filterDOMProps as $5jJ3f$filterDOMProps, useFormReset as $5jJ3f$useFormReset} from \"@react-aria/utils\";\nimport {usePress as $5jJ3f$usePress, useFocusable as $5jJ3f$useFocusable} from \"@react-aria/interactions\";\nimport {useFormValidation as $5jJ3f$useFormValidation} from \"@react-aria/form\";\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\n\nfunction $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {\n let { value: value, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby } = props;\n const isDisabled = props.isDisabled || state.isDisabled;\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 let checked = state.selectedValue === value;\n let onChange = (e)=>{\n e.stopPropagation();\n state.setSelectedValue(value);\n };\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5jJ3f$usePress)({\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $5jJ3f$usePress)({\n isDisabled: isDisabled,\n onPress () {\n var _ref_current;\n state.setSelectedValue(value);\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n let { focusableProps: focusableProps } = (0, $5jJ3f$useFocusable)((0, $5jJ3f$mergeProps)(props, {\n onFocus: ()=>state.setLastFocusedValue(value)\n }), ref);\n let interactions = (0, $5jJ3f$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $5jJ3f$filterDOMProps)(props, {\n labelable: true\n });\n let tabIndex = -1;\n if (state.selectedValue != null) {\n if (state.selectedValue === value) tabIndex = 0;\n } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;\n if (isDisabled) tabIndex = undefined;\n let { name: name, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).get(state);\n (0, $5jJ3f$useFormReset)(ref, state.selectedValue, state.setSelectedValue);\n (0, $5jJ3f$useFormValidation)({\n validationBehavior: validationBehavior\n }, state, ref);\n return {\n labelProps: (0, $5jJ3f$mergeProps)(labelProps, {\n onClick: (e)=>e.preventDefault()\n }),\n inputProps: (0, $5jJ3f$mergeProps)(domProps, {\n ...interactions,\n type: 'radio',\n name: name,\n tabIndex: tabIndex,\n disabled: isDisabled,\n required: state.isRequired && validationBehavior === 'native',\n checked: checked,\n value: value,\n onChange: onChange,\n 'aria-describedby': [\n props['aria-describedby'],\n state.isInvalid ? errorMessageId : null,\n descriptionId\n ].filter(Boolean).join(' ') || undefined\n }),\n isDisabled: isDisabled,\n isSelected: checked,\n isPressed: isPressed || isLabelPressed\n };\n}\n\n\nexport {$0d5c49892c1215da$export$37b0961d2f4751e2 as useRadio};\n//# sourceMappingURL=useRadio.module.js.map\n"],"names":["$0d5c49892c1215da$export$37b0961d2f4751e2","props","state","ref","value","children","ariaLabel","ariaLabelledby","isDisabled","hasChildren","hasAriaLabel","checked","onChange","e","pressProps","isPressed","$5jJ3f$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$5jJ3f$useFocusable","$5jJ3f$mergeProps","interactions","domProps","$5jJ3f$filterDOMProps","tabIndex","name","descriptionId","errorMessageId","validationBehavior","$884aeceb3d67f00f$export$37b65e5b5444d35c","$5jJ3f$useFormReset","$5jJ3f$useFormValidation"],"mappings":";;;;;AAmBA,SAASA,EAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,OAAOC,GAAO,UAAUC,GAAU,cAAcC,GAAW,mBAAmBC,EAAgB,IAAGN;AACvG,QAAMO,IAAaP,EAAM,cAAcC,EAAM;AAC7C,MAAIO,IAAcJ,KAAY,MAC1BK,IAAeJ,KAAa,QAAQC,KAAkB;AAC1D,EAAI,CAACE,KAAe,CAACC,KAAgB,QAAQ,IAAI,aAAa,gBAAc,QAAQ,KAAK,kFAAkF;AAC3K,MAAIC,IAAUT,EAAM,kBAAkBE,GAClCQ,IAAW,CAACC,MAAI;AAChB,IAAAA,EAAE,gBAAe,GACjBX,EAAM,iBAAiBE,CAAK;AAAA,EACpC,GAEQ,EAAE,YAAYU,GAAY,WAAWC,EAAS,IAASC,EAAiB;AAAA,IACxE,YAAYR;AAAA,EACpB,CAAK,GAEG,EAAE,YAAYS,GAAY,WAAWC,EAAc,IAASF,EAAiB;AAAA,IAC7E,YAAYR;AAAA,IACZ,UAAW;AACP,UAAIW;AACJ,MAAAjB,EAAM,iBAAiBE,CAAK,IAC3Be,IAAehB,EAAI,aAAa,QAAQgB,MAAiB,UAAkBA,EAAa,MAAK;AAAA,IACjG;AAAA,EACT,CAAK,GACG,EAAE,gBAAgBC,EAAgB,IAAOC,EAAyBC,EAAmBrB,GAAO;AAAA,IAC5F,SAAS,MAAIC,EAAM,oBAAoBE,CAAK;AAAA,EACpD,CAAK,GAAGD,CAAG,GACHoB,IAAmBD,EAAmBR,GAAYM,CAAc,GAChEI,IAAeC,EAAuBxB,GAAO;AAAA,IAC7C,WAAW;AAAA,EACnB,CAAK,GACGyB,IAAW;AACf,EAAIxB,EAAM,iBAAiB,OACnBA,EAAM,kBAAkBE,MAAOsB,IAAW,MACvCxB,EAAM,qBAAqBE,KAASF,EAAM,oBAAoB,UAAMwB,IAAW,IACtFlB,MAAYkB,IAAW;AAC3B,MAAI,EAAE,MAAMC,GAAM,eAAeC,GAAe,gBAAgBC,GAAgB,oBAAoBC,EAAkB,IAASC,EAA2C,IAAI7B,CAAK;AACnL,SAAI8B,EAAqB7B,GAAKD,EAAM,eAAeA,EAAM,gBAAgB,GACrE+B,EAA0B;AAAA,IAC1B,oBAAoBH;AAAA,EAC5B,GAAO5B,GAAOC,CAAG,GACN;AAAA,IACH,YAAgBmB,EAAmBL,GAAY;AAAA,MAC3C,SAAS,CAACJ,MAAIA,EAAE,eAAgB;AAAA,IAC5C,CAAS;AAAA,IACD,YAAgBS,EAAmBE,GAAU;AAAA,MACzC,GAAGD;AAAA,MACH,MAAM;AAAA,MACN,MAAMI;AAAA,MACN,UAAUD;AAAA,MACV,UAAUlB;AAAA,MACV,UAAUN,EAAM,cAAc4B,MAAuB;AAAA,MACrD,SAASnB;AAAA,MACT,OAAOP;AAAA,MACP,UAAUQ;AAAA,MACV,oBAAoB;AAAA,QAChBX,EAAM,kBAAkB;AAAA,QACxBC,EAAM,YAAY2B,IAAiB;AAAA,QACnCD;AAAA,MACH,EAAC,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,IAC3C,CAAS;AAAA,IACD,YAAYpB;AAAA,IACZ,YAAYG;AAAA,IACZ,WAAWI,KAAaG;AAAA,EAChC;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./utils.cjs.js"),s=require("@react-aria/utils"),I=require("../../focus/dist/FocusScope.cjs.js"),M=require("../../interactions/dist/useFocusWithin.cjs.js"),W=require("../../label/dist/useField.cjs.js"),k=require("../../i18n/dist/context.cjs.js");function B(r,o){let{name:v,isReadOnly:f,isRequired:p,isDisabled:g,orientation:n="vertical",validationBehavior:P="aria"}=r,{direction:t}=k.useLocale(),{isInvalid:b,validationErrors:d,validationDetails:h}=o.displayValidation,{labelProps:m,fieldProps:D,descriptionProps:u,errorMessageProps:c}=W.useField({...r,labelElementType:"span",isInvalid:o.isInvalid,errorMessage:r.errorMessage||d}),F=s.filterDOMProps(r,{labelable:!0}),{focusWithinProps:y}=M.useFocusWithin({onBlurWithin(a){var e;(e=r.onBlur)===null||e===void 0||e.call(r,a),o.selectedValue||o.setLastFocusedValue(null)},onFocusWithin:r.onFocus,onFocusWithinChange:r.onFocusChange}),q=a=>{let e;switch(a.key){case"ArrowRight":t==="rtl"&&n!=="vertical"?e="prev":e="next";break;case"ArrowLeft":t==="rtl"&&n!=="vertical"?e="next":e="prev";break;case"ArrowDown":e="next";break;case"ArrowUp":e="prev";break;default:return}a.preventDefault();let l=I.getFocusableTreeWalker(a.currentTarget,{from:a.target}),i;e==="next"?(i=l.nextNode(),i||(l.currentNode=a.currentTarget,i=l.firstChild())):(i=l.previousNode(),i||(l.currentNode=a.currentTarget,i=l.lastChild())),i&&(i.focus(),o.setSelectedValue(i.value))},w=s.useId(v);return x.radioGroupData.set(o,{name:w,descriptionId:u.id,errorMessageId:c.id,validationBehavior:P}),{radioGroupProps:s.mergeProps(F,{role:"radiogroup",onKeyDown:q,"aria-invalid":o.isInvalid||void 0,"aria-errormessage":r["aria-errormessage"],"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-disabled":g||void 0,"aria-orientation":n,...D,...y}),labelProps:m,descriptionProps:u,errorMessageProps:c,isInvalid:b,validationErrors:d,validationDetails:h}}exports.useRadioGroup=B;
|
|
2
|
-
//# sourceMappingURL=useRadioGroup.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRadioGroup.cjs.js","sources":["../../../../../node_modules/@react-aria/radio/dist/useRadioGroup.mjs"],"sourcesContent":["import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {filterDOMProps as $czmJy$filterDOMProps, useId as $czmJy$useId, mergeProps as $czmJy$mergeProps} from \"@react-aria/utils\";\nimport {getFocusableTreeWalker as $czmJy$getFocusableTreeWalker} from \"@react-aria/focus\";\nimport {useField as $czmJy$useField} from \"@react-aria/label\";\nimport {useFocusWithin as $czmJy$useFocusWithin} from \"@react-aria/interactions\";\nimport {useLocale as $czmJy$useLocale} from \"@react-aria/i18n\";\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\n\n\n\nfunction $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {\n let { name: name, isReadOnly: isReadOnly, isRequired: isRequired, isDisabled: isDisabled, orientation: orientation = 'vertical', validationBehavior: validationBehavior = 'aria' } = props;\n let { direction: direction } = (0, $czmJy$useLocale)();\n let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation;\n let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $czmJy$useField)({\n ...props,\n // Radio group is not an HTML input element so it\n // shouldn't be labeled by a <label> element.\n labelElementType: 'span',\n isInvalid: state.isInvalid,\n errorMessage: props.errorMessage || validationErrors\n });\n let domProps = (0, $czmJy$filterDOMProps)(props, {\n labelable: true\n });\n // When the radio group loses focus, reset the focusable radio to null if\n // there is no selection. This allows tabbing into the group from either\n // direction to go to the first or last radio.\n let { focusWithinProps: focusWithinProps } = (0, $czmJy$useFocusWithin)({\n onBlurWithin (e) {\n var _props_onBlur;\n (_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 ? void 0 : _props_onBlur.call(props, e);\n if (!state.selectedValue) state.setLastFocusedValue(null);\n },\n onFocusWithin: props.onFocus,\n onFocusWithinChange: props.onFocusChange\n });\n let onKeyDown = (e)=>{\n let nextDir;\n switch(e.key){\n case 'ArrowRight':\n if (direction === 'rtl' && orientation !== 'vertical') nextDir = 'prev';\n else nextDir = 'next';\n break;\n case 'ArrowLeft':\n if (direction === 'rtl' && orientation !== 'vertical') nextDir = 'next';\n else nextDir = 'prev';\n break;\n case 'ArrowDown':\n nextDir = 'next';\n break;\n case 'ArrowUp':\n nextDir = 'prev';\n break;\n default:\n return;\n }\n e.preventDefault();\n let walker = (0, $czmJy$getFocusableTreeWalker)(e.currentTarget, {\n from: e.target\n });\n let nextElem;\n if (nextDir === 'next') {\n nextElem = walker.nextNode();\n if (!nextElem) {\n walker.currentNode = e.currentTarget;\n nextElem = walker.firstChild();\n }\n } else {\n nextElem = walker.previousNode();\n if (!nextElem) {\n walker.currentNode = e.currentTarget;\n nextElem = walker.lastChild();\n }\n }\n if (nextElem) {\n // Call focus on nextElem so that keyboard navigation scrolls the radio into view\n nextElem.focus();\n state.setSelectedValue(nextElem.value);\n }\n };\n let groupName = (0, $czmJy$useId)(name);\n (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).set(state, {\n name: groupName,\n descriptionId: descriptionProps.id,\n errorMessageId: errorMessageProps.id,\n validationBehavior: validationBehavior\n });\n return {\n radioGroupProps: (0, $czmJy$mergeProps)(domProps, {\n // https://www.w3.org/TR/wai-aria-1.2/#radiogroup\n role: 'radiogroup',\n onKeyDown: onKeyDown,\n 'aria-invalid': state.isInvalid || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-readonly': isReadOnly || undefined,\n 'aria-required': isRequired || undefined,\n 'aria-disabled': isDisabled || undefined,\n 'aria-orientation': orientation,\n ...fieldProps,\n ...focusWithinProps\n }),\n labelProps: labelProps,\n descriptionProps: descriptionProps,\n errorMessageProps: errorMessageProps,\n isInvalid: isInvalid,\n validationErrors: validationErrors,\n validationDetails: validationDetails\n };\n}\n\n\nexport {$430f30ed08ec25fa$export$62b9571f283ff5c2 as useRadioGroup};\n//# sourceMappingURL=useRadioGroup.module.js.map\n"],"names":["$430f30ed08ec25fa$export$62b9571f283ff5c2","props","state","name","isReadOnly","isRequired","isDisabled","orientation","validationBehavior","direction","$czmJy$useLocale","isInvalid","validationErrors","validationDetails","labelProps","fieldProps","descriptionProps","errorMessageProps","$czmJy$useField","domProps","$czmJy$filterDOMProps","focusWithinProps","$czmJy$useFocusWithin","e","_props_onBlur","onKeyDown","nextDir","walker","$czmJy$getFocusableTreeWalker","nextElem","groupName","$czmJy$useId","$884aeceb3d67f00f$export$37b65e5b5444d35c","$czmJy$mergeProps"],"mappings":"sVAuBA,SAASA,EAA0CC,EAAOC,EAAO,CAC7D,GAAI,CAAE,KAAMC,EAAM,WAAYC,EAAY,WAAYC,EAAY,WAAYC,EAAY,YAAaC,EAAc,WAAY,mBAAoBC,EAAqB,MAAQ,EAAGP,EACjL,CAAE,UAAWQ,GAAkBC,EAAgB,UAAA,EAC/C,CAAE,UAAWC,EAAW,iBAAkBC,EAAkB,kBAAmBC,CAAiB,EAAKX,EAAM,kBAC3G,CAAE,WAAYY,EAAY,WAAYC,EAAY,iBAAkBC,EAAkB,kBAAmBC,CAAmB,EAAOC,EAAAA,SAAiB,CACpJ,GAAGjB,EAGH,iBAAkB,OAClB,UAAWC,EAAM,UACjB,aAAcD,EAAM,cAAgBW,CAC5C,CAAK,EACGO,EAAeC,EAAqB,eAAEnB,EAAO,CAC7C,UAAW,EACnB,CAAK,EAIG,CAAE,iBAAkBoB,CAAkB,EAAOC,EAAAA,eAAuB,CACpE,aAAcC,EAAG,CACb,IAAIC,GACHA,EAAgBvB,EAAM,UAAY,MAAQuB,IAAkB,QAAkBA,EAAc,KAAKvB,EAAOsB,CAAC,EACrGrB,EAAM,eAAeA,EAAM,oBAAoB,IAAI,CAC3D,EACD,cAAeD,EAAM,QACrB,oBAAqBA,EAAM,aACnC,CAAK,EACGwB,EAAaF,GAAI,CACjB,IAAIG,EACJ,OAAOH,EAAE,IAAG,CACR,IAAK,aACGd,IAAc,OAASF,IAAgB,WAAYmB,EAAU,OAC5DA,EAAU,OACf,MACJ,IAAK,YACGjB,IAAc,OAASF,IAAgB,WAAYmB,EAAU,OAC5DA,EAAU,OACf,MACJ,IAAK,YACDA,EAAU,OACV,MACJ,IAAK,UACDA,EAAU,OACV,MACJ,QACI,MACP,CACDH,EAAE,eAAc,EAChB,IAAII,EAAaC,yBAA+BL,EAAE,cAAe,CAC7D,KAAMA,EAAE,MACpB,CAAS,EACGM,EACAH,IAAY,QACZG,EAAWF,EAAO,WACbE,IACDF,EAAO,YAAcJ,EAAE,cACvBM,EAAWF,EAAO,gBAGtBE,EAAWF,EAAO,eACbE,IACDF,EAAO,YAAcJ,EAAE,cACvBM,EAAWF,EAAO,cAGtBE,IAEAA,EAAS,MAAK,EACd3B,EAAM,iBAAiB2B,EAAS,KAAK,EAEjD,EACQC,EAAgBC,QAAc5B,CAAI,EACtC,OAAI6B,EAAyC,eAAE,IAAI9B,EAAO,CACtD,KAAM4B,EACN,cAAed,EAAiB,GAChC,eAAgBC,EAAkB,GAClC,mBAAoBT,CAC5B,CAAK,EACM,CACH,gBAAqByB,EAAiB,WAAEd,EAAU,CAE9C,KAAM,aACN,UAAWM,EACX,eAAgBvB,EAAM,WAAa,OACnC,oBAAqBD,EAAM,mBAAmB,EAC9C,gBAAiBG,GAAc,OAC/B,gBAAiBC,GAAc,OAC/B,gBAAiBC,GAAc,OAC/B,mBAAoBC,EACpB,GAAGQ,EACH,GAAGM,CACf,CAAS,EACD,WAAYP,EACZ,iBAAkBE,EAClB,kBAAmBC,EACnB,UAAWN,EACX,iBAAkBC,EAClB,kBAAmBC,CAC3B,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { radioGroupData as I } from "./utils.es.js";
|
|
2
|
-
import { filterDOMProps as y, useId as F, mergeProps as k } from "@react-aria/utils";
|
|
3
|
-
import { getFocusableTreeWalker as M } from "../../focus/dist/FocusScope.es.js";
|
|
4
|
-
import { useFocusWithin as W } from "../../interactions/dist/useFocusWithin.es.js";
|
|
5
|
-
import { useField as B } from "../../label/dist/useField.es.js";
|
|
6
|
-
import { useLocale as R } from "../../i18n/dist/context.es.js";
|
|
7
|
-
function q(r, o) {
|
|
8
|
-
let { name: f, isReadOnly: c, isRequired: p, isDisabled: v, orientation: t = "vertical", validationBehavior: b = "aria" } = r, { direction: n } = R(), { isInvalid: m, validationErrors: s, validationDetails: g } = o.displayValidation, { labelProps: $, fieldProps: P, descriptionProps: d, errorMessageProps: u } = B({
|
|
9
|
-
...r,
|
|
10
|
-
// Radio group is not an HTML input element so it
|
|
11
|
-
// shouldn't be labeled by a <label> element.
|
|
12
|
-
labelElementType: "span",
|
|
13
|
-
isInvalid: o.isInvalid,
|
|
14
|
-
errorMessage: r.errorMessage || s
|
|
15
|
-
}), h = y(r, {
|
|
16
|
-
labelable: !0
|
|
17
|
-
}), { focusWithinProps: x } = W({
|
|
18
|
-
onBlurWithin(a) {
|
|
19
|
-
var e;
|
|
20
|
-
(e = r.onBlur) === null || e === void 0 || e.call(r, a), o.selectedValue || o.setLastFocusedValue(null);
|
|
21
|
-
},
|
|
22
|
-
onFocusWithin: r.onFocus,
|
|
23
|
-
onFocusWithinChange: r.onFocusChange
|
|
24
|
-
}), D = (a) => {
|
|
25
|
-
let e;
|
|
26
|
-
switch (a.key) {
|
|
27
|
-
case "ArrowRight":
|
|
28
|
-
n === "rtl" && t !== "vertical" ? e = "prev" : e = "next";
|
|
29
|
-
break;
|
|
30
|
-
case "ArrowLeft":
|
|
31
|
-
n === "rtl" && t !== "vertical" ? e = "next" : e = "prev";
|
|
32
|
-
break;
|
|
33
|
-
case "ArrowDown":
|
|
34
|
-
e = "next";
|
|
35
|
-
break;
|
|
36
|
-
case "ArrowUp":
|
|
37
|
-
e = "prev";
|
|
38
|
-
break;
|
|
39
|
-
default:
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
a.preventDefault();
|
|
43
|
-
let l = M(a.currentTarget, {
|
|
44
|
-
from: a.target
|
|
45
|
-
}), i;
|
|
46
|
-
e === "next" ? (i = l.nextNode(), i || (l.currentNode = a.currentTarget, i = l.firstChild())) : (i = l.previousNode(), i || (l.currentNode = a.currentTarget, i = l.lastChild())), i && (i.focus(), o.setSelectedValue(i.value));
|
|
47
|
-
}, w = F(f);
|
|
48
|
-
return I.set(o, {
|
|
49
|
-
name: w,
|
|
50
|
-
descriptionId: d.id,
|
|
51
|
-
errorMessageId: u.id,
|
|
52
|
-
validationBehavior: b
|
|
53
|
-
}), {
|
|
54
|
-
radioGroupProps: k(h, {
|
|
55
|
-
// https://www.w3.org/TR/wai-aria-1.2/#radiogroup
|
|
56
|
-
role: "radiogroup",
|
|
57
|
-
onKeyDown: D,
|
|
58
|
-
"aria-invalid": o.isInvalid || void 0,
|
|
59
|
-
"aria-errormessage": r["aria-errormessage"],
|
|
60
|
-
"aria-readonly": c || void 0,
|
|
61
|
-
"aria-required": p || void 0,
|
|
62
|
-
"aria-disabled": v || void 0,
|
|
63
|
-
"aria-orientation": t,
|
|
64
|
-
...P,
|
|
65
|
-
...x
|
|
66
|
-
}),
|
|
67
|
-
labelProps: $,
|
|
68
|
-
descriptionProps: d,
|
|
69
|
-
errorMessageProps: u,
|
|
70
|
-
isInvalid: m,
|
|
71
|
-
validationErrors: s,
|
|
72
|
-
validationDetails: g
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
export {
|
|
76
|
-
q as useRadioGroup
|
|
77
|
-
};
|
|
78
|
-
//# sourceMappingURL=useRadioGroup.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRadioGroup.es.js","sources":["../../../../../node_modules/@react-aria/radio/dist/useRadioGroup.mjs"],"sourcesContent":["import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {filterDOMProps as $czmJy$filterDOMProps, useId as $czmJy$useId, mergeProps as $czmJy$mergeProps} from \"@react-aria/utils\";\nimport {getFocusableTreeWalker as $czmJy$getFocusableTreeWalker} from \"@react-aria/focus\";\nimport {useField as $czmJy$useField} from \"@react-aria/label\";\nimport {useFocusWithin as $czmJy$useFocusWithin} from \"@react-aria/interactions\";\nimport {useLocale as $czmJy$useLocale} from \"@react-aria/i18n\";\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\n\n\n\nfunction $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {\n let { name: name, isReadOnly: isReadOnly, isRequired: isRequired, isDisabled: isDisabled, orientation: orientation = 'vertical', validationBehavior: validationBehavior = 'aria' } = props;\n let { direction: direction } = (0, $czmJy$useLocale)();\n let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation;\n let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $czmJy$useField)({\n ...props,\n // Radio group is not an HTML input element so it\n // shouldn't be labeled by a <label> element.\n labelElementType: 'span',\n isInvalid: state.isInvalid,\n errorMessage: props.errorMessage || validationErrors\n });\n let domProps = (0, $czmJy$filterDOMProps)(props, {\n labelable: true\n });\n // When the radio group loses focus, reset the focusable radio to null if\n // there is no selection. This allows tabbing into the group from either\n // direction to go to the first or last radio.\n let { focusWithinProps: focusWithinProps } = (0, $czmJy$useFocusWithin)({\n onBlurWithin (e) {\n var _props_onBlur;\n (_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 ? void 0 : _props_onBlur.call(props, e);\n if (!state.selectedValue) state.setLastFocusedValue(null);\n },\n onFocusWithin: props.onFocus,\n onFocusWithinChange: props.onFocusChange\n });\n let onKeyDown = (e)=>{\n let nextDir;\n switch(e.key){\n case 'ArrowRight':\n if (direction === 'rtl' && orientation !== 'vertical') nextDir = 'prev';\n else nextDir = 'next';\n break;\n case 'ArrowLeft':\n if (direction === 'rtl' && orientation !== 'vertical') nextDir = 'next';\n else nextDir = 'prev';\n break;\n case 'ArrowDown':\n nextDir = 'next';\n break;\n case 'ArrowUp':\n nextDir = 'prev';\n break;\n default:\n return;\n }\n e.preventDefault();\n let walker = (0, $czmJy$getFocusableTreeWalker)(e.currentTarget, {\n from: e.target\n });\n let nextElem;\n if (nextDir === 'next') {\n nextElem = walker.nextNode();\n if (!nextElem) {\n walker.currentNode = e.currentTarget;\n nextElem = walker.firstChild();\n }\n } else {\n nextElem = walker.previousNode();\n if (!nextElem) {\n walker.currentNode = e.currentTarget;\n nextElem = walker.lastChild();\n }\n }\n if (nextElem) {\n // Call focus on nextElem so that keyboard navigation scrolls the radio into view\n nextElem.focus();\n state.setSelectedValue(nextElem.value);\n }\n };\n let groupName = (0, $czmJy$useId)(name);\n (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).set(state, {\n name: groupName,\n descriptionId: descriptionProps.id,\n errorMessageId: errorMessageProps.id,\n validationBehavior: validationBehavior\n });\n return {\n radioGroupProps: (0, $czmJy$mergeProps)(domProps, {\n // https://www.w3.org/TR/wai-aria-1.2/#radiogroup\n role: 'radiogroup',\n onKeyDown: onKeyDown,\n 'aria-invalid': state.isInvalid || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-readonly': isReadOnly || undefined,\n 'aria-required': isRequired || undefined,\n 'aria-disabled': isDisabled || undefined,\n 'aria-orientation': orientation,\n ...fieldProps,\n ...focusWithinProps\n }),\n labelProps: labelProps,\n descriptionProps: descriptionProps,\n errorMessageProps: errorMessageProps,\n isInvalid: isInvalid,\n validationErrors: validationErrors,\n validationDetails: validationDetails\n };\n}\n\n\nexport {$430f30ed08ec25fa$export$62b9571f283ff5c2 as useRadioGroup};\n//# sourceMappingURL=useRadioGroup.module.js.map\n"],"names":["$430f30ed08ec25fa$export$62b9571f283ff5c2","props","state","name","isReadOnly","isRequired","isDisabled","orientation","validationBehavior","direction","$czmJy$useLocale","isInvalid","validationErrors","validationDetails","labelProps","fieldProps","descriptionProps","errorMessageProps","$czmJy$useField","domProps","$czmJy$filterDOMProps","focusWithinProps","$czmJy$useFocusWithin","e","_props_onBlur","onKeyDown","nextDir","walker","$czmJy$getFocusableTreeWalker","nextElem","groupName","$czmJy$useId","$884aeceb3d67f00f$export$37b65e5b5444d35c","$czmJy$mergeProps"],"mappings":";;;;;;AAuBA,SAASA,EAA0CC,GAAOC,GAAO;AAC7D,MAAI,EAAE,MAAMC,GAAM,YAAYC,GAAY,YAAYC,GAAY,YAAYC,GAAY,aAAaC,IAAc,YAAY,oBAAoBC,IAAqB,OAAQ,IAAGP,GACjL,EAAE,WAAWQ,MAAkBC,EAAgB,GAC/C,EAAE,WAAWC,GAAW,kBAAkBC,GAAkB,mBAAmBC,EAAiB,IAAKX,EAAM,mBAC3G,EAAE,YAAYY,GAAY,YAAYC,GAAY,kBAAkBC,GAAkB,mBAAmBC,EAAmB,IAAOC,EAAiB;AAAA,IACpJ,GAAGjB;AAAA;AAAA;AAAA,IAGH,kBAAkB;AAAA,IAClB,WAAWC,EAAM;AAAA,IACjB,cAAcD,EAAM,gBAAgBW;AAAA,EAC5C,CAAK,GACGO,IAAeC,EAAuBnB,GAAO;AAAA,IAC7C,WAAW;AAAA,EACnB,CAAK,GAIG,EAAE,kBAAkBoB,EAAkB,IAAOC,EAAuB;AAAA,IACpE,aAAcC,GAAG;AACb,UAAIC;AACJ,OAACA,IAAgBvB,EAAM,YAAY,QAAQuB,MAAkB,UAAkBA,EAAc,KAAKvB,GAAOsB,CAAC,GACrGrB,EAAM,iBAAeA,EAAM,oBAAoB,IAAI;AAAA,IAC3D;AAAA,IACD,eAAeD,EAAM;AAAA,IACrB,qBAAqBA,EAAM;AAAA,EACnC,CAAK,GACGwB,IAAY,CAACF,MAAI;AACjB,QAAIG;AACJ,YAAOH,EAAE,KAAG;AAAA,MACR,KAAK;AACD,QAAId,MAAc,SAASF,MAAgB,aAAYmB,IAAU,SAC5DA,IAAU;AACf;AAAA,MACJ,KAAK;AACD,QAAIjB,MAAc,SAASF,MAAgB,aAAYmB,IAAU,SAC5DA,IAAU;AACf;AAAA,MACJ,KAAK;AACD,QAAAA,IAAU;AACV;AAAA,MACJ,KAAK;AACD,QAAAA,IAAU;AACV;AAAA,MACJ;AACI;AAAA,IACP;AACD,IAAAH,EAAE,eAAc;AAChB,QAAII,IAAaC,EAA+BL,EAAE,eAAe;AAAA,MAC7D,MAAMA,EAAE;AAAA,IACpB,CAAS,GACGM;AACJ,IAAIH,MAAY,UACZG,IAAWF,EAAO,YACbE,MACDF,EAAO,cAAcJ,EAAE,eACvBM,IAAWF,EAAO,kBAGtBE,IAAWF,EAAO,gBACbE,MACDF,EAAO,cAAcJ,EAAE,eACvBM,IAAWF,EAAO,eAGtBE,MAEAA,EAAS,MAAK,GACd3B,EAAM,iBAAiB2B,EAAS,KAAK;AAAA,EAEjD,GACQC,IAAgBC,EAAc5B,CAAI;AACtC,SAAI6B,EAA2C,IAAI9B,GAAO;AAAA,IACtD,MAAM4B;AAAA,IACN,eAAed,EAAiB;AAAA,IAChC,gBAAgBC,EAAkB;AAAA,IAClC,oBAAoBT;AAAA,EAC5B,CAAK,GACM;AAAA,IACH,iBAAqByB,EAAmBd,GAAU;AAAA;AAAA,MAE9C,MAAM;AAAA,MACN,WAAWM;AAAA,MACX,gBAAgBvB,EAAM,aAAa;AAAA,MACnC,qBAAqBD,EAAM,mBAAmB;AAAA,MAC9C,iBAAiBG,KAAc;AAAA,MAC/B,iBAAiBC,KAAc;AAAA,MAC/B,iBAAiBC,KAAc;AAAA,MAC/B,oBAAoBC;AAAA,MACpB,GAAGQ;AAAA,MACH,GAAGM;AAAA,IACf,CAAS;AAAA,IACD,YAAYP;AAAA,IACZ,kBAAkBE;AAAA,IAClB,mBAAmBC;AAAA,IACnB,WAAWN;AAAA,IACX,kBAAkBC;AAAA,IAClB,mBAAmBC;AAAA,EAC3B;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs.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":"gFAUS,MAACA,EAA4C,IAAI","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
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]}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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]}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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]}
|
|
@@ -1,2 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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]}
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@react-aria/utils"),u=require("../../interactions/dist/usePress.cjs.js"),I=require("../../interactions/dist/useFocusable.cjs.js");function L(s,l,r){let{isDisabled:i=!1,isReadOnly:o=!1,value:n,name:c,children:b,"aria-label":P,"aria-labelledby":p,validationState:d="valid",isInvalid:t}=s,v=e=>{e.stopPropagation(),l.setSelected(e.target.checked)},f=b!=null,g=P!=null||p!=null;!f&&!g&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:y,isPressed:m}=u.usePress({isDisabled:i}),{pressProps:h,isPressed:S}=u.usePress({onPress(){var e;l.toggle(),(e=r.current)===null||e===void 0||e.focus()},isDisabled:i||o}),{focusableProps:D}=I.useFocusable(s,r),O=a.mergeProps(y,D),C=a.filterDOMProps(s,{labelable:!0});return a.useFormReset(r,l.isSelected,l.setSelected),{labelProps:a.mergeProps(h,{onClick:e=>e.preventDefault()}),inputProps:a.mergeProps(C,{"aria-invalid":t||d==="invalid"||void 0,"aria-errormessage":s["aria-errormessage"],"aria-controls":s["aria-controls"],"aria-readonly":o||void 0,onChange:v,disabled:i,...n==null?{}:{value:n},name:c,type:"checkbox",...O}),isSelected:l.isSelected,isPressed:m||S,isDisabled:i,isReadOnly:o,isInvalid:t||d==="invalid"}}exports.useToggle=L;
|
|
2
|
-
//# sourceMappingURL=useToggle.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid } = 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 isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $bvdLj$usePress)({\n onPress () {\n var _ref_current;\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.isSelected, 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 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","children","ariaLabel","ariaLabelledby","validationState","isInvalid","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,SAAUC,EAAU,aAAcC,EAAW,kBAAmBC,EAAgB,gBAAiBC,EAAkB,QAAS,UAAWC,CAAS,EAAKX,EACjPY,EAAY,GAAI,CAGhB,EAAE,gBAAe,EACjBX,EAAM,YAAY,EAAE,OAAO,OAAO,CAC1C,EACQY,EAAcN,GAAY,KAC1BO,EAAeN,GAAa,MAAQC,GAAkB,KACtD,CAACI,GAAe,CAACC,GAAgB,QAAQ,IAAI,WAAa,cAAc,QAAQ,KAAK,kFAAkF,EAE3K,GAAI,CAAE,WAAYC,EAAY,UAAWC,CAAS,EAASC,WAAiB,CACxE,WAAYd,CACpB,CAAK,EAEG,CAAE,WAAYe,EAAY,UAAWC,CAAc,EAASF,WAAiB,CAC7E,SAAW,CACP,IAAIG,EACJnB,EAAM,OAAM,GACXmB,EAAelB,EAAI,WAAa,MAAQkB,IAAiB,QAAkBA,EAAa,MAAK,CACjG,EACD,WAAYjB,GAAcC,CAClC,CAAK,EACG,CAAE,eAAgBiB,CAAgB,EAAOC,EAAAA,aAAqBtB,EAAOE,CAAG,EACxEqB,EAAmBC,EAAAA,WAAmBT,EAAYM,CAAc,EAChEI,EAAeC,EAAqB,eAAE1B,EAAO,CAC7C,UAAW,EACnB,CAAK,EACD,OAAI2B,EAAAA,aAAqBzB,EAAKD,EAAM,WAAYA,EAAM,WAAW,EAC1D,CACH,WAAgBuB,EAAiB,WAAEN,EAAY,CAC3C,QAAU,GAAI,EAAE,eAAgB,CAC5C,CAAS,EACD,WAAgBM,EAAiB,WAAEC,EAAU,CACzC,eAAgBd,GAAaD,IAAoB,WAAa,OAC9D,oBAAqBV,EAAM,mBAAmB,EAC9C,gBAAiBA,EAAM,eAAe,EACtC,gBAAiBI,GAAc,OAC/B,SAAUQ,EACV,SAAUT,EACV,GAAGE,GAAS,KAAO,GAAK,CACpB,MAAOA,CACV,EACD,KAAMC,EACN,KAAM,WACN,GAAGiB,CACf,CAAS,EACD,WAAYtB,EAAM,WAClB,UAAWe,GAAaG,EACxB,WAAYhB,EACZ,WAAYC,EACZ,UAAWO,GAAaD,IAAoB,SACpD,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { mergeProps as o, filterDOMProps as O, useFormReset as C } from "@react-aria/utils";
|
|
2
|
-
import { usePress as c } from "../../interactions/dist/usePress.es.js";
|
|
3
|
-
import { useFocusable as I } from "../../interactions/dist/useFocusable.es.js";
|
|
4
|
-
function _(a, l, i) {
|
|
5
|
-
let { isDisabled: s = !1, isReadOnly: r = !1, value: d, name: b, children: u, "aria-label": f, "aria-labelledby": p, validationState: n = "valid", isInvalid: t } = a, P = (e) => {
|
|
6
|
-
e.stopPropagation(), l.setSelected(e.target.checked);
|
|
7
|
-
}, v = u != null, m = f != null || p != null;
|
|
8
|
-
!v && !m && process.env.NODE_ENV !== "production" && console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
9
|
-
let { pressProps: g, isPressed: y } = c({
|
|
10
|
-
isDisabled: s
|
|
11
|
-
}), { pressProps: h, isPressed: $ } = c({
|
|
12
|
-
onPress() {
|
|
13
|
-
var e;
|
|
14
|
-
l.toggle(), (e = i.current) === null || e === void 0 || e.focus();
|
|
15
|
-
},
|
|
16
|
-
isDisabled: s || r
|
|
17
|
-
}), { focusableProps: D } = I(a, i), S = o(g, D), x = O(a, {
|
|
18
|
-
labelable: !0
|
|
19
|
-
});
|
|
20
|
-
return C(i, l.isSelected, l.setSelected), {
|
|
21
|
-
labelProps: o(h, {
|
|
22
|
-
onClick: (e) => e.preventDefault()
|
|
23
|
-
}),
|
|
24
|
-
inputProps: o(x, {
|
|
25
|
-
"aria-invalid": t || n === "invalid" || void 0,
|
|
26
|
-
"aria-errormessage": a["aria-errormessage"],
|
|
27
|
-
"aria-controls": a["aria-controls"],
|
|
28
|
-
"aria-readonly": r || void 0,
|
|
29
|
-
onChange: P,
|
|
30
|
-
disabled: s,
|
|
31
|
-
...d == null ? {} : {
|
|
32
|
-
value: d
|
|
33
|
-
},
|
|
34
|
-
name: b,
|
|
35
|
-
type: "checkbox",
|
|
36
|
-
...S
|
|
37
|
-
}),
|
|
38
|
-
isSelected: l.isSelected,
|
|
39
|
-
isPressed: y || $,
|
|
40
|
-
isDisabled: s,
|
|
41
|
-
isReadOnly: r,
|
|
42
|
-
isInvalid: t || n === "invalid"
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
_ as useToggle
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=useToggle.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid } = 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 isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $bvdLj$usePress)({\n onPress () {\n var _ref_current;\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.isSelected, 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 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","children","ariaLabel","ariaLabelledby","validationState","isInvalid","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,UAAUC,GAAU,cAAcC,GAAW,mBAAmBC,GAAgB,iBAAiBC,IAAkB,SAAS,WAAWC,EAAS,IAAKX,GACjPY,IAAW,CAAC,MAAI;AAGhB,MAAE,gBAAe,GACjBX,EAAM,YAAY,EAAE,OAAO,OAAO;AAAA,EAC1C,GACQY,IAAcN,KAAY,MAC1BO,IAAeN,KAAa,QAAQC,KAAkB;AAC1D,EAAI,CAACI,KAAe,CAACC,KAAgB,QAAQ,IAAI,aAAa,gBAAc,QAAQ,KAAK,kFAAkF;AAE3K,MAAI,EAAE,YAAYC,GAAY,WAAWC,EAAS,IAASC,EAAiB;AAAA,IACxE,YAAYd;AAAA,EACpB,CAAK,GAEG,EAAE,YAAYe,GAAY,WAAWC,EAAc,IAASF,EAAiB;AAAA,IAC7E,UAAW;AACP,UAAIG;AACJ,MAAAnB,EAAM,OAAM,IACXmB,IAAelB,EAAI,aAAa,QAAQkB,MAAiB,UAAkBA,EAAa,MAAK;AAAA,IACjG;AAAA,IACD,YAAYjB,KAAcC;AAAA,EAClC,CAAK,GACG,EAAE,gBAAgBiB,EAAgB,IAAOC,EAAqBtB,GAAOE,CAAG,GACxEqB,IAAmBC,EAAmBT,GAAYM,CAAc,GAChEI,IAAeC,EAAuB1B,GAAO;AAAA,IAC7C,WAAW;AAAA,EACnB,CAAK;AACD,SAAI2B,EAAqBzB,GAAKD,EAAM,YAAYA,EAAM,WAAW,GAC1D;AAAA,IACH,YAAgBuB,EAAmBN,GAAY;AAAA,MAC3C,SAAS,CAAC,MAAI,EAAE,eAAgB;AAAA,IAC5C,CAAS;AAAA,IACD,YAAgBM,EAAmBC,GAAU;AAAA,MACzC,gBAAgBd,KAAaD,MAAoB,aAAa;AAAA,MAC9D,qBAAqBV,EAAM,mBAAmB;AAAA,MAC9C,iBAAiBA,EAAM,eAAe;AAAA,MACtC,iBAAiBI,KAAc;AAAA,MAC/B,UAAUQ;AAAA,MACV,UAAUT;AAAA,MACV,GAAGE,KAAS,OAAO,KAAK;AAAA,QACpB,OAAOA;AAAA,MACV;AAAA,MACD,MAAMC;AAAA,MACN,MAAM;AAAA,MACN,GAAGiB;AAAA,IACf,CAAS;AAAA,IACD,YAAYtB,EAAM;AAAA,IAClB,WAAWe,KAAaG;AAAA,IACxB,YAAYhB;AAAA,IACZ,YAAYC;AAAA,IACZ,WAAWO,KAAaD,MAAoB;AAAA,EACpD;AACA;","x_google_ignoreList":[0]}
|