@spaced-out/ui-design-system 0.5.0 → 0.5.2

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 (86) hide show
  1. package/.cspell/custom-words.txt +9 -7
  2. package/.storybook/{SenseTheme.js → SenseTheme.ts} +4 -2
  3. package/.storybook/{main.js → main.ts} +24 -24
  4. package/.storybook/manager-head.html +4 -0
  5. package/.storybook/{manager.js → manager.ts} +0 -3
  6. package/.storybook/paths-macro.d.ts +6 -0
  7. package/.storybook/preview.ts +67 -0
  8. package/.storybook/tsconfig.json +14 -0
  9. package/CHANGELOG.md +28 -0
  10. package/lib/components/Charts/ChartTooltip/index.d.ts +2 -2
  11. package/lib/components/Charts/ChartTooltip/index.d.ts.map +1 -1
  12. package/lib/components/Charts/ColumnChart/ColumnChart.d.ts +2 -1
  13. package/lib/components/Charts/ColumnChart/ColumnChart.d.ts.map +1 -1
  14. package/lib/components/Charts/DonutChart/DonutChart.d.ts +3 -2
  15. package/lib/components/Charts/DonutChart/DonutChart.d.ts.map +1 -1
  16. package/lib/components/Charts/FunnelChart/FunnelChart.d.ts +2 -1
  17. package/lib/components/Charts/FunnelChart/FunnelChart.d.ts.map +1 -1
  18. package/lib/components/Charts/LineChart/LineChart.d.ts +2 -1
  19. package/lib/components/Charts/LineChart/LineChart.d.ts.map +1 -1
  20. package/lib/components/Charts/SpiderChart/SpiderChart.d.ts +2 -1
  21. package/lib/components/Charts/SpiderChart/SpiderChart.d.ts.map +1 -1
  22. package/lib/components/Charts/index.d.ts.map +1 -1
  23. package/lib/components/ChatBubble/ChatBubble.d.ts +2 -1
  24. package/lib/components/ChatBubble/ChatBubble.d.ts.map +1 -1
  25. package/lib/components/FileUpload/FileBlock/FileBlock.d.ts +1 -0
  26. package/lib/components/FileUpload/FileBlock/FileBlock.d.ts.map +1 -1
  27. package/lib/components/FileUpload/FileBlock/FileBlock.js +3 -2
  28. package/lib/components/FileUpload/FileBlock/FileBlock.stories.d.ts +14 -0
  29. package/lib/components/FileUpload/FileBlock/FileBlock.stories.d.ts.map +1 -1
  30. package/lib/components/InContextAlert/InContextAlert.d.ts +9 -0
  31. package/lib/components/InContextAlert/InContextAlert.d.ts.map +1 -1
  32. package/lib/components/InContextAlert/InContextAlert.js +4 -2
  33. package/lib/components/InContextAlert/InContextAlert.stories.d.ts +17 -0
  34. package/lib/components/InContextAlert/InContextAlert.stories.d.ts.map +1 -1
  35. package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts +12 -0
  36. package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.d.ts.map +1 -0
  37. package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.js +78 -0
  38. package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.module.css +91 -0
  39. package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.stories.d.ts +249 -0
  40. package/lib/components/InContextAlertWithMultipleActions/InContextAlertWithMultipleActions.stories.d.ts.map +1 -0
  41. package/lib/components/InContextAlertWithMultipleActions/index.d.ts +2 -0
  42. package/lib/components/InContextAlertWithMultipleActions/index.d.ts.map +1 -0
  43. package/lib/components/InContextAlertWithMultipleActions/index.js +16 -0
  44. package/lib/components/OptionButton/SimpleOptionButton.d.ts +0 -1
  45. package/lib/components/OptionButton/SimpleOptionButton.d.ts.map +1 -1
  46. package/lib/components/ScoreBar/ScoreBar.d.ts +2 -1
  47. package/lib/components/ScoreBar/ScoreBar.d.ts.map +1 -1
  48. package/lib/components/Table/StaticTable.d.ts.map +1 -1
  49. package/lib/components/Table/Table.d.ts +2 -2
  50. package/lib/components/Table/Table.d.ts.map +1 -1
  51. package/lib/components/index.d.ts.map +1 -1
  52. package/lib/index.d.ts.map +1 -1
  53. package/lib/types/charts.d.ts +19 -10
  54. package/lib/types/charts.d.ts.map +1 -1
  55. package/lib/utils/charts/charts.d.ts.map +1 -1
  56. package/lib/utils/charts/charts.js +0 -4
  57. package/lib/utils/charts/columnChart.d.ts.map +1 -1
  58. package/lib/utils/charts/columnChart.js +0 -1
  59. package/lib/utils/charts/donutChart.d.ts.map +1 -1
  60. package/lib/utils/charts/donutChart.js +1 -7
  61. package/lib/utils/charts/funnelChart.d.ts.map +1 -1
  62. package/lib/utils/charts/funnelChart.js +0 -3
  63. package/lib/utils/charts/lineChart.d.ts.map +1 -1
  64. package/lib/utils/charts/lineChart.js +0 -1
  65. package/lib/utils/classify/index.d.ts.map +1 -1
  66. package/lib/utils/classify/index.js +4 -2
  67. package/lib/utils/click-away/click-away.d.ts +9 -13
  68. package/lib/utils/click-away/click-away.d.ts.map +1 -1
  69. package/lib/utils/click-away/click-away.js +6 -18
  70. package/lib/utils/date-range-picker/date-range-picker.d.ts +12 -11
  71. package/lib/utils/date-range-picker/date-range-picker.d.ts.map +1 -1
  72. package/lib/utils/date-range-picker/date-range-picker.js +12 -34
  73. package/lib/utils/date-range-picker/timezones.d.ts +1 -254
  74. package/lib/utils/date-range-picker/timezones.d.ts.map +1 -1
  75. package/lib/utils/dom/dom.d.ts +5 -13
  76. package/lib/utils/dom/dom.d.ts.map +1 -1
  77. package/lib/utils/dom/dom.js +21 -20
  78. package/lib/utils/makeClassNameComponent/makeClassNameComponent.d.ts +17 -5
  79. package/lib/utils/makeClassNameComponent/makeClassNameComponent.d.ts.map +1 -1
  80. package/lib/utils/makeClassNameComponent/makeClassNameComponent.js +28 -47
  81. package/lib/utils/merge-refs/merge-refs.d.ts +1 -1
  82. package/lib/utils/merge-refs/merge-refs.d.ts.map +1 -1
  83. package/lib/utils/merge-refs/merge-refs.js +0 -1
  84. package/package.json +32 -26
  85. package/tsconfig.json +3 -5
  86. package/.storybook/preview.js +0 -124
