@raystack/apsara 0.16.2 → 0.17.1

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.css CHANGED
@@ -1449,9 +1449,9 @@ html[data-theme="dark"] {
1449
1449
  border: none;
1450
1450
 
1451
1451
  color: var(--foreground-base);
1452
- padding: var(--pd-8);
1453
1452
  background-color: var(--background-base);
1454
1453
  font-size: 12px;
1454
+
1455
1455
  line-height: 16px;
1456
1456
  border-radius: var(--br-4);
1457
1457
  outline: 0.5px solid var(--border-base);
@@ -1461,6 +1461,14 @@ html[data-theme="dark"] {
1461
1461
  user-select: none;
1462
1462
  }
1463
1463
 
1464
+ .select-module_trigger-sm__rcLow {
1465
+ padding: var(--pd-4);
1466
+ }
1467
+
1468
+ .select-module_trigger-md__iDsne {
1469
+ padding: var(--pd-8);
1470
+ }
1471
+
1464
1472
  .select-module_trigger__1tSaG:hover {
1465
1473
  cursor: pointer;
1466
1474
  }
@@ -2011,6 +2019,10 @@ html[data-theme="dark"] {
2011
2019
  gap: var(--pd-2);
2012
2020
  }
2013
2021
 
2022
+ .datatable-module_header__7-CAd {
2023
+ z-index: 1;
2024
+ }
2025
+
2014
2026
  .datatable-module_toolbar__lO-aI {
2015
2027
  width: 100%;
2016
2028
  padding: 0 !important;
package/dist/index.js CHANGED
@@ -20073,10 +20073,20 @@ function Text({ children, className, size, weight, ...props }) {
20073
20073
  return (jsxRuntimeExports$1.jsx("span", { className: text$1({ size, className, weight }), ...props, children: children }));
20074
20074
  }
20075
20075
 
20076
- var styles$d = {"content":"select-module_content__X0QJ-","menuitem":"select-module_menuitem__DfVEU","separator":"select-module_separator__2UBNd","menugroup":"select-module_menugroup__zJbzr","trigger":"select-module_trigger__1tSaG","triggerIcon":"select-module_triggerIcon__iaoZ3"};
20076
+ var styles$d = {"content":"select-module_content__X0QJ-","menuitem":"select-module_menuitem__DfVEU","separator":"select-module_separator__2UBNd","menugroup":"select-module_menugroup__zJbzr","trigger":"select-module_trigger__1tSaG","trigger-sm":"select-module_trigger-sm__rcLow","trigger-md":"select-module_trigger-md__iDsne","triggerIcon":"select-module_triggerIcon__iaoZ3"};
20077
20077
 
20078
- const trigger$1 = cva(styles$d.trigger);
20079
- const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (jsxRuntimeExports$1.jsxs($cc7e05a45900e73f$export$41fb9f06171c75f4, { ref: ref, className: trigger$1({ className }), ...props, children: [children, jsxRuntimeExports$1.jsx($cc7e05a45900e73f$export$f04a61298a47a40f, { asChild: true, children: jsxRuntimeExports$1.jsx(ChevronDownIcon, { className: styles$d.triggerIcon }) })] })));
20078
+ const trigger$1 = cva(styles$d.trigger, {
20079
+ variants: {
20080
+ size: {
20081
+ small: styles$d["trigger-sm"],
20082
+ medium: styles$d["trigger-md"],
20083
+ },
20084
+ },
20085
+ defaultVariants: {
20086
+ size: "medium",
20087
+ },
20088
+ });
20089
+ const SelectTrigger = React.forwardRef(({ size, className, children, ...props }, ref) => (jsxRuntimeExports$1.jsxs($cc7e05a45900e73f$export$41fb9f06171c75f4, { ref: ref, className: trigger$1({ size, className }), ...props, children: [children, jsxRuntimeExports$1.jsx($cc7e05a45900e73f$export$f04a61298a47a40f, { asChild: true, children: jsxRuntimeExports$1.jsx(ChevronDownIcon, { className: styles$d.triggerIcon }) })] })));
20080
20090
  SelectTrigger.displayName = $cc7e05a45900e73f$export$41fb9f06171c75f4.displayName;
20081
20091
  const content$1 = cva(styles$d.content);
20082
20092
  const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (jsxRuntimeExports$1.jsx($cc7e05a45900e73f$export$602eac185826482c, { children: jsxRuntimeExports$1.jsx($cc7e05a45900e73f$export$7c6e2c02157bb7d2, { ref: ref, className: content$1({ className }), position: position, ...props, children: children }) })));
