@wpic/ui 0.9.23 → 0.9.25
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 +12 -0
- package/COMPONENTS.md +62 -0
- package/dist/components/WBottomSheet.vue.d.ts +31 -0
- package/dist/components/WChatComposer.vue.d.ts +64 -0
- package/dist/components/WChatEditor.vue.d.ts +17 -0
- package/dist/components/WChatPanel.vue.d.ts +4 -2
- package/dist/components/WDateRangePicker.vue.d.ts +1 -0
- package/dist/components/WPopover.vue.d.ts +8 -3
- package/dist/components/WSelect.vue.d.ts +1 -0
- package/dist/components/WSlidePanel.vue.d.ts +24 -19
- package/dist/composables/lockBodyScroll.d.ts +2 -0
- package/dist/composables/useMobileViewport.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/wpic-ui.cjs +67 -66
- package/dist/wpic-ui.css +19 -1
- package/dist/wpic-ui.js +4036 -3390
- package/package.json +4 -2
- package/src/style.css +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 0.9.25
|
|
2
|
+
|
|
3
|
+
- Add WChatComposer and WChatEditor with the Perform glass design and generic host events.
|
|
4
|
+
- Add optional attachment visibility to WChatPanel and WChatComposer, and history visibility to WChatComposer.
|
|
5
|
+
|
|
6
|
+
## 0.9.24
|
|
7
|
+
|
|
8
|
+
- Add accessible mobile bottom sheets with nested overlays, focus restoration and keyboard viewport support.
|
|
9
|
+
- Adapt selects, date ranges and slide panels below 768px; retain desktop popovers.
|
|
10
|
+
- Keep custom date calendars and table pagination within narrow screens and enlarge touch targets.
|
|
11
|
+
- Share body scroll locks across nested overlays and responsive transitions.
|
|
12
|
+
|
|
1
13
|
## 0.9.23
|
|
2
14
|
|
|
3
15
|
- WTable: support controlled server sorting without reordering the current page locally.
|
package/COMPONENTS.md
CHANGED
|
@@ -819,3 +819,65 @@ 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.
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
## WChatEditor and WChatComposer
|
|
839
|
+
|
|
840
|
+
`WChatEditor` is a plain-text chat editor backed by Tiptap. It accepts `v-model`,
|
|
841
|
+
`placeholder`, `disabled`, `minLines` and `maxLines`; emits `submit` on Enter
|
|
842
|
+
(Shift+Enter adds a line, IME confirmation does not submit); exposes `focus()`.
|
|
843
|
+
Placeholder changes preserve the draft. Model values are treated as text, not HTML.
|
|
844
|
+
|
|
845
|
+
`WChatComposer` provides the Perform glass launcher design, expanded input,
|
|
846
|
+
attachments and conversation/project history. It has no application store, API,
|
|
847
|
+
i18n plugin or localStorage dependency.
|
|
848
|
+
|
|
849
|
+
```vue
|
|
850
|
+
<WChatComposer
|
|
851
|
+
ref="composer"
|
|
852
|
+
v-model:minimized="minimized"
|
|
853
|
+
placeholder="Ask the analyst"
|
|
854
|
+
:disabled="sending"
|
|
855
|
+
:sessions="sessions"
|
|
856
|
+
:projects="projects"
|
|
857
|
+
:attachments="attachments"
|
|
858
|
+
:history-loading="historyLoading"
|
|
859
|
+
locale="en"
|
|
860
|
+
@submit="send"
|
|
861
|
+
@request-history="loadHistory"
|
|
862
|
+
@select-session="selectSession"
|
|
863
|
+
@files-selected="uploadFiles"
|
|
864
|
+
@remove-attachment="removeAttachment"
|
|
865
|
+
/>
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
- The host supplies `WChatAttachment[]`, `WChatProject[]` and
|
|
869
|
+
`WChatComposerSession[]` (extends `WChatSession` with optional `badge` and
|
|
870
|
+
`highlighted`). Use `subtitle` for domain context such as a client or date range.
|
|
871
|
+
- The host owns uploads, history loading, selection, persistence and LLM calls.
|
|
872
|
+
`request-history` fires whenever history opens; deduplicate loading in the host.
|
|
873
|
+
- Translate the label props: `conversationsLabel`, `removeAttachmentLabel`,
|
|
874
|
+
`minimizeLabel`, `sendLabel`, `attachFilesLabel`, `loadingLabel`,
|
|
875
|
+
`noConversationsLabel`, `projectsLabel`, `generalConversationLabel`.
|
|
876
|
+
- `accept` configures file selection; loading attachments prevent submission.
|
|
877
|
+
- `openWithPrompt(text)` expands and focuses the input with a draft.
|
|
878
|
+
- Set `--wpic-chat-composer-left` and `--wpic-chat-composer-bottom` to integrate
|
|
879
|
+
with application navigation. Defaults preserve mobile/desktop floating placement.
|
|
880
|
+
- Use `WChatEditor` in the `WChatPanel` composer slot for the same input in the panel.
|
|
881
|
+
- Import `@wpic/ui/style.css`; no host Tailwind scan is required.
|
|
882
|
+
|
|
883
|
+
`showAttachments` defaults to true on both chat components. `showHistory` defaults to true on WChatComposer. Disable these for a text-only chat without saved sessions.
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { WChatAttachment, WChatProject, WChatSession } from './WChatPanel.vue';
|
|
2
|
+
export interface WChatComposerSession extends WChatSession {
|
|
3
|
+
badge?: string;
|
|
4
|
+
highlighted?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
placeholder: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
showAttachments?: boolean;
|
|
10
|
+
showHistory?: boolean;
|
|
11
|
+
attachments?: WChatAttachment[];
|
|
12
|
+
projects?: WChatProject[];
|
|
13
|
+
sessions?: WChatComposerSession[];
|
|
14
|
+
historyLoading?: boolean;
|
|
15
|
+
locale?: string;
|
|
16
|
+
minimized?: boolean;
|
|
17
|
+
accept?: string;
|
|
18
|
+
conversationsLabel?: string;
|
|
19
|
+
removeAttachmentLabel?: string;
|
|
20
|
+
minimizeLabel?: string;
|
|
21
|
+
sendLabel?: string;
|
|
22
|
+
attachFilesLabel?: string;
|
|
23
|
+
loadingLabel?: string;
|
|
24
|
+
noConversationsLabel?: string;
|
|
25
|
+
projectsLabel?: string;
|
|
26
|
+
generalConversationLabel?: string;
|
|
27
|
+
};
|
|
28
|
+
declare function openWithPrompt(prompt: string): Promise<void>;
|
|
29
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
30
|
+
openWithPrompt: typeof openWithPrompt;
|
|
31
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
|
+
submit: (value: string) => any;
|
|
33
|
+
"select-session": (sessionId: string) => any;
|
|
34
|
+
"files-selected": (files: File[]) => any;
|
|
35
|
+
"remove-attachment": (attachment: WChatAttachment) => any;
|
|
36
|
+
"request-history": () => any;
|
|
37
|
+
"update:minimized": (value: boolean) => any;
|
|
38
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
39
|
+
onSubmit?: ((value: string) => any) | undefined;
|
|
40
|
+
"onSelect-session"?: ((sessionId: string) => any) | undefined;
|
|
41
|
+
"onFiles-selected"?: ((files: File[]) => any) | undefined;
|
|
42
|
+
"onRemove-attachment"?: ((attachment: WChatAttachment) => any) | undefined;
|
|
43
|
+
"onRequest-history"?: (() => any) | undefined;
|
|
44
|
+
"onUpdate:minimized"?: ((value: boolean) => any) | undefined;
|
|
45
|
+
}>, {
|
|
46
|
+
projects: WChatProject[];
|
|
47
|
+
sessions: WChatComposerSession[];
|
|
48
|
+
noConversationsLabel: string;
|
|
49
|
+
projectsLabel: string;
|
|
50
|
+
conversationsLabel: string;
|
|
51
|
+
sendLabel: string;
|
|
52
|
+
attachFilesLabel: string;
|
|
53
|
+
removeAttachmentLabel: string;
|
|
54
|
+
showAttachments: boolean;
|
|
55
|
+
attachments: WChatAttachment[];
|
|
56
|
+
accept: string;
|
|
57
|
+
locale: string;
|
|
58
|
+
showHistory: boolean;
|
|
59
|
+
minimized: boolean;
|
|
60
|
+
minimizeLabel: string;
|
|
61
|
+
loadingLabel: string;
|
|
62
|
+
generalConversationLabel: string;
|
|
63
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
64
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: string;
|
|
3
|
+
placeholder: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
minLines?: number;
|
|
6
|
+
maxLines?: number;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
9
|
+
focus: () => boolean | undefined;
|
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string) => any;
|
|
12
|
+
submit: () => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
15
|
+
onSubmit?: (() => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -116,6 +116,7 @@ type __VLS_Props = {
|
|
|
116
116
|
closeLabel?: string;
|
|
117
117
|
helpfulLabel?: string;
|
|
118
118
|
notHelpfulLabel?: string;
|
|
119
|
+
showAttachments?: boolean;
|
|
119
120
|
attachments?: WChatAttachment[];
|
|
120
121
|
accept?: string;
|
|
121
122
|
customAttachmentPicker?: boolean;
|
|
@@ -217,8 +218,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
217
218
|
modelValue: string;
|
|
218
219
|
placeholder: string;
|
|
219
220
|
minWidth: number;
|
|
220
|
-
|
|
221
|
+
closeLabel: string;
|
|
221
222
|
zIndex: number;
|
|
223
|
+
minHeight: number;
|
|
222
224
|
mentionItems: WChatMentionItem[];
|
|
223
225
|
projects: WChatProject[];
|
|
224
226
|
sessions: WChatSession[];
|
|
@@ -254,9 +256,9 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
254
256
|
thinkingLabel: string;
|
|
255
257
|
dockLabel: string;
|
|
256
258
|
undockLabel: string;
|
|
257
|
-
closeLabel: string;
|
|
258
259
|
helpfulLabel: string;
|
|
259
260
|
notHelpfulLabel: string;
|
|
261
|
+
showAttachments: boolean;
|
|
260
262
|
attachments: WChatAttachment[];
|
|
261
263
|
accept: string;
|
|
262
264
|
customAttachmentPicker: boolean;
|
|
@@ -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
|
|
32
|
+
declare var __VLS_9: {}, __VLS_15: {};
|
|
30
33
|
type __VLS_Slots = {} & {
|
|
31
|
-
default?: (props: typeof
|
|
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;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
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
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
21
|
+
header?: (props: typeof __VLS_27) => any;
|
|
27
22
|
} & {
|
|
28
|
-
|
|
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 (): {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useMobileViewport(): import('vue').Ref<boolean, boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -88,3 +88,7 @@ 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';
|
|
92
|
+
export { default as WChatEditor } from './components/WChatEditor.vue';
|
|
93
|
+
export { default as WChatComposer } from './components/WChatComposer.vue';
|
|
94
|
+
export type { WChatComposerSession } from './components/WChatComposer.vue';
|