@xleddyl/443-components-vue 0.16.32 → 0.16.34

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/CATALOG.md CHANGED
@@ -336,7 +336,7 @@ All are exported from `@xleddyl/443-components-vue` and auto-imported in Nuxt.
336
336
  | `toast` / `useToast` | Toasts. | `toast(title, opts)`, `toast.success`, `.error`, `.warning`, `.info`, `.loading`, `.promise(promise, { loading, success, error })`, `.update(id, opts)`, `.dismiss(id)`. Options: `description` (string or list), `action` (`label`, `onClick`), `duration`, `dismissible`. | `overlays/toast.vue` |
337
337
  | `useConfirm` | Ask yes or no. Returns a promise of `true` or `false`. | `await useConfirm()({ title, description, tone, confirmLabel, cancelLabel, body })`. Presets: `confirm.delete(title, options?)` (danger, Delete) and `confirm.discard(options?)` (unsaved changes). | `overlays/hooks.vue` |
338
338
  | `useAlert` | Show a message and wait until the user closes it. | `await useAlert()({ title, description, tone })`. | `overlays/hooks.vue` |
339
- | `usePrompt` | Ask for one text value. Returns the string or `null`. | `await usePrompt()({ title, label, value, placeholder, type, required, validate(value), onConfirm(value) })`. | `overlays/hooks.vue` |
339
+ | `usePrompt` | Ask for one text value. Returns the string or `null`. | `await usePrompt()({ title, label, value, placeholder, type, required, maxLength, validate(value), onConfirm(value) })`. | `overlays/hooks.vue` |
340
340
  | `useModal`, `useDrawer`, `useOverlay` | Open a component as a modal or drawer and await its result. Use it when the content is a component with its own logic. | `const result = await useModal().open(Component, props, { title, size, beforeClose })`. The handle has `id`, `close(result)`, `update(props)`. `useModal().close(id?)`, `closeAll()`. `useOverlay` is the base (option `as`). | `overlays/hooks.vue` |
341
341
  | `useModalContext` | Inside a component opened by `useModal` or `useDrawer`: close with a result and set the loading state. | `const { close, setLoading } = useModalContext<R>()`. | `overlays/hooks.vue` |
342
342
  | `useLoading`, `withLoading` | Global loading: top bar after a delay, or a blocking screen. Ref counted. | `useLoading().wrap(promise, { blocking, label })`, `start()` returns a stop function. `withLoading(fn)` wraps a function. Needs `OverlayHost`. | `overlays/hooks.vue` |
package/README.md CHANGED
@@ -535,7 +535,7 @@ await run(() => api.save(form))
535
535
 
536
536
  - Toasts stay clear of an open Drawer: next to a left or right drawer the stack moves beside the panel (by its width) when there is room for it, otherwise it moves above the drawer footer (or below the header for top positions), so the drawer actions stay visible and the toasts stay clickable. The same footer rule applies to a Modal whose footer sits under the toasts (a sheet or a fullscreen modal).
537
537
  - Toasts stack behind the newest one (up to `max`, default 4) and expand on hover or focus, which also pauses their timers. Each tone has its own icon; `description` takes a string or a list of lines. `dismissible: false` hides the close button, `duration: Infinity` keeps a toast open, `progress` on the toaster shows a timer bar.
538
- - `useConfirm()` resolves `true` or `false`, `useAlert()` resolves when closed, `usePrompt()` resolves the string or `null`. `useConfirm()` and `useAlert()` also take `body`, a component rendered under the description (for example a list of the pages that use a file). The body can emit `close` to dismiss the dialog as cancelled, for example when one of its links is clicked. Prompt options: `label`, `placeholder`, `value`, `type`, `required`, `requiredText`, `validate(value)` (return an error message to keep the dialog open), `onConfirm(value)`. Without a host they fall back to the native browser dialogs.
538
+ - `useConfirm()` resolves `true` or `false`, `useAlert()` resolves when closed, `usePrompt()` resolves the string or `null`. `useConfirm()` and `useAlert()` also take `body`, a component rendered under the description (for example a list of the pages that use a file). The body can emit `close` to dismiss the dialog as cancelled, for example when one of its links is clicked. Prompt options: `label`, `placeholder`, `value`, `type`, `required`, `requiredText`, `maxLength`, `validate(value)` (return an error message to keep the dialog open), `onConfirm(value)`. Without a host they fall back to the native browser dialogs.
539
539
  - `modal.open(Component, props, options)` returns a promise for the result plus `id`, `close(result)` and `update(props)`. Options: `title`, `description`, `size`, `side` (drawers), `sheet`, `flush`, `dismissible`, `hideClose`, `closeLabel`, `as: 'modal' | 'drawer'`. Inside the component, `useModalContext<R>()` gives `close(result?)` and `setLoading(boolean)`. A component can open another modal on top; Escape and the backdrop resolve `undefined`. `modal.close(id?, result?)` and `modal.closeAll()` close from outside.
