@porsche-design-system/components-react 2.18.0-rc.0 → 2.18.0-rc.2
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 +44 -11
- package/esm/lib/components/carousel.wrapper.js +3 -3
- package/hooks.js +0 -2
- package/jsdom-polyfill/index.js +1 -1
- package/lib/components/accordion.wrapper.d.ts +1 -1
- package/lib/components/accordion.wrapper.js +0 -2
- package/lib/components/banner.wrapper.d.ts +1 -1
- package/lib/components/banner.wrapper.js +0 -2
- package/lib/components/button-group.wrapper.d.ts +1 -1
- package/lib/components/button-group.wrapper.js +0 -2
- package/lib/components/button-pure.wrapper.d.ts +1 -1
- package/lib/components/button-pure.wrapper.js +0 -2
- package/lib/components/button.wrapper.d.ts +1 -1
- package/lib/components/button.wrapper.js +0 -2
- package/lib/components/carousel.wrapper.d.ts +9 -1
- package/lib/components/carousel.wrapper.js +3 -5
- package/lib/components/checkbox-wrapper.wrapper.d.ts +1 -1
- package/lib/components/checkbox-wrapper.wrapper.js +0 -2
- package/lib/components/content-wrapper.wrapper.d.ts +1 -1
- package/lib/components/content-wrapper.wrapper.js +0 -2
- package/lib/components/divider.wrapper.d.ts +1 -1
- package/lib/components/divider.wrapper.js +0 -2
- package/lib/components/fieldset-wrapper.wrapper.d.ts +1 -1
- package/lib/components/fieldset-wrapper.wrapper.js +0 -2
- package/lib/components/flex-item.wrapper.d.ts +1 -1
- package/lib/components/flex-item.wrapper.js +0 -2
- package/lib/components/flex.wrapper.d.ts +1 -1
- package/lib/components/flex.wrapper.js +0 -2
- package/lib/components/grid-item.wrapper.d.ts +1 -1
- package/lib/components/grid-item.wrapper.js +0 -2
- package/lib/components/grid.wrapper.d.ts +1 -1
- package/lib/components/grid.wrapper.js +0 -2
- package/lib/components/headline.wrapper.d.ts +1 -1
- package/lib/components/headline.wrapper.js +0 -2
- package/lib/components/icon.wrapper.d.ts +1 -1
- package/lib/components/icon.wrapper.js +0 -2
- package/lib/components/inline-notification.wrapper.d.ts +1 -1
- package/lib/components/inline-notification.wrapper.js +0 -2
- package/lib/components/link-pure.wrapper.d.ts +1 -1
- package/lib/components/link-pure.wrapper.js +0 -2
- package/lib/components/link-social.wrapper.d.ts +1 -1
- package/lib/components/link-social.wrapper.js +0 -2
- package/lib/components/link-tile.wrapper.d.ts +1 -1
- package/lib/components/link-tile.wrapper.js +0 -2
- package/lib/components/link.wrapper.d.ts +1 -1
- package/lib/components/link.wrapper.js +0 -2
- package/lib/components/marque.wrapper.d.ts +1 -1
- package/lib/components/marque.wrapper.js +0 -2
- package/lib/components/modal.wrapper.d.ts +1 -1
- package/lib/components/modal.wrapper.js +0 -2
- package/lib/components/pagination.wrapper.d.ts +1 -1
- package/lib/components/pagination.wrapper.js +0 -2
- package/lib/components/popover.wrapper.d.ts +1 -1
- package/lib/components/popover.wrapper.js +0 -2
- package/lib/components/radio-button-wrapper.wrapper.d.ts +1 -1
- package/lib/components/radio-button-wrapper.wrapper.js +0 -2
- package/lib/components/scroller.wrapper.d.ts +1 -1
- package/lib/components/scroller.wrapper.js +0 -2
- package/lib/components/segmented-control-item.wrapper.d.ts +1 -1
- package/lib/components/segmented-control-item.wrapper.js +0 -2
- package/lib/components/segmented-control.wrapper.d.ts +1 -1
- package/lib/components/segmented-control.wrapper.js +0 -2
- package/lib/components/select-wrapper.wrapper.d.ts +1 -1
- package/lib/components/select-wrapper.wrapper.js +0 -2
- package/lib/components/spinner.wrapper.d.ts +1 -1
- package/lib/components/spinner.wrapper.js +0 -2
- package/lib/components/stepper-horizontal-item.wrapper.d.ts +1 -1
- package/lib/components/stepper-horizontal-item.wrapper.js +0 -2
- package/lib/components/stepper-horizontal.wrapper.d.ts +1 -1
- package/lib/components/stepper-horizontal.wrapper.js +0 -2
- package/lib/components/switch.wrapper.d.ts +1 -1
- package/lib/components/switch.wrapper.js +0 -2
- package/lib/components/table-body.wrapper.d.ts +1 -1
- package/lib/components/table-body.wrapper.js +0 -2
- package/lib/components/table-cell.wrapper.d.ts +1 -1
- package/lib/components/table-cell.wrapper.js +0 -2
- package/lib/components/table-head-cell.wrapper.d.ts +1 -1
- package/lib/components/table-head-cell.wrapper.js +0 -2
- package/lib/components/table-head-row.wrapper.d.ts +1 -1
- package/lib/components/table-head-row.wrapper.js +0 -2
- package/lib/components/table-head.wrapper.d.ts +1 -1
- package/lib/components/table-head.wrapper.js +0 -2
- package/lib/components/table-row.wrapper.d.ts +1 -1
- package/lib/components/table-row.wrapper.js +0 -2
- package/lib/components/table.wrapper.d.ts +1 -1
- package/lib/components/table.wrapper.js +0 -2
- package/lib/components/tabs-bar.wrapper.d.ts +1 -1
- package/lib/components/tabs-bar.wrapper.js +0 -2
- package/lib/components/tabs-item.wrapper.d.ts +1 -1
- package/lib/components/tabs-item.wrapper.js +0 -2
- package/lib/components/tabs.wrapper.d.ts +1 -1
- package/lib/components/tabs.wrapper.js +0 -2
- package/lib/components/tag-dismissible.wrapper.d.ts +1 -1
- package/lib/components/tag-dismissible.wrapper.js +0 -2
- package/lib/components/tag.wrapper.d.ts +1 -1
- package/lib/components/tag.wrapper.js +0 -2
- package/lib/components/text-field-wrapper.wrapper.d.ts +1 -1
- package/lib/components/text-field-wrapper.wrapper.js +0 -2
- package/lib/components/text-list-item.wrapper.d.ts +1 -1
- package/lib/components/text-list-item.wrapper.js +0 -2
- package/lib/components/text-list.wrapper.d.ts +1 -1
- package/lib/components/text-list.wrapper.js +0 -2
- package/lib/components/text.wrapper.d.ts +1 -1
- package/lib/components/text.wrapper.js +0 -2
- package/lib/components/textarea-wrapper.wrapper.d.ts +1 -1
- package/lib/components/textarea-wrapper.wrapper.js +0 -2
- package/lib/components/toast.wrapper.d.ts +1 -1
- package/lib/components/toast.wrapper.js +0 -2
- package/lib/types.d.ts +5 -5
- package/package.json +2 -2
- package/provider.d.ts +1 -1
- package/provider.js +0 -2
- package/public-api.js +0 -2
- package/ssr/components/dist/styles/esm/styles-entry.js +2443 -2312
- package/ssr/components/dist/utils/esm/utils-entry.js +2220 -2035
- package/ssr/components-react/projects/react-ssr-wrapper/src/hooks.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/button-group.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/button-pure.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/button.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +4 -6
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/checkbox-wrapper.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/content-wrapper.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset-wrapper.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/flex-item.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/flex.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/grid-item.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/grid.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/headline.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/icon.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/inline-notification.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-pure.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/marque.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/popover.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/radio-button-wrapper.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control-item.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/select-wrapper.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/spinner.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal-item.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-body.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-cell.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-cell.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-head-row.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-head.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table-row.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-item.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tag-dismissible.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tag.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-list-item.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/toast.wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +2 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-pure.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/marque.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/required.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/spinner.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/state-message.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-body.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-cell.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-cell.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head-row.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-head.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-row.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-item.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list-item.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea-wrapper.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/toast.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/minifyCss.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/provider.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/public-api.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/stripFocusAndHoverStyles.js +0 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/utils.js +0 -2
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +2390 -2257
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +2219 -2032
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +2 -1
- package/ssr/icons/dist/module/index.js +0 -2
- package/ssr/lib/components/accordion.wrapper.d.ts +1 -1
- package/ssr/lib/components/banner.wrapper.d.ts +1 -1
- package/ssr/lib/components/button-group.wrapper.d.ts +1 -1
- package/ssr/lib/components/button-pure.wrapper.d.ts +1 -1
- package/ssr/lib/components/button.wrapper.d.ts +1 -1
- package/ssr/lib/components/carousel.wrapper.d.ts +9 -1
- package/ssr/lib/components/checkbox-wrapper.wrapper.d.ts +1 -1
- package/ssr/lib/components/content-wrapper.wrapper.d.ts +1 -1
- package/ssr/lib/components/divider.wrapper.d.ts +1 -1
- package/ssr/lib/components/fieldset-wrapper.wrapper.d.ts +1 -1
- package/ssr/lib/components/flex-item.wrapper.d.ts +1 -1
- package/ssr/lib/components/flex.wrapper.d.ts +1 -1
- package/ssr/lib/components/grid-item.wrapper.d.ts +1 -1
- package/ssr/lib/components/grid.wrapper.d.ts +1 -1
- package/ssr/lib/components/headline.wrapper.d.ts +1 -1
- package/ssr/lib/components/icon.wrapper.d.ts +1 -1
- package/ssr/lib/components/inline-notification.wrapper.d.ts +1 -1
- package/ssr/lib/components/link-pure.wrapper.d.ts +1 -1
- package/ssr/lib/components/link-social.wrapper.d.ts +1 -1
- package/ssr/lib/components/link-tile.wrapper.d.ts +1 -1
- package/ssr/lib/components/link.wrapper.d.ts +1 -1
- package/ssr/lib/components/marque.wrapper.d.ts +1 -1
- package/ssr/lib/components/modal.wrapper.d.ts +1 -1
- package/ssr/lib/components/pagination.wrapper.d.ts +1 -1
- package/ssr/lib/components/popover.wrapper.d.ts +1 -1
- package/ssr/lib/components/radio-button-wrapper.wrapper.d.ts +1 -1
- package/ssr/lib/components/scroller.wrapper.d.ts +1 -1
- package/ssr/lib/components/segmented-control-item.wrapper.d.ts +1 -1
- package/ssr/lib/components/segmented-control.wrapper.d.ts +1 -1
- package/ssr/lib/components/select-wrapper.wrapper.d.ts +1 -1
- package/ssr/lib/components/spinner.wrapper.d.ts +1 -1
- package/ssr/lib/components/stepper-horizontal-item.wrapper.d.ts +1 -1
- package/ssr/lib/components/stepper-horizontal.wrapper.d.ts +1 -1
- package/ssr/lib/components/switch.wrapper.d.ts +1 -1
- package/ssr/lib/components/table-body.wrapper.d.ts +1 -1
- package/ssr/lib/components/table-cell.wrapper.d.ts +1 -1
- package/ssr/lib/components/table-head-cell.wrapper.d.ts +1 -1
- package/ssr/lib/components/table-head-row.wrapper.d.ts +1 -1
- package/ssr/lib/components/table-head.wrapper.d.ts +1 -1
- package/ssr/lib/components/table-row.wrapper.d.ts +1 -1
- package/ssr/lib/components/table.wrapper.d.ts +1 -1
- package/ssr/lib/components/tabs-bar.wrapper.d.ts +1 -1
- package/ssr/lib/components/tabs-item.wrapper.d.ts +1 -1
- package/ssr/lib/components/tabs.wrapper.d.ts +1 -1
- package/ssr/lib/components/tag-dismissible.wrapper.d.ts +1 -1
- package/ssr/lib/components/tag.wrapper.d.ts +1 -1
- package/ssr/lib/components/text-field-wrapper.wrapper.d.ts +1 -1
- package/ssr/lib/components/text-list-item.wrapper.d.ts +1 -1
- package/ssr/lib/components/text-list.wrapper.d.ts +1 -1
- package/ssr/lib/components/text.wrapper.d.ts +1 -1
- package/ssr/lib/components/textarea-wrapper.wrapper.d.ts +1 -1
- package/ssr/lib/components/toast.wrapper.d.ts +1 -1
- package/ssr/lib/dsr-components/button-pure.d.ts +0 -4
- package/ssr/lib/dsr-components/headline.d.ts +0 -1
- package/ssr/lib/dsr-components/link-pure.d.ts +0 -4
- package/ssr/lib/dsr-components/select-wrapper-dropdown.d.ts +0 -1
- package/ssr/lib/dsr-components/state-message.d.ts +1 -1
- package/ssr/lib/dsr-components/switch.d.ts +1 -1
- package/ssr/lib/dsr-components/text.d.ts +0 -1
- package/ssr/lib/types.d.ts +5 -5
- package/ssr/provider.d.ts +1 -1
- package/testing/index.js +0 -2
- package/testing.d.ts +1 -1
- package/utilities/js/index.js +0 -2
- package/utils.js +0 -2
|
@@ -116,6 +116,8 @@ const fontHyphenation = {
|
|
|
116
116
|
hyphens: 'auto',
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
+
const fontLineHeight = 'calc(6px + 2.125ex)'; // float px values may render differently on different browsers
|
|
120
|
+
|
|
119
121
|
const fontWeight = {
|
|
120
122
|
thin: 100,
|
|
121
123
|
regular: 400,
|
|
@@ -128,13 +130,13 @@ const fontStyle = 'normal';
|
|
|
128
130
|
const fontVariant = 'normal';
|
|
129
131
|
|
|
130
132
|
const textXSmall = {
|
|
131
|
-
font: `${fontStyle} ${fontVariant} ${fontWeight.regular} 0.75rem
|
|
133
|
+
font: `${fontStyle} ${fontVariant} ${fontWeight.regular} 0.75rem/${fontLineHeight} ${fontFamily}`,
|
|
132
134
|
...fontBehavior,
|
|
133
135
|
...fontHyphenation,
|
|
134
136
|
};
|
|
135
137
|
|
|
136
138
|
const textSmall = {
|
|
137
|
-
font: `${fontStyle} ${fontVariant} ${fontWeight.regular} 1rem
|
|
139
|
+
font: `${fontStyle} ${fontVariant} ${fontWeight.regular} 1rem/${fontLineHeight} ${fontFamily}`,
|
|
138
140
|
...fontBehavior,
|
|
139
141
|
...fontHyphenation,
|
|
140
142
|
};
|
|
@@ -243,73 +245,206 @@ hasWindow &&
|
|
|
243
245
|
.forEach((node) => childrenMutationMap.get(node)());
|
|
244
246
|
});
|
|
245
247
|
|
|
246
|
-
|
|
247
|
-
return state === 'error' ? 'alert' : state === 'success' ? 'status' : null;
|
|
248
|
-
};
|
|
248
|
+
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
249
249
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
].
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
250
|
+
/**
|
|
251
|
+
* Throttle execution of a function. Especially useful for rate limiting
|
|
252
|
+
* execution of handlers on events like resize and scroll.
|
|
253
|
+
*
|
|
254
|
+
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
|
|
255
|
+
* are most useful.
|
|
256
|
+
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
|
|
257
|
+
* as-is, to `callback` when the throttled-function is executed.
|
|
258
|
+
* @param {object} [options] - An object to configure options.
|
|
259
|
+
* @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
|
|
260
|
+
* while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
|
|
261
|
+
* one final time after the last throttled-function call. (After the throttled-function has not been called for
|
|
262
|
+
* `delay` milliseconds, the internal counter is reset).
|
|
263
|
+
* @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
|
|
264
|
+
* immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
|
|
265
|
+
* callback will never executed if both noLeading = true and noTrailing = true.
|
|
266
|
+
* @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
|
|
267
|
+
* false (at end), schedule `callback` to execute after `delay` ms.
|
|
268
|
+
*
|
|
269
|
+
* @returns {Function} A new, throttled, function.
|
|
270
|
+
*/
|
|
271
|
+
function throttle (delay, callback, options) {
|
|
272
|
+
var _ref = options || {},
|
|
273
|
+
_ref$noTrailing = _ref.noTrailing,
|
|
274
|
+
noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
|
|
275
|
+
_ref$noLeading = _ref.noLeading,
|
|
276
|
+
noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
|
|
277
|
+
_ref$debounceMode = _ref.debounceMode,
|
|
278
|
+
debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
|
|
279
|
+
/*
|
|
280
|
+
* After wrapper has stopped being called, this timeout ensures that
|
|
281
|
+
* `callback` is executed at the proper times in `throttle` and `end`
|
|
282
|
+
* debounce modes.
|
|
283
|
+
*/
|
|
268
284
|
|
|
269
|
-
[
|
|
270
|
-
{ name: 'Column 1', id: 'col1' },
|
|
271
|
-
{ name: 'Column 2', id: 'col2' },
|
|
272
|
-
{ name: 'Column 3', id: 'col3' },
|
|
273
|
-
].map((item, i) => ({
|
|
274
|
-
...item,
|
|
275
|
-
active: i === 1,
|
|
276
|
-
direction: 'asc',
|
|
277
|
-
}));
|
|
278
285
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
var timeoutID;
|
|
287
|
+
var cancelled = false; // Keep track of the last time `callback` was executed.
|
|
288
|
+
|
|
289
|
+
var lastExec = 0; // Function to clear existing timeout
|
|
290
|
+
|
|
291
|
+
function clearExistingTimeout() {
|
|
292
|
+
if (timeoutID) {
|
|
293
|
+
clearTimeout(timeoutID);
|
|
294
|
+
}
|
|
295
|
+
} // Function to cancel next exec
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
function cancel(options) {
|
|
299
|
+
var _ref2 = options || {},
|
|
300
|
+
_ref2$upcomingOnly = _ref2.upcomingOnly,
|
|
301
|
+
upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
|
|
302
|
+
|
|
303
|
+
clearExistingTimeout();
|
|
304
|
+
cancelled = !upcomingOnly;
|
|
305
|
+
}
|
|
306
|
+
/*
|
|
307
|
+
* The `wrapper` function encapsulates all of the throttling / debouncing
|
|
308
|
+
* functionality and when executed will limit the rate at which `callback`
|
|
309
|
+
* is executed.
|
|
310
|
+
*/
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
function wrapper() {
|
|
314
|
+
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
315
|
+
arguments_[_key] = arguments[_key];
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
var self = this;
|
|
319
|
+
var elapsed = Date.now() - lastExec;
|
|
320
|
+
|
|
321
|
+
if (cancelled) {
|
|
322
|
+
return;
|
|
323
|
+
} // Execute `callback` and update the `lastExec` timestamp.
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
function exec() {
|
|
327
|
+
lastExec = Date.now();
|
|
328
|
+
callback.apply(self, arguments_);
|
|
329
|
+
}
|
|
330
|
+
/*
|
|
331
|
+
* If `debounceMode` is true (at begin) this is used to clear the flag
|
|
332
|
+
* to allow future `callback` executions.
|
|
333
|
+
*/
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
function clear() {
|
|
337
|
+
timeoutID = undefined;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
if (!noLeading && debounceMode && !timeoutID) {
|
|
341
|
+
/*
|
|
342
|
+
* Since `wrapper` is being called for the first time and
|
|
343
|
+
* `debounceMode` is true (at begin), execute `callback`
|
|
344
|
+
* and noLeading != true.
|
|
345
|
+
*/
|
|
346
|
+
exec();
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
clearExistingTimeout();
|
|
350
|
+
|
|
351
|
+
if (debounceMode === undefined && elapsed > delay) {
|
|
352
|
+
if (noLeading) {
|
|
353
|
+
/*
|
|
354
|
+
* In throttle mode with noLeading, if `delay` time has
|
|
355
|
+
* been exceeded, update `lastExec` and schedule `callback`
|
|
356
|
+
* to execute after `delay` ms.
|
|
357
|
+
*/
|
|
358
|
+
lastExec = Date.now();
|
|
359
|
+
|
|
360
|
+
if (!noTrailing) {
|
|
361
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, delay);
|
|
362
|
+
}
|
|
363
|
+
} else {
|
|
364
|
+
/*
|
|
365
|
+
* In throttle mode without noLeading, if `delay` time has been exceeded, execute
|
|
366
|
+
* `callback`.
|
|
367
|
+
*/
|
|
368
|
+
exec();
|
|
369
|
+
}
|
|
370
|
+
} else if (noTrailing !== true) {
|
|
371
|
+
/*
|
|
372
|
+
* In trailing throttle mode, since `delay` time has not been
|
|
373
|
+
* exceeded, schedule `callback` to execute `delay` ms after most
|
|
374
|
+
* recent execution.
|
|
375
|
+
*
|
|
376
|
+
* If `debounceMode` is true (at begin), schedule `clear` to execute
|
|
377
|
+
* after `delay` ms.
|
|
378
|
+
*
|
|
379
|
+
* If `debounceMode` is false (at end), schedule `callback` to
|
|
380
|
+
* execute after `delay` ms.
|
|
381
|
+
*/
|
|
382
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
wrapper.cancel = cancel; // Return the wrapper function.
|
|
387
|
+
|
|
388
|
+
return wrapper;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/* eslint-disable no-undefined */
|
|
392
|
+
/**
|
|
393
|
+
* Debounce execution of a function. Debouncing, unlike throttling,
|
|
394
|
+
* guarantees that a function is only executed a single time, either at the
|
|
395
|
+
* very beginning of a series of calls, or at the very end.
|
|
396
|
+
*
|
|
397
|
+
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
398
|
+
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
|
|
399
|
+
* to `callback` when the debounced-function is executed.
|
|
400
|
+
* @param {object} [options] - An object to configure options.
|
|
401
|
+
* @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
|
|
402
|
+
* after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
|
|
403
|
+
* (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
|
|
404
|
+
*
|
|
405
|
+
* @returns {Function} A new, debounced function.
|
|
406
|
+
*/
|
|
407
|
+
|
|
408
|
+
function debounce (delay, callback, options) {
|
|
409
|
+
var _ref = options || {},
|
|
410
|
+
_ref$atBegin = _ref.atBegin,
|
|
411
|
+
atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
|
|
412
|
+
|
|
413
|
+
return throttle(delay, callback, {
|
|
414
|
+
debounceMode: atBegin !== false
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
debounce(800, (el, ariaElement) => {
|
|
418
|
+
ariaElement.innerText = `You have ${el.maxLength - el.value.length} out of ${el.maxLength} characters left`;
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
const getRole = (state) => {
|
|
422
|
+
return state === 'error' ? 'alert' : state === 'success' ? 'status' : null;
|
|
423
|
+
};
|
|
287
424
|
|
|
288
425
|
function _extends() {
|
|
289
426
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
290
427
|
for (var i = 1; i < arguments.length; i++) {
|
|
291
428
|
var source = arguments[i];
|
|
292
|
-
|
|
293
429
|
for (var key in source) {
|
|
294
430
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
295
431
|
target[key] = source[key];
|
|
296
432
|
}
|
|
297
433
|
}
|
|
298
434
|
}
|
|
299
|
-
|
|
300
435
|
return target;
|
|
301
436
|
};
|
|
302
437
|
return _extends.apply(this, arguments);
|
|
303
438
|
}
|
|
304
439
|
|
|
305
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
440
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
306
441
|
|
|
307
|
-
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && document.nodeType === 9;
|
|
442
|
+
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === 'object' && document.nodeType === 9;
|
|
308
443
|
|
|
309
444
|
var module$1 = /*#__PURE__*/Object.freeze({
|
|
310
445
|
__proto__: null,
|
|
311
446
|
isBrowser: isBrowser,
|
|
312
|
-
|
|
447
|
+
default: isBrowser
|
|
313
448
|
});
|
|
314
449
|
|
|
315
450
|
var isProduction = process.env.NODE_ENV === 'production';
|
|
@@ -331,16 +466,41 @@ function warning(condition, message) {
|
|
|
331
466
|
}
|
|
332
467
|
}
|
|
333
468
|
|
|
469
|
+
function _typeof(obj) {
|
|
470
|
+
"@babel/helpers - typeof";
|
|
471
|
+
|
|
472
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
473
|
+
return typeof obj;
|
|
474
|
+
} : function (obj) {
|
|
475
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
476
|
+
}, _typeof(obj);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
function _toPrimitive(input, hint) {
|
|
480
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
481
|
+
var prim = input[Symbol.toPrimitive];
|
|
482
|
+
if (prim !== undefined) {
|
|
483
|
+
var res = prim.call(input, hint || "default");
|
|
484
|
+
if (_typeof(res) !== "object") return res;
|
|
485
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
486
|
+
}
|
|
487
|
+
return (hint === "string" ? String : Number)(input);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
function _toPropertyKey(arg) {
|
|
491
|
+
var key = _toPrimitive(arg, "string");
|
|
492
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
493
|
+
}
|
|
494
|
+
|
|
334
495
|
function _defineProperties(target, props) {
|
|
335
496
|
for (var i = 0; i < props.length; i++) {
|
|
336
497
|
var descriptor = props[i];
|
|
337
498
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
338
499
|
descriptor.configurable = true;
|
|
339
500
|
if ("value" in descriptor) descriptor.writable = true;
|
|
340
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
501
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
341
502
|
}
|
|
342
503
|
}
|
|
343
|
-
|
|
344
504
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
345
505
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
346
506
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
@@ -368,7 +528,6 @@ function _assertThisInitialized(self) {
|
|
|
368
528
|
if (self === void 0) {
|
|
369
529
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
370
530
|
}
|
|
371
|
-
|
|
372
531
|
return self;
|
|
373
532
|
}
|
|
374
533
|
|
|
@@ -377,13 +536,11 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
377
536
|
var target = {};
|
|
378
537
|
var sourceKeys = Object.keys(source);
|
|
379
538
|
var key, i;
|
|
380
|
-
|
|
381
539
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
382
540
|
key = sourceKeys[i];
|
|
383
541
|
if (excluded.indexOf(key) >= 0) continue;
|
|
384
542
|
target[key] = source[key];
|
|
385
543
|
}
|
|
386
|
-
|
|
387
544
|
return target;
|
|
388
545
|
}
|
|
389
546
|
|
|
@@ -2668,7 +2825,7 @@ var index = createJss();
|
|
|
2668
2825
|
|
|
2669
2826
|
var jss_esm = /*#__PURE__*/Object.freeze({
|
|
2670
2827
|
__proto__: null,
|
|
2671
|
-
|
|
2828
|
+
default: index,
|
|
2672
2829
|
RuleList: RuleList,
|
|
2673
2830
|
SheetsManager: SheetsManager,
|
|
2674
2831
|
SheetsRegistry: SheetsRegistry,
|
|
@@ -2681,187 +2838,106 @@ var jss_esm = /*#__PURE__*/Object.freeze({
|
|
|
2681
2838
|
toCssValue: toCssValue
|
|
2682
2839
|
});
|
|
2683
2840
|
|
|
2684
|
-
|
|
2685
|
-
var
|
|
2686
|
-
|
|
2841
|
+
function getAugmentedNamespace(n) {
|
|
2842
|
+
var f = n.default;
|
|
2843
|
+
if (typeof f == "function") {
|
|
2844
|
+
var a = function a () {
|
|
2845
|
+
if (this instanceof a) {
|
|
2846
|
+
var args = [null];
|
|
2847
|
+
args.push.apply(args, arguments);
|
|
2848
|
+
var Ctor = Function.bind.apply(f, args);
|
|
2849
|
+
return new Ctor();
|
|
2850
|
+
}
|
|
2851
|
+
return f.apply(this, arguments);
|
|
2852
|
+
};
|
|
2853
|
+
a.prototype = f.prototype;
|
|
2854
|
+
} else a = {};
|
|
2855
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
2856
|
+
Object.keys(n).forEach(function (k) {
|
|
2857
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
2858
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
2859
|
+
enumerable: true,
|
|
2860
|
+
get: function () {
|
|
2861
|
+
return n[k];
|
|
2862
|
+
}
|
|
2863
|
+
});
|
|
2864
|
+
});
|
|
2865
|
+
return a;
|
|
2866
|
+
}
|
|
2687
2867
|
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
var rule = createRule(name, {}, options);
|
|
2693
|
-
rule[fnRuleNs] = decl;
|
|
2694
|
-
return rule;
|
|
2695
|
-
},
|
|
2696
|
-
onProcessStyle: function onProcessStyle(style, rule) {
|
|
2697
|
-
// We need to extract function values from the declaration, so that we can keep core unaware of them.
|
|
2698
|
-
// We need to do that only once.
|
|
2699
|
-
// We don't need to extract functions on each style update, since this can happen only once.
|
|
2700
|
-
// We don't support function values inside of function rules.
|
|
2701
|
-
if (fnValuesNs in rule || fnRuleNs in rule) return style;
|
|
2702
|
-
var fnValues = {};
|
|
2868
|
+
/* eslint-disable no-var, prefer-template */
|
|
2869
|
+
var uppercasePattern = /[A-Z]/g;
|
|
2870
|
+
var msPattern = /^ms-/;
|
|
2871
|
+
var cache$2 = {};
|
|
2703
2872
|
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
delete style[prop];
|
|
2708
|
-
fnValues[prop] = value;
|
|
2709
|
-
}
|
|
2873
|
+
function toHyphenLower(match) {
|
|
2874
|
+
return '-' + match.toLowerCase()
|
|
2875
|
+
}
|
|
2710
2876
|
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
var styleRule = rule;
|
|
2716
|
-
var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object
|
|
2717
|
-
// will be returned from that function.
|
|
2877
|
+
function hyphenateStyleName(name) {
|
|
2878
|
+
if (cache$2.hasOwnProperty(name)) {
|
|
2879
|
+
return cache$2[name]
|
|
2880
|
+
}
|
|
2718
2881
|
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
styleRule.style = fnRule(data) || {};
|
|
2882
|
+
var hName = name.replace(uppercasePattern, toHyphenLower);
|
|
2883
|
+
return (cache$2[name] = msPattern.test(hName) ? '-' + hName : hName)
|
|
2884
|
+
}
|
|
2723
2885
|
|
|
2724
|
-
|
|
2725
|
-
for (var prop in styleRule.style) {
|
|
2726
|
-
if (typeof styleRule.style[prop] === 'function') {
|
|
2727
|
-
process.env.NODE_ENV !== "production" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;
|
|
2728
|
-
break;
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
}
|
|
2732
|
-
}
|
|
2886
|
+
var index_cjs = hyphenateStyleName;
|
|
2733
2887
|
|
|
2734
|
-
|
|
2888
|
+
/**
|
|
2889
|
+
* Convert camel cased property names to dash separated.
|
|
2890
|
+
*/
|
|
2735
2891
|
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
styleRule.prop(_prop, fnValues[_prop](data), options);
|
|
2739
|
-
}
|
|
2740
|
-
}
|
|
2741
|
-
}
|
|
2742
|
-
};
|
|
2743
|
-
};
|
|
2892
|
+
function convertCase(style) {
|
|
2893
|
+
var converted = {};
|
|
2744
2894
|
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2895
|
+
for (var prop in style) {
|
|
2896
|
+
var key = prop.indexOf('--') === 0 ? prop : index_cjs(prop);
|
|
2897
|
+
converted[key] = style[prop];
|
|
2898
|
+
}
|
|
2748
2899
|
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
} else {
|
|
2753
|
-
result = Symbol('observable');
|
|
2754
|
-
Symbol.observable = result;
|
|
2755
|
-
}
|
|
2756
|
-
} else {
|
|
2757
|
-
result = '@@observable';
|
|
2758
|
-
}
|
|
2900
|
+
if (style.fallbacks) {
|
|
2901
|
+
if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);
|
|
2902
|
+
}
|
|
2759
2903
|
|
|
2760
|
-
|
|
2904
|
+
return converted;
|
|
2761
2905
|
}
|
|
2906
|
+
/**
|
|
2907
|
+
* Allow camel cased property names by converting them back to dasherized.
|
|
2908
|
+
*/
|
|
2762
2909
|
|
|
2763
|
-
/* global window */
|
|
2764
2910
|
|
|
2765
|
-
|
|
2911
|
+
function camelCase() {
|
|
2912
|
+
function onProcessStyle(style) {
|
|
2913
|
+
if (Array.isArray(style)) {
|
|
2914
|
+
// Handle rules like @font-face, which can have multiple styles in an array
|
|
2915
|
+
for (var index = 0; index < style.length; index++) {
|
|
2916
|
+
style[index] = convertCase(style[index]);
|
|
2917
|
+
}
|
|
2766
2918
|
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
} else if (typeof window !== 'undefined') {
|
|
2770
|
-
root = window;
|
|
2771
|
-
} else if (typeof global !== 'undefined') {
|
|
2772
|
-
root = global;
|
|
2773
|
-
} else if (typeof module !== 'undefined') {
|
|
2774
|
-
root = module;
|
|
2775
|
-
} else {
|
|
2776
|
-
root = Function('return this')();
|
|
2777
|
-
}
|
|
2919
|
+
return style;
|
|
2920
|
+
}
|
|
2778
2921
|
|
|
2779
|
-
|
|
2922
|
+
return convertCase(style);
|
|
2923
|
+
}
|
|
2780
2924
|
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2925
|
+
function onChangeValue(value, prop, rule) {
|
|
2926
|
+
if (prop.indexOf('--') === 0) {
|
|
2927
|
+
return value;
|
|
2928
|
+
}
|
|
2784
2929
|
|
|
2785
|
-
var
|
|
2786
|
-
return {
|
|
2787
|
-
onCreateRule: function onCreateRule(name, decl, options) {
|
|
2788
|
-
if (!isObservable(decl)) return null;
|
|
2789
|
-
var style$ = decl;
|
|
2790
|
-
var rule = createRule(name, {}, options); // TODO
|
|
2791
|
-
// Call `stream.subscribe()` returns a subscription, which should be explicitly
|
|
2792
|
-
// unsubscribed from when we know this sheet is no longer needed.
|
|
2793
|
-
|
|
2794
|
-
style$.subscribe(function (style) {
|
|
2795
|
-
for (var prop in style) {
|
|
2796
|
-
rule.prop(prop, style[prop], updateOptions);
|
|
2797
|
-
}
|
|
2798
|
-
});
|
|
2799
|
-
return rule;
|
|
2800
|
-
},
|
|
2801
|
-
onProcessRule: function onProcessRule(rule) {
|
|
2802
|
-
if (rule && rule.type !== 'style') return;
|
|
2803
|
-
var styleRule = rule;
|
|
2804
|
-
var style = styleRule.style;
|
|
2805
|
-
|
|
2806
|
-
var _loop = function _loop(prop) {
|
|
2807
|
-
var value = style[prop];
|
|
2808
|
-
if (!isObservable(value)) return "continue";
|
|
2809
|
-
delete style[prop];
|
|
2810
|
-
value.subscribe({
|
|
2811
|
-
next: function next(nextValue) {
|
|
2812
|
-
styleRule.prop(prop, nextValue, updateOptions);
|
|
2813
|
-
}
|
|
2814
|
-
});
|
|
2815
|
-
};
|
|
2816
|
-
|
|
2817
|
-
for (var prop in style) {
|
|
2818
|
-
var _ret = _loop(prop);
|
|
2819
|
-
|
|
2820
|
-
if (_ret === "continue") continue;
|
|
2821
|
-
}
|
|
2822
|
-
}
|
|
2823
|
-
};
|
|
2824
|
-
};
|
|
2825
|
-
|
|
2826
|
-
var semiWithNl = /;\n/;
|
|
2827
|
-
/**
|
|
2828
|
-
* Naive CSS parser.
|
|
2829
|
-
* - Supports only rule body (no selectors)
|
|
2830
|
-
* - Requires semicolon and new line after the value (except of last line)
|
|
2831
|
-
* - No nested rules support
|
|
2832
|
-
*/
|
|
2833
|
-
|
|
2834
|
-
var parse = function parse(cssText) {
|
|
2835
|
-
var style = {};
|
|
2836
|
-
var split = cssText.split(semiWithNl);
|
|
2837
|
-
|
|
2838
|
-
for (var i = 0; i < split.length; i++) {
|
|
2839
|
-
var decl = (split[i] || '').trim();
|
|
2840
|
-
if (!decl) continue;
|
|
2841
|
-
var colonIndex = decl.indexOf(':');
|
|
2842
|
-
|
|
2843
|
-
if (colonIndex === -1) {
|
|
2844
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Malformed CSS string \"" + decl + "\"") : void 0;
|
|
2845
|
-
continue;
|
|
2846
|
-
}
|
|
2847
|
-
|
|
2848
|
-
var prop = decl.substr(0, colonIndex).trim();
|
|
2849
|
-
var value = decl.substr(colonIndex + 1).trim();
|
|
2850
|
-
style[prop] = value;
|
|
2851
|
-
}
|
|
2930
|
+
var hyphenatedProp = index_cjs(prop); // There was no camel case in place
|
|
2852
2931
|
|
|
2853
|
-
|
|
2854
|
-
|
|
2932
|
+
if (prop === hyphenatedProp) return value;
|
|
2933
|
+
rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.
|
|
2855
2934
|
|
|
2856
|
-
|
|
2857
|
-
if (typeof rule.style === 'string') {
|
|
2858
|
-
rule.style = parse(rule.style);
|
|
2935
|
+
return null;
|
|
2859
2936
|
}
|
|
2860
|
-
};
|
|
2861
2937
|
|
|
2862
|
-
function templatePlugin() {
|
|
2863
2938
|
return {
|
|
2864
|
-
|
|
2939
|
+
onProcessStyle: onProcessStyle,
|
|
2940
|
+
onChangeValue: onChangeValue
|
|
2865
2941
|
};
|
|
2866
2942
|
}
|
|
2867
2943
|
|
|
@@ -3047,138 +3123,6 @@ function jssGlobal() {
|
|
|
3047
3123
|
};
|
|
3048
3124
|
}
|
|
3049
3125
|
|
|
3050
|
-
var isObject$1 = function isObject(obj) {
|
|
3051
|
-
return obj && typeof obj === 'object' && !Array.isArray(obj);
|
|
3052
|
-
};
|
|
3053
|
-
|
|
3054
|
-
var valueNs = "extendCurrValue" + Date.now();
|
|
3055
|
-
|
|
3056
|
-
function mergeExtend(style, rule, sheet, newStyle) {
|
|
3057
|
-
var extendType = typeof style.extend; // Extend using a rule name.
|
|
3058
|
-
|
|
3059
|
-
if (extendType === 'string') {
|
|
3060
|
-
if (!sheet) return;
|
|
3061
|
-
var refRule = sheet.getRule(style.extend);
|
|
3062
|
-
if (!refRule) return;
|
|
3063
|
-
|
|
3064
|
-
if (refRule === rule) {
|
|
3065
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] A rule tries to extend itself \n" + rule.toString()) : void 0;
|
|
3066
|
-
return;
|
|
3067
|
-
}
|
|
3068
|
-
|
|
3069
|
-
var parent = refRule.options.parent;
|
|
3070
|
-
|
|
3071
|
-
if (parent) {
|
|
3072
|
-
var originalStyle = parent.rules.raw[style.extend];
|
|
3073
|
-
extend(originalStyle, rule, sheet, newStyle);
|
|
3074
|
-
}
|
|
3075
|
-
|
|
3076
|
-
return;
|
|
3077
|
-
} // Extend using an array.
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
if (Array.isArray(style.extend)) {
|
|
3081
|
-
for (var index = 0; index < style.extend.length; index++) {
|
|
3082
|
-
var singleExtend = style.extend[index];
|
|
3083
|
-
var singleStyle = typeof singleExtend === 'string' ? _extends({}, style, {
|
|
3084
|
-
extend: singleExtend
|
|
3085
|
-
}) : style.extend[index];
|
|
3086
|
-
extend(singleStyle, rule, sheet, newStyle);
|
|
3087
|
-
}
|
|
3088
|
-
|
|
3089
|
-
return;
|
|
3090
|
-
} // Extend is a style object.
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
for (var prop in style.extend) {
|
|
3094
|
-
if (prop === 'extend') {
|
|
3095
|
-
extend(style.extend.extend, rule, sheet, newStyle);
|
|
3096
|
-
continue;
|
|
3097
|
-
}
|
|
3098
|
-
|
|
3099
|
-
if (isObject$1(style.extend[prop])) {
|
|
3100
|
-
if (!(prop in newStyle)) newStyle[prop] = {};
|
|
3101
|
-
extend(style.extend[prop], rule, sheet, newStyle[prop]);
|
|
3102
|
-
continue;
|
|
3103
|
-
}
|
|
3104
|
-
|
|
3105
|
-
newStyle[prop] = style.extend[prop];
|
|
3106
|
-
}
|
|
3107
|
-
}
|
|
3108
|
-
|
|
3109
|
-
function mergeRest(style, rule, sheet, newStyle) {
|
|
3110
|
-
// Copy base style.
|
|
3111
|
-
for (var prop in style) {
|
|
3112
|
-
if (prop === 'extend') continue;
|
|
3113
|
-
|
|
3114
|
-
if (isObject$1(newStyle[prop]) && isObject$1(style[prop])) {
|
|
3115
|
-
extend(style[prop], rule, sheet, newStyle[prop]);
|
|
3116
|
-
continue;
|
|
3117
|
-
}
|
|
3118
|
-
|
|
3119
|
-
if (isObject$1(style[prop])) {
|
|
3120
|
-
newStyle[prop] = extend(style[prop], rule, sheet);
|
|
3121
|
-
continue;
|
|
3122
|
-
}
|
|
3123
|
-
|
|
3124
|
-
newStyle[prop] = style[prop];
|
|
3125
|
-
}
|
|
3126
|
-
}
|
|
3127
|
-
/**
|
|
3128
|
-
* Recursively extend styles.
|
|
3129
|
-
*/
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
function extend(style, rule, sheet, newStyle) {
|
|
3133
|
-
if (newStyle === void 0) {
|
|
3134
|
-
newStyle = {};
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
mergeExtend(style, rule, sheet, newStyle);
|
|
3138
|
-
mergeRest(style, rule, sheet, newStyle);
|
|
3139
|
-
return newStyle;
|
|
3140
|
-
}
|
|
3141
|
-
/**
|
|
3142
|
-
* Handle `extend` property.
|
|
3143
|
-
*/
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
function jssExtend() {
|
|
3147
|
-
function onProcessStyle(style, rule, sheet) {
|
|
3148
|
-
if ('extend' in style) return extend(style, rule, sheet);
|
|
3149
|
-
return style;
|
|
3150
|
-
}
|
|
3151
|
-
|
|
3152
|
-
function onChangeValue(value, prop, rule) {
|
|
3153
|
-
if (prop !== 'extend') return value; // Value is empty, remove properties set previously.
|
|
3154
|
-
|
|
3155
|
-
if (value == null || value === false) {
|
|
3156
|
-
for (var key in rule[valueNs]) {
|
|
3157
|
-
rule.prop(key, null);
|
|
3158
|
-
}
|
|
3159
|
-
|
|
3160
|
-
rule[valueNs] = null;
|
|
3161
|
-
return null;
|
|
3162
|
-
}
|
|
3163
|
-
|
|
3164
|
-
if (typeof value === 'object') {
|
|
3165
|
-
for (var _key in value) {
|
|
3166
|
-
rule.prop(_key, value[_key]);
|
|
3167
|
-
}
|
|
3168
|
-
|
|
3169
|
-
rule[valueNs] = value;
|
|
3170
|
-
} // Make sure we don't set the value in the core.
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
return null;
|
|
3174
|
-
}
|
|
3175
|
-
|
|
3176
|
-
return {
|
|
3177
|
-
onProcessStyle: onProcessStyle,
|
|
3178
|
-
onChangeValue: onChangeValue
|
|
3179
|
-
};
|
|
3180
|
-
}
|
|
3181
|
-
|
|
3182
3126
|
var separatorRegExp = /\s*,\s*/g;
|
|
3183
3127
|
var parentRegExp = /&/g;
|
|
3184
3128
|
var refRegExp = /\$([\w-]+)/g;
|
|
@@ -3288,1953 +3232,2299 @@ function jssNested() {
|
|
|
3288
3232
|
};
|
|
3289
3233
|
}
|
|
3290
3234
|
|
|
3291
|
-
|
|
3292
|
-
* Set selector.
|
|
3293
|
-
*
|
|
3294
|
-
* @param original rule
|
|
3295
|
-
* @param className class string
|
|
3296
|
-
* @return flag indicating function was successfull or not
|
|
3297
|
-
*/
|
|
3298
|
-
|
|
3299
|
-
function registerClass(rule, className) {
|
|
3300
|
-
// Skip falsy values
|
|
3301
|
-
if (!className) return true; // Support array of class names `{composes: ['foo', 'bar']}`
|
|
3302
|
-
|
|
3303
|
-
if (Array.isArray(className)) {
|
|
3304
|
-
for (var index = 0; index < className.length; index++) {
|
|
3305
|
-
var isSetted = registerClass(rule, className[index]);
|
|
3306
|
-
if (!isSetted) return false;
|
|
3307
|
-
}
|
|
3308
|
-
|
|
3309
|
-
return true;
|
|
3310
|
-
} // Support space separated class names `{composes: 'foo bar'}`
|
|
3235
|
+
var _tslib$1 = {};
|
|
3311
3236
|
|
|
3237
|
+
(function (exports) {
|
|
3312
3238
|
|
|
3313
|
-
|
|
3314
|
-
return registerClass(rule, className.split(' '));
|
|
3315
|
-
}
|
|
3239
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3316
3240
|
|
|
3317
|
-
|
|
3241
|
+
/*! *****************************************************************************
|
|
3242
|
+
Copyright (c) Microsoft Corporation.
|
|
3318
3243
|
|
|
3319
|
-
|
|
3320
|
-
|
|
3244
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
3245
|
+
purpose with or without fee is hereby granted.
|
|
3321
3246
|
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3247
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
3248
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
3249
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
3250
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
3251
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
3252
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
3253
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
3254
|
+
***************************************************************************** */
|
|
3326
3255
|
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3256
|
+
exports.__assign = function () {
|
|
3257
|
+
exports.__assign =
|
|
3258
|
+
Object.assign ||
|
|
3259
|
+
function __assign(t) {
|
|
3260
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3261
|
+
s = arguments[i];
|
|
3262
|
+
for (var p in s)
|
|
3263
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3264
|
+
}
|
|
3265
|
+
return t;
|
|
3266
|
+
};
|
|
3267
|
+
return exports.__assign.apply(this, arguments);
|
|
3268
|
+
};
|
|
3269
|
+
} (_tslib$1));
|
|
3331
3270
|
|
|
3332
|
-
|
|
3333
|
-
return true;
|
|
3334
|
-
}
|
|
3271
|
+
var require$$1 = /*@__PURE__*/getAugmentedNamespace(jss_esm);
|
|
3335
3272
|
|
|
3336
|
-
parent.classes[rule.key] += " " + className;
|
|
3337
|
-
return true;
|
|
3338
|
-
}
|
|
3339
3273
|
/**
|
|
3340
|
-
*
|
|
3274
|
+
* The custom `sort` method for
|
|
3275
|
+
* for the [`css-mqpacker`](https://www.npmjs.com/package/css-mqpacker) or
|
|
3276
|
+
* [`pleeease`](https://www.npmjs.com/package/pleeease) which using `css-mqpacker`
|
|
3277
|
+
* or, perhaps, something else ))
|
|
3278
|
+
*
|
|
3279
|
+
* @module sort-css-media-queries
|
|
3280
|
+
* @author Oleg Dutchenko <dutchenko.o.wezom@gmail.com>
|
|
3281
|
+
* @version 1.5.0
|
|
3341
3282
|
*/
|
|
3342
3283
|
|
|
3284
|
+
// ----------------------------------------
|
|
3285
|
+
// Private
|
|
3286
|
+
// ----------------------------------------
|
|
3287
|
+
|
|
3288
|
+
const minMaxWidth = /(!?\(\s*min(-device-)?-width)(.|\n)+\(\s*max(-device)?-width/i;
|
|
3289
|
+
const minWidth = /\(\s*min(-device)?-width/i;
|
|
3290
|
+
const maxMinWidth = /(!?\(\s*max(-device)?-width)(.|\n)+\(\s*min(-device)?-width/i;
|
|
3291
|
+
const maxWidth = /\(\s*max(-device)?-width/i;
|
|
3343
3292
|
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
if (!('composes' in style)) return style;
|
|
3347
|
-
registerClass(rule, style.composes); // Remove composes property to prevent infinite loop.
|
|
3293
|
+
const isMinWidth = _testQuery(minMaxWidth, maxMinWidth, minWidth);
|
|
3294
|
+
const isMaxWidth = _testQuery(maxMinWidth, minMaxWidth, maxWidth);
|
|
3348
3295
|
|
|
3349
|
-
|
|
3350
|
-
|
|
3296
|
+
const minMaxHeight = /(!?\(\s*min(-device)?-height)(.|\n)+\(\s*max(-device)?-height/i;
|
|
3297
|
+
const minHeight = /\(\s*min(-device)?-height/i;
|
|
3298
|
+
const maxMinHeight = /(!?\(\s*max(-device)?-height)(.|\n)+\(\s*min(-device)?-height/i;
|
|
3299
|
+
const maxHeight = /\(\s*max(-device)?-height/i;
|
|
3300
|
+
|
|
3301
|
+
const isMinHeight = _testQuery(minMaxHeight, maxMinHeight, minHeight);
|
|
3302
|
+
const isMaxHeight = _testQuery(maxMinHeight, minMaxHeight, maxHeight);
|
|
3303
|
+
|
|
3304
|
+
const isPrint = /print/i;
|
|
3305
|
+
const isPrintOnly = /^print$/i;
|
|
3306
|
+
|
|
3307
|
+
const maxValue = Number.MAX_VALUE;
|
|
3308
|
+
|
|
3309
|
+
/**
|
|
3310
|
+
* Obtain the length of the media request in pixels.
|
|
3311
|
+
* Copy from original source `function inspectLength (length)`
|
|
3312
|
+
* {@link https://github.com/hail2u/node-css-mqpacker/blob/master/index.js#L58}
|
|
3313
|
+
* @private
|
|
3314
|
+
* @param {string} length
|
|
3315
|
+
* @return {number}
|
|
3316
|
+
*/
|
|
3317
|
+
function _getQueryLength (length) {
|
|
3318
|
+
length = /(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(length);
|
|
3319
|
+
|
|
3320
|
+
if (length === null) {
|
|
3321
|
+
return maxValue
|
|
3351
3322
|
}
|
|
3352
3323
|
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
};
|
|
3356
|
-
}
|
|
3324
|
+
let number = length[1];
|
|
3325
|
+
const unit = length[2];
|
|
3357
3326
|
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
return f.apply(this, arguments);
|
|
3363
|
-
};
|
|
3364
|
-
a.prototype = f.prototype;
|
|
3365
|
-
} else a = {};
|
|
3366
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
3367
|
-
Object.keys(n).forEach(function (k) {
|
|
3368
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
3369
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
3370
|
-
enumerable: true,
|
|
3371
|
-
get: function () {
|
|
3372
|
-
return n[k];
|
|
3373
|
-
}
|
|
3374
|
-
});
|
|
3375
|
-
});
|
|
3376
|
-
return a;
|
|
3377
|
-
}
|
|
3327
|
+
switch (unit) {
|
|
3328
|
+
case 'ch':
|
|
3329
|
+
number = parseFloat(number) * 8.8984375;
|
|
3330
|
+
break
|
|
3378
3331
|
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3332
|
+
case 'em':
|
|
3333
|
+
case 'rem':
|
|
3334
|
+
number = parseFloat(number) * 16;
|
|
3335
|
+
break
|
|
3383
3336
|
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3337
|
+
case 'ex':
|
|
3338
|
+
number = parseFloat(number) * 8.296875;
|
|
3339
|
+
break
|
|
3387
3340
|
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3341
|
+
case 'px':
|
|
3342
|
+
number = parseFloat(number);
|
|
3343
|
+
break
|
|
3391
3344
|
}
|
|
3392
3345
|
|
|
3393
|
-
|
|
3394
|
-
return (cache$2[name] = msPattern.test(hName) ? '-' + hName : hName)
|
|
3346
|
+
return +number
|
|
3395
3347
|
}
|
|
3396
3348
|
|
|
3397
|
-
|
|
3349
|
+
/**
|
|
3350
|
+
* Wrapper for creating test functions
|
|
3351
|
+
* @private
|
|
3352
|
+
* @param {RegExp} doubleTestTrue
|
|
3353
|
+
* @param {RegExp} doubleTestFalse
|
|
3354
|
+
* @param {RegExp} singleTest
|
|
3355
|
+
* @return {Function}
|
|
3356
|
+
*/
|
|
3357
|
+
function _testQuery (doubleTestTrue, doubleTestFalse, singleTest) {
|
|
3358
|
+
/**
|
|
3359
|
+
* @param {string} query
|
|
3360
|
+
* @return {boolean}
|
|
3361
|
+
*/
|
|
3362
|
+
return function (query) {
|
|
3363
|
+
if (doubleTestTrue.test(query)) {
|
|
3364
|
+
return true
|
|
3365
|
+
} else if (doubleTestFalse.test(query)) {
|
|
3366
|
+
return false
|
|
3367
|
+
}
|
|
3368
|
+
return singleTest.test(query)
|
|
3369
|
+
}
|
|
3370
|
+
}
|
|
3398
3371
|
|
|
3399
3372
|
/**
|
|
3400
|
-
*
|
|
3373
|
+
* @private
|
|
3374
|
+
* @param {string} a
|
|
3375
|
+
* @param {string} b
|
|
3376
|
+
* @return {number|null}
|
|
3401
3377
|
*/
|
|
3378
|
+
function _testIsPrint (a, b) {
|
|
3379
|
+
const isPrintA = isPrint.test(a);
|
|
3380
|
+
const isPrintOnlyA = isPrintOnly.test(a);
|
|
3402
3381
|
|
|
3403
|
-
|
|
3404
|
-
|
|
3382
|
+
const isPrintB = isPrint.test(b);
|
|
3383
|
+
const isPrintOnlyB = isPrintOnly.test(b);
|
|
3405
3384
|
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3385
|
+
if (isPrintA && isPrintB) {
|
|
3386
|
+
if (!isPrintOnlyA && isPrintOnlyB) {
|
|
3387
|
+
return 1
|
|
3388
|
+
}
|
|
3389
|
+
if (isPrintOnlyA && !isPrintOnlyB) {
|
|
3390
|
+
return -1
|
|
3391
|
+
}
|
|
3392
|
+
return a.localeCompare(b)
|
|
3409
3393
|
}
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3394
|
+
if (isPrintA) {
|
|
3395
|
+
return 1
|
|
3396
|
+
}
|
|
3397
|
+
if (isPrintB) {
|
|
3398
|
+
return -1
|
|
3413
3399
|
}
|
|
3414
3400
|
|
|
3415
|
-
return
|
|
3401
|
+
return null
|
|
3416
3402
|
}
|
|
3403
|
+
|
|
3404
|
+
// ----------------------------------------
|
|
3405
|
+
// Public
|
|
3406
|
+
// ----------------------------------------
|
|
3407
|
+
|
|
3417
3408
|
/**
|
|
3418
|
-
*
|
|
3409
|
+
* Sorting an array with media queries
|
|
3410
|
+
* according to the mobile-first methodology.
|
|
3411
|
+
* @param {string} a
|
|
3412
|
+
* @param {string} b
|
|
3413
|
+
* @return {number} 1 / 0 / -1
|
|
3419
3414
|
*/
|
|
3415
|
+
function sortCSSmq$1 (a, b) {
|
|
3416
|
+
const testIsPrint = _testIsPrint(a, b);
|
|
3417
|
+
if (testIsPrint !== null) {
|
|
3418
|
+
return testIsPrint
|
|
3419
|
+
}
|
|
3420
3420
|
|
|
3421
|
+
const minA = isMinWidth(a) || isMinHeight(a);
|
|
3422
|
+
const maxA = isMaxWidth(a) || isMaxHeight(a);
|
|
3421
3423
|
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
if (Array.isArray(style)) {
|
|
3425
|
-
// Handle rules like @font-face, which can have multiple styles in an array
|
|
3426
|
-
for (var index = 0; index < style.length; index++) {
|
|
3427
|
-
style[index] = convertCase(style[index]);
|
|
3428
|
-
}
|
|
3429
|
-
|
|
3430
|
-
return style;
|
|
3431
|
-
}
|
|
3424
|
+
const minB = isMinWidth(b) || isMinHeight(b);
|
|
3425
|
+
const maxB = isMaxWidth(b) || isMaxHeight(b);
|
|
3432
3426
|
|
|
3433
|
-
|
|
3427
|
+
if (minA && maxB) {
|
|
3428
|
+
return -1
|
|
3429
|
+
}
|
|
3430
|
+
if (maxA && minB) {
|
|
3431
|
+
return 1
|
|
3434
3432
|
}
|
|
3435
3433
|
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
return value;
|
|
3439
|
-
}
|
|
3434
|
+
let lengthA = _getQueryLength(a);
|
|
3435
|
+
let lengthB = _getQueryLength(b);
|
|
3440
3436
|
|
|
3441
|
-
|
|
3437
|
+
if (lengthA === maxValue && lengthB === maxValue) {
|
|
3438
|
+
return a.localeCompare(b)
|
|
3439
|
+
} else if (lengthA === maxValue) {
|
|
3440
|
+
return 1
|
|
3441
|
+
} else if (lengthB === maxValue) {
|
|
3442
|
+
return -1
|
|
3443
|
+
}
|
|
3442
3444
|
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
+
if (lengthA > lengthB) {
|
|
3446
|
+
if (maxA) {
|
|
3447
|
+
return -1
|
|
3448
|
+
}
|
|
3449
|
+
return 1
|
|
3450
|
+
}
|
|
3445
3451
|
|
|
3446
|
-
|
|
3452
|
+
if (lengthA < lengthB) {
|
|
3453
|
+
if (maxA) {
|
|
3454
|
+
return 1
|
|
3455
|
+
}
|
|
3456
|
+
return -1
|
|
3447
3457
|
}
|
|
3448
3458
|
|
|
3449
|
-
return
|
|
3450
|
-
onProcessStyle: onProcessStyle,
|
|
3451
|
-
onChangeValue: onChangeValue
|
|
3452
|
-
};
|
|
3459
|
+
return a.localeCompare(b)
|
|
3453
3460
|
}
|
|
3454
3461
|
|
|
3455
|
-
var px = hasCSSTOMSupport && CSS ? CSS.px : 'px';
|
|
3456
|
-
var ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';
|
|
3457
|
-
var percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';
|
|
3458
3462
|
/**
|
|
3459
|
-
*
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
'animation-delay': ms,
|
|
3465
|
-
'animation-duration': ms,
|
|
3466
|
-
// Background properties
|
|
3467
|
-
'background-position': px,
|
|
3468
|
-
'background-position-x': px,
|
|
3469
|
-
'background-position-y': px,
|
|
3470
|
-
'background-size': px,
|
|
3471
|
-
// Border Properties
|
|
3472
|
-
border: px,
|
|
3473
|
-
'border-bottom': px,
|
|
3474
|
-
'border-bottom-left-radius': px,
|
|
3475
|
-
'border-bottom-right-radius': px,
|
|
3476
|
-
'border-bottom-width': px,
|
|
3477
|
-
'border-left': px,
|
|
3478
|
-
'border-left-width': px,
|
|
3479
|
-
'border-radius': px,
|
|
3480
|
-
'border-right': px,
|
|
3481
|
-
'border-right-width': px,
|
|
3482
|
-
'border-top': px,
|
|
3483
|
-
'border-top-left-radius': px,
|
|
3484
|
-
'border-top-right-radius': px,
|
|
3485
|
-
'border-top-width': px,
|
|
3486
|
-
'border-width': px,
|
|
3487
|
-
'border-block': px,
|
|
3488
|
-
'border-block-end': px,
|
|
3489
|
-
'border-block-end-width': px,
|
|
3490
|
-
'border-block-start': px,
|
|
3491
|
-
'border-block-start-width': px,
|
|
3492
|
-
'border-block-width': px,
|
|
3493
|
-
'border-inline': px,
|
|
3494
|
-
'border-inline-end': px,
|
|
3495
|
-
'border-inline-end-width': px,
|
|
3496
|
-
'border-inline-start': px,
|
|
3497
|
-
'border-inline-start-width': px,
|
|
3498
|
-
'border-inline-width': px,
|
|
3499
|
-
'border-start-start-radius': px,
|
|
3500
|
-
'border-start-end-radius': px,
|
|
3501
|
-
'border-end-start-radius': px,
|
|
3502
|
-
'border-end-end-radius': px,
|
|
3503
|
-
// Margin properties
|
|
3504
|
-
margin: px,
|
|
3505
|
-
'margin-bottom': px,
|
|
3506
|
-
'margin-left': px,
|
|
3507
|
-
'margin-right': px,
|
|
3508
|
-
'margin-top': px,
|
|
3509
|
-
'margin-block': px,
|
|
3510
|
-
'margin-block-end': px,
|
|
3511
|
-
'margin-block-start': px,
|
|
3512
|
-
'margin-inline': px,
|
|
3513
|
-
'margin-inline-end': px,
|
|
3514
|
-
'margin-inline-start': px,
|
|
3515
|
-
// Padding properties
|
|
3516
|
-
padding: px,
|
|
3517
|
-
'padding-bottom': px,
|
|
3518
|
-
'padding-left': px,
|
|
3519
|
-
'padding-right': px,
|
|
3520
|
-
'padding-top': px,
|
|
3521
|
-
'padding-block': px,
|
|
3522
|
-
'padding-block-end': px,
|
|
3523
|
-
'padding-block-start': px,
|
|
3524
|
-
'padding-inline': px,
|
|
3525
|
-
'padding-inline-end': px,
|
|
3526
|
-
'padding-inline-start': px,
|
|
3527
|
-
// Mask properties
|
|
3528
|
-
'mask-position-x': px,
|
|
3529
|
-
'mask-position-y': px,
|
|
3530
|
-
'mask-size': px,
|
|
3531
|
-
// Width and height properties
|
|
3532
|
-
height: px,
|
|
3533
|
-
width: px,
|
|
3534
|
-
'min-height': px,
|
|
3535
|
-
'max-height': px,
|
|
3536
|
-
'min-width': px,
|
|
3537
|
-
'max-width': px,
|
|
3538
|
-
// Position properties
|
|
3539
|
-
bottom: px,
|
|
3540
|
-
left: px,
|
|
3541
|
-
top: px,
|
|
3542
|
-
right: px,
|
|
3543
|
-
inset: px,
|
|
3544
|
-
'inset-block': px,
|
|
3545
|
-
'inset-block-end': px,
|
|
3546
|
-
'inset-block-start': px,
|
|
3547
|
-
'inset-inline': px,
|
|
3548
|
-
'inset-inline-end': px,
|
|
3549
|
-
'inset-inline-start': px,
|
|
3550
|
-
// Shadow properties
|
|
3551
|
-
'box-shadow': px,
|
|
3552
|
-
'text-shadow': px,
|
|
3553
|
-
// Column properties
|
|
3554
|
-
'column-gap': px,
|
|
3555
|
-
'column-rule': px,
|
|
3556
|
-
'column-rule-width': px,
|
|
3557
|
-
'column-width': px,
|
|
3558
|
-
// Font and text properties
|
|
3559
|
-
'font-size': px,
|
|
3560
|
-
'font-size-delta': px,
|
|
3561
|
-
'letter-spacing': px,
|
|
3562
|
-
'text-decoration-thickness': px,
|
|
3563
|
-
'text-indent': px,
|
|
3564
|
-
'text-stroke': px,
|
|
3565
|
-
'text-stroke-width': px,
|
|
3566
|
-
'word-spacing': px,
|
|
3567
|
-
// Motion properties
|
|
3568
|
-
motion: px,
|
|
3569
|
-
'motion-offset': px,
|
|
3570
|
-
// Outline properties
|
|
3571
|
-
outline: px,
|
|
3572
|
-
'outline-offset': px,
|
|
3573
|
-
'outline-width': px,
|
|
3574
|
-
// Perspective properties
|
|
3575
|
-
perspective: px,
|
|
3576
|
-
'perspective-origin-x': percent,
|
|
3577
|
-
'perspective-origin-y': percent,
|
|
3578
|
-
// Transform properties
|
|
3579
|
-
'transform-origin': percent,
|
|
3580
|
-
'transform-origin-x': percent,
|
|
3581
|
-
'transform-origin-y': percent,
|
|
3582
|
-
'transform-origin-z': percent,
|
|
3583
|
-
// Transition properties
|
|
3584
|
-
'transition-delay': ms,
|
|
3585
|
-
'transition-duration': ms,
|
|
3586
|
-
// Alignment properties
|
|
3587
|
-
'vertical-align': px,
|
|
3588
|
-
'flex-basis': px,
|
|
3589
|
-
// Some random properties
|
|
3590
|
-
'shape-margin': px,
|
|
3591
|
-
size: px,
|
|
3592
|
-
gap: px,
|
|
3593
|
-
// Grid properties
|
|
3594
|
-
grid: px,
|
|
3595
|
-
'grid-gap': px,
|
|
3596
|
-
'row-gap': px,
|
|
3597
|
-
'grid-row-gap': px,
|
|
3598
|
-
'grid-column-gap': px,
|
|
3599
|
-
'grid-template-rows': px,
|
|
3600
|
-
'grid-template-columns': px,
|
|
3601
|
-
'grid-auto-rows': px,
|
|
3602
|
-
'grid-auto-columns': px,
|
|
3603
|
-
// Not existing properties.
|
|
3604
|
-
// Used to avoid issues with jss-plugin-expand integration.
|
|
3605
|
-
'box-shadow-x': px,
|
|
3606
|
-
'box-shadow-y': px,
|
|
3607
|
-
'box-shadow-blur': px,
|
|
3608
|
-
'box-shadow-spread': px,
|
|
3609
|
-
'font-line-height': px,
|
|
3610
|
-
'text-shadow-x': px,
|
|
3611
|
-
'text-shadow-y': px,
|
|
3612
|
-
'text-shadow-blur': px
|
|
3613
|
-
};
|
|
3614
|
-
|
|
3615
|
-
/**
|
|
3616
|
-
* Clones the object and adds a camel cased property version.
|
|
3463
|
+
* Sorting an array with media queries
|
|
3464
|
+
* according to the desktop-first methodology.
|
|
3465
|
+
* @param {string} a
|
|
3466
|
+
* @param {string} b
|
|
3467
|
+
* @return {number} 1 / 0 / -1
|
|
3617
3468
|
*/
|
|
3469
|
+
sortCSSmq$1.desktopFirst = function (a, b) {
|
|
3470
|
+
const testIsPrint = _testIsPrint(a, b);
|
|
3471
|
+
if (testIsPrint !== null) {
|
|
3472
|
+
return testIsPrint
|
|
3473
|
+
}
|
|
3618
3474
|
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
var replace = function replace(str) {
|
|
3623
|
-
return str[1].toUpperCase();
|
|
3624
|
-
};
|
|
3475
|
+
const minA = isMinWidth(a) || isMinHeight(a);
|
|
3476
|
+
const maxA = isMaxWidth(a) || isMaxHeight(a);
|
|
3625
3477
|
|
|
3626
|
-
|
|
3478
|
+
const minB = isMinWidth(b) || isMinHeight(b);
|
|
3479
|
+
const maxB = isMaxWidth(b) || isMaxHeight(b);
|
|
3627
3480
|
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3481
|
+
if (minA && maxB) {
|
|
3482
|
+
return 1
|
|
3483
|
+
}
|
|
3484
|
+
if (maxA && minB) {
|
|
3485
|
+
return -1
|
|
3631
3486
|
}
|
|
3632
3487
|
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
var units = addCamelCasedVersion(defaultUnits);
|
|
3637
|
-
/**
|
|
3638
|
-
* Recursive deep style passing function
|
|
3639
|
-
*/
|
|
3488
|
+
const lengthA = _getQueryLength(a);
|
|
3489
|
+
const lengthB = _getQueryLength(b);
|
|
3640
3490
|
|
|
3641
|
-
|
|
3642
|
-
|
|
3491
|
+
if (lengthA === maxValue && lengthB === maxValue) {
|
|
3492
|
+
return a.localeCompare(b)
|
|
3493
|
+
} else if (lengthA === maxValue) {
|
|
3494
|
+
return 1
|
|
3495
|
+
} else if (lengthB === maxValue) {
|
|
3496
|
+
return -1
|
|
3497
|
+
}
|
|
3643
3498
|
|
|
3644
|
-
if (
|
|
3645
|
-
|
|
3646
|
-
|
|
3499
|
+
if (lengthA > lengthB) {
|
|
3500
|
+
if (maxA) {
|
|
3501
|
+
return -1
|
|
3647
3502
|
}
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
for (var innerProp in value) {
|
|
3651
|
-
value[innerProp] = iterate(innerProp, value[innerProp], options);
|
|
3652
|
-
}
|
|
3653
|
-
} else {
|
|
3654
|
-
for (var _innerProp in value) {
|
|
3655
|
-
value[_innerProp] = iterate(prop + "-" + _innerProp, value[_innerProp], options);
|
|
3656
|
-
}
|
|
3657
|
-
} // eslint-disable-next-line no-restricted-globals
|
|
3658
|
-
|
|
3659
|
-
} else if (typeof value === 'number' && isNaN(value) === false) {
|
|
3660
|
-
var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.
|
|
3503
|
+
return 1
|
|
3504
|
+
}
|
|
3661
3505
|
|
|
3662
|
-
|
|
3663
|
-
|
|
3506
|
+
if (lengthA < lengthB) {
|
|
3507
|
+
if (maxA) {
|
|
3508
|
+
return 1
|
|
3664
3509
|
}
|
|
3665
|
-
|
|
3666
|
-
return value.toString();
|
|
3510
|
+
return -1
|
|
3667
3511
|
}
|
|
3668
3512
|
|
|
3669
|
-
return
|
|
3670
|
-
}
|
|
3671
|
-
/**
|
|
3672
|
-
* Add unit to numeric values.
|
|
3673
|
-
*/
|
|
3513
|
+
return -(a.localeCompare(b))
|
|
3514
|
+
};
|
|
3674
3515
|
|
|
3516
|
+
// ----------------------------------------
|
|
3517
|
+
// Exports
|
|
3518
|
+
// ----------------------------------------
|
|
3675
3519
|
|
|
3676
|
-
|
|
3677
|
-
if (options === void 0) {
|
|
3678
|
-
options = {};
|
|
3679
|
-
}
|
|
3520
|
+
var sortCssMediaQueries = sortCSSmq$1;
|
|
3680
3521
|
|
|
3681
|
-
|
|
3522
|
+
var _tslib = _tslib$1;
|
|
3523
|
+
var jss$1 = require$$1;
|
|
3524
|
+
var sortCSSmq = sortCssMediaQueries;
|
|
3682
3525
|
|
|
3683
|
-
|
|
3684
|
-
|
|
3526
|
+
function _interopDefaultLegacy(e) {
|
|
3527
|
+
return e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
3528
|
+
}
|
|
3685
3529
|
|
|
3686
|
-
|
|
3687
|
-
|
|
3530
|
+
var sortCSSmq__default = /*#__PURE__*/ _interopDefaultLegacy(sortCSSmq);
|
|
3531
|
+
|
|
3532
|
+
function isPlainObject(sample) {
|
|
3533
|
+
return (
|
|
3534
|
+
sample !== null && typeof sample === 'object' && Array.isArray(sample) === false
|
|
3535
|
+
);
|
|
3536
|
+
}
|
|
3537
|
+
var UN_QUERIED = '__UN_QUERIED';
|
|
3538
|
+
function recursiveInnerAndGetQueries(pluginOptions, rules) {
|
|
3539
|
+
var queries = {
|
|
3540
|
+
groups: {},
|
|
3541
|
+
groupsSortNames: []
|
|
3542
|
+
};
|
|
3543
|
+
for (var index = 0; index < rules.length; index++) {
|
|
3544
|
+
var rule = rules[index];
|
|
3545
|
+
var query =
|
|
3546
|
+
rule.type === 'conditional' && typeof rule.query === 'string'
|
|
3547
|
+
? rule.query
|
|
3548
|
+
: UN_QUERIED;
|
|
3549
|
+
if (!queries.groups.hasOwnProperty(query)) {
|
|
3550
|
+
queries.groupsSortNames.push(query);
|
|
3551
|
+
queries.groups[query] = [];
|
|
3552
|
+
}
|
|
3553
|
+
queries.groups[query].push(index);
|
|
3554
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
3555
|
+
recursive(pluginOptions, rule);
|
|
3556
|
+
}
|
|
3557
|
+
queries.groupsSortNames.sort(function (a, b) {
|
|
3558
|
+
var aWeight = a === UN_QUERIED ? 0 : a.length;
|
|
3559
|
+
var bWeight = b === UN_QUERIED ? 0 : b.length;
|
|
3560
|
+
if (aWeight > 0 && bWeight > 0) {
|
|
3561
|
+
if (pluginOptions.desktopFirst) {
|
|
3562
|
+
return sortCSSmq__default['default'].desktopFirst(a, b);
|
|
3563
|
+
} else {
|
|
3564
|
+
return sortCSSmq__default['default'](a, b);
|
|
3565
|
+
}
|
|
3566
|
+
} else {
|
|
3567
|
+
return aWeight - bWeight;
|
|
3568
|
+
}
|
|
3569
|
+
});
|
|
3570
|
+
return queries;
|
|
3571
|
+
}
|
|
3572
|
+
function recursive(pluginOptions, data) {
|
|
3573
|
+
if (isPlainObject(data) && data.rules instanceof jss$1.RuleList) {
|
|
3574
|
+
data.rules.toString = function (options) {
|
|
3575
|
+
if (options === void 0) {
|
|
3576
|
+
options = {};
|
|
3577
|
+
}
|
|
3578
|
+
var str = '';
|
|
3579
|
+
var sheet = this.options.sheet;
|
|
3580
|
+
var link = sheet ? sheet.options.link : false;
|
|
3581
|
+
var _a = recursiveInnerAndGetQueries(pluginOptions, this.index),
|
|
3582
|
+
groups = _a.groups,
|
|
3583
|
+
groupsSortNames = _a.groupsSortNames;
|
|
3584
|
+
for (var i = 0; i < groupsSortNames.length; i++) {
|
|
3585
|
+
var groupName = groupsSortNames[i];
|
|
3586
|
+
var group = groups[groupsSortNames[i]];
|
|
3587
|
+
if (groupName !== UN_QUERIED && pluginOptions.combineMediaQueries) {
|
|
3588
|
+
str += '\n' + groupName + ' {';
|
|
3589
|
+
for (var i_1 = 0; i_1 < group.length; i_1++) {
|
|
3590
|
+
var rule = this.index[group[i_1]];
|
|
3591
|
+
var css = rule.rules.toString(
|
|
3592
|
+
_tslib.__assign(_tslib.__assign({}, options), {
|
|
3593
|
+
indent: (options.indent || 0) + 1
|
|
3594
|
+
})
|
|
3595
|
+
);
|
|
3596
|
+
if (!css && !link) continue;
|
|
3597
|
+
if (str) str += '\n';
|
|
3598
|
+
str += css;
|
|
3599
|
+
}
|
|
3600
|
+
str += '\n}\n';
|
|
3601
|
+
} else {
|
|
3602
|
+
for (var i_2 = 0; i_2 < group.length; i_2++) {
|
|
3603
|
+
var rule = this.index[group[i_2]];
|
|
3604
|
+
var css = rule.toString(options);
|
|
3605
|
+
if (!css && !link) continue;
|
|
3606
|
+
if (str) str += '\n';
|
|
3607
|
+
str += css;
|
|
3608
|
+
}
|
|
3609
|
+
}
|
|
3610
|
+
}
|
|
3611
|
+
return str;
|
|
3612
|
+
};
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
function jssCombineAndSortMQ(options) {
|
|
3616
|
+
if (options === void 0) {
|
|
3617
|
+
options = {};
|
|
3618
|
+
}
|
|
3619
|
+
return {
|
|
3620
|
+
onProcessSheet: function (sheet) {
|
|
3621
|
+
recursive(options, sheet);
|
|
3622
|
+
}
|
|
3623
|
+
};
|
|
3624
|
+
}
|
|
3625
|
+
|
|
3626
|
+
var dist = jssCombineAndSortMQ;
|
|
3627
|
+
|
|
3628
|
+
/* Auto Generated Start */
|
|
3629
|
+
const themeLight = {
|
|
3630
|
+
baseColor: '#000',
|
|
3631
|
+
baseColorDarken: '#000000',
|
|
3632
|
+
brandColor: '#d5001c',
|
|
3633
|
+
backgroundColor: '#fff',
|
|
3634
|
+
backgroundSurfaceColor: '#f2f2f2',
|
|
3635
|
+
contrastLowColor: '#e3e4e5',
|
|
3636
|
+
contrastMediumColor: '#626669',
|
|
3637
|
+
contrastHighColor: '#323639',
|
|
3638
|
+
contrastHighColorDarken: '#151718',
|
|
3639
|
+
hoverColor: '#d5001c',
|
|
3640
|
+
hoverColorDarken: '#980014',
|
|
3641
|
+
activeColor: '#d5001c',
|
|
3642
|
+
focusColor: 'currentColor',
|
|
3643
|
+
disabledColor: '#96989a',
|
|
3644
|
+
errorColor: '#e00000',
|
|
3645
|
+
errorColorDarken: '#a30000',
|
|
3646
|
+
errorSoftColor: '#fae6e6',
|
|
3647
|
+
successColor: '#018a16',
|
|
3648
|
+
successColorDarken: '#014d0c',
|
|
3649
|
+
successSoftColor: '#e5f3e7',
|
|
3650
|
+
warningColor: '#ff9b00',
|
|
3651
|
+
warningSoftColor: '#fff5e5',
|
|
3652
|
+
neutralColor: '#0061bd',
|
|
3653
|
+
neutralSoftColor: '#e5eff8'
|
|
3654
|
+
};
|
|
3655
|
+
const themeDark = {
|
|
3656
|
+
baseColor: '#fff',
|
|
3657
|
+
baseColorDarken: '#e0e0e0',
|
|
3658
|
+
brandColor: '#d5001c',
|
|
3659
|
+
backgroundColor: '#0e1418',
|
|
3660
|
+
backgroundSurfaceColor: '#262b2e',
|
|
3661
|
+
contrastLowColor: '#4a4e51',
|
|
3662
|
+
contrastMediumColor: '#b0b1b2',
|
|
3663
|
+
contrastHighColor: '#e3e4e5',
|
|
3664
|
+
contrastHighColorDarken: '#c3c5c8',
|
|
3665
|
+
hoverColor: '#ff0223',
|
|
3666
|
+
hoverColorDarken: '#c4001a',
|
|
3667
|
+
activeColor: '#ff0223',
|
|
3668
|
+
focusColor: 'currentColor',
|
|
3669
|
+
disabledColor: '#7c7f81',
|
|
3670
|
+
errorColor: '#fc1717',
|
|
3671
|
+
errorColorDarken: '#d30303',
|
|
3672
|
+
errorSoftColor: '#fec5c5',
|
|
3673
|
+
successColor: '#01ba1d',
|
|
3674
|
+
successColorDarken: '#017d14',
|
|
3675
|
+
successSoftColor: '#bfeec6',
|
|
3676
|
+
warningColor: '#ff9b00',
|
|
3677
|
+
warningSoftColor: '#ffe6bf',
|
|
3678
|
+
neutralColor: '#2193ff',
|
|
3679
|
+
neutralSoftColor: '#c7e4ff'
|
|
3680
|
+
};
|
|
3681
|
+
const themeLightElectric = Object.assign(Object.assign({}, themeLight), { brandColor: '#00b0f4', hoverColor: '#00b0f4', hoverColorDarken: '#0084b7', activeColor: '#00b0f4' });
|
|
3682
|
+
const themeDarkElectric = Object.assign(Object.assign({}, themeDark), { brandColor: '#00b0f4', hoverColor: '#00b0f4', hoverColorDarken: '#0084b7', activeColor: '#00b0f4' });
|
|
3683
|
+
const themes = {
|
|
3684
|
+
'light': themeLight,
|
|
3685
|
+
'dark': themeDark,
|
|
3686
|
+
'light-electric': themeLightElectric,
|
|
3687
|
+
'dark-electric': themeDarkElectric
|
|
3688
|
+
};
|
|
3689
|
+
/* Auto Generated End */
|
|
3690
|
+
const getThemedColors = (theme) => {
|
|
3691
|
+
return themes[theme];
|
|
3692
|
+
};
|
|
3693
|
+
|
|
3694
|
+
const pxToRemWithUnit = (px) => `${px / 16}rem`;
|
|
3695
|
+
|
|
3696
|
+
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3697
|
+
createJss({
|
|
3698
|
+
plugins: [
|
|
3699
|
+
jssGlobal(),
|
|
3700
|
+
jssNested(),
|
|
3701
|
+
camelCase(),
|
|
3702
|
+
dist({ combineMediaQueries: true }),
|
|
3703
|
+
],
|
|
3704
|
+
});
|
|
3705
|
+
const supportsConstructableStylesheets = () => {
|
|
3706
|
+
try {
|
|
3707
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
3688
3708
|
}
|
|
3709
|
+
catch (_a) {
|
|
3710
|
+
return false;
|
|
3711
|
+
}
|
|
3712
|
+
};
|
|
3713
|
+
// determine it once
|
|
3714
|
+
supportsConstructableStylesheets();
|
|
3689
3715
|
|
|
3690
|
-
|
|
3716
|
+
const paramCaseToCamelCase = (str) => {
|
|
3717
|
+
return str.replace(/-(\w)/g, (_, group) => group.toUpperCase());
|
|
3718
|
+
};
|
|
3719
|
+
const isScrollable = (isPrevHidden, isNextHidden) => {
|
|
3720
|
+
return !(isPrevHidden && isNextHidden);
|
|
3721
|
+
};
|
|
3722
|
+
|
|
3723
|
+
const hasDocument = typeof document !== 'undefined';
|
|
3724
|
+
|
|
3725
|
+
hasDocument && 'scrollBehavior' in document.documentElement.style;
|
|
3726
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
3727
|
+
win.document || { head: {} };
|
|
3728
|
+
(win.HTMLElement || class {
|
|
3729
|
+
});
|
|
3730
|
+
|
|
3731
|
+
[
|
|
3732
|
+
{ name: 'Model', id: 'model' },
|
|
3733
|
+
{ name: 'Interest', id: 'interest' },
|
|
3734
|
+
{ name: 'VIN', id: 'vin' },
|
|
3735
|
+
{ name: 'Purchase Intention', id: 'purchaseIntention' },
|
|
3736
|
+
{ name: 'Status', id: 'status' },
|
|
3737
|
+
{ name: 'Comment', id: 'comment' },
|
|
3738
|
+
{ name: 'Lead ID', id: 'leadId' },
|
|
3739
|
+
{ name: 'Action', id: 'action', hideLabel: true },
|
|
3740
|
+
].map((item, i) => ({
|
|
3741
|
+
...item,
|
|
3742
|
+
...(i > 0 &&
|
|
3743
|
+
i < 7 &&
|
|
3744
|
+
i !== 5 && {
|
|
3745
|
+
active: i === 1,
|
|
3746
|
+
direction: 'asc',
|
|
3747
|
+
}),
|
|
3748
|
+
}));
|
|
3749
|
+
|
|
3750
|
+
[
|
|
3751
|
+
{ name: 'Column 1', id: 'col1' },
|
|
3752
|
+
{ name: 'Column 2', id: 'col2' },
|
|
3753
|
+
{ name: 'Column 3', id: 'col3' },
|
|
3754
|
+
].map((item, i) => ({
|
|
3755
|
+
...item,
|
|
3756
|
+
active: i === 1,
|
|
3757
|
+
direction: 'asc',
|
|
3758
|
+
}));
|
|
3759
|
+
|
|
3760
|
+
Array.from(Array(4)).map(() => ({
|
|
3761
|
+
imageUrl: 'https://nav.porsche.com/00BC524/series-assets/1366/911@2x.jpg',
|
|
3762
|
+
imageWidth: 80,
|
|
3763
|
+
imageHeight: 48,
|
|
3764
|
+
html: "<a href='#'>link</a> <b>bold</b> <i>italic</i> <strong>strong</strong> <em>emphasized</em>",
|
|
3765
|
+
longText: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr',
|
|
3766
|
+
shortText: 'Some text',
|
|
3767
|
+
}));
|
|
3768
|
+
|
|
3769
|
+
var now = Date.now();
|
|
3770
|
+
var fnValuesNs = "fnValues" + now;
|
|
3771
|
+
var fnRuleNs = "fnStyle" + ++now;
|
|
3772
|
+
|
|
3773
|
+
var functionPlugin = function functionPlugin() {
|
|
3774
|
+
return {
|
|
3775
|
+
onCreateRule: function onCreateRule(name, decl, options) {
|
|
3776
|
+
if (typeof decl !== 'function') return null;
|
|
3777
|
+
var rule = createRule(name, {}, options);
|
|
3778
|
+
rule[fnRuleNs] = decl;
|
|
3779
|
+
return rule;
|
|
3780
|
+
},
|
|
3781
|
+
onProcessStyle: function onProcessStyle(style, rule) {
|
|
3782
|
+
// We need to extract function values from the declaration, so that we can keep core unaware of them.
|
|
3783
|
+
// We need to do that only once.
|
|
3784
|
+
// We don't need to extract functions on each style update, since this can happen only once.
|
|
3785
|
+
// We don't support function values inside of function rules.
|
|
3786
|
+
if (fnValuesNs in rule || fnRuleNs in rule) return style;
|
|
3787
|
+
var fnValues = {};
|
|
3788
|
+
|
|
3789
|
+
for (var prop in style) {
|
|
3790
|
+
var value = style[prop];
|
|
3791
|
+
if (typeof value !== 'function') continue;
|
|
3792
|
+
delete style[prop];
|
|
3793
|
+
fnValues[prop] = value;
|
|
3794
|
+
}
|
|
3795
|
+
|
|
3796
|
+
rule[fnValuesNs] = fnValues;
|
|
3797
|
+
return style;
|
|
3798
|
+
},
|
|
3799
|
+
onUpdate: function onUpdate(data, rule, sheet, options) {
|
|
3800
|
+
var styleRule = rule;
|
|
3801
|
+
var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object
|
|
3802
|
+
// will be returned from that function.
|
|
3803
|
+
|
|
3804
|
+
if (fnRule) {
|
|
3805
|
+
// Empty object will remove all currently defined props
|
|
3806
|
+
// in case function rule returns a falsy value.
|
|
3807
|
+
styleRule.style = fnRule(data) || {};
|
|
3808
|
+
|
|
3809
|
+
if (process.env.NODE_ENV === 'development') {
|
|
3810
|
+
for (var prop in styleRule.style) {
|
|
3811
|
+
if (typeof styleRule.style[prop] === 'function') {
|
|
3812
|
+
process.env.NODE_ENV !== "production" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;
|
|
3813
|
+
break;
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
3816
|
+
}
|
|
3817
|
+
}
|
|
3818
|
+
|
|
3819
|
+
var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.
|
|
3820
|
+
|
|
3821
|
+
if (fnValues) {
|
|
3822
|
+
for (var _prop in fnValues) {
|
|
3823
|
+
styleRule.prop(_prop, fnValues[_prop](data), options);
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
}
|
|
3827
|
+
};
|
|
3828
|
+
};
|
|
3829
|
+
|
|
3830
|
+
function symbolObservablePonyfill(root) {
|
|
3831
|
+
var result;
|
|
3832
|
+
var Symbol = root.Symbol;
|
|
3833
|
+
|
|
3834
|
+
if (typeof Symbol === 'function') {
|
|
3835
|
+
if (Symbol.observable) {
|
|
3836
|
+
result = Symbol.observable;
|
|
3837
|
+
} else {
|
|
3838
|
+
result = Symbol('observable');
|
|
3839
|
+
Symbol.observable = result;
|
|
3840
|
+
}
|
|
3841
|
+
} else {
|
|
3842
|
+
result = '@@observable';
|
|
3843
|
+
}
|
|
3844
|
+
|
|
3845
|
+
return result;
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3848
|
+
/* global window */
|
|
3849
|
+
|
|
3850
|
+
var root;
|
|
3851
|
+
|
|
3852
|
+
if (typeof self !== 'undefined') {
|
|
3853
|
+
root = self;
|
|
3854
|
+
} else if (typeof window !== 'undefined') {
|
|
3855
|
+
root = window;
|
|
3856
|
+
} else if (typeof global !== 'undefined') {
|
|
3857
|
+
root = global;
|
|
3858
|
+
} else if (typeof module !== 'undefined') {
|
|
3859
|
+
root = module;
|
|
3860
|
+
} else {
|
|
3861
|
+
root = Function('return this')();
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
var result = symbolObservablePonyfill(root);
|
|
3865
|
+
|
|
3866
|
+
var isObservable = function isObservable(value) {
|
|
3867
|
+
return value && value[result] && value === value[result]();
|
|
3868
|
+
};
|
|
3869
|
+
|
|
3870
|
+
var observablePlugin = function observablePlugin(updateOptions) {
|
|
3871
|
+
return {
|
|
3872
|
+
onCreateRule: function onCreateRule(name, decl, options) {
|
|
3873
|
+
if (!isObservable(decl)) return null;
|
|
3874
|
+
var style$ = decl;
|
|
3875
|
+
var rule = createRule(name, {}, options); // TODO
|
|
3876
|
+
// Call `stream.subscribe()` returns a subscription, which should be explicitly
|
|
3877
|
+
// unsubscribed from when we know this sheet is no longer needed.
|
|
3878
|
+
|
|
3879
|
+
style$.subscribe(function (style) {
|
|
3880
|
+
for (var prop in style) {
|
|
3881
|
+
rule.prop(prop, style[prop], updateOptions);
|
|
3882
|
+
}
|
|
3883
|
+
});
|
|
3884
|
+
return rule;
|
|
3885
|
+
},
|
|
3886
|
+
onProcessRule: function onProcessRule(rule) {
|
|
3887
|
+
if (rule && rule.type !== 'style') return;
|
|
3888
|
+
var styleRule = rule;
|
|
3889
|
+
var style = styleRule.style;
|
|
3890
|
+
|
|
3891
|
+
var _loop = function _loop(prop) {
|
|
3892
|
+
var value = style[prop];
|
|
3893
|
+
if (!isObservable(value)) return "continue";
|
|
3894
|
+
delete style[prop];
|
|
3895
|
+
value.subscribe({
|
|
3896
|
+
next: function next(nextValue) {
|
|
3897
|
+
styleRule.prop(prop, nextValue, updateOptions);
|
|
3898
|
+
}
|
|
3899
|
+
});
|
|
3900
|
+
};
|
|
3901
|
+
|
|
3902
|
+
for (var prop in style) {
|
|
3903
|
+
var _ret = _loop(prop);
|
|
3904
|
+
|
|
3905
|
+
if (_ret === "continue") continue;
|
|
3906
|
+
}
|
|
3907
|
+
}
|
|
3908
|
+
};
|
|
3909
|
+
};
|
|
3910
|
+
|
|
3911
|
+
var semiWithNl = /;\n/;
|
|
3912
|
+
/**
|
|
3913
|
+
* Naive CSS parser.
|
|
3914
|
+
* - Supports only rule body (no selectors)
|
|
3915
|
+
* - Requires semicolon and new line after the value (except of last line)
|
|
3916
|
+
* - No nested rules support
|
|
3917
|
+
*/
|
|
3918
|
+
|
|
3919
|
+
var parse = function parse(cssText) {
|
|
3920
|
+
var style = {};
|
|
3921
|
+
var split = cssText.split(semiWithNl);
|
|
3922
|
+
|
|
3923
|
+
for (var i = 0; i < split.length; i++) {
|
|
3924
|
+
var decl = (split[i] || '').trim();
|
|
3925
|
+
if (!decl) continue;
|
|
3926
|
+
var colonIndex = decl.indexOf(':');
|
|
3927
|
+
|
|
3928
|
+
if (colonIndex === -1) {
|
|
3929
|
+
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Malformed CSS string \"" + decl + "\"") : void 0;
|
|
3930
|
+
continue;
|
|
3931
|
+
}
|
|
3932
|
+
|
|
3933
|
+
var prop = decl.substr(0, colonIndex).trim();
|
|
3934
|
+
var value = decl.substr(colonIndex + 1).trim();
|
|
3935
|
+
style[prop] = value;
|
|
3936
|
+
}
|
|
3937
|
+
|
|
3938
|
+
return style;
|
|
3939
|
+
};
|
|
3940
|
+
|
|
3941
|
+
var onProcessRule = function onProcessRule(rule) {
|
|
3942
|
+
if (typeof rule.style === 'string') {
|
|
3943
|
+
rule.style = parse(rule.style);
|
|
3944
|
+
}
|
|
3945
|
+
};
|
|
3946
|
+
|
|
3947
|
+
function templatePlugin() {
|
|
3948
|
+
return {
|
|
3949
|
+
onProcessRule: onProcessRule
|
|
3950
|
+
};
|
|
3951
|
+
}
|
|
3952
|
+
|
|
3953
|
+
var isObject = function isObject(obj) {
|
|
3954
|
+
return obj && typeof obj === 'object' && !Array.isArray(obj);
|
|
3955
|
+
};
|
|
3956
|
+
|
|
3957
|
+
var valueNs = "extendCurrValue" + Date.now();
|
|
3958
|
+
|
|
3959
|
+
function mergeExtend(style, rule, sheet, newStyle) {
|
|
3960
|
+
var extendType = typeof style.extend; // Extend using a rule name.
|
|
3961
|
+
|
|
3962
|
+
if (extendType === 'string') {
|
|
3963
|
+
if (!sheet) return;
|
|
3964
|
+
var refRule = sheet.getRule(style.extend);
|
|
3965
|
+
if (!refRule) return;
|
|
3966
|
+
|
|
3967
|
+
if (refRule === rule) {
|
|
3968
|
+
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] A rule tries to extend itself \n" + rule.toString()) : void 0;
|
|
3969
|
+
return;
|
|
3970
|
+
}
|
|
3971
|
+
|
|
3972
|
+
var parent = refRule.options.parent;
|
|
3973
|
+
|
|
3974
|
+
if (parent) {
|
|
3975
|
+
var originalStyle = parent.rules.raw[style.extend];
|
|
3976
|
+
extend(originalStyle, rule, sheet, newStyle);
|
|
3977
|
+
}
|
|
3978
|
+
|
|
3979
|
+
return;
|
|
3980
|
+
} // Extend using an array.
|
|
3981
|
+
|
|
3982
|
+
|
|
3983
|
+
if (Array.isArray(style.extend)) {
|
|
3984
|
+
for (var index = 0; index < style.extend.length; index++) {
|
|
3985
|
+
var singleExtend = style.extend[index];
|
|
3986
|
+
var singleStyle = typeof singleExtend === 'string' ? _extends({}, style, {
|
|
3987
|
+
extend: singleExtend
|
|
3988
|
+
}) : style.extend[index];
|
|
3989
|
+
extend(singleStyle, rule, sheet, newStyle);
|
|
3990
|
+
}
|
|
3991
|
+
|
|
3992
|
+
return;
|
|
3993
|
+
} // Extend is a style object.
|
|
3994
|
+
|
|
3995
|
+
|
|
3996
|
+
for (var prop in style.extend) {
|
|
3997
|
+
if (prop === 'extend') {
|
|
3998
|
+
extend(style.extend.extend, rule, sheet, newStyle);
|
|
3999
|
+
continue;
|
|
4000
|
+
}
|
|
4001
|
+
|
|
4002
|
+
if (isObject(style.extend[prop])) {
|
|
4003
|
+
if (!(prop in newStyle)) newStyle[prop] = {};
|
|
4004
|
+
extend(style.extend[prop], rule, sheet, newStyle[prop]);
|
|
4005
|
+
continue;
|
|
4006
|
+
}
|
|
4007
|
+
|
|
4008
|
+
newStyle[prop] = style.extend[prop];
|
|
3691
4009
|
}
|
|
4010
|
+
}
|
|
4011
|
+
|
|
4012
|
+
function mergeRest(style, rule, sheet, newStyle) {
|
|
4013
|
+
// Copy base style.
|
|
4014
|
+
for (var prop in style) {
|
|
4015
|
+
if (prop === 'extend') continue;
|
|
4016
|
+
|
|
4017
|
+
if (isObject(newStyle[prop]) && isObject(style[prop])) {
|
|
4018
|
+
extend(style[prop], rule, sheet, newStyle[prop]);
|
|
4019
|
+
continue;
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
if (isObject(style[prop])) {
|
|
4023
|
+
newStyle[prop] = extend(style[prop], rule, sheet);
|
|
4024
|
+
continue;
|
|
4025
|
+
}
|
|
4026
|
+
|
|
4027
|
+
newStyle[prop] = style[prop];
|
|
4028
|
+
}
|
|
4029
|
+
}
|
|
4030
|
+
/**
|
|
4031
|
+
* Recursively extend styles.
|
|
4032
|
+
*/
|
|
3692
4033
|
|
|
3693
|
-
|
|
3694
|
-
|
|
4034
|
+
|
|
4035
|
+
function extend(style, rule, sheet, newStyle) {
|
|
4036
|
+
if (newStyle === void 0) {
|
|
4037
|
+
newStyle = {};
|
|
3695
4038
|
}
|
|
3696
4039
|
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
};
|
|
4040
|
+
mergeExtend(style, rule, sheet, newStyle);
|
|
4041
|
+
mergeRest(style, rule, sheet, newStyle);
|
|
4042
|
+
return newStyle;
|
|
3701
4043
|
}
|
|
3702
|
-
|
|
3703
4044
|
/**
|
|
3704
|
-
*
|
|
3705
|
-
* All properties listed below will be transformed to a string separated by space.
|
|
4045
|
+
* Handle `extend` property.
|
|
3706
4046
|
*/
|
|
3707
|
-
var propArray = {
|
|
3708
|
-
'background-size': true,
|
|
3709
|
-
'background-position': true,
|
|
3710
|
-
border: true,
|
|
3711
|
-
'border-bottom': true,
|
|
3712
|
-
'border-left': true,
|
|
3713
|
-
'border-top': true,
|
|
3714
|
-
'border-right': true,
|
|
3715
|
-
'border-radius': true,
|
|
3716
|
-
'border-image': true,
|
|
3717
|
-
'border-width': true,
|
|
3718
|
-
'border-style': true,
|
|
3719
|
-
'border-color': true,
|
|
3720
|
-
'box-shadow': true,
|
|
3721
|
-
flex: true,
|
|
3722
|
-
margin: true,
|
|
3723
|
-
padding: true,
|
|
3724
|
-
outline: true,
|
|
3725
|
-
'transform-origin': true,
|
|
3726
|
-
transform: true,
|
|
3727
|
-
transition: true
|
|
3728
|
-
/**
|
|
3729
|
-
* A scheme for converting arrays to regular styles inside of objects.
|
|
3730
|
-
* For e.g.: "{position: [0, 0]}" => "background-position: 0 0;".
|
|
3731
|
-
*/
|
|
3732
4047
|
|
|
3733
|
-
};
|
|
3734
|
-
var propArrayInObj = {
|
|
3735
|
-
position: true,
|
|
3736
|
-
// background-position
|
|
3737
|
-
size: true // background-size
|
|
3738
4048
|
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
4049
|
+
function jssExtend() {
|
|
4050
|
+
function onProcessStyle(style, rule, sheet) {
|
|
4051
|
+
if ('extend' in style) return extend(style, rule, sheet);
|
|
4052
|
+
return style;
|
|
4053
|
+
}
|
|
3742
4054
|
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
padding: {
|
|
3746
|
-
top: 0,
|
|
3747
|
-
right: 0,
|
|
3748
|
-
bottom: 0,
|
|
3749
|
-
left: 0
|
|
3750
|
-
},
|
|
3751
|
-
margin: {
|
|
3752
|
-
top: 0,
|
|
3753
|
-
right: 0,
|
|
3754
|
-
bottom: 0,
|
|
3755
|
-
left: 0
|
|
3756
|
-
},
|
|
3757
|
-
background: {
|
|
3758
|
-
attachment: null,
|
|
3759
|
-
color: null,
|
|
3760
|
-
image: null,
|
|
3761
|
-
position: null,
|
|
3762
|
-
repeat: null
|
|
3763
|
-
},
|
|
3764
|
-
border: {
|
|
3765
|
-
width: null,
|
|
3766
|
-
style: null,
|
|
3767
|
-
color: null
|
|
3768
|
-
},
|
|
3769
|
-
'border-top': {
|
|
3770
|
-
width: null,
|
|
3771
|
-
style: null,
|
|
3772
|
-
color: null
|
|
3773
|
-
},
|
|
3774
|
-
'border-right': {
|
|
3775
|
-
width: null,
|
|
3776
|
-
style: null,
|
|
3777
|
-
color: null
|
|
3778
|
-
},
|
|
3779
|
-
'border-bottom': {
|
|
3780
|
-
width: null,
|
|
3781
|
-
style: null,
|
|
3782
|
-
color: null
|
|
3783
|
-
},
|
|
3784
|
-
'border-left': {
|
|
3785
|
-
width: null,
|
|
3786
|
-
style: null,
|
|
3787
|
-
color: null
|
|
3788
|
-
},
|
|
3789
|
-
outline: {
|
|
3790
|
-
width: null,
|
|
3791
|
-
style: null,
|
|
3792
|
-
color: null
|
|
3793
|
-
},
|
|
3794
|
-
'list-style': {
|
|
3795
|
-
type: null,
|
|
3796
|
-
position: null,
|
|
3797
|
-
image: null
|
|
3798
|
-
},
|
|
3799
|
-
transition: {
|
|
3800
|
-
property: null,
|
|
3801
|
-
duration: null,
|
|
3802
|
-
'timing-function': null,
|
|
3803
|
-
timingFunction: null,
|
|
3804
|
-
// Needed for avoiding comilation issues with jss-plugin-camel-case
|
|
3805
|
-
delay: null
|
|
3806
|
-
},
|
|
3807
|
-
animation: {
|
|
3808
|
-
name: null,
|
|
3809
|
-
duration: null,
|
|
3810
|
-
'timing-function': null,
|
|
3811
|
-
timingFunction: null,
|
|
3812
|
-
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
3813
|
-
delay: null,
|
|
3814
|
-
'iteration-count': null,
|
|
3815
|
-
iterationCount: null,
|
|
3816
|
-
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
3817
|
-
direction: null,
|
|
3818
|
-
'fill-mode': null,
|
|
3819
|
-
fillMode: null,
|
|
3820
|
-
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
3821
|
-
'play-state': null,
|
|
3822
|
-
playState: null // Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4055
|
+
function onChangeValue(value, prop, rule) {
|
|
4056
|
+
if (prop !== 'extend') return value; // Value is empty, remove properties set previously.
|
|
3823
4057
|
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
blur: 0,
|
|
3829
|
-
spread: 0,
|
|
3830
|
-
color: null,
|
|
3831
|
-
inset: null
|
|
3832
|
-
},
|
|
3833
|
-
'text-shadow': {
|
|
3834
|
-
x: 0,
|
|
3835
|
-
y: 0,
|
|
3836
|
-
blur: null,
|
|
3837
|
-
color: null
|
|
3838
|
-
}
|
|
3839
|
-
/**
|
|
3840
|
-
* A scheme for converting non-standart properties inside object.
|
|
3841
|
-
* For e.g.: include 'border-radius' property inside 'border' object.
|
|
3842
|
-
*/
|
|
4058
|
+
if (value == null || value === false) {
|
|
4059
|
+
for (var key in rule[valueNs]) {
|
|
4060
|
+
rule.prop(key, null);
|
|
4061
|
+
}
|
|
3843
4062
|
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
'border-top': {
|
|
3859
|
-
width: 'border-top-width',
|
|
3860
|
-
style: 'border-top-style',
|
|
3861
|
-
color: 'border-top-color'
|
|
3862
|
-
},
|
|
3863
|
-
'border-left': {
|
|
3864
|
-
width: 'border-left-width',
|
|
3865
|
-
style: 'border-left-style',
|
|
3866
|
-
color: 'border-left-color'
|
|
3867
|
-
},
|
|
3868
|
-
'border-right': {
|
|
3869
|
-
width: 'border-right-width',
|
|
3870
|
-
style: 'border-right-style',
|
|
3871
|
-
color: 'border-right-color'
|
|
3872
|
-
},
|
|
3873
|
-
background: {
|
|
3874
|
-
size: 'background-size',
|
|
3875
|
-
image: 'background-image'
|
|
3876
|
-
},
|
|
3877
|
-
font: {
|
|
3878
|
-
style: 'font-style',
|
|
3879
|
-
variant: 'font-variant',
|
|
3880
|
-
weight: 'font-weight',
|
|
3881
|
-
stretch: 'font-stretch',
|
|
3882
|
-
size: 'font-size',
|
|
3883
|
-
family: 'font-family',
|
|
3884
|
-
lineHeight: 'line-height',
|
|
3885
|
-
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
3886
|
-
'line-height': 'line-height'
|
|
3887
|
-
},
|
|
3888
|
-
flex: {
|
|
3889
|
-
grow: 'flex-grow',
|
|
3890
|
-
basis: 'flex-basis',
|
|
3891
|
-
direction: 'flex-direction',
|
|
3892
|
-
wrap: 'flex-wrap',
|
|
3893
|
-
flow: 'flex-flow',
|
|
3894
|
-
shrink: 'flex-shrink'
|
|
3895
|
-
},
|
|
3896
|
-
align: {
|
|
3897
|
-
self: 'align-self',
|
|
3898
|
-
items: 'align-items',
|
|
3899
|
-
content: 'align-content'
|
|
3900
|
-
},
|
|
3901
|
-
grid: {
|
|
3902
|
-
'template-columns': 'grid-template-columns',
|
|
3903
|
-
templateColumns: 'grid-template-columns',
|
|
3904
|
-
'template-rows': 'grid-template-rows',
|
|
3905
|
-
templateRows: 'grid-template-rows',
|
|
3906
|
-
'template-areas': 'grid-template-areas',
|
|
3907
|
-
templateAreas: 'grid-template-areas',
|
|
3908
|
-
template: 'grid-template',
|
|
3909
|
-
'auto-columns': 'grid-auto-columns',
|
|
3910
|
-
autoColumns: 'grid-auto-columns',
|
|
3911
|
-
'auto-rows': 'grid-auto-rows',
|
|
3912
|
-
autoRows: 'grid-auto-rows',
|
|
3913
|
-
'auto-flow': 'grid-auto-flow',
|
|
3914
|
-
autoFlow: 'grid-auto-flow',
|
|
3915
|
-
row: 'grid-row',
|
|
3916
|
-
column: 'grid-column',
|
|
3917
|
-
'row-start': 'grid-row-start',
|
|
3918
|
-
rowStart: 'grid-row-start',
|
|
3919
|
-
'row-end': 'grid-row-end',
|
|
3920
|
-
rowEnd: 'grid-row-end',
|
|
3921
|
-
'column-start': 'grid-column-start',
|
|
3922
|
-
columnStart: 'grid-column-start',
|
|
3923
|
-
'column-end': 'grid-column-end',
|
|
3924
|
-
columnEnd: 'grid-column-end',
|
|
3925
|
-
area: 'grid-area',
|
|
3926
|
-
gap: 'grid-gap',
|
|
3927
|
-
'row-gap': 'grid-row-gap',
|
|
3928
|
-
rowGap: 'grid-row-gap',
|
|
3929
|
-
'column-gap': 'grid-column-gap',
|
|
3930
|
-
columnGap: 'grid-column-gap'
|
|
4063
|
+
rule[valueNs] = null;
|
|
4064
|
+
return null;
|
|
4065
|
+
}
|
|
4066
|
+
|
|
4067
|
+
if (typeof value === 'object') {
|
|
4068
|
+
for (var _key in value) {
|
|
4069
|
+
rule.prop(_key, value[_key]);
|
|
4070
|
+
}
|
|
4071
|
+
|
|
4072
|
+
rule[valueNs] = value;
|
|
4073
|
+
} // Make sure we don't set the value in the core.
|
|
4074
|
+
|
|
4075
|
+
|
|
4076
|
+
return null;
|
|
3931
4077
|
}
|
|
3932
|
-
};
|
|
3933
4078
|
|
|
3934
|
-
|
|
4079
|
+
return {
|
|
4080
|
+
onProcessStyle: onProcessStyle,
|
|
4081
|
+
onChangeValue: onChangeValue
|
|
4082
|
+
};
|
|
4083
|
+
}
|
|
4084
|
+
|
|
3935
4085
|
/**
|
|
3936
|
-
*
|
|
4086
|
+
* Set selector.
|
|
3937
4087
|
*
|
|
3938
|
-
* @param
|
|
3939
|
-
* @param
|
|
3940
|
-
* @
|
|
3941
|
-
* @return {String} mapped values
|
|
4088
|
+
* @param original rule
|
|
4089
|
+
* @param className class string
|
|
4090
|
+
* @return flag indicating function was successfull or not
|
|
3942
4091
|
*/
|
|
3943
4092
|
|
|
3944
|
-
function
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
});
|
|
3948
|
-
}
|
|
3949
|
-
/**
|
|
3950
|
-
* Convert array to nested array, if needed
|
|
3951
|
-
*/
|
|
4093
|
+
function registerClass(rule, className) {
|
|
4094
|
+
// Skip falsy values
|
|
4095
|
+
if (!className) return true; // Support array of class names `{composes: ['foo', 'bar']}`
|
|
3952
4096
|
|
|
4097
|
+
if (Array.isArray(className)) {
|
|
4098
|
+
for (var index = 0; index < className.length; index++) {
|
|
4099
|
+
var isSetted = registerClass(rule, className[index]);
|
|
4100
|
+
if (!isSetted) return false;
|
|
4101
|
+
}
|
|
3953
4102
|
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
if (value.length === 0) return [];
|
|
3957
|
-
if (Array.isArray(value[0])) return processArray(value[0], prop, scheme, rule);
|
|
4103
|
+
return true;
|
|
4104
|
+
} // Support space separated class names `{composes: 'foo bar'}`
|
|
3958
4105
|
|
|
3959
|
-
|
|
3960
|
-
|
|
4106
|
+
|
|
4107
|
+
if (className.indexOf(' ') > -1) {
|
|
4108
|
+
return registerClass(rule, className.split(' '));
|
|
3961
4109
|
}
|
|
3962
4110
|
|
|
3963
|
-
|
|
3964
|
-
}
|
|
3965
|
-
/**
|
|
3966
|
-
* Convert object to array.
|
|
3967
|
-
*/
|
|
4111
|
+
var parent = rule.options.parent; // It is a ref to a local rule.
|
|
3968
4112
|
|
|
4113
|
+
if (className[0] === '$') {
|
|
4114
|
+
var refRule = parent.getRule(className.substr(1));
|
|
3969
4115
|
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
4116
|
+
if (!refRule) {
|
|
4117
|
+
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Referenced rule is not defined. \n" + rule.toString()) : void 0;
|
|
4118
|
+
return false;
|
|
4119
|
+
}
|
|
3973
4120
|
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
4121
|
+
if (refRule === rule) {
|
|
4122
|
+
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Cyclic composition detected. \n" + rule.toString()) : void 0;
|
|
4123
|
+
return false;
|
|
4124
|
+
}
|
|
3978
4125
|
|
|
4126
|
+
parent.classes[rule.key] += " " + parent.classes[refRule.key];
|
|
4127
|
+
return true;
|
|
4128
|
+
}
|
|
3979
4129
|
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
4130
|
+
parent.classes[rule.key] += " " + className;
|
|
4131
|
+
return true;
|
|
4132
|
+
}
|
|
4133
|
+
/**
|
|
4134
|
+
* Convert compose property to additional class, remove property from original styles.
|
|
4135
|
+
*/
|
|
3986
4136
|
|
|
3987
|
-
continue;
|
|
3988
|
-
} // Add default value from props config.
|
|
3989
4137
|
|
|
4138
|
+
function jssCompose() {
|
|
4139
|
+
function onProcessStyle(style, rule) {
|
|
4140
|
+
if (!('composes' in style)) return style;
|
|
4141
|
+
registerClass(rule, style.composes); // Remove composes property to prevent infinite loop.
|
|
3990
4142
|
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
}
|
|
3994
|
-
}
|
|
4143
|
+
delete style.composes;
|
|
4144
|
+
return style;
|
|
3995
4145
|
}
|
|
3996
4146
|
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
}
|
|
4147
|
+
return {
|
|
4148
|
+
onProcessStyle: onProcessStyle
|
|
4149
|
+
};
|
|
4150
|
+
}
|
|
4151
|
+
|
|
4152
|
+
var px = hasCSSTOMSupport && CSS ? CSS.px : 'px';
|
|
4153
|
+
var ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';
|
|
4154
|
+
var percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';
|
|
4155
|
+
/**
|
|
4156
|
+
* Generated jss-plugin-default-unit CSS property units
|
|
4157
|
+
*/
|
|
4158
|
+
|
|
4159
|
+
var defaultUnits = {
|
|
4160
|
+
// Animation properties
|
|
4161
|
+
'animation-delay': ms,
|
|
4162
|
+
'animation-duration': ms,
|
|
4163
|
+
// Background properties
|
|
4164
|
+
'background-position': px,
|
|
4165
|
+
'background-position-x': px,
|
|
4166
|
+
'background-position-y': px,
|
|
4167
|
+
'background-size': px,
|
|
4168
|
+
// Border Properties
|
|
4169
|
+
border: px,
|
|
4170
|
+
'border-bottom': px,
|
|
4171
|
+
'border-bottom-left-radius': px,
|
|
4172
|
+
'border-bottom-right-radius': px,
|
|
4173
|
+
'border-bottom-width': px,
|
|
4174
|
+
'border-left': px,
|
|
4175
|
+
'border-left-width': px,
|
|
4176
|
+
'border-radius': px,
|
|
4177
|
+
'border-right': px,
|
|
4178
|
+
'border-right-width': px,
|
|
4179
|
+
'border-top': px,
|
|
4180
|
+
'border-top-left-radius': px,
|
|
4181
|
+
'border-top-right-radius': px,
|
|
4182
|
+
'border-top-width': px,
|
|
4183
|
+
'border-width': px,
|
|
4184
|
+
'border-block': px,
|
|
4185
|
+
'border-block-end': px,
|
|
4186
|
+
'border-block-end-width': px,
|
|
4187
|
+
'border-block-start': px,
|
|
4188
|
+
'border-block-start-width': px,
|
|
4189
|
+
'border-block-width': px,
|
|
4190
|
+
'border-inline': px,
|
|
4191
|
+
'border-inline-end': px,
|
|
4192
|
+
'border-inline-end-width': px,
|
|
4193
|
+
'border-inline-start': px,
|
|
4194
|
+
'border-inline-start-width': px,
|
|
4195
|
+
'border-inline-width': px,
|
|
4196
|
+
'border-start-start-radius': px,
|
|
4197
|
+
'border-start-end-radius': px,
|
|
4198
|
+
'border-end-start-radius': px,
|
|
4199
|
+
'border-end-end-radius': px,
|
|
4200
|
+
// Margin properties
|
|
4201
|
+
margin: px,
|
|
4202
|
+
'margin-bottom': px,
|
|
4203
|
+
'margin-left': px,
|
|
4204
|
+
'margin-right': px,
|
|
4205
|
+
'margin-top': px,
|
|
4206
|
+
'margin-block': px,
|
|
4207
|
+
'margin-block-end': px,
|
|
4208
|
+
'margin-block-start': px,
|
|
4209
|
+
'margin-inline': px,
|
|
4210
|
+
'margin-inline-end': px,
|
|
4211
|
+
'margin-inline-start': px,
|
|
4212
|
+
// Padding properties
|
|
4213
|
+
padding: px,
|
|
4214
|
+
'padding-bottom': px,
|
|
4215
|
+
'padding-left': px,
|
|
4216
|
+
'padding-right': px,
|
|
4217
|
+
'padding-top': px,
|
|
4218
|
+
'padding-block': px,
|
|
4219
|
+
'padding-block-end': px,
|
|
4220
|
+
'padding-block-start': px,
|
|
4221
|
+
'padding-inline': px,
|
|
4222
|
+
'padding-inline-end': px,
|
|
4223
|
+
'padding-inline-start': px,
|
|
4224
|
+
// Mask properties
|
|
4225
|
+
'mask-position-x': px,
|
|
4226
|
+
'mask-position-y': px,
|
|
4227
|
+
'mask-size': px,
|
|
4228
|
+
// Width and height properties
|
|
4229
|
+
height: px,
|
|
4230
|
+
width: px,
|
|
4231
|
+
'min-height': px,
|
|
4232
|
+
'max-height': px,
|
|
4233
|
+
'min-width': px,
|
|
4234
|
+
'max-width': px,
|
|
4235
|
+
// Position properties
|
|
4236
|
+
bottom: px,
|
|
4237
|
+
left: px,
|
|
4238
|
+
top: px,
|
|
4239
|
+
right: px,
|
|
4240
|
+
inset: px,
|
|
4241
|
+
'inset-block': px,
|
|
4242
|
+
'inset-block-end': px,
|
|
4243
|
+
'inset-block-start': px,
|
|
4244
|
+
'inset-inline': px,
|
|
4245
|
+
'inset-inline-end': px,
|
|
4246
|
+
'inset-inline-start': px,
|
|
4247
|
+
// Shadow properties
|
|
4248
|
+
'box-shadow': px,
|
|
4249
|
+
'text-shadow': px,
|
|
4250
|
+
// Column properties
|
|
4251
|
+
'column-gap': px,
|
|
4252
|
+
'column-rule': px,
|
|
4253
|
+
'column-rule-width': px,
|
|
4254
|
+
'column-width': px,
|
|
4255
|
+
// Font and text properties
|
|
4256
|
+
'font-size': px,
|
|
4257
|
+
'font-size-delta': px,
|
|
4258
|
+
'letter-spacing': px,
|
|
4259
|
+
'text-decoration-thickness': px,
|
|
4260
|
+
'text-indent': px,
|
|
4261
|
+
'text-stroke': px,
|
|
4262
|
+
'text-stroke-width': px,
|
|
4263
|
+
'word-spacing': px,
|
|
4264
|
+
// Motion properties
|
|
4265
|
+
motion: px,
|
|
4266
|
+
'motion-offset': px,
|
|
4267
|
+
// Outline properties
|
|
4268
|
+
outline: px,
|
|
4269
|
+
'outline-offset': px,
|
|
4270
|
+
'outline-width': px,
|
|
4271
|
+
// Perspective properties
|
|
4272
|
+
perspective: px,
|
|
4273
|
+
'perspective-origin-x': percent,
|
|
4274
|
+
'perspective-origin-y': percent,
|
|
4275
|
+
// Transform properties
|
|
4276
|
+
'transform-origin': percent,
|
|
4277
|
+
'transform-origin-x': percent,
|
|
4278
|
+
'transform-origin-y': percent,
|
|
4279
|
+
'transform-origin-z': percent,
|
|
4280
|
+
// Transition properties
|
|
4281
|
+
'transition-delay': ms,
|
|
4282
|
+
'transition-duration': ms,
|
|
4283
|
+
// Alignment properties
|
|
4284
|
+
'vertical-align': px,
|
|
4285
|
+
'flex-basis': px,
|
|
4286
|
+
// Some random properties
|
|
4287
|
+
'shape-margin': px,
|
|
4288
|
+
size: px,
|
|
4289
|
+
gap: px,
|
|
4290
|
+
// Grid properties
|
|
4291
|
+
grid: px,
|
|
4292
|
+
'grid-gap': px,
|
|
4293
|
+
'row-gap': px,
|
|
4294
|
+
'grid-row-gap': px,
|
|
4295
|
+
'grid-column-gap': px,
|
|
4296
|
+
'grid-template-rows': px,
|
|
4297
|
+
'grid-template-columns': px,
|
|
4298
|
+
'grid-auto-rows': px,
|
|
4299
|
+
'grid-auto-columns': px,
|
|
4300
|
+
// Not existing properties.
|
|
4301
|
+
// Used to avoid issues with jss-plugin-expand integration.
|
|
4302
|
+
'box-shadow-x': px,
|
|
4303
|
+
'box-shadow-y': px,
|
|
4304
|
+
'box-shadow-blur': px,
|
|
4305
|
+
'box-shadow-spread': px,
|
|
4306
|
+
'font-line-height': px,
|
|
4307
|
+
'text-shadow-x': px,
|
|
4308
|
+
'text-shadow-y': px,
|
|
4309
|
+
'text-shadow-blur': px
|
|
4310
|
+
};
|
|
4311
|
+
|
|
4000
4312
|
/**
|
|
4001
|
-
*
|
|
4313
|
+
* Clones the object and adds a camel cased property version.
|
|
4002
4314
|
*/
|
|
4003
4315
|
|
|
4316
|
+
function addCamelCasedVersion(obj) {
|
|
4317
|
+
var regExp = /(-[a-z])/g;
|
|
4004
4318
|
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
if (typeof value[prop] !== 'undefined' && (isFallback || !rule.prop(propName))) {
|
|
4010
|
-
var _styleDetector;
|
|
4011
|
-
|
|
4012
|
-
var appendedValue = styleDetector((_styleDetector = {}, _styleDetector[propName] = value[prop], _styleDetector), rule)[propName]; // Add style directly in rule
|
|
4013
|
-
|
|
4014
|
-
if (isFallback) rule.style.fallbacks[propName] = appendedValue;else rule.style[propName] = appendedValue;
|
|
4015
|
-
} // Delete converted property to avoid double converting
|
|
4319
|
+
var replace = function replace(str) {
|
|
4320
|
+
return str[1].toUpperCase();
|
|
4321
|
+
};
|
|
4016
4322
|
|
|
4323
|
+
var newObj = {};
|
|
4017
4324
|
|
|
4018
|
-
|
|
4325
|
+
for (var key in obj) {
|
|
4326
|
+
newObj[key] = obj[key];
|
|
4327
|
+
newObj[key.replace(regExp, replace)] = obj[key];
|
|
4019
4328
|
}
|
|
4020
4329
|
|
|
4021
|
-
return
|
|
4330
|
+
return newObj;
|
|
4022
4331
|
}
|
|
4332
|
+
|
|
4333
|
+
var units = addCamelCasedVersion(defaultUnits);
|
|
4023
4334
|
/**
|
|
4024
|
-
*
|
|
4335
|
+
* Recursive deep style passing function
|
|
4025
4336
|
*/
|
|
4026
4337
|
|
|
4338
|
+
function iterate(prop, value, options) {
|
|
4339
|
+
if (value == null) return value;
|
|
4027
4340
|
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
for (var index = 0; index < style.fallbacks.length; index++) {
|
|
4037
|
-
style.fallbacks[index] = styleDetector(style.fallbacks[index], rule, true);
|
|
4038
|
-
}
|
|
4039
|
-
|
|
4040
|
-
continue;
|
|
4041
|
-
}
|
|
4042
|
-
|
|
4043
|
-
style[prop] = processArray(value, prop, propArray, rule); // Avoid creating properties with empty values
|
|
4044
|
-
|
|
4045
|
-
if (!style[prop].length) delete style[prop];
|
|
4341
|
+
if (Array.isArray(value)) {
|
|
4342
|
+
for (var i = 0; i < value.length; i++) {
|
|
4343
|
+
value[i] = iterate(prop, value[i], options);
|
|
4344
|
+
}
|
|
4345
|
+
} else if (typeof value === 'object') {
|
|
4346
|
+
if (prop === 'fallbacks') {
|
|
4347
|
+
for (var innerProp in value) {
|
|
4348
|
+
value[innerProp] = iterate(innerProp, value[innerProp], options);
|
|
4046
4349
|
}
|
|
4047
|
-
} else
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
continue;
|
|
4350
|
+
} else {
|
|
4351
|
+
for (var _innerProp in value) {
|
|
4352
|
+
value[_innerProp] = iterate(prop + "-" + _innerProp, value[_innerProp], options);
|
|
4051
4353
|
}
|
|
4354
|
+
} // eslint-disable-next-line no-restricted-globals
|
|
4052
4355
|
|
|
4053
|
-
|
|
4356
|
+
} else if (typeof value === 'number' && isNaN(value) === false) {
|
|
4357
|
+
var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.
|
|
4054
4358
|
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4359
|
+
if (unit && !(value === 0 && unit === px)) {
|
|
4360
|
+
return typeof unit === 'function' ? unit(value).toString() : "" + value + unit;
|
|
4361
|
+
}
|
|
4362
|
+
|
|
4363
|
+
return value.toString();
|
|
4058
4364
|
}
|
|
4059
4365
|
|
|
4060
|
-
return
|
|
4366
|
+
return value;
|
|
4061
4367
|
}
|
|
4062
4368
|
/**
|
|
4063
|
-
*
|
|
4369
|
+
* Add unit to numeric values.
|
|
4064
4370
|
*/
|
|
4065
4371
|
|
|
4066
4372
|
|
|
4067
|
-
function
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
if (Array.isArray(style)) {
|
|
4072
|
-
// Pass rules one by one and reformat them
|
|
4073
|
-
for (var index = 0; index < style.length; index++) {
|
|
4074
|
-
style[index] = styleDetector(style[index], rule);
|
|
4075
|
-
}
|
|
4076
|
-
|
|
4077
|
-
return style;
|
|
4078
|
-
}
|
|
4079
|
-
|
|
4080
|
-
return styleDetector(style, rule);
|
|
4373
|
+
function defaultUnit(options) {
|
|
4374
|
+
if (options === void 0) {
|
|
4375
|
+
options = {};
|
|
4081
4376
|
}
|
|
4082
4377
|
|
|
4083
|
-
|
|
4084
|
-
onProcessStyle: onProcessStyle
|
|
4085
|
-
};
|
|
4086
|
-
}
|
|
4087
|
-
|
|
4088
|
-
var cssVendor_cjs = {};
|
|
4089
|
-
|
|
4090
|
-
var require$$0 = /*@__PURE__*/getAugmentedNamespace(module$1);
|
|
4091
|
-
|
|
4092
|
-
var toConsumableArray = {exports: {}};
|
|
4093
|
-
|
|
4094
|
-
var arrayWithoutHoles = {exports: {}};
|
|
4095
|
-
|
|
4096
|
-
var arrayLikeToArray = {exports: {}};
|
|
4097
|
-
|
|
4098
|
-
(function (module) {
|
|
4099
|
-
function _arrayLikeToArray(arr, len) {
|
|
4100
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
4101
|
-
|
|
4102
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
4103
|
-
arr2[i] = arr[i];
|
|
4104
|
-
}
|
|
4105
|
-
|
|
4106
|
-
return arr2;
|
|
4107
|
-
}
|
|
4108
|
-
|
|
4109
|
-
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4110
|
-
} (arrayLikeToArray));
|
|
4111
|
-
|
|
4112
|
-
(function (module) {
|
|
4113
|
-
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
4114
|
-
|
|
4115
|
-
function _arrayWithoutHoles(arr) {
|
|
4116
|
-
if (Array.isArray(arr)) return arrayLikeToArray$1(arr);
|
|
4117
|
-
}
|
|
4118
|
-
|
|
4119
|
-
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4120
|
-
} (arrayWithoutHoles));
|
|
4121
|
-
|
|
4122
|
-
var iterableToArray = {exports: {}};
|
|
4123
|
-
|
|
4124
|
-
(function (module) {
|
|
4125
|
-
function _iterableToArray(iter) {
|
|
4126
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
4127
|
-
}
|
|
4128
|
-
|
|
4129
|
-
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4130
|
-
} (iterableToArray));
|
|
4131
|
-
|
|
4132
|
-
var unsupportedIterableToArray = {exports: {}};
|
|
4133
|
-
|
|
4134
|
-
(function (module) {
|
|
4135
|
-
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
4136
|
-
|
|
4137
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
4138
|
-
if (!o) return;
|
|
4139
|
-
if (typeof o === "string") return arrayLikeToArray$1(o, minLen);
|
|
4140
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4141
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
4142
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
4143
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray$1(o, minLen);
|
|
4144
|
-
}
|
|
4145
|
-
|
|
4146
|
-
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4147
|
-
} (unsupportedIterableToArray));
|
|
4148
|
-
|
|
4149
|
-
var nonIterableSpread = {exports: {}};
|
|
4150
|
-
|
|
4151
|
-
(function (module) {
|
|
4152
|
-
function _nonIterableSpread() {
|
|
4153
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4154
|
-
}
|
|
4155
|
-
|
|
4156
|
-
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4157
|
-
} (nonIterableSpread));
|
|
4158
|
-
|
|
4159
|
-
(function (module) {
|
|
4160
|
-
var arrayWithoutHoles$1 = arrayWithoutHoles.exports;
|
|
4161
|
-
|
|
4162
|
-
var iterableToArray$1 = iterableToArray.exports;
|
|
4163
|
-
|
|
4164
|
-
var unsupportedIterableToArray$1 = unsupportedIterableToArray.exports;
|
|
4165
|
-
|
|
4166
|
-
var nonIterableSpread$1 = nonIterableSpread.exports;
|
|
4167
|
-
|
|
4168
|
-
function _toConsumableArray(arr) {
|
|
4169
|
-
return arrayWithoutHoles$1(arr) || iterableToArray$1(arr) || unsupportedIterableToArray$1(arr) || nonIterableSpread$1();
|
|
4170
|
-
}
|
|
4171
|
-
|
|
4172
|
-
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4173
|
-
} (toConsumableArray));
|
|
4174
|
-
|
|
4175
|
-
Object.defineProperty(cssVendor_cjs, '__esModule', { value: true });
|
|
4176
|
-
|
|
4177
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4178
|
-
|
|
4179
|
-
var isInBrowser = _interopDefault(require$$0);
|
|
4180
|
-
var _toConsumableArray = _interopDefault(toConsumableArray.exports);
|
|
4181
|
-
|
|
4182
|
-
// Export javascript style and css style vendor prefixes.
|
|
4183
|
-
var js = '';
|
|
4184
|
-
var css = '';
|
|
4185
|
-
var vendor = '';
|
|
4186
|
-
var browser = '';
|
|
4187
|
-
var isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.
|
|
4188
|
-
|
|
4189
|
-
if (isInBrowser) {
|
|
4190
|
-
// Order matters. We need to check Webkit the last one because
|
|
4191
|
-
// other vendors use to add Webkit prefixes to some properties
|
|
4192
|
-
var jsCssMap = {
|
|
4193
|
-
Moz: '-moz-',
|
|
4194
|
-
ms: '-ms-',
|
|
4195
|
-
O: '-o-',
|
|
4196
|
-
Webkit: '-webkit-'
|
|
4197
|
-
};
|
|
4198
|
-
|
|
4199
|
-
var _document$createEleme = document.createElement('p'),
|
|
4200
|
-
style = _document$createEleme.style;
|
|
4378
|
+
var camelCasedOptions = addCamelCasedVersion(options);
|
|
4201
4379
|
|
|
4202
|
-
|
|
4380
|
+
function onProcessStyle(style, rule) {
|
|
4381
|
+
if (rule.type !== 'style') return style;
|
|
4203
4382
|
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
js = key;
|
|
4207
|
-
css = jsCssMap[key];
|
|
4208
|
-
break;
|
|
4383
|
+
for (var prop in style) {
|
|
4384
|
+
style[prop] = iterate(prop, style[prop], camelCasedOptions);
|
|
4209
4385
|
}
|
|
4210
|
-
} // Correctly detect the Edge browser.
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
if (js === 'Webkit' && 'msHyphens' in style) {
|
|
4214
|
-
js = 'ms';
|
|
4215
|
-
css = jsCssMap.ms;
|
|
4216
|
-
browser = 'edge';
|
|
4217
|
-
} // Correctly detect the Safari browser.
|
|
4218
|
-
|
|
4219
4386
|
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
}
|
|
4223
|
-
}
|
|
4224
|
-
/**
|
|
4225
|
-
* Vendor prefix string for the current browser.
|
|
4226
|
-
*
|
|
4227
|
-
* @type {{js: String, css: String, vendor: String, browser: String}}
|
|
4228
|
-
* @api public
|
|
4229
|
-
*/
|
|
4387
|
+
return style;
|
|
4388
|
+
}
|
|
4230
4389
|
|
|
4390
|
+
function onChangeValue(value, prop) {
|
|
4391
|
+
return iterate(prop, value, camelCasedOptions);
|
|
4392
|
+
}
|
|
4231
4393
|
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
isTouch: isTouch
|
|
4238
|
-
};
|
|
4394
|
+
return {
|
|
4395
|
+
onProcessStyle: onProcessStyle,
|
|
4396
|
+
onChangeValue: onChangeValue
|
|
4397
|
+
};
|
|
4398
|
+
}
|
|
4239
4399
|
|
|
4240
4400
|
/**
|
|
4241
|
-
*
|
|
4242
|
-
*
|
|
4243
|
-
* @param {String} vendor prefix string for the current browser.
|
|
4244
|
-
* @return {String}
|
|
4245
|
-
* @api public
|
|
4401
|
+
* A scheme for converting properties from array to regular style.
|
|
4402
|
+
* All properties listed below will be transformed to a string separated by space.
|
|
4246
4403
|
*/
|
|
4404
|
+
var propArray = {
|
|
4405
|
+
'background-size': true,
|
|
4406
|
+
'background-position': true,
|
|
4407
|
+
border: true,
|
|
4408
|
+
'border-bottom': true,
|
|
4409
|
+
'border-left': true,
|
|
4410
|
+
'border-top': true,
|
|
4411
|
+
'border-right': true,
|
|
4412
|
+
'border-radius': true,
|
|
4413
|
+
'border-image': true,
|
|
4414
|
+
'border-width': true,
|
|
4415
|
+
'border-style': true,
|
|
4416
|
+
'border-color': true,
|
|
4417
|
+
'box-shadow': true,
|
|
4418
|
+
flex: true,
|
|
4419
|
+
margin: true,
|
|
4420
|
+
padding: true,
|
|
4421
|
+
outline: true,
|
|
4422
|
+
'transform-origin': true,
|
|
4423
|
+
transform: true,
|
|
4424
|
+
transition: true
|
|
4425
|
+
/**
|
|
4426
|
+
* A scheme for converting arrays to regular styles inside of objects.
|
|
4427
|
+
* For e.g.: "{position: [0, 0]}" => "background-position: 0 0;".
|
|
4428
|
+
*/
|
|
4247
4429
|
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
//
|
|
4252
|
-
|
|
4253
|
-
if (prefix.js === 'ms') return key;
|
|
4254
|
-
return "@" + prefix.css + "keyframes" + key.substr(10);
|
|
4255
|
-
}
|
|
4430
|
+
};
|
|
4431
|
+
var propArrayInObj = {
|
|
4432
|
+
position: true,
|
|
4433
|
+
// background-position
|
|
4434
|
+
size: true // background-size
|
|
4256
4435
|
|
|
4257
|
-
|
|
4436
|
+
/**
|
|
4437
|
+
* A scheme for parsing and building correct styles from passed objects.
|
|
4438
|
+
*/
|
|
4258
4439
|
|
|
4259
|
-
var appearence = {
|
|
4260
|
-
noPrefill: ['appearance'],
|
|
4261
|
-
supportedProperty: function supportedProperty(prop) {
|
|
4262
|
-
if (prop !== 'appearance') return false;
|
|
4263
|
-
if (prefix.js === 'ms') return "-webkit-" + prop;
|
|
4264
|
-
return prefix.css + prop;
|
|
4265
|
-
}
|
|
4266
4440
|
};
|
|
4441
|
+
var propObj = {
|
|
4442
|
+
padding: {
|
|
4443
|
+
top: 0,
|
|
4444
|
+
right: 0,
|
|
4445
|
+
bottom: 0,
|
|
4446
|
+
left: 0
|
|
4447
|
+
},
|
|
4448
|
+
margin: {
|
|
4449
|
+
top: 0,
|
|
4450
|
+
right: 0,
|
|
4451
|
+
bottom: 0,
|
|
4452
|
+
left: 0
|
|
4453
|
+
},
|
|
4454
|
+
background: {
|
|
4455
|
+
attachment: null,
|
|
4456
|
+
color: null,
|
|
4457
|
+
image: null,
|
|
4458
|
+
position: null,
|
|
4459
|
+
repeat: null
|
|
4460
|
+
},
|
|
4461
|
+
border: {
|
|
4462
|
+
width: null,
|
|
4463
|
+
style: null,
|
|
4464
|
+
color: null
|
|
4465
|
+
},
|
|
4466
|
+
'border-top': {
|
|
4467
|
+
width: null,
|
|
4468
|
+
style: null,
|
|
4469
|
+
color: null
|
|
4470
|
+
},
|
|
4471
|
+
'border-right': {
|
|
4472
|
+
width: null,
|
|
4473
|
+
style: null,
|
|
4474
|
+
color: null
|
|
4475
|
+
},
|
|
4476
|
+
'border-bottom': {
|
|
4477
|
+
width: null,
|
|
4478
|
+
style: null,
|
|
4479
|
+
color: null
|
|
4480
|
+
},
|
|
4481
|
+
'border-left': {
|
|
4482
|
+
width: null,
|
|
4483
|
+
style: null,
|
|
4484
|
+
color: null
|
|
4485
|
+
},
|
|
4486
|
+
outline: {
|
|
4487
|
+
width: null,
|
|
4488
|
+
style: null,
|
|
4489
|
+
color: null
|
|
4490
|
+
},
|
|
4491
|
+
'list-style': {
|
|
4492
|
+
type: null,
|
|
4493
|
+
position: null,
|
|
4494
|
+
image: null
|
|
4495
|
+
},
|
|
4496
|
+
transition: {
|
|
4497
|
+
property: null,
|
|
4498
|
+
duration: null,
|
|
4499
|
+
'timing-function': null,
|
|
4500
|
+
timingFunction: null,
|
|
4501
|
+
// Needed for avoiding comilation issues with jss-plugin-camel-case
|
|
4502
|
+
delay: null
|
|
4503
|
+
},
|
|
4504
|
+
animation: {
|
|
4505
|
+
name: null,
|
|
4506
|
+
duration: null,
|
|
4507
|
+
'timing-function': null,
|
|
4508
|
+
timingFunction: null,
|
|
4509
|
+
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4510
|
+
delay: null,
|
|
4511
|
+
'iteration-count': null,
|
|
4512
|
+
iterationCount: null,
|
|
4513
|
+
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4514
|
+
direction: null,
|
|
4515
|
+
'fill-mode': null,
|
|
4516
|
+
fillMode: null,
|
|
4517
|
+
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4518
|
+
'play-state': null,
|
|
4519
|
+
playState: null // Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4267
4520
|
|
|
4268
|
-
|
|
4521
|
+
},
|
|
4522
|
+
'box-shadow': {
|
|
4523
|
+
x: 0,
|
|
4524
|
+
y: 0,
|
|
4525
|
+
blur: 0,
|
|
4526
|
+
spread: 0,
|
|
4527
|
+
color: null,
|
|
4528
|
+
inset: null
|
|
4529
|
+
},
|
|
4530
|
+
'text-shadow': {
|
|
4531
|
+
x: 0,
|
|
4532
|
+
y: 0,
|
|
4533
|
+
blur: null,
|
|
4534
|
+
color: null
|
|
4535
|
+
}
|
|
4536
|
+
/**
|
|
4537
|
+
* A scheme for converting non-standart properties inside object.
|
|
4538
|
+
* For e.g.: include 'border-radius' property inside 'border' object.
|
|
4539
|
+
*/
|
|
4269
4540
|
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4541
|
+
};
|
|
4542
|
+
var customPropObj = {
|
|
4543
|
+
border: {
|
|
4544
|
+
radius: 'border-radius',
|
|
4545
|
+
image: 'border-image',
|
|
4546
|
+
width: 'border-width',
|
|
4547
|
+
style: 'border-style',
|
|
4548
|
+
color: 'border-color'
|
|
4549
|
+
},
|
|
4550
|
+
'border-bottom': {
|
|
4551
|
+
width: 'border-bottom-width',
|
|
4552
|
+
style: 'border-bottom-style',
|
|
4553
|
+
color: 'border-bottom-color'
|
|
4554
|
+
},
|
|
4555
|
+
'border-top': {
|
|
4556
|
+
width: 'border-top-width',
|
|
4557
|
+
style: 'border-top-style',
|
|
4558
|
+
color: 'border-top-color'
|
|
4559
|
+
},
|
|
4560
|
+
'border-left': {
|
|
4561
|
+
width: 'border-left-width',
|
|
4562
|
+
style: 'border-left-style',
|
|
4563
|
+
color: 'border-left-color'
|
|
4564
|
+
},
|
|
4565
|
+
'border-right': {
|
|
4566
|
+
width: 'border-right-width',
|
|
4567
|
+
style: 'border-right-style',
|
|
4568
|
+
color: 'border-right-color'
|
|
4569
|
+
},
|
|
4570
|
+
background: {
|
|
4571
|
+
size: 'background-size',
|
|
4572
|
+
image: 'background-image'
|
|
4573
|
+
},
|
|
4574
|
+
font: {
|
|
4575
|
+
style: 'font-style',
|
|
4576
|
+
variant: 'font-variant',
|
|
4577
|
+
weight: 'font-weight',
|
|
4578
|
+
stretch: 'font-stretch',
|
|
4579
|
+
size: 'font-size',
|
|
4580
|
+
family: 'font-family',
|
|
4581
|
+
lineHeight: 'line-height',
|
|
4582
|
+
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4583
|
+
'line-height': 'line-height'
|
|
4584
|
+
},
|
|
4585
|
+
flex: {
|
|
4586
|
+
grow: 'flex-grow',
|
|
4587
|
+
basis: 'flex-basis',
|
|
4588
|
+
direction: 'flex-direction',
|
|
4589
|
+
wrap: 'flex-wrap',
|
|
4590
|
+
flow: 'flex-flow',
|
|
4591
|
+
shrink: 'flex-shrink'
|
|
4592
|
+
},
|
|
4593
|
+
align: {
|
|
4594
|
+
self: 'align-self',
|
|
4595
|
+
items: 'align-items',
|
|
4596
|
+
content: 'align-content'
|
|
4597
|
+
},
|
|
4598
|
+
grid: {
|
|
4599
|
+
'template-columns': 'grid-template-columns',
|
|
4600
|
+
templateColumns: 'grid-template-columns',
|
|
4601
|
+
'template-rows': 'grid-template-rows',
|
|
4602
|
+
templateRows: 'grid-template-rows',
|
|
4603
|
+
'template-areas': 'grid-template-areas',
|
|
4604
|
+
templateAreas: 'grid-template-areas',
|
|
4605
|
+
template: 'grid-template',
|
|
4606
|
+
'auto-columns': 'grid-auto-columns',
|
|
4607
|
+
autoColumns: 'grid-auto-columns',
|
|
4608
|
+
'auto-rows': 'grid-auto-rows',
|
|
4609
|
+
autoRows: 'grid-auto-rows',
|
|
4610
|
+
'auto-flow': 'grid-auto-flow',
|
|
4611
|
+
autoFlow: 'grid-auto-flow',
|
|
4612
|
+
row: 'grid-row',
|
|
4613
|
+
column: 'grid-column',
|
|
4614
|
+
'row-start': 'grid-row-start',
|
|
4615
|
+
rowStart: 'grid-row-start',
|
|
4616
|
+
'row-end': 'grid-row-end',
|
|
4617
|
+
rowEnd: 'grid-row-end',
|
|
4618
|
+
'column-start': 'grid-column-start',
|
|
4619
|
+
columnStart: 'grid-column-start',
|
|
4620
|
+
'column-end': 'grid-column-end',
|
|
4621
|
+
columnEnd: 'grid-column-end',
|
|
4622
|
+
area: 'grid-area',
|
|
4623
|
+
gap: 'grid-gap',
|
|
4624
|
+
'row-gap': 'grid-row-gap',
|
|
4625
|
+
rowGap: 'grid-row-gap',
|
|
4626
|
+
'column-gap': 'grid-column-gap',
|
|
4627
|
+
columnGap: 'grid-column-gap'
|
|
4276
4628
|
}
|
|
4277
4629
|
};
|
|
4278
4630
|
|
|
4279
|
-
|
|
4280
|
-
/**
|
|
4281
|
-
* Replaces the letter with the capital letter
|
|
4282
|
-
*
|
|
4283
|
-
* @param {String} match
|
|
4284
|
-
* @param {String} c
|
|
4285
|
-
* @return {String}
|
|
4286
|
-
* @api private
|
|
4287
|
-
*/
|
|
4288
|
-
|
|
4289
|
-
function toUpper(match, c) {
|
|
4290
|
-
return c ? c.toUpperCase() : '';
|
|
4291
|
-
}
|
|
4631
|
+
/* eslint-disable no-use-before-define */
|
|
4292
4632
|
/**
|
|
4293
|
-
*
|
|
4633
|
+
* Map values by given prop.
|
|
4294
4634
|
*
|
|
4295
|
-
* @param {
|
|
4296
|
-
* @
|
|
4297
|
-
* @
|
|
4635
|
+
* @param {Array} array of values
|
|
4636
|
+
* @param {String} original property
|
|
4637
|
+
* @param {String} original rule
|
|
4638
|
+
* @return {String} mapped values
|
|
4298
4639
|
*/
|
|
4299
4640
|
|
|
4300
|
-
|
|
4301
|
-
function
|
|
4302
|
-
|
|
4641
|
+
function mapValuesByProp(value, prop, rule) {
|
|
4642
|
+
return value.map(function (item) {
|
|
4643
|
+
return objectToArray(item, prop, rule, false, true);
|
|
4644
|
+
});
|
|
4303
4645
|
}
|
|
4304
|
-
|
|
4305
4646
|
/**
|
|
4306
|
-
* Convert
|
|
4307
|
-
*
|
|
4308
|
-
* @param {String} str
|
|
4309
|
-
* @return {String}
|
|
4310
|
-
* @api private
|
|
4647
|
+
* Convert array to nested array, if needed
|
|
4311
4648
|
*/
|
|
4312
4649
|
|
|
4313
|
-
function pascalize(str) {
|
|
4314
|
-
return camelize("-" + str);
|
|
4315
|
-
}
|
|
4316
|
-
|
|
4317
|
-
// but we can use a longhand property instead.
|
|
4318
|
-
// https://caniuse.com/#search=mask
|
|
4319
|
-
|
|
4320
|
-
var mask = {
|
|
4321
|
-
noPrefill: ['mask'],
|
|
4322
|
-
supportedProperty: function supportedProperty(prop, style) {
|
|
4323
|
-
if (!/^mask/.test(prop)) return false;
|
|
4324
|
-
|
|
4325
|
-
if (prefix.js === 'Webkit') {
|
|
4326
|
-
var longhand = 'mask-image';
|
|
4327
|
-
|
|
4328
|
-
if (camelize(longhand) in style) {
|
|
4329
|
-
return prop;
|
|
4330
|
-
}
|
|
4331
4650
|
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4651
|
+
function processArray(value, prop, scheme, rule) {
|
|
4652
|
+
if (scheme[prop] == null) return value;
|
|
4653
|
+
if (value.length === 0) return [];
|
|
4654
|
+
if (Array.isArray(value[0])) return processArray(value[0], prop, scheme, rule);
|
|
4336
4655
|
|
|
4337
|
-
|
|
4656
|
+
if (typeof value[0] === 'object') {
|
|
4657
|
+
return mapValuesByProp(value, prop, rule);
|
|
4338
4658
|
}
|
|
4339
|
-
};
|
|
4340
|
-
|
|
4341
|
-
// https://caniuse.com/#search=text-orientation
|
|
4342
|
-
|
|
4343
|
-
var textOrientation = {
|
|
4344
|
-
noPrefill: ['text-orientation'],
|
|
4345
|
-
supportedProperty: function supportedProperty(prop) {
|
|
4346
|
-
if (prop !== 'text-orientation') return false;
|
|
4347
4659
|
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4660
|
+
return [value];
|
|
4661
|
+
}
|
|
4662
|
+
/**
|
|
4663
|
+
* Convert object to array.
|
|
4664
|
+
*/
|
|
4351
4665
|
|
|
4352
|
-
return prop;
|
|
4353
|
-
}
|
|
4354
|
-
};
|
|
4355
4666
|
|
|
4356
|
-
|
|
4667
|
+
function objectToArray(value, prop, rule, isFallback, isInArray) {
|
|
4668
|
+
if (!(propObj[prop] || customPropObj[prop])) return [];
|
|
4669
|
+
var result = []; // Check if exists any non-standard property
|
|
4357
4670
|
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4671
|
+
if (customPropObj[prop]) {
|
|
4672
|
+
// eslint-disable-next-line no-param-reassign
|
|
4673
|
+
value = customPropsToStyle(value, rule, customPropObj[prop], isFallback);
|
|
4674
|
+
} // Pass throught all standart props
|
|
4362
4675
|
|
|
4363
|
-
if (options.transform) {
|
|
4364
|
-
return prop;
|
|
4365
|
-
}
|
|
4366
4676
|
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4677
|
+
if (Object.keys(value).length) {
|
|
4678
|
+
for (var baseProp in propObj[prop]) {
|
|
4679
|
+
if (value[baseProp]) {
|
|
4680
|
+
if (Array.isArray(value[baseProp])) {
|
|
4681
|
+
result.push(propArrayInObj[baseProp] === null ? value[baseProp] : value[baseProp].join(' '));
|
|
4682
|
+
} else result.push(value[baseProp]);
|
|
4370
4683
|
|
|
4371
|
-
|
|
4684
|
+
continue;
|
|
4685
|
+
} // Add default value from props config.
|
|
4372
4686
|
|
|
4373
|
-
var transition = {
|
|
4374
|
-
noPrefill: ['transition'],
|
|
4375
|
-
supportedProperty: function supportedProperty(prop, style, options) {
|
|
4376
|
-
if (prop !== 'transition') return false;
|
|
4377
4687
|
|
|
4378
|
-
|
|
4379
|
-
|
|
4688
|
+
if (propObj[prop][baseProp] != null) {
|
|
4689
|
+
result.push(propObj[prop][baseProp]);
|
|
4690
|
+
}
|
|
4380
4691
|
}
|
|
4381
|
-
|
|
4382
|
-
return prefix.css + prop;
|
|
4383
4692
|
}
|
|
4384
|
-
};
|
|
4385
4693
|
|
|
4386
|
-
|
|
4694
|
+
if (!result.length || isInArray) return result;
|
|
4695
|
+
return [result];
|
|
4696
|
+
}
|
|
4697
|
+
/**
|
|
4698
|
+
* Convert custom properties values to styles adding them to rule directly
|
|
4699
|
+
*/
|
|
4387
4700
|
|
|
4388
|
-
var writingMode = {
|
|
4389
|
-
noPrefill: ['writing-mode'],
|
|
4390
|
-
supportedProperty: function supportedProperty(prop) {
|
|
4391
|
-
if (prop !== 'writing-mode') return false;
|
|
4392
4701
|
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4702
|
+
function customPropsToStyle(value, rule, customProps, isFallback) {
|
|
4703
|
+
for (var prop in customProps) {
|
|
4704
|
+
var propName = customProps[prop]; // If current property doesn't exist already in rule - add new one
|
|
4396
4705
|
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
};
|
|
4706
|
+
if (typeof value[prop] !== 'undefined' && (isFallback || !rule.prop(propName))) {
|
|
4707
|
+
var _styleDetector;
|
|
4400
4708
|
|
|
4401
|
-
//
|
|
4709
|
+
var appendedValue = styleDetector((_styleDetector = {}, _styleDetector[propName] = value[prop], _styleDetector), rule)[propName]; // Add style directly in rule
|
|
4402
4710
|
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
supportedProperty: function supportedProperty(prop) {
|
|
4406
|
-
if (prop !== 'user-select') return false;
|
|
4711
|
+
if (isFallback) rule.style.fallbacks[propName] = appendedValue;else rule.style[propName] = appendedValue;
|
|
4712
|
+
} // Delete converted property to avoid double converting
|
|
4407
4713
|
|
|
4408
|
-
if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {
|
|
4409
|
-
return prefix.css + prop;
|
|
4410
|
-
}
|
|
4411
4714
|
|
|
4412
|
-
|
|
4715
|
+
delete value[prop];
|
|
4413
4716
|
}
|
|
4414
|
-
};
|
|
4415
|
-
|
|
4416
|
-
// https://caniuse.com/#search=multicolumn
|
|
4417
|
-
// https://github.com/postcss/autoprefixer/issues/491
|
|
4418
|
-
// https://github.com/postcss/autoprefixer/issues/177
|
|
4419
4717
|
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4718
|
+
return value;
|
|
4719
|
+
}
|
|
4720
|
+
/**
|
|
4721
|
+
* Detect if a style needs to be converted.
|
|
4722
|
+
*/
|
|
4423
4723
|
|
|
4424
|
-
if (prefix.js === 'Webkit') {
|
|
4425
|
-
var jsProp = "WebkitColumn" + pascalize(prop);
|
|
4426
|
-
return jsProp in style ? prefix.css + "column-" + prop : false;
|
|
4427
|
-
}
|
|
4428
4724
|
|
|
4429
|
-
|
|
4430
|
-
|
|
4725
|
+
function styleDetector(style, rule, isFallback) {
|
|
4726
|
+
for (var prop in style) {
|
|
4727
|
+
var value = style[prop];
|
|
4431
4728
|
|
|
4432
|
-
|
|
4433
|
-
|
|
4729
|
+
if (Array.isArray(value)) {
|
|
4730
|
+
// Check double arrays to avoid recursion.
|
|
4731
|
+
if (!Array.isArray(value[0])) {
|
|
4732
|
+
if (prop === 'fallbacks') {
|
|
4733
|
+
for (var index = 0; index < style.fallbacks.length; index++) {
|
|
4734
|
+
style.fallbacks[index] = styleDetector(style.fallbacks[index], rule, true);
|
|
4735
|
+
}
|
|
4434
4736
|
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
};
|
|
4737
|
+
continue;
|
|
4738
|
+
}
|
|
4438
4739
|
|
|
4439
|
-
//
|
|
4740
|
+
style[prop] = processArray(value, prop, propArray, rule); // Avoid creating properties with empty values
|
|
4440
4741
|
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
if (
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
};
|
|
4742
|
+
if (!style[prop].length) delete style[prop];
|
|
4743
|
+
}
|
|
4744
|
+
} else if (typeof value === 'object') {
|
|
4745
|
+
if (prop === 'fallbacks') {
|
|
4746
|
+
style.fallbacks = styleDetector(style.fallbacks, rule, true);
|
|
4747
|
+
continue;
|
|
4748
|
+
}
|
|
4449
4749
|
|
|
4450
|
-
|
|
4451
|
-
// CSS syntax for e.g. in FF.
|
|
4750
|
+
style[prop] = objectToArray(value, prop, rule, isFallback); // Avoid creating properties with empty values
|
|
4452
4751
|
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4752
|
+
if (!style[prop].length) delete style[prop];
|
|
4753
|
+
} // Maybe a computed value resulting in an empty string
|
|
4754
|
+
else if (style[prop] === '') delete style[prop];
|
|
4456
4755
|
}
|
|
4457
|
-
};
|
|
4458
|
-
|
|
4459
|
-
var prefixed = {
|
|
4460
|
-
supportedProperty: function supportedProperty(prop, style) {
|
|
4461
|
-
var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.
|
|
4462
|
-
|
|
4463
|
-
if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.
|
|
4464
|
-
|
|
4465
|
-
if (prop[0] === '-' && prop[1] === '-') return prop;
|
|
4466
|
-
if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.
|
|
4467
4756
|
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4757
|
+
return style;
|
|
4758
|
+
}
|
|
4759
|
+
/**
|
|
4760
|
+
* Adds possibility to write expanded styles.
|
|
4761
|
+
*/
|
|
4472
4762
|
|
|
4473
|
-
// https://caniuse.com/#search=scroll-snap
|
|
4474
4763
|
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
if (
|
|
4764
|
+
function jssExpand() {
|
|
4765
|
+
function onProcessStyle(style, rule) {
|
|
4766
|
+
if (!style || rule.type !== 'style') return style;
|
|
4478
4767
|
|
|
4479
|
-
if (
|
|
4480
|
-
|
|
4768
|
+
if (Array.isArray(style)) {
|
|
4769
|
+
// Pass rules one by one and reformat them
|
|
4770
|
+
for (var index = 0; index < style.length; index++) {
|
|
4771
|
+
style[index] = styleDetector(style[index], rule);
|
|
4772
|
+
}
|
|
4773
|
+
|
|
4774
|
+
return style;
|
|
4481
4775
|
}
|
|
4482
4776
|
|
|
4483
|
-
return
|
|
4777
|
+
return styleDetector(style, rule);
|
|
4484
4778
|
}
|
|
4485
|
-
};
|
|
4486
4779
|
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
if (prop !== 'overscroll-behavior') return false;
|
|
4780
|
+
return {
|
|
4781
|
+
onProcessStyle: onProcessStyle
|
|
4782
|
+
};
|
|
4783
|
+
}
|
|
4492
4784
|
|
|
4493
|
-
|
|
4494
|
-
return prefix.css + "scroll-chaining";
|
|
4495
|
-
}
|
|
4785
|
+
var cssVendor_cjs = {};
|
|
4496
4786
|
|
|
4497
|
-
|
|
4498
|
-
}
|
|
4499
|
-
};
|
|
4787
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(module$1);
|
|
4500
4788
|
|
|
4501
|
-
var
|
|
4502
|
-
'flex-grow': 'flex-positive',
|
|
4503
|
-
'flex-shrink': 'flex-negative',
|
|
4504
|
-
'flex-basis': 'flex-preferred-size',
|
|
4505
|
-
'justify-content': 'flex-pack',
|
|
4506
|
-
order: 'flex-order',
|
|
4507
|
-
'align-items': 'flex-align',
|
|
4508
|
-
'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.
|
|
4789
|
+
var toConsumableArray = {exports: {}};
|
|
4509
4790
|
|
|
4510
|
-
|
|
4791
|
+
var arrayWithoutHoles = {exports: {}};
|
|
4511
4792
|
|
|
4512
|
-
var
|
|
4513
|
-
supportedProperty: function supportedProperty(prop, style) {
|
|
4514
|
-
var newProp = propMap[prop];
|
|
4515
|
-
if (!newProp) return false;
|
|
4516
|
-
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;
|
|
4517
|
-
}
|
|
4518
|
-
};
|
|
4793
|
+
var arrayLikeToArray = {exports: {}};
|
|
4519
4794
|
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4795
|
+
(function (module) {
|
|
4796
|
+
function _arrayLikeToArray(arr, len) {
|
|
4797
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
4798
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
4799
|
+
arr2[i] = arr[i];
|
|
4800
|
+
}
|
|
4801
|
+
return arr2;
|
|
4802
|
+
}
|
|
4803
|
+
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4804
|
+
} (arrayLikeToArray));
|
|
4530
4805
|
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4806
|
+
(function (module) {
|
|
4807
|
+
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
4808
|
+
function _arrayWithoutHoles(arr) {
|
|
4809
|
+
if (Array.isArray(arr)) return arrayLikeToArray$1(arr);
|
|
4810
|
+
}
|
|
4811
|
+
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4812
|
+
} (arrayWithoutHoles));
|
|
4534
4813
|
|
|
4814
|
+
var iterableToArray = {exports: {}};
|
|
4535
4815
|
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4816
|
+
(function (module) {
|
|
4817
|
+
function _iterableToArray(iter) {
|
|
4818
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
4819
|
+
}
|
|
4820
|
+
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4821
|
+
} (iterableToArray));
|
|
4539
4822
|
|
|
4540
|
-
|
|
4541
|
-
var newProp = propMap$1[prop];
|
|
4823
|
+
var unsupportedIterableToArray = {exports: {}};
|
|
4542
4824
|
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4825
|
+
(function (module) {
|
|
4826
|
+
var arrayLikeToArray$1 = arrayLikeToArray.exports;
|
|
4827
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
4828
|
+
if (!o) return;
|
|
4829
|
+
if (typeof o === "string") return arrayLikeToArray$1(o, minLen);
|
|
4830
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4831
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
4832
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
4833
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray$1(o, minLen);
|
|
4834
|
+
}
|
|
4835
|
+
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4836
|
+
} (unsupportedIterableToArray));
|
|
4546
4837
|
|
|
4547
|
-
|
|
4838
|
+
var nonIterableSpread = {exports: {}};
|
|
4548
4839
|
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4840
|
+
(function (module) {
|
|
4841
|
+
function _nonIterableSpread() {
|
|
4842
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4843
|
+
}
|
|
4844
|
+
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4845
|
+
} (nonIterableSpread));
|
|
4554
4846
|
|
|
4555
|
-
|
|
4556
|
-
|
|
4847
|
+
(function (module) {
|
|
4848
|
+
var arrayWithoutHoles$1 = arrayWithoutHoles.exports;
|
|
4849
|
+
var iterableToArray$1 = iterableToArray.exports;
|
|
4850
|
+
var unsupportedIterableToArray$1 = unsupportedIterableToArray.exports;
|
|
4851
|
+
var nonIterableSpread$1 = nonIterableSpread.exports;
|
|
4852
|
+
function _toConsumableArray(arr) {
|
|
4853
|
+
return arrayWithoutHoles$1(arr) || iterableToArray$1(arr) || unsupportedIterableToArray$1(arr) || nonIterableSpread$1();
|
|
4854
|
+
}
|
|
4855
|
+
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4856
|
+
} (toConsumableArray));
|
|
4557
4857
|
|
|
4558
|
-
|
|
4559
|
-
}
|
|
4560
|
-
};
|
|
4858
|
+
Object.defineProperty(cssVendor_cjs, '__esModule', { value: true });
|
|
4561
4859
|
|
|
4562
|
-
|
|
4563
|
-
// ...plugins,
|
|
4564
|
-
// breakPropsOld,
|
|
4565
|
-
// inlineLogicalOld,
|
|
4566
|
-
// unprefixed,
|
|
4567
|
-
// prefixed,
|
|
4568
|
-
// scrollSnap,
|
|
4569
|
-
// flex2012,
|
|
4570
|
-
// flex2009
|
|
4571
|
-
// ]
|
|
4572
|
-
// Plugins without 'noPrefill' value, going last.
|
|
4573
|
-
// 'flex-*' plugins should be at the bottom.
|
|
4574
|
-
// 'flex2009' going after 'flex2012'.
|
|
4575
|
-
// 'prefixed' going after 'unprefixed'
|
|
4860
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4576
4861
|
|
|
4577
|
-
var
|
|
4578
|
-
var
|
|
4579
|
-
return p.supportedProperty;
|
|
4580
|
-
}).map(function (p) {
|
|
4581
|
-
return p.supportedProperty;
|
|
4582
|
-
});
|
|
4583
|
-
var noPrefill = plugins.filter(function (p) {
|
|
4584
|
-
return p.noPrefill;
|
|
4585
|
-
}).reduce(function (a, p) {
|
|
4586
|
-
a.push.apply(a, _toConsumableArray(p.noPrefill));
|
|
4587
|
-
return a;
|
|
4588
|
-
}, []);
|
|
4862
|
+
var isInBrowser = _interopDefault(require$$0);
|
|
4863
|
+
var _toConsumableArray = _interopDefault(toConsumableArray.exports);
|
|
4589
4864
|
|
|
4590
|
-
|
|
4591
|
-
var
|
|
4865
|
+
// Export javascript style and css style vendor prefixes.
|
|
4866
|
+
var js = '';
|
|
4867
|
+
var css = '';
|
|
4868
|
+
var vendor = '';
|
|
4869
|
+
var browser = '';
|
|
4870
|
+
var isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.
|
|
4592
4871
|
|
|
4593
4872
|
if (isInBrowser) {
|
|
4594
|
-
|
|
4595
|
-
//
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4873
|
+
// Order matters. We need to check Webkit the last one because
|
|
4874
|
+
// other vendors use to add Webkit prefixes to some properties
|
|
4875
|
+
var jsCssMap = {
|
|
4876
|
+
Moz: '-moz-',
|
|
4877
|
+
ms: '-ms-',
|
|
4878
|
+
O: '-o-',
|
|
4879
|
+
Webkit: '-webkit-'
|
|
4880
|
+
};
|
|
4601
4881
|
|
|
4602
|
-
var
|
|
4882
|
+
var _document$createEleme = document.createElement('p'),
|
|
4883
|
+
style = _document$createEleme.style;
|
|
4603
4884
|
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4885
|
+
var testProp = 'Transform';
|
|
4886
|
+
|
|
4887
|
+
for (var key in jsCssMap) {
|
|
4888
|
+
if (key + testProp in style) {
|
|
4889
|
+
js = key;
|
|
4890
|
+
css = jsCssMap[key];
|
|
4891
|
+
break;
|
|
4892
|
+
}
|
|
4893
|
+
} // Correctly detect the Edge browser.
|
|
4609
4894
|
|
|
4610
4895
|
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4896
|
+
if (js === 'Webkit' && 'msHyphens' in style) {
|
|
4897
|
+
js = 'ms';
|
|
4898
|
+
css = jsCssMap.ms;
|
|
4899
|
+
browser = 'edge';
|
|
4900
|
+
} // Correctly detect the Safari browser.
|
|
4901
|
+
|
|
4902
|
+
|
|
4903
|
+
if (js === 'Webkit' && '-apple-trailing-word' in style) {
|
|
4904
|
+
vendor = 'apple';
|
|
4905
|
+
}
|
|
4614
4906
|
}
|
|
4615
4907
|
/**
|
|
4616
|
-
*
|
|
4617
|
-
* prefix if required. Returns `false` if not supported.
|
|
4908
|
+
* Vendor prefix string for the current browser.
|
|
4618
4909
|
*
|
|
4619
|
-
* @
|
|
4620
|
-
* @param {Object} [options]
|
|
4621
|
-
* @return {String|Boolean}
|
|
4910
|
+
* @type {{js: String, css: String, vendor: String, browser: String}}
|
|
4622
4911
|
* @api public
|
|
4623
4912
|
*/
|
|
4624
4913
|
|
|
4625
4914
|
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {
|
|
4635
|
-
return cache[prop];
|
|
4636
|
-
} // Check if 'transition' or 'transform' natively supported in browser.
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
if (prop === 'transition' || prop === 'transform') {
|
|
4640
|
-
options[prop] = prop in el.style;
|
|
4641
|
-
} // Find a plugin for current prefix property.
|
|
4915
|
+
var prefix = {
|
|
4916
|
+
js: js,
|
|
4917
|
+
css: css,
|
|
4918
|
+
vendor: vendor,
|
|
4919
|
+
browser: browser,
|
|
4920
|
+
isTouch: isTouch
|
|
4921
|
+
};
|
|
4642
4922
|
|
|
4923
|
+
/**
|
|
4924
|
+
* Test if a keyframe at-rule should be prefixed or not
|
|
4925
|
+
*
|
|
4926
|
+
* @param {String} vendor prefix string for the current browser.
|
|
4927
|
+
* @return {String}
|
|
4928
|
+
* @api public
|
|
4929
|
+
*/
|
|
4643
4930
|
|
|
4644
|
-
|
|
4645
|
-
|
|
4931
|
+
function supportedKeyframes(key) {
|
|
4932
|
+
// Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'
|
|
4933
|
+
if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.
|
|
4934
|
+
// https://caniuse.com/#search=keyframes
|
|
4646
4935
|
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4936
|
+
if (prefix.js === 'ms') return key;
|
|
4937
|
+
return "@" + prefix.css + "keyframes" + key.substr(10);
|
|
4938
|
+
}
|
|
4650
4939
|
|
|
4940
|
+
// https://caniuse.com/#search=appearance
|
|
4651
4941
|
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
return false;
|
|
4942
|
+
var appearence = {
|
|
4943
|
+
noPrefill: ['appearance'],
|
|
4944
|
+
supportedProperty: function supportedProperty(prop) {
|
|
4945
|
+
if (prop !== 'appearance') return false;
|
|
4946
|
+
if (prefix.js === 'ms') return "-webkit-" + prop;
|
|
4947
|
+
return prefix.css + prop;
|
|
4656
4948
|
}
|
|
4949
|
+
};
|
|
4657
4950
|
|
|
4658
|
-
|
|
4659
|
-
}
|
|
4951
|
+
// https://caniuse.com/#search=color-adjust
|
|
4660
4952
|
|
|
4661
|
-
var
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4953
|
+
var colorAdjust = {
|
|
4954
|
+
noPrefill: ['color-adjust'],
|
|
4955
|
+
supportedProperty: function supportedProperty(prop) {
|
|
4956
|
+
if (prop !== 'color-adjust') return false;
|
|
4957
|
+
if (prefix.js === 'Webkit') return prefix.css + "print-" + prop;
|
|
4958
|
+
return prop;
|
|
4959
|
+
}
|
|
4667
4960
|
};
|
|
4668
|
-
|
|
4669
|
-
var
|
|
4961
|
+
|
|
4962
|
+
var regExp = /[-\s]+(.)?/g;
|
|
4670
4963
|
/**
|
|
4671
|
-
*
|
|
4964
|
+
* Replaces the letter with the capital letter
|
|
4672
4965
|
*
|
|
4673
4966
|
* @param {String} match
|
|
4674
|
-
* @param {String}
|
|
4675
|
-
* @param {String} p2
|
|
4967
|
+
* @param {String} c
|
|
4676
4968
|
* @return {String}
|
|
4677
4969
|
* @api private
|
|
4678
4970
|
*/
|
|
4679
4971
|
|
|
4680
|
-
function
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4972
|
+
function toUpper(match, c) {
|
|
4973
|
+
return c ? c.toUpperCase() : '';
|
|
4974
|
+
}
|
|
4975
|
+
/**
|
|
4976
|
+
* Convert dash separated strings to camel-cased.
|
|
4977
|
+
*
|
|
4978
|
+
* @param {String} str
|
|
4979
|
+
* @return {String}
|
|
4980
|
+
* @api private
|
|
4981
|
+
*/
|
|
4982
|
+
|
|
4983
|
+
|
|
4984
|
+
function camelize(str) {
|
|
4985
|
+
return str.replace(regExp, toUpper);
|
|
4687
4986
|
}
|
|
4688
4987
|
|
|
4689
|
-
if (isInBrowser) el$1 = document.createElement('p');
|
|
4690
4988
|
/**
|
|
4691
|
-
*
|
|
4989
|
+
* Convert dash separated strings to pascal cased.
|
|
4692
4990
|
*
|
|
4693
|
-
* @param {String}
|
|
4694
|
-
* @
|
|
4695
|
-
* @
|
|
4696
|
-
* @api public
|
|
4991
|
+
* @param {String} str
|
|
4992
|
+
* @return {String}
|
|
4993
|
+
* @api private
|
|
4697
4994
|
*/
|
|
4698
4995
|
|
|
4699
|
-
function
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.
|
|
4703
|
-
// We want only prefixable values here.
|
|
4704
|
-
// eslint-disable-next-line no-restricted-globals
|
|
4996
|
+
function pascalize(str) {
|
|
4997
|
+
return camelize("-" + str);
|
|
4998
|
+
}
|
|
4705
4999
|
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
} // Create cache key for current value.
|
|
5000
|
+
// but we can use a longhand property instead.
|
|
5001
|
+
// https://caniuse.com/#search=mask
|
|
4709
5002
|
|
|
5003
|
+
var mask = {
|
|
5004
|
+
noPrefill: ['mask'],
|
|
5005
|
+
supportedProperty: function supportedProperty(prop, style) {
|
|
5006
|
+
if (!/^mask/.test(prop)) return false;
|
|
4710
5007
|
|
|
4711
|
-
|
|
5008
|
+
if (prefix.js === 'Webkit') {
|
|
5009
|
+
var longhand = 'mask-image';
|
|
4712
5010
|
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
5011
|
+
if (camelize(longhand) in style) {
|
|
5012
|
+
return prop;
|
|
5013
|
+
}
|
|
4716
5014
|
|
|
5015
|
+
if (prefix.js + pascalize(longhand) in style) {
|
|
5016
|
+
return prefix.css + prop;
|
|
5017
|
+
}
|
|
5018
|
+
}
|
|
4717
5019
|
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
} catch (err) {
|
|
4722
|
-
// Return false if value not supported.
|
|
4723
|
-
cache$1[cacheKey] = false;
|
|
4724
|
-
return false;
|
|
4725
|
-
} // If 'transition' or 'transition-property' property.
|
|
5020
|
+
return prop;
|
|
5021
|
+
}
|
|
5022
|
+
};
|
|
4726
5023
|
|
|
5024
|
+
// https://caniuse.com/#search=text-orientation
|
|
4727
5025
|
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert "flex" to "-ms-flexbox" for IE10.
|
|
5026
|
+
var textOrientation = {
|
|
5027
|
+
noPrefill: ['text-orientation'],
|
|
5028
|
+
supportedProperty: function supportedProperty(prop) {
|
|
5029
|
+
if (prop !== 'text-orientation') return false;
|
|
4733
5030
|
|
|
4734
|
-
if (
|
|
5031
|
+
if (prefix.vendor === 'apple' && !prefix.isTouch) {
|
|
5032
|
+
return prefix.css + prop;
|
|
5033
|
+
}
|
|
4735
5034
|
|
|
4736
|
-
|
|
5035
|
+
return prop;
|
|
5036
|
+
}
|
|
5037
|
+
};
|
|
4737
5038
|
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
5039
|
+
// https://caniuse.com/#search=transform
|
|
5040
|
+
|
|
5041
|
+
var transform = {
|
|
5042
|
+
noPrefill: ['transform'],
|
|
5043
|
+
supportedProperty: function supportedProperty(prop, style, options) {
|
|
5044
|
+
if (prop !== 'transform') return false;
|
|
5045
|
+
|
|
5046
|
+
if (options.transform) {
|
|
5047
|
+
return prop;
|
|
4741
5048
|
}
|
|
4742
|
-
} // Reset styles for current property.
|
|
4743
5049
|
|
|
5050
|
+
return prefix.css + prop;
|
|
5051
|
+
}
|
|
5052
|
+
};
|
|
4744
5053
|
|
|
4745
|
-
|
|
5054
|
+
// https://caniuse.com/#search=transition
|
|
4746
5055
|
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
5056
|
+
var transition = {
|
|
5057
|
+
noPrefill: ['transition'],
|
|
5058
|
+
supportedProperty: function supportedProperty(prop, style, options) {
|
|
5059
|
+
if (prop !== 'transition') return false;
|
|
4750
5060
|
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
var supportedValue_1 = cssVendor_cjs.supportedValue = supportedValue;
|
|
5061
|
+
if (options.transition) {
|
|
5062
|
+
return prop;
|
|
5063
|
+
}
|
|
4755
5064
|
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
5065
|
+
return prefix.css + prop;
|
|
5066
|
+
}
|
|
5067
|
+
};
|
|
4759
5068
|
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
5069
|
+
// https://caniuse.com/#search=writing-mode
|
|
5070
|
+
|
|
5071
|
+
var writingMode = {
|
|
5072
|
+
noPrefill: ['writing-mode'],
|
|
5073
|
+
supportedProperty: function supportedProperty(prop) {
|
|
5074
|
+
if (prop !== 'writing-mode') return false;
|
|
5075
|
+
|
|
5076
|
+
if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {
|
|
5077
|
+
return prefix.css + prop;
|
|
5078
|
+
}
|
|
5079
|
+
|
|
5080
|
+
return prop;
|
|
5081
|
+
}
|
|
5082
|
+
};
|
|
5083
|
+
|
|
5084
|
+
// https://caniuse.com/#search=user-select
|
|
5085
|
+
|
|
5086
|
+
var userSelect = {
|
|
5087
|
+
noPrefill: ['user-select'],
|
|
5088
|
+
supportedProperty: function supportedProperty(prop) {
|
|
5089
|
+
if (prop !== 'user-select') return false;
|
|
5090
|
+
|
|
5091
|
+
if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {
|
|
5092
|
+
return prefix.css + prop;
|
|
4765
5093
|
}
|
|
5094
|
+
|
|
5095
|
+
return prop;
|
|
4766
5096
|
}
|
|
5097
|
+
};
|
|
4767
5098
|
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
5099
|
+
// https://caniuse.com/#search=multicolumn
|
|
5100
|
+
// https://github.com/postcss/autoprefixer/issues/491
|
|
5101
|
+
// https://github.com/postcss/autoprefixer/issues/177
|
|
4771
5102
|
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
}
|
|
5103
|
+
var breakPropsOld = {
|
|
5104
|
+
supportedProperty: function supportedProperty(prop, style) {
|
|
5105
|
+
if (!/^break-/.test(prop)) return false;
|
|
4776
5106
|
|
|
4777
|
-
|
|
4778
|
-
var
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
var supportedValue$1 = supportedValue_1(supportedProp, toCssValue(value));
|
|
4782
|
-
if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;
|
|
5107
|
+
if (prefix.js === 'Webkit') {
|
|
5108
|
+
var jsProp = "WebkitColumn" + pascalize(prop);
|
|
5109
|
+
return jsProp in style ? prefix.css + "column-" + prop : false;
|
|
5110
|
+
}
|
|
4783
5111
|
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
5112
|
+
if (prefix.js === 'Moz') {
|
|
5113
|
+
var _jsProp = "page" + pascalize(prop);
|
|
5114
|
+
|
|
5115
|
+
return _jsProp in style ? "page-" + prop : false;
|
|
4788
5116
|
}
|
|
4789
5117
|
|
|
4790
|
-
return
|
|
5118
|
+
return false;
|
|
5119
|
+
}
|
|
5120
|
+
};
|
|
5121
|
+
|
|
5122
|
+
// See https://github.com/postcss/autoprefixer/issues/324.
|
|
5123
|
+
|
|
5124
|
+
var inlineLogicalOld = {
|
|
5125
|
+
supportedProperty: function supportedProperty(prop, style) {
|
|
5126
|
+
if (!/^(border|margin|padding)-inline/.test(prop)) return false;
|
|
5127
|
+
if (prefix.js === 'Moz') return prop;
|
|
5128
|
+
var newProp = prop.replace('-inline', '');
|
|
5129
|
+
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;
|
|
5130
|
+
}
|
|
5131
|
+
};
|
|
5132
|
+
|
|
5133
|
+
// Camelization is required because we can't test using.
|
|
5134
|
+
// CSS syntax for e.g. in FF.
|
|
5135
|
+
|
|
5136
|
+
var unprefixed = {
|
|
5137
|
+
supportedProperty: function supportedProperty(prop, style) {
|
|
5138
|
+
return camelize(prop) in style ? prop : false;
|
|
4791
5139
|
}
|
|
5140
|
+
};
|
|
4792
5141
|
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
}
|
|
5142
|
+
var prefixed = {
|
|
5143
|
+
supportedProperty: function supportedProperty(prop, style) {
|
|
5144
|
+
var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.
|
|
4797
5145
|
|
|
4798
|
-
|
|
4799
|
-
|
|
5146
|
+
if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.
|
|
5147
|
+
|
|
5148
|
+
if (prop[0] === '-' && prop[1] === '-') return prop;
|
|
5149
|
+
if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.
|
|
5150
|
+
|
|
5151
|
+
if (prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return "-webkit-" + prop;
|
|
5152
|
+
return false;
|
|
4800
5153
|
}
|
|
5154
|
+
};
|
|
4801
5155
|
|
|
4802
|
-
|
|
4803
|
-
onProcessRule: onProcessRule,
|
|
4804
|
-
onProcessStyle: onProcessStyle,
|
|
4805
|
-
onChangeValue: onChangeValue
|
|
4806
|
-
};
|
|
4807
|
-
}
|
|
5156
|
+
// https://caniuse.com/#search=scroll-snap
|
|
4808
5157
|
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
return prop0 > prop1 ? 1 : -1;
|
|
5158
|
+
var scrollSnap = {
|
|
5159
|
+
supportedProperty: function supportedProperty(prop) {
|
|
5160
|
+
if (prop.substring(0, 11) !== 'scroll-snap') return false;
|
|
5161
|
+
|
|
5162
|
+
if (prefix.js === 'ms') {
|
|
5163
|
+
return "" + prefix.css + prop;
|
|
4816
5164
|
}
|
|
4817
5165
|
|
|
4818
|
-
return
|
|
4819
|
-
}
|
|
5166
|
+
return prop;
|
|
5167
|
+
}
|
|
5168
|
+
};
|
|
4820
5169
|
|
|
4821
|
-
|
|
4822
|
-
onProcessStyle: function onProcessStyle(style, rule) {
|
|
4823
|
-
if (rule.type !== 'style') return style;
|
|
4824
|
-
var newStyle = {};
|
|
4825
|
-
var props = Object.keys(style).sort(sort);
|
|
5170
|
+
// https://caniuse.com/#search=overscroll-behavior
|
|
4826
5171
|
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
5172
|
+
var overscrollBehavior = {
|
|
5173
|
+
supportedProperty: function supportedProperty(prop) {
|
|
5174
|
+
if (prop !== 'overscroll-behavior') return false;
|
|
4830
5175
|
|
|
4831
|
-
|
|
5176
|
+
if (prefix.js === 'ms') {
|
|
5177
|
+
return prefix.css + "scroll-chaining";
|
|
4832
5178
|
}
|
|
4833
|
-
};
|
|
4834
|
-
}
|
|
4835
5179
|
|
|
4836
|
-
|
|
4837
|
-
if (options === void 0) {
|
|
4838
|
-
options = {};
|
|
5180
|
+
return prop;
|
|
4839
5181
|
}
|
|
5182
|
+
};
|
|
4840
5183
|
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
5184
|
+
var propMap = {
|
|
5185
|
+
'flex-grow': 'flex-positive',
|
|
5186
|
+
'flex-shrink': 'flex-negative',
|
|
5187
|
+
'flex-basis': 'flex-preferred-size',
|
|
5188
|
+
'justify-content': 'flex-pack',
|
|
5189
|
+
order: 'flex-order',
|
|
5190
|
+
'align-items': 'flex-align',
|
|
5191
|
+
'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.
|
|
5192
|
+
|
|
5193
|
+
}; // Support old flex spec from 2012.
|
|
5194
|
+
|
|
5195
|
+
var flex2012 = {
|
|
5196
|
+
supportedProperty: function supportedProperty(prop, style) {
|
|
5197
|
+
var newProp = propMap[prop];
|
|
5198
|
+
if (!newProp) return false;
|
|
5199
|
+
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;
|
|
5200
|
+
}
|
|
4844
5201
|
};
|
|
4845
5202
|
|
|
4846
|
-
var
|
|
5203
|
+
var propMap$1 = {
|
|
5204
|
+
flex: 'box-flex',
|
|
5205
|
+
'flex-grow': 'box-flex',
|
|
5206
|
+
'flex-direction': ['box-orient', 'box-direction'],
|
|
5207
|
+
order: 'box-ordinal-group',
|
|
5208
|
+
'align-items': 'box-align',
|
|
5209
|
+
'flex-flow': ['box-orient', 'box-direction'],
|
|
5210
|
+
'justify-content': 'box-pack'
|
|
5211
|
+
};
|
|
5212
|
+
var propKeys = Object.keys(propMap$1);
|
|
4847
5213
|
|
|
4848
|
-
|
|
5214
|
+
var prefixCss = function prefixCss(p) {
|
|
5215
|
+
return prefix.css + p;
|
|
5216
|
+
}; // Support old flex spec from 2009.
|
|
4849
5217
|
|
|
4850
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4851
5218
|
|
|
4852
|
-
|
|
4853
|
-
|
|
5219
|
+
var flex2009 = {
|
|
5220
|
+
supportedProperty: function supportedProperty(prop, style, _ref) {
|
|
5221
|
+
var multiple = _ref.multiple;
|
|
4854
5222
|
|
|
4855
|
-
|
|
4856
|
-
|
|
5223
|
+
if (propKeys.indexOf(prop) > -1) {
|
|
5224
|
+
var newProp = propMap$1[prop];
|
|
4857
5225
|
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4862
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4863
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4864
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
4865
|
-
***************************************************************************** */
|
|
5226
|
+
if (!Array.isArray(newProp)) {
|
|
5227
|
+
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;
|
|
5228
|
+
}
|
|
4866
5229
|
|
|
4867
|
-
|
|
4868
|
-
exports.__assign =
|
|
4869
|
-
Object.assign ||
|
|
4870
|
-
function __assign(t) {
|
|
4871
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4872
|
-
s = arguments[i];
|
|
4873
|
-
for (var p in s)
|
|
4874
|
-
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
4875
|
-
}
|
|
4876
|
-
return t;
|
|
4877
|
-
};
|
|
4878
|
-
return exports.__assign.apply(this, arguments);
|
|
4879
|
-
};
|
|
4880
|
-
} (_tslib$1));
|
|
5230
|
+
if (!multiple) return false;
|
|
4881
5231
|
|
|
4882
|
-
var
|
|
5232
|
+
for (var i = 0; i < newProp.length; i++) {
|
|
5233
|
+
if (!(prefix.js + pascalize(newProp[0]) in style)) {
|
|
5234
|
+
return false;
|
|
5235
|
+
}
|
|
5236
|
+
}
|
|
4883
5237
|
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
* for the [`css-mqpacker`](https://www.npmjs.com/package/css-mqpacker) or
|
|
4887
|
-
* [`pleeease`](https://www.npmjs.com/package/pleeease) which using `css-mqpacker`
|
|
4888
|
-
* or, perhaps, something else ))
|
|
4889
|
-
*
|
|
4890
|
-
* @module sort-css-media-queries
|
|
4891
|
-
* @author Oleg Dutchenko <dutchenko.o.wezom@gmail.com>
|
|
4892
|
-
* @version 1.5.0
|
|
4893
|
-
*/
|
|
5238
|
+
return newProp.map(prefixCss);
|
|
5239
|
+
}
|
|
4894
5240
|
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
5241
|
+
return false;
|
|
5242
|
+
}
|
|
5243
|
+
};
|
|
4898
5244
|
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
5245
|
+
// plugins = [
|
|
5246
|
+
// ...plugins,
|
|
5247
|
+
// breakPropsOld,
|
|
5248
|
+
// inlineLogicalOld,
|
|
5249
|
+
// unprefixed,
|
|
5250
|
+
// prefixed,
|
|
5251
|
+
// scrollSnap,
|
|
5252
|
+
// flex2012,
|
|
5253
|
+
// flex2009
|
|
5254
|
+
// ]
|
|
5255
|
+
// Plugins without 'noPrefill' value, going last.
|
|
5256
|
+
// 'flex-*' plugins should be at the bottom.
|
|
5257
|
+
// 'flex2009' going after 'flex2012'.
|
|
5258
|
+
// 'prefixed' going after 'unprefixed'
|
|
4903
5259
|
|
|
4904
|
-
|
|
4905
|
-
|
|
5260
|
+
var plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];
|
|
5261
|
+
var propertyDetectors = plugins.filter(function (p) {
|
|
5262
|
+
return p.supportedProperty;
|
|
5263
|
+
}).map(function (p) {
|
|
5264
|
+
return p.supportedProperty;
|
|
5265
|
+
});
|
|
5266
|
+
var noPrefill = plugins.filter(function (p) {
|
|
5267
|
+
return p.noPrefill;
|
|
5268
|
+
}).reduce(function (a, p) {
|
|
5269
|
+
a.push.apply(a, _toConsumableArray(p.noPrefill));
|
|
5270
|
+
return a;
|
|
5271
|
+
}, []);
|
|
4906
5272
|
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
const maxMinHeight = /(!?\(\s*max(-device)?-height)(.|\n)+\(\s*min(-device)?-height/i;
|
|
4910
|
-
const maxHeight = /\(\s*max(-device)?-height/i;
|
|
5273
|
+
var el;
|
|
5274
|
+
var cache = {};
|
|
4911
5275
|
|
|
4912
|
-
|
|
4913
|
-
|
|
5276
|
+
if (isInBrowser) {
|
|
5277
|
+
el = document.createElement('p'); // We test every property on vendor prefix requirement.
|
|
5278
|
+
// Once tested, result is cached. It gives us up to 70% perf boost.
|
|
5279
|
+
// http://jsperf.com/element-style-object-access-vs-plain-object
|
|
5280
|
+
//
|
|
5281
|
+
// Prefill cache with known css properties to reduce amount of
|
|
5282
|
+
// properties we need to feature test at runtime.
|
|
5283
|
+
// http://davidwalsh.name/vendor-prefix
|
|
4914
5284
|
|
|
4915
|
-
|
|
4916
|
-
const isPrintOnly = /^print$/i;
|
|
5285
|
+
var computed = window.getComputedStyle(document.documentElement, '');
|
|
4917
5286
|
|
|
4918
|
-
|
|
5287
|
+
for (var key$1 in computed) {
|
|
5288
|
+
// eslint-disable-next-line no-restricted-globals
|
|
5289
|
+
if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];
|
|
5290
|
+
} // Properties that cannot be correctly detected using the
|
|
5291
|
+
// cache prefill method.
|
|
4919
5292
|
|
|
5293
|
+
|
|
5294
|
+
noPrefill.forEach(function (x) {
|
|
5295
|
+
return delete cache[x];
|
|
5296
|
+
});
|
|
5297
|
+
}
|
|
4920
5298
|
/**
|
|
4921
|
-
*
|
|
4922
|
-
*
|
|
4923
|
-
*
|
|
4924
|
-
* @
|
|
4925
|
-
* @param {
|
|
4926
|
-
* @return {
|
|
5299
|
+
* Test if a property is supported, returns supported property with vendor
|
|
5300
|
+
* prefix if required. Returns `false` if not supported.
|
|
5301
|
+
*
|
|
5302
|
+
* @param {String} prop dash separated
|
|
5303
|
+
* @param {Object} [options]
|
|
5304
|
+
* @return {String|Boolean}
|
|
5305
|
+
* @api public
|
|
4927
5306
|
*/
|
|
4928
|
-
function _getQueryLength (length) {
|
|
4929
|
-
length = /(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(length);
|
|
4930
5307
|
|
|
4931
|
-
|
|
4932
|
-
|
|
5308
|
+
|
|
5309
|
+
function supportedProperty(prop, options) {
|
|
5310
|
+
if (options === void 0) {
|
|
5311
|
+
options = {};
|
|
4933
5312
|
}
|
|
4934
5313
|
|
|
4935
|
-
|
|
4936
|
-
|
|
5314
|
+
// For server-side rendering.
|
|
5315
|
+
if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.
|
|
5316
|
+
|
|
5317
|
+
if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {
|
|
5318
|
+
return cache[prop];
|
|
5319
|
+
} // Check if 'transition' or 'transform' natively supported in browser.
|
|
5320
|
+
|
|
5321
|
+
|
|
5322
|
+
if (prop === 'transition' || prop === 'transform') {
|
|
5323
|
+
options[prop] = prop in el.style;
|
|
5324
|
+
} // Find a plugin for current prefix property.
|
|
4937
5325
|
|
|
4938
|
-
switch (unit) {
|
|
4939
|
-
case 'ch':
|
|
4940
|
-
number = parseFloat(number) * 8.8984375;
|
|
4941
|
-
break
|
|
4942
5326
|
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
number = parseFloat(number) * 16;
|
|
4946
|
-
break
|
|
5327
|
+
for (var i = 0; i < propertyDetectors.length; i++) {
|
|
5328
|
+
cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.
|
|
4947
5329
|
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
5330
|
+
if (cache[prop]) break;
|
|
5331
|
+
} // Reset styles for current property.
|
|
5332
|
+
// Firefox can even throw an error for invalid properties, e.g., "0".
|
|
4951
5333
|
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
5334
|
+
|
|
5335
|
+
try {
|
|
5336
|
+
el.style[prop] = '';
|
|
5337
|
+
} catch (err) {
|
|
5338
|
+
return false;
|
|
4955
5339
|
}
|
|
4956
5340
|
|
|
4957
|
-
return
|
|
5341
|
+
return cache[prop];
|
|
4958
5342
|
}
|
|
4959
5343
|
|
|
5344
|
+
var cache$1 = {};
|
|
5345
|
+
var transitionProperties = {
|
|
5346
|
+
transition: 1,
|
|
5347
|
+
'transition-property': 1,
|
|
5348
|
+
'-webkit-transition': 1,
|
|
5349
|
+
'-webkit-transition-property': 1
|
|
5350
|
+
};
|
|
5351
|
+
var transPropsRegExp = /(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;
|
|
5352
|
+
var el$1;
|
|
4960
5353
|
/**
|
|
4961
|
-
*
|
|
4962
|
-
*
|
|
4963
|
-
* @param {
|
|
4964
|
-
* @param {
|
|
4965
|
-
* @param {
|
|
4966
|
-
* @return {
|
|
5354
|
+
* Returns prefixed value transition/transform if needed.
|
|
5355
|
+
*
|
|
5356
|
+
* @param {String} match
|
|
5357
|
+
* @param {String} p1
|
|
5358
|
+
* @param {String} p2
|
|
5359
|
+
* @return {String}
|
|
5360
|
+
* @api private
|
|
4967
5361
|
*/
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
} else if (doubleTestFalse.test(query)) {
|
|
4977
|
-
return false
|
|
4978
|
-
}
|
|
4979
|
-
return singleTest.test(query)
|
|
4980
|
-
}
|
|
5362
|
+
|
|
5363
|
+
function prefixTransitionCallback(match, p1, p2) {
|
|
5364
|
+
if (p1 === 'var') return 'var';
|
|
5365
|
+
if (p1 === 'all') return 'all';
|
|
5366
|
+
if (p2 === 'all') return ', all';
|
|
5367
|
+
var prefixedValue = p1 ? supportedProperty(p1) : ", " + supportedProperty(p2);
|
|
5368
|
+
if (!prefixedValue) return p1 || p2;
|
|
5369
|
+
return prefixedValue;
|
|
4981
5370
|
}
|
|
4982
5371
|
|
|
5372
|
+
if (isInBrowser) el$1 = document.createElement('p');
|
|
4983
5373
|
/**
|
|
4984
|
-
*
|
|
4985
|
-
*
|
|
4986
|
-
* @param {
|
|
4987
|
-
* @
|
|
5374
|
+
* Returns prefixed value if needed. Returns `false` if value is not supported.
|
|
5375
|
+
*
|
|
5376
|
+
* @param {String} property
|
|
5377
|
+
* @param {String} value
|
|
5378
|
+
* @return {String|Boolean}
|
|
5379
|
+
* @api public
|
|
4988
5380
|
*/
|
|
4989
|
-
function _testIsPrint (a, b) {
|
|
4990
|
-
const isPrintA = isPrint.test(a);
|
|
4991
|
-
const isPrintOnlyA = isPrintOnly.test(a);
|
|
4992
5381
|
|
|
4993
|
-
|
|
4994
|
-
|
|
5382
|
+
function supportedValue(property, value) {
|
|
5383
|
+
// For server-side rendering.
|
|
5384
|
+
var prefixedValue = value;
|
|
5385
|
+
if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.
|
|
5386
|
+
// We want only prefixable values here.
|
|
5387
|
+
// eslint-disable-next-line no-restricted-globals
|
|
4995
5388
|
|
|
4996
|
-
if (
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
}
|
|
5000
|
-
if (isPrintOnlyA && !isPrintOnlyB) {
|
|
5001
|
-
return -1
|
|
5002
|
-
}
|
|
5003
|
-
return a.localeCompare(b)
|
|
5004
|
-
}
|
|
5005
|
-
if (isPrintA) {
|
|
5006
|
-
return 1
|
|
5007
|
-
}
|
|
5008
|
-
if (isPrintB) {
|
|
5009
|
-
return -1
|
|
5010
|
-
}
|
|
5389
|
+
if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {
|
|
5390
|
+
return prefixedValue;
|
|
5391
|
+
} // Create cache key for current value.
|
|
5011
5392
|
|
|
5012
|
-
return null
|
|
5013
|
-
}
|
|
5014
5393
|
|
|
5015
|
-
//
|
|
5016
|
-
// Public
|
|
5017
|
-
// ----------------------------------------
|
|
5394
|
+
var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.
|
|
5018
5395
|
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
* @param {string} a
|
|
5023
|
-
* @param {string} b
|
|
5024
|
-
* @return {number} 1 / 0 / -1
|
|
5025
|
-
*/
|
|
5026
|
-
function sortCSSmq$1 (a, b) {
|
|
5027
|
-
const testIsPrint = _testIsPrint(a, b);
|
|
5028
|
-
if (testIsPrint !== null) {
|
|
5029
|
-
return testIsPrint
|
|
5030
|
-
}
|
|
5396
|
+
if (process.env.NODE_ENV !== 'benchmark' && cache$1[cacheKey] != null) {
|
|
5397
|
+
return cache$1[cacheKey];
|
|
5398
|
+
} // IE can even throw an error in some cases, for e.g. style.content = 'bar'.
|
|
5031
5399
|
|
|
5032
|
-
const minA = isMinWidth(a) || isMinHeight(a);
|
|
5033
|
-
const maxA = isMaxWidth(a) || isMaxHeight(a);
|
|
5034
5400
|
|
|
5035
|
-
|
|
5036
|
-
|
|
5401
|
+
try {
|
|
5402
|
+
// Test value as it is.
|
|
5403
|
+
el$1.style[property] = prefixedValue;
|
|
5404
|
+
} catch (err) {
|
|
5405
|
+
// Return false if value not supported.
|
|
5406
|
+
cache$1[cacheKey] = false;
|
|
5407
|
+
return false;
|
|
5408
|
+
} // If 'transition' or 'transition-property' property.
|
|
5037
5409
|
|
|
5038
|
-
if (minA && maxB) {
|
|
5039
|
-
return -1
|
|
5040
|
-
}
|
|
5041
|
-
if (maxA && minB) {
|
|
5042
|
-
return 1
|
|
5043
|
-
}
|
|
5044
5410
|
|
|
5045
|
-
|
|
5046
|
-
|
|
5411
|
+
if (transitionProperties[property]) {
|
|
5412
|
+
prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);
|
|
5413
|
+
} else if (el$1.style[property] === '') {
|
|
5414
|
+
// Value with a vendor prefix.
|
|
5415
|
+
prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert "flex" to "-ms-flexbox" for IE10.
|
|
5047
5416
|
|
|
5048
|
-
|
|
5049
|
-
return a.localeCompare(b)
|
|
5050
|
-
} else if (lengthA === maxValue) {
|
|
5051
|
-
return 1
|
|
5052
|
-
} else if (lengthB === maxValue) {
|
|
5053
|
-
return -1
|
|
5054
|
-
}
|
|
5417
|
+
if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.
|
|
5055
5418
|
|
|
5056
|
-
|
|
5057
|
-
if (maxA) {
|
|
5058
|
-
return -1
|
|
5059
|
-
}
|
|
5060
|
-
return 1
|
|
5061
|
-
}
|
|
5419
|
+
el$1.style[property] = prefixedValue; // Return false if value not supported.
|
|
5062
5420
|
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
return
|
|
5421
|
+
if (el$1.style[property] === '') {
|
|
5422
|
+
cache$1[cacheKey] = false;
|
|
5423
|
+
return false;
|
|
5066
5424
|
}
|
|
5067
|
-
|
|
5068
|
-
}
|
|
5425
|
+
} // Reset styles for current property.
|
|
5069
5426
|
|
|
5070
|
-
|
|
5427
|
+
|
|
5428
|
+
el$1.style[property] = ''; // Write current value to cache.
|
|
5429
|
+
|
|
5430
|
+
cache$1[cacheKey] = prefixedValue;
|
|
5431
|
+
return cache$1[cacheKey];
|
|
5071
5432
|
}
|
|
5072
5433
|
|
|
5434
|
+
cssVendor_cjs.prefix = prefix;
|
|
5435
|
+
var supportedKeyframes_1 = cssVendor_cjs.supportedKeyframes = supportedKeyframes;
|
|
5436
|
+
var supportedProperty_1 = cssVendor_cjs.supportedProperty = supportedProperty;
|
|
5437
|
+
var supportedValue_1 = cssVendor_cjs.supportedValue = supportedValue;
|
|
5438
|
+
|
|
5073
5439
|
/**
|
|
5074
|
-
*
|
|
5075
|
-
* according to the desktop-first methodology.
|
|
5076
|
-
* @param {string} a
|
|
5077
|
-
* @param {string} b
|
|
5078
|
-
* @return {number} 1 / 0 / -1
|
|
5440
|
+
* Add vendor prefix to a property name when needed.
|
|
5079
5441
|
*/
|
|
5080
|
-
sortCSSmq$1.desktopFirst = function (a, b) {
|
|
5081
|
-
const testIsPrint = _testIsPrint(a, b);
|
|
5082
|
-
if (testIsPrint !== null) {
|
|
5083
|
-
return testIsPrint
|
|
5084
|
-
}
|
|
5085
|
-
|
|
5086
|
-
const minA = isMinWidth(a) || isMinHeight(a);
|
|
5087
|
-
const maxA = isMaxWidth(a) || isMaxHeight(a);
|
|
5088
|
-
|
|
5089
|
-
const minB = isMinWidth(b) || isMinHeight(b);
|
|
5090
|
-
const maxB = isMaxWidth(b) || isMaxHeight(b);
|
|
5091
5442
|
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5443
|
+
function jssVendorPrefixer() {
|
|
5444
|
+
function onProcessRule(rule) {
|
|
5445
|
+
if (rule.type === 'keyframes') {
|
|
5446
|
+
var atRule = rule;
|
|
5447
|
+
atRule.at = supportedKeyframes_1(atRule.at);
|
|
5448
|
+
}
|
|
5097
5449
|
}
|
|
5098
5450
|
|
|
5099
|
-
|
|
5100
|
-
|
|
5451
|
+
function prefixStyle(style) {
|
|
5452
|
+
for (var prop in style) {
|
|
5453
|
+
var value = style[prop];
|
|
5101
5454
|
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
} else if (lengthB === maxValue) {
|
|
5107
|
-
return -1
|
|
5108
|
-
}
|
|
5455
|
+
if (prop === 'fallbacks' && Array.isArray(value)) {
|
|
5456
|
+
style[prop] = value.map(prefixStyle);
|
|
5457
|
+
continue;
|
|
5458
|
+
}
|
|
5109
5459
|
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5460
|
+
var changeProp = false;
|
|
5461
|
+
var supportedProp = supportedProperty_1(prop);
|
|
5462
|
+
if (supportedProp && supportedProp !== prop) changeProp = true;
|
|
5463
|
+
var changeValue = false;
|
|
5464
|
+
var supportedValue$1 = supportedValue_1(supportedProp, toCssValue(value));
|
|
5465
|
+
if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;
|
|
5466
|
+
|
|
5467
|
+
if (changeProp || changeValue) {
|
|
5468
|
+
if (changeProp) delete style[prop];
|
|
5469
|
+
style[supportedProp || prop] = supportedValue$1 || value;
|
|
5470
|
+
}
|
|
5113
5471
|
}
|
|
5114
|
-
|
|
5472
|
+
|
|
5473
|
+
return style;
|
|
5115
5474
|
}
|
|
5116
5475
|
|
|
5117
|
-
|
|
5118
|
-
if (
|
|
5119
|
-
|
|
5120
|
-
}
|
|
5121
|
-
return -1
|
|
5476
|
+
function onProcessStyle(style, rule) {
|
|
5477
|
+
if (rule.type !== 'style') return style;
|
|
5478
|
+
return prefixStyle(style);
|
|
5122
5479
|
}
|
|
5123
5480
|
|
|
5124
|
-
|
|
5125
|
-
|
|
5481
|
+
function onChangeValue(value, prop) {
|
|
5482
|
+
return supportedValue_1(prop, toCssValue(value)) || value;
|
|
5483
|
+
}
|
|
5126
5484
|
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5485
|
+
return {
|
|
5486
|
+
onProcessRule: onProcessRule,
|
|
5487
|
+
onProcessStyle: onProcessStyle,
|
|
5488
|
+
onChangeValue: onChangeValue
|
|
5489
|
+
};
|
|
5490
|
+
}
|
|
5130
5491
|
|
|
5131
|
-
|
|
5492
|
+
/**
|
|
5493
|
+
* Sort props by length.
|
|
5494
|
+
*/
|
|
5495
|
+
function jssPropsSort() {
|
|
5496
|
+
var sort = function sort(prop0, prop1) {
|
|
5497
|
+
if (prop0.length === prop1.length) {
|
|
5498
|
+
return prop0 > prop1 ? 1 : -1;
|
|
5499
|
+
}
|
|
5132
5500
|
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
var sortCSSmq = sortCssMediaQueries;
|
|
5501
|
+
return prop0.length - prop1.length;
|
|
5502
|
+
};
|
|
5136
5503
|
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5504
|
+
return {
|
|
5505
|
+
onProcessStyle: function onProcessStyle(style, rule) {
|
|
5506
|
+
if (rule.type !== 'style') return style;
|
|
5507
|
+
var newStyle = {};
|
|
5508
|
+
var props = Object.keys(style).sort(sort);
|
|
5140
5509
|
|
|
5141
|
-
var
|
|
5510
|
+
for (var i = 0; i < props.length; i++) {
|
|
5511
|
+
newStyle[props[i]] = style[props[i]];
|
|
5512
|
+
}
|
|
5142
5513
|
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
);
|
|
5147
|
-
}
|
|
5148
|
-
var UN_QUERIED = '__UN_QUERIED';
|
|
5149
|
-
function recursiveInnerAndGetQueries(pluginOptions, rules) {
|
|
5150
|
-
var queries = {
|
|
5151
|
-
groups: {},
|
|
5152
|
-
groupsSortNames: []
|
|
5153
|
-
};
|
|
5154
|
-
for (var index = 0; index < rules.length; index++) {
|
|
5155
|
-
var rule = rules[index];
|
|
5156
|
-
var query =
|
|
5157
|
-
rule.type === 'conditional' && typeof rule.query === 'string'
|
|
5158
|
-
? rule.query
|
|
5159
|
-
: UN_QUERIED;
|
|
5160
|
-
if (!queries.groups.hasOwnProperty(query)) {
|
|
5161
|
-
queries.groupsSortNames.push(query);
|
|
5162
|
-
queries.groups[query] = [];
|
|
5163
|
-
}
|
|
5164
|
-
queries.groups[query].push(index);
|
|
5165
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
5166
|
-
recursive(pluginOptions, rule);
|
|
5167
|
-
}
|
|
5168
|
-
queries.groupsSortNames.sort(function (a, b) {
|
|
5169
|
-
var aWeight = a === UN_QUERIED ? 0 : a.length;
|
|
5170
|
-
var bWeight = b === UN_QUERIED ? 0 : b.length;
|
|
5171
|
-
if (aWeight > 0 && bWeight > 0) {
|
|
5172
|
-
if (pluginOptions.desktopFirst) {
|
|
5173
|
-
return sortCSSmq__default['default'].desktopFirst(a, b);
|
|
5174
|
-
} else {
|
|
5175
|
-
return sortCSSmq__default['default'](a, b);
|
|
5176
|
-
}
|
|
5177
|
-
} else {
|
|
5178
|
-
return aWeight - bWeight;
|
|
5179
|
-
}
|
|
5180
|
-
});
|
|
5181
|
-
return queries;
|
|
5182
|
-
}
|
|
5183
|
-
function recursive(pluginOptions, data) {
|
|
5184
|
-
if (isPlainObject(data) && data.rules instanceof jss$1.RuleList) {
|
|
5185
|
-
data.rules.toString = function (options) {
|
|
5186
|
-
if (options === void 0) {
|
|
5187
|
-
options = {};
|
|
5188
|
-
}
|
|
5189
|
-
var str = '';
|
|
5190
|
-
var sheet = this.options.sheet;
|
|
5191
|
-
var link = sheet ? sheet.options.link : false;
|
|
5192
|
-
var _a = recursiveInnerAndGetQueries(pluginOptions, this.index),
|
|
5193
|
-
groups = _a.groups,
|
|
5194
|
-
groupsSortNames = _a.groupsSortNames;
|
|
5195
|
-
for (var i = 0; i < groupsSortNames.length; i++) {
|
|
5196
|
-
var groupName = groupsSortNames[i];
|
|
5197
|
-
var group = groups[groupsSortNames[i]];
|
|
5198
|
-
if (groupName !== UN_QUERIED && pluginOptions.combineMediaQueries) {
|
|
5199
|
-
str += '\n' + groupName + ' {';
|
|
5200
|
-
for (var i_1 = 0; i_1 < group.length; i_1++) {
|
|
5201
|
-
var rule = this.index[group[i_1]];
|
|
5202
|
-
var css = rule.rules.toString(
|
|
5203
|
-
_tslib.__assign(_tslib.__assign({}, options), {
|
|
5204
|
-
indent: (options.indent || 0) + 1
|
|
5205
|
-
})
|
|
5206
|
-
);
|
|
5207
|
-
if (!css && !link) continue;
|
|
5208
|
-
if (str) str += '\n';
|
|
5209
|
-
str += css;
|
|
5210
|
-
}
|
|
5211
|
-
str += '\n}\n';
|
|
5212
|
-
} else {
|
|
5213
|
-
for (var i_2 = 0; i_2 < group.length; i_2++) {
|
|
5214
|
-
var rule = this.index[group[i_2]];
|
|
5215
|
-
var css = rule.toString(options);
|
|
5216
|
-
if (!css && !link) continue;
|
|
5217
|
-
if (str) str += '\n';
|
|
5218
|
-
str += css;
|
|
5219
|
-
}
|
|
5220
|
-
}
|
|
5221
|
-
}
|
|
5222
|
-
return str;
|
|
5223
|
-
};
|
|
5224
|
-
}
|
|
5225
|
-
}
|
|
5226
|
-
function jssCombineAndSortMQ(options) {
|
|
5227
|
-
if (options === void 0) {
|
|
5228
|
-
options = {};
|
|
5229
|
-
}
|
|
5230
|
-
return {
|
|
5231
|
-
onProcessSheet: function (sheet) {
|
|
5232
|
-
recursive(options, sheet);
|
|
5233
|
-
}
|
|
5234
|
-
};
|
|
5514
|
+
return newStyle;
|
|
5515
|
+
}
|
|
5516
|
+
};
|
|
5235
5517
|
}
|
|
5236
5518
|
|
|
5237
|
-
var
|
|
5519
|
+
var create = function create(options) {
|
|
5520
|
+
if (options === void 0) {
|
|
5521
|
+
options = {};
|
|
5522
|
+
}
|
|
5523
|
+
|
|
5524
|
+
return {
|
|
5525
|
+
plugins: [functionPlugin(), observablePlugin(options.observable), templatePlugin(), jssGlobal(), jssExtend(), jssNested(), jssCompose(), camelCase(), defaultUnit(options.defaultUnit), jssExpand(), jssVendorPrefixer(), jssPropsSort()]
|
|
5526
|
+
};
|
|
5527
|
+
};
|
|
5238
5528
|
|
|
5239
5529
|
index.setup({
|
|
5240
5530
|
...create(),
|
|
@@ -5242,109 +5532,6 @@ index.setup({
|
|
|
5242
5532
|
plugins: [...create().plugins, dist({ combineMediaQueries: true })],
|
|
5243
5533
|
});
|
|
5244
5534
|
|
|
5245
|
-
/* Auto Generated Start */
|
|
5246
|
-
const themeLight = {
|
|
5247
|
-
baseColor: '#000',
|
|
5248
|
-
baseColorDarken: '#000000',
|
|
5249
|
-
brandColor: '#d5001c',
|
|
5250
|
-
backgroundColor: '#fff',
|
|
5251
|
-
backgroundSurfaceColor: '#f2f2f2',
|
|
5252
|
-
contrastLowColor: '#e3e4e5',
|
|
5253
|
-
contrastMediumColor: '#626669',
|
|
5254
|
-
contrastHighColor: '#323639',
|
|
5255
|
-
contrastHighColorDarken: '#151718',
|
|
5256
|
-
hoverColor: '#d5001c',
|
|
5257
|
-
hoverColorDarken: '#980014',
|
|
5258
|
-
activeColor: '#d5001c',
|
|
5259
|
-
focusColor: 'currentColor',
|
|
5260
|
-
disabledColor: '#96989a',
|
|
5261
|
-
errorColor: '#e00000',
|
|
5262
|
-
errorColorDarken: '#a30000',
|
|
5263
|
-
errorSoftColor: '#fae6e6',
|
|
5264
|
-
successColor: '#018a16',
|
|
5265
|
-
successColorDarken: '#014d0c',
|
|
5266
|
-
successSoftColor: '#e5f3e7',
|
|
5267
|
-
warningColor: '#ff9b00',
|
|
5268
|
-
warningSoftColor: '#fff5e5',
|
|
5269
|
-
neutralColor: '#0061bd',
|
|
5270
|
-
neutralSoftColor: '#e5eff8'
|
|
5271
|
-
};
|
|
5272
|
-
const themeDark = {
|
|
5273
|
-
baseColor: '#fff',
|
|
5274
|
-
baseColorDarken: '#e0e0e0',
|
|
5275
|
-
brandColor: '#d5001c',
|
|
5276
|
-
backgroundColor: '#0e1418',
|
|
5277
|
-
backgroundSurfaceColor: '#262b2e',
|
|
5278
|
-
contrastLowColor: '#4a4e51',
|
|
5279
|
-
contrastMediumColor: '#b0b1b2',
|
|
5280
|
-
contrastHighColor: '#e3e4e5',
|
|
5281
|
-
contrastHighColorDarken: '#c3c5c8',
|
|
5282
|
-
hoverColor: '#ff0223',
|
|
5283
|
-
hoverColorDarken: '#c4001a',
|
|
5284
|
-
activeColor: '#ff0223',
|
|
5285
|
-
focusColor: 'currentColor',
|
|
5286
|
-
disabledColor: '#7c7f81',
|
|
5287
|
-
errorColor: '#fc1717',
|
|
5288
|
-
errorColorDarken: '#d30303',
|
|
5289
|
-
errorSoftColor: '#fec5c5',
|
|
5290
|
-
successColor: '#01ba1d',
|
|
5291
|
-
successColorDarken: '#017d14',
|
|
5292
|
-
successSoftColor: '#bfeec6',
|
|
5293
|
-
warningColor: '#ff9b00',
|
|
5294
|
-
warningSoftColor: '#ffe6bf',
|
|
5295
|
-
neutralColor: '#2193ff',
|
|
5296
|
-
neutralSoftColor: '#c7e4ff'
|
|
5297
|
-
};
|
|
5298
|
-
const themeLightElectric = Object.assign(Object.assign({}, themeLight), { brandColor: '#00b0f4', hoverColor: '#00b0f4', hoverColorDarken: '#0084b7', activeColor: '#00b0f4' });
|
|
5299
|
-
const themeDarkElectric = Object.assign(Object.assign({}, themeDark), { brandColor: '#00b0f4', hoverColor: '#00b0f4', hoverColorDarken: '#0084b7', activeColor: '#00b0f4' });
|
|
5300
|
-
const themes = {
|
|
5301
|
-
'light': themeLight,
|
|
5302
|
-
'dark': themeDark,
|
|
5303
|
-
'light-electric': themeLightElectric,
|
|
5304
|
-
'dark-electric': themeDarkElectric
|
|
5305
|
-
};
|
|
5306
|
-
/* Auto Generated End */
|
|
5307
|
-
const getThemedColors = (theme) => {
|
|
5308
|
-
return themes[theme];
|
|
5309
|
-
};
|
|
5310
|
-
|
|
5311
|
-
const pxToRemWithUnit = (px) => `${px / 16}rem`;
|
|
5312
|
-
|
|
5313
|
-
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
5314
|
-
createJss({
|
|
5315
|
-
plugins: [
|
|
5316
|
-
jssGlobal(),
|
|
5317
|
-
jssNested(),
|
|
5318
|
-
camelCase(),
|
|
5319
|
-
dist({ combineMediaQueries: true }),
|
|
5320
|
-
],
|
|
5321
|
-
});
|
|
5322
|
-
const supportsConstructableStylesheets = () => {
|
|
5323
|
-
try {
|
|
5324
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
5325
|
-
}
|
|
5326
|
-
catch (_a) {
|
|
5327
|
-
return false;
|
|
5328
|
-
}
|
|
5329
|
-
};
|
|
5330
|
-
// determine it once
|
|
5331
|
-
supportsConstructableStylesheets();
|
|
5332
|
-
|
|
5333
|
-
const paramCaseToCamelCase = (str) => {
|
|
5334
|
-
return str.replace(/-(\w)/g, (_, group) => group.toUpperCase());
|
|
5335
|
-
};
|
|
5336
|
-
const isScrollable = (isPrevHidden, isNextHidden) => {
|
|
5337
|
-
return !(isPrevHidden && isNextHidden);
|
|
5338
|
-
};
|
|
5339
|
-
|
|
5340
|
-
const hasDocument = typeof document !== 'undefined';
|
|
5341
|
-
|
|
5342
|
-
hasDocument && 'scrollBehavior' in document.documentElement.style;
|
|
5343
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
5344
|
-
win.document || { head: {} };
|
|
5345
|
-
(win.HTMLElement || class {
|
|
5346
|
-
});
|
|
5347
|
-
|
|
5348
5535
|
const formatObjectOutput = (value) => {
|
|
5349
5536
|
return JSON.stringify(value)
|
|
5350
5537
|
.replace(/"([a-zA-Z?]+)":/g, '$1:') // remove double quotes from keys
|