@unsource/ui 2.7.2 → 2.7.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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unsource-ui",
3
3
  "configKey": "unsourceUi",
4
- "version": "2.7.2",
4
+ "version": "2.7.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,16 +1,17 @@
1
+ export type TableCol = {
2
+ title: string;
3
+ handler: () => string;
4
+ name: string;
5
+ disabled?: boolean;
6
+ key?: string | string[];
7
+ subKey?: string | string[];
8
+ class?: string;
9
+ dir?: string;
10
+ isDesktop?: boolean;
11
+ isMobile?: boolean;
12
+ };
1
13
  type __VLS_Props = {
2
- cols?: {
3
- title: string;
4
- handler: string;
5
- name: string;
6
- disabled?: boolean;
7
- key?: string | string[];
8
- subKey?: string | string[];
9
- class?: string;
10
- dir?: string;
11
- isDesktop?: boolean;
12
- isMobile?: boolean;
13
- }[];
14
+ cols?: TableCol[];
14
15
  items?: Record<string, unknown>[];
15
16
  thClass?: string;
16
17
  tdClass?: string;
@@ -87,7 +87,7 @@
87
87
  </template>
88
88
 
89
89
  <script setup>
90
- import { _at, useDevice } from "#imports";
90
+ import { _at } from "#imports";
91
91
  const { cols = [], items = [], thClass = "bg-gray-100 border-gray-100", tdClass = "bg-gray-250", textClass = "text-gray-800 font-700 text-xs" } = defineProps({
92
92
  cols: { type: Array, required: false },
93
93
  items: { type: Array, required: false },
@@ -1,16 +1,17 @@
1
+ export type TableCol = {
2
+ title: string;
3
+ handler: () => string;
4
+ name: string;
5
+ disabled?: boolean;
6
+ key?: string | string[];
7
+ subKey?: string | string[];
8
+ class?: string;
9
+ dir?: string;
10
+ isDesktop?: boolean;
11
+ isMobile?: boolean;
12
+ };
1
13
  type __VLS_Props = {
2
- cols?: {
3
- title: string;
4
- handler: string;
5
- name: string;
6
- disabled?: boolean;
7
- key?: string | string[];
8
- subKey?: string | string[];
9
- class?: string;
10
- dir?: string;
11
- isDesktop?: boolean;
12
- isMobile?: boolean;
13
- }[];
14
+ cols?: TableCol[];
14
15
  items?: Record<string, unknown>[];
15
16
  thClass?: string;
16
17
  tdClass?: string;
@@ -1,7 +1,8 @@
1
+ import type { TableCol } from './UnTable.vue.js';
1
2
  type __VLS_Props = {
2
3
  item?: unknown;
3
4
  items?: unknown[];
4
- cols: unknown[];
5
+ cols: TableCol[];
5
6
  textClass?: string;
6
7
  parentKey?: string;
7
8
  idKey?: string;
@@ -33,7 +33,7 @@
33
33
  >
34
34
  <div class="flex flex-col gap-0.5">
35
35
  <p :class="textClass">
36
- {{ item.handler ? item.handler(_at(item, col.key), item, col, items, cols) : _at(item, col.key).join(" ") }}
36
+ {{ col.handler ? col.handler(_at(item, col.key), item, col, items, cols) : _at(item, col.key).join(" ") }}
37
37
  </p>
38
38
  <small
39
39
  v-if="col.subKey?.length"
@@ -1,7 +1,8 @@
1
+ import type { TableCol } from './UnTable.vue.js';
1
2
  type __VLS_Props = {
2
3
  item?: unknown;
3
4
  items?: unknown[];
4
- cols: unknown[];
5
+ cols: TableCol[];
5
6
  textClass?: string;
6
7
  parentKey?: string;
7
8
  idKey?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unsource/ui",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "private": false,
5
5
  "description": "nuxt ui kit for unsource env",
6
6
  "repository": "https://github.com/alisa2142/unsource-ui",