@dilicorp/ui 0.0.42 → 0.0.43
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/dist/atoms/col.d.ts +1 -1
- package/dist/atoms/col.d.ts.map +1 -1
- package/dist/atoms/col.js +7 -1
- package/package.json +1 -1
package/dist/atoms/col.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare type columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
2
|
+
declare type columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto' | 'none';
|
|
3
3
|
export declare type ColProps = {
|
|
4
4
|
size?: columns | columns[] | boolean;
|
|
5
5
|
} & React.HTMLAttributes<HTMLDivElement>;
|
package/dist/atoms/col.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"col.d.ts","sourceRoot":"","sources":["../../src/atoms/col.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,aAAK,OAAO,GAAG,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,EAAE,GAAC,EAAE,GAAC,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"col.d.ts","sourceRoot":"","sources":["../../src/atoms/col.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,aAAK,OAAO,GAAG,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,CAAC,GAAC,EAAE,GAAC,EAAE,GAAC,EAAE,GAAC,MAAM,GAAC,MAAM,CAAA;AAEvD,oBAAY,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,OAAO,GAAC,OAAO,EAAE,GAAC,OAAO,CAAA;CACjC,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAA;AAYxC,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAalC,CAAA"}
|
package/dist/atoms/col.js
CHANGED
|
@@ -12,11 +12,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
const RESPONSIVE_FLAGS = ['', 'sm-', 'md-', 'lg-', 'xl-', 'xxl-'];
|
|
15
|
+
const sanitizeByNone = (value) => {
|
|
16
|
+
if (value.indexOf('-none') !== -1) {
|
|
17
|
+
return value.replace('-none', '');
|
|
18
|
+
}
|
|
19
|
+
return value;
|
|
20
|
+
};
|
|
15
21
|
export const Col = (_a) => {
|
|
16
22
|
var { children, size = false, className } = _a, props = __rest(_a, ["children", "size", "className"]);
|
|
17
23
|
const columns = !Array.isArray(size)
|
|
18
24
|
? (typeof size === 'boolean' ? 'col-auto' : `col-${size}`)
|
|
19
|
-
: size.map((value, key) => `col-${RESPONSIVE_FLAGS[key]}${value}`).join(' ');
|
|
25
|
+
: size.map((value, key) => sanitizeByNone(`col-${RESPONSIVE_FLAGS[key]}${value}`)).join(' ');
|
|
20
26
|
const classes = classNames(className, columns);
|
|
21
27
|
return (React.createElement("div", Object.assign({}, props, { className: classes }), children));
|
|
22
28
|
};
|