@r2digisolutions/ui 0.22.1 → 0.22.3

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,3 +1,8 @@
1
+ <script module lang="ts">
2
+ import * as DataTableTypes from './core/types.js';
3
+ export type { DataTableTypes };
4
+ </script>
5
+
1
6
  <script lang="ts" generics="T extends { id?: any }">
2
7
  import type { Snippet } from 'svelte';
3
8
  import { tick } from 'svelte';
@@ -305,7 +310,7 @@
305
310
  />{:else}<ChevronRight class="h-4 w-4" />{/if}
306
311
  </button>
307
312
  {/if}
308
- {@html rowActions(row)}
313
+ {@render rowActions(row)}
309
314
  </div>
310
315
  </div>
311
316
  {:else if endExtras}
@@ -1,3 +1,5 @@
1
+ import * as DataTableTypes from './core/types.js';
2
+ export type { DataTableTypes };
1
3
  import type { Snippet } from 'svelte';
2
4
  import type { CellContext, TableOptions } from './core/types.js';
3
5
  import type { Entry } from './components/ContextMenu.svelte';
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" generics="T">
2
- import type { ColumnDef } from '../core/types';
2
+ import type { ColumnDef } from '../core/types.js';
3
3
  import { Check, X, ExternalLink } from 'lucide-svelte';
4
4
 
5
5
  interface Props<T> {
@@ -1,4 +1,4 @@
1
- import type { ColumnDef } from '../core/types';
1
+ import type { ColumnDef } from '../core/types.js';
2
2
  interface Props<T> {
3
3
  column: ColumnDef<T>;
4
4
  row: T;
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { ColumnDef } from '../core/types';
2
+ import type { ColumnDef } from '../core/types.js';
3
3
 
4
4
  interface Props {
5
5
  columns?: ColumnDef<any>[];
@@ -1,4 +1,4 @@
1
- import type { ColumnDef } from '../core/types';
1
+ import type { ColumnDef } from '../core/types.js';
2
2
  interface Props {
3
3
  columns?: ColumnDef<any>[];
4
4
  visible?: string[];
@@ -1,10 +1,10 @@
1
1
  <script lang="ts">
2
- import Input from '@UI/Input/Input.svelte';
3
- import type { FilterField } from '../core/filters/types';
4
- import { buildFilterDefs } from '../core/filters/utils';
5
- import Checkbox from '@UI/Checkbox/Checkbox.svelte';
6
- import Button from '@UI/buttons/Button.svelte';
7
2
  import { Check, X } from 'lucide-svelte';
3
+ import type { FilterField } from '../core/filters/types.js';
4
+ import { buildFilterDefs } from '../core/filters/utils.js';
5
+ import Input from '../../../ui/Input/Input.svelte';
6
+ import Checkbox from '../../../ui/Checkbox/Checkbox.svelte';
7
+ import Button from '../../../ui/Button/Button.svelte';
8
8
 
9
9
  interface Props {
10
10
  fields: FilterField<any>[];
@@ -90,16 +90,16 @@
90
90
  <div class="space-y-3">
91
91
  {#each fields as f}
92
92
  {#if f.type === 'text'}
93
+ <label class="mb-1 block text-xs opacity-70">{f.label}</label>
93
94
  <Input
94
- label={f.label}
95
95
  type="text"
96
96
  placeholder={f.placeholder}
97
97
  value={values[f.id]}
98
98
  onchange={(e) => (values[f.id] = e)}
99
99
  />
100
100
  {:else if f.type === 'number'}
101
+ <label class="mb-1 block text-xs opacity-70">{f.label}</label>
101
102
  <Input
102
- label={f.label}
103
103
  type="number"
104
104
  min={f.min}
105
105
  max={f.max}
@@ -108,12 +108,8 @@
108
108
  onchange={(e) => (values[f.id] = e)}
109
109
  />
110
110
  {:else if f.type === 'date'}
111
- <Input
112
- label={f.label}
113
- type="date"
114
- value={values[f.id]}
115
- onchange={(e) => (values[f.id] = e)}
116
- />
111
+ <label class="mb-1 block text-xs opacity-70">{f.label}</label>
112
+ <Input type="date" value={values[f.id]} onchange={(e) => (values[f.id] = e)} />
117
113
  {:else if f.type === 'checkbox'}
118
114
  <Checkbox checked={values[f.id]} label={f.label} onchange={(e) => (values[f.id] = e)} />
119
115
  {:else if f.type === 'select'}
@@ -1,4 +1,4 @@
1
- import type { FilterField } from '../core/filters/types';
1
+ import type { FilterField } from '../core/filters/types.js';
2
2
  interface Props {
3
3
  fields: FilterField<any>[];
4
4
  values?: Record<string, any>;
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import type { FilterDef } from '../core/types';
2
+ import type { FilterDef } from '../core/types.js';
3
3
 
4
4
  interface Props {
5
5
  filters: FilterDef<any>[];
@@ -1,4 +1,4 @@
1
- import type { FilterDef } from '../core/types';
1
+ import type { FilterDef } from '../core/types.js';
2
2
  interface Props {
3
3
  filters: FilterDef<any>[];
4
4
  onapply: (filters: FilterDef<any>[]) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/ui",
3
- "version": "0.22.1",
3
+ "version": "0.22.3",
4
4
  "private": false,
5
5
  "packageManager": "bun@1.2.22",
6
6
  "publishConfig": {