@wpic/ui 0.6.6 → 0.7.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.
- package/CHANGELOG.md +4 -0
- package/COMPONENTS.md +46 -0
- package/dist/components/WModal.vue.d.ts +14 -5
- package/dist/components/WSplitButton.vue.d.ts +34 -0
- package/dist/index.d.ts +2 -0
- package/dist/wpic-ui.cjs +62 -62
- package/dist/wpic-ui.css +1 -1
- package/dist/wpic-ui.js +3070 -2925
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.0 — 2026-09-10
|
|
4
|
+
|
|
5
|
+
- Add WSplitButton: a primary action button paired with a chevron that opens a menu of secondary actions, built from WButton + WButtonGroup + WPopover so it matches WButton exactly across every variant and size.
|
|
6
|
+
|
|
3
7
|
## 0.6.6 — 2026-09-10
|
|
4
8
|
|
|
5
9
|
- Localize WDateRangePicker calendars and action labels; expose WSelect search/action labels through WFilterBar.
|
package/COMPONENTS.md
CHANGED
|
@@ -379,6 +379,52 @@ close: []
|
|
|
379
379
|
|
|
380
380
|
---
|
|
381
381
|
|
|
382
|
+
## WSplitButton
|
|
383
|
+
|
|
384
|
+
A primary action button paired with a chevron that opens a menu of secondary
|
|
385
|
+
actions. Generic: the primary action is not assumed to be any specific intent
|
|
386
|
+
(export, save, etc.) — the caller supplies the primary label via the default
|
|
387
|
+
slot and the menu entries via `options`.
|
|
388
|
+
|
|
389
|
+
**Import:** `import { WSplitButton, type WSplitButtonOption } from '@wpic/ui'`
|
|
390
|
+
|
|
391
|
+
**Props:**
|
|
392
|
+
```ts
|
|
393
|
+
options: WSplitButtonOption[] // { value: string, label: string, icon?: object | Function, disabled?: boolean }
|
|
394
|
+
variant?: 'primary' | 'secondary' | 'subtle' | 'destructive' | 'ghost' | 'outline'
|
|
395
|
+
size?: 'xs' | 'sm' | 'md' | 'lg'
|
|
396
|
+
icon?: object | Function // icon for the primary button
|
|
397
|
+
disabled?: boolean
|
|
398
|
+
loading?: boolean
|
|
399
|
+
menuLabel?: string // accessible name for the chevron trigger, default "More options"
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
**Emits:**
|
|
403
|
+
```ts
|
|
404
|
+
click: [e: MouseEvent] // primary button activated
|
|
405
|
+
select: [value: string] // a menu option was chosen
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Slots:**
|
|
409
|
+
```ts
|
|
410
|
+
default // primary button label/content
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
**Usage:**
|
|
414
|
+
```html
|
|
415
|
+
<WSplitButton
|
|
416
|
+
:options="[{ value: 'csv', label: 'CSV' }, { value: 'xlsx', label: 'Excel (.xlsx)' }]"
|
|
417
|
+
variant="outline"
|
|
418
|
+
:icon="Download"
|
|
419
|
+
@click="exportDefault"
|
|
420
|
+
@select="format => exportAs(format)"
|
|
421
|
+
>
|
|
422
|
+
Export
|
|
423
|
+
</WSplitButton>
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
382
428
|
## WProgress
|
|
383
429
|
|
|
384
430
|
**Import:** `import { WProgress } from '@wpic/ui'`
|
|
@@ -5,20 +5,29 @@ type __VLS_Props = {
|
|
|
5
5
|
zIndex?: string;
|
|
6
6
|
hideClose?: boolean;
|
|
7
7
|
noPadding?: boolean;
|
|
8
|
+
draggable?: boolean;
|
|
9
|
+
modal?: boolean;
|
|
10
|
+
closeLabel?: string;
|
|
11
|
+
moveLabel?: string;
|
|
8
12
|
};
|
|
9
|
-
declare var
|
|
13
|
+
declare var __VLS_9: {}, __VLS_15: {}, __VLS_17: {};
|
|
10
14
|
type __VLS_Slots = {} & {
|
|
11
|
-
header?: (props: typeof
|
|
15
|
+
header?: (props: typeof __VLS_9) => any;
|
|
12
16
|
} & {
|
|
13
|
-
default?: (props: typeof
|
|
17
|
+
default?: (props: typeof __VLS_15) => any;
|
|
14
18
|
} & {
|
|
15
|
-
footer?: (props: typeof
|
|
19
|
+
footer?: (props: typeof __VLS_17) => any;
|
|
16
20
|
};
|
|
17
21
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
22
|
close: () => any;
|
|
19
23
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
20
24
|
onClose?: (() => any) | undefined;
|
|
21
|
-
}>, {
|
|
25
|
+
}>, {
|
|
26
|
+
closeLabel: string;
|
|
27
|
+
draggable: boolean;
|
|
28
|
+
modal: boolean;
|
|
29
|
+
moveLabel: string;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
31
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
23
32
|
export default _default;
|
|
24
33
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface WSplitButtonOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: object | Function;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
options: WSplitButtonOption[];
|
|
9
|
+
variant?: 'primary' | 'secondary' | 'subtle' | 'destructive' | 'ghost' | 'outline';
|
|
10
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
11
|
+
icon?: object | Function;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
/** Accessible name for the chevron trigger. Defaults to "More options". */
|
|
15
|
+
menuLabel?: string;
|
|
16
|
+
};
|
|
17
|
+
declare var __VLS_13: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
default?: (props: typeof __VLS_13) => any;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
click: (e: MouseEvent) => any;
|
|
23
|
+
select: (value: string) => any;
|
|
24
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
|
+
onClick?: ((e: MouseEvent) => any) | undefined;
|
|
26
|
+
onSelect?: ((value: string) => any) | undefined;
|
|
27
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ export { default as WImageTile } from './components/WImageTile.vue';
|
|
|
68
68
|
export { default as WFilterBar } from './components/WFilterBar.vue';
|
|
69
69
|
export type { FilterItem } from './components/WFilterBar.vue';
|
|
70
70
|
export { default as WPopover } from './components/WPopover.vue';
|
|
71
|
+
export { default as WSplitButton } from './components/WSplitButton.vue';
|
|
72
|
+
export type { WSplitButtonOption } from './components/WSplitButton.vue';
|
|
71
73
|
export { default as WTailwindColorPicker } from './components/WTailwindColorPicker.vue';
|
|
72
74
|
export type { WTailwindColorOption } from './components/WTailwindColorPicker.vue';
|
|
73
75
|
export { useRecentItems } from './composables/useRecentItems';
|