luna-plus 0.0.23 → 0.0.24

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.
@@ -1,5 +1,4 @@
1
1
  <script lang="ts">
2
- import type { Snippet } from "svelte";
3
2
  import type {
4
3
  TableProps,
5
4
  TableColumn,
@@ -9,7 +8,6 @@
9
8
  CellClickEvent,
10
9
  SelectionChangeEvent,
11
10
  TableActionButton,
12
- SpanMethodResult,
13
11
  SelectEvent,
14
12
  SelectAllEvent,
15
13
  CellMouseEvent,
@@ -631,8 +629,7 @@
631
629
  `lm-table${border ? " lm-table--border" : ""}${stripe ? " lm-table--striped" : ""}${size !== "default" ? ` lm-table--${size}` : ""}${fit ? " lm-table--fit" : ""}${highlightCurrentRow ? " lm-table--highlight-current-row" : ""}${loading ? " is-loading" : ""}${flexible ? " lm-table--flexible" : ""}${scrollbarAlwaysOn ? " lm-table--scrollbar-always-on" : ""}${cls ? ` ${cls}` : ""}`,
632
630
  );
633
631
 
634
- // Table style
635
- const tableStyle = $derived.by(() => {
632
+ const innerWrapperStyle = $derived.by(() => {
636
633
  const styles: string[] = [];
637
634
  if (height) {
638
635
  const h = typeof height === "number" ? `${height}px` : height;
@@ -645,6 +642,10 @@
645
642
  return styles.join("; ");
646
643
  });
647
644
 
645
+ const tableElementClasses = $derived(
646
+ `lm-table__table${cls ? ` ${cls}` : ""}`,
647
+ );
648
+
648
649
  // Cleanup
649
650
  $effect(() => {
650
651
  return () => {
@@ -655,10 +656,17 @@
655
656
  });
656
657
  </script>
657
658
 
658
- <div {...attrs} bind:this={tableRef} class={tableClasses} style={tableStyle}>
659
+ <div bind:this={tableRef} class={tableClasses}>
659
660
  <Loading visible={loading} lock={false}>
660
- <div class="lm-table__inner-wrapper" onscroll={handleScroll}>
661
- <table class="lm-table__table" style:table-layout={tableLayout} cellspacing="0" cellpadding="0" border="0">
661
+ <div class="lm-table__inner-wrapper" style={innerWrapperStyle} onscroll={handleScroll}>
662
+ <table
663
+ {...attrs}
664
+ class={tableElementClasses}
665
+ style:table-layout={tableLayout}
666
+ cellspacing="0"
667
+ cellpadding="0"
668
+ border="0"
669
+ >
662
670
  <colgroup>
663
671
  {#each columns as column}
664
672
  <col style={getColumnWidthStyle(column)} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luna-plus",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "A modern Svelte 5 component library with 60+ components",
5
5
  "type": "module",
6
6
  "svelte": "./dist/index.js",