@compill/admin 1.0.55 → 1.0.57

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/index.cjs.js CHANGED
@@ -179,7 +179,7 @@ function ButtonBar(_a) {
179
179
  children: children
180
180
  }));
181
181
  }
182
- function ButtonBarButton(_a) {
182
+ const ButtonBarButton = /*#__PURE__*/React__default["default"].forwardRef(function (_a, ref) {
183
183
  var {
184
184
  icon,
185
185
  children
@@ -196,11 +196,12 @@ function ButtonBarButton(_a) {
196
196
  corners: "square",
197
197
  gap: "2"
198
198
  }, props, {
199
+ ref: ref,
199
200
  children: [icon && jsxRuntime.jsx(ui.Icon, {
200
201
  path: icon
201
202
  }), children]
202
203
  }));
203
- }
204
+ });
204
205
  function ButtonBarDialogButton(_a) {
205
206
  var {
206
207
  icon,
@@ -1442,12 +1443,13 @@ function TableContainer(_a) {
1442
1443
 
1443
1444
  function TableCreateButton(_a) {
1444
1445
  var {
1446
+ icon,
1445
1447
  children
1446
1448
  } = _a,
1447
- props = __rest$1(_a, ["children"]);
1449
+ props = __rest$1(_a, ["icon", "children"]);
1448
1450
  return jsxRuntime.jsxs(admin.ButtonBarDialogButton, Object.assign({}, props, {
1449
1451
  children: [jsxRuntime.jsx(ui.Icon, {
1450
- path: mdiPlusThick
1452
+ path: icon !== null && icon !== void 0 ? icon : mdiPlusThick
1451
1453
  }), children]
1452
1454
  }));
1453
1455
  }
@@ -2678,6 +2680,7 @@ function TableButtonBar({
2678
2680
  }), buttonBar && buttonBar.map((button, index) => jsxRuntime.jsxs(React__default["default"].Fragment, {
2679
2681
  children: [button.type === "create" && editView && jsxRuntime.jsx(TableCreateButton, {
2680
2682
  buildDialog: createDialogFn(button.data),
2683
+ icon: button.icon,
2681
2684
  children: button.label
2682
2685
  }), button.type === "invalidate" && jsxRuntime.jsx(InvalidateButton, {
2683
2686
  pathOrPermalink: button.pathOrPermalink
package/index.esm.js CHANGED
@@ -170,7 +170,7 @@ function ButtonBar(_a) {
170
170
  children: children
171
171
  }));
172
172
  }
173
- function ButtonBarButton(_a) {
173
+ const ButtonBarButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
174
174
  var {
175
175
  icon,
176
176
  children
@@ -187,11 +187,12 @@ function ButtonBarButton(_a) {
187
187
  corners: "square",
188
188
  gap: "2"
189
189
  }, props, {
190
+ ref: ref,
190
191
  children: [icon && jsx(Icon, {
191
192
  path: icon
192
193
  }), children]
193
194
  }));
194
- }
195
+ });
195
196
  function ButtonBarDialogButton(_a) {
196
197
  var {
197
198
  icon,
@@ -1433,12 +1434,13 @@ function TableContainer(_a) {
1433
1434
 
1434
1435
  function TableCreateButton(_a) {
1435
1436
  var {
1437
+ icon,
1436
1438
  children
1437
1439
  } = _a,
1438
- props = __rest$1(_a, ["children"]);
1440
+ props = __rest$1(_a, ["icon", "children"]);
1439
1441
  return jsxs(ButtonBarDialogButton$1, Object.assign({}, props, {
1440
1442
  children: [jsx(Icon, {
1441
- path: mdiPlusThick
1443
+ path: icon !== null && icon !== void 0 ? icon : mdiPlusThick
1442
1444
  }), children]
1443
1445
  }));
1444
1446
  }
@@ -2669,6 +2671,7 @@ function TableButtonBar({
2669
2671
  }), buttonBar && buttonBar.map((button, index) => jsxs(React.Fragment, {
2670
2672
  children: [button.type === "create" && editView && jsx(TableCreateButton, {
2671
2673
  buildDialog: createDialogFn(button.data),
2674
+ icon: button.icon,
2672
2675
  children: button.label
2673
2676
  }), button.type === "invalidate" && jsx(InvalidateButton, {
2674
2677
  pathOrPermalink: button.pathOrPermalink
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compill/admin",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "module": "./index.esm.js",
5
5
  "main": "./index.cjs.js"
6
6
  }
@@ -67,6 +67,7 @@ type TableViewButtonConfig = {
67
67
  type: "create";
68
68
  data?: any;
69
69
  label?: string;
70
+ icon?: string;
70
71
  } | {
71
72
  type: "invalidate";
72
73
  pathOrPermalink: string;
@@ -1,12 +1,14 @@
1
- /// <reference types="react" />
2
1
  import { DialogButtonProps } from "../buttons/DialogButton";
3
2
  import { ParentComponent, SoperioComponent } from "@soperio/react";
4
3
  import { ButtonProps } from "@valerya/ui";
4
+ import React from "react";
5
5
  export declare function ButtonBar({ children, ...props }: ParentComponent & SoperioComponent): JSX.Element;
6
6
  export type ButtonBarButtonProps = {
7
7
  icon?: string;
8
8
  } & ButtonProps;
9
- export declare function ButtonBarButton({ icon, children, ...props }: ButtonBarButtonProps): JSX.Element;
9
+ export declare const ButtonBarButton: React.ForwardRefExoticComponent<{
10
+ icon?: string | undefined;
11
+ } & ButtonProps & React.RefAttributes<HTMLDivElement>>;
10
12
  export type ButtonBarDialogButtonProps = {
11
13
  icon?: string;
12
14
  } & DialogButtonProps;
@@ -1,3 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { DialogButtonProps } from "../buttons/DialogButton";
3
- export declare function TableCreateButton({ children, ...props }: DialogButtonProps): JSX.Element;
3
+ export declare function TableCreateButton({ icon, children, ...props }: {
4
+ icon?: string;
5
+ } & DialogButtonProps): JSX.Element;