@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,62 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
import { COLORS } from '@/legacy/tokens';
|
|
4
|
-
|
|
5
|
-
export const StyledHeader = styled.header`
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
width: 100%;
|
|
9
|
-
min-height: 42px;
|
|
10
|
-
margin-bottom: 12px;
|
|
11
|
-
|
|
12
|
-
.title {
|
|
13
|
-
font-size: 22px;
|
|
14
|
-
margin: 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.count {
|
|
18
|
-
font-size: 18px;
|
|
19
|
-
margin: 4px 0 0 10px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.title-container,
|
|
23
|
-
.controls-container,
|
|
24
|
-
.sort-by {
|
|
25
|
-
display: inherit;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.sort-by {
|
|
29
|
-
margin-left: 10px;
|
|
30
|
-
|
|
31
|
-
label,
|
|
32
|
-
.button-sort-direction,
|
|
33
|
-
.button-sort-direction:focus {
|
|
34
|
-
color: ${COLORS.lightFontColor};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
label {
|
|
38
|
-
font-weight: normal;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.button-sort-direction {
|
|
42
|
-
margin-left: 10px;
|
|
43
|
-
|
|
44
|
-
svg {
|
|
45
|
-
position: relative;
|
|
46
|
-
bottom: 3px;
|
|
47
|
-
transition: 0.3s transform ease-in-out;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.select-container {
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
|
|
55
|
-
.selectCaret {
|
|
56
|
-
color: ${COLORS.defaultFontColor};
|
|
57
|
-
height: 16px;
|
|
58
|
-
width: 16px;
|
|
59
|
-
margin: 0;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
@@ -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
|
-
|
|
5
|
-
import { numberUtils } from '@/legacy/utils';
|
|
6
|
-
import { BorderSelect, Button } from '@/legacy/components';
|
|
7
|
-
import { Icon } from '@/components';
|
|
8
|
-
|
|
9
|
-
import { StyledHeader } from './Header.styles';
|
|
10
|
-
|
|
11
|
-
type Props = {
|
|
12
|
-
title: string;
|
|
13
|
-
headerComponent?: React.ReactNode;
|
|
14
|
-
sortBy?: {
|
|
15
|
-
value: string;
|
|
16
|
-
items: { name: string; value: string }[];
|
|
17
|
-
descending: boolean;
|
|
18
|
-
updateDescending: () => void;
|
|
19
|
-
onSort: (value: string) => void;
|
|
20
|
-
};
|
|
21
|
-
aggregateCount?: number;
|
|
22
|
-
selectProps?: { 'data-cy': string };
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Header = (props: Props) => {
|
|
26
|
-
const { title, headerComponent, sortBy, aggregateCount } = props;
|
|
27
|
-
return (
|
|
28
|
-
<StyledHeader>
|
|
29
|
-
<div className="title-container">
|
|
30
|
-
<h2 className="title">{title}</h2>
|
|
31
|
-
<span className="count">
|
|
32
|
-
{aggregateCount ? numberUtils.numberWithCommas(aggregateCount) : null}
|
|
33
|
-
</span>
|
|
34
|
-
</div>
|
|
35
|
-
<div className="controls-container">
|
|
36
|
-
{headerComponent ? <div className="header-component">{headerComponent}</div> : null}
|
|
37
|
-
{sortBy ? (
|
|
38
|
-
<div className="sort-by">
|
|
39
|
-
<BorderSelect
|
|
40
|
-
label="Sort By"
|
|
41
|
-
value={sortBy.value}
|
|
42
|
-
options={sortBy.items}
|
|
43
|
-
onChange={(e) => {
|
|
44
|
-
sortBy.onSort(e.target.value);
|
|
45
|
-
}}
|
|
46
|
-
horizontal
|
|
47
|
-
{...props.selectProps}
|
|
48
|
-
/>
|
|
49
|
-
<Button
|
|
50
|
-
data-cy="dataset--sort-by-btn"
|
|
51
|
-
onClick={() => sortBy.updateDescending()}
|
|
52
|
-
variant="no-style"
|
|
53
|
-
className="button-sort-direction"
|
|
54
|
-
>
|
|
55
|
-
<Icon
|
|
56
|
-
name="fa-arrow-down"
|
|
57
|
-
ariaLabel="descending"
|
|
58
|
-
style={{ transform: sortBy.descending ? '' : 'rotate(180deg)' }}
|
|
59
|
-
/>
|
|
60
|
-
</Button>
|
|
61
|
-
</div>
|
|
62
|
-
) : null}
|
|
63
|
-
</div>
|
|
64
|
-
</StyledHeader>
|
|
65
|
-
);
|
|
66
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Header } from './Header';
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
|
|
4
|
-
import { Button } from '@/legacy/components';
|
|
5
|
-
|
|
6
|
-
import { ListTable } from './ListTable';
|
|
7
|
-
import { mockUserHeaders, mockDocProcHeaders, mockAllUsers, mockDocProcReport } from './mock-data';
|
|
8
|
-
import { Icon } from '@/components';
|
|
9
|
-
|
|
10
|
-
const meta = {
|
|
11
|
-
component: ListTable,
|
|
12
|
-
title: 'legacy/ListTable',
|
|
13
|
-
argTypes: {},
|
|
14
|
-
} satisfies Meta<typeof ListTable>;
|
|
15
|
-
|
|
16
|
-
export default meta;
|
|
17
|
-
type Story = StoryObj<typeof ListTable>;
|
|
18
|
-
|
|
19
|
-
//Generate List Headers
|
|
20
|
-
const createdUserHeader = (
|
|
21
|
-
<div style={{ display: 'grid', gridTemplateColumns: '1fr 3fr 3fr 2fr 250px' }}>
|
|
22
|
-
{mockUserHeaders.map((h, i) => (
|
|
23
|
-
<div className="label" key={`${h.name}-${i}`}>
|
|
24
|
-
{h.name}
|
|
25
|
-
</div>
|
|
26
|
-
))}
|
|
27
|
-
</div>
|
|
28
|
-
);
|
|
29
|
-
const createdDocProcHeader = (
|
|
30
|
-
<div style={{ display: 'grid', gridTemplateColumns: '2fr 3fr 2fr 170px' }}>
|
|
31
|
-
{mockDocProcHeaders.map((h, i) => (
|
|
32
|
-
<div className="label" key={`${h.name}-${i}`}>
|
|
33
|
-
{h.name}
|
|
34
|
-
</div>
|
|
35
|
-
))}
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
//Generate List Items
|
|
40
|
-
const createdListItems = mockAllUsers.users.map((u) => (
|
|
41
|
-
<div
|
|
42
|
-
key={`${u.name}-${u.id}`}
|
|
43
|
-
style={{ display: 'grid', gridTemplateColumns: '1fr 3fr 3fr 2fr 250px', alignItems: 'center' }}
|
|
44
|
-
>
|
|
45
|
-
<div>{u.id}</div>
|
|
46
|
-
<div>{u.name}</div>
|
|
47
|
-
<div>{u.email}</div>
|
|
48
|
-
<div>{u.registeredAt}</div>
|
|
49
|
-
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
|
50
|
-
<button style={{ display: 'flex', alignItems: 'center', marginLeft: '10px' }}>
|
|
51
|
-
<Icon name="key" style={{ marginRight: '5px' }} />
|
|
52
|
-
Reset Link
|
|
53
|
-
</button>
|
|
54
|
-
<button style={{ display: 'flex', alignItems: 'center', marginLeft: '10px' }}>
|
|
55
|
-
<Icon name="fa-cog" style={{ marginRight: '5px' }} />
|
|
56
|
-
Settings
|
|
57
|
-
</button>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
));
|
|
61
|
-
const createdDocProcItems = mockDocProcReport.reports.map((u) => (
|
|
62
|
-
<div
|
|
63
|
-
key={`${u.name}-${u.createdOn}`}
|
|
64
|
-
style={{ display: 'grid', gridTemplateColumns: '2fr 3fr 2fr 170px', alignItems: 'center' }}
|
|
65
|
-
>
|
|
66
|
-
<div>{u.createdOn}</div>
|
|
67
|
-
<div>{u.name}</div>
|
|
68
|
-
<div>{u.status}</div>
|
|
69
|
-
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
|
70
|
-
<button
|
|
71
|
-
style={{ display: 'flex', alignItems: 'center', marginLeft: '10px', maxHeight: '35px' }}
|
|
72
|
-
>
|
|
73
|
-
<Icon name="fa-file-download" style={{ marginRight: '5px' }} />
|
|
74
|
-
Secure Download
|
|
75
|
-
</button>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
));
|
|
79
|
-
|
|
80
|
-
function StoryRender(props: any) {
|
|
81
|
-
const [sortValue, setSortValue] = useState<string>(props?.sortBy?.value);
|
|
82
|
-
const [arrowDesc, setArrowDesc] = useState<boolean>(props?.sortBy?.descending);
|
|
83
|
-
|
|
84
|
-
const setArgs: any = {
|
|
85
|
-
...props,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
props.sortBy
|
|
89
|
-
? (setArgs.sortBy = {
|
|
90
|
-
value: sortValue,
|
|
91
|
-
items: props.sortBy.items,
|
|
92
|
-
descending: arrowDesc,
|
|
93
|
-
updateDescending: () => setArrowDesc(!arrowDesc),
|
|
94
|
-
onSort: (value: string) => setSortValue(value),
|
|
95
|
-
})
|
|
96
|
-
: null;
|
|
97
|
-
|
|
98
|
-
return <ListTable {...setArgs} />;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export const Base: Story = {
|
|
102
|
-
args: {
|
|
103
|
-
title: 'User Accounts',
|
|
104
|
-
listHeader: createdUserHeader,
|
|
105
|
-
listItems: createdListItems,
|
|
106
|
-
pagination: {
|
|
107
|
-
pageInfo: mockAllUsers.pageInfo,
|
|
108
|
-
limit: 20,
|
|
109
|
-
currentPage: 1,
|
|
110
|
-
getPage: () => console.info('Get Page'),
|
|
111
|
-
getPreviousPage: () => console.info('Get Previous Page'),
|
|
112
|
-
getNextPage: () => console.info('Get Next Page'),
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
render: (args) => {
|
|
116
|
-
return <StoryRender {...args} />;
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
export const WithSortBy: Story = {
|
|
121
|
-
args: {
|
|
122
|
-
title: 'Sort By',
|
|
123
|
-
sortBy: {
|
|
124
|
-
value: 'REGISTERED_AT',
|
|
125
|
-
items: mockUserHeaders,
|
|
126
|
-
descending: true,
|
|
127
|
-
updateDescending: () => '',
|
|
128
|
-
onSort: () => '',
|
|
129
|
-
},
|
|
130
|
-
listHeader: createdUserHeader,
|
|
131
|
-
listItems: createdListItems,
|
|
132
|
-
pagination: {
|
|
133
|
-
pageInfo: mockAllUsers.pageInfo,
|
|
134
|
-
limit: 20,
|
|
135
|
-
currentPage: 1,
|
|
136
|
-
getPage: () => console.info('Get Page'),
|
|
137
|
-
getPreviousPage: () => console.info('Get Previous Page'),
|
|
138
|
-
getNextPage: () => console.info('Get Next Page'),
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
render: (args) => {
|
|
142
|
-
return <StoryRender {...args} />;
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
export const WithSubTitle: Story = {
|
|
147
|
-
args: {
|
|
148
|
-
title: 'Sub-Title',
|
|
149
|
-
subTitle: (
|
|
150
|
-
<div style={{ display: 'flex' }}>
|
|
151
|
-
<p>
|
|
152
|
-
Create Document Processing Report to see which documents have been processed by Indico for
|
|
153
|
-
dates selected for a maximum of 60 days. The report also includes information for when the
|
|
154
|
-
processing occurred, which Workflows those documents were processed by, and how many pages
|
|
155
|
-
each document has in a downloadable CSV.
|
|
156
|
-
</p>
|
|
157
|
-
<Button
|
|
158
|
-
variant="primary"
|
|
159
|
-
style={{ marginLeft: '60px', height: '40px' }}
|
|
160
|
-
onClick={() => console.info('Clicked')}
|
|
161
|
-
>
|
|
162
|
-
<Icon name="plus" style={{ marginRight: '8px' }} />
|
|
163
|
-
Generate Export
|
|
164
|
-
</Button>
|
|
165
|
-
</div>
|
|
166
|
-
),
|
|
167
|
-
sortBy: {
|
|
168
|
-
value: 'REGISTERED_AT',
|
|
169
|
-
items: mockDocProcHeaders,
|
|
170
|
-
descending: true,
|
|
171
|
-
updateDescending: () => '',
|
|
172
|
-
onSort: () => '',
|
|
173
|
-
},
|
|
174
|
-
listHeader: createdDocProcHeader,
|
|
175
|
-
listItems: createdDocProcItems,
|
|
176
|
-
pagination: {
|
|
177
|
-
pageInfo: mockDocProcReport.pageInfo,
|
|
178
|
-
limit: 5,
|
|
179
|
-
currentPage: 1,
|
|
180
|
-
getPage: () => console.info('Get Page'),
|
|
181
|
-
getPreviousPage: () => console.info('Get Previous Page'),
|
|
182
|
-
getNextPage: () => console.info('Get Next Page'),
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
render: (args) => {
|
|
186
|
-
return <StoryRender {...args} />;
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export const WithAccordion: Story = {
|
|
191
|
-
args: {
|
|
192
|
-
title: 'Accordion',
|
|
193
|
-
accordion: true,
|
|
194
|
-
sortBy: {
|
|
195
|
-
value: 'REGISTERED_AT',
|
|
196
|
-
items: mockUserHeaders,
|
|
197
|
-
descending: true,
|
|
198
|
-
updateDescending: () => '',
|
|
199
|
-
onSort: () => '',
|
|
200
|
-
},
|
|
201
|
-
listHeader: createdUserHeader,
|
|
202
|
-
listItems: createdListItems,
|
|
203
|
-
pagination: {
|
|
204
|
-
pageInfo: mockDocProcReport.pageInfo,
|
|
205
|
-
limit: 20,
|
|
206
|
-
currentPage: 1,
|
|
207
|
-
getPage: () => console.info('Get Page'),
|
|
208
|
-
getPreviousPage: () => console.info('Get Previous Page'),
|
|
209
|
-
getNextPage: () => console.info('Get Next Page'),
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
render: (args) => {
|
|
213
|
-
return <StoryRender {...args} />;
|
|
214
|
-
},
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
export const WithHeaderComponent: Story = {
|
|
218
|
-
args: {
|
|
219
|
-
title: 'Header Component',
|
|
220
|
-
headerComponent: (
|
|
221
|
-
<div style={{ padding: '6px 0' }}>
|
|
222
|
-
<h2>CUSTOM HEADER HTML</h2>
|
|
223
|
-
</div>
|
|
224
|
-
),
|
|
225
|
-
listHeader: createdDocProcHeader,
|
|
226
|
-
listItems: createdDocProcItems,
|
|
227
|
-
pagination: {
|
|
228
|
-
pageInfo: mockDocProcReport.pageInfo,
|
|
229
|
-
limit: 5,
|
|
230
|
-
currentPage: 1,
|
|
231
|
-
getPage: () => console.info('Get Page'),
|
|
232
|
-
getPreviousPage: () => console.info('Get Previous Page'),
|
|
233
|
-
getNextPage: () => console.info('Get Next Page'),
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
render: (args) => {
|
|
237
|
-
return <StoryRender {...args} />;
|
|
238
|
-
},
|
|
239
|
-
};
|
|
240
|
-
|
|
241
|
-
export const WithEverything: Story = {
|
|
242
|
-
args: {
|
|
243
|
-
title: 'All The Things',
|
|
244
|
-
accordion: true,
|
|
245
|
-
subTitle: (
|
|
246
|
-
<div style={{ display: 'flex' }}>
|
|
247
|
-
<p>
|
|
248
|
-
Create Document Processing Report to see which documents have been processed by Indico for
|
|
249
|
-
dates selected for a maximum of 60 days. The report also includes information for when the
|
|
250
|
-
processing occurred, which Workflows those documents were processed by, and how many pages
|
|
251
|
-
each document has in a downloadable CSV.
|
|
252
|
-
</p>
|
|
253
|
-
<Button
|
|
254
|
-
variant="primary"
|
|
255
|
-
style={{ marginLeft: '60px', maxHeight: '40px' }}
|
|
256
|
-
onClick={() => console.info('Clicked')}
|
|
257
|
-
>
|
|
258
|
-
<Icon name="plus" style={{ marginRight: '8px' }} />
|
|
259
|
-
Generate Export
|
|
260
|
-
</Button>
|
|
261
|
-
</div>
|
|
262
|
-
),
|
|
263
|
-
sortBy: {
|
|
264
|
-
value: 'REGISTERED_AT',
|
|
265
|
-
items: mockDocProcHeaders,
|
|
266
|
-
descending: true,
|
|
267
|
-
updateDescending: () => '',
|
|
268
|
-
onSort: () => '',
|
|
269
|
-
},
|
|
270
|
-
listHeader: createdDocProcHeader,
|
|
271
|
-
listItems: createdDocProcItems,
|
|
272
|
-
pagination: {
|
|
273
|
-
pageInfo: mockDocProcReport.pageInfo,
|
|
274
|
-
limit: 5,
|
|
275
|
-
currentPage: 1,
|
|
276
|
-
getPage: () => console.info('Get Page'),
|
|
277
|
-
getPreviousPage: () => console.info('Get Previous Page'),
|
|
278
|
-
getNextPage: () => console.info('Get Next Page'),
|
|
279
|
-
},
|
|
280
|
-
},
|
|
281
|
-
render: (args) => {
|
|
282
|
-
return <StoryRender {...args} />;
|
|
283
|
-
},
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
export const Loading: Story = {
|
|
287
|
-
args: {
|
|
288
|
-
title: 'User Accounts',
|
|
289
|
-
listHeader: createdUserHeader,
|
|
290
|
-
listItems: createdListItems,
|
|
291
|
-
loading: true,
|
|
292
|
-
},
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
export const Error: Story = {
|
|
296
|
-
args: {
|
|
297
|
-
title: 'User Accounts',
|
|
298
|
-
listHeader: createdUserHeader,
|
|
299
|
-
listItems: createdListItems,
|
|
300
|
-
error: true,
|
|
301
|
-
},
|
|
302
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
import { COLORS } from '@/legacy/tokens';
|
|
4
|
-
|
|
5
|
-
export const StyledListTable = styled.div`
|
|
6
|
-
.list {
|
|
7
|
-
.list-header-container,
|
|
8
|
-
.list-container .list-item {
|
|
9
|
-
border-bottom: solid ${COLORS.blueBayoux} 1px;
|
|
10
|
-
padding: 0 20px 10px 20px;
|
|
11
|
-
margin-bottom: 10px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.list-header-container {
|
|
15
|
-
border-bottom-color: ${COLORS.baliHai};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.list-container .list-item {
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
|
|
21
|
-
& > * div {
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
white-space: nowrap;
|
|
24
|
-
text-overflow: ellipsis;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.sub-title {
|
|
30
|
-
margin-bottom: 20px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
summary,
|
|
34
|
-
summary h2 {
|
|
35
|
-
width: 100%;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
summary .header-container {
|
|
39
|
-
svg {
|
|
40
|
-
margin-top: 2px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.header-component div {
|
|
44
|
-
padding: 0;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
summary .title-container {
|
|
49
|
-
margin-bottom: 2px;
|
|
50
|
-
|
|
51
|
-
.title {
|
|
52
|
-
align-items: flex-start;
|
|
53
|
-
|
|
54
|
-
h2 {
|
|
55
|
-
margin-left: 0;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.count {
|
|
60
|
-
color: ${COLORS.defaultFontColor};
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
summary .sort-by .button-sort-direction svg {
|
|
65
|
-
bottom: 5px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.content {
|
|
69
|
-
margin-top: 0 !important;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.error-shrug {
|
|
73
|
-
margin: 0 20px;
|
|
74
|
-
background-color: ${COLORS.oxfordBlue};
|
|
75
|
-
}
|
|
76
|
-
`;
|
|
@@ -1,140 +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
|
-
|
|
6
|
-
import { Pagination } from '@/legacy/components/Pagination';
|
|
7
|
-
import { Accordion } from '@/legacy/components/Accordion';
|
|
8
|
-
import { LoadingList } from '@/legacy/components/loading-indicators';
|
|
9
|
-
import { Shrug } from '@/legacy/components/user-feedback';
|
|
10
|
-
import { SectionBody } from '@/legacy/components/basic-section';
|
|
11
|
-
|
|
12
|
-
import { PermafrostComponent } from '@/types';
|
|
13
|
-
|
|
14
|
-
import { Header } from './Header';
|
|
15
|
-
import { StyledListTable } from './ListTable.styles';
|
|
16
|
-
|
|
17
|
-
type Props = PermafrostComponent & {
|
|
18
|
-
accordion?: boolean;
|
|
19
|
-
accordionDefaultOpen?: boolean;
|
|
20
|
-
emptyListMessage?: string;
|
|
21
|
-
error?: any;
|
|
22
|
-
errorMessage?: any;
|
|
23
|
-
headerComponent?: React.ReactNode;
|
|
24
|
-
listHeader: React.ReactNode;
|
|
25
|
-
listItems: React.ReactNode[];
|
|
26
|
-
loading?: any;
|
|
27
|
-
pagination?: {
|
|
28
|
-
currentPage: number;
|
|
29
|
-
limit: number;
|
|
30
|
-
pageInfo: {
|
|
31
|
-
startCursor: number;
|
|
32
|
-
endCursor: number;
|
|
33
|
-
hasNextPage: boolean;
|
|
34
|
-
aggregateCount: number;
|
|
35
|
-
};
|
|
36
|
-
getNextPage: (before: number) => void;
|
|
37
|
-
getPage: (after: number, pageOffset: number) => void;
|
|
38
|
-
getPreviousPage: (after: number) => void;
|
|
39
|
-
};
|
|
40
|
-
sortBy?: {
|
|
41
|
-
descending: boolean;
|
|
42
|
-
items: { name: string; value: string }[];
|
|
43
|
-
value: string;
|
|
44
|
-
onSort: (value: string) => void;
|
|
45
|
-
updateDescending: () => void;
|
|
46
|
-
};
|
|
47
|
-
subTitle?: string | React.ReactNode;
|
|
48
|
-
title: string;
|
|
49
|
-
totalCount?: number;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const ListTable = (props: Props) => {
|
|
53
|
-
const header = (
|
|
54
|
-
<Header
|
|
55
|
-
selectProps={{ 'data-cy': 'dataset--sort-by-select' }}
|
|
56
|
-
title={props.title}
|
|
57
|
-
headerComponent={props.headerComponent}
|
|
58
|
-
sortBy={props.sortBy}
|
|
59
|
-
aggregateCount={props?.pagination?.pageInfo?.aggregateCount || props.totalCount}
|
|
60
|
-
/>
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
const RenderList = () => {
|
|
64
|
-
if (props.loading) {
|
|
65
|
-
return <LoadingList />;
|
|
66
|
-
}
|
|
67
|
-
if (props.error) {
|
|
68
|
-
return (
|
|
69
|
-
<SectionBody className="error-shrug">
|
|
70
|
-
<Shrug message={props.errorMessage || 'Sorry, there was an error retrieving this data'} />
|
|
71
|
-
</SectionBody>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<>
|
|
77
|
-
{props.listItems.length === 0 ? (
|
|
78
|
-
<SectionBody className="error-shrug">
|
|
79
|
-
<Shrug message={props.emptyListMessage || 'No results found'} />
|
|
80
|
-
</SectionBody>
|
|
81
|
-
) : (
|
|
82
|
-
<ul className="list-container">
|
|
83
|
-
{props.listItems.map((li) => {
|
|
84
|
-
const key = uuid();
|
|
85
|
-
return (
|
|
86
|
-
<li className="list-item" key={key}>
|
|
87
|
-
{li}
|
|
88
|
-
</li>
|
|
89
|
-
);
|
|
90
|
-
})}
|
|
91
|
-
</ul>
|
|
92
|
-
)}
|
|
93
|
-
{props.pagination ? (
|
|
94
|
-
<Pagination
|
|
95
|
-
limit={props.pagination.limit}
|
|
96
|
-
pageInfo={props.pagination.pageInfo}
|
|
97
|
-
currentPage={props.pagination.currentPage}
|
|
98
|
-
getPage={props.pagination.getPage}
|
|
99
|
-
getPreviousPage={props.pagination.getPreviousPage}
|
|
100
|
-
getNextPage={props.pagination.getNextPage}
|
|
101
|
-
quantity={props.listItems.length}
|
|
102
|
-
/>
|
|
103
|
-
) : null}
|
|
104
|
-
</>
|
|
105
|
-
);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const list = (
|
|
109
|
-
<StyledListTable>
|
|
110
|
-
{props.subTitle ? (
|
|
111
|
-
<div className="sub-title">
|
|
112
|
-
{typeof props.subTitle === 'string' ? (
|
|
113
|
-
<p style={{ maxWidth: '75%' }}>{props.subTitle}</p>
|
|
114
|
-
) : (
|
|
115
|
-
props.subTitle
|
|
116
|
-
)}
|
|
117
|
-
</div>
|
|
118
|
-
) : null}
|
|
119
|
-
<div className="list">
|
|
120
|
-
{!props.error ? <div className="list-header-container">{props.listHeader}</div> : null}
|
|
121
|
-
<RenderList />
|
|
122
|
-
</div>
|
|
123
|
-
</StyledListTable>
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
return (
|
|
127
|
-
<StyledListTable className={props.className} data-cy={props['data-cy']} id={props.id}>
|
|
128
|
-
{props.accordion ? (
|
|
129
|
-
<Accordion header={header} content={list} open={props.accordionDefaultOpen} />
|
|
130
|
-
) : (
|
|
131
|
-
<>
|
|
132
|
-
{header}
|
|
133
|
-
{list}
|
|
134
|
-
</>
|
|
135
|
-
)}
|
|
136
|
-
</StyledListTable>
|
|
137
|
-
);
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
export default ListTable;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ListTable } from './ListTable';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { mockUserHeaders, mockDocProcHeaders, mockAllUsers, mockDocProcReport } from './mock-data';
|