@webx-ui/core 0.37.0 → 0.38.0

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.
@@ -42,6 +42,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
42
42
  seconds: boolean;
43
43
  minutesIncrement: number;
44
44
  is24: boolean;
45
+ timezone: string;
45
46
  weekStart: number;
46
47
  autoApply: boolean;
47
48
  textInput: boolean;
@@ -30,6 +30,16 @@ export interface DatePickerProps {
30
30
  * `provideDateLocale`, then to the browser's own language.
31
31
  */
32
32
  locale?: string | DateFnsLocale;
33
+ /**
34
+ * The IANA zone a moment is shown and picked in, e.g. `'Asia/Hong_Kong'`: the field reads
35
+ * the wall clock of that zone whatever the reader's machine is set to, and the value goes
36
+ * back with that zone's offset. Applies only when `valueFormat` carries an offset (`XXX`,
37
+ * `xxx`) — a value without one is a wall clock already and has no zone to move between.
38
+ * Defaults to what the application provided with `provideDateTimezone`, then to the
39
+ * reader's own zone. Under the default display format, a time is followed by the zone's
40
+ * offset whenever it is not the reader's.
41
+ */
42
+ timezone?: string;
33
43
  /** First day of the week: 0 is Sunday, 1 is Monday. */
34
44
  weekStart?: number;
35
45
  /** Apply the value as soon as it is picked, with no confirm button. */
@@ -175,6 +175,8 @@ export interface TableProps<T = TableRow> {
175
175
  /** How long typing settles before `search` fires. Zero reports every keystroke. */
176
176
  searchDebounce?: number;
177
177
  loading?: boolean;
178
+ /** The words beside the spinner while `loading`; English by default, translated by the caller. */
179
+ loadingText?: string;
178
180
  /** Shown in place of the rows when there are none. */
179
181
  emptyText?: string;
180
182
  /** Accessible name of each row's checkbox. */
@@ -0,0 +1,26 @@
1
+ import { ComputedRef, InjectionKey, Ref } from 'vue';
2
+ /** An IANA zone such as `'Asia/Hong_Kong'`, or something that reads one — or nothing yet. */
3
+ export type DateTimezoneSource = string | Ref<string | null | undefined> | ComputedRef<string | null | undefined>;
4
+ /**
5
+ * The zone every date picker below shows and takes a *moment* in.
6
+ *
7
+ * A moment travels with its offset (`2026-10-12T09:30:00+08:00`), and without a zone the
8
+ * picker draws it on the reader's own clock: an event at half past nine in Hong Kong reads
9
+ * 04:30 to an editor in Moscow, and whatever they pick goes back with Moscow's offset. A site
10
+ * has one clock — the one its events, opening hours and publication times are written in — so
11
+ * a panel provides that zone here and every picker of a moment follows it. A `timezone` prop on
12
+ * the picker still wins over what is provided.
13
+ */
14
+ export declare const dateTimezoneKey: InjectionKey<DateTimezoneSource>;
15
+ /**
16
+ * Tells every date picker below which zone a moment is shown and entered in.
17
+ *
18
+ * ```ts
19
+ * app.provide(dateTimezoneKey, computed(() => manifest.value?.timezone))
20
+ * ```
21
+ */
22
+ export declare function provideDateTimezone(timezone: DateTimezoneSource): void;
23
+ /** The zone: the `timezone` prop, then the application's, then none — the reader's own. */
24
+ export declare function useDateTimezone(timezone: () => string | undefined): ComputedRef<string | undefined>;
25
+ /** The zone this browser keeps its clock in, or an empty string where it will not say. */
26
+ export declare function readersTimezone(): string;
@@ -58,6 +58,11 @@ export interface ChoiceGroupContext<T> {
58
58
  disabled: ComputedRef<boolean>;
59
59
  size: ComputedRef<ControlSize>;
60
60
  toggle: (value: ChoiceValue, checked: boolean) => void;
61
+ /**
62
+ * Whether one choice cannot be changed right now — a box left unchecked once a group holds its
63
+ * `max`, a checked one at its `min`. Drawn disabled, rather than a click that does nothing.
64
+ */
65
+ locked?: (value: ChoiceValue) => boolean;
61
66
  }
62
67
  export declare const checkboxGroupKey: InjectionKey<ChoiceGroupContext<ChoiceValue[]>>;
63
68
  export declare const radioGroupKey: InjectionKey<ChoiceGroupContext<ChoiceValue | undefined>>;
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export type { ControlSize, ControlStatus, ValidationErrors } from './composables
4
4
  export { useControlAttrs, type ControlAttrs } from './composables/useControlAttrs';
5
5
  export { provideLocales, useLocales, useLocalized, localeLabel, localizedValue, localesKey, type LocaleOption, type LocalesContext, type LocalizedValue, type LocalizedFieldProps, } from './composables/useLocalized';
6
6
  export { provideDateLocale, useDateLocale, dateLocaleKey, type DateLocaleSource, } from './composables/useDateLocale';
7
+ export { provideDateTimezone, useDateTimezone, dateTimezoneKey, type DateTimezoneSource, } from './composables/useDateTimezone';
7
8
  export type { DateFnsLocale } from './internal/dateLocale';
8
9
  export { useElementWidth } from './composables/useElementWidth';
9
10
  export { useHoverPointer } from './composables/useHoverPointer';