@luzmo/lucero 1.0.1-alpha.14 → 1.0.1-alpha.15
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/accordion/index.cjs +2 -2
- package/components/accordion/index.js +1 -1
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +1 -1
- package/components/action-button/index.cjs +2 -2
- package/components/action-button/index.js +1 -1
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +2 -2
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +2 -2
- package/components/calendar/index.cjs +1 -1
- package/components/calendar/index.js +1 -1
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +1 -1
- package/components/{clear-button-DQcRdcUa.js → clear-button-BbVqNU-g.js} +1 -1
- package/components/{clear-button-OFUFFe7G.cjs → clear-button-DYdeFsS8.cjs} +1 -1
- package/components/{close-button-Cbnb7XXj.cjs → close-button-CpfKibqg.cjs} +1 -1
- package/components/{close-button-CqHYZhum.js → close-button-DzOZZmkY.js} +1 -1
- package/components/color-field/index.cjs +1 -1
- package/components/color-field/index.js +1 -1
- package/components/color-menu/index.cjs +3 -3
- package/components/color-menu/index.js +1 -1
- package/components/date-time-picker/index.cjs +1 -1
- package/components/date-time-picker/index.js +2 -2
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +1 -1
- package/components/{index-Wq3qZJGh.cjs → index-BQoI8AD3.cjs} +1 -1
- package/components/{index-Cl54m8Yh.js → index-Cb9zsiz6.js} +1 -1
- package/components/index.cjs +1 -1
- package/components/index.js +5 -5
- package/components/{luzmo-icons-D4IvHgVd.cjs → luzmo-icons-D47EGj-3.cjs} +2 -2
- package/components/{luzmo-icons-4nDFv1Lq.js → luzmo-icons-NEyaMpEM.js} +12 -12
- package/components/menu/index.cjs +4 -4
- package/components/menu/index.js +1 -1
- package/components/number-field/index.cjs +5 -5
- package/components/number-field/index.js +5 -5
- package/components/options/index.cjs +8 -8
- package/components/options/index.js +1 -1
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/{picker-BfBP7XJN.js → picker-CAYj4hBD.js} +1 -1
- package/components/{picker-xIphqE6d.cjs → picker-apS0Zrly.cjs} +4 -4
- package/components/picker-button/index.cjs +1 -1
- package/components/picker-button/index.js +1 -1
- package/components/search/index.cjs +1 -1
- package/components/search/index.js +2 -2
- package/components/select/index.cjs +6 -6
- package/components/select/index.js +1 -1
- package/components/swatch/index.cjs +2 -2
- package/components/swatch/index.js +7 -7
- package/components/tabs/index.cjs +1 -1
- package/components/tabs/index.js +1 -1
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +1 -1
- package/components/text-field/index.cjs +2 -2
- package/components/text-field/index.js +5 -5
- package/components/{text-field-CeG75PPO.cjs → text-field-BYF2RHY8.cjs} +4 -4
- package/components/{text-field-DCl-AFM-.js → text-field-PYafEYeO.js} +5 -5
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +2 -2
- package/components/tooltip/index.cjs +2 -2
- package/components/tooltip/index.js +52 -29
- package/components/tooltip/tooltip.d.ts +12 -1
- package/components/unit-input/index.cjs +3 -3
- package/components/unit-input/index.js +1 -1
- package/custom-elements.json +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import { a as z, r as d, x as s, n } from "../base-WsynuqaS.js";
|
|
18
|
+
import { a as z, r as d, x as s, n as p } from "../base-WsynuqaS.js";
|
|
19
19
|
import { e as u } from "../query-D_KR_GUc.js";
|
|
20
20
|
import { o as h } from "../if-defined-DOaE2coe.js";
|
|
21
21
|
import { f as g } from "../focusable-selectors-B4YgbghQ.js";
|
|
@@ -23,16 +23,16 @@ import { D as b } from "../dependency-manger-CEXvGQUV.js";
|
|
|
23
23
|
import { S as f } from "../sized-mixin-D4ACoVUr.js";
|
|
24
24
|
const c = () => {
|
|
25
25
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const n = document.createElement("style");
|
|
27
|
+
n.setAttribute("data-luzmo-vars", ""), n.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(n);
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
c();
|
|
31
31
|
const v = "#tooltip{pointer-events:none;visibility:hidden;opacity:0;transition:transform .13s ease-in-out,opacity .13s ease-in-out,visibility 0s linear .13s;transition:transform var(--luzmo-overlay-animation-duration, .13s) ease-in-out,opacity var(--luzmo-overlay-animation-duration, .13s) ease-in-out,visibility 0s linear var(--luzmo-overlay-animation-duration, .13s)}:host([open]) #tooltip{pointer-events:auto;visibility:visible;opacity:1;transition-delay:0s;transition-delay:var(--luzmo-overlay-animation-duration-opened, 0s)}@media (forced-colors: active){#tooltip{border:1px solid rgba(0,0,0,0)}#tip{--highcontrast-tooltip-background-color-default: CanvasText;--highcontrast-tooltip-background-color-informative: CanvasText;--highcontrast-tooltip-background-color-positive: CanvasText;--highcontrast-tooltip-background-color-negative: CanvasText;forced-color-adjust:none}}#tooltip{box-sizing:border-box;vertical-align:top;inline-size:auto;padding-inline:var(--luzmo-tooltip-spacing-inline, .688rem);border-radius:var(--luzmo-tooltip-border-radius, .313rem);block-size:auto;min-block-size:var(--luzmo-tooltip-height, 1.875rem);max-inline-size:var(--luzmo-tooltip-max-inline-size, 12.5rem);background-color:var(--highcontrast-tooltip-background-color-default, var(--luzmo-tooltip-background-color-default, rgb(109, 109, 109)));color:var(--luzmo-tooltip-content-color, white);font-size:var(--luzmo-tooltip-font-size, var(--tooltip-font-size, .938rem));font-weight:var(--luzmo-tooltip-font-weight, 400);line-height:var(--luzmo-tooltip-line-height, 1.3);word-break:break-word;-webkit-font-smoothing:antialiased;cursor:default;-webkit-user-select:none;user-select:none;flex-direction:row;align-items:center;display:inline-flex;position:relative}:host(:lang(ja)) #tooltip,:host(:lang(ko)) #tooltip,:host(:lang(zh)) #tooltip{line-height:var(--luzmo-tooltip-cjk-line-height, 1.5)}#tooltip p{margin:0}:host([variant=info]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-informative, var(--luzmo-tooltip-background-color-informative, rgb(2, 101, 220)))}:host([variant=positive]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-positive, var(--luzmo-tooltip-background-color-positive, rgb(0, 122, 77)))}:host([variant=negative]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-negative, var(--luzmo-tooltip-background-color-negative, rgb(211, 21, 16)))}#tip{block-size:var(--luzmo-tooltip-tip-square-size, .625rem);inline-size:var(--luzmo-tooltip-tip-square-size, .625rem);inset-block-start:100%;background-color:var(--highcontrast-tooltip-background-color-default, var(--luzmo-tooltip-background-color-default, rgb(109, 109, 109)));clip-path:polygon(0 calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)),50% var(--luzmo-tooltip-tip-height-percentage, 50%),100% calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)));position:absolute;left:50%;transform:translate(-50%)}:host([variant=info]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-informative, var(--luzmo-tooltip-background-color-informative, rgb(2, 101, 220)))}:host([variant=positive]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-positive, var(--luzmo-tooltip-background-color-positive, rgb(0, 122, 77)))}:host([variant=negative]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-negative, var(--luzmo-tooltip-background-color-negative, rgb(211, 21, 16)))}:host([placement*=top]) #tooltip #tip,.luzmo-Tooltip--top-end #tip,.luzmo-Tooltip--top-left #tip,.luzmo-Tooltip--top-right #tip,.luzmo-Tooltip--top-start #tip{inset-block-start:100%}:host([placement*=bottom]) #tooltip #tip,.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--bottom-start #tip{clip-path:polygon(50% calc(100% - var(--luzmo-tooltip-tip-height-percentage, 50%)),0 calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)),100% calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)));inset-block:auto 100%}.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--bottom-start #tip,.luzmo-Tooltip--top-end #tip,.luzmo-Tooltip--top-left #tip,.luzmo-Tooltip--top-right #tip,.luzmo-Tooltip--top-start #tip{transform:none}.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--top-left #tip{inset-inline-start:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--top-right #tip{inset-inline:auto var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-start #tip,.luzmo-Tooltip--top-start #tip{inset-inline:var(--luzmo-tooltip-pointer-corner-spacing, .313rem) auto}.luzmo-Tooltip--bottom-start #tip:dir(rtl),.luzmo-Tooltip--top-start #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--bottom-start #tip,:host([dir=rtl]) .luzmo-Tooltip--top-start #tip{right:var(--luzmo-tooltip-pointer-corner-spacing, .313rem);left:auto}.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--top-end #tip{inset-inline:auto var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-end #tip:dir(rtl),.luzmo-Tooltip--top-end #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--bottom-end #tip,:host([dir=rtl]) .luzmo-Tooltip--top-end #tip{left:var(--luzmo-tooltip-pointer-corner-spacing, .313rem);right:auto}.luzmo-Tooltip--end #tip,.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,:host([placement*=left]) #tooltip #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,:host([placement*=right]) #tooltip #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:50%;transform:translateY(-50%)}.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:auto;transform:none}.luzmo-Tooltip--end #tip,.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,:host([placement*=right]) #tooltip #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip{clip-path:polygon(calc(100% - var(--luzmo-tooltip-tip-height-percentage, 50%)) 50%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0);inset-inline:auto 100%}:host([placement*=left]) #tooltip #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--start #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{clip-path:polygon(calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0,calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,var(--luzmo-tooltip-tip-height-percentage, 50%) 50%);inset-inline-start:100%}.luzmo-Tooltip--end-top #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--start-bottom #tip{inset-block-end:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--end #tip:dir(rtl),.luzmo-Tooltip--end-bottom #tip:dir(rtl),.luzmo-Tooltip--end-top #tip:dir(rtl),:host([placement*=left]) #tooltip #tip:dir(rtl),.luzmo-Tooltip--left-bottom #tip:dir(rtl),.luzmo-Tooltip--left-top #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--end #tip,:host([dir=rtl]) .luzmo-Tooltip--end-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--end-top #tip,:host([dir=rtl][placement*=left]) #tooltip #tip,:host([dir=rtl]) .luzmo-Tooltip--left-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--left-top #tip{clip-path:polygon(calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0,calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,var(--luzmo-tooltip-tip-height-percentage, 50%) 50%);left:100%;right:auto}:host([placement*=right]) #tooltip #tip:dir(rtl),.luzmo-Tooltip--right-bottom #tip:dir(rtl),.luzmo-Tooltip--right-top #tip:dir(rtl),.luzmo-Tooltip--start #tip:dir(rtl),.luzmo-Tooltip--start-bottom #tip:dir(rtl),.luzmo-Tooltip--start-top #tip:dir(rtl),:host([dir=rtl][placement*=right]) #tooltip #tip,:host([dir=rtl]) .luzmo-Tooltip--right-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--right-top #tip,:host([dir=rtl]) .luzmo-Tooltip--start #tip,:host([dir=rtl]) .luzmo-Tooltip--start-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--start-top #tip{clip-path:polygon(var(--luzmo-tooltip-tip-height-percentage, 50%) 50%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0);left:auto;right:100%}::slotted([slot=icon]){inline-size:var(--luzmo-tooltip-icon-width, 1.125rem);block-size:var(--luzmo-tooltip-icon-height, 1.125rem);flex-shrink:0;align-self:flex-start;margin-block-start:var(--luzmo-tooltip-icon-spacing-block-start, .313rem);margin-inline-start:calc(var(--luzmo-tooltip-icon-spacing-inline-start, .563rem) - var(--luzmo-tooltip-spacing-inline, .688rem));margin-inline-end:var(--luzmo-tooltip-icon-spacing-inline-end, .563rem)}#label{line-height:var(--luzmo-tooltip-line-height, 1.3);margin-block-start:var(--luzmo-tooltip-spacing-block-start, .313rem);margin-block-end:var(--luzmo-tooltip-spacing-block-end, .375rem)}#tooltip,:host([placement*=top]) #tooltip,.luzmo-Tooltip--top-end,.luzmo-Tooltip--top-left,.luzmo-Tooltip--top-right,.luzmo-Tooltip--top-start{margin-block-end:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--top-end,:host([open]) .luzmo-Tooltip--top-left,:host([open]) .luzmo-Tooltip--top-right,:host([open]) .luzmo-Tooltip--top-start,:host([placement*=top][open]) #tooltip,:host([open]) #tooltip{transform:translateY(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host([placement*=bottom]) #tooltip,.luzmo-Tooltip--bottom-end,.luzmo-Tooltip--bottom-left,.luzmo-Tooltip--bottom-right,.luzmo-Tooltip--bottom-start{margin-block-start:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--bottom-end,:host([open]) .luzmo-Tooltip--bottom-left,:host([open]) .luzmo-Tooltip--bottom-right,:host([open]) .luzmo-Tooltip--bottom-start,:host([placement*=bottom][open]) #tooltip{transform:translateY(var(--luzmo-tooltip-animation-distance, .313rem))}:host([placement*=right]) #tooltip,.luzmo-Tooltip--right-bottom,.luzmo-Tooltip--right-top{margin-left:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--right-bottom,:host([open]) .luzmo-Tooltip--right-top,:host([placement*=right][open]) #tooltip{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}:host([placement*=left]) #tooltip,.luzmo-Tooltip--left-bottom,.luzmo-Tooltip--left-top{margin-right:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--left-bottom,:host([open]) .luzmo-Tooltip--left-top,:host([placement*=left][open]) #tooltip{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}.luzmo-Tooltip--start,.luzmo-Tooltip--start-bottom,.luzmo-Tooltip--start-top{margin-inline-end:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--start-bottom,:host([open]) .luzmo-Tooltip--start-top,:host([open]) .luzmo-Tooltip--start{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host([open]) .luzmo-Tooltip--start-bottom:dir(rtl),:host([open]) .luzmo-Tooltip--start-top:dir(rtl),:host([open]) .luzmo-Tooltip--start:dir(rtl),:host([dir=rtl][open]) .luzmo-Tooltip--start-bottom,:host([dir=rtl][open]) .luzmo-Tooltip--start-top,:host([dir=rtl][open]) .luzmo-Tooltip--start{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}.luzmo-Tooltip--end,.luzmo-Tooltip--end-bottom,.luzmo-Tooltip--end-top{margin-inline-start:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--end-bottom,:host([open]) .luzmo-Tooltip--end-top,:host([open]) .luzmo-Tooltip--end{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}:host([open]) .luzmo-Tooltip--end-bottom:dir(rtl),:host([open]) .luzmo-Tooltip--end-top:dir(rtl),:host([open]) .luzmo-Tooltip--end:dir(rtl),:host([dir=rtl][open]) .luzmo-Tooltip--end-bottom,:host([dir=rtl][open]) .luzmo-Tooltip--end-top,:host([dir=rtl][open]) .luzmo-Tooltip--end{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host{--luzmo-tooltip-background-color-default: rgb(0, 0, 0);--tooltip-font-size: var(--luzmo-font-size)}:host([size=s]){--tooltip-font-size: var(--luzmo-font-size-s)}:host([size=m]){--tooltip-font-size: var(--luzmo-font-size-m)}:host([size=l]){--tooltip-font-size: var(--luzmo-font-size-l)}:host([size=xl]){--tooltip-font-size: var(--luzmo-font-size-xl)}:host{display:contents;white-space:initial}#tooltip{inline-size:max-content}#tip{clip-path:polygon(0 -5%,50% 50%,100% -5%);width:.625rem!important;height:.625rem!important}#tip[style]{transform:none!important}:host(:not([placement*=top])) #tooltip{margin-bottom:0}:host([placement*=top]) #tooltip #tip{inset-block-start:100%}:host([placement*=bottom]) #tooltip #tip{inset-block-end:100%;clip-path:polygon(50% 50%,0 105%,100% 105%);top:auto}:host([placement*=left]) #tooltip #tip,:host([placement*=right]) #tooltip #tip{inset-block-start:50%;transform:translateY(-50%)}:host([placement*=right]) #tooltip #tip{clip-path:polygon(50% 50%,105% 100%,105% 0);inset-inline:calc(var(--luzmo-tooltip-tip-block-size, .313rem) * -2) 100%}:host([placement*=left]) #tooltip #tip{clip-path:polygon(-5% 0,-5% 100%,50% 50%);inset-inline-start:100%}luzmo-overlay:not(:defined){display:none}";
|
|
32
|
-
var T = Object.defineProperty, y = Object.getOwnPropertyDescriptor,
|
|
33
|
-
for (var
|
|
34
|
-
(m =
|
|
35
|
-
return l &&
|
|
32
|
+
var T = Object.defineProperty, y = Object.getOwnPropertyDescriptor, e = (n, o, t, l) => {
|
|
33
|
+
for (var r = l > 1 ? void 0 : l ? y(o, t) : o, a = n.length - 1, m; a >= 0; a--)
|
|
34
|
+
(m = n[a]) && (r = (l ? m(o, t, r) : m(r)) || r);
|
|
35
|
+
return l && r && T(o, t, r), r;
|
|
36
36
|
};
|
|
37
37
|
class x extends HTMLElement {
|
|
38
38
|
constructor() {
|
|
@@ -98,7 +98,7 @@ class i extends f(z, {
|
|
|
98
98
|
defaultSize: "s"
|
|
99
99
|
}) {
|
|
100
100
|
constructor() {
|
|
101
|
-
super(...arguments), this.delayed = !1, this.dependencyManager = new b(this), this.disabled = !1, this.selfManaged = !1, this.offset = 0, this.
|
|
101
|
+
super(...arguments), this.delayed = !1, this.dependencyManager = new b(this), this.disabled = !1, this.showOnlyIfTruncated = !1, this.selfManaged = !1, this.offset = 0, this._open = !1, this._variant = "", this.handleOpenOverlay = () => {
|
|
102
102
|
this.open = !0;
|
|
103
103
|
}, this.handleCloseOverlay = () => {
|
|
104
104
|
this.open = !1;
|
|
@@ -107,6 +107,12 @@ class i extends f(z, {
|
|
|
107
107
|
static get styles() {
|
|
108
108
|
return [d(v)];
|
|
109
109
|
}
|
|
110
|
+
get open() {
|
|
111
|
+
return this._open;
|
|
112
|
+
}
|
|
113
|
+
set open(o) {
|
|
114
|
+
o && this.showOnlyIfTruncated && !this.isContentTruncated() || (this._open = o);
|
|
115
|
+
}
|
|
110
116
|
get variant() {
|
|
111
117
|
return this._variant;
|
|
112
118
|
}
|
|
@@ -119,6 +125,17 @@ class i extends f(z, {
|
|
|
119
125
|
this.removeAttribute("variant"), this._variant = "";
|
|
120
126
|
}
|
|
121
127
|
}
|
|
128
|
+
isContentTruncated() {
|
|
129
|
+
const o = this.triggerElement;
|
|
130
|
+
if (!o)
|
|
131
|
+
return !1;
|
|
132
|
+
if (this.truncatedElementSelector) {
|
|
133
|
+
const t = o.querySelector(this.truncatedElementSelector);
|
|
134
|
+
if (t)
|
|
135
|
+
return t.scrollWidth > t.clientWidth;
|
|
136
|
+
}
|
|
137
|
+
return o.scrollWidth > o.clientWidth;
|
|
138
|
+
}
|
|
122
139
|
forwardTransitionEvent(o) {
|
|
123
140
|
this.dispatchEvent(
|
|
124
141
|
new TransitionEvent(o.type, {
|
|
@@ -129,13 +146,13 @@ class i extends f(z, {
|
|
|
129
146
|
);
|
|
130
147
|
}
|
|
131
148
|
get triggerElement() {
|
|
132
|
-
var
|
|
149
|
+
var r;
|
|
133
150
|
let o = this.assignedSlot || this, t = o.getRootNode();
|
|
134
151
|
if (t === document)
|
|
135
152
|
return null;
|
|
136
153
|
let l = o.parentElement || t.host || /* c8 ignore next 1 */
|
|
137
154
|
t;
|
|
138
|
-
for (; !((
|
|
155
|
+
for (; !((r = l == null ? void 0 : l.matches) != null && r.call(l, g)); ) {
|
|
139
156
|
if (o = l.assignedSlot || l, t = o.getRootNode(), t === document)
|
|
140
157
|
return null;
|
|
141
158
|
l = o.parentElement || t.host || /* c8 ignore next 1 */
|
|
@@ -186,35 +203,41 @@ class i extends f(z, {
|
|
|
186
203
|
});
|
|
187
204
|
}
|
|
188
205
|
}
|
|
189
|
-
|
|
190
|
-
|
|
206
|
+
e([
|
|
207
|
+
p({ type: Boolean })
|
|
191
208
|
], i.prototype, "delayed", 2);
|
|
192
|
-
|
|
193
|
-
|
|
209
|
+
e([
|
|
210
|
+
p({ type: Boolean })
|
|
194
211
|
], i.prototype, "disabled", 2);
|
|
195
|
-
|
|
196
|
-
|
|
212
|
+
e([
|
|
213
|
+
p({ type: Boolean, attribute: "show-only-if-truncated" })
|
|
214
|
+
], i.prototype, "showOnlyIfTruncated", 2);
|
|
215
|
+
e([
|
|
216
|
+
p({ type: String, attribute: "truncated-element-selector" })
|
|
217
|
+
], i.prototype, "truncatedElementSelector", 2);
|
|
218
|
+
e([
|
|
219
|
+
p({ type: Boolean, attribute: "self-managed" })
|
|
197
220
|
], i.prototype, "selfManaged", 2);
|
|
198
|
-
|
|
199
|
-
|
|
221
|
+
e([
|
|
222
|
+
p({ type: Number })
|
|
200
223
|
], i.prototype, "offset", 2);
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
], i.prototype, "open",
|
|
204
|
-
|
|
224
|
+
e([
|
|
225
|
+
p({ type: Boolean, reflect: !0 })
|
|
226
|
+
], i.prototype, "open", 1);
|
|
227
|
+
e([
|
|
205
228
|
u("luzmo-overlay")
|
|
206
229
|
], i.prototype, "overlayElement", 2);
|
|
207
|
-
|
|
208
|
-
|
|
230
|
+
e([
|
|
231
|
+
p({ reflect: !0 })
|
|
209
232
|
], i.prototype, "placement", 2);
|
|
210
|
-
|
|
233
|
+
e([
|
|
211
234
|
u("#tip")
|
|
212
235
|
], i.prototype, "tipElement", 2);
|
|
213
|
-
|
|
214
|
-
|
|
236
|
+
e([
|
|
237
|
+
p({ type: Number })
|
|
215
238
|
], i.prototype, "tipPadding", 2);
|
|
216
|
-
|
|
217
|
-
|
|
239
|
+
e([
|
|
240
|
+
p({ type: String })
|
|
218
241
|
], i.prototype, "variant", 1);
|
|
219
242
|
customElements.get("luzmo-tooltip") || customElements.define("luzmo-tooltip", i);
|
|
220
243
|
export {
|
|
@@ -27,13 +27,23 @@ export declare class LuzmoTooltip extends LuzmoTooltip_base {
|
|
|
27
27
|
* Whether to prevent a self-managed Tooltip from responding to user input.
|
|
28
28
|
*/
|
|
29
29
|
disabled: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Whether to show the tooltip only if the content is truncated.
|
|
32
|
+
*/
|
|
33
|
+
showOnlyIfTruncated: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The selector of the element to check for truncation.
|
|
36
|
+
*/
|
|
37
|
+
truncatedElementSelector?: string;
|
|
30
38
|
/**
|
|
31
39
|
* Automatically bind to the parent element of the assigned `slot` or the parent element of the `luzmo-tooltip`.
|
|
32
40
|
* Without this, you must provide your own `overlay-trigger`.
|
|
33
41
|
*/
|
|
34
42
|
selfManaged: boolean;
|
|
35
43
|
offset: number;
|
|
36
|
-
|
|
44
|
+
private _open;
|
|
45
|
+
get open(): boolean;
|
|
46
|
+
set open(value: boolean);
|
|
37
47
|
overlayElement?: LuzmoOverlay;
|
|
38
48
|
/**
|
|
39
49
|
* @type {"top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end"}
|
|
@@ -45,6 +55,7 @@ export declare class LuzmoTooltip extends LuzmoTooltip_base {
|
|
|
45
55
|
private _variant;
|
|
46
56
|
get variant(): string;
|
|
47
57
|
set variant(variant: string);
|
|
58
|
+
private isContentTruncated;
|
|
48
59
|
private handleOpenOverlay;
|
|
49
60
|
protected handleCloseOverlay: () => void;
|
|
50
61
|
protected forwardTransitionEvent(event: TransitionEvent): void;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../base-CBCg3yyw.cjs"),h=require("../state-D8JEtYqe.cjs"),d=require("../luzmo-icons-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../base-CBCg3yyw.cjs"),h=require("../state-D8JEtYqe.cjs"),d=require("../luzmo-icons-D47EGj-3.cjs"),x=require("../style-map-CeilmSgs.cjs"),z="*,*:before,*:after{box-sizing:border-box}:host{display:flex;flex:1 1 auto}svg{height:.75em}.unit-input-container{width:100%;position:relative;display:flex;height:1.875rem;box-sizing:border-box;border-radius:var(--luzmo-border-radius)}.unit-input-container input{box-sizing:border-box;min-width:0;width:100%;line-height:1.6rem;color:var(--luzmo-font-color);padding-left:var(--luzmo-spacing-3);padding-right:var(--luzmo-spacing-5);outline:none;border:var(--luzmo-border-width) solid var(--luzmo-border-color);border-radius:var(--luzmo-border-radius);background:transparent;font-weight:400;text-align:right;transition:border .2s ease-in-out}.unit-input-container input:focus{border:var(--luzmo-border-width) solid var(--luzmo-primary);background:var(--luzmo-background-color-hover)}.unit-input-container input:focus~.ticks{border:var(--luzmo-border-width) solid var(--luzmo-primary)}.unit-input-container input:focus~.ticks .tick-up{border-bottom:var(--luzmo-border-width) solid var(--luzmo-primary)}.unit-input-container .unit{position:absolute;box-sizing:border-box;display:flex;align-items:center;justify-content:center;right:1.125rem;color:var(--luzmo-font-color-disabled);padding:0 var(--luzmo-spacing-2);height:100%;cursor:default;-webkit-user-select:none;user-select:none;z-index:2;font-size:80%}.unit-input-container .ticks{position:absolute;display:flex;flex-direction:column;top:0;bottom:0;right:0;width:var(--luzmo-unit-input-tick-width, 1rem);-webkit-user-select:none;user-select:none;z-index:3;border:var(--luzmo-border-width) solid var(--luzmo-border-color);border-top-right-radius:var(--luzmo-border-radius);border-bottom-right-radius:var(--luzmo-border-radius);overflow:hidden;background-color:var(--luzmo-background-color-hover)}.unit-input-container .ticks>div{flex:1 1 auto;display:flex;justify-content:center;align-items:center;overflow:hidden;color:var(--luzmo-font-color);transition:all .2s ease-in-out;cursor:pointer;position:relative}.unit-input-container .ticks>div:hover{color:var(--luzmo-font-color-hard);background:var(--background-color-alt-2)}.unit-input-container .ticks>div.disabled,.unit-input-container .ticks>div.disabled:hover{cursor:not-allowed;color:var(--luzmo-font-color-disabled)!important;background-color:var(--luzmo-background-color)}.unit-input-container .ticks>div.tick-up{border-bottom:var(--luzmo-border-width) solid var(--luzmo-border-color)}.unit-input-container.with-unit input{padding-right:2.25rem}.unit-input-container.has-error input{border-color:var(--luzmo-negative-color, red)!important}.unit-input-container.has-error .ticks{border-color:var(--luzmo-negative-color, red)!important;background-color:var(--luzmo-negative-color, red)!important}.unit-input-container.has-error .tick-up,.unit-input-container.has-error .tick-down{border-color:var(--luzmo-negative-color, red)!important;background-color:var(--luzmo-negative-color, red)!important;color:#fff!important}";var w=Object.defineProperty,s=(m,t,e,i)=>{for(var a=void 0,n=m.length-1,u;n>=0;n--)(u=m[n])&&(a=u(t,e,a)||a);return a&&w(t,e,a),a};const l={min:-99999999999,max:99999999999,step:1,default:0,debounce:250},p=class p extends o.LuzmoElement{constructor(){super(),this.isDecimal=!1,this.disabled=!1,this.readOnly=!1,this.inputWidth="",this.debounce=l.debounce,this.errors=[],this.setValue=t=>{this.waitForUpdate=!0,this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))},this.debounce||0)},this.setCorrectInitialValues()}transformToNumber(t,e){let i=t;return i=this.isDecimal?Number.parseFloat(t+""):Number.parseInt(t+"",10),i=Number.isNaN(i)?Number(e):Number(i),i}onInput(t){let e=new RegExp(/[^0-9+-]/g);this.isDecimal&&(e=new RegExp(/[^0-9.,+-]/g));const i=t.target.value.replace(e,"").replaceAll(",",".");t.target.value=i,this.errors=[];const a=this.isDecimal?Number.parseFloat(i+""):Number.parseInt(i+"",10);Number.isNaN(a)&&this.errors.push("Not a number"),a<this.min&&this.errors.length===0&&this.errors.push("Value is lower than minimum"),a>this.max&&this.errors.length===0&&this.errors.push("Value is higher than maximum"),this.errors.length===0?(this.validValue=a,this.value=this.validValue,this.setValue(this.value),this.setErrorStatus(!1)):this.setErrorStatus(!0)}setErrorStatus(t){var e,i;t?(e=this.renderRoot.querySelector(".unit-input-container"))==null||e.classList.add("has-error"):(this.errors=[],(i=this.renderRoot.querySelector(".unit-input-container"))==null||i.classList.remove("has-error"))}setDisabledUpDownStatus(){this.value===this.min?this.renderRoot.querySelector(".tick-down").classList.add("disabled"):this.renderRoot.querySelector(".tick-down").classList.remove("disabled"),this.value===this.max?this.renderRoot.querySelector(".tick-up").classList.add("disabled"):this.renderRoot.querySelector(".tick-up").classList.remove("disabled")}createAndSetValidValue(t){let e=this.validValue?this.transformToNumber(t,this.validValue):this.transformToNumber(t,this.default);this.max<e&&(e=this.max),this.min>e&&(e=this.min),this.validValue=e,this.value=e}setCorrectInitialValues(){this.min=this.transformToNumber(this.min,l.min),this.max=this.transformToNumber(this.max,l.max),this.step=Math.abs(this.transformToNumber(this.step,l.step)),this.min>this.max&&(this.min=this.max),this.max<this.min+this.step&&(this.max=this.min+this.step),this.default=this.transformToNumber(this.default,l.default),this.createAndSetValidValue(this.value)}onKeydown(t){!this.disabled&&(t.key==="ArrowUp"||t.key==="ArrowDown")&&this.applyStep(t,t.key==="ArrowUp")}applyStep(t,e){var i,a,n,u,b,f;if(!this.disabled){t.preventDefault();const v=((n=(a=(i=this.validValue.toString())==null?void 0:i.split("."))==null?void 0:a[1])==null?void 0:n.length)??0,g=((f=(b=(u=this.step.toString())==null?void 0:u.split("."))==null?void 0:b[1])==null?void 0:f.length)??0,y=Math.max(v,g);let c=this.validValue+(e?this.step:-this.step);c=Number.parseFloat(c.toFixed(y)),this.createAndSetValidValue(c),this.setErrorStatus(!1),this.renderRoot.querySelector("input").value=this.validValue+"",this.setValue(this.validValue),this.setDisabledUpDownStatus()}}setPaddingRightOfInput(){const t=this.renderRoot.querySelector(".unit"),e=this.renderRoot.querySelector(".ticks"),i=this.unit?`calc(${t==null?void 0:t.offsetWidth}px + ${e==null?void 0:e.offsetWidth}px)`:`calc(${e==null?void 0:e.offsetWidth}px + var(--luzmo-spacing-3))`;this.renderRoot.querySelector("input").style.paddingRight=i}updated(t){t.has("value")&&(this.setCorrectInitialValues(),this.waitForUpdate?this.waitForUpdate=!1:this.renderRoot.querySelector("input").value=this.value+"",this.setPaddingRightOfInput())}render(){return o.x`
|
|
19
19
|
<div style=${x.o(this.inputWidth?{width:this.inputWidth}:{})}>
|
|
20
20
|
<input
|
|
21
21
|
.min=${String(this.min)}
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
class="tick-up"
|
|
30
30
|
@click=${{handleEvent:t=>this.applyStep(t,!0)}}
|
|
31
31
|
>
|
|
32
|
-
${d.
|
|
32
|
+
${d.p3(d.b)}
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
<div
|
|
36
36
|
class="tick-down"
|
|
37
37
|
@click=${{handleEvent:t=>this.applyStep(t,!1)}}
|
|
38
38
|
>
|
|
39
|
-
${d.
|
|
39
|
+
${d.p3(d.T)}
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* */
|
|
18
18
|
import { a as w, r as k, x as f, n as u } from "../base-WsynuqaS.js";
|
|
19
19
|
import { r as m } from "../state-Deh-vKYE.js";
|
|
20
|
-
import {
|
|
20
|
+
import { p as z, b as S, T as V } from "../luzmo-icons-NEyaMpEM.js";
|
|
21
21
|
import { o as N } from "../style-map-IgqIKvlE.js";
|
|
22
22
|
const y = () => {
|
|
23
23
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|