@haiilo/catalyst 6.3.3 → 6.4.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/catalyst/catalyst.css +7 -0
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js.map +1 -1
- package/dist/catalyst/p-12fa3edc.js +3 -0
- package/dist/catalyst/p-12fa3edc.js.map +1 -0
- package/dist/catalyst/{p-2ecedf97.entry.js → p-d3a118b5.entry.js} +4 -4
- package/dist/catalyst/p-d3a118b5.entry.js.map +1 -0
- package/dist/catalyst/p-dd8ae83e.js.map +1 -1
- package/dist/catalyst/scss/fonts/_fonts-mixins.scss +4 -0
- package/dist/catalyst/scss/fonts/_fonts.mixins.ss3v.scss +13 -0
- package/dist/cjs/cat-alert_26.cjs.entry.js +231 -259
- package/dist/cjs/cat-alert_26.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +2 -2
- package/dist/cjs/catalyst.cjs.js.map +1 -1
- package/dist/cjs/{index-8d1f4d8e.js → index-b4391019.js} +86 -10
- package/dist/cjs/index-b4391019.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/cat-button/cat-button.css +14 -2
- package/dist/collection/components/cat-button/cat-button.js +2 -2
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +1 -1
- package/dist/collection/components/cat-select/cat-select.js +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +1 -1
- package/dist/collection/scss/fonts/_fonts-mixins.scss +4 -0
- package/dist/collection/scss/fonts/_fonts.mixins.ss3v.scss +13 -0
- package/dist/components/cat-button2.js +1 -1
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/floating-ui.dom.esm.js +237 -265
- package/dist/components/floating-ui.dom.esm.js.map +1 -1
- package/dist/esm/cat-alert_26.entry.js +231 -259
- package/dist/esm/cat-alert_26.entry.js.map +1 -1
- package/dist/esm/catalyst.js +3 -3
- package/dist/esm/catalyst.js.map +1 -1
- package/dist/esm/{index-16bd9531.js → index-2c703aa8.js} +86 -10
- package/dist/esm/index-2c703aa8.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/types/components/cat-button/cat-button.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/dist/types/stencil-public-runtime.d.ts +6 -2
- package/loader/index.d.ts +1 -1
- package/package.json +11 -11
- package/dist/catalyst/p-2ecedf97.entry.js.map +0 -1
- package/dist/catalyst/p-897412f2.js +0 -3
- package/dist/catalyst/p-897412f2.js.map +0 -1
- package/dist/cjs/index-8d1f4d8e.js.map +0 -1
- package/dist/esm/index-16bd9531.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-2c703aa8.js';
|
|
2
2
|
import { f as createErrorClass, O as Observable, g as errorContext, E as EMPTY_SUBSCRIPTION, S as Subscription, h as arrRemove, i as operate, j as createOperatorSubscriber, k as innerFrom, l as executeSchedule, m as isFunction, n as identity, p as from, q as popScheduler, r as isArrayLike, s as isScheduler, t as popNumber, u as noop, v as loglevel, b as catI18nRegistry, c as createCommonjsModule, a as commonjsGlobal, e as catIconRegistry, o as of } from './of-5472d434.js';
|
|
3
3
|
|
|
4
4
|
const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
|
|
@@ -1035,7 +1035,7 @@ function createEmptyStyleRule(query) {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
|
-
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-button-decoration-hover, none);background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-button-decoration-hover, none);background-color:rgba(var(--base), 0.1)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-secondary-text-active, 0, 0, 0)}.cat-button-success{--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-danger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-primary-text:transparent;--cat-secondary-bg:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/\"\";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}";
|
|
1038
|
+
const catButtonCss = ":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-link{background-color:transparent;color:rgb(var(--text))}.cat-button-link.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-link:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-link.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-secondary-text-active, 0, 0, 0)}.cat-button-success{--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-danger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;padding-left:0;padding-right:0}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-primary-text:transparent;--cat-secondary-bg:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/\"\";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}";
|
|
1039
1039
|
|
|
1040
1040
|
const CatButton = class {
|
|
1041
1041
|
constructor(hostRef) {
|
|
@@ -4299,20 +4299,124 @@ const CatDatepickerInline = class {
|
|
|
4299
4299
|
};
|
|
4300
4300
|
CatDatepickerInline.style = catDatepickerInlineCss;
|
|
4301
4301
|
|
|
4302
|
+
const min = Math.min;
|
|
4303
|
+
const max = Math.max;
|
|
4304
|
+
const round = Math.round;
|
|
4305
|
+
const floor = Math.floor;
|
|
4306
|
+
const createCoords = v => ({
|
|
4307
|
+
x: v,
|
|
4308
|
+
y: v
|
|
4309
|
+
});
|
|
4310
|
+
const oppositeSideMap = {
|
|
4311
|
+
left: 'right',
|
|
4312
|
+
right: 'left',
|
|
4313
|
+
bottom: 'top',
|
|
4314
|
+
top: 'bottom'
|
|
4315
|
+
};
|
|
4316
|
+
const oppositeAlignmentMap = {
|
|
4317
|
+
start: 'end',
|
|
4318
|
+
end: 'start'
|
|
4319
|
+
};
|
|
4320
|
+
function clamp(start, value, end) {
|
|
4321
|
+
return max(start, min(value, end));
|
|
4322
|
+
}
|
|
4323
|
+
function evaluate(value, param) {
|
|
4324
|
+
return typeof value === 'function' ? value(param) : value;
|
|
4325
|
+
}
|
|
4326
|
+
function getSide(placement) {
|
|
4327
|
+
return placement.split('-')[0];
|
|
4328
|
+
}
|
|
4302
4329
|
function getAlignment(placement) {
|
|
4303
4330
|
return placement.split('-')[1];
|
|
4304
4331
|
}
|
|
4305
|
-
|
|
4306
|
-
|
|
4332
|
+
function getOppositeAxis(axis) {
|
|
4333
|
+
return axis === 'x' ? 'y' : 'x';
|
|
4334
|
+
}
|
|
4335
|
+
function getAxisLength(axis) {
|
|
4307
4336
|
return axis === 'y' ? 'height' : 'width';
|
|
4308
4337
|
}
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
return placement.split('-')[0];
|
|
4338
|
+
function getSideAxis(placement) {
|
|
4339
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
|
|
4312
4340
|
}
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4341
|
+
function getAlignmentAxis(placement) {
|
|
4342
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
4343
|
+
}
|
|
4344
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
4345
|
+
if (rtl === void 0) {
|
|
4346
|
+
rtl = false;
|
|
4347
|
+
}
|
|
4348
|
+
const alignment = getAlignment(placement);
|
|
4349
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
4350
|
+
const length = getAxisLength(alignmentAxis);
|
|
4351
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
4352
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
4353
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
4354
|
+
}
|
|
4355
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
4356
|
+
}
|
|
4357
|
+
function getExpandedPlacements(placement) {
|
|
4358
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
4359
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
4360
|
+
}
|
|
4361
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
4362
|
+
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
4363
|
+
}
|
|
4364
|
+
function getSideList(side, isStart, rtl) {
|
|
4365
|
+
const lr = ['left', 'right'];
|
|
4366
|
+
const rl = ['right', 'left'];
|
|
4367
|
+
const tb = ['top', 'bottom'];
|
|
4368
|
+
const bt = ['bottom', 'top'];
|
|
4369
|
+
switch (side) {
|
|
4370
|
+
case 'top':
|
|
4371
|
+
case 'bottom':
|
|
4372
|
+
if (rtl) return isStart ? rl : lr;
|
|
4373
|
+
return isStart ? lr : rl;
|
|
4374
|
+
case 'left':
|
|
4375
|
+
case 'right':
|
|
4376
|
+
return isStart ? tb : bt;
|
|
4377
|
+
default:
|
|
4378
|
+
return [];
|
|
4379
|
+
}
|
|
4380
|
+
}
|
|
4381
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
4382
|
+
const alignment = getAlignment(placement);
|
|
4383
|
+
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
4384
|
+
if (alignment) {
|
|
4385
|
+
list = list.map(side => side + "-" + alignment);
|
|
4386
|
+
if (flipAlignment) {
|
|
4387
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
4388
|
+
}
|
|
4389
|
+
}
|
|
4390
|
+
return list;
|
|
4391
|
+
}
|
|
4392
|
+
function getOppositePlacement(placement) {
|
|
4393
|
+
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
4394
|
+
}
|
|
4395
|
+
function expandPaddingObject(padding) {
|
|
4396
|
+
return {
|
|
4397
|
+
top: 0,
|
|
4398
|
+
right: 0,
|
|
4399
|
+
bottom: 0,
|
|
4400
|
+
left: 0,
|
|
4401
|
+
...padding
|
|
4402
|
+
};
|
|
4403
|
+
}
|
|
4404
|
+
function getPaddingObject(padding) {
|
|
4405
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
4406
|
+
top: padding,
|
|
4407
|
+
right: padding,
|
|
4408
|
+
bottom: padding,
|
|
4409
|
+
left: padding
|
|
4410
|
+
};
|
|
4411
|
+
}
|
|
4412
|
+
function rectToClientRect(rect) {
|
|
4413
|
+
return {
|
|
4414
|
+
...rect,
|
|
4415
|
+
top: rect.y,
|
|
4416
|
+
left: rect.x,
|
|
4417
|
+
right: rect.x + rect.width,
|
|
4418
|
+
bottom: rect.y + rect.height
|
|
4419
|
+
};
|
|
4316
4420
|
}
|
|
4317
4421
|
|
|
4318
4422
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
@@ -4320,13 +4424,14 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
4320
4424
|
reference,
|
|
4321
4425
|
floating
|
|
4322
4426
|
} = _ref;
|
|
4427
|
+
const sideAxis = getSideAxis(placement);
|
|
4428
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
4429
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
4430
|
+
const side = getSide(placement);
|
|
4431
|
+
const isVertical = sideAxis === 'y';
|
|
4323
4432
|
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
4324
4433
|
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
4325
|
-
const
|
|
4326
|
-
const length = getLengthFromAxis(mainAxis);
|
|
4327
|
-
const commonAlign = reference[length] / 2 - floating[length] / 2;
|
|
4328
|
-
const side = getSide(placement);
|
|
4329
|
-
const isVertical = mainAxis === 'x';
|
|
4434
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
4330
4435
|
let coords;
|
|
4331
4436
|
switch (side) {
|
|
4332
4437
|
case 'top':
|
|
@@ -4361,10 +4466,10 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
4361
4466
|
}
|
|
4362
4467
|
switch (getAlignment(placement)) {
|
|
4363
4468
|
case 'start':
|
|
4364
|
-
coords[
|
|
4469
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
4365
4470
|
break;
|
|
4366
4471
|
case 'end':
|
|
4367
|
-
coords[
|
|
4472
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
4368
4473
|
break;
|
|
4369
4474
|
}
|
|
4370
4475
|
return coords;
|
|
@@ -4462,39 +4567,6 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
4462
4567
|
};
|
|
4463
4568
|
};
|
|
4464
4569
|
|
|
4465
|
-
function evaluate(value, param) {
|
|
4466
|
-
return typeof value === 'function' ? value(param) : value;
|
|
4467
|
-
}
|
|
4468
|
-
|
|
4469
|
-
function expandPaddingObject(padding) {
|
|
4470
|
-
return {
|
|
4471
|
-
top: 0,
|
|
4472
|
-
right: 0,
|
|
4473
|
-
bottom: 0,
|
|
4474
|
-
left: 0,
|
|
4475
|
-
...padding
|
|
4476
|
-
};
|
|
4477
|
-
}
|
|
4478
|
-
|
|
4479
|
-
function getSideObjectFromPadding(padding) {
|
|
4480
|
-
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
4481
|
-
top: padding,
|
|
4482
|
-
right: padding,
|
|
4483
|
-
bottom: padding,
|
|
4484
|
-
left: padding
|
|
4485
|
-
};
|
|
4486
|
-
}
|
|
4487
|
-
|
|
4488
|
-
function rectToClientRect(rect) {
|
|
4489
|
-
return {
|
|
4490
|
-
...rect,
|
|
4491
|
-
top: rect.y,
|
|
4492
|
-
left: rect.x,
|
|
4493
|
-
right: rect.x + rect.width,
|
|
4494
|
-
bottom: rect.y + rect.height
|
|
4495
|
-
};
|
|
4496
|
-
}
|
|
4497
|
-
|
|
4498
4570
|
/**
|
|
4499
4571
|
* Resolves with an object of overflow side offsets that determine how much the
|
|
4500
4572
|
* element is overflowing a given clipping boundary on each side.
|
|
@@ -4523,7 +4595,7 @@ async function detectOverflow(state, options) {
|
|
|
4523
4595
|
altBoundary = false,
|
|
4524
4596
|
padding = 0
|
|
4525
4597
|
} = evaluate(options, state);
|
|
4526
|
-
const paddingObject =
|
|
4598
|
+
const paddingObject = getPaddingObject(padding);
|
|
4527
4599
|
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
4528
4600
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
4529
4601
|
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
@@ -4558,82 +4630,6 @@ async function detectOverflow(state, options) {
|
|
|
4558
4630
|
};
|
|
4559
4631
|
}
|
|
4560
4632
|
|
|
4561
|
-
const min$1 = Math.min;
|
|
4562
|
-
const max$1 = Math.max;
|
|
4563
|
-
|
|
4564
|
-
function within(min$1$1, value, max$1$1) {
|
|
4565
|
-
return max$1(min$1$1, min$1(value, max$1$1));
|
|
4566
|
-
}
|
|
4567
|
-
|
|
4568
|
-
const oppositeSideMap = {
|
|
4569
|
-
left: 'right',
|
|
4570
|
-
right: 'left',
|
|
4571
|
-
bottom: 'top',
|
|
4572
|
-
top: 'bottom'
|
|
4573
|
-
};
|
|
4574
|
-
function getOppositePlacement(placement) {
|
|
4575
|
-
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
4576
|
-
}
|
|
4577
|
-
|
|
4578
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
4579
|
-
if (rtl === void 0) {
|
|
4580
|
-
rtl = false;
|
|
4581
|
-
}
|
|
4582
|
-
const alignment = getAlignment(placement);
|
|
4583
|
-
const mainAxis = getMainAxisFromPlacement(placement);
|
|
4584
|
-
const length = getLengthFromAxis(mainAxis);
|
|
4585
|
-
let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
4586
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
4587
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
4588
|
-
}
|
|
4589
|
-
return {
|
|
4590
|
-
main: mainAlignmentSide,
|
|
4591
|
-
cross: getOppositePlacement(mainAlignmentSide)
|
|
4592
|
-
};
|
|
4593
|
-
}
|
|
4594
|
-
|
|
4595
|
-
const oppositeAlignmentMap = {
|
|
4596
|
-
start: 'end',
|
|
4597
|
-
end: 'start'
|
|
4598
|
-
};
|
|
4599
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
4600
|
-
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
4601
|
-
}
|
|
4602
|
-
|
|
4603
|
-
function getExpandedPlacements(placement) {
|
|
4604
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
4605
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
4606
|
-
}
|
|
4607
|
-
|
|
4608
|
-
function getSideList(side, isStart, rtl) {
|
|
4609
|
-
const lr = ['left', 'right'];
|
|
4610
|
-
const rl = ['right', 'left'];
|
|
4611
|
-
const tb = ['top', 'bottom'];
|
|
4612
|
-
const bt = ['bottom', 'top'];
|
|
4613
|
-
switch (side) {
|
|
4614
|
-
case 'top':
|
|
4615
|
-
case 'bottom':
|
|
4616
|
-
if (rtl) return isStart ? rl : lr;
|
|
4617
|
-
return isStart ? lr : rl;
|
|
4618
|
-
case 'left':
|
|
4619
|
-
case 'right':
|
|
4620
|
-
return isStart ? tb : bt;
|
|
4621
|
-
default:
|
|
4622
|
-
return [];
|
|
4623
|
-
}
|
|
4624
|
-
}
|
|
4625
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
4626
|
-
const alignment = getAlignment(placement);
|
|
4627
|
-
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
4628
|
-
if (alignment) {
|
|
4629
|
-
list = list.map(side => side + "-" + alignment);
|
|
4630
|
-
if (flipAlignment) {
|
|
4631
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
4632
|
-
}
|
|
4633
|
-
}
|
|
4634
|
-
return list;
|
|
4635
|
-
}
|
|
4636
|
-
|
|
4637
4633
|
/**
|
|
4638
4634
|
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
4639
4635
|
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
@@ -4681,11 +4677,8 @@ const flip = function (options) {
|
|
|
4681
4677
|
overflows.push(overflow[side]);
|
|
4682
4678
|
}
|
|
4683
4679
|
if (checkCrossAxis) {
|
|
4684
|
-
const
|
|
4685
|
-
|
|
4686
|
-
cross
|
|
4687
|
-
} = getAlignmentSides(placement, rects, rtl);
|
|
4688
|
-
overflows.push(overflow[main], overflow[cross]);
|
|
4680
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
4681
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
4689
4682
|
}
|
|
4690
4683
|
overflowsData = [...overflowsData, {
|
|
4691
4684
|
placement,
|
|
@@ -4744,6 +4737,8 @@ const flip = function (options) {
|
|
|
4744
4737
|
};
|
|
4745
4738
|
};
|
|
4746
4739
|
|
|
4740
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
4741
|
+
// Derivable.
|
|
4747
4742
|
async function convertValueToCoords(state, options) {
|
|
4748
4743
|
const {
|
|
4749
4744
|
placement,
|
|
@@ -4753,7 +4748,7 @@ async function convertValueToCoords(state, options) {
|
|
|
4753
4748
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
4754
4749
|
const side = getSide(placement);
|
|
4755
4750
|
const alignment = getAlignment(placement);
|
|
4756
|
-
const isVertical =
|
|
4751
|
+
const isVertical = getSideAxis(placement) === 'y';
|
|
4757
4752
|
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
4758
4753
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
4759
4754
|
const rawValue = evaluate(options, state);
|
|
@@ -4814,10 +4809,6 @@ const offset = function (options) {
|
|
|
4814
4809
|
};
|
|
4815
4810
|
};
|
|
4816
4811
|
|
|
4817
|
-
function getCrossAxis(axis) {
|
|
4818
|
-
return axis === 'x' ? 'y' : 'x';
|
|
4819
|
-
}
|
|
4820
|
-
|
|
4821
4812
|
/**
|
|
4822
4813
|
* Optimizes the visibility of the floating element by shifting it in order to
|
|
4823
4814
|
* keep it in view when it will overflow the clipping boundary.
|
|
@@ -4858,8 +4849,8 @@ const shift = function (options) {
|
|
|
4858
4849
|
y
|
|
4859
4850
|
};
|
|
4860
4851
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4861
|
-
const
|
|
4862
|
-
const
|
|
4852
|
+
const crossAxis = getSideAxis(getSide(placement));
|
|
4853
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
4863
4854
|
let mainAxisCoord = coords[mainAxis];
|
|
4864
4855
|
let crossAxisCoord = coords[crossAxis];
|
|
4865
4856
|
if (checkMainAxis) {
|
|
@@ -4867,14 +4858,14 @@ const shift = function (options) {
|
|
|
4867
4858
|
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
4868
4859
|
const min = mainAxisCoord + overflow[minSide];
|
|
4869
4860
|
const max = mainAxisCoord - overflow[maxSide];
|
|
4870
|
-
mainAxisCoord =
|
|
4861
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
4871
4862
|
}
|
|
4872
4863
|
if (checkCrossAxis) {
|
|
4873
4864
|
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
4874
4865
|
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
4875
4866
|
const min = crossAxisCoord + overflow[minSide];
|
|
4876
4867
|
const max = crossAxisCoord - overflow[maxSide];
|
|
4877
|
-
crossAxisCoord =
|
|
4868
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
4878
4869
|
}
|
|
4879
4870
|
const limitedCoords = limiter.fn({
|
|
4880
4871
|
...state,
|
|
@@ -4919,8 +4910,7 @@ const size = function (options) {
|
|
|
4919
4910
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4920
4911
|
const side = getSide(placement);
|
|
4921
4912
|
const alignment = getAlignment(placement);
|
|
4922
|
-
const
|
|
4923
|
-
const isXAxis = axis === 'x';
|
|
4913
|
+
const isYAxis = getSideAxis(placement) === 'y';
|
|
4924
4914
|
const {
|
|
4925
4915
|
width,
|
|
4926
4916
|
height
|
|
@@ -4939,22 +4929,22 @@ const size = function (options) {
|
|
|
4939
4929
|
const noShift = !state.middlewareData.shift;
|
|
4940
4930
|
let availableHeight = overflowAvailableHeight;
|
|
4941
4931
|
let availableWidth = overflowAvailableWidth;
|
|
4942
|
-
if (
|
|
4932
|
+
if (isYAxis) {
|
|
4943
4933
|
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
4944
|
-
availableWidth = alignment || noShift ? min
|
|
4934
|
+
availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
|
|
4945
4935
|
} else {
|
|
4946
4936
|
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
4947
|
-
availableHeight = alignment || noShift ? min
|
|
4937
|
+
availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
|
4948
4938
|
}
|
|
4949
4939
|
if (noShift && !alignment) {
|
|
4950
|
-
const xMin = max
|
|
4951
|
-
const xMax = max
|
|
4952
|
-
const yMin = max
|
|
4953
|
-
const yMax = max
|
|
4954
|
-
if (
|
|
4955
|
-
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max
|
|
4940
|
+
const xMin = max(overflow.left, 0);
|
|
4941
|
+
const xMax = max(overflow.right, 0);
|
|
4942
|
+
const yMin = max(overflow.top, 0);
|
|
4943
|
+
const yMax = max(overflow.bottom, 0);
|
|
4944
|
+
if (isYAxis) {
|
|
4945
|
+
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
4956
4946
|
} else {
|
|
4957
|
-
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max
|
|
4947
|
+
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
4958
4948
|
}
|
|
4959
4949
|
}
|
|
4960
4950
|
await apply({
|
|
@@ -4975,18 +4965,6 @@ const size = function (options) {
|
|
|
4975
4965
|
};
|
|
4976
4966
|
};
|
|
4977
4967
|
|
|
4978
|
-
function getWindow(node) {
|
|
4979
|
-
var _node$ownerDocument;
|
|
4980
|
-
return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
4981
|
-
}
|
|
4982
|
-
|
|
4983
|
-
function getComputedStyle$1(element) {
|
|
4984
|
-
return getWindow(element).getComputedStyle(element);
|
|
4985
|
-
}
|
|
4986
|
-
|
|
4987
|
-
function isNode(value) {
|
|
4988
|
-
return value instanceof getWindow(value).Node;
|
|
4989
|
-
}
|
|
4990
4968
|
function getNodeName(node) {
|
|
4991
4969
|
if (isNode(node)) {
|
|
4992
4970
|
return (node.nodeName || '').toLowerCase();
|
|
@@ -4996,16 +4974,29 @@ function getNodeName(node) {
|
|
|
4996
4974
|
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
4997
4975
|
return '#document';
|
|
4998
4976
|
}
|
|
4999
|
-
|
|
4977
|
+
function getWindow(node) {
|
|
4978
|
+
var _node$ownerDocument;
|
|
4979
|
+
return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
4980
|
+
}
|
|
4981
|
+
function getDocumentElement(node) {
|
|
4982
|
+
var _ref;
|
|
4983
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
4984
|
+
}
|
|
4985
|
+
function isNode(value) {
|
|
4986
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
4987
|
+
}
|
|
4988
|
+
function isElement(value) {
|
|
4989
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
4990
|
+
}
|
|
5000
4991
|
function isHTMLElement(value) {
|
|
5001
4992
|
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
5002
4993
|
}
|
|
5003
|
-
function isShadowRoot(
|
|
4994
|
+
function isShadowRoot(value) {
|
|
5004
4995
|
// Browsers without `ShadowRoot` support.
|
|
5005
4996
|
if (typeof ShadowRoot === 'undefined') {
|
|
5006
4997
|
return false;
|
|
5007
4998
|
}
|
|
5008
|
-
return
|
|
4999
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
5009
5000
|
}
|
|
5010
5001
|
function isOverflowElement(element) {
|
|
5011
5002
|
const {
|
|
@@ -5020,28 +5011,83 @@ function isTableElement(element) {
|
|
|
5020
5011
|
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
5021
5012
|
}
|
|
5022
5013
|
function isContainingBlock(element) {
|
|
5023
|
-
const
|
|
5014
|
+
const webkit = isWebKit();
|
|
5024
5015
|
const css = getComputedStyle$1(element);
|
|
5025
5016
|
|
|
5026
5017
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
5027
|
-
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !
|
|
5018
|
+
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
5028
5019
|
}
|
|
5029
|
-
function
|
|
5020
|
+
function getContainingBlock(element) {
|
|
5021
|
+
let currentNode = getParentNode(element);
|
|
5022
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
5023
|
+
if (isContainingBlock(currentNode)) {
|
|
5024
|
+
return currentNode;
|
|
5025
|
+
} else {
|
|
5026
|
+
currentNode = getParentNode(currentNode);
|
|
5027
|
+
}
|
|
5028
|
+
}
|
|
5029
|
+
return null;
|
|
5030
|
+
}
|
|
5031
|
+
function isWebKit() {
|
|
5030
5032
|
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
5031
5033
|
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
5032
5034
|
}
|
|
5033
5035
|
function isLastTraversableNode(node) {
|
|
5034
5036
|
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
5035
5037
|
}
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
}
|
|
5038
|
+
function getComputedStyle$1(element) {
|
|
5039
|
+
return getWindow(element).getComputedStyle(element);
|
|
5040
|
+
}
|
|
5041
|
+
function getNodeScroll(element) {
|
|
5042
|
+
if (isElement(element)) {
|
|
5043
|
+
return {
|
|
5044
|
+
scrollLeft: element.scrollLeft,
|
|
5045
|
+
scrollTop: element.scrollTop
|
|
5046
|
+
};
|
|
5047
|
+
}
|
|
5048
|
+
return {
|
|
5049
|
+
scrollLeft: element.pageXOffset,
|
|
5050
|
+
scrollTop: element.pageYOffset
|
|
5051
|
+
};
|
|
5052
|
+
}
|
|
5053
|
+
function getParentNode(node) {
|
|
5054
|
+
if (getNodeName(node) === 'html') {
|
|
5055
|
+
return node;
|
|
5056
|
+
}
|
|
5057
|
+
const result =
|
|
5058
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
5059
|
+
node.assignedSlot ||
|
|
5060
|
+
// DOM Element detected.
|
|
5061
|
+
node.parentNode ||
|
|
5062
|
+
// ShadowRoot detected.
|
|
5063
|
+
isShadowRoot(node) && node.host ||
|
|
5064
|
+
// Fallback.
|
|
5065
|
+
getDocumentElement(node);
|
|
5066
|
+
return isShadowRoot(result) ? result.host : result;
|
|
5067
|
+
}
|
|
5068
|
+
function getNearestOverflowAncestor(node) {
|
|
5069
|
+
const parentNode = getParentNode(node);
|
|
5070
|
+
if (isLastTraversableNode(parentNode)) {
|
|
5071
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
5072
|
+
}
|
|
5073
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
5074
|
+
return parentNode;
|
|
5075
|
+
}
|
|
5076
|
+
return getNearestOverflowAncestor(parentNode);
|
|
5077
|
+
}
|
|
5078
|
+
function getOverflowAncestors(node, list) {
|
|
5079
|
+
var _node$ownerDocument2;
|
|
5080
|
+
if (list === void 0) {
|
|
5081
|
+
list = [];
|
|
5082
|
+
}
|
|
5083
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
5084
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
5085
|
+
const win = getWindow(scrollableAncestor);
|
|
5086
|
+
if (isBody) {
|
|
5087
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
|
|
5088
|
+
}
|
|
5089
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
5090
|
+
}
|
|
5045
5091
|
|
|
5046
5092
|
function getCssDimensions(element) {
|
|
5047
5093
|
const css = getComputedStyle$1(element);
|
|
@@ -5064,10 +5110,6 @@ function getCssDimensions(element) {
|
|
|
5064
5110
|
};
|
|
5065
5111
|
}
|
|
5066
5112
|
|
|
5067
|
-
function isElement(value) {
|
|
5068
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
5069
|
-
}
|
|
5070
|
-
|
|
5071
5113
|
function unwrapElement(element) {
|
|
5072
5114
|
return !isElement(element) ? element.contextElement : element;
|
|
5073
5115
|
}
|
|
@@ -5103,7 +5145,7 @@ function getScale(element) {
|
|
|
5103
5145
|
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
5104
5146
|
function getVisualOffsets(element) {
|
|
5105
5147
|
const win = getWindow(element);
|
|
5106
|
-
if (!
|
|
5148
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
5107
5149
|
return noOffsets;
|
|
5108
5150
|
}
|
|
5109
5151
|
return {
|
|
@@ -5152,7 +5194,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
5152
5194
|
while (currentIFrame && offsetParent && offsetWin !== win) {
|
|
5153
5195
|
const iframeScale = getScale(currentIFrame);
|
|
5154
5196
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
5155
|
-
const css = getComputedStyle(currentIFrame);
|
|
5197
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
5156
5198
|
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
5157
5199
|
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
5158
5200
|
x *= iframeScale.x;
|
|
@@ -5172,24 +5214,6 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
5172
5214
|
});
|
|
5173
5215
|
}
|
|
5174
5216
|
|
|
5175
|
-
function getNodeScroll(element) {
|
|
5176
|
-
if (isElement(element)) {
|
|
5177
|
-
return {
|
|
5178
|
-
scrollLeft: element.scrollLeft,
|
|
5179
|
-
scrollTop: element.scrollTop
|
|
5180
|
-
};
|
|
5181
|
-
}
|
|
5182
|
-
return {
|
|
5183
|
-
scrollLeft: element.pageXOffset,
|
|
5184
|
-
scrollTop: element.pageYOffset
|
|
5185
|
-
};
|
|
5186
|
-
}
|
|
5187
|
-
|
|
5188
|
-
function getDocumentElement(node) {
|
|
5189
|
-
var _ref;
|
|
5190
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
5191
|
-
}
|
|
5192
|
-
|
|
5193
5217
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
5194
5218
|
let {
|
|
5195
5219
|
rect,
|
|
@@ -5257,47 +5281,6 @@ function getDocumentRect(element) {
|
|
|
5257
5281
|
};
|
|
5258
5282
|
}
|
|
5259
5283
|
|
|
5260
|
-
function getParentNode(node) {
|
|
5261
|
-
if (getNodeName(node) === 'html') {
|
|
5262
|
-
return node;
|
|
5263
|
-
}
|
|
5264
|
-
const result =
|
|
5265
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
5266
|
-
node.assignedSlot ||
|
|
5267
|
-
// DOM Element detected.
|
|
5268
|
-
node.parentNode ||
|
|
5269
|
-
// ShadowRoot detected.
|
|
5270
|
-
isShadowRoot(node) && node.host ||
|
|
5271
|
-
// Fallback.
|
|
5272
|
-
getDocumentElement(node);
|
|
5273
|
-
return isShadowRoot(result) ? result.host : result;
|
|
5274
|
-
}
|
|
5275
|
-
|
|
5276
|
-
function getNearestOverflowAncestor(node) {
|
|
5277
|
-
const parentNode = getParentNode(node);
|
|
5278
|
-
if (isLastTraversableNode(parentNode)) {
|
|
5279
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
5280
|
-
}
|
|
5281
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
5282
|
-
return parentNode;
|
|
5283
|
-
}
|
|
5284
|
-
return getNearestOverflowAncestor(parentNode);
|
|
5285
|
-
}
|
|
5286
|
-
|
|
5287
|
-
function getOverflowAncestors(node, list) {
|
|
5288
|
-
var _node$ownerDocument;
|
|
5289
|
-
if (list === void 0) {
|
|
5290
|
-
list = [];
|
|
5291
|
-
}
|
|
5292
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
5293
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
|
5294
|
-
const win = getWindow(scrollableAncestor);
|
|
5295
|
-
if (isBody) {
|
|
5296
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
|
|
5297
|
-
}
|
|
5298
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
5299
|
-
}
|
|
5300
|
-
|
|
5301
5284
|
function getViewportRect(element, strategy) {
|
|
5302
5285
|
const win = getWindow(element);
|
|
5303
5286
|
const html = getDocumentElement(element);
|
|
@@ -5309,7 +5292,7 @@ function getViewportRect(element, strategy) {
|
|
|
5309
5292
|
if (visualViewport) {
|
|
5310
5293
|
width = visualViewport.width;
|
|
5311
5294
|
height = visualViewport.height;
|
|
5312
|
-
const visualViewportBased =
|
|
5295
|
+
const visualViewportBased = isWebKit();
|
|
5313
5296
|
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
5314
5297
|
x = visualViewport.offsetLeft;
|
|
5315
5298
|
y = visualViewport.offsetTop;
|
|
@@ -5446,7 +5429,7 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
5446
5429
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
5447
5430
|
scroll = getNodeScroll(offsetParent);
|
|
5448
5431
|
}
|
|
5449
|
-
if (
|
|
5432
|
+
if (isOffsetParentAnElement) {
|
|
5450
5433
|
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
5451
5434
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
5452
5435
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
@@ -5471,17 +5454,6 @@ function getTrueOffsetParent(element, polyfill) {
|
|
|
5471
5454
|
}
|
|
5472
5455
|
return element.offsetParent;
|
|
5473
5456
|
}
|
|
5474
|
-
function getContainingBlock(element) {
|
|
5475
|
-
let currentNode = getParentNode(element);
|
|
5476
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
5477
|
-
if (isContainingBlock(currentNode)) {
|
|
5478
|
-
return currentNode;
|
|
5479
|
-
} else {
|
|
5480
|
-
currentNode = getParentNode(currentNode);
|
|
5481
|
-
}
|
|
5482
|
-
}
|
|
5483
|
-
return null;
|
|
5484
|
-
}
|
|
5485
5457
|
|
|
5486
5458
|
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
5487
5459
|
// such as table ancestors and cross browser bugs.
|
|
@@ -5519,7 +5491,7 @@ const getElementRects = async function (_ref) {
|
|
|
5519
5491
|
};
|
|
5520
5492
|
|
|
5521
5493
|
function isRTL(element) {
|
|
5522
|
-
return getComputedStyle(element).direction === 'rtl';
|
|
5494
|
+
return getComputedStyle$1(element).direction === 'rtl';
|
|
5523
5495
|
}
|
|
5524
5496
|
|
|
5525
5497
|
const platform = {
|