@onewelcome/react-lib-components 9.2.0 → 9.4.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/dist/cjs/Breadcrumbs/Breadcrumbs.module.scss.cjs.js +1 -1
- package/dist/cjs/Button/BaseButton.module.scss.cjs.js +1 -1
- package/dist/cjs/Button/Button.module.scss.cjs.js +1 -1
- package/dist/cjs/Button/IconButton.module.scss.cjs.js +1 -1
- package/dist/cjs/ContextMenu/ContextMenu.module.scss.cjs.js +1 -1
- package/dist/cjs/ContextMenu/ContextMenuItem.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGrid.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridActions/DataGridActions.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridBody.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DataGridFilter.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DataGridToolbar.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeader.module.scss.cjs.js +1 -1
- package/dist/cjs/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.cjs.js +1 -1
- package/dist/cjs/DatePicker/DatePicker.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Checkbox/Checkbox.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Fieldset/Fieldset.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileItem/FileItem.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FileUpload/FileUpload.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Form.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormControl/FormControl.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormErrorText/FormErrorText.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormGroup/FormGroup.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormHelperText/FormHelperText.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Input/Input.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Label/Label.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Radio/Radio.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/MultiSelect.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/SelectButton.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Select/MultiSelect/SelectedOptions.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Select/SingleSelect/Select.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Select/useAddNewBtn.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Textarea/Textarea.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Toggle/Toggle.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/InputWrapper/InputWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Form/Wrapper/Wrapper/Wrapper.module.scss.cjs.js +1 -1
- package/dist/cjs/Icon/Icon.cjs.js +1 -1
- package/dist/cjs/Icon/Icon.cjs.js.map +1 -1
- package/dist/cjs/Icon/Icon.module.scss.cjs.js +1 -1
- package/dist/cjs/Layout/ContentHeader/ContentHeader.module.scss.cjs.js +1 -1
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.cjs.js +1 -1
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.cjs.js +1 -1
- package/dist/cjs/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.cjs.js +1 -1
- package/dist/cjs/Link/Link.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Alert/AlertContainer/AlertContainer.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Alert/AlertItem/AlertItem.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Banner/Banner.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModal.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/Dialog.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/DialogActions/DialogActions.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/SideSheet/SideSheet.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.cjs.js +1 -1
- package/dist/cjs/Notifications/SlideInModal/SlideInModal.module.scss.cjs.js +1 -1
- package/dist/cjs/Pagination/Pagination.module.scss.cjs.js +1 -1
- package/dist/cjs/Popover/Popover.module.scss.cjs.js +1 -1
- package/dist/cjs/ProgressBar/ProgressBar.module.scss.cjs.js +1 -1
- package/dist/cjs/Skeleton/Skeleton.module.scss.cjs.js +1 -1
- package/dist/cjs/Spinner/Spinner.module.scss.cjs.js +1 -1
- package/dist/cjs/Stepper/Step.module.scss.cjs.js +1 -1
- package/dist/cjs/Stepper/Stepper.module.scss.cjs.js +1 -1
- package/dist/cjs/Tabs/Tab.module.scss.cjs.js +1 -1
- package/dist/cjs/Tabs/TabButton.module.scss.cjs.js +1 -1
- package/dist/cjs/Tabs/Tabs.module.scss.cjs.js +1 -1
- package/dist/cjs/Tag/RemoveButton.module.scss.cjs.js +1 -1
- package/dist/cjs/Tag/Tag.module.scss.cjs.js +1 -1
- package/dist/cjs/TextEllipsis/TextEllipsis.module.scss.cjs.js +1 -1
- package/dist/cjs/Tiles/Tile.module.scss.cjs.js +1 -1
- package/dist/cjs/Tiles/Tiles.module.scss.cjs.js +1 -1
- package/dist/cjs/Tooltip/Tooltip.module.scss.cjs.js +1 -1
- package/dist/cjs/Typography/Typography.module.scss.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js +1 -1
- package/dist/cjs/_BaseStyling_/BaseStyling.cjs.js.map +1 -1
- package/dist/cjs/_BaseStyling_/buttonBaseStyling.cjs.js +2 -0
- package/dist/cjs/_BaseStyling_/buttonBaseStyling.cjs.js.map +1 -0
- package/dist/cjs/admin/layout/LeftNav/LeftNav.module.scss.cjs.js +1 -1
- package/dist/cjs/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.cjs.js +1 -1
- package/dist/cjs/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.cjs.js +1 -1
- package/dist/cjs/miscellaneous/IdentityProviderButton.cjs.js +1 -1
- package/dist/cjs/miscellaneous/IdentityProviderButton.cjs.js.map +1 -1
- package/dist/cjs/miscellaneous/IdentityProviderButton.module.scss.cjs.js +1 -1
- package/dist/cjs/src/components/Icon/Icon.d.ts +2 -1
- package/dist/cjs/src/components/Layout/Card/Card.d.ts +16 -0
- package/dist/cjs/src/components/Layout/Card/Card.test.d.ts +1 -0
- package/dist/cjs/src/components/_BaseStyling_/BaseStyling.d.ts +29 -25
- package/dist/cjs/src/components/_BaseStyling_/buttonBaseStyling.d.ts +14 -0
- package/dist/cjs/src/readyclasses.module.scss.cjs.js +1 -1
- package/dist/esm/Breadcrumbs/Breadcrumbs.module.scss.esm.js +2 -2
- package/dist/esm/Button/BaseButton.module.scss.esm.js +2 -2
- package/dist/esm/Button/Button.module.scss.esm.js +2 -2
- package/dist/esm/Button/IconButton.module.scss.esm.js +2 -2
- package/dist/esm/ContextMenu/ContextMenu.module.scss.esm.js +2 -2
- package/dist/esm/ContextMenu/ContextMenuItem.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGrid.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridActions/DataGridActions.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridBody.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridCell/DataGridCell.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawer.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridDrawer/DataGridDrawerItem.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridBody/DataGridRow/DataGridRow.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DataGridFilter.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DataGridToolbar.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridFilters/DateTimePicker/DateTimePicker.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeader.module.scss.esm.js +2 -2
- package/dist/esm/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss.esm.js +2 -2
- package/dist/esm/DatePicker/DatePicker.module.scss.esm.js +2 -2
- package/dist/esm/Form/Checkbox/Checkbox.module.scss.esm.js +2 -2
- package/dist/esm/Form/Fieldset/Fieldset.module.scss.esm.js +2 -2
- package/dist/esm/Form/FileUpload/FileItem/FileItem.module.scss.esm.js +2 -2
- package/dist/esm/Form/FileUpload/FileUpload.module.scss.esm.js +2 -2
- package/dist/esm/Form/Form.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormControl/FormControl.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormErrorText/FormErrorText.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormGroup/FormGroup.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormHelperText/FormHelperText.module.scss.esm.js +2 -2
- package/dist/esm/Form/FormSelectorWrapper/FormSelectorWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Input/Input.module.scss.esm.js +2 -2
- package/dist/esm/Form/Label/Label.module.scss.esm.js +2 -2
- package/dist/esm/Form/Radio/Radio.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/MultiSelect.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/SelectButton.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/MultiSelect/SelectedOptions.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/SingleSelect/Select.module.scss.esm.js +2 -2
- package/dist/esm/Form/Select/useAddNewBtn.module.scss.esm.js +2 -2
- package/dist/esm/Form/Textarea/Textarea.module.scss.esm.js +2 -2
- package/dist/esm/Form/Toggle/Toggle.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/InputWrapper/InputWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/MultiSelectWrapper/MultiSelectWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/RadioWrapper/RadioWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/SelectWrapper/SelectWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss.esm.js +2 -2
- package/dist/esm/Form/Wrapper/Wrapper/Wrapper.module.scss.esm.js +2 -2
- package/dist/esm/Icon/Icon.esm.js +1 -0
- package/dist/esm/Icon/Icon.esm.js.map +1 -1
- package/dist/esm/Icon/Icon.module.scss.esm.js +2 -2
- package/dist/esm/Layout/ContentHeader/ContentHeader.module.scss.esm.js +2 -2
- package/dist/esm/Layout/FormPage/FormWithStepper/FormSection/FormSection.module.scss.esm.js +2 -2
- package/dist/esm/Layout/FormPage/FormWithStepper/FormStepper/FormStepper.module.scss.esm.js +2 -2
- package/dist/esm/Layout/FormPage/FormWithStepper/FormWithStepper.module.scss.esm.js +2 -2
- package/dist/esm/Link/Link.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Alert/AlertContainer/AlertContainer.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Alert/AlertItem/AlertItem.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Banner/Banner.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModal.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModalActions/BaseModalActions.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModalContent/BaseModalContent.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Dialog/Dialog.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Dialog/DialogActions/DialogActions.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/Dialog/DialogTitle/DialogTitle.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SideSheet/SideSheet.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SideSheet/SideSheetContent/SideSheetContent.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SideSheet/SideSheetHeader/SideSheetHeader.module.scss.esm.js +2 -2
- package/dist/esm/Notifications/SlideInModal/SlideInModal.module.scss.esm.js +2 -2
- package/dist/esm/Pagination/Pagination.module.scss.esm.js +2 -2
- package/dist/esm/Popover/Popover.module.scss.esm.js +2 -2
- package/dist/esm/ProgressBar/ProgressBar.module.scss.esm.js +2 -2
- package/dist/esm/Skeleton/Skeleton.module.scss.esm.js +2 -2
- package/dist/esm/Spinner/Spinner.module.scss.esm.js +2 -2
- package/dist/esm/Stepper/Step.module.scss.esm.js +2 -2
- package/dist/esm/Stepper/Stepper.module.scss.esm.js +2 -2
- package/dist/esm/Tabs/Tab.module.scss.esm.js +2 -2
- package/dist/esm/Tabs/TabButton.module.scss.esm.js +2 -2
- package/dist/esm/Tabs/Tabs.module.scss.esm.js +2 -2
- package/dist/esm/Tag/RemoveButton.module.scss.esm.js +2 -2
- package/dist/esm/Tag/Tag.module.scss.esm.js +2 -2
- package/dist/esm/TextEllipsis/TextEllipsis.module.scss.esm.js +2 -2
- package/dist/esm/Tiles/Tile.module.scss.esm.js +2 -2
- package/dist/esm/Tiles/Tiles.module.scss.esm.js +2 -2
- package/dist/esm/Tooltip/Tooltip.module.scss.esm.js +2 -2
- package/dist/esm/Typography/Typography.module.scss.esm.js +2 -2
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js +29 -24
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js.map +1 -1
- package/dist/esm/_BaseStyling_/buttonBaseStyling.esm.js +100 -0
- package/dist/esm/_BaseStyling_/buttonBaseStyling.esm.js.map +1 -0
- package/dist/esm/admin/layout/LeftNav/LeftNav.module.scss.esm.js +2 -2
- package/dist/esm/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss.esm.js +2 -2
- package/dist/esm/admin/layout/MicrofrontendContainer/MicrofrontendContainer.module.scss.esm.js +2 -2
- package/dist/esm/miscellaneous/IdentityProviderButton.esm.js +4 -4
- package/dist/esm/miscellaneous/IdentityProviderButton.esm.js.map +1 -1
- package/dist/esm/miscellaneous/IdentityProviderButton.module.scss.esm.js +2 -2
- package/dist/esm/src/components/Icon/Icon.d.ts +2 -1
- package/dist/esm/src/components/Layout/Card/Card.d.ts +16 -0
- package/dist/esm/src/components/Layout/Card/Card.test.d.ts +1 -0
- package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +29 -25
- package/dist/esm/src/components/_BaseStyling_/buttonBaseStyling.d.ts +14 -0
- package/dist/esm/src/readyclasses.module.scss.esm.js +2 -2
- package/package.json +1 -1
- package/src/components/Button/Button.module.scss +1 -1
- package/src/components/ContextMenu/ContextMenuItem.module.scss +2 -2
- package/src/components/DatePicker/DatePicker.module.scss +1 -1
- package/src/components/Form/Checkbox/Checkbox.module.scss +4 -2
- package/src/components/Form/Radio/Radio.module.scss +2 -1
- package/src/components/Form/Select/MultiSelect/MultiSelect.module.scss +1 -1
- package/src/components/Form/Select/SingleSelect/Select.module.scss +2 -2
- package/src/components/Icon/Icon.module.scss +4 -0
- package/src/components/Icon/Icon.tsx +2 -1
- package/src/components/Layout/Card/Card.module.scss +68 -0
- package/src/components/Layout/Card/Card.tsx +108 -0
- package/src/components/Link/Link.module.scss +13 -13
- package/src/components/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.module.scss +10 -9
- package/src/components/Notifications/Dialog/DialogTitle/DialogTitle.module.scss +22 -21
- package/src/components/Typography/Typography.module.scss +37 -18
- package/src/components/_BaseStyling_/BaseStyling.tsx +69 -57
- package/src/components/_BaseStyling_/buttonBaseStyling.ts +123 -0
- package/src/components/admin/layout/LeftNav/LeftNav.module.scss +3 -1
- package/src/components/admin/layout/LeftNav/LeftNavItem/LeftNavItem.module.scss +2 -2
- package/src/components/miscellaneous/IdentityProviderButton.tsx +6 -4
- package/src/font/icomoon.eot +0 -0
- package/src/font/icomoon.svg +1 -0
- package/src/font/icomoon.ttf +0 -0
- package/src/font/icomoon.woff +0 -0
- package/src/font/selection.json +1 -1
- package/src/mixins.module.scss +22 -24
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { HTMLAttributes, ReactElement } from "react";
|
|
2
|
+
export interface CardHeaderInfo {
|
|
3
|
+
}
|
|
4
|
+
export type CardStyle = "default" | "white";
|
|
5
|
+
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
title?: string;
|
|
7
|
+
titleHeadingLevel?: number;
|
|
8
|
+
description?: string;
|
|
9
|
+
action?: ReactElement;
|
|
10
|
+
wrapHeaderText?: boolean;
|
|
11
|
+
headerContent?: ReactElement;
|
|
12
|
+
cardStyle?: CardStyle;
|
|
13
|
+
collapsed?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const CardComponent: ({ title, titleHeadingLevel, description, action, wrapHeaderText, headerContent, cardStyle, collapsed, children, ...rest }: CardProps) => React.JSX.Element;
|
|
16
|
+
export declare const Card: ({ title, titleHeadingLevel, description, action, wrapHeaderText, headerContent, cardStyle, collapsed, children, ...rest }: CardProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* and make sure to add it to the shouldBeColorPicker array!
|
|
4
4
|
*/
|
|
5
5
|
import React, { HTMLAttributes, ReactElement } from "react";
|
|
6
|
-
|
|
6
|
+
import { ButtonColorProps } from "./buttonBaseStyling";
|
|
7
|
+
export interface CSSProperties extends ButtonColorProps {
|
|
7
8
|
colorFocus?: string;
|
|
8
9
|
colorPrimary?: string;
|
|
9
10
|
colorSuccess?: string;
|
|
@@ -58,36 +59,19 @@ export interface CSSProperties {
|
|
|
58
59
|
buttonBorderWidth?: string;
|
|
59
60
|
buttonFontSize?: string;
|
|
60
61
|
buttonBorderStyle?: string;
|
|
61
|
-
|
|
62
|
-
buttonPrimaryPressedColor?: string;
|
|
63
|
-
buttonFillTextColor?: string;
|
|
64
|
-
buttonPrimaryHoverColor?: string;
|
|
65
|
-
buttonPrimaryFocusedColor?: string;
|
|
62
|
+
/**@deprecated*/
|
|
66
63
|
buttonOutlineHoverTextColor?: string;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
buttonSuccessFocusedColor?: string;
|
|
70
|
-
buttonSuccessPressedColor?: string;
|
|
71
|
-
buttonDangerDefaultColor?: string;
|
|
72
|
-
buttonDangerHoverColor?: string;
|
|
73
|
-
buttonDangerFocusedColor?: string;
|
|
74
|
-
buttonDangerPressedColor?: string;
|
|
75
|
-
buttonWarningDefaultColor?: string;
|
|
76
|
-
buttonWarningHoverColor?: string;
|
|
77
|
-
buttonWarningFocusedColor?: string;
|
|
78
|
-
buttonWarningPressedColor?: string;
|
|
79
|
-
buttonDefaultColor?: string;
|
|
80
|
-
buttonDefaultHoverColor?: string;
|
|
81
|
-
buttonDefaultFocusedColor?: string;
|
|
82
|
-
buttonDefaultPressedColor?: string;
|
|
83
|
-
buttonOutlineActiveTextColor?: string;
|
|
64
|
+
buttonFillTextColor?: string;
|
|
65
|
+
checkboxUncheckedColor?: string;
|
|
84
66
|
checkboxUncheckedHoverColor?: string;
|
|
85
67
|
checkboxUncheckedPressedColor?: string;
|
|
68
|
+
checkboxCheckedColor?: string;
|
|
86
69
|
checkboxCheckedHoverColor?: string;
|
|
87
70
|
checkboxCheckedPressedColor?: string;
|
|
88
71
|
radioHoverBackgroundColor?: string;
|
|
89
72
|
radioPressedBackgroundColor?: string;
|
|
90
73
|
radioHoverColor?: string;
|
|
74
|
+
radioCheckedColor?: string;
|
|
91
75
|
radioPressedColor?: string;
|
|
92
76
|
defaultBorderRadius?: string;
|
|
93
77
|
inputBorderRadius?: string;
|
|
@@ -100,7 +84,9 @@ export interface CSSProperties {
|
|
|
100
84
|
inputHoverBackgroundColor?: string;
|
|
101
85
|
inputDisabledBackgroundColor?: string;
|
|
102
86
|
inputFontSize?: string;
|
|
87
|
+
iconFontBig?: string;
|
|
103
88
|
dragBorderStyle?: string;
|
|
89
|
+
modalTitleColor?: string;
|
|
104
90
|
modalShadowColor?: string;
|
|
105
91
|
modalBackgroundColor?: string;
|
|
106
92
|
modalBackdropColor?: string;
|
|
@@ -169,8 +155,20 @@ export interface CSSProperties {
|
|
|
169
155
|
toggleBackgroundColor?: string;
|
|
170
156
|
tooltipBackgroundColor?: string;
|
|
171
157
|
contextMenuHoverColor?: string;
|
|
158
|
+
contextMenuActiveColor?: string;
|
|
172
159
|
contextMenuPressedColor?: string;
|
|
173
160
|
contextMenuFontSize?: string;
|
|
161
|
+
linkFontSize?: string;
|
|
162
|
+
linkPrimaryDefaultColor?: string;
|
|
163
|
+
linkPrimaryVisitedColor?: string;
|
|
164
|
+
linkSuccessDefaultColor?: string;
|
|
165
|
+
linkSuccessVisitedColor?: string;
|
|
166
|
+
linkDangerDefaultColor?: string;
|
|
167
|
+
linkDangerVisitedColor?: string;
|
|
168
|
+
linkWarningDefaultColor?: string;
|
|
169
|
+
linkWarningVisitedColor?: string;
|
|
170
|
+
leftNavItemActiveRibbonColor?: string;
|
|
171
|
+
leftNavItemActiveBackgroundColor?: string;
|
|
174
172
|
default?: string;
|
|
175
173
|
success?: string;
|
|
176
174
|
error?: string;
|
|
@@ -184,21 +182,27 @@ export interface CSSProperties {
|
|
|
184
182
|
fontFamilyCode?: string;
|
|
185
183
|
fontSizeFormLabel?: string;
|
|
186
184
|
fontSize?: string;
|
|
185
|
+
fontColorBody?: string;
|
|
187
186
|
fontSizeH1?: string;
|
|
187
|
+
fontColorH1?: string;
|
|
188
188
|
fontSizeH2?: string;
|
|
189
|
+
fontColorH2?: string;
|
|
189
190
|
fontSizeH3?: string;
|
|
191
|
+
fontColorH3?: string;
|
|
190
192
|
fontSizeH4?: string;
|
|
193
|
+
fontColorH4?: string;
|
|
191
194
|
fontSizeSub?: string;
|
|
195
|
+
fontColorSub?: string;
|
|
196
|
+
fontSizeCode?: string;
|
|
197
|
+
fontColorCode?: string;
|
|
192
198
|
fontSizeSmall?: string;
|
|
193
199
|
fontSizeBig?: string;
|
|
194
|
-
fontSizeCode?: string;
|
|
195
200
|
formControlFontSize?: string;
|
|
196
201
|
fileUploadBorderWidth?: string;
|
|
197
202
|
dragDropBorderStyle?: string;
|
|
198
203
|
fontSizeDataGrid?: string;
|
|
199
204
|
readOnlyBorderColor?: string;
|
|
200
205
|
readOnlyTextColor?: string;
|
|
201
|
-
iconFontBig?: string;
|
|
202
206
|
}
|
|
203
207
|
export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
204
208
|
children?: ReactElement[] | ReactElement | string[] | string | number[] | number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type ButtonType = "primary" | "success" | "danger" | "warning" | "default";
|
|
2
|
+
type ButtonVariant = "fill" | "outline" | "text";
|
|
3
|
+
type ButtonState = "default" | "hover" | "focused" | "pressed";
|
|
4
|
+
type CapitalizeString<T extends string> = T extends `${infer First}${infer Rest}` ? `${Uppercase<First>}${Rest}` : T;
|
|
5
|
+
type Flattened<K extends string> = {
|
|
6
|
+
[Key in K]?: string;
|
|
7
|
+
};
|
|
8
|
+
type BaseButtonProps = Omit<Flattened<`button${CapitalizeString<ButtonType>}${CapitalizeString<ButtonState>}Color`>, "buttonDefaultDefaultColor"> & {
|
|
9
|
+
buttonDefaultColor?: string;
|
|
10
|
+
};
|
|
11
|
+
type VariantButtonProps = Flattened<`button${CapitalizeString<ButtonVariant>}${CapitalizeString<ButtonType>}${CapitalizeString<ButtonState>}Color`>;
|
|
12
|
+
export type ButtonColorProps = BaseButtonProps & VariantButtonProps;
|
|
13
|
+
export declare const defaultButtonColors: Required<ButtonColorProps>;
|
|
14
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../node_modules/style-inject/dist/style-inject.es.esm.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.readyclasses_sr-
|
|
4
|
-
var readyclasses = {"sr-only":"readyclasses_sr-
|
|
3
|
+
var css_248z = "/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.readyclasses_sr-only_aXWKY{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.readyclasses_hidden_aXWKY{display:none}.readyclasses_slide-in_aXWKY{animation:readyclasses_slide-in_aXWKY .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-in_aXWKY{animation-duration:.1ms}}.readyclasses_slide-out_aXWKY{animation:readyclasses_slide-out_aXWKY .5s forwards}@media (prefers-reduced-motion:reduce){.readyclasses_slide-out_aXWKY{animation-duration:.1ms}}@keyframes readyclasses_slide-in_aXWKY{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes readyclasses_slide-out_aXWKY{0%{transform:translateY(0)}to{transform:translateY(100vh)}}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlYWR5Y2xhc3Nlcy5tb2R1bGUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7RUFjRSxDQUNGLDRCQU9FLGtCQUFzQixDQUN0QixRQUFTLENBTFQsVUFBVyxDQUVYLFdBQVksQ0FDWixlQUFnQixDQUZoQixTQUFVLENBSFYsaUJBQWtCLENBQ2xCLFNBT0YsQ0FFQSwyQkFDRSxZQUNGLENBRUEsNkJBQ0Usa0RBQ0YsQ0FDQSx1Q0FDRSw2QkFDRSx1QkFDRixDQUNGLENBRUEsOEJBQ0UsbURBQ0YsQ0FDQSx1Q0FDRSw4QkFDRSx1QkFDRixDQUNGLENBRUEsdUNBQ0UsR0FDRSwyQkFDRixDQUNBLEdBQ0UsdUJBQ0YsQ0FDRixDQUNBLHdDQUNFLEdBQ0UsdUJBQ0YsQ0FDQSxHQUNFLDJCQUNGLENBQ0YiLCJmaWxlIjoicmVhZHljbGFzc2VzLm1vZHVsZS5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLyohXG4gKiBDb3B5cmlnaHQgMjAyMiBPbmVXZWxjb21lIEIuVi5cbiAqXG4gKiAgICBMaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4wICh0aGUgXCJMaWNlbnNlXCIpO1xuICogICAgeW91IG1heSBub3QgdXNlIHRoaXMgZmlsZSBleGNlcHQgaW4gY29tcGxpYW5jZSB3aXRoIHRoZSBMaWNlbnNlLlxuICogICAgWW91IG1heSBvYnRhaW4gYSBjb3B5IG9mIHRoZSBMaWNlbnNlIGF0XG4gKlxuICogICAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMFxuICpcbiAqICAgIFVubGVzcyByZXF1aXJlZCBieSBhcHBsaWNhYmxlIGxhdyBvciBhZ3JlZWQgdG8gaW4gd3JpdGluZywgc29mdHdhcmVcbiAqICAgIGRpc3RyaWJ1dGVkIHVuZGVyIHRoZSBMaWNlbnNlIGlzIGRpc3RyaWJ1dGVkIG9uIGFuIFwiQVMgSVNcIiBCQVNJUyxcbiAqICAgIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLlxuICogICAgU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZFxuICogICAgbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuXG4gKi9cbi5zci1vbmx5IHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB3aWR0aDogMXB4O1xuICBoZWlnaHQ6IDFweDtcbiAgcGFkZGluZzogMDtcbiAgbWFyZ2luOiAtMXB4O1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBjbGlwOiByZWN0KDAsIDAsIDAsIDApO1xuICBib3JkZXI6IDA7XG59XG5cbi5oaWRkZW4ge1xuICBkaXNwbGF5OiBub25lO1xufVxuXG4uc2xpZGUtaW4ge1xuICBhbmltYXRpb246IHNsaWRlLWluIDAuNXMgZm9yd2FyZHM7XG59XG5AbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkge1xuICAuc2xpZGUtaW4ge1xuICAgIGFuaW1hdGlvbi1kdXJhdGlvbjogMC4xbXM7XG4gIH1cbn1cblxuLnNsaWRlLW91dCB7XG4gIGFuaW1hdGlvbjogc2xpZGUtb3V0IDAuNXMgZm9yd2FyZHM7XG59XG5AbWVkaWEgKHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSkge1xuICAuc2xpZGUtb3V0IHtcbiAgICBhbmltYXRpb24tZHVyYXRpb246IDAuMW1zO1xuICB9XG59XG5cbkBrZXlmcmFtZXMgc2xpZGUtaW4ge1xuICAwJSB7XG4gICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKDEwMHZoKTtcbiAgfVxuICAxMDAlIHtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCUpO1xuICB9XG59XG5Aa2V5ZnJhbWVzIHNsaWRlLW91dCB7XG4gIDAlIHtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMCUpO1xuICB9XG4gIDEwMCUge1xuICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgxMDB2aCk7XG4gIH1cbn0iXX0= */";
|
|
4
|
+
var readyclasses = {"sr-only":"readyclasses_sr-only_aXWKY","hidden":"readyclasses_hidden_aXWKY","slide-in":"readyclasses_slide-in_aXWKY","slide-out":"readyclasses_slide-out_aXWKY"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { readyclasses as default };
|
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&.active {
|
|
59
|
-
color: var(--color
|
|
59
|
+
color: var(--context-menu-active-color);
|
|
60
60
|
|
|
61
61
|
&::before {
|
|
62
62
|
content: "";
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
height: 100%;
|
|
67
67
|
border-top-right-radius: 0.125rem;
|
|
68
68
|
border-bottom-right-radius: 0.125rem;
|
|
69
|
-
border-left: 0.25rem solid var(--color
|
|
69
|
+
border-left: 0.25rem solid var(--context-menu-active-color);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
.rdp-root {
|
|
70
70
|
position: relative;
|
|
71
71
|
box-sizing: border-box;
|
|
72
|
-
@include mixins.fontProperties(
|
|
72
|
+
@include mixins.fontProperties($fontSize: var(--font-size-sub), $lineHeight: var(--font-size));
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.rdp-root * {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
z-index: 2;
|
|
59
59
|
|
|
60
60
|
&:checked:not(.disabled) + * {
|
|
61
|
-
color: var(--color
|
|
61
|
+
color: var(--checkbox-checked-color);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&:focus-visible {
|
|
@@ -115,6 +115,8 @@
|
|
|
115
115
|
width: var(--font-size-big);
|
|
116
116
|
height: var(--font-size-big);
|
|
117
117
|
z-index: 1;
|
|
118
|
+
|
|
119
|
+
color: var(--checkbox-unchecked-color);
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
.disabled {
|
|
@@ -140,7 +142,7 @@
|
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
.indeterminate {
|
|
143
|
-
color: var(--color
|
|
145
|
+
color: var(--checkbox-checked-color);
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
[data-readonlyview="true"] .checkbox-wrapper {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&:checked + * {
|
|
84
|
-
color: var(--color
|
|
84
|
+
color: var(--radio-checked-color);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
&:checked + *.disabled {
|
|
@@ -135,6 +135,7 @@
|
|
|
135
135
|
height: var(--font-size-big);
|
|
136
136
|
z-index: 1;
|
|
137
137
|
border-radius: 100%;
|
|
138
|
+
color: var(--color-blue-grey500);
|
|
138
139
|
|
|
139
140
|
&:active {
|
|
140
141
|
border-radius: 100%;
|
|
@@ -55,7 +55,7 @@ $listItemHeight: 2.5rem;
|
|
|
55
55
|
|
|
56
56
|
&:hover:not(.disabled):not(.expanded):not(.error) {
|
|
57
57
|
.custom-select:not(:focus) {
|
|
58
|
-
border-color: var(--
|
|
58
|
+
border-color: var(--input-border-color);
|
|
59
59
|
border-width: var(--input-border-width);
|
|
60
60
|
background-color: var(--color-blue-grey25);
|
|
61
61
|
}
|
|
@@ -55,7 +55,7 @@ $listItemHeight: 2.5rem;
|
|
|
55
55
|
|
|
56
56
|
&:hover:not(.disabled):not(.expanded):not(.error) {
|
|
57
57
|
button:not(:focus) {
|
|
58
|
-
border-color: var(--
|
|
58
|
+
border-color: var(--input-border-color);
|
|
59
59
|
border-width: var(--input-border-width);
|
|
60
60
|
background-color: var(--color-blue-grey25);
|
|
61
61
|
}
|
|
@@ -72,7 +72,7 @@ $listItemHeight: 2.5rem;
|
|
|
72
72
|
)
|
|
73
73
|
);
|
|
74
74
|
background-color: transparent;
|
|
75
|
-
border-color: var(--
|
|
75
|
+
border-color: var(--input-border-color);
|
|
76
76
|
border-style: var(--input-border-style);
|
|
77
77
|
border-width: var(--input-border-width);
|
|
78
78
|
border-radius: var(--input-border-radius);
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use "src/functions" as *;
|
|
2
|
+
|
|
3
|
+
.main {
|
|
4
|
+
border-radius: relativeToBaseFontSize(0.25);
|
|
5
|
+
min-width: relativeToBaseFontSize(18.5);
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.header {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
padding: relativeToBaseFontSize(0.5) relativeToBaseFontSize(1.5);
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
gap: relativeToBaseFontSize(0.5);
|
|
15
|
+
background-color: var(--color-primary100);
|
|
16
|
+
|
|
17
|
+
.title-left {
|
|
18
|
+
flex: 1 1 auto;
|
|
19
|
+
min-width: 0;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
|
|
23
|
+
.title {
|
|
24
|
+
margin: 0;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.description {
|
|
31
|
+
margin: 0;
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
display: block;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.title-right {
|
|
38
|
+
flex: 0 0 auto;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
height: 100%;
|
|
42
|
+
gap: relativeToBaseFontSize(0.5);
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.body {
|
|
48
|
+
padding: relativeToBaseFontSize(1) relativeToBaseFontSize(1.5);
|
|
49
|
+
|
|
50
|
+
&.default-body-style {
|
|
51
|
+
background-color: var(--color-blue-grey50);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.white-body-style {
|
|
55
|
+
background-color: var(--color-white);
|
|
56
|
+
border: 1px solid var(--color-blue-grey100);
|
|
57
|
+
|
|
58
|
+
&.without-header {
|
|
59
|
+
border-radius: relativeToBaseFontSize(0.25);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.with-header {
|
|
63
|
+
border-top: none;
|
|
64
|
+
border-bottom-left-radius: relativeToBaseFontSize(0.25);
|
|
65
|
+
border-bottom-right-radius: relativeToBaseFontSize(0.25);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React, { HTMLAttributes, ReactElement } from "react";
|
|
18
|
+
import { Typography } from "../../Typography/Typography";
|
|
19
|
+
|
|
20
|
+
import classes from "./Card.module.scss";
|
|
21
|
+
import { TextEllipsis } from "../../TextEllipsis/TextEllipsis";
|
|
22
|
+
|
|
23
|
+
export interface CardHeaderInfo {}
|
|
24
|
+
|
|
25
|
+
export type CardStyle = "default" | "white";
|
|
26
|
+
|
|
27
|
+
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
28
|
+
title?: string;
|
|
29
|
+
titleHeadingLevel?: number;
|
|
30
|
+
description?: string;
|
|
31
|
+
action?: ReactElement;
|
|
32
|
+
wrapHeaderText?: boolean;
|
|
33
|
+
headerContent?: ReactElement;
|
|
34
|
+
cardStyle?: CardStyle;
|
|
35
|
+
collapsed?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export const CardComponent = ({
|
|
39
|
+
title,
|
|
40
|
+
titleHeadingLevel,
|
|
41
|
+
description,
|
|
42
|
+
action,
|
|
43
|
+
wrapHeaderText = false,
|
|
44
|
+
headerContent,
|
|
45
|
+
cardStyle = "default",
|
|
46
|
+
collapsed = false,
|
|
47
|
+
children,
|
|
48
|
+
...rest
|
|
49
|
+
}: CardProps) => {
|
|
50
|
+
const headerPresent = Boolean(title || description || action || headerContent);
|
|
51
|
+
return (
|
|
52
|
+
<div className={classes["main"]} {...rest}>
|
|
53
|
+
{headerPresent && (
|
|
54
|
+
<div className={classes["header"]}>
|
|
55
|
+
{headerContent}
|
|
56
|
+
{(title || description || action) && (
|
|
57
|
+
<>
|
|
58
|
+
{(title || description) && (
|
|
59
|
+
<div className={classes["title-left"]}>
|
|
60
|
+
{title && (
|
|
61
|
+
<Typography
|
|
62
|
+
data-testid={"card-title"}
|
|
63
|
+
className={classes["title"]}
|
|
64
|
+
variant={"body"}
|
|
65
|
+
role={titleHeadingLevel ? "heading" : undefined}
|
|
66
|
+
aria-level={titleHeadingLevel}
|
|
67
|
+
>
|
|
68
|
+
{wrapHeaderText ? title : <TextEllipsis>{title}</TextEllipsis>}
|
|
69
|
+
</Typography>
|
|
70
|
+
)}
|
|
71
|
+
{description && (
|
|
72
|
+
<Typography
|
|
73
|
+
data-testid={"card-description"}
|
|
74
|
+
className={classes["description"]}
|
|
75
|
+
variant="sub-text"
|
|
76
|
+
spacing={{ margin: 0 }}
|
|
77
|
+
>
|
|
78
|
+
{wrapHeaderText ? description : <TextEllipsis>{description}</TextEllipsis>}
|
|
79
|
+
</Typography>
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
)}
|
|
83
|
+
{action && (
|
|
84
|
+
<div data-testid={"card-action"} className={classes["title-right"]}>
|
|
85
|
+
{action}
|
|
86
|
+
</div>
|
|
87
|
+
)}
|
|
88
|
+
</>
|
|
89
|
+
)}
|
|
90
|
+
</div>
|
|
91
|
+
)}
|
|
92
|
+
{!collapsed && (
|
|
93
|
+
<div
|
|
94
|
+
data-testid={"card-body"}
|
|
95
|
+
className={[
|
|
96
|
+
classes["body"],
|
|
97
|
+
classes[`${cardStyle}-body-style`],
|
|
98
|
+
classes[headerPresent ? "with-header" : "without-header"]
|
|
99
|
+
].join(" ")}
|
|
100
|
+
>
|
|
101
|
+
{children}
|
|
102
|
+
</div>
|
|
103
|
+
)}
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const Card = CardComponent;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
.link {
|
|
20
20
|
font-family: var(--font-family);
|
|
21
|
-
font-size: var(--font-size);
|
|
21
|
+
font-size: var(--link-font-size);
|
|
22
22
|
font-style: normal;
|
|
23
23
|
font-variant: normal;
|
|
24
24
|
line-height: var(--default-line-height);
|
|
@@ -34,50 +34,50 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&.primary {
|
|
37
|
-
color: var(--
|
|
37
|
+
color: var(--link-primary-default-color);
|
|
38
38
|
|
|
39
39
|
&:focus-visible {
|
|
40
|
-
outline: 0.5px dashed var(--
|
|
40
|
+
outline: 0.5px dashed var(--link-primary-default-color);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&:visited {
|
|
44
|
-
color: var(--
|
|
44
|
+
color: var(--link-primary-visited-color);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
&.success {
|
|
49
|
-
color: var(--
|
|
49
|
+
color: var(--link-success-default-color);
|
|
50
50
|
|
|
51
51
|
&:focus-visible {
|
|
52
|
-
outline: 0.5px dashed var(--color
|
|
52
|
+
outline: 0.5px dashed var(--link-success-default-color);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
&:visited {
|
|
56
|
-
color: var(--
|
|
56
|
+
color: var(--link-success-visited-color);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
&.danger {
|
|
61
|
-
color: var(--
|
|
61
|
+
color: var(--link-danger-default-color);
|
|
62
62
|
|
|
63
63
|
&:focus-visible {
|
|
64
|
-
outline: 0.5px dashed var(--color
|
|
64
|
+
outline: 0.5px dashed var(--link-danger-default-color);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
&:visited {
|
|
68
|
-
color: var(--
|
|
68
|
+
color: var(--link-danger-visited-color);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&.warning {
|
|
73
|
-
color: var(--
|
|
73
|
+
color: var(--link-warning-default-color);
|
|
74
74
|
|
|
75
75
|
&:focus-visible {
|
|
76
|
-
outline: 0.5px dashed var(--color
|
|
76
|
+
outline: 0.5px dashed var(--link-warning-default-color);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
&:visited {
|
|
80
|
-
color: var(--
|
|
80
|
+
color: var(--link-warning-visited-color);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -19,15 +19,16 @@
|
|
|
19
19
|
padding: 1.25rem 1.5rem 0;
|
|
20
20
|
border-top-left-radius: 8px;
|
|
21
21
|
border-top-right-radius: 8px;
|
|
22
|
-
}
|
|
23
22
|
|
|
24
|
-
.headline {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
23
|
+
.headline {
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: space-between;
|
|
29
27
|
|
|
30
|
-
.title {
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
.title {
|
|
29
|
+
flex: 1;
|
|
30
|
+
margin: 0;
|
|
31
|
+
color: var(--modal-title-color);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
33
34
|
}
|
|
@@ -19,33 +19,34 @@
|
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
justify-content: space-between;
|
|
22
|
-
}
|
|
23
22
|
|
|
24
|
-
.headline {
|
|
25
|
-
|
|
23
|
+
.headline {
|
|
24
|
+
display: flex;
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
&.with-caption {
|
|
27
|
+
align-items: flex-start;
|
|
28
|
+
}
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
30
|
+
&.no-caption {
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
35
33
|
|
|
36
|
-
.title {
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
.title {
|
|
35
|
+
margin: 0;
|
|
36
|
+
line-height: 1;
|
|
37
|
+
color: var(--modal-title-color);
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
&-icon > [data-icon] {
|
|
40
|
+
font-size: var(--font-size-big);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
42
43
|
}
|
|
43
|
-
}
|
|
44
44
|
|
|
45
|
-
.caption {
|
|
46
|
-
|
|
47
|
-
}
|
|
45
|
+
.caption {
|
|
46
|
+
color: var(--color-blue-grey500);
|
|
47
|
+
}
|
|
48
48
|
|
|
49
|
-
.close-button {
|
|
50
|
-
|
|
49
|
+
.close-button {
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
}
|
|
51
52
|
}
|