@laerdal/life-react-components 6.0.0-dev.2.full → 6.0.0-dev.5.full
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/Accordion/ContentAccordion.cjs +40 -11
- package/dist/Accordion/ContentAccordion.cjs.map +1 -1
- package/dist/Accordion/ContentAccordion.js +40 -11
- package/dist/Accordion/ContentAccordion.js.map +1 -1
- package/dist/Accordion/styles.cjs +51 -13
- package/dist/Accordion/styles.cjs.map +1 -1
- package/dist/Accordion/styles.js +51 -13
- package/dist/Accordion/styles.js.map +1 -1
- package/dist/Banners/Banner.cjs +38 -34
- package/dist/Banners/Banner.cjs.map +1 -1
- package/dist/Banners/Banner.d.ts +2 -3
- package/dist/Banners/Banner.js +38 -34
- package/dist/Banners/Banner.js.map +1 -1
- package/dist/Banners/styles.cjs +8 -16
- package/dist/Banners/styles.cjs.map +1 -1
- package/dist/Banners/styles.js +8 -16
- package/dist/Banners/styles.js.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.cjs +8 -2
- package/dist/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +8 -2
- package/dist/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/Breadcrumb/styles.cjs +15 -4
- package/dist/Breadcrumb/styles.cjs.map +1 -1
- package/dist/Breadcrumb/styles.js +15 -4
- package/dist/Breadcrumb/styles.js.map +1 -1
- package/dist/Button/BackButton.cjs +27 -6
- package/dist/Button/BackButton.cjs.map +1 -1
- package/dist/Button/BackButton.js +27 -6
- package/dist/Button/BackButton.js.map +1 -1
- package/dist/Button/Button.cjs +184 -47
- package/dist/Button/Button.cjs.map +1 -1
- package/dist/Button/Button.d.ts +2 -0
- package/dist/Button/Button.js +184 -47
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/Iconbutton.cjs +83 -21
- package/dist/Button/Iconbutton.cjs.map +1 -1
- package/dist/Button/Iconbutton.js +83 -21
- package/dist/Button/Iconbutton.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCard.cjs +20 -5
- package/dist/Card/HorizontalCard/HorizontalCard.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCard.js +20 -5
- package/dist/Card/HorizontalCard/HorizontalCard.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs +12 -3
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.js +12 -3
- package/dist/Card/HorizontalCard/HorizontalCardBody.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs +8 -2
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +8 -2
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js.map +1 -1
- package/dist/Card/VerticalCard/Card.cjs +20 -5
- package/dist/Card/VerticalCard/Card.cjs.map +1 -1
- package/dist/Card/VerticalCard/Card.js +20 -5
- package/dist/Card/VerticalCard/Card.js.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.cjs +28 -7
- package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.js +28 -7
- package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.cjs +19 -4
- package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.js +19 -4
- package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.cjs +9 -2
- package/dist/Card/VerticalCard/CardTopSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.js +9 -2
- package/dist/Card/VerticalCard/CardTopSection.js.map +1 -1
- package/dist/Chips/ChipStyles.cjs +4 -1
- package/dist/Chips/ChipStyles.cjs.map +1 -1
- package/dist/Chips/ChipStyles.js +4 -1
- package/dist/Chips/ChipStyles.js.map +1 -1
- package/dist/ChipsInput/ChipInputField.cjs +16 -4
- package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
- package/dist/ChipsInput/ChipInputField.js +16 -4
- package/dist/ChipsInput/ChipInputField.js.map +1 -1
- package/dist/Dropdown/BasicDropdown.cjs +12 -3
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +12 -3
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/CommonStyling.cjs +172 -42
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.js +172 -42
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +36 -10
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.js +36 -10
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +12 -3
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +12 -3
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs +4 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +4 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
- package/dist/GlobalNavigationBar/__tests__/GlobalNavigationBar.tests.d.ts +1 -0
- package/dist/GlobalNavigationBar/__tests__/Logo.tests.d.ts +1 -0
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +4 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.js +4 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +1 -1
- package/dist/HyperLink/styling.cjs +38 -8
- package/dist/HyperLink/styling.cjs.map +1 -1
- package/dist/HyperLink/styling.js +38 -8
- package/dist/HyperLink/styling.js.map +1 -1
- package/dist/InputFields/Checkbox.cjs +54 -14
- package/dist/InputFields/Checkbox.cjs.map +1 -1
- package/dist/InputFields/Checkbox.js +54 -14
- package/dist/InputFields/Checkbox.js.map +1 -1
- package/dist/InputFields/DatepickerField.cjs +148 -42
- package/dist/InputFields/DatepickerField.cjs.map +1 -1
- package/dist/InputFields/DatepickerField.js +149 -43
- package/dist/InputFields/DatepickerField.js.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.cjs +20 -5
- package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.js +20 -5
- package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
- package/dist/InputFields/Label.cjs +38 -11
- package/dist/InputFields/Label.cjs.map +1 -1
- package/dist/InputFields/Label.js +38 -11
- package/dist/InputFields/Label.js.map +1 -1
- package/dist/InputFields/NumberField.cjs +66 -16
- package/dist/InputFields/NumberField.cjs.map +1 -1
- package/dist/InputFields/NumberField.js +66 -16
- package/dist/InputFields/NumberField.js.map +1 -1
- package/dist/InputFields/PasswordField.cjs +4 -1
- package/dist/InputFields/PasswordField.cjs.map +1 -1
- package/dist/InputFields/PasswordField.d.ts +1 -1
- package/dist/InputFields/PasswordField.js +4 -1
- package/dist/InputFields/PasswordField.js.map +1 -1
- package/dist/InputFields/QuickSearch.cjs +30 -6
- package/dist/InputFields/QuickSearch.cjs.map +1 -1
- package/dist/InputFields/QuickSearch.js +30 -6
- package/dist/InputFields/QuickSearch.js.map +1 -1
- package/dist/InputFields/RadioButton.cjs +63 -15
- package/dist/InputFields/RadioButton.cjs.map +1 -1
- package/dist/InputFields/RadioButton.js +63 -15
- package/dist/InputFields/RadioButton.js.map +1 -1
- package/dist/InputFields/RichTextField.cjs +60 -15
- package/dist/InputFields/RichTextField.cjs.map +1 -1
- package/dist/InputFields/RichTextField.js +60 -15
- package/dist/InputFields/RichTextField.js.map +1 -1
- package/dist/InputFields/SearchBar.cjs +4 -1
- package/dist/InputFields/SearchBar.cjs.map +1 -1
- package/dist/InputFields/SearchBar.js +4 -1
- package/dist/InputFields/SearchBar.js.map +1 -1
- package/dist/InputFields/TextField.cjs +8 -2
- package/dist/InputFields/TextField.cjs.map +1 -1
- package/dist/InputFields/TextField.d.ts +1 -1
- package/dist/InputFields/TextField.js +8 -2
- package/dist/InputFields/TextField.js.map +1 -1
- package/dist/InputFields/Textarea.cjs +68 -17
- package/dist/InputFields/Textarea.cjs.map +1 -1
- package/dist/InputFields/Textarea.js +68 -17
- package/dist/InputFields/Textarea.js.map +1 -1
- package/dist/InputFields/components/SearchBarInput.cjs +28 -7
- package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
- package/dist/InputFields/components/SearchBarInput.js +28 -7
- package/dist/InputFields/components/SearchBarInput.js.map +1 -1
- package/dist/InputFields/components/SearchField.cjs +60 -15
- package/dist/InputFields/components/SearchField.cjs.map +1 -1
- package/dist/InputFields/components/SearchField.js +60 -15
- package/dist/InputFields/components/SearchField.js.map +1 -1
- package/dist/InputFields/styling.cjs +95 -39
- package/dist/InputFields/styling.cjs.map +1 -1
- package/dist/InputFields/styling.d.ts +1 -2
- package/dist/InputFields/styling.js +95 -39
- package/dist/InputFields/styling.js.map +1 -1
- package/dist/LinearProgress/LinearProgress.cjs +161 -53
- package/dist/LinearProgress/LinearProgress.cjs.map +1 -1
- package/dist/LinearProgress/LinearProgress.js +161 -53
- package/dist/LinearProgress/LinearProgress.js.map +1 -1
- package/dist/List/ListRow.cjs +36 -9
- package/dist/List/ListRow.cjs.map +1 -1
- package/dist/List/ListRow.js +36 -9
- package/dist/List/ListRow.js.map +1 -1
- package/dist/List/__tests__/ListRow.tests.d.ts +1 -0
- package/dist/LoadingIndicator/LoadingIndicator.cjs +4 -1
- package/dist/LoadingIndicator/LoadingIndicator.cjs.map +1 -1
- package/dist/LoadingIndicator/LoadingIndicator.js +4 -1
- package/dist/LoadingIndicator/LoadingIndicator.js.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.cjs +4 -1
- package/dist/LoadingPage/GlobalLoadingPage.cjs.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.js +4 -1
- package/dist/LoadingPage/GlobalLoadingPage.js.map +1 -1
- package/dist/MenuItem/MenuItem.cjs +101 -26
- package/dist/MenuItem/MenuItem.cjs.map +1 -1
- package/dist/MenuItem/MenuItem.js +101 -26
- package/dist/MenuItem/MenuItem.js.map +1 -1
- package/dist/Modals/Modal.cjs +4 -1
- package/dist/Modals/Modal.cjs.map +1 -1
- package/dist/Modals/Modal.js +4 -1
- package/dist/Modals/Modal.js.map +1 -1
- package/dist/Modals/ModalContent.cjs +24 -6
- package/dist/Modals/ModalContent.cjs.map +1 -1
- package/dist/Modals/ModalContent.js +24 -6
- package/dist/Modals/ModalContent.js.map +1 -1
- package/dist/Modals/ModalDialog.cjs +12 -3
- package/dist/Modals/ModalDialog.cjs.map +1 -1
- package/dist/Modals/ModalDialog.js +12 -3
- package/dist/Modals/ModalDialog.js.map +1 -1
- package/dist/Modals/ModalNote.cjs +16 -4
- package/dist/Modals/ModalNote.cjs.map +1 -1
- package/dist/Modals/ModalNote.js +16 -4
- package/dist/Modals/ModalNote.js.map +1 -1
- package/dist/Modals/ModalStyles.cjs +44 -11
- package/dist/Modals/ModalStyles.cjs.map +1 -1
- package/dist/Modals/ModalStyles.js +44 -11
- package/dist/Modals/ModalStyles.js.map +1 -1
- package/dist/NavItem/NavItem.cjs +4 -1
- package/dist/NavItem/NavItem.cjs.map +1 -1
- package/dist/NavItem/NavItem.js +4 -1
- package/dist/NavItem/NavItem.js.map +1 -1
- package/dist/NotificationDot/NotificationDot.cjs +17 -2
- package/dist/NotificationDot/NotificationDot.cjs.map +1 -1
- package/dist/NotificationDot/NotificationDot.js +17 -2
- package/dist/NotificationDot/NotificationDot.js.map +1 -1
- package/dist/Paginator/Paginator.cjs +76 -29
- package/dist/Paginator/Paginator.cjs.map +1 -1
- package/dist/Paginator/Paginator.js +76 -29
- package/dist/Paginator/Paginator.js.map +1 -1
- package/dist/Panel/Panel.cjs +4 -1
- package/dist/Panel/Panel.cjs.map +1 -1
- package/dist/Panel/Panel.js +4 -1
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Popover/Popover.cjs +22 -3
- package/dist/Popover/Popover.cjs.map +1 -1
- package/dist/Popover/Popover.js +22 -3
- package/dist/Popover/Popover.js.map +1 -1
- package/dist/ProfileButton/ProfileButton.cjs +9 -2
- package/dist/ProfileButton/ProfileButton.cjs.map +1 -1
- package/dist/ProfileButton/ProfileButton.js +9 -2
- package/dist/ProfileButton/ProfileButton.js.map +1 -1
- package/dist/SegmentControl/SegmentControl.cjs +46 -11
- package/dist/SegmentControl/SegmentControl.cjs.map +1 -1
- package/dist/SegmentControl/SegmentControl.js +46 -11
- package/dist/SegmentControl/SegmentControl.js.map +1 -1
- package/dist/SideMenu/SideMenuHeader.cjs +12 -3
- package/dist/SideMenu/SideMenuHeader.cjs.map +1 -1
- package/dist/SideMenu/SideMenuHeader.js +12 -3
- package/dist/SideMenu/SideMenuHeader.js.map +1 -1
- package/dist/Switcher/SwitcherMenuItem.cjs +4 -1
- package/dist/Switcher/SwitcherMenuItem.cjs.map +1 -1
- package/dist/Switcher/SwitcherMenuItem.js +4 -1
- package/dist/Switcher/SwitcherMenuItem.js.map +1 -1
- package/dist/Table/TableFooter.cjs +8 -2
- package/dist/Table/TableFooter.cjs.map +1 -1
- package/dist/Table/TableFooter.js +8 -2
- package/dist/Table/TableFooter.js.map +1 -1
- package/dist/Table/TableStyles.cjs +132 -33
- package/dist/Table/TableStyles.cjs.map +1 -1
- package/dist/Table/TableStyles.js +132 -33
- package/dist/Table/TableStyles.js.map +1 -1
- package/dist/Tabs/HorizontalTabs.cjs +68 -18
- package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
- package/dist/Tabs/HorizontalTabs.js +68 -18
- package/dist/Tabs/HorizontalTabs.js.map +1 -1
- package/dist/Tabs/TabLink.cjs +4 -1
- package/dist/Tabs/TabLink.cjs.map +1 -1
- package/dist/Tabs/TabLink.js +4 -1
- package/dist/Tabs/TabLink.js.map +1 -1
- package/dist/Tabs/__tests__/TabLink.tests.d.ts +1 -0
- package/dist/Tabs/__tests__/Tablist.tests.d.ts +2 -0
- package/dist/Tag/Tag.cjs +2 -2
- package/dist/Tag/Tag.cjs.map +1 -1
- package/dist/Tag/Tag.js +2 -2
- package/dist/Tag/Tag.js.map +1 -1
- package/dist/Tile/Tile.cjs +8 -2
- package/dist/Tile/Tile.cjs.map +1 -1
- package/dist/Tile/Tile.js +8 -2
- package/dist/Tile/Tile.js.map +1 -1
- package/dist/Tile/TileCommonItems.cjs +8 -2
- package/dist/Tile/TileCommonItems.cjs.map +1 -1
- package/dist/Tile/TileCommonItems.js +8 -2
- package/dist/Tile/TileCommonItems.js.map +1 -1
- package/dist/Tile/TileFooter.cjs +4 -1
- package/dist/Tile/TileFooter.cjs.map +1 -1
- package/dist/Tile/TileFooter.js +4 -1
- package/dist/Tile/TileFooter.js.map +1 -1
- package/dist/Tile/TileHeader.cjs +12 -3
- package/dist/Tile/TileHeader.cjs.map +1 -1
- package/dist/Tile/TileHeader.js +12 -3
- package/dist/Tile/TileHeader.js.map +1 -1
- package/dist/Toasters/Toast.cjs +62 -13
- package/dist/Toasters/Toast.cjs.map +1 -1
- package/dist/Toasters/Toast.js +62 -13
- package/dist/Toasters/Toast.js.map +1 -1
- package/dist/Toggles/ToggleButton.cjs +9 -3
- package/dist/Toggles/ToggleButton.cjs.map +1 -1
- package/dist/Toggles/ToggleButton.d.ts +1 -1
- package/dist/Toggles/ToggleButton.js +9 -3
- package/dist/Toggles/ToggleButton.js.map +1 -1
- package/dist/Toggles/TogglerStyles.cjs +22 -8
- package/dist/Toggles/TogglerStyles.cjs.map +1 -1
- package/dist/Toggles/TogglerStyles.js +22 -8
- package/dist/Toggles/TogglerStyles.js.map +1 -1
- package/dist/Tooltips/TooltipStyles.cjs +28 -6
- package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
- package/dist/Tooltips/TooltipStyles.js +28 -6
- package/dist/Tooltips/TooltipStyles.js.map +1 -1
- package/dist/common/InputStyling.cjs +30 -7
- package/dist/common/InputStyling.cjs.map +1 -1
- package/dist/common/InputStyling.js +30 -7
- package/dist/common/InputStyling.js.map +1 -1
- package/dist/common/Link.cjs +45 -0
- package/dist/common/Link.cjs.map +1 -0
- package/dist/common/Link.d.ts +9 -0
- package/dist/common/Link.js +37 -0
- package/dist/common/Link.js.map +1 -0
- package/dist/common/NavigationHelper.cjs +30 -0
- package/dist/common/NavigationHelper.cjs.map +1 -0
- package/dist/common/NavigationHelper.d.ts +4 -0
- package/dist/common/NavigationHelper.js +23 -0
- package/dist/common/NavigationHelper.js.map +1 -0
- package/dist/custom.d.ts +2 -0
- package/dist/styles/colors.cjs +440 -84
- package/dist/styles/colors.cjs.map +1 -1
- package/dist/styles/colors.d.ts +200 -11
- package/dist/styles/colors.js +440 -84
- package/dist/styles/colors.js.map +1 -1
- package/dist/styles/global.cjs +19 -2
- package/dist/styles/global.cjs.map +1 -1
- package/dist/styles/global.d.ts +3 -2
- package/dist/styles/global.js +18 -3
- package/dist/styles/global.js.map +1 -1
- package/dist/styles/index.cjs +16 -4
- package/dist/styles/index.cjs.map +1 -1
- package/dist/styles/index.js +16 -4
- package/dist/styles/index.js.map +1 -1
- package/dist/utils/color-tokens.cjs +91 -0
- package/dist/utils/color-tokens.cjs.map +1 -0
- package/dist/utils/color-tokens.d.ts +19 -0
- package/dist/utils/color-tokens.js +82 -0
- package/dist/utils/color-tokens.js.map +1 -0
- package/package.json +143 -141
|
@@ -42,7 +42,10 @@ export const CardMiddleSectionCategoryStyles = styled.div`
|
|
|
42
42
|
gap: 6px;
|
|
43
43
|
|
|
44
44
|
svg {
|
|
45
|
-
color: ${props => COLORS.
|
|
45
|
+
color: ${props => COLORS.generateToken({
|
|
46
|
+
componentType: 'text',
|
|
47
|
+
defaultVariant: 'subtle'
|
|
48
|
+
}, props.theme)};
|
|
46
49
|
flex-grow: 0;
|
|
47
50
|
flex-shrink: 0;
|
|
48
51
|
}
|
|
@@ -68,17 +71,29 @@ const CardMiddleSection = _ref => {
|
|
|
68
71
|
$bottomMargin: Boolean(categoryIcon || categoryLabel),
|
|
69
72
|
children: [categoryIcon, /*#__PURE__*/_jsx(ComponentS, {
|
|
70
73
|
textStyle: ComponentTextStyle.Bold,
|
|
71
|
-
color: COLORS.
|
|
74
|
+
color: COLORS.generateToken({
|
|
75
|
+
componentType: 'text',
|
|
76
|
+
defaultVariant: 'subtle'
|
|
77
|
+
}, theme),
|
|
72
78
|
children: categoryLabel
|
|
73
79
|
})]
|
|
74
80
|
}), /*#__PURE__*/_jsx(ComponentXL, {
|
|
75
81
|
className: "titleBlock",
|
|
76
82
|
textStyle: ComponentTextStyle.Bold,
|
|
77
|
-
color: disabled ? COLORS.
|
|
83
|
+
color: disabled ? COLORS.generateToken({
|
|
84
|
+
componentType: 'text',
|
|
85
|
+
defaultVariant: 'subtle'
|
|
86
|
+
}, theme) : COLORS.generateToken({
|
|
87
|
+
componentType: 'text',
|
|
88
|
+
defaultVariant: 'default'
|
|
89
|
+
}, theme),
|
|
78
90
|
children: title
|
|
79
91
|
}), description && /*#__PURE__*/_jsx(ComponentS, {
|
|
80
92
|
className: "descriptionBlock",
|
|
81
|
-
color: COLORS.
|
|
93
|
+
color: COLORS.generateToken({
|
|
94
|
+
componentType: 'text',
|
|
95
|
+
defaultVariant: 'subtle'
|
|
96
|
+
}, theme),
|
|
82
97
|
children: description
|
|
83
98
|
}), tags && /*#__PURE__*/_jsx(CardMiddleSectionTagsStyles, {
|
|
84
99
|
children: tags.map((x, index) => /*#__PURE__*/_jsx(Tag, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardMiddleSection.js","names":["React","styled","useTheme","COLORS","ComponentS","ComponentTextStyle","ComponentXL","Tag","jsx","_jsx","jsxs","_jsxs","CardMiddleSectionContainer","div","CardMiddleSectionColorBandStyles","props","$color","CardMiddleSectionTagsStyles","CardMiddleSectionCategoryStyles","
|
|
1
|
+
{"version":3,"file":"CardMiddleSection.js","names":["React","styled","useTheme","COLORS","ComponentS","ComponentTextStyle","ComponentXL","Tag","jsx","_jsx","jsxs","_jsxs","CardMiddleSectionContainer","div","CardMiddleSectionColorBandStyles","props","$color","CardMiddleSectionTagsStyles","CardMiddleSectionCategoryStyles","generateToken","componentType","defaultVariant","theme","CardMiddleSection","_ref","colorBandColor","categoryIcon","categoryLabel","title","description","tags","row2Tags","disabled","children","$extraTopMargin","Boolean","$bottomMargin","textStyle","Bold","color","className","map","x","index","label","variant","icon"],"sources":["../../../src/Card/VerticalCard/CardMiddleSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentS, ComponentTextStyle, ComponentXL, Tag, TagVariants } from '../../index';\r\nimport { ReactNode } from 'react';\r\n\r\nexport interface CardMiddleSectionProps {\r\n /** Color of the band to be shown on the top of middle section. */\r\n colorBandColor?: string;\r\n /** Icon to be shown on the left side of the categoryLabel. */\r\n categoryIcon?: React.ReactNode;\r\n /** Label to be shown at the top part of the middle section. */\r\n categoryLabel?: string;\r\n /** Main title of the Card component. */\r\n title: string;\r\n /** Description of the Card. */\r\n description?: string;\r\n /** Tags to be shown under the description. */\r\n tags?: CardTag[];\r\n /** Second row of tags if needed. */\r\n row2Tags?: CardTag[];\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport interface CardTag {\r\n label: string;\r\n variant?: TagVariants;\r\n icon?: ReactNode\r\n}\r\n\r\nexport const CardMiddleSectionContainer = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n width: calc(100% - 32px);\r\n position: relative;\r\n flex-direction: column;\r\n padding: 16px;\r\n gap: 8px;\r\n\r\n .descriptionBlock {\r\n padding: 2px 0;\r\n }\r\n\r\n .titleBlock {\r\n padding: 2px 0;\r\n }\r\n`;\r\n\r\nexport const CardMiddleSectionColorBandStyles = styled.div<{ $color: string }>`\r\n position: absolute;\r\n width: 100%;\r\n top: 0px;\r\n left: 0px;\r\n height: 8px;\r\n background-color: ${(props) => props.$color};\r\n`;\r\n\r\nexport const CardMiddleSectionTagsStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px 0;\r\n gap: 4px;\r\n flex-wrap: wrap;\r\n`;\r\n\r\nexport const CardMiddleSectionCategoryStyles = styled.div<{ $extraTopMargin: boolean; $bottomMargin: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n padding: none;\r\n gap: 6px;\r\n\r\n svg {\r\n color: ${props => COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme)};\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nconst CardMiddleSection: React.FunctionComponent<CardMiddleSectionProps> = ({\r\n colorBandColor,\r\n categoryIcon,\r\n categoryLabel,\r\n title,\r\n description,\r\n tags,\r\n row2Tags,\r\n disabled,\r\n}: CardMiddleSectionProps) => {\r\n const theme = useTheme();\r\n return (\r\n <CardMiddleSectionContainer data-testid={'card-middleSection'} >\r\n {colorBandColor && <CardMiddleSectionColorBandStyles $color={colorBandColor} />}\r\n {\r\n (categoryIcon || categoryLabel) &&\r\n <CardMiddleSectionCategoryStyles $extraTopMargin={Boolean(colorBandColor)} $bottomMargin={Boolean(categoryIcon || categoryLabel)}>\r\n {categoryIcon}\r\n <ComponentS textStyle={ComponentTextStyle.Bold} color={COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme)}>\r\n {categoryLabel}\r\n </ComponentS>\r\n </CardMiddleSectionCategoryStyles>\r\n }\r\n <ComponentXL className=\"titleBlock\" textStyle={ComponentTextStyle.Bold} color={disabled ? COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme) \r\n : COLORS.generateToken({componentType:'text',defaultVariant:'default'}, theme)}>\r\n {title}\r\n </ComponentXL>\r\n {description && (\r\n <ComponentS className=\"descriptionBlock\" color={COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme)}>\r\n {description}\r\n </ComponentS>\r\n )}\r\n {tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n {row2Tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {row2Tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n </CardMiddleSectionContainer>\r\n );\r\n};\r\n\r\nexport default CardMiddleSection;\r\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SAASC,MAAM,EAAEC,UAAU,EAAEC,kBAAkB,EAAEC,WAAW,EAAEC,GAAG,QAAqB,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA4BpG,OAAO,MAAMC,0BAA0B,GAAGX,MAAM,CAACY,GAAG;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,gCAAgC,GAAGb,MAAM,CAACY,GAAuB;AAC9E;AACA;AACA;AACA;AACA;AACA,sBAAuBE,KAAK,IAAKA,KAAK,CAACC,MAAM;AAC7C,CAAC;AAED,OAAO,MAAMC,2BAA2B,GAAGhB,MAAM,CAACY,GAAG;AACrD;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMK,+BAA+B,GAAGjB,MAAM,CAACY,GAAyD;AAC/G;AACA;AACA;AACA;AACA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,aAAa,CAAC;QAACC,aAAa,EAAC,MAAM;QAACC,cAAc,EAAC;MAAS,CAAC,EAAEC,KAAK,CAAE;MAAAW,QAAA,EAC9EL;IAAK,CACK,CAAC,EACbC,WAAW,iBACVpB,IAAA,CAACL,UAAU;MAACoC,SAAS,EAAC,kBAAkB;MAACD,KAAK,EAAEpC,MAAM,CAACgB,aAAa,CAAC;QAACC,aAAa,EAAC,MAAM;QAACC,cAAc,EAAC;MAAQ,CAAC,EAAEC,KAAK,CAAE;MAAAW,QAAA,EACzHJ;IAAW,CACF,CACb,EACAC,IAAI,iBACHrB,IAAA,CAACQ,2BAA2B;MAAAgB,QAAA,EACzBH,IAAI,CAACW,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,kBACjBlC,IAAA,CAACF,GAAG;QAA6BqC,KAAK,EAAEF,CAAC,CAACE,KAAM;QAACC,OAAO,EAAEH,CAAC,CAACG,OAAO,IAAI,SAAU;QAACC,IAAI,EAAEJ,CAAC,CAACI;MAAK,GAArF,GAAGJ,CAAC,CAACE,KAAK,IAAID,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B,EACAZ,QAAQ,iBACPtB,IAAA,CAACQ,2BAA2B;MAAAgB,QAAA,EACzBF,QAAQ,CAACU,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,kBACrBlC,IAAA,CAACF,GAAG;QAA6BqC,KAAK,EAAEF,CAAC,CAACE,KAAM;QAACC,OAAO,EAAEH,CAAC,CAACG,OAAO,IAAI,SAAU;QAACC,IAAI,EAAEJ,CAAC,CAACI;MAAK,GAArF,GAAGJ,CAAC,CAACE,KAAK,IAAID,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B;EAAA,CACyB,CAAC;AAEjC,CAAC;AAED,eAAepB,iBAAiB","ignoreList":[]}
|
|
@@ -124,9 +124,16 @@ const CardTopSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
124
124
|
}), (highlightRibbonIcon || highlightRibbonText) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardTopSectionRibbonContainer, {
|
|
125
125
|
"data-testid": 'card-topSection-ribbon',
|
|
126
126
|
$color: highlightRibbonContentColor ?? '',
|
|
127
|
-
$backgroundColor: disabled ? _index.COLORS.
|
|
127
|
+
$backgroundColor: disabled ? _index.COLORS.generateToken({
|
|
128
|
+
componentType: 'bg-fill',
|
|
129
|
+
state: 'disabled'
|
|
130
|
+
}, theme) : highlightRibbonBgColor ?? '',
|
|
128
131
|
children: [highlightRibbonIcon, highlightRibbonText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.ComponentS, {
|
|
129
|
-
color:
|
|
132
|
+
color: disabled ? _index.COLORS.generateToken({
|
|
133
|
+
componentType: 'text',
|
|
134
|
+
isOnFill: true,
|
|
135
|
+
state: 'disabled'
|
|
136
|
+
}, theme) : highlightRibbonContentColor ?? '',
|
|
130
137
|
textStyle: _typography.ComponentTextStyle.Regular,
|
|
131
138
|
children: highlightRibbonText
|
|
132
139
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardTopSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_typography","_Checkbox","_interopRequireDefault","_Tag","_index","_Image","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardTopSectionImageContainer","exports","styled","div","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","COLORS","getColor","theme","CardTopSection","forwardRef","_ref","ref","selected","setSelected","image","tagLabel","tagIcon","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","useTheme","jsxs","style","height","children","jsx","ImageWithFallbacks","fallbacks","fallbackSrc","src","alt","loader","width","select","Tag","label","variant","icon","ComponentS","color","textStyle","ComponentTextStyle","Regular","propTypes","_propTypes","bool","func","string","node","shape","isRequired","_default"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n const theme = useTheme();\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.getColor('neutral_300', theme) : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>\r\n {highlightRibbonText}\r\n </ComponentS>\r\n )}\r\n </CardTopSectionRibbonContainer>\r\n )}\r\n </CardTopSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardTopSection;\r\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAA+C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,C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|
+
{"version":3,"file":"CardTopSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_typography","_Checkbox","_interopRequireDefault","_Tag","_index","_Image","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardTopSectionImageContainer","exports","styled","div","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","COLORS","getColor","theme","CardTopSection","forwardRef","_ref","ref","selected","setSelected","image","tagLabel","tagIcon","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","useTheme","jsxs","style","height","children","jsx","ImageWithFallbacks","fallbacks","fallbackSrc","src","alt","loader","width","select","Tag","label","variant","icon","generateToken","componentType","state","ComponentS","color","isOnFill","textStyle","ComponentTextStyle","Regular","propTypes","_propTypes","bool","func","string","node","shape","isRequired","_default"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n const theme = useTheme();\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.generateToken({componentType:'bg-fill', state:'disabled'}, theme) : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={disabled ? COLORS.generateToken({componentType:'text', isOnFill: true, state:'disabled'}, theme) : highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>\r\n {highlightRibbonText}\r\n </ComponentS>\r\n )}\r\n </CardTopSectionRibbonContainer>\r\n )}\r\n </CardTopSectionContainer>\r\n );\r\n});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A0E,MAAA;EAERrC,OAAO,EAAAkC,UAAA,CAAAvE,OAAA,CAAA2E,IAAA;EAIPnC,mBAAmB,EAAA+B,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;EAEnBnC,mBAAmB,EAAAgC,UAAA,CAAAvE,OAAA,CAAA2E,IAAA;EAEnBlC,2BAA2B,EAAA8B,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;EAE3BhC,sBAAsB,EAAA6B,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;EAEtBvC,KAAK,EAAAoC,UAAA,CAAAvE,OAAA,CAAA4E,KAAA;IAAKxB,GAAG,EAAAmB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA,CAAAG,UAAA;IAAU1B,WAAW,EAAAoB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;IAAWrB,GAAG,EAAAkB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA,CAAAG,UAAA;IAAU/B,MAAM,EAAAyB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;IAAWnB,KAAK,EAAAgB,UAAA,CAAAvE,OAAA,CAAA0E,MAAA;IAAWpB,MAAM,EAAAiB,UAAA,CAAAvE,OAAA,CAAAwE;EAAA;EAEjGnD,QAAQ,EAAAkD,UAAA,CAAAvE,OAAA,CAAAwE;AAAA;AAAA,IAAAM,QAAA,GAAA/D,OAAA,CAAAf,OAAA,GAwHK6B,cAAc","ignoreList":[]}
|
|
@@ -115,9 +115,16 @@ const CardTopSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
115
115
|
}), (highlightRibbonIcon || highlightRibbonText) && /*#__PURE__*/_jsxs(CardTopSectionRibbonContainer, {
|
|
116
116
|
"data-testid": 'card-topSection-ribbon',
|
|
117
117
|
$color: highlightRibbonContentColor ?? '',
|
|
118
|
-
$backgroundColor: disabled ? COLORS.
|
|
118
|
+
$backgroundColor: disabled ? COLORS.generateToken({
|
|
119
|
+
componentType: 'bg-fill',
|
|
120
|
+
state: 'disabled'
|
|
121
|
+
}, theme) : highlightRibbonBgColor ?? '',
|
|
119
122
|
children: [highlightRibbonIcon, highlightRibbonText && /*#__PURE__*/_jsx(ComponentS, {
|
|
120
|
-
color:
|
|
123
|
+
color: disabled ? COLORS.generateToken({
|
|
124
|
+
componentType: 'text',
|
|
125
|
+
isOnFill: true,
|
|
126
|
+
state: 'disabled'
|
|
127
|
+
}, theme) : highlightRibbonContentColor ?? '',
|
|
121
128
|
textStyle: ComponentTextStyle.Regular,
|
|
122
129
|
children: highlightRibbonText
|
|
123
130
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardTopSection.js","names":["React","styled","useTheme","ComponentS","ComponentTextStyle","Checkbox","Tag","COLORS","ImageWithFallbacks","jsx","_jsx","jsxs","_jsxs","CardTopSectionImageContainer","div","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","getColor","theme","CardTopSection","forwardRef","_ref","ref","selected","setSelected","image","tagLabel","tagIcon","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","style","height","children","fallbacks","fallbackSrc","src","alt","loader","width","select","label","variant","icon","color","textStyle","Regular","propTypes","_pt","bool","func","string","node","shape","isRequired"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n const theme = useTheme();\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.getColor('neutral_300', theme) : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>\r\n {highlightRibbonText}\r\n </ComponentS>\r\n )}\r\n </CardTopSectionRibbonContainer>\r\n )}\r\n </CardTopSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardTopSection;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SAAQC,UAAU,EAAEC,kBAAkB,QAAO,yBAAyB;AACtE,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAAQC,GAAG,QAAoB,WAAW;AAE1C,SAAQC,MAAM,QAAO,aAAa;AAClC,SAAQC,kBAAkB,QAAO,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA2B/C,OAAO,MAAMC,4BAA4B,GAAGZ,MAAM,CAACa,GAAG;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGd,MAAM,CAACa,GAAG;AACpD;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAME,uBAAuB,GAAGf,MAAM,CAACa,GAA2B;AACzE;AACA;AACA;AACA;AACA,IAAIG,KAAK,IAAIA,KAAK,CAACC,QAAQ,GAAG;AAC9B;AACA;AACA,IAAI,GAAG,EAAE;AACT,CAAC;AAED,OAAO,MAAMC,6BAA6B,GAAGlB,MAAM,CAACa,GAAiD;AACrG;AACA,sBAAsBG,KAAK,IAAIA,KAAK,CAACG,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAaH,KAAK,IAAIA,KAAK,CAACI,MAAM;AAClC;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,+BAA+B,GAAGrB,MAAM,CAACa,GAAG;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwBG,KAAK,IAAIV,MAAM,CAACgB,QAAQ,CAAC,O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Aa,GAAA,CAAAG,MAAA;IAAWd,GAAG,EAAAW,GAAA,CAAAG,MAAA,CAAAG,UAAA;IAAUtB,MAAM,EAAAgB,GAAA,CAAAG,MAAA;IAAWZ,KAAK,EAAAS,GAAA,CAAAG,MAAA;IAAWb,MAAM,EAAAU,GAAA,CAAAC;EAAA;EAEjGvC,QAAQ,EAAAsC,GAAA,CAAAC;AAAA;AAwHV,eAAehC,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"CardTopSection.js","names":["React","styled","useTheme","ComponentS","ComponentTextStyle","Checkbox","Tag","COLORS","ImageWithFallbacks","jsx","_jsx","jsxs","_jsxs","CardTopSectionImageContainer","div","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","getColor","theme","CardTopSection","forwardRef","_ref","ref","selected","setSelected","image","tagLabel","tagIcon","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","style","height","children","fallbacks","fallbackSrc","src","alt","loader","width","select","label","variant","icon","generateToken","componentType","state","color","isOnFill","textStyle","Regular","propTypes","_pt","bool","func","string","node","shape","isRequired"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n const theme = useTheme();\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.generateToken({componentType:'bg-fill', state:'disabled'}, theme) : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={disabled ? COLORS.generateToken({componentType:'text', isOnFill: true, state:'disabled'}, theme) : highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>\r\n {highlightRibbonText}\r\n </ComponentS>\r\n )}\r\n </CardTopSectionRibbonContainer>\r\n )}\r\n </CardTopSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardTopSection;\r\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SAAQC,UAAU,EAAEC,kBAAkB,QAAO,yBAAyB;AACtE,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAAQC,GAAG,QAAoB,WAAW;AAE1C,SAAQC,MAAM,QAAO,aAAa;AAClC,SAAQC,kBAAkB,QAAO,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA2B/C,OAAO,MAAMC,4BAA4B,GAAGZ,MAAM,CAACa,GAAG;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,0BAA0B,GAAGd,MAAM,CAACa,GAAG;AACpD;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAME,uBAAuB,GAAGf,MAAM,CAACa,GAA2B;AACzE;AACA;AACA;AACA;AACA,IAAIG,KAAK,IAAIA,KAAK,CAACC,QAAQ,GAAG;AAC9B;AACA;AACA,IAAI,GAAG,EAAE;AACT,CAAC;AAED,OAAO,MAAMC,6BAA6B,GAAGlB,MAAM,CAACa,GAAiD;AACrG;AACA,sBAAsBG,KAAK,IAAIA,KAAK,CAACG,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAaH,KAAK,IAAIA,KAAK,CAACI,MAAM;AAClC;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,+BAA+B,GAAGrB,MAAM,CAACa,GAAG;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwBG,KAAK,IAAIV,MAAM,CAACgB,QAAQ,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A;EAEnB3B,2BAA2B,EAAAuB,GAAA,CAAAG,MAAA;EAE3BzB,sBAAsB,EAAAsB,GAAA,CAAAG,MAAA;EAEtBhC,KAAK,EAAA6B,GAAA,CAAAK,KAAA;IAAKrB,GAAG,EAAAgB,GAAA,CAAAG,MAAA,CAAAG,UAAA;IAAUvB,WAAW,EAAAiB,GAAA,CAAAG,MAAA;IAAWlB,GAAG,EAAAe,GAAA,CAAAG,MAAA,CAAAG,UAAA;IAAU1B,MAAM,EAAAoB,GAAA,CAAAG,MAAA;IAAWhB,KAAK,EAAAa,GAAA,CAAAG,MAAA;IAAWjB,MAAM,EAAAc,GAAA,CAAAC;EAAA;EAEjG3C,QAAQ,EAAA0C,GAAA,CAAAC;AAAA;AAwHV,eAAepC,cAAc","ignoreList":[]}
|
|
@@ -149,7 +149,10 @@ const ChipContainer = exports.ChipContainer = _styledComponents.default.div`
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
&.outline {
|
|
152
|
-
color: ${props => _styles.COLORS.
|
|
152
|
+
color: ${props => _styles.COLORS.generateToken({
|
|
153
|
+
componentType: 'text',
|
|
154
|
+
defaultVariant: 'subtle'
|
|
155
|
+
}, props.theme)};
|
|
153
156
|
|
|
154
157
|
${ChipContent} {
|
|
155
158
|
background-color: ${props => _styles.COLORS.getColor('white', props.theme)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipStyles.cjs","names":["_styledComponents","_interopRequireDefault","require","_styles","ChipContentContainer","exports","styled","div","ChipContent","ComponentXSStyling","ComponentTextStyle","Bold","ChipContainer","ComponentSStyling","ComponentMStyling","focusStyles","props","COLORS","getColor","theme"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${props => COLORS.getColor('white', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_500', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_200', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_300', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)} !important;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":";;;;;;;AAGA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAME,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAGE,yBAAM,CAACC,GAAG;AAC9C;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,WAAW,GAAAH,OAAA,CAAAG,WAAA,GAAGF,yBAAM,CAACC,GAAG;AACrC,IAAI,IAAAE,0BAAkB,EAACC,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,aAAa,GAAAP,OAAA,CAAAO,aAAA,GAAGN,yBAAM,CAACC,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW;AACjB;AACA;AACA;AACA,QAAQ,IAAAK,yBAAiB,EAACH,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMH,WAAW;AACjB;AACA;AACA;AACA,QAAQ,IAAAM,yBAAiB,EAACJ,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,mBAAW;AACjB;AACA;AACA;AACA,aAAaC,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,OAAO,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC3D;AACA,MAAMX,WAAW;AACjB,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,MAAMX,WAAW;AACjB,0B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C,cAAM,CAACC,QAAQ,CAAC,cAAc,EAAEF,KAAK,CAACG,KAAK,CAAC;AACpE;AACA;AACA;AACA,0BAA0BH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,cAAc,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC/E,eAAeH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,cAAc,EAAEF,KAAK,CAACG,KAAK,CAAC;AACpE;AACA;AACA;AACA;AACA,eAAeH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,MAAMf,oBAAoB;AAC1B;AACA;AACA;AACA,MAAMI,WAAW;AACjB;AACA,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E,eAAeH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AACnE;AACA;AACA,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ChipStyles.cjs","names":["_styledComponents","_interopRequireDefault","require","_styles","ChipContentContainer","exports","styled","div","ChipContent","ComponentXSStyling","ComponentTextStyle","Bold","ChipContainer","ComponentSStyling","ComponentMStyling","focusStyles","props","COLORS","getColor","theme","generateToken","componentType","defaultVariant"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${props => COLORS.getColor('white', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_500', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${props => COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_200', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_300', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)} !important;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":";;;;;;;AAGA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAME,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAGE,yBAAM,CAACC,GAAG;AAC9C;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,WAAW,GAAAH,OAAA,CAAAG,WAAA,GAAGF,yBAAM,CAACC,GAAG;AACrC,IAAI,IAAAE,0BAAkB,EAACC,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAEM,MAAMC,aAAa,GAAAP,OAAA,CAAAO,aAAA,GAAGN,yBAAM,CAACC,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW;AACjB;AACA;AACA;AACA,QAAQ,IAAAK,yBAAiB,EAACH,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMH,WAAW;AACjB;AACA;AACA;AACA,QAAQ,IAAAM,yBAAiB,EAACJ,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,mBAAW;AACjB;AACA;AACA;AACA,aAAaC,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,OAAO,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC3D;AACA,MAAMX,WAAW;AACjB,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,MAAMX,WAAW;AACjB,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,MAAMX,WAAW;AACjB,0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A,0BAA0BH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,cAAc,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC/E,eAAeH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,cAAc,EAAEF,KAAK,CAACG,KAAK,CAAC;AACpE;AACA;AACA;AACA;AACA,eAAeH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,MAAMf,oBAAoB;AAC1B;AACA;AACA;AACA,MAAMI,WAAW;AACjB;AACA,0BAA0BQ,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAC9E,eAAeH,KAAK,IAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AACnE;AACA;AACA,CAAC","ignoreList":[]}
|
package/dist/Chips/ChipStyles.js
CHANGED
|
@@ -141,7 +141,10 @@ export const ChipContainer = styled.div`
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
&.outline {
|
|
144
|
-
color: ${props => COLORS.
|
|
144
|
+
color: ${props => COLORS.generateToken({
|
|
145
|
+
componentType: 'text',
|
|
146
|
+
defaultVariant: 'subtle'
|
|
147
|
+
}, props.theme)};
|
|
145
148
|
|
|
146
149
|
${ChipContent} {
|
|
147
150
|
background-color: ${props => COLORS.getColor('white', props.theme)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipStyles.js","names":["styled","COLORS","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","focusStyles","ChipContentContainer","div","ChipContent","Bold","ChipContainer","props","getColor","theme"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${props => COLORS.getColor('white', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_500', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_200', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_300', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)} !important;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,mBAAmB;;AAEtC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,WAAW,QAAQ,WAAW;AAE7H,OAAO,MAAMC,oBAAoB,GAAGP,MAAM,CAACQ,GAAG;AAC9C;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,WAAW,GAAGT,MAAM,CAACQ,GAAG;AACrC,IAAIH,kBAAkB,CAACD,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,aAAa,GAAGX,MAAM,CAACQ,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW;AACjB;AACA;AACA;AACA,QAAQN,iBAAiB,CAACC,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMD,WAAW;AACjB;AACA;AACA;AACA,QAAQP,iBAAiB,CAACE,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMJ,WAAW;AACjB;AACA;AACA;AACA,aAAaM,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,OAAO,EAAED,KAAK,CAACE,KAAK,CAAC;AAC3D;AACA,MAAML,WAAW;AACjB,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E;AACA;AACA;AAC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Q,CAAC,cAAc,EAAED,KAAK,CAACE,KAAK,CAAC;AACpE;AACA;AACA;AACA,0BAA0BF,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,cAAc,EAAED,KAAK,CAACE,KAAK,CAAC;AAC/E,eAAeF,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,cAAc,EAAED,KAAK,CAACE,KAAK,CAAC;AACpE;AACA;AACA;AACA;AACA,eAAeF,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,MAAMP,oBAAoB;AAC1B;AACA;AACA;AACA,MAAME,WAAW;AACjB;AACA,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E,eAAeF,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AACnE;AACA;AACA,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ChipStyles.js","names":["styled","COLORS","ComponentMStyling","ComponentSStyling","ComponentTextStyle","ComponentXSStyling","focusStyles","ChipContentContainer","div","ChipContent","Bold","ChipContainer","props","getColor","theme","generateToken","componentType","defaultVariant"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${props => COLORS.getColor('white', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_500', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${props => COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_200', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_300', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)} !important;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,MAAM,MAAM,mBAAmB;;AAEtC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEC,kBAAkB,EAAEC,WAAW,QAAQ,WAAW;AAE7H,OAAO,MAAMC,oBAAoB,GAAGP,MAAM,CAACQ,GAAG;AAC9C;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,WAAW,GAAGT,MAAM,CAACQ,GAAG;AACrC,IAAIH,kBAAkB,CAACD,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,aAAa,GAAGX,MAAM,CAACQ,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW;AACjB;AACA;AACA;AACA,QAAQN,iBAAiB,CAACC,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMD,WAAW;AACjB;AACA;AACA;AACA,QAAQP,iBAAiB,CAACE,kBAAkB,CAACM,IAAI,EAAE,IAAI,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMJ,WAAW;AACjB;AACA;AACA;AACA,aAAaM,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,OAAO,EAAED,KAAK,CAACE,KAAK,CAAC;AAC3D;AACA,MAAML,WAAW;AACjB,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,MAAML,WAAW;AACjB,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E;AACA;AACA;AACA;AACA,MAAML,WAAW;AACjB,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E;AACA;AACA;AACA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EAAED,KAAK,CAACE,KAAK,CAAC;AACpE;AACA;AACA;AACA;AACA,eAAeF,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,MAAMP,oBAAoB;AAC1B;AACA;AACA;AACA,MAAME,WAAW;AACjB;AACA,0BAA0BG,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC9E,eAAeF,KAAK,IAAIX,MAAM,CAACY,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AACnE;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -77,7 +77,10 @@ const ChipInputEl = exports.ChipInputEl = _styledComponents.default.input`
|
|
|
77
77
|
color: ${props => _styles.COLORS.getColor('black', props.theme)} !important;
|
|
78
78
|
|
|
79
79
|
&::placeholder {
|
|
80
|
-
${props => (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.
|
|
80
|
+
${props => (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.generateToken({
|
|
81
|
+
componentType: 'text',
|
|
82
|
+
defaultVariant: 'subtle'
|
|
83
|
+
}, props.theme))}
|
|
81
84
|
}
|
|
82
85
|
`;
|
|
83
86
|
const ChipInputContainer = exports.ChipInputContainer = _styledComponents.default.div`
|
|
@@ -99,7 +102,10 @@ const ChipInputContainer = exports.ChipInputContainer = _styledComponents.defaul
|
|
|
99
102
|
min-height: 48px;
|
|
100
103
|
|
|
101
104
|
${ChipInputEl}::placeholder {
|
|
102
|
-
${props => (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.
|
|
105
|
+
${props => (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.generateToken({
|
|
106
|
+
componentType: 'text',
|
|
107
|
+
defaultVariant: 'subtle'
|
|
108
|
+
}, props.theme))}
|
|
103
109
|
}
|
|
104
110
|
}
|
|
105
111
|
|
|
@@ -108,7 +114,10 @@ const ChipInputContainer = exports.ChipInputContainer = _styledComponents.defaul
|
|
|
108
114
|
min-height: 56px;
|
|
109
115
|
|
|
110
116
|
${ChipInputEl}::placeholder {
|
|
111
|
-
${props => (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.
|
|
117
|
+
${props => (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.generateToken({
|
|
118
|
+
componentType: 'text',
|
|
119
|
+
defaultVariant: 'subtle'
|
|
120
|
+
}, props.theme))}
|
|
112
121
|
}
|
|
113
122
|
}
|
|
114
123
|
|
|
@@ -275,7 +284,10 @@ const ChipInputField = exports.ChipInputField = /*#__PURE__*/_react.default.forw
|
|
|
275
284
|
className: size,
|
|
276
285
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LoadingIndicator.LoadingIndicator, {
|
|
277
286
|
size: _types.Size.Small,
|
|
278
|
-
color: _styles.COLORS.
|
|
287
|
+
color: _styles.COLORS.generateToken({
|
|
288
|
+
componentType: 'icon',
|
|
289
|
+
defaultVariant: 'subtle'
|
|
290
|
+
}, theme)
|
|
279
291
|
})
|
|
280
292
|
})]
|
|
281
293
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipInputField.cjs","names":["_react","_interopRequireDefault","require","_types","_Chips","_InputFields","_styles","_styledComponents","_interopRequireWildcard","_LoadingIndicator","_common","_Button","_icons","_jsxRuntime","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","Wrapper","styled","div","Loading","ChipInputBoundItems","exports","ChipInputContentContainer","scrollBarStyling","Size","Small","ChipInputEl","input","ComponentMStyling","ComponentTextStyle","Regular","props","COLORS","getColor","theme","Italic","ChipInputContainer","ComponentSStyling","focusStyles","ChipInputField","React","forwardRef","_ref","ref","inputId","items","disabled","placeholder","altPlaceholder","multiLine","size","Medium","validationMessage","loading","onRemoveItem","onInputValueChange","onInputKeyDown","onActivationChange","inputValue","required","onBlur","rest","_objectWithoutProperties2","useTheme","containerRef","useRef","inputRef","useFocusVisibleRef","useImperativeHandle","current","useEffect","document","activeElement","scrollIntoView","block","inline","handleInputKeyDown","key","value","repeat","handleItemRemove","event","item","index","focus","focusVisible","detail","handleInputClear","handleContainerKeyDown","querySelectorAll","currentIndex","Array","from","indexOf","target","direction","cls","jsxs","children","jsx","onKeyDown","onClick","className","map","chip","InputChip","icon","variant","States","Default","text","label","onRemove","type","id","tabIndex","onChange","stopPropagation","IconButton","dataTestId","action","useTransparentBackground","shape","style","marginLeft","focusOnClick","SystemIcons","Clear","LoadingIndicator","color","ErrorMessage","TechnicalWarning","propTypes","_propTypes","string","isRequired","array","bool","func"],"sources":["../../src/ChipsInput/ChipInputField.tsx"],"sourcesContent":["import React from 'react';\r\nimport {ChipItem} from './ChipInputTypes';\r\nimport {Size, States} from '../types';\r\nimport {InputChip} from '../Chips';\r\nimport {ErrorMessage} from '../InputFields';\r\nimport {\r\n COLORS,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentTextStyle,\r\n focusStyles,\r\n scrollBarStyling\r\n} from '../styles';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {LoadingIndicator} from '../LoadingIndicator';\r\nimport {useFocusVisibleRef} from '../common';\r\nimport {IconButton} from '../Button';\r\nimport {SystemIcons} from '../icons';\r\n\r\nconst Wrapper = styled.div`\r\n position: relative;\r\n`;\r\n\r\nconst Loading = styled.div`\r\n height: 20px;\r\n width: 20px;\r\n`;\r\n\r\nexport const ChipInputBoundItems = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n flex: 1;\r\n min-width: 40px;\r\n`;\r\n\r\nexport const ChipInputContentContainer = styled.div`\r\n width: 100%;\r\n background: transparent;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n column-gap: 8px;\r\n margin-right: 6px;\r\n padding-right: 10px;\r\n padding-left: 16px;\r\n flex-wrap: nowrap;\r\n overflow-x: scroll;\r\n min-height: 48px;\r\n\r\n ${scrollBarStyling(Size.Small)}\r\n ::-webkit-scrollbar:horizontal {\r\n display: none;\r\n }\r\n\r\n .action-right:focus,\r\n button:focus {\r\n outline-offset: -4px !important;\r\n }\r\n`;\r\n\r\nexport const ChipInputEl = styled.input`\r\n border: none;\r\n outline: none;\r\n\r\n height: 40px;\r\n min-width: 40px;\r\n display: inline-flex;\r\n flex: 1;\r\n background: transparent;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Regular, null)}\r\n color: ${props => COLORS.getColor('black', props.theme)} !important;\r\n\r\n &::placeholder {\r\n ${props => ComponentMStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n`;\r\n\r\nexport const ChipInputContainer = styled.div`\r\n width: 100%;\r\n height: auto;\r\n border-radius: 4px;\r\n margin-bottom: 4px;\r\n box-shadow: inset 0 0 0 1px ${props => COLORS.getColor('neutral_400', props.theme)};\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n box-sizing: border-box;\r\n cursor: text;\r\n outline: none;\r\n display: flex;\r\n align-items: center;\r\n\r\n ${props => ComponentMStyling(ComponentTextStyle.Regular, COLORS.getColor('black', props.theme))}\r\n &.small {\r\n padding: 0;\r\n min-height: 48px;\r\n\r\n ${ChipInputEl}::placeholder {\r\n ${props => ComponentSStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.medium {\r\n padding: 4px 0;\r\n min-height: 56px;\r\n\r\n ${ChipInputEl}::placeholder {\r\n ${props => ComponentMStyling(ComponentTextStyle.Italic, COLORS.getColor('neutral_600', props.theme))}\r\n }\r\n }\r\n\r\n &.multiline.medium {\r\n ${ChipInputContentContainer} {\r\n max-height: calc(48px * 3);\r\n flex-wrap: wrap;\r\n overflow-y: auto;\r\n overflow-x: unset;\r\n }\r\n }\r\n\r\n &.focus-visible-within,\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &:hover {\r\n box-shadow: inset 0 0 0 2px ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n &:focus-within {\r\n box-shadow: inset 0 0 0 2px ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n &.invalid,\r\n &.invalid:hover,\r\n &.invalid:focus {\r\n box-shadow: inset 0 0 0 2px ${props => COLORS.getColor('critical_500', props.theme)};\r\n }\r\n\r\n &.disabled {\r\n ${ChipInputContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n cursor: not-allowed;\r\n box-shadow: inset 0 0 0 1px ${props => COLORS.getColor('neutral_100', props.theme)};\r\n outline: none;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n`;\r\n\r\nexport interface ChipInputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'id' | 'required' | 'tabIndex' | 'value' | 'onChange' | 'onKeyDown' | 'placeholder' | 'onClick' | 'disabled' | 'size'> {\r\n inputId: string;\r\n items: ChipItem[];\r\n disabled?: boolean;\r\n placeholder?: string;\r\n altPlaceholder?: string;\r\n multiLine?: boolean;\r\n size?: Size.Large | Size.Medium | Size.Small;\r\n loading?: boolean;\r\n required?: boolean;\r\n\r\n validationMessage?: string;\r\n\r\n onRemoveItem: (item: ChipItem, index: number) => void;\r\n inputValue: string;\r\n onInputValueChange: (value: string) => void;\r\n onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;\r\n onActivationChange?: (active: boolean) => void;\r\n}\r\n\r\nexport const ChipInputField = React.forwardRef<HTMLInputElement, ChipInputFieldProps>(\r\n (\r\n {\r\n inputId,\r\n items,\r\n disabled = false,\r\n placeholder,\r\n altPlaceholder,\r\n multiLine = true,\r\n size = Size.Medium,\r\n validationMessage,\r\n loading,\r\n onRemoveItem,\r\n onInputValueChange,\r\n onInputKeyDown,\r\n onActivationChange,\r\n inputValue,\r\n required,\r\n onBlur,\r\n ...rest\r\n },\r\n ref,\r\n ) => {\r\n const theme = useTheme();\r\n const containerRef = React.useRef<HTMLDivElement>(null);\r\n const inputRef = useFocusVisibleRef([containerRef]);\r\n \r\n React.useImperativeHandle(ref, () => inputRef.current, [inputRef])\r\n\r\n /**\r\n * Scroll container to last item on change\r\n * */\r\n React.useEffect(() => {\r\n if (inputRef.current && document.activeElement === inputRef.current) {\r\n inputRef.current.scrollIntoView({\r\n block: 'nearest',\r\n inline: 'nearest',\r\n });\r\n }\r\n }, [containerRef, inputRef, items]);\r\n\r\n /**\r\n * Remove last cheap on backspace\r\n * */\r\n const handleInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n if (e.key === 'Backspace' && !inputRef.current?.value && !e.repeat && items.length > 0) {\r\n onRemoveItem(items[items.length - 1], items.length - 1);\r\n } else {\r\n onInputKeyDown(e);\r\n }\r\n };\r\n\r\n const handleItemRemove = (event: any, item: ChipItem, index: number) => {\r\n onRemoveItem(item, index);\r\n inputRef.current?.focus({focusVisible: event.detail !== 1} as any);\r\n };\r\n\r\n const handleInputClear = (e: any) => {\r\n onInputValueChange('');\r\n inputRef.current?.focus({focusVisible: e?.detail !== 1} as any);\r\n };\r\n\r\n const handleContainerKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n if (!containerRef.current || (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight')) return;\r\n\r\n const items = containerRef.current.querySelectorAll('[tabindex=\"0\"]') as NodeListOf<HTMLElement>;\r\n const currentIndex = Array.from(items).indexOf(e.target as any);\r\n const direction = e.key === 'ArrowLeft' ? -1 : 1;\r\n const item = items[currentIndex + direction];\r\n item?.focus({focusVisible: true} as any);\r\n\r\n onActivationChange && onActivationChange(false);\r\n };\r\n\r\n const cls = `${multiLine ? 'multiline' : ''} ${validationMessage ? 'invalid' : ''} ${size} ${loading ? 'loading' : ''} ${disabled ? 'disabled' : ''}`;\r\n\r\n return (\r\n <Wrapper onBlur={onBlur}>\r\n <ChipInputContainer\r\n data-testid=\"chip-input-container\"\r\n ref={containerRef}\r\n onKeyDown={handleContainerKeyDown}\r\n onClick={() => !disabled && inputRef.current?.focus()}\r\n className={cls}>\r\n <ChipInputContentContainer>\r\n {items?.map((chip: ChipItem, index: number) => (\r\n <InputChip\r\n key={`chip_${index}`}\r\n icon={chip?.icon}\r\n size={size}\r\n disabled={chip.disabled || disabled}\r\n variant={chip.variant || States.Default}\r\n text={chip.label}\r\n onRemove={(e) => handleItemRemove(e, chip, index)}\r\n />\r\n ))}\r\n <ChipInputBoundItems>\r\n <ChipInputEl\r\n ref={inputRef}\r\n type=\"text\"\r\n id={inputId}\r\n required={required}\r\n tabIndex={disabled ? -1 : 0}\r\n value={inputValue}\r\n onChange={(e) => onInputValueChange(e.target.value)}\r\n onKeyDown={handleInputKeyDown}\r\n placeholder={items?.length === 0 ? placeholder : altPlaceholder || ''}\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n onActivationChange && onActivationChange(true);\r\n }}\r\n {...rest}\r\n />\r\n {inputValue && !disabled && (\r\n <IconButton\r\n id={`clear-btn-${inputId}`}\r\n dataTestId={`clear-btn-${inputId}`}\r\n action={handleInputClear}\r\n ref={(ref) => {\r\n ref?.scrollIntoView({\r\n block: 'nearest',\r\n inline: 'nearest',\r\n });\r\n }}\r\n useTransparentBackground={true}\r\n shape={'circular'}\r\n style={{marginLeft: '-8px'}}\r\n focusOnClick={true}\r\n variant={'secondary'}>\r\n <SystemIcons.Clear/>\r\n </IconButton>\r\n )}\r\n\r\n {loading && (\r\n <Loading className={size}>\r\n <LoadingIndicator size={Size.Small} color={COLORS.getColor('neutral_600', theme)}/>\r\n </Loading>\r\n )}\r\n </ChipInputBoundItems>\r\n </ChipInputContentContainer>\r\n </ChipInputContainer>\r\n {validationMessage && (\r\n <ErrorMessage>\r\n <SystemIcons.TechnicalWarning color={COLORS.getColor('critical_400', theme)}/>\r\n <span>{validationMessage}</span>\r\n </ErrorMessage>\r\n )}\r\n </Wrapper>\r\n );\r\n },\r\n);\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAQA,IAAAK,iBAAA,GAAAC,uBAAA,CAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAAqC,IAAAW,WAAA,GAAAX,OAAA;AAAA,MAAAY,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAA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,MAAA,CAAAC,UAAA;EACP1F,KAAK,EAAAwF,UAAA,CAAAlJ,OAAA,CAAAqJ,KAAA,CAAAD,UAAA;EACLzF,QAAQ,EAAAuF,UAAA,CAAAlJ,OAAA,CAAAsJ,IAAA;EACR1F,WAAW,EAAAsF,UAAA,CAAAlJ,OAAA,CAAAmJ,MAAA;EACXtF,cAAc,EAAAqF,UAAA,CAAAlJ,OAAA,CAAAmJ,MAAA;EACdrF,SAAS,EAAAoF,UAAA,CAAAlJ,OAAA,CAAAsJ,IAAA;EAETpF,OAAO,EAAAgF,UAAA,CAAAlJ,OAAA,CAAAsJ,IAAA;EACP9E,QAAQ,EAAA0E,UAAA,CAAAlJ,OAAA,CAAAsJ,IAAA;EAERrF,iBAAiB,EAAAiF,UAAA,CAAAlJ,OAAA,CAAAmJ,MAAA;EAEjBhF,YAAY,EAAA+E,UAAA,CAAAlJ,OAAA,CAAAuJ,IAAA,CAAAH,UAAA;EACZ7E,UAAU,EAAA2E,UAAA,CAAAlJ,OAAA,CAAAmJ,MAAA,CAAAC,UAAA;EACVhF,kBAAkB,EAAA8E,UAAA,CAAAlJ,OAAA,CAAAuJ,IAAA,CAAAH,UAAA;EAClB/E,cAAc,EAAA6E,UAAA,CAAAlJ,OAAA,CAAAuJ,IAAA,CAAAH,UAAA;EACd9E,kBAAkB,EAAA4E,UAAA,CAAAlJ,OAAA,CAAAuJ;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ChipInputField.cjs","names":["_react","_interopRequireDefault","require","_types","_Chips","_InputFields","_styles","_styledComponents","_interopRequireWildcard","_LoadingIndicator","_common","_Button","_icons","_jsxRuntime","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","Wrapper","styled","div","Loading","ChipInputBoundItems","exports","ChipInputContentContainer","scrollBarStyling","Size","Small","ChipInputEl","input","ComponentMStyling","ComponentTextStyle","Regular","props","COLORS","getColor","theme","Italic","generateToken","componentType","defaultVariant","ChipInputContainer","ComponentSStyling","focusStyles","ChipInputField","React","forwardRef","_ref","ref","inputId","items","disabled","placeholder","altPlaceholder","multiLine","size","Medium","validationMessage","loading","onRemoveItem","onInputValueChange","onInputKeyDown","onActivationChange","inputValue","required","onBlur","rest","_objectWithoutProperties2","useTheme","containerRef","useRef","inputRef","useFocusVisibleRef","useImperativeHandle","current","useEffect","document","activeElement","scrollIntoView","block","inline","handleInputKeyDown","key","value","repeat","handleItemRemove","event","item","index","focus","focusVisible","detail","handleInputClear","handleContainerKeyDown","querySelectorAll","currentIndex","Array","from","indexOf","target","direction","cls","jsxs","children","jsx","onKeyDown","onClick","className","map","chip","InputChip","icon","variant","States","Default","text","label","onRemove","type","id","tabIndex","onChange","stopPropagation","IconButton","dataTestId","action","useTransparentBackground","shape","style","marginLeft","focusOnClick","SystemIcons","Clear","LoadingIndicator","color","ErrorMessage","TechnicalWarning","propTypes","_propTypes","string","isRequired","array","bool","func"],"sources":["../../src/ChipsInput/ChipInputField.tsx"],"sourcesContent":["import React from 'react';\r\nimport {ChipItem} from './ChipInputTypes';\r\nimport {Size, States} from '../types';\r\nimport {InputChip} from '../Chips';\r\nimport {ErrorMessage} from '../InputFields';\r\nimport {\r\n COLORS,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentTextStyle,\r\n focusStyles,\r\n scrollBarStyling\r\n} from '../styles';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {LoadingIndicator} from '../LoadingIndicator';\r\nimport {useFocusVisibleRef} from '../common';\r\nimport {IconButton} from '../Button';\r\nimport {SystemIcons} from '../icons';\r\n\r\nconst Wrapper = styled.div`\r\n position: relative;\r\n`;\r\n\r\nconst Loading = styled.div`\r\n height: 20px;\r\n width: 20px;\r\n`;\r\n\r\nexport const ChipInputBoundItems = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n flex: 1;\r\n min-width: 40px;\r\n`;\r\n\r\nexport const ChipInputContentContainer = styled.div`\r\n width: 100%;\r\n background: transparent;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n column-gap: 8px;\r\n margin-right: 6px;\r\n padding-right: 10px;\r\n padding-left: 16px;\r\n flex-wrap: nowrap;\r\n overflow-x: scroll;\r\n min-height: 48px;\r\n\r\n ${scrollBarStyling(Size.Small)}\r\n ::-webkit-scrollbar:horizontal {\r\n display: none;\r\n }\r\n\r\n .action-right:focus,\r\n button:focus {\r\n outline-offset: -4px !important;\r\n }\r\n`;\r\n\r\nexport const ChipInputEl = styled.input`\r\n border: none;\r\n outline: none;\r\n\r\n height: 40px;\r\n min-width: 40px;\r\n display: inline-flex;\r\n flex: 1;\r\n background: transparent;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Regular, null)}\r\n color: ${props => COLORS.getColor('black', props.theme)} !important;\r\n\r\n &::placeholder {\r\n ${props => ComponentMStyling(ComponentTextStyle.Italic, COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme))}\r\n }\r\n`;\r\n\r\nexport const ChipInputContainer = styled.div`\r\n width: 100%;\r\n height: auto;\r\n border-radius: 4px;\r\n margin-bottom: 4px;\r\n box-shadow: inset 0 0 0 1px ${props => COLORS.getColor('neutral_400', props.theme)};\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n box-sizing: border-box;\r\n cursor: text;\r\n outline: none;\r\n display: flex;\r\n align-items: center;\r\n\r\n ${props => ComponentMStyling(ComponentTextStyle.Regular, COLORS.getColor('black', props.theme))}\r\n &.small {\r\n padding: 0;\r\n min-height: 48px;\r\n\r\n ${ChipInputEl}::placeholder {\r\n ${props => ComponentSStyling(ComponentTextStyle.Italic, COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme))}\r\n }\r\n }\r\n\r\n &.medium {\r\n padding: 4px 0;\r\n min-height: 56px;\r\n\r\n ${ChipInputEl}::placeholder {\r\n ${props => ComponentMStyling(ComponentTextStyle.Italic, COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme))}\r\n }\r\n }\r\n\r\n &.multiline.medium {\r\n ${ChipInputContentContainer} {\r\n max-height: calc(48px * 3);\r\n flex-wrap: wrap;\r\n overflow-y: auto;\r\n overflow-x: unset;\r\n }\r\n }\r\n\r\n &.focus-visible-within,\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &:hover {\r\n box-shadow: inset 0 0 0 2px ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n &:focus-within {\r\n box-shadow: inset 0 0 0 2px ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n &.invalid,\r\n &.invalid:hover,\r\n &.invalid:focus {\r\n box-shadow: inset 0 0 0 2px ${props => COLORS.getColor('critical_500', props.theme)};\r\n }\r\n\r\n &.disabled {\r\n ${ChipInputContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n cursor: not-allowed;\r\n box-shadow: inset 0 0 0 1px ${props => COLORS.getColor('neutral_100', props.theme)};\r\n outline: none;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n`;\r\n\r\nexport interface ChipInputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'id' | 'required' | 'tabIndex' | 'value' | 'onChange' | 'onKeyDown' | 'placeholder' | 'onClick' | 'disabled' | 'size'> {\r\n inputId: string;\r\n items: ChipItem[];\r\n disabled?: boolean;\r\n placeholder?: string;\r\n altPlaceholder?: string;\r\n multiLine?: boolean;\r\n size?: Size.Large | Size.Medium | Size.Small;\r\n loading?: boolean;\r\n required?: boolean;\r\n\r\n validationMessage?: string;\r\n\r\n onRemoveItem: (item: ChipItem, index: number) => void;\r\n inputValue: string;\r\n onInputValueChange: (value: string) => void;\r\n onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;\r\n onActivationChange?: (active: boolean) => void;\r\n}\r\n\r\nexport const ChipInputField = React.forwardRef<HTMLInputElement, ChipInputFieldProps>(\r\n (\r\n {\r\n inputId,\r\n items,\r\n disabled = false,\r\n placeholder,\r\n altPlaceholder,\r\n multiLine = true,\r\n size = Size.Medium,\r\n validationMessage,\r\n loading,\r\n onRemoveItem,\r\n onInputValueChange,\r\n onInputKeyDown,\r\n onActivationChange,\r\n inputValue,\r\n required,\r\n onBlur,\r\n ...rest\r\n },\r\n ref,\r\n ) => {\r\n const theme = useTheme();\r\n const containerRef = React.useRef<HTMLDivElement>(null);\r\n const inputRef = useFocusVisibleRef([containerRef]);\r\n \r\n React.useImperativeHandle(ref, () => inputRef.current, [inputRef])\r\n\r\n /**\r\n * Scroll container to last item on change\r\n * */\r\n React.useEffect(() => {\r\n if (inputRef.current && document.activeElement === inputRef.current) {\r\n inputRef.current.scrollIntoView({\r\n block: 'nearest',\r\n inline: 'nearest',\r\n });\r\n }\r\n }, [containerRef, inputRef, items]);\r\n\r\n /**\r\n * Remove last cheap on backspace\r\n * */\r\n const handleInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n if (e.key === 'Backspace' && !inputRef.current?.value && !e.repeat && items.length > 0) {\r\n onRemoveItem(items[items.length - 1], items.length - 1);\r\n } else {\r\n onInputKeyDown(e);\r\n }\r\n };\r\n\r\n const handleItemRemove = (event: any, item: ChipItem, index: number) => {\r\n onRemoveItem(item, index);\r\n inputRef.current?.focus({focusVisible: event.detail !== 1} as any);\r\n };\r\n\r\n const handleInputClear = (e: any) => {\r\n onInputValueChange('');\r\n inputRef.current?.focus({focusVisible: e?.detail !== 1} as any);\r\n };\r\n\r\n const handleContainerKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n if (!containerRef.current || (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight')) return;\r\n\r\n const items = containerRef.current.querySelectorAll('[tabindex=\"0\"]') as NodeListOf<HTMLElement>;\r\n const currentIndex = Array.from(items).indexOf(e.target as any);\r\n const direction = e.key === 'ArrowLeft' ? -1 : 1;\r\n const item = items[currentIndex + direction];\r\n item?.focus({focusVisible: true} as any);\r\n\r\n onActivationChange && onActivationChange(false);\r\n };\r\n\r\n const cls = `${multiLine ? 'multiline' : ''} ${validationMessage ? 'invalid' : ''} ${size} ${loading ? 'loading' : ''} ${disabled ? 'disabled' : ''}`;\r\n\r\n return (\r\n <Wrapper onBlur={onBlur}>\r\n <ChipInputContainer\r\n data-testid=\"chip-input-container\"\r\n ref={containerRef}\r\n onKeyDown={handleContainerKeyDown}\r\n onClick={() => !disabled && inputRef.current?.focus()}\r\n className={cls}>\r\n <ChipInputContentContainer>\r\n {items?.map((chip: ChipItem, index: number) => (\r\n <InputChip\r\n key={`chip_${index}`}\r\n icon={chip?.icon}\r\n size={size}\r\n disabled={chip.disabled || disabled}\r\n variant={chip.variant || States.Default}\r\n text={chip.label}\r\n onRemove={(e) => handleItemRemove(e, chip, index)}\r\n />\r\n ))}\r\n <ChipInputBoundItems>\r\n <ChipInputEl\r\n ref={inputRef}\r\n type=\"text\"\r\n id={inputId}\r\n required={required}\r\n tabIndex={disabled ? -1 : 0}\r\n value={inputValue}\r\n onChange={(e) => onInputValueChange(e.target.value)}\r\n onKeyDown={handleInputKeyDown}\r\n placeholder={items?.length === 0 ? placeholder : altPlaceholder || ''}\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n onActivationChange && onActivationChange(true);\r\n }}\r\n {...rest}\r\n />\r\n {inputValue && !disabled && (\r\n <IconButton\r\n id={`clear-btn-${inputId}`}\r\n dataTestId={`clear-btn-${inputId}`}\r\n action={handleInputClear}\r\n ref={(ref) => {\r\n ref?.scrollIntoView({\r\n block: 'nearest',\r\n inline: 'nearest',\r\n });\r\n }}\r\n useTransparentBackground={true}\r\n shape={'circular'}\r\n style={{marginLeft: '-8px'}}\r\n focusOnClick={true}\r\n variant={'secondary'}>\r\n <SystemIcons.Clear/>\r\n </IconButton>\r\n )}\r\n\r\n {loading && (\r\n <Loading className={size}>\r\n <LoadingIndicator size={Size.Small} color={COLORS.generateToken({componentType:'icon',defaultVariant:'subtle'}, theme)}/>\r\n </Loading>\r\n )}\r\n </ChipInputBoundItems>\r\n </ChipInputContentContainer>\r\n </ChipInputContainer>\r\n {validationMessage && (\r\n <ErrorMessage>\r\n <SystemIcons.TechnicalWarning color={COLORS.getColor('critical_400', theme)}/>\r\n <span>{validationMessage}</span>\r\n </ErrorMessage>\r\n )}\r\n </Wrapper>\r\n );\r\n },\r\n);\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAQA,IAAAK,iBAAA,GAAAC,uBAAA,CAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAAqC,IAAAW,WAAA,GAAAX,OAAA;AAAA,MAAAY,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAA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