yuyeon 0.0.41 → 0.0.42-rc2

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 (114) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/yuyeon.js +4874 -3041
  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/index.mjs +2 -0
  17. package/lib/components/index.mjs.map +1 -1
  18. package/lib/components/input/YInput.mjs +1 -1
  19. package/lib/components/input/YInput.mjs.map +1 -1
  20. package/lib/components/layer/YLayer.mjs.map +1 -1
  21. package/lib/components/list/YList.mjs.map +1 -1
  22. package/lib/components/menu/YMenu.mjs +2 -2
  23. package/lib/components/menu/YMenu.mjs.map +1 -1
  24. package/lib/components/select/YSelect.mjs.map +1 -1
  25. package/lib/components/switch/YSwitch.mjs +2 -0
  26. package/lib/components/switch/YSwitch.mjs.map +1 -1
  27. package/lib/components/table/composibles/pagination.mjs.map +1 -1
  28. package/lib/components/tooltip/YTooltip.mjs +2 -2
  29. package/lib/components/tooltip/YTooltip.mjs.map +1 -1
  30. package/lib/components/tree-view/YTreeView.mjs +5 -0
  31. package/lib/components/tree-view/YTreeView.mjs.map +1 -1
  32. package/lib/components/tree-view/YTreeViewNode.mjs +1 -0
  33. package/lib/components/tree-view/YTreeViewNode.mjs.map +1 -1
  34. package/lib/composables/communication.mjs +9 -0
  35. package/lib/composables/communication.mjs.map +1 -1
  36. package/lib/composables/date/factory.mjs +12 -0
  37. package/lib/composables/date/factory.mjs.map +1 -0
  38. package/lib/composables/date/index.mjs +19 -1
  39. package/lib/composables/date/index.mjs.map +1 -1
  40. package/lib/composables/date/setting.mjs +11 -0
  41. package/lib/composables/date/setting.mjs.map +1 -0
  42. package/lib/composables/date/types.mjs +1 -1
  43. package/lib/composables/date/types.mjs.map +1 -1
  44. package/lib/composables/i18n/index.mjs +30 -0
  45. package/lib/composables/i18n/index.mjs.map +1 -0
  46. package/lib/composables/i18n/locale.mjs +5 -0
  47. package/lib/composables/i18n/locale.mjs.map +1 -0
  48. package/lib/composables/i18n/rtl.mjs +34 -0
  49. package/lib/composables/i18n/rtl.mjs.map +1 -0
  50. package/lib/composables/i18n/share.mjs +2 -0
  51. package/lib/composables/i18n/share.mjs.map +1 -0
  52. package/lib/composables/index.mjs +1 -0
  53. package/lib/composables/index.mjs.map +1 -1
  54. package/lib/composables/theme/index.mjs.map +1 -1
  55. package/lib/composables/transition.mjs.map +1 -1
  56. package/lib/i18n/built-in.mjs +77 -0
  57. package/lib/i18n/built-in.mjs.map +1 -0
  58. package/lib/i18n/config.mjs +82 -0
  59. package/lib/i18n/config.mjs.map +1 -0
  60. package/lib/i18n/types.mjs +2 -0
  61. package/lib/i18n/types.mjs.map +1 -0
  62. package/lib/index.mjs +21 -5
  63. package/lib/index.mjs.map +1 -1
  64. package/lib/locales/en.mjs +4 -0
  65. package/lib/locales/en.mjs.map +1 -0
  66. package/lib/locales/index.mjs +3 -0
  67. package/lib/locales/index.mjs.map +1 -0
  68. package/lib/locales/ko.mjs +4 -0
  69. package/lib/locales/ko.mjs.map +1 -0
  70. package/lib/styles/util/_mixin.scss +34 -0
  71. package/lib/util/date/adapters/yuyeon-date-adapter.mjs +99 -0
  72. package/lib/util/date/adapters/yuyeon-date-adapter.mjs.map +1 -0
  73. package/lib/util/date/built-in.mjs +12 -102
  74. package/lib/util/date/built-in.mjs.map +1 -1
  75. package/lib/util/date/index.mjs +1 -0
  76. package/lib/util/date/index.mjs.map +1 -1
  77. package/lib/util/date/types.mjs.map +1 -1
  78. package/lib/util/index.mjs +1 -0
  79. package/lib/util/index.mjs.map +1 -1
  80. package/package.json +6 -4
  81. package/types/components/date-picker/YDateCalendar.d.ts +136 -0
  82. package/types/components/date-picker/index.d.ts +1 -0
  83. package/types/components/dialog/YDialog.d.ts +2 -2
  84. package/types/components/index.d.ts +2 -0
  85. package/types/components/input/YInput.d.ts +2 -2
  86. package/types/components/layer/YLayer.d.ts +3 -3
  87. package/types/components/list/YList.d.ts +3 -3
  88. package/types/components/list/YListItem.d.ts +3 -3
  89. package/types/components/menu/YMenu.d.ts +5 -5
  90. package/types/components/select/YSelect.d.ts +6 -6
  91. package/types/components/tooltip/YTooltip.d.ts +4 -4
  92. package/types/components/tree-view/YTreeView.d.ts +3 -0
  93. package/types/components/tree-view/YTreeViewNode.d.ts +8 -0
  94. package/types/composables/communication.d.ts +2 -0
  95. package/types/composables/date/factory.d.ts +2 -0
  96. package/types/composables/date/index.d.ts +11 -0
  97. package/types/composables/date/setting.d.ts +4 -0
  98. package/types/composables/date/types.d.ts +12 -0
  99. package/types/composables/i18n/index.d.ts +8 -0
  100. package/types/composables/i18n/locale.d.ts +2 -0
  101. package/types/composables/i18n/rtl.d.ts +20 -0
  102. package/types/composables/i18n/share.d.ts +1 -0
  103. package/types/composables/index.d.ts +2 -0
  104. package/types/composables/theme/index.d.ts +3 -3
  105. package/types/i18n/built-in.d.ts +2 -0
  106. package/types/i18n/config.d.ts +81 -0
  107. package/types/i18n/types.d.ts +19 -0
  108. package/types/locales/en.d.ts +4 -0
  109. package/types/shims.d.ts +2 -0
  110. package/types/util/date/adapters/yuyeon-date-adapter.d.ts +38 -0
  111. package/types/util/date/built-in.d.ts +35 -0
  112. package/types/util/date/index.d.ts +3 -0
  113. package/types/util/date/types.d.ts +163 -0
  114. package/types/util/index.d.ts +1 -0
