diginet-core-ui 1.3.47-beta.3 → 1.3.47-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1327,7 +1327,7 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
1327
1327
|
...labelProps
|
|
1328
1328
|
}, label) : null, [label, required, disabled, labelProps]);
|
|
1329
1329
|
const inputComp = useMemo(() => {
|
|
1330
|
-
const _InputCSS = InputCSS(multiple, renderSelectedItem
|
|
1330
|
+
const _InputCSS = InputCSS(multiple, renderSelectedItem);
|
|
1331
1331
|
|
|
1332
1332
|
const _DropdownFormCSS = DropdownFormCSS(viewType, multiple, placeholder, itemMultipleSize, renderSelectedItem, disabled);
|
|
1333
1333
|
|
|
@@ -1422,10 +1422,10 @@ const Dropdown = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
1422
1422
|
}));
|
|
1423
1423
|
/* Start styled */
|
|
1424
1424
|
|
|
1425
|
-
const InputCSS = (multiple, renderSelectedItem
|
|
1425
|
+
const InputCSS = (multiple, renderSelectedItem) => css`
|
|
1426
1426
|
${flexRow};
|
|
1427
1427
|
width: 100%;
|
|
1428
|
-
${!multiple && renderSelectedItem ? `width: calc(100% - 34px
|
|
1428
|
+
${!multiple && renderSelectedItem ? `width: calc(100% - 34px)` : ''}
|
|
1429
1429
|
`;
|
|
1430
1430
|
|
|
1431
1431
|
const DropdownIconCSS = css`
|
package/package.json
CHANGED
package/styles/general.js
CHANGED
|
@@ -16,13 +16,16 @@ export const zIndex = number => {
|
|
|
16
16
|
return rootZIndex + number;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* get value spacing with
|
|
20
|
-
* @param vl - default 1
|
|
21
|
-
* @returns {number}
|
|
19
|
+
* get value spacing with rootSpacing
|
|
20
|
+
* @param {(number|number[])} vl - default 1
|
|
21
|
+
* @returns {(number|string)}
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
export const getSpacing = (vl = 1) => {
|
|
25
|
-
return Number(vl) * rootSpacing;
|
|
25
|
+
if (typeof vl === 'number') return Number(vl) * rootSpacing;else if (Array.isArray(vl)) {
|
|
26
|
+
if (vl.length > 4) vl.length = 4;
|
|
27
|
+
return `${vl.flatMap(i => Number(i !== null && i !== void 0 ? i : 0) * rootSpacing).join('px ')}px`;
|
|
28
|
+
}
|
|
26
29
|
};
|
|
27
30
|
/**
|
|
28
31
|
* replace rootZIndex
|