@@ -31719,7 +31729,7 @@ function DataTableFilterOptions({ children, ...props }) {
31719
31729
  })] })) : null] }));
31720
31730
  }
31721
31731
 
31722
- var styles$4 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","table":"datatable-module_table__x2IkY","head":"datatable-module_head__zCfCW","toolbar":"datatable-module_toolbar__lO-aI","chip":"datatable-module_chip__IiwTD","chipWrapper":"datatable-module_chipWrapper__iz69x","filterOperator":"datatable-module_filterOperator__qtDsH","filterText":"datatable-module_filterText__w00L8","flex1":"datatable-module_flex1__fA-kQ","tRow":"datatable-module_tRow__GrMHh","tRowClick":"datatable-module_tRowClick__7wzkh"};
31732
+ var styles$4 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","table":"datatable-module_table__x2IkY","head":"datatable-module_head__zCfCW","header":"datatable-module_header__7-CAd","toolbar":"datatable-module_toolbar__lO-aI","chip":"datatable-module_chip__IiwTD","chipWrapper":"datatable-module_chipWrapper__iz69x","filterOperator":"datatable-module_filterOperator__qtDsH","filterText":"datatable-module_filterText__w00L8","flex1":"datatable-module_flex1__fA-kQ","tRow":"datatable-module_tRow__GrMHh","tRowClick":"datatable-module_tRowClick__7wzkh"};
31723
31733
 
31724
31734
  const columnTypesMap = {
31725
31735
  select: "select",
@@ -32189,17 +32199,20 @@ function DataTableRoot({ columns, data, emptyState, children, parentStyle, isLoa
32189
32199
  ? [...new Array(loaderRow)].map((_, i) => ({ id: i }))
32190
32200
  : data;
32191
32201
  const { filteredColumns, addFilterColumn, removeFilterColumn, resetColumns } = useTableColumn();
32192
- const columnWithCustomFilter = columns.map((col) => {
32193
- // @ts-ignore;
32202
+ const columnWithCustomFilter = useMemo(() => columns.map((col) => {
32194
32203
  const colId = col.id || col?.accessorKey;
32195
- if (colId && tableCustomFilter.hasOwnProperty(colId)) {
32196
- col.filterFn = tableCustomFilter[colId];
32197
- }
32198
- col.cell = isLoading
32204
+ const filterFn = colId && tableCustomFilter.hasOwnProperty(colId)
32205
+ ? tableCustomFilter[colId]
32206
+ : undefined;
32207
+ const cell = isLoading
32199
32208
  ? () => (jsxRuntimeExports$1.jsx(Skeleton, { containerClassName: styles$4.flex1, highlightColor: "var(--background-base)", baseColor: "var(--background-base-hover)" }))
32200
32209
  : col.cell;
32201
- return col;
32202
- });
32210
+ return {
32211
+ ...col,
32212
+ cell,
32213
+ filterFn,
32214
+ };
32215
+ }), [isLoading, columns, tableCustomFilter]);
32203
32216
  useEffect(() => {
32204
32217
  if (onStateChange) {
32205
32218
  onStateChange(tableState);
@@ -32243,7 +32256,7 @@ function DataTableRoot({ columns, data, emptyState, children, parentStyle, isLoa
32243
32256
  tableCustomFilter,
32244
32257
  updateColumnCustomFilter,
32245
32258
  isLoading,
32246
- }, children: [jsxRuntimeExports$1.jsxs(Flex, { direction: "column", className: styles$4.datatable, children: [header, jsxRuntimeExports$1.jsxs(Flex, { className: styles$4.tableContainer, style: parentStyle, children: [jsxRuntimeExports$1.jsxs(Table, { ...props, style: tableStyle, children: [jsxRuntimeExports$1.jsx(Table.Header, { children: ShouldShowHeader
32259
+ }, children: [jsxRuntimeExports$1.jsxs(Flex, { direction: "column", className: styles$4.datatable, children: [header, jsxRuntimeExports$1.jsxs(Flex, { className: styles$4.tableContainer, style: parentStyle, children: [jsxRuntimeExports$1.jsxs(Table, { ...props, style: tableStyle, children: [jsxRuntimeExports$1.jsx(Table.Header, { className: styles$4.header, children: ShouldShowHeader
32247
32260
  ? table.getHeaderGroups().map((headerGroup) => (jsxRuntimeExports$1.jsx(Table.Row, { children: headerGroup.headers.map((header, index) => {
32248
32261
  return (jsxRuntimeExports$1.jsx(Table.Head, { style: {
32249
32262
  cursor: "pointer",