@semcore/date-picker 4.57.0 → 4.57.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 (59) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/cjs/components/Calendar.js +24 -22
  3. package/lib/cjs/components/Calendar.js.map +1 -1
  4. package/lib/cjs/components/DateRangeComparatorAbstract.js +32 -30
  5. package/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
  6. package/lib/cjs/components/InputTrigger.js +32 -30
  7. package/lib/cjs/components/InputTrigger.js.map +1 -1
  8. package/lib/cjs/components/PickerAbstract.js +32 -30
  9. package/lib/cjs/components/PickerAbstract.js.map +1 -1
  10. package/lib/cjs/components/RangePickerAbstract.js +32 -30
  11. package/lib/cjs/components/RangePickerAbstract.js.map +1 -1
  12. package/lib/es6/components/Calendar.js +24 -22
  13. package/lib/es6/components/Calendar.js.map +1 -1
  14. package/lib/es6/components/DateRangeComparatorAbstract.js +32 -30
  15. package/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
  16. package/lib/es6/components/InputTrigger.js +32 -30
  17. package/lib/es6/components/InputTrigger.js.map +1 -1
  18. package/lib/es6/components/PickerAbstract.js +32 -30
  19. package/lib/es6/components/PickerAbstract.js.map +1 -1
  20. package/lib/es6/components/RangePickerAbstract.js +32 -30
  21. package/lib/es6/components/RangePickerAbstract.js.map +1 -1
  22. package/lib/esm/DatePicker.mjs +114 -103
  23. package/lib/esm/DateRangeComparator.mjs +166 -149
  24. package/lib/esm/DateRangePicker.mjs +85 -77
  25. package/lib/esm/MonthDateRangeComparator.mjs +187 -169
  26. package/lib/esm/MonthPicker.mjs +78 -71
  27. package/lib/esm/MonthRangePicker.mjs +94 -85
  28. package/lib/esm/components/ButtonTrigger.mjs +16 -15
  29. package/lib/esm/components/Calendar.mjs +409 -287
  30. package/lib/esm/components/DateRangeComparatorAbstract.mjs +458 -330
  31. package/lib/esm/components/InputTrigger.mjs +762 -519
  32. package/lib/esm/components/PickerAbstract.mjs +196 -149
  33. package/lib/esm/components/RangePickerAbstract.mjs +310 -221
  34. package/lib/esm/components/index.mjs +127 -109
  35. package/lib/esm/index.mjs +13 -13
  36. package/lib/esm/style/calendar.shadow.css +259 -0
  37. package/lib/esm/style/date-picker.shadow.css +179 -0
  38. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +32 -32
  39. package/lib/esm/translations/de.json.mjs +83 -56
  40. package/lib/esm/translations/en.json.mjs +95 -64
  41. package/lib/esm/translations/es.json.mjs +83 -56
  42. package/lib/esm/translations/fr.json.mjs +83 -56
  43. package/lib/esm/translations/it.json.mjs +83 -56
  44. package/lib/esm/translations/ja.json.mjs +83 -56
  45. package/lib/esm/translations/ko.json.mjs +83 -56
  46. package/lib/esm/translations/nl.json.mjs +83 -56
  47. package/lib/esm/translations/pl.json.mjs +83 -56
  48. package/lib/esm/translations/pt.json.mjs +83 -56
  49. package/lib/esm/translations/ru.json.mjs +35 -24
  50. package/lib/esm/translations/sv.json.mjs +83 -56
  51. package/lib/esm/translations/tr.json.mjs +83 -56
  52. package/lib/esm/translations/vi.json.mjs +83 -56
  53. package/lib/esm/translations/zh.json.mjs +83 -56
  54. package/lib/esm/utils/cronTabScheduler.mjs +58 -52
  55. package/lib/esm/utils/datesIntersects.mjs +15 -11
  56. package/lib/esm/utils/formatDate.mjs +25 -18
  57. package/lib/esm/utils/includesDate.mjs +13 -9
  58. package/lib/esm/utils/shortDateRangeFormat.mjs +53 -31
  59. package/package.json +15 -15
