@porsche-design-system/components-react 3.0.0-alpha.2 → 3.0.0-alpha.3
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 +302 -0
- package/esm/lib/components/accordion.wrapper.js +2 -1
- package/esm/lib/components/banner.wrapper.js +3 -3
- package/esm/lib/components/carousel.wrapper.js +4 -3
- package/esm/lib/components/divider.wrapper.js +3 -3
- package/esm/lib/components/link-social.wrapper.js +1 -1
- package/esm/lib/components/link-tile.wrapper.js +1 -1
- package/esm/lib/components/modal.wrapper.js +4 -3
- package/esm/lib/components/pagination.wrapper.js +4 -3
- package/esm/lib/components/scroller.wrapper.js +3 -3
- package/esm/lib/components/segmented-control.wrapper.js +2 -1
- package/esm/lib/components/stepper-horizontal.wrapper.js +2 -1
- package/esm/lib/components/switch.wrapper.js +2 -1
- package/esm/lib/components/table.wrapper.js +2 -1
- package/esm/lib/components/tabs-bar.wrapper.js +4 -3
- package/esm/lib/components/tabs.wrapper.js +4 -3
- package/esm/lib/components/text-field-wrapper.wrapper.js +3 -3
- package/esm/lib/components/text-list.wrapper.js +3 -3
- package/esm/lib/components/textarea-wrapper.wrapper.js +3 -3
- package/lib/components/accordion.wrapper.d.ts +12 -4
- package/lib/components/accordion.wrapper.js +2 -1
- package/lib/components/banner.wrapper.d.ts +18 -2
- package/lib/components/banner.wrapper.js +3 -3
- package/lib/components/button-group.wrapper.d.ts +2 -2
- package/lib/components/button-pure.wrapper.d.ts +15 -15
- package/lib/components/button.wrapper.d.ts +5 -5
- package/lib/components/carousel.wrapper.d.ts +22 -6
- package/lib/components/carousel.wrapper.js +4 -3
- package/lib/components/checkbox-wrapper.wrapper.d.ts +5 -5
- package/lib/components/content-wrapper.wrapper.d.ts +2 -2
- package/lib/components/display.wrapper.d.ts +2 -2
- package/lib/components/divider.wrapper.d.ts +13 -5
- package/lib/components/divider.wrapper.js +3 -3
- package/lib/components/fieldset-wrapper.wrapper.d.ts +5 -5
- package/lib/components/flex-item.wrapper.d.ts +2 -2
- package/lib/components/flex.wrapper.d.ts +2 -2
- package/lib/components/grid-item.wrapper.d.ts +2 -2
- package/lib/components/grid.wrapper.d.ts +2 -2
- package/lib/components/heading.wrapper.d.ts +2 -2
- package/lib/components/headline.wrapper.d.ts +2 -2
- package/lib/components/icon.wrapper.d.ts +2 -2
- package/lib/components/inline-notification.wrapper.d.ts +5 -5
- package/lib/components/link-pure.wrapper.d.ts +15 -15
- package/lib/components/link-social.wrapper.d.ts +8 -8
- package/lib/components/link-social.wrapper.js +1 -1
- package/lib/components/link-tile.wrapper.d.ts +7 -7
- package/lib/components/link-tile.wrapper.js +1 -1
- package/lib/components/link.wrapper.d.ts +5 -5
- package/lib/components/marque.wrapper.d.ts +5 -5
- package/lib/components/modal.wrapper.d.ts +22 -6
- package/lib/components/modal.wrapper.js +4 -3
- package/lib/components/model-signature.wrapper.d.ts +2 -2
- package/lib/components/pagination.wrapper.d.ts +31 -15
- package/lib/components/pagination.wrapper.js +4 -3
- package/lib/components/popover.wrapper.d.ts +5 -5
- package/lib/components/radio-button-wrapper.wrapper.d.ts +5 -5
- package/lib/components/scroller.wrapper.d.ts +27 -11
- package/lib/components/scroller.wrapper.js +3 -3
- package/lib/components/segmented-control-item.wrapper.d.ts +5 -5
- package/lib/components/segmented-control.wrapper.d.ts +12 -4
- package/lib/components/segmented-control.wrapper.js +2 -1
- package/lib/components/select-wrapper.wrapper.d.ts +7 -7
- package/lib/components/spinner.wrapper.d.ts +2 -2
- package/lib/components/stepper-horizontal-item.wrapper.d.ts +5 -5
- package/lib/components/stepper-horizontal.wrapper.d.ts +13 -5
- package/lib/components/stepper-horizontal.wrapper.js +2 -1
- package/lib/components/switch.wrapper.d.ts +13 -5
- package/lib/components/switch.wrapper.js +2 -1
- package/lib/components/table-body.wrapper.d.ts +2 -2
- package/lib/components/table-cell.wrapper.d.ts +2 -2
- package/lib/components/table-head-cell.wrapper.d.ts +2 -2
- package/lib/components/table-head-row.wrapper.d.ts +2 -2
- package/lib/components/table-head.wrapper.d.ts +2 -2
- package/lib/components/table-row.wrapper.d.ts +2 -2
- package/lib/components/table.wrapper.d.ts +13 -5
- package/lib/components/table.wrapper.js +2 -1
- package/lib/components/tabs-bar.wrapper.d.ts +27 -11
- package/lib/components/tabs-bar.wrapper.js +4 -3
- package/lib/components/tabs-item.wrapper.d.ts +2 -2
- package/lib/components/tabs.wrapper.d.ts +27 -11
- package/lib/components/tabs.wrapper.js +4 -3
- package/lib/components/tag-dismissible.wrapper.d.ts +2 -2
- package/lib/components/tag.wrapper.d.ts +5 -5
- package/lib/components/text-field-wrapper.wrapper.d.ts +17 -9
- package/lib/components/text-field-wrapper.wrapper.js +3 -3
- package/lib/components/text-list-item.wrapper.d.ts +2 -2
- package/lib/components/text-list.wrapper.d.ts +19 -11
- package/lib/components/text-list.wrapper.js +3 -3
- package/lib/components/text.wrapper.d.ts +2 -2
- package/lib/components/textarea-wrapper.wrapper.d.ts +15 -7
- package/lib/components/textarea-wrapper.wrapper.js +3 -3
- package/lib/components/toast.wrapper.d.ts +2 -2
- package/lib/types.d.ts +95 -30
- package/package.json +2 -2
- package/ssr/components/dist/styles/esm/styles-entry.js +362 -2323
- package/ssr/components/dist/utils/esm/utils-entry.js +151 -2046
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +8 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.js +6 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.js +9 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.js +7 -12
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/marque.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.js +6 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +14 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +6 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +5 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.js +4 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.js +9 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +13 -7
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list.js +3 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.js +14 -2
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +362 -2323
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +150 -2047
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +8 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.js +6 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.js +9 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.js +8 -13
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/marque.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.js +6 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +14 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +6 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +5 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.js +4 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.js +9 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +14 -8
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list.js +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.js +14 -2
- package/ssr/lib/components/accordion.wrapper.d.ts +12 -4
- package/ssr/lib/components/banner.wrapper.d.ts +18 -2
- package/ssr/lib/components/button-group.wrapper.d.ts +2 -2
- package/ssr/lib/components/button-pure.wrapper.d.ts +15 -15
- package/ssr/lib/components/button.wrapper.d.ts +5 -5
- package/ssr/lib/components/carousel.wrapper.d.ts +22 -6
- package/ssr/lib/components/checkbox-wrapper.wrapper.d.ts +5 -5
- package/ssr/lib/components/content-wrapper.wrapper.d.ts +2 -2
- package/ssr/lib/components/display.wrapper.d.ts +2 -2
- package/ssr/lib/components/divider.wrapper.d.ts +13 -5
- package/ssr/lib/components/fieldset-wrapper.wrapper.d.ts +5 -5
- package/ssr/lib/components/flex-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/flex.wrapper.d.ts +2 -2
- package/ssr/lib/components/grid-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/grid.wrapper.d.ts +2 -2
- package/ssr/lib/components/heading.wrapper.d.ts +2 -2
- package/ssr/lib/components/headline.wrapper.d.ts +2 -2
- package/ssr/lib/components/icon.wrapper.d.ts +2 -2
- package/ssr/lib/components/inline-notification.wrapper.d.ts +5 -5
- package/ssr/lib/components/link-pure.wrapper.d.ts +15 -15
- package/ssr/lib/components/link-social.wrapper.d.ts +8 -8
- package/ssr/lib/components/link-tile.wrapper.d.ts +7 -7
- package/ssr/lib/components/link.wrapper.d.ts +5 -5
- package/ssr/lib/components/marque.wrapper.d.ts +5 -5
- package/ssr/lib/components/modal.wrapper.d.ts +22 -6
- package/ssr/lib/components/model-signature.wrapper.d.ts +2 -2
- package/ssr/lib/components/pagination.wrapper.d.ts +31 -15
- package/ssr/lib/components/popover.wrapper.d.ts +5 -5
- package/ssr/lib/components/radio-button-wrapper.wrapper.d.ts +5 -5
- package/ssr/lib/components/scroller.wrapper.d.ts +27 -11
- package/ssr/lib/components/segmented-control-item.wrapper.d.ts +5 -5
- package/ssr/lib/components/segmented-control.wrapper.d.ts +12 -4
- package/ssr/lib/components/select-wrapper.wrapper.d.ts +7 -7
- package/ssr/lib/components/spinner.wrapper.d.ts +2 -2
- package/ssr/lib/components/stepper-horizontal-item.wrapper.d.ts +5 -5
- package/ssr/lib/components/stepper-horizontal.wrapper.d.ts +13 -5
- package/ssr/lib/components/switch.wrapper.d.ts +13 -5
- package/ssr/lib/components/table-body.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-cell.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-head-cell.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-head-row.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-head.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-row.wrapper.d.ts +2 -2
- package/ssr/lib/components/table.wrapper.d.ts +13 -5
- package/ssr/lib/components/tabs-bar.wrapper.d.ts +27 -11
- package/ssr/lib/components/tabs-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/tabs.wrapper.d.ts +27 -11
- package/ssr/lib/components/tag-dismissible.wrapper.d.ts +2 -2
- package/ssr/lib/components/tag.wrapper.d.ts +5 -5
- package/ssr/lib/components/text-field-wrapper.wrapper.d.ts +17 -9
- package/ssr/lib/components/text-list-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/text-list.wrapper.d.ts +19 -11
- package/ssr/lib/components/text.wrapper.d.ts +2 -2
- package/ssr/lib/components/textarea-wrapper.wrapper.d.ts +15 -7
- package/ssr/lib/components/toast.wrapper.d.ts +2 -2
- package/ssr/lib/dsr-components/carousel.d.ts +1 -1
- package/ssr/lib/dsr-components/link-social.d.ts +1 -1
- package/ssr/lib/dsr-components/modal.d.ts +2 -1
- package/ssr/lib/dsr-components/text-field-wrapper.d.ts +2 -0
- package/ssr/lib/types.d.ts +95 -30
|
@@ -60,6 +60,8 @@ const fontHyphenationStyle = {
|
|
|
60
60
|
|
|
61
61
|
const fontLineHeight = 'calc(6px + 2.125ex)';
|
|
62
62
|
|
|
63
|
+
const fontSizeTextXXSmall = '.75rem';
|
|
64
|
+
|
|
63
65
|
const fontSizeTextXSmall = 'clamp(0.81rem, 0.23vw + 0.77rem, 0.88rem)';
|
|
64
66
|
|
|
65
67
|
const fontSizeTextSmall = '1rem';
|
|
@@ -71,6 +73,7 @@ const fontSizeTextLarge = 'clamp(1.27rem, 0.51vw + 1.16rem, 1.78rem)';
|
|
|
71
73
|
const fontSizeTextXLarge = 'clamp(1.42rem, 0.94vw + 1.23rem, 2.37rem)';
|
|
72
74
|
|
|
73
75
|
const fontSizeText = {
|
|
76
|
+
xxSmall: fontSizeTextXXSmall,
|
|
74
77
|
xSmall: fontSizeTextXSmall,
|
|
75
78
|
small: fontSizeTextSmall,
|
|
76
79
|
medium: fontSizeTextMedium,
|
|
@@ -88,7 +91,7 @@ const fontSizeHeadingXLarge = fontSizeTextXLarge;
|
|
|
88
91
|
|
|
89
92
|
const fontSizeHeadingXXLarge = 'clamp(1.6rem, 1.56vw + 1.29rem, 3.16rem)';
|
|
90
93
|
|
|
91
|
-
const
|
|
94
|
+
const fontSizeDisplaySmall = 'clamp(1.8rem, 2.41vw + 1.32rem, 4.21rem)';
|
|
92
95
|
|
|
93
96
|
const fontSizeDisplayMedium = 'clamp(2.03rem, 3.58vw + 1.31rem, 5.61rem)';
|
|
94
97
|
|
|
@@ -108,8 +111,6 @@ const fontWeight = {
|
|
|
108
111
|
|
|
109
112
|
const fontStyleNormal = 'normal';
|
|
110
113
|
|
|
111
|
-
const fontStyleItalic = 'italic';
|
|
112
|
-
|
|
113
114
|
const fontVariant = 'normal';
|
|
114
115
|
|
|
115
116
|
const backdropFilter = 'blur(32px)';
|
|
@@ -118,19 +119,42 @@ const frostedGlassStyle = {
|
|
|
118
119
|
backdropFilter,
|
|
119
120
|
};
|
|
120
121
|
|
|
121
|
-
const
|
|
122
|
+
const _gradient = 'rgba(31,31,31,0.9) 0%,' +
|
|
123
|
+
'rgba(31,31,31,0.9) 20%,' +
|
|
124
|
+
'rgba(31,31,31,0.852589) 26.67%,' +
|
|
125
|
+
'rgba(32,32,32,0.768225) 33.33%,' +
|
|
126
|
+
'rgba(33,33,33,0.668116) 40%,' +
|
|
127
|
+
'rgba(34,34,34,0.557309) 46.67%,' +
|
|
128
|
+
'rgba(35,35,35,0.442691) 53.33%,' +
|
|
129
|
+
'rgba(36,36,36,0.331884) 60%,' +
|
|
130
|
+
'rgba(37,37,37,0.231775) 66.67%,' +
|
|
131
|
+
'rgba(38,38,38,0.147411) 73.33%,' +
|
|
132
|
+
'rgba(39,39,39,0.0816599) 80%,' +
|
|
133
|
+
'rgba(39,39,39,0.03551) 86.67%,' +
|
|
134
|
+
'rgba(39,39,39,0.0086472) 93.33%,' +
|
|
135
|
+
'rgba(39,39,39,0)';
|
|
136
|
+
|
|
137
|
+
const gradientToBottomStyle = {
|
|
138
|
+
background: `linear-gradient(to bottom, ${_gradient} 100%);`,
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const gradientToTopStyle = {
|
|
142
|
+
background: `linear-gradient(to top, ${_gradient} 100%);`,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const breakpointBase = 0;
|
|
122
146
|
|
|
123
|
-
const breakpointXS =
|
|
147
|
+
const breakpointXS = 480;
|
|
124
148
|
|
|
125
|
-
const breakpointS =
|
|
149
|
+
const breakpointS = 760;
|
|
126
150
|
|
|
127
|
-
const breakpointM =
|
|
151
|
+
const breakpointM = 1000;
|
|
128
152
|
|
|
129
|
-
const breakpointL =
|
|
153
|
+
const breakpointL = 1300;
|
|
130
154
|
|
|
131
|
-
const breakpointXL =
|
|
155
|
+
const breakpointXL = 1760;
|
|
132
156
|
|
|
133
|
-
const breakpointXXL =
|
|
157
|
+
const breakpointXXL = 1920;
|
|
134
158
|
|
|
135
159
|
const breakpoint = {
|
|
136
160
|
base: breakpointBase,
|
|
@@ -143,15 +167,13 @@ const breakpoint = {
|
|
|
143
167
|
};
|
|
144
168
|
|
|
145
169
|
function getMediaQueryMin(min) {
|
|
146
|
-
return `@media(min-width:${breakpoint[min]})`;
|
|
170
|
+
return `@media(min-width:${breakpoint[min]}px)`;
|
|
147
171
|
}
|
|
148
172
|
|
|
149
173
|
const spacingFluidMedium = 'clamp(16px, 1.25vw + 12px, 36px)';
|
|
150
174
|
|
|
151
175
|
const gridGap = spacingFluidMedium;
|
|
152
176
|
|
|
153
|
-
const gridWidthMin = '320px';
|
|
154
|
-
|
|
155
177
|
const gridWidthMax = '2560px';
|
|
156
178
|
|
|
157
179
|
// fluid sizing calculated by https://fluidtypography.com/#app-get-started
|
|
@@ -162,70 +184,12 @@ const gridSafeZoneBase = 'clamp(22px, 10.625vw - 12px, 192px)';
|
|
|
162
184
|
// gridSafeZoneXXL: Viewport Width Range = 1920 - 2560px / Size Range = 192 - 512px
|
|
163
185
|
const gridSafeZoneXXL = 'clamp(192px, 50vw - 768px, 512px)';
|
|
164
186
|
|
|
165
|
-
const gridFullColumnStart = 'full-start';
|
|
166
|
-
|
|
167
|
-
const gridExtendedColumnStart = 'extended-start';
|
|
168
|
-
|
|
169
|
-
const gridBasicColumnStart = 'basic-start';
|
|
170
|
-
|
|
171
|
-
const gridNarrowColumnStart = 'narrow-start';
|
|
172
|
-
|
|
173
|
-
const gridNarrowColumnEnd = 'narrow-end';
|
|
174
|
-
|
|
175
|
-
const gridBasicColumnEnd = 'basic-end';
|
|
176
|
-
|
|
177
|
-
const gridExtendedColumnEnd = 'extended-end';
|
|
178
|
-
|
|
179
|
-
const gridFullColumnEnd = 'full-end';
|
|
180
|
-
|
|
181
|
-
const _cssVariableGridExtendedSpanOneHalf = '--pds-grid-extended-span-one-half';
|
|
182
|
-
const _cssVariableGridBasicSpanOneHalf = '--pds-grid-basic-span-one-half';
|
|
183
|
-
const _cssVariableGridBasicSpanOneThird = '--pds-grid-basic-span-one-third';
|
|
184
|
-
const _cssVariableGridBasicSpanTwoThirds = '--pds-grid-basic-span-two-thirds';
|
|
185
|
-
const _cssVariableGridNarrowSpanOneHalf = '--pds-grid-narrow-span-one-half';
|
|
186
|
-
const _cssVariableGridSafeZone = '--pds-internal-grid-safe-zone';
|
|
187
|
-
|
|
188
|
-
const outerColumn = `minmax(0, calc(var(${_cssVariableGridSafeZone}) - ${gridGap}))`;
|
|
189
|
-
const column = 'minmax(0, 1fr)';
|
|
190
|
-
const getColumns = (repeat) => (repeat > 1 ? `repeat(${repeat}, ${column})` : column);
|
|
191
|
-
const getColumnSpan = (span) => `span ${span}`;
|
|
192
|
-
const getGridTemplateColumns = (layout) => layout === 'mobile'
|
|
193
|
-
? `[${gridFullColumnStart}] ${outerColumn} [${gridExtendedColumnStart} ${gridBasicColumnStart} ${gridNarrowColumnStart}] ${getColumns(6)} [${gridNarrowColumnEnd} ${gridBasicColumnEnd} ${gridExtendedColumnEnd}] ${outerColumn} [${gridFullColumnEnd}]`
|
|
194
|
-
: `[${gridFullColumnStart}] ${outerColumn} [${gridExtendedColumnStart}] ${getColumns(1)} [${gridBasicColumnStart}] ${getColumns(2)} [${gridNarrowColumnStart}] ${getColumns(8)} [${gridNarrowColumnEnd}] ${getColumns(2)} [${gridBasicColumnEnd}] ${getColumns(1)} [${gridExtendedColumnEnd}] ${outerColumn} [${gridFullColumnEnd}]`;
|
|
195
|
-
({
|
|
196
|
-
[_cssVariableGridSafeZone]: gridSafeZoneBase,
|
|
197
|
-
[_cssVariableGridExtendedSpanOneHalf]: getColumnSpan(3),
|
|
198
|
-
[_cssVariableGridBasicSpanOneHalf]: getColumnSpan(3),
|
|
199
|
-
[_cssVariableGridBasicSpanOneThird]: getColumnSpan(2),
|
|
200
|
-
[_cssVariableGridBasicSpanTwoThirds]: getColumnSpan(4),
|
|
201
|
-
[_cssVariableGridNarrowSpanOneHalf]: getColumnSpan(3),
|
|
202
|
-
display: 'grid',
|
|
203
|
-
gridGap,
|
|
204
|
-
gridTemplateColumns: getGridTemplateColumns('mobile'),
|
|
205
|
-
minWidth: gridWidthMin,
|
|
206
|
-
maxWidth: gridWidthMax,
|
|
207
|
-
margin: 0,
|
|
208
|
-
padding: `0 calc(50% - ${gridWidthMax} / 2)`,
|
|
209
|
-
boxSizing: 'content-box',
|
|
210
|
-
[getMediaQueryMin('s')]: {
|
|
211
|
-
[_cssVariableGridExtendedSpanOneHalf]: getColumnSpan(7),
|
|
212
|
-
[_cssVariableGridBasicSpanOneHalf]: getColumnSpan(6),
|
|
213
|
-
[_cssVariableGridBasicSpanOneThird]: getColumnSpan(4),
|
|
214
|
-
[_cssVariableGridBasicSpanTwoThirds]: getColumnSpan(8),
|
|
215
|
-
[_cssVariableGridNarrowSpanOneHalf]: getColumnSpan(4),
|
|
216
|
-
gridTemplateColumns: getGridTemplateColumns('desktop'),
|
|
217
|
-
},
|
|
218
|
-
[getMediaQueryMin('xxl')]: {
|
|
219
|
-
[_cssVariableGridSafeZone]: gridSafeZoneXXL,
|
|
220
|
-
},
|
|
221
|
-
});
|
|
222
|
-
|
|
223
187
|
function getMediaQueryMax(max) {
|
|
224
|
-
return `@media(max-width:${breakpoint[max]
|
|
188
|
+
return `@media(max-width:${breakpoint[max] - 1}px)`;
|
|
225
189
|
}
|
|
226
190
|
|
|
227
191
|
function getMediaQueryMinMax(min, max) {
|
|
228
|
-
return `@media(min-width:${breakpoint[min]}) and (max-width:${breakpoint[max]
|
|
192
|
+
return `@media(min-width:${breakpoint[min]}px) and (max-width:${breakpoint[max] - 1}px)`;
|
|
229
193
|
}
|
|
230
194
|
|
|
231
195
|
const spacingStaticXSmall = '4px';
|
|
@@ -240,9 +204,11 @@ const spacingFluidXSmall = 'clamp(4px, 0.25vw + 3px, 8px)';
|
|
|
240
204
|
|
|
241
205
|
const spacingFluidSmall = 'clamp(8px, 0.5vw + 6px, 16px)';
|
|
242
206
|
|
|
207
|
+
const spacingFluidLarge = 'clamp(32px, 2.75vw + 23px, 76px)';
|
|
208
|
+
|
|
243
209
|
const themeDarkBackgroundShading = 'rgba(1, 2, 5, 0.67)';
|
|
244
210
|
|
|
245
|
-
const _displayFontPartA = `${
|
|
211
|
+
const _displayFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
246
212
|
const _displayFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
247
213
|
|
|
248
214
|
const displayMediumStyle = {
|
|
@@ -289,13 +255,18 @@ const textSmallStyle = {
|
|
|
289
255
|
...fontHyphenationStyle,
|
|
290
256
|
};
|
|
291
257
|
|
|
258
|
+
const textLargeStyle = {
|
|
259
|
+
font: `${_textFontPartA}${fontSizeTextLarge}${_textFontPartB}`,
|
|
260
|
+
...fontHyphenationStyle,
|
|
261
|
+
};
|
|
262
|
+
|
|
292
263
|
// TODO: we shouldn't exclude xxl breakpoint
|
|
293
264
|
const mediaQueries = Object.entries(breakpoint)
|
|
294
265
|
.filter(([key]) => key !== 'xxl')
|
|
295
|
-
.map(([, val]) => `(min-width:${val})`);
|
|
266
|
+
.map(([, val]) => `(min-width:${val}px)`);
|
|
296
267
|
hasWindow && window.matchMedia ? mediaQueries.map(window.matchMedia) : [];
|
|
297
268
|
|
|
298
|
-
Object.entries(breakpoint).reduce((result, [key, val]) => (Object.assign(Object.assign({}, result), { [val]: key })), {});
|
|
269
|
+
Object.entries(breakpoint).reduce((result, [key, val]) => (Object.assign(Object.assign({}, result), { [`${val}px`]: key })), {});
|
|
299
270
|
|
|
300
271
|
const hasVisibleIcon = (iconName, iconSource) => {
|
|
301
272
|
return iconName !== 'none' || !!iconSource;
|
|
@@ -505,12 +476,6 @@ var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symb
|
|
|
505
476
|
|
|
506
477
|
var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof$1(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof$1(document)) === 'object' && document.nodeType === 9;
|
|
507
478
|
|
|
508
|
-
var module$1 = /*#__PURE__*/Object.freeze({
|
|
509
|
-
__proto__: null,
|
|
510
|
-
default: isBrowser,
|
|
511
|
-
isBrowser: isBrowser
|
|
512
|
-
});
|
|
513
|
-
|
|
514
479
|
var isProduction = process.env.NODE_ENV === 'production';
|
|
515
480
|
function warning(condition, message) {
|
|
516
481
|
if (!isProduction) {
|
|
@@ -1058,7 +1023,7 @@ function () {
|
|
|
1058
1023
|
|
|
1059
1024
|
return ConditionalRule;
|
|
1060
1025
|
}();
|
|
1061
|
-
var keyRegExp = /@media|@supports\s+/;
|
|
1026
|
+
var keyRegExp = /@container|@media|@supports\s+/;
|
|
1062
1027
|
var pluginConditionalRule = {
|
|
1063
1028
|
onCreateRule: function onCreateRule(key, styles, options) {
|
|
1064
1029
|
return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null;
|
|
@@ -1355,7 +1320,7 @@ var pluginSimpleRule = {
|
|
|
1355
1320
|
}
|
|
1356
1321
|
};
|
|
1357
1322
|
|
|
1358
|
-
var plugins
|
|
1323
|
+
var plugins = [pluginStyleRule, pluginConditionalRule, pluginKeyframesRule, pluginKeyframeRule, pluginFontFaceRule, pluginViewportRule, pluginSimpleRule];
|
|
1359
1324
|
|
|
1360
1325
|
var defaultUpdateOptions = {
|
|
1361
1326
|
process: true
|
|
@@ -2622,7 +2587,7 @@ var Jss =
|
|
|
2622
2587
|
function () {
|
|
2623
2588
|
function Jss(options) {
|
|
2624
2589
|
this.id = instanceCounter++;
|
|
2625
|
-
this.version = "10.
|
|
2590
|
+
this.version = "10.10.0";
|
|
2626
2591
|
this.plugins = new PluginsRegistry();
|
|
2627
2592
|
this.options = {
|
|
2628
2593
|
id: {
|
|
@@ -2636,8 +2601,8 @@ function () {
|
|
|
2636
2601
|
minify: false
|
|
2637
2602
|
});
|
|
2638
2603
|
|
|
2639
|
-
for (var i = 0; i < plugins
|
|
2640
|
-
this.plugins.use(plugins
|
|
2604
|
+
for (var i = 0; i < plugins.length; i++) {
|
|
2605
|
+
this.plugins.use(plugins[i], {
|
|
2641
2606
|
queue: 'internal'
|
|
2642
2607
|
});
|
|
2643
2608
|
}
|
|
@@ -2902,54 +2867,24 @@ var jss_esm = /*#__PURE__*/Object.freeze({
|
|
|
2902
2867
|
toCssValue: toCssValue
|
|
2903
2868
|
});
|
|
2904
2869
|
|
|
2905
|
-
function getAugmentedNamespace(n) {
|
|
2906
|
-
if (n.__esModule) return n;
|
|
2907
|
-
var f = n.default;
|
|
2908
|
-
if (typeof f == "function") {
|
|
2909
|
-
var a = function a () {
|
|
2910
|
-
if (this instanceof a) {
|
|
2911
|
-
var args = [null];
|
|
2912
|
-
args.push.apply(args, arguments);
|
|
2913
|
-
var Ctor = Function.bind.apply(f, args);
|
|
2914
|
-
return new Ctor();
|
|
2915
|
-
}
|
|
2916
|
-
return f.apply(this, arguments);
|
|
2917
|
-
};
|
|
2918
|
-
a.prototype = f.prototype;
|
|
2919
|
-
} else a = {};
|
|
2920
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
2921
|
-
Object.keys(n).forEach(function (k) {
|
|
2922
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
2923
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
2924
|
-
enumerable: true,
|
|
2925
|
-
get: function () {
|
|
2926
|
-
return n[k];
|
|
2927
|
-
}
|
|
2928
|
-
});
|
|
2929
|
-
});
|
|
2930
|
-
return a;
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
2870
|
/* eslint-disable no-var, prefer-template */
|
|
2934
2871
|
var uppercasePattern = /[A-Z]/g;
|
|
2935
2872
|
var msPattern = /^ms-/;
|
|
2936
|
-
var cache
|
|
2873
|
+
var cache = {};
|
|
2937
2874
|
|
|
2938
2875
|
function toHyphenLower(match) {
|
|
2939
2876
|
return '-' + match.toLowerCase()
|
|
2940
2877
|
}
|
|
2941
2878
|
|
|
2942
2879
|
function hyphenateStyleName(name) {
|
|
2943
|
-
if (cache
|
|
2944
|
-
return cache
|
|
2880
|
+
if (cache.hasOwnProperty(name)) {
|
|
2881
|
+
return cache[name]
|
|
2945
2882
|
}
|
|
2946
2883
|
|
|
2947
2884
|
var hName = name.replace(uppercasePattern, toHyphenLower);
|
|
2948
|
-
return (cache
|
|
2885
|
+
return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)
|
|
2949
2886
|
}
|
|
2950
2887
|
|
|
2951
|
-
var index_cjs = hyphenateStyleName;
|
|
2952
|
-
|
|
2953
2888
|
/**
|
|
2954
2889
|
* Convert camel cased property names to dash separated.
|
|
2955
2890
|
*/
|
|
@@ -2958,7 +2893,7 @@ function convertCase(style) {
|
|
|
2958
2893
|
var converted = {};
|
|
2959
2894
|
|
|
2960
2895
|
for (var prop in style) {
|
|
2961
|
-
var key = prop.indexOf('--') === 0 ? prop :
|
|
2896
|
+
var key = prop.indexOf('--') === 0 ? prop : hyphenateStyleName(prop);
|
|
2962
2897
|
converted[key] = style[prop];
|
|
2963
2898
|
}
|
|
2964
2899
|
|
|
@@ -2992,7 +2927,7 @@ function camelCase() {
|
|
|
2992
2927
|
return value;
|
|
2993
2928
|
}
|
|
2994
2929
|
|
|
2995
|
-
var hyphenatedProp =
|
|
2930
|
+
var hyphenatedProp = hyphenateStyleName(prop); // There was no camel case in place
|
|
2996
2931
|
|
|
2997
2932
|
if (prop === hyphenatedProp) return value;
|
|
2998
2933
|
rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.
|
|
@@ -3297,6 +3232,34 @@ function jssNested() {
|
|
|
3297
3232
|
};
|
|
3298
3233
|
}
|
|
3299
3234
|
|
|
3235
|
+
function getAugmentedNamespace(n) {
|
|
3236
|
+
if (n.__esModule) return n;
|
|
3237
|
+
var f = n.default;
|
|
3238
|
+
if (typeof f == "function") {
|
|
3239
|
+
var a = function a () {
|
|
3240
|
+
if (this instanceof a) {
|
|
3241
|
+
var args = [null];
|
|
3242
|
+
args.push.apply(args, arguments);
|
|
3243
|
+
var Ctor = Function.bind.apply(f, args);
|
|
3244
|
+
return new Ctor();
|
|
3245
|
+
}
|
|
3246
|
+
return f.apply(this, arguments);
|
|
3247
|
+
};
|
|
3248
|
+
a.prototype = f.prototype;
|
|
3249
|
+
} else a = {};
|
|
3250
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
3251
|
+
Object.keys(n).forEach(function (k) {
|
|
3252
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
3253
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
3254
|
+
enumerable: true,
|
|
3255
|
+
get: function () {
|
|
3256
|
+
return n[k];
|
|
3257
|
+
}
|
|
3258
|
+
});
|
|
3259
|
+
});
|
|
3260
|
+
return a;
|
|
3261
|
+
}
|
|
3262
|
+
|
|
3300
3263
|
var _tslib$1 = {};
|
|
3301
3264
|
|
|
3302
3265
|
(function (exports) {
|
|
@@ -3705,10 +3668,10 @@ const themeLight = {
|
|
|
3705
3668
|
contrastHighColor: '#535457',
|
|
3706
3669
|
contrastHighColorDarken: '#353638',
|
|
3707
3670
|
contrastHighColorLighten: '#717276',
|
|
3708
|
-
hoverColor: 'rgba(148, 149, 152,
|
|
3671
|
+
hoverColor: 'rgba(148, 149, 152, .18)',
|
|
3709
3672
|
hoverColorDarken: '#75767A',
|
|
3710
3673
|
activeColor: 'rgba(148, 149, 152, 0.20)',
|
|
3711
|
-
focusColor: '#
|
|
3674
|
+
focusColor: '#1A44EA',
|
|
3712
3675
|
disabledColor: '#949598',
|
|
3713
3676
|
errorColor: '#E7323B',
|
|
3714
3677
|
errorColorDarken: '#C51720',
|
|
@@ -3743,10 +3706,10 @@ const themeDark = {
|
|
|
3743
3706
|
contrastHighColor: '#AFB0B3',
|
|
3744
3707
|
contrastHighColorDarken: '#909195',
|
|
3745
3708
|
contrastHighColorLighten: '#CECFD1',
|
|
3746
|
-
hoverColor: 'rgba(
|
|
3747
|
-
hoverColorDarken: '#
|
|
3709
|
+
hoverColor: 'rgba(148, 149, 152, .18)',
|
|
3710
|
+
hoverColorDarken: '#75767A',
|
|
3748
3711
|
activeColor: 'rgba(126, 127, 130, 0.20)',
|
|
3749
|
-
focusColor: '#
|
|
3712
|
+
focusColor: '#1A44EA',
|
|
3750
3713
|
disabledColor: '#7E7F82',
|
|
3751
3714
|
errorColor: '#CB3333',
|
|
3752
3715
|
errorColorDarken: '#9A2727',
|
|
@@ -3808,6 +3771,14 @@ const getInsetJssStyle = (value = 0) => {
|
|
|
3808
3771
|
bottom: value,
|
|
3809
3772
|
};
|
|
3810
3773
|
};
|
|
3774
|
+
// reset initial styles, e.g. in case link-pure is used with slotted anchor and nested within e.g. an accordion
|
|
3775
|
+
const getResetInitialStylesForSlottedAnchor = {
|
|
3776
|
+
margin: 0,
|
|
3777
|
+
padding: 0,
|
|
3778
|
+
outline: 0,
|
|
3779
|
+
borderRadius: 0,
|
|
3780
|
+
background: 'transparent',
|
|
3781
|
+
};
|
|
3811
3782
|
const getFocusJssStyle = (opts) => {
|
|
3812
3783
|
const { pseudo, offset: outlineOffset, color: outlineColor, } = Object.assign({ color: 'currentColor', offset: 2 }, opts);
|
|
3813
3784
|
return pseudo
|
|
@@ -3926,14 +3897,14 @@ const buildResponsiveStyles = (rawValue, getJssStyle) => {
|
|
|
3926
3897
|
[getMediaQueryMin(breakpointValue)]: getJssStyle(value[breakpointValue]) })), getJssStyle(value.base))
|
|
3927
3898
|
: getJssStyle(value);
|
|
3928
3899
|
};
|
|
3929
|
-
const isObject
|
|
3900
|
+
const isObject = (obj) => typeof obj === 'object' && !Array.isArray(obj);
|
|
3930
3901
|
// NOTE: taken from https://stackoverflow.com/a/48218209
|
|
3931
3902
|
const mergeDeep = (...objects) => {
|
|
3932
3903
|
return objects.reduce((prev, obj) => {
|
|
3933
3904
|
Object.keys(obj).forEach((key) => {
|
|
3934
3905
|
const pVal = prev[key];
|
|
3935
3906
|
const oVal = obj[key];
|
|
3936
|
-
if (isObject
|
|
3907
|
+
if (isObject(pVal) && isObject(oVal)) {
|
|
3937
3908
|
prev[key] = mergeDeep(pVal, oVal);
|
|
3938
3909
|
}
|
|
3939
3910
|
else {
|
|
@@ -3944,1961 +3915,131 @@ const mergeDeep = (...objects) => {
|
|
|
3944
3915
|
}, {});
|
|
3945
3916
|
};
|
|
3946
3917
|
|
|
3947
|
-
|
|
3948
|
-
{ name: 'Model', id: 'model' },
|
|
3949
|
-
{ name: 'Interest', id: 'interest' },
|
|
3950
|
-
{ name: 'VIN', id: 'vin' },
|
|
3951
|
-
{ name: 'Purchase Intention', id: 'purchaseIntention' },
|
|
3952
|
-
{ name: 'Status', id: 'status' },
|
|
3953
|
-
{ name: 'Comment', id: 'comment' },
|
|
3954
|
-
{ name: 'Lead ID', id: 'leadId' },
|
|
3955
|
-
{ name: 'Action', id: 'action', hideLabel: true },
|
|
3956
|
-
].map((item, i) => ({
|
|
3957
|
-
...item,
|
|
3958
|
-
...(i > 0 &&
|
|
3959
|
-
i < 7 &&
|
|
3960
|
-
i !== 5 && {
|
|
3961
|
-
active: i === 1,
|
|
3962
|
-
direction: 'asc',
|
|
3963
|
-
}),
|
|
3964
|
-
}));
|
|
3965
|
-
|
|
3966
|
-
[
|
|
3967
|
-
{ name: 'Column 1', id: 'col1' },
|
|
3968
|
-
{ name: 'Column 2', id: 'col2' },
|
|
3969
|
-
{ name: 'Column 3', id: 'col3' },
|
|
3970
|
-
].map((item, i) => ({
|
|
3971
|
-
...item,
|
|
3972
|
-
active: i === 1,
|
|
3973
|
-
direction: 'asc',
|
|
3974
|
-
}));
|
|
3975
|
-
|
|
3976
|
-
Array.from(Array(4)).map(() => ({
|
|
3977
|
-
imageUrl: 'https://nav.porsche.com/00BC524/series-assets/1366/911@2x.jpg',
|
|
3978
|
-
imageWidth: 80,
|
|
3979
|
-
imageHeight: 48,
|
|
3980
|
-
html: "<a href='#'>link</a> <b>bold</b> <i>italic</i> <strong>strong</strong> <em>emphasized</em>",
|
|
3981
|
-
longText: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr',
|
|
3982
|
-
shortText: 'Some text',
|
|
3983
|
-
}));
|
|
3984
|
-
|
|
3985
|
-
var now = Date.now();
|
|
3986
|
-
var fnValuesNs = "fnValues" + now;
|
|
3987
|
-
var fnRuleNs = "fnStyle" + ++now;
|
|
3988
|
-
|
|
3989
|
-
var functionPlugin = function functionPlugin() {
|
|
3990
|
-
return {
|
|
3991
|
-
onCreateRule: function onCreateRule(name, decl, options) {
|
|
3992
|
-
if (typeof decl !== 'function') return null;
|
|
3993
|
-
var rule = createRule(name, {}, options);
|
|
3994
|
-
rule[fnRuleNs] = decl;
|
|
3995
|
-
return rule;
|
|
3996
|
-
},
|
|
3997
|
-
onProcessStyle: function onProcessStyle(style, rule) {
|
|
3998
|
-
// We need to extract function values from the declaration, so that we can keep core unaware of them.
|
|
3999
|
-
// We need to do that only once.
|
|
4000
|
-
// We don't need to extract functions on each style update, since this can happen only once.
|
|
4001
|
-
// We don't support function values inside of function rules.
|
|
4002
|
-
if (fnValuesNs in rule || fnRuleNs in rule) return style;
|
|
4003
|
-
var fnValues = {};
|
|
4004
|
-
|
|
4005
|
-
for (var prop in style) {
|
|
4006
|
-
var value = style[prop];
|
|
4007
|
-
if (typeof value !== 'function') continue;
|
|
4008
|
-
delete style[prop];
|
|
4009
|
-
fnValues[prop] = value;
|
|
4010
|
-
}
|
|
4011
|
-
|
|
4012
|
-
rule[fnValuesNs] = fnValues;
|
|
4013
|
-
return style;
|
|
4014
|
-
},
|
|
4015
|
-
onUpdate: function onUpdate(data, rule, sheet, options) {
|
|
4016
|
-
var styleRule = rule;
|
|
4017
|
-
var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object
|
|
4018
|
-
// will be returned from that function.
|
|
4019
|
-
|
|
4020
|
-
if (fnRule) {
|
|
4021
|
-
// Empty object will remove all currently defined props
|
|
4022
|
-
// in case function rule returns a falsy value.
|
|
4023
|
-
styleRule.style = fnRule(data) || {};
|
|
4024
|
-
|
|
4025
|
-
if (process.env.NODE_ENV === 'development') {
|
|
4026
|
-
for (var prop in styleRule.style) {
|
|
4027
|
-
if (typeof styleRule.style[prop] === 'function') {
|
|
4028
|
-
process.env.NODE_ENV !== "production" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;
|
|
4029
|
-
break;
|
|
4030
|
-
}
|
|
4031
|
-
}
|
|
4032
|
-
}
|
|
4033
|
-
}
|
|
3918
|
+
const hasDocument = typeof document !== 'undefined';
|
|
4034
3919
|
|
|
4035
|
-
|
|
3920
|
+
hasDocument && 'scrollBehavior' in document.documentElement.style;
|
|
4036
3921
|
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
styleRule.prop(_prop, fnValues[_prop](data), options);
|
|
4040
|
-
}
|
|
4041
|
-
}
|
|
4042
|
-
}
|
|
4043
|
-
};
|
|
3922
|
+
const isThemeDark = (theme) => {
|
|
3923
|
+
return theme === 'dark';
|
|
4044
3924
|
};
|
|
4045
3925
|
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
result = Symbol.observable;
|
|
4053
|
-
} else {
|
|
4054
|
-
result = Symbol('observable');
|
|
4055
|
-
Symbol.observable = result;
|
|
4056
|
-
}
|
|
4057
|
-
} else {
|
|
4058
|
-
result = '@@observable';
|
|
4059
|
-
}
|
|
4060
|
-
|
|
4061
|
-
return result;
|
|
4062
|
-
}
|
|
4063
|
-
|
|
4064
|
-
/* global window */
|
|
4065
|
-
|
|
4066
|
-
var root;
|
|
4067
|
-
|
|
4068
|
-
if (typeof self !== 'undefined') {
|
|
4069
|
-
root = self;
|
|
4070
|
-
} else if (typeof window !== 'undefined') {
|
|
4071
|
-
root = window;
|
|
4072
|
-
} else if (typeof global !== 'undefined') {
|
|
4073
|
-
root = global;
|
|
4074
|
-
} else if (typeof module !== 'undefined') {
|
|
4075
|
-
root = module;
|
|
4076
|
-
} else {
|
|
4077
|
-
root = Function('return this')();
|
|
4078
|
-
}
|
|
4079
|
-
|
|
4080
|
-
var result = symbolObservablePonyfill(root);
|
|
4081
|
-
|
|
4082
|
-
var isObservable = function isObservable(value) {
|
|
4083
|
-
return value && value[result] && value === value[result]();
|
|
3926
|
+
const formatObjectOutput = (value) => {
|
|
3927
|
+
return JSON.stringify(value)
|
|
3928
|
+
.replace(/"([a-zA-Z?]+)":/g, '$1:') // remove double quotes from keys
|
|
3929
|
+
.replace(/([,:{])/g, '$1 ') // add space after following: ,:{
|
|
3930
|
+
.replace(/(})/g, ' $1') // add space before following: }
|
|
3931
|
+
.replace(/^"(.+)"$/, '$1'); // remove wrapping double quotes
|
|
4084
3932
|
};
|
|
3933
|
+
'value, ' +
|
|
3934
|
+
formatObjectOutput(BREAKPOINTS.reduce((prev, key) => (Object.assign(Object.assign({}, prev), { [key + (key !== 'base' ? '?' : '')]: 'value' })), {})).replace(/"/g, '');
|
|
4085
3935
|
|
|
4086
|
-
|
|
4087
|
-
return {
|
|
4088
|
-
onCreateRule: function onCreateRule(name, decl, options) {
|
|
4089
|
-
if (!isObservable(decl)) return null;
|
|
4090
|
-
var style$ = decl;
|
|
4091
|
-
var rule = createRule(name, {}, options); // TODO
|
|
4092
|
-
// Call `stream.subscribe()` returns a subscription, which should be explicitly
|
|
4093
|
-
// unsubscribed from when we know this sheet is no longer needed.
|
|
4094
|
-
|
|
4095
|
-
style$.subscribe(function (style) {
|
|
4096
|
-
for (var prop in style) {
|
|
4097
|
-
rule.prop(prop, style[prop], updateOptions);
|
|
4098
|
-
}
|
|
4099
|
-
});
|
|
4100
|
-
return rule;
|
|
4101
|
-
},
|
|
4102
|
-
onProcessRule: function onProcessRule(rule) {
|
|
4103
|
-
if (rule && rule.type !== 'style') return;
|
|
4104
|
-
var styleRule = rule;
|
|
4105
|
-
var style = styleRule.style;
|
|
4106
|
-
|
|
4107
|
-
var _loop = function _loop(prop) {
|
|
4108
|
-
var value = style[prop];
|
|
4109
|
-
if (!isObservable(value)) return "continue";
|
|
4110
|
-
delete style[prop];
|
|
4111
|
-
value.subscribe({
|
|
4112
|
-
next: function next(nextValue) {
|
|
4113
|
-
styleRule.prop(prop, nextValue, updateOptions);
|
|
4114
|
-
}
|
|
4115
|
-
});
|
|
4116
|
-
};
|
|
4117
|
-
|
|
4118
|
-
for (var prop in style) {
|
|
4119
|
-
var _ret = _loop(prop);
|
|
3936
|
+
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
4120
3937
|
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
}
|
|
4124
|
-
|
|
3938
|
+
const getComponentCss$T = (size, compact, open, theme) => {
|
|
3939
|
+
const { primaryColor, hoverColor, focusColor, contrastLowColor } = getThemedColors(theme);
|
|
3940
|
+
const border = `1px solid ${contrastLowColor}`;
|
|
3941
|
+
return getCss(Object.assign(Object.assign({ '@global': {
|
|
3942
|
+
':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)),
|
|
3943
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', justifyContent: 'space-between', margin: '2px 0', width: '100%', textDecoration: 'none', border: 0, outline: 0, gap: '24px', background: 'transparent', cursor: 'pointer', textAlign: 'left', color: primaryColor }, textSmallStyle), { fontWeight: fontWeight.semiBold }), buildResponsiveStyles(size, (s) => ({
|
|
3944
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3945
|
+
// @ts-ignore
|
|
3946
|
+
fontSize: fontSizeText[s],
|
|
3947
|
+
padding: compact ? '4px 0' : `${s === 'medium' ? '20px' : '12px'} 0`,
|
|
3948
|
+
}))), mergeDeep({
|
|
3949
|
+
'&::before': Object.assign({ content: '""', position: 'absolute', borderRadius: borderRadiusSmall, left: '-4px', right: '-4px' }, (compact
|
|
3950
|
+
? {
|
|
3951
|
+
top: '2px',
|
|
3952
|
+
bottom: '2px',
|
|
3953
|
+
}
|
|
3954
|
+
: {
|
|
3955
|
+
top: '6px',
|
|
3956
|
+
bottom: '6px',
|
|
3957
|
+
})),
|
|
3958
|
+
}, hoverMediaQuery({
|
|
3959
|
+
'&::before': {
|
|
3960
|
+
transition: getTransition('background-color'),
|
|
3961
|
+
},
|
|
3962
|
+
'&:hover::before': {
|
|
3963
|
+
background: hoverColor,
|
|
3964
|
+
},
|
|
3965
|
+
}))), { '&:focus::before': {
|
|
3966
|
+
border: `${borderWidthBase} solid ${focusColor}`,
|
|
3967
|
+
}, '&:not(:focus-visible)::before': {
|
|
3968
|
+
border: 0,
|
|
3969
|
+
} }),
|
|
3970
|
+
} }, (!compact && {
|
|
3971
|
+
root: {
|
|
3972
|
+
borderBottom: border,
|
|
3973
|
+
},
|
|
3974
|
+
})), { heading: {
|
|
3975
|
+
margin: 0,
|
|
3976
|
+
padding: 0,
|
|
3977
|
+
}, icon: {
|
|
3978
|
+
width: fontLineHeight,
|
|
3979
|
+
height: fontLineHeight,
|
|
3980
|
+
transformOrigin: '50% 50%',
|
|
3981
|
+
transform: open ? 'rotate3d(0)' : 'rotate3d(0,0,1,90deg)',
|
|
3982
|
+
transition: getTransition('transform'),
|
|
3983
|
+
}, collapsible: Object.assign({ color: primaryColor, padding: 0, overflow: 'hidden' }, (open
|
|
3984
|
+
? {
|
|
3985
|
+
height: 'auto',
|
|
3986
|
+
paddingBottom: compact ? spacingStaticSmall : '24px',
|
|
3987
|
+
visibility: 'visible',
|
|
3988
|
+
transition: getTransition('height') + `,visibility ${transitionDuration}`,
|
|
3989
|
+
animation: `$open ${transitionDuration} ease forwards`,
|
|
3990
|
+
}
|
|
3991
|
+
: {
|
|
3992
|
+
height: 0,
|
|
3993
|
+
visibility: 'hidden',
|
|
3994
|
+
transition: getTransition('height') + `,visibility ${transitionDuration} linear ${transitionDuration}`,
|
|
3995
|
+
})),
|
|
3996
|
+
// TODO: this doesn't get shortened and results in `keyframes-open` for some unknown reason
|
|
3997
|
+
'@keyframes open': {
|
|
3998
|
+
'0%,99%': {
|
|
3999
|
+
overflow: 'hidden',
|
|
4000
|
+
},
|
|
4001
|
+
'100%': {
|
|
4002
|
+
overflow: 'visible',
|
|
4003
|
+
},
|
|
4004
|
+
} }));
|
|
4125
4005
|
};
|
|
4126
4006
|
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
* - Requires semicolon and new line after the value (except of last line)
|
|
4132
|
-
* - No nested rules support
|
|
4133
|
-
*/
|
|
4134
|
-
|
|
4135
|
-
var parse = function parse(cssText) {
|
|
4136
|
-
var style = {};
|
|
4137
|
-
var split = cssText.split(semiWithNl);
|
|
4138
|
-
|
|
4139
|
-
for (var i = 0; i < split.length; i++) {
|
|
4140
|
-
var decl = (split[i] || '').trim();
|
|
4141
|
-
if (!decl) continue;
|
|
4142
|
-
var colonIndex = decl.indexOf(':');
|
|
4143
|
-
|
|
4144
|
-
if (colonIndex === -1) {
|
|
4145
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Malformed CSS string \"" + decl + "\"") : void 0;
|
|
4146
|
-
continue;
|
|
4147
|
-
}
|
|
4148
|
-
|
|
4149
|
-
var prop = decl.substr(0, colonIndex).trim();
|
|
4150
|
-
var value = decl.substr(colonIndex + 1).trim();
|
|
4151
|
-
style[prop] = value;
|
|
4152
|
-
}
|
|
4007
|
+
const TOAST_Z_INDEX = 999999;
|
|
4008
|
+
const MODAL_Z_INDEX = 99999;
|
|
4009
|
+
const POPOVER_Z_INDEX = 9999;
|
|
4010
|
+
const BANNER_Z_INDEX = 99;
|
|
4153
4011
|
|
|
4154
|
-
|
|
4012
|
+
const oneColumnWidthS = `calc((100% - ${gridSafeZoneBase} * 2 - ${gridGap} * 13) / 14)`;
|
|
4013
|
+
const oneColumnWidthXXL = `calc((min(100%, ${gridWidthMax}) - ${gridSafeZoneXXL} * 2 - ${gridGap} * 13) / 14)`;
|
|
4014
|
+
const offsetHorizontalXXL = `max(0px, (100% - ${gridWidthMax}) / 2)`;
|
|
4015
|
+
const widthMap$1 = {
|
|
4016
|
+
narrow: {
|
|
4017
|
+
padding: `0 ${gridSafeZoneBase}`,
|
|
4018
|
+
[getMediaQueryMin('s')]: {
|
|
4019
|
+
padding: `0 calc(${gridSafeZoneBase} + ${gridGap} * 3 + ${oneColumnWidthS} * 3)`,
|
|
4020
|
+
},
|
|
4021
|
+
[getMediaQueryMin('xxl')]: {
|
|
4022
|
+
padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL} + ${gridGap} * 3 + ${oneColumnWidthXXL} * 3)`,
|
|
4023
|
+
},
|
|
4024
|
+
},
|
|
4025
|
+
basic: {
|
|
4026
|
+
padding: `0 ${gridSafeZoneBase}`,
|
|
4027
|
+
[getMediaQueryMin('s')]: {
|
|
4028
|
+
padding: `0 calc(${gridSafeZoneBase} + ${gridGap} + ${oneColumnWidthS})`,
|
|
4029
|
+
},
|
|
4030
|
+
[getMediaQueryMin('xxl')]: {
|
|
4031
|
+
padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL} + ${gridGap} + ${oneColumnWidthXXL})`,
|
|
4032
|
+
},
|
|
4033
|
+
},
|
|
4034
|
+
extended: {
|
|
4035
|
+
padding: `0 ${gridSafeZoneBase}`,
|
|
4036
|
+
[getMediaQueryMin('xxl')]: {
|
|
4037
|
+
padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL})`,
|
|
4038
|
+
},
|
|
4039
|
+
},
|
|
4155
4040
|
};
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
if (typeof rule.style === 'string') {
|
|
4159
|
-
rule.style = parse(rule.style);
|
|
4160
|
-
}
|
|
4161
|
-
};
|
|
4162
|
-
|
|
4163
|
-
function templatePlugin() {
|
|
4164
|
-
return {
|
|
4165
|
-
onProcessRule: onProcessRule
|
|
4166
|
-
};
|
|
4167
|
-
}
|
|
4168
|
-
|
|
4169
|
-
var isObject = function isObject(obj) {
|
|
4170
|
-
return obj && typeof obj === 'object' && !Array.isArray(obj);
|
|
4171
|
-
};
|
|
4172
|
-
|
|
4173
|
-
var valueNs = "extendCurrValue" + Date.now();
|
|
4174
|
-
|
|
4175
|
-
function mergeExtend(style, rule, sheet, newStyle) {
|
|
4176
|
-
var extendType = typeof style.extend; // Extend using a rule name.
|
|
4177
|
-
|
|
4178
|
-
if (extendType === 'string') {
|
|
4179
|
-
if (!sheet) return;
|
|
4180
|
-
var refRule = sheet.getRule(style.extend);
|
|
4181
|
-
if (!refRule) return;
|
|
4182
|
-
|
|
4183
|
-
if (refRule === rule) {
|
|
4184
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] A rule tries to extend itself \n" + rule.toString()) : void 0;
|
|
4185
|
-
return;
|
|
4186
|
-
}
|
|
4187
|
-
|
|
4188
|
-
var parent = refRule.options.parent;
|
|
4189
|
-
|
|
4190
|
-
if (parent) {
|
|
4191
|
-
var originalStyle = parent.rules.raw[style.extend];
|
|
4192
|
-
extend(originalStyle, rule, sheet, newStyle);
|
|
4193
|
-
}
|
|
4194
|
-
|
|
4195
|
-
return;
|
|
4196
|
-
} // Extend using an array.
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
if (Array.isArray(style.extend)) {
|
|
4200
|
-
for (var index = 0; index < style.extend.length; index++) {
|
|
4201
|
-
var singleExtend = style.extend[index];
|
|
4202
|
-
var singleStyle = typeof singleExtend === 'string' ? _extends({}, style, {
|
|
4203
|
-
extend: singleExtend
|
|
4204
|
-
}) : style.extend[index];
|
|
4205
|
-
extend(singleStyle, rule, sheet, newStyle);
|
|
4206
|
-
}
|
|
4207
|
-
|
|
4208
|
-
return;
|
|
4209
|
-
} // Extend is a style object.
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
for (var prop in style.extend) {
|
|
4213
|
-
if (prop === 'extend') {
|
|
4214
|
-
extend(style.extend.extend, rule, sheet, newStyle);
|
|
4215
|
-
continue;
|
|
4216
|
-
}
|
|
4217
|
-
|
|
4218
|
-
if (isObject(style.extend[prop])) {
|
|
4219
|
-
if (!(prop in newStyle)) newStyle[prop] = {};
|
|
4220
|
-
extend(style.extend[prop], rule, sheet, newStyle[prop]);
|
|
4221
|
-
continue;
|
|
4222
|
-
}
|
|
4223
|
-
|
|
4224
|
-
newStyle[prop] = style.extend[prop];
|
|
4225
|
-
}
|
|
4226
|
-
}
|
|
4227
|
-
|
|
4228
|
-
function mergeRest(style, rule, sheet, newStyle) {
|
|
4229
|
-
// Copy base style.
|
|
4230
|
-
for (var prop in style) {
|
|
4231
|
-
if (prop === 'extend') continue;
|
|
4232
|
-
|
|
4233
|
-
if (isObject(newStyle[prop]) && isObject(style[prop])) {
|
|
4234
|
-
extend(style[prop], rule, sheet, newStyle[prop]);
|
|
4235
|
-
continue;
|
|
4236
|
-
}
|
|
4237
|
-
|
|
4238
|
-
if (isObject(style[prop])) {
|
|
4239
|
-
newStyle[prop] = extend(style[prop], rule, sheet);
|
|
4240
|
-
continue;
|
|
4241
|
-
}
|
|
4242
|
-
|
|
4243
|
-
newStyle[prop] = style[prop];
|
|
4244
|
-
}
|
|
4245
|
-
}
|
|
4246
|
-
/**
|
|
4247
|
-
* Recursively extend styles.
|
|
4248
|
-
*/
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
function extend(style, rule, sheet, newStyle) {
|
|
4252
|
-
if (newStyle === void 0) {
|
|
4253
|
-
newStyle = {};
|
|
4254
|
-
}
|
|
4255
|
-
|
|
4256
|
-
mergeExtend(style, rule, sheet, newStyle);
|
|
4257
|
-
mergeRest(style, rule, sheet, newStyle);
|
|
4258
|
-
return newStyle;
|
|
4259
|
-
}
|
|
4260
|
-
/**
|
|
4261
|
-
* Handle `extend` property.
|
|
4262
|
-
*/
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
function jssExtend() {
|
|
4266
|
-
function onProcessStyle(style, rule, sheet) {
|
|
4267
|
-
if ('extend' in style) return extend(style, rule, sheet);
|
|
4268
|
-
return style;
|
|
4269
|
-
}
|
|
4270
|
-
|
|
4271
|
-
function onChangeValue(value, prop, rule) {
|
|
4272
|
-
if (prop !== 'extend') return value; // Value is empty, remove properties set previously.
|
|
4273
|
-
|
|
4274
|
-
if (value == null || value === false) {
|
|
4275
|
-
for (var key in rule[valueNs]) {
|
|
4276
|
-
rule.prop(key, null);
|
|
4277
|
-
}
|
|
4278
|
-
|
|
4279
|
-
rule[valueNs] = null;
|
|
4280
|
-
return null;
|
|
4281
|
-
}
|
|
4282
|
-
|
|
4283
|
-
if (typeof value === 'object') {
|
|
4284
|
-
for (var _key in value) {
|
|
4285
|
-
rule.prop(_key, value[_key]);
|
|
4286
|
-
}
|
|
4287
|
-
|
|
4288
|
-
rule[valueNs] = value;
|
|
4289
|
-
} // Make sure we don't set the value in the core.
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
return null;
|
|
4293
|
-
}
|
|
4294
|
-
|
|
4295
|
-
return {
|
|
4296
|
-
onProcessStyle: onProcessStyle,
|
|
4297
|
-
onChangeValue: onChangeValue
|
|
4298
|
-
};
|
|
4299
|
-
}
|
|
4300
|
-
|
|
4301
|
-
/**
|
|
4302
|
-
* Set selector.
|
|
4303
|
-
*
|
|
4304
|
-
* @param original rule
|
|
4305
|
-
* @param className class string
|
|
4306
|
-
* @return flag indicating function was successfull or not
|
|
4307
|
-
*/
|
|
4308
|
-
|
|
4309
|
-
function registerClass(rule, className) {
|
|
4310
|
-
// Skip falsy values
|
|
4311
|
-
if (!className) return true; // Support array of class names `{composes: ['foo', 'bar']}`
|
|
4312
|
-
|
|
4313
|
-
if (Array.isArray(className)) {
|
|
4314
|
-
for (var index = 0; index < className.length; index++) {
|
|
4315
|
-
var isSetted = registerClass(rule, className[index]);
|
|
4316
|
-
if (!isSetted) return false;
|
|
4317
|
-
}
|
|
4318
|
-
|
|
4319
|
-
return true;
|
|
4320
|
-
} // Support space separated class names `{composes: 'foo bar'}`
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
if (className.indexOf(' ') > -1) {
|
|
4324
|
-
return registerClass(rule, className.split(' '));
|
|
4325
|
-
}
|
|
4326
|
-
|
|
4327
|
-
var parent = rule.options.parent; // It is a ref to a local rule.
|
|
4328
|
-
|
|
4329
|
-
if (className[0] === '$') {
|
|
4330
|
-
var refRule = parent.getRule(className.substr(1));
|
|
4331
|
-
|
|
4332
|
-
if (!refRule) {
|
|
4333
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Referenced rule is not defined. \n" + rule.toString()) : void 0;
|
|
4334
|
-
return false;
|
|
4335
|
-
}
|
|
4336
|
-
|
|
4337
|
-
if (refRule === rule) {
|
|
4338
|
-
process.env.NODE_ENV !== "production" ? warning(false, "[JSS] Cyclic composition detected. \n" + rule.toString()) : void 0;
|
|
4339
|
-
return false;
|
|
4340
|
-
}
|
|
4341
|
-
|
|
4342
|
-
parent.classes[rule.key] += " " + parent.classes[refRule.key];
|
|
4343
|
-
return true;
|
|
4344
|
-
}
|
|
4345
|
-
|
|
4346
|
-
parent.classes[rule.key] += " " + className;
|
|
4347
|
-
return true;
|
|
4348
|
-
}
|
|
4349
|
-
/**
|
|
4350
|
-
* Convert compose property to additional class, remove property from original styles.
|
|
4351
|
-
*/
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
function jssCompose() {
|
|
4355
|
-
function onProcessStyle(style, rule) {
|
|
4356
|
-
if (!('composes' in style)) return style;
|
|
4357
|
-
registerClass(rule, style.composes); // Remove composes property to prevent infinite loop.
|
|
4358
|
-
|
|
4359
|
-
delete style.composes;
|
|
4360
|
-
return style;
|
|
4361
|
-
}
|
|
4362
|
-
|
|
4363
|
-
return {
|
|
4364
|
-
onProcessStyle: onProcessStyle
|
|
4365
|
-
};
|
|
4366
|
-
}
|
|
4367
|
-
|
|
4368
|
-
var px = hasCSSTOMSupport && CSS ? CSS.px : 'px';
|
|
4369
|
-
var ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';
|
|
4370
|
-
var percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';
|
|
4371
|
-
/**
|
|
4372
|
-
* Generated jss-plugin-default-unit CSS property units
|
|
4373
|
-
*/
|
|
4374
|
-
|
|
4375
|
-
var defaultUnits = {
|
|
4376
|
-
// Animation properties
|
|
4377
|
-
'animation-delay': ms,
|
|
4378
|
-
'animation-duration': ms,
|
|
4379
|
-
// Background properties
|
|
4380
|
-
'background-position': px,
|
|
4381
|
-
'background-position-x': px,
|
|
4382
|
-
'background-position-y': px,
|
|
4383
|
-
'background-size': px,
|
|
4384
|
-
// Border Properties
|
|
4385
|
-
border: px,
|
|
4386
|
-
'border-bottom': px,
|
|
4387
|
-
'border-bottom-left-radius': px,
|
|
4388
|
-
'border-bottom-right-radius': px,
|
|
4389
|
-
'border-bottom-width': px,
|
|
4390
|
-
'border-left': px,
|
|
4391
|
-
'border-left-width': px,
|
|
4392
|
-
'border-radius': px,
|
|
4393
|
-
'border-right': px,
|
|
4394
|
-
'border-right-width': px,
|
|
4395
|
-
'border-top': px,
|
|
4396
|
-
'border-top-left-radius': px,
|
|
4397
|
-
'border-top-right-radius': px,
|
|
4398
|
-
'border-top-width': px,
|
|
4399
|
-
'border-width': px,
|
|
4400
|
-
'border-block': px,
|
|
4401
|
-
'border-block-end': px,
|
|
4402
|
-
'border-block-end-width': px,
|
|
4403
|
-
'border-block-start': px,
|
|
4404
|
-
'border-block-start-width': px,
|
|
4405
|
-
'border-block-width': px,
|
|
4406
|
-
'border-inline': px,
|
|
4407
|
-
'border-inline-end': px,
|
|
4408
|
-
'border-inline-end-width': px,
|
|
4409
|
-
'border-inline-start': px,
|
|
4410
|
-
'border-inline-start-width': px,
|
|
4411
|
-
'border-inline-width': px,
|
|
4412
|
-
'border-start-start-radius': px,
|
|
4413
|
-
'border-start-end-radius': px,
|
|
4414
|
-
'border-end-start-radius': px,
|
|
4415
|
-
'border-end-end-radius': px,
|
|
4416
|
-
// Margin properties
|
|
4417
|
-
margin: px,
|
|
4418
|
-
'margin-bottom': px,
|
|
4419
|
-
'margin-left': px,
|
|
4420
|
-
'margin-right': px,
|
|
4421
|
-
'margin-top': px,
|
|
4422
|
-
'margin-block': px,
|
|
4423
|
-
'margin-block-end': px,
|
|
4424
|
-
'margin-block-start': px,
|
|
4425
|
-
'margin-inline': px,
|
|
4426
|
-
'margin-inline-end': px,
|
|
4427
|
-
'margin-inline-start': px,
|
|
4428
|
-
// Padding properties
|
|
4429
|
-
padding: px,
|
|
4430
|
-
'padding-bottom': px,
|
|
4431
|
-
'padding-left': px,
|
|
4432
|
-
'padding-right': px,
|
|
4433
|
-
'padding-top': px,
|
|
4434
|
-
'padding-block': px,
|
|
4435
|
-
'padding-block-end': px,
|
|
4436
|
-
'padding-block-start': px,
|
|
4437
|
-
'padding-inline': px,
|
|
4438
|
-
'padding-inline-end': px,
|
|
4439
|
-
'padding-inline-start': px,
|
|
4440
|
-
// Mask properties
|
|
4441
|
-
'mask-position-x': px,
|
|
4442
|
-
'mask-position-y': px,
|
|
4443
|
-
'mask-size': px,
|
|
4444
|
-
// Width and height properties
|
|
4445
|
-
height: px,
|
|
4446
|
-
width: px,
|
|
4447
|
-
'min-height': px,
|
|
4448
|
-
'max-height': px,
|
|
4449
|
-
'min-width': px,
|
|
4450
|
-
'max-width': px,
|
|
4451
|
-
// Position properties
|
|
4452
|
-
bottom: px,
|
|
4453
|
-
left: px,
|
|
4454
|
-
top: px,
|
|
4455
|
-
right: px,
|
|
4456
|
-
inset: px,
|
|
4457
|
-
'inset-block': px,
|
|
4458
|
-
'inset-block-end': px,
|
|
4459
|
-
'inset-block-start': px,
|
|
4460
|
-
'inset-inline': px,
|
|
4461
|
-
'inset-inline-end': px,
|
|
4462
|
-
'inset-inline-start': px,
|
|
4463
|
-
// Shadow properties
|
|
4464
|
-
'box-shadow': px,
|
|
4465
|
-
'text-shadow': px,
|
|
4466
|
-
// Column properties
|
|
4467
|
-
'column-gap': px,
|
|
4468
|
-
'column-rule': px,
|
|
4469
|
-
'column-rule-width': px,
|
|
4470
|
-
'column-width': px,
|
|
4471
|
-
// Font and text properties
|
|
4472
|
-
'font-size': px,
|
|
4473
|
-
'font-size-delta': px,
|
|
4474
|
-
'letter-spacing': px,
|
|
4475
|
-
'text-decoration-thickness': px,
|
|
4476
|
-
'text-indent': px,
|
|
4477
|
-
'text-stroke': px,
|
|
4478
|
-
'text-stroke-width': px,
|
|
4479
|
-
'word-spacing': px,
|
|
4480
|
-
// Motion properties
|
|
4481
|
-
motion: px,
|
|
4482
|
-
'motion-offset': px,
|
|
4483
|
-
// Outline properties
|
|
4484
|
-
outline: px,
|
|
4485
|
-
'outline-offset': px,
|
|
4486
|
-
'outline-width': px,
|
|
4487
|
-
// Perspective properties
|
|
4488
|
-
perspective: px,
|
|
4489
|
-
'perspective-origin-x': percent,
|
|
4490
|
-
'perspective-origin-y': percent,
|
|
4491
|
-
// Transform properties
|
|
4492
|
-
'transform-origin': percent,
|
|
4493
|
-
'transform-origin-x': percent,
|
|
4494
|
-
'transform-origin-y': percent,
|
|
4495
|
-
'transform-origin-z': percent,
|
|
4496
|
-
// Transition properties
|
|
4497
|
-
'transition-delay': ms,
|
|
4498
|
-
'transition-duration': ms,
|
|
4499
|
-
// Alignment properties
|
|
4500
|
-
'vertical-align': px,
|
|
4501
|
-
'flex-basis': px,
|
|
4502
|
-
// Some random properties
|
|
4503
|
-
'shape-margin': px,
|
|
4504
|
-
size: px,
|
|
4505
|
-
gap: px,
|
|
4506
|
-
// Grid properties
|
|
4507
|
-
grid: px,
|
|
4508
|
-
'grid-gap': px,
|
|
4509
|
-
'row-gap': px,
|
|
4510
|
-
'grid-row-gap': px,
|
|
4511
|
-
'grid-column-gap': px,
|
|
4512
|
-
'grid-template-rows': px,
|
|
4513
|
-
'grid-template-columns': px,
|
|
4514
|
-
'grid-auto-rows': px,
|
|
4515
|
-
'grid-auto-columns': px,
|
|
4516
|
-
// Not existing properties.
|
|
4517
|
-
// Used to avoid issues with jss-plugin-expand integration.
|
|
4518
|
-
'box-shadow-x': px,
|
|
4519
|
-
'box-shadow-y': px,
|
|
4520
|
-
'box-shadow-blur': px,
|
|
4521
|
-
'box-shadow-spread': px,
|
|
4522
|
-
'font-line-height': px,
|
|
4523
|
-
'text-shadow-x': px,
|
|
4524
|
-
'text-shadow-y': px,
|
|
4525
|
-
'text-shadow-blur': px
|
|
4526
|
-
};
|
|
4527
|
-
|
|
4528
|
-
/**
|
|
4529
|
-
* Clones the object and adds a camel cased property version.
|
|
4530
|
-
*/
|
|
4531
|
-
|
|
4532
|
-
function addCamelCasedVersion(obj) {
|
|
4533
|
-
var regExp = /(-[a-z])/g;
|
|
4534
|
-
|
|
4535
|
-
var replace = function replace(str) {
|
|
4536
|
-
return str[1].toUpperCase();
|
|
4537
|
-
};
|
|
4538
|
-
|
|
4539
|
-
var newObj = {};
|
|
4540
|
-
|
|
4541
|
-
for (var key in obj) {
|
|
4542
|
-
newObj[key] = obj[key];
|
|
4543
|
-
newObj[key.replace(regExp, replace)] = obj[key];
|
|
4544
|
-
}
|
|
4545
|
-
|
|
4546
|
-
return newObj;
|
|
4547
|
-
}
|
|
4548
|
-
|
|
4549
|
-
var units = addCamelCasedVersion(defaultUnits);
|
|
4550
|
-
/**
|
|
4551
|
-
* Recursive deep style passing function
|
|
4552
|
-
*/
|
|
4553
|
-
|
|
4554
|
-
function iterate(prop, value, options) {
|
|
4555
|
-
if (value == null) return value;
|
|
4556
|
-
|
|
4557
|
-
if (Array.isArray(value)) {
|
|
4558
|
-
for (var i = 0; i < value.length; i++) {
|
|
4559
|
-
value[i] = iterate(prop, value[i], options);
|
|
4560
|
-
}
|
|
4561
|
-
} else if (typeof value === 'object') {
|
|
4562
|
-
if (prop === 'fallbacks') {
|
|
4563
|
-
for (var innerProp in value) {
|
|
4564
|
-
value[innerProp] = iterate(innerProp, value[innerProp], options);
|
|
4565
|
-
}
|
|
4566
|
-
} else {
|
|
4567
|
-
for (var _innerProp in value) {
|
|
4568
|
-
value[_innerProp] = iterate(prop + "-" + _innerProp, value[_innerProp], options);
|
|
4569
|
-
}
|
|
4570
|
-
} // eslint-disable-next-line no-restricted-globals
|
|
4571
|
-
|
|
4572
|
-
} else if (typeof value === 'number' && isNaN(value) === false) {
|
|
4573
|
-
var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.
|
|
4574
|
-
|
|
4575
|
-
if (unit && !(value === 0 && unit === px)) {
|
|
4576
|
-
return typeof unit === 'function' ? unit(value).toString() : "" + value + unit;
|
|
4577
|
-
}
|
|
4578
|
-
|
|
4579
|
-
return value.toString();
|
|
4580
|
-
}
|
|
4581
|
-
|
|
4582
|
-
return value;
|
|
4583
|
-
}
|
|
4584
|
-
/**
|
|
4585
|
-
* Add unit to numeric values.
|
|
4586
|
-
*/
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
function defaultUnit(options) {
|
|
4590
|
-
if (options === void 0) {
|
|
4591
|
-
options = {};
|
|
4592
|
-
}
|
|
4593
|
-
|
|
4594
|
-
var camelCasedOptions = addCamelCasedVersion(options);
|
|
4595
|
-
|
|
4596
|
-
function onProcessStyle(style, rule) {
|
|
4597
|
-
if (rule.type !== 'style') return style;
|
|
4598
|
-
|
|
4599
|
-
for (var prop in style) {
|
|
4600
|
-
style[prop] = iterate(prop, style[prop], camelCasedOptions);
|
|
4601
|
-
}
|
|
4602
|
-
|
|
4603
|
-
return style;
|
|
4604
|
-
}
|
|
4605
|
-
|
|
4606
|
-
function onChangeValue(value, prop) {
|
|
4607
|
-
return iterate(prop, value, camelCasedOptions);
|
|
4608
|
-
}
|
|
4609
|
-
|
|
4610
|
-
return {
|
|
4611
|
-
onProcessStyle: onProcessStyle,
|
|
4612
|
-
onChangeValue: onChangeValue
|
|
4613
|
-
};
|
|
4614
|
-
}
|
|
4615
|
-
|
|
4616
|
-
/**
|
|
4617
|
-
* A scheme for converting properties from array to regular style.
|
|
4618
|
-
* All properties listed below will be transformed to a string separated by space.
|
|
4619
|
-
*/
|
|
4620
|
-
var propArray = {
|
|
4621
|
-
'background-size': true,
|
|
4622
|
-
'background-position': true,
|
|
4623
|
-
border: true,
|
|
4624
|
-
'border-bottom': true,
|
|
4625
|
-
'border-left': true,
|
|
4626
|
-
'border-top': true,
|
|
4627
|
-
'border-right': true,
|
|
4628
|
-
'border-radius': true,
|
|
4629
|
-
'border-image': true,
|
|
4630
|
-
'border-width': true,
|
|
4631
|
-
'border-style': true,
|
|
4632
|
-
'border-color': true,
|
|
4633
|
-
'box-shadow': true,
|
|
4634
|
-
flex: true,
|
|
4635
|
-
margin: true,
|
|
4636
|
-
padding: true,
|
|
4637
|
-
outline: true,
|
|
4638
|
-
'transform-origin': true,
|
|
4639
|
-
transform: true,
|
|
4640
|
-
transition: true
|
|
4641
|
-
/**
|
|
4642
|
-
* A scheme for converting arrays to regular styles inside of objects.
|
|
4643
|
-
* For e.g.: "{position: [0, 0]}" => "background-position: 0 0;".
|
|
4644
|
-
*/
|
|
4645
|
-
|
|
4646
|
-
};
|
|
4647
|
-
var propArrayInObj = {
|
|
4648
|
-
position: true,
|
|
4649
|
-
// background-position
|
|
4650
|
-
size: true // background-size
|
|
4651
|
-
|
|
4652
|
-
/**
|
|
4653
|
-
* A scheme for parsing and building correct styles from passed objects.
|
|
4654
|
-
*/
|
|
4655
|
-
|
|
4656
|
-
};
|
|
4657
|
-
var propObj = {
|
|
4658
|
-
padding: {
|
|
4659
|
-
top: 0,
|
|
4660
|
-
right: 0,
|
|
4661
|
-
bottom: 0,
|
|
4662
|
-
left: 0
|
|
4663
|
-
},
|
|
4664
|
-
margin: {
|
|
4665
|
-
top: 0,
|
|
4666
|
-
right: 0,
|
|
4667
|
-
bottom: 0,
|
|
4668
|
-
left: 0
|
|
4669
|
-
},
|
|
4670
|
-
background: {
|
|
4671
|
-
attachment: null,
|
|
4672
|
-
color: null,
|
|
4673
|
-
image: null,
|
|
4674
|
-
position: null,
|
|
4675
|
-
repeat: null
|
|
4676
|
-
},
|
|
4677
|
-
border: {
|
|
4678
|
-
width: null,
|
|
4679
|
-
style: null,
|
|
4680
|
-
color: null
|
|
4681
|
-
},
|
|
4682
|
-
'border-top': {
|
|
4683
|
-
width: null,
|
|
4684
|
-
style: null,
|
|
4685
|
-
color: null
|
|
4686
|
-
},
|
|
4687
|
-
'border-right': {
|
|
4688
|
-
width: null,
|
|
4689
|
-
style: null,
|
|
4690
|
-
color: null
|
|
4691
|
-
},
|
|
4692
|
-
'border-bottom': {
|
|
4693
|
-
width: null,
|
|
4694
|
-
style: null,
|
|
4695
|
-
color: null
|
|
4696
|
-
},
|
|
4697
|
-
'border-left': {
|
|
4698
|
-
width: null,
|
|
4699
|
-
style: null,
|
|
4700
|
-
color: null
|
|
4701
|
-
},
|
|
4702
|
-
outline: {
|
|
4703
|
-
width: null,
|
|
4704
|
-
style: null,
|
|
4705
|
-
color: null
|
|
4706
|
-
},
|
|
4707
|
-
'list-style': {
|
|
4708
|
-
type: null,
|
|
4709
|
-
position: null,
|
|
4710
|
-
image: null
|
|
4711
|
-
},
|
|
4712
|
-
transition: {
|
|
4713
|
-
property: null,
|
|
4714
|
-
duration: null,
|
|
4715
|
-
'timing-function': null,
|
|
4716
|
-
timingFunction: null,
|
|
4717
|
-
// Needed for avoiding comilation issues with jss-plugin-camel-case
|
|
4718
|
-
delay: null
|
|
4719
|
-
},
|
|
4720
|
-
animation: {
|
|
4721
|
-
name: null,
|
|
4722
|
-
duration: null,
|
|
4723
|
-
'timing-function': null,
|
|
4724
|
-
timingFunction: null,
|
|
4725
|
-
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4726
|
-
delay: null,
|
|
4727
|
-
'iteration-count': null,
|
|
4728
|
-
iterationCount: null,
|
|
4729
|
-
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4730
|
-
direction: null,
|
|
4731
|
-
'fill-mode': null,
|
|
4732
|
-
fillMode: null,
|
|
4733
|
-
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4734
|
-
'play-state': null,
|
|
4735
|
-
playState: null // Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4736
|
-
|
|
4737
|
-
},
|
|
4738
|
-
'box-shadow': {
|
|
4739
|
-
x: 0,
|
|
4740
|
-
y: 0,
|
|
4741
|
-
blur: 0,
|
|
4742
|
-
spread: 0,
|
|
4743
|
-
color: null,
|
|
4744
|
-
inset: null
|
|
4745
|
-
},
|
|
4746
|
-
'text-shadow': {
|
|
4747
|
-
x: 0,
|
|
4748
|
-
y: 0,
|
|
4749
|
-
blur: null,
|
|
4750
|
-
color: null
|
|
4751
|
-
}
|
|
4752
|
-
/**
|
|
4753
|
-
* A scheme for converting non-standart properties inside object.
|
|
4754
|
-
* For e.g.: include 'border-radius' property inside 'border' object.
|
|
4755
|
-
*/
|
|
4756
|
-
|
|
4757
|
-
};
|
|
4758
|
-
var customPropObj = {
|
|
4759
|
-
border: {
|
|
4760
|
-
radius: 'border-radius',
|
|
4761
|
-
image: 'border-image',
|
|
4762
|
-
width: 'border-width',
|
|
4763
|
-
style: 'border-style',
|
|
4764
|
-
color: 'border-color'
|
|
4765
|
-
},
|
|
4766
|
-
'border-bottom': {
|
|
4767
|
-
width: 'border-bottom-width',
|
|
4768
|
-
style: 'border-bottom-style',
|
|
4769
|
-
color: 'border-bottom-color'
|
|
4770
|
-
},
|
|
4771
|
-
'border-top': {
|
|
4772
|
-
width: 'border-top-width',
|
|
4773
|
-
style: 'border-top-style',
|
|
4774
|
-
color: 'border-top-color'
|
|
4775
|
-
},
|
|
4776
|
-
'border-left': {
|
|
4777
|
-
width: 'border-left-width',
|
|
4778
|
-
style: 'border-left-style',
|
|
4779
|
-
color: 'border-left-color'
|
|
4780
|
-
},
|
|
4781
|
-
'border-right': {
|
|
4782
|
-
width: 'border-right-width',
|
|
4783
|
-
style: 'border-right-style',
|
|
4784
|
-
color: 'border-right-color'
|
|
4785
|
-
},
|
|
4786
|
-
background: {
|
|
4787
|
-
size: 'background-size',
|
|
4788
|
-
image: 'background-image'
|
|
4789
|
-
},
|
|
4790
|
-
font: {
|
|
4791
|
-
style: 'font-style',
|
|
4792
|
-
variant: 'font-variant',
|
|
4793
|
-
weight: 'font-weight',
|
|
4794
|
-
stretch: 'font-stretch',
|
|
4795
|
-
size: 'font-size',
|
|
4796
|
-
family: 'font-family',
|
|
4797
|
-
lineHeight: 'line-height',
|
|
4798
|
-
// Needed to avoid compilation issues with jss-plugin-camel-case
|
|
4799
|
-
'line-height': 'line-height'
|
|
4800
|
-
},
|
|
4801
|
-
flex: {
|
|
4802
|
-
grow: 'flex-grow',
|
|
4803
|
-
basis: 'flex-basis',
|
|
4804
|
-
direction: 'flex-direction',
|
|
4805
|
-
wrap: 'flex-wrap',
|
|
4806
|
-
flow: 'flex-flow',
|
|
4807
|
-
shrink: 'flex-shrink'
|
|
4808
|
-
},
|
|
4809
|
-
align: {
|
|
4810
|
-
self: 'align-self',
|
|
4811
|
-
items: 'align-items',
|
|
4812
|
-
content: 'align-content'
|
|
4813
|
-
},
|
|
4814
|
-
grid: {
|
|
4815
|
-
'template-columns': 'grid-template-columns',
|
|
4816
|
-
templateColumns: 'grid-template-columns',
|
|
4817
|
-
'template-rows': 'grid-template-rows',
|
|
4818
|
-
templateRows: 'grid-template-rows',
|
|
4819
|
-
'template-areas': 'grid-template-areas',
|
|
4820
|
-
templateAreas: 'grid-template-areas',
|
|
4821
|
-
template: 'grid-template',
|
|
4822
|
-
'auto-columns': 'grid-auto-columns',
|
|
4823
|
-
autoColumns: 'grid-auto-columns',
|
|
4824
|
-
'auto-rows': 'grid-auto-rows',
|
|
4825
|
-
autoRows: 'grid-auto-rows',
|
|
4826
|
-
'auto-flow': 'grid-auto-flow',
|
|
4827
|
-
autoFlow: 'grid-auto-flow',
|
|
4828
|
-
row: 'grid-row',
|
|
4829
|
-
column: 'grid-column',
|
|
4830
|
-
'row-start': 'grid-row-start',
|
|
4831
|
-
rowStart: 'grid-row-start',
|
|
4832
|
-
'row-end': 'grid-row-end',
|
|
4833
|
-
rowEnd: 'grid-row-end',
|
|
4834
|
-
'column-start': 'grid-column-start',
|
|
4835
|
-
columnStart: 'grid-column-start',
|
|
4836
|
-
'column-end': 'grid-column-end',
|
|
4837
|
-
columnEnd: 'grid-column-end',
|
|
4838
|
-
area: 'grid-area',
|
|
4839
|
-
gap: 'grid-gap',
|
|
4840
|
-
'row-gap': 'grid-row-gap',
|
|
4841
|
-
rowGap: 'grid-row-gap',
|
|
4842
|
-
'column-gap': 'grid-column-gap',
|
|
4843
|
-
columnGap: 'grid-column-gap'
|
|
4844
|
-
}
|
|
4845
|
-
};
|
|
4846
|
-
|
|
4847
|
-
/* eslint-disable no-use-before-define */
|
|
4848
|
-
/**
|
|
4849
|
-
* Map values by given prop.
|
|
4850
|
-
*
|
|
4851
|
-
* @param {Array} array of values
|
|
4852
|
-
* @param {String} original property
|
|
4853
|
-
* @param {String} original rule
|
|
4854
|
-
* @return {String} mapped values
|
|
4855
|
-
*/
|
|
4856
|
-
|
|
4857
|
-
function mapValuesByProp(value, prop, rule) {
|
|
4858
|
-
return value.map(function (item) {
|
|
4859
|
-
return objectToArray(item, prop, rule, false, true);
|
|
4860
|
-
});
|
|
4861
|
-
}
|
|
4862
|
-
/**
|
|
4863
|
-
* Convert array to nested array, if needed
|
|
4864
|
-
*/
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
function processArray(value, prop, scheme, rule) {
|
|
4868
|
-
if (scheme[prop] == null) return value;
|
|
4869
|
-
if (value.length === 0) return [];
|
|
4870
|
-
if (Array.isArray(value[0])) return processArray(value[0], prop, scheme, rule);
|
|
4871
|
-
|
|
4872
|
-
if (typeof value[0] === 'object') {
|
|
4873
|
-
return mapValuesByProp(value, prop, rule);
|
|
4874
|
-
}
|
|
4875
|
-
|
|
4876
|
-
return [value];
|
|
4877
|
-
}
|
|
4878
|
-
/**
|
|
4879
|
-
* Convert object to array.
|
|
4880
|
-
*/
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
function objectToArray(value, prop, rule, isFallback, isInArray) {
|
|
4884
|
-
if (!(propObj[prop] || customPropObj[prop])) return [];
|
|
4885
|
-
var result = []; // Check if exists any non-standard property
|
|
4886
|
-
|
|
4887
|
-
if (customPropObj[prop]) {
|
|
4888
|
-
// eslint-disable-next-line no-param-reassign
|
|
4889
|
-
value = customPropsToStyle(value, rule, customPropObj[prop], isFallback);
|
|
4890
|
-
} // Pass throught all standart props
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
if (Object.keys(value).length) {
|
|
4894
|
-
for (var baseProp in propObj[prop]) {
|
|
4895
|
-
if (value[baseProp]) {
|
|
4896
|
-
if (Array.isArray(value[baseProp])) {
|
|
4897
|
-
result.push(propArrayInObj[baseProp] === null ? value[baseProp] : value[baseProp].join(' '));
|
|
4898
|
-
} else result.push(value[baseProp]);
|
|
4899
|
-
|
|
4900
|
-
continue;
|
|
4901
|
-
} // Add default value from props config.
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
if (propObj[prop][baseProp] != null) {
|
|
4905
|
-
result.push(propObj[prop][baseProp]);
|
|
4906
|
-
}
|
|
4907
|
-
}
|
|
4908
|
-
}
|
|
4909
|
-
|
|
4910
|
-
if (!result.length || isInArray) return result;
|
|
4911
|
-
return [result];
|
|
4912
|
-
}
|
|
4913
|
-
/**
|
|
4914
|
-
* Convert custom properties values to styles adding them to rule directly
|
|
4915
|
-
*/
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
function customPropsToStyle(value, rule, customProps, isFallback) {
|
|
4919
|
-
for (var prop in customProps) {
|
|
4920
|
-
var propName = customProps[prop]; // If current property doesn't exist already in rule - add new one
|
|
4921
|
-
|
|
4922
|
-
if (typeof value[prop] !== 'undefined' && (isFallback || !rule.prop(propName))) {
|
|
4923
|
-
var _styleDetector;
|
|
4924
|
-
|
|
4925
|
-
var appendedValue = styleDetector((_styleDetector = {}, _styleDetector[propName] = value[prop], _styleDetector), rule)[propName]; // Add style directly in rule
|
|
4926
|
-
|
|
4927
|
-
if (isFallback) rule.style.fallbacks[propName] = appendedValue;else rule.style[propName] = appendedValue;
|
|
4928
|
-
} // Delete converted property to avoid double converting
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
delete value[prop];
|
|
4932
|
-
}
|
|
4933
|
-
|
|
4934
|
-
return value;
|
|
4935
|
-
}
|
|
4936
|
-
/**
|
|
4937
|
-
* Detect if a style needs to be converted.
|
|
4938
|
-
*/
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
function styleDetector(style, rule, isFallback) {
|
|
4942
|
-
for (var prop in style) {
|
|
4943
|
-
var value = style[prop];
|
|
4944
|
-
|
|
4945
|
-
if (Array.isArray(value)) {
|
|
4946
|
-
// Check double arrays to avoid recursion.
|
|
4947
|
-
if (!Array.isArray(value[0])) {
|
|
4948
|
-
if (prop === 'fallbacks') {
|
|
4949
|
-
for (var index = 0; index < style.fallbacks.length; index++) {
|
|
4950
|
-
style.fallbacks[index] = styleDetector(style.fallbacks[index], rule, true);
|
|
4951
|
-
}
|
|
4952
|
-
|
|
4953
|
-
continue;
|
|
4954
|
-
}
|
|
4955
|
-
|
|
4956
|
-
style[prop] = processArray(value, prop, propArray, rule); // Avoid creating properties with empty values
|
|
4957
|
-
|
|
4958
|
-
if (!style[prop].length) delete style[prop];
|
|
4959
|
-
}
|
|
4960
|
-
} else if (typeof value === 'object') {
|
|
4961
|
-
if (prop === 'fallbacks') {
|
|
4962
|
-
style.fallbacks = styleDetector(style.fallbacks, rule, true);
|
|
4963
|
-
continue;
|
|
4964
|
-
}
|
|
4965
|
-
|
|
4966
|
-
style[prop] = objectToArray(value, prop, rule, isFallback); // Avoid creating properties with empty values
|
|
4967
|
-
|
|
4968
|
-
if (!style[prop].length) delete style[prop];
|
|
4969
|
-
} // Maybe a computed value resulting in an empty string
|
|
4970
|
-
else if (style[prop] === '') delete style[prop];
|
|
4971
|
-
}
|
|
4972
|
-
|
|
4973
|
-
return style;
|
|
4974
|
-
}
|
|
4975
|
-
/**
|
|
4976
|
-
* Adds possibility to write expanded styles.
|
|
4977
|
-
*/
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
function jssExpand() {
|
|
4981
|
-
function onProcessStyle(style, rule) {
|
|
4982
|
-
if (!style || rule.type !== 'style') return style;
|
|
4983
|
-
|
|
4984
|
-
if (Array.isArray(style)) {
|
|
4985
|
-
// Pass rules one by one and reformat them
|
|
4986
|
-
for (var index = 0; index < style.length; index++) {
|
|
4987
|
-
style[index] = styleDetector(style[index], rule);
|
|
4988
|
-
}
|
|
4989
|
-
|
|
4990
|
-
return style;
|
|
4991
|
-
}
|
|
4992
|
-
|
|
4993
|
-
return styleDetector(style, rule);
|
|
4994
|
-
}
|
|
4995
|
-
|
|
4996
|
-
return {
|
|
4997
|
-
onProcessStyle: onProcessStyle
|
|
4998
|
-
};
|
|
4999
|
-
}
|
|
5000
|
-
|
|
5001
|
-
var cssVendor_cjs = {};
|
|
5002
|
-
|
|
5003
|
-
var require$$0 = /*@__PURE__*/getAugmentedNamespace(module$1);
|
|
5004
|
-
|
|
5005
|
-
var toConsumableArrayExports = {};
|
|
5006
|
-
var toConsumableArray = {
|
|
5007
|
-
get exports(){ return toConsumableArrayExports; },
|
|
5008
|
-
set exports(v){ toConsumableArrayExports = v; },
|
|
5009
|
-
};
|
|
5010
|
-
|
|
5011
|
-
var arrayWithoutHolesExports = {};
|
|
5012
|
-
var arrayWithoutHoles = {
|
|
5013
|
-
get exports(){ return arrayWithoutHolesExports; },
|
|
5014
|
-
set exports(v){ arrayWithoutHolesExports = v; },
|
|
5015
|
-
};
|
|
5016
|
-
|
|
5017
|
-
var arrayLikeToArrayExports = {};
|
|
5018
|
-
var arrayLikeToArray = {
|
|
5019
|
-
get exports(){ return arrayLikeToArrayExports; },
|
|
5020
|
-
set exports(v){ arrayLikeToArrayExports = v; },
|
|
5021
|
-
};
|
|
5022
|
-
|
|
5023
|
-
(function (module) {
|
|
5024
|
-
function _arrayLikeToArray(arr, len) {
|
|
5025
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
5026
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
5027
|
-
return arr2;
|
|
5028
|
-
}
|
|
5029
|
-
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
5030
|
-
} (arrayLikeToArray));
|
|
5031
|
-
|
|
5032
|
-
(function (module) {
|
|
5033
|
-
var arrayLikeToArray = arrayLikeToArrayExports;
|
|
5034
|
-
function _arrayWithoutHoles(arr) {
|
|
5035
|
-
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
|
5036
|
-
}
|
|
5037
|
-
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
5038
|
-
} (arrayWithoutHoles));
|
|
5039
|
-
|
|
5040
|
-
var iterableToArrayExports = {};
|
|
5041
|
-
var iterableToArray = {
|
|
5042
|
-
get exports(){ return iterableToArrayExports; },
|
|
5043
|
-
set exports(v){ iterableToArrayExports = v; },
|
|
5044
|
-
};
|
|
5045
|
-
|
|
5046
|
-
(function (module) {
|
|
5047
|
-
function _iterableToArray(iter) {
|
|
5048
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
5049
|
-
}
|
|
5050
|
-
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
5051
|
-
} (iterableToArray));
|
|
5052
|
-
|
|
5053
|
-
var unsupportedIterableToArrayExports = {};
|
|
5054
|
-
var unsupportedIterableToArray = {
|
|
5055
|
-
get exports(){ return unsupportedIterableToArrayExports; },
|
|
5056
|
-
set exports(v){ unsupportedIterableToArrayExports = v; },
|
|
5057
|
-
};
|
|
5058
|
-
|
|
5059
|
-
(function (module) {
|
|
5060
|
-
var arrayLikeToArray = arrayLikeToArrayExports;
|
|
5061
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
5062
|
-
if (!o) return;
|
|
5063
|
-
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
|
5064
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5065
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5066
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
5067
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
5068
|
-
}
|
|
5069
|
-
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
5070
|
-
} (unsupportedIterableToArray));
|
|
5071
|
-
|
|
5072
|
-
var nonIterableSpreadExports = {};
|
|
5073
|
-
var nonIterableSpread = {
|
|
5074
|
-
get exports(){ return nonIterableSpreadExports; },
|
|
5075
|
-
set exports(v){ nonIterableSpreadExports = v; },
|
|
5076
|
-
};
|
|
5077
|
-
|
|
5078
|
-
(function (module) {
|
|
5079
|
-
function _nonIterableSpread() {
|
|
5080
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5081
|
-
}
|
|
5082
|
-
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
5083
|
-
} (nonIterableSpread));
|
|
5084
|
-
|
|
5085
|
-
(function (module) {
|
|
5086
|
-
var arrayWithoutHoles = arrayWithoutHolesExports;
|
|
5087
|
-
var iterableToArray = iterableToArrayExports;
|
|
5088
|
-
var unsupportedIterableToArray = unsupportedIterableToArrayExports;
|
|
5089
|
-
var nonIterableSpread = nonIterableSpreadExports;
|
|
5090
|
-
function _toConsumableArray(arr) {
|
|
5091
|
-
return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
|
|
5092
|
-
}
|
|
5093
|
-
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
5094
|
-
} (toConsumableArray));
|
|
5095
|
-
|
|
5096
|
-
Object.defineProperty(cssVendor_cjs, '__esModule', { value: true });
|
|
5097
|
-
|
|
5098
|
-
function _interopDefault$1 (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
5099
|
-
|
|
5100
|
-
var isInBrowser = _interopDefault$1(require$$0);
|
|
5101
|
-
var _toConsumableArray = _interopDefault$1(toConsumableArrayExports);
|
|
5102
|
-
|
|
5103
|
-
// Export javascript style and css style vendor prefixes.
|
|
5104
|
-
var js = '';
|
|
5105
|
-
var css = '';
|
|
5106
|
-
var vendor = '';
|
|
5107
|
-
var browser = '';
|
|
5108
|
-
var isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.
|
|
5109
|
-
|
|
5110
|
-
if (isInBrowser) {
|
|
5111
|
-
// Order matters. We need to check Webkit the last one because
|
|
5112
|
-
// other vendors use to add Webkit prefixes to some properties
|
|
5113
|
-
var jsCssMap = {
|
|
5114
|
-
Moz: '-moz-',
|
|
5115
|
-
ms: '-ms-',
|
|
5116
|
-
O: '-o-',
|
|
5117
|
-
Webkit: '-webkit-'
|
|
5118
|
-
};
|
|
5119
|
-
|
|
5120
|
-
var _document$createEleme = document.createElement('p'),
|
|
5121
|
-
style = _document$createEleme.style;
|
|
5122
|
-
|
|
5123
|
-
var testProp = 'Transform';
|
|
5124
|
-
|
|
5125
|
-
for (var key in jsCssMap) {
|
|
5126
|
-
if (key + testProp in style) {
|
|
5127
|
-
js = key;
|
|
5128
|
-
css = jsCssMap[key];
|
|
5129
|
-
break;
|
|
5130
|
-
}
|
|
5131
|
-
} // Correctly detect the Edge browser.
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
if (js === 'Webkit' && 'msHyphens' in style) {
|
|
5135
|
-
js = 'ms';
|
|
5136
|
-
css = jsCssMap.ms;
|
|
5137
|
-
browser = 'edge';
|
|
5138
|
-
} // Correctly detect the Safari browser.
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
if (js === 'Webkit' && '-apple-trailing-word' in style) {
|
|
5142
|
-
vendor = 'apple';
|
|
5143
|
-
}
|
|
5144
|
-
}
|
|
5145
|
-
/**
|
|
5146
|
-
* Vendor prefix string for the current browser.
|
|
5147
|
-
*
|
|
5148
|
-
* @type {{js: String, css: String, vendor: String, browser: String}}
|
|
5149
|
-
* @api public
|
|
5150
|
-
*/
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
var prefix = {
|
|
5154
|
-
js: js,
|
|
5155
|
-
css: css,
|
|
5156
|
-
vendor: vendor,
|
|
5157
|
-
browser: browser,
|
|
5158
|
-
isTouch: isTouch
|
|
5159
|
-
};
|
|
5160
|
-
|
|
5161
|
-
/**
|
|
5162
|
-
* Test if a keyframe at-rule should be prefixed or not
|
|
5163
|
-
*
|
|
5164
|
-
* @param {String} vendor prefix string for the current browser.
|
|
5165
|
-
* @return {String}
|
|
5166
|
-
* @api public
|
|
5167
|
-
*/
|
|
5168
|
-
|
|
5169
|
-
function supportedKeyframes(key) {
|
|
5170
|
-
// Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'
|
|
5171
|
-
if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.
|
|
5172
|
-
// https://caniuse.com/#search=keyframes
|
|
5173
|
-
|
|
5174
|
-
if (prefix.js === 'ms') return key;
|
|
5175
|
-
return "@" + prefix.css + "keyframes" + key.substr(10);
|
|
5176
|
-
}
|
|
5177
|
-
|
|
5178
|
-
// https://caniuse.com/#search=appearance
|
|
5179
|
-
|
|
5180
|
-
var appearence = {
|
|
5181
|
-
noPrefill: ['appearance'],
|
|
5182
|
-
supportedProperty: function supportedProperty(prop) {
|
|
5183
|
-
if (prop !== 'appearance') return false;
|
|
5184
|
-
if (prefix.js === 'ms') return "-webkit-" + prop;
|
|
5185
|
-
return prefix.css + prop;
|
|
5186
|
-
}
|
|
5187
|
-
};
|
|
5188
|
-
|
|
5189
|
-
// https://caniuse.com/#search=color-adjust
|
|
5190
|
-
|
|
5191
|
-
var colorAdjust = {
|
|
5192
|
-
noPrefill: ['color-adjust'],
|
|
5193
|
-
supportedProperty: function supportedProperty(prop) {
|
|
5194
|
-
if (prop !== 'color-adjust') return false;
|
|
5195
|
-
if (prefix.js === 'Webkit') return prefix.css + "print-" + prop;
|
|
5196
|
-
return prop;
|
|
5197
|
-
}
|
|
5198
|
-
};
|
|
5199
|
-
|
|
5200
|
-
var regExp = /[-\s]+(.)?/g;
|
|
5201
|
-
/**
|
|
5202
|
-
* Replaces the letter with the capital letter
|
|
5203
|
-
*
|
|
5204
|
-
* @param {String} match
|
|
5205
|
-
* @param {String} c
|
|
5206
|
-
* @return {String}
|
|
5207
|
-
* @api private
|
|
5208
|
-
*/
|
|
5209
|
-
|
|
5210
|
-
function toUpper(match, c) {
|
|
5211
|
-
return c ? c.toUpperCase() : '';
|
|
5212
|
-
}
|
|
5213
|
-
/**
|
|
5214
|
-
* Convert dash separated strings to camel-cased.
|
|
5215
|
-
*
|
|
5216
|
-
* @param {String} str
|
|
5217
|
-
* @return {String}
|
|
5218
|
-
* @api private
|
|
5219
|
-
*/
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
function camelize(str) {
|
|
5223
|
-
return str.replace(regExp, toUpper);
|
|
5224
|
-
}
|
|
5225
|
-
|
|
5226
|
-
/**
|
|
5227
|
-
* Convert dash separated strings to pascal cased.
|
|
5228
|
-
*
|
|
5229
|
-
* @param {String} str
|
|
5230
|
-
* @return {String}
|
|
5231
|
-
* @api private
|
|
5232
|
-
*/
|
|
5233
|
-
|
|
5234
|
-
function pascalize(str) {
|
|
5235
|
-
return camelize("-" + str);
|
|
5236
|
-
}
|
|
5237
|
-
|
|
5238
|
-
// but we can use a longhand property instead.
|
|
5239
|
-
// https://caniuse.com/#search=mask
|
|
5240
|
-
|
|
5241
|
-
var mask = {
|
|
5242
|
-
noPrefill: ['mask'],
|
|
5243
|
-
supportedProperty: function supportedProperty(prop, style) {
|
|
5244
|
-
if (!/^mask/.test(prop)) return false;
|
|
5245
|
-
|
|
5246
|
-
if (prefix.js === 'Webkit') {
|
|
5247
|
-
var longhand = 'mask-image';
|
|
5248
|
-
|
|
5249
|
-
if (camelize(longhand) in style) {
|
|
5250
|
-
return prop;
|
|
5251
|
-
}
|
|
5252
|
-
|
|
5253
|
-
if (prefix.js + pascalize(longhand) in style) {
|
|
5254
|
-
return prefix.css + prop;
|
|
5255
|
-
}
|
|
5256
|
-
}
|
|
5257
|
-
|
|
5258
|
-
return prop;
|
|
5259
|
-
}
|
|
5260
|
-
};
|
|
5261
|
-
|
|
5262
|
-
// https://caniuse.com/#search=text-orientation
|
|
5263
|
-
|
|
5264
|
-
var textOrientation = {
|
|
5265
|
-
noPrefill: ['text-orientation'],
|
|
5266
|
-
supportedProperty: function supportedProperty(prop) {
|
|
5267
|
-
if (prop !== 'text-orientation') return false;
|
|
5268
|
-
|
|
5269
|
-
if (prefix.vendor === 'apple' && !prefix.isTouch) {
|
|
5270
|
-
return prefix.css + prop;
|
|
5271
|
-
}
|
|
5272
|
-
|
|
5273
|
-
return prop;
|
|
5274
|
-
}
|
|
5275
|
-
};
|
|
5276
|
-
|
|
5277
|
-
// https://caniuse.com/#search=transform
|
|
5278
|
-
|
|
5279
|
-
var transform = {
|
|
5280
|
-
noPrefill: ['transform'],
|
|
5281
|
-
supportedProperty: function supportedProperty(prop, style, options) {
|
|
5282
|
-
if (prop !== 'transform') return false;
|
|
5283
|
-
|
|
5284
|
-
if (options.transform) {
|
|
5285
|
-
return prop;
|
|
5286
|
-
}
|
|
5287
|
-
|
|
5288
|
-
return prefix.css + prop;
|
|
5289
|
-
}
|
|
5290
|
-
};
|
|
5291
|
-
|
|
5292
|
-
// https://caniuse.com/#search=transition
|
|
5293
|
-
|
|
5294
|
-
var transition = {
|
|
5295
|
-
noPrefill: ['transition'],
|
|
5296
|
-
supportedProperty: function supportedProperty(prop, style, options) {
|
|
5297
|
-
if (prop !== 'transition') return false;
|
|
5298
|
-
|
|
5299
|
-
if (options.transition) {
|
|
5300
|
-
return prop;
|
|
5301
|
-
}
|
|
5302
|
-
|
|
5303
|
-
return prefix.css + prop;
|
|
5304
|
-
}
|
|
5305
|
-
};
|
|
5306
|
-
|
|
5307
|
-
// https://caniuse.com/#search=writing-mode
|
|
5308
|
-
|
|
5309
|
-
var writingMode = {
|
|
5310
|
-
noPrefill: ['writing-mode'],
|
|
5311
|
-
supportedProperty: function supportedProperty(prop) {
|
|
5312
|
-
if (prop !== 'writing-mode') return false;
|
|
5313
|
-
|
|
5314
|
-
if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {
|
|
5315
|
-
return prefix.css + prop;
|
|
5316
|
-
}
|
|
5317
|
-
|
|
5318
|
-
return prop;
|
|
5319
|
-
}
|
|
5320
|
-
};
|
|
5321
|
-
|
|
5322
|
-
// https://caniuse.com/#search=user-select
|
|
5323
|
-
|
|
5324
|
-
var userSelect = {
|
|
5325
|
-
noPrefill: ['user-select'],
|
|
5326
|
-
supportedProperty: function supportedProperty(prop) {
|
|
5327
|
-
if (prop !== 'user-select') return false;
|
|
5328
|
-
|
|
5329
|
-
if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {
|
|
5330
|
-
return prefix.css + prop;
|
|
5331
|
-
}
|
|
5332
|
-
|
|
5333
|
-
return prop;
|
|
5334
|
-
}
|
|
5335
|
-
};
|
|
5336
|
-
|
|
5337
|
-
// https://caniuse.com/#search=multicolumn
|
|
5338
|
-
// https://github.com/postcss/autoprefixer/issues/491
|
|
5339
|
-
// https://github.com/postcss/autoprefixer/issues/177
|
|
5340
|
-
|
|
5341
|
-
var breakPropsOld = {
|
|
5342
|
-
supportedProperty: function supportedProperty(prop, style) {
|
|
5343
|
-
if (!/^break-/.test(prop)) return false;
|
|
5344
|
-
|
|
5345
|
-
if (prefix.js === 'Webkit') {
|
|
5346
|
-
var jsProp = "WebkitColumn" + pascalize(prop);
|
|
5347
|
-
return jsProp in style ? prefix.css + "column-" + prop : false;
|
|
5348
|
-
}
|
|
5349
|
-
|
|
5350
|
-
if (prefix.js === 'Moz') {
|
|
5351
|
-
var _jsProp = "page" + pascalize(prop);
|
|
5352
|
-
|
|
5353
|
-
return _jsProp in style ? "page-" + prop : false;
|
|
5354
|
-
}
|
|
5355
|
-
|
|
5356
|
-
return false;
|
|
5357
|
-
}
|
|
5358
|
-
};
|
|
5359
|
-
|
|
5360
|
-
// See https://github.com/postcss/autoprefixer/issues/324.
|
|
5361
|
-
|
|
5362
|
-
var inlineLogicalOld = {
|
|
5363
|
-
supportedProperty: function supportedProperty(prop, style) {
|
|
5364
|
-
if (!/^(border|margin|padding)-inline/.test(prop)) return false;
|
|
5365
|
-
if (prefix.js === 'Moz') return prop;
|
|
5366
|
-
var newProp = prop.replace('-inline', '');
|
|
5367
|
-
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;
|
|
5368
|
-
}
|
|
5369
|
-
};
|
|
5370
|
-
|
|
5371
|
-
// Camelization is required because we can't test using.
|
|
5372
|
-
// CSS syntax for e.g. in FF.
|
|
5373
|
-
|
|
5374
|
-
var unprefixed = {
|
|
5375
|
-
supportedProperty: function supportedProperty(prop, style) {
|
|
5376
|
-
return camelize(prop) in style ? prop : false;
|
|
5377
|
-
}
|
|
5378
|
-
};
|
|
5379
|
-
|
|
5380
|
-
var prefixed = {
|
|
5381
|
-
supportedProperty: function supportedProperty(prop, style) {
|
|
5382
|
-
var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.
|
|
5383
|
-
|
|
5384
|
-
if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.
|
|
5385
|
-
|
|
5386
|
-
if (prop[0] === '-' && prop[1] === '-') return prop;
|
|
5387
|
-
if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.
|
|
5388
|
-
|
|
5389
|
-
if (prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return "-webkit-" + prop;
|
|
5390
|
-
return false;
|
|
5391
|
-
}
|
|
5392
|
-
};
|
|
5393
|
-
|
|
5394
|
-
// https://caniuse.com/#search=scroll-snap
|
|
5395
|
-
|
|
5396
|
-
var scrollSnap = {
|
|
5397
|
-
supportedProperty: function supportedProperty(prop) {
|
|
5398
|
-
if (prop.substring(0, 11) !== 'scroll-snap') return false;
|
|
5399
|
-
|
|
5400
|
-
if (prefix.js === 'ms') {
|
|
5401
|
-
return "" + prefix.css + prop;
|
|
5402
|
-
}
|
|
5403
|
-
|
|
5404
|
-
return prop;
|
|
5405
|
-
}
|
|
5406
|
-
};
|
|
5407
|
-
|
|
5408
|
-
// https://caniuse.com/#search=overscroll-behavior
|
|
5409
|
-
|
|
5410
|
-
var overscrollBehavior = {
|
|
5411
|
-
supportedProperty: function supportedProperty(prop) {
|
|
5412
|
-
if (prop !== 'overscroll-behavior') return false;
|
|
5413
|
-
|
|
5414
|
-
if (prefix.js === 'ms') {
|
|
5415
|
-
return prefix.css + "scroll-chaining";
|
|
5416
|
-
}
|
|
5417
|
-
|
|
5418
|
-
return prop;
|
|
5419
|
-
}
|
|
5420
|
-
};
|
|
5421
|
-
|
|
5422
|
-
var propMap = {
|
|
5423
|
-
'flex-grow': 'flex-positive',
|
|
5424
|
-
'flex-shrink': 'flex-negative',
|
|
5425
|
-
'flex-basis': 'flex-preferred-size',
|
|
5426
|
-
'justify-content': 'flex-pack',
|
|
5427
|
-
order: 'flex-order',
|
|
5428
|
-
'align-items': 'flex-align',
|
|
5429
|
-
'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.
|
|
5430
|
-
|
|
5431
|
-
}; // Support old flex spec from 2012.
|
|
5432
|
-
|
|
5433
|
-
var flex2012 = {
|
|
5434
|
-
supportedProperty: function supportedProperty(prop, style) {
|
|
5435
|
-
var newProp = propMap[prop];
|
|
5436
|
-
if (!newProp) return false;
|
|
5437
|
-
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;
|
|
5438
|
-
}
|
|
5439
|
-
};
|
|
5440
|
-
|
|
5441
|
-
var propMap$1 = {
|
|
5442
|
-
flex: 'box-flex',
|
|
5443
|
-
'flex-grow': 'box-flex',
|
|
5444
|
-
'flex-direction': ['box-orient', 'box-direction'],
|
|
5445
|
-
order: 'box-ordinal-group',
|
|
5446
|
-
'align-items': 'box-align',
|
|
5447
|
-
'flex-flow': ['box-orient', 'box-direction'],
|
|
5448
|
-
'justify-content': 'box-pack'
|
|
5449
|
-
};
|
|
5450
|
-
var propKeys = Object.keys(propMap$1);
|
|
5451
|
-
|
|
5452
|
-
var prefixCss = function prefixCss(p) {
|
|
5453
|
-
return prefix.css + p;
|
|
5454
|
-
}; // Support old flex spec from 2009.
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
var flex2009 = {
|
|
5458
|
-
supportedProperty: function supportedProperty(prop, style, _ref) {
|
|
5459
|
-
var multiple = _ref.multiple;
|
|
5460
|
-
|
|
5461
|
-
if (propKeys.indexOf(prop) > -1) {
|
|
5462
|
-
var newProp = propMap$1[prop];
|
|
5463
|
-
|
|
5464
|
-
if (!Array.isArray(newProp)) {
|
|
5465
|
-
return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;
|
|
5466
|
-
}
|
|
5467
|
-
|
|
5468
|
-
if (!multiple) return false;
|
|
5469
|
-
|
|
5470
|
-
for (var i = 0; i < newProp.length; i++) {
|
|
5471
|
-
if (!(prefix.js + pascalize(newProp[0]) in style)) {
|
|
5472
|
-
return false;
|
|
5473
|
-
}
|
|
5474
|
-
}
|
|
5475
|
-
|
|
5476
|
-
return newProp.map(prefixCss);
|
|
5477
|
-
}
|
|
5478
|
-
|
|
5479
|
-
return false;
|
|
5480
|
-
}
|
|
5481
|
-
};
|
|
5482
|
-
|
|
5483
|
-
// plugins = [
|
|
5484
|
-
// ...plugins,
|
|
5485
|
-
// breakPropsOld,
|
|
5486
|
-
// inlineLogicalOld,
|
|
5487
|
-
// unprefixed,
|
|
5488
|
-
// prefixed,
|
|
5489
|
-
// scrollSnap,
|
|
5490
|
-
// flex2012,
|
|
5491
|
-
// flex2009
|
|
5492
|
-
// ]
|
|
5493
|
-
// Plugins without 'noPrefill' value, going last.
|
|
5494
|
-
// 'flex-*' plugins should be at the bottom.
|
|
5495
|
-
// 'flex2009' going after 'flex2012'.
|
|
5496
|
-
// 'prefixed' going after 'unprefixed'
|
|
5497
|
-
|
|
5498
|
-
var plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];
|
|
5499
|
-
var propertyDetectors = plugins.filter(function (p) {
|
|
5500
|
-
return p.supportedProperty;
|
|
5501
|
-
}).map(function (p) {
|
|
5502
|
-
return p.supportedProperty;
|
|
5503
|
-
});
|
|
5504
|
-
var noPrefill = plugins.filter(function (p) {
|
|
5505
|
-
return p.noPrefill;
|
|
5506
|
-
}).reduce(function (a, p) {
|
|
5507
|
-
a.push.apply(a, _toConsumableArray(p.noPrefill));
|
|
5508
|
-
return a;
|
|
5509
|
-
}, []);
|
|
5510
|
-
|
|
5511
|
-
var el;
|
|
5512
|
-
var cache = {};
|
|
5513
|
-
|
|
5514
|
-
if (isInBrowser) {
|
|
5515
|
-
el = document.createElement('p'); // We test every property on vendor prefix requirement.
|
|
5516
|
-
// Once tested, result is cached. It gives us up to 70% perf boost.
|
|
5517
|
-
// http://jsperf.com/element-style-object-access-vs-plain-object
|
|
5518
|
-
//
|
|
5519
|
-
// Prefill cache with known css properties to reduce amount of
|
|
5520
|
-
// properties we need to feature test at runtime.
|
|
5521
|
-
// http://davidwalsh.name/vendor-prefix
|
|
5522
|
-
|
|
5523
|
-
var computed = window.getComputedStyle(document.documentElement, '');
|
|
5524
|
-
|
|
5525
|
-
for (var key$1 in computed) {
|
|
5526
|
-
// eslint-disable-next-line no-restricted-globals
|
|
5527
|
-
if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];
|
|
5528
|
-
} // Properties that cannot be correctly detected using the
|
|
5529
|
-
// cache prefill method.
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
noPrefill.forEach(function (x) {
|
|
5533
|
-
return delete cache[x];
|
|
5534
|
-
});
|
|
5535
|
-
}
|
|
5536
|
-
/**
|
|
5537
|
-
* Test if a property is supported, returns supported property with vendor
|
|
5538
|
-
* prefix if required. Returns `false` if not supported.
|
|
5539
|
-
*
|
|
5540
|
-
* @param {String} prop dash separated
|
|
5541
|
-
* @param {Object} [options]
|
|
5542
|
-
* @return {String|Boolean}
|
|
5543
|
-
* @api public
|
|
5544
|
-
*/
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
function supportedProperty(prop, options) {
|
|
5548
|
-
if (options === void 0) {
|
|
5549
|
-
options = {};
|
|
5550
|
-
}
|
|
5551
|
-
|
|
5552
|
-
// For server-side rendering.
|
|
5553
|
-
if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.
|
|
5554
|
-
|
|
5555
|
-
if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {
|
|
5556
|
-
return cache[prop];
|
|
5557
|
-
} // Check if 'transition' or 'transform' natively supported in browser.
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
if (prop === 'transition' || prop === 'transform') {
|
|
5561
|
-
options[prop] = prop in el.style;
|
|
5562
|
-
} // Find a plugin for current prefix property.
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
for (var i = 0; i < propertyDetectors.length; i++) {
|
|
5566
|
-
cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.
|
|
5567
|
-
|
|
5568
|
-
if (cache[prop]) break;
|
|
5569
|
-
} // Reset styles for current property.
|
|
5570
|
-
// Firefox can even throw an error for invalid properties, e.g., "0".
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
try {
|
|
5574
|
-
el.style[prop] = '';
|
|
5575
|
-
} catch (err) {
|
|
5576
|
-
return false;
|
|
5577
|
-
}
|
|
5578
|
-
|
|
5579
|
-
return cache[prop];
|
|
5580
|
-
}
|
|
5581
|
-
|
|
5582
|
-
var cache$1 = {};
|
|
5583
|
-
var transitionProperties = {
|
|
5584
|
-
transition: 1,
|
|
5585
|
-
'transition-property': 1,
|
|
5586
|
-
'-webkit-transition': 1,
|
|
5587
|
-
'-webkit-transition-property': 1
|
|
5588
|
-
};
|
|
5589
|
-
var transPropsRegExp = /(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;
|
|
5590
|
-
var el$1;
|
|
5591
|
-
/**
|
|
5592
|
-
* Returns prefixed value transition/transform if needed.
|
|
5593
|
-
*
|
|
5594
|
-
* @param {String} match
|
|
5595
|
-
* @param {String} p1
|
|
5596
|
-
* @param {String} p2
|
|
5597
|
-
* @return {String}
|
|
5598
|
-
* @api private
|
|
5599
|
-
*/
|
|
5600
|
-
|
|
5601
|
-
function prefixTransitionCallback(match, p1, p2) {
|
|
5602
|
-
if (p1 === 'var') return 'var';
|
|
5603
|
-
if (p1 === 'all') return 'all';
|
|
5604
|
-
if (p2 === 'all') return ', all';
|
|
5605
|
-
var prefixedValue = p1 ? supportedProperty(p1) : ", " + supportedProperty(p2);
|
|
5606
|
-
if (!prefixedValue) return p1 || p2;
|
|
5607
|
-
return prefixedValue;
|
|
5608
|
-
}
|
|
5609
|
-
|
|
5610
|
-
if (isInBrowser) el$1 = document.createElement('p');
|
|
5611
|
-
/**
|
|
5612
|
-
* Returns prefixed value if needed. Returns `false` if value is not supported.
|
|
5613
|
-
*
|
|
5614
|
-
* @param {String} property
|
|
5615
|
-
* @param {String} value
|
|
5616
|
-
* @return {String|Boolean}
|
|
5617
|
-
* @api public
|
|
5618
|
-
*/
|
|
5619
|
-
|
|
5620
|
-
function supportedValue(property, value) {
|
|
5621
|
-
// For server-side rendering.
|
|
5622
|
-
var prefixedValue = value;
|
|
5623
|
-
if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.
|
|
5624
|
-
// We want only prefixable values here.
|
|
5625
|
-
// eslint-disable-next-line no-restricted-globals
|
|
5626
|
-
|
|
5627
|
-
if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {
|
|
5628
|
-
return prefixedValue;
|
|
5629
|
-
} // Create cache key for current value.
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.
|
|
5633
|
-
|
|
5634
|
-
if (process.env.NODE_ENV !== 'benchmark' && cache$1[cacheKey] != null) {
|
|
5635
|
-
return cache$1[cacheKey];
|
|
5636
|
-
} // IE can even throw an error in some cases, for e.g. style.content = 'bar'.
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
try {
|
|
5640
|
-
// Test value as it is.
|
|
5641
|
-
el$1.style[property] = prefixedValue;
|
|
5642
|
-
} catch (err) {
|
|
5643
|
-
// Return false if value not supported.
|
|
5644
|
-
cache$1[cacheKey] = false;
|
|
5645
|
-
return false;
|
|
5646
|
-
} // If 'transition' or 'transition-property' property.
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
if (transitionProperties[property]) {
|
|
5650
|
-
prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);
|
|
5651
|
-
} else if (el$1.style[property] === '') {
|
|
5652
|
-
// Value with a vendor prefix.
|
|
5653
|
-
prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert "flex" to "-ms-flexbox" for IE10.
|
|
5654
|
-
|
|
5655
|
-
if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.
|
|
5656
|
-
|
|
5657
|
-
el$1.style[property] = prefixedValue; // Return false if value not supported.
|
|
5658
|
-
|
|
5659
|
-
if (el$1.style[property] === '') {
|
|
5660
|
-
cache$1[cacheKey] = false;
|
|
5661
|
-
return false;
|
|
5662
|
-
}
|
|
5663
|
-
} // Reset styles for current property.
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
el$1.style[property] = ''; // Write current value to cache.
|
|
5667
|
-
|
|
5668
|
-
cache$1[cacheKey] = prefixedValue;
|
|
5669
|
-
return cache$1[cacheKey];
|
|
5670
|
-
}
|
|
5671
|
-
|
|
5672
|
-
cssVendor_cjs.prefix = prefix;
|
|
5673
|
-
var supportedKeyframes_1 = cssVendor_cjs.supportedKeyframes = supportedKeyframes;
|
|
5674
|
-
var supportedProperty_1 = cssVendor_cjs.supportedProperty = supportedProperty;
|
|
5675
|
-
var supportedValue_1 = cssVendor_cjs.supportedValue = supportedValue;
|
|
5676
|
-
|
|
5677
|
-
/**
|
|
5678
|
-
* Add vendor prefix to a property name when needed.
|
|
5679
|
-
*/
|
|
5680
|
-
|
|
5681
|
-
function jssVendorPrefixer() {
|
|
5682
|
-
function onProcessRule(rule) {
|
|
5683
|
-
if (rule.type === 'keyframes') {
|
|
5684
|
-
var atRule = rule;
|
|
5685
|
-
atRule.at = supportedKeyframes_1(atRule.at);
|
|
5686
|
-
}
|
|
5687
|
-
}
|
|
5688
|
-
|
|
5689
|
-
function prefixStyle(style) {
|
|
5690
|
-
for (var prop in style) {
|
|
5691
|
-
var value = style[prop];
|
|
5692
|
-
|
|
5693
|
-
if (prop === 'fallbacks' && Array.isArray(value)) {
|
|
5694
|
-
style[prop] = value.map(prefixStyle);
|
|
5695
|
-
continue;
|
|
5696
|
-
}
|
|
5697
|
-
|
|
5698
|
-
var changeProp = false;
|
|
5699
|
-
var supportedProp = supportedProperty_1(prop);
|
|
5700
|
-
if (supportedProp && supportedProp !== prop) changeProp = true;
|
|
5701
|
-
var changeValue = false;
|
|
5702
|
-
var supportedValue$1 = supportedValue_1(supportedProp, toCssValue(value));
|
|
5703
|
-
if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;
|
|
5704
|
-
|
|
5705
|
-
if (changeProp || changeValue) {
|
|
5706
|
-
if (changeProp) delete style[prop];
|
|
5707
|
-
style[supportedProp || prop] = supportedValue$1 || value;
|
|
5708
|
-
}
|
|
5709
|
-
}
|
|
5710
|
-
|
|
5711
|
-
return style;
|
|
5712
|
-
}
|
|
5713
|
-
|
|
5714
|
-
function onProcessStyle(style, rule) {
|
|
5715
|
-
if (rule.type !== 'style') return style;
|
|
5716
|
-
return prefixStyle(style);
|
|
5717
|
-
}
|
|
5718
|
-
|
|
5719
|
-
function onChangeValue(value, prop) {
|
|
5720
|
-
return supportedValue_1(prop, toCssValue(value)) || value;
|
|
5721
|
-
}
|
|
5722
|
-
|
|
5723
|
-
return {
|
|
5724
|
-
onProcessRule: onProcessRule,
|
|
5725
|
-
onProcessStyle: onProcessStyle,
|
|
5726
|
-
onChangeValue: onChangeValue
|
|
5727
|
-
};
|
|
5728
|
-
}
|
|
5729
|
-
|
|
5730
|
-
/**
|
|
5731
|
-
* Sort props by length.
|
|
5732
|
-
*/
|
|
5733
|
-
function jssPropsSort() {
|
|
5734
|
-
var sort = function sort(prop0, prop1) {
|
|
5735
|
-
if (prop0.length === prop1.length) {
|
|
5736
|
-
return prop0 > prop1 ? 1 : -1;
|
|
5737
|
-
}
|
|
5738
|
-
|
|
5739
|
-
return prop0.length - prop1.length;
|
|
5740
|
-
};
|
|
5741
|
-
|
|
5742
|
-
return {
|
|
5743
|
-
onProcessStyle: function onProcessStyle(style, rule) {
|
|
5744
|
-
if (rule.type !== 'style') return style;
|
|
5745
|
-
var newStyle = {};
|
|
5746
|
-
var props = Object.keys(style).sort(sort);
|
|
5747
|
-
|
|
5748
|
-
for (var i = 0; i < props.length; i++) {
|
|
5749
|
-
newStyle[props[i]] = style[props[i]];
|
|
5750
|
-
}
|
|
5751
|
-
|
|
5752
|
-
return newStyle;
|
|
5753
|
-
}
|
|
5754
|
-
};
|
|
5755
|
-
}
|
|
5756
|
-
|
|
5757
|
-
var create = function create(options) {
|
|
5758
|
-
if (options === void 0) {
|
|
5759
|
-
options = {};
|
|
5760
|
-
}
|
|
5761
|
-
|
|
5762
|
-
return {
|
|
5763
|
-
plugins: [functionPlugin(), observablePlugin(options.observable), templatePlugin(), jssGlobal(), jssExtend(), jssNested(), jssCompose(), camelCase(), defaultUnit(options.defaultUnit), jssExpand(), jssVendorPrefixer(), jssPropsSort()]
|
|
5764
|
-
};
|
|
5765
|
-
};
|
|
5766
|
-
|
|
5767
|
-
index.setup({
|
|
5768
|
-
...create(),
|
|
5769
|
-
createGenerateId: () => (rule) => rule.key,
|
|
5770
|
-
plugins: [...create().plugins, dist({ combineMediaQueries: true })],
|
|
5771
|
-
});
|
|
5772
|
-
|
|
5773
|
-
const hasDocument = typeof document !== 'undefined';
|
|
5774
|
-
|
|
5775
|
-
hasDocument && 'scrollBehavior' in document.documentElement.style;
|
|
5776
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
5777
|
-
win.document || { head: {} };
|
|
5778
|
-
(win.HTMLElement || class {
|
|
5779
|
-
});
|
|
5780
|
-
|
|
5781
|
-
const isThemeDark = (theme) => {
|
|
5782
|
-
return theme === 'dark';
|
|
5783
|
-
};
|
|
5784
|
-
|
|
5785
|
-
const formatObjectOutput = (value) => {
|
|
5786
|
-
return JSON.stringify(value)
|
|
5787
|
-
.replace(/"([a-zA-Z?]+)":/g, '$1:') // remove double quotes from keys
|
|
5788
|
-
.replace(/([,:{])/g, '$1 ') // add space after following: ,:{
|
|
5789
|
-
.replace(/(})/g, ' $1') // add space before following: }
|
|
5790
|
-
.replace(/^"(.+)"$/, '$1'); // remove wrapping double quotes
|
|
5791
|
-
};
|
|
5792
|
-
'value, ' +
|
|
5793
|
-
formatObjectOutput(BREAKPOINTS.reduce((prev, key) => (Object.assign(Object.assign({}, prev), { [key + (key !== 'base' ? '?' : '')]: 'value' })), {})).replace(/"/g, '');
|
|
5794
|
-
|
|
5795
|
-
const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
5796
|
-
|
|
5797
|
-
const getComponentCss$T = (size, compact, open, theme) => {
|
|
5798
|
-
const { primaryColor, hoverColor, focusColor, contrastLowColor } = getThemedColors(theme);
|
|
5799
|
-
const border = `1px solid ${contrastLowColor}`;
|
|
5800
|
-
return getCss(Object.assign(Object.assign({ '@global': {
|
|
5801
|
-
':host': addImportantToEachRule(Object.assign({ display: 'block' }, hostHiddenStyles)),
|
|
5802
|
-
button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', position: 'relative', justifyContent: 'space-between', margin: '2px 0', width: '100%', textDecoration: 'none', border: 0, outline: 0, gap: '24px', background: 'transparent', cursor: 'pointer', textAlign: 'left', color: primaryColor }, textSmallStyle), { fontWeight: fontWeight.semiBold }), buildResponsiveStyles(size, (s) => ({
|
|
5803
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
5804
|
-
// @ts-ignore
|
|
5805
|
-
fontSize: fontSizeText[s],
|
|
5806
|
-
padding: compact ? '4px 0' : `${s === 'medium' ? '20px' : '12px'} 0`,
|
|
5807
|
-
}))), mergeDeep({
|
|
5808
|
-
'&::before': Object.assign({ content: '""', position: 'absolute', borderRadius: borderRadiusSmall, left: '-4px', right: '-4px' }, (compact
|
|
5809
|
-
? {
|
|
5810
|
-
top: '2px',
|
|
5811
|
-
bottom: '2px',
|
|
5812
|
-
}
|
|
5813
|
-
: {
|
|
5814
|
-
top: '6px',
|
|
5815
|
-
bottom: '6px',
|
|
5816
|
-
})),
|
|
5817
|
-
}, hoverMediaQuery({
|
|
5818
|
-
'&::before': {
|
|
5819
|
-
transition: getTransition('background-color'),
|
|
5820
|
-
},
|
|
5821
|
-
'&:hover::before': {
|
|
5822
|
-
background: hoverColor,
|
|
5823
|
-
},
|
|
5824
|
-
}))), { '&:focus::before': {
|
|
5825
|
-
border: `${borderWidthBase} solid ${focusColor}`,
|
|
5826
|
-
}, '&:not(:focus-visible)::before': {
|
|
5827
|
-
border: 0,
|
|
5828
|
-
} }),
|
|
5829
|
-
} }, (!compact && {
|
|
5830
|
-
root: {
|
|
5831
|
-
borderBottom: border,
|
|
5832
|
-
},
|
|
5833
|
-
})), { heading: {
|
|
5834
|
-
margin: 0,
|
|
5835
|
-
padding: 0,
|
|
5836
|
-
}, icon: {
|
|
5837
|
-
width: fontLineHeight,
|
|
5838
|
-
height: fontLineHeight,
|
|
5839
|
-
transformOrigin: '50% 50%',
|
|
5840
|
-
transform: open ? 'rotate3d(0)' : 'rotate3d(0,0,1,90deg)',
|
|
5841
|
-
transition: getTransition('transform'),
|
|
5842
|
-
}, collapsible: Object.assign({ padding: 0, overflow: 'hidden' }, (open
|
|
5843
|
-
? {
|
|
5844
|
-
height: 'auto',
|
|
5845
|
-
paddingBottom: compact ? spacingStaticSmall : '24px',
|
|
5846
|
-
visibility: 'visible',
|
|
5847
|
-
transition: getTransition('height') + `,visibility ${transitionDuration}`,
|
|
5848
|
-
animation: `$open ${transitionDuration} ease forwards`,
|
|
5849
|
-
}
|
|
5850
|
-
: {
|
|
5851
|
-
height: 0,
|
|
5852
|
-
visibility: 'hidden',
|
|
5853
|
-
transition: getTransition('height') + `,visibility ${transitionDuration} linear ${transitionDuration}`,
|
|
5854
|
-
})),
|
|
5855
|
-
// TODO: this doesn't get shortened and results in `keyframes-open` for some unknown reason
|
|
5856
|
-
'@keyframes open': {
|
|
5857
|
-
'0%,99%': {
|
|
5858
|
-
overflow: 'hidden',
|
|
5859
|
-
},
|
|
5860
|
-
'100%': {
|
|
5861
|
-
overflow: 'visible',
|
|
5862
|
-
},
|
|
5863
|
-
} }));
|
|
5864
|
-
};
|
|
5865
|
-
|
|
5866
|
-
const TOAST_Z_INDEX = 999999;
|
|
5867
|
-
const MODAL_Z_INDEX = 99999;
|
|
5868
|
-
const POPOVER_Z_INDEX = 9999;
|
|
5869
|
-
const BANNER_Z_INDEX = 99;
|
|
5870
|
-
|
|
5871
|
-
const oneColumnWidthS = `calc((100% - ${gridSafeZoneBase} * 2 - ${gridGap} * 13) / 14)`;
|
|
5872
|
-
const oneColumnWidthXXL = `calc((min(100%, ${gridWidthMax}) - ${gridSafeZoneXXL} * 2 - ${gridGap} * 13) / 14)`;
|
|
5873
|
-
const offsetHorizontalXXL = `max(0px, (100% - ${gridWidthMax}) / 2)`;
|
|
5874
|
-
const widthMap$1 = {
|
|
5875
|
-
narrow: {
|
|
5876
|
-
padding: `0 ${gridSafeZoneBase}`,
|
|
5877
|
-
[getMediaQueryMin('s')]: {
|
|
5878
|
-
padding: `0 calc(${gridSafeZoneBase} + ${gridGap} * 3 + ${oneColumnWidthS} * 3)`,
|
|
5879
|
-
},
|
|
5880
|
-
[getMediaQueryMin('xxl')]: {
|
|
5881
|
-
padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL} + ${gridGap} * 3 + ${oneColumnWidthXXL} * 3)`,
|
|
5882
|
-
},
|
|
5883
|
-
},
|
|
5884
|
-
basic: {
|
|
5885
|
-
padding: `0 ${gridSafeZoneBase}`,
|
|
5886
|
-
[getMediaQueryMin('s')]: {
|
|
5887
|
-
padding: `0 calc(${gridSafeZoneBase} + ${gridGap} + ${oneColumnWidthS})`,
|
|
5888
|
-
},
|
|
5889
|
-
[getMediaQueryMin('xxl')]: {
|
|
5890
|
-
padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL} + ${gridGap} + ${oneColumnWidthXXL})`,
|
|
5891
|
-
},
|
|
5892
|
-
},
|
|
5893
|
-
extended: {
|
|
5894
|
-
padding: `0 ${gridSafeZoneBase}`,
|
|
5895
|
-
[getMediaQueryMin('xxl')]: {
|
|
5896
|
-
padding: `0 calc(${offsetHorizontalXXL} + ${gridSafeZoneXXL})`,
|
|
5897
|
-
},
|
|
5898
|
-
},
|
|
5899
|
-
};
|
|
5900
|
-
const getContentWrapperStyle = (width) => {
|
|
5901
|
-
return Object.assign({ display: 'block', margin: 0, padding: `0 ${offsetHorizontalXXL}`, width: 'auto', minWidth: 0, maxWidth: gridWidthMax }, widthMap$1[width]);
|
|
4041
|
+
const getContentWrapperStyle = (width) => {
|
|
4042
|
+
return Object.assign({ display: 'block', margin: 0, padding: `0 ${offsetHorizontalXXL}`, width: 'auto', minWidth: 0, maxWidth: gridWidthMax }, widthMap$1[width]);
|
|
5902
4043
|
};
|
|
5903
4044
|
|
|
5904
4045
|
const easeInQuad = 'cubic-bezier(0.45,0,0.55,1)';
|
|
@@ -6001,6 +4142,7 @@ const getComponentCss$R = (direction) => {
|
|
|
6001
4142
|
};
|
|
6002
4143
|
|
|
6003
4144
|
const fontSizeTextMap = {
|
|
4145
|
+
'xx-small': fontSizeTextXXSmall,
|
|
6004
4146
|
'x-small': fontSizeTextXSmall,
|
|
6005
4147
|
small: fontSizeTextSmall,
|
|
6006
4148
|
medium: fontSizeTextMedium,
|
|
@@ -6023,7 +4165,7 @@ const getLinkButtonPureStyles = (icon, iconSource, active, isDisabledOrLoading,
|
|
|
6023
4165
|
const { primaryColor, disabledColor, hoverColor, focusColor } = getThemedColors(theme);
|
|
6024
4166
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
6025
4167
|
return Object.assign({ '@global': {
|
|
6026
|
-
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign({ transform: 'translate3d(0,0,0)', outline: 0 }, hostHiddenStyles))), buildResponsiveStyles(stretch, (responsiveStretch) => (Object.assign({ display: responsiveStretch ? 'block' : 'inline-block' }, (!responsiveStretch && { verticalAlign: 'top' }))))),
|
|
4168
|
+
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign({ transform: 'translate3d(0,0,0)', outline: 0 }, hostHiddenStyles))), buildResponsiveStyles(stretch, (responsiveStretch) => (Object.assign({ display: responsiveStretch ? 'block' : 'inline-block', width: responsiveStretch ? '100%' : 'auto' }, (!responsiveStretch && { verticalAlign: 'top' }))))),
|
|
6027
4169
|
}, root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', gap: spacingStaticXSmall, width: '100%', margin: 0, padding: 0, color: isDisabledOrLoading ? disabledColor : primaryColor, outline: 0 }, textSmallStyle), mergeDeep(buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
6028
4170
|
justifyContent: stretchValue ? 'space-between' : 'flex-start',
|
|
6029
4171
|
alignItems: stretchValue ? 'center' : 'flex-start',
|
|
@@ -6108,7 +4250,7 @@ const getLinkButtonStyles = (icon, iconSource, variant, hideLabel, isDisabledOrL
|
|
|
6108
4250
|
const { focusColor } = getThemedColors(theme);
|
|
6109
4251
|
const hasIcon = hasVisibleIcon(icon, iconSource) || hideLabel;
|
|
6110
4252
|
return Object.assign({ '@global': {
|
|
6111
|
-
':host':
|
|
4253
|
+
':host': Object.assign({ display: 'inline-block' }, addImportantToEachRule(Object.assign({ verticalAlign: 'top', outline: 0 }, hostHiddenStyles))),
|
|
6112
4254
|
}, root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-start', justifyContent: 'center', width: '100%', minWidth: '54px', minHeight: '54px', boxSizing: 'border-box', outline: 0, textAlign: 'left', appearance: 'none', textDecoration: 'none', border: `2px solid ${borderColor}`, borderRadius: borderRadiusSmall, transform: 'translate3d(0,0,0)', // creates new stacking context (for slotted anchor + focus)
|
|
6113
4255
|
backgroundColor, color: textColor }, textSmallStyle), { transition: ['background-color', 'border-color', 'color'].map(getTransition).join() }), buildResponsiveStyles(hideLabel, (hideLabelValue) => ({
|
|
6114
4256
|
padding: hideLabelValue ? '13px' : hasIcon ? '13px 26px 13px 18px' : '13px 26px',
|
|
@@ -6210,7 +4352,7 @@ const spacingMap = {
|
|
|
6210
4352
|
},
|
|
6211
4353
|
},
|
|
6212
4354
|
};
|
|
6213
|
-
const getComponentCss$O = (width,
|
|
4355
|
+
const getComponentCss$O = (width, hasPagination, alignHeader, theme) => {
|
|
6214
4356
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
6215
4357
|
const isHeaderAlignCenter = alignHeader === 'center';
|
|
6216
4358
|
return getCss(Object.assign({ '@global': {
|
|
@@ -6257,9 +4399,9 @@ const getComponentCss$O = (width, disablePagination, alignHeader, theme) => {
|
|
|
6257
4399
|
'&__list': Object.assign({ display: 'flex', height: '100%' }, getBackfaceVisibilityJssStyle()),
|
|
6258
4400
|
'&__slide': Object.assign(Object.assign({ position: 'relative', flexShrink: 0 }, getBackfaceVisibilityJssStyle()), { transform: 'translateZ(0)' }),
|
|
6259
4401
|
'&__sr': getScreenReaderOnlyJssStyle(), // appears in the DOM when sliding
|
|
6260
|
-
} }, (
|
|
6261
|
-
pagination: Object.assign(Object.assign({}, buildResponsiveStyles(
|
|
6262
|
-
display:
|
|
4402
|
+
} }, (hasPagination && {
|
|
4403
|
+
pagination: Object.assign(Object.assign({}, buildResponsiveStyles(hasPagination, (hasPaginationValue) => ({
|
|
4404
|
+
display: hasPaginationValue ? 'flex' : 'none',
|
|
6263
4405
|
}))), { justifyContent: 'center', gap: spacingStaticSmall }),
|
|
6264
4406
|
bullet: {
|
|
6265
4407
|
borderRadius: borderRadiusSmall,
|
|
@@ -6387,19 +4529,14 @@ const getThemedTypographyColor = (theme, textColor) => {
|
|
|
6387
4529
|
const { primaryColor, contrastHighColor, contrastMediumColor, contrastLowColor, successColor, errorColor, warningColor, infoColor, } = getThemedColors(theme);
|
|
6388
4530
|
const colorMap = {
|
|
6389
4531
|
primary: primaryColor,
|
|
6390
|
-
brand: primaryColor,
|
|
6391
4532
|
default: primaryColor,
|
|
6392
4533
|
'contrast-low': contrastLowColor,
|
|
6393
|
-
'neutral-contrast-low': contrastLowColor,
|
|
6394
4534
|
'contrast-medium': contrastMediumColor,
|
|
6395
|
-
'neutral-contrast-medium': contrastMediumColor,
|
|
6396
4535
|
'contrast-high': contrastHighColor,
|
|
6397
|
-
'neutral-contrast-high': contrastHighColor,
|
|
6398
4536
|
'notification-success': successColor,
|
|
6399
4537
|
'notification-warning': warningColor,
|
|
6400
4538
|
'notification-error': errorColor,
|
|
6401
4539
|
'notification-info': infoColor,
|
|
6402
|
-
'notification-neutral': infoColor,
|
|
6403
4540
|
inherit: 'currentColor',
|
|
6404
4541
|
};
|
|
6405
4542
|
return colorMap[textColor];
|
|
@@ -6434,6 +4571,7 @@ const getTypographySlottedJssStyle = () => {
|
|
|
6434
4571
|
};
|
|
6435
4572
|
|
|
6436
4573
|
const sizeMap$5 = {
|
|
4574
|
+
small: fontSizeDisplaySmall,
|
|
6437
4575
|
medium: fontSizeDisplayMedium,
|
|
6438
4576
|
large: fontSizeDisplayLarge,
|
|
6439
4577
|
};
|
|
@@ -6454,9 +4592,6 @@ const getComponentCss$L = (size, align, color, ellipsis, theme) => {
|
|
|
6454
4592
|
const getComponentCss$K = (color, orientation, theme) => {
|
|
6455
4593
|
const { contrastLowColor, contrastMediumColor, contrastHighColor } = getThemedColors(theme);
|
|
6456
4594
|
const colorMap = {
|
|
6457
|
-
'neutral-contrast-low': contrastLowColor,
|
|
6458
|
-
'neutral-contrast-medium': contrastMediumColor,
|
|
6459
|
-
'neutral-contrast-high': contrastHighColor,
|
|
6460
4595
|
'contrast-low': contrastLowColor,
|
|
6461
4596
|
'contrast-medium': contrastMediumColor,
|
|
6462
4597
|
'contrast-high': contrastHighColor,
|
|
@@ -6561,7 +4696,6 @@ const sizeMap$4 = {
|
|
|
6561
4696
|
large: fontSizeHeadingLarge,
|
|
6562
4697
|
'x-large': fontSizeHeadingXLarge,
|
|
6563
4698
|
'xx-large': fontSizeHeadingXXLarge,
|
|
6564
|
-
'xxx-large': fontSizeHeadingXXXLarge,
|
|
6565
4699
|
};
|
|
6566
4700
|
const getComponentCss$E = (size, align, color, ellipsis, theme) => {
|
|
6567
4701
|
return getCss({
|
|
@@ -6605,6 +4739,7 @@ const getHeadlineVariantJssStyle = (variant) => {
|
|
|
6605
4739
|
}));
|
|
6606
4740
|
};
|
|
6607
4741
|
const textSizeMap = {
|
|
4742
|
+
'xx-small': fontSizeTextXXSmall,
|
|
6608
4743
|
'x-small': fontSizeTextXSmall,
|
|
6609
4744
|
small: fontSizeTextSmall,
|
|
6610
4745
|
medium: fontSizeTextMedium,
|
|
@@ -6630,64 +4765,57 @@ const getComponentCss$D = (variant, align, color, ellipsis, theme) => {
|
|
|
6630
4765
|
});
|
|
6631
4766
|
};
|
|
6632
4767
|
|
|
4768
|
+
const toFilter = (values) => `invert(${values[0]}%) sepia(${values[1]}%) saturate(${values[2]}%) hue-rotate(${values[3]}deg) brightness(${values[4]}%) contrast(${values[5]}%)`;
|
|
4769
|
+
|
|
4770
|
+
const filterLightContrastLow = toFilter([93, 11, 36, 201, 89, 102]);
|
|
4771
|
+
const filterLightContrastMedium = toFilter([65, 6, 119, 187, 90, 92]);
|
|
4772
|
+
const filterLightContrastHigh = toFilter([40, 2, 686, 187, 80, 94]);
|
|
4773
|
+
const filterDarkContrastLow = toFilter([20, 7, 421, 202, 97, 82]);
|
|
4774
|
+
const filterDarkContrastMedium = toFilter([54, 4, 229, 187, 91, 84]);
|
|
4775
|
+
const filterDarkContrastHigh = toFilter([68, 6, 108, 187, 104, 88]);
|
|
4776
|
+
|
|
4777
|
+
const filterLightNotificationSuccess = toFilter([62, 61, 551, 86, 86, 80]);
|
|
4778
|
+
const filterLightNotificationWarning = toFilter([74, 91, 343, 348, 92, 86]);
|
|
4779
|
+
const filterLightNotificationError = toFilter([25, 62, 2003, 335, 100, 97]);
|
|
4780
|
+
const filterLightNotificationInfo = toFilter([31, 32, 5493, 216, 90, 107]);
|
|
4781
|
+
const filterDarkNotificationSuccess = toFilter([59, 22, 1342, 86, 96, 88]);
|
|
4782
|
+
const filterDarkNotificationWarning = toFilter([72, 94, 303, 354, 89, 94]);
|
|
4783
|
+
const filterDarkNotificationError = toFilter([28, 34, 3133, 333, 95, 100]);
|
|
4784
|
+
const filterDarkNotificationInfo = toFilter([31, 32, 5493, 216, 90, 107]);
|
|
4785
|
+
|
|
4786
|
+
const filterLightPrimary = toFilter([3, 7, 2930, 188, 91, 103]);
|
|
4787
|
+
const filterDarkPrimary = toFilter([97, 55, 2840, 180, 114, 103]);
|
|
4788
|
+
|
|
6633
4789
|
const sizeMap$3 = {
|
|
4790
|
+
'xx-small': fontSizeTextXXSmall,
|
|
6634
4791
|
'x-small': fontSizeTextXSmall,
|
|
6635
4792
|
small: fontSizeTextSmall,
|
|
6636
4793
|
medium: fontSizeTextMedium,
|
|
6637
4794
|
large: fontSizeTextLarge,
|
|
6638
4795
|
'x-large': fontSizeTextXLarge,
|
|
6639
4796
|
};
|
|
6640
|
-
// TODO, use Tuple to reduce chunk size
|
|
6641
|
-
const filterLightPrimary$1 = 'invert(3%) sepia(7%) saturate(2930%) hue-rotate(188deg) brightness(91%) contrast(103%)';
|
|
6642
|
-
const filterLightContrastLow$1 = 'invert(93%) sepia(11%) saturate(36%) hue-rotate(201deg) brightness(89%) contrast(102%)';
|
|
6643
|
-
const filterLightContrastMedium$1 = 'invert(65%) sepia(6%) saturate(119%) hue-rotate(187deg) brightness(90%) contrast(92%)';
|
|
6644
|
-
const filterLightContrastHigh$1 = 'invert(40%) sepia(2%) saturate(686%) hue-rotate(187deg) brightness(80%) contrast(94%)';
|
|
6645
|
-
const filterLightNotificationSuccess = 'invert(62%) sepia(61%) saturate(551%) hue-rotate(86deg) brightness(86%) contrast(80%)';
|
|
6646
|
-
const filterLightNotificationWarning = 'invert(74%) sepia(91%) saturate(343%) hue-rotate(348deg) brightness(92%) contrast(86%)';
|
|
6647
|
-
const filterLightNotificationError = 'invert(25%) sepia(62%) saturate(2003%) hue-rotate(335deg) brightness(100%) contrast(97%)';
|
|
6648
|
-
const filterLightNotificationInfo = 'invert(31%) sepia(32%) saturate(5493%) hue-rotate(216deg) brightness(90%) contrast(107%)';
|
|
6649
|
-
const filterDarkPrimary$1 = 'invert(97%) sepia(55%) saturate(2840%) hue-rotate(180deg) brightness(114%) contrast(103%)';
|
|
6650
|
-
const filterDarkContrastLow$1 = 'invert(20%) sepia(7%) saturate(421%) hue-rotate(202deg) brightness(97%) contrast(82%)';
|
|
6651
|
-
const filterDarkContrastMedium$1 = 'invert(54%) sepia(4%) saturate(229%) hue-rotate(187deg) brightness(91%) contrast(84%)';
|
|
6652
|
-
const filterDarkContrastHigh$1 = 'invert(68%) sepia(6%) saturate(108%) hue-rotate(187deg) brightness(104%) contrast(88%)';
|
|
6653
|
-
const filterDarkNotificationSuccess = 'invert(59%) sepia(22%) saturate(1342%) hue-rotate(86deg) brightness(96%) contrast(88%)';
|
|
6654
|
-
const filterDarkNotificationWarning = 'invert(72%) sepia(94%) saturate(303%) hue-rotate(354deg) brightness(89%) contrast(94%)';
|
|
6655
|
-
const filterDarkNotificationError = 'invert(28%) sepia(34%) saturate(3133%) hue-rotate(333deg) brightness(95%) contrast(100%)';
|
|
6656
|
-
const filterDarkNotificationInfo = 'invert(31%) sepia(32%) saturate(5493%) hue-rotate(216deg) brightness(90%) contrast(107%)';
|
|
6657
4797
|
const filter = {
|
|
6658
4798
|
light: {
|
|
6659
|
-
primary: filterLightPrimary
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
'contrast-
|
|
6664
|
-
'neutral-contrast-low': filterLightContrastLow$1,
|
|
6665
|
-
'contrast-medium': filterLightContrastMedium$1,
|
|
6666
|
-
'neutral-contrast-medium': filterLightContrastMedium$1,
|
|
6667
|
-
'contrast-high': filterLightContrastHigh$1,
|
|
6668
|
-
'neutral-contrast-high': filterLightContrastHigh$1,
|
|
4799
|
+
primary: filterLightPrimary,
|
|
4800
|
+
'state-disabled': filterLightContrastMedium,
|
|
4801
|
+
'contrast-low': filterLightContrastLow,
|
|
4802
|
+
'contrast-medium': filterLightContrastMedium,
|
|
4803
|
+
'contrast-high': filterLightContrastHigh,
|
|
6669
4804
|
'notification-success': filterLightNotificationSuccess,
|
|
6670
4805
|
'notification-warning': filterLightNotificationWarning,
|
|
6671
4806
|
'notification-error': filterLightNotificationError,
|
|
6672
4807
|
'notification-info': filterLightNotificationInfo,
|
|
6673
|
-
'notification-neutral': filterLightNotificationInfo, // deprecated
|
|
6674
4808
|
},
|
|
6675
4809
|
dark: {
|
|
6676
|
-
primary: filterDarkPrimary
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
'contrast-
|
|
6681
|
-
'neutral-contrast-low': filterDarkContrastLow$1,
|
|
6682
|
-
'contrast-medium': filterDarkContrastMedium$1,
|
|
6683
|
-
'neutral-contrast-medium': filterDarkContrastMedium$1,
|
|
6684
|
-
'contrast-high': filterDarkContrastHigh$1,
|
|
6685
|
-
'neutral-contrast-high': filterDarkContrastHigh$1,
|
|
4810
|
+
primary: filterDarkPrimary,
|
|
4811
|
+
'state-disabled': filterDarkContrastMedium,
|
|
4812
|
+
'contrast-low': filterDarkContrastLow,
|
|
4813
|
+
'contrast-medium': filterDarkContrastMedium,
|
|
4814
|
+
'contrast-high': filterDarkContrastHigh,
|
|
6686
4815
|
'notification-success': filterDarkNotificationSuccess,
|
|
6687
4816
|
'notification-warning': filterDarkNotificationWarning,
|
|
6688
4817
|
'notification-error': filterDarkNotificationError,
|
|
6689
4818
|
'notification-info': filterDarkNotificationInfo,
|
|
6690
|
-
'notification-neutral': filterDarkNotificationInfo, // deprecated
|
|
6691
4819
|
},
|
|
6692
4820
|
};
|
|
6693
4821
|
const forceRerenderAnimationStyle = {
|
|
@@ -6703,10 +4831,11 @@ const keyFramesDark = 'rerender-dark';
|
|
|
6703
4831
|
const getComponentCss$C = (color, size, theme) => {
|
|
6704
4832
|
const isColorInherit = color === 'inherit';
|
|
6705
4833
|
const isSizeInherit = size === 'inherit';
|
|
4834
|
+
const isDark = isThemeDark(theme);
|
|
6706
4835
|
return getCss({
|
|
6707
4836
|
'@global': Object.assign({ ':host': Object.assign({ display: 'inline-block', verticalAlign: 'top' }, addImportantToEachRule(hostHiddenStyles)), img: Object.assign(Object.assign({ display: 'block', margin: 0, padding: 0 }, (!isColorInherit && {
|
|
6708
4837
|
filter: filter[theme][color],
|
|
6709
|
-
WebkitAnimation: `${
|
|
4838
|
+
WebkitAnimation: `${isDark ? keyFramesDark : keyFramesLight} 1ms`, // needed to enforce repaint in Safari if theme is switched programmatically.
|
|
6710
4839
|
})), (isSizeInherit
|
|
6711
4840
|
? {
|
|
6712
4841
|
width: size,
|
|
@@ -6717,7 +4846,7 @@ const getComponentCss$C = (color, size, theme) => {
|
|
|
6717
4846
|
height: fontLineHeight,
|
|
6718
4847
|
font: `${sizeMap$3[size]} ${fontFamily}`,
|
|
6719
4848
|
})) }, (!isColorInherit && {
|
|
6720
|
-
[`@keyframes ${
|
|
4849
|
+
[`@keyframes ${isDark ? keyFramesDark : keyFramesLight}`]: forceRerenderAnimationStyle,
|
|
6721
4850
|
})),
|
|
6722
4851
|
});
|
|
6723
4852
|
};
|
|
@@ -6790,12 +4919,7 @@ const getComponentCss$A = (icon, iconSource, active, stretch, size, hideLabel, a
|
|
|
6790
4919
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, hasSlottedAnchor, theme), Object.assign(Object.assign({}, (hasSlottedAnchor && {
|
|
6791
4920
|
'@global': addImportantToEachRule({
|
|
6792
4921
|
'::slotted': {
|
|
6793
|
-
'&(a)': {
|
|
6794
|
-
outline: 0,
|
|
6795
|
-
textDecoration: underline ? 'underline' : 'none',
|
|
6796
|
-
font: 'inherit',
|
|
6797
|
-
color: 'inherit',
|
|
6798
|
-
},
|
|
4922
|
+
'&(a)': Object.assign(Object.assign({}, getResetInitialStylesForSlottedAnchor), { outline: 0, textDecoration: underline ? 'underline' : 'none', font: 'inherit', color: 'inherit' }),
|
|
6799
4923
|
// The clickable area for Safari < ~15 (<= release date: 2021-10-28) is reduced to the slotted anchor itself,
|
|
6800
4924
|
// since Safari prior to this major release does not support pseudo-elements in the slotted context
|
|
6801
4925
|
// (https://bugs.webkit.org/show_bug.cgi?id=178237)
|
|
@@ -6821,12 +4945,7 @@ const getComponentCss$z = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
6821
4945
|
return getCss(mergeDeep(getLinkButtonStyles(icon, iconSource, variant, hideLabel, false, hasSlottedAnchor, theme), Object.assign({}, (hasSlottedAnchor && {
|
|
6822
4946
|
'@global': addImportantToEachRule({
|
|
6823
4947
|
'::slotted': {
|
|
6824
|
-
'&(a)': {
|
|
6825
|
-
outline: 0,
|
|
6826
|
-
textDecoration: 'none',
|
|
6827
|
-
font: 'inherit',
|
|
6828
|
-
color: 'inherit',
|
|
6829
|
-
},
|
|
4948
|
+
'&(a)': Object.assign(Object.assign({}, getResetInitialStylesForSlottedAnchor), { outline: 0, textDecoration: 'none', font: 'inherit', color: 'inherit' }),
|
|
6830
4949
|
// The clickable area for Safari < ~15 (<= release date: 2021-10-28) is reduced to the slotted anchor itself,
|
|
6831
4950
|
// since Safari prior to this major release does not support pseudo-elements in the slotted context
|
|
6832
4951
|
// (https://bugs.webkit.org/show_bug.cgi?id=178237)
|
|
@@ -6847,9 +4966,7 @@ const getComponentCss$z = (icon, iconSource, variant, hideLabel, hasSlottedAncho
|
|
|
6847
4966
|
};
|
|
6848
4967
|
|
|
6849
4968
|
const fontWeightMap = {
|
|
6850
|
-
thin: fontWeightRegular,
|
|
6851
4969
|
regular: fontWeightRegular,
|
|
6852
|
-
semibold: fontWeightSemiBold$1,
|
|
6853
4970
|
'semi-bold': fontWeightSemiBold$1,
|
|
6854
4971
|
bold: fontWeightBold,
|
|
6855
4972
|
};
|
|
@@ -6865,44 +4982,26 @@ const aspectRatioPaddingTop = {
|
|
|
6865
4982
|
'9:16': '177.75%',
|
|
6866
4983
|
};
|
|
6867
4984
|
const getGradientBackground = (isCompact, isTopAligned) => {
|
|
6868
|
-
|
|
6869
|
-
'rgba(31,31,31,0.9) 20%,' +
|
|
6870
|
-
'rgba(31,31,31,0.852589) 26.67%,' +
|
|
6871
|
-
'rgba(32,32,32,0.768225) 33.33%,' +
|
|
6872
|
-
'rgba(33,33,33,0.668116) 40%,' +
|
|
6873
|
-
'rgba(34,34,34,0.557309) 46.67%,' +
|
|
6874
|
-
'rgba(35,35,35,0.442691) 53.33%,' +
|
|
6875
|
-
'rgba(36,36,36,0.331884) 60%,' +
|
|
6876
|
-
'rgba(37,37,37,0.231775) 66.67%,' +
|
|
6877
|
-
'rgba(38,38,38,0.147411) 73.33%,' +
|
|
6878
|
-
'rgba(39,39,39,0.0816599) 80%,' +
|
|
6879
|
-
'rgba(39,39,39,0.03551) 86.67%,' +
|
|
6880
|
-
'rgba(39,39,39,0.0086472) 93.33%,' +
|
|
6881
|
-
'rgba(39,39,39,0)';
|
|
6882
|
-
return isCompact && isTopAligned
|
|
6883
|
-
? `linear-gradient(${gradient} 100%);`
|
|
6884
|
-
: `linear-gradient(to top, ${gradient} 100%);`;
|
|
4985
|
+
return isCompact && isTopAligned ? gradientToBottomStyle : gradientToTopStyle;
|
|
6885
4986
|
};
|
|
6886
4987
|
const sizeMap$2 = {
|
|
6887
|
-
inherit: {
|
|
6888
|
-
|
|
6889
|
-
},
|
|
6890
|
-
default: { fontSize: '1.25rem' },
|
|
4988
|
+
inherit: { fontSize: 'inherit' },
|
|
4989
|
+
default: { fontSize: fontSizeTextMedium },
|
|
6891
4990
|
};
|
|
6892
4991
|
const getComponentCss$y = (aspectRatio, size, weight, align, compact, hasGradient) => {
|
|
6893
4992
|
const isTopAligned = align === 'top';
|
|
6894
|
-
const paddingSizeXS = pxToRemWithUnit(24);
|
|
6895
|
-
const gradientPadding = pxToRemWithUnit(72);
|
|
6896
4993
|
return getCss({
|
|
6897
|
-
'@global': Object.assign(Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(
|
|
4994
|
+
'@global': Object.assign(Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(hostHiddenStyles)) }, addImportantToEachRule({
|
|
6898
4995
|
'::slotted(picture),::slotted(img)': Object.assign({ transition: getTransition('transform') }, getBackfaceVisibilityJssStyle()),
|
|
6899
|
-
'::slotted(picture)': Object.assign({ position: 'absolute' }, getInsetJssStyle()),
|
|
4996
|
+
'::slotted(picture)': Object.assign({ position: 'absolute' }, getInsetJssStyle(0)),
|
|
6900
4997
|
'::slotted(img)': {
|
|
6901
4998
|
height: '100%',
|
|
6902
4999
|
width: '100%',
|
|
6903
5000
|
objectFit: 'cover',
|
|
6904
5001
|
},
|
|
6905
|
-
})), { p: Object.assign(Object.assign(
|
|
5002
|
+
})), { p: Object.assign(Object.assign({ color: getThemedTypographyColor('dark', 'primary'), maxWidth: pxToRemWithUnit(550), margin: 0 }, textLargeStyle), mergeDeep(buildResponsiveStyles(size, (s) => sizeMap$2[s]), buildResponsiveStyles(weight, (w) => ({
|
|
5003
|
+
fontWeight: getFontWeight(w === 'semibold' ? 'semi-bold' : w),
|
|
5004
|
+
})))) }),
|
|
6906
5005
|
root: Object.assign(Object.assign({ height: 0, position: 'relative', transform: 'translate3d(0,0,0)' }, hoverMediaQuery({
|
|
6907
5006
|
'&:hover': {
|
|
6908
5007
|
'& ::slotted(picture),::slotted(img)': addImportantToEachRule({
|
|
@@ -6912,24 +5011,20 @@ const getComponentCss$y = (aspectRatio, size, weight, align, compact, hasGradien
|
|
|
6912
5011
|
})), buildResponsiveStyles(aspectRatio, (ratio) => ({
|
|
6913
5012
|
paddingTop: aspectRatioPaddingTop[ratio],
|
|
6914
5013
|
}))),
|
|
6915
|
-
'image-container': Object.assign(
|
|
6916
|
-
content: Object.assign(Object.assign(Object.assign({ position: 'absolute' }, (isTopAligned ? { top: 0 } : { bottom: 0 })), { left: 0, right: 0, display: 'grid', justifyItems: 'start', padding: align === 'bottom'
|
|
6917
|
-
? `${
|
|
6918
|
-
: `${
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
})), buildResponsiveStyles(compact, (isCompact) => isCompact
|
|
6924
|
-
? Object.assign({ alignItems: 'center', gridTemplateColumns: `auto ${pxToRemWithUnit(24)}`, gridTemplateRows: 'auto' }, (isTopAligned ? { top: 0 } : { bottom: 0 })) : { gridTemplateRows: 'auto auto', gridTemplateColumns: 'auto' }))),
|
|
5014
|
+
'image-container': Object.assign({ position: 'absolute', overflow: 'hidden', borderRadius: borderRadiusMedium }, getInsetJssStyle(0)),
|
|
5015
|
+
content: Object.assign(Object.assign(Object.assign(Object.assign({ position: 'absolute' }, (isTopAligned ? { top: 0 } : { bottom: 0 })), { left: 0, right: 0, display: 'grid', justifyItems: 'start', borderRadius: borderRadiusMedium, padding: align === 'bottom'
|
|
5016
|
+
? `${spacingFluidLarge} ${spacingFluidMedium} ${spacingFluidMedium}`
|
|
5017
|
+
: `${spacingFluidMedium} ${spacingFluidMedium} ${spacingFluidLarge}`, gap: spacingStaticMedium }), mergeDeep(hasGradient &&
|
|
5018
|
+
buildResponsiveStyles(compact, (isCompact) => getGradientBackground(isCompact, isTopAligned)), buildResponsiveStyles(compact, (isCompact) => isCompact
|
|
5019
|
+
? Object.assign({ alignItems: 'center', gridTemplateColumns: 'auto 24px', gridTemplateRows: 'auto' }, (isTopAligned ? { top: 0 } : { bottom: 0 })) : { gridTemplateRows: 'auto auto', gridTemplateColumns: 'auto' }))), { '@media (forced-colors: active)': {
|
|
5020
|
+
background: 'rgba(0,0,0,0.7)',
|
|
5021
|
+
} }),
|
|
6925
5022
|
'link-pure': buildResponsiveStyles(compact, (isCompact) => ({
|
|
6926
5023
|
display: isCompact ? 'inline-block' : 'none',
|
|
6927
5024
|
})),
|
|
6928
|
-
link: Object.assign({ minHeight: '
|
|
6929
|
-
//
|
|
6930
|
-
|
|
6931
|
-
'&::after': Object.assign({ content: '""', position: 'fixed' }, getInsetJssStyle()),
|
|
6932
|
-
},
|
|
5025
|
+
link: Object.assign({ minHeight: '54px' }, buildResponsiveStyles(compact, (isCompact) => ({ display: isCompact ? 'none' : 'inline-block' }))),
|
|
5026
|
+
// is used for expanded click-area only
|
|
5027
|
+
'link-overlay': Object.assign(Object.assign({ position: 'fixed' }, getInsetJssStyle(0)), { outline: 0 }),
|
|
6933
5028
|
});
|
|
6934
5029
|
};
|
|
6935
5030
|
|
|
@@ -6981,7 +5076,7 @@ const getFullscreenJssStyles = (fullscreen) => {
|
|
|
6981
5076
|
minWidth: pxToRemWithUnit(275.2),
|
|
6982
5077
|
maxWidth: pxToRemWithUnit(1536),
|
|
6983
5078
|
minHeight: 'auto',
|
|
6984
|
-
margin: `
|
|
5079
|
+
margin: `clamp(16px, 7vh, 192px) ${gridSafeZoneBase}`,
|
|
6985
5080
|
borderRadius: borderRadiusMedium,
|
|
6986
5081
|
};
|
|
6987
5082
|
};
|
|
@@ -6997,7 +5092,7 @@ const isFullscreenForXl = (fullscreen) => {
|
|
|
6997
5092
|
return BREAKPOINTS.indexOf(lastTrueBreakpoint) > BREAKPOINTS.indexOf(lastFalseBreakpoint);
|
|
6998
5093
|
}
|
|
6999
5094
|
};
|
|
7000
|
-
const getSlottedJssStyle = (marginValue, hasHeader,
|
|
5095
|
+
const getSlottedJssStyle = (marginValue, hasHeader, hasDismissButton) => {
|
|
7001
5096
|
const marginPx = `${-marginValue}px`;
|
|
7002
5097
|
const marginRem = pxToRemWithUnit(-marginValue);
|
|
7003
5098
|
return Object.assign(Object.assign({ [`&(.${stretchToFullModalWidthClassName})`]: {
|
|
@@ -7005,13 +5100,13 @@ const getSlottedJssStyle = (marginValue, hasHeader, disableCloseButton) => {
|
|
|
7005
5100
|
margin: `0 ${marginPx}`,
|
|
7006
5101
|
} }, (!hasHeader && {
|
|
7007
5102
|
[`&(.${stretchToFullModalWidthClassName}:first-child)`]: {
|
|
7008
|
-
marginTop:
|
|
5103
|
+
marginTop: hasDismissButton ? marginRem : marginPx,
|
|
7009
5104
|
},
|
|
7010
5105
|
})), { [`&(.${stretchToFullModalWidthClassName}:last-child)`]: {
|
|
7011
5106
|
marginBottom: marginPx,
|
|
7012
5107
|
} });
|
|
7013
5108
|
};
|
|
7014
|
-
const getComponentCss$w = (open, fullscreen,
|
|
5109
|
+
const getComponentCss$w = (open, fullscreen, hasDismissButton, hasHeader) => {
|
|
7015
5110
|
const isFullscreenForXlAndXxl = isFullscreenForXl(fullscreen);
|
|
7016
5111
|
return getCss(Object.assign(Object.assign({ '@global': {
|
|
7017
5112
|
':host': Object.assign(Object.assign({}, addImportantToEachRule(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ position: 'fixed' }, getInsetJssStyle()), { zIndex: MODAL_Z_INDEX, display: 'flex', alignItems: 'center', justifyContent: 'center', flexWrap: 'wrap' }), (open
|
|
@@ -7024,8 +5119,8 @@ const getComponentCss$w = (open, fullscreen, disableCloseButton, hasHeader) => {
|
|
|
7024
5119
|
visibility: 'hidden',
|
|
7025
5120
|
})), hostHiddenStyles), {
|
|
7026
5121
|
// workaround via pseudo element to fix stacking (black) background in safari
|
|
7027
|
-
'&::before': Object.assign(Object.assign(Object.assign({ content: '""', position: 'fixed' }, getInsetJssStyle()), { background: themeDarkBackgroundShading }), frostedGlassStyle) }))), { overflowY: 'auto' }),
|
|
7028
|
-
'::slotted': addImportantToEachRule(Object.assign({}, mergeDeep(getSlottedJssStyle(32, hasHeader,
|
|
5122
|
+
'&::before': Object.assign(Object.assign(Object.assign(Object.assign({ content: '""', position: 'fixed' }, getInsetJssStyle()), { background: themeDarkBackgroundShading }), frostedGlassStyle), { pointerEvents: 'none' }) }))), { overflowY: 'auto' }),
|
|
5123
|
+
'::slotted': addImportantToEachRule(Object.assign({}, mergeDeep(getSlottedJssStyle(32, hasHeader, hasDismissButton), buildResponsiveStyles(fullscreen, (fullscreenValue) => ({
|
|
7029
5124
|
[`&(.${stretchToFullModalWidthClassName}`]: {
|
|
7030
5125
|
'&:first-child)': {
|
|
7031
5126
|
borderRadius: fullscreenValue ? 0 : '8px 8px 0 0',
|
|
@@ -7041,10 +5136,10 @@ const getComponentCss$w = (open, fullscreen, disableCloseButton, hasHeader) => {
|
|
|
7041
5136
|
boxSizing: 'border-box',
|
|
7042
5137
|
transition: `transform .6s ${transitionTimingFunction}`,
|
|
7043
5138
|
transform: open ? 'scale3d(1,1,1)' : 'scale3d(.9,.9,1)',
|
|
7044
|
-
padding:
|
|
7045
|
-
backgroundColor,
|
|
5139
|
+
padding: hasDismissButton ? `${pxToRemWithUnit(32)} 32px 32px 32px` : '32px',
|
|
5140
|
+
background: backgroundColor,
|
|
7046
5141
|
outline: 0,
|
|
7047
|
-
'&:focus::before': Object.assign({ content: '""', position: 'fixed', border: `${borderWidthBase} solid
|
|
5142
|
+
'&:focus::before': Object.assign({ content: '""', position: 'fixed', border: `${borderWidthBase} solid`, pointerEvents: 'none' }, buildResponsiveStyles(fullscreen, (fullscreenValue) => (Object.assign({ borderRadius: fullscreenValue ? 0 : '12px', borderColor: fullscreenValue ? lightThemePrimaryColor : darkThemePrimaryColor }, getInsetJssStyle(fullscreenValue ? 0 : -4))))),
|
|
7048
5143
|
'&:not(:focus-visible)::before': {
|
|
7049
5144
|
border: 0,
|
|
7050
5145
|
},
|
|
@@ -7055,30 +5150,16 @@ const getComponentCss$w = (open, fullscreen, disableCloseButton, hasHeader) => {
|
|
|
7055
5150
|
header: {
|
|
7056
5151
|
padding: '0 0 8px',
|
|
7057
5152
|
},
|
|
7058
|
-
})),
|
|
7059
|
-
|
|
7060
|
-
top: '8px',
|
|
7061
|
-
right: '8px',
|
|
7062
|
-
border: `2px solid ${backgroundColor}`,
|
|
7063
|
-
borderRadius: '4px',
|
|
7064
|
-
backgroundColor,
|
|
5153
|
+
})), (hasDismissButton && {
|
|
5154
|
+
dismiss: Object.assign({ position: 'absolute', top: '8px', right: '8px', border: `2px solid ${backgroundColor}`, borderRadius: '4px', background: backgroundColor }, hoverMediaQuery({
|
|
7065
5155
|
'&:hover': {
|
|
7066
|
-
|
|
5156
|
+
background: 'transparent',
|
|
7067
5157
|
borderColor: 'transparent',
|
|
7068
5158
|
},
|
|
7069
|
-
}
|
|
5159
|
+
})),
|
|
5160
|
+
})));
|
|
7070
5161
|
};
|
|
7071
5162
|
|
|
7072
|
-
const toFilter = (values) => `invert(${values[0]}%) sepia(${values[1]}%) saturate(${values[2]}%) hue-rotate(${values[3]}deg) brightness(${values[4]}%) contrast(${values[5]}%)`;
|
|
7073
|
-
// copied from icon-styles
|
|
7074
|
-
const filterLightPrimary = toFilter([3, 7, 2930, 188, 91, 103]);
|
|
7075
|
-
const filterLightContrastLow = toFilter([93, 11, 36, 201, 89, 102]);
|
|
7076
|
-
const filterLightContrastMedium = toFilter([65, 6, 119, 187, 90, 92]);
|
|
7077
|
-
const filterLightContrastHigh = toFilter([40, 2, 686, 187, 80, 94]);
|
|
7078
|
-
const filterDarkPrimary = toFilter([97, 55, 2840, 180, 114, 103]);
|
|
7079
|
-
const filterDarkContrastLow = toFilter([20, 7, 421, 202, 97, 82]);
|
|
7080
|
-
const filterDarkContrastMedium = toFilter([54, 4, 229, 187, 91, 84]);
|
|
7081
|
-
const filterDarkContrastHigh = toFilter([68, 6, 108, 187, 104, 88]);
|
|
7082
5163
|
const colorToFilterMap = {
|
|
7083
5164
|
light: {
|
|
7084
5165
|
primary: filterLightPrimary,
|
|
@@ -7297,12 +5378,12 @@ const getComponentCss$s = (hideLabel, state, isDisabled, theme) => {
|
|
|
7297
5378
|
|
|
7298
5379
|
const gradientColorMap = {
|
|
7299
5380
|
light: {
|
|
7300
|
-
|
|
7301
|
-
surface: '238,239,242',
|
|
5381
|
+
'background-base': '255,255,255',
|
|
5382
|
+
'background-surface': '238,239,242',
|
|
7302
5383
|
},
|
|
7303
5384
|
dark: {
|
|
7304
|
-
|
|
7305
|
-
surface: '33,34,37',
|
|
5385
|
+
'background-base': '14,14,18',
|
|
5386
|
+
'background-surface': '33,34,37',
|
|
7306
5387
|
},
|
|
7307
5388
|
};
|
|
7308
5389
|
const getGradient = (theme, gradientColorTheme) => {
|
|
@@ -7312,17 +5393,17 @@ const getGradient = (theme, gradientColorTheme) => {
|
|
|
7312
5393
|
`rgba(${gradientColor},0.3) 68%,` +
|
|
7313
5394
|
`rgba(${gradientColor},0)`);
|
|
7314
5395
|
};
|
|
7315
|
-
const getComponentCss$r = (
|
|
5396
|
+
const getComponentCss$r = (gradientColor, isNextHidden, isPrevHidden, scrollIndicatorPosition, theme) => {
|
|
7316
5397
|
const { backgroundColor, backgroundSurfaceColor, focusColor, hoverColor } = getThemedColors(theme);
|
|
7317
5398
|
const isDarkTheme = isThemeDark(theme);
|
|
7318
5399
|
const backgroundColorMap = {
|
|
7319
5400
|
dark: {
|
|
7320
|
-
|
|
7321
|
-
surface: backgroundColor,
|
|
5401
|
+
'background-base': backgroundSurfaceColor,
|
|
5402
|
+
'background-surface': backgroundColor,
|
|
7322
5403
|
},
|
|
7323
5404
|
light: {
|
|
7324
|
-
|
|
7325
|
-
surface: backgroundSurfaceColor,
|
|
5405
|
+
'background-base': backgroundColor,
|
|
5406
|
+
'background-surface': backgroundSurfaceColor,
|
|
7326
5407
|
},
|
|
7327
5408
|
};
|
|
7328
5409
|
const actionPrevNextStyles = {
|
|
@@ -7335,7 +5416,7 @@ const getComponentCss$r = (gradientColorTheme, isNextHidden, isPrevHidden, scrol
|
|
|
7335
5416
|
return getCss({
|
|
7336
5417
|
'@global': {
|
|
7337
5418
|
':host': addImportantToEachRule(Object.assign({ display: 'block', height: 'inherit' }, hostHiddenStyles)),
|
|
7338
|
-
button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', pointerEvents: 'auto', alignItems: 'center', justifyContent: 'center' }, textSmallStyle), { height: `calc(${fontLineHeight} + 4px)`, width: `calc(${fontLineHeight} + 4px)`, border: 0, outline: 0, cursor: 'pointer', background: backgroundColorMap[theme][
|
|
5419
|
+
button: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ display: 'flex', pointerEvents: 'auto', alignItems: 'center', justifyContent: 'center' }, textSmallStyle), { height: `calc(${fontLineHeight} + 4px)`, width: `calc(${fontLineHeight} + 4px)`, border: 0, outline: 0, cursor: 'pointer', background: backgroundColorMap[theme][gradientColor], borderRadius: borderRadiusSmall }), frostedGlassStyle), { visibility: 'hidden' }), (!isDarkTheme && dropShadowLowStyle)), hoverMediaQuery({
|
|
7339
5420
|
transition: getTransition('background-color'),
|
|
7340
5421
|
'&:hover': Object.assign(Object.assign({}, frostedGlassStyle), { background: hoverColor }),
|
|
7341
5422
|
})),
|
|
@@ -7386,10 +5467,10 @@ const getComponentCss$r = (gradientColorTheme, isNextHidden, isPrevHidden, scrol
|
|
|
7386
5467
|
right: 0,
|
|
7387
5468
|
},
|
|
7388
5469
|
},
|
|
7389
|
-
'action-prev': Object.assign(Object.assign({}, actionPrevNextStyles), { marginLeft: '-1px', gridArea: '1 / 1 / 1 / 1', justifyContent: 'flex-start', background: `linear-gradient(to right, ${getGradient(theme,
|
|
5470
|
+
'action-prev': Object.assign(Object.assign({}, actionPrevNextStyles), { marginLeft: '-1px', gridArea: '1 / 1 / 1 / 1', justifyContent: 'flex-start', background: `linear-gradient(to right, ${getGradient(theme, gradientColor)} 100%)`, visibility: isPrevHidden ? 'hidden' : 'visible', '& button': Object.assign({ marginLeft: '8px' }, hoverMediaQuery({
|
|
7390
5471
|
visibility: isPrevHidden ? 'hidden' : 'visible',
|
|
7391
5472
|
})) }),
|
|
7392
|
-
'action-next': Object.assign(Object.assign({}, actionPrevNextStyles), { marginRight: '-1px', gridArea: '1 / 3 / 1 / 3', justifyContent: 'flex-end', background: `linear-gradient(to left, ${getGradient(theme,
|
|
5473
|
+
'action-next': Object.assign(Object.assign({}, actionPrevNextStyles), { marginRight: '-1px', gridArea: '1 / 3 / 1 / 3', justifyContent: 'flex-end', background: `linear-gradient(to left, ${getGradient(theme, gradientColor)} 100%)`, visibility: isNextHidden ? 'hidden' : 'visible', '& button': Object.assign({ marginRight: '8px' }, hoverMediaQuery({
|
|
7393
5474
|
visibility: isNextHidden ? 'hidden' : 'visible',
|
|
7394
5475
|
})) }),
|
|
7395
5476
|
});
|
|
@@ -7452,7 +5533,9 @@ const getComponentCss$p = (maxWidth) => {
|
|
|
7452
5533
|
const getBaseChildStyles = (child, state, theme, additionalDefaultJssStyle) => {
|
|
7453
5534
|
const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
|
|
7454
5535
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
7455
|
-
return Object.assign(Object.assign(Object.assign({ [`::slotted(${child})`]: Object.assign({ display: 'block', width: '100%', height:
|
|
5536
|
+
return Object.assign(Object.assign(Object.assign({ [`::slotted(${child})`]: Object.assign({ display: 'block', width: '100%', height: child !== 'textarea'
|
|
5537
|
+
? `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)` // we need 10px additionally so input height becomes 54px
|
|
5538
|
+
: 'auto', margin: 0, outline: 0, WebkitAppearance: 'none', appearance: 'none', boxSizing: 'border-box', border: `${borderWidthBase} solid ${formStateColor || contrastMediumColor}`, borderRadius: borderRadiusSmall, background: 'transparent', font: textSmallStyle.font.replace('ex', 'ex + 6px'), textIndent: 0, color: primaryColor, transition: ['color', 'border-color', 'background-color'].map(getTransition).join() }, additionalDefaultJssStyle) }, hoverMediaQuery({
|
|
7456
5539
|
// with the media query the selector has higher priority and overrides disabled styles
|
|
7457
5540
|
[`::slotted(${child}:not(:disabled):not(:focus):not([readonly]):hover)`]: {
|
|
7458
5541
|
borderColor: formStateHoverColor || primaryColor,
|
|
@@ -7594,6 +5677,7 @@ const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
|
7594
5677
|
const svgCirclePath = `<circle fill="${isStateCurrent ? primaryColor : 'none'}"${isStateCurrent ? '' : ` stroke="${fillColor}"`} stroke-width="1px" cx="12" cy="12" r="9"/>`;
|
|
7595
5678
|
// Full SVG is provided by design (./numbers_raw.svg), created with illustrator and optimized with ImageOptim.
|
|
7596
5679
|
// The optimized file can be found in ./numbers_optim.svg.
|
|
5680
|
+
// TODO: could certainly be optimized size wise by exporting icons larger and having less decimals
|
|
7597
5681
|
const svgNumberedCirclePaths = [
|
|
7598
5682
|
`${svgCirclePath}<path fill="${fillColor}" d="m12.33 8.67-2.43.91v-.94l2.6-1.03h.85v8.78h-1.02z"/>`,
|
|
7599
5683
|
`${svgCirclePath}<path fill="${fillColor}" d="m9.46 15.58c0-1.35.73-2.07 1.7-2.72l.95-.63c.78-.52 1.57-1.05 1.57-2.24 0-1.12-.62-1.58-1.7-1.58s-1.68.48-1.78 1.97h-.96c.06-1.82.78-2.91 2.74-2.91s2.72.92 2.72 2.52-.92 2.23-1.79 2.8l-.95.63c-1.11.75-1.52 1.18-1.52 2.01v.16h4.17v.81h-5.15v-.81z"/>`,
|
|
@@ -7677,7 +5761,7 @@ const getComponentCss$j = (alignLabel, hideLabel, stretch, checked, disabled, lo
|
|
|
7677
5761
|
const { buttonBorderColor, buttonBorderColorHover, buttonBackgroundColor, buttonBackgroundColorHover, toggleBackgroundColor, toggleBackgroundColorHover, textColor, } = getColors$1(checked, disabled, loading, theme);
|
|
7678
5762
|
const { focusColor } = getThemedColors(theme);
|
|
7679
5763
|
return getCss(Object.assign(Object.assign({ '@global': {
|
|
7680
|
-
':host': addImportantToEachRule(Object.assign(Object.assign({ outline: 0 }, hostHiddenStyles), buildResponsiveStyles(stretch, (stretchValue) => (Object.assign({ display: stretchValue ? 'block' : 'inline-block' }, (!stretchValue && { verticalAlign: 'top' })))))),
|
|
5764
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ outline: 0 }, hostHiddenStyles), buildResponsiveStyles(stretch, (stretchValue) => (Object.assign({ display: stretchValue ? 'block' : 'inline-block', width: stretchValue ? '100%' : 'auto' }, (!stretchValue && { verticalAlign: 'top' })))))),
|
|
7681
5765
|
}, root: Object.assign(Object.assign(Object.assign({ display: 'flex', alignItems: 'flex-start', gap: spacingStaticSmall, width: '100%', padding: 0, outline: 0, border: 0, textAlign: 'left', background: 'transparent', appearance: 'none', cursor: isDisabledOrLoading(disabled, loading) ? 'auto' : 'pointer' }, buildResponsiveStyles(stretch, (stretchValue) => ({
|
|
7682
5766
|
justifyContent: stretchValue ? 'space-between' : 'flex-start',
|
|
7683
5767
|
}))), (!isDisabledOrLoading(disabled, loading) &&
|
|
@@ -7862,35 +5946,9 @@ const getComponentCss$b = (size, weight, theme) => {
|
|
|
7862
5946
|
transform: 'translate3d(0,0,0)' }, hostHiddenStyles))) }, addImportantToEachRule(Object.assign(Object.assign({
|
|
7863
5947
|
// would be nice to use shared selector like '::slotted([role])'
|
|
7864
5948
|
// but this doesn't work reliably when rendering in browser
|
|
7865
|
-
[transformSelector('::slotted([role])')]: {
|
|
7866
|
-
display: 'inline-block',
|
|
7867
|
-
position: 'relative',
|
|
7868
|
-
margin: '0 0 4px 0',
|
|
7869
|
-
padding: 0,
|
|
7870
|
-
verticalAlign: 'top',
|
|
7871
|
-
fontFamily: 'inherit',
|
|
7872
|
-
fontStyle: 'inherit',
|
|
7873
|
-
fontVariant: 'inherit',
|
|
7874
|
-
fontWeight: 'inherit',
|
|
7875
|
-
fontSize: 'inherit',
|
|
7876
|
-
lineHeight: 'inherit',
|
|
7877
|
-
whiteSpace: 'nowrap',
|
|
7878
|
-
boxSizing: 'border-box',
|
|
7879
|
-
WebkitAppearance: 'none',
|
|
7880
|
-
appearance: 'none',
|
|
7881
|
-
outline: 0,
|
|
7882
|
-
outlineOffset: '1px',
|
|
7883
|
-
textDecoration: 'none',
|
|
7884
|
-
textAlign: 'left',
|
|
7885
|
-
border: 0,
|
|
7886
|
-
background: 'transparent',
|
|
7887
|
-
color: primaryColor,
|
|
7888
|
-
cursor: 'pointer',
|
|
7889
|
-
borderRadius: borderRadiusSmall,
|
|
7890
|
-
'&::before': Object.assign({ content: '""', position: 'absolute', top: '-2px', bottom: '-2px', left: '-4px', right: '-4px', borderRadius: borderRadiusSmall, zIndex: '-1' }, hoverMediaQuery({
|
|
5949
|
+
[transformSelector('::slotted([role])')]: Object.assign(Object.assign({}, getResetInitialStylesForSlottedAnchor), { display: 'inline-block', position: 'relative', margin: '0 0 4px 0', padding: 0, verticalAlign: 'top', fontFamily: 'inherit', fontStyle: 'inherit', fontVariant: 'inherit', fontWeight: 'inherit', fontSize: 'inherit', lineHeight: 'inherit', whiteSpace: 'nowrap', boxSizing: 'border-box', WebkitAppearance: 'none', appearance: 'none', outline: 0, outlineOffset: '1px', textDecoration: 'none', textAlign: 'left', border: 0, background: 'transparent', color: primaryColor, cursor: 'pointer', borderRadius: borderRadiusSmall, '&::before': Object.assign({ content: '""', position: 'absolute', top: '-2px', bottom: '-2px', left: '-4px', right: '-4px', borderRadius: borderRadiusSmall, zIndex: '-1' }, hoverMediaQuery({
|
|
7891
5950
|
transition: getTransition('background'),
|
|
7892
|
-
})),
|
|
7893
|
-
} }, hoverMediaQuery({
|
|
5951
|
+
})) }) }, hoverMediaQuery({
|
|
7894
5952
|
[transformSelector('::slotted([role]:hover)::before')]: Object.assign(Object.assign({}, frostedGlassStyle), { background: hoverColor }),
|
|
7895
5953
|
})), {
|
|
7896
5954
|
// TODO: combine link-social-styles with link-button-styles and tabs-bar-styles
|
|
@@ -7907,7 +5965,7 @@ const getComponentCss$b = (size, weight, theme) => {
|
|
|
7907
5965
|
display: 'block',
|
|
7908
5966
|
position: 'absolute',
|
|
7909
5967
|
width: 0,
|
|
7910
|
-
height: weight === '
|
|
5968
|
+
height: weight === 'semi-bold' ? '2px' : '1.5px',
|
|
7911
5969
|
left: 0,
|
|
7912
5970
|
bottom: '-4px',
|
|
7913
5971
|
background: primaryColor,
|
|
@@ -7920,10 +5978,10 @@ const getComponentCss$b = (size, weight, theme) => {
|
|
|
7920
5978
|
};
|
|
7921
5979
|
|
|
7922
5980
|
const getComponentCss$a = (theme) => {
|
|
7923
|
-
const { focusColor } = getThemedColors(theme);
|
|
5981
|
+
const { primaryColor, focusColor } = getThemedColors(theme);
|
|
7924
5982
|
return getCss({
|
|
7925
5983
|
'@global': {
|
|
7926
|
-
':host': addImportantToEachRule(Object.assign(Object.assign({ display: 'block', position: 'relative' }, hostHiddenStyles), { outline: 0, '&::before': Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), '&(:focus)::before': {
|
|
5984
|
+
':host': addImportantToEachRule(Object.assign(Object.assign({ display: 'block', position: 'relative', color: primaryColor }, hostHiddenStyles), { outline: 0, '&::before': Object.assign({ content: '""', position: 'absolute' }, getInsetJssStyle(-4)), '&(:focus)::before': {
|
|
7927
5985
|
border: `${borderWidthBase} solid ${focusColor}`,
|
|
7928
5986
|
borderRadius: borderRadiusSmall,
|
|
7929
5987
|
}, '&(:focus:not(:focus-visible))::before': {
|
|
@@ -7954,16 +6012,13 @@ const getTagFocusJssStyle = (themedColors) => {
|
|
|
7954
6012
|
};
|
|
7955
6013
|
const getThemedBackgroundColor = (tagColor, themedColors) => {
|
|
7956
6014
|
const colorMap = {
|
|
7957
|
-
'background-default': themedColors.backgroundColor,
|
|
7958
6015
|
'background-base': themedColors.backgroundColor,
|
|
7959
6016
|
'background-surface': themedColors.backgroundSurfaceColor,
|
|
7960
|
-
'neutral-contrast-high': themedColors.primaryColor,
|
|
7961
6017
|
primary: themedColors.primaryColor,
|
|
7962
|
-
'notification-
|
|
7963
|
-
'notification-
|
|
7964
|
-
'notification-success': themedColors.successSoftColor,
|
|
7965
|
-
'notification-error': themedColors.errorSoftColor,
|
|
7966
|
-
'notification-warning': themedColors.warningSoftColor,
|
|
6018
|
+
'notification-info-soft': themedColors.infoSoftColor,
|
|
6019
|
+
'notification-warning-soft': themedColors.warningSoftColor,
|
|
6020
|
+
'notification-success-soft': themedColors.successSoftColor,
|
|
6021
|
+
'notification-error-soft': themedColors.errorSoftColor,
|
|
7967
6022
|
};
|
|
7968
6023
|
return colorMap[tagColor];
|
|
7969
6024
|
};
|
|
@@ -7994,45 +6049,26 @@ const getComponentCss$8 = (color, hasLabel, theme) => {
|
|
|
7994
6049
|
}, 'sr-only': getScreenReaderOnlyJssStyle() }));
|
|
7995
6050
|
};
|
|
7996
6051
|
|
|
7997
|
-
const hasInvertedThemeColor = (tagColor, theme) => {
|
|
7998
|
-
const isDark = isThemeDark(theme);
|
|
7999
|
-
return ((!isDark && (tagColor === 'neutral-contrast-high' || tagColor === 'primary')) || // 'neutral-contrast-high' is deprecated (replaced with 'primary')
|
|
8000
|
-
(isDark &&
|
|
8001
|
-
tagColor !== 'background-surface' &&
|
|
8002
|
-
tagColor !== 'background-default' && // 'background-default' is deprecated (replaced with 'background-base')
|
|
8003
|
-
tagColor !== 'background-base' &&
|
|
8004
|
-
tagColor !== 'notification-neutral' && // 'notification-neutral' is deprecated (replaced with 'notification-info')
|
|
8005
|
-
tagColor !== 'notification-info' &&
|
|
8006
|
-
tagColor !== 'notification-warning' &&
|
|
8007
|
-
tagColor !== 'notification-success' &&
|
|
8008
|
-
tagColor !== 'notification-error'));
|
|
8009
|
-
};
|
|
8010
6052
|
const getThemedBackgroundHoverColor = (tagColor, themedColors, theme) => {
|
|
8011
6053
|
const isDark = isThemeDark(theme);
|
|
8012
|
-
const keySuffix = isDark ? '
|
|
8013
|
-
const primaryColor = isDark ? themedColors.contrastHighColorLighten : themedColors.contrastHighColor;
|
|
6054
|
+
const keySuffix = isDark ? 'Lighten' : 'Darken';
|
|
8014
6055
|
const colorMap = {
|
|
8015
|
-
'background-
|
|
8016
|
-
'background-
|
|
8017
|
-
|
|
8018
|
-
'
|
|
8019
|
-
|
|
8020
|
-
'notification-
|
|
8021
|
-
'notification-
|
|
8022
|
-
'notification-success': themedColors[`successSoft${keySuffix}`],
|
|
8023
|
-
'notification-error': themedColors[`errorSoft${keySuffix}`],
|
|
8024
|
-
'notification-warning': themedColors[`warningSoft${keySuffix}`],
|
|
6056
|
+
'background-base': themedColors[`backgroundColor${keySuffix}`],
|
|
6057
|
+
'background-surface': themedColors[`backgroundSurfaceColor${keySuffix}`],
|
|
6058
|
+
primary: isDark ? themedColors.contrastHighColorLighten : themedColors.contrastHighColor,
|
|
6059
|
+
'notification-info-soft': themedColors[`infoSoftColor${keySuffix}`],
|
|
6060
|
+
'notification-success-soft': themedColors[`successSoftColor${keySuffix}`],
|
|
6061
|
+
'notification-error-soft': themedColors[`errorSoftColor${keySuffix}`],
|
|
6062
|
+
'notification-warning-soft': themedColors[`warningSoftColor${keySuffix}`],
|
|
8025
6063
|
};
|
|
8026
6064
|
return colorMap[tagColor];
|
|
8027
6065
|
};
|
|
8028
6066
|
|
|
8029
6067
|
const getColors = (themedColors, tagColor, theme) => {
|
|
8030
|
-
const
|
|
8031
|
-
const { primaryColor } = hasInvertedTheme ? getInvertedThemedColors(theme) : themedColors;
|
|
8032
|
-
const { focusColor } = themedColors;
|
|
6068
|
+
const { primaryColor } = tagColor === 'primary' ? getInvertedThemedColors(theme) : themedColors;
|
|
8033
6069
|
return {
|
|
8034
6070
|
primaryColor,
|
|
8035
|
-
focusColor,
|
|
6071
|
+
focusColor: themedColors.focusColor,
|
|
8036
6072
|
backgroundColor: getThemedBackgroundColor(tagColor, themedColors),
|
|
8037
6073
|
backgroundHoverColor: getThemedBackgroundHoverColor(tagColor, themedColors, theme),
|
|
8038
6074
|
};
|
|
@@ -8043,27 +6079,14 @@ const getComponentCss$7 = (tagColor, isFocusable, theme) => {
|
|
|
8043
6079
|
return getCss({
|
|
8044
6080
|
'@global': {
|
|
8045
6081
|
':host': Object.assign({ display: 'inline-flex', verticalAlign: 'top' }, addImportantToEachRule(hostHiddenStyles)),
|
|
8046
|
-
span: Object.assign({ display: 'flex', gap: '2px', alignItems: 'center', position: 'relative', padding: '4px 9px', borderRadius: borderRadiusSmall, background: backgroundColor, color: primaryColor, font: textXSmallStyle.font, whiteSpace: 'nowrap' }, (isFocusable &&
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
position: 'static',
|
|
8055
|
-
textDecoration: 'underline',
|
|
8056
|
-
cursor: 'pointer',
|
|
8057
|
-
font: 'inherit',
|
|
8058
|
-
outline: 0,
|
|
8059
|
-
color: 'inherit',
|
|
8060
|
-
appearance: 'none',
|
|
8061
|
-
margin: 0,
|
|
8062
|
-
padding: 0,
|
|
8063
|
-
background: 0,
|
|
8064
|
-
border: 0,
|
|
8065
|
-
textAlign: 'left',
|
|
8066
|
-
} }, Object.entries(getTagFocusJssStyle(themedColors)).reduce((result, [key, value]) => {
|
|
6082
|
+
span: Object.assign({ display: 'flex', gap: '2px', alignItems: 'center', position: 'relative', padding: '4px 9px', borderRadius: borderRadiusSmall, background: backgroundColor, color: primaryColor, font: textXSmallStyle.font, whiteSpace: 'nowrap' }, (isFocusable &&
|
|
6083
|
+
hoverMediaQuery({
|
|
6084
|
+
transition: getTransition('background-color'),
|
|
6085
|
+
'&:hover': {
|
|
6086
|
+
background: backgroundHoverColor,
|
|
6087
|
+
},
|
|
6088
|
+
}))),
|
|
6089
|
+
'::slotted': addImportantToEachRule(Object.assign(Object.assign({ '&(a),&(button)': Object.assign(Object.assign({}, getResetInitialStylesForSlottedAnchor), { display: 'inline', position: 'static', textDecoration: 'underline', cursor: 'pointer', font: 'inherit', outline: 0, color: 'inherit', appearance: 'none', margin: 0, padding: 0, background: 0, border: 0, textAlign: 'left' }) }, Object.entries(getTagFocusJssStyle(themedColors)).reduce((result, [key, value]) => {
|
|
8067
6090
|
result[key.replace(/^&([a-z:\-()]*)(::[a-z\-]+)$/, '&(a$1)$2, &(button$1)$2')] = value;
|
|
8068
6091
|
return result;
|
|
8069
6092
|
}, {})), { '&(br)': {
|
|
@@ -8077,6 +6100,17 @@ const getComponentCss$7 = (tagColor, isFocusable, theme) => {
|
|
|
8077
6100
|
};
|
|
8078
6101
|
|
|
8079
6102
|
const isType = (inputType, typeToValidate) => inputType === typeToValidate;
|
|
6103
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
6104
|
+
const _hasShowPickerSupport = () => {
|
|
6105
|
+
return (hasDocument &&
|
|
6106
|
+
'showPicker' in HTMLInputElement.prototype &&
|
|
6107
|
+
// TODO: it would be better to determinate support by checking for existence of "calendar-picker-indicator"
|
|
6108
|
+
!!window.navigator.userAgent.match(/chrome|chromium|crios|edg/i));
|
|
6109
|
+
};
|
|
6110
|
+
const hasShowPickerSupport = _hasShowPickerSupport();
|
|
6111
|
+
const showCustomCalendarOrTimeIndicator = (isCalendar, isTime) => {
|
|
6112
|
+
return hasShowPickerSupport && (isCalendar || isTime);
|
|
6113
|
+
};
|
|
8080
6114
|
|
|
8081
6115
|
const cssVariableInputPaddingLeft = '--p-internal-text-field-input-padding-left';
|
|
8082
6116
|
const cssVariableInputPaddingRight = '--p-internal-text-field-input-padding-right';
|
|
@@ -8101,18 +6135,21 @@ const getComponentCss$6 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8101
6135
|
const isSearch = isType(inputType, 'search');
|
|
8102
6136
|
const isPassword = isType(inputType, 'password');
|
|
8103
6137
|
const isNumber = isType(inputType, 'number');
|
|
6138
|
+
const isCalendar = isType(inputType, 'date') || isType(inputType, 'week') || isType(inputType, 'month');
|
|
6139
|
+
const isTime = isType(inputType, 'time');
|
|
8104
6140
|
const isSearchOrPassword = isSearch || isPassword;
|
|
8105
6141
|
const isSearchWithoutForm = isSearch && !isWithinForm;
|
|
8106
6142
|
const isSearchWithForm = isSearch && isWithinForm;
|
|
8107
|
-
|
|
6143
|
+
const isCalendarOrTimeWithCustomIndicator = showCustomCalendarOrTimeIndicator(isCalendar, isTime);
|
|
6144
|
+
return getCss(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ '@global': Object.assign({ ':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ [cssVariableInputPaddingLeft]: isSearchWithoutForm ? getInputPaddingHorizontal(1) : spacingStaticMedium, [cssVariableInputPaddingRight]: isSearchOrPassword || isCalendarOrTimeWithCustomIndicator
|
|
8108
6145
|
? getInputPaddingHorizontal(isSearchWithForm ? 2 : 1)
|
|
8109
|
-
: spacingStaticMedium }, hostHiddenStyles))) }, addImportantToEachRule(Object.assign(Object.assign({}, getBaseChildStyles('input', state, theme, Object.assign({ padding:
|
|
6146
|
+
: spacingStaticMedium }, hostHiddenStyles))) }, addImportantToEachRule(Object.assign(Object.assign({}, getBaseChildStyles('input', state, theme, Object.assign({ padding: `${spacingStaticSmall} var(${cssVariableInputPaddingRight}) ${spacingStaticSmall} var(${cssVariableInputPaddingLeft})` }, (isNumber && {
|
|
8110
6147
|
MozAppearance: 'textfield', // hides up/down spin button for Firefox
|
|
8111
6148
|
})))), { '::slotted': {
|
|
8112
6149
|
'&(input:-internal-autofill-selected),&(input:-internal-autofill-previewed),&(input:-webkit-autofill),&(input:-webkit-autofill:focus)': {
|
|
8113
6150
|
WebkitBackgroundClip: 'padding-box', // reset webkit autofill styles
|
|
8114
6151
|
},
|
|
8115
|
-
} }))) }, (isSearchOrPassword && {
|
|
6152
|
+
} }))) }, ((isSearchOrPassword || isCalendarOrTimeWithCustomIndicator) && {
|
|
8116
6153
|
button: Object.assign(Object.assign({}, baseButtonOrIconStyles), { right: getButtonOrIconOffsetHorizontal(1),
|
|
8117
6154
|
// TODO: maybe we should render hidden button conditionally, needs to be checked if a11y compliant
|
|
8118
6155
|
'&:not([hidden]) ~ .button': {
|
|
@@ -8138,8 +6175,9 @@ const getComponentCss$6 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
8138
6175
|
'sr-only': Object.assign(Object.assign({}, getScreenReaderOnlyJssStyle()), { padding: 0 }) }));
|
|
8139
6176
|
};
|
|
8140
6177
|
|
|
8141
|
-
|
|
8142
|
-
const
|
|
6178
|
+
/** @deprecated */
|
|
6179
|
+
const isListTypeOrdered = (type) => type !== 'unordered';
|
|
6180
|
+
const isListTypeNumbered = (type) => type === 'numbered';
|
|
8143
6181
|
|
|
8144
6182
|
const cssVariablePseudoSuffix = '--p-internal-text-list-pseudo-suffix';
|
|
8145
6183
|
const cssVariablePaddingTop = '--p-internal-text-list-padding-top';
|
|
@@ -8148,8 +6186,8 @@ const cssVariableUnorderedPaddingLeft = '--p-internal-text-list-unordered-paddin
|
|
|
8148
6186
|
const cssVariableOrderedPaddingLeft = '--p-internal-text-list-ordered-padding-left';
|
|
8149
6187
|
const cssVariableListStyleType = '--p-internal-text-list-list-style-type';
|
|
8150
6188
|
const counter = 'p-text-list-counter';
|
|
8151
|
-
const getComponentCss$5 = (
|
|
8152
|
-
const isOrderedList = isListTypeOrdered(
|
|
6189
|
+
const getComponentCss$5 = (type, theme) => {
|
|
6190
|
+
const isOrderedList = isListTypeOrdered(type);
|
|
8153
6191
|
return getCss({
|
|
8154
6192
|
'@global': {
|
|
8155
6193
|
':host': Object.assign({ display: 'block' }, addImportantToEachRule(Object.assign({ counterReset: counter }, hostHiddenStyles))),
|
|
@@ -8162,7 +6200,7 @@ const getComponentCss$5 = (listType, orderType, theme) => {
|
|
|
8162
6200
|
// TODO: in case it's last root list item with a nested list it would result in outer spacing which is not desired
|
|
8163
6201
|
[cssVariablePaddingBottom]: spacingStaticMedium, [cssVariableOrderedPaddingLeft]: '2rem', [cssVariableUnorderedPaddingLeft]: '.625rem', [cssVariableListStyleType]: '"–"' }, (isOrderedList && {
|
|
8164
6202
|
'&::before': {
|
|
8165
|
-
content: `counters(${counter},'.',${
|
|
6203
|
+
content: `counters(${counter},'.',${isListTypeNumbered(type) ? 'decimal' : 'lower-latin'}) var(${cssVariablePseudoSuffix},'.')`,
|
|
8166
6204
|
counterIncrement: counter,
|
|
8167
6205
|
position: 'absolute',
|
|
8168
6206
|
top: 0,
|
|
@@ -8188,6 +6226,7 @@ const getComponentCss$4 = () => {
|
|
|
8188
6226
|
const TEXT_TAGS = ['p', 'span', 'div', 'address', 'blockquote', 'figcaption', 'cite', 'time', 'legend'];
|
|
8189
6227
|
|
|
8190
6228
|
const sizeMap = {
|
|
6229
|
+
'xx-small': fontSizeTextXXSmall,
|
|
8191
6230
|
'x-small': fontSizeTextXSmall,
|
|
8192
6231
|
small: fontSizeTextSmall,
|
|
8193
6232
|
medium: fontSizeTextMedium,
|