@indico-data/design-system 2.43.0 → 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/__tests__/DatePicker.test.tsx +23 -3
- 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 +0,0 @@
|
|
|
1
|
-
export { Radio, RadioGroup } from './RadioButtons';
|
|
@@ -1,66 +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 { Meta, StoryObj } from '@storybook/react';
|
|
5
|
-
|
|
6
|
-
import { Radio, RadioGroup } from './RadioGroup';
|
|
7
|
-
|
|
8
|
-
const meta = {
|
|
9
|
-
component: RadioGroup,
|
|
10
|
-
title: 'legacy/inputs/RadioGroup',
|
|
11
|
-
args: {
|
|
12
|
-
value: 'andy',
|
|
13
|
-
},
|
|
14
|
-
tags: ['autodocs'],
|
|
15
|
-
} satisfies Meta<typeof RadioGroup>;
|
|
16
|
-
|
|
17
|
-
export default meta;
|
|
18
|
-
type Story = StoryObj<typeof RadioGroup>;
|
|
19
|
-
|
|
20
|
-
function StoryRender(props: any) {
|
|
21
|
-
return (
|
|
22
|
-
<RadioGroup {...props} defaultValue="andy">
|
|
23
|
-
<Radio value="andy">Andy</Radio>
|
|
24
|
-
<Radio value="jess">Jess</Radio>
|
|
25
|
-
<Radio value="mike">Mike</Radio>
|
|
26
|
-
</RadioGroup>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const Normal: Story = {
|
|
31
|
-
args: {
|
|
32
|
-
label: 'Select a person:',
|
|
33
|
-
},
|
|
34
|
-
render: (args) => {
|
|
35
|
-
return <StoryRender {...args} />;
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const WithHiddenLabel: Story = {
|
|
40
|
-
args: {
|
|
41
|
-
['aria-label']: 'Select a person:',
|
|
42
|
-
},
|
|
43
|
-
render: (args) => {
|
|
44
|
-
return <StoryRender {...args} />;
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const Horizontal: Story = {
|
|
49
|
-
args: {
|
|
50
|
-
label: 'Select a person:',
|
|
51
|
-
orientation: 'horizontal',
|
|
52
|
-
},
|
|
53
|
-
render: (args) => {
|
|
54
|
-
return <StoryRender {...args} />;
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const Disabled: Story = {
|
|
59
|
-
args: {
|
|
60
|
-
label: 'Select a person:',
|
|
61
|
-
isDisabled: true,
|
|
62
|
-
},
|
|
63
|
-
render: (args) => {
|
|
64
|
-
return <StoryRender {...args} />;
|
|
65
|
-
},
|
|
66
|
-
};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React, { createContext, useContext, useRef, useState } from 'react';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import { AriaRadioGroupProps, AriaRadioProps } from '@react-types/radio';
|
|
6
|
-
import { useRadio, useRadioGroup } from '@react-aria/radio';
|
|
7
|
-
import { useFocusRing } from '@react-aria/focus';
|
|
8
|
-
import { useVisuallyHidden } from '@react-aria/visually-hidden';
|
|
9
|
-
import { RadioGroupState, useRadioGroupState } from 'react-stately';
|
|
10
|
-
|
|
11
|
-
import { PermafrostComponent } from '@/types';
|
|
12
|
-
import { StyledRadioGroup } from './RadioGroup.styles';
|
|
13
|
-
|
|
14
|
-
export type RadioGroupProps = PermafrostComponent & {
|
|
15
|
-
value?: string;
|
|
16
|
-
onChange?: (value: string) => void;
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
className?: string;
|
|
19
|
-
} & AriaRadioGroupProps;
|
|
20
|
-
|
|
21
|
-
export const RadioContext = createContext({} as RadioGroupState);
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Renders a group of radio buttons with no styling. This component is not
|
|
25
|
-
* designed to be user-facing, and should only be used to provide functionality.
|
|
26
|
-
*
|
|
27
|
-
* A group label must be included: either pass a string or markup into the
|
|
28
|
-
* `label` prop, or include an `aria-label` or `aria-labelledby` attribute.
|
|
29
|
-
*/
|
|
30
|
-
export function RadioGroup(props: RadioGroupProps) {
|
|
31
|
-
const {
|
|
32
|
-
children,
|
|
33
|
-
className,
|
|
34
|
-
value,
|
|
35
|
-
id,
|
|
36
|
-
isDisabled,
|
|
37
|
-
isReadOnly,
|
|
38
|
-
label,
|
|
39
|
-
name,
|
|
40
|
-
onChange,
|
|
41
|
-
orientation,
|
|
42
|
-
defaultValue,
|
|
43
|
-
} = props;
|
|
44
|
-
|
|
45
|
-
const [lastFocusedValue, setLastFocusedValue] = useState<string | null>(null);
|
|
46
|
-
|
|
47
|
-
const radioGroupState = {
|
|
48
|
-
isDisabled: isDisabled || false,
|
|
49
|
-
isReadOnly: isReadOnly || false,
|
|
50
|
-
lastFocusedValue,
|
|
51
|
-
name: name || '',
|
|
52
|
-
defaultValue,
|
|
53
|
-
value,
|
|
54
|
-
setLastFocusedValue,
|
|
55
|
-
onChange: onChange ? (value: string) => onChange(value) : undefined,
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const state = useRadioGroupState(radioGroupState);
|
|
59
|
-
const { radioGroupProps, labelProps } = useRadioGroup(props, state);
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<StyledRadioGroup
|
|
63
|
-
{...radioGroupProps}
|
|
64
|
-
className={classNames(className, { horizontal: orientation === 'horizontal' })}
|
|
65
|
-
data-cy={props['data-cy']}
|
|
66
|
-
id={id}
|
|
67
|
-
>
|
|
68
|
-
{label && (
|
|
69
|
-
<div className="groupLabel" {...labelProps}>
|
|
70
|
-
{label}
|
|
71
|
-
</div>
|
|
72
|
-
)}
|
|
73
|
-
|
|
74
|
-
<RadioContext.Provider value={state}>{children}</RadioContext.Provider>
|
|
75
|
-
</StyledRadioGroup>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* A single radio button and its label; no styling is applied, and the native
|
|
81
|
-
* radio button is visually hidden.
|
|
82
|
-
*/
|
|
83
|
-
export function Radio(
|
|
84
|
-
props: AriaRadioProps & {
|
|
85
|
-
className?: string;
|
|
86
|
-
isVisuallySelected?: (selectedValue: string) => void;
|
|
87
|
-
},
|
|
88
|
-
) {
|
|
89
|
-
const { children, className, isDisabled, isVisuallySelected } = props;
|
|
90
|
-
const state = useContext(RadioContext);
|
|
91
|
-
const inputRef = useRef<HTMLInputElement>(null);
|
|
92
|
-
|
|
93
|
-
const { visuallyHiddenProps } = useVisuallyHidden();
|
|
94
|
-
|
|
95
|
-
const { inputProps } = useRadio(props, state, inputRef);
|
|
96
|
-
const { isFocusVisible, focusProps } = useFocusRing();
|
|
97
|
-
|
|
98
|
-
let isSelected;
|
|
99
|
-
|
|
100
|
-
if (isVisuallySelected) {
|
|
101
|
-
isSelected = isVisuallySelected(state.selectedValue as string);
|
|
102
|
-
} else {
|
|
103
|
-
isSelected = state.selectedValue === props.value;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return (
|
|
107
|
-
<label
|
|
108
|
-
className={classNames(className, {
|
|
109
|
-
disabled: isDisabled || state.isDisabled,
|
|
110
|
-
selected: isSelected,
|
|
111
|
-
focused: isFocusVisible,
|
|
112
|
-
})}
|
|
113
|
-
>
|
|
114
|
-
<input {...inputProps} {...visuallyHiddenProps} {...focusProps} ref={inputRef} />
|
|
115
|
-
|
|
116
|
-
{children}
|
|
117
|
-
</label>
|
|
118
|
-
);
|
|
119
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Radio as AbstractRadio, RadioGroup as AbstractRadioGroup } from './RadioGroup';
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
4
|
-
|
|
5
|
-
import { SearchInput } from './SearchInput';
|
|
6
|
-
|
|
7
|
-
const meta = {
|
|
8
|
-
component: SearchInput,
|
|
9
|
-
title: 'legacy/inputs/SearchInput',
|
|
10
|
-
argTypes: {},
|
|
11
|
-
args: { placeholder: 'Search field placeholder' },
|
|
12
|
-
} satisfies Meta<typeof SearchInput>;
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof SearchInput>;
|
|
16
|
-
|
|
17
|
-
export const Base: Story = {};
|
|
18
|
-
|
|
19
|
-
export const Border: Story = {
|
|
20
|
-
args: { inputBorder: true },
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const SearchIcon: Story = {
|
|
24
|
-
args: { showSearchIcon: true },
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const BorderAndSearchIcon: Story = {
|
|
28
|
-
args: { inputBorder: true, showSearchIcon: true },
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const ClearInputIcon: Story = {
|
|
32
|
-
args: { showClearInputIcon: true },
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const ClearInputIconWithBorder: Story = {
|
|
36
|
-
args: { showClearInputIcon: true, inputBorder: true },
|
|
37
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
import { TYPOGRAPHY } from '@/legacy/tokens';
|
|
4
|
-
|
|
5
|
-
import { inputCommon } from '../inputsCommon.styles';
|
|
6
|
-
|
|
7
|
-
export const StyledSearchField = styled.div`
|
|
8
|
-
position: relative;
|
|
9
|
-
background: transparent;
|
|
10
|
-
|
|
11
|
-
label {
|
|
12
|
-
position: absolute;
|
|
13
|
-
top: 4px;
|
|
14
|
-
left: 0;
|
|
15
|
-
font-size: ${TYPOGRAPHY.fontSize.subheadSmall};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
input {
|
|
19
|
-
${inputCommon};
|
|
20
|
-
padding: 5px;
|
|
21
|
-
font-size: ${TYPOGRAPHY.fontSize.base};
|
|
22
|
-
margin-bottom: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&.border.showSearchIcon label {
|
|
26
|
-
top: 7px;
|
|
27
|
-
left: 5px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&.inputBorder {
|
|
31
|
-
border: 1px solid currentColor;
|
|
32
|
-
border-radius: 4px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&.showSearchIcon input {
|
|
36
|
-
padding: 5px 5px 5px 25px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&.showClearInputIcon .clear-input {
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
height: 10px;
|
|
42
|
-
width: 10px;
|
|
43
|
-
position: absolute;
|
|
44
|
-
right: 10px;
|
|
45
|
-
top: 50%;
|
|
46
|
-
transform: translateY(-50%);
|
|
47
|
-
&:hover {
|
|
48
|
-
opacity: 0.5;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
@@ -1,73 +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 { StyledSearchField } from './SearchInput.styles';
|
|
11
|
-
|
|
12
|
-
type Props = PermafrostComponent & {
|
|
13
|
-
inputBorder?: boolean;
|
|
14
|
-
showClearInputIcon?: boolean;
|
|
15
|
-
showSearchIcon?: boolean;
|
|
16
|
-
inputProps?: { [key: string]: string };
|
|
17
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
-
onClear?(): void;
|
|
19
|
-
onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
value?: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const SearchInput = (props: Props) => {
|
|
25
|
-
const {
|
|
26
|
-
id,
|
|
27
|
-
inputBorder,
|
|
28
|
-
showSearchIcon,
|
|
29
|
-
showClearInputIcon,
|
|
30
|
-
className = '',
|
|
31
|
-
inputProps,
|
|
32
|
-
onChange,
|
|
33
|
-
onClear,
|
|
34
|
-
onKeyUp,
|
|
35
|
-
placeholder,
|
|
36
|
-
value,
|
|
37
|
-
} = props;
|
|
38
|
-
|
|
39
|
-
const getId = id ? id : uuid();
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<StyledSearchField
|
|
43
|
-
className={classNames(className, {
|
|
44
|
-
inputBorder,
|
|
45
|
-
showSearchIcon,
|
|
46
|
-
showClearInputIcon,
|
|
47
|
-
})}
|
|
48
|
-
data-cy={props['data-cy']}
|
|
49
|
-
>
|
|
50
|
-
{showSearchIcon && (
|
|
51
|
-
<label htmlFor={getId}>
|
|
52
|
-
<Icon name="fa-search" ariaLabel="search" />
|
|
53
|
-
</label>
|
|
54
|
-
)}
|
|
55
|
-
|
|
56
|
-
<input
|
|
57
|
-
data-testid={props['data-testid']}
|
|
58
|
-
type="search"
|
|
59
|
-
id={getId}
|
|
60
|
-
placeholder={placeholder}
|
|
61
|
-
value={value}
|
|
62
|
-
onChange={onChange}
|
|
63
|
-
onKeyUp={onKeyUp}
|
|
64
|
-
{...inputProps}
|
|
65
|
-
/>
|
|
66
|
-
{showClearInputIcon && (
|
|
67
|
-
<Icon name="x-close" ariaLabel="clear input" className="clear-input" onClick={onClear} />
|
|
68
|
-
)}
|
|
69
|
-
</StyledSearchField>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export default SearchInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SearchInput } from './SearchInput';
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React, { ChangeEvent, useState } from 'react';
|
|
4
|
-
import { Meta, StoryObj } from '@storybook/react';
|
|
5
|
-
|
|
6
|
-
import { TextInput } from './TextInput';
|
|
7
|
-
|
|
8
|
-
const validationErrors = [
|
|
9
|
-
'Some helpful error to display to user',
|
|
10
|
-
'Another error that may not be so helpful',
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
function StoryRender(props: any) {
|
|
14
|
-
const [value, setValue] = useState<string>(props.value);
|
|
15
|
-
|
|
16
|
-
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
|
|
17
|
-
setValue(event.target.value);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return <TextInput {...props} onChange={handleChange} value={value} />;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const meta = {
|
|
24
|
-
component: TextInput,
|
|
25
|
-
title: 'legacy/inputs/TextInput',
|
|
26
|
-
argTypes: {
|
|
27
|
-
autoComplete: { control: { disable: true } },
|
|
28
|
-
className: { control: { disable: true } },
|
|
29
|
-
defaultValue: { control: { disable: true } },
|
|
30
|
-
inputProps: { control: { disable: true } },
|
|
31
|
-
name: { control: { disable: true } },
|
|
32
|
-
promptProps: { control: { disable: true } },
|
|
33
|
-
type: { control: { disable: true } },
|
|
34
|
-
validationErrors: { control: { disable: true } },
|
|
35
|
-
value: { control: { disable: true } },
|
|
36
|
-
},
|
|
37
|
-
args: {},
|
|
38
|
-
} satisfies Meta<typeof TextInput>;
|
|
39
|
-
|
|
40
|
-
export default meta;
|
|
41
|
-
type Story = StoryObj<typeof TextInput>;
|
|
42
|
-
|
|
43
|
-
export const Base: Story = {
|
|
44
|
-
args: { label: 'Default Text Field', placeholder: 'Placeholder for Default Input' },
|
|
45
|
-
render: (args) => {
|
|
46
|
-
return <StoryRender {...args} />;
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const Required: Story = {
|
|
51
|
-
args: { label: 'Required Text Field', placeholder: 'Required Placeholder', required: true },
|
|
52
|
-
render: (args) => {
|
|
53
|
-
return <StoryRender {...args} />;
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const WithPrompt: Story = {
|
|
58
|
-
args: {
|
|
59
|
-
label: 'Text Field with Prompts',
|
|
60
|
-
placeholder: 'Prompt Example',
|
|
61
|
-
displayErrors: false,
|
|
62
|
-
required: true,
|
|
63
|
-
validationErrors,
|
|
64
|
-
},
|
|
65
|
-
render: (args) => {
|
|
66
|
-
return <StoryRender {...args} />;
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export const WithError: Story = {
|
|
71
|
-
args: {
|
|
72
|
-
label: 'Text Field with Errors',
|
|
73
|
-
placeholder: 'Error Example',
|
|
74
|
-
displayErrors: true,
|
|
75
|
-
validationErrors,
|
|
76
|
-
value: 'This text is incorrect for some reason',
|
|
77
|
-
},
|
|
78
|
-
render: (args) => {
|
|
79
|
-
return <StoryRender {...args} />;
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const Disabled: Story = {
|
|
84
|
-
args: {
|
|
85
|
-
label: 'Disabled Text Field',
|
|
86
|
-
placeholder: 'Disabled field',
|
|
87
|
-
displayErrors: true,
|
|
88
|
-
disabled: true,
|
|
89
|
-
},
|
|
90
|
-
render: (args) => {
|
|
91
|
-
return <StoryRender {...args} />;
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export const CharacterLimit: Story = {
|
|
96
|
-
args: {
|
|
97
|
-
label: 'Text Field with a character limit',
|
|
98
|
-
maxLength: 12,
|
|
99
|
-
value: '',
|
|
100
|
-
},
|
|
101
|
-
render: (args) => {
|
|
102
|
-
return <StoryRender {...args} />;
|
|
103
|
-
},
|
|
104
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
import { ANIMATION, COLORS, TYPOGRAPHY } from '@/legacy/tokens';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
inputInfoCommon,
|
|
7
|
-
inputCommon,
|
|
8
|
-
labelCommon,
|
|
9
|
-
placeholderCommon,
|
|
10
|
-
} from '../inputsCommon.styles';
|
|
11
|
-
|
|
12
|
-
export const StyledTextInput = styled.div`
|
|
13
|
-
position: relative;
|
|
14
|
-
color: ${COLORS.defaultFontColor};
|
|
15
|
-
font-family: ${TYPOGRAPHY.fontFamily.base};
|
|
16
|
-
|
|
17
|
-
min-height: 40px;
|
|
18
|
-
margin-top: 35px;
|
|
19
|
-
|
|
20
|
-
label {
|
|
21
|
-
pointer-events: none;
|
|
22
|
-
|
|
23
|
-
position: absolute;
|
|
24
|
-
top: 6px;
|
|
25
|
-
|
|
26
|
-
transition: transform ${ANIMATION.duration} ${ANIMATION.timing};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
input {
|
|
30
|
-
${inputCommon};
|
|
31
|
-
|
|
32
|
-
padding: 5px 0 10px;
|
|
33
|
-
margin-top: 0;
|
|
34
|
-
|
|
35
|
-
border: 0 solid currentColor;
|
|
36
|
-
border-bottom-width: 1px;
|
|
37
|
-
|
|
38
|
-
&::placeholder {
|
|
39
|
-
color: inherit;
|
|
40
|
-
opacity: 0;
|
|
41
|
-
|
|
42
|
-
transition: opacity ${ANIMATION.duration} ${ANIMATION.timing};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:focus,
|
|
46
|
-
&.filled {
|
|
47
|
-
${placeholderCommon}
|
|
48
|
-
|
|
49
|
-
+ label {
|
|
50
|
-
${labelCommon};
|
|
51
|
-
|
|
52
|
-
transform: translateY(-30px);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
|
-
export const StyledInputInfo = styled.div`
|
|
59
|
-
${inputInfoCommon};
|
|
60
|
-
|
|
61
|
-
display: flex;
|
|
62
|
-
|
|
63
|
-
p {
|
|
64
|
-
margin: 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.count {
|
|
68
|
-
margin-left: auto;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.isMax {
|
|
72
|
-
color: ${COLORS.white};
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React, { ChangeEvent } from 'react';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import { v4 as uuid } from 'uuid';
|
|
6
|
-
|
|
7
|
-
import { PermafrostComponent } from '@/types';
|
|
8
|
-
|
|
9
|
-
import { StyledInputInfo, StyledTextInput } from './TextInput.styles';
|
|
10
|
-
|
|
11
|
-
export type Props = PermafrostComponent & {
|
|
12
|
-
autoComplete?: 'email' | 'current-password' | 'new-password' | string;
|
|
13
|
-
autoFocus?: boolean;
|
|
14
|
-
defaultValue?: string;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
displayErrors?: boolean;
|
|
17
|
-
inputProps?: any;
|
|
18
|
-
label?: string;
|
|
19
|
-
maxLength?: number;
|
|
20
|
-
name?: string;
|
|
21
|
-
onBlur?(): void;
|
|
22
|
-
onChange?(event: ChangeEvent<HTMLInputElement>): void;
|
|
23
|
-
onFocus?(): void;
|
|
24
|
-
placeholder?: string;
|
|
25
|
-
promptProps?: any;
|
|
26
|
-
required?: boolean;
|
|
27
|
-
type?: 'text' | 'email' | 'password' | string;
|
|
28
|
-
validationErrors?: string[];
|
|
29
|
-
value?: string;
|
|
30
|
-
readOnly?: boolean;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export function TextInput(props: Props): React.ReactElement {
|
|
34
|
-
// ensures unique value to associate label with input
|
|
35
|
-
const inputId = uuid();
|
|
36
|
-
const {
|
|
37
|
-
autoComplete,
|
|
38
|
-
autoFocus,
|
|
39
|
-
className,
|
|
40
|
-
defaultValue,
|
|
41
|
-
disabled,
|
|
42
|
-
displayErrors,
|
|
43
|
-
id,
|
|
44
|
-
inputProps,
|
|
45
|
-
label,
|
|
46
|
-
maxLength,
|
|
47
|
-
name,
|
|
48
|
-
onBlur,
|
|
49
|
-
onChange,
|
|
50
|
-
onFocus,
|
|
51
|
-
placeholder,
|
|
52
|
-
promptProps,
|
|
53
|
-
required,
|
|
54
|
-
type = 'text',
|
|
55
|
-
validationErrors,
|
|
56
|
-
value,
|
|
57
|
-
readOnly,
|
|
58
|
-
} = props;
|
|
59
|
-
|
|
60
|
-
const errorClass: string = displayErrors ? 'error' : 'prompt';
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<StyledTextInput className={className} data-cy={props['data-cy']} id={id}>
|
|
64
|
-
<input
|
|
65
|
-
autoComplete={autoComplete}
|
|
66
|
-
autoFocus={autoFocus}
|
|
67
|
-
className={classNames('text-input__input-element', {
|
|
68
|
-
filled: (value && value.length > 0) || defaultValue,
|
|
69
|
-
})}
|
|
70
|
-
disabled={disabled}
|
|
71
|
-
defaultValue={defaultValue}
|
|
72
|
-
id={inputId}
|
|
73
|
-
maxLength={maxLength}
|
|
74
|
-
name={name}
|
|
75
|
-
onBlur={onBlur}
|
|
76
|
-
onChange={onChange}
|
|
77
|
-
onFocus={onFocus}
|
|
78
|
-
onKeyUp={(e) => {
|
|
79
|
-
if (e.key === 'Enter') {
|
|
80
|
-
e.currentTarget.blur();
|
|
81
|
-
}
|
|
82
|
-
}}
|
|
83
|
-
placeholder={placeholder}
|
|
84
|
-
required={required}
|
|
85
|
-
type={type}
|
|
86
|
-
value={value}
|
|
87
|
-
readOnly={readOnly}
|
|
88
|
-
{...inputProps}
|
|
89
|
-
/>
|
|
90
|
-
|
|
91
|
-
{label ? <label htmlFor={inputId}>{label}</label> : null}
|
|
92
|
-
|
|
93
|
-
{(validationErrors || maxLength) && (
|
|
94
|
-
<StyledInputInfo>
|
|
95
|
-
{validationErrors && (
|
|
96
|
-
<div>
|
|
97
|
-
{validationErrors.map((err, i) => {
|
|
98
|
-
return (
|
|
99
|
-
<p className={errorClass} key={i} {...promptProps}>
|
|
100
|
-
{err}
|
|
101
|
-
</p>
|
|
102
|
-
);
|
|
103
|
-
})}
|
|
104
|
-
</div>
|
|
105
|
-
)}
|
|
106
|
-
|
|
107
|
-
{maxLength && (
|
|
108
|
-
<div className={classNames('count', { isMax: value?.length === maxLength })}>
|
|
109
|
-
{value?.length || 0} / {maxLength}
|
|
110
|
-
</div>
|
|
111
|
-
)}
|
|
112
|
-
</StyledInputInfo>
|
|
113
|
-
)}
|
|
114
|
-
</StyledTextInput>
|
|
115
|
-
);
|
|
116
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TextInput } from './TextInput';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { EditableInput } from './EditableInput';
|
|
2
|
-
export { NumberInput } from './NumberInput';
|
|
3
|
-
export { SearchInput } from './SearchInput';
|
|
4
|
-
export { TextInput } from './TextInput';
|
|
5
|
-
export { Radio, RadioGroup } from './RadioButtons';
|
|
6
|
-
export { AbstractRadio, AbstractRadioGroup } from './RadioGroup';
|