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