@porsche-design-system/components-react 3.30.0-rc.1 → 3.30.0-rc.2
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 +20 -0
- package/cjs/lib/components/segmented-control.wrapper.cjs +3 -3
- package/esm/lib/components/segmented-control.wrapper.d.ts +8 -0
- package/esm/lib/components/segmented-control.wrapper.mjs +3 -3
- package/esm/lib/types.d.ts +7 -0
- package/package.json +2 -2
- package/ssr/cjs/components/dist/styles/esm/styles-entry.cjs +26 -12
- package/ssr/cjs/components/dist/utils/esm/utils-entry.cjs +2 -5
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control-item.wrapper.cjs +2 -2
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.cjs +4 -4
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.cjs +1 -1
- package/ssr/cjs/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.cjs +1 -1
- package/ssr/esm/components/dist/styles/esm/styles-entry.mjs +26 -12
- package/ssr/esm/components/dist/utils/esm/utils-entry.mjs +2 -5
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control-item.wrapper.mjs +2 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.mjs +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control-item.mjs +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/segmented-control.mjs +1 -1
- package/ssr/esm/lib/components/segmented-control.wrapper.d.ts +8 -0
- package/ssr/esm/lib/types.d.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0),
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [3.30.0-rc.2] - 2025-10-24
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `Flag`: added `AD, GI, LI, MC, ME, TW` flags & `XX` for unknown region
|
|
22
|
+
([#4074](https://github.com/porsche-design-system/porsche-design-system/pull/4074))
|
|
23
|
+
- `Segmented Control`: `compact` prop to enable a smaller, space-saving version for compact layouts
|
|
24
|
+
([#4020](https://github.com/porsche-design-system/porsche-design-system/pull/4020))
|
|
25
|
+
- Vue: export `prefixInjectionKey` ([#4079](https://github.com/porsche-design-system/porsche-design-system/pull/4079))
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- `Flag`: international flag replaces `DE` flag as fallback for an unknown region
|
|
30
|
+
([#4074](https://github.com/porsche-design-system/porsche-design-system/pull/4074))
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- `Radio Group`: fixed `compact` mode styles
|
|
35
|
+
([#4073](https://github.com/porsche-design-system/porsche-design-system/pull/4073))
|
|
36
|
+
|
|
17
37
|
## [3.30.0-rc.1] - 2025-10-21
|
|
18
38
|
|
|
19
39
|
### Added
|
|
@@ -6,17 +6,17 @@ var react = require('react');
|
|
|
6
6
|
var hooks = require('../../hooks.cjs');
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
|
|
9
|
-
const PSegmentedControl = /*#__PURE__*/ react.forwardRef(({ backgroundColor, columns = 'auto', disabled = false, form, name, onBlur, onChange, onSegmentedControlChange, onUpdate, theme, value, className, ...rest }, ref) => {
|
|
9
|
+
const PSegmentedControl = /*#__PURE__*/ react.forwardRef(({ backgroundColor, columns = 'auto', compact = false, disabled = false, form, name, onBlur, onChange, onSegmentedControlChange, onUpdate, theme, value, className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef(undefined);
|
|
11
11
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'segmentedControlChange', onSegmentedControlChange);
|
|
14
14
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
15
15
|
const WebComponentTag = hooks.usePrefix('p-segmented-control');
|
|
16
|
-
const propsToSync = [backgroundColor, columns, disabled, form, name, theme || hooks.useTheme(), value];
|
|
16
|
+
const propsToSync = [backgroundColor, columns, compact, disabled, form, name, theme || hooks.useTheme(), value];
|
|
17
17
|
hooks.useBrowserLayoutEffect(() => {
|
|
18
18
|
const { current } = elementRef;
|
|
19
|
-
['backgroundColor', 'columns', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
|
+
['backgroundColor', 'columns', 'compact', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
20
20
|
}, propsToSync);
|
|
21
21
|
const props = {
|
|
22
22
|
...rest,
|
|
@@ -9,6 +9,10 @@ export type PSegmentedControlProps = BaseProps & {
|
|
|
9
9
|
* Sets the amount of columns.
|
|
10
10
|
*/
|
|
11
11
|
columns?: BreakpointCustomizable<SegmentedControlColumns>;
|
|
12
|
+
/**
|
|
13
|
+
* A boolean value that, if present, renders the segmented-control as a compact version.
|
|
14
|
+
*/
|
|
15
|
+
compact?: boolean;
|
|
12
16
|
/**
|
|
13
17
|
* Disables the segmented-control.
|
|
14
18
|
*/
|
|
@@ -55,6 +59,10 @@ export declare const PSegmentedControl: import("react").ForwardRefExoticComponen
|
|
|
55
59
|
* Sets the amount of columns.
|
|
56
60
|
*/
|
|
57
61
|
columns?: BreakpointCustomizable<SegmentedControlColumns>;
|
|
62
|
+
/**
|
|
63
|
+
* A boolean value that, if present, renders the segmented-control as a compact version.
|
|
64
|
+
*/
|
|
65
|
+
compact?: boolean;
|
|
58
66
|
/**
|
|
59
67
|
* Disables the segmented-control.
|
|
60
68
|
*/
|
|
@@ -4,17 +4,17 @@ import { forwardRef, useRef } from 'react';
|
|
|
4
4
|
import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMergedClass } from '../../hooks.mjs';
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
|
|
7
|
-
const PSegmentedControl = /*#__PURE__*/ forwardRef(({ backgroundColor, columns = 'auto', disabled = false, form, name, onBlur, onChange, onSegmentedControlChange, onUpdate, theme, value, className, ...rest }, ref) => {
|
|
7
|
+
const PSegmentedControl = /*#__PURE__*/ forwardRef(({ backgroundColor, columns = 'auto', compact = false, disabled = false, form, name, onBlur, onChange, onSegmentedControlChange, onUpdate, theme, value, className, ...rest }, ref) => {
|
|
8
8
|
const elementRef = useRef(undefined);
|
|
9
9
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
10
10
|
useEventCallback(elementRef, 'change', onChange);
|
|
11
11
|
useEventCallback(elementRef, 'segmentedControlChange', onSegmentedControlChange);
|
|
12
12
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
13
13
|
const WebComponentTag = usePrefix('p-segmented-control');
|
|
14
|
-
const propsToSync = [backgroundColor, columns, disabled, form, name, theme || useTheme(), value];
|
|
14
|
+
const propsToSync = [backgroundColor, columns, compact, disabled, form, name, theme || useTheme(), value];
|
|
15
15
|
useBrowserLayoutEffect(() => {
|
|
16
16
|
const { current } = elementRef;
|
|
17
|
-
['backgroundColor', 'columns', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
17
|
+
['backgroundColor', 'columns', 'compact', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
18
|
}, propsToSync);
|
|
19
19
|
const props = {
|
|
20
20
|
...rest,
|
package/esm/lib/types.d.ts
CHANGED
|
@@ -502,6 +502,7 @@ declare const ICON_NAMES: readonly [
|
|
|
502
502
|
];
|
|
503
503
|
export type IconName = typeof ICON_NAMES[number];
|
|
504
504
|
declare const FLAG_NAMES: readonly [
|
|
505
|
+
"ad",
|
|
505
506
|
"ae",
|
|
506
507
|
"am",
|
|
507
508
|
"ar",
|
|
@@ -538,6 +539,7 @@ declare const FLAG_NAMES: readonly [
|
|
|
538
539
|
"gb",
|
|
539
540
|
"ge",
|
|
540
541
|
"gh",
|
|
542
|
+
"gi",
|
|
541
543
|
"gr",
|
|
542
544
|
"gt",
|
|
543
545
|
"hk",
|
|
@@ -560,12 +562,15 @@ declare const FLAG_NAMES: readonly [
|
|
|
560
562
|
"kw",
|
|
561
563
|
"kz",
|
|
562
564
|
"lb",
|
|
565
|
+
"li",
|
|
563
566
|
"lk",
|
|
564
567
|
"lt",
|
|
565
568
|
"lu",
|
|
566
569
|
"lv",
|
|
567
570
|
"ma",
|
|
571
|
+
"mc",
|
|
568
572
|
"md",
|
|
573
|
+
"me",
|
|
569
574
|
"mk",
|
|
570
575
|
"mn",
|
|
571
576
|
"mo",
|
|
@@ -602,12 +607,14 @@ declare const FLAG_NAMES: readonly [
|
|
|
602
607
|
"tn",
|
|
603
608
|
"tr",
|
|
604
609
|
"tt",
|
|
610
|
+
"tw",
|
|
605
611
|
"ua",
|
|
606
612
|
"us",
|
|
607
613
|
"uy",
|
|
608
614
|
"uz",
|
|
609
615
|
"ve",
|
|
610
616
|
"vn",
|
|
617
|
+
"xx",
|
|
611
618
|
"za"
|
|
612
619
|
];
|
|
613
620
|
export type FlagName = typeof FLAG_NAMES[number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@porsche-design-system/components-react",
|
|
3
|
-
"version": "3.30.0-rc.
|
|
3
|
+
"version": "3.30.0-rc.2",
|
|
4
4
|
"description": "Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"porsche",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"license": "SEE LICENSE IN LICENSE",
|
|
18
18
|
"homepage": "https://designsystem.porsche.com",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@porsche-design-system/components-js": "3.30.0-rc.
|
|
20
|
+
"@porsche-design-system/components-js": "3.30.0-rc.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"ag-grid-community": ">= 33.0.0 <35.0.0",
|
|
@@ -6058,7 +6058,7 @@ const getUnitCounterJssStyle = (isDisabled, isReadonly, theme) => {
|
|
|
6058
6058
|
const cssVarInternalInputBaseScaling = '--p-internal-input-base-scaling';
|
|
6059
6059
|
// Determines the scaling factor for the input-number size. In "compact" mode, it uses 0.5 to achieve a 36px input-number (compact size).
|
|
6060
6060
|
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalInputBaseScaling`.
|
|
6061
|
-
const getScalingVar$
|
|
6061
|
+
const getScalingVar$2 = (compact) => `var(${cssVarInternalInputBaseScaling}, ${compact ? 0.5 : 1})`;
|
|
6062
6062
|
/**
|
|
6063
6063
|
* @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."}
|
|
6064
6064
|
*/
|
|
@@ -6068,7 +6068,7 @@ const cssVarButtonPurePadding = '--ref-p-input-slotted-padding';
|
|
|
6068
6068
|
*/
|
|
6069
6069
|
const cssVarButtonPureMargin = '--ref-p-input-slotted-margin';
|
|
6070
6070
|
const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, state, compact, readOnly, theme, additionalInputJssStyle) => {
|
|
6071
|
-
const scalingVar = getScalingVar$
|
|
6071
|
+
const scalingVar = getScalingVar$2(compact);
|
|
6072
6072
|
const paddingBlock = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
6073
6073
|
const paddingInline = `max(2px, ${formElementPaddingHorizontal} * ${scalingVar})`;
|
|
6074
6074
|
const height = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
|
|
@@ -9196,9 +9196,9 @@ const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(sty
|
|
|
9196
9196
|
}));
|
|
9197
9197
|
|
|
9198
9198
|
const cssVarInternalPinCodeScaling = '--p-internal-pin-code-scaling';
|
|
9199
|
-
const getScalingVar = (compact) => `var(${cssVarInternalPinCodeScaling}, ${compact ? 0.5 : 1})`;
|
|
9199
|
+
const getScalingVar$1 = (compact) => `var(${cssVarInternalPinCodeScaling}, ${compact ? 0.5 : 1})`;
|
|
9200
9200
|
const getComponentCss$B = (hideLabel, state, isDisabled, isLoading, length, compact, theme) => {
|
|
9201
|
-
const scalingVar = getScalingVar(compact);
|
|
9201
|
+
const scalingVar = getScalingVar$1(compact);
|
|
9202
9202
|
const dimension = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
|
|
9203
9203
|
const gap = `max(${spacingStaticXSmall}, ${scalingVar} * ${spacingStaticSmall})`;
|
|
9204
9204
|
const paddingBlock = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
@@ -9651,7 +9651,7 @@ const getRadioGroupDirectionJssStyles = (direction) => {
|
|
|
9651
9651
|
return groupRadioGroupDirectionJssStyles[direction];
|
|
9652
9652
|
};
|
|
9653
9653
|
const getComponentCss$x = (disabled, loading, hideLabel, state, compact, direction, theme) => {
|
|
9654
|
-
const scalingVar = `var(${cssVarInternalRadioGroupScaling}, ${compact ? 0.
|
|
9654
|
+
const scalingVar = `var(${cssVarInternalRadioGroupScaling}, ${compact ? 0.6668 : 1})`;
|
|
9655
9655
|
const { primaryColor } = getThemedColors(theme);
|
|
9656
9656
|
const { primaryColor: primaryColorDark } = getThemedColors('dark');
|
|
9657
9657
|
const { formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
@@ -9828,7 +9828,9 @@ const getComponentCss$w = (isNextHidden, isPrevHidden, alignScrollIndicator, has
|
|
|
9828
9828
|
});
|
|
9829
9829
|
};
|
|
9830
9830
|
|
|
9831
|
-
const
|
|
9831
|
+
const cssVarInternalSegmentedControlScaling = '--p-internal-segmented-control-scaling';
|
|
9832
|
+
const getScalingVar = (compact) => `var(${cssVarInternalSegmentedControlScaling}, ${compact ? 0.5 : 1})`;
|
|
9833
|
+
const ICON_OFFSET = '4px';
|
|
9832
9834
|
const { font: BUTTON_FONT } = textSmallStyle;
|
|
9833
9835
|
const ICON_SIZE = '1.5rem';
|
|
9834
9836
|
const ICON_MARGIN = '.25rem';
|
|
@@ -9848,10 +9850,20 @@ const getColors$2 = (isDisabled, isSelected, theme) => {
|
|
|
9848
9850
|
hoverBorderColor: primaryColor,
|
|
9849
9851
|
};
|
|
9850
9852
|
};
|
|
9851
|
-
const
|
|
9852
|
-
const
|
|
9853
|
+
const getScalableItemStyles = (hasIconAndSlottedContent, compact) => {
|
|
9854
|
+
const scalingVar = getScalingVar(compact);
|
|
9855
|
+
const verticalPadding = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
9856
|
+
const horizontalPadding = `calc(${verticalPadding} + ${ICON_OFFSET})`;
|
|
9857
|
+
const padding = hasIconAndSlottedContent
|
|
9858
|
+
? `${verticalPadding} ${horizontalPadding} ${verticalPadding} ${verticalPadding}`
|
|
9859
|
+
: `${verticalPadding} ${horizontalPadding}`;
|
|
9860
|
+
const dimension = `calc(max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px)) + (${verticalPadding} + ${borderWidthBase}) * 2)`;
|
|
9861
|
+
return { padding, dimension };
|
|
9862
|
+
};
|
|
9863
|
+
const getComponentCss$v = (compact, isDisabled, isSelected, hasIcon, hasSlottedContent, theme) => {
|
|
9853
9864
|
const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$2(isDisabled, isSelected, theme);
|
|
9854
9865
|
const { buttonColor: buttonColorDark, labelColor: labelColorDark, borderColor: borderColorDark, hoverBorderColor: hoverBorderColorDark, } = getColors$2(isDisabled, isSelected, 'dark');
|
|
9866
|
+
const scalableItemStyles = getScalableItemStyles(hasIcon && hasSlottedContent, compact);
|
|
9855
9867
|
return getCss({
|
|
9856
9868
|
'@global': {
|
|
9857
9869
|
':host': {
|
|
@@ -9867,8 +9879,9 @@ const getComponentCss$v = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
9867
9879
|
position: 'relative',
|
|
9868
9880
|
display: 'block',
|
|
9869
9881
|
height: '100%',
|
|
9882
|
+
minHeight: scalableItemStyles.dimension,
|
|
9870
9883
|
width: '100%',
|
|
9871
|
-
padding:
|
|
9884
|
+
padding: scalableItemStyles.padding,
|
|
9872
9885
|
margin: 0, // Removes default button margin on safari 15
|
|
9873
9886
|
border: `${borderWidthBase} solid ${borderColor}`,
|
|
9874
9887
|
borderRadius: borderRadiusSmall,
|
|
@@ -9920,7 +9933,8 @@ const getComponentCss$v = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
9920
9933
|
}),
|
|
9921
9934
|
});
|
|
9922
9935
|
};
|
|
9923
|
-
const getComponentCss$u = (maxWidth, columns) => {
|
|
9936
|
+
const getComponentCss$u = (maxWidth, columns, compact) => {
|
|
9937
|
+
const scalingVar = getScalingVar(compact);
|
|
9924
9938
|
return getCss({
|
|
9925
9939
|
'@global': {
|
|
9926
9940
|
':host': {
|
|
@@ -9932,7 +9946,7 @@ const getComponentCss$u = (maxWidth, columns) => {
|
|
|
9932
9946
|
? `repeat(auto-fit, ${maxWidth}px)`
|
|
9933
9947
|
: `repeat(${col}, minmax(0, 1fr))`,
|
|
9934
9948
|
})),
|
|
9935
|
-
gap:
|
|
9949
|
+
gap: `max(${spacingStaticXSmall}, ${scalingVar} * 6px)`,
|
|
9936
9950
|
...colorSchemeStyles,
|
|
9937
9951
|
...hostHiddenStyles,
|
|
9938
9952
|
}),
|
|
@@ -11883,7 +11897,7 @@ exports.getPopoverCss = getComponentCss$A;
|
|
|
11883
11897
|
exports.getRadioButtonWrapperCss = getComponentCss$z;
|
|
11884
11898
|
exports.getRadioGroupCss = getComponentCss$x;
|
|
11885
11899
|
exports.getRadioGroupOptionCss = getComponentCss$y;
|
|
11886
|
-
exports.getScalingVar = getScalingVar$
|
|
11900
|
+
exports.getScalingVar = getScalingVar$2;
|
|
11887
11901
|
exports.getScrollerCss = getComponentCss$w;
|
|
11888
11902
|
exports.getSegmentedControlCss = getComponentCss$u;
|
|
11889
11903
|
exports.getSegmentedControlItemCss = getComponentCss$v;
|
|
@@ -3428,7 +3428,7 @@ const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-des
|
|
|
3428
3428
|
var CRESTS_MANIFEST = { "porscheCrest": { "1x": { "png": "porsche-crest.d76137c@1x.png", "webp": "porsche-crest.0d0cc89@1x.webp" }, "2x": { "png": "porsche-crest.8a292fb@2x.png", "webp": "porsche-crest.2245c45@2x.webp" }, "3x": { "png": "porsche-crest.18d6f02@3x.png", "webp": "porsche-crest.19b4292@3x.webp" } } };
|
|
3429
3429
|
|
|
3430
3430
|
// index.ts
|
|
3431
|
-
var FLAGS_MANIFEST = { "ae": "ae.070e003.svg", "am": "am.b228450.svg", "ar": "ar.d3ecad6.svg", "at": "at.19b8f3c.svg", "au": "au.9ccee18.svg", "az": "az.463b388.svg", "ba": "ba.57e215c.svg", "be": "be.6601715.svg", "bg": "bg.2a1ef06.svg", "bh": "bh.f6ce1b1.svg", "bn": "bn.5bb9faf.svg", "bo": "bo.2a95304.svg", "br": "br.071ef4a.svg", "by": "by.bbe68ec.svg", "ca": "ca.3524ab1.svg", "ch": "ch.1cc9a58.svg", "cl": "cl.7226017.svg", "cn": "cn.3e2e196.svg", "co": "co.40bd283.svg", "cr": "cr.d275fe4.svg", "cw": "cw.2a2e69b.svg", "cy": "cy.eecbae2.svg", "cz": "cz.84fcee1.svg", "de": "de.b575e11.svg", "dk": "dk.8faad28.svg", "do": "do.8cbff53.svg", "dz": "dz.92ac4dd.svg", "ec": "ec.8b790aa.svg", "ee": "ee.0d69319.svg", "eg": "eg.3d6e702.svg", "es": "es.8259527.svg", "fi": "fi.abcdec4.svg", "fr": "fr.e6f575e.svg", "gb": "gb.c8be57d.svg", "ge": "ge.1828ada.svg", "gh": "gh.dcc9966.svg", "gr": "gr.8d404a0.svg", "gt": "gt.d28dda2.svg", "hk": "hk.a791020.svg", "hn": "hn.61767b1.svg", "hr": "hr.09fd51c.svg", "ht": "ht.a0f15d3.svg", "hu": "hu.1e61356.svg", "id": "id.01c0ab3.svg", "ie": "ie.cec77fa.svg", "il": "il.add57d7.svg", "in": "in.15aa313.svg", "is": "is.2d193b5.svg", "it": "it.d26868c.svg", "jm": "jm.6266f91.svg", "jo": "jo.6759235.svg", "jp": "jp.32c39a2.svg", "ke": "ke.96a51ec.svg", "kh": "kh.ac03e8a.svg", "kr": "kr.f9b3228.svg", "kw": "kw.ecb70e0.svg", "kz": "kz.5f31a4b.svg", "lb": "lb.eed52fa.svg", "lk": "lk.1b44ee9.svg", "lt": "lt.5448f1b.svg", "lu": "lu.11992af.svg", "lv": "lv.c45d630.svg", "ma": "ma.37960b7.svg", "md": "md.7ed7b6b.svg", "mk": "mk.08eaad6.svg", "mn": "mn.fd0cde6.svg", "mo": "mo.a7e3c7c.svg", "mq": "mq.f55f7ca.svg", "mt": "mt.1ee108a.svg", "mu": "mu.f901db6.svg", "mx": "mx.c39bf62.svg", "my": "my.b7366cd.svg", "ng": "ng.d1ac1ea.svg", "nl": "nl.0569e12.svg", "no": "no.b4f2c38.svg", "nz": "nz.a70a24d.svg", "om": "om.d63d939.svg", "pa": "pa.f33ec1a.svg", "pe": "pe.2cacc5f.svg", "pf": "pf.50807f4.svg", "ph": "ph.1df49d2.svg", "pk": "pk.86b11da.svg", "pl": "pl.e0ef0ec.svg", "pr": "pr.79d60a1.svg", "pt": "pt.c903b10.svg", "py": "py.e39a820.svg", "qa": "qa.47e5e31.svg", "ro": "ro.9d14812.svg", "rs": "rs.7c7c211.svg", "ru": "ru.eb87254.svg", "sa": "sa.1a8f5b9.svg", "se": "se.f2705e2.svg", "sg": "sg.bca7a48.svg", "si": "si.c018e71.svg", "sk": "sk.d3177a9.svg", "sv": "sv.26aaba9.svg", "th": "th.1c48f08.svg", "tn": "tn.e119e22.svg", "tr": "tr.b4170f9.svg", "tt": "tt.7f3e1df.svg", "ua": "ua.73e5a3e.svg", "us": "us.10d7b02.svg", "uy": "uy.666b0bc.svg", "uz": "uz.8fa8ad3.svg", "ve": "ve.6cd1ec7.svg", "vn": "vn.3e0128f.svg", "za": "za.1bb0840.svg" };
|
|
3431
|
+
var FLAGS_MANIFEST = { "ad": "ad.da62168.svg", "ae": "ae.070e003.svg", "am": "am.b228450.svg", "ar": "ar.d3ecad6.svg", "at": "at.19b8f3c.svg", "au": "au.9ccee18.svg", "az": "az.463b388.svg", "ba": "ba.57e215c.svg", "be": "be.6601715.svg", "bg": "bg.2a1ef06.svg", "bh": "bh.f6ce1b1.svg", "bn": "bn.5bb9faf.svg", "bo": "bo.2a95304.svg", "br": "br.071ef4a.svg", "by": "by.bbe68ec.svg", "ca": "ca.3524ab1.svg", "ch": "ch.1cc9a58.svg", "cl": "cl.7226017.svg", "cn": "cn.3e2e196.svg", "co": "co.40bd283.svg", "cr": "cr.d275fe4.svg", "cw": "cw.2a2e69b.svg", "cy": "cy.eecbae2.svg", "cz": "cz.84fcee1.svg", "de": "de.b575e11.svg", "dk": "dk.8faad28.svg", "do": "do.8cbff53.svg", "dz": "dz.92ac4dd.svg", "ec": "ec.8b790aa.svg", "ee": "ee.0d69319.svg", "eg": "eg.3d6e702.svg", "es": "es.8259527.svg", "fi": "fi.abcdec4.svg", "fr": "fr.e6f575e.svg", "gb": "gb.c8be57d.svg", "ge": "ge.1828ada.svg", "gh": "gh.dcc9966.svg", "gi": "gi.931c4f3.svg", "gr": "gr.8d404a0.svg", "gt": "gt.d28dda2.svg", "hk": "hk.a791020.svg", "hn": "hn.61767b1.svg", "hr": "hr.09fd51c.svg", "ht": "ht.a0f15d3.svg", "hu": "hu.1e61356.svg", "id": "id.01c0ab3.svg", "ie": "ie.cec77fa.svg", "il": "il.add57d7.svg", "in": "in.15aa313.svg", "is": "is.2d193b5.svg", "it": "it.d26868c.svg", "jm": "jm.6266f91.svg", "jo": "jo.6759235.svg", "jp": "jp.32c39a2.svg", "ke": "ke.96a51ec.svg", "kh": "kh.ac03e8a.svg", "kr": "kr.f9b3228.svg", "kw": "kw.ecb70e0.svg", "kz": "kz.5f31a4b.svg", "lb": "lb.eed52fa.svg", "li": "li.30156a7.svg", "lk": "lk.1b44ee9.svg", "lt": "lt.5448f1b.svg", "lu": "lu.11992af.svg", "lv": "lv.c45d630.svg", "ma": "ma.37960b7.svg", "mc": "mc.bc42fcb.svg", "md": "md.7ed7b6b.svg", "me": "me.73d5280.svg", "mk": "mk.08eaad6.svg", "mn": "mn.fd0cde6.svg", "mo": "mo.a7e3c7c.svg", "mq": "mq.f55f7ca.svg", "mt": "mt.1ee108a.svg", "mu": "mu.f901db6.svg", "mx": "mx.c39bf62.svg", "my": "my.b7366cd.svg", "ng": "ng.d1ac1ea.svg", "nl": "nl.0569e12.svg", "no": "no.b4f2c38.svg", "nz": "nz.a70a24d.svg", "om": "om.d63d939.svg", "pa": "pa.f33ec1a.svg", "pe": "pe.2cacc5f.svg", "pf": "pf.50807f4.svg", "ph": "ph.1df49d2.svg", "pk": "pk.86b11da.svg", "pl": "pl.e0ef0ec.svg", "pr": "pr.79d60a1.svg", "pt": "pt.c903b10.svg", "py": "py.e39a820.svg", "qa": "qa.47e5e31.svg", "ro": "ro.9d14812.svg", "rs": "rs.7c7c211.svg", "ru": "ru.eb87254.svg", "sa": "sa.1a8f5b9.svg", "se": "se.f2705e2.svg", "sg": "sg.bca7a48.svg", "si": "si.c018e71.svg", "sk": "sk.d3177a9.svg", "sv": "sv.26aaba9.svg", "th": "th.1c48f08.svg", "tn": "tn.e119e22.svg", "tr": "tr.b4170f9.svg", "tt": "tt.7f3e1df.svg", "tw": "tw.df76c19.svg", "ua": "ua.73e5a3e.svg", "us": "us.10d7b02.svg", "uy": "uy.666b0bc.svg", "uz": "uz.8fa8ad3.svg", "ve": "ve.6cd1ec7.svg", "vn": "vn.3e0128f.svg", "xx": "xx.acc7ae8.svg", "za": "za.1bb0840.svg" };
|
|
3432
3432
|
|
|
3433
3433
|
// index.ts
|
|
3434
3434
|
var ICONS_MANIFEST = { "360": "360.0600731.svg", "4-wheel-drive": "4-wheel-drive.9c218bf.svg", "accessibility": "accessibility.087d747.svg", "active-cabin-ventilation": "active-cabin-ventilation.b081399.svg", "add": "add.fac861a.svg", "adjust": "adjust.ca46bd4.svg", "aggregation": "aggregation.96f06e5.svg", "ai-3d-object": "ai-3d-object.7a85dd7.svg", "ai-code": "ai-code.9afafb7.svg", "ai-edit": "ai-edit.75a4765.svg", "ai-image": "ai-image.c786d48.svg", "ai-scale": "ai-scale.846fde0.svg", "ai-sound": "ai-sound.727ea7a.svg", "ai-spark": "ai-spark.a134e18.svg", "ai-spark-filled": "ai-spark-filled.2d5d971.svg", "ai-text": "ai-text.fc84e09.svg", "ai-video": "ai-video.759a7f2.svg", "arrow-compact-down": "arrow-compact-down.9b37afe.svg", "arrow-compact-left": "arrow-compact-left.7169de6.svg", "arrow-compact-right": "arrow-compact-right.cc2d1d2.svg", "arrow-compact-up": "arrow-compact-up.36724bb.svg", "arrow-double-down": "arrow-double-down.61ae4d7.svg", "arrow-double-left": "arrow-double-left.1b576eb.svg", "arrow-double-right": "arrow-double-right.dcfabff.svg", "arrow-double-up": "arrow-double-up.fb73db5.svg", "arrow-down": "arrow-down.49c6983.svg", "arrow-first": "arrow-first.beb7d9f.svg", "arrow-head-down": "arrow-head-down.1e3cbb8.svg", "arrow-head-left": "arrow-head-left.cf1395d.svg", "arrow-head-right": "arrow-head-right.304b330.svg", "arrow-head-up": "arrow-head-up.6d3fd23.svg", "arrow-last": "arrow-last.cc24903.svg", "arrow-left": "arrow-left.e03c25b.svg", "arrow-right": "arrow-right.872716b.svg", "arrow-up": "arrow-up.9d294d1.svg", "arrows": "arrows.de040f9.svg", "attachment": "attachment.8f3dd0a.svg", "augmented-reality": "augmented-reality.8b6ce95.svg", "battery-empty": "battery-empty.38b4b15.svg", "battery-empty-co2": "battery-empty-co2.c4cabef.svg", "battery-empty-fuel": "battery-empty-fuel.e833e13.svg", "battery-full": "battery-full.03de75d.svg", "battery-half": "battery-half.11f1ef8.svg", "battery-one-quarter": "battery-one-quarter.91235a0.svg", "battery-three-quarters": "battery-three-quarters.dcf768f.svg", "bell": "bell.1eab3a2.svg", "bookmark": "bookmark.9d6982f.svg", "bookmark-filled": "bookmark-filled.327ac78.svg", "brain": "brain.838387a.svg", "broadcast": "broadcast.0ad5a15.svg", "cabriolet": "cabriolet.ab33aab.svg", "calculator": "calculator.a323a2d.svg", "calendar": "calendar.70a6a12.svg", "camera": "camera.e5e95b9.svg", "car": "car.35229c9.svg", "car-battery": "car-battery.895510f.svg", "card": "card.f284448.svg", "charging-active": "charging-active.c3aa214.svg", "charging-network": "charging-network.a40072f.svg", "charging-state": "charging-state.f56d8df.svg", "charging-station": "charging-station.5ff1ed4.svg", "chart": "chart.c8c32d2.svg", "chat": "chat.7945544.svg", "check": "check.8ba06be.svg", "city": "city.5ae672c.svg", "climate": "climate.a9d5818.svg", "climate-control": "climate-control.ce31939.svg", "clock": "clock.c88a1ef.svg", "close": "close.eec3c5d.svg", "closed-caption": "closed-caption.ceaf6cb.svg", "cloud": "cloud.2c3959e.svg", "co2-class": "co2-class.fc49211.svg", "co2-emission": "co2-emission.c42e7f8.svg", "color-picker": "color-picker.598f402.svg", "compare": "compare.6578829.svg", "compass": "compass.f90f319.svg", "configurate": "configurate.5311c8d.svg", "copy": "copy.0fcd086.svg", "country-road": "country-road.d2bbc5a.svg", "coupe": "coupe.7549e3e.svg", "cubic-capacity": "cubic-capacity.7b0b8c8.svg", "cut": "cut.851e5c2.svg", "delete": "delete.5a8c8ca.svg", "disable": "disable.5918c32.svg", "dislike": "dislike.51614b0.svg", "dislike-filled": "dislike-filled.e1a8c4d.svg", "document": "document.df36b6c.svg", "door": "door.61c32d6.svg", "download": "download.c06f455.svg", "drag": "drag.9e893fd.svg", "duration": "duration.94e5252.svg", "ear": "ear.27a802f.svg", "edit": "edit.330f321.svg", "email": "email.f2530de.svg", "error": "error.b8ae9ad.svg", "error-filled": "error-filled.a4d06ed.svg", "exclamation": "exclamation.46cd17b.svg", "exclamation-filled": "exclamation-filled.9d09ed1.svg", "external": "external.fb677b9.svg", "fast-backward": "fast-backward.a71faae.svg", "fast-forward": "fast-forward.1e6fa9f.svg", "file-csv": "file-csv.4140e24.svg", "file-excel": "file-excel.56d577d.svg", "filter": "filter.610f808.svg", "fingerprint": "fingerprint.6a85170.svg", "flag": "flag.7af5baf.svg", "flash": "flash.88a2ada.svg", "fuel-station": "fuel-station.f7bdf51.svg", "garage": "garage.5014e8d.svg", "genuine-parts": "genuine-parts.6bfddde.svg", "geo-localization": "geo-localization.516d603.svg", "gift": "gift.7beb1eb.svg", "globe": "globe.56cc8fc.svg", "grid": "grid.06bc31a.svg", "grip": "grip.5ec4289.svg", "group": "group.051436a.svg", "hand": "hand.4e85714.svg", "heart": "heart.9a5962e.svg", "heart-filled": "heart-filled.dd7decf.svg", "highway": "highway.bf0eb24.svg", "highway-filled": "highway-filled.38e93fb.svg", "history": "history.f09645c.svg", "home": "home.7b1d1da.svg", "horn": "horn.bf47b1a.svg", "image": "image.b2614f0.svg", "increase": "increase.700012f.svg", "information": "information.da41162.svg", "information-filled": "information-filled.8f08911.svg", "key": "key.ee5d89b.svg", "laptop": "laptop.c422480.svg", "leaf": "leaf.92ca6a6.svg", "leather": "leather.1d2769a.svg", "light": "light.f0eb8e4.svg", "like": "like.a7468cd.svg", "like-filled": "like-filled.a0126c1.svg", "limousine": "limousine.87799d5.svg", "linked": "linked.8f30cb5.svg", "list": "list.411dd00.svg", "locate": "locate.6554f9e.svg", "lock": "lock.243281a.svg", "lock-open": "lock-open.95803d2.svg", "logo-apple-carplay": "logo-apple-carplay.c872af9.svg", "logo-apple-music": "logo-apple-music.1395f37.svg", "logo-apple-podcast": "logo-apple-podcast.09be038.svg", "logo-baidu": "logo-baidu.9e89c7d.svg", "logo-delicious": "logo-delicious.e83f574.svg", "logo-digg": "logo-digg.f096670.svg", "logo-facebook": "logo-facebook.74abe88.svg", "logo-foursquare": "logo-foursquare.d638fd8.svg", "logo-gmail": "logo-gmail.5f96ee2.svg", "logo-google": "logo-google.1dee423.svg", "logo-hatena": "logo-hatena.da509f0.svg", "logo-instagram": "logo-instagram.b916daa.svg", "logo-kaixin": "logo-kaixin.b1211a2.svg", "logo-kakaotalk": "logo-kakaotalk.38f5396.svg", "logo-kununu": "logo-kununu.79344ff.svg", "logo-linkedin": "logo-linkedin.b72559f.svg", "logo-naver": "logo-naver.75588fe.svg", "logo-pinterest": "logo-pinterest.e8f6963.svg", "logo-qq": "logo-qq.6d9b6d9.svg", "logo-qq-share": "logo-qq-share.ee864d9.svg", "logo-reddit": "logo-reddit.da13e44.svg", "logo-skyrock": "logo-skyrock.eb2f28d.svg", "logo-snapchat": "logo-snapchat.ef706a2.svg", "logo-sohu": "logo-sohu.a30c66b.svg", "logo-spotify": "logo-spotify.2ec4b2d.svg", "logo-tecent": "logo-tecent.d119e85.svg", "logo-telegram": "logo-telegram.d151481.svg", "logo-tiktok": "logo-tiktok.2f3a465.svg", "logo-tumblr": "logo-tumblr.c689f44.svg", "logo-twitter": "logo-twitter.5f2490a.svg", "logo-viber": "logo-viber.198bd43.svg", "logo-vk": "logo-vk.37b94e0.svg", "logo-wechat": "logo-wechat.83b2b98.svg", "logo-weibo": "logo-weibo.c8dacee.svg", "logo-whatsapp": "logo-whatsapp.add9a6d.svg", "logo-x": "logo-x.5f2490a.svg", "logo-xing": "logo-xing.3a8df0f.svg", "logo-yahoo": "logo-yahoo.8cbd0ba.svg", "logo-youku": "logo-youku.fe988d0.svg", "logo-youtube": "logo-youtube.da3798f.svg", "logout": "logout.7ec7451.svg", "map": "map.c16f618.svg", "menu-dots-horizontal": "menu-dots-horizontal.788f7fa.svg", "menu-dots-vertical": "menu-dots-vertical.4970a65.svg", "menu-lines": "menu-lines.e332216.svg", "microphone": "microphone.8ecdce6.svg", "minus": "minus.f6d964c.svg", "mobile": "mobile.7f35446.svg", "moon": "moon.5b73246.svg", "new-chat": "new-chat.95ffd2e.svg", "news": "news.5b604b0.svg", "north-arrow": "north-arrow.2da1dbe.svg", "oil-can": "oil-can.cb58fc7.svg", "online-search": "online-search.90e9ab1.svg", "parking-brake": "parking-brake.45704bd.svg", "parking-light": "parking-light.c49a231.svg", "paste": "paste.dd60261.svg", "pause": "pause.e41b935.svg", "phone": "phone.f4f774b.svg", "pin": "pin.3417cec.svg", "pin-filled": "pin-filled.7b8e9ba.svg", "pivot": "pivot.3ae18b8.svg", "play": "play.24226d4.svg", "plug": "plug.c159935.svg", "plus": "plus.319993e.svg", "preheating": "preheating.e2a796f.svg", "price-tag": "price-tag.f0d3917.svg", "printer": "printer.f59b0ee.svg", "purchase": "purchase.9cd6d65.svg", "push-pin": "push-pin.89e4ead.svg", "push-pin-off": "push-pin-off.ba99213.svg", "qr": "qr.87a49a3.svg", "qr-off": "qr-off.64e21b9.svg", "question": "question.3402a63.svg", "question-filled": "question-filled.cf25dd5.svg", "racing-flag": "racing-flag.b7ddcc8.svg", "radar": "radar.de5a6c1.svg", "radio": "radio.2b48e53.svg", "refresh": "refresh.41fd868.svg", "replay": "replay.55a99f2.svg", "reset": "reset.e53d52f.svg", "return": "return.46d30de.svg", "road": "road.bd3d4bc.svg", "roof-closed": "roof-closed.018d021.svg", "roof-open": "roof-open.51c8ee6.svg", "route": "route.f4fbbb4.svg", "rss": "rss.0e77baf.svg", "save": "save.6171ff5.svg", "screen": "screen.420be15.svg", "search": "search.3f0f1ce.svg", "seat": "seat.a3ebc40.svg", "send": "send.b32099c.svg", "service-technician": "service-technician.8749028.svg", "share": "share.a0b30da.svg", "shopping-bag": "shopping-bag.3f91a9b.svg", "shopping-bag-filled": "shopping-bag-filled.abf6c98.svg", "shopping-cart": "shopping-cart.370e224.svg", "shopping-cart-filled": "shopping-cart-filled.e0c3a65.svg", "sidebar": "sidebar.8e43896.svg", "sidelights": "sidelights.65c9dd9.svg", "skip-backward": "skip-backward.cd25ac5.svg", "skip-forward": "skip-forward.001e97f.svg", "snowflake": "snowflake.83907b3.svg", "sort": "sort.92b50bd.svg", "stack": "stack.804af93.svg", "star": "star.4c5bb15.svg", "star-filled": "star-filled.84ef2f6.svg", "steering-wheel": "steering-wheel.4dea19e.svg", "stop": "stop.173b6ac.svg", "stopwatch": "stopwatch.0e048a4.svg", "subtract": "subtract.57eed1d.svg", "success": "success.b16d4c1.svg", "success-filled": "success-filled.1832d98.svg", "sun": "sun.4301cbd.svg", "suv": "suv.33ac4aa.svg", "switch": "switch.66f74c4.svg", "tablet": "tablet.07341ac.svg", "tachometer": "tachometer.3a2fc3c.svg", "theme": "theme.08f6508.svg", "tire": "tire.e5c9372.svg", "trigger-finger": "trigger-finger.65aa6e2.svg", "truck": "truck.2c26c04.svg", "turismo": "turismo.a066b9f.svg", "unlinked": "unlinked.e9afe39.svg", "upload": "upload.d1f5a2a.svg", "user": "user.c18dabe.svg", "user-filled": "user-filled.2ea646d.svg", "user-group": "user-group.79cdf86.svg", "user-manual": "user-manual.470e243.svg", "video": "video.7590689.svg", "view": "view.5b4d7f6.svg", "view-off": "view-off.a4ede54.svg", "volume-off": "volume-off.bcd49e7.svg", "volume-up": "volume-up.2084f60.svg", "warning": "warning.59927e6.svg", "warning-filled": "warning-filled.1f6fe21.svg", "weather": "weather.9c96bd7.svg", "weight": "weight.b57a60d.svg", "wifi": "wifi.e2a8d9c.svg", "work": "work.9dd71a4.svg", "wrench": "wrench.09a2a67.svg", "wrenches": "wrenches.d2ed45d.svg", "zoom-in": "zoom-in.ff299b8.svg", "zoom-out": "zoom-out.ebb6246.svg" };
|
|
@@ -3624,7 +3624,7 @@ const getFieldsetAriaAttributes = (isRequired, isInvalid, aria) => {
|
|
|
3624
3624
|
};
|
|
3625
3625
|
};
|
|
3626
3626
|
const buildFlagUrl = (flagName) => {
|
|
3627
|
-
return `${getCDNBaseURL()}/flags/${FLAGS_MANIFEST[flagName] || FLAGS_MANIFEST.
|
|
3627
|
+
return `${getCDNBaseURL()}/flags/${FLAGS_MANIFEST[flagName] || FLAGS_MANIFEST.xx}`;
|
|
3628
3628
|
};
|
|
3629
3629
|
const headingSizeToTagMap = {
|
|
3630
3630
|
small: 'h6',
|
|
@@ -3826,8 +3826,6 @@ const getSegmentedControlItemAriaAttributes = (isSelected, isDisabled, ariaProp)
|
|
|
3826
3826
|
const getIconColor = (isDisabled) => {
|
|
3827
3827
|
return isDisabled ? 'contrast-medium' : 'primary';
|
|
3828
3828
|
};
|
|
3829
|
-
|
|
3830
|
-
const ITEM_PADDING = '17px';
|
|
3831
3829
|
const { font: BUTTON_FONT } = textSmallStyle;
|
|
3832
3830
|
const { font: LABEL_FONT } = textXSmallStyle;
|
|
3833
3831
|
const ICON_SIZE = '1.5rem';
|
|
@@ -3841,7 +3839,6 @@ const tempDiv = hasDocument ? document.createElement('div') : undefined;
|
|
|
3841
3839
|
if (tempDiv) {
|
|
3842
3840
|
tempDiv.style.position = 'absolute';
|
|
3843
3841
|
tempDiv.style.visibility = 'hidden';
|
|
3844
|
-
tempDiv.style.padding = `0 ${ITEM_PADDING}`; // Uses the largest possible padding of the item
|
|
3845
3842
|
tempDiv.style.border = `${borderWidthBase} solid`;
|
|
3846
3843
|
tempDiv.style.boxSizing = 'border-box';
|
|
3847
3844
|
tempDiv.style.font = BUTTON_FONT.replace(fontFamily, tempFont);
|
|
@@ -9,7 +9,7 @@ var segmentedControlItem = require('../dsr-components/segmented-control-item.cjs
|
|
|
9
9
|
|
|
10
10
|
const PSegmentedControlItem = /*#__PURE__*/ react.forwardRef((
|
|
11
11
|
// @ts-ignore
|
|
12
|
-
{ aria, disabled = false, icon, iconSource, label, value, className, children, selected, theme = 'light', ...rest }, ref) => {
|
|
12
|
+
{ aria, disabled = false, icon, iconSource, label, value, className, children, compact, selected, theme = 'light', ...rest }, ref) => {
|
|
13
13
|
const elementRef = react.useRef(undefined);
|
|
14
14
|
const WebComponentTag = hooks.usePrefix('p-segmented-control-item');
|
|
15
15
|
const propsToSync = [aria, disabled, icon, iconSource, label, value];
|
|
@@ -22,7 +22,7 @@ const PSegmentedControlItem = /*#__PURE__*/ react.forwardRef((
|
|
|
22
22
|
// @ts-ignore
|
|
23
23
|
...(!process.browser
|
|
24
24
|
? {
|
|
25
|
-
children: (jsxRuntime.jsx(segmentedControlItem.DSRSegmentedControlItem, { aria, disabled, icon, iconSource, label, value, selected, theme, children })),
|
|
25
|
+
children: (jsxRuntime.jsx(segmentedControlItem.DSRSegmentedControlItem, { aria, disabled, icon, iconSource, label, value, compact, selected, theme, children })),
|
|
26
26
|
}
|
|
27
27
|
: {
|
|
28
28
|
children,
|
|
@@ -7,17 +7,17 @@ var hooks = require('../../hooks.cjs');
|
|
|
7
7
|
var utils = require('../../utils.cjs');
|
|
8
8
|
var segmentedControl = require('../dsr-components/segmented-control.cjs');
|
|
9
9
|
|
|
10
|
-
const PSegmentedControl = /*#__PURE__*/ react.forwardRef(({ backgroundColor, columns = 'auto', disabled = false, form, name, onBlur, onChange, onSegmentedControlChange, onUpdate, theme, value, className, children, ...rest }, ref) => {
|
|
10
|
+
const PSegmentedControl = /*#__PURE__*/ react.forwardRef(({ backgroundColor, columns = 'auto', compact = false, disabled = false, form, name, onBlur, onChange, onSegmentedControlChange, onUpdate, theme, value, className, children, ...rest }, ref) => {
|
|
11
11
|
const elementRef = react.useRef(undefined);
|
|
12
12
|
hooks.useEventCallback(elementRef, 'blur', onBlur);
|
|
13
13
|
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
14
14
|
hooks.useEventCallback(elementRef, 'segmentedControlChange', onSegmentedControlChange);
|
|
15
15
|
hooks.useEventCallback(elementRef, 'update', onUpdate);
|
|
16
16
|
const WebComponentTag = hooks.usePrefix('p-segmented-control');
|
|
17
|
-
const propsToSync = [backgroundColor, columns, disabled, form, name, theme || hooks.useTheme(), value];
|
|
17
|
+
const propsToSync = [backgroundColor, columns, compact, disabled, form, name, theme || hooks.useTheme(), value];
|
|
18
18
|
hooks.useBrowserLayoutEffect(() => {
|
|
19
19
|
const { current } = elementRef;
|
|
20
|
-
['backgroundColor', 'columns', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
20
|
+
['backgroundColor', 'columns', 'compact', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
21
21
|
}, propsToSync);
|
|
22
22
|
const props = {
|
|
23
23
|
...rest,
|
|
@@ -25,7 +25,7 @@ const PSegmentedControl = /*#__PURE__*/ react.forwardRef(({ backgroundColor, col
|
|
|
25
25
|
...(!process.browser
|
|
26
26
|
? {
|
|
27
27
|
...{ "role": "group" },
|
|
28
|
-
children: (jsxRuntime.jsx(segmentedControl.DSRSegmentedControl, { backgroundColor, columns, disabled, form, name, theme: theme || hooks.useTheme(), value, children })),
|
|
28
|
+
children: (jsxRuntime.jsx(segmentedControl.DSRSegmentedControl, { backgroundColor, columns, compact, disabled, form, name, theme: theme || hooks.useTheme(), value, children })),
|
|
29
29
|
}
|
|
30
30
|
: {
|
|
31
31
|
children,
|
|
@@ -20,7 +20,7 @@ class DSRSegmentedControlItem extends react.Component {
|
|
|
20
20
|
const hasIcon = !!this.props.icon || !!this.props.iconSource;
|
|
21
21
|
const hasSlottedContent = !!children.length;
|
|
22
22
|
const isDisabled = this.props.disabled || this.props.disabledParent;
|
|
23
|
-
const style = minifyCss.minifyCss(stylesEntry.getSegmentedControlItemCss(isDisabled, this.props.selected, hasIcon, hasSlottedContent, this.props.theme || 'light' // default as fallback
|
|
23
|
+
const style = minifyCss.minifyCss(stylesEntry.getSegmentedControlItemCss(this.props.compact, isDisabled, this.props.selected, hasIcon, hasSlottedContent, this.props.theme || 'light' // default as fallback
|
|
24
24
|
));
|
|
25
25
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("button", { type: "button", ...utilsEntry.getSegmentedControlItemAriaAttributes(this.props.selected, this.props.disabled, this.props.aria), children: [this.props.label && jsxRuntime.jsx("span", { children: this.props.label }), hasIcon && (jsxRuntime.jsx(icon_wrapper.PIcon, { className: "icon", size: "inherit", name: this.props.icon, source: this.props.iconSource, color: utilsEntry.getIconColor(this.props.disabled), theme: this.props.theme || 'light', "aria-hidden": "true" })), jsxRuntime.jsx("slot", {})] }) })] }), this.props.children] }));
|
|
26
26
|
}
|
|
@@ -27,7 +27,7 @@ class DSRSegmentedControl extends react.Component {
|
|
|
27
27
|
const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
|
28
28
|
? { ...child, props: { ...child.props, selected: child.props?.value === this.props.value, backgroundColor: this.props.backgroundColor, theme: this.props.theme } }
|
|
29
29
|
: child);
|
|
30
|
-
const style = minifyCss.minifyCss(stylesEntry.getSegmentedControlCss(100, this.props.columns));
|
|
30
|
+
const style = minifyCss.minifyCss(stylesEntry.getSegmentedControlCss(100, this.props.columns, this.props.compact));
|
|
31
31
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("slot", {}) })] }), manipulatedChildren] }));
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -6056,7 +6056,7 @@ const getUnitCounterJssStyle = (isDisabled, isReadonly, theme) => {
|
|
|
6056
6056
|
const cssVarInternalInputBaseScaling = '--p-internal-input-base-scaling';
|
|
6057
6057
|
// Determines the scaling factor for the input-number size. In "compact" mode, it uses 0.5 to achieve a 36px input-number (compact size).
|
|
6058
6058
|
// Defaults to 1 for the standard size and can be overridden by the CSS variable `cssVarInternalInputBaseScaling`.
|
|
6059
|
-
const getScalingVar$
|
|
6059
|
+
const getScalingVar$2 = (compact) => `var(${cssVarInternalInputBaseScaling}, ${compact ? 0.5 : 1})`;
|
|
6060
6060
|
/**
|
|
6061
6061
|
* @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."}
|
|
6062
6062
|
*/
|
|
@@ -6066,7 +6066,7 @@ const cssVarButtonPurePadding = '--ref-p-input-slotted-padding';
|
|
|
6066
6066
|
*/
|
|
6067
6067
|
const cssVarButtonPureMargin = '--ref-p-input-slotted-margin';
|
|
6068
6068
|
const getFunctionalComponentInputBaseStyles = (disabled, loading, hideLabel, state, compact, readOnly, theme, additionalInputJssStyle) => {
|
|
6069
|
-
const scalingVar = getScalingVar$
|
|
6069
|
+
const scalingVar = getScalingVar$2(compact);
|
|
6070
6070
|
const paddingBlock = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
6071
6071
|
const paddingInline = `max(2px, ${formElementPaddingHorizontal} * ${scalingVar})`;
|
|
6072
6072
|
const height = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
|
|
@@ -9194,9 +9194,9 @@ const removeStyles = (selector, styles) => Object.fromEntries(Object.entries(sty
|
|
|
9194
9194
|
}));
|
|
9195
9195
|
|
|
9196
9196
|
const cssVarInternalPinCodeScaling = '--p-internal-pin-code-scaling';
|
|
9197
|
-
const getScalingVar = (compact) => `var(${cssVarInternalPinCodeScaling}, ${compact ? 0.5 : 1})`;
|
|
9197
|
+
const getScalingVar$1 = (compact) => `var(${cssVarInternalPinCodeScaling}, ${compact ? 0.5 : 1})`;
|
|
9198
9198
|
const getComponentCss$B = (hideLabel, state, isDisabled, isLoading, length, compact, theme) => {
|
|
9199
|
-
const scalingVar = getScalingVar(compact);
|
|
9199
|
+
const scalingVar = getScalingVar$1(compact);
|
|
9200
9200
|
const dimension = `max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px))`;
|
|
9201
9201
|
const gap = `max(${spacingStaticXSmall}, ${scalingVar} * ${spacingStaticSmall})`;
|
|
9202
9202
|
const paddingBlock = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
@@ -9649,7 +9649,7 @@ const getRadioGroupDirectionJssStyles = (direction) => {
|
|
|
9649
9649
|
return groupRadioGroupDirectionJssStyles[direction];
|
|
9650
9650
|
};
|
|
9651
9651
|
const getComponentCss$x = (disabled, loading, hideLabel, state, compact, direction, theme) => {
|
|
9652
|
-
const scalingVar = `var(${cssVarInternalRadioGroupScaling}, ${compact ? 0.
|
|
9652
|
+
const scalingVar = `var(${cssVarInternalRadioGroupScaling}, ${compact ? 0.6668 : 1})`;
|
|
9653
9653
|
const { primaryColor } = getThemedColors(theme);
|
|
9654
9654
|
const { primaryColor: primaryColorDark } = getThemedColors('dark');
|
|
9655
9655
|
const { formStateHoverColor } = getThemedFormStateColors(theme, state);
|
|
@@ -9826,7 +9826,9 @@ const getComponentCss$w = (isNextHidden, isPrevHidden, alignScrollIndicator, has
|
|
|
9826
9826
|
});
|
|
9827
9827
|
};
|
|
9828
9828
|
|
|
9829
|
-
const
|
|
9829
|
+
const cssVarInternalSegmentedControlScaling = '--p-internal-segmented-control-scaling';
|
|
9830
|
+
const getScalingVar = (compact) => `var(${cssVarInternalSegmentedControlScaling}, ${compact ? 0.5 : 1})`;
|
|
9831
|
+
const ICON_OFFSET = '4px';
|
|
9830
9832
|
const { font: BUTTON_FONT } = textSmallStyle;
|
|
9831
9833
|
const ICON_SIZE = '1.5rem';
|
|
9832
9834
|
const ICON_MARGIN = '.25rem';
|
|
@@ -9846,10 +9848,20 @@ const getColors$2 = (isDisabled, isSelected, theme) => {
|
|
|
9846
9848
|
hoverBorderColor: primaryColor,
|
|
9847
9849
|
};
|
|
9848
9850
|
};
|
|
9849
|
-
const
|
|
9850
|
-
const
|
|
9851
|
+
const getScalableItemStyles = (hasIconAndSlottedContent, compact) => {
|
|
9852
|
+
const scalingVar = getScalingVar(compact);
|
|
9853
|
+
const verticalPadding = `max(2px, ${formElementPaddingVertical} * ${scalingVar})`;
|
|
9854
|
+
const horizontalPadding = `calc(${verticalPadding} + ${ICON_OFFSET})`;
|
|
9855
|
+
const padding = hasIconAndSlottedContent
|
|
9856
|
+
? `${verticalPadding} ${horizontalPadding} ${verticalPadding} ${verticalPadding}`
|
|
9857
|
+
: `${verticalPadding} ${horizontalPadding}`;
|
|
9858
|
+
const dimension = `calc(max(${fontLineHeight}, ${scalingVar} * (${fontLineHeight} + 10px)) + (${verticalPadding} + ${borderWidthBase}) * 2)`;
|
|
9859
|
+
return { padding, dimension };
|
|
9860
|
+
};
|
|
9861
|
+
const getComponentCss$v = (compact, isDisabled, isSelected, hasIcon, hasSlottedContent, theme) => {
|
|
9851
9862
|
const { buttonColor, labelColor, borderColor, hoverBorderColor } = getColors$2(isDisabled, isSelected, theme);
|
|
9852
9863
|
const { buttonColor: buttonColorDark, labelColor: labelColorDark, borderColor: borderColorDark, hoverBorderColor: hoverBorderColorDark, } = getColors$2(isDisabled, isSelected, 'dark');
|
|
9864
|
+
const scalableItemStyles = getScalableItemStyles(hasIcon && hasSlottedContent, compact);
|
|
9853
9865
|
return getCss({
|
|
9854
9866
|
'@global': {
|
|
9855
9867
|
':host': {
|
|
@@ -9865,8 +9877,9 @@ const getComponentCss$v = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
9865
9877
|
position: 'relative',
|
|
9866
9878
|
display: 'block',
|
|
9867
9879
|
height: '100%',
|
|
9880
|
+
minHeight: scalableItemStyles.dimension,
|
|
9868
9881
|
width: '100%',
|
|
9869
|
-
padding:
|
|
9882
|
+
padding: scalableItemStyles.padding,
|
|
9870
9883
|
margin: 0, // Removes default button margin on safari 15
|
|
9871
9884
|
border: `${borderWidthBase} solid ${borderColor}`,
|
|
9872
9885
|
borderRadius: borderRadiusSmall,
|
|
@@ -9918,7 +9931,8 @@ const getComponentCss$v = (isDisabled, isSelected, hasIcon, hasSlottedContent, t
|
|
|
9918
9931
|
}),
|
|
9919
9932
|
});
|
|
9920
9933
|
};
|
|
9921
|
-
const getComponentCss$u = (maxWidth, columns) => {
|
|
9934
|
+
const getComponentCss$u = (maxWidth, columns, compact) => {
|
|
9935
|
+
const scalingVar = getScalingVar(compact);
|
|
9922
9936
|
return getCss({
|
|
9923
9937
|
'@global': {
|
|
9924
9938
|
':host': {
|
|
@@ -9930,7 +9944,7 @@ const getComponentCss$u = (maxWidth, columns) => {
|
|
|
9930
9944
|
? `repeat(auto-fit, ${maxWidth}px)`
|
|
9931
9945
|
: `repeat(${col}, minmax(0, 1fr))`,
|
|
9932
9946
|
})),
|
|
9933
|
-
gap:
|
|
9947
|
+
gap: `max(${spacingStaticXSmall}, ${scalingVar} * 6px)`,
|
|
9934
9948
|
...colorSchemeStyles,
|
|
9935
9949
|
...hostHiddenStyles,
|
|
9936
9950
|
}),
|
|
@@ -11816,4 +11830,4 @@ const getComponentCss = (size, theme) => {
|
|
|
11816
11830
|
});
|
|
11817
11831
|
};
|
|
11818
11832
|
|
|
11819
|
-
export { cssVarButtonPureMargin, cssVarButtonPurePadding, cssVarInternalInputBaseScaling, getComponentCss$1n as getAccordionCss, getComponentCss$1m as getBannerCss, getComponentCss$1i as getButtonCss, getComponentCss$1l as getButtonGroupCss, getComponentCss$1k as getButtonPureCss, getComponentCss$1j as getButtonTileCss, getComponentCss$1h as getCanvasCss, getComponentCss$1g as getCarouselCss, getComponentCss$1e as getCheckboxCss, getComponentCss$1f as getCheckboxWrapperCss, getComponentCss$1d as getContentWrapperCss, getComponentCss$1c as getCrestCss, getComponentCss$1b as getDisplayCss, getComponentCss$1a as getDividerCss, getComponentCss$19 as getDrilldownCss, getComponentCss$18 as getDrilldownItemCss, getComponentCss$17 as getDrilldownLinkCss, getComponentCss$15 as getFieldsetCss, getComponentCss$16 as getFieldsetWrapperCss, getComponentCss$14 as getFlagCss, getComponentCss$12 as getFlexCss, getComponentCss$13 as getFlexItemCss, getComponentCss$11 as getFlyoutCss, getFunctionalComponentInputBaseStyles, getFunctionalComponentLabelStyles, getFunctionalComponentLoadingMessageStyles, getFunctionalComponentNoResultsOptionStyles, getFunctionalComponentRequiredStyles, getFunctionalComponentStateMessageStyles, getComponentCss$$ as getGridCss, getComponentCss$10 as getGridItemCss, getComponentCss$_ as getHeadingCss, getComponentCss$Z as getHeadlineCss, getComponentCss$Y as getIconCss, getComponentCss$X as getInlineNotificationCss, getComponentCss$W as getInputDateCss, getComponentCss$V as getInputEmailCss, getComponentCss$U as getInputNumberCss, getComponentCss$T as getInputPasswordCss, getComponentCss$S as getInputSearchCss, getComponentCss$R as getInputTelCss, getComponentCss$Q as getInputTextCss, getComponentCss$P as getInputTimeCss, getComponentCss$O as getInputUrlCss, getComponentCss$M as getLinkCss, getComponentCss$N as getLinkPureCss, getComponentCss$M as getLinkSocialCss, getComponentCss$J as getLinkTileCss, getComponentCss$L as getLinkTileModelSignatureCss, getComponentCss$K as getLinkTileProductCss, getComponentCss$I as getMarqueCss, getComponentCss$H as getModalCss, getComponentCss$G as getModelSignatureCss, getComponentCss$D as getMultiSelectCss, getComponentCss$F as getMultiSelectOptionCss, getComponentCss$E as getOptgroupCss, getComponentCss$C as getPaginationCss, getComponentCss$B as getPinCodeCss, getComponentCss$A as getPopoverCss, getComponentCss$z as getRadioButtonWrapperCss, getComponentCss$x as getRadioGroupCss, getComponentCss$y as getRadioGroupOptionCss, getScalingVar$
|
|
11833
|
+
export { cssVarButtonPureMargin, cssVarButtonPurePadding, cssVarInternalInputBaseScaling, getComponentCss$1n as getAccordionCss, getComponentCss$1m as getBannerCss, getComponentCss$1i as getButtonCss, getComponentCss$1l as getButtonGroupCss, getComponentCss$1k as getButtonPureCss, getComponentCss$1j as getButtonTileCss, getComponentCss$1h as getCanvasCss, getComponentCss$1g as getCarouselCss, getComponentCss$1e as getCheckboxCss, getComponentCss$1f as getCheckboxWrapperCss, getComponentCss$1d as getContentWrapperCss, getComponentCss$1c as getCrestCss, getComponentCss$1b as getDisplayCss, getComponentCss$1a as getDividerCss, getComponentCss$19 as getDrilldownCss, getComponentCss$18 as getDrilldownItemCss, getComponentCss$17 as getDrilldownLinkCss, getComponentCss$15 as getFieldsetCss, getComponentCss$16 as getFieldsetWrapperCss, getComponentCss$14 as getFlagCss, getComponentCss$12 as getFlexCss, getComponentCss$13 as getFlexItemCss, getComponentCss$11 as getFlyoutCss, getFunctionalComponentInputBaseStyles, getFunctionalComponentLabelStyles, getFunctionalComponentLoadingMessageStyles, getFunctionalComponentNoResultsOptionStyles, getFunctionalComponentRequiredStyles, getFunctionalComponentStateMessageStyles, getComponentCss$$ as getGridCss, getComponentCss$10 as getGridItemCss, getComponentCss$_ as getHeadingCss, getComponentCss$Z as getHeadlineCss, getComponentCss$Y as getIconCss, getComponentCss$X as getInlineNotificationCss, getComponentCss$W as getInputDateCss, getComponentCss$V as getInputEmailCss, getComponentCss$U as getInputNumberCss, getComponentCss$T as getInputPasswordCss, getComponentCss$S as getInputSearchCss, getComponentCss$R as getInputTelCss, getComponentCss$Q as getInputTextCss, getComponentCss$P as getInputTimeCss, getComponentCss$O as getInputUrlCss, getComponentCss$M as getLinkCss, getComponentCss$N as getLinkPureCss, getComponentCss$M as getLinkSocialCss, getComponentCss$J as getLinkTileCss, getComponentCss$L as getLinkTileModelSignatureCss, getComponentCss$K as getLinkTileProductCss, getComponentCss$I as getMarqueCss, getComponentCss$H as getModalCss, getComponentCss$G as getModelSignatureCss, getComponentCss$D as getMultiSelectCss, getComponentCss$F as getMultiSelectOptionCss, getComponentCss$E as getOptgroupCss, getComponentCss$C as getPaginationCss, getComponentCss$B as getPinCodeCss, getComponentCss$A as getPopoverCss, getComponentCss$z as getRadioButtonWrapperCss, getComponentCss$x as getRadioGroupCss, getComponentCss$y as getRadioGroupOptionCss, getScalingVar$2 as 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 };
|
|
@@ -3426,7 +3426,7 @@ const getCDNBaseURL = () => global.PORSCHE_DESIGN_SYSTEM_CDN_URL + "/porsche-des
|
|
|
3426
3426
|
var CRESTS_MANIFEST = { "porscheCrest": { "1x": { "png": "porsche-crest.d76137c@1x.png", "webp": "porsche-crest.0d0cc89@1x.webp" }, "2x": { "png": "porsche-crest.8a292fb@2x.png", "webp": "porsche-crest.2245c45@2x.webp" }, "3x": { "png": "porsche-crest.18d6f02@3x.png", "webp": "porsche-crest.19b4292@3x.webp" } } };
|
|
3427
3427
|
|
|
3428
3428
|
// index.ts
|
|
3429
|
-
var FLAGS_MANIFEST = { "ae": "ae.070e003.svg", "am": "am.b228450.svg", "ar": "ar.d3ecad6.svg", "at": "at.19b8f3c.svg", "au": "au.9ccee18.svg", "az": "az.463b388.svg", "ba": "ba.57e215c.svg", "be": "be.6601715.svg", "bg": "bg.2a1ef06.svg", "bh": "bh.f6ce1b1.svg", "bn": "bn.5bb9faf.svg", "bo": "bo.2a95304.svg", "br": "br.071ef4a.svg", "by": "by.bbe68ec.svg", "ca": "ca.3524ab1.svg", "ch": "ch.1cc9a58.svg", "cl": "cl.7226017.svg", "cn": "cn.3e2e196.svg", "co": "co.40bd283.svg", "cr": "cr.d275fe4.svg", "cw": "cw.2a2e69b.svg", "cy": "cy.eecbae2.svg", "cz": "cz.84fcee1.svg", "de": "de.b575e11.svg", "dk": "dk.8faad28.svg", "do": "do.8cbff53.svg", "dz": "dz.92ac4dd.svg", "ec": "ec.8b790aa.svg", "ee": "ee.0d69319.svg", "eg": "eg.3d6e702.svg", "es": "es.8259527.svg", "fi": "fi.abcdec4.svg", "fr": "fr.e6f575e.svg", "gb": "gb.c8be57d.svg", "ge": "ge.1828ada.svg", "gh": "gh.dcc9966.svg", "gr": "gr.8d404a0.svg", "gt": "gt.d28dda2.svg", "hk": "hk.a791020.svg", "hn": "hn.61767b1.svg", "hr": "hr.09fd51c.svg", "ht": "ht.a0f15d3.svg", "hu": "hu.1e61356.svg", "id": "id.01c0ab3.svg", "ie": "ie.cec77fa.svg", "il": "il.add57d7.svg", "in": "in.15aa313.svg", "is": "is.2d193b5.svg", "it": "it.d26868c.svg", "jm": "jm.6266f91.svg", "jo": "jo.6759235.svg", "jp": "jp.32c39a2.svg", "ke": "ke.96a51ec.svg", "kh": "kh.ac03e8a.svg", "kr": "kr.f9b3228.svg", "kw": "kw.ecb70e0.svg", "kz": "kz.5f31a4b.svg", "lb": "lb.eed52fa.svg", "lk": "lk.1b44ee9.svg", "lt": "lt.5448f1b.svg", "lu": "lu.11992af.svg", "lv": "lv.c45d630.svg", "ma": "ma.37960b7.svg", "md": "md.7ed7b6b.svg", "mk": "mk.08eaad6.svg", "mn": "mn.fd0cde6.svg", "mo": "mo.a7e3c7c.svg", "mq": "mq.f55f7ca.svg", "mt": "mt.1ee108a.svg", "mu": "mu.f901db6.svg", "mx": "mx.c39bf62.svg", "my": "my.b7366cd.svg", "ng": "ng.d1ac1ea.svg", "nl": "nl.0569e12.svg", "no": "no.b4f2c38.svg", "nz": "nz.a70a24d.svg", "om": "om.d63d939.svg", "pa": "pa.f33ec1a.svg", "pe": "pe.2cacc5f.svg", "pf": "pf.50807f4.svg", "ph": "ph.1df49d2.svg", "pk": "pk.86b11da.svg", "pl": "pl.e0ef0ec.svg", "pr": "pr.79d60a1.svg", "pt": "pt.c903b10.svg", "py": "py.e39a820.svg", "qa": "qa.47e5e31.svg", "ro": "ro.9d14812.svg", "rs": "rs.7c7c211.svg", "ru": "ru.eb87254.svg", "sa": "sa.1a8f5b9.svg", "se": "se.f2705e2.svg", "sg": "sg.bca7a48.svg", "si": "si.c018e71.svg", "sk": "sk.d3177a9.svg", "sv": "sv.26aaba9.svg", "th": "th.1c48f08.svg", "tn": "tn.e119e22.svg", "tr": "tr.b4170f9.svg", "tt": "tt.7f3e1df.svg", "ua": "ua.73e5a3e.svg", "us": "us.10d7b02.svg", "uy": "uy.666b0bc.svg", "uz": "uz.8fa8ad3.svg", "ve": "ve.6cd1ec7.svg", "vn": "vn.3e0128f.svg", "za": "za.1bb0840.svg" };
|
|
3429
|
+
var FLAGS_MANIFEST = { "ad": "ad.da62168.svg", "ae": "ae.070e003.svg", "am": "am.b228450.svg", "ar": "ar.d3ecad6.svg", "at": "at.19b8f3c.svg", "au": "au.9ccee18.svg", "az": "az.463b388.svg", "ba": "ba.57e215c.svg", "be": "be.6601715.svg", "bg": "bg.2a1ef06.svg", "bh": "bh.f6ce1b1.svg", "bn": "bn.5bb9faf.svg", "bo": "bo.2a95304.svg", "br": "br.071ef4a.svg", "by": "by.bbe68ec.svg", "ca": "ca.3524ab1.svg", "ch": "ch.1cc9a58.svg", "cl": "cl.7226017.svg", "cn": "cn.3e2e196.svg", "co": "co.40bd283.svg", "cr": "cr.d275fe4.svg", "cw": "cw.2a2e69b.svg", "cy": "cy.eecbae2.svg", "cz": "cz.84fcee1.svg", "de": "de.b575e11.svg", "dk": "dk.8faad28.svg", "do": "do.8cbff53.svg", "dz": "dz.92ac4dd.svg", "ec": "ec.8b790aa.svg", "ee": "ee.0d69319.svg", "eg": "eg.3d6e702.svg", "es": "es.8259527.svg", "fi": "fi.abcdec4.svg", "fr": "fr.e6f575e.svg", "gb": "gb.c8be57d.svg", "ge": "ge.1828ada.svg", "gh": "gh.dcc9966.svg", "gi": "gi.931c4f3.svg", "gr": "gr.8d404a0.svg", "gt": "gt.d28dda2.svg", "hk": "hk.a791020.svg", "hn": "hn.61767b1.svg", "hr": "hr.09fd51c.svg", "ht": "ht.a0f15d3.svg", "hu": "hu.1e61356.svg", "id": "id.01c0ab3.svg", "ie": "ie.cec77fa.svg", "il": "il.add57d7.svg", "in": "in.15aa313.svg", "is": "is.2d193b5.svg", "it": "it.d26868c.svg", "jm": "jm.6266f91.svg", "jo": "jo.6759235.svg", "jp": "jp.32c39a2.svg", "ke": "ke.96a51ec.svg", "kh": "kh.ac03e8a.svg", "kr": "kr.f9b3228.svg", "kw": "kw.ecb70e0.svg", "kz": "kz.5f31a4b.svg", "lb": "lb.eed52fa.svg", "li": "li.30156a7.svg", "lk": "lk.1b44ee9.svg", "lt": "lt.5448f1b.svg", "lu": "lu.11992af.svg", "lv": "lv.c45d630.svg", "ma": "ma.37960b7.svg", "mc": "mc.bc42fcb.svg", "md": "md.7ed7b6b.svg", "me": "me.73d5280.svg", "mk": "mk.08eaad6.svg", "mn": "mn.fd0cde6.svg", "mo": "mo.a7e3c7c.svg", "mq": "mq.f55f7ca.svg", "mt": "mt.1ee108a.svg", "mu": "mu.f901db6.svg", "mx": "mx.c39bf62.svg", "my": "my.b7366cd.svg", "ng": "ng.d1ac1ea.svg", "nl": "nl.0569e12.svg", "no": "no.b4f2c38.svg", "nz": "nz.a70a24d.svg", "om": "om.d63d939.svg", "pa": "pa.f33ec1a.svg", "pe": "pe.2cacc5f.svg", "pf": "pf.50807f4.svg", "ph": "ph.1df49d2.svg", "pk": "pk.86b11da.svg", "pl": "pl.e0ef0ec.svg", "pr": "pr.79d60a1.svg", "pt": "pt.c903b10.svg", "py": "py.e39a820.svg", "qa": "qa.47e5e31.svg", "ro": "ro.9d14812.svg", "rs": "rs.7c7c211.svg", "ru": "ru.eb87254.svg", "sa": "sa.1a8f5b9.svg", "se": "se.f2705e2.svg", "sg": "sg.bca7a48.svg", "si": "si.c018e71.svg", "sk": "sk.d3177a9.svg", "sv": "sv.26aaba9.svg", "th": "th.1c48f08.svg", "tn": "tn.e119e22.svg", "tr": "tr.b4170f9.svg", "tt": "tt.7f3e1df.svg", "tw": "tw.df76c19.svg", "ua": "ua.73e5a3e.svg", "us": "us.10d7b02.svg", "uy": "uy.666b0bc.svg", "uz": "uz.8fa8ad3.svg", "ve": "ve.6cd1ec7.svg", "vn": "vn.3e0128f.svg", "xx": "xx.acc7ae8.svg", "za": "za.1bb0840.svg" };
|
|
3430
3430
|
|
|
3431
3431
|
// index.ts
|
|
3432
3432
|
var ICONS_MANIFEST = { "360": "360.0600731.svg", "4-wheel-drive": "4-wheel-drive.9c218bf.svg", "accessibility": "accessibility.087d747.svg", "active-cabin-ventilation": "active-cabin-ventilation.b081399.svg", "add": "add.fac861a.svg", "adjust": "adjust.ca46bd4.svg", "aggregation": "aggregation.96f06e5.svg", "ai-3d-object": "ai-3d-object.7a85dd7.svg", "ai-code": "ai-code.9afafb7.svg", "ai-edit": "ai-edit.75a4765.svg", "ai-image": "ai-image.c786d48.svg", "ai-scale": "ai-scale.846fde0.svg", "ai-sound": "ai-sound.727ea7a.svg", "ai-spark": "ai-spark.a134e18.svg", "ai-spark-filled": "ai-spark-filled.2d5d971.svg", "ai-text": "ai-text.fc84e09.svg", "ai-video": "ai-video.759a7f2.svg", "arrow-compact-down": "arrow-compact-down.9b37afe.svg", "arrow-compact-left": "arrow-compact-left.7169de6.svg", "arrow-compact-right": "arrow-compact-right.cc2d1d2.svg", "arrow-compact-up": "arrow-compact-up.36724bb.svg", "arrow-double-down": "arrow-double-down.61ae4d7.svg", "arrow-double-left": "arrow-double-left.1b576eb.svg", "arrow-double-right": "arrow-double-right.dcfabff.svg", "arrow-double-up": "arrow-double-up.fb73db5.svg", "arrow-down": "arrow-down.49c6983.svg", "arrow-first": "arrow-first.beb7d9f.svg", "arrow-head-down": "arrow-head-down.1e3cbb8.svg", "arrow-head-left": "arrow-head-left.cf1395d.svg", "arrow-head-right": "arrow-head-right.304b330.svg", "arrow-head-up": "arrow-head-up.6d3fd23.svg", "arrow-last": "arrow-last.cc24903.svg", "arrow-left": "arrow-left.e03c25b.svg", "arrow-right": "arrow-right.872716b.svg", "arrow-up": "arrow-up.9d294d1.svg", "arrows": "arrows.de040f9.svg", "attachment": "attachment.8f3dd0a.svg", "augmented-reality": "augmented-reality.8b6ce95.svg", "battery-empty": "battery-empty.38b4b15.svg", "battery-empty-co2": "battery-empty-co2.c4cabef.svg", "battery-empty-fuel": "battery-empty-fuel.e833e13.svg", "battery-full": "battery-full.03de75d.svg", "battery-half": "battery-half.11f1ef8.svg", "battery-one-quarter": "battery-one-quarter.91235a0.svg", "battery-three-quarters": "battery-three-quarters.dcf768f.svg", "bell": "bell.1eab3a2.svg", "bookmark": "bookmark.9d6982f.svg", "bookmark-filled": "bookmark-filled.327ac78.svg", "brain": "brain.838387a.svg", "broadcast": "broadcast.0ad5a15.svg", "cabriolet": "cabriolet.ab33aab.svg", "calculator": "calculator.a323a2d.svg", "calendar": "calendar.70a6a12.svg", "camera": "camera.e5e95b9.svg", "car": "car.35229c9.svg", "car-battery": "car-battery.895510f.svg", "card": "card.f284448.svg", "charging-active": "charging-active.c3aa214.svg", "charging-network": "charging-network.a40072f.svg", "charging-state": "charging-state.f56d8df.svg", "charging-station": "charging-station.5ff1ed4.svg", "chart": "chart.c8c32d2.svg", "chat": "chat.7945544.svg", "check": "check.8ba06be.svg", "city": "city.5ae672c.svg", "climate": "climate.a9d5818.svg", "climate-control": "climate-control.ce31939.svg", "clock": "clock.c88a1ef.svg", "close": "close.eec3c5d.svg", "closed-caption": "closed-caption.ceaf6cb.svg", "cloud": "cloud.2c3959e.svg", "co2-class": "co2-class.fc49211.svg", "co2-emission": "co2-emission.c42e7f8.svg", "color-picker": "color-picker.598f402.svg", "compare": "compare.6578829.svg", "compass": "compass.f90f319.svg", "configurate": "configurate.5311c8d.svg", "copy": "copy.0fcd086.svg", "country-road": "country-road.d2bbc5a.svg", "coupe": "coupe.7549e3e.svg", "cubic-capacity": "cubic-capacity.7b0b8c8.svg", "cut": "cut.851e5c2.svg", "delete": "delete.5a8c8ca.svg", "disable": "disable.5918c32.svg", "dislike": "dislike.51614b0.svg", "dislike-filled": "dislike-filled.e1a8c4d.svg", "document": "document.df36b6c.svg", "door": "door.61c32d6.svg", "download": "download.c06f455.svg", "drag": "drag.9e893fd.svg", "duration": "duration.94e5252.svg", "ear": "ear.27a802f.svg", "edit": "edit.330f321.svg", "email": "email.f2530de.svg", "error": "error.b8ae9ad.svg", "error-filled": "error-filled.a4d06ed.svg", "exclamation": "exclamation.46cd17b.svg", "exclamation-filled": "exclamation-filled.9d09ed1.svg", "external": "external.fb677b9.svg", "fast-backward": "fast-backward.a71faae.svg", "fast-forward": "fast-forward.1e6fa9f.svg", "file-csv": "file-csv.4140e24.svg", "file-excel": "file-excel.56d577d.svg", "filter": "filter.610f808.svg", "fingerprint": "fingerprint.6a85170.svg", "flag": "flag.7af5baf.svg", "flash": "flash.88a2ada.svg", "fuel-station": "fuel-station.f7bdf51.svg", "garage": "garage.5014e8d.svg", "genuine-parts": "genuine-parts.6bfddde.svg", "geo-localization": "geo-localization.516d603.svg", "gift": "gift.7beb1eb.svg", "globe": "globe.56cc8fc.svg", "grid": "grid.06bc31a.svg", "grip": "grip.5ec4289.svg", "group": "group.051436a.svg", "hand": "hand.4e85714.svg", "heart": "heart.9a5962e.svg", "heart-filled": "heart-filled.dd7decf.svg", "highway": "highway.bf0eb24.svg", "highway-filled": "highway-filled.38e93fb.svg", "history": "history.f09645c.svg", "home": "home.7b1d1da.svg", "horn": "horn.bf47b1a.svg", "image": "image.b2614f0.svg", "increase": "increase.700012f.svg", "information": "information.da41162.svg", "information-filled": "information-filled.8f08911.svg", "key": "key.ee5d89b.svg", "laptop": "laptop.c422480.svg", "leaf": "leaf.92ca6a6.svg", "leather": "leather.1d2769a.svg", "light": "light.f0eb8e4.svg", "like": "like.a7468cd.svg", "like-filled": "like-filled.a0126c1.svg", "limousine": "limousine.87799d5.svg", "linked": "linked.8f30cb5.svg", "list": "list.411dd00.svg", "locate": "locate.6554f9e.svg", "lock": "lock.243281a.svg", "lock-open": "lock-open.95803d2.svg", "logo-apple-carplay": "logo-apple-carplay.c872af9.svg", "logo-apple-music": "logo-apple-music.1395f37.svg", "logo-apple-podcast": "logo-apple-podcast.09be038.svg", "logo-baidu": "logo-baidu.9e89c7d.svg", "logo-delicious": "logo-delicious.e83f574.svg", "logo-digg": "logo-digg.f096670.svg", "logo-facebook": "logo-facebook.74abe88.svg", "logo-foursquare": "logo-foursquare.d638fd8.svg", "logo-gmail": "logo-gmail.5f96ee2.svg", "logo-google": "logo-google.1dee423.svg", "logo-hatena": "logo-hatena.da509f0.svg", "logo-instagram": "logo-instagram.b916daa.svg", "logo-kaixin": "logo-kaixin.b1211a2.svg", "logo-kakaotalk": "logo-kakaotalk.38f5396.svg", "logo-kununu": "logo-kununu.79344ff.svg", "logo-linkedin": "logo-linkedin.b72559f.svg", "logo-naver": "logo-naver.75588fe.svg", "logo-pinterest": "logo-pinterest.e8f6963.svg", "logo-qq": "logo-qq.6d9b6d9.svg", "logo-qq-share": "logo-qq-share.ee864d9.svg", "logo-reddit": "logo-reddit.da13e44.svg", "logo-skyrock": "logo-skyrock.eb2f28d.svg", "logo-snapchat": "logo-snapchat.ef706a2.svg", "logo-sohu": "logo-sohu.a30c66b.svg", "logo-spotify": "logo-spotify.2ec4b2d.svg", "logo-tecent": "logo-tecent.d119e85.svg", "logo-telegram": "logo-telegram.d151481.svg", "logo-tiktok": "logo-tiktok.2f3a465.svg", "logo-tumblr": "logo-tumblr.c689f44.svg", "logo-twitter": "logo-twitter.5f2490a.svg", "logo-viber": "logo-viber.198bd43.svg", "logo-vk": "logo-vk.37b94e0.svg", "logo-wechat": "logo-wechat.83b2b98.svg", "logo-weibo": "logo-weibo.c8dacee.svg", "logo-whatsapp": "logo-whatsapp.add9a6d.svg", "logo-x": "logo-x.5f2490a.svg", "logo-xing": "logo-xing.3a8df0f.svg", "logo-yahoo": "logo-yahoo.8cbd0ba.svg", "logo-youku": "logo-youku.fe988d0.svg", "logo-youtube": "logo-youtube.da3798f.svg", "logout": "logout.7ec7451.svg", "map": "map.c16f618.svg", "menu-dots-horizontal": "menu-dots-horizontal.788f7fa.svg", "menu-dots-vertical": "menu-dots-vertical.4970a65.svg", "menu-lines": "menu-lines.e332216.svg", "microphone": "microphone.8ecdce6.svg", "minus": "minus.f6d964c.svg", "mobile": "mobile.7f35446.svg", "moon": "moon.5b73246.svg", "new-chat": "new-chat.95ffd2e.svg", "news": "news.5b604b0.svg", "north-arrow": "north-arrow.2da1dbe.svg", "oil-can": "oil-can.cb58fc7.svg", "online-search": "online-search.90e9ab1.svg", "parking-brake": "parking-brake.45704bd.svg", "parking-light": "parking-light.c49a231.svg", "paste": "paste.dd60261.svg", "pause": "pause.e41b935.svg", "phone": "phone.f4f774b.svg", "pin": "pin.3417cec.svg", "pin-filled": "pin-filled.7b8e9ba.svg", "pivot": "pivot.3ae18b8.svg", "play": "play.24226d4.svg", "plug": "plug.c159935.svg", "plus": "plus.319993e.svg", "preheating": "preheating.e2a796f.svg", "price-tag": "price-tag.f0d3917.svg", "printer": "printer.f59b0ee.svg", "purchase": "purchase.9cd6d65.svg", "push-pin": "push-pin.89e4ead.svg", "push-pin-off": "push-pin-off.ba99213.svg", "qr": "qr.87a49a3.svg", "qr-off": "qr-off.64e21b9.svg", "question": "question.3402a63.svg", "question-filled": "question-filled.cf25dd5.svg", "racing-flag": "racing-flag.b7ddcc8.svg", "radar": "radar.de5a6c1.svg", "radio": "radio.2b48e53.svg", "refresh": "refresh.41fd868.svg", "replay": "replay.55a99f2.svg", "reset": "reset.e53d52f.svg", "return": "return.46d30de.svg", "road": "road.bd3d4bc.svg", "roof-closed": "roof-closed.018d021.svg", "roof-open": "roof-open.51c8ee6.svg", "route": "route.f4fbbb4.svg", "rss": "rss.0e77baf.svg", "save": "save.6171ff5.svg", "screen": "screen.420be15.svg", "search": "search.3f0f1ce.svg", "seat": "seat.a3ebc40.svg", "send": "send.b32099c.svg", "service-technician": "service-technician.8749028.svg", "share": "share.a0b30da.svg", "shopping-bag": "shopping-bag.3f91a9b.svg", "shopping-bag-filled": "shopping-bag-filled.abf6c98.svg", "shopping-cart": "shopping-cart.370e224.svg", "shopping-cart-filled": "shopping-cart-filled.e0c3a65.svg", "sidebar": "sidebar.8e43896.svg", "sidelights": "sidelights.65c9dd9.svg", "skip-backward": "skip-backward.cd25ac5.svg", "skip-forward": "skip-forward.001e97f.svg", "snowflake": "snowflake.83907b3.svg", "sort": "sort.92b50bd.svg", "stack": "stack.804af93.svg", "star": "star.4c5bb15.svg", "star-filled": "star-filled.84ef2f6.svg", "steering-wheel": "steering-wheel.4dea19e.svg", "stop": "stop.173b6ac.svg", "stopwatch": "stopwatch.0e048a4.svg", "subtract": "subtract.57eed1d.svg", "success": "success.b16d4c1.svg", "success-filled": "success-filled.1832d98.svg", "sun": "sun.4301cbd.svg", "suv": "suv.33ac4aa.svg", "switch": "switch.66f74c4.svg", "tablet": "tablet.07341ac.svg", "tachometer": "tachometer.3a2fc3c.svg", "theme": "theme.08f6508.svg", "tire": "tire.e5c9372.svg", "trigger-finger": "trigger-finger.65aa6e2.svg", "truck": "truck.2c26c04.svg", "turismo": "turismo.a066b9f.svg", "unlinked": "unlinked.e9afe39.svg", "upload": "upload.d1f5a2a.svg", "user": "user.c18dabe.svg", "user-filled": "user-filled.2ea646d.svg", "user-group": "user-group.79cdf86.svg", "user-manual": "user-manual.470e243.svg", "video": "video.7590689.svg", "view": "view.5b4d7f6.svg", "view-off": "view-off.a4ede54.svg", "volume-off": "volume-off.bcd49e7.svg", "volume-up": "volume-up.2084f60.svg", "warning": "warning.59927e6.svg", "warning-filled": "warning-filled.1f6fe21.svg", "weather": "weather.9c96bd7.svg", "weight": "weight.b57a60d.svg", "wifi": "wifi.e2a8d9c.svg", "work": "work.9dd71a4.svg", "wrench": "wrench.09a2a67.svg", "wrenches": "wrenches.d2ed45d.svg", "zoom-in": "zoom-in.ff299b8.svg", "zoom-out": "zoom-out.ebb6246.svg" };
|
|
@@ -3622,7 +3622,7 @@ const getFieldsetAriaAttributes = (isRequired, isInvalid, aria) => {
|
|
|
3622
3622
|
};
|
|
3623
3623
|
};
|
|
3624
3624
|
const buildFlagUrl = (flagName) => {
|
|
3625
|
-
return `${getCDNBaseURL()}/flags/${FLAGS_MANIFEST[flagName] || FLAGS_MANIFEST.
|
|
3625
|
+
return `${getCDNBaseURL()}/flags/${FLAGS_MANIFEST[flagName] || FLAGS_MANIFEST.xx}`;
|
|
3626
3626
|
};
|
|
3627
3627
|
const headingSizeToTagMap = {
|
|
3628
3628
|
small: 'h6',
|
|
@@ -3824,8 +3824,6 @@ const getSegmentedControlItemAriaAttributes = (isSelected, isDisabled, ariaProp)
|
|
|
3824
3824
|
const getIconColor = (isDisabled) => {
|
|
3825
3825
|
return isDisabled ? 'contrast-medium' : 'primary';
|
|
3826
3826
|
};
|
|
3827
|
-
|
|
3828
|
-
const ITEM_PADDING = '17px';
|
|
3829
3827
|
const { font: BUTTON_FONT } = textSmallStyle;
|
|
3830
3828
|
const { font: LABEL_FONT } = textXSmallStyle;
|
|
3831
3829
|
const ICON_SIZE = '1.5rem';
|
|
@@ -3839,7 +3837,6 @@ const tempDiv = hasDocument ? document.createElement('div') : undefined;
|
|
|
3839
3837
|
if (tempDiv) {
|
|
3840
3838
|
tempDiv.style.position = 'absolute';
|
|
3841
3839
|
tempDiv.style.visibility = 'hidden';
|
|
3842
|
-
tempDiv.style.padding = `0 ${ITEM_PADDING}`; // Uses the largest possible padding of the item
|
|
3843
3840
|
tempDiv.style.border = `${borderWidthBase} solid`;
|
|
3844
3841
|
tempDiv.style.boxSizing = 'border-box';
|
|
3845
3842
|
tempDiv.style.font = BUTTON_FONT.replace(fontFamily, tempFont);
|
|
@@ -7,7 +7,7 @@ import { DSRSegmentedControlItem } from '../dsr-components/segmented-control-ite
|
|
|
7
7
|
|
|
8
8
|
const PSegmentedControlItem = /*#__PURE__*/ forwardRef((
|
|
9
9
|
// @ts-ignore
|
|
10
|
-
{ aria, disabled = false, icon, iconSource, label, value, className, children, selected, theme = 'light', ...rest }, ref) => {
|
|
10
|
+
{ aria, disabled = false, icon, iconSource, label, value, className, children, compact, selected, theme = 'light', ...rest }, ref) => {
|
|
11
11
|
const elementRef = useRef(undefined);
|
|
12
12
|
const WebComponentTag = usePrefix('p-segmented-control-item');
|
|
13
13
|
const propsToSync = [aria, disabled, icon, iconSource, label, value];
|
|
@@ -20,7 +20,7 @@ const PSegmentedControlItem = /*#__PURE__*/ forwardRef((
|
|
|
20
20
|
// @ts-ignore
|
|
21
21
|
...(!process.browser
|
|
22
22
|
? {
|
|
23
|
-
children: (jsx(DSRSegmentedControlItem, { aria, disabled, icon, iconSource, label, value, selected, theme, children })),
|
|
23
|
+
children: (jsx(DSRSegmentedControlItem, { aria, disabled, icon, iconSource, label, value, compact, selected, theme, children })),
|
|
24
24
|
}
|
|
25
25
|
: {
|
|
26
26
|
children,
|
|
@@ -5,17 +5,17 @@ import { useEventCallback, usePrefix, useTheme, useBrowserLayoutEffect, useMerge
|
|
|
5
5
|
import { syncRef } from '../../utils.mjs';
|
|
6
6
|
import { DSRSegmentedControl } from '../dsr-components/segmented-control.mjs';
|
|
7
7
|
|
|
8
|
-
const PSegmentedControl = /*#__PURE__*/ forwardRef(({ backgroundColor, columns = 'auto', disabled = false, form, name, onBlur, onChange, onSegmentedControlChange, onUpdate, theme, value, className, children, ...rest }, ref) => {
|
|
8
|
+
const PSegmentedControl = /*#__PURE__*/ forwardRef(({ backgroundColor, columns = 'auto', compact = false, disabled = false, form, name, onBlur, onChange, onSegmentedControlChange, onUpdate, theme, value, className, children, ...rest }, ref) => {
|
|
9
9
|
const elementRef = useRef(undefined);
|
|
10
10
|
useEventCallback(elementRef, 'blur', onBlur);
|
|
11
11
|
useEventCallback(elementRef, 'change', onChange);
|
|
12
12
|
useEventCallback(elementRef, 'segmentedControlChange', onSegmentedControlChange);
|
|
13
13
|
useEventCallback(elementRef, 'update', onUpdate);
|
|
14
14
|
const WebComponentTag = usePrefix('p-segmented-control');
|
|
15
|
-
const propsToSync = [backgroundColor, columns, disabled, form, name, theme || useTheme(), value];
|
|
15
|
+
const propsToSync = [backgroundColor, columns, compact, disabled, form, name, theme || useTheme(), value];
|
|
16
16
|
useBrowserLayoutEffect(() => {
|
|
17
17
|
const { current } = elementRef;
|
|
18
|
-
['backgroundColor', 'columns', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
18
|
+
['backgroundColor', 'columns', 'compact', 'disabled', 'form', 'name', 'theme', 'value'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
19
19
|
}, propsToSync);
|
|
20
20
|
const props = {
|
|
21
21
|
...rest,
|
|
@@ -23,7 +23,7 @@ const PSegmentedControl = /*#__PURE__*/ forwardRef(({ backgroundColor, columns =
|
|
|
23
23
|
...(!process.browser
|
|
24
24
|
? {
|
|
25
25
|
...{ "role": "group" },
|
|
26
|
-
children: (jsx(DSRSegmentedControl, { backgroundColor, columns, disabled, form, name, theme: theme || useTheme(), value, children })),
|
|
26
|
+
children: (jsx(DSRSegmentedControl, { backgroundColor, columns, compact, disabled, form, name, theme: theme || useTheme(), value, children })),
|
|
27
27
|
}
|
|
28
28
|
: {
|
|
29
29
|
children,
|
|
@@ -18,7 +18,7 @@ class DSRSegmentedControlItem extends Component {
|
|
|
18
18
|
const hasIcon = !!this.props.icon || !!this.props.iconSource;
|
|
19
19
|
const hasSlottedContent = !!children.length;
|
|
20
20
|
const isDisabled = this.props.disabled || this.props.disabledParent;
|
|
21
|
-
const style = minifyCss(getComponentCss$v(isDisabled, this.props.selected, hasIcon, hasSlottedContent, this.props.theme || 'light' // default as fallback
|
|
21
|
+
const style = minifyCss(getComponentCss$v(this.props.compact, isDisabled, this.props.selected, hasIcon, hasSlottedContent, this.props.theme || 'light' // default as fallback
|
|
22
22
|
));
|
|
23
23
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", shadowrootdelegatesfocus: "true", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsxs("button", { type: "button", ...getSegmentedControlItemAriaAttributes(this.props.selected, this.props.disabled, this.props.aria), children: [this.props.label && jsx("span", { children: this.props.label }), hasIcon && (jsx(PIcon, { className: "icon", size: "inherit", name: this.props.icon, source: this.props.iconSource, color: getIconColor(this.props.disabled), theme: this.props.theme || 'light', "aria-hidden": "true" })), jsx("slot", {})] }) })] }), this.props.children] }));
|
|
24
24
|
}
|
|
@@ -25,7 +25,7 @@ class DSRSegmentedControl extends Component {
|
|
|
25
25
|
const manipulatedChildren = children.map((child) => typeof child === 'object' && 'props' in child && otherChildren.includes(child)
|
|
26
26
|
? { ...child, props: { ...child.props, selected: child.props?.value === this.props.value, backgroundColor: this.props.backgroundColor, theme: this.props.theme } }
|
|
27
27
|
: child);
|
|
28
|
-
const style = minifyCss(getComponentCss$u(100, this.props.columns));
|
|
28
|
+
const style = minifyCss(getComponentCss$u(100, this.props.columns, this.props.compact));
|
|
29
29
|
return (jsxs(Fragment, { children: [jsxs("template", { shadowroot: "open", shadowrootmode: "open", children: [jsx("style", { dangerouslySetInnerHTML: { __html: style } }), jsx(Fragment, { children: jsx("slot", {}) })] }), manipulatedChildren] }));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -9,6 +9,10 @@ export type PSegmentedControlProps = BaseProps & {
|
|
|
9
9
|
* Sets the amount of columns.
|
|
10
10
|
*/
|
|
11
11
|
columns?: BreakpointCustomizable<SegmentedControlColumns>;
|
|
12
|
+
/**
|
|
13
|
+
* A boolean value that, if present, renders the segmented-control as a compact version.
|
|
14
|
+
*/
|
|
15
|
+
compact?: boolean;
|
|
12
16
|
/**
|
|
13
17
|
* Disables the segmented-control.
|
|
14
18
|
*/
|
|
@@ -55,6 +59,10 @@ export declare const PSegmentedControl: import("react").ForwardRefExoticComponen
|
|
|
55
59
|
* Sets the amount of columns.
|
|
56
60
|
*/
|
|
57
61
|
columns?: BreakpointCustomizable<SegmentedControlColumns>;
|
|
62
|
+
/**
|
|
63
|
+
* A boolean value that, if present, renders the segmented-control as a compact version.
|
|
64
|
+
*/
|
|
65
|
+
compact?: boolean;
|
|
58
66
|
/**
|
|
59
67
|
* Disables the segmented-control.
|
|
60
68
|
*/
|
package/ssr/esm/lib/types.d.ts
CHANGED
|
@@ -502,6 +502,7 @@ declare const ICON_NAMES: readonly [
|
|
|
502
502
|
];
|
|
503
503
|
export type IconName = typeof ICON_NAMES[number];
|
|
504
504
|
declare const FLAG_NAMES: readonly [
|
|
505
|
+
"ad",
|
|
505
506
|
"ae",
|
|
506
507
|
"am",
|
|
507
508
|
"ar",
|
|
@@ -538,6 +539,7 @@ declare const FLAG_NAMES: readonly [
|
|
|
538
539
|
"gb",
|
|
539
540
|
"ge",
|
|
540
541
|
"gh",
|
|
542
|
+
"gi",
|
|
541
543
|
"gr",
|
|
542
544
|
"gt",
|
|
543
545
|
"hk",
|
|
@@ -560,12 +562,15 @@ declare const FLAG_NAMES: readonly [
|
|
|
560
562
|
"kw",
|
|
561
563
|
"kz",
|
|
562
564
|
"lb",
|
|
565
|
+
"li",
|
|
563
566
|
"lk",
|
|
564
567
|
"lt",
|
|
565
568
|
"lu",
|
|
566
569
|
"lv",
|
|
567
570
|
"ma",
|
|
571
|
+
"mc",
|
|
568
572
|
"md",
|
|
573
|
+
"me",
|
|
569
574
|
"mk",
|
|
570
575
|
"mn",
|
|
571
576
|
"mo",
|
|
@@ -602,12 +607,14 @@ declare const FLAG_NAMES: readonly [
|
|
|
602
607
|
"tn",
|
|
603
608
|
"tr",
|
|
604
609
|
"tt",
|
|
610
|
+
"tw",
|
|
605
611
|
"ua",
|
|
606
612
|
"us",
|
|
607
613
|
"uy",
|
|
608
614
|
"uz",
|
|
609
615
|
"ve",
|
|
610
616
|
"vn",
|
|
617
|
+
"xx",
|
|
611
618
|
"za"
|
|
612
619
|
];
|
|
613
620
|
export type FlagName = typeof FLAG_NAMES[number];
|