@@ -1,257 +1,4 @@
1
- export declare const TIMEZONES: {
2
- readonly 'Pacific/Niue': "(GMT-11:00) Niue";
3
- readonly 'Pacific/Pago_Pago': "(GMT-11:00) Pago Pago";
4
- readonly 'Pacific/Honolulu': "(GMT-10:00) Hawaii Time";
5
- readonly 'Pacific/Rarotonga': "(GMT-10:00) Rarotonga";
6
- readonly 'Pacific/Tahiti': "(GMT-10:00) Tahiti";
7
- readonly 'Pacific/Marquesas': "(GMT-09:30) Marquesas";
8
- readonly 'America/Anchorage': "(GMT-09:00) Alaska Time";
9
- readonly 'Pacific/Gambier': "(GMT-09:00) Gambier";
10
- readonly 'America/Los_Angeles': "(GMT-08:00) Pacific Time";
11
- readonly 'America/Tijuana': "(GMT-08:00) Pacific Time - Tijuana";
12
- readonly 'America/Vancouver': "(GMT-08:00) Pacific Time - Vancouver";
13
- readonly 'America/Whitehorse': "(GMT-08:00) Pacific Time - Whitehorse";
14
- readonly 'Pacific/Pitcairn': "(GMT-08:00) Pitcairn";
15
- readonly 'America/Dawson_Creek': "(GMT-07:00) Mountain Time - Dawson Creek";
16
- readonly 'America/Denver': "(GMT-07:00) Mountain Time";
17
- readonly 'America/Edmonton': "(GMT-07:00) Mountain Time - Edmonton";
18
- readonly 'America/Hermosillo': "(GMT-07:00) Mountain Time - Hermosillo";
19
- readonly 'America/Mazatlan': "(GMT-07:00) Mountain Time - Chihuahua, Mazatlan";
20
- readonly 'America/Phoenix': "(GMT-07:00) Mountain Time - Arizona";
21
- readonly 'America/Yellowknife': "(GMT-07:00) Mountain Time - Yellowknife";
22
- readonly 'America/Belize': "(GMT-06:00) Belize";
23
- readonly 'America/Chicago': "(GMT-06:00) Central Time";
24
- readonly 'America/Costa_Rica': "(GMT-06:00) Costa Rica";
25
- readonly 'America/El_Salvador': "(GMT-06:00) El Salvador";
26
- readonly 'America/Guatemala': "(GMT-06:00) Guatemala";
27
- readonly 'America/Managua': "(GMT-06:00) Managua";
28
- readonly 'America/Mexico_City': "(GMT-06:00) Central Time - Mexico City";
29
- readonly 'America/Regina': "(GMT-06:00) Central Time - Regina";
30
- readonly 'America/Tegucigalpa': "(GMT-06:00) Central Time - Tegucigalpa";
31
- readonly 'America/Winnipeg': "(GMT-06:00) Central Time - Winnipeg";
32
- readonly 'Pacific/Galapagos': "(GMT-06:00) Galapagos";
33
- readonly 'America/Bogota': "(GMT-05:00) Bogota";
34
- readonly 'America/Cancun': "(GMT-05:00) America Cancun";
35
- readonly 'America/Cayman': "(GMT-05:00) Cayman";
36
- readonly 'America/Guayaquil': "(GMT-05:00) Guayaquil";
37
- readonly 'America/Havana': "(GMT-05:00) Havana";
38
- readonly 'America/Iqaluit': "(GMT-05:00) Eastern Time - Iqaluit";
39
- readonly 'America/Jamaica': "(GMT-05:00) Jamaica";
40
- readonly 'America/Lima': "(GMT-05:00) Lima";
41
- readonly 'America/Nassau': "(GMT-05:00) Nassau";
42
- readonly 'America/New_York': "(GMT-05:00) Eastern Time";
43
- readonly 'America/Panama': "(GMT-05:00) Panama";
44
- readonly 'America/Port-au-Prince': "(GMT-05:00) Port-au-Prince";
45
- readonly 'America/Rio_Branco': "(GMT-05:00) Rio Branco";
46
- readonly 'America/Toronto': "(GMT-05:00) Eastern Time - Toronto";
47
- readonly 'Pacific/Easter': "(GMT-05:00) Easter Island";
48
- readonly 'America/Caracas': "(GMT-04:00) Caracas";
49
- readonly 'America/Asuncion': "(GMT-03:00) Asuncion";
50
- readonly 'America/Barbados': "(GMT-04:00) Barbados";
51
- readonly 'America/Boa_Vista': "(GMT-04:00) Boa Vista";
52
- readonly 'America/Campo_Grande': "(GMT-03:00) Campo Grande";
53
- readonly 'America/Cuiaba': "(GMT-03:00) Cuiaba";
54
- readonly 'America/Curacao': "(GMT-04:00) Curacao";
55
- readonly 'America/Grand_Turk': "(GMT-04:00) Grand Turk";
56
- readonly 'America/Guyana': "(GMT-04:00) Guyana";
57
- readonly 'America/Halifax': "(GMT-04:00) Atlantic Time - Halifax";
58
- readonly 'America/La_Paz': "(GMT-04:00) La Paz";
59
- readonly 'America/Manaus': "(GMT-04:00) Manaus";
60
- readonly 'America/Martinique': "(GMT-04:00) Martinique";
61
- readonly 'America/Port_of_Spain': "(GMT-04:00) Port of Spain";
62
- readonly 'America/Porto_Velho': "(GMT-04:00) Porto Velho";
63
- readonly 'America/Puerto_Rico': "(GMT-04:00) Puerto Rico";
64
- readonly 'America/Santo_Domingo': "(GMT-04:00) Santo Domingo";
65
- readonly 'America/Thule': "(GMT-04:00) Thule";
66
- readonly 'Atlantic/Bermuda': "(GMT-04:00) Bermuda";
67
- readonly 'America/St_Johns': "(GMT-03:30) Newfoundland Time - St. Johns";
68
- readonly 'America/Araguaina': "(GMT-03:00) Araguaina";
69
- readonly 'America/Argentina/Buenos_Aires': "(GMT-03:00) Buenos Aires";
70
- readonly 'America/Bahia': "(GMT-03:00) Salvador";
71
- readonly 'America/Belem': "(GMT-03:00) Belem";
72
- readonly 'America/Cayenne': "(GMT-03:00) Cayenne";
73
- readonly 'America/Fortaleza': "(GMT-03:00) Fortaleza";
74
- readonly 'America/Godthab': "(GMT-03:00) Godthab";
75
- readonly 'America/Maceio': "(GMT-03:00) Maceio";
76
- readonly 'America/Miquelon': "(GMT-03:00) Miquelon";
77
- readonly 'America/Montevideo': "(GMT-03:00) Montevideo";
78
- readonly 'America/Paramaribo': "(GMT-03:00) Paramaribo";
79
- readonly 'America/Recife': "(GMT-03:00) Recife";
80
- readonly 'America/Santiago': "(GMT-03:00) Santiago";
81
- readonly 'America/Sao_Paulo': "(GMT-03:00) Sao Paulo";
82
- readonly 'Antarctica/Palmer': "(GMT-03:00) Palmer";
83
- readonly 'Antarctica/Rothera': "(GMT-03:00) Rothera";
84
- readonly 'Atlantic/Stanley': "(GMT-03:00) Stanley";
85
- readonly 'America/Noronha': "(GMT-02:00) Noronha";
86
- readonly 'Atlantic/South_Georgia': "(GMT-02:00) South Georgia";
87
- readonly 'America/Scoresbysund': "(GMT-01:00) Scoresbysund";
88
- readonly 'Atlantic/Azores': "(GMT-01:00) Azores";
89
- readonly 'Atlantic/Cape_Verde': "(GMT-01:00) Cape Verde";
90
- readonly 'Africa/Abidjan': "(GMT+00:00) Abidjan";
91
- readonly 'Africa/Accra': "(GMT+00:00) Accra";
92
- readonly 'Africa/Bissau': "(GMT+00:00) Bissau";
93
- readonly 'Africa/Casablanca': "(GMT+00:00) Casablanca";
94
- readonly 'Africa/El_Aaiun': "(GMT+00:00) El Aaiun";
95
- readonly 'Africa/Monrovia': "(GMT+00:00) Monrovia";
96
- readonly 'America/Danmarkshavn': "(GMT+00:00) Danmarkshavn";
97
- readonly 'Atlantic/Canary': "(GMT+00:00) Canary Islands";
98
- readonly 'Atlantic/Faroe': "(GMT+00:00) Faeroe";
99
- readonly 'Atlantic/Reykjavik': "(GMT+00:00) Reykjavik";
100
- readonly 'Etc/GMT': "(GMT+00:00) GMT (no daylight saving)";
101
- readonly 'Europe/Dublin': "(GMT+00:00) Dublin";
102
- readonly 'Europe/Lisbon': "(GMT+00:00) Lisbon";
103
- readonly 'Europe/London': "(GMT+00:00) London";
104
- readonly 'Africa/Algiers': "(GMT+01:00) Algiers";
105
- readonly 'Africa/Ceuta': "(GMT+01:00) Ceuta";
106
- readonly 'Africa/Lagos': "(GMT+01:00) Lagos";
107
- readonly 'Africa/Ndjamena': "(GMT+01:00) Ndjamena";
108
- readonly 'Africa/Tunis': "(GMT+01:00) Tunis";
109
- readonly 'Africa/Windhoek': "(GMT+02:00) Windhoek";
110
- readonly 'Europe/Amsterdam': "(GMT+01:00) Amsterdam";
111
- readonly 'Europe/Andorra': "(GMT+01:00) Andorra";
112
- readonly 'Europe/Belgrade': "(GMT+01:00) Central European Time - Belgrade";
113
- readonly 'Europe/Berlin': "(GMT+01:00) Berlin";
114
- readonly 'Europe/Brussels': "(GMT+01:00) Brussels";
115
- readonly 'Europe/Budapest': "(GMT+01:00) Budapest";
116
- readonly 'Europe/Copenhagen': "(GMT+01:00) Copenhagen";
117
- readonly 'Europe/Gibraltar': "(GMT+01:00) Gibraltar";
118
- readonly 'Europe/Luxembourg': "(GMT+01:00) Luxembourg";
119
- readonly 'Europe/Madrid': "(GMT+01:00) Madrid";
120
- readonly 'Europe/Malta': "(GMT+01:00) Malta";
121
- readonly 'Europe/Monaco': "(GMT+01:00) Monaco";
122
- readonly 'Europe/Oslo': "(GMT+01:00) Oslo";
123
- readonly 'Europe/Paris': "(GMT+01:00) Paris";
124
- readonly 'Europe/Prague': "(GMT+01:00) Central European Time - Prague";
125
- readonly 'Europe/Rome': "(GMT+01:00) Rome";
126
- readonly 'Europe/Stockholm': "(GMT+01:00) Stockholm";
127
- readonly 'Europe/Tirane': "(GMT+01:00) Tirane";
128
- readonly 'Europe/Vienna': "(GMT+01:00) Vienna";
129
- readonly 'Europe/Warsaw': "(GMT+01:00) Warsaw";
130
- readonly 'Europe/Zurich': "(GMT+01:00) Zurich";
131
- readonly 'Africa/Cairo': "(GMT+02:00) Cairo";
132
- readonly 'Africa/Johannesburg': "(GMT+02:00) Johannesburg";
133
- readonly 'Africa/Maputo': "(GMT+02:00) Maputo";
134
- readonly 'Africa/Tripoli': "(GMT+02:00) Tripoli";
135
- readonly 'Asia/Amman': "(GMT+02:00) Amman";
136
- readonly 'Asia/Beirut': "(GMT+02:00) Beirut";
137
- readonly 'Asia/Damascus': "(GMT+02:00) Damascus";
138
- readonly 'Asia/Gaza': "(GMT+02:00) Gaza";
139
- readonly 'Asia/Jerusalem': "(GMT+02:00) Jerusalem";
140
- readonly 'Asia/Nicosia': "(GMT+02:00) Nicosia";
141
- readonly 'Europe/Athens': "(GMT+02:00) Athens";
142
- readonly 'Europe/Bucharest': "(GMT+02:00) Bucharest";
143
- readonly 'Europe/Chisinau': "(GMT+02:00) Chisinau";
144
- readonly 'Europe/Helsinki': "(GMT+02:00) Helsinki";
145
- readonly 'Europe/Istanbul': "(GMT+03:00) Istanbul";
146
- readonly 'Europe/Kaliningrad': "(GMT+02:00) Moscow-01 - Kaliningrad";
147
- readonly 'Europe/Kyiv': "(GMT+02:00) Kyiv";
148
- readonly 'Europe/Riga': "(GMT+02:00) Riga";
149
- readonly 'Europe/Sofia': "(GMT+02:00) Sofia";
150
- readonly 'Europe/Tallinn': "(GMT+02:00) Tallinn";
151
- readonly 'Europe/Vilnius': "(GMT+02:00) Vilnius";
152
- readonly 'Africa/Khartoum': "(GMT+03:00) Khartoum";
153
- readonly 'Africa/Nairobi': "(GMT+03:00) Nairobi";
154
- readonly 'Antarctica/Syowa': "(GMT+03:00) Syowa";
155
- readonly 'Asia/Baghdad': "(GMT+03:00) Baghdad";
156
- readonly 'Asia/Qatar': "(GMT+03:00) Qatar";
157
- readonly 'Asia/Riyadh': "(GMT+03:00) Riyadh";
158
- readonly 'Europe/Minsk': "(GMT+03:00) Minsk";
159
- readonly 'Europe/Moscow': "(GMT+03:00) Moscow+00 - Moscow";
160
- readonly 'Asia/Tehran': "(GMT+03:30) Tehran";
161
- readonly 'Asia/Baku': "(GMT+04:00) Baku";
162
- readonly 'Asia/Dubai': "(GMT+04:00) Dubai";
163
- readonly 'Asia/Tbilisi': "(GMT+04:00) Tbilisi";
164
- readonly 'Asia/Yerevan': "(GMT+04:00) Yerevan";
165
- readonly 'Europe/Samara': "(GMT+04:00) Moscow+01 - Samara";
166
- readonly 'Indian/Mahe': "(GMT+04:00) Mahe";
167
- readonly 'Indian/Mauritius': "(GMT+04:00) Mauritius";
168
- readonly 'Indian/Reunion': "(GMT+04:00) Reunion";
169
- readonly 'Asia/Kabul': "(GMT+04:30) Kabul";
170
- readonly 'Antarctica/Mawson': "(GMT+05:00) Mawson";
171
- readonly 'Asia/Aqtau': "(GMT+05:00) Aqtau";
172
- readonly 'Asia/Aqtobe': "(GMT+05:00) Aqtobe";
173
- readonly 'Asia/Ashgabat': "(GMT+05:00) Ashgabat";
174
- readonly 'Asia/Dushanbe': "(GMT+05:00) Dushanbe";
175
- readonly 'Asia/Karachi': "(GMT+05:00) Karachi";
176
- readonly 'Asia/Tashkent': "(GMT+05:00) Tashkent";
177
- readonly 'Asia/Yekaterinburg': "(GMT+05:00) Moscow+02 - Yekaterinburg";
178
- readonly 'Indian/Kerguelen': "(GMT+05:00) Kerguelen";
179
- readonly 'Indian/Maldives': "(GMT+05:00) Maldives";
180
- readonly 'Asia/Calcutta': "(GMT+05:30) India Standard Time";
181
- readonly 'Asia/Colombo': "(GMT+05:30) Colombo";
182
- readonly 'Asia/Katmandu': "(GMT+05:45) Katmandu";
183
- readonly 'Antarctica/Vostok': "(GMT+06:00) Vostok";
184
- readonly 'Asia/Almaty': "(GMT+06:00) Almaty";
185
- readonly 'Asia/Bishkek': "(GMT+06:00) Bishkek";
186
- readonly 'Asia/Dhaka': "(GMT+06:00) Dhaka";
187
- readonly 'Asia/Omsk': "(GMT+06:00) Moscow+03 - Omsk, Novosibirsk";
188
- readonly 'Asia/Thimphu': "(GMT+06:00) Thimphu";
189
- readonly 'Indian/Chagos': "(GMT+06:00) Chagos";
190
- readonly 'Asia/Rangoon': "(GMT+06:30) Rangoon";
191
- readonly 'Indian/Cocos': "(GMT+06:30) Cocos";
192
- readonly 'Antarctica/Davis': "(GMT+07:00) Davis";
193
- readonly 'Asia/Bangkok': "(GMT+07:00) Bangkok";
194
- readonly 'Asia/Hovd': "(GMT+07:00) Hovd";
195
- readonly 'Asia/Jakarta': "(GMT+07:00) Jakarta";
196
- readonly 'Asia/Krasnoyarsk': "(GMT+07:00) Moscow+04 - Krasnoyarsk";
197
- readonly 'Asia/Saigon': "(GMT+07:00) Hanoi";
198
- readonly 'Asia/Ho_Chi_Minh': "(GMT+07:00) Ho Chi Minh";
199
- readonly 'Indian/Christmas': "(GMT+07:00) Christmas";
200
- readonly 'Antarctica/Casey': "(GMT+08:00) Casey";
201
- readonly 'Asia/Brunei': "(GMT+08:00) Brunei";
202
- readonly 'Asia/Choibalsan': "(GMT+08:00) Choibalsan";
203
- readonly 'Asia/Hong_Kong': "(GMT+08:00) Hong Kong";
204
- readonly 'Asia/Irkutsk': "(GMT+08:00) Moscow+05 - Irkutsk";
205
- readonly 'Asia/Kuala_Lumpur': "(GMT+08:00) Kuala Lumpur";
206
- readonly 'Asia/Macau': "(GMT+08:00) Macau";
207
- readonly 'Asia/Makassar': "(GMT+08:00) Makassar";
208
- readonly 'Asia/Manila': "(GMT+08:00) Manila";
209
- readonly 'Asia/Shanghai': "(GMT+08:00) China Time - Beijing";
210
- readonly 'Asia/Singapore': "(GMT+08:00) Singapore";
211
- readonly 'Asia/Taipei': "(GMT+08:00) Taipei";
212
- readonly 'Asia/Ulaanbaatar': "(GMT+08:00) Ulaanbaatar";
213
- readonly 'Australia/Perth': "(GMT+08:00) Western Time - Perth";
214
- readonly 'Asia/Pyongyang': "(GMT+08:30) Pyongyang";
215
- readonly 'Asia/Dili': "(GMT+09:00) Dili";
216
- readonly 'Asia/Jayapura': "(GMT+09:00) Jayapura";
217
- readonly 'Asia/Seoul': "(GMT+09:00) Seoul";
218
- readonly 'Asia/Tokyo': "(GMT+09:00) Tokyo";
219
- readonly 'Asia/Yakutsk': "(GMT+09:00) Moscow+06 - Yakutsk";
220
- readonly 'Pacific/Palau': "(GMT+09:00) Palau";
221
- readonly 'Australia/Adelaide': "(GMT+10:30) Central Time - Adelaide";
222
- readonly 'Australia/Darwin': "(GMT+09:30) Central Time - Darwin";
223
- readonly 'Antarctica/DumontDUrville': "(GMT+10:00) Dumont D'Urville";
224
- readonly 'Asia/Magadan': "(GMT+10:00) Moscow+07 - Magadan";
225
- readonly 'Asia/Vladivostok': "(GMT+10:00) Moscow+07 - Vladivostok";
226
- readonly 'Australia/Brisbane': "(GMT+10:00) Eastern Time - Brisbane";
227
- readonly 'Asia/Sakhalin': "(GMT+11:00) Moscow+08 - Yuzhno-Sakhalin";
228
- readonly 'Australia/Hobart': "(GMT+11:00) Eastern Time - Hobart";
229
- readonly 'Australia/Sydney': "(GMT+11:00) Eastern Time - Melbourne, Sydney";
230
- readonly 'Pacific/Chuuk': "(GMT+10:00) Truk";
231
- readonly 'Pacific/Guam': "(GMT+10:00) Guam";
232
- readonly 'Pacific/Port_Moresby': "(GMT+10:00) Port Moresby";
233
- readonly 'Pacific/Efate': "(GMT+11:00) Efate";
234
- readonly 'Pacific/Guadalcanal': "(GMT+11:00) Guadalcanal";
235
- readonly 'Pacific/Kosrae': "(GMT+11:00) Kosrae";
236
- readonly 'Pacific/Norfolk': "(GMT+11:00) Norfolk";
237
- readonly 'Pacific/Noumea': "(GMT+11:00) Noumea";
238
- readonly 'Pacific/Pohnpei': "(GMT+11:00) Ponape";
239
- readonly 'Asia/Kamchatka': "(GMT+12:00) Moscow+09 - Petropavlovsk-Kamchatskiy";
240
- readonly 'Pacific/Auckland': "(GMT+13:00) Auckland";
241
- readonly 'Pacific/Fiji': "(GMT+13:00) Fiji";
242
- readonly 'Pacific/Funafuti': "(GMT+12:00) Funafuti";
243
- readonly 'Pacific/Kwajalein': "(GMT+12:00) Kwajalein";
244
- readonly 'Pacific/Majuro': "(GMT+12:00) Majuro";
245
- readonly 'Pacific/Nauru': "(GMT+12:00) Nauru";
246
- readonly 'Pacific/Tarawa': "(GMT+12:00) Tarawa";
247
- readonly 'Pacific/Wake': "(GMT+12:00) Wake";
248
- readonly 'Pacific/Wallis': "(GMT+12:00) Wallis";
249
- readonly 'Pacific/Apia': "(GMT+14:00) Apia";
250
- readonly 'Pacific/Enderbury': "(GMT+13:00) Enderbury";
251
- readonly 'Pacific/Fakaofo': "(GMT+13:00) Fakaofo";
252
- readonly 'Pacific/Tongatapu': "(GMT+13:00) Tongatapu";
253
- readonly 'Pacific/Kiritimati': "(GMT+14:00) Kiritimati";
254
- };
1
+ export declare const TIMEZONES: Record<string, string>;
255
2
  export declare const addTimezoneStartOfDay: (date: string, timezone: string) => string;
