@liner-fe/prism 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.css +239 -109
- package/lib/index.d.ts +87 -33
- package/lib/index.js +1150 -404
- package/package.json +4 -5
package/lib/index.css
CHANGED
|
@@ -463,134 +463,99 @@
|
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
/* esbuild-sass-plugin:css-chunk:src/components/Toast/style.module.scss */
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.25);
|
|
474
|
-
box-sizing: border-box;
|
|
475
|
-
min-width: 350px;
|
|
476
|
-
min-height: 70px;
|
|
477
|
-
width: fit-content;
|
|
478
|
-
max-width: 400px;
|
|
466
|
+
@keyframes _hide_5dhgy_1 {
|
|
467
|
+
from {
|
|
468
|
+
opacity: 1;
|
|
469
|
+
}
|
|
470
|
+
to {
|
|
471
|
+
opacity: 0;
|
|
472
|
+
}
|
|
479
473
|
}
|
|
480
|
-
@
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
474
|
+
@keyframes _slideIn_5dhgy_1 {
|
|
475
|
+
from {
|
|
476
|
+
transform: translateY(-100%);
|
|
477
|
+
}
|
|
478
|
+
to {
|
|
479
|
+
transform: translateY(0);
|
|
485
480
|
}
|
|
486
481
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
482
|
+
@keyframes _swipeOut_5dhgy_1 {
|
|
483
|
+
from {
|
|
484
|
+
transform: translateY(0);
|
|
485
|
+
}
|
|
486
|
+
to {
|
|
487
|
+
transform: translateY(-100%);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
._Icon_5dhgy_25 {
|
|
492
491
|
width: fit-content;
|
|
493
492
|
height: 24px;
|
|
494
493
|
}
|
|
495
|
-
|
|
494
|
+
@media (max-width: 360px) {
|
|
495
|
+
._TitleText_5dhgy_31 {
|
|
496
|
+
max-width: 227px;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
._ToastViewport_5dhgy_36 {
|
|
500
|
+
position: fixed;
|
|
501
|
+
top: 29px;
|
|
502
|
+
left: 50%;
|
|
503
|
+
right: 0;
|
|
504
|
+
transform: translateX(-50%);
|
|
496
505
|
display: flex;
|
|
497
506
|
flex-direction: column;
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
min-width: 0;
|
|
501
|
-
}
|
|
502
|
-
._Content_1el8w_32 p {
|
|
507
|
+
align-items: center;
|
|
508
|
+
gap: 8px;
|
|
503
509
|
margin: 0;
|
|
504
|
-
|
|
510
|
+
list-style: none;
|
|
511
|
+
z-index: 2147483647;
|
|
512
|
+
outline: none;
|
|
513
|
+
padding-left: 0;
|
|
514
|
+
max-width: 400px;
|
|
515
|
+
width: fit-content;
|
|
516
|
+
}
|
|
517
|
+
@media (max-width: 600px) {
|
|
518
|
+
._ToastViewport_5dhgy_36 {
|
|
519
|
+
width: calc(100vw - 40px);
|
|
520
|
+
}
|
|
505
521
|
}
|
|
506
|
-
.
|
|
522
|
+
._ToastRoot_5dhgy_60 {
|
|
523
|
+
background-color: var(--inverse-container-static-high);
|
|
524
|
+
border-radius: 8px;
|
|
525
|
+
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.2509803922);
|
|
526
|
+
padding: 16px;
|
|
507
527
|
display: flex;
|
|
508
528
|
align-items: center;
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
}
|
|
512
|
-
._Spinner_1el8w_51 {
|
|
513
|
-
display: inline-block;
|
|
514
|
-
position: relative;
|
|
515
|
-
width: 24px;
|
|
516
|
-
height: 24px;
|
|
517
|
-
color: var(--inverse-label-static-primary);
|
|
518
|
-
}
|
|
519
|
-
._Spinner_1el8w_51 div {
|
|
520
|
-
transform-origin: 12px 12px;
|
|
521
|
-
animation: _lds-spinner_1el8w_1 1.2s linear infinite;
|
|
522
|
-
}
|
|
523
|
-
._Spinner_1el8w_51 div::after {
|
|
524
|
-
content: "";
|
|
525
|
-
display: block;
|
|
526
|
-
position: absolute;
|
|
527
|
-
top: 1px;
|
|
528
|
-
left: 11px;
|
|
529
|
-
width: 2px;
|
|
530
|
-
height: 5.5px;
|
|
531
|
-
border-radius: 20%;
|
|
532
|
-
background: currentColor;
|
|
533
|
-
}
|
|
534
|
-
._Spinner_1el8w_51 div:nth-child(1) {
|
|
535
|
-
transform: rotate(0deg);
|
|
536
|
-
animation-delay: -1.2s;
|
|
537
|
-
}
|
|
538
|
-
._Spinner_1el8w_51 div:nth-child(2) {
|
|
539
|
-
transform: rotate(30deg);
|
|
540
|
-
animation-delay: -1.1s;
|
|
541
|
-
}
|
|
542
|
-
._Spinner_1el8w_51 div:nth-child(3) {
|
|
543
|
-
transform: rotate(60deg);
|
|
544
|
-
animation-delay: -1s;
|
|
545
|
-
}
|
|
546
|
-
._Spinner_1el8w_51 div:nth-child(4) {
|
|
547
|
-
transform: rotate(90deg);
|
|
548
|
-
animation-delay: -0.9s;
|
|
549
|
-
}
|
|
550
|
-
._Spinner_1el8w_51 div:nth-child(5) {
|
|
551
|
-
transform: rotate(120deg);
|
|
552
|
-
animation-delay: -0.8s;
|
|
553
|
-
}
|
|
554
|
-
._Spinner_1el8w_51 div:nth-child(6) {
|
|
555
|
-
transform: rotate(150deg);
|
|
556
|
-
animation-delay: -0.7s;
|
|
529
|
+
width: fit-content;
|
|
530
|
+
gap: 6px;
|
|
557
531
|
}
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
532
|
+
@media (max-width: 600px) {
|
|
533
|
+
._ToastRoot_5dhgy_60 {
|
|
534
|
+
width: 100%;
|
|
535
|
+
}
|
|
561
536
|
}
|
|
562
|
-
.
|
|
563
|
-
|
|
564
|
-
|
|
537
|
+
._ToastTitle_5dhgy_76 {
|
|
538
|
+
display: flex;
|
|
539
|
+
align-items: center;
|
|
540
|
+
justify-content: space-between;
|
|
541
|
+
width: 100%;
|
|
542
|
+
gap: var(--lp-sys-gap-positive-300);
|
|
565
543
|
}
|
|
566
|
-
.
|
|
567
|
-
|
|
568
|
-
animation-delay: -0.4s;
|
|
544
|
+
._ToastRoot_5dhgy_60[data-state=open] {
|
|
545
|
+
animation: _slideIn_5dhgy_1 0.5s cubic-bezier(0.16, 1, 0.3, 1);
|
|
569
546
|
}
|
|
570
|
-
.
|
|
571
|
-
|
|
572
|
-
animation-delay: -0.3s;
|
|
547
|
+
._ToastRoot_5dhgy_60[data-state=closed] {
|
|
548
|
+
animation: _hide_5dhgy_1 300ms ease-in;
|
|
573
549
|
}
|
|
574
|
-
.
|
|
575
|
-
transform:
|
|
576
|
-
animation-delay: -0.2s;
|
|
550
|
+
._ToastRoot_5dhgy_60[data-swipe=move] {
|
|
551
|
+
transform: translateY(var(--radix-toast-swipe-move-y));
|
|
577
552
|
}
|
|
578
|
-
.
|
|
579
|
-
transform:
|
|
580
|
-
|
|
553
|
+
._ToastRoot_5dhgy_60[data-swipe=cancel] {
|
|
554
|
+
transform: translateX(0);
|
|
555
|
+
transition: transform 200ms ease-out;
|
|
581
556
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
opacity: 1;
|
|
585
|
-
}
|
|
586
|
-
100% {
|
|
587
|
-
opacity: 0;
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
@media (prefers-reduced-motion: reduce) {
|
|
591
|
-
._Spinner_1el8w_51 div {
|
|
592
|
-
animation: none;
|
|
593
|
-
}
|
|
557
|
+
._ToastRoot_5dhgy_60[data-swipe=end] {
|
|
558
|
+
animation: _swipeOut_5dhgy_1 100ms ease-out;
|
|
594
559
|
}
|
|
595
560
|
|
|
596
561
|
/* esbuild-sass-plugin:css-chunk:src/components/Typography/Set/style.module.scss */
|
|
@@ -1517,6 +1482,159 @@
|
|
|
1517
1482
|
margin-left: var(--lp-sys-padding-component-150);
|
|
1518
1483
|
}
|
|
1519
1484
|
|
|
1485
|
+
/* esbuild-sass-plugin:css-chunk:src/components/Snackbar/style.module.scss */
|
|
1486
|
+
._Viewport_1q9l5_1 {
|
|
1487
|
+
--viewport-padding: 25px;
|
|
1488
|
+
position: fixed;
|
|
1489
|
+
bottom: 0;
|
|
1490
|
+
display: flex;
|
|
1491
|
+
flex-direction: column;
|
|
1492
|
+
padding: var(--viewport-padding);
|
|
1493
|
+
gap: 10px;
|
|
1494
|
+
max-width: 400px;
|
|
1495
|
+
margin: 0;
|
|
1496
|
+
list-style: none;
|
|
1497
|
+
z-index: 2147483647;
|
|
1498
|
+
outline: none;
|
|
1499
|
+
}
|
|
1500
|
+
@media (max-width: 500px) {
|
|
1501
|
+
._Viewport_1q9l5_1 {
|
|
1502
|
+
max-width: calc(100vw - 50px);
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
._ViewportRight_1q9l5_21 {
|
|
1506
|
+
right: var(--right-distance, 0px);
|
|
1507
|
+
}
|
|
1508
|
+
._ViewportLeft_1q9l5_25 {
|
|
1509
|
+
left: var(--left-distance, 0px);
|
|
1510
|
+
}
|
|
1511
|
+
._extendedContainer_1q9l5_29 {
|
|
1512
|
+
min-width: 320px;
|
|
1513
|
+
}
|
|
1514
|
+
._NavigationWrapper_1q9l5_33 {
|
|
1515
|
+
display: flex;
|
|
1516
|
+
align-items: center;
|
|
1517
|
+
justify-content: space-between;
|
|
1518
|
+
cursor: pointer;
|
|
1519
|
+
}
|
|
1520
|
+
._Wrapper_1q9l5_40 {
|
|
1521
|
+
display: flex;
|
|
1522
|
+
align-items: center;
|
|
1523
|
+
justify-content: space-between;
|
|
1524
|
+
}
|
|
1525
|
+
._Root_1q9l5_46 {
|
|
1526
|
+
padding: var(--lp-sys-padding-component-400);
|
|
1527
|
+
border-radius: var(--lp-sys-radius-m);
|
|
1528
|
+
background: var(--inverse-container-static-high);
|
|
1529
|
+
position: relative;
|
|
1530
|
+
}
|
|
1531
|
+
._Root_1q9l5_46:hover ._CloseButton_1q9l5_52 {
|
|
1532
|
+
display: flex !important;
|
|
1533
|
+
}
|
|
1534
|
+
._CloseButton_1q9l5_52 {
|
|
1535
|
+
position: absolute;
|
|
1536
|
+
top: -8px;
|
|
1537
|
+
right: -8px;
|
|
1538
|
+
display: none !important;
|
|
1539
|
+
}
|
|
1540
|
+
._Content_1q9l5_63 {
|
|
1541
|
+
display: flex;
|
|
1542
|
+
flex-direction: column;
|
|
1543
|
+
gap: var(--lp-sys-gap-positive-100);
|
|
1544
|
+
}
|
|
1545
|
+
._MarginRight12_1q9l5_69 {
|
|
1546
|
+
margin-right: var(--lp-pri-size-12);
|
|
1547
|
+
}
|
|
1548
|
+
._ContentWrapper_1q9l5_73 {
|
|
1549
|
+
display: flex;
|
|
1550
|
+
align-items: center;
|
|
1551
|
+
gap: var(--lp-sys-gap-positive-200);
|
|
1552
|
+
}
|
|
1553
|
+
._gap300_1q9l5_79 {
|
|
1554
|
+
display: flex;
|
|
1555
|
+
flex-direction: column;
|
|
1556
|
+
gap: var(--lp-sys-gap-positive-300);
|
|
1557
|
+
}
|
|
1558
|
+
._minWidth32_1q9l5_85 {
|
|
1559
|
+
min-width: 32px;
|
|
1560
|
+
min-height: 32px;
|
|
1561
|
+
}
|
|
1562
|
+
._minWidth24_1q9l5_90 {
|
|
1563
|
+
min-width: 24px;
|
|
1564
|
+
min-height: 24px;
|
|
1565
|
+
}
|
|
1566
|
+
._JustifyEnd_1q9l5_95 {
|
|
1567
|
+
justify-content: end;
|
|
1568
|
+
}
|
|
1569
|
+
._Root_1q9l5_46[data-state=open] {
|
|
1570
|
+
animation: _slideIn_1q9l5_1 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
1571
|
+
}
|
|
1572
|
+
._Root_1q9l5_46[data-state=closed] {
|
|
1573
|
+
animation: _hide_1q9l5_1 100ms ease-in;
|
|
1574
|
+
}
|
|
1575
|
+
._Root_1q9l5_46[data-swipe=move] {
|
|
1576
|
+
transform: translateX(var(--radix-toast-swipe-move-x));
|
|
1577
|
+
}
|
|
1578
|
+
._Root_1q9l5_46[data-swipe=cancel] {
|
|
1579
|
+
transform: translateX(0);
|
|
1580
|
+
transition: transform 200ms ease-out;
|
|
1581
|
+
}
|
|
1582
|
+
._Root_1q9l5_46[data-swipe=end] {
|
|
1583
|
+
animation: _swipeOut_1q9l5_1 100ms ease-out;
|
|
1584
|
+
}
|
|
1585
|
+
._ViewportLeft_1q9l5_25 ._Root_1q9l5_46[data-state=open] {
|
|
1586
|
+
animation: _slideInLeft_1q9l5_1 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
1587
|
+
}
|
|
1588
|
+
._ViewportLeft_1q9l5_25 ._Root_1q9l5_46[data-swipe=end] {
|
|
1589
|
+
animation: _swipeOutLeft_1q9l5_1 100ms ease-out;
|
|
1590
|
+
}
|
|
1591
|
+
@keyframes _hide_1q9l5_1 {
|
|
1592
|
+
from {
|
|
1593
|
+
opacity: 1;
|
|
1594
|
+
}
|
|
1595
|
+
to {
|
|
1596
|
+
opacity: 0;
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
@keyframes _slideIn_1q9l5_1 {
|
|
1600
|
+
from {
|
|
1601
|
+
transform: translateX(calc(100% + var(--viewport-padding)));
|
|
1602
|
+
}
|
|
1603
|
+
to {
|
|
1604
|
+
transform: translateX(0);
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
@keyframes _slideInLeft_1q9l5_1 {
|
|
1608
|
+
from {
|
|
1609
|
+
transform: translateX(calc(-100% - var(--viewport-padding)));
|
|
1610
|
+
}
|
|
1611
|
+
to {
|
|
1612
|
+
transform: translateX(0);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
@keyframes _swipeOut_1q9l5_1 {
|
|
1616
|
+
from {
|
|
1617
|
+
transform: translateX(var(--radix-toast-swipe-end-x));
|
|
1618
|
+
}
|
|
1619
|
+
to {
|
|
1620
|
+
transform: translateX(calc(100% + var(--viewport-padding)));
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
@keyframes _swipeOutLeft_1q9l5_1 {
|
|
1624
|
+
from {
|
|
1625
|
+
transform: translateX(var(--radix-toast-swipe-end-x));
|
|
1626
|
+
}
|
|
1627
|
+
to {
|
|
1628
|
+
transform: translateX(calc(-100% - var(--viewport-padding)));
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
/* esbuild-sass-plugin:css-chunk:src/components/Snackbar/SnackbarIcon/style.module.scss */
|
|
1633
|
+
._container_1jxdi_1 {
|
|
1634
|
+
margin-right: 6px;
|
|
1635
|
+
flex-shrink: 0;
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1520
1638
|
/* esbuild-sass-plugin:css-chunk:src/components/TextButton/style.module.scss */
|
|
1521
1639
|
._button_zsyf9_1 {
|
|
1522
1640
|
position: relative;
|
|
@@ -1576,6 +1694,18 @@
|
|
|
1576
1694
|
justify-content: center;
|
|
1577
1695
|
}
|
|
1578
1696
|
|
|
1697
|
+
/* esbuild-sass-plugin:css-chunk:src/components/Snackbar/SnackbarButton/style.module.scss */
|
|
1698
|
+
._Container_4sip5_1 {
|
|
1699
|
+
display: flex;
|
|
1700
|
+
align-items: center;
|
|
1701
|
+
gap: var(--lp-sys-gap-positive-400);
|
|
1702
|
+
padding: 0 4px;
|
|
1703
|
+
flex-shrink: 0;
|
|
1704
|
+
}
|
|
1705
|
+
._button_4sip5_9 p {
|
|
1706
|
+
margin: 0;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1579
1709
|
/* esbuild-sass-plugin:css-chunk:src/components/coach-mark/primitive/style.module.scss */
|
|
1580
1710
|
._anchor_1d9jc_1 {
|
|
1581
1711
|
transform: rotate(270deg) translateX(7px);
|
package/lib/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { SystemKeys, TypographyCaptionPrefix, TypographyParagraphPrefix, TypographyHeadingPrefix, TypographyTitlePrefix, TypographyDisplayPrefix, BasicColorType } from '@liner-fe/design-token-primitive';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default, { ButtonHTMLAttributes, HTMLAttributes, JSX, ReactNode, ComponentPropsWithoutRef, InputHTMLAttributes, ComponentProps, LiHTMLAttributes, MouseEventHandler } from 'react';
|
|
3
|
+
import react__default, { ButtonHTMLAttributes, RefAttributes, HTMLAttributes, JSX, ReactNode, ComponentPropsWithoutRef, InputHTMLAttributes, ComponentProps, LiHTMLAttributes, MouseEventHandler } from 'react';
|
|
4
4
|
import * as cva from 'cva';
|
|
5
5
|
import { VariantProps } from 'cva';
|
|
6
6
|
import { IconProps, IconComponentType } from '@liner-fe/icon';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
+
import { Toast, Popover as Popover$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, RadioGroup, Select as Select$1, Label as Label$1 } from 'radix-ui';
|
|
8
9
|
import * as _artsy_fresnel_dist_Media from '@artsy/fresnel/dist/Media';
|
|
9
10
|
import { breakpointOrigin } from '@liner-fe/design-token';
|
|
10
|
-
import
|
|
11
|
+
import * as jotai from 'jotai';
|
|
11
12
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
12
13
|
import { PopoverProps, PopoverPortalProps } from '@radix-ui/react-popover';
|
|
13
14
|
import { IllustProps } from '@liner-fe/illust';
|
|
@@ -54,38 +55,40 @@ type ButtonProps = DefaultButtonProps;
|
|
|
54
55
|
declare const DefaultButton: react.ForwardRefExoticComponent<DefaultButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
55
56
|
declare const Button: react.ForwardRefExoticComponent<DefaultButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
type
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
};
|
|
80
|
-
declare const toast: ((title: string, options?: ToastOptions) => string | number) & {
|
|
81
|
-
success: (title: string, options?: ToastOptions) => string | number;
|
|
82
|
-
error: (title: string, options?: ToastOptions) => string | number;
|
|
83
|
-
caution: (title: string, options?: ToastOptions) => string | number;
|
|
84
|
-
promise: <T>(promise: Promise<T>, options: PromiseToastOptions<T>) => string | number;
|
|
85
|
-
dismiss: (id?: number | string) => string | number;
|
|
86
|
-
};
|
|
58
|
+
type ToastProps$1 = Toast.ToastProps;
|
|
59
|
+
|
|
60
|
+
interface IToastBase extends ToastProps$1, RefAttributes<HTMLLIElement> {
|
|
61
|
+
toastId: number;
|
|
62
|
+
message: string;
|
|
63
|
+
timer: number;
|
|
64
|
+
isLoading?: boolean;
|
|
65
|
+
}
|
|
66
|
+
interface IToastIcon {
|
|
67
|
+
icon: {
|
|
68
|
+
icon: IconComponentType;
|
|
69
|
+
} & Pick<IconProps, 'fill' | 'type' | 'fillType'>;
|
|
70
|
+
button?: never;
|
|
71
|
+
}
|
|
72
|
+
interface IToastButton {
|
|
73
|
+
icon?: never;
|
|
74
|
+
button: {
|
|
75
|
+
onClick: () => void;
|
|
76
|
+
label: string;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
type ToastProp = IToastBase & (IToastIcon | IToastButton);
|
|
87
80
|
declare const Toaster: () => react_jsx_runtime.JSX.Element;
|
|
88
81
|
|
|
82
|
+
type StrictOmit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
83
|
+
|
|
84
|
+
declare const useToast: () => {
|
|
85
|
+
open: (toast: StrictOmit<ToastProp, "toastId" | "timer">) => {
|
|
86
|
+
toastId: number;
|
|
87
|
+
};
|
|
88
|
+
endLoading: (toastId: number) => void;
|
|
89
|
+
setMessage: (toastId: number, message: string) => void;
|
|
90
|
+
};
|
|
91
|
+
|
|
89
92
|
interface ITypographyCommon<T extends HTMLElement = HTMLParagraphElement> extends Omit<HTMLAttributes<T>, 'color'>, WithHTMLAsProps {
|
|
90
93
|
color?: SystemKeys;
|
|
91
94
|
}
|
|
@@ -418,6 +421,57 @@ declare const List: (({ children, className, ...props }: ListRootProps) => react
|
|
|
418
421
|
Item: ({ value, text, disabled, icon, onClick }: ItemProps) => react_jsx_runtime.JSX.Element;
|
|
419
422
|
};
|
|
420
423
|
|
|
424
|
+
type ToastProps = Toast.ToastProps;
|
|
425
|
+
interface ISnackbarBase extends ToastProps {
|
|
426
|
+
title: string;
|
|
427
|
+
description?: string;
|
|
428
|
+
position?: 'left' | 'right';
|
|
429
|
+
timer?: number;
|
|
430
|
+
}
|
|
431
|
+
interface ButtonType {
|
|
432
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
433
|
+
text: string;
|
|
434
|
+
}
|
|
435
|
+
interface ISnackbarBasic {
|
|
436
|
+
kind?: 'basic';
|
|
437
|
+
icon?: {
|
|
438
|
+
icon: IconComponentType;
|
|
439
|
+
} & Pick<IconProps, 'fill' | 'type' | 'fillType'>;
|
|
440
|
+
button?: {
|
|
441
|
+
text?: ButtonType;
|
|
442
|
+
basic?: ButtonType;
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
interface ISnackbarNavigation {
|
|
446
|
+
kind: 'navigation';
|
|
447
|
+
button: {
|
|
448
|
+
onClick: () => void;
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
interface ISnackbarExtended {
|
|
452
|
+
kind: 'extended';
|
|
453
|
+
button?: {
|
|
454
|
+
text?: ButtonType;
|
|
455
|
+
basic?: ButtonType;
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
type SnackbarProp = ISnackbarBase & (ISnackbarBasic | ISnackbarNavigation | ISnackbarExtended);
|
|
459
|
+
type SnackbarPropWithId = SnackbarProp & {
|
|
460
|
+
snackbarId: number;
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
declare const Snackbar: () => react_jsx_runtime.JSX.Element;
|
|
464
|
+
declare const SingleSnackbar: (props: SnackbarPropWithId & {
|
|
465
|
+
position: "left" | "right";
|
|
466
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
467
|
+
|
|
468
|
+
declare const snackbarAtom: jotai.PrimitiveAtom<SnackbarPropWithId[]> & {
|
|
469
|
+
init: SnackbarPropWithId[];
|
|
470
|
+
};
|
|
471
|
+
declare const useSnackbar: () => {
|
|
472
|
+
open: (info: SnackbarProp) => void;
|
|
473
|
+
};
|
|
474
|
+
|
|
421
475
|
declare const defaultLabelVariants: (props?: ({
|
|
422
476
|
level?: "primary" | "secondary" | undefined;
|
|
423
477
|
position?: "right" | "top" | undefined;
|
|
@@ -604,4 +658,4 @@ type BadgeBaseProps = ComponentPropsWithoutRef<'span'> & {
|
|
|
604
658
|
type BadgeProps = BadgeBaseProps & BadgeVariantColorProps;
|
|
605
659
|
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
606
660
|
|
|
607
|
-
export { Badge, type BadgeColor, type BadgeIconProps, type BadgeProps, type BadgeSize, type BadgeVariant, type BaseCoachMarkContentProps, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark, DEFAULT_LEVEL_OPTIONS, DEFAULT_SIZE_OPTIONS, DefaultButton, type DefaultButtonProps, type DefaultLevelType, Display, Heading, ICON_LEVEL_OPTIONS, ICON_SIZE_OPTIONS, type ICaptionProps, type IDisplayProps, type IHeadingProps, type IPropsAccent, type IPropsAnswer, type IPropsNormal, type IPropsNormalBold, type IPropsPost, type ITitleProps, IconButton, type IconButtonProps, type ItemProps, Label, List, Loading, type LoadingLevelType, Logo, Media, MediaContextProvider, Paragraph, type ParagraphProps, Popover, type PopoverContentProps, PrimitiveCoachMark, type PrimitiveCoachMarkContentProps, type PrimitiveCoachMarkRootProps,
|
|
661
|
+
export { Badge, type BadgeColor, type BadgeIconProps, type BadgeProps, type BadgeSize, type BadgeVariant, type BaseCoachMarkContentProps, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark, DEFAULT_LEVEL_OPTIONS, DEFAULT_SIZE_OPTIONS, DefaultButton, type DefaultButtonProps, type DefaultLevelType, Display, Heading, ICON_LEVEL_OPTIONS, ICON_SIZE_OPTIONS, type ICaptionProps, type IDisplayProps, type IHeadingProps, type IPropsAccent, type IPropsAnswer, type IPropsNormal, type IPropsNormalBold, type IPropsPost, type ITitleProps, IconButton, type IconButtonProps, type ItemProps, Label, List, Loading, type LoadingLevelType, Logo, Media, MediaContextProvider, Paragraph, type ParagraphProps, Popover, type PopoverContentProps, PrimitiveCoachMark, type PrimitiveCoachMarkContentProps, type PrimitiveCoachMarkRootProps, Radio, Select, type SelectItemProps, type SelectProps, SingleSnackbar, Snackbar, TEXT_LEVEL_OPTIONS, TEXT_SIZE_OPTIONS, Tag, TextButton, type TextButtonProps, type TextSizeType, Textfield, type TextfieldButtonProps, type TextfieldLabelType, type TextfieldProps, Title, Toaster, Tooltip, Typography, arrayToStyleObject, isEmptyObject, objectToArray, rootMediaStyle, snackbarAtom, useSnackbar, useToast };
|