@raystack/apsara 0.10.9 → 0.10.10

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
@@ -1454,39 +1454,6 @@
1454
1454
  .switch-module_thumb__b4Y8H[data-state="checked"] {
1455
1455
  transform: translateX(16px);
1456
1456
  }
1457
- .datatable-module_wrapper__Sxg2d {
1458
- width: 100%;
1459
- height: 100%;
1460
- }
1461
-
1462
- .datatable-module_datatable__z-Th2 {
1463
- flex: 1;
1464
- }
1465
-
1466
- .datatable-module_head__zCfCW {
1467
- display: flex;
1468
- flex-direction: row;
1469
- align-items: center;
1470
- }
1471
-
1472
- .datatable-module_toolbar__lO-aI {
1473
- width: 100%;
1474
- padding: 16px 24px;
1475
- border-bottom: 1px solid var(--border-base);
1476
- }
1477
-
1478
- .datatable-module_chipWrapper__iz69x {
1479
-
1480
- }
1481
-
1482
- .datatable-module_chip__IiwTD {
1483
- display: inline-flex;
1484
- align-items: center;
1485
- gap: var(--pd-8);
1486
- border: 1px solid var(--border-base);
1487
- border-radius: var(--pd-4);
1488
- padding: var(--pd-4) var(--pd-8);
1489
- }
1490
1457
  .textfield-module_textfield__u4AGg {
1491
1458
  appearance: none;
1492
1459
  box-sizing: border-box;
@@ -1559,6 +1526,39 @@
1559
1526
  .textfield-module_textfield-leading__AE-ld {
1560
1527
  padding-left: 32px;
1561
1528
  }
1529
+ .datatable-module_wrapper__Sxg2d {
1530
+ width: 100%;
1531
+ height: 100%;
1532
+ }
1533
+
1534
+ .datatable-module_datatable__z-Th2 {
1535
+ flex: 1;
1536
+ }
1537
+
1538
+ .datatable-module_head__zCfCW {
1539
+ display: flex;
1540
+ flex-direction: row;
1541
+ align-items: center;
1542
+ }
1543
+
1544
+ .datatable-module_toolbar__lO-aI {
1545
+ width: 100%;
1546
+ padding: 16px 24px;
1547
+ border-bottom: 1px solid var(--border-base);
1548
+ }
1549
+
1550
+ .datatable-module_chipWrapper__iz69x {
1551
+
1552
+ }
1553
+
1554
+ .datatable-module_chip__IiwTD {
1555
+ display: inline-flex;
1556
+ align-items: center;
1557
+ gap: var(--pd-8);
1558
+ border: 1px solid var(--border-base);
1559
+ border-radius: var(--pd-4);
1560
+ padding: var(--pd-4) var(--pd-8);
1561
+ }
1562
1562
  .table-module_table__mqnXB {
1563
1563
  width: 100%;
1564
1564
  font-size: 12px;
package/dist/index.js CHANGED
@@ -9281,8 +9281,8 @@ function Grid({ children, align, justify, flow, columns, gap, gapX, gapY, classN
9281
9281
  var styles$f = {"image":"image-module_image__KDN-Q"};
9282
9282
 
9283
9283
  const image = cva(styles$f.image);
9284
- function Image({ children, className, ...props }) {
9285
- return jsxRuntimeExports.jsx("img", { className: image({ className }), ...props });
9284
+ function Image({ alt, children, className, ...props }) {
9285
+ return jsxRuntimeExports.jsx("img", { alt: alt, className: image({ className }), ...props });
9286
9286
  }
9287
9287
 
9288
9288
  const InputField = ({ label, children, ...props }) => {
@@ -15290,8 +15290,6 @@ function DataTableClearFilter({ children, ...props }) {
15290
15290
  }, style: { width: "100%" }, ...props, children: children || (jsxRuntimeExports.jsxs(Flex, { gap: "small", align: "center", justify: "center", children: ["Clear filters ", jsxRuntimeExports.jsx(Cross2Icon, { width: 12, height: "12" })] })) }));
15291
15291
  }
15292
15292
 
15293
- var styles$4 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","head":"datatable-module_head__zCfCW","toolbar":"datatable-module_toolbar__lO-aI","chipWrapper":"datatable-module_chipWrapper__iz69x","chip":"datatable-module_chip__IiwTD"};
15294
-
15295
15293
  function DataTableFilterOptions({ children, ...props }) {
15296
15294
  const { table, filteredColumns, addFilterColumn } = useTable();
15297
15295
  const availableColumns = table
@@ -15303,20 +15301,20 @@ function DataTableFilterOptions({ children, ...props }) {
15303
15301
  })] })) : null] }));
