@indico-data/design-system 3.22.0 → 3.23.0-beta.1
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/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 +98 -0
- package/lib/build/generated/iconTypes.d.ts +2 -0
- package/lib/components/alert/Alert.d.ts +2 -0
- package/lib/components/alert/Alert.stories.d.ts +15 -0
- package/lib/components/alert/__tests__/Alert.test.d.ts +1 -0
- package/lib/components/alert/index.d.ts +2 -0
- package/lib/components/alert/types.d.ts +26 -0
- package/lib/components/floatUI/FloatUI.test.d.ts +1 -0
- package/lib/components/forms/timePicker/constants.d.ts +13 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/pill/Pill.d.ts +1 -1
- package/lib/components/pill/Pill.stories.d.ts +3 -0
- package/lib/components/pill/types.d.ts +4 -0
- package/lib/components/tanstackTable/TanstakTable.d.ts +4 -0
- package/lib/index.css +238 -36
- package/lib/index.d.ts +34 -2
- package/lib/index.esm.css +238 -36
- package/lib/index.esm.js +41 -5
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +40 -3
- package/lib/index.js.map +1 -1
- package/lib/legacy/components/Accordion/Accordion.d.ts +9 -0
- package/lib/legacy/components/Accordion/Accordion.stories.d.ts +25 -0
- package/lib/legacy/components/Accordion/Accordion.styles.d.ts +1 -0
- package/lib/legacy/components/Accordion/index.d.ts +1 -0
- package/lib/legacy/components/ListTable/Header/Header.d.ts +21 -0
- package/lib/legacy/components/ListTable/Header/Header.styles.d.ts +1 -0
- package/lib/legacy/components/ListTable/Header/index.d.ts +1 -0
- package/lib/legacy/components/ListTable/ListTable.d.ts +41 -0
- package/lib/legacy/components/ListTable/ListTable.stories.d.ts +54 -0
- package/lib/legacy/components/ListTable/ListTable.styles.d.ts +1 -0
- package/lib/legacy/components/ListTable/index.d.ts +1 -0
- package/lib/legacy/components/ListTable/mock-data/index.d.ts +1 -0
- package/lib/legacy/components/ListTable/mock-data/mock-data.d.ts +54 -0
- package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.d.ts +15 -0
- package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.d.ts +22 -0
- package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.d.ts +2 -0
- package/lib/legacy/components/LoadingAwareContainer/index.d.ts +1 -0
- package/lib/legacy/components/Pagination/Pagination.d.ts +18 -0
- package/lib/legacy/components/Pagination/Pagination.stories.d.ts +18 -0
- package/lib/legacy/components/Pagination/Pagination.styles.d.ts +1 -0
- package/lib/legacy/components/Pagination/index.d.ts +1 -0
- package/lib/legacy/components/Toggle/Toggle.d.ts +12 -0
- package/lib/legacy/components/Toggle/Toggle.stories.d.ts +21 -0
- package/lib/legacy/components/Toggle/Toggle.styles.d.ts +1 -0
- package/lib/legacy/components/Toggle/index.d.ts +1 -0
- package/lib/legacy/components/Tooltip/Tooltip.d.ts +15 -0
- package/lib/legacy/components/Tooltip/Tooltip.stories.d.ts +9 -0
- package/lib/legacy/components/Tooltip/Tooltip.styles.d.ts +1 -0
- package/lib/legacy/components/Tooltip/index.d.ts +1 -0
- package/lib/legacy/components/basic-section/Section/Section.d.ts +8 -0
- package/lib/legacy/components/basic-section/Section/Section.stories.d.ts +13 -0
- package/lib/legacy/components/basic-section/Section/Section.styles.d.ts +1 -0
- package/lib/legacy/components/basic-section/Section/index.d.ts +1 -0
- package/lib/legacy/components/basic-section/SectionBlock/SectionBlock.d.ts +9 -0
- package/lib/legacy/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +1 -0
- package/lib/legacy/components/basic-section/SectionBlock/index.d.ts +1 -0
- package/lib/legacy/components/basic-section/SectionBody/SectionBody.d.ts +7 -0
- package/lib/legacy/components/basic-section/SectionBody/SectionBody.stories.d.ts +10 -0
- package/lib/legacy/components/basic-section/SectionBody/SectionBody.styles.d.ts +1 -0
- package/lib/legacy/components/basic-section/SectionBody/index.d.ts +1 -0
- package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.d.ts +8 -0
- package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +14 -0
- package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +1 -0
- package/lib/legacy/components/basic-section/SectionHeader/index.d.ts +1 -0
- package/lib/legacy/components/basic-section/SectionTable/SectionTable.d.ts +1 -0
- package/lib/legacy/components/basic-section/SectionTable/SectionTable.styles.d.ts +1 -0
- package/lib/legacy/components/basic-section/SectionTable/index.d.ts +1 -0
- package/lib/legacy/components/basic-section/index.d.ts +5 -0
- package/lib/legacy/components/buttons/Button/Button.d.ts +21 -0
- package/lib/legacy/components/buttons/Button/Button.stories.d.ts +25 -0
- package/lib/legacy/components/buttons/Button/Button.styles.d.ts +1 -0
- package/lib/legacy/components/buttons/Button/index.d.ts +1 -0
- package/lib/legacy/components/buttons/IconButton/IconButton.d.ts +32 -0
- package/lib/legacy/components/buttons/IconButton/IconButton.stories.d.ts +43 -0
- package/lib/legacy/components/buttons/IconButton/IconButton.styles.d.ts +5 -0
- package/lib/legacy/components/buttons/IconButton/index.d.ts +1 -0
- package/lib/legacy/components/buttons/commonStyles.d.ts +9 -0
- package/lib/legacy/components/buttons/index.d.ts +2 -0
- package/lib/legacy/components/buttons/types.d.ts +3 -0
- package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.d.ts +19 -0
- package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +31 -0
- package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +2 -0
- package/lib/legacy/components/dropdowns/BorderSelect/index.d.ts +1 -0
- package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +23 -0
- package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +46 -0
- package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +4 -0
- package/lib/legacy/components/dropdowns/MultiCombobox/index.d.ts +1 -0
- package/lib/legacy/components/dropdowns/Select/Select.d.ts +19 -0
- package/lib/legacy/components/dropdowns/Select/Select.stories.d.ts +34 -0
- package/lib/legacy/components/dropdowns/Select/Select.styles.d.ts +1 -0
- package/lib/legacy/components/dropdowns/Select/index.d.ts +1 -0
- package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +20 -0
- package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +31 -0
- package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +4 -0
- package/lib/legacy/components/dropdowns/SingleCombobox/index.d.ts +1 -0
- package/lib/legacy/components/dropdowns/commonStyles.d.ts +1 -0
- package/lib/legacy/components/dropdowns/index.d.ts +4 -0
- package/lib/legacy/components/dropdowns/types.d.ts +45 -0
- package/lib/legacy/components/dropdowns/useCombobox.d.ts +25 -0
- package/lib/legacy/components/dropdowns/utils.d.ts +20 -0
- package/lib/legacy/components/index.d.ts +2 -0
- package/lib/legacy/components/inputs/EditableInput/EditableInput.d.ts +13 -0
- package/lib/legacy/components/inputs/EditableInput/EditableInput.stories.d.ts +14 -0
- package/lib/legacy/components/inputs/EditableInput/EditableInput.styles.d.ts +1 -0
- package/lib/legacy/components/inputs/EditableInput/index.d.ts +1 -0
- package/lib/legacy/components/inputs/NumberInput/NumberInput.d.ts +23 -0
- package/lib/legacy/components/inputs/NumberInput/NumberInput.stories.d.ts +28 -0
- package/lib/legacy/components/inputs/NumberInput/NumberInput.styles.d.ts +1 -0
- package/lib/legacy/components/inputs/NumberInput/index.d.ts +1 -0
- package/lib/legacy/components/inputs/RadioButtons/RadioButtons.d.ts +25 -0
- package/lib/legacy/components/inputs/RadioButtons/RadioButtons.stories.d.ts +15 -0
- package/lib/legacy/components/inputs/RadioButtons/RadioButtons.styles.d.ts +13 -0
- package/lib/legacy/components/inputs/RadioButtons/index.d.ts +1 -0
- package/lib/legacy/components/inputs/RadioGroup/RadioGroup.d.ts +27 -0
- package/lib/legacy/components/inputs/RadioGroup/RadioGroup.stories.d.ts +16 -0
- package/lib/legacy/components/inputs/RadioGroup/RadioGroup.styles.d.ts +1 -0
- package/lib/legacy/components/inputs/RadioGroup/index.d.ts +1 -0
- package/lib/legacy/components/inputs/SearchInput/SearchInput.d.ts +17 -0
- package/lib/legacy/components/inputs/SearchInput/SearchInput.stories.d.ts +30 -0
- package/lib/legacy/components/inputs/SearchInput/SearchInput.styles.d.ts +1 -0
- package/lib/legacy/components/inputs/SearchInput/index.d.ts +1 -0
- package/lib/legacy/components/inputs/TextInput/TextInput.d.ts +24 -0
- package/lib/legacy/components/inputs/TextInput/TextInput.stories.d.ts +62 -0
- package/lib/legacy/components/inputs/TextInput/TextInput.styles.d.ts +2 -0
- package/lib/legacy/components/inputs/TextInput/index.d.ts +1 -0
- package/lib/legacy/components/inputs/index.d.ts +6 -0
- package/lib/legacy/components/inputs/inputsCommon.styles.d.ts +4 -0
- package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.d.ts +7 -0
- package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.stories.d.ts +10 -0
- package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/BarSpinner/index.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.d.ts +10 -0
- package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.stories.d.ts +12 -0
- package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +7 -0
- package/lib/legacy/components/loading-indicators/CirclePulse/index.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +10 -0
- package/lib/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.stories.d.ts +10 -0
- package/lib/legacy/components/loading-indicators/CircleSpinner/index.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.d.ts +10 -0
- package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.d.ts +11 -0
- package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.d.ts +7 -0
- package/lib/legacy/components/loading-indicators/LoadingIndicator/index.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +10 -0
- package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/LoadingList/index.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.d.ts +12 -0
- package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.stories.d.ts +10 -0
- package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/PercentageRing/index.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +10 -0
- package/lib/legacy/components/loading-indicators/RandomLoadingMessage/index.d.ts +1 -0
- package/lib/legacy/components/loading-indicators/RandomLoadingMessage/random-messages.d.ts +2 -0
- package/lib/legacy/components/loading-indicators/index.d.ts +3 -0
- package/lib/legacy/components/modals/ConfirmModal/ConfirmModal.d.ts +17 -0
- package/lib/legacy/components/modals/ConfirmModal/ConfirmModal.stories.d.ts +44 -0
- package/lib/legacy/components/modals/ConfirmModal/ConfirmModal.styles.d.ts +1 -0
- package/lib/legacy/components/modals/ConfirmModal/index.d.ts +1 -0
- package/lib/legacy/components/modals/ModalBase/ModalBase.d.ts +26 -0
- package/lib/legacy/components/modals/ModalBase/ModalBase.stories.d.ts +9 -0
- package/lib/legacy/components/modals/ModalBase/ModalBase.styles.d.ts +4 -0
- package/lib/legacy/components/modals/ModalBase/index.d.ts +2 -0
- package/lib/legacy/components/modals/index.d.ts +2 -0
- package/lib/legacy/components/text-truncate/TextTruncate.d.ts +8 -0
- package/lib/legacy/components/text-truncate/TextTruncate.stories.d.ts +6 -0
- package/lib/legacy/components/text-truncate/TextTruncate.styles.d.ts +1 -0
- package/lib/legacy/components/text-truncate/TextTruncate.test.d.ts +1 -0
- package/lib/legacy/components/text-truncate/index.d.ts +1 -0
- package/lib/legacy/components/user-feedback/Shrug/Shrug.d.ts +14 -0
- package/lib/legacy/components/user-feedback/Shrug/Shrug.stories.d.ts +31 -0
- package/lib/legacy/components/user-feedback/Shrug/Shrug.styles.d.ts +1 -0
- package/lib/legacy/components/user-feedback/Shrug/index.d.ts +1 -0
- package/lib/legacy/components/user-feedback/index.d.ts +1 -0
- package/lib/legacy/styles/globals/buttons.d.ts +1 -0
- package/lib/legacy/styles/globals/forms.d.ts +1 -0
- package/lib/legacy/styles/globals/index.d.ts +1 -0
- package/lib/legacy/styles/globals/layout.d.ts +1 -0
- package/lib/legacy/styles/globals/lists.d.ts +1 -0
- package/lib/legacy/styles/globals/margin-padding.d.ts +1 -0
- package/lib/legacy/styles/globals/media.d.ts +1 -0
- package/lib/legacy/styles/globals/tables.d.ts +1 -0
- package/lib/legacy/styles/globals/typography.d.ts +1 -0
- package/lib/legacy/styles/globals/utility-classes.d.ts +1 -0
- package/lib/legacy/styles/index.d.ts +1 -0
- package/lib/legacy/tokens/animation.d.ts +4 -0
- package/lib/legacy/tokens/breakpoints.d.ts +10 -0
- package/lib/legacy/tokens/colors.d.ts +144 -0
- package/lib/legacy/tokens/index.d.ts +8 -0
- package/lib/legacy/tokens/margin.d.ts +4 -0
- package/lib/legacy/tokens/numbers.d.ts +10 -0
- package/lib/legacy/tokens/padding.d.ts +4 -0
- package/lib/legacy/tokens/spacings.d.ts +5 -0
- package/lib/legacy/tokens/typography.d.ts +61 -0
- package/lib/legacy/utils/color.d.ts +21 -0
- package/lib/legacy/utils/index.d.ts +4 -0
- package/lib/legacy/utils/number.d.ts +21 -0
- package/lib/legacy/utils/string.d.ts +12 -0
- package/lib/src/components/button/Button.d.ts +3 -0
- package/lib/src/components/button/Button.stories.d.ts +23 -0
- package/lib/src/components/button/__tests__/Button.test.d.ts +1 -0
- package/lib/src/components/button/enums.d.ts +5 -0
- package/lib/src/components/button/index.d.ts +1 -0
- package/lib/src/components/button/types.d.ts +23 -0
- package/lib/src/components/card/Card.d.ts +10 -0
- package/lib/src/components/card/Card.stories.d.ts +6 -0
- package/lib/src/components/card/__tests__/Card.test.d.ts +1 -0
- package/lib/src/components/card/index.d.ts +1 -0
- package/lib/src/components/floatUI/FloatUI.d.ts +2 -0
- package/lib/src/components/floatUI/FloatUI.stories.d.ts +8 -0
- package/lib/src/components/floatUI/FloatUI.test.d.ts +1 -0
- package/lib/src/components/floatUI/index.d.ts +1 -0
- package/lib/src/components/floatUI/types.d.ts +13 -0
- package/lib/src/components/forms/checkbox/Checkbox.d.ts +13 -0
- package/lib/src/components/forms/checkbox/Checkbox.stories.d.ts +7 -0
- package/lib/src/components/forms/checkbox/__tests__/Checkbox.test.d.ts +1 -0
- package/lib/src/components/forms/checkbox/index.d.ts +1 -0
- package/lib/src/components/forms/form/Form.d.ts +14 -0
- package/lib/src/components/forms/form/Form.stories.d.ts +8 -0
- package/lib/src/components/forms/form/__tests__/Form.test.d.ts +1 -0
- package/lib/src/components/forms/form/index.d.ts +1 -0
- package/lib/src/components/forms/input/Input.d.ts +19 -0
- package/lib/src/components/forms/input/Input.stories.d.ts +12 -0
- package/lib/src/components/forms/input/__tests__/Input.test.d.ts +1 -0
- package/lib/src/components/forms/input/index.d.ts +1 -0
- package/lib/src/components/forms/numberInput/NumberInput.d.ts +12 -0
- package/lib/src/components/forms/numberInput/NumberInput.stories.d.ts +12 -0
- package/lib/src/components/forms/numberInput/__tests__/NumberInput.test.d.ts +1 -0
- package/lib/src/components/forms/numberInput/index.d.ts +1 -0
- package/lib/src/components/forms/passwordInput/PasswordInput.d.ts +15 -0
- package/lib/src/components/forms/passwordInput/PasswordInput.stories.d.ts +11 -0
- package/lib/src/components/forms/passwordInput/__tests__/PasswordInput.test.d.ts +1 -0
- package/lib/src/components/forms/passwordInput/index.d.ts +1 -0
- package/lib/src/components/forms/radio/Radio.d.ts +12 -0
- package/lib/src/components/forms/radio/Radio.stories.d.ts +6 -0
- package/lib/src/components/forms/radio/__tests__/Radio.test.d.ts +1 -0
- package/lib/src/components/forms/radio/index.d.ts +1 -0
- package/lib/src/components/forms/select/Select.d.ts +6 -0
- package/lib/src/components/forms/select/Select.stories.d.ts +7 -0
- package/lib/src/components/forms/select/__tests__/Select.test.d.ts +1 -0
- package/lib/src/components/forms/select/index.d.ts +1 -0
- package/lib/src/components/forms/select/types.d.ts +6 -0
- package/lib/src/components/forms/subcomponents/DisplayFormError.d.ts +5 -0
- package/lib/src/components/forms/subcomponents/ErrorList.d.ts +6 -0
- package/lib/src/components/forms/subcomponents/Label.d.ts +9 -0
- package/lib/src/components/forms/subcomponents/__tests__/ErrorList.test.d.ts +1 -0
- package/lib/src/components/forms/subcomponents/__tests__/Label.test.d.ts +1 -0
- package/lib/src/components/forms/textarea/Textarea.d.ts +21 -0
- package/lib/src/components/forms/textarea/Textarea.stories.d.ts +11 -0
- package/lib/src/components/forms/textarea/__tests__/Textarea.test.d.ts +1 -0
- package/lib/src/components/forms/textarea/index.d.ts +1 -0
- package/lib/src/components/forms/toggle/Toggle.d.ts +13 -0
- package/lib/src/components/forms/toggle/Toggle.stories.d.ts +6 -0
- package/lib/src/components/forms/toggle/__tests__/Toggle.test.d.ts +1 -0
- package/lib/src/components/forms/toggle/index.d.ts +1 -0
- package/lib/src/components/grid/col/Col.d.ts +2 -0
- package/lib/src/components/grid/col/Col.stories.d.ts +6 -0
- package/lib/src/components/grid/container/Container.d.ts +2 -0
- package/lib/src/components/grid/container/Container.stories.d.ts +10 -0
- package/lib/src/components/grid/index.d.ts +3 -0
- package/lib/src/components/grid/row/Row.d.ts +2 -0
- package/lib/src/components/grid/row/Row.stories.d.ts +6 -0
- package/lib/src/components/icons/Icon.d.ts +2 -0
- package/lib/src/components/icons/Icon.stories.d.ts +10 -0
- package/lib/src/components/icons/__tests__/Icon.test.d.ts +1 -0
- package/lib/src/components/icons/index.d.ts +1 -0
- package/lib/src/components/icons/indicons.d.ts +148 -0
- package/lib/src/components/icons/types.d.ts +10 -0
- package/lib/src/components/index.d.ts +16 -0
- package/lib/src/components/menu/Menu.d.ts +5 -0
- package/lib/src/components/menu/Menu.stories.d.ts +6 -0
- package/lib/src/components/menu/Menu.test.d.ts +1 -0
- package/lib/src/components/menu/index.d.ts +1 -0
- package/lib/src/components/pill/Pill.d.ts +2 -0
- package/lib/src/components/pill/Pill.stories.d.ts +8 -0
- package/lib/src/components/pill/__tests__/Pill.test.d.ts +1 -0
- package/lib/src/components/pill/index.d.ts +1 -0
- package/lib/src/components/pill/types.d.ts +10 -0
- package/lib/src/components/popper/Popper.d.ts +2 -0
- package/lib/src/components/popper/Popper.stories.d.ts +8 -0
- package/lib/src/components/popper/Popper.test.d.ts +1 -0
- package/lib/src/components/popper/PopperContext.d.ts +12 -0
- package/lib/src/components/popper/index.d.ts +1 -0
- package/lib/src/components/popper/types.d.ts +9 -0
- package/lib/src/components/skeleton/Skeleton.d.ts +9 -0
- package/lib/src/components/skeleton/Skeleton.stories.d.ts +9 -0
- package/lib/src/components/skeleton/__tests__/Skeleton.test.d.ts +1 -0
- package/lib/src/components/skeleton/index.d.ts +1 -0
- package/lib/src/components/table/LoadingComponent.d.ts +1 -0
- package/lib/src/components/table/SkeletonTable.d.ts +7 -0
- package/lib/src/components/table/Table.d.ts +2 -0
- package/lib/src/components/table/Table.stories.d.ts +7 -0
- package/lib/src/components/table/index.d.ts +1 -0
- package/lib/src/components/table/sampleData.d.ts +9 -0
- package/lib/src/components/table/types.d.ts +10 -0
- package/lib/src/components/tables/table/LoadingComponent.d.ts +1 -0
- package/lib/src/components/tables/table/Table.d.ts +78 -0
- package/lib/src/components/tables/table/Table.stories.d.ts +6 -0
- package/lib/src/components/tables/table/index.d.ts +1 -0
- package/lib/src/components/tables/table/sampleData.d.ts +8 -0
- package/lib/src/hooks/useClickOutside.d.ts +2 -0
- package/lib/src/index.d.ts +23 -0
- package/lib/src/legacy/components/Accordion/Accordion.d.ts +9 -0
- package/lib/src/legacy/components/Accordion/Accordion.stories.d.ts +25 -0
- package/lib/src/legacy/components/Accordion/Accordion.styles.d.ts +1 -0
- package/lib/src/legacy/components/Accordion/index.d.ts +1 -0
- package/lib/src/legacy/components/ListTable/Header/Header.d.ts +21 -0
- package/lib/src/legacy/components/ListTable/Header/Header.styles.d.ts +1 -0
- package/lib/src/legacy/components/ListTable/Header/index.d.ts +1 -0
- package/lib/src/legacy/components/ListTable/ListTable.d.ts +41 -0
- package/lib/src/legacy/components/ListTable/ListTable.stories.d.ts +54 -0
- package/lib/src/legacy/components/ListTable/ListTable.styles.d.ts +1 -0
- package/lib/src/legacy/components/ListTable/index.d.ts +1 -0
- package/lib/src/legacy/components/ListTable/mock-data/index.d.ts +1 -0
- package/lib/src/legacy/components/ListTable/mock-data/mock-data.d.ts +54 -0
- package/lib/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.d.ts +15 -0
- package/lib/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.d.ts +22 -0
- package/lib/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.d.ts +2 -0
- package/lib/src/legacy/components/LoadingAwareContainer/index.d.ts +1 -0
- package/lib/src/legacy/components/Navigation/Drawer/Drawer.d.ts +16 -0
- package/lib/src/legacy/components/Navigation/Drawer/Drawer.stories.d.ts +6 -0
- package/lib/src/legacy/components/Navigation/Drawer/DrawerLinkList.d.ts +9 -0
- package/lib/src/legacy/components/Navigation/Drawer/DrawerLinkList.styles.d.ts +2 -0
- package/lib/src/legacy/components/Navigation/Drawer/__mocks__/mocks.d.ts +3 -0
- package/lib/src/legacy/components/Navigation/Drawer/__tests__/DrawerLinkList.test.d.ts +1 -0
- package/lib/src/legacy/components/Navigation/Drawer/index.d.ts +1 -0
- package/lib/src/legacy/components/Navigation/Drawer/types.d.ts +7 -0
- package/lib/src/legacy/components/Navigation/index.d.ts +1 -0
- package/lib/src/legacy/components/Pagination/Pagination.d.ts +18 -0
- package/lib/src/legacy/components/Pagination/Pagination.stories.d.ts +18 -0
- package/lib/src/legacy/components/Pagination/Pagination.styles.d.ts +1 -0
- package/lib/src/legacy/components/Pagination/index.d.ts +1 -0
- package/lib/src/legacy/components/Toggle/Toggle.d.ts +12 -0
- package/lib/src/legacy/components/Toggle/Toggle.stories.d.ts +21 -0
- package/lib/src/legacy/components/Toggle/Toggle.styles.d.ts +1 -0
- package/lib/src/legacy/components/Toggle/index.d.ts +1 -0
- package/lib/src/legacy/components/Tooltip/Tooltip.d.ts +15 -0
- package/lib/src/legacy/components/Tooltip/Tooltip.stories.d.ts +9 -0
- package/lib/src/legacy/components/Tooltip/Tooltip.styles.d.ts +1 -0
- package/lib/src/legacy/components/Tooltip/index.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/Section/Section.d.ts +8 -0
- package/lib/src/legacy/components/basic-section/Section/Section.stories.d.ts +13 -0
- package/lib/src/legacy/components/basic-section/Section/Section.styles.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/Section/index.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionBlock/SectionBlock.d.ts +9 -0
- package/lib/src/legacy/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionBlock/index.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionBody/SectionBody.d.ts +7 -0
- package/lib/src/legacy/components/basic-section/SectionBody/SectionBody.stories.d.ts +10 -0
- package/lib/src/legacy/components/basic-section/SectionBody/SectionBody.styles.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionBody/index.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionHeader/SectionHeader.d.ts +8 -0
- package/lib/src/legacy/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +14 -0
- package/lib/src/legacy/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionHeader/index.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionTable/SectionTable.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionTable/SectionTable.styles.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/SectionTable/index.d.ts +1 -0
- package/lib/src/legacy/components/basic-section/index.d.ts +5 -0
- package/lib/src/legacy/components/buttons/Button/Button.d.ts +21 -0
- package/lib/src/legacy/components/buttons/Button/Button.stories.d.ts +25 -0
- package/lib/src/legacy/components/buttons/Button/Button.styles.d.ts +1 -0
- package/lib/src/legacy/components/buttons/Button/index.d.ts +1 -0
- package/lib/src/legacy/components/buttons/IconButton/IconButton.d.ts +32 -0
- package/lib/src/legacy/components/buttons/IconButton/IconButton.stories.d.ts +43 -0
- package/lib/src/legacy/components/buttons/IconButton/IconButton.styles.d.ts +5 -0
- package/lib/src/legacy/components/buttons/IconButton/index.d.ts +1 -0
- package/lib/src/legacy/components/buttons/commonStyles.d.ts +9 -0
- package/lib/src/legacy/components/buttons/index.d.ts +2 -0
- package/lib/src/legacy/components/buttons/types.d.ts +3 -0
- package/lib/src/legacy/components/dropdowns/BorderSelect/BorderSelect.d.ts +19 -0
- package/lib/src/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +31 -0
- package/lib/src/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +2 -0
- package/lib/src/legacy/components/dropdowns/BorderSelect/index.d.ts +1 -0
- package/lib/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +23 -0
- package/lib/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +46 -0
- package/lib/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +4 -0
- package/lib/src/legacy/components/dropdowns/MultiCombobox/index.d.ts +1 -0
- package/lib/src/legacy/components/dropdowns/Select/Select.d.ts +19 -0
- package/lib/src/legacy/components/dropdowns/Select/Select.stories.d.ts +34 -0
- package/lib/src/legacy/components/dropdowns/Select/Select.styles.d.ts +1 -0
- package/lib/src/legacy/components/dropdowns/Select/index.d.ts +1 -0
- package/lib/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +20 -0
- package/lib/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +31 -0
- package/lib/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +4 -0
- package/lib/src/legacy/components/dropdowns/SingleCombobox/index.d.ts +1 -0
- package/lib/src/legacy/components/dropdowns/commonStyles.d.ts +1 -0
- package/lib/src/legacy/components/dropdowns/index.d.ts +4 -0
- package/lib/src/legacy/components/dropdowns/types.d.ts +45 -0
- package/lib/src/legacy/components/dropdowns/useCombobox.d.ts +25 -0
- package/lib/src/legacy/components/dropdowns/utils.d.ts +20 -0
- package/lib/src/legacy/components/index.d.ts +14 -0
- package/lib/src/legacy/components/inputs/DatePicker/DatePicker.d.ts +15 -0
- package/lib/src/legacy/components/inputs/DatePicker/DatePicker.stories.d.ts +6 -0
- package/lib/src/legacy/components/inputs/DatePicker/DatePicker.styles.d.ts +1 -0
- package/lib/src/legacy/components/inputs/DatePicker/index.d.ts +1 -0
- package/lib/src/legacy/components/inputs/EditableInput/EditableInput.d.ts +13 -0
- package/lib/src/legacy/components/inputs/EditableInput/EditableInput.stories.d.ts +14 -0
- package/lib/src/legacy/components/inputs/EditableInput/EditableInput.styles.d.ts +1 -0
- package/lib/src/legacy/components/inputs/EditableInput/index.d.ts +1 -0
- package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.d.ts +21 -0
- package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.stories.d.ts +7 -0
- package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.d.ts +1 -0
- package/lib/src/legacy/components/inputs/NoInputDatePicker/index.d.ts +1 -0
- package/lib/src/legacy/components/inputs/NumberInput/NumberInput.d.ts +23 -0
- package/lib/src/legacy/components/inputs/NumberInput/NumberInput.stories.d.ts +28 -0
- package/lib/src/legacy/components/inputs/NumberInput/NumberInput.styles.d.ts +1 -0
- package/lib/src/legacy/components/inputs/NumberInput/index.d.ts +1 -0
- package/lib/src/legacy/components/inputs/RadioButtons/RadioButtons.d.ts +25 -0
- package/lib/src/legacy/components/inputs/RadioButtons/RadioButtons.stories.d.ts +15 -0
- package/lib/src/legacy/components/inputs/RadioButtons/RadioButtons.styles.d.ts +13 -0
- package/lib/src/legacy/components/inputs/RadioButtons/index.d.ts +1 -0
- package/lib/src/legacy/components/inputs/RadioGroup/RadioGroup.d.ts +27 -0
- package/lib/src/legacy/components/inputs/RadioGroup/RadioGroup.stories.d.ts +16 -0
- package/lib/src/legacy/components/inputs/RadioGroup/RadioGroup.styles.d.ts +1 -0
- package/lib/src/legacy/components/inputs/RadioGroup/index.d.ts +1 -0
- package/lib/src/legacy/components/inputs/SearchInput/SearchInput.d.ts +17 -0
- package/lib/src/legacy/components/inputs/SearchInput/SearchInput.stories.d.ts +30 -0
- package/lib/src/legacy/components/inputs/SearchInput/SearchInput.styles.d.ts +1 -0
- package/lib/src/legacy/components/inputs/SearchInput/index.d.ts +1 -0
- package/lib/src/legacy/components/inputs/TextInput/TextInput.d.ts +24 -0
- package/lib/src/legacy/components/inputs/TextInput/TextInput.stories.d.ts +62 -0
- package/lib/src/legacy/components/inputs/TextInput/TextInput.styles.d.ts +2 -0
- package/lib/src/legacy/components/inputs/TextInput/index.d.ts +1 -0
- package/lib/src/legacy/components/inputs/index.d.ts +8 -0
- package/lib/src/legacy/components/inputs/inputsCommon.styles.d.ts +4 -0
- package/lib/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.d.ts +7 -0
- package/lib/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.stories.d.ts +10 -0
- package/lib/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/BarSpinner/index.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.d.ts +10 -0
- package/lib/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.stories.d.ts +12 -0
- package/lib/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +7 -0
- package/lib/src/legacy/components/loading-indicators/CirclePulse/index.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +10 -0
- package/lib/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.stories.d.ts +10 -0
- package/lib/src/legacy/components/loading-indicators/CircleSpinner/index.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.d.ts +10 -0
- package/lib/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.d.ts +11 -0
- package/lib/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.d.ts +7 -0
- package/lib/src/legacy/components/loading-indicators/LoadingIndicator/index.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/LoadingList/LoadingList.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +10 -0
- package/lib/src/legacy/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/LoadingList/index.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.d.ts +12 -0
- package/lib/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.stories.d.ts +10 -0
- package/lib/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/PercentageRing/index.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +10 -0
- package/lib/src/legacy/components/loading-indicators/RandomLoadingMessage/index.d.ts +1 -0
- package/lib/src/legacy/components/loading-indicators/RandomLoadingMessage/random-messages.d.ts +2 -0
- package/lib/src/legacy/components/loading-indicators/index.d.ts +7 -0
- package/lib/src/legacy/components/modals/ConfirmModal/ConfirmModal.d.ts +17 -0
- package/lib/src/legacy/components/modals/ConfirmModal/ConfirmModal.stories.d.ts +44 -0
- package/lib/src/legacy/components/modals/ConfirmModal/ConfirmModal.styles.d.ts +1 -0
- package/lib/src/legacy/components/modals/ConfirmModal/index.d.ts +1 -0
- package/lib/src/legacy/components/modals/ModalBase/ModalBase.d.ts +26 -0
- package/lib/src/legacy/components/modals/ModalBase/ModalBase.stories.d.ts +9 -0
- package/lib/src/legacy/components/modals/ModalBase/ModalBase.styles.d.ts +4 -0
- package/lib/src/legacy/components/modals/ModalBase/index.d.ts +2 -0
- package/lib/src/legacy/components/modals/index.d.ts +2 -0
- package/lib/src/legacy/components/text-truncate/TextTruncate.d.ts +8 -0
- package/lib/src/legacy/components/text-truncate/TextTruncate.stories.d.ts +6 -0
- package/lib/src/legacy/components/text-truncate/TextTruncate.styles.d.ts +1 -0
- package/lib/src/legacy/components/text-truncate/TextTruncate.test.d.ts +1 -0
- package/lib/src/legacy/components/text-truncate/index.d.ts +1 -0
- package/lib/src/legacy/components/user-feedback/Shrug/Shrug.d.ts +14 -0
- package/lib/src/legacy/components/user-feedback/Shrug/Shrug.stories.d.ts +31 -0
- package/lib/src/legacy/components/user-feedback/Shrug/Shrug.styles.d.ts +1 -0
- package/lib/src/legacy/components/user-feedback/Shrug/index.d.ts +1 -0
- package/lib/src/legacy/components/user-feedback/index.d.ts +1 -0
- package/lib/src/legacy/styles/globals/buttons.d.ts +1 -0
- package/lib/src/legacy/styles/globals/forms.d.ts +1 -0
- package/lib/src/legacy/styles/globals/index.d.ts +1 -0
- package/lib/src/legacy/styles/globals/layout.d.ts +1 -0
- package/lib/src/legacy/styles/globals/lists.d.ts +1 -0
- package/lib/src/legacy/styles/globals/margin-padding.d.ts +1 -0
- package/lib/src/legacy/styles/globals/media.d.ts +1 -0
- package/lib/src/legacy/styles/globals/tables.d.ts +1 -0
- package/lib/src/legacy/styles/globals/typography.d.ts +1 -0
- package/lib/src/legacy/styles/globals/utility-classes.d.ts +1 -0
- package/lib/src/legacy/styles/index.d.ts +1 -0
- package/lib/src/legacy/tokens/animation.d.ts +4 -0
- package/lib/src/legacy/tokens/breakpoints.d.ts +10 -0
- package/lib/src/legacy/tokens/colors.d.ts +144 -0
- package/lib/src/legacy/tokens/index.d.ts +8 -0
- package/lib/src/legacy/tokens/margin.d.ts +4 -0
- package/lib/src/legacy/tokens/numbers.d.ts +10 -0
- package/lib/src/legacy/tokens/padding.d.ts +4 -0
- package/lib/src/legacy/tokens/spacings.d.ts +5 -0
- package/lib/src/legacy/tokens/typography.d.ts +61 -0
- package/lib/src/legacy/utils/color.d.ts +21 -0
- package/lib/src/legacy/utils/index.d.ts +4 -0
- package/lib/src/legacy/utils/number.d.ts +21 -0
- package/lib/src/legacy/utils/string.d.ts +12 -0
- package/lib/src/setupTests.d.ts +1 -0
- package/lib/src/storybook/labelArgTypes.d.ts +3 -0
- package/lib/src/stylesAndAnimations/borders/BorderColor.d.ts +3 -0
- package/lib/src/stylesAndAnimations/borders/BorderColor.stories.d.ts +6 -0
- package/lib/src/stylesAndAnimations/borders/BorderRadius.d.ts +3 -0
- package/lib/src/stylesAndAnimations/borders/BorderRadius.stories.d.ts +6 -0
- package/lib/src/stylesAndAnimations/borders/BorderStyles.d.ts +3 -0
- package/lib/src/stylesAndAnimations/borders/BorderStyles.stories.d.ts +6 -0
- package/lib/src/stylesAndAnimations/borders/BorderThickness.d.ts +3 -0
- package/lib/src/stylesAndAnimations/borders/BorderThickness.stories.d.ts +6 -0
- package/lib/src/stylesAndAnimations/borders/index.d.ts +4 -0
- package/lib/src/stylesAndAnimations/colors/Colors.d.ts +1 -0
- package/lib/src/stylesAndAnimations/colors/Colors.stories.d.ts +6 -0
- package/lib/src/stylesAndAnimations/colors/Swatch.d.ts +8 -0
- package/lib/src/stylesAndAnimations/colors/UtilityClasses.d.ts +1 -0
- package/lib/src/stylesAndAnimations/colors/UtilityClasses.stories.d.ts +6 -0
- package/lib/src/stylesAndAnimations/colors/constants.d.ts +5 -0
- package/lib/src/stylesAndAnimations/colors/hooks.d.ts +1 -0
- package/lib/src/stylesAndAnimations/colors/index.d.ts +1 -0
- package/lib/src/stylesAndAnimations/sizing/Sizing.d.ts +2 -0
- package/lib/src/stylesAndAnimations/sizing/Sizing.stories.d.ts +6 -0
- package/lib/src/stylesAndAnimations/sizing/index.d.ts +1 -0
- package/lib/src/stylesAndAnimations/typography/Typography.d.ts +1 -0
- package/lib/src/stylesAndAnimations/typography/Typography.stories.d.ts +6 -0
- package/lib/src/stylesAndAnimations/typography/index.d.ts +1 -0
- package/lib/src/types.d.ts +19 -0
- package/lib/stylesAndAnimations/colors/ColorSwatch.d.ts +7 -0
- package/lib/stylesAndAnimations/colors/Colors.d.ts +1 -0
- package/lib/stylesAndAnimations/colors/Colors.stories.d.ts +6 -0
- package/lib/stylesAndAnimations/colors/Swatch.d.ts +8 -0
- package/lib/stylesAndAnimations/colors/constants.d.ts +23 -0
- package/lib/stylesAndAnimations/colors/index.d.ts +1 -0
- package/lib/types.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/alert/Alert.mdx +65 -0
- package/src/components/alert/Alert.stories.tsx +162 -0
- package/src/components/alert/Alert.tsx +68 -0
- package/src/components/alert/__tests__/Alert.test.tsx +52 -0
- package/src/components/alert/index.ts +2 -0
- package/src/components/alert/styles/Alert.scss +139 -0
- package/src/components/alert/styles/_tokens.scss +71 -0
- package/src/components/alert/types.ts +28 -0
- package/src/components/index.ts +1 -0
- package/src/components/pill/Pill.mdx +27 -0
- package/src/components/pill/Pill.stories.tsx +87 -0
- package/src/components/pill/Pill.tsx +36 -0
- package/src/components/pill/__tests__/Pill.test.tsx +93 -0
- package/src/components/pill/styles/Pill.scss +50 -9
- package/src/components/pill/types.ts +4 -0
- package/src/index.ts +1 -0
- package/src/setup/setupIcons.ts +8 -0
- package/src/styles/index.scss +2 -1
- package/src/types.ts +2 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
$alert-types: 'warning', 'info', 'success', 'error';
|
|
2
|
+
|
|
3
|
+
.alert {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: flex-start;
|
|
6
|
+
gap: var(--pf-spacing-md);
|
|
7
|
+
padding: var(--pf-spacing-2xl);
|
|
8
|
+
border-radius: var(--pf-border-radius-md);
|
|
9
|
+
background-color: var(--pf-semantic-background-secondary);
|
|
10
|
+
font-family: var(--pf-font-family);
|
|
11
|
+
box-shadow:
|
|
12
|
+
0 4px 6px -4px var(--pf-semantic-elevation-1),
|
|
13
|
+
0 10px 15px -3px var(--pf-semantic-elevation-1);
|
|
14
|
+
|
|
15
|
+
// ------- Size: small (compact inline) -------
|
|
16
|
+
&--small {
|
|
17
|
+
padding: var(--pf-spacing-sm);
|
|
18
|
+
align-items: center;
|
|
19
|
+
box-shadow: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// ------- Variant: bordered -------
|
|
23
|
+
&--bordered {
|
|
24
|
+
border: 1px solid var(--alert-border-color);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// ------- Type-specific icon colors (soft uses semantic utility tokens) -------
|
|
28
|
+
&--soft-warning > .icon {
|
|
29
|
+
color: var(--pf-semantic-utility-warning-default);
|
|
30
|
+
}
|
|
31
|
+
&--soft-info > .icon {
|
|
32
|
+
color: var(--pf-semantic-utility-info-default);
|
|
33
|
+
}
|
|
34
|
+
&--soft-success > .icon {
|
|
35
|
+
color: var(--pf-semantic-utility-success-default);
|
|
36
|
+
}
|
|
37
|
+
&--soft-error > .icon {
|
|
38
|
+
color: var(--pf-semantic-utility-error-default);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ------- Type-specific bordered colors (from component tokens) -------
|
|
42
|
+
@each $type in $alert-types {
|
|
43
|
+
&--bordered-#{$type} {
|
|
44
|
+
--alert-border-color: var(--pf-alert-bordered-#{$type}-border);
|
|
45
|
+
|
|
46
|
+
> .icon {
|
|
47
|
+
color: var(--pf-alert-bordered-#{$type}-icon);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.alert__title {
|
|
51
|
+
color: var(--pf-alert-bordered-#{$type}-text);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&--tinted#{&}--bordered-#{$type} {
|
|
56
|
+
background-color: var(--pf-alert-bordered-#{$type}-bg);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ------- Sub-elements -------
|
|
61
|
+
> .icon {
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__body {
|
|
66
|
+
flex: 1;
|
|
67
|
+
min-width: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__title {
|
|
71
|
+
font-size: var(--pf-font-size-md);
|
|
72
|
+
font-weight: var(--pf-font-weight-semibold);
|
|
73
|
+
line-height: 20px;
|
|
74
|
+
color: var(--pf-semantic-font-regular);
|
|
75
|
+
margin-bottom: var(--pf-spacing-xxs);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&__message {
|
|
79
|
+
font-size: var(--pf-font-size-md);
|
|
80
|
+
font-weight: var(--pf-font-weight-regular);
|
|
81
|
+
line-height: 20px;
|
|
82
|
+
color: var(--pf-semantic-font-regular);
|
|
83
|
+
|
|
84
|
+
a {
|
|
85
|
+
color: var(--pf-semantic-font-link);
|
|
86
|
+
text-decoration: underline;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&--has-title .alert__message {
|
|
91
|
+
color: var(--pf-semantic-font-soft);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__actions {
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
gap: var(--pf-spacing-sm);
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
margin-left: auto;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&__action {
|
|
103
|
+
background: none;
|
|
104
|
+
border: none;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
font-family: var(--pf-font-family);
|
|
107
|
+
font-size: var(--pf-font-size-md);
|
|
108
|
+
font-weight: var(--pf-font-weight-medium);
|
|
109
|
+
line-height: 20px;
|
|
110
|
+
color: var(--pf-semantic-font-link);
|
|
111
|
+
padding: 0;
|
|
112
|
+
white-space: nowrap;
|
|
113
|
+
|
|
114
|
+
&:hover {
|
|
115
|
+
text-decoration: underline;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&__close {
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
border: none;
|
|
126
|
+
background: transparent;
|
|
127
|
+
padding: var(--pf-spacing-xxs);
|
|
128
|
+
border-radius: var(--pf-border-radius-xs);
|
|
129
|
+
color: var(--pf-semantic-font-soft);
|
|
130
|
+
line-height: 1;
|
|
131
|
+
transition:
|
|
132
|
+
color 0.15s ease,
|
|
133
|
+
background-color 0.15s ease;
|
|
134
|
+
|
|
135
|
+
&:hover {
|
|
136
|
+
color: var(--pf-semantic-font-regular);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// ALERT COMPONENT TOKENS (internal)
|
|
3
|
+
// ============================================================================
|
|
4
|
+
// These CSS custom properties are implementation details of the Alert component.
|
|
5
|
+
// They provide light/dark theme values for the bordered variant's per-type
|
|
6
|
+
// accent colors (border, title text, icon). The soft variant uses semantic
|
|
7
|
+
// utility tokens directly and doesn't need component-level overrides.
|
|
8
|
+
//
|
|
9
|
+
// Consumers should style alerts through the component props, not by
|
|
10
|
+
// overriding these variables.
|
|
11
|
+
//
|
|
12
|
+
// Aligned with Figma's "Alert" variable group.
|
|
13
|
+
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// Bordered variant - Light Theme
|
|
16
|
+
// ============================================================================
|
|
17
|
+
:root,
|
|
18
|
+
:root [data-theme='light'] {
|
|
19
|
+
// Bordered / Warning
|
|
20
|
+
--pf-alert-bordered-warning-bg: var(--pf-yellow-color-150);
|
|
21
|
+
--pf-alert-bordered-warning-border: var(--pf-yellow-color-400);
|
|
22
|
+
--pf-alert-bordered-warning-text: var(--pf-yellow-color-600);
|
|
23
|
+
--pf-alert-bordered-warning-icon: var(--pf-yellow-color-400);
|
|
24
|
+
|
|
25
|
+
// Bordered / Info
|
|
26
|
+
--pf-alert-bordered-info-bg: var(--pf-blue-color-150);
|
|
27
|
+
--pf-alert-bordered-info-border: var(--pf-secondary-color-400);
|
|
28
|
+
--pf-alert-bordered-info-text: var(--pf-secondary-color-500);
|
|
29
|
+
--pf-alert-bordered-info-icon: var(--pf-secondary-color-400);
|
|
30
|
+
|
|
31
|
+
// Bordered / Success
|
|
32
|
+
--pf-alert-bordered-success-bg: var(--pf-green-color-150);
|
|
33
|
+
--pf-alert-bordered-success-border: var(--pf-green-color-450);
|
|
34
|
+
--pf-alert-bordered-success-text: var(--pf-green-color-600);
|
|
35
|
+
--pf-alert-bordered-success-icon: var(--pf-green-color-500);
|
|
36
|
+
|
|
37
|
+
// Bordered / Error
|
|
38
|
+
--pf-alert-bordered-error-bg: var(--pf-red-color-150);
|
|
39
|
+
--pf-alert-bordered-error-border: var(--pf-red-color-250);
|
|
40
|
+
--pf-alert-bordered-error-text: var(--pf-red-color-500);
|
|
41
|
+
--pf-alert-bordered-error-icon: var(--pf-red-color-450);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// ============================================================================
|
|
45
|
+
// Bordered variant - Dark Theme
|
|
46
|
+
// ============================================================================
|
|
47
|
+
:root [data-theme='dark'] {
|
|
48
|
+
// Bordered / Warning
|
|
49
|
+
--pf-alert-bordered-warning-bg: var(--pf-yellow-color-800);
|
|
50
|
+
--pf-alert-bordered-warning-border: var(--pf-yellow-color-500);
|
|
51
|
+
--pf-alert-bordered-warning-text: var(--pf-yellow-color-300);
|
|
52
|
+
--pf-alert-bordered-warning-icon: var(--pf-yellow-color-300);
|
|
53
|
+
|
|
54
|
+
// Bordered / Info
|
|
55
|
+
--pf-alert-bordered-info-bg: var(--pf-blue-color-700);
|
|
56
|
+
--pf-alert-bordered-info-border: var(--pf-secondary-color-500);
|
|
57
|
+
--pf-alert-bordered-info-text: var(--pf-secondary-color-250);
|
|
58
|
+
--pf-alert-bordered-info-icon: var(--pf-secondary-color-250);
|
|
59
|
+
|
|
60
|
+
// Bordered / Success
|
|
61
|
+
--pf-alert-bordered-success-bg: var(--pf-green-color-800);
|
|
62
|
+
--pf-alert-bordered-success-border: var(--pf-green-color-600);
|
|
63
|
+
--pf-alert-bordered-success-text: var(--pf-green-color-300);
|
|
64
|
+
--pf-alert-bordered-success-icon: var(--pf-green-color-300);
|
|
65
|
+
|
|
66
|
+
// Bordered / Error
|
|
67
|
+
--pf-alert-bordered-error-bg: var(--pf-red-color-700);
|
|
68
|
+
--pf-alert-bordered-error-border: var(--pf-red-color-500);
|
|
69
|
+
--pf-alert-bordered-error-text: var(--pf-red-color-300);
|
|
70
|
+
--pf-alert-bordered-error-icon: var(--pf-red-color-300);
|
|
71
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
|
|
3
|
+
export type AlertType = 'warning' | 'info' | 'success' | 'error';
|
|
4
|
+
export type AlertVariant = 'soft' | 'bordered';
|
|
5
|
+
export type AlertSize = 'small' | 'large';
|
|
6
|
+
|
|
7
|
+
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/** Semantic type — controls the icon and accent color */
|
|
9
|
+
type: AlertType;
|
|
10
|
+
/** Visual style: soft (subtle bg) or bordered (colored border) */
|
|
11
|
+
variant?: AlertVariant;
|
|
12
|
+
/** Size: large (banner) or small (compact inline) */
|
|
13
|
+
size?: AlertSize;
|
|
14
|
+
/** When true, the bordered variant uses a type-specific tinted background instead of surface-secondary */
|
|
15
|
+
tinted?: boolean;
|
|
16
|
+
/** Optional title — when provided, renders above the message */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Alert body / message content */
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
/** Optional action button label */
|
|
21
|
+
actionText?: string;
|
|
22
|
+
/** Called when the action button is clicked */
|
|
23
|
+
onAction?: () => void;
|
|
24
|
+
/** Called when the close button is clicked — omit to hide the close button */
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
/** Accessible label for the close button (for i18n) */
|
|
27
|
+
closeAriaLabel?: string;
|
|
28
|
+
}
|
package/src/components/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export { InputDateRangePicker } from './forms/date/inputDateRangePicker';
|
|
|
21
21
|
export { Modal, ConfirmationModal } from './modal';
|
|
22
22
|
export { Badge } from './badge';
|
|
23
23
|
export { Pill } from './pill';
|
|
24
|
+
export { Alert } from './alert';
|
|
24
25
|
export { Pagination } from './pagination';
|
|
25
26
|
export { TanstackTable } from './tanstackTable';
|
|
26
27
|
export { Tooltip } from './tooltip';
|
|
@@ -68,6 +68,33 @@ Multiple features can be combined freely.
|
|
|
68
68
|
|
|
69
69
|
<Canvas of={Pill.Combined} />
|
|
70
70
|
|
|
71
|
+
## Shading
|
|
72
|
+
|
|
73
|
+
Use `shade` and `shadeCount` to visually differentiate pills within a single color.
|
|
74
|
+
The middle shade renders the base color; shades below the midpoint blend toward white
|
|
75
|
+
(up to 30% lighter), shades above blend toward black (up to 30% darker). Text and icons
|
|
76
|
+
stay at full strength throughout.
|
|
77
|
+
|
|
78
|
+
Pass both props together — `shade` is the 1-based index of this pill, `shadeCount` is
|
|
79
|
+
the total number of pills in the group. When either prop is omitted the pill renders
|
|
80
|
+
at full color as usual.
|
|
81
|
+
|
|
82
|
+
<Canvas of={Pill.Shaded} />
|
|
83
|
+
|
|
84
|
+
<Controls of={Pill.Shaded} />
|
|
85
|
+
|
|
86
|
+
### Spectrum across colors
|
|
87
|
+
|
|
88
|
+
Every chromatic color works with shading, in both solid and outline variants.
|
|
89
|
+
|
|
90
|
+
<Canvas of={Pill.ShadedSpectrum} />
|
|
91
|
+
|
|
92
|
+
### Dynamic shade counts
|
|
93
|
+
|
|
94
|
+
The distribution adapts to any group size — no fixed token set required.
|
|
95
|
+
|
|
96
|
+
<Canvas of={Pill.ShadedDynamicCount} />
|
|
97
|
+
|
|
71
98
|
## Full Color × Variant Matrix
|
|
72
99
|
|
|
73
100
|
<Canvas of={Pill.FullMatrix} />
|
|
@@ -65,6 +65,8 @@ const meta: Meta<typeof Pill> = {
|
|
|
65
65
|
iconLeft: { control: 'text' },
|
|
66
66
|
iconRight: { control: 'text' },
|
|
67
67
|
dot: { control: 'boolean' },
|
|
68
|
+
shade: { control: { type: 'number' } },
|
|
69
|
+
shadeCount: { control: { type: 'number' } },
|
|
68
70
|
onClose: { control: false },
|
|
69
71
|
children: { control: 'text' },
|
|
70
72
|
},
|
|
@@ -274,6 +276,91 @@ export const CloseableMatrix: Story = {
|
|
|
274
276
|
),
|
|
275
277
|
};
|
|
276
278
|
|
|
279
|
+
export const Shaded: Story = {
|
|
280
|
+
args: {
|
|
281
|
+
children: 'Medium',
|
|
282
|
+
color: 'green',
|
|
283
|
+
shade: 3,
|
|
284
|
+
shadeCount: 5,
|
|
285
|
+
},
|
|
286
|
+
argTypes: {
|
|
287
|
+
shade: { control: { type: 'range', min: 1, max: 10, step: 1 } },
|
|
288
|
+
shadeCount: { control: { type: 'range', min: 2, max: 10, step: 1 } },
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export const ShadedSpectrum: Story = {
|
|
293
|
+
render: () => {
|
|
294
|
+
const labels = ['Very Low', 'Low', 'Medium', 'High', 'Very High'];
|
|
295
|
+
return (
|
|
296
|
+
<>
|
|
297
|
+
{(['solid', 'outline'] as const).map((variant) => (
|
|
298
|
+
<div key={variant} style={section}>
|
|
299
|
+
<h4 style={{ marginBottom: 8, textTransform: 'capitalize' }}>{variant}</h4>
|
|
300
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
|
301
|
+
{COLORS.filter((c) => c !== 'soft').map((color) => (
|
|
302
|
+
<div key={color} style={row}>
|
|
303
|
+
<span
|
|
304
|
+
style={{
|
|
305
|
+
width: 60,
|
|
306
|
+
fontSize: 12,
|
|
307
|
+
fontWeight: 500,
|
|
308
|
+
textTransform: 'capitalize',
|
|
309
|
+
}}
|
|
310
|
+
>
|
|
311
|
+
{color}
|
|
312
|
+
</span>
|
|
313
|
+
{labels.map((label, i) => (
|
|
314
|
+
<Pill
|
|
315
|
+
key={label}
|
|
316
|
+
color={color}
|
|
317
|
+
variant={variant}
|
|
318
|
+
size="md"
|
|
319
|
+
shade={i + 1}
|
|
320
|
+
shadeCount={labels.length}
|
|
321
|
+
>
|
|
322
|
+
{label}
|
|
323
|
+
</Pill>
|
|
324
|
+
))}
|
|
325
|
+
</div>
|
|
326
|
+
))}
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
))}
|
|
330
|
+
</>
|
|
331
|
+
);
|
|
332
|
+
},
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
export const ShadedDynamicCount: Story = {
|
|
336
|
+
render: () => {
|
|
337
|
+
const counts = [3, 5, 7];
|
|
338
|
+
return (
|
|
339
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
|
|
340
|
+
{counts.map((count) => (
|
|
341
|
+
<div key={count}>
|
|
342
|
+
<h4 style={{ marginBottom: 8 }}>{count} shades</h4>
|
|
343
|
+
<div style={row}>
|
|
344
|
+
{Array.from({ length: count }, (_, i) => (
|
|
345
|
+
<Pill
|
|
346
|
+
key={i}
|
|
347
|
+
color="blue"
|
|
348
|
+
variant="solid"
|
|
349
|
+
size="md"
|
|
350
|
+
shade={i + 1}
|
|
351
|
+
shadeCount={count}
|
|
352
|
+
>
|
|
353
|
+
{i + 1} of {count}
|
|
354
|
+
</Pill>
|
|
355
|
+
))}
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
))}
|
|
359
|
+
</div>
|
|
360
|
+
);
|
|
361
|
+
},
|
|
362
|
+
};
|
|
363
|
+
|
|
277
364
|
const th: React.CSSProperties = {
|
|
278
365
|
padding: '6px 10px',
|
|
279
366
|
fontSize: 11,
|
|
@@ -19,11 +19,46 @@ export const Pill = ({
|
|
|
19
19
|
iconLeft,
|
|
20
20
|
iconRight,
|
|
21
21
|
dot,
|
|
22
|
+
shade,
|
|
23
|
+
shadeCount,
|
|
22
24
|
onClose,
|
|
23
25
|
closeAriaLabel = 'Remove',
|
|
24
26
|
className,
|
|
27
|
+
style,
|
|
25
28
|
...rest
|
|
26
29
|
}: PillProps) => {
|
|
30
|
+
const shadeStyle = (() => {
|
|
31
|
+
if (
|
|
32
|
+
shade === undefined ||
|
|
33
|
+
shade === null ||
|
|
34
|
+
shadeCount === undefined ||
|
|
35
|
+
shadeCount === null ||
|
|
36
|
+
shadeCount <= 1
|
|
37
|
+
)
|
|
38
|
+
return undefined;
|
|
39
|
+
|
|
40
|
+
const s = Math.max(1, Math.min(shadeCount, Math.round(shade)));
|
|
41
|
+
const midpoint = (shadeCount + 1) / 2;
|
|
42
|
+
|
|
43
|
+
if (s < midpoint) {
|
|
44
|
+
const distance = (midpoint - s) / (midpoint - 1);
|
|
45
|
+
return {
|
|
46
|
+
'--pill-shade-mix': `${Math.round(100 - distance * 30)}%`,
|
|
47
|
+
'--pill-shade-target': 'white',
|
|
48
|
+
} as React.CSSProperties;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (s > midpoint) {
|
|
52
|
+
const distance = (s - midpoint) / (shadeCount - midpoint);
|
|
53
|
+
return {
|
|
54
|
+
'--pill-shade-mix': `${Math.round(100 - distance * 30)}%`,
|
|
55
|
+
'--pill-shade-target': 'black',
|
|
56
|
+
} as React.CSSProperties;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return undefined;
|
|
60
|
+
})();
|
|
61
|
+
|
|
27
62
|
return (
|
|
28
63
|
<div
|
|
29
64
|
className={classNames(
|
|
@@ -37,6 +72,7 @@ export const Pill = ({
|
|
|
37
72
|
'pill--closeable': !!onClose,
|
|
38
73
|
},
|
|
39
74
|
)}
|
|
75
|
+
style={shadeStyle ? { ...shadeStyle, ...style } : style}
|
|
40
76
|
{...rest}
|
|
41
77
|
>
|
|
42
78
|
{dot && <span className="pill__dot" />}
|
|
@@ -122,4 +122,97 @@ describe('Pill', () => {
|
|
|
122
122
|
expect(container.querySelector('.pill__close')).toBeInTheDocument();
|
|
123
123
|
expect(screen.getByText('All Features')).toBeInTheDocument();
|
|
124
124
|
});
|
|
125
|
+
|
|
126
|
+
describe('shade', () => {
|
|
127
|
+
const getStyle = (container: HTMLElement) => (container.firstChild as HTMLElement).style;
|
|
128
|
+
|
|
129
|
+
it('sets no shade vars when both shade and shadeCount are omitted', () => {
|
|
130
|
+
const { container } = render(<Pill>Plain</Pill>);
|
|
131
|
+
const style = getStyle(container);
|
|
132
|
+
expect(style.getPropertyValue('--pill-shade-mix')).toBe('');
|
|
133
|
+
expect(style.getPropertyValue('--pill-shade-target')).toBe('');
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it('sets no shade vars when only shade is provided', () => {
|
|
137
|
+
const { container } = render(<Pill shade={2}>Shade Only</Pill>);
|
|
138
|
+
const style = getStyle(container);
|
|
139
|
+
expect(style.getPropertyValue('--pill-shade-mix')).toBe('');
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it('sets no shade vars when only shadeCount is provided', () => {
|
|
143
|
+
const { container } = render(<Pill shadeCount={5}>Count Only</Pill>);
|
|
144
|
+
const style = getStyle(container);
|
|
145
|
+
expect(style.getPropertyValue('--pill-shade-mix')).toBe('');
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
it('mixes toward white for shades below midpoint', () => {
|
|
149
|
+
const { container } = render(
|
|
150
|
+
<Pill shade={1} shadeCount={5}>
|
|
151
|
+
Lightest
|
|
152
|
+
</Pill>,
|
|
153
|
+
);
|
|
154
|
+
const style = getStyle(container);
|
|
155
|
+
expect(style.getPropertyValue('--pill-shade-mix')).toBe('70%');
|
|
156
|
+
expect(style.getPropertyValue('--pill-shade-target')).toBe('white');
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
it('mixes toward black for shades above midpoint', () => {
|
|
160
|
+
const { container } = render(
|
|
161
|
+
<Pill shade={5} shadeCount={5}>
|
|
162
|
+
Darkest
|
|
163
|
+
</Pill>,
|
|
164
|
+
);
|
|
165
|
+
const style = getStyle(container);
|
|
166
|
+
expect(style.getPropertyValue('--pill-shade-mix')).toBe('70%');
|
|
167
|
+
expect(style.getPropertyValue('--pill-shade-target')).toBe('black');
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it('sets no shade vars at the exact midpoint (base color)', () => {
|
|
171
|
+
const { container } = render(
|
|
172
|
+
<Pill shade={3} shadeCount={5}>
|
|
173
|
+
Middle
|
|
174
|
+
</Pill>,
|
|
175
|
+
);
|
|
176
|
+
const style = getStyle(container);
|
|
177
|
+
expect(style.getPropertyValue('--pill-shade-mix')).toBe('');
|
|
178
|
+
expect(style.getPropertyValue('--pill-shade-target')).toBe('');
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it('handles even shadeCount (no exact midpoint)', () => {
|
|
182
|
+
const { container: c1 } = render(
|
|
183
|
+
<Pill shade={2} shadeCount={4}>
|
|
184
|
+
Below
|
|
185
|
+
</Pill>,
|
|
186
|
+
);
|
|
187
|
+
const { container: c2 } = render(
|
|
188
|
+
<Pill shade={3} shadeCount={4}>
|
|
189
|
+
Above
|
|
190
|
+
</Pill>,
|
|
191
|
+
);
|
|
192
|
+
expect(getStyle(c1).getPropertyValue('--pill-shade-target')).toBe('white');
|
|
193
|
+
expect(getStyle(c2).getPropertyValue('--pill-shade-target')).toBe('black');
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
it('ignores shade when shadeCount is 1 or missing', () => {
|
|
197
|
+
const { container: c1 } = render(
|
|
198
|
+
<Pill shade={1} shadeCount={1}>
|
|
199
|
+
Single
|
|
200
|
+
</Pill>,
|
|
201
|
+
);
|
|
202
|
+
const { container: c2 } = render(<Pill shade={2}>No Count</Pill>);
|
|
203
|
+
expect(getStyle(c1).getPropertyValue('--pill-shade-mix')).toBe('');
|
|
204
|
+
expect(getStyle(c2).getPropertyValue('--pill-shade-mix')).toBe('');
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
it('preserves consumer style prop alongside shade vars', () => {
|
|
208
|
+
const { container } = render(
|
|
209
|
+
<Pill shade={1} shadeCount={3} style={{ maxWidth: 200 }}>
|
|
210
|
+
Styled
|
|
211
|
+
</Pill>,
|
|
212
|
+
);
|
|
213
|
+
const style = getStyle(container);
|
|
214
|
+
expect(style.getPropertyValue('--pill-shade-mix')).not.toBe('');
|
|
215
|
+
expect(style.maxWidth).toBe('200px');
|
|
216
|
+
});
|
|
217
|
+
});
|
|
125
218
|
});
|
|
@@ -18,9 +18,9 @@ $pill-variants: 'solid', 'outline';
|
|
|
18
18
|
border-radius: var(--pf-border-radius-full);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
// ------- Sizes -------
|
|
21
|
+
// ------- Default Sizes -------
|
|
22
22
|
&--sm {
|
|
23
|
-
padding: var(--pf-spacing-
|
|
23
|
+
padding: var(--pf-spacing-micro) var(--pf-spacing-xs);
|
|
24
24
|
font-size: var(--pf-font-size-sm);
|
|
25
25
|
font-weight: var(--pf-font-weight-semibold);
|
|
26
26
|
line-height: 16px;
|
|
@@ -28,7 +28,7 @@ $pill-variants: 'solid', 'outline';
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&--md {
|
|
31
|
-
padding: var(--pf-spacing-
|
|
31
|
+
padding: var(--pf-spacing-micro) var(--pf-spacing-sm);
|
|
32
32
|
font-size: var(--pf-font-size-md);
|
|
33
33
|
font-weight: var(--pf-font-weight-medium);
|
|
34
34
|
line-height: 20px;
|
|
@@ -36,7 +36,7 @@ $pill-variants: 'solid', 'outline';
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&--lg {
|
|
39
|
-
padding: var(--pf-spacing-
|
|
39
|
+
padding: var(--pf-spacing-xxs) var(--pf-spacing-md);
|
|
40
40
|
font-size: var(--pf-font-size-md);
|
|
41
41
|
font-weight: var(--pf-font-weight-medium);
|
|
42
42
|
line-height: 20px;
|
|
@@ -48,6 +48,19 @@ $pill-variants: 'solid', 'outline';
|
|
|
48
48
|
border-radius: var(--pf-border-radius-md);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
// Pill type has wider horizontal padding than badge
|
|
52
|
+
&--sm#{&}--pill {
|
|
53
|
+
padding: var(--pf-spacing-micro) var(--pf-spacing-sm);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&--md#{&}--pill {
|
|
57
|
+
padding: var(--pf-spacing-micro) var(--pf-spacing-md);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--lg#{&}--pill {
|
|
61
|
+
padding: var(--pf-spacing-xxs) var(--pf-spacing-lg);
|
|
62
|
+
}
|
|
63
|
+
|
|
51
64
|
// ------- Icon-only (special padding) -------
|
|
52
65
|
&--icon-only {
|
|
53
66
|
&.pill--sm {
|
|
@@ -63,20 +76,35 @@ $pill-variants: 'solid', 'outline';
|
|
|
63
76
|
}
|
|
64
77
|
}
|
|
65
78
|
|
|
66
|
-
// ------- Closeable (asymmetric padding) -------
|
|
79
|
+
// ------- Closeable (asymmetric padding, badge defaults) -------
|
|
67
80
|
&--closeable {
|
|
81
|
+
&.pill--sm {
|
|
82
|
+
padding: var(--pf-spacing-xxs) var(--pf-spacing-xs) var(--pf-spacing-xxs) var(--pf-spacing-xs);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.pill--md {
|
|
86
|
+
padding: var(--pf-spacing-xxs) var(--pf-spacing-xs) var(--pf-spacing-xxs) var(--pf-spacing-sm);
|
|
87
|
+
gap: var(--pf-spacing-xxs);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.pill--lg {
|
|
91
|
+
padding: var(--pf-spacing-xs) var(--pf-spacing-sm) var(--pf-spacing-xs) var(--pf-spacing-md);
|
|
92
|
+
gap: var(--pf-spacing-xxs);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Pill type closeable has wider left padding
|
|
97
|
+
&--closeable#{&}--pill {
|
|
68
98
|
&.pill--sm {
|
|
69
99
|
padding: var(--pf-spacing-xxs) var(--pf-spacing-xs) var(--pf-spacing-xxs) var(--pf-spacing-sm);
|
|
70
100
|
}
|
|
71
101
|
|
|
72
102
|
&.pill--md {
|
|
73
103
|
padding: var(--pf-spacing-xxs) var(--pf-spacing-xs) var(--pf-spacing-xxs) var(--pf-spacing-md);
|
|
74
|
-
gap: var(--pf-spacing-xxs);
|
|
75
104
|
}
|
|
76
105
|
|
|
77
106
|
&.pill--lg {
|
|
78
107
|
padding: var(--pf-spacing-xs) var(--pf-spacing-sm) var(--pf-spacing-xs) var(--pf-spacing-lg);
|
|
79
|
-
gap: var(--pf-spacing-xxs);
|
|
80
108
|
}
|
|
81
109
|
}
|
|
82
110
|
|
|
@@ -84,11 +112,24 @@ $pill-variants: 'solid', 'outline';
|
|
|
84
112
|
@each $variant in $pill-variants {
|
|
85
113
|
@each $color in $pill-colors {
|
|
86
114
|
&--#{$variant}-#{$color} {
|
|
87
|
-
background-color:
|
|
115
|
+
background-color: color-mix(
|
|
116
|
+
in srgb,
|
|
117
|
+
var(--pf-pill-#{$variant}-#{$color}-bg) var(--pill-shade-mix, 100%),
|
|
118
|
+
var(--pill-shade-target, white)
|
|
119
|
+
);
|
|
88
120
|
color: var(--pf-pill-#{$variant}-#{$color}-text);
|
|
89
121
|
|
|
90
122
|
@if $variant == 'outline' {
|
|
91
|
-
box-shadow: inset
|
|
123
|
+
box-shadow: inset
|
|
124
|
+
0
|
|
125
|
+
0
|
|
126
|
+
0
|
|
127
|
+
1px
|
|
128
|
+
color-mix(
|
|
129
|
+
in srgb,
|
|
130
|
+
var(--pf-pill-#{$variant}-#{$color}-border) var(--pill-shade-mix, 100%),
|
|
131
|
+
var(--pill-shade-target, white)
|
|
132
|
+
);
|
|
92
133
|
}
|
|
93
134
|
|
|
94
135
|
> .icon {
|
|
@@ -25,6 +25,10 @@ export interface PillProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
iconRight?: IconName;
|
|
26
26
|
/** When true, renders a small colored dot indicator before the content */
|
|
27
27
|
dot?: boolean;
|
|
28
|
+
/** 1-based shade index within a group. Used with shadeCount to vary background lightness via color-mix(). */
|
|
29
|
+
shade?: number;
|
|
30
|
+
/** Total shades in the group. Background blends lighter (white) below midpoint, darker (black) above. */
|
|
31
|
+
shadeCount?: number;
|
|
28
32
|
/** When provided, renders a close button that calls this handler */
|
|
29
33
|
onClose?: () => void;
|
|
30
34
|
/** Accessible label for the close button (for i18n) */
|
package/src/index.ts
CHANGED
|
@@ -27,6 +27,7 @@ export { Card } from './components/card';
|
|
|
27
27
|
export { FloatUI } from './components/floatUI';
|
|
28
28
|
export { Menu } from './components/menu';
|
|
29
29
|
export { Pill } from './components/pill';
|
|
30
|
+
export { Alert } from './components/alert';
|
|
30
31
|
export { Badge } from './components/badge';
|
|
31
32
|
export { Modal, ConfirmationModal } from './components/modal';
|
|
32
33
|
export { TanstackTable } from './components/tanstackTable';
|