@ballistix.digital/react-components 0.4.103 → 0.4.104

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
+ hasRelativeParent?: boolean;
108
109
  styles?: TDropdownElementStyles;
109
110
  };
110
111
  declare const DropdownElement: {
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.hasRelativeParent, hasRelativeParent = _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, !hasRelativeParent && '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")
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.hasRelativeParent, hasRelativeParent = _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, !hasRelativeParent && '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")
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.104",
11
11
  "private": false,
12
12
  "main": "dist/index.js",
13
13
  "module": "dist/index.esm.js",