@wpic/ui 0.9.22 → 0.9.24

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,3 +1,14 @@
1
+ ## 0.9.24
2
+
3
+ - Add accessible mobile bottom sheets with nested overlays, focus restoration and keyboard viewport support.
4
+ - Adapt selects, date ranges and slide panels below 768px; retain desktop popovers.
5
+ - Keep custom date calendars and table pagination within narrow screens and enlarge touch targets.
6
+ - Share body scroll locks across nested overlays and responsive transitions.
7
+
8
+ ## 0.9.23
9
+
10
+ - WTable: support controlled server sorting without reordering the current page locally.
11
+
1
12
  ## 0.9.22
2
13
 
3
14
  - WTag: use text-sm for the default md size; the compact sm size keeps text-xs.
package/COMPONENTS.md CHANGED
@@ -819,3 +819,17 @@ Inline plain-text editing with Tiptap, inheriting the surrounding typography. Pr
819
819
  Use `WSpreadsheet appearance="plain"` for a uniform white surface (dark in dark mode), preserving grid lines and header typography. Pair slotted controls with `WInput variant="plain"` and `WSelect variant="plain"` to avoid nested borders. The default spreadsheet appearance is unchanged.
820
820
 
821
821
  WModal supports `size="screen"` (12px viewport gutters) and `:body-scroll="false"` for content that owns its scroll container.
822
+
823
+
824
+ ## Mobile overlays (0.9.24)
825
+
826
+ `WBottomSheet` accepts `modelValue`, `title`, `closeLabel`, `returnFocus` (an HTMLElement),
827
+ and `noPadding`, with default, header and footer slots. It keeps the header/footer visible,
828
+ traps focus, restores focus to the opener, supports nested overlays, and tracks the visual
829
+ viewport when a phone keyboard opens. Pass localized `title` and `closeLabel` values.
830
+
831
+ Below 768px, `WSelect` and `WDateRangePicker` use bottom sheets. Their new `closeLabel`
832
+ prop localizes the dismissal control. `WPopover` supports opt-in `mobileSheet`, `sheetTitle`
833
+ and `closeLabel`. `WSlidePanel` uses a bottom sheet on mobile by default; set
834
+ `mobileBottom=false` to retain its side presentation. Header/footer slots are preserved.
835
+ Mobile controls and table pagination have larger touch targets; pagination wraps locally.
@@ -0,0 +1,31 @@
1
+ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<{
2
+ returnFocus?: HTMLElement | null;
3
+ modelValue: boolean;
4
+ title?: string;
5
+ closeLabel?: string;
6
+ noPadding?: boolean;
7
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ "update:modelValue": (value: boolean) => any;
9
+ }, string, import('vue').PublicProps, Readonly<{
10
+ returnFocus?: HTMLElement | null;
11
+ modelValue: boolean;
12
+ title?: string;
13
+ closeLabel?: string;
14
+ noPadding?: boolean;
15
+ }> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
17
+ }>, {
18
+ closeLabel: string;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
20
+ header?: (props: {}) => any;
21
+ } & {
22
+ default?: (props: {}) => any;
23
+ } & {
24
+ footer?: (props: {}) => any;
25
+ }>;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -217,8 +217,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
217
217
  modelValue: string;
218
218
  placeholder: string;
219
219
  minWidth: number;
220
- minHeight: number;
220
+ closeLabel: string;
221
221
  zIndex: number;
222
+ minHeight: number;
222
223
  mentionItems: WChatMentionItem[];
223
224
  projects: WChatProject[];
224
225
  sessions: WChatSession[];
@@ -254,7 +255,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
254
255
  thinkingLabel: string;
255
256
  dockLabel: string;
256
257
  undockLabel: string;
257
- closeLabel: string;
258
258
  helpfulLabel: string;
259
259
  notHelpfulLabel: string;
260
260
  attachments: WChatAttachment[];
@@ -9,6 +9,7 @@ interface Preset {
9
9
  label: string;
10
10
  }
