yuyeon 0.0.41 → 0.0.42-rc10

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 (179) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/yuyeon.js +5157 -3010
  3. package/dist/yuyeon.umd.cjs +8 -4
  4. package/lib/components/button/YButton.scss +2 -1
  5. package/lib/components/date-picker/YDateCalendar.mjs +235 -5
  6. package/lib/components/date-picker/YDateCalendar.mjs.map +1 -1
  7. package/lib/components/date-picker/YDateCalendar.scss +82 -0
  8. package/lib/components/date-picker/YDatePicker.mjs.map +1 -1
  9. package/lib/components/date-picker/YDatePickerControl.mjs +29 -0
  10. package/lib/components/date-picker/YDatePickerControl.mjs.map +1 -0
  11. package/lib/components/date-picker/YDatePickerControl.scss +3 -0
  12. package/lib/components/date-picker/index.mjs +1 -1
  13. package/lib/components/date-picker/index.mjs.map +1 -1
  14. package/lib/components/divider/YDivider.mjs +4 -2
  15. package/lib/components/divider/YDivider.mjs.map +1 -1
  16. package/lib/components/dropdown/YDropdown.mjs +11 -5
  17. package/lib/components/dropdown/YDropdown.mjs.map +1 -1
  18. package/lib/components/dropdown/YDropdown.scss +3 -8
  19. package/lib/components/field-input/YFieldInput.mjs +10 -10
  20. package/lib/components/field-input/YFieldInput.mjs.map +1 -1
  21. package/lib/components/icon/YIcon.mjs +62 -0
  22. package/lib/components/icon/YIcon.mjs.map +1 -0
  23. package/lib/components/icon/YIcon.scss +18 -0
  24. package/lib/components/icon/index.mjs +2 -0
  25. package/lib/components/icon/index.mjs.map +1 -0
  26. package/lib/components/icon/poly.mjs +57 -0
  27. package/lib/components/icon/poly.mjs.map +1 -0
  28. package/lib/components/icons/index.mjs +14 -0
  29. package/lib/components/icons/index.mjs.map +1 -1
  30. package/lib/components/index.mjs +3 -0
  31. package/lib/components/index.mjs.map +1 -1
  32. package/lib/components/input/YInput.mjs +1 -0
  33. package/lib/components/input/YInput.mjs.map +1 -1
  34. package/lib/components/input/index.mjs.map +1 -1
  35. package/lib/components/layer/YLayer.mjs +2 -0
  36. package/lib/components/layer/YLayer.mjs.map +1 -1
  37. package/lib/components/layer/active-stack.mjs.map +1 -1
  38. package/lib/components/list/YList.mjs.map +1 -1
  39. package/lib/components/menu/YMenu.mjs +14 -2
  40. package/lib/components/menu/YMenu.mjs.map +1 -1
  41. package/lib/components/select/YSelect.mjs +9 -6
  42. package/lib/components/select/YSelect.mjs.map +1 -1
  43. package/lib/components/select/YSelect.scss +3 -8
  44. package/lib/components/switch/YSwitch.mjs +2 -0
  45. package/lib/components/switch/YSwitch.mjs.map +1 -1
  46. package/lib/components/tab/types.mjs.map +1 -1
  47. package/lib/components/table/composibles/pagination.mjs.map +1 -1
  48. package/lib/components/textarea/YTextarea.mjs +159 -0
  49. package/lib/components/textarea/YTextarea.mjs.map +1 -0
  50. package/lib/components/textarea/YTextarea.scss +25 -0
  51. package/lib/components/textarea/index.mjs +2 -0
  52. package/lib/components/textarea/index.mjs.map +1 -0
  53. package/lib/components/tooltip/YTooltip.mjs +2 -2
  54. package/lib/components/tooltip/YTooltip.mjs.map +1 -1
  55. package/lib/components/tree-view/YTreeView.mjs +5 -0
  56. package/lib/components/tree-view/YTreeView.mjs.map +1 -1
  57. package/lib/components/tree-view/YTreeViewNode.mjs +1 -0
  58. package/lib/components/tree-view/YTreeViewNode.mjs.map +1 -1
  59. package/lib/composables/communication.mjs +9 -0
  60. package/lib/composables/communication.mjs.map +1 -1
  61. package/lib/composables/date/factory.mjs +12 -0
  62. package/lib/composables/date/factory.mjs.map +1 -0
  63. package/lib/composables/date/index.mjs +19 -1
  64. package/lib/composables/date/index.mjs.map +1 -1
  65. package/lib/composables/date/setting.mjs +11 -0
  66. package/lib/composables/date/setting.mjs.map +1 -0
  67. package/lib/composables/date/types.mjs +1 -1
  68. package/lib/composables/date/types.mjs.map +1 -1
  69. package/lib/composables/i18n/index.mjs +30 -0
  70. package/lib/composables/i18n/index.mjs.map +1 -0
  71. package/lib/composables/i18n/locale.mjs +5 -0
  72. package/lib/composables/i18n/locale.mjs.map +1 -0
  73. package/lib/composables/i18n/rtl.mjs +34 -0
  74. package/lib/composables/i18n/rtl.mjs.map +1 -0
  75. package/lib/composables/i18n/share.mjs +2 -0
  76. package/lib/composables/i18n/share.mjs.map +1 -0
  77. package/lib/composables/icon.mjs +141 -0
  78. package/lib/composables/icon.mjs.map +1 -1
  79. package/lib/composables/index.mjs +1 -0
  80. package/lib/composables/index.mjs.map +1 -1
  81. package/lib/composables/theme/index.mjs.map +1 -1
  82. package/lib/composables/transition.mjs.map +1 -1
  83. package/lib/i18n/built-in.mjs +77 -0
  84. package/lib/i18n/built-in.mjs.map +1 -0
  85. package/lib/i18n/config.mjs +82 -0
  86. package/lib/i18n/config.mjs.map +1 -0
  87. package/lib/i18n/types.mjs +2 -0
  88. package/lib/i18n/types.mjs.map +1 -0
  89. package/lib/index.mjs +24 -5
  90. package/lib/index.mjs.map +1 -1
  91. package/lib/locales/en.mjs +4 -0
  92. package/lib/locales/en.mjs.map +1 -0
  93. package/lib/locales/index.mjs +3 -0
  94. package/lib/locales/index.mjs.map +1 -0
  95. package/lib/locales/ko.mjs +4 -0
  96. package/lib/locales/ko.mjs.map +1 -0
  97. package/lib/styles/util/_mixin.scss +34 -0
  98. package/lib/types/index.mjs.map +1 -1
  99. package/lib/util/date/adapters/yuyeon-date-adapter.mjs +99 -0
  100. package/lib/util/date/adapters/yuyeon-date-adapter.mjs.map +1 -0
  101. package/lib/util/date/built-in.mjs +18 -104
  102. package/lib/util/date/built-in.mjs.map +1 -1
  103. package/lib/util/date/index.mjs +1 -0
  104. package/lib/util/date/index.mjs.map +1 -1
  105. package/lib/util/date/types.mjs.map +1 -1
  106. package/lib/util/index.mjs +1 -0
  107. package/lib/util/index.mjs.map +1 -1
  108. package/package.json +7 -5
  109. package/types/abstract/items.d.ts +4 -4
  110. package/types/components/button/YButton.d.ts +10 -10
  111. package/types/components/checkbox/YInputCheckbox.d.ts +2 -2
  112. package/types/components/date-picker/YDateCalendar.d.ts +136 -0
  113. package/types/components/date-picker/index.d.ts +1 -0
  114. package/types/components/dialog/YDialog.d.ts +3 -2
  115. package/types/components/dropdown/YDropdown.d.ts +34 -13
  116. package/types/components/field-input/YFieldInput.d.ts +10 -10
  117. package/types/components/form/YForm.d.ts +1 -1
  118. package/types/components/icon/YIcon.d.ts +81 -0
  119. package/types/components/icon/index.d.ts +1 -0
  120. package/types/components/icons/YIconCheckbox.d.ts +2 -2
  121. package/types/components/icons/YIconSort.d.ts +2 -2
  122. package/types/components/icons/index.d.ts +48 -0
  123. package/types/components/index.d.ts +3 -0
  124. package/types/components/input/YInput.d.ts +28 -11
  125. package/types/components/layer/YLayer.d.ts +23 -22
  126. package/types/components/layer/active-stack.d.ts +1 -2
  127. package/types/components/list/YList.d.ts +3 -3
  128. package/types/components/list/YListItem.d.ts +5 -5
  129. package/types/components/menu/YMenu.d.ts +13 -8
  130. package/types/components/pagination/YPagination.d.ts +5 -5
  131. package/types/components/progress-bar/YProgressBar.d.ts +1 -1
  132. package/types/components/select/YSelect.d.ts +80 -64
  133. package/types/components/switch/YSwitch.d.ts +1 -1
  134. package/types/components/tab/YTab.d.ts +15 -15
  135. package/types/components/tab/YTabs.d.ts +5 -5
  136. package/types/components/tab/types.d.ts +1 -0
  137. package/types/components/table/YDataTable.d.ts +18 -18
  138. package/types/components/table/YDataTableBody.d.ts +5 -5
  139. package/types/components/table/YDataTableControl.d.ts +2 -2
  140. package/types/components/table/YDataTableHead.d.ts +2 -2
  141. package/types/components/table/YDataTableServer.d.ts +21 -21
  142. package/types/components/table/YTable.d.ts +4 -4
  143. package/types/components/table/composibles/header.d.ts +1 -1
  144. package/types/components/table/composibles/items.d.ts +3 -3
  145. package/types/components/table/composibles/pagination.d.ts +2 -2
  146. package/types/components/table/composibles/selection.d.ts +2 -2
  147. package/types/components/table/composibles/sorting.d.ts +1 -1
  148. package/types/components/textarea/YTextarea.d.ts +737 -0
  149. package/types/components/textarea/index.d.ts +1 -0
  150. package/types/components/tooltip/YTooltip.d.ts +13 -12
  151. package/types/components/tree-view/YTreeView.d.ts +7 -4
  152. package/types/components/tree-view/YTreeViewNode.d.ts +17 -9
  153. package/types/composables/choice.d.ts +1 -1
  154. package/types/composables/communication.d.ts +2 -0
  155. package/types/composables/coordinate/index.d.ts +6 -6
  156. package/types/composables/date/factory.d.ts +2 -0
  157. package/types/composables/date/index.d.ts +11 -0
  158. package/types/composables/date/setting.d.ts +4 -0
  159. package/types/composables/date/types.d.ts +12 -0
  160. package/types/composables/i18n/index.d.ts +8 -0
  161. package/types/composables/i18n/locale.d.ts +2 -0
  162. package/types/composables/i18n/rtl.d.ts +20 -0
  163. package/types/composables/i18n/share.d.ts +1 -0
  164. package/types/composables/icon.d.ts +96 -0
  165. package/types/composables/index.d.ts +2 -0
  166. package/types/composables/list-items.d.ts +10 -10
  167. package/types/composables/theme/index.d.ts +5 -5
  168. package/types/globals.d.ts +12 -7
  169. package/types/i18n/built-in.d.ts +2 -0
  170. package/types/i18n/config.d.ts +81 -0
  171. package/types/i18n/types.d.ts +19 -0
  172. package/types/locales/en.d.ts +4 -0
  173. package/types/shims.d.ts +88 -83
  174. package/types/types/index.d.ts +5 -0
  175. package/types/util/date/adapters/yuyeon-date-adapter.d.ts +38 -0
  176. package/types/util/date/built-in.d.ts +35 -0
  177. package/types/util/date/index.d.ts +3 -0
  178. package/types/util/date/types.d.ts +163 -0
  179. package/types/util/index.d.ts +1 -0
