@porsche-design-system/components-react 3.27.0-rc.5 → 3.27.0

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/cjs/lib/components/carousel.wrapper.cjs +3 -3
  3. package/cjs/lib/components/table.wrapper.cjs +3 -3
  4. package/esm/lib/components/carousel.wrapper.d.ts +11 -3
  5. package/esm/lib/components/carousel.wrapper.mjs +3 -3
  6. package/esm/lib/components/table.wrapper.d.ts +17 -1
  7. package/esm/lib/components/table.wrapper.mjs +3 -3
  8. package/esm/lib/types.d.ts +13 -0
  9. package/package.json +2 -2
  10. package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +533 -790
  11. package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +42 -23
  12. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.cjs +4 -4
  13. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.cjs +4 -4
  14. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.cjs +1 -1
  15. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.cjs +1 -1
  16. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.cjs +8 -14
  17. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/optgroup.cjs +2 -4
  18. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.cjs +4 -4
  19. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.cjs +7 -8
  20. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.cjs +15 -19
  21. package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.cjs +1 -1
  22. package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +521 -778
  23. package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +40 -23
  24. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.mjs +4 -4
  25. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.mjs +4 -4
  26. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.mjs +1 -1
  27. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select-option.mjs +1 -1
  28. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/multi-select.mjs +9 -15
  29. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/optgroup.mjs +4 -6
  30. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.mjs +2 -2
  31. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pin-code.mjs +2 -2
  32. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/popover.mjs +6 -6
  33. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/radio-button-wrapper.mjs +2 -2
  34. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.mjs +2 -2
  35. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +2 -2
  36. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +2 -2
  37. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-option.mjs +2 -2
  38. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper-dropdown.mjs +9 -10
  39. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.mjs +2 -2
  40. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select.mjs +16 -20
  41. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table-cell.mjs +2 -2
  42. package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/table.mjs +2 -2
  43. package/ssr/esm/lib/components/carousel.wrapper.d.ts +11 -3
  44. package/ssr/esm/lib/components/table.wrapper.d.ts +17 -1
  45. package/ssr/esm/lib/dsr-components/multi-select.d.ts +4 -4
  46. package/ssr/esm/lib/dsr-components/popover.d.ts +2 -2
  47. package/ssr/esm/lib/dsr-components/select-wrapper-dropdown.d.ts +4 -4
  48. package/ssr/esm/lib/dsr-components/select.d.ts +5 -6
  49. package/ssr/esm/lib/types.d.ts +13 -0
@@ -3881,16 +3881,6 @@ const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-des
3881
3881
  // index.ts
3882
3882
  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 } };
3883
3883
 
3884
- const OPTION_HEIGHT = 40;
3885
- const MULTI_SELECT_OPTION_HEIGHT = 44;
3886
- const getNoResultsOptionJssStyle = () => ({
3887
- '&[role=status]': {
3888
- cursor: 'not-allowed',
3889
- },
3890
- // TODO: shouldn't be used here, instead use sr-only functional component and style
3891
- '&__sr': getHiddenTextJssStyle(),
3892
- });
3893
-
3894
3884
  /**
3895
3885
  * Applies a style only on Chromium based browsers by using a media query which is only supported there.
3896
3886
  * https://browserstack.com/guide/create-browser-specific-css
@@ -3916,6 +3906,22 @@ const supportsNativePopover = () => {
3916
3906
  // determine it once
3917
3907
  supportsNativePopover();
3918
3908
 
3909
+ /**
3910
+ * Checks if the current environment supports the native CSS Anchor Positioning.
3911
+ *
3912
+ * @returns {boolean} `true` if native CSS Anchor Positioning is supported, `false` otherwise.
3913
+ */
3914
+ const supportsNativeCSSAnchorPositioning = () => {
3915
+ // SSR or older browsers
3916
+ if (typeof CSS === 'undefined' || !CSS.supports)
3917
+ return false;
3918
+ return CSS.supports('(anchor-name: --test) and (position-anchor: --test) and (position-area: bottom) and (position-try-fallbacks: flip-block) and (width: anchor-size(width))');
3919
+ };
3920
+ // determine it once
3921
+ const hasNativeCSSAnchorPositioningSupport = supportsNativeCSSAnchorPositioning();
3922
+ // getter for easy mocking
3923
+ const getHasCSSAnchorPositioningSupport = () => hasNativeCSSAnchorPositioningSupport;
3924
+
3919
3925
  const hasDocument = typeof document !== 'undefined';
3920
3926
 
3921
3927
  const isThemeAuto = (theme) => {
@@ -3940,6 +3946,8 @@ const formatObjectOutput = (value) => {
3940
3946
  };
3941
3947
  `value, ${formatObjectOutput(breakpoints.reduce((prev, key) => ({ ...prev, [key + (key !== 'base' ? '?' : '')]: 'value' }), {})).replace(/"/g, '')}`;
3942
3948
 
3949
+ const OPTION_LIST_SAFE_ZONE = 6;
3950
+
3943
3951
  const getComponentCss$1a = (size, compact, open, theme, sticky) => {
3944
3952
  const { primaryColor, hoverColor, contrastLowColor, backgroundColor } = getThemedColors(theme);
3945
3953
  const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, backgroundColor: backgroundColorDark, } = getThemedColors('dark');
@@ -5093,7 +5101,7 @@ const getGradient$1 = (theme, gradientColorTheme) => {
5093
5101
  `rgba(${gradientColor},0.3) 68%,` +
5094
5102
  `rgba(${gradientColor},0)`);
5095
5103
  };
