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