gasp-components 1.0.2 → 1.0.3

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.
package/dist/main.d.ts CHANGED
@@ -16,4 +16,5 @@ export { Tag } from "./components/tag";
16
16
  export { Upload } from "./components/upload";
17
17
  export { TimelineHorizontal } from "./components/timeline-horizontal";
18
18
  export { AgGridTable } from "./components/ag-grid-table";
19
+ export { libTheme as theme } from "./theme";
19
20
  export declare const ConfigProvider: React.FC<ConfigProviderProps>;
package/dist/main.js CHANGED
@@ -1,23 +1,24 @@
1
1
  import { jsx as N } from "react/jsx-runtime";
2
2
  import "./index-s3u4YBl4.js";
3
3
  import { Button as Gt } from "./components/button/index.js";
4
- import { CheckList as qt } from "./components/checklist/index.js";
5
- import { DatePicker as Yt } from "./components/date-picker/index.js";
6
- import { Dragger as Kt } from "./components/dragger/index.js";
7
- import { Dropdown as zt } from "./components/dropdown/index.js";
8
- import { Form as Jt } from "./components/form/index.js";
9
- import { FormItem as Vt } from "./components/form-item/index.js";
10
- import { Input as te } from "./components/input/index.js";
11
- import { S as ae } from "./index-GRzi0tN8.js";
12
- import { Steps as ne } from "./components/steps/index.js";
13
- import { Table as me } from "./components/table/index.js";
14
- import { Tabs as se } from "./components/tabs/index.js";
15
- import { Tag as ue } from "./components/tag/index.js";
16
- import { Upload as de } from "./components/upload/index.js";
17
- import { TimelineHorizontal as ge } from "./components/timeline-horizontal/index.js";
18
- import { AgGridTable as ye } from "./components/ag-grid-table/index.js";
19
- import { i as W, T as Y, b as s, M as B, d as P, I as K, e as c, f as h, g as x, h as I, E as F, j as X, D as z, k as H, l as R, _ as J, m as U, n as Q, o as V, p as rr, q as tr, s as er, r as ar, P as or, t as nr } from "./createFormattedComponent-FcpICAm8.js";
20
- import * as w from "react";
4
+ import { CheckList as $t } from "./components/checklist/index.js";
5
+ import { DatePicker as qt } from "./components/date-picker/index.js";
6
+ import { Dragger as zt } from "./components/dragger/index.js";
7
+ import { Dropdown as Yt } from "./components/dropdown/index.js";
8
+ import { Form as Ht } from "./components/form/index.js";
9
+ import { FormItem as Qt } from "./components/form-item/index.js";
10
+ import { Input as re } from "./components/input/index.js";
11
+ import { S as ee } from "./index-GRzi0tN8.js";
12
+ import { Steps as ae } from "./components/steps/index.js";
13
+ import { Table as ie } from "./components/table/index.js";
14
+ import { Tabs as me } from "./components/tabs/index.js";
15
+ import { Tag as fe } from "./components/tag/index.js";
16
+ import { Upload as ce } from "./components/upload/index.js";
17
+ import { TimelineHorizontal as pe } from "./components/timeline-horizontal/index.js";
18
+ import { AgGridTable as ve } from "./components/ag-grid-table/index.js";
19
+ import { libTheme as Ee } from "./theme.js";
20
+ import { i as q, T as W, b as s, M as z, d as P, I as X, e as c, f as E, g as w, h as I, E as h, j as Y, D as K, k as H, l as R, _ as J, m as Z, n as Q, o as V, p as rr, q as tr, s as er, r as or, P as ar, t as nr } from "./createFormattedComponent-FcpICAm8.js";
21
+ import * as x from "react";
21
22
  import { A as ir } from "./index-s55NV9P0.js";
22
23
  import "./index-NQd_zMf0.js";
23
24
  import "./button-HD_w_Dw4.js";
@@ -70,72 +71,71 @@ import "./ExclamationCircleFilled-oQquZDmr.js";
70
71
  import "./index-OcSg2uhO.js";
71
72
  import "./SearchOutlined-q1KYFUUD.js";
72
73
  import "./icons/dashboard-icon/index.js";
73
- import "./theme.js";
74
74
  import "./index-fkwpjTCF.js";
75
75
  import "./index-G4mS9Q1k.js";
76
76
  import "./CloseOutlined--jpI9Qw3.js";
77
77
  import "./components/tabs/tab.js";