5096
- const getComponentCss$13 = (gradientColor, hasHeading, hasDescription, hasControlsSlot, headingSize, width, hasPagination, isInfinitePagination, alignHeader, theme, hasNavigation) => {
5104
+ const getComponentCss$13 = (gradientColor, hasHeading, hasDescription, hasControlsSlot, headingSize, width, hasPagination, isInfinitePagination, alignHeader, theme, hasNavigation, alignControls) => {
5097
5105
  const { primaryColor, contrastMediumColor } = getThemedColors(theme);
5098
5106
  const { primaryColor: primaryColorDark, contrastMediumColor: contrastMediumColorDark } = getThemedColors('dark');
5099
5107
  const { canvasTextColor } = getHighContrastColors();
@@ -5123,13 +5131,14 @@ const getComponentCss$13 = (gradientColor, hasHeading, hasDescription, hasContro
5123
5131
  ...(hasControlsSlot && {
5124
5132
  'slot[name="controls"]': {
5125
5133
  display: 'block',
5126
- gridColumnStart: 1,
5134
+ gridColumn: '1/-1',
5127
5135
  gridRowStart: 3,
5128
5136
  alignSelf: 'center', // ensures vertical alignment to prev/next buttons
5129
- ...(isHeaderAlignCenter &&
5130
- !hasNavigation && {
5131
- justifySelf: 'center',
5132
- }),
5137
+ justifySelf: alignControls !== 'auto' ? alignControls : isHeaderAlignCenter ? 'center' : 'start',
5138
+ [mediaQueryS]: {
5139
+ gridColumn: alignControls !== 'center' && hasNavigation ? '1/2' : '1/-1',
5140
+ justifySelf: alignControls !== 'auto' ? alignControls : isHeaderAlignCenter && !hasNavigation ? 'center' : 'start',
5141
+ },
5133
5142
  },
5134
5143
  }),
5135
5144
  ...addImportantToEachRule({
@@ -5216,9 +5225,6 @@ const getComponentCss$13 = (gradientColor, hasHeading, hasDescription, hasContro
5216
5225
  // !important is necessary to override inline styles set by splide library
5217
5226
  ...addImportantToEachRule({
5218
5227
  padding: `0 ${spacingMap[width].base}`,
5219
- [getMediaQueryMax('xs')]: {
5220
- paddingRight: `calc(${gridBasicOffsetBase} + ${gridGap})`, // we need to give cut off slides a bit more space on mobile views
5221
- },
5222
5228
  [mediaQueryS]: {
5223
5229
  padding: `0 ${spacingMap[width].s}`,
5224
5230
  },
@@ -8086,111 +8092,6 @@ const getComponentCss$E = (model, safeZone, size, color, theme) => {
8086
8092
  });
8087
8093
  };
8088
8094
 
8089
- const cssVariableMultiSelectPaddingInlineStart = '--p-internal-multi-select-option-padding-left';
8090
- const getComponentCss$D = (theme) => {
8091
- const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
8092
- const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
8093
- const { highlightColor } = getHighContrastColors();
8094
- return getCss({
8095
- '@global': {
8096
- ':host': addImportantToEachRule({
8097
- scrollMarginTop: spacingStaticSmall, // Creates top margin when navigating with keyboard and list is scrolled automatically
8098
- ...hostHiddenStyles,
8099
- }),
8100
- ...preventFoucOfNestedElementsStyles,
8101
- },
8102
- option: {
8103
- display: 'flex',
8104
- justifyContent: 'space-between',
8105
- gap: '12px',
8106
- padding: `${spacingStaticSmall} 12px`,
8107
- paddingInlineStart: `var(${cssVariableMultiSelectPaddingInlineStart}, 12px)`,
8108
- flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
8109
- color: contrastHighColor,
8110
- ...prefersColorSchemeDarkMediaQuery(theme, {
8111
- color: contrastHighColorDark,
8112
- }),
8113
- cursor: 'pointer',
8114
- textAlign: 'start',
8115
- wordBreak: 'break-word',
8116
- boxSizing: 'border-box',
8117
- borderRadius: borderRadiusSmall,
8118
- transition: `${getTransition('background-color')}, ${getTransition('color')}`,
8119
- ...getNoResultsOptionJssStyle(),
8120
- ...hoverMediaQuery({
8121
- '&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
8122
- color: isHighContrastMode ? highlightColor : primaryColor,
8123
- background: contrastLowColor,
8124
- ...prefersColorSchemeDarkMediaQuery(theme, {
8125
- color: isHighContrastMode ? highlightColor : primaryColorDark,
8126
- background: contrastLowColorDark,
8127
- }),
8128
- },
8129
- }),
8130
- '&--selected': {
8131
- background: backgroundSurfaceColor,
8132
- ...prefersColorSchemeDarkMediaQuery(theme, {
8133
- background: backgroundSurfaceColorDark,
8134
- }),
8135
- },
8136
- '&--highlighted': {
8137
- background: contrastLowColor,
8138
- ...prefersColorSchemeDarkMediaQuery(theme, {
8139
- background: contrastLowColorDark,
8140
- }),
8141
- },
8142
- '&--highlighted, &--selected': {
8143
- color: isHighContrastMode ? highlightColor : primaryColor,
8144
- ...prefersColorSchemeDarkMediaQuery(theme, {
8145
- color: isHighContrastMode ? highlightColor : primaryColorDark,
8146
- }),
8147
- },
8148
- '&--disabled': {
8149
- cursor: 'not-allowed',
8150
- color: disabledColor,
8151
- ...prefersColorSchemeDarkMediaQuery(theme, {
8152
- color: disabledColorDark,
8153
- }),
8154
- },
8155
- '&--hidden': {
8156
- display: 'none',
8157
- },
8158
- },
8159
- checkbox: {
8160
- pointerEvents: 'none', // Avoid checkbox label click which updates input within p-checkbox-wrapper
8161
- },
8162
- });
8163
- };
8164
-
8165
- /**
8166
- * Generates placeholder styles for an input element.
8167
- *
8168
- * @param {JssStyle} styles - The styles to apply to the placeholder.
8169
- * @returns {JssStyle} - The generated placeholder styles.
8170
- */
8171
- const getPlaceholderJssStyle = (styles) => ({
8172
- '&::placeholder': styles,
8173
- '&::-webkit-input-placeholder': styles /* Chrome/Opera/Safari */,
8174
- '&::-moz-placeholder': styles /* Firefox 19+ */,
8175
- '&:-moz-placeholder': styles /* Firefox 18- */,
8176
- });
8177
-
8178
- // Used for elements that must overflow `overflow:hidden` containers, are positioned absolute and wrapped within a native `popover` element.
8179
- const getPopoverResetJssStyle = () => {
8180
- return {
8181
- position: 'absolute',
8182
- border: 'none',
8183
- background: 'none',
8184
- pointerEvents: 'all',
8185
- padding: 0,
8186
- margin: 0,
8187
- overflow: 'initial',
8188
- '&:-internal-popover-in-top-layer::backdrop': {
8189
- display: 'none',
8190
- },
8191
- };
8192
- };
8193
-
8194
8095
  const getSlottedTextFieldTextareaSelectStyles = (child, state, isLoading, theme, additionalDefaultJssStyle) => {
8195
8096
  const { primaryColor, contrastLowColor, contrastMediumColor, disabledColor } = getThemedColors(theme);
8196
8097
  const { primaryColor: primaryColorDark, contrastLowColor: contrastLowColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, } = getThemedColors('dark');
@@ -8306,332 +8207,424 @@ const getUnitCounterJssStyle = (isDisabled, isReadonly, theme) => {
8306
8207
  };
8307
8208
  };
8308
8209
 
8309
- const getComponentCss$C = (direction, isOpen, isDisabled, hideLabel, state, isNativePopoverCase, theme) => {
8310
- const { contrastHighColor } = getThemedColors(theme);
8311
- const { contrastHighColor: contrastHighColorDark } = getThemedColors('dark');
8312
- return getCss({
8313
- '@global': {
8314
- ':host': {
8315
- display: 'block',
8316
- ...addImportantToEachRule({
8317
- ...colorSchemeStyles,
8318
- ...hostHiddenStyles,
8319
- }),
8320
- },
8321
- ...preventFoucOfNestedElementsStyles,
8322
- // TODO: re-use select-wrapper-style
8323
- input: getInputStyles(isDisabled, direction, isOpen, state, theme),
8324
- },
8325
- root: {
8326
- display: 'grid',
8327
- gap: spacingStaticXSmall,
8328
- // 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.
8329
- minWidth: `calc(1rem + ${formElementPaddingHorizontal} + ${borderWidthBase} * 2 + ${getCalculatedFormElementPaddingHorizontal(2)})`,
8330
- },
8331
- wrapper: {
8332
- position: 'relative',
8333
- display: 'grid',
8334
- gridTemplateColumns: `minmax(0, 1fr) auto auto ${formElementLayeredSafeZone}`,
8335
- },
8336
- // TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
8337
- icon: {
8338
- gridArea: '1/3',
8339
- placeSelf: 'center',
8340
- padding: formButtonOrIconPadding,
8341
- pointerEvents: 'none',
8342
- transform: 'rotate3d(0,0,1,0.0001deg)', // needs to be a little more than 0 for correct direction in safari
8343
- transition: getTransition('transform'),
8344
- '&--rotate': {
8345
- transform: 'rotate3d(0,0,1,180deg)',
8346
- },
8347
- },
8348
- // TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
8349
- button: {
8350
- gridArea: '1/2',
8351
- placeSelf: 'center',
8352
- padding: formButtonOrIconPadding,
8353
- },
8354
- listbox: getListStyles$2(isOpen, direction, theme),
8355
- // TODO: extract (maybe even as functional component) and re-use in multi-select and select-wrapper
8356
- 'no-results': {
8357
- padding: `${spacingStaticSmall} 12px`,
8358
- boxSizing: 'border-box',
8359
- color: contrastHighColor,
8360
- ...prefersColorSchemeDarkMediaQuery(theme, {
8361
- color: contrastHighColorDark,
8362
- }),
8363
- ...getNoResultsOptionJssStyle(),
8364
- },
8365
- // TODO: maybe we should extract it as functional component too
8366
- 'sr-only': getHiddenTextJssStyle(),
8367
- // .label / .required
8368
- ...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
8369
- // .message
8370
- ...getFunctionalComponentStateMessageStyles(theme, state),
8371
- ...(isNativePopoverCase && {
8372
- popover: {
8373
- ...getPopoverResetJssStyle(),
8374
- },
8375
- }),
8376
- });
8377
- };
8378
- // TODO: use getSlottedTextFieldTextareaSelectStyles() instead an manipulate selectors like done with PIN Code or even better make it configurable as parameter
8379
- const getInputStyles = (isDisabled, direction, isOpen, state, theme) => {
8380
- const { primaryColor, disabledColor, backgroundColor, contrastMediumColor } = getThemedColors(theme);
8381
- const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
8210
+ const getButtonJssStyle = (componentName, isOpen, isDisabled, state, hasSlottedImage, anchorName, cssVarScaling, theme) => {
8211
+ const cssVarBackgroundColor = `--p-${componentName}-background-color`;
8212
+ const cssVarTextColor = `--p-${componentName}-text-color`;
8213
+ const cssVarBorderColor = `--p-${componentName}-border-color`;
8214
+ const { backgroundColor, primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
8215
+ const { backgroundColor: backgroundColorDark, primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
8382
8216
  const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
8383
8217
  const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
8384
8218
  return {
8385
- gridArea: '1/1/1/-1',
8386
- flex: 1,
8219
+ all: 'unset',
8220
+ ...(getHasCSSAnchorPositioningSupport() && {
8221
+ anchorName,
8222
+ }),
8223
+ display: 'grid',
8224
+ gridTemplateColumns: `${hasSlottedImage ? 'auto ' : ''}minmax(0, 1fr) auto`,
8225
+ alignItems: 'center',
8226
+ gap: `max(4px, ${cssVarScaling} * 12px)`,
8227
+ padding: `max(2px, ${cssVarScaling} * ${formElementPaddingVertical}) max(4px, ${cssVarScaling} * ${formElementPaddingHorizontal})`,
8387
8228
  minWidth: 0,
8388
- // TODO: abstract and re-use for multi-select, select-wrapper and text-field-wrapper
8389
- 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
8390
- font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
8391
- margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
8392
- padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
8393
- paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(2),
8394
- boxSizing: 'border-box',
8395
- outline: 0,
8396
- WebkitAppearance: 'none', // iOS safari
8397
- appearance: 'none',
8398
- ...textSmallStyle,
8399
- textOverflow: 'ellipsis',
8400
- '&:disabled': {
8401
- cursor: 'not-allowed',
8402
- },
8229
+ height: `max(${fontLineHeight}, ${cssVarScaling} * (${fontLineHeight} + 10px))`,
8230
+ boxSizing: 'content-box', // ensures height calculation is based on content, not including padding
8231
+ font: textSmallStyle.font,
8232
+ cursor: 'pointer',
8403
8233
  transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
8404
- color: primaryColor,
8405
- '&:not(:focus)': {
8406
- ...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
8407
- ...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
8408
- }, // Opacity fixes placeholder being shown lighter in firefox
8409
- ...hoverMediaQuery({
8410
- '&:hover:not(:disabled):not(:focus),label:hover~.wrapper &:not(:disabled):not(:focus)': {
8411
- borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
8412
- ...prefersColorSchemeDarkMediaQuery(theme, {
8413
- borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
8414
- }),
8415
- },
8416
- }),
8417
- ...(!isDisabled && {
8418
- // TODO: getFocusJssStyle() can't be re-used because focus style differs for form elements
8419
- '&:focus': {
8420
- borderColor: primaryColor,
8421
- ...prefersColorSchemeDarkMediaQuery(theme, {
8422
- borderColor: primaryColorDark,
8423
- }),
8424
- },
8425
- }),
8426
- background: backgroundColor,
8427
- border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
8234
+ color: `var(${cssVarTextColor}, ${primaryColor})`,
8235
+ background: `var(${cssVarBackgroundColor}, ${backgroundColor})`,
8236
+ border: `${borderWidthBase} solid var(${cssVarBorderColor}, ${isOpen ? primaryColor : formStateColor || contrastMediumColor})`,
8428
8237
  borderRadius: borderRadiusSmall,
8429
- ...(isOpen && {
8430
- ['paddingBottom' ]: `calc(${formElementPaddingVertical} + 1px)`, // Add padding to keep same height when border changes
8431
- ['borderBottom' ]: addImportantToRule(`1px solid ${contrastMediumColor}`),
8432
- ['borderBottomLeftRadius' ]: 0,
8433
- ['borderBottomRightRadius' ]: 0,
8434
- }),
8435
8238
  ...(isDisabled && {
8436
- ...getPlaceholderJssStyle({ color: disabledColor }),
8437
8239
  cursor: 'not-allowed',
8438
8240
  color: disabledColor,
8439
8241
  borderColor: disabledColor,
8440
- WebkitTextFillColor: disabledColor,
8441
8242
  }),
8442
8243
  ...prefersColorSchemeDarkMediaQuery(theme, {
8443
- color: primaryColorDark,
8444
- background: backgroundColorDark,
8445
- border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
8446
- ...(isOpen && {
8447
- ['borderBottom' ]: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
8448
- }),
8244
+ color: `var(${cssVarTextColor}, ${primaryColorDark})`,
8245
+ background: `var(${cssVarBackgroundColor}, ${backgroundColorDark})`,
8246
+ border: `${borderWidthBase} solid var(${cssVarBorderColor}, ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark})`,
8449
8247
  ...(isDisabled && {
8450
- ...getPlaceholderJssStyle({ color: disabledColorDark }),
8451
8248
  color: disabledColorDark,
8452
8249
  borderColor: disabledColorDark,
8453
- WebkitTextFillColor: disabledColorDark,
8454
8250
  }),
8455
8251
  }),
8252
+ ...(!isDisabled && {
8253
+ ...hoverMediaQuery({
8254
+ '&:hover,label:hover~&': {
8255
+ borderColor: `var(${cssVarBorderColor}, ${isOpen ? primaryColor : formStateHoverColor || primaryColor})`,
8256
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8257
+ borderColor: `var(${cssVarBorderColor}, ${isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark})`,
8258
+ }),
8259
+ },
8260
+ }),
8261
+ ...getFocusJssStyle(theme),
8262
+ }),
8456
8263
  };
8457
8264
  };
8458
- const getListStyles$2 = (isOpen, direction, theme) => {
8459
- const { primaryColor, backgroundColor } = getThemedColors(theme);
8460
- const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
8265
+
8266
+ const getButtonImageJssStyle = {
8267
+ font: `${fontSizeTextSmall} ${fontFamily}`, // needed for correct calculations based on ex-unit
8268
+ width: 'auto',
8269
+ height: fontLineHeight,
8270
+ borderRadius: borderRadiusSmall,
8271
+ };
8272
+
8273
+ const getButtonLabelJssStyle = {
8274
+ overflow: 'hidden',
8275
+ textOverflow: 'ellipsis',
8276
+ whiteSpace: 'nowrap',
8277
+ };
8278
+
8279
+ const getIconJssStyle = (componentName, isOpen) => {
8280
+ const cssVarIconFilter = `--p-${componentName}-icon-filter`;
8461
8281
  return {
8462
- position: 'absolute',
8463
- margin: 0,
8464
- display: isOpen ? 'flex' : 'none',
8465
- flexDirection: 'column',
8466
- gap: spacingStaticSmall,
8467
- padding: '6px',
8468
- ...textSmallStyle,
8469
- zIndex: 10,
8470
- left: 0,
8471
- right: 0,
8472
- ['top' ]: '100%',
8473
- boxSizing: 'border-box',
8474
- maxHeight: `${8.5 * (MULTI_SELECT_OPTION_HEIGHT + 8) + 6 + 2}px`, // 8.5 options * option height + 8px gap + additional spacing (6px = padding, 2px = border)
8475
- overflowY: 'auto',
8476
- WebkitOverflowScrolling: 'touch',
8477
- background: backgroundColor,
8478
- border: `2px solid ${primaryColor}`,
8479
- ['borderTop' ]: 'none',
8480
- borderRadius: borderRadiusSmall,
8481
- ['borderTopLeftRadius' ]: 0,
8482
- ['borderTopRightRadius' ]: 0,
8483
- scrollbarWidth: 'thin', // firefox
8484
- scrollbarColor: 'auto', // firefox
8485
- transition: getTransition('border-color'),
8486
- transform: 'translate3d(0,0,0)', // fix iOS bug if less than 5 items are displayed
8487
- ...prefersColorSchemeDarkMediaQuery(theme, {
8488
- background: backgroundColorDark,
8489
- borderColor: primaryColorDark,
8282
+ marginInlineEnd: '-3px', // to temporarily align with multi-select and select-wrapper
8283
+ pointerEvents: 'none',
8284
+ transform: `rotate3d(0,0,1,${isOpen ? '180' : '0.0001'}deg)`, // needs to be a little more than 0 for correct direction in safari
8285
+ transition: getTransition('transform'),
8286
+ ...(!isHighContrastMode && {
8287
+ filter: `var(${cssVarIconFilter})`,
8490
8288
  }),
8491
8289
  };
8492
8290
  };
8493
8291
 
8494
- const cssVariableSelectPaddingInlineStart = '--p-internal-select-option-padding-left';
8495
- const cssVarInternalSelectOptionScaling = '--p-internal-select-option-scaling';
8496
- const scalingVar$1 = `var(${cssVarInternalSelectOptionScaling}, 1)`;
8497
- // TODO: Enforce order of slotted text, img
8498
- const getComponentCss$B = (theme) => {
8499
- return getCss({
8500
- '@global': {
8501
- ...addImportantToEachRule({
8502
- ':host': {
8503
- // TODO: display is missing
8504
- scrollMargin: '6px', // Aligns option when list is scrolled by navigating with keyboard
8505
- ...hostHiddenStyles,
8506
- },
8507
- '::slotted(img)': {
8508
- height: fontLineHeight,
8509
- borderRadius: borderRadiusSmall,
8510
- width: 'auto',
8511
- },
8512
- }),
8513
- ...preventFoucOfNestedElementsStyles,
8514
- },
8515
- ...getOptionStyles(theme),
8516
- icon: {
8517
- marginInlineStart: 'auto',
8518
- },
8519
- });
8520
- };
8521
- // TODO: Copied from multi-select and select-wrapper-dropdown, extract and reuse
8522
- const getOptionStyles = (theme) => {
8523
- const { primaryColor: primaryColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
8524
- const { primaryColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor } = getThemedColors(theme);
8292
+ const getNoResultsOptionJssStyle = () => ({
8293
+ '&[role=status]': {
8294
+ cursor: 'not-allowed',
8295
+ },
8296
+ // TODO: shouldn't be used here, instead use sr-only functional component and style
8297
+ '&__sr': getHiddenTextJssStyle(),
8298
+ });
8299
+
8300
+ const getOptionJssStyle = (componentName, cssVarScaling, // "1" is needed for components not yet supporting compact mode
8301
+ theme) => {
8302
+ const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastHighColor: contrastHighColorDark, disabledColor: disabledColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
8303
+ const { primaryColor, hoverColor, contrastLowColor, contrastHighColor, disabledColor } = getThemedColors(theme);
8525
8304
  const { highlightColor } = getHighContrastColors();
8526
- const gap = `max(4px, ${scalingVar$1} * 12px)`;
8527
- const paddingBlock = `max(2px, ${scalingVar$1} * ${spacingStaticSmall})`;
8528
- const paddingInline = `max(4px, ${scalingVar$1} * var(${cssVariableSelectPaddingInlineStart}, 12px)) max(4px, ${scalingVar$1} * 12px)`;
8305
+ const gap = `max(4px, ${cssVarScaling} * 12px)`;
8306
+ const paddingBlock = `max(2px, ${cssVarScaling} * ${spacingStaticSmall})`;
8307
+ const paddingInline = `max(4px, ${cssVarScaling} * var(--p-internal-${componentName}-padding-left, 12px)) max(4px, ${cssVarScaling} * 12px)`;
8529
8308
  return {
8530
- option: {
8531
- fontWeight: fontWeightRegular,
8532
- display: 'flex',
8533
- gap,
8534
- paddingBlock,
8535
- paddingInline,
8536
- minHeight: fontLineHeight, // preserves height for empty option
8537
- color: contrastHighColor,
8538
- ...prefersColorSchemeDarkMediaQuery(theme, {
8539
- color: contrastHighColorDark,
8540
- }),
8541
- cursor: 'pointer',
8542
- textAlign: 'start',
8543
- wordBreak: 'break-word',
8544
- boxSizing: 'content-box',
8545
- borderRadius: borderRadiusSmall,
8546
- transition: `${getTransition('background-color')}, ${getTransition('color')}`,
8547
- ...getNoResultsOptionJssStyle(),
8548
- ...hoverMediaQuery({
8549
- '&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
8550
- color: isHighContrastMode ? highlightColor : primaryColor,
8551
- background: contrastLowColor,
8552
- ...prefersColorSchemeDarkMediaQuery(theme, {
8553
- color: isHighContrastMode ? highlightColor : primaryColorDark,
8554
- background: contrastLowColorDark,
8555
- }),
8556
- },
8557
- }),
8558
- '&--selected': {
8559
- cursor: 'default',
8560
- pointerEvents: 'none',
8561
- background: backgroundSurfaceColor,
8309
+ display: 'flex',
8310
+ gap,
8311
+ paddingBlock,
8312
+ paddingInline,
8313
+ minHeight: fontLineHeight, // preserves height for empty option
8314
+ ...textSmallStyle,
8315
+ color: contrastHighColor,
8316
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8317
+ color: contrastHighColorDark,
8318
+ }),
8319
+ cursor: 'pointer',
8320
+ textAlign: 'start',
8321
+ wordBreak: 'break-word',
8322
+ boxSizing: 'content-box',
8323
+ borderRadius: borderRadiusSmall,
8324
+ transition: `${getTransition('background-color')}, ${getTransition('color')}`,
8325
+ ...getNoResultsOptionJssStyle(),
8326
+ ...hoverMediaQuery({
8327
+ '&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
8328
+ color: isHighContrastMode ? highlightColor : primaryColor,
8329
+ background: hoverColor,
8562
8330
  ...prefersColorSchemeDarkMediaQuery(theme, {
8563
- background: backgroundSurfaceColorDark,
8331
+ color: isHighContrastMode ? highlightColor : primaryColorDark,
8332
+ background: hoverColorDark,
8564
8333
  }),
8565
8334
  },
8566
- '&--highlighted': {
8567
- background: contrastLowColor,
8568
- ...prefersColorSchemeDarkMediaQuery(theme, {
8569
- background: contrastLowColorDark,
8335
+ }),
8336
+ '&--selected': {
8337
+ ...(componentName === 'select-option' && {
8338
+ cursor: 'default',
8339
+ pointerEvents: 'none',
8340
+ }),
8341
+ background: hoverColor,
8342
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8343
+ background: hoverColorDark,
8344
+ }),
8345
+ },
8346
+ '&--highlighted': {
8347
+ background: contrastLowColor,
8348
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8349
+ background: contrastLowColorDark,
8350
+ }),
8351
+ },
8352
+ '&--highlighted, &--selected': {
8353
+ color: isHighContrastMode ? highlightColor : primaryColor,
8354
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8355
+ color: isHighContrastMode ? highlightColor : primaryColorDark,
8356
+ }),
8357
+ },
8358
+ '&--disabled': {
8359
+ cursor: 'not-allowed',
8360
+ color: disabledColor,
8361
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8362
+ color: disabledColorDark,
8363
+ }),
8364
+ },
8365
+ '&--hidden': {
8366
+ display: 'none',
8367
+ },
8368
+ };
8369
+ };
8370
+
8371
+ const keyframesName = 'fade-in';
8372
+ const getPopoverKeyframesStyles = {
8373
+ [`@keyframes ${keyframesName}`]: {
8374
+ from: {
8375
+ opacity: 0,
8376
+ },
8377
+ to: {
8378
+ opacity: 1,
8379
+ },
8380
+ },
8381
+ };
8382
+ const getPopoverJssStyle = (isOpen, direction, anchorName, cssVarScaling, // "1" is needed for components not yet supporting compact mode
8383
+ optionHeight, theme) => {
8384
+ const { contrastLowColor, backgroundColor, backgroundSurfaceColor } = getThemedColors(theme);
8385
+ const { contrastLowColor: contrastLowColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark } = getThemedColors('dark');
8386
+ const minHeightOptionList = `calc(${4.5 * (optionHeight + 8) + 6 + 2}px)`; // 4.5 options * option height + 8px gap + additional spacing (6px = padding, 2px = border)
8387
+ return {
8388
+ all: 'unset',
8389
+ position: 'absolute',
8390
+ zIndex: 99, // needed for backwards compatibility, to enable browsers not supporting #top-layer
8391
+ padding: `max(2px, ${cssVarScaling} * 6px)`,
8392
+ display: isOpen ? 'flex' : 'none', // needed for backwards compatibility, otherwise 'flex' would be enough
8393
+ flexDirection: 'column',
8394
+ gap: `max(2px, ${cssVarScaling} * ${spacingStaticSmall})`,
8395
+ maxHeight: `max(${minHeightOptionList}, calc(50vh - 54px / 2 - ${OPTION_LIST_SAFE_ZONE}px * 2))`,
8396
+ boxSizing: 'border-box',
8397
+ overflow: 'hidden auto',
8398
+ scrollbarWidth: 'thin', // firefox
8399
+ scrollbarColor: 'auto', // firefox
8400
+ animation: `var(${cssVariableAnimationDuration}, ${motionDurationShort}) ${keyframesName} ${motionEasingBase} forwards`,
8401
+ filter: 'drop-shadow(0 0 8px rgba(0,0,0,0.15))',
8402
+ background: isThemeDark(theme) ? backgroundSurfaceColor : backgroundColor,
8403
+ border: `1px solid ${contrastLowColor}`,
8404
+ borderRadius: borderRadiusMedium,
8405
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8406
+ background: backgroundSurfaceColorDark,
8407
+ borderColor: contrastLowColorDark,
8408
+ }),
8409
+ ...(getHasCSSAnchorPositioningSupport() && {
8410
+ positionAnchor: anchorName,
8411
+ positionVisibility: 'always',
8412
+ positionTryOrder: 'normal',
8413
+ positionArea: direction === 'up' ? 'top' : 'bottom',
8414
+ positionTryFallbacks: 'flip-block',
8415
+ width: 'anchor-size(width)',
8416
+ maxHeight: `max(${minHeightOptionList}, calc(50vh - anchor-size(height) / 2 - ${OPTION_LIST_SAFE_ZONE}px * 2))`,
8417
+ margin: `${OPTION_LIST_SAFE_ZONE}px 0`,
8418
+ }),
8419
+ '&:not(:popover-open)': {
8420
+ display: 'none',
8421
+ },
8422
+ };
8423
+ };
8424
+
8425
+ const getComponentCss$D = (theme) => {
8426
+ return getCss({
8427
+ '@global': {
8428
+ ':host': {
8429
+ display: 'block',
8430
+ ...addImportantToEachRule({
8431
+ scrollMargin: '6px', // Aligns option when list is scrolled by navigating with keyboard
8432
+ ...hostHiddenStyles,
8570
8433
  }),
8571
8434
  },
8572
- '&--highlighted, &--selected': {
8573
- color: isHighContrastMode ? highlightColor : primaryColor,
8574
- ...prefersColorSchemeDarkMediaQuery(theme, {
8575
- color: isHighContrastMode ? highlightColor : primaryColorDark,
8435
+ ...preventFoucOfNestedElementsStyles,
8436
+ },
8437
+ option: getOptionJssStyle('multi-select-option', 1, theme),
8438
+ checkbox: {
8439
+ pointerEvents: 'none', // Avoid checkbox label click which updates input within p-checkbox-wrapper
8440
+ },
8441
+ });
8442
+ };
8443
+
8444
+ /**
8445
+ * Generates placeholder styles for an input element.
8446
+ *
8447
+ * @param {JssStyle} styles - The styles to apply to the placeholder.
8448
+ * @returns {JssStyle} - The generated placeholder styles.
8449
+ */
8450
+ const getPlaceholderJssStyle = (styles) => ({
8451
+ '&::placeholder': styles,
8452
+ '&::-webkit-input-placeholder': styles /* Chrome/Opera/Safari */,
8453
+ '&::-moz-placeholder': styles /* Firefox 19+ */,
8454
+ '&:-moz-placeholder': styles /* Firefox 18- */,
8455
+ });
8456
+
8457
+ const anchorName$2 = '--anchor-multi-select';
8458
+ const getComponentCss$C = (direction, isOpen, isDisabled, hideLabel, state, hasNativeCSSAnchorPositioningSupport, theme) => {
8459
+ const { primaryColor, disabledColor, contrastHighColor, contrastMediumColor, backgroundColor } = getThemedColors(theme);
8460
+ const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, contrastHighColor: contrastHighColorDark, backgroundColor: backgroundColorDark, } = getThemedColors('dark');
8461
+ const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
8462
+ const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
8463
+ return getCss({
8464
+ '@global': {
8465
+ // @keyframes fade-in
8466
+ ...getPopoverKeyframesStyles,
8467
+ ':host': {
8468
+ display: 'block',
8469
+ ...addImportantToEachRule({
8470
+ ...colorSchemeStyles,
8471
+ ...hostHiddenStyles,
8576
8472
  }),
8577
8473
  },
8578
- '&--disabled': {
8579
- cursor: 'not-allowed',
8580
- color: disabledColor,
8474
+ ...preventFoucOfNestedElementsStyles,
8475
+ input: {
8476
+ gridArea: '1/1/1/-1',
8477
+ flex: 1,
8478
+ minWidth: 0,
8479
+ 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
8480
+ font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
8481
+ margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
8482
+ padding: `${formElementPaddingVertical} ${formElementPaddingHorizontal}`,
8483
+ paddingInlineEnd: getCalculatedFormElementPaddingHorizontal(2),
8484
+ boxSizing: 'border-box',
8485
+ outline: 0,
8486
+ WebkitAppearance: 'none', // iOS safari
8487
+ appearance: 'none',
8488
+ ...textSmallStyle,
8489
+ textOverflow: 'ellipsis',
8490
+ '&:disabled': {
8491
+ cursor: 'not-allowed',
8492
+ },
8493
+ transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
8494
+ color: primaryColor,
8495
+ '&:not(:focus)': {
8496
+ ...getPlaceholderJssStyle({ color: primaryColor, opacity: 1 }),
8497
+ ...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({ color: primaryColorDark, opacity: 1 })),
8498
+ }, // Opacity fixes placeholder being shown lighter in firefox
8499
+ ...hoverMediaQuery({
8500
+ '&:hover:not(:disabled):not(:focus),label:hover~.wrapper &:not(:disabled):not(:focus)': {
8501
+ borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
8502
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8503
+ borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
8504
+ }),
8505
+ },
8506
+ }),
8507
+ ...(!isDisabled && {
8508
+ '&:focus': {
8509
+ borderColor: primaryColor,
8510
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8511
+ borderColor: primaryColorDark,
8512
+ }),
8513
+ },
8514
+ }),
8515
+ background: backgroundColor,
8516
+ border: `${borderWidthBase} solid ${isOpen ? primaryColor : formStateColor || contrastMediumColor}`,
8517
+ borderRadius: borderRadiusSmall,
8518
+ ...(isDisabled && {
8519
+ ...getPlaceholderJssStyle({ color: disabledColor }),
8520
+ cursor: 'not-allowed',
8521
+ color: disabledColor,
8522
+ borderColor: disabledColor,
8523
+ WebkitTextFillColor: disabledColor,
8524
+ }),
8581
8525
  ...prefersColorSchemeDarkMediaQuery(theme, {
8582
- color: disabledColorDark,
8526
+ color: primaryColorDark,
8527
+ background: backgroundColorDark,
8528
+ border: `${borderWidthBase} solid ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark}`,
8529
+ ...(isDisabled && {
8530
+ ...getPlaceholderJssStyle({ color: disabledColorDark }),
8531
+ color: disabledColorDark,
8532
+ borderColor: disabledColorDark,
8533
+ WebkitTextFillColor: disabledColorDark,
8534
+ }),
8535
+ }),
8536
+ ...(hasNativeCSSAnchorPositioningSupport && {
8537
+ anchorName: anchorName$2,
8583
8538
  }),
8584
8539
  },
8585
- '&--hidden': {
8586
- display: 'none',
8540
+ '[popover]': getPopoverJssStyle(isOpen, direction, anchorName$2, 1, 44, theme),
8541
+ },
8542
+ root: {
8543
+ display: 'grid',
8544
+ gap: spacingStaticXSmall,
8545
+ // 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.
8546
+ minWidth: `calc(1rem + ${formElementPaddingHorizontal} + ${borderWidthBase} * 2 + ${getCalculatedFormElementPaddingHorizontal(2)})`,
8547
+ },
8548
+ wrapper: {
8549
+ position: 'relative',
8550
+ display: 'grid',
8551
+ gridTemplateColumns: `minmax(0, 1fr) auto auto ${formElementLayeredSafeZone}`,
8552
+ },
8553
+ // TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
8554
+ icon: {
8555
+ gridArea: '1/3',
8556
+ placeSelf: 'center',
8557
+ padding: formButtonOrIconPadding,
8558
+ pointerEvents: 'none',
8559
+ transform: 'rotate3d(0,0,1,0.0001deg)', // needs to be a little more than 0 for correct direction in safari
8560
+ transition: getTransition('transform'),
8561
+ '&--rotate': {
8562
+ transform: 'rotate3d(0,0,1,180deg)',
8587
8563
  },
8588
8564
  },
8589
- };
8565
+ // TODO: extract for multi-select, select-wrapper and text-field (not gridArea and placeSelf)
8566
+ button: {
8567
+ gridArea: '1/2',
8568
+ placeSelf: 'center',
8569
+ padding: formButtonOrIconPadding,
8570
+ },
8571
+ // TODO: extract (maybe even as functional component) and re-use in multi-select and select-wrapper
8572
+ 'no-results': {
8573
+ padding: `${spacingStaticSmall} 12px`,
8574
+ boxSizing: 'border-box',
8575
+ color: contrastHighColor,
8576
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8577
+ color: contrastHighColorDark,
8578
+ }),
8579
+ ...getNoResultsOptionJssStyle(),
8580
+ },
8581
+ // TODO: maybe we should extract it as functional component too
8582
+ 'sr-only': getHiddenTextJssStyle(),
8583
+ // .label / .required
8584
+ ...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
8585
+ // .message
8586
+ ...getFunctionalComponentStateMessageStyles(theme, state),
8587
+ });
8590
8588
  };