@@ -39,7 +39,7 @@ export declare const YMenuPropOptions: {
39
39
  })>;
40
40
  default: string;
41
41
  };
42
- theme: StringConstructor;
42
+ theme: PropType<string>;
43
43
  modelValue: {
44
44
  type: PropType<boolean>;
45
45
  };
@@ -140,7 +140,7 @@ export declare const YMenu: import("vue").DefineComponent<{
140
140
  type: NumberConstructor;
141
141
  default: number;
142
142
  };
143
- theme: StringConstructor;
143
+ theme: PropType<string>;
144
144
  modelValue: {
145
145
  type: PropType<boolean>;
146
146
  };
@@ -234,7 +234,7 @@ export declare const YMenu: import("vue").DefineComponent<{
234
234
  })>;
235
235
  default: string;
236
236
  };
237
- theme: StringConstructor;
237
+ theme: PropType<string>;
238
238
  modelValue: {
239
239
  type: PropType<boolean>;
240
240
  };
@@ -1899,7 +1899,7 @@ export declare const YMenu: import("vue").DefineComponent<{
1899
1899
  })>;
1900
1900
  default: string;
1901
1901
  };
1902
- theme: StringConstructor;
1902
+ theme: PropType<string>;
1903
1903
  modelValue: {
1904
1904
  type: PropType<boolean>;
1905
1905
  };
@@ -2008,7 +2008,7 @@ export declare const YMenu: import("vue").DefineComponent<{
2008
2008
  type: NumberConstructor;
2009
2009
  default: number;
2010
2010
  };
2011
- theme: StringConstructor;
2011
+ theme: PropType<string>;
2012
2012
  modelValue: {
2013
2013
  type: PropType<boolean>;
2014
2014
  };
@@ -757,7 +757,7 @@ export declare const YSelect: import("vue").DefineComponent<{
757
757
  type: NumberConstructor;
758
758
  default: number;
759
759
  };
