@indico-data/design-system 2.43.1 → 2.45.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 +1778 -1019
- package/lib/index.d.ts +148 -885
- package/lib/index.esm.css +1778 -1019
- package/lib/index.esm.js +17829 -24248
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +16041 -22502
- package/lib/index.js.map +1 -1
- package/lib/legacy/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/legacy/components/index.d.ts +1 -12
- package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.d.ts +1 -1
- package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.d.ts +1 -1
- package/lib/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +1 -1
- package/lib/legacy/components/loading-indicators/index.d.ts +0 -4
- package/lib/legacy/components/modals/ConfirmModal/ConfirmModal.d.ts +1 -1
- package/lib/legacy/components/modals/ModalBase/ModalBase.d.ts +1 -1
- package/lib/stylesAndAnimations/colors/constants.d.ts +0 -1
- package/lib/types.d.ts +1 -3
- package/package.json +1 -1
- package/src/components/button/Button.mdx +28 -78
- package/src/components/button/Button.stories.tsx +312 -176
- package/src/components/button/Button.tsx +23 -16
- package/src/components/button/__tests__/Button.test.tsx +66 -58
- package/src/components/button/enums.ts +2 -6
- package/src/components/button/styles/Button.scss +119 -137
- package/src/components/button/styles/_variables.scss +115 -148
- package/src/components/button/types.ts +6 -8
- package/src/components/card/Card.stories.tsx +1 -1
- package/src/components/card/styles/Card.scss +11 -11
- package/src/components/floatUI/FloatUI.mdx +5 -5
- package/src/components/floatUI/FloatUI.stories.tsx +8 -8
- package/src/components/floatUI/__tests__/FloatUI.test.tsx +3 -3
- package/src/components/floatUI/styles/FloatUI.scss +1 -2
- package/src/components/floatUI/styles/_variables.scss +11 -7
- package/src/components/forms/checkbox/styles/Checkbox.scss +8 -14
- package/src/components/forms/date/datePicker/styles/DatePicker.scss +9 -5
- package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +4 -4
- package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +1 -1
- package/src/components/forms/form/styles/Form.scss +84 -2
- package/src/components/forms/input/Input.tsx +2 -2
- package/src/components/forms/input/styles/Input.scss +3 -67
- package/src/components/forms/numberInput/NumberInput.tsx +1 -1
- package/src/components/forms/numberInput/styles/NumberInput.scss +4 -67
- package/src/components/forms/passwordInput/PasswordInput.tsx +1 -1
- package/src/components/forms/passwordInput/styles/PasswordInput.scss +3 -67
- package/src/components/forms/radio/styles/Radio.scss +6 -10
- package/src/components/forms/select/styles/Select.scss +30 -44
- package/src/components/forms/textarea/styles/Textarea.scss +1 -49
- package/src/components/forms/toggle/styles/Toggle.scss +13 -12
- package/src/components/grid/styles/Grid.scss +3 -3
- package/src/components/icons/__tests__/Icon.test.tsx +1 -1
- package/src/components/menu/Menu.stories.tsx +3 -3
- package/src/components/menu/Menu.test.tsx +9 -9
- package/src/components/menu/styles/Menu.scss +5 -0
- package/src/components/menu/styles/_variables.scss +11 -6
- package/src/components/pill/styles/Pill.scss +4 -5
- package/src/components/skeleton/styles/Skeleton.scss +2 -2
- package/src/components/table/LoadingComponent.tsx +0 -2
- package/src/components/table/styles/Table.scss +6 -0
- package/src/components/table/styles/_variables.scss +11 -9
- 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 +7 -18
- package/src/styles/index.scss +1 -2
- package/src/styles/storybook.scss +1 -1
- package/src/styles/variables/_borders.scss +7 -7
- 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,236 +0,0 @@
|
|
|
1
|
-
import styled, { keyframes } from 'styled-components';
|
|
2
|
-
|
|
3
|
-
import { colorUtils } from '@/legacy/utils';
|
|
4
|
-
|
|
5
|
-
import { MEDIA_QUERIES, COLORS } from '@/legacy/tokens';
|
|
6
|
-
|
|
7
|
-
const cardTableLoading = keyframes`
|
|
8
|
-
25% {
|
|
9
|
-
left: -50px;
|
|
10
|
-
}
|
|
11
|
-
50% {
|
|
12
|
-
left: calc(100% + 50px);
|
|
13
|
-
}
|
|
14
|
-
75% {
|
|
15
|
-
left: calc(100% + 50px);
|
|
16
|
-
}
|
|
17
|
-
100% {
|
|
18
|
-
left: calc(100% + 50px);
|
|
19
|
-
}
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
export const StyledSectionTable = styled.div`
|
|
23
|
-
.mobile-sort {
|
|
24
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
25
|
-
display: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
select {
|
|
29
|
-
max-width: none;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.outer-hover {
|
|
34
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
35
|
-
&:hover {
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&.loading {
|
|
42
|
-
margin-top: 50px;
|
|
43
|
-
|
|
44
|
-
table {
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.SectionTable--tbody-loading {
|
|
50
|
-
tr {
|
|
51
|
-
margin: 10px 0;
|
|
52
|
-
border-bottom: 10px solid transparent;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
td {
|
|
56
|
-
position: relative;
|
|
57
|
-
border-bottom: none;
|
|
58
|
-
height: 73px;
|
|
59
|
-
background: ${COLORS.mirage};
|
|
60
|
-
|
|
61
|
-
&:before {
|
|
62
|
-
position: absolute;
|
|
63
|
-
display: block;
|
|
64
|
-
top: 0;
|
|
65
|
-
left: -50px;
|
|
66
|
-
content: '';
|
|
67
|
-
height: 100%;
|
|
68
|
-
width: 50px;
|
|
69
|
-
background: linear-gradient(90deg, ${COLORS.mirage}, #232e3d, ${COLORS.mirage});
|
|
70
|
-
animation: ${cardTableLoading} 2s infinite;
|
|
71
|
-
animation-timing-function: linear;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
tbody > tr {
|
|
77
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
78
|
-
&.hover:hover {
|
|
79
|
-
background: ${COLORS.oxfordBlue};
|
|
80
|
-
cursor: pointer;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.action-column {
|
|
86
|
-
display: none;
|
|
87
|
-
text-align: center;
|
|
88
|
-
width: 20px;
|
|
89
|
-
padding: 20px 5px;
|
|
90
|
-
|
|
91
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
92
|
-
display: table-cell;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
table,
|
|
97
|
-
thead,
|
|
98
|
-
tbody,
|
|
99
|
-
th,
|
|
100
|
-
td,
|
|
101
|
-
tr {
|
|
102
|
-
display: block;
|
|
103
|
-
|
|
104
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
105
|
-
display: table;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.no-link {
|
|
109
|
-
cursor: default;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
thead {
|
|
114
|
-
display: block;
|
|
115
|
-
|
|
116
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
117
|
-
display: table-header-group;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
th {
|
|
122
|
-
padding-bottom: 10px;
|
|
123
|
-
border-bottom: 1px solid #535d6d;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
th:hover {
|
|
127
|
-
cursor: pointer;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
th.not-sortable:hover {
|
|
131
|
-
cursor: default;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
tbody {
|
|
135
|
-
display: block;
|
|
136
|
-
|
|
137
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
138
|
-
display: table-row-group;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
th,
|
|
143
|
-
td {
|
|
144
|
-
display: block;
|
|
145
|
-
|
|
146
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
147
|
-
display: table-cell;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
tr {
|
|
152
|
-
display: block;
|
|
153
|
-
padding-bottom: 10px;
|
|
154
|
-
|
|
155
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
156
|
-
display: table-row;
|
|
157
|
-
|
|
158
|
-
border-bottom: 0.5px solid ${colorUtils.hexToRgb(COLORS.defaultFontColor, 0.1)};
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/* Hide table headers (but not display: none;, for accessibility) */
|
|
163
|
-
thead tr {
|
|
164
|
-
position: absolute;
|
|
165
|
-
top: -9999px;
|
|
166
|
-
left: -9999px;
|
|
167
|
-
|
|
168
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
169
|
-
position: static;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
tr:nth-child(odd) {
|
|
174
|
-
background: ${COLORS.oxfordBlue};
|
|
175
|
-
|
|
176
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
177
|
-
background: transparent;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
td {
|
|
182
|
-
/* Behave like a "row" */
|
|
183
|
-
border: none;
|
|
184
|
-
position: relative;
|
|
185
|
-
padding-left: 50%;
|
|
186
|
-
padding-top: 10px;
|
|
187
|
-
padding-bottom: 5px;
|
|
188
|
-
|
|
189
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
190
|
-
position: static;
|
|
191
|
-
padding: 20px 15px;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
td:before {
|
|
196
|
-
/* Now like a table header */
|
|
197
|
-
position: absolute;
|
|
198
|
-
/* Top/left values mimic padding */
|
|
199
|
-
left: 6px;
|
|
200
|
-
width: 45%;
|
|
201
|
-
padding-right: 10px;
|
|
202
|
-
white-space: nowrap;
|
|
203
|
-
content: attr(data-heading);
|
|
204
|
-
|
|
205
|
-
@media ${MEDIA_QUERIES.mediumScreen} {
|
|
206
|
-
display: none;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
td.inner-table-cell {
|
|
211
|
-
padding-top: 0;
|
|
212
|
-
padding-bottom: 0;
|
|
213
|
-
padding-left: 5px;
|
|
214
|
-
border: none;
|
|
215
|
-
|
|
216
|
-
&:before {
|
|
217
|
-
display: none;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
tr.row-option {
|
|
222
|
-
display: none;
|
|
223
|
-
|
|
224
|
-
&.open {
|
|
225
|
-
display: table-row;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.outer-hover tr {
|
|
230
|
-
border: none;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.outer-hover .hover {
|
|
234
|
-
border-bottom: 0.5px solid ${colorUtils.hexToRgb(COLORS.defaultFontColor, 0.1)};
|
|
235
|
-
}
|
|
236
|
-
`;
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React, { useState } from 'react';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
|
|
6
|
-
import { IconName } from '@/types';
|
|
7
|
-
import { Icon } from '@/components';
|
|
8
|
-
import { BorderSelect } from '@/legacy/components/dropdowns';
|
|
9
|
-
|
|
10
|
-
import { StyledSectionTable } from './SectionTable.styles';
|
|
11
|
-
|
|
12
|
-
const createTitle = (item: any) => {
|
|
13
|
-
return typeof item === 'string' || typeof item === 'number' ? item : null;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const SectionTable = (props: any) => {
|
|
17
|
-
const [openRowOptions, changeOpenRowOptions] = useState([]);
|
|
18
|
-
|
|
19
|
-
const handleRowClick = (link: any) => {
|
|
20
|
-
if (!link) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
return (e: any) => {
|
|
24
|
-
e.stopPropagation();
|
|
25
|
-
props.history.push(link);
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const handleRowOptionToggleClick = (id: any) => {
|
|
30
|
-
if (openRowOptions.indexOf(id as never) === -1) {
|
|
31
|
-
changeOpenRowOptions([].concat(openRowOptions, id));
|
|
32
|
-
} else {
|
|
33
|
-
changeOpenRowOptions(openRowOptions.filter((option) => option !== id));
|
|
34
|
-
}
|
|
35
|
-
if (props.openRowOptionHandler) {
|
|
36
|
-
props.openRowOptionHandler(id);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const headers = Object.keys(props.tableObjects[0].content);
|
|
41
|
-
return (
|
|
42
|
-
<StyledSectionTable
|
|
43
|
-
className={classNames('SectionTable', props.className, { loading: props.loading })}
|
|
44
|
-
data-cy={props['data-cy']}
|
|
45
|
-
id={props.id}
|
|
46
|
-
>
|
|
47
|
-
{props.sortColumnHandler && props.sortedColumn && (
|
|
48
|
-
<div className="mobile-sort">
|
|
49
|
-
<BorderSelect
|
|
50
|
-
onChange={(e) => props.sortColumnHandler(e.target.value)}
|
|
51
|
-
value={props.sortedColumn}
|
|
52
|
-
options={([] as { name: string; value: string }[]).concat(
|
|
53
|
-
{ name: 'Choose Sorting Option', value: '' },
|
|
54
|
-
headers.map((item) => {
|
|
55
|
-
return { name: item, value: item };
|
|
56
|
-
}),
|
|
57
|
-
)}
|
|
58
|
-
/>
|
|
59
|
-
</div>
|
|
60
|
-
)}
|
|
61
|
-
<table {...props.tableProps}>
|
|
62
|
-
<thead>
|
|
63
|
-
<tr>
|
|
64
|
-
{props.tableObjects[0].rowAccordionContent ? <th className="action-column" /> : null}
|
|
65
|
-
{headers.map((header, i) => {
|
|
66
|
-
return (
|
|
67
|
-
<th
|
|
68
|
-
className={classNames({
|
|
69
|
-
'not-sortable':
|
|
70
|
-
props.sortableHeaders && props.sortableHeaders.indexOf(header) === -1,
|
|
71
|
-
})}
|
|
72
|
-
onClick={() => {
|
|
73
|
-
if (props.sortColumnHandler) {
|
|
74
|
-
if (props.sortableHeaders) {
|
|
75
|
-
if (props.sortableHeaders.indexOf(header) !== -1) {
|
|
76
|
-
props.sortColumnHandler(header);
|
|
77
|
-
}
|
|
78
|
-
} else {
|
|
79
|
-
props.sortColumnHandler(header);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}}
|
|
83
|
-
key={i}
|
|
84
|
-
>
|
|
85
|
-
{props.headersContent ? props.headersContent[header] : header}{' '}
|
|
86
|
-
{props.sortedColumn === header && (
|
|
87
|
-
<Icon name={`fa-caret-${props.sortDirection}` as IconName} />
|
|
88
|
-
)}
|
|
89
|
-
</th>
|
|
90
|
-
);
|
|
91
|
-
})}
|
|
92
|
-
</tr>
|
|
93
|
-
</thead>
|
|
94
|
-
<tbody className={classNames({ 'SectionTable--tbody-loading': props.loading })}>
|
|
95
|
-
{props.loading
|
|
96
|
-
? Array.from({ length: 5 }, (x, i) => (
|
|
97
|
-
<tr key={i}>
|
|
98
|
-
{props.tableObjects[0].rowAccordionContent ? (
|
|
99
|
-
<td colSpan={headers.length + 1} />
|
|
100
|
-
) : (
|
|
101
|
-
<td colSpan={headers.length} />
|
|
102
|
-
)}
|
|
103
|
-
</tr>
|
|
104
|
-
))
|
|
105
|
-
: props.tableObjects.map((obj: any, i: any) => {
|
|
106
|
-
let rowStyle = obj.rowStyleCondition;
|
|
107
|
-
|
|
108
|
-
if (rowStyle) {
|
|
109
|
-
rowStyle = { [rowStyle.className]: rowStyle.condition };
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (obj.rowAccordionContent) {
|
|
113
|
-
return (
|
|
114
|
-
<tr key={i} className={classNames(rowStyle)} {...props.rowProps}>
|
|
115
|
-
<td
|
|
116
|
-
colSpan={headers.length + 1}
|
|
117
|
-
style={{ padding: '0' }}
|
|
118
|
-
className="outer-hover"
|
|
119
|
-
>
|
|
120
|
-
<table>
|
|
121
|
-
<thead>
|
|
122
|
-
<tr>
|
|
123
|
-
<th
|
|
124
|
-
className="action-column"
|
|
125
|
-
style={{
|
|
126
|
-
padding: '0',
|
|
127
|
-
height: '1px',
|
|
128
|
-
border: 'none',
|
|
129
|
-
}}
|
|
130
|
-
/>
|
|
131
|
-
{headers.map((e, i) => {
|
|
132
|
-
return (
|
|
133
|
-
<th
|
|
134
|
-
key={i}
|
|
135
|
-
style={{
|
|
136
|
-
padding: '0',
|
|
137
|
-
height: '1px',
|
|
138
|
-
border: 'none',
|
|
139
|
-
}}
|
|
140
|
-
/>
|
|
141
|
-
);
|
|
142
|
-
})}
|
|
143
|
-
</tr>
|
|
144
|
-
</thead>
|
|
145
|
-
<tbody>
|
|
146
|
-
<tr onClick={() => handleRowOptionToggleClick(obj.id)}>
|
|
147
|
-
<td style={{ borderBottom: 'none' }} className="action-column">
|
|
148
|
-
<Icon
|
|
149
|
-
name="chevron-down"
|
|
150
|
-
style={{
|
|
151
|
-
transform:
|
|
152
|
-
openRowOptions.indexOf(obj.id as never) !== -1
|
|
153
|
-
? 'rotate(180deg)'
|
|
154
|
-
: '',
|
|
155
|
-
}}
|
|
156
|
-
/>
|
|
157
|
-
</td>
|
|
158
|
-
{Object.keys(obj.content).map((key, i) => {
|
|
159
|
-
return (
|
|
160
|
-
<td
|
|
161
|
-
key={i}
|
|
162
|
-
style={{
|
|
163
|
-
borderBottom: 'none',
|
|
164
|
-
}}
|
|
165
|
-
data-heading={headers[i]}
|
|
166
|
-
title={createTitle(obj.content[key])}
|
|
167
|
-
{...props?.headingProps?.[headers?.[i]]}
|
|
168
|
-
>
|
|
169
|
-
{obj.content[key]}
|
|
170
|
-
</td>
|
|
171
|
-
);
|
|
172
|
-
})}
|
|
173
|
-
</tr>
|
|
174
|
-
<tr
|
|
175
|
-
className={classNames('row-option', {
|
|
176
|
-
open: openRowOptions.indexOf(obj.id as never) !== -1,
|
|
177
|
-
})}
|
|
178
|
-
>
|
|
179
|
-
<td className="inner-table-cell" colSpan={headers.length + 1}>
|
|
180
|
-
{obj.rowAccordionContent}
|
|
181
|
-
</td>
|
|
182
|
-
</tr>
|
|
183
|
-
</tbody>
|
|
184
|
-
</table>
|
|
185
|
-
</td>
|
|
186
|
-
</tr>
|
|
187
|
-
);
|
|
188
|
-
} else if (obj.lineItemLink) {
|
|
189
|
-
return (
|
|
190
|
-
<tr
|
|
191
|
-
key={i}
|
|
192
|
-
onClick={handleRowClick(obj.lineItemLink)}
|
|
193
|
-
className={classNames('hover', rowStyle)}
|
|
194
|
-
{...props.rowProps}
|
|
195
|
-
>
|
|
196
|
-
{Object.keys(obj.content).map((key, i) => {
|
|
197
|
-
return (
|
|
198
|
-
<td
|
|
199
|
-
key={i}
|
|
200
|
-
data-heading={headers[i]}
|
|
201
|
-
title={createTitle(obj.content[key])}
|
|
202
|
-
{...props?.headingProps?.[headers?.[i]]}
|
|
203
|
-
>
|
|
204
|
-
{obj.content[key]}
|
|
205
|
-
</td>
|
|
206
|
-
);
|
|
207
|
-
})}
|
|
208
|
-
</tr>
|
|
209
|
-
);
|
|
210
|
-
} else {
|
|
211
|
-
return (
|
|
212
|
-
<tr key={i} className={classNames(rowStyle)} {...props.rowProps}>
|
|
213
|
-
{Object.keys(obj.content).map((key, i) => {
|
|
214
|
-
return (
|
|
215
|
-
<td
|
|
216
|
-
key={i}
|
|
217
|
-
data-heading={headers[i]}
|
|
218
|
-
title={createTitle(obj.content[key])}
|
|
219
|
-
{...props?.headingProps?.[headers?.[i]]}
|
|
220
|
-
>
|
|
221
|
-
{obj.content[key]}
|
|
222
|
-
</td>
|
|
223
|
-
);
|
|
224
|
-
})}
|
|
225
|
-
</tr>
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
})}
|
|
229
|
-
</tbody>
|
|
230
|
-
</table>
|
|
231
|
-
</StyledSectionTable>
|
|
232
|
-
);
|
|
233
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { SectionTable } from './SectionTable';
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { Button } from './Button';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
component: Button,
|
|
7
|
-
title: 'legacy/buttons/Button',
|
|
8
|
-
argTypes: {
|
|
9
|
-
onClick: { action: 'clicked/pressed' },
|
|
10
|
-
className: { control: { disable: true } },
|
|
11
|
-
},
|
|
12
|
-
} satisfies Meta<typeof Button>;
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof Button>;
|
|
16
|
-
|
|
17
|
-
export const Normal: Story = {
|
|
18
|
-
args: {
|
|
19
|
-
id: '1234',
|
|
20
|
-
variant: 'normal',
|
|
21
|
-
type: 'button',
|
|
22
|
-
children: 'Normal button',
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const Primary: Story = {
|
|
27
|
-
args: {
|
|
28
|
-
id: '1234',
|
|
29
|
-
variant: 'primary',
|
|
30
|
-
type: 'button',
|
|
31
|
-
children: 'Primary button',
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const CallToAction: Story = {
|
|
36
|
-
args: {
|
|
37
|
-
id: '1234',
|
|
38
|
-
variant: 'cta',
|
|
39
|
-
type: 'button',
|
|
40
|
-
children: 'Call to action button',
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export const LinkStyled: Story = {
|
|
45
|
-
args: {
|
|
46
|
-
id: '1234',
|
|
47
|
-
variant: 'link-style',
|
|
48
|
-
type: 'button',
|
|
49
|
-
children: 'Button styled like a text link',
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const UnStyled: Story = {
|
|
54
|
-
args: {
|
|
55
|
-
id: '1234',
|
|
56
|
-
variant: 'no-style',
|
|
57
|
-
type: 'button',
|
|
58
|
-
children: 'Button with no style',
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const Disabled: Story = {
|
|
63
|
-
args: {
|
|
64
|
-
id: '1234',
|
|
65
|
-
variant: 'normal',
|
|
66
|
-
type: 'button',
|
|
67
|
-
children: 'Disabled button',
|
|
68
|
-
disabled: true,
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const Busy: Story = {
|
|
73
|
-
args: {
|
|
74
|
-
id: '1234',
|
|
75
|
-
variant: 'cta',
|
|
76
|
-
type: 'button',
|
|
77
|
-
children: 'Saving',
|
|
78
|
-
busy: true,
|
|
79
|
-
},
|
|
80
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
import { ANIMATION, COLORS, TYPOGRAPHY } from '@/legacy/tokens';
|
|
4
|
-
|
|
5
|
-
export const StyledButton = styled.button`
|
|
6
|
-
border: 0;
|
|
7
|
-
display: inline-block;
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
font-family: ${TYPOGRAPHY.fontFamily.base};
|
|
10
|
-
|
|
11
|
-
&.default {
|
|
12
|
-
border-radius: 2px;
|
|
13
|
-
padding: 0.625em 1.25em;
|
|
14
|
-
box-shadow: 0 1px 1px 0 ${COLORS.black};
|
|
15
|
-
transition: background-color ${ANIMATION.duration} ${ANIMATION.timing};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&.primary,
|
|
19
|
-
&.cta {
|
|
20
|
-
background-color: ${COLORS.curiousBlue};
|
|
21
|
-
color: ${COLORS.white};
|
|
22
|
-
|
|
23
|
-
&:hover,
|
|
24
|
-
&:focus {
|
|
25
|
-
// todo: shouldn't have to override...
|
|
26
|
-
color: ${COLORS.white};
|
|
27
|
-
// todo: store as constant
|
|
28
|
-
background-color: #1777c2;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&.cta {
|
|
33
|
-
font-size: ${TYPOGRAPHY.fontSize.subheadLarge};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&.normal {
|
|
37
|
-
font-size: ${TYPOGRAPHY.fontSize.base};
|
|
38
|
-
background-color: ${COLORS.iron};
|
|
39
|
-
color: ${COLORS.darkFontColor};
|
|
40
|
-
|
|
41
|
-
&:hover,
|
|
42
|
-
&:focus {
|
|
43
|
-
// todo: store as constant
|
|
44
|
-
background-color: #bebebe;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&.outline {
|
|
49
|
-
color: ${COLORS.midFontColor};
|
|
50
|
-
background: transparent;
|
|
51
|
-
border: 1px solid ${COLORS.midFontColor};
|
|
52
|
-
transition:
|
|
53
|
-
border ${ANIMATION.duration} ${ANIMATION.timing},
|
|
54
|
-
color ${ANIMATION.duration} ${ANIMATION.timing};
|
|
55
|
-
|
|
56
|
-
&:hover,
|
|
57
|
-
&:focus {
|
|
58
|
-
border: 1px solid ${COLORS.defaultFontColor};
|
|
59
|
-
color: ${COLORS.defaultFontColor};
|
|
60
|
-
background: transparent;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&:disabled {
|
|
64
|
-
border: 1px solid ${COLORS.midFontColor};
|
|
65
|
-
color: ${COLORS.midFontColor};
|
|
66
|
-
background: transparent;
|
|
67
|
-
opacity: 0.6;
|
|
68
|
-
|
|
69
|
-
&:hover {
|
|
70
|
-
background: transparent;
|
|
71
|
-
border: 1px solid ${COLORS.midFontColor};
|
|
72
|
-
color: ${COLORS.midFontColor};
|
|
73
|
-
opacity: 0.6;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&.no-style {
|
|
79
|
-
font-size: inherit;
|
|
80
|
-
color: inherit;
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
box-shadow: none;
|
|
83
|
-
padding: 0;
|
|
84
|
-
|
|
85
|
-
&:hover,
|
|
86
|
-
&:focus {
|
|
87
|
-
color: inherit;
|
|
88
|
-
background-color: transparent;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&:not(.focus-visible) {
|
|
92
|
-
outline: none;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&.busy {
|
|
97
|
-
cursor: wait;
|
|
98
|
-
}
|
|
99
|
-
`;
|