@rocket.chat/fuselage 0.34.0 → 0.36.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/CHANGELOG.md +23 -0
- package/dist/Theme.d.ts +14 -13
- package/dist/Theme.d.ts.map +1 -1
- package/dist/components/Button/ActionButton.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/IconButton.d.ts +1 -1
- package/dist/components/CheckBox/CheckBox.d.ts +1 -1
- package/dist/components/Contextualbar/ContextualbarButton.d.ts +2 -2
- package/dist/components/Contextualbar/ContextualbarContent.d.ts +1 -1
- package/dist/components/Contextualbar/ContextualbarEmptyContent.d.ts +1 -1
- package/dist/components/Contextualbar/ContextualbarFooter.d.ts +1 -1
- package/dist/components/Contextualbar/ContextualbarIcon.d.ts +2 -2
- package/dist/components/EmailInput/EmailInput.d.ts +1 -1
- package/dist/components/Field/index.d.ts +6 -6
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/InputBox/Addon.d.ts +1 -1
- package/dist/components/InputBox/Input.d.ts +1 -1
- package/dist/components/InputBox/Option.d.ts +1 -1
- package/dist/components/InputBox/Placeholder.d.ts +1 -1
- package/dist/components/InputBox/index.d.ts +6 -6
- package/dist/components/Menu/V2/MenuOption.d.ts +2 -2
- package/dist/components/Message/MessageMetrics/MessageMetricsItem/index.d.ts +2 -2
- package/dist/components/Message/MessageMetrics/index.d.ts +4 -4
- package/dist/components/Message/MessageToolbox/MessageToolboxItem.d.ts +3 -3
- package/dist/components/Message/MessageToolbox/index.d.ts +6 -6
- package/dist/components/Message/index.d.ts +10 -10
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +2 -2
- package/dist/components/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/Option/CheckOption.d.ts +3 -3
- package/dist/components/Option/Option.d.ts +3 -3
- package/dist/components/Option/index.d.ts +7 -7
- package/dist/components/Options/Options.d.ts +2 -2
- package/dist/components/Options/index.d.ts +1 -1
- package/dist/components/OptionsPaginated/OptionsPaginated.d.ts +4 -4
- package/dist/components/PaginatedSelect/PaginatedMultiSelect.d.ts +3 -1
- package/dist/components/PaginatedSelect/PaginatedMultiSelect.d.ts.map +1 -1
- package/dist/components/PaginatedSelect/PaginatedSelectWrapper.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/Select/SelectAddon.d.ts +1 -1
- package/dist/components/Select/SelectFiltered.d.ts +4 -4
- package/dist/components/Select/SelectFocus.d.ts +1 -1
- package/dist/components/Select/SelectLegacy.d.ts +2 -2
- package/dist/components/SelectInput/SelectInput.d.ts +1 -1
- package/dist/components/SelectInput/index.d.ts +1 -1
- package/dist/components/Sidebar/Item.d.ts +3 -3
- package/dist/components/Sidebar/SidebarActions.d.ts +3 -3
- package/dist/components/Sidebar/TopBar.d.ts +8 -8
- package/dist/components/Sidebar/index.d.ts +9 -9
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/TabsItem.d.ts +1 -1
- package/dist/components/TelephoneInput/TelephoneInput.d.ts +1 -1
- package/dist/components/TextAreaInput/TextArea.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +1 -1
- package/dist/components/Throbber/Throbber.d.ts +1 -1
- package/dist/components/Tile/Tile.d.ts +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/UrlInput/UrlInput.d.ts +1 -1
- package/dist/fuselage.css +4 -4
- package/dist/fuselage.css.map +1 -1
- package/dist/fuselage.development.js +153 -194
- package/dist/fuselage.development.js.map +1 -1
- package/dist/fuselage.production.js +1 -1
- package/dist/getPaletteColor.d.ts +7 -6
- package/dist/getPaletteColor.d.ts.map +1 -1
- package/dist/styleTokens.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -401,169 +401,155 @@ var __setThrowErrorOnInvalidToken__ = function (value) {
|
|
|
401
401
|
};
|
|
402
402
|
exports.__setThrowErrorOnInvalidToken__ = __setThrowErrorOnInvalidToken__;
|
|
403
403
|
exports.neutral = {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
600: new Var('service-1-600', colors_json_1.default['s1-600']),
|
|
482
|
-
700: new Var('service-1-700', colors_json_1.default['s1-700']),
|
|
483
|
-
800: new Var('service-1-800', colors_json_1.default['s1-800']),
|
|
484
|
-
900: new Var('service-1-900', colors_json_1.default['s1-900']),
|
|
485
|
-
};
|
|
486
|
-
var service2 = {
|
|
487
|
-
100: new Var('service-2-100', colors_json_1.default['s2-100']),
|
|
488
|
-
200: new Var('service-2-200', colors_json_1.default['s2-200']),
|
|
489
|
-
300: new Var('service-2-300', colors_json_1.default['s2-300']),
|
|
490
|
-
400: new Var('service-2-400', colors_json_1.default['s2-400']),
|
|
491
|
-
500: new Var('service-2-500', colors_json_1.default['s2-500']),
|
|
492
|
-
600: new Var('service-2-600', colors_json_1.default['s2-600']),
|
|
493
|
-
700: new Var('service-2-700', colors_json_1.default['s2-700']),
|
|
494
|
-
800: new Var('service-2-800', colors_json_1.default['s2-800']),
|
|
495
|
-
900: new Var('service-2-900', colors_json_1.default['s2-900']),
|
|
404
|
+
100: new Var('neutral-100', colors_json_1.default.n100),
|
|
405
|
+
200: new Var('neutral-200', colors_json_1.default.n200),
|
|
406
|
+
250: new Var('neutral-250', colors_json_1.default.n250),
|
|
407
|
+
300: new Var('neutral-300', colors_json_1.default.n300),
|
|
408
|
+
400: new Var('neutral-400', colors_json_1.default.n400),
|
|
409
|
+
450: new Var('neutral-450', colors_json_1.default.n450),
|
|
410
|
+
500: new Var('neutral-500', colors_json_1.default.n500),
|
|
411
|
+
600: new Var('neutral-600', colors_json_1.default.n600),
|
|
412
|
+
700: new Var('neutral-700', colors_json_1.default.n700),
|
|
413
|
+
800: new Var('neutral-800', colors_json_1.default.n800),
|
|
414
|
+
900: new Var('neutral-900', colors_json_1.default.n900),
|
|
415
|
+
};
|
|
416
|
+
var blue = {
|
|
417
|
+
100: new Var('primary-100', colors_json_1.default.b100),
|
|
418
|
+
200: new Var('primary-200', colors_json_1.default.b200),
|
|
419
|
+
300: new Var('primary-300', colors_json_1.default.b300),
|
|
420
|
+
400: new Var('primary-400', colors_json_1.default.b400),
|
|
421
|
+
500: new Var('primary-500', colors_json_1.default.b500),
|
|
422
|
+
600: new Var('primary-600', colors_json_1.default.b600),
|
|
423
|
+
700: new Var('primary-700', colors_json_1.default.b700),
|
|
424
|
+
800: new Var('primary-800', colors_json_1.default.b800),
|
|
425
|
+
900: new Var('primary-900', colors_json_1.default.b900),
|
|
426
|
+
};
|
|
427
|
+
var green = {
|
|
428
|
+
100: new Var('success-100', colors_json_1.default.g100),
|
|
429
|
+
200: new Var('success-200', colors_json_1.default.g200),
|
|
430
|
+
300: new Var('success-300', colors_json_1.default.g300),
|
|
431
|
+
400: new Var('success-400', colors_json_1.default.g400),
|
|
432
|
+
500: new Var('success-500', colors_json_1.default.g500),
|
|
433
|
+
600: new Var('success-600', colors_json_1.default.g600),
|
|
434
|
+
700: new Var('success-700', colors_json_1.default.g700),
|
|
435
|
+
800: new Var('success-800', colors_json_1.default.g800),
|
|
436
|
+
900: new Var('success-900', colors_json_1.default.g900),
|
|
437
|
+
};
|
|
438
|
+
var yellow = {
|
|
439
|
+
100: new Var('warning-100', colors_json_1.default.y100),
|
|
440
|
+
200: new Var('warning-200', colors_json_1.default.y200),
|
|
441
|
+
300: new Var('warning-300', colors_json_1.default.y300),
|
|
442
|
+
400: new Var('warning-400', colors_json_1.default.y400),
|
|
443
|
+
500: new Var('warning-500', colors_json_1.default.y500),
|
|
444
|
+
600: new Var('warning-600', colors_json_1.default.y600),
|
|
445
|
+
700: new Var('warning-700', colors_json_1.default.y700),
|
|
446
|
+
800: new Var('warning-800', colors_json_1.default.y800),
|
|
447
|
+
900: new Var('warning-900', colors_json_1.default.y900),
|
|
448
|
+
};
|
|
449
|
+
var red = {
|
|
450
|
+
100: new Var('danger-100', colors_json_1.default.r100),
|
|
451
|
+
200: new Var('danger-200', colors_json_1.default.r200),
|
|
452
|
+
300: new Var('danger-300', colors_json_1.default.r300),
|
|
453
|
+
400: new Var('danger-400', colors_json_1.default.r400),
|
|
454
|
+
500: new Var('danger-500', colors_json_1.default.r500),
|
|
455
|
+
600: new Var('danger-600', colors_json_1.default.r600),
|
|
456
|
+
700: new Var('danger-700', colors_json_1.default.r700),
|
|
457
|
+
800: new Var('danger-800', colors_json_1.default.r800),
|
|
458
|
+
900: new Var('danger-900', colors_json_1.default.r900),
|
|
459
|
+
};
|
|
460
|
+
var orange = {
|
|
461
|
+
100: new Var('service-1-100', colors_json_1.default.o100),
|
|
462
|
+
200: new Var('service-1-200', colors_json_1.default.o200),
|
|
463
|
+
300: new Var('service-1-300', colors_json_1.default.o300),
|
|
464
|
+
400: new Var('service-1-400', colors_json_1.default.o400),
|
|
465
|
+
500: new Var('service-1-500', colors_json_1.default.o500),
|
|
466
|
+
600: new Var('service-1-600', colors_json_1.default.o600),
|
|
467
|
+
700: new Var('service-1-700', colors_json_1.default.o700),
|
|
468
|
+
800: new Var('service-1-800', colors_json_1.default.o800),
|
|
469
|
+
900: new Var('service-1-900', colors_json_1.default.o900),
|
|
470
|
+
};
|
|
471
|
+
var purple = {
|
|
472
|
+
100: new Var('service-2-100', colors_json_1.default.p100),
|
|
473
|
+
200: new Var('service-2-200', colors_json_1.default.p200),
|
|
474
|
+
300: new Var('service-2-300', colors_json_1.default.p300),
|
|
475
|
+
400: new Var('service-2-400', colors_json_1.default.p400),
|
|
476
|
+
500: new Var('service-2-500', colors_json_1.default.p500),
|
|
477
|
+
600: new Var('service-2-600', colors_json_1.default.p600),
|
|
478
|
+
700: new Var('service-2-700', colors_json_1.default.p700),
|
|
479
|
+
800: new Var('service-2-800', colors_json_1.default.p800),
|
|
480
|
+
900: new Var('service-2-900', colors_json_1.default.p900),
|
|
496
481
|
};
|
|
497
482
|
exports.surfaceColors = {
|
|
498
483
|
'surface-light': white.theme('surface-light'),
|
|
499
|
-
'surface-tint': exports.neutral.
|
|
484
|
+
'surface-tint': exports.neutral[100].theme('surface-tint'),
|
|
500
485
|
'surface-room': white.theme('surface-room'),
|
|
501
|
-
'surface-neutral': exports.neutral.
|
|
502
|
-
'surface-disabled': exports.neutral.
|
|
503
|
-
'surface-hover': exports.neutral.
|
|
504
|
-
'surface-selected': exports.neutral.
|
|
505
|
-
'surface-dark': exports.neutral.
|
|
506
|
-
'surface-featured':
|
|
507
|
-
'surface-featured-hover':
|
|
508
|
-
'surface-overlay': exports.neutral.
|
|
486
|
+
'surface-neutral': exports.neutral[400].theme('surface-neutral'),
|
|
487
|
+
'surface-disabled': exports.neutral[100].theme('surface-disabled'),
|
|
488
|
+
'surface-hover': exports.neutral[200].theme('surface-hover'),
|
|
489
|
+
'surface-selected': exports.neutral[450].theme('surface-selected'),
|
|
490
|
+
'surface-dark': exports.neutral[800].theme('surface-dark'),
|
|
491
|
+
'surface-featured': purple['700'].theme('surface-featured'),
|
|
492
|
+
'surface-featured-hover': purple['800'].theme('surface-featured-hover'),
|
|
493
|
+
'surface-overlay': exports.neutral[800].theme('surface-overlay'),
|
|
509
494
|
'surface-transparent': 'transparent',
|
|
495
|
+
'surface-sidebar': exports.neutral[400].theme('surface-sidebar'),
|
|
510
496
|
};
|
|
511
497
|
exports.strokeColors = {
|
|
512
|
-
'stroke-extra-light': exports.neutral.
|
|
513
|
-
'stroke-light': exports.neutral.
|
|
514
|
-
'stroke-medium': exports.neutral.
|
|
515
|
-
'stroke-dark': exports.neutral.
|
|
516
|
-
'stroke-extra-dark': exports.neutral.
|
|
517
|
-
'stroke-extra-light-highlight':
|
|
518
|
-
'stroke-highlight':
|
|
519
|
-
'stroke-extra-light-error':
|
|
520
|
-
'stroke-error':
|
|
498
|
+
'stroke-extra-light': exports.neutral[250].theme('stroke-extra-light'),
|
|
499
|
+
'stroke-light': exports.neutral[500].theme('stroke-light'),
|
|
500
|
+
'stroke-medium': exports.neutral[600].theme('stroke-medium'),
|
|
501
|
+
'stroke-dark': exports.neutral[700].theme('stroke-dark'),
|
|
502
|
+
'stroke-extra-dark': exports.neutral[800].theme('stroke-extra-dark'),
|
|
503
|
+
'stroke-extra-light-highlight': blue[200].theme('stroke-extra-light-highlight'),
|
|
504
|
+
'stroke-highlight': blue[500].theme('stroke-highlight'),
|
|
505
|
+
'stroke-extra-light-error': red[200].theme('stroke-extra-light-error'),
|
|
506
|
+
'stroke-error': red[500].theme('stroke-error'),
|
|
521
507
|
};
|
|
522
508
|
exports.textIconColors = {
|
|
523
509
|
'font-white': white.theme('font-white'),
|
|
524
|
-
'font-disabled': exports.neutral.
|
|
525
|
-
'font-annotation': exports.neutral.
|
|
526
|
-
'font-hint': exports.neutral.
|
|
527
|
-
'font-secondary-info': exports.neutral.
|
|
528
|
-
'font-default': exports.neutral.
|
|
529
|
-
'font-titles-labels': exports.neutral.
|
|
530
|
-
'font-info':
|
|
531
|
-
'font-danger':
|
|
532
|
-
'font-pure-black': exports.neutral.
|
|
510
|
+
'font-disabled': exports.neutral[500].theme('font-disabled'),
|
|
511
|
+
'font-annotation': exports.neutral[600].theme('font-annotation'),
|
|
512
|
+
'font-hint': exports.neutral[700].theme('font-hint'),
|
|
513
|
+
'font-secondary-info': exports.neutral[700].theme('font-secondary-info'),
|
|
514
|
+
'font-default': exports.neutral[800].theme('font-default'),
|
|
515
|
+
'font-titles-labels': exports.neutral[900].theme('font-titles-labels'),
|
|
516
|
+
'font-info': blue[600].theme('font-info'),
|
|
517
|
+
'font-danger': red[600].theme('font-danger'),
|
|
518
|
+
'font-pure-black': exports.neutral[800].theme('font-pure-black'),
|
|
533
519
|
'font-pure-white': white.theme('font-pure-white'),
|
|
534
520
|
};
|
|
535
521
|
exports.statusBackgroundColors = {
|
|
536
|
-
'status-background-info':
|
|
537
|
-
'status-background-success':
|
|
538
|
-
'status-background-danger':
|
|
539
|
-
'status-background-warning':
|
|
540
|
-
'status-background-warning-2':
|
|
541
|
-
'status-background-service-1':
|
|
542
|
-
'status-background-service-2':
|
|
522
|
+
'status-background-info': blue[200].theme('status-background-info'),
|
|
523
|
+
'status-background-success': green[200].theme('status-background-success'),
|
|
524
|
+
'status-background-danger': red[200].theme('status-background-danger'),
|
|
525
|
+
'status-background-warning': yellow[200].theme('status-background-warning'),
|
|
526
|
+
'status-background-warning-2': yellow[100].theme('status-background-warning-2'),
|
|
527
|
+
'status-background-service-1': orange[200].theme('status-background-service-1'),
|
|
528
|
+
'status-background-service-2': purple[200].theme('status-background-service-2'),
|
|
543
529
|
};
|
|
544
530
|
exports.statusColors = {
|
|
545
|
-
'status-font-on-info':
|
|
546
|
-
'status-font-on-success':
|
|
547
|
-
'status-font-on-warning':
|
|
548
|
-
'status-font-on-warning-2': exports.neutral.
|
|
549
|
-
'status-font-on-danger':
|
|
550
|
-
'status-font-on-service-1':
|
|
551
|
-
'status-font-on-service-2':
|
|
531
|
+
'status-font-on-info': blue[600].theme('status-font-on-info'),
|
|
532
|
+
'status-font-on-success': green[800].theme('status-font-on-success'),
|
|
533
|
+
'status-font-on-warning': yellow[800].theme('status-font-on-warning'),
|
|
534
|
+
'status-font-on-warning-2': exports.neutral[800].theme('status-font-on-warning-2'),
|
|
535
|
+
'status-font-on-danger': red[800].theme('status-font-on-danger'),
|
|
536
|
+
'status-font-on-service-1': orange[800].theme('status-font-on-service-1'),
|
|
537
|
+
'status-font-on-service-2': purple[600].theme('status-font-on-service-2'),
|
|
552
538
|
};
|
|
553
539
|
exports.badgeBackgroundColors = {
|
|
554
|
-
'badge-background-level-0': exports.neutral.
|
|
555
|
-
'badge-background-level-1': exports.neutral.
|
|
556
|
-
'badge-background-level-2':
|
|
557
|
-
'badge-background-level-3':
|
|
558
|
-
'badge-background-level-4':
|
|
540
|
+
'badge-background-level-0': exports.neutral[400].theme('badge-background-level-0'),
|
|
541
|
+
'badge-background-level-1': exports.neutral[600].theme('badge-background-level-1'),
|
|
542
|
+
'badge-background-level-2': blue[500].theme('badge-background-level-2'),
|
|
543
|
+
'badge-background-level-3': orange[500].theme('badge-background-level-3'),
|
|
544
|
+
'badge-background-level-4': red[500].theme('badge-background-level-4'),
|
|
559
545
|
};
|
|
560
546
|
exports.shadowColors = {
|
|
561
547
|
'shadow-elevation-border': exports.strokeColors['stroke-extra-light'].theme('shadow-elevation-border'),
|
|
562
548
|
'shadow-elevation-1': new Var('shadow-elevation-1', (0, getPaletteColor_1.getPaletteColor)('neutral', 800, 0.1)[1]),
|
|
563
549
|
'shadow-elevation-2x': new Var('shadow-elevation-2x', (0, getPaletteColor_1.getPaletteColor)('neutral', 800, 0.08)[1]),
|
|
564
550
|
'shadow-elevation-2y': new Var('shadow-elevation-2y', (0, getPaletteColor_1.getPaletteColor)('neutral', 800, 0.12)[1]),
|
|
565
|
-
'shadow-highlight':
|
|
566
|
-
'shadow-danger':
|
|
551
|
+
'shadow-highlight': blue[200].theme('shadow-highlight'),
|
|
552
|
+
'shadow-danger': red[100].theme('shadow-danger'),
|
|
567
553
|
};
|
|
568
554
|
var isSurfaceColor = function (color) {
|
|
569
555
|
return typeof color === 'string' && color in exports.surfaceColors;
|
|
@@ -11174,21 +11160,22 @@ var Chip_1 = __importDefault(__webpack_require__(/*! ../Chip */ "./src/component
|
|
|
11174
11160
|
var Flex_1 = __importDefault(__webpack_require__(/*! ../Flex */ "./src/components/Flex/index.ts"));
|
|
11175
11161
|
var Icon_1 = __webpack_require__(/*! ../Icon */ "./src/components/Icon/index.ts");
|
|
11176
11162
|
var Margins_1 = __importDefault(__webpack_require__(/*! ../Margins */ "./src/components/Margins/index.ts"));
|
|
11163
|
+
var Option_1 = __importDefault(__webpack_require__(/*! ../Option */ "./src/components/Option/index.tsx"));
|
|
11177
11164
|
var useVisible_1 = __webpack_require__(/*! ../Options/useVisible */ "./src/components/Options/useVisible.ts");
|
|
11178
11165
|
var OptionsPaginated_1 = __webpack_require__(/*! ../OptionsPaginated */ "./src/components/OptionsPaginated/index.ts");
|
|
11179
11166
|
var Position_1 = __importDefault(__webpack_require__(/*! ../Position */ "./src/components/Position/index.ts"));
|
|
11180
11167
|
var SelectAddon_1 = __importDefault(__webpack_require__(/*! ../Select/SelectAddon */ "./src/components/Select/SelectAddon.tsx"));
|
|
11181
11168
|
var SelectFocus_1 = __importDefault(__webpack_require__(/*! ../Select/SelectFocus */ "./src/components/Select/SelectFocus.tsx"));
|
|
11182
11169
|
var PaginatedMultiSelect = function (_a) {
|
|
11183
|
-
var withTitle = _a.withTitle, value = _a.value, filter = _a.filter, _b = _a.options, options = _b === void 0 ? [] : _b, error = _a.error, disabled = _a.disabled, _c = _a.anchor, Anchor = _c === void 0 ? SelectFocus_1.default : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, placeholder = _a.placeholder, _e = _a.renderOptions, OptionsComponent = _e === void 0 ? OptionsPaginated_1.OptionsPaginated : _e, endReached = _a.endReached, props = __rest(_a, ["withTitle", "value", "filter", "options", "error", "disabled", "anchor", "onChange", "placeholder", "renderOptions", "endReached"]);
|
|
11184
|
-
var
|
|
11170
|
+
var withTitle = _a.withTitle, value = _a.value, filter = _a.filter, _b = _a.options, options = _b === void 0 ? [] : _b, error = _a.error, disabled = _a.disabled, _c = _a.anchor, Anchor = _c === void 0 ? SelectFocus_1.default : _c, _d = _a.onChange, onChange = _d === void 0 ? function () { } : _d, placeholder = _a.placeholder, _e = _a.renderOptions, OptionsComponent = _e === void 0 ? OptionsPaginated_1.OptionsPaginated : _e, _f = _a.renderItem, renderItem = _f === void 0 ? Option_1.default : _f, endReached = _a.endReached, props = __rest(_a, ["withTitle", "value", "filter", "options", "error", "disabled", "anchor", "onChange", "placeholder", "renderOptions", "renderItem", "endReached"]);
|
|
11171
|
+
var _g = __read((0, react_1.useState)(value || []), 2), internalValue = _g[0], setInternalValue = _g[1];
|
|
11185
11172
|
var currentValue = value !== undefined ? value : internalValue;
|
|
11186
11173
|
var selectedOptions = options.filter(function (option) {
|
|
11187
11174
|
return currentValue.some(function (opt) { return opt.value === option.value; });
|
|
11188
11175
|
});
|
|
11189
|
-
var
|
|
11176
|
+
var _h = __read((0, useVisible_1.useVisible)(), 3), visible = _h[0], hide = _h[1], show = _h[2];
|
|
11190
11177
|
var ref = (0, react_1.useRef)(null);
|
|
11191
|
-
var
|
|
11178
|
+
var _j = (0, fuselage_hooks_1.useResizeObserver)(), containerRef = _j.ref, borderBoxSize = _j.borderBoxSize;
|
|
11192
11179
|
var handleClick = (0, fuselage_hooks_1.useMutableCallback)(function () {
|
|
11193
11180
|
if (visible === AnimatedVisibility_1.default.VISIBLE) {
|
|
11194
11181
|
return hide();
|
|
@@ -11241,7 +11228,7 @@ var PaginatedMultiSelect = function (_a) {
|
|
|
11241
11228
|
: 'chevron-down', size: 'x20' }) }))),
|
|
11242
11229
|
react_1.default.createElement(AnimatedVisibility_1.default, { visibility: visible },
|
|
11243
11230
|
react_1.default.createElement(Position_1.default, { anchor: containerRef },
|
|
11244
|
-
react_1.default.createElement(OptionsComponent, { width: borderBoxSize.inlineSize, onMouseDown: prevent_1.prevent, multiple: true, filter: filter, role: 'listbox', options: options, cursor: -1, endReached: endReached, onSelect: function (_a) {
|
|
11231
|
+
react_1.default.createElement(OptionsComponent, { width: borderBoxSize.inlineSize, onMouseDown: prevent_1.prevent, multiple: true, filter: filter, role: 'listbox', options: options, cursor: -1, endReached: endReached, renderItem: renderItem, onSelect: function (_a) {
|
|
11245
11232
|
var _b = __read(_a, 1), value = _b[0];
|
|
11246
11233
|
toggleOption(value);
|
|
11247
11234
|
} })))));
|
|
@@ -16666,11 +16653,12 @@ var isPaletteColorRef = function (ref) {
|
|
|
16666
16653
|
};
|
|
16667
16654
|
var mapTypeToPrefix = {
|
|
16668
16655
|
neutral: 'n',
|
|
16669
|
-
|
|
16670
|
-
|
|
16671
|
-
|
|
16672
|
-
|
|
16673
|
-
|
|
16656
|
+
blue: 'b',
|
|
16657
|
+
green: 'g',
|
|
16658
|
+
yellow: 'y',
|
|
16659
|
+
red: 'r',
|
|
16660
|
+
orange: 'o',
|
|
16661
|
+
purple: 'p',
|
|
16674
16662
|
};
|
|
16675
16663
|
var getPaletteColor = function (type, grade, alpha) {
|
|
16676
16664
|
var ref = "".concat(mapTypeToPrefix[type]).concat(grade);
|
|
@@ -17251,7 +17239,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17251
17239
|
};
|
|
17252
17240
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
17253
17241
|
exports.fontScale = exports.fontFamily = exports.padding = exports.margin = exports.inset = exports.size = exports.color = exports.fontColor = exports.backgroundColor = exports.strokeColor = exports.borderRadius = exports.borderWidth = void 0;
|
|
17254
|
-
var colors_json_1 = __importDefault(__webpack_require__(/*! @rocket.chat/fuselage-tokens/colors.json */ "../fuselage-tokens/colors.json"));
|
|
17255
17242
|
var typography_json_1 = __importDefault(__webpack_require__(/*! @rocket.chat/fuselage-tokens/typography.json */ "../fuselage-tokens/typography.json"));
|
|
17256
17243
|
var memo_1 = __webpack_require__(/*! @rocket.chat/memo */ "@rocket.chat/memo");
|
|
17257
17244
|
var invariant_1 = __importDefault(__webpack_require__(/*! invariant */ "../../node_modules/invariant/browser.js"));
|
|
@@ -17299,11 +17286,12 @@ exports.borderRadius = measure(function (value) {
|
|
|
17299
17286
|
});
|
|
17300
17287
|
var mapTypeToPrefix = {
|
|
17301
17288
|
neutral: 'n',
|
|
17302
|
-
|
|
17303
|
-
|
|
17304
|
-
|
|
17305
|
-
|
|
17306
|
-
|
|
17289
|
+
blue: 'b',
|
|
17290
|
+
green: 'g',
|
|
17291
|
+
yellow: 'y',
|
|
17292
|
+
red: 'r',
|
|
17293
|
+
orange: 'o',
|
|
17294
|
+
purple: 'p',
|
|
17307
17295
|
};
|
|
17308
17296
|
var isPaletteColorType = function (type) {
|
|
17309
17297
|
return typeof type === 'string' && type in mapTypeToPrefix;
|
|
@@ -17318,29 +17306,7 @@ var isPaletteColorAlpha = function (alpha) {
|
|
|
17318
17306
|
return alpha === undefined ||
|
|
17319
17307
|
(typeof alpha === 'number' && alpha >= 0 && alpha <= 1);
|
|
17320
17308
|
};
|
|
17321
|
-
var
|
|
17322
|
-
'default': colors_json_1.default.n800,
|
|
17323
|
-
'info': colors_json_1.default.n700,
|
|
17324
|
-
'hint': colors_json_1.default.n600,
|
|
17325
|
-
'disabled': colors_json_1.default.n400,
|
|
17326
|
-
'alternative': 'white',
|
|
17327
|
-
'primary': colors_json_1.default.p500,
|
|
17328
|
-
'success': colors_json_1.default.s500,
|
|
17329
|
-
'danger': colors_json_1.default.d500,
|
|
17330
|
-
'warning': colors_json_1.default.w700,
|
|
17331
|
-
'link': colors_json_1.default.p500,
|
|
17332
|
-
'visited-link': colors_json_1.default['s2-500'],
|
|
17333
|
-
'active-link': colors_json_1.default.d500,
|
|
17334
|
-
};
|
|
17335
|
-
var isForegroundColorRef = function (ref) {
|
|
17336
|
-
return typeof ref === 'string' && ref in foregroundColors;
|
|
17337
|
-
};
|
|
17338
|
-
var getForegroundColor = function (type) {
|
|
17339
|
-
(0, invariant_1.default)(isForegroundColorRef(type), 'invalid foreground color');
|
|
17340
|
-
var color = foregroundColors[type];
|
|
17341
|
-
return ["--rcx-color-foreground-".concat(type), color];
|
|
17342
|
-
};
|
|
17343
|
-
var paletteColorRegex = /^(neutral|primary|info|success|warning|danger)-(\d+)(-(\d+))?$/;
|
|
17309
|
+
var paletteColorRegex = /^(neutral|blue|green|yellow|red|orange|purple)-(\d+)(-(\d+))?$/;
|
|
17344
17310
|
exports.strokeColor = (0, memo_1.memoize)(function (value) {
|
|
17345
17311
|
var colorName = "stroke-".concat(value);
|
|
17346
17312
|
if ((0, Theme_1.isStrokeColor)(colorName)) {
|
|
@@ -17407,35 +17373,28 @@ exports.color = (0, memo_1.memoize)(function (value) {
|
|
|
17407
17373
|
return Theme_1.surfaceColors['surface-light'].toString();
|
|
17408
17374
|
}
|
|
17409
17375
|
if (value === 'surface-tint') {
|
|
17410
|
-
return (0, toCSSValue_1.toCSSColorValue)(value, Theme_1.neutral
|
|
17376
|
+
return (0, toCSSValue_1.toCSSColorValue)(value, Theme_1.neutral[100]);
|
|
17411
17377
|
}
|
|
17412
17378
|
if (value === 'secondary-info') {
|
|
17413
|
-
return (0, toCSSValue_1.toCSSColorValue)(value, Theme_1.neutral
|
|
17379
|
+
return (0, toCSSValue_1.toCSSColorValue)(value, Theme_1.neutral[700]);
|
|
17414
17380
|
}
|
|
17415
17381
|
if (value === 'surface-neutral') {
|
|
17416
|
-
return (0, toCSSValue_1.toCSSColorValue)(value, Theme_1.neutral
|
|
17417
|
-
}
|
|
17418
|
-
if (isForegroundColorRef(value)) {
|
|
17419
|
-
var _a = __read(getForegroundColor(value), 2), customProperty = _a[0], color_1 = _a[1];
|
|
17420
|
-
if (customProperty) {
|
|
17421
|
-
return (0, toCSSValue_1.toCSSValue)(customProperty, color_1);
|
|
17422
|
-
}
|
|
17423
|
-
return color_1;
|
|
17382
|
+
return (0, toCSSValue_1.toCSSColorValue)(value, Theme_1.neutral[400]);
|
|
17424
17383
|
}
|
|
17425
17384
|
var paletteMatches = paletteColorRegex.exec(String(value));
|
|
17426
17385
|
if (typeof (paletteMatches === null || paletteMatches === void 0 ? void 0 : paletteMatches.length) === 'number' &&
|
|
17427
17386
|
(paletteMatches === null || paletteMatches === void 0 ? void 0 : paletteMatches.length) >= 5) {
|
|
17428
|
-
var
|
|
17387
|
+
var _a = __read(paletteMatches, 5), type = _a[1], gradeString = _a[2], alphaString = _a[4];
|
|
17429
17388
|
var grade = parseInt(gradeString, 10);
|
|
17430
17389
|
var alpha = alphaString !== undefined ? parseInt(alphaString, 10) / 100 : undefined;
|
|
17431
17390
|
(0, invariant_1.default)(isPaletteColorType(type), 'invalid color type');
|
|
17432
17391
|
(0, invariant_1.default)(isPaletteColorGrade(grade), 'invalid color grade');
|
|
17433
17392
|
(0, invariant_1.default)(isPaletteColorAlpha(alpha), 'invalid color alpha');
|
|
17434
|
-
var
|
|
17393
|
+
var _b = __read((0, getPaletteColor_1.getPaletteColor)(type, grade, alpha), 2), customProperty = _b[0], color_1 = _b[1];
|
|
17435
17394
|
if (customProperty) {
|
|
17436
|
-
return (0, toCSSValue_1.toCSSValue)(customProperty,
|
|
17395
|
+
return (0, toCSSValue_1.toCSSValue)(customProperty, color_1);
|
|
17437
17396
|
}
|
|
17438
|
-
return
|
|
17397
|
+
return color_1;
|
|
17439
17398
|
}
|
|
17440
17399
|
return value;
|
|
17441
17400
|
});
|
|
@@ -17609,7 +17568,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
|
17609
17568
|
\**************************************/
|
|
17610
17569
|
/***/ (function(module) {
|
|
17611
17570
|
|
|
17612
|
-
module.exports = JSON.parse('{"
|
|
17571
|
+
module.exports = JSON.parse('{"white":"#FFFFFF","n100":"#F7F8FA","n200":"#F2F3F5","n250":"#EBECEF","n300":"#EEEFF1","n400":"#E4E7EA","n450":"#D7DBE0","n500":"#CBCED1","n600":"#9EA2A8","n700":"#6C737A","n800":"#2F343D","n900":"#1F2329","r100":"#FFE9EC","r200":"#FFC1C9","r300":"#F98F9D","r400":"#F5455C","r500":"#EC0D2A","r600":"#D40C26","r700":"#BB0B21","r800":"#9B1325","r900":"#8B0719","r1000":"#6B0513","o100":"#FDE8D7","o200":"#FAD1B0","o300":"#F7B27B","o400":"#F59B53","o500":"#F38C39","o600":"#E26D0E","o700":"#BD5A0B","o800":"#974809","o900":"#713607","o1000":"#5B2C06","p100":"#F9EFFC","p200":"#EDD0F7","p300":"#DCA0EF","p400":"#CA71E7","p500":"#9F22C7","p600":"#7F1B9F","p700":"#5F1477","p800":"#4A105D","p900":"#350B42","y100":"#FFF8E0","y200":"#FFECAD","y300":"#FFE383","y400":"#FFD95A","y500":"#FFD031","y600":"#F3BE08","y700":"#DFAC00","y800":"#AC892F","y900":"#8E6300","y1000":"#573D00","g100":"#E5FBF4","g200":"#C0F6E4","g300":"#96F0D2","g400":"#6CE9C0","g500":"#2DE0A5","g600":"#1ECB92","g700":"#19AC7C","g800":"#148660","g900":"#106D4F","g1000":"#0D5940","b100":"#E8F2FF","b200":"#D1EBFE","b300":"#76B7FC","b400":"#549DF9","b500":"#156FF5","b600":"#095AD2","b700":"#10529E","b800":"#01336B","b900":"#012247"}');
|
|
17613
17572
|
|
|
17614
17573
|
/***/ }),
|
|
17615
17574
|
|