@primer/react 38.0.0-rc.195178541 → 38.0.0-rc.2
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/CHANGELOG.md +193 -2
- package/dist/browser.esm.js +3 -3
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +3 -3
- package/dist/browser.umd.js.map +1 -1
- package/dist/components.css +1311 -350
- package/generated/components.json +560 -766
- package/lib/ActionList/ActionList-167cf6c7.css +2 -0
- package/lib/ActionList/ActionList-167cf6c7.css.map +1 -0
- package/lib/ActionList/ActionList.module.css.js +2 -2
- package/lib/ActionList/ActionListContainerContext.d.ts +1 -1
- package/lib/ActionList/ActionListContainerContext.d.ts.map +1 -1
- package/lib/ActionList/Description.d.ts.map +1 -1
- package/lib/ActionList/Description.js +1 -2
- package/lib/ActionList/Divider.d.ts.map +1 -1
- package/lib/ActionList/Divider.js +1 -2
- package/lib/ActionList/Group.d.ts.map +1 -1
- package/lib/ActionList/Group.js +1 -6
- package/lib/ActionList/Item.d.ts.map +1 -1
- package/lib/ActionList/Item.js +6 -3
- package/lib/ActionList/LinkItem.d.ts +1 -1
- package/lib/ActionList/LinkItem.d.ts.map +1 -1
- package/lib/ActionList/LinkItem.js +3 -2
- package/lib/ActionList/List.d.ts.map +1 -1
- package/lib/ActionList/List.js +3 -5
- package/lib/ActionList/Selection.js +2 -1
- package/lib/ActionList/Visuals.d.ts.map +1 -1
- package/lib/ActionList/Visuals.js +0 -7
- package/lib/ActionList/shared.d.ts +2 -1
- package/lib/ActionList/shared.d.ts.map +1 -1
- package/lib/Autocomplete/AutocompleteMenu.js +7 -7
- package/lib/Avatar/Avatar.d.ts.map +1 -1
- package/lib/Avatar/Avatar.js +39 -41
- package/lib/AvatarStack/AvatarStack-802bdd7c.css +2 -0
- package/lib/AvatarStack/AvatarStack-802bdd7c.css.map +1 -0
- package/lib/AvatarStack/AvatarStack.d.ts +4 -3
- package/lib/AvatarStack/AvatarStack.d.ts.map +1 -1
- package/lib/AvatarStack/AvatarStack.js +10 -6
- package/lib/AvatarStack/AvatarStack.module.css.js +1 -1
- package/lib/Banner/Banner-6396546f.css +2 -0
- package/lib/Banner/Banner-6396546f.css.map +1 -0
- package/lib/Banner/Banner.d.ts.map +1 -1
- package/lib/Banner/Banner.js +3 -1
- package/lib/Banner/Banner.module.css.js +2 -2
- package/lib/{BaseStyles-7880c337.css → BaseStyles-79fd37c4.css} +2 -2
- package/lib/BaseStyles-79fd37c4.css.map +1 -0
- package/lib/BaseStyles.module.css.js +1 -1
- package/lib/Blankslate/{Blankslate-a68ed307.css → Blankslate-2be5efdc.css} +2 -2
- package/lib/Blankslate/Blankslate-2be5efdc.css.map +1 -0
- package/lib/Blankslate/Blankslate.js +38 -40
- package/lib/Blankslate/Blankslate.module.css.js +1 -1
- package/lib/BranchName/BranchName.d.ts +6 -3
- package/lib/BranchName/BranchName.d.ts.map +1 -1
- package/lib/BranchName/BranchName.js +1 -3
- package/lib/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/lib/Breadcrumbs/Breadcrumbs.js +5 -5
- package/lib/Button/{ButtonBase-ec78dde7.css → ButtonBase-0a7871f4.css} +2 -2
- package/lib/Button/{ButtonBase-ec78dde7.css.map → ButtonBase-0a7871f4.css.map} +1 -1
- package/lib/Button/ButtonBase.js +2 -2
- package/lib/Button/ButtonBase.module.css.js +1 -1
- package/lib/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/lib/ButtonGroup/ButtonGroup.js +24 -61
- package/lib/Checkbox/Checkbox.js +187 -56
- package/lib/CircleBadge/CircleBadge.d.ts +4 -0
- package/lib/CircleBadge/CircleBadge.d.ts.map +1 -1
- package/lib/CircleBadge/CircleBadge.js +4 -0
- package/lib/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
- package/lib/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/lib/ConfirmationDialog/ConfirmationDialog.js +6 -2
- package/lib/CounterLabel/CounterLabel.d.ts.map +1 -1
- package/lib/CounterLabel/CounterLabel.js +43 -87
- package/lib/DataTable/Pagination-b6f8418c.css +2 -0
- package/lib/DataTable/Pagination-b6f8418c.css.map +1 -0
- package/lib/DataTable/Pagination.d.ts.map +1 -1
- package/lib/DataTable/Pagination.js +81 -88
- package/lib/DataTable/Pagination.module.css.js +7 -0
- package/lib/DataTable/Table.d.ts +1 -1
- package/lib/DataTable/Table.d.ts.map +1 -1
- package/lib/DataTable/Table.js +18 -26
- package/lib/DataTable/storyHelpers.d.ts +1 -1
- package/lib/DataTable/storyHelpers.d.ts.map +1 -1
- package/lib/DataTable/useTable.js +63 -82
- package/lib/Details/Details.d.ts +2 -3
- package/lib/Details/Details.d.ts.map +1 -1
- package/lib/Details/Details.js +33 -82
- package/lib/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/lib/FeatureFlags/DefaultFeatureFlags.js +2 -3
- package/lib/FeatureFlags/FeatureFlags.js +10 -12
- package/lib/FilteredActionList/FilteredActionList-96b126d7.css +2 -0
- package/lib/FilteredActionList/FilteredActionList-96b126d7.css.map +1 -0
- package/lib/FilteredActionList/{FilteredActionListWithModernActionList.d.ts → FilteredActionList.d.ts} +9 -4
- package/lib/FilteredActionList/FilteredActionList.d.ts.map +1 -0
- package/lib/FilteredActionList/{FilteredActionListWithModernActionList.js → FilteredActionList.js} +156 -42
- package/lib/FilteredActionList/FilteredActionList.module.css.js +2 -2
- package/lib/FilteredActionList/FilteredActionListLoaders.js +1 -1
- package/lib/FilteredActionList/index.d.ts +3 -2
- package/lib/FilteredActionList/index.d.ts.map +1 -1
- package/lib/FilteredActionList/types.d.ts +159 -0
- package/lib/FilteredActionList/types.d.ts.map +1 -0
- package/lib/FilteredActionList/useAnnouncements.d.ts +5 -2
- package/lib/FilteredActionList/useAnnouncements.d.ts.map +1 -1
- package/lib/FilteredActionList/useAnnouncements.js +112 -65
- package/lib/FormControl/FormControl.d.ts.map +1 -1
- package/lib/FormControl/FormControl.js +3 -12
- package/lib/Header/Header.d.ts.map +1 -1
- package/lib/Header/Header.js +64 -170
- package/lib/InlineMessage/InlineMessage.d.ts +1 -1
- package/lib/InlineMessage/InlineMessage.d.ts.map +1 -1
- package/lib/InlineMessage/InlineMessage.js +31 -69
- package/lib/Label/Label.d.ts.map +1 -1
- package/lib/Label/Label.js +10 -8
- package/lib/LabelGroup/LabelGroup.d.ts +1 -2
- package/lib/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/lib/LabelGroup/LabelGroup.js +13 -16
- package/lib/NavList/NavList.js +219 -53
- package/lib/Overlay/Overlay-40e80d0e.css +2 -0
- package/lib/Overlay/Overlay-40e80d0e.css.map +1 -0
- package/lib/Overlay/Overlay.module.css.js +1 -1
- package/lib/PageHeader/PageHeader.d.ts.map +1 -1
- package/lib/PageHeader/PageHeader.js +21 -30
- package/lib/PageLayout/PageLayout.d.ts.map +1 -1
- package/lib/PageLayout/PageLayout.js +466 -476
- package/lib/Pagehead/Pagehead.d.ts +1 -1
- package/lib/Pagehead/Pagehead.d.ts.map +1 -1
- package/lib/Pagehead/Pagehead.js +2 -11
- package/lib/PointerBox/PointerBox.d.ts +9 -1
- package/lib/PointerBox/PointerBox.d.ts.map +1 -1
- package/lib/PointerBox/PointerBox.js +5 -1
- package/lib/Popover/Popover-b609f443.css +2 -0
- package/lib/Popover/Popover-b609f443.css.map +1 -0
- package/lib/Popover/Popover.d.ts +5 -0
- package/lib/Popover/Popover.d.ts.map +1 -1
- package/lib/Popover/Popover.js +40 -21
- package/lib/Popover/Popover.module.css.js +1 -1
- package/lib/Portal/Portal.d.ts.map +1 -1
- package/lib/Portal/Portal.js +1 -0
- package/lib/ProgressBar/ProgressBar-36f689cb.css +2 -0
- package/lib/ProgressBar/ProgressBar-36f689cb.css.map +1 -0
- package/lib/ProgressBar/ProgressBar.d.ts +3 -4
- package/lib/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/lib/ProgressBar/ProgressBar.js +53 -49
- package/lib/ProgressBar/ProgressBar.module.css.js +1 -1
- package/lib/ProgressBar/index.d.ts +2 -2
- package/lib/ProgressBar/index.d.ts.map +1 -1
- package/lib/Radio/{Radio-b2a92b7d.css → Radio-df9a5c02.css} +2 -2
- package/lib/Radio/{Radio-b2a92b7d.css.map → Radio-df9a5c02.css.map} +1 -1
- package/lib/Radio/Radio.d.ts.map +1 -1
- package/lib/Radio/Radio.js +40 -91
- package/lib/Radio/Radio.module.css.js +1 -1
- package/lib/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/lib/SegmentedControl/SegmentedControl.js +23 -25
- package/lib/SegmentedControl/SegmentedControlButton.d.ts.map +1 -1
- package/lib/SegmentedControl/SegmentedControlButton.js +70 -72
- package/lib/SegmentedControl/SegmentedControlIconButton.d.ts.map +1 -1
- package/lib/SegmentedControl/SegmentedControlIconButton.js +110 -112
- package/lib/Select/Select.d.ts +1 -1
- package/lib/Select/Select.d.ts.map +1 -1
- package/lib/Select/Select.js +79 -83
- package/lib/SelectPanel/SelectPanel-e11ce210.css +2 -0
- package/lib/SelectPanel/SelectPanel-e11ce210.css.map +1 -0
- package/lib/SelectPanel/SelectPanel.d.ts +8 -4
- package/lib/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/lib/SelectPanel/SelectPanel.js +66 -29
- package/lib/SelectPanel/SelectPanel.module.css.js +2 -2
- package/lib/SelectPanel/SelectPanelMessage.d.ts +13 -0
- package/lib/SelectPanel/SelectPanelMessage.d.ts.map +1 -1
- package/lib/SelectPanel/SelectPanelMessage.js +10 -4
- package/lib/SelectPanel/index.d.ts +1 -0
- package/lib/SelectPanel/index.d.ts.map +1 -1
- package/lib/SideNav.d.ts +2 -3
- package/lib/SideNav.d.ts.map +1 -1
- package/lib/SideNav.js +4 -11
- package/lib/Skeleton/SkeletonBox.d.ts +2 -2
- package/lib/Skeleton/SkeletonBox.d.ts.map +1 -1
- package/lib/Skeleton/SkeletonBox.js +25 -24
- package/lib/SkeletonAvatar/SkeletonAvatar-e00fff32.css +2 -0
- package/lib/SkeletonAvatar/SkeletonAvatar-e00fff32.css.map +1 -0
- package/lib/SkeletonAvatar/SkeletonAvatar.d.ts +12 -0
- package/lib/SkeletonAvatar/SkeletonAvatar.d.ts.map +1 -0
- package/lib/{experimental/Skeleton → SkeletonAvatar}/SkeletonAvatar.js +5 -5
- package/lib/{experimental/Skeleton → SkeletonAvatar}/SkeletonAvatar.module.css.js +1 -1
- package/lib/SkeletonAvatar/index.d.ts +3 -0
- package/lib/SkeletonAvatar/index.d.ts.map +1 -0
- package/lib/SkeletonText/SkeletonText-5cf908c1.css +2 -0
- package/lib/SkeletonText/SkeletonText-5cf908c1.css.map +1 -0
- package/lib/{experimental/Skeleton → SkeletonText}/SkeletonText.d.ts +5 -4
- package/lib/SkeletonText/SkeletonText.d.ts.map +1 -0
- package/lib/SkeletonText/SkeletonText.js +142 -0
- package/lib/SkeletonText/SkeletonText.module.css.js +7 -0
- package/lib/SkeletonText/index.d.ts +3 -0
- package/lib/SkeletonText/index.d.ts.map +1 -0
- package/lib/Spinner/Spinner.d.ts +1 -1
- package/lib/Spinner/Spinner.d.ts.map +1 -1
- package/lib/Spinner/Spinner.js +13 -51
- package/lib/SplitPageLayout/SplitPageLayout.d.ts +1 -2
- package/lib/SplitPageLayout/SplitPageLayout.d.ts.map +1 -1
- package/{lib-esm/Stack/Stack-83ac2229.css → lib/Stack/Stack-9e7b935d.css} +2 -2
- package/lib/Stack/Stack-9e7b935d.css.map +1 -0
- package/lib/Stack/Stack.d.ts +5 -0
- package/lib/Stack/Stack.d.ts.map +1 -1
- package/lib/Stack/Stack.js +125 -112
- package/lib/Stack/Stack.module.css.js +1 -1
- package/lib/StateLabel/StateLabel-50420ff5.css +2 -0
- package/lib/StateLabel/StateLabel-50420ff5.css.map +1 -0
- package/lib/StateLabel/StateLabel.d.ts +7 -7
- package/lib/StateLabel/StateLabel.d.ts.map +1 -1
- package/lib/StateLabel/StateLabel.js +56 -130
- package/lib/StateLabel/StateLabel.module.css.js +7 -0
- package/lib/SubNav/SubNav.d.ts +8 -16
- package/lib/SubNav/SubNav.d.ts.map +1 -1
- package/lib/SubNav/SubNav.js +74 -215
- package/lib/TabNav/TabNav-83c6145e.css +2 -0
- package/lib/TabNav/TabNav-83c6145e.css.map +1 -0
- package/lib/TabNav/TabNav.module.css.js +1 -1
- package/lib/Text/Text.d.ts.map +1 -1
- package/lib/Text/Text.js +2 -3
- package/lib/TextInput/TextInput.d.ts +1 -1
- package/lib/TextInput/TextInput.d.ts.map +1 -1
- package/lib/TextInputWithTokens/TextInputWithTokens.d.ts +6 -0
- package/lib/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
- package/lib/TextInputWithTokens/TextInputWithTokens.js +343 -331
- package/lib/Textarea/Textarea.d.ts +24 -0
- package/lib/Textarea/Textarea.d.ts.map +1 -1
- package/lib/Textarea/Textarea.js +72 -44
- package/lib/Timeline/Timeline.d.ts +1 -1
- package/lib/Timeline/Timeline.d.ts.map +1 -1
- package/lib/Timeline/Timeline.js +92 -264
- package/lib/ToggleSwitch/ToggleSwitch-4b23d166.css +2 -0
- package/lib/ToggleSwitch/ToggleSwitch-4b23d166.css.map +1 -0
- package/lib/ToggleSwitch/ToggleSwitch.d.ts +14 -5
- package/lib/ToggleSwitch/ToggleSwitch.d.ts.map +1 -1
- package/lib/ToggleSwitch/ToggleSwitch.js +263 -275
- package/lib/ToggleSwitch/ToggleSwitch.module.css.js +7 -0
- package/lib/ToggleSwitch/ToggleSwitchStoryWrapper.d.ts.map +1 -1
- package/lib/Token/IssueLabelToken-0dbbbcdf.css +2 -0
- package/lib/Token/IssueLabelToken-0dbbbcdf.css.map +1 -0
- package/lib/Token/IssueLabelToken.d.ts.map +1 -1
- package/lib/Token/IssueLabelToken.js +7 -65
- package/lib/Token/IssueLabelToken.module.css.js +1 -1
- package/lib/Token/Token.d.ts.map +1 -1
- package/lib/Token/Token.js +120 -128
- package/lib/Token/TokenBase.js +78 -83
- package/lib/Token/_RemoveTokenButton.js +106 -26
- package/lib/Token/index.d.ts +0 -1
- package/lib/Token/index.d.ts.map +1 -1
- package/lib/Tooltip/Tooltip.js +15 -17
- package/lib/TooltipV2/Tooltip-5a80d7b2.css +2 -0
- package/lib/TooltipV2/Tooltip-5a80d7b2.css.map +1 -0
- package/lib/TooltipV2/Tooltip.d.ts.map +1 -1
- package/lib/TooltipV2/Tooltip.js +3 -3
- package/lib/TooltipV2/Tooltip.module.css.js +1 -1
- package/lib/TreeView/TreeView.js +20 -22
- package/lib/TreeView/shared.js +2 -2
- package/lib/VisuallyHidden/VisuallyHidden.d.ts +2 -3
- package/lib/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/lib/VisuallyHidden/VisuallyHidden.js +17 -51
- package/lib/_VisuallyHidden-5c0a2499.css +2 -0
- package/lib/_VisuallyHidden-5c0a2499.css.map +1 -0
- package/lib/_VisuallyHidden.d.ts +3 -2
- package/lib/_VisuallyHidden.d.ts.map +1 -1
- package/lib/_VisuallyHidden.js +63 -26
- package/lib/_VisuallyHidden.module.css.js +7 -0
- package/lib/deprecated/ActionList/List.d.ts.map +1 -1
- package/lib/deprecated/ActionList/List.js +115 -138
- package/lib/deprecated/ActionMenu.js +19 -21
- package/lib/deprecated/UnderlineNav/UnderlineNav.d.ts +2 -3
- package/lib/deprecated/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/lib/deprecated/UnderlineNav/UnderlineNav.js +2 -3
- package/lib/deprecated/index.d.ts +2 -0
- package/lib/deprecated/index.d.ts.map +1 -1
- package/lib/deprecated/index.js +2 -0
- package/lib/experimental/IssueLabel/IssueLabel-6581d1bd.css +2 -0
- package/lib/experimental/IssueLabel/IssueLabel-6581d1bd.css.map +1 -0
- package/lib/experimental/IssueLabel/IssueLabel.d.ts +28 -13
- package/lib/experimental/IssueLabel/IssueLabel.d.ts.map +1 -1
- package/lib/experimental/IssueLabel/IssueLabel.js +129 -135
- package/lib/experimental/IssueLabel/IssueLabel.module.css.js +1 -1
- package/lib/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
- package/lib/experimental/UnderlinePanels/UnderlinePanels.js +30 -40
- package/lib/experimental/index.d.ts +6 -1
- package/lib/experimental/index.d.ts.map +1 -1
- package/lib/experimental/index.js +4 -4
- package/lib/hooks/useMenuKeyboardNavigation.js +23 -43
- package/lib/hooks/useMnemonics.js +37 -77
- package/lib/hooks/useOpenAndCloseFocus.js +7 -14
- package/lib/hooks/useOverflow.js +7 -11
- package/lib/hooks/useScrollFlash.js +25 -14
- package/lib/index.d.ts +6 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -16
- package/lib/internal/components/BoxWithFallback.js +40 -35
- package/lib/internal/components/ButtonReset-904f2483.css +2 -0
- package/lib/internal/components/ButtonReset-904f2483.css.map +1 -0
- package/lib/internal/components/ButtonReset.d.ts +1 -2
- package/lib/internal/components/ButtonReset.d.ts.map +1 -1
- package/lib/internal/components/ButtonReset.js +49 -13
- package/lib/internal/components/ButtonReset.module.css.js +7 -0
- package/lib/internal/components/Caret-e686f04c.css +2 -0
- package/lib/internal/components/Caret-e686f04c.css.map +1 -0
- package/{lib-esm → lib/internal/components}/Caret.d.ts +1 -3
- package/lib/internal/components/Caret.d.ts.map +1 -0
- package/lib/{Caret.js → internal/components/Caret.js} +14 -48
- package/lib/internal/components/Caret.module.css.js +7 -0
- package/lib/internal/components/LiveRegion.js +8 -10
- package/lib/internal/components/{TextInputWrapper-ca608f70.css → TextInputWrapper-889df5d3.css} +2 -2
- package/{lib-esm/internal/components/TextInputWrapper-ca608f70.css.map → lib/internal/components/TextInputWrapper-889df5d3.css.map} +1 -1
- package/lib/internal/components/TextInputWrapper.module.css.js +1 -1
- package/lib/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
- package/lib/internal/components/UnderlineTabbedInterface.js +60 -108
- package/lib/internal/utils/getGlobalFocusStyles.js +1 -1
- package/lib/live-region/Announce.js +2 -2
- package/lib/test-helpers.js +3 -0
- package/lib/utils/form-story-helpers.d.ts +1 -1
- package/lib/utils/form-story-helpers.d.ts.map +1 -1
- package/lib-esm/ActionList/ActionList-167cf6c7.css +2 -0
- package/lib-esm/ActionList/ActionList-167cf6c7.css.map +1 -0
- package/lib-esm/ActionList/ActionList.module.css.js +2 -2
- package/lib-esm/ActionList/ActionListContainerContext.d.ts +1 -1
- package/lib-esm/ActionList/Description.js +1 -2
- package/lib-esm/ActionList/Divider.js +1 -2
- package/lib-esm/ActionList/Group.js +1 -6
- package/lib-esm/ActionList/Item.js +6 -3
- package/lib-esm/ActionList/LinkItem.d.ts +1 -1
- package/lib-esm/ActionList/LinkItem.js +3 -2
- package/lib-esm/ActionList/List.js +3 -5
- package/lib-esm/ActionList/Selection.js +2 -1
- package/lib-esm/ActionList/Visuals.js +0 -7
- package/lib-esm/ActionList/shared.d.ts +2 -1
- package/lib-esm/Autocomplete/AutocompleteMenu.js +1 -1
- package/lib-esm/Avatar/Avatar.js +39 -41
- package/lib-esm/AvatarStack/AvatarStack-802bdd7c.css +2 -0
- package/lib-esm/AvatarStack/AvatarStack-802bdd7c.css.map +1 -0
- package/lib-esm/AvatarStack/AvatarStack.d.ts +4 -3
- package/lib-esm/AvatarStack/AvatarStack.js +10 -6
- package/lib-esm/AvatarStack/AvatarStack.module.css.js +1 -1
- package/lib-esm/Banner/Banner-6396546f.css +2 -0
- package/lib-esm/Banner/Banner-6396546f.css.map +1 -0
- package/lib-esm/Banner/Banner.js +3 -1
- package/lib-esm/Banner/Banner.module.css.js +2 -2
- package/lib-esm/{BaseStyles-7880c337.css → BaseStyles-79fd37c4.css} +2 -2
- package/lib-esm/BaseStyles-79fd37c4.css.map +1 -0
- package/lib-esm/BaseStyles.module.css.js +1 -1
- package/lib-esm/Blankslate/{Blankslate-a68ed307.css → Blankslate-2be5efdc.css} +2 -2
- package/lib-esm/Blankslate/Blankslate-2be5efdc.css.map +1 -0
- package/lib-esm/Blankslate/Blankslate.js +38 -40
- package/lib-esm/Blankslate/Blankslate.module.css.js +1 -1
- package/lib-esm/BranchName/BranchName.d.ts +6 -3
- package/lib-esm/BranchName/BranchName.js +1 -3
- package/lib-esm/Breadcrumbs/Breadcrumbs.js +5 -5
- package/lib-esm/Button/{ButtonBase-ec78dde7.css → ButtonBase-0a7871f4.css} +2 -2
- package/lib-esm/Button/{ButtonBase-ec78dde7.css.map → ButtonBase-0a7871f4.css.map} +1 -1
- package/lib-esm/Button/ButtonBase.js +2 -2
- package/lib-esm/Button/ButtonBase.module.css.js +1 -1
- package/lib-esm/ButtonGroup/ButtonGroup.js +24 -61
- package/lib-esm/Checkbox/Checkbox.js +187 -56
- package/lib-esm/CircleBadge/CircleBadge.d.ts +4 -0
- package/lib-esm/CircleBadge/CircleBadge.js +4 -0
- package/lib-esm/ConfirmationDialog/ConfirmationDialog.d.ts +8 -0
- package/lib-esm/ConfirmationDialog/ConfirmationDialog.js +6 -2
- package/lib-esm/CounterLabel/CounterLabel.js +43 -87
- package/lib-esm/DataTable/Pagination-b6f8418c.css +2 -0
- package/lib-esm/DataTable/Pagination-b6f8418c.css.map +1 -0
- package/lib-esm/DataTable/Pagination.js +81 -84
- package/lib-esm/DataTable/Pagination.module.css.js +5 -0
- package/lib-esm/DataTable/Table.d.ts +1 -1
- package/lib-esm/DataTable/Table.js +18 -26
- package/lib-esm/DataTable/storyHelpers.d.ts +1 -1
- package/lib-esm/DataTable/useTable.js +64 -83
- package/lib-esm/Details/Details.d.ts +2 -3
- package/lib-esm/Details/Details.js +33 -82
- package/lib-esm/FeatureFlags/DefaultFeatureFlags.js +2 -3
- package/lib-esm/FeatureFlags/FeatureFlags.js +10 -12
- package/lib-esm/FilteredActionList/FilteredActionList-96b126d7.css +2 -0
- package/lib-esm/FilteredActionList/FilteredActionList-96b126d7.css.map +1 -0
- package/lib-esm/FilteredActionList/{FilteredActionListWithModernActionList.d.ts → FilteredActionList.d.ts} +9 -4
- package/lib-esm/FilteredActionList/{FilteredActionListWithModernActionList.js → FilteredActionList.js} +156 -42
- package/lib-esm/FilteredActionList/FilteredActionList.module.css.js +2 -2
- package/lib-esm/FilteredActionList/FilteredActionListLoaders.js +1 -1
- package/lib-esm/FilteredActionList/index.d.ts +3 -2
- package/lib-esm/FilteredActionList/types.d.ts +159 -0
- package/lib-esm/FilteredActionList/useAnnouncements.d.ts +5 -2
- package/lib-esm/FilteredActionList/useAnnouncements.js +112 -65
- package/lib-esm/FormControl/FormControl.js +3 -12
- package/lib-esm/Header/Header.js +64 -170
- package/lib-esm/InlineMessage/InlineMessage.d.ts +1 -1
- package/lib-esm/InlineMessage/InlineMessage.js +31 -69
- package/lib-esm/Label/Label.js +10 -8
- package/lib-esm/LabelGroup/LabelGroup.d.ts +1 -2
- package/lib-esm/LabelGroup/LabelGroup.js +13 -16
- package/lib-esm/NavList/NavList.js +219 -53
- package/lib-esm/Overlay/Overlay-40e80d0e.css +2 -0
- package/lib-esm/Overlay/Overlay-40e80d0e.css.map +1 -0
- package/lib-esm/Overlay/Overlay.module.css.js +1 -1
- package/lib-esm/PageHeader/PageHeader.js +21 -30
- package/lib-esm/PageLayout/PageLayout.js +466 -476
- package/lib-esm/Pagehead/Pagehead.d.ts +1 -1
- package/lib-esm/Pagehead/Pagehead.js +2 -11
- package/lib-esm/PointerBox/PointerBox.d.ts +9 -1
- package/lib-esm/PointerBox/PointerBox.js +5 -1
- package/lib-esm/Popover/Popover-b609f443.css +2 -0
- package/lib-esm/Popover/Popover-b609f443.css.map +1 -0
- package/lib-esm/Popover/Popover.d.ts +5 -0
- package/lib-esm/Popover/Popover.js +40 -21
- package/lib-esm/Popover/Popover.module.css.js +1 -1
- package/lib-esm/Portal/Portal.js +1 -0
- package/lib-esm/ProgressBar/ProgressBar-36f689cb.css +2 -0
- package/lib-esm/ProgressBar/ProgressBar-36f689cb.css.map +1 -0
- package/lib-esm/ProgressBar/ProgressBar.d.ts +3 -4
- package/lib-esm/ProgressBar/ProgressBar.js +53 -49
- package/lib-esm/ProgressBar/ProgressBar.module.css.js +1 -1
- package/lib-esm/ProgressBar/index.d.ts +2 -2
- package/lib-esm/Radio/{Radio-b2a92b7d.css → Radio-df9a5c02.css} +2 -2
- package/lib-esm/Radio/{Radio-b2a92b7d.css.map → Radio-df9a5c02.css.map} +1 -1
- package/lib-esm/Radio/Radio.js +40 -91
- package/lib-esm/Radio/Radio.module.css.js +1 -1
- package/lib-esm/SegmentedControl/SegmentedControl.js +23 -25
- package/lib-esm/SegmentedControl/SegmentedControlButton.js +70 -72
- package/lib-esm/SegmentedControl/SegmentedControlIconButton.js +110 -112
- package/lib-esm/Select/Select.d.ts +1 -1
- package/lib-esm/Select/Select.js +79 -83
- package/lib-esm/SelectPanel/SelectPanel-e11ce210.css +2 -0
- package/lib-esm/SelectPanel/SelectPanel-e11ce210.css.map +1 -0
- package/lib-esm/SelectPanel/SelectPanel.d.ts +8 -4
- package/lib-esm/SelectPanel/SelectPanel.js +64 -27
- package/lib-esm/SelectPanel/SelectPanel.module.css.js +2 -2
- package/lib-esm/SelectPanel/SelectPanelMessage.d.ts +13 -0
- package/lib-esm/SelectPanel/SelectPanelMessage.js +10 -4
- package/lib-esm/SelectPanel/index.d.ts +1 -0
- package/lib-esm/SideNav.d.ts +2 -3
- package/lib-esm/SideNav.js +4 -11
- package/lib-esm/Skeleton/SkeletonBox.d.ts +2 -2
- package/lib-esm/Skeleton/SkeletonBox.js +25 -24
- package/lib-esm/SkeletonAvatar/SkeletonAvatar-e00fff32.css +2 -0
- package/lib-esm/SkeletonAvatar/SkeletonAvatar-e00fff32.css.map +1 -0
- package/lib-esm/SkeletonAvatar/SkeletonAvatar.d.ts +12 -0
- package/lib-esm/{experimental/Skeleton → SkeletonAvatar}/SkeletonAvatar.js +5 -5
- package/lib-esm/SkeletonAvatar/SkeletonAvatar.module.css.js +5 -0
- package/lib-esm/SkeletonAvatar/index.d.ts +3 -0
- package/lib-esm/SkeletonText/SkeletonText-5cf908c1.css +2 -0
- package/lib-esm/SkeletonText/SkeletonText-5cf908c1.css.map +1 -0
- package/lib-esm/{experimental/Skeleton → SkeletonText}/SkeletonText.d.ts +5 -4
- package/lib-esm/SkeletonText/SkeletonText.js +140 -0
- package/lib-esm/SkeletonText/SkeletonText.module.css.js +5 -0
- package/lib-esm/SkeletonText/index.d.ts +3 -0
- package/lib-esm/Spinner/Spinner.d.ts +1 -1
- package/lib-esm/Spinner/Spinner.js +13 -47
- package/lib-esm/SplitPageLayout/SplitPageLayout.d.ts +1 -2
- package/{lib/Stack/Stack-83ac2229.css → lib-esm/Stack/Stack-9e7b935d.css} +2 -2
- package/lib-esm/Stack/Stack-9e7b935d.css.map +1 -0
- package/lib-esm/Stack/Stack.d.ts +5 -0
- package/lib-esm/Stack/Stack.js +125 -112
- package/lib-esm/Stack/Stack.module.css.js +1 -1
- package/lib-esm/StateLabel/StateLabel-50420ff5.css +2 -0
- package/lib-esm/StateLabel/StateLabel-50420ff5.css.map +1 -0
- package/lib-esm/StateLabel/StateLabel.d.ts +7 -7
- package/lib-esm/StateLabel/StateLabel.js +57 -127
- package/lib-esm/StateLabel/StateLabel.module.css.js +5 -0
- package/lib-esm/SubNav/SubNav.d.ts +8 -16
- package/lib-esm/SubNav/SubNav.js +74 -215
- package/lib-esm/TabNav/TabNav-83c6145e.css +2 -0
- package/lib-esm/TabNav/TabNav-83c6145e.css.map +1 -0
- package/lib-esm/TabNav/TabNav.module.css.js +1 -1
- package/lib-esm/Text/Text.js +2 -3
- package/lib-esm/TextInput/TextInput.d.ts +1 -1
- package/lib-esm/TextInputWithTokens/TextInputWithTokens.d.ts +6 -0
- package/lib-esm/TextInputWithTokens/TextInputWithTokens.js +343 -331
- package/lib-esm/Textarea/Textarea.d.ts +24 -0
- package/lib-esm/Textarea/Textarea.js +72 -44
- package/lib-esm/Timeline/Timeline.d.ts +1 -1
- package/lib-esm/Timeline/Timeline.js +92 -264
- package/lib-esm/ToggleSwitch/ToggleSwitch-4b23d166.css +2 -0
- package/lib-esm/ToggleSwitch/ToggleSwitch-4b23d166.css.map +1 -0
- package/lib-esm/ToggleSwitch/ToggleSwitch.d.ts +14 -5
- package/lib-esm/ToggleSwitch/ToggleSwitch.js +263 -274
- package/lib-esm/ToggleSwitch/ToggleSwitch.module.css.js +5 -0
- package/lib-esm/Token/IssueLabelToken-0dbbbcdf.css +2 -0
- package/lib-esm/Token/IssueLabelToken-0dbbbcdf.css.map +1 -0
- package/lib-esm/Token/IssueLabelToken.js +7 -65
- package/lib-esm/Token/IssueLabelToken.module.css.js +1 -1
- package/lib-esm/Token/Token.js +120 -128
- package/lib-esm/Token/TokenBase.js +78 -83
- package/lib-esm/Token/_RemoveTokenButton.js +106 -26
- package/lib-esm/Token/index.d.ts +0 -1
- package/lib-esm/Tooltip/Tooltip.js +15 -17
- package/lib-esm/TooltipV2/Tooltip-5a80d7b2.css +2 -0
- package/lib-esm/TooltipV2/Tooltip-5a80d7b2.css.map +1 -0
- package/lib-esm/TooltipV2/Tooltip.js +3 -3
- package/lib-esm/TooltipV2/Tooltip.module.css.js +1 -1
- package/lib-esm/TreeView/TreeView.js +20 -22
- package/lib-esm/TreeView/shared.js +2 -2
- package/lib-esm/VisuallyHidden/VisuallyHidden.d.ts +2 -3
- package/lib-esm/VisuallyHidden/VisuallyHidden.js +17 -51
- package/lib-esm/_VisuallyHidden-5c0a2499.css +2 -0
- package/lib-esm/_VisuallyHidden-5c0a2499.css.map +1 -0
- package/lib-esm/_VisuallyHidden.d.ts +3 -2
- package/lib-esm/_VisuallyHidden.js +63 -22
- package/lib-esm/_VisuallyHidden.module.css.js +5 -0
- package/lib-esm/deprecated/ActionList/List.js +116 -138
- package/lib-esm/deprecated/ActionMenu.js +19 -21
- package/lib-esm/deprecated/UnderlineNav/UnderlineNav.d.ts +2 -3
- package/lib-esm/deprecated/UnderlineNav/UnderlineNav.js +2 -3
- package/lib-esm/deprecated/index.d.ts +2 -0
- package/lib-esm/deprecated/index.js +1 -0
- package/lib-esm/experimental/IssueLabel/IssueLabel-6581d1bd.css +2 -0
- package/lib-esm/experimental/IssueLabel/IssueLabel-6581d1bd.css.map +1 -0
- package/lib-esm/experimental/IssueLabel/IssueLabel.d.ts +28 -13
- package/lib-esm/experimental/IssueLabel/IssueLabel.js +129 -135
- package/lib-esm/experimental/IssueLabel/IssueLabel.module.css.js +1 -1
- package/lib-esm/experimental/UnderlinePanels/UnderlinePanels.js +30 -40
- package/lib-esm/experimental/index.d.ts +6 -1
- package/lib-esm/experimental/index.js +3 -3
- package/lib-esm/hooks/useMenuKeyboardNavigation.js +23 -43
- package/lib-esm/hooks/useMnemonics.js +37 -77
- package/lib-esm/hooks/useOpenAndCloseFocus.js +7 -14
- package/lib-esm/hooks/useOverflow.js +7 -11
- package/lib-esm/hooks/useScrollFlash.js +25 -14
- package/lib-esm/index.d.ts +6 -9
- package/lib-esm/index.js +1 -4
- package/lib-esm/internal/components/BoxWithFallback.js +40 -35
- package/lib-esm/internal/components/ButtonReset-904f2483.css +2 -0
- package/lib-esm/internal/components/ButtonReset-904f2483.css.map +1 -0
- package/lib-esm/internal/components/ButtonReset.d.ts +1 -2
- package/lib-esm/internal/components/ButtonReset.js +49 -9
- package/lib-esm/internal/components/ButtonReset.module.css.js +5 -0
- package/lib-esm/internal/components/Caret-e686f04c.css +2 -0
- package/lib-esm/internal/components/Caret-e686f04c.css.map +1 -0
- package/{lib → lib-esm/internal/components}/Caret.d.ts +1 -3
- package/lib-esm/{Caret.js → internal/components/Caret.js} +14 -44
- package/lib-esm/internal/components/Caret.module.css.js +5 -0
- package/lib-esm/internal/components/LiveRegion.js +8 -10
- package/lib-esm/internal/components/{TextInputWrapper-ca608f70.css → TextInputWrapper-889df5d3.css} +2 -2
- package/{lib/internal/components/TextInputWrapper-ca608f70.css.map → lib-esm/internal/components/TextInputWrapper-889df5d3.css.map} +1 -1
- package/lib-esm/internal/components/TextInputWrapper.module.css.js +1 -1
- package/lib-esm/internal/components/UnderlineTabbedInterface.js +60 -108
- package/lib-esm/internal/utils/getGlobalFocusStyles.js +1 -1
- package/lib-esm/live-region/Announce.js +2 -2
- package/lib-esm/test-helpers.js +3 -0
- package/lib-esm/utils/form-story-helpers.d.ts +1 -1
- package/package.json +31 -34
- package/lib/ActionList/ActionList-49cba224.css +0 -2
- package/lib/ActionList/ActionList-49cba224.css.map +0 -1
- package/lib/AvatarPair/AvatarPair-68990abe.css +0 -2
- package/lib/AvatarPair/AvatarPair-68990abe.css.map +0 -1
- package/lib/AvatarPair/AvatarPair.d.ts +0 -8
- package/lib/AvatarPair/AvatarPair.d.ts.map +0 -1
- package/lib/AvatarPair/AvatarPair.js +0 -92
- package/lib/AvatarPair/AvatarPair.module.css.js +0 -7
- package/lib/AvatarPair/index.d.ts +0 -3
- package/lib/AvatarPair/index.d.ts.map +0 -1
- package/lib/AvatarStack/AvatarStack-f0712fca.css +0 -2
- package/lib/AvatarStack/AvatarStack-f0712fca.css.map +0 -1
- package/lib/Banner/Banner-43e2cd6a.css +0 -2
- package/lib/Banner/Banner-43e2cd6a.css.map +0 -1
- package/lib/BaseStyles-7880c337.css.map +0 -1
- package/lib/Blankslate/Blankslate-a68ed307.css.map +0 -1
- package/lib/Caret.d.ts.map +0 -1
- package/lib/CircleOcticon/CircleOcticon.d.ts +0 -13
- package/lib/CircleOcticon/CircleOcticon.d.ts.map +0 -1
- package/lib/CircleOcticon/CircleOcticon.js +0 -96
- package/lib/CircleOcticon/index.d.ts +0 -3
- package/lib/CircleOcticon/index.d.ts.map +0 -1
- package/lib/FilteredActionList/FilteredActionList-e1dde781.css +0 -2
- package/lib/FilteredActionList/FilteredActionList-e1dde781.css.map +0 -1
- package/lib/FilteredActionList/FilteredActionListEntry.d.ts +0 -7
- package/lib/FilteredActionList/FilteredActionListEntry.d.ts.map +0 -1
- package/lib/FilteredActionList/FilteredActionListEntry.js +0 -40
- package/lib/FilteredActionList/FilteredActionListWithDeprecatedActionList.d.ts +0 -23
- package/lib/FilteredActionList/FilteredActionListWithDeprecatedActionList.d.ts.map +0 -1
- package/lib/FilteredActionList/FilteredActionListWithDeprecatedActionList.js +0 -219
- package/lib/FilteredActionList/FilteredActionListWithModernActionList.d.ts.map +0 -1
- package/lib/Overlay/Overlay-aeb12fc3.css +0 -2
- package/lib/Overlay/Overlay-aeb12fc3.css.map +0 -1
- package/lib/Popover/Popover-e16fd997.css +0 -2
- package/lib/Popover/Popover-e16fd997.css.map +0 -1
- package/lib/ProgressBar/ProgressBar-430cdef7.css +0 -2
- package/lib/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
- package/lib/SelectPanel/SelectPanel-bfde365c.css +0 -2
- package/lib/SelectPanel/SelectPanel-bfde365c.css.map +0 -1
- package/lib/SelectPanel/types.d.ts +0 -4
- package/lib/SelectPanel/types.d.ts.map +0 -1
- package/lib/Stack/Stack-83ac2229.css.map +0 -1
- package/lib/TabNav/TabNav-9753d6ed.css +0 -2
- package/lib/TabNav/TabNav-9753d6ed.css.map +0 -1
- package/lib/Token/AvatarToken-ff45cc85.css +0 -2
- package/lib/Token/AvatarToken-ff45cc85.css.map +0 -1
- package/lib/Token/AvatarToken.d.ts +0 -8
- package/lib/Token/AvatarToken.d.ts.map +0 -1
- package/lib/Token/AvatarToken.js +0 -99
- package/lib/Token/AvatarToken.module.css.js +0 -7
- package/lib/Token/IssueLabelToken-99c9b914.css +0 -2
- package/lib/Token/IssueLabelToken-99c9b914.css.map +0 -1
- package/lib/TooltipV2/Tooltip-59734b6f.css +0 -2
- package/lib/TooltipV2/Tooltip-59734b6f.css.map +0 -1
- package/lib/experimental/IssueLabel/IssueLabel-5507fbf3.css +0 -2
- package/lib/experimental/IssueLabel/IssueLabel-5507fbf3.css.map +0 -1
- package/lib/experimental/Skeleton/SkeletonAvatar-e00fff32.css +0 -2
- package/lib/experimental/Skeleton/SkeletonAvatar-e00fff32.css.map +0 -1
- package/lib/experimental/Skeleton/SkeletonAvatar.d.ts +0 -8
- package/lib/experimental/Skeleton/SkeletonAvatar.d.ts.map +0 -1
- package/lib/experimental/Skeleton/SkeletonText-5cf908c1.css +0 -2
- package/lib/experimental/Skeleton/SkeletonText-5cf908c1.css.map +0 -1
- package/lib/experimental/Skeleton/SkeletonText.d.ts.map +0 -1
- package/lib/experimental/Skeleton/SkeletonText.js +0 -149
- package/lib/experimental/Skeleton/SkeletonText.module.css.js +0 -7
- package/lib/experimental/Skeleton/index.d.ts +0 -4
- package/lib/experimental/Skeleton/index.d.ts.map +0 -1
- package/lib/internal/utils/toggleStyledComponent.d.ts +0 -20
- package/lib/internal/utils/toggleStyledComponent.d.ts.map +0 -1
- package/lib/internal/utils/toggleSxComponent.d.ts +0 -15
- package/lib/internal/utils/toggleSxComponent.d.ts.map +0 -1
- package/lib/internal/utils/toggleSxComponent.js +0 -83
- package/lib/node_modules/@github/mini-throttle/dist/index.js +0 -43
- package/lib-esm/ActionList/ActionList-49cba224.css +0 -2
- package/lib-esm/ActionList/ActionList-49cba224.css.map +0 -1
- package/lib-esm/AvatarPair/AvatarPair-68990abe.css +0 -2
- package/lib-esm/AvatarPair/AvatarPair-68990abe.css.map +0 -1
- package/lib-esm/AvatarPair/AvatarPair.d.ts +0 -8
- package/lib-esm/AvatarPair/AvatarPair.js +0 -86
- package/lib-esm/AvatarPair/AvatarPair.module.css.js +0 -5
- package/lib-esm/AvatarPair/index.d.ts +0 -3
- package/lib-esm/AvatarStack/AvatarStack-f0712fca.css +0 -2
- package/lib-esm/AvatarStack/AvatarStack-f0712fca.css.map +0 -1
- package/lib-esm/Banner/Banner-43e2cd6a.css +0 -2
- package/lib-esm/Banner/Banner-43e2cd6a.css.map +0 -1
- package/lib-esm/BaseStyles-7880c337.css.map +0 -1
- package/lib-esm/Blankslate/Blankslate-a68ed307.css.map +0 -1
- package/lib-esm/CircleOcticon/CircleOcticon.d.ts +0 -13
- package/lib-esm/CircleOcticon/CircleOcticon.js +0 -94
- package/lib-esm/CircleOcticon/index.d.ts +0 -3
- package/lib-esm/FilteredActionList/FilteredActionList-e1dde781.css +0 -2
- package/lib-esm/FilteredActionList/FilteredActionList-e1dde781.css.map +0 -1
- package/lib-esm/FilteredActionList/FilteredActionListEntry.d.ts +0 -7
- package/lib-esm/FilteredActionList/FilteredActionListEntry.js +0 -38
- package/lib-esm/FilteredActionList/FilteredActionListWithDeprecatedActionList.d.ts +0 -23
- package/lib-esm/FilteredActionList/FilteredActionListWithDeprecatedActionList.js +0 -213
- package/lib-esm/Overlay/Overlay-aeb12fc3.css +0 -2
- package/lib-esm/Overlay/Overlay-aeb12fc3.css.map +0 -1
- package/lib-esm/Popover/Popover-e16fd997.css +0 -2
- package/lib-esm/Popover/Popover-e16fd997.css.map +0 -1
- package/lib-esm/ProgressBar/ProgressBar-430cdef7.css +0 -2
- package/lib-esm/ProgressBar/ProgressBar-430cdef7.css.map +0 -1
- package/lib-esm/SelectPanel/SelectPanel-bfde365c.css +0 -2
- package/lib-esm/SelectPanel/SelectPanel-bfde365c.css.map +0 -1
- package/lib-esm/SelectPanel/types.d.ts +0 -4
- package/lib-esm/Stack/Stack-83ac2229.css.map +0 -1
- package/lib-esm/TabNav/TabNav-9753d6ed.css +0 -2
- package/lib-esm/TabNav/TabNav-9753d6ed.css.map +0 -1
- package/lib-esm/Token/AvatarToken-ff45cc85.css +0 -2
- package/lib-esm/Token/AvatarToken-ff45cc85.css.map +0 -1
- package/lib-esm/Token/AvatarToken.d.ts +0 -8
- package/lib-esm/Token/AvatarToken.js +0 -97
- package/lib-esm/Token/AvatarToken.module.css.js +0 -5
- package/lib-esm/Token/IssueLabelToken-99c9b914.css +0 -2
- package/lib-esm/Token/IssueLabelToken-99c9b914.css.map +0 -1
- package/lib-esm/TooltipV2/Tooltip-59734b6f.css +0 -2
- package/lib-esm/TooltipV2/Tooltip-59734b6f.css.map +0 -1
- package/lib-esm/experimental/IssueLabel/IssueLabel-5507fbf3.css +0 -2
- package/lib-esm/experimental/IssueLabel/IssueLabel-5507fbf3.css.map +0 -1
- package/lib-esm/experimental/Skeleton/SkeletonAvatar-e00fff32.css +0 -2
- package/lib-esm/experimental/Skeleton/SkeletonAvatar-e00fff32.css.map +0 -1
- package/lib-esm/experimental/Skeleton/SkeletonAvatar.d.ts +0 -8
- package/lib-esm/experimental/Skeleton/SkeletonAvatar.module.css.js +0 -5
- package/lib-esm/experimental/Skeleton/SkeletonText-5cf908c1.css +0 -2
- package/lib-esm/experimental/Skeleton/SkeletonText-5cf908c1.css.map +0 -1
- package/lib-esm/experimental/Skeleton/SkeletonText.js +0 -143
- package/lib-esm/experimental/Skeleton/SkeletonText.module.css.js +0 -5
- package/lib-esm/experimental/Skeleton/index.d.ts +0 -4
- package/lib-esm/internal/utils/toggleStyledComponent.d.ts +0 -20
- package/lib-esm/internal/utils/toggleSxComponent.d.ts +0 -15
- package/lib-esm/internal/utils/toggleSxComponent.js +0 -77
- package/lib-esm/node_modules/@github/mini-throttle/dist/index.js +0 -40
|
@@ -1,27 +1,15 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import getGlobalFocusStyles from '../internal/utils/getGlobalFocusStyles.js';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import VisuallyHidden from '../_VisuallyHidden.js';
|
|
5
|
+
import useSafeTimeout from '../hooks/useSafeTimeout.js';
|
|
6
|
+
import classes from './ToggleSwitch.module.css.js';
|
|
8
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
8
|
import { useProvidedStateOrCreate } from '../hooks/useProvidedStateOrCreate.js';
|
|
10
|
-
import
|
|
9
|
+
import { useId } from '../hooks/useId.js';
|
|
10
|
+
import { AriaStatus } from '../live-region/AriaStatus.js';
|
|
11
11
|
import StyledSpinner from '../Spinner/Spinner.js';
|
|
12
|
-
import Text from '../Text/Text.js';
|
|
13
12
|
|
|
14
|
-
const TRANSITION_DURATION = '80ms';
|
|
15
|
-
const EASE_OUT_QUAD_CURVE = 'cubic-bezier(0.5, 1, 0.89, 1)';
|
|
16
|
-
const sizeVariants = variant({
|
|
17
|
-
prop: 'size',
|
|
18
|
-
variants: {
|
|
19
|
-
small: {
|
|
20
|
-
height: '24px',
|
|
21
|
-
width: '48px'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
13
|
const CircleIcon = t0 => {
|
|
26
14
|
const $ = c(4);
|
|
27
15
|
const {
|
|
@@ -94,49 +82,23 @@ const LineIcon = t0 => {
|
|
|
94
82
|
}
|
|
95
83
|
return t4;
|
|
96
84
|
};
|
|
97
|
-
const SwitchButton = styled.button.withConfig({
|
|
98
|
-
displayName: "ToggleSwitch__SwitchButton",
|
|
99
|
-
componentId: "sc-e6gszy-0"
|
|
100
|
-
})(["vertical-align:middle;cursor:pointer;user-select:none;appearance:none;text-decoration:none;padding:0;transition-property:background-color,border-color;transition-duration:", ";transition-timing-function:", ";border-radius:", ";border-style:solid;border-width:1px;display:block;height:32px;width:64px;position:relative;overflow:hidden;", ";@media (pointer:coarse){&:before{content:'';position:absolute;left:0;right:0;transform:translateY(-50%);top:50%;min-height:44px;}}@media (prefers-reduced-motion){transition:none;*{transition:none;}}&:hover:not(:disabled),&:focus:focus-visible{background-color:", ";}&:active,&:active:focus-visible{background-color:", ";}", " ", " ", ""], TRANSITION_DURATION, EASE_OUT_QUAD_CURVE, get('radii.2'), getGlobalFocusStyles('3px'), get('colors.switchTrack.hoverBg'), get('colors.switchTrack.activeBg'), props => {
|
|
101
|
-
if (props.disabled) {
|
|
102
|
-
return css(["background-color:", ";border-color:transparent;cursor:not-allowed;transition-property:none;"], get('colors.switchTrack.disabledBg'));
|
|
103
|
-
}
|
|
104
|
-
if (props.checked) {
|
|
105
|
-
return css(["background-color:", ";border-color:var(--control-checked-borderColor-rest,transparent);&:hover:not(:disabled),&:focus:focus-visible{background-color:", ";}&:active,&:active:focus-visible{background-color:", ";}"], get('colors.switchTrack.checked.bg'), get('colors.switchTrack.checked.hoverBg'), get('colors.switchTrack.checked.activeBg'));
|
|
106
|
-
} else {
|
|
107
|
-
return css(["background-color:", ";border-color:var(--controlTrack-borderColor-rest,transparent);&:active{background-color:", ";}"], get('colors.switchTrack.bg'), get('colors.switchTrack.activeBg'));
|
|
108
|
-
}
|
|
109
|
-
}, sx, sizeVariants);
|
|
110
|
-
const ToggleKnob = styled.div.withConfig({
|
|
111
|
-
displayName: "ToggleSwitch__ToggleKnob",
|
|
112
|
-
componentId: "sc-e6gszy-1"
|
|
113
|
-
})(["background-color:", ";border-width:1px;border-style:solid;border-color:", ";border-radius:calc(", " - 1px);width:50%;position:absolute;top:0;bottom:0;transition-property:transform;transition-duration:", ";transition-timing-function:", ";transform:", ";z-index:1;@media (prefers-reduced-motion){transition:none;}", ""], get('colors.switchKnob.bg'), props => props.disabled ? get('colors.switchTrack.disabledBg') : get('colors.switchKnob.border'), get('radii.2'), TRANSITION_DURATION, EASE_OUT_QUAD_CURVE, props => `translateX(${props.checked ? '100%' : '0px'})`, props => {
|
|
114
|
-
if (props.disabled) {
|
|
115
|
-
return css(["border-color:", ";"], get('colors.switchTrack.disabledBg'));
|
|
116
|
-
}
|
|
117
|
-
if (props.checked) {
|
|
118
|
-
return css(["border-color:", ";"], get('colors.switchKnob.checked.border'));
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
const hiddenTextStyles = {
|
|
122
|
-
visibility: 'hidden',
|
|
123
|
-
height: 0
|
|
124
|
-
};
|
|
125
85
|
const ToggleSwitch = /*#__PURE__*/React.forwardRef(function ToggleSwitch(props, ref) {
|
|
126
|
-
const $ = c(
|
|
86
|
+
const $ = c(91);
|
|
127
87
|
let ariaDescribedby;
|
|
128
88
|
let ariaLabelledby;
|
|
129
89
|
let checked;
|
|
90
|
+
let className;
|
|
130
91
|
let defaultChecked;
|
|
131
92
|
let disabled;
|
|
132
93
|
let loading;
|
|
133
94
|
let onChange;
|
|
134
95
|
let onClick;
|
|
135
96
|
let rest;
|
|
136
|
-
let sxProp;
|
|
137
97
|
let t0;
|
|
138
98
|
let t1;
|
|
139
99
|
let t2;
|
|
100
|
+
let t3;
|
|
101
|
+
let t4;
|
|
140
102
|
if ($[0] !== props) {
|
|
141
103
|
({
|
|
142
104
|
"aria-labelledby": ariaLabelledby,
|
|
@@ -150,321 +112,348 @@ const ToggleSwitch = /*#__PURE__*/React.forwardRef(function ToggleSwitch(props,
|
|
|
150
112
|
buttonType: t0,
|
|
151
113
|
size: t1,
|
|
152
114
|
statusLabelPosition: t2,
|
|
153
|
-
|
|
115
|
+
loadingLabelDelay: t3,
|
|
116
|
+
loadingLabel: t4,
|
|
117
|
+
className,
|
|
154
118
|
...rest
|
|
155
119
|
} = props);
|
|
156
120
|
$[0] = props;
|
|
157
121
|
$[1] = ariaDescribedby;
|
|
158
122
|
$[2] = ariaLabelledby;
|
|
159
123
|
$[3] = checked;
|
|
160
|
-
$[4] =
|
|
161
|
-
$[5] =
|
|
162
|
-
$[6] =
|
|
163
|
-
$[7] =
|
|
164
|
-
$[8] =
|
|
165
|
-
$[9] =
|
|
166
|
-
$[10] =
|
|
124
|
+
$[4] = className;
|
|
125
|
+
$[5] = defaultChecked;
|
|
126
|
+
$[6] = disabled;
|
|
127
|
+
$[7] = loading;
|
|
128
|
+
$[8] = onChange;
|
|
129
|
+
$[9] = onClick;
|
|
130
|
+
$[10] = rest;
|
|
167
131
|
$[11] = t0;
|
|
168
132
|
$[12] = t1;
|
|
169
133
|
$[13] = t2;
|
|
134
|
+
$[14] = t3;
|
|
135
|
+
$[15] = t4;
|
|
170
136
|
} else {
|
|
171
137
|
ariaDescribedby = $[1];
|
|
172
138
|
ariaLabelledby = $[2];
|
|
173
139
|
checked = $[3];
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
140
|
+
className = $[4];
|
|
141
|
+
defaultChecked = $[5];
|
|
142
|
+
disabled = $[6];
|
|
143
|
+
loading = $[7];
|
|
144
|
+
onChange = $[8];
|
|
145
|
+
onClick = $[9];
|
|
146
|
+
rest = $[10];
|
|
181
147
|
t0 = $[11];
|
|
182
148
|
t1 = $[12];
|
|
183
149
|
t2 = $[13];
|
|
150
|
+
t3 = $[14];
|
|
151
|
+
t4 = $[15];
|
|
184
152
|
}
|
|
185
153
|
const buttonType = t0 === undefined ? "button" : t0;
|
|
186
154
|
const size = t1 === undefined ? "medium" : t1;
|
|
187
155
|
const statusLabelPosition = t2 === undefined ? "start" : t2;
|
|
156
|
+
const loadingLabelDelay = t3 === undefined ? 2000 : t3;
|
|
157
|
+
const loadingLabel = t4 === undefined ? "Loading" : t4;
|
|
188
158
|
const isControlled = typeof checked !== "undefined";
|
|
189
159
|
const [isOn, setIsOn] = useProvidedStateOrCreate(checked, onChange, Boolean(defaultChecked));
|
|
190
160
|
const acceptsInteraction = !disabled && !loading;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
161
|
+
const [isLoadingLabelVisible, setIsLoadingLabelVisible] = React.useState(false);
|
|
162
|
+
const loadingLabelId = useId("loadingLabel");
|
|
163
|
+
const {
|
|
164
|
+
safeSetTimeout
|
|
165
|
+
} = useSafeTimeout();
|
|
166
|
+
let t5;
|
|
167
|
+
if ($[16] !== disabled || $[17] !== isControlled || $[18] !== isOn || $[19] !== loading || $[20] !== onClick || $[21] !== setIsOn) {
|
|
168
|
+
t5 = e => {
|
|
169
|
+
if (disabled || loading) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
194
172
|
if (!isControlled) {
|
|
195
173
|
setIsOn(!isOn);
|
|
196
174
|
}
|
|
197
175
|
onClick && onClick(e);
|
|
198
176
|
};
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
177
|
+
$[16] = disabled;
|
|
178
|
+
$[17] = isControlled;
|
|
179
|
+
$[18] = isOn;
|
|
180
|
+
$[19] = loading;
|
|
181
|
+
$[20] = onClick;
|
|
182
|
+
$[21] = setIsOn;
|
|
183
|
+
$[22] = t5;
|
|
204
184
|
} else {
|
|
205
|
-
|
|
185
|
+
t5 = $[22];
|
|
206
186
|
}
|
|
207
|
-
const handleToggleClick =
|
|
208
|
-
let
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
187
|
+
const handleToggleClick = t5;
|
|
188
|
+
let t6;
|
|
189
|
+
let t7;
|
|
190
|
+
if ($[23] !== checked || $[24] !== disabled || $[25] !== isControlled || $[26] !== onChange) {
|
|
191
|
+
t6 = () => {
|
|
192
|
+
if (onChange && isControlled && !disabled) {
|
|
212
193
|
onChange(Boolean(checked));
|
|
213
194
|
}
|
|
214
195
|
};
|
|
215
|
-
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[22] = t4;
|
|
219
|
-
} else {
|
|
220
|
-
t4 = $[22];
|
|
221
|
-
}
|
|
222
|
-
let t5;
|
|
223
|
-
if ($[23] !== buttonType || $[24] !== checked || $[25] !== isControlled || $[26] !== onChange) {
|
|
224
|
-
t5 = [onChange, checked, isControlled, buttonType];
|
|
225
|
-
$[23] = buttonType;
|
|
226
|
-
$[24] = checked;
|
|
196
|
+
t7 = [onChange, checked, isControlled, disabled];
|
|
197
|
+
$[23] = checked;
|
|
198
|
+
$[24] = disabled;
|
|
227
199
|
$[25] = isControlled;
|
|
228
200
|
$[26] = onChange;
|
|
229
|
-
$[27] =
|
|
201
|
+
$[27] = t6;
|
|
202
|
+
$[28] = t7;
|
|
230
203
|
} else {
|
|
231
|
-
|
|
204
|
+
t6 = $[27];
|
|
205
|
+
t7 = $[28];
|
|
232
206
|
}
|
|
233
|
-
useEffect(
|
|
234
|
-
|
|
235
|
-
let
|
|
236
|
-
if ($[
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
207
|
+
useEffect(t6, t7);
|
|
208
|
+
let t8;
|
|
209
|
+
let t9;
|
|
210
|
+
if ($[29] !== isLoadingLabelVisible || $[30] !== loading || $[31] !== loadingLabelDelay || $[32] !== safeSetTimeout) {
|
|
211
|
+
t8 = () => {
|
|
212
|
+
if (!loading && isLoadingLabelVisible) {
|
|
213
|
+
setIsLoadingLabelVisible(false);
|
|
214
|
+
} else {
|
|
215
|
+
if (loading && !isLoadingLabelVisible) {
|
|
216
|
+
safeSetTimeout(() => {
|
|
217
|
+
setIsLoadingLabelVisible(true);
|
|
218
|
+
}, loadingLabelDelay);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
t9 = [loading, isLoadingLabelVisible, loadingLabelDelay, safeSetTimeout];
|
|
223
|
+
$[29] = isLoadingLabelVisible;
|
|
224
|
+
$[30] = loading;
|
|
225
|
+
$[31] = loadingLabelDelay;
|
|
226
|
+
$[32] = safeSetTimeout;
|
|
227
|
+
$[33] = t8;
|
|
228
|
+
$[34] = t9;
|
|
242
229
|
} else {
|
|
243
|
-
|
|
230
|
+
t8 = $[33];
|
|
231
|
+
t9 = $[34];
|
|
232
|
+
}
|
|
233
|
+
useEffect(t8, t9);
|
|
234
|
+
let switchButtonDescribedBy = loadingLabelId;
|
|
235
|
+
if (ariaDescribedby) {
|
|
236
|
+
switchButtonDescribedBy = `${switchButtonDescribedBy} ${ariaDescribedby}`;
|
|
244
237
|
}
|
|
245
|
-
const t8 = acceptsInteraction ? "fg.default" : "fg.muted";
|
|
246
|
-
const t9 = size === "small" ? 0 : 1;
|
|
247
238
|
let t10;
|
|
248
|
-
if ($[
|
|
249
|
-
t10 =
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
};
|
|
253
|
-
$[30] = t10;
|
|
239
|
+
if ($[35] !== className) {
|
|
240
|
+
t10 = clsx(classes.ToggleSwitch, className);
|
|
241
|
+
$[35] = className;
|
|
242
|
+
$[36] = t10;
|
|
254
243
|
} else {
|
|
255
|
-
t10 = $[
|
|
244
|
+
t10 = $[36];
|
|
256
245
|
}
|
|
257
|
-
const t11 =
|
|
246
|
+
const t11 = isLoadingLabelVisible && loadingLabel;
|
|
258
247
|
let t12;
|
|
259
|
-
if ($[
|
|
260
|
-
t12 = /*#__PURE__*/jsx(
|
|
261
|
-
|
|
262
|
-
|
|
248
|
+
if ($[37] !== loadingLabelId || $[38] !== t11) {
|
|
249
|
+
t12 = /*#__PURE__*/jsx(VisuallyHidden, {
|
|
250
|
+
children: /*#__PURE__*/jsx(AriaStatus, {
|
|
251
|
+
announceOnShow: true,
|
|
252
|
+
id: loadingLabelId,
|
|
253
|
+
children: t11
|
|
254
|
+
})
|
|
255
|
+
});
|
|
256
|
+
$[37] = loadingLabelId;
|
|
257
|
+
$[38] = t11;
|
|
258
|
+
$[39] = t12;
|
|
259
|
+
} else {
|
|
260
|
+
t12 = $[39];
|
|
261
|
+
}
|
|
262
|
+
let t13;
|
|
263
|
+
if ($[40] !== loading || $[41] !== statusLabelPosition) {
|
|
264
|
+
t13 = loading ? /*#__PURE__*/jsx("div", {
|
|
265
|
+
className: classes.LoadingSpinner,
|
|
266
|
+
"data-status-label-position": statusLabelPosition,
|
|
267
|
+
children: /*#__PURE__*/jsx(StyledSpinner, {
|
|
268
|
+
size: "small",
|
|
269
|
+
srText: null
|
|
270
|
+
})
|
|
271
|
+
}) : null;
|
|
272
|
+
$[40] = loading;
|
|
273
|
+
$[41] = statusLabelPosition;
|
|
274
|
+
$[42] = t13;
|
|
275
|
+
} else {
|
|
276
|
+
t13 = $[42];
|
|
277
|
+
}
|
|
278
|
+
const t14 = !acceptsInteraction;
|
|
279
|
+
const t15 = !isOn;
|
|
280
|
+
let t16;
|
|
281
|
+
if ($[43] !== t15) {
|
|
282
|
+
t16 = /*#__PURE__*/jsx("span", {
|
|
283
|
+
className: classes.StatusTextItem,
|
|
284
|
+
"data-hidden": t15,
|
|
263
285
|
children: "On"
|
|
264
286
|
});
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
287
|
+
$[43] = t15;
|
|
288
|
+
$[44] = t16;
|
|
267
289
|
} else {
|
|
268
|
-
|
|
290
|
+
t16 = $[44];
|
|
269
291
|
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
sx: t13,
|
|
292
|
+
let t17;
|
|
293
|
+
if ($[45] !== isOn) {
|
|
294
|
+
t17 = /*#__PURE__*/jsx("span", {
|
|
295
|
+
className: classes.StatusTextItem,
|
|
296
|
+
"data-hidden": isOn,
|
|
276
297
|
children: "Off"
|
|
277
298
|
});
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
299
|
+
$[45] = isOn;
|
|
300
|
+
$[46] = t17;
|
|
280
301
|
} else {
|
|
281
|
-
|
|
302
|
+
t17 = $[46];
|
|
282
303
|
}
|
|
283
|
-
let
|
|
284
|
-
if ($[
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
304
|
+
let t18;
|
|
305
|
+
if ($[47] !== handleToggleClick || $[48] !== size || $[49] !== t14 || $[50] !== t16 || $[51] !== t17) {
|
|
306
|
+
t18 = /*#__PURE__*/jsxs("span", {
|
|
307
|
+
className: classes.StatusText,
|
|
308
|
+
"data-size": size,
|
|
309
|
+
"data-disabled": t14,
|
|
289
310
|
"aria-hidden": "true",
|
|
290
|
-
sx: t10,
|
|
291
311
|
onClick: handleToggleClick,
|
|
292
|
-
children: [
|
|
312
|
+
children: [t16, t17]
|
|
293
313
|
});
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
314
|
+
$[47] = handleToggleClick;
|
|
315
|
+
$[48] = size;
|
|
316
|
+
$[49] = t14;
|
|
317
|
+
$[50] = t16;
|
|
318
|
+
$[51] = t17;
|
|
319
|
+
$[52] = t18;
|
|
300
320
|
} else {
|
|
301
|
-
|
|
321
|
+
t18 = $[52];
|
|
302
322
|
}
|
|
303
|
-
const
|
|
304
|
-
const
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
transitionProperty: "transform",
|
|
311
|
-
transitionDuration: TRANSITION_DURATION
|
|
312
|
-
};
|
|
313
|
-
$[41] = t18;
|
|
314
|
-
$[42] = t19;
|
|
315
|
-
} else {
|
|
316
|
-
t19 = $[42];
|
|
317
|
-
}
|
|
318
|
-
let t20;
|
|
319
|
-
if ($[43] !== size) {
|
|
320
|
-
t20 = /*#__PURE__*/jsx(LineIcon, {
|
|
323
|
+
const t19 = !acceptsInteraction;
|
|
324
|
+
const t20 = isLoadingLabelVisible || ariaDescribedby ? switchButtonDescribedBy : undefined;
|
|
325
|
+
const t21 = !acceptsInteraction;
|
|
326
|
+
const t22 = !acceptsInteraction;
|
|
327
|
+
let t23;
|
|
328
|
+
if ($[53] !== size) {
|
|
329
|
+
t23 = /*#__PURE__*/jsx(LineIcon, {
|
|
321
330
|
size: size
|
|
322
331
|
});
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
} else {
|
|
326
|
-
t20 = $[44];
|
|
327
|
-
}
|
|
328
|
-
let t21;
|
|
329
|
-
if ($[45] !== t17 || $[46] !== t19 || $[47] !== t20) {
|
|
330
|
-
t21 = /*#__PURE__*/jsx(Box, {
|
|
331
|
-
flexGrow: 1,
|
|
332
|
-
flexShrink: 0,
|
|
333
|
-
flexBasis: "50%",
|
|
334
|
-
color: t17,
|
|
335
|
-
lineHeight: "0",
|
|
336
|
-
sx: t19,
|
|
337
|
-
children: t20
|
|
338
|
-
});
|
|
339
|
-
$[45] = t17;
|
|
340
|
-
$[46] = t19;
|
|
341
|
-
$[47] = t20;
|
|
342
|
-
$[48] = t21;
|
|
332
|
+
$[53] = size;
|
|
333
|
+
$[54] = t23;
|
|
343
334
|
} else {
|
|
344
|
-
|
|
335
|
+
t23 = $[54];
|
|
345
336
|
}
|
|
346
|
-
const t22 = acceptsInteraction ? "switchTrack.fg" : "switchTrack.disabledFg";
|
|
347
|
-
const t23 = `translateX(${isOn ? "100%" : "0"})`;
|
|
348
337
|
let t24;
|
|
349
|
-
if ($[
|
|
350
|
-
t24 = {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
$[49] = t23;
|
|
356
|
-
$[50] = t24;
|
|
357
|
-
} else {
|
|
358
|
-
t24 = $[50];
|
|
359
|
-
}
|
|
360
|
-
let t25;
|
|
361
|
-
if ($[51] !== size) {
|
|
362
|
-
t25 = /*#__PURE__*/jsx(CircleIcon, {
|
|
363
|
-
size: size
|
|
338
|
+
if ($[55] !== isOn || $[56] !== t22 || $[57] !== t23) {
|
|
339
|
+
t24 = /*#__PURE__*/jsx("div", {
|
|
340
|
+
className: `${classes.IconContainer} ${classes.LineIconContainer}`,
|
|
341
|
+
"data-checked": isOn,
|
|
342
|
+
"data-disabled": t22,
|
|
343
|
+
children: t23
|
|
364
344
|
});
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
345
|
+
$[55] = isOn;
|
|
346
|
+
$[56] = t22;
|
|
347
|
+
$[57] = t23;
|
|
348
|
+
$[58] = t24;
|
|
367
349
|
} else {
|
|
368
|
-
|
|
350
|
+
t24 = $[58];
|
|
369
351
|
}
|
|
352
|
+
const t25 = !acceptsInteraction;
|
|
370
353
|
let t26;
|
|
371
|
-
if ($[
|
|
372
|
-
t26 = /*#__PURE__*/jsx(
|
|
373
|
-
|
|
374
|
-
flexShrink: 0,
|
|
375
|
-
flexBasis: "50%",
|
|
376
|
-
color: t22,
|
|
377
|
-
lineHeight: "0",
|
|
378
|
-
sx: t24,
|
|
379
|
-
children: t25
|
|
354
|
+
if ($[59] !== size) {
|
|
355
|
+
t26 = /*#__PURE__*/jsx(CircleIcon, {
|
|
356
|
+
size: size
|
|
380
357
|
});
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[55] = t25;
|
|
384
|
-
$[56] = t26;
|
|
358
|
+
$[59] = size;
|
|
359
|
+
$[60] = t26;
|
|
385
360
|
} else {
|
|
386
|
-
t26 = $[
|
|
361
|
+
t26 = $[60];
|
|
387
362
|
}
|
|
388
363
|
let t27;
|
|
389
|
-
if ($[
|
|
390
|
-
t27 = /*#__PURE__*/
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
height: "100%",
|
|
396
|
-
overflow: "hidden",
|
|
397
|
-
children: [t21, t26]
|
|
364
|
+
if ($[61] !== isOn || $[62] !== t25 || $[63] !== t26) {
|
|
365
|
+
t27 = /*#__PURE__*/jsx("div", {
|
|
366
|
+
className: `${classes.IconContainer} ${classes.CircleIconContainer}`,
|
|
367
|
+
"data-checked": isOn,
|
|
368
|
+
"data-disabled": t25,
|
|
369
|
+
children: t26
|
|
398
370
|
});
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
371
|
+
$[61] = isOn;
|
|
372
|
+
$[62] = t25;
|
|
373
|
+
$[63] = t26;
|
|
374
|
+
$[64] = t27;
|
|
402
375
|
} else {
|
|
403
|
-
t27 = $[
|
|
376
|
+
t27 = $[64];
|
|
404
377
|
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
378
|
+
let t28;
|
|
379
|
+
if ($[65] !== t24 || $[66] !== t27) {
|
|
380
|
+
t28 = /*#__PURE__*/jsxs("div", {
|
|
381
|
+
className: classes.SwitchButtonContent,
|
|
409
382
|
"aria-hidden": "true",
|
|
410
|
-
|
|
411
|
-
checked: isOn
|
|
383
|
+
children: [t24, t27]
|
|
412
384
|
});
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
385
|
+
$[65] = t24;
|
|
386
|
+
$[66] = t27;
|
|
387
|
+
$[67] = t28;
|
|
416
388
|
} else {
|
|
417
|
-
|
|
389
|
+
t28 = $[67];
|
|
418
390
|
}
|
|
391
|
+
const t29 = !acceptsInteraction;
|
|
419
392
|
let t30;
|
|
420
|
-
if ($[
|
|
421
|
-
t30 = /*#__PURE__*/
|
|
393
|
+
if ($[68] !== isOn || $[69] !== t29) {
|
|
394
|
+
t30 = /*#__PURE__*/jsx("div", {
|
|
395
|
+
className: classes.ToggleKnob,
|
|
396
|
+
"data-checked": isOn,
|
|
397
|
+
"data-disabled": t29,
|
|
398
|
+
"aria-hidden": "true"
|
|
399
|
+
});
|
|
400
|
+
$[68] = isOn;
|
|
401
|
+
$[69] = t29;
|
|
402
|
+
$[70] = t30;
|
|
403
|
+
} else {
|
|
404
|
+
t30 = $[70];
|
|
405
|
+
}
|
|
406
|
+
let t31;
|
|
407
|
+
if ($[71] !== ariaLabelledby || $[72] !== buttonType || $[73] !== handleToggleClick || $[74] !== isOn || $[75] !== ref || $[76] !== size || $[77] !== t19 || $[78] !== t20 || $[79] !== t21 || $[80] !== t28 || $[81] !== t30) {
|
|
408
|
+
t31 = /*#__PURE__*/jsxs("button", {
|
|
422
409
|
ref: ref,
|
|
423
410
|
type: buttonType,
|
|
411
|
+
className: classes.SwitchButton,
|
|
412
|
+
"data-size": size,
|
|
413
|
+
"data-checked": isOn,
|
|
414
|
+
"data-disabled": t19,
|
|
424
415
|
onClick: handleToggleClick,
|
|
425
416
|
"aria-labelledby": ariaLabelledby,
|
|
426
|
-
"aria-describedby":
|
|
417
|
+
"aria-describedby": t20,
|
|
427
418
|
"aria-pressed": isOn,
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
disabled: t16,
|
|
431
|
-
children: [t27, t29]
|
|
419
|
+
"aria-disabled": t21,
|
|
420
|
+
children: [t28, t30]
|
|
432
421
|
});
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
422
|
+
$[71] = ariaLabelledby;
|
|
423
|
+
$[72] = buttonType;
|
|
424
|
+
$[73] = handleToggleClick;
|
|
425
|
+
$[74] = isOn;
|
|
426
|
+
$[75] = ref;
|
|
427
|
+
$[76] = size;
|
|
428
|
+
$[77] = t19;
|
|
429
|
+
$[78] = t20;
|
|
430
|
+
$[79] = t21;
|
|
431
|
+
$[80] = t28;
|
|
432
|
+
$[81] = t30;
|
|
433
|
+
$[82] = t31;
|
|
444
434
|
} else {
|
|
445
|
-
|
|
435
|
+
t31 = $[82];
|
|
446
436
|
}
|
|
447
|
-
let
|
|
448
|
-
if ($[
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
flexDirection: t6,
|
|
453
|
-
sx: sxProp,
|
|
437
|
+
let t32;
|
|
438
|
+
if ($[83] !== rest || $[84] !== statusLabelPosition || $[85] !== t10 || $[86] !== t12 || $[87] !== t13 || $[88] !== t18 || $[89] !== t31) {
|
|
439
|
+
t32 = /*#__PURE__*/jsxs("div", {
|
|
440
|
+
className: t10,
|
|
441
|
+
"data-status-label-position": statusLabelPosition,
|
|
454
442
|
...rest,
|
|
455
|
-
children: [
|
|
443
|
+
children: [t12, t13, t18, t31]
|
|
456
444
|
});
|
|
457
|
-
$[
|
|
458
|
-
$[
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
445
|
+
$[83] = rest;
|
|
446
|
+
$[84] = statusLabelPosition;
|
|
447
|
+
$[85] = t10;
|
|
448
|
+
$[86] = t12;
|
|
449
|
+
$[87] = t13;
|
|
450
|
+
$[88] = t18;
|
|
451
|
+
$[89] = t31;
|
|
452
|
+
$[90] = t32;
|
|
464
453
|
} else {
|
|
465
|
-
|
|
454
|
+
t32 = $[90];
|
|
466
455
|
}
|
|
467
|
-
return
|
|
456
|
+
return t32;
|
|
468
457
|
});
|
|
469
458
|
if (process.env.NODE_ENV !== "production") {
|
|
470
459
|
ToggleSwitch.displayName = 'ToggleSwitch';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './ToggleSwitch-4b23d166.css';
|
|
2
|
+
|
|
3
|
+
var classes = {"ToggleSwitch":"prc-ToggleSwitch-ToggleSwitch-E4lp0","LoadingSpinner":"prc-ToggleSwitch-LoadingSpinner-jCYtC","StatusText":"prc-ToggleSwitch-StatusText-hWpj2","StatusTextItem":"prc-ToggleSwitch-StatusTextItem-fvvXa","SwitchButton":"prc-ToggleSwitch-SwitchButton-5LRHX","SwitchButtonContent":"prc-ToggleSwitch-SwitchButtonContent-nv4lE","IconContainer":"prc-ToggleSwitch-IconContainer-zLC02","LineIconContainer":"prc-ToggleSwitch-LineIconContainer-7sQm8","CircleIconContainer":"prc-ToggleSwitch-CircleIconContainer-gHYvi","ToggleKnob":"prc-ToggleSwitch-ToggleKnob-2e7Rm"};
|
|
4
|
+
|
|
5
|
+
export { classes as default };
|