@helpdice/ui 2.1.9 → 2.2.2
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/container/box.d.ts +7 -2
- package/dist/container/index.js +29 -25
- package/dist/index.js +1238 -1233
- package/dist/table/index.js +2 -1
- package/esm/container/box.d.ts +7 -2
- package/esm/container/box.js +10 -6
- package/esm/table/table-cell.js +2 -1
- package/package.json +1 -1
package/dist/table/index.js
CHANGED
|
@@ -22707,6 +22707,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
22707
22707
|
onCellClick = _ref.onCellClick;
|
|
22708
22708
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
22709
22709
|
return /*#__PURE__*/React.createElement(React.Fragment, null, columns.map(function (column, index) {
|
|
22710
|
+
var _row$_id;
|
|
22710
22711
|
var currentRowValue = row[column.prop];
|
|
22711
22712
|
var cellValue = currentRowValue || emptyText;
|
|
22712
22713
|
var shouldBeRenderElement = column.renderHandler(currentRowValue, row, rowIndex);
|
|
@@ -22721,7 +22722,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
22721
22722
|
whiteSpace: column !== null && column !== void 0 && column.noWrap ? 'nowrap' : 'normal'
|
|
22722
22723
|
}, currentRowValue === null || currentRowValue === void 0 ? void 0 : currentRowValue.style),
|
|
22723
22724
|
"data-column": column.prop,
|
|
22724
|
-
key: "row-td-".concat(
|
|
22725
|
+
key: "row-td-".concat((_row$_id = row === null || row === void 0 ? void 0 : row._id) !== null && _row$_id !== void 0 ? _row$_id : 'col', "-").concat(column.prop.toString()),
|
|
22725
22726
|
onClick: function onClick() {
|
|
22726
22727
|
return onCellClick && onCellClick(currentRowValue, rowIndex, index);
|
|
22727
22728
|
},
|
package/esm/container/box.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
declare const wrap: ["nowrap", "wrap", "wrap-reverse"];
|
|
2
3
|
export type Wrap = typeof wrap[number];
|
|
3
4
|
type ContainerProps = {
|
|
4
5
|
gap?: number;
|
|
6
|
+
direction?: string;
|
|
5
7
|
children?: React.ReactNode;
|
|
8
|
+
justify?: string;
|
|
9
|
+
alignItems?: string;
|
|
10
|
+
alignContent?: string;
|
|
6
11
|
wrap?: Wrap;
|
|
7
12
|
className?: string;
|
|
8
13
|
};
|
|
9
|
-
declare const _default:
|
|
14
|
+
declare const _default: React.ForwardRefExoticComponent<ContainerProps & {
|
|
10
15
|
width?: string | number;
|
|
11
16
|
height?: string | number;
|
|
12
17
|
padding?: string | number;
|
|
@@ -38,5 +43,5 @@ declare const _default: import("react").ForwardRefExoticComponent<ContainerProps
|
|
|
38
43
|
scale?: number;
|
|
39
44
|
children?: any;
|
|
40
45
|
className?: string;
|
|
41
|
-
} &
|
|
46
|
+
} & React.InputHTMLAttributes<any> & React.RefAttributes<unknown>>;
|
|
42
47
|
export default _default;
|
package/esm/container/box.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["gap", "children", "className"];
|
|
3
|
+
var _excluded = ["gap", "children", "direction", "justify", "alignItems", "alignContent", "className"];
|
|
4
4
|
import _JSXStyle from "../styled-jsx.es.js";
|
|
5
|
+
import React, { useMemo } from "react";
|
|
5
6
|
import GridBasicItem from "../grid/basic-item";
|
|
6
7
|
import useScale, { withScale } from '../use-scale';
|
|
7
|
-
import { useMemo } from "react";
|
|
8
8
|
import { useClasses } from '@helpdice/theme';
|
|
9
9
|
import { tuple } from '../utils/prop-types';
|
|
10
10
|
var wrap = tuple('nowrap', 'wrap', 'wrap-reverse');
|
|
@@ -12,6 +12,10 @@ var Container = function Container(_ref) {
|
|
|
12
12
|
var _ref$gap = _ref.gap,
|
|
13
13
|
gap = _ref$gap === void 0 ? 0 : _ref$gap,
|
|
14
14
|
children = _ref.children,
|
|
15
|
+
direction = _ref.direction,
|
|
16
|
+
justify = _ref.justify,
|
|
17
|
+
alignItems = _ref.alignItems,
|
|
18
|
+
alignContent = _ref.alignContent,
|
|
15
19
|
_ref$className = _ref.className,
|
|
16
20
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
17
21
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -23,10 +27,10 @@ var Container = function Container(_ref) {
|
|
|
23
27
|
}, [gap, unit]);
|
|
24
28
|
var _styles$className = {
|
|
25
29
|
styles: /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
26
|
-
id: "
|
|
27
|
-
dynamic: [gapUnit, wrap, SCALES.width(1, 'var(--container-width)')]
|
|
28
|
-
}, "div.__jsx-style-dynamic-selector{--gap-unit:".concat(gapUnit, ";--container-width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:").concat(wrap, ";-ms-flex-wrap:").concat(wrap, ";flex-wrap:").concat(wrap, ";box-sizing:border-box;gap:var(--gap-unit);width:").concat(SCALES.width(1, 'var(--container-width)'), ";}")),
|
|
29
|
-
className: _JSXStyle.dynamic([["
|
|
30
|
+
id: "635877754",
|
|
31
|
+
dynamic: [gapUnit, direction, wrap, justify, alignContent, alignItems, SCALES.width(1, 'var(--container-width)')]
|
|
32
|
+
}, "div.__jsx-style-dynamic-selector{--gap-unit:".concat(gapUnit, ";--container-width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:").concat(direction, ";-ms-flex-direction:").concat(direction, ";flex-direction:").concat(direction, ";-webkit-flex-wrap:").concat(wrap, ";-ms-flex-wrap:").concat(wrap, ";flex-wrap:").concat(wrap, ";-webkit-box-pack:").concat(justify, ";-webkit-justify-content:").concat(justify, ";-ms-flex-pack:").concat(justify, ";justify-content:").concat(justify, ";-webkit-align-content:").concat(alignContent, ";-ms-flex-line-pack:").concat(alignContent, ";align-content:").concat(alignContent, ";-webkit-align-items:").concat(alignItems, ";-webkit-box-align:").concat(alignItems, ";-ms-flex-align:").concat(alignItems, ";align-items:").concat(alignItems, ";box-sizing:border-box;gap:var(--gap-unit);width:").concat(SCALES.width(1, 'var(--container-width)'), ";}")),
|
|
33
|
+
className: _JSXStyle.dynamic([["635877754", [gapUnit, direction, wrap, justify, alignContent, alignItems, SCALES.width(1, 'var(--container-width)')]]])
|
|
30
34
|
},
|
|
31
35
|
resolveClassName = _styles$className.className,
|
|
32
36
|
styles = _styles$className.styles;
|
package/esm/table/table-cell.js
CHANGED
|
@@ -8,6 +8,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
8
8
|
onCellClick = _ref.onCellClick;
|
|
9
9
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
10
10
|
return /*#__PURE__*/React.createElement(React.Fragment, null, columns.map(function (column, index) {
|
|
11
|
+
var _row$_id;
|
|
11
12
|
var currentRowValue = row[column.prop];
|
|
12
13
|
var cellValue = currentRowValue || emptyText;
|
|
13
14
|
var shouldBeRenderElement = column.renderHandler(currentRowValue, row, rowIndex);
|
|
@@ -22,7 +23,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
22
23
|
whiteSpace: column !== null && column !== void 0 && column.noWrap ? 'nowrap' : 'normal'
|
|
23
24
|
}, currentRowValue === null || currentRowValue === void 0 ? void 0 : currentRowValue.style),
|
|
24
25
|
"data-column": column.prop,
|
|
25
|
-
key: "row-td-".concat(
|
|
26
|
+
key: "row-td-".concat((_row$_id = row === null || row === void 0 ? void 0 : row._id) !== null && _row$_id !== void 0 ? _row$_id : 'col', "-").concat(column.prop.toString()),
|
|
26
27
|
onClick: function onClick() {
|
|
27
28
|
return onCellClick && onCellClick(currentRowValue, rowIndex, index);
|
|
28
29
|
},
|