@porsche-design-system/components-react 3.29.0-rc.3 → 3.29.0-rc.4
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 +25 -0
- package/cjs/lib/components/fieldset.wrapper.cjs +3 -3
- package/cjs/lib/components/flag.wrapper.cjs +26 -0
- package/cjs/lib/components/input-date.wrapper.cjs +29 -0
- package/cjs/lib/components/input-tel.wrapper.cjs +29 -0
- package/cjs/lib/components/input-time.wrapper.cjs +29 -0
- package/cjs/lib/components/input-url.wrapper.cjs +29 -0
- package/cjs/lib/components/multi-select.wrapper.cjs +3 -3
- package/cjs/lib/components/scroller.wrapper.cjs +1 -1
- package/cjs/lib/components/tabs-bar.wrapper.cjs +1 -1
- package/cjs/lib/components/tabs.wrapper.cjs +1 -1
- package/cjs/public-api.cjs +10 -0
- package/esm/lib/components/fieldset.wrapper.d.ts +9 -1
- package/esm/lib/components/fieldset.wrapper.mjs +3 -3
- package/esm/lib/components/flag.wrapper.d.ts +30 -0
- package/esm/lib/components/flag.wrapper.mjs +24 -0
- package/esm/lib/components/index.d.ts +5 -0
- package/esm/lib/components/input-date.wrapper.d.ts +176 -0
- package/esm/lib/components/input-date.wrapper.mjs +27 -0
- package/esm/lib/components/input-email.wrapper.d.ts +2 -2
- package/esm/lib/components/input-number.wrapper.d.ts +2 -2
- package/esm/lib/components/input-password.wrapper.d.ts +2 -2
- package/esm/lib/components/input-tel.wrapper.d.ts +192 -0
- package/esm/lib/components/input-tel.wrapper.mjs +27 -0
- package/esm/lib/components/input-time.wrapper.d.ts +176 -0
- package/esm/lib/components/input-time.wrapper.mjs +27 -0
- package/esm/lib/components/input-url.wrapper.d.ts +192 -0
- package/esm/lib/components/input-url.wrapper.mjs +27 -0
- package/esm/lib/components/multi-select.wrapper.d.ts +8 -0
- package/esm/lib/components/multi-select.wrapper.mjs +3 -3
- package/esm/lib/components/scroller.wrapper.d.ts +4 -4
- package/esm/lib/components/scroller.wrapper.mjs +1 -1
- package/esm/lib/components/tabs-bar.wrapper.d.ts +4 -4
- package/esm/lib/components/tabs-bar.wrapper.mjs +1 -1
- package/esm/lib/components/tabs.wrapper.d.ts +2 -2
- package/esm/lib/components/tabs.wrapper.mjs +1 -1
- package/esm/lib/types.d.ts +149 -14
- package/esm/public-api.mjs +5 -0
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +532 -515
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +46 -35
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/flag.wrapper.cjs +36 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-tel.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.cjs +40 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.cjs +3 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flag.cjs +17 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.cjs +44 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.cjs +43 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.cjs +44 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.cjs +43 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +15 -6
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/no-results-option.cjs +9 -0
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.cjs +1 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +8 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/public-api.cjs +10 -0
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +492 -481
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +42 -34
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/fieldset.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/flag.wrapper.mjs +34 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-date.wrapper.mjs +38 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-tel.wrapper.mjs +38 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-time.wrapper.mjs +38 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/input-url.wrapper.mjs +38 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/multi-select.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/accordion.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-group.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-tile.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/canvas.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/checkbox.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/content-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/crest.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown-link.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/drilldown.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset-wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/fieldset.mjs +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flag.mjs +15 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flex.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/flyout.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid-item.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/grid.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/inline-notification.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-base.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-date.mjs +42 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-email.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-number.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-password.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-search.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-tel.mjs +41 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-text.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-time.mjs +42 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/input-url.mjs +41 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +18 -9
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/no-results-option.mjs +7 -0
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/optgroup.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +1 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +9 -6
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/textarea.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/public-api.mjs +5 -0
- package/ssr/esm/lib/components/fieldset.wrapper.d.ts +9 -1
- package/ssr/esm/lib/components/flag.wrapper.d.ts +30 -0
- package/ssr/esm/lib/components/index.d.ts +5 -0
- package/ssr/esm/lib/components/input-date.wrapper.d.ts +176 -0
- package/ssr/esm/lib/components/input-email.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/input-number.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/input-password.wrapper.d.ts +2 -2
- package/ssr/esm/lib/components/input-tel.wrapper.d.ts +192 -0
- package/ssr/esm/lib/components/input-time.wrapper.d.ts +176 -0
- package/ssr/esm/lib/components/input-url.wrapper.d.ts +192 -0
- package/ssr/esm/lib/components/multi-select.wrapper.d.ts +8 -0
- package/ssr/esm/lib/components/scroller.wrapper.d.ts +4 -4
- package/ssr/esm/lib/components/tabs-bar.wrapper.d.ts +4 -4
- package/ssr/esm/lib/components/tabs.wrapper.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/flag.d.ts +5 -0
- package/ssr/esm/lib/dsr-components/input-base.d.ts +2 -2
- package/ssr/esm/lib/dsr-components/input-date.d.ts +19 -0
- package/ssr/esm/lib/dsr-components/input-tel.d.ts +19 -0
- package/ssr/esm/lib/dsr-components/input-time.d.ts +19 -0
- package/ssr/esm/lib/dsr-components/input-url.d.ts +19 -0
- package/ssr/esm/lib/dsr-components/multi-select.d.ts +5 -1
- package/ssr/esm/lib/dsr-components/no-results-option.d.ts +2 -0
- package/ssr/esm/lib/dsr-components/select.d.ts +4 -1
- package/ssr/esm/lib/types.d.ts +149 -14
|
@@ -3884,6 +3884,12 @@ const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-des
|
|
|
3884
3884
|
// index.ts
|
|
3885
3885
|
var MODEL_SIGNATURES_MANIFEST = { "718": { "src": "718.493a9e3.svg", "width": 79, "height": 26 }, "911": { "src": "911.b68f913.svg", "width": 94, "height": 25 }, "boxster": { "src": "boxster.c321738.svg", "width": 239, "height": 26 }, "cayenne": { "src": "cayenne.2556201.svg", "width": 245, "height": 35 }, "cayman": { "src": "cayman.cc89196.svg", "width": 229, "height": 35 }, "macan": { "src": "macan.a1844f4.svg", "width": 196, "height": 26 }, "panamera": { "src": "panamera.6dae809.svg", "width": 260, "height": 25 }, "taycan": { "src": "taycan.df444c6.svg", "width": 167, "height": 36 }, "turbo-s": { "src": "turbo-s.73f1e10.svg", "width": 199, "height": 25 }, "turbo": { "src": "turbo.6a4084a.svg", "width": 143, "height": 25 } };
|
|
3886
3886
|
|
|
3887
|
+
const hasDocument = typeof document !== 'undefined';
|
|
3888
|
+
|
|
3889
|
+
const hasShowPickerSupport = () => (hasDocument &&
|
|
3890
|
+
'showPicker' in HTMLInputElement.prototype &&
|
|
3891
|
+
CSS.supports('selector(::-webkit-calendar-picker-indicator)'));
|
|
3892
|
+
|
|
3887
3893
|
/**
|
|
3888
3894
|
* Applies a style only on Chromium based browsers by using a media query which is only supported there.
|
|
3889
3895
|
* https://browserstack.com/guide/create-browser-specific-css
|
|
@@ -3895,8 +3901,6 @@ const supportsChromiumMediaQuery = (style) => ({
|
|
|
3895
3901
|
'@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: 0.001dpcm)': style,
|
|
3896
3902
|
});
|
|
3897
3903
|
|
|
3898
|
-
const hasDocument = typeof document !== 'undefined';
|
|
3899
|
-
|
|
3900
3904
|
const isThemeAuto = (theme) => {
|
|
3901
3905
|
return theme === 'auto';
|
|
3902
3906
|
};
|
|
@@ -3921,7 +3925,7 @@ const formatObjectOutput = (value) => {
|
|
|
3921
3925
|
|
|
3922
3926
|
const OPTION_LIST_SAFE_ZONE = 6;
|
|
3923
3927
|
|
|
3924
|
-
const getComponentCss$
|
|
3928
|
+
const getComponentCss$1l = (size, compact, open, theme, sticky) => {
|
|
3925
3929
|
const { primaryColor, hoverColor, contrastLowColor, backgroundColor } = getThemedColors(theme);
|
|
3926
3930
|
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, backgroundColor: backgroundColorDark, } = getThemedColors('dark');
|
|
3927
3931
|
const cssVariablePositionStickyTop = '--p-accordion-position-sticky-top';
|
|
@@ -4093,7 +4097,7 @@ const cssVariableTop = '--p-banner-position-top';
|
|
|
4093
4097
|
const cssVariableBottom = '--p-banner-position-bottom';
|
|
4094
4098
|
const cssVariableZIndex = '--p-internal-banner-z-index';
|
|
4095
4099
|
const topBottomFallback = '56px';
|
|
4096
|
-
const getComponentCss$
|
|
4100
|
+
const getComponentCss$1k = (isOpen) => {
|
|
4097
4101
|
return getCss({
|
|
4098
4102
|
'@global': {
|
|
4099
4103
|
':host': {
|
|
@@ -4165,7 +4169,7 @@ const getGroupDirectionJssStyles = (direction) => {
|
|
|
4165
4169
|
return groupDirectionJssStyles[direction];
|
|
4166
4170
|
};
|
|
4167
4171
|
|
|
4168
|
-
const getComponentCss$
|
|
4172
|
+
const getComponentCss$1j = (direction) => {
|
|
4169
4173
|
return getCss({
|
|
4170
4174
|
'@global': {
|
|
4171
4175
|
':host': {
|
|
@@ -4318,7 +4322,7 @@ const getFunctionalComponentLoadingMessageStyles = () => {
|
|
|
4318
4322
|
};
|
|
4319
4323
|
};
|
|
4320
4324
|
|
|
4321
|
-
const getComponentCss$
|
|
4325
|
+
const getComponentCss$1i = (icon, iconSource, active, isLoading, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, underline, theme) => {
|
|
4322
4326
|
const hasIcon = hasVisibleIcon(icon, iconSource);
|
|
4323
4327
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, isDisabledOrLoading, stretch, size, hideLabel, alignLabel, underline, false, theme), {
|
|
4324
4328
|
root: {
|
|
@@ -4356,7 +4360,7 @@ const getFontWeight = (weight) => {
|
|
|
4356
4360
|
return fontWeightMap[weight];
|
|
4357
4361
|
};
|
|
4358
4362
|
|
|
4359
|
-
const getComponentCss$
|
|
4363
|
+
const getComponentCss$1h = (isDisabledOrLoading, aspectRatio, size, weight, background, align, compact, hasGradient, isDisabled) => {
|
|
4360
4364
|
const isTopAligned = align === 'top';
|
|
4361
4365
|
return getCss({
|
|
4362
4366
|
'@global': {
|
|
@@ -4626,7 +4630,7 @@ const getDisabledColors = (variant, loading, theme) => {
|
|
|
4626
4630
|
};
|
|
4627
4631
|
return colors[variant === 'tertiary' ? 'secondary' : variant];
|
|
4628
4632
|
};
|
|
4629
|
-
const getComponentCss$
|
|
4633
|
+
const getComponentCss$1g = (icon, iconSource, variant, hideLabel, disabled, loading, compact, theme) => {
|
|
4630
4634
|
const disabledOrLoading = isDisabledOrLoading(disabled, loading);
|
|
4631
4635
|
const { textColor, borderColor, backgroundColor } = getDisabledColors(variant, loading, theme);
|
|
4632
4636
|
const { textColor: textColorDark, borderColor: borderColorDark, backgroundColor: backgroundColorDark, } = getDisabledColors(variant, loading, 'dark');
|
|
@@ -4702,7 +4706,7 @@ const mediaQueryS$1 = getMediaQueryMin('s');
|
|
|
4702
4706
|
const mediaQueryM = getMediaQueryMin('m');
|
|
4703
4707
|
// others
|
|
4704
4708
|
const spacingBase = gridGap.replace('36px', '24px');
|
|
4705
|
-
const getComponentCss$
|
|
4709
|
+
const getComponentCss$1f = (theme, isSidebarStartOpen, isSidebarEndOpen) => {
|
|
4706
4710
|
const { primaryColor, backgroundColor, backgroundSurfaceColor, contrastLowColor } = getThemedColors(theme);
|
|
4707
4711
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
4708
4712
|
return getCss({
|
|
@@ -5059,29 +5063,29 @@ const backfaceVisibilityJssStyle = {
|
|
|
5059
5063
|
backfaceVisibility: 'hidden',
|
|
5060
5064
|
WebkitBackfaceVisibility: 'hidden',
|
|
5061
5065
|
};
|
|
5062
|
-
const gradientColorLight
|
|
5066
|
+
const gradientColorLight = {
|
|
5063
5067
|
'background-base': '255,255,255',
|
|
5064
5068
|
'background-surface': '238,239,242',
|
|
5065
5069
|
none: '',
|
|
5066
5070
|
};
|
|
5067
|
-
const gradientColorDark
|
|
5071
|
+
const gradientColorDark = {
|
|
5068
5072
|
'background-base': '14,14,18',
|
|
5069
5073
|
'background-surface': '33,34,37',
|
|
5070
5074
|
none: '',
|
|
5071
5075
|
};
|
|
5072
|
-
const gradientColorMap
|
|
5073
|
-
auto: gradientColorLight
|
|
5074
|
-
light: gradientColorLight
|
|
5075
|
-
dark: gradientColorDark
|
|
5076
|
+
const gradientColorMap = {
|
|
5077
|
+
auto: gradientColorLight,
|
|
5078
|
+
light: gradientColorLight,
|
|
5079
|
+
dark: gradientColorDark,
|
|
5076
5080
|
};
|
|
5077
|
-
const getGradient
|
|
5078
|
-
const gradientColor = gradientColorMap
|
|
5081
|
+
const getGradient = (theme, gradientColorTheme) => {
|
|
5082
|
+
const gradientColor = gradientColorMap[theme][gradientColorTheme];
|
|
5079
5083
|
return (`rgba(${gradientColor},1) 20%,` +
|
|
5080
5084
|
`rgba(${gradientColor},0.6) 48%,` +
|
|
5081
5085
|
`rgba(${gradientColor},0.3) 68%,` +
|
|
5082
5086
|
`rgba(${gradientColor},0)`);
|
|
5083
5087
|
};
|
|
5084
|
-
const getComponentCss$
|
|
5088
|
+
const getComponentCss$1e = (gradientColor, hasHeading, hasDescription, hasControlsSlot, headingSize, width, hasPagination, isInfinitePagination, alignHeader, theme, hasNavigation, alignControls) => {
|
|
5085
5089
|
const { primaryColor, contrastMediumColor } = getThemedColors(theme);
|
|
5086
5090
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
5087
5091
|
const { canvasTextColor } = getHighContrastColors();
|
|
@@ -5089,9 +5093,9 @@ const getComponentCss$19 = (gradientColor, hasHeading, hasDescription, hasContro
|
|
|
5089
5093
|
const getGradientStyles = (direction) => gradientColor
|
|
5090
5094
|
? {
|
|
5091
5095
|
[direction === 'left' ? 'right' : 'left']: 0,
|
|
5092
|
-
background: `linear-gradient(to ${direction}, ${getGradient
|
|
5096
|
+
background: `linear-gradient(to ${direction}, ${getGradient(theme, gradientColor)} 100%)`,
|
|
5093
5097
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
5094
|
-
background: `linear-gradient(to ${direction}, ${getGradient
|
|
5098
|
+
background: `linear-gradient(to ${direction}, ${getGradient('dark', gradientColor)} 100%)`,
|
|
5095
5099
|
}),
|
|
5096
5100
|
}
|
|
5097
5101
|
: {};
|
|
@@ -5539,7 +5543,7 @@ const getCheckedSVGBackgroundImage$2 = (fill) => {
|
|
|
5539
5543
|
const getIndeterminateSVGBackgroundImage$1 = (fill) => {
|
|
5540
5544
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5541
5545
|
};
|
|
5542
|
-
const getComponentCss$
|
|
5546
|
+
const getComponentCss$1d = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
5543
5547
|
const checkedIconColor = escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
|
|
5544
5548
|
const checkedIconColorDark = escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
|
|
5545
5549
|
const indeterminateIconColor = escapeHashCharacter(getThemedColors(theme).primaryColor);
|
|
@@ -5741,7 +5745,7 @@ const getCheckboxCheckedBaseStyles = (theme, isDisabled, isLoading, state) => {
|
|
|
5741
5745
|
const getIndeterminateSVGBackgroundImage = (fill) => {
|
|
5742
5746
|
return getInlineSVGBackgroundImage(`<path fill="${fill}" d="m20,11v2H4v-2h16Z"/>`);
|
|
5743
5747
|
};
|
|
5744
|
-
const getComponentCss$
|
|
5748
|
+
const getComponentCss$1c = (hideLabel, state, isDisabled, isLoading, compact, theme) => {
|
|
5745
5749
|
const { primaryColor, contrastMediumColor, contrastHighColor, disabledColor, focusColor } = getThemedColors(theme);
|
|
5746
5750
|
const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, focusColor: focusColorDark, } = getThemedColors('dark');
|
|
5747
5751
|
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
@@ -6110,19 +6114,18 @@ const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, sta
|
|
|
6110
6114
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6111
6115
|
borderColor: formStateColorDark || contrastMediumColorDark,
|
|
6112
6116
|
}),
|
|
6113
|
-
...(!disabled &&
|
|
6117
|
+
...(!disabled &&
|
|
6118
|
+
!readOnly && {
|
|
6114
6119
|
'&:has(input:focus)': {
|
|
6115
6120
|
borderColor: primaryColor,
|
|
6116
6121
|
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6117
6122
|
borderColor: primaryColorDark,
|
|
6118
6123
|
}),
|
|
6119
6124
|
},
|
|
6120
|
-
|
|
6121
|
-
...(!disabled &&
|
|
6122
|
-
!readOnly &&
|
|
6123
|
-
hoverMediaQuery({
|
|
6125
|
+
...hoverMediaQuery({
|
|
6124
6126
|
'&:hover:not(:has(.button:hover, input:focus ))': hoverStyles,
|
|
6125
|
-
})
|
|
6127
|
+
}),
|
|
6128
|
+
}),
|
|
6126
6129
|
...(disabled && {
|
|
6127
6130
|
cursor: 'not-allowed',
|
|
6128
6131
|
borderColor: disabledColor,
|
|
@@ -6160,12 +6163,228 @@ const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, sta
|
|
|
6160
6163
|
};
|
|
6161
6164
|
};
|
|
6162
6165
|
|
|
6166
|
+
const getButtonJssStyle = (componentName, isOpen, isDisabled, state, cssVarScaling, theme) => {
|
|
6167
|
+
const cssVarBackgroundColor = `--p-${componentName}-background-color`;
|
|
6168
|
+
const cssVarTextColor = `--p-${componentName}-text-color`;
|
|
6169
|
+
const cssVarBorderColor = `--p-${componentName}-border-color`;
|
|
6170
|
+
const { primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
6171
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
6172
|
+
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
6173
|
+
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
6174
|
+
return {
|
|
6175
|
+
all: 'unset',
|
|
6176
|
+
display: 'flex',
|
|
6177
|
+
alignItems: 'center',
|
|
6178
|
+
gap: `max(4px, ${cssVarScaling} * 12px)`,
|
|
6179
|
+
padding: `max(2px, ${cssVarScaling} * ${formElementPaddingVertical}) max(4px, ${cssVarScaling} * ${formElementPaddingHorizontal})`,
|
|
6180
|
+
minWidth: 0,
|
|
6181
|
+
height: `max(${fontLineHeight}, ${cssVarScaling} * (${fontLineHeight} + 10px))`,
|
|
6182
|
+
boxSizing: 'content-box', // ensures height calculation is based on content, not including padding
|
|
6183
|
+
font: textSmallStyle.font,
|
|
6184
|
+
cursor: 'pointer',
|
|
6185
|
+
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
|
|
6186
|
+
color: `var(${cssVarTextColor}, ${primaryColor})`,
|
|
6187
|
+
backgroundColor: `var(${cssVarBackgroundColor}, transparent)`,
|
|
6188
|
+
border: `${borderWidthBase} solid var(${cssVarBorderColor}, ${isOpen ? primaryColor : formStateColor || contrastMediumColor})`,
|
|
6189
|
+
borderRadius: borderRadiusSmall,
|
|
6190
|
+
...(isDisabled && {
|
|
6191
|
+
cursor: 'not-allowed',
|
|
6192
|
+
color: disabledColor,
|
|
6193
|
+
borderColor: disabledColor,
|
|
6194
|
+
}),
|
|
6195
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6196
|
+
color: `var(${cssVarTextColor}, ${primaryColorDark})`,
|
|
6197
|
+
backgroundColor: `var(${cssVarBackgroundColor}, transparent)`,
|
|
6198
|
+
border: `${borderWidthBase} solid var(${cssVarBorderColor}, ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark})`,
|
|
6199
|
+
...(isDisabled && {
|
|
6200
|
+
color: disabledColorDark,
|
|
6201
|
+
borderColor: disabledColorDark,
|
|
6202
|
+
}),
|
|
6203
|
+
}),
|
|
6204
|
+
...(!isDisabled && {
|
|
6205
|
+
...hoverMediaQuery({
|
|
6206
|
+
'&:hover,label:hover~&': {
|
|
6207
|
+
borderColor: `var(${cssVarBorderColor}, ${isOpen ? primaryColor : formStateHoverColor || primaryColor})`,
|
|
6208
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6209
|
+
borderColor: `var(${cssVarBorderColor}, ${isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark})`,
|
|
6210
|
+
}),
|
|
6211
|
+
},
|
|
6212
|
+
}),
|
|
6213
|
+
...getFocusJssStyle(theme),
|
|
6214
|
+
}),
|
|
6215
|
+
};
|
|
6216
|
+
};
|
|
6217
|
+
|
|
6218
|
+
const getButtonImageJssStyle = {
|
|
6219
|
+
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct calculations based on ex-unit
|
|
6220
|
+
width: 'auto',
|
|
6221
|
+
height: fontLineHeight,
|
|
6222
|
+
borderRadius: borderRadiusSmall,
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6225
|
+
const getButtonLabelJssStyle = {
|
|
6226
|
+
flexGrow: 1,
|
|
6227
|
+
overflow: 'hidden',
|
|
6228
|
+
textOverflow: 'ellipsis',
|
|
6229
|
+
whiteSpace: 'nowrap',
|
|
6230
|
+
};
|
|
6231
|
+
|
|
6232
|
+
const getFilterJssStyle = (scalingVar, theme) => {
|
|
6233
|
+
const { backgroundColor, backgroundSurfaceColor } = getThemedColors(theme);
|
|
6234
|
+
const { backgroundSurfaceColor: backgroundSurfaceColorDark } = getThemedColors('dark');
|
|
6235
|
+
return {
|
|
6236
|
+
position: 'sticky',
|
|
6237
|
+
top: `calc(max(2px, ${scalingVar} * 6px) * -1)`,
|
|
6238
|
+
padding: `max(2px, ${scalingVar} * 6px)`,
|
|
6239
|
+
margin: `calc(max(2px, ${scalingVar} * 6px) * -1)`,
|
|
6240
|
+
background: isThemeDark(theme) ? backgroundSurfaceColor : backgroundColor,
|
|
6241
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6242
|
+
background: backgroundSurfaceColorDark,
|
|
6243
|
+
}),
|
|
6244
|
+
zIndex: 1,
|
|
6245
|
+
};
|
|
6246
|
+
};
|
|
6247
|
+
|
|
6248
|
+
const getIconJssStyle = (componentName, isOpen) => {
|
|
6249
|
+
const cssVarIconFilter = `--p-${componentName}-icon-filter`;
|
|
6250
|
+
return {
|
|
6251
|
+
marginInlineEnd: '-3px', // to temporarily align with multi-select and select-wrapper
|
|
6252
|
+
pointerEvents: 'none',
|
|
6253
|
+
transform: `rotate3d(0,0,1,${isOpen ? '180' : '0.0001'}deg)`, // needs to be a little more than 0 for correct direction in safari
|
|
6254
|
+
transition: getTransition('transform'),
|
|
6255
|
+
...(!isHighContrastMode && {
|
|
6256
|
+
filter: `var(${cssVarIconFilter})`,
|
|
6257
|
+
}),
|
|
6258
|
+
};
|
|
6259
|
+
};
|
|
6260
|
+
|
|
6261
|
+
const getOptionJssStyle = (componentName, cssVarScaling, // "1" is needed for components not yet supporting compact mode
|
|
6262
|
+
theme) => {
|
|
6263
|
+
const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
6264
|
+
const { primaryColor, contrastLowColor, contrastHighColor, disabledColor } = getThemedColors(theme);
|
|
6265
|
+
const { highlightColor } = getHighContrastColors();
|
|
6266
|
+
const gap = `max(4px, ${cssVarScaling} * 12px)`;
|
|
6267
|
+
const paddingBlock = `max(2px, ${cssVarScaling} * ${spacingStaticSmall})`;
|
|
6268
|
+
const paddingInline = `max(4px, ${cssVarScaling} * var(--p-internal-${componentName}-padding-left, 12px)) max(4px, ${cssVarScaling} * 12px)`;
|
|
6269
|
+
return {
|
|
6270
|
+
display: 'flex',
|
|
6271
|
+
gap,
|
|
6272
|
+
paddingBlock,
|
|
6273
|
+
paddingInline,
|
|
6274
|
+
minHeight: fontLineHeight, // preserves height for empty option
|
|
6275
|
+
...textSmallStyle,
|
|
6276
|
+
color: contrastHighColor,
|
|
6277
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6278
|
+
color: contrastHighColorDark,
|
|
6279
|
+
}),
|
|
6280
|
+
cursor: 'pointer',
|
|
6281
|
+
textAlign: 'start',
|
|
6282
|
+
wordBreak: 'break-word',
|
|
6283
|
+
boxSizing: 'content-box',
|
|
6284
|
+
borderRadius: borderRadiusSmall,
|
|
6285
|
+
transition: `${getTransition('background-color')}, ${getTransition('color')}`,
|
|
6286
|
+
'&--highlighted': {
|
|
6287
|
+
background: contrastLowColor,
|
|
6288
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6289
|
+
background: contrastLowColorDark,
|
|
6290
|
+
}),
|
|
6291
|
+
},
|
|
6292
|
+
'&--highlighted, &--selected': {
|
|
6293
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
6294
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6295
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
6296
|
+
}),
|
|
6297
|
+
},
|
|
6298
|
+
'&--disabled': {
|
|
6299
|
+
cursor: 'not-allowed',
|
|
6300
|
+
color: disabledColor,
|
|
6301
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6302
|
+
color: disabledColorDark,
|
|
6303
|
+
}),
|
|
6304
|
+
},
|
|
6305
|
+
'&--hidden': {
|
|
6306
|
+
display: 'none',
|
|
6307
|
+
},
|
|
6308
|
+
};
|
|
6309
|
+
};
|
|
6310
|
+
|
|
6311
|
+
const getOptionsJssStyle = (scalingVar) => {
|
|
6312
|
+
return {
|
|
6313
|
+
display: 'flex',
|
|
6314
|
+
flexDirection: 'column',
|
|
6315
|
+
gap: `max(2px, ${scalingVar} * ${spacingStaticSmall})`,
|
|
6316
|
+
};
|
|
6317
|
+
};
|
|
6318
|
+
|
|
6319
|
+
const keyframesName = 'fade-in';
|
|
6320
|
+
const getPopoverKeyframesStyles = {
|
|
6321
|
+
[`@keyframes ${keyframesName}`]: {
|
|
6322
|
+
from: {
|
|
6323
|
+
opacity: 0,
|
|
6324
|
+
},
|
|
6325
|
+
to: {
|
|
6326
|
+
opacity: 1,
|
|
6327
|
+
},
|
|
6328
|
+
},
|
|
6329
|
+
};
|
|
6330
|
+
const getPopoverJssStyle = (isOpen, cssVarScaling, // "1" is needed for components not yet supporting compact mode
|
|
6331
|
+
optionHeight, theme) => {
|
|
6332
|
+
const { contrastLowColor, backgroundColor, backgroundSurfaceColor } = getThemedColors(theme);
|
|
6333
|
+
const { contrastLowColor: contrastLowColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark } = getThemedColors('dark');
|
|
6334
|
+
const minHeightOptionList = `calc(${4.5 * (optionHeight + 8) + 6 + 2}px)`; // 4.5 options * option height + 8px gap + additional spacing (6px = padding, 2px = border)
|
|
6335
|
+
return {
|
|
6336
|
+
all: 'unset',
|
|
6337
|
+
position: 'absolute',
|
|
6338
|
+
zIndex: 99, // needed for backwards compatibility, to enable browsers not supporting #top-layer
|
|
6339
|
+
padding: `max(2px, ${cssVarScaling} * 6px)`,
|
|
6340
|
+
display: isOpen ? 'flex' : 'none', // needed for backwards compatibility, otherwise 'flex' would be enough
|
|
6341
|
+
flexDirection: 'column',
|
|
6342
|
+
gap: `max(2px, ${cssVarScaling} * ${spacingStaticSmall})`,
|
|
6343
|
+
maxHeight: `max(${minHeightOptionList}, calc(50vh - 54px / 2 - ${OPTION_LIST_SAFE_ZONE}px * 2))`,
|
|
6344
|
+
boxSizing: 'border-box',
|
|
6345
|
+
overflow: 'hidden auto',
|
|
6346
|
+
scrollbarWidth: 'thin', // firefox
|
|
6347
|
+
scrollbarColor: 'auto', // firefox
|
|
6348
|
+
animation: `var(${cssVariableAnimationDuration}, ${motionDurationShort}) ${keyframesName} ${motionEasingBase} forwards`,
|
|
6349
|
+
filter: 'drop-shadow(0 0 8px rgba(0,0,0,0.15))',
|
|
6350
|
+
background: isThemeDark(theme) ? backgroundSurfaceColor : backgroundColor,
|
|
6351
|
+
border: `1px solid ${contrastLowColor}`,
|
|
6352
|
+
borderRadius: borderRadiusMedium,
|
|
6353
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6354
|
+
background: backgroundSurfaceColorDark,
|
|
6355
|
+
borderColor: contrastLowColorDark,
|
|
6356
|
+
}),
|
|
6357
|
+
'&:not(:popover-open)': {
|
|
6358
|
+
display: 'none',
|
|
6359
|
+
},
|
|
6360
|
+
};
|
|
6361
|
+
};
|
|
6362
|
+
|
|
6363
|
+
const getFunctionalComponentNoResultsOptionStyles = (componentName, cssVarScaling, // "1" is needed for components not yet supporting compact mode
|
|
6364
|
+
theme) => {
|
|
6365
|
+
const { contrastMediumColor } = getThemedColors(theme);
|
|
6366
|
+
const { contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
|
|
6367
|
+
return {
|
|
6368
|
+
'no-results': {
|
|
6369
|
+
...getOptionJssStyle(componentName, cssVarScaling, theme),
|
|
6370
|
+
'&[role=option]': {
|
|
6371
|
+
cursor: 'not-allowed',
|
|
6372
|
+
},
|
|
6373
|
+
color: contrastMediumColor,
|
|
6374
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
6375
|
+
color: contrastMediumColorDark,
|
|
6376
|
+
}),
|
|
6377
|
+
},
|
|
6378
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
6379
|
+
};
|
|
6380
|
+
};
|
|
6381
|
+
|
|
6163
6382
|
const widthMap = {
|
|
6164
6383
|
narrow: gridNarrowOffset,
|
|
6165
6384
|
basic: gridBasicOffset,
|
|
6166
6385
|
extended: gridExtendedOffset,
|
|
6167
6386
|
};
|
|
6168
|
-
const getComponentCss$
|
|
6387
|
+
const getComponentCss$1b = (width) => {
|
|
6169
6388
|
return getCss({
|
|
6170
6389
|
'@global': {
|
|
6171
6390
|
':host': {
|
|
@@ -6207,7 +6426,7 @@ const getDimensionStyle = {
|
|
|
6207
6426
|
width: 'inherit',
|
|
6208
6427
|
height: 'inherit',
|
|
6209
6428
|
};
|
|
6210
|
-
const getComponentCss$
|
|
6429
|
+
const getComponentCss$1a = () => {
|
|
6211
6430
|
return getCss({
|
|
6212
6431
|
'@global': {
|
|
6213
6432
|
':host': {
|
|
@@ -6301,12 +6520,12 @@ const getTypographySlottedJssStyle = () => {
|
|
|
6301
6520
|
};
|
|
6302
6521
|
};
|
|
6303
6522
|
|
|
6304
|
-
const sizeMap$
|
|
6523
|
+
const sizeMap$5 = {
|
|
6305
6524
|
small: fontSizeDisplaySmall,
|
|
6306
6525
|
medium: fontSizeDisplayMedium,
|
|
6307
6526
|
large: fontSizeDisplayLarge,
|
|
6308
6527
|
};
|
|
6309
|
-
const getComponentCss$
|
|
6528
|
+
const getComponentCss$19 = (size, align, color, ellipsis, theme) => {
|
|
6310
6529
|
return getCss({
|
|
6311
6530
|
'@global': {
|
|
6312
6531
|
':host': {
|
|
@@ -6319,12 +6538,12 @@ const getComponentCss$14 = (size, align, color, ellipsis, theme) => {
|
|
|
6319
6538
|
[`::slotted(:is(${DISPLAY_TAGS.join()}))`]: addImportantToEachRule(getTypographySlottedJssStyle()),
|
|
6320
6539
|
},
|
|
6321
6540
|
root: getTypographyRootJssStyle(displayLargeStyle, buildResponsiveStyles(size, (sizeValue) => ({
|
|
6322
|
-
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$
|
|
6541
|
+
fontSize: sizeValue === 'inherit' ? sizeValue : sizeMap$5[sizeValue],
|
|
6323
6542
|
})), align, color, ellipsis, theme),
|
|
6324
6543
|
});
|
|
6325
6544
|
};
|
|
6326
6545
|
|
|
6327
|
-
const getComponentCss$
|
|
6546
|
+
const getComponentCss$18 = (color, orientation, theme) => {
|
|
6328
6547
|
const { contrastLowColor, contrastMediumColor, contrastHighColor } = getThemedColors(theme);
|
|
6329
6548
|
const { contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, } = getThemedColors('dark');
|
|
6330
6549
|
const colorMap = {
|
|
@@ -6385,7 +6604,7 @@ const easingOpen = 'in';
|
|
|
6385
6604
|
const dialogDurationClose = 'short';
|
|
6386
6605
|
const backdropDurationClose = 'moderate';
|
|
6387
6606
|
const easingClose = 'out';
|
|
6388
|
-
const getComponentCss$
|
|
6607
|
+
const getComponentCss$17 = (isOpen, isPrimary, isSecondaryScrollerVisible, theme) => {
|
|
6389
6608
|
const { primaryColor, backgroundColor, backgroundSurfaceColor, backgroundShadingColor } = getThemedColors(theme);
|
|
6390
6609
|
const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, backgroundShadingColor: backgroundShadingColorDark, } = getThemedColors('dark');
|
|
6391
6610
|
return getCss({
|
|
@@ -6632,7 +6851,7 @@ const getComponentCss$12 = (isOpen, isPrimary, isSecondaryScrollerVisible, theme
|
|
|
6632
6851
|
});
|
|
6633
6852
|
};
|
|
6634
6853
|
|
|
6635
|
-
const getComponentCss$
|
|
6854
|
+
const getComponentCss$16 = (isPrimary, isSecondary, isCascade) => {
|
|
6636
6855
|
return getCss({
|
|
6637
6856
|
'@global': {
|
|
6638
6857
|
'@keyframes slide-up-mobile': {
|
|
@@ -6863,7 +7082,7 @@ const getComponentCss$11 = (isPrimary, isSecondary, isCascade) => {
|
|
|
6863
7082
|
});
|
|
6864
7083
|
};
|
|
6865
7084
|
|
|
6866
|
-
const getComponentCss$
|
|
7085
|
+
const getComponentCss$15 = (hasSlottedAnchor, isActive) => {
|
|
6867
7086
|
const anchorJssStyle = {
|
|
6868
7087
|
all: 'unset',
|
|
6869
7088
|
padding: `calc(${spacingFluidSmall} + 2px) calc(${spacingFluidSmall} + 4px)`, // aligned with link-pure
|
|
@@ -6915,7 +7134,7 @@ const getComponentCss$10 = (hasSlottedAnchor, isActive) => {
|
|
|
6915
7134
|
});
|
|
6916
7135
|
};
|
|
6917
7136
|
|
|
6918
|
-
const getComponentCss
|
|
7137
|
+
const getComponentCss$14 = (state, labelSize, hasLabel, theme) => {
|
|
6919
7138
|
return getCss({
|
|
6920
7139
|
'@global': {
|
|
6921
7140
|
':host': {
|
|
@@ -6952,7 +7171,7 @@ const getComponentCss$$ = (state, labelSize, hasLabel, theme) => {
|
|
|
6952
7171
|
});
|
|
6953
7172
|
};
|
|
6954
7173
|
|
|
6955
|
-
const getComponentCss$
|
|
7174
|
+
const getComponentCss$13 = (state, labelSize, hasLabel, theme) => {
|
|
6956
7175
|
return getCss({
|
|
6957
7176
|
'@global': {
|
|
6958
7177
|
':host': {
|
|
@@ -6989,6 +7208,46 @@ const getComponentCss$_ = (state, labelSize, hasLabel, theme) => {
|
|
|
6989
7208
|
});
|
|
6990
7209
|
};
|
|
6991
7210
|
|
|
7211
|
+
const sizeMap$4 = {
|
|
7212
|
+
'xx-small': fontSizeTextXXSmall,
|
|
7213
|
+
'x-small': fontSizeTextXSmall,
|
|
7214
|
+
small: fontSizeTextSmall,
|
|
7215
|
+
medium: fontSizeTextMedium,
|
|
7216
|
+
large: fontSizeTextLarge,
|
|
7217
|
+
'x-large': fontSizeTextXLarge,
|
|
7218
|
+
};
|
|
7219
|
+
const getComponentCss$12 = (size) => {
|
|
7220
|
+
return getCss({
|
|
7221
|
+
'@global': {
|
|
7222
|
+
':host': {
|
|
7223
|
+
display: 'inline-block',
|
|
7224
|
+
verticalAlign: 'top',
|
|
7225
|
+
...addImportantToEachRule({
|
|
7226
|
+
...colorSchemeStyles,
|
|
7227
|
+
...hostHiddenStyles,
|
|
7228
|
+
}),
|
|
7229
|
+
},
|
|
7230
|
+
img: {
|
|
7231
|
+
display: 'block', // without display, img tag gets some extra spacing
|
|
7232
|
+
margin: 0,
|
|
7233
|
+
padding: '1px', // add safe-zone to be visually in sync with <p-icon />
|
|
7234
|
+
boxSizing: 'border-box',
|
|
7235
|
+
pointerEvents: 'none', // disable dragging/ghosting of images
|
|
7236
|
+
...(size === 'inherit'
|
|
7237
|
+
? {
|
|
7238
|
+
width: size,
|
|
7239
|
+
height: size,
|
|
7240
|
+
}
|
|
7241
|
+
: {
|
|
7242
|
+
width: fontLineHeight,
|
|
7243
|
+
height: fontLineHeight,
|
|
7244
|
+
font: `${sizeMap$4[size]} ${fontFamily}`,
|
|
7245
|
+
}),
|
|
7246
|
+
},
|
|
7247
|
+
},
|
|
7248
|
+
});
|
|
7249
|
+
};
|
|
7250
|
+
|
|
6992
7251
|
const flexItemWidths = {
|
|
6993
7252
|
none: 0,
|
|
6994
7253
|
'one-quarter': 25,
|
|
@@ -6999,7 +7258,7 @@ const flexItemWidths = {
|
|
|
6999
7258
|
full: 100,
|
|
7000
7259
|
auto: 'auto',
|
|
7001
7260
|
};
|
|
7002
|
-
const getComponentCss$
|
|
7261
|
+
const getComponentCss$11 = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
7003
7262
|
return getCss({
|
|
7004
7263
|
'@global': {
|
|
7005
7264
|
':host': addImportantToEachRule({
|
|
@@ -7021,7 +7280,7 @@ const getComponentCss$Z = (width, offset, alignSelf, grow, shrink, flex) => {
|
|
|
7021
7280
|
});
|
|
7022
7281
|
};
|
|
7023
7282
|
|
|
7024
|
-
const getComponentCss$
|
|
7283
|
+
const getComponentCss$10 = (inline, wrap, direction, justifyContent, alignItems, alignContent) => {
|
|
7025
7284
|
return getCss({
|
|
7026
7285
|
'@global': {
|
|
7027
7286
|
':host': {
|
|
@@ -7218,7 +7477,7 @@ const cssVarRefPaddingTop = '--ref-p-flyout-pt';
|
|
|
7218
7477
|
const cssVarRefPaddingInline = '--ref-p-flyout-px';
|
|
7219
7478
|
// TODO: we shouldn't expose --p-flyout-max-width
|
|
7220
7479
|
const cssVariableMaxWidth = '--p-flyout-max-width';
|
|
7221
|
-
const getComponentCss
|
|
7480
|
+
const getComponentCss$$ = (isOpen, position, hasHeader, hasFooter, hasSubFooter, footerBehavior, theme) => {
|
|
7222
7481
|
const isPositionStart = position === 'start' || position === 'left';
|
|
7223
7482
|
const isFooterFixed = footerBehavior === 'fixed';
|
|
7224
7483
|
return getCss({
|
|
@@ -7330,7 +7589,7 @@ const gutter$1 = `calc(${gridGap} / 2)`;
|
|
|
7330
7589
|
const gridItemWidths = [
|
|
7331
7590
|
0, 8.333333, 16.666667, 25, 33.333333, 41.666667, 50, 58.333333, 66.666667, 75, 83.333333, 91.666667, 100,
|
|
7332
7591
|
];
|
|
7333
|
-
const getComponentCss$
|
|
7592
|
+
const getComponentCss$_ = (size, offset) => {
|
|
7334
7593
|
return getCss({
|
|
7335
7594
|
'@global': {
|
|
7336
7595
|
':host': addImportantToEachRule({
|
|
@@ -7350,7 +7609,7 @@ const getComponentCss$W = (size, offset) => {
|
|
|
7350
7609
|
};
|
|
7351
7610
|
|
|
7352
7611
|
const gutter = `calc(${gridGap} / -2)`;
|
|
7353
|
-
const getComponentCss$
|
|
7612
|
+
const getComponentCss$Z = (direction, wrap) => {
|
|
7354
7613
|
return getCss({
|
|
7355
7614
|
'@global': {
|
|
7356
7615
|
':host': {
|
|
@@ -7376,7 +7635,7 @@ const sizeMap$3 = {
|
|
|
7376
7635
|
'x-large': fontSizeHeadingXLarge,
|
|
7377
7636
|
'xx-large': fontSizeHeadingXXLarge,
|
|
7378
7637
|
};
|
|
7379
|
-
const getComponentCss$
|
|
7638
|
+
const getComponentCss$Y = (size, align, color, ellipsis, theme) => {
|
|
7380
7639
|
return getCss({
|
|
7381
7640
|
'@global': {
|
|
7382
7641
|
':host': {
|
|
@@ -7436,7 +7695,7 @@ const getTextSizeJssStyle = (textSize) => {
|
|
|
7436
7695
|
fontSize: textSize === 'inherit' ? textSize : textSizeMap[textSize],
|
|
7437
7696
|
};
|
|
7438
7697
|
};
|
|
7439
|
-
const getComponentCss$
|
|
7698
|
+
const getComponentCss$X = (variant, align, color, ellipsis, theme) => {
|
|
7440
7699
|
return getCss({
|
|
7441
7700
|
'@global': {
|
|
7442
7701
|
':host': {
|
|
@@ -7547,7 +7806,7 @@ const isFlippableIcon = (name, source) => {
|
|
|
7547
7806
|
name === 'return' ||
|
|
7548
7807
|
name === 'send'));
|
|
7549
7808
|
};
|
|
7550
|
-
const getComponentCss$
|
|
7809
|
+
const getComponentCss$W = (name, source, color, size, theme) => {
|
|
7551
7810
|
const isColorInherit = color === 'inherit';
|
|
7552
7811
|
const isSizeInherit = size === 'inherit';
|
|
7553
7812
|
const isDark = isThemeDark(theme);
|
|
@@ -7666,7 +7925,7 @@ const getHeadingJssStyle = (theme) => ({
|
|
|
7666
7925
|
...headingSmallStyle,
|
|
7667
7926
|
...getTextJssStyle(theme),
|
|
7668
7927
|
});
|
|
7669
|
-
const getComponentCss$
|
|
7928
|
+
const getComponentCss$V = (state, hasAction, hasClose, theme) => {
|
|
7670
7929
|
return getCss({
|
|
7671
7930
|
'@global': {
|
|
7672
7931
|
':host': {
|
|
@@ -7713,13 +7972,36 @@ const getComponentCss$R = (state, hasAction, hasClose, theme) => {
|
|
|
7713
7972
|
/**
|
|
7714
7973
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
7715
7974
|
*/
|
|
7716
|
-
const getComponentCss$
|
|
7975
|
+
const getComponentCss$U = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
7717
7976
|
return getCss({
|
|
7718
7977
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
7719
7978
|
textOverflow: 'ellipsis',
|
|
7720
7979
|
MozAppearance: 'textfield',
|
|
7721
|
-
'&::-webkit-
|
|
7722
|
-
|
|
7980
|
+
'&::-webkit-calendar-picker-indicator': {
|
|
7981
|
+
display: 'none',
|
|
7982
|
+
},
|
|
7983
|
+
}),
|
|
7984
|
+
button: {
|
|
7985
|
+
padding: `var(${cssVarButtonPurePadding})`,
|
|
7986
|
+
margin: `var(${cssVarButtonPureMargin})`,
|
|
7987
|
+
},
|
|
7988
|
+
});
|
|
7989
|
+
};
|
|
7990
|
+
|
|
7991
|
+
// CSS Variables defined in base input
|
|
7992
|
+
/**
|
|
7993
|
+
* @css-variable {"name": "--ref-p-input-slotted-padding", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `padding` in oder to adjust the alignment correctly."}
|
|
7994
|
+
*/
|
|
7995
|
+
/**
|
|
7996
|
+
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
7997
|
+
*/
|
|
7998
|
+
const getComponentCss$T = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
7999
|
+
return getCss({
|
|
8000
|
+
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
8001
|
+
textOverflow: 'ellipsis',
|
|
8002
|
+
MozAppearance: 'textfield',
|
|
8003
|
+
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
8004
|
+
WebkitAppearance: 'none',
|
|
7723
8005
|
},
|
|
7724
8006
|
}),
|
|
7725
8007
|
'sr-only': getHiddenTextJssStyle(),
|
|
@@ -7733,7 +8015,7 @@ const getComponentCss$Q = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
7733
8015
|
/**
|
|
7734
8016
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
7735
8017
|
*/
|
|
7736
|
-
const getComponentCss$
|
|
8018
|
+
const getComponentCss$S = (disabled, loading, hideLabel, state, compact, readOnly, theme, controls) => {
|
|
7737
8019
|
return getCss({
|
|
7738
8020
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
7739
8021
|
textOverflow: 'ellipsis',
|
|
@@ -7758,7 +8040,7 @@ const getComponentCss$P = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
7758
8040
|
/**
|
|
7759
8041
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
7760
8042
|
*/
|
|
7761
|
-
const getComponentCss$
|
|
8043
|
+
const getComponentCss$R = (disabled, loading, hideLabel, state, toggle, compact, readOnly, theme) => {
|
|
7762
8044
|
return getCss({
|
|
7763
8045
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
7764
8046
|
'&[type="text"]': {
|
|
@@ -7781,7 +8063,7 @@ const getComponentCss$O = (disabled, loading, hideLabel, state, toggle, compact,
|
|
|
7781
8063
|
/**
|
|
7782
8064
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
7783
8065
|
*/
|
|
7784
|
-
const getComponentCss$
|
|
8066
|
+
const getComponentCss$Q = (disabled, loading, hideLabel, state, compact, readOnly, theme, clear) => {
|
|
7785
8067
|
return getCss({
|
|
7786
8068
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
7787
8069
|
textOverflow: 'ellipsis',
|
|
@@ -7805,7 +8087,27 @@ const getComponentCss$N = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
7805
8087
|
/**
|
|
7806
8088
|
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
7807
8089
|
*/
|
|
7808
|
-
const getComponentCss$
|
|
8090
|
+
const getComponentCss$P = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
8091
|
+
return getCss({
|
|
8092
|
+
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
8093
|
+
textOverflow: 'ellipsis',
|
|
8094
|
+
MozAppearance: 'textfield',
|
|
8095
|
+
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
8096
|
+
WebkitAppearance: 'none',
|
|
8097
|
+
},
|
|
8098
|
+
}),
|
|
8099
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
8100
|
+
});
|
|
8101
|
+
};
|
|
8102
|
+
|
|
8103
|
+
// CSS Variables defined in base input
|
|
8104
|
+
/**
|
|
8105
|
+
* @css-variable {"name": "--ref-p-input-slotted-padding", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `padding` in oder to adjust the alignment correctly."}
|
|
8106
|
+
*/
|
|
8107
|
+
/**
|
|
8108
|
+
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8109
|
+
*/
|
|
8110
|
+
const getComponentCss$O = (disabled, loading, hideLabel, state, compact, readOnly, theme, counter) => {
|
|
7809
8111
|
return getCss({
|
|
7810
8112
|
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
7811
8113
|
textOverflow: 'ellipsis',
|
|
@@ -7824,6 +8126,49 @@ const getComponentCss$M = (disabled, loading, hideLabel, state, compact, readOnl
|
|
|
7824
8126
|
});
|
|
7825
8127
|
};
|
|
7826
8128
|
|
|
8129
|
+
// CSS Variables defined in base input
|
|
8130
|
+
/**
|
|
8131
|
+
* @css-variable {"name": "--ref-p-input-slotted-padding", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `padding` in oder to adjust the alignment correctly."}
|
|
8132
|
+
*/
|
|
8133
|
+
/**
|
|
8134
|
+
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8135
|
+
*/
|
|
8136
|
+
const getComponentCss$N = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
8137
|
+
return getCss({
|
|
8138
|
+
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
8139
|
+
textOverflow: 'ellipsis',
|
|
8140
|
+
MozAppearance: 'textfield',
|
|
8141
|
+
'&::-webkit-calendar-picker-indicator': {
|
|
8142
|
+
display: 'none',
|
|
8143
|
+
},
|
|
8144
|
+
}),
|
|
8145
|
+
button: {
|
|
8146
|
+
padding: `var(${cssVarButtonPurePadding})`,
|
|
8147
|
+
margin: `var(${cssVarButtonPureMargin})`,
|
|
8148
|
+
},
|
|
8149
|
+
});
|
|
8150
|
+
};
|
|
8151
|
+
|
|
8152
|
+
// CSS Variables defined in base input
|
|
8153
|
+
/**
|
|
8154
|
+
* @css-variable {"name": "--ref-p-input-slotted-padding", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `padding` in oder to adjust the alignment correctly."}
|
|
8155
|
+
*/
|
|
8156
|
+
/**
|
|
8157
|
+
* @css-variable {"name": "--ref-p-input-slotted-margin", "description": "When slotting a `p-button-pure` or `p-link-pure` this variable needs to be set as `margin` in oder to adjust the spacings correctly."}
|
|
8158
|
+
*/
|
|
8159
|
+
const getComponentCss$M = (disabled, loading, hideLabel, state, compact, readOnly, theme) => {
|
|
8160
|
+
return getCss({
|
|
8161
|
+
...getFunctionalComponentInputBaseStyles(disabled, loading, hideLabel, state, compact, readOnly, theme, {
|
|
8162
|
+
textOverflow: 'ellipsis',
|
|
8163
|
+
MozAppearance: 'textfield',
|
|
8164
|
+
'&::-webkit-inner-spin-button, &::-webkit-outer-spin-button': {
|
|
8165
|
+
WebkitAppearance: 'none',
|
|
8166
|
+
},
|
|
8167
|
+
}),
|
|
8168
|
+
'sr-only': getHiddenTextJssStyle(),
|
|
8169
|
+
});
|
|
8170
|
+
};
|
|
8171
|
+
|
|
7827
8172
|
const getComponentCss$L = (icon, iconSource, active, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme) => {
|
|
7828
8173
|
return getCss(mergeDeep(getLinkButtonPureStyles(icon, iconSource, active, false, stretch, size, hideLabel, alignLabel, underline, hasSlottedAnchor, theme), hasSlottedAnchor && {
|
|
7829
8174
|
'@global': addImportantToEachRule({
|
|
@@ -8546,229 +8891,30 @@ const getComponentCss$E = (model, safeZone, size, color, theme) => {
|
|
|
8546
8891
|
});
|
|
8547
8892
|
};
|
|
8548
8893
|
|
|
8549
|
-
const
|
|
8550
|
-
const cssVarBackgroundColor = `--p-${componentName}-background-color`;
|
|
8551
|
-
const cssVarTextColor = `--p-${componentName}-text-color`;
|
|
8552
|
-
const cssVarBorderColor = `--p-${componentName}-border-color`;
|
|
8553
|
-
const { backgroundColor, primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
|
|
8554
|
-
const { backgroundColor: backgroundColorDark, primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
|
|
8555
|
-
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
8556
|
-
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
8557
|
-
return {
|
|
8558
|
-
all: 'unset',
|
|
8559
|
-
display: 'grid',
|
|
8560
|
-
gridTemplateColumns: `${hasSlottedImage ? 'auto ' : ''}minmax(0, 1fr) auto`,
|
|
8561
|
-
alignItems: 'center',
|
|
8562
|
-
gap: `max(4px, ${cssVarScaling} * 12px)`,
|
|
8563
|
-
padding: `max(2px, ${cssVarScaling} * ${formElementPaddingVertical}) max(4px, ${cssVarScaling} * ${formElementPaddingHorizontal})`,
|
|
8564
|
-
minWidth: 0,
|
|
8565
|
-
height: `max(${fontLineHeight}, ${cssVarScaling} * (${fontLineHeight} + 10px))`,
|
|
8566
|
-
boxSizing: 'content-box', // ensures height calculation is based on content, not including padding
|
|
8567
|
-
font: textSmallStyle.font,
|
|
8568
|
-
cursor: 'pointer',
|
|
8569
|
-
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
|
|
8570
|
-
color: `var(${cssVarTextColor}, ${primaryColor})`,
|
|
8571
|
-
background: `var(${cssVarBackgroundColor}, ${backgroundColor})`,
|
|
8572
|
-
border: `${borderWidthBase} solid var(${cssVarBorderColor}, ${isOpen ? primaryColor : formStateColor || contrastMediumColor})`,
|
|
8573
|
-
borderRadius: borderRadiusSmall,
|
|
8574
|
-
...(isDisabled && {
|
|
8575
|
-
cursor: 'not-allowed',
|
|
8576
|
-
color: disabledColor,
|
|
8577
|
-
borderColor: disabledColor,
|
|
8578
|
-
}),
|
|
8579
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8580
|
-
color: `var(${cssVarTextColor}, ${primaryColorDark})`,
|
|
8581
|
-
background: `var(${cssVarBackgroundColor}, ${backgroundColorDark})`,
|
|
8582
|
-
border: `${borderWidthBase} solid var(${cssVarBorderColor}, ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark})`,
|
|
8583
|
-
...(isDisabled && {
|
|
8584
|
-
color: disabledColorDark,
|
|
8585
|
-
borderColor: disabledColorDark,
|
|
8586
|
-
}),
|
|
8587
|
-
}),
|
|
8588
|
-
...(!isDisabled && {
|
|
8589
|
-
...hoverMediaQuery({
|
|
8590
|
-
'&:hover,label:hover~&': {
|
|
8591
|
-
borderColor: `var(${cssVarBorderColor}, ${isOpen ? primaryColor : formStateHoverColor || primaryColor})`,
|
|
8592
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8593
|
-
borderColor: `var(${cssVarBorderColor}, ${isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark})`,
|
|
8594
|
-
}),
|
|
8595
|
-
},
|
|
8596
|
-
}),
|
|
8597
|
-
...getFocusJssStyle(theme),
|
|
8598
|
-
}),
|
|
8599
|
-
};
|
|
8600
|
-
};
|
|
8601
|
-
|
|
8602
|
-
const getButtonImageJssStyle = {
|
|
8603
|
-
font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct calculations based on ex-unit
|
|
8604
|
-
width: 'auto',
|
|
8605
|
-
height: fontLineHeight,
|
|
8606
|
-
borderRadius: borderRadiusSmall,
|
|
8607
|
-
};
|
|
8608
|
-
|
|
8609
|
-
const getButtonLabelJssStyle = {
|
|
8610
|
-
overflow: 'hidden',
|
|
8611
|
-
textOverflow: 'ellipsis',
|
|
8612
|
-
whiteSpace: 'nowrap',
|
|
8613
|
-
};
|
|
8614
|
-
|
|
8615
|
-
const getIconJssStyle = (componentName, isOpen) => {
|
|
8616
|
-
const cssVarIconFilter = `--p-${componentName}-icon-filter`;
|
|
8617
|
-
return {
|
|
8618
|
-
marginInlineEnd: '-3px', // to temporarily align with multi-select and select-wrapper
|
|
8619
|
-
pointerEvents: 'none',
|
|
8620
|
-
transform: `rotate3d(0,0,1,${isOpen ? '180' : '0.0001'}deg)`, // needs to be a little more than 0 for correct direction in safari
|
|
8621
|
-
transition: getTransition('transform'),
|
|
8622
|
-
...(!isHighContrastMode && {
|
|
8623
|
-
filter: `var(${cssVarIconFilter})`,
|
|
8624
|
-
}),
|
|
8625
|
-
};
|
|
8626
|
-
};
|
|
8627
|
-
|
|
8628
|
-
const getNoResultsOptionJssStyle = () => ({
|
|
8629
|
-
'&[role=status]': {
|
|
8630
|
-
cursor: 'not-allowed',
|
|
8631
|
-
},
|
|
8632
|
-
// TODO: shouldn't be used here, instead use sr-only functional component and style
|
|
8633
|
-
'&__sr': getHiddenTextJssStyle(),
|
|
8634
|
-
});
|
|
8635
|
-
|
|
8636
|
-
const getOptionJssStyle = (componentName, cssVarScaling, // "1" is needed for components not yet supporting compact mode
|
|
8637
|
-
theme) => {
|
|
8638
|
-
const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
|
|
8639
|
-
const { primaryColor, hoverColor, contrastLowColor, contrastHighColor, disabledColor } = getThemedColors(theme);
|
|
8640
|
-
const { highlightColor } = getHighContrastColors();
|
|
8641
|
-
const gap = `max(4px, ${cssVarScaling} * 12px)`;
|
|
8642
|
-
const paddingBlock = `max(2px, ${cssVarScaling} * ${spacingStaticSmall})`;
|
|
8643
|
-
const paddingInline = `max(4px, ${cssVarScaling} * var(--p-internal-${componentName}-padding-left, 12px)) max(4px, ${cssVarScaling} * 12px)`;
|
|
8644
|
-
return {
|
|
8645
|
-
display: 'flex',
|
|
8646
|
-
gap,
|
|
8647
|
-
paddingBlock,
|
|
8648
|
-
paddingInline,
|
|
8649
|
-
minHeight: fontLineHeight, // preserves height for empty option
|
|
8650
|
-
...textSmallStyle,
|
|
8651
|
-
color: contrastHighColor,
|
|
8652
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8653
|
-
color: contrastHighColorDark,
|
|
8654
|
-
}),
|
|
8655
|
-
cursor: 'pointer',
|
|
8656
|
-
textAlign: 'start',
|
|
8657
|
-
wordBreak: 'break-word',
|
|
8658
|
-
boxSizing: 'content-box',
|
|
8659
|
-
borderRadius: borderRadiusSmall,
|
|
8660
|
-
transition: `${getTransition('background-color')}, ${getTransition('color')}`,
|
|
8661
|
-
...getNoResultsOptionJssStyle(),
|
|
8662
|
-
...hoverMediaQuery({
|
|
8663
|
-
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
8664
|
-
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
8665
|
-
background: hoverColor,
|
|
8666
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8667
|
-
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
8668
|
-
background: hoverColorDark,
|
|
8669
|
-
}),
|
|
8670
|
-
},
|
|
8671
|
-
}),
|
|
8672
|
-
'&--selected': {
|
|
8673
|
-
...(componentName === 'select-option' && {
|
|
8674
|
-
cursor: 'default',
|
|
8675
|
-
pointerEvents: 'none',
|
|
8676
|
-
}),
|
|
8677
|
-
background: hoverColor,
|
|
8678
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8679
|
-
background: hoverColorDark,
|
|
8680
|
-
}),
|
|
8681
|
-
},
|
|
8682
|
-
'&--highlighted': {
|
|
8683
|
-
background: contrastLowColor,
|
|
8684
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8685
|
-
background: contrastLowColorDark,
|
|
8686
|
-
}),
|
|
8687
|
-
},
|
|
8688
|
-
'&--highlighted, &--selected': {
|
|
8689
|
-
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
8690
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8691
|
-
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
8692
|
-
}),
|
|
8693
|
-
},
|
|
8694
|
-
'&--disabled': {
|
|
8695
|
-
cursor: 'not-allowed',
|
|
8696
|
-
color: disabledColor,
|
|
8697
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8698
|
-
color: disabledColorDark,
|
|
8699
|
-
}),
|
|
8700
|
-
},
|
|
8701
|
-
'&--hidden': {
|
|
8702
|
-
display: 'none',
|
|
8703
|
-
},
|
|
8704
|
-
};
|
|
8705
|
-
};
|
|
8706
|
-
|
|
8707
|
-
const keyframesName = 'fade-in';
|
|
8708
|
-
const getPopoverKeyframesStyles = {
|
|
8709
|
-
[`@keyframes ${keyframesName}`]: {
|
|
8710
|
-
from: {
|
|
8711
|
-
opacity: 0,
|
|
8712
|
-
},
|
|
8713
|
-
to: {
|
|
8714
|
-
opacity: 1,
|
|
8715
|
-
},
|
|
8716
|
-
},
|
|
8717
|
-
};
|
|
8718
|
-
const getPopoverJssStyle = (isOpen, cssVarScaling, // "1" is needed for components not yet supporting compact mode
|
|
8719
|
-
optionHeight, theme) => {
|
|
8720
|
-
const { contrastLowColor, backgroundColor, backgroundSurfaceColor } = getThemedColors(theme);
|
|
8721
|
-
const { contrastLowColor: contrastLowColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark } = getThemedColors('dark');
|
|
8722
|
-
const minHeightOptionList = `calc(${4.5 * (optionHeight + 8) + 6 + 2}px)`; // 4.5 options * option height + 8px gap + additional spacing (6px = padding, 2px = border)
|
|
8723
|
-
return {
|
|
8724
|
-
all: 'unset',
|
|
8725
|
-
position: 'absolute',
|
|
8726
|
-
zIndex: 99, // needed for backwards compatibility, to enable browsers not supporting #top-layer
|
|
8727
|
-
padding: `max(2px, ${cssVarScaling} * 6px)`,
|
|
8728
|
-
display: isOpen ? 'flex' : 'none', // needed for backwards compatibility, otherwise 'flex' would be enough
|
|
8729
|
-
flexDirection: 'column',
|
|
8730
|
-
gap: `max(2px, ${cssVarScaling} * ${spacingStaticSmall})`,
|
|
8731
|
-
maxHeight: `max(${minHeightOptionList}, calc(50vh - 54px / 2 - ${OPTION_LIST_SAFE_ZONE}px * 2))`,
|
|
8732
|
-
boxSizing: 'border-box',
|
|
8733
|
-
overflow: 'hidden auto',
|
|
8734
|
-
scrollbarWidth: 'thin', // firefox
|
|
8735
|
-
scrollbarColor: 'auto', // firefox
|
|
8736
|
-
animation: `var(${cssVariableAnimationDuration}, ${motionDurationShort}) ${keyframesName} ${motionEasingBase} forwards`,
|
|
8737
|
-
filter: 'drop-shadow(0 0 8px rgba(0,0,0,0.15))',
|
|
8738
|
-
background: isThemeDark(theme) ? backgroundSurfaceColor : backgroundColor,
|
|
8739
|
-
border: `1px solid ${contrastLowColor}`,
|
|
8740
|
-
borderRadius: borderRadiusMedium,
|
|
8741
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8742
|
-
background: backgroundSurfaceColorDark,
|
|
8743
|
-
borderColor: contrastLowColorDark,
|
|
8744
|
-
}),
|
|
8745
|
-
'&:not(:popover-open)': {
|
|
8746
|
-
display: 'none',
|
|
8747
|
-
},
|
|
8748
|
-
};
|
|
8749
|
-
};
|
|
8750
|
-
|
|
8894
|
+
const cssVarInternalMultiSelectOptionScaling = '--p-internal-multi-select-option-scaling';
|
|
8751
8895
|
const getComponentCss$D = (theme, isDisabled, selected) => {
|
|
8752
|
-
const dimension = `calc(max(${SCALING_BASE_VALUE} * 0.75, ${fontLineHeight}))`;
|
|
8753
|
-
const dimensionFull = `calc(${dimension} + ${borderWidthBase} * 2)`; // Calculates the total size of the checkbox including its borders.
|
|
8754
|
-
const paddingTop = `calc((${dimensionFull} - ${fontLineHeight}) / 2)`; // Vertically centers the checkbox label relative to the checkbox size.
|
|
8755
8896
|
return getCss({
|
|
8756
8897
|
'@global': {
|
|
8757
8898
|
':host': {
|
|
8758
8899
|
display: 'block',
|
|
8759
8900
|
...addImportantToEachRule({
|
|
8760
|
-
|
|
8901
|
+
scrollMarginBlockStart: `calc(max(2px, var(${cssVarInternalMultiSelectOptionScaling}, 1) * 6px) + 36px)`, // 36px input height + 6px padding
|
|
8902
|
+
scrollMarginBlockEnd: `max(2px, var(${cssVarInternalMultiSelectOptionScaling}, 1) * 6px)`, // Aligns option when list is scrolled by navigating with keyboard
|
|
8761
8903
|
...hostHiddenStyles,
|
|
8904
|
+
[`${cssVarInternalCheckboxScaling}`]: `var(${cssVarInternalMultiSelectOptionScaling})`,
|
|
8762
8905
|
}),
|
|
8763
8906
|
},
|
|
8764
8907
|
slot: {
|
|
8765
8908
|
display: 'block',
|
|
8766
|
-
paddingTop,
|
|
8767
8909
|
},
|
|
8768
8910
|
},
|
|
8769
|
-
option: {
|
|
8770
|
-
|
|
8771
|
-
|
|
8911
|
+
option: getOptionJssStyle('multi-select-option', `var(${cssVarInternalMultiSelectOptionScaling}, 1)`, theme),
|
|
8912
|
+
'checkbox-wrapper': {
|
|
8913
|
+
fontFamily: fontFamily,
|
|
8914
|
+
fontSize: fontSizeTextSmall,
|
|
8915
|
+
height: fontLineHeight,
|
|
8916
|
+
display: 'flex',
|
|
8917
|
+
alignItems: 'center',
|
|
8772
8918
|
},
|
|
8773
8919
|
checkbox: {
|
|
8774
8920
|
flexShrink: 0,
|
|
@@ -8778,151 +8924,9 @@ const getComponentCss$D = (theme, isDisabled, selected) => {
|
|
|
8778
8924
|
});
|
|
8779
8925
|
};
|
|
8780
8926
|
|
|
8781
|
-
/**
|
|
8782
|
-
* Generates placeholder styles for an input element.
|
|
8783
|
-
*
|
|
8784
|
-
* @param {JssStyle} styles - The styles to apply to the placeholder.
|
|
8785
|
-
* @returns {JssStyle} - The generated placeholder styles.
|
|
8786
|
-
*/
|
|
8787
|
-
const getPlaceholderJssStyle = (styles) => ({
|
|
8788
|
-
'&::placeholder': styles,
|
|
8789
|
-
'&::-webkit-input-placeholder': styles /* Chrome/Opera/Safari */,
|
|
8790
|
-
'&::-moz-placeholder': styles /* Firefox 19+ */,
|
|
8791
|
-
'&:-moz-placeholder': styles /* Firefox 18- */,
|
|
8792
|
-
});
|
|
8793
|
-
|
|
8794
|
-
const getComponentCss$C = (isOpen, isDisabled, hideLabel, state, theme) => {
|
|
8795
|
-
const { primaryColor, disabledColor, contrastHighColor, contrastMediumColor, backgroundColor } = getThemedColors(theme);
|
|
8796
|
-
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, backgroundColor: backgroundColorDark, } = getThemedColors('dark');
|
|
8797
|
-
const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
8798
|
-
const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
|
|
8799
|
-
return getCss({
|
|
8800
|
-
'@global': {
|
|
8801
|
-
// @keyframes fade-in
|
|
8802
|
-
...getPopoverKeyframesStyles,
|
|
8803
|
-
':host': {
|
|
8804
|
-
display: 'block',
|
|
8805
|
-
...addImportantToEachRule({
|
|
8806
|
-
...colorSchemeStyles,
|
|
8807
|
-
...hostHiddenStyles,
|
|
8808
|
-
}),
|
|
8809
|
-
},
|
|
8810
|
-
...preventFoucOfNestedElementsStyles,
|
|
8811
|
-
input: {
|
|
8812
|
-
gridArea: '1/1/1/-1',
|
|
8813
|
-
flex: 1,
|
|
8814
|
-
minWidth: 0,
|
|
8815
|
-
height: `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`, // we need 10px additionally so input height becomes 54px, // we need 6px additionally so input height becomes 50px
|
|
8816
|
-
font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
|
|
8817
|
-
margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
|
|
8818
|
-
padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
|
|
8819
|
-
paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(2),
|
|
8820
|
-
boxSizing: 'border-box',
|
|
8821
|
-
outline: 0,
|
|
8822
|
-
WebkitAppearance: 'none', // iOS safari
|
|
8823
|
-
appearance: 'none',
|
|
8824
|
-
...textSmallStyle,
|
|
8825
|
-
textOverflow: 'ellipsis',
|
|
8826
|
-
'&:disabled': {
|
|
8827
|
-
cursor: 'not-allowed',
|
|
8828
|
-
},
|
|
8829
|
-
transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
|
|
8830
|
-
color: primaryColor,
|
|
8831
|
-
'&:not(:focus)': {
|
|
8832
|
-
...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
|
|
8833
|
-
...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
|
|
8834
|
-
}, // Opacity fixes placeholder being shown lighter in firefox
|
|
8835
|
-
...hoverMediaQuery({
|
|
8836
|
-
'&:hover:not(:disabled):not(:focus),label:hover~.wrapper &:not(:disabled):not(:focus)': {
|
|
8837
|
-
borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
|
|
8838
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8839
|
-
borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
|
|
8840
|
-
}),
|
|
8841
|
-
},
|
|
8842
|
-
}),
|
|
8843
|
-
...(!isDisabled && {
|
|
8844
|
-
'&:focus': {
|
|
8845
|
-
borderColor: primaryColor,
|
|
8846
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8847
|
-
borderColor: primaryColorDark,
|
|
8848
|
-
}),
|
|
8849
|
-
},
|
|
8850
|
-
}),
|
|
8851
|
-
background: backgroundColor,
|
|
8852
|
-
border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
|
|
8853
|
-
borderRadius: borderRadiusSmall,
|
|
8854
|
-
...(isDisabled && {
|
|
8855
|
-
...getPlaceholderJssStyle({ color: disabledColor }),
|
|
8856
|
-
cursor: 'not-allowed',
|
|
8857
|
-
color: disabledColor,
|
|
8858
|
-
borderColor: disabledColor,
|
|
8859
|
-
WebkitTextFillColor: disabledColor,
|
|
8860
|
-
}),
|
|
8861
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8862
|
-
color: primaryColorDark,
|
|
8863
|
-
background: backgroundColorDark,
|
|
8864
|
-
border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
|
|
8865
|
-
...(isDisabled && {
|
|
8866
|
-
...getPlaceholderJssStyle({ color: disabledColorDark }),
|
|
8867
|
-
color: disabledColorDark,
|
|
8868
|
-
borderColor: disabledColorDark,
|
|
8869
|
-
WebkitTextFillColor: disabledColorDark,
|
|
8870
|
-
}),
|
|
8871
|
-
}),
|
|
8872
|
-
},
|
|
8873
|
-
'[popover]': getPopoverJssStyle(isOpen, 1, 44, theme),
|
|
8874
|
-
},
|
|
8875
|
-
root: {
|
|
8876
|
-
display: 'grid',
|
|
8877
|
-
gap: spacingStaticXSmall,
|
|
8878
|
-
// min width is needed for showing at least 1 character in very narrow containers. The "1rem" value is the minimum safe zone to show at least 1 character plus the ellipsis dots.
|
|
8879
|
-
minWidth: `calc(1rem + ${formElementPaddingHorizontal} + ${borderWidthBase} * 2 + ${getCalculatedFormElementPaddingHorizontal(2)})`,
|
|
8880
|
-
},
|
|
8881
|
-
wrapper: {
|
|
8882
|
-
position: 'relative',
|
|
8883
|
-
display: 'grid',
|
|
8884
|
-
gridTemplateColumns: `minmax(0, 1fr) auto auto ${formElementLayeredSafeZone}`,
|
|
8885
|
-
},
|
|
8886
|
-
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
|
|
8887
|
-
icon: {
|
|
8888
|
-
gridArea: '1/3',
|
|
8889
|
-
placeSelf: 'center',
|
|
8890
|
-
padding: formButtonOrIconPadding,
|
|
8891
|
-
pointerEvents: 'none',
|
|
8892
|
-
transform: 'rotate3d(0,0,1,0.0001deg)', // needs to be a little more than 0 for correct direction in safari
|
|
8893
|
-
transition: getTransition('transform'),
|
|
8894
|
-
'&--rotate': {
|
|
8895
|
-
transform: 'rotate3d(0,0,1,180deg)',
|
|
8896
|
-
},
|
|
8897
|
-
},
|
|
8898
|
-
// TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
|
|
8899
|
-
button: {
|
|
8900
|
-
gridArea: '1/2',
|
|
8901
|
-
placeSelf: 'center',
|
|
8902
|
-
padding: formButtonOrIconPadding,
|
|
8903
|
-
},
|
|
8904
|
-
// TODO: extract (maybe even as functional component) and re-use in multi-select and select-wrapper
|
|
8905
|
-
'no-results': {
|
|
8906
|
-
padding: `${spacingStaticSmall} 12px`,
|
|
8907
|
-
boxSizing: 'border-box',
|
|
8908
|
-
color: contrastHighColor,
|
|
8909
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
8910
|
-
color: contrastHighColorDark,
|
|
8911
|
-
}),
|
|
8912
|
-
...getNoResultsOptionJssStyle(),
|
|
8913
|
-
},
|
|
8914
|
-
// TODO: maybe we should extract it as functional component too
|
|
8915
|
-
'sr-only': getHiddenTextJssStyle(),
|
|
8916
|
-
// .label / .required
|
|
8917
|
-
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
8918
|
-
// .message
|
|
8919
|
-
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
8920
|
-
});
|
|
8921
|
-
};
|
|
8922
|
-
|
|
8923
8927
|
const cssVarInternalOptgroupScaling = '--p-internal-optgroup-scaling';
|
|
8924
8928
|
const scalingVar = `var(${cssVarInternalOptgroupScaling}, 1)`;
|
|
8925
|
-
const getComponentCss$
|
|
8929
|
+
const getComponentCss$C = (isDisabled, theme) => {
|
|
8926
8930
|
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
8927
8931
|
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
8928
8932
|
const padding = `max(2px, ${scalingVar} * ${spacingStaticSmall}) max(4px, ${scalingVar} * 12px)`;
|
|
@@ -8960,6 +8964,47 @@ const getComponentCss$B = (isDisabled, theme) => {
|
|
|
8960
8964
|
});
|
|
8961
8965
|
};
|
|
8962
8966
|
|
|
8967
|
+
const cssVarInternalMultiSelectScaling = '--p-internal-multi-select-scaling';
|
|
8968
|
+
const getComponentCss$B = (isOpen, isDisabled, hideLabel, state, compact, theme) => {
|
|
8969
|
+
const scalingVar = `var(${cssVarInternalMultiSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
8970
|
+
return getCss({
|
|
8971
|
+
'@global': {
|
|
8972
|
+
// @keyframes fade-in
|
|
8973
|
+
...getPopoverKeyframesStyles,
|
|
8974
|
+
':host': {
|
|
8975
|
+
display: 'block',
|
|
8976
|
+
...addImportantToEachRule({
|
|
8977
|
+
...colorSchemeStyles,
|
|
8978
|
+
...hostHiddenStyles,
|
|
8979
|
+
[`${cssVarInternalMultiSelectOptionScaling}`]: scalingVar,
|
|
8980
|
+
[`${cssVarInternalOptgroupScaling}`]: scalingVar,
|
|
8981
|
+
}),
|
|
8982
|
+
},
|
|
8983
|
+
...preventFoucOfNestedElementsStyles,
|
|
8984
|
+
button: {
|
|
8985
|
+
...getButtonJssStyle('multi-select', isOpen, isDisabled, state, scalingVar, theme),
|
|
8986
|
+
'& span': getButtonLabelJssStyle,
|
|
8987
|
+
},
|
|
8988
|
+
'[popover]': getPopoverJssStyle(isOpen, scalingVar, 44, theme),
|
|
8989
|
+
},
|
|
8990
|
+
root: {
|
|
8991
|
+
display: 'grid',
|
|
8992
|
+
gap: `max(2px, ${scalingVar} * ${spacingStaticXSmall})`,
|
|
8993
|
+
// min width is needed for showing at least 1 character in very narrow containers. The "1rem" value is the minimum safe zone to show at least 1 character plus the ellipsis dots.
|
|
8994
|
+
minWidth: `calc(1rem + ${formElementPaddingHorizontal} + ${borderWidthBase} * 2 + ${getCalculatedFormElementPaddingHorizontal(2)})`,
|
|
8995
|
+
},
|
|
8996
|
+
filter: getFilterJssStyle(scalingVar, theme),
|
|
8997
|
+
options: getOptionsJssStyle(scalingVar),
|
|
8998
|
+
icon: getIconJssStyle('multi-select', isOpen),
|
|
8999
|
+
// .no-results / .sr-only
|
|
9000
|
+
...getFunctionalComponentNoResultsOptionStyles('multi-select-option', scalingVar, theme),
|
|
9001
|
+
// .label / .required
|
|
9002
|
+
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
9003
|
+
// .message
|
|
9004
|
+
...getFunctionalComponentStateMessageStyles(theme, state),
|
|
9005
|
+
});
|
|
9006
|
+
};
|
|
9007
|
+
|
|
8963
9008
|
const mediaQueryMinS = getMediaQueryMin('s');
|
|
8964
9009
|
const mediaQueryMaxS = getMediaQueryMax('s');
|
|
8965
9010
|
// button size needs to be fluid between 320px and 360px viewport width, so that the pagination fits into 320px viewport
|
|
@@ -9371,28 +9416,8 @@ const getComponentCss$x = (hideLabel, state, isDisabled, isLoading, theme) => {
|
|
|
9371
9416
|
});
|
|
9372
9417
|
};
|
|
9373
9418
|
|
|
9374
|
-
const gradientColorLight = {
|
|
9375
|
-
'background-base': '255,255,255',
|
|
9376
|
-
'background-surface': '238,239,242',
|
|
9377
|
-
};
|
|
9378
|
-
const gradientColorDark = {
|
|
9379
|
-
'background-base': '14,14,18',
|
|
9380
|
-
'background-surface': '33,34,37',
|
|
9381
|
-
};
|
|
9382
|
-
const gradientColorMap = {
|
|
9383
|
-
auto: gradientColorLight,
|
|
9384
|
-
light: gradientColorLight,
|
|
9385
|
-
dark: gradientColorDark,
|
|
9386
|
-
};
|
|
9387
|
-
const getGradient = (theme, gradientColorTheme) => {
|
|
9388
|
-
const gradientColor = gradientColorMap[theme][gradientColorTheme];
|
|
9389
|
-
return (`rgba(${gradientColor},1) 20%,` +
|
|
9390
|
-
`rgba(${gradientColor},0.6) 48%,` +
|
|
9391
|
-
`rgba(${gradientColor},0.3) 68%,` +
|
|
9392
|
-
`rgba(${gradientColor},0)`);
|
|
9393
|
-
};
|
|
9394
9419
|
const prevNextWrapperWidth = `calc(${fontLineHeight} + 24px)`;
|
|
9395
|
-
const getComponentCss$w = (
|
|
9420
|
+
const getComponentCss$w = (isNextHidden, isPrevHidden, alignScrollIndicator, hasScrollbar, theme) => {
|
|
9396
9421
|
const actionPrevNextStyles = {
|
|
9397
9422
|
position: 'absolute',
|
|
9398
9423
|
top: 0,
|
|
@@ -9426,6 +9451,13 @@ const getComponentCss$w = (gradientColor, isNextHidden, isPrevHidden, alignScrol
|
|
|
9426
9451
|
gridArea: '1 / 1 / 1 / -1',
|
|
9427
9452
|
padding: '4px',
|
|
9428
9453
|
overflow: 'auto hidden',
|
|
9454
|
+
...((!isPrevHidden || !isNextHidden) && {
|
|
9455
|
+
mask: isNextHidden
|
|
9456
|
+
? 'linear-gradient(90deg,#0000 8px,#000 40px) alpha'
|
|
9457
|
+
: isPrevHidden
|
|
9458
|
+
? 'linear-gradient(90deg,#000 calc(100% - 40px), #0000 calc(100% - 8px)) alpha'
|
|
9459
|
+
: 'linear-gradient(90deg,#0000 8px,#000 40px calc(100% - 40px),#0000 calc(100% - 8px)) alpha',
|
|
9460
|
+
}),
|
|
9429
9461
|
...(!hasScrollbar && {
|
|
9430
9462
|
// If scrollbar is disabled - hide scrollbar
|
|
9431
9463
|
msOverflowStyle: 'none' /* IE and Edge */,
|
|
@@ -9463,10 +9495,6 @@ const getComponentCss$w = (gradientColor, isNextHidden, isPrevHidden, alignScrol
|
|
|
9463
9495
|
...actionPrevNextStyles,
|
|
9464
9496
|
left: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
9465
9497
|
justifyContent: 'flex-start',
|
|
9466
|
-
background: `linear-gradient(to right, ${getGradient(theme, gradientColor)} 100%)`,
|
|
9467
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9468
|
-
background: `linear-gradient(to right, ${getGradient('dark', gradientColor)} 100%)`,
|
|
9469
|
-
}),
|
|
9470
9498
|
visibility: isPrevHidden ? 'hidden' : 'inherit',
|
|
9471
9499
|
'& .action-button': {
|
|
9472
9500
|
marginLeft: '8px',
|
|
@@ -9480,10 +9508,6 @@ const getComponentCss$w = (gradientColor, isNextHidden, isPrevHidden, alignScrol
|
|
|
9480
9508
|
...actionPrevNextStyles,
|
|
9481
9509
|
right: '-1px', // ensures that the gradient always overlays the content (e.g. when zoomed)
|
|
9482
9510
|
justifyContent: 'flex-end',
|
|
9483
|
-
background: `linear-gradient(to left, ${getGradient(theme, gradientColor)} 100%)`,
|
|
9484
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9485
|
-
background: `linear-gradient(to left, ${getGradient('dark', gradientColor)} 100%)`,
|
|
9486
|
-
}),
|
|
9487
9511
|
visibility: isNextHidden ? 'hidden' : 'inherit',
|
|
9488
9512
|
'& .action-button': {
|
|
9489
9513
|
marginRight: '8px',
|
|
@@ -9764,8 +9788,9 @@ const getFilterStyles = (isOpen, state, disabled, theme) => {
|
|
|
9764
9788
|
};
|
|
9765
9789
|
};
|
|
9766
9790
|
const getListStyles = (isOpen, theme) => {
|
|
9767
|
-
const { primaryColor, disabledColor } = getThemedColors(theme);
|
|
9768
|
-
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
|
|
9791
|
+
const { primaryColor, disabledColor, hoverColor } = getThemedColors(theme);
|
|
9792
|
+
const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, hoverColor: hoverColorDark, } = getThemedColors('dark');
|
|
9793
|
+
const { highlightColor } = getHighContrastColors();
|
|
9769
9794
|
return {
|
|
9770
9795
|
'@global': {
|
|
9771
9796
|
// @keyframes fade-in
|
|
@@ -9774,6 +9799,22 @@ const getListStyles = (isOpen, theme) => {
|
|
|
9774
9799
|
},
|
|
9775
9800
|
option: {
|
|
9776
9801
|
...getOptionJssStyle('select-wrapper', 1, theme),
|
|
9802
|
+
...hoverMediaQuery({
|
|
9803
|
+
'&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
|
|
9804
|
+
color: isHighContrastMode ? highlightColor : primaryColor,
|
|
9805
|
+
background: hoverColor,
|
|
9806
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9807
|
+
color: isHighContrastMode ? highlightColor : primaryColorDark,
|
|
9808
|
+
background: hoverColorDark,
|
|
9809
|
+
}),
|
|
9810
|
+
},
|
|
9811
|
+
}),
|
|
9812
|
+
'&--selected': {
|
|
9813
|
+
background: hoverColor,
|
|
9814
|
+
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9815
|
+
background: hoverColorDark,
|
|
9816
|
+
}),
|
|
9817
|
+
},
|
|
9777
9818
|
'&--indent': {
|
|
9778
9819
|
paddingLeft: '28px',
|
|
9779
9820
|
},
|
|
@@ -9800,6 +9841,8 @@ const getListStyles = (isOpen, theme) => {
|
|
|
9800
9841
|
color: primaryColorDark,
|
|
9801
9842
|
}),
|
|
9802
9843
|
},
|
|
9844
|
+
// .no-results / .sr-only
|
|
9845
|
+
...getFunctionalComponentNoResultsOptionStyles('select-wrapper', 1, theme),
|
|
9803
9846
|
};
|
|
9804
9847
|
};
|
|
9805
9848
|
const getComponentCss$t = (isOpen, state, disabled, filter, theme) => {
|
|
@@ -9902,10 +9945,8 @@ const getComponentCss$r = (theme) => {
|
|
|
9902
9945
|
};
|
|
9903
9946
|
|
|
9904
9947
|
const cssVarInternalSelectScaling = '--p-internal-select-scaling';
|
|
9905
|
-
const getComponentCss$q = (isOpen, isDisabled, hideLabel, state, compact, theme
|
|
9948
|
+
const getComponentCss$q = (isOpen, isDisabled, hideLabel, state, compact, theme) => {
|
|
9906
9949
|
const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
|
|
9907
|
-
const { contrastMediumColor: contrastMediumColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark } = getThemedColors('dark');
|
|
9908
|
-
const { contrastMediumColor, backgroundColor, backgroundSurfaceColor } = getThemedColors(theme);
|
|
9909
9950
|
return getCss({
|
|
9910
9951
|
'@global': {
|
|
9911
9952
|
// @keyframes fade-in
|
|
@@ -9915,15 +9956,13 @@ const getComponentCss$q = (isOpen, isDisabled, hideLabel, state, compact, theme,
|
|
|
9915
9956
|
...addImportantToEachRule({
|
|
9916
9957
|
...colorSchemeStyles,
|
|
9917
9958
|
...hostHiddenStyles,
|
|
9959
|
+
[`${cssVarInternalSelectOptionScaling}`]: scalingVar,
|
|
9960
|
+
[`${cssVarInternalOptgroupScaling}`]: scalingVar,
|
|
9918
9961
|
}),
|
|
9919
9962
|
},
|
|
9920
|
-
'::slotted(*)': addImportantToEachRule({
|
|
9921
|
-
'--p-internal-select-option-scaling': scalingVar,
|
|
9922
|
-
'--p-internal-optgroup-scaling': scalingVar,
|
|
9923
|
-
}),
|
|
9924
9963
|
...preventFoucOfNestedElementsStyles,
|
|
9925
9964
|
button: {
|
|
9926
|
-
...getButtonJssStyle('select', isOpen, isDisabled, state,
|
|
9965
|
+
...getButtonJssStyle('select', isOpen, isDisabled, state, scalingVar, theme),
|
|
9927
9966
|
'& img': getButtonImageJssStyle,
|
|
9928
9967
|
'& span': getButtonLabelJssStyle,
|
|
9929
9968
|
},
|
|
@@ -9935,31 +9974,11 @@ const getComponentCss$q = (isOpen, isDisabled, hideLabel, state, compact, theme,
|
|
|
9935
9974
|
// min width is needed for showing at least 1 character in very narrow containers. The "1rem" value is the minimum safe zone to show at least 1 character plus the ellipsis dots.
|
|
9936
9975
|
minWidth: `calc(1rem + ${formElementPaddingHorizontal} + ${borderWidthBase} * 2 + ${getCalculatedFormElementPaddingHorizontal(1)})`,
|
|
9937
9976
|
},
|
|
9938
|
-
filter:
|
|
9939
|
-
|
|
9940
|
-
top: `calc(max(2px, ${scalingVar} * 6px) * -1)`,
|
|
9941
|
-
padding: `max(2px, ${scalingVar} * 6px)`,
|
|
9942
|
-
margin: `calc(max(2px, ${scalingVar} * 6px) * -1)`,
|
|
9943
|
-
background: isThemeDark(theme) ? backgroundSurfaceColor : backgroundColor,
|
|
9944
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9945
|
-
background: backgroundSurfaceColorDark,
|
|
9946
|
-
}),
|
|
9947
|
-
zIndex: 1,
|
|
9948
|
-
},
|
|
9949
|
-
options: {
|
|
9950
|
-
display: 'flex',
|
|
9951
|
-
flexDirection: 'column',
|
|
9952
|
-
gap: `max(2px, ${scalingVar} * ${spacingStaticSmall})`,
|
|
9953
|
-
},
|
|
9954
|
-
'no-results': {
|
|
9955
|
-
...getOptionJssStyle('select-option', scalingVar, theme),
|
|
9956
|
-
color: contrastMediumColor,
|
|
9957
|
-
...prefersColorSchemeDarkMediaQuery(theme, {
|
|
9958
|
-
color: contrastMediumColorDark,
|
|
9959
|
-
}),
|
|
9960
|
-
},
|
|
9977
|
+
filter: getFilterJssStyle(scalingVar, theme),
|
|
9978
|
+
options: getOptionsJssStyle(scalingVar),
|
|
9961
9979
|
icon: getIconJssStyle('select', isOpen),
|
|
9962
|
-
|
|
9980
|
+
// .no-results / .sr-only
|
|
9981
|
+
...getFunctionalComponentNoResultsOptionStyles('select-option', scalingVar, theme),
|
|
9963
9982
|
// .label / .required
|
|
9964
9983
|
...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
|
|
9965
9984
|
// .message
|
|
@@ -10985,16 +11004,8 @@ const getComponentCss$9 = (tagColor, compact, isFocusable, hasIcon, theme) => {
|
|
|
10985
11004
|
};
|
|
10986
11005
|
|
|
10987
11006
|
const isType = (inputType, typeToValidate) => inputType === typeToValidate;
|
|
10988
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
10989
|
-
const _hasShowPickerSupport = () => {
|
|
10990
|
-
return (hasDocument &&
|
|
10991
|
-
'showPicker' in HTMLInputElement.prototype &&
|
|
10992
|
-
// TODO: it would be better to determinate support by checking for existence of "calendar-picker-indicator"
|
|
10993
|
-
!!window.navigator.userAgent.match(/chrome|chromium|crios|edg/i));
|
|
10994
|
-
};
|
|
10995
|
-
const hasShowPickerSupport = _hasShowPickerSupport();
|
|
10996
11007
|
const showCustomCalendarOrTimeIndicator = (isCalendar, isTime) => {
|
|
10997
|
-
return hasShowPickerSupport && (isCalendar || isTime);
|
|
11008
|
+
return hasShowPickerSupport() && (isCalendar || isTime);
|
|
10998
11009
|
};
|
|
10999
11010
|
|
|
11000
11011
|
const cssVariableInputPaddingStart = '--p-internal-text-field-input-padding-start';
|
|
@@ -11508,4 +11519,4 @@ const getComponentCss = (size, theme) => {
|
|
|
11508
11519
|
});
|
|
11509
11520
|
};
|
|
11510
11521
|
|
|
11511
|
-
export { cssVarButtonPureMargin, cssVarButtonPurePadding, cssVarInternalInputBaseScaling, getComponentCss$
|
|
11522
|
+
export { cssVarButtonPureMargin, cssVarButtonPurePadding, cssVarInternalInputBaseScaling, getComponentCss$1l as getAccordionCss, getComponentCss$1k as getBannerCss, getComponentCss$1g as getButtonCss, getComponentCss$1j as getButtonGroupCss, getComponentCss$1i as getButtonPureCss, getComponentCss$1h as getButtonTileCss, getComponentCss$1f as getCanvasCss, getComponentCss$1e as getCarouselCss, getComponentCss$1c as getCheckboxCss, getComponentCss$1d as getCheckboxWrapperCss, getComponentCss$1b as getContentWrapperCss, getComponentCss$1a as getCrestCss, getComponentCss$19 as getDisplayCss, getComponentCss$18 as getDividerCss, getComponentCss$17 as getDrilldownCss, getComponentCss$16 as getDrilldownItemCss, getComponentCss$15 as getDrilldownLinkCss, getComponentCss$13 as getFieldsetCss, getComponentCss$14 as getFieldsetWrapperCss, getComponentCss$12 as getFlagCss, getComponentCss$10 as getFlexCss, getComponentCss$11 as getFlexItemCss, getComponentCss$$ as getFlyoutCss, getFunctionalComponentInputBaseStyles, getFunctionalComponentLabelStyles, getFunctionalComponentLoadingMessageStyles, getFunctionalComponentNoResultsOptionStyles, getFunctionalComponentRequiredStyles, getFunctionalComponentStateMessageStyles, getComponentCss$Z as getGridCss, getComponentCss$_ as getGridItemCss, getComponentCss$Y as getHeadingCss, getComponentCss$X as getHeadlineCss, getComponentCss$W as getIconCss, getComponentCss$V as getInlineNotificationCss, getComponentCss$U as getInputDateCss, getComponentCss$T as getInputEmailCss, getComponentCss$S as getInputNumberCss, getComponentCss$R as getInputPasswordCss, getComponentCss$Q as getInputSearchCss, getComponentCss$P as getInputTelCss, getComponentCss$O as getInputTextCss, getComponentCss$N as getInputTimeCss, getComponentCss$M as getInputUrlCss, getComponentCss$K as getLinkCss, getComponentCss$L as getLinkPureCss, getComponentCss$K as getLinkSocialCss, getComponentCss$H as getLinkTileCss, getComponentCss$J as getLinkTileModelSignatureCss, getComponentCss$I as getLinkTileProductCss, getComponentCss$G as getMarqueCss, getComponentCss$F as getModalCss, getComponentCss$E as getModelSignatureCss, getComponentCss$B as getMultiSelectCss, getComponentCss$D as getMultiSelectOptionCss, getComponentCss$C as getOptgroupCss, getComponentCss$A as getPaginationCss, getComponentCss$z as getPinCodeCss, getComponentCss$y as getPopoverCss, getComponentCss$x as getRadioButtonWrapperCss, getScalingVar, getComponentCss$w as getScrollerCss, getComponentCss$u as getSegmentedControlCss, getComponentCss$v as getSegmentedControlItemCss, getComponentCss$q as getSelectCss, getComponentCss$r as getSelectOptionCss, getComponentCss$s as getSelectWrapperCss, getComponentCss$t as getSelectWrapperDropdownCss, getComponentCss$p as getSheetCss, getComponentCss$o as getSpinnerCss, getComponentCss$m as getStepperHorizontalCss, getComponentCss$n as getStepperHorizontalItemCss, getComponentCss$l as getSwitchCss, getComponentCss$k as getTableBodyCss, getComponentCss$i as getTableCellCss, getComponentCss$j as getTableCss, getComponentCss$h as getTableHeadCellCss, getComponentCss$f as getTableHeadCss, getComponentCss$g as getTableHeadRowCss, getComponentCss$e as getTableRowCss, getComponentCss$d as getTabsBarCss, getComponentCss$b as getTabsCss, getComponentCss$c as getTabsItemCss, getComponentCss$9 as getTagCss, getComponentCss$a as getTagDismissibleCss, getComponentCss$5 as getTextCss, getComponentCss$8 as getTextFieldWrapperCss, getComponentCss$7 as getTextListCss, getComponentCss$6 as getTextListItemCss, getComponentCss$3 as getTextareaCss, getComponentCss$4 as getTextareaWrapperCss, getComponentCss$1 as getToastCss, getComponentCss as getWordmarkCss };
|