760
- theme: StringConstructor;
760
+ theme: PropType<string>;
761
761
  modelValue: {
762
762
  type: PropType<boolean>;
763
763
  };
@@ -854,7 +854,7 @@ export declare const YSelect: import("vue").DefineComponent<{
854
854
  })>;
855
855
  default: string;
856
856
  };
857
- theme: StringConstructor;
857
+ theme: PropType<string>;
858
858
  modelValue: {
859
859
  type: PropType<boolean>;
860
860
  };
@@ -2519,7 +2519,7 @@ export declare const YSelect: import("vue").DefineComponent<{
2519
2519
  })>;
2520
2520
  default: string;
2521
2521
  };
2522
- theme: StringConstructor;
2522
+ theme: PropType<string>;
2523
2523
  modelValue: {
2524
2524
  type: PropType<boolean>;
2525
2525
  };
@@ -2665,7 +2665,7 @@ export declare const YSelect: import("vue").DefineComponent<{
2665
2665
  type: NumberConstructor;
2666
2666
  default: number;
2667
2667
  };
2668
- theme: StringConstructor;
2668
+ theme: PropType<string>;
2669
2669
  modelValue: {
2670
2670
  type: PropType<boolean>;
2671
2671
  };
@@ -2762,7 +2762,7 @@ export declare const YSelect: import("vue").DefineComponent<{
2762
2762
  })>;
2763
2763
  default: string;
2764
2764
  };
2765
- theme: StringConstructor;
2765
+ theme: PropType<string>;
2766
2766
  modelValue: {
2767
2767
  type: PropType<boolean>;
2768
2768
  };
@@ -4427,7 +4427,7 @@ export declare const YSelect: import("vue").DefineComponent<{
4427
4427
  })>;
4428
4428
  default: string;
4429
4429
  };
4430
- theme: StringConstructor;
4430
+ theme: PropType<string>;
4431
4431
  modelValue: {
4432
4432
  type: PropType<boolean>;
4433
4433
  };
@@ -47,7 +47,7 @@ export declare const YTooltip: import("vue").DefineComponent<{
47
47
  type: NumberConstructor;
48
48
  default: number;
49
49
  };
50
- theme: StringConstructor;
50
+ theme: PropType<string>;
51
51
  modelValue: {
52
52
  type: PropType<boolean>;
53
53
  };
@@ -137,7 +137,7 @@ export declare const YTooltip: import("vue").DefineComponent<{
137
137
  })>;
138
138
  default: string;
139
139
  };
140
- theme: StringConstructor;
140
+ theme: PropType<string>;
141
141
  modelValue: {
142
142
  type: PropType<boolean>;
143
143
  };
@@ -1802,7 +1802,7 @@ export declare const YTooltip: import("vue").DefineComponent<{
1802
1802
  })>;
1803
1803
  default: string;
1804
1804
  };
1805
- theme: StringConstructor;
1805
+ theme: PropType<string>;
1806
1806
  modelValue: {
1807
1807
  type: PropType<boolean>;
1808
1808
  };
@@ -1915,7 +1915,7 @@ export declare const YTooltip: import("vue").DefineComponent<{
1915
1915
  type: NumberConstructor;
1916
1916
  default: number;
1917
1917
  };
1918
- theme: StringConstructor;
1918
+ theme: PropType<string>;
1919
1919
  modelValue: {
1920
1920
  type: PropType<boolean>;
1921
1921
  };
