@wpic/ui 0.9.66 → 0.9.80

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,8 +1,15 @@
1
1
  # Unreleased
2
2
 
3
+ ## 0.9.78
4
+
5
+ - `WTable` expandable rows: the chevron is now a real button, reachable with Tab and operable with Enter or Space, exposing `aria-expanded` and `aria-controls`. New optional `expandLabel(row, expanded)` prop names it (default "Expand row" / "Collapse row").
3
6
  - Add `WComboInput`: a free-text `WInput` with a `WOptionPopover` suggestion list, for fields that are historically free text but should offer previously-used values (unlike `WSelect`'s `creatable` mode, typing and blurring always commits — no need to click a "Create …" row).
4
7
  - `WOptionPopover` options now select on `mousedown` instead of `click`, so a text input driving the popover doesn't blur-close it before the click registers.
5
8
 
9
+ ## 0.9.70
10
+
11
+ - Let `WSlidePanel` reuse the chat-style inset panel frame for dockable forms, with floating drag, right-edge docking, and resizing in both states.
12
+
6
13
  ## 0.9.66
7
14
 
8
15
  - Soften `WTable`'s dark header and use a subtle neutral row hover in both themes. The hover can be customized with `--wpic-table-row-hover`.
package/COMPONENTS.md CHANGED
@@ -642,11 +642,31 @@ noPadding?: boolean
642
642
  hideHeader?: boolean
643
643
  subtitle?: string
644
644
  zIndex?: number // default 70
645
- ```
645
+ docked?: boolean // fixed inset card without a backdrop or body scroll lock
646
+ dockable?: boolean // show dock/undock control and allow dropping at the right edge
647
+ draggable?: boolean // move the floating panel by its header
648
+ dockedInset?: number // default 8px, matches WChatPanel
649
+ rightOffset?: number // space reserved for another panel on the right
650
+ resizable?: boolean // docked width handle and floating bottom corner handles
651
+ panelWidth?: number // controlled pixel width for docked/resizable usage
652
+ minWidth?: number // default 360px
653
+ maxWidth?: number // maximum resize width, usually set by the host layout
654
+ collapsed?: boolean // keep the header visible while hiding the body/footer
655
+ backdrop?: boolean // default true for overlay mode
656
+ resizeLabel?: string
657
+ dockLabel?: string
658
+ undockLabel?: string
659
+ floatingBottomOffset?: number // extra clearance below a floating panel
660
+ ```
661
+
662
+ Use `v-model:docked` and `v-model:panel-width` to keep a dockable panel in sync
663
+ with the host layout. When `draggable` is enabled, the panel opens at the lower
664
+ right, can be moved by its header, and docks when dropped at the right edge.
646
665
 
647
666
  **Emits:**
648
667
  ```ts
649
668
  'update:modelValue': [v: boolean]
669
+ 'update:panelWidth': [width: number]
650
670
  ```
651
671
 
652
672
  ---
@@ -697,6 +717,7 @@ rowClickable?: boolean
697
717
  showHeader?: boolean
698
718
  showFooter?: boolean
699
719
  columnDividers?: boolean // vertical rules between cells, in the row divider colour; default false
720
+ verticalAlign?: 'top' | 'middle' | 'bottom' // body cells; omitted uses browser default
700
721
  ```
701
722
 
702
723
  **Emits:**
@@ -8,6 +8,8 @@ type __VLS_Props = {
8
8
  disabled?: boolean;
9
9
  showAttachments?: boolean;
10
10
  showHistory?: boolean;
11
+ historyOnly?: boolean;
12
+ historyAnchor?: HTMLElement | null;
11
13
  attachments?: WChatAttachment[];
12
14
  projects?: WChatProject[];
13
15
  sessions?: WChatComposerSession[];
@@ -25,6 +27,7 @@ type __VLS_Props = {
25
27
  projectsLabel?: string;
26
28
  generalConversationLabel?: string;
27
29
  };
30
+ declare function toggleHistory(): void;
28
31
  declare function openWithPrompt(prompt: string): Promise<void>;
29
32
  declare var __VLS_57: {};
30
33
  type __VLS_Slots = {} & {
@@ -32,6 +35,7 @@ type __VLS_Slots = {} & {
32
35
  };
33
36
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
34
37
  openWithPrompt: typeof openWithPrompt;
38
+ toggleHistory: typeof toggleHistory;
35
39
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
36
40
  submit: (value: string) => any;
37
41
  "select-session": (sessionId: string) => any;
@@ -123,6 +123,8 @@ type __VLS_Props = {
123
123
  showQuestionRail?: boolean;
124
124
  questionRailLabel?: string;
125
125
  showNavigator?: boolean;
126
+ /** Match the simple dock/close title bar used by workspace panels. */
127
+ headerMode?: 'default' | 'dock-close';
126
128
  hideNewConversation?: boolean;
127
129
  hideClear?: boolean;
128
130
  loading?: boolean;
@@ -130,6 +132,8 @@ type __VLS_Props = {
130
132
  docked?: boolean;
131
133
  /** Space around the docked panel, matching inset application layouts. */
132
134
  dockedInset?: number;
135
+ /** Additional space below a docked panel for an application status bar. */
136
+ dockedBottomOffset?: number;
133
137
  maximized?: boolean;
134
138
  maximizedMargin?: number;
135
139
  width?: number;
@@ -273,11 +277,13 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
273
277
  showQuestionRail: boolean;
274
278
  questionRailLabel: string;
275
279
  showNavigator: boolean;
280
+ headerMode: "default" | "dock-close";
276
281
  hideNewConversation: boolean;
277
282
  hideClear: boolean;
278
283
  cancellable: boolean;
279
284
  docked: boolean;
280
285
  dockedInset: number;
286
+ dockedBottomOffset: number;
281
287
  maximized: boolean;
282
288
  maximizedMargin: number;
283
289
  topOffset: number;
@@ -9,8 +9,24 @@ type __VLS_Props = {
9
9
  hideHeader?: boolean;
10
10
  subtitle?: string;
11
11
  zIndex?: number;
12
+ docked?: boolean;
13
+ dockable?: boolean;
14
+ draggable?: boolean;
15
+ dockedInset?: number;
16
+ dockedBottomOffset?: number;
17
+ rightOffset?: number;
18
+ resizable?: boolean;
19
+ panelWidth?: number;
20
+ minWidth?: number;
21
+ maxWidth?: number;
22
+ collapsed?: boolean;
23
+ backdrop?: boolean;
24
+ resizeLabel?: string;
25
+ dockLabel?: string;
26
+ undockLabel?: string;
27
+ floatingBottomOffset?: number;
12
28
  };
13
- declare var __VLS_11: {}, __VLS_13: {}, __VLS_16: {}, __VLS_36: {}, __VLS_43: {}, __VLS_45: {};
29
+ declare var __VLS_11: {}, __VLS_13: {}, __VLS_16: {}, __VLS_36: {}, __VLS_53: {}, __VLS_55: {};
14
30
  type __VLS_Slots = {} & {
15
31
  header?: (props: typeof __VLS_11) => any;
16
32
  } & {
@@ -20,16 +36,23 @@ type __VLS_Slots = {} & {
20
36
  } & {
21
37
  header?: (props: typeof __VLS_36) => any;
22
38
  } & {
23
- default?: (props: typeof __VLS_43) => any;
39
+ default?: (props: typeof __VLS_53) => any;
24
40
  } & {
25
- footer?: (props: typeof __VLS_45) => any;
41
+ footer?: (props: typeof __VLS_55) => any;
26
42
  };
27
43
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
44
  "update:modelValue": (v: boolean) => any;
45
+ "update:docked": (value: boolean) => any;
46
+ "update:panelWidth": (width: number) => any;
29
47
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
30
48
  "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
49
+ "onUpdate:docked"?: ((value: boolean) => any) | undefined;
50
+ "onUpdate:panelWidth"?: ((width: number) => any) | undefined;
31
51
  }>, {
52
+ minWidth: number;
53
+ dockedInset: number;
32
54
  mobileBottom: boolean;
55
+ backdrop: boolean;
33
56
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
34
57
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
35
58
  declare const _default: typeof __VLS_export;
@@ -7,7 +7,9 @@ export type WTableColumn = {
7
7
  sortable?: boolean;
8
8
  searchable?: boolean;
9
9
  };
10
- type __VLS_Props = {
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
11
13
  data?: Record<string, unknown>[];
12
14
  columns: WTableColumn[];
13
15
  loading?: boolean;
@@ -28,12 +30,14 @@ type __VLS_Props = {
28
30
  /** Controlled sorting: emit changes and preserve the server row order. */
29
31
  serverSort?: {
30
32
  field: string | null;
31
- direction: 'asc' | 'desc';
33
+ direction: "asc" | "desc";
32
34
  };
33
35
  searchPlaceholder?: string;
34
36
  rowClickable?: boolean;
35
37
  showHeader?: boolean;
36
38
  expandable?: boolean;
39
+ /** Accessible name of a row's expand toggle. Omitted: "Expand row" / "Collapse row". */
40
+ expandLabel?: (row: Record<string, unknown>, expanded: boolean) => string;
37
41
  selectable?: boolean;
38
42
  selectedKeys?: (string | number)[];
39
43
  rowKey?: string;
@@ -44,41 +48,15 @@ type __VLS_Props = {
44
48
  cellStyle?: (row: Record<string, unknown>, column: WTableColumn) => Record<string, string> | undefined;
45
49
  summaryRow?: Record<string, unknown>;
46
50
  compact?: boolean;
51
+ /** Vertical alignment of body cells. Defaults to the browser's table-cell alignment. */
52
+ verticalAlign?: "top" | "middle" | "bottom";
47
53
  /** Horizontal padding scale. Omitted: inherits the enclosing WCard's
48
54
  padding (falling back to md), or sm when `compact`. */
49
- padding?: 'sm' | 'md' | 'lg';
55
+ padding?: "sm" | "md" | "lg";
50
56
  showFooter?: boolean;
51
57
  /** Draw a vertical rule between adjacent cells, in the row divider colour. */
52
58
  columnDividers?: boolean;
53
- };
54
- declare var __VLS_6: {}, __VLS_22: any, __VLS_23: {
55
- col: any;
56
- sortField: any;
57
- sortDir: any;
58
- toggleSort: any;
59
- }, __VLS_41: any, __VLS_42: {
60
- row: any;
61
- value: any;
62
- }, __VLS_62: any, __VLS_63: {
63
- row: any;
64
- value: any;
65
- }, __VLS_65: {
66
- row: any;
67
- }, __VLS_67: {};
68
- type __VLS_Slots = {} & {
69
- [K in NonNullable<typeof __VLS_22>]?: (props: typeof __VLS_23) => any;
70
- } & {
71
- [K in NonNullable<typeof __VLS_41>]?: (props: typeof __VLS_42) => any;
72
- } & {
73
- [K in NonNullable<typeof __VLS_62>]?: (props: typeof __VLS_63) => any;
74
- } & {
75
- toolbar?: (props: typeof __VLS_6) => any;
76
- } & {
77
- expand?: (props: typeof __VLS_65) => any;
78
- } & {
79
- 'empty-icon'?: (props: typeof __VLS_67) => any;
80
- };
81
- declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
59
+ }, {
82
60
  filteredCount: import('vue').ComputedRef<number>;
83
61
  searchQuery: import('vue').Ref<string, string>;
84
62
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -90,7 +68,54 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
90
68
  field: string;
91
69
  direction: "asc" | "desc";
92
70
  }) => any;
93
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
71
+ }, string, import('vue').PublicProps, Readonly<{
72
+ data?: Record<string, unknown>[];
73
+ columns: WTableColumn[];
74
+ loading?: boolean;
75
+ loadingSpinner?: boolean;
76
+ labels?: {
77
+ loading?: string;
78
+ results?: string;
79
+ of?: string;
80
+ item?: string;
81
+ items?: string;
82
+ previous?: string;
83
+ next?: string;
84
+ };
85
+ emptyText?: string;
86
+ pageSize?: number;
87
+ serverTotal?: number;
88
+ serverPage?: number;
89
+ /** Controlled sorting: emit changes and preserve the server row order. */
90
+ serverSort?: {
91
+ field: string | null;
92
+ direction: "asc" | "desc";
93
+ };
94
+ searchPlaceholder?: string;
95
+ rowClickable?: boolean;
96
+ showHeader?: boolean;
97
+ expandable?: boolean;
98
+ /** Accessible name of a row's expand toggle. Omitted: "Expand row" / "Collapse row". */
99
+ expandLabel?: (row: Record<string, unknown>, expanded: boolean) => string;
100
+ selectable?: boolean;
101
+ selectedKeys?: (string | number)[];
102
+ rowKey?: string;
103
+ flushEdges?: boolean;
104
+ rowClass?: (row: Record<string, unknown>) => string | Record<string, boolean> | undefined;
105
+ rowStyle?: (row: Record<string, unknown>) => Record<string, string> | undefined;
106
+ /** Style the complete body cell, including its padding. */
107
+ cellStyle?: (row: Record<string, unknown>, column: WTableColumn) => Record<string, string> | undefined;
108
+ summaryRow?: Record<string, unknown>;
109
+ compact?: boolean;
110
+ /** Vertical alignment of body cells. Defaults to the browser's table-cell alignment. */
111
+ verticalAlign?: "top" | "middle" | "bottom";
112
+ /** Horizontal padding scale. Omitted: inherits the enclosing WCard's
113
+ padding (falling back to md), or sm when `compact`. */
114
+ padding?: "sm" | "md" | "lg";
115
+ showFooter?: boolean;
116
+ /** Draw a vertical rule between adjacent cells, in the row divider colour. */
117
+ columnDividers?: boolean;
118
+ }> & Readonly<{
94
119
  "onRow-click"?: ((row: Record<string, unknown>) => any) | undefined;
95
120
  "onUpdate:selectedKeys"?: ((keys: (string | number)[]) => any) | undefined;
96
121
  "onRow-select"?: ((row: Record<string, unknown>, selected: boolean) => any) | undefined;
@@ -110,10 +135,32 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
110
135
  flushEdges: boolean;
111
136
  showFooter: boolean;
112
137
  columnDividers: boolean;
113
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
114
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
115
- declare const _default: typeof __VLS_export;
116
- export default _default;
138
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
139
+ [x: string]: ((props: {
140
+ col: any;
141
+ sortField: any;
142
+ sortDir: any;
143
+ toggleSort: any;
144
+ }) => any) | undefined;
145
+ } & {
146
+ [x: string]: ((props: {
147
+ row: any;
148
+ value: any;
149
+ }) => any) | undefined;
150
+ } & {
151
+ [x: string]: ((props: {
152
+ row: any;
153
+ value: any;
154
+ }) => any) | undefined;
155
+ } & {
156
+ toolbar?: (props: {}) => any;
157
+ } & {
158
+ expand?: (props: {
159
+ row: any;
160
+ }) => any;
161
+ } & {
162
+ 'empty-icon'?: (props: {}) => any;
163
+ }>;
117
164
  type __VLS_WithSlots<T, S> = T & {
118
165
  new (): {
119
166
  $slots: S;