@digitalwalletcorp/vue-core 1.2.1 → 1.3.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/README.md +79 -3
- package/lib/accordion-fieldset.d.cts +14 -4
- package/lib/accordion-fieldset.d.ts +14 -4
- package/lib/accordion-section.d.cts +20 -10
- package/lib/accordion-section.d.ts +20 -10
- package/lib/components-BuTJ1wX8.js +26 -0
- package/lib/components-CKql5lWg.cjs +1 -0
- package/lib/components.d.cts +10 -0
- package/lib/components.d.ts +10 -0
- package/lib/copy-button.d.cts +34 -0
- package/lib/copy-button.d.ts +34 -0
- package/lib/dark-mode-selector.d.cts +32 -0
- package/lib/dark-mode-selector.d.ts +32 -0
- package/lib/data-table.d.cts +29 -0
- package/lib/data-table.d.ts +29 -0
- package/lib/help-button.d.cts +39 -0
- package/lib/help-button.d.ts +39 -0
- package/lib/help-popper.d.cts +39 -0
- package/lib/help-popper.d.ts +39 -0
- package/lib/helpers/data-table-csv.d.cts +17 -0
- package/lib/helpers/data-table-csv.d.ts +17 -0
- package/lib/helpers/show-floating-component.d.cts +86 -0
- package/lib/helpers/show-floating-component.d.ts +86 -0
- package/lib/helpers/show-modal-dialog.d.cts +73 -0
- package/lib/helpers/show-modal-dialog.d.ts +73 -0
- package/lib/helpers/show-overlay-box.d.cts +53 -0
- package/lib/helpers/show-overlay-box.d.ts +53 -0
- package/lib/helpers/show-screen-loading.d.cts +20 -0
- package/lib/helpers/show-screen-loading.d.ts +20 -0
- package/lib/helpers/show-snackbar.d.cts +47 -0
- package/lib/helpers/show-snackbar.d.ts +47 -0
- package/lib/hourglass-loading.d.cts +1 -1
- package/lib/hourglass-loading.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +34 -0
- package/lib/index.d.ts +34 -0
- package/lib/index.js +445 -18
- package/lib/internal/anchored-popover.d.cts +35 -0
- package/lib/internal/anchored-popover.d.ts +35 -0
- package/lib/internal/anchored-position.d.cts +50 -0
- package/lib/internal/anchored-position.d.ts +50 -0
- package/lib/internal/data-table-controls.d.cts +42 -0
- package/lib/internal/data-table-controls.d.ts +42 -0
- package/lib/internal/data-table-value.d.cts +32 -0
- package/lib/internal/data-table-value.d.ts +32 -0
- package/lib/internal/floating-component.d.cts +52 -0
- package/lib/internal/floating-component.d.ts +52 -0
- package/lib/internal/icon-popper.d.cts +32 -0
- package/lib/internal/icon-popper.d.ts +32 -0
- package/lib/internal/mount-window.d.cts +39 -0
- package/lib/internal/mount-window.d.ts +39 -0
- package/lib/internal/movable-window.d.cts +55 -0
- package/lib/internal/movable-window.d.ts +55 -0
- package/lib/internal/opened-overlay-boxes.d.cts +2 -0
- package/lib/internal/opened-overlay-boxes.d.ts +2 -0
- package/lib/internal/pagination.d.cts +22 -0
- package/lib/internal/pagination.d.ts +22 -0
- package/lib/internal/snackbar-container.d.cts +20 -0
- package/lib/internal/snackbar-container.d.ts +20 -0
- package/lib/internal/snackbar-item.d.cts +17 -0
- package/lib/internal/snackbar-item.d.ts +17 -0
- package/lib/internal/tab-group-context.d.cts +4 -2
- package/lib/internal/tab-group-context.d.ts +4 -2
- package/lib/internal/use-movable-window.d.cts +44 -0
- package/lib/internal/use-movable-window.d.ts +44 -0
- package/lib/internal/window-order.d.cts +6 -0
- package/lib/internal/window-order.d.ts +6 -0
- package/lib/intersection-lazy-component.d.cts +32 -0
- package/lib/intersection-lazy-component.d.ts +32 -0
- package/lib/label-button.d.cts +2 -2
- package/lib/label-button.d.ts +2 -2
- package/lib/label-icon.d.cts +2 -2
- package/lib/label-icon.d.ts +2 -2
- package/lib/modal-dialog.d.cts +67 -0
- package/lib/modal-dialog.d.ts +67 -0
- package/lib/nuxt.cjs +1 -1
- package/lib/nuxt.js +1 -1
- package/lib/overlay-box.d.cts +52 -0
- package/lib/overlay-box.d.ts +52 -0
- package/lib/page-section.d.cts +2 -2
- package/lib/page-section.d.ts +2 -2
- package/lib/page-title.d.cts +2 -2
- package/lib/page-title.d.ts +2 -2
- package/lib/register.cjs +1 -1
- package/lib/register.js +1 -1
- package/lib/screen-loading.d.cts +7 -0
- package/lib/screen-loading.d.ts +7 -0
- package/lib/style.css +1 -1
- package/lib/tab-content.d.cts +5 -5
- package/lib/tab-content.d.ts +5 -5
- package/lib/tab-group.d.cts +7 -10
- package/lib/tab-group.d.ts +7 -10
- package/lib/types/data-table.d.cts +185 -0
- package/lib/types/data-table.d.ts +185 -0
- package/lib/types/modal-dialog.d.cts +13 -0
- package/lib/types/modal-dialog.d.ts +13 -0
- package/lib/types/movable-window.d.cts +16 -0
- package/lib/types/movable-window.d.ts +16 -0
- package/lib/warning-popper.d.cts +39 -0
- package/lib/warning-popper.d.ts +39 -0
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-BKV_FX6k.js +1837 -0
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-CHmkjVCO.cjs +1 -0
- package/package.json +40 -14
- package/src/accordion-fieldset.vue +24 -19
- package/src/accordion-section.vue +33 -28
- package/src/components.ts +10 -0
- package/src/copy-button.vue +89 -0
- package/src/dark-mode-selector.vue +212 -0
- package/src/data-table.vue +648 -0
- package/src/help-button.vue +128 -0
- package/src/help-popper.vue +70 -0
- package/src/helpers/data-table-csv.ts +55 -0
- package/src/helpers/show-floating-component.ts +177 -0
- package/src/helpers/show-modal-dialog.ts +121 -0
- package/src/helpers/show-overlay-box.ts +106 -0
- package/src/helpers/show-screen-loading.ts +37 -0
- package/src/helpers/show-snackbar.ts +153 -0
- package/src/hourglass-loading.vue +1 -1
- package/src/index.ts +34 -0
- package/src/internal/anchored-popover.vue +192 -0
- package/src/internal/anchored-position.ts +135 -0
- package/src/internal/data-table-controls.vue +203 -0
- package/src/internal/data-table-value.ts +99 -0
- package/src/internal/floating-component.vue +202 -0
- package/src/internal/icon-popper.vue +185 -0
- package/src/internal/mount-window.ts +110 -0
- package/src/internal/movable-window.vue +315 -0
- package/src/internal/opened-overlay-boxes.ts +2 -0
- package/src/internal/pagination.vue +325 -0
- package/src/internal/snackbar-container.vue +258 -0
- package/src/internal/snackbar-item.ts +20 -0
- package/src/internal/tab-group-context.ts +4 -2
- package/src/internal/use-movable-window.ts +208 -0
- package/src/internal/window-order.ts +11 -0
- package/src/intersection-lazy-component.vue +84 -0
- package/src/label-button.vue +9 -6
- package/src/label-icon.vue +2 -2
- package/src/modal-dialog.vue +287 -0
- package/src/overlay-box.vue +218 -0
- package/src/page-section.vue +7 -7
- package/src/page-title.vue +4 -4
- package/src/screen-loading.vue +90 -0
- package/src/tab-content.vue +16 -15
- package/src/tab-group.vue +34 -36
- package/src/types/data-table.ts +196 -0
- package/src/types/modal-dialog.ts +16 -0
- package/src/types/movable-window.ts +18 -0
- package/src/warning-popper.vue +70 -0
- package/lib/accordion-fieldset.cjs +0 -1
- package/lib/accordion-fieldset.js +0 -4
- package/lib/accordion-fieldset.vue_vue_type_style_index_0_lang-Cf4czDXz.js +0 -66
- package/lib/accordion-fieldset.vue_vue_type_style_index_0_lang-DoM5QjpJ.cjs +0 -1
- package/lib/accordion-section.cjs +0 -1
- package/lib/accordion-section.js +0 -4
- package/lib/accordion-section.vue_vue_type_style_index_0_lang-CFDdUEnn.cjs +0 -1
- package/lib/accordion-section.vue_vue_type_style_index_0_lang-Gvjjx02P.js +0 -78
- package/lib/components-C63HJoCn.cjs +0 -1
- package/lib/components-q4Cf97bO.js +0 -24
- package/lib/hourglass-loading.cjs +0 -1
- package/lib/hourglass-loading.js +0 -4
- package/lib/hourglass-loading.vue_vue_type_style_index_0_lang-C72UVA9W.cjs +0 -1
- package/lib/hourglass-loading.vue_vue_type_style_index_0_lang-DkUGIxQ2.js +0 -22
- package/lib/label-button.cjs +0 -1
- package/lib/label-button.js +0 -4
- package/lib/label-button.vue_vue_type_style_index_0_lang-D7ZgfZOL.cjs +0 -1
- package/lib/label-button.vue_vue_type_style_index_0_lang-DqRYddVt.js +0 -44
- package/lib/label-icon.cjs +0 -1
- package/lib/label-icon.js +0 -4
- package/lib/label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs +0 -1
- package/lib/label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js +0 -38
- package/lib/page-section.cjs +0 -1
- package/lib/page-section.js +0 -4
- package/lib/page-section.vue_vue_type_style_index_0_lang-DEAkTLxd.cjs +0 -1
- package/lib/page-section.vue_vue_type_style_index_0_lang-DpVQe_rV.js +0 -54
- package/lib/page-title.cjs +0 -1
- package/lib/page-title.js +0 -4
- package/lib/page-title.vue_vue_type_style_index_0_lang-BqIsIks5.cjs +0 -1
- package/lib/page-title.vue_vue_type_style_index_0_lang-ChZot85K.js +0 -36
- package/lib/tab-content.cjs +0 -1
- package/lib/tab-content.js +0 -4
- package/lib/tab-content.vue_vue_type_style_index_0_lang-BeCi7Xkp.cjs +0 -1
- package/lib/tab-content.vue_vue_type_style_index_0_lang-CcQLHmIF.js +0 -44
- package/lib/tab-group.cjs +0 -1
- package/lib/tab-group.js +0 -4
- package/lib/tab-group.vue_vue_type_style_index_0_lang-C84mDEOC.js +0 -103
- package/lib/tab-group.vue_vue_type_style_index_0_lang-CMaufRJV.cjs +0 -1
- package/lib/use-shrinkable-CS2bmsJJ.js +0 -17
- package/lib/use-shrinkable-Cu9JQZll.cjs +0 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import type { ClassValue, StyleValue } from 'vue';
|
|
2
|
+
|
|
3
|
+
/** 列の値の型。ソートの比較方法を決める */
|
|
4
|
+
export type DataTableValueType = 'boolean' | 'string' | 'number' | 'object';
|
|
5
|
+
|
|
6
|
+
/** ソートの方式。page は表示中の行を並べ替えて表示し、remote はソート条件を通知するだけで利用側が再取得する */
|
|
7
|
+
export type DataTableSortMode = 'page' | 'remote';
|
|
8
|
+
|
|
9
|
+
/** コントロール(ページネーション・総件数・表示件数・ダウンロードボタン)を出す位置 */
|
|
10
|
+
export type DataTableControlsPlacement = 'both' | 'top' | 'bottom' | 'none';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* CSV に出力する列の定義
|
|
14
|
+
*/
|
|
15
|
+
export interface DataTableCsvColumn<T = unknown> {
|
|
16
|
+
/** true なら出力しない */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** 値を取り出すキー。ドット区切りで入れ子を辿る。未指定なら DataTableHeader.id。'$index' は行番号 */
|
|
19
|
+
key?: string;
|
|
20
|
+
/** 列名。未指定なら DataTableHeader.label。言語切替に追従させる場合は関数で渡す */
|
|
21
|
+
label?: string | (() => string);
|
|
22
|
+
/** 値の整形。指定したときは key を使わない */
|
|
23
|
+
format?: (row: T) => unknown;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* ヘッダの定義
|
|
28
|
+
*/
|
|
29
|
+
export interface DataTableHeader<T = unknown> {
|
|
30
|
+
/** 列を識別するキー。ソートで値を取り出すキーにもなる */
|
|
31
|
+
id: string;
|
|
32
|
+
/** 見出し。言語切替に追従させる場合は関数で渡す */
|
|
33
|
+
label: string | (() => string);
|
|
34
|
+
/** true なら label を HTML として描画する */
|
|
35
|
+
html?: boolean;
|
|
36
|
+
/** ソートで値を取り出すキー。id と違うキーで並べるときに指定する。ドット区切りで入れ子を辿る */
|
|
37
|
+
sortKey?: string;
|
|
38
|
+
/** 値の型。ソートの比較方法を決める。未指定なら string */
|
|
39
|
+
type?: DataTableValueType;
|
|
40
|
+
/** 行同士を比較する関数。指定したときは sortKey と type を使わない。昇順の並びで a が前なら負の数を返す */
|
|
41
|
+
compare?: (a: T, b: T) => number;
|
|
42
|
+
/** 列の幅。数値は px */
|
|
43
|
+
width?: string | number;
|
|
44
|
+
/** 列の最小幅。数値は px */
|
|
45
|
+
minWidth?: string | number;
|
|
46
|
+
/** 列の最大幅。数値は px */
|
|
47
|
+
maxWidth?: string | number;
|
|
48
|
+
/** th の rowspan */
|
|
49
|
+
rowspan?: string | number;
|
|
50
|
+
/** th の colspan */
|
|
51
|
+
colspan?: string | number;
|
|
52
|
+
/** th の title 属性 */
|
|
53
|
+
title?: string;
|
|
54
|
+
/** CSV の出力定義。true なら id の値を label の列名で出力する。未指定なら出力しない */
|
|
55
|
+
csv?: boolean | DataTableCsvColumn<T>[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 表示する文言。言語切替に追従させる場合は関数で渡す
|
|
60
|
+
*/
|
|
61
|
+
export interface DataTableLabels {
|
|
62
|
+
/** 総件数の見出し */
|
|
63
|
+
totalCount?: string | (() => string);
|
|
64
|
+
/** 総件数の後ろに付ける単位 */
|
|
65
|
+
totalUnit?: string | (() => string);
|
|
66
|
+
/** 1ページあたりの表示件数の見出し */
|
|
67
|
+
limit?: string | (() => string);
|
|
68
|
+
/** データが無いときの表示 */
|
|
69
|
+
noData?: string | (() => string);
|
|
70
|
+
/** ページ番号の選択の見出し。showPageSelect のときに表示する */
|
|
71
|
+
pageNumber?: string | (() => string);
|
|
72
|
+
/** ページダウンロードボタンの title */
|
|
73
|
+
downloadPage?: string | (() => string);
|
|
74
|
+
/** 全件ダウンロードボタンの title */
|
|
75
|
+
downloadAll?: string | (() => string);
|
|
76
|
+
/** 先頭ページへ移動するボタンの読み上げ名 */
|
|
77
|
+
firstPage?: string | (() => string);
|
|
78
|
+
/** 前のページへ移動するボタンの読み上げ名 */
|
|
79
|
+
previousPage?: string | (() => string);
|
|
80
|
+
/** 前のページ番号の組へ移動するボタンの読み上げ名 */
|
|
81
|
+
previousPages?: string | (() => string);
|
|
82
|
+
/** 次のページ番号の組へ移動するボタンの読み上げ名 */
|
|
83
|
+
nextPages?: string | (() => string);
|
|
84
|
+
/** 次のページへ移動するボタンの読み上げ名 */
|
|
85
|
+
nextPage?: string | (() => string);
|
|
86
|
+
/** 末尾ページへ移動するボタンの読み上げ名 */
|
|
87
|
+
lastPage?: string | (() => string);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** 関数を評価した後の文言 */
|
|
91
|
+
export type DataTableResolvedLabels = Record<keyof DataTableLabels, string>;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* DataTable の props
|
|
95
|
+
*/
|
|
96
|
+
export interface DataTableProps<T = unknown> {
|
|
97
|
+
/** 表示している行のデータ。スロットで描画する行と同じ順に並んでいること */
|
|
98
|
+
dataList: T[];
|
|
99
|
+
/** ヘッダ。id は一意であること */
|
|
100
|
+
headers: DataTableHeader<T>[];
|
|
101
|
+
/** 読み込み中。true の間は行を描画せず読み込み中の表示を出す */
|
|
102
|
+
loading?: boolean;
|
|
103
|
+
/** 総件数。未指定なら dataList の件数 */
|
|
104
|
+
totalCount?: number;
|
|
105
|
+
/** 現在ページ(1起点) */
|
|
106
|
+
current?: number;
|
|
107
|
+
/** 1ページあたりの表示件数 */
|
|
108
|
+
limit?: number;
|
|
109
|
+
/** 1ページあたりの表示件数の上限 */
|
|
110
|
+
maxLimit?: number;
|
|
111
|
+
/** ページネーションに並べるページ番号の最大数 */
|
|
112
|
+
maxPagination?: number;
|
|
113
|
+
/** 行をクリックで選択できるか */
|
|
114
|
+
selectable?: boolean;
|
|
115
|
+
/** コントロールを出す位置 */
|
|
116
|
+
controls?: DataTableControlsPlacement;
|
|
117
|
+
/** ページネーションを出す位置。controls が無い側には出ない */
|
|
118
|
+
pagination?: DataTableControlsPlacement;
|
|
119
|
+
/** ページダウンロードボタンを表示するか */
|
|
120
|
+
showDownloadPage?: boolean;
|
|
121
|
+
/** 全件ダウンロードボタンを表示するか */
|
|
122
|
+
showDownloadAll?: boolean;
|
|
123
|
+
/** 総件数を表示するか */
|
|
124
|
+
showTotal?: boolean;
|
|
125
|
+
/** 1ページあたりの表示件数の入力を表示するか */
|
|
126
|
+
showLimit?: boolean;
|
|
127
|
+
/** ページネーションにページ番号の選択を表示するか */
|
|
128
|
+
showPageSelect?: boolean;
|
|
129
|
+
/** dataList が空のときにデータが無い旨の行を表示するか */
|
|
130
|
+
showNoData?: boolean;
|
|
131
|
+
/** ヘッダの境界のドラッグで列幅を変えられるか */
|
|
132
|
+
resizable?: boolean;
|
|
133
|
+
/** ヘッダのクリックでソートできるか */
|
|
134
|
+
sortable?: boolean;
|
|
135
|
+
/** ソートの方式。未指定なら remote */
|
|
136
|
+
sortMode?: DataTableSortMode;
|
|
137
|
+
/** テーブルをスクロールする領域に付ける class */
|
|
138
|
+
contentClass?: ClassValue;
|
|
139
|
+
/** テーブルをスクロールする領域に付ける style */
|
|
140
|
+
contentStyle?: StyleValue;
|
|
141
|
+
/** table に付ける class */
|
|
142
|
+
tableClass?: ClassValue;
|
|
143
|
+
/** table に付ける style */
|
|
144
|
+
tableStyle?: StyleValue;
|
|
145
|
+
/** 表示する文言。未指定の項目は英語 */
|
|
146
|
+
labels?: DataTableLabels;
|
|
147
|
+
/** 総件数の整形。未指定なら en-US の桁区切り。SSR とクライアントで同じ文字列を返すこと */
|
|
148
|
+
formatTotalCount?: (count: number) => string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* DataTable が発行するイベント
|
|
153
|
+
*/
|
|
154
|
+
export interface DataTableEmits<T = unknown> {
|
|
155
|
+
/** 選択が変わった。クリックでの選択・解除、カーソルキーでの移動、読み込み完了時の解除で発行する。解除は undefined と -1 */
|
|
156
|
+
(e: 'emit:selectRow', value: T | undefined, index: number): void;
|
|
157
|
+
/** ソートの条件が変わった。sortMode に関わらず発行する */
|
|
158
|
+
(e: 'emit:changeSort', context: DataTableSortContext): void;
|
|
159
|
+
(e: 'emit:updateHeader', headers: DataTableHeader<T>[]): void;
|
|
160
|
+
(e: 'emit:dblclickRow', value: T, index: number): void;
|
|
161
|
+
(e: 'emit:changeLimit', limit: number): void;
|
|
162
|
+
(e: 'emit:changePage', page: number): void;
|
|
163
|
+
(e: 'emit:downloadPage'): void;
|
|
164
|
+
(e: 'emit:downloadAll'): void;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* DataTable のスロット
|
|
169
|
+
*/
|
|
170
|
+
export interface DataTableSlots<T = unknown> {
|
|
171
|
+
/** 行。tr を rows と同じ順に並べ、tr の click で clickRow(row, index) を呼ぶ */
|
|
172
|
+
default?(props: {
|
|
173
|
+
/** 表示する行。sortMode が page のときはソートした順、それ以外は dataList そのもの */
|
|
174
|
+
rows: T[];
|
|
175
|
+
/** 行を選択する。選択している行なら選択を解除する */
|
|
176
|
+
clickRow: (row: T, index: number) => void;
|
|
177
|
+
/** 行を選択してダブルクリックを通知する */
|
|
178
|
+
dblclickRow: (row: T, index: number) => void;
|
|
179
|
+
/** 行のインデックスから、ページをまたいだ1起点の行番号を返す */
|
|
180
|
+
rowNumber: (index: number) => number;
|
|
181
|
+
/** 選択している行のインデックス。選択していなければ -1 */
|
|
182
|
+
selectedIndex: number;
|
|
183
|
+
}): unknown;
|
|
184
|
+
/** 読み込み中の表示。未指定なら既定のスピナー */
|
|
185
|
+
loading?(): unknown;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* ソートの状態
|
|
190
|
+
*/
|
|
191
|
+
export interface DataTableSortContext {
|
|
192
|
+
/** ソートしているヘッダの id。ソートしていなければ空文字 */
|
|
193
|
+
sortKey: string;
|
|
194
|
+
/** 降順なら true */
|
|
195
|
+
descending: boolean;
|
|
196
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** モーダルダイアログの種類 */
|
|
2
|
+
export type ModalDialogType = 'info' | 'confirm' | 'warn' | 'error';
|
|
3
|
+
|
|
4
|
+
/** モーダルダイアログに並べるボタンの種類 */
|
|
5
|
+
export type ModalDialogButton = 'ok' | 'yes' | 'no' | 'cancel';
|
|
6
|
+
|
|
7
|
+
/** モーダルダイアログを閉じたボタン。Esc で閉じたときは cancel */
|
|
8
|
+
export type ModalDialogResult = ModalDialogButton;
|
|
9
|
+
|
|
10
|
+
/** モーダルダイアログに表示する画像。文字列は画像の URL */
|
|
11
|
+
export type ModalDialogImage = string | {
|
|
12
|
+
/** 画像の URL */
|
|
13
|
+
src: string;
|
|
14
|
+
/** 代替テキスト */
|
|
15
|
+
alt: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** ドラッグで移動するときに掴む範囲。body はウィンドウ全体、header は見出しだけ */
|
|
2
|
+
export type MovableWindowDragMode = 'body' | 'header';
|
|
3
|
+
|
|
4
|
+
/** showOverlayBox / showFloatingComponent が中身のコンポーネントに props として渡す関数 */
|
|
5
|
+
export interface MovableWindowContentProps {
|
|
6
|
+
/** ウィンドウを閉じる */
|
|
7
|
+
close: () => void;
|
|
8
|
+
/** ウィンドウのローディング表示を切り替える */
|
|
9
|
+
setLoading: (loading: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** showOverlayBox / showFloatingComponent が返す、表示中のウィンドウを操作するためのハンドル */
|
|
13
|
+
export interface MovableWindowHandle {
|
|
14
|
+
/** ウィンドウを閉じ、閉じ終わったら取り外す */
|
|
15
|
+
close: () => void;
|
|
16
|
+
/** ウィンドウのローディング表示を切り替える */
|
|
17
|
+
setLoading: (loading: boolean) => void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
警告ポップアップ
|
|
3
|
+
アイコンにマウスを載せている、またはフォーカスしている間だけ警告文を表示する。
|
|
4
|
+
-->
|
|
5
|
+
<template>
|
|
6
|
+
<IconPopper
|
|
7
|
+
class="dwui-warning-popper"
|
|
8
|
+
popover-class="dwui-warning-popper-popover"
|
|
9
|
+
:placement="props.placement"
|
|
10
|
+
:arrow="props.arrow"
|
|
11
|
+
:label="props.label"
|
|
12
|
+
@emit:open="emit('emit:open')"
|
|
13
|
+
@emit:close="emit('emit:close')"
|
|
14
|
+
>
|
|
15
|
+
<template #icon>
|
|
16
|
+
<slot name="icon">
|
|
17
|
+
<SvgWarningSign />
|
|
18
|
+
</slot>
|
|
19
|
+
</template>
|
|
20
|
+
<slot />
|
|
21
|
+
</IconPopper>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { SvgWarningSign } from '@digitalwalletcorp/vue-svg-icons';
|
|
26
|
+
import IconPopper from '@/internal/icon-popper.vue';
|
|
27
|
+
import type { PopoverPlacement } from '@/internal/anchored-position';
|
|
28
|
+
|
|
29
|
+
export interface Props {
|
|
30
|
+
/** アイコンに対するパネルの表示位置。収まらないときは反対側に出す */
|
|
31
|
+
placement?: PopoverPlacement;
|
|
32
|
+
/** アイコンを指す矢印をパネルに付ける */
|
|
33
|
+
arrow?: boolean;
|
|
34
|
+
/** アイコンの読み上げ名 */
|
|
35
|
+
label?: string;
|
|
36
|
+
}
|
|
37
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
38
|
+
placement: 'right',
|
|
39
|
+
arrow: true,
|
|
40
|
+
label: 'Warning'
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export interface Emits {
|
|
44
|
+
(e: 'emit:open'): void;
|
|
45
|
+
(e: 'emit:close'): void;
|
|
46
|
+
}
|
|
47
|
+
const emit = defineEmits<Emits>();
|
|
48
|
+
|
|
49
|
+
export interface Slots {
|
|
50
|
+
/** アイコン */
|
|
51
|
+
icon?(): unknown;
|
|
52
|
+
/** パネルに表示する中身 */
|
|
53
|
+
default?(): unknown;
|
|
54
|
+
}
|
|
55
|
+
defineSlots<Slots>();
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<style>
|
|
59
|
+
:where(.dwui-warning-popper-popover) {
|
|
60
|
+
--dwui-max-width-anchored-popover: var(--dwui-max-width-warning-popper, calc(100vw - 16px));
|
|
61
|
+
--dwui-max-height-anchored-popover: var(--dwui-max-height-warning-popper, calc(100vh - 16px));
|
|
62
|
+
--dwui-padding-anchored-popover: var(--dwui-padding-warning-popper, 0.67em 1em);
|
|
63
|
+
--dwui-border-color-anchored-popover: var(--dwui-border-color-warning-popper, light-dark(#8f8f8f, #6b6f76));
|
|
64
|
+
--dwui-radius-anchored-popover: var(--dwui-radius-warning-popper, 4px);
|
|
65
|
+
--dwui-background-anchored-popover: var(--dwui-background-warning-popper, Canvas);
|
|
66
|
+
--dwui-background-anchored-popover-arrow: var(--dwui-background-warning-popper-arrow, var(--dwui-background-warning-popper, Canvas));
|
|
67
|
+
--dwui-color-text-anchored-popover: var(--dwui-color-text-warning-popper, CanvasText);
|
|
68
|
+
--dwui-box-shadow-anchored-popover: var(--dwui-box-shadow-warning-popper, 0 2px 8px rgba(0, 0, 0, 0.25));
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./accordion-fieldset.vue_vue_type_style_index_0_lang-DoM5QjpJ.cjs");exports.default=e._sfc_main;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, useSlots as m, ref as g, reactive as _, onMounted as x, openBlock as i, createElementBlock as k, createElementVNode as d, createVNode as C, unref as s, createBlock as b, createSlots as h, withCtx as r, renderSlot as l, createTextVNode as w, toDisplayString as y, createCommentVNode as B, normalizeClass as S } from "vue";
|
|
2
|
-
import { SvgTriangleButton as v } from "@digitalwalletcorp/vue-svg-icons";
|
|
3
|
-
import { _ as E } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
|
|
4
|
-
import { u as N } from "./use-shrinkable-CS2bmsJJ.js";
|
|
5
|
-
const V = ["disabled"], $ = { class: "dwui-accordion-legend" }, T = ["aria-expanded"], A = /* @__PURE__ */ f({
|
|
6
|
-
__name: "accordion-fieldset",
|
|
7
|
-
props: {
|
|
8
|
-
legend: {},
|
|
9
|
-
disabled: { type: Boolean },
|
|
10
|
-
initialExpand: { type: Boolean }
|
|
11
|
-
},
|
|
12
|
-
setup(c) {
|
|
13
|
-
const n = c, o = m(), a = g(), e = _({
|
|
14
|
-
expanded: !0
|
|
15
|
-
}), p = N(a), u = () => {
|
|
16
|
-
e.expanded = !e.expanded;
|
|
17
|
-
};
|
|
18
|
-
return x(() => {
|
|
19
|
-
e.expanded = !!n.initialExpand;
|
|
20
|
-
}), (t, z) => (i(), k("fieldset", {
|
|
21
|
-
class: "dwui-accordion-fieldset",
|
|
22
|
-
disabled: n.disabled
|
|
23
|
-
}, [
|
|
24
|
-
d("legend", $, [
|
|
25
|
-
d("button", {
|
|
26
|
-
type: "button",
|
|
27
|
-
class: "dwui-accordion-toggle",
|
|
28
|
-
"aria-expanded": e.expanded,
|
|
29
|
-
onClick: u
|
|
30
|
-
}, [
|
|
31
|
-
C(s(v), {
|
|
32
|
-
direction: e.expanded ? "up" : "down"
|
|
33
|
-
}, null, 8, ["direction"]),
|
|
34
|
-
n.legend != null || o.legend != null || o.icon != null ? (i(), b(E, { key: 0 }, h({ _: 2 }, [
|
|
35
|
-
o.icon != null ? {
|
|
36
|
-
name: "icon",
|
|
37
|
-
fn: r(() => [
|
|
38
|
-
l(t.$slots, "icon")
|
|
39
|
-
]),
|
|
40
|
-
key: "0"
|
|
41
|
-
} : void 0,
|
|
42
|
-
n.legend != null || o.legend != null ? {
|
|
43
|
-
name: "default",
|
|
44
|
-
fn: r(() => [
|
|
45
|
-
l(t.$slots, "legend", {}, () => [
|
|
46
|
-
w(y(n.legend), 1)
|
|
47
|
-
])
|
|
48
|
-
]),
|
|
49
|
-
key: "1"
|
|
50
|
-
} : void 0
|
|
51
|
-
]), 1024)) : B("", !0)
|
|
52
|
-
], 8, T)
|
|
53
|
-
]),
|
|
54
|
-
d("div", {
|
|
55
|
-
ref_key: "refContents",
|
|
56
|
-
ref: a,
|
|
57
|
-
class: S(["dwui-accordion-contents", s(p) ? e.expanded ? "dwui-expanded" : "dwui-shrunk" : ""])
|
|
58
|
-
}, [
|
|
59
|
-
l(t.$slots, "default")
|
|
60
|
-
], 2)
|
|
61
|
-
], 8, V));
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
export {
|
|
65
|
-
A as _
|
|
66
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),c=require("@digitalwalletcorp/vue-svg-icons"),r=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),u=require("./use-shrinkable-Cu9JQZll.cjs"),p=["disabled"],_={class:"dwui-accordion-legend"},g=["aria-expanded"],f=e.defineComponent({__name:"accordion-fieldset",props:{legend:{},disabled:{type:Boolean},initialExpand:{type:Boolean}},setup(s){const t=s,o=e.useSlots(),l=e.ref(),n=e.reactive({expanded:!0}),a=u.useShrinkable(l),i=()=>{n.expanded=!n.expanded};return e.onMounted(()=>{n.expanded=!!t.initialExpand}),(d,x)=>(e.openBlock(),e.createElementBlock("fieldset",{class:"dwui-accordion-fieldset",disabled:t.disabled},[e.createElementVNode("legend",_,[e.createElementVNode("button",{type:"button",class:"dwui-accordion-toggle","aria-expanded":n.expanded,onClick:i},[e.createVNode(e.unref(c.SvgTriangleButton),{direction:n.expanded?"up":"down"},null,8,["direction"]),t.legend!=null||o.legend!=null||o.icon!=null?(e.openBlock(),e.createBlock(r._sfc_main,{key:0},e.createSlots({_:2},[o.icon!=null?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"icon")]),key:"0"}:void 0,t.legend!=null||o.legend!=null?{name:"default",fn:e.withCtx(()=>[e.renderSlot(d.$slots,"legend",{},()=>[e.createTextVNode(e.toDisplayString(t.legend),1)])]),key:"1"}:void 0]),1024)):e.createCommentVNode("",!0)],8,g)]),e.createElementVNode("div",{ref_key:"refContents",ref:l,class:e.normalizeClass(["dwui-accordion-contents",e.unref(a)?n.expanded?"dwui-expanded":"dwui-shrunk":""])},[e.renderSlot(d.$slots,"default")],2)],8,p))}});exports._sfc_main=f;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./accordion-section.vue_vue_type_style_index_0_lang-CFDdUEnn.cjs");exports.default=e._sfc_main;
|
package/lib/accordion-section.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),k=require("@digitalwalletcorp/vue-svg-icons"),v=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),x=require("./use-shrinkable-Cu9JQZll.cjs"),f={class:"dwui-accordion-section"},g={key:0,class:"dwui-accordion-section-control"},m=["disabled","aria-expanded"],b=e.defineComponent({__name:"accordion-section",props:{disabled:{type:Boolean},initialExpand:{type:Boolean},noGradient:{type:Boolean},openLabel:{},closeLabel:{},openPreset:{},closePreset:{}},setup(u){const o=u,l=e.useSlots(),r=e.ref(),n=e.reactive({expanded:!0}),d=x.useShrinkable(r),s=e.computed(()=>n.expanded?o.closePreset:o.openPreset),a=()=>(n.expanded?l["close-icon"]:l["open-icon"])??s.value?.icon,p=()=>(n.expanded?l["close-icon"]:l["open-icon"])==null?s.value?.iconProps:void 0,i=e.computed(()=>{const t=n.expanded?o.closeLabel:o.openLabel;if(t!=null)return t;const c=s.value?.label;return typeof c=="function"?c():c}),_=()=>{n.expanded=!n.expanded};return e.onMounted(()=>{n.expanded=!!o.initialExpand}),(t,c)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",{ref_key:"refContents",ref:r,class:e.normalizeClass(["dwui-accordion-section-contents",[e.unref(d)?n.expanded?"dwui-expanded":"dwui-shrunk":"",{"dwui-no-gradient":o.noGradient}]])},[e.renderSlot(t.$slots,"default")],2),e.unref(d)?(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("button",{type:"button",class:"dwui-accordion-section-toggle",disabled:o.disabled,"aria-expanded":n.expanded,onClick:e.withModifiers(_,["stop"])},[a()!=null||i.value!=null?(e.openBlock(),e.createBlock(v._sfc_main,{key:0},e.createSlots({_:2},[a()!=null?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a()),e.normalizeProps(e.guardReactiveProps(p())),null,16))]),key:"0"}:void 0,i.value!=null?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),key:"1"}:void 0]),1024)):(e.openBlock(),e.createBlock(e.unref(k.SvgTriangleButton),{key:1,direction:n.expanded?"up":"down"},null,8,["direction"]))],8,m)])):e.createCommentVNode("",!0)]))}});exports._sfc_main=b;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { defineComponent as k, useSlots as y, ref as w, reactive as C, computed as m, onMounted as h, openBlock as t, createElementBlock as f, createElementVNode as x, normalizeClass as P, unref as d, renderSlot as B, withModifiers as L, createBlock as r, createSlots as S, withCtx as g, resolveDynamicComponent as E, normalizeProps as N, guardReactiveProps as T, createTextVNode as V, toDisplayString as z, createCommentVNode as D } from "vue";
|
|
2
|
-
import { SvgTriangleButton as G } from "@digitalwalletcorp/vue-svg-icons";
|
|
3
|
-
import { _ as I } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
|
|
4
|
-
import { u as M } from "./use-shrinkable-CS2bmsJJ.js";
|
|
5
|
-
const $ = { class: "dwui-accordion-section" }, R = {
|
|
6
|
-
key: 0,
|
|
7
|
-
class: "dwui-accordion-section-control"
|
|
8
|
-
}, j = ["disabled", "aria-expanded"], J = /* @__PURE__ */ k({
|
|
9
|
-
__name: "accordion-section",
|
|
10
|
-
props: {
|
|
11
|
-
disabled: { type: Boolean },
|
|
12
|
-
initialExpand: { type: Boolean },
|
|
13
|
-
noGradient: { type: Boolean },
|
|
14
|
-
openLabel: {},
|
|
15
|
-
closeLabel: {},
|
|
16
|
-
openPreset: {},
|
|
17
|
-
closePreset: {}
|
|
18
|
-
},
|
|
19
|
-
setup(_) {
|
|
20
|
-
const o = _, s = y(), p = w(), e = C({
|
|
21
|
-
expanded: !0
|
|
22
|
-
}), u = M(p), l = m(() => e.expanded ? o.closePreset : o.openPreset), i = () => (e.expanded ? s["close-icon"] : s["open-icon"]) ?? l.value?.icon, b = () => (e.expanded ? s["close-icon"] : s["open-icon"]) == null ? l.value?.iconProps : void 0, c = m(() => {
|
|
23
|
-
const n = e.expanded ? o.closeLabel : o.openLabel;
|
|
24
|
-
if (n != null)
|
|
25
|
-
return n;
|
|
26
|
-
const a = l.value?.label;
|
|
27
|
-
return typeof a == "function" ? a() : a;
|
|
28
|
-
}), v = () => {
|
|
29
|
-
e.expanded = !e.expanded;
|
|
30
|
-
};
|
|
31
|
-
return h(() => {
|
|
32
|
-
e.expanded = !!o.initialExpand;
|
|
33
|
-
}), (n, a) => (t(), f("div", $, [
|
|
34
|
-
x("div", {
|
|
35
|
-
ref_key: "refContents",
|
|
36
|
-
ref: p,
|
|
37
|
-
class: P(["dwui-accordion-section-contents", [
|
|
38
|
-
d(u) ? e.expanded ? "dwui-expanded" : "dwui-shrunk" : "",
|
|
39
|
-
{ "dwui-no-gradient": o.noGradient }
|
|
40
|
-
]])
|
|
41
|
-
}, [
|
|
42
|
-
B(n.$slots, "default")
|
|
43
|
-
], 2),
|
|
44
|
-
d(u) ? (t(), f("div", R, [
|
|
45
|
-
x("button", {
|
|
46
|
-
type: "button",
|
|
47
|
-
class: "dwui-accordion-section-toggle",
|
|
48
|
-
disabled: o.disabled,
|
|
49
|
-
"aria-expanded": e.expanded,
|
|
50
|
-
onClick: L(v, ["stop"])
|
|
51
|
-
}, [
|
|
52
|
-
i() != null || c.value != null ? (t(), r(I, { key: 0 }, S({ _: 2 }, [
|
|
53
|
-
i() != null ? {
|
|
54
|
-
name: "icon",
|
|
55
|
-
fn: g(() => [
|
|
56
|
-
(t(), r(E(i()), N(T(b())), null, 16))
|
|
57
|
-
]),
|
|
58
|
-
key: "0"
|
|
59
|
-
} : void 0,
|
|
60
|
-
c.value != null ? {
|
|
61
|
-
name: "default",
|
|
62
|
-
fn: g(() => [
|
|
63
|
-
V(z(c.value), 1)
|
|
64
|
-
]),
|
|
65
|
-
key: "1"
|
|
66
|
-
} : void 0
|
|
67
|
-
]), 1024)) : (t(), r(d(G), {
|
|
68
|
-
key: 1,
|
|
69
|
-
direction: e.expanded ? "up" : "down"
|
|
70
|
-
}, null, 8, ["direction"]))
|
|
71
|
-
], 8, j)
|
|
72
|
-
])) : D("", !0)
|
|
73
|
-
]));
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
export {
|
|
77
|
-
J as _
|
|
78
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./accordion-fieldset.vue_vue_type_style_index_0_lang-DoM5QjpJ.cjs"),_=require("./accordion-section.vue_vue_type_style_index_0_lang-CFDdUEnn.cjs"),n=require("./hourglass-loading.vue_vue_type_style_index_0_lang-C72UVA9W.cjs"),t=require("./label-button.vue_vue_type_style_index_0_lang-D7ZgfZOL.cjs"),i=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),o=require("./page-section.vue_vue_type_style_index_0_lang-DEAkTLxd.cjs"),a=require("./page-title.vue_vue_type_style_index_0_lang-BqIsIks5.cjs"),c=require("./tab-content.vue_vue_type_style_index_0_lang-BeCi7Xkp.cjs"),s=require("./tab-group.vue_vue_type_style_index_0_lang-CMaufRJV.cjs"),u=Object.freeze(Object.defineProperty({__proto__:null,AccordionFieldset:e._sfc_main,AccordionSection:_._sfc_main,HourglassLoading:n._sfc_main,LabelButton:t._sfc_main,LabelIcon:i._sfc_main,PageSection:o._sfc_main,PageTitle:a._sfc_main,TabContent:c._sfc_main,TabGroup:s._sfc_main},Symbol.toStringTag,{value:"Module"}));exports.components=u;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { _ as o } from "./accordion-fieldset.vue_vue_type_style_index_0_lang-Cf4czDXz.js";
|
|
2
|
-
import { _ } from "./accordion-section.vue_vue_type_style_index_0_lang-Gvjjx02P.js";
|
|
3
|
-
import { _ as a } from "./hourglass-loading.vue_vue_type_style_index_0_lang-DkUGIxQ2.js";
|
|
4
|
-
import { _ as m } from "./label-button.vue_vue_type_style_index_0_lang-DqRYddVt.js";
|
|
5
|
-
import { _ as r } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
|
|
6
|
-
import { _ as i } from "./page-section.vue_vue_type_style_index_0_lang-DpVQe_rV.js";
|
|
7
|
-
import { _ as t } from "./page-title.vue_vue_type_style_index_0_lang-ChZot85K.js";
|
|
8
|
-
import { _ as n } from "./tab-content.vue_vue_type_style_index_0_lang-CcQLHmIF.js";
|
|
9
|
-
import { _ as s } from "./tab-group.vue_vue_type_style_index_0_lang-C84mDEOC.js";
|
|
10
|
-
const u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
11
|
-
__proto__: null,
|
|
12
|
-
AccordionFieldset: o,
|
|
13
|
-
AccordionSection: _,
|
|
14
|
-
HourglassLoading: a,
|
|
15
|
-
LabelButton: m,
|
|
16
|
-
LabelIcon: r,
|
|
17
|
-
PageSection: i,
|
|
18
|
-
PageTitle: t,
|
|
19
|
-
TabContent: n,
|
|
20
|
-
TabGroup: s
|
|
21
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
22
|
-
export {
|
|
23
|
-
u as c
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./hourglass-loading.vue_vue_type_style_index_0_lang-C72UVA9W.cjs");exports.default=e._sfc_main;
|
package/lib/hourglass-loading.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),r=require("@digitalwalletcorp/vue-svg-icons"),i=e.defineComponent({__name:"hourglass-loading",props:{loading:{type:Boolean},duration:{},size:{default:"1.2em"}},setup(n){const o=n;return(s,a)=>o.loading?(e.openBlock(),e.createBlock(e.unref(r.SvgHourglass),{key:0,duration:o.duration,size:o.size,class:"dwui-hourglass-loading"},null,8,["duration","size"])):e.renderSlot(s.$slots,"default",{},void 0,void 0,1)}});exports._sfc_main=i;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { defineComponent as r, openBlock as s, createBlock as a, unref as i, renderSlot as t } from "vue";
|
|
2
|
-
import { SvgHourglass as l } from "@digitalwalletcorp/vue-svg-icons";
|
|
3
|
-
const c = /* @__PURE__ */ r({
|
|
4
|
-
__name: "hourglass-loading",
|
|
5
|
-
props: {
|
|
6
|
-
loading: { type: Boolean },
|
|
7
|
-
duration: {},
|
|
8
|
-
size: { default: "1.2em" }
|
|
9
|
-
},
|
|
10
|
-
setup(e) {
|
|
11
|
-
const o = e;
|
|
12
|
-
return (n, d) => o.loading ? (s(), a(i(l), {
|
|
13
|
-
key: 0,
|
|
14
|
-
duration: o.duration,
|
|
15
|
-
size: o.size,
|
|
16
|
-
class: "dwui-hourglass-loading"
|
|
17
|
-
}, null, 8, ["duration", "size"])) : t(n.$slots, "default", {}, void 0, void 0, 1);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
export {
|
|
21
|
-
c as _
|
|
22
|
-
};
|
package/lib/label-button.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./label-button.vue_vue_type_style_index_0_lang-D7ZgfZOL.cjs");exports.default=e._sfc_main;
|
package/lib/label-button.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),o=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs"),a={class:"dwui-label-button"},c=e.defineComponent({__name:"label-button",props:{preset:{},gap:{},iconClass:{type:[Boolean,null,String,Object,Array]},iconStyle:{type:[Boolean,null,String,Object,Array]},labelClass:{type:[Boolean,null,String,Object,Array]},labelStyle:{type:[Boolean,null,String,Object,Array]}},setup(s){const l=s,t=e.useSlots();return(n,r)=>(e.openBlock(),e.createElementBlock("button",a,[e.createVNode(o._sfc_main,{preset:l.preset,gap:l.gap,"icon-class":l.iconClass,"icon-style":l.iconStyle,"label-class":l.labelClass,"label-style":l.labelStyle},e.createSlots({_:2},[t.icon!=null?{name:"icon",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"icon")]),key:"0"}:void 0,t.default!=null?{name:"default",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),key:"1"}:void 0]),1032,["preset","gap","icon-class","icon-style","label-class","label-style"])]))}});exports._sfc_main=c;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { defineComponent as a, useSlots as c, openBlock as r, createElementBlock as i, createVNode as p, createSlots as y, withCtx as o, renderSlot as n } from "vue";
|
|
2
|
-
import { _ as b } from "./label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js";
|
|
3
|
-
const u = { class: "dwui-label-button" }, d = /* @__PURE__ */ a({
|
|
4
|
-
__name: "label-button",
|
|
5
|
-
props: {
|
|
6
|
-
preset: {},
|
|
7
|
-
gap: {},
|
|
8
|
-
iconClass: { type: [Boolean, null, String, Object, Array] },
|
|
9
|
-
iconStyle: { type: [Boolean, null, String, Object, Array] },
|
|
10
|
-
labelClass: { type: [Boolean, null, String, Object, Array] },
|
|
11
|
-
labelStyle: { type: [Boolean, null, String, Object, Array] }
|
|
12
|
-
},
|
|
13
|
-
setup(s) {
|
|
14
|
-
const e = s, l = c();
|
|
15
|
-
return (t, m) => (r(), i("button", u, [
|
|
16
|
-
p(b, {
|
|
17
|
-
preset: e.preset,
|
|
18
|
-
gap: e.gap,
|
|
19
|
-
"icon-class": e.iconClass,
|
|
20
|
-
"icon-style": e.iconStyle,
|
|
21
|
-
"label-class": e.labelClass,
|
|
22
|
-
"label-style": e.labelStyle
|
|
23
|
-
}, y({ _: 2 }, [
|
|
24
|
-
l.icon != null ? {
|
|
25
|
-
name: "icon",
|
|
26
|
-
fn: o(() => [
|
|
27
|
-
n(t.$slots, "icon")
|
|
28
|
-
]),
|
|
29
|
-
key: "0"
|
|
30
|
-
} : void 0,
|
|
31
|
-
l.default != null ? {
|
|
32
|
-
name: "default",
|
|
33
|
-
fn: o(() => [
|
|
34
|
-
n(t.$slots, "default")
|
|
35
|
-
]),
|
|
36
|
-
key: "1"
|
|
37
|
-
} : void 0
|
|
38
|
-
]), 1032, ["preset", "gap", "icon-class", "icon-style", "label-class", "label-style"])
|
|
39
|
-
]));
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
export {
|
|
43
|
-
d as _
|
|
44
|
-
};
|
package/lib/label-icon.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs");exports.default=e._sfc_main;
|
package/lib/label-icon.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),s=e.defineComponent({__name:"label-icon",props:{preset:{},gap:{},iconClass:{type:[Boolean,null,String,Object,Array]},iconStyle:{type:[Boolean,null,String,Object,Array]},labelClass:{type:[Boolean,null,String,Object,Array]},labelStyle:{type:[Boolean,null,String,Object,Array]}},setup(n){const l=n,o=e.useSlots();return(t,a)=>(e.openBlock(),e.createElementBlock("span",{class:"dwui-label-icon",style:e.normalizeStyle(l.gap==null?void 0:{"--dwui-gap-label-icon":l.gap})},[e.renderSlot(t.$slots,"icon",{},()=>[l.preset!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.preset.icon),e.mergeProps({key:0},l.preset.iconProps,{class:l.iconClass,style:l.iconStyle}),null,16,["class","style"])):e.createCommentVNode("",!0)]),o.default!=null||l.preset!=null?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["dwui-label",l.labelClass]),style:e.normalizeStyle(l.labelStyle)},[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(typeof l.preset?.label=="function"?l.preset.label():l.preset?.label),1)])],6)):e.createCommentVNode("",!0)],4))}});exports._sfc_main=s;
|