@porsche-design-system/components-react 3.21.0 → 3.22.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -2
- package/ag-grid/theme.css +17 -8
- package/cjs/lib/components/flyout-multilevel-item.wrapper.cjs +3 -3
- package/cjs/lib/components/link-tile-model-signature.wrapper.cjs +1 -1
- package/cjs/lib/components/pin-code.wrapper.cjs +3 -3
- package/cjs/lib/components/segmented-control.wrapper.cjs +3 -3
- package/esm/lib/components/flyout-multilevel-item.wrapper.d.ts +24 -0
- package/esm/lib/components/flyout-multilevel-item.wrapper.mjs +3 -3
- package/esm/lib/components/link-tile-model-signature.wrapper.mjs +1 -1
- package/esm/lib/components/pin-code.wrapper.d.ts +8 -0
- package/esm/lib/components/pin-code.wrapper.mjs +3 -3
- package/esm/lib/components/segmented-control.wrapper.d.ts +24 -0
- package/esm/lib/components/segmented-control.wrapper.mjs +3 -3
- package/esm/lib/components/select.wrapper.d.ts +2 -2
- package/esm/lib/types.d.ts +36 -35
- package/package.json +6 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +882 -738
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +458 -419
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flyout-multilevel-item.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile-model-signature.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.cjs +7 -3
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-multilevel-item.cjs +9 -6
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-multilevel.cjs +13 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/loading-message.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.cjs +1 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +1 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +6 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.cjs +15 -6
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +9 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +2 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.cjs +2 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/toast.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +882 -738
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +454 -420
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flyout-multilevel-item.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile-model-signature.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pin-code.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +7 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-multilevel-item.mjs +9 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout-multilevel.mjs +14 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/loading-message.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.mjs +1 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +1 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +6 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +15 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +9 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +3 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +2 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/switch.mjs +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/toast.mjs +1 -1
- package/ssr/esm/lib/components/flyout-multilevel-item.wrapper.d.ts +24 -0
- package/ssr/esm/lib/components/pin-code.wrapper.d.ts +8 -0
- package/ssr/esm/lib/components/segmented-control.wrapper.d.ts +24 -0
- package/ssr/esm/lib/components/select.wrapper.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/button-pure.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/button.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/canvas.d.ts +4 -0
- package/ssr/esm/lib/dsr-components/checkbox-wrapper.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/checkbox.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/flyout-multilevel-item.d.ts +3 -2
- package/ssr/esm/lib/dsr-components/flyout-multilevel.d.ts +5 -0
- package/ssr/esm/lib/dsr-components/pin-code.d.ts +6 -3
- package/ssr/esm/lib/dsr-components/radio-button-wrapper.d.ts +1 -0
- package/ssr/esm/lib/dsr-components/segmented-control.d.ts +5 -0
- package/ssr/esm/lib/dsr-components/switch.d.ts +1 -0
- package/ssr/esm/lib/types.d.ts +36 -35
- package/styles/_index.scss +1 -1
|
@@ -31,7 +31,7 @@ function toPrimitive(t, r) {
|
|
|
31
31
|
if ("object" != _typeof(t) || !t) return t;
|
|
32
32
|
var e = t[Symbol.toPrimitive];
|
|
33
33
|
if (void 0 !== e) {
|
|
34
|
-
var i = e.call(t, r
|
|
34
|
+
var i = e.call(t, r);
|
|
35
35
|
if ("object" != _typeof(i)) return i;
|
|
36
36
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
37
37
|
}
|
|
@@ -2755,400 +2755,426 @@ function getAugmentedNamespace(n) {
|
|
|
2755
2755
|
return a;
|
|
2756
2756
|
}
|
|
2757
2757
|
|
|
2758
|
-
var _tslib
|
|
2758
|
+
var _tslib = {};
|
|
2759
2759
|
|
|
2760
|
-
|
|
2760
|
+
var hasRequired_tslib;
|
|
2761
2761
|
|
|
2762
|
-
|
|
2762
|
+
function require_tslib () {
|
|
2763
|
+
if (hasRequired_tslib) return _tslib;
|
|
2764
|
+
hasRequired_tslib = 1;
|
|
2765
|
+
(function (exports) {
|
|
2763
2766
|
|
|
2764
|
-
|
|
2765
|
-
Copyright (c) Microsoft Corporation.
|
|
2767
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2766
2768
|
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
+
/*! *****************************************************************************
|
|
2770
|
+
Copyright (c) Microsoft Corporation.
|
|
2769
2771
|
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2773
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2774
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2775
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2776
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2777
|
-
***************************************************************************** */
|
|
2772
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
2773
|
+
purpose with or without fee is hereby granted.
|
|
2778
2774
|
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
}
|
|
2788
|
-
return t;
|
|
2789
|
-
};
|
|
2790
|
-
return exports.__assign.apply(this, arguments);
|
|
2791
|
-
};
|
|
2792
|
-
} (_tslib$1));
|
|
2793
|
-
|
|
2794
|
-
var require$$1 = /*@__PURE__*/getAugmentedNamespace(jss_esm);
|
|
2795
|
-
|
|
2796
|
-
/**
|
|
2797
|
-
* The custom `sort` method for
|
|
2798
|
-
* for the [`css-mqpacker`](https://www.npmjs.com/package/css-mqpacker) or
|
|
2799
|
-
* [`pleeease`](https://www.npmjs.com/package/pleeease) which using `css-mqpacker`
|
|
2800
|
-
* or, perhaps, something else ))
|
|
2801
|
-
*
|
|
2802
|
-
* @module sort-css-media-queries
|
|
2803
|
-
* @author Oleg Dutchenko <dutchenko.o.wezom@gmail.com>
|
|
2804
|
-
* @version 1.5.0
|
|
2805
|
-
*/
|
|
2806
|
-
|
|
2807
|
-
// ----------------------------------------
|
|
2808
|
-
// Private
|
|
2809
|
-
// ----------------------------------------
|
|
2810
|
-
|
|
2811
|
-
const minMaxWidth = /(!?\(\s*min(-device-)?-width)(.|\n)+\(\s*max(-device)?-width/i;
|
|
2812
|
-
const minWidth = /\(\s*min(-device)?-width/i;
|
|
2813
|
-
const maxMinWidth = /(!?\(\s*max(-device)?-width)(.|\n)+\(\s*min(-device)?-width/i;
|
|
2814
|
-
const maxWidth = /\(\s*max(-device)?-width/i;
|
|
2815
|
-
|
|
2816
|
-
const isMinWidth = _testQuery(minMaxWidth, maxMinWidth, minWidth);
|
|
2817
|
-
const isMaxWidth = _testQuery(maxMinWidth, minMaxWidth, maxWidth);
|
|
2818
|
-
|
|
2819
|
-
const minMaxHeight = /(!?\(\s*min(-device)?-height)(.|\n)+\(\s*max(-device)?-height/i;
|
|
2820
|
-
const minHeight = /\(\s*min(-device)?-height/i;
|
|
2821
|
-
const maxMinHeight = /(!?\(\s*max(-device)?-height)(.|\n)+\(\s*min(-device)?-height/i;
|
|
2822
|
-
const maxHeight = /\(\s*max(-device)?-height/i;
|
|
2823
|
-
|
|
2824
|
-
const isMinHeight = _testQuery(minMaxHeight, maxMinHeight, minHeight);
|
|
2825
|
-
const isMaxHeight = _testQuery(maxMinHeight, minMaxHeight, maxHeight);
|
|
2826
|
-
|
|
2827
|
-
const isPrint = /print/i;
|
|
2828
|
-
const isPrintOnly = /^print$/i;
|
|
2829
|
-
|
|
2830
|
-
const maxValue = Number.MAX_VALUE;
|
|
2831
|
-
|
|
2832
|
-
/**
|
|
2833
|
-
* Obtain the length of the media request in pixels.
|
|
2834
|
-
* Copy from original source `function inspectLength (length)`
|
|
2835
|
-
* {@link https://github.com/hail2u/node-css-mqpacker/blob/master/index.js#L58}
|
|
2836
|
-
* @private
|
|
2837
|
-
* @param {string} length
|
|
2838
|
-
* @return {number}
|
|
2839
|
-
*/
|
|
2840
|
-
function _getQueryLength (length) {
|
|
2841
|
-
length = /(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(length);
|
|
2842
|
-
|
|
2843
|
-
if (length === null) {
|
|
2844
|
-
return maxValue
|
|
2845
|
-
}
|
|
2846
|
-
|
|
2847
|
-
let number = length[1];
|
|
2848
|
-
const unit = length[2];
|
|
2849
|
-
|
|
2850
|
-
switch (unit) {
|
|
2851
|
-
case 'ch':
|
|
2852
|
-
number = parseFloat(number) * 8.8984375;
|
|
2853
|
-
break
|
|
2854
|
-
|
|
2855
|
-
case 'em':
|
|
2856
|
-
case 'rem':
|
|
2857
|
-
number = parseFloat(number) * 16;
|
|
2858
|
-
break
|
|
2859
|
-
|
|
2860
|
-
case 'ex':
|
|
2861
|
-
number = parseFloat(number) * 8.296875;
|
|
2862
|
-
break
|
|
2775
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2776
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2777
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2778
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2779
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2780
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2781
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
2782
|
+
***************************************************************************** */
|
|
2863
2783
|
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
*/
|
|
2880
|
-
function _testQuery (doubleTestTrue, doubleTestFalse, singleTest) {
|
|
2881
|
-
/**
|
|
2882
|
-
* @param {string} query
|
|
2883
|
-
* @return {boolean}
|
|
2884
|
-
*/
|
|
2885
|
-
return function (query) {
|
|
2886
|
-
if (doubleTestTrue.test(query)) {
|
|
2887
|
-
return true
|
|
2888
|
-
} else if (doubleTestFalse.test(query)) {
|
|
2889
|
-
return false
|
|
2890
|
-
}
|
|
2891
|
-
return singleTest.test(query)
|
|
2892
|
-
}
|
|
2893
|
-
}
|
|
2894
|
-
|
|
2895
|
-
/**
|
|
2896
|
-
* @private
|
|
2897
|
-
* @param {string} a
|
|
2898
|
-
* @param {string} b
|
|
2899
|
-
* @return {number|null}
|
|
2900
|
-
*/
|
|
2901
|
-
function _testIsPrint (a, b) {
|
|
2902
|
-
const isPrintA = isPrint.test(a);
|
|
2903
|
-
const isPrintOnlyA = isPrintOnly.test(a);
|
|
2904
|
-
|
|
2905
|
-
const isPrintB = isPrint.test(b);
|
|
2906
|
-
const isPrintOnlyB = isPrintOnly.test(b);
|
|
2907
|
-
|
|
2908
|
-
if (isPrintA && isPrintB) {
|
|
2909
|
-
if (!isPrintOnlyA && isPrintOnlyB) {
|
|
2910
|
-
return 1
|
|
2911
|
-
}
|
|
2912
|
-
if (isPrintOnlyA && !isPrintOnlyB) {
|
|
2913
|
-
return -1
|
|
2914
|
-
}
|
|
2915
|
-
return a.localeCompare(b)
|
|
2916
|
-
}
|
|
2917
|
-
if (isPrintA) {
|
|
2918
|
-
return 1
|
|
2919
|
-
}
|
|
2920
|
-
if (isPrintB) {
|
|
2921
|
-
return -1
|
|
2922
|
-
}
|
|
2923
|
-
|
|
2924
|
-
return null
|
|
2784
|
+
exports.__assign = function () {
|
|
2785
|
+
exports.__assign =
|
|
2786
|
+
Object.assign ||
|
|
2787
|
+
function __assign(t) {
|
|
2788
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2789
|
+
s = arguments[i];
|
|
2790
|
+
for (var p in s)
|
|
2791
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
2792
|
+
}
|
|
2793
|
+
return t;
|
|
2794
|
+
};
|
|
2795
|
+
return exports.__assign.apply(this, arguments);
|
|
2796
|
+
};
|
|
2797
|
+
} (_tslib));
|
|
2798
|
+
return _tslib;
|
|
2925
2799
|
}
|
|
2926
2800
|
|
|
2927
|
-
|
|
2928
|
-
// Public
|
|
2929
|
-
// ----------------------------------------
|
|
2930
|
-
|
|
2931
|
-
/**
|
|
2932
|
-
* Sorting an array with media queries
|
|
2933
|
-
* according to the mobile-first methodology.
|
|
2934
|
-
* @param {string} a
|
|
2935
|
-
* @param {string} b
|
|
2936
|
-
* @return {number} 1 / 0 / -1
|
|
2937
|
-
*/
|
|
2938
|
-
function sortCSSmq$1 (a, b) {
|
|
2939
|
-
const testIsPrint = _testIsPrint(a, b);
|
|
2940
|
-
if (testIsPrint !== null) {
|
|
2941
|
-
return testIsPrint
|
|
2942
|
-
}
|
|
2801
|
+
var require$$1 = /*@__PURE__*/getAugmentedNamespace(jss_esm);
|
|
2943
2802
|
|
|
2944
|
-
|
|
2945
|
-
|
|
2803
|
+
var sortCssMediaQueries;
|
|
2804
|
+
var hasRequiredSortCssMediaQueries;
|
|
2805
|
+
|
|
2806
|
+
function requireSortCssMediaQueries () {
|
|
2807
|
+
if (hasRequiredSortCssMediaQueries) return sortCssMediaQueries;
|
|
2808
|
+
hasRequiredSortCssMediaQueries = 1;
|
|
2809
|
+
|
|
2810
|
+
/**
|
|
2811
|
+
* The custom `sort` method for
|
|
2812
|
+
* for the [`css-mqpacker`](https://www.npmjs.com/package/css-mqpacker) or
|
|
2813
|
+
* [`pleeease`](https://www.npmjs.com/package/pleeease) which using `css-mqpacker`
|
|
2814
|
+
* or, perhaps, something else ))
|
|
2815
|
+
*
|
|
2816
|
+
* @module sort-css-media-queries
|
|
2817
|
+
* @author Oleg Dutchenko <dutchenko.o.wezom@gmail.com>
|
|
2818
|
+
* @version 1.5.0
|
|
2819
|
+
*/
|
|
2820
|
+
|
|
2821
|
+
// ----------------------------------------
|
|
2822
|
+
// Private
|
|
2823
|
+
// ----------------------------------------
|
|
2824
|
+
|
|
2825
|
+
const minMaxWidth = /(!?\(\s*min(-device-)?-width)(.|\n)+\(\s*max(-device)?-width/i;
|
|
2826
|
+
const minWidth = /\(\s*min(-device)?-width/i;
|
|
2827
|
+
const maxMinWidth = /(!?\(\s*max(-device)?-width)(.|\n)+\(\s*min(-device)?-width/i;
|
|
2828
|
+
const maxWidth = /\(\s*max(-device)?-width/i;
|
|
2829
|
+
|
|
2830
|
+
const isMinWidth = _testQuery(minMaxWidth, maxMinWidth, minWidth);
|
|
2831
|
+
const isMaxWidth = _testQuery(maxMinWidth, minMaxWidth, maxWidth);
|
|
2832
|
+
|
|
2833
|
+
const minMaxHeight = /(!?\(\s*min(-device)?-height)(.|\n)+\(\s*max(-device)?-height/i;
|
|
2834
|
+
const minHeight = /\(\s*min(-device)?-height/i;
|
|
2835
|
+
const maxMinHeight = /(!?\(\s*max(-device)?-height)(.|\n)+\(\s*min(-device)?-height/i;
|
|
2836
|
+
const maxHeight = /\(\s*max(-device)?-height/i;
|
|
2837
|
+
|
|
2838
|
+
const isMinHeight = _testQuery(minMaxHeight, maxMinHeight, minHeight);
|
|
2839
|
+
const isMaxHeight = _testQuery(maxMinHeight, minMaxHeight, maxHeight);
|
|
2840
|
+
|
|
2841
|
+
const isPrint = /print/i;
|
|
2842
|
+
const isPrintOnly = /^print$/i;
|
|
2843
|
+
|
|
2844
|
+
const maxValue = Number.MAX_VALUE;
|
|
2845
|
+
|
|
2846
|
+
/**
|
|
2847
|
+
* Obtain the length of the media request in pixels.
|
|
2848
|
+
* Copy from original source `function inspectLength (length)`
|
|
2849
|
+
* {@link https://github.com/hail2u/node-css-mqpacker/blob/master/index.js#L58}
|
|
2850
|
+
* @private
|
|
2851
|
+
* @param {string} length
|
|
2852
|
+
* @return {number}
|
|
2853
|
+
*/
|
|
2854
|
+
function _getQueryLength (length) {
|
|
2855
|
+
length = /(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(length);
|
|
2856
|
+
|
|
2857
|
+
if (length === null) {
|
|
2858
|
+
return maxValue
|
|
2859
|
+
}
|
|
2860
|
+
|
|
2861
|
+
let number = length[1];
|
|
2862
|
+
const unit = length[2];
|
|
2863
|
+
|
|
2864
|
+
switch (unit) {
|
|
2865
|
+
case 'ch':
|
|
2866
|
+
number = parseFloat(number) * 8.8984375;
|
|
2867
|
+
break
|
|
2868
|
+
|
|
2869
|
+
case 'em':
|
|
2870
|
+
case 'rem':
|
|
2871
|
+
number = parseFloat(number) * 16;
|
|
2872
|
+
break
|
|
2873
|
+
|
|
2874
|
+
case 'ex':
|
|
2875
|
+
number = parseFloat(number) * 8.296875;
|
|
2876
|
+
break
|
|
2877
|
+
|
|
2878
|
+
case 'px':
|
|
2879
|
+
number = parseFloat(number);
|
|
2880
|
+
break
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
return +number
|
|
2884
|
+
}
|
|
2946
2885
|
|
|
2947
|
-
|
|
2948
|
-
|
|
2886
|
+
/**
|
|
2887
|
+
* Wrapper for creating test functions
|
|
2888
|
+
* @private
|
|
2889
|
+
* @param {RegExp} doubleTestTrue
|
|
2890
|
+
* @param {RegExp} doubleTestFalse
|
|
2891
|
+
* @param {RegExp} singleTest
|
|
2892
|
+
* @return {Function}
|
|
2893
|
+
*/
|
|
2894
|
+
function _testQuery (doubleTestTrue, doubleTestFalse, singleTest) {
|
|
2895
|
+
/**
|
|
2896
|
+
* @param {string} query
|
|
2897
|
+
* @return {boolean}
|
|
2898
|
+
*/
|
|
2899
|
+
return function (query) {
|
|
2900
|
+
if (doubleTestTrue.test(query)) {
|
|
2901
|
+
return true
|
|
2902
|
+
} else if (doubleTestFalse.test(query)) {
|
|
2903
|
+
return false
|
|
2904
|
+
}
|
|
2905
|
+
return singleTest.test(query)
|
|
2906
|
+
}
|
|
2907
|
+
}
|
|
2949
2908
|
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2909
|
+
/**
|
|
2910
|
+
* @private
|
|
2911
|
+
* @param {string} a
|
|
2912
|
+
* @param {string} b
|
|
2913
|
+
* @return {number|null}
|
|
2914
|
+
*/
|
|
2915
|
+
function _testIsPrint (a, b) {
|
|
2916
|
+
const isPrintA = isPrint.test(a);
|
|
2917
|
+
const isPrintOnlyA = isPrintOnly.test(a);
|
|
2918
|
+
|
|
2919
|
+
const isPrintB = isPrint.test(b);
|
|
2920
|
+
const isPrintOnlyB = isPrintOnly.test(b);
|
|
2921
|
+
|
|
2922
|
+
if (isPrintA && isPrintB) {
|
|
2923
|
+
if (!isPrintOnlyA && isPrintOnlyB) {
|
|
2924
|
+
return 1
|
|
2925
|
+
}
|
|
2926
|
+
if (isPrintOnlyA && !isPrintOnlyB) {
|
|
2927
|
+
return -1
|
|
2928
|
+
}
|
|
2929
|
+
return a.localeCompare(b)
|
|
2930
|
+
}
|
|
2931
|
+
if (isPrintA) {
|
|
2932
|
+
return 1
|
|
2933
|
+
}
|
|
2934
|
+
if (isPrintB) {
|
|
2935
|
+
return -1
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
return null
|
|
2939
|
+
}
|
|
2956
2940
|
|
|
2957
|
-
|
|
2958
|
-
|
|
2941
|
+
// ----------------------------------------
|
|
2942
|
+
// Public
|
|
2943
|
+
// ----------------------------------------
|
|
2944
|
+
|
|
2945
|
+
/**
|
|
2946
|
+
* Sorting an array with media queries
|
|
2947
|
+
* according to the mobile-first methodology.
|
|
2948
|
+
* @param {string} a
|
|
2949
|
+
* @param {string} b
|
|
2950
|
+
* @return {number} 1 / 0 / -1
|
|
2951
|
+
*/
|
|
2952
|
+
function sortCSSmq (a, b) {
|
|
2953
|
+
const testIsPrint = _testIsPrint(a, b);
|
|
2954
|
+
if (testIsPrint !== null) {
|
|
2955
|
+
return testIsPrint
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
const minA = isMinWidth(a) || isMinHeight(a);
|
|
2959
|
+
const maxA = isMaxWidth(a) || isMaxHeight(a);
|
|
2960
|
+
|
|
2961
|
+
const minB = isMinWidth(b) || isMinHeight(b);
|
|
2962
|
+
const maxB = isMaxWidth(b) || isMaxHeight(b);
|
|
2963
|
+
|
|
2964
|
+
if (minA && maxB) {
|
|
2965
|
+
return -1
|
|
2966
|
+
}
|
|
2967
|
+
if (maxA && minB) {
|
|
2968
|
+
return 1
|
|
2969
|
+
}
|
|
2970
|
+
|
|
2971
|
+
let lengthA = _getQueryLength(a);
|
|
2972
|
+
let lengthB = _getQueryLength(b);
|
|
2973
|
+
|
|
2974
|
+
if (lengthA === maxValue && lengthB === maxValue) {
|
|
2975
|
+
return a.localeCompare(b)
|
|
2976
|
+
} else if (lengthA === maxValue) {
|
|
2977
|
+
return 1
|
|
2978
|
+
} else if (lengthB === maxValue) {
|
|
2979
|
+
return -1
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2982
|
+
if (lengthA > lengthB) {
|
|
2983
|
+
if (maxA) {
|
|
2984
|
+
return -1
|
|
2985
|
+
}
|
|
2986
|
+
return 1
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2989
|
+
if (lengthA < lengthB) {
|
|
2990
|
+
if (maxA) {
|
|
2991
|
+
return 1
|
|
2992
|
+
}
|
|
2993
|
+
return -1
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2996
|
+
return a.localeCompare(b)
|
|
2997
|
+
}
|
|
2959
2998
|
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2999
|
+
/**
|
|
3000
|
+
* Sorting an array with media queries
|
|
3001
|
+
* according to the desktop-first methodology.
|
|
3002
|
+
* @param {string} a
|
|
3003
|
+
* @param {string} b
|
|
3004
|
+
* @return {number} 1 / 0 / -1
|
|
3005
|
+
*/
|
|
3006
|
+
sortCSSmq.desktopFirst = function (a, b) {
|
|
3007
|
+
const testIsPrint = _testIsPrint(a, b);
|
|
3008
|
+
if (testIsPrint !== null) {
|
|
3009
|
+
return testIsPrint
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
const minA = isMinWidth(a) || isMinHeight(a);
|
|
3013
|
+
const maxA = isMaxWidth(a) || isMaxHeight(a);
|
|
3014
|
+
|
|
3015
|
+
const minB = isMinWidth(b) || isMinHeight(b);
|
|
3016
|
+
const maxB = isMaxWidth(b) || isMaxHeight(b);
|
|
3017
|
+
|
|
3018
|
+
if (minA && maxB) {
|
|
3019
|
+
return 1
|
|
3020
|
+
}
|
|
3021
|
+
if (maxA && minB) {
|
|
3022
|
+
return -1
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
const lengthA = _getQueryLength(a);
|
|
3026
|
+
const lengthB = _getQueryLength(b);
|
|
3027
|
+
|
|
3028
|
+
if (lengthA === maxValue && lengthB === maxValue) {
|
|
3029
|
+
return a.localeCompare(b)
|
|
3030
|
+
} else if (lengthA === maxValue) {
|
|
3031
|
+
return 1
|
|
3032
|
+
} else if (lengthB === maxValue) {
|
|
3033
|
+
return -1
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
if (lengthA > lengthB) {
|
|
3037
|
+
if (maxA) {
|
|
3038
|
+
return -1
|
|
3039
|
+
}
|
|
3040
|
+
return 1
|
|
3041
|
+
}
|
|
3042
|
+
|
|
3043
|
+
if (lengthA < lengthB) {
|
|
3044
|
+
if (maxA) {
|
|
3045
|
+
return 1
|
|
3046
|
+
}
|
|
3047
|
+
return -1
|
|
3048
|
+
}
|
|
3049
|
+
|
|
3050
|
+
return -(a.localeCompare(b))
|
|
3051
|
+
};
|
|
2967
3052
|
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
}
|
|
2972
|
-
return 1
|
|
2973
|
-
}
|
|
3053
|
+
// ----------------------------------------
|
|
3054
|
+
// Exports
|
|
3055
|
+
// ----------------------------------------
|
|
2974
3056
|
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
return 1
|
|
2978
|
-
}
|
|
2979
|
-
return -1
|
|
2980
|
-
}
|
|
2981
|
-
|
|
2982
|
-
return a.localeCompare(b)
|
|
3057
|
+
sortCssMediaQueries = sortCSSmq;
|
|
3058
|
+
return sortCssMediaQueries;
|
|
2983
3059
|
}
|
|
2984
3060
|
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
* according to the desktop-first methodology.
|
|
2988
|
-
* @param {string} a
|
|
2989
|
-
* @param {string} b
|
|
2990
|
-
* @return {number} 1 / 0 / -1
|
|
2991
|
-
*/
|
|
2992
|
-
sortCSSmq$1.desktopFirst = function (a, b) {
|
|
2993
|
-
const testIsPrint = _testIsPrint(a, b);
|
|
2994
|
-
if (testIsPrint !== null) {
|
|
2995
|
-
return testIsPrint
|
|
2996
|
-
}
|
|
2997
|
-
|
|
2998
|
-
const minA = isMinWidth(a) || isMinHeight(a);
|
|
2999
|
-
const maxA = isMaxWidth(a) || isMaxHeight(a);
|
|
3000
|
-
|
|
3001
|
-
const minB = isMinWidth(b) || isMinHeight(b);
|
|
3002
|
-
const maxB = isMaxWidth(b) || isMaxHeight(b);
|
|
3003
|
-
|
|
3004
|
-
if (minA && maxB) {
|
|
3005
|
-
return 1
|
|
3006
|
-
}
|
|
3007
|
-
if (maxA && minB) {
|
|
3008
|
-
return -1
|
|
3009
|
-
}
|
|
3061
|
+
var dist;
|
|
3062
|
+
var hasRequiredDist;
|
|
3010
3063
|
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
if (lengthA === maxValue && lengthB === maxValue) {
|
|
3015
|
-
return a.localeCompare(b)
|
|
3016
|
-
} else if (lengthA === maxValue) {
|
|
3017
|
-
return 1
|
|
3018
|
-
} else if (lengthB === maxValue) {
|
|
3019
|
-
return -1
|
|
3020
|
-
}
|
|
3064
|
+
function requireDist () {
|
|
3065
|
+
if (hasRequiredDist) return dist;
|
|
3066
|
+
hasRequiredDist = 1;
|
|
3021
3067
|
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
}
|
|
3026
|
-
return 1
|
|
3027
|
-
}
|
|
3068
|
+
var _tslib = require_tslib();
|
|
3069
|
+
var jss = require$$1;
|
|
3070
|
+
var sortCSSmq = requireSortCssMediaQueries();
|
|
3028
3071
|
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
}
|
|
3033
|
-
return -1
|
|
3034
|
-
}
|
|
3035
|
-
|
|
3036
|
-
return -(a.localeCompare(b))
|
|
3037
|
-
};
|
|
3038
|
-
|
|
3039
|
-
// ----------------------------------------
|
|
3040
|
-
// Exports
|
|
3041
|
-
// ----------------------------------------
|
|
3042
|
-
|
|
3043
|
-
var sortCssMediaQueries = sortCSSmq$1;
|
|
3044
|
-
|
|
3045
|
-
var _tslib = _tslib$1;
|
|
3046
|
-
var jss$1 = require$$1;
|
|
3047
|
-
var sortCSSmq = sortCssMediaQueries;
|
|
3048
|
-
|
|
3049
|
-
function _interopDefaultLegacy(e) {
|
|
3050
|
-
return e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
3051
|
-
}
|
|
3072
|
+
function _interopDefaultLegacy(e) {
|
|
3073
|
+
return e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
3074
|
+
}
|
|
3052
3075
|
|
|
3053
|
-
var sortCSSmq__default = /*#__PURE__*/ _interopDefaultLegacy(sortCSSmq);
|
|
3076
|
+
var sortCSSmq__default = /*#__PURE__*/ _interopDefaultLegacy(sortCSSmq);
|
|
3054
3077
|
|
|
3055
|
-
function isPlainObject(sample) {
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
}
|
|
3060
|
-
var UN_QUERIED = '__UN_QUERIED';
|
|
3061
|
-
function recursiveInnerAndGetQueries(pluginOptions, rules) {
|
|
3062
|
-
var queries = {
|
|
3063
|
-
groups: {},
|
|
3064
|
-
groupsSortNames: []
|
|
3065
|
-
};
|
|
3066
|
-
for (var index = 0; index < rules.length; index++) {
|
|
3067
|
-
var rule = rules[index];
|
|
3068
|
-
var query =
|
|
3069
|
-
rule.type === 'conditional' && typeof rule.query === 'string'
|
|
3070
|
-
? rule.query
|
|
3071
|
-
: UN_QUERIED;
|
|
3072
|
-
if (!queries.groups.hasOwnProperty(query)) {
|
|
3073
|
-
queries.groupsSortNames.push(query);
|
|
3074
|
-
queries.groups[query] = [];
|
|
3075
|
-
}
|
|
3076
|
-
queries.groups[query].push(index);
|
|
3077
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
3078
|
-
recursive(pluginOptions, rule);
|
|
3078
|
+
function isPlainObject(sample) {
|
|
3079
|
+
return (
|
|
3080
|
+
sample !== null && typeof sample === 'object' && Array.isArray(sample) === false
|
|
3081
|
+
);
|
|
3079
3082
|
}
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
var
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3083
|
+
var UN_QUERIED = '__UN_QUERIED';
|
|
3084
|
+
function recursiveInnerAndGetQueries(pluginOptions, rules) {
|
|
3085
|
+
var queries = {
|
|
3086
|
+
groups: {},
|
|
3087
|
+
groupsSortNames: []
|
|
3088
|
+
};
|
|
3089
|
+
for (var index = 0; index < rules.length; index++) {
|
|
3090
|
+
var rule = rules[index];
|
|
3091
|
+
var query =
|
|
3092
|
+
rule.type === 'conditional' && typeof rule.query === 'string'
|
|
3093
|
+
? rule.query
|
|
3094
|
+
: UN_QUERIED;
|
|
3095
|
+
if (!queries.groups.hasOwnProperty(query)) {
|
|
3096
|
+
queries.groupsSortNames.push(query);
|
|
3097
|
+
queries.groups[query] = [];
|
|
3088
3098
|
}
|
|
3089
|
-
|
|
3090
|
-
|
|
3099
|
+
queries.groups[query].push(index);
|
|
3100
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
3101
|
+
recursive(pluginOptions, rule);
|
|
3091
3102
|
}
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
if (options === void 0) {
|
|
3099
|
-
options = {};
|
|
3100
|
-
}
|
|
3101
|
-
var str = '';
|
|
3102
|
-
var sheet = this.options.sheet;
|
|
3103
|
-
var link = sheet ? sheet.options.link : false;
|
|
3104
|
-
var _a = recursiveInnerAndGetQueries(pluginOptions, this.index),
|
|
3105
|
-
groups = _a.groups,
|
|
3106
|
-
groupsSortNames = _a.groupsSortNames;
|
|
3107
|
-
for (var i = 0; i < groupsSortNames.length; i++) {
|
|
3108
|
-
var groupName = groupsSortNames[i];
|
|
3109
|
-
var group = groups[groupsSortNames[i]];
|
|
3110
|
-
if (groupName !== UN_QUERIED && pluginOptions.combineMediaQueries) {
|
|
3111
|
-
str += '\n' + groupName + ' {';
|
|
3112
|
-
for (var i_1 = 0; i_1 < group.length; i_1++) {
|
|
3113
|
-
var rule = this.index[group[i_1]];
|
|
3114
|
-
var css = rule.rules.toString(
|
|
3115
|
-
_tslib.__assign(_tslib.__assign({}, options), {
|
|
3116
|
-
indent: (options.indent || 0) + 1
|
|
3117
|
-
})
|
|
3118
|
-
);
|
|
3119
|
-
if (!css && !link) continue;
|
|
3120
|
-
if (str) str += '\n';
|
|
3121
|
-
str += css;
|
|
3122
|
-
}
|
|
3123
|
-
str += '\n}\n';
|
|
3103
|
+
queries.groupsSortNames.sort(function (a, b) {
|
|
3104
|
+
var aWeight = a === UN_QUERIED ? 0 : a.length;
|
|
3105
|
+
var bWeight = b === UN_QUERIED ? 0 : b.length;
|
|
3106
|
+
if (aWeight > 0 && bWeight > 0) {
|
|
3107
|
+
if (pluginOptions.desktopFirst) {
|
|
3108
|
+
return sortCSSmq__default['default'].desktopFirst(a, b);
|
|
3124
3109
|
} else {
|
|
3125
|
-
|
|
3126
|
-
var rule = this.index[group[i_2]];
|
|
3127
|
-
var css = rule.toString(options);
|
|
3128
|
-
if (!css && !link) continue;
|
|
3129
|
-
if (str) str += '\n';
|
|
3130
|
-
str += css;
|
|
3131
|
-
}
|
|
3110
|
+
return sortCSSmq__default['default'](a, b);
|
|
3132
3111
|
}
|
|
3112
|
+
} else {
|
|
3113
|
+
return aWeight - bWeight;
|
|
3133
3114
|
}
|
|
3134
|
-
|
|
3135
|
-
|
|
3115
|
+
});
|
|
3116
|
+
return queries;
|
|
3136
3117
|
}
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3118
|
+
function recursive(pluginOptions, data) {
|
|
3119
|
+
if (isPlainObject(data) && data.rules instanceof jss.RuleList) {
|
|
3120
|
+
data.rules.toString = function (options) {
|
|
3121
|
+
if (options === void 0) {
|
|
3122
|
+
options = {};
|
|
3123
|
+
}
|
|
3124
|
+
var str = '';
|
|
3125
|
+
var sheet = this.options.sheet;
|
|
3126
|
+
var link = sheet ? sheet.options.link : false;
|
|
3127
|
+
var _a = recursiveInnerAndGetQueries(pluginOptions, this.index),
|
|
3128
|
+
groups = _a.groups,
|
|
3129
|
+
groupsSortNames = _a.groupsSortNames;
|
|
3130
|
+
for (var i = 0; i < groupsSortNames.length; i++) {
|
|
3131
|
+
var groupName = groupsSortNames[i];
|
|
3132
|
+
var group = groups[groupsSortNames[i]];
|
|
3133
|
+
if (groupName !== UN_QUERIED && pluginOptions.combineMediaQueries) {
|
|
3134
|
+
str += '\n' + groupName + ' {';
|
|
3135
|
+
for (var i_1 = 0; i_1 < group.length; i_1++) {
|
|
3136
|
+
var rule = this.index[group[i_1]];
|
|
3137
|
+
var css = rule.rules.toString(
|
|
3138
|
+
_tslib.__assign(_tslib.__assign({}, options), {
|
|
3139
|
+
indent: (options.indent || 0) + 1
|
|
3140
|
+
})
|
|
3141
|
+
);
|
|
3142
|
+
if (!css && !link) continue;
|
|
3143
|
+
if (str) str += '\n';
|
|
3144
|
+
str += css;
|
|
3145
|
+
}
|
|
3146
|
+
str += '\n}\n';
|
|
3147
|
+
} else {
|
|
3148
|
+
for (var i_2 = 0; i_2 < group.length; i_2++) {
|
|
3149
|
+
var rule = this.index[group[i_2]];
|
|
3150
|
+
var css = rule.toString(options);
|
|
3151
|
+
if (!css && !link) continue;
|
|
3152
|
+
if (str) str += '\n';
|
|
3153
|
+
str += css;
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
}
|
|
3157
|
+
return str;
|
|
3158
|
+
};
|
|
3159
|
+
}
|
|
3141
3160
|
}
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3161
|
+
function jssCombineAndSortMQ(options) {
|
|
3162
|
+
if (options === void 0) {
|
|
3163
|
+
options = {};
|
|
3145
3164
|
}
|
|
3146
|
-
|
|
3147
|
-
|
|
3165
|
+
return {
|
|
3166
|
+
onProcessSheet: function (sheet) {
|
|
3167
|
+
recursive(options, sheet);
|
|
3168
|
+
}
|
|
3169
|
+
};
|
|
3170
|
+
}
|
|
3148
3171
|
|
|
3149
|
-
|
|
3172
|
+
dist = jssCombineAndSortMQ;
|
|
3173
|
+
return dist;
|
|
3174
|
+
}
|
|
3150
3175
|
|
|
3151
|
-
var
|
|
3176
|
+
var distExports = requireDist();
|
|
3177
|
+
var jssPluginSortMediaQueries = /*@__PURE__*/getDefaultExportFromCjs(distExports);
|
|
3152
3178
|
|
|
3153
3179
|
const isDisabledOrLoading = (disabled, loading) => {
|
|
3154
3180
|
return disabled || loading;
|
|
@@ -3166,30 +3192,10 @@ const darken = (hsl) => {
|
|
|
3166
3192
|
};
|
|
3167
3193
|
const changeColor = (hsl, lightness) => {
|
|
3168
3194
|
return hsl.replace(/\s(\d+)(%?)\//, (_, p1, p2) => {
|
|
3169
|
-
return ` ${Math.min(Math.max(parseInt(p1, 10) + lightness, 0), 100)}${p2}/`;
|
|
3195
|
+
return ` ${Math.min(Math.max(Number.parseInt(p1, 10) + lightness, 0), 100)}${p2}/`;
|
|
3170
3196
|
});
|
|
3171
3197
|
};
|
|
3172
3198
|
|
|
3173
|
-
const parseJSON = (prop) => {
|
|
3174
|
-
if (typeof prop === 'string') {
|
|
3175
|
-
try {
|
|
3176
|
-
// prop is potentially JSON parsable string, e.g. "{ base: 'block', l: 'inline' }" or "true" or "false"
|
|
3177
|
-
return JSON.parse(prop
|
|
3178
|
-
.replace(/'/g, '"') // convert single quotes to double quotes
|
|
3179
|
-
.replace(/[\s"]?([a-z]+)[\s"]?:([^//])/g, '"$1":$2') // wrap keys in double quotes if they don't have them but ignore potential urls
|
|
3180
|
-
);
|
|
3181
|
-
}
|
|
3182
|
-
catch {
|
|
3183
|
-
// prop is string, e.g. "block" or "inline"
|
|
3184
|
-
return prop;
|
|
3185
|
-
}
|
|
3186
|
-
}
|
|
3187
|
-
else {
|
|
3188
|
-
// prop is object, e.g. { base: 'block', l: 'inline' } or number, e.g. 123 or boolean, e.g. true
|
|
3189
|
-
return prop;
|
|
3190
|
-
}
|
|
3191
|
-
};
|
|
3192
|
-
|
|
3193
3199
|
const borderRadiusSmall = '4px';
|
|
3194
3200
|
|
|
3195
3201
|
const borderRadiusMedium = '8px';
|
|
@@ -3414,10 +3420,6 @@ const spacingFluidSmall = 'clamp(8px, 0.5vw + 6px, 16px)';
|
|
|
3414
3420
|
|
|
3415
3421
|
const spacingFluidLarge = 'clamp(32px, 2.75vw + 23px, 76px)';
|
|
3416
3422
|
|
|
3417
|
-
const themeLightBackgroundShading = 'rgba(1, 2, 5, 0.67)';
|
|
3418
|
-
|
|
3419
|
-
const themeDarkBackgroundShading = 'rgba(38, 38, 41, 0.67)';
|
|
3420
|
-
|
|
3421
3423
|
const _displayFontPartA = `${fontStyleNormal} ${fontVariant} ${fontWeightRegular} `;
|
|
3422
3424
|
const _displayFontPartB = `/${fontLineHeight} ${fontFamily}`;
|
|
3423
3425
|
|
|
@@ -3619,8 +3621,11 @@ const dismissButtonJssStyle = {
|
|
|
3619
3621
|
};
|
|
3620
3622
|
const cssVariableTransitionDuration = '--p-transition-duration';
|
|
3621
3623
|
const cssVariableAnimationDuration = '--p-animation-duration';
|
|
3624
|
+
const getAnimation = (name, duration = 'short', easing = 'base') => {
|
|
3625
|
+
return `${name} var(${cssVariableAnimationDuration}, ${motionDurationMap[duration]}) ${motionEasingMap[easing]}`;
|
|
3626
|
+
};
|
|
3622
3627
|
const getTransition = (cssProperty, duration = 'short', easing = 'base', delay) => {
|
|
3623
|
-
return `${cssProperty} var(${cssVariableTransitionDuration}, ${motionDurationMap[duration]}) ${motionEasingMap[easing]}${
|
|
3628
|
+
return `${cssProperty} var(${cssVariableTransitionDuration}, ${motionDurationMap[duration]}) ${motionEasingMap[easing]}${''}`;
|
|
3624
3629
|
};
|
|
3625
3630
|
const addImportantToRule = (value) => `${value} !important`;
|
|
3626
3631
|
const addImportantToEachRule = (input) => {
|
|
@@ -3628,6 +3633,7 @@ const addImportantToEachRule = (input) => {
|
|
|
3628
3633
|
? result
|
|
3629
3634
|
: // @ts-expect-error: Type string can't be used to index type JssStyle
|
|
3630
3635
|
((result[key] =
|
|
3636
|
+
// biome-ignore lint/style/noCommaOperator: to be refactored
|
|
3631
3637
|
typeof value === 'object' ? addImportantToEachRule(value) : addImportantToRule(value)),
|
|
3632
3638
|
result), {});
|
|
3633
3639
|
};
|
|
@@ -3700,43 +3706,6 @@ const getHiddenTextJssStyle = (isHidden = true, isShownJssStyle) => {
|
|
|
3700
3706
|
...isShownJssStyle,
|
|
3701
3707
|
};
|
|
3702
3708
|
};
|
|
3703
|
-
// TODO: migrate flyout-multilevel to use shared backdrop of dialog-styles.ts
|
|
3704
|
-
/**
|
|
3705
|
-
* Generates JSS styles for a frosted glass background.
|
|
3706
|
-
* @param {boolean} isVisible - Determines if the frosted glass effect is visible.
|
|
3707
|
-
* @param {number} zIndex - The z-index to be used.
|
|
3708
|
-
* @param {Theme} theme - The theme to be used.
|
|
3709
|
-
* @param {string} duration - The duration of the transition animation.
|
|
3710
|
-
* @param {'blur' | 'shading'} backdrop - The backdrop variant.
|
|
3711
|
-
* @returns {JssStyle} - The JSS styles for the frosted glass backdrop.
|
|
3712
|
-
*/
|
|
3713
|
-
const getBackdropJssStyle = (isVisible, zIndex, theme, duration = 'long') => {
|
|
3714
|
-
return {
|
|
3715
|
-
position: 'fixed',
|
|
3716
|
-
inset: 0,
|
|
3717
|
-
zIndex,
|
|
3718
|
-
// TODO: background shading is missing in getThemedColors(theme).backgroundShading
|
|
3719
|
-
background: isThemeDark(theme) ? themeDarkBackgroundShading : themeLightBackgroundShading,
|
|
3720
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
3721
|
-
background: themeDarkBackgroundShading,
|
|
3722
|
-
}),
|
|
3723
|
-
...(isVisible
|
|
3724
|
-
? {
|
|
3725
|
-
visibility: 'inherit',
|
|
3726
|
-
pointerEvents: 'auto',
|
|
3727
|
-
...frostedGlassStyle,
|
|
3728
|
-
opacity: 1,
|
|
3729
|
-
}
|
|
3730
|
-
: {
|
|
3731
|
-
visibility: 'hidden', // element shall not be tabbable after fade out transition has finished
|
|
3732
|
-
pointerEvents: 'none',
|
|
3733
|
-
WebkitBackdropFilter: 'blur(0px)',
|
|
3734
|
-
backdropFilter: 'blur(0px)',
|
|
3735
|
-
opacity: 0,
|
|
3736
|
-
}),
|
|
3737
|
-
transition: `${getTransition('opacity', duration)}, ${getTransition('backdrop-filter', duration)}, ${getTransition('-webkit-backdrop-filter', duration)}, visibility 0s linear var(${cssVariableTransitionDuration}, ${isVisible ? '0s' : motionDurationMap[duration]})`,
|
|
3738
|
-
};
|
|
3739
|
-
};
|
|
3740
3709
|
|
|
3741
3710
|
const hostHiddenStyles = {
|
|
3742
3711
|
'&([hidden])': {
|
|
@@ -3775,6 +3744,26 @@ const forcedColorsMediaQuery = (style) => {
|
|
|
3775
3744
|
return { '@media (forced-colors: active)': style };
|
|
3776
3745
|
};
|
|
3777
3746
|
|
|
3747
|
+
const parseJSON = (prop) => {
|
|
3748
|
+
if (typeof prop === 'string') {
|
|
3749
|
+
try {
|
|
3750
|
+
// prop is potentially JSON parsable string, e.g. "{ base: 'block', l: 'inline' }" or "true" or "false"
|
|
3751
|
+
return JSON.parse(prop
|
|
3752
|
+
.replace(/'/g, '"') // convert single quotes to double quotes
|
|
3753
|
+
.replace(/[\s"]?([a-z]+)[\s"]?:([^//])/g, '"$1":$2') // wrap keys in double quotes if they don't have them but ignore potential urls
|
|
3754
|
+
);
|
|
3755
|
+
}
|
|
3756
|
+
catch {
|
|
3757
|
+
// prop is string, e.g. "block" or "inline"
|
|
3758
|
+
return prop;
|
|
3759
|
+
}
|
|
3760
|
+
}
|
|
3761
|
+
else {
|
|
3762
|
+
// prop is object, e.g. { base: 'block', l: 'inline' } or number, e.g. 123 or boolean, e.g. true
|
|
3763
|
+
return prop;
|
|
3764
|
+
}
|
|
3765
|
+
};
|
|
3766
|
+
|
|
3778
3767
|
// NOTE: handpicked selection of plugins from jss-preset-default
|
|
3779
3768
|
const jss = createJss({
|
|
3780
3769
|
plugins: [
|
|
@@ -3818,6 +3807,7 @@ const isObject = (obj) => typeof obj === 'object' && !Array.isArray(obj);
|
|
|
3818
3807
|
// NOTE: taken from https://stackoverflow.com/a/48218209
|
|
3819
3808
|
const mergeDeep = (...objects) => {
|
|
3820
3809
|
return objects.reduce((prev, obj) => {
|
|
3810
|
+
// biome-ignore lint/complexity/noForEach: to be refactored
|
|
3821
3811
|
Object.keys(obj).forEach((key) => {
|
|
3822
3812
|
const pVal = prev[key];
|
|
3823
3813
|
const oVal = obj[key];
|
|
@@ -3845,12 +3835,13 @@ const mergeDeep = (...objects) => {
|
|
|
3845
3835
|
const attributeMutationMap = new Map();
|
|
3846
3836
|
hasWindow &&
|
|
3847
3837
|
new MutationObserver((mutations) => {
|
|
3848
|
-
mutations
|
|
3838
|
+
for (const mutation of mutations
|
|
3849
3839
|
// reduce array to only entries that have really a changed value
|
|
3850
3840
|
.filter((mutation) => mutation.oldValue !== mutation.target.getAttribute(mutation.attributeName))
|
|
3851
3841
|
// remove duplicates so we execute callback only once per node
|
|
3852
|
-
.filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)
|
|
3853
|
-
|
|
3842
|
+
.filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)) {
|
|
3843
|
+
attributeMutationMap.get(mutation.target)?.();
|
|
3844
|
+
}
|
|
3854
3845
|
});
|
|
3855
3846
|
|
|
3856
3847
|
const mediaQueries = Object.values(breakpoint).map((v) => `(min-width:${v}px)`);
|
|
@@ -3872,17 +3863,14 @@ const observedNodesMap = new Map();
|
|
|
3872
3863
|
hasWindow &&
|
|
3873
3864
|
new MutationObserver((mutations) => {
|
|
3874
3865
|
// there may be race conditions in jsdom-polyfill tests where the map is already empty when a mutation happens
|
|
3875
|
-
if (observedNodesMap.size) {
|
|
3866
|
+
if (observedNodesMap.size > 0) {
|
|
3876
3867
|
const observedNodes = Array.from(observedNodesMap.keys());
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
.filter((node) => node.contains(mutation.target))
|
|
3884
|
-
.forEach((node) => observedNodesMap.get(node)?.());
|
|
3885
|
-
});
|
|
3868
|
+
// remove duplicates so we execute callback only once per node
|
|
3869
|
+
for (const mutation of mutations.filter((mutation, idx, arr) => arr.findIndex((m) => m.target === mutation.target) === idx)) {
|
|
3870
|
+
for (const node of observedNodes.filter((node) => node.contains(mutation.target))) {
|
|
3871
|
+
observedNodesMap.get(node)?.();
|
|
3872
|
+
}
|
|
3873
|
+
}
|
|
3886
3874
|
}
|
|
3887
3875
|
});
|
|
3888
3876
|
|
|
@@ -3921,7 +3909,7 @@ const supportsNativePopover = () => {
|
|
|
3921
3909
|
if (!hasWindow) {
|
|
3922
3910
|
return false;
|
|
3923
3911
|
}
|
|
3924
|
-
return
|
|
3912
|
+
return Object.prototype.hasOwnProperty.call(HTMLElement.prototype, 'popover');
|
|
3925
3913
|
};
|
|
3926
3914
|
// determine it once
|
|
3927
3915
|
supportsNativePopover();
|
|
@@ -3948,8 +3936,7 @@ const formatObjectOutput = (value) => {
|
|
|
3948
3936
|
.replace(/(})/g, ' $1') // add space before following: }
|
|
3949
3937
|
.replace(/^"(.+)"$/, '$1'); // remove wrapping double quotes
|
|
3950
3938
|
};
|
|
3951
|
-
'value, '
|
|
3952
|
-
formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '');
|
|
3939
|
+
`value, ${formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '')}`;
|
|
3953
3940
|
|
|
3954
3941
|
const getComponentCss$19 = (size, compact, open, theme, sticky) => {
|
|
3955
3942
|
const { primaryColor, hoverColor, contrastLowColor, backgroundColor } = getThemedColors(theme);
|
|
@@ -4098,7 +4085,6 @@ const getComponentCss$19 = (size, compact, open, theme, sticky) => {
|
|
|
4098
4085
|
};
|
|
4099
4086
|
|
|
4100
4087
|
const TOAST_Z_INDEX = 999999;
|
|
4101
|
-
const FLYOUT_Z_INDEX = 99998;
|
|
4102
4088
|
const POPOVER_Z_INDEX = 9999;
|
|
4103
4089
|
const BANNER_Z_INDEX = 99;
|
|
4104
4090
|
|
|
@@ -4873,6 +4859,9 @@ const getComponentCss$13 = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
|
4873
4859
|
display: 'none',
|
|
4874
4860
|
},
|
|
4875
4861
|
},
|
|
4862
|
+
'&:focus': {
|
|
4863
|
+
outline: 'none',
|
|
4864
|
+
},
|
|
4876
4865
|
},
|
|
4877
4866
|
blur: {
|
|
4878
4867
|
zIndex: -1,
|
|
@@ -5034,6 +5023,9 @@ const getComponentCss$13 = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
|
5034
5023
|
display: 'block',
|
|
5035
5024
|
padding: spacingBase,
|
|
5036
5025
|
},
|
|
5026
|
+
'&:focus': {
|
|
5027
|
+
outline: 'none',
|
|
5028
|
+
},
|
|
5037
5029
|
},
|
|
5038
5030
|
'flyout-start': {
|
|
5039
5031
|
'--p-flyout-width': '100dvw',
|
|
@@ -5125,7 +5117,7 @@ const getComponentCss$12 = (gradientColor, hasHeading, hasDescription, hasContro
|
|
|
5125
5117
|
},
|
|
5126
5118
|
...preventFoucOfNestedElementsStyles,
|
|
5127
5119
|
...(hasControlsSlot && {
|
|
5128
|
-
|
|
5120
|
+
'slot[name="controls"]': {
|
|
5129
5121
|
display: 'block',
|
|
5130
5122
|
gridColumnStart: 1,
|
|
5131
5123
|
gridRowStart: 3,
|
|
@@ -5161,10 +5153,10 @@ const getComponentCss$12 = (gradientColor, hasHeading, hasDescription, hasContro
|
|
|
5161
5153
|
...(hasHeading && {
|
|
5162
5154
|
[selectorHeading]: {
|
|
5163
5155
|
maxWidth: '56.25rem',
|
|
5164
|
-
margin: `0 0 ${
|
|
5156
|
+
margin: `0 0 ${hasDescription ? 0 : spacingFluidMedium}`,
|
|
5165
5157
|
...(headingSize === 'xx-large' ? headingXXLargeStyle : headingXLargeStyle),
|
|
5166
5158
|
},
|
|
5167
|
-
|
|
5159
|
+
'::slotted([slot=heading])': {
|
|
5168
5160
|
margin: 0, // reset ua-style
|
|
5169
5161
|
...(headingSize === 'xx-large' ? headingXXLargeStyle : headingXLargeStyle),
|
|
5170
5162
|
},
|
|
@@ -5749,8 +5741,19 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5749
5741
|
backgroundSize: 'cover',
|
|
5750
5742
|
}),
|
|
5751
5743
|
},
|
|
5752
|
-
...(
|
|
5744
|
+
...(isLoading
|
|
5753
5745
|
? {
|
|
5746
|
+
'input:checked': {
|
|
5747
|
+
// background-image is merged in later
|
|
5748
|
+
borderColor: checkedColor,
|
|
5749
|
+
backgroundColor: checkedColor,
|
|
5750
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5751
|
+
borderColor: checkedColorDark,
|
|
5752
|
+
backgroundColor: checkedColorDark,
|
|
5753
|
+
}),
|
|
5754
|
+
},
|
|
5755
|
+
}
|
|
5756
|
+
: {
|
|
5754
5757
|
'input:checked': {
|
|
5755
5758
|
borderColor: checkedColor,
|
|
5756
5759
|
backgroundColor: checkedColor,
|
|
@@ -5785,17 +5788,6 @@ const getComponentCss$10 = (hideLabel, state, isDisabled, isLoading, compact, th
|
|
|
5785
5788
|
backgroundImage: getIndeterminateSVGBackgroundImage('white'),
|
|
5786
5789
|
})),
|
|
5787
5790
|
},
|
|
5788
|
-
}
|
|
5789
|
-
: {
|
|
5790
|
-
'input:checked': {
|
|
5791
|
-
// background-image is merged in later
|
|
5792
|
-
borderColor: checkedColor,
|
|
5793
|
-
backgroundColor: checkedColor,
|
|
5794
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5795
|
-
borderColor: checkedColorDark,
|
|
5796
|
-
backgroundColor: checkedColorDark,
|
|
5797
|
-
}),
|
|
5798
|
-
},
|
|
5799
5791
|
}),
|
|
5800
5792
|
...(!disabledOrLoading &&
|
|
5801
5793
|
!isHighContrastMode &&
|
|
@@ -6225,337 +6217,493 @@ const getComponentCss$U = (inline, wrap, direction, justifyContent, alignItems,
|
|
|
6225
6217
|
});
|
|
6226
6218
|
};
|
|
6227
6219
|
|
|
6228
|
-
const
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
};
|
|
6239
|
-
};
|
|
6240
|
-
|
|
6241
|
-
const cssVariableVisibility = '--p-internal-flyout-multilevel-visibility';
|
|
6242
|
-
const cssVariableVisibilityTransitionDuration = '--p-internal-flyout-multilevel-visibility-transition-duration';
|
|
6243
|
-
const frostedGlassHeaderHeight = '4rem';
|
|
6244
|
-
const frostedGlassBackgroundColorLight$1 = 'rgba(255, 255, 255, 0.79)';
|
|
6245
|
-
const frostedGlassBackgroundColorDark$1 = 'rgba(14, 14, 18, 0.79)';
|
|
6246
|
-
const scrollerWidthEnhancedView = 'clamp(338px, 10.52vw + 258px, 460px)';
|
|
6247
|
-
const mediaQueryEnhancedView = getMediaQueryMin('s');
|
|
6248
|
-
const getComponentCss$T = (isPrimaryScrollerVisible, isSecondaryScrollerVisible, theme) => {
|
|
6249
|
-
const { backgroundColor } = getThemedColors(theme);
|
|
6250
|
-
const { backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6251
|
-
const frostedGlassBackgroundColor = isThemeDark(theme)
|
|
6252
|
-
? frostedGlassBackgroundColorDark$1
|
|
6253
|
-
: frostedGlassBackgroundColorLight$1;
|
|
6220
|
+
const scrollerWidthDesktop = 'clamp(338px, 210px + 18vw, 640px)';
|
|
6221
|
+
const mediaQueryMobile = getMediaQueryMax('s');
|
|
6222
|
+
const mediaQueryDesktop = getMediaQueryMin('s');
|
|
6223
|
+
const dialogDurationOpen = 'moderate';
|
|
6224
|
+
const backdropDurationOpen = 'long';
|
|
6225
|
+
const easingOpen = 'in';
|
|
6226
|
+
const dialogDurationClose = 'short';
|
|
6227
|
+
const backdropDurationClose = 'moderate';
|
|
6228
|
+
const easingClose = 'out';
|
|
6229
|
+
const getComponentCss$T = (isOpen, isPrimary, isSecondaryScrollerVisible, theme) => {
|
|
6230
|
+
const { backgroundColor, backgroundSurfaceColor, backgroundShadingColor } = getThemedColors(theme);
|
|
6231
|
+
const { backgroundColor: backgroundColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, backgroundShadingColor: backgroundShadingColorDark, } = getThemedColors('dark');
|
|
6254
6232
|
return getCss({
|
|
6255
6233
|
'@global': {
|
|
6234
|
+
'@keyframes slide-up-mobile': {
|
|
6235
|
+
from: { transform: `translate3d(0,${spacingFluidMedium},0)` },
|
|
6236
|
+
to: { transform: 'translate3d(0,0,0)' },
|
|
6237
|
+
},
|
|
6238
|
+
// unfortunately, it's not possible to use transform animation like in mobile view
|
|
6239
|
+
// because then a new stacking context within scroll container would be initialized
|
|
6240
|
+
// causing the slotted scroll container to become invisible
|
|
6241
|
+
'@keyframes slide-up-desktop': {
|
|
6242
|
+
from: { marginBlockStart: spacingFluidMedium },
|
|
6243
|
+
to: { marginBlockStart: '0px' },
|
|
6244
|
+
},
|
|
6256
6245
|
':host': {
|
|
6257
6246
|
display: 'block',
|
|
6258
6247
|
...addImportantToEachRule({
|
|
6259
|
-
...(!isPrimaryScrollerVisible && {
|
|
6260
|
-
[cssVariableVisibility]: 'hidden',
|
|
6261
|
-
[cssVariableVisibilityTransitionDuration]: motionDurationLong,
|
|
6262
|
-
}),
|
|
6263
|
-
...getBackdropJssStyle(isPrimaryScrollerVisible, FLYOUT_Z_INDEX, theme),
|
|
6264
6248
|
...colorSchemeStyles,
|
|
6265
6249
|
...hostHiddenStyles,
|
|
6266
6250
|
}),
|
|
6267
6251
|
},
|
|
6268
6252
|
...preventFoucOfNestedElementsStyles,
|
|
6269
6253
|
dialog: {
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
background: 'none',
|
|
6277
|
-
...(isPrimaryScrollerVisible
|
|
6254
|
+
all: 'unset',
|
|
6255
|
+
position: 'fixed',
|
|
6256
|
+
inset: 0,
|
|
6257
|
+
zIndex: 999999999, // fallback when dialog isn't rendered on #top-layer, e.g. relevant in ssr context or fade-out transition in Safari or Firefox
|
|
6258
|
+
outline: 0, // prevents outline in case dialog becomes focusable
|
|
6259
|
+
...(isOpen
|
|
6278
6260
|
? {
|
|
6279
|
-
|
|
6280
|
-
|
|
6261
|
+
visibility: 'inherit',
|
|
6262
|
+
...frostedGlassStyle,
|
|
6263
|
+
background: backgroundShadingColor,
|
|
6264
|
+
transition: `${getTransition('background', backdropDurationOpen, easingOpen)}, ${getTransition('backdrop-filter', backdropDurationOpen, easingOpen)}, ${getTransition('-webkit-backdrop-filter', backdropDurationOpen, easingOpen)}`,
|
|
6265
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6266
|
+
background: backgroundShadingColorDark,
|
|
6267
|
+
}),
|
|
6281
6268
|
}
|
|
6282
6269
|
: {
|
|
6283
|
-
|
|
6284
|
-
transition:
|
|
6270
|
+
visibility: 'hidden',
|
|
6271
|
+
transition: `visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationMap[backdropDurationClose]}), ${getTransition('overlay', backdropDurationClose, easingClose)} allow-discrete, ${getTransition('background', backdropDurationClose, easingClose)}, ${getTransition('backdrop-filter', backdropDurationClose, easingClose)}, ${getTransition('-webkit-backdrop-filter', backdropDurationClose, easingClose)}`,
|
|
6285
6272
|
}),
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
gridTemplateRows: '100vh',
|
|
6289
|
-
insetInlineEnd: 'auto', // to have correct dialog dimensions for ideal transitions
|
|
6273
|
+
'&::backdrop': {
|
|
6274
|
+
display: 'none',
|
|
6290
6275
|
},
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6276
|
+
},
|
|
6277
|
+
slot: {
|
|
6278
|
+
[mediaQueryMobile]: {
|
|
6279
|
+
display: 'contents',
|
|
6280
|
+
...(!isSecondaryScrollerVisible && {
|
|
6281
|
+
zIndex: 0,
|
|
6282
|
+
display: 'flex',
|
|
6283
|
+
flexDirection: 'column',
|
|
6284
|
+
gap: spacingFluidXSmall,
|
|
6285
|
+
gridArea: '4/2/auto/-2',
|
|
6286
|
+
height: 'fit-content', // ensures padding bottom is added instead of subtracted because of grid context
|
|
6287
|
+
paddingBlockEnd: spacingFluidLarge,
|
|
6288
|
+
...(isPrimary && {
|
|
6289
|
+
animation: getAnimation('slide-up-mobile', 'moderate', 'base'),
|
|
6290
|
+
}),
|
|
6294
6291
|
}),
|
|
6295
6292
|
},
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6293
|
+
[mediaQueryDesktop]: {
|
|
6294
|
+
display: 'flex',
|
|
6295
|
+
flexDirection: 'column',
|
|
6296
|
+
gap: isPrimary ? spacingFluidXSmall : spacingFluidMedium,
|
|
6297
|
+
gridArea: '2/2/auto/-2',
|
|
6298
|
+
height: 'fit-content', // ensures padding bottom is added instead of subtracted because of grid context
|
|
6299
|
+
paddingBlockEnd: spacingFluidLarge,
|
|
6300
|
+
...(isPrimary && {
|
|
6301
|
+
animation: getAnimation('slide-up-desktop', 'moderate', 'base'),
|
|
6302
|
+
}),
|
|
6300
6303
|
},
|
|
6301
6304
|
},
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6305
|
+
...(isSecondaryScrollerVisible && {
|
|
6306
|
+
'::slotted(*:not([primary],[secondary],[cascade]))': {
|
|
6307
|
+
[mediaQueryMobile]: {
|
|
6308
|
+
display: 'none',
|
|
6309
|
+
},
|
|
6310
|
+
},
|
|
6311
|
+
'::slotted(*:not([primary],[cascade]))': {
|
|
6312
|
+
[mediaQueryDesktop]: {
|
|
6313
|
+
...(!isPrimary && {
|
|
6314
|
+
display: 'none',
|
|
6315
|
+
}),
|
|
6316
|
+
},
|
|
6317
|
+
},
|
|
6314
6318
|
}),
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6319
|
+
},
|
|
6320
|
+
drawer: {
|
|
6321
|
+
position: 'absolute',
|
|
6322
|
+
inset: 0,
|
|
6323
|
+
display: 'grid',
|
|
6324
|
+
...(isOpen
|
|
6325
|
+
? {
|
|
6326
|
+
opacity: 1,
|
|
6327
|
+
transform: 'translate3d(0,0,0)',
|
|
6328
|
+
transition: `${getTransition('opacity', dialogDurationOpen, easingOpen)}, ${getTransition('transform', dialogDurationOpen, easingOpen)}`,
|
|
6329
|
+
}
|
|
6330
|
+
: {
|
|
6331
|
+
opacity: 0,
|
|
6332
|
+
transform: 'translate3d(-100%,0,0)',
|
|
6333
|
+
transition: `${getTransition('opacity', dialogDurationClose, easingClose)}, ${getTransition('transform', dialogDurationClose, easingClose)}`,
|
|
6334
|
+
'&:dir(rtl)': {
|
|
6335
|
+
transform: 'translate3d(100%,0,0)',
|
|
6336
|
+
},
|
|
6337
|
+
}),
|
|
6338
|
+
[mediaQueryMobile]: {
|
|
6339
|
+
gridTemplate: `${spacingFluidMedium} auto ${spacingFluidLarge} minmax(0, 1fr)/${spacingFluidLarge} auto minmax(0, 1fr) auto ${spacingFluidLarge}`,
|
|
6340
|
+
background: backgroundColor,
|
|
6341
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6342
|
+
background: backgroundColorDark,
|
|
6343
|
+
}),
|
|
6318
6344
|
},
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
position: 'sticky',
|
|
6324
|
-
top: 0,
|
|
6325
|
-
zIndex: 1,
|
|
6326
|
-
height: frostedGlassHeaderHeight,
|
|
6327
|
-
backgroundColor: frostedGlassBackgroundColor,
|
|
6328
|
-
WebkitBackdropFilter: 'blur(8px)',
|
|
6329
|
-
backdropFilter: 'blur(8px)', // with current frostedGlassStyle of blur(32px) scrolling becomes visually distracting
|
|
6345
|
+
[mediaQueryDesktop]: {
|
|
6346
|
+
width: isSecondaryScrollerVisible ? `calc(${scrollerWidthDesktop} * 2)` : scrollerWidthDesktop,
|
|
6347
|
+
gridTemplate: `${spacingFluidMedium} minmax(0, 1fr)/repeat(${isSecondaryScrollerVisible ? 2 : 1}, ${spacingFluidLarge} minmax(0, 1fr) ${spacingFluidLarge})`,
|
|
6348
|
+
background: backgroundColor,
|
|
6330
6349
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6331
|
-
|
|
6350
|
+
background: backgroundColorDark,
|
|
6332
6351
|
}),
|
|
6333
|
-
|
|
6334
|
-
|
|
6352
|
+
...(isSecondaryScrollerVisible && {
|
|
6353
|
+
background: `linear-gradient(90deg,${backgroundColor} 0%,${backgroundColor} 50%,${backgroundSurfaceColor} 50%,${backgroundSurfaceColor} 100%)`,
|
|
6354
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6355
|
+
background: `linear-gradient(90deg,${backgroundColorDark} 0%,${backgroundColorDark} 50%,${backgroundSurfaceColorDark} 50%,${backgroundSurfaceColorDark} 100%)`,
|
|
6356
|
+
}),
|
|
6357
|
+
'&:dir(rtl)': {
|
|
6358
|
+
background: `linear-gradient(90deg,${backgroundSurfaceColor} 0%,${backgroundSurfaceColor} 50%,${backgroundColor} 50%,${backgroundColor} 100%)`,
|
|
6359
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6360
|
+
background: `linear-gradient(90deg,${backgroundSurfaceColorDark} 0%,${backgroundSurfaceColorDark} 50%,${backgroundColorDark} 50%,${backgroundColorDark} 100%)`,
|
|
6361
|
+
}),
|
|
6362
|
+
},
|
|
6363
|
+
}),
|
|
6364
|
+
},
|
|
6365
|
+
'&::before, &::after': {
|
|
6366
|
+
content: '""',
|
|
6367
|
+
position: 'relative',
|
|
6368
|
+
zIndex: 2,
|
|
6369
|
+
pointerEvents: 'none',
|
|
6370
|
+
opacity: 0,
|
|
6371
|
+
},
|
|
6372
|
+
'&::before': {
|
|
6373
|
+
[mediaQueryMobile]: {
|
|
6374
|
+
gridArea: '1/1/-1/-1',
|
|
6375
|
+
background: backgroundColor,
|
|
6376
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6377
|
+
background: backgroundColorDark,
|
|
6378
|
+
}),
|
|
6379
|
+
},
|
|
6380
|
+
[mediaQueryDesktop]: {
|
|
6381
|
+
gridArea: '1/1/-1/4',
|
|
6382
|
+
background: backgroundColor,
|
|
6383
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6384
|
+
background: backgroundColorDark,
|
|
6385
|
+
}),
|
|
6386
|
+
},
|
|
6387
|
+
},
|
|
6388
|
+
'&::after': {
|
|
6389
|
+
[mediaQueryMobile]: {
|
|
6390
|
+
gridArea: '1/1/-1/-1',
|
|
6391
|
+
background: backgroundColor,
|
|
6392
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6393
|
+
background: backgroundColorDark,
|
|
6394
|
+
}),
|
|
6395
|
+
},
|
|
6396
|
+
[mediaQueryDesktop]: {
|
|
6397
|
+
gridArea: '1/4/-1/-1',
|
|
6398
|
+
background: backgroundSurfaceColor,
|
|
6399
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6400
|
+
background: backgroundSurfaceColorDark,
|
|
6401
|
+
}),
|
|
6335
6402
|
},
|
|
6336
6403
|
},
|
|
6337
6404
|
},
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6405
|
+
scroller: {
|
|
6406
|
+
[mediaQueryMobile]: {
|
|
6407
|
+
display: 'contents',
|
|
6408
|
+
...(!isSecondaryScrollerVisible && {
|
|
6409
|
+
gridArea: '1/1/-1/-1',
|
|
6410
|
+
display: 'grid',
|
|
6411
|
+
gridTemplateRows: 'subgrid',
|
|
6412
|
+
gridTemplateColumns: 'subgrid',
|
|
6413
|
+
overflow: 'hidden auto',
|
|
6414
|
+
// overscrollBehaviorY: 'none', // when defined, rubber band effect on iOS 18 scroll is getting lost
|
|
6415
|
+
scrollBehavior: 'smooth',
|
|
6416
|
+
WebkitOverflowScrolling: 'touch',
|
|
6417
|
+
'&::before': {
|
|
6418
|
+
content: '""',
|
|
6419
|
+
position: 'sticky',
|
|
6420
|
+
top: 0,
|
|
6421
|
+
gridArea: '1/1/4/-1',
|
|
6422
|
+
zIndex: 1,
|
|
6423
|
+
background: `linear-gradient(180deg,${backgroundColor} 0%,${backgroundColor} 65%,transparent 100%)`,
|
|
6424
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6425
|
+
background: `linear-gradient(180deg,${backgroundColorDark} 0%,${backgroundColorDark} 65%,transparent 100%)`,
|
|
6426
|
+
}),
|
|
6427
|
+
},
|
|
6428
|
+
}),
|
|
6429
|
+
},
|
|
6430
|
+
[mediaQueryDesktop]: {
|
|
6431
|
+
gridArea: '1/1/-1/4',
|
|
6432
|
+
display: 'grid',
|
|
6433
|
+
gridTemplateRows: 'subgrid',
|
|
6434
|
+
gridTemplateColumns: 'subgrid',
|
|
6435
|
+
overflow: 'hidden auto',
|
|
6436
|
+
// overscrollBehaviorY: 'none', // when defined, rubber band effect on iOS 18 scroll is getting lost
|
|
6437
|
+
scrollBehavior: 'smooth',
|
|
6438
|
+
WebkitOverflowScrolling: 'touch',
|
|
6345
6439
|
},
|
|
6346
6440
|
},
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
marginInlineEnd: 0,
|
|
6360
|
-
gridArea: '1/-1',
|
|
6361
|
-
placeSelf: 'flex-start',
|
|
6441
|
+
'dismiss-mobile': {
|
|
6442
|
+
[mediaQueryMobile]: {
|
|
6443
|
+
...dismissButtonJssStyle,
|
|
6444
|
+
width: 'fit-content',
|
|
6445
|
+
height: 'fit-content',
|
|
6446
|
+
placeSelf: 'center flex-end',
|
|
6447
|
+
gridArea: '2/4',
|
|
6448
|
+
zIndex: 3, // ensures dismiss button is on top of opacity animation handled by ::before/::after
|
|
6449
|
+
marginInlineEnd: '-1px', // improve visual alignment and compensate white space of close icon
|
|
6450
|
+
},
|
|
6451
|
+
[mediaQueryDesktop]: {
|
|
6452
|
+
display: 'none',
|
|
6362
6453
|
},
|
|
6363
6454
|
},
|
|
6364
|
-
dismiss: {
|
|
6365
|
-
|
|
6366
|
-
|
|
6455
|
+
'dismiss-desktop': {
|
|
6456
|
+
[mediaQueryMobile]: {
|
|
6457
|
+
display: 'none',
|
|
6458
|
+
},
|
|
6459
|
+
[mediaQueryDesktop]: {
|
|
6367
6460
|
'--p-internal-icon-filter': 'invert(1)',
|
|
6368
|
-
|
|
6461
|
+
position: 'absolute',
|
|
6462
|
+
insetInlineStart: `calc(100% + ${spacingFluidSmall})`,
|
|
6463
|
+
insetBlockStart: spacingFluidSmall,
|
|
6369
6464
|
padding: spacingStaticSmall,
|
|
6370
6465
|
},
|
|
6371
6466
|
},
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6467
|
+
back: {
|
|
6468
|
+
display: 'none',
|
|
6469
|
+
...(isSecondaryScrollerVisible && {
|
|
6470
|
+
[mediaQueryMobile]: {
|
|
6471
|
+
display: 'block',
|
|
6472
|
+
gridArea: '2/2',
|
|
6473
|
+
width: 'fit-content',
|
|
6474
|
+
height: 'fit-content',
|
|
6475
|
+
placeSelf: 'center flex-start',
|
|
6476
|
+
zIndex: 2,
|
|
6477
|
+
},
|
|
6478
|
+
}),
|
|
6382
6479
|
},
|
|
6383
|
-
};
|
|
6480
|
+
});
|
|
6384
6481
|
};
|
|
6385
6482
|
|
|
6386
|
-
const
|
|
6387
|
-
const
|
|
6388
|
-
const
|
|
6389
|
-
const { primaryColor, backgroundSurfaceColor, hoverColor } = getThemedColors(theme);
|
|
6390
|
-
const { primaryColor: primaryColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, hoverColor: hoverColorDark, } = getThemedColors('dark');
|
|
6391
|
-
const frostedGlassBackgroundColor = isThemeDark(theme)
|
|
6392
|
-
? frostedGlassBackgroundColorDark
|
|
6393
|
-
: frostedGlassBackgroundColorLight;
|
|
6394
|
-
const fadeInOutTransition = isSecondaryScrollerVisible
|
|
6395
|
-
? {
|
|
6396
|
-
opacity: 1,
|
|
6397
|
-
transition: `${getTransition('opacity', 'veryLong', 'in', 'short')}`,
|
|
6398
|
-
[mediaQueryEnhancedView]: {
|
|
6399
|
-
transition: `${getTransition('opacity', 'veryLong', 'in')}`,
|
|
6400
|
-
},
|
|
6401
|
-
}
|
|
6402
|
-
: {
|
|
6403
|
-
opacity: 0,
|
|
6404
|
-
transition: `${getTransition('opacity', 'short', 'out')}`,
|
|
6405
|
-
};
|
|
6483
|
+
const getComponentCss$S = (isPrimary, isSecondary, isCascade, theme) => {
|
|
6484
|
+
const { primaryColor, backgroundColor } = getThemedColors(theme);
|
|
6485
|
+
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
|
|
6406
6486
|
return getCss({
|
|
6407
6487
|
'@global': {
|
|
6488
|
+
'@keyframes slide-up-mobile': {
|
|
6489
|
+
from: { transform: `translate3d(0,${spacingFluidMedium},0)` },
|
|
6490
|
+
to: { transform: 'translate3d(0,0,0)' },
|
|
6491
|
+
},
|
|
6492
|
+
'@keyframes slide-up-desktop-primary': {
|
|
6493
|
+
from: { marginBlockStart: spacingFluidMedium },
|
|
6494
|
+
to: { marginBlockStart: '0px' },
|
|
6495
|
+
},
|
|
6496
|
+
'@keyframes slide-up-desktop-secondary': {
|
|
6497
|
+
from: { marginBlockStart: spacingFluidMedium },
|
|
6498
|
+
to: { marginBlockStart: '0px' },
|
|
6499
|
+
},
|
|
6408
6500
|
':host': {
|
|
6409
|
-
display: '
|
|
6501
|
+
display: 'contents',
|
|
6410
6502
|
...addImportantToEachRule({
|
|
6411
6503
|
...colorSchemeStyles,
|
|
6412
6504
|
...hostHiddenStyles,
|
|
6413
6505
|
}),
|
|
6414
6506
|
},
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
margin: 0,
|
|
6431
|
-
color: primaryColor,
|
|
6432
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6433
|
-
color: primaryColorDark,
|
|
6507
|
+
slot: {
|
|
6508
|
+
display: 'none',
|
|
6509
|
+
[mediaQueryMobile]: {
|
|
6510
|
+
...(isSecondary && {
|
|
6511
|
+
zIndex: 0,
|
|
6512
|
+
display: 'flex',
|
|
6513
|
+
flexDirection: 'column',
|
|
6514
|
+
gap: spacingFluidXSmall,
|
|
6515
|
+
gridArea: '4/2/auto/-2',
|
|
6516
|
+
height: 'fit-content', // ensures padding bottom is added instead of subtracted because of grid context
|
|
6517
|
+
paddingBlockEnd: spacingFluidLarge,
|
|
6518
|
+
animation: getAnimation('slide-up-mobile', 'moderate', 'base'),
|
|
6519
|
+
}),
|
|
6520
|
+
...((isPrimary || isCascade) && {
|
|
6521
|
+
display: 'contents',
|
|
6434
6522
|
}),
|
|
6435
6523
|
},
|
|
6436
|
-
|
|
6437
|
-
...{
|
|
6438
|
-
|
|
6439
|
-
|
|
6524
|
+
[mediaQueryDesktop]: {
|
|
6525
|
+
...((isPrimary || isSecondary) && {
|
|
6526
|
+
display: 'flex',
|
|
6527
|
+
flexDirection: 'column',
|
|
6528
|
+
gap: spacingFluidXSmall,
|
|
6529
|
+
height: 'fit-content', // ensures padding bottom is added instead of subtracted because of grid context
|
|
6530
|
+
animation: getAnimation(`slide-up-desktop-${isPrimary ? 'primary' : 'secondary'}`, 'moderate', 'base'),
|
|
6531
|
+
}),
|
|
6532
|
+
...(isSecondary && {
|
|
6533
|
+
gridArea: '2/2/auto/-2',
|
|
6534
|
+
paddingBlockEnd: spacingFluidLarge,
|
|
6535
|
+
}),
|
|
6536
|
+
...(isCascade && {
|
|
6537
|
+
display: 'contents',
|
|
6538
|
+
}),
|
|
6539
|
+
},
|
|
6540
|
+
},
|
|
6541
|
+
h2: {
|
|
6542
|
+
display: 'none',
|
|
6543
|
+
[mediaQueryMobile]: {
|
|
6544
|
+
...(isSecondary && {
|
|
6545
|
+
...headingSmallStyle,
|
|
6440
6546
|
display: 'block',
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6547
|
+
gridArea: '2/3',
|
|
6548
|
+
placeSelf: 'center',
|
|
6549
|
+
zIndex: 2,
|
|
6550
|
+
margin: 0,
|
|
6551
|
+
paddingInline: spacingStaticMedium,
|
|
6552
|
+
maxWidth: '100%',
|
|
6553
|
+
boxSizing: 'border-box',
|
|
6554
|
+
whiteSpace: 'nowrap',
|
|
6555
|
+
overflow: 'hidden',
|
|
6556
|
+
textOverflow: 'ellipsis',
|
|
6557
|
+
color: primaryColor, // enables color inheritance for slotted content
|
|
6449
6558
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6450
6559
|
color: primaryColorDark,
|
|
6451
6560
|
}),
|
|
6561
|
+
}),
|
|
6562
|
+
},
|
|
6563
|
+
},
|
|
6564
|
+
// If cascade we need to hide all children which are not primary or another cascade (e.g. all siblings of the primary or cascade item)
|
|
6565
|
+
...(isCascade && {
|
|
6566
|
+
'::slotted(*:not([primary],[cascade]))': {
|
|
6567
|
+
display: 'none',
|
|
6568
|
+
},
|
|
6569
|
+
}),
|
|
6570
|
+
...(isPrimary && {
|
|
6571
|
+
'::slotted(*:not([secondary]))': {
|
|
6572
|
+
[mediaQueryMobile]: {
|
|
6573
|
+
display: 'none',
|
|
6452
6574
|
},
|
|
6453
6575
|
},
|
|
6454
|
-
|
|
6455
|
-
|
|
6576
|
+
}),
|
|
6577
|
+
'::slotted': {
|
|
6578
|
+
'&(a)': {
|
|
6579
|
+
all: 'unset',
|
|
6580
|
+
alignSelf: 'flex-start',
|
|
6581
|
+
font: textMediumStyle.font,
|
|
6582
|
+
cursor: 'pointer',
|
|
6583
|
+
borderRadius: borderRadiusSmall,
|
|
6584
|
+
padding: addImportantToRule(spacingFluidSmall),
|
|
6585
|
+
marginInline: addImportantToRule(`calc(${spacingFluidSmall} * -1)`),
|
|
6586
|
+
color: primaryColor,
|
|
6587
|
+
textDecoration: 'underline',
|
|
6588
|
+
textDecorationColor: 'transparent',
|
|
6589
|
+
transition: `${getTransition('text-decoration-color')}`,
|
|
6456
6590
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6457
|
-
|
|
6591
|
+
color: primaryColorDark,
|
|
6458
6592
|
}),
|
|
6459
6593
|
},
|
|
6594
|
+
'&(a[aria-current])': {
|
|
6595
|
+
textDecoration: 'underline',
|
|
6596
|
+
},
|
|
6460
6597
|
...hoverMediaQuery({
|
|
6461
|
-
// TODO: how can we easily re-use getHoverStyle() with ::slotted(a) selector?
|
|
6462
6598
|
'&(a:hover)': {
|
|
6463
|
-
|
|
6464
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6465
|
-
background: hoverColorDark,
|
|
6466
|
-
}),
|
|
6599
|
+
textDecorationColor: 'inherit',
|
|
6467
6600
|
},
|
|
6468
6601
|
}),
|
|
6469
6602
|
...getFocusJssStyle(theme, { slotted: 'a', offset: '-2px' }),
|
|
6470
|
-
}
|
|
6603
|
+
},
|
|
6604
|
+
...preventFoucOfNestedElementsStyles,
|
|
6471
6605
|
},
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6606
|
+
// drawer subgrid in combination with scroller grid ensures no content squeezing during slide up animation, potentially caused by scrollbar
|
|
6607
|
+
drawer: {
|
|
6608
|
+
[mediaQueryMobile]: {
|
|
6609
|
+
display: 'none',
|
|
6610
|
+
...((isPrimary || isSecondary || isCascade) && {
|
|
6611
|
+
display: 'contents',
|
|
6612
|
+
}),
|
|
6613
|
+
},
|
|
6614
|
+
[mediaQueryDesktop]: {
|
|
6615
|
+
display: 'none',
|
|
6616
|
+
...(isSecondary && {
|
|
6617
|
+
position: 'absolute', // enables to break out of scroll area
|
|
6618
|
+
inset: 0,
|
|
6619
|
+
insetInlineStart: scrollerWidthDesktop,
|
|
6620
|
+
display: 'grid',
|
|
6621
|
+
gridTemplate: `${spacingFluidMedium} minmax(0, 1fr)/${spacingFluidLarge} minmax(0, 1fr) ${spacingFluidLarge}`,
|
|
6622
|
+
}),
|
|
6623
|
+
...((isPrimary || isCascade) && {
|
|
6624
|
+
display: 'contents',
|
|
6625
|
+
}),
|
|
6626
|
+
},
|
|
6476
6627
|
},
|
|
6477
6628
|
scroller: {
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6486
|
-
//
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6629
|
+
[mediaQueryMobile]: {
|
|
6630
|
+
display: 'none',
|
|
6631
|
+
...(isSecondary && {
|
|
6632
|
+
display: 'grid',
|
|
6633
|
+
gridTemplateRows: 'subgrid',
|
|
6634
|
+
gridTemplateColumns: 'subgrid',
|
|
6635
|
+
gridArea: '1/1/-1/-1',
|
|
6636
|
+
overflow: 'hidden auto',
|
|
6637
|
+
// overscrollBehaviorY: 'none', // when defined, rubber band effect on iOS 18 scroll is getting lost
|
|
6638
|
+
scrollBehavior: 'smooth',
|
|
6639
|
+
WebkitOverflowScrolling: 'touch',
|
|
6640
|
+
'&::before': {
|
|
6641
|
+
zIndex: 1,
|
|
6642
|
+
content: '""',
|
|
6643
|
+
position: 'sticky',
|
|
6644
|
+
top: 0,
|
|
6645
|
+
gridArea: '1/1/4/-1',
|
|
6646
|
+
background: `linear-gradient(180deg,${backgroundColor} 0%,${backgroundColor} 65%,transparent 100%)`,
|
|
6647
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6648
|
+
background: `linear-gradient(180deg,${backgroundColorDark} 0%,${backgroundColorDark} 65%,transparent 100%)`,
|
|
6649
|
+
}),
|
|
6650
|
+
},
|
|
6651
|
+
}),
|
|
6652
|
+
...((isPrimary || isCascade) && {
|
|
6653
|
+
display: 'contents',
|
|
6495
6654
|
}),
|
|
6496
|
-
width: '100vw',
|
|
6497
|
-
boxSizing: 'border-box',
|
|
6498
|
-
overflow: 'auto',
|
|
6499
|
-
...dropShadowHighStyle,
|
|
6500
|
-
// it's important to define background-color for each scroller to have correct scrollbar coloring
|
|
6501
|
-
backgroundColor: backgroundSurfaceColor,
|
|
6502
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6503
|
-
backgroundColor: backgroundSurfaceColorDark,
|
|
6504
|
-
}),
|
|
6505
|
-
[mediaQueryEnhancedView]: {
|
|
6506
|
-
boxShadow: 'none',
|
|
6507
|
-
insetInlineStart: `calc(${scrollerWidthEnhancedView} - 1px)`, // -1px prevents possible visible background under certain circumstances between primary and secondary scroller
|
|
6508
|
-
width: scrollerWidthEnhancedView,
|
|
6509
|
-
transform: addImportantToRule('initial'), // to overrule :dir(rtl) selector
|
|
6510
|
-
transition: `visibility 0s linear var(${cssVariableTransitionDuration},var(${cssVariableVisibilityTransitionDuration},0s))`,
|
|
6511
6655
|
},
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6656
|
+
[mediaQueryDesktop]: {
|
|
6657
|
+
display: 'none',
|
|
6658
|
+
...(isSecondary && {
|
|
6659
|
+
gridArea: '1/1/-1/-1',
|
|
6660
|
+
display: 'grid',
|
|
6661
|
+
gridTemplateRows: 'subgrid',
|
|
6662
|
+
gridTemplateColumns: 'subgrid',
|
|
6663
|
+
overflow: 'hidden auto',
|
|
6664
|
+
// overscrollBehaviorY: 'none', // when defined, rubber band effect on iOS 18 scroll is getting lost
|
|
6665
|
+
scrollBehavior: 'smooth',
|
|
6666
|
+
WebkitOverflowScrolling: 'touch',
|
|
6667
|
+
}),
|
|
6668
|
+
...((isPrimary || isCascade) && {
|
|
6669
|
+
display: 'contents',
|
|
6515
6670
|
}),
|
|
6516
6671
|
},
|
|
6517
6672
|
},
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
position: 'sticky',
|
|
6521
|
-
top: 0,
|
|
6522
|
-
zIndex: 1,
|
|
6523
|
-
height: frostedGlassHeaderHeight,
|
|
6524
|
-
padding: `0 ${spacingFluidLarge}`,
|
|
6525
|
-
display: 'grid',
|
|
6526
|
-
gridTemplateColumns: '4rem minmax(0, 1fr) 4rem',
|
|
6527
|
-
alignItems: 'center',
|
|
6528
|
-
gap: spacingFluidSmall,
|
|
6529
|
-
WebkitBackdropFilter: 'blur(8px)',
|
|
6530
|
-
backdropFilter: 'blur(8px)', // with current frostedGlassStyle of blur(32px) scrolling becomes visually distracting
|
|
6531
|
-
backgroundColor: frostedGlassBackgroundColor,
|
|
6532
|
-
...fadeInOutTransition,
|
|
6533
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6534
|
-
backgroundColor: frostedGlassBackgroundColorDark,
|
|
6535
|
-
}),
|
|
6536
|
-
[mediaQueryEnhancedView]: {
|
|
6673
|
+
button: {
|
|
6674
|
+
...((isPrimary || isCascade) && {
|
|
6537
6675
|
display: 'none',
|
|
6676
|
+
}),
|
|
6677
|
+
[mediaQueryMobile]: {
|
|
6678
|
+
...(isSecondary && {
|
|
6679
|
+
display: 'none',
|
|
6680
|
+
}),
|
|
6538
6681
|
},
|
|
6682
|
+
...(!isPrimary &&
|
|
6683
|
+
!isCascade && {
|
|
6684
|
+
padding: spacingFluidSmall,
|
|
6685
|
+
margin: `0 calc(${spacingFluidSmall} * -1)`,
|
|
6686
|
+
}),
|
|
6539
6687
|
},
|
|
6540
6688
|
back: {
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6689
|
+
...(!isPrimary && {
|
|
6690
|
+
display: 'none',
|
|
6691
|
+
}),
|
|
6692
|
+
...(isPrimary && {
|
|
6693
|
+
[mediaQueryMobile]: {
|
|
6694
|
+
gridArea: '2/2',
|
|
6695
|
+
width: 'fit-content',
|
|
6696
|
+
height: 'fit-content',
|
|
6697
|
+
placeSelf: 'center flex-start',
|
|
6698
|
+
zIndex: 2,
|
|
6699
|
+
},
|
|
6700
|
+
[mediaQueryDesktop]: {
|
|
6701
|
+
width: 'fit-content',
|
|
6702
|
+
height: 'fit-content',
|
|
6703
|
+
marginInlineStart: '-4px', // improve visual alignment and compensate white space of arrow-left icon
|
|
6704
|
+
},
|
|
6556
6705
|
}),
|
|
6557
6706
|
},
|
|
6558
|
-
content: mergeDeep(getContentJssStyle(), fadeInOutTransition),
|
|
6559
6707
|
});
|
|
6560
6708
|
};
|
|
6561
6709
|
|
|
@@ -7892,7 +8040,7 @@ const getComponentCss$D = (model, safeZone, size, color, theme) => {
|
|
|
7892
8040
|
maxWidth: '100%',
|
|
7893
8041
|
maxHeight: '100%',
|
|
7894
8042
|
// width + height style can't be !important atm to be backwards compatible with e.g. `<p-model-signature size="inherit" style="height: 50px"/>`
|
|
7895
|
-
width: `var(${cssVariableWidth},${isSizeInherit ? 'auto' : width
|
|
8043
|
+
width: `var(${cssVariableWidth},${isSizeInherit ? 'auto' : `${width}px`})`,
|
|
7896
8044
|
height: `var(${cssVariableHeight},auto)`,
|
|
7897
8045
|
...addImportantToEachRule({
|
|
7898
8046
|
mask: `url(${getSvgUrl(model)}) no-repeat left top / contain`,
|
|
@@ -8060,7 +8208,7 @@ const getSlottedTextFieldTextareaSelectStyles = (child, state, isLoading, theme,
|
|
|
8060
8208
|
}),
|
|
8061
8209
|
...additionalDefaultJssStyle,
|
|
8062
8210
|
},
|
|
8063
|
-
|
|
8211
|
+
'::slotted(:not(input[type="password"]))': {
|
|
8064
8212
|
textOverflow: 'ellipsis',
|
|
8065
8213
|
},
|
|
8066
8214
|
...(!isLoading &&
|
|
@@ -8608,7 +8756,7 @@ const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(sty
|
|
|
8608
8756
|
return [key, value];
|
|
8609
8757
|
}));
|
|
8610
8758
|
|
|
8611
|
-
const getComponentCss$x = (hideLabel, state, isDisabled, isLoading,
|
|
8759
|
+
const getComponentCss$x = (hideLabel, state, isDisabled, isLoading, length, theme) => {
|
|
8612
8760
|
const inputSize = `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`; // equivalent to calculation of input height within form-styles
|
|
8613
8761
|
const inputStyles = removeStyles('input[readonly]', removeSlottedSelector(getSlottedTextFieldTextareaSelectStyles('input', state, isLoading, theme, {
|
|
8614
8762
|
// TODO: move into getSlottedTextFieldTextareaSelectStyles()
|
|
@@ -8656,15 +8804,6 @@ const getComponentCss$x = (hideLabel, state, isDisabled, isLoading, isWithinForm
|
|
|
8656
8804
|
...preventFoucOfNestedElementsStyles,
|
|
8657
8805
|
// input
|
|
8658
8806
|
...inputStyles,
|
|
8659
|
-
...(isWithinForm &&
|
|
8660
|
-
addImportantToEachRule({
|
|
8661
|
-
'::slotted([slot=internal-input])': {
|
|
8662
|
-
position: 'absolute',
|
|
8663
|
-
height: inputSize,
|
|
8664
|
-
width: 0,
|
|
8665
|
-
opacity: 0,
|
|
8666
|
-
},
|
|
8667
|
-
})),
|
|
8668
8807
|
},
|
|
8669
8808
|
root: {
|
|
8670
8809
|
display: 'grid',
|
|
@@ -8854,7 +8993,6 @@ const getComponentCss$w = (direction, isNativePopoverCase, theme) => {
|
|
|
8854
8993
|
position: 'absolute',
|
|
8855
8994
|
zIndex: POPOVER_Z_INDEX,
|
|
8856
8995
|
filter: `drop-shadow(0 0 16px ${shadowColor})`,
|
|
8857
|
-
backdropFilter: 'drop-shadow(0px 0px 0px transparent)', // fixes issues with Chrome >= 105 where filter: drop-shadow is not applied correctly after animation ends
|
|
8858
8996
|
pointerEvents: 'none',
|
|
8859
8997
|
animation: `${motionDurationShort} $fadeIn ${motionEasingBase} forwards`
|
|
8860
8998
|
,
|
|
@@ -9128,7 +9266,13 @@ const getColors$2 = (isDisabled, isSelected, theme) => {
|
|
|
9128
9266
|
return {
|
|
9129
9267
|
buttonColor: isDisabled ? disabledColor : primaryColor,
|
|
9130
9268
|
labelColor: isDisabled ? disabledColor : contrastMediumColor,
|
|
9131
|
-
borderColor: isSelected
|
|
9269
|
+
borderColor: isSelected
|
|
9270
|
+
? isDisabled
|
|
9271
|
+
? disabledColor
|
|
9272
|
+
: isHighContrastMode
|
|
9273
|
+
? highlightColor
|
|
9274
|
+
: primaryColor
|
|
9275
|
+
: contrastLowColor,
|
|
9132
9276
|
hoverBorderColor: primaryColor,
|
|
9133
9277
|
};
|
|
9134
9278
|
};
|
|
@@ -9204,11 +9348,7 @@ const getComponentCss$t = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
9204
9348
|
}),
|
|
9205
9349
|
});
|
|
9206
9350
|
};
|
|
9207
|
-
|
|
9208
|
-
const MIN_ITEM_WIDTH = 46;
|
|
9209
|
-
const MAX_ITEM_WIDTH = 220;
|
|
9210
9351
|
const getComponentCss$s = (maxWidth, columns) => {
|
|
9211
|
-
maxWidth = (maxWidth > MAX_ITEM_WIDTH && MAX_ITEM_WIDTH) || (maxWidth < MIN_ITEM_WIDTH && MIN_ITEM_WIDTH) || maxWidth;
|
|
9212
9352
|
return getCss({
|
|
9213
9353
|
'@global': {
|
|
9214
9354
|
':host': {
|
|
@@ -9216,7 +9356,9 @@ const getComponentCss$s = (maxWidth, columns) => {
|
|
|
9216
9356
|
...addImportantToEachRule({
|
|
9217
9357
|
gridAutoRows: '1fr', // for equal height
|
|
9218
9358
|
...buildResponsiveStyles(columns, (col) => ({
|
|
9219
|
-
gridTemplateColumns: col === 'auto'
|
|
9359
|
+
gridTemplateColumns: col === 'auto'
|
|
9360
|
+
? `repeat(auto-fit, ${maxWidth}px)`
|
|
9361
|
+
: `repeat(${col}, minmax(0, 1fr))`,
|
|
9220
9362
|
})),
|
|
9221
9363
|
gap: '6px',
|
|
9222
9364
|
...colorSchemeStyles,
|
|
@@ -9396,7 +9538,7 @@ const getListStyles$1 = (direction, theme) => {
|
|
|
9396
9538
|
const { highlightColor } = getHighContrastColors();
|
|
9397
9539
|
return {
|
|
9398
9540
|
'@global': {
|
|
9399
|
-
|
|
9541
|
+
'[role="listbox"]': {
|
|
9400
9542
|
display: 'flex',
|
|
9401
9543
|
flexDirection: 'column',
|
|
9402
9544
|
gap: spacingStaticSmall,
|
|
@@ -9868,9 +10010,9 @@ const getComponentCss$o = (size, theme) => {
|
|
|
9868
10010
|
};
|
|
9869
10011
|
|
|
9870
10012
|
const getSVGPath = (stepCount, numberedCircleColors, isStateCurrent) => {
|
|
9871
|
-
// # of the
|
|
9872
|
-
|
|
9873
|
-
const { disabledColor, invertedBaseColor, primaryColor } =
|
|
10013
|
+
// # of the hex color starts a fragment identifier in URLs, so we have to replace it with the escaped value of # = %23
|
|
10014
|
+
const escapedNumberedCircleColors = Object.entries(numberedCircleColors).reduce((result, [key, value]) => ({ ...result, [key]: escapeHashCharacter(value) }), {});
|
|
10015
|
+
const { disabledColor, invertedBaseColor, primaryColor } = escapedNumberedCircleColors;
|
|
9874
10016
|
const fillColor = isStateCurrent ? invertedBaseColor : disabledColor;
|
|
9875
10017
|
const svgCirclePath = `<circle fill="${isStateCurrent ? primaryColor : 'none'}"${isStateCurrent ? '' : ` stroke="${fillColor}"`} stroke-width="1px" cx="12" cy="12" r="9"/>`;
|
|
9876
10018
|
// Full SVG is provided by design (./numbers_raw.svg), created with illustrator and optimized with ImageOptim.
|
|
@@ -9899,7 +10041,7 @@ const getComponentCss$n = (state, disabled, theme) => {
|
|
|
9899
10041
|
'@global': {
|
|
9900
10042
|
':host': {
|
|
9901
10043
|
...(isStateCurrentOrUndefined &&
|
|
9902
|
-
Array.from(Array(9)).reduce((result, _, i) => ({
|
|
10044
|
+
Array.from(new Array(9)).reduce((result, _, i) => ({
|
|
9903
10045
|
...result,
|
|
9904
10046
|
[`&(:nth-of-type(${i + 1})) $button::before`]: {
|
|
9905
10047
|
backgroundImage: getInlineSVGBackgroundImage(getSVGPath(i, {
|
|
@@ -10465,8 +10607,7 @@ const getComponentCss$d = (size, weight, theme) => {
|
|
|
10465
10607
|
},
|
|
10466
10608
|
// conditionally applied and removed based on if activeTabIndex exists
|
|
10467
10609
|
[scrollerAnimatedCssClass]: {
|
|
10468
|
-
['
|
|
10469
|
-
transformSelector('::slotted([role][aria-selected="true"])::after, ::slotted([role][aria-current="true"])::after')]: {
|
|
10610
|
+
[`& ${transformSelector('::slotted([role][aria-selected="true"])::after, ::slotted([role][aria-current="true"])::after')}`]: {
|
|
10470
10611
|
transition: addImportantToRule(`visibility 0s linear var(${cssVariableTransitionDuration}, ${motionDurationModerate})`), // bar appears after transition
|
|
10471
10612
|
},
|
|
10472
10613
|
},
|
|
@@ -10787,6 +10928,9 @@ const getComponentCss$8 = (isDisabled, hideLabel, state, hasUnitOrVisibleCounter
|
|
|
10787
10928
|
'&(input:-internal-autofill-selected),&(input:-internal-autofill-previewed),&(input:-webkit-autofill),&(input:-webkit-autofill:focus)': {
|
|
10788
10929
|
WebkitBackgroundClip: 'padding-box', // reset webkit autofill styles
|
|
10789
10930
|
},
|
|
10931
|
+
'&(input[type="email"]),&(input[type="tel"])': {
|
|
10932
|
+
direction: 'ltr', // fixes specific input types in RTL mode. Should always be LTR. See https://rtlstyling.com/posts/rtl-styling#form-inputs
|
|
10933
|
+
},
|
|
10790
10934
|
},
|
|
10791
10935
|
}),
|
|
10792
10936
|
},
|
|
@@ -11085,7 +11229,7 @@ const getComponentCss$3 = (isDisabled, hideLabel, state, hasCounter, resize, the
|
|
|
11085
11229
|
},
|
|
11086
11230
|
...hoverMediaQuery({
|
|
11087
11231
|
// with the media query the selector has higher priority and overrides disabled styles
|
|
11088
|
-
|
|
11232
|
+
'textarea:not(:disabled):not(:focus):not([readonly]):hover,label:hover~.wrapper textarea:not(:disabled):not(:focus):not([readonly])': {
|
|
11089
11233
|
borderColor: formStateHoverColor || primaryColor,
|
|
11090
11234
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
11091
11235
|
borderColor: formStateHoverColorDark || primaryColorDark,
|