@porsche-design-system/components-react 3.8.0 → 3.9.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 +46 -2
- package/cjs/hooks.cjs +9 -0
- package/cjs/lib/components/accordion.wrapper.cjs +2 -2
- package/cjs/lib/components/banner.wrapper.cjs +2 -2
- package/cjs/lib/components/button-pure.wrapper.cjs +3 -3
- package/cjs/lib/components/button.wrapper.cjs +3 -3
- package/cjs/lib/components/carousel.wrapper.cjs +2 -2
- package/cjs/lib/components/checkbox-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/content-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/display.wrapper.cjs +2 -2
- package/cjs/lib/components/divider.wrapper.cjs +2 -2
- package/cjs/lib/components/fieldset-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/fieldset.wrapper.cjs +2 -2
- package/cjs/lib/components/flyout.wrapper.cjs +2 -2
- package/cjs/lib/components/heading.wrapper.cjs +2 -2
- package/cjs/lib/components/headline.wrapper.cjs +2 -2
- package/cjs/lib/components/icon.wrapper.cjs +2 -2
- package/cjs/lib/components/inline-notification.wrapper.cjs +2 -2
- package/cjs/lib/components/link-pure.wrapper.cjs +2 -2
- package/cjs/lib/components/link-social.wrapper.cjs +2 -2
- package/cjs/lib/components/link.wrapper.cjs +2 -2
- package/cjs/lib/components/modal.wrapper.cjs +2 -2
- package/cjs/lib/components/model-signature.wrapper.cjs +2 -2
- package/cjs/lib/components/multi-select.wrapper.cjs +2 -2
- package/cjs/lib/components/pagination.wrapper.cjs +2 -2
- package/cjs/lib/components/pin-code.wrapper.cjs +2 -2
- package/cjs/lib/components/popover.wrapper.cjs +2 -2
- package/cjs/lib/components/radio-button-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/scroller.wrapper.cjs +2 -2
- package/cjs/lib/components/segmented-control.wrapper.cjs +2 -2
- package/cjs/lib/components/select-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/spinner.wrapper.cjs +2 -2
- package/cjs/lib/components/stepper-horizontal.wrapper.cjs +2 -2
- package/cjs/lib/components/switch.wrapper.cjs +2 -2
- package/cjs/lib/components/table.wrapper.cjs +2 -2
- package/cjs/lib/components/tabs-bar.wrapper.cjs +2 -2
- package/cjs/lib/components/tabs.wrapper.cjs +2 -2
- package/cjs/lib/components/tag-dismissible.wrapper.cjs +2 -2
- package/cjs/lib/components/tag.wrapper.cjs +2 -2
- package/cjs/lib/components/text-field-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/text-list.wrapper.cjs +2 -2
- package/cjs/lib/components/text.wrapper.cjs +2 -2
- package/cjs/lib/components/textarea-wrapper.wrapper.cjs +2 -2
- package/cjs/lib/components/toast.wrapper.cjs +4 -3
- package/cjs/lib/components/wordmark.wrapper.cjs +2 -2
- package/cjs/provider.cjs +3 -2
- package/esm/hooks.d.ts +2 -1
- package/esm/hooks.mjs +9 -1
- package/esm/lib/components/accordion.wrapper.d.ts +1 -1
- package/esm/lib/components/accordion.wrapper.mjs +3 -3
- package/esm/lib/components/banner.wrapper.d.ts +1 -1
- package/esm/lib/components/banner.wrapper.mjs +3 -3
- package/esm/lib/components/button-pure.wrapper.d.ts +19 -3
- package/esm/lib/components/button-pure.wrapper.mjs +4 -4
- package/esm/lib/components/button-tile.wrapper.d.ts +1 -1
- package/esm/lib/components/button.wrapper.d.ts +17 -1
- package/esm/lib/components/button.wrapper.mjs +4 -4
- package/esm/lib/components/carousel.wrapper.d.ts +1 -1
- package/esm/lib/components/carousel.wrapper.mjs +3 -3
- package/esm/lib/components/checkbox-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/checkbox-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/content-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/content-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/display.wrapper.d.ts +2 -2
- package/esm/lib/components/display.wrapper.mjs +3 -3
- package/esm/lib/components/divider.wrapper.d.ts +1 -1
- package/esm/lib/components/divider.wrapper.mjs +3 -3
- package/esm/lib/components/fieldset-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/fieldset-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/fieldset.wrapper.d.ts +1 -1
- package/esm/lib/components/fieldset.wrapper.mjs +3 -3
- package/esm/lib/components/flex-item.wrapper.d.ts +1 -1
- package/esm/lib/components/flyout.wrapper.d.ts +1 -1
- package/esm/lib/components/flyout.wrapper.mjs +3 -3
- package/esm/lib/components/heading.wrapper.d.ts +2 -2
- package/esm/lib/components/heading.wrapper.mjs +3 -3
- package/esm/lib/components/headline.wrapper.d.ts +1 -1
- package/esm/lib/components/headline.wrapper.mjs +3 -3
- package/esm/lib/components/icon.wrapper.d.ts +3 -3
- package/esm/lib/components/icon.wrapper.mjs +3 -3
- package/esm/lib/components/inline-notification.wrapper.d.ts +2 -2
- package/esm/lib/components/inline-notification.wrapper.mjs +3 -3
- package/esm/lib/components/link-pure.wrapper.d.ts +3 -3
- package/esm/lib/components/link-pure.wrapper.mjs +3 -3
- package/esm/lib/components/link-social.wrapper.d.ts +1 -1
- package/esm/lib/components/link-social.wrapper.mjs +3 -3
- package/esm/lib/components/link-tile.wrapper.d.ts +1 -1
- package/esm/lib/components/link.wrapper.d.ts +1 -1
- package/esm/lib/components/link.wrapper.mjs +3 -3
- package/esm/lib/components/modal.wrapper.d.ts +1 -1
- package/esm/lib/components/modal.wrapper.mjs +3 -3
- package/esm/lib/components/model-signature.wrapper.d.ts +2 -2
- package/esm/lib/components/model-signature.wrapper.mjs +3 -3
- package/esm/lib/components/multi-select.wrapper.d.ts +1 -1
- package/esm/lib/components/multi-select.wrapper.mjs +3 -3
- package/esm/lib/components/pagination.wrapper.d.ts +1 -1
- package/esm/lib/components/pagination.wrapper.mjs +3 -3
- package/esm/lib/components/pin-code.wrapper.d.ts +2 -2
- package/esm/lib/components/pin-code.wrapper.mjs +3 -3
- package/esm/lib/components/popover.wrapper.d.ts +1 -1
- package/esm/lib/components/popover.wrapper.mjs +3 -3
- package/esm/lib/components/radio-button-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/radio-button-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/scroller.wrapper.d.ts +3 -3
- package/esm/lib/components/scroller.wrapper.mjs +3 -3
- package/esm/lib/components/segmented-control.wrapper.d.ts +1 -1
- package/esm/lib/components/segmented-control.wrapper.mjs +3 -3
- package/esm/lib/components/select-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/select-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/spinner.wrapper.d.ts +2 -2
- package/esm/lib/components/spinner.wrapper.mjs +3 -3
- package/esm/lib/components/stepper-horizontal.wrapper.d.ts +1 -1
- package/esm/lib/components/stepper-horizontal.wrapper.mjs +3 -3
- package/esm/lib/components/switch.wrapper.d.ts +1 -1
- package/esm/lib/components/switch.wrapper.mjs +3 -3
- package/esm/lib/components/table.wrapper.d.ts +1 -1
- package/esm/lib/components/table.wrapper.mjs +3 -3
- package/esm/lib/components/tabs-bar.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs-bar.wrapper.mjs +3 -3
- package/esm/lib/components/tabs.wrapper.d.ts +1 -1
- package/esm/lib/components/tabs.wrapper.mjs +3 -3
- package/esm/lib/components/tag-dismissible.wrapper.d.ts +1 -1
- package/esm/lib/components/tag-dismissible.wrapper.mjs +3 -3
- package/esm/lib/components/tag.wrapper.d.ts +2 -2
- package/esm/lib/components/tag.wrapper.mjs +3 -3
- package/esm/lib/components/text-field-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/text-field-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/text-list.wrapper.d.ts +1 -1
- package/esm/lib/components/text-list.wrapper.mjs +3 -3
- package/esm/lib/components/text.wrapper.d.ts +4 -4
- package/esm/lib/components/text.wrapper.mjs +3 -3
- package/esm/lib/components/textarea-wrapper.wrapper.d.ts +1 -1
- package/esm/lib/components/textarea-wrapper.wrapper.mjs +3 -3
- package/esm/lib/components/toast.wrapper.d.ts +1 -1
- package/esm/lib/components/toast.wrapper.mjs +5 -4
- package/esm/lib/components/wordmark.wrapper.d.ts +2 -2
- package/esm/lib/components/wordmark.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +15 -0
- package/esm/provider.d.ts +4 -1
- package/esm/provider.mjs +3 -2
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +798 -684
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +3 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/hooks.cjs +9 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/button.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/model-signature.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tag-dismissible.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tag.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.cjs +5 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/wordmark.wrapper.cjs +3 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.cjs +4 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.cjs +21 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +4 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +3 -6
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.cjs +5 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +8 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.cjs +2 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.cjs +4 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.cjs +5 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.cjs +4 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/provider.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/stripFocusAndHoverStyles.cjs +4 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +798 -685
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +4 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/hooks.mjs +9 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.mjs +5 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/button.wrapper.mjs +5 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/display.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flyout.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/heading.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/model-signature.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper-dropdown.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tag-dismissible.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tag.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.mjs +6 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/wordmark.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +4 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +2 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +2 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/label.mjs +17 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +4 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +4 -7
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +8 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +2 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.mjs +4 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.mjs +5 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.mjs +4 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/provider.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/stripFocusAndHoverStyles.mjs +4 -1
- package/ssr/esm/hooks.d.ts +2 -1
- package/ssr/esm/lib/components/button-pure.wrapper.d.ts +16 -0
- package/ssr/esm/lib/components/button.wrapper.d.ts +16 -0
- package/ssr/esm/lib/dsr-components/label.d.ts +18 -0
- package/ssr/esm/lib/dsr-components/select-wrapper.d.ts +0 -1
- package/ssr/esm/lib/dsr-components/state-message.d.ts +2 -1
- package/ssr/esm/lib/dsr-components/tabs-bar.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +15 -0
- package/ssr/esm/provider.d.ts +4 -1
|
@@ -3157,7 +3157,7 @@ var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
|
3157
3157
|
|
|
3158
3158
|
const hasWindow = typeof window !== 'undefined';
|
|
3159
3159
|
|
|
3160
|
-
const isHighContrastMode = hasWindow && window.matchMedia
|
|
3160
|
+
const isHighContrastMode = hasWindow && window.matchMedia?.('(forced-colors: active)').matches;
|
|
3161
3161
|
|
|
3162
3162
|
const attributeMutationMap = new Map();
|
|
3163
3163
|
hasWindow &&
|
|
@@ -3382,12 +3382,26 @@ const gridNarrowOffset = {
|
|
|
3382
3382
|
xxl: gridNarrowOffsetXXL,
|
|
3383
3383
|
};
|
|
3384
3384
|
|
|
3385
|
+
const motionDurationShort = '0.25s';
|
|
3386
|
+
|
|
3387
|
+
const motionEasingBase = 'cubic-bezier(0.25,0.1,0.25,1)';
|
|
3388
|
+
|
|
3385
3389
|
const breakpoints = ['base', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
3386
3390
|
|
|
3387
3391
|
function getMediaQueryMax(max) {
|
|
3388
3392
|
return `@media(max-width:${breakpoint[max] - 1}px)`;
|
|
3389
3393
|
}
|
|
3390
3394
|
|
|
3395
|
+
const motionDurationLong = '0.6s';
|
|
3396
|
+
|
|
3397
|
+
const motionDurationModerate = '0.4s';
|
|
3398
|
+
|
|
3399
|
+
const motionDurationVeryLong = '1.2s';
|
|
3400
|
+
|
|
3401
|
+
const motionEasingIn = 'cubic-bezier(0,0,0.2,1)';
|
|
3402
|
+
|
|
3403
|
+
const motionEasingOut = 'cubic-bezier(0.4,0,0.5,1)';
|
|
3404
|
+
|
|
3391
3405
|
const spacingStaticXSmall = '4px';
|
|
3392
3406
|
|
|
3393
3407
|
const spacingStaticSmall = '8px';
|
|
@@ -3771,9 +3785,21 @@ const getInvertedThemedColors = (theme) => {
|
|
|
3771
3785
|
return getThemedColors(isThemeDark(theme) ? 'light' : 'dark');
|
|
3772
3786
|
};
|
|
3773
3787
|
|
|
3774
|
-
const
|
|
3775
|
-
|
|
3776
|
-
|
|
3788
|
+
const motionDurationMap = {
|
|
3789
|
+
short: motionDurationShort,
|
|
3790
|
+
moderate: motionDurationModerate,
|
|
3791
|
+
long: motionDurationLong,
|
|
3792
|
+
veryLong: motionDurationVeryLong,
|
|
3793
|
+
};
|
|
3794
|
+
const motionEasingMap = {
|
|
3795
|
+
base: motionEasingBase,
|
|
3796
|
+
in: motionEasingIn,
|
|
3797
|
+
out: motionEasingOut,
|
|
3798
|
+
linear: 'linear',
|
|
3799
|
+
};
|
|
3800
|
+
const cssVariableTransitionDuration = '--p-transition-duration';
|
|
3801
|
+
const cssVariableAnimationDuration = '--p-animation-duration';
|
|
3802
|
+
const getTransition = (cssProperty, duration = 'short', easing = 'base', delay) => `${cssProperty} var(${cssVariableTransitionDuration}, ${motionDurationMap[duration]}) ${motionEasingMap[easing]}${delay ? ` var(${cssVariableTransitionDuration}, ${motionDurationMap[delay]})` : ''}`;
|
|
3777
3803
|
const pxToRemWithUnit = (px) => `${px / 16}rem`;
|
|
3778
3804
|
const addImportantToRule = (value) => `${value} !important`;
|
|
3779
3805
|
const addImportantToEachRule = (input) => {
|
|
@@ -3859,7 +3885,7 @@ const getBackfaceVisibilityJssStyle = () => ({
|
|
|
3859
3885
|
* @param {string} timingFn - The timing function of the transition animation. (default: 'cubic-bezier(.16,1,.3,1)')
|
|
3860
3886
|
* @returns {JssStyle} - The JSS styles for the frosted glass background.
|
|
3861
3887
|
*/
|
|
3862
|
-
const getFrostedGlassBackgroundJssStyles = (isVisible, duration, theme
|
|
3888
|
+
const getFrostedGlassBackgroundJssStyles = (isVisible, duration, theme) => {
|
|
3863
3889
|
return {
|
|
3864
3890
|
// workaround via pseudo element to fix stacking (black) background in safari
|
|
3865
3891
|
'&::before': {
|
|
@@ -3878,7 +3904,7 @@ const getFrostedGlassBackgroundJssStyles = (isVisible, duration, theme, timingFn
|
|
|
3878
3904
|
backdropFilter: 'blur(0px)',
|
|
3879
3905
|
WebkitBackdropFilter: 'blur(0px)',
|
|
3880
3906
|
}),
|
|
3881
|
-
transition:
|
|
3907
|
+
transition: `${getTransition('opacity', duration, 'base')}, ${getTransition('backdrop-filter', duration, 'base')}, ${getTransition('-webkit-backdrop-filter', duration, 'base')}`,
|
|
3882
3908
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
3883
3909
|
background: themeDarkBackgroundShading,
|
|
3884
3910
|
}),
|
|
@@ -3973,155 +3999,27 @@ const mergeDeep = (...objects) => {
|
|
|
3973
3999
|
const scrollShadowColor = 'rgba(204, 204, 204, 0.35)';
|
|
3974
4000
|
const scrollShadowColorDark = 'rgba(0, 0, 0, 0.6)';
|
|
3975
4001
|
|
|
3976
|
-
const getThemedFormStateColors = (theme, state) => {
|
|
3977
|
-
const themedColors = getThemedColors(theme);
|
|
3978
|
-
return {
|
|
3979
|
-
formStateColor: themedColors[`${state}Color`],
|
|
3980
|
-
formStateHoverColor: themedColors[`${state}ColorDarken`],
|
|
3981
|
-
};
|
|
3982
|
-
};
|
|
3983
|
-
|
|
3984
|
-
const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
3985
|
-
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
3986
|
-
const { primaryColor: primaryColorDark, contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
3987
|
-
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
3988
|
-
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
3989
|
-
return {
|
|
3990
|
-
[`::slotted(${child})`]: {
|
|
3991
|
-
gridArea: '3 / 1 / auto / span 2',
|
|
3992
|
-
display: 'block',
|
|
3993
|
-
width: '100%',
|
|
3994
|
-
height: child !== 'textarea'
|
|
3995
|
-
? `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)` // we need 10px additionally so input height becomes 54px
|
|
3996
|
-
: 'auto',
|
|
3997
|
-
margin: 0,
|
|
3998
|
-
outline: 0,
|
|
3999
|
-
WebkitAppearance: 'none',
|
|
4000
|
-
appearance: 'none',
|
|
4001
|
-
boxSizing: 'border-box',
|
|
4002
|
-
border: `${borderWidthBase} solid ${formStateColor || contrastMediumColor}`,
|
|
4003
|
-
borderRadius: borderRadiusSmall,
|
|
4004
|
-
background: 'transparent',
|
|
4005
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
4006
|
-
textIndent: 0,
|
|
4007
|
-
color: primaryColor,
|
|
4008
|
-
transition: ['color', 'border-color', 'background-color'].map(getTransition).join(),
|
|
4009
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4010
|
-
borderColor: formStateColorDark || contrastMediumColorDark,
|
|
4011
|
-
color: primaryColorDark,
|
|
4012
|
-
}),
|
|
4013
|
-
...additionalDefaultJssStyle,
|
|
4014
|
-
},
|
|
4015
|
-
...hoverMediaQuery({
|
|
4016
|
-
// with the media query the selector has higher priority and overrides disabled styles
|
|
4017
|
-
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)`]: {
|
|
4018
|
-
borderColor: formStateHoverColor || primaryColor,
|
|
4019
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4020
|
-
borderColor: formStateHoverColorDark || primaryColorDark,
|
|
4021
|
-
}),
|
|
4022
|
-
},
|
|
4023
|
-
}),
|
|
4024
|
-
[`::slotted(${child}:focus)`]: {
|
|
4025
|
-
borderColor: primaryColor,
|
|
4026
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4027
|
-
borderColor: primaryColorDark,
|
|
4028
|
-
}),
|
|
4029
|
-
},
|
|
4030
|
-
[`::slotted(${child}:disabled)`]: {
|
|
4031
|
-
cursor: 'not-allowed',
|
|
4032
|
-
color: disabledColor,
|
|
4033
|
-
borderColor: disabledColor,
|
|
4034
|
-
WebkitTextFillColor: disabledColor,
|
|
4035
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4036
|
-
color: disabledColorDark,
|
|
4037
|
-
borderColor: disabledColorDark,
|
|
4038
|
-
WebkitTextFillColor: disabledColorDark,
|
|
4039
|
-
}),
|
|
4040
|
-
},
|
|
4041
|
-
...(child !== 'select' && {
|
|
4042
|
-
[`::slotted(${child}[readonly])`]: {
|
|
4043
|
-
borderColor: contrastLowColor,
|
|
4044
|
-
background: contrastLowColor,
|
|
4045
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4046
|
-
borderColor: contrastLowColorDark,
|
|
4047
|
-
background: contrastLowColorDark,
|
|
4048
|
-
}),
|
|
4049
|
-
},
|
|
4050
|
-
}),
|
|
4051
|
-
};
|
|
4052
|
-
};
|
|
4053
|
-
const getLabelStyles = (child, isDisabled, hideLabel, state, theme, counterOrUnitOrIconStyles, additionalLabelJssStyle) => {
|
|
4054
|
-
const { primaryColor, disabledColor, contrastHighColor } = getThemedColors(theme);
|
|
4055
|
-
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
4056
|
-
const { formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
4057
|
-
const { formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
4058
|
-
const counterOrUnitOrIconStylesKey = counterOrUnitOrIconStyles && Object.keys(counterOrUnitOrIconStyles)[0];
|
|
4059
|
-
return {
|
|
4060
|
-
label: {
|
|
4061
|
-
display: 'grid',
|
|
4062
|
-
gridTemplateColumns: 'minmax(0, 1fr) auto',
|
|
4063
|
-
position: 'relative',
|
|
4064
|
-
'&__text': {
|
|
4065
|
-
gridColumn: 'span 2',
|
|
4066
|
-
display: 'block',
|
|
4067
|
-
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, {
|
|
4068
|
-
width: 'fit-content',
|
|
4069
|
-
marginBottom: spacingStaticXSmall,
|
|
4070
|
-
})),
|
|
4071
|
-
...textSmallStyle,
|
|
4072
|
-
color: isDisabled ? disabledColor : primaryColor,
|
|
4073
|
-
transition: getTransition('color'),
|
|
4074
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4075
|
-
color: isDisabled ? disabledColorDark : primaryColorDark,
|
|
4076
|
-
}),
|
|
4077
|
-
'&+&': {
|
|
4078
|
-
marginTop: `-${spacingStaticXSmall}`,
|
|
4079
|
-
fontSize: fontSizeTextXSmall,
|
|
4080
|
-
...(!isDisabled && {
|
|
4081
|
-
color: contrastHighColor,
|
|
4082
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4083
|
-
color: contrastHighColorDark,
|
|
4084
|
-
}),
|
|
4085
|
-
}),
|
|
4086
|
-
},
|
|
4087
|
-
...hoverMediaQuery({
|
|
4088
|
-
'&:hover': {
|
|
4089
|
-
[`&~::slotted(${child}:not(:disabled):not(:focus):not([readonly]))`]: {
|
|
4090
|
-
borderColor: addImportantToRule(formStateHoverColor || primaryColor),
|
|
4091
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4092
|
-
borderColor: addImportantToRule(formStateHoverColorDark || primaryColorDark),
|
|
4093
|
-
}),
|
|
4094
|
-
},
|
|
4095
|
-
},
|
|
4096
|
-
}),
|
|
4097
|
-
},
|
|
4098
|
-
...additionalLabelJssStyle,
|
|
4099
|
-
},
|
|
4100
|
-
...(counterOrUnitOrIconStyles && {
|
|
4101
|
-
[counterOrUnitOrIconStylesKey]: {
|
|
4102
|
-
...counterOrUnitOrIconStyles[counterOrUnitOrIconStylesKey],
|
|
4103
|
-
pointerEvents: 'none',
|
|
4104
|
-
...(isDisabled && {
|
|
4105
|
-
color: disabledColor,
|
|
4106
|
-
cursor: 'not-allowed',
|
|
4107
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4108
|
-
color: disabledColorDark,
|
|
4109
|
-
}),
|
|
4110
|
-
}),
|
|
4111
|
-
},
|
|
4112
|
-
}),
|
|
4113
|
-
};
|
|
4114
|
-
};
|
|
4115
|
-
|
|
4116
4002
|
const OPTION_HEIGHT = 40; // optgroups are higher and ignored
|
|
4117
4003
|
const MULTI_SELECT_OPTION_HEIGHT = 44;
|
|
4118
4004
|
const getNoResultsOptionJssStyle = () => ({
|
|
4119
4005
|
'&[role=status]': {
|
|
4120
4006
|
cursor: 'not-allowed',
|
|
4121
4007
|
},
|
|
4008
|
+
// TODO: shouldn't be used here, instead use sr-only functional component and style
|
|
4122
4009
|
'&__sr': getHiddenTextJssStyle(),
|
|
4123
4010
|
});
|
|
4124
4011
|
|
|
4012
|
+
/**
|
|
4013
|
+
* Applies a style only on Chromium based browsers by using a media query which is only supported there.
|
|
4014
|
+
* https://www.browserstack.com/guide/create-browser-specific-css
|
|
4015
|
+
*
|
|
4016
|
+
* @param {JssStyle} style - The style to be applied when the Chromium media query is supported.
|
|
4017
|
+
* @returns {JssStyle} - The Chromium media query containing the style.
|
|
4018
|
+
*/
|
|
4019
|
+
const supportsChromiumMediaQuery = (style) => ({
|
|
4020
|
+
'@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm)': style,
|
|
4021
|
+
});
|
|
4022
|
+
|
|
4125
4023
|
/**
|
|
4126
4024
|
* Checks if the current environment supports the native Popover API.
|
|
4127
4025
|
*
|
|
@@ -4182,6 +4080,7 @@ const getComponentCss$10 = (size, compact, open, theme) => {
|
|
|
4182
4080
|
textDecoration: 'none',
|
|
4183
4081
|
border: 0,
|
|
4184
4082
|
outline: 0,
|
|
4083
|
+
margin: 0,
|
|
4185
4084
|
gap: '24px',
|
|
4186
4085
|
background: 'transparent',
|
|
4187
4086
|
cursor: 'pointer',
|
|
@@ -4263,18 +4162,18 @@ const getComponentCss$10 = (size, compact, open, theme) => {
|
|
|
4263
4162
|
? {
|
|
4264
4163
|
gridTemplateRows: '1fr',
|
|
4265
4164
|
visibility: 'visible',
|
|
4266
|
-
transition:
|
|
4165
|
+
transition: getTransition('grid-template-rows'),
|
|
4267
4166
|
paddingBottom: compact ? spacingStaticSmall : '24px',
|
|
4268
4167
|
}
|
|
4269
4168
|
: {
|
|
4270
4169
|
gridTemplateRows: '0fr',
|
|
4271
4170
|
visibility: 'hidden',
|
|
4272
|
-
transition:
|
|
4171
|
+
transition: `${getTransition('grid-template-rows')}, visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationShort})`,
|
|
4273
4172
|
}),
|
|
4274
4173
|
'& div': {
|
|
4275
4174
|
overflow: open ? 'visible' : 'hidden',
|
|
4276
4175
|
// Fix overflow issues for overlapping content (e.g. select dropdown)
|
|
4277
|
-
animation: open ? `$overflow ${
|
|
4176
|
+
animation: open ? `$overflow var(${cssVariableTransitionDuration},${motionDurationShort})` : 'none',
|
|
4278
4177
|
// Necessary to make focus outlines fully visible
|
|
4279
4178
|
padding: '4px',
|
|
4280
4179
|
margin: '-4px',
|
|
@@ -4295,12 +4194,7 @@ const BANNER_Z_INDEX = 99;
|
|
|
4295
4194
|
|
|
4296
4195
|
const cssVariableTop = '--p-banner-position-top';
|
|
4297
4196
|
const cssVariableBottom = '--p-banner-position-bottom';
|
|
4298
|
-
const cssVariableAnimationDuration = '--p-animation-duration';
|
|
4299
4197
|
const cssVariableZIndex = '--p-internal-banner-z-index';
|
|
4300
|
-
const ANIMATION_DURATION$1 = 600;
|
|
4301
|
-
const duration$1 = `var(${cssVariableAnimationDuration},${ANIMATION_DURATION$1}ms)`;
|
|
4302
|
-
const easeInQuad$1 = 'cubic-bezier(0.45,0,0.55,1)';
|
|
4303
|
-
const easeOutQuad$1 = 'cubic-bezier(0.5,1,0.89,1)';
|
|
4304
4198
|
const topBottomFallback = '56px';
|
|
4305
4199
|
const getComponentCss$$ = (isOpen) => {
|
|
4306
4200
|
return getCss({
|
|
@@ -4322,14 +4216,14 @@ const getComponentCss$$ = (isOpen) => {
|
|
|
4322
4216
|
opacity: 1,
|
|
4323
4217
|
visibility: 'inherit',
|
|
4324
4218
|
transform: 'translate3d(0,0,0)',
|
|
4325
|
-
transition: `
|
|
4219
|
+
transition: `transform var(${cssVariableAnimationDuration}, ${motionDurationModerate}) ${motionEasingIn}, opacity var(${cssVariableAnimationDuration}, ${motionDurationModerate}) ${motionEasingIn}`,
|
|
4326
4220
|
}
|
|
4327
4221
|
: {
|
|
4328
4222
|
opacity: 0,
|
|
4329
4223
|
visibility: 'hidden',
|
|
4330
4224
|
transform: `translate3d(0,calc(var(${cssVariableBottom},${topBottomFallback}) + 100%),0)`,
|
|
4331
4225
|
'&(.hydrated),&(.ssr)': {
|
|
4332
|
-
transition: `visibility 0s linear ${
|
|
4226
|
+
transition: `visibility 0s linear var(${cssVariableAnimationDuration}, ${motionDurationLong}), transform var(${cssVariableAnimationDuration}, ${motionDurationModerate}) ${motionEasingOut}, opacity var(${cssVariableAnimationDuration}, ${motionDurationModerate}) ${motionEasingOut}`,
|
|
4333
4227
|
},
|
|
4334
4228
|
}),
|
|
4335
4229
|
[getMediaQueryMin('s')]: {
|
|
@@ -4440,8 +4334,8 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
4440
4334
|
display: 'flex',
|
|
4441
4335
|
gap: spacingStaticXSmall,
|
|
4442
4336
|
width: '100%',
|
|
4443
|
-
margin: 0,
|
|
4444
4337
|
padding: 0,
|
|
4338
|
+
margin: 0,
|
|
4445
4339
|
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
4446
4340
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
4447
4341
|
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
@@ -4523,6 +4417,7 @@ const getComponentCss$Z = (icon, iconSource, active, isLoading, isDisabledOrLoad
|
|
|
4523
4417
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4524
4418
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, false, theme), {
|
|
4525
4419
|
root: {
|
|
4420
|
+
WebkitAppearance: 'none',
|
|
4526
4421
|
appearance: 'none',
|
|
4527
4422
|
background: 'transparent',
|
|
4528
4423
|
textAlign: 'start',
|
|
@@ -4623,7 +4518,7 @@ const getTileBaseStyles = (aspectRatio, isDisabled) => {
|
|
|
4623
4518
|
},
|
|
4624
4519
|
'image-container': {
|
|
4625
4520
|
position: 'absolute',
|
|
4626
|
-
transition: getTransition('transform'),
|
|
4521
|
+
transition: getTransition('transform', 'moderate'),
|
|
4627
4522
|
...getInsetJssStyle(),
|
|
4628
4523
|
},
|
|
4629
4524
|
content: {
|
|
@@ -4757,6 +4652,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4757
4652
|
boxSizing: 'border-box',
|
|
4758
4653
|
outline: 0,
|
|
4759
4654
|
textAlign: 'start',
|
|
4655
|
+
WebkitAppearance: 'none',
|
|
4760
4656
|
appearance: 'none',
|
|
4761
4657
|
textDecoration: 'none',
|
|
4762
4658
|
border: `2px solid ${borderColor}`,
|
|
@@ -4765,7 +4661,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
4765
4661
|
backgroundColor,
|
|
4766
4662
|
color: textColor,
|
|
4767
4663
|
...textSmallStyle,
|
|
4768
|
-
transition:
|
|
4664
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
4769
4665
|
...buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
4770
4666
|
padding: hideLabelValue ? '13px' : '13px 26px',
|
|
4771
4667
|
gap: hideLabelValue ? 0 : spacingStaticSmall,
|
|
@@ -4849,6 +4745,7 @@ const getComponentCss$X = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4849
4745
|
}),
|
|
4850
4746
|
}),
|
|
4851
4747
|
...(loading && !isPrimary && frostedGlassStyle),
|
|
4748
|
+
margin: 0, // Removes default button margin on safari 15
|
|
4852
4749
|
},
|
|
4853
4750
|
...(loading && {
|
|
4854
4751
|
spinner: {
|
|
@@ -4882,7 +4779,7 @@ const getComponentCss$X = (icon, iconSource, variant, hideLabel, disabled, loadi
|
|
|
4882
4779
|
}));
|
|
4883
4780
|
};
|
|
4884
4781
|
|
|
4885
|
-
const carouselTransitionDuration =
|
|
4782
|
+
const carouselTransitionDuration = motionDurationModerate;
|
|
4886
4783
|
const bulletActiveClass = 'bullet--active';
|
|
4887
4784
|
const paginationInfiniteStartCaseClass = 'pagination--infinite';
|
|
4888
4785
|
const bulletInfiniteClass = 'bullet--infinite';
|
|
@@ -5045,7 +4942,7 @@ const getComponentCss$W = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
5045
4942
|
width: 'fit-content',
|
|
5046
4943
|
height: paginationBulletSize,
|
|
5047
4944
|
gap: spacingStaticSmall,
|
|
5048
|
-
transition: `transform ${carouselTransitionDuration}
|
|
4945
|
+
transition: `transform ${carouselTransitionDuration}`,
|
|
5049
4946
|
},
|
|
5050
4947
|
bullet: {
|
|
5051
4948
|
borderRadius: borderRadiusSmall,
|
|
@@ -5063,12 +4960,12 @@ const getComponentCss$W = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
5063
4960
|
? {
|
|
5064
4961
|
width: '0px',
|
|
5065
4962
|
height: '0px',
|
|
5066
|
-
transition: `background-color ${carouselTransitionDuration}
|
|
4963
|
+
transition: `background-color ${carouselTransitionDuration}, width ${carouselTransitionDuration}, height ${carouselTransitionDuration}`,
|
|
5067
4964
|
}
|
|
5068
4965
|
: {
|
|
5069
4966
|
width: paginationBulletSize,
|
|
5070
4967
|
height: paginationBulletSize,
|
|
5071
|
-
transition: `background-color ${carouselTransitionDuration}
|
|
4968
|
+
transition: `background-color ${carouselTransitionDuration}, width ${carouselTransitionDuration}`,
|
|
5072
4969
|
}),
|
|
5073
4970
|
},
|
|
5074
4971
|
...(isInfinitePagination && {
|
|
@@ -5122,31 +5019,16 @@ const getComponentCss$W = (width, hasPagination, isInfinitePagination, alignHead
|
|
|
5122
5019
|
});
|
|
5123
5020
|
};
|
|
5124
5021
|
|
|
5125
|
-
const
|
|
5126
|
-
|
|
5127
|
-
required: {
|
|
5128
|
-
userSelect: 'none',
|
|
5129
|
-
},
|
|
5130
|
-
};
|
|
5131
|
-
};
|
|
5132
|
-
|
|
5133
|
-
const getFunctionalComponentStateMessageStyles = (theme, state) => {
|
|
5022
|
+
const getThemedFormStateColors = (theme, state) => {
|
|
5023
|
+
const themedColors = getThemedColors(theme);
|
|
5134
5024
|
return {
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
gap: spacingStaticXSmall,
|
|
5138
|
-
marginTop: spacingStaticXSmall,
|
|
5139
|
-
...textSmallStyle,
|
|
5140
|
-
color: getThemedFormStateColors(theme, state).formStateColor,
|
|
5141
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5142
|
-
color: getThemedFormStateColors('dark', state).formStateColor,
|
|
5143
|
-
}),
|
|
5144
|
-
transition: getTransition('color'),
|
|
5145
|
-
},
|
|
5025
|
+
formStateColor: themedColors[`${state}Color`],
|
|
5026
|
+
formStateHoverColor: themedColors[`${state}ColorDarken`],
|
|
5146
5027
|
};
|
|
5147
5028
|
};
|
|
5148
5029
|
|
|
5149
|
-
|
|
5030
|
+
// TODO: move to form-styles.ts
|
|
5031
|
+
const getSlottedCheckboxRadioButtonStyles = (state, isDisabled, isLoading, theme) => {
|
|
5150
5032
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
5151
5033
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
5152
5034
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
@@ -5171,121 +5053,79 @@ const getCheckboxRadioJssStyle = (hideLabel, state, isDisabled, isLoading, theme
|
|
|
5171
5053
|
const checkedHoverColor = formStateHoverColor || contrastHighColor;
|
|
5172
5054
|
const checkedHoverColorDark = formStateHoverColorDark || contrastHighColorDark;
|
|
5173
5055
|
return {
|
|
5174
|
-
'
|
|
5175
|
-
'
|
|
5176
|
-
|
|
5177
|
-
|
|
5056
|
+
'::slotted': {
|
|
5057
|
+
'&(input)': {
|
|
5058
|
+
position: 'relative',
|
|
5059
|
+
width: fontLineHeight,
|
|
5060
|
+
height: fontLineHeight,
|
|
5061
|
+
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
5178
5062
|
display: 'block',
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
'
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
boxSizing: 'content-box',
|
|
5195
|
-
background: `transparent 0% 0% / ${fontLineHeight}`,
|
|
5196
|
-
transition: ['border-color', 'background-color'].map(getTransition).join(),
|
|
5197
|
-
border: `2px solid ${uncheckedColor}`,
|
|
5198
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5199
|
-
borderColor: uncheckedColorDark,
|
|
5063
|
+
margin: 0,
|
|
5064
|
+
padding: 0,
|
|
5065
|
+
WebkitAppearance: 'none',
|
|
5066
|
+
appearance: 'none',
|
|
5067
|
+
boxSizing: 'content-box',
|
|
5068
|
+
background: `transparent 0% 0% / ${fontLineHeight}`,
|
|
5069
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}`,
|
|
5070
|
+
border: `2px solid ${uncheckedColor}`,
|
|
5071
|
+
outline: 0,
|
|
5072
|
+
...(disabledOrLoading
|
|
5073
|
+
? {
|
|
5074
|
+
pointerEvents: 'none', // to prevent form element becomes clickable/toggleable
|
|
5075
|
+
}
|
|
5076
|
+
: {
|
|
5077
|
+
cursor: 'pointer',
|
|
5200
5078
|
}),
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5079
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5080
|
+
borderColor: uncheckedColorDark,
|
|
5081
|
+
}),
|
|
5082
|
+
},
|
|
5083
|
+
'&(input:checked)': {
|
|
5084
|
+
// background-image is merged in later
|
|
5085
|
+
borderColor: checkedColor,
|
|
5086
|
+
backgroundColor: checkedColor,
|
|
5087
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5088
|
+
borderColor: checkedColorDark,
|
|
5089
|
+
backgroundColor: checkedColorDark,
|
|
5090
|
+
}),
|
|
5091
|
+
},
|
|
5092
|
+
...(!disabledOrLoading &&
|
|
5093
|
+
!isHighContrastMode &&
|
|
5094
|
+
hoverMediaQuery({
|
|
5095
|
+
'&(input:hover),label:hover~.wrapper &(input)': {
|
|
5096
|
+
borderColor: uncheckedHoverColor,
|
|
5097
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5098
|
+
borderColor: uncheckedHoverColorDark,
|
|
5209
5099
|
}),
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5100
|
+
},
|
|
5101
|
+
'&(input:checked:hover),label:hover~.wrapper &(input:checked)': {
|
|
5102
|
+
borderColor: checkedHoverColor,
|
|
5103
|
+
backgroundColor: checkedHoverColor,
|
|
5104
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5105
|
+
borderColor: checkedHoverColorDark,
|
|
5106
|
+
backgroundColor: checkedHoverColorDark,
|
|
5107
|
+
}),
|
|
5108
|
+
},
|
|
5109
|
+
'label:hover~.wrapper &(input)': supportsChromiumMediaQuery({
|
|
5110
|
+
transition: 'unset', // Fixes chrome bug where transition properties are stuck on hover
|
|
5111
|
+
}),
|
|
5112
|
+
})),
|
|
5113
|
+
...(!isDisabled && {
|
|
5114
|
+
// TODO: can be done with getFocusStyle() in the meantime
|
|
5115
|
+
'&(input:focus)::before': {
|
|
5116
|
+
content: '""',
|
|
5117
|
+
position: 'absolute',
|
|
5118
|
+
...getInsetJssStyle(-6),
|
|
5119
|
+
border: `${borderWidthBase} solid ${focusColor}`,
|
|
5215
5120
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5216
|
-
borderColor:
|
|
5217
|
-
backgroundColor: checkedColorDark,
|
|
5121
|
+
borderColor: focusColorDark,
|
|
5218
5122
|
}),
|
|
5219
5123
|
},
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
'&(input:hover), .text:hover ~ &(input)': {
|
|
5224
|
-
borderColor: uncheckedHoverColor,
|
|
5225
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5226
|
-
borderColor: uncheckedHoverColorDark,
|
|
5227
|
-
}),
|
|
5228
|
-
},
|
|
5229
|
-
'&(input:checked:hover), .text:hover ~ &(input:checked)': {
|
|
5230
|
-
borderColor: checkedHoverColor,
|
|
5231
|
-
backgroundColor: checkedHoverColor,
|
|
5232
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5233
|
-
borderColor: checkedHoverColorDark,
|
|
5234
|
-
backgroundColor: checkedHoverColorDark,
|
|
5235
|
-
}),
|
|
5236
|
-
},
|
|
5237
|
-
})),
|
|
5238
|
-
...(!isDisabled && {
|
|
5239
|
-
'&(input:focus)::before': {
|
|
5240
|
-
content: '""',
|
|
5241
|
-
position: 'absolute',
|
|
5242
|
-
...getInsetJssStyle(-6),
|
|
5243
|
-
border: `${borderWidthBase} solid ${focusColor}`,
|
|
5244
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5245
|
-
borderColor: focusColorDark,
|
|
5246
|
-
}),
|
|
5247
|
-
},
|
|
5248
|
-
'&(input:focus:not(:focus-visible))::before': {
|
|
5249
|
-
borderColor: 'transparent',
|
|
5250
|
-
},
|
|
5251
|
-
}),
|
|
5252
|
-
}),
|
|
5253
|
-
}),
|
|
5254
|
-
label: {
|
|
5255
|
-
display: 'grid',
|
|
5256
|
-
gridTemplateColumns: 'repeat(2, auto)',
|
|
5257
|
-
justifyContent: 'flex-start',
|
|
5258
|
-
},
|
|
5259
|
-
},
|
|
5260
|
-
text: {
|
|
5261
|
-
gridArea: '1 / 2',
|
|
5262
|
-
cursor: disabledOrLoading ? 'default' : 'pointer',
|
|
5263
|
-
...textSmallStyle,
|
|
5264
|
-
color: disabledOrLoading ? disabledColor : primaryColor,
|
|
5265
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5266
|
-
color: disabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
5124
|
+
'&(input:focus:not(:focus-visible))::before': {
|
|
5125
|
+
borderColor: 'transparent',
|
|
5126
|
+
},
|
|
5267
5127
|
}),
|
|
5268
|
-
transition: getTransition('color'),
|
|
5269
|
-
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, {
|
|
5270
|
-
paddingTop: '2px',
|
|
5271
|
-
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent unclickable area between label and input
|
|
5272
|
-
})),
|
|
5273
5128
|
},
|
|
5274
|
-
...getFunctionalComponentRequiredStyles(),
|
|
5275
|
-
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
5276
|
-
...(isLoading && {
|
|
5277
|
-
spinner: {
|
|
5278
|
-
position: 'relative',
|
|
5279
|
-
gridArea: '1 / 1',
|
|
5280
|
-
margin: borderWidthBase,
|
|
5281
|
-
justifySelf: 'center',
|
|
5282
|
-
height: fontLineHeight,
|
|
5283
|
-
width: fontLineHeight,
|
|
5284
|
-
fontFamily,
|
|
5285
|
-
fontSize: '1rem',
|
|
5286
|
-
cursor: 'not-allowed',
|
|
5287
|
-
},
|
|
5288
|
-
}),
|
|
5289
5129
|
};
|
|
5290
5130
|
};
|
|
5291
5131
|
|
|
@@ -5297,6 +5137,65 @@ const escapeHashCharacter = (colorString) => {
|
|
|
5297
5137
|
return colorString.replace('#', '%23');
|
|
5298
5138
|
};
|
|
5299
5139
|
|
|
5140
|
+
const getFunctionalComponentRequiredStyles = () => {
|
|
5141
|
+
return {
|
|
5142
|
+
required: {
|
|
5143
|
+
userSelect: 'none',
|
|
5144
|
+
},
|
|
5145
|
+
};
|
|
5146
|
+
};
|
|
5147
|
+
|
|
5148
|
+
const getFunctionalComponentLabelStyles = (isDisabledOrLoading, hideLabel, theme, additionalDefaultJssStyle, additionalIsShownJssStyle) => {
|
|
5149
|
+
const { primaryColor, disabledColor, contrastHighColor } = getThemedColors(theme);
|
|
5150
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
5151
|
+
return {
|
|
5152
|
+
label: {
|
|
5153
|
+
...textSmallStyle,
|
|
5154
|
+
cursor: isDisabledOrLoading ? 'not-allowed' : 'pointer',
|
|
5155
|
+
justifySelf: 'flex-start',
|
|
5156
|
+
color: isDisabledOrLoading ? disabledColor : primaryColor,
|
|
5157
|
+
transition: getTransition('color'),
|
|
5158
|
+
...buildResponsiveStyles(hideLabel, (isHidden) => getHiddenTextJssStyle(isHidden, additionalIsShownJssStyle)),
|
|
5159
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5160
|
+
color: isDisabledOrLoading ? disabledColorDark : primaryColorDark,
|
|
5161
|
+
}),
|
|
5162
|
+
'&:empty': {
|
|
5163
|
+
display: 'none', // prevents outer spacing caused by parents grid gap, in case no label value is defined (although it has to be set to be a11y compliant)
|
|
5164
|
+
},
|
|
5165
|
+
'&+&': {
|
|
5166
|
+
cursor: 'unset',
|
|
5167
|
+
marginTop: `-${spacingStaticXSmall}`,
|
|
5168
|
+
fontSize: fontSizeTextXSmall,
|
|
5169
|
+
...(!isDisabledOrLoading && {
|
|
5170
|
+
color: contrastHighColor,
|
|
5171
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5172
|
+
color: contrastHighColorDark,
|
|
5173
|
+
}),
|
|
5174
|
+
}),
|
|
5175
|
+
},
|
|
5176
|
+
...additionalDefaultJssStyle,
|
|
5177
|
+
},
|
|
5178
|
+
// .required
|
|
5179
|
+
...getFunctionalComponentRequiredStyles(),
|
|
5180
|
+
};
|
|
5181
|
+
};
|
|
5182
|
+
|
|
5183
|
+
const getFunctionalComponentStateMessageStyles = (theme, state, additionalDefaultJssStyle) => {
|
|
5184
|
+
return {
|
|
5185
|
+
message: {
|
|
5186
|
+
display: 'flex',
|
|
5187
|
+
gap: spacingStaticXSmall,
|
|
5188
|
+
...textSmallStyle,
|
|
5189
|
+
color: getThemedFormStateColors(theme, state).formStateColor,
|
|
5190
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5191
|
+
color: getThemedFormStateColors('dark', state).formStateColor,
|
|
5192
|
+
}),
|
|
5193
|
+
transition: getTransition('color'),
|
|
5194
|
+
...additionalDefaultJssStyle,
|
|
5195
|
+
},
|
|
5196
|
+
};
|
|
5197
|
+
};
|
|
5198
|
+
|
|
5300
5199
|
const getCheckedSVGBackgroundImage$1 = (fill) => {
|
|
5301
5200
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" 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"/>`);
|
|
5302
5201
|
};
|
|
@@ -5317,34 +5216,83 @@ const getComponentCss$V = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
5317
5216
|
const indeterminateIconColorDark = isHighContrastMode
|
|
5318
5217
|
? canvasColor
|
|
5319
5218
|
: escapeHashCharacter(getThemedColors('dark').primaryColor);
|
|
5320
|
-
return getCss(
|
|
5219
|
+
return getCss({
|
|
5321
5220
|
'@global': {
|
|
5322
|
-
'
|
|
5323
|
-
'
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
'&(input:checked)': {
|
|
5328
|
-
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColor),
|
|
5329
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5330
|
-
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColorDark),
|
|
5331
|
-
}),
|
|
5332
|
-
},
|
|
5221
|
+
':host': {
|
|
5222
|
+
display: 'block',
|
|
5223
|
+
...addImportantToEachRule({
|
|
5224
|
+
...colorSchemeStyles,
|
|
5225
|
+
...hostHiddenStyles,
|
|
5333
5226
|
}),
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5227
|
+
},
|
|
5228
|
+
// ::slotted(input)
|
|
5229
|
+
...addImportantToEachRule(mergeDeep(getSlottedCheckboxRadioButtonStyles(state, isDisabled, isLoading, theme), {
|
|
5230
|
+
'::slotted': {
|
|
5231
|
+
'&(input)': {
|
|
5232
|
+
gridArea: '1/1',
|
|
5233
|
+
borderRadius: borderRadiusSmall,
|
|
5234
|
+
},
|
|
5235
|
+
// TODO: is it somehow useful possible to make following styles configurable by paramter?
|
|
5236
|
+
...(!isLoading && {
|
|
5237
|
+
'&(input:checked)': {
|
|
5238
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColor),
|
|
5239
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5240
|
+
backgroundImage: getCheckedSVGBackgroundImage$1(checkedIconColorDark),
|
|
5241
|
+
}),
|
|
5242
|
+
},
|
|
5243
|
+
'&(input:indeterminate)': {
|
|
5244
|
+
backgroundImage: getIndeterminateSVGBackgroundImage(indeterminateIconColor),
|
|
5245
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5246
|
+
backgroundImage: getIndeterminateSVGBackgroundImage(indeterminateIconColorDark),
|
|
5247
|
+
}),
|
|
5248
|
+
},
|
|
5249
|
+
}),
|
|
5250
|
+
...(!isDisabled && {
|
|
5251
|
+
'&(input:focus)::before': {
|
|
5252
|
+
borderRadius: borderRadiusMedium,
|
|
5253
|
+
},
|
|
5338
5254
|
}),
|
|
5339
5255
|
},
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5256
|
+
})),
|
|
5257
|
+
},
|
|
5258
|
+
root: {
|
|
5259
|
+
display: 'grid',
|
|
5260
|
+
gridTemplateColumns: 'auto minmax(0, 1fr)',
|
|
5261
|
+
rowGap: spacingStaticXSmall,
|
|
5262
|
+
},
|
|
5263
|
+
wrapper: {
|
|
5264
|
+
display: 'grid',
|
|
5265
|
+
gridArea: '1/1',
|
|
5266
|
+
alignSelf: 'flex-start',
|
|
5267
|
+
...(isDisabledOrLoading(isDisabled, isLoading) && {
|
|
5268
|
+
// TODO: maybe .wrapper should handle it for all form components while pointer-events: none is set to input
|
|
5269
|
+
cursor: 'not-allowed',
|
|
5345
5270
|
}),
|
|
5346
5271
|
},
|
|
5347
|
-
|
|
5272
|
+
...(isLoading && {
|
|
5273
|
+
// TODO: extract for checkbox-wrapper and radio-button-wrapper (not gridArea and placeSelf)
|
|
5274
|
+
spinner: {
|
|
5275
|
+
position: 'relative',
|
|
5276
|
+
gridArea: '1/1',
|
|
5277
|
+
placeSelf: 'center',
|
|
5278
|
+
width: fontLineHeight,
|
|
5279
|
+
height: fontLineHeight,
|
|
5280
|
+
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
5281
|
+
pointerEvents: 'none',
|
|
5282
|
+
},
|
|
5283
|
+
}),
|
|
5284
|
+
// .label / .required
|
|
5285
|
+
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
5286
|
+
gridArea: '1/2',
|
|
5287
|
+
}, {
|
|
5288
|
+
paddingTop: '2px',
|
|
5289
|
+
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
5290
|
+
}),
|
|
5291
|
+
// .message
|
|
5292
|
+
...getFunctionalComponentStateMessageStyles(theme, state, {
|
|
5293
|
+
gridColumn: '1/3',
|
|
5294
|
+
}),
|
|
5295
|
+
});
|
|
5348
5296
|
};
|
|
5349
5297
|
|
|
5350
5298
|
const widthMap = {
|
|
@@ -5665,8 +5613,6 @@ const getComponentCss$N = (inline, wrap, direction, justifyContent, alignItems,
|
|
|
5665
5613
|
|
|
5666
5614
|
const headerShadowClass = 'header--shadow';
|
|
5667
5615
|
const footerShadowClass$1 = 'footer--shadow';
|
|
5668
|
-
const flyoutTransitionDuration = '0.5s';
|
|
5669
|
-
const flyoutTransitionTimingFunction = 'cubic-bezier(0.77, 0, 0.175, 1)';
|
|
5670
5616
|
const getComponentCss$M = (isOpen, position, hasFooter, hasSubFooter, theme) => {
|
|
5671
5617
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
5672
5618
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
@@ -5693,10 +5639,10 @@ const getComponentCss$M = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
5693
5639
|
}
|
|
5694
5640
|
: {
|
|
5695
5641
|
visibility: 'hidden',
|
|
5696
|
-
transition: `visibility 0s linear ${
|
|
5642
|
+
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationLong})`,
|
|
5697
5643
|
}),
|
|
5698
5644
|
...getInsetJssStyle(),
|
|
5699
|
-
...getFrostedGlassBackgroundJssStyles(isOpen,
|
|
5645
|
+
...getFrostedGlassBackgroundJssStyles(isOpen, 'long', theme),
|
|
5700
5646
|
...colorSchemeStyles,
|
|
5701
5647
|
...hostHiddenStyles,
|
|
5702
5648
|
}),
|
|
@@ -5717,9 +5663,17 @@ const getComponentCss$M = (isOpen, position, hasFooter, hasSubFooter, theme) =>
|
|
|
5717
5663
|
maxWidth: 'var(--p-flyout-max-width, 1180px)',
|
|
5718
5664
|
color: primaryColor,
|
|
5719
5665
|
background: backgroundColor,
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5666
|
+
...(isOpen
|
|
5667
|
+
? {
|
|
5668
|
+
opacity: 1,
|
|
5669
|
+
transform: 'initial',
|
|
5670
|
+
transition: `${getTransition('opacity', 'long', 'in')}, ${getTransition('transform', 'long', 'in')}`,
|
|
5671
|
+
}
|
|
5672
|
+
: {
|
|
5673
|
+
opacity: 0,
|
|
5674
|
+
transform: `translate3d(${isPositionStart ? '-100%' : '100%'}, 0, 0)`,
|
|
5675
|
+
transition: `${getTransition('opacity', 'short', 'out', 'long')}, ${getTransition('transform', 'long', 'out')}`,
|
|
5676
|
+
}),
|
|
5723
5677
|
boxShadow: `${isPositionStart ? '3px' : '-3px'} 0px 30px rgba(0, 0, 0, 0.25)`,
|
|
5724
5678
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5725
5679
|
color: primaryColorDark,
|
|
@@ -6343,7 +6297,6 @@ const getComponentCss$B = (size) => {
|
|
|
6343
6297
|
|
|
6344
6298
|
const mediaQueryXl = getMediaQueryMin('xl');
|
|
6345
6299
|
const { primaryColor: darkThemePrimaryColor, contrastHighColor: darkThemeContrastHighColor } = getThemedColors('dark');
|
|
6346
|
-
const transitionTimingFunction = 'cubic-bezier(.16,1,.3,1)';
|
|
6347
6300
|
const stretchToFullModalWidthClassName = 'stretch-to-full-modal-width';
|
|
6348
6301
|
const marginTopBottom = 'clamp(16px, 7vh, 192px)';
|
|
6349
6302
|
const footerShadowClass = 'footer--shadow';
|
|
@@ -6397,7 +6350,8 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6397
6350
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
6398
6351
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6399
6352
|
const isFullscreenForXlAndXxl = isFullscreenForXl(isFullscreen);
|
|
6400
|
-
const duration = isOpen ? '
|
|
6353
|
+
const duration = isOpen ? 'moderate' : 'short';
|
|
6354
|
+
const easing = isOpen ? 'in' : 'out';
|
|
6401
6355
|
const contentPadding = '32px';
|
|
6402
6356
|
return getCss({
|
|
6403
6357
|
'@global': {
|
|
@@ -6416,7 +6370,7 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6416
6370
|
}
|
|
6417
6371
|
: {
|
|
6418
6372
|
visibility: 'hidden',
|
|
6419
|
-
transition:
|
|
6373
|
+
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationShort})`,
|
|
6420
6374
|
}),
|
|
6421
6375
|
...colorSchemeStyles,
|
|
6422
6376
|
...hostHiddenStyles,
|
|
@@ -6447,9 +6401,9 @@ const getComponentCss$A = (isOpen, isFullscreen, hasDismissButton, hasHeader, ha
|
|
|
6447
6401
|
color: primaryColor,
|
|
6448
6402
|
position: 'relative',
|
|
6449
6403
|
boxSizing: 'border-box',
|
|
6450
|
-
transform: isOpen ? '
|
|
6404
|
+
transform: isOpen ? 'translateY(0%)' : 'translateY(25%)',
|
|
6451
6405
|
opacity: isOpen ? 1 : 0,
|
|
6452
|
-
transition:
|
|
6406
|
+
transition: `${getTransition('opacity', duration, easing)}, ${getTransition('transform', duration, easing)}`,
|
|
6453
6407
|
paddingTop: hasDismissButton ? pxToRemWithUnit(32) : contentPadding,
|
|
6454
6408
|
...(!hasFooter && { paddingBottom: contentPadding }),
|
|
6455
6409
|
background: backgroundColor,
|
|
@@ -6630,7 +6584,7 @@ const getComponentCss$y = (theme) => {
|
|
|
6630
6584
|
wordBreak: 'break-word',
|
|
6631
6585
|
boxSizing: 'border-box',
|
|
6632
6586
|
borderRadius: borderRadiusSmall,
|
|
6633
|
-
transition:
|
|
6587
|
+
transition: `${getTransition('background-color')}, ${getTransition('color')}`,
|
|
6634
6588
|
...getNoResultsOptionJssStyle(),
|
|
6635
6589
|
...hoverMediaQuery({
|
|
6636
6590
|
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
@@ -6690,154 +6644,261 @@ const getPlaceholderJssStyle = (styles) => ({
|
|
|
6690
6644
|
'&:-moz-placeholder': styles /* Firefox 18- */,
|
|
6691
6645
|
});
|
|
6692
6646
|
|
|
6693
|
-
const
|
|
6694
|
-
const
|
|
6695
|
-
const
|
|
6696
|
-
const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWithinForm, hasLabel, theme) => {
|
|
6697
|
-
const { primaryColor, contrastMediumColor, contrastHighColor, backgroundColor, disabledColor } = getThemedColors(theme);
|
|
6698
|
-
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
6647
|
+
const getSlottedTextFieldTextareaSelectStyles = (child, state, isLoading, theme, additionalDefaultJssStyle) => {
|
|
6648
|
+
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
6649
|
+
const { primaryColor: primaryColorDark, contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
6699
6650
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6700
6651
|
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
6701
|
-
|
|
6652
|
+
return {
|
|
6653
|
+
[`::slotted(${child})`]: {
|
|
6654
|
+
display: 'block',
|
|
6655
|
+
width: '100%',
|
|
6656
|
+
height: child !== 'textarea'
|
|
6657
|
+
? `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)` // we need 10px additionally so input height becomes 54px
|
|
6658
|
+
: 'auto',
|
|
6659
|
+
margin: 0,
|
|
6660
|
+
outline: 0,
|
|
6661
|
+
WebkitAppearance: 'none',
|
|
6662
|
+
appearance: 'none',
|
|
6663
|
+
boxSizing: 'border-box',
|
|
6664
|
+
border: `${borderWidthBase} solid ${formStateColor || contrastMediumColor}`,
|
|
6665
|
+
borderRadius: borderRadiusSmall,
|
|
6666
|
+
background: 'transparent',
|
|
6667
|
+
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
6668
|
+
textIndent: 0,
|
|
6669
|
+
color: primaryColor,
|
|
6670
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
6671
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6672
|
+
borderColor: formStateColorDark || contrastMediumColorDark,
|
|
6673
|
+
color: primaryColorDark,
|
|
6674
|
+
}),
|
|
6675
|
+
...additionalDefaultJssStyle,
|
|
6676
|
+
},
|
|
6677
|
+
...(!isLoading &&
|
|
6678
|
+
hoverMediaQuery({
|
|
6679
|
+
// with the media query the selector has higher priority and overrides disabled styles
|
|
6680
|
+
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover),label:hover~.wrapper ::slotted(${child}:not(:disabled):not(:focus):not([readonly]))${child === 'select' ? ',label:hover~.wrapper ::part(select-wrapper-dropdown)' : ''}`]: {
|
|
6681
|
+
borderColor: formStateHoverColor || primaryColor,
|
|
6682
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6683
|
+
borderColor: formStateHoverColorDark || primaryColorDark,
|
|
6684
|
+
}),
|
|
6685
|
+
},
|
|
6686
|
+
})),
|
|
6687
|
+
[`::slotted(${child}:focus)`]: {
|
|
6688
|
+
borderColor: primaryColor,
|
|
6689
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6690
|
+
borderColor: primaryColorDark,
|
|
6691
|
+
}),
|
|
6692
|
+
},
|
|
6693
|
+
[`::slotted(${child}:disabled)`]: {
|
|
6694
|
+
cursor: 'not-allowed',
|
|
6695
|
+
color: disabledColor,
|
|
6696
|
+
borderColor: disabledColor,
|
|
6697
|
+
WebkitTextFillColor: disabledColor,
|
|
6698
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6699
|
+
color: disabledColorDark,
|
|
6700
|
+
borderColor: disabledColorDark,
|
|
6701
|
+
WebkitTextFillColor: disabledColorDark,
|
|
6702
|
+
}),
|
|
6703
|
+
},
|
|
6704
|
+
...(child !== 'select' && {
|
|
6705
|
+
[`::slotted(${child}[readonly])`]: {
|
|
6706
|
+
borderColor: contrastLowColor,
|
|
6707
|
+
background: contrastLowColor,
|
|
6708
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6709
|
+
borderColor: contrastLowColorDark,
|
|
6710
|
+
background: contrastLowColorDark,
|
|
6711
|
+
}),
|
|
6712
|
+
},
|
|
6713
|
+
}),
|
|
6714
|
+
};
|
|
6715
|
+
};
|
|
6716
|
+
const formElementLayeredGap = '9px'; // to have same distance vertically and horizontally for e.g. button/icon within form element
|
|
6717
|
+
const formElementLayeredSafeZone = `calc(${formElementLayeredGap} + ${borderWidthBase})`;
|
|
6718
|
+
// TODO: basic button/icon padding can already be set within style function instead of on component style level
|
|
6719
|
+
const formButtonOrIconPadding = spacingStaticXSmall;
|
|
6720
|
+
// TODO: if we'd use 12px instead, it wouldn't be necessary for textarea to have a custom vertical padding,
|
|
6721
|
+
// unfortunately line-height alignment breaks for a select element for some reasons then
|
|
6722
|
+
// TODO: basic form element padding can already be set within style function instead of on component style level
|
|
6723
|
+
const formElementPaddingVertical = spacingStaticSmall;
|
|
6724
|
+
// TODO: basic form element padding can already be set within style function instead of on component style level
|
|
6725
|
+
const formElementPaddingHorizontal = spacingStaticMedium;
|
|
6726
|
+
const getCalculatedFormElementPaddingHorizontal = (buttonOrIconAmount) => {
|
|
6727
|
+
// when applied, font-family and font-size needs to be set too for correct calculation of ex-unit ($fontLineHeight)
|
|
6728
|
+
return `calc(${formElementLayeredGap} + ${formElementPaddingHorizontal} / 2 + (${fontLineHeight} + ${formButtonOrIconPadding} * 2) * ${buttonOrIconAmount})`;
|
|
6729
|
+
};
|
|
6730
|
+
// TODO: re-use in textarea-wrapper not only in text-field-wrapper
|
|
6731
|
+
const getUnitCounterJssStyle = (isDisabled, theme) => {
|
|
6732
|
+
const { disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
6733
|
+
const { disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
6734
|
+
return {
|
|
6735
|
+
pointerEvents: 'none',
|
|
6736
|
+
maxWidth: '100%',
|
|
6737
|
+
boxSizing: 'border-box',
|
|
6738
|
+
whiteSpace: 'nowrap',
|
|
6739
|
+
overflow: 'hidden',
|
|
6740
|
+
textOverflow: 'ellipsis',
|
|
6741
|
+
font: textSmallStyle.font,
|
|
6742
|
+
color: contrastMediumColor,
|
|
6743
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6744
|
+
color: contrastMediumColorDark,
|
|
6745
|
+
}),
|
|
6746
|
+
...(isDisabled && {
|
|
6747
|
+
color: disabledColor,
|
|
6748
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6749
|
+
color: disabledColorDark,
|
|
6750
|
+
}),
|
|
6751
|
+
}),
|
|
6752
|
+
};
|
|
6753
|
+
};
|
|
6754
|
+
|
|
6755
|
+
const getComponentCss$x = (direction, isOpen, isDisabled, hideLabel, state, isWithinForm, theme) => {
|
|
6756
|
+
const { contrastHighColor } = getThemedColors(theme);
|
|
6757
|
+
const { contrastHighColor: contrastHighColorDark } = getThemedColors('dark');
|
|
6702
6758
|
return getCss({
|
|
6703
6759
|
'@global': {
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
position: 'relative',
|
|
6760
|
+
':host': {
|
|
6761
|
+
display: 'block',
|
|
6762
|
+
...addImportantToEachRule({
|
|
6708
6763
|
...colorSchemeStyles,
|
|
6709
6764
|
...hostHiddenStyles,
|
|
6710
|
-
},
|
|
6711
|
-
|
|
6712
|
-
|
|
6765
|
+
}),
|
|
6766
|
+
},
|
|
6767
|
+
...(isWithinForm &&
|
|
6768
|
+
addImportantToEachRule({
|
|
6769
|
+
'::slotted([slot=internal-select])': {
|
|
6713
6770
|
position: 'absolute',
|
|
6714
6771
|
opacity: 0,
|
|
6715
6772
|
height: '0px',
|
|
6716
6773
|
},
|
|
6717
|
-
}),
|
|
6718
|
-
|
|
6719
|
-
|
|
6774
|
+
})),
|
|
6775
|
+
// TODO: re-use select-wrapper-style
|
|
6776
|
+
input: getInputStyles(isDisabled, direction, isOpen, state, theme),
|
|
6720
6777
|
},
|
|
6721
6778
|
root: {
|
|
6722
|
-
|
|
6779
|
+
display: 'grid',
|
|
6780
|
+
gap: spacingStaticXSmall,
|
|
6723
6781
|
},
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
display: '
|
|
6727
|
-
|
|
6728
|
-
cursor: 'text',
|
|
6729
|
-
...hoverMediaQuery({
|
|
6730
|
-
'&:hover:not(.disabled)': {
|
|
6731
|
-
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
6732
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6733
|
-
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
6734
|
-
}),
|
|
6735
|
-
},
|
|
6736
|
-
}),
|
|
6737
|
-
...(!isDisabled && {
|
|
6738
|
-
'&:focus-within': {
|
|
6739
|
-
borderColor: primaryColor,
|
|
6740
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6741
|
-
borderColor: primaryColorDark,
|
|
6742
|
-
}),
|
|
6743
|
-
},
|
|
6744
|
-
}),
|
|
6745
|
-
background: backgroundColor,
|
|
6746
|
-
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
6747
|
-
borderRadius: borderRadiusSmall,
|
|
6748
|
-
...(isOpen && {
|
|
6749
|
-
[isDirectionDown ? 'paddingBottom' : 'paddingTop']: '1px',
|
|
6750
|
-
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColor}`),
|
|
6751
|
-
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
6752
|
-
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
6753
|
-
}),
|
|
6754
|
-
...(isDisabled && {
|
|
6755
|
-
cursor: 'not-allowed',
|
|
6756
|
-
color: disabledColor,
|
|
6757
|
-
borderColor: disabledColor,
|
|
6758
|
-
WebkitTextFillColor: disabledColor,
|
|
6759
|
-
}),
|
|
6760
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6761
|
-
background: backgroundColorDark,
|
|
6762
|
-
border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
|
|
6763
|
-
...(isOpen && {
|
|
6764
|
-
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
|
|
6765
|
-
}),
|
|
6766
|
-
...(isDisabled && {
|
|
6767
|
-
color: disabledColorDark,
|
|
6768
|
-
borderColor: disabledColorDark,
|
|
6769
|
-
WebkitTextFillColor: disabledColorDark,
|
|
6770
|
-
}),
|
|
6771
|
-
}),
|
|
6782
|
+
wrapper: {
|
|
6783
|
+
position: 'relative',
|
|
6784
|
+
display: 'grid',
|
|
6785
|
+
gridTemplateColumns: `minmax(0, 1fr) auto auto ${formElementLayeredSafeZone}`,
|
|
6772
6786
|
},
|
|
6773
|
-
|
|
6774
|
-
? {
|
|
6775
|
-
label: {
|
|
6776
|
-
display: 'none',
|
|
6777
|
-
},
|
|
6778
|
-
}
|
|
6779
|
-
: hasLabel && getLabelStyles('select', isDisabled, hideLabel, state, theme)),
|
|
6787
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
|
|
6780
6788
|
icon: {
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
'reset-icon': {
|
|
6786
|
-
padding: '4px',
|
|
6787
|
-
margin: 'auto',
|
|
6788
|
-
},
|
|
6789
|
-
'toggle-icon': {
|
|
6789
|
+
gridArea: '1/3',
|
|
6790
|
+
placeSelf: 'center',
|
|
6791
|
+
padding: formButtonOrIconPadding,
|
|
6792
|
+
pointerEvents: 'none',
|
|
6790
6793
|
transform: 'rotate3d(0,0,1,0.0001deg)',
|
|
6791
6794
|
transition: getTransition('transform'),
|
|
6792
|
-
'&--
|
|
6795
|
+
'&--rotate': {
|
|
6793
6796
|
transform: 'rotate3d(0,0,1,180deg)',
|
|
6794
6797
|
},
|
|
6795
6798
|
},
|
|
6799
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
|
|
6800
|
+
button: {
|
|
6801
|
+
gridArea: '1/2',
|
|
6802
|
+
placeSelf: 'center',
|
|
6803
|
+
padding: formButtonOrIconPadding,
|
|
6804
|
+
},
|
|
6805
|
+
listbox: getListStyles$1(isOpen, direction, theme),
|
|
6806
|
+
// TODO: extract (maybe even as functional component) and re-use in multi-select and select-wrapper
|
|
6796
6807
|
'no-results': {
|
|
6797
6808
|
padding: `${spacingStaticSmall} 12px`,
|
|
6809
|
+
boxSizing: 'border-box',
|
|
6798
6810
|
color: contrastHighColor,
|
|
6799
6811
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6800
6812
|
color: contrastHighColorDark,
|
|
6801
6813
|
}),
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
'
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6814
|
+
...getNoResultsOptionJssStyle(),
|
|
6815
|
+
},
|
|
6816
|
+
// TODO: maybe we should extract it as functional component too
|
|
6817
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
6818
|
+
// .label / .required
|
|
6819
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
6820
|
+
// .message
|
|
6821
|
+
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
6822
|
+
});
|
|
6823
|
+
};
|
|
6824
|
+
// TODO: use getSlottedTextFieldTextareaSelectStyles() instead an manipulate selectors like done with PIN Code or even better make it configurable as parameter
|
|
6825
|
+
const getInputStyles = (isDisabled, direction, isOpen, state, theme) => {
|
|
6826
|
+
const isDirectionDown = direction === 'down';
|
|
6827
|
+
const { primaryColor, disabledColor, backgroundColor, contrastMediumColor } = getThemedColors(theme);
|
|
6828
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
6829
|
+
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6830
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
6831
|
+
return {
|
|
6832
|
+
gridArea: '1/1/1/-1',
|
|
6833
|
+
flex: 1,
|
|
6834
|
+
minWidth: 0,
|
|
6835
|
+
// TODO: abstract and re-use for multi-select, select-wrapper and text-field-wrapper
|
|
6836
|
+
height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
6837
|
+
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
6838
|
+
margin: 0,
|
|
6839
|
+
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
6840
|
+
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(2),
|
|
6841
|
+
boxSizing: 'border-box',
|
|
6842
|
+
outline: 0,
|
|
6843
|
+
WebkitAppearance: 'none',
|
|
6844
|
+
appearance: 'none',
|
|
6845
|
+
...textSmallStyle,
|
|
6846
|
+
textOverflow: 'ellipsis',
|
|
6847
|
+
'&:disabled': {
|
|
6848
|
+
cursor: 'not-allowed',
|
|
6849
|
+
},
|
|
6850
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
6851
|
+
color: primaryColor,
|
|
6852
|
+
'&:not(:focus)': {
|
|
6853
|
+
...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
|
|
6854
|
+
...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
|
|
6840
6855
|
},
|
|
6856
|
+
...hoverMediaQuery({
|
|
6857
|
+
'&:hover:not(:disabled):not(:focus),label:hover~.wrapper &:not(:disabled):not(:focus)': {
|
|
6858
|
+
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
6859
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6860
|
+
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
6861
|
+
}),
|
|
6862
|
+
},
|
|
6863
|
+
}),
|
|
6864
|
+
...(!isDisabled && {
|
|
6865
|
+
'&:focus': {
|
|
6866
|
+
borderColor: primaryColor,
|
|
6867
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6868
|
+
borderColor: primaryColorDark,
|
|
6869
|
+
}),
|
|
6870
|
+
},
|
|
6871
|
+
}),
|
|
6872
|
+
background: backgroundColor,
|
|
6873
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
6874
|
+
borderRadius: borderRadiusSmall,
|
|
6875
|
+
...(isOpen && {
|
|
6876
|
+
[isDirectionDown ? 'paddingBottom' : 'paddingTop']: `calc(${formElementPaddingVertical} + 1px)`,
|
|
6877
|
+
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColor}`),
|
|
6878
|
+
[isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
|
|
6879
|
+
[isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
|
|
6880
|
+
}),
|
|
6881
|
+
...(isDisabled && {
|
|
6882
|
+
...getPlaceholderJssStyle({ color: disabledColor }),
|
|
6883
|
+
cursor: 'not-allowed',
|
|
6884
|
+
color: disabledColor,
|
|
6885
|
+
borderColor: disabledColor,
|
|
6886
|
+
WebkitTextFillColor: disabledColor,
|
|
6887
|
+
}),
|
|
6888
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6889
|
+
color: primaryColorDark,
|
|
6890
|
+
background: backgroundColorDark,
|
|
6891
|
+
border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
|
|
6892
|
+
...(isOpen && {
|
|
6893
|
+
[isDirectionDown ? 'borderBottom' : 'borderTop']: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
|
|
6894
|
+
}),
|
|
6895
|
+
...(isDisabled && {
|
|
6896
|
+
...getPlaceholderJssStyle({ color: disabledColorDark }),
|
|
6897
|
+
color: disabledColorDark,
|
|
6898
|
+
borderColor: disabledColorDark,
|
|
6899
|
+
WebkitTextFillColor: disabledColorDark,
|
|
6900
|
+
}),
|
|
6901
|
+
}),
|
|
6841
6902
|
};
|
|
6842
6903
|
};
|
|
6843
6904
|
const getListStyles$1 = (isOpen, direction, theme) => {
|
|
@@ -6845,39 +6906,35 @@ const getListStyles$1 = (isOpen, direction, theme) => {
|
|
|
6845
6906
|
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
6846
6907
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6847
6908
|
return {
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
background: backgroundColorDark,
|
|
6878
|
-
borderColor: primaryColorDark,
|
|
6879
|
-
}),
|
|
6880
|
-
},
|
|
6909
|
+
position: 'absolute',
|
|
6910
|
+
margin: 0,
|
|
6911
|
+
display: isOpen ? 'flex' : 'none',
|
|
6912
|
+
flexDirection: 'column',
|
|
6913
|
+
gap: spacingStaticSmall,
|
|
6914
|
+
padding: '6px',
|
|
6915
|
+
...textSmallStyle,
|
|
6916
|
+
zIndex: 10,
|
|
6917
|
+
left: 0,
|
|
6918
|
+
right: 0,
|
|
6919
|
+
[isDirectionDown ? 'top' : 'bottom']: '100%',
|
|
6920
|
+
boxSizing: 'border-box',
|
|
6921
|
+
maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`,
|
|
6922
|
+
overflowY: 'auto',
|
|
6923
|
+
WebkitOverflowScrolling: 'touch',
|
|
6924
|
+
background: backgroundColor,
|
|
6925
|
+
border: `2px solid ${primaryColor}`,
|
|
6926
|
+
[isDirectionDown ? 'borderTop' : 'borderBottom']: 'none',
|
|
6927
|
+
borderRadius: borderRadiusSmall,
|
|
6928
|
+
[isDirectionDown ? 'borderTopLeftRadius' : 'borderBottomLeftRadius']: 0,
|
|
6929
|
+
[isDirectionDown ? 'borderTopRightRadius' : 'borderBottomRightRadius']: 0,
|
|
6930
|
+
scrollbarWidth: 'thin',
|
|
6931
|
+
scrollbarColor: 'auto',
|
|
6932
|
+
transition: getTransition('border-color'),
|
|
6933
|
+
transform: 'translate3d(0,0,0)',
|
|
6934
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6935
|
+
background: backgroundColorDark,
|
|
6936
|
+
borderColor: primaryColorDark,
|
|
6937
|
+
}),
|
|
6881
6938
|
};
|
|
6882
6939
|
};
|
|
6883
6940
|
|
|
@@ -6933,7 +6990,7 @@ const getComponentCss$w = (maxNumberOfPageLinks, theme) => {
|
|
|
6933
6990
|
display: 'flex',
|
|
6934
6991
|
justifyContent: 'center',
|
|
6935
6992
|
alignItems: 'center',
|
|
6936
|
-
transition:
|
|
6993
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
6937
6994
|
position: 'relative',
|
|
6938
6995
|
width: buttonSize,
|
|
6939
6996
|
height: buttonSize,
|
|
@@ -7008,31 +7065,42 @@ const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(sty
|
|
|
7008
7065
|
|
|
7009
7066
|
const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm, length, theme) => {
|
|
7010
7067
|
const inputSize = `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`; // equivalent to calculation of input height within form-styles
|
|
7011
|
-
const
|
|
7012
|
-
|
|
7068
|
+
const inputStyles = removeStyles('input[readonly]', removeSlottedSelector(getSlottedTextFieldTextareaSelectStyles('input', state, isLoading, theme, {
|
|
7069
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
7070
|
+
padding: `${formElementPaddingVertical} ${spacingStaticXSmall}`,
|
|
7071
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles() via parameter, e.g. textAlign=center|start
|
|
7013
7072
|
textAlign: 'center',
|
|
7073
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles() via parameter, e.g. size=max|min
|
|
7014
7074
|
width: inputSize,
|
|
7015
|
-
...(length
|
|
7075
|
+
...(length > 4 && {
|
|
7016
7076
|
[getMediaQueryMax('xs')]: {
|
|
7017
|
-
|
|
7077
|
+
// TODO: instead of having dedicated css rules depending on length we should try to implement a fluid one fits all solution
|
|
7078
|
+
width: `calc((276px - (${spacingStaticSmall} * ${length - 1})) / ${length})`, // calculate the max with of the inputs that fit into grid in viewport base (276px)
|
|
7018
7079
|
},
|
|
7019
7080
|
}),
|
|
7081
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles() via parameter, e.g. isLoading
|
|
7020
7082
|
...(isLoading && {
|
|
7021
7083
|
opacity: 0.2,
|
|
7022
7084
|
cursor: 'not-allowed',
|
|
7023
7085
|
}),
|
|
7086
|
+
...Object.fromEntries(Array.from(Array(length)).map((_, i) => {
|
|
7087
|
+
return [`&:nth-of-type(${i + 1})`, { gridArea: `1/${i + 1}` }];
|
|
7088
|
+
})),
|
|
7024
7089
|
})));
|
|
7025
7090
|
return getCss({
|
|
7026
7091
|
'@global': {
|
|
7027
|
-
':host':
|
|
7092
|
+
':host': {
|
|
7028
7093
|
display: 'block',
|
|
7029
|
-
...
|
|
7030
|
-
|
|
7031
|
-
|
|
7094
|
+
...addImportantToEachRule({
|
|
7095
|
+
...colorSchemeStyles,
|
|
7096
|
+
...hostHiddenStyles,
|
|
7097
|
+
}),
|
|
7098
|
+
},
|
|
7099
|
+
// input
|
|
7032
7100
|
...inputStyles,
|
|
7033
7101
|
...(isWithinForm &&
|
|
7034
7102
|
addImportantToEachRule({
|
|
7035
|
-
'::slotted(input)': {
|
|
7103
|
+
'::slotted([slot=internal-input])': {
|
|
7036
7104
|
position: 'absolute',
|
|
7037
7105
|
height: inputSize,
|
|
7038
7106
|
width: 0,
|
|
@@ -7040,32 +7108,27 @@ const getComponentCss$v = (hideLabel, state, isDisabled, isLoading, isWithinForm
|
|
|
7040
7108
|
},
|
|
7041
7109
|
})),
|
|
7042
7110
|
},
|
|
7111
|
+
root: {
|
|
7112
|
+
display: 'grid',
|
|
7113
|
+
gap: spacingStaticXSmall,
|
|
7114
|
+
},
|
|
7115
|
+
wrapper: {
|
|
7116
|
+
display: 'grid',
|
|
7117
|
+
justifySelf: 'flex-start',
|
|
7118
|
+
gap: spacingStaticSmall,
|
|
7119
|
+
},
|
|
7043
7120
|
...(isLoading && {
|
|
7044
7121
|
spinner: {
|
|
7045
|
-
|
|
7122
|
+
gridArea: `1/1/1/${length + 1}`,
|
|
7123
|
+
placeSelf: 'center',
|
|
7124
|
+
width: inputSize,
|
|
7046
7125
|
height: inputSize,
|
|
7047
7126
|
pointerEvents: 'none',
|
|
7048
|
-
position: 'absolute',
|
|
7049
|
-
top: '50%',
|
|
7050
|
-
left: '50%',
|
|
7051
|
-
transform: 'translate(-50%, -50%)',
|
|
7052
|
-
},
|
|
7053
|
-
}),
|
|
7054
|
-
'input-container': {
|
|
7055
|
-
display: 'flex',
|
|
7056
|
-
position: 'relative',
|
|
7057
|
-
gap: spacingStaticSmall,
|
|
7058
|
-
flexWrap: 'wrap',
|
|
7059
|
-
width: 'fit-content',
|
|
7060
|
-
},
|
|
7061
|
-
...mergeDeep(labelStyles, {
|
|
7062
|
-
label: {
|
|
7063
|
-
...buildResponsiveStyles(hideLabel,
|
|
7064
|
-
// workaround: since pin-code component is not wrapped into label tag it behaves differently
|
|
7065
|
-
(isLabelHidden) => (isLabelHidden ? { display: 'none' } : { display: 'block' })),
|
|
7066
7127
|
},
|
|
7067
7128
|
}),
|
|
7068
|
-
|
|
7129
|
+
// .label / .required
|
|
7130
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
7131
|
+
// .message
|
|
7069
7132
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
7070
7133
|
});
|
|
7071
7134
|
};
|
|
@@ -7191,6 +7254,7 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7191
7254
|
button: {
|
|
7192
7255
|
display: 'block',
|
|
7193
7256
|
position: 'relative',
|
|
7257
|
+
WebkitAppearance: 'none',
|
|
7194
7258
|
appearance: 'none',
|
|
7195
7259
|
background: 'transparent',
|
|
7196
7260
|
border: 0,
|
|
@@ -7249,7 +7313,7 @@ const getComponentCss$u = (direction, isNative, theme) => {
|
|
|
7249
7313
|
filter: `drop-shadow(0 0 16px ${shadowColor})`,
|
|
7250
7314
|
backdropFilter: 'drop-shadow(0px 0px 0px transparent)',
|
|
7251
7315
|
pointerEvents: 'none',
|
|
7252
|
-
animation:
|
|
7316
|
+
animation: `${motionDurationShort} $fadeIn ${motionEasingBase} forwards`
|
|
7253
7317
|
,
|
|
7254
7318
|
'&::before': {
|
|
7255
7319
|
content: '""',
|
|
@@ -7304,28 +7368,77 @@ const getComponentCss$t = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
7304
7368
|
const checkedIconColorDark = isHighContrastMode
|
|
7305
7369
|
? getHighContrastColors().canvasColor
|
|
7306
7370
|
: escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
7307
|
-
return getCss(
|
|
7371
|
+
return getCss({
|
|
7308
7372
|
'@global': {
|
|
7309
|
-
'
|
|
7310
|
-
'
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
'&(input:checked)': {
|
|
7315
|
-
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColor),
|
|
7316
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7317
|
-
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColorDark),
|
|
7318
|
-
}),
|
|
7319
|
-
},
|
|
7373
|
+
':host': {
|
|
7374
|
+
display: 'block',
|
|
7375
|
+
...addImportantToEachRule({
|
|
7376
|
+
...colorSchemeStyles,
|
|
7377
|
+
...hostHiddenStyles,
|
|
7320
7378
|
}),
|
|
7321
|
-
|
|
7322
|
-
|
|
7379
|
+
},
|
|
7380
|
+
// ::slotted(input)
|
|
7381
|
+
...addImportantToEachRule(mergeDeep(getSlottedCheckboxRadioButtonStyles(state, isDisabled, isLoading, theme), {
|
|
7382
|
+
'::slotted': {
|
|
7383
|
+
'&(input)': {
|
|
7384
|
+
gridArea: '1/1',
|
|
7323
7385
|
borderRadius: '50%',
|
|
7324
7386
|
},
|
|
7325
|
-
|
|
7387
|
+
// TODO: is it somehow useful possible to make following styles configurable by paramter?
|
|
7388
|
+
...(!isLoading && {
|
|
7389
|
+
'&(input:checked)': {
|
|
7390
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColor),
|
|
7391
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7392
|
+
backgroundImage: getCheckedSVGBackgroundImage(checkedIconColorDark),
|
|
7393
|
+
}),
|
|
7394
|
+
},
|
|
7395
|
+
}),
|
|
7396
|
+
...(!isDisabled && {
|
|
7397
|
+
'&(input:focus)::before': {
|
|
7398
|
+
borderRadius: '50%',
|
|
7399
|
+
},
|
|
7400
|
+
}),
|
|
7401
|
+
},
|
|
7402
|
+
})),
|
|
7403
|
+
},
|
|
7404
|
+
root: {
|
|
7405
|
+
display: 'grid',
|
|
7406
|
+
gridTemplateColumns: 'auto minmax(0, 1fr)',
|
|
7407
|
+
rowGap: spacingStaticXSmall,
|
|
7408
|
+
},
|
|
7409
|
+
wrapper: {
|
|
7410
|
+
display: 'grid',
|
|
7411
|
+
gridArea: '1/1',
|
|
7412
|
+
alignSelf: 'flex-start',
|
|
7413
|
+
...(isDisabledOrLoading(isDisabled, isLoading) && {
|
|
7414
|
+
// TODO: maybe .wrapper should handle it for all form components while pointer-events: none is set to input
|
|
7415
|
+
cursor: 'not-allowed',
|
|
7326
7416
|
}),
|
|
7327
7417
|
},
|
|
7328
|
-
|
|
7418
|
+
...(isLoading && {
|
|
7419
|
+
// TODO: extract for checkbox-wrapper and radio-button-wrapper (not gridArea and placeSelf)
|
|
7420
|
+
spinner: {
|
|
7421
|
+
position: 'relative',
|
|
7422
|
+
gridArea: '1/1',
|
|
7423
|
+
placeSelf: 'center',
|
|
7424
|
+
width: fontLineHeight,
|
|
7425
|
+
height: fontLineHeight,
|
|
7426
|
+
font: `${fontSizeTextSmall} ${fontFamily}`,
|
|
7427
|
+
pointerEvents: 'none',
|
|
7428
|
+
},
|
|
7429
|
+
}),
|
|
7430
|
+
// .label / .required
|
|
7431
|
+
...getFunctionalComponentLabelStyles(isDisabled || isLoading, hideLabel, theme, {
|
|
7432
|
+
gridArea: '1/2',
|
|
7433
|
+
}, {
|
|
7434
|
+
paddingTop: '2px',
|
|
7435
|
+
paddingInlineStart: spacingStaticSmall, // asymmetric padding used instead of gap to prevent not clickable area between label and input
|
|
7436
|
+
}),
|
|
7437
|
+
// .message
|
|
7438
|
+
...getFunctionalComponentStateMessageStyles(theme, state, {
|
|
7439
|
+
gridColumn: '1/3',
|
|
7440
|
+
}),
|
|
7441
|
+
});
|
|
7329
7442
|
};
|
|
7330
7443
|
|
|
7331
7444
|
const gradientColorLight = {
|
|
@@ -7643,12 +7756,13 @@ const getButtonStyles = (direction, isOpen, state, theme) => {
|
|
|
7643
7756
|
const isDirectionDown = direction === 'down';
|
|
7644
7757
|
return {
|
|
7645
7758
|
'@global': {
|
|
7759
|
+
// TODO: extract generic default button/anchor reset style
|
|
7646
7760
|
button: {
|
|
7647
7761
|
position: 'absolute',
|
|
7648
|
-
|
|
7649
|
-
height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
7762
|
+
...getInsetJssStyle(),
|
|
7650
7763
|
width: '100%',
|
|
7651
|
-
|
|
7764
|
+
height: '100%',
|
|
7765
|
+
margin: 0,
|
|
7652
7766
|
padding: 0,
|
|
7653
7767
|
background: 'transparent',
|
|
7654
7768
|
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
@@ -7707,14 +7821,18 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7707
7821
|
input: {
|
|
7708
7822
|
display: 'block',
|
|
7709
7823
|
position: 'absolute',
|
|
7824
|
+
...getInsetJssStyle(2),
|
|
7825
|
+
width: 'calc(100% - 4px)',
|
|
7826
|
+
height: 'calc(100% - 4px)',
|
|
7710
7827
|
zIndex: 1,
|
|
7711
|
-
bottom: '2px',
|
|
7712
|
-
left: '2px',
|
|
7713
|
-
width: `calc(100% - (${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2))`,
|
|
7714
|
-
height: `calc(${fontLineHeight} + 6px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
7715
7828
|
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
7716
|
-
|
|
7829
|
+
margin: 0,
|
|
7830
|
+
// TODO: could be done with css subgrid much more elegant in the near future
|
|
7831
|
+
// or move input into select-wrapper and handle it the same like multi-select
|
|
7832
|
+
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
7833
|
+
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(1),
|
|
7717
7834
|
outline: '0',
|
|
7835
|
+
WebkitAppearance: 'none',
|
|
7718
7836
|
appearance: 'none',
|
|
7719
7837
|
boxSizing: 'border-box',
|
|
7720
7838
|
border: '0',
|
|
@@ -7768,6 +7886,7 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
|
|
|
7768
7886
|
},
|
|
7769
7887
|
},
|
|
7770
7888
|
}),
|
|
7889
|
+
// TODO: we should try to get rid of the span and apply the border-styles on either select or input
|
|
7771
7890
|
'&+span': {
|
|
7772
7891
|
// for focus outline and clicking arrow since input ends left of the icon
|
|
7773
7892
|
position: 'absolute',
|
|
@@ -7800,11 +7919,12 @@ const getListStyles = (direction, theme) => {
|
|
|
7800
7919
|
display: 'flex',
|
|
7801
7920
|
flexDirection: 'column',
|
|
7802
7921
|
gap: spacingStaticSmall,
|
|
7803
|
-
position: `var(${dropdownPositionVar})`,
|
|
7922
|
+
position: `var(${dropdownPositionVar}, absolute)`,
|
|
7804
7923
|
padding: '6px',
|
|
7805
7924
|
margin: 0,
|
|
7806
7925
|
background: backgroundColor,
|
|
7807
7926
|
...textSmallStyle,
|
|
7927
|
+
color: contrastHighColor,
|
|
7808
7928
|
zIndex: 10,
|
|
7809
7929
|
left: 0,
|
|
7810
7930
|
right: 0,
|
|
@@ -7824,6 +7944,7 @@ const getListStyles = (direction, theme) => {
|
|
|
7824
7944
|
transition: getTransition('border-color'),
|
|
7825
7945
|
transform: 'translate3d(0,0,0)',
|
|
7826
7946
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7947
|
+
color: contrastHighColorDark,
|
|
7827
7948
|
background: backgroundColorDark,
|
|
7828
7949
|
borderColor: primaryColorDark,
|
|
7829
7950
|
[isDirectionDown ? 'borderTopColor' : 'borderBottomColor']: addImportantToRule(contrastMediumColorDark),
|
|
@@ -7836,16 +7957,12 @@ const getListStyles = (direction, theme) => {
|
|
|
7836
7957
|
gap: '12px',
|
|
7837
7958
|
padding: `${spacingStaticSmall} 12px`,
|
|
7838
7959
|
flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
|
|
7839
|
-
color: contrastHighColor,
|
|
7840
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7841
|
-
color: contrastHighColorDark,
|
|
7842
|
-
}),
|
|
7843
7960
|
cursor: 'pointer',
|
|
7844
7961
|
textAlign: 'start',
|
|
7845
7962
|
wordBreak: 'break-word',
|
|
7846
7963
|
boxSizing: 'border-box',
|
|
7847
7964
|
borderRadius: borderRadiusSmall,
|
|
7848
|
-
transition:
|
|
7965
|
+
transition: `${getTransition('background-color')}, ${getTransition('color')}`,
|
|
7849
7966
|
...getNoResultsOptionJssStyle(),
|
|
7850
7967
|
...hoverMediaQuery({
|
|
7851
7968
|
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
@@ -7889,9 +8006,13 @@ const getListStyles = (direction, theme) => {
|
|
|
7889
8006
|
},
|
|
7890
8007
|
},
|
|
7891
8008
|
optgroup: {
|
|
8009
|
+
color: contrastMediumColor,
|
|
7892
8010
|
display: 'block',
|
|
7893
8011
|
padding: '3px 14px',
|
|
7894
8012
|
fontWeight: fontWeightSemiBold,
|
|
8013
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8014
|
+
color: contrastMediumColorDark,
|
|
8015
|
+
}),
|
|
7895
8016
|
'&:not(:first-child)': {
|
|
7896
8017
|
marginTop: spacingStaticSmall,
|
|
7897
8018
|
},
|
|
@@ -7902,37 +8023,13 @@ const getListStyles = (direction, theme) => {
|
|
|
7902
8023
|
};
|
|
7903
8024
|
};
|
|
7904
8025
|
const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) => {
|
|
7905
|
-
const { primaryColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
7906
|
-
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
|
|
7907
|
-
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7908
|
-
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
7909
8026
|
return getCss(
|
|
7910
8027
|
// merge because of global styles
|
|
7911
8028
|
mergeDeep({
|
|
7912
8029
|
'@global': {
|
|
7913
8030
|
':host': {
|
|
7914
|
-
[dropdownPositionVar]: 'absolute',
|
|
7915
8031
|
display: 'block',
|
|
7916
|
-
position:
|
|
7917
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'),
|
|
7918
|
-
marginTop: `calc(-1 * (${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2))`,
|
|
7919
|
-
paddingTop: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`,
|
|
7920
|
-
left: 0,
|
|
7921
|
-
right: 0,
|
|
7922
|
-
color: disabled ? disabledColor : formStateColor || contrastMediumColor,
|
|
7923
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7924
|
-
color: disabled ? disabledColorDark : formStateColorDark || contrastMediumColorDark,
|
|
7925
|
-
}),
|
|
7926
|
-
...(!disabled &&
|
|
7927
|
-
!isHighContrastMode &&
|
|
7928
|
-
hoverMediaQuery({
|
|
7929
|
-
'&(:hover)': {
|
|
7930
|
-
color: formStateHoverColor || primaryColor,
|
|
7931
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
7932
|
-
color: formStateHoverColorDark || primaryColorDark,
|
|
7933
|
-
}),
|
|
7934
|
-
},
|
|
7935
|
-
})),
|
|
8032
|
+
position: 'relative',
|
|
7936
8033
|
},
|
|
7937
8034
|
},
|
|
7938
8035
|
'sr-text': {
|
|
@@ -7943,41 +8040,57 @@ const getComponentCss$p = (direction, isOpen, state, disabled, filter, theme) =>
|
|
|
7943
8040
|
: getButtonStyles(direction, isOpen, state, theme), isOpen && getListStyles(direction, theme)));
|
|
7944
8041
|
};
|
|
7945
8042
|
|
|
7946
|
-
const controlBarWidth = '54px';
|
|
7947
8043
|
const getComponentCss$o = (isDisabled, hasCustomDropdown, hideLabel, state, theme) => {
|
|
7948
8044
|
return getCss({
|
|
7949
|
-
'@global':
|
|
8045
|
+
'@global': {
|
|
7950
8046
|
':host': {
|
|
7951
8047
|
display: 'block',
|
|
7952
|
-
...
|
|
7953
|
-
|
|
8048
|
+
...addImportantToEachRule({
|
|
8049
|
+
...colorSchemeStyles,
|
|
8050
|
+
...hostHiddenStyles,
|
|
8051
|
+
}),
|
|
7954
8052
|
},
|
|
7955
|
-
|
|
8053
|
+
// ::slotted(select)
|
|
8054
|
+
...addImportantToEachRule(getSlottedTextFieldTextareaSelectStyles('select', state, false, theme, {
|
|
8055
|
+
gridArea: '1/1/1/-1',
|
|
7956
8056
|
position: 'static',
|
|
7957
8057
|
zIndex: 0,
|
|
7958
8058
|
cursor: 'pointer',
|
|
7959
|
-
|
|
7960
|
-
|
|
8059
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
8060
|
+
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
8061
|
+
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(1),
|
|
8062
|
+
// TODO: needs to be aligned with multi-select
|
|
7961
8063
|
...(hasCustomDropdown && !isDisabled && { borderColor: 'transparent' }),
|
|
7962
|
-
}),
|
|
7963
|
-
}
|
|
8064
|
+
})),
|
|
8065
|
+
},
|
|
7964
8066
|
root: {
|
|
7965
|
-
|
|
8067
|
+
display: 'grid',
|
|
8068
|
+
gap: spacingStaticXSmall,
|
|
7966
8069
|
},
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
8070
|
+
wrapper: {
|
|
8071
|
+
display: 'grid',
|
|
8072
|
+
gridTemplateColumns: `minmax(0, 1fr) auto ${formElementLayeredSafeZone}`,
|
|
8073
|
+
},
|
|
8074
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
|
|
8075
|
+
icon: {
|
|
8076
|
+
gridArea: '1/2',
|
|
8077
|
+
placeSelf: 'center',
|
|
8078
|
+
position: 'relative',
|
|
8079
|
+
zIndex: 2,
|
|
8080
|
+
pointerEvents: 'none',
|
|
8081
|
+
padding: formButtonOrIconPadding,
|
|
8082
|
+
transform: 'rotate3d(0,0,1,0.0001deg)',
|
|
8083
|
+
transition: getTransition('transform'),
|
|
8084
|
+
'&--open': {
|
|
8085
|
+
transform: 'rotate3d(0,0,1,180deg)',
|
|
7976
8086
|
},
|
|
7977
|
-
},
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
8087
|
+
},
|
|
8088
|
+
dropdown: {
|
|
8089
|
+
gridArea: '1/1/1/-1',
|
|
8090
|
+
},
|
|
8091
|
+
// .label / .required
|
|
8092
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
8093
|
+
// .message
|
|
7981
8094
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
7982
8095
|
});
|
|
7983
8096
|
};
|
|
@@ -7993,7 +8106,7 @@ const sizeMap$1 = {
|
|
|
7993
8106
|
};
|
|
7994
8107
|
const getComponentCss$n = (size, theme) => {
|
|
7995
8108
|
const strokeDasharray = '57'; // C = 2πR
|
|
7996
|
-
const animationDuration =
|
|
8109
|
+
const animationDuration = `var(${cssVariableAnimationDuration}, ${motionDurationVeryLong})`;
|
|
7997
8110
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
7998
8111
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
7999
8112
|
const { canvasColor, canvasTextColor } = getHighContrastColors();
|
|
@@ -8127,6 +8240,7 @@ const getComponentCss$m = (state, disabled, theme) => {
|
|
|
8127
8240
|
gap: '3px',
|
|
8128
8241
|
color: isDisabled ? disabledColor : primaryColor,
|
|
8129
8242
|
padding: '4px 10px 4px 6px',
|
|
8243
|
+
margin: 0,
|
|
8130
8244
|
background: 0,
|
|
8131
8245
|
border: 0,
|
|
8132
8246
|
outline: 0,
|
|
@@ -8261,10 +8375,12 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8261
8375
|
gap: spacingStaticSmall,
|
|
8262
8376
|
width: '100%',
|
|
8263
8377
|
padding: 0,
|
|
8378
|
+
margin: 0,
|
|
8264
8379
|
outline: 0,
|
|
8265
8380
|
border: 0,
|
|
8266
8381
|
textAlign: 'start',
|
|
8267
8382
|
background: 'transparent',
|
|
8383
|
+
WebkitAppearance: 'none',
|
|
8268
8384
|
appearance: 'none',
|
|
8269
8385
|
cursor: isDisabledOrLoading(disabled, loading) ? 'auto' : 'pointer',
|
|
8270
8386
|
...buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
@@ -8311,7 +8427,7 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8311
8427
|
borderRadius: '14px',
|
|
8312
8428
|
backgroundColor: buttonBackgroundColor,
|
|
8313
8429
|
cursor: isDisabledOrLoading(disabled, loading) ? 'not-allowed' : 'pointer',
|
|
8314
|
-
transition: `${getTransition('background-color')}
|
|
8430
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`,
|
|
8315
8431
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8316
8432
|
borderColor: buttonBorderColorDark,
|
|
8317
8433
|
backgroundColor: buttonBackgroundColorDark,
|
|
@@ -8330,7 +8446,7 @@ const getComponentCss$k = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
8330
8446
|
backgroundColor: toggleBackgroundColorDark,
|
|
8331
8447
|
}),
|
|
8332
8448
|
transform: `translate3d(${checked ? '20px' : '0'}, 0, 0)`,
|
|
8333
|
-
transition: `${getTransition('background-color')}
|
|
8449
|
+
transition: `${getTransition('background-color')}, ${getTransition('transform')}`,
|
|
8334
8450
|
},
|
|
8335
8451
|
...(loading && {
|
|
8336
8452
|
spinner: {
|
|
@@ -8467,6 +8583,7 @@ const getComponentCss$g = (active, direction, hideLabel, multiline) => {
|
|
|
8467
8583
|
color: 'inherit',
|
|
8468
8584
|
outline: 0,
|
|
8469
8585
|
alignItems: 'flex-end',
|
|
8586
|
+
WebkitAppearance: 'none',
|
|
8470
8587
|
appearance: 'none',
|
|
8471
8588
|
background: 'transparent',
|
|
8472
8589
|
textAlign: 'start',
|
|
@@ -8568,7 +8685,6 @@ const getComponentCss$d = () => {
|
|
|
8568
8685
|
});
|
|
8569
8686
|
};
|
|
8570
8687
|
|
|
8571
|
-
const barTransitionDuration = '.4s';
|
|
8572
8688
|
const scrollerAnimatedCssClass = 'scroller--animated';
|
|
8573
8689
|
const targetSelectors = ['a', 'button'];
|
|
8574
8690
|
const transformSelector = (selector) => targetSelectors.map((tag) => selector.replace(/\[role]/g, tag)).join();
|
|
@@ -8683,7 +8799,7 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
8683
8799
|
[scrollerAnimatedCssClass]: {
|
|
8684
8800
|
['& ' +
|
|
8685
8801
|
transformSelector('::slotted([role][aria-selected="true"])::after, ::slotted([role][aria-current="true"])::after')]: {
|
|
8686
|
-
transition: addImportantToRule(`visibility 0s linear ${
|
|
8802
|
+
transition: addImportantToRule(`visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationModerate})`), // bar appears after transition
|
|
8687
8803
|
},
|
|
8688
8804
|
},
|
|
8689
8805
|
// moving bar
|
|
@@ -8692,8 +8808,8 @@ const getComponentCss$c = (size, weight, theme) => {
|
|
|
8692
8808
|
width: 0,
|
|
8693
8809
|
bottom: isHighContrastMode ? '0' : '-2px',
|
|
8694
8810
|
visibility: 'visible',
|
|
8695
|
-
transition:
|
|
8696
|
-
animation:
|
|
8811
|
+
transition: `${getTransition('transform', 'moderate')}, ${getTransition('width', 'moderate')}`,
|
|
8812
|
+
animation: `$hide 0s var(${cssVariableAnimationDuration},0.5s) forwards`, // auto hide bar after transition, needs to be a little longer in Safari
|
|
8697
8813
|
},
|
|
8698
8814
|
'@keyframes hide': {
|
|
8699
8815
|
to: {
|
|
@@ -8801,6 +8917,7 @@ const getComponentCss$9 = (color, hasLabel, theme) => {
|
|
|
8801
8917
|
gap: '12px',
|
|
8802
8918
|
minHeight: '54px',
|
|
8803
8919
|
padding: '4px 12px',
|
|
8920
|
+
margin: 0,
|
|
8804
8921
|
borderRadius: borderRadiusSmall,
|
|
8805
8922
|
border: 0,
|
|
8806
8923
|
cursor: 'pointer',
|
|
@@ -8922,6 +9039,7 @@ const getComponentCss$8 = (tagColor, isFocusable, theme) => {
|
|
|
8922
9039
|
cursor: 'pointer',
|
|
8923
9040
|
font: 'inherit',
|
|
8924
9041
|
color: 'inherit',
|
|
9042
|
+
WebkitAppearance: 'none',
|
|
8925
9043
|
appearance: 'none',
|
|
8926
9044
|
border: 0,
|
|
8927
9045
|
textAlign: 'start',
|
|
@@ -8961,27 +9079,9 @@ const showCustomCalendarOrTimeIndicator = (isCalendar, isTime) => {
|
|
|
8961
9079
|
return hasShowPickerSupport && (isCalendar || isTime);
|
|
8962
9080
|
};
|
|
8963
9081
|
|
|
8964
|
-
const
|
|
8965
|
-
const
|
|
8966
|
-
const buttonOrIconPadding = '4px';
|
|
8967
|
-
const buttonOrIconSize = `calc(${fontLineHeight} + ${buttonOrIconPadding} * 2)`;
|
|
8968
|
-
const buttonOrIconOffset = '9px';
|
|
8969
|
-
const baseButtonOrIconStyles = {
|
|
8970
|
-
position: 'absolute',
|
|
8971
|
-
bottom: '11px',
|
|
8972
|
-
padding: buttonOrIconPadding,
|
|
8973
|
-
font: `1rem ${fontFamily}`,
|
|
8974
|
-
};
|
|
8975
|
-
const getInputPaddingHorizontal = (buttonOrIconAmount) => {
|
|
8976
|
-
return `calc(${buttonOrIconOffset} * 2 + ${buttonOrIconSize} * ${buttonOrIconAmount})`;
|
|
8977
|
-
};
|
|
8978
|
-
const getButtonOrIconOffsetHorizontal = (buttonOrIconAmount) => {
|
|
8979
|
-
const multiplier = buttonOrIconAmount > 1 ? ` + ${buttonOrIconSize} * ${buttonOrIconAmount - 1}` : '';
|
|
8980
|
-
return `calc(${buttonOrIconOffset} + ${borderWidthBase}${multiplier})`;
|
|
8981
|
-
};
|
|
9082
|
+
const cssVariableInputPaddingStart = '--p-internal-text-field-input-padding-start';
|
|
9083
|
+
const cssVariableInputPaddingEnd = '--p-internal-text-field-input-padding-end';
|
|
8982
9084
|
const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter, unitPosition, inputType, showPasswordToggle, isWithinForm, theme) => {
|
|
8983
|
-
const { contrastMediumColor } = getThemedColors(theme);
|
|
8984
|
-
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
8985
9085
|
const isSearch = isType(inputType, 'search');
|
|
8986
9086
|
const isPassword = isType(inputType, 'password');
|
|
8987
9087
|
const isNumber = isType(inputType, 'number');
|
|
@@ -8996,21 +9096,23 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8996
9096
|
':host': {
|
|
8997
9097
|
display: 'block',
|
|
8998
9098
|
...addImportantToEachRule({
|
|
8999
|
-
[cssVariableInputPaddingLeft]: isSearchWithoutForm ? getInputPaddingHorizontal(1) : spacingStaticMedium,
|
|
9000
|
-
[cssVariableInputPaddingRight]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
9001
|
-
? getInputPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
9002
|
-
: spacingStaticMedium,
|
|
9003
9099
|
...colorSchemeStyles,
|
|
9004
9100
|
...hostHiddenStyles,
|
|
9005
9101
|
}),
|
|
9006
9102
|
},
|
|
9103
|
+
// ::slotted(input)
|
|
9007
9104
|
...addImportantToEachRule({
|
|
9008
|
-
...
|
|
9009
|
-
|
|
9105
|
+
...getSlottedTextFieldTextareaSelectStyles('input', state, false, theme, {
|
|
9106
|
+
gridArea: '1/1/1/-1',
|
|
9107
|
+
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
9108
|
+
paddingInlineStart: `var(${cssVariableInputPaddingStart})`,
|
|
9109
|
+
paddingInlineEnd: `var(${cssVariableInputPaddingEnd})`,
|
|
9110
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9010
9111
|
...(isNumber && {
|
|
9011
9112
|
MozAppearance: 'textfield', // hides up/down spin button for Firefox
|
|
9012
9113
|
}),
|
|
9013
9114
|
}),
|
|
9115
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9014
9116
|
'::slotted': {
|
|
9015
9117
|
'&(input:-internal-autofill-selected),&(input:-internal-autofill-previewed),&(input:-webkit-autofill),&(input:-webkit-autofill:focus)': {
|
|
9016
9118
|
WebkitBackgroundClip: 'padding-box', // reset webkit autofill styles
|
|
@@ -9018,48 +9120,58 @@ const getComponentCss$7 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
9018
9120
|
},
|
|
9019
9121
|
}),
|
|
9020
9122
|
},
|
|
9123
|
+
root: {
|
|
9124
|
+
[cssVariableInputPaddingStart]: isSearchWithoutForm
|
|
9125
|
+
? getCalculatedFormElementPaddingHorizontal(1)
|
|
9126
|
+
: formElementPaddingHorizontal,
|
|
9127
|
+
[cssVariableInputPaddingEnd]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
9128
|
+
? getCalculatedFormElementPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
9129
|
+
: formElementPaddingHorizontal,
|
|
9130
|
+
display: 'grid',
|
|
9131
|
+
gap: spacingStaticXSmall,
|
|
9132
|
+
},
|
|
9133
|
+
wrapper: {
|
|
9134
|
+
display: 'grid',
|
|
9135
|
+
gridTemplateColumns: `${formElementLayeredSafeZone} auto minmax(0, 1fr) auto auto ${formElementLayeredSafeZone}`,
|
|
9136
|
+
},
|
|
9021
9137
|
...((isSearchOrPassword || isCalendarOrTimeWithCustomIndicator) && {
|
|
9138
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf) like done for unit class
|
|
9022
9139
|
button: {
|
|
9023
|
-
|
|
9024
|
-
|
|
9140
|
+
gridArea: '1/5',
|
|
9141
|
+
placeSelf: 'center',
|
|
9142
|
+
padding: formButtonOrIconPadding,
|
|
9025
9143
|
// TODO: maybe we should render hidden button conditionally, needs to be checked if a11y compliant
|
|
9026
|
-
'&:not([hidden])
|
|
9027
|
-
|
|
9144
|
+
'&:not([hidden])~.button': {
|
|
9145
|
+
gridArea: '1/4',
|
|
9028
9146
|
},
|
|
9029
9147
|
},
|
|
9030
9148
|
}),
|
|
9031
9149
|
...(isSearchWithoutForm && {
|
|
9150
|
+
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf) like done for unit class
|
|
9032
9151
|
icon: {
|
|
9033
|
-
|
|
9034
|
-
|
|
9152
|
+
gridArea: '1/2',
|
|
9153
|
+
placeSelf: 'center',
|
|
9154
|
+
padding: formButtonOrIconPadding,
|
|
9035
9155
|
pointerEvents: 'none',
|
|
9036
9156
|
},
|
|
9037
9157
|
}),
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
position: 'relative',
|
|
9041
|
-
},
|
|
9042
|
-
...getLabelStyles('input', isDisabled, hideLabel, state, theme, hasUnitOrVisibleCounter && {
|
|
9158
|
+
...(hasUnitOrVisibleCounter && {
|
|
9159
|
+
// TODO: rename to unit-counter?
|
|
9043
9160
|
unit: {
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
color: contrastMediumColor,
|
|
9051
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9052
|
-
color: contrastMediumColorDark,
|
|
9053
|
-
}),
|
|
9161
|
+
...getUnitCounterJssStyle(isDisabled, theme),
|
|
9162
|
+
gridArea: `1/${unitPosition === 'suffix' ? 5 : 1}/1/${unitPosition === 'suffix' ? 7 : 3}`,
|
|
9163
|
+
placeSelf: 'center',
|
|
9164
|
+
paddingInline: unitPosition === 'suffix'
|
|
9165
|
+
? `${formElementLayeredGap} calc(${formElementPaddingHorizontal} + ${borderWidthBase})`
|
|
9166
|
+
: `calc(${formElementPaddingHorizontal} + ${borderWidthBase}) ${formElementLayeredGap}`, // padding needed for correct input padding synchronisation
|
|
9054
9167
|
},
|
|
9055
9168
|
}),
|
|
9056
|
-
|
|
9169
|
+
// TODO: maybe we should extract it as functional component too
|
|
9170
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
9171
|
+
// .label / .required
|
|
9172
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
9173
|
+
// .message
|
|
9057
9174
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
9058
|
-
// TODO: could be made conditional if we had hasUnit
|
|
9059
|
-
'sr-only': {
|
|
9060
|
-
...getHiddenTextJssStyle(),
|
|
9061
|
-
padding: 0,
|
|
9062
|
-
},
|
|
9063
9175
|
});
|
|
9064
9176
|
};
|
|
9065
9177
|
|
|
@@ -9175,19 +9287,26 @@ const getComponentCss$4 = (size, weight, align, color, ellipsis, theme) => {
|
|
|
9175
9287
|
};
|
|
9176
9288
|
|
|
9177
9289
|
const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
9178
|
-
const { contrastMediumColor } = getThemedColors(theme);
|
|
9179
|
-
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
9180
9290
|
return getCss({
|
|
9181
9291
|
'@global': {
|
|
9182
|
-
':host':
|
|
9292
|
+
':host': {
|
|
9183
9293
|
display: 'block',
|
|
9184
|
-
...
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9294
|
+
...addImportantToEachRule({
|
|
9295
|
+
...colorSchemeStyles,
|
|
9296
|
+
...hostHiddenStyles,
|
|
9297
|
+
}),
|
|
9298
|
+
},
|
|
9299
|
+
// ::slotted(textarea)
|
|
9300
|
+
...mergeDeep(addImportantToEachRule(getSlottedTextFieldTextareaSelectStyles('textarea', state, false, theme, {
|
|
9301
|
+
gridArea: '1/1',
|
|
9302
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9188
9303
|
font: textSmallStyle.font,
|
|
9189
|
-
|
|
9304
|
+
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
9305
|
+
padding: hasCounter
|
|
9306
|
+
? `12px ${formElementPaddingHorizontal} ${spacingStaticLarge}`
|
|
9307
|
+
: `12px ${formElementPaddingHorizontal}`,
|
|
9190
9308
|
})), {
|
|
9309
|
+
// TODO: is it possible to move into getSlottedTextFieldTextareaSelectStyles()?
|
|
9191
9310
|
'::slotted(textarea)': {
|
|
9192
9311
|
height: 'auto',
|
|
9193
9312
|
minHeight: '200px',
|
|
@@ -9195,40 +9314,34 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, theme) => {
|
|
|
9195
9314
|
},
|
|
9196
9315
|
}),
|
|
9197
9316
|
},
|
|
9198
|
-
|
|
9317
|
+
root: {
|
|
9318
|
+
display: 'grid',
|
|
9319
|
+
gap: spacingStaticXSmall,
|
|
9320
|
+
},
|
|
9321
|
+
wrapper: {
|
|
9322
|
+
display: 'grid',
|
|
9323
|
+
},
|
|
9324
|
+
...(hasCounter && {
|
|
9199
9325
|
counter: {
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
textAlign: 'end',
|
|
9205
|
-
overflow: 'hidden',
|
|
9206
|
-
textOverflow: 'ellipsis',
|
|
9207
|
-
zIndex: 1,
|
|
9208
|
-
font: textSmallStyle.font,
|
|
9209
|
-
color: contrastMediumColor,
|
|
9210
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9211
|
-
color: contrastMediumColorDark,
|
|
9212
|
-
}),
|
|
9326
|
+
...getUnitCounterJssStyle(isDisabled, theme),
|
|
9327
|
+
gridArea: '1/1',
|
|
9328
|
+
placeSelf: 'flex-end',
|
|
9329
|
+
padding: `6px calc(${formElementPaddingHorizontal} + ${borderWidthBase})`,
|
|
9213
9330
|
},
|
|
9331
|
+
// TODO: maybe we should extract it as functional component too
|
|
9332
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
9214
9333
|
}),
|
|
9215
|
-
|
|
9334
|
+
// .label / .required
|
|
9335
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
9336
|
+
// .message
|
|
9216
9337
|
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
9217
|
-
...(hasCounter && {
|
|
9218
|
-
'sr-only': {
|
|
9219
|
-
...getHiddenTextJssStyle(),
|
|
9220
|
-
padding: 0,
|
|
9221
|
-
},
|
|
9222
|
-
}),
|
|
9223
9338
|
});
|
|
9224
9339
|
};
|
|
9225
9340
|
|
|
9226
9341
|
const cssVariablePositionBottom = '--p-toast-position-bottom'; // CSS custom property exposed as public interface
|
|
9227
9342
|
const cssVariablePositionBottomInternal = '--p-internal-toast-position-bottom';
|
|
9228
|
-
const
|
|
9229
|
-
const
|
|
9230
|
-
const ANIMATION_DURATION = 600;
|
|
9231
|
-
const duration = `${ANIMATION_DURATION}ms`;
|
|
9343
|
+
const ANIMATION_DURATION = motionDurationModerate;
|
|
9344
|
+
const duration = ANIMATION_DURATION;
|
|
9232
9345
|
const getKeyframes = (direction, outsideStyle) => {
|
|
9233
9346
|
const insideStyle = { opacity: 1, transform: 'translate3d(0,0,0)' };
|
|
9234
9347
|
return direction === 'in'
|
|
@@ -9272,10 +9385,10 @@ const getComponentCss$1 = () => {
|
|
|
9272
9385
|
'@keyframes out': getKeyframesMobile('out', cssVariablePositionBottomInternal),
|
|
9273
9386
|
},
|
|
9274
9387
|
hydrated: {
|
|
9275
|
-
animation: `${duration} $in ${
|
|
9388
|
+
animation: `${duration} $in ${motionEasingIn} forwards`,
|
|
9276
9389
|
},
|
|
9277
9390
|
[toastCloseClassName]: {
|
|
9278
|
-
animation: addImportantToRule(`${ANIMATION_DURATION}
|
|
9391
|
+
animation: addImportantToRule(`${ANIMATION_DURATION} $out ${motionEasingOut} forwards`),
|
|
9279
9392
|
},
|
|
9280
9393
|
});
|
|
9281
9394
|
};
|
|
@@ -9327,4 +9440,4 @@ const getComponentCss = (size, theme) => {
|
|
|
9327
9440
|
});
|
|
9328
9441
|
};
|
|
9329
9442
|
|
|
9330
|
-
export { getComponentCss$10 as getAccordionCss, getComponentCss$$ as getBannerCss, getComponentCss$X as getButtonCss, getComponentCss$_ as getButtonGroupCss, getComponentCss$Z as getButtonPureCss, getComponentCss$Y as getButtonTileCss, getComponentCss$W as getCarouselCss, getComponentCss$V as getCheckboxWrapperCss, getComponentCss$U as getContentWrapperCss, getComponentCss$T as getCrestCss, getComponentCss$S as getDisplayCss, getComponentCss$R as getDividerCss, getComponentCss$P as getFieldsetCss, getComponentCss$Q as getFieldsetWrapperCss, getComponentCss$N as getFlexCss, getComponentCss$O as getFlexItemCss, getComponentCss$M as getFlyoutCss, getFunctionalComponentRequiredStyles, getFunctionalComponentStateMessageStyles, getComponentCss$K as getGridCss, getComponentCss$L as getGridItemCss, getComponentCss$J as getHeadingCss, getComponentCss$I as getHeadlineCss, getComponentCss$H as getIconCss, getComponentCss$G as getInlineNotificationCss, getComponentCss$E as getLinkCss, getComponentCss$F as getLinkPureCss, getComponentCss$E as getLinkSocialCss, getComponentCss$C as getLinkTileCss, getComponentCss$D as getLinkTileModelSignatureCss, getComponentCss$B as getMarqueCss, getComponentCss$A as getModalCss, getComponentCss$z as getModelSignatureCss, getComponentCss$x as getMultiSelectCss, getComponentCss$y as getMultiSelectOptionCss, getComponentCss$w as getPaginationCss, getComponentCss$v as getPinCodeCss, getComponentCss$u as getPopoverCss, getComponentCss$t as getRadioButtonWrapperCss, getComponentCss$s as getScrollerCss, getComponentCss$q as getSegmentedControlCss, getComponentCss$r as getSegmentedControlItemCss, getComponentCss$o as getSelectWrapperCss, getComponentCss$p as getSelectWrapperDropdownCss, getComponentCss$n as getSpinnerCss, getComponentCss$l as getStepperHorizontalCss, getComponentCss$m as getStepperHorizontalItemCss, getComponentCss$k as getSwitchCss, getComponentCss$j as getTableBodyCss, getComponentCss$i as getTableCellCss, getComponentCss$h as getTableCss, getComponentCss$g as getTableHeadCellCss, getComponentCss$e as getTableHeadCss, getComponentCss$f as getTableHeadRowCss, getComponentCss$d as getTableRowCss, getComponentCss$c as getTabsBarCss, getComponentCss$a as getTabsCss, getComponentCss$b as getTabsItemCss, getComponentCss$8 as getTagCss, getComponentCss$9 as getTagDismissibleCss, getComponentCss$4 as getTextCss, getComponentCss$7 as getTextFieldWrapperCss, getComponentCss$6 as getTextListCss, getComponentCss$5 as getTextListItemCss, getComponentCss$3 as getTextareaWrapperCss, getComponentCss$1 as getToastCss, getComponentCss as getWordmarkCss };
|
|
9443
|
+
export { getComponentCss$10 as getAccordionCss, getComponentCss$$ as getBannerCss, getComponentCss$X as getButtonCss, getComponentCss$_ as getButtonGroupCss, getComponentCss$Z as getButtonPureCss, getComponentCss$Y as getButtonTileCss, getComponentCss$W as getCarouselCss, getComponentCss$V as getCheckboxWrapperCss, getComponentCss$U as getContentWrapperCss, getComponentCss$T as getCrestCss, getComponentCss$S as getDisplayCss, getComponentCss$R as getDividerCss, getComponentCss$P as getFieldsetCss, getComponentCss$Q as getFieldsetWrapperCss, getComponentCss$N as getFlexCss, getComponentCss$O as getFlexItemCss, getComponentCss$M as getFlyoutCss, getFunctionalComponentLabelStyles, getFunctionalComponentRequiredStyles, getFunctionalComponentStateMessageStyles, getComponentCss$K as getGridCss, getComponentCss$L as getGridItemCss, getComponentCss$J as getHeadingCss, getComponentCss$I as getHeadlineCss, getComponentCss$H as getIconCss, getComponentCss$G as getInlineNotificationCss, getComponentCss$E as getLinkCss, getComponentCss$F as getLinkPureCss, getComponentCss$E as getLinkSocialCss, getComponentCss$C as getLinkTileCss, getComponentCss$D as getLinkTileModelSignatureCss, getComponentCss$B as getMarqueCss, getComponentCss$A as getModalCss, getComponentCss$z as getModelSignatureCss, getComponentCss$x as getMultiSelectCss, getComponentCss$y as getMultiSelectOptionCss, getComponentCss$w as getPaginationCss, getComponentCss$v as getPinCodeCss, getComponentCss$u as getPopoverCss, getComponentCss$t as getRadioButtonWrapperCss, getComponentCss$s as getScrollerCss, getComponentCss$q as getSegmentedControlCss, getComponentCss$r as getSegmentedControlItemCss, getComponentCss$o as getSelectWrapperCss, getComponentCss$p as getSelectWrapperDropdownCss, getComponentCss$n as getSpinnerCss, getComponentCss$l as getStepperHorizontalCss, getComponentCss$m as getStepperHorizontalItemCss, getComponentCss$k as getSwitchCss, getComponentCss$j as getTableBodyCss, getComponentCss$i as getTableCellCss, getComponentCss$h as getTableCss, getComponentCss$g as getTableHeadCellCss, getComponentCss$e as getTableHeadCss, getComponentCss$f as getTableHeadRowCss, getComponentCss$d as getTableRowCss, getComponentCss$c as getTabsBarCss, getComponentCss$a as getTabsCss, getComponentCss$b as getTabsItemCss, getComponentCss$8 as getTagCss, getComponentCss$9 as getTagDismissibleCss, getComponentCss$4 as getTextCss, getComponentCss$7 as getTextFieldWrapperCss, getComponentCss$6 as getTextListCss, getComponentCss$5 as getTextListItemCss, getComponentCss$3 as getTextareaWrapperCss, getComponentCss$1 as getToastCss, getComponentCss as getWordmarkCss };
|