pds-dev-kit-web-test 2.7.401 → 2.7.402
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.
|
@@ -10,5 +10,5 @@ type ParseStyleTextProps<T> = {
|
|
|
10
10
|
propKey: 'TEXT';
|
|
11
11
|
device: Device;
|
|
12
12
|
};
|
|
13
|
-
export declare function getTextCSSPropKey(key: string, cbName: 'TEXT'): "" | "color" | "letterSpacing" | "fontWeight" | "fontFamily" | "lineHeight" | "fontSize" | "HORIZONTAL" | "alignItems" | "overflowY" | "scrollbarWidth";
|
|
13
|
+
export declare function getTextCSSPropKey(key: string, cbName: 'TEXT'): "" | "color" | "letterSpacing" | "fontWeight" | "fontFamily" | "lineHeight" | "fontSize" | "HORIZONTAL" | "alignItems" | "overflowY" | "scrollbarWidth" | "overflow";
|
|
14
14
|
export {};
|
|
@@ -14,8 +14,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
14
14
|
exports.getTextCSSPropKey = exports.parseStyleTextToCSSProp = void 0;
|
|
15
15
|
function parseStyleTextToCSSProp(_a) {
|
|
16
16
|
var availableSpecCodes = _a.availableSpecCodes, props = _a.props, propKey = _a.propKey, device = _a.device;
|
|
17
|
-
|
|
18
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u
|
|
17
|
+
var styleProps = availableSpecCodes.reduce(function (acc, currentKey) {
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
19
19
|
var stringifiedKey = currentKey.toString();
|
|
20
20
|
var keyWithDevice = device === 'DESKTOP' ? currentKey : "".concat(stringifiedKey, ":MOBILE") || currentKey;
|
|
21
21
|
var keyWithHover = "".concat(keyWithDevice.toString(), ":HOVER");
|
|
@@ -106,7 +106,7 @@ function parseStyleTextToCSSProp(_a) {
|
|
|
106
106
|
if (hoverValue === null || hoverValue === undefined) {
|
|
107
107
|
var overflowYValue = value === true ? 'scroll' : 'hidden';
|
|
108
108
|
return {
|
|
109
|
-
style: __assign(__assign({}, acc.style),
|
|
109
|
+
style: __assign(__assign({}, acc.style), { overflowY: overflowYValue }),
|
|
110
110
|
hoverStyle: __assign({}, acc.hoverStyle)
|
|
111
111
|
};
|
|
112
112
|
}
|
|
@@ -115,25 +115,33 @@ function parseStyleTextToCSSProp(_a) {
|
|
|
115
115
|
if (hoverValue === null || hoverValue === undefined) {
|
|
116
116
|
var scrollBarWidthValue = value === true ? 'thin' : 'none';
|
|
117
117
|
return {
|
|
118
|
-
style: __assign(__assign({}, acc.style), (
|
|
118
|
+
style: __assign(__assign({}, acc.style), (_r = {}, _r[cssPropertyKey] = scrollBarWidthValue, _r)),
|
|
119
119
|
hoverStyle: __assign({}, acc.hoverStyle)
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
if (hoverValue === null || hoverValue === undefined) {
|
|
124
124
|
return {
|
|
125
|
-
style: __assign(__assign({}, acc.style), (
|
|
125
|
+
style: __assign(__assign({}, acc.style), (_s = {}, _s[cssPropertyKey] = value, _s)),
|
|
126
126
|
hoverStyle: __assign({}, acc.hoverStyle)
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
return {
|
|
130
|
-
style: __assign(__assign({}, acc.style), (
|
|
131
|
-
hoverStyle: __assign(__assign({}, acc.hoverStyle), (
|
|
130
|
+
style: __assign(__assign({}, acc.style), (_t = {}, _t[cssPropertyKey] = value, _t)),
|
|
131
|
+
hoverStyle: __assign(__assign({}, acc.hoverStyle), (_u = {}, _u[cssPropertyKey] = hoverValue, _u))
|
|
132
132
|
};
|
|
133
133
|
}, {
|
|
134
134
|
style: {},
|
|
135
135
|
hoverStyle: {}
|
|
136
136
|
});
|
|
137
|
+
var fitContentKey = device === 'DESKTOP'
|
|
138
|
+
? 'CB_STYLE_PROP_TEXT_SPEC_FITCONTENT'
|
|
139
|
+
: 'CB_STYLE_PROP_TEXT_SPEC_FITCONTENT:MOBILE';
|
|
140
|
+
var fitContentValue = props[fitContentKey];
|
|
141
|
+
if (fitContentValue === true) {
|
|
142
|
+
styleProps.style.overflowY = 'hidden';
|
|
143
|
+
}
|
|
144
|
+
return styleProps;
|
|
137
145
|
}
|
|
138
146
|
exports.parseStyleTextToCSSProp = parseStyleTextToCSSProp;
|
|
139
147
|
function getTextCSSPropKey(key, cbName) {
|
|
@@ -184,6 +192,9 @@ function getTextCSSPropKey(key, cbName) {
|
|
|
184
192
|
case "CB_STYLE_PROP_".concat(cbName, "_SPEC_SCROLLBAR"):
|
|
185
193
|
case "CB_STYLE_PROP_".concat(cbName, "_SPEC_SCROLLBAR:MOBILE"):
|
|
186
194
|
return 'scrollbarWidth';
|
|
195
|
+
case "CB_STYLE_PROP_".concat(cbName, "_SPEC_FITCONTENT"):
|
|
196
|
+
case "CB_STYLE_PROP_".concat(cbName, "_SPEC_FITCONTENT:MOBILE"):
|
|
197
|
+
return 'overflow';
|
|
187
198
|
default:
|
|
188
199
|
return '';
|
|
189
200
|
}
|