@protonradio/proton-ui 0.11.6 → 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 +2 -0
- package/dist/dark.cjs.js.map +1 -0
- package/dist/{design/darkTheme/stylesheet.es.js → dark.es.js} +15 -9
- package/dist/dark.es.js.map +1 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.cjs.js.map +1 -1
- package/dist/hooks.es.js +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.d.ts +4 -0
- package/dist/index.es.js +5340 -60
- package/dist/index.es.js.map +1 -1
- package/dist/light.cjs.js +2 -0
- package/dist/light.cjs.js.map +1 -0
- package/dist/{design/lightTheme/stylesheet.es.js → light.es.js} +16 -10
- package/dist/light.es.js.map +1 -0
- 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 +13 -13
- 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 -53
- 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.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.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/theme/dark.cjs.js +0 -2
- package/dist/theme/dark.cjs.js.map +0 -1
- package/dist/theme/dark.d.ts +0 -2
- package/dist/theme/dark.es.js +0 -11
- package/dist/theme/dark.es.js.map +0 -1
- package/dist/theme/light.cjs.js +0 -2
- package/dist/theme/light.cjs.js.map +0 -1
- package/dist/theme/light.d.ts +0 -2
- package/dist/theme/light.es.js +0 -11
- package/dist/theme/light.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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateStylesheet.es.js","sources":["../../src/design/generateStylesheet.ts"],"sourcesContent":["import { THEMES } from \"./theme\";\r\nimport { ProtonPalette } from \"./types\";\r\nimport { LIGHT_STYLESHEET } from \"./lightTheme/stylesheet\";\r\nimport { DARK_STYLESHEET } from \"./darkTheme/stylesheet\";\r\nimport { ProtonStyleSheet } from \"./types\";\r\n\r\nexport const generateStylesheet = (\r\n palette: ProtonPalette,\r\n theme: string\r\n): ProtonStyleSheet => {\r\n const themeVariables =\r\n theme === THEMES.DARK ? DARK_STYLESHEET : LIGHT_STYLESHEET;\r\n\r\n if (palette) {\r\n const customVars = generateCustomStylesheet(palette);\r\n return {\r\n ...themeVariables,\r\n ...customVars,\r\n };\r\n }\r\n\r\n return themeVariables;\r\n};\r\n\r\n//overrride theme colors in stylesheet\r\nconst generateCustomStylesheet = (\r\n palette: ProtonPalette\r\n): Partial<ProtonStyleSheet> => {\r\n return {\r\n \"--proton-color__primary\": palette.BRAND.PRIMARY,\r\n \"--proton-color__primary-light\": palette.BRAND.PRIMARY_LIGHT,\r\n \"--proton-color__primary-super-light\": palette.BRAND.PRIMARY_SUPER_LIGHT,\r\n \"--proton-color__secondary\": palette.BRAND.SECONDARY,\r\n \"--proton-color__secondary-light\": palette.BRAND.SECONDARY_LIGHT,\r\n \"--proton-color__secondary-super-light\":\r\n palette.BRAND.SECONDARY_SUPER_LIGHT,\r\n\r\n //TODO: add newly generated grayscale color scale\r\n };\r\n};\r\n"],"names":["generateStylesheet","palette","theme","themeVariables","THEMES","DARK_STYLESHEET","LIGHT_STYLESHEET","customVars","generateCustomStylesheet"],"mappings":";;;AAMa,MAAAA,IAAqB,CAChCC,GACAC,MACqB;AACrB,QAAMC,IACJD,MAAUE,EAAO,OAAOC,IAAkBC;AAE5C,MAAIL,GAAS;AACL,UAAAM,IAAaC,EAAyBP,CAAO;AAC5C,WAAA;AAAA,MACL,GAAGE;AAAA,MACH,GAAGI;AAAA,IAAA;AAAA,EAEP;AAEO,SAAAJ;AACT,GAGMK,IAA2B,CAC/BP,OAEO;AAAA,EACL,2BAA2BA,EAAQ,MAAM;AAAA,EACzC,iCAAiCA,EAAQ,MAAM;AAAA,EAC/C,uCAAuCA,EAAQ,MAAM;AAAA,EACrD,6BAA6BA,EAAQ,MAAM;AAAA,EAC3C,mCAAmCA,EAAQ,MAAM;AAAA,EACjD,yCACEA,EAAQ,MAAM;AAAA;AAAA;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../colors.cjs.js"),D="#DDDDDD",I=D,A="#F7F8F9",R={SUPER_DARK:"#141211",DARK:"#4D4D4D",MEDIUM:"#7D7D7D",MEDIUM_LIGHT:"#B1B1B1",LIGHT:D,LIGHTEST:"#F0F1F2",SUPER_LIGHT:A,WHITE:"#FFFFFF"},T={SUPER_DARK:"#032026",DARK:"#084657",MEDIUM:"#2085BA",MEDIUM_LIGHT:"#44A8EB",LIGHT:"#70B9F6",LIGHTEST:"#9DCBFC",SUPER_LIGHT:"#C8DFFF",WHITE:"#f5f9ff"},L={BASE_COLOR:E.BACKGROUNDS.WHITE,BRAND:E.BRAND,GRAYSCALE:R,PRIMARY:E.BRAND_PRIMARY_SCALE,SECONDARY:T};exports.BORDER=I;exports.ELEVATION=A;exports.LIGHT_GRAYSCALE=R;exports.LIGHT_PALETTE=L;exports.LIGHT_SECONDARY_SCALE=T;
|
|
2
|
-
//# sourceMappingURL=colors.cjs.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../utils/color2k.cjs.js"),o=require("../colors.cjs.js"),r=require("./colors.cjs.js"),t={"--proton-control__background-color":o.BACKGROUNDS.WHITE,"--proton-control__background-color-light":r.ELEVATION,"--proton-control__text-color":r.LIGHT_GRAYSCALE.DARK,"--proton-control__title-color":r.LIGHT_GRAYSCALE.SUPER_DARK,"--proton-control__border-color":r.BORDER,"--proton-control__hover-color":r.LIGHT_GRAYSCALE.SUPER_LIGHT,"--proton-control__shadow-color":_.transparentize(r.LIGHT_GRAYSCALE.SUPER_DARK,.9),"--proton-control__border-radius":"4px","--proton-control__interactive-color":o.BRAND.PRIMARY_LIGHT,"--proton-color__primary":o.BRAND.PRIMARY,"--proton-color__primary-light":o.BRAND.PRIMARY_LIGHT,"--proton-color__primary-super-light":o.BRAND.PRIMARY_SUPER_LIGHT,"--proton-color__secondary":o.BRAND.SECONDARY,"--proton-color__secondary-light":o.BRAND.SECONDARY_LIGHT,"--proton-color__secondary-super-light":o.BRAND.SECONDARY_SUPER_LIGHT,"--proton-color__danger-super-dark":o.DANGER.SUPER_DARK,"--proton-color__danger-dark":o.DANGER.DARK,"--proton-color__danger-medium":o.DANGER.MEDIUM,"--proton-color__danger-light":o.DANGER.LIGHT,"--proton-color__danger-super-light":o.DANGER.SUPER_LIGHT,"--proton-color__warning-dark":o.WARNING.DARK,"--proton-color__warning-medium":o.WARNING.MEDIUM,"--proton-color__warning-light":o.WARNING.LIGHT,"--proton-color__warning-super-light":o.WARNING.SUPER_LIGHT,"--proton-color__success-dark":o.SUCCESS.DARK,"--proton-color__success-medium":o.SUCCESS.MEDIUM,"--proton-color__success-light":o.SUCCESS.LIGHT,"--proton-color__success-super-light":o.SUCCESS.SUPER_LIGHT,"--proton-color__gray-super-dark":r.LIGHT_GRAYSCALE.SUPER_DARK,"--proton-color__gray-dark":r.LIGHT_GRAYSCALE.DARK,"--proton-color__gray-medium":r.LIGHT_GRAYSCALE.MEDIUM,"--proton-color__gray-medium-light":r.LIGHT_GRAYSCALE.MEDIUM_LIGHT,"--proton-color__gray-light":r.LIGHT_GRAYSCALE.LIGHT,"--proton-color__gray-lightest":r.LIGHT_GRAYSCALE.LIGHTEST,"--proton-color__gray-super-light":r.LIGHT_GRAYSCALE.SUPER_LIGHT,"--proton-color__white":r.LIGHT_GRAYSCALE.WHITE};exports.LIGHT_STYLESHEET=t;
|
|
2
|
-
//# sourceMappingURL=stylesheet.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stylesheet.cjs.js","sources":["../../../src/design/lightTheme/stylesheet.ts"],"sourcesContent":["import { transparentize } from \"../../utils/color2k\";\r\nimport { BACKGROUNDS, BRAND, DANGER, WARNING, SUCCESS } from \"../colors\";\r\nimport { ELEVATION, LIGHT_GRAYSCALE } from \"./colors\";\r\nimport { BORDER } from \"./colors\";\r\nimport type { ProtonStyleSheet } from \"../types\";\r\n\r\nexport const LIGHT_STYLESHEET: ProtonStyleSheet = {\r\n // Control/component colors\r\n \"--proton-control__background-color\": BACKGROUNDS.WHITE,\r\n \"--proton-control__background-color-light\": ELEVATION,\r\n \"--proton-control__text-color\": LIGHT_GRAYSCALE.DARK,\r\n \"--proton-control__title-color\": LIGHT_GRAYSCALE.SUPER_DARK,\r\n \"--proton-control__border-color\": BORDER,\r\n \"--proton-control__hover-color\": LIGHT_GRAYSCALE.SUPER_LIGHT,\r\n \"--proton-control__shadow-color\": transparentize(\r\n LIGHT_GRAYSCALE.SUPER_DARK,\r\n 0.9\r\n ),\r\n \"--proton-control__border-radius\": \"4px\",\r\n \"--proton-control__interactive-color\": BRAND.PRIMARY_LIGHT,\r\n\r\n // Brand colors\r\n \"--proton-color__primary\": BRAND.PRIMARY,\r\n \"--proton-color__primary-light\": BRAND.PRIMARY_LIGHT,\r\n \"--proton-color__primary-super-light\": BRAND.PRIMARY_SUPER_LIGHT,\r\n \"--proton-color__secondary\": BRAND.SECONDARY,\r\n \"--proton-color__secondary-light\": BRAND.SECONDARY_LIGHT,\r\n \"--proton-color__secondary-super-light\": BRAND.SECONDARY_SUPER_LIGHT,\r\n\r\n // Semantic colors\r\n \"--proton-color__danger-super-dark\": DANGER.SUPER_DARK,\r\n \"--proton-color__danger-dark\": DANGER.DARK,\r\n \"--proton-color__danger-medium\": DANGER.MEDIUM,\r\n \"--proton-color__danger-light\": DANGER.LIGHT,\r\n \"--proton-color__danger-super-light\": DANGER.SUPER_LIGHT,\r\n \"--proton-color__warning-dark\": WARNING.DARK,\r\n \"--proton-color__warning-medium\": WARNING.MEDIUM,\r\n \"--proton-color__warning-light\": WARNING.LIGHT,\r\n \"--proton-color__warning-super-light\": WARNING.SUPER_LIGHT,\r\n \"--proton-color__success-dark\": SUCCESS.DARK,\r\n \"--proton-color__success-medium\": SUCCESS.MEDIUM,\r\n \"--proton-color__success-light\": SUCCESS.LIGHT,\r\n \"--proton-color__success-super-light\": SUCCESS.SUPER_LIGHT,\r\n\r\n // Grayscale colors\r\n \"--proton-color__gray-super-dark\": LIGHT_GRAYSCALE.SUPER_DARK,\r\n \"--proton-color__gray-dark\": LIGHT_GRAYSCALE.DARK,\r\n \"--proton-color__gray-medium\": LIGHT_GRAYSCALE.MEDIUM,\r\n \"--proton-color__gray-medium-light\": LIGHT_GRAYSCALE.MEDIUM_LIGHT,\r\n \"--proton-color__gray-light\": LIGHT_GRAYSCALE.LIGHT,\r\n \"--proton-color__gray-lightest\": LIGHT_GRAYSCALE.LIGHTEST,\r\n \"--proton-color__gray-super-light\": LIGHT_GRAYSCALE.SUPER_LIGHT,\r\n \"--proton-color__white\": LIGHT_GRAYSCALE.WHITE,\r\n};\r\n"],"names":["LIGHT_STYLESHEET","BACKGROUNDS","ELEVATION","LIGHT_GRAYSCALE","BORDER","transparentize","BRAND","DANGER","WARNING","SUCCESS"],"mappings":"yLAMaA,EAAqC,CAEhD,qCAAsCC,EAAY,YAAA,MAClD,2CAA4CC,EAAA,UAC5C,+BAAgCC,EAAgB,gBAAA,KAChD,gCAAiCA,EAAgB,gBAAA,WACjD,iCAAkCC,EAAA,OAClC,gCAAiCD,EAAgB,gBAAA,YACjD,iCAAkCE,EAAA,eAChCF,EAAAA,gBAAgB,WAChB,EACF,EACA,kCAAmC,MACnC,sCAAuCG,EAAM,MAAA,cAG7C,0BAA2BA,EAAM,MAAA,QACjC,gCAAiCA,EAAM,MAAA,cACvC,sCAAuCA,EAAM,MAAA,oBAC7C,4BAA6BA,EAAM,MAAA,UACnC,kCAAmCA,EAAM,MAAA,gBACzC,wCAAyCA,EAAM,MAAA,sBAG/C,oCAAqCC,EAAO,OAAA,WAC5C,8BAA+BA,EAAO,OAAA,KACtC,gCAAiCA,EAAO,OAAA,OACxC,+BAAgCA,EAAO,OAAA,MACvC,qCAAsCA,EAAO,OAAA,YAC7C,+BAAgCC,EAAQ,QAAA,KACxC,iCAAkCA,EAAQ,QAAA,OAC1C,gCAAiCA,EAAQ,QAAA,MACzC,sCAAuCA,EAAQ,QAAA,YAC/C,+BAAgCC,EAAQ,QAAA,KACxC,iCAAkCA,EAAQ,QAAA,OAC1C,gCAAiCA,EAAQ,QAAA,MACzC,sCAAuCA,EAAQ,QAAA,YAG/C,kCAAmCN,EAAgB,gBAAA,WACnD,4BAA6BA,EAAgB,gBAAA,KAC7C,8BAA+BA,EAAgB,gBAAA,OAC/C,oCAAqCA,EAAgB,gBAAA,aACrD,6BAA8BA,EAAgB,gBAAA,MAC9C,gCAAiCA,EAAgB,gBAAA,SACjD,mCAAoCA,EAAgB,gBAAA,YACpD,wBAAyBA,EAAgB,gBAAA,KAC3C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stylesheet.es.js","sources":["../../../src/design/lightTheme/stylesheet.ts"],"sourcesContent":["import { transparentize } from \"../../utils/color2k\";\r\nimport { BACKGROUNDS, BRAND, DANGER, WARNING, SUCCESS } from \"../colors\";\r\nimport { ELEVATION, LIGHT_GRAYSCALE } from \"./colors\";\r\nimport { BORDER } from \"./colors\";\r\nimport type { ProtonStyleSheet } from \"../types\";\r\n\r\nexport const LIGHT_STYLESHEET: ProtonStyleSheet = {\r\n // Control/component colors\r\n \"--proton-control__background-color\": BACKGROUNDS.WHITE,\r\n \"--proton-control__background-color-light\": ELEVATION,\r\n \"--proton-control__text-color\": LIGHT_GRAYSCALE.DARK,\r\n \"--proton-control__title-color\": LIGHT_GRAYSCALE.SUPER_DARK,\r\n \"--proton-control__border-color\": BORDER,\r\n \"--proton-control__hover-color\": LIGHT_GRAYSCALE.SUPER_LIGHT,\r\n \"--proton-control__shadow-color\": transparentize(\r\n LIGHT_GRAYSCALE.SUPER_DARK,\r\n 0.9\r\n ),\r\n \"--proton-control__border-radius\": \"4px\",\r\n \"--proton-control__interactive-color\": BRAND.PRIMARY_LIGHT,\r\n\r\n // Brand colors\r\n \"--proton-color__primary\": BRAND.PRIMARY,\r\n \"--proton-color__primary-light\": BRAND.PRIMARY_LIGHT,\r\n \"--proton-color__primary-super-light\": BRAND.PRIMARY_SUPER_LIGHT,\r\n \"--proton-color__secondary\": BRAND.SECONDARY,\r\n \"--proton-color__secondary-light\": BRAND.SECONDARY_LIGHT,\r\n \"--proton-color__secondary-super-light\": BRAND.SECONDARY_SUPER_LIGHT,\r\n\r\n // Semantic colors\r\n \"--proton-color__danger-super-dark\": DANGER.SUPER_DARK,\r\n \"--proton-color__danger-dark\": DANGER.DARK,\r\n \"--proton-color__danger-medium\": DANGER.MEDIUM,\r\n \"--proton-color__danger-light\": DANGER.LIGHT,\r\n \"--proton-color__danger-super-light\": DANGER.SUPER_LIGHT,\r\n \"--proton-color__warning-dark\": WARNING.DARK,\r\n \"--proton-color__warning-medium\": WARNING.MEDIUM,\r\n \"--proton-color__warning-light\": WARNING.LIGHT,\r\n \"--proton-color__warning-super-light\": WARNING.SUPER_LIGHT,\r\n \"--proton-color__success-dark\": SUCCESS.DARK,\r\n \"--proton-color__success-medium\": SUCCESS.MEDIUM,\r\n \"--proton-color__success-light\": SUCCESS.LIGHT,\r\n \"--proton-color__success-super-light\": SUCCESS.SUPER_LIGHT,\r\n\r\n // Grayscale colors\r\n \"--proton-color__gray-super-dark\": LIGHT_GRAYSCALE.SUPER_DARK,\r\n \"--proton-color__gray-dark\": LIGHT_GRAYSCALE.DARK,\r\n \"--proton-color__gray-medium\": LIGHT_GRAYSCALE.MEDIUM,\r\n \"--proton-color__gray-medium-light\": LIGHT_GRAYSCALE.MEDIUM_LIGHT,\r\n \"--proton-color__gray-light\": LIGHT_GRAYSCALE.LIGHT,\r\n \"--proton-color__gray-lightest\": LIGHT_GRAYSCALE.LIGHTEST,\r\n \"--proton-color__gray-super-light\": LIGHT_GRAYSCALE.SUPER_LIGHT,\r\n \"--proton-color__white\": LIGHT_GRAYSCALE.WHITE,\r\n};\r\n"],"names":["LIGHT_STYLESHEET","BACKGROUNDS","ELEVATION","LIGHT_GRAYSCALE","BORDER","transparentize","BRAND","DANGER","WARNING","SUCCESS"],"mappings":";;;AAMO,MAAMA,IAAqC;AAAA;AAAA,EAEhD,sCAAsCC,EAAY;AAAA,EAClD,4CAA4CC;AAAA,EAC5C,gCAAgCC,EAAgB;AAAA,EAChD,iCAAiCA,EAAgB;AAAA,EACjD,kCAAkCC;AAAA,EAClC,iCAAiCD,EAAgB;AAAA,EACjD,kCAAkCE;AAAA,IAChCF,EAAgB;AAAA,IAChB;AAAA,EACF;AAAA,EACA,mCAAmC;AAAA,EACnC,uCAAuCG,EAAM;AAAA;AAAA,EAG7C,2BAA2BA,EAAM;AAAA,EACjC,iCAAiCA,EAAM;AAAA,EACvC,uCAAuCA,EAAM;AAAA,EAC7C,6BAA6BA,EAAM;AAAA,EACnC,mCAAmCA,EAAM;AAAA,EACzC,yCAAyCA,EAAM;AAAA;AAAA,EAG/C,qCAAqCC,EAAO;AAAA,EAC5C,+BAA+BA,EAAO;AAAA,EACtC,iCAAiCA,EAAO;AAAA,EACxC,gCAAgCA,EAAO;AAAA,EACvC,sCAAsCA,EAAO;AAAA,EAC7C,gCAAgCC,EAAQ;AAAA,EACxC,kCAAkCA,EAAQ;AAAA,EAC1C,iCAAiCA,EAAQ;AAAA,EACzC,uCAAuCA,EAAQ;AAAA,EAC/C,gCAAgCC,EAAQ;AAAA,EACxC,kCAAkCA,EAAQ;AAAA,EAC1C,iCAAiCA,EAAQ;AAAA,EACzC,uCAAuCA,EAAQ;AAAA;AAAA,EAG/C,mCAAmCN,EAAgB;AAAA,EACnD,6BAA6BA,EAAgB;AAAA,EAC7C,+BAA+BA,EAAgB;AAAA,EAC/C,qCAAqCA,EAAgB;AAAA,EACrD,8BAA8BA,EAAgB;AAAA,EAC9C,iCAAiCA,EAAgB;AAAA,EACjD,oCAAoCA,EAAgB;AAAA,EACpD,yBAAyBA,EAAgB;AAC3C;"}
|
package/dist/design/theme.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.cjs.js","sources":["../../src/design/theme.ts"],"sourcesContent":["export const THEMES = {\r\n DARK: \"dark\",\r\n LIGHT: \"light\",\r\n} as const;\r\n\r\nexport const THEME_CLASSES = {\r\n [THEMES.DARK]: \"proton-ui__theme--dark\",\r\n [THEMES.LIGHT]: \"proton-ui__theme--light\",\r\n};"],"names":["THEMES","THEME_CLASSES"],"mappings":"gFAAO,MAAMA,EAAS,CACpB,KAAM,OACN,MAAO,OACT,EAEaC,EAAgB,CAC3B,CAACD,EAAO,IAAI,EAAG,yBACf,CAACA,EAAO,KAAK,EAAG,yBAClB"}
|
package/dist/design/theme.es.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.es.js","sources":["../../src/design/theme.ts"],"sourcesContent":["export const THEMES = {\r\n DARK: \"dark\",\r\n LIGHT: \"light\",\r\n} as const;\r\n\r\nexport const THEME_CLASSES = {\r\n [THEMES.DARK]: \"proton-ui__theme--dark\",\r\n [THEMES.LIGHT]: \"proton-ui__theme--light\",\r\n};"],"names":["THEMES","THEME_CLASSES"],"mappings":"AAAO,MAAMA,IAAS;AAAA,EACpB,MAAM;AAAA,EACN,OAAO;AACT,GAEaC,IAAgB;AAAA,EAC3B,CAACD,EAAO,IAAI,GAAG;AAAA,EACf,CAACA,EAAO,KAAK,GAAG;AAClB;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react");function c(t,i="down"){const e=i==="down"?`(max-width: ${t}px)`:`(min-width: ${t}px)`,[o,r]=d.useState(()=>typeof window<"u"?window.matchMedia(e).matches:!1);return d.useEffect(()=>{if(typeof window>"u")return;const n=window.matchMedia(e),a=s=>{r(s.matches)};return n.addEventListener("change",a),()=>n.removeEventListener("change",a)},[e]),o}exports.useBreakpoint=c;
|
|
2
|
-
//# sourceMappingURL=useBreakpoint.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.cjs.js","sources":["../../src/hooks/useBreakpoint.tsx"],"sourcesContent":["import { useState } from \"react\";\r\n\r\nimport { useEffect } from \"react\";\r\nimport { Breakpoint } from \"../constants\";\r\n\r\ntype BreakpointDirection = \"up\" | \"down\";\r\n\r\nexport function useBreakpoint(\r\n breakpoint: Breakpoint,\r\n direction: BreakpointDirection = \"down\"\r\n) {\r\n const query =\r\n direction === \"down\"\r\n ? `(max-width: ${breakpoint}px)`\r\n : `(min-width: ${breakpoint}px)`;\r\n\r\n const [matches, setMatches] = useState(() =>\r\n typeof window !== \"undefined\" ? window.matchMedia(query).matches : false\r\n );\r\n\r\n useEffect(() => {\r\n if (typeof window === \"undefined\") return;\r\n\r\n const mediaQuery = window.matchMedia(query);\r\n const handler = (event: MediaQueryListEvent) => {\r\n setMatches(event.matches);\r\n };\r\n\r\n mediaQuery.addEventListener(\"change\", handler);\r\n return () => mediaQuery.removeEventListener(\"change\", handler);\r\n }, [query]);\r\n\r\n return matches;\r\n}\r\n"],"names":["useBreakpoint","breakpoint","direction","query","matches","setMatches","useState","useEffect","mediaQuery","handler","event"],"mappings":"yGAOgB,SAAAA,EACdC,EACAC,EAAiC,OACjC,CACA,MAAMC,EACJD,IAAc,OACV,eAAeD,CAAU,MACzB,eAAeA,CAAU,MAEzB,CAACG,EAASC,CAAU,EAAIC,EAAA,SAAS,IACrC,OAAO,OAAW,IAAc,OAAO,WAAWH,CAAK,EAAE,QAAU,EAAA,EAGrEI,OAAAA,EAAAA,UAAU,IAAM,CACV,GAAA,OAAO,OAAW,IAAa,OAE7B,MAAAC,EAAa,OAAO,WAAWL,CAAK,EACpCM,EAAWC,GAA+B,CAC9CL,EAAWK,EAAM,OAAO,CAAA,EAGf,OAAAF,EAAA,iBAAiB,SAAUC,CAAO,EACtC,IAAMD,EAAW,oBAAoB,SAAUC,CAAO,CAAA,EAC5D,CAACN,CAAK,CAAC,EAEHC,CACT"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { useState as s, useEffect as c } from "react";
|
|
2
|
-
function h(t, i = "down") {
|
|
3
|
-
const e = i === "down" ? `(max-width: ${t}px)` : `(min-width: ${t}px)`, [o, a] = s(
|
|
4
|
-
() => typeof window < "u" ? window.matchMedia(e).matches : !1
|
|
5
|
-
);
|
|
6
|
-
return c(() => {
|
|
7
|
-
if (typeof window > "u") return;
|
|
8
|
-
const n = window.matchMedia(e), d = (r) => {
|
|
9
|
-
a(r.matches);
|
|
10
|
-
};
|
|
11
|
-
return n.addEventListener("change", d), () => n.removeEventListener("change", d);
|
|
12
|
-
}, [e]), o;
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
h as useBreakpoint
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=useBreakpoint.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.es.js","sources":["../../src/hooks/useBreakpoint.tsx"],"sourcesContent":["import { useState } from \"react\";\r\n\r\nimport { useEffect } from \"react\";\r\nimport { Breakpoint } from \"../constants\";\r\n\r\ntype BreakpointDirection = \"up\" | \"down\";\r\n\r\nexport function useBreakpoint(\r\n breakpoint: Breakpoint,\r\n direction: BreakpointDirection = \"down\"\r\n) {\r\n const query =\r\n direction === \"down\"\r\n ? `(max-width: ${breakpoint}px)`\r\n : `(min-width: ${breakpoint}px)`;\r\n\r\n const [matches, setMatches] = useState(() =>\r\n typeof window !== \"undefined\" ? window.matchMedia(query).matches : false\r\n );\r\n\r\n useEffect(() => {\r\n if (typeof window === \"undefined\") return;\r\n\r\n const mediaQuery = window.matchMedia(query);\r\n const handler = (event: MediaQueryListEvent) => {\r\n setMatches(event.matches);\r\n };\r\n\r\n mediaQuery.addEventListener(\"change\", handler);\r\n return () => mediaQuery.removeEventListener(\"change\", handler);\r\n }, [query]);\r\n\r\n return matches;\r\n}\r\n"],"names":["useBreakpoint","breakpoint","direction","query","matches","setMatches","useState","useEffect","mediaQuery","handler","event"],"mappings":";AAOgB,SAAAA,EACdC,GACAC,IAAiC,QACjC;AACA,QAAMC,IACJD,MAAc,SACV,eAAeD,CAAU,QACzB,eAAeA,CAAU,OAEzB,CAACG,GAASC,CAAU,IAAIC;AAAA,IAAS,MACrC,OAAO,SAAW,MAAc,OAAO,WAAWH,CAAK,EAAE,UAAU;AAAA,EAAA;AAGrE,SAAAI,EAAU,MAAM;AACV,QAAA,OAAO,SAAW,IAAa;AAE7B,UAAAC,IAAa,OAAO,WAAWL,CAAK,GACpCM,IAAU,CAACC,MAA+B;AAC9C,MAAAL,EAAWK,EAAM,OAAO;AAAA,IAAA;AAGf,WAAAF,EAAA,iBAAiB,UAAUC,CAAO,GACtC,MAAMD,EAAW,oBAAoB,UAAUC,CAAO;AAAA,EAAA,GAC5D,CAACN,CAAK,CAAC,GAEHC;AACT;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react");function g({duration:i=200,onClose:t,overlayRef:e}){const[r,c]=s.useState(!1),[u,n]=s.useState(),a=s.useCallback(()=>{if(i<=0){console.warn("useIsClosing: Duration must be positive. Executing onClose immediately."),t==null||t();return}c(!0),e!=null&&e.current&&e.current.classList.add("proton-ScreenOverlay__fade-out");const d=setTimeout(()=>{t==null||t(),c(!1)},i);n(d)},[i,t,e]);return s.useEffect(()=>()=>{u&&clearTimeout(u)},[u]),{isClosing:r,handleClose:a}}exports.useIsClosing=g;
|
|
2
|
-
//# sourceMappingURL=useIsClosing.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsClosing.cjs.js","sources":["../../src/hooks/useIsClosing.tsx"],"sourcesContent":["import { useState, useCallback, RefObject, useEffect } from \"react\";\r\n\r\ninterface UseIsClosingOptions {\r\n /**\r\n * Duration of the closing animation in milliseconds\r\n * @default 200\r\n */\r\n duration?: number;\r\n /**\r\n * Callback to run after the closing animation completes\r\n */\r\n onClose?: () => void;\r\n /**\r\n * When passed, the fade-out class will be added to @ScreenOverlay on close\r\n */\r\n overlayRef?: RefObject<HTMLElement>;\r\n}\r\n\r\n/**\r\n * Hook to manage the closing animation state of a component\r\n * @interface UseIsClosingOptions\r\n * @returns Object containing isClosing state and handleClose function\r\n */\r\nexport function useIsClosing({\r\n duration = 200,\r\n onClose,\r\n overlayRef,\r\n}: UseIsClosingOptions) {\r\n const [isClosing, setIsClosing] = useState(false);\r\n const [timeoutId, setTimeoutId] = useState<number>();\r\n\r\n const handleClose = useCallback(() => {\r\n if (duration <= 0) {\r\n console.warn(\r\n \"useIsClosing: Duration must be positive. Executing onClose immediately.\"\r\n );\r\n onClose?.();\r\n return;\r\n }\r\n\r\n setIsClosing(true);\r\n\r\n if (overlayRef?.current) {\r\n overlayRef.current.classList.add(\"proton-ScreenOverlay__fade-out\");\r\n }\r\n\r\n const id = setTimeout(() => {\r\n onClose?.();\r\n setIsClosing(false);\r\n }, duration);\r\n\r\n setTimeoutId(id);\r\n }, [duration, onClose, overlayRef]);\r\n\r\n useEffect(() => {\r\n return () => {\r\n if (timeoutId) {\r\n clearTimeout(timeoutId);\r\n }\r\n };\r\n }, [timeoutId]);\r\n\r\n return {\r\n isClosing,\r\n handleClose,\r\n };\r\n}\r\n"],"names":["useIsClosing","duration","onClose","overlayRef","isClosing","setIsClosing","useState","timeoutId","setTimeoutId","handleClose","useCallback","id","useEffect"],"mappings":"yGAuBO,SAASA,EAAa,CAC3B,SAAAC,EAAW,IACX,QAAAC,EACA,WAAAC,CACF,EAAwB,CACtB,KAAM,CAACC,EAAWC,CAAY,EAAIC,WAAS,EAAK,EAC1C,CAACC,EAAWC,CAAY,EAAIF,EAAiB,SAAA,EAE7CG,EAAcC,EAAAA,YAAY,IAAM,CACpC,GAAIT,GAAY,EAAG,CACT,QAAA,KACN,yEAAA,EAEQC,GAAA,MAAAA,IACV,MACF,CAEAG,EAAa,EAAI,EAEbF,GAAA,MAAAA,EAAY,SACHA,EAAA,QAAQ,UAAU,IAAI,gCAAgC,EAG7D,MAAAQ,EAAK,WAAW,IAAM,CAChBT,GAAA,MAAAA,IACVG,EAAa,EAAK,GACjBJ,CAAQ,EAEXO,EAAaG,CAAE,CACd,EAAA,CAACV,EAAUC,EAASC,CAAU,CAAC,EAElCS,OAAAA,EAAAA,UAAU,IACD,IAAM,CACPL,GACF,aAAaA,CAAS,CACxB,EAED,CAACA,CAAS,CAAC,EAEP,CACL,UAAAH,EACA,YAAAK,CAAA,CAEJ"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { useState as c, useCallback as d, useEffect as g } from "react";
|
|
2
|
-
function f({
|
|
3
|
-
duration: s = 200,
|
|
4
|
-
onClose: t,
|
|
5
|
-
overlayRef: i
|
|
6
|
-
}) {
|
|
7
|
-
const [r, e] = c(!1), [u, n] = c(), m = d(() => {
|
|
8
|
-
if (s <= 0) {
|
|
9
|
-
console.warn(
|
|
10
|
-
"useIsClosing: Duration must be positive. Executing onClose immediately."
|
|
11
|
-
), t == null || t();
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
e(!0), i != null && i.current && i.current.classList.add("proton-ScreenOverlay__fade-out");
|
|
15
|
-
const a = setTimeout(() => {
|
|
16
|
-
t == null || t(), e(!1);
|
|
17
|
-
}, s);
|
|
18
|
-
n(a);
|
|
19
|
-
}, [s, t, i]);
|
|
20
|
-
return g(() => () => {
|
|
21
|
-
u && clearTimeout(u);
|
|
22
|
-
}, [u]), {
|
|
23
|
-
isClosing: r,
|
|
24
|
-
handleClose: m
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
f as useIsClosing
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=useIsClosing.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsClosing.es.js","sources":["../../src/hooks/useIsClosing.tsx"],"sourcesContent":["import { useState, useCallback, RefObject, useEffect } from \"react\";\r\n\r\ninterface UseIsClosingOptions {\r\n /**\r\n * Duration of the closing animation in milliseconds\r\n * @default 200\r\n */\r\n duration?: number;\r\n /**\r\n * Callback to run after the closing animation completes\r\n */\r\n onClose?: () => void;\r\n /**\r\n * When passed, the fade-out class will be added to @ScreenOverlay on close\r\n */\r\n overlayRef?: RefObject<HTMLElement>;\r\n}\r\n\r\n/**\r\n * Hook to manage the closing animation state of a component\r\n * @interface UseIsClosingOptions\r\n * @returns Object containing isClosing state and handleClose function\r\n */\r\nexport function useIsClosing({\r\n duration = 200,\r\n onClose,\r\n overlayRef,\r\n}: UseIsClosingOptions) {\r\n const [isClosing, setIsClosing] = useState(false);\r\n const [timeoutId, setTimeoutId] = useState<number>();\r\n\r\n const handleClose = useCallback(() => {\r\n if (duration <= 0) {\r\n console.warn(\r\n \"useIsClosing: Duration must be positive. Executing onClose immediately.\"\r\n );\r\n onClose?.();\r\n return;\r\n }\r\n\r\n setIsClosing(true);\r\n\r\n if (overlayRef?.current) {\r\n overlayRef.current.classList.add(\"proton-ScreenOverlay__fade-out\");\r\n }\r\n\r\n const id = setTimeout(() => {\r\n onClose?.();\r\n setIsClosing(false);\r\n }, duration);\r\n\r\n setTimeoutId(id);\r\n }, [duration, onClose, overlayRef]);\r\n\r\n useEffect(() => {\r\n return () => {\r\n if (timeoutId) {\r\n clearTimeout(timeoutId);\r\n }\r\n };\r\n }, [timeoutId]);\r\n\r\n return {\r\n isClosing,\r\n handleClose,\r\n };\r\n}\r\n"],"names":["useIsClosing","duration","onClose","overlayRef","isClosing","setIsClosing","useState","timeoutId","setTimeoutId","handleClose","useCallback","id","useEffect"],"mappings":";AAuBO,SAASA,EAAa;AAAA,EAC3B,UAAAC,IAAW;AAAA,EACX,SAAAC;AAAA,EACA,YAAAC;AACF,GAAwB;AACtB,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,CAACC,GAAWC,CAAY,IAAIF,EAAiB,GAE7CG,IAAcC,EAAY,MAAM;AACpC,QAAIT,KAAY,GAAG;AACT,cAAA;AAAA,QACN;AAAA,MAAA,GAEQC,KAAA,QAAAA;AACV;AAAA,IACF;AAEA,IAAAG,EAAa,EAAI,GAEbF,KAAA,QAAAA,EAAY,WACHA,EAAA,QAAQ,UAAU,IAAI,gCAAgC;AAG7D,UAAAQ,IAAK,WAAW,MAAM;AAChB,MAAAT,KAAA,QAAAA,KACVG,EAAa,EAAK;AAAA,OACjBJ,CAAQ;AAEX,IAAAO,EAAaG,CAAE;AAAA,EACd,GAAA,CAACV,GAAUC,GAASC,CAAU,CAAC;AAElC,SAAAS,EAAU,MACD,MAAM;AACX,IAAIL,KACF,aAAaA,CAAS;AAAA,EACxB,GAED,CAACA,CAAS,CAAC,GAEP;AAAA,IACL,WAAAH;AAAA,IACA,aAAAK;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react");function r(e=!0){t.useLayoutEffect(()=>{if(!e)return;const o=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=o}},[e])}exports.useLockBodyScroll=r;
|
|
2
|
-
//# sourceMappingURL=useLockBodyScroll.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLockBodyScroll.cjs.js","sources":["../../src/hooks/useLockBodyScroll.tsx"],"sourcesContent":["import { useLayoutEffect } from \"react\";\r\n\r\n/**\r\n * A React hook that prevents body scrolling while a component is mounted.\r\n * Useful for modals, overlays, and other components that should prevent background scrolling.\r\n */\r\nexport function useLockBodyScroll(isActive: boolean = true) {\r\n useLayoutEffect(() => {\r\n if (!isActive) return;\r\n\r\n // Get original body overflow\r\n const originalStyle = window.getComputedStyle(document.body).overflow;\r\n // Prevent scrolling on mount\r\n document.body.style.overflow = \"hidden\";\r\n // Re-enable scrolling when component unmounts\r\n return () => {\r\n document.body.style.overflow = originalStyle;\r\n };\r\n }, [isActive]); // Empty array ensures effect is only run on mount and unmount\r\n}\r\n"],"names":["useLockBodyScroll","isActive","useLayoutEffect","originalStyle"],"mappings":"yGAMgB,SAAAA,EAAkBC,EAAoB,GAAM,CAC1DC,EAAAA,gBAAgB,IAAM,CACpB,GAAI,CAACD,EAAU,OAGf,MAAME,EAAgB,OAAO,iBAAiB,SAAS,IAAI,EAAE,SAEpD,gBAAA,KAAK,MAAM,SAAW,SAExB,IAAM,CACF,SAAA,KAAK,MAAM,SAAWA,CAAA,CACjC,EACC,CAACF,CAAQ,CAAC,CACf"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useLayoutEffect as t } from "react";
|
|
2
|
-
function d(o = !0) {
|
|
3
|
-
t(() => {
|
|
4
|
-
if (!o) return;
|
|
5
|
-
const e = window.getComputedStyle(document.body).overflow;
|
|
6
|
-
return document.body.style.overflow = "hidden", () => {
|
|
7
|
-
document.body.style.overflow = e;
|
|
8
|
-
};
|
|
9
|
-
}, [o]);
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
d as useLockBodyScroll
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=useLockBodyScroll.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLockBodyScroll.es.js","sources":["../../src/hooks/useLockBodyScroll.tsx"],"sourcesContent":["import { useLayoutEffect } from \"react\";\r\n\r\n/**\r\n * A React hook that prevents body scrolling while a component is mounted.\r\n * Useful for modals, overlays, and other components that should prevent background scrolling.\r\n */\r\nexport function useLockBodyScroll(isActive: boolean = true) {\r\n useLayoutEffect(() => {\r\n if (!isActive) return;\r\n\r\n // Get original body overflow\r\n const originalStyle = window.getComputedStyle(document.body).overflow;\r\n // Prevent scrolling on mount\r\n document.body.style.overflow = \"hidden\";\r\n // Re-enable scrolling when component unmounts\r\n return () => {\r\n document.body.style.overflow = originalStyle;\r\n };\r\n }, [isActive]); // Empty array ensures effect is only run on mount and unmount\r\n}\r\n"],"names":["useLockBodyScroll","isActive","useLayoutEffect","originalStyle"],"mappings":";AAMgB,SAAAA,EAAkBC,IAAoB,IAAM;AAC1D,EAAAC,EAAgB,MAAM;AACpB,QAAI,CAACD,EAAU;AAGf,UAAME,IAAgB,OAAO,iBAAiB,SAAS,IAAI,EAAE;AAEpD,oBAAA,KAAK,MAAM,WAAW,UAExB,MAAM;AACF,eAAA,KAAK,MAAM,WAAWA;AAAA,IAAA;AAAA,EACjC,GACC,CAACF,CAAQ,CAAC;AACf;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../design/darkTheme/colors.cjs.js"),r=require("../design/lightTheme/colors.cjs.js"),o=require("react"),u=require("../utils/image.cjs.js"),P=require("../utils/palette.cjs.js"),T=require("../design/theme.cjs.js"),E=(e,n)=>{const[a,s]=o.useState(r.LIGHT_PALETTE),l=o.useCallback(async()=>{if(!e)return r.LIGHT_PALETTE;try{const t=await u.getDominantColor(e);return P.generatePalette(t)}catch(t){return console.error("Failed to generate palette:",t),r.LIGHT_PALETTE}},[e]);return o.useEffect(()=>{(async()=>{if(e){const c=await l();s(c);return}if(n===T.THEMES.DARK){s(i.DARK_PALETTE);return}s(r.LIGHT_PALETTE)})()},[e,n,l]),o.useMemo(()=>a,[a])};exports.usePalette=E;
|
|
2
|
-
//# sourceMappingURL=usePalette.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePalette.cjs.js","sources":["../../src/hooks/usePalette.tsx"],"sourcesContent":["import { THEMES } from \"../design\";\r\nimport { DARK_PALETTE } from \"../design/darkTheme/colors\";\r\nimport { LIGHT_PALETTE } from \"../design/lightTheme/colors\";\r\nimport { generatePalette, getDominantColor } from \"../utils\";\r\nimport { ProtonPalette } from \"../design/types\";\r\nimport { useEffect, useState, useCallback, useMemo } from \"react\";\r\n\r\n/**\r\n * Generates a palette based on a background image or theme.\r\n * @param backgroundImage - The URL of the background image to generate a palette from.\r\n * @param theme - The theme to generate a palette for.\r\n * @returns A Palette object containing the generated palette.\r\n */\r\nexport const usePalette = (\r\n backgroundImage: HTMLImageElement | string | null,\r\n theme: string\r\n): ProtonPalette => {\r\n const [palette, setPalette] = useState<ProtonPalette>(LIGHT_PALETTE);\r\n\r\n const getPalette = useCallback(async () => {\r\n if (!backgroundImage) return LIGHT_PALETTE;\r\n\r\n try {\r\n const baseColor = await getDominantColor(\r\n backgroundImage as HTMLImageElement & string\r\n );\r\n const newPalette = generatePalette(baseColor);\r\n\r\n return newPalette;\r\n } catch (error) {\r\n console.error(\"Failed to generate palette:\", error);\r\n return LIGHT_PALETTE;\r\n }\r\n }, [backgroundImage]);\r\n\r\n useEffect(() => {\r\n const fetchPalette = async () => {\r\n if (backgroundImage) {\r\n const newPalette = await getPalette();\r\n setPalette(newPalette);\r\n return;\r\n }\r\n\r\n if (theme === THEMES.DARK) {\r\n setPalette(DARK_PALETTE);\r\n return;\r\n }\r\n\r\n setPalette(LIGHT_PALETTE);\r\n };\r\n\r\n fetchPalette();\r\n }, [backgroundImage, theme, getPalette]);\r\n\r\n return useMemo(() => palette, [palette]);\r\n};\r\n"],"names":["usePalette","backgroundImage","theme","palette","setPalette","useState","LIGHT_PALETTE","getPalette","useCallback","baseColor","getDominantColor","generatePalette","error","useEffect","newPalette","THEMES","DARK_PALETTE","useMemo"],"mappings":"oTAaaA,EAAa,CACxBC,EACAC,IACkB,CAClB,KAAM,CAACC,EAASC,CAAU,EAAIC,WAAwBC,EAAa,aAAA,EAE7DC,EAAaC,EAAAA,YAAY,SAAY,CACrC,GAAA,CAACP,EAAwB,OAAAK,gBAEzB,GAAA,CACF,MAAMG,EAAY,MAAMC,EAAA,iBACtBT,CAAA,EAIK,OAFYU,kBAAgBF,CAAS,QAGrCG,EAAO,CACN,eAAA,MAAM,8BAA+BA,CAAK,EAC3CN,eACT,CAAA,EACC,CAACL,CAAe,CAAC,EAEpBY,OAAAA,EAAAA,UAAU,IAAM,EACO,SAAY,CAC/B,GAAIZ,EAAiB,CACb,MAAAa,EAAa,MAAMP,IACzBH,EAAWU,CAAU,EACrB,MACF,CAEI,GAAAZ,IAAUa,SAAO,KAAM,CACzBX,EAAWY,EAAY,YAAA,EACvB,MACF,CAEAZ,EAAWE,EAAa,aAAA,CAAA,IAIzB,EAAA,CAACL,EAAiBC,EAAOK,CAAU,CAAC,EAEhCU,EAAQ,QAAA,IAAMd,EAAS,CAACA,CAAO,CAAC,CACzC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { DARK_PALETTE as f } from "../design/darkTheme/colors.es.js";
|
|
2
|
-
import { LIGHT_PALETTE as r } from "../design/lightTheme/colors.es.js";
|
|
3
|
-
import { useState as i, useCallback as c, useEffect as P, useMemo as m } from "react";
|
|
4
|
-
import { getDominantColor as p } from "../utils/image.es.js";
|
|
5
|
-
import { generatePalette as u } from "../utils/palette.es.js";
|
|
6
|
-
import { THEMES as E } from "../design/theme.es.js";
|
|
7
|
-
const L = (t, n) => {
|
|
8
|
-
const [a, o] = i(r), l = c(async () => {
|
|
9
|
-
if (!t) return r;
|
|
10
|
-
try {
|
|
11
|
-
const e = await p(
|
|
12
|
-
t
|
|
13
|
-
);
|
|
14
|
-
return u(e);
|
|
15
|
-
} catch (e) {
|
|
16
|
-
return console.error("Failed to generate palette:", e), r;
|
|
17
|
-
}
|
|
18
|
-
}, [t]);
|
|
19
|
-
return P(() => {
|
|
20
|
-
(async () => {
|
|
21
|
-
if (t) {
|
|
22
|
-
const s = await l();
|
|
23
|
-
o(s);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (n === E.DARK) {
|
|
27
|
-
o(f);
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
o(r);
|
|
31
|
-
})();
|
|
32
|
-
}, [t, n, l]), m(() => a, [a]);
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
L as usePalette
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=usePalette.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePalette.es.js","sources":["../../src/hooks/usePalette.tsx"],"sourcesContent":["import { THEMES } from \"../design\";\r\nimport { DARK_PALETTE } from \"../design/darkTheme/colors\";\r\nimport { LIGHT_PALETTE } from \"../design/lightTheme/colors\";\r\nimport { generatePalette, getDominantColor } from \"../utils\";\r\nimport { ProtonPalette } from \"../design/types\";\r\nimport { useEffect, useState, useCallback, useMemo } from \"react\";\r\n\r\n/**\r\n * Generates a palette based on a background image or theme.\r\n * @param backgroundImage - The URL of the background image to generate a palette from.\r\n * @param theme - The theme to generate a palette for.\r\n * @returns A Palette object containing the generated palette.\r\n */\r\nexport const usePalette = (\r\n backgroundImage: HTMLImageElement | string | null,\r\n theme: string\r\n): ProtonPalette => {\r\n const [palette, setPalette] = useState<ProtonPalette>(LIGHT_PALETTE);\r\n\r\n const getPalette = useCallback(async () => {\r\n if (!backgroundImage) return LIGHT_PALETTE;\r\n\r\n try {\r\n const baseColor = await getDominantColor(\r\n backgroundImage as HTMLImageElement & string\r\n );\r\n const newPalette = generatePalette(baseColor);\r\n\r\n return newPalette;\r\n } catch (error) {\r\n console.error(\"Failed to generate palette:\", error);\r\n return LIGHT_PALETTE;\r\n }\r\n }, [backgroundImage]);\r\n\r\n useEffect(() => {\r\n const fetchPalette = async () => {\r\n if (backgroundImage) {\r\n const newPalette = await getPalette();\r\n setPalette(newPalette);\r\n return;\r\n }\r\n\r\n if (theme === THEMES.DARK) {\r\n setPalette(DARK_PALETTE);\r\n return;\r\n }\r\n\r\n setPalette(LIGHT_PALETTE);\r\n };\r\n\r\n fetchPalette();\r\n }, [backgroundImage, theme, getPalette]);\r\n\r\n return useMemo(() => palette, [palette]);\r\n};\r\n"],"names":["usePalette","backgroundImage","theme","palette","setPalette","useState","LIGHT_PALETTE","getPalette","useCallback","baseColor","getDominantColor","generatePalette","error","useEffect","newPalette","THEMES","DARK_PALETTE","useMemo"],"mappings":";;;;;;AAaa,MAAAA,IAAa,CACxBC,GACAC,MACkB;AAClB,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAwBC,CAAa,GAE7DC,IAAaC,EAAY,YAAY;AACrC,QAAA,CAACP,EAAwB,QAAAK;AAEzB,QAAA;AACF,YAAMG,IAAY,MAAMC;AAAA,QACtBT;AAAA,MAAA;AAIK,aAFYU,EAAgBF,CAAS;AAAA,aAGrCG,GAAO;AACN,qBAAA,MAAM,+BAA+BA,CAAK,GAC3CN;AAAA,IACT;AAAA,EAAA,GACC,CAACL,CAAe,CAAC;AAEpB,SAAAY,EAAU,MAAM;AAgBD,KAfQ,YAAY;AAC/B,UAAIZ,GAAiB;AACb,cAAAa,IAAa,MAAMP;AACzB,QAAAH,EAAWU,CAAU;AACrB;AAAA,MACF;AAEI,UAAAZ,MAAUa,EAAO,MAAM;AACzB,QAAAX,EAAWY,CAAY;AACvB;AAAA,MACF;AAEA,MAAAZ,EAAWE,CAAa;AAAA,IAAA;EAIzB,GAAA,CAACL,GAAiBC,GAAOK,CAAU,CAAC,GAEhCU,EAAQ,MAAMd,GAAS,CAACA,CAAO,CAAC;AACzC;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@react-aria/utils"),m=require("../../interactions/dist/usePress.cjs.js"),x=require("../../interactions/dist/useFocusable.cjs.js");function O(e,o){let{elementType:s="button",isDisabled:r,onPress:u,onPressStart:d,onPressEnd:l,onPressUp:P,onPressChange:b,preventFocusOnPress:c,allowFocusWhenDisabled:p,onClick:f,href:g,target:h,rel:y,type:i="button"}=e,n;s==="button"?n={type:i,disabled:r}:n={role:"button",href:s==="a"&&!r?g:void 0,target:s==="a"?h:void 0,type:s==="input"?i:void 0,disabled:s==="input"?r:void 0,"aria-disabled":!r||s==="input"?void 0:r,rel:s==="a"?y:void 0};let{pressProps:F,isPressed:C}=m.usePress({onPressStart:d,onPressEnd:l,onPressChange:b,onPress:u,onPressUp:P,onClick:f,isDisabled:r,preventFocusOnPress:c,ref:o}),{focusableProps:a}=x.useFocusable(e,o);p&&(a.tabIndex=r?-1:a.tabIndex);let D=t.mergeProps(a,F,t.filterDOMProps(e,{labelable:!0}));return{isPressed:C,buttonProps:t.mergeProps(n,D,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}exports.useButton=O;
|
|
2
|
-
//# sourceMappingURL=useButton.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useButton.cjs.js","sources":["../../../../../node_modules/@react-aria/button/dist/useButton.mjs"],"sourcesContent":["import {mergeProps as $bwqiF$mergeProps, filterDOMProps as $bwqiF$filterDOMProps} from \"@react-aria/utils\";\nimport {usePress as $bwqiF$usePress, useFocusable as $bwqiF$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 $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {\n let { elementType: elementType = 'button', isDisabled: isDisabled, onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onPressChange: onPressChange, preventFocusOnPress: preventFocusOnPress, allowFocusWhenDisabled: // @ts-ignore - undocumented\n allowFocusWhenDisabled, onClick: onClick, href: href, target: target, rel: rel, type: type = 'button' } = props;\n let additionalProps;\n if (elementType === 'button') additionalProps = {\n type: type,\n disabled: isDisabled\n };\n else additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n let { pressProps: pressProps, isPressed: isPressed } = (0, $bwqiF$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n preventFocusOnPress: preventFocusOnPress,\n ref: ref\n });\n let { focusableProps: focusableProps } = (0, $bwqiF$useFocusable)(props, ref);\n if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n let buttonProps = (0, $bwqiF$mergeProps)(focusableProps, pressProps, (0, $bwqiF$filterDOMProps)(props, {\n labelable: true\n }));\n return {\n isPressed: isPressed,\n buttonProps: (0, $bwqiF$mergeProps)(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current']\n })\n };\n}\n\n\nexport {$701a24aa0da5b062$export$ea18c227d4417cc3 as useButton};\n//# sourceMappingURL=useButton.module.js.map\n"],"names":["$701a24aa0da5b062$export$ea18c227d4417cc3","props","ref","elementType","isDisabled","onPress","onPressStart","onPressEnd","onPressUp","onPressChange","preventFocusOnPress","allowFocusWhenDisabled","onClick","href","target","rel","type","additionalProps","pressProps","isPressed","$bwqiF$usePress","focusableProps","$bwqiF$useFocusable","buttonProps","$bwqiF$mergeProps","$bwqiF$filterDOMProps"],"mappings":"mOAeA,SAASA,EAA0CC,EAAOC,EAAK,CAC3D,GAAI,CAAE,YAAaC,EAAc,SAAU,WAAYC,EAAY,QAASC,EAAS,aAAcC,EAAc,WAAYC,EAAY,UAAWC,EAAW,cAAeC,EAAe,oBAAqBC,EAAqB,uBACvOC,EAAwB,QAASC,EAAS,KAAMC,EAAM,OAAQC,EAAQ,IAAKC,EAAK,KAAMC,EAAO,QAAQ,EAAKf,EACtGgB,EACAd,IAAgB,SAAUc,EAAkB,CAC5C,KAAMD,EACN,SAAUZ,CAClB,EACSa,EAAkB,CACnB,KAAM,SACN,KAAMd,IAAgB,KAAO,CAACC,EAAaS,EAAO,OAClD,OAAQV,IAAgB,IAAMW,EAAS,OACvC,KAAMX,IAAgB,QAAUa,EAAO,OACvC,SAAUb,IAAgB,QAAUC,EAAa,OACjD,gBAAiB,CAACA,GAAcD,IAAgB,QAAU,OAAYC,EACtE,IAAKD,IAAgB,IAAMY,EAAM,MACzC,EACI,GAAI,CAAE,WAAYG,EAAY,UAAWC,CAAS,EAASC,WAAiB,CACxE,aAAcd,EACd,WAAYC,EACZ,cAAeE,EACf,QAASJ,EACT,UAAWG,EACX,QAASI,EACT,WAAYR,EACZ,oBAAqBM,EACrB,IAAKR,CACb,CAAK,EACG,CAAE,eAAgBmB,CAAgB,EAAOC,EAAAA,aAAqBrB,EAAOC,CAAG,EACxES,IAAwBU,EAAe,SAAWjB,EAAa,GAAKiB,EAAe,UACvF,IAAIE,EAAkBC,aAAmBH,EAAgBH,EAAgBO,EAAqB,eAAExB,EAAO,CACnG,UAAW,EACd,CAAA,CAAC,EACF,MAAO,CACH,UAAWkB,EACX,YAAiBK,EAAAA,WAAmBP,EAAiBM,EAAa,CAC9D,gBAAiBtB,EAAM,eAAe,EACtC,gBAAiBA,EAAM,eAAe,EACtC,gBAAiBA,EAAM,eAAe,EACtC,eAAgBA,EAAM,cAAc,EACpC,eAAgBA,EAAM,cAAc,CAChD,CAAS,CACT,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { mergeProps as i, filterDOMProps as C } from "@react-aria/utils";
|
|
2
|
-
import { usePress as D } from "../../interactions/dist/usePress.es.js";
|
|
3
|
-
import { useFocusable as F } from "../../interactions/dist/useFocusable.es.js";
|
|
4
|
-
function E(e, t) {
|
|
5
|
-
let { elementType: s = "button", isDisabled: r, onPress: d, onPressStart: l, onPressEnd: u, onPressUp: P, onPressChange: p, preventFocusOnPress: c, allowFocusWhenDisabled: f, onClick: b, href: h, target: m, rel: $, type: o = "button" } = e, a;
|
|
6
|
-
s === "button" ? a = {
|
|
7
|
-
type: o,
|
|
8
|
-
disabled: r
|
|
9
|
-
} : a = {
|
|
10
|
-
role: "button",
|
|
11
|
-
href: s === "a" && !r ? h : void 0,
|
|
12
|
-
target: s === "a" ? m : void 0,
|
|
13
|
-
type: s === "input" ? o : void 0,
|
|
14
|
-
disabled: s === "input" ? r : void 0,
|
|
15
|
-
"aria-disabled": !r || s === "input" ? void 0 : r,
|
|
16
|
-
rel: s === "a" ? $ : void 0
|
|
17
|
-
};
|
|
18
|
-
let { pressProps: x, isPressed: g } = D({
|
|
19
|
-
onPressStart: l,
|
|
20
|
-
onPressEnd: u,
|
|
21
|
-
onPressChange: p,
|
|
22
|
-
onPress: d,
|
|
23
|
-
onPressUp: P,
|
|
24
|
-
onClick: b,
|
|
25
|
-
isDisabled: r,
|
|
26
|
-
preventFocusOnPress: c,
|
|
27
|
-
ref: t
|
|
28
|
-
}), { focusableProps: n } = F(e, t);
|
|
29
|
-
f && (n.tabIndex = r ? -1 : n.tabIndex);
|
|
30
|
-
let y = i(n, x, C(e, {
|
|
31
|
-
labelable: !0
|
|
32
|
-
}));
|
|
33
|
-
return {
|
|
34
|
-
isPressed: g,
|
|
35
|
-
buttonProps: i(a, y, {
|
|
36
|
-
"aria-haspopup": e["aria-haspopup"],
|
|
37
|
-
"aria-expanded": e["aria-expanded"],
|
|
38
|
-
"aria-controls": e["aria-controls"],
|
|
39
|
-
"aria-pressed": e["aria-pressed"],
|
|
40
|
-
"aria-current": e["aria-current"]
|
|
41
|
-
})
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
E as useButton
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=useButton.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useButton.es.js","sources":["../../../../../node_modules/@react-aria/button/dist/useButton.mjs"],"sourcesContent":["import {mergeProps as $bwqiF$mergeProps, filterDOMProps as $bwqiF$filterDOMProps} from \"@react-aria/utils\";\nimport {usePress as $bwqiF$usePress, useFocusable as $bwqiF$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 $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {\n let { elementType: elementType = 'button', isDisabled: isDisabled, onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onPressChange: onPressChange, preventFocusOnPress: preventFocusOnPress, allowFocusWhenDisabled: // @ts-ignore - undocumented\n allowFocusWhenDisabled, onClick: onClick, href: href, target: target, rel: rel, type: type = 'button' } = props;\n let additionalProps;\n if (elementType === 'button') additionalProps = {\n type: type,\n disabled: isDisabled\n };\n else additionalProps = {\n role: 'button',\n href: elementType === 'a' && !isDisabled ? href : undefined,\n target: elementType === 'a' ? target : undefined,\n type: elementType === 'input' ? type : undefined,\n disabled: elementType === 'input' ? isDisabled : undefined,\n 'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,\n rel: elementType === 'a' ? rel : undefined\n };\n let { pressProps: pressProps, isPressed: isPressed } = (0, $bwqiF$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n preventFocusOnPress: preventFocusOnPress,\n ref: ref\n });\n let { focusableProps: focusableProps } = (0, $bwqiF$useFocusable)(props, ref);\n if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;\n let buttonProps = (0, $bwqiF$mergeProps)(focusableProps, pressProps, (0, $bwqiF$filterDOMProps)(props, {\n labelable: true\n }));\n return {\n isPressed: isPressed,\n buttonProps: (0, $bwqiF$mergeProps)(additionalProps, buttonProps, {\n 'aria-haspopup': props['aria-haspopup'],\n 'aria-expanded': props['aria-expanded'],\n 'aria-controls': props['aria-controls'],\n 'aria-pressed': props['aria-pressed'],\n 'aria-current': props['aria-current']\n })\n };\n}\n\n\nexport {$701a24aa0da5b062$export$ea18c227d4417cc3 as useButton};\n//# sourceMappingURL=useButton.module.js.map\n"],"names":["$701a24aa0da5b062$export$ea18c227d4417cc3","props","ref","elementType","isDisabled","onPress","onPressStart","onPressEnd","onPressUp","onPressChange","preventFocusOnPress","allowFocusWhenDisabled","onClick","href","target","rel","type","additionalProps","pressProps","isPressed","$bwqiF$usePress","focusableProps","$bwqiF$useFocusable","buttonProps","$bwqiF$mergeProps","$bwqiF$filterDOMProps"],"mappings":";;;AAeA,SAASA,EAA0CC,GAAOC,GAAK;AAC3D,MAAI,EAAE,aAAaC,IAAc,UAAU,YAAYC,GAAY,SAASC,GAAS,cAAcC,GAAc,YAAYC,GAAY,WAAWC,GAAW,eAAeC,GAAe,qBAAqBC,GAAqB,wBACvOC,GAAwB,SAASC,GAAS,MAAMC,GAAM,QAAQC,GAAQ,KAAKC,GAAK,MAAMC,IAAO,SAAQ,IAAKf,GACtGgB;AACJ,EAAId,MAAgB,WAAUc,IAAkB;AAAA,IAC5C,MAAMD;AAAA,IACN,UAAUZ;AAAA,EAClB,IACSa,IAAkB;AAAA,IACnB,MAAM;AAAA,IACN,MAAMd,MAAgB,OAAO,CAACC,IAAaS,IAAO;AAAA,IAClD,QAAQV,MAAgB,MAAMW,IAAS;AAAA,IACvC,MAAMX,MAAgB,UAAUa,IAAO;AAAA,IACvC,UAAUb,MAAgB,UAAUC,IAAa;AAAA,IACjD,iBAAiB,CAACA,KAAcD,MAAgB,UAAU,SAAYC;AAAA,IACtE,KAAKD,MAAgB,MAAMY,IAAM;AAAA,EACzC;AACI,MAAI,EAAE,YAAYG,GAAY,WAAWC,EAAS,IAASC,EAAiB;AAAA,IACxE,cAAcd;AAAA,IACd,YAAYC;AAAA,IACZ,eAAeE;AAAA,IACf,SAASJ;AAAA,IACT,WAAWG;AAAA,IACX,SAASI;AAAA,IACT,YAAYR;AAAA,IACZ,qBAAqBM;AAAA,IACrB,KAAKR;AAAA,EACb,CAAK,GACG,EAAE,gBAAgBmB,EAAgB,IAAOC,EAAqBrB,GAAOC,CAAG;AAC5E,EAAIS,MAAwBU,EAAe,WAAWjB,IAAa,KAAKiB,EAAe;AACvF,MAAIE,IAAkBC,EAAmBH,GAAgBH,GAAgBO,EAAuBxB,GAAO;AAAA,IACnG,WAAW;AAAA,EACd,CAAA,CAAC;AACF,SAAO;AAAA,IACH,WAAWkB;AAAA,IACX,aAAiBK,EAAmBP,GAAiBM,GAAa;AAAA,MAC9D,iBAAiBtB,EAAM,eAAe;AAAA,MACtC,iBAAiBA,EAAM,eAAe;AAAA,MACtC,iBAAiBA,EAAM,eAAe;AAAA,MACtC,gBAAgBA,EAAM,cAAc;AAAA,MACpC,gBAAgBA,EAAM,cAAc;AAAA,IAChD,CAAS;AAAA,EACT;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@react-aria/utils"),n=require("../../interactions/dist/focusSafely.cjs.js"),a=require("react"),c=require("../../overlays/dist/Overlay.cjs.js");function s(t,e){let{role:o="dialog"}=t,r=i.useSlotId();r=t["aria-label"]?void 0:r;let l=a.useRef(!1);return a.useEffect(()=>{if(e.current&&!e.current.contains(document.activeElement)){n.focusSafely(e.current);let u=setTimeout(()=>{document.activeElement===e.current&&(l.current=!0,e.current&&(e.current.blur(),n.focusSafely(e.current)),l.current=!1)},500);return()=>{clearTimeout(u)}}},[e]),c.useOverlayFocusContain(),{dialogProps:{...i.filterDOMProps(t,{labelable:!0}),role:o,tabIndex:-1,"aria-labelledby":t["aria-labelledby"]||r,onBlur:u=>{l.current&&u.stopPropagation()}},titleProps:{id:r}}}exports.useDialog=s;
|
|
2
|
-
//# sourceMappingURL=useDialog.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDialog.cjs.js","sources":["../../../../../node_modules/@react-aria/dialog/dist/useDialog.mjs"],"sourcesContent":["import {useSlotId as $i6df2$useSlotId, filterDOMProps as $i6df2$filterDOMProps} from \"@react-aria/utils\";\nimport {focusSafely as $i6df2$focusSafely} from \"@react-aria/interactions\";\nimport {useRef as $i6df2$useRef, useEffect as $i6df2$useEffect} from \"react\";\nimport {useOverlayFocusContain as $i6df2$useOverlayFocusContain} from \"@react-aria/overlays\";\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 $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {\n let { role: role = 'dialog' } = props;\n let titleId = (0, $i6df2$useSlotId)();\n titleId = props['aria-label'] ? undefined : titleId;\n let isRefocusing = (0, $i6df2$useRef)(false);\n // Focus the dialog itself on mount, unless a child element is already focused.\n (0, $i6df2$useEffect)(()=>{\n if (ref.current && !ref.current.contains(document.activeElement)) {\n (0, $i6df2$focusSafely)(ref.current);\n // Safari on iOS does not move the VoiceOver cursor to the dialog\n // or announce that it has opened until it has rendered. A workaround\n // is to wait for half a second, then blur and re-focus the dialog.\n let timeout = setTimeout(()=>{\n if (document.activeElement === ref.current) {\n isRefocusing.current = true;\n if (ref.current) {\n ref.current.blur();\n (0, $i6df2$focusSafely)(ref.current);\n }\n isRefocusing.current = false;\n }\n }, 500);\n return ()=>{\n clearTimeout(timeout);\n };\n }\n }, [\n ref\n ]);\n (0, $i6df2$useOverlayFocusContain)();\n // We do not use aria-modal due to a Safari bug which forces the first focusable element to be focused\n // on mount when inside an iframe, no matter which element we programmatically focus.\n // See https://bugs.webkit.org/show_bug.cgi?id=211934.\n // useModal sets aria-hidden on all elements outside the dialog, so the dialog will behave as a modal\n // even without aria-modal on the dialog itself.\n return {\n dialogProps: {\n ...(0, $i6df2$filterDOMProps)(props, {\n labelable: true\n }),\n role: role,\n tabIndex: -1,\n 'aria-labelledby': props['aria-labelledby'] || titleId,\n // Prevent blur events from reaching useOverlay, which may cause\n // popovers to close. Since focus is contained within the dialog,\n // we don't want this to occur due to the above useEffect.\n onBlur: (e)=>{\n if (isRefocusing.current) e.stopPropagation();\n }\n },\n titleProps: {\n id: titleId\n }\n };\n}\n\n\nexport {$40df3f8667284809$export$d55e7ee900f34e93 as useDialog};\n//# sourceMappingURL=useDialog.module.js.map\n"],"names":["$40df3f8667284809$export$d55e7ee900f34e93","props","ref","role","titleId","$i6df2$useSlotId","isRefocusing","$i6df2$useRef","$i6df2$useEffect","$i6df2$focusSafely","timeout","$i6df2$useOverlayFocusContain","$i6df2$filterDOMProps","e"],"mappings":"gPAmBA,SAASA,EAA0CC,EAAOC,EAAK,CAC3D,GAAI,CAAE,KAAMC,EAAO,QAAQ,EAAKF,EAC5BG,EAAcC,EAAAA,YAClBD,EAAUH,EAAM,YAAY,EAAI,OAAYG,EAC5C,IAAIE,EAAmBC,SAAe,EAAK,EAE3C,OAAIC,EAAgB,UAAE,IAAI,CACtB,GAAIN,EAAI,SAAW,CAACA,EAAI,QAAQ,SAAS,SAAS,aAAa,EAAG,CAC1DO,EAAkB,YAAEP,EAAI,OAAO,EAInC,IAAIQ,EAAU,WAAW,IAAI,CACrB,SAAS,gBAAkBR,EAAI,UAC/BI,EAAa,QAAU,GACnBJ,EAAI,UACJA,EAAI,QAAQ,OACRO,EAAkB,YAAEP,EAAI,OAAO,GAEvCI,EAAa,QAAU,GAE9B,EAAE,GAAG,EACN,MAAO,IAAI,CACP,aAAaI,CAAO,CACpC,CACS,CACT,EAAO,CACCR,CACR,CAAK,EACGS,EAA6B,uBAAA,EAM1B,CACH,YAAa,CACT,GAAOC,EAAqB,eAAEX,EAAO,CACjC,UAAW,EAC3B,CAAa,EACD,KAAME,EACN,SAAU,GACV,kBAAmBF,EAAM,iBAAiB,GAAKG,EAI/C,OAASS,GAAI,CACLP,EAAa,SAASO,EAAE,gBAAe,CAC9C,CACJ,EACD,WAAY,CACR,GAAIT,CACP,CACT,CACA","x_google_ignoreList":[0]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { useSlotId as i, filterDOMProps as n } from "@react-aria/utils";
|
|
2
|
-
import { focusSafely as a } from "../../interactions/dist/focusSafely.es.js";
|
|
3
|
-
import { useRef as c, useEffect as d } from "react";
|
|
4
|
-
import { useOverlayFocusContain as f } from "../../overlays/dist/Overlay.es.js";
|
|
5
|
-
function p(t, e) {
|
|
6
|
-
let { role: u = "dialog" } = t, r = i();
|
|
7
|
-
r = t["aria-label"] ? void 0 : r;
|
|
8
|
-
let l = c(!1);
|
|
9
|
-
return d(() => {
|
|
10
|
-
if (e.current && !e.current.contains(document.activeElement)) {
|
|
11
|
-
a(e.current);
|
|
12
|
-
let o = setTimeout(() => {
|
|
13
|
-
document.activeElement === e.current && (l.current = !0, e.current && (e.current.blur(), a(e.current)), l.current = !1);
|
|
14
|
-
}, 500);
|
|
15
|
-
return () => {
|
|
16
|
-
clearTimeout(o);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}, [
|
|
20
|
-
e
|
|
21
|
-
]), f(), {
|
|
22
|
-
dialogProps: {
|
|
23
|
-
...n(t, {
|
|
24
|
-
labelable: !0
|
|
25
|
-
}),
|
|
26
|
-
role: u,
|
|
27
|
-
tabIndex: -1,
|
|
28
|
-
"aria-labelledby": t["aria-labelledby"] || r,
|
|
29
|
-
// Prevent blur events from reaching useOverlay, which may cause
|
|
30
|
-
// popovers to close. Since focus is contained within the dialog,
|
|
31
|
-
// we don't want this to occur due to the above useEffect.
|
|
32
|
-
onBlur: (o) => {
|
|
33
|
-
l.current && o.stopPropagation();
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
titleProps: {
|
|
37
|
-
id: r
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
p as useDialog
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=useDialog.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDialog.es.js","sources":["../../../../../node_modules/@react-aria/dialog/dist/useDialog.mjs"],"sourcesContent":["import {useSlotId as $i6df2$useSlotId, filterDOMProps as $i6df2$filterDOMProps} from \"@react-aria/utils\";\nimport {focusSafely as $i6df2$focusSafely} from \"@react-aria/interactions\";\nimport {useRef as $i6df2$useRef, useEffect as $i6df2$useEffect} from \"react\";\nimport {useOverlayFocusContain as $i6df2$useOverlayFocusContain} from \"@react-aria/overlays\";\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 $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {\n let { role: role = 'dialog' } = props;\n let titleId = (0, $i6df2$useSlotId)();\n titleId = props['aria-label'] ? undefined : titleId;\n let isRefocusing = (0, $i6df2$useRef)(false);\n // Focus the dialog itself on mount, unless a child element is already focused.\n (0, $i6df2$useEffect)(()=>{\n if (ref.current && !ref.current.contains(document.activeElement)) {\n (0, $i6df2$focusSafely)(ref.current);\n // Safari on iOS does not move the VoiceOver cursor to the dialog\n // or announce that it has opened until it has rendered. A workaround\n // is to wait for half a second, then blur and re-focus the dialog.\n let timeout = setTimeout(()=>{\n if (document.activeElement === ref.current) {\n isRefocusing.current = true;\n if (ref.current) {\n ref.current.blur();\n (0, $i6df2$focusSafely)(ref.current);\n }\n isRefocusing.current = false;\n }\n }, 500);\n return ()=>{\n clearTimeout(timeout);\n };\n }\n }, [\n ref\n ]);\n (0, $i6df2$useOverlayFocusContain)();\n // We do not use aria-modal due to a Safari bug which forces the first focusable element to be focused\n // on mount when inside an iframe, no matter which element we programmatically focus.\n // See https://bugs.webkit.org/show_bug.cgi?id=211934.\n // useModal sets aria-hidden on all elements outside the dialog, so the dialog will behave as a modal\n // even without aria-modal on the dialog itself.\n return {\n dialogProps: {\n ...(0, $i6df2$filterDOMProps)(props, {\n labelable: true\n }),\n role: role,\n tabIndex: -1,\n 'aria-labelledby': props['aria-labelledby'] || titleId,\n // Prevent blur events from reaching useOverlay, which may cause\n // popovers to close. Since focus is contained within the dialog,\n // we don't want this to occur due to the above useEffect.\n onBlur: (e)=>{\n if (isRefocusing.current) e.stopPropagation();\n }\n },\n titleProps: {\n id: titleId\n }\n };\n}\n\n\nexport {$40df3f8667284809$export$d55e7ee900f34e93 as useDialog};\n//# sourceMappingURL=useDialog.module.js.map\n"],"names":["$40df3f8667284809$export$d55e7ee900f34e93","props","ref","role","titleId","$i6df2$useSlotId","isRefocusing","$i6df2$useRef","$i6df2$useEffect","$i6df2$focusSafely","timeout","$i6df2$useOverlayFocusContain","$i6df2$filterDOMProps","e"],"mappings":";;;;AAmBA,SAASA,EAA0CC,GAAOC,GAAK;AAC3D,MAAI,EAAE,MAAMC,IAAO,SAAQ,IAAKF,GAC5BG,IAAcC;AAClB,EAAAD,IAAUH,EAAM,YAAY,IAAI,SAAYG;AAC5C,MAAIE,IAAmBC,EAAe,EAAK;AAE3C,SAAIC,EAAkB,MAAI;AACtB,QAAIN,EAAI,WAAW,CAACA,EAAI,QAAQ,SAAS,SAAS,aAAa,GAAG;AAC9D,MAAIO,EAAoBP,EAAI,OAAO;AAInC,UAAIQ,IAAU,WAAW,MAAI;AACzB,QAAI,SAAS,kBAAkBR,EAAI,YAC/BI,EAAa,UAAU,IACnBJ,EAAI,YACJA,EAAI,QAAQ,QACRO,EAAoBP,EAAI,OAAO,IAEvCI,EAAa,UAAU;AAAA,MAE9B,GAAE,GAAG;AACN,aAAO,MAAI;AACP,qBAAaI,CAAO;AAAA,MACpC;AAAA,IACS;AAAA,EACT,GAAO;AAAA,IACCR;AAAA,EACR,CAAK,GACGS,EAA6B,GAM1B;AAAA,IACH,aAAa;AAAA,MACT,GAAOC,EAAuBX,GAAO;AAAA,QACjC,WAAW;AAAA,MAC3B,CAAa;AAAA,MACD,MAAME;AAAA,MACN,UAAU;AAAA,MACV,mBAAmBF,EAAM,iBAAiB,KAAKG;AAAA;AAAA;AAAA;AAAA,MAI/C,QAAQ,CAACS,MAAI;AACT,QAAIP,EAAa,WAASO,EAAE,gBAAe;AAAA,MAC9C;AAAA,IACJ;AAAA,IACD,YAAY;AAAA,MACR,IAAIT;AAAA,IACP;AAAA,EACT;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./isElementVisible.cjs.js"),d=require("@react-aria/utils"),I=require("../../interactions/dist/useFocusVisible.cjs.js"),P=require("../../interactions/dist/focusSafely.cjs.js"),g=require("react"),D=g.createContext(null),R="react-aria-focus-scope-restore";let v=null;function q(e){let{children:t,contain:r,restoreFocus:u,autoFocus:n}=e,i=g.useRef(null),a=g.useRef(null),o=g.useRef([]),{parentNode:E}=g.useContext(D)||{},l=g.useMemo(()=>new x({scopeRef:o}),[o]);d.useLayoutEffect(()=>{let f=E||m.root;if(m.getTreeNode(f.scopeRef)&&v&&!L(v,f.scopeRef)){let s=m.getTreeNode(v);s&&(f=s)}f.addChild(l),m.addNode(l)},[l,E]),d.useLayoutEffect(()=>{let f=m.getTreeNode(o);f&&(f.contain=!!r)},[r]),d.useLayoutEffect(()=>{var f;let s=(f=i.current)===null||f===void 0?void 0:f.nextSibling,p=[],y=F=>F.stopPropagation();for(;s&&s!==a.current;)p.push(s),s.addEventListener(R,y),s=s.nextSibling;return o.current=p,()=>{for(let F of p)F.removeEventListener(R,y)}},[t]),B(o,u,r),V(o,r),H(o,u,r),j(o,n),g.useEffect(()=>{const f=d.getActiveElement(d.getOwnerDocument(o.current?o.current[0]:void 0));let s=null;if(N(f,o.current)){for(let p of m.traverse())p.scopeRef&&N(f,p.scopeRef.current)&&(s=p);s===m.getTreeNode(o)&&(v=s.scopeRef)}},[o]),d.useLayoutEffect(()=>()=>{var f,s,p;let y=(p=(s=m.getTreeNode(o))===null||s===void 0||(f=s.parent)===null||f===void 0?void 0:f.scopeRef)!==null&&p!==void 0?p:null;(o===v||L(o,v))&&(!y||m.getTreeNode(y))&&(v=y),m.removeTreeNode(o)},[o]);let b=g.useMemo(()=>z(o),[]),c=g.useMemo(()=>({focusManager:b,parentNode:l}),[l,b]);return g.createElement(D.Provider,{value:c},g.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,g.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function z(e){return{focusNext(t={}){let r=e.current,{from:u,tabbable:n,wrap:i,accept:a}=t;var o;let E=u||d.getActiveElement(d.getOwnerDocument((o=r[0])!==null&&o!==void 0?o:void 0)),l=r[0].previousElementSibling,b=w(r),c=h(b,{tabbable:n,accept:a},r);c.currentNode=N(E,r)?E:l;let f=c.nextNode();return!f&&i&&(c.currentNode=l,f=c.nextNode()),f&&T(f,!0),f},focusPrevious(t={}){let r=e.current,{from:u,tabbable:n,wrap:i,accept:a}=t;var o;let E=u||d.getActiveElement(d.getOwnerDocument((o=r[0])!==null&&o!==void 0?o:void 0)),l=r[r.length-1].nextElementSibling,b=w(r),c=h(b,{tabbable:n,accept:a},r);c.currentNode=N(E,r)?E:l;let f=c.previousNode();return!f&&i&&(c.currentNode=l,f=c.previousNode()),f&&T(f,!0),f},focusFirst(t={}){let r=e.current,{tabbable:u,accept:n}=t,i=w(r),a=h(i,{tabbable:u,accept:n},r);a.currentNode=r[0].previousElementSibling;let o=a.nextNode();return o&&T(o,!0),o},focusLast(t={}){let r=e.current,{tabbable:u,accept:n}=t,i=w(r),a=h(i,{tabbable:u,accept:n},r);a.currentNode=r[r.length-1].nextElementSibling;let o=a.previousNode();return o&&T(o,!0),o}}}function w(e){return e[0].parentElement}function S(e){let t=m.getTreeNode(v);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function V(e,t){let r=g.useRef(void 0),u=g.useRef(void 0);d.useLayoutEffect(()=>{let n=e.current;if(!t){u.current&&(cancelAnimationFrame(u.current),u.current=void 0);return}const i=d.getOwnerDocument(n?n[0]:void 0);let a=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!S(e)||l.isComposing)return;let b=d.getActiveElement(i),c=e.current;if(!c||!N(b,c))return;let f=w(c),s=h(f,{tabbable:!0},c);if(!b)return;s.currentNode=b;let p=l.shiftKey?s.previousNode():s.nextNode();p||(s.currentNode=l.shiftKey?c[c.length-1].nextElementSibling:c[0].previousElementSibling,p=l.shiftKey?s.previousNode():s.nextNode()),l.preventDefault(),p&&T(p,!0)},o=l=>{(!v||L(v,e))&&N(d.getEventTarget(l),e.current)?(v=e,r.current=d.getEventTarget(l)):S(e)&&!$(d.getEventTarget(l),e)?r.current?r.current.focus():v&&v.current&&_(v.current):S(e)&&(r.current=d.getEventTarget(l))},E=l=>{u.current&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let b=I.getInteractionModality(),c=(b==="virtual"||b===null)&&d.isAndroid()&&d.isChrome(),f=d.getActiveElement(i);if(!c&&f&&S(e)&&!$(f,e)){v=e;let p=d.getEventTarget(l);if(p&&p.isConnected){var s;r.current=p,(s=r.current)===null||s===void 0||s.focus()}else v.current&&_(v.current)}})};return i.addEventListener("keydown",a,!1),i.addEventListener("focusin",o,!1),n==null||n.forEach(l=>l.addEventListener("focusin",o,!1)),n==null||n.forEach(l=>l.addEventListener("focusout",E,!1)),()=>{i.removeEventListener("keydown",a,!1),i.removeEventListener("focusin",o,!1),n==null||n.forEach(l=>l.removeEventListener("focusin",o,!1)),n==null||n.forEach(l=>l.removeEventListener("focusout",E,!1))}},[e,t]),d.useLayoutEffect(()=>()=>{u.current&&cancelAnimationFrame(u.current)},[u])}function k(e){return $(e)}function N(e,t){return!e||!t?!1:t.some(r=>r.contains(e))}function $(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:r}of m.traverse(m.getTreeNode(t)))if(r&&N(e,r.current))return!0;return!1}function W(e){return $(e,v)}function L(e,t){var r;let u=(r=m.getTreeNode(t))===null||r===void 0?void 0:r.parent;for(;u;){if(u.scopeRef===e)return!0;u=u.parent}return!1}function T(e,t=!1){if(e!=null&&!t)try{P.focusSafely(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function O(e,t=!0){let r=e[0].previousElementSibling,u=w(e),n=h(u,{tabbable:t},e);n.currentNode=r;let i=n.nextNode();return t&&!i&&(u=w(e),n=h(u,{tabbable:!1},e),n.currentNode=r,i=n.nextNode()),i}function _(e,t=!0){T(O(e,t))}function j(e,t){const r=g.useRef(t);g.useEffect(()=>{if(r.current){v=e;const u=d.getOwnerDocument(e.current?e.current[0]:void 0);!N(d.getActiveElement(u),v.current)&&e.current&&_(e.current)}r.current=!1},[e])}function B(e,t,r){d.useLayoutEffect(()=>{if(t||r)return;let u=e.current;const n=d.getOwnerDocument(u?u[0]:void 0);let i=a=>{let o=d.getEventTarget(a);N(o,e.current)?v=e:k(o)||(v=null)};return n.addEventListener("focusin",i,!1),u==null||u.forEach(a=>a.addEventListener("focusin",i,!1)),()=>{n.removeEventListener("focusin",i,!1),u==null||u.forEach(a=>a.removeEventListener("focusin",i,!1))}},[e,t,r])}function A(e){let t=m.getTreeNode(v);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function H(e,t,r){const u=g.useRef(typeof document<"u"?d.getActiveElement(d.getOwnerDocument(e.current?e.current[0]:void 0)):null);d.useLayoutEffect(()=>{let n=e.current;const i=d.getOwnerDocument(n?n[0]:void 0);if(!t||r)return;let a=()=>{(!v||L(v,e))&&N(d.getActiveElement(i),e.current)&&(v=e)};return i.addEventListener("focusin",a,!1),n==null||n.forEach(o=>o.addEventListener("focusin",a,!1)),()=>{i.removeEventListener("focusin",a,!1),n==null||n.forEach(o=>o.removeEventListener("focusin",a,!1))}},[e,r]),d.useLayoutEffect(()=>{const n=d.getOwnerDocument(e.current?e.current[0]:void 0);if(!t)return;let i=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!S(e)||a.isComposing)return;let o=n.activeElement;if(!$(o,e)||!A(e))return;let E=m.getTreeNode(e);if(!E)return;let l=E.nodeToRestore,b=h(n.body,{tabbable:!0});b.currentNode=o;let c=a.shiftKey?b.previousNode():b.nextNode();if((!l||!l.isConnected||l===n.body)&&(l=void 0,E.nodeToRestore=void 0),(!c||!$(c,e))&&l){b.currentNode=l;do c=a.shiftKey?b.previousNode():b.nextNode();while($(c,e));a.preventDefault(),a.stopPropagation(),c?T(c,!0):k(l)?T(l,!0):o.blur()}};return r||n.addEventListener("keydown",i,!0),()=>{r||n.removeEventListener("keydown",i,!0)}},[e,t,r]),d.useLayoutEffect(()=>{const n=d.getOwnerDocument(e.current?e.current[0]:void 0);if(!t)return;let i=m.getTreeNode(e);if(i){var a;return i.nodeToRestore=(a=u.current)!==null&&a!==void 0?a:void 0,()=>{let o=m.getTreeNode(e);if(!o)return;let E=o.nodeToRestore,l=d.getActiveElement(n);if(t&&E&&(l&&$(l,e)||l===n.body&&A(e))){let b=m.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let c=b.getTreeNode(e);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){M(c.nodeToRestore);return}c=c.parent}for(c=b.getTreeNode(e);c;){if(c.scopeRef&&c.scopeRef.current&&m.getTreeNode(c.scopeRef)){let f=O(c.scopeRef.current,!0);M(f);return}c=c.parent}}})}}}},[e,t])}function M(e){e.dispatchEvent(new CustomEvent(R,{bubbles:!0,cancelable:!0}))&&T(e)}function h(e,t,r){let u=t!=null&&t.tabbable?d.isTabbable:d.isFocusable,n=(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null,i=d.getOwnerDocument(n),a=d.createShadowTreeWalker(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var E;return!(t==null||(E=t.from)===null||E===void 0)&&E.contains(o)?NodeFilter.FILTER_REJECT:u(o)&&K.isElementVisible(o)&&(!r||N(o,r))&&(!(t!=null&&t.accept)||t.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class C{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,r,u){let n=this.fastMap.get(r??null);if(!n)return;let i=new x({scopeRef:t});n.addChild(i),i.parent=n,this.fastMap.set(t,i),u&&(i.nodeToRestore=u)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let r=this.fastMap.get(t);if(!r)return;let u=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&N(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let n=r.children;u&&(u.removeChild(r),n.size>0&&n.forEach(i=>u&&u.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let r of t.children)yield*this.traverse(r)}clone(){var t;let r=new C;var u;for(let n of this.traverse())r.addTreeNode(n.scopeRef,(u=(t=n.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&u!==void 0?u:null,n.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new x({scopeRef:null}),this.fastMap.set(null,this.root)}}class x{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let m=new C;exports.FocusScope=q;exports.focusScopeTree=m;exports.getFocusableTreeWalker=h;exports.isElementInChildOfActiveScope=W;
|
|
2
|
-
//# sourceMappingURL=FocusScope.cjs.js.map
|