@kaizen/components 1.66.1 → 1.67.0
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/codemods/README.md +5 -0
- package/codemods/upgradeIconV1/getNewIconPropsFromOldIconName.ts +255 -0
- package/codemods/upgradeIconV1/index.ts +33 -0
- package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.spec.ts +83 -0
- package/codemods/upgradeIconV1/transformCaMonogramIconToBrand.ts +53 -0
- package/codemods/upgradeIconV1/transformIcon.spec.ts +181 -0
- package/codemods/upgradeIconV1/transformIcon.ts +115 -0
- package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.spec.ts +81 -0
- package/codemods/upgradeIconV1/transformSpinnerIconToLoadingSpinner.ts +41 -0
- package/codemods/upgradeIconV1/upgradeIconV1.spec.ts +306 -0
- package/codemods/upgradeIconV1/upgradeIconV1.ts +94 -0
- package/codemods/utils/createProp.spec.ts +83 -0
- package/codemods/utils/createProp.ts +51 -0
- package/codemods/utils/getKaioTagName.spec.ts +85 -0
- package/codemods/utils/getKaioTagName.ts +129 -0
- package/codemods/utils/index.ts +3 -1
- package/codemods/utils/transformComponentsInDir.ts +32 -16
- package/codemods/utils/transformSource.ts +10 -5
- package/codemods/utils/updateJsxElementWithNewProps.ts +4 -3
- package/codemods/utils/updateKaioImports.spec.ts +223 -0
- package/codemods/utils/updateKaioImports.ts +233 -0
- package/dist/cjs/Avatar/Avatar.cjs +16 -13
- package/dist/cjs/Calendar/CalendarRange/CalendarRange.cjs +9 -7
- package/dist/cjs/Calendar/CalendarSingle/CalendarSingle.cjs +9 -7
- package/dist/cjs/Calendar/LegacyCalendarRange/LegacyCalendarRange.cjs +9 -7
- package/dist/cjs/Checkbox/Checkbox/Checkbox.cjs +5 -11
- package/dist/cjs/ClearButton/ClearButton.cjs +5 -4
- package/dist/cjs/Collapsible/Collapsible/Collapsible.cjs +4 -7
- package/dist/cjs/DateInput/DateInputWithIconButton/DateInputWithIconButton.cjs +5 -4
- package/dist/cjs/DateRangePicker/DateRangePicker.cjs +5 -4
- package/dist/cjs/ErrorPage/ErrorPage.cjs +9 -7
- package/dist/cjs/FieldMessage/FieldMessage.cjs +5 -11
- package/dist/cjs/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.cjs +4 -5
- package/dist/cjs/Filter/FilterButton/FilterButton/FilterButton.cjs +4 -7
- package/dist/cjs/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.cjs +5 -5
- package/dist/cjs/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.cjs +4 -4
- package/dist/cjs/GuidanceBlock/GuidanceBlock.cjs +5 -4
- package/dist/cjs/Illustration/utils/usePausePlay.cjs +5 -8
- package/dist/cjs/Input/InputSearch/InputSearch.cjs +4 -3
- package/dist/cjs/LikertScaleLegacy/LikertScaleLegacy.cjs +5 -6
- package/dist/cjs/Modal/ConfirmationModal/ConfirmationModal.cjs +31 -26
- package/dist/cjs/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.cjs +4 -5
- package/dist/cjs/MultiSelect/subcomponents/Checkbox/Checkbox.cjs +7 -17
- package/dist/cjs/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.cjs +4 -7
- package/dist/cjs/Notification/subcomponents/CancelButton/CancelButton.cjs +4 -3
- package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.cjs +33 -38
- package/dist/cjs/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.cjs +6 -0
- package/dist/cjs/Pagination/subcomponents/DirectionalLink/DirectionalLink.cjs +11 -19
- package/dist/cjs/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.cjs +4 -5
- package/dist/cjs/Popover/Popover.cjs +5 -4
- package/dist/cjs/Popover/utils/classMappers.cjs +21 -16
- package/dist/cjs/RichTextEditor/RichTextEditor/utils/controlmap.cjs +29 -25
- package/dist/cjs/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.cjs +10 -12
- package/dist/cjs/Select/Select.cjs +8 -10
- package/dist/cjs/SplitButton/subcomponents/DropdownButton/DropdownButton.cjs +4 -4
- package/dist/cjs/Table/Table.cjs +11 -10
- package/dist/cjs/Tag/Tag.cjs +21 -17
- package/dist/cjs/TextField/TextField.cjs +5 -4
- package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +8 -7
- package/dist/cjs/TitleBlockZen/TitleBlockZen.cjs +9 -12
- package/dist/cjs/TitleBlockZen/subcomponents/MainActions.cjs +7 -7
- package/dist/cjs/TitleBlockZen/subcomponents/MobileActions.cjs +10 -15
- package/dist/cjs/TitleBlockZen/subcomponents/SecondaryActions.cjs +7 -7
- package/dist/cjs/ToggleSwitch/ToggleSwitch/ToggleSwitch.cjs +5 -5
- package/dist/cjs/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.cjs +13 -18
- package/dist/cjs/__future__/Icon/Icon.cjs +47 -0
- package/dist/cjs/__future__/Icon/Icon.module.css.cjs +10 -0
- package/dist/cjs/__future__/Icon/constants.cjs +8 -0
- package/dist/cjs/__future__/Select/subcomponents/Option/Option.cjs +4 -5
- package/dist/cjs/__future__/Select/subcomponents/SelectToggle/SelectToggle.cjs +5 -9
- package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveButton.cjs +4 -3
- package/dist/cjs/future.cjs +2 -0
- package/dist/esm/Avatar/Avatar.mjs +16 -13
- package/dist/esm/Calendar/CalendarRange/CalendarRange.mjs +9 -7
- package/dist/esm/Calendar/CalendarSingle/CalendarSingle.mjs +9 -7
- package/dist/esm/Calendar/LegacyCalendarRange/LegacyCalendarRange.mjs +9 -7
- package/dist/esm/Checkbox/Checkbox/Checkbox.mjs +5 -11
- package/dist/esm/ClearButton/ClearButton.mjs +5 -4
- package/dist/esm/Collapsible/Collapsible/Collapsible.mjs +5 -8
- package/dist/esm/DateInput/DateInputWithIconButton/DateInputWithIconButton.mjs +5 -4
- package/dist/esm/DateRangePicker/DateRangePicker.mjs +5 -4
- package/dist/esm/ErrorPage/ErrorPage.mjs +10 -8
- package/dist/esm/FieldMessage/FieldMessage.mjs +6 -12
- package/dist/esm/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.mjs +4 -5
- package/dist/esm/Filter/FilterButton/FilterButton/FilterButton.mjs +5 -8
- package/dist/esm/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.mjs +5 -5
- package/dist/esm/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.mjs +4 -4
- package/dist/esm/GuidanceBlock/GuidanceBlock.mjs +5 -4
- package/dist/esm/Illustration/utils/usePausePlay.mjs +5 -8
- package/dist/esm/Input/InputSearch/InputSearch.mjs +4 -3
- package/dist/esm/LikertScaleLegacy/LikertScaleLegacy.mjs +5 -6
- package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +31 -26
- package/dist/esm/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.mjs +4 -5
- package/dist/esm/MultiSelect/subcomponents/Checkbox/Checkbox.mjs +7 -17
- package/dist/esm/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.mjs +5 -8
- package/dist/esm/Notification/subcomponents/CancelButton/CancelButton.mjs +4 -3
- package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.mjs +33 -38
- package/dist/esm/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css.mjs +4 -0
- package/dist/esm/Pagination/subcomponents/DirectionalLink/DirectionalLink.mjs +11 -19
- package/dist/esm/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.mjs +4 -5
- package/dist/esm/Popover/Popover.mjs +5 -4
- package/dist/esm/Popover/utils/classMappers.mjs +21 -16
- package/dist/esm/RichTextEditor/RichTextEditor/utils/controlmap.mjs +33 -29
- package/dist/esm/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.mjs +10 -12
- package/dist/esm/Select/Select.mjs +9 -11
- package/dist/esm/SplitButton/subcomponents/DropdownButton/DropdownButton.mjs +4 -4
- package/dist/esm/Table/Table.mjs +11 -10
- package/dist/esm/Tag/Tag.mjs +21 -17
- package/dist/esm/TextField/TextField.mjs +5 -4
- package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +8 -7
- package/dist/esm/TitleBlockZen/TitleBlockZen.mjs +9 -12
- package/dist/esm/TitleBlockZen/subcomponents/MainActions.mjs +7 -7
- package/dist/esm/TitleBlockZen/subcomponents/MobileActions.mjs +13 -18
- package/dist/esm/TitleBlockZen/subcomponents/SecondaryActions.mjs +7 -7
- package/dist/esm/ToggleSwitch/ToggleSwitch/ToggleSwitch.mjs +5 -5
- package/dist/esm/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.mjs +16 -21
- package/dist/esm/__future__/Icon/Icon.mjs +38 -0
- package/dist/esm/__future__/Icon/Icon.module.css.mjs +8 -0
- package/dist/esm/__future__/Icon/constants.mjs +6 -0
- package/dist/esm/__future__/Select/subcomponents/Option/Option.mjs +4 -5
- package/dist/esm/__future__/Select/subcomponents/SelectToggle/SelectToggle.mjs +6 -10
- package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveButton.mjs +4 -3
- package/dist/esm/future.mjs +1 -0
- package/dist/styles.css +562 -538
- package/dist/types/__future__/Icon/Icon.d.ts +21 -0
- package/dist/types/__future__/Icon/constants.d.ts +5 -0
- package/dist/types/__future__/Icon/index.d.ts +1 -0
- package/dist/types/__future__/Icon/types.d.ts +4 -0
- package/dist/types/__future__/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/Avatar/Avatar.module.scss +6 -8
- package/src/Avatar/Avatar.tsx +14 -5
- package/src/BrandMoment/_docs/BrandMoment.stories.tsx +6 -10
- package/src/BrandMoment/_docs/ExampleHeaders.tsx +2 -2
- package/src/Calendar/CalendarRange/CalendarRange.tsx +7 -3
- package/src/Calendar/CalendarSingle/CalendarSingle.tsx +7 -3
- package/src/Calendar/LegacyCalendarRange/LegacyCalendarRange.tsx +7 -3
- package/src/Calendar/baseCalendarClassNames.module.scss +0 -4
- package/src/Checkbox/Checkbox/Checkbox.module.scss +0 -8
- package/src/Checkbox/Checkbox/Checkbox.tsx +6 -8
- package/src/ClearButton/ClearButton.tsx +2 -2
- package/src/Collapsible/Collapsible/Collapsible.tsx +5 -6
- package/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx +2 -2
- package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.module.scss +2 -7
- package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.tsx +2 -2
- package/src/DateRangePicker/DateRangePicker.tsx +2 -2
- package/src/EmptyState/_docs/EmptyState.stickersheet.stories.tsx +8 -2
- package/src/EmptyState/_docs/EmptyState.stories.tsx +4 -2
- package/src/ErrorPage/ErrorPage.tsx +5 -3
- package/src/FieldMessage/FieldMessage.tsx +6 -14
- package/src/Filter/FilterBar/FilterBar.spec.tsx +12 -12
- package/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.tsx +2 -2
- package/src/Filter/FilterButton/FilterButton/FilterButton.module.scss +1 -1
- package/src/Filter/FilterButton/FilterButton/FilterButton.tsx +5 -6
- package/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.tsx +2 -2
- package/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx +0 -1
- package/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx +2 -1
- package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.tsx +2 -2
- package/src/Filter/FilterSelect/FilterSelect.spec.tsx +4 -5
- package/src/GuidanceBlock/GuidanceBlock.tsx +6 -2
- package/src/Icon/_docs/{Icon.stories.tsx → Icon.docs.stories.tsx} +1 -1
- package/src/Icon/_docs/Icon.mdx +1 -2
- package/src/Icon/_docs/Icon.stickersheet.stories.tsx +1 -1
- package/src/Illustration/utils/usePausePlay.tsx +7 -5
- package/src/Input/Input/_docs/Input.stickersheet.stories.tsx +7 -5
- package/src/Input/Input/_docs/Input.stories.tsx +5 -3
- package/src/Input/InputSearch/InputSearch.tsx +2 -2
- package/src/Label/Label.module.scss +4 -0
- package/src/LikertScaleLegacy/LikertScaleLegacy.tsx +2 -2
- package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.stories.tsx +2 -2
- package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +2 -0
- package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +32 -35
- package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.tsx +2 -2
- package/src/MultiSelect/MultiSelect.spec.tsx +7 -3
- package/src/MultiSelect/subcomponents/Checkbox/Checkbox.module.scss +0 -6
- package/src/MultiSelect/subcomponents/Checkbox/Checkbox.tsx +10 -9
- package/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx +11 -7
- package/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.tsx +5 -7
- package/src/Notification/subcomponents/CancelButton/CancelButton.tsx +2 -2
- package/src/Notification/subcomponents/GenericNotification/_mixins.scss +2 -0
- package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.module.css +3 -0
- package/src/Notification/subcomponents/NotificationIcon/NotificationIcon.tsx +22 -16
- package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.module.scss +0 -4
- package/src/Pagination/subcomponents/DirectionalLink/DirectionalLink.tsx +13 -12
- package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.module.scss +0 -1
- package/src/Pagination/subcomponents/TruncateIndicator/TruncateIndicator.tsx +2 -2
- package/src/Popover/Popover.module.scss +3 -3
- package/src/Popover/Popover.tsx +2 -2
- package/src/Popover/utils/classMappers.tsx +6 -11
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stickersheet.stories.tsx +7 -7
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.stories.tsx +2 -2
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.spec.tsx +7 -4
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.stories.tsx +18 -12
- package/src/RichTextEditor/RichTextEditor/utils/controlmap.tsx +25 -18
- package/src/RichTextEditor/utils/plugins/LinkManager/components/LinkPopover/LinkPopover.tsx +4 -8
- package/src/Select/Select.module.scss +2 -0
- package/src/Select/Select.tsx +10 -7
- package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx +4 -5
- package/src/SplitButton/subcomponents/DropdownButton/DropdownButton.tsx +2 -2
- package/src/Table/Table.tsx +4 -8
- package/src/Table/_docs/Table.stickersheet.stories.tsx +4 -4
- package/src/Table/_docs/Table.stories.tsx +3 -3
- package/src/Tag/Tag.module.scss +2 -0
- package/src/Tag/Tag.tsx +7 -13
- package/src/Text/Text.module.scss +2 -0
- package/src/TextField/TextField.spec.tsx +9 -4
- package/src/TextField/TextField.tsx +2 -2
- package/src/TextField/_docs/TextField.stories.tsx +4 -3
- package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +3 -3
- package/src/TitleBlockZen/TitleBlockZen.module.scss +1 -0
- package/src/TitleBlockZen/TitleBlockZen.spec.tsx +1 -1
- package/src/TitleBlockZen/TitleBlockZen.tsx +6 -9
- package/src/TitleBlockZen/_docs/TitleBlockZen.stories.tsx +5 -5
- package/src/TitleBlockZen/subcomponents/MainActions.tsx +5 -3
- package/src/TitleBlockZen/subcomponents/MobileActions.tsx +13 -16
- package/src/TitleBlockZen/subcomponents/SecondaryActions.tsx +3 -3
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +0 -3
- package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.tsx +2 -2
- package/src/Workflow/_docs/Workflow.stories.tsx +4 -5
- package/src/Workflow/_docs/WorkflowHeader.stories.tsx +4 -5
- package/src/Workflow/_docs/controls/controls.tsx +4 -4
- package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.tsx +6 -31
- package/src/__actions__/Button/v1/Button/_docs/Button.stickersheet.stories.tsx +5 -5
- package/src/__actions__/Button/v1/Button/_docs/Button.stories.tsx +6 -5
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stickersheet.stories.tsx +6 -6
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.stories.tsx +4 -4
- package/src/__actions__/Button/v2/Button/_docs/Button.stories.tsx +6 -5
- package/src/__actions__/Button/v2/IconButton/_docs/IconButton.stories.tsx +4 -4
- package/src/__actions__/Menu/v1/_docs/Menu.stickersheet.stories.tsx +3 -3
- package/src/__actions__/Menu/v1/_docs/Menu.stories.tsx +3 -3
- package/src/__actions__/Menu/v1/_docs/MenuContentExample.tsx +6 -6
- package/src/__actions__/Menu/v1/_docs/examples.tsx +5 -5
- package/src/__actions__/Menu/v2/_docs/Menu.stories.tsx +3 -3
- package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +1 -3
- package/src/__actions__/Menu/v3/_docs/Menu.docs.stories.tsx +46 -45
- package/src/__actions__/Menu/v3/_docs/Menu.mdx +1 -1
- package/src/__actions__/Menu/v3/_docs/Menu.spec.stories.tsx +21 -23
- package/src/__actions__/Menu/v3/_docs/Menu.stories.tsx +12 -15
- package/src/__future__/Icon/Icon.module.css +35 -0
- package/src/__future__/Icon/Icon.spec.tsx +36 -0
- package/src/__future__/Icon/Icon.tsx +85 -0
- package/src/__future__/Icon/_docs/Icon--api-specification.mdx +98 -0
- package/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx +145 -0
- package/src/__future__/Icon/_docs/Icon.docs.module.css +17 -0
- package/src/__future__/Icon/_docs/Icon.docs.stories.tsx +524 -0
- package/src/__future__/Icon/_docs/Icon.stickersheet.stories.tsx +126 -0
- package/src/__future__/Icon/_docs/assets/interface-dont.png +0 -0
- package/src/__future__/Icon/_docs/assets/tooltip-dont.png +0 -0
- package/src/__future__/Icon/constants.ts +149 -0
- package/src/__future__/Icon/index.ts +1 -0
- package/src/__future__/Icon/material-symbols-metadata.json +3370 -0
- package/src/__future__/Icon/types.ts +11 -0
- package/src/__future__/Select/subcomponents/Option/Option.tsx +2 -2
- package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.module.scss +1 -1
- package/src/__future__/Select/subcomponents/SelectToggle/SelectToggle.tsx +6 -9
- package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.stories.tsx +0 -77
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.module.scss +0 -56
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveButton.tsx +2 -12
- package/src/__future__/Tag/Tag/Tag.module.scss +1 -1
- package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.stories.tsx +6 -17
- package/src/__future__/Tag/Tag/_docs/Tag.stickersheet.stories.tsx +5 -2
- package/src/__future__/Tag/Tag/_docs/Tag.stories.tsx +13 -6
- package/src/__future__/index.ts +1 -0
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stickersheet.stories.tsx +10 -10
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.stories.tsx +7 -4
- package/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx +4 -11
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.docs.stories.tsx +10 -10
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.spec.stories.tsx +3 -3
- package/codemods/utils/getTagName.spec.ts +0 -24
- package/codemods/utils/getTagName.ts +0 -32
- package/dist/cjs/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.cjs +0 -23
- package/dist/esm/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.mjs +0 -15
- package/dist/types/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.d.ts +0 -2
- package/src/__future__/Tag/RemovableTag/subcomponents/RemoveTagIcon.tsx +0 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
|
-
import { render, waitFor } from "@testing-library/react"
|
|
2
|
+
import { render, waitFor, screen } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
4
|
import { vi } from "vitest"
|
|
5
5
|
import {
|
|
@@ -83,10 +83,10 @@ describe("<MultiSelectOptions />", () => {
|
|
|
83
83
|
})
|
|
84
84
|
|
|
85
85
|
it("returns updated selected values when selecting an option", async () => {
|
|
86
|
-
const { getByRole
|
|
86
|
+
const { getByRole } = render(
|
|
87
87
|
<MultiSelectOptionsWrapper selectedValues={new Set(["pancakes"])} />
|
|
88
88
|
)
|
|
89
|
-
expect(
|
|
89
|
+
expect(screen.getAllByRole("checkbox", { checked: true }).length).toBe(1)
|
|
90
90
|
|
|
91
91
|
const waffleOption = getByRole("checkbox", { name: "Waffle" })
|
|
92
92
|
expect(waffleOption).not.toBeChecked()
|
|
@@ -96,17 +96,19 @@ describe("<MultiSelectOptions />", () => {
|
|
|
96
96
|
await waitFor(() => {
|
|
97
97
|
expect(onChange).toBeCalledWith(new Set(["pancakes", "waffle"]))
|
|
98
98
|
expect(waffleOption).toBeChecked()
|
|
99
|
-
expect(
|
|
99
|
+
expect(screen.getAllByRole("checkbox", { checked: true }).length).toBe(
|
|
100
|
+
2
|
|
101
|
+
)
|
|
100
102
|
})
|
|
101
103
|
})
|
|
102
104
|
|
|
103
105
|
it("returns updated selected values when unselecting an option", async () => {
|
|
104
|
-
const { getByRole
|
|
106
|
+
const { getByRole } = render(
|
|
105
107
|
<MultiSelectOptionsWrapper
|
|
106
108
|
selectedValues={new Set(["pancakes", "waffle"])}
|
|
107
109
|
/>
|
|
108
110
|
)
|
|
109
|
-
expect(
|
|
111
|
+
expect(screen.getAllByRole("checkbox", { checked: true }).length).toBe(2)
|
|
110
112
|
|
|
111
113
|
const waffleOption = getByRole("checkbox", { name: "Waffle" })
|
|
112
114
|
expect(waffleOption).toBeChecked()
|
|
@@ -116,7 +118,9 @@ describe("<MultiSelectOptions />", () => {
|
|
|
116
118
|
await waitFor(() => {
|
|
117
119
|
expect(onChange).toBeCalledWith(new Set(["pancakes"]))
|
|
118
120
|
expect(waffleOption).not.toBeChecked()
|
|
119
|
-
expect(
|
|
121
|
+
expect(screen.getAllByRole("checkbox", { checked: true }).length).toBe(
|
|
122
|
+
1
|
|
123
|
+
)
|
|
120
124
|
})
|
|
121
125
|
})
|
|
122
126
|
})
|
|
@@ -2,8 +2,7 @@ import React, { HTMLAttributes, forwardRef, useId } from "react"
|
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { ClearButton } from "~components/ClearButton"
|
|
4
4
|
import { FieldMessageProps } from "~components/FieldMessage"
|
|
5
|
-
import {
|
|
6
|
-
import { RemovableTag } from "~components/__future__"
|
|
5
|
+
import { Icon, RemovableTag } from "~components/__future__"
|
|
7
6
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
8
7
|
import { MultiSelectOption } from "../../types"
|
|
9
8
|
import styles from "./MultiSelectToggle.module.scss"
|
|
@@ -70,11 +69,10 @@ export const MultiSelectToggle = forwardRef<
|
|
|
70
69
|
onClick(e)
|
|
71
70
|
}}
|
|
72
71
|
>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
)}
|
|
72
|
+
<Icon
|
|
73
|
+
name={isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"}
|
|
74
|
+
isPresentational
|
|
75
|
+
/>
|
|
78
76
|
</button>
|
|
79
77
|
|
|
80
78
|
<div
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "~components/__future__/Icon"
|
|
3
3
|
import styles from "../GenericNotification/GenericNotification.module.scss"
|
|
4
4
|
|
|
5
5
|
type CancelButtonProps = {
|
|
@@ -14,7 +14,7 @@ export const CancelButton = ({ onClick }: CancelButtonProps): JSX.Element => (
|
|
|
14
14
|
data-testid="close-button"
|
|
15
15
|
aria-label="Close notification"
|
|
16
16
|
>
|
|
17
|
-
<
|
|
17
|
+
<Icon name="close" isPresentational />
|
|
18
18
|
</button>
|
|
19
19
|
)
|
|
20
20
|
|
|
@@ -165,12 +165,14 @@ $notification-slide-right: transform 300ms ease-out;
|
|
|
165
165
|
%ca-notification---toast & {
|
|
166
166
|
width: 22px;
|
|
167
167
|
height: 22px;
|
|
168
|
+
font-size: 22px;
|
|
168
169
|
margin-top: $spacing-6;
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
%ca-notification---global & {
|
|
172
173
|
width: 24px;
|
|
173
174
|
height: 24px;
|
|
175
|
+
font-size: 24px;
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
178
|
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { CautionIcon } from "~components/Icon/CautionIcon"
|
|
3
|
-
import { ExclamationIcon } from "~components/Icon/ExclamationIcon"
|
|
4
|
-
import { InformationIcon } from "~components/Icon/InformationIcon"
|
|
5
|
-
import { SecurityTipIcon } from "~components/Icon/SecurityTipIcon"
|
|
6
|
-
import { SuccessIcon } from "~components/Icon/SuccessIcon"
|
|
7
2
|
import {
|
|
8
3
|
NotificationType,
|
|
9
4
|
NotificationVariant,
|
|
10
5
|
} from "~components/Notification/types"
|
|
6
|
+
import { Icon } from "~components/__future__"
|
|
7
|
+
import styles from "./NotificationIcon.module.css"
|
|
8
|
+
|
|
9
|
+
const NotificationIcon = ({ name }: { name: string }): JSX.Element => (
|
|
10
|
+
<Icon
|
|
11
|
+
name={name}
|
|
12
|
+
isFilled
|
|
13
|
+
isPresentational
|
|
14
|
+
className={styles.notificationIcon}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
11
17
|
|
|
12
18
|
export type NotificationIconTypeProps = {
|
|
13
19
|
type: NotificationType
|
|
@@ -18,17 +24,17 @@ export const NotificationIconType = ({
|
|
|
18
24
|
}: NotificationIconTypeProps): JSX.Element => {
|
|
19
25
|
switch (type) {
|
|
20
26
|
case "positive":
|
|
21
|
-
return <
|
|
27
|
+
return <NotificationIcon name="check_circle" />
|
|
22
28
|
case "negative":
|
|
23
|
-
return <
|
|
29
|
+
return <NotificationIcon name="error" />
|
|
24
30
|
case "cautionary":
|
|
25
|
-
return <
|
|
31
|
+
return <NotificationIcon name="warning" />
|
|
26
32
|
case "informative":
|
|
27
|
-
return <
|
|
33
|
+
return <NotificationIcon name="info" />
|
|
28
34
|
case "security":
|
|
29
|
-
return <
|
|
35
|
+
return <NotificationIcon name="privacy_tip" />
|
|
30
36
|
default:
|
|
31
|
-
return <
|
|
37
|
+
return <NotificationIcon name="info" />
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
|
|
@@ -43,15 +49,15 @@ export const NotificationIconVariant = ({
|
|
|
43
49
|
}: NotificationIconVariantProps): JSX.Element => {
|
|
44
50
|
switch (variant) {
|
|
45
51
|
case "success":
|
|
46
|
-
return <
|
|
52
|
+
return <NotificationIcon name="check_circle" />
|
|
47
53
|
case "warning":
|
|
48
|
-
return <
|
|
54
|
+
return <NotificationIcon name="error" />
|
|
49
55
|
case "cautionary":
|
|
50
|
-
return <
|
|
56
|
+
return <NotificationIcon name="warning" />
|
|
51
57
|
case "informative":
|
|
52
|
-
return <
|
|
58
|
+
return <NotificationIcon name="info" />
|
|
53
59
|
case "security":
|
|
54
|
-
return <
|
|
60
|
+
return <NotificationIcon name="privacy_tip" />
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
|
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
@import "../../../__actions__/Button/v1/utils/variables";
|
|
5
5
|
|
|
6
6
|
%directional-link {
|
|
7
|
-
[dir="rtl"] & {
|
|
8
|
-
transform: rotate(180deg);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
7
|
border: $border-solid-border-width solid $color-blue-300;
|
|
12
8
|
|
|
13
9
|
@include enabled-pseudo-states-variant($color-blue-100, $color-blue-400);
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import {
|
|
3
|
-
ArrowBackwardIcon,
|
|
4
|
-
ArrowForwardIcon,
|
|
5
|
-
EndIcon,
|
|
6
|
-
StartIcon,
|
|
7
|
-
} from "~components/Icon"
|
|
8
2
|
import {
|
|
9
3
|
GenericButton,
|
|
10
4
|
GenericProps,
|
|
11
5
|
} from "~components/__actions__/Button/v2/GenericButton"
|
|
6
|
+
import { Icon } from "~components/__future__/Icon"
|
|
12
7
|
|
|
13
8
|
export type DirectionalLinkProps = {
|
|
14
9
|
label: string
|
|
@@ -16,11 +11,11 @@ export type DirectionalLinkProps = {
|
|
|
16
11
|
direction: "prev" | "next" | "start" | "end"
|
|
17
12
|
} & GenericProps
|
|
18
13
|
|
|
19
|
-
const
|
|
20
|
-
prev:
|
|
21
|
-
next:
|
|
22
|
-
start:
|
|
23
|
-
end:
|
|
14
|
+
const iconNameMap = {
|
|
15
|
+
prev: "arrow_back",
|
|
16
|
+
next: "arrow_forward",
|
|
17
|
+
start: "keyboard_tab_rtl",
|
|
18
|
+
end: "keyboard_tab",
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
/**
|
|
@@ -38,7 +33,13 @@ export const DirectionalLink = ({
|
|
|
38
33
|
{...otherProps}
|
|
39
34
|
iconButton
|
|
40
35
|
directionalLink
|
|
41
|
-
icon={
|
|
36
|
+
icon={
|
|
37
|
+
<Icon
|
|
38
|
+
name={iconNameMap[otherProps.direction]}
|
|
39
|
+
isPresentational
|
|
40
|
+
shouldMirrorInRTL
|
|
41
|
+
/>
|
|
42
|
+
}
|
|
42
43
|
/>
|
|
43
44
|
)
|
|
44
45
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "~components/__future__/Icon"
|
|
3
3
|
import styles from "./TruncateIndicator.module.scss"
|
|
4
4
|
|
|
5
5
|
export const TruncateIndicator = (): JSX.Element => (
|
|
@@ -7,6 +7,6 @@ export const TruncateIndicator = (): JSX.Element => (
|
|
|
7
7
|
className={styles.truncateIndicatorWrapper}
|
|
8
8
|
data-testid="truncate-indicator"
|
|
9
9
|
>
|
|
10
|
-
<
|
|
10
|
+
<Icon name="more_horiz" isPresentational />
|
|
11
11
|
</div>
|
|
12
12
|
)
|
|
@@ -140,15 +140,15 @@ $cautionary-box-border-color: var(--color-yellow-700);
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
.informativeIcon {
|
|
143
|
-
color:
|
|
143
|
+
color: var(--color-blue-500);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
.positiveIcon {
|
|
147
|
-
color:
|
|
147
|
+
color: var(--color-green-500);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
.negativeIcon {
|
|
151
|
-
color:
|
|
151
|
+
color: var(--color-red-500);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.cautionaryIcon {
|
package/src/Popover/Popover.tsx
CHANGED
|
@@ -2,8 +2,8 @@ import React, { HTMLAttributes, useMemo, useState } from "react"
|
|
|
2
2
|
import classnames from "classnames"
|
|
3
3
|
import { usePopper } from "react-popper"
|
|
4
4
|
import { Heading } from "~components/Heading"
|
|
5
|
-
import { CloseIcon } from "~components/Icon"
|
|
6
5
|
import { Text } from "~components/Text"
|
|
6
|
+
import { Icon } from "~components/__future__/Icon"
|
|
7
7
|
import { OverrideClassName } from "~components/types/OverrideClassName"
|
|
8
8
|
import { Placement, PopoverSize, PopoverVariant } from "./types"
|
|
9
9
|
import {
|
|
@@ -140,7 +140,7 @@ export const Popover = ({
|
|
|
140
140
|
type="button"
|
|
141
141
|
aria-label="close"
|
|
142
142
|
>
|
|
143
|
-
<
|
|
143
|
+
<Icon name="close" isPresentational isFilled />
|
|
144
144
|
</button>
|
|
145
145
|
)}
|
|
146
146
|
</div>
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import {
|
|
3
|
-
CautionIcon,
|
|
4
|
-
ExclamationIcon,
|
|
5
|
-
InformationIcon,
|
|
6
|
-
SuccessIcon,
|
|
7
|
-
} from "~components/Icon"
|
|
2
|
+
import { Icon } from "~components/__future__/Icon"
|
|
8
3
|
import styles from "../Popover.module.scss"
|
|
9
4
|
import { PopoverVariant, PopoverSize } from "../types"
|
|
10
5
|
|
|
@@ -43,15 +38,15 @@ export const mapVariantToIconClass = (
|
|
|
43
38
|
export const mapVariantToIcon = (variant: PopoverVariant): JSX.Element => {
|
|
44
39
|
switch (variant) {
|
|
45
40
|
case "informative":
|
|
46
|
-
return <
|
|
41
|
+
return <Icon name="info" isPresentational isFilled />
|
|
47
42
|
case "positive":
|
|
48
|
-
return <
|
|
43
|
+
return <Icon name="check_circle" isPresentational isFilled />
|
|
49
44
|
case "negative":
|
|
50
|
-
return <
|
|
45
|
+
return <Icon name="error" isPresentational isFilled />
|
|
51
46
|
case "cautionary":
|
|
52
|
-
return <
|
|
47
|
+
return <Icon name="warning" isPresentational isFilled />
|
|
53
48
|
default:
|
|
54
|
-
return <
|
|
49
|
+
return <Icon name="info" isPresentational isFilled />
|
|
55
50
|
}
|
|
56
51
|
}
|
|
57
52
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta } from "@storybook/react"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import {
|
|
5
5
|
StickerSheet,
|
|
6
6
|
StickerSheetStory,
|
|
@@ -25,36 +25,36 @@ const ToggleIconButtonGroup = ({
|
|
|
25
25
|
<StickerSheet.Row rowTitle={rowTitle}>
|
|
26
26
|
<ToggleIconButton
|
|
27
27
|
label="bold"
|
|
28
|
-
icon={<
|
|
28
|
+
icon={<Icon name="format_bold" isPresentational />}
|
|
29
29
|
{...props}
|
|
30
30
|
/>
|
|
31
31
|
<ToggleIconButton
|
|
32
32
|
label="bold"
|
|
33
|
-
icon={<
|
|
33
|
+
icon={<Icon name="format_bold" isPresentational />}
|
|
34
34
|
{...props}
|
|
35
35
|
data-sb-pseudo-styles="hover"
|
|
36
36
|
/>
|
|
37
37
|
<ToggleIconButton
|
|
38
38
|
label="bold"
|
|
39
|
-
icon={<
|
|
39
|
+
icon={<Icon name="format_bold" isPresentational />}
|
|
40
40
|
{...props}
|
|
41
41
|
isActive
|
|
42
42
|
/>
|
|
43
43
|
<ToggleIconButton
|
|
44
44
|
label="bold"
|
|
45
|
-
icon={<
|
|
45
|
+
icon={<Icon name="format_bold" isPresentational />}
|
|
46
46
|
{...props}
|
|
47
47
|
data-sb-pseudo-styles="focus"
|
|
48
48
|
/>
|
|
49
49
|
<ToggleIconButton
|
|
50
50
|
label="bold"
|
|
51
|
-
icon={<
|
|
51
|
+
icon={<Icon name="format_bold" isPresentational />}
|
|
52
52
|
{...props}
|
|
53
53
|
disabled
|
|
54
54
|
/>
|
|
55
55
|
<ToggleIconButton
|
|
56
56
|
label="bold"
|
|
57
|
-
icon={<
|
|
57
|
+
icon={<Icon name="format_bold" isPresentational />}
|
|
58
58
|
{...props}
|
|
59
59
|
disabled
|
|
60
60
|
data-sb-pseudo-styles="focus"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
4
4
|
import { ToggleIconButton } from "../ToggleIconButton"
|
|
5
5
|
|
|
6
6
|
const meta = {
|
|
7
7
|
title: "Components/RichTextEditor/Subcomponents/ToggleIconButton",
|
|
8
8
|
component: ToggleIconButton,
|
|
9
9
|
args: {
|
|
10
|
-
icon: <
|
|
10
|
+
icon: <Icon name="format_bold" isPresentational />,
|
|
11
11
|
label: "Bold",
|
|
12
12
|
},
|
|
13
13
|
argTypes: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { render, screen, waitFor } from "@testing-library/react"
|
|
3
3
|
import userEvent from "@testing-library/user-event"
|
|
4
|
-
import {
|
|
4
|
+
import { Icon } from "~components/__future__/Icon"
|
|
5
5
|
import { ToggleIconButton } from "../ToggleIconButton"
|
|
6
6
|
import { ToolbarSection } from "../ToolbarSection"
|
|
7
7
|
import { Toolbar } from "."
|
|
@@ -11,14 +11,17 @@ const user = userEvent.setup()
|
|
|
11
11
|
const ExampleToolbar = (): JSX.Element => (
|
|
12
12
|
<Toolbar aria-label="Toolbar" aria-controls="editable-id">
|
|
13
13
|
<ToolbarSection>
|
|
14
|
-
<ToggleIconButton
|
|
14
|
+
<ToggleIconButton
|
|
15
|
+
label="Bold"
|
|
16
|
+
icon={<Icon name="format_bold" isPresentational />}
|
|
17
|
+
/>
|
|
15
18
|
<ToggleIconButton
|
|
16
19
|
label="Italic"
|
|
17
|
-
icon={<
|
|
20
|
+
icon={<Icon name="format_italic" isPresentational />}
|
|
18
21
|
/>
|
|
19
22
|
<ToggleIconButton
|
|
20
23
|
label="Underline"
|
|
21
|
-
icon={<
|
|
24
|
+
icon={<Icon name="format_underlined" isPresentational />}
|
|
22
25
|
/>
|
|
23
26
|
</ToolbarSection>
|
|
24
27
|
</Toolbar>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react"
|
|
3
|
-
import {
|
|
4
|
-
BoldIcon,
|
|
5
|
-
BullettedListIcon,
|
|
6
|
-
ItalicsIcon,
|
|
7
|
-
NumberedListIcon,
|
|
8
|
-
UnderlineIcon,
|
|
9
|
-
} from "~components/Icon"
|
|
3
|
+
import { Icon } from "~components/__future__/Icon"
|
|
10
4
|
import { ToggleIconButton } from "../../ToggleIconButton"
|
|
11
5
|
import { ToolbarSection } from "../../ToolbarSection"
|
|
12
6
|
import { Toolbar } from "../index"
|
|
@@ -22,25 +16,37 @@ const meta = {
|
|
|
22
16
|
<ToolbarSection>
|
|
23
17
|
<ToggleIconButton
|
|
24
18
|
label="Bold"
|
|
25
|
-
icon={<
|
|
19
|
+
icon={<Icon name="format_bold" isPresentational />}
|
|
26
20
|
/>
|
|
27
21
|
<ToggleIconButton
|
|
28
22
|
label="Italic"
|
|
29
|
-
icon={<
|
|
23
|
+
icon={<Icon name="format_italic" isPresentational />}
|
|
30
24
|
/>
|
|
31
25
|
<ToggleIconButton
|
|
32
26
|
label="Underline"
|
|
33
|
-
icon={<
|
|
27
|
+
icon={<Icon name="format_underlined" isPresentational />}
|
|
34
28
|
/>
|
|
35
29
|
</ToolbarSection>
|
|
36
30
|
<ToolbarSection>
|
|
37
31
|
<ToggleIconButton
|
|
38
32
|
label="Bullet list"
|
|
39
|
-
icon={
|
|
33
|
+
icon={
|
|
34
|
+
<Icon
|
|
35
|
+
name="format_list_bulleted"
|
|
36
|
+
isPresentational
|
|
37
|
+
shouldMirrorInRTL
|
|
38
|
+
/>
|
|
39
|
+
}
|
|
40
40
|
/>
|
|
41
41
|
<ToggleIconButton
|
|
42
42
|
label="Numbered list"
|
|
43
|
-
icon={
|
|
43
|
+
icon={
|
|
44
|
+
<Icon
|
|
45
|
+
name="format_list_numbered"
|
|
46
|
+
isPresentational
|
|
47
|
+
shouldMirrorInRTL
|
|
48
|
+
/>
|
|
49
|
+
}
|
|
44
50
|
/>
|
|
45
51
|
</ToolbarSection>
|
|
46
52
|
</>
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import {
|
|
3
|
-
AddLinkIcon,
|
|
4
|
-
BoldIcon,
|
|
5
|
-
BullettedListIcon,
|
|
6
|
-
DecreaseIndentIcon,
|
|
7
|
-
IncreaseIndentIcon,
|
|
8
|
-
ItalicsIcon,
|
|
9
|
-
NumberedListIcon,
|
|
10
|
-
UnderlineIcon,
|
|
11
|
-
} from "~components/Icon"
|
|
2
|
+
import { Icon } from "~components/__future__/Icon"
|
|
12
3
|
import { ToolbarItems, ToolbarControlTypes } from "../../types"
|
|
13
4
|
import { listIsActive, markIsActive } from "../../utils/commands"
|
|
14
5
|
import {
|
|
@@ -210,7 +201,7 @@ export const buildControlMap = (
|
|
|
210
201
|
isActive: markIsActive(editorState, type),
|
|
211
202
|
action: createToggleMarkCommand(type),
|
|
212
203
|
label: "Bold",
|
|
213
|
-
icon: <
|
|
204
|
+
icon: <Icon name="format_bold" isPresentational />,
|
|
214
205
|
})
|
|
215
206
|
}
|
|
216
207
|
|
|
@@ -221,7 +212,7 @@ export const buildControlMap = (
|
|
|
221
212
|
isActive: markIsActive(editorState, type),
|
|
222
213
|
action: createToggleMarkCommand(type),
|
|
223
214
|
label: "Italic",
|
|
224
|
-
icon: <
|
|
215
|
+
icon: <Icon name="format_italic" isPresentational />,
|
|
225
216
|
})
|
|
226
217
|
}
|
|
227
218
|
|
|
@@ -232,7 +223,7 @@ export const buildControlMap = (
|
|
|
232
223
|
isActive: markIsActive(editorState, type),
|
|
233
224
|
action: createToggleMarkCommand(type),
|
|
234
225
|
label: "Underline",
|
|
235
|
-
icon: <
|
|
226
|
+
icon: <Icon name="format_underlined" isPresentational />,
|
|
236
227
|
})
|
|
237
228
|
}
|
|
238
229
|
|
|
@@ -243,7 +234,9 @@ export const buildControlMap = (
|
|
|
243
234
|
action: createToggleListCommand(type),
|
|
244
235
|
isActive: listIsActive(editorState, type, listNodes),
|
|
245
236
|
label: "Bullet List",
|
|
246
|
-
icon:
|
|
237
|
+
icon: (
|
|
238
|
+
<Icon name="format_list_bulleted" isPresentational shouldMirrorInRTL />
|
|
239
|
+
),
|
|
247
240
|
})
|
|
248
241
|
}
|
|
249
242
|
|
|
@@ -254,7 +247,9 @@ export const buildControlMap = (
|
|
|
254
247
|
action: createToggleListCommand(type),
|
|
255
248
|
isActive: listIsActive(editorState, type, listNodes),
|
|
256
249
|
label: "Numbered List",
|
|
257
|
-
icon:
|
|
250
|
+
icon: (
|
|
251
|
+
<Icon name="format_list_numbered" isPresentational shouldMirrorInRTL />
|
|
252
|
+
),
|
|
258
253
|
})
|
|
259
254
|
}
|
|
260
255
|
|
|
@@ -270,14 +265,26 @@ export const buildControlMap = (
|
|
|
270
265
|
disabled: liftListIsDisabled(editorState),
|
|
271
266
|
isActive: false,
|
|
272
267
|
label: "Decrease indent",
|
|
273
|
-
icon:
|
|
268
|
+
icon: (
|
|
269
|
+
<Icon
|
|
270
|
+
name="format_indent_decrease"
|
|
271
|
+
isPresentational
|
|
272
|
+
shouldMirrorInRTL
|
|
273
|
+
/>
|
|
274
|
+
),
|
|
274
275
|
},
|
|
275
276
|
{
|
|
276
277
|
action: createIndentListCommand(),
|
|
277
278
|
disabled: indentListIsDisabled(editorState),
|
|
278
279
|
isActive: false,
|
|
279
280
|
label: "Increase indent",
|
|
280
|
-
icon:
|
|
281
|
+
icon: (
|
|
282
|
+
<Icon
|
|
283
|
+
name="format_indent_increase"
|
|
284
|
+
isPresentational
|
|
285
|
+
shouldMirrorInRTL
|
|
286
|
+
/>
|
|
287
|
+
),
|
|
281
288
|
}
|
|
282
289
|
)
|
|
283
290
|
}
|
|
@@ -290,7 +297,7 @@ export const buildControlMap = (
|
|
|
290
297
|
disabled: editorState.selection.empty,
|
|
291
298
|
isActive: false,
|
|
292
299
|
label: "Link",
|
|
293
|
-
icon: <
|
|
300
|
+
icon: <Icon name="add_link" isPresentational />,
|
|
294
301
|
})
|
|
295
302
|
}
|
|
296
303
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import { EditIcon, ExternalLinkIcon, RemoveLinkIcon } from "~components/Icon"
|
|
3
2
|
import { usePopover } from "~components/Popover"
|
|
4
3
|
import { Text } from "~components/Text"
|
|
4
|
+
import { Icon } from "~components/__future__/Icon"
|
|
5
5
|
import { SelectionPosition } from "../../types"
|
|
6
6
|
import { Positioner } from "./Positioner"
|
|
7
7
|
import styles from "./LinkPopover.module.scss"
|
|
@@ -26,7 +26,7 @@ export const LinkPopover = ({
|
|
|
26
26
|
<Positioner ref={ElementRef} {...selectionPosition} />
|
|
27
27
|
<Popover size="large">
|
|
28
28
|
<div className={styles.popoverContent}>
|
|
29
|
-
<
|
|
29
|
+
<Icon name="open_in_new" isPresentational />
|
|
30
30
|
<div className={styles.popoverLinkContainer}>
|
|
31
31
|
<Text
|
|
32
32
|
variant="body"
|
|
@@ -44,13 +44,9 @@ export const LinkPopover = ({
|
|
|
44
44
|
</Text>
|
|
45
45
|
</div>
|
|
46
46
|
<div className={styles.popoverActions}>
|
|
47
|
-
<
|
|
47
|
+
<Icon name="edit" onClick={onEdit} alt="Edit link" />
|
|
48
48
|
</div>
|
|
49
|
-
<
|
|
50
|
-
role="img"
|
|
51
|
-
onClick={onRemove}
|
|
52
|
-
aria-label="Remove link"
|
|
53
|
-
/>
|
|
49
|
+
<Icon name="link_off" onClick={onRemove} alt="Remove link" />
|
|
54
50
|
</div>
|
|
55
51
|
</Popover>
|
|
56
52
|
</>
|