@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.
Files changed (188) hide show
  1. package/README.md +79 -3
  2. package/lib/accordion-fieldset.d.cts +14 -4
  3. package/lib/accordion-fieldset.d.ts +14 -4
  4. package/lib/accordion-section.d.cts +20 -10
  5. package/lib/accordion-section.d.ts +20 -10
  6. package/lib/components-BuTJ1wX8.js +26 -0
  7. package/lib/components-CKql5lWg.cjs +1 -0
  8. package/lib/components.d.cts +10 -0
  9. package/lib/components.d.ts +10 -0
  10. package/lib/copy-button.d.cts +34 -0
  11. package/lib/copy-button.d.ts +34 -0
  12. package/lib/dark-mode-selector.d.cts +32 -0
  13. package/lib/dark-mode-selector.d.ts +32 -0
  14. package/lib/data-table.d.cts +29 -0
  15. package/lib/data-table.d.ts +29 -0
  16. package/lib/help-button.d.cts +39 -0
  17. package/lib/help-button.d.ts +39 -0
  18. package/lib/help-popper.d.cts +39 -0
  19. package/lib/help-popper.d.ts +39 -0
  20. package/lib/helpers/data-table-csv.d.cts +17 -0
  21. package/lib/helpers/data-table-csv.d.ts +17 -0
  22. package/lib/helpers/show-floating-component.d.cts +86 -0
  23. package/lib/helpers/show-floating-component.d.ts +86 -0
  24. package/lib/helpers/show-modal-dialog.d.cts +73 -0
  25. package/lib/helpers/show-modal-dialog.d.ts +73 -0
  26. package/lib/helpers/show-overlay-box.d.cts +53 -0
  27. package/lib/helpers/show-overlay-box.d.ts +53 -0
  28. package/lib/helpers/show-screen-loading.d.cts +20 -0
  29. package/lib/helpers/show-screen-loading.d.ts +20 -0
  30. package/lib/helpers/show-snackbar.d.cts +47 -0
  31. package/lib/helpers/show-snackbar.d.ts +47 -0
  32. package/lib/hourglass-loading.d.cts +1 -1
  33. package/lib/hourglass-loading.d.ts +1 -1
  34. package/lib/index.cjs +1 -1
  35. package/lib/index.d.cts +34 -0
  36. package/lib/index.d.ts +34 -0
  37. package/lib/index.js +445 -18
  38. package/lib/internal/anchored-popover.d.cts +35 -0
  39. package/lib/internal/anchored-popover.d.ts +35 -0
  40. package/lib/internal/anchored-position.d.cts +50 -0
  41. package/lib/internal/anchored-position.d.ts +50 -0
  42. package/lib/internal/data-table-controls.d.cts +42 -0
  43. package/lib/internal/data-table-controls.d.ts +42 -0
  44. package/lib/internal/data-table-value.d.cts +32 -0
  45. package/lib/internal/data-table-value.d.ts +32 -0
  46. package/lib/internal/floating-component.d.cts +52 -0
  47. package/lib/internal/floating-component.d.ts +52 -0
  48. package/lib/internal/icon-popper.d.cts +32 -0
  49. package/lib/internal/icon-popper.d.ts +32 -0
  50. package/lib/internal/mount-window.d.cts +39 -0
  51. package/lib/internal/mount-window.d.ts +39 -0
  52. package/lib/internal/movable-window.d.cts +55 -0
  53. package/lib/internal/movable-window.d.ts +55 -0
  54. package/lib/internal/opened-overlay-boxes.d.cts +2 -0
  55. package/lib/internal/opened-overlay-boxes.d.ts +2 -0
  56. package/lib/internal/pagination.d.cts +22 -0
  57. package/lib/internal/pagination.d.ts +22 -0
  58. package/lib/internal/snackbar-container.d.cts +20 -0
  59. package/lib/internal/snackbar-container.d.ts +20 -0
  60. package/lib/internal/snackbar-item.d.cts +17 -0
  61. package/lib/internal/snackbar-item.d.ts +17 -0
  62. package/lib/internal/tab-group-context.d.cts +4 -2
  63. package/lib/internal/tab-group-context.d.ts +4 -2
  64. package/lib/internal/use-movable-window.d.cts +44 -0
  65. package/lib/internal/use-movable-window.d.ts +44 -0
  66. package/lib/internal/window-order.d.cts +6 -0
  67. package/lib/internal/window-order.d.ts +6 -0
  68. package/lib/intersection-lazy-component.d.cts +32 -0
  69. package/lib/intersection-lazy-component.d.ts +32 -0
  70. package/lib/label-button.d.cts +2 -2
  71. package/lib/label-button.d.ts +2 -2
  72. package/lib/label-icon.d.cts +2 -2
  73. package/lib/label-icon.d.ts +2 -2
  74. package/lib/modal-dialog.d.cts +67 -0
  75. package/lib/modal-dialog.d.ts +67 -0
  76. package/lib/nuxt.cjs +1 -1
  77. package/lib/nuxt.js +1 -1
  78. package/lib/overlay-box.d.cts +52 -0
  79. package/lib/overlay-box.d.ts +52 -0
  80. package/lib/page-section.d.cts +2 -2
  81. package/lib/page-section.d.ts +2 -2
  82. package/lib/page-title.d.cts +2 -2
  83. package/lib/page-title.d.ts +2 -2
  84. package/lib/register.cjs +1 -1
  85. package/lib/register.js +1 -1
  86. package/lib/screen-loading.d.cts +7 -0
  87. package/lib/screen-loading.d.ts +7 -0
  88. package/lib/style.css +1 -1
  89. package/lib/tab-content.d.cts +5 -5
  90. package/lib/tab-content.d.ts +5 -5
  91. package/lib/tab-group.d.cts +7 -10
  92. package/lib/tab-group.d.ts +7 -10
  93. package/lib/types/data-table.d.cts +185 -0
  94. package/lib/types/data-table.d.ts +185 -0
  95. package/lib/types/modal-dialog.d.cts +13 -0
  96. package/lib/types/modal-dialog.d.ts +13 -0
  97. package/lib/types/movable-window.d.cts +16 -0
  98. package/lib/types/movable-window.d.ts +16 -0
  99. package/lib/warning-popper.d.cts +39 -0
  100. package/lib/warning-popper.d.ts +39 -0
  101. package/lib/warning-popper.vue_vue_type_style_index_0_lang-BKV_FX6k.js +1837 -0
  102. package/lib/warning-popper.vue_vue_type_style_index_0_lang-CHmkjVCO.cjs +1 -0
  103. package/package.json +40 -14
  104. package/src/accordion-fieldset.vue +24 -19
  105. package/src/accordion-section.vue +33 -28
  106. package/src/components.ts +10 -0
  107. package/src/copy-button.vue +89 -0
  108. package/src/dark-mode-selector.vue +212 -0
  109. package/src/data-table.vue +648 -0
  110. package/src/help-button.vue +128 -0
  111. package/src/help-popper.vue +70 -0
  112. package/src/helpers/data-table-csv.ts +55 -0
  113. package/src/helpers/show-floating-component.ts +177 -0
  114. package/src/helpers/show-modal-dialog.ts +121 -0
  115. package/src/helpers/show-overlay-box.ts +106 -0
  116. package/src/helpers/show-screen-loading.ts +37 -0
  117. package/src/helpers/show-snackbar.ts +153 -0
  118. package/src/hourglass-loading.vue +1 -1
  119. package/src/index.ts +34 -0
  120. package/src/internal/anchored-popover.vue +192 -0
  121. package/src/internal/anchored-position.ts +135 -0
  122. package/src/internal/data-table-controls.vue +203 -0
  123. package/src/internal/data-table-value.ts +99 -0
  124. package/src/internal/floating-component.vue +202 -0
  125. package/src/internal/icon-popper.vue +185 -0
  126. package/src/internal/mount-window.ts +110 -0
  127. package/src/internal/movable-window.vue +315 -0
  128. package/src/internal/opened-overlay-boxes.ts +2 -0
  129. package/src/internal/pagination.vue +325 -0
  130. package/src/internal/snackbar-container.vue +258 -0
  131. package/src/internal/snackbar-item.ts +20 -0
  132. package/src/internal/tab-group-context.ts +4 -2
  133. package/src/internal/use-movable-window.ts +208 -0
  134. package/src/internal/window-order.ts +11 -0
  135. package/src/intersection-lazy-component.vue +84 -0
  136. package/src/label-button.vue +9 -6
  137. package/src/label-icon.vue +2 -2
  138. package/src/modal-dialog.vue +287 -0
  139. package/src/overlay-box.vue +218 -0
  140. package/src/page-section.vue +7 -7
  141. package/src/page-title.vue +4 -4
  142. package/src/screen-loading.vue +90 -0
  143. package/src/tab-content.vue +16 -15
  144. package/src/tab-group.vue +34 -36
  145. package/src/types/data-table.ts +196 -0
  146. package/src/types/modal-dialog.ts +16 -0
  147. package/src/types/movable-window.ts +18 -0
  148. package/src/warning-popper.vue +70 -0
  149. package/lib/accordion-fieldset.cjs +0 -1
  150. package/lib/accordion-fieldset.js +0 -4
  151. package/lib/accordion-fieldset.vue_vue_type_style_index_0_lang-Cf4czDXz.js +0 -66
  152. package/lib/accordion-fieldset.vue_vue_type_style_index_0_lang-DoM5QjpJ.cjs +0 -1
  153. package/lib/accordion-section.cjs +0 -1
  154. package/lib/accordion-section.js +0 -4
  155. package/lib/accordion-section.vue_vue_type_style_index_0_lang-CFDdUEnn.cjs +0 -1
  156. package/lib/accordion-section.vue_vue_type_style_index_0_lang-Gvjjx02P.js +0 -78
  157. package/lib/components-C63HJoCn.cjs +0 -1
  158. package/lib/components-q4Cf97bO.js +0 -24
  159. package/lib/hourglass-loading.cjs +0 -1
  160. package/lib/hourglass-loading.js +0 -4
  161. package/lib/hourglass-loading.vue_vue_type_style_index_0_lang-C72UVA9W.cjs +0 -1
  162. package/lib/hourglass-loading.vue_vue_type_style_index_0_lang-DkUGIxQ2.js +0 -22
  163. package/lib/label-button.cjs +0 -1
  164. package/lib/label-button.js +0 -4
  165. package/lib/label-button.vue_vue_type_style_index_0_lang-D7ZgfZOL.cjs +0 -1
  166. package/lib/label-button.vue_vue_type_style_index_0_lang-DqRYddVt.js +0 -44
  167. package/lib/label-icon.cjs +0 -1
  168. package/lib/label-icon.js +0 -4
  169. package/lib/label-icon.vue_vue_type_style_index_0_lang-D9Cimu20.cjs +0 -1
  170. package/lib/label-icon.vue_vue_type_style_index_0_lang-me52HE2V.js +0 -38
  171. package/lib/page-section.cjs +0 -1
  172. package/lib/page-section.js +0 -4
  173. package/lib/page-section.vue_vue_type_style_index_0_lang-DEAkTLxd.cjs +0 -1
  174. package/lib/page-section.vue_vue_type_style_index_0_lang-DpVQe_rV.js +0 -54
  175. package/lib/page-title.cjs +0 -1
  176. package/lib/page-title.js +0 -4
  177. package/lib/page-title.vue_vue_type_style_index_0_lang-BqIsIks5.cjs +0 -1
  178. package/lib/page-title.vue_vue_type_style_index_0_lang-ChZot85K.js +0 -36
  179. package/lib/tab-content.cjs +0 -1
  180. package/lib/tab-content.js +0 -4
  181. package/lib/tab-content.vue_vue_type_style_index_0_lang-BeCi7Xkp.cjs +0 -1
  182. package/lib/tab-content.vue_vue_type_style_index_0_lang-CcQLHmIF.js +0 -44
  183. package/lib/tab-group.cjs +0 -1
  184. package/lib/tab-group.js +0 -4
  185. package/lib/tab-group.vue_vue_type_style_index_0_lang-C84mDEOC.js +0 -103
  186. package/lib/tab-group.vue_vue_type_style_index_0_lang-CMaufRJV.cjs +0 -1
  187. package/lib/use-shrinkable-CS2bmsJJ.js +0 -17
  188. package/lib/use-shrinkable-Cu9JQZll.cjs +0 -1
