widenarrow-ui 1.1.50 → 1.1.51
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/lib/components/Grid/Grid.types.d.ts +13 -12
- package/lib/index.d.ts +11 -10
- package/lib/index.esm.js +6 -5
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +6 -5
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Grid/Grid.stories.tsx +3 -3
- package/src/components/Grid/Grid.tsx +7 -2
- package/src/components/Grid/Grid.types.ts +13 -12
- package/src/components/SortableTable/SortableTable.tsx +1 -1
|
@@ -4,27 +4,27 @@ export interface GridProps extends MarginInterface, PaddingInterface, FlexStylin
|
|
|
4
4
|
/**
|
|
5
5
|
* Number of columns on viewports < 576px
|
|
6
6
|
*/
|
|
7
|
-
xs?: number
|
|
7
|
+
xs?: number;
|
|
8
8
|
/**
|
|
9
9
|
* Number of columns on viewports < 768px
|
|
10
10
|
*/
|
|
11
|
-
sm?: number
|
|
11
|
+
sm?: number;
|
|
12
12
|
/**
|
|
13
13
|
* Number of columns on viewports < 1024px
|
|
14
14
|
*/
|
|
15
|
-
md?: number
|
|
15
|
+
md?: number;
|
|
16
16
|
/**
|
|
17
17
|
* Number of columns on viewports < 1200px
|
|
18
18
|
*/
|
|
19
|
-
lg?: number
|
|
19
|
+
lg?: number;
|
|
20
20
|
/**
|
|
21
21
|
* Number of columns on viewports < 1646px
|
|
22
22
|
*/
|
|
23
|
-
xl?: number
|
|
23
|
+
xl?: number;
|
|
24
24
|
/**
|
|
25
25
|
* Number of columns on viewports < 2000px
|
|
26
26
|
*/
|
|
27
|
-
xxl?: number
|
|
27
|
+
xxl?: number;
|
|
28
28
|
/**
|
|
29
29
|
* Optionally provide the number of columns in the grid.
|
|
30
30
|
* @default 12
|
|
@@ -40,12 +40,13 @@ export interface GridProps extends MarginInterface, PaddingInterface, FlexStylin
|
|
|
40
40
|
* or an object for different breakpoints, i.e { xs: '4', md: ['4', '6'], lg: '8' }
|
|
41
41
|
* @default '4'
|
|
42
42
|
*/
|
|
43
|
-
spacing?: string | Array<string> | Record<never, string | string[]
|
|
44
|
-
columns?: number
|
|
45
|
-
className?: string
|
|
46
|
-
children?: ReactNode
|
|
43
|
+
spacing?: string | Array<string> | Record<never, string | string[]>;
|
|
44
|
+
columns?: number;
|
|
45
|
+
className?: string;
|
|
46
|
+
children?: ReactNode;
|
|
47
|
+
role?: string;
|
|
47
48
|
}
|
|
48
49
|
export interface GridContextInterface {
|
|
49
|
-
spacing?: string | Array<string> | Record<never, string | string[]
|
|
50
|
-
columns?: number
|
|
50
|
+
spacing?: string | Array<string> | Record<never, string | string[]>;
|
|
51
|
+
columns?: number;
|
|
51
52
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -620,27 +620,27 @@ interface GridProps extends MarginInterface, PaddingInterface, FlexStylingInterf
|
|
|
620
620
|
/**
|
|
621
621
|
* Number of columns on viewports < 576px
|
|
622
622
|
*/
|
|
623
|
-
xs?: number
|
|
623
|
+
xs?: number;
|
|
624
624
|
/**
|
|
625
625
|
* Number of columns on viewports < 768px
|
|
626
626
|
*/
|
|
627
|
-
sm?: number
|
|
627
|
+
sm?: number;
|
|
628
628
|
/**
|
|
629
629
|
* Number of columns on viewports < 1024px
|
|
630
630
|
*/
|
|
631
|
-
md?: number
|
|
631
|
+
md?: number;
|
|
632
632
|
/**
|
|
633
633
|
* Number of columns on viewports < 1200px
|
|
634
634
|
*/
|
|
635
|
-
lg?: number
|
|
635
|
+
lg?: number;
|
|
636
636
|
/**
|
|
637
637
|
* Number of columns on viewports < 1646px
|
|
638
638
|
*/
|
|
639
|
-
xl?: number
|
|
639
|
+
xl?: number;
|
|
640
640
|
/**
|
|
641
641
|
* Number of columns on viewports < 2000px
|
|
642
642
|
*/
|
|
643
|
-
xxl?: number
|
|
643
|
+
xxl?: number;
|
|
644
644
|
/**
|
|
645
645
|
* Optionally provide the number of columns in the grid.
|
|
646
646
|
* @default 12
|
|
@@ -656,10 +656,11 @@ interface GridProps extends MarginInterface, PaddingInterface, FlexStylingInterf
|
|
|
656
656
|
* or an object for different breakpoints, i.e { xs: '4', md: ['4', '6'], lg: '8' }
|
|
657
657
|
* @default '4'
|
|
658
658
|
*/
|
|
659
|
-
spacing?: string | Array<string> | Record<never, string | string[]
|
|
660
|
-
columns?: number
|
|
661
|
-
className?: string
|
|
662
|
-
children?: ReactNode
|
|
659
|
+
spacing?: string | Array<string> | Record<never, string | string[]>;
|
|
660
|
+
columns?: number;
|
|
661
|
+
className?: string;
|
|
662
|
+
children?: ReactNode;
|
|
663
|
+
role?: string;
|
|
663
664
|
}
|
|
664
665
|
|
|
665
666
|
declare const Grid: FC<GridProps>;
|
package/lib/index.esm.js
CHANGED
|
@@ -2918,7 +2918,7 @@ var s$c = classNames.bind(styles$c);
|
|
|
2918
2918
|
var GridContext = createContext({ spacing: '4', columns: 12 });
|
|
2919
2919
|
var Grid = forwardRef(function (_a, ref) {
|
|
2920
2920
|
var _b, _c;
|
|
2921
|
-
var displayFlex = _a.displayFlex, justifyContent = _a.justifyContent, flexDirection = _a.flexDirection, alignSelf = _a.alignSelf, alignItems = _a.alignItems, flexWrap = _a.flexWrap, flexGrow = _a.flexGrow, container = _a.container, spacing = _a.spacing, columns = _a.columns, xs = _a.xs, sm = _a.sm, md = _a.md, lg = _a.lg, xl = _a.xl, xxl = _a.xxl, children = _a.children, className = _a.className, margin = _a.margin, marginTop = _a.marginTop, marginX = _a.marginX, marginY = _a.marginY, marginBottom = _a.marginBottom, marginRight = _a.marginRight, marginLeft = _a.marginLeft, padding = _a.padding, paddingX = _a.paddingX, paddingY = _a.paddingY, paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, paddingRight = _a.paddingRight, paddingLeft = _a.paddingLeft, rest = __rest(_a, ["displayFlex", "justifyContent", "flexDirection", "alignSelf", "alignItems", "flexWrap", "flexGrow", "container", "spacing", "columns", "xs", "sm", "md", "lg", "xl", "xxl", "children", "className", "margin", "marginTop", "marginX", "marginY", "marginBottom", "marginRight", "marginLeft", "padding", "paddingX", "paddingY", "paddingTop", "paddingBottom", "paddingRight", "paddingLeft"]);
|
|
2921
|
+
var displayFlex = _a.displayFlex, justifyContent = _a.justifyContent, flexDirection = _a.flexDirection, alignSelf = _a.alignSelf, alignItems = _a.alignItems, flexWrap = _a.flexWrap, flexGrow = _a.flexGrow, container = _a.container, spacing = _a.spacing, columns = _a.columns, xs = _a.xs, sm = _a.sm, md = _a.md, lg = _a.lg, xl = _a.xl, xxl = _a.xxl, children = _a.children, className = _a.className, margin = _a.margin, marginTop = _a.marginTop, marginX = _a.marginX, marginY = _a.marginY, marginBottom = _a.marginBottom, marginRight = _a.marginRight, marginLeft = _a.marginLeft, padding = _a.padding, paddingX = _a.paddingX, role = _a.role, paddingY = _a.paddingY, paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, paddingRight = _a.paddingRight, paddingLeft = _a.paddingLeft, rest = __rest(_a, ["displayFlex", "justifyContent", "flexDirection", "alignSelf", "alignItems", "flexWrap", "flexGrow", "container", "spacing", "columns", "xs", "sm", "md", "lg", "xl", "xxl", "children", "className", "margin", "marginTop", "marginX", "marginY", "marginBottom", "marginRight", "marginLeft", "padding", "paddingX", "role", "paddingY", "paddingTop", "paddingBottom", "paddingRight", "paddingLeft"]);
|
|
2922
2922
|
var gridContext = useContext(GridContext);
|
|
2923
2923
|
var sharedClassNames = __assign(__assign(__assign({}, paddingClassNames({ padding: padding, paddingY: paddingY, paddingBottom: paddingBottom, paddingTop: paddingTop, paddingLeft: paddingLeft, paddingRight: paddingRight, paddingX: paddingX })), marginClassNames({ margin: margin, marginY: marginY, marginBottom: marginBottom, marginTop: marginTop, marginLeft: marginLeft, marginRight: marginRight, marginX: marginX })), flexClassNames({
|
|
2924
2924
|
displayFlex: displayFlex,
|
|
@@ -2963,13 +2963,14 @@ var Grid = forwardRef(function (_a, ref) {
|
|
|
2963
2963
|
_b;
|
|
2964
2964
|
};
|
|
2965
2965
|
if (container) {
|
|
2966
|
-
return (jsx(GridContext.Provider, { value: { spacing: spacing, columns: columns }, children: jsx("div", { className: s$c('container', __assign(__assign(__assign({}, getSpacing(container, spacing)), sharedClassNames), (_b = {}, _b[className] = className, _b))), children: children && children }) }));
|
|
2966
|
+
return (jsx(GridContext.Provider, { value: { spacing: spacing, columns: columns }, children: jsx("div", __assign({ className: s$c('container', __assign(__assign(__assign({}, getSpacing(container, spacing)), sharedClassNames), (_b = {}, _b[className] = className, _b))) }, pickAttributes(__assign(__assign({}, rest), { role: role })), { children: children && children })) }));
|
|
2967
2967
|
}
|
|
2968
|
-
|
|
2968
|
+
console.log({ columns: columns });
|
|
2969
|
+
return (jsx("div", __assign({ className: s$c('column', __assign(__assign(__assign({}, getSpacing(container, gridContext.spacing)), sharedClassNames), (_c = {}, _c["column_xs_".concat(xs)] = xs, _c["column_sm_".concat(sm)] = sm, _c["column_md_".concat(md)] = md, _c["column_lg_".concat(lg)] = lg, _c["column_xl_".concat(xl)] = xl, _c["column_xxl_".concat(xxl)] = xxl, _c[className] = className, _c))) }, pickAttributes(__assign(__assign({}, rest), { role: role, ref: ref })), { style: {
|
|
2969
2970
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2970
2971
|
// @ts-ignore
|
|
2971
2972
|
'--grid-columns': gridContext.columns || 12
|
|
2972
|
-
},
|
|
2973
|
+
}, children: children && children })));
|
|
2973
2974
|
});
|
|
2974
2975
|
|
|
2975
2976
|
var styles$b = {"body":"FormSkeleton-module_BwFylU","skeletonColor_purple1":"FormSkeleton-module_ndkiVl","skeletonColor_purple2":"FormSkeleton-module_9s1bZp","skeletonColor_purple3":"FormSkeleton-module_KMV7b4","skeletonColor_purple4":"FormSkeleton-module_a64n-B","skeletonColor_purple5":"FormSkeleton-module_avkj6O","skeletonColor_purple6":"FormSkeleton-module_MR0VuK","skeletonColor_purple7":"FormSkeleton-module_BzVubY","skeletonColor_white":"FormSkeleton-module_X9S5g2","skeletonColor_grey1":"FormSkeleton-module_-Y3EnD","skeletonColor_grey2":"FormSkeleton-module_fdH8tQ","skeletonColor_grey3":"FormSkeleton-module_6fYFet","skeletonColor_grey4":"FormSkeleton-module_h5YMBs","skeletonColor_grey5":"FormSkeleton-module_Xpqgz-","skeletonColor_grey6":"FormSkeleton-module_hfeldm","skeletonColor_black":"FormSkeleton-module_yX4v-9","skeletonColor_mint1":"FormSkeleton-module_mfKBPa","skeletonColor_mint2":"FormSkeleton-module_54nm6G","skeletonColor_mint3":"FormSkeleton-module_bgFrnQ","skeletonColor_blue1":"FormSkeleton-module_imtf50","skeletonColor_blue2":"FormSkeleton-module_HYGuUW","skeletonColor_blue3":"FormSkeleton-module_-gPQyO","skeletonColor_blue4":"FormSkeleton-module_qiyoun","skeletonColor_pink":"FormSkeleton-module_x8q-tz","skeletonColor_green":"FormSkeleton-module_yTNFSG","skeletonColor_red":"FormSkeleton-module_Ug-7Ev","skeletonColor_yellow":"FormSkeleton-module_JaGg-o","skeletonColor_orange":"FormSkeleton-module_8eNqU2","skeletonColor_mainPurple":"FormSkeleton-module_ZFhd4h","skeletonColor_mainGrey":"FormSkeleton-module_QHaImD","skeletonColor_mainDark":"FormSkeleton-module_BGHrtD","skeletonColor_current":"FormSkeleton-module_x9ShF3","skeletonColor_inherit":"FormSkeleton-module_kM2ALA","container":"FormSkeleton-module_Vkj79r","label":"FormSkeleton-module_AYT6ya","input":"FormSkeleton-module_znNJre"};
|
|
@@ -3400,7 +3401,7 @@ var SortableTable = function (_a) {
|
|
|
3400
3401
|
}
|
|
3401
3402
|
return null;
|
|
3402
3403
|
};
|
|
3403
|
-
return (jsxs("div", { className: s$3('container', (_b = {}, _b[className] = className, _b.container_withMinWidth = !!minWidth, _b)), children: [
|
|
3404
|
+
return (jsxs("div", { className: s$3('container', (_b = {}, _b[className] = className, _b.container_withMinWidth = !!minWidth, _b)), children: [loading ? jsx(SolidSpinner, { className: s$3('spinner'), type: HierarchyTypes.PRIMARY, size: SizeTypes.MEDIUM }) : null, jsxs("table", { className: s$3('table', { table_loading: loading }), style: { minWidth: minWidth || 'auto' }, children: [jsx("caption", { children: caption }), jsx("thead", { children: jsx("tr", { className: s$3('row', (_c = { row_header: true, row_stickyHeader: withStickyHeader }, _c[headerClassName] = headerClassName, _c)), children: cells.map(function (cell, i) { return (jsx("th", { className: s$3('cell', {
|
|
3404
3405
|
cell_alignRight: cell.alignRight,
|
|
3405
3406
|
cell_alignCenter: cell.alignCenter,
|
|
3406
3407
|
cell_header: true
|