@bridge-ui/vue 0.17.0 → 0.17.2
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/Components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/Components/Chart/composables/useChart.js +16 -14
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +78 -86
- package/dist/Components/DataTable/DataTableSortButton.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/Components/DataTable/composables/useDataTable.d.ts +3 -2
- package/dist/Components/DataTable/composables/useDataTable.js +301 -313
- package/dist/Components/DataTable/dataTable.types.d.ts +12 -0
- package/dist/Utils/LoadingSpin.js +5 -0
- package/dist/Utils/LoadingSpin.vue.d.ts +3 -0
- package/dist/Utils/LoadingSpin.vue_vue_type_script_setup_true_lang.js +21 -0
- package/docs/components/Chart.md +3 -1
- package/docs/components/DataTable.md +2 -0
- package/package.json +3 -3
|
@@ -54,6 +54,11 @@ export interface DataTableClasses {
|
|
|
54
54
|
* Classes merged onto the footer region below the table.
|
|
55
55
|
*/
|
|
56
56
|
footer?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Classes merged onto the chrome footer container (the size query container
|
|
59
|
+
* that wraps selection, per-page, and pager).
|
|
60
|
+
*/
|
|
61
|
+
footerBar?: string;
|
|
57
62
|
/**
|
|
58
63
|
* Classes merged onto header cells.
|
|
59
64
|
*/
|
|
@@ -140,6 +145,13 @@ export interface DataTableCustomProps {
|
|
|
140
145
|
* @default undefined
|
|
141
146
|
*/
|
|
142
147
|
footer?: HTMLAttributes;
|
|
148
|
+
/**
|
|
149
|
+
* Props forwarded to the chrome footer container (the size query container
|
|
150
|
+
* that wraps selection, per-page, and pager).
|
|
151
|
+
*
|
|
152
|
+
* @default undefined
|
|
153
|
+
*/
|
|
154
|
+
footerBar?: HTMLAttributes;
|
|
143
155
|
/**
|
|
144
156
|
* Props forwarded to header cells.
|
|
145
157
|
*
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useResolveMessage as e } from "../Adapters/I18n/useI18nAdapter.js";
|
|
2
|
+
import { createElementBlock as t, createElementVNode as n, defineComponent as r, openBlock as i, unref as a } from "vue";
|
|
3
|
+
//#region src/Utils/LoadingSpin.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var o = ["aria-label"], s = /*@__PURE__*/ r({
|
|
5
|
+
__name: "LoadingSpin",
|
|
6
|
+
setup(r) {
|
|
7
|
+
let s = e();
|
|
8
|
+
return (e, r) => (i(), t("span", {
|
|
9
|
+
role: "status",
|
|
10
|
+
"aria-label": a(s)("Loading"),
|
|
11
|
+
class: "relative inline-block size-5 animate-spin motion-reduce:animate-none"
|
|
12
|
+
}, [...r[0] ||= [
|
|
13
|
+
n("span", { class: "absolute inset-s-0 top-0 size-2 rounded-full bg-primary-500 opacity-30 dark:bg-primary-400" }, null, -1),
|
|
14
|
+
n("span", { class: "absolute inset-e-0 top-0 size-2 rounded-full bg-primary-500 opacity-50 dark:bg-primary-400" }, null, -1),
|
|
15
|
+
n("span", { class: "absolute inset-e-0 bottom-0 size-2 rounded-full bg-primary-500 dark:bg-primary-400" }, null, -1),
|
|
16
|
+
n("span", { class: "absolute inset-s-0 bottom-0 size-2 rounded-full bg-primary-500 opacity-70 dark:bg-primary-400" }, null, -1)
|
|
17
|
+
]], 8, o));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { s as default };
|
package/docs/components/Chart.md
CHANGED
|
@@ -125,6 +125,8 @@ Legend entries are toggle buttons: click to hide or show a series, hover or focu
|
|
|
125
125
|
|
|
126
126
|
### Loading and empty
|
|
127
127
|
|
|
128
|
+
While `loading` is true, the plot stays visible behind a translucent overlay with a spinner, and the root gets `aria-busy`. Use the `loading` slot to replace the spinner.
|
|
129
|
+
|
|
128
130
|
```vue
|
|
129
131
|
<Chart :loading="isLoading" :categories="months">
|
|
130
132
|
<ChartSeries name="Revenue" :data="revenue" />
|
|
@@ -189,7 +191,7 @@ Theme tokens (`Chart.tokens.theme`) set the grid, axis, and label colors as Tail
|
|
|
189
191
|
| `categories` | `string[]` | required | Category labels; one value per category per series. |
|
|
190
192
|
| `classes` | `ChartClasses` | — | `root`, `plot`, `loading`, `empty`, `table`. |
|
|
191
193
|
| `height` | `number \| string` | `280` | Plot height. |
|
|
192
|
-
| `loading` | `boolean` | `false` | Shows the
|
|
194
|
+
| `loading` | `boolean` | `false` | Shows the spinner overlay. |
|
|
193
195
|
| `palette` | `ChartSeriesColor[]` | primary, info, success … | Series colors in order. |
|
|
194
196
|
| `size` | `ChartSize` | `"md"` | Density of labels, legend, and tooltip. |
|
|
195
197
|
| `summary` | `string` | generated | Accessible description of the plot. |
|
|
@@ -60,6 +60,8 @@ DataTable chrome (`plain` / `ghost` / `bordered`). The built-in footer pager is
|
|
|
60
60
|
|
|
61
61
|
### Selection + pagination
|
|
62
62
|
|
|
63
|
+
The chrome footer stacks its controls in a narrow table and puts them on one row from the footer width up: 32rem with two controls, 42rem with all three. Footer width is read with a CSS container query, so the server render matches the client. A control that still does not fit wraps to the next row, aligned to the end. `classes.footerBar` and `customProps.footerBar` target the footer container; `classes.pagination` targets the row of controls.
|
|
64
|
+
|
|
63
65
|
The chrome footer shows a selection summary when `selection` is bound, a per-page Select when `per-page` is set (`per-page-options`, default 10 / 25 / 50 / 100), and a first / previous / next / last pager when `page` is set with `page-count` or `total-count` (server fetch stays in the app). `page` + `per-page` without those totals slices `rows` locally. `#selected`, `#pagination`, and `#perPage` replace each control:
|
|
64
66
|
|
|
65
67
|
```vue
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.17.
|
|
4
|
+
"version": "0.17.2",
|
|
5
5
|
"author": "BridgeUI",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"name": "@bridge-ui/vue",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
|
-
"@bridge-ui/core": "^0.17.
|
|
112
|
+
"@bridge-ui/core": "^0.17.2",
|
|
113
113
|
"@tailwindcss/typography": "^0.5.20",
|
|
114
114
|
"clsx": "^2.1.1",
|
|
115
115
|
"es-toolkit": "^1.52.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"@tiptap/extension-placeholder": "^3.31.3",
|
|
135
135
|
"@tiptap/pm": "^3.31.3",
|
|
136
136
|
"@tiptap/starter-kit": "^3.31.3",
|
|
137
|
-
"@types/node": "^
|
|
137
|
+
"@types/node": "^24.19.1",
|
|
138
138
|
"@vue/language-core": "^3.3.11",
|
|
139
139
|
"@vue/test-utils": "^2.5.1",
|
|
140
140
|
"echarts": "^6.1.0",
|