y200subcontrols 0.0.339 → 0.0.342

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,17 +1,26 @@
1
1
  <script>export let isHeader = false;
2
2
  export let width = void 0;
3
+ export let breakpoint = void 0;
3
4
  </script>
4
5
 
5
6
  {#if isHeader}
6
7
  <th
7
- class="px-2 py-1.5 border-r border-r-slate-300 last-of-type:border-r-0 text-left"
8
+ class="px-2 py-1.5 border-r border-r-slate-300 last-of-type:border-r-0 text-left table-cell
9
+ {breakpoint === 'sm' ? 'sm:hidden' : ''}
10
+ {breakpoint === 'md' ? 'md:hidden' : ''}
11
+ {breakpoint === 'lg' ? 'lg:hidden' : ''}
12
+ "
8
13
  style={width === undefined ? '' : `width:${width}px`}
9
14
  >
10
15
  <slot />
11
16
  </th>
12
17
  {:else}
13
18
  <td
14
- class="px-2 py-1.5 border-r border-r-slate-300 last-of-type:border-r-0"
19
+ class="px-2 py-1.5 border-r border-r-slate-300 last-of-type:border-r-0 table-cell
20
+ {breakpoint === 'sm' ? 'sm:hidden' : ''}
21
+ {breakpoint === 'md' ? 'md:hidden' : ''}
22
+ {breakpoint === 'lg' ? 'lg:hidden' : ''}
23
+ "
15
24
  style={width === undefined ? '' : `width:${width}px`}
16
25
  >
17
26
  <slot />
@@ -3,6 +3,7 @@ declare const __propDef: {
3
3
  props: {
4
4
  isHeader?: boolean;
5
5
  width?: number | undefined;
6
+ breakpoint?: "sm" | "md" | "lg" | undefined;
6
7
  };
7
8
  events: {
8
9
  [evt: string]: CustomEvent<any>;
@@ -9,7 +9,7 @@ export let totalRecords;
9
9
  let pagesCount = 0;
10
10
  let _currentPage = 0;
11
11
  $: {
12
- pagesCount = totalRecords / recordsPerPage;
12
+ pagesCount = Math.ceil(totalRecords / recordsPerPage);
13
13
  _currentPage = currentPage + 1;
14
14
  }
15
15
  function handlePageIndexChanged(factor) {
@@ -62,7 +62,7 @@ onMount(() => {
62
62
  {!isValid
63
63
  ? 'border-pink-600 dark:border-pink-500 focus:ring-pink-600/20 dark:focus:ring-pink-600/40'
64
64
  : 'dark:border-slate-600 border-slate-300 focus:ring-teal-500/20 dark:focus:ring-teal-500/30'}
65
- {customCss}"
65
+ {customCss} pr-8"
66
66
  {placeholder}
67
67
  {id}
68
68
  {name}
@@ -52,7 +52,7 @@ onMount(() => {
52
52
  {#if labelText}
53
53
  <label
54
54
  for={id}
55
- class="mb-1 inline-block text-slate-600 dark:text-neutral-200"
55
+ class="inline-block mb-1 text-slate-600 dark:text-neutral-200 font-thin text-lg"
56
56
  >
57
57
  {labelText}
58
58
  {#if required}
@@ -6,7 +6,7 @@ export let theme = "teal";
6
6
  </script>
7
7
 
8
8
  <label class="flex cursor-pointer">
9
- <input type="checkbox" bind:checked class="hidden peer" {id} {name} />
9
+ <input type="checkbox" bind:checked class="hidden peer" {id} {name} on:change />
10
10
  <div
11
11
  class=" rounded-full h-5 w-10 flex my-auto bg-slate-300
12
12
  {theme==='teal' ? 'peer-checked:bg-teal-600' : ''}
@@ -9,6 +9,8 @@ declare const __propDef: {
9
9
  theme?: ColorThemes;
10
10
  };
11
11
  events: {
12
+ change: Event;
13
+ } & {
12
14
  [evt: string]: CustomEvent<any>;
13
15
  };
14
16
  slots: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "y200subcontrols",
3
- "version": "0.0.339",
3
+ "version": "0.0.342",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",