@stenajs-webui/tooltip 18.11.2-next.0 → 18.12.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/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{var r=document.createElement("style");r.appendChild(document.createTextNode('._noPadding_183x1_1 .tippy-content{padding:0}.tippy-box[data-theme~=light]{box-shadow:var(--swui-shadow-popover)}.tippy-box[data-theme~=outlined]{border:1px solid var(--lhds-color-blue-500)}.tippy-box[data-theme~=info]{background-color:var(--lhds-color-blue-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=info] .tippy-arrow{color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning]{background-color:var(--lhds-color-orange-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=warning] .tippy-arrow{color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error]{background-color:var(--lhds-color-red-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=error] .tippy-arrow{color:var(--lhds-color-red-50)}.tippy-box[data-theme~=info][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-red-50)}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:
|
|
1
|
+
(function(){"use strict";try{var r=document.createElement("style");r.appendChild(document.createTextNode('._noPadding_183x1_1 .tippy-content{padding:0}.tippy-box[data-theme~=light]{box-shadow:var(--swui-shadow-popover)}.tippy-box[data-theme~=outlined]{border:1px solid var(--lhds-color-blue-500)}.tippy-box[data-theme~=info]{background-color:var(--lhds-color-blue-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=info] .tippy-arrow{color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning]{background-color:var(--lhds-color-orange-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=warning] .tippy-arrow{color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error]{background-color:var(--lhds-color-red-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=error] .tippy-arrow{color:var(--lhds-color-red-50)}.tippy-box[data-theme~=info][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-red-50)}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.5;outline:0;transition-property:visibility,opacity,-webkit-transform;transition-property:transform,visibility,opacity;transition-property:transform,visibility,opacity,-webkit-transform}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;-webkit-transform-origin:center top;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;-webkit-transform-origin:center bottom;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;-webkit-transform-origin:center left;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;-webkit-transform-origin:center right;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=dark]{color:var(--lhds-color-ui-50);box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-backdrop{background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-svg-arrow{fill:var(--lhds-color-ui-800)}._tooltip_1i1mn_1{display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;align-items:center;border-radius:var(--swui-border-radius);padding:var(--swui-metrics-spacing) calc(var(--swui-metrics-indent) * 2)}._tooltip_1i1mn_1._withIcon_1i1mn_8{padding:calc(var(--swui-metrics-spacing) * .5);padding-right:calc(var(--swui-metrics-indent) * 2)}._iconWrapper_1i1mn_14{--current-bg-color: transparent;--current-border-color: var(--lhds-color-ui-50);--current-icon-color: var(--lhds-color-ui-50);display:inline-flex;flex-direction:row;white-space:nowrap;background-color:var(--current-bg-color);border:1px solid var(--current-border-color);border-radius:var(--swui-border-radius);padding:calc(var(--swui-metrics-spacing) * .5);align-items:flex-start}._iconWrapper_1i1mn_14 svg{color:var(--current-icon-color)}._iconWrapper_1i1mn_14._info_1i1mn_34{--current-border-color: var(--lhds-color-blue-300);--current-bg-color: var(--lhds-color-blue-100);--current-icon-color: var(--lhds-color-blue-700)}._iconWrapper_1i1mn_14._warning_1i1mn_40{--current-border-color: var(--lhds-color-orange-300);--current-bg-color: var(--lhds-color-orange-100);--current-icon-color: var(--lhds-color-orange-700)}._iconWrapper_1i1mn_14._error_1i1mn_46{--current-border-color: var(--lhds-color-red-300);--current-bg-color: var(--lhds-color-red-100);--current-icon-color: var(--lhds-color-red-700)}')),document.head.appendChild(r)}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
2
|
import { Column as W, Text as f, Space as a, Row as m, Box as j } from "@stenajs-webui/core";
|
|
3
3
|
import { FlatButton as _, PrimaryButton as k, Spinner as B, Icon as N, stenaInfoCircle as R, stenaExclamationCircle as $, stenaExclamationTriangle as b } from "@stenajs-webui/elements";
|
|
4
4
|
import { jsxs as c, jsx as n, Fragment as A } from "react/jsx-runtime";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(){"use strict";try{var r=document.createElement("style");r.appendChild(document.createTextNode('._noPadding_183x1_1 .tippy-content{padding:0}.tippy-box[data-theme~=light]{box-shadow:var(--swui-shadow-popover)}.tippy-box[data-theme~=outlined]{border:1px solid var(--lhds-color-blue-500)}.tippy-box[data-theme~=info]{background-color:var(--lhds-color-blue-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=info] .tippy-arrow{color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning]{background-color:var(--lhds-color-orange-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=warning] .tippy-arrow{color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error]{background-color:var(--lhds-color-red-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=error] .tippy-arrow{color:var(--lhds-color-red-50)}.tippy-box[data-theme~=info][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-red-50)}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:
|
|
1
|
+
(function(){"use strict";try{var r=document.createElement("style");r.appendChild(document.createTextNode('._noPadding_183x1_1 .tippy-content{padding:0}.tippy-box[data-theme~=light]{box-shadow:var(--swui-shadow-popover)}.tippy-box[data-theme~=outlined]{border:1px solid var(--lhds-color-blue-500)}.tippy-box[data-theme~=info]{background-color:var(--lhds-color-blue-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=info] .tippy-arrow{color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning]{background-color:var(--lhds-color-orange-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=warning] .tippy-arrow{color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error]{background-color:var(--lhds-color-red-50);color:var(--swui-text-primary-color)}.tippy-box[data-theme~=error] .tippy-arrow{color:var(--lhds-color-red-50)}.tippy-box[data-theme~=info][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=info][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-blue-50)}.tippy-box[data-theme~=warning][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=warning][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-orange-50)}.tippy-box[data-theme~=error][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-red-50)}.tippy-box[data-theme~=error][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-red-50)}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.5;outline:0;transition-property:visibility,opacity,-webkit-transform;transition-property:transform,visibility,opacity;transition-property:transform,visibility,opacity,-webkit-transform}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;-webkit-transform-origin:center top;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;-webkit-transform-origin:center bottom;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;-webkit-transform-origin:center left;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;-webkit-transform-origin:center right;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}.tippy-box[data-theme~=dark]{color:var(--lhds-color-ui-50);box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=top]>.tippy-arrow:before{border-top-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=left]>.tippy-arrow:before{border-left-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark][data-placement^=right]>.tippy-arrow:before{border-right-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-backdrop{background-color:var(--lhds-color-ui-800)}.tippy-box[data-theme~=dark]>.tippy-svg-arrow{fill:var(--lhds-color-ui-800)}._tooltip_1i1mn_1{display:flex;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;align-items:center;border-radius:var(--swui-border-radius);padding:var(--swui-metrics-spacing) calc(var(--swui-metrics-indent) * 2)}._tooltip_1i1mn_1._withIcon_1i1mn_8{padding:calc(var(--swui-metrics-spacing) * .5);padding-right:calc(var(--swui-metrics-indent) * 2)}._iconWrapper_1i1mn_14{--current-bg-color: transparent;--current-border-color: var(--lhds-color-ui-50);--current-icon-color: var(--lhds-color-ui-50);display:inline-flex;flex-direction:row;white-space:nowrap;background-color:var(--current-bg-color);border:1px solid var(--current-border-color);border-radius:var(--swui-border-radius);padding:calc(var(--swui-metrics-spacing) * .5);align-items:flex-start}._iconWrapper_1i1mn_14 svg{color:var(--current-icon-color)}._iconWrapper_1i1mn_14._info_1i1mn_34{--current-border-color: var(--lhds-color-blue-300);--current-bg-color: var(--lhds-color-blue-100);--current-icon-color: var(--lhds-color-blue-700)}._iconWrapper_1i1mn_14._warning_1i1mn_40{--current-border-color: var(--lhds-color-orange-300);--current-bg-color: var(--lhds-color-orange-100);--current-icon-color: var(--lhds-color-orange-700)}._iconWrapper_1i1mn_14._error_1i1mn_46{--current-border-color: var(--lhds-color-red-300);--current-bg-color: var(--lhds-color-red-100);--current-icon-color: var(--lhds-color-red-700)}')),document.head.appendChild(r)}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
2
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@stenajs-webui/core"),r=require("@stenajs-webui/elements"),n=require("react/jsx-runtime"),b=require("@tippyjs/react"),u=require("react"),q=require("classnames"),z=require("@stenajs-webui/theme"),h=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},B=h(b),j=h(q),W=({text:t="Are you sure?",yesLabel:e="Yes",noLabel:o="No",onNo:i,onYes:l,loading:c})=>n.jsxs(s.Column,{position:"relative",children:[n.jsxs("div",{style:{opacity:c?0:1},children:[n.jsx(s.Text,{children:t}),n.jsx(s.Space,{}),n.jsxs(s.Row,{justifyContent:"flex-end",alignItems:"center",children:[n.jsx(r.FlatButton,{label:o,onClick:i}),n.jsx(s.Space,{}),n.jsx(r.PrimaryButton,{label:e,onClick:l})]})]}),c&&n.jsx(s.Row,{justifyContent:"center",alignItems:"center",left:0,top:0,width:"100%",height:"100%",position:"absolute",children:n.jsx(r.Spinner,{size:"small"})})]}),R="_noPadding_183x1_1",k={noPadding:R};const M=(t=[])=>{const[e,o]=u.useState(!1);return{plugins:[u.useMemo(()=>({fn:()=>({onShow:()=>o(!0),onHidden:()=>o(!1)})}),[o]),...t],mounted:e}},_={noPadding:k.noPadding},m={standard:"light",info:"info",warning:"warning",error:"error",outlined:"outlined"},d=({visible:t,trigger:e="mouseenter",children:o,tippyRef:i,delay:l=0,variant:c="standard",disablePadding:p,content:f,maxWidth:y="500px",plugins:w,lazy:P,arrow:v=!0,theme:T="light",...I})=>{var x;const{plugins:C,mounted:S}=M(w);return n.jsx(B.default,{interactive:!0,className:_.noPadding,trigger:t!==void 0?void 0:e,visible:t,theme:`${T} ${(x=m[c])!=null?x:m.standard}`,delay:l,maxWidth:y,arrow:v,content:(!P||S)&&n.jsx(s.Box,{spacing:!p&&1,indent:!p&&1,children:f}),plugins:C,...I,children:n.jsx("div",{ref:i,children:o})})},N=({children:t,onShow:e,onHide:o,...i})=>n.jsx(d,{content:t,trigger:"click",zIndex:1e3,onShow:e,onHide:o,children:n.jsx(r.FlatButton,{...i})}),A="_tooltip_1i1mn_1",F="_withIcon_1i1mn_8",$="_iconWrapper_1i1mn_14",E="_info_1i1mn_34",L="_warning_1i1mn_40",D="_error_1i1mn_46",a={tooltip:A,withIcon:F,iconWrapper:$,info:E,warning:L,error:D},H={info:r.stenaInfoCircle,warning:r.stenaExclamationCircle,error:r.stenaExclamationTriangle},g=({label:t})=>n.jsx(s.Text,{color:z.cssColor("--lhds-color-ui-50"),size:"small",variant:"bold",children:t}),O=({label:t,variant:e,children:o,...i})=>n.jsx(d,{theme:"dark",...i,disablePadding:!0,content:n.jsx("div",{className:j.default(a.tooltip,e?a.withIcon:null),children:e?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:j.default(a.iconWrapper,a[e]),children:n.jsx(r.Icon,{icon:H[e],size:16})}),n.jsx(s.Space,{}),n.jsx(g,{label:t})]}):n.jsx(g,{label:t})}),children:o}),Y=()=>{const t=u.useRef();return[e=>{var o;t.current=(o=e==null?void 0:e._tippy)!=null?o:void 0},t]};exports.ActionPrompt=W;exports.ButtonWithPopover=N;exports.Popover=d;exports.Tooltip=O;exports.tippyStyles=_;exports.useTippyInstance=Y;
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stenajs-webui/tooltip",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.12.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "mattias800",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"deploy": "gh-pages -d example/build"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@stenajs-webui/core": "18.
|
|
30
|
-
"@stenajs-webui/elements": "18.
|
|
31
|
-
"@stenajs-webui/theme": "18.
|
|
29
|
+
"@stenajs-webui/core": "18.12.0",
|
|
30
|
+
"@stenajs-webui/elements": "18.12.0",
|
|
31
|
+
"@stenajs-webui/theme": "18.12.0",
|
|
32
32
|
"@tippyjs/react": "^4.1.0",
|
|
33
33
|
"classnames": "^2.3.1",
|
|
34
34
|
"tippy.js": "^6.2.6"
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"files": [
|
|
56
56
|
"dist"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "d0bc10e9bd393ffa69851bed86e6929d632aae2a"
|
|
59
59
|
}
|