@@ -1,11 +1,16 @@
1
1
  import type { VNode } from "vue";
2
+ import type {NativeElements, ReservedProps} from "@vue/runtime-dom";
2
3
 
3
- declare global {
4
- namespace JSX {
5
- interface Element extends VNode {}
6
-
7
- interface IntrinsicAttributes {
8
- [name: string]: any
9
- }
4
+ export namespace JSX {
5
+ export interface Element extends VNode {}
6
+ export interface ElementClass {
7
+ $props: {}
8
+ }
9
+ export interface ElementAttributesProperty {
10
+ $props: {}
11
+ }
12
+ export interface IntrinsicElements extends NativeElements {
13
+ [name: string]: any
10
14
  }
15
+ export interface IntrinsicAttributes extends ReservedProps {}
11
16
  }
@@ -0,0 +1,2 @@
1
+ import type { LocaleModule, LocaleOptions } from './types';
2
+ export declare function constructYuyeonI18nAdapter(options?: LocaleOptions): LocaleModule;
@@ -0,0 +1,81 @@
1
+ export declare const localeCodesMap: {
2
+ af: string;
3
+ bg: string;
4
+ ca: string;
5
+ cs: string;
6
+ de: string;
7
+ el: string;
8
+ en: string;
9
+ et: string;
10
+ fa: string;
11
+ fi: string;
12
+ hr: string;
13
+ hu: string;
14
+ he: string;
15
+ id: string;
16
+ it: string;
17
+ ja: string;
18
+ ko: string;
19
+ lv: string;
20
+ lt: string;
21
+ nl: string;
22
+ no: string;
23
+ pl: string;
24
+ pt: string;
25
+ ro: string;
26
+ ru: string;
27
+ sk: string;
28
+ sl: string;
29
+ srCyrl: string;
30
+ srLatn: string;
31
+ sv: string;
32
+ th: string;
33
+ tr: string;
34
+ az: string;
35
+ uk: string;
36
+ vi: string;
37
+ zhHans: string;
38
+ zhHant: string;
39
+ };
40
+ export declare const defaultRtl: {
41
+ af: boolean;
42
+ ar: boolean;
43
+ bg: boolean;
44
+ ca: boolean;
45
+ cs: boolean;
46
+ de: boolean;
47
+ el: boolean;
48
+ en: boolean;
49
+ es: boolean;
50
+ et: boolean;
51
+ fa: boolean;
52
+ fi: boolean;
53
+ fr: boolean;
54
+ hr: boolean;
55
+ hu: boolean;
56
+ he: boolean;
57
+ id: boolean;
58
+ it: boolean;
59
+ ja: boolean;
60
+ ko: boolean;
61
+ lv: boolean;
62
+ lt: boolean;
63
+ nl: boolean;
64
+ no: boolean;
65
+ pl: boolean;
66
+ pt: boolean;
67
+ ro: boolean;
68
+ ru: boolean;
69
+ sk: boolean;
70
+ sl: boolean;
71
+ srCyrl: boolean;
72
+ srLatn: boolean;
73
+ sv: boolean;
74
+ th: boolean;
75
+ tr: boolean;
76
+ az: boolean;
77
+ uk: boolean;
78
+ vi: boolean;
79
+ zhHans: boolean;
80
+ zhHant: boolean;
81
+ };
@@ -0,0 +1,19 @@
1
+ import type { Ref } from 'vue';
2
+ export type LocaleMessages = {
3
+ [key: string]: LocaleMessages | string;
4
+ };
5
+ export interface LocaleOptions {
6
+ messages?: LocaleMessages;
7
+ locale?: string;
8
+ fallbackLocale?: string;
9
+ adapter?: LocaleModule;
10
+ }
11
+ export interface LocaleModule {
12
+ name: string;
13
+ locale: Ref<string>;
14
+ fallbackLocale: Ref<string>;
15
+ messages: Ref<LocaleMessages>;
16
+ t: (key: string, ...args: unknown[]) => string;
17
+ n: (value: number) => string;
18
+ getContext: (props: LocaleOptions) => LocaleModule;
19
+ }
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ search: string;
3
+ };
4
+ export default _default;
package/types/shims.d.ts CHANGED
@@ -1,83 +1,88 @@
1
- import * as vue from 'vue';
2
- import {
3
- YAlert,
4
- YApp,
5
- YButton,
6
- YCard,
7
- YCardBody,
8
- YCardFooter,
9
- YCardHeader,
10
- YCheckbox,
11
- YChip,
12
- YDataTable,
13
- YDataTableServer,
14
- YDialog,
15
- YDividePanel,
16
- YDivider,
17
- YDropdown,
18
- YExpandHTransition,
19
- YExpandVTransition,
20
- YFieldInput,
21
- YForm,
22
- YInput,
23
- YInputCheckbox,
24
- YLayer,
25
- YList,
26
- YListItem,
27
- YMenu,
28
- YPagination,
29
- YProgressBar,
30
- YSelect,
31
- YSnackbar,
32
- YSpinnerRing,
33
- YSwitch,
34
- YTab,
35
- YTable,
36
- YTabs,
37
- YTooltip,
38
- YTreeView,
39
- YTreeViewNode,
40
- } from 'yuyeon/types/components';
41
-
42
- declare module '@vue/runtime-core' {
43
- export interface GlobalComponents {
44
- // @define-components
45
- YApp: typeof YApp;
46
- YButton: typeof YButton;
47
- YChip: typeof YChip;
48
- YInput: typeof YInput;
49
- YFieldInput: typeof YFieldInput;
50
- YForm: typeof YForm;
51
- YCard: typeof YCard;
52
- YCardBody: typeof YCardBody;
53
- YCardHeader: typeof YCardHeader;
54
- YCardFooter: typeof YCardFooter;
55
- YDialog: typeof YDialog;
56
- YLayer: typeof YLayer;
57
- YSnackbar: typeof YSnackbar;
58
- YProgressBar: typeof YProgressBar;
59
- YSpinnerRing: typeof YSpinnerRing;
60
- YTooltip: typeof YTooltip;
61
- YExpandVTransition: typeof YExpandVTransition;
62
- YExpandHTransition: typeof YExpandHTransition;
63
- YDividePanel: typeof YDividePanel;
64
- YList: typeof YList;
65
- YListItem: typeof YListItem;
66
- YTreeView: typeof YTreeView;
67
- YTreeViewNode: typeof YTreeViewNode;
68
- YDataTable: typeof YDataTable;
69
- YTable: typeof YTable;
70
- YDataTableServer: typeof YDataTableServer;
71
- YMenu: typeof YMenu;
72
- YPagination: typeof YPagination;
73
- YInputCheckbox: typeof YInputCheckbox;
74
- YCheckbox: typeof YCheckbox;
75
- YSwitch: typeof YSwitch;
76
- YDropdown: typeof YDropdown;
77
- YSelect: typeof YSelect;
78
- YAlert: typeof YAlert;
79
- YTabs: typeof YTabs;
80
- YTab: typeof YTab;
81
- YDivider: typeof YDivider;
82
- }
83
- }
1
+ import {
2
+ YAlert,
3
+ YApp,
4
+ YButton,
5
+ YCard,
6
+ YCardBody,
7
+ YCardFooter,
8
+ YCardHeader,
9
+ YCheckbox,
10
+ YChip,
11
+ YDataTable,
12
+ YDataTableServer,
13
+ YDateCalendar,
14
+ YDialog,
15
+ YDividePanel,
16
+ YDivider,
17
+ YDropdown,
18
+ YExpandHTransition,
19
+ YExpandVTransition,
20
+ YFieldInput,
21
+ YForm,
22
+ YIcon,
23
+ YInput,
24
+ YInputCheckbox,
25
+ YLayer,
26
+ YList,
27
+ YListItem,
28
+ YMenu,
29
+ YPagination,
30
+ YProgressBar,
31
+ YSelect,
32
+ YSnackbar,
33
+ YSpinnerRing,
34
+ YSwitch,
35
+ YTab,
36
+ YTable,
37
+ YTabs,
38
+ YTextarea,
39
+ YTooltip,
40
+ YTreeView,
41
+ YTreeViewNode,
42
+ } from 'yuyeon/components';
43
+
44
+ declare module '@vue/runtime-core' {
45
+ export interface GlobalComponents {
46
+ // @define-components
47
+ YApp: typeof YApp;
48
+ YButton: typeof YButton;
49
+ YChip: typeof YChip;
50
+ YInput: typeof YInput;
51
+ YFieldInput: typeof YFieldInput;
52
+ YTextarea: typeof YTextarea;
53
+ YForm: typeof YForm;
54
+ YCard: typeof YCard;
55
+ YCardBody: typeof YCardBody;
56
+ YCardHeader: typeof YCardHeader;
57
+ YCardFooter: typeof YCardFooter;
58
+ YDialog: typeof YDialog;
59
+ YLayer: typeof YLayer;
60
+ YSnackbar: typeof YSnackbar;
61
+ YProgressBar: typeof YProgressBar;
62
+ YSpinnerRing: typeof YSpinnerRing;
63
+ YTooltip: typeof YTooltip;
64
+ YExpandVTransition: typeof YExpandVTransition;
65
+ YExpandHTransition: typeof YExpandHTransition;
66
+ YDividePanel: typeof YDividePanel;
67
+ YList: typeof YList;
68
+ YListItem: typeof YListItem;
69
+ YTreeView: typeof YTreeView;
70
+ YTreeViewNode: typeof YTreeViewNode;
71
+ YDataTable: typeof YDataTable;
72
+ YTable: typeof YTable;
73
+ YDataTableServer: typeof YDataTableServer;
74
+ YMenu: typeof YMenu;
75
+ YPagination: typeof YPagination;
76
+ YInputCheckbox: typeof YInputCheckbox;
77
+ YCheckbox: typeof YCheckbox;
78
+ YSwitch: typeof YSwitch;
79
+ YDropdown: typeof YDropdown;
80
+ YSelect: typeof YSelect;
81
+ YAlert: typeof YAlert;
82
+ YTabs: typeof YTabs;
83
+ YTab: typeof YTab;
84
+ YDivider: typeof YDivider;
85
+ YDateCalendar: typeof YDateCalendar;
86
+ YIcon: typeof YIcon;
87
+ }
88
+ }
@@ -1 +1,6 @@
1
+ import { HTMLAttributes } from '@vue/runtime-dom';
2
+ import type { ComponentPublicInstance, FunctionalComponent } from 'vue';
1
3
  export type CandidateKey = string | number;
4
+ export type JSXComponent<Props = any> = FunctionalComponent<Props | Props & HTMLAttributes> | {
5
+ new (): ComponentPublicInstance<Props | Props & HTMLAttributes>;
6
+ };
@@ -0,0 +1,38 @@
1
+ import { DateAdapter, DateFormatOptions } from '../types';
2
+ export declare class YuyeonDateAdapter implements DateAdapter<Date> {
3
+ locale: string;
4
+ formats?: Record<string, DateFormatOptions>;
5
+ constructor(options: {
6
+ locale: string;
7
+ formats?: Record<string, DateFormatOptions>;
8
+ });
9
+ getWeekArray(date: Date): Date[][];
10
+ startOfMonth(date: Date): Date;
11
+ endOfMonth(date: Date): Date;
12
+ addDays(date: Date, amount: number): Date;
13
+ addMonths(date: Date, amount: number): Date;
14
+ date(value?: any): Date | null;
15
+ endOfDay(date: Date): Date;
16
+ endOfYear(date: Date): Date;
17
+ format(date: Date, formatString: string): string;
18
+ getDiff(date: Date, comparing: string | Date, unit?: string): number;
19
+ getYear(date: Date): number;
20
+ getMonth(date: Date): number;
21
+ getDay(date: Date): number;
22
+ getNextMonth(date: Date): Date;
23
+ getWeekdays(): string[];
24
+ isAfter(date: Date, comparing: Date): boolean;
25
+ isBefore(date: Date, comparing: Date): boolean;
26
+ isEqual(date: Date, comparing: Date): boolean;
27
+ isSameDay(date: Date, comparing: Date): boolean;
28
+ isSameMonth(date: Date, comparing: Date): boolean;
29
+ isValid(date: any): boolean;
30
+ isWithinRange(date: Date, range: [Date, Date]): boolean;
31
+ parseISO(date: string): Date;
32
+ setMonth(date: Date, month: number): Date;
33
+ setYear(date: Date, year: number): Date;
34
+ startOfDay(date: Date): Date;
35
+ startOfYear(date: Date): Date;
36
+ toISO(date: Date): string;
37
+ toJsDate(date: Date): Date;
38
+ }
@@ -0,0 +1,35 @@
1
+ import type { DateAdapter, DateFormatOptions } from './types';
2
+ export declare const ONE_DAY: number;
3
+ export declare const YYYY_MM_DD_REGEX: RegExp;
4
+ export declare const FIRST_SUNDAY: Date;
5
+ export declare class DateUtil {
6
+ static date(value?: any): Date | null;
7
+ static format(value: Date, formatString: string, locale: string, formats?: Record<string, DateFormatOptions>): string;
8
+ static parseLocalDate(value: string): Date;
9
+ static parseISO(value: string): Date;
10
+ static toISO(adapter: DateAdapter<any>, value: Date): string;
11
+ static getWeekArray(date: Date, locale: string): Date[][];
12
+ static startOfMonth(date: Date): Date;
13
+ static endOfMonth(date: Date): Date;
14
+ static startOfDay(date: Date): Date;
15
+ static startOfYear(date: Date): Date;
16
+ static endOfDay(date: Date): Date;
17
+ static endOfYear(date: Date): Date;
18
+ static getYear(date: Date): number;
19
+ static getMonth(date: Date): number;
20
+ static getDay(date: Date): number;
21
+ static getNextMonth(date: Date): Date;
22
+ static getWeekdays(locale: string): string[];
23
+ static isAfter(date: Date, comparing: Date): boolean;
24
+ static isBefore(date: Date, comparing: Date): boolean;
25
+ static isEqual(date: Date, comparing: Date): boolean;
26
+ static isSameDay(date: Date, comparing: Date): boolean;
27
+ static isSameMonth(date: Date, comparing: Date): boolean;
28
+ static isValid(date: any): boolean;
29
+ static isWithinRange(date: Date, range: [Date, Date]): boolean;
30
+ static addDays(date: Date, amount: number): Date;
31
+ static addMonths(date: Date, amount: number): Date;
32
+ static getDiff(date: Date, comparing: string | Date, unit?: 'month' | string): number;
33
+ static setMonth(date: Date, month: number): Date;
34
+ static setYear(date: Date, year: number): Date;
35
+ }
@@ -0,0 +1,3 @@
1
+ export * from './built-in';
2
+ export { YuyeonDateAdapter } from "./adapters/yuyeon-date-adapter";
3
+ export declare function createDateAdapter(): void;
@@ -0,0 +1,163 @@
1
+ export interface DateAdapter<T = unknown> {
2
+ /**
3
+ *
4
+ * @param value
5
+ */
6
+ date(value?: any): T | null;
7
+ /**
8
+ *
9
+ * @param date
10
+ * @param formatString
11
+ */
12
+ format(date: T, formatString: string): string;
13
+ /**
14
+ *
15
+ * @param value
16
+ */
17
+ toJsDate(value: T): Date;
18
+ /**
19
+ *
20
+ * @param date
21
+ */
22
+ parseISO(date: string): T;
23
+ /**
24
+ *
25
+ * @param date
26
+ */
27
+ toISO(date: T): string;
28
+ /**
29
+ *
30
+ * @param date
31
+ */
32
+ startOfDay(date: T): T;
33
+ /**
34
+ *
35
+ * @param date
36
+ */
37
+ endOfDay(date: T): T;
38
+ /**
39
+ *
40
+ * @param date
41
+ */
42
+ startOfMonth(date: T): T;
43
+ /**
44
+ *
45
+ * @param date
46
+ */
47
+ endOfMonth(date: T): T;
48
+ /**
49
+ *
50
+ * @param date
51
+ */
52
+ startOfYear(date: T): T;
53
+ /**
54
+ *
55
+ * @param date
56
+ */
57
+ endOfYear(date: T): T;
58
+ /**
59
+ *
60
+ * @param date
61
+ * @param comparing
62
+ */
63
+ isBefore(date: T, comparing: T): boolean;
64
+ /**
65
+ *
66
+ * @param date
67
+ * @param comparing
68
+ */
69
+ isAfter(date: T, comparing: T): boolean;
70
+ /**
71
+ *
72
+ * @param date
73
+ * @param comparing
74
+ */
75
+ isEqual(date: T, comparing: T): boolean;
76
+ /**
77
+ *
78
+ * @param date
79
+ * @param comparing
80
+ */
81
+ isSameDay(date: T, comparing: T): boolean;
82
+ /**
83
+ *
84
+ * @param date
85
+ * @param comparing
86
+ */
87
+ isSameMonth(date: T, comparing: T): boolean;
88
+ /**
89
+ *
90
+ * @param date
91
+ */
92
+ isValid(date: any): boolean;
93
+ /**
94
+ *
95
+ * @param date
96
+ * @param range
97
+ */
98
+ isWithinRange(date: T, range: [T, T]): boolean;
99
+ /**
100
+ *
101
+ * @param date
102
+ * @param amount
103
+ */
104
+ addDays(date: T, amount: number): T;
105
+ /**
106
+ *
107
+ * @param date
108
+ * @param amount
109
+ */
110
+ addMonths(date: T, amount: number): T;
111
+ /**
112
+ *
113
+ * @param date
114
+ */
115
+ getYear(date: T): number;
116
+ /**
117
+ *
118
+ * @param date
119
+ * @param year
120
+ */
121
+ setYear(date: T, year: number): T;
122
+ /**
123
+ *
124
+ * @param date
125
+ * @param comparing
126
+ * @param unit
127
+ */
128
+ getDiff(date: T, comparing: T | string, unit?: string): number;
129
+ /**
130
+ *
131
+ *
132
+ * @param date
133
+ */
134
+ getWeekArray(date: T): T[][];
135
+ /**
136
+ *
137
+ */
138
+ getWeekdays(): string[];
139
+ /**
140
+ * 0 ~ 11
141
+ * @param date
142
+ */
143
+ getMonth(date: T): number;
144
+ /**
145
+ *
146
+ * @param date
147
+ * @param month
148
+ */
149
+ setMonth(date: T, month: number): T;
150
+ /**
151
+ *
152
+ * get day (1-31) number
153
+ *
154
+ * @param date
155
+ */
156
+ getDay(date: T): number;
157
+ /**
158
+ *
159
+ * @param date
160
+ */
161
+ getNextMonth(date: T): T;
162
+ }
163
+ export type DateFormatOptions = Intl.DateTimeFormatOptions | ((date: Date, formatString: string, locale: string) => string);
@@ -13,3 +13,4 @@ export * from './frame-scheduler';
13
13
  export * from './vue-component';
14
14
  export * from './reactivity';
15
15
  export * from './color';
16
+ export * from './date';