vueless 0.0.437 → 0.0.439
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/constants.js +2 -1
- package/package.json +2 -2
- package/preset.tailwind.js +1 -1
- package/ui.button-link/storybook/stories.js +1 -2
- package/ui.data-table/UTableRow.vue +22 -2
- package/web-types.json +1 -1
package/constants.js
CHANGED
|
@@ -5,7 +5,8 @@ export const COOL_COLOR = "cool";
|
|
|
5
5
|
export const GRAYSCALE_COLOR = "grayscale";
|
|
6
6
|
|
|
7
7
|
/* Vueless dark mode */
|
|
8
|
-
export const DARK_MODE_SELECTOR = "vl-dark
|
|
8
|
+
export const DARK_MODE_SELECTOR = "vl-dark";
|
|
9
|
+
export const LIGHT_MODE_SELECTOR = "vl-light";
|
|
9
10
|
|
|
10
11
|
/* Vueless defaults */
|
|
11
12
|
export const DEFAULT_BRAND_COLOR = GRAYSCALE_COLOR;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vueless",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.439",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
|
|
6
6
|
"keywords": [
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
55
55
|
"@vue/eslint-config-prettier": "^9.0.0",
|
|
56
56
|
"@vueless/plugin-vite": "^0.0.74",
|
|
57
|
-
"@vueless/storybook": "^0.0.
|
|
57
|
+
"@vueless/storybook": "^0.0.37",
|
|
58
58
|
"@vueless/web-types": "^0.0.17",
|
|
59
59
|
"autoprefixer": "^10.4.19",
|
|
60
60
|
"cssnano": "^6.1.2",
|
package/preset.tailwind.js
CHANGED
|
@@ -57,7 +57,7 @@ const brandColors = getPalette(BRAND_COLOR);
|
|
|
57
57
|
const grayColors = getPalette(GRAY_COLOR);
|
|
58
58
|
|
|
59
59
|
export const vuelessTailwindConfig = {
|
|
60
|
-
darkMode: DARK_MODE_SELECTOR,
|
|
60
|
+
darkMode: ["selector", `[class="${DARK_MODE_SELECTOR}"]`],
|
|
61
61
|
content: [...vuelessContent, ...vuelessContentVue, ...vuelessContentNuxt],
|
|
62
62
|
theme: {
|
|
63
63
|
extend: {
|
|
@@ -17,7 +17,6 @@ export default {
|
|
|
17
17
|
},
|
|
18
18
|
argTypes: {
|
|
19
19
|
...getArgTypes(ULink.__name),
|
|
20
|
-
route: { control: { type: "text" } },
|
|
21
20
|
},
|
|
22
21
|
};
|
|
23
22
|
|
|
@@ -85,7 +84,7 @@ export const Href = DefaultTemplate.bind({});
|
|
|
85
84
|
Href.args = { href: "https://storybook.js.org/docs/react/get-started/introduction" };
|
|
86
85
|
|
|
87
86
|
export const Route = DefaultTemplate.bind({});
|
|
88
|
-
Route.args = { name: "
|
|
87
|
+
Route.args = { name: "routerName" };
|
|
89
88
|
|
|
90
89
|
export const TargetBlank = DefaultTemplate.bind({});
|
|
91
90
|
TargetBlank.args = {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
v-bind="bodyCellNestedAttrs"
|
|
33
33
|
>
|
|
34
34
|
<UIcon
|
|
35
|
-
v-if="
|
|
35
|
+
v-if="isShownToggleIcon"
|
|
36
36
|
size="xs"
|
|
37
37
|
internal
|
|
38
38
|
interactive
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
</template>
|
|
148
148
|
|
|
149
149
|
<script setup>
|
|
150
|
-
import { computed, onMounted, ref } from "vue";
|
|
150
|
+
import { computed, onMounted, ref, useSlots } from "vue";
|
|
151
151
|
import { cx } from "../utils/utilUI.js";
|
|
152
152
|
import useUI from "../composables/useUI.js";
|
|
153
153
|
|
|
@@ -208,6 +208,7 @@ const emit = defineEmits(["toggleRowVisibility", "click", "click-cell"]);
|
|
|
208
208
|
const selectedRows = defineModel("selectedRows", { type: Array, default: () => [] });
|
|
209
209
|
|
|
210
210
|
const cellRef = ref([]);
|
|
211
|
+
const slots = useSlots();
|
|
211
212
|
|
|
212
213
|
useMutationObserver(cellRef, setCellTitle, { childList: true });
|
|
213
214
|
|
|
@@ -231,6 +232,25 @@ const shift = computed(() => (props.row.row ? 1.5 : 2));
|
|
|
231
232
|
|
|
232
233
|
const isSingleNestedRow = computed(() => !Array.isArray(props.row.row));
|
|
233
234
|
|
|
235
|
+
const isNestedRowEmpty = computed(() => {
|
|
236
|
+
if (!props.row.row) return true;
|
|
237
|
+
|
|
238
|
+
if (Array.isArray(props.row.row)) {
|
|
239
|
+
return props.row.row.some(
|
|
240
|
+
(nestedRow) => !Object.keys(getFilteredRow(nestedRow, props.columns)).length,
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
return !Object.keys(getFilteredRow(props.row.row, props.columns)).length;
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
const isShownToggleIcon = computed(() => {
|
|
248
|
+
return (
|
|
249
|
+
(props.row.row && !isNestedRowEmpty.value) ||
|
|
250
|
+
(props.row.nestedData && hasSlotContent(slots["nested-content"]))
|
|
251
|
+
);
|
|
252
|
+
});
|
|
253
|
+
|
|
234
254
|
const getToggleIconName = computed(() => (row) => {
|
|
235
255
|
const isHiddenNestedRow = Array.isArray(row.row)
|
|
236
256
|
? row.row.some((nestedRow) => nestedRow.isHidden)
|