@wpic/ui 0.6.7 → 0.7.1
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 +8 -4
- package/COMPONENTS.md +46 -5
- package/dist/components/WModal.vue.d.ts +5 -14
- package/dist/components/WSplitButton.vue.d.ts +34 -0
- package/dist/index.d.ts +2 -0
- package/dist/wpic-ui.cjs +59 -59
- package/dist/wpic-ui.css +1 -1
- package/dist/wpic-ui.js +2679 -2654
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.1 — 2026-09-10
|
|
4
|
+
|
|
5
|
+
- 0.7.0 was deprecated: it was built and published with unrelated, uncommitted WModal/WPopover changes present in the working tree at build time. This release re-publishes the same WSplitButton addition from a clean tree.
|
|
6
|
+
|
|
7
|
+
## 0.7.0 — 2026-09-10 (deprecated)
|
|
8
|
+
|
|
9
|
+
- 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.
|
|
10
|
+
|
|
3
11
|
## 0.6.6 — 2026-09-10
|
|
4
12
|
|
|
5
13
|
- Localize WDateRangePicker calendars and action labels; expose WSelect search/action labels through WFilterBar.
|
|
@@ -85,7 +93,3 @@ Import `@wpic/ui/style.css` alongside the components. No host Tailwind source sc
|
|
|
85
93
|
### Verification
|
|
86
94
|
|
|
87
95
|
Run `npm run build` followed by `npm run test:semantic`. The browser tests use Google Chrome (`npx playwright install chrome` if needed). Open `/test-ui/semantic.html` with `npm run test:ui` for the standalone package showcase.
|
|
88
|
-
|
|
89
|
-
## 0.6.7
|
|
90
|
-
- WModal: optional draggable, non-modal floating windows, bounded pointer/keyboard movement, focus restoration, localized close/move labels.
|
|
91
|
-
- Popovers inside modals inherit the overlay layer so selects and calendars remain visible.
|
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'`
|
|
@@ -697,8 +743,3 @@ For a shorter metric card, use `compact`. Use `changePosition="label"` to align
|
|
|
697
743
|
### Localization options (0.6.6)
|
|
698
744
|
|
|
699
745
|
WTable accepts `labels` (`loading`, `results`, `of`, `item`, `items`, `previous`, `next`) and `loadingSpinner=false` for plain loading text. Existing `emptyText` and `searchPlaceholder` remain available. WSelect accepts `searchPlaceholder`, `selectAllLabel`, `clearLabel` and `noResultsLabel`; WFilterBar forwards `selectLabels` to its selects. WDateRangePicker accepts `locale`, `applyLabel`, `previousMonthLabel`, `nextMonthLabel` in addition to translated `presets`, `ariaLabel`, `clearLabel` and `placeholder`.
|
|
700
|
-
|
|
701
|
-
WModal accepts `draggable` and `:modal="false"` for floating tools. Drag the title,
|
|
702
|
-
use arrow keys on its move handle (Shift for larger steps), or Home to recenter.
|
|
703
|
-
Pass `closeLabel` and `moveLabel` for localization. Close with Escape or the close
|
|
704
|
-
button. Use `v-if` to open/close; the parent can retain form values across openings.
|
|
@@ -5,29 +5,20 @@ 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;
|
|
12
8
|
};
|
|
13
|
-
declare var
|
|
9
|
+
declare var __VLS_5: {}, __VLS_11: {}, __VLS_13: {};
|
|
14
10
|
type __VLS_Slots = {} & {
|
|
15
|
-
header?: (props: typeof
|
|
11
|
+
header?: (props: typeof __VLS_5) => any;
|
|
16
12
|
} & {
|
|
17
|
-
default?: (props: typeof
|
|
13
|
+
default?: (props: typeof __VLS_11) => any;
|
|
18
14
|
} & {
|
|
19
|
-
footer?: (props: typeof
|
|
15
|
+
footer?: (props: typeof __VLS_13) => any;
|
|
20
16
|
};
|
|
21
17
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
18
|
close: () => any;
|
|
23
19
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
20
|
onClose?: (() => any) | undefined;
|
|
25
|
-
}>, {
|
|
26
|
-
closeLabel: string;
|
|
27
|
-
draggable: boolean;
|
|
28
|
-
modal: boolean;
|
|
29
|
-
moveLabel: string;
|
|
30
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
22
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
32
23
|
export default _default;
|
|
33
24
|
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';
|