@indico-data/design-system 2.1.2 → 2.2.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/README.md +10 -1
- package/lib/build/generated/iconTypes.d.ts +2 -0
- package/lib/index.css +37 -0
- package/lib/index.d.ts +11 -1364
- package/lib/index.esm.css +37 -0
- package/lib/index.esm.js +28288 -12273
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +28289 -12276
- package/lib/index.js.map +1 -1
- package/lib/{components → src/components}/button/types.d.ts +1 -1
- package/lib/src/components/icons/Icon.d.ts +4 -0
- package/lib/src/components/icons/Icon.stories.d.ts +10 -0
- package/lib/src/components/icons/index.d.ts +1 -0
- package/lib/src/components/icons/types.d.ts +10 -0
- package/lib/{components → src/components}/index.d.ts +1 -0
- package/lib/src/index.d.ts +8 -0
- package/lib/{legacy → src/legacy}/components/Toggle/Toggle.d.ts +2 -1
- package/lib/src/legacy/components/Toggle/Toggle.stories.d.ts +21 -0
- package/lib/{legacy → src/legacy}/components/index.d.ts +0 -1
- package/lib/{legacy → src/legacy}/components/inputs/NoInputDatePicker/NoInputDatePicker.d.ts +2 -1
- package/lib/{legacy → src/legacy}/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +3 -4
- package/lib/src/legacy/components/text-truncate/TextTruncate.test.d.ts +1 -0
- package/lib/src/types.d.ts +12 -0
- package/package.json +17 -14
- package/rollup.config.mjs +2 -2
- package/scripts/generateIconTypes.js +50 -0
- package/src/components/button/Button.tsx +1 -2
- package/src/components/button/types.ts +2 -1
- package/src/components/icons/Icon.mdx +49 -0
- package/src/components/icons/Icon.stories.tsx +248 -0
- package/src/components/icons/Icon.tsx +45 -0
- package/src/components/icons/__tests__/Icon.test.tsx +104 -0
- package/src/components/icons/index.ts +1 -0
- package/src/{legacy/components/Icon → components/icons}/indicons.tsx +17 -17
- package/src/components/icons/styles/Icon.scss +23 -0
- package/src/components/icons/types.ts +12 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +1 -3
- package/src/legacy/components/Accordion/Accordion.tsx +2 -2
- package/src/legacy/components/ListTable/Header/Header.tsx +1 -2
- package/src/legacy/components/ListTable/ListTable.stories.tsx +2 -1
- package/src/legacy/components/Navigation/Drawer/Drawer.tsx +2 -2
- package/src/legacy/components/Navigation/Drawer/DrawerLinkList.tsx +2 -2
- package/src/legacy/components/Toggle/Toggle.styles.ts +1 -1
- package/src/legacy/components/Toggle/Toggle.tsx +17 -4
- package/src/legacy/components/basic-section/SectionTable/SectionTable.tsx +1 -1
- package/src/legacy/components/buttons/Button/Button.tsx +1 -1
- package/src/legacy/components/buttons/IconButton/IconButton.tsx +2 -2
- package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.tsx +1 -1
- package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.tsx +8 -7
- package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.ts +3 -1
- package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.tsx +2 -2
- package/src/legacy/components/dropdowns/Select/Select.tsx +3 -3
- package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.tsx +2 -2
- package/src/legacy/components/index.ts +1 -1
- package/src/legacy/components/inputs/EditableInput/EditableInput.tsx +1 -1
- package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.stories.tsx +2 -2
- package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.tsx +5 -4
- package/src/legacy/components/inputs/NumberInput/NumberInput.tsx +1 -1
- package/src/legacy/components/inputs/SearchInput/SearchInput.tsx +1 -1
- package/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.tsx +8 -8
- package/src/legacy/components/user-feedback/Shrug/Shrug.styles.ts +2 -0
- package/src/legacy/components/user-feedback/Shrug/Shrug.tsx +4 -4
- package/src/styles/index.scss +1 -0
- package/src/styles/variables/_icons.scss +7 -0
- package/src/styles/variables/index.scss +2 -1
- package/src/types.ts +3 -10
- package/tsconfig.json +1 -1
- package/lib/legacy/components/Icon/Icon.d.ts +0 -17
- package/lib/legacy/components/Icon/Icon.stories.d.ts +0 -42
- package/lib/legacy/components/Icon/faIcons.d.ts +0 -76
- package/lib/legacy/components/Icon/index.d.ts +0 -3
- package/lib/legacy/components/Icon/storyHelpers.d.ts +0 -9
- package/lib/legacy/components/Toggle/Toggle.stories.d.ts +0 -21
- package/lib/types.d.ts +0 -231
- package/src/legacy/components/Icon/Icon.stories.tsx +0 -61
- package/src/legacy/components/Icon/Icon.tsx +0 -76
- package/src/legacy/components/Icon/faIcons.tsx +0 -168
- package/src/legacy/components/Icon/index.ts +0 -3
- package/src/legacy/components/Icon/storyHelpers.tsx +0 -88
- /package/lib/{components → src/components}/button/Button.d.ts +0 -0
- /package/lib/{components → src/components}/button/Button.stories.d.ts +0 -0
- /package/lib/{components → src/components}/button/__tests__/Button.test.d.ts +0 -0
- /package/lib/{components → src/components}/button/enums.d.ts +0 -0
- /package/lib/{components → src/components}/button/index.d.ts +0 -0
- /package/lib/{components → src/components}/grid/col/Col.d.ts +0 -0
- /package/lib/{components → src/components}/grid/col/Col.stories.d.ts +0 -0
- /package/lib/{components → src/components}/grid/container/Container.d.ts +0 -0
- /package/lib/{components → src/components}/grid/container/Container.stories.d.ts +0 -0
- /package/lib/{components → src/components}/grid/index.d.ts +0 -0
- /package/lib/{components → src/components}/grid/row/Row.d.ts +0 -0
- /package/lib/{components → src/components}/grid/row/Row.stories.d.ts +0 -0
- /package/lib/{legacy/components/Navigation/Drawer/__tests__/DrawerLinkList.test.d.ts → src/components/icons/__tests__/Icon.test.d.ts} +0 -0
- /package/lib/{legacy/components/Icon → src/components/icons}/indicons.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Accordion/Accordion.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Accordion/Accordion.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Accordion/Accordion.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Accordion/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/ListTable/Header/Header.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/ListTable/Header/Header.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/ListTable/Header/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/ListTable/ListTable.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/ListTable/ListTable.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/ListTable/ListTable.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/ListTable/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/ListTable/mock-data/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/ListTable/mock-data/mock-data.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/LoadingAwareContainer/LoadingAwareContainer.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/LoadingAwareContainer/LoadingAwareContainer.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/LoadingAwareContainer/LoadingAwareContainer.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/LoadingAwareContainer/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Navigation/Drawer/Drawer.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Navigation/Drawer/Drawer.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Navigation/Drawer/DrawerLinkList.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Navigation/Drawer/DrawerLinkList.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Navigation/Drawer/__mocks__/mocks.d.ts +0 -0
- /package/lib/{legacy/components/text-truncate/TextTruncate.test.d.ts → src/legacy/components/Navigation/Drawer/__tests__/DrawerLinkList.test.d.ts} +0 -0
- /package/lib/{legacy → src/legacy}/components/Navigation/Drawer/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Navigation/Drawer/types.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Navigation/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Pagination/Pagination.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Pagination/Pagination.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Pagination/Pagination.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Pagination/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Toggle/Toggle.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Toggle/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Tooltip/Tooltip.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Tooltip/Tooltip.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Tooltip/Tooltip.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/Tooltip/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/Section/Section.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/Section/Section.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/Section/Section.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/Section/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionBlock/SectionBlock.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionBlock/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionBody/SectionBody.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionBody/SectionBody.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionBody/SectionBody.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionBody/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionHeader/SectionHeader.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionHeader/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionTable/SectionTable.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionTable/SectionTable.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/SectionTable/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/basic-section/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/Button/Button.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/Button/Button.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/Button/Button.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/Button/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/IconButton/IconButton.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/IconButton/IconButton.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/IconButton/IconButton.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/IconButton/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/commonStyles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/buttons/types.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/BorderSelect/BorderSelect.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/BorderSelect/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/MultiCombobox/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/Select/Select.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/Select/Select.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/Select/Select.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/Select/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/SingleCombobox/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/commonStyles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/types.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/useCombobox.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/dropdowns/utils.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/DatePicker/DatePicker.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/DatePicker/DatePicker.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/DatePicker/DatePicker.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/DatePicker/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/EditableInput/EditableInput.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/EditableInput/EditableInput.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/EditableInput/EditableInput.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/EditableInput/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/NoInputDatePicker/NoInputDatePicker.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/NoInputDatePicker/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/NumberInput/NumberInput.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/NumberInput/NumberInput.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/NumberInput/NumberInput.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/NumberInput/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/RadioButtons/RadioButtons.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/RadioButtons/RadioButtons.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/RadioButtons/RadioButtons.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/RadioButtons/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/RadioGroup/RadioGroup.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/RadioGroup/RadioGroup.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/RadioGroup/RadioGroup.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/RadioGroup/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/SearchInput/SearchInput.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/SearchInput/SearchInput.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/SearchInput/SearchInput.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/SearchInput/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/TextInput/TextInput.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/TextInput/TextInput.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/TextInput/TextInput.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/TextInput/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/inputs/inputsCommon.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/BarSpinner/BarSpinner.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/BarSpinner/BarSpinner.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/BarSpinner/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/CirclePulse/CirclePulse.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/CirclePulse/CirclePulse.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/CirclePulse/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/CircleSpinner/CircleSpinner.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/CircleSpinner/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/LoadingIndicator/LoadingIndicator.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/LoadingIndicator/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/LoadingList/LoadingList.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/LoadingList/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/PercentageRing/PercentageRing.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/PercentageRing/PercentageRing.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/PercentageRing/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/RandomLoadingMessage/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/RandomLoadingMessage/random-messages.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/loading-indicators/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/modals/ConfirmModal/ConfirmModal.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/modals/ConfirmModal/ConfirmModal.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/modals/ConfirmModal/ConfirmModal.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/modals/ConfirmModal/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/modals/ModalBase/ModalBase.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/modals/ModalBase/ModalBase.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/modals/ModalBase/ModalBase.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/modals/ModalBase/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/modals/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/text-truncate/TextTruncate.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/text-truncate/TextTruncate.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/text-truncate/TextTruncate.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/text-truncate/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/user-feedback/Shrug/Shrug.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/user-feedback/Shrug/Shrug.stories.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/user-feedback/Shrug/Shrug.styles.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/user-feedback/Shrug/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/components/user-feedback/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/buttons.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/forms.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/layout.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/lists.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/margin-padding.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/media.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/tables.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/typography.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/globals/utility-classes.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/styles/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/tokens/animation.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/tokens/breakpoints.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/tokens/colors.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/tokens/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/tokens/margin.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/tokens/numbers.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/tokens/padding.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/tokens/spacings.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/tokens/typography.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/utils/color.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/utils/index.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/utils/number.d.ts +0 -0
- /package/lib/{legacy → src/legacy}/utils/string.d.ts +0 -0
- /package/lib/{setupTests.d.ts → src/setupTests.d.ts} +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/borders/BorderColor.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/borders/BorderColor.stories.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/borders/BorderRadius.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/borders/BorderRadius.stories.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/borders/BorderStyles.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/borders/BorderStyles.stories.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/borders/BorderThickness.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/borders/BorderThickness.stories.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/borders/index.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/colors/Colors.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/colors/Colors.stories.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/colors/Swatch.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/colors/UtilityClasses.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/colors/UtilityClasses.stories.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/colors/constants.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/colors/hooks.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/colors/index.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/sizing/Sizing.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/sizing/Sizing.stories.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/sizing/index.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/typography/Typography.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/typography/Typography.stories.d.ts +0 -0
- /package/lib/{stylesAndAnimations → src/stylesAndAnimations}/typography/index.d.ts +0 -0
|
@@ -6,7 +6,7 @@ import { numberUtils } from '@/legacy/utils';
|
|
|
6
6
|
|
|
7
7
|
import { BorderSelect } from '@/legacy/components/dropdowns';
|
|
8
8
|
import { Button } from '@/legacy/components/buttons';
|
|
9
|
-
import { Icon } from '@/
|
|
9
|
+
import { Icon } from '@/components/icons';
|
|
10
10
|
|
|
11
11
|
import { StyledHeader } from './Header.styles';
|
|
12
12
|
|
|
@@ -57,7 +57,6 @@ export const Header = (props: Props) => {
|
|
|
57
57
|
<Icon
|
|
58
58
|
name="fa-arrow-down"
|
|
59
59
|
ariaLabel="descending"
|
|
60
|
-
size={[16]}
|
|
61
60
|
style={{ transform: sortBy.descending ? '' : 'rotate(180deg)' }}
|
|
62
61
|
/>
|
|
63
62
|
</Button>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
|
|
4
|
-
import { Button
|
|
4
|
+
import { Button } from '@/legacy/components';
|
|
5
5
|
|
|
6
6
|
import { ListTable } from './ListTable';
|
|
7
7
|
import { mockUserHeaders, mockDocProcHeaders, mockAllUsers, mockDocProcReport } from './mock-data';
|
|
8
|
+
import { Icon } from '@/components/icons';
|
|
8
9
|
|
|
9
10
|
const meta = {
|
|
10
11
|
component: ListTable,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { IconName, PermafrostComponent } from '@/types';
|
|
15
|
-
import { Icon } from '
|
|
15
|
+
import { Icon } from '@/components/icons';
|
|
16
16
|
import { DrawerLinkList } from './DrawerLinkList';
|
|
17
17
|
import { ListItem } from './types';
|
|
18
18
|
import './Drawer.scss';
|
|
@@ -77,7 +77,7 @@ export const Drawer = (props: Props) => {
|
|
|
77
77
|
headerComponent
|
|
78
78
|
) : (
|
|
79
79
|
<span>
|
|
80
|
-
{logoIcon ? <Icon name={logoIcon} size=
|
|
80
|
+
{logoIcon ? <Icon name={logoIcon} size="lg" data-testid="logo-icon" /> : null}
|
|
81
81
|
<p
|
|
82
82
|
data-testid="logo-text"
|
|
83
83
|
className="pf__drawer__header__logo-text"
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { PermafrostComponent } from '@/types';
|
|
4
4
|
import { StyledDrawerLinkList } from './DrawerLinkList.styles';
|
|
5
|
-
import { Icon } from '
|
|
5
|
+
import { Icon } from '@/components/icons';
|
|
6
6
|
import { ListItem } from './types';
|
|
7
7
|
import { NavLink } from 'react-router-dom';
|
|
8
8
|
|
|
@@ -43,7 +43,7 @@ export const DrawerLinkList = (props: Props) => {
|
|
|
43
43
|
>
|
|
44
44
|
<li className="drawer__list__item__link">
|
|
45
45
|
<span className={`drawer__list__item__icon`}>
|
|
46
|
-
<Icon size=
|
|
46
|
+
<Icon size="lg" name={item.icon} ariaLabel={`${item.label} icon`} />
|
|
47
47
|
</span>
|
|
48
48
|
<span
|
|
49
49
|
className={`drawer__list__item__label ${
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
|
|
6
|
-
import { Icon } from '@/
|
|
6
|
+
import { Icon } from '@/components/icons';
|
|
7
7
|
import { PermafrostComponent, IconName } from '@/types';
|
|
8
8
|
import { StyledToggle } from './Toggle.styles';
|
|
9
|
+
import { IconSizes } from '@/components/icons/types';
|
|
9
10
|
|
|
10
11
|
type Props = {
|
|
11
12
|
disabled: boolean;
|
|
12
13
|
onChange: any;
|
|
13
14
|
value: boolean;
|
|
14
15
|
['aria-label']?: string;
|
|
15
|
-
iconSize?:
|
|
16
|
+
iconSize?: IconSizes;
|
|
16
17
|
checkedIconName?: IconName;
|
|
17
18
|
notCheckedIconName?: IconName;
|
|
18
19
|
} & PermafrostComponent;
|
|
@@ -29,6 +30,8 @@ export const Toggle = (props: Props) => {
|
|
|
29
30
|
iconSize,
|
|
30
31
|
} = props;
|
|
31
32
|
|
|
33
|
+
const defaultIconStyle = { width: '5px', height: '5px' };
|
|
34
|
+
|
|
32
35
|
return (
|
|
33
36
|
<StyledToggle
|
|
34
37
|
className={classNames(className, {
|
|
@@ -47,10 +50,20 @@ export const Toggle = (props: Props) => {
|
|
|
47
50
|
<span className="slider round" />
|
|
48
51
|
|
|
49
52
|
{checkedIconName && (
|
|
50
|
-
<Icon
|
|
53
|
+
<Icon
|
|
54
|
+
size={iconSize}
|
|
55
|
+
name={checkedIconName}
|
|
56
|
+
className="checked-icon"
|
|
57
|
+
style={iconSize ? undefined : defaultIconStyle}
|
|
58
|
+
/>
|
|
51
59
|
)}
|
|
52
60
|
{notCheckedIconName && (
|
|
53
|
-
<Icon
|
|
61
|
+
<Icon
|
|
62
|
+
size={iconSize}
|
|
63
|
+
name={notCheckedIconName}
|
|
64
|
+
className="not-checked-icon"
|
|
65
|
+
style={iconSize ? undefined : defaultIconStyle}
|
|
66
|
+
/>
|
|
54
67
|
)}
|
|
55
68
|
</StyledToggle>
|
|
56
69
|
);
|
|
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
|
|
6
6
|
import { IconName } from '@/types';
|
|
7
|
-
import { Icon } from '@/
|
|
7
|
+
import { Icon } from '@/components/icons';
|
|
8
8
|
import { BorderSelect } from '@/legacy/components/dropdowns';
|
|
9
9
|
|
|
10
10
|
import { StyledSectionTable } from './SectionTable.styles';
|
|
@@ -66,7 +66,7 @@ export function Button(props: ButtonProps): React.ReactElement {
|
|
|
66
66
|
type={type || 'button'}
|
|
67
67
|
{...rest}
|
|
68
68
|
>
|
|
69
|
-
{busy && <CircleSpinner
|
|
69
|
+
{busy && <CircleSpinner className="mr-2" />}
|
|
70
70
|
|
|
71
71
|
{children}
|
|
72
72
|
</StyledButton>
|
|
@@ -8,7 +8,8 @@ import { AriaButtonProps } from '@react-types/button';
|
|
|
8
8
|
|
|
9
9
|
import { SPACING } from '@/legacy/tokens';
|
|
10
10
|
import { IconName, PermafrostComponent } from '@/types';
|
|
11
|
-
import { Icon
|
|
11
|
+
import { Icon } from '@/components/icons';
|
|
12
|
+
import { CircleSpinner } from '@/legacy/components';
|
|
12
13
|
import { ButtonSize, IconButtonVariant } from '../types';
|
|
13
14
|
|
|
14
15
|
import { StyledIconButton, StyledIconButtonLink } from './IconButton.styles';
|
|
@@ -81,7 +82,6 @@ export function IconButton(props: Props) {
|
|
|
81
82
|
|
|
82
83
|
const iconElement = busy ? (
|
|
83
84
|
<CircleSpinner
|
|
84
|
-
size="1em"
|
|
85
85
|
style={{
|
|
86
86
|
marginTop: `${adjustAlignment}px`,
|
|
87
87
|
marginBottom: `${Math.abs(adjustAlignment)}px`,
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { v4 as uuid } from 'uuid';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
|
|
7
|
-
import { Icon } from '
|
|
7
|
+
import { Icon } from '@/components/icons';
|
|
8
8
|
import { PermafrostComponent } from '@/types';
|
|
9
9
|
|
|
10
10
|
import { StyledSelect, StyledValidationError } from './BorderSelect.styles';
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import React, { useRef } from 'react';
|
|
4
4
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
5
|
|
|
6
|
-
import { Icon, IconButton } from '@/legacy/components';
|
|
7
6
|
import { ComboboxOption } from '../types';
|
|
8
7
|
import { MultiCombobox } from './MultiCombobox';
|
|
9
8
|
import { useCombobox } from '../useCombobox';
|
|
9
|
+
import { Button, Icon } from '@/index';
|
|
10
10
|
|
|
11
11
|
const options = [
|
|
12
12
|
{ value: 'angie', label: 'angie - Labeler' },
|
|
@@ -35,13 +35,14 @@ function StoryRender(props: any) {
|
|
|
35
35
|
return (
|
|
36
36
|
<>
|
|
37
37
|
<MultiCombobox ref={selectEl} {...props} />
|
|
38
|
-
<
|
|
39
|
-
adjustAlignment={0}
|
|
38
|
+
<Button
|
|
40
39
|
iconName="trash"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
onClick={() => clearValue()}
|
|
41
|
+
ariaLabel="clear selections"
|
|
42
|
+
className="mt-4"
|
|
43
|
+
>
|
|
44
|
+
clear selections
|
|
45
|
+
</Button>
|
|
45
46
|
</>
|
|
46
47
|
);
|
|
47
48
|
}
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { components } from 'react-select';
|
|
5
5
|
|
|
6
6
|
import { PermafrostComponent } from '@/types';
|
|
7
|
-
import { Icon } from '
|
|
7
|
+
import { Icon } from '@/components/icons';
|
|
8
8
|
import { addCustomProps } from '../utils';
|
|
9
9
|
import type { ComboboxProps, ComboboxOption } from '../types';
|
|
10
10
|
|
|
@@ -62,7 +62,7 @@ export const MultiCombobox = React.forwardRef((props: Props, ref: any) => {
|
|
|
62
62
|
const MultiValueRemove = (props: any) => {
|
|
63
63
|
return (
|
|
64
64
|
<components.MultiValueRemove {...props}>
|
|
65
|
-
<Icon name="x-close" ariaLabel="remove" size=
|
|
65
|
+
<Icon name="x-close" ariaLabel="remove" size="xs" />
|
|
66
66
|
</components.MultiValueRemove>
|
|
67
67
|
);
|
|
68
68
|
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { v4 as uuid } from 'uuid';
|
|
4
4
|
|
|
5
|
-
import { Icon } from '@/
|
|
5
|
+
import { Icon } from '@/components/icons';
|
|
6
6
|
import { PermafrostComponent } from '@/types';
|
|
7
7
|
|
|
8
8
|
import { StyledSelect } from './Select.styles';
|
|
@@ -61,8 +61,8 @@ export const Select = (props: Props) => {
|
|
|
61
61
|
);
|
|
62
62
|
})}
|
|
63
63
|
</select>
|
|
64
|
-
|
|
65
|
-
<Icon className="chevron" name="chevron-down" size={size === 'small' ?
|
|
64
|
+
{/* TODO: Fix this size mismatch when bringing Select into DS */}
|
|
65
|
+
<Icon className="chevron" name="chevron-down" size={size === 'small' ? 'xs' : 'sm'} />
|
|
66
66
|
</div>
|
|
67
67
|
</StyledSelect>
|
|
68
68
|
);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { components } from 'react-select';
|
|
4
4
|
|
|
5
|
-
import { Icon } from '@/
|
|
5
|
+
import { Icon } from '@/components/icons';
|
|
6
6
|
import { PermafrostComponent } from '@/types';
|
|
7
7
|
import { addCustomProps } from '../utils';
|
|
8
8
|
|
|
@@ -53,7 +53,7 @@ export const SingleCombobox = React.forwardRef((props: Props, ref: any) => {
|
|
|
53
53
|
const DropdownIndicator = (props: any) => {
|
|
54
54
|
return (
|
|
55
55
|
<components.DropdownIndicator {...props}>
|
|
56
|
-
<Icon name="fa-caret-down" ariaLabel="open dropdown"
|
|
56
|
+
<Icon name="fa-caret-down" ariaLabel="open dropdown" />
|
|
57
57
|
</components.DropdownIndicator>
|
|
58
58
|
);
|
|
59
59
|
};
|
|
@@ -2,7 +2,7 @@ export { Accordion } from './Accordion';
|
|
|
2
2
|
export { Section, SectionBlock, SectionBody, SectionHeader, SectionTable } from './basic-section';
|
|
3
3
|
export { Button, IconButton } from './buttons';
|
|
4
4
|
export { BorderSelect, MultiCombobox, Select, SingleCombobox } from './dropdowns';
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
export {
|
|
7
7
|
EditableInput,
|
|
8
8
|
NumberInput,
|
|
@@ -8,7 +8,7 @@ import classNames from 'classnames';
|
|
|
8
8
|
|
|
9
9
|
import { stringUtils } from '@/legacy/utils';
|
|
10
10
|
|
|
11
|
-
import { Icon } from '@/
|
|
11
|
+
import { Icon } from '@/components/icons';
|
|
12
12
|
import { PermafrostComponent } from '@/types';
|
|
13
13
|
|
|
14
14
|
import { StyledEditableInput } from './EditableInput.styles';
|
|
@@ -27,7 +27,7 @@ export const Single: Story = {
|
|
|
27
27
|
label: 'Pick a date:',
|
|
28
28
|
value: today,
|
|
29
29
|
triggerIcon: 'calendar',
|
|
30
|
-
triggerIconSize:
|
|
30
|
+
triggerIconSize: 'lg',
|
|
31
31
|
clearOnClose: true,
|
|
32
32
|
onChange: (date: Date | DateRange | undefined) => {
|
|
33
33
|
// eslint-disable-next-line no-console
|
|
@@ -43,7 +43,7 @@ export const Range: Story = {
|
|
|
43
43
|
value: today,
|
|
44
44
|
isRangePicker: true,
|
|
45
45
|
triggerIcon: 'calendar',
|
|
46
|
-
triggerIconSize:
|
|
46
|
+
triggerIconSize: 'lg',
|
|
47
47
|
onChange: (date: Date | DateRange | undefined) => {
|
|
48
48
|
// eslint-disable-next-line no-console
|
|
49
49
|
console.log(date);
|
|
@@ -12,9 +12,10 @@ import {
|
|
|
12
12
|
} from 'react-day-picker';
|
|
13
13
|
import { usePopper } from 'react-popper';
|
|
14
14
|
import { IconName, PermafrostComponent } from '@/types';
|
|
15
|
-
import { Icon } from '@/
|
|
15
|
+
import { Icon } from '@/components/icons';
|
|
16
16
|
|
|
17
17
|
import { StyledNoInputDatePicker } from './NoInputDatePicker.styles';
|
|
18
|
+
import { IconSizes } from '@/components/icons/types';
|
|
18
19
|
|
|
19
20
|
type Props = PermafrostComponent & {
|
|
20
21
|
ariaLabel?: string;
|
|
@@ -28,7 +29,7 @@ type Props = PermafrostComponent & {
|
|
|
28
29
|
selectedRange?: DateRange | undefined;
|
|
29
30
|
value: Date | undefined;
|
|
30
31
|
triggerIcon: IconName;
|
|
31
|
-
triggerIconSize:
|
|
32
|
+
triggerIconSize: IconSizes;
|
|
32
33
|
isRangePicker?: boolean;
|
|
33
34
|
isOpen?: boolean;
|
|
34
35
|
clearOnClose?: boolean;
|
|
@@ -49,7 +50,7 @@ function CustomCaption(props: CaptionProps) {
|
|
|
49
50
|
}
|
|
50
51
|
}}
|
|
51
52
|
>
|
|
52
|
-
<Icon size=
|
|
53
|
+
<Icon size="sm" ariaLabel="Previous Month" name="chevron-left" />
|
|
53
54
|
</button>
|
|
54
55
|
<h2 className="custom__caption__text">{format(props.displayMonth, 'MMM yyyy')}</h2>
|
|
55
56
|
<button
|
|
@@ -62,7 +63,7 @@ function CustomCaption(props: CaptionProps) {
|
|
|
62
63
|
}
|
|
63
64
|
}}
|
|
64
65
|
>
|
|
65
|
-
<Icon size=
|
|
66
|
+
<Icon size="sm" ariaLabel="Next Month" name="chevron-right" />
|
|
66
67
|
</button>
|
|
67
68
|
</div>
|
|
68
69
|
);
|
|
@@ -5,7 +5,7 @@ import classNames from 'classnames';
|
|
|
5
5
|
import { v4 as uuid } from 'uuid';
|
|
6
6
|
|
|
7
7
|
import { Button } from '@/legacy/components/buttons';
|
|
8
|
-
import { Icon } from '@/
|
|
8
|
+
import { Icon } from '@/components/icons';
|
|
9
9
|
import { PermafrostComponent } from '@/types';
|
|
10
10
|
|
|
11
11
|
import { StyledNumberField } from './NumberInput.styles';
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { v4 as uuid } from 'uuid';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
|
|
7
|
-
import { Icon } from '@/
|
|
7
|
+
import { Icon } from '@/components/icons';
|
|
8
8
|
import { PermafrostComponent } from '@/types';
|
|
9
9
|
|
|
10
10
|
import { StyledSearchField } from './SearchInput.styles';
|
|
@@ -2,23 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import { Icon } from '
|
|
5
|
+
import { Icon } from '@/components/icons';
|
|
6
6
|
import { PermafrostComponent } from '@/types';
|
|
7
|
+
import { IconSizes } from '@/components/icons/types';
|
|
7
8
|
|
|
8
9
|
type Props = PermafrostComponent & {
|
|
9
10
|
ariaLabel?: string;
|
|
10
|
-
size?:
|
|
11
|
-
style?:
|
|
11
|
+
size?: IconSizes;
|
|
12
|
+
style?: React.CSSProperties;
|
|
12
13
|
fill?: string;
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
export function CircleSpinner(props: Props): React.ReactElement {
|
|
16
|
-
const { className, fill, id, size, style, ariaLabel = 'Loading...' } = props;
|
|
17
|
+
const { className, fill, id, size = 'sm', style, ariaLabel = 'Loading...' } = props;
|
|
17
18
|
|
|
18
|
-
const
|
|
19
|
-
const loaderStyle = {
|
|
19
|
+
const loaderStyle: React.CSSProperties = {
|
|
20
20
|
position: 'relative',
|
|
21
21
|
top: '1px',
|
|
22
|
+
color: fill || 'currentColor',
|
|
22
23
|
...style,
|
|
23
24
|
};
|
|
24
25
|
|
|
@@ -28,9 +29,8 @@ export function CircleSpinner(props: Props): React.ReactElement {
|
|
|
28
29
|
className={`spin ${className || ''}`}
|
|
29
30
|
data-cy={props['data-cy']}
|
|
30
31
|
id={id}
|
|
31
|
-
size={
|
|
32
|
+
size={size}
|
|
32
33
|
style={loaderStyle}
|
|
33
|
-
fill={fill || 'currentColor'}
|
|
34
34
|
ariaLabel={ariaLabel}
|
|
35
35
|
/>
|
|
36
36
|
);
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { Link } from 'react-router-dom';
|
|
5
5
|
|
|
6
6
|
import { Button } from '@/legacy/components/buttons';
|
|
7
|
-
import { Icon } from '@/
|
|
7
|
+
import { Icon } from '@/components/icons';
|
|
8
8
|
import { PermafrostComponent } from '@/types';
|
|
9
9
|
|
|
10
10
|
import { StyledShrug } from './Shrug.styles';
|
|
@@ -22,7 +22,7 @@ export function Shrug(props: Props): React.ReactElement {
|
|
|
22
22
|
const { actionLink, actionText, buttonAction, buttonText, className, id, message } = props;
|
|
23
23
|
return (
|
|
24
24
|
<StyledShrug className={className} data-cy={props['data-cy']} id={id}>
|
|
25
|
-
<Icon name="shrug"
|
|
25
|
+
<Icon name="shrug" />
|
|
26
26
|
{typeof message === 'string' ? (
|
|
27
27
|
<p className="t-subhead-large" {...props?.messageProps}>
|
|
28
28
|
{message}
|
|
@@ -31,12 +31,12 @@ export function Shrug(props: Props): React.ReactElement {
|
|
|
31
31
|
message
|
|
32
32
|
)}
|
|
33
33
|
{actionLink && actionText && (
|
|
34
|
-
<Link to={actionLink} className="button blue cta"
|
|
34
|
+
<Link to={actionLink} className="button blue cta mt-5">
|
|
35
35
|
{actionText}
|
|
36
36
|
</Link>
|
|
37
37
|
)}
|
|
38
38
|
{buttonAction && buttonText && (
|
|
39
|
-
<Button onClick={buttonAction}
|
|
39
|
+
<Button onClick={buttonAction} className="mt-5" variant="cta">
|
|
40
40
|
{buttonText}
|
|
41
41
|
</Button>
|
|
42
42
|
)}
|
package/src/styles/index.scss
CHANGED
package/src/types.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import { faIcons } from './legacy/components/Icon/faIcons';
|
|
2
|
-
import { indicons } from './legacy/components/Icon/indicons';
|
|
3
|
-
|
|
4
|
-
const allIcons = {
|
|
5
|
-
...faIcons,
|
|
6
|
-
...indicons,
|
|
7
|
-
} as const;
|
|
8
|
-
|
|
9
|
-
export type IconName = keyof typeof allIcons;
|
|
10
|
-
|
|
11
1
|
export type PermafrostComponent = {
|
|
12
2
|
id?: string;
|
|
13
3
|
className?: string;
|
|
@@ -22,3 +12,6 @@ export type ButtonSize = 'normal' | 'large';
|
|
|
22
12
|
import { ListItem } from './legacy/components/Navigation/Drawer/types';
|
|
23
13
|
|
|
24
14
|
export type { ListItem };
|
|
15
|
+
|
|
16
|
+
import { IconName } from '../build/generated/iconTypes';
|
|
17
|
+
export type { IconName };
|
package/tsconfig.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PermafrostComponent, IconName } from '@/types';
|
|
3
|
-
type Props = PermafrostComponent & {
|
|
4
|
-
ariaLabel?: string;
|
|
5
|
-
fill?: string;
|
|
6
|
-
name: IconName;
|
|
7
|
-
size?: [string | number] | [string | number, string | number];
|
|
8
|
-
style?: any;
|
|
9
|
-
onClick?(): void;
|
|
10
|
-
ref?: React.Ref<SVGSVGElement>;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Generic icon component, hidden from Assistive Technology by default.
|
|
14
|
-
* If icon should be available to AT, pass the desired name into the `ariaLabel` prop.
|
|
15
|
-
*/
|
|
16
|
-
export declare function Icon({ style, ...props }: Props): React.ReactElement | null;
|
|
17
|
-
export {};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StoryObj } from '@storybook/react';
|
|
3
|
-
import { Icon } from './Icon';
|
|
4
|
-
declare const meta: {
|
|
5
|
-
component: typeof Icon;
|
|
6
|
-
title: string;
|
|
7
|
-
argTypes: {
|
|
8
|
-
ariaLabel: {
|
|
9
|
-
control: {
|
|
10
|
-
disable: boolean;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
size: {
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
name: {
|
|
17
|
-
control: {
|
|
18
|
-
type: string;
|
|
19
|
-
options: ("search" | "split" | "indico-o-white" | "account" | "address" | "api-doc" | "arrow-dots" | "arrow-down" | "arrow-up-circle" | "arrows-cursor" | "bookmark" | "bookmarks" | "bookmark-saved" | "branch" | "calendar" | "check-circle" | "circle-help" | "check" | "checkbox" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "classification-document" | "classification-image" | "classification-page" | "classify-and-unbundle" | "clipboard" | "coffee-1" | "coffee-2" | "coffee-fail" | "coffeecup" | "coffeesteam" | "cog" | "collection" | "compare" | "company-name" | "confidence-bar-1" | "confidence-bar-2" | "confidence-bar-3" | "confidence-bar-4" | "confidence-bars" | "configure" | "choose-library" | "crowdlabel" | "currency" | "dashboard" | "data-and-access" | "database" | "document" | "date" | "draggable" | "droplet" | "edit" | "education" | "ellipsis" | "elmos-fire" | "email" | "enterprise" | "exclamation-circle-stroke" | "extraction" | "eye" | "file" | "fileHappy" | "filter" | "filter-outline" | "folder" | "form" | "gallery" | "find-documents" | "graphiql" | "grid-view" | "happy" | "help-solid" | "help" | "highlight" | "highlight-outline" | "indico-logo-white" | "indico-o" | "info" | "kabob" | "key" | "label" | "layout-complex" | "layout-simple" | "list-view" | "libraries" | "location" | "logout" | "lock" | "menu" | "model-import" | "model-starter" | "moon" | "moonbow" | "no-collections" | "no-libraries" | "no_results" | "no-format" | "object-detection" | "organizations" | "output" | "page-thumbnail" | "pay-as-you-go" | "person" | "phone" | "pin" | "plus" | "pointer" | "popup" | "price" | "preview-view" | "radio-button" | "recruiter" | "regex" | "reject" | "repair" | "research" | "reset" | "retrain" | "sad" | "search-thin" | "shrug" | "signature" | "sort-down" | "step-forward" | "sun" | "surround" | "surround-outline" | "text" | "thumbs-down" | "thumbs-up" | "time" | "trash" | "unlock" | "upload" | "url" | "user" | "wand" | "warning" | "warning-stroke" | "workflows" | "x-close" | "zoom-in" | "zoom-out" | "fa-dot-circle" | "fa-file" | "fa-file-alt" | "fa-file-pdf" | "fa-file-word" | "fa-check-square" | "fa-square" | "fa-angle-double-left" | "fa-arrow-circle-right" | "fa-arrow-down" | "fa-arrow-left" | "fa-arrow-right" | "fa-arrow-up" | "fa-ban" | "fa-caret-down" | "fa-caret-up" | "fa-chart-bar" | "fa-check" | "fa-check-circle" | "fa-circle-notch" | "fa-clipboard" | "fa-clock" | "fa-clone" | "fa-cloud" | "fa-cog" | "fa-cogs" | "fa-coins" | "fa-cube" | "fa-cut" | "fa-download" | "fa-exclamation-circle" | "fa-exclamation-triangle" | "fa-external-link-alt" | "fa-eye-dropper" | "fa-file-download" | "fa-file-export" | "fa-file-upload" | "fa-filter" | "fa-ghost" | "fa-hat-wizard" | "fa-info-circle" | "fa-key" | "fa-keyboard" | "fa-layer-group" | "fa-pencil-alt" | "fa-plus" | "fa-plus-square" | "fa-question-circle" | "fa-robot" | "fa-search" | "fa-sign-out-alt" | "fa-sliders-h" | "fa-sync-alt" | "fa-tag" | "fa-times" | "fa-times-circle" | "fa-tint" | "fa-toggle-off" | "fa-toggle-on" | "fa-trash" | "fa-trash-alt" | "fa-undo" | "fa-user" | "fa-users" | "fa-mouse-pointer" | "fa-step-forward" | "fa-search-minus" | "fa-search-plus" | "fa-table" | "fa-image" | "fa-link" | "fa-list")[];
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-bf5e6555").R, {
|
|
24
|
-
id?: string | undefined;
|
|
25
|
-
className?: string | undefined;
|
|
26
|
-
'data-cy'?: string | undefined;
|
|
27
|
-
'data-testid'?: string | undefined;
|
|
28
|
-
ariaLabel?: string | undefined;
|
|
29
|
-
fill?: string | undefined;
|
|
30
|
-
name: "search" | "split" | "indico-o-white" | "account" | "address" | "api-doc" | "arrow-dots" | "arrow-down" | "arrow-up-circle" | "arrows-cursor" | "bookmark" | "bookmarks" | "bookmark-saved" | "branch" | "calendar" | "check-circle" | "circle-help" | "check" | "checkbox" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "classification-document" | "classification-image" | "classification-page" | "classify-and-unbundle" | "clipboard" | "coffee-1" | "coffee-2" | "coffee-fail" | "coffeecup" | "coffeesteam" | "cog" | "collection" | "compare" | "company-name" | "confidence-bar-1" | "confidence-bar-2" | "confidence-bar-3" | "confidence-bar-4" | "confidence-bars" | "configure" | "choose-library" | "crowdlabel" | "currency" | "dashboard" | "data-and-access" | "database" | "document" | "date" | "draggable" | "droplet" | "edit" | "education" | "ellipsis" | "elmos-fire" | "email" | "enterprise" | "exclamation-circle-stroke" | "extraction" | "eye" | "file" | "fileHappy" | "filter" | "filter-outline" | "folder" | "form" | "gallery" | "find-documents" | "graphiql" | "grid-view" | "happy" | "help-solid" | "help" | "highlight" | "highlight-outline" | "indico-logo-white" | "indico-o" | "info" | "kabob" | "key" | "label" | "layout-complex" | "layout-simple" | "list-view" | "libraries" | "location" | "logout" | "lock" | "menu" | "model-import" | "model-starter" | "moon" | "moonbow" | "no-collections" | "no-libraries" | "no_results" | "no-format" | "object-detection" | "organizations" | "output" | "page-thumbnail" | "pay-as-you-go" | "person" | "phone" | "pin" | "plus" | "pointer" | "popup" | "price" | "preview-view" | "radio-button" | "recruiter" | "regex" | "reject" | "repair" | "research" | "reset" | "retrain" | "sad" | "search-thin" | "shrug" | "signature" | "sort-down" | "step-forward" | "sun" | "surround" | "surround-outline" | "text" | "thumbs-down" | "thumbs-up" | "time" | "trash" | "unlock" | "upload" | "url" | "user" | "wand" | "warning" | "warning-stroke" | "workflows" | "x-close" | "zoom-in" | "zoom-out" | "fa-dot-circle" | "fa-file" | "fa-file-alt" | "fa-file-pdf" | "fa-file-word" | "fa-check-square" | "fa-square" | "fa-angle-double-left" | "fa-arrow-circle-right" | "fa-arrow-down" | "fa-arrow-left" | "fa-arrow-right" | "fa-arrow-up" | "fa-ban" | "fa-caret-down" | "fa-caret-up" | "fa-chart-bar" | "fa-check" | "fa-check-circle" | "fa-circle-notch" | "fa-clipboard" | "fa-clock" | "fa-clone" | "fa-cloud" | "fa-cog" | "fa-cogs" | "fa-coins" | "fa-cube" | "fa-cut" | "fa-download" | "fa-exclamation-circle" | "fa-exclamation-triangle" | "fa-external-link-alt" | "fa-eye-dropper" | "fa-file-download" | "fa-file-export" | "fa-file-upload" | "fa-filter" | "fa-ghost" | "fa-hat-wizard" | "fa-info-circle" | "fa-key" | "fa-keyboard" | "fa-layer-group" | "fa-pencil-alt" | "fa-plus" | "fa-plus-square" | "fa-question-circle" | "fa-robot" | "fa-search" | "fa-sign-out-alt" | "fa-sliders-h" | "fa-sync-alt" | "fa-tag" | "fa-times" | "fa-times-circle" | "fa-tint" | "fa-toggle-off" | "fa-toggle-on" | "fa-trash" | "fa-trash-alt" | "fa-undo" | "fa-user" | "fa-users" | "fa-mouse-pointer" | "fa-step-forward" | "fa-search-minus" | "fa-search-plus" | "fa-table" | "fa-image" | "fa-link" | "fa-list";
|
|
31
|
-
size?: [string | number] | [string | number, string | number] | undefined;
|
|
32
|
-
style?: any;
|
|
33
|
-
onClick?: (() => void) | undefined;
|
|
34
|
-
ref?: React.Ref<SVGSVGElement> | undefined;
|
|
35
|
-
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
36
|
-
};
|
|
37
|
-
export default meta;
|
|
38
|
-
type Story = StoryObj<typeof Icon>;
|
|
39
|
-
export declare const General: Story;
|
|
40
|
-
export declare const Indicon: Story;
|
|
41
|
-
export declare const FontAwesome: Story;
|
|
42
|
-
export declare const SizeSpecified: Story;
|