540
540
  - `useLoading()` is ref counted: `start()` returns a stop function, `wrap(promise | fn, options?)` and `withLoading(fn)` stop when settled, `active`, `count` and `blocking` are refs. The host shows a top progress bar after `delay`, and a blocking screen (a modal dialog, so the page is inert) for tasks started with `blocking: true`. `useLoadingState({ global? })` returns a scoped `{ loading, error, run }` for buttons and forms.
541
541
 
@@ -31,6 +31,7 @@
31
31
  v-model="promptValue"
32
32
  :type="current.type ?? 'text'"
33
33
  :placeholder="current.placeholder"
34
+ :maxlength="current.maxLength"
34
35
  :aria-labelledby="current.label ? void 0 : titleId"
35
36
  autofocus
36
37
  @keydown.enter.prevent="dialogRef?.confirm()"
@@ -108,13 +108,7 @@
108
108
  :next-label="text.nextPage"
109
109
  @update:page="goToPage"
110
110
  @update:page-size="(size) => pageSize = size"
111
- >
112
- <template #summary="{ start, end, total }">
113
- <span class="k-tabular">{{
114
- formatLocaleMessage(locale.code, text.pageStatus, { from: start, to: end, total })
115
- }}</span>
116
- </template>
117
- </Pagination>
111
+ />
118
112
  </div>
119
113
  </div>
120
114
  </template>
@@ -125,8 +125,12 @@
125
125
  color: var(--k-text-muted);
126
126
  }
127
127
 
128
+ .k-data-grid-footer-info:empty {
129
+ position: absolute;
130
+ }
131
+
128
132
  .k-data-grid-pager {
129
- margin-inline-start: auto;
133
+ flex: 1;
130
134
  }
131
135
 
132
136
  .k-data-grid .ag-root-wrapper {
@@ -28,6 +28,7 @@ export interface PromptOptions {
28
28
  type?: 'text' | 'email' | 'url' | 'password' | 'search' | 'tel';
29
29
  required?: boolean;
30
30
  requiredText?: string;
31
+ maxLength?: number;
31
32
  validate?: (value: string) => string | false | null | undefined;
32
33
  confirmLabel?: string;
33
34
  cancelLabel?: string;
@@ -92,7 +92,6 @@ export const de = {
92
92
  rowsPerPage: "Zeilen pro Seite",
93
93
  previousPage: "Vorherige Seite",
94
94
  nextPage: "N\xE4chste Seite",
95
- pageStatus: "{from}-{to} von {total}",
96
95
  selected: "{count} ausgew\xE4hlt",
97
96
  copied: "In die Zwischenablage kopiert",
98
97
  yes: "Ja",
@@ -92,7 +92,6 @@ export const en = {
92
92
  rowsPerPage: "Rows per page",
93
93
  previousPage: "Previous page",
94
94
  nextPage: "Next page",
95
- pageStatus: "{from}-{to} of {total}",
96
95
  selected: "{count} selected",
97
96
  copied: "Copied to clipboard",
98
97
  yes: "Yes",
@@ -92,7 +92,6 @@ export const it = {
92
92
  rowsPerPage: "Righe per pagina",
93
93
  previousPage: "Pagina precedente",
94
94
  nextPage: "Pagina successiva",
95
- pageStatus: "{from}-{to} di {total}",
96
95
  selected: "{count} selezionato | {count} selezionati",
97
96
  copied: "Copiato negli appunti",
98
97
  yes: "S\xEC",
@@ -90,7 +90,6 @@ export interface KMessages {
90
90
  rowsPerPage: string;
91
91
  previousPage: string;
92
92
  nextPage: string;
93
- pageStatus: string;
94
93
  selected: string;
95
94
  copied: string;
96
95
  yes: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xleddyl/443-components-vue",
3
- "version": "0.16.32",
3
+ "version": "0.16.34",
4
4
  "description": "Compact, scoped dashboard components for Vue and Nuxt",
5
5
  "license": "MIT",
6
6
  "author": "Edoardo Alberti (https://github.com/xleddyl)",