11
11
  type __VLS_Props = {
12
+ closeLabel?: string;
12
13
  locale?: string;
13
14
  applyLabel?: string;
14
15
  previousMonthLabel?: string;
@@ -1,6 +1,9 @@
1
1
  import { Ref } from 'vue';
2
2
  import { Placement } from '@floating-ui/vue';
3
3
  type __VLS_Props = {
4
+ mobileSheet?: boolean;
5
+ sheetTitle?: string;
6
+ closeLabel?: string;
4
7
  open: boolean;
5
8
  /** Accepts an HTMLElement, a Vue ref (Ref<HTMLElement | null>), or null */
6
9
  anchor: HTMLElement | Ref<HTMLElement | null> | null;
@@ -26,19 +29,21 @@ type __VLS_Props = {
26
29
  /** Extra DOM elements (e.g. Teleport'd submenus) that should not trigger close */
27
30
  extraPanels?: (HTMLElement | null)[];
28
31
  };
29
- declare var __VLS_5: {};
32
+ declare var __VLS_9: {}, __VLS_15: {};
30
33
  type __VLS_Slots = {} & {
31
- default?: (props: typeof __VLS_5) => any;
34
+ default?: (props: typeof __VLS_9) => any;
35
+ } & {
36
+ default?: (props: typeof __VLS_15) => any;
32
37
  };
33
38
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
34
39
  close: () => any;
35
40
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
36
41
  onClose?: (() => any) | undefined;
37
42
  }>, {
43
+ zIndex: string | number;
38
44
  panelScroll: boolean;
39
45
  freezePositionOnOpen: boolean;
40
46
  flip: boolean;
41
- zIndex: string | number;
42
47
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
43
48
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
44
49
  export default _default;
@@ -16,6 +16,7 @@ type __VLS_Props = {
16
16
  multiple?: boolean;
17
17
  searchable?: boolean;
18
18
  creatable?: boolean;
19
+ closeLabel?: string;
19
20
  searchPlaceholder?: string;
20
21
  selectAllLabel?: string;
21
22
  clearLabel?: string;
@@ -1,4 +1,6 @@
1
- declare const _default: __VLS_WithSlots<import('vue').DefineComponent<{
1
+ type __VLS_Props = {
2
+ closeLabel?: string;
3
+ mobileBottom?: boolean;
2
4
  modelValue: boolean;
3
5
  title?: string;
4
6
  width?: string;
@@ -7,26 +9,29 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<{
7
9
  hideHeader?: boolean;
8
10
  subtitle?: string;
9
11
  zIndex?: number;
10
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
- "update:modelValue": (v: boolean) => any;
12
- }, string, import('vue').PublicProps, Readonly<{
13
- modelValue: boolean;
14
- title?: string;
15
- width?: string;
16
- island?: boolean;
17
- noPadding?: boolean;
18
- hideHeader?: boolean;
19
- subtitle?: string;
20
- zIndex?: number;
21
- }> & Readonly<{
22
- "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
23
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
24
- header?: (props: {}) => any;
12
+ };
13
+ declare var __VLS_9: {}, __VLS_11: {}, __VLS_13: {}, __VLS_27: {}, __VLS_33: {}, __VLS_35: {};
14
+ type __VLS_Slots = {} & {
15
+ header?: (props: typeof __VLS_9) => any;
16
+ } & {
17
+ default?: (props: typeof __VLS_11) => any;
18
+ } & {
19
+ footer?: (props: typeof __VLS_13) => any;
25
20
  } & {
26
- default?: (props: {}) => any;
21
+ header?: (props: typeof __VLS_27) => any;
27
22
  } & {
28
- footer?: (props: {}) => any;
29
- }>;
23
+ default?: (props: typeof __VLS_33) => any;
24
+ } & {
25
+ footer?: (props: typeof __VLS_35) => any;
26
+ };
27
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
+ "update:modelValue": (v: boolean) => any;
29
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
30
+ "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
31
+ }>, {
32
+ mobileBottom: boolean;
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
34
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
30
35
  export default _default;
31
36
  type __VLS_WithSlots<T, S> = T & {
32
37
  new (): {
@@ -25,6 +25,11 @@ type __VLS_Props = {
25
25
  pageSize?: number;
26
26
  serverTotal?: number;
27
27
  serverPage?: number;
28
+ /** Controlled sorting: emit changes and preserve the server row order. */
29
+ serverSort?: {
30
+ field: string | null;
31
+ direction: 'asc' | 'desc';
32
+ };
28
33
  searchPlaceholder?: string;
29
34
  rowClickable?: boolean;
30
35
  showHeader?: boolean;
@@ -82,11 +87,19 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
82
87
  "update:selectedKeys": (keys: (string | number)[]) => any;
83
88
  "row-select": (row: Record<string, unknown>, selected: boolean) => any;
84
89
  "update:serverPage": (page: number) => any;
90
+ "update:serverSort": (sort: {
91
+ field: string;
92
+ direction: "asc" | "desc";
93
+ }) => any;
85
94
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
86
95
  "onRow-click"?: ((row: Record<string, unknown>) => any) | undefined;
87
96
  "onUpdate:selectedKeys"?: ((keys: (string | number)[]) => any) | undefined;
88
97
  "onRow-select"?: ((row: Record<string, unknown>, selected: boolean) => any) | undefined;
89
98
  "onUpdate:serverPage"?: ((page: number) => any) | undefined;
99
+ "onUpdate:serverSort"?: ((sort: {
100
+ field: string;
101
+ direction: "asc" | "desc";
102
+ }) => any) | undefined;
90
103
  }>, {
91
104
  loadingSpinner: boolean;
92
105
  searchPlaceholder: string;
@@ -0,0 +1,2 @@
1
+ /** A shared lock survives nested overlays and responsive presentation changes. */
2
+ export declare function lockBodyScroll(): () => void;
@@ -0,0 +1 @@
1
+ export declare function useMobileViewport(): import('vue').Ref<boolean, boolean>;
package/dist/index.d.ts CHANGED
@@ -88,3 +88,4 @@ export { ui5Theme, themeVariables, chartPalettes, useWTheme } from './theme';
88
88
  export type { WThemeMode, WThemeColors, WThemeOverrides } from './theme';
89
89
  export { default as WTrendBadge } from './components/WTrendBadge.vue';
90
90
  export { default as WEditableText } from './components/WEditableText.vue';
91
+ export { default as WBottomSheet } from './components/WBottomSheet.vue';