@synopackageland/ui 0.19.1 → 0.19.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.19.3 (2026-11-02)
4
+
5
+ - Fix the library's own text (a `SettingsPage` footer's Reset and Apply, Close, pagination, validation) showing English in an App that names its language only on `AppRoot`'s `lang` or not at all. `AppRoot` takes a `locale` prop and otherwise reads its `lang` attribute; with neither, and no `ConfigProvider locale` above, the text follows DSM's language in a DSM window, then the browser's, then English. `toUiLocale()` and `detectUiLocale()` map DSM codes (`cht`, `jpn`, …) and BCP-47 tags.
6
+ - Fix a `SettingsPage` footer in a page with gutters (`PageContent`, an App shell) drawn as a box inset by the gutter: it now reaches both edges of the content area as DSM's footer does, its buttons on the content's right edge. `PageContent` sets `--ui-page-gutter-x` for this.
7
+ - Library text in every language ends without a closing period (Version 2.0.0 is available, Could not check for updates, FilePicker's rejections); periods between sentences stay.
8
+
9
+ ## 0.19.2 (2026-11-01)
10
+
11
+ - Fix `FacetPanel` values showing no box until picked: a filter list read as blank space beside its labels. Every value now shows the Checkbox's box, empty until picked and ticked once picked, in the panel and in the phone sheet.
12
+ - `DataTable` columns resize: drag a header's right edge or press Left/Right on it, never below the column's `minWidth`. `state-key` remembers the widths in this browser and `v-model:column-widths` binds them; `:resizable="false"` (or `resizable: false` on a column) turns it off.
13
+
3
14
  ## 0.19.1 (2026-11-01)
4
15
 
5
16
  - Fix the hand cursor and hover wash blinking when the pointer rests between two `AppSidebar` rows, top navigation items, `Tabs` or `SegmentControl` segments that a theme spaces apart. These rows now carry `data-ui-hit-row`, whose invisible `::after` makes the room up to the next row (`--ui-hit-row-slop`, 6px) part of the row; nothing is drawn and nothing moves ([theme hooks](docs/theme-hooks.md#hover-hit-areas)).
package/README.md CHANGED
@@ -188,6 +188,11 @@ Inside `AppRoot`, a nested `ConfigProvider` (for `dir` or `locale`) must pass
188
188
  the same `teleport-to`, and your own `<Teleport>`s must target an element inside
189
189
  the root.
190
190
 
191
+ The library's own text (Reset, Apply, Close, …) follows `AppRoot`'s `locale`
192
+ prop, else its `lang` attribute (`<AppRoot :lang="locale">`), else a
193
+ `ConfigProvider locale` above it, else DSM's language in a DSM window, then the
194
+ browser's. Pass the language your App shows so both read alike.
195
+
191
196
  Theme overrides go on your own app root, after the library stylesheet. Use a
192
197
  package-specific selector, so an override does not also match other apps:
193
198
 
@@ -774,6 +779,16 @@ column chooser, column reorder, resize, quick filter, paging and saved view
774
779
  state. `DataTable` stays the small read-only table that becomes cards on a
775
780
  phone; use `DataGrid` for anything a user searches or arranges.
776
781
 
782
+ `DataTable` columns resize too: drag the right edge of a header, or focus it
783
+ and press the left/right arrows (10px). The first resize fixes every column at
784
+ the width it shows and an empty filler column takes the rest, so the table
785
+ still fills its box and scrolls sideways once the columns outgrow it. A column
786
+ never goes below its `minWidth` (40px with a `width`, 80px without).
787
+ `state-key` remembers the widths in this browser (put the signed-in user in
788
+ the key to keep them per viewer); `v-model:column-widths` keeps them
789
+ yourself. `:resizable="false"` turns it off for the table, `resizable: false`
790
+ for one column.
791
+
777
792
  ```vue
778
793
  <SearchField v-model="filter" variant="filter" />
779
794
  <DataGrid
@@ -1,3 +1,4 @@
1
+ import { UiLocale } from '../../../i18n/locale';
1
2
  type __VLS_Props = {
2
3
  modalScope?: 'document' | 'app';
3
4
  /**
@@ -18,6 +19,12 @@ type __VLS_Props = {
18
19
  * `<html>` instead, but then passes `dark` here too when it sets an accent.
19
20
  */
20
21
  colorScheme?: 'light' | 'dark';
22
+ /**
23
+ * The language of the library's own text (Reset, Apply, Close, ...). Without
24
+ * it the root's `lang` attribute names it, then an enclosing ConfigProvider,
25
+ * then DSM's language in a DSM window, then the browser's.
26
+ */
27
+ locale?: UiLocale;
21
28
  };
22
29
  declare var __VLS_7: {}, __VLS_9: {};
23
30
  type __VLS_Slots = {} & {
@@ -233,10 +233,10 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
233
233
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
234
234
  refresh: () => any;
235
235
  "update:pageSize": (value: number) => any;
236
+ "update:columnWidths": (value: DataGridColumnWidths) => any;
236
237
  "update:sort": (value: DataGridSort | null) => any;
237
238
  "update:selectedKeys": (value: string[]) => any;
238
239
  "update:page": (value: number) => any;
239
- "update:columnWidths": (value: DataGridColumnWidths) => any;
240
240
  "update:columnOrder": (value: string[]) => any;
241
241
  "update:hiddenColumns": (value: string[]) => any;
242
242
  "update:rows": (value: Record<string, unknown>[]) => any;
@@ -266,10 +266,10 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
266
266
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
267
267
  onRefresh?: (() => any) | undefined;
268
268
  "onUpdate:pageSize"?: ((value: number) => any) | undefined;
269
+ "onUpdate:columnWidths"?: ((value: DataGridColumnWidths) => any) | undefined;
269
270
  "onUpdate:sort"?: ((value: DataGridSort | null) => any) | undefined;
270
271
  "onUpdate:selectedKeys"?: ((value: string[]) => any) | undefined;
271
272
  "onUpdate:page"?: ((value: number) => any) | undefined;
272
- "onUpdate:columnWidths"?: ((value: DataGridColumnWidths) => any) | undefined;
273
273
  "onUpdate:columnOrder"?: ((value: string[]) => any) | undefined;
274
274
  "onUpdate:hiddenColumns"?: ((value: string[]) => any) | undefined;
275
275
  "onUpdate:rows"?: ((value: Record<string, unknown>[]) => any) | undefined;
@@ -297,10 +297,10 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
297
297
  }) => any) | undefined;
298
298
  onCellUpdate?: ((value: DataGridCellUpdate) => any) | undefined;
299
299
  }>, {
300
- footer: boolean;
301
- filter: string;
302
300
  sort: DataGridSort | null;
301
+ filter: string;
303
302
  fill: boolean;
303
+ footer: boolean;
304
304
  loading: boolean;
305
305
  group: DataGridGroup | null;
306
306
  loadingText: string;
@@ -308,9 +308,10 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
308
308
  page: number;
309
309
  pageSize: number;
310
310
  selectable: boolean;
311
- rowKey: string;
312
311
  columnOrder: string[];
313
312
  hiddenColumns: string[];
313
+ rowKey: string;
314
+ resizable: boolean;
314
315
  defaultSort: DataGridSort | null;
315
316
  selectedKeys: string[];
316
317
  selectOnRowClick: boolean;
@@ -323,7 +324,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
323
324
  localPagination: boolean;
324
325
  loadingRows: number;
325
326
  stickyHeader: boolean;
326
- resizable: boolean;
327
327
  columnChooser: boolean;
328
328
  columnReorder: boolean;
329
329
  refreshable: boolean;
@@ -7,6 +7,10 @@ export type DataTableColumn = {
7
7
  type?: TableColumnType;
8
8
  /** Overrides the alignment the type sets. */
9
9
  align?: TableColumnAlign;
10
+ /** The narrowest a drag can make it, in px; defaults to 40, or 80 without a `width`. */
11
+ minWidth?: string | number;
12
+ /** Overrides the table's `resizable` for this column. */
13
+ resizable?: boolean;
10
14
  };
11
15
  type __VLS_Props = {
12
16
  columns: DataTableColumn[];
@@ -24,6 +28,12 @@ type __VLS_Props = {
24
28
  * rows, for a short table inside a form or a dialog.
25
29
  */
26
30
  fill?: boolean;
31
+ /** Drag a header's right edge (or press Left/Right on it) to resize the column. `false` turns it off. */
32
+ resizable?: boolean;
33
+ /** Column widths in px, by column key; bind to keep them yourself. */
34
+ columnWidths?: Record<string, number>;
35
+ /** Remembers the user's column widths in this browser under this key. */
36
+ stateKey?: string;
27
37
  };
28
38
  declare var __VLS_2: `cell-${string}`, __VLS_3: {
29
39
  row: Record<string, unknown>;
@@ -45,12 +55,19 @@ type __VLS_Slots = {} & {
45
55
  } & {
46
56
  [K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any;
47
57
  };
48
- declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
58
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
59
+ "update:columnWidths": (value: Record<string, number>) => any;
60
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
61
+ "onUpdate:columnWidths"?: ((value: Record<string, number>) => any) | undefined;
62
+ }>, {
49
63
  fill: boolean;
50
64
  compact: boolean;
65
+ columnWidths: Record<string, number>;
51
66
  rowKey: string;
52
67
  mobileView: "auto" | "cards" | "table" | "container";
53
68
  containerBreakpoint: number;
69
+ resizable: boolean;
70
+ stateKey: string;
54
71
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
55
72
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
56
73
  declare const _default: typeof __VLS_export;
@@ -1,6 +1,15 @@
1
1
  import { ComputedRef, InjectionKey } from 'vue';
2
2
  export type UiLocale = 'en' | 'zh-TW' | 'zh-CN' | 'ja' | 'ko' | 'de' | 'fr' | 'es' | 'it';
3
+ export declare const UI_LOCALES: readonly UiLocale[];
3
4
  export declare const UI_LOCALE_KEY: InjectionKey<ComputedRef<UiLocale>>;
5
+ /** The built-in locale for a DSM language code or a BCP-47 tag, or undefined
6
+ * when the library has no text for it. Chinese without a region reads as
7
+ * Traditional only for Taiwan, Hong Kong and Macau scripts and regions. */
8
+ export declare function toUiLocale(tag: string | null | undefined): UiLocale | undefined;
9
+ /** The language the page runs in when no AppRoot or ConfigProvider names one:
10
+ * DSM's language in a DSM window (DSM reloads the window when it changes),
11
+ * else the browser's, else English. */
12
+ export declare function detectUiLocale(): UiLocale;
4
13
  export declare function useUiLocale(own: () => UiLocale | undefined): ComputedRef<UiLocale>;
5
14
  /** Named placeholders let applications translate messages without concatenating English. */
6
15
  export declare function formatUiText(template: string, values: Record<string, string | number>): string;
@@ -156,15 +156,15 @@ export declare const englishUiText: {
156
156
  readonly "Enter password": "Enter password";
157
157
  readonly "Unsaved changes": "Unsaved changes";
158
158
  readonly "Save your changes before closing?": "Save your changes before closing?";
159
- readonly "The value is not valid.": "The value is not valid.";
159
+ readonly "The value is not valid.": "The value is not valid";
160
160
  readonly "About this application": "About this application";
161
161
  readonly BETA: "BETA";
162
162
  readonly "Version {version}": "Version {version}";
163
163
  readonly "Checking for updates\u2026": "Checking for updates…";
164
- readonly "Version {version} is available.": "Version {version} is available.";
165
- readonly "Beta version {version} is available.": "Beta version {version} is available.";
166
- readonly "Could not check for updates.": "Could not check for updates.";
167
- readonly "You have the latest version.": "You have the latest version.";
164
+ readonly "Version {version} is available.": "Version {version} is available";
165
+ readonly "Beta version {version} is available.": "Beta version {version} is available";
166
+ readonly "Could not check for updates.": "Could not check for updates";
167
+ readonly "You have the latest version.": "You have the latest version";
168
168
  readonly "Could not refresh. Showing previous data": "Could not refresh. Showing previous data";
169
169
  readonly Retry: "Retry";
170
170
  readonly "Release notes": "Release notes";
@@ -225,7 +225,7 @@ export declare const englishUiText: {
225
225
  readonly "Copy path": "Copy path";
226
226
  readonly "Path: {path}": "Path: {path}";
227
227
  readonly Copied: "Copied";
228
- readonly "Couldn't copy. Select the text and copy it manually.": "Couldn't copy. Select the text and copy it manually.";
228
+ readonly "Couldn't copy. Select the text and copy it manually.": "Couldn't copy. Select the text and copy it manually";
229
229
  readonly "Couldn't copy": "Couldn't copy";
230
230
  readonly "Clear filters": "Clear filters";
231
231
  readonly Filters: "Filters";
package/dist/index.d.ts CHANGED
@@ -265,6 +265,7 @@ export { default as OverflowToolbar } from './components/composite/overflow-tool
265
265
  export { computeOverflowFit, ITEM_GAP } from './components/composite/overflow-toolbar/overflow';
266
266
  export type { OverflowToolbarItem, OverflowToolbarMenuEntry, OverflowToolbarMoreMenu, OverflowToolbarMoreState, OverflowToolbarMoreText, } from './components/composite/overflow-toolbar/types';
267
267
  export type { UiLocale } from './i18n/locale';
268
+ export { detectUiLocale, toUiLocale, UI_LOCALES } from './i18n/locale';
268
269
  export { useUiText } from './i18n/text';
269
270
  export type { UiTextKey } from './i18n/text';
270
271
  export { filePickerText } from './i18n/filePicker';