@wistia/vhs 2.25.0-beta.00dcd3fb.7462755 → 2.25.0-beta.a95e1a20.424b65a
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/index.cjs.js +7 -82
- package/dist/index.cjs.js.map +4 -4
- package/dist/index.esm.js +7 -82
- package/dist/index.esm.js.map +4 -4
- package/dist/src/css/baseline.d.ts.map +1 -1
- package/dist/src/css/normalize.d.ts +2 -0
- package/dist/src/css/normalize.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/src/css/reset.d.ts +0 -2
- package/dist/src/css/reset.d.ts.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license VHS v2.25.0-beta.
|
|
3
|
+
* @license VHS v2.25.0-beta.a95e1a20.424b65a
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2021-2023, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -533,81 +533,12 @@
|
|
|
533
533
|
margin: 0;
|
|
534
534
|
}
|
|
535
535
|
`,bB=({children:e})=>{let t=document.getElementById("toast-portal");return t?(0,D8.createPortal)(e,t):null},ru=null,ai=(0,Cr.memo)(({actionInterceptor:e=void 0,actionLabel:t=om,colorOverride:r=void 0,renderInPlace:n=!1,isOpen:o=!1,message:a,onClose:s,timeout:u=am,variant:l=nm,...c})=>{let[m,p]=(0,Cr.useState)(o),v=l==="error"||l==="warning"?"assertive":"polite",g=(0,Cr.useCallback)(()=>{clearTimeout(ru??void 0),ru=null},[]),f=()=>{g(),s()},b=()=>{ru=setTimeout(()=>{f()},u)};(0,Cr.useEffect)(()=>(m&&!n&&b(),()=>{Bn(ru)&&g()})),(0,Cr.useEffect)(()=>(p(o),()=>{Bn(ru)&&g()}),[o,g,p]);let C=mB(r,l,Re());return(0,Xn.jsx)(n?Cr.Fragment:bB,{children:(0,Xn.jsx)(P6,{in:m,children:(0,Xn.jsxs)(gB,{accentColor:C,"aria-hidden":!m,onMouseEnter:g,onMouseLeave:b,renderInPlace:n,...c,children:[(0,Xn.jsxs)(vB,{"data-testid":"toast-message",children:[(0,Xn.jsx)(Us,{"aria-live":v,message:a}),a]}),(0,Xn.jsx)(Xe,{colorOverride:C,"data-testid":"toast-action",label:t,onClick:e??f,variant:"tertiary"})]},a)})})});ai.displayName="Toast_VHS";i();var E8=require("react"),ql=(0,E8.createContext)(null);var Yn=require("react/jsx-runtime"),S8=({children:e})=>{let[t,r]=(0,Nr.useState)(void 0),[n,o]=(0,Nr.useState)(""),[a,s]=(0,Nr.useState)(void 0),[u,l]=(0,Nr.useState)(""),[c,m]=(0,Nr.useState)(!1),[p,h]=(0,Nr.useState)(void 0),[v,g]=(0,Nr.useState)(void 0),f=(0,Nr.useCallback)(({message:b,variant:C=nm,actionLabel:x=om,actionInterceptor:E,timeout:D=am,colorOverride:$})=>{r(E?()=>E:void 0),o(x),s($),l(b),m(!0),h(D),g(C)},[]);return(0,Yn.jsxs)(Yn.Fragment,{children:[(0,Yn.jsx)(ql.Provider,{value:f,children:e}),(0,Yn.jsx)(ai,{actionInterceptor:t,actionLabel:n,colorOverride:a,isOpen:c,message:u,onClose:()=>m(!1),timeout:p,variant:v}),(0,Yn.jsx)("div",{id:"toast-portal"})]})};i();var xr=require("react");i();var Xl=require("react"),im=(0,Xl.createContext)({}),sm=()=>(0,Xl.useContext)(im);var T8=require("react/jsx-runtime"),Yl=({children:e})=>{let r=(0,xr.useRef)(new Set).current,n=(0,xr.useCallback)(m=>r.values().next().value===m,[r]),o=(0,xr.useCallback)(()=>{let m=r.values().next().value;ad(m)&&m(!0)},[r]),a=(0,xr.useCallback)(()=>{let m=r.values().next().value;ad(m)&&m(!1)},[r]),s=(0,xr.useCallback)(m=>{r.add(m),n(m)&&o()},[r,n,o]),u=(0,xr.useCallback)(m=>{r.add(m),n(m)?(a(),r.delete(m),o()):r.delete(m)},[r,n,a,o]),l=(0,xr.useCallback)(m=>{r.delete(m)},[r]),c=(0,xr.useMemo)(()=>({attemptShowModal:s,attemptHideModal:u,removeModalFromQueue:l}),[s,u,l]);return(0,T8.jsx)(im.Provider,{value:c,children:e})};i();var F8=require("styled-components");i();var A8=require("styled-components"),$8=A8.css`
|
|
536
|
-
/*
|
|
537
|
-
|
|
538
|
-
*::before,
|
|
539
|
-
*::after {
|
|
540
|
-
box-sizing: border-box;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
/* Remove default margin */
|
|
544
|
-
body,
|
|
545
|
-
h1,
|
|
546
|
-
h2,
|
|
547
|
-
h3,
|
|
548
|
-
h4,
|
|
549
|
-
p,
|
|
550
|
-
figure,
|
|
551
|
-
blockquote,
|
|
552
|
-
dl,
|
|
553
|
-
dd {
|
|
554
|
-
margin: 0;
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
|
|
558
|
-
ul[role='list'],
|
|
559
|
-
ol[role='list'] {
|
|
560
|
-
list-style: none;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
/* Set core root defaults */
|
|
564
|
-
html:focus-within {
|
|
565
|
-
scroll-behavior: smooth;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
/* Set core body defaults */
|
|
569
|
-
body {
|
|
570
|
-
min-height: 100vh;
|
|
571
|
-
text-rendering: optimizespeed;
|
|
572
|
-
line-height: 1.5;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
/* A elements that don't have a class get default styles */
|
|
576
|
-
a:not([class]) {
|
|
577
|
-
text-decoration-skip-ink: auto;
|
|
578
|
-
}
|
|
536
|
+
/* stylelint-disable */
|
|
537
|
+
/* normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
|
579
538
|
|
|
580
|
-
/*
|
|
581
|
-
|
|
582
|
-
picture {
|
|
583
|
-
max-width: 100%;
|
|
584
|
-
display: block;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/* Inherit fonts for inputs and buttons */
|
|
588
|
-
input,
|
|
589
|
-
button,
|
|
590
|
-
textarea,
|
|
591
|
-
select {
|
|
592
|
-
font: inherit;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
/* Remove all animations and transitions for people that prefer not to see them */
|
|
596
|
-
@media (prefers-reduced-motion: reduce) {
|
|
597
|
-
html:focus-within {
|
|
598
|
-
scroll-behavior: auto;
|
|
599
|
-
}
|
|
539
|
+
/* Document
|
|
540
|
+
========================================================================== */
|
|
600
541
|
|
|
601
|
-
*,
|
|
602
|
-
*::before,
|
|
603
|
-
*::after {
|
|
604
|
-
animation-duration: 0.01ms !important;
|
|
605
|
-
animation-iteration-count: 1 !important;
|
|
606
|
-
transition-duration: 0.01ms !important;
|
|
607
|
-
scroll-behavior: auto !important;
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
`;i();var M8=require("styled-components"),O8=M8.css`
|
|
611
542
|
/**
|
|
612
543
|
* 1. Correct the line height in all browsers.
|
|
613
544
|
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
|
@@ -615,7 +546,6 @@
|
|
|
615
546
|
|
|
616
547
|
html {
|
|
617
548
|
line-height: 1.15; /* 1 */
|
|
618
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
619
549
|
-webkit-text-size-adjust: 100%; /* 2 */
|
|
620
550
|
}
|
|
621
551
|
|
|
@@ -668,7 +598,6 @@
|
|
|
668
598
|
*/
|
|
669
599
|
|
|
670
600
|
pre {
|
|
671
|
-
/* stylelint-disable-next-line font-family-no-duplicate-names */
|
|
672
601
|
font-family: monospace, monospace; /* 1 */
|
|
673
602
|
font-size: 1em; /* 2 */
|
|
674
603
|
}
|
|
@@ -712,7 +641,6 @@
|
|
|
712
641
|
code,
|
|
713
642
|
kbd,
|
|
714
643
|
samp {
|
|
715
|
-
/* stylelint-disable-next-line font-family-no-duplicate-names */
|
|
716
644
|
font-family: monospace, monospace; /* 1 */
|
|
717
645
|
font-size: 1em; /* 2 */
|
|
718
646
|
}
|
|
@@ -806,7 +734,6 @@
|
|
|
806
734
|
[type='button'],
|
|
807
735
|
[type='reset'],
|
|
808
736
|
[type='submit'] {
|
|
809
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
810
737
|
-webkit-appearance: button;
|
|
811
738
|
}
|
|
812
739
|
|
|
@@ -899,7 +826,6 @@
|
|
|
899
826
|
*/
|
|
900
827
|
|
|
901
828
|
[type='search'] {
|
|
902
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
903
829
|
-webkit-appearance: textfield; /* 1 */
|
|
904
830
|
outline-offset: -2px; /* 2 */
|
|
905
831
|
}
|
|
@@ -909,7 +835,6 @@
|
|
|
909
835
|
*/
|
|
910
836
|
|
|
911
837
|
[type='search']::-webkit-search-decoration {
|
|
912
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
913
838
|
-webkit-appearance: none;
|
|
914
839
|
}
|
|
915
840
|
|
|
@@ -919,7 +844,6 @@
|
|
|
919
844
|
*/
|
|
920
845
|
|
|
921
846
|
::-webkit-file-upload-button {
|
|
922
|
-
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
923
847
|
-webkit-appearance: button; /* 1 */
|
|
924
848
|
font: inherit; /* 2 */
|
|
925
849
|
}
|
|
@@ -961,7 +885,8 @@
|
|
|
961
885
|
[hidden] {
|
|
962
886
|
display: none;
|
|
963
887
|
}
|
|
964
|
-
|
|
888
|
+
/* stylelint-enable */
|
|
889
|
+
`;i();var M8=require("styled-components"),O8=M8.css`
|
|
965
890
|
/**
|
|
966
891
|
* 1. Change from 'content-box' so that 'width' calculations are unaffected by 'padding' or 'border'
|
|
967
892
|
* 2. Ensure the iOS tap highlight is transparent
|