pds-dev-kit-web-test 2.7.400 → 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.
@@ -147,7 +147,8 @@ function Text(props) {
147
147
  height: '100%',
148
148
  display: 'flex',
149
149
  alignItems: "".concat(textStyle.alignItems),
150
- overflowY: heightFitContent ? 'hidden' : 'scroll'
150
+ overflowY: textStyle.overflowY,
151
+ scrollbarWidth: textStyle.scrollbarWidth
151
152
  }, ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsxs)(S_CB_Box_1.S_CB_Box, __assign({ onMouseEnter: function (e) {
152
153
  e.currentTarget.classList.add('hovered');
153
154
  }, onMouseLeave: function (e) {
@@ -164,7 +165,10 @@ function getTextStyles(props, device) {
164
165
  'CB_STYLE_PROP_TEXT_SPEC_LETTERSPACING',
165
166
  'CB_STYLE_PROP_TEXT_SPEC_COLOR',
166
167
  'CB_STYLE_PROP_TEXT_SPEC_HORIZONTAL',
167
- 'CB_STYLE_PROP_TEXT_SPEC_VERTICAL'
168
+ 'CB_STYLE_PROP_TEXT_SPEC_VERTICAL',
169
+ 'CB_STYLE_PROP_TEXT_SPEC_FITCONTENT',
170
+ 'CB_STYLE_PROP_TEXT_SPEC_SCROLLCONTENTS',
171
+ 'CB_STYLE_PROP_TEXT_SPEC_SCROLLBAR'
168
172
  ];
169
173
  return (0, textUtil_1.parseStyleTextToCSSProp)({ availableSpecCodes: availableSpecCodes, props: props, device: device, propKey: 'TEXT' });
170
174
  }
@@ -83,6 +83,8 @@ export type CB_STYLE_PROP_TEXT_SPECS_BASE = {
83
83
  CB_STYLE_PROP_TEXT_SPEC_VERTICAL: ENUM_STRING;
84
84
  CB_STYLE_PROP_TEXT_SPEC_ELLIPSIS: NUMBER_INTEGER;
85
85
  CB_STYLE_PROP_TEXT_SPEC_FITCONTENT: boolean;
86
+ CB_STYLE_PROP_TEXT_SPEC_SCROLLBAR: boolean;
87
+ CB_STYLE_PROP_TEXT_SPEC_SCROLLCONTENTS: boolean;
86
88
  };
87
89
  export type CB_STYLE_PROP_TEXT_SPECS = CB_STYLE_PROP_TEXT_SPECS_BASE & {
88
90
  'CB_STYLE_PROP_TEXT_SPEC_TYPEFACE:HOVER': ENUM_STRING | null | undefined;
@@ -115,6 +117,12 @@ export type CB_STYLE_PROP_TEXT_SPECS = CB_STYLE_PROP_TEXT_SPECS_BASE & {
115
117
  'CB_STYLE_PROP_TEXT_SPEC_FITCONTENT:HOVER': boolean | null | undefined;
116
118
  'CB_STYLE_PROP_TEXT_SPEC_FITCONTENT:MOBILE': boolean | null | undefined;
117
119
  'CB_STYLE_PROP_TEXT_SPEC_FITCONTENT:MOBILE:HOVER': boolean | null | undefined;
120
+ 'CB_STYLE_PROP_TEXT_SPEC_SCROLLBAR:MOBILE': boolean | null | undefined;
121
+ 'CB_STYLE_PROP_TEXT_SPEC_SCROLLBAR:MOBILE:HOVER': boolean | null | undefined;
122
+ 'CB_STYLE_PROP_TEXT_SPEC_SCROLLBAR:HOVER': boolean | null | undefined;
123
+ 'CB_STYLE_PROP_TEXT_SPEC_SCROLLCONTENTS:HOVER': boolean | null | undefined;
124
+ 'CB_STYLE_PROP_TEXT_SPEC_SCROLLCONTENTS:MOBILE': boolean | null | undefined;
125
+ 'CB_STYLE_PROP_TEXT_SPEC_SCROLLCONTENTS:MOBILE:HOVER': boolean | null | undefined;
118
126
  };
119
127
  export type CBColorPropsKeys = keyof CB_STYLE_PROP_COLOR_SPECS;
120
128
  export type CBColorValueSetType = Partial<Record<keyof CB_STYLE_PROP_COLOR_SPECS, CB_STYLE_PROP_COLOR_ENUM_GRADIENT | NUMBER_INTEGER | ENUM_STRING | undefined>>;
@@ -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";
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
- return 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;
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");
@@ -102,20 +102,46 @@ function parseStyleTextToCSSProp(_a) {
102
102
  hoverStyle: __assign(__assign({}, acc.hoverStyle), (_q = {}, _q[cssPropertyKey] = getVerticalPositionValue(String(hoverValue)), _q))
103
103
  };
104
104
  }
105
+ if (cssPropertyKey === 'overflowY') {
106
+ if (hoverValue === null || hoverValue === undefined) {
107
+ var overflowYValue = value === true ? 'scroll' : 'hidden';
108
+ return {
109
+ style: __assign(__assign({}, acc.style), { overflowY: overflowYValue }),
110
+ hoverStyle: __assign({}, acc.hoverStyle)
111
+ };
112
+ }
113
+ }
114
+ if (cssPropertyKey === 'scrollbarWidth') {
115
+ if (hoverValue === null || hoverValue === undefined) {
116
+ var scrollBarWidthValue = value === true ? 'thin' : 'none';
117
+ return {
118
+ style: __assign(__assign({}, acc.style), (_r = {}, _r[cssPropertyKey] = scrollBarWidthValue, _r)),
119
+ hoverStyle: __assign({}, acc.hoverStyle)
120
+ };
121
+ }
122
+ }
105
123
  if (hoverValue === null || hoverValue === undefined) {
106
124
  return {
107
- style: __assign(__assign({}, acc.style), (_r = {}, _r[cssPropertyKey] = value, _r)),
125
+ style: __assign(__assign({}, acc.style), (_s = {}, _s[cssPropertyKey] = value, _s)),
108
126
  hoverStyle: __assign({}, acc.hoverStyle)
109
127
  };
110
128
  }
111
129
  return {
112
- style: __assign(__assign({}, acc.style), (_s = {}, _s[cssPropertyKey] = value, _s)),
113
- hoverStyle: __assign(__assign({}, acc.hoverStyle), (_t = {}, _t[cssPropertyKey] = hoverValue, _t))
130
+ style: __assign(__assign({}, acc.style), (_t = {}, _t[cssPropertyKey] = value, _t)),
131
+ hoverStyle: __assign(__assign({}, acc.hoverStyle), (_u = {}, _u[cssPropertyKey] = hoverValue, _u))
114
132
  };
115
133
  }, {
116
134
  style: {},
117
135
  hoverStyle: {}
118
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;
119
145
  }
120
146
  exports.parseStyleTextToCSSProp = parseStyleTextToCSSProp;
121
147
  function getTextCSSPropKey(key, cbName) {
@@ -160,6 +186,15 @@ function getTextCSSPropKey(key, cbName) {
160
186
  case "CB_STYLE_PROP_".concat(cbName, "_SPEC_VERTICAL:MOBILE"):
161
187
  case "CB_STYLE_PROP_".concat(cbName, "_SPEC_VERTICAL:MOBILE:HOVER"):
162
188
  return 'alignItems';
189
+ case "CB_STYLE_PROP_".concat(cbName, "_SPEC_SCROLLCONTENTS"):
190
+ case "CB_STYLE_PROP_".concat(cbName, "_SPEC_SCROLLCONTENTS:MOBILE"):
191
+ return 'overflowY';
192
+ case "CB_STYLE_PROP_".concat(cbName, "_SPEC_SCROLLBAR"):
193
+ case "CB_STYLE_PROP_".concat(cbName, "_SPEC_SCROLLBAR:MOBILE"):
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';
163
198
  default:
164
199
  return '';
165
200
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.7.400",
3
+ "version": "2.7.402",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",