15304
15302
  }
15305
15303
 
15306
- var styles$3 = {"textfield":"textfield-module_textfield__u4AGg","textfield-sm":"textfield-module_textfield-sm__OKPic","textfield-md":"textfield-module_textfield-md__e2ayW","textfield-invlid":"textfield-module_textfield-invlid__zo9MF","textfield-valid":"textfield-module_textfield-valid__6rMM9","textfield-leading":"textfield-module_textfield-leading__AE-ld"};
15304
+ var styles$4 = {"textfield":"textfield-module_textfield__u4AGg","textfield-sm":"textfield-module_textfield-sm__OKPic","textfield-md":"textfield-module_textfield-md__e2ayW","textfield-invlid":"textfield-module_textfield-invlid__zo9MF","textfield-valid":"textfield-module_textfield-valid__6rMM9","textfield-leading":"textfield-module_textfield-leading__AE-ld"};
15307
15305
 
15308
- const textfield = cva(styles$3.textfield, {
15306
+ const textfield = cva(styles$4.textfield, {
15309
15307
  variants: {
15310
15308
  size: {
15311
- small: styles$3["textfield-sm"],
15312
- medium: styles$3["textfield-md"],
15309
+ small: styles$4["textfield-sm"],
15310
+ medium: styles$4["textfield-md"],
15313
15311
  },
15314
15312
  state: {
15315
- invalid: styles$3["textfield-invalid"],
15316
- valid: styles$3["textfield-valid"],
15313
+ invalid: styles$4["textfield-invalid"],
15314
+ valid: styles$4["textfield-valid"],
15317
15315
  },
15318
15316
  leading: {
15319
- true: styles$3["textfield-leading"],
15317
+ true: styles$4["textfield-leading"],
15320
15318
  },
15321
15319
  },
15322
15320
  defaultVariants: {
@@ -15328,6 +15326,8 @@ const TextField = ({ leading, className, src, size, state, style, ...props }) =>
15328
15326
  };
15329
15327
  TextField.displayName = "TextField";
15330
15328
 
15329
+ var styles$3 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","head":"datatable-module_head__zCfCW","toolbar":"datatable-module_toolbar__lO-aI","chipWrapper":"datatable-module_chipWrapper__iz69x","chip":"datatable-module_chip__IiwTD"};
15330
+
15331
15331
  const FilteredChip = ({ column }) => {
15332
15332
  const { table, removeFilterColumn } = useTable();
15333
15333
  const { filterVariant } = column?.columnDef;
@@ -15361,7 +15361,7 @@ const FilteredChip = ({ column }) => {
15361
15361
  }
15362
15362
  }
15363
15363
  };
15364
- return (jsxRuntimeExports.jsxs(Box, { className: styles$4.chip, children: [jsxRuntimeExports.jsx(Text, { children: column.id }), jsxRuntimeExports.jsx(Text, { children: "is" }), renderInputs(), jsxRuntimeExports.jsx(Flex, { children: jsxRuntimeExports.jsx(Cross1Icon, { height: "12", width: "12", onClick: () => {
15364
+ return (jsxRuntimeExports.jsxs(Box, { className: styles$3.chip, children: [jsxRuntimeExports.jsx(Text, { children: column.id }), jsxRuntimeExports.jsx(Text, { children: "is" }), renderInputs(), jsxRuntimeExports.jsx(Flex, { children: jsxRuntimeExports.jsx(Cross1Icon, { height: "12", width: "12", onClick: () => {
15365
15365
  column.setFilterValue(undefined);
15366
15366
  removeFilterColumn(column.id);
15367
15367
  } }) })] }));
@@ -15374,14 +15374,14 @@ function DataTableFilterChips(props) {
15374
15374
  .filter((column) => typeof column.accessorFn !== "undefined" && column.getCanHide());
15375
15375
  if (!filteredColumns.length)
15376
15376
  return null;
15377
- return (jsxRuntimeExports.jsxs(Flex, { gap: "small", align: "center", className: styles$4.chipWrapper, ...props, children: [filteredColumns.map((filter, index) => {
15377
+ return (jsxRuntimeExports.jsxs(Flex, { gap: "small", align: "center", className: styles$3.chipWrapper, ...props, children: [filteredColumns.map((filter, index) => {
15378
15378
  const filteredColumn = table.getColumn(filter);
15379
- return jsxRuntimeExports.jsx(FilteredChip, { column: filteredColumn });
15379
+ return jsxRuntimeExports.jsx(FilteredChip, { column: filteredColumn }, index);
15380
15380
  }), filteredColumns.length < tableColumns.length && (jsxRuntimeExports.jsx(DataTableFilterOptions, { variant: "ghost", style: { border: "none", background: "none" }, children: jsxRuntimeExports.jsx(PlusIcon, { width: 16, height: 16 }) }))] }));
15381
15381
  }
15382
15382
 
15383
15383
  function DataTableFooter({ children, }) {
15384
- return (jsxRuntimeExports.jsx(Flex, { direction: "column", className: styles$4.toolbar, children: children }));
15384
+ return (jsxRuntimeExports.jsx(Flex, { direction: "column", className: styles$3.toolbar, children: children }));
15385
15385
  }
15386
15386
 
15387
15387
  function DataTableGloabalSearch(props) {
@@ -15394,7 +15394,7 @@ function DataTableGloabalSearch(props) {
15394
15394
  }
15395
15395
 
15396
15396
  function DataTableToolbar({ children, ...props }) {
15397
- return (jsxRuntimeExports.jsx(Flex, { direction: "column", className: styles$4.toolbar, ...props, children: children }));
15397
+ return (jsxRuntimeExports.jsx(Flex, { direction: "column", className: styles$3.toolbar, ...props, children: children }));
15398
15398
  }
15399
15399
 
15400
15400
  function DataTableViewOptions({ children, ...props }) {
@@ -15505,7 +15505,7 @@ function DataTableRoot({ columns, data, emptyState, children, parentStyle, ...pr
15505
15505
  rowSelection,
15506
15506
  },
15507
15507
  });
15508
- return (jsxRuntimeExports.jsx(Flex, { direction: "column", justify: "between", className: styles$4.wrapper, children: jsxRuntimeExports.jsxs(TableContext.Provider, { value: {
15508
+ return (jsxRuntimeExports.jsx(Flex, { direction: "column", justify: "between", className: styles$3.wrapper, children: jsxRuntimeExports.jsxs(TableContext.Provider, { value: {
15509
15509
  table,
15510
15510
  globalFilter,
15511
15511
  filteredColumns,
@@ -15514,10 +15514,10 @@ function DataTableRoot({ columns, data, emptyState, children, parentStyle, ...pr
15514
15514
  resetColumns,
15515
15515
  onGlobalFilterChange: setGlobalFilter,
15516
15516
  onChange: () => ({}),
15517
- }, children: [jsxRuntimeExports.jsxs(Flex, { direction: "column", className: styles$4.datatable, children: [header, jsxRuntimeExports.jsxs(Flex, { style: parentStyle, children: [jsxRuntimeExports.jsxs(Table, { ...props, children: [jsxRuntimeExports.jsx(Table.Header, { children: table.getHeaderGroups().map((headerGroup) => (jsxRuntimeExports.jsx(Table.Row, { children: headerGroup.headers.map((header) => {
15517
+ }, children: [jsxRuntimeExports.jsxs(Flex, { direction: "column", className: styles$3.datatable, children: [header, jsxRuntimeExports.jsxs(Flex, { style: parentStyle, children: [jsxRuntimeExports.jsxs(Table, { ...props, children: [jsxRuntimeExports.jsx(Table.Header, { children: table.getHeaderGroups().map((headerGroup) => (jsxRuntimeExports.jsx(Table.Row, { children: headerGroup.headers.map((header) => {
15518
15518
  return (jsxRuntimeExports.jsx(Table.Head, { style: {
15519
15519
  ...(header.column.columnDef?.meta?.style ?? {}),
15520
- }, children: jsxRuntimeExports.jsxs(Text, { className: styles$4.head, children: [header.isPlaceholder
15520
+ }, children: jsxRuntimeExports.jsxs(Text, { className: styles$3.head, children: [header.isPlaceholder
15521
15521
  ? null
15522
15522
  : flexRender(header.column.columnDef.header, header.getContext()), {
15523
15523
  asc: jsxRuntimeExports.jsx(ArrowUpIcon, {}),