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