@indico-data/design-system 2.43.1 → 2.44.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/lib/assets/fonts/noto/a.woff2 +0 -0
- package/lib/assets/fonts/noto/b.woff2 +0 -0
- package/lib/assets/fonts/noto/c.woff2 +0 -0
- package/lib/assets/fonts/noto/d.woff2 +0 -0
- package/lib/assets/fonts/noto/e.woff2 +0 -0
- package/lib/assets/fonts/noto/f.woff2 +0 -0
- package/lib/assets/fonts/noto/g.woff2 +0 -0
- package/lib/assets/fonts/noto/h.woff2 +0 -0
- package/lib/assets/fonts/noto/notosans.css +79 -0
- package/lib/components/button/Button.stories.d.ts +11 -13
- package/lib/components/button/enums.d.ts +2 -4
- package/lib/components/button/types.d.ts +6 -7
- package/lib/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.d.ts +1 -1
- package/lib/components/forms/date/inputDatePicker/SingleInputDatePicker.d.ts +1 -1
- package/lib/components/forms/input/Input.d.ts +1 -1
- package/lib/index.css +1775 -1017
- package/lib/index.d.ts +148 -885
- package/lib/index.esm.css +1775 -1017
- package/lib/index.esm.js +17829 -24248
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +16041 -22502
- package/lib/index.js.map +1 -1
- package/lib/legacy/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/legacy/components/index.d.ts +1 -12
- package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.d.ts +1 -1
- package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.d.ts +1 -1
- package/lib/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +1 -1
- package/lib/legacy/components/loading-indicators/index.d.ts +0 -4
- package/lib/legacy/components/modals/ConfirmModal/ConfirmModal.d.ts +1 -1
- package/lib/legacy/components/modals/ModalBase/ModalBase.d.ts +1 -1
- package/lib/stylesAndAnimations/colors/constants.d.ts +0 -1
- package/lib/types.d.ts +1 -3
- package/package.json +1 -1
- package/src/components/button/Button.mdx +28 -78
- package/src/components/button/Button.stories.tsx +312 -176
- package/src/components/button/Button.tsx +23 -16
- package/src/components/button/__tests__/Button.test.tsx +66 -58
- package/src/components/button/enums.ts +2 -6
- package/src/components/button/styles/Button.scss +119 -137
- package/src/components/button/styles/_variables.scss +115 -148
- package/src/components/button/types.ts +6 -8
- package/src/components/card/Card.stories.tsx +1 -1
- package/src/components/card/styles/Card.scss +11 -11
- package/src/components/floatUI/FloatUI.mdx +5 -5
- package/src/components/floatUI/FloatUI.stories.tsx +8 -8
- package/src/components/floatUI/__tests__/FloatUI.test.tsx +3 -3
- package/src/components/floatUI/styles/FloatUI.scss +1 -2
- package/src/components/floatUI/styles/_variables.scss +11 -7
- package/src/components/forms/checkbox/styles/Checkbox.scss +8 -14
- package/src/components/forms/date/datePicker/styles/DatePicker.scss +9 -5
- package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +4 -4
- package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +1 -1
- package/src/components/forms/form/styles/Form.scss +84 -2
- package/src/components/forms/input/Input.tsx +2 -2
- package/src/components/forms/input/styles/Input.scss +3 -67
- package/src/components/forms/numberInput/NumberInput.tsx +1 -1
- package/src/components/forms/numberInput/styles/NumberInput.scss +4 -67
- package/src/components/forms/passwordInput/PasswordInput.tsx +1 -1
- package/src/components/forms/passwordInput/styles/PasswordInput.scss +3 -67
- package/src/components/forms/radio/styles/Radio.scss +6 -10
- package/src/components/forms/select/styles/Select.scss +30 -44
- package/src/components/forms/textarea/styles/Textarea.scss +1 -49
- package/src/components/forms/toggle/styles/Toggle.scss +13 -12
- package/src/components/grid/styles/Grid.scss +3 -3
- package/src/components/icons/__tests__/Icon.test.tsx +1 -1
- package/src/components/menu/Menu.stories.tsx +3 -3
- package/src/components/menu/Menu.test.tsx +9 -9
- package/src/components/menu/styles/Menu.scss +5 -0
- package/src/components/menu/styles/_variables.scss +11 -6
- package/src/components/pill/styles/Pill.scss +4 -5
- package/src/components/skeleton/styles/Skeleton.scss +2 -2
- package/src/components/table/LoadingComponent.tsx +0 -2
- package/src/components/table/styles/Table.scss +6 -0
- package/src/components/table/styles/_variables.scss +9 -8
- package/src/index.ts +0 -45
- package/src/legacy/components/Tooltip/Tooltip.styles.ts +0 -12
- package/src/legacy/components/Tooltip/Tooltip.tsx +2 -4
- package/src/legacy/components/index.ts +1 -30
- package/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.styles.ts +0 -3
- package/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.tsx +1 -1
- package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.styles.ts +0 -4
- package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.tsx +1 -6
- package/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.tsx +2 -2
- package/src/legacy/components/loading-indicators/index.ts +0 -4
- package/src/legacy/components/modals/ConfirmModal/ConfirmModal.styles.ts +1 -4
- package/src/legacy/components/modals/ConfirmModal/ConfirmModal.tsx +12 -19
- package/src/legacy/components/modals/ModalBase/ModalBase.styles.tsx +0 -7
- package/src/legacy/components/modals/ModalBase/ModalBase.tsx +1 -1
- package/src/storybookDocs/Permafrost.mdx +92 -0
- package/src/styles/_colors.scss +7 -3
- package/src/styles/_sheets.scss +3 -3
- package/src/styles/assets/fonts/noto/a.woff2 +0 -0
- package/src/styles/assets/fonts/noto/b.woff2 +0 -0
- package/src/styles/assets/fonts/noto/c.woff2 +0 -0
- package/src/styles/assets/fonts/noto/d.woff2 +0 -0
- package/src/styles/assets/fonts/noto/e.woff2 +0 -0
- package/src/styles/assets/fonts/noto/f.woff2 +0 -0
- package/src/styles/assets/fonts/noto/g.woff2 +0 -0
- package/src/styles/assets/fonts/noto/h.woff2 +0 -0
- package/src/styles/assets/fonts/noto/notosans.css +79 -0
- package/src/styles/globals.scss +5 -16
- package/src/styles/index.scss +1 -2
- package/src/styles/storybook.scss +1 -1
- package/src/styles/variables/_borders.scss +6 -6
- package/src/styles/variables/_dropshadows.scss +2 -0
- package/src/styles/variables/_padding.scss +5 -1
- package/src/styles/variables/_typography.scss +7 -1
- package/src/styles/variables/themes/dark.scss +147 -83
- package/src/styles/variables/themes/light.scss +1 -2
- package/src/stylesAndAnimations/colors/Colors.tsx +5 -9
- package/src/stylesAndAnimations/colors/UtilityClasses.tsx +23 -14
- package/src/stylesAndAnimations/colors/constants.ts +183 -114
- package/src/stylesAndAnimations/sizing/Sizing.tsx +2 -2
- package/src/types.ts +1 -7
- package/lib/assets/fonts/mulish/a.woff2 +0 -0
- package/lib/assets/fonts/mulish/b.woff2 +0 -0
- package/lib/assets/fonts/mulish/c.woff2 +0 -0
- package/lib/assets/fonts/mulish/d.woff2 +0 -0
- package/lib/assets/fonts/mulish/mulish.css +0 -98
- package/lib/legacy/components/Accordion/Accordion.d.ts +0 -9
- package/lib/legacy/components/Accordion/Accordion.stories.d.ts +0 -25
- package/lib/legacy/components/Accordion/Accordion.styles.d.ts +0 -1
- package/lib/legacy/components/Accordion/index.d.ts +0 -1
- package/lib/legacy/components/ListTable/Header/Header.d.ts +0 -21
- package/lib/legacy/components/ListTable/Header/Header.styles.d.ts +0 -1
- package/lib/legacy/components/ListTable/Header/index.d.ts +0 -1
- package/lib/legacy/components/ListTable/ListTable.d.ts +0 -41
- package/lib/legacy/components/ListTable/ListTable.stories.d.ts +0 -54
- package/lib/legacy/components/ListTable/ListTable.styles.d.ts +0 -1
- package/lib/legacy/components/ListTable/index.d.ts +0 -1
- package/lib/legacy/components/ListTable/mock-data/index.d.ts +0 -1
- package/lib/legacy/components/ListTable/mock-data/mock-data.d.ts +0 -54
- package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.d.ts +0 -15
- package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.d.ts +0 -22
- package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.d.ts +0 -2
- package/lib/legacy/components/LoadingAwareContainer/index.d.ts +0 -1
- package/lib/legacy/components/Pagination/Pagination.d.ts +0 -18
- package/lib/legacy/components/Pagination/Pagination.stories.d.ts +0 -18
- package/lib/legacy/components/Pagination/Pagination.styles.d.ts +0 -1
- package/lib/legacy/components/Pagination/index.d.ts +0 -1
- package/lib/legacy/components/Toggle/Toggle.d.ts +0 -12
- package/lib/legacy/components/Toggle/Toggle.stories.d.ts +0 -21
- package/lib/legacy/components/Toggle/Toggle.styles.d.ts +0 -1
- package/lib/legacy/components/Toggle/index.d.ts +0 -1
- package/lib/legacy/components/basic-section/Section/Section.d.ts +0 -8
- package/lib/legacy/components/basic-section/Section/Section.stories.d.ts +0 -13
- package/lib/legacy/components/basic-section/Section/Section.styles.d.ts +0 -1
- package/lib/legacy/components/basic-section/Section/index.d.ts +0 -1
- package/lib/legacy/components/basic-section/SectionBlock/SectionBlock.d.ts +0 -9
- package/lib/legacy/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +0 -1
- package/lib/legacy/components/basic-section/SectionBlock/index.d.ts +0 -1
- package/lib/legacy/components/basic-section/SectionBody/SectionBody.d.ts +0 -7
- package/lib/legacy/components/basic-section/SectionBody/SectionBody.stories.d.ts +0 -10
- package/lib/legacy/components/basic-section/SectionBody/SectionBody.styles.d.ts +0 -1
- package/lib/legacy/components/basic-section/SectionBody/index.d.ts +0 -1
- package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.d.ts +0 -8
- package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +0 -14
- package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +0 -1
- package/lib/legacy/components/basic-section/SectionHeader/index.d.ts +0 -1
- package/lib/legacy/components/basic-section/SectionTable/SectionTable.d.ts +0 -1
- package/lib/legacy/components/basic-section/SectionTable/SectionTable.styles.d.ts +0 -1
- package/lib/legacy/components/basic-section/SectionTable/index.d.ts +0 -1
- package/lib/legacy/components/basic-section/index.d.ts +0 -5
- package/lib/legacy/components/buttons/Button/Button.d.ts +0 -21
- package/lib/legacy/components/buttons/Button/Button.stories.d.ts +0 -25
- package/lib/legacy/components/buttons/Button/Button.styles.d.ts +0 -1
- package/lib/legacy/components/buttons/Button/index.d.ts +0 -1
- package/lib/legacy/components/buttons/IconButton/IconButton.d.ts +0 -32
- package/lib/legacy/components/buttons/IconButton/IconButton.stories.d.ts +0 -43
- package/lib/legacy/components/buttons/IconButton/IconButton.styles.d.ts +0 -5
- package/lib/legacy/components/buttons/IconButton/index.d.ts +0 -1
- package/lib/legacy/components/buttons/commonStyles.d.ts +0 -9
- package/lib/legacy/components/buttons/index.d.ts +0 -2
- package/lib/legacy/components/buttons/types.d.ts +0 -3
- package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.d.ts +0 -19
- package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +0 -31
- package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +0 -2
- package/lib/legacy/components/dropdowns/BorderSelect/index.d.ts +0 -1
- package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +0 -23
- package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +0 -46
- package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +0 -4
- package/lib/legacy/components/dropdowns/MultiCombobox/index.d.ts +0 -1
- package/lib/legacy/components/dropdowns/Select/Select.d.ts +0 -19
- package/lib/legacy/components/dropdowns/Select/Select.stories.d.ts +0 -34
- package/lib/legacy/components/dropdowns/Select/Select.styles.d.ts +0 -1
- package/lib/legacy/components/dropdowns/Select/index.d.ts +0 -1
- package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +0 -20
- package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +0 -31
- package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +0 -4
- package/lib/legacy/components/dropdowns/SingleCombobox/index.d.ts +0 -1
- package/lib/legacy/components/dropdowns/commonStyles.d.ts +0 -1
- package/lib/legacy/components/dropdowns/index.d.ts +0 -4
- package/lib/legacy/components/dropdowns/types.d.ts +0 -45
- package/lib/legacy/components/dropdowns/useCombobox.d.ts +0 -25
- package/lib/legacy/components/dropdowns/utils.d.ts +0 -20
- package/lib/legacy/components/inputs/EditableInput/EditableInput.d.ts +0 -13
- package/lib/legacy/components/inputs/EditableInput/EditableInput.stories.d.ts +0 -14
- package/lib/legacy/components/inputs/EditableInput/EditableInput.styles.d.ts +0 -1
- package/lib/legacy/components/inputs/EditableInput/index.d.ts +0 -1
- package/lib/legacy/components/inputs/NumberInput/NumberInput.d.ts +0 -23
- package/lib/legacy/components/inputs/NumberInput/NumberInput.stories.d.ts +0 -28
- package/lib/legacy/components/inputs/NumberInput/NumberInput.styles.d.ts +0 -1
- package/lib/legacy/components/inputs/NumberInput/index.d.ts +0 -1
- package/lib/legacy/components/inputs/RadioButtons/RadioButtons.d.ts +0 -25
- package/lib/legacy/components/inputs/RadioButtons/RadioButtons.stories.d.ts +0 -15
- package/lib/legacy/components/inputs/RadioButtons/RadioButtons.styles.d.ts +0 -13
- package/lib/legacy/components/inputs/RadioButtons/index.d.ts +0 -1
- package/lib/legacy/components/inputs/RadioGroup/RadioGroup.d.ts +0 -27
- package/lib/legacy/components/inputs/RadioGroup/RadioGroup.stories.d.ts +0 -16
- package/lib/legacy/components/inputs/RadioGroup/RadioGroup.styles.d.ts +0 -1
- package/lib/legacy/components/inputs/RadioGroup/index.d.ts +0 -1
- package/lib/legacy/components/inputs/SearchInput/SearchInput.d.ts +0 -17
- package/lib/legacy/components/inputs/SearchInput/SearchInput.stories.d.ts +0 -30
- package/lib/legacy/components/inputs/SearchInput/SearchInput.styles.d.ts +0 -1
- package/lib/legacy/components/inputs/SearchInput/index.d.ts +0 -1
- package/lib/legacy/components/inputs/TextInput/TextInput.d.ts +0 -24
- package/lib/legacy/components/inputs/TextInput/TextInput.stories.d.ts +0 -62
- package/lib/legacy/components/inputs/TextInput/TextInput.styles.d.ts +0 -2
- package/lib/legacy/components/inputs/TextInput/index.d.ts +0 -1
- package/lib/legacy/components/inputs/index.d.ts +0 -6
- package/lib/legacy/components/inputs/inputsCommon.styles.d.ts +0 -4
- package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.d.ts +0 -10
- package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.d.ts +0 -11
- package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.d.ts +0 -7
- package/lib/legacy/components/loading-indicators/LoadingIndicator/index.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +0 -10
- package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/LoadingList/index.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.d.ts +0 -12
- package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.stories.d.ts +0 -10
- package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/PercentageRing/index.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +0 -10
- package/lib/legacy/components/loading-indicators/RandomLoadingMessage/index.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/RandomLoadingMessage/random-messages.d.ts +0 -2
- package/lib/legacy/components/text-truncate/TextTruncate.d.ts +0 -8
- package/lib/legacy/components/text-truncate/TextTruncate.stories.d.ts +0 -6
- package/lib/legacy/components/text-truncate/TextTruncate.styles.d.ts +0 -1
- package/lib/legacy/components/text-truncate/TextTruncate.test.d.ts +0 -1
- package/lib/legacy/components/text-truncate/index.d.ts +0 -1
- package/lib/legacy/components/user-feedback/Shrug/Shrug.d.ts +0 -14
- package/lib/legacy/components/user-feedback/Shrug/Shrug.stories.d.ts +0 -31
- package/lib/legacy/components/user-feedback/Shrug/Shrug.styles.d.ts +0 -1
- package/lib/legacy/components/user-feedback/Shrug/index.d.ts +0 -1
- package/lib/legacy/components/user-feedback/index.d.ts +0 -1
- package/lib/legacy/styles/globals/buttons.d.ts +0 -1
- package/lib/legacy/styles/globals/forms.d.ts +0 -1
- package/lib/legacy/styles/globals/index.d.ts +0 -1
- package/lib/legacy/styles/globals/layout.d.ts +0 -1
- package/lib/legacy/styles/globals/lists.d.ts +0 -1
- package/lib/legacy/styles/globals/margin-padding.d.ts +0 -1
- package/lib/legacy/styles/globals/media.d.ts +0 -1
- package/lib/legacy/styles/globals/tables.d.ts +0 -1
- package/lib/legacy/styles/globals/typography.d.ts +0 -1
- package/lib/legacy/styles/globals/utility-classes.d.ts +0 -1
- package/lib/legacy/styles/index.d.ts +0 -1
- package/lib/legacy/tokens/animation.d.ts +0 -4
- package/lib/legacy/tokens/breakpoints.d.ts +0 -10
- package/lib/legacy/tokens/colors.d.ts +0 -144
- package/lib/legacy/tokens/index.d.ts +0 -8
- package/lib/legacy/tokens/margin.d.ts +0 -4
- package/lib/legacy/tokens/numbers.d.ts +0 -10
- package/lib/legacy/tokens/padding.d.ts +0 -4
- package/lib/legacy/tokens/spacings.d.ts +0 -5
- package/lib/legacy/tokens/typography.d.ts +0 -61
- package/lib/legacy/utils/color.d.ts +0 -21
- package/lib/legacy/utils/index.d.ts +0 -4
- package/lib/legacy/utils/number.d.ts +0 -21
- package/lib/legacy/utils/string.d.ts +0 -12
- package/src/legacy/components/Accordion/Accordion.stories.tsx +0 -47
- package/src/legacy/components/Accordion/Accordion.styles.ts +0 -35
- package/src/legacy/components/Accordion/Accordion.tsx +0 -30
- package/src/legacy/components/Accordion/index.ts +0 -1
- package/src/legacy/components/ListTable/Header/Header.styles.ts +0 -62
- package/src/legacy/components/ListTable/Header/Header.tsx +0 -66
- package/src/legacy/components/ListTable/Header/index.ts +0 -1
- package/src/legacy/components/ListTable/ListTable.stories.tsx +0 -302
- package/src/legacy/components/ListTable/ListTable.styles.ts +0 -76
- package/src/legacy/components/ListTable/ListTable.tsx +0 -140
- package/src/legacy/components/ListTable/index.ts +0 -1
- package/src/legacy/components/ListTable/mock-data/index.ts +0 -1
- package/src/legacy/components/ListTable/mock-data/mock-data.ts +0 -291
- package/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.tsx +0 -45
- package/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.ts +0 -16
- package/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.tsx +0 -36
- package/src/legacy/components/LoadingAwareContainer/index.ts +0 -1
- package/src/legacy/components/Pagination/Pagination.stories.tsx +0 -45
- package/src/legacy/components/Pagination/Pagination.styles.ts +0 -51
- package/src/legacy/components/Pagination/Pagination.tsx +0 -118
- package/src/legacy/components/Pagination/index.ts +0 -1
- package/src/legacy/components/Toggle/Toggle.stories.tsx +0 -56
- package/src/legacy/components/Toggle/Toggle.styles.ts +0 -86
- package/src/legacy/components/Toggle/Toggle.tsx +0 -69
- package/src/legacy/components/Toggle/index.ts +0 -1
- package/src/legacy/components/basic-section/Section/Section.stories.tsx +0 -14
- package/src/legacy/components/basic-section/Section/Section.styles.ts +0 -8
- package/src/legacy/components/basic-section/Section/Section.tsx +0 -30
- package/src/legacy/components/basic-section/Section/index.ts +0 -1
- package/src/legacy/components/basic-section/SectionBlock/SectionBlock.styles.ts +0 -15
- package/src/legacy/components/basic-section/SectionBlock/SectionBlock.tsx +0 -37
- package/src/legacy/components/basic-section/SectionBlock/index.ts +0 -1
- package/src/legacy/components/basic-section/SectionBody/SectionBody.stories.tsx +0 -16
- package/src/legacy/components/basic-section/SectionBody/SectionBody.styles.ts +0 -18
- package/src/legacy/components/basic-section/SectionBody/SectionBody.tsx +0 -30
- package/src/legacy/components/basic-section/SectionBody/index.ts +0 -1
- package/src/legacy/components/basic-section/SectionHeader/SectionHeader.stories.tsx +0 -17
- package/src/legacy/components/basic-section/SectionHeader/SectionHeader.styles.ts +0 -5
- package/src/legacy/components/basic-section/SectionHeader/SectionHeader.tsx +0 -30
- package/src/legacy/components/basic-section/SectionHeader/index.ts +0 -1
- package/src/legacy/components/basic-section/SectionTable/SectionTable.styles.ts +0 -236
- package/src/legacy/components/basic-section/SectionTable/SectionTable.tsx +0 -233
- package/src/legacy/components/basic-section/SectionTable/index.ts +0 -1
- package/src/legacy/components/basic-section/index.ts +0 -5
- package/src/legacy/components/buttons/Button/Button.stories.tsx +0 -80
- package/src/legacy/components/buttons/Button/Button.styles.ts +0 -99
- package/src/legacy/components/buttons/Button/Button.tsx +0 -74
- package/src/legacy/components/buttons/Button/index.ts +0 -1
- package/src/legacy/components/buttons/IconButton/IconButton.stories.tsx +0 -96
- package/src/legacy/components/buttons/IconButton/IconButton.styles.ts +0 -109
- package/src/legacy/components/buttons/IconButton/IconButton.tsx +0 -114
- package/src/legacy/components/buttons/IconButton/index.ts +0 -1
- package/src/legacy/components/buttons/commonStyles.ts +0 -104
- package/src/legacy/components/buttons/index.ts +0 -2
- package/src/legacy/components/buttons/types.ts +0 -3
- package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.tsx +0 -22
- package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.ts +0 -73
- package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.tsx +0 -85
- package/src/legacy/components/dropdowns/BorderSelect/index.ts +0 -1
- package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.tsx +0 -147
- package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.ts +0 -91
- package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.tsx +0 -123
- package/src/legacy/components/dropdowns/MultiCombobox/index.ts +0 -1
- package/src/legacy/components/dropdowns/Select/Select.stories.tsx +0 -54
- package/src/legacy/components/dropdowns/Select/Select.styles.ts +0 -73
- package/src/legacy/components/dropdowns/Select/Select.tsx +0 -69
- package/src/legacy/components/dropdowns/Select/index.ts +0 -1
- package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.tsx +0 -61
- package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.ts +0 -56
- package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.tsx +0 -103
- package/src/legacy/components/dropdowns/SingleCombobox/index.ts +0 -1
- package/src/legacy/components/dropdowns/commonStyles.ts +0 -65
- package/src/legacy/components/dropdowns/index.ts +0 -4
- package/src/legacy/components/dropdowns/types.ts +0 -45
- package/src/legacy/components/dropdowns/useCombobox.ts +0 -32
- package/src/legacy/components/dropdowns/utils.tsx +0 -25
- package/src/legacy/components/inputs/EditableInput/EditableInput.stories.tsx +0 -26
- package/src/legacy/components/inputs/EditableInput/EditableInput.styles.ts +0 -21
- package/src/legacy/components/inputs/EditableInput/EditableInput.tsx +0 -103
- package/src/legacy/components/inputs/EditableInput/index.ts +0 -1
- package/src/legacy/components/inputs/NumberInput/NumberInput.stories.tsx +0 -72
- package/src/legacy/components/inputs/NumberInput/NumberInput.styles.ts +0 -66
- package/src/legacy/components/inputs/NumberInput/NumberInput.tsx +0 -154
- package/src/legacy/components/inputs/NumberInput/index.ts +0 -1
- package/src/legacy/components/inputs/RadioButtons/RadioButtons.stories.tsx +0 -84
- package/src/legacy/components/inputs/RadioButtons/RadioButtons.styles.ts +0 -82
- package/src/legacy/components/inputs/RadioButtons/RadioButtons.tsx +0 -63
- package/src/legacy/components/inputs/RadioButtons/index.tsx +0 -1
- package/src/legacy/components/inputs/RadioGroup/RadioGroup.stories.tsx +0 -66
- package/src/legacy/components/inputs/RadioGroup/RadioGroup.styles.ts +0 -11
- package/src/legacy/components/inputs/RadioGroup/RadioGroup.tsx +0 -119
- package/src/legacy/components/inputs/RadioGroup/index.ts +0 -1
- package/src/legacy/components/inputs/SearchInput/SearchInput.stories.tsx +0 -37
- package/src/legacy/components/inputs/SearchInput/SearchInput.styles.ts +0 -51
- package/src/legacy/components/inputs/SearchInput/SearchInput.tsx +0 -73
- package/src/legacy/components/inputs/SearchInput/index.ts +0 -1
- package/src/legacy/components/inputs/TextInput/TextInput.stories.tsx +0 -104
- package/src/legacy/components/inputs/TextInput/TextInput.styles.ts +0 -74
- package/src/legacy/components/inputs/TextInput/TextInput.tsx +0 -116
- package/src/legacy/components/inputs/TextInput/index.ts +0 -1
- package/src/legacy/components/inputs/index.ts +0 -6
- package/src/legacy/components/inputs/inputsCommon.styles.ts +0 -57
- package/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.tsx +0 -22
- package/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.ts +0 -81
- package/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.tsx +0 -61
- package/src/legacy/components/loading-indicators/LoadingIndicator/index.ts +0 -1
- package/src/legacy/components/loading-indicators/LoadingList/LoadingList.stories.tsx +0 -14
- package/src/legacy/components/loading-indicators/LoadingList/LoadingList.styles.ts +0 -42
- package/src/legacy/components/loading-indicators/LoadingList/LoadingList.tsx +0 -9
- package/src/legacy/components/loading-indicators/LoadingList/index.ts +0 -1
- package/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.stories.tsx +0 -18
- package/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.ts +0 -27
- package/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.tsx +0 -76
- package/src/legacy/components/loading-indicators/PercentageRing/index.ts +0 -1
- package/src/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.tsx +0 -16
- package/src/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.tsx +0 -18
- package/src/legacy/components/loading-indicators/RandomLoadingMessage/index.ts +0 -1
- package/src/legacy/components/loading-indicators/RandomLoadingMessage/random-messages.js +0 -67
- package/src/legacy/components/text-truncate/TextTruncate.stories.tsx +0 -19
- package/src/legacy/components/text-truncate/TextTruncate.styles.ts +0 -3
- package/src/legacy/components/text-truncate/TextTruncate.test.tsx +0 -17
- package/src/legacy/components/text-truncate/TextTruncate.tsx +0 -23
- package/src/legacy/components/text-truncate/index.ts +0 -1
- package/src/legacy/components/user-feedback/Shrug/Shrug.stories.tsx +0 -38
- package/src/legacy/components/user-feedback/Shrug/Shrug.styles.ts +0 -25
- package/src/legacy/components/user-feedback/Shrug/Shrug.tsx +0 -45
- package/src/legacy/components/user-feedback/Shrug/index.ts +0 -1
- package/src/legacy/components/user-feedback/index.ts +0 -1
- package/src/legacy/styles/globals/buttons.ts +0 -154
- package/src/legacy/styles/globals/forms.ts +0 -53
- package/src/legacy/styles/globals/index.tsx +0 -22
- package/src/legacy/styles/globals/layout.ts +0 -22
- package/src/legacy/styles/globals/lists.ts +0 -23
- package/src/legacy/styles/globals/margin-padding.ts +0 -33
- package/src/legacy/styles/globals/media.ts +0 -13
- package/src/legacy/styles/globals/tables.ts +0 -30
- package/src/legacy/styles/globals/typography.ts +0 -82
- package/src/legacy/styles/globals/utility-classes.ts +0 -76
- package/src/legacy/styles/index.ts +0 -1
- package/src/legacy/tokens/animation.ts +0 -6
- package/src/legacy/tokens/breakpoints.ts +0 -11
- package/src/legacy/tokens/colors.ts +0 -293
- package/src/legacy/tokens/index.ts +0 -20
- package/src/legacy/tokens/margin.ts +0 -5
- package/src/legacy/tokens/numbers.js +0 -41
- package/src/legacy/tokens/padding.ts +0 -5
- package/src/legacy/tokens/spacings.ts +0 -5
- package/src/legacy/tokens/typography.ts +0 -43
- package/src/legacy/utils/color.ts +0 -139
- package/src/legacy/utils/index.ts +0 -5
- package/src/legacy/utils/number.ts +0 -29
- package/src/legacy/utils/string.ts +0 -87
- package/src/styles/assets/fonts/mulish/a.woff2 +0 -0
- package/src/styles/assets/fonts/mulish/b.woff2 +0 -0
- package/src/styles/assets/fonts/mulish/c.woff2 +0 -0
- package/src/styles/assets/fonts/mulish/d.woff2 +0 -0
- package/src/styles/assets/fonts/mulish/mulish.css +0 -98
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import classNames from 'classnames';
|
|
6
|
-
|
|
7
|
-
import { CircleSpinner } from '@/legacy/components/loading-indicators';
|
|
8
|
-
import { PermafrostComponent } from '@/types';
|
|
9
|
-
import { StyledButton } from './Button.styles';
|
|
10
|
-
|
|
11
|
-
export type ButtonVariant = 'primary' | 'cta' | 'normal' | 'link-style' | 'no-style' | 'outline';
|
|
12
|
-
|
|
13
|
-
export type ButtonProps = PermafrostComponent & {
|
|
14
|
-
'aria-label'?: string;
|
|
15
|
-
'aria-pressed'?: boolean;
|
|
16
|
-
'aria-selected'?: boolean;
|
|
17
|
-
busy?: boolean;
|
|
18
|
-
children: React.ReactNode | React.ReactNode[];
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
onClick: (...args: any[]) => void;
|
|
21
|
-
onFocus?: () => void;
|
|
22
|
-
role?: string;
|
|
23
|
-
style?: React.CSSProperties;
|
|
24
|
-
tabindex?: 0 | -1;
|
|
25
|
-
type?: 'submit' | 'button' | 'reset';
|
|
26
|
-
variant?: ButtonVariant;
|
|
27
|
-
onMouseEnter?: () => void;
|
|
28
|
-
onMouseLeave?: () => void;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export function Button(props: ButtonProps): React.ReactElement {
|
|
32
|
-
const {
|
|
33
|
-
id,
|
|
34
|
-
className,
|
|
35
|
-
busy,
|
|
36
|
-
children,
|
|
37
|
-
disabled,
|
|
38
|
-
onClick,
|
|
39
|
-
onFocus,
|
|
40
|
-
role,
|
|
41
|
-
style,
|
|
42
|
-
tabindex,
|
|
43
|
-
type,
|
|
44
|
-
variant = 'default',
|
|
45
|
-
...rest
|
|
46
|
-
} = props;
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<StyledButton
|
|
50
|
-
aria-disabled={busy}
|
|
51
|
-
aria-label={props['aria-label']}
|
|
52
|
-
aria-pressed={props['aria-pressed']}
|
|
53
|
-
aria-selected={props['aria-selected']}
|
|
54
|
-
className={classNames(variant, className, {
|
|
55
|
-
blue: variant === 'primary' || variant === 'cta',
|
|
56
|
-
busy,
|
|
57
|
-
})}
|
|
58
|
-
data-cy={props['data-cy']}
|
|
59
|
-
disabled={disabled}
|
|
60
|
-
id={id}
|
|
61
|
-
onClick={busy ? undefined : onClick}
|
|
62
|
-
onFocus={onFocus}
|
|
63
|
-
role={role}
|
|
64
|
-
style={style}
|
|
65
|
-
tabIndex={tabindex}
|
|
66
|
-
type={type || 'button'}
|
|
67
|
-
{...rest}
|
|
68
|
-
>
|
|
69
|
-
{busy && <CircleSpinner className="mr-2" />}
|
|
70
|
-
|
|
71
|
-
{children}
|
|
72
|
-
</StyledButton>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button } from './Button';
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MemoryRouter } from 'react-router-dom';
|
|
3
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
|
-
|
|
5
|
-
import { IconButton } from './IconButton';
|
|
6
|
-
|
|
7
|
-
const meta = {
|
|
8
|
-
component: IconButton,
|
|
9
|
-
title: 'legacy/buttons/IconButton',
|
|
10
|
-
args: {
|
|
11
|
-
iconSide: 'start',
|
|
12
|
-
size: 'normal',
|
|
13
|
-
variant: 'default',
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
onPress: { action: 'clicked/pressed' },
|
|
17
|
-
isDisabled: {
|
|
18
|
-
control: {
|
|
19
|
-
type: 'boolean',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
adjustAlignment: {
|
|
23
|
-
description: 'vertical alignment of text relative to icon',
|
|
24
|
-
defaultValue: -2,
|
|
25
|
-
},
|
|
26
|
-
className: {
|
|
27
|
-
control: {
|
|
28
|
-
disable: true,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
style: {
|
|
32
|
-
control: {
|
|
33
|
-
disable: true,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
} satisfies Meta<typeof IconButton>;
|
|
38
|
-
|
|
39
|
-
export default meta;
|
|
40
|
-
type Story = StoryObj<typeof IconButton>;
|
|
41
|
-
|
|
42
|
-
export const Normal: Story = {
|
|
43
|
-
args: {
|
|
44
|
-
iconName: 'fileHappy',
|
|
45
|
-
label: 'Save',
|
|
46
|
-
adjustAlignment: 0,
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const NoLabel: Story = {
|
|
51
|
-
args: {
|
|
52
|
-
iconName: 'fileHappy',
|
|
53
|
-
adjustAlignment: 0,
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const IconAtEnd: Story = {
|
|
58
|
-
args: {
|
|
59
|
-
iconName: 'fa-arrow-right',
|
|
60
|
-
iconSide: 'end',
|
|
61
|
-
label: 'Next Step',
|
|
62
|
-
variant: 'primary',
|
|
63
|
-
size: 'large',
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const Busy: Story = {
|
|
68
|
-
args: {
|
|
69
|
-
iconName: 'fileHappy',
|
|
70
|
-
label: 'Saving',
|
|
71
|
-
busy: true,
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export const Disabled: Story = {
|
|
76
|
-
args: {
|
|
77
|
-
iconName: 'fileHappy',
|
|
78
|
-
label: 'Save',
|
|
79
|
-
adjustAlignment: 0,
|
|
80
|
-
isDisabled: true,
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export const AsLink: Story = {
|
|
85
|
-
args: {
|
|
86
|
-
iconName: 'fa-cog',
|
|
87
|
-
isLink: '#',
|
|
88
|
-
label: 'Settings',
|
|
89
|
-
adjustAlignment: 0,
|
|
90
|
-
},
|
|
91
|
-
render: (args) => (
|
|
92
|
-
<MemoryRouter>
|
|
93
|
-
<IconButton {...args} />
|
|
94
|
-
</MemoryRouter>
|
|
95
|
-
),
|
|
96
|
-
};
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { Link } from 'react-router-dom';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
defaults,
|
|
6
|
-
sizeLarge,
|
|
7
|
-
variantDefault,
|
|
8
|
-
variantDestructive,
|
|
9
|
-
variantPrimary,
|
|
10
|
-
disabledOverrides,
|
|
11
|
-
} from '../commonStyles';
|
|
12
|
-
import { COLORS, ANIMATION } from '@/legacy/tokens';
|
|
13
|
-
|
|
14
|
-
const iconMargin = '0.5em';
|
|
15
|
-
|
|
16
|
-
export const iconButton = css`
|
|
17
|
-
align-items: center;
|
|
18
|
-
|
|
19
|
-
${defaults};
|
|
20
|
-
|
|
21
|
-
svg {
|
|
22
|
-
height: 16px;
|
|
23
|
-
width: 16px;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&.large {
|
|
27
|
-
${sizeLarge};
|
|
28
|
-
|
|
29
|
-
svg {
|
|
30
|
-
height: 20px;
|
|
31
|
-
width: 20px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&.default {
|
|
36
|
-
${variantDefault};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&.destructive {
|
|
40
|
-
${variantDestructive};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.primary {
|
|
44
|
-
${variantPrimary};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&.outline {
|
|
48
|
-
color: ${COLORS.midFontColor};
|
|
49
|
-
background: transparent;
|
|
50
|
-
border: 1px solid ${COLORS.midFontColor};
|
|
51
|
-
transition:
|
|
52
|
-
border ${ANIMATION.duration} ${ANIMATION.timing},
|
|
53
|
-
color ${ANIMATION.duration} ${ANIMATION.timing};
|
|
54
|
-
|
|
55
|
-
&:hover,
|
|
56
|
-
&:focus {
|
|
57
|
-
border: 1px solid ${COLORS.defaultFontColor};
|
|
58
|
-
color: ${COLORS.defaultFontColor};
|
|
59
|
-
background: transparent;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&:disabled {
|
|
63
|
-
border: 1px solid ${COLORS.midFontColor};
|
|
64
|
-
color: ${COLORS.midFontColor};
|
|
65
|
-
background: transparent;
|
|
66
|
-
opacity: 0.6;
|
|
67
|
-
|
|
68
|
-
&:hover {
|
|
69
|
-
background: transparent;
|
|
70
|
-
border: 1px solid ${COLORS.midFontColor};
|
|
71
|
-
color: ${COLORS.midFontColor};
|
|
72
|
-
opacity: 0.6;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// todo: use this rule/selector after global styling removed
|
|
78
|
-
//:not(:disabled):hover {
|
|
79
|
-
// background-color: #bebebe;
|
|
80
|
-
//}
|
|
81
|
-
${disabledOverrides};
|
|
82
|
-
|
|
83
|
-
&.start {
|
|
84
|
-
svg.right-margin {
|
|
85
|
-
margin-right: ${iconMargin};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&.end {
|
|
90
|
-
svg {
|
|
91
|
-
order: 1;
|
|
92
|
-
margin-left: ${iconMargin};
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
`;
|
|
96
|
-
|
|
97
|
-
export const StyledIconButton = styled.button`
|
|
98
|
-
// todo: overrides the global button styling
|
|
99
|
-
display: flex !important;
|
|
100
|
-
|
|
101
|
-
${iconButton};
|
|
102
|
-
`;
|
|
103
|
-
|
|
104
|
-
export const StyledIconButtonLink = styled(Link)`
|
|
105
|
-
// todo: overrides the global button styling
|
|
106
|
-
display: inline-flex !important;
|
|
107
|
-
|
|
108
|
-
${iconButton};
|
|
109
|
-
`;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React, { useRef } from 'react';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import { useButton } from '@react-aria/button';
|
|
6
|
-
import { useFocusRing } from '@react-aria/focus';
|
|
7
|
-
import { AriaButtonProps } from '@react-types/button';
|
|
8
|
-
|
|
9
|
-
import { SPACING } from '@/legacy/tokens';
|
|
10
|
-
import { IconName, PermafrostComponent } from '@/types';
|
|
11
|
-
import { Icon } from '@/components';
|
|
12
|
-
import { CircleSpinner } from '@/legacy/components';
|
|
13
|
-
import { ButtonSize, IconButtonVariant } from '../types';
|
|
14
|
-
|
|
15
|
-
import { StyledIconButton, StyledIconButtonLink } from './IconButton.styles';
|
|
16
|
-
|
|
17
|
-
type Props = PermafrostComponent & {
|
|
18
|
-
/**
|
|
19
|
-
* Adjusts vertical alignment of the text label, in relation to the icon
|
|
20
|
-
*/
|
|
21
|
-
adjustAlignment?: number;
|
|
22
|
-
busy?: boolean;
|
|
23
|
-
iconName: IconName;
|
|
24
|
-
iconSide?: 'start' | 'end';
|
|
25
|
-
isDisabled?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* If element will be an `<a>`, the href URL
|
|
28
|
-
*/
|
|
29
|
-
isLink?: string;
|
|
30
|
-
label?: string;
|
|
31
|
-
size?: ButtonSize;
|
|
32
|
-
style?: React.CSSProperties;
|
|
33
|
-
variant?: IconButtonVariant;
|
|
34
|
-
} & AriaButtonProps;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* General utility “button with an icon” component. May also be used for links that _look_
|
|
38
|
-
* like buttons, via the `isLink` property.
|
|
39
|
-
*
|
|
40
|
-
* The button handler must be passed in via the `onPress` property (replaces `onClick`).
|
|
41
|
-
*
|
|
42
|
-
* @see {@link https://react-spectrum.adobe.com/blog/building-a-button-part-1.html}
|
|
43
|
-
*/
|
|
44
|
-
export function IconButton(props: Props) {
|
|
45
|
-
const {
|
|
46
|
-
adjustAlignment = 0,
|
|
47
|
-
busy,
|
|
48
|
-
className,
|
|
49
|
-
iconName,
|
|
50
|
-
iconSide = 'start',
|
|
51
|
-
id,
|
|
52
|
-
isDisabled,
|
|
53
|
-
isLink,
|
|
54
|
-
label,
|
|
55
|
-
size = 'normal',
|
|
56
|
-
style,
|
|
57
|
-
variant,
|
|
58
|
-
} = props;
|
|
59
|
-
|
|
60
|
-
const buttonEl = useRef();
|
|
61
|
-
const { buttonProps } = useButton(
|
|
62
|
-
{ ...props, onPress: busy ? undefined : props.onPress },
|
|
63
|
-
// @ts-ignore
|
|
64
|
-
buttonEl,
|
|
65
|
-
);
|
|
66
|
-
const { isFocusVisible, focusProps } = useFocusRing();
|
|
67
|
-
|
|
68
|
-
const commonProps = {
|
|
69
|
-
'aria-disabled': busy,
|
|
70
|
-
className: classNames(iconSide, size, variant, className, {
|
|
71
|
-
'focus-visible': isFocusVisible,
|
|
72
|
-
busy,
|
|
73
|
-
disabled: isLink && isDisabled,
|
|
74
|
-
}),
|
|
75
|
-
...buttonProps,
|
|
76
|
-
...focusProps,
|
|
77
|
-
'data-cy': props['data-cy'],
|
|
78
|
-
id,
|
|
79
|
-
ref: buttonEl,
|
|
80
|
-
style,
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const iconElement = busy ? (
|
|
84
|
-
<CircleSpinner
|
|
85
|
-
style={{
|
|
86
|
-
marginTop: `${adjustAlignment}px`,
|
|
87
|
-
marginBottom: `${Math.abs(adjustAlignment)}px`,
|
|
88
|
-
marginRight: `${SPACING.xs}`,
|
|
89
|
-
}}
|
|
90
|
-
/>
|
|
91
|
-
) : (
|
|
92
|
-
<Icon className={classNames({ 'right-margin': label })} name={iconName} />
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
const labelElement = label ? (
|
|
96
|
-
<span style={{ marginTop: `${adjustAlignment}px` }}>{label}</span>
|
|
97
|
-
) : null;
|
|
98
|
-
|
|
99
|
-
if (isLink && !isDisabled) {
|
|
100
|
-
return (
|
|
101
|
-
//@ts-ignore
|
|
102
|
-
<StyledIconButtonLink {...commonProps} to={isLink}>
|
|
103
|
-
{iconElement} {labelElement}
|
|
104
|
-
</StyledIconButtonLink>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
// @ts-ignore
|
|
110
|
-
<StyledIconButton {...commonProps}>
|
|
111
|
-
{iconElement} {labelElement}
|
|
112
|
-
</StyledIconButton>
|
|
113
|
-
);
|
|
114
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { IconButton } from './IconButton';
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// TODO: This file's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import { css } from 'styled-components';
|
|
4
|
-
|
|
5
|
-
import { ANIMATION, COLORS, TYPOGRAPHY } from '@/legacy/tokens';
|
|
6
|
-
|
|
7
|
-
export const defaultHeight = '36px';
|
|
8
|
-
export const largeHeight = '50px';
|
|
9
|
-
|
|
10
|
-
export const basicDefaults = css`
|
|
11
|
-
border: 0;
|
|
12
|
-
display: inline-block;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
|
|
15
|
-
border-radius: 2px;
|
|
16
|
-
box-shadow: 0 1px 1px 0 ${COLORS.black};
|
|
17
|
-
|
|
18
|
-
&.busy {
|
|
19
|
-
cursor: wait;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&:disabled,
|
|
23
|
-
&.disabled {
|
|
24
|
-
opacity: 0.6;
|
|
25
|
-
cursor: not-allowed;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&:not(.focus-visible) {
|
|
29
|
-
outline: none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
transition-property: opacity, background-color;
|
|
33
|
-
transition-duration: ${ANIMATION.duration};
|
|
34
|
-
transition-timing-function: ${ANIMATION.timing};
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
|
-
export const defaults = css`
|
|
38
|
-
${basicDefaults};
|
|
39
|
-
|
|
40
|
-
height: ${defaultHeight};
|
|
41
|
-
font-size: ${TYPOGRAPHY.fontSize.base};
|
|
42
|
-
font-family: ${TYPOGRAPHY.fontFamily.base};
|
|
43
|
-
|
|
44
|
-
padding: 0 1em !important;
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
export const sizeLarge = css`
|
|
48
|
-
height: ${largeHeight};
|
|
49
|
-
font-size: ${TYPOGRAPHY.fontSize.subheadLarge};
|
|
50
|
-
`;
|
|
51
|
-
|
|
52
|
-
export const variantDefault = css`
|
|
53
|
-
color: ${COLORS.darkFontColor};
|
|
54
|
-
background-color: ${COLORS.iron};
|
|
55
|
-
|
|
56
|
-
&:hover {
|
|
57
|
-
background-color: #bebebe;
|
|
58
|
-
}
|
|
59
|
-
`;
|
|
60
|
-
|
|
61
|
-
export const variantPrimary = css`
|
|
62
|
-
background-color: ${COLORS.curiousBlue};
|
|
63
|
-
color: ${COLORS.white};
|
|
64
|
-
|
|
65
|
-
&:hover {
|
|
66
|
-
background-color: #1777c2;
|
|
67
|
-
color: ${COLORS.white};
|
|
68
|
-
|
|
69
|
-
&:disabled {
|
|
70
|
-
background-color: ${COLORS.curiousBlue} !important;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
`;
|
|
74
|
-
|
|
75
|
-
export const variantDestructive = css`
|
|
76
|
-
background-color: ${COLORS.red};
|
|
77
|
-
color: ${COLORS.white};
|
|
78
|
-
|
|
79
|
-
&:hover {
|
|
80
|
-
background-color: #d4464b;
|
|
81
|
-
color: ${COLORS.white};
|
|
82
|
-
}
|
|
83
|
-
`;
|
|
84
|
-
|
|
85
|
-
// todo: remove once globals no longer need to be overridden
|
|
86
|
-
export const disabledOverrides = css`
|
|
87
|
-
&:disabled,
|
|
88
|
-
&.disabled {
|
|
89
|
-
&:hover {
|
|
90
|
-
// todo: override due to default global styling
|
|
91
|
-
background-color: ${COLORS.iron} !important;
|
|
92
|
-
|
|
93
|
-
&.primary {
|
|
94
|
-
// todo: override due to default global styling
|
|
95
|
-
background-color: ${COLORS.curiousBlue} !important;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&.destructive {
|
|
99
|
-
// todo: override due to default global styling
|
|
100
|
-
background-color: ${COLORS.red} !important;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
`;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { BorderSelect } from './BorderSelect';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
component: BorderSelect,
|
|
7
|
-
title: 'legacy/dropdowns/BorderSelect',
|
|
8
|
-
argTypes: {},
|
|
9
|
-
args: {
|
|
10
|
-
onChange: () => {},
|
|
11
|
-
options: [
|
|
12
|
-
{ name: 'Andy', value: 'andy' },
|
|
13
|
-
{ name: 'Jess', value: 'jess' },
|
|
14
|
-
{ name: 'Mike', value: 'mike' },
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
} satisfies Meta<typeof BorderSelect>;
|
|
18
|
-
|
|
19
|
-
export default meta;
|
|
20
|
-
type Story = StoryObj<typeof BorderSelect>;
|
|
21
|
-
|
|
22
|
-
export const Base: Story = {};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
import { COLORS, FONT_SIZE } from '@/legacy/tokens';
|
|
4
|
-
|
|
5
|
-
export const StyledSelect = styled.div`
|
|
6
|
-
&.horizontal {
|
|
7
|
-
> * {
|
|
8
|
-
display: inline-block;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
> label {
|
|
12
|
-
margin-right: 12px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
label {
|
|
17
|
-
line-height: 1.2;
|
|
18
|
-
margin-bottom: 14px;
|
|
19
|
-
// color: ${COLORS.lightFontColor};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.select-container {
|
|
23
|
-
position: relative;
|
|
24
|
-
// max-width: 300px;
|
|
25
|
-
|
|
26
|
-
select {
|
|
27
|
-
background: transparent;
|
|
28
|
-
border: 1px solid currentColor;
|
|
29
|
-
width: 100%;
|
|
30
|
-
// max-width: 300px;
|
|
31
|
-
// color: ${COLORS.lightFontColor};
|
|
32
|
-
font-size: ${FONT_SIZE.base};
|
|
33
|
-
border-radius: 4px;
|
|
34
|
-
padding: 7px 30px 8px 15px;
|
|
35
|
-
appearance: none;
|
|
36
|
-
position: relative;
|
|
37
|
-
z-index: 2;
|
|
38
|
-
|
|
39
|
-
&:focus {
|
|
40
|
-
outline: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&::-ms-expand {
|
|
44
|
-
display: none;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
option {
|
|
49
|
-
color: ${COLORS.black};
|
|
50
|
-
|
|
51
|
-
&:not(:checked) {
|
|
52
|
-
color: ${COLORS.black};
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.selectCaret {
|
|
57
|
-
display: inline-block;
|
|
58
|
-
right: 12px;
|
|
59
|
-
position: absolute;
|
|
60
|
-
top: 50%;
|
|
61
|
-
transform: translateY(-50%);
|
|
62
|
-
z-index: 1;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
66
|
-
|
|
67
|
-
export const StyledValidationError = styled.div`
|
|
68
|
-
margin-top: 13px;
|
|
69
|
-
|
|
70
|
-
p {
|
|
71
|
-
color: ${COLORS.curiousBlue};
|
|
72
|
-
}
|
|
73
|
-
`;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { v4 as uuid } from 'uuid';
|
|
5
|
-
import classNames from 'classnames';
|
|
6
|
-
|
|
7
|
-
import { Icon } from '@/components';
|
|
8
|
-
import { PermafrostComponent } from '@/types';
|
|
9
|
-
|
|
10
|
-
import { StyledSelect, StyledValidationError } from './BorderSelect.styles';
|
|
11
|
-
|
|
12
|
-
type Props = PermafrostComponent & {
|
|
13
|
-
defaultValue?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
horizontal?: boolean;
|
|
16
|
-
initialText?: string;
|
|
17
|
-
label?: string;
|
|
18
|
-
onChange(e: React.ChangeEvent<HTMLSelectElement>): void;
|
|
19
|
-
options: { name: string; value: string | number }[];
|
|
20
|
-
style?: object;
|
|
21
|
-
value?: string | number;
|
|
22
|
-
validationErrors?: string[];
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const BorderSelect = (props: Props) => {
|
|
26
|
-
const {
|
|
27
|
-
className = '',
|
|
28
|
-
disabled,
|
|
29
|
-
horizontal,
|
|
30
|
-
id,
|
|
31
|
-
initialText,
|
|
32
|
-
label,
|
|
33
|
-
onChange,
|
|
34
|
-
options,
|
|
35
|
-
style = {},
|
|
36
|
-
value,
|
|
37
|
-
validationErrors,
|
|
38
|
-
} = props;
|
|
39
|
-
|
|
40
|
-
const selectId = uuid();
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<StyledSelect
|
|
44
|
-
className={classNames('Select', { horizontal }, className)}
|
|
45
|
-
data-cy={props['data-cy']}
|
|
46
|
-
id={id}
|
|
47
|
-
style={style}
|
|
48
|
-
>
|
|
49
|
-
{label && <label htmlFor={selectId}>{label}</label>}
|
|
50
|
-
|
|
51
|
-
<div className="select-container">
|
|
52
|
-
<select onChange={onChange} value={value} disabled={disabled} id={selectId}>
|
|
53
|
-
{initialText && (
|
|
54
|
-
<option disabled value="">
|
|
55
|
-
{initialText}
|
|
56
|
-
</option>
|
|
57
|
-
)}
|
|
58
|
-
|
|
59
|
-
{options.map((o) => {
|
|
60
|
-
const key = uuid();
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<option key={key} value={o.value}>
|
|
64
|
-
{o.name}
|
|
65
|
-
</option>
|
|
66
|
-
);
|
|
67
|
-
})}
|
|
68
|
-
</select>
|
|
69
|
-
|
|
70
|
-
<Icon name="fa-caret-down" className="selectCaret" />
|
|
71
|
-
</div>
|
|
72
|
-
{validationErrors ? (
|
|
73
|
-
<StyledValidationError>
|
|
74
|
-
{validationErrors.map((err, i) => {
|
|
75
|
-
return (
|
|
76
|
-
<p className={`error-${err}`} key={i}>
|
|
77
|
-
{err}
|
|
78
|
-
</p>
|
|
79
|
-
);
|
|
80
|
-
})}
|
|
81
|
-
</StyledValidationError>
|
|
82
|
-
) : null}
|
|
83
|
-
</StyledSelect>
|
|
84
|
-
);
|
|
85
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BorderSelect } from './BorderSelect';
|