@porsche-design-system/components-react 2.20.0 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +418 -3
- package/bin/patchRemixRunProcessBrowserGlobalIdentifier.js +58 -0
- package/esm/lib/components/accordion.wrapper.js +1 -1
- package/esm/lib/components/banner.wrapper.js +1 -1
- package/esm/lib/components/button-group.wrapper.js +1 -1
- package/esm/lib/components/button-pure.wrapper.js +3 -3
- package/esm/lib/components/button.wrapper.js +3 -3
- package/esm/lib/components/carousel.wrapper.js +1 -1
- package/esm/lib/components/checkbox-wrapper.wrapper.js +3 -3
- package/esm/lib/components/content-wrapper.wrapper.js +2 -1
- package/esm/lib/components/display.wrapper.js +22 -0
- package/esm/lib/components/divider.wrapper.js +1 -1
- package/esm/lib/components/fieldset-wrapper.wrapper.js +3 -3
- package/esm/lib/components/flex-item.wrapper.js +2 -1
- package/esm/lib/components/flex.wrapper.js +2 -1
- package/esm/lib/components/grid-item.wrapper.js +2 -1
- package/esm/lib/components/grid.wrapper.js +2 -1
- package/esm/lib/components/heading.wrapper.js +22 -0
- package/esm/lib/components/headline.wrapper.js +2 -1
- package/esm/lib/components/icon.wrapper.js +1 -1
- package/esm/lib/components/inline-notification.wrapper.js +1 -1
- package/esm/lib/components/link-pure.wrapper.js +3 -3
- package/esm/lib/components/link-social.wrapper.js +2 -1
- package/esm/lib/components/link-tile.wrapper.js +1 -1
- package/esm/lib/components/link.wrapper.js +1 -1
- package/esm/lib/components/marque.wrapper.js +1 -1
- package/esm/lib/components/modal.wrapper.js +1 -1
- package/esm/lib/components/pagination.wrapper.js +1 -1
- package/esm/lib/components/popover.wrapper.js +3 -3
- package/esm/lib/components/radio-button-wrapper.wrapper.js +3 -3
- package/esm/lib/components/scroller.wrapper.js +1 -1
- package/esm/lib/components/segmented-control-item.wrapper.js +1 -1
- package/esm/lib/components/segmented-control.wrapper.js +1 -1
- package/esm/lib/components/select-wrapper.wrapper.js +1 -1
- package/esm/lib/components/spinner.wrapper.js +1 -1
- package/esm/lib/components/stepper-horizontal-item.wrapper.js +1 -1
- package/esm/lib/components/stepper-horizontal.wrapper.js +1 -1
- package/esm/lib/components/switch.wrapper.js +3 -3
- package/esm/lib/components/table-body.wrapper.js +1 -1
- package/esm/lib/components/table-cell.wrapper.js +1 -1
- package/esm/lib/components/table-head-cell.wrapper.js +1 -1
- package/esm/lib/components/table-head-row.wrapper.js +1 -1
- package/esm/lib/components/table-head.wrapper.js +1 -1
- package/esm/lib/components/table-row.wrapper.js +1 -1
- package/esm/lib/components/table.wrapper.js +1 -1
- package/esm/lib/components/tabs-bar.wrapper.js +1 -1
- package/esm/lib/components/tabs-item.wrapper.js +1 -1
- package/esm/lib/components/tabs.wrapper.js +1 -1
- package/esm/lib/components/tag-dismissible.wrapper.js +3 -3
- package/esm/lib/components/tag.wrapper.js +1 -1
- package/esm/lib/components/text-field-wrapper.wrapper.js +3 -3
- package/esm/lib/components/text-list-item.wrapper.js +1 -1
- package/esm/lib/components/text-list.wrapper.js +1 -1
- package/esm/lib/components/text.wrapper.js +1 -1
- package/esm/lib/components/textarea-wrapper.wrapper.js +3 -3
- package/esm/lib/components/toast.wrapper.js +1 -1
- package/esm/public-api.js +2 -0
- package/{jsdom-polyfill.d.ts → jsdom-polyfill/index.d.ts} +0 -0
- package/lib/components/accordion.wrapper.d.ts +5 -5
- package/lib/components/accordion.wrapper.js +1 -1
- package/lib/components/banner.wrapper.js +1 -1
- package/lib/components/button-group.wrapper.js +1 -1
- package/lib/components/button-pure.wrapper.d.ts +9 -17
- package/lib/components/button-pure.wrapper.js +3 -3
- package/lib/components/button.wrapper.d.ts +9 -19
- package/lib/components/button.wrapper.js +3 -3
- package/lib/components/carousel.wrapper.js +1 -1
- package/lib/components/checkbox-wrapper.wrapper.d.ts +9 -1
- package/lib/components/checkbox-wrapper.wrapper.js +3 -3
- package/lib/components/content-wrapper.wrapper.d.ts +9 -4
- package/lib/components/content-wrapper.wrapper.js +2 -1
- package/lib/components/display.wrapper.d.ts +56 -0
- package/lib/components/display.wrapper.js +24 -0
- package/lib/components/divider.wrapper.js +1 -1
- package/lib/components/fieldset-wrapper.wrapper.d.ts +9 -1
- package/lib/components/fieldset-wrapper.wrapper.js +3 -3
- package/lib/components/flex-item.wrapper.d.ts +1 -0
- package/lib/components/flex-item.wrapper.js +2 -1
- package/lib/components/flex.wrapper.d.ts +1 -0
- package/lib/components/flex.wrapper.js +2 -1
- package/lib/components/grid-item.wrapper.d.ts +1 -0
- package/lib/components/grid-item.wrapper.js +2 -1
- package/lib/components/grid.wrapper.d.ts +5 -2
- package/lib/components/grid.wrapper.js +2 -1
- package/lib/components/heading.wrapper.d.ts +56 -0
- package/lib/components/heading.wrapper.js +24 -0
- package/lib/components/headline.wrapper.d.ts +8 -7
- package/lib/components/headline.wrapper.js +2 -1
- package/lib/components/icon.wrapper.d.ts +11 -9
- package/lib/components/icon.wrapper.js +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/inline-notification.wrapper.js +1 -1
- package/lib/components/link-pure.wrapper.d.ts +15 -5
- package/lib/components/link-pure.wrapper.js +3 -3
- package/lib/components/link-social.wrapper.d.ts +1 -0
- package/lib/components/link-social.wrapper.js +2 -1
- package/lib/components/link-tile.wrapper.js +1 -1
- package/lib/components/link.wrapper.d.ts +7 -7
- package/lib/components/link.wrapper.js +1 -1
- package/lib/components/marque.wrapper.js +1 -1
- package/lib/components/modal.wrapper.js +1 -1
- package/lib/components/pagination.wrapper.js +1 -1
- package/lib/components/popover.wrapper.d.ts +9 -1
- package/lib/components/popover.wrapper.js +3 -3
- package/lib/components/radio-button-wrapper.wrapper.d.ts +9 -1
- package/lib/components/radio-button-wrapper.wrapper.js +3 -3
- package/lib/components/scroller.wrapper.d.ts +3 -3
- package/lib/components/scroller.wrapper.js +1 -1
- package/lib/components/segmented-control-item.wrapper.js +1 -1
- package/lib/components/segmented-control.wrapper.d.ts +2 -2
- package/lib/components/segmented-control.wrapper.js +1 -1
- package/lib/components/select-wrapper.wrapper.js +1 -1
- package/lib/components/spinner.wrapper.d.ts +3 -3
- package/lib/components/spinner.wrapper.js +1 -1
- package/lib/components/stepper-horizontal-item.wrapper.js +1 -1
- package/lib/components/stepper-horizontal.wrapper.js +1 -1
- package/lib/components/switch.wrapper.d.ts +3 -13
- package/lib/components/switch.wrapper.js +3 -3
- package/lib/components/table-body.wrapper.js +1 -1
- package/lib/components/table-cell.wrapper.js +1 -1
- package/lib/components/table-head-cell.wrapper.js +1 -1
- package/lib/components/table-head-row.wrapper.js +1 -1
- package/lib/components/table-head.wrapper.js +1 -1
- package/lib/components/table-row.wrapper.js +1 -1
- package/lib/components/table.wrapper.js +1 -1
- package/lib/components/tabs-bar.wrapper.d.ts +3 -3
- package/lib/components/tabs-bar.wrapper.js +1 -1
- package/lib/components/tabs-item.wrapper.js +1 -1
- package/lib/components/tabs.wrapper.d.ts +3 -3
- package/lib/components/tabs.wrapper.js +1 -1
- package/lib/components/tag-dismissible.wrapper.d.ts +9 -1
- package/lib/components/tag-dismissible.wrapper.js +3 -3
- package/lib/components/tag.wrapper.js +1 -1
- package/lib/components/text-field-wrapper.wrapper.d.ts +9 -1
- package/lib/components/text-field-wrapper.wrapper.js +3 -3
- package/lib/components/text-list-item.wrapper.js +1 -1
- package/lib/components/text-list.wrapper.js +1 -1
- package/lib/components/text.wrapper.d.ts +2 -2
- package/lib/components/text.wrapper.js +1 -1
- package/lib/components/textarea-wrapper.wrapper.d.ts +9 -1
- package/lib/components/textarea-wrapper.wrapper.js +3 -3
- package/lib/components/toast.wrapper.js +1 -1
- package/lib/types.d.ts +293 -42
- package/package.json +6 -3
- package/{partials.d.ts → partials/index.d.ts} +0 -0
- package/partials/package.json +1 -0
- package/public-api.js +4 -0
- package/ssr/components/dist/styles/esm/styles-entry.js +1623 -1786
- package/ssr/components/dist/utils/esm/utils-entry.js +329 -272
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/button-group.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/button.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.js +38 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.js +3 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.js +38 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/marque.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control-item.wrapper.js +3 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal-item.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-body.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-cell.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-cell.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-row.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-head.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-row.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-item.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tag-dismissible.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tag.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-list-item.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +57 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +57 -6
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.js +59 -10
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +57 -17
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +55 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.js +20 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.js +1 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.js +1 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.js +20 -0
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.js +3 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.js +3 -7
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.js +56 -5
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.js +65 -14
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.js +59 -5
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.js +54 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.js +57 -9
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.js +61 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +56 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.js +59 -9
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +57 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.js +58 -6
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +56 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.js +0 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.js +57 -5
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.js +56 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +55 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.js +57 -8
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-cell.js +55 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.js +55 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +55 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +55 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.js +57 -5
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.js +56 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +63 -17
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.js +1 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.js +2 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/public-api.js +4 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +1605 -1770
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +316 -265
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-group.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.js +36 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.js +3 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.js +36 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/marque.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control-item.wrapper.js +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal-item.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-body.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-cell.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-cell.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-row.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-head.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table-row.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-item.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tag-dismissible.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tag.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-list-item.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +59 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +58 -7
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.js +60 -11
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +59 -19
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +57 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.js +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.js +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.js +18 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.js +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.js +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.js +18 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.js +6 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.js +6 -10
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.js +58 -7
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.js +67 -16
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.js +60 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.js +56 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.js +59 -11
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.js +61 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +56 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.js +59 -9
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +57 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.js +59 -7
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +56 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.js +1 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.js +57 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.js +56 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +55 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.js +58 -9
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-cell.js +55 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.js +55 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +55 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +55 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.js +58 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.js +59 -7
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +63 -17
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.js +2 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.js +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.js +2 -0
- package/ssr/lib/components/accordion.wrapper.d.ts +5 -5
- package/ssr/lib/components/button-pure.wrapper.d.ts +9 -17
- package/ssr/lib/components/button.wrapper.d.ts +9 -19
- package/ssr/lib/components/checkbox-wrapper.wrapper.d.ts +9 -1
- package/ssr/lib/components/content-wrapper.wrapper.d.ts +9 -4
- package/ssr/lib/components/display.wrapper.d.ts +56 -0
- package/ssr/lib/components/fieldset-wrapper.wrapper.d.ts +9 -1
- package/ssr/lib/components/flex-item.wrapper.d.ts +1 -0
- package/ssr/lib/components/flex.wrapper.d.ts +1 -0
- package/ssr/lib/components/grid-item.wrapper.d.ts +1 -0
- package/ssr/lib/components/grid.wrapper.d.ts +5 -2
- package/ssr/lib/components/heading.wrapper.d.ts +56 -0
- package/ssr/lib/components/headline.wrapper.d.ts +8 -7
- package/ssr/lib/components/icon.wrapper.d.ts +11 -9
- package/ssr/lib/components/index.d.ts +2 -0
- package/ssr/lib/components/link-pure.wrapper.d.ts +15 -5
- package/ssr/lib/components/link-social.wrapper.d.ts +1 -0
- package/ssr/lib/components/link.wrapper.d.ts +7 -7
- package/ssr/lib/components/popover.wrapper.d.ts +9 -1
- package/ssr/lib/components/radio-button-wrapper.wrapper.d.ts +9 -1
- package/ssr/lib/components/scroller.wrapper.d.ts +3 -3
- package/ssr/lib/components/segmented-control.wrapper.d.ts +2 -2
- package/ssr/lib/components/spinner.wrapper.d.ts +3 -3
- package/ssr/lib/components/switch.wrapper.d.ts +3 -13
- package/ssr/lib/components/tabs-bar.wrapper.d.ts +3 -3
- package/ssr/lib/components/tabs.wrapper.d.ts +3 -3
- package/ssr/lib/components/tag-dismissible.wrapper.d.ts +9 -1
- package/ssr/lib/components/text-field-wrapper.wrapper.d.ts +9 -1
- package/ssr/lib/components/text.wrapper.d.ts +2 -2
- package/ssr/lib/components/textarea-wrapper.wrapper.d.ts +9 -1
- package/ssr/lib/dsr-components/button.d.ts +0 -1
- package/ssr/lib/dsr-components/content-wrapper.d.ts +1 -0
- package/ssr/lib/dsr-components/display.d.ts +5 -0
- package/ssr/lib/dsr-components/flex-item.d.ts +1 -0
- package/ssr/lib/dsr-components/flex.d.ts +1 -0
- package/ssr/lib/dsr-components/grid-item.d.ts +2 -2
- package/ssr/lib/dsr-components/grid.d.ts +1 -0
- package/ssr/lib/dsr-components/heading.d.ts +5 -0
- package/ssr/lib/dsr-components/headline.d.ts +1 -0
- package/ssr/lib/dsr-components/icon.d.ts +0 -3
- package/ssr/lib/dsr-components/link-social.d.ts +1 -0
- package/ssr/lib/dsr-components/state-message.d.ts +1 -0
- package/ssr/lib/dsr-components/switch.d.ts +0 -1
- package/ssr/lib/dsr-components/textarea-wrapper.d.ts +0 -1
- package/ssr/lib/types.d.ts +293 -42
- package/styles/esm/index.js +1 -0
- package/styles/index.d.ts +1 -0
- package/styles/index.js +12 -0
- package/{utilities/js → styles}/package.json +1 -0
- package/styles/scss.scss +1 -0
- package/{testing.d.ts → testing/index.d.ts} +0 -0
- package/ssr/esm/icons/dist/module/index.js +0 -3
- package/ssr/icons/dist/module/index.js +0 -5
- package/utilities/js/esm/index.js +0 -1
- package/utilities/js/index.js +0 -12
- package/utilities/js.d.ts +0 -1
- package/utilities/scss.scss +0 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const isDisabledOrLoading = (disabled, loading) => {
|
|
4
|
+
return disabled || loading;
|
|
5
|
+
};
|
|
6
|
+
|
|
3
7
|
const hasWindow = typeof window !== 'undefined';
|
|
4
8
|
|
|
5
9
|
const attributeMutationMap = new Map();
|
|
@@ -35,344 +39,260 @@ const parseJSON = (prop) => {
|
|
|
35
39
|
}
|
|
36
40
|
};
|
|
37
41
|
|
|
38
|
-
const
|
|
39
|
-
xxs: '0px',
|
|
40
|
-
xs: '480px',
|
|
41
|
-
s: '760px',
|
|
42
|
-
m: '1000px',
|
|
43
|
-
l: '1300px',
|
|
44
|
-
xl: '1760px',
|
|
45
|
-
xxl: '1920px', // TODO: xxl missing in breakpoint customizable
|
|
46
|
-
};
|
|
42
|
+
const borderRadiusSmall = '4px';
|
|
47
43
|
|
|
48
|
-
const
|
|
49
|
-
facebook: '#1877f2',
|
|
50
|
-
google: '#4285f4',
|
|
51
|
-
instagram: '#e1306c',
|
|
52
|
-
kakaotalk: '#fae300',
|
|
53
|
-
linkedin: '#0077b5',
|
|
54
|
-
naver: '#03cf5d',
|
|
55
|
-
pinterest: '#e60023',
|
|
56
|
-
reddit: '#ff4500',
|
|
57
|
-
tiktok: '#fe2c55',
|
|
58
|
-
twitter: '#1da1f2',
|
|
59
|
-
wechat: '#1aad19',
|
|
60
|
-
whatsapp: '#25d366',
|
|
61
|
-
xing: '#006567',
|
|
62
|
-
youtube: '#ff0000',
|
|
63
|
-
};
|
|
44
|
+
const borderRadiusMedium = '8px';
|
|
64
45
|
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
outlineOffset: opts?.offset || '2px',
|
|
69
|
-
'&::-moz-focus-inner': {
|
|
70
|
-
border: '0', // fix for Firefox, avoid dotted outline in button on focus
|
|
71
|
-
},
|
|
72
|
-
'&:focus': {
|
|
73
|
-
outlineColor: opts?.color || 'currentColor',
|
|
74
|
-
// why? have a look at this article https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/
|
|
75
|
-
'&:not(:focus-visible)': {
|
|
76
|
-
outlineColor: 'transparent',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
};
|
|
46
|
+
const borderWidthBase = '2px';
|
|
47
|
+
|
|
48
|
+
const _dropShadowBackgroundColor = 'rgba(0, 0, 0, 0.16)';
|
|
81
49
|
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
WebkitTextSizeAdjust: 'none', // stop iOS safari from adjusting font size when screen rotation is changing
|
|
50
|
+
const dropShadowLowStyle = {
|
|
51
|
+
filter: `drop-shadow(0px 3px 8px ${_dropShadowBackgroundColor})`,
|
|
85
52
|
};
|
|
86
53
|
|
|
87
54
|
const fontFamily = "'Porsche Next','Arial Narrow',Arial,'Heiti SC',SimHei,sans-serif";
|
|
88
55
|
|
|
89
|
-
const
|
|
56
|
+
const fontHyphenationStyle = {
|
|
90
57
|
overflowWrap: 'break-word',
|
|
91
58
|
hyphens: 'auto',
|
|
92
59
|
};
|
|
93
60
|
|
|
94
|
-
const fontLineHeight = 'calc(6px + 2.125ex)';
|
|
61
|
+
const fontLineHeight = 'calc(6px + 2.125ex)';
|
|
95
62
|
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
xLarge: {
|
|
114
|
-
fontSize: '3.25rem',
|
|
115
|
-
lineHeight: fontLineHeight,
|
|
116
|
-
},
|
|
63
|
+
const fontSizeTextXSmall = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
|
|
64
|
+
|
|
65
|
+
const fontSizeTextSmall = '1rem';
|
|
66
|
+
|
|
67
|
+
const fontSizeTextMedium = 'clamp(1.13rem, 0.21vw + 1.08rem, 1.33rem)';
|
|
68
|
+
|
|
69
|
+
const fontSizeTextLarge = 'clamp(1.27rem, 0.51vw + 1.16rem, 1.78rem)';
|
|
70
|
+
|
|
71
|
+
const fontSizeTextXLarge = 'clamp(1.42rem, 0.94vw + 1.23rem, 2.37rem)';
|
|
72
|
+
|
|
73
|
+
const fontSizeText = {
|
|
74
|
+
xSmall: fontSizeTextXSmall,
|
|
75
|
+
small: fontSizeTextSmall,
|
|
76
|
+
medium: fontSizeTextMedium,
|
|
77
|
+
large: fontSizeTextLarge,
|
|
78
|
+
xLarge: fontSizeTextXLarge,
|
|
117
79
|
};
|
|
118
80
|
|
|
81
|
+
const fontSizeHeadingSmall = fontSizeTextSmall;
|
|
82
|
+
|
|
83
|
+
const fontSizeHeadingMedium = fontSizeTextMedium;
|
|
84
|
+
|
|
85
|
+
const fontSizeHeadingLarge = fontSizeTextLarge;
|
|
86
|
+
|
|
87
|
+
const fontSizeHeadingXLarge = fontSizeTextXLarge;
|
|
88
|
+
|
|
89
|
+
const fontSizeHeadingXXLarge = 'clamp(1.6rem, 1.56vw + 1.29rem, 3.16rem)';
|
|
90
|
+
|
|
91
|
+
const fontSizeHeadingXXXLarge = 'clamp(1.8rem, 2.41vw + 1.32rem, 4.21rem)';
|
|
92
|
+
|
|
93
|
+
const fontSizeDisplayMedium = 'clamp(2.03rem, 3.58vw + 1.31rem, 5.61rem)';
|
|
94
|
+
|
|
95
|
+
const fontSizeDisplayLarge = 'clamp(2.28rem, 5.2vw + 1.24rem, 7.48rem)';
|
|
96
|
+
|
|
97
|
+
const fontWeightRegular = 400;
|
|
98
|
+
|
|
99
|
+
const fontWeightSemiBold$1 = 600;
|
|
100
|
+
|
|
101
|
+
const fontWeightBold = 700;
|
|
102
|
+
|
|
119
103
|
const fontWeight = {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
bold: 700,
|
|
104
|
+
regular: fontWeightRegular,
|
|
105
|
+
semiBold: fontWeightSemiBold$1,
|
|
106
|
+
bold: fontWeightBold,
|
|
124
107
|
};
|
|
125
108
|
|
|
126
|
-
const
|
|
109
|
+
const fontStyleNormal = 'normal';
|
|
127
110
|
|
|
128
|
-
const
|
|
111
|
+
const fontStyleItalic = 'italic';
|
|
129
112
|
|
|
130
|
-
const
|
|
113
|
+
const fontVariant = 'normal';
|
|
131
114
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
xl: 'min(calc(43vw - 39.6rem), 12rem)',
|
|
115
|
+
const backdropFilter = 'blur(32px)';
|
|
116
|
+
const frostedGlassStyle = {
|
|
117
|
+
WebkitBackdropFilter: backdropFilter,
|
|
118
|
+
backdropFilter,
|
|
137
119
|
};
|
|
138
120
|
|
|
139
|
-
|
|
121
|
+
const breakpointBase = '0px';
|
|
122
|
+
|
|
123
|
+
const breakpointXS = '480px';
|
|
124
|
+
|
|
125
|
+
const breakpointS = '760px';
|
|
126
|
+
|
|
127
|
+
const breakpointM = '1000px';
|
|
128
|
+
|
|
129
|
+
const breakpointL = '1300px';
|
|
130
|
+
|
|
131
|
+
const breakpointXL = '1760px';
|
|
132
|
+
|
|
133
|
+
const breakpointXXL = '1920px';
|
|
134
|
+
|
|
140
135
|
const breakpoint = {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
function mediaQueryMinMax(min, max) {
|
|
153
|
-
return `${mediaQueryMin(min)} and (max-width:${breakpoint[max] - 1}px)`;
|
|
136
|
+
base: breakpointBase,
|
|
137
|
+
xs: breakpointXS,
|
|
138
|
+
s: breakpointS,
|
|
139
|
+
m: breakpointM,
|
|
140
|
+
l: breakpointL,
|
|
141
|
+
xl: breakpointXL,
|
|
142
|
+
xxl: breakpointXXL,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
function getMediaQueryMin(min) {
|
|
146
|
+
return `@media(min-width:${breakpoint[min]})`;
|
|
154
147
|
}
|
|
155
148
|
|
|
156
|
-
const
|
|
157
|
-
xSmall: '0.25rem',
|
|
158
|
-
small: '0.5rem',
|
|
159
|
-
medium: '1rem',
|
|
160
|
-
large: '2rem',
|
|
161
|
-
xLarge: '3rem',
|
|
162
|
-
xxLarge: '5rem',
|
|
163
|
-
};
|
|
149
|
+
const spacingFluidMedium = 'clamp(16px, 1.25vw + 12px, 36px)';
|
|
164
150
|
|
|
165
|
-
const
|
|
166
|
-
font: `${fontStyle} ${fontVariant} ${fontWeight.semiBold} 2rem/${fontLineHeight} ${fontFamily}`,
|
|
167
|
-
...fontBehavior,
|
|
168
|
-
[mediaQueryMinMax('s', 'm')]: {
|
|
169
|
-
fontSize: '2.625rem',
|
|
170
|
-
},
|
|
171
|
-
[mediaQueryMinMax('m', 'l')]: {
|
|
172
|
-
fontSize: '3.25rem',
|
|
173
|
-
},
|
|
174
|
-
[mediaQueryMinMax('l', 'xl')]: {
|
|
175
|
-
fontSize: '3.875rem',
|
|
176
|
-
},
|
|
177
|
-
[mediaQueryMin('xl')]: {
|
|
178
|
-
fontSize: '4.5rem',
|
|
179
|
-
},
|
|
180
|
-
};
|
|
151
|
+
const gridGap = spacingFluidMedium;
|
|
181
152
|
|
|
182
|
-
const
|
|
183
|
-
font: `${fontStyle} ${fontVariant} ${fontWeight.semiBold} 1.75rem/${fontLineHeight} ${fontFamily}`,
|
|
184
|
-
...fontBehavior,
|
|
185
|
-
[mediaQueryMinMax('s', 'm')]: {
|
|
186
|
-
fontSize: '2.25rem',
|
|
187
|
-
},
|
|
188
|
-
[mediaQueryMinMax('m', 'l')]: {
|
|
189
|
-
fontSize: '2.75rem',
|
|
190
|
-
},
|
|
191
|
-
[mediaQueryMinMax('l', 'xl')]: {
|
|
192
|
-
fontSize: '3.25rem',
|
|
193
|
-
},
|
|
194
|
-
[mediaQueryMin('xl')]: {
|
|
195
|
-
fontSize: '3.75rem',
|
|
196
|
-
},
|
|
197
|
-
};
|
|
153
|
+
const gridWidthMin = '320px';
|
|
198
154
|
|
|
199
|
-
const
|
|
200
|
-
font: `${fontStyle} ${fontVariant} ${fontWeight.semiBold} 1.5rem/${fontLineHeight} ${fontFamily}`,
|
|
201
|
-
...fontBehavior,
|
|
202
|
-
[mediaQueryMinMax('s', 'm')]: {
|
|
203
|
-
fontSize: '1.875rem',
|
|
204
|
-
},
|
|
205
|
-
[mediaQueryMinMax('m', 'l')]: {
|
|
206
|
-
fontSize: '2.25rem',
|
|
207
|
-
},
|
|
208
|
-
[mediaQueryMinMax('l', 'xl')]: {
|
|
209
|
-
fontSize: '2.625rem',
|
|
210
|
-
},
|
|
211
|
-
[mediaQueryMin('xl')]: {
|
|
212
|
-
fontSize: '3rem',
|
|
213
|
-
},
|
|
214
|
-
};
|
|
155
|
+
const gridWidthMax = '2560px';
|
|
215
156
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
[mediaQueryMinMax('s', 'm')]: {
|
|
220
|
-
fontSize: '1.5rem',
|
|
221
|
-
},
|
|
222
|
-
[mediaQueryMinMax('m', 'l')]: {
|
|
223
|
-
fontSize: '1.75rem',
|
|
224
|
-
},
|
|
225
|
-
[mediaQueryMinMax('l', 'xl')]: {
|
|
226
|
-
fontSize: '2rem',
|
|
227
|
-
},
|
|
228
|
-
[mediaQueryMin('xl')]: {
|
|
229
|
-
fontSize: '2.25rem',
|
|
230
|
-
},
|
|
231
|
-
};
|
|
157
|
+
// fluid sizing calculated by https://fluidtypography.com/#app-get-started
|
|
158
|
+
// gridSafeZoneBase: Viewport Width Range = 320 - 1920px / Size Range = 22 - 192px
|
|
159
|
+
const gridSafeZoneBase = 'clamp(22px, 10.625vw - 12px, 192px)';
|
|
232
160
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
161
|
+
// fluid sizing calculated by https://fluidtypography.com/#app-get-started
|
|
162
|
+
// gridSafeZoneXXL: Viewport Width Range = 1920 - 2560px / Size Range = 192 - 512px
|
|
163
|
+
const gridSafeZoneXXL = 'clamp(192px, 50vw - 768px, 512px)';
|
|
164
|
+
|
|
165
|
+
const gridFullColumnStart = 'full-start';
|
|
166
|
+
|
|
167
|
+
const gridExtendedColumnStart = 'extended-start';
|
|
168
|
+
|
|
169
|
+
const gridBasicColumnStart = 'basic-start';
|
|
170
|
+
|
|
171
|
+
const gridNarrowColumnStart = 'narrow-start';
|
|
172
|
+
|
|
173
|
+
const gridNarrowColumnEnd = 'narrow-end';
|
|
174
|
+
|
|
175
|
+
const gridBasicColumnEnd = 'basic-end';
|
|
176
|
+
|
|
177
|
+
const gridExtendedColumnEnd = 'extended-end';
|
|
178
|
+
|
|
179
|
+
const gridFullColumnEnd = 'full-end';
|
|
180
|
+
|
|
181
|
+
const _cssVariableGridExtendedSpanOneHalf = '--pds-grid-extended-span-one-half';
|
|
182
|
+
const _cssVariableGridBasicSpanOneHalf = '--pds-grid-basic-span-one-half';
|
|
183
|
+
const _cssVariableGridBasicSpanOneThird = '--pds-grid-basic-span-one-third';
|
|
184
|
+
const _cssVariableGridBasicSpanTwoThirds = '--pds-grid-basic-span-two-thirds';
|
|
185
|
+
const _cssVariableGridNarrowSpanOneHalf = '--pds-grid-narrow-span-one-half';
|
|
186
|
+
const _cssVariableGridSafeZone = '--pds-internal-grid-safe-zone';
|
|
187
|
+
|
|
188
|
+
const outerColumn = `minmax(0, calc(var(${_cssVariableGridSafeZone}) - ${gridGap}))`;
|
|
189
|
+
const column = 'minmax(0, 1fr)';
|
|
190
|
+
const getColumns = (repeat) => (repeat > 1 ? `repeat(${repeat}, ${column})` : column);
|
|
191
|
+
const getColumnSpan = (span) => `span ${span}`;
|
|
192
|
+
const getGridTemplateColumns = (layout) => layout === 'mobile'
|
|
193
|
+
? `[${gridFullColumnStart}] ${outerColumn} [${gridExtendedColumnStart} ${gridBasicColumnStart} ${gridNarrowColumnStart}] ${getColumns(6)} [${gridNarrowColumnEnd} ${gridBasicColumnEnd} ${gridExtendedColumnEnd}] ${outerColumn} [${gridFullColumnEnd}]`
|
|
194
|
+
: `[${gridFullColumnStart}] ${outerColumn} [${gridExtendedColumnStart}] ${getColumns(1)} [${gridBasicColumnStart}] ${getColumns(2)} [${gridNarrowColumnStart}] ${getColumns(8)} [${gridNarrowColumnEnd}] ${getColumns(2)} [${gridBasicColumnEnd}] ${getColumns(1)} [${gridExtendedColumnEnd}] ${outerColumn} [${gridFullColumnEnd}]`;
|
|
195
|
+
({
|
|
196
|
+
[_cssVariableGridSafeZone]: gridSafeZoneBase,
|
|
197
|
+
[_cssVariableGridExtendedSpanOneHalf]: getColumnSpan(3),
|
|
198
|
+
[_cssVariableGridBasicSpanOneHalf]: getColumnSpan(3),
|
|
199
|
+
[_cssVariableGridBasicSpanOneThird]: getColumnSpan(2),
|
|
200
|
+
[_cssVariableGridBasicSpanTwoThirds]: getColumnSpan(4),
|
|
201
|
+
[_cssVariableGridNarrowSpanOneHalf]: getColumnSpan(3),
|
|
202
|
+
display: 'grid',
|
|
203
|
+
gridGap,
|
|
204
|
+
gridTemplateColumns: getGridTemplateColumns('mobile'),
|
|
205
|
+
minWidth: gridWidthMin,
|
|
206
|
+
maxWidth: gridWidthMax,
|
|
207
|
+
margin: 0,
|
|
208
|
+
padding: `0 calc(50% - ${gridWidthMax} / 2)`,
|
|
209
|
+
boxSizing: 'content-box',
|
|
210
|
+
[getMediaQueryMin('s')]: {
|
|
211
|
+
[_cssVariableGridExtendedSpanOneHalf]: getColumnSpan(7),
|
|
212
|
+
[_cssVariableGridBasicSpanOneHalf]: getColumnSpan(6),
|
|
213
|
+
[_cssVariableGridBasicSpanOneThird]: getColumnSpan(4),
|
|
214
|
+
[_cssVariableGridBasicSpanTwoThirds]: getColumnSpan(8),
|
|
215
|
+
[_cssVariableGridNarrowSpanOneHalf]: getColumnSpan(4),
|
|
216
|
+
gridTemplateColumns: getGridTemplateColumns('desktop'),
|
|
244
217
|
},
|
|
245
|
-
[
|
|
246
|
-
|
|
218
|
+
[getMediaQueryMin('xxl')]: {
|
|
219
|
+
[_cssVariableGridSafeZone]: gridSafeZoneXXL,
|
|
247
220
|
},
|
|
248
|
-
};
|
|
221
|
+
});
|
|
249
222
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
223
|
+
function getMediaQueryMax(max) {
|
|
224
|
+
return `@media(max-width:${breakpoint[max].slice(0, -2) - 1}px)`;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function getMediaQueryMinMax(min, max) {
|
|
228
|
+
return `@media(min-width:${breakpoint[min]}) and (max-width:${breakpoint[max].slice(0, -2) - 1}px)`;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const spacingStaticXSmall = '4px';
|
|
232
|
+
|
|
233
|
+
const spacingStaticSmall = '8px';
|
|
234
|
+
|
|
235
|
+
const spacingStaticMedium = '16px';
|
|
236
|
+
|
|
237
|
+
const spacingStaticLarge = '32px';
|
|
238
|
+
|
|
239
|
+
const spacingFluidXSmall = 'clamp(4px, 0.25vw + 3px, 8px)';
|
|
240
|
+
|
|
241
|
+
const themeDarkBackgroundShading = 'rgba(1, 2, 5, 0.67)';
|
|
242
|
+
|
|
243
|
+
const _displayFontPartA = `${fontStyleItalic} ${fontVariant} ${fontWeightSemiBold$1} `;
|
|
244
|
+
const _displayFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
254
245
|
|
|
255
|
-
const
|
|
256
|
-
font: `${
|
|
257
|
-
...fontBehavior,
|
|
258
|
-
...fontHyphenation,
|
|
246
|
+
const displayMediumStyle = {
|
|
247
|
+
font: `${_displayFontPartA}${fontSizeDisplayMedium}${_displayFontPartB}`,
|
|
259
248
|
};
|
|
260
249
|
|
|
261
|
-
const
|
|
262
|
-
font: `${
|
|
263
|
-
...fontBehavior,
|
|
264
|
-
...fontHyphenation,
|
|
250
|
+
const displayLargeStyle = {
|
|
251
|
+
font: `${_displayFontPartA}${fontSizeDisplayLarge}${_displayFontPartB}`,
|
|
265
252
|
};
|
|
266
253
|
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
254
|
+
const _headingFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightSemiBold$1} `;
|
|
255
|
+
const _headingFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
256
|
+
|
|
257
|
+
const headingSmallStyle = {
|
|
258
|
+
font: `${_headingFontPartA}${fontSizeHeadingSmall}${_headingFontPartB}`,
|
|
271
259
|
};
|
|
272
260
|
|
|
273
|
-
const
|
|
274
|
-
font: `${
|
|
275
|
-
...fontBehavior,
|
|
276
|
-
...fontHyphenation,
|
|
261
|
+
const headingMediumStyle = {
|
|
262
|
+
font: `${_headingFontPartA}${fontSizeHeadingMedium}${_headingFontPartB}`,
|
|
277
263
|
};
|
|
278
264
|
|
|
279
|
-
const
|
|
280
|
-
font: `${
|
|
281
|
-
...fontBehavior,
|
|
282
|
-
...fontHyphenation,
|
|
265
|
+
const headingLargeStyle = {
|
|
266
|
+
font: `${_headingFontPartA}${fontSizeHeadingLarge}${_headingFontPartB}`,
|
|
283
267
|
};
|
|
284
268
|
|
|
285
|
-
const
|
|
286
|
-
|
|
287
|
-
base: '#000',
|
|
288
|
-
background: {
|
|
289
|
-
base: '#fff',
|
|
290
|
-
surface: '#f2f2f2',
|
|
291
|
-
shading: 'rgba(14, 20, 24, 0.9)',
|
|
292
|
-
},
|
|
293
|
-
contrast: {
|
|
294
|
-
high: '#323639',
|
|
295
|
-
medium: '#626669',
|
|
296
|
-
low: '#e3e4e5',
|
|
297
|
-
},
|
|
298
|
-
notification: {
|
|
299
|
-
success: '#018a16',
|
|
300
|
-
successSoft: '#e5f3e7',
|
|
301
|
-
warning: '#ff9b00',
|
|
302
|
-
warningSoft: '#fff5e5',
|
|
303
|
-
error: '#e00000',
|
|
304
|
-
errorSoft: '#fae6e6',
|
|
305
|
-
neutral: '#0061bd',
|
|
306
|
-
neutralSoft: '#e5eff8',
|
|
307
|
-
},
|
|
308
|
-
state: {
|
|
309
|
-
hover: '#d5001c',
|
|
310
|
-
active: '#d5001c',
|
|
311
|
-
focus: 'currentColor',
|
|
312
|
-
disabled: '#96989a',
|
|
313
|
-
},
|
|
269
|
+
const headingXXLargeStyle = {
|
|
270
|
+
font: `${_headingFontPartA}${fontSizeHeadingXXLarge}${_headingFontPartB}`,
|
|
314
271
|
};
|
|
315
272
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
brand: '#00b0f4',
|
|
319
|
-
state: {
|
|
320
|
-
...themeLight$1.state,
|
|
321
|
-
hover: '#00b0f4',
|
|
322
|
-
active: '#00b0f4',
|
|
323
|
-
},
|
|
324
|
-
});
|
|
273
|
+
const _textFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
274
|
+
const _textFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
325
275
|
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
background: {
|
|
330
|
-
base: '#0e1418',
|
|
331
|
-
surface: '#262b2e',
|
|
332
|
-
shading: 'rgba(14, 20, 24, 0.9)',
|
|
333
|
-
},
|
|
334
|
-
contrast: {
|
|
335
|
-
high: '#e3e4e5',
|
|
336
|
-
medium: '#b0b1b2',
|
|
337
|
-
low: '#4a4e51',
|
|
338
|
-
},
|
|
339
|
-
notification: {
|
|
340
|
-
success: '#01ba1d',
|
|
341
|
-
successSoft: '#bfeec6',
|
|
342
|
-
warning: '#ff9b00',
|
|
343
|
-
warningSoft: '#ffe6bf',
|
|
344
|
-
error: '#fc1717',
|
|
345
|
-
errorSoft: '#fec5c5',
|
|
346
|
-
neutral: '#2193ff',
|
|
347
|
-
neutralSoft: '#c7e4ff',
|
|
348
|
-
},
|
|
349
|
-
state: {
|
|
350
|
-
hover: '#ff0223',
|
|
351
|
-
active: '#ff0223',
|
|
352
|
-
focus: 'currentColor',
|
|
353
|
-
disabled: '#7c7f81',
|
|
354
|
-
},
|
|
276
|
+
const textXSmallStyle = {
|
|
277
|
+
font: `${_textFontPartA}${fontSizeTextXSmall}${_textFontPartB}`,
|
|
278
|
+
...fontHyphenationStyle,
|
|
355
279
|
};
|
|
356
280
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
...themeDark$1.state,
|
|
362
|
-
hover: '#00b0f4',
|
|
363
|
-
active: '#00b0f4',
|
|
364
|
-
},
|
|
365
|
-
});
|
|
281
|
+
const textSmallStyle = {
|
|
282
|
+
font: `${_textFontPartA}${fontSizeTextSmall}${_textFontPartB}`,
|
|
283
|
+
...fontHyphenationStyle,
|
|
284
|
+
};
|
|
366
285
|
|
|
367
|
-
|
|
286
|
+
// TODO: we shouldn't exclude xxl breakpoint
|
|
287
|
+
const mediaQueries = Object.entries(breakpoint)
|
|
368
288
|
.filter(([key]) => key !== 'xxl')
|
|
369
289
|
.map(([, val]) => `(min-width:${val})`);
|
|
370
290
|
hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
|
|
371
291
|
|
|
372
|
-
Object.entries(breakpoint
|
|
292
|
+
Object.entries(breakpoint).reduce((result, [key, val]) => (Object.assign(Object.assign({}, result), { [val]: key })), {});
|
|
373
293
|
|
|
374
|
-
const hasVisibleIcon = (iconName) => {
|
|
375
|
-
return iconName !== 'none';
|
|
294
|
+
const hasVisibleIcon = (iconName, iconSource) => {
|
|
295
|
+
return iconName !== 'none' || !!iconSource;
|
|
376
296
|
};
|
|
377
297
|
|
|
378
298
|
const childrenMutationMap = new Map();
|
|
@@ -560,8 +480,6 @@ debounce(800, (el, ariaElement) => {
|
|
|
560
480
|
ariaElement.innerText = `You have ${el.maxLength - el.value.length} out of ${el.maxLength} characters left`;
|
|
561
481
|
});
|
|
562
482
|
|
|
563
|
-
const isVisibleFormState = (state) => state === 'success' || state === 'error';
|
|
564
|
-
|
|
565
483
|
function _extends() {
|
|
566
484
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
567
485
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -3768,64 +3686,84 @@ var dist = jssCombineAndSortMQ;
|
|
|
3768
3686
|
|
|
3769
3687
|
/* Auto Generated Start */
|
|
3770
3688
|
const themeLight = {
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3689
|
+
primaryColor: '#010205',
|
|
3690
|
+
primaryColorDarken: '#000000',
|
|
3691
|
+
backgroundColor: '#FFF',
|
|
3692
|
+
backgroundColorDarken: '#E0E0E0',
|
|
3693
|
+
backgroundColorLighten: '#FFFFFF',
|
|
3694
|
+
backgroundSurfaceColor: '#EEEFF2',
|
|
3695
|
+
backgroundSurfaceColorDarken: '#CBCED7',
|
|
3696
|
+
backgroundSurfaceColorLighten: '#FFFFFF',
|
|
3697
|
+
contrastLowColor: '#D8D8DB',
|
|
3698
|
+
contrastMediumColor: '#949598',
|
|
3699
|
+
contrastHighColor: '#535457',
|
|
3700
|
+
contrastHighColorDarken: '#353638',
|
|
3701
|
+
contrastHighColorLighten: '#717276',
|
|
3702
|
+
hoverColor: 'rgba(148, 149, 152, 0.20)',
|
|
3703
|
+
hoverColorDarken: '#75767A',
|
|
3704
|
+
activeColor: 'rgba(148, 149, 152, 0.20)',
|
|
3705
|
+
focusColor: '#0A0AFF',
|
|
3706
|
+
disabledColor: '#949598',
|
|
3707
|
+
errorColor: '#E7323B',
|
|
3708
|
+
errorColorDarken: '#C51720',
|
|
3709
|
+
errorSoftColor: '#FCE8E9',
|
|
3710
|
+
errorSoftColorDarken: '#EED7D9',
|
|
3711
|
+
errorSoftColorLighten: '#FFFFFF',
|
|
3712
|
+
successColor: '#32B85B',
|
|
3713
|
+
successColorDarken: '#258843',
|
|
3714
|
+
successSoftColor: '#EBFAF0',
|
|
3715
|
+
successSoftColorDarken: '#DDEAE1',
|
|
3716
|
+
successSoftColorLighten: '#FFFFFF',
|
|
3717
|
+
warningColor: '#FECC1B',
|
|
3718
|
+
warningSoftColor: '#FFF9E6',
|
|
3719
|
+
warningSoftColorDarken: '#F5ECD2',
|
|
3720
|
+
warningSoftColorLighten: '#FFFFFF',
|
|
3721
|
+
infoColor: '#1E5BEB',
|
|
3722
|
+
infoSoftColor: '#E8EEFD',
|
|
3723
|
+
infoSoftColorDarken: '#D6DEF0',
|
|
3724
|
+
infoSoftColorLighten: '#FFFFFF'
|
|
3795
3725
|
};
|
|
3796
3726
|
const themeDark = {
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3727
|
+
primaryColor: '#FBFCFF',
|
|
3728
|
+
primaryColorDarken: '#BECEFF',
|
|
3729
|
+
backgroundColor: '#0E0E12',
|
|
3730
|
+
backgroundColorDarken: '#000000',
|
|
3731
|
+
backgroundColorLighten: '#292934',
|
|
3732
|
+
backgroundSurfaceColor: '#212225',
|
|
3733
|
+
backgroundSurfaceColorDarken: '#040405',
|
|
3734
|
+
backgroundSurfaceColorLighten: '#3E4045',
|
|
3735
|
+
contrastLowColor: '#404044',
|
|
3736
|
+
contrastMediumColor: '#7E7F82',
|
|
3737
|
+
contrastHighColor: '#AFB0B3',
|
|
3738
|
+
contrastHighColorDarken: '#909195',
|
|
3739
|
+
contrastHighColorLighten: '#CECFD1',
|
|
3740
|
+
hoverColor: 'rgba(126, 127, 130, 0.20)',
|
|
3741
|
+
hoverColorDarken: '#606163',
|
|
3742
|
+
activeColor: 'rgba(126, 127, 130, 0.20)',
|
|
3743
|
+
focusColor: '#1E5BEB',
|
|
3744
|
+
disabledColor: '#7E7F82',
|
|
3745
|
+
errorColor: '#CB3333',
|
|
3746
|
+
errorColorDarken: '#9A2727',
|
|
3747
|
+
errorSoftColor: '#290A0A',
|
|
3748
|
+
errorSoftColorDarken: '#0D0808',
|
|
3749
|
+
errorSoftColorLighten: '#331F1F',
|
|
3750
|
+
successColor: '#00C77E',
|
|
3751
|
+
successColorDarken: '#008A57',
|
|
3752
|
+
successSoftColor: '#003320',
|
|
3753
|
+
successSoftColorDarken: '#04110C',
|
|
3754
|
+
successSoftColorLighten: '#0F432F',
|
|
3755
|
+
warningColor: '#DDB84B',
|
|
3756
|
+
warningSoftColor: '#2B2208',
|
|
3757
|
+
warningSoftColorDarken: '#0D0C07',
|
|
3758
|
+
warningSoftColorLighten: '#362F1C',
|
|
3759
|
+
infoColor: '#027FFC',
|
|
3760
|
+
infoSoftColor: '#001A33',
|
|
3761
|
+
infoSoftColorDarken: '#040A11',
|
|
3762
|
+
infoSoftColorLighten: '#0F2943'
|
|
3763
|
+
};
|
|
3824
3764
|
const themes = {
|
|
3825
3765
|
'light': themeLight,
|
|
3826
|
-
'dark': themeDark
|
|
3827
|
-
'light-electric': themeLightElectric,
|
|
3828
|
-
'dark-electric': themeDarkElectric
|
|
3766
|
+
'dark': themeDark
|
|
3829
3767
|
};
|
|
3830
3768
|
/* Auto Generated End */
|
|
3831
3769
|
const getThemedColors = (theme) => {
|
|
@@ -3835,16 +3773,6 @@ const getInvertedThemedColors = (theme) => {
|
|
|
3835
3773
|
return getThemedColors(isThemeDark(theme) ? 'light' : 'dark');
|
|
3836
3774
|
};
|
|
3837
3775
|
|
|
3838
|
-
/**
|
|
3839
|
-
* utility to wrap jss styles parameter in `@media (hover: hover)`
|
|
3840
|
-
* which is used to not have hover styles on touch devices
|
|
3841
|
-
*/
|
|
3842
|
-
const hoverMediaQuery = (style) =>
|
|
3843
|
-
// puppeteer/chromium does not support `@media (hover: hover)` in headless mode
|
|
3844
|
-
// see https://github.com/puppeteer/puppeteer/issues/5096 and https://github.com/puppeteer/puppeteer/issues/4820
|
|
3845
|
-
({ '@media(hover:hover)': style }) // used for prod build, yarn start and unit tests
|
|
3846
|
-
; // used for staging build in e2e and vrt tests
|
|
3847
|
-
|
|
3848
3776
|
const transitionDuration = 'var(--p-transition-duration, .24s)';
|
|
3849
3777
|
const transitionTimingFunction$1 = 'ease';
|
|
3850
3778
|
const getTransition = (cssProperty) => `${cssProperty} ${transitionDuration} ${transitionTimingFunction$1}`;
|
|
@@ -3916,8 +3844,8 @@ const getTextHiddenJssStyle = (isHidden) => isHidden
|
|
|
3916
3844
|
clipPath: 'none',
|
|
3917
3845
|
whiteSpace: 'normal',
|
|
3918
3846
|
};
|
|
3919
|
-
const getFormTextHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'fit-content'
|
|
3920
|
-
const getFormCheckboxRadioHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'auto', padding: `
|
|
3847
|
+
const getFormTextHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'fit-content' }));
|
|
3848
|
+
const getFormCheckboxRadioHiddenJssStyle = (isHidden) => (Object.assign(Object.assign({}, getTextHiddenJssStyle(isHidden)), { width: 'auto', padding: `2px 0 0 ${spacingStaticSmall}` }));
|
|
3921
3849
|
/**
|
|
3922
3850
|
* Screen reader only styles to hide (text-)contents visually in the browser but grant access for screen readers
|
|
3923
3851
|
*/
|
|
@@ -3939,6 +3867,22 @@ const getBackfaceVisibilityJssStyle = () => ({
|
|
|
3939
3867
|
WebkitBackfaceVisibility: 'hidden',
|
|
3940
3868
|
});
|
|
3941
3869
|
|
|
3870
|
+
const hostHiddenStyles = {
|
|
3871
|
+
'&([hidden])': {
|
|
3872
|
+
display: 'none',
|
|
3873
|
+
},
|
|
3874
|
+
};
|
|
3875
|
+
|
|
3876
|
+
/**
|
|
3877
|
+
* utility to wrap jss styles parameter in `@media (hover: hover)`
|
|
3878
|
+
* which is used to not have hover styles on touch devices
|
|
3879
|
+
*/
|
|
3880
|
+
const hoverMediaQuery = (style) =>
|
|
3881
|
+
// puppeteer/chromium does not support `@media (hover: hover)` in headless mode
|
|
3882
|
+
// see https://github.com/puppeteer/puppeteer/issues/5096 and https://github.com/puppeteer/puppeteer/issues/4820
|
|
3883
|
+
({ '@media(hover:hover)': style }) // used for prod build, yarn start and unit tests
|
|
3884
|
+
; // used for staging build in e2e and vrt tests
|
|
3885
|
+
|
|
3942
3886
|
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3943
3887
|
const jss = createJss({
|
|
3944
3888
|
plugins: [
|
|
@@ -3973,7 +3917,7 @@ const buildResponsiveStyles = (rawValue, getJssStyle) => {
|
|
|
3973
3917
|
.filter((key) => key !== 'base')
|
|
3974
3918
|
.reduce((result, breakpointValue) => (Object.assign(Object.assign({}, result), {
|
|
3975
3919
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
3976
|
-
[
|
|
3920
|
+
[getMediaQueryMin(breakpointValue)]: getJssStyle(value[breakpointValue]) })), getJssStyle(value.base))
|
|
3977
3921
|
: getJssStyle(value);
|
|
3978
3922
|
};
|
|
3979
3923
|
const isObject$1 = (obj) => typeof obj === 'object' && !Array.isArray(obj);
|
|
@@ -3994,18 +3938,6 @@ const mergeDeep = (...objects) => {
|
|
|
3994
3938
|
}, {});
|
|
3995
3939
|
};
|
|
3996
3940
|
|
|
3997
|
-
const paramCaseToCamelCase = (str) => {
|
|
3998
|
-
return str.replace(/-(\w)/g, (_, group) => group.toUpperCase());
|
|
3999
|
-
};
|
|
4000
|
-
|
|
4001
|
-
const hasDocument = typeof document !== 'undefined';
|
|
4002
|
-
|
|
4003
|
-
hasDocument && 'scrollBehavior' in document.documentElement.style;
|
|
4004
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
4005
|
-
win.document || { head: {} };
|
|
4006
|
-
(win.HTMLElement || class {
|
|
4007
|
-
});
|
|
4008
|
-
|
|
4009
3941
|
[
|
|
4010
3942
|
{ name: 'Model', id: 'model' },
|
|
4011
3943
|
{ name: 'Interest', id: 'interest' },
|
|
@@ -5832,28 +5764,16 @@ index.setup({
|
|
|
5832
5764
|
plugins: [...create().plugins, dist({ combineMediaQueries: true })],
|
|
5833
5765
|
});
|
|
5834
5766
|
|
|
5835
|
-
const
|
|
5836
|
-
return theme === 'dark';
|
|
5837
|
-
};
|
|
5838
|
-
|
|
5839
|
-
const isThemeDarkElectric = (theme) => {
|
|
5840
|
-
return theme === 'dark-electric';
|
|
5841
|
-
};
|
|
5842
|
-
|
|
5843
|
-
const isThemeLightElectric = (theme) => {
|
|
5844
|
-
return theme === 'light-electric';
|
|
5845
|
-
};
|
|
5767
|
+
const hasDocument = typeof document !== 'undefined';
|
|
5846
5768
|
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
};
|
|
5769
|
+
hasDocument && 'scrollBehavior' in document.documentElement.style;
|
|
5770
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
5771
|
+
win.document || { head: {} };
|
|
5772
|
+
(win.HTMLElement || class {
|
|
5773
|
+
});
|
|
5850
5774
|
|
|
5851
|
-
const
|
|
5852
|
-
'
|
|
5853
|
-
small: textSmall,
|
|
5854
|
-
medium: textMedium,
|
|
5855
|
-
large: textLarge,
|
|
5856
|
-
'x-large': textXLarge,
|
|
5775
|
+
const isThemeDark = (theme) => {
|
|
5776
|
+
return theme === 'dark';
|
|
5857
5777
|
};
|
|
5858
5778
|
|
|
5859
5779
|
const formatObjectOutput = (value) => {
|
|
@@ -5866,34 +5786,40 @@ const formatObjectOutput = (value) => {
|
|
|
5866
5786
|
'value, ' +
|
|
5867
5787
|
formatObjectOutput(BREAKPOINTS.reduce((prev, key) => (Object.assign(Object.assign({}, prev), { [key + (key !== 'base' ? '?' : '')]: 'value' })), {})).replace(/"/g, '');
|
|
5868
5788
|
|
|
5869
|
-
const
|
|
5870
|
-
'large-title',
|
|
5871
|
-
'headline-1',
|
|
5872
|
-
'headline-2',
|
|
5873
|
-
'headline-3',
|
|
5874
|
-
'headline-4',
|
|
5875
|
-
'headline-5',
|
|
5876
|
-
];
|
|
5877
|
-
const isVariantType = (variant) => {
|
|
5878
|
-
return HEADLINE_VARIANTS.includes(variant);
|
|
5879
|
-
};
|
|
5789
|
+
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
5880
5790
|
|
|
5881
|
-
const getComponentCss$
|
|
5882
|
-
const {
|
|
5791
|
+
const getComponentCss$S = (size, compact, open, theme) => {
|
|
5792
|
+
const { primaryColor, hoverColor, focusColor, contrastLowColor } = getThemedColors(theme);
|
|
5883
5793
|
const border = `1px solid ${contrastLowColor}`;
|
|
5884
5794
|
return getCss(Object.assign(Object.assign({ '@global': {
|
|
5885
|
-
':host': Object.assign({ display: 'block' },
|
|
5886
|
-
|
|
5887
|
-
|
|
5795
|
+
':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)),
|
|
5796
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', justifyContent: 'space-between', margin: '2px 0', width: '100%', textDecoration: 'none', border: 0, outline: 0, gap: '24px', background: 'transparent', cursor: 'pointer', textAlign: 'left', color: primaryColor }, textSmallStyle), { fontWeight: fontWeight.semiBold }), buildResponsiveStyles(size, (s) => ({
|
|
5797
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
5798
|
+
// @ts-ignore
|
|
5799
|
+
fontSize: fontSizeText[s],
|
|
5800
|
+
padding: compact ? '4px 0' : `${s === 'medium' ? '20px' : '12px'} 0`,
|
|
5801
|
+
}))), mergeDeep({
|
|
5802
|
+
'&::before': Object.assign({ content: '""', position: 'absolute', borderRadius: borderRadiusSmall, left: '-4px', right: '-4px' }, (compact
|
|
5803
|
+
? {
|
|
5804
|
+
top: '2px',
|
|
5805
|
+
bottom: '2px',
|
|
5806
|
+
}
|
|
5807
|
+
: {
|
|
5808
|
+
top: '6px',
|
|
5809
|
+
bottom: '6px',
|
|
5810
|
+
})),
|
|
5811
|
+
}, hoverMediaQuery({
|
|
5812
|
+
'&::before': {
|
|
5813
|
+
transition: getTransition('background-color'),
|
|
5888
5814
|
},
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
? { padding: `${pxToRemWithUnit(4)} 0` }
|
|
5892
|
-
: buildResponsiveStyles(size, (s) => (Object.assign(Object.assign({}, fontSize[s]), { padding: `${pxToRemWithUnit(s === 'medium' ? 20 : 12)} 0` }))))), getFocusJssStyle({ color: focusColor })), hoverMediaQuery({
|
|
5893
|
-
'&:hover': {
|
|
5894
|
-
color: hoverColor,
|
|
5815
|
+
'&:hover::before': {
|
|
5816
|
+
background: hoverColor,
|
|
5895
5817
|
},
|
|
5896
|
-
})),
|
|
5818
|
+
}))), { '&:focus::before': {
|
|
5819
|
+
border: `${borderWidthBase} solid ${focusColor}`,
|
|
5820
|
+
}, '&:not(:focus-visible)::before': {
|
|
5821
|
+
border: 0,
|
|
5822
|
+
} }),
|
|
5897
5823
|
} }, (!compact && {
|
|
5898
5824
|
root: {
|
|
5899
5825
|
borderBottom: border,
|
|
@@ -5904,14 +5830,13 @@ const getComponentCss$R = (size, compact, open, theme) => {
|
|
|
5904
5830
|
}, icon: {
|
|
5905
5831
|
width: fontLineHeight,
|
|
5906
5832
|
height: fontLineHeight,
|
|
5907
|
-
marginLeft: '1.5rem',
|
|
5908
5833
|
transformOrigin: '50% 50%',
|
|
5909
|
-
transform: open ? 'rotate3d(0
|
|
5834
|
+
transform: open ? 'rotate3d(0)' : 'rotate3d(0,0,1,90deg)',
|
|
5910
5835
|
transition: getTransition('transform'),
|
|
5911
5836
|
}, collapsible: Object.assign({ padding: 0, overflow: 'hidden' }, (open
|
|
5912
5837
|
? {
|
|
5913
5838
|
height: 'auto',
|
|
5914
|
-
paddingBottom: compact ?
|
|
5839
|
+
paddingBottom: compact ? spacingStaticSmall : '24px',
|
|
5915
5840
|
visibility: 'visible',
|
|
5916
5841
|
transition: getTransition('height') + `,visibility ${transitionDuration}`,
|
|
5917
5842
|
animation: `$open ${transitionDuration} ease forwards`,
|
|
@@ -5937,19 +5862,44 @@ const MODAL_Z_INDEX = 99999;
|
|
|
5937
5862
|
const POPOVER_Z_INDEX = 9999;
|
|
5938
5863
|
const BANNER_Z_INDEX = 99;
|
|
5939
5864
|
|
|
5940
|
-
const
|
|
5941
|
-
const
|
|
5942
|
-
const
|
|
5943
|
-
const
|
|
5944
|
-
|
|
5865
|
+
const oneColumnWidthS = `calc((100% - ${gridSafeZoneBase} * 2 - ${gridGap} * 13) / 14)`;
|
|
5866
|
+
const oneColumnWidthXXL = `calc((min(100%, ${gridWidthMax}) - ${gridSafeZoneXXL} * 2 - ${gridGap} * 13) / 14)`;
|
|
5867
|
+
const offsetHorizontalXXL = `max(0px, (100% - ${gridWidthMax}) / 2)`;
|
|
5868
|
+
const widthMap$1 = {
|
|
5869
|
+
narrow: {
|
|
5870
|
+
padding: `0 ${gridSafeZoneBase}`,
|
|
5871
|
+
[getMediaQueryMin('s')]: {
|
|
5872
|
+
padding: `0 calc(${gridSafeZoneBase} + ${gridGap} * 3 + ${oneColumnWidthS} * 3)`,
|
|
5873
|
+
},
|
|
5874
|
+
[getMediaQueryMin('xxl')]: {
|
|
5875
|
+
padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL} + ${gridGap} * 3 + ${oneColumnWidthXXL} * 3)`,
|
|
5876
|
+
},
|
|
5877
|
+
},
|
|
5878
|
+
basic: {
|
|
5879
|
+
padding: `0 ${gridSafeZoneBase}`,
|
|
5880
|
+
[getMediaQueryMin('s')]: {
|
|
5881
|
+
padding: `0 calc(${gridSafeZoneBase} + ${gridGap} + ${oneColumnWidthS})`,
|
|
5882
|
+
},
|
|
5883
|
+
[getMediaQueryMin('xxl')]: {
|
|
5884
|
+
padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL} + ${gridGap} + ${oneColumnWidthXXL})`,
|
|
5885
|
+
},
|
|
5886
|
+
},
|
|
5887
|
+
extended: {
|
|
5888
|
+
padding: `0 ${gridSafeZoneBase}`,
|
|
5889
|
+
[getMediaQueryMin('xxl')]: {
|
|
5890
|
+
padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL})`,
|
|
5891
|
+
},
|
|
5892
|
+
},
|
|
5893
|
+
};
|
|
5894
|
+
const getContentWrapperStyle = (width) => {
|
|
5895
|
+
return Object.assign({ display: 'block', margin: 0, padding: `0 ${offsetHorizontalXXL}`, width: 'auto', minWidth: 0, maxWidth: gridWidthMax }, widthMap$1[width]);
|
|
5896
|
+
};
|
|
5897
|
+
|
|
5945
5898
|
const easeInQuad = 'cubic-bezier(0.45,0,0.55,1)';
|
|
5946
5899
|
const easeOutQuad = 'cubic-bezier(0.5,1,0.89,1)';
|
|
5947
5900
|
const ANIMATION_DURATION = 600;
|
|
5948
|
-
const mediaQueryS$2 = mediaQueryMin('s');
|
|
5949
|
-
const mediaQueryXxs = mediaQueryMinMax('xxs', 's');
|
|
5950
5901
|
const getBoxShadow = () => ({
|
|
5951
|
-
boxShadow:
|
|
5952
|
-
`0 ${pxToRemWithUnit(15)} ${pxToRemWithUnit(20)} 0 rgba(0,0,0,0.2)`,
|
|
5902
|
+
boxShadow: '0 2px 4px 0 rgba(0,0,0,0.05),0 15px 20px 0 rgba(0,0,0,0.2)',
|
|
5953
5903
|
});
|
|
5954
5904
|
const getAnimationIn = (keyframesName, durationVar) => {
|
|
5955
5905
|
const duration = durationVar ? `var(${durationVar},${ANIMATION_DURATION}ms)` : `${ANIMATION_DURATION}ms`;
|
|
@@ -5976,39 +5926,43 @@ const getKeyframesMobile = (direction, bottomVar) => getKeyframes(direction, {
|
|
|
5976
5926
|
opacity: 0,
|
|
5977
5927
|
transform: `translate3d(0,calc(var(${bottomVar}) + 100%),0)`, // space before and after "+" is crucial
|
|
5978
5928
|
});
|
|
5929
|
+
|
|
5930
|
+
const bannerPositionTypeVar = '--p-banner-position-type';
|
|
5931
|
+
const bannerPositionTopVar = '--p-banner-position-top';
|
|
5932
|
+
const bannerPositionBottomVar = '--p-banner-position-bottom';
|
|
5933
|
+
const bannerZIndexVar = '--p-internal-banner-z-index';
|
|
5934
|
+
const bannerAnimationDurationVar = '--p-animation-duration';
|
|
5935
|
+
const bannerOffset = '56px';
|
|
5936
|
+
const mediaQueryBase = getMediaQueryMinMax('base', 's');
|
|
5937
|
+
const mediaQueryS$1 = getMediaQueryMin('s');
|
|
5979
5938
|
const getKeyframesDesktop = (direction, topVar) => getKeyframes(direction, {
|
|
5980
5939
|
opacity: 0,
|
|
5981
5940
|
transform: `translate3d(0,calc(-100% - var(${topVar})),0)`, // space before and after "-" is crucial
|
|
5982
5941
|
});
|
|
5983
|
-
const
|
|
5942
|
+
const widthMap = {
|
|
5943
|
+
fluid: 'extended',
|
|
5944
|
+
extended: 'extended',
|
|
5945
|
+
basic: 'basic',
|
|
5946
|
+
};
|
|
5947
|
+
const getComponentCss$R = (width) => {
|
|
5984
5948
|
return getCss({
|
|
5985
5949
|
'@global': {
|
|
5986
|
-
':host': {
|
|
5950
|
+
':host': Object.assign(Object.assign({
|
|
5987
5951
|
// TODO: Why is nothing set as important here?
|
|
5988
|
-
[bannerPositionTopVar]:
|
|
5989
|
-
[
|
|
5990
|
-
display: 'block',
|
|
5991
|
-
position: `var(${bannerPositionTypeVar},fixed)`,
|
|
5992
|
-
zIndex: `var(${bannerZIndexVar},${BANNER_Z_INDEX})`,
|
|
5993
|
-
opacity: 0,
|
|
5994
|
-
left: 0,
|
|
5995
|
-
right: 0,
|
|
5996
|
-
willChange: 'opacity,transform',
|
|
5997
|
-
[mediaQueryXxs]: {
|
|
5952
|
+
[bannerPositionTopVar]: bannerOffset, [bannerPositionBottomVar]: bannerOffset, display: 'block', position: `var(${bannerPositionTypeVar},fixed)`, zIndex: `var(${bannerZIndexVar},${BANNER_Z_INDEX})`, opacity: 0, left: 0, right: 0, willChange: 'opacity,transform' }, mergeDeep(addImportantToEachRule(Object.assign(Object.assign({}, getContentWrapperStyle(widthMap[width])), hostHiddenStyles)), {
|
|
5953
|
+
[mediaQueryBase]: {
|
|
5998
5954
|
bottom: `var(${bannerPositionBottomVar})`,
|
|
5999
5955
|
},
|
|
6000
|
-
[mediaQueryS$
|
|
5956
|
+
[mediaQueryS$1]: {
|
|
6001
5957
|
top: `var(${bannerPositionTopVar})`,
|
|
6002
5958
|
},
|
|
6003
|
-
|
|
6004
|
-
[
|
|
6005
|
-
[mediaQueryS$
|
|
6006
|
-
},
|
|
6007
|
-
|
|
6008
|
-
[
|
|
6009
|
-
|
|
6010
|
-
},
|
|
6011
|
-
},
|
|
5959
|
+
})), { '&(.hydrated),&(.ssr)': {
|
|
5960
|
+
[mediaQueryBase]: getAnimationIn('mobileIn', bannerAnimationDurationVar),
|
|
5961
|
+
[mediaQueryS$1]: getAnimationIn('desktopIn', bannerAnimationDurationVar),
|
|
5962
|
+
}, '&(.banner--close)': {
|
|
5963
|
+
[mediaQueryBase]: getAnimationOut('mobileOut'),
|
|
5964
|
+
[mediaQueryS$1]: getAnimationOut('desktopOut'),
|
|
5965
|
+
} }),
|
|
6012
5966
|
'@keyframes mobileIn': getKeyframesMobile('in', bannerPositionBottomVar),
|
|
6013
5967
|
'@keyframes mobileOut': getKeyframesMobile('out', bannerPositionBottomVar),
|
|
6014
5968
|
'@keyframes desktopIn': getKeyframesDesktop('in', bannerPositionTopVar),
|
|
@@ -6018,7 +5972,6 @@ const getComponentCss$Q = () => {
|
|
|
6018
5972
|
});
|
|
6019
5973
|
};
|
|
6020
5974
|
|
|
6021
|
-
const { medium: spacingMedium$2, small: spacingSmall$2 } = spacing;
|
|
6022
5975
|
const getDirectionJssStyle = (direction) => {
|
|
6023
5976
|
const style = {
|
|
6024
5977
|
column: {
|
|
@@ -6030,8 +5983,8 @@ const getDirectionJssStyle = (direction) => {
|
|
|
6030
5983
|
row: {
|
|
6031
5984
|
flexFlow: 'row wrap',
|
|
6032
5985
|
alignItems: 'center',
|
|
6033
|
-
marginRight: `-${
|
|
6034
|
-
marginLeft: `-${
|
|
5986
|
+
marginRight: `-${spacingStaticSmall}`,
|
|
5987
|
+
marginLeft: `-${spacingStaticSmall}`,
|
|
6035
5988
|
},
|
|
6036
5989
|
};
|
|
6037
5990
|
return style[direction];
|
|
@@ -6043,301 +5996,222 @@ const getDirectionSlottedJssStyle = (direction) => {
|
|
|
6043
5996
|
marginLeft: 0,
|
|
6044
5997
|
},
|
|
6045
5998
|
row: {
|
|
6046
|
-
marginRight:
|
|
6047
|
-
marginLeft:
|
|
5999
|
+
marginRight: spacingStaticSmall,
|
|
6000
|
+
marginLeft: spacingStaticSmall,
|
|
6048
6001
|
},
|
|
6049
6002
|
};
|
|
6050
6003
|
return style[direction];
|
|
6051
6004
|
};
|
|
6052
|
-
const getComponentCss$
|
|
6005
|
+
const getComponentCss$Q = (direction) => {
|
|
6053
6006
|
return getCss({
|
|
6054
6007
|
'@global': {
|
|
6055
|
-
':host': {
|
|
6056
|
-
|
|
6057
|
-
},
|
|
6058
|
-
div: Object.assign({ display: 'flex', marginTop: `-${spacingMedium$2}` }, buildResponsiveStyles(direction, getDirectionJssStyle)),
|
|
6059
|
-
'::slotted(*)': addImportantToEachRule(Object.assign({ marginTop: spacingMedium$2 }, buildResponsiveStyles(direction, getDirectionSlottedJssStyle))),
|
|
6008
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
6009
|
+
div: Object.assign({ display: 'flex', marginTop: `-${spacingStaticMedium}` }, buildResponsiveStyles(direction, getDirectionJssStyle)),
|
|
6010
|
+
'::slotted(*)': addImportantToEachRule(Object.assign({ marginTop: spacingStaticMedium }, buildResponsiveStyles(direction, getDirectionSlottedJssStyle))),
|
|
6060
6011
|
},
|
|
6061
6012
|
});
|
|
6062
6013
|
};
|
|
6063
6014
|
|
|
6064
|
-
const
|
|
6065
|
-
|
|
6015
|
+
const fontSizeTextMap = {
|
|
6016
|
+
'x-small': fontSizeTextXSmall,
|
|
6017
|
+
small: fontSizeTextSmall,
|
|
6018
|
+
medium: fontSizeTextMedium,
|
|
6019
|
+
large: fontSizeTextLarge,
|
|
6020
|
+
'x-large': fontSizeTextXLarge,
|
|
6021
|
+
inherit: 'inherit',
|
|
6066
6022
|
};
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
if (isSizeInherit(textSize)) {
|
|
6070
|
-
return {
|
|
6071
|
-
fontSize: 'inherit',
|
|
6072
|
-
};
|
|
6073
|
-
}
|
|
6074
|
-
else {
|
|
6075
|
-
const { fontSize: size } = fontSize[paramCaseToCamelCase(textSize)];
|
|
6076
|
-
const sublineSize = {
|
|
6077
|
-
'x-small': fontSize.xSmall,
|
|
6078
|
-
small: fontSize.small,
|
|
6079
|
-
medium: { fontSize: '1.25rem', lineHeight: fontLineHeight },
|
|
6080
|
-
large: { fontSize: '1.875rem', lineHeight: fontLineHeight },
|
|
6081
|
-
'x-large': fontSize.large,
|
|
6082
|
-
};
|
|
6083
|
-
return {
|
|
6084
|
-
fontSize: size,
|
|
6085
|
-
'& ~ .subline': Object.assign(Object.assign({}, sublineSize[textSize]), { '&::before': {
|
|
6086
|
-
fontSize: size,
|
|
6087
|
-
marginLeft: fontLineHeight,
|
|
6088
|
-
} }),
|
|
6089
|
-
};
|
|
6090
|
-
}
|
|
6023
|
+
const getFontSizeText = (size) => {
|
|
6024
|
+
return fontSizeTextMap[size];
|
|
6091
6025
|
};
|
|
6026
|
+
|
|
6027
|
+
// Needed for slotted anchor and hidden label, which then enlarges the hidden label to equal host size and indents the text to be visually hidden.
|
|
6092
6028
|
const getVisibilityJssStyle = (hideLabel) => {
|
|
6093
6029
|
return hideLabel
|
|
6094
|
-
?
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
}
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
}
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
const { baseColor, hoverColor, activeColor, disabledColor } = getThemedColors(theme);
|
|
6125
|
-
const hasIcon = hasVisibleIcon(icon);
|
|
6126
|
-
return Object.assign(Object.assign({ '@global': {
|
|
6127
|
-
':host': Object.assign({ position: 'relative', outline: addImportantToRule(0) }, buildResponsiveStyles(hasSubline ? false : stretch, (responsiveStretch) => (Object.assign({ display: responsiveStretch ? 'block' : 'inline-block' }, (!responsiveStretch && { verticalAlign: 'top' }))))),
|
|
6128
|
-
},
|
|
6129
|
-
// TODO: reduce to only necessary styles (e.g. why boxSizing?)
|
|
6130
|
-
// TODO: overhead in link styles when slotted anchor is used
|
|
6131
|
-
// TODO: overhead due that link does not need same "reset" styles as button
|
|
6132
|
-
root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-start', width: '100%', margin: 0, padding: 0, boxSizing: 'border-box', outline: 'transparent none', appearance: 'none', cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer', textDecoration: 'none', textAlign: 'left', border: 'none', background: 'transparent', color: isDisabledOrLoading ? disabledColor : active ? activeColor : baseColor, transition: getTransition('color') }, (!hasSlottedAnchor && getFocusJssStyle({ offset: 1, pseudo: '::before' }))), (!isDisabledOrLoading && Object.assign(Object.assign({}, hoverMediaQuery({
|
|
6133
|
-
'&:hover': Object.assign({ color: hoverColor }, (hasSubline && {
|
|
6134
|
-
'& + $subline': {
|
|
6135
|
-
color: hoverColor,
|
|
6136
|
-
},
|
|
6137
|
-
})),
|
|
6138
|
-
})), { '&:active': Object.assign({ color: activeColor }, (hasSubline && {
|
|
6139
|
-
'& + $subline': {
|
|
6140
|
-
color: activeColor,
|
|
6141
|
-
},
|
|
6142
|
-
})) }))), textSmall), { fontWeight: getFontWeight(weight) }), mergeDeep(!hasSubline &&
|
|
6143
|
-
buildResponsiveStyles(stretch, (stretched) => ({
|
|
6144
|
-
justifyContent: stretched ? 'space-between' : 'flex-start',
|
|
6145
|
-
})), buildResponsiveStyles(size, getSizeJssStyle$1))) }, (hasIcon && {
|
|
6030
|
+
? Object.assign(Object.assign({ position: 'absolute' }, getInsetJssStyle(0)), { whiteSpace: 'nowrap', textIndent: '-999999px' }) : Object.assign(Object.assign({ position: 'relative' }, getInsetJssStyle('auto')), { whiteSpace: 'inherit', textIndent: 0 });
|
|
6031
|
+
};
|
|
6032
|
+
const offsetVertical = '-2px';
|
|
6033
|
+
const offsetHorizontal = '-4px';
|
|
6034
|
+
const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme) => {
|
|
6035
|
+
const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
6036
|
+
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
6037
|
+
return Object.assign({ '@global': {
|
|
6038
|
+
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign({ transform: 'translate3d(0,0,0)', outline: 0 }, hostHiddenStyles))), buildResponsiveStyles(stretch, (responsiveStretch) => (Object.assign({ display: responsiveStretch ? 'block' : 'inline-block' }, (!responsiveStretch && { verticalAlign: 'top' }))))),
|
|
6039
|
+
}, root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', gap: spacingStaticXSmall, width: '100%', margin: 0, padding: 0, color: isDisabledOrLoading ? disabledColor : primaryColor, outline: 0 }, textSmallStyle), mergeDeep(buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
6040
|
+
justifyContent: stretchValue ? 'space-between' : 'flex-start',
|
|
6041
|
+
alignItems: stretchValue ? 'center' : 'flex-start',
|
|
6042
|
+
})), buildResponsiveStyles(size, (sizeValue) => ({
|
|
6043
|
+
fontSize: getFontSizeText(sizeValue),
|
|
6044
|
+
})))), { '&::before': Object.assign(Object.assign(Object.assign({ content: '""', position: 'fixed', top: offsetVertical, bottom: offsetVertical }, buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
6045
|
+
right: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
6046
|
+
left: hideLabelValue || hasIcon ? offsetVertical : offsetHorizontal,
|
|
6047
|
+
}))), { borderRadius: borderRadiusSmall, transition: getTransition('background-color') }), (active && Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }))) }), (!isDisabledOrLoading &&
|
|
6048
|
+
hoverMediaQuery({
|
|
6049
|
+
'&:hover::before': Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }),
|
|
6050
|
+
}))), (!hasSlottedAnchor && {
|
|
6051
|
+
'&:focus::before': {
|
|
6052
|
+
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6053
|
+
},
|
|
6054
|
+
'&:not(:focus-visible)::before': {
|
|
6055
|
+
border: 0,
|
|
6056
|
+
},
|
|
6057
|
+
})), label: {
|
|
6058
|
+
position: 'relative', // needed for hover state when icon="none" is set
|
|
6059
|
+
} }, (hasIcon && {
|
|
6146
6060
|
icon: {
|
|
6061
|
+
position: 'relative',
|
|
6147
6062
|
flexShrink: '0',
|
|
6148
6063
|
width: fontLineHeight,
|
|
6149
6064
|
height: fontLineHeight,
|
|
6150
6065
|
},
|
|
6151
|
-
label: mergeDeep(buildResponsiveStyles(hideLabel,
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
content: '""',
|
|
6155
|
-
} }))),
|
|
6066
|
+
label: mergeDeep(buildResponsiveStyles(hideLabel, getVisibilityJssStyle), buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
6067
|
+
order: alignLabelValue === 'left' ? -1 : 0,
|
|
6068
|
+
}))),
|
|
6156
6069
|
}));
|
|
6157
6070
|
};
|
|
6158
6071
|
|
|
6159
|
-
const getComponentCss$
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
'
|
|
6163
|
-
|
|
6164
|
-
|
|
6072
|
+
const getComponentCss$P = (icon, iconSource, active, isLoading, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, theme) => {
|
|
6073
|
+
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
6074
|
+
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, false, theme), Object.assign({ root: {
|
|
6075
|
+
appearance: 'none',
|
|
6076
|
+
background: 'transparent',
|
|
6077
|
+
textAlign: 'left',
|
|
6078
|
+
border: 0,
|
|
6079
|
+
cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer',
|
|
6080
|
+
} }, (!hasIcon &&
|
|
6081
|
+
isLoading && {
|
|
6082
|
+
label: {
|
|
6083
|
+
visibility: 'hidden',
|
|
6165
6084
|
},
|
|
6166
|
-
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6085
|
+
icon: {
|
|
6086
|
+
position: 'absolute',
|
|
6087
|
+
top: 0,
|
|
6088
|
+
left: `calc(50% - ${fontLineHeight} / 2)`,
|
|
6089
|
+
width: fontLineHeight,
|
|
6090
|
+
height: fontLineHeight,
|
|
6091
|
+
},
|
|
6092
|
+
}))));
|
|
6093
|
+
};
|
|
6094
|
+
|
|
6095
|
+
const { primaryColor: darkThemePrimaryColor$1 } = getThemedColors('dark');
|
|
6096
|
+
const { primaryColor: lightThemePrimaryColor$1 } = getThemedColors('light');
|
|
6097
|
+
const getVariantColors = (variant, theme) => {
|
|
6098
|
+
const { primaryColor, contrastHighColor, contrastMediumColor, hoverColor } = getThemedColors(theme);
|
|
6173
6099
|
const colors = {
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
secondary: {
|
|
6181
|
-
primaryColor: contrastHighColor,
|
|
6182
|
-
primaryColorHover: contrastHighColorDarken,
|
|
6183
|
-
baseColor: darkThemeBaseColor,
|
|
6184
|
-
},
|
|
6185
|
-
tertiary: {
|
|
6186
|
-
primaryColor: contrastHighColor,
|
|
6187
|
-
primaryColorHover: contrastHighColorDarken,
|
|
6188
|
-
baseColor,
|
|
6189
|
-
},
|
|
6100
|
+
primary: {
|
|
6101
|
+
textColor: theme === 'dark' ? lightThemePrimaryColor$1 : darkThemePrimaryColor$1,
|
|
6102
|
+
borderColor: primaryColor,
|
|
6103
|
+
borderColorHover: contrastHighColor,
|
|
6104
|
+
backgroundColor: primaryColor,
|
|
6105
|
+
backgroundColorHover: contrastHighColor,
|
|
6190
6106
|
},
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
secondary: {
|
|
6198
|
-
primaryColor: darkThemeBaseColor,
|
|
6199
|
-
primaryColorHover: baseColorDarken,
|
|
6200
|
-
baseColor: lightThemeBaseColor,
|
|
6201
|
-
},
|
|
6202
|
-
tertiary: {
|
|
6203
|
-
primaryColor: darkThemeBaseColor,
|
|
6204
|
-
primaryColorHover: darkThemeBaseColor,
|
|
6205
|
-
baseColor,
|
|
6206
|
-
},
|
|
6107
|
+
secondary: {
|
|
6108
|
+
textColor: primaryColor,
|
|
6109
|
+
borderColor: primaryColor,
|
|
6110
|
+
borderColorHover: contrastMediumColor,
|
|
6111
|
+
backgroundColor: 'transparent',
|
|
6112
|
+
backgroundColorHover: hoverColor,
|
|
6207
6113
|
},
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6114
|
+
};
|
|
6115
|
+
return colors[variant === 'tertiary' ? 'secondary' : variant];
|
|
6116
|
+
};
|
|
6117
|
+
const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrLoading, hasSlottedAnchor, theme) => {
|
|
6118
|
+
const isPrimary = variant === 'primary';
|
|
6119
|
+
const { textColor, borderColor, borderColorHover, backgroundColor, backgroundColorHover } = getVariantColors(variant, theme);
|
|
6120
|
+
const { focusColor } = getThemedColors(theme);
|
|
6121
|
+
const hasIcon = hasVisibleIcon(icon, iconSource) || hideLabel;
|
|
6122
|
+
return Object.assign({ '@global': {
|
|
6123
|
+
':host': addImportantToEachRule(Object.assign({ display: 'inline-block', verticalAlign: 'top', outline: 0 }, hostHiddenStyles)),
|
|
6124
|
+
}, root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-start', justifyContent: 'center', width: '100%', minWidth: '54px', minHeight: '54px', boxSizing: 'border-box', outline: 0, textAlign: 'left', appearance: 'none', textDecoration: 'none', border: `2px solid ${borderColor}`, borderRadius: borderRadiusSmall, transform: 'translate3d(0,0,0)', // creates new stacking context (for slotted anchor + focus)
|
|
6125
|
+
backgroundColor, color: textColor }, textSmallStyle), { transition: ['background-color', 'border-color', 'color'].map(getTransition).join() }), buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
6126
|
+
padding: hideLabelValue ? '13px' : hasIcon ? '13px 26px 13px 18px' : '13px 26px',
|
|
6127
|
+
gap: hideLabelValue ? 0 : spacingStaticSmall,
|
|
6128
|
+
}))), (!hasSlottedAnchor && {
|
|
6129
|
+
'&:focus::before': Object.assign({ content: '""', position: 'fixed', border: `${borderWidthBase} solid ${focusColor}`, borderRadius: borderRadiusMedium }, getInsetJssStyle(-6)),
|
|
6130
|
+
'&:not(:focus-visible)::before': {
|
|
6131
|
+
border: 0,
|
|
6223
6132
|
},
|
|
6133
|
+
})), (!isDisabledOrLoading &&
|
|
6134
|
+
hoverMediaQuery({
|
|
6135
|
+
'&:hover': Object.assign({ backgroundColor: backgroundColorHover, borderColor: borderColorHover }, (!isPrimary && frostedGlassStyle)),
|
|
6136
|
+
}))), label: Object.assign({}, buildResponsiveStyles(hideLabel, (hideLabelValue) => hideLabelValue
|
|
6137
|
+
? {
|
|
6138
|
+
width: 0,
|
|
6139
|
+
height: '1px',
|
|
6140
|
+
textIndent: '-999999px',
|
|
6141
|
+
}
|
|
6142
|
+
: {
|
|
6143
|
+
width: 'auto',
|
|
6144
|
+
height: 'auto',
|
|
6145
|
+
textIndent: 0,
|
|
6146
|
+
})) }, (hasIcon && {
|
|
6147
|
+
icon: {
|
|
6148
|
+
width: fontLineHeight,
|
|
6149
|
+
height: fontLineHeight,
|
|
6224
6150
|
},
|
|
6225
|
-
};
|
|
6226
|
-
return colors[theme][variant];
|
|
6151
|
+
}));
|
|
6227
6152
|
};
|
|
6228
|
-
|
|
6229
|
-
const
|
|
6230
|
-
|
|
6231
|
-
|
|
6153
|
+
|
|
6154
|
+
const getDisabledColors = (variant, loading, theme) => {
|
|
6155
|
+
const { contrastMediumColor, contrastHighColor, disabledColor, hoverColor } = getThemedColors(theme);
|
|
6156
|
+
const colors = {
|
|
6157
|
+
primary: {
|
|
6158
|
+
textColor: contrastHighColor,
|
|
6159
|
+
borderColor: loading ? contrastHighColor : disabledColor,
|
|
6160
|
+
backgroundColor: loading ? contrastHighColor : disabledColor,
|
|
6161
|
+
},
|
|
6162
|
+
secondary: {
|
|
6163
|
+
textColor: disabledColor,
|
|
6164
|
+
borderColor: loading ? contrastMediumColor : disabledColor,
|
|
6165
|
+
backgroundColor: loading ? hoverColor : 'transparent',
|
|
6166
|
+
},
|
|
6232
6167
|
};
|
|
6168
|
+
return colors[variant === 'tertiary' ? 'secondary' : variant];
|
|
6233
6169
|
};
|
|
6234
|
-
const
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6170
|
+
const getComponentCss$O = (icon, iconSource, variant, hideLabel, disabled, loading, theme) => {
|
|
6171
|
+
const disabledOrLoading = isDisabledOrLoading(disabled, loading);
|
|
6172
|
+
const { textColor, borderColor, backgroundColor } = getDisabledColors(variant, loading, theme);
|
|
6173
|
+
const isPrimary = variant === 'primary';
|
|
6174
|
+
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, disabledOrLoading, false, theme), Object.assign(Object.assign({ root: Object.assign(Object.assign({ cursor: disabledOrLoading ? 'not-allowed' : 'pointer' }, (disabledOrLoading && {
|
|
6175
|
+
backgroundColor,
|
|
6176
|
+
borderColor,
|
|
6177
|
+
color: textColor,
|
|
6178
|
+
})), ((loading && !isPrimary) && frostedGlassStyle)) }, (loading && {
|
|
6179
|
+
spinner: {
|
|
6180
|
+
width: fontLineHeight,
|
|
6181
|
+
height: fontLineHeight,
|
|
6182
|
+
pointerEvents: 'none',
|
|
6183
|
+
position: 'absolute',
|
|
6238
6184
|
top: '50%',
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
};
|
|
6247
|
-
const getLabelJssStyle = (hideLabel) => {
|
|
6248
|
-
return hideLabel
|
|
6249
|
-
? {
|
|
6250
|
-
width: '1px',
|
|
6251
|
-
height: '1px',
|
|
6252
|
-
margin: '0 0 0 -1px',
|
|
6253
|
-
overflow: 'hidden',
|
|
6254
|
-
textIndent: '-1px',
|
|
6255
|
-
}
|
|
6256
|
-
: {
|
|
6257
|
-
width: '100%',
|
|
6258
|
-
height: 'auto',
|
|
6259
|
-
margin: 0,
|
|
6260
|
-
overflow: 'visible',
|
|
6261
|
-
textIndent: 0,
|
|
6262
|
-
};
|
|
6263
|
-
};
|
|
6264
|
-
const getSlottedLinkJssStyle = (hideLabel) => {
|
|
6265
|
-
return hideLabel
|
|
6266
|
-
? Object.assign(Object.assign({ position: 'absolute' }, getInsetJssStyle()), { padding: 0, overflow: 'hidden', whiteSpace: 'nowrap', textIndent: '99999px' }) : Object.assign(Object.assign({ position: 'static' }, getInsetJssStyle('auto')), { padding: linkButtonPadding, overflow: 'visible', whiteSpace: 'normal', textIndent: 0 });
|
|
6267
|
-
};
|
|
6268
|
-
const getLinkButtonStyles = (variant, hideLabel, isDisabledOrLoading, hasSlottedAnchor, theme) => {
|
|
6269
|
-
const isDarkTheme = isThemeDark(theme);
|
|
6270
|
-
const isTertiary = variant === 'tertiary';
|
|
6271
|
-
const { primaryColor, primaryColorHover, baseColor } = getVariantColors(variant, theme);
|
|
6272
|
-
const { disabledColor } = getThemedColors(theme);
|
|
6273
|
-
const iconLabelColor = isDisabledOrLoading ? (isTertiary ? disabledColor : 'rgba(255,255,255,0.55)') : baseColor;
|
|
6274
|
-
return {
|
|
6275
|
-
'@global': Object.assign(Object.assign({ ':host': {
|
|
6276
|
-
display: 'inline-flex',
|
|
6277
|
-
verticalAlign: 'top',
|
|
6278
|
-
outline: addImportantToRule(0),
|
|
6279
|
-
} }, (hasSlottedAnchor && {
|
|
6280
|
-
'::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(a)': Object.assign({ display: 'block', textDecoration: 'none', color: 'inherit', lineHeight: 'inherit', outline: 'transparent solid 1px', outlineOffset: '3px' }, buildResponsiveStyles(hideLabel, getSlottedLinkJssStyle)),
|
|
6281
|
-
// TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
|
|
6282
|
-
'&(a::-moz-focus-inner)': {
|
|
6283
|
-
border: 0,
|
|
6284
|
-
}, '&(a:focus)': {
|
|
6285
|
-
outlineColor: primaryColor,
|
|
6286
|
-
} }, hoverMediaQuery({
|
|
6287
|
-
'&(a:hover:focus)': {
|
|
6288
|
-
outlineColor: primaryColorHover,
|
|
6289
|
-
},
|
|
6290
|
-
})), { '&(a:focus:not(:focus-visible))': {
|
|
6291
|
-
outlineColor: 'transparent',
|
|
6292
|
-
} })),
|
|
6293
|
-
})), { span: Object.assign(Object.assign({ display: 'block', width: '100%', color: iconLabelColor }, textSmall), (!hasSlottedAnchor && buildResponsiveStyles(hideLabel, getLabelJssStyle))) }),
|
|
6294
|
-
// TODO: reduce to only necessary styles (e.g. why boxSizing?)
|
|
6295
|
-
// TODO: overhead in link styles when slotted anchor is used
|
|
6296
|
-
// TODO: overhead due that link does not need same "reset" styles as button
|
|
6297
|
-
root: Object.assign(Object.assign({ display: 'flex', width: '100%', minWidth: pxToRemWithUnit(48), minHeight: pxToRemWithUnit(48), position: 'relative', margin: 0, padding: 0, boxSizing: 'border-box', outline: 'transparent none', appearance: 'none', cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer', textDecoration: 'none', textAlign: 'left', border: '1px solid currentColor', backgroundColor: isTertiary ? 'transparent' : 'currentColor', color: isDisabledOrLoading ? disabledColor : primaryColor, transition: ['background-color', 'border-color', 'color'].map(getTransition).join() }, (!hasSlottedAnchor && Object.assign(Object.assign({}, buildResponsiveStyles(hideLabel, getRootJssStyle)), getFocusJssStyle()))), (!isDisabledOrLoading &&
|
|
6298
|
-
hoverMediaQuery({
|
|
6299
|
-
'&:hover, &:active': Object.assign({ color: primaryColorHover }, (isTertiary && {
|
|
6300
|
-
backgroundColor: 'currentColor',
|
|
6301
|
-
'& > span, & > $icon': {
|
|
6302
|
-
color: isDarkTheme ? lightThemeBaseColor : darkThemeBaseColor,
|
|
6303
|
-
},
|
|
6304
|
-
})),
|
|
6305
|
-
}))),
|
|
6306
|
-
icon: Object.assign({ position: 'absolute', width: pxToRemWithUnit(24), height: pxToRemWithUnit(24), color: iconLabelColor, pointerEvents: 'none' }, buildResponsiveStyles(hideLabel, getIconJssStyle)),
|
|
6307
|
-
};
|
|
6308
|
-
};
|
|
6309
|
-
|
|
6310
|
-
const getComponentCss$N = (variant, hideLabel, isDisabledOrLoading, theme) => {
|
|
6311
|
-
return getCss(getLinkButtonStyles(variant, hideLabel, isDisabledOrLoading, false, theme));
|
|
6185
|
+
left: '50%',
|
|
6186
|
+
transform: 'translate(-50%, -50%)',
|
|
6187
|
+
},
|
|
6188
|
+
})), { label: Object.assign({ transition: getTransition('opacity') }, (loading && {
|
|
6189
|
+
opacity: 0, // use opacity for smooth transition between states
|
|
6190
|
+
})), icon: Object.assign({ transition: getTransition('opacity') }, (loading && {
|
|
6191
|
+
opacity: 0, // use opacity for smooth transition between states
|
|
6192
|
+
})) })));
|
|
6312
6193
|
};
|
|
6313
6194
|
|
|
6314
6195
|
const bulletActiveClass = 'bullet--active';
|
|
6315
|
-
const mediaQueryS
|
|
6316
|
-
const mediaQueryXl$1 =
|
|
6317
|
-
const getComponentCss$
|
|
6318
|
-
const {
|
|
6196
|
+
const mediaQueryS = getMediaQueryMin('s');
|
|
6197
|
+
const mediaQueryXl$1 = getMediaQueryMin('xl');
|
|
6198
|
+
const getComponentCss$N = (wrapContent, disablePagination, theme) => {
|
|
6199
|
+
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
6319
6200
|
return getCss(Object.assign({ '@global': {
|
|
6320
|
-
':host': addImportantToEachRule({
|
|
6321
|
-
display: 'grid',
|
|
6322
|
-
maxWidth: gridMaxWidth,
|
|
6323
|
-
marginLeft: 'auto',
|
|
6324
|
-
marginRight: 'auto',
|
|
6325
|
-
gap: pxToRemWithUnit(24),
|
|
6326
|
-
gridAutoFlow: 'row',
|
|
6327
|
-
[mediaQueryXl$1]: {
|
|
6201
|
+
':host': addImportantToEachRule(Object.assign({ display: 'grid', maxWidth: gridWidthMax, marginLeft: 'auto', marginRight: 'auto', gap: pxToRemWithUnit(24), gridAutoFlow: 'row', [mediaQueryXl$1]: {
|
|
6328
6202
|
gap: pxToRemWithUnit(32),
|
|
6329
|
-
},
|
|
6330
|
-
}),
|
|
6331
|
-
'
|
|
6332
|
-
'p,::slotted([slot=description])': addImportantToEachRule(Object.assign(Object.assign({}, textSmall), { margin: 0, color: baseColor, maxWidth: pxToRemWithUnit(550), gridColumn: 1 })),
|
|
6203
|
+
} }, hostHiddenStyles)),
|
|
6204
|
+
'h2,::slotted([slot=heading])': addImportantToEachRule(Object.assign(Object.assign({}, headingMediumStyle), { margin: 0, color: primaryColor, maxWidth: pxToRemWithUnit(900) })),
|
|
6205
|
+
'p,::slotted([slot=description])': addImportantToEachRule(Object.assign(Object.assign({}, textSmallStyle), { margin: 0, color: primaryColor, maxWidth: pxToRemWithUnit(550), gridColumn: 1 })),
|
|
6333
6206
|
}, splide: {
|
|
6334
6207
|
overflow: 'hidden',
|
|
6335
6208
|
// visibility: 'hidden',
|
|
6336
6209
|
'&__track': Object.assign(Object.assign({ cursor: 'grab' }, (wrapContent &&
|
|
6337
6210
|
addImportantToEachRule({
|
|
6338
|
-
|
|
6211
|
+
// TODO: 0 calc(${gridSafeZoneBase} + ${gridGap})
|
|
6212
|
+
padding: `0 calc(${gridSafeZoneBase} + 7%) 0 ${gridSafeZoneBase}`,
|
|
6339
6213
|
[mediaQueryXl$1]: {
|
|
6340
|
-
padding: `0 calc(${
|
|
6214
|
+
padding: `0 calc(${gridSafeZoneBase} + 7%) 0 ${gridSafeZoneBase}`,
|
|
6341
6215
|
},
|
|
6342
6216
|
}))), { '&--draggable': {
|
|
6343
6217
|
userSelect: 'none',
|
|
@@ -6357,28 +6231,23 @@ const getComponentCss$M = (wrapContent, disablePagination, theme) => {
|
|
|
6357
6231
|
// }
|
|
6358
6232
|
header: {
|
|
6359
6233
|
display: 'grid',
|
|
6360
|
-
gap:
|
|
6361
|
-
padding: wrapContent ? `0 ${
|
|
6362
|
-
[mediaQueryS
|
|
6234
|
+
gap: gridGap,
|
|
6235
|
+
padding: wrapContent ? `0 ${gridSafeZoneBase}` : null,
|
|
6236
|
+
[mediaQueryS]: {
|
|
6363
6237
|
gridTemplateColumns: `minmax(0px, 1fr) ${pxToRemWithUnit(80)}`,
|
|
6364
6238
|
position: 'relative',
|
|
6365
6239
|
minHeight: pxToRemWithUnit(40), // actual height of prev/next buttons
|
|
6366
6240
|
},
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
},
|
|
6371
|
-
}, nav: Object.assign({ display: 'none', [mediaQueryS$1]: {
|
|
6241
|
+
}, nav: {
|
|
6242
|
+
display: 'none',
|
|
6243
|
+
[mediaQueryS]: {
|
|
6372
6244
|
display: 'grid',
|
|
6373
6245
|
gridAutoFlow: 'column',
|
|
6374
6246
|
position: 'absolute',
|
|
6375
|
-
right: wrapContent ?
|
|
6247
|
+
right: wrapContent ? gridSafeZoneBase : 0,
|
|
6376
6248
|
bottom: 0,
|
|
6377
|
-
} }, (wrapContent && {
|
|
6378
|
-
[mediaQueryXl$1]: {
|
|
6379
|
-
right: gridSafeZone.xl,
|
|
6380
6249
|
},
|
|
6381
|
-
}
|
|
6250
|
+
}, btn: {
|
|
6382
6251
|
padding: pxToRemWithUnit(8),
|
|
6383
6252
|
} }, (disablePagination !== true && {
|
|
6384
6253
|
pagination: Object.assign(Object.assign({}, buildResponsiveStyles(disablePagination, (value) => ({ display: value ? 'none' : 'grid' }))), { gridAutoColumns: pxToRemWithUnit(8), gridAutoFlow: 'column', justifyContent: 'center', gap: pxToRemWithUnit(8), height: pxToRemWithUnit(8) }),
|
|
@@ -6387,20 +6256,11 @@ const getComponentCss$M = (wrapContent, disablePagination, theme) => {
|
|
|
6387
6256
|
background: disabledColor,
|
|
6388
6257
|
},
|
|
6389
6258
|
[bulletActiveClass]: {
|
|
6390
|
-
background:
|
|
6259
|
+
background: primaryColor,
|
|
6391
6260
|
},
|
|
6392
6261
|
})));
|
|
6393
6262
|
};
|
|
6394
6263
|
|
|
6395
|
-
const getFunctionalComponentRequiredStyles = (theme) => {
|
|
6396
|
-
return {
|
|
6397
|
-
required: {
|
|
6398
|
-
userSelect: 'none',
|
|
6399
|
-
color: getThemedColors(theme).errorColor,
|
|
6400
|
-
},
|
|
6401
|
-
};
|
|
6402
|
-
};
|
|
6403
|
-
|
|
6404
6264
|
const getThemedFormStateColors = (theme, state) => {
|
|
6405
6265
|
const themedColors = getThemedColors(theme);
|
|
6406
6266
|
return {
|
|
@@ -6409,101 +6269,170 @@ const getThemedFormStateColors = (theme, state) => {
|
|
|
6409
6269
|
};
|
|
6410
6270
|
};
|
|
6411
6271
|
|
|
6412
|
-
const
|
|
6413
|
-
const getFunctionalComponentStateMessageStyles = (theme, state) => {
|
|
6272
|
+
const getFunctionalComponentRequiredStyles = () => {
|
|
6414
6273
|
return {
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6274
|
+
required: {
|
|
6275
|
+
userSelect: 'none',
|
|
6276
|
+
},
|
|
6418
6277
|
};
|
|
6419
6278
|
};
|
|
6420
6279
|
|
|
6421
|
-
const
|
|
6422
|
-
|
|
6423
|
-
|
|
6280
|
+
const getFunctionalComponentStateMessageStyles = (theme, state) => {
|
|
6281
|
+
return {
|
|
6282
|
+
message: Object.assign(Object.assign({ display: 'flex', gap: spacingStaticXSmall, marginTop: spacingStaticXSmall }, textSmallStyle), { color: getThemedFormStateColors(theme, state).formStateColor, transition: getTransition('color') }),
|
|
6283
|
+
};
|
|
6424
6284
|
};
|
|
6425
6285
|
|
|
6426
|
-
const
|
|
6427
|
-
const
|
|
6428
|
-
const size = pxToRemWithUnit(24);
|
|
6429
|
-
const hasVisibleState = isVisibleFormState(state);
|
|
6430
|
-
const { baseColor, backgroundColor, contrastMediumColor, contrastHighColor, disabledColor } = getThemedColors(theme);
|
|
6286
|
+
const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, theme) => {
|
|
6287
|
+
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
6431
6288
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6432
|
-
const
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
'
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6289
|
+
const uncheckedColor = isDisabled ? disabledColor : formStateColor || contrastMediumColor;
|
|
6290
|
+
const uncheckedHoverColor = formStateHoverColor || primaryColor;
|
|
6291
|
+
const checkedColor = isDisabled ? disabledColor : formStateColor || primaryColor;
|
|
6292
|
+
const checkedHoverColor = formStateHoverColor || contrastHighColor;
|
|
6293
|
+
return Object.assign(Object.assign({ '@global': {
|
|
6294
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({}, hostHiddenStyles), { display: 'block' })),
|
|
6295
|
+
'::slotted': addImportantToEachRule(Object.assign({ '&(input)': {
|
|
6296
|
+
position: 'relative',
|
|
6297
|
+
width: fontLineHeight,
|
|
6298
|
+
height: fontLineHeight,
|
|
6299
|
+
fontFamily,
|
|
6300
|
+
fontSize: '1rem',
|
|
6441
6301
|
flexShrink: 0,
|
|
6442
6302
|
display: 'block',
|
|
6443
6303
|
margin: 0,
|
|
6444
6304
|
padding: 0,
|
|
6445
6305
|
WebkitAppearance: 'none',
|
|
6446
6306
|
appearance: 'none',
|
|
6447
|
-
boxSizing: '
|
|
6448
|
-
backgroundSize:
|
|
6449
|
-
|
|
6450
|
-
backgroundColor,
|
|
6307
|
+
boxSizing: 'content-box',
|
|
6308
|
+
backgroundSize: fontLineHeight,
|
|
6309
|
+
backgroundColor: 'transparent',
|
|
6451
6310
|
transition: ['border-color', 'background-color'].map(getTransition).join(),
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
outline: '1px solid transparent',
|
|
6456
|
-
outlineOffset: '2px',
|
|
6457
|
-
cursor: 'pointer',
|
|
6311
|
+
border: `2px solid ${uncheckedColor}`,
|
|
6312
|
+
outline: 0,
|
|
6313
|
+
cursor: isDisabled ? 'not-allowed' : 'pointer',
|
|
6458
6314
|
}, '&(input:checked)': {
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
borderColor:
|
|
6464
|
-
backgroundColor: formStateColor || contrastHighColor,
|
|
6465
|
-
} }, hoverMediaQuery({
|
|
6466
|
-
'&(input:not(:disabled):hover), .label:hover ~ &(input:not(:disabled))': {
|
|
6467
|
-
borderColor: formStateHoverColor || baseColor,
|
|
6315
|
+
borderColor: checkedColor,
|
|
6316
|
+
backgroundColor: checkedColor,
|
|
6317
|
+
} }, (!isDisabled && Object.assign(Object.assign({}, hoverMediaQuery({
|
|
6318
|
+
'&(input:hover), .text:hover ~ &(input)': {
|
|
6319
|
+
borderColor: uncheckedHoverColor,
|
|
6468
6320
|
},
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
}, '&(input:focus:not(:focus-visible))': {
|
|
6477
|
-
outlineColor: 'transparent',
|
|
6478
|
-
} })),
|
|
6321
|
+
'&(input:checked:hover), .text:hover ~ &(input:checked)': {
|
|
6322
|
+
borderColor: checkedHoverColor,
|
|
6323
|
+
backgroundColor: checkedHoverColor,
|
|
6324
|
+
},
|
|
6325
|
+
})), { '&(input:focus)::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-6)), { border: `${borderWidthBase} solid ${focusColor}` }), '&(input:focus:not(:focus-visible))::before': {
|
|
6326
|
+
borderColor: 'transparent',
|
|
6327
|
+
} })))),
|
|
6479
6328
|
label: {
|
|
6480
6329
|
position: 'relative',
|
|
6481
6330
|
display: 'flex',
|
|
6331
|
+
alignItems: 'flex-start',
|
|
6482
6332
|
},
|
|
6483
|
-
},
|
|
6333
|
+
}, text: Object.assign(Object.assign(Object.assign({ order: 1, cursor: isDisabled ? 'default' : 'pointer' }, textSmallStyle), { color: isDisabled ? disabledColor : primaryColor, transition: getTransition('color') }), buildResponsiveStyles(hideLabel, getFormCheckboxRadioHiddenJssStyle)) }, getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state));
|
|
6484
6334
|
};
|
|
6485
6335
|
|
|
6486
|
-
const
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6336
|
+
const getInlineSVGBackgroundImage = (path) => {
|
|
6337
|
+
return `url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">${path}</svg>')`;
|
|
6338
|
+
};
|
|
6339
|
+
|
|
6340
|
+
const getComponentCss$M = (hideLabel, state, isDisabled, theme) => {
|
|
6341
|
+
const checkedIconColor = getThemedColors(theme === 'light' ? 'dark' : 'light').primaryColor.replace(/#/g, '%23');
|
|
6342
|
+
const indeterminateIconColor = getThemedColors(theme).primaryColor.replace(/#/g, '%23');
|
|
6343
|
+
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, theme), {
|
|
6344
|
+
'@global': {
|
|
6345
|
+
'::slotted': addImportantToEachRule(Object.assign({ '&(input)': {
|
|
6346
|
+
borderRadius: borderRadiusSmall,
|
|
6347
|
+
}, '&(input:checked)': {
|
|
6348
|
+
backgroundImage: getInlineSVGBackgroundImage(`<path fill="${checkedIconColor}" d="m20.22,7.47l-1.47-1.42-9.26,9.02-4.24-4.15-1.47,1.42,5.71,5.6,10.73-10.47Z"/>`),
|
|
6349
|
+
}, '&(input:indeterminate)': {
|
|
6350
|
+
backgroundImage: getInlineSVGBackgroundImage(`<path fill="${indeterminateIconColor}" d="m20,11v2H4v-2h16Z"/>`),
|
|
6351
|
+
} }, (!isDisabled && {
|
|
6352
|
+
'&(input:focus)::before': {
|
|
6353
|
+
borderRadius: borderRadiusMedium,
|
|
6354
|
+
},
|
|
6355
|
+
}))),
|
|
6493
6356
|
},
|
|
6494
|
-
}
|
|
6495
|
-
extended: {
|
|
6496
|
-
maxWidth: gridMaxWidth,
|
|
6497
|
-
},
|
|
6357
|
+
}));
|
|
6498
6358
|
};
|
|
6499
|
-
|
|
6359
|
+
|
|
6360
|
+
const getComponentCss$L = (width) => {
|
|
6500
6361
|
return getCss({
|
|
6501
6362
|
'@global': {
|
|
6502
|
-
':host': {
|
|
6503
|
-
|
|
6363
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
6364
|
+
},
|
|
6365
|
+
root: getContentWrapperStyle(width),
|
|
6366
|
+
});
|
|
6367
|
+
};
|
|
6368
|
+
|
|
6369
|
+
const DISPLAY_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
6370
|
+
|
|
6371
|
+
const getThemedTypographyColor = (theme, textColor) => {
|
|
6372
|
+
const { primaryColor, contrastHighColor, contrastMediumColor, contrastLowColor, successColor, errorColor, warningColor, infoColor, } = getThemedColors(theme);
|
|
6373
|
+
const colorMap = {
|
|
6374
|
+
primary: primaryColor,
|
|
6375
|
+
brand: primaryColor,
|
|
6376
|
+
default: primaryColor,
|
|
6377
|
+
'contrast-low': contrastLowColor,
|
|
6378
|
+
'neutral-contrast-low': contrastLowColor,
|
|
6379
|
+
'contrast-medium': contrastMediumColor,
|
|
6380
|
+
'neutral-contrast-medium': contrastMediumColor,
|
|
6381
|
+
'contrast-high': contrastHighColor,
|
|
6382
|
+
'neutral-contrast-high': contrastHighColor,
|
|
6383
|
+
'notification-success': successColor,
|
|
6384
|
+
'notification-warning': warningColor,
|
|
6385
|
+
'notification-error': errorColor,
|
|
6386
|
+
'notification-info': infoColor,
|
|
6387
|
+
'notification-neutral': infoColor,
|
|
6388
|
+
inherit: 'currentColor',
|
|
6389
|
+
};
|
|
6390
|
+
return colorMap[textColor];
|
|
6391
|
+
};
|
|
6392
|
+
|
|
6393
|
+
const getTypographyRootJssStyle = (baseTextStyle, responsiveStyle, align, color, ellipsis, theme) => {
|
|
6394
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({ margin: 0, padding: 0 }, baseTextStyle), { color: getThemedTypographyColor(theme, color), textAlign: align, letterSpacing: 'normal', listStyleType: 'none', whiteSpace: 'inherit' }), (ellipsis && {
|
|
6395
|
+
maxWidth: '100%',
|
|
6396
|
+
overflow: 'hidden',
|
|
6397
|
+
textOverflow: 'ellipsis',
|
|
6398
|
+
whiteSpace: 'nowrap',
|
|
6399
|
+
})), responsiveStyle);
|
|
6400
|
+
};
|
|
6401
|
+
const getTypographySlottedJssStyle = () => {
|
|
6402
|
+
return {
|
|
6403
|
+
margin: 'inherit',
|
|
6404
|
+
padding: 'inherit',
|
|
6405
|
+
fontFamily: 'inherit',
|
|
6406
|
+
fontWeight: 'inherit',
|
|
6407
|
+
fontSize: 'inherit',
|
|
6408
|
+
lineHeight: 'inherit',
|
|
6409
|
+
fontStyle: 'inherit',
|
|
6410
|
+
fontVariant: 'inherit',
|
|
6411
|
+
color: 'inherit',
|
|
6412
|
+
textAlign: 'inherit',
|
|
6413
|
+
overflowWrap: 'inherit',
|
|
6414
|
+
wordWrap: 'inherit',
|
|
6415
|
+
hyphens: 'inherit',
|
|
6416
|
+
whiteSpace: 'inherit',
|
|
6417
|
+
letterSpacing: 'inherit',
|
|
6418
|
+
};
|
|
6419
|
+
};
|
|
6420
|
+
|
|
6421
|
+
const sizeMap$5 = {
|
|
6422
|
+
medium: fontSizeDisplayMedium,
|
|
6423
|
+
large: fontSizeDisplayLarge,
|
|
6424
|
+
};
|
|
6425
|
+
const getComponentCss$K = (size, align, color, ellipsis, theme) => {
|
|
6426
|
+
return getCss({
|
|
6427
|
+
'@global': {
|
|
6428
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
6429
|
+
'::slotted': {
|
|
6430
|
+
[DISPLAY_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
6504
6431
|
},
|
|
6505
6432
|
},
|
|
6506
|
-
root:
|
|
6433
|
+
root: getTypographyRootJssStyle(displayLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
6434
|
+
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$5[sizeValue],
|
|
6435
|
+
})), align, color, ellipsis, theme),
|
|
6507
6436
|
});
|
|
6508
6437
|
};
|
|
6509
6438
|
|
|
@@ -6516,28 +6445,22 @@ const getComponentCss$J = (color, orientation, theme) => {
|
|
|
6516
6445
|
};
|
|
6517
6446
|
return getCss({
|
|
6518
6447
|
'@global': {
|
|
6519
|
-
':host': {
|
|
6520
|
-
display: 'block',
|
|
6521
|
-
},
|
|
6448
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
6522
6449
|
hr: Object.assign({ margin: 0, padding: 0, border: 'none', textAlign: 'left', background: colorMap[color] }, buildResponsiveStyles(orientation, (o) => o === 'horizontal' ? { height: '1px', width: '100%' } : { height: '100%', width: '1px' })),
|
|
6523
6450
|
},
|
|
6524
6451
|
});
|
|
6525
6452
|
};
|
|
6526
6453
|
|
|
6527
|
-
const
|
|
6528
|
-
|
|
6529
|
-
const theme = 'light';
|
|
6530
|
-
return getCss(Object.assign(Object.assign({ '@global': Object.assign({ ':host': {
|
|
6531
|
-
display: addImportantToRule('block'),
|
|
6532
|
-
}, fieldset: {
|
|
6454
|
+
const getComponentCss$I = (state, labelSize, hasLabel, theme) => {
|
|
6455
|
+
return getCss(Object.assign(Object.assign({ '@global': Object.assign({ ':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)), fieldset: {
|
|
6533
6456
|
margin: 0,
|
|
6534
6457
|
padding: 0,
|
|
6535
6458
|
border: 'none',
|
|
6536
6459
|
} }, (hasLabel && {
|
|
6537
|
-
legend: Object.assign({ margin: `0 0 ${
|
|
6538
|
-
})) }, getFunctionalComponentRequiredStyles(
|
|
6460
|
+
legend: Object.assign({ margin: `0 0 ${spacingStaticMedium}`, padding: 0, color: getThemedColors(theme).primaryColor }, (labelSize === 'small' ? headingSmallStyle : headingMediumStyle)),
|
|
6461
|
+
})) }, getFunctionalComponentRequiredStyles()), mergeDeep(getFunctionalComponentStateMessageStyles(theme, state), {
|
|
6539
6462
|
message: {
|
|
6540
|
-
marginTop:
|
|
6463
|
+
marginTop: spacingStaticMedium,
|
|
6541
6464
|
},
|
|
6542
6465
|
})));
|
|
6543
6466
|
};
|
|
@@ -6555,7 +6478,7 @@ const flexItemWidths = {
|
|
|
6555
6478
|
const getComponentCss$H = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
6556
6479
|
return getCss({
|
|
6557
6480
|
'@global': {
|
|
6558
|
-
':host': addImportantToEachRule(Object.assign({ boxSizing: 'border-box' }, mergeDeep(buildResponsiveStyles(width, (widthResponsive) => ({
|
|
6481
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ boxSizing: 'border-box' }, hostHiddenStyles), mergeDeep(buildResponsiveStyles(width, (widthResponsive) => ({
|
|
6559
6482
|
width: `${flexItemWidths[widthResponsive]}%`,
|
|
6560
6483
|
})), buildResponsiveStyles(offset, (offsetResponsive) => ({
|
|
6561
6484
|
marginLeft: `${flexItemWidths[offsetResponsive]}%`,
|
|
@@ -6573,7 +6496,7 @@ const getComponentCss$H = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
|
6573
6496
|
const getComponentCss$G = (inline, wrap, direction, justifyContent, alignItems, alignContent) => {
|
|
6574
6497
|
return getCss({
|
|
6575
6498
|
'@global': {
|
|
6576
|
-
':host': addImportantToEachRule(mergeDeep(buildResponsiveStyles(inline, (inlineResponsive) => ({
|
|
6499
|
+
':host': addImportantToEachRule(mergeDeep(hostHiddenStyles, buildResponsiveStyles(inline, (inlineResponsive) => ({
|
|
6577
6500
|
display: inlineResponsive ? 'inline-flex' : 'flex',
|
|
6578
6501
|
})), buildResponsiveStyles(wrap, (flexWrapResponsive) => ({ flexWrap: flexWrapResponsive })), buildResponsiveStyles(direction, (flexDirectionResponsive) => ({
|
|
6579
6502
|
flexDirection: flexDirectionResponsive,
|
|
@@ -6588,295 +6511,332 @@ const getComponentCss$G = (inline, wrap, direction, justifyContent, alignItems,
|
|
|
6588
6511
|
});
|
|
6589
6512
|
};
|
|
6590
6513
|
|
|
6514
|
+
const gutter$1 = `calc(${gridGap} / 2)`;
|
|
6591
6515
|
const gridItemWidths = [
|
|
6592
6516
|
0, 8.333333, 16.666667, 25, 33.333333, 41.666667, 50, 58.333333, 66.666667, 75, 83.333333, 91.666667, 100,
|
|
6593
6517
|
];
|
|
6594
|
-
const getComponentCss$F = (size, offset
|
|
6518
|
+
const getComponentCss$F = (size, offset) => {
|
|
6595
6519
|
return getCss({
|
|
6596
6520
|
'@global': {
|
|
6597
|
-
':host': addImportantToEachRule(Object.assign({ boxSizing: 'border-box' }, mergeDeep(buildResponsiveStyles(size, (sizeResponsive) => ({
|
|
6521
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ paddingLeft: gutter$1, paddingRight: gutter$1, boxSizing: 'border-box' }, hostHiddenStyles), mergeDeep(buildResponsiveStyles(size, (sizeResponsive) => ({
|
|
6598
6522
|
width: `${gridItemWidths[sizeResponsive]}%`,
|
|
6599
6523
|
minWidth: `${gridItemWidths[sizeResponsive]}%`,
|
|
6600
6524
|
})), buildResponsiveStyles(offset, (offsetResponsive) => ({
|
|
6601
6525
|
marginLeft: `${gridItemWidths[offsetResponsive]}%`,
|
|
6602
|
-
})),
|
|
6603
|
-
const gutterRem = pxToRemWithUnit(gutterResponsive / 2);
|
|
6604
|
-
return {
|
|
6605
|
-
paddingLeft: gutterRem,
|
|
6606
|
-
paddingRight: gutterRem,
|
|
6607
|
-
};
|
|
6608
|
-
})))),
|
|
6526
|
+
}))))),
|
|
6609
6527
|
},
|
|
6610
6528
|
});
|
|
6611
6529
|
};
|
|
6612
6530
|
|
|
6613
|
-
const
|
|
6614
|
-
|
|
6615
|
-
return {
|
|
6616
|
-
marginLeft: gutterRem,
|
|
6617
|
-
marginRight: gutterRem,
|
|
6618
|
-
};
|
|
6619
|
-
};
|
|
6620
|
-
const getComponentCss$E = (direction, wrap, gutter) => {
|
|
6531
|
+
const gutter = `calc(${gridGap} / -2)`;
|
|
6532
|
+
const getComponentCss$E = (direction, wrap) => {
|
|
6621
6533
|
return getCss({
|
|
6622
6534
|
'@global': {
|
|
6623
|
-
':host': addImportantToEachRule(Object.assign({ display: 'flex', flex: 'auto', width: 'auto' }, mergeDeep(buildResponsiveStyles(direction, (flexDirection) => ({ flexDirection })), buildResponsiveStyles(wrap, (flexWrap) => ({ flexWrap }))
|
|
6535
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ display: 'flex', flex: 'auto', width: 'auto', marginLeft: gutter, marginRight: gutter }, hostHiddenStyles), mergeDeep(buildResponsiveStyles(direction, (flexDirection) => ({ flexDirection })), buildResponsiveStyles(wrap, (flexWrap) => ({ flexWrap }))))),
|
|
6624
6536
|
},
|
|
6625
6537
|
});
|
|
6626
6538
|
};
|
|
6627
6539
|
|
|
6628
|
-
const
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
lineHeight: 'inherit',
|
|
6636
|
-
fontStyle: 'inherit',
|
|
6637
|
-
fontVariant: 'inherit',
|
|
6638
|
-
color: 'inherit',
|
|
6639
|
-
textAlign: 'inherit',
|
|
6640
|
-
overflowWrap: 'inherit',
|
|
6641
|
-
wordWrap: 'inherit',
|
|
6642
|
-
hyphens: 'inherit',
|
|
6643
|
-
whiteSpace: 'inherit',
|
|
6644
|
-
};
|
|
6540
|
+
const sizeMap$4 = {
|
|
6541
|
+
small: fontSizeHeadingSmall,
|
|
6542
|
+
medium: fontSizeHeadingMedium,
|
|
6543
|
+
large: fontSizeHeadingLarge,
|
|
6544
|
+
'x-large': fontSizeHeadingXLarge,
|
|
6545
|
+
'xx-large': fontSizeHeadingXXLarge,
|
|
6546
|
+
'xxx-large': fontSizeHeadingXXXLarge,
|
|
6645
6547
|
};
|
|
6646
|
-
const
|
|
6647
|
-
return {
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6548
|
+
const getComponentCss$D = (size, align, color, ellipsis, theme) => {
|
|
6549
|
+
return getCss({
|
|
6550
|
+
'@global': {
|
|
6551
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
6552
|
+
'::slotted': {
|
|
6553
|
+
[HEADING_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
6554
|
+
},
|
|
6555
|
+
},
|
|
6556
|
+
root: getTypographyRootJssStyle(headingXXLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
6557
|
+
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$4[sizeValue],
|
|
6558
|
+
})), align, color, ellipsis, theme),
|
|
6559
|
+
});
|
|
6653
6560
|
};
|
|
6654
6561
|
|
|
6655
|
-
const
|
|
6656
|
-
'large-title'
|
|
6657
|
-
'headline-1'
|
|
6658
|
-
'headline-2'
|
|
6659
|
-
'headline-3'
|
|
6660
|
-
'headline-4'
|
|
6661
|
-
'headline-5'
|
|
6562
|
+
const HEADLINE_VARIANTS = [
|
|
6563
|
+
'large-title',
|
|
6564
|
+
'headline-1',
|
|
6565
|
+
'headline-2',
|
|
6566
|
+
'headline-3',
|
|
6567
|
+
'headline-4',
|
|
6568
|
+
'headline-5',
|
|
6569
|
+
];
|
|
6570
|
+
const HEADLINE_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
6571
|
+
const isValidVariantType = (variant) => {
|
|
6572
|
+
return HEADLINE_VARIANTS.includes(variant);
|
|
6662
6573
|
};
|
|
6663
|
-
|
|
6664
|
-
|
|
6574
|
+
|
|
6575
|
+
const headlineSizeMap = {
|
|
6576
|
+
'headline-1': fontSizeHeadingXXLarge,
|
|
6577
|
+
'headline-2': fontSizeHeadingXLarge,
|
|
6578
|
+
'headline-3': fontSizeHeadingLarge,
|
|
6579
|
+
'headline-4': fontSizeHeadingMedium,
|
|
6580
|
+
'headline-5': fontSizeHeadingSmall,
|
|
6665
6581
|
};
|
|
6666
|
-
const
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
? {
|
|
6670
|
-
fontSize: textSize,
|
|
6671
|
-
fontWeight: fontWeightSemiBold,
|
|
6672
|
-
}
|
|
6582
|
+
const getHeadlineVariantJssStyle = (variant) => {
|
|
6583
|
+
return Object.assign({}, (variant === 'large-title'
|
|
6584
|
+
? displayMediumStyle
|
|
6673
6585
|
: {
|
|
6674
|
-
|
|
6675
|
-
};
|
|
6586
|
+
fontSize: headlineSizeMap[variant],
|
|
6587
|
+
}));
|
|
6676
6588
|
};
|
|
6677
|
-
const
|
|
6589
|
+
const textSizeMap = {
|
|
6590
|
+
'x-small': fontSizeTextXSmall,
|
|
6591
|
+
small: fontSizeTextSmall,
|
|
6592
|
+
medium: fontSizeTextMedium,
|
|
6593
|
+
large: fontSizeTextLarge,
|
|
6594
|
+
'x-large': fontSizeTextXLarge,
|
|
6595
|
+
};
|
|
6596
|
+
const getTextSizeJssStyle = (textSize) => {
|
|
6597
|
+
return {
|
|
6598
|
+
fontSize: textSize === 'inherit' ? textSize : textSizeMap[textSize],
|
|
6599
|
+
};
|
|
6600
|
+
};
|
|
6601
|
+
const getComponentCss$C = (variant, align, color, ellipsis, theme) => {
|
|
6678
6602
|
return getCss({
|
|
6679
6603
|
'@global': {
|
|
6680
|
-
':host': {
|
|
6681
|
-
display: 'block',
|
|
6682
|
-
},
|
|
6604
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
6683
6605
|
'::slotted': {
|
|
6684
|
-
|
|
6606
|
+
[HEADLINE_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
6685
6607
|
},
|
|
6686
6608
|
},
|
|
6687
|
-
root:
|
|
6688
|
-
?
|
|
6689
|
-
:
|
|
6609
|
+
root: getTypographyRootJssStyle(headingXXLargeStyle, isValidVariantType(variant)
|
|
6610
|
+
? getHeadlineVariantJssStyle(variant)
|
|
6611
|
+
: buildResponsiveStyles(variant, getTextSizeJssStyle), align, color, ellipsis, theme),
|
|
6690
6612
|
});
|
|
6691
6613
|
};
|
|
6692
6614
|
|
|
6693
|
-
const
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6615
|
+
const sizeMap$3 = {
|
|
6616
|
+
'x-small': fontSizeTextXSmall,
|
|
6617
|
+
small: fontSizeTextSmall,
|
|
6618
|
+
medium: fontSizeTextMedium,
|
|
6619
|
+
large: fontSizeTextLarge,
|
|
6620
|
+
'x-large': fontSizeTextXLarge,
|
|
6621
|
+
};
|
|
6622
|
+
// TODO, use Tuple to reduce chunk size
|
|
6623
|
+
const filterLightPrimary = 'invert(3%) sepia(7%) saturate(2930%) hue-rotate(188deg) brightness(91%) contrast(103%)';
|
|
6624
|
+
const filterLightContrastLow = 'invert(93%) sepia(11%) saturate(36%) hue-rotate(201deg) brightness(89%) contrast(102%)';
|
|
6625
|
+
const filterLightContrastMedium = 'invert(65%) sepia(6%) saturate(119%) hue-rotate(187deg) brightness(90%) contrast(92%)';
|
|
6626
|
+
const filterLightContrastHigh = 'invert(40%) sepia(2%) saturate(686%) hue-rotate(187deg) brightness(80%) contrast(94%)';
|
|
6627
|
+
const filterLightNotificationSuccess = 'invert(62%) sepia(61%) saturate(551%) hue-rotate(86deg) brightness(86%) contrast(80%)';
|
|
6628
|
+
const filterLightNotificationWarning = 'invert(74%) sepia(91%) saturate(343%) hue-rotate(348deg) brightness(92%) contrast(86%)';
|
|
6629
|
+
const filterLightNotificationError = 'invert(25%) sepia(62%) saturate(2003%) hue-rotate(335deg) brightness(100%) contrast(97%)';
|
|
6630
|
+
const filterLightNotificationInfo = 'invert(31%) sepia(32%) saturate(5493%) hue-rotate(216deg) brightness(90%) contrast(107%)';
|
|
6631
|
+
const filterDarkPrimary = 'invert(97%) sepia(55%) saturate(2840%) hue-rotate(180deg) brightness(114%) contrast(103%)';
|
|
6632
|
+
const filterDarkContrastLow = 'invert(20%) sepia(7%) saturate(421%) hue-rotate(202deg) brightness(97%) contrast(82%)';
|
|
6633
|
+
const filterDarkContrastMedium = 'invert(54%) sepia(4%) saturate(229%) hue-rotate(187deg) brightness(91%) contrast(84%)';
|
|
6634
|
+
const filterDarkContrastHigh = 'invert(68%) sepia(6%) saturate(108%) hue-rotate(187deg) brightness(104%) contrast(88%)';
|
|
6635
|
+
const filterDarkNotificationSuccess = 'invert(59%) sepia(22%) saturate(1342%) hue-rotate(86deg) brightness(96%) contrast(88%)';
|
|
6636
|
+
const filterDarkNotificationWarning = 'invert(72%) sepia(94%) saturate(303%) hue-rotate(354deg) brightness(89%) contrast(94%)';
|
|
6637
|
+
const filterDarkNotificationError = 'invert(28%) sepia(34%) saturate(3133%) hue-rotate(333deg) brightness(95%) contrast(100%)';
|
|
6638
|
+
const filterDarkNotificationInfo = 'invert(31%) sepia(32%) saturate(5493%) hue-rotate(216deg) brightness(90%) contrast(107%)';
|
|
6639
|
+
const filter = {
|
|
6640
|
+
light: {
|
|
6641
|
+
primary: filterLightPrimary,
|
|
6642
|
+
brand: filterLightPrimary,
|
|
6643
|
+
default: filterLightPrimary,
|
|
6644
|
+
disabled: filterLightContrastMedium,
|
|
6645
|
+
'contrast-low': filterLightContrastLow,
|
|
6646
|
+
'neutral-contrast-low': filterLightContrastLow,
|
|
6647
|
+
'contrast-medium': filterLightContrastMedium,
|
|
6648
|
+
'neutral-contrast-medium': filterLightContrastMedium,
|
|
6649
|
+
'contrast-high': filterLightContrastHigh,
|
|
6650
|
+
'neutral-contrast-high': filterLightContrastHigh,
|
|
6651
|
+
'notification-success': filterLightNotificationSuccess,
|
|
6652
|
+
'notification-warning': filterLightNotificationWarning,
|
|
6653
|
+
'notification-error': filterLightNotificationError,
|
|
6654
|
+
'notification-info': filterLightNotificationInfo,
|
|
6655
|
+
'notification-neutral': filterLightNotificationInfo, // deprecated
|
|
6656
|
+
},
|
|
6657
|
+
dark: {
|
|
6658
|
+
primary: filterDarkPrimary,
|
|
6659
|
+
brand: filterDarkPrimary,
|
|
6660
|
+
default: filterDarkPrimary,
|
|
6661
|
+
disabled: filterDarkContrastMedium,
|
|
6662
|
+
'contrast-low': filterDarkContrastLow,
|
|
6663
|
+
'neutral-contrast-low': filterDarkContrastLow,
|
|
6664
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
6665
|
+
'neutral-contrast-medium': filterDarkContrastMedium,
|
|
6666
|
+
'contrast-high': filterDarkContrastHigh,
|
|
6667
|
+
'neutral-contrast-high': filterDarkContrastHigh,
|
|
6668
|
+
'notification-success': filterDarkNotificationSuccess,
|
|
6669
|
+
'notification-warning': filterDarkNotificationWarning,
|
|
6670
|
+
'notification-error': filterDarkNotificationError,
|
|
6671
|
+
'notification-info': filterDarkNotificationInfo,
|
|
6672
|
+
'notification-neutral': filterDarkNotificationInfo, // deprecated
|
|
6673
|
+
},
|
|
6708
6674
|
};
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6675
|
+
const forceRerenderAnimationStyle = {
|
|
6676
|
+
'0%': {
|
|
6677
|
+
transform: 'rotateZ(0)',
|
|
6678
|
+
},
|
|
6679
|
+
'100%': {
|
|
6680
|
+
transform: 'rotateZ(0)',
|
|
6681
|
+
},
|
|
6715
6682
|
};
|
|
6716
|
-
const
|
|
6717
|
-
|
|
6683
|
+
const keyFramesLight = 'rerender-light';
|
|
6684
|
+
const keyFramesDark = 'rerender-dark';
|
|
6685
|
+
const getComponentCss$B = (color, size, theme) => {
|
|
6686
|
+
const isColorInherit = color === 'inherit';
|
|
6687
|
+
const isSizeInherit = size === 'inherit';
|
|
6718
6688
|
return getCss({
|
|
6719
|
-
'@global': {
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
},
|
|
6735
|
-
},
|
|
6736
|
-
root: {
|
|
6737
|
-
display: 'flex',
|
|
6738
|
-
flexShrink: 0,
|
|
6739
|
-
margin: 0,
|
|
6740
|
-
padding: 0,
|
|
6741
|
-
boxSizing: 'border-box',
|
|
6742
|
-
width: dimension,
|
|
6743
|
-
height: dimension,
|
|
6744
|
-
color: getThemedTextColor(theme, color),
|
|
6745
|
-
},
|
|
6689
|
+
'@global': Object.assign({ ':host': Object.assign({ display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(hostHiddenStyles)), img: Object.assign(Object.assign({ display: 'block', margin: 0, padding: 0 }, (!isColorInherit && {
|
|
6690
|
+
filter: filter[theme][color],
|
|
6691
|
+
WebkitAnimation: `${theme === 'light' ? keyFramesLight : keyFramesDark} 1ms`, // needed to enforce repaint in Safari if theme is switched programmatically.
|
|
6692
|
+
})), (isSizeInherit
|
|
6693
|
+
? {
|
|
6694
|
+
width: size,
|
|
6695
|
+
height: size,
|
|
6696
|
+
}
|
|
6697
|
+
: {
|
|
6698
|
+
width: fontLineHeight,
|
|
6699
|
+
height: fontLineHeight,
|
|
6700
|
+
font: `${sizeMap$3[size]} ${fontFamily}`,
|
|
6701
|
+
})) }, (!isColorInherit && {
|
|
6702
|
+
[`@keyframes ${isThemeDark(theme) ? keyFramesDark : keyFramesLight}`]: forceRerenderAnimationStyle,
|
|
6703
|
+
})),
|
|
6746
6704
|
});
|
|
6747
6705
|
};
|
|
6748
6706
|
|
|
6749
|
-
const
|
|
6750
|
-
const
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
gridColumnStart: 3,
|
|
6762
|
-
gridRowStart: 1,
|
|
6763
|
-
marginLeft: pxToRemWithUnit(16),
|
|
6764
|
-
},
|
|
6765
|
-
},
|
|
6766
|
-
})), (hasClose && { close: getCloseIconJssStyle() })));
|
|
6707
|
+
const mediaQueryMinS$1 = getMediaQueryMin('s');
|
|
6708
|
+
const mediaQueryMaxS$1 = getMediaQueryMax('s');
|
|
6709
|
+
const getBackgroundColor = (state, theme) => {
|
|
6710
|
+
const { infoSoftColor, successSoftColor, errorSoftColor, warningSoftColor } = getThemedColors(theme);
|
|
6711
|
+
const colorMap = {
|
|
6712
|
+
neutral: infoSoftColor,
|
|
6713
|
+
info: infoSoftColor,
|
|
6714
|
+
warning: warningSoftColor,
|
|
6715
|
+
success: successSoftColor,
|
|
6716
|
+
error: errorSoftColor,
|
|
6717
|
+
};
|
|
6718
|
+
return colorMap[state];
|
|
6767
6719
|
};
|
|
6768
|
-
const getNotificationRootJssStyle = (state, theme) => {
|
|
6769
|
-
const themedColors = getThemedColors(theme);
|
|
6720
|
+
const getNotificationRootJssStyle = (state, hasAction, hasClose, theme) => {
|
|
6770
6721
|
return {
|
|
6771
6722
|
display: 'grid',
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
gridTemplateColumns: '2rem 1fr auto auto',
|
|
6723
|
+
// 2 columns for content and optional close button
|
|
6724
|
+
gridTemplateColumns: `minmax(auto, 1fr)${hasClose ? ' auto' : ''}`,
|
|
6725
|
+
gap: spacingStaticMedium,
|
|
6726
|
+
placeItems: 'start',
|
|
6727
|
+
padding: spacingStaticMedium,
|
|
6728
|
+
background: getBackgroundColor(state, theme),
|
|
6729
|
+
borderRadius: borderRadiusSmall,
|
|
6730
|
+
[mediaQueryMinS$1]: {
|
|
6731
|
+
// 4 columns are for icon, content, optional action button and optional close button
|
|
6732
|
+
gridTemplateColumns: `auto minmax(auto, 1fr)${hasAction ? ' auto' : ''}${hasClose ? ' auto' : ''}`,
|
|
6783
6733
|
},
|
|
6784
6734
|
};
|
|
6785
6735
|
};
|
|
6786
|
-
const getNotificationIconJssStyle = (
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
display: 'inline-flex',
|
|
6790
|
-
color: getThemedColors('light')[`${state}Color`],
|
|
6736
|
+
const getNotificationIconJssStyle = () => ({
|
|
6737
|
+
[mediaQueryMaxS$1]: {
|
|
6738
|
+
display: 'none',
|
|
6791
6739
|
},
|
|
6792
6740
|
});
|
|
6793
6741
|
const getNotificationContentJssStyle = () => ({
|
|
6794
6742
|
display: 'grid',
|
|
6795
|
-
|
|
6796
|
-
maxWidth:
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6743
|
+
gap: spacingStaticXSmall,
|
|
6744
|
+
maxWidth: '50rem',
|
|
6745
|
+
[mediaQueryMinS$1]: {
|
|
6746
|
+
marginLeft: `-${spacingStaticSmall}`,
|
|
6747
|
+
},
|
|
6800
6748
|
});
|
|
6801
6749
|
|
|
6802
|
-
const
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
'
|
|
6750
|
+
const mediaQueryMaxS = getMediaQueryMax('s');
|
|
6751
|
+
const getComponentCss$A = (state, hasAction, hasClose, theme) => {
|
|
6752
|
+
return getCss(Object.assign({ '@global': {
|
|
6753
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({}, getNotificationRootJssStyle(state, hasAction, hasClose, theme)), hostHiddenStyles)),
|
|
6754
|
+
h5: headingSmallStyle,
|
|
6755
|
+
p: textSmallStyle,
|
|
6756
|
+
'h5,p': {
|
|
6757
|
+
margin: 0,
|
|
6758
|
+
color: getThemedColors(theme).primaryColor,
|
|
6759
|
+
},
|
|
6760
|
+
}, icon: getNotificationIconJssStyle(), content: getNotificationContentJssStyle() }, (hasAction && {
|
|
6761
|
+
action: {
|
|
6762
|
+
[mediaQueryMaxS]: {
|
|
6763
|
+
gridRowStart: 2,
|
|
6764
|
+
},
|
|
6765
|
+
},
|
|
6766
|
+
})));
|
|
6767
|
+
};
|
|
6768
|
+
|
|
6769
|
+
const getComponentCss$z = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
|
|
6770
|
+
const { focusColor } = getThemedColors(theme);
|
|
6771
|
+
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
6772
|
+
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme), Object.assign(Object.assign({}, (hasSlottedAnchor && {
|
|
6773
|
+
'@global': addImportantToEachRule({
|
|
6774
|
+
'::slotted': {
|
|
6806
6775
|
'&(a)': {
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
textDecoration: 'none',
|
|
6776
|
+
outline: 0,
|
|
6777
|
+
textDecoration: underline ? 'underline' : 'none',
|
|
6810
6778
|
font: 'inherit',
|
|
6811
6779
|
color: 'inherit',
|
|
6812
|
-
outline: 0,
|
|
6813
6780
|
},
|
|
6814
6781
|
// The clickable area for Safari < ~15 (<= release date: 2021-10-28) is reduced to the slotted anchor itself,
|
|
6815
6782
|
// since Safari prior to this major release does not support pseudo-elements in the slotted context
|
|
6816
6783
|
// (https://bugs.webkit.org/show_bug.cgi?id=178237)
|
|
6817
|
-
'&(a)::before': Object.assign(
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6784
|
+
'&(a)::before': Object.assign({ content: '""', position: 'fixed', top: offsetVertical, bottom: offsetVertical, borderRadius: borderRadiusSmall }, buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
6785
|
+
right: hideLabelValue ? offsetVertical : offsetHorizontal,
|
|
6786
|
+
left: hideLabelValue || hasIcon ? offsetVertical : offsetHorizontal,
|
|
6787
|
+
}))),
|
|
6821
6788
|
'&(a:focus)::before': {
|
|
6822
|
-
|
|
6789
|
+
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6823
6790
|
},
|
|
6824
6791
|
'&(a:focus:not(:focus-visible))::before': {
|
|
6825
|
-
|
|
6792
|
+
border: 0,
|
|
6826
6793
|
},
|
|
6827
|
-
}),
|
|
6828
|
-
'slot[name=subline]::slotted(*)': {
|
|
6829
|
-
margin: 0,
|
|
6830
6794
|
},
|
|
6831
|
-
},
|
|
6832
|
-
}))
|
|
6795
|
+
}),
|
|
6796
|
+
})), { root: {
|
|
6797
|
+
textDecoration: underline ? 'underline' : 'none',
|
|
6798
|
+
} })));
|
|
6833
6799
|
};
|
|
6834
6800
|
|
|
6835
|
-
const
|
|
6836
|
-
const {
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
return getCss({
|
|
6851
|
-
'@global': Object.assign(Object.assign({ ':host': {
|
|
6852
|
-
display: 'inline-flex',
|
|
6853
|
-
verticalAlign: 'top',
|
|
6854
|
-
outline: addImportantToRule(0),
|
|
6855
|
-
} }, (!hasHref && {
|
|
6856
|
-
'::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(a)': Object.assign({ display: 'block', textDecoration: 'none', color: 'inherit', lineHeight: 'inherit', outline: 'transparent solid 1px', outlineOffset: '3px' }, buildResponsiveStyles(hideLabel, getSlottedLinkJssStyle)),
|
|
6801
|
+
const getComponentCss$y = (icon, iconSource, variant, hideLabel, hasSlottedAnchor, theme) => {
|
|
6802
|
+
const { focusColor } = getThemedColors(theme);
|
|
6803
|
+
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, false, hasSlottedAnchor, theme), Object.assign({}, (hasSlottedAnchor && {
|
|
6804
|
+
'@global': addImportantToEachRule({
|
|
6805
|
+
'::slotted': {
|
|
6806
|
+
'&(a)': {
|
|
6807
|
+
outline: 0,
|
|
6808
|
+
textDecoration: 'none',
|
|
6809
|
+
font: 'inherit',
|
|
6810
|
+
color: 'inherit',
|
|
6811
|
+
},
|
|
6812
|
+
// The clickable area for Safari < ~15 (<= release date: 2021-10-28) is reduced to the slotted anchor itself,
|
|
6813
|
+
// since Safari prior to this major release does not support pseudo-elements in the slotted context
|
|
6814
|
+
// (https://bugs.webkit.org/show_bug.cgi?id=178237)
|
|
6815
|
+
'&(a)::before': Object.assign({ content: '""', position: 'fixed', borderRadius: borderRadiusMedium }, getInsetJssStyle(-6)),
|
|
6857
6816
|
// TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
|
|
6858
6817
|
'&(a::-moz-focus-inner)': {
|
|
6859
6818
|
border: 0,
|
|
6860
|
-
}, '&(a:focus)': {
|
|
6861
|
-
outlineColor: baseColor,
|
|
6862
|
-
} }, hoverMediaQuery({
|
|
6863
|
-
'&(a:hover:focus)': {
|
|
6864
|
-
outlineColor: baseColorHover,
|
|
6865
6819
|
},
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
}
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
'&:hover, &:active': {
|
|
6872
|
-
color: baseColorHover,
|
|
6873
|
-
'& span, & $icon': {
|
|
6874
|
-
color: textColorHover,
|
|
6820
|
+
'&(a:focus)::before': {
|
|
6821
|
+
border: `${borderWidthBase} solid ${focusColor}`,
|
|
6822
|
+
},
|
|
6823
|
+
'&(a:focus:not(:focus-visible))::before': {
|
|
6824
|
+
border: 0,
|
|
6875
6825
|
},
|
|
6876
6826
|
},
|
|
6877
|
-
})
|
|
6878
|
-
|
|
6879
|
-
|
|
6827
|
+
}),
|
|
6828
|
+
}))));
|
|
6829
|
+
};
|
|
6830
|
+
|
|
6831
|
+
const fontWeightMap = {
|
|
6832
|
+
thin: fontWeightRegular,
|
|
6833
|
+
regular: fontWeightRegular,
|
|
6834
|
+
semibold: fontWeightSemiBold$1,
|
|
6835
|
+
'semi-bold': fontWeightSemiBold$1,
|
|
6836
|
+
bold: fontWeightBold,
|
|
6837
|
+
};
|
|
6838
|
+
const getFontWeight = (weight) => {
|
|
6839
|
+
return fontWeightMap[weight];
|
|
6880
6840
|
};
|
|
6881
6841
|
|
|
6882
6842
|
const aspectRatioPaddingTop = {
|
|
@@ -6905,31 +6865,26 @@ const getGradientBackground = (isCompact, isTopAligned) => {
|
|
|
6905
6865
|
? `linear-gradient(${gradient} 100%);`
|
|
6906
6866
|
: `linear-gradient(to top, ${gradient} 100%);`;
|
|
6907
6867
|
};
|
|
6908
|
-
const sizeMap$
|
|
6868
|
+
const sizeMap$2 = {
|
|
6909
6869
|
inherit: {
|
|
6910
6870
|
fontSize: 'inherit',
|
|
6911
6871
|
},
|
|
6912
6872
|
default: { fontSize: '1.25rem' },
|
|
6913
6873
|
};
|
|
6914
|
-
const getComponentCss$
|
|
6874
|
+
const getComponentCss$x = (aspectRatio, size, weight, align, compact, hasGradient) => {
|
|
6915
6875
|
const isTopAligned = align === 'top';
|
|
6916
6876
|
const paddingSizeXS = pxToRemWithUnit(24);
|
|
6917
6877
|
const gradientPadding = pxToRemWithUnit(72);
|
|
6918
6878
|
return getCss({
|
|
6919
|
-
'@global': {
|
|
6920
|
-
'
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
height: '100%',
|
|
6927
|
-
width: '100%',
|
|
6928
|
-
objectFit: 'cover',
|
|
6929
|
-
}),
|
|
6879
|
+
'@global': Object.assign(Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ height: 'fit-content' }, hostHiddenStyles))) }, addImportantToEachRule({
|
|
6880
|
+
'::slotted(picture),::slotted(img)': Object.assign({ transition: getTransition('transform') }, getBackfaceVisibilityJssStyle()),
|
|
6881
|
+
'::slotted(picture)': Object.assign({ position: 'absolute' }, getInsetJssStyle()),
|
|
6882
|
+
'::slotted(img)': {
|
|
6883
|
+
height: '100%',
|
|
6884
|
+
width: '100%',
|
|
6885
|
+
objectFit: 'cover',
|
|
6930
6886
|
},
|
|
6931
|
-
|
|
6932
|
-
},
|
|
6887
|
+
})), { p: Object.assign(Object.assign(Object.assign({ color: getThemedTypographyColor('dark', 'primary') }, textSmallStyle), { maxWidth: pxToRemWithUnit(550), margin: 0 }), mergeDeep(buildResponsiveStyles(size, (s) => sizeMap$2[s]), buildResponsiveStyles(weight, (w) => ({ fontWeight: getFontWeight(w) })))) }),
|
|
6933
6888
|
root: Object.assign(Object.assign({ height: 0, position: 'relative', transform: 'translate3d(0,0,0)' }, hoverMediaQuery({
|
|
6934
6889
|
'&:hover': {
|
|
6935
6890
|
'& ::slotted(picture),::slotted(img)': addImportantToEachRule({
|
|
@@ -6943,7 +6898,7 @@ const getComponentCss$y = (aspectRatio, size, weight, align, compact, hasGradien
|
|
|
6943
6898
|
content: Object.assign(Object.assign(Object.assign({ position: 'absolute' }, (isTopAligned ? { top: 0 } : { bottom: 0 })), { left: 0, right: 0, display: 'grid', justifyItems: 'start', padding: align === 'bottom'
|
|
6944
6899
|
? `${gradientPadding} ${paddingSizeXS} ${paddingSizeXS}`
|
|
6945
6900
|
: `${paddingSizeXS} ${paddingSizeXS} ${gradientPadding}`, gap: pxToRemWithUnit(24) }), mergeDeep({
|
|
6946
|
-
[
|
|
6901
|
+
[getMediaQueryMin('s')]: Object.assign({ paddingLeft: pxToRemWithUnit(32), paddingRight: pxToRemWithUnit(32) }, (align === 'bottom' ? { paddingBottom: pxToRemWithUnit(32) } : { paddingTop: pxToRemWithUnit(32) })),
|
|
6947
6902
|
}, hasGradient &&
|
|
6948
6903
|
buildResponsiveStyles(compact, (isCompact) => ({
|
|
6949
6904
|
background: getGradientBackground(isCompact, isTopAligned),
|
|
@@ -6960,10 +6915,6 @@ const getComponentCss$y = (aspectRatio, size, weight, align, compact, hasGradien
|
|
|
6960
6915
|
});
|
|
6961
6916
|
};
|
|
6962
6917
|
|
|
6963
|
-
const getComponentCss$x = (variant, hideLabel, hasSlottedAnchor, theme) => {
|
|
6964
|
-
return getCss(getLinkButtonStyles(variant, hideLabel, false, hasSlottedAnchor, theme));
|
|
6965
|
-
};
|
|
6966
|
-
|
|
6967
6918
|
const baseSizes = {
|
|
6968
6919
|
small: {
|
|
6969
6920
|
width: '100px',
|
|
@@ -6977,15 +6928,14 @@ const baseSizes = {
|
|
|
6977
6928
|
const getComponentCss$w = (size) => {
|
|
6978
6929
|
return getCss({
|
|
6979
6930
|
'@global': {
|
|
6980
|
-
':host': {
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
},
|
|
6986
|
-
a: Object.assign({ display: 'block', textDecoration: 'none' }, getFocusJssStyle({ color: getThemedColors('light').baseColor, offset: 0, pseudo: '::before' })),
|
|
6931
|
+
':host': Object.assign({ position: 'relative', display: 'inline-flex', verticalAlign: 'top' }, addImportantToEachRule(Object.assign({ outline: 0 }, hostHiddenStyles))),
|
|
6932
|
+
a: Object.assign({ display: 'block', textDecoration: 'none' }, getFocusJssStyle({
|
|
6933
|
+
color: getThemedColors('light').primaryColor,
|
|
6934
|
+
offset: 0,
|
|
6935
|
+
pseudo: '::before',
|
|
6936
|
+
})),
|
|
6987
6937
|
picture: Object.assign({ display: 'block' }, (size === 'responsive'
|
|
6988
|
-
? Object.assign(Object.assign({}, baseSizes.small), { [
|
|
6938
|
+
? Object.assign(Object.assign({}, baseSizes.small), { [getMediaQueryMin('l')]: baseSizes.medium }) : baseSizes[size])),
|
|
6989
6939
|
img: {
|
|
6990
6940
|
display: 'block',
|
|
6991
6941
|
width: '100%',
|
|
@@ -6995,33 +6945,9 @@ const getComponentCss$w = (size) => {
|
|
|
6995
6945
|
});
|
|
6996
6946
|
};
|
|
6997
6947
|
|
|
6998
|
-
|
|
6999
|
-
const
|
|
7000
|
-
|
|
7001
|
-
const style = document.createElement('style');
|
|
7002
|
-
document.head.appendChild(style);
|
|
7003
|
-
try {
|
|
7004
|
-
style.sheet.insertRule(':focus-visible{}');
|
|
7005
|
-
}
|
|
7006
|
-
catch (e) {
|
|
7007
|
-
isSupported = false;
|
|
7008
|
-
}
|
|
7009
|
-
finally {
|
|
7010
|
-
style.remove();
|
|
7011
|
-
}
|
|
7012
|
-
return isSupported;
|
|
7013
|
-
};
|
|
7014
|
-
const hasFocusVisibleSupport = hasDocument && supportsFocusVisible();
|
|
7015
|
-
// getter for easy mocking
|
|
7016
|
-
const getHasFocusVisibleSupport = () => hasFocusVisibleSupport;
|
|
7017
|
-
// TODO: remove fallback once :focus-visible is supported by safari
|
|
7018
|
-
const getFocusVisibleFallback = (style) => getHasFocusVisibleSupport() ? style : { outline: 0 };
|
|
7019
|
-
|
|
7020
|
-
const mediaQueryM = mediaQueryMin('m');
|
|
7021
|
-
const mediaQueryXl = mediaQueryMin('xl');
|
|
7022
|
-
const mediaQueryXxl = mediaQueryMin('xxl');
|
|
7023
|
-
const { backgroundColor: lightThemeBackgroundColor } = getThemedColors('light');
|
|
7024
|
-
const { backgroundColor: darkThemeBackgroundColor } = getThemedColors('dark');
|
|
6948
|
+
const mediaQueryXl = getMediaQueryMin('xl');
|
|
6949
|
+
const { backgroundColor, primaryColor: lightThemePrimaryColor } = getThemedColors('light');
|
|
6950
|
+
const { primaryColor: darkThemePrimaryColor } = getThemedColors('dark');
|
|
7025
6951
|
const transitionTimingFunction = 'cubic-bezier(.16,1,.3,1)';
|
|
7026
6952
|
const stretchToFullModalWidthClassName = 'stretch-to-full-modal-width';
|
|
7027
6953
|
const getFullscreenJssStyles = (fullscreen) => {
|
|
@@ -7031,12 +6957,14 @@ const getFullscreenJssStyles = (fullscreen) => {
|
|
|
7031
6957
|
maxWidth: 'none',
|
|
7032
6958
|
minHeight: '100%',
|
|
7033
6959
|
margin: 0,
|
|
6960
|
+
borderRadius: 0,
|
|
7034
6961
|
}
|
|
7035
6962
|
: {
|
|
7036
6963
|
minWidth: pxToRemWithUnit(275.2),
|
|
7037
6964
|
maxWidth: pxToRemWithUnit(1536),
|
|
7038
6965
|
minHeight: 'auto',
|
|
7039
|
-
margin: `max(
|
|
6966
|
+
margin: `max(16px, 7vh) ${gridSafeZoneBase}`,
|
|
6967
|
+
borderRadius: borderRadiusMedium,
|
|
7040
6968
|
};
|
|
7041
6969
|
};
|
|
7042
6970
|
const isFullscreenForXl = (fullscreen) => {
|
|
@@ -7051,118 +6979,133 @@ const isFullscreenForXl = (fullscreen) => {
|
|
|
7051
6979
|
return BREAKPOINTS.indexOf(lastTrueBreakpoint) > BREAKPOINTS.indexOf(lastFalseBreakpoint);
|
|
7052
6980
|
}
|
|
7053
6981
|
};
|
|
7054
|
-
const getSlottedJssStyle = (marginValue, hasHeader) => {
|
|
6982
|
+
const getSlottedJssStyle = (marginValue, hasHeader, disableCloseButton) => {
|
|
6983
|
+
const marginPx = `${-marginValue}px`;
|
|
7055
6984
|
const marginRem = pxToRemWithUnit(-marginValue);
|
|
7056
6985
|
return Object.assign(Object.assign({ [`&(.${stretchToFullModalWidthClassName})`]: {
|
|
7057
|
-
width: `calc(100% + ${
|
|
7058
|
-
margin: `0 ${
|
|
6986
|
+
width: `calc(100% + ${marginValue * 2}px)`,
|
|
6987
|
+
margin: `0 ${marginPx}`,
|
|
7059
6988
|
} }, (!hasHeader && {
|
|
7060
6989
|
[`&(.${stretchToFullModalWidthClassName}:first-child)`]: {
|
|
7061
|
-
marginTop: marginRem,
|
|
6990
|
+
marginTop: !disableCloseButton ? marginRem : marginPx,
|
|
7062
6991
|
},
|
|
7063
6992
|
})), { [`&(.${stretchToFullModalWidthClassName}:last-child)`]: {
|
|
7064
|
-
marginBottom:
|
|
6993
|
+
marginBottom: marginPx,
|
|
7065
6994
|
} });
|
|
7066
6995
|
};
|
|
7067
6996
|
const getComponentCss$v = (open, fullscreen, disableCloseButton, hasHeader) => {
|
|
7068
6997
|
const isFullscreenForXlAndXxl = isFullscreenForXl(fullscreen);
|
|
7069
|
-
const { baseColor } = getThemedColors('light');
|
|
7070
6998
|
return getCss(Object.assign(Object.assign({ '@global': {
|
|
7071
|
-
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign(Object.assign(Object.assign(Object.assign({ position: 'fixed' }, getInsetJssStyle()), { zIndex: MODAL_Z_INDEX, display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap' }), (open
|
|
6999
|
+
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ position: 'fixed' }, getInsetJssStyle()), { zIndex: MODAL_Z_INDEX, display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap' }), (open
|
|
7072
7000
|
? {
|
|
7073
|
-
transition: `opacity .6s ${transitionTimingFunction}`,
|
|
7074
7001
|
opacity: 1,
|
|
7075
7002
|
visibility: 'inherit',
|
|
7076
7003
|
}
|
|
7077
7004
|
: {
|
|
7078
|
-
transition: `opacity .2s ${transitionTimingFunction},visibility 0s linear .2s`,
|
|
7079
7005
|
opacity: 0,
|
|
7080
7006
|
visibility: 'hidden',
|
|
7081
|
-
})), {
|
|
7007
|
+
})), hostHiddenStyles), {
|
|
7082
7008
|
// workaround via pseudo element to fix stacking (black) background in safari
|
|
7083
|
-
'&::before': Object.assign(Object.assign({ content: '""', position: 'fixed' }, getInsetJssStyle()), { background:
|
|
7084
|
-
'::slotted': addImportantToEachRule(Object.assign(
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
}
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7009
|
+
'&::before': Object.assign(Object.assign(Object.assign({ content: '""', position: 'fixed' }, getInsetJssStyle()), { background: themeDarkBackgroundShading }), frostedGlassStyle) }))), { overflowY: 'auto' }),
|
|
7010
|
+
'::slotted': addImportantToEachRule(Object.assign({}, mergeDeep(getSlottedJssStyle(32, hasHeader, disableCloseButton), buildResponsiveStyles(fullscreen, (fullscreenValue) => ({
|
|
7011
|
+
[`&(.${stretchToFullModalWidthClassName}`]: {
|
|
7012
|
+
'&:first-child)': {
|
|
7013
|
+
borderRadius: fullscreenValue ? 0 : '8px 8px 0 0',
|
|
7014
|
+
},
|
|
7015
|
+
'&:last-child)': {
|
|
7016
|
+
borderRadius: fullscreenValue ? 0 : '0 0 8px 8px',
|
|
7017
|
+
},
|
|
7018
|
+
},
|
|
7019
|
+
}))))),
|
|
7020
|
+
h2: Object.assign(Object.assign({}, headingLargeStyle), { margin: 0, color: lightThemePrimaryColor }),
|
|
7021
|
+
}, root: mergeDeep({
|
|
7022
|
+
position: 'relative',
|
|
7023
|
+
boxSizing: 'border-box',
|
|
7024
|
+
transition: `transform .6s ${transitionTimingFunction}`,
|
|
7025
|
+
transform: open ? 'scale3d(1,1,1)' : 'scale3d(.9,.9,1)',
|
|
7026
|
+
padding: !disableCloseButton ? `${pxToRemWithUnit(32)} 32px 32px 32px` : '32px',
|
|
7027
|
+
backgroundColor,
|
|
7028
|
+
outline: 0,
|
|
7029
|
+
'&:focus::before': Object.assign({ content: '""', position: 'fixed', border: `${borderWidthBase} solid` }, buildResponsiveStyles(fullscreen, (fullscreenValue) => (Object.assign({ borderRadius: fullscreenValue ? 0 : '12px', borderColor: fullscreenValue ? lightThemePrimaryColor : darkThemePrimaryColor }, getInsetJssStyle(fullscreenValue ? 0 : -4))))),
|
|
7030
|
+
'&:not(:focus-visible)::before': {
|
|
7031
|
+
border: 0,
|
|
7032
|
+
},
|
|
7033
|
+
[mediaQueryXl]: {
|
|
7034
|
+
margin: isFullscreenForXlAndXxl ? 0 : `min(192px, 10vh) ${gridSafeZoneBase}`,
|
|
7035
|
+
},
|
|
7036
|
+
}, buildResponsiveStyles(fullscreen, getFullscreenJssStyles)) }, (hasHeader && {
|
|
7037
|
+
header: {
|
|
7038
|
+
padding: '0 0 8px',
|
|
7039
|
+
},
|
|
7097
7040
|
})), { close: {
|
|
7098
7041
|
position: 'absolute',
|
|
7099
|
-
top:
|
|
7100
|
-
right:
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7042
|
+
top: '8px',
|
|
7043
|
+
right: '8px',
|
|
7044
|
+
border: `2px solid ${backgroundColor}`,
|
|
7045
|
+
borderRadius: '4px',
|
|
7046
|
+
backgroundColor,
|
|
7047
|
+
'&:hover': {
|
|
7048
|
+
backgroundColor: 'transparent',
|
|
7049
|
+
borderColor: 'transparent',
|
|
7050
|
+
},
|
|
7104
7051
|
} }));
|
|
7105
7052
|
};
|
|
7106
7053
|
|
|
7054
|
+
const mediaQueryMinS = getMediaQueryMin('s');
|
|
7055
|
+
// button size needs to be fluid between 320px and 360px viewport width, so that the pagination fits into 320px viewport
|
|
7056
|
+
// and text scale 200% works (almost) on mobile viewports too
|
|
7057
|
+
const buttonSize = `clamp(36px, calc(${fontLineHeight} + 10vw - 20px), 40px)`;
|
|
7058
|
+
const disabledCursorStyle = {
|
|
7059
|
+
cursor: 'default',
|
|
7060
|
+
pointerEvents: 'none', // prevents :hover (has no effect when forced), maybe we can remove it since CSS selectors already cover desired behavior
|
|
7061
|
+
};
|
|
7107
7062
|
const getComponentCss$u = (maxNumberOfPageLinks, theme) => {
|
|
7108
|
-
const {
|
|
7063
|
+
const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
7109
7064
|
return getCss({
|
|
7110
7065
|
'@global': {
|
|
7111
|
-
':host': {
|
|
7112
|
-
|
|
7113
|
-
outline: addImportantToRule(0),
|
|
7114
|
-
},
|
|
7115
|
-
nav: Object.assign({ display: 'flex', justifyContent: 'center', margin: 0, padding: 0 }, buildResponsiveStyles(maxNumberOfPageLinks, (n) => ({
|
|
7066
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
7067
|
+
nav: Object.assign({ display: 'flex', justifyContent: 'center' }, buildResponsiveStyles(maxNumberOfPageLinks, (n) => ({
|
|
7116
7068
|
counterReset: `size ${n}`,
|
|
7117
7069
|
}))),
|
|
7118
7070
|
ul: {
|
|
7119
7071
|
display: 'flex',
|
|
7072
|
+
gap: spacingStaticXSmall,
|
|
7120
7073
|
margin: 0,
|
|
7121
7074
|
padding: 0,
|
|
7075
|
+
[mediaQueryMinS]: {
|
|
7076
|
+
gap: spacingStaticSmall,
|
|
7077
|
+
},
|
|
7122
7078
|
},
|
|
7123
7079
|
li: {
|
|
7124
7080
|
listStyleType: 'none',
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
span: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center', transition: getTransition('color'), position: 'relative', width: pxToRemWithUnit(40), height: pxToRemWithUnit(40), boxSizing: 'border-box', textDecoration: 'none' }, textSmall), { whiteSpace: 'nowrap', cursor: 'pointer', color: baseColor }), getFocusJssStyle({ color: focusColor, offset: 1 })), hoverMediaQuery({
|
|
7129
|
-
'&:hover': {
|
|
7130
|
-
color: hoverColor,
|
|
7131
|
-
},
|
|
7132
|
-
})), { '&:active': {
|
|
7133
|
-
outline: 'none',
|
|
7134
|
-
color: activeColor,
|
|
7135
|
-
}, '&[aria-disabled]': {
|
|
7136
|
-
cursor: 'default',
|
|
7137
|
-
pointerEvents: 'none',
|
|
7138
|
-
color: disabledColor,
|
|
7139
|
-
}, '&[aria-current]': Object.assign(Object.assign({ cursor: 'default' }, hoverMediaQuery({
|
|
7140
|
-
'&:hover': {
|
|
7141
|
-
color: baseColor,
|
|
7081
|
+
[mediaQueryMinS]: {
|
|
7082
|
+
'&:first-child': {
|
|
7083
|
+
marginRight: spacingStaticSmall,
|
|
7142
7084
|
},
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
bottom: 0,
|
|
7148
|
-
left: pxToRemWithUnit(6),
|
|
7149
|
-
right: pxToRemWithUnit(6),
|
|
7150
|
-
height: pxToRemWithUnit(4),
|
|
7151
|
-
background: brandColor,
|
|
7152
|
-
} }) }),
|
|
7153
|
-
},
|
|
7154
|
-
ellipsis: {
|
|
7155
|
-
cursor: 'default',
|
|
7156
|
-
pointerEvents: 'none',
|
|
7157
|
-
'&::after': {
|
|
7158
|
-
content: '"…"',
|
|
7085
|
+
'&:last-child': {
|
|
7086
|
+
marginLeft: spacingStaticSmall,
|
|
7087
|
+
},
|
|
7088
|
+
},
|
|
7159
7089
|
},
|
|
7090
|
+
span: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', justifyContent: 'center', alignItems: 'center', transition: ['color', 'border-color', 'background-color'].map(getTransition).join(), position: 'relative', width: buttonSize, height: buttonSize, boxSizing: 'border-box' }, textSmallStyle), { whiteSpace: 'nowrap', cursor: 'pointer', color: primaryColor, outline: 0, borderRadius: borderRadiusSmall, borderColor: 'transparent' }), hoverMediaQuery({
|
|
7091
|
+
'&:not([aria-disabled]):not(.ellipsis):hover': Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }),
|
|
7092
|
+
})), { '&:not(.ellipsis):focus::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), { border: `${borderWidthBase} solid ${focusColor}`, borderRadius: borderRadiusMedium }), '&:focus:not(:focus-visible)::before': {
|
|
7093
|
+
borderColor: 'transparent',
|
|
7094
|
+
}, '&[aria-current]': {
|
|
7095
|
+
disabledCursorStyle,
|
|
7096
|
+
color: primaryColor,
|
|
7097
|
+
border: `${borderWidthBase} solid ${primaryColor}`,
|
|
7098
|
+
borderRadius: borderRadiusSmall,
|
|
7099
|
+
'&:not(.ellipsis):focus::before': Object.assign({}, getInsetJssStyle(-6)),
|
|
7100
|
+
}, '&[aria-disabled]': Object.assign(Object.assign({}, disabledCursorStyle), { color: disabledColor }) }),
|
|
7160
7101
|
},
|
|
7102
|
+
ellipsis: Object.assign(Object.assign({}, disabledCursorStyle), { '&::after': {
|
|
7103
|
+
content: '"…"',
|
|
7104
|
+
} }),
|
|
7161
7105
|
});
|
|
7162
7106
|
};
|
|
7163
7107
|
|
|
7164
|
-
const { backgroundColor,
|
|
7165
|
-
const mediaQueryXS = mediaQueryMin('xs');
|
|
7108
|
+
const { backgroundColor: backgroundColorThemeLight, primaryColor: primaryColorThemeLight } = getThemedColors('light');
|
|
7166
7109
|
const mediaQueryForcedColors = '@media (forced-colors: active)';
|
|
7167
7110
|
const directionPositionMap = {
|
|
7168
7111
|
top: {
|
|
@@ -7186,7 +7129,7 @@ const directionPositionMap = {
|
|
|
7186
7129
|
transform: 'translate3d(0, -50%, 0)',
|
|
7187
7130
|
},
|
|
7188
7131
|
};
|
|
7189
|
-
const borderWidth = '
|
|
7132
|
+
const borderWidth = '12px';
|
|
7190
7133
|
const transparentColor = 'transparent';
|
|
7191
7134
|
const canvas = 'canvas';
|
|
7192
7135
|
const canvasText = 'canvastext';
|
|
@@ -7197,7 +7140,7 @@ const directionArrowMap = {
|
|
|
7197
7140
|
left: '50%',
|
|
7198
7141
|
transform: 'translateX(-50%)',
|
|
7199
7142
|
borderWidth: join(borderWidth, borderWidth, 0),
|
|
7200
|
-
borderColor: join(
|
|
7143
|
+
borderColor: join(backgroundColorThemeLight, transparentColor, transparentColor),
|
|
7201
7144
|
[mediaQueryForcedColors]: {
|
|
7202
7145
|
borderColor: join(canvasText, canvas, canvas),
|
|
7203
7146
|
},
|
|
@@ -7207,7 +7150,7 @@ const directionArrowMap = {
|
|
|
7207
7150
|
right: 0,
|
|
7208
7151
|
transform: 'translateY(-50%)',
|
|
7209
7152
|
borderWidth: join(borderWidth, borderWidth, borderWidth, 0),
|
|
7210
|
-
borderColor: join(transparentColor,
|
|
7153
|
+
borderColor: join(transparentColor, backgroundColorThemeLight, transparentColor, transparentColor),
|
|
7211
7154
|
[mediaQueryForcedColors]: {
|
|
7212
7155
|
borderColor: join(canvas, canvasText, canvas, canvas),
|
|
7213
7156
|
},
|
|
@@ -7217,7 +7160,7 @@ const directionArrowMap = {
|
|
|
7217
7160
|
left: '50%',
|
|
7218
7161
|
transform: 'translateX(-50%)',
|
|
7219
7162
|
borderWidth: join(0, borderWidth, borderWidth),
|
|
7220
|
-
borderColor: join(transparentColor, transparentColor,
|
|
7163
|
+
borderColor: join(transparentColor, transparentColor, backgroundColorThemeLight),
|
|
7221
7164
|
[mediaQueryForcedColors]: {
|
|
7222
7165
|
borderColor: join(canvas, canvas, canvasText),
|
|
7223
7166
|
},
|
|
@@ -7227,23 +7170,32 @@ const directionArrowMap = {
|
|
|
7227
7170
|
left: 0,
|
|
7228
7171
|
transform: 'translateY(-50%)',
|
|
7229
7172
|
borderWidth: join(borderWidth, 0, borderWidth, borderWidth),
|
|
7230
|
-
borderColor: join(transparentColor, transparentColor, transparentColor,
|
|
7173
|
+
borderColor: join(transparentColor, transparentColor, transparentColor, backgroundColorThemeLight),
|
|
7231
7174
|
[mediaQueryForcedColors]: {
|
|
7232
7175
|
borderColor: join(canvas, canvas, canvas, canvasText),
|
|
7233
7176
|
},
|
|
7234
7177
|
},
|
|
7235
7178
|
};
|
|
7236
|
-
const getComponentCss$t = (direction) => {
|
|
7237
|
-
const spacerBox = '-
|
|
7179
|
+
const getComponentCss$t = (direction, theme) => {
|
|
7180
|
+
const spacerBox = '-16px';
|
|
7181
|
+
const { hoverColor, focusColor } = getThemedColors(theme);
|
|
7238
7182
|
return getCss({
|
|
7239
7183
|
'@global': {
|
|
7240
|
-
':host': Object.assign(Object.assign({}, addImportantToEachRule({
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
})), {
|
|
7246
|
-
|
|
7184
|
+
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign({ position: 'relative', display: 'inline-block' }, hostHiddenStyles))), { verticalAlign: 'top' }),
|
|
7185
|
+
p: Object.assign(Object.assign({}, textSmallStyle), { margin: 0 }),
|
|
7186
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block', position: 'relative', appearance: 'none', background: 'transparent', border: 0, padding: 0, outline: 0, cursor: 'pointer' }, textSmallStyle), { width: fontLineHeight, height: fontLineHeight, borderRadius: '50%' }), hoverMediaQuery({
|
|
7187
|
+
transition: getTransition('background-color'),
|
|
7188
|
+
'&:hover': Object.assign(Object.assign({}, frostedGlassStyle), { backgroundColor: hoverColor }),
|
|
7189
|
+
})), { '&::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-2)), { border: `${borderWidthBase} solid transparent`, borderRadius: '50%' }), '&:focus::before': {
|
|
7190
|
+
borderColor: focusColor,
|
|
7191
|
+
}, '&:focus:not(:focus-visible)::before': {
|
|
7192
|
+
borderColor: 'transparent',
|
|
7193
|
+
} }),
|
|
7194
|
+
},
|
|
7195
|
+
label: getTextHiddenJssStyle(true),
|
|
7196
|
+
icon: {
|
|
7197
|
+
display: 'inline-block',
|
|
7198
|
+
transform: 'translate3d(0,0,0)', // Fixes movement on hover in Safari
|
|
7247
7199
|
},
|
|
7248
7200
|
spacer: {
|
|
7249
7201
|
position: 'absolute',
|
|
@@ -7252,18 +7204,14 @@ const getComponentCss$t = (direction) => {
|
|
|
7252
7204
|
left: spacerBox,
|
|
7253
7205
|
right: spacerBox,
|
|
7254
7206
|
bottom: spacerBox,
|
|
7255
|
-
filter: 'drop-shadow(0 0
|
|
7207
|
+
filter: 'drop-shadow(0 0 16px rgba(0,0,0,.3))',
|
|
7256
7208
|
backdropFilter: 'drop-shadow(0px 0px 0px transparent)',
|
|
7257
7209
|
pointerEvents: 'none',
|
|
7258
7210
|
animation: '240ms $fadeIn ease forwards'
|
|
7259
7211
|
,
|
|
7260
7212
|
'&::before': Object.assign({ content: '""', position: 'absolute', borderStyle: 'solid' }, directionArrowMap[direction]),
|
|
7261
7213
|
},
|
|
7262
|
-
popover: Object.assign(Object.assign(Object.assign({ position: 'absolute', maxWidth: '90vw', width: 'max-content', boxSizing: 'border-box', background:
|
|
7263
|
-
// TODO: The styles above are our text styles should be extracted as soon as p-text is refactored with JSS
|
|
7264
|
-
color: baseColor$2, whiteSpace: 'inherit', [mediaQueryXS]: {
|
|
7265
|
-
maxWidth: pxToRemWithUnit(432),
|
|
7266
|
-
}, [mediaQueryForcedColors]: {
|
|
7214
|
+
popover: Object.assign(Object.assign(Object.assign({ position: 'absolute', maxWidth: 'min(90vw, 27rem)', width: 'max-content', boxSizing: 'border-box', background: backgroundColorThemeLight, padding: '8px 16px', pointerEvents: 'auto' }, directionPositionMap[direction]), textSmallStyle), { listStyleType: 'none', color: primaryColorThemeLight, whiteSpace: 'inherit', borderRadius: borderRadiusSmall, [mediaQueryForcedColors]: {
|
|
7267
7215
|
outline: `1px solid ${canvasText}`,
|
|
7268
7216
|
} }),
|
|
7269
7217
|
'@keyframes fadeIn': {
|
|
@@ -7277,69 +7225,72 @@ const getComponentCss$t = (direction) => {
|
|
|
7277
7225
|
});
|
|
7278
7226
|
};
|
|
7279
7227
|
|
|
7280
|
-
const
|
|
7281
|
-
const
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7296
|
-
return getCss(Object.assign(Object.assign({ '@global': {
|
|
7297
|
-
':host': {
|
|
7298
|
-
display: 'block',
|
|
7299
|
-
},
|
|
7300
|
-
'::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(input)': Object.assign({ position: 'static', width: size, height: size, flexShrink: 0, display: 'block', margin: pxToRemWithUnit(-2), padding: 0, WebkitAppearance: 'none', appearance: 'none', boxSizing: 'border-box', backgroundSize: size, backgroundPosition: 'center', backgroundColor: 'transparent', transition: getTransition('background-image'), opacity: 1, border: `2px solid ${backgroundColor}`, borderRadius: '50%', outline: 'none', cursor: 'pointer' }, getBackgroundImageStyles(hasVisibleState, backgroundColor, formStateColor || contrastMediumColor)), '&(input:checked)': getBackgroundImageStyles(hasVisibleState, formStateColor || contrastHighColor, formStateColor || contrastHighColor) }, hoverMediaQuery({
|
|
7301
|
-
'&(input:not(:disabled):not(:checked):hover), .label:hover ~ &(input:not(:disabled):not(:checked))': getBackgroundImageStyles(hasVisibleState, backgroundColor, formStateHoverColor || baseColor),
|
|
7302
|
-
'&(input:not(:disabled):checked:hover), .label:hover ~ &(input:not(:disabled):checked)': getBackgroundImageStyles(hasVisibleState, formStateColor || contrastHighColor, formStateHoverColor || baseColor),
|
|
7303
|
-
})), { '&(input:disabled)': Object.assign({ cursor: 'not-allowed' }, getBackgroundImageStyles(hasVisibleState, backgroundColor, disabledColor)), '&(input:checked:disabled)': getBackgroundImageStyles(hasVisibleState, disabledColor, disabledColor), '&(input:focus)': {
|
|
7304
|
-
boxShadow: `0 0 0 1px ${formStateColor || contrastMediumColor}`,
|
|
7305
|
-
}, '&(input:focus:not(:focus-visible))': {
|
|
7306
|
-
boxShadow: 'none',
|
|
7307
|
-
} })),
|
|
7308
|
-
label: {
|
|
7309
|
-
position: 'relative',
|
|
7310
|
-
display: 'flex',
|
|
7311
|
-
},
|
|
7312
|
-
}, label: getCheckboxRadioLabelJssStyle(isDisabled, hideLabel, theme) }, getFunctionalComponentRequiredStyles(theme)), getFunctionalComponentStateMessageStyles(theme, state)));
|
|
7228
|
+
const getComponentCss$s = (hideLabel, state, isDisabled, theme) => {
|
|
7229
|
+
const checkedIconColor = getThemedColors(theme === 'light' ? 'dark' : 'light').primaryColor.replace(/#/g, '%23');
|
|
7230
|
+
return getCss(mergeDeep(getCheckboxRadioJssStyle(hideLabel, state, isDisabled, theme), {
|
|
7231
|
+
'@global': {
|
|
7232
|
+
'::slotted': addImportantToEachRule(Object.assign({ '&(input)': {
|
|
7233
|
+
borderRadius: '50%',
|
|
7234
|
+
}, '&(input:checked)': {
|
|
7235
|
+
backgroundImage: getInlineSVGBackgroundImage(`<circle fill="${checkedIconColor}" cx="12" cy="12" r="6"/>`),
|
|
7236
|
+
} }, (!isDisabled && {
|
|
7237
|
+
'&(input:focus)::before': {
|
|
7238
|
+
borderRadius: '50%',
|
|
7239
|
+
},
|
|
7240
|
+
}))),
|
|
7241
|
+
},
|
|
7242
|
+
}));
|
|
7313
7243
|
};
|
|
7314
7244
|
|
|
7315
|
-
const
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7245
|
+
const gradientColorMap = {
|
|
7246
|
+
light: {
|
|
7247
|
+
default: '255,255,255',
|
|
7248
|
+
surface: '238,239,242',
|
|
7249
|
+
},
|
|
7250
|
+
dark: {
|
|
7251
|
+
default: '14,14,18',
|
|
7252
|
+
surface: '33,34,37',
|
|
7253
|
+
},
|
|
7254
|
+
};
|
|
7255
|
+
const getGradient = (theme, gradientColorTheme) => {
|
|
7256
|
+
const gradientColor = gradientColorMap[theme][gradientColorTheme];
|
|
7257
|
+
return (`rgba(${gradientColor},1) 0%,` +
|
|
7258
|
+
`rgba(${gradientColor},0.9) 10%,` +
|
|
7259
|
+
`rgba(${gradientColor},0.668116) 40%,` +
|
|
7260
|
+
`rgba(${gradientColor},0.331884) 60%,` +
|
|
7261
|
+
`rgba(${gradientColor},0.0816599) 80%,` +
|
|
7262
|
+
`rgba(${gradientColor},0)`);
|
|
7263
|
+
};
|
|
7264
|
+
const getComponentCss$r = (gradientColorTheme, isNextHidden, isPrevHidden, scrollIndicatorPosition, theme) => {
|
|
7265
|
+
const { backgroundColor, backgroundSurfaceColor, focusColor } = getThemedColors('light');
|
|
7266
|
+
const { hoverColor } = getThemedColors(theme);
|
|
7267
|
+
const isDarkTheme = isThemeDark(theme);
|
|
7319
7268
|
const actionPrevNextStyles = {
|
|
7320
7269
|
position: 'relative',
|
|
7321
|
-
padding:
|
|
7270
|
+
padding: '4px 0',
|
|
7322
7271
|
pointerEvents: 'none',
|
|
7323
7272
|
display: 'flex',
|
|
7324
7273
|
alignItems: scrollIndicatorPosition === 'center' ? 'center' : 'flex-start',
|
|
7325
7274
|
};
|
|
7326
7275
|
return getCss({
|
|
7327
7276
|
'@global': {
|
|
7328
|
-
':host': {
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
height: 'inherit',
|
|
7277
|
+
':host': addImportantToEachRule(Object.assign({ display: 'block', height: 'inherit' }, hostHiddenStyles)),
|
|
7278
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', pointerEvents: 'auto', alignItems: 'center', justifyContent: 'center' }, textSmallStyle), { height: `calc(${fontLineHeight} + 4px)`, width: `calc(${fontLineHeight} + 4px)`, border: 0, outline: 0, cursor: 'pointer', background: gradientColorTheme === 'surface' ? backgroundSurfaceColor : backgroundColor, borderRadius: borderRadiusSmall }), frostedGlassStyle), { visibility: 'hidden' }), (!isDarkTheme && dropShadowLowStyle)), hoverMediaQuery({
|
|
7279
|
+
transition: getTransition('background-color'),
|
|
7280
|
+
'&:hover': Object.assign({ background: hoverColor }, (isDarkTheme && {
|
|
7281
|
+
'& > .icon': {
|
|
7282
|
+
filter: 'invert(97%) sepia(55%) saturate(2840%) hue-rotate(180deg) brightness(114%) contrast(103%)', // TODO: this is not shared from icon?
|
|
7283
|
+
},
|
|
7284
|
+
})),
|
|
7285
|
+
})),
|
|
7338
7286
|
},
|
|
7287
|
+
root: Object.assign(Object.assign({ display: 'grid', gridTemplateColumns: '48px minmax(0, 1fr) 48px' }, hoverMediaQuery({
|
|
7288
|
+
// distinguish gradient width on mobile and desktop
|
|
7289
|
+
gridTemplateColumns: '64px minmax(0, 1fr) 64px',
|
|
7290
|
+
})), { margin: '0 -4px', height: 'inherit' }),
|
|
7339
7291
|
'scroll-area': {
|
|
7340
|
-
minHeight: pxToRemWithUnit(24),
|
|
7341
7292
|
gridArea: '1 / 1 / 1 / -1',
|
|
7342
|
-
padding:
|
|
7293
|
+
padding: '4px',
|
|
7343
7294
|
overflow: 'scroll hidden',
|
|
7344
7295
|
msOverflowStyle: 'none' /* IE and Edge */,
|
|
7345
7296
|
scrollbarWidth: 'none' /* Firefox */,
|
|
@@ -7347,9 +7298,23 @@ const getComponentCss$r = (gradientColorScheme, isNextHidden, isPrevHidden, scro
|
|
|
7347
7298
|
display: 'none',
|
|
7348
7299
|
},
|
|
7349
7300
|
},
|
|
7350
|
-
// Extra wrapper needed to compensate different offset parent calculation depending
|
|
7301
|
+
// Extra wrapper needed to compensate different offset parent calculation depending on browser.
|
|
7351
7302
|
// Needed for position of status bar.
|
|
7352
|
-
'scroll-wrapper':
|
|
7303
|
+
'scroll-wrapper': {
|
|
7304
|
+
position: 'relative',
|
|
7305
|
+
display: 'inline-flex',
|
|
7306
|
+
minHeight: '28px',
|
|
7307
|
+
minWidth: '100%',
|
|
7308
|
+
verticalAlign: 'top',
|
|
7309
|
+
outline: 0,
|
|
7310
|
+
'&::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), { border: `${borderWidthBase} solid transparent`, borderRadius: borderRadiusSmall, pointerEvents: 'none' }),
|
|
7311
|
+
'&:focus::before': {
|
|
7312
|
+
borderColor: focusColor,
|
|
7313
|
+
},
|
|
7314
|
+
'&:focus:not(:focus-visible)::before': {
|
|
7315
|
+
borderColor: 'transparent',
|
|
7316
|
+
},
|
|
7317
|
+
},
|
|
7353
7318
|
trigger: {
|
|
7354
7319
|
position: 'absolute',
|
|
7355
7320
|
top: 0,
|
|
@@ -7363,68 +7328,50 @@ const getComponentCss$r = (gradientColorScheme, isNextHidden, isPrevHidden, scro
|
|
|
7363
7328
|
right: 0,
|
|
7364
7329
|
},
|
|
7365
7330
|
},
|
|
7366
|
-
'action-prev': Object.assign(Object.assign({}, actionPrevNextStyles), { marginLeft: '-1px', gridArea: '1 / 1 / 1 / 1', justifyContent: 'flex-start', background: `linear-gradient(
|
|
7367
|
-
|
|
7368
|
-
} }),
|
|
7369
|
-
'action-next': Object.assign(Object.assign({}, actionPrevNextStyles), { marginRight: '-1px', gridArea: '1 / 3 / 1 / 3', justifyContent: 'flex-end', background: `linear-gradient(
|
|
7370
|
-
|
|
7371
|
-
} }),
|
|
7372
|
-
button: {
|
|
7373
|
-
pointerEvents: 'auto',
|
|
7374
|
-
position: 'static',
|
|
7375
|
-
// Pseudo-element to stretch the click-area to full height
|
|
7376
|
-
'&::before': {
|
|
7377
|
-
content: '""',
|
|
7378
|
-
position: 'absolute',
|
|
7379
|
-
top: 0,
|
|
7380
|
-
bottom: 0,
|
|
7381
|
-
width: 'max(2rem, 80%)',
|
|
7382
|
-
},
|
|
7383
|
-
},
|
|
7331
|
+
'action-prev': Object.assign(Object.assign({}, actionPrevNextStyles), { marginLeft: '-1px', gridArea: '1 / 1 / 1 / 1', justifyContent: 'flex-start', background: `linear-gradient(to right, ${getGradient(theme, gradientColorTheme)} 100%)`, visibility: isPrevHidden ? 'hidden' : 'visible', '& button': Object.assign({ marginLeft: '8px' }, hoverMediaQuery({
|
|
7332
|
+
visibility: isPrevHidden ? 'hidden' : 'visible',
|
|
7333
|
+
})) }),
|
|
7334
|
+
'action-next': Object.assign(Object.assign({}, actionPrevNextStyles), { marginRight: '-1px', gridArea: '1 / 3 / 1 / 3', justifyContent: 'flex-end', background: `linear-gradient(to left, ${getGradient(theme, gradientColorTheme)} 100%)`, visibility: isNextHidden ? 'hidden' : 'visible', '& button': Object.assign({ marginRight: '8px' }, hoverMediaQuery({
|
|
7335
|
+
visibility: isNextHidden ? 'hidden' : 'visible',
|
|
7336
|
+
})) }),
|
|
7384
7337
|
});
|
|
7385
7338
|
};
|
|
7386
7339
|
|
|
7387
|
-
const ITEM_PADDING =
|
|
7340
|
+
const ITEM_PADDING = '17px';
|
|
7388
7341
|
const ICON_SIZE = pxToRemWithUnit(24);
|
|
7389
7342
|
const ICON_MARGIN = pxToRemWithUnit(4);
|
|
7390
|
-
const getColors$
|
|
7391
|
-
const
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
?
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
labelColor: themedColors.disabledColor,
|
|
7399
|
-
}
|
|
7400
|
-
: {
|
|
7401
|
-
backgroundColor,
|
|
7402
|
-
buttonColor: baseColor,
|
|
7403
|
-
labelColor: contrastMediumColor,
|
|
7404
|
-
};
|
|
7343
|
+
const getColors$2 = (isDisabled, isSelected, theme) => {
|
|
7344
|
+
const { primaryColor, contrastMediumColor, disabledColor, contrastLowColor } = getThemedColors(theme);
|
|
7345
|
+
return {
|
|
7346
|
+
buttonColor: isDisabled ? disabledColor : primaryColor,
|
|
7347
|
+
labelColor: isDisabled ? disabledColor : contrastMediumColor,
|
|
7348
|
+
borderColor: isSelected ? primaryColor : contrastLowColor,
|
|
7349
|
+
hoverBorderColor: primaryColor,
|
|
7350
|
+
};
|
|
7405
7351
|
};
|
|
7406
|
-
const getComponentCss$q = (isDisabled, isSelected,
|
|
7407
|
-
const {
|
|
7408
|
-
const {
|
|
7352
|
+
const getComponentCss$q = (isDisabled, isSelected, hasIcon, theme) => {
|
|
7353
|
+
const { focusColor } = getThemedColors(theme);
|
|
7354
|
+
const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$2(isDisabled, isSelected, theme);
|
|
7409
7355
|
return getCss({
|
|
7410
7356
|
'@global': {
|
|
7411
|
-
':host': addImportantToEachRule({
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7357
|
+
':host': addImportantToEachRule(Object.assign({ display: 'block', outline: 0 }, hostHiddenStyles)),
|
|
7358
|
+
button: Object.assign(Object.assign(Object.assign({ display: 'block', height: '100%', width: '100%', padding: hasIcon ? `13px ${ITEM_PADDING} 13px 13px` : `13px ${ITEM_PADDING}`, margin: 0, border: `${borderWidthBase} solid ${borderColor}`, borderRadius: borderRadiusSmall, outline: 0, background: 'transparent', color: buttonColor }, textSmallStyle), { overflowWrap: 'normal', position: 'relative', '&::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-5)), { border: `${borderWidthBase} solid transparent`, borderRadius: '7px' }), '&:focus::before': {
|
|
7359
|
+
borderColor: focusColor,
|
|
7360
|
+
}, '&:focus:not(:focus-visible)::before': {
|
|
7361
|
+
borderColor: 'transparent',
|
|
7362
|
+
} }), (isDisabled
|
|
7416
7363
|
? {
|
|
7417
7364
|
cursor: 'not-allowed',
|
|
7418
7365
|
}
|
|
7419
7366
|
: Object.assign({ cursor: 'pointer' }, (!isSelected &&
|
|
7420
7367
|
hoverMediaQuery({
|
|
7421
|
-
transition: getTransition('
|
|
7368
|
+
transition: getTransition('border-color'),
|
|
7422
7369
|
'&:hover': {
|
|
7423
|
-
|
|
7370
|
+
borderColor: hoverBorderColor,
|
|
7424
7371
|
},
|
|
7425
7372
|
}))))),
|
|
7426
7373
|
// label
|
|
7427
|
-
span: Object.assign(Object.assign({ display: 'block' },
|
|
7374
|
+
span: Object.assign(Object.assign({ display: 'block' }, textXSmallStyle), { overflowWrap: 'normal', color: labelColor }),
|
|
7428
7375
|
},
|
|
7429
7376
|
icon: {
|
|
7430
7377
|
height: ICON_SIZE,
|
|
@@ -7440,261 +7387,204 @@ const getComponentCss$p = (maxWidth) => {
|
|
|
7440
7387
|
maxWidth = (maxWidth > MAX_ITEM_WIDTH && MAX_ITEM_WIDTH) || (maxWidth < MIN_ITEM_WIDTH && MIN_ITEM_WIDTH) || maxWidth;
|
|
7441
7388
|
return getCss({
|
|
7442
7389
|
'@global': {
|
|
7443
|
-
':host': addImportantToEachRule({
|
|
7444
|
-
display: 'grid',
|
|
7445
|
-
gridAutoRows: '1fr',
|
|
7446
|
-
gridTemplateColumns: `repeat(auto-fit, ${maxWidth}px)`,
|
|
7447
|
-
gridGap: '4px',
|
|
7448
|
-
}),
|
|
7390
|
+
':host': addImportantToEachRule(Object.assign({ display: 'grid', gridAutoRows: '1fr', gridTemplateColumns: `repeat(auto-fit, ${maxWidth}px)`, gap: '6px' }, hostHiddenStyles)),
|
|
7449
7391
|
},
|
|
7450
7392
|
});
|
|
7451
7393
|
};
|
|
7452
|
-
|
|
7453
|
-
const { disabledColor: lightThemeDisabledColor } = getThemedColors('light');
|
|
7454
|
-
const INPUT_HEIGHT = 48;
|
|
7455
7394
|
const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
7456
|
-
const {
|
|
7395
|
+
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
7457
7396
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7458
|
-
|
|
7459
|
-
// TODO: Add readonly color to utilities package
|
|
7460
|
-
const readonly = '#ebebeb'; // 🤷
|
|
7461
|
-
return Object.assign(Object.assign(Object.assign({ [`::slotted(${child})`]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block', position: 'relative' }, getInsetJssStyle()), { width: '100%' }), (child !== 'textarea' && { height: pxToRemWithUnit(INPUT_HEIGHT) })), { margin: 0, outline: '1px solid transparent', outlineOffset: '2px', WebkitAppearance: 'none', appearance: 'none', boxSizing: 'border-box', border: hasVisibleState ? `2px solid ${formStateColor}` : `1px solid ${contrastMediumColor}`, borderRadius: 0, backgroundColor, opacity: 1 }), textSmall), { overflowWrap: null, hyphens: null, textIndent: 0, color: baseColor, transition: ['color', 'border-color', 'background-color'].map(getTransition).join() }), additionalDefaultJssStyle) }, hoverMediaQuery({
|
|
7397
|
+
return Object.assign(Object.assign(Object.assign({ [`::slotted(${child})`]: Object.assign({ display: 'block', width: '100%', height: 'auto', margin: 0, outline: 0, WebkitAppearance: 'none', appearance: 'none', boxSizing: 'border-box', border: `${borderWidthBase} solid ${formStateColor || contrastMediumColor}`, borderRadius: borderRadiusSmall, background: 'transparent', font: textSmallStyle.font.replace('ex', 'ex + 10px'), textIndent: 0, color: primaryColor, transition: ['color', 'border-color', 'background-color'].map(getTransition).join() }, additionalDefaultJssStyle) }, hoverMediaQuery({
|
|
7462
7398
|
// with the media query the selector has higher priority and overrides disabled styles
|
|
7463
|
-
[`::slotted(${child}:not(:disabled):not([readonly]):hover)`]: {
|
|
7464
|
-
borderColor: formStateHoverColor ||
|
|
7399
|
+
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)`]: {
|
|
7400
|
+
borderColor: formStateHoverColor || primaryColor,
|
|
7465
7401
|
},
|
|
7466
7402
|
})), { [`::slotted(${child}:focus)`]: {
|
|
7467
|
-
|
|
7403
|
+
borderColor: primaryColor,
|
|
7468
7404
|
}, [`::slotted(${child}:disabled)`]: {
|
|
7469
7405
|
cursor: 'not-allowed',
|
|
7470
|
-
color:
|
|
7471
|
-
borderColor:
|
|
7472
|
-
WebkitTextFillColor:
|
|
7406
|
+
color: disabledColor,
|
|
7407
|
+
borderColor: disabledColor,
|
|
7408
|
+
WebkitTextFillColor: disabledColor,
|
|
7473
7409
|
} }), (child !== 'select' && {
|
|
7474
7410
|
[`::slotted(${child}[readonly])`]: {
|
|
7475
|
-
borderColor:
|
|
7476
|
-
|
|
7477
|
-
},
|
|
7478
|
-
[`::slotted(${child}[readonly]:focus)`]: {
|
|
7479
|
-
outlineColor: 'transparent',
|
|
7480
|
-
},
|
|
7481
|
-
[`::slotted(${child}[readonly]:not(:disabled))`]: {
|
|
7482
|
-
color: contrastMediumColor,
|
|
7411
|
+
borderColor: contrastLowColor,
|
|
7412
|
+
background: contrastLowColor,
|
|
7483
7413
|
},
|
|
7484
7414
|
}));
|
|
7485
7415
|
};
|
|
7486
7416
|
const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUnitOrIconStyles) => {
|
|
7487
|
-
const {
|
|
7417
|
+
const { primaryColor, disabledColor, contrastHighColor } = getThemedColors(theme);
|
|
7488
7418
|
const { formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7489
|
-
const hasVisibleState = isVisibleFormState(state);
|
|
7490
|
-
// jss prefers flat and simple selectors, therefore we reuse properties
|
|
7491
|
-
const labelTextHoverJssStyle = hoverMediaQuery({
|
|
7492
|
-
'&:hover': {
|
|
7493
|
-
[`&~::slotted(${child}:not(:disabled):not([readonly]))` +
|
|
7494
|
-
(hasVisibleState ? `,::slotted(${child}:not(:disabled):not([readonly]):hover)` : '')]: {
|
|
7495
|
-
borderColor: addImportantToRule(hasVisibleState ? formStateHoverColor : baseColor),
|
|
7496
|
-
},
|
|
7497
|
-
},
|
|
7498
|
-
});
|
|
7499
7419
|
const counterOrUnitOrIconStylesKey = counterOrUnitOrIconStyles && Object.keys(counterOrUnitOrIconStyles)[0];
|
|
7500
7420
|
return Object.assign({ label: {
|
|
7501
|
-
display: '
|
|
7421
|
+
display: 'flex',
|
|
7422
|
+
flexDirection: 'column',
|
|
7423
|
+
gap: spacingStaticXSmall,
|
|
7502
7424
|
position: 'relative',
|
|
7503
|
-
'&__text': Object.assign(Object.assign(Object.assign(Object.assign(
|
|
7504
|
-
|
|
7505
|
-
|
|
7425
|
+
'&__text': Object.assign(Object.assign(Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(hideLabel, getFormTextHiddenJssStyle)), textSmallStyle), { color: isDisabled ? disabledColor : primaryColor, transition: getTransition('color'), '&+&': Object.assign({ marginTop: `-${spacingStaticXSmall}`, fontSize: fontSizeTextXSmall }, (!isDisabled && {
|
|
7426
|
+
color: contrastHighColor,
|
|
7427
|
+
})) }), hoverMediaQuery({
|
|
7428
|
+
'&:hover': {
|
|
7429
|
+
[`&~::slotted(${child}:not(:disabled):not(:focus):not([readonly]))` +
|
|
7430
|
+
(formStateHoverColor ? `,::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)` : '')]: {
|
|
7431
|
+
borderColor: addImportantToRule(formStateHoverColor || primaryColor),
|
|
7432
|
+
},
|
|
7506
7433
|
},
|
|
7507
|
-
})),
|
|
7434
|
+
})),
|
|
7508
7435
|
} }, (counterOrUnitOrIconStyles && {
|
|
7509
|
-
[counterOrUnitOrIconStylesKey]: Object.assign(Object.assign(Object.assign({}, counterOrUnitOrIconStyles[counterOrUnitOrIconStylesKey]), (isDisabled && {
|
|
7436
|
+
[counterOrUnitOrIconStylesKey]: Object.assign(Object.assign(Object.assign({}, counterOrUnitOrIconStyles[counterOrUnitOrIconStylesKey]), { pointerEvents: 'none' }), (isDisabled && {
|
|
7510
7437
|
color: disabledColor,
|
|
7511
7438
|
cursor: 'not-allowed',
|
|
7512
|
-
})),
|
|
7439
|
+
})),
|
|
7513
7440
|
}));
|
|
7514
7441
|
};
|
|
7515
|
-
|
|
7516
|
-
const { baseColor: themeLightBaseColor$1 } = getThemedColors('light');
|
|
7442
|
+
const ICON_SPACE = `${24 + 13 * 2 + 2}px`; // 24px = icon width, 13px * 2 = padding, 2px = border
|
|
7517
7443
|
const getComponentCss$o = (isDisabled, hideLabel, state, theme) => {
|
|
7518
|
-
|
|
7519
|
-
const { baseColor, backgroundColor } = getThemedColors(theme);
|
|
7520
|
-
const defaultPadding = pxToRemWithUnit(isVisibleFormState(state) ? 10 : 11);
|
|
7521
|
-
return getCss(Object.assign(Object.assign(Object.assign({ '@global': Object.assign({ ':host': {
|
|
7522
|
-
display: 'block',
|
|
7523
|
-
} }, addImportantToEachRule(mergeDeep(getBaseChildStyles('select', state, theme, {
|
|
7444
|
+
return getCss(Object.assign(Object.assign(Object.assign({ '@global': addImportantToEachRule(Object.assign({ ':host': Object.assign({ display: 'block' }, hostHiddenStyles) }, getBaseChildStyles('select', state, theme, {
|
|
7524
7445
|
position: 'static',
|
|
7446
|
+
zIndex: 0,
|
|
7525
7447
|
cursor: 'pointer',
|
|
7526
|
-
padding:
|
|
7527
|
-
'&@-moz-document url-prefix()': {
|
|
7528
|
-
// fix for 3px text-indention in FF
|
|
7529
|
-
paddingLeft: pxToRemWithUnit(8),
|
|
7530
|
-
},
|
|
7531
|
-
}), {
|
|
7532
|
-
'::slotted(select:disabled)': {
|
|
7533
|
-
background: isDarkTheme ? themeLightBaseColor$1 : backgroundColor, // 🤷
|
|
7534
|
-
},
|
|
7448
|
+
padding: `8px ${ICON_SPACE} 8px ${spacingStaticMedium}`,
|
|
7535
7449
|
}))), root: {
|
|
7536
7450
|
display: 'block',
|
|
7537
7451
|
position: 'relative',
|
|
7538
7452
|
} }, getLabelStyles('select', isDisabled, hideLabel, state, theme, {
|
|
7539
7453
|
icon: {
|
|
7540
7454
|
position: 'absolute',
|
|
7541
|
-
bottom:
|
|
7542
|
-
right:
|
|
7543
|
-
color: baseColor,
|
|
7544
|
-
pointerEvents: 'none',
|
|
7455
|
+
bottom: '13px',
|
|
7456
|
+
right: '15px',
|
|
7545
7457
|
transform: 'rotate3d(0,0,1,0.0001deg)',
|
|
7546
7458
|
transition: getTransition('transform'),
|
|
7547
7459
|
'&--open': {
|
|
7548
7460
|
transform: 'rotate3d(0,0,1,180deg)',
|
|
7549
7461
|
},
|
|
7550
7462
|
},
|
|
7551
|
-
})), getFunctionalComponentRequiredStyles(
|
|
7463
|
+
})), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)));
|
|
7552
7464
|
};
|
|
7553
7465
|
|
|
7554
|
-
const sizeSmall =
|
|
7555
|
-
const sizeMedium =
|
|
7556
|
-
const sizeLarge =
|
|
7557
|
-
const sizeMap = {
|
|
7466
|
+
const sizeSmall = '48px';
|
|
7467
|
+
const sizeMedium = '72px';
|
|
7468
|
+
const sizeLarge = '104px';
|
|
7469
|
+
const sizeMap$1 = {
|
|
7558
7470
|
small: { height: sizeSmall, width: sizeSmall },
|
|
7559
7471
|
medium: { height: sizeMedium, width: sizeMedium },
|
|
7560
7472
|
large: { height: sizeLarge, width: sizeLarge },
|
|
7561
7473
|
inherit: { height: 'inherit', width: 'inherit' },
|
|
7562
7474
|
};
|
|
7563
7475
|
const getComponentCss$m = (size, theme) => {
|
|
7564
|
-
const
|
|
7565
|
-
const animationDuration = 'var(--p-animation-
|
|
7476
|
+
const strokeDasharray = '57'; // C = 2πR
|
|
7477
|
+
const animationDuration = 'var(--p-animation-duration, 2s)';
|
|
7478
|
+
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
7566
7479
|
return getCss({
|
|
7567
7480
|
'@global': {
|
|
7568
|
-
':host': {
|
|
7569
|
-
display: 'inline-flex',
|
|
7570
|
-
verticalAlign: 'top',
|
|
7571
|
-
},
|
|
7481
|
+
':host': addImportantToEachRule(Object.assign({ display: 'inline-flex', verticalAlign: 'top' }, hostHiddenStyles)),
|
|
7572
7482
|
svg: {
|
|
7573
7483
|
display: 'block',
|
|
7574
7484
|
position: 'relative',
|
|
7575
7485
|
fill: 'none',
|
|
7576
7486
|
transform: 'translate3d(0,0,0)',
|
|
7487
|
+
animation: `$rotate ${animationDuration} linear infinite`,
|
|
7577
7488
|
},
|
|
7578
7489
|
circle: {
|
|
7579
|
-
stroke: isThemeDark(theme) || isThemeDarkElectric(theme) ? baseColor : contrastHighColor,
|
|
7580
7490
|
'&:first-child': {
|
|
7581
|
-
|
|
7491
|
+
stroke: contrastMediumColor,
|
|
7492
|
+
animation: `$rotate ${animationDuration} linear infinite`, // needs to rotate to eliminate stutter in safari
|
|
7582
7493
|
},
|
|
7583
7494
|
'&:last-child': {
|
|
7584
7495
|
transformOrigin: '0 0',
|
|
7585
|
-
animation: `$
|
|
7586
|
-
|
|
7587
|
-
|
|
7496
|
+
animation: `$dash ${animationDuration} ease-in-out infinite`,
|
|
7497
|
+
stroke: primaryColor,
|
|
7498
|
+
strokeDasharray: strokeDasharray
|
|
7499
|
+
,
|
|
7588
7500
|
strokeLinecap: 'round',
|
|
7589
7501
|
},
|
|
7590
7502
|
},
|
|
7591
7503
|
'@keyframes rotate': {
|
|
7504
|
+
'0%': {
|
|
7505
|
+
transform: 'rotateZ(0deg)',
|
|
7506
|
+
},
|
|
7592
7507
|
'100%': {
|
|
7593
|
-
transform: '
|
|
7508
|
+
transform: 'rotateZ(360deg)',
|
|
7594
7509
|
},
|
|
7595
7510
|
},
|
|
7596
7511
|
'@keyframes dash': {
|
|
7597
7512
|
'0%': {
|
|
7598
|
-
|
|
7513
|
+
strokeDashoffset: 57,
|
|
7514
|
+
transform: 'rotateZ(0)',
|
|
7599
7515
|
},
|
|
7600
|
-
'50%': {
|
|
7601
|
-
|
|
7516
|
+
'50%, 75%': {
|
|
7517
|
+
strokeDashoffset: 20,
|
|
7518
|
+
transform: 'rotateZ(80deg)',
|
|
7602
7519
|
},
|
|
7603
7520
|
'100%': {
|
|
7604
|
-
|
|
7605
|
-
|
|
7521
|
+
strokeDashoffset: 57,
|
|
7522
|
+
transform: 'rotateZ(360deg)',
|
|
7606
7523
|
},
|
|
7607
7524
|
},
|
|
7608
7525
|
},
|
|
7609
|
-
root: Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(size, (s) => sizeMap[s])), { margin: 0, padding: 0, boxSizing: 'border-box', strokeWidth: 1 }),
|
|
7526
|
+
root: Object.assign(Object.assign({ display: 'block' }, buildResponsiveStyles(size, (s) => sizeMap$1[s])), { margin: 0, padding: 0, boxSizing: 'border-box', strokeWidth: 1.5 }),
|
|
7610
7527
|
'sr-only': getScreenReaderOnlyJssStyle(),
|
|
7611
7528
|
});
|
|
7612
7529
|
};
|
|
7613
7530
|
|
|
7614
|
-
|
|
7615
|
-
//
|
|
7616
|
-
|
|
7617
|
-
const
|
|
7618
|
-
const
|
|
7619
|
-
const
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7531
|
+
const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
7532
|
+
// # of the hexcolor starts a fragment identifier in URLs, so we have to replace it with the escaped value of # = %23
|
|
7533
|
+
numberedCircleColors = Object.entries(numberedCircleColors).reduce((result, [key, value]) => (Object.assign(Object.assign({}, result), { [key]: value.replace(/#/g, '%23') })), {});
|
|
7534
|
+
const { disabledColor, invertedBaseColor, primaryColor } = numberedCircleColors;
|
|
7535
|
+
const fillColor = isStateCurrent ? invertedBaseColor : disabledColor;
|
|
7536
|
+
const svgCirclePath = `<circle fill="${isStateCurrent ? primaryColor : 'none'}"${isStateCurrent ? '' : ` stroke="${fillColor}"`} stroke-width="1px" cx="12" cy="12" r="9"/>`;
|
|
7537
|
+
// Full SVG is provided by design (./numbers_raw.svg), created with illustrator and optimized with ImageOptim.
|
|
7538
|
+
// The optimized file can be found in ./numbers_optim.svg.
|
|
7539
|
+
const svgNumberedCirclePaths = [
|
|
7540
|
+
`${svgCirclePath}<path fill="${fillColor}" d="m12.33 8.67-2.43.91v-.94l2.6-1.03h.85v8.78h-1.02z"/>`,
|
|
7541
|
+
`${svgCirclePath}<path fill="${fillColor}" d="m9.46 15.58c0-1.35.73-2.07 1.7-2.72l.95-.63c.78-.52 1.57-1.05 1.57-2.24 0-1.12-.62-1.58-1.7-1.58s-1.68.48-1.78 1.97h-.96c.06-1.82.78-2.91 2.74-2.91s2.72.92 2.72 2.52-.92 2.23-1.79 2.8l-.95.63c-1.11.75-1.52 1.18-1.52 2.01v.16h4.17v.81h-5.15v-.81z"/>`,
|
|
7542
|
+
`${svgCirclePath}<path fill="${fillColor}" d="m10.1 13.73c.1 1.43.63 2 1.92 2 1.2 0 1.8-.49 1.8-1.68 0-1.08-.51-1.66-1.8-1.66h-.89v-.9h.83c1.12 0 1.66-.56 1.66-1.53 0-1.08-.64-1.55-1.73-1.55s-1.69.49-1.79 1.97h-.97c.1-1.79.84-2.91 2.76-2.91s2.74.92 2.74 2.49c0 .79-.38 1.54-1.16 1.9.84.28 1.36.92 1.36 2.19 0 1.54-.97 2.49-2.81 2.49-1.96 0-2.8-.9-2.88-2.81z"/>`,
|
|
7543
|
+
`${svgCirclePath}<path fill="${fillColor}" d="m8.87 13.6 3.54-5.99h1.43v5.89h1.25v.86h-1.25v2.02h-.99v-2.02h-3.98zm3.98-.1v-4.98l-2.91 4.98z"/>`,
|
|
7544
|
+
`${svgCirclePath}<path fill="${fillColor}" d="m9.34 12.45.42-4.83h4.71v.94h-3.9l-.26 2.95c.38-.43 1-.68 1.79-.68 1.86 0 2.76.9 2.76 2.81 0 2.06-1.03 2.91-2.86 2.91s-2.74-.84-2.81-2.51h.97c.06 1.13.57 1.7 1.84 1.7 1.39 0 1.85-.68 1.85-2.06s-.48-2-1.85-2c-1.07 0-1.54.42-1.75 1.17h-.91v-.39z"/>`,
|
|
7545
|
+
`${svgCirclePath}<path fill="${fillColor}" d="m9.97 11.02 2.22-3.4h1.1l-2.27 3.44c.33-.16.69-.23 1.1-.23 1.84 0 2.76.9 2.76 2.81 0 2.06-1.04 2.91-2.86 2.91s-2.87-.85-2.87-2.91c0-1.08.3-1.8.83-2.61zm2.05 4.71c1.38 0 1.84-.68 1.84-2.05s-.47-2.01-1.84-2.01-1.85.64-1.85 2.01.46 2.05 1.85 2.05z"/>`,
|
|
7546
|
+
`${svgCirclePath}<path fill="${fillColor}" d="m9.21 7.61h5.57v.74l-3.58 8.04h-1.05l3.54-7.84h-4.49v-.94z"/>`,
|
|
7547
|
+
`${svgCirclePath}<path fill="${fillColor}" d="m10.47 11.94c-.65-.33-1.13-.92-1.13-2.01 0-1.53.85-2.47 2.66-2.47s2.66.94 2.66 2.47c0 1.08-.47 1.68-1.15 2.01.92.35 1.34 1.07 1.34 2.11 0 1.73-.99 2.49-2.86 2.49s-2.86-.76-2.86-2.49c0-1.04.41-1.76 1.33-2.11zm1.53 3.78c1.27 0 1.85-.51 1.85-1.69 0-1.1-.58-1.61-1.85-1.61s-1.85.52-1.85 1.61c0 1.18.58 1.69 1.85 1.69zm1.65-5.76c0-1.1-.56-1.56-1.65-1.56s-1.65.47-1.65 1.56c0 1 .46 1.6 1.65 1.6s1.65-.6 1.65-1.6z"/>`,
|
|
7548
|
+
`${svgCirclePath}<path fill="${fillColor}" d="m9.16 10.33c0-2.03 1.02-2.86 2.83-2.86s2.82.81 2.82 2.85c0 1.11-.3 1.82-.81 2.64l-2.18 3.44h-1.1l2.18-3.37c-.31.14-.65.2-1.01.2-1.82 0-2.74-.99-2.74-2.9zm4.65 0c0-1.23-.47-1.92-1.81-1.92s-1.81.69-1.81 1.92c0 1.37.49 2.05 1.81 2.05s1.81-.68 1.81-2.05z"/>`,
|
|
7549
|
+
];
|
|
7550
|
+
return svgNumberedCirclePaths[stepCount];
|
|
7631
7551
|
};
|
|
7632
|
-
// following constants are defined in em to ensure proportional size based on parents font size
|
|
7633
|
-
// TODO: to be sure counter sizing and positioning is in sync with icon, then we need to use a svg instead
|
|
7634
|
-
// TODO: simplify calculation of positioning by using css grid and/or svg
|
|
7635
|
-
const spriteStepSize = 0.625; // 10px / font size in px
|
|
7636
|
-
const spriteWidth = `${9 * spriteStepSize}em`; // 9 steps
|
|
7637
|
-
const spriteHeight = `${spriteStepSize}em`; // height of sprite / font size in px
|
|
7638
|
-
const counterCirclePosition = '0.171875em'; // 2.75px
|
|
7639
|
-
const counterCircleSize = `calc(${fontLineHeight} - ${counterCirclePosition} * 2)`;
|
|
7640
|
-
const counterValuePosition = `calc((${fontLineHeight} - ${spriteStepSize}em) / 2)`;
|
|
7641
|
-
const counterValueSize = spriteHeight;
|
|
7642
7552
|
const getComponentCss$l = (state, disabled, theme) => {
|
|
7643
|
-
const {
|
|
7644
|
-
const
|
|
7553
|
+
const { primaryColor, hoverColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
7554
|
+
const isStateCurrent = state === 'current';
|
|
7555
|
+
const isStateCurrentOrUndefined = !state || isStateCurrent;
|
|
7645
7556
|
const isDisabled = !state || disabled;
|
|
7646
7557
|
return getCss(Object.assign(Object.assign({ '@global': {
|
|
7647
7558
|
':host': Object.assign(Object.assign({}, (isStateCurrentOrUndefined &&
|
|
7648
|
-
Array.from(Array(9)).reduce((result, _, i) => (Object.assign(Object.assign({}, result), { [`&(:nth-of-type(${i + 1})) $button::
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7559
|
+
Array.from(Array(9)).reduce((result, _, i) => (Object.assign(Object.assign({}, result), { [`&(:nth-of-type(${i + 1})) $button::before`]: {
|
|
7560
|
+
backgroundImage: getInlineSVGBackgroundImage(getSVGPath(i, {
|
|
7561
|
+
primaryColor,
|
|
7562
|
+
invertedBaseColor: getInvertedThemedColors(theme).primaryColor,
|
|
7563
|
+
disabledColor,
|
|
7564
|
+
}, isStateCurrent)),
|
|
7565
|
+
} })), {}))), addImportantToEachRule(Object.assign(Object.assign({ fontSize: 'inherit' }, hostHiddenStyles), { '&(:not(:last-of-type))': {
|
|
7566
|
+
margin: `0 ${spacingFluidXSmall} 0 0`,
|
|
7567
|
+
} }))),
|
|
7568
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', gap: '3px', color: isDisabled ? disabledColor : primaryColor, padding: '4px 10px 4px 6px', background: 0, border: 0, outline: 0 }, textSmallStyle), { fontSize: 'inherit', width: 'max-content', cursor: isDisabled ? 'not-allowed' : 'pointer', borderRadius: borderRadiusSmall }), (isStateCurrent && Object.assign(Object.assign({}, frostedGlassStyle), { background: hoverColor }))), (!isDisabled &&
|
|
7569
|
+
hoverMediaQuery({
|
|
7570
|
+
transition: getTransition('background-color'),
|
|
7571
|
+
'&:hover': Object.assign(Object.assign({}, frostedGlassStyle), { background: hoverColor }),
|
|
7572
|
+
}))), (isStateCurrentOrUndefined && {
|
|
7573
|
+
// counter
|
|
7574
|
+
// Pseudo element is needed to center the counter to the text, as it is not working optimal directly on the button
|
|
7575
|
+
'&::before': {
|
|
7576
|
+
content: '""',
|
|
7577
|
+
height: fontLineHeight,
|
|
7578
|
+
width: fontLineHeight,
|
|
7579
|
+
},
|
|
7580
|
+
})), { '&:focus::after': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(0)), { border: `${borderWidthBase} solid ${focusColor}`, borderRadius: borderRadiusSmall }), '&:focus:not(:focus-visible)::after': {
|
|
7581
|
+
borderColor: 'transparent',
|
|
7652
7582
|
} }),
|
|
7653
|
-
button: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'relative', color: isDisabled ? disabledColor : baseColor, transition: getTransition('color'), margin: 0, padding: `0 0 0 calc(${fontLineHeight} + ${pxToRemWithUnit(4)})`, background: 0, border: 0 }, textSmall), { fontSize: 'inherit', whiteSpace: 'nowrap' }), getFocusJssStyle()), (isStateCurrentOrUndefined
|
|
7654
|
-
? // counter circle icon via css
|
|
7655
|
-
{
|
|
7656
|
-
cursor: isDisabled ? 'not-allowed' : 'auto',
|
|
7657
|
-
// TODO: combine &::before and &::after element
|
|
7658
|
-
'&::before': Object.assign({
|
|
7659
|
-
// circle of counter element
|
|
7660
|
-
content: '""', position: 'absolute', top: '50%', transform: 'translateY(-50%)', left: counterCirclePosition, height: counterCircleSize, width: counterCircleSize, borderRadius: '50%' }, (isDisabled
|
|
7661
|
-
? {
|
|
7662
|
-
boxSizing: 'border-box',
|
|
7663
|
-
border: `1px solid ${disabledColor}`,
|
|
7664
|
-
}
|
|
7665
|
-
: {
|
|
7666
|
-
background: baseColor,
|
|
7667
|
-
})),
|
|
7668
|
-
'&::after': {
|
|
7669
|
-
// value of counter element
|
|
7670
|
-
content: '""',
|
|
7671
|
-
position: 'absolute',
|
|
7672
|
-
top: '50%',
|
|
7673
|
-
transform: 'translateY(-50%)',
|
|
7674
|
-
left: counterValuePosition,
|
|
7675
|
-
width: counterValueSize,
|
|
7676
|
-
height: counterValueSize,
|
|
7677
|
-
background: `${getSvg(isDisabled ? disabledColor : invertedBaseColor)} 0 50% / ${spriteWidth} ${spriteHeight} no-repeat`,
|
|
7678
|
-
},
|
|
7679
|
-
}
|
|
7680
|
-
: // other icons via icon component
|
|
7681
|
-
isDisabled
|
|
7682
|
-
? {
|
|
7683
|
-
cursor: 'not-allowed',
|
|
7684
|
-
textDecoration: 'none',
|
|
7685
|
-
}
|
|
7686
|
-
: Object.assign({ cursor: 'pointer', textDecoration: 'underline' }, hoverMediaQuery(Object.assign(Object.assign({}, getHoverJssStyle()), { '&:hover .icon': {
|
|
7687
|
-
color: hoverColor,
|
|
7688
|
-
} }))))),
|
|
7689
7583
|
} }, (!isStateCurrentOrUndefined && {
|
|
7690
|
-
//
|
|
7584
|
+
// complete / warning icons via icon component
|
|
7691
7585
|
icon: {
|
|
7692
|
-
position: 'absolute',
|
|
7693
|
-
left: 0,
|
|
7694
7586
|
height: fontLineHeight,
|
|
7695
7587
|
width: fontLineHeight,
|
|
7696
|
-
color: isDisabled ? disabledColor : iconColor,
|
|
7697
|
-
transition: getTransition('color'),
|
|
7698
7588
|
},
|
|
7699
7589
|
})), { 'sr-only': getScreenReaderOnlyJssStyle() }));
|
|
7700
7590
|
};
|
|
@@ -7702,111 +7592,86 @@ const getComponentCss$l = (state, disabled, theme) => {
|
|
|
7702
7592
|
const getComponentCss$k = (size) => {
|
|
7703
7593
|
return getCss({
|
|
7704
7594
|
'@global': {
|
|
7705
|
-
':host': {
|
|
7706
|
-
display: 'block',
|
|
7707
|
-
},
|
|
7595
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
7708
7596
|
},
|
|
7709
|
-
scroller: Object.assign(Object.assign({
|
|
7597
|
+
scroller: Object.assign(Object.assign({}, textSmallStyle), buildResponsiveStyles(size, (s) => ({ fontSize: fontSizeText[s] }))),
|
|
7710
7598
|
});
|
|
7711
7599
|
};
|
|
7712
7600
|
|
|
7713
|
-
const
|
|
7714
|
-
const
|
|
7715
|
-
const { backgroundColor, baseColor, contrastHighColor, successColor, successColorDarken, hoverColorDarken, disabledColor, brandColor, } = getThemedColors(theme);
|
|
7601
|
+
const getColors$1 = (checked, disabled, loading, theme) => {
|
|
7602
|
+
const { primaryColor, contrastMediumColor, successColor, successColorDarken, disabledColor } = getThemedColors(theme);
|
|
7716
7603
|
const { backgroundColor: lightThemeBackgroundColor } = getThemedColors('light');
|
|
7717
|
-
const
|
|
7718
|
-
const
|
|
7719
|
-
const disabledOrLoadingColor = isDisabledOrLoading && disabledColor;
|
|
7604
|
+
const checkedColor = successColor;
|
|
7605
|
+
const disabledOrLoadingColor = isDisabledOrLoading(disabled, loading) && disabledColor;
|
|
7720
7606
|
return {
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
buttonBorderColorHover: checked ? (isLightElectricTheme ? hoverColorDarken : successColorDarken) : baseColor,
|
|
7607
|
+
buttonBorderColor: disabledOrLoadingColor || (checked ? checkedColor : contrastMediumColor),
|
|
7608
|
+
buttonBorderColorHover: checked ? successColorDarken : primaryColor,
|
|
7724
7609
|
buttonBackgroundColor: checked ? disabledOrLoadingColor || checkedColor : 'transparent',
|
|
7725
|
-
buttonBackgroundColorHover: checked
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
toggleBackgroundColorHover: checked ? lightThemeBackgroundColor : baseColor,
|
|
7732
|
-
textColor: disabledOrLoadingColor || baseColor,
|
|
7610
|
+
buttonBackgroundColorHover: checked ? successColorDarken : 'transparent',
|
|
7611
|
+
toggleBackgroundColor: (loading && 'transparent') ||
|
|
7612
|
+
(disabled && !checked && disabledColor) ||
|
|
7613
|
+
(checked ? lightThemeBackgroundColor : primaryColor),
|
|
7614
|
+
toggleBackgroundColorHover: checked ? lightThemeBackgroundColor : primaryColor,
|
|
7615
|
+
textColor: disabledOrLoadingColor || primaryColor,
|
|
7733
7616
|
};
|
|
7734
7617
|
};
|
|
7735
|
-
const
|
|
7736
|
-
const
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
};
|
|
7750
|
-
const getStretchJssStyle = (stretch) => {
|
|
7751
|
-
return stretch
|
|
7752
|
-
? {
|
|
7753
|
-
width: '100%',
|
|
7754
|
-
justifyContent: 'space-between',
|
|
7755
|
-
}
|
|
7756
|
-
: {
|
|
7757
|
-
width: 'auto',
|
|
7758
|
-
justifyContent: 'flex-start',
|
|
7759
|
-
};
|
|
7760
|
-
};
|
|
7761
|
-
const getComponentCss$j = (alignLabel, hideLabel, stretch, checked, loading, isDisabledOrLoading, theme) => {
|
|
7762
|
-
const { backgroundColor, buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, isDisabledOrLoading, theme);
|
|
7763
|
-
return getCss(Object.assign({ '@global': {
|
|
7764
|
-
':host': addImportantToEachRule({
|
|
7765
|
-
display: 'flex',
|
|
7766
|
-
outline: 0,
|
|
7767
|
-
}),
|
|
7768
|
-
button: Object.assign(Object.assign({ position: 'relative', width: pxToRemWithUnit(48), height: pxToRemWithUnit(24), flexShrink: 0, display: 'block', margin: 0, padding: 0, appearance: 'none', boxSizing: 'border-box', color: buttonBorderColor, border: '1px solid currentColor', borderRadius: pxToRemWithUnit(12), backgroundColor: buttonBackgroundColor, outline: 'none', cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer', transition: `${getTransition('background-color')},${getTransition('border-color')},${getTransition('color')}` }, (!isDisabledOrLoading &&
|
|
7769
|
-
hoverMediaQuery({
|
|
7770
|
-
'&:hover': {
|
|
7771
|
-
color: buttonBorderColorHover,
|
|
7772
|
-
backgroundColor: buttonBackgroundColorHover,
|
|
7773
|
-
'& .toggle': {
|
|
7774
|
-
backgroundColor: toggleBackgroundColorHover,
|
|
7775
|
-
},
|
|
7618
|
+
const getComponentCss$j = (alignLabel, hideLabel, stretch, checked, disabled, loading, theme) => {
|
|
7619
|
+
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
7620
|
+
const { focusColor } = getThemedColors(theme);
|
|
7621
|
+
return getCss(Object.assign(Object.assign({ '@global': {
|
|
7622
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ outline: 0 }, hostHiddenStyles), buildResponsiveStyles(stretch, (stretchValue) => (Object.assign({ display: stretchValue ? 'block' : 'inline-block' }, (!stretchValue && { verticalAlign: 'top' })))))),
|
|
7623
|
+
}, root: Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-start', gap: spacingStaticSmall, width: '100%', padding: 0, outline: 0, border: 0, textAlign: 'left', background: 'transparent', appearance: 'none', cursor: isDisabledOrLoading(disabled, loading) ? 'auto' : 'pointer' }, buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
7624
|
+
justifyContent: stretchValue ? 'space-between' : 'flex-start',
|
|
7625
|
+
}))), (!isDisabledOrLoading(disabled, loading) &&
|
|
7626
|
+
hoverMediaQuery({
|
|
7627
|
+
'&:hover .switch': {
|
|
7628
|
+
borderColor: buttonBorderColorHover,
|
|
7629
|
+
backgroundColor: buttonBackgroundColorHover,
|
|
7630
|
+
'& .toggle': {
|
|
7631
|
+
backgroundColor: toggleBackgroundColorHover,
|
|
7776
7632
|
},
|
|
7777
|
-
}
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7633
|
+
},
|
|
7634
|
+
}))), { '&:focus .switch::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-6)), { border: `${borderWidthBase} solid ${focusColor}`, borderRadius: '18px' }), '&:not(:focus-visible) .switch::before': {
|
|
7635
|
+
borderColor: 'transparent',
|
|
7636
|
+
} }), switch: {
|
|
7637
|
+
position: 'relative',
|
|
7638
|
+
width: '48px',
|
|
7639
|
+
height: '28px',
|
|
7640
|
+
flexShrink: 0,
|
|
7641
|
+
boxSizing: 'border-box',
|
|
7642
|
+
border: `${borderWidthBase} solid ${buttonBorderColor}`,
|
|
7643
|
+
borderRadius: '14px',
|
|
7644
|
+
backgroundColor: buttonBackgroundColor,
|
|
7645
|
+
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
7646
|
+
transition: `${getTransition('background-color')},${getTransition('border-color')},${getTransition('color')}`,
|
|
7647
|
+
}, toggle: {
|
|
7783
7648
|
position: 'absolute',
|
|
7784
|
-
top:
|
|
7785
|
-
left:
|
|
7786
|
-
width:
|
|
7787
|
-
height:
|
|
7649
|
+
top: '2px',
|
|
7650
|
+
left: '2px',
|
|
7651
|
+
width: '20px',
|
|
7652
|
+
height: '20px',
|
|
7788
7653
|
display: 'block',
|
|
7789
7654
|
borderRadius: '50%',
|
|
7790
7655
|
backgroundColor: toggleBackgroundColor,
|
|
7791
|
-
transform: `translate3d(${checked ?
|
|
7656
|
+
transform: `translate3d(${checked ? '20px' : '0'}, 0, 0)`,
|
|
7792
7657
|
transition: `${getTransition('background-color')},${getTransition('transform')}`,
|
|
7793
7658
|
} }, (loading && {
|
|
7794
7659
|
spinner: {
|
|
7795
7660
|
position: 'absolute',
|
|
7796
|
-
top:
|
|
7797
|
-
left:
|
|
7798
|
-
width:
|
|
7799
|
-
height:
|
|
7661
|
+
top: '-4px',
|
|
7662
|
+
left: '-4px',
|
|
7663
|
+
width: '28px',
|
|
7664
|
+
height: '28px',
|
|
7800
7665
|
},
|
|
7801
|
-
})))
|
|
7666
|
+
})), { label: Object.assign(Object.assign(Object.assign({}, textSmallStyle), { paddingTop: '2px', minWidth: 0, minHeight: 0, color: textColor }), mergeDeep(buildResponsiveStyles(alignLabel, (alignLabelValue) => ({
|
|
7667
|
+
order: alignLabelValue === 'left' ? -1 : 0,
|
|
7668
|
+
})), buildResponsiveStyles(hideLabel, getTextHiddenJssStyle))) }));
|
|
7802
7669
|
};
|
|
7803
7670
|
|
|
7804
7671
|
const getComponentCss$i = () => {
|
|
7805
7672
|
return getCss({
|
|
7806
7673
|
'@global': {
|
|
7807
|
-
':host': {
|
|
7808
|
-
display: addImportantToRule('table-row-group'),
|
|
7809
|
-
},
|
|
7674
|
+
':host': addImportantToEachRule(Object.assign({ display: 'table-row-group' }, hostHiddenStyles)),
|
|
7810
7675
|
},
|
|
7811
7676
|
});
|
|
7812
7677
|
};
|
|
@@ -7814,13 +7679,7 @@ const getComponentCss$i = () => {
|
|
|
7814
7679
|
const getComponentCss$h = (multiline) => {
|
|
7815
7680
|
return getCss({
|
|
7816
7681
|
'@global': {
|
|
7817
|
-
':host': Object.assign(Object.assign({}, addImportantToEachRule({
|
|
7818
|
-
display: 'table-cell',
|
|
7819
|
-
padding: pxToRemWithUnit(12),
|
|
7820
|
-
margin: 0,
|
|
7821
|
-
borderBottom: `1px solid ${getThemedColors('light').contrastLowColor}`,
|
|
7822
|
-
whiteSpace: multiline ? 'normal' : 'nowrap',
|
|
7823
|
-
})), { verticalAlign: 'middle' }),
|
|
7682
|
+
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign({ display: 'table-cell', padding: pxToRemWithUnit(12), margin: 0, borderBottom: `1px solid ${getThemedColors('light').contrastLowColor}`, whiteSpace: multiline ? 'normal' : 'nowrap' }, hostHiddenStyles))), { verticalAlign: 'middle' }),
|
|
7824
7683
|
},
|
|
7825
7684
|
});
|
|
7826
7685
|
};
|
|
@@ -7830,20 +7689,13 @@ const isSortable = (active, direction) => {
|
|
|
7830
7689
|
return active !== undefined && direction !== undefined;
|
|
7831
7690
|
};
|
|
7832
7691
|
|
|
7833
|
-
const { contrastMediumColor,
|
|
7692
|
+
const { contrastMediumColor, primaryColor: primaryColor$1 } = getThemedColors('light');
|
|
7834
7693
|
const { semiBold: fontWeightSemiBold } = fontWeight;
|
|
7835
7694
|
const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
7836
7695
|
const sortable = isSortable(active, direction);
|
|
7837
|
-
return getCss(Object.assign({ '@global': Object.assign({ ':host': addImportantToEachRule({
|
|
7838
|
-
display: 'table-cell',
|
|
7839
|
-
padding: `${pxToRemWithUnit(2)} ${pxToRemWithUnit(12)} ${pxToRemWithUnit(8)}`,
|
|
7840
|
-
borderBottom: `1px solid ${contrastMediumColor}`,
|
|
7841
|
-
verticalAlign: 'bottom',
|
|
7842
|
-
fontWeight: fontWeightSemiBold,
|
|
7843
|
-
whiteSpace: multiline ? 'normal' : 'nowrap',
|
|
7844
|
-
}) }, (sortable
|
|
7696
|
+
return getCss(Object.assign({ '@global': Object.assign({ ':host': addImportantToEachRule(Object.assign({ display: 'table-cell', padding: `${pxToRemWithUnit(2)} ${pxToRemWithUnit(12)} ${pxToRemWithUnit(8)}`, borderBottom: `1px solid ${contrastMediumColor}`, verticalAlign: 'bottom', fontWeight: fontWeightSemiBold, whiteSpace: multiline ? 'normal' : 'nowrap' }, hostHiddenStyles)) }, (sortable
|
|
7845
7697
|
? {
|
|
7846
|
-
button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-end', padding: 0, boxSizing: 'border-box', appearance: 'none', border: 'none' },
|
|
7698
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-end', padding: 0, boxSizing: 'border-box', appearance: 'none', border: 'none' }, textSmallStyle), { fontWeight: fontWeightSemiBold, color: primaryColor$1, textDecoration: 'none', textAlign: 'left', background: 'transparent', cursor: 'pointer' }), getFocusJssStyle({ offset: 1 })), hoverMediaQuery(Object.assign(Object.assign({}, getHoverJssStyle()), { '&:hover, &:focus': {
|
|
7847
7699
|
'& .icon': {
|
|
7848
7700
|
opacity: 1,
|
|
7849
7701
|
},
|
|
@@ -7853,7 +7705,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
7853
7705
|
span: Object.assign(Object.assign({}, getTextHiddenJssStyle(true)), { display: 'block', border: 0 }),
|
|
7854
7706
|
})) }, (sortable && {
|
|
7855
7707
|
icon: {
|
|
7856
|
-
marginLeft:
|
|
7708
|
+
marginLeft: spacingStaticXSmall,
|
|
7857
7709
|
opacity: active ? 1 : 0,
|
|
7858
7710
|
transform: `rotate3d(0,0,1,${isDirectionAsc(direction) ? 0 : 180}deg)`,
|
|
7859
7711
|
transformOrigin: '50% 50%', // for iOS
|
|
@@ -7864,9 +7716,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
7864
7716
|
const getComponentCss$f = () => {
|
|
7865
7717
|
return getCss({
|
|
7866
7718
|
'@global': {
|
|
7867
|
-
':host': {
|
|
7868
|
-
display: addImportantToRule('table-row'),
|
|
7869
|
-
},
|
|
7719
|
+
':host': addImportantToEachRule(Object.assign({ display: 'table-row' }, hostHiddenStyles)),
|
|
7870
7720
|
},
|
|
7871
7721
|
});
|
|
7872
7722
|
};
|
|
@@ -7874,9 +7724,7 @@ const getComponentCss$f = () => {
|
|
|
7874
7724
|
const getComponentCss$e = () => {
|
|
7875
7725
|
return getCss({
|
|
7876
7726
|
'@global': {
|
|
7877
|
-
':host': {
|
|
7878
|
-
display: addImportantToRule('table-header-group'),
|
|
7879
|
-
},
|
|
7727
|
+
':host': addImportantToEachRule(Object.assign({ display: 'table-header-group' }, hostHiddenStyles)),
|
|
7880
7728
|
},
|
|
7881
7729
|
});
|
|
7882
7730
|
};
|
|
@@ -7884,7 +7732,8 @@ const getComponentCss$e = () => {
|
|
|
7884
7732
|
const getComponentCss$d = () => {
|
|
7885
7733
|
return getCss({
|
|
7886
7734
|
'@global': {
|
|
7887
|
-
':host': addImportantToEachRule(Object.assign({ display: 'table-row',
|
|
7735
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ display: 'table-row' }, hostHiddenStyles), hoverMediaQuery({
|
|
7736
|
+
transition: getTransition('background-color'),
|
|
7888
7737
|
'&(:hover)': {
|
|
7889
7738
|
backgroundColor: getThemedColors('light').backgroundSurfaceColor,
|
|
7890
7739
|
},
|
|
@@ -7893,26 +7742,23 @@ const getComponentCss$d = () => {
|
|
|
7893
7742
|
});
|
|
7894
7743
|
};
|
|
7895
7744
|
|
|
7896
|
-
const {
|
|
7897
|
-
const { small: spacingSmall, medium: spacingMedium, large: spacingLarge } = spacing;
|
|
7745
|
+
const { primaryColor } = getThemedColors('light');
|
|
7898
7746
|
const getComponentCss$c = () => {
|
|
7899
7747
|
return getCss({
|
|
7900
7748
|
'@global': {
|
|
7901
|
-
':host': {
|
|
7902
|
-
display: addImportantToRule('block'),
|
|
7903
|
-
},
|
|
7749
|
+
':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)),
|
|
7904
7750
|
},
|
|
7905
7751
|
caption: {
|
|
7906
|
-
marginBottom:
|
|
7907
|
-
[
|
|
7908
|
-
marginBottom:
|
|
7752
|
+
marginBottom: spacingStaticSmall,
|
|
7753
|
+
[getMediaQueryMin('m')]: {
|
|
7754
|
+
marginBottom: spacingStaticMedium,
|
|
7909
7755
|
},
|
|
7910
7756
|
},
|
|
7911
7757
|
root: {
|
|
7912
7758
|
position: 'relative',
|
|
7913
7759
|
},
|
|
7914
7760
|
'scroll-area': Object.assign({ overflow: 'auto visible' }, getFocusJssStyle({ offset: -1 })),
|
|
7915
|
-
table: Object.assign(Object.assign({ position: 'relative', width: '100%', display: 'table' },
|
|
7761
|
+
table: Object.assign(Object.assign({ position: 'relative', width: '100%', display: 'table' }, textSmallStyle), { textAlign: 'left', color: primaryColor, whiteSpace: 'nowrap' }),
|
|
7916
7762
|
'scroll-trigger': {
|
|
7917
7763
|
position: 'absolute',
|
|
7918
7764
|
top: 0,
|
|
@@ -7926,7 +7772,7 @@ const getComponentCss$c = () => {
|
|
|
7926
7772
|
top: 0,
|
|
7927
7773
|
right: 0,
|
|
7928
7774
|
bottom: 0,
|
|
7929
|
-
paddingLeft:
|
|
7775
|
+
paddingLeft: spacingStaticLarge,
|
|
7930
7776
|
pointerEvents: 'none',
|
|
7931
7777
|
display: 'flex',
|
|
7932
7778
|
alignItems: 'center',
|
|
@@ -7951,17 +7797,15 @@ const getComponentCss$c = () => {
|
|
|
7951
7797
|
const tabsTransitionDuration = '.4s';
|
|
7952
7798
|
const transformSelector = (selector) => ['a', 'button'].map((tag) => selector.replace(/\[role]/g, tag)).join();
|
|
7953
7799
|
const getComponentCss$b = (size, weight, theme) => {
|
|
7954
|
-
const {
|
|
7800
|
+
const { primaryColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
7955
7801
|
return getCss({
|
|
7956
|
-
'@global': Object.assign({ ':host': {
|
|
7957
|
-
display: 'block',
|
|
7958
|
-
position: addImportantToRule('relative'),
|
|
7959
|
-
} }, addImportantToEachRule(Object.assign(Object.assign({
|
|
7802
|
+
'@global': Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ position: 'relative', transform: 'translate3d(0,0,0)' }, hostHiddenStyles))) }, addImportantToEachRule(Object.assign(Object.assign({
|
|
7960
7803
|
// would be nice to use shared selector like '::slotted([role])'
|
|
7961
7804
|
// but this doesn't work reliably when rendering in browser
|
|
7962
7805
|
[transformSelector('::slotted([role])')]: {
|
|
7963
7806
|
display: 'inline-block',
|
|
7964
|
-
|
|
7807
|
+
position: 'relative',
|
|
7808
|
+
margin: '0 0 4px 0',
|
|
7965
7809
|
padding: 0,
|
|
7966
7810
|
verticalAlign: 'top',
|
|
7967
7811
|
fontFamily: 'inherit',
|
|
@@ -7974,39 +7818,39 @@ const getComponentCss$b = (size, weight, theme) => {
|
|
|
7974
7818
|
boxSizing: 'border-box',
|
|
7975
7819
|
WebkitAppearance: 'none',
|
|
7976
7820
|
appearance: 'none',
|
|
7977
|
-
outline:
|
|
7821
|
+
outline: 0,
|
|
7978
7822
|
outlineOffset: '1px',
|
|
7979
7823
|
textDecoration: 'none',
|
|
7980
7824
|
textAlign: 'left',
|
|
7981
7825
|
border: 0,
|
|
7982
7826
|
background: 'transparent',
|
|
7983
|
-
color:
|
|
7827
|
+
color: primaryColor,
|
|
7984
7828
|
cursor: 'pointer',
|
|
7985
|
-
|
|
7829
|
+
borderRadius: borderRadiusSmall,
|
|
7830
|
+
'&::before': Object.assign({ content: '""', position: 'absolute', top: '-2px', bottom: '-2px', left: '-4px', right: '-4px', borderRadius: borderRadiusSmall, zIndex: '-1' }, hoverMediaQuery({
|
|
7831
|
+
transition: getTransition('background'),
|
|
7832
|
+
})),
|
|
7986
7833
|
} }, hoverMediaQuery({
|
|
7987
|
-
[transformSelector('::slotted([role]:hover)')]: {
|
|
7988
|
-
|
|
7989
|
-
},
|
|
7990
|
-
})), { [transformSelector('::slotted([role]:active),::slotted([role][aria-selected="true"])')]: {
|
|
7991
|
-
color: activeColor,
|
|
7992
|
-
},
|
|
7834
|
+
[transformSelector('::slotted([role]:hover)::before')]: Object.assign(Object.assign({}, frostedGlassStyle), { background: hoverColor }),
|
|
7835
|
+
})), {
|
|
7993
7836
|
// TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
|
|
7994
|
-
[transformSelector('::slotted([role]:focus)')]: {
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7837
|
+
[transformSelector('::slotted([role]:focus)::before')]: {
|
|
7838
|
+
border: `${borderWidthBase} solid ${focusColor}`,
|
|
7839
|
+
borderRadius: borderRadiusSmall,
|
|
7840
|
+
}, [transformSelector('::slotted([role]:focus:not(:focus-visible))::before')]: {
|
|
7841
|
+
borderColor: 'transparent',
|
|
7998
7842
|
}, [transformSelector('::slotted([role]:not(:last-child))')]: {
|
|
7999
|
-
marginRight: '
|
|
7843
|
+
marginRight: '16px', // No token for this spacing exists yet
|
|
8000
7844
|
} }))),
|
|
8001
|
-
scroller: Object.assign(Object.assign(Object.assign({},
|
|
7845
|
+
scroller: Object.assign(Object.assign(Object.assign({}, textSmallStyle), { fontWeight: getFontWeight(weight) }), buildResponsiveStyles(size, (s) => ({ fontSize: fontSizeText[s] }))),
|
|
8002
7846
|
bar: {
|
|
8003
7847
|
display: 'block',
|
|
8004
7848
|
position: 'absolute',
|
|
8005
7849
|
width: 0,
|
|
8006
|
-
height: weight === 'semibold' ? '
|
|
7850
|
+
height: weight === 'semibold' ? '2px' : '1.5px',
|
|
8007
7851
|
left: 0,
|
|
8008
|
-
bottom:
|
|
8009
|
-
background:
|
|
7852
|
+
bottom: '-4px',
|
|
7853
|
+
background: primaryColor,
|
|
8010
7854
|
'&--enable-transition': {
|
|
8011
7855
|
willChange: 'width',
|
|
8012
7856
|
transition: `transform ${tabsTransitionDuration},width ${tabsTransitionDuration}`,
|
|
@@ -8016,14 +7860,15 @@ const getComponentCss$b = (size, weight, theme) => {
|
|
|
8016
7860
|
};
|
|
8017
7861
|
|
|
8018
7862
|
const getComponentCss$a = (theme) => {
|
|
7863
|
+
const { focusColor } = getThemedColors(theme);
|
|
8019
7864
|
return getCss({
|
|
8020
7865
|
'@global': {
|
|
8021
|
-
':host': addImportantToEachRule(Object.assign({ display: 'block', '&(
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
7866
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ display: 'block', position: 'relative' }, hostHiddenStyles), { outline: 0, '&::before': Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), '&(:focus)::before': {
|
|
7867
|
+
border: `${borderWidthBase} solid ${focusColor}`,
|
|
7868
|
+
borderRadius: borderRadiusSmall,
|
|
7869
|
+
}, '&(:focus:not(:focus-visible))::before': {
|
|
7870
|
+
borderColor: 'transparent',
|
|
7871
|
+
} })),
|
|
8027
7872
|
},
|
|
8028
7873
|
});
|
|
8029
7874
|
};
|
|
@@ -8031,82 +7876,120 @@ const getComponentCss$a = (theme) => {
|
|
|
8031
7876
|
const getComponentCss$9 = () => {
|
|
8032
7877
|
return getCss({
|
|
8033
7878
|
'@global': {
|
|
8034
|
-
':host': {
|
|
8035
|
-
display: 'block',
|
|
8036
|
-
},
|
|
7879
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
8037
7880
|
},
|
|
8038
7881
|
root: {
|
|
8039
|
-
marginBottom:
|
|
7882
|
+
marginBottom: '8px',
|
|
8040
7883
|
},
|
|
8041
7884
|
});
|
|
8042
7885
|
};
|
|
8043
7886
|
|
|
8044
|
-
const
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
(
|
|
7887
|
+
const getTagFocusJssStyle = (themedColors) => {
|
|
7888
|
+
return {
|
|
7889
|
+
'&:focus::before': Object.assign(Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), { border: `${borderWidthBase} solid ${themedColors.focusColor}`, borderRadius: borderRadiusMedium }),
|
|
7890
|
+
'&:focus:not(:focus-visible)::before': {
|
|
7891
|
+
borderColor: 'transparent',
|
|
7892
|
+
},
|
|
7893
|
+
};
|
|
8048
7894
|
};
|
|
8049
|
-
|
|
8050
7895
|
const getThemedBackgroundColor = (tagColor, themedColors) => {
|
|
8051
7896
|
const colorMap = {
|
|
8052
7897
|
'background-default': themedColors.backgroundColor,
|
|
7898
|
+
'background-base': themedColors.backgroundColor,
|
|
8053
7899
|
'background-surface': themedColors.backgroundSurfaceColor,
|
|
8054
|
-
'neutral-contrast-high': themedColors.
|
|
8055
|
-
|
|
7900
|
+
'neutral-contrast-high': themedColors.primaryColor,
|
|
7901
|
+
primary: themedColors.primaryColor,
|
|
7902
|
+
'notification-neutral': themedColors.infoSoftColor,
|
|
7903
|
+
'notification-info': themedColors.infoSoftColor,
|
|
8056
7904
|
'notification-success': themedColors.successSoftColor,
|
|
8057
7905
|
'notification-error': themedColors.errorSoftColor,
|
|
8058
7906
|
'notification-warning': themedColors.warningSoftColor,
|
|
8059
7907
|
};
|
|
8060
7908
|
return colorMap[tagColor];
|
|
8061
7909
|
};
|
|
8062
|
-
|
|
7910
|
+
|
|
7911
|
+
const getComponentCss$8 = (color, hasLabel, theme) => {
|
|
8063
7912
|
const themedColors = getThemedColors(theme);
|
|
8064
|
-
const
|
|
8065
|
-
const
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
7913
|
+
const { primaryColor, hoverColor, contrastHighColor } = themedColors;
|
|
7914
|
+
const backgroundColor = getThemedBackgroundColor(color, themedColors);
|
|
7915
|
+
return getCss(Object.assign(Object.assign({ '@global': {
|
|
7916
|
+
':host': addImportantToEachRule(Object.assign({ display: 'inline-block', verticalAlign: 'top', outline: 0 }, hostHiddenStyles)),
|
|
7917
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', alignItems: 'center', gap: '12px', minHeight: '54px', padding: '4px 0 4px 12px', borderRadius: borderRadiusSmall, border: 0, cursor: 'pointer', background: backgroundColor, color: primaryColor, textAlign: 'left' }, textSmallStyle), { outline: 0 }), getTagFocusJssStyle(themedColors)), hoverMediaQuery({
|
|
7918
|
+
'&:hover > .icon': {
|
|
7919
|
+
backgroundColor: hoverColor,
|
|
7920
|
+
},
|
|
7921
|
+
})),
|
|
7922
|
+
} }, (hasLabel && {
|
|
7923
|
+
label: {
|
|
7924
|
+
display: 'block',
|
|
7925
|
+
marginBottom: '-4px',
|
|
7926
|
+
color: contrastHighColor,
|
|
7927
|
+
fontSize: fontSizeTextXSmall,
|
|
7928
|
+
},
|
|
7929
|
+
})), { icon: {
|
|
7930
|
+
padding: '4px',
|
|
7931
|
+
marginRight: '10px',
|
|
7932
|
+
transition: getTransition('background-color'),
|
|
7933
|
+
borderRadius: borderRadiusSmall,
|
|
7934
|
+
}, 'sr-only': getScreenReaderOnlyJssStyle() }));
|
|
8073
7935
|
};
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
7936
|
+
|
|
7937
|
+
const hasInvertedThemeColor = (tagColor, theme) => {
|
|
7938
|
+
const isDark = isThemeDark(theme);
|
|
7939
|
+
return ((!isDark && (tagColor === 'neutral-contrast-high' || tagColor === 'primary')) || // 'neutral-contrast-high' is deprecated (replaced with 'primary')
|
|
7940
|
+
(isDark &&
|
|
7941
|
+
tagColor !== 'background-surface' &&
|
|
7942
|
+
tagColor !== 'background-default' && // 'background-default' is deprecated (replaced with 'background-base')
|
|
7943
|
+
tagColor !== 'background-base' &&
|
|
7944
|
+
tagColor !== 'notification-neutral' && // 'notification-neutral' is deprecated (replaced with 'notification-info')
|
|
7945
|
+
tagColor !== 'notification-info' &&
|
|
7946
|
+
tagColor !== 'notification-warning' &&
|
|
7947
|
+
tagColor !== 'notification-success' &&
|
|
7948
|
+
tagColor !== 'notification-error'));
|
|
7949
|
+
};
|
|
7950
|
+
const getThemedBackgroundHoverColor = (tagColor, themedColors, theme) => {
|
|
7951
|
+
const isDark = isThemeDark(theme);
|
|
7952
|
+
const keySuffix = isDark ? 'ColorLighten' : 'ColorDarken';
|
|
7953
|
+
const primaryColor = isDark ? themedColors.contrastHighColorLighten : themedColors.contrastHighColor;
|
|
7954
|
+
const colorMap = {
|
|
7955
|
+
'background-default': themedColors[`background${keySuffix}`],
|
|
7956
|
+
'background-base': themedColors[`background${keySuffix}`],
|
|
7957
|
+
'background-surface': themedColors[`backgroundSurface${keySuffix}`],
|
|
7958
|
+
'neutral-contrast-high': primaryColor,
|
|
7959
|
+
primary: primaryColor,
|
|
7960
|
+
'notification-neutral': themedColors[`infoSoft${keySuffix}`],
|
|
7961
|
+
'notification-info': themedColors[`infoSoft${keySuffix}`],
|
|
7962
|
+
'notification-success': themedColors[`successSoft${keySuffix}`],
|
|
7963
|
+
'notification-error': themedColors[`errorSoft${keySuffix}`],
|
|
7964
|
+
'notification-warning': themedColors[`warningSoft${keySuffix}`],
|
|
7965
|
+
};
|
|
7966
|
+
return colorMap[tagColor];
|
|
8081
7967
|
};
|
|
8082
|
-
|
|
7968
|
+
|
|
7969
|
+
const getColors = (themedColors, tagColor, theme) => {
|
|
7970
|
+
const hasInvertedTheme = hasInvertedThemeColor(tagColor, theme);
|
|
7971
|
+
const { primaryColor } = hasInvertedTheme ? getInvertedThemedColors(theme) : themedColors;
|
|
7972
|
+
const { focusColor } = themedColors;
|
|
8083
7973
|
return {
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
'&:focus:not(:focus-visible)::before': {
|
|
8089
|
-
borderColor: 'transparent',
|
|
8090
|
-
},
|
|
8091
|
-
'&:hover:focus::before': hoverMediaQuery({
|
|
8092
|
-
borderColor: focusHoverColor,
|
|
8093
|
-
}),
|
|
7974
|
+
primaryColor,
|
|
7975
|
+
focusColor,
|
|
7976
|
+
backgroundColor: getThemedBackgroundColor(tagColor, themedColors),
|
|
7977
|
+
backgroundHoverColor: getThemedBackgroundHoverColor(tagColor, themedColors, theme),
|
|
8094
7978
|
};
|
|
8095
7979
|
};
|
|
8096
|
-
const getComponentCss$
|
|
8097
|
-
const
|
|
7980
|
+
const getComponentCss$7 = (tagColor, isFocusable, theme) => {
|
|
7981
|
+
const themedColors = getThemedColors(theme);
|
|
7982
|
+
const { primaryColor, backgroundColor, backgroundHoverColor } = getColors(themedColors, tagColor, theme);
|
|
8098
7983
|
return getCss({
|
|
8099
7984
|
'@global': {
|
|
8100
|
-
':host': {
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
},
|
|
8104
|
-
span: Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'center', position: 'relative', height: pxToRemWithUnit(24), padding: `0 ${pxToRemWithUnit(6)}`, borderRadius: pxToRemWithUnit(4), background: backgroundColor, color: baseColor }, textXSmall), { whiteSpace: 'nowrap' }), (isFocusable && Object.assign({ transition: getTransition('color') }, hoverMediaQuery({
|
|
7985
|
+
':host': Object.assign({ display: 'inline-flex', verticalAlign: 'top' }, addImportantToEachRule(hostHiddenStyles)),
|
|
7986
|
+
span: Object.assign({ display: 'flex', gap: '2px', alignItems: 'center', position: 'relative', padding: '4px 9px', borderRadius: borderRadiusSmall, background: backgroundColor, color: primaryColor, font: textXSmallStyle.font, whiteSpace: 'nowrap' }, (isFocusable && Object.assign({}, hoverMediaQuery({
|
|
7987
|
+
transition: getTransition('background-color'),
|
|
8105
7988
|
'&:hover': {
|
|
8106
|
-
|
|
7989
|
+
background: backgroundHoverColor,
|
|
8107
7990
|
},
|
|
8108
7991
|
})))),
|
|
8109
|
-
'::slotted': addImportantToEachRule(Object.assign(Object.assign(
|
|
7992
|
+
'::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(a),&(button)': {
|
|
8110
7993
|
display: 'inline',
|
|
8111
7994
|
position: 'static',
|
|
8112
7995
|
textDecoration: 'underline',
|
|
@@ -8114,121 +7997,91 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8114
7997
|
font: 'inherit',
|
|
8115
7998
|
outline: 0,
|
|
8116
7999
|
color: 'inherit',
|
|
8117
|
-
|
|
8118
|
-
result[key.replace(/^&([a-z:\-()]*)(::[a-z\-]+)$/, '&(a$1)$2, &(button$1)$2')] = value;
|
|
8119
|
-
return result;
|
|
8120
|
-
}, {})), { '&(button)': {
|
|
8000
|
+
appearance: 'none',
|
|
8121
8001
|
margin: 0,
|
|
8122
8002
|
padding: 0,
|
|
8123
8003
|
background: 0,
|
|
8124
8004
|
border: 0,
|
|
8125
8005
|
textAlign: 'left',
|
|
8126
|
-
},
|
|
8006
|
+
} }, Object.entries(getTagFocusJssStyle(themedColors)).reduce((result, [key, value]) => {
|
|
8007
|
+
result[key.replace(/^&([a-z:\-()]*)(::[a-z\-]+)$/, '&(a$1)$2, &(button$1)$2')] = value;
|
|
8008
|
+
return result;
|
|
8009
|
+
}, {})), { '&(br)': {
|
|
8127
8010
|
display: 'none',
|
|
8128
|
-
} })
|
|
8011
|
+
} })),
|
|
8129
8012
|
},
|
|
8130
8013
|
icon: {
|
|
8131
|
-
|
|
8014
|
+
marginLeft: '-2px', // optimize visual alignment
|
|
8132
8015
|
},
|
|
8133
8016
|
});
|
|
8134
8017
|
};
|
|
8135
8018
|
|
|
8136
|
-
const getComponentCss$7 = (color, hasLabel) => {
|
|
8137
|
-
const themedColors = getThemedColors('light');
|
|
8138
|
-
const { baseColor, hoverColor, contrastMediumColor } = themedColors;
|
|
8139
|
-
const backgroundColor = getThemedBackgroundColor(color, themedColors);
|
|
8140
|
-
return getCss(Object.assign(Object.assign({ '@global': {
|
|
8141
|
-
':host': {
|
|
8142
|
-
display: 'inline-flex',
|
|
8143
|
-
verticalAlign: 'top',
|
|
8144
|
-
outline: addImportantToRule(0),
|
|
8145
|
-
},
|
|
8146
|
-
button: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'relative', minHeight: pxToRemWithUnit(48), padding: `${pxToRemWithUnit(4)} ${pxToRemWithUnit(46)} ${pxToRemWithUnit(4)} ${pxToRemWithUnit(16)}`, borderRadius: pxToRemWithUnit(4), border: 0, cursor: 'pointer', background: backgroundColor, color: baseColor, textAlign: 'left' }, textSmall), { outline: 0 }), getTagFocusJssStyle(baseColor, hoverColor)), hoverMediaQuery({
|
|
8147
|
-
'&:hover > .icon': {
|
|
8148
|
-
color: hoverColor,
|
|
8149
|
-
},
|
|
8150
|
-
})),
|
|
8151
|
-
'::slotted': addImportantToEachRule(slottedTextJssStyle),
|
|
8152
|
-
} }, (hasLabel && {
|
|
8153
|
-
label: {
|
|
8154
|
-
display: 'block',
|
|
8155
|
-
marginBottom: pxToRemWithUnit(-4),
|
|
8156
|
-
color: contrastMediumColor,
|
|
8157
|
-
fontSize: pxToRemWithUnit(14),
|
|
8158
|
-
// a custom line-height is needed to have 48px height in total when label + slotted text is used
|
|
8159
|
-
lineHeight: pxToRemWithUnit(20),
|
|
8160
|
-
},
|
|
8161
|
-
})), { icon: {
|
|
8162
|
-
position: 'absolute',
|
|
8163
|
-
top: '50%',
|
|
8164
|
-
right: pxToRemWithUnit(12),
|
|
8165
|
-
transform: 'translate3d(0, -50%, 0)',
|
|
8166
|
-
transition: getTransition('color'),
|
|
8167
|
-
}, 'sr-only': getScreenReaderOnlyJssStyle() }));
|
|
8168
|
-
};
|
|
8169
|
-
|
|
8170
8019
|
const isType = (inputType, typeToValidate) => inputType === typeToValidate;
|
|
8171
8020
|
|
|
8172
|
-
const
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8021
|
+
const cssVariableInputPaddingLeft = '--p-internal-text-field-input-padding-left';
|
|
8022
|
+
const cssVariableInputPaddingRight = '--p-internal-text-field-input-padding-right';
|
|
8023
|
+
const buttonOrIconPadding = '4px';
|
|
8024
|
+
const buttonOrIconSize = `calc(${fontLineHeight} + ${buttonOrIconPadding} * 2)`;
|
|
8025
|
+
const buttonOrIconOffset = '9px';
|
|
8026
|
+
const baseButtonOrIconStyles = {
|
|
8027
|
+
position: 'absolute',
|
|
8028
|
+
bottom: '11px',
|
|
8029
|
+
padding: buttonOrIconPadding,
|
|
8030
|
+
font: `1rem ${fontFamily}`,
|
|
8031
|
+
};
|
|
8032
|
+
const getInputPaddingHorizontal = (buttonOrIconAmount) => {
|
|
8033
|
+
return `calc(${buttonOrIconOffset} * 2 + ${buttonOrIconSize} * ${buttonOrIconAmount})`;
|
|
8034
|
+
};
|
|
8035
|
+
const getButtonOrIconOffsetHorizontal = (buttonOrIconAmount) => {
|
|
8036
|
+
const multiplier = buttonOrIconAmount > 1 ? ` + ${buttonOrIconSize} * ${buttonOrIconAmount - 1}` : '';
|
|
8037
|
+
return `calc(${buttonOrIconOffset} + ${borderWidthBase}${multiplier})`;
|
|
8038
|
+
};
|
|
8039
|
+
const getComponentCss$6 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, isWithinForm, theme) => {
|
|
8040
|
+
const { contrastMediumColor } = getThemedColors(theme);
|
|
8176
8041
|
const isSearch = isType(inputType, 'search');
|
|
8177
8042
|
const isPassword = isType(inputType, 'password');
|
|
8043
|
+
const isNumber = isType(inputType, 'number');
|
|
8178
8044
|
const isSearchOrPassword = isSearch || isPassword;
|
|
8179
|
-
const
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
})), (isType(inputType, 'number')
|
|
8189
|
-
? {
|
|
8190
|
-
MozAppearance: 'textfield', // hides up/down spin button for Firefox
|
|
8191
|
-
}
|
|
8192
|
-
: isSearchOrPassword && Object.assign({ paddingRight: pxToRemWithUnit(isSearch && isWithinForm ? 88 : 48) }, (isSearch && !isWithinForm && { paddingLeft: pxToRemWithUnit(48) })))))), {
|
|
8193
|
-
// Reset webkit autofill styles
|
|
8194
|
-
'::slotted(input:-internal-autofill-selected),::slotted(input:-internal-autofill-previewed),::slotted(input:-webkit-autofill),::slotted(input:-webkit-autofill:focus)': {
|
|
8195
|
-
WebkitBackgroundClip: 'padding-box',
|
|
8196
|
-
} }))), (isSearchOrPassword && {
|
|
8197
|
-
button: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'absolute', bottom: 0, right: 0, margin: 0, width: pxToRemWithUnit(48), height: pxToRemWithUnit(48), padding: pxToRemWithUnit(12), boxSizing: 'border-box', outline: 'transparent none', appearance: 'none', border: 'none', textDecoration: 'none', background: 'transparent', cursor: 'pointer', color: baseColor, transition: getTransition('color') }, getFocusJssStyle({ offset: hasVisibleState ? -5 : -4 })), hoverMediaQuery({
|
|
8198
|
-
'&:not(:disabled):hover': {
|
|
8199
|
-
color: hoverColor,
|
|
8045
|
+
const isSearchWithoutForm = isSearch && !isWithinForm;
|
|
8046
|
+
const isSearchWithForm = isSearch && isWithinForm;
|
|
8047
|
+
return getCss(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ '@global': Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ [cssVariableInputPaddingLeft]: isSearchWithoutForm ? getInputPaddingHorizontal(1) : spacingStaticMedium, [cssVariableInputPaddingRight]: isSearchOrPassword
|
|
8048
|
+
? getInputPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
8049
|
+
: spacingStaticMedium }, hostHiddenStyles))) }, addImportantToEachRule(Object.assign(Object.assign({}, getBaseChildStyles('input', state, theme, Object.assign({ padding: `8px var(${cssVariableInputPaddingRight}) 8px var(${cssVariableInputPaddingLeft})` }, (isNumber && {
|
|
8050
|
+
MozAppearance: 'textfield', // hides up/down spin button for Firefox
|
|
8051
|
+
})))), { '::slotted': {
|
|
8052
|
+
'&(input:-internal-autofill-selected),&(input:-internal-autofill-previewed),&(input:-webkit-autofill),&(input:-webkit-autofill:focus)': {
|
|
8053
|
+
WebkitBackgroundClip: 'padding-box', // reset webkit autofill styles
|
|
8200
8054
|
},
|
|
8201
|
-
})),
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
})
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8055
|
+
} }))) }, (isSearchOrPassword && {
|
|
8056
|
+
button: Object.assign(Object.assign({}, baseButtonOrIconStyles), { right: getButtonOrIconOffsetHorizontal(1),
|
|
8057
|
+
// TODO: maybe we should render hidden button conditionally, needs to be checked if a11y compliant
|
|
8058
|
+
'&:not([hidden]) ~ .button': {
|
|
8059
|
+
right: getButtonOrIconOffsetHorizontal(2),
|
|
8060
|
+
} }),
|
|
8061
|
+
})), (isSearchWithoutForm && {
|
|
8062
|
+
icon: Object.assign(Object.assign({}, baseButtonOrIconStyles), { left: getButtonOrIconOffsetHorizontal(1), pointerEvents: 'none' }),
|
|
8063
|
+
})), { root: {
|
|
8210
8064
|
display: 'block',
|
|
8211
8065
|
position: 'relative',
|
|
8212
|
-
} }, getLabelStyles('input', isDisabled, hideLabel, state, theme, hasUnitOrVisibleCounter && {
|
|
8213
|
-
unit:
|
|
8214
|
-
})), getFunctionalComponentRequiredStyles(theme)), getFunctionalComponentStateMessageStyles(theme, state)), (isSearch &&
|
|
8215
|
-
(hasAction || !isWithinForm) && {
|
|
8216
|
-
icon: {
|
|
8217
|
-
// search icon on left side
|
|
8066
|
+
} }), getLabelStyles('input', isDisabled, hideLabel, state, theme, hasUnitOrVisibleCounter && {
|
|
8067
|
+
unit: {
|
|
8218
8068
|
position: 'absolute',
|
|
8219
|
-
|
|
8220
|
-
|
|
8069
|
+
bottom: '15px',
|
|
8070
|
+
[unitPosition === 'suffix' ? 'right' : 'left']: 0,
|
|
8071
|
+
zIndex: 1,
|
|
8072
|
+
padding: unitPosition === 'suffix' ? `0 ${spacingStaticMedium} 0 10px` : `0 10px 0 ${spacingStaticMedium}`,
|
|
8073
|
+
font: textSmallStyle.font,
|
|
8221
8074
|
color: contrastMediumColor,
|
|
8222
|
-
padding: pxToRemWithUnit(12),
|
|
8223
|
-
pointerEvents: 'none',
|
|
8224
8075
|
},
|
|
8225
|
-
})),
|
|
8076
|
+
})), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)), {
|
|
8077
|
+
// TODO: could be made conditional if we had hasUnit
|
|
8078
|
+
'sr-only': Object.assign(Object.assign({}, getScreenReaderOnlyJssStyle()), { padding: 0 }) }));
|
|
8226
8079
|
};
|
|
8227
8080
|
|
|
8228
|
-
const cssVariableOrderedSuffix = '--
|
|
8229
|
-
const cssVariableUnorderedWidth = '--
|
|
8230
|
-
const cssVariableUnorderedHeight = '--
|
|
8231
|
-
const cssVariableUnorderedTop = '--
|
|
8081
|
+
const cssVariableOrderedSuffix = '--p-internal-text-list-item-ordered-suffix';
|
|
8082
|
+
const cssVariableUnorderedWidth = '--p-internal-text-list-item-unordered-width';
|
|
8083
|
+
const cssVariableUnorderedHeight = '--p-internal-text-list-item-unordered-height';
|
|
8084
|
+
const cssVariableUnorderedTop = '--p-internal-text-list-item-unordered-top';
|
|
8232
8085
|
const getComponentCss$5 = (listType, orderType) => {
|
|
8233
8086
|
const isOrdered = listType === 'ordered';
|
|
8234
8087
|
const beforeJssStyles = {
|
|
@@ -8237,21 +8090,14 @@ const getComponentCss$5 = (listType, orderType) => {
|
|
|
8237
8090
|
};
|
|
8238
8091
|
return getCss({
|
|
8239
8092
|
'@global': {
|
|
8093
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ position: 'relative', display: 'list-item', color: 'inherit', listStyleType: 'none', paddingLeft: pxToRemWithUnit(isOrdered ? 40 : 24) }, hostHiddenStyles), { '&:before': isOrdered
|
|
8094
|
+
? Object.assign(Object.assign(Object.assign({}, beforeJssStyles), { content: `counters(section,".",${orderType === 'numbered' ? 'decimal' : 'lower-latin'}) var(${cssVariableOrderedSuffix},".")`, top: 0, width: pxToRemWithUnit(24), height: 'auto', counterIncrement: 'section', textAlign: 'right', backgroundColor: 'transparent' }), textSmallStyle) : Object.assign(Object.assign({}, beforeJssStyles), { content: '""', width: `var(${cssVariableUnorderedWidth},${pxToRemWithUnit(4)})`, height: `var(${cssVariableUnorderedHeight},${pxToRemWithUnit(4)})`, top: `var(${cssVariableUnorderedTop},calc(1.5em / 2 - 0.125em))`, backgroundColor: 'currentColor' }) })),
|
|
8240
8095
|
'::slotted(*)': {
|
|
8241
8096
|
[cssVariableOrderedSuffix]: '""',
|
|
8242
8097
|
[cssVariableUnorderedWidth]: pxToRemWithUnit(8),
|
|
8243
8098
|
[cssVariableUnorderedHeight]: '1px',
|
|
8244
8099
|
[cssVariableUnorderedTop]: 'calc(1.5em / 2)',
|
|
8245
8100
|
},
|
|
8246
|
-
':host': addImportantToEachRule({
|
|
8247
|
-
position: 'relative',
|
|
8248
|
-
display: 'list-item',
|
|
8249
|
-
color: 'inherit',
|
|
8250
|
-
listStyleType: 'none',
|
|
8251
|
-
paddingLeft: pxToRemWithUnit(isOrdered ? 40 : 24),
|
|
8252
|
-
'&:before': isOrdered
|
|
8253
|
-
? Object.assign(Object.assign(Object.assign({}, beforeJssStyles), { content: `counters(section,".",${orderType === 'numbered' ? 'decimal' : 'lower-latin'}) var(${cssVariableOrderedSuffix},".")`, top: 0, width: pxToRemWithUnit(24), height: 'auto', counterIncrement: 'section', textAlign: 'right', backgroundColor: 'transparent' }), textSmall) : Object.assign(Object.assign({}, beforeJssStyles), { content: '""', width: `var(${cssVariableUnorderedWidth},${pxToRemWithUnit(4)})`, height: `var(${cssVariableUnorderedHeight},${pxToRemWithUnit(4)})`, top: `var(${cssVariableUnorderedTop},calc(1.5em / 2 - 0.125em))`, backgroundColor: 'currentColor' }),
|
|
8254
|
-
}),
|
|
8255
8101
|
},
|
|
8256
8102
|
});
|
|
8257
8103
|
};
|
|
@@ -8259,87 +8105,76 @@ const getComponentCss$5 = (listType, orderType) => {
|
|
|
8259
8105
|
const getComponentCss$4 = (theme) => {
|
|
8260
8106
|
return getCss({
|
|
8261
8107
|
'@global': {
|
|
8262
|
-
':host': {
|
|
8263
|
-
|
|
8264
|
-
counterReset: addImportantToRule('section'),
|
|
8265
|
-
},
|
|
8266
|
-
'[role]': Object.assign({ display: 'block', padding: 0, margin: 0, color: getThemedColors(theme).baseColor }, textSmall),
|
|
8108
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ counterReset: 'section' }, hostHiddenStyles))),
|
|
8109
|
+
'[role]': Object.assign({ display: 'block', padding: 0, margin: 0, color: getThemedColors(theme).primaryColor }, textSmallStyle),
|
|
8267
8110
|
},
|
|
8268
8111
|
});
|
|
8269
8112
|
};
|
|
8270
8113
|
|
|
8114
|
+
const TEXT_TAGS = ['p', 'span', 'div', 'address', 'blockquote', 'figcaption', 'cite', 'time', 'legend'];
|
|
8115
|
+
|
|
8116
|
+
const sizeMap = {
|
|
8117
|
+
'x-small': fontSizeTextXSmall,
|
|
8118
|
+
small: fontSizeTextSmall,
|
|
8119
|
+
medium: fontSizeTextMedium,
|
|
8120
|
+
large: fontSizeTextLarge,
|
|
8121
|
+
'x-large': fontSizeTextXLarge,
|
|
8122
|
+
};
|
|
8271
8123
|
const getComponentCss$3 = (size, weight, align, color, ellipsis, theme) => {
|
|
8272
|
-
// function is local to reuse `weight` parameter
|
|
8273
|
-
// TODO: font short hand isn't really the best choice but we don't have any better alternative atm
|
|
8274
|
-
const getSizeJssStyle = (textSize) => {
|
|
8275
|
-
const fontWeightValue = getFontWeight(weight);
|
|
8276
|
-
return textSize === 'inherit'
|
|
8277
|
-
? {
|
|
8278
|
-
fontSize: textSize,
|
|
8279
|
-
fontWeight: fontWeightValue,
|
|
8280
|
-
}
|
|
8281
|
-
: { font: textMap[textSize].font.replace('400', fontWeightValue) };
|
|
8282
|
-
};
|
|
8283
8124
|
return getCss({
|
|
8284
8125
|
'@global': {
|
|
8285
|
-
':host': {
|
|
8286
|
-
display: 'block',
|
|
8287
|
-
},
|
|
8126
|
+
':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)),
|
|
8288
8127
|
'::slotted': {
|
|
8289
|
-
|
|
8128
|
+
[TEXT_TAGS.map((i) => `&(${i})`).join()]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
8290
8129
|
},
|
|
8291
8130
|
},
|
|
8292
|
-
root:
|
|
8131
|
+
root: getTypographyRootJssStyle(textSmallStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
8132
|
+
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap[sizeValue],
|
|
8133
|
+
fontWeight: getFontWeight(weight),
|
|
8134
|
+
})), align, color, ellipsis, theme),
|
|
8293
8135
|
});
|
|
8294
8136
|
};
|
|
8295
8137
|
|
|
8296
|
-
const getComponentCss$2 = (isDisabled, hideLabel, state,
|
|
8297
|
-
const theme = 'light';
|
|
8298
|
-
const hasVisibleState = isVisibleFormState(state);
|
|
8138
|
+
const getComponentCss$2 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
8299
8139
|
const { contrastMediumColor } = getThemedColors(theme);
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
} }, mergeDeep(addImportantToEachRule(getBaseChildStyles('textarea', state, theme, {
|
|
8304
|
-
// 36 = 2 * 6 + 24 where 6 is the bottom distance and 24 the height of the text
|
|
8305
|
-
padding: isCounterVisible
|
|
8306
|
-
? [defaultPadding, defaultPadding, pxToRemWithUnit(36)].join(' ')
|
|
8307
|
-
: defaultPadding,
|
|
8308
|
-
resize: 'vertical',
|
|
8140
|
+
return getCss(Object.assign(Object.assign(Object.assign(Object.assign({ '@global': Object.assign({ ':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)) }, mergeDeep(addImportantToEachRule(getBaseChildStyles('textarea', state, theme, {
|
|
8141
|
+
font: textSmallStyle.font,
|
|
8142
|
+
padding: hasCounter ? `12px ${spacingStaticMedium} ${spacingStaticLarge}` : `12px ${spacingStaticMedium}`,
|
|
8309
8143
|
})), {
|
|
8310
8144
|
'::slotted(textarea)': {
|
|
8311
|
-
|
|
8145
|
+
height: 'auto',
|
|
8146
|
+
minHeight: '200px',
|
|
8147
|
+
resize: 'vertical', // overridable, too
|
|
8312
8148
|
},
|
|
8313
|
-
})) }, getLabelStyles('textarea', isDisabled, hideLabel, state, theme,
|
|
8314
|
-
counter:
|
|
8315
|
-
|
|
8149
|
+
})) }, getLabelStyles('textarea', isDisabled, hideLabel, state, theme, hasCounter && {
|
|
8150
|
+
counter: {
|
|
8151
|
+
position: 'absolute',
|
|
8152
|
+
bottom: '6px',
|
|
8153
|
+
right: '12px',
|
|
8154
|
+
zIndex: 1,
|
|
8155
|
+
font: textSmallStyle.font,
|
|
8156
|
+
color: contrastMediumColor,
|
|
8157
|
+
},
|
|
8158
|
+
})), getFunctionalComponentRequiredStyles()), getFunctionalComponentStateMessageStyles(theme, state)), (hasCounter && {
|
|
8316
8159
|
'sr-only': Object.assign(Object.assign({}, getScreenReaderOnlyJssStyle()), { padding: 0 }),
|
|
8317
8160
|
})));
|
|
8318
8161
|
};
|
|
8319
8162
|
|
|
8320
8163
|
const toastPositionBottomVarPublic = '--p-toast-position-bottom'; // CSS custom property exposed as public interface
|
|
8321
|
-
const toastPositionBottomVarInternal =
|
|
8164
|
+
const toastPositionBottomVarInternal = '--p-internal-toast-position-bottom';
|
|
8322
8165
|
const toastCloseClassName = 'close';
|
|
8323
8166
|
const getComponentCss = () => {
|
|
8324
8167
|
return getCss({
|
|
8325
8168
|
'@global': {
|
|
8326
|
-
':host': addImportantToEachRule({
|
|
8327
|
-
position
|
|
8328
|
-
left: gridSafeZone.base,
|
|
8329
|
-
right: gridSafeZone.base,
|
|
8330
|
-
// Needs a not overwritable internal css variable to cover default position depending on viewport size and to handle animation properly.
|
|
8169
|
+
':host': addImportantToEachRule(Object.assign({ position: 'fixed', left: gridSafeZoneBase, right: gridSafeZoneBase,
|
|
8170
|
+
// Needs a not overridable internal css variable to cover default position depending on viewport size and to handle animation properly.
|
|
8331
8171
|
// In addition, a public css variable can be passed to overwrite the default position.
|
|
8332
|
-
[toastPositionBottomVarInternal]: `var(${toastPositionBottomVarPublic}, ${
|
|
8333
|
-
|
|
8334
|
-
maxWidth: '42rem',
|
|
8335
|
-
zIndex: TOAST_Z_INDEX,
|
|
8336
|
-
[mediaQueryMin('s')]: {
|
|
8337
|
-
left: pxToRemWithUnit(64),
|
|
8172
|
+
[toastPositionBottomVarInternal]: `var(${toastPositionBottomVarPublic}, 56px)`, bottom: `var(${toastPositionBottomVarInternal})`, maxWidth: '42rem', zIndex: TOAST_Z_INDEX, [getMediaQueryMin('s')]: {
|
|
8173
|
+
left: '64px',
|
|
8338
8174
|
right: 'auto',
|
|
8339
|
-
[toastPositionBottomVarInternal]: `var(${toastPositionBottomVarPublic},
|
|
8175
|
+
[toastPositionBottomVarInternal]: `var(${toastPositionBottomVarPublic}, 64px)`,
|
|
8340
8176
|
bottom: `var(${toastPositionBottomVarInternal})`,
|
|
8341
|
-
},
|
|
8342
|
-
}),
|
|
8177
|
+
} }, hostHiddenStyles)),
|
|
8343
8178
|
'@keyframes in': getKeyframesMobile('in', toastPositionBottomVarInternal),
|
|
8344
8179
|
'@keyframes out': getKeyframesMobile('out', toastPositionBottomVarInternal),
|
|
8345
8180
|
},
|
|
@@ -8348,14 +8183,15 @@ const getComponentCss = () => {
|
|
|
8348
8183
|
});
|
|
8349
8184
|
};
|
|
8350
8185
|
|
|
8351
|
-
exports.getAccordionCss = getComponentCss$
|
|
8352
|
-
exports.getBannerCss = getComponentCss$
|
|
8353
|
-
exports.getButtonCss = getComponentCss$
|
|
8354
|
-
exports.getButtonGroupCss = getComponentCss$
|
|
8355
|
-
exports.getButtonPureCss = getComponentCss$
|
|
8356
|
-
exports.getCarouselCss = getComponentCss$
|
|
8357
|
-
exports.getCheckboxWrapperCss = getComponentCss$
|
|
8358
|
-
exports.getContentWrapperCss = getComponentCss$
|
|
8186
|
+
exports.getAccordionCss = getComponentCss$S;
|
|
8187
|
+
exports.getBannerCss = getComponentCss$R;
|
|
8188
|
+
exports.getButtonCss = getComponentCss$O;
|
|
8189
|
+
exports.getButtonGroupCss = getComponentCss$Q;
|
|
8190
|
+
exports.getButtonPureCss = getComponentCss$P;
|
|
8191
|
+
exports.getCarouselCss = getComponentCss$N;
|
|
8192
|
+
exports.getCheckboxWrapperCss = getComponentCss$M;
|
|
8193
|
+
exports.getContentWrapperCss = getComponentCss$L;
|
|
8194
|
+
exports.getDisplayCss = getComponentCss$K;
|
|
8359
8195
|
exports.getDividerCss = getComponentCss$J;
|
|
8360
8196
|
exports.getFieldsetWrapperCss = getComponentCss$I;
|
|
8361
8197
|
exports.getFlexCss = getComponentCss$G;
|
|
@@ -8364,13 +8200,14 @@ exports.getFunctionalComponentRequiredStyles = getFunctionalComponentRequiredSty
|
|
|
8364
8200
|
exports.getFunctionalComponentStateMessageStyles = getFunctionalComponentStateMessageStyles;
|
|
8365
8201
|
exports.getGridCss = getComponentCss$E;
|
|
8366
8202
|
exports.getGridItemCss = getComponentCss$F;
|
|
8367
|
-
exports.
|
|
8368
|
-
exports.
|
|
8369
|
-
exports.
|
|
8370
|
-
exports.
|
|
8371
|
-
exports.
|
|
8372
|
-
exports.
|
|
8373
|
-
exports.
|
|
8203
|
+
exports.getHeadingCss = getComponentCss$D;
|
|
8204
|
+
exports.getHeadlineCss = getComponentCss$C;
|
|
8205
|
+
exports.getIconCss = getComponentCss$B;
|
|
8206
|
+
exports.getInlineNotificationCss = getComponentCss$A;
|
|
8207
|
+
exports.getLinkCss = getComponentCss$y;
|
|
8208
|
+
exports.getLinkPureCss = getComponentCss$z;
|
|
8209
|
+
exports.getLinkSocialCss = getComponentCss$y;
|
|
8210
|
+
exports.getLinkTileCss = getComponentCss$x;
|
|
8374
8211
|
exports.getMarqueCss = getComponentCss$w;
|
|
8375
8212
|
exports.getModalCss = getComponentCss$v;
|
|
8376
8213
|
exports.getPaginationCss = getComponentCss$u;
|
|
@@ -8394,8 +8231,8 @@ exports.getTableRowCss = getComponentCss$d;
|
|
|
8394
8231
|
exports.getTabsBarCss = getComponentCss$b;
|
|
8395
8232
|
exports.getTabsCss = getComponentCss$9;
|
|
8396
8233
|
exports.getTabsItemCss = getComponentCss$a;
|
|
8397
|
-
exports.getTagCss = getComponentCss$
|
|
8398
|
-
exports.getTagDismissibleCss = getComponentCss$
|
|
8234
|
+
exports.getTagCss = getComponentCss$7;
|
|
8235
|
+
exports.getTagDismissibleCss = getComponentCss$8;
|
|
8399
8236
|
exports.getTextCss = getComponentCss$3;
|
|
8400
8237
|
exports.getTextFieldWrapperCss = getComponentCss$6;
|
|
8401
8238
|
exports.getTextListCss = getComponentCss$4;
|