@tangible/ui 0.2.18 → 0.2.19
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/components/Notice/Notice.js +7 -0
- package/components/Toast/Toast.d.ts +134 -0
- package/components/Toast/Toast.js +234 -0
- package/components/Toast/ToastContext.d.ts +11 -0
- package/components/Toast/ToastContext.js +9 -0
- package/components/Toast/index.d.ts +4 -0
- package/components/Toast/index.js +2 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +1 -0
- package/figma-tokens.json +1 -1
- package/package.json +5 -1
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +87 -0
- package/styles/all.expanded.unlayered.css +87 -0
- package/styles/all.unlayered.css +1 -1
- package/styles/components/_bundle.scss +5 -0
- package/styles/components/notice.scss +13 -0
- package/styles/components/toast.scss +183 -0
- package/tui-manifest.json +115 -7
package/styles/all.expanded.css
CHANGED
|
@@ -250,6 +250,8 @@
|
|
|
250
250
|
--tui-notice-icon
|
|
251
251
|
--tui-notice-title-size
|
|
252
252
|
--tui-notice-foot-basis
|
|
253
|
+
--tui-notice-dismiss-bg-interact
|
|
254
|
+
--tui-notice-dismiss-bg-pressed
|
|
253
255
|
*/
|
|
254
256
|
/* @tui-tokens
|
|
255
257
|
--tui-overlap-stack-overlap
|
|
@@ -419,6 +421,14 @@
|
|
|
419
421
|
--tui-input-group-gap
|
|
420
422
|
*/
|
|
421
423
|
/* @tui-tokens
|
|
424
|
+
--tui-toast-width
|
|
425
|
+
--tui-toast-fg
|
|
426
|
+
--tui-toast-gap
|
|
427
|
+
--tui-toast-inset
|
|
428
|
+
--tui-toast-shadow
|
|
429
|
+
--tui-toast-z
|
|
430
|
+
*/
|
|
431
|
+
/* @tui-tokens
|
|
422
432
|
--tui-toolbar-gap
|
|
423
433
|
--tui-toolbar-padding
|
|
424
434
|
*/
|
|
@@ -5652,6 +5662,8 @@
|
|
|
5652
5662
|
position: absolute;
|
|
5653
5663
|
inset-block-start: var(--tui-notice-padding, var(--tui-spacing-md));
|
|
5654
5664
|
inset-inline-end: var(--tui-notice-padding, var(--tui-spacing-md));
|
|
5665
|
+
--tui-icon-button-bg-interact: var(--tui-notice-dismiss-bg-interact, color-mix(in srgb, var(--tui-color-fg) 12%, transparent));
|
|
5666
|
+
--tui-icon-button-bg-pressed: var(--tui-notice-dismiss-bg-pressed, color-mix(in srgb, var(--tui-color-fg) 20%, transparent));
|
|
5655
5667
|
}
|
|
5656
5668
|
.tui-notice.is-layout-inline .tui-notice__dismiss {
|
|
5657
5669
|
position: static;
|
|
@@ -7554,6 +7566,81 @@
|
|
|
7554
7566
|
:where(.tui-interface) .tui-input-group:has(> .tui-input-group__suffix.is-text) {
|
|
7555
7567
|
padding-inline-end: 0;
|
|
7556
7568
|
}
|
|
7569
|
+
:where(.tui-interface) .tui-toast-region {
|
|
7570
|
+
--_gap: var(--tui-toast-gap, var(--tui-spacing-sm));
|
|
7571
|
+
--_inset: var(--tui-toast-inset, var(--tui-spacing-lg));
|
|
7572
|
+
--_enter-from: 0.5rem;
|
|
7573
|
+
position: fixed;
|
|
7574
|
+
z-index: var(--tui-toast-z, var(--tui-layer-top, 9999));
|
|
7575
|
+
display: flex;
|
|
7576
|
+
flex-direction: column;
|
|
7577
|
+
gap: var(--_gap);
|
|
7578
|
+
padding: var(--_inset);
|
|
7579
|
+
width: min(var(--tui-toast-width, 26rem) + var(--_inset) * 2, 100%);
|
|
7580
|
+
pointer-events: none;
|
|
7581
|
+
}
|
|
7582
|
+
:where(.tui-interface) .tui-toast-region:focus-visible {
|
|
7583
|
+
outline: var(--tui-focus-ring-width) solid var(--tui-focus-ring-color);
|
|
7584
|
+
outline-offset: calc(-1 * var(--tui-focus-ring-width));
|
|
7585
|
+
}
|
|
7586
|
+
:where(.tui-interface) .tui-toast-region.is-placement-top, :where(.tui-interface) .tui-toast-region.is-placement-bottom {
|
|
7587
|
+
inset-inline: 0;
|
|
7588
|
+
margin-inline: auto;
|
|
7589
|
+
}
|
|
7590
|
+
:where(.tui-interface) .tui-toast-region.is-placement-top-start, :where(.tui-interface) .tui-toast-region.is-placement-top, :where(.tui-interface) .tui-toast-region.is-placement-top-end {
|
|
7591
|
+
--_enter-from: -0.5rem;
|
|
7592
|
+
inset-block-start: 0;
|
|
7593
|
+
flex-direction: column-reverse;
|
|
7594
|
+
}
|
|
7595
|
+
:where(.tui-interface) .tui-toast-region.is-placement-bottom-start, :where(.tui-interface) .tui-toast-region.is-placement-bottom, :where(.tui-interface) .tui-toast-region.is-placement-bottom-end {
|
|
7596
|
+
inset-block-end: 0;
|
|
7597
|
+
}
|
|
7598
|
+
:where(.tui-interface) .tui-toast-region.is-placement-top-start, :where(.tui-interface) .tui-toast-region.is-placement-bottom-start {
|
|
7599
|
+
inset-inline-start: 0;
|
|
7600
|
+
}
|
|
7601
|
+
:where(.tui-interface) .tui-toast-region.is-placement-top-end, :where(.tui-interface) .tui-toast-region.is-placement-bottom-end {
|
|
7602
|
+
inset-inline-end: 0;
|
|
7603
|
+
}
|
|
7604
|
+
.tui-interface .tui-toast {
|
|
7605
|
+
--tui-notice-fg: var(--tui-toast-fg, var(--tui-color-fg));
|
|
7606
|
+
--tui-notice-foot-basis: max-content;
|
|
7607
|
+
box-shadow: var(--tui-toast-shadow, var(--tui-shadow-lg));
|
|
7608
|
+
pointer-events: auto;
|
|
7609
|
+
}
|
|
7610
|
+
.tui-interface .tui-toast .tui-toast__title {
|
|
7611
|
+
font-weight: var(--tui-typography-weight-semibold, 600);
|
|
7612
|
+
}
|
|
7613
|
+
.tui-interface .tui-toast .tui-toast__description {
|
|
7614
|
+
font-size: var(--tui-typography-size-sm);
|
|
7615
|
+
}
|
|
7616
|
+
.tui-interface .tui-toast .tui-notice__foot {
|
|
7617
|
+
flex-shrink: 0;
|
|
7618
|
+
}
|
|
7619
|
+
@media (forced-colors: active) {
|
|
7620
|
+
.tui-interface .tui-toast {
|
|
7621
|
+
background-color: Canvas;
|
|
7622
|
+
color: CanvasText;
|
|
7623
|
+
border: 1px solid CanvasText;
|
|
7624
|
+
}
|
|
7625
|
+
}
|
|
7626
|
+
:where(.tui-interface) .tui-toast {
|
|
7627
|
+
animation: tui-toastEnter var(--tui-motion-duration) var(--tui-motion-timing);
|
|
7628
|
+
}
|
|
7629
|
+
@media (prefers-reduced-motion: reduce) {
|
|
7630
|
+
:where(.tui-interface) .tui-toast {
|
|
7631
|
+
animation: none;
|
|
7632
|
+
}
|
|
7633
|
+
}
|
|
7634
|
+
@keyframes tui-toastEnter {
|
|
7635
|
+
from {
|
|
7636
|
+
opacity: 0;
|
|
7637
|
+
translate: 0 var(--_enter-from, 0.5rem);
|
|
7638
|
+
}
|
|
7639
|
+
to {
|
|
7640
|
+
opacity: 1;
|
|
7641
|
+
translate: 0 0;
|
|
7642
|
+
}
|
|
7643
|
+
}
|
|
7557
7644
|
:where(.tui-interface) .tui-toolbar {
|
|
7558
7645
|
--_gap: var(--tui-toolbar-gap, var(--tui-spacing-sm));
|
|
7559
7646
|
--_padding: var(--tui-toolbar-padding, 0);
|
|
@@ -250,6 +250,8 @@
|
|
|
250
250
|
--tui-notice-icon
|
|
251
251
|
--tui-notice-title-size
|
|
252
252
|
--tui-notice-foot-basis
|
|
253
|
+
--tui-notice-dismiss-bg-interact
|
|
254
|
+
--tui-notice-dismiss-bg-pressed
|
|
253
255
|
*/
|
|
254
256
|
/* @tui-tokens
|
|
255
257
|
--tui-overlap-stack-overlap
|
|
@@ -419,6 +421,14 @@
|
|
|
419
421
|
--tui-input-group-gap
|
|
420
422
|
*/
|
|
421
423
|
/* @tui-tokens
|
|
424
|
+
--tui-toast-width
|
|
425
|
+
--tui-toast-fg
|
|
426
|
+
--tui-toast-gap
|
|
427
|
+
--tui-toast-inset
|
|
428
|
+
--tui-toast-shadow
|
|
429
|
+
--tui-toast-z
|
|
430
|
+
*/
|
|
431
|
+
/* @tui-tokens
|
|
422
432
|
--tui-toolbar-gap
|
|
423
433
|
--tui-toolbar-padding
|
|
424
434
|
*/
|
|
@@ -5652,6 +5662,8 @@
|
|
|
5652
5662
|
position: absolute;
|
|
5653
5663
|
inset-block-start: var(--tui-notice-padding, var(--tui-spacing-md));
|
|
5654
5664
|
inset-inline-end: var(--tui-notice-padding, var(--tui-spacing-md));
|
|
5665
|
+
--tui-icon-button-bg-interact: var(--tui-notice-dismiss-bg-interact, color-mix(in srgb, var(--tui-color-fg) 12%, transparent));
|
|
5666
|
+
--tui-icon-button-bg-pressed: var(--tui-notice-dismiss-bg-pressed, color-mix(in srgb, var(--tui-color-fg) 20%, transparent));
|
|
5655
5667
|
}
|
|
5656
5668
|
.tui-notice.is-layout-inline .tui-notice__dismiss {
|
|
5657
5669
|
position: static;
|
|
@@ -7554,6 +7566,81 @@
|
|
|
7554
7566
|
:where(.tui-interface) .tui-input-group:has(> .tui-input-group__suffix.is-text) {
|
|
7555
7567
|
padding-inline-end: 0;
|
|
7556
7568
|
}
|
|
7569
|
+
:where(.tui-interface) .tui-toast-region {
|
|
7570
|
+
--_gap: var(--tui-toast-gap, var(--tui-spacing-sm));
|
|
7571
|
+
--_inset: var(--tui-toast-inset, var(--tui-spacing-lg));
|
|
7572
|
+
--_enter-from: 0.5rem;
|
|
7573
|
+
position: fixed;
|
|
7574
|
+
z-index: var(--tui-toast-z, var(--tui-layer-top, 9999));
|
|
7575
|
+
display: flex;
|
|
7576
|
+
flex-direction: column;
|
|
7577
|
+
gap: var(--_gap);
|
|
7578
|
+
padding: var(--_inset);
|
|
7579
|
+
width: min(var(--tui-toast-width, 26rem) + var(--_inset) * 2, 100%);
|
|
7580
|
+
pointer-events: none;
|
|
7581
|
+
}
|
|
7582
|
+
:where(.tui-interface) .tui-toast-region:focus-visible {
|
|
7583
|
+
outline: var(--tui-focus-ring-width) solid var(--tui-focus-ring-color);
|
|
7584
|
+
outline-offset: calc(-1 * var(--tui-focus-ring-width));
|
|
7585
|
+
}
|
|
7586
|
+
:where(.tui-interface) .tui-toast-region.is-placement-top, :where(.tui-interface) .tui-toast-region.is-placement-bottom {
|
|
7587
|
+
inset-inline: 0;
|
|
7588
|
+
margin-inline: auto;
|
|
7589
|
+
}
|
|
7590
|
+
:where(.tui-interface) .tui-toast-region.is-placement-top-start, :where(.tui-interface) .tui-toast-region.is-placement-top, :where(.tui-interface) .tui-toast-region.is-placement-top-end {
|
|
7591
|
+
--_enter-from: -0.5rem;
|
|
7592
|
+
inset-block-start: 0;
|
|
7593
|
+
flex-direction: column-reverse;
|
|
7594
|
+
}
|
|
7595
|
+
:where(.tui-interface) .tui-toast-region.is-placement-bottom-start, :where(.tui-interface) .tui-toast-region.is-placement-bottom, :where(.tui-interface) .tui-toast-region.is-placement-bottom-end {
|
|
7596
|
+
inset-block-end: 0;
|
|
7597
|
+
}
|
|
7598
|
+
:where(.tui-interface) .tui-toast-region.is-placement-top-start, :where(.tui-interface) .tui-toast-region.is-placement-bottom-start {
|
|
7599
|
+
inset-inline-start: 0;
|
|
7600
|
+
}
|
|
7601
|
+
:where(.tui-interface) .tui-toast-region.is-placement-top-end, :where(.tui-interface) .tui-toast-region.is-placement-bottom-end {
|
|
7602
|
+
inset-inline-end: 0;
|
|
7603
|
+
}
|
|
7604
|
+
.tui-interface .tui-toast {
|
|
7605
|
+
--tui-notice-fg: var(--tui-toast-fg, var(--tui-color-fg));
|
|
7606
|
+
--tui-notice-foot-basis: max-content;
|
|
7607
|
+
box-shadow: var(--tui-toast-shadow, var(--tui-shadow-lg));
|
|
7608
|
+
pointer-events: auto;
|
|
7609
|
+
}
|
|
7610
|
+
.tui-interface .tui-toast .tui-toast__title {
|
|
7611
|
+
font-weight: var(--tui-typography-weight-semibold, 600);
|
|
7612
|
+
}
|
|
7613
|
+
.tui-interface .tui-toast .tui-toast__description {
|
|
7614
|
+
font-size: var(--tui-typography-size-sm);
|
|
7615
|
+
}
|
|
7616
|
+
.tui-interface .tui-toast .tui-notice__foot {
|
|
7617
|
+
flex-shrink: 0;
|
|
7618
|
+
}
|
|
7619
|
+
@media (forced-colors: active) {
|
|
7620
|
+
.tui-interface .tui-toast {
|
|
7621
|
+
background-color: Canvas;
|
|
7622
|
+
color: CanvasText;
|
|
7623
|
+
border: 1px solid CanvasText;
|
|
7624
|
+
}
|
|
7625
|
+
}
|
|
7626
|
+
:where(.tui-interface) .tui-toast {
|
|
7627
|
+
animation: tui-toastEnter var(--tui-motion-duration) var(--tui-motion-timing);
|
|
7628
|
+
}
|
|
7629
|
+
@media (prefers-reduced-motion: reduce) {
|
|
7630
|
+
:where(.tui-interface) .tui-toast {
|
|
7631
|
+
animation: none;
|
|
7632
|
+
}
|
|
7633
|
+
}
|
|
7634
|
+
@keyframes tui-toastEnter {
|
|
7635
|
+
from {
|
|
7636
|
+
opacity: 0;
|
|
7637
|
+
translate: 0 var(--_enter-from, 0.5rem);
|
|
7638
|
+
}
|
|
7639
|
+
to {
|
|
7640
|
+
opacity: 1;
|
|
7641
|
+
translate: 0 0;
|
|
7642
|
+
}
|
|
7643
|
+
}
|
|
7557
7644
|
:where(.tui-interface) .tui-toolbar {
|
|
7558
7645
|
--_gap: var(--tui-toolbar-gap, var(--tui-spacing-sm));
|
|
7559
7646
|
--_padding: var(--tui-toolbar-padding, 0);
|