@@ -0,0 +1,42 @@
1
+ import { DataTableResolvedLabels } from '../types/data-table';
2
+ interface Props {
3
+ /** ページネーションを表示するか */
4
+ pagination: boolean;
5
+ /** 総件数を表示するか */
6
+ showTotal: boolean;
7
+ /** 1ページあたりの表示件数の入力を表示するか */
8
+ showLimit: boolean;
9
+ /** ページ番号の選択を表示するか */
10
+ showPageSelect: boolean;
11
+ /** ページダウンロードボタンを表示するか */
12
+ showDownloadPage: boolean;
13
+ /** 全件ダウンロードボタンを表示するか */
14
+ showDownloadAll: boolean;
15
+ /** 現在ページ */
16
+ current: number;
17
+ /** 1ページあたりの表示件数 */
18
+ limit: number;
19
+ /** 1ページあたりの表示件数の上限 */
20
+ maxLimit: number;
21
+ /** 並べるページ番号の最大数 */
22
+ maxPagination: number;
23
+ /** 総件数 */
24
+ totalCount: number;
25
+ /** 表示する文言 */
26
+ labels: DataTableResolvedLabels;
27
+ /** 総件数の整形。未指定なら en-US の桁区切り */
28
+ formatTotalCount?: (count: number) => string;
29
+ }
30
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
31
+ "emit:changeLimit": (limit: number) => any;
32
+ "emit:changePage": (page: number) => any;
33
+ "emit:downloadPage": () => any;
34
+ "emit:downloadAll": () => any;
35
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
36
+ "onEmit:changeLimit"?: ((limit: number) => any) | undefined;
37
+ "onEmit:changePage"?: ((page: number) => any) | undefined;
38
+ "onEmit:downloadPage"?: (() => any) | undefined;
39
+ "onEmit:downloadAll"?: (() => any) | undefined;
40
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
41
+ declare const _default: typeof __VLS_export;
42
+ export default _default;
@@ -0,0 +1,32 @@
1
+ import { DataTableValueType } from '../types/data-table.cjs';
2
+ /**
3
+ * ドット区切りのパスで入れ子の値を取り出す。途中が null なら undefined
4
+ *
5
+ * @param {unknown} obj
6
+ * @param {string} path 'a.b.c' の形。'a[0].b' は 'a.0.b' と同じ
7
+ * @returns {unknown}
8
+ */
9
+ export declare const getValueByPath: (obj: unknown, path: string) => unknown;
10
+ /**
11
+ * 文字列または文字列を返す関数から文字列を得る
12
+ *
13
+ * @param {string | (() => string)} label
14
+ * @returns {string}
15
+ */
16
+ export declare const resolveLabel: (label: string | (() => string) | undefined) => string;
17
+ /**
18
+ * 型に応じて2つの値を比較する。null / undefined は最小として扱う
19
+ *
20
+ * @param {unknown} a
21
+ * @param {unknown} b
22
+ * @param {DataTableValueType} type
23
+ * @returns {number} a が前なら負の数、後ろなら正の数、等しければ 0
24
+ */
25
+ export declare const compareValues: (a: unknown, b: unknown, type: DataTableValueType) => number;
26
+ /**
27
+ * 行の同一性の判定に使う文字列にする。bigint は文字列にし、循環参照は空文字にする
28
+ *
29
+ * @param {unknown} value
30
+ * @returns {string}
31
+ */
32
+ export declare const stringifyValue: (value: unknown) => string;
@@ -0,0 +1,32 @@
1
+ import { DataTableValueType } from '../types/data-table';
2
+ /**
3
+ * ドット区切りのパスで入れ子の値を取り出す。途中が null なら undefined
4
+ *
5
+ * @param {unknown} obj
6
+ * @param {string} path 'a.b.c' の形。'a[0].b' は 'a.0.b' と同じ
7
+ * @returns {unknown}
8
+ */
9
+ export declare const getValueByPath: (obj: unknown, path: string) => unknown;
10
+ /**
11
+ * 文字列または文字列を返す関数から文字列を得る
12
+ *
13
+ * @param {string | (() => string)} label
14
+ * @returns {string}
15
+ */
16
+ export declare const resolveLabel: (label: string | (() => string) | undefined) => string;
17
+ /**
18
+ * 型に応じて2つの値を比較する。null / undefined は最小として扱う
19
+ *
20
+ * @param {unknown} a
21
+ * @param {unknown} b
22
+ * @param {DataTableValueType} type
23
+ * @returns {number} a が前なら負の数、後ろなら正の数、等しければ 0
24
+ */
25
+ export declare const compareValues: (a: unknown, b: unknown, type: DataTableValueType) => number;
26
+ /**
27
+ * 行の同一性の判定に使う文字列にする。bigint は文字列にし、循環参照は空文字にする
28
+ *
29
+ * @param {unknown} value
30
+ * @returns {string}
31
+ */
32
+ export declare const stringifyValue: (value: unknown) => string;
@@ -0,0 +1,52 @@
1
+ import { ClassValue, StyleValue } from 'vue';
2
+ import { MovableWindowDragMode } from '../types/movable-window.cjs';
3
+ interface Props {
4
+ /** 表示するか */
5
+ open: boolean;
6
+ /** 見出し */
7
+ title?: string;
8
+ /** この要素の下に開く。下に収まらなければ上に開く。未指定ならページの表示中の左上に開く */
9
+ anchor?: HTMLElement;
10
+ /** ドラッグで移動するときに掴む範囲。未指定なら移動できない */
11
+ dragMode?: MovableWindowDragMode;
12
+ /** ウィンドウに暗幕とスピナーを重ね、中身を操作できなくする */
13
+ loading: boolean;
14
+ /** 閉じるボタンの読み上げ名 */
15
+ closeLabel: string;
16
+ /** 見出しにコピーボタンを置き、この値をコピーする */
17
+ copyValue?: string | number | (() => string | number);
18
+ /** コピーボタンの読み上げ名 */
19
+ copyLabel: string;
20
+ /** ウィンドウのダブルクリックで閉じる */
21
+ closeOnDblClick: boolean;
22
+ /** 開いている間、背面のページをスクロールさせない */
23
+ lockScroll: boolean;
24
+ /** 初期の幅・高さ(px)。未指定なら中身に合わせる */
25
+ initialSize?: {
26
+ width?: number;
27
+ height?: number;
28
+ };
29
+ /** 見出しに付けるクラス */
30
+ headerClass?: ClassValue;
31
+ /** 見出しに付けるスタイル */
32
+ headerStyle?: StyleValue;
33
+ }
34
+ declare var __VLS_27: {};
35
+ type __VLS_Slots = {} & {
36
+ default?: (props: typeof __VLS_27) => any;
37
+ };
38
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
39
+ "emit:close": () => any;
40
+ "update:open": (value: boolean) => any;
41
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
42
+ "onEmit:close"?: (() => any) | undefined;
43
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
44
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
45
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
46
+ declare const _default: typeof __VLS_export;
47
+ export default _default;
48
+ type __VLS_WithSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -0,0 +1,52 @@
1
+ import { ClassValue, StyleValue } from 'vue';
2
+ import { MovableWindowDragMode } from '../types/movable-window';
3
+ interface Props {
4
+ /** 表示するか */
5
+ open: boolean;
6
+ /** 見出し */
7
+ title?: string;
8
+ /** この要素の下に開く。下に収まらなければ上に開く。未指定ならページの表示中の左上に開く */
9
+ anchor?: HTMLElement;
10
+ /** ドラッグで移動するときに掴む範囲。未指定なら移動できない */
11
+ dragMode?: MovableWindowDragMode;
12
+ /** ウィンドウに暗幕とスピナーを重ね、中身を操作できなくする */
13
+ loading: boolean;
14
+ /** 閉じるボタンの読み上げ名 */
15
+ closeLabel: string;
16
+ /** 見出しにコピーボタンを置き、この値をコピーする */
17
+ copyValue?: string | number | (() => string | number);
18
+ /** コピーボタンの読み上げ名 */
19
+ copyLabel: string;
20
+ /** ウィンドウのダブルクリックで閉じる */
21
+ closeOnDblClick: boolean;
22
+ /** 開いている間、背面のページをスクロールさせない */
23
+ lockScroll: boolean;
24
+ /** 初期の幅・高さ(px)。未指定なら中身に合わせる */
25
+ initialSize?: {
26
+ width?: number;
27
+ height?: number;
28
+ };
29
+ /** 見出しに付けるクラス */
30
+ headerClass?: ClassValue;
31
+ /** 見出しに付けるスタイル */
32
+ headerStyle?: StyleValue;
33
+ }
34
+ declare var __VLS_27: {};
35
+ type __VLS_Slots = {} & {
36
+ default?: (props: typeof __VLS_27) => any;
37
+ };
38
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
39
+ "emit:close": () => any;
40
+ "update:open": (value: boolean) => any;
41
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
42
+ "onEmit:close"?: (() => any) | undefined;
43
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
44
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
45
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
46
+ declare const _default: typeof __VLS_export;
47
+ export default _default;
48
+ type __VLS_WithSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -0,0 +1,32 @@
1
+ import { PopoverPlacement } from './anchored-position.cjs';
2
+ interface Props {
3
+ /** アイコンに対するパネルの表示位置。収まらないときは反対側に出す */
4
+ placement: PopoverPlacement;
5
+ /** アイコンを指す矢印をパネルに付ける */
6
+ arrow: boolean;
7
+ /** パネルに付けるクラス。利用側のコンポーネントがパネルのスタイル変数を割り当てるのに使う */
8
+ popoverClass: string;
9
+ /** アイコンの読み上げ名。利用側が aria-label 属性を渡したときはそちらが優先される */
10
+ label: string;
11
+ }
12
+ declare var __VLS_1: {}, __VLS_15: {};
13
+ type __VLS_Slots = {} & {
14
+ icon?: (props: typeof __VLS_1) => any;
15
+ } & {
16
+ default?: (props: typeof __VLS_15) => any;
17
+ };
18
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
19
+ "emit:open": () => any;
20
+ "emit:close": () => any;
21
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
22
+ "onEmit:open"?: (() => any) | undefined;
23
+ "onEmit:close"?: (() => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,32 @@
1
+ import { PopoverPlacement } from './anchored-position';
2
+ interface Props {
3
+ /** アイコンに対するパネルの表示位置。収まらないときは反対側に出す */
4
+ placement: PopoverPlacement;
5
+ /** アイコンを指す矢印をパネルに付ける */
6
+ arrow: boolean;
7
+ /** パネルに付けるクラス。利用側のコンポーネントがパネルのスタイル変数を割り当てるのに使う */
8
+ popoverClass: string;
9
+ /** アイコンの読み上げ名。利用側が aria-label 属性を渡したときはそちらが優先される */
10
+ label: string;
11
+ }
12
+ declare var __VLS_1: {}, __VLS_15: {};
13
+ type __VLS_Slots = {} & {
14
+ icon?: (props: typeof __VLS_1) => any;
15
+ } & {
16
+ default?: (props: typeof __VLS_15) => any;
17
+ };
18
+ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
19
+ "emit:open": () => any;
20
+ "emit:close": () => any;
21
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
22
+ "onEmit:open"?: (() => any) | undefined;
23
+ "onEmit:close"?: (() => any) | undefined;
24
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ type __VLS_WithSlots<T, S> = T & {
29
+ new (): {
30
+ $slots: S;
31
+ };
32
+ };
@@ -0,0 +1,39 @@
1
+ import { AppContext, VNode } from 'vue';
2
+ import { MovableWindowHandle } from '../types/movable-window.cjs';
3
+ /** ウィンドウのコンポーネントに渡す、開閉とローディングの props とリスナー */
4
+ export interface WindowProps {
5
+ open: boolean;
6
+ loading: boolean;
7
+ 'onUpdate:open': (value: boolean) => void;
8
+ 'onEmit:close': () => void;
9
+ }
10
+ export interface MountWindowOptions {
11
+ /** 中身に引き継ぐアプリのコンテキスト */
12
+ appContext?: AppContext;
13
+ /** 利用者が指定した、閉じ終わったときに呼ぶ関数 */
14
+ onClose?: () => void;
15
+ /** 呼び出し側(use 系)が、閉じ終わったときに呼ぶ関数 */
16
+ onClosed?: () => void;
17
+ }
18
+ /**
19
+ * ウィンドウ(OverlayBox / FloatingComponent)を body の末尾に描画し、閉じ終わったら取り外す。
20
+ * 何をどう描くかは renderWindow に任せ、開閉・ローディング・取り外しの共通処理だけを持つ
21
+ *
22
+ * @param {(props: WindowProps, handle: MovableWindowHandle) => VNode} renderWindow ウィンドウを描画する関数
23
+ * @param {MountWindowOptions} options
24
+ * @param {Set<MovableWindowHandle>} opened 開いているハンドルの集合。closeAll 系で使う
25
+ * @returns {MovableWindowHandle}
26
+ */
27
+ export declare function mountWindow(renderWindow: (props: WindowProps, handle: MovableWindowHandle) => VNode, options: MountWindowOptions, opened: Set<MovableWindowHandle>): MovableWindowHandle;
28
+ /**
29
+ * 呼び出したコンポーネントに結び付けてウィンドウを開くための共通処理。
30
+ * 開いたウィンドウはコンポーネントのアンマウント時に閉じ、中身にはコンポーネントのアプリのコンテキストを引き継ぐ。
31
+ * コンポーネントの setup の中で呼ぶこと
32
+ *
33
+ * @param {string} hookName setup の外で呼ばれたときのエラーに出す関数名
34
+ * @returns {{ appContext: AppContext; own: (open: (onClosed: () => void) => MovableWindowHandle) => MovableWindowHandle }}
35
+ */
36
+ export declare function useWindowOwner(hookName: string): {
37
+ appContext: AppContext;
38
+ own: (open: (onClosed: () => void) => MovableWindowHandle) => MovableWindowHandle;
39
+ };
@@ -0,0 +1,39 @@
1
+ import { AppContext, VNode } from 'vue';
2
+ import { MovableWindowHandle } from '../types/movable-window';
3
+ /** ウィンドウのコンポーネントに渡す、開閉とローディングの props とリスナー */
4
+ export interface WindowProps {
5
+ open: boolean;
6
+ loading: boolean;
7
+ 'onUpdate:open': (value: boolean) => void;
8
+ 'onEmit:close': () => void;
9
+ }
10
+ export interface MountWindowOptions {
11
+ /** 中身に引き継ぐアプリのコンテキスト */
12
+ appContext?: AppContext;
13
+ /** 利用者が指定した、閉じ終わったときに呼ぶ関数 */
14
+ onClose?: () => void;
15
+ /** 呼び出し側(use 系)が、閉じ終わったときに呼ぶ関数 */
16
+ onClosed?: () => void;
17
+ }
18
+ /**
19
+ * ウィンドウ(OverlayBox / FloatingComponent)を body の末尾に描画し、閉じ終わったら取り外す。
20
+ * 何をどう描くかは renderWindow に任せ、開閉・ローディング・取り外しの共通処理だけを持つ
21
+ *
22
+ * @param {(props: WindowProps, handle: MovableWindowHandle) => VNode} renderWindow ウィンドウを描画する関数
23
+ * @param {MountWindowOptions} options
24
+ * @param {Set<MovableWindowHandle>} opened 開いているハンドルの集合。closeAll 系で使う
25
+ * @returns {MovableWindowHandle}
26
+ */
27
+ export declare function mountWindow(renderWindow: (props: WindowProps, handle: MovableWindowHandle) => VNode, options: MountWindowOptions, opened: Set<MovableWindowHandle>): MovableWindowHandle;
28
+ /**
29
+ * 呼び出したコンポーネントに結び付けてウィンドウを開くための共通処理。
30
+ * 開いたウィンドウはコンポーネントのアンマウント時に閉じ、中身にはコンポーネントのアプリのコンテキストを引き継ぐ。
31
+ * コンポーネントの setup の中で呼ぶこと
32
+ *
33
+ * @param {string} hookName setup の外で呼ばれたときのエラーに出す関数名
34
+ * @returns {{ appContext: AppContext; own: (open: (onClosed: () => void) => MovableWindowHandle) => MovableWindowHandle }}
35
+ */
36
+ export declare function useWindowOwner(hookName: string): {
37
+ appContext: AppContext;
38
+ own: (open: (onClosed: () => void) => MovableWindowHandle) => MovableWindowHandle;
39
+ };
@@ -0,0 +1,55 @@
1
+ import { ClassValue, StyleValue } from 'vue';
2
+ import { MovableWindowDragMode } from '../types/movable-window.cjs';
3
+ interface Props {
4
+ /** 各部位のクラスの接頭辞。利用側のコンポーネントのクラス名(dwui-overlay-box など) */
5
+ name: string;
6
+ /** ドラッグで移動するときに掴む範囲。未指定なら移動できない */
7
+ dragMode?: MovableWindowDragMode;
8
+ /** ウィンドウに暗幕とスピナーを重ね、中身を操作できなくする */
9
+ loading: boolean;
10
+ /** 閉じるボタンの読み上げ名 */
11
+ closeLabel: string;
12
+ /** ドラッグ終了時に下端も画面内へ戻す */
13
+ clampBottom: boolean;
14
+ /** 見出しに付けるクラス */
15
+ headerClass?: ClassValue;
16
+ /** 見出しに付けるスタイル */
17
+ headerStyle?: StyleValue;
18
+ }
19
+ interface Slots {
20
+ /** 見出し */
21
+ title?(): unknown;
22
+ /** 見出しの閉じるボタンの手前に置く操作 */
23
+ actions?(): unknown;
24
+ /** ウィンドウに表示する中身 */
25
+ default?(): unknown;
26
+ }
27
+ type __VLS_Slots = Slots;
28
+ declare const __VLS_base: import('vue').DefineComponent<Props, {
29
+ /** ウィンドウの要素 */
30
+ element: import('vue').Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
31
+ /** 位置(px)。書き込むと移動する */
32
+ position: {
33
+ x: number;
34
+ y: number;
35
+ };
36
+ /** 幅・高さ(px)。-1 は中身に合わせる。書き込むとその寸法になる */
37
+ size: {
38
+ width: number;
39
+ height: number;
40
+ };
41
+ /** ドラッグ・リサイズのリスナーを解除する */
42
+ teardown: () => void;
43
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
44
+ "emit:close": () => any;
45
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
46
+ "onEmit:close"?: (() => any) | undefined;
47
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
48
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
49
+ declare const _default: typeof __VLS_export;
50
+ export default _default;
51
+ type __VLS_WithSlots<T, S> = T & {
52
+ new (): {
53
+ $slots: S;
54
+ };
55
+ };
@@ -0,0 +1,55 @@
1
+ import { ClassValue, StyleValue } from 'vue';
2
+ import { MovableWindowDragMode } from '../types/movable-window';
3
+ interface Props {
4
+ /** 各部位のクラスの接頭辞。利用側のコンポーネントのクラス名(dwui-overlay-box など) */
5
+ name: string;
6
+ /** ドラッグで移動するときに掴む範囲。未指定なら移動できない */
7
+ dragMode?: MovableWindowDragMode;
8
+ /** ウィンドウに暗幕とスピナーを重ね、中身を操作できなくする */
9
+ loading: boolean;
10
+ /** 閉じるボタンの読み上げ名 */
11
+ closeLabel: string;
12
+ /** ドラッグ終了時に下端も画面内へ戻す */
13
+ clampBottom: boolean;
14
+ /** 見出しに付けるクラス */
15
+ headerClass?: ClassValue;
16
+ /** 見出しに付けるスタイル */
17
+ headerStyle?: StyleValue;
18
+ }
19
+ interface Slots {
20
+ /** 見出し */
21
+ title?(): unknown;
22
+ /** 見出しの閉じるボタンの手前に置く操作 */
23
+ actions?(): unknown;
24
+ /** ウィンドウに表示する中身 */
25
+ default?(): unknown;
26
+ }
27
+ type __VLS_Slots = Slots;
28
+ declare const __VLS_base: import('vue').DefineComponent<Props, {
29
+ /** ウィンドウの要素 */
30
+ element: import('vue').Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
31
+ /** 位置(px)。書き込むと移動する */
32
+ position: {
33
+ x: number;
34
+ y: number;
35
+ };
36
+ /** 幅・高さ(px)。-1 は中身に合わせる。書き込むとその寸法になる */
37
+ size: {
38
+ width: number;
39
+ height: number;
40
+ };
41
+ /** ドラッグ・リサイズのリスナーを解除する */
42
+ teardown: () => void;
43
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
44
+ "emit:close": () => any;
45
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
46
+ "onEmit:close"?: (() => any) | undefined;
47
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
48
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
49
+ declare const _default: typeof __VLS_export;
50
+ export default _default;
51
+ type __VLS_WithSlots<T, S> = T & {
52
+ new (): {
53
+ $slots: S;
54
+ };
55
+ };
@@ -0,0 +1,2 @@
1
+ /** 開いている OverlayBox を開いた順に持つ。Esc では最後に開いたものだけを閉じる */
2
+ export declare const openedOverlayBoxes: symbol[];
@@ -0,0 +1,2 @@
1
+ /** 開いている OverlayBox を開いた順に持つ。Esc では最後に開いたものだけを閉じる */
2
+ export declare const openedOverlayBoxes: symbol[];
@@ -0,0 +1,22 @@
1
+ import { DataTableResolvedLabels } from '../types/data-table.cjs';
2
+ interface Props {
3
+ /** 現在ページ(1起点) */
4
+ current: number;
5
+ /** 総件数 */
6
+ totalCount: number;
7
+ /** 1ページあたりの件数 */
8
+ limit: number;
9
+ /** 並べるページ番号の最大数 */
10
+ maxPagination: number;
11
+ /** ページ番号の選択を表示するか */
12
+ showPageSelect: boolean;
13
+ /** 表示する文言 */
14
+ labels: DataTableResolvedLabels;
15
+ }
16
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
+ "emit:changePage": (page: number) => any;
18
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
19
+ "onEmit:changePage"?: ((page: number) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import { DataTableResolvedLabels } from '../types/data-table';
2
+ interface Props {
3
+ /** 現在ページ(1起点) */
4
+ current: number;
5
+ /** 総件数 */
6
+ totalCount: number;
7
+ /** 1ページあたりの件数 */
8
+ limit: number;
9
+ /** 並べるページ番号の最大数 */
10
+ maxPagination: number;
11
+ /** ページ番号の選択を表示するか */
12
+ showPageSelect: boolean;
13
+ /** 表示する文言 */
14
+ labels: DataTableResolvedLabels;
15
+ }
16
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
+ "emit:changePage": (page: number) => any;
18
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
19
+ "onEmit:changePage"?: ((page: number) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { SnackbarDirection, SnackbarItem, SnackbarPlacement } from './snackbar-item.cjs';
2
+ interface Props {
3
+ /** 表示する位置 */
4
+ placement: SnackbarPlacement;
5
+ /** 同じ表示領域に並べる向き */
6
+ direction: SnackbarDirection;
7
+ /** 表示する snackbar。古いものから順に並べる */
8
+ items: SnackbarItem[];
9
+ }
10
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
+ "emit:close": (id: number) => any;
12
+ "emit:clear": () => any;
13
+ "emit:afterLeave": () => any;
14
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
15
+ "onEmit:close"?: ((id: number) => any) | undefined;
16
+ "onEmit:clear"?: (() => any) | undefined;
17
+ "onEmit:afterLeave"?: (() => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { SnackbarDirection, SnackbarItem, SnackbarPlacement } from './snackbar-item';
2
+ interface Props {
3
+ /** 表示する位置 */
4
+ placement: SnackbarPlacement;
5
+ /** 同じ表示領域に並べる向き */
6
+ direction: SnackbarDirection;
7
+ /** 表示する snackbar。古いものから順に並べる */
8
+ items: SnackbarItem[];
9
+ }
10
+ declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
+ "emit:close": (id: number) => any;
12
+ "emit:clear": () => any;
13
+ "emit:afterLeave": () => any;
14
+ }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
15
+ "onEmit:close"?: ((id: number) => any) | undefined;
16
+ "onEmit:clear"?: (() => any) | undefined;
17
+ "onEmit:afterLeave"?: (() => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { ClassValue, StyleValue } from 'vue';
2
+ /** snackbar を表示する画面上の位置 */
3
+ export type SnackbarPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
4
+ /** 同じ表示領域に並べる向き。overlap は同じ位置に重ねて新しいものを前面に出し、column は縦に積み、row は横に並べて端で折り返す */
5
+ export type SnackbarDirection = 'overlap' | 'column' | 'row';
6
+ /** 表示領域に並べる snackbar 1件分の内容 */
7
+ export interface SnackbarItem {
8
+ id: number;
9
+ message: string;
10
+ title?: string;
11
+ label?: string;
12
+ timestamp?: string;
13
+ clearable: boolean;
14
+ clearLabel: string;
15
+ class?: ClassValue;
16
+ style?: StyleValue;
17
+ }
@@ -0,0 +1,17 @@
1
+ import { ClassValue, StyleValue } from 'vue';
2
+ /** snackbar を表示する画面上の位置 */
3
+ export type SnackbarPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
4
+ /** 同じ表示領域に並べる向き。overlap は同じ位置に重ねて新しいものを前面に出し、column は縦に積み、row は横に並べて端で折り返す */
5
+ export type SnackbarDirection = 'overlap' | 'column' | 'row';
6
+ /** 表示領域に並べる snackbar 1件分の内容 */
7
+ export interface SnackbarItem {
8
+ id: number;
9
+ message: string;
10
+ title?: string;
11
+ label?: string;
12
+ timestamp?: string;
13
+ clearable: boolean;
14
+ clearLabel: string;
15
+ class?: ClassValue;
16
+ style?: StyleValue;
17
+ }
@@ -6,8 +6,10 @@ export type TabContentStatus = 'warn' | 'error';
6
6
  * TabGroupとTabContentの間だけで使い、利用側には公開しない
7
7
  */
8
8
  export interface TabGroupContext {
9
- /** 選択中のタブのlabelId */
10
- activeLabelId: ComputedRef<string | undefined>;
9
+ /** 見出しと中身の id の接頭辞。aria-controls / aria-labelledby で結び付けるのに使う */
10
+ groupName: string;
11
+ /** 選択中のタブのtabId */
12
+ activeTabId: ComputedRef<string | undefined>;
11
13
  /** TabGroupがマウント済みか */
12
14
  mounted: Ref<boolean>;
13
15
  /** TabGroupの#loadingスロット。未指定ならTabContentは既定の読み込み中表示を出す */
@@ -6,8 +6,10 @@ export type TabContentStatus = 'warn' | 'error';
6
6
  * TabGroupとTabContentの間だけで使い、利用側には公開しない
7
7
  */
8
8
  export interface TabGroupContext {
9
- /** 選択中のタブのlabelId */
10
- activeLabelId: ComputedRef<string | undefined>;
9
+ /** 見出しと中身の id の接頭辞。aria-controls / aria-labelledby で結び付けるのに使う */
10
+ groupName: string;
11
+ /** 選択中のタブのtabId */
12
+ activeTabId: ComputedRef<string | undefined>;
11
13
  /** TabGroupがマウント済みか */
12
14
  mounted: Ref<boolean>;
13
15
  /** TabGroupの#loadingスロット。未指定ならTabContentは既定の読み込み中表示を出す */