vueless 0.0.552 → 0.0.554
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/index.d.ts +3 -1
- package/index.ts +3 -1
- package/package.json +1 -1
- package/ui.data-table/storybook/stories.ts +1 -1
- package/ui.data-table/utilTable.ts +1 -1
- package/ui.form-calendar/UCalendar.vue +0 -1
- package/ui.form-calendar/config.ts +14 -14
- package/ui.text-notify/utilNotify.ts +2 -1
- package/utils/helper.ts +16 -0
- package/utils/ui.ts +0 -16
- package/web-types.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { App } from "vue";
|
|
2
2
|
import type { CreateVuelessOptions } from "./types.ts";
|
|
3
|
-
export { setTitle } from "./utils/helper.ts";
|
|
4
3
|
export { setTheme } from "./utils/theme.ts";
|
|
4
|
+
export { cx, cva, compose } from "./utils/ui.ts";
|
|
5
|
+
export { isSSR, isCSR, getRandomId, setTitle, createDebounce } from "./utils/helper.ts";
|
|
6
|
+
export { isMac, isPWA, isIOS, isAndroid, isMobileApp, isWindows } from "./utils/platform.ts";
|
|
5
7
|
export { default as createVueI18nAdapter } from "./adatper.locale/vue-i18n.js";
|
|
6
8
|
export { default as defaultEnLocale } from "./adatper.locale/locales/en.js";
|
|
7
9
|
export { useLocale } from "./composables/useLocale.ts";
|
package/index.ts
CHANGED
|
@@ -7,8 +7,10 @@ import { themeInit } from "./utils/theme.ts";
|
|
|
7
7
|
import type { App } from 'vue'
|
|
8
8
|
import type { CreateVuelessOptions } from './types.ts'
|
|
9
9
|
|
|
10
|
-
export { setTitle } from "./utils/helper.ts";
|
|
11
10
|
export { setTheme } from "./utils/theme.ts";
|
|
11
|
+
export { cx, cva, compose } from "./utils/ui.ts";
|
|
12
|
+
export { isSSR, isCSR, getRandomId, setTitle, createDebounce } from "./utils/helper.ts";
|
|
13
|
+
export { isMac, isPWA, isIOS, isAndroid, isMobileApp, isWindows } from "./utils/platform.ts";
|
|
12
14
|
export { default as createVueI18nAdapter } from "./adatper.locale/vue-i18n.js";
|
|
13
15
|
export { default as defaultEnLocale } from "./adatper.locale/locales/en.js";
|
|
14
16
|
export { useLocale } from "./composables/useLocale.ts";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryFn } from "@storybook/vue3";
|
|
2
2
|
import { getArgTypes, getSlotNames, getSlotsFragment } from "../../utils/storybook.ts";
|
|
3
|
-
import { getRandomId } from "../../utils/
|
|
3
|
+
import { getRandomId } from "../../utils/helper.ts";
|
|
4
4
|
|
|
5
5
|
import UTable from "../UTable.vue";
|
|
6
6
|
import UButton from "../../ui.button/UButton.vue";
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
export default /*tw*/ {
|
|
2
|
-
wrapper: "p-
|
|
2
|
+
wrapper: "p-3 w-[19rem] border border-gray-300 rounded-dynamic bg-white shadow overflow-hidden focus:outline-none",
|
|
3
3
|
navigation: "mb-2 pb-2 border-b flex items-center justify-between",
|
|
4
4
|
viewSwitchButton: "{UButton}",
|
|
5
5
|
nextPrevButton: "{UButton}",
|
|
6
6
|
dayView: "",
|
|
7
7
|
weekDays: "grid grid-cols-7 justify-items-center gap-1",
|
|
8
|
-
weekDay: "flex size-8 items-center justify-center text-xs
|
|
8
|
+
weekDay: "flex size-8 items-center justify-center text-xs capitalize text-gray-500 font-medium",
|
|
9
9
|
days: {
|
|
10
|
-
base: "grid grid-cols-7 justify-items-center gap-
|
|
10
|
+
base: "grid grid-cols-7 justify-items-center gap-0.5",
|
|
11
11
|
variants: {
|
|
12
12
|
range: {
|
|
13
13
|
true: "gap-0 gap-y-0.5",
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
|
-
dateInRange: "bg-brand/
|
|
17
|
+
dateInRange: "bg-brand/5 !text-brand-900 hover:bg-brand/15 rounded-none",
|
|
18
18
|
edgeDateInRange: "",
|
|
19
19
|
firstDateInRange: "rounded-r-none",
|
|
20
20
|
lastDateInRange: "rounded-l-none",
|
|
21
21
|
anotherMonthDate: "text-gray-400",
|
|
22
22
|
activeDate: "bg-brand-100",
|
|
23
|
-
selectedDate: "
|
|
24
|
-
currentDate: "border-2 border-brand-600
|
|
25
|
-
day: "{UButton} size-9 w-full
|
|
23
|
+
selectedDate: "",
|
|
24
|
+
currentDate: "border-2 border-brand-600",
|
|
25
|
+
day: "{UButton} size-9 w-full",
|
|
26
26
|
currentDay: "",
|
|
27
27
|
dayInRange: "",
|
|
28
28
|
currentDayInRange: "",
|
|
29
|
-
anotherMonthDay: "",
|
|
30
|
-
firstDayInRange: "
|
|
29
|
+
anotherMonthDay: "font-normal",
|
|
30
|
+
firstDayInRange: "",
|
|
31
31
|
anotherMonthFirstDayInRange: "",
|
|
32
|
-
lastDayInRange: "
|
|
32
|
+
lastDayInRange: "",
|
|
33
33
|
currentLastDayInRange: "",
|
|
34
34
|
currentFirstDayInRange: "",
|
|
35
35
|
anotherMonthLastDayInRange: "",
|
|
@@ -61,10 +61,10 @@ export default /*tw*/ {
|
|
|
61
61
|
currentFirstYearInRange: "",
|
|
62
62
|
selectedYear: "",
|
|
63
63
|
activeYear: "",
|
|
64
|
-
timepicker: "mt-2 pl-1 pt-3 text-sm flex items-
|
|
65
|
-
timepickerLabel: "w-full",
|
|
66
|
-
timepickerInputWrapper: "flex items-center
|
|
67
|
-
timepickerInput: "w-
|
|
64
|
+
timepicker: "mt-2 pl-1 pt-3 text-sm flex items-stretch justify-between gap-2 border-t border-gray-200",
|
|
65
|
+
timepickerLabel: "w-full self-center",
|
|
66
|
+
timepickerInputWrapper: "flex items-center rounded-dynamic border border-brand-300",
|
|
67
|
+
timepickerInput: "w-10 border-none px-1.5 py-1.5 text-center text-sm focus:ring-0 focus:placeholder:text-gray-900",
|
|
68
68
|
timepickerInputHours: "rounded-l-dynamic",
|
|
69
69
|
timepickerInputMinutes: "",
|
|
70
70
|
timepickerInputSeconds: "rounded-r-dynamic",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { vuelessConfig } from "../utils/ui.ts";
|
|
2
|
+
import { getRandomId } from "../utils/helper.ts";
|
|
2
3
|
import { DELAY_BETWEEN_CLONES, DURATION, LOCAL_STORAGE_ID, NOTIFY_TYPE } from "./constants.ts";
|
|
3
4
|
|
|
4
5
|
interface NotifyConfig {
|
package/utils/helper.ts
CHANGED
|
@@ -57,6 +57,22 @@ export function setTitle({ title = "", separator = " / ", suffix = "" }) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Generates simple unique identifier.
|
|
62
|
+
*/
|
|
63
|
+
export function getRandomId(length = 15) {
|
|
64
|
+
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
65
|
+
const charactersLength = characters.length;
|
|
66
|
+
|
|
67
|
+
let id = "";
|
|
68
|
+
|
|
69
|
+
while (id.length < length) {
|
|
70
|
+
id += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return id;
|
|
74
|
+
}
|
|
75
|
+
|
|
60
76
|
/**
|
|
61
77
|
* Check is code rendering on the server side.
|
|
62
78
|
*/
|
package/utils/ui.ts
CHANGED
|
@@ -127,19 +127,3 @@ export function getColor(color: string) {
|
|
|
127
127
|
export function setColor(classes: string, color: string) {
|
|
128
128
|
return classes?.replace(/{color}/g, color);
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Generates simple unique identifier.
|
|
133
|
-
*/
|
|
134
|
-
export function getRandomId(length = 15) {
|
|
135
|
-
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
136
|
-
const charactersLength = characters.length;
|
|
137
|
-
|
|
138
|
-
let id = "";
|
|
139
|
-
|
|
140
|
-
while (id.length < length) {
|
|
141
|
-
id += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return id;
|
|
145
|
-
}
|