@ballistix.digital/react-components 0.4.103 → 0.4.105

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/index.d.ts CHANGED
@@ -105,6 +105,7 @@ type TProps$c = {
105
105
  trigger?: ReactNode;
106
106
  type?: 'button' | 'compact';
107
107
  direction?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
108
+ isEscapingOverflow?: boolean;
108
109
  styles?: TDropdownElementStyles;
109
110
  };
110
111
  declare const DropdownElement: {
@@ -528,6 +529,7 @@ type TNavigationItemProps$1 = {
528
529
  isInitial?: boolean;
529
530
  onClick?: ((accessor: MouseEvent) => void) | any;
530
531
  styles?: Pick<TTabNavigationStyles, 'tab'>;
532
+ isLoading?: boolean;
531
533
  };
532
534
  type TViewProps$1 = {
533
535
  children: ReactNode;
package/dist/index.esm.js CHANGED
@@ -3382,7 +3382,7 @@ var styles$k = {
3382
3382
  };
3383
3383
 
3384
3384
  var Container$3 = function (props) {
3385
- var children = props.children, label = props.label, trigger = props.trigger, _a = props.type, type = _a === void 0 ? 'button' : _a, _b = props.direction, direction = _b === void 0 ? 'bottom-left' : _b, stylesOverrides = props.styles;
3385
+ var children = props.children, label = props.label, trigger = props.trigger, _a = props.type, type = _a === void 0 ? 'button' : _a, _b = props.direction, direction = _b === void 0 ? 'bottom-left' : _b, _c = props.isEscapingOverflow, isEscapingOverflow = _c === void 0 ? false : _c, stylesOverrides = props.styles;
3386
3386
  var handleGenerateStyle = function () {
3387
3387
  var result = deepCopyObject(styles$j.base);
3388
3388
  var keys = calculateNestedKeys(styles$j.base);
@@ -3392,7 +3392,7 @@ var Container$3 = function (props) {
3392
3392
  return result;
3393
3393
  };
3394
3394
  var styles = handleGenerateStyle();
3395
- return (jsxs(Menu, __assign({ as: "div", className: styles.container }, { children: [jsxs("div", { children: [type === 'button' &&
3395
+ return (jsxs(Menu, __assign({ as: "div", className: toClassName(styles.container, !isEscapingOverflow && 'relative') }, { children: [jsxs("div", { children: [type === 'button' &&
3396
3396
  (!trigger ? (jsxs(Menu.Button, __assign({ className: styles.button }, { children: [label, jsx(ChevronDownIcon, { className: "-mr-1 ml-2 h-5 w-5", "aria-hidden": "true" })] }))) : (jsx(Menu.Button, { children: trigger }))), type === 'compact' && (jsxs(Menu.Button, __assign({ className: styles.compact }, { children: [jsx("span", __assign({ className: "sr-only" }, { children: label })), jsx(EllipsisVerticalIcon, { className: styles.dots, "aria-hidden": "true" })] })))] }), jsx(Transition, __assign({ as: Fragment, enter: "transition ease-out duration-100", enterFrom: "transform opacity-0 scale-95", enterTo: "transform opacity-100 scale-100", leave: "transition ease-in duration-75", leaveFrom: "transform opacity-100 scale-100", leaveTo: "transform opacity-0 scale-95" }, { children: jsx(Menu.Items, __assign({ className: styles.items }, { children: children })) }))] })));
3397
3397
  };
3398
3398
  var DropdownElement = {
@@ -3401,7 +3401,7 @@ var DropdownElement = {
3401
3401
  };
3402
3402
 
3403
3403
  var base$g = {
3404
- container: 'relative inline-block text-left',
3404
+ container: 'inline-block text-left',
3405
3405
  button: 'inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-primary-500',
3406
3406
  compact: 'bg-gray-100 rounded-full flex items-center text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-primary-500',
3407
3407
  dots: 'h-7 w-7 p-1',
@@ -4281,7 +4281,7 @@ var TableList2 = function (props) {
4281
4281
  onChange && onChange(state);
4282
4282
  }
4283
4283
  }, [onChange, state]);
4284
- return (jsxs("div", __assign({ className: styles$a.container }, { children: [jsx("div", __assign({ className: styles$a.head }, { children: head && head(state) })), jsx("div", __assign({ className: "" }, { children: jsx("div", __assign({ className: "flow-root" }, { children: jsx("div", __assign({ className: "overflow-x-scroll overflow-y-visible" }, { children: jsxs("div", __assign({ className: "inline-block min-w-full align-middle" }, { children: [jsxs("table", __assign({ className: "min-w-full border-separate border-spacing-0 " }, { children: [jsx("thead", __assign({ className: "" }, { children: table === null || table === void 0 ? void 0 : table.getHeaderGroups().map(function (headerGroup) { return (jsx("tr", { children: headerGroup.headers.map(function (header) { return (jsxs("th", __assign({ colSpan: header.colSpan, className: toClassName(styles$a.body.table.head.cell, 'border-b', header.column.getCanSort() && 'cursor-pointer'), onClick: header.column.getToggleSortingHandler(), style: {
4284
+ return (jsxs("div", __assign({ className: styles$a.container }, { children: [jsx("div", __assign({ className: styles$a.head }, { children: head && head(state) })), jsx("div", __assign({ className: "" }, { children: jsx("div", __assign({ className: "flow-root relative" }, { children: jsx("div", __assign({ className: "overflow-x-scroll overflow-y-visible" }, { children: jsxs("div", __assign({ className: "inline-block min-w-full align-middle" }, { children: [jsxs("table", __assign({ className: "min-w-full border-separate border-spacing-0 " }, { children: [jsx("thead", __assign({ className: "" }, { children: table === null || table === void 0 ? void 0 : table.getHeaderGroups().map(function (headerGroup) { return (jsx("tr", { children: headerGroup.headers.map(function (header) { return (jsxs("th", __assign({ colSpan: header.colSpan, className: toClassName(styles$a.body.table.head.cell, 'border-b', header.column.getCanSort() && 'cursor-pointer'), onClick: header.column.getToggleSortingHandler(), style: {
4285
4285
  minWidth: !!header.column.columnDef.size &&
4286
4286
  header.column.columnDef.size !== 150
4287
4287
  ? "".concat(header.column.columnDef.size, "px")
@@ -4612,7 +4612,7 @@ var List$1 = function (props) {
4612
4612
  }) }))] })), jsx("div", __assign({ className: styles.list.body }, { children: jsx("nav", __assign({ className: styles.list.navigation }, { children: children })) }))] })));
4613
4613
  };
4614
4614
  var Item$2 = function (props) {
4615
- var children = props.children, _a = props.as, LinkComponent = _a === void 0 ? 'a' : _a, _b = props.type, type = _b === void 0 ? 'underline' : _b, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick, stylesOverrides = props.styles;
4615
+ var children = props.children, _a = props.as, LinkComponent = _a === void 0 ? 'a' : _a, _b = props.type, type = _b === void 0 ? 'underline' : _b, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick, stylesOverrides = props.styles, _c = props.isLoading, isLoading = _c === void 0 ? true : _c;
4616
4616
  var handleGenerateStyle = function () {
4617
4617
  var result = deepCopyObject(styles$7.base);
4618
4618
  var keys = calculateNestedKeys(styles$7.base);
@@ -4625,7 +4625,7 @@ var Item$2 = function (props) {
4625
4625
  if (href && LinkComponent) {
4626
4626
  return (jsx(LinkComponent, __assign({ href: href, className: toClassName(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive), onClick: onClick }, { children: children })));
4627
4627
  }
4628
- return (jsx("div", __assign({ className: toClassName(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive), onClick: onClick }, { children: children })));
4628
+ return (jsx("div", __assign({ className: toClassName(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive, isLoading && 'opacity-30 !text-gray-300 !cursor-default', isLoading && styles.tab.inactive), onClick: !isLoading ? onClick : function () { return null; } }, { children: children })));
4629
4629
  };
4630
4630
  var View$1 = function (props) {
4631
4631
  var children = props.children;
package/dist/index.js CHANGED
@@ -3393,7 +3393,7 @@ var styles$k = {
3393
3393
  };
3394
3394
 
3395
3395
  var Container$3 = function (props) {
3396
- var children = props.children, label = props.label, trigger = props.trigger, _a = props.type, type = _a === void 0 ? 'button' : _a, _b = props.direction, direction = _b === void 0 ? 'bottom-left' : _b, stylesOverrides = props.styles;
3396
+ var children = props.children, label = props.label, trigger = props.trigger, _a = props.type, type = _a === void 0 ? 'button' : _a, _b = props.direction, direction = _b === void 0 ? 'bottom-left' : _b, _c = props.isEscapingOverflow, isEscapingOverflow = _c === void 0 ? false : _c, stylesOverrides = props.styles;
3397
3397
  var handleGenerateStyle = function () {
3398
3398
  var result = deepCopyObject(styles$j.base);
3399
3399
  var keys = calculateNestedKeys(styles$j.base);
@@ -3403,7 +3403,7 @@ var Container$3 = function (props) {
3403
3403
  return result;
3404
3404
  };
3405
3405
  var styles = handleGenerateStyle();
3406
- return (jsxRuntime.jsxs(react.Menu, __assign({ as: "div", className: styles.container }, { children: [jsxRuntime.jsxs("div", { children: [type === 'button' &&
3406
+ return (jsxRuntime.jsxs(react.Menu, __assign({ as: "div", className: toClassName(styles.container, !isEscapingOverflow && 'relative') }, { children: [jsxRuntime.jsxs("div", { children: [type === 'button' &&
3407
3407
  (!trigger ? (jsxRuntime.jsxs(react.Menu.Button, __assign({ className: styles.button }, { children: [label, jsxRuntime.jsx(solid.ChevronDownIcon, { className: "-mr-1 ml-2 h-5 w-5", "aria-hidden": "true" })] }))) : (jsxRuntime.jsx(react.Menu.Button, { children: trigger }))), type === 'compact' && (jsxRuntime.jsxs(react.Menu.Button, __assign({ className: styles.compact }, { children: [jsxRuntime.jsx("span", __assign({ className: "sr-only" }, { children: label })), jsxRuntime.jsx(solid.EllipsisVerticalIcon, { className: styles.dots, "aria-hidden": "true" })] })))] }), jsxRuntime.jsx(react.Transition, __assign({ as: React.Fragment, enter: "transition ease-out duration-100", enterFrom: "transform opacity-0 scale-95", enterTo: "transform opacity-100 scale-100", leave: "transition ease-in duration-75", leaveFrom: "transform opacity-100 scale-100", leaveTo: "transform opacity-0 scale-95" }, { children: jsxRuntime.jsx(react.Menu.Items, __assign({ className: styles.items }, { children: children })) }))] })));
3408
3408
  };
3409
3409
  var DropdownElement = {
@@ -3412,7 +3412,7 @@ var DropdownElement = {
3412
3412
  };
3413
3413
 
3414
3414
  var base$g = {
3415
- container: 'relative inline-block text-left',
3415
+ container: 'inline-block text-left',
3416
3416
  button: 'inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-primary-500',
3417
3417
  compact: 'bg-gray-100 rounded-full flex items-center text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-primary-500',
3418
3418
  dots: 'h-7 w-7 p-1',
@@ -4292,7 +4292,7 @@ var TableList2 = function (props) {
4292
4292
  onChange && onChange(state);
4293
4293
  }
4294
4294
  }, [onChange, state]);
4295
- return (jsxRuntime.jsxs("div", __assign({ className: styles$a.container }, { children: [jsxRuntime.jsx("div", __assign({ className: styles$a.head }, { children: head && head(state) })), jsxRuntime.jsx("div", __assign({ className: "" }, { children: jsxRuntime.jsx("div", __assign({ className: "flow-root" }, { children: jsxRuntime.jsx("div", __assign({ className: "overflow-x-scroll overflow-y-visible" }, { children: jsxRuntime.jsxs("div", __assign({ className: "inline-block min-w-full align-middle" }, { children: [jsxRuntime.jsxs("table", __assign({ className: "min-w-full border-separate border-spacing-0 " }, { children: [jsxRuntime.jsx("thead", __assign({ className: "" }, { children: table === null || table === void 0 ? void 0 : table.getHeaderGroups().map(function (headerGroup) { return (jsxRuntime.jsx("tr", { children: headerGroup.headers.map(function (header) { return (jsxRuntime.jsxs("th", __assign({ colSpan: header.colSpan, className: toClassName(styles$a.body.table.head.cell, 'border-b', header.column.getCanSort() && 'cursor-pointer'), onClick: header.column.getToggleSortingHandler(), style: {
4295
+ return (jsxRuntime.jsxs("div", __assign({ className: styles$a.container }, { children: [jsxRuntime.jsx("div", __assign({ className: styles$a.head }, { children: head && head(state) })), jsxRuntime.jsx("div", __assign({ className: "" }, { children: jsxRuntime.jsx("div", __assign({ className: "flow-root relative" }, { children: jsxRuntime.jsx("div", __assign({ className: "overflow-x-scroll overflow-y-visible" }, { children: jsxRuntime.jsxs("div", __assign({ className: "inline-block min-w-full align-middle" }, { children: [jsxRuntime.jsxs("table", __assign({ className: "min-w-full border-separate border-spacing-0 " }, { children: [jsxRuntime.jsx("thead", __assign({ className: "" }, { children: table === null || table === void 0 ? void 0 : table.getHeaderGroups().map(function (headerGroup) { return (jsxRuntime.jsx("tr", { children: headerGroup.headers.map(function (header) { return (jsxRuntime.jsxs("th", __assign({ colSpan: header.colSpan, className: toClassName(styles$a.body.table.head.cell, 'border-b', header.column.getCanSort() && 'cursor-pointer'), onClick: header.column.getToggleSortingHandler(), style: {
4296
4296
  minWidth: !!header.column.columnDef.size &&
4297
4297
  header.column.columnDef.size !== 150
4298
4298
  ? "".concat(header.column.columnDef.size, "px")
@@ -4623,7 +4623,7 @@ var List$1 = function (props) {
4623
4623
  }) }))] })), jsxRuntime.jsx("div", __assign({ className: styles.list.body }, { children: jsxRuntime.jsx("nav", __assign({ className: styles.list.navigation }, { children: children })) }))] })));
4624
4624
  };
4625
4625
  var Item$2 = function (props) {
4626
- var children = props.children, _a = props.as, LinkComponent = _a === void 0 ? 'a' : _a, _b = props.type, type = _b === void 0 ? 'underline' : _b, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick, stylesOverrides = props.styles;
4626
+ var children = props.children, _a = props.as, LinkComponent = _a === void 0 ? 'a' : _a, _b = props.type, type = _b === void 0 ? 'underline' : _b, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick, stylesOverrides = props.styles, _c = props.isLoading, isLoading = _c === void 0 ? true : _c;
4627
4627
  var handleGenerateStyle = function () {
4628
4628
  var result = deepCopyObject(styles$7.base);
4629
4629
  var keys = calculateNestedKeys(styles$7.base);
@@ -4636,7 +4636,7 @@ var Item$2 = function (props) {
4636
4636
  if (href && LinkComponent) {
4637
4637
  return (jsxRuntime.jsx(LinkComponent, __assign({ href: href, className: toClassName(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive), onClick: onClick }, { children: children })));
4638
4638
  }
4639
- return (jsxRuntime.jsx("div", __assign({ className: toClassName(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive), onClick: onClick }, { children: children })));
4639
+ return (jsxRuntime.jsx("div", __assign({ className: toClassName(styles.tab.base, isCurrent ? styles.tab.active : styles.tab.inactive, isLoading && 'opacity-30 !text-gray-300 !cursor-default', isLoading && styles.tab.inactive), onClick: !isLoading ? onClick : function () { return null; } }, { children: children })));
4640
4640
  };
4641
4641
  var View$1 = function (props) {
4642
4642
  var children = props.children;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "email": "info@ballistix.digital",
8
8
  "url": "https://ballistix.digital"
9
9
  },
10
- "version": "0.4.103",
10
+ "version": "0.4.105",
11
11
  "private": false,
12
12
  "main": "dist/index.js",
13
13
  "module": "dist/index.esm.js",