78
78
  import "./components/tabs/context.js";
79
79
  import "./useClosable-UlLHff74.js";
80
- function b(r, n) {
80
+ function b(r, o) {
81
81
  return Object.keys(r).reduce(function(e, t) {
82
- return e[t] = s({ timeZone: n }, r[t]), e;
82
+ return e[t] = s({ timeZone: o }, r[t]), e;
83
83
  }, {});
84
84
  }
85
- function C(r, n) {
86
- var e = Object.keys(s(s({}, r), n));
87
- return e.reduce(function(t, o) {
88
- return t[o] = s(s({}, r[o] || {}), n[o] || {}), t;
85
+ function A(r, o) {
86
+ var e = Object.keys(s(s({}, r), o));
87
+ return e.reduce(function(t, n) {
88
+ return t[n] = s(s({}, r[n] || {}), o[n] || {}), t;
89
89
  }, {});
90
90
  }
91
- function A(r, n) {
92
- if (!n)
91
+ function C(r, o) {
92
+ if (!o)
93
93
  return r;
94
- var e = K.formats;
95
- return s(s(s({}, e), r), { date: C(b(e.date, n), b(r.date || {}, n)), time: C(b(e.time, n), b(r.time || {}, n)) });
94
+ var e = X.formats;
95
+ return s(s(s({}, e), r), { date: A(b(e.date, o), b(r.date || {}, o)), time: A(b(e.time, o), b(r.time || {}, o)) });
96
96
  }
97
- var D = function(r, n, e, t, o) {
98
- var a = r.locale, i = r.formats, m = r.messages, l = r.defaultLocale, d = r.defaultFormats, f = r.fallbackOnEmptyString, g = r.onError, y = r.timeZone, L = r.defaultRichTextElements;
97
+ var O = function(r, o, e, t, n) {
98
+ var a = r.locale, i = r.formats, l = r.messages, m = r.defaultLocale, d = r.defaultFormats, f = r.fallbackOnEmptyString, g = r.onError, y = r.timeZone, L = r.defaultRichTextElements;
99
99
  e === void 0 && (e = { id: "" });
100
100
  var M = e.id, p = e.defaultMessage;
101
- W(!!M, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
101
+ q(!!M, "[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");
102
102
  var v = String(M), u = (
103
103
  // In case messages is Object.create(null)
104
104
  // e.g import('foo.json') from webpack)
105
105
  // See https://github.com/formatjs/formatjs/issues/1914
106
- m && Object.prototype.hasOwnProperty.call(m, v) && m[v]
106
+ l && Object.prototype.hasOwnProperty.call(l, v) && l[v]
107
107
  );
108
- if (Array.isArray(u) && u.length === 1 && u[0].type === Y.literal)
108
+ if (Array.isArray(u) && u.length === 1 && u[0].type === W.literal)
109
109
  return u[0].value;
110
110
  if (!t && u && typeof u == "string" && !L)
111
111
  return u.replace(/'\{(.*?)\}'/gi, "{$1}");
112
- if (t = s(s({}, L), t || {}), i = A(i, y), d = A(d, y), !u) {
112
+ if (t = s(s({}, L), t || {}), i = C(i, y), d = C(d, y), !u) {
113
113
  if (f === !1 && u === "")
114
114
  return u;
115
- if ((!p || a && a.toLowerCase() !== l.toLowerCase()) && g(new B(e, a)), p)
115
+ if ((!p || a && a.toLowerCase() !== m.toLowerCase()) && g(new z(e, a)), p)
116
116
  try {
117
- var T = n.getMessageFormat(p, l, d, o);
117
+ var T = o.getMessageFormat(p, m, d, n);
118
118
  return T.format(t);
119
- } catch (E) {
120
- return g(new P('Error formatting default message for: "'.concat(v, '", rendering default message verbatim'), a, e, E)), typeof p == "string" ? p : v;
119
+ } catch (F) {
120
+ return g(new P('Error formatting default message for: "'.concat(v, '", rendering default message verbatim'), a, e, F)), typeof p == "string" ? p : v;
121
121
  }
122
122
  return v;
123
123
  }
124
124
  try {
125
- var T = n.getMessageFormat(u, a, i, s({ formatters: n }, o || {}));
125
+ var T = o.getMessageFormat(u, a, i, s({ formatters: o }, n || {}));
126
126
  return T.format(t);
127
- } catch (E) {
128
- g(new P('Error formatting message: "'.concat(v, '", using ').concat(p ? "default message" : "id", " as fallback."), a, e, E));
127
+ } catch (F) {
128
+ g(new P('Error formatting message: "'.concat(v, '", using ').concat(p ? "default message" : "id", " as fallback."), a, e, F));
129
129
  }
130
130
  if (p)
131
131
  try {
132
- var T = n.getMessageFormat(p, l, d, o);
132
+ var T = o.getMessageFormat(p, m, d, n);
133
133
  return T.format(t);
134
- } catch (E) {
135
- g(new P('Error formatting the default message for: "'.concat(v, '", rendering message verbatim'), a, e, E));
134
+ } catch (F) {
135
+ g(new P('Error formatting the default message for: "'.concat(v, '", rendering message verbatim'), a, e, F));
136
136
  }
137
137
  return typeof u == "string" ? u : typeof p == "string" ? p : v;
138
- }, $ = [
138
+ }, G = [
139
139
  "formatMatcher",
140
140
  "timeZone",
141
141
  "hour12",
@@ -156,64 +156,64 @@ var D = function(r, n, e, t, o) {
156
156
  "numberingSystem",
157
157
  "fractionalSecondDigits"
158
158
  ];
159
- function S(r, n, e, t) {
160
- var o = r.locale, a = r.formats, i = r.onError, m = r.timeZone;
159
+ function S(r, o, e, t) {
160
+ var n = r.locale, a = r.formats, i = r.onError, l = r.timeZone;
161
161
  t === void 0 && (t = {});
162
- var l = t.format, d = s(s({}, m && { timeZone: m }), l && x(a, n, l, i)), f = h(t, $, d);
163
- return n === "time" && !f.hour && !f.minute && !f.second && !f.timeStyle && !f.dateStyle && (f = s(s({}, f), { hour: "numeric", minute: "numeric" })), e(o, f);
162
+ var m = t.format, d = s(s({}, l && { timeZone: l }), m && w(a, o, m, i)), f = E(t, G, d);
163
+ return o === "time" && !f.hour && !f.minute && !f.second && !f.timeStyle && !f.dateStyle && (f = s(s({}, f), { hour: "numeric", minute: "numeric" })), e(n, f);
164
164
  }
165
- function mr(r, n) {
165
+ function lr(r, o) {
166
166
  for (var e = [], t = 2; t < arguments.length; t++)
167
167
  e[t - 2] = arguments[t];
168
- var o = e[0], a = e[1], i = a === void 0 ? {} : a, m = typeof o == "string" ? new Date(o || 0) : o;
168
+ var n = e[0], a = e[1], i = a === void 0 ? {} : a, l = typeof n == "string" ? new Date(n || 0) : n;
169
169
  try {
170
- return S(r, "date", n, i).format(m);
171
- } catch (l) {
172
- r.onError(new c("Error formatting date.", r.locale, l));
170
+ return S(r, "date", o, i).format(l);
171
+ } catch (m) {
172
+ r.onError(new c("Error formatting date.", r.locale, m));
173
173
  }
174
- return String(m);
174
+ return String(l);
175
175
  }
176
- function lr(r, n) {
176
+ function mr(r, o) {
177
177
  for (var e = [], t = 2; t < arguments.length; t++)
178
178
  e[t - 2] = arguments[t];
179
- var o = e[0], a = e[1], i = a === void 0 ? {} : a, m = typeof o == "string" ? new Date(o || 0) : o;
179
+ var n = e[0], a = e[1], i = a === void 0 ? {} : a, l = typeof n == "string" ? new Date(n || 0) : n;
180
180
  try {
181
- return S(r, "time", n, i).format(m);
182
- } catch (l) {
183
- r.onError(new c("Error formatting time.", r.locale, l));
181
+ return S(r, "time", o, i).format(l);
182
+ } catch (m) {
183
+ r.onError(new c("Error formatting time.", r.locale, m));
184
184
  }
185
- return String(m);
185
+ return String(l);
186
186
  }
187
- function sr(r, n) {
187
+ function sr(r, o) {
188
188
  for (var e = [], t = 2; t < arguments.length; t++)
189
189
  e[t - 2] = arguments[t];
190
- var o = e[0], a = e[1], i = e[2], m = i === void 0 ? {} : i, l = r.timeZone, d = r.locale, f = r.onError, g = h(m, $, l ? { timeZone: l } : {});
190
+ var n = e[0], a = e[1], i = e[2], l = i === void 0 ? {} : i, m = r.timeZone, d = r.locale, f = r.onError, g = E(l, G, m ? { timeZone: m } : {});
191
191
  try {
192
- return n(d, g).formatRange(o, a);
192
+ return o(d, g).formatRange(n, a);
193
193
  } catch (y) {
194
194
  f(new c("Error formatting date time range.", r.locale, y));
195
195
  }
196
- return String(o);
196
+ return String(n);
197
197
  }
198
- function fr(r, n) {
198
+ function fr(r, o) {
199
199
  for (var e = [], t = 2; t < arguments.length; t++)
200
200
  e[t - 2] = arguments[t];
201
- var o = e[0], a = e[1], i = a === void 0 ? {} : a, m = typeof o == "string" ? new Date(o || 0) : o;
201
+ var n = e[0], a = e[1], i = a === void 0 ? {} : a, l = typeof n == "string" ? new Date(n || 0) : n;
202
202
  try {
203
- return S(r, "date", n, i).formatToParts(m);
204
- } catch (l) {
205
- r.onError(new c("Error formatting date.", r.locale, l));
203
+ return S(r, "date", o, i).formatToParts(l);
204
+ } catch (m) {
205
+ r.onError(new c("Error formatting date.", r.locale, m));
206
206
  }
207
207
  return [];
208
208
  }
209
- function ur(r, n) {
209
+ function ur(r, o) {
210
210
  for (var e = [], t = 2; t < arguments.length; t++)
211
211
  e[t - 2] = arguments[t];
212
- var o = e[0], a = e[1], i = a === void 0 ? {} : a, m = typeof o == "string" ? new Date(o || 0) : o;
212
+ var n = e[0], a = e[1], i = a === void 0 ? {} : a, l = typeof n == "string" ? new Date(n || 0) : n;
213
213
  try {
214
- return S(r, "time", n, i).formatToParts(m);
215
- } catch (l) {
216
- r.onError(new c("Error formatting time.", r.locale, l));
214
+ return S(r, "time", o, i).formatToParts(l);
215
+ } catch (m) {
216
+ r.onError(new c("Error formatting time.", r.locale, m));
217
217
  }
218
218
  return [];
219
219
  }
@@ -223,16 +223,16 @@ var cr = [
223
223
  "fallback",
224
224
  "languageDisplay"
225
225
  ];
226
- function dr(r, n, e, t) {
227
- var o = r.locale, a = r.onError, i = Intl.DisplayNames;
226
+ function dr(r, o, e, t) {
227
+ var n = r.locale, a = r.onError, i = Intl.DisplayNames;
228
228
  i || a(new I(`Intl.DisplayNames is not available in this environment.
229
229
  Try polyfilling it using "@formatjs/intl-displaynames"
230
- `, F.MISSING_INTL_API));
231
- var m = h(t, cr);
230
+ `, h.MISSING_INTL_API));
231
+ var l = E(t, cr);
232
232
  try {
233
- return n(o, m).of(e);
234
- } catch (l) {
235
- a(new c("Error formatting display name.", o, l));
233
+ return o(n, l).of(e);
234
+ } catch (m) {
235
+ a(new c("Error formatting display name.", n, m));
236
236
  }
237
237
  }
238
238
  var pr = [
@@ -242,67 +242,67 @@ var pr = [
242
242
  function gr(r) {
243
243
  return "".concat(j, "_").concat(r, "_").concat(j);
244
244
  }
245
- function vr(r, n, e, t) {
245
+ function vr(r, o, e, t) {
246
246
  t === void 0 && (t = {});
247
- var o = G(r, n, e, t).reduce(function(a, i) {
248
- var m = i.value;
249
- return typeof m != "string" ? a.push(m) : typeof a[a.length - 1] == "string" ? a[a.length - 1] += m : a.push(m), a;
247
+ var n = U(r, o, e, t).reduce(function(a, i) {
248
+ var l = i.value;
249
+ return typeof l != "string" ? a.push(l) : typeof a[a.length - 1] == "string" ? a[a.length - 1] += l : a.push(l), a;
250
250
  }, []);
251
- return o.length === 1 ? o[0] : o.length === 0 ? "" : o;
251
+ return n.length === 1 ? n[0] : n.length === 0 ? "" : n;
252
252
  }
253
- function G(r, n, e, t) {
254
- var o = r.locale, a = r.onError;
253
+ function U(r, o, e, t) {
254
+ var n = r.locale, a = r.onError;
255
255
  t === void 0 && (t = {});
256
256
  var i = Intl.ListFormat;
257
257
  i || a(new I(`Intl.ListFormat is not available in this environment.
258
258
  Try polyfilling it using "@formatjs/intl-listformat"
259
- `, F.MISSING_INTL_API));
260
- var m = h(t, pr);
259
+ `, h.MISSING_INTL_API));
260
+ var l = E(t, pr);
261
261
  try {
262
- var l = {}, d = e.map(function(f, g) {
262
+ var m = {}, d = e.map(function(f, g) {
263
263
  if (typeof f == "object") {
264
264
  var y = gr(g);
265
- return l[y] = f, y;
265
+ return m[y] = f, y;
266
266
  }
267
267
  return String(f);
268
268
  });
269
- return n(o, m).formatToParts(d).map(function(f) {
270
- return f.type === "literal" ? f : s(s({}, f), { value: l[f.value] || f.value });
269
+ return o(n, l).formatToParts(d).map(function(f) {
270
+ return f.type === "literal" ? f : s(s({}, f), { value: m[f.value] || f.value });
271
271
  });
272
272
  } catch (f) {
273
- a(new c("Error formatting list.", o, f));
273
+ a(new c("Error formatting list.", n, f));
274
274
  }
275
275
  return e;
276
276
  }
277
277
  var yr = ["type"];
278
- function hr(r, n, e, t) {
279
- var o = r.locale, a = r.onError;
278
+ function Er(r, o, e, t) {
279
+ var n = r.locale, a = r.onError;
280
280
  t === void 0 && (t = {}), Intl.PluralRules || a(new I(`Intl.PluralRules is not available in this environment.
281
281
  Try polyfilling it using "@formatjs/intl-pluralrules"
282
- `, F.MISSING_INTL_API));
283
- var i = h(t, yr);
282
+ `, h.MISSING_INTL_API));
283
+ var i = E(t, yr);
284
284
  try {
285
- return n(o, i).select(e);
286
- } catch (m) {
287
- a(new c("Error formatting plural.", o, m));
285
+ return o(n, i).select(e);
286
+ } catch (l) {
287
+ a(new c("Error formatting plural.", n, l));
288
288
  }
289
289
  return "other";
290
290
  }
291
291
  var Tr = ["numeric", "style"];
292
- function Er(r, n, e) {
293
- var t = r.locale, o = r.formats, a = r.onError;
292
+ function Fr(r, o, e) {
293
+ var t = r.locale, n = r.formats, a = r.onError;
294
294
  e === void 0 && (e = {});
295
- var i = e.format, m = !!i && x(o, "relative", i, a) || {}, l = h(e, Tr, m);
296
- return n(t, l);
295
+ var i = e.format, l = !!i && w(n, "relative", i, a) || {}, m = E(e, Tr, l);
296
+ return o(t, m);
297
297
  }
298
- function br(r, n, e, t, o) {
299
- o === void 0 && (o = {}), t || (t = "second");
298
+ function br(r, o, e, t, n) {
299
+ n === void 0 && (n = {}), t || (t = "second");
300
300
  var a = Intl.RelativeTimeFormat;
301
301
  a || r.onError(new I(`Intl.RelativeTimeFormat is not available in this environment.
302
302
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
303
- `, F.MISSING_INTL_API));
303
+ `, h.MISSING_INTL_API));
304
304
  try {
305
- return Er(r, n, o).format(e, t);
305
+ return Fr(r, o, n).format(e, t);
306
306
  } catch (i) {
307
307
  r.onError(new c("Error formatting relative time.", r.locale, i));
308
308
  }
@@ -330,79 +330,79 @@ var Ir = [
330
330
  "unitDisplay",
331
331
  "numberingSystem"
332
332
  ];
333
- function _(r, n, e) {
334
- var t = r.locale, o = r.formats, a = r.onError;
333
+ function $(r, o, e) {
334
+ var t = r.locale, n = r.formats, a = r.onError;
335
335
  e === void 0 && (e = {});
336
- var i = e.format, m = i && x(o, "number", i, a) || {}, l = h(e, Ir, m);
337
- return n(t, l);
336
+ var i = e.format, l = i && w(n, "number", i, a) || {}, m = E(e, Ir, l);
337
+ return o(t, m);
338
338
  }
339
- function Fr(r, n, e, t) {
339
+ function hr(r, o, e, t) {
340
340
  t === void 0 && (t = {});
341
341
  try {
342
- return _(r, n, t).format(e);
343
- } catch (o) {
344
- r.onError(new c("Error formatting number.", r.locale, o));
342
+ return $(r, o, t).format(e);
343
+ } catch (n) {
344
+ r.onError(new c("Error formatting number.", r.locale, n));
345
345
  }
346
346
  return String(e);
347
347
  }
348
- function Sr(r, n, e, t) {
348
+ function Sr(r, o, e, t) {
349
349
  t === void 0 && (t = {});
350
350
  try {
351
- return _(r, n, t).formatToParts(e);
352
- } catch (o) {
353
- r.onError(new c("Error formatting number.", r.locale, o));
351
+ return $(r, o, t).formatToParts(e);
352
+ } catch (n) {
353
+ r.onError(new c("Error formatting number.", r.locale, n));
354
354
  }
355
355
  return [];
356
356
  }
357
357
  function Pr(r) {
358
- var n = r ? r[Object.keys(r)[0]] : void 0;
359
- return typeof n == "string";
358
+ var o = r ? r[Object.keys(r)[0]] : void 0;
359
+ return typeof o == "string";
360
360
  }
361
- function Or(r) {
361
+ function Dr(r) {
362
362
  r.onWarn && r.defaultRichTextElements && Pr(r.messages || {}) && r.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
363
363
  Please consider using "@formatjs/cli" to pre-compile your messages for performance.
364
364
  For more details see https://formatjs.io/docs/getting-started/message-distribution`);
365
365
  }
366
- function wr(r, n) {
367
- var e = X(n), t = s(s({}, z), r), o = t.locale, a = t.defaultLocale, i = t.onError;
368
- return o ? !Intl.NumberFormat.supportedLocalesOf(o).length && i ? i(new R('Missing locale data for locale: "'.concat(o, '" in Intl.NumberFormat. Using default locale: "').concat(a, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : !Intl.DateTimeFormat.supportedLocalesOf(o).length && i && i(new R('Missing locale data for locale: "'.concat(o, '" in Intl.DateTimeFormat. Using default locale: "').concat(a, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : (i && i(new H('"locale" was not configured, using "'.concat(a, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))), t.locale = t.defaultLocale || "en"), Or(t), s(s({}, t), {
366
+ function xr(r, o) {
367
+ var e = Y(o), t = s(s({}, K), r), n = t.locale, a = t.defaultLocale, i = t.onError;
368
+ return n ? !Intl.NumberFormat.supportedLocalesOf(n).length && i ? i(new R('Missing locale data for locale: "'.concat(n, '" in Intl.NumberFormat. Using default locale: "').concat(a, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : !Intl.DateTimeFormat.supportedLocalesOf(n).length && i && i(new R('Missing locale data for locale: "'.concat(n, '" in Intl.DateTimeFormat. Using default locale: "').concat(a, '" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))) : (i && i(new H('"locale" was not configured, using "'.concat(a, '" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))), t.locale = t.defaultLocale || "en"), Dr(t), s(s({}, t), {
369
369
  formatters: e,
370
- formatNumber: Fr.bind(null, t, e.getNumberFormat),
370
+ formatNumber: hr.bind(null, t, e.getNumberFormat),
371
371
  formatNumberToParts: Sr.bind(null, t, e.getNumberFormat),
372
372
  formatRelativeTime: br.bind(null, t, e.getRelativeTimeFormat),
373
- formatDate: mr.bind(null, t, e.getDateTimeFormat),
373
+ formatDate: lr.bind(null, t, e.getDateTimeFormat),
374
374
  formatDateToParts: fr.bind(null, t, e.getDateTimeFormat),
375
- formatTime: lr.bind(null, t, e.getDateTimeFormat),
375
+ formatTime: mr.bind(null, t, e.getDateTimeFormat),
376
376
  formatDateTimeRange: sr.bind(null, t, e.getDateTimeFormat),
377
377
  formatTimeToParts: ur.bind(null, t, e.getDateTimeFormat),
378
- formatPlural: hr.bind(null, t, e.getPluralRules),
378
+ formatPlural: Er.bind(null, t, e.getPluralRules),
379
379
  // @ts-expect-error TODO: will get to this later
380
- formatMessage: D.bind(null, t, e),
380
+ formatMessage: O.bind(null, t, e),
381
381
  // @ts-expect-error TODO: will get to this later
382
- $t: D.bind(null, t, e),
382
+ $t: O.bind(null, t, e),
383
383
  formatList: vr.bind(null, t, e.getListFormat),
384
- formatListToParts: G.bind(null, t, e.getListFormat),
384
+ formatListToParts: U.bind(null, t, e.getListFormat),
385
385
  formatDisplayName: dr.bind(null, t, e.getDisplayNames)
386
386
  });
387
387
  }
388
- function q(r) {
389
- return r && Object.keys(r).reduce(function(n, e) {
388
+ function _(r) {
389
+ return r && Object.keys(r).reduce(function(o, e) {
390
390
  var t = r[e];
391
- return n[e] = Q(t) ? V(t) : t, n;
391
+ return o[e] = Q(t) ? V(t) : t, o;
392
392
  }, {});
393
393
  }
394
- var k = function(r, n, e, t) {
395
- for (var o = [], a = 4; a < arguments.length; a++)
396
- o[a - 4] = arguments[a];
397
- var i = q(t), m = D.apply(void 0, rr([
394
+ var k = function(r, o, e, t) {
395
+ for (var n = [], a = 4; a < arguments.length; a++)
396
+ n[a - 4] = arguments[a];
397
+ var i = _(t), l = O.apply(void 0, rr([
398
398
  r,
399
- n,
399
+ o,
400
400
  e,
401
401
  i
402
- ], o, !1));
403
- return Array.isArray(m) ? w.Children.toArray(m) : m;
404
- }, Z = function(r, n) {
405
- var e = r.defaultRichTextElements, t = J(r, ["defaultRichTextElements"]), o = q(e), a = wr(s(s(s({}, U), t), { defaultRichTextElements: o }), n), i = {
402
+ ], n, !1));
403
+ return Array.isArray(l) ? x.Children.toArray(l) : l;
404
+ }, B = function(r, o) {
405
+ var e = r.defaultRichTextElements, t = J(r, ["defaultRichTextElements"]), n = _(e), a = xr(s(s(s({}, Z), t), { defaultRichTextElements: n }), o), i = {
406
406
  locale: a.locale,
407
407
  timeZone: a.timeZone,
408
408
  fallbackOnEmptyString: a.fallbackOnEmptyString,
@@ -411,7 +411,7 @@ var k = function(r, n, e, t) {
411
411
  defaultFormats: a.defaultFormats,
412
412
  messages: a.messages,
413
413
  onError: a.onError,
414
- defaultRichTextElements: o
414
+ defaultRichTextElements: n
415
415
  };
416
416
  return s(s({}, a), {
417
417
  formatMessage: k.bind(
@@ -424,7 +424,7 @@ var k = function(r, n, e, t) {
424
424
  $t: k.bind(null, i, a.formatters)
425
425
  });
426
426
  };
427
- function O(r) {
427
+ function D(r) {
428
428
  return {
429
429
  locale: r.locale,
430
430
  timeZone: r.timeZone,
@@ -440,49 +440,110 @@ function O(r) {
440
440
  defaultRichTextElements: r.defaultRichTextElements
441
441
  };
442
442
  }
443
- var Dr = (
443
+ var Or = (
444
444
  /** @class */
445
445
  function(r) {
446
- tr(n, r);
447
- function n() {
446
+ tr(o, r);
447
+ function o() {
448
448
  var e = r !== null && r.apply(this, arguments) || this;
449
449
  return e.cache = nr(), e.state = {
450
450
  cache: e.cache,
451
- intl: Z(O(e.props), e.cache),
452
- prevConfig: O(e.props)
451
+ intl: B(D(e.props), e.cache),
452
+ prevConfig: D(e.props)
453
453
  }, e;
454
454
  }
455
- return n.getDerivedStateFromProps = function(e, t) {
456
- var o = t.prevConfig, a = t.cache, i = O(e);
457
- return er(o, i) ? null : {
458
- intl: Z(i, a),
455
+ return o.getDerivedStateFromProps = function(e, t) {
456
+ var n = t.prevConfig, a = t.cache, i = D(e);
457
+ return er(n, i) ? null : {
458
+ intl: B(i, a),
459
459
  prevConfig: i
460
460
  };
461
- }, n.prototype.render = function() {
462
- return ar(this.state.intl), w.createElement(or, { value: this.state.intl }, this.props.children);
463
- }, n.displayName = "IntlProvider", n.defaultProps = U, n;
464
- }(w.PureComponent)
461
+ }, o.prototype.render = function() {
462
+ return or(this.state.intl), x.createElement(ar, { value: this.state.intl }, this.props.children);
463
+ }, o.displayName = "IntlProvider", o.defaultProps = Z, o;
464
+ }(x.PureComponent)
465
465
  );
466
- const xr = Dr, Zt = ({
466
+ const wr = Or, kt = ({
467
467
  locale: r,
468
- ...n
469
- }) => /* @__PURE__ */ N(xr, { locale: (r == null ? void 0 : r.locale) || "en", children: /* @__PURE__ */ N(ir, { ...n, locale: r }) });
468
+ theme: o,
469
+ ...e
470
+ }) => {
471
+ var t, n, a, i, l;
472
+ return /* @__PURE__ */ N(wr, { locale: (r == null ? void 0 : r.locale) || "en", children: /* @__PURE__ */ N(
473
+ ir,
474
+ {
475
+ ...e,
476
+ theme: {
477
+ ...o,
478
+ token: {
479
+ fontFamily: "Inter, Noto Sans Arabic, sans-serif",
480
+ borderRadius: 8,
481
+ colorPrimary: "#1B7DC7",
482
+ colorSuccess: "#42C75E",
483
+ colorWarning: "#F6A723",
484
+ colorError: "#ED4F9D",
485
+ colorTextBase: "#0F172A",
486
+ colorBgBase: "#F8FAFC",
487
+ colorSuccessBg: "#F0FDF4",
488
+ colorErrorBg: "#F15568",
489
+ colorWarningBg: "#FFFBEB",
490
+ colorInfoBg: "#EFF6FF",
491
+ fontSize: 16,
492
+ fontSizeSM: 14,
493
+ fontSizeLG: 16,
494
+ fontSizeXL: 18,
495
+ ...o == null ? void 0 : o.token
496
+ },
497
+ components: {
498
+ ...o == null ? void 0 : o.components,
499
+ Progress: {
500
+ defaultColor: "#1B7DC7",
501
+ remainingColor: "#E2E8F0",
502
+ lineBorderRadius: 50,
503
+ ...(t = o == null ? void 0 : o.components) == null ? void 0 : t.Progress
504
+ },
505
+ Input: {
506
+ colorBorder: "#E2E8F0",
507
+ colorText: "#94A3B8",
508
+ ...(n = o == null ? void 0 : o.components) == null ? void 0 : n.Input
509
+ },
510
+ Select: {
511
+ colorText: "#94A3B8",
512
+ ...(a = o == null ? void 0 : o.components) == null ? void 0 : a.Select
513
+ },
514
+ DatePicker: {
515
+ colorText: "#94A3B8",
516
+ ...(i = o == null ? void 0 : o.components) == null ? void 0 : i.DatePicker
517
+ },
518
+ Modal: {
519
+ titleColor: "#0F172A",
520
+ headerBg: "#fff",
521
+ contentBg: "#fff",
522
+ ...(l = o == null ? void 0 : o.components) == null ? void 0 : l.Modal
523
+ }
524
+ }
525
+ },
526
+ locale: r
527
+ }
528
+ ) });
529
+ };
470
530
  export {
471
- ye as AgGridTable,
531
+ ve as AgGridTable,
472
532
  Gt as Button,
473
- qt as CheckList,
474
- Zt as ConfigProvider,
475
- Yt as DatePicker,
476
- Kt as Dragger,
477
- zt as Dropdown,
478
- Jt as Form,
479
- Vt as FormItem,
480
- te as Input,
481
- ae as SideMenu,
482
- ne as Steps,
483
- me as Table,
484
- se as Tabs,
485
- ue as Tag,
486
- ge as TimelineHorizontal,
487
- de as Upload
533
+ $t as CheckList,
534
+ kt as ConfigProvider,
535
+ qt as DatePicker,
536
+ zt as Dragger,
537
+ Yt as Dropdown,
538
+ Ht as Form,
539
+ Qt as FormItem,
540
+ re as Input,
541
+ ee as SideMenu,
542
+ ae as Steps,
543
+ ie as Table,
544
+ me as Tabs,
545
+ fe as Tag,
546
+ pe as TimelineHorizontal,
547
+ ce as Upload,
548
+ Ee as theme
488
549
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gasp-components",
3
3
  "private": false,
4
- "version": "1.0.2",
4
+ "version": "1.0.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",