vueless 1.3.6-beta.8 → 1.3.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "1.3.6-beta.8",
3
+ "version": "1.3.6",
4
4
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
5
5
  "author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
6
6
  "homepage": "https://vueless.com",
@@ -57,7 +57,7 @@
57
57
  "@vue/eslint-config-typescript": "^14.6.0",
58
58
  "@vue/test-utils": "^2.4.6",
59
59
  "@vue/tsconfig": "^0.7.0",
60
- "@vueless/storybook": "^1.3.14",
60
+ "@vueless/storybook": "^1.3.16",
61
61
  "eslint": "^9.32.0",
62
62
  "eslint-plugin-storybook": "^10.0.2",
63
63
  "eslint-plugin-vue": "^10.3.0",
@@ -197,8 +197,6 @@ function closeDrawer() {
197
197
  }
198
198
 
199
199
  function onDragStart(e: MouseEvent | TouchEvent) {
200
- e.preventDefault();
201
-
202
200
  const clientX = "touches" in e ? e.touches[0].clientX : e.clientX;
203
201
  const clientY = "touches" in e ? e.touches[0].clientY : e.clientY;
204
202
 
@@ -211,6 +209,8 @@ function onDragStart(e: MouseEvent | TouchEvent) {
211
209
 
212
210
  if (!props.handle || !isDraggingFromHandle.value) return;
213
211
 
212
+ e.preventDefault();
213
+
214
214
  document.addEventListener("mousemove", onDragMove);
215
215
  document.addEventListener("mouseup", onDragEnd);
216
216
  document.addEventListener("touchmove", onDragMove, { passive: false });
@@ -294,7 +294,7 @@ const {
294
294
  titleFallbackAttrs,
295
295
  closeButtonAttrs,
296
296
  closeIconAttrs,
297
- } = useUI<Config>(defaultConfig);
297
+ } = useUI<Config>(defaultConfig, undefined, "drawer");
298
298
  </script>
299
299
 
300
300
  <template>
@@ -6,7 +6,7 @@ import UTableRow from "../UTableRow.vue";
6
6
  import UIcon from "../../ui.image-icon/UIcon.vue";
7
7
  import UCheckbox from "../../ui.form-checkbox/UCheckbox.vue";
8
8
 
9
- import type { FlatRow, ColumnObject, UTableRowAttrs, Config } from "../types";
9
+ import type { FlatRow, ColumnObject, UTableRowAttrs, Config, Row } from "../types";
10
10
 
11
11
  describe("UTableRow.vue", () => {
12
12
  const defaultColumns: ColumnObject[] = [
@@ -135,7 +135,7 @@ describe("UTableRow.vue", () => {
135
135
  ...defaultRow,
136
136
  name: {
137
137
  value: "John Doe",
138
- class: (value, row) => `dynamic-${row.role}`,
138
+ class: (value: unknown, row: Row) => `dynamic-${row.role}`,
139
139
  contentClass: (value: unknown) => `content-${value}`,
140
140
  },
141
141
  };
@@ -6,16 +6,15 @@ import type { Config as UDividerConfig } from "../ui.container-divider/types";
6
6
 
7
7
  export type Config = typeof defaultConfig;
8
8
 
9
- type RowKeys = number | string | boolean | undefined | Date | Row | Row[] | ((row: Row) => string);
10
-
11
9
  export interface CellObject {
12
10
  contentClass?: string | ((value: unknown | string, row: Row) => string);
13
11
  class?: string | ((value: unknown | string, row: Row) => string);
14
- [key: string]: unknown | string;
12
+ [key: string]: unknown;
15
13
  }
16
14
 
17
15
  export type RowId = string | number;
18
- export type Cell = CellObject | string;
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ export type Cell = CellObject & any;
19
18
 
20
19
  export interface RowData {
21
20
  [key: string]: Cell;
@@ -32,7 +31,7 @@ export interface Row {
32
31
  rowDate?: string | Date;
33
32
  row?: Row | Row[];
34
33
  class?: string | ((row: Row) => string);
35
- [key: string]: Cell | RowKeys;
34
+ [key: string]: unknown;
36
35
  }
37
36
 
38
37
  export interface FlatRow extends Row {
@@ -1,7 +1,7 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: {
3
3
  base: `
4
- my-2 p-1 flex flex-col gap-1 w-auto absolute z-50 shadow-sm
4
+ p-1 flex flex-col gap-1 w-auto absolute z-50 shadow-sm
5
5
  rounded-medium border border-solid border-default bg-default
6
6
  overflow-auto [-webkit-overflow-scrolling:touch]
7
7
  focus:outline-hidden
@@ -44,6 +44,7 @@ export default /*tw*/ {
44
44
  true: "leading-none",
45
45
  },
46
46
  wrap: {
47
+ true: "text-wrap wrap-anywhere",
47
48
  false: "text-nowrap",
48
49
  },
49
50
  },