8591
8589
 
8592
8590
  const cssVarInternalOptgroupScaling = '--p-internal-optgroup-scaling';
8593
8591
  const scalingVar = `var(${cssVarInternalOptgroupScaling}, 1)`;
8594
- const getComponentCss$A = (isDisabled, theme) => getCss({
8595
- '@global': {
8596
- ':host': addImportantToEachRule({
8597
- ...colorSchemeStyles,
8598
- ...hostHiddenStyles,
8599
- }),
8600
- '::slotted(*)': {
8601
- [cssVariableSelectPaddingInlineStart]: '28px',
8602
- [cssVariableMultiSelectPaddingInlineStart]: '28px',
8603
- },
8604
- },
8605
- ...getOptgroupStyles(isDisabled, theme),
8606
- });
8607
- const getOptgroupStyles = (isDisabled, theme) => {
8592
+ const getComponentCss$B = (isDisabled, theme) => {
8608
8593
  const { primaryColor, disabledColor } = getThemedColors(theme);
8609
8594
  const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
8610
- const gap = `max(2px, ${scalingVar} * ${spacingStaticSmall})`;
8611
8595
  const padding = `max(2px, ${scalingVar} * ${spacingStaticSmall}) max(4px, ${scalingVar} * 12px)`;
8612
- return {
8613
- optgroup: {
8614
- display: 'flex',
8615
- flexDirection: 'column',
8616
- gap,
8617
- },
8618
- label: {
8619
- color: primaryColor,
8620
- ...prefersColorSchemeDarkMediaQuery(theme, {
8621
- color: primaryColorDark,
8596
+ const gap = `max(2px, ${scalingVar} * ${spacingStaticSmall})`;
8597
+ return getCss({
8598
+ '@global': {
8599
+ ':host': addImportantToEachRule({
8600
+ ...colorSchemeStyles,
8601
+ ...hostHiddenStyles,
8622
8602
  }),
8623
- ...(isDisabled && {
8624
- color: disabledColor,
8603
+ '::slotted(*)': {
8604
+ '--p-internal-select-option-padding-left': '28px',
8605
+ '--p-internal-multi-select-option-padding-left': '28px',
8606
+ },
8607
+ '[role="group"]': {
8608
+ display: 'flex',
8609
+ flexDirection: 'column',
8610
+ gap,
8611
+ },
8612
+ '[role="presentation"]': {
8613
+ padding,
8614
+ font: textXSmallStyle.font.replace(' 400 ', ` ${fontWeightSemiBold} `),
8615
+ color: primaryColor,
8625
8616
  ...prefersColorSchemeDarkMediaQuery(theme, {
8626
- color: disabledColorDark,
8617
+ color: primaryColorDark,
8627
8618
  }),
8628
- }),
8629
- display: 'block',
8630
- padding,
8631
- fontSize: fontSizeTextXSmall,
8632
- fontWeight: fontWeightSemiBold,
8619
+ ...(isDisabled && {
8620
+ color: disabledColor,
8621
+ ...prefersColorSchemeDarkMediaQuery(theme, {
8622
+ color: disabledColorDark,
8623
+ }),
8624
+ }),
8625
+ },
8633
8626
  },
8634
- };
8627
+ });
8635
8628
  };
8636
8629
 
8637
8630
  const mediaQueryMinS = getMediaQueryMin('s');
@@ -8644,7 +8637,7 @@ const disabledCursorStyle = {
8644
8637
  pointerEvents: 'none', // prevents :hover (has no effect when forced), maybe we can remove it since CSS selectors already cover desired behavior
8645
8638
  };
8646
8639
  const hiddenStyle = { display: 'none' };
8647
- const getComponentCss$z = (activePage, pageTotal, showLastPage, theme) => {
8640
+ const getComponentCss$A = (activePage, pageTotal, showLastPage, theme) => {
8648
8641
  const { primaryColor, disabledColor, hoverColor } = getThemedColors(theme);
8649
8642
  const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, hoverColor: hoverColorDark, } = getThemedColors('dark');
8650
8643
  return getCss({
@@ -8780,7 +8773,7 @@ const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(sty
8780
8773
  return [key, value];
8781
8774
  }));
8782
8775
 
8783
- const getComponentCss$y = (hideLabel, state, isDisabled, isLoading, length, theme) => {
8776
+ const getComponentCss$z = (hideLabel, state, isDisabled, isLoading, length, theme) => {
8784
8777
  const inputSize = `calc(${fontLineHeight} + 10px + ${borderWidthBase} * 2 + ${spacingStaticSmall} * 2)`; // equivalent to calculation of input height within form-styles
8785
8778
  const inputStyles = removeStyles('input[readonly]', removeSlottedSelector(getSlottedTextFieldTextareaSelectStyles('input', state, isLoading, theme, {
8786
8779
  // TODO: move into getSlottedTextFieldTextareaSelectStyles()
@@ -8860,12 +8853,20 @@ const getComponentCss$y = (hideLabel, state, isDisabled, isLoading, length, them
8860
8853
  const POPOVER_SAFE_ZONE = 8;
8861
8854
 
8862
8855
  const { canvasTextColor } = getHighContrastColors();
8863
- const getComponentCss$x = (theme) => {
8856
+ const getComponentCss$y = (theme) => {
8864
8857
  const { hoverColor, backgroundColor, primaryColor, backgroundSurfaceColor } = getThemedColors(theme);
8865
8858
  const { hoverColor: hoverColorDark, primaryColor: primaryColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, } = getThemedColors('dark');
8866
8859
  const shadowColor = 'rgba(0,0,0,0.3)';
8867
8860
  return getCss({
8868
8861
  '@global': {
8862
+ '@keyframes fade-in': {
8863
+ from: {
8864
+ opacity: 0,
8865
+ },
8866
+ to: {
8867
+ opacity: 1,
8868
+ },
8869
+ },
8869
8870
  ':host': {
8870
8871
  position: 'relative', // ensures correct reference for floating ui fallback positioning in older browsers
8871
8872
  display: 'inline-block',
@@ -8900,25 +8901,21 @@ const getComponentCss$x = (theme) => {
8900
8901
  }),
8901
8902
  ...getFocusJssStyle(theme, { offset: 0 }),
8902
8903
  },
8904
+ '[popover]': {
8905
+ all: 'unset',
8906
+ position: 'absolute',
8907
+ pointerEvents: 'none',
8908
+ filter: `drop-shadow(0 0 16px ${shadowColor})`,
8909
+ animation: `var(${cssVariableAnimationDuration}, ${motionDurationShort}) fade-in ${motionEasingBase} forwards`,
8910
+ '&:not(:popover-open)': {
8911
+ display: 'none', // ensures popover is not flickering when closed in some situations
8912
+ },
8913
+ },
8903
8914
  },
8904
8915
  label: getHiddenTextJssStyle(),
8905
8916
  icon: {
8906
8917
  transform: 'translate3d(0,0,0)', // Fixes movement on hover in Safari
8907
8918
  },
8908
- popover: {
8909
- all: 'unset',
8910
- position: 'absolute',
8911
- pointerEvents: 'none',
8912
- filter: `drop-shadow(0 0 16px ${shadowColor})`,
8913
- animation: `${motionDurationShort} $fadeIn ${motionEasingBase} forwards`
8914
- ,
8915
- '&:not(:popover-open)': {
8916
- display: 'none', // ensures popover is not flickering when closed in some situations
8917
- },
8918
- '&:-internal-popover-in-top-layer::backdrop': {
8919
- display: 'none',
8920
- },
8921
- },
8922
8919
  arrow: {
8923
8920
  position: 'absolute',
8924
8921
  width: '24px',
@@ -8949,17 +8946,9 @@ const getComponentCss$x = (theme) => {
8949
8946
  background: isThemeDark(theme) ? backgroundSurfaceColor : backgroundColor,
8950
8947
  color: primaryColor,
8951
8948
  ...prefersColorSchemeDarkMediaQuery(theme, {
8952
- background: backgroundSurfaceColorDark,
8953
- color: primaryColorDark,
8954
- }),
8955
- },
8956
- '@keyframes fadeIn': {
8957
- from: {
8958
- opacity: 0,
8959
- },
8960
- to: {
8961
- opacity: 1,
8962
- },
8949
+ background: backgroundSurfaceColorDark,
8950
+ color: primaryColorDark,
8951
+ }),
8963
8952
  },
8964
8953
  });
8965
8954
  };
@@ -8967,7 +8956,7 @@ const getComponentCss$x = (theme) => {
8967
8956
  const getCheckedSVGBackgroundImage = (fill) => {
8968
8957
  return getInlineSVGBackgroundImage(`<circle fill="${fill}" cx="12" cy="12" r="6"/>`);
8969
8958
  };
8970
- const getComponentCss$w = (hideLabel, state, isDisabled, isLoading, theme) => {
8959
+ const getComponentCss$x = (hideLabel, state, isDisabled, isLoading, theme) => {
8971
8960
  const checkedIconColor = escapeHashCharacter(getInvertedThemedColors(theme).primaryColor);
8972
8961
  const checkedIconColorDark = escapeHashCharacter(getInvertedThemedColors('dark').primaryColor);
8973
8962
  return getCss({
@@ -9069,7 +9058,7 @@ const getGradient = (theme, gradientColorTheme) => {
9069
9058
  `rgba(${gradientColor},0)`);
9070
9059
  };
9071
9060
  const prevNextWrapperWidth = `calc(${fontLineHeight} + 24px)`;
9072
- const getComponentCss$v = (gradientColor, isNextHidden, isPrevHidden, scrollIndicatorPosition, hasScrollbar, theme) => {
9061
+ const getComponentCss$w = (gradientColor, isNextHidden, isPrevHidden, scrollIndicatorPosition, hasScrollbar, theme) => {
9073
9062
  const actionPrevNextStyles = {
9074
9063
  position: 'absolute',
9075
9064
  top: 0,
@@ -9202,7 +9191,7 @@ const getColors$2 = (isDisabled, isSelected, theme) => {
9202
9191
  };
9203
9192
  };
9204
9193
  const getItemPadding = (hasIconAndSlottedContent) => hasIconAndSlottedContent ? `13px ${ITEM_PADDING} 13px 13px` : `13px ${ITEM_PADDING}`;
9205
- const getComponentCss$u = (isDisabled, isSelected, hasIcon, hasSlottedContent, theme) => {
9194
+ const getComponentCss$v = (isDisabled, isSelected, hasIcon, hasSlottedContent, theme) => {
9206
9195
  const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$2(isDisabled, isSelected, theme);
9207
9196
  const { buttonColor: buttonColorDark, labelColor: labelColorDark, borderColor: borderColorDark, hoverBorderColor: hoverBorderColorDark, } = getColors$2(isDisabled, isSelected, 'dark');
9208
9197
  return getCss({
@@ -9273,7 +9262,7 @@ const getComponentCss$u = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
9273
9262
  }),
9274
9263
  });
9275
9264
  };
9276
- const getComponentCss$t = (maxWidth, columns) => {
9265
+ const getComponentCss$u = (maxWidth, columns) => {
9277
9266
  return getCss({
9278
9267
  '@global': {
9279
9268
  ':host': {
@@ -9294,17 +9283,19 @@ const getComponentCss$t = (maxWidth, columns) => {
9294
9283
  });
9295
9284
  };
9296
9285
 
9297
- const dropdownPositionVar = '--p-internal-dropdown-position';
9298
- const getButtonStyles$1 = (direction, isOpen, state, theme) => {
9286
+ const anchorName$1 = '--anchor-select-wrapper';
9287
+ const getButtonStyles = (isOpen, state, hasNativeCSSAnchorPositioningSupport, theme) => {
9299
9288
  const { primaryColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
9300
9289
  const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
9301
9290
  const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
9302
9291
  const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
9303
- const isDirectionDown = direction === 'down';
9304
9292
  return {
9305
9293
  '@global': {
9306
9294
  // TODO: extract generic default button/anchor reset style
9307
9295
  button: {
9296
+ ...(hasNativeCSSAnchorPositioningSupport && {
9297
+ anchorName: anchorName$1,
9298
+ }),
9308
9299
  position: 'absolute',
9309
9300
  inset: 0,
9310
9301
  width: '100%', // fixes Firefox positioning issue
@@ -9320,42 +9311,31 @@ const getButtonStyles$1 = (direction, isOpen, state, theme) => {
9320
9311
  ...prefersColorSchemeDarkMediaQuery(theme, {
9321
9312
  borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
9322
9313
  }),
9323
- // TODO: getFocusJssStyle() can't be re-used because focus style differs for form elements
9324
- '&:focus, &:focus ~ ul': {
9325
- borderColor: primaryColor,
9314
+ '&:disabled': {
9315
+ cursor: 'not-allowed',
9316
+ borderColor: disabledColor,
9326
9317
  ...prefersColorSchemeDarkMediaQuery(theme, {
9327
- borderColor: primaryColorDark,
9318
+ borderColor: disabledColorDark,
9328
9319
  }),
9329
9320
  },
9330
9321
  ...hoverMediaQuery({
9331
- '&:not(:disabled):not(:focus):hover': {
9322
+ '&:not(:disabled):hover': {
9332
9323
  borderColor: isOpen ? primaryColor : formStateHoverColor || primaryColor,
9333
9324
  ...prefersColorSchemeDarkMediaQuery(theme, {
9334
9325
  borderColor: isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark,
9335
9326
  }),
9336
9327
  },
9337
9328
  }),
9338
- '&:disabled': {
9339
- cursor: 'not-allowed',
9340
- borderColor: disabledColor,
9341
- ...prefersColorSchemeDarkMediaQuery(theme, {
9342
- borderColor: disabledColorDark,
9343
- }),
9344
- },
9345
- ...(isOpen && {
9346
- [isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
9347
- [isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
9348
- }),
9329
+ ...getFocusJssStyle(theme),
9349
9330
  },
9350
9331
  },
9351
9332
  };
9352
9333
  };
9353
- const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
9334
+ const getFilterStyles = (isOpen, state, disabled, hasNativeCSSAnchorPositioningSupport, theme) => {
9354
9335
  const { primaryColor, backgroundColor, disabledColor, contrastMediumColor } = getThemedColors(theme);
9355
9336
  const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, disabledColor: disabledColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
9356
9337
  const { formStateHoverColor, formStateColor } = getThemedFormStateColors(theme, state);
9357
9338
  const { formStateHoverColor: formStateHoverColorDark, formStateColor: formStateColorDark } = getThemedFormStateColors('dark', state);
9358
- const isDirectionDown = direction === 'down';
9359
9339
  const placeHolderJssStyle = {
9360
9340
  opacity: 1,
9361
9341
  color: disabled ? disabledColor : primaryColor,
@@ -9395,6 +9375,9 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
9395
9375
  color: primaryColorDark,
9396
9376
  background: backgroundColorDark,
9397
9377
  }),
9378
+ ...(hasNativeCSSAnchorPositioningSupport && {
9379
+ anchorName: anchorName$1,
9380
+ }),
9398
9381
  '&::placeholder': {
9399
9382
  ...placeHolderJssStyle,
9400
9383
  ...prefersColorSchemeDarkMediaQuery(theme, placeHolderDarkJssStyle),
@@ -9447,115 +9430,29 @@ const getFilterStyles = (direction, isOpen, state, disabled, theme) => {
9447
9430
  borderColor: isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark,
9448
9431
  }),
9449
9432
  borderRadius: borderRadiusSmall,
9450
- ...(isOpen && {
9451
- [isDirectionDown ? 'borderBottomLeftRadius' : 'borderTopLeftRadius']: 0,
9452
- [isDirectionDown ? 'borderBottomRightRadius' : 'borderTopRightRadius']: 0,
9453
- }),
9454
9433
  },
9455
9434
  },
9456
9435
  },
9457
9436
  };
9458
9437
  };
9459
- const getListStyles$1 = (direction, theme) => {
9460
- const isDirectionDown = direction === 'down';
9461
- const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, disabledColor: disabledColorDark, contrastHighColor: contrastHighColorDark, backgroundSurfaceColor: backgroundSurfaceColorDark, contrastLowColor: contrastLowColorDark, } = getThemedColors('dark');
9462
- const { primaryColor, backgroundColor, contrastMediumColor, contrastHighColor, backgroundSurfaceColor, disabledColor, contrastLowColor, } = getThemedColors(theme);
9463
- const { highlightColor } = getHighContrastColors();
9438
+ const getListStyles = (direction, isOpen, theme) => {
9439
+ const { primaryColor, disabledColor } = getThemedColors(theme);
9440
+ const { primaryColor: primaryColorDark, disabledColor: disabledColorDark } = getThemedColors('dark');
9464
9441
  return {
9465
9442
  '@global': {
9466
- '[role="listbox"]': {
9467
- display: 'flex',
9468
- flexDirection: 'column',
9469
- gap: spacingStaticSmall,
9470
- position: `var(${dropdownPositionVar}, absolute)`, // for vrt tests
9471
- padding: '6px',
9472
- margin: 0,
9473
- background: backgroundColor,
9474
- ...textSmallStyle,
9475
- color: contrastHighColor,
9476
- zIndex: 10,
9477
- left: 0,
9478
- right: 0,
9479
- [isDirectionDown ? 'top' : 'bottom']: 'calc(100% - 2px)', // 2px border + 2px safety for rounded corners
9480
- boxSizing: 'border-box',
9481
- maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`, // 8px = gap, 6px = padding, 2px = border
9482
- overflowY: 'auto',
9483
- WebkitOverflowScrolling: 'touch',
9484
- scrollBehavior: 'smooth',
9485
- border: `2px solid ${primaryColor}`,
9486
- [isDirectionDown ? 'borderTop' : 'borderBottom']: addImportantToRule(`1px solid ${contrastMediumColor}`),
9487
- ...(isDirectionDown
9488
- ? ['borderBottomLeftRadius', 'borderBottomRightRadius']
9489
- : ['borderTopLeftRadius', 'borderTopRightRadius']).reduce((result, curr) => ({ ...result, [curr]: borderRadiusSmall }), {}),
9490
- scrollbarWidth: 'thin', // firefox
9491
- scrollbarColor: 'auto', // firefox
9492
- transition: getTransition('border-color'),
9493
- transform: 'translate3d(0,0,0)', // fix iOS bug if less than 5 items are displayed
9494
- ...prefersColorSchemeDarkMediaQuery(theme, {
9495
- color: contrastHighColorDark,
9496
- background: backgroundColorDark,
9497
- borderColor: primaryColorDark,
9498
- [isDirectionDown ? 'borderTopColor' : 'borderBottomColor']: addImportantToRule(contrastMediumColorDark),
9499
- }),
9500
- },
9443
+ // @keyframes fade-in
9444
+ ...getPopoverKeyframesStyles,
9445
+ '[popover]': getPopoverJssStyle(isOpen, direction, anchorName$1, 1, 40, theme),
9501
9446
  },
9502
9447
  option: {
9503
- display: 'flex',
9504
- justifyContent: 'space-between',
9505
- gap: '12px',
9506
- padding: `${spacingStaticSmall} 12px`,
9507
- flex: `1 0 calc(${fontLineHeight} + ${spacingStaticSmall} * 2)`,
9508
- cursor: 'pointer',
9509
- textAlign: 'start',
9510
- wordBreak: 'break-word',
9511
- boxSizing: 'border-box',
9512
- borderRadius: borderRadiusSmall,
9513
- transition: `${getTransition('background-color')}, ${getTransition('color')}`,
9514
- ...getNoResultsOptionJssStyle(),
9515
- ...hoverMediaQuery({
9516
- '&:not([aria-disabled]):not(.option--disabled):not([role=status]):hover': {
9517
- color: isHighContrastMode ? highlightColor : primaryColor,
9518
- background: contrastLowColor,
9519
- ...prefersColorSchemeDarkMediaQuery(theme, {
9520
- color: isHighContrastMode ? highlightColor : primaryColorDark,
9521
- background: contrastLowColorDark,
9522
- }),
9523
- },
9524
- }),
9525
- '&--highlighted': {
9526
- background: contrastLowColor,
9527
- ...prefersColorSchemeDarkMediaQuery(theme, {
9528
- background: contrastLowColorDark,
9529
- }),
9530
- },
9531
- '&--selected': {
9532
- cursor: 'default',
9533
- pointerEvents: 'none',
9534
- background: backgroundSurfaceColor,
9535
- ...prefersColorSchemeDarkMediaQuery(theme, {
9536
- background: backgroundSurfaceColorDark,
9537
- }),
9538
- },
9539
- '&--highlighted, &--selected': {
9540
- color: isHighContrastMode ? highlightColor : primaryColor,
9541
- ...prefersColorSchemeDarkMediaQuery(theme, {
9542
- color: isHighContrastMode ? highlightColor : primaryColorDark,
9543
- }),
9544
- },
9545
- '&--disabled': {
9546
- cursor: 'not-allowed',
9547
- color: disabledColor,
9548
- ...prefersColorSchemeDarkMediaQuery(theme, {
9549
- color: disabledColorDark,
9550
- }),
9551
- },
9552
- '&--hidden': {
9553
- display: 'none',
9554
- },
9448
+ ...getOptionJssStyle('select-wrapper', 1, theme),
9555
9449
  '&--indent': {
9556
9450
  paddingLeft: '28px',
9557
9451
  },
9558
9452
  },
9453
+ icon: {
9454
+ marginInlineStart: 'auto',
9455
+ },
9559
9456
  optgroup: {
9560
9457
  '&--hidden': {
9561
9458
  display: 'none',
@@ -9577,7 +9474,7 @@ const getListStyles$1 = (direction, theme) => {
9577
9474
  },
9578
9475
  };
9579
9476
  };
9580
- const getComponentCss$s = (direction, isOpen, state, disabled, filter, isNativePopoverCase, theme) => {
9477
+ const getComponentCss$t = (direction, isOpen, state, disabled, filter, hasNativeCSSAnchorPositioningSupport, theme) => {
9581
9478
  return getCss(
9582
9479
  // merge because of global styles
9583
9480
  mergeDeep({
@@ -9591,17 +9488,12 @@ const getComponentCss$s = (direction, isOpen, state, disabled, filter, isNativeP
9591
9488
  'sr-text': {
9592
9489
  display: 'none',
9593
9490
  },
9594
- ...(isNativePopoverCase && {
9595
- popover: {
9596
- ...getPopoverResetJssStyle(),
9597
- },
9598
- }),
9599
9491
  }, filter
9600
- ? getFilterStyles(direction, isOpen, state, disabled, theme)
9601
- : getButtonStyles$1(direction, isOpen, state, theme), isOpen && getListStyles$1(direction, theme)));
9492
+ ? getFilterStyles(isOpen, state, disabled, hasNativeCSSAnchorPositioningSupport, theme)
9493
+ : getButtonStyles(isOpen, state, hasNativeCSSAnchorPositioningSupport, theme), getListStyles(direction, isOpen, theme)));
9602
9494
  };
9603
9495
 
9604
- const getComponentCss$r = (isDisabled, hasCustomDropdown, hideLabel, state, theme) => {
9496
+ const getComponentCss$s = (isDisabled, hasCustomDropdown, hideLabel, state, theme) => {
9605
9497
  return getCss({
9606
9498
  '@global': {
9607
9499
  ':host': {
@@ -9659,21 +9551,37 @@ const getComponentCss$r = (isDisabled, hasCustomDropdown, hideLabel, state, them
9659
9551
  });
9660
9552
  };
9661
9553
 
9662
- const cssVarBackgroundColor = '--p-select-background-color';
9663
- const cssVarTextColor = '--p-select-text-color';
9664
- const cssVarBorderColor = '--p-select-border-color';
9665
- const cssVarIconFilter = '--p-select-icon-filter';
9666
- const cssVarBackgroundColorFocus = '--p-select-focus-background-color';
9667
- const cssVarBorderColorFocus = '--p-select-focus-border-color';
9554
+ const cssVarInternalSelectOptionScaling = '--p-internal-select-option-scaling';
9555
+ const getComponentCss$r = (theme) => {
9556
+ return getCss({
9557
+ '@global': {
9558
+ ':host': {
9559
+ display: 'block',
9560
+ },
9561
+ ...addImportantToEachRule({
9562
+ ':host': {
9563
+ scrollMargin: '6px', // Aligns option when list is scrolled by navigating with keyboard
9564
+ ...hostHiddenStyles,
9565
+ },
9566
+ '::slotted(img)': getButtonImageJssStyle,
9567
+ }),
9568
+ ...preventFoucOfNestedElementsStyles,
9569
+ },
9570
+ option: getOptionJssStyle('select-option', `var(${cssVarInternalSelectOptionScaling}, 1)`, theme),
9571
+ icon: {
9572
+ marginInlineStart: 'auto',
9573
+ },
9574
+ });
9575
+ };
9576
+
9668
9577
  const cssVarInternalSelectScaling = '--p-internal-select-scaling';
9669
- const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNativePopoverCase, compact, theme, hasSlottedImage) => {
9670
- // Determines the scaling factor for the select size. In "compact" mode, it uses 0.5 to achieve a 36px select (compact size).
9671
- // Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalSelectScaling`.
9578
+ const anchorName = '--anchor-select';
9579
+ const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, compact, theme, hasSlottedImage) => {
9672
9580
  const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
9673
- const gap = `max(2px, ${scalingVar} * ${spacingStaticXSmall})`;
9674
- const gridTemplateColumns = `minmax(0, 1fr) auto auto calc(max(2px, ${scalingVar} * ${formElementLayeredGap}) + ${borderWidthBase})`;
9675
9581
  return getCss({
9676
9582
  '@global': {
9583
+ // @keyframes fade-in
9584
+ ...getPopoverKeyframesStyles,
9677
9585
  ':host': {
9678
9586
  display: 'block',
9679
9587
  ...addImportantToEachRule({
@@ -9686,201 +9594,27 @@ const getComponentCss$q = (direction, isOpen, isDisabled, hideLabel, state, isNa
9686
9594
  '--p-internal-optgroup-scaling': scalingVar,
9687
9595
  }),
9688
9596
  ...preventFoucOfNestedElementsStyles,
9689
- button: getButtonStyles(isDisabled, direction, isOpen, state, compact, theme, hasSlottedImage),
9597
+ button: {
9598
+ ...getButtonJssStyle('select', isOpen, isDisabled, state, hasSlottedImage, anchorName, scalingVar, theme),
9599
+ '& img': getButtonImageJssStyle,
9600
+ '& span': getButtonLabelJssStyle,
9601
+ },
9602
+ '[popover]': getPopoverJssStyle(isOpen, direction, anchorName, scalingVar, 40, theme),
9690
9603
  },
9691
9604
  root: {
9692
9605
  display: 'grid',
9693
- gap,
9606
+ gap: `max(2px, ${scalingVar} * ${spacingStaticXSmall})`,
9694
9607
  // 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.
9695
9608
  minWidth: `calc(1rem + ${formElementPaddingHorizontal} + ${borderWidthBase} * 2 + ${getCalculatedFormElementPaddingHorizontal(1)})`,
9696
9609
  },
9697
- wrapper: {
9698
- position: 'relative',
9699
- display: 'grid',
9700
- gridTemplateColumns,
9701
- },
9702
- icon: {
9703
- gridArea: '1/3',
9704
- placeSelf: 'center',
9705
- padding: formButtonOrIconPadding,
9706
- pointerEvents: 'none',
9707
- transform: 'rotate3d(0,0,1,0.0001deg)', // needs to be a little more than 0 for correct direction in safari
9708
- transition: getTransition('transform'),
9709
- ...(!isHighContrastMode && {
9710
- filter: `var(${cssVarIconFilter})`,
9711
- }),
9712
- '&--rotate': {
9713
- transform: 'rotate3d(0,0,1,180deg)',
9714
- },
9715
- },
9716
- listbox: getListStyles(isOpen, direction, compact, theme),
9610
+ icon: getIconJssStyle('select', isOpen),
9717
9611
  'sr-only': getHiddenTextJssStyle(),
9718
9612
  // .label / .required
9719
9613
  ...getFunctionalComponentLabelStyles(isDisabled, hideLabel, theme),
9720
9614
  // .message
9721
9615
  ...getFunctionalComponentStateMessageStyles(theme, state),
9722
- ...(isNativePopoverCase && {
9723
- popover: {
9724
- ...getPopoverResetJssStyle(),
9725
- },
9726
- }),
9727
9616
  });
9728
9617
  };
9729
- // TODO: Rename to JSSStyles
9730
- // TODO: use getSlottedTextFieldTextareaSelectStyles() instead an manipulate selectors like done with PIN Code or even better make it configurable as parameter
9731
- const getButtonStyles = (isDisabled, direction, isOpen, state, compact, theme, hasSlottedImage) => {
9732
- const { primaryColor, disabledColor, backgroundColor, contrastMediumColor } = getThemedColors(theme);
9733
- const { primaryColor: primaryColorDark, disabledColor: disabledColorDark, backgroundColor: backgroundColorDark, contrastMediumColor: contrastMediumColorDark, } = getThemedColors('dark');
9734
- const { formStateColor, formStateHoverColor } = getThemedFormStateColors(theme, state);
9735
- const { formStateColor: formStateColorDark, formStateHoverColor: formStateHoverColorDark } = getThemedFormStateColors('dark', state);
9736
- const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
9737
- const height = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
9738
- const paddingBlock = `max(2px, ${scalingVar} * ${formElementPaddingVertical})`;
9739
- const paddingInline = `max(4px, ${scalingVar} * ${formElementPaddingHorizontal}) ${getCalculatedFormElementPaddingHorizontal(1)}`;
9740
- const gap = `max(4px, ${scalingVar} * 12px)`;
9741
- return {
9742
- textAlign: 'start', // TODO: Newly added (rest is copied from select-wrapper-dropdown), share rest for both components
9743
- overflowX: 'hidden', // TODO: Newly added (rest is copied from select-wrapper-dropdown), share rest for both components
9744
- whiteSpace: 'nowrap', // TODO: Newly added (rest is copied from select-wrapper-dropdown), share rest for both components
9745
- gridArea: '1/1/1/-1',
9746
- minWidth: 0,
9747
- // TODO: abstract and re-use for multi-select, select-wrapper and text-field-wrapper
9748
- height,
9749
- font: textSmallStyle.font.replace('ex', 'ex + 6px'), // a minimum line-height is needed for input, otherwise value is scrollable in Chrome, +6px is alig
9750
- margin: 0, // necessary reset for iOS Safari 15 (and maybe other browsers)
9751
- paddingBlock,
9752
- paddingInline,
9753
- boxSizing: 'content-box',
9754
- outline: 0,
9755
- WebkitAppearance: 'none', // iOS safari
9756
- appearance: 'none',
9757
- ...textSmallStyle,
9758
- textOverflow: 'ellipsis',
9759
- cursor: 'pointer',
9760
- '&:disabled': {
9761
- cursor: 'not-allowed',
9762
- },
9763
- transition: `${getTransition('background-color')}, ${getTransition('border-color')}, ${getTransition('color')}`, // for smooth transitions between e.g. disabled states
9764
- color: `var(${cssVarTextColor}, ${primaryColor})`,
9765
- background: `var(${cssVarBackgroundColor}, ${backgroundColor})`,
9766
- border: `${borderWidthBase} solid var(${cssVarBorderColor}, ${isOpen ? primaryColor : formStateColor || contrastMediumColor})`,
9767
- borderRadius: borderRadiusSmall,
9768
- '&:not(:focus-visible)': {
9769
- ...getPlaceholderJssStyle({
9770
- color: `var(${cssVarTextColor}, ${primaryColor})`,
9771
- opacity: 1,
9772
- }),
9773
- ...prefersColorSchemeDarkMediaQuery(theme, getPlaceholderJssStyle({
9774
- color: `var(${cssVarTextColor}, ${primaryColorDark})`,
9775
- opacity: 1, // Opacity fixes placeholder being shown lighter in firefox
9776
- })),
9777
- },
9778
- ...(hasSlottedImage && {
9779
- '& > span': {
9780
- display: 'flex',
9781
- gap,
9782
- alignItems: 'center',
9783
- },
9784
- '& > span > span': {
9785
- textOverflow: 'ellipsis',
9786
- overflow: 'hidden',
9787
- },
9788
- '& img': {
9789
- height: fontLineHeight,
9790
- borderRadius: borderRadiusSmall,
9791
- width: 'auto',
9792
- },
9793
- }),
9794
- ...hoverMediaQuery({
9795
- '&:hover:not(:disabled):not(:focus-visible),label:hover~.wrapper &:not(:disabled):not(:focus-visible)': {
9796
- borderColor: `var(${cssVarBorderColor}, ${isOpen ? primaryColor : formStateHoverColor || primaryColor})`,
9797
- ...prefersColorSchemeDarkMediaQuery(theme, {
9798
- borderColor: `var(${cssVarBorderColor}, ${isOpen ? primaryColorDark : formStateHoverColorDark || primaryColorDark})`,
9799
- }),
9800
- },
9801
- }),
9802
- ...(!isDisabled && {
9803
- '&:focus-visible': {
9804
- borderColor: `var(${cssVarBorderColorFocus}, ${primaryColor})`,
9805
- background: `var(${cssVarBackgroundColorFocus}, ${backgroundColor})`,
9806
- ...prefersColorSchemeDarkMediaQuery(theme, {
9807
- borderColor: `var(${cssVarBorderColorFocus}, ${primaryColorDark})`,
9808
- background: `var(${cssVarBackgroundColorFocus}, ${backgroundColorDark})`,
9809
- }),
9810
- },
9811
- }),
9812
- ...(isOpen && {
9813
- ['paddingBottom' ]: `calc(${paddingBlock} + 1px)`, // Add padding to keep same height when border changes
9814
- ['borderBottom' ]: addImportantToRule(`1px solid ${contrastMediumColor}`),
9815
- ['borderBottomLeftRadius' ]: 0,
9816
- ['borderBottomRightRadius' ]: 0,
9817
- }),
9818
- ...(isDisabled && {
9819
- ...getPlaceholderJssStyle({
9820
- color: disabledColor,
9821
- }),
9822
- cursor: 'not-allowed',
9823
- color: disabledColor,
9824
- borderColor: disabledColor,
9825
- WebkitTextFillColor: disabledColor,
9826
- }),
9827
- ...prefersColorSchemeDarkMediaQuery(theme, {
9828
- color: `var(${cssVarTextColor}, ${primaryColorDark})`,
9829
- background: `var(${cssVarBackgroundColor}, ${backgroundColorDark})`,
9830
- border: `${borderWidthBase} solid var(${cssVarBorderColor}, ${isOpen ? primaryColorDark : formStateColorDark || contrastMediumColorDark})`,
9831
- ...(isOpen && {
9832
- ['borderBottom' ]: addImportantToRule(`1px solid ${contrastMediumColorDark}`),
9833
- }),
9834
- ...(isDisabled && {
9835
- ...getPlaceholderJssStyle({ color: disabledColorDark }),
9836
- color: disabledColorDark,
9837
- borderColor: disabledColorDark,
9838
- WebkitTextFillColor: disabledColorDark,
9839
- }),
9840
- }),
9841
- };
9842
- };
9843
- // TODO: Rename to JSSStyles
9844
- // TODO: Copied from multi-select, extract and use in select and multi-select
9845
- const getListStyles = (isOpen, direction, compact, theme) => {
9846
- const { primaryColor, backgroundColor } = getThemedColors(theme);
9847
- const { primaryColor: primaryColorDark, backgroundColor: backgroundColorDark } = getThemedColors('dark');
9848
- const scalingVar = `var(${cssVarInternalSelectScaling}, ${compact ? 0.5 : 1})`;
9849
- const gap = `max(2px, ${scalingVar} * ${spacingStaticSmall})`;
9850
- const padding = `max(2px, ${scalingVar} * 6px)`;
9851
- return {
9852
- position: 'absolute',
9853
- margin: 0,
9854
- display: isOpen ? 'flex' : 'none',
9855
- flexDirection: 'column',
9856
- gap,
9857
- padding,
9858
- ...textSmallStyle,
9859
- zIndex: 10,
9860
- // TODO: Inset inline 0
9861
- left: 0,
9862
- right: 0,
9863
- ['top' ]: '100%',
9864
- boxSizing: 'border-box',
9865
- maxHeight: `${8.5 * (OPTION_HEIGHT + 8) + 6 + 2}px`, // 8.5 options * option height + 8px gap + additional spacing (6px = padding, 2px = border)
9866
- overflowY: 'auto',
9867
- WebkitOverflowScrolling: 'touch',
9868
- background: backgroundColor,
9869
- border: `2px solid var(${cssVarBorderColor}, ${primaryColor})`,
9870
- ['borderTop' ]: 'none',
9871
- borderRadius: borderRadiusSmall,
9872
- ['borderTopLeftRadius' ]: 0,
9873
- ['borderTopRightRadius' ]: 0,
9874
- scrollbarWidth: 'thin', // firefox
9875
- scrollbarColor: 'auto', // firefox
9876
- transition: getTransition('border-color'),
9877
- transform: 'translate3d(0,0,0)', // fix iOS bug if less than 5 items are displayed
9878
- ...prefersColorSchemeDarkMediaQuery(theme, {
9879
- background: backgroundColorDark,
9880
- borderColor: `var(${cssVarBorderColor}, ${primaryColorDark})`,
9881
- }),
9882
- };
9883
- };
9884
9618
 
9885
9619
  const getComponentCss$p = (isOpen, hasDismissButton, theme) => {
9886
9620
  return getCss({
@@ -10318,33 +10052,12 @@ const getComponentCss$k = () => {
10318
10052
  });
10319
10053
  };
10320
10054
 
10321
- const getComponentCss$j = (multiline) => {
10322
- return getCss({
10323
- '@global': {
10324
- ':host': {
10325
- display: 'table-cell',
10326
- verticalAlign: 'middle',
10327
- ...addImportantToEachRule({
10328
- padding: spacingFluidSmall,
10329
- margin: 0,
10330
- whiteSpace: multiline ? 'normal' : 'nowrap',
10331
- ...hostHiddenStyles,
10332
- }),
10333
- },
10334
- },
10335
- });
10336
- };
10337
-
10338
- const isDirectionAsc = (dir) => dir === 'asc';
10339
- const isSortable = (active, direction) => {
10340
- return active !== undefined && direction !== undefined;
10341
- };
10342
-
10055
+ const cssVariableTablePadding = '--p-internal-table-padding';
10343
10056
  const cssVariableTableHoverColor = '--p-internal-table-hover-color';
10344
10057
  const cssVariableTableBorderColor = '--p-internal-table-border-color';
10345
10058
  const cssVariableTableBorderWidth = '--p-internal-table-border-width';
10346
10059
  const cssVariableTableHeadCellIconFilter = '--p-internal-table-head-cell-icon-filter';
10347
- const getComponentCss$i = (theme) => {
10060
+ const getComponentCss$j = (compact, layout, theme) => {
10348
10061
  const { primaryColor, hoverColor, contrastLowColor } = doGetThemedColors(theme);
10349
10062
  const { primaryColor: primaryColorDark, hoverColor: hoverColorDark, contrastLowColor: contrastLowColorDark, } = doGetThemedColors('dark');
10350
10063
  return getCss({
@@ -10364,6 +10077,7 @@ const getComponentCss$i = (theme) => {
10364
10077
  },
10365
10078
  ...preventFoucOfNestedElementsStyles,
10366
10079
  '::slotted(*)': addImportantToEachRule({
10080
+ ...(compact && { [cssVariableTablePadding]: spacingStaticSmall }),
10367
10081
  [cssVariableTableHoverColor]: hoverColor,
10368
10082
  [cssVariableTableBorderColor]: contrastLowColor,
10369
10083
  [cssVariableTableHeadCellIconFilter]: isThemeDark(theme) ? 'invert(100%)' : 'none',
@@ -10386,12 +10100,41 @@ const getComponentCss$i = (theme) => {
10386
10100
  table: {
10387
10101
  display: 'table',
10388
10102
  borderCollapse: 'collapse',
10389
- width: '100%',
10103
+ // with table-layout: fixed, width: 100% crops border-bottom of p-table-row when scrollable
10104
+ // also relative width units (%, vw) don't work as expected when scrollable or combined with auto columns
10105
+ ...(layout === 'fixed'
10106
+ ? {
10107
+ tableLayout: 'fixed',
10108
+ minWidth: '100%',
10109
+ }
10110
+ : { width: '100%' }),
10390
10111
  whiteSpace: 'nowrap', // shouldn't be inherited for caption, that's why it's defined here
10391
10112
  },
10392
10113
  });
10393
10114
  };
10394
10115
 
10116
+ const getComponentCss$i = (multiline) => {
10117
+ return getCss({
10118
+ '@global': {
10119
+ ':host': {
10120
+ display: 'table-cell',
10121
+ verticalAlign: 'middle',
10122
+ ...addImportantToEachRule({
10123
+ padding: `var(${cssVariableTablePadding}, ${spacingFluidSmall})`,
10124
+ margin: 0,
10125
+ whiteSpace: multiline ? 'normal' : 'nowrap',
10126
+ ...hostHiddenStyles,
10127
+ }),
10128
+ },
10129
+ },
10130
+ });
10131
+ };
10132
+
10133
+ const isDirectionAsc = (dir) => dir === 'asc';
10134
+ const isSortable = (active, direction) => {
10135
+ return active !== undefined && direction !== undefined;
10136
+ };
10137
+
10395
10138
  const { hoverColor } = getThemedColors('light'); // hover color and focus color are the same for light and dark
10396
10139
  const buttonBeforeOffsetVertical = '-2px';
10397
10140
  const buttonBeforeOffsetHorizontal = '-4px';
@@ -10402,7 +10145,7 @@ const getComponentCss$h = (active, direction, hideLabel, multiline) => {
10402
10145
  ':host': {
10403
10146
  display: 'table-cell',
10404
10147
  ...addImportantToEachRule({
10405
- padding: `2px ${spacingFluidSmall} ${spacingFluidSmall}`,
10148
+ padding: `2px var(${cssVariableTablePadding}, ${spacingFluidSmall}) var(${cssVariableTablePadding}, ${spacingFluidSmall})`,
10406
10149
  verticalAlign: 'bottom',
10407
10150
  whiteSpace: multiline ? 'normal' : 'nowrap',
10408
10151
  ...hostHiddenStyles,
@@ -11453,26 +11196,26 @@ exports.getModalCss = getComponentCss$F;
11453
11196
  exports.getModelSignatureCss = getComponentCss$E;
11454
11197
  exports.getMultiSelectCss = getComponentCss$C;
11455
11198
  exports.getMultiSelectOptionCss = getComponentCss$D;
11456
- exports.getOptgroupCss = getComponentCss$A;
11457
- exports.getPaginationCss = getComponentCss$z;
11458
- exports.getPinCodeCss = getComponentCss$y;
11459
- exports.getPopoverCss = getComponentCss$x;
11460
- exports.getRadioButtonWrapperCss = getComponentCss$w;
11461
- exports.getScrollerCss = getComponentCss$v;
11462
- exports.getSegmentedControlCss = getComponentCss$t;
11463
- exports.getSegmentedControlItemCss = getComponentCss$u;
11199
+ exports.getOptgroupCss = getComponentCss$B;
11200
+ exports.getPaginationCss = getComponentCss$A;
11201
+ exports.getPinCodeCss = getComponentCss$z;
11202
+ exports.getPopoverCss = getComponentCss$y;
11203
+ exports.getRadioButtonWrapperCss = getComponentCss$x;
11204
+ exports.getScrollerCss = getComponentCss$w;
11205
+ exports.getSegmentedControlCss = getComponentCss$u;
11206
+ exports.getSegmentedControlItemCss = getComponentCss$v;
11464
11207
  exports.getSelectCss = getComponentCss$q;
11465
- exports.getSelectOptionCss = getComponentCss$B;
11466
- exports.getSelectWrapperCss = getComponentCss$r;
11467
- exports.getSelectWrapperDropdownCss = getComponentCss$s;
11208
+ exports.getSelectOptionCss = getComponentCss$r;
11209
+ exports.getSelectWrapperCss = getComponentCss$s;
11210
+ exports.getSelectWrapperDropdownCss = getComponentCss$t;
11468
11211
  exports.getSheetCss = getComponentCss$p;
11469
11212
  exports.getSpinnerCss = getComponentCss$o;
11470
11213
  exports.getStepperHorizontalCss = getComponentCss$m;
11471
11214
  exports.getStepperHorizontalItemCss = getComponentCss$n;
11472
11215
  exports.getSwitchCss = getComponentCss$l;
11473
11216
  exports.getTableBodyCss = getComponentCss$k;
11474
- exports.getTableCellCss = getComponentCss$j;
11475
- exports.getTableCss = getComponentCss$i;
11217
+ exports.getTableCellCss = getComponentCss$i;
11218
+ exports.getTableCss = getComponentCss$j;
11476
11219
  exports.getTableHeadCellCss = getComponentCss$h;
11477
11220
  exports.getTableHeadCss = getComponentCss$f;
11478
11221
  exports.getTableHeadRowCss = getComponentCss$g;