256
3
  export declare const addTimezoneEndOfDay: (date: string, timezone: string) => string;
257
4
  export declare const getTodayInTimezone: (timezone: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"timezones.d.ts","sourceRoot":"","sources":["../../../src/utils/date-range-picker/timezones.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6PZ,CAAC;AAEX,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,MACjB,CAAC;AAEvD,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,MACjB,CAAC;AAErD,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,KAAG,MACZ,CAAC"}
1
+ {"version":3,"file":"timezones.d.ts","sourceRoot":"","sources":["../../../src/utils/date-range-picker/timezones.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6PnC,CAAC;AAEX,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,MACjB,CAAC;AAEvD,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,MACjB,CAAC;AAErD,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,KAAG,MACZ,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type * as React from 'react';
1
2
  export type Placement = 'top' | 'left' | 'right' | 'bottom';
2
3
  export type ArrowPosition = 'start' | 'center' | 'end';
3
4
  export type Justify = ArrowPosition;
@@ -6,24 +7,15 @@ export type PositionedPlacement = {
6
7
  x: number;
7
8
  y: number;
8
9
  };
9
- export declare function createElement(document: Document, type: string, props: {
10
- [key: string]: unknown;
11
- }): HTMLElement;
10
+ export declare function createElement(document: Document, type: string, props: Record<string, unknown>): HTMLElement;
12
11
  export declare function pageHeight(): number;
13
12
  export declare function getFixedAnchorPosition(element: HTMLElement, placement?: Placement, pad?: number, justify?: Justify): PositionedPlacement;
14
13
  export declare function getAnchorPosition(element: HTMLElement, placement?: Placement, pad?: number, justify?: Justify): PositionedPlacement;
15
14
  export declare function pxToNumber(px: string): number;
16
- type Handlers = Partial<{
17
- click: (arg1: MouseEvent) => unknown;
18
- mousedown: (arg1: MouseEvent) => unknown;
19
- mouseup: (arg1: MouseEvent) => unknown;
20
- pointerdown: (arg1: PointerEvent) => unknown;
21
- pointerup: (arg1: PointerEvent) => unknown;
22
- pointercancel: (arg1: PointerEvent) => unknown;
23
- [key: string]: (arg1: Event) => unknown;
24
- }>;
15
+ type EventListenerOptionsOrUseCapture = boolean | AddEventListenerOptions;
16
+ type Handlers = Partial<Record<string, EventListener>>;
25
17
  export declare function listen(target: EventTarget, handlers: Handlers, options?: EventListenerOptionsOrUseCapture, hook?: 'addEventListener' | 'removeEventListener'): void;
26
- export declare function forget(target: EventTarget, events: Handlers, options: EventListenerOptionsOrUseCapture): void;
18
+ export declare function forget(target: EventTarget, events: Handlers, options?: EventListenerOptionsOrUseCapture): void;
27
19
  type MixedEvent = React.SyntheticEvent<EventTarget> | Event;
28
20
  export declare function stopEvent(event: MixedEvent): void;
29
21
  export declare function stopEventImmediately(event: React.SyntheticEvent<EventTarget>): void;
@@ -1 +1 @@
1
- {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/utils/dom/dom.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC5D,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AACvD,MAAM,MAAM,OAAO,GAAG,aAAa,CAAC;AAEpC,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,SAAS,CAAC;IACrB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE;IACL,CAA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C,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC;CAC3C,KAAG,CAAC,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAwBrC,CAAC"}
@@ -34,7 +34,8 @@ function getFixedAnchorPosition(element) {
34
34
  const rect = element.getBoundingClientRect();
35
35
  const docX = rect.left;
36
36
  const docY = rect.top;
37
- let x, y;
37
+ let x;
38
+ let y;
38
39
  switch (placement) {
39
40
  case 'bottom':
40
41
  y = docY + rect.height + pad;
@@ -108,27 +109,33 @@ function pxToNumber(px) {
108
109
  return parseFloat(px.replace('px', '') || '0');
109
110
  }
110
111
 
111
- // TODO (kyle): add more handler types?
112
+ // Map event name -> listener
112
113
 
113
- function listen(target, handlers,
114
- // @ts-ignore
115
- options) {
114
+ function listen(target, handlers, options) {
116
115
  let hook = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'addEventListener';
117
116
  for (const eventName in handlers) {
118
- // @ts-ignore - TS2345 - Argument of type '((arg1: Event) => unknown) | undefined' is not assignable to parameter of type 'EventListenerOrEventListenerObject | null'.
119
- target[hook](eventName, handlers[eventName], options);
117
+ const handler = handlers[eventName];
118
+ if (!handler) {
119
+ continue;
120
+ }
121
+ if (hook === 'addEventListener') {
122
+ target.addEventListener(eventName, handler, options);
123
+ } else {
124
+ target.removeEventListener(eventName, handler, options);
125
+ }
120
126
  }
121
127
  }
122
- function forget(target, events,
123
- // @ts-ignore
124
- options) {
128
+ function forget(target, events, options) {
125
129
  return listen(target, events, options, 'removeEventListener');
126
130
  }
127
131
  function stopEvent(event) {
128
132
  event.stopPropagation();
129
133
  }
130
134
  function stopEventImmediately(event) {
131
- event.nativeEvent.stopImmediatePropagation();
135
+ const nativeEvt = event.nativeEvent;
136
+ if (typeof nativeEvt.stopImmediatePropagation === 'function') {
137
+ nativeEvt.stopImmediatePropagation();
138
+ }
132
139
  }
133
140
  function cancelEvent(event) {
134
141
  event.stopPropagation();
@@ -138,7 +145,6 @@ function requestPointerLock(element) {
138
145
  return new Promise((resolve, reject) => {
139
146
  const handleChange = () => {
140
147
  if (document.pointerLockElement === element) {
141
- // @ts-ignore - TS2794 - Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?
142
148
  resolve();
143
149
  removeHandlers();
144
150
  }
@@ -148,7 +154,6 @@ function requestPointerLock(element) {
148
154
  removeHandlers();
149
155
  };
150
156
  const removeHandlers = () => {
151
- // @ts-ignore - TS2554 - Expected 3 arguments, but got 2.
152
157
  forget(document, {
153
158
  pointerlockchange: handleChange,
154
159
  pointerlockerror: handleError
@@ -168,8 +173,8 @@ function checkDateInputSupport() {
168
173
  input.setAttribute('value', notADateValue);
169
174
  return input.value !== notADateValue;
170
175
  }
171
- //reference: https://stackoverflow.com/a/10199306
172
176
 
177
+ // reference: https://stackoverflow.com/a/10199306
173
178
  const getListPasteHandler = _ref => {
174
179
  let {
175
180
  listItemSeparatorRegex = /[\,\n]/,
@@ -180,18 +185,14 @@ const getListPasteHandler = _ref => {
180
185
  if (!value || !value.length) {
181
186
  return;
182
187
  }
183
- //do nothing if the copied string fails the regex test
188
+ // do nothing if the copied string fails the regex test
184
189
  if (!listItemSeparatorRegex.test(value)) {
185
190
  return;
186
191
  }
187
192
  event.preventDefault();
188
193
  const parsedValues = value.split(listItemSeparatorRegex).reduce((acc, val) => {
189
194
  const newVal = val.trim();
190
- if (
191
- // value exists
192
- !!newVal.length &&
193
- // value not already in queue
194
- !acc.includes(newVal)) {
195
+ if (newVal.length && !acc.includes(newVal)) {
195
196
  acc.push(newVal);
196
197
  }
197
198
  return acc;
@@ -1,9 +1,21 @@
1
1
  import * as React from 'react';
2
2
  import type { Flow } from 'flow-to-typescript-codemod';
3
- export declare function nameHoc<C, T extends React.ComponentType<C>, C2>(WrapperComponent: T, WrappedComponent: React.ComponentType<C2>, hocName: string): T;
4
- export type ClassNameComponent<T = 'div', I = React.ElementRef<T>> = Flow.AbstractComponent<ComponentProps<T>, I>;
5
- export declare function makeClassNameComponent<C extends string>(baseClassName: string, ComponentType?: C, name?: string): Flow.AbstractComponent<ComponentProps<C>, React.ElementRef<C>>;
6
- export declare function makeClassNameComponentCustom<C extends Readonly<{
3
+ /** Extract the actual ref instance type from a JSX element/component type */
4
+ type RefOf<E extends React.ElementType> = React.ComponentPropsWithRef<E> extends {
5
+ ref?: React.Ref<infer R>;
6
+ } ? R : never;
7
+ /** Public props for generated components: original props (no ref) + optional className */
8
+ export type ComponentProps<E extends React.ElementType> = React.ComponentPropsWithoutRef<E> & {
7
9
  className?: string;
8
- }>, B>(baseClassName: string, ComponentType: Flow.AbstractComponent<C, B>): Flow.AbstractComponent<C, B>;
10
+ };
11
+ /** HOC display name helper: sets Wrapper.displayName = `${hocName}(WrappedName)` */
12
+ export declare function nameHoc<C, T extends React.ComponentType<C>, C2>(WrapperComponent: T, WrappedComponent: React.ComponentType<C2>, hocName: string): T;
13
+ /** Public alias for “className-merging” components */
14
+ export type ClassNameComponent<T extends React.ElementType = 'div'> = Flow.AbstractComponent<ComponentProps<T>, RefOf<T>>;
15
+ /**
16
+ * Factory: builds a component for a given intrinsic tag or component type
17
+ * that merges `className` with a base class and forwards its ref.
18
+ */
19
+ export declare function makeClassNameComponent<C extends React.ElementType = 'div'>(baseClassName: string, ComponentType?: C, name?: string): Flow.AbstractComponent<ComponentProps<C>, RefOf<C>>;
20
+ export {};
9
21
  //# sourceMappingURL=makeClassNameComponent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"makeClassNameComponent.d.ts","sourceRoot":"","sources":["../../../src/utils/makeClassNameComponent/makeClassNameComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAKrD,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,EAC7D,gBAAgB,EAAE,CAAC,EACnB,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,EACzC,OAAO,EAAE,MAAM,GACd,CAAC,CAKH;AAED,MAAM,MAAM,kBAAkB,CAC5B,CAAC,GAAG,KAAK,EAET,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAErB,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAGjD,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,MAAM,EACrD,aAAa,EAAE,MAAM,EAErB,aAAa,GAAE,CAAS,EACxB,IAAI,CAAC,EAAE,MAAM,GAEZ,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAehE;AAED,wBAAgB,4BAA4B,CAC1C,CAAC,SAAS,QAAQ,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,EACF,CAAC,EAED,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1C,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAiB9B"}
1
+ {"version":3,"file":"makeClassNameComponent.d.ts","sourceRoot":"","sources":["../../../src/utils/makeClassNameComponent/makeClassNameComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAIrD,6EAA6E;AAC7E,KAAK,KAAK,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,IACpC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS;IAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEhF,0FAA0F;AAC1F,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,IACpD,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,GAAG;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AAW3D,oFAAoF;AACpF,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,EAC7D,gBAAgB,EAAE,CAAC,EACnB,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,EACzC,OAAO,EAAE,MAAM,GACd,CAAC,CAKH;AAED,sDAAsD;AACtD,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,IAChE,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EACxE,aAAa,EAAE,MAAM,EACrB,aAAa,CAAC,EAAE,CAAC,EACjB,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAarD"}
@@ -4,66 +4,47 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.makeClassNameComponent = makeClassNameComponent;
7
- exports.makeClassNameComponentCustom = makeClassNameComponentCustom;
8
7
  exports.nameHoc = nameHoc;
9
8
  var React = _interopRequireWildcard(require("react"));
10
9
  var _classify = _interopRequireDefault(require("../classify"));
11
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
11
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
13
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
12
+ /** Extract the actual ref instance type from a JSX element/component type */
13
+
14
+ /** Public props for generated components: original props (no ref) + optional className */
15
+
16
+ /** Utility: set displayName on a component */
17
+ function nameComponent(component, name) {
18
+ component.displayName = name;
19
+ return component;
20
+ }
21
+
22
+ /** HOC display name helper: sets Wrapper.displayName = `${hocName}(WrappedName)` */
14
23
  function nameHoc(WrapperComponent, WrappedComponent, hocName) {
15
24
  const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
16
25
  WrapperComponent.displayName = `${hocName}(${wrappedComponentName})`;
17
26
  return WrapperComponent;
18
27
  }
19
- // @ts-ignore - TS2345 - Argument of type 'C' is not assignable to parameter of type 'C'.
20
28
 
21
- // @ts-ignore - TS2345 - Argument of type 'C' is not assignable to parameter of type 'C'.
22
- function makeClassNameComponent(baseClassName) {
23
- let ComponentType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'div';
24
- let name
25
- //@ts-expect-error
26
- = arguments.length > 2 ? arguments[2] : undefined;
27
- return /*#__PURE__*/React.forwardRef(
28
- // @ts-ignore - TS7031 - Binding element 'className' implicitly has an 'any' type. | TS7006 - Parameter 'ref' implicitly has an 'any' type.
29
- nameComponent((_ref, ref) => {
29
+ /** Public alias for “className-merging” components */
30
+
31
+ /**
32
+ * Factory: builds a component for a given intrinsic tag or component type
33
+ * that merges `className` with a base class and forwards its ref.
34
+ */
35
+ function makeClassNameComponent(baseClassName, ComponentType, name) {
36
+ const Comp = /*#__PURE__*/React.forwardRef((_ref, ref) => {
30
37
  let {
31
38
  className,
32
39
  ...props
33
40
  } = _ref;
34
- return (
35
- /*#__PURE__*/
36
- // @ts-ignore - TS2604 - JSX element type 'ComponentType' does not have any construct or call signatures.
37
- React.createElement(ComponentType, _extends({}, props, {
38
- ref: ref,
39
- className: (0, _classify.default)(baseClassName, className)
40
- }))
41
- );
42
- }, `CNC(${name || ComponentType})`));
43
- }
44
- function makeClassNameComponentCustom(baseClassName, ComponentType) {
45
- return /*#__PURE__*/React.forwardRef(
46
- // @ts-ignore - TS2345 - Argument of type 'ComponentType<unknown>' is not assignable to parameter of type 'ForwardRefRenderFunction<B, unknown>'.
47
- nameHoc(
48
- // @ts-ignore - TS2345 - Argument of type '({ className, ...props }: { [x: string]: any; className: any; }, ref: any) => Element' is not assignable to parameter of type 'ComponentType<unknown>'. | TS7031 - Binding element 'className' implicitly has an 'any' type. | TS7006 - Parameter 'ref' implicitly has an 'any' type.
49
- (_ref2, ref) => {
50
- let {
51
- className,
52
- ...props
53
- } = _ref2;
54
- return (
55
- /*#__PURE__*/
56
- // @ts-ignore - TS2769 - No overload matches this call.
57
- React.createElement(ComponentType, _extends({}, props, {
58
- ref: ref,
59
- className: (0, _classify.default)(baseClassName, className)
60
- }))
61
- );
62
- }, ComponentType, 'CNC'));
63
- }
64
-
65
- // @ts-ignore - TS7006 - Parameter 'component' implicitly has an 'any' type.
66
- function nameComponent(component, name) {
67
- component.displayName = name;
68
- return component;
41
+ return /*#__PURE__*/React.createElement(ComponentType ?? 'div', {
42
+ ...props,
43
+ ref,
44
+ className: (0, _classify.default)(baseClassName, className)
45
+ });
46
+ });
47
+ nameComponent(Comp, `CNC(${name || ComponentType || 'div'})`);
48
+ // Bridge Flow.AbstractComponent signature
49
+ return Comp;
69
50
  }
@@ -1,4 +1,4 @@
1
1
  export declare function mergeRefs(refs: Array<{
2
2
  current: HTMLElement | null | undefined;
3
- }>): (value?: HTMLElement | null | undefined) => void;
3
+ } | ((value?: HTMLElement | null | undefined) => void)>): (value?: HTMLElement | null | undefined) => void;
4
4
  //# sourceMappingURL=merge-refs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"merge-refs.d.ts","sourceRoot":"","sources":["../../../src/utils/merge-refs/merge-refs.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CACvB,IAAI,EAAE,KAAK,CAAC;IACV,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,CAAC,GACD,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAWlD"}
1
+ {"version":3,"file":"merge-refs.d.ts","sourceRoot":"","sources":["../../../src/utils/merge-refs/merge-refs.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CACvB,IAAI,EAAE,KAAK,CACP;IAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAA;CAAC,GACzC,CAAC,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC,CACrD,GACA,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAUlD"}
@@ -8,7 +8,6 @@ function mergeRefs(refs) {
8
8
  return value => {
9
9
  refs.forEach(ref => {
10
10
  if (typeof ref === 'function') {
11
- // @ts-ignore - TS2349 - This expression is not callable.
12
11
  ref(value);
13
12
  } else if (ref != null) {
14
13
  ref.current = value;