vueless 0.0.758 → 0.0.760
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 +2 -2
- package/ui.data-table/UTable.vue +3 -3
- package/ui.data-table/config.ts +1 -1
- package/ui.dropdown-list/UDropdownList.vue +1 -1
- package/ui.form-date-picker-range/UDatePickerRangePeriodMenu.vue +4 -4
- package/utils/node/dynamicProps.js +2 -2
- package/utils/node/dynamicStories.js +28 -27
- package/utils/node/helper.js +4 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.760",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
6
|
"keywords": [
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"prettier": "^3.3.3",
|
|
83
83
|
"release-it": "^17.2.1",
|
|
84
84
|
"typescript": "^5.6.3",
|
|
85
|
-
"vite": "^
|
|
85
|
+
"vite": "^6.1.0",
|
|
86
86
|
"vite-plugin-compression": "^0.5.1",
|
|
87
87
|
"vue": "^3.5.4",
|
|
88
88
|
"vue-i18n": "^10.0.4",
|
package/ui.data-table/UTable.vue
CHANGED
|
@@ -547,7 +547,7 @@ const {
|
|
|
547
547
|
<slot :name="`header-${column.key}-after`" :column="column" :index="index" />
|
|
548
548
|
</div>
|
|
549
549
|
|
|
550
|
-
<ULoaderProgress
|
|
550
|
+
<ULoaderProgress :loading="loading" v-bind="stickyHeaderLoaderAttrs" />
|
|
551
551
|
</div>
|
|
552
552
|
|
|
553
553
|
<div
|
|
@@ -579,7 +579,7 @@ const {
|
|
|
579
579
|
-->
|
|
580
580
|
<slot name="header-actions" :selected-rows="selectedRows" />
|
|
581
581
|
|
|
582
|
-
<ULoaderProgress
|
|
582
|
+
<ULoaderProgress :loading="loading" v-bind="stickyHeaderLoaderAttrs" />
|
|
583
583
|
</div>
|
|
584
584
|
|
|
585
585
|
<div
|
|
@@ -612,7 +612,7 @@ const {
|
|
|
612
612
|
-->
|
|
613
613
|
<slot name="header-actions" :selected-rows="selectedRows" />
|
|
614
614
|
|
|
615
|
-
<ULoaderProgress
|
|
615
|
+
<ULoaderProgress :loading="loading" v-bind="stickyHeaderLoaderAttrs" />
|
|
616
616
|
</div>
|
|
617
617
|
|
|
618
618
|
<div ref="table-wrapper" v-bind="tableWrapperAttrs">
|
package/ui.data-table/config.ts
CHANGED
|
@@ -23,7 +23,7 @@ export default /*tw*/ {
|
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
|
-
stickyHeaderLoader: "{ULoaderProgress}",
|
|
26
|
+
stickyHeaderLoader: "{ULoaderProgress} absolute top-auto bottom-0",
|
|
27
27
|
headerActionsCheckbox: "{UCheckbox}",
|
|
28
28
|
headerActionsCounter: "{>headerCounterBase} -ml-1.5",
|
|
29
29
|
tableWrapper: "border border-gray-200 rounded-dynamic bg-white",
|
|
@@ -299,7 +299,7 @@ const {
|
|
|
299
299
|
v-bind="isSelectedOption(option) ? optionActiveAttrs : optionAttrs"
|
|
300
300
|
:data-test="getDataTest('option')"
|
|
301
301
|
:class="optionHighlight(index, option)"
|
|
302
|
-
@click="select(option), onClickOption(option)"
|
|
302
|
+
@click="(select(option), onClickOption(option))"
|
|
303
303
|
@mouseenter.self="pointerSet(index)"
|
|
304
304
|
>
|
|
305
305
|
<!--
|
|
@@ -266,7 +266,7 @@ function getDatePeriodState(date: DatePeriodRange) {
|
|
|
266
266
|
:disabled="isDatePeriodOutOfRange(date)"
|
|
267
267
|
v-bind="attrs.periodDateCurrentSelectedAttrs.value"
|
|
268
268
|
:label="String(date.title)"
|
|
269
|
-
@click="selectDate(date), toggleMenu()"
|
|
269
|
+
@click="(selectDate(date), toggleMenu())"
|
|
270
270
|
/>
|
|
271
271
|
|
|
272
272
|
<UButton
|
|
@@ -278,7 +278,7 @@ function getDatePeriodState(date: DatePeriodRange) {
|
|
|
278
278
|
:disabled="isDatePeriodOutOfRange(date)"
|
|
279
279
|
v-bind="attrs.periodDateSelectedAttrs.value"
|
|
280
280
|
:label="String(date.title)"
|
|
281
|
-
@click="selectDate(date), toggleMenu()"
|
|
281
|
+
@click="(selectDate(date), toggleMenu())"
|
|
282
282
|
/>
|
|
283
283
|
|
|
284
284
|
<UButton
|
|
@@ -290,7 +290,7 @@ function getDatePeriodState(date: DatePeriodRange) {
|
|
|
290
290
|
:disabled="isDatePeriodOutOfRange(date)"
|
|
291
291
|
v-bind="attrs.periodDateCurrentAttrs.value"
|
|
292
292
|
:label="String(date.title)"
|
|
293
|
-
@click="selectDate(date), toggleMenu()"
|
|
293
|
+
@click="(selectDate(date), toggleMenu())"
|
|
294
294
|
/>
|
|
295
295
|
|
|
296
296
|
<UButton
|
|
@@ -301,7 +301,7 @@ function getDatePeriodState(date: DatePeriodRange) {
|
|
|
301
301
|
:disabled="isDatePeriodOutOfRange(date)"
|
|
302
302
|
v-bind="attrs.periodDateAttrs.value"
|
|
303
303
|
:label="String(date.title)"
|
|
304
|
-
@click="selectDate(date), toggleMenu()"
|
|
304
|
+
@click="(selectDate(date), toggleMenu())"
|
|
305
305
|
/>
|
|
306
306
|
</template>
|
|
307
307
|
</div>
|
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
2
|
import { cwd } from "node:process";
|
|
4
|
-
import {
|
|
3
|
+
import { existsSync, promises as fsPromises } from "node:fs";
|
|
5
4
|
|
|
6
5
|
import { vuelessConfig } from "./vuelessConfig.js";
|
|
6
|
+
|
|
7
7
|
import { COMPONENTS, VUELESS_DIR, VUELESS_LOCAL_DIR, STORYBOOK_DIR } from "../../constants.js";
|
|
8
8
|
|
|
9
|
+
export async function hideHiddenStories(isVuelessEnv) {
|
|
10
|
+
const srcDir = isVuelessEnv ? VUELESS_LOCAL_DIR : VUELESS_DIR;
|
|
11
|
+
|
|
12
|
+
for await (const [componentName, componentDir] of Object.entries(COMPONENTS)) {
|
|
13
|
+
const componentGlobalConfig = vuelessConfig.components?.[componentName];
|
|
14
|
+
const isHiddenStories = componentGlobalConfig && componentGlobalConfig.storybook === false;
|
|
15
|
+
|
|
16
|
+
if (isHiddenStories) {
|
|
17
|
+
await hideComponentStories(path.join(cwd(), srcDir, componentDir, STORYBOOK_DIR));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export async function showHiddenStories(isVuelessEnv) {
|
|
23
|
+
if (typeof window !== "undefined") return;
|
|
24
|
+
const srcDir = isVuelessEnv ? VUELESS_LOCAL_DIR : VUELESS_DIR;
|
|
25
|
+
|
|
26
|
+
for await (const componentDir of Object.values(COMPONENTS)) {
|
|
27
|
+
await showComponentStories(path.join(cwd(), srcDir, componentDir, STORYBOOK_DIR));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
9
31
|
async function hideComponentStories(storybookPath) {
|
|
10
32
|
if (existsSync(storybookPath)) {
|
|
11
|
-
const storyFiles = await readdir(storybookPath);
|
|
33
|
+
const storyFiles = await fsPromises.readdir(storybookPath);
|
|
12
34
|
const visibleFiles = storyFiles.filter((storybookFile) => !storybookFile.includes("hidden"));
|
|
13
35
|
|
|
14
36
|
await Promise.all(
|
|
15
37
|
visibleFiles.map((storybookFile) => {
|
|
16
38
|
const [fileName, extension] = storybookFile.split(".");
|
|
17
39
|
|
|
18
|
-
return rename(
|
|
40
|
+
return fsPromises.rename(
|
|
19
41
|
path.join(storybookPath, storybookFile),
|
|
20
42
|
path.join(storybookPath, `${fileName}_hidden.${extension}`),
|
|
21
43
|
);
|
|
@@ -26,7 +48,7 @@ async function hideComponentStories(storybookPath) {
|
|
|
26
48
|
|
|
27
49
|
async function showComponentStories(storybookPath) {
|
|
28
50
|
if (existsSync(storybookPath)) {
|
|
29
|
-
const storyFiles = await readdir(storybookPath);
|
|
51
|
+
const storyFiles = await fsPromises.readdir(storybookPath);
|
|
30
52
|
const hiddenFiles = storyFiles.filter((storybookFile) => storybookFile.includes("hidden"));
|
|
31
53
|
|
|
32
54
|
await Promise.all(
|
|
@@ -34,7 +56,7 @@ async function showComponentStories(storybookPath) {
|
|
|
34
56
|
const [fileName, extension] = storybookFile.split(".");
|
|
35
57
|
const [originalFileName] = fileName.split("_");
|
|
36
58
|
|
|
37
|
-
return rename(
|
|
59
|
+
return fsPromises.rename(
|
|
38
60
|
path.join(storybookPath, storybookFile),
|
|
39
61
|
path.join(storybookPath, `${originalFileName}.${extension}`),
|
|
40
62
|
);
|
|
@@ -42,24 +64,3 @@ async function showComponentStories(storybookPath) {
|
|
|
42
64
|
);
|
|
43
65
|
}
|
|
44
66
|
}
|
|
45
|
-
|
|
46
|
-
export async function hideHiddenStories(isVuelessEnv) {
|
|
47
|
-
const srcDir = isVuelessEnv ? VUELESS_LOCAL_DIR : VUELESS_DIR;
|
|
48
|
-
|
|
49
|
-
for await (const [componentName, componentDir] of Object.entries(COMPONENTS)) {
|
|
50
|
-
const componentGlobalConfig = vuelessConfig.components?.[componentName];
|
|
51
|
-
const isHiddenStories = componentGlobalConfig && componentGlobalConfig.storybook === false;
|
|
52
|
-
|
|
53
|
-
if (isHiddenStories) {
|
|
54
|
-
await hideComponentStories(path.join(cwd(), srcDir, componentDir, STORYBOOK_DIR));
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export async function showHiddenStories(isVuelessEnv) {
|
|
60
|
-
const srcDir = isVuelessEnv ? VUELESS_LOCAL_DIR : VUELESS_DIR;
|
|
61
|
-
|
|
62
|
-
for await (const componentDir of Object.values(COMPONENTS)) {
|
|
63
|
-
await showComponentStories(path.join(cwd(), srcDir, componentDir, STORYBOOK_DIR));
|
|
64
|
-
}
|
|
65
|
-
}
|
package/utils/node/helper.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { statSync, existsSync } from "fs";
|
|
3
|
-
import { readdir } from "node:fs/promises";
|
|
4
|
-
import { cwd } from "node:process";
|
|
5
1
|
import esbuild from "esbuild";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { cwd } from "node:process";
|
|
4
|
+
import { statSync, existsSync, promises as fsPromises } from "node:fs";
|
|
6
5
|
|
|
7
6
|
import { VUELESS_CONFIGS_CACHED_DIR } from "../../constants.js";
|
|
8
7
|
|
|
@@ -15,7 +14,7 @@ export async function getDirFiles(dirPath, ext, { recursive = true, exclude = []
|
|
|
15
14
|
};
|
|
16
15
|
|
|
17
16
|
try {
|
|
18
|
-
fileNames = await readdir(dirPath, { recursive });
|
|
17
|
+
fileNames = await fsPromises.readdir(dirPath, { recursive });
|
|
19
18
|
} catch (error) {
|
|
20
19
|
if (error.code === ERROR_CODE.dirIsFile) {
|
|
21
20
|
const pathArray = dirPath.split(path.sep);
|