@@ -26,6 +26,7 @@ export declare const YTreeView: import("vue").DefineComponent<{
26
26
  enableActive: BooleanConstructor;
27
27
  activeClass: (ArrayConstructor | StringConstructor)[];
28
28
  activeSingleModifier: StringConstructor;
29
+ requiredActive: BooleanConstructor;
29
30
  activeColor: {
30
31
  type: StringConstructor;
31
32
  default: string;
@@ -92,6 +93,7 @@ export declare const YTreeView: import("vue").DefineComponent<{
92
93
  enableActive: BooleanConstructor;
93
94
  activeClass: (ArrayConstructor | StringConstructor)[];
94
95
  activeSingleModifier: StringConstructor;
96
+ requiredActive: BooleanConstructor;
95
97
  activeColor: {
96
98
  type: StringConstructor;
97
99
  default: string;
@@ -133,6 +135,7 @@ export declare const YTreeView: import("vue").DefineComponent<{
133
135
  active: CandidateKey[];
134
136
  disableTransition: boolean;
135
137
  enableActive: boolean;
138
+ requiredActive: boolean;
136
139
  activeColor: string;
137
140
  enableSelect: boolean;
138
141
  items: any[];
@@ -9,6 +9,7 @@ export declare const pressYTreeViewNodeProps: <Defaults extends {
9
9
  enableActive?: unknown;
10
10
  activeClass?: unknown;
11
11
  activeSingleModifier?: unknown;
12
+ requiredActive?: unknown;
12
13
  activeColor?: unknown;
13
14
  enableSelect?: unknown;
14
15
  } = {}>(defaults?: Defaults | undefined) => {
@@ -78,6 +79,10 @@ export declare const pressYTreeViewNodeProps: <Defaults extends {
78
79
  type: PropType<unknown extends Defaults["activeSingleModifier"] ? string : string | Defaults["activeSingleModifier"]>;
79
80
  default: unknown extends Defaults["activeSingleModifier"] ? string : string | Defaults["activeSingleModifier"];
80
81
  };
82
+ requiredActive: unknown extends Defaults["requiredActive"] ? BooleanConstructor : {
83
+ type: PropType<unknown extends Defaults["requiredActive"] ? boolean : boolean | Defaults["requiredActive"]>;
84
+ default: unknown extends Defaults["requiredActive"] ? boolean : boolean | Defaults["requiredActive"];
85
+ };
81
86
  activeColor: unknown extends Defaults["activeColor"] ? {
82
87
  type: StringConstructor;
83
88
  default: string;
@@ -118,6 +123,7 @@ export declare const YTreeViewNode: import("vue").DefineComponent<{
118
123
  enableActive: BooleanConstructor;
119
124
  activeClass: (ArrayConstructor | StringConstructor)[];
120
125
  activeSingleModifier: StringConstructor;
126
+ requiredActive: BooleanConstructor;
121
127
  activeColor: {
122
128
  type: StringConstructor;
123
129
  default: string;
@@ -162,6 +168,7 @@ export declare const YTreeViewNode: import("vue").DefineComponent<{
162
168
  enableActive: BooleanConstructor;
163
169
  activeClass: (ArrayConstructor | StringConstructor)[];
164
170
  activeSingleModifier: StringConstructor;
171
+ requiredActive: BooleanConstructor;
165
172
  activeColor: {
166
173
  type: StringConstructor;
167
174
  default: string;
@@ -177,6 +184,7 @@ export declare const YTreeViewNode: import("vue").DefineComponent<{
177
184
  }>>, {
178
185
  disableTransition: boolean;
179
186
  enableActive: boolean;
187
+ requiredActive: boolean;
180
188
  activeColor: string;
181
189
  enableSelect: boolean;
182
190
  items: any[];
@@ -1 +1,3 @@
1
+ import type { Ref } from 'vue';
1
2
  export declare function useModelDuplex(props: any, prop?: string, defaultValue?: any, getIn?: (value?: any) => any, setOut?: (value: any) => any): import("vue").WritableComputedRef<any>;
3
+ export declare function useProvided<T>(props: any, prop: string, provided: Ref<T>): import("vue").WritableComputedRef<any>;
@@ -0,0 +1,2 @@
1
+ import { LocaleModule } from '../../i18n/types';
2
+ export declare function constructAdapter(options: any, locale: LocaleModule): any;
@@ -0,0 +1,11 @@
1
+ import { LocaleModule } from '../../i18n/types';
2
+ import { DateInstance, DateOptions } from './types';
3
+ export declare const YUYEON_DATE_KEY: unique symbol;
4
+ export declare const YUYEON_DATE_OPTIONS_KEY: unique symbol;
5
+ export declare function createDateModule(options: DateOptions, locale: LocaleModule): {
6
+ options: {
7
+ [x: string]: any;
8
+ };
9
+ instance: any;
10
+ };
11
+ export declare function useDate(): DateInstance;
@@ -0,0 +1,4 @@
1
+ import type { DateOptions } from './types';
2
+ export declare function configureOptions(options?: DateOptions): {
3
+ [x: string]: any;
4
+ };
@@ -0,0 +1,12 @@
1
+ import type { DateAdapter } from '../../util/date/types';
2
+ export interface DateOptions {
3
+ adapter: any;
4
+ locale: Record<string, any>;
5
+ formats?: Record<string, any>;
6
+ }
7
+ export interface DateInstanceType {
8
+ instanceType: unknown;
9
+ }
10
+ export interface DateInstance<T = DateInstanceType['instanceType']> extends DateAdapter<T> {
11
+ locale?: any;
12
+ }
@@ -0,0 +1,8 @@
1
+ import { LocaleModule, LocaleOptions } from '../../i18n/types';
2
+ import { RtlModule, RtlOptions, RtlProps } from './rtl';
3
+ export declare function createI18nModule(options?: LocaleOptions & RtlOptions): {
4
+ localeModule: LocaleModule;
5
+ rtlModule: RtlModule;
6
+ };
7
+ export declare function useI18n(): LocaleModule & RtlModule;
8
+ export declare function provideI18n(props: LocaleOptions & RtlProps): any;
@@ -0,0 +1,2 @@
1
+ import { LocaleOptions } from '../../i18n/types';
2
+ export declare function createLocaleModule(options?: LocaleOptions): import("../../i18n/types").LocaleModule;
@@ -0,0 +1,20 @@
1
+ import type { Ref } from 'vue';
2
+ import { LocaleModule } from '../../i18n/types';
3
+ export declare const YUYEON_RTL_KEY: unique symbol;
4
+ export interface RtlOptions {
5
+ rtlOptions: Record<string, boolean>;
6
+ }
7
+ export interface RtlProps {
8
+ rtl?: boolean;
9
+ }
10
+ export interface RtlModule {
11
+ rtl: Ref<boolean>;
12
+ rtlOptions: Ref<Record<string, boolean>>;
13
+ rtlClasses: Ref<string>;
14
+ }
15
+ export declare function createRtlModule(localeModule: LocaleModule, options?: RtlOptions): RtlModule;
16
+ export declare function createRtlProvideValue(localeModule: LocaleModule, rtlOptions: RtlModule['rtlOptions'], props: RtlProps): RtlModule;
17
+ export declare function useRtl(): {
18
+ rtl: any;
19
+ rtlClasses: any;
20
+ };
@@ -0,0 +1 @@
1
+ export declare const YUYEON_I18N_KEY: unique symbol;
@@ -0,0 +1,2 @@
1
+ export * from './communication';
2
+ export * from './date';
@@ -1,4 +1,4 @@
1
- import type { App, ComputedRef, Ref } from 'vue';
1
+ import type { App, ComputedRef, PropType, Ref } from 'vue';
2
2
  import { ThemeScheme } from './setting';
3
3
  import type { ThemeOptions } from './types';
4
4
  export type { ThemeOptions };
@@ -22,8 +22,8 @@ export declare const YUYEON_THEME_KEY: unique symbol;
22
22
  export declare const pressThemePropsOptions: <Defaults extends {
23
23
  theme?: unknown;
24
24
  } = {}>(defaults?: Defaults | undefined) => {
25
- theme: unknown extends Defaults["theme"] ? StringConstructor : {
26
- type: import("vue").PropType<unknown extends Defaults["theme"] ? string : string | Defaults["theme"]>;
25
+ theme: unknown extends Defaults["theme"] ? PropType<string> : {
26
+ type: PropType<unknown extends Defaults["theme"] ? string : string | Defaults["theme"]>;
27
27
  default: unknown extends Defaults["theme"] ? string : string | Defaults["theme"];
28
28
  };
29
29
  };
@@ -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
@@ -11,6 +11,7 @@ import {
11
11
  YChip,
12
12
  YDataTable,
13
13
  YDataTableServer,
14
+ YDateCalendar,
14
15
  YDialog,
15
16
  YDividePanel,
16
17
  YDivider,
@@ -79,5 +80,6 @@ declare module '@vue/runtime-core' {
79
80
  YTabs: typeof YTabs;
80
81
  YTab: typeof YTab;
81
82
  YDivider: typeof YDivider;
83
+ YDateCalendar: typeof YDateCalendar;
82
84
  }
83
85
  }
@@ -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 { 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(date: 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';