@@ -0,0 +1,179 @@
1
+ SPopper {
2
+ padding: var(--intergalactic-spacing-4x, 16px);
3
+ outline: 0;
4
+
5
+ &::-moz-focus-inner {
6
+ border: none;
7
+ padding: 0;
8
+ }
9
+
10
+ &:active,
11
+ &:hover,
12
+ &:focus {
13
+ outline: 0;
14
+ text-decoration: none;
15
+ }
16
+
17
+ &:focus {
18
+ box-shadow: var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5));
19
+ }
20
+ }
21
+
22
+ SHeader {
23
+ display: flex;
24
+ align-items: center;
25
+ }
26
+
27
+ STitle {
28
+ font-size: var(--intergalactic-fs-200, 14px);
29
+ color: var(--intergalactic-text-primary, #191b23);
30
+ height: 32px;
31
+ width: 100%;
32
+ display: flex;
33
+ justify-content: center;
34
+ align-items: center;
35
+ }
36
+
37
+ SToday {
38
+ display: flex;
39
+ margin-top: var(--intergalactic-spacing-3x, 12px);
40
+ justify-content: center;
41
+ }
42
+
43
+ SPeriod {
44
+ display: flex;
45
+ flex-direction: column;
46
+ margin-bottom: var(--intergalactic-spacing-2x, 8px);
47
+ }
48
+
49
+ SButton SInner {
50
+ justify-content: flex-start;
51
+ }
52
+
53
+ SInputMask {
54
+ color: var(--intergalactic-text-primary, #191b23);
55
+ line-height: normal;
56
+ padding-right: var(--intergalactic-spacing-2x, 8px);
57
+ transition: width calc(var(--intergalactic-duration-medium, 300) * 1ms) ease, min-width calc(var(--intergalactic-duration-medium, 300) * 1ms) ease;
58
+ }
59
+
60
+ SInputMask[animationsDisabled] {
61
+ transition: none;
62
+ }
63
+
64
+ SInputMask SValue {
65
+ letter-spacing: 0;
66
+ }
67
+
68
+ SIndicator {
69
+ color: var(--intergalactic-text-secondary, #6c6e79);
70
+ }
71
+
72
+ SRangeIndicator {
73
+ border-radius: 50%;
74
+ flex-shrink: 0;
75
+ }
76
+
77
+ SRangeIndicator[range='value'] {
78
+ background-color: var(--intergalactic-date-picker-cell-active, #2bb3ff);
79
+ }
80
+
81
+ SRangeIndicator[range='compare'] {
82
+ background-color: var(--intergalactic-date-picker-cell-comparison-active, #8649e1);
83
+ }
84
+
85
+ SRangeIndicator[disabled] {
86
+ opacity: var(--intergalactic-disabled-opacity, 0.3);
87
+ }
88
+
89
+ SHumanizedDate {
90
+ position: absolute;
91
+ pointer-events: none;
92
+ white-space: nowrap;
93
+ overflow: hidden;
94
+ text-overflow: ellipsis;
95
+ width: 100%;
96
+ }
97
+
98
+ SMask {
99
+ letter-spacing: 0;
100
+ white-space: nowrap;
101
+ overflow: hidden;
102
+ }
103
+
104
+ SSingleDateInput SValue,
105
+ SDateRange SMask,
106
+ SSingleDateInput SMask,
107
+ SDateRange SValue {
108
+ opacity: 0;
109
+ }
110
+
111
+ SSingleDateInput:focus-within SHumanizedDate {
112
+ opacity: 0;
113
+ z-index: var(--intergalactic-z-index-deep, -999);
114
+ }
115
+
116
+ SSingleDateInput:focus-within SValue,
117
+ SSingleDateInput:focus-within SMask {
118
+ opacity: 1;
119
+ }
120
+
121
+ SDateRange SValue {
122
+ opacity: 0;
123
+ }
124
+
125
+ SDateRange:focus-within SHumanizedDate {
126
+ opacity: 0;
127
+ z-index: var(--intergalactic-z-index-deep, -999);
128
+ }
129
+
130
+ SDateRange:focus-within SValue,
131
+ SDateRange:focus-within SMask {
132
+ opacity: 1;
133
+ }
134
+
135
+ SInputMask[noHumanizedDate] SValue,
136
+ SInputMask[noHumanizedDate] SMask {
137
+ opacity: 1;
138
+ }
139
+
140
+ SDateRange SInputMask:focus-within SMask {
141
+ background-color: var(--intergalactic-bg-highlight-focus, rgba(0, 143, 248, 0.2));
142
+ }
143
+
144
+ SRangeSep[fulfilled],
145
+ SDateRange:focus-within SRangeSep {
146
+ color: var(--intergalactic-text-primary, #191b23);
147
+ }
148
+
149
+ SRangeComparatorHeader {
150
+ border-bottom: 1px solid var(--intergalactic-border-primary, #c4c7cf);
151
+ padding: var(--intergalactic-spacing-4x, 16px);
152
+ }
153
+
154
+ SRangeCalendar {
155
+ padding: var(--intergalactic-spacing-4x, 16px);
156
+ }
157
+
158
+ SFooter {
159
+ border-top: 1px solid var(--intergalactic-border-primary, #c4c7cf);
160
+ padding: var(--intergalactic-spacing-4x, 16px);
161
+ }
162
+
163
+ SPeriodsList {
164
+ padding: var(--intergalactic-spacing-4x, 16px);
165
+ }
166
+
167
+ STooltip {
168
+ padding: var(--intergalactic-spacing-3x, 12px);
169
+ }
170
+
171
+ SCompareToggle {
172
+ white-space: nowrap;
173
+ }
174
+
175
+ @media (prefers-reduced-motion) {
176
+ SInputMask {
177
+ transition: none;
178
+ }
179
+ }
@@ -1,35 +1,35 @@
1
- import r from "./de.json.mjs";
2
- import o from "./en.json.mjs";
3
- import m from "./es.json.mjs";
4
- import t from "./fr.json.mjs";
5
- import i from "./it.json.mjs";
6
- import p from "./ja.json.mjs";
7
- import f from "./ko.json.mjs";
8
- import e from "./nl.json.mjs";
9
- import s from "./pt.json.mjs";
10
- import a from "./ru.json.mjs";
11
- import l from "./tr.json.mjs";
12
- import v from "./vi.json.mjs";
13
- import d from "./zh.json.mjs";
14
- import n from "./pl.json.mjs";
15
- import z from "./sv.json.mjs";
16
- var D = {
17
- de: r,
18
- en: o,
19
- es: m,
20
- fr: t,
21
- it: i,
22
- ja: p,
23
- ko: f,
24
- nl: e,
25
- pt: s,
26
- ru: a,
27
- tr: l,
28
- vi: v,
29
- zh: d,
30
- pl: n,
31
- sv: z
1
+ import de from "./de.json.mjs";
2
+ import en from "./en.json.mjs";
3
+ import es from "./es.json.mjs";
4
+ import fr from "./fr.json.mjs";
5
+ import it from "./it.json.mjs";
6
+ import ja from "./ja.json.mjs";
7
+ import ko from "./ko.json.mjs";
8
+ import nl from "./nl.json.mjs";
9
+ import pt from "./pt.json.mjs";
10
+ import ru from "./ru.json.mjs";
11
+ import tr from "./tr.json.mjs";
12
+ import vi from "./vi.json.mjs";
13
+ import zh from "./zh.json.mjs";
14
+ import pl from "./pl.json.mjs";
15
+ import sv from "./sv.json.mjs";
16
+ var localizedMessages = {
17
+ de,
18
+ en,
19
+ es,
20
+ fr,
21
+ it,
22
+ ja,
23
+ ko,
24
+ nl,
25
+ pt,
26
+ ru,
27
+ tr,
28
+ vi,
29
+ zh,
30
+ pl,
31
+ sv
32
32
  };
33
33
  export {
34
- D as localizedMessages
34
+ localizedMessages
35
35
  };
@@ -1,62 +1,89 @@
1
- const e = "Anwenden", t = "Zurücksetzen", a = "Heute", n = "Letzte 2 Tage", s = "Letzte Woche", o = "Letzte 2 Wochen", l = "Letzten Monat", i = "Letzte 2 Monate", c = "Letzte 3 Monate", r = "Letzte 6 Monate", h = "Letzte 12 Monate", d = "Voriger Zeitraum", u = "Nächster Zeitraum", g = "Datumsfeld", M = "Vergleichen mit", b = "Vom {date}", m = "Bis {date}", p = "Vorgaben", D = "Datumsbereich", v = "Erster Datumsbereich", z = "Zweiter Datumsbereich", f = "Auswahl begonnen", w = "Ausgewählt", y = "Bitte wählen Sie ein verfügbares Datum aus.", L = "Bitte wählen Sie einen verfügbaren Monat aus.", k = "Bitte wählen Sie ein verfügbares Fälligkeitsdatum aus.", R = "Bitte wählen Sie einen verfügbaren Fälligkeitsmonat aus.", S = {
2
- apply: e,
3
- reset: t,
4
- today: a,
5
- last2Days: n,
6
- lastWeek: s,
7
- last2Weeks: o,
8
- lastMonth: l,
9
- last2Months: i,
10
- last3Months: c,
11
- last6Months: r,
12
- last12Months: h,
13
- prev: d,
14
- next: u,
15
- input: g,
16
- compare: M,
17
- fromDate: b,
18
- toDate: m,
19
- periods: p,
20
- dateRange: D,
21
- dateRange1: v,
22
- dateRange2: z,
23
- selectingStarted: f,
24
- selectingFinished: w,
25
- unavailableDate: y,
26
- unavailableMonth: L,
27
- unavailableEndDate: k,
28
- unavailableEndMonth: R,
1
+ const apply = "Anwenden";
2
+ const reset = "Zurücksetzen";
3
+ const today = "Heute";
4
+ const last2Days = "Letzte 2 Tage";
5
+ const lastWeek = "Letzte Woche";
6
+ const last2Weeks = "Letzte 2 Wochen";
7
+ const lastMonth = "Letzten Monat";
8
+ const last2Months = "Letzte 2 Monate";
9
+ const last3Months = "Letzte 3 Monate";
10
+ const last6Months = "Letzte 6 Monate";
11
+ const last12Months = "Letzte 12 Monate";
12
+ const prev = "Voriger Zeitraum";
13
+ const next = "Nächster Zeitraum";
14
+ const input = "Datumsfeld";
15
+ const compare = "Vergleichen mit";
16
+ const fromDate = "Vom {date}";
17
+ const toDate = "Bis {date}";
18
+ const periods = "Vorgaben";
19
+ const dateRange = "Datumsbereich";
20
+ const dateRange1 = "Erster Datumsbereich";
21
+ const dateRange2 = "Zweiter Datumsbereich";
22
+ const selectingStarted = "Auswahl begonnen";
23
+ const selectingFinished = "Ausgewählt";
24
+ const unavailableDate = "Bitte wählen Sie ein verfügbares Datum aus.";
25
+ const unavailableMonth = "Bitte wählen Sie einen verfügbaren Monat aus.";
26
+ const unavailableEndDate = "Bitte wählen Sie ein verfügbares Fälligkeitsdatum aus.";
27
+ const unavailableEndMonth = "Bitte wählen Sie einen verfügbaren Fälligkeitsmonat aus.";
28
+ const de = {
29
+ apply,
30
+ reset,
31
+ today,
32
+ last2Days,
33
+ lastWeek,
34
+ last2Weeks,
35
+ lastMonth,
36
+ last2Months,
37
+ last3Months,
38
+ last6Months,
39
+ last12Months,
40
+ prev,
41
+ next,
42
+ input,
43
+ compare,
44
+ fromDate,
45
+ toDate,
46
+ periods,
47
+ dateRange,
48
+ dateRange1,
49
+ dateRange2,
50
+ selectingStarted,
51
+ selectingFinished,
52
+ unavailableDate,
53
+ unavailableMonth,
54
+ unavailableEndDate,
55
+ unavailableEndMonth,
29
56
  "placeholder-days": "T",
30
57
  "placeholder-months": "M",
31
58
  "placeholder-years": "J"
32
59
  };
33
60
  export {
34
- e as apply,
35
- M as compare,
36
- D as dateRange,
37
- v as dateRange1,
38
- z as dateRange2,
39
- S as default,
40
- b as fromDate,
41
- g as input,
42
- h as last12Months,
43
- n as last2Days,
44
- i as last2Months,
45
- o as last2Weeks,
46
- c as last3Months,
47
- r as last6Months,
48
- l as lastMonth,
49
- s as lastWeek,
50
- u as next,
51
- p as periods,
52
- d as prev,
53
- t as reset,
54
- w as selectingFinished,
55
- f as selectingStarted,
56
- m as toDate,
57
- a as today,
58
- y as unavailableDate,
59
- k as unavailableEndDate,
60
- R as unavailableEndMonth,
61
- L as unavailableMonth
61
+ apply,
62
+ compare,
63
+ dateRange,
64
+ dateRange1,
65
+ dateRange2,
66
+ de as default,
67
+ fromDate,
68
+ input,
69
+ last12Months,
70
+ last2Days,
71
+ last2Months,
72
+ last2Weeks,
73
+ last3Months,
74
+ last6Months,
75
+ lastMonth,
76
+ lastWeek,
77
+ next,
78
+ periods,
79
+ prev,
80
+ reset,
81
+ selectingFinished,
82
+ selectingStarted,
83
+ toDate,
84
+ today,
85
+ unavailableDate,
86
+ unavailableEndDate,
87
+ unavailableEndMonth,
88
+ unavailableMonth
62
89
  };
@@ -1,70 +1,101 @@
1
- const t = "Apply", e = "Reset", a = "Today", s = "Last 2 days", n = "Last week", o = "Last 2 weeks", l = "Last month", c = "Last 2 months", d = "Last 3 months", r = "Last 6 months", h = "Last 12 months", i = "Previous year", p = "Next year", m = "Previous month", M = "Next month", v = "Date field", D = "Compare to", u = "From {date}", g = "To {date}", y = "From date", b = "Presets", P = "To date", L = "Date range", x = "First date range", R = "Second date range", f = "Started selecting", k = "Selected", F = "Please select an available date.", S = "Please select an available month.", Y = "Please select an available due date.", E = "Please select an available due month.", W = {
2
- apply: t,
3
- reset: e,
4
- today: a,
5
- last2Days: s,
6
- lastWeek: n,
7
- last2Weeks: o,
8
- lastMonth: l,
9
- last2Months: c,
10
- last3Months: d,
11
- last6Months: r,
12
- last12Months: h,
13
- prevYear: i,
14
- nextYear: p,
15
- prevMonth: m,
16
- nextMonth: M,
17
- input: v,
18
- compare: D,
19
- fromDate: u,
20
- toDate: g,
21
- fromDatePlaceholder: y,
22
- periods: b,
23
- toDatePlaceholder: P,
24
- dateRange: L,
25
- dateRange1: x,
26
- dateRange2: R,
27
- selectingStarted: f,
28
- selectingFinished: k,
29
- unavailableDate: F,
30
- unavailableMonth: S,
31
- unavailableEndDate: Y,
32
- unavailableEndMonth: E,
1
+ const apply = "Apply";
2
+ const reset = "Reset";
3
+ const today = "Today";
4
+ const last2Days = "Last 2 days";
5
+ const lastWeek = "Last week";
6
+ const last2Weeks = "Last 2 weeks";
7
+ const lastMonth = "Last month";
8
+ const last2Months = "Last 2 months";
9
+ const last3Months = "Last 3 months";
10
+ const last6Months = "Last 6 months";
11
+ const last12Months = "Last 12 months";
12
+ const prevYear = "Previous year";
13
+ const nextYear = "Next year";
14
+ const prevMonth = "Previous month";
15
+ const nextMonth = "Next month";
16
+ const input = "Date field";
17
+ const compare = "Compare to";
18
+ const fromDate = "From {date}";
19
+ const toDate = "To {date}";
20
+ const fromDatePlaceholder = "From date";
21
+ const periods = "Presets";
22
+ const toDatePlaceholder = "To date";
23
+ const dateRange = "Date range";
24
+ const dateRange1 = "First date range";
25
+ const dateRange2 = "Second date range";
26
+ const selectingStarted = "Started selecting";
27
+ const selectingFinished = "Selected";
28
+ const unavailableDate = "Please select an available date.";
29
+ const unavailableMonth = "Please select an available month.";
30
+ const unavailableEndDate = "Please select an available due date.";
31
+ const unavailableEndMonth = "Please select an available due month.";
32
+ const en = {
33
+ apply,
34
+ reset,
35
+ today,
36
+ last2Days,
37
+ lastWeek,
38
+ last2Weeks,
39
+ lastMonth,
40
+ last2Months,
41
+ last3Months,
42
+ last6Months,
43
+ last12Months,
44
+ prevYear,
45
+ nextYear,
46
+ prevMonth,
47
+ nextMonth,
48
+ input,
49
+ compare,
50
+ fromDate,
51
+ toDate,
52
+ fromDatePlaceholder,
53
+ periods,
54
+ toDatePlaceholder,
55
+ dateRange,
56
+ dateRange1,
57
+ dateRange2,
58
+ selectingStarted,
59
+ selectingFinished,
60
+ unavailableDate,
61
+ unavailableMonth,
62
+ unavailableEndDate,
63
+ unavailableEndMonth,
33
64
  "placeholder-days": "D",
34
65
  "placeholder-months": "M",
35
66
  "placeholder-years": "Y"
36
67
  };
37
68
  export {
38
- t as apply,
39
- D as compare,
40
- L as dateRange,
41
- x as dateRange1,
42
- R as dateRange2,
43
- W as default,
44
- u as fromDate,
45
- y as fromDatePlaceholder,
46
- v as input,
47
- h as last12Months,
48
- s as last2Days,
49
- c as last2Months,
50
- o as last2Weeks,
51
- d as last3Months,
52
- r as last6Months,
53
- l as lastMonth,
54
- n as lastWeek,
55
- M as nextMonth,
56
- p as nextYear,
57
- b as periods,
58
- m as prevMonth,
59
- i as prevYear,
60
- e as reset,
61
- k as selectingFinished,
62
- f as selectingStarted,
63
- g as toDate,
64
- P as toDatePlaceholder,
65
- a as today,
66
- F as unavailableDate,
67
- Y as unavailableEndDate,
68
- E as unavailableEndMonth,
69
- S as unavailableMonth
69
+ apply,
70
+ compare,
71
+ dateRange,
72
+ dateRange1,
73
+ dateRange2,
74
+ en as default,
75
+ fromDate,
76
+ fromDatePlaceholder,
77
+ input,
78
+ last12Months,
79
+ last2Days,
80
+ last2Months,
81
+ last2Weeks,
82
+ last3Months,
83
+ last6Months,
84
+ lastMonth,
85
+ lastWeek,
86
+ nextMonth,
87
+ nextYear,
88
+ periods,
89
+ prevMonth,
90
+ prevYear,
91
+ reset,
92
+ selectingFinished,
93
+ selectingStarted,
94
+ toDate,
95
+ toDatePlaceholder,
96
+ today,
97
+ unavailableDate,
98
+ unavailableEndDate,
99
+ unavailableEndMonth,
100
+ unavailableMonth
70
101
  };