@storybook/components 7.0.0-alpha.1 → 7.0.0-alpha.4
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/{Color-GC2EERLU.mjs → Color-IIYOK4US.mjs} +1 -1
- package/dist/{GlobalScrollAreaStyles-SBQA32UJ.mjs → GlobalScrollAreaStyles-5MYDB36S.mjs} +1 -1
- package/dist/{OverlayScrollbars-XXHHIFRP.mjs → OverlayScrollbars-GXD6IR4B.mjs} +1 -1
- package/dist/WithTooltip-F6U4FHOQ.mjs +9 -0
- package/dist/{chunk-B5E6VV27.mjs → chunk-7IK3EOFL.mjs} +1 -1
- package/dist/{chunk-MGIUKE7Y.mjs → chunk-AZCVBZVA.mjs} +2 -2
- package/dist/{chunk-4HFE7HIP.mjs → chunk-DF422II4.mjs} +1 -1
- package/dist/chunk-EBKGXALM.mjs +1 -0
- package/dist/chunk-PJYBQ6PQ.mjs +1 -0
- package/dist/{chunk-SEEBCDLS.mjs → chunk-WYLOY4EF.mjs} +1 -1
- package/dist/chunk-XFBIFQ3K.mjs +73 -0
- package/dist/{chunk-XFP3TTPB.mjs → chunk-XZM6YCLI.mjs} +1 -1
- package/dist/{formatter-5ZDRIBVE.mjs → formatter-7QCQCGUB.mjs} +59 -59
- package/dist/html.js +129 -129
- package/dist/html.mjs +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +124 -124
- package/dist/index.mjs +1 -1
- package/dist/{syntaxhighlighter-RDO7V73N.mjs → syntaxhighlighter-XYTTX7GN.mjs} +6 -6
- package/package.json +9 -7
- package/dist/WithTooltip-2JKU54KI.mjs +0 -9
- package/dist/chunk-HK5F4PFQ.mjs +0 -1
- package/dist/chunk-IE3SZHMD.mjs +0 -1
- package/dist/chunk-X32VMURG.mjs +0 -73
- package/dist/chunk-YLDU3KBJ.mjs +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/components",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.4",
|
|
4
4
|
"description": "Core Storybook Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -50,9 +50,13 @@
|
|
|
50
50
|
"prepare": "esrun ../../scripts/prepare/bundle.ts"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@storybook/client-logger": "7.0.0-alpha.
|
|
53
|
+
"@storybook/client-logger": "7.0.0-alpha.4",
|
|
54
54
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
55
|
-
"@storybook/theming": "7.0.0-alpha.
|
|
55
|
+
"@storybook/theming": "7.0.0-alpha.4",
|
|
56
|
+
"core-js": "^3.8.2",
|
|
57
|
+
"memoizerific": "^1.11.3",
|
|
58
|
+
"qs": "^6.10.0",
|
|
59
|
+
"util-deprecate": "^1.0.2"
|
|
56
60
|
},
|
|
57
61
|
"devDependencies": {
|
|
58
62
|
"@digitak/esrun": "^3.2.2",
|
|
@@ -67,7 +71,6 @@
|
|
|
67
71
|
"jest": "^26.6.3",
|
|
68
72
|
"lodash": "^4.17.21",
|
|
69
73
|
"markdown-to-jsx": "^7.1.3",
|
|
70
|
-
"memoizerific": "^1.11.3",
|
|
71
74
|
"overlayscrollbars": "^1.13.1",
|
|
72
75
|
"polished": "^4.2.2",
|
|
73
76
|
"prettier": ">=2.2.1 <=2.3.0",
|
|
@@ -76,8 +79,7 @@
|
|
|
76
79
|
"react-popper-tooltip": "^3.1.1",
|
|
77
80
|
"react-syntax-highlighter": "^15.4.5",
|
|
78
81
|
"react-textarea-autosize": "^8.3.0",
|
|
79
|
-
"ts-dedent": "^2.0.0"
|
|
80
|
-
"util-deprecate": "^1.0.2"
|
|
82
|
+
"ts-dedent": "^2.0.0"
|
|
81
83
|
},
|
|
82
84
|
"peerDependencies": {
|
|
83
85
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -90,5 +92,5 @@
|
|
|
90
92
|
"./src/index.ts",
|
|
91
93
|
"./src/html.tsx"
|
|
92
94
|
],
|
|
93
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "006ed54452dd7c37a8cbe91a84f5312182f7ca00"
|
|
94
96
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{b as ge}from"./chunk-SEEBCDLS.mjs";import{a as Fe}from"./chunk-B5E6VV27.mjs";import{a as Ye}from"./chunk-HK5F4PFQ.mjs";import{a as O,c as Q,d as de}from"./chunk-XFP3TTPB.mjs";import{c as s,e as W,f as fe,g as Y,i as d}from"./chunk-YLDU3KBJ.mjs";var he=fe((pt,me)=>{d();var je=typeof Element<"u",Ve=typeof Map=="function",Xe=typeof Set=="function",ze=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function X(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,e,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(e=o;e--!==0;)if(!X(t[e],r[e]))return!1;return!0}var a;if(Ve&&t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(a=t.entries();!(e=a.next()).done;)if(!r.has(e.value[0]))return!1;for(a=t.entries();!(e=a.next()).done;)if(!X(e.value[1],r.get(e.value[0])))return!1;return!0}if(Xe&&t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(a=t.entries();!(e=a.next()).done;)if(!r.has(e.value[0]))return!1;return!0}if(ze&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if(o=t.length,o!=r.length)return!1;for(e=o;e--!==0;)if(t[e]!==r[e])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(e=o;e--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[e]))return!1;if(je&&t instanceof Element)return!1;for(e=o;e--!==0;)if(!((i[e]==="_owner"||i[e]==="__v"||i[e]==="__o")&&t.$$typeof)&&!X(t[i[e]],r[i[e]]))return!1;return!0}return t!==t&&r!==r}s(X,"equal");me.exports=s(function(r,o){try{return X(r,o)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}},"isEqual")});var Ce=fe((wt,Oe)=>{"use strict";d();var Qe=process.env.NODE_ENV!=="production",Te=s(function(){},"warning");Qe&&(ye=s(function(r,o){var e=arguments.length;o=new Array(e>1?e-1:0);for(var i=1;i<e;i++)o[i-1]=arguments[i];var a=0,u="Warning: "+r.replace(/%s/g,function(){return o[a++]});typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}},"printWarning"),Te=s(function(t,r,o){var e=arguments.length;o=new Array(e>2?e-2:0);for(var i=2;i<e;i++)o[i-2]=arguments[i];if(r===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");t||ye.apply(null,[r].concat(o))},"warning"));var ye;Oe.exports=Te});d();var Ue=Y(Fe());import q,{useCallback as nt,useState as it,useEffect as at}from"react";import{styled as Le}from"@storybook/theming";d();import B,{Component as Se}from"react";import{createPortal as Ze}from"react-dom";d();d();import*as E from"react";d();import*as v from"react";var Z=v.createContext(),_=v.createContext();function ee(t){var r=t.children,o=v.useState(null),e=o[0],i=o[1],a=v.useRef(!1);v.useEffect(function(){return function(){a.current=!0}},[]);var u=v.useCallback(function(n){a.current||i(n)},[]);return v.createElement(Z.Provider,{value:e},v.createElement(_.Provider,{value:u},r))}s(ee,"Manager");d();import*as j from"react";var V=s(function(r){return Array.isArray(r)?r[0]:r},"unwrapArray"),te=s(function(r){if(typeof r=="function"){for(var o=arguments.length,e=new Array(o>1?o-1:0),i=1;i<o;i++)e[i-1]=arguments[i];return r.apply(void 0,e)}},"safeInvoke"),D=s(function(r,o){if(typeof r=="function")return te(r,o);r!=null&&(r.current=o)},"setRef"),re=s(function(r){return r.reduce(function(o,e){var i=e[0],a=e[1];return o[i]=a,o},{})},"fromEntries"),oe=typeof window<"u"&&window.document&&window.document.createElement?j.useLayoutEffect:j.useEffect;d();import*as P from"react";import*as ve from"react-dom";var Re=Y(he());var qe=[],we=s(function(r,o,e){e===void 0&&(e={});var i=P.useRef(null),a={onFirstUpdate:e.onFirstUpdate,placement:e.placement||"bottom",strategy:e.strategy||"absolute",modifiers:e.modifiers||qe},u=P.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),n=u[0],l=u[1],c=P.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:s(function(h){var w=h.state,y=Object.keys(w.elements);ve.flushSync(function(){l({styles:re(y.map(function(R){return[R,w.styles[R]||{}]})),attributes:re(y.map(function(R){return[R,w.attributes[R]]}))})})},"fn"),requires:["computeStyles"]}},[]),p=P.useMemo(function(){var g={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[c,{name:"applyStyles",enabled:!1}])};return(0,Re.default)(i.current,g)?i.current||g:(i.current=g,g)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,c]),f=P.useRef();return oe(function(){f.current&&f.current.setOptions(p)},[p]),oe(function(){if(!(r==null||o==null)){var g=e.createPopper||ge,h=g(r,o,p);return f.current=h,function(){h.destroy(),f.current=null}}},[r,o,e.createPopper]),{state:f.current?f.current.state:null,styles:n.styles,attributes:n.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}},"usePopper");var Ge=s(function(){},"NOOP"),Je=s(function(){return Promise.resolve(null)},"NOOP_PROMISE"),Ke=[];function ne(t){var r=t.placement,o=r===void 0?"bottom":r,e=t.strategy,i=e===void 0?"absolute":e,a=t.modifiers,u=a===void 0?Ke:a,n=t.referenceElement,l=t.onFirstUpdate,c=t.innerRef,p=t.children,f=E.useContext(Z),g=E.useState(null),h=g[0],w=g[1],y=E.useState(null),R=y[0],H=y[1];E.useEffect(function(){D(c,h)},[c,h]);var L=E.useMemo(function(){return{placement:o,strategy:i,onFirstUpdate:l,modifiers:[].concat(u,[{name:"arrow",enabled:R!=null,options:{element:R}}])}},[o,i,l,u,R]),k=we(n||f,h,L),m=k.state,x=k.styles,U=k.forceUpdate,F=k.update,G=E.useMemo(function(){return{ref:w,style:x.popper,placement:m?m.placement:o,hasPopperEscaped:m&&m.modifiersData.hide?m.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:m&&m.modifiersData.hide?m.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:x.arrow,ref:H},forceUpdate:U||Ge,update:F||Je}},[w,H,o,m,x,F,U]);return V(p)(G)}s(ne,"Popper");d();var be=Y(Ce());import*as A from"react";function ie(t){var r=t.children,o=t.innerRef,e=A.useContext(_),i=A.useCallback(function(a){D(o,a),te(e,a)},[o,e]);return A.useEffect(function(){return function(){return D(o,null)}},[]),A.useEffect(function(){(0,be.default)(Boolean(e),"`Reference` should not be used outside of a `Manager` component.")},[e]),V(r)({ref:i})}s(ie,"Reference");var xe=B.createContext({}),S=s(function(){for(var r=arguments.length,o=new Array(r),e=0;e<r;e++)o[e]=arguments[e];return function(){for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return o.forEach(function(n){return n&&n.apply(void 0,a)})}},"callAll"),_e=s(function(){},"noop"),Ee=s(function(){return!!(typeof window<"u"&&window.document&&window.document.createElement)},"canUseDOM"),et=s(function(r,o){if(typeof r=="function")return r(o);r!=null&&(r.current=o)},"setRef"),Pe=function(t){Q(r,t);function r(){for(var e,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return e=t.call.apply(t,[this].concat(a))||this,e.observer=void 0,e.tooltipRef=void 0,e.handleOutsideClick=function(n){if(e.tooltipRef&&!e.tooltipRef.contains(n.target)){var l=e.context.parentOutsideClickHandler,c=e.props,p=c.hideTooltip,f=c.clearScheduled;f(),p(),l&&l(n)}},e.handleOutsideRightClick=function(n){if(e.tooltipRef&&!e.tooltipRef.contains(n.target)){var l=e.context.parentOutsideRightClickHandler,c=e.props,p=c.hideTooltip,f=c.clearScheduled;f(),p(),l&&l(n)}},e.addOutsideClickHandler=function(){document.body.addEventListener("touchend",e.handleOutsideClick),document.body.addEventListener("click",e.handleOutsideClick)},e.removeOutsideClickHandler=function(){document.body.removeEventListener("touchend",e.handleOutsideClick),document.body.removeEventListener("click",e.handleOutsideClick)},e.addOutsideRightClickHandler=function(){return document.body.addEventListener("contextmenu",e.handleOutsideRightClick)},e.removeOutsideRightClickHandler=function(){return document.body.removeEventListener("contextmenu",e.handleOutsideRightClick)},e.getTooltipRef=function(n){e.tooltipRef=n,et(e.props.innerRef,n)},e.getArrowProps=function(n){return n===void 0&&(n={}),O({},n,{style:O({},n.style,e.props.arrowProps.style)})},e.getTooltipProps=function(n){return n===void 0&&(n={}),O({},n,e.isTriggeredBy("hover")&&{onMouseEnter:S(e.props.clearScheduled,n.onMouseEnter),onMouseLeave:S(e.props.hideTooltip,n.onMouseLeave)},{style:O({},n.style,e.props.style)})},e.contextValue={isParentNoneTriggered:e.props.trigger==="none",addParentOutsideClickHandler:e.addOutsideClickHandler,addParentOutsideRightClickHandler:e.addOutsideRightClickHandler,parentOutsideClickHandler:e.handleOutsideClick,parentOutsideRightClickHandler:e.handleOutsideRightClick,removeParentOutsideClickHandler:e.removeOutsideClickHandler,removeParentOutsideRightClickHandler:e.removeOutsideRightClickHandler},e}s(r,"Tooltip1");var o=r.prototype;return o.componentDidMount=s(function(){var i=this,a=this.observer=new MutationObserver(function(){i.props.update()});if(a.observe(this.tooltipRef,this.props.mutationObserverOptions),this.isTriggeredBy("hover")||this.isTriggeredBy("click")||this.isTriggeredBy("right-click")){var u=this.context,n=u.removeParentOutsideClickHandler,l=u.removeParentOutsideRightClickHandler;this.addOutsideClickHandler(),this.addOutsideRightClickHandler(),n&&n(),l&&l()}},"componentDidMount"),o.componentDidUpdate=s(function(){this.props.closeOnReferenceHidden&&this.props.isReferenceHidden&&this.props.hideTooltip()},"componentDidUpdate"),o.componentWillUnmount=s(function(){if(this.observer&&this.observer.disconnect(),this.isTriggeredBy("hover")||this.isTriggeredBy("click")||this.isTriggeredBy("right-click")){var i=this.context,a=i.isParentNoneTriggered,u=i.addParentOutsideClickHandler,n=i.addParentOutsideRightClickHandler;this.removeOutsideClickHandler(),this.removeOutsideRightClickHandler(),this.handleOutsideClick=void 0,this.handleOutsideRightClick=void 0,!a&&u&&u(),!a&&n&&n()}},"componentWillUnmount"),o.render=s(function(){var i=this.props,a=i.arrowProps,u=i.placement,n=i.tooltip;return B.createElement(xe.Provider,{value:this.contextValue},n({arrowRef:a.ref,getArrowProps:this.getArrowProps,getTooltipProps:this.getTooltipProps,placement:u,tooltipRef:this.getTooltipRef}))},"render"),o.isTriggeredBy=s(function(i){var a=this.props.trigger;return a===i||Array.isArray(a)&&a.includes(i)},"isTriggeredBy"),r}(Se);Pe.contextType=xe;var tt={childList:!0,subtree:!0},Me=function(t){Q(r,t);function r(){for(var e,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return e=t.call.apply(t,[this].concat(a))||this,e.state={tooltipShown:e.props.defaultTooltipShown},e.hideTimeout=void 0,e.showTimeout=void 0,e.popperOffset=void 0,e.setTooltipState=function(n){var l=s(function(){return e.props.onVisibilityChange(n.tooltipShown)},"cb");e.isControlled()?l():e.setState(n,l)},e.clearScheduled=function(){clearTimeout(e.hideTimeout),clearTimeout(e.showTimeout)},e.showTooltip=function(n){var l=n.pageX,c=n.pageY;e.clearScheduled();var p={tooltipShown:!0};e.props.followCursor&&(p=O({},p,{pageX:l,pageY:c})),e.showTimeout=window.setTimeout(function(){return e.setTooltipState(p)},e.props.delayShow)},e.hideTooltip=function(){e.clearScheduled(),e.hideTimeout=window.setTimeout(function(){return e.setTooltipState({tooltipShown:!1})},e.props.delayHide)},e.toggleTooltip=function(n){var l=n.pageX,c=n.pageY,p=e.getState()?"hideTooltip":"showTooltip";e[p]({pageX:l,pageY:c})},e.clickToggle=function(n){n.preventDefault();var l=n.pageX,c=n.pageY,p=e.props.followCursor?"showTooltip":"toggleTooltip";e[p]({pageX:l,pageY:c})},e.contextMenuToggle=function(n){n.preventDefault();var l=n.pageX,c=n.pageY,p=e.props.followCursor?"showTooltip":"toggleTooltip";e[p]({pageX:l,pageY:c})},e.getTriggerProps=function(n){return n===void 0&&(n={}),O({},n,e.isTriggeredBy("click")&&{onClick:S(e.clickToggle,n.onClick),onTouchEnd:S(e.clickToggle,n.onTouchEnd)},e.isTriggeredBy("right-click")&&{onContextMenu:S(e.contextMenuToggle,n.onContextMenu)},e.isTriggeredBy("hover")&&O({onMouseEnter:S(e.showTooltip,n.onMouseEnter),onMouseLeave:S(e.hideTooltip,n.onMouseLeave)},e.props.followCursor&&{onMouseMove:S(e.showTooltip,n.onMouseMove)}),e.isTriggeredBy("focus")&&{onFocus:S(e.showTooltip,n.onFocus),onBlur:S(e.hideTooltip,n.onBlur)})},e}s(r,"TooltipTrigger1");var o=r.prototype;return o.componentWillUnmount=s(function(){this.clearScheduled()},"componentWillUnmount"),o.render=s(function(){var i=this,a=this.props,u=a.children,n=a.tooltip,l=a.placement,c=a.trigger,p=a.getTriggerRef,f=a.modifiers,g=a.closeOnReferenceHidden,h=a.usePortal,w=a.portalContainer,y=a.followCursor,R=a.getTooltipRef,H=a.mutationObserverOptions,L=de(a,["children","tooltip","placement","trigger","getTriggerRef","modifiers","closeOnReferenceHidden","usePortal","portalContainer","followCursor","getTooltipRef","mutationObserverOptions"]),k=B.createElement(ne,O({innerRef:R,placement:l,modifiers:[{name:"followCursor",enabled:y,phase:"main",fn:s(function(x){i.popperOffset=x.state.rects.popper},"fn")}].concat(f)},L),function(m){var x=m.ref,U=m.style,F=m.placement,G=m.arrowProps,De=m.isReferenceHidden,Ne=m.update;if(y&&i.popperOffset){var ue=i.state,J=ue.pageX,K=ue.pageY,le=i.popperOffset,ce=le.width,pe=le.height,Ie=J+ce>window.pageXOffset+document.body.offsetWidth?J-ce:J,$e=K+pe>window.pageYOffset+document.body.offsetHeight?K-pe:K;U.transform="translate3d("+Ie+"px, "+$e+"px, 0"}return B.createElement(Pe,O({arrowProps:G,closeOnReferenceHidden:g,isReferenceHidden:De,placement:F,update:Ne,style:U,tooltip:n,trigger:c,mutationObserverOptions:H},{clearScheduled:i.clearScheduled,hideTooltip:i.hideTooltip,innerRef:x}))});return B.createElement(ee,null,B.createElement(ie,{innerRef:p},function(m){var x=m.ref;return u({getTriggerProps:i.getTriggerProps,triggerRef:x})}),this.getState()&&(h?Ze(k,w):k))},"render"),o.isControlled=s(function(){return this.props.tooltipShown!==void 0},"isControlled"),o.getState=s(function(){return this.isControlled()?this.props.tooltipShown:this.state.tooltipShown},"getState"),o.isTriggeredBy=s(function(i){var a=this.props.trigger;return a===i||Array.isArray(a)&&a.includes(i)},"isTriggeredBy"),r}(Se);Me.defaultProps={closeOnReferenceHidden:!0,defaultTooltipShown:!1,delayHide:0,delayShow:0,followCursor:!1,onVisibilityChange:_e,placement:"right",portalContainer:Ee()?document.body:null,trigger:"hover",usePortal:Ee(),mutationObserverOptions:tt,modifiers:[]};var ke=Me;d();var He=Y(Ye());import Ae from"react";import{styled as Be,lighten as N,darken as I}from"@storybook/theming";function z(){return z=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])}return t},z.apply(this,arguments)}s(z,"_extends");var T=(0,He.default)(1e3)((t,r,o,e=0)=>r.split("-")[0]===t?o:e),M=8,rt=Be.div({position:"absolute",borderStyle:"solid"},({placement:t})=>{let r=0,o=0;switch(!0){case(t.startsWith("left")||t.startsWith("right")):{o=8;break}case(t.startsWith("top")||t.startsWith("bottom")):{r=8;break}default:}return{transform:`translate3d(${r}px, ${o}px, 0px)`}},({theme:t,color:r,placement:o})=>({bottom:`${T("top",o,M*-1,"auto")}px`,top:`${T("bottom",o,M*-1,"auto")}px`,right:`${T("left",o,M*-1,"auto")}px`,left:`${T("right",o,M*-1,"auto")}px`,borderBottomWidth:`${T("top",o,"0",M)}px`,borderTopWidth:`${T("bottom",o,"0",M)}px`,borderRightWidth:`${T("left",o,"0",M)}px`,borderLeftWidth:`${T("right",o,"0",M)}px`,borderTopColor:T("top",o,t.color[r]||r||t.base==="light"?N(t.background.app):I(t.background.app),"transparent"),borderBottomColor:T("bottom",o,t.color[r]||r||t.base==="light"?N(t.background.app):I(t.background.app),"transparent"),borderLeftColor:T("left",o,t.color[r]||r||t.base==="light"?N(t.background.app):I(t.background.app),"transparent"),borderRightColor:T("right",o,t.color[r]||r||t.base==="light"?N(t.background.app):I(t.background.app),"transparent")})),ot=Be.div(({hidden:t})=>({display:t?"none":"inline-block",zIndex:2147483647}),({theme:t,color:r,hasChrome:o})=>o?{background:t.color[r]||r||t.base==="light"?N(t.background.app):I(t.background.app),filter:`
|
|
2
|
-
drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
|
|
3
|
-
drop-shadow(0 1px 3px rgba(0,0,0,0.1))
|
|
4
|
-
`,borderRadius:t.appBorderRadius*2,fontSize:t.typography.size.s1}:{}),ae=s(l=>{var c=l,{placement:t,hasChrome:r,children:o,arrowProps:e,tooltipRef:i,arrowRef:a,color:u}=c,n=W(c,["placement","hasChrome","children","arrowProps","tooltipRef","arrowRef","color"]);return Ae.createElement(ot,z({hasChrome:r,placement:t,ref:i},n,{color:u}),r&&Ae.createElement(rt,z({placement:t,ref:a},e,{color:u})),o)},"Tooltip");ae.defaultProps={color:void 0,arrowRef:void 0,tooltipRef:void 0,hasChrome:!0,placement:"top",arrowProps:{}};function $(){return $=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])}return t},$.apply(this,arguments)}s($,"_extends");var{document:se}=Ue.default,st=Le.div`
|
|
5
|
-
display: inline-block;
|
|
6
|
-
cursor: ${t=>t.mode==="hover"?"default":"pointer"};
|
|
7
|
-
`,ut=Le.g`
|
|
8
|
-
cursor: ${t=>t.mode==="hover"?"default":"pointer"};
|
|
9
|
-
`,We=s(f=>{var g=f,{svg:t,trigger:r,closeOnClick:o,placement:e,modifiers:i,hasChrome:a,tooltip:u,children:n,tooltipShown:l,onVisibilityChange:c}=g,p=W(g,["svg","trigger","closeOnClick","placement","modifiers","hasChrome","tooltip","children","tooltipShown","onVisibilityChange"]);let h=t?ut:st;return q.createElement(ke,{placement:e,trigger:r,modifiers:i,tooltipShown:l,onVisibilityChange:c,tooltip:({getTooltipProps:w,getArrowProps:y,tooltipRef:R,arrowRef:H,placement:L})=>q.createElement(ae,$({hasChrome:a,placement:L,tooltipRef:R,arrowRef:H,arrowProps:y()},w()),typeof u=="function"?u({onHide:()=>c(!1)}):u)},({getTriggerProps:w,triggerRef:y})=>q.createElement(h,$({ref:y},w(),p),n))},"WithTooltipPure");We.defaultProps={svg:!1,trigger:"hover",closeOnClick:!1,placement:"top",modifiers:[{name:"preventOverflow",options:{padding:8}},{name:"offset",options:{offset:[8,8]}},{name:"arrow",options:{padding:8}}],hasChrome:!0,tooltipShown:!1};var Ft=s(e=>{var i=e,{startOpen:t,onVisibilityChange:r}=i,o=W(i,["startOpen","onVisibilityChange"]);let[a,u]=it(t||!1),n=nt(l=>{r&&r(l)===!1||u(l)},[r]);return at(()=>{let l=s(()=>n(!1),"hide");se.addEventListener("keydown",l,!1);let c=Array.from(se.getElementsByTagName("iframe")),p=[];return c.forEach(f=>{let g=s(()=>{try{f.contentWindow.document&&(f.contentWindow.document.addEventListener("click",l),p.push(()=>{try{f.contentWindow.document.removeEventListener("click",l)}catch{}}))}catch{}},"bind");g(),f.addEventListener("load",g),p.push(()=>{f.removeEventListener("load",g)})}),()=>{se.removeEventListener("keydown",l),p.forEach(f=>{f()})}}),q.createElement(We,$({},o,{tooltipShown:a,onVisibilityChange:n}))},"WithToolTipState");export{Ft as WithToolTipState,Ft as WithTooltip,We as WithTooltipPure};
|
package/dist/chunk-HK5F4PFQ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,f as p,i as m}from"./chunk-YLDU3KBJ.mjs";var y=p((_,M)=>{m();function h(){return this.list=[],this.lastItem=void 0,this.size=0,this}l(h,"Similar");h.prototype.get=function(e){var t;if(this.lastItem&&this.isEqual(this.lastItem.key,e))return this.lastItem.val;if(t=this.indexOf(e),t>=0)return this.lastItem=this.list[t],this.list[t].val};h.prototype.set=function(e,t){var i;return this.lastItem&&this.isEqual(this.lastItem.key,e)?(this.lastItem.val=t,this):(i=this.indexOf(e),i>=0?(this.lastItem=this.list[i],this.list[i].val=t,this):(this.lastItem={key:e,val:t},this.list.push(this.lastItem),this.size++,this))};h.prototype.delete=function(e){var t;if(this.lastItem&&this.isEqual(this.lastItem.key,e)&&(this.lastItem=void 0),t=this.indexOf(e),t>=0)return this.size--,this.list.splice(t,1)[0]};h.prototype.has=function(e){var t;return this.lastItem&&this.isEqual(this.lastItem.key,e)?!0:(t=this.indexOf(e),t>=0?(this.lastItem=this.list[t],!0):!1)};h.prototype.forEach=function(e,t){var i;for(i=0;i<this.size;i++)e.call(t||this,this.list[i].val,this.list[i].key,this)};h.prototype.indexOf=function(e){var t;for(t=0;t<this.size;t++)if(this.isEqual(this.list[t].key,e))return t;return-1};h.prototype.isEqual=function(e,t){return e===t||e!==e&&t!==t};M.exports=h});var v=p((L,E)=>{m();E.exports=function(e){if(typeof Map!="function"||e){var t=y();return new t}else return new Map}});var q=p((R,w)=>{m();var x=v();w.exports=function(e){var t=new x(process.env.FORCE_SIMILAR_INSTEAD_OF_MAP==="true"),i=[];return function(f){var s=l(function(){var r=t,n,c,a=arguments.length-1,g=Array(a+1),o=!0,u;if((s.numArgs||s.numArgs===0)&&s.numArgs!==a+1)throw new Error("Memoizerific functions should always be called with the same number of arguments");for(u=0;u<a;u++){if(g[u]={cacheItem:r,arg:arguments[u]},r.has(arguments[u])){r=r.get(arguments[u]);continue}o=!1,n=new x(process.env.FORCE_SIMILAR_INSTEAD_OF_MAP==="true"),r.set(arguments[u],n),r=n}return o&&(r.has(arguments[a])?c=r.get(arguments[a]):o=!1),o||(c=f.apply(null,arguments),r.set(arguments[a],c)),e>0&&(g[a]={cacheItem:r,arg:arguments[a]},o?z(i,g):i.push(g),i.length>e&&A(i.shift())),s.wasMemoized=o,s.numArgs=a+1,c},"memoizerific");return s.limit=e,s.wasMemoized=!1,s.cache=t,s.lru=i,s}};function z(e,t){var i=e.length,f=t.length,s,r,n;for(r=0;r<i;r++){for(s=!0,n=0;n<f;n++)if(!O(e[r][n].arg,t[n].arg)){s=!1;break}if(s)break}e.push(e.splice(r,1)[0])}l(z,"moveToMostRecentLru");function A(e){var t=e.length,i=e[t-1],f,s;for(i.cacheItem.delete(i.arg),s=t-2;s>=0&&(i=e[s],f=i.cacheItem.get(i.arg),!f||!f.size);s--)i.cacheItem.delete(i.arg)}l(A,"removeCachedResult");function O(e,t){return e===t||e!==e&&t!==t}l(O,"isEqual")});export{q as a};
|
package/dist/chunk-IE3SZHMD.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as n,e as l,i}from"./chunk-YLDU3KBJ.mjs";i();import d from"react";import{styled as f}from"@storybook/theming";function p(){return p=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(o[t]=r[t])}return o},p.apply(this,arguments)}n(p,"_extends");var w=f.div(({theme:o})=>({position:"absolute",bottom:0,right:0,maxWidth:"100%",display:"flex",background:o.background.content,zIndex:1})),u=f.button(({theme:o})=>({margin:0,border:"0 none",padding:"4px 10px",cursor:"pointer",display:"flex",alignItems:"center",color:o.color.defaultText,background:o.background.content,fontSize:12,lineHeight:"16px",fontFamily:o.typography.fonts.base,fontWeight:o.typography.weight.bold,borderTop:`1px solid ${o.appBorderColor}`,borderLeft:`1px solid ${o.appBorderColor}`,marginLeft:-1,borderRadius:"4px 0 0 0","&:not(:last-child)":{borderRight:`1px solid ${o.appBorderColor}`},"& + *":{borderLeft:`1px solid ${o.appBorderColor}`,borderRadius:0},"&:focus":{boxShadow:`${o.color.secondary} 0 -3px 0 0 inset`,outline:"0 none"}}),({disabled:o})=>o&&{cursor:"not-allowed",opacity:.5});u.displayName="ActionButton";var $=n(r=>{var t=r,{actionItems:o}=t,e=l(t,["actionItems"]);return d.createElement(w,p({},e),o.map(({title:a,className:g,onClick:m,disabled:x},y)=>d.createElement(u,{key:y,className:g,onClick:m,disabled:x},a)))},"ActionBar");i();import s,{lazy as b,Suspense as S}from"react";import{styled as B}from"@storybook/theming";function c(){return c=Object.assign||function(o){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(o[t]=r[t])}return o},c.apply(this,arguments)}n(c,"_extends");var O=b(()=>import("./GlobalScrollAreaStyles-SBQA32UJ.mjs")),C=b(()=>import("./OverlayScrollbars-XXHHIFRP.mjs")),E=n(t=>{var a=t,{horizontal:o,vertical:e}=a,r=l(a,["horizontal","vertical"]);return s.createElement(S,{fallback:s.createElement("div",c({},r))},s.createElement(O,null),s.createElement(C,c({options:{scrollbars:{autoHide:"leave"}}},r)))},"Scroller"),z=B(E)(({vertical:o})=>o?{overflowY:"auto",height:"100%"}:{overflowY:"hidden"},({horizontal:o})=>o?{overflowX:"auto",width:"100%"}:{overflowX:"hidden"});z.defaultProps={horizontal:!1,vertical:!1};export{$ as a,z as b};
|