@aivenio/aquarium 1.38.2 → 1.39.0

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/system.mjs CHANGED
@@ -79,566 +79,6 @@ var require_tokens = __commonJS({
79
79
  "tokens.json"(exports, module) {
80
80
  module.exports = {
81
81
  themes: {
82
- timescale: {
83
- colors: {
84
- "error-100": "#aa0000",
85
- "error-90": "#b90000",
86
- "error-80": "#c50001",
87
- "error-70": "#d80005",
88
- "error-60": "#e70000",
89
- "error-50": "#e62728",
90
- "error-40": "#e0504f",
91
- "error-30": "#ed7975",
92
- "error-20": "#ffadb3",
93
- "error-10": "#ffcbd2",
94
- "error-5": "#fee8e7",
95
- "error-0": "#fef2f1",
96
- "warning-100": "#fe6d00",
97
- "warning-90": "#ff9003",
98
- "warning-80": "#fd9f00",
99
- "warning-70": "#ffb300",
100
- "warning-60": "#ffc107",
101
- "warning-50": "#fdc926",
102
- "warning-40": "#fdd44d",
103
- "warning-30": "#fddf81",
104
- "warning-20": "#feebb2",
105
- "warning-10": "#fff2cd",
106
- "warning-5": "#fff8ea",
107
- "warning-0": "#fffdf9",
108
- "success-100": "#006f00",
109
- "success-90": "#008e00",
110
- "success-80": "#009f00",
111
- "success-70": "#00b300",
112
- "success-60": "#00c300",
113
- "success-50": "#40ce37",
114
- "success-40": "#60db57",
115
- "success-30": "#89eb80",
116
- "success-20": "#afffa7",
117
- "success-10": "#cbffc9",
118
- "success-5": "#ecf7ed",
119
- "success-0": "#f5faf5",
120
- "info-100": "#02569a",
121
- "info-90": "#0174ba",
122
- "info-80": "#0788d1",
123
- "info-70": "#0399e3",
124
- "info-60": "#02a8f3",
125
- "info-50": "#28b4f4",
126
- "info-40": "#4cc2f7",
127
- "info-30": "#7fd1f7",
128
- "info-20": "#b4e5fb",
129
- "info-10": "#e0f5fe",
130
- "info-5": "#effaff",
131
- "info-0": "#f9fdff",
132
- "grey-100": "#19191d",
133
- "grey-90": "#292a31",
134
- "grey-80": "#3a3a44",
135
- "grey-70": "#4a4b57",
136
- "grey-60": "#5a5b6a",
137
- "grey-50": "#787885",
138
- "grey-40": "#9696a0",
139
- "grey-30": "#b4b4bb",
140
- "grey-20": "#d2d2d6",
141
- "grey-10": "#e1e1e3",
142
- "grey-5": "#ededf0",
143
- "grey-0": "#f7f7fa",
144
- "secondary-100": "#e11d16",
145
- "secondary-90": "#eb4610",
146
- "secondary-80": "#f3580d",
147
- "secondary-70": "#f96a02",
148
- "secondary-60": "#ff7700",
149
- "secondary-50": "#fc871a",
150
- "secondary-40": "#fb9a3e",
151
- "secondary-30": "#fab26e",
152
- "secondary-20": "#f8c99c",
153
- "secondary-10": "#fee8d0",
154
- "secondary-5": "#fff3e8",
155
- "secondary-0": "#fffbf8",
156
- "primary-100": "#02569a",
157
- "primary-90": "#0174ba",
158
- "primary-80": "#0788d1",
159
- "primary-70": "#0399e3",
160
- "primary-60": "#02a8f3",
161
- "primary-50": "#28b4f4",
162
- "primary-40": "#4cc2f7",
163
- "primary-30": "#7fd1f7",
164
- "primary-20": "#b4e5fb",
165
- "primary-10": "#e0f5fe",
166
- "primary-5": "#effaff",
167
- "primary-0": "#f9fdff"
168
- },
169
- typography: {
170
- sizes: [
171
- {
172
- name: "large-heading",
173
- className: "typography-large-heading",
174
- style: {
175
- fontFamily: "Inter",
176
- fontSize: "32px",
177
- fontWeight: 700,
178
- fontStyle: "normal",
179
- lineHeight: 1.375,
180
- textTransform: "none"
181
- },
182
- fontPostScriptName: "Inter-Bold"
183
- },
184
- {
185
- name: "heading",
186
- className: "typography-heading",
187
- style: {
188
- fontFamily: "Inter",
189
- fontSize: "24px",
190
- fontWeight: 700,
191
- fontStyle: "normal",
192
- lineHeight: 1.375,
193
- textTransform: "none"
194
- },
195
- fontPostScriptName: "Inter-Bold"
196
- },
197
- {
198
- name: "subheading",
199
- className: "typography-subheading",
200
- style: {
201
- fontFamily: "Inter",
202
- fontSize: "20px",
203
- fontWeight: 600,
204
- fontStyle: "normal",
205
- lineHeight: 1.375,
206
- textTransform: "none"
207
- },
208
- fontPostScriptName: "Inter-Bold"
209
- },
210
- {
211
- name: "large-strong",
212
- className: "typography-large-strong",
213
- style: {
214
- fontFamily: "Inter",
215
- fontSize: "20px",
216
- fontWeight: 600,
217
- fontStyle: "normal",
218
- lineHeight: 1.58,
219
- textTransform: "none"
220
- },
221
- fontPostScriptName: "Inter-SemiBold"
222
- },
223
- {
224
- name: "large",
225
- className: "typography-large",
226
- style: {
227
- fontFamily: "Inter",
228
- fontSize: "20px",
229
- fontWeight: 500,
230
- fontStyle: "normal",
231
- lineHeight: 1.58,
232
- textTransform: "none"
233
- },
234
- fontPostScriptName: "Inter-SemiBold"
235
- },
236
- {
237
- name: "default-strong",
238
- className: "typography-default-strong",
239
- style: {
240
- fontFamily: "Inter",
241
- fontSize: "16px",
242
- fontWeight: 500,
243
- fontStyle: "normal",
244
- lineHeight: 1.5,
245
- textTransform: "none"
246
- },
247
- fontPostScriptName: "Inter-SemiBold"
248
- },
249
- {
250
- name: "default",
251
- className: "typography-default",
252
- style: {
253
- fontFamily: "Inter",
254
- fontSize: "16px",
255
- fontWeight: 400,
256
- fontStyle: "normal",
257
- lineHeight: 1.5,
258
- textTransform: "none"
259
- },
260
- fontPostScriptName: null
261
- },
262
- {
263
- name: "small-strong",
264
- className: "typography-small-strong",
265
- style: {
266
- fontFamily: "Inter",
267
- fontSize: "14px",
268
- fontWeight: 500,
269
- fontStyle: "normal",
270
- lineHeight: 1.42,
271
- textTransform: "none"
272
- },
273
- fontPostScriptName: "Inter-SemiBold"
274
- },
275
- {
276
- name: "small",
277
- className: "typography-small",
278
- style: {
279
- fontFamily: "Inter",
280
- fontSize: "14px",
281
- fontWeight: 400,
282
- fontStyle: "normal",
283
- lineHeight: 1.42,
284
- textTransform: "none"
285
- },
286
- fontPostScriptName: null
287
- },
288
- {
289
- name: "caption",
290
- className: "typography-caption",
291
- style: {
292
- fontFamily: "Inter",
293
- fontSize: "12px",
294
- fontWeight: 400,
295
- fontStyle: "normal",
296
- lineHeight: 1.26,
297
- textTransform: "none"
298
- },
299
- fontPostScriptName: null
300
- },
301
- {
302
- name: "caption-small",
303
- className: "typography-caption-small",
304
- style: {
305
- fontFamily: "Inter",
306
- fontSize: "10px",
307
- fontWeight: 400,
308
- fontStyle: "normal",
309
- lineHeight: 1.2,
310
- textTransform: "none"
311
- },
312
- fontPostScriptName: null
313
- },
314
- {
315
- name: "caption-default",
316
- className: "typography-caption-default",
317
- style: {
318
- fontFamily: "Inter",
319
- fontSize: "12px",
320
- fontWeight: 400,
321
- fontStyle: "normal",
322
- lineHeight: 1.26,
323
- letterSpacing: 0,
324
- textTransform: "none"
325
- },
326
- fontPostScriptName: null
327
- },
328
- {
329
- name: "overline-small",
330
- className: "typography-overline-small",
331
- style: {
332
- fontFamily: "Inter",
333
- fontSize: "10px",
334
- fontWeight: 400,
335
- fontStyle: "normal",
336
- lineHeight: 1,
337
- letterSpacing: 0,
338
- textTransform: "uppercase"
339
- },
340
- fontPostScriptName: null
341
- },
342
- {
343
- name: "overline-default",
344
- className: "typography-overline-default",
345
- style: {
346
- fontFamily: "Inter",
347
- fontSize: "12px",
348
- fontWeight: 400,
349
- fontStyle: "normal",
350
- lineHeight: 1,
351
- letterSpacing: 0,
352
- textTransform: "uppercase"
353
- },
354
- fontPostScriptName: null
355
- },
356
- {
357
- name: "button-small",
358
- className: "typography-button-small",
359
- style: {
360
- fontFamily: "Inter",
361
- fontSize: "12px",
362
- fontWeight: 500,
363
- fontStyle: "normal",
364
- lineHeight: 1,
365
- letterSpacing: 0,
366
- textTransform: "none"
367
- },
368
- fontPostScriptName: "Inter-Medium"
369
- },
370
- {
371
- name: "button-medium",
372
- className: "typography-button-medium",
373
- style: {
374
- fontFamily: "Inter",
375
- fontSize: "14px",
376
- fontWeight: 400,
377
- fontStyle: "normal",
378
- lineHeight: 1,
379
- letterSpacing: 0,
380
- textTransform: "none"
381
- },
382
- fontPostScriptName: "Inter-SemiBold"
383
- },
384
- {
385
- name: "button-large",
386
- className: "typography-button-large",
387
- style: {
388
- fontFamily: "Inter",
389
- fontSize: "16px",
390
- fontWeight: 500,
391
- fontStyle: "normal",
392
- lineHeight: 1.5,
393
- letterSpacing: 0,
394
- textTransform: "none"
395
- },
396
- fontPostScriptName: "Inter-Medium"
397
- },
398
- {
399
- name: "body-small",
400
- className: "typography-body-small",
401
- style: {
402
- fontFamily: "Inter",
403
- fontSize: "14px",
404
- fontWeight: 400,
405
- fontStyle: "normal",
406
- lineHeight: 1.43,
407
- letterSpacing: 0,
408
- textTransform: "none"
409
- },
410
- fontPostScriptName: null
411
- },
412
- {
413
- name: "body-small-medium",
414
- className: "typography-body-small-medium",
415
- style: {
416
- fontFamily: "Inter",
417
- fontSize: "14px",
418
- fontWeight: 500,
419
- fontStyle: "normal",
420
- lineHeight: 1.43,
421
- letterSpacing: 0,
422
- textTransform: "none"
423
- },
424
- fontPostScriptName: "Inter-SemiBold"
425
- },
426
- {
427
- name: "body-default",
428
- className: "typography-body-default",
429
- style: {
430
- fontFamily: "Inter",
431
- fontSize: "16px",
432
- fontWeight: 400,
433
- fontStyle: "normal",
434
- lineHeight: 1.5,
435
- letterSpacing: 0,
436
- textTransform: "none"
437
- },
438
- fontPostScriptName: null
439
- },
440
- {
441
- name: "body-default-medium",
442
- className: "typography-body-default-medium",
443
- style: {
444
- fontFamily: "Inter",
445
- fontSize: "16px",
446
- fontWeight: 500,
447
- fontStyle: "normal",
448
- lineHeight: 1.5,
449
- letterSpacing: 0,
450
- textTransform: "none"
451
- },
452
- fontPostScriptName: "Inter-SemiBold"
453
- },
454
- {
455
- name: "body-large",
456
- className: "typography-body-large",
457
- style: {
458
- fontFamily: "Inter",
459
- fontSize: "20px",
460
- fontWeight: 400,
461
- fontStyle: "normal",
462
- lineHeight: 1.58,
463
- letterSpacing: 0,
464
- textTransform: "none"
465
- },
466
- fontPostScriptName: null
467
- },
468
- {
469
- name: "body-large-medium",
470
- className: "typography-body-large-medium",
471
- style: {
472
- fontFamily: "Inter",
473
- fontSize: "20px",
474
- fontWeight: 400,
475
- fontStyle: "normal",
476
- lineHeight: 1.2,
477
- letterSpacing: 0,
478
- textTransform: "none"
479
- },
480
- fontPostScriptName: "Inter-SemiBold"
481
- },
482
- {
483
- name: "heading-large",
484
- className: "typography-heading-large",
485
- style: {
486
- fontFamily: "Inter",
487
- fontSize: "20px",
488
- fontWeight: 700,
489
- fontStyle: "normal",
490
- lineHeight: 1.5,
491
- letterSpacing: 0.15,
492
- textTransform: "none"
493
- },
494
- fontPostScriptName: "Inter-Bold"
495
- },
496
- {
497
- name: "heading-xl",
498
- className: "typography-heading-xl",
499
- style: {
500
- fontFamily: "Inter",
501
- fontSize: "24px",
502
- fontWeight: 700,
503
- fontStyle: "normal",
504
- lineHeight: 1.5,
505
- letterSpacing: 0,
506
- textTransform: "none"
507
- },
508
- fontPostScriptName: "Inter-Bold"
509
- },
510
- {
511
- name: "heading-2xl",
512
- className: "typography-heading-2xl",
513
- style: {
514
- fontFamily: "Inter",
515
- fontSize: "34px",
516
- fontWeight: 700,
517
- fontStyle: "normal",
518
- lineHeight: 1.28,
519
- letterSpacing: 0,
520
- textTransform: "none"
521
- },
522
- fontPostScriptName: "Inter-Bold"
523
- },
524
- {
525
- name: "heading-3xl",
526
- className: "typography-heading-3xl",
527
- style: {
528
- fontFamily: "Inter",
529
- fontSize: "48px",
530
- fontWeight: 700,
531
- fontStyle: "normal",
532
- lineHeight: 1.24,
533
- letterSpacing: -0.48,
534
- textTransform: "none"
535
- },
536
- fontPostScriptName: "Inter-Bold"
537
- },
538
- {
539
- name: "heading-4xl",
540
- className: "typography-heading-4xl",
541
- style: {
542
- fontFamily: "Inter",
543
- fontSize: "60px",
544
- fontWeight: 700,
545
- fontStyle: "normal",
546
- lineHeight: 1.2,
547
- letterSpacing: -1.5,
548
- textTransform: "none"
549
- },
550
- fontPostScriptName: "Inter-Bold"
551
- },
552
- {
553
- name: "heading-5xl",
554
- className: "typography-heading-5xl",
555
- style: {
556
- fontFamily: "Inter",
557
- fontSize: "76px",
558
- fontWeight: 700,
559
- fontStyle: "normal",
560
- lineHeight: 1.2,
561
- letterSpacing: -1.98,
562
- textTransform: "none"
563
- },
564
- fontPostScriptName: "Inter-Bold"
565
- }
566
- ]
567
- },
568
- elevations: {
569
- "24dp": "0px 24px 48px rgba(90, 91, 106, 0.08), 0px 12px 24px rgba(58, 58, 68, 0.08)",
570
- "16dp": "0px 16px 32px rgba(90, 91, 106, 0.12), 0px 8px 16px rgba(58, 58, 68, 0.12)",
571
- "8dp": "0px 8px 16px rgba(90, 91, 106, 0.16), 0px 4px 8px rgba(58, 58, 68, 0.16)",
572
- "4dp": "0px 4px 8px rgba(90, 91, 106, 0.20), 0px 2px 4px rgba(58, 58, 68, 0.20)",
573
- "2dp": "0px 2px 4px rgba(90, 91, 106, 0.24), 0px 1px 2px rgba(58, 58, 68, 0.24)"
574
- },
575
- spacing: {
576
- layout01: {
577
- px: 16,
578
- rem: 1
579
- },
580
- layout02: {
581
- px: 24,
582
- rem: 1.5
583
- },
584
- layout03: {
585
- px: 32,
586
- rem: 2
587
- },
588
- layout04: {
589
- px: 48,
590
- rem: 3
591
- },
592
- layout05: {
593
- px: 64,
594
- rem: 4
595
- },
596
- layout06: {
597
- px: 96,
598
- rem: 6
599
- },
600
- layout07: {
601
- px: 160,
602
- rem: 10
603
- },
604
- spacing01: {
605
- px: 2,
606
- rem: 0.125
607
- },
608
- spacing02: {
609
- px: 4,
610
- rem: 0.25
611
- },
612
- spacing03: {
613
- px: 8,
614
- rem: 0.5
615
- },
616
- spacing04: {
617
- px: 12,
618
- rem: 0.75
619
- },
620
- spacing05: {
621
- px: 16,
622
- rem: 1
623
- },
624
- spacing06: {
625
- px: 24,
626
- rem: 1.5
627
- },
628
- spacing07: {
629
- px: 32,
630
- rem: 2
631
- },
632
- spacing08: {
633
- px: 40,
634
- rem: 2.5
635
- },
636
- spacing09: {
637
- px: 48,
638
- rem: 3
639
- }
640
- }
641
- },
642
82
  aiven: {
643
83
  colors: {
644
84
  "error-100": "#aa0000",
@@ -5117,7 +4557,8 @@ __export(molecules_exports, {
5117
4557
  useScrollTarget: () => useScrollTarget,
5118
4558
  useTableSelect: () => useTableSelect,
5119
4559
  useTableSort: () => useTableSort,
5120
- useToast: () => useToast
4560
+ useToast: () => useToast,
4561
+ useToastContext: () => useToastContext
5121
4562
  });
5122
4563
 
5123
4564
  // src/atoms/Select/Select.tsx
@@ -6476,15 +5917,25 @@ var Timer = ({ children, duration }) => {
6476
5917
 
6477
5918
  // src/molecules/Toast/Toast.tsx
6478
5919
  var ToastContext = createContext(null);
6479
- var useToastContext = () => {
5920
+ var useToastRootContext = () => {
6480
5921
  const context2 = useContext(ToastContext);
6481
5922
  if (context2 === null) {
6482
5923
  throw new Error("ToastContext was used outside of provider.");
6483
5924
  }
6484
5925
  return context2;
6485
5926
  };
5927
+ var useToastContext = () => {
5928
+ const [_, dispatch] = useToastRootContext();
5929
+ const toast = (toast2) => {
5930
+ dispatch({ type: 0 /* Toast */, toast: toast2 });
5931
+ };
5932
+ const dismiss = (toastId) => {
5933
+ dispatch({ type: 1 /* Dismiss */, toastId });
5934
+ };
5935
+ return [toast, dismiss];
5936
+ };
6486
5937
  var useToast = () => {
6487
- const [_, dispatch] = useToastContext();
5938
+ const [_, dispatch] = useToastRootContext();
6488
5939
  return (toast) => {
6489
5940
  dispatch({ type: 0 /* Toast */, toast });
6490
5941
  };
@@ -6500,8 +5951,13 @@ var toToast = (_a) => {
6500
5951
  };
6501
5952
  var reducer = (state, action) => {
6502
5953
  switch (action.type) {
6503
- case 0 /* Toast */:
6504
- return __spreadProps(__spreadValues({}, state), { toasts: [...state.toasts, toToast(action.toast)] });
5954
+ case 0 /* Toast */: {
5955
+ const newToast = toToast(action.toast);
5956
+ if (state.toasts.some((toast) => toast.id === newToast.id)) {
5957
+ return __spreadValues({}, state);
5958
+ }
5959
+ return __spreadProps(__spreadValues({}, state), { toasts: [...state.toasts, newToast] });
5960
+ }
6505
5961
  case 1 /* Dismiss */:
6506
5962
  return __spreadProps(__spreadValues({}, state), {
6507
5963
  toasts: state.toasts.filter((toast) => toast.id !== action.toastId)
@@ -6548,7 +6004,7 @@ var ToastComponent = ({ toast, onDismiss }) => {
6548
6004
  }, content);
6549
6005
  };
6550
6006
  var ToastConsumer = () => {
6551
- const [state, dispatch] = useToastContext();
6007
+ const [state, dispatch] = useToastRootContext();
6552
6008
  const toastsByPosition = groupBy(state.toasts, "position");
6553
6009
  const positions = Object.keys(toastsByPosition);
6554
6010
  const onDismiss = (toastId) => {
@@ -8661,6 +8117,7 @@ var GridComponent = Tailwindify(
8661
8117
  }
8662
8118
  );
8663
8119
  Grid.Item = GridItem;
8120
+ Grid.Item.displayName = "Grid.Item";
8664
8121
 
8665
8122
  // src/atoms/InputGroup/InputGroup.tsx
8666
8123
  var gridColumnStyles = {
@@ -9163,9 +8620,11 @@ var ComboboxBase = (_a) => {
9163
8620
  stateReducer: (_, actionChanges) => {
9164
8621
  const { changes, type } = actionChanges;
9165
8622
  switch (type) {
8623
+ case useCombobox.stateChangeTypes.InputKeyDownEnter:
9166
8624
  case useCombobox.stateChangeTypes.InputBlur: {
8625
+ const selectedItem2 = createOption ? createOption == null ? void 0 : createOption(changes.inputValue) : changes.selectedItem;
9167
8626
  return __spreadProps(__spreadValues({}, changes), {
9168
- selectedItem: createOption ? createOption == null ? void 0 : createOption(changes.inputValue) : changes.selectedItem
8627
+ selectedItem: selectedItem2
9169
8628
  });
9170
8629
  }
9171
8630
  }
@@ -9404,9 +8863,10 @@ var createInput = (displayName, opts = {}) => {
9404
8863
  getCommonInputStyles({ readOnly, valid }),
9405
8864
  props.className
9406
8865
  )
9407
- })), opts.canReset && (props.value || ((_a2 = inputRef.current) == null ? void 0 : _a2.value)) && /* @__PURE__ */ React49.createElement(InputAdornment, null, /* @__PURE__ */ React49.createElement(ResetIcon, {
8866
+ })), opts.canReset && (props.value || ((_a2 = inputRef.current) == null ? void 0 : _a2.value)) && /* @__PURE__ */ React49.createElement(InputAdornment, null, /* @__PURE__ */ React49.createElement("button", {
8867
+ "aria-label": "reset search",
9408
8868
  onClick: handleReset
9409
- })), !opts.canReset && endAdornment && /* @__PURE__ */ React49.createElement(InputAdornment, null, endAdornment));
8869
+ }, /* @__PURE__ */ React49.createElement(ResetIcon, null))), !opts.canReset && endAdornment && /* @__PURE__ */ React49.createElement(InputAdornment, null, endAdornment));
9410
8870
  }
9411
8871
  );
9412
8872
  InputComponent.displayName = displayName;
@@ -13957,5 +13417,6 @@ export {
13957
13417
  useScrollTarget,
13958
13418
  useTableSelect,
13959
13419
  useTableSort,
13960
- useToast
13420
+ useToast,
13421
+ useToastContext
13961
13422
  };