@haiilo/catalyst 6.3.3 → 6.4.1
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/assets/fonts/SourceSans3VF-Italic.otf.woff +0 -0
- package/dist/catalyst/assets/fonts/SourceSans3VF-Italic.otf.woff2 +0 -0
- package/dist/catalyst/assets/fonts/SourceSans3VF-Italic.ttf.woff +0 -0
- package/dist/catalyst/assets/fonts/SourceSans3VF-Italic.ttf.woff2 +0 -0
- package/dist/catalyst/assets/fonts/SourceSans3VF-Upright.otf.woff +0 -0
- package/dist/catalyst/assets/fonts/SourceSans3VF-Upright.otf.woff2 +0 -0
- package/dist/catalyst/assets/fonts/SourceSans3VF-Upright.ttf.woff +0 -0
- package/dist/catalyst/assets/fonts/SourceSans3VF-Upright.ttf.woff2 +0 -0
- 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/assets/fonts/SourceSans3VF-Italic.otf.woff +0 -0
- package/dist/collection/assets/fonts/SourceSans3VF-Italic.otf.woff2 +0 -0
- package/dist/collection/assets/fonts/SourceSans3VF-Italic.ttf.woff +0 -0
- package/dist/collection/assets/fonts/SourceSans3VF-Italic.ttf.woff2 +0 -0
- package/dist/collection/assets/fonts/SourceSans3VF-Upright.otf.woff +0 -0
- package/dist/collection/assets/fonts/SourceSans3VF-Upright.otf.woff2 +0 -0
- package/dist/collection/assets/fonts/SourceSans3VF-Upright.ttf.woff +0 -0
- package/dist/collection/assets/fonts/SourceSans3VF-Upright.ttf.woff2 +0 -0
- 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-datepicker-inline/cat-datepicker-inline.e2e.js +1 -0
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js.map +1 -1
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js +1 -0
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-b4391019.js');
|
|
6
6
|
const of = require('./of-d9fa1990.js');
|
|
7
7
|
|
|
8
8
|
const ObjectUnsubscribedError = of.createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
|
|
@@ -1039,7 +1039,7 @@ function createEmptyStyleRule(query) {
|
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
1041
|
|
|
1042
|
-
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}";
|
|
1042
|
+
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}";
|
|
1043
1043
|
|
|
1044
1044
|
const CatButton = class {
|
|
1045
1045
|
constructor(hostRef) {
|
|
@@ -4303,20 +4303,124 @@ const CatDatepickerInline = class {
|
|
|
4303
4303
|
};
|
|
4304
4304
|
CatDatepickerInline.style = catDatepickerInlineCss;
|
|
4305
4305
|
|
|
4306
|
+
const min = Math.min;
|
|
4307
|
+
const max = Math.max;
|
|
4308
|
+
const round = Math.round;
|
|
4309
|
+
const floor = Math.floor;
|
|
4310
|
+
const createCoords = v => ({
|
|
4311
|
+
x: v,
|
|
4312
|
+
y: v
|
|
4313
|
+
});
|
|
4314
|
+
const oppositeSideMap = {
|
|
4315
|
+
left: 'right',
|
|
4316
|
+
right: 'left',
|
|
4317
|
+
bottom: 'top',
|
|
4318
|
+
top: 'bottom'
|
|
4319
|
+
};
|
|
4320
|
+
const oppositeAlignmentMap = {
|
|
4321
|
+
start: 'end',
|
|
4322
|
+
end: 'start'
|
|
4323
|
+
};
|
|
4324
|
+
function clamp(start, value, end) {
|
|
4325
|
+
return max(start, min(value, end));
|
|
4326
|
+
}
|
|
4327
|
+
function evaluate(value, param) {
|
|
4328
|
+
return typeof value === 'function' ? value(param) : value;
|
|
4329
|
+
}
|
|
4330
|
+
function getSide(placement) {
|
|
4331
|
+
return placement.split('-')[0];
|
|
4332
|
+
}
|
|
4306
4333
|
function getAlignment(placement) {
|
|
4307
4334
|
return placement.split('-')[1];
|
|
4308
4335
|
}
|
|
4309
|
-
|
|
4310
|
-
|
|
4336
|
+
function getOppositeAxis(axis) {
|
|
4337
|
+
return axis === 'x' ? 'y' : 'x';
|
|
4338
|
+
}
|
|
4339
|
+
function getAxisLength(axis) {
|
|
4311
4340
|
return axis === 'y' ? 'height' : 'width';
|
|
4312
4341
|
}
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
return placement.split('-')[0];
|
|
4342
|
+
function getSideAxis(placement) {
|
|
4343
|
+
return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
|
|
4316
4344
|
}
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4345
|
+
function getAlignmentAxis(placement) {
|
|
4346
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
4347
|
+
}
|
|
4348
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
4349
|
+
if (rtl === void 0) {
|
|
4350
|
+
rtl = false;
|
|
4351
|
+
}
|
|
4352
|
+
const alignment = getAlignment(placement);
|
|
4353
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
4354
|
+
const length = getAxisLength(alignmentAxis);
|
|
4355
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
4356
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
4357
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
4358
|
+
}
|
|
4359
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
4360
|
+
}
|
|
4361
|
+
function getExpandedPlacements(placement) {
|
|
4362
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
4363
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
4364
|
+
}
|
|
4365
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
4366
|
+
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
4367
|
+
}
|
|
4368
|
+
function getSideList(side, isStart, rtl) {
|
|
4369
|
+
const lr = ['left', 'right'];
|
|
4370
|
+
const rl = ['right', 'left'];
|
|
4371
|
+
const tb = ['top', 'bottom'];
|
|
4372
|
+
const bt = ['bottom', 'top'];
|
|
4373
|
+
switch (side) {
|
|
4374
|
+
case 'top':
|
|
4375
|
+
case 'bottom':
|
|
4376
|
+
if (rtl) return isStart ? rl : lr;
|
|
4377
|
+
return isStart ? lr : rl;
|
|
4378
|
+
case 'left':
|
|
4379
|
+
case 'right':
|
|
4380
|
+
return isStart ? tb : bt;
|
|
4381
|
+
default:
|
|
4382
|
+
return [];
|
|
4383
|
+
}
|
|
4384
|
+
}
|
|
4385
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
4386
|
+
const alignment = getAlignment(placement);
|
|
4387
|
+
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
4388
|
+
if (alignment) {
|
|
4389
|
+
list = list.map(side => side + "-" + alignment);
|
|
4390
|
+
if (flipAlignment) {
|
|
4391
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
4392
|
+
}
|
|
4393
|
+
}
|
|
4394
|
+
return list;
|
|
4395
|
+
}
|
|
4396
|
+
function getOppositePlacement(placement) {
|
|
4397
|
+
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
4398
|
+
}
|
|
4399
|
+
function expandPaddingObject(padding) {
|
|
4400
|
+
return {
|
|
4401
|
+
top: 0,
|
|
4402
|
+
right: 0,
|
|
4403
|
+
bottom: 0,
|
|
4404
|
+
left: 0,
|
|
4405
|
+
...padding
|
|
4406
|
+
};
|
|
4407
|
+
}
|
|
4408
|
+
function getPaddingObject(padding) {
|
|
4409
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
4410
|
+
top: padding,
|
|
4411
|
+
right: padding,
|
|
4412
|
+
bottom: padding,
|
|
4413
|
+
left: padding
|
|
4414
|
+
};
|
|
4415
|
+
}
|
|
4416
|
+
function rectToClientRect(rect) {
|
|
4417
|
+
return {
|
|
4418
|
+
...rect,
|
|
4419
|
+
top: rect.y,
|
|
4420
|
+
left: rect.x,
|
|
4421
|
+
right: rect.x + rect.width,
|
|
4422
|
+
bottom: rect.y + rect.height
|
|
4423
|
+
};
|
|
4320
4424
|
}
|
|
4321
4425
|
|
|
4322
4426
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
@@ -4324,13 +4428,14 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
4324
4428
|
reference,
|
|
4325
4429
|
floating
|
|
4326
4430
|
} = _ref;
|
|
4431
|
+
const sideAxis = getSideAxis(placement);
|
|
4432
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
4433
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
4434
|
+
const side = getSide(placement);
|
|
4435
|
+
const isVertical = sideAxis === 'y';
|
|
4327
4436
|
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
4328
4437
|
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
4329
|
-
const
|
|
4330
|
-
const length = getLengthFromAxis(mainAxis);
|
|
4331
|
-
const commonAlign = reference[length] / 2 - floating[length] / 2;
|
|
4332
|
-
const side = getSide(placement);
|
|
4333
|
-
const isVertical = mainAxis === 'x';
|
|
4438
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
4334
4439
|
let coords;
|
|
4335
4440
|
switch (side) {
|
|
4336
4441
|
case 'top':
|
|
@@ -4365,10 +4470,10 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
4365
4470
|
}
|
|
4366
4471
|
switch (getAlignment(placement)) {
|
|
4367
4472
|
case 'start':
|
|
4368
|
-
coords[
|
|
4473
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
4369
4474
|
break;
|
|
4370
4475
|
case 'end':
|
|
4371
|
-
coords[
|
|
4476
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
4372
4477
|
break;
|
|
4373
4478
|
}
|
|
4374
4479
|
return coords;
|
|
@@ -4466,39 +4571,6 @@ const computePosition$1 = async (reference, floating, config) => {
|
|
|
4466
4571
|
};
|
|
4467
4572
|
};
|
|
4468
4573
|
|
|
4469
|
-
function evaluate(value, param) {
|
|
4470
|
-
return typeof value === 'function' ? value(param) : value;
|
|
4471
|
-
}
|
|
4472
|
-
|
|
4473
|
-
function expandPaddingObject(padding) {
|
|
4474
|
-
return {
|
|
4475
|
-
top: 0,
|
|
4476
|
-
right: 0,
|
|
4477
|
-
bottom: 0,
|
|
4478
|
-
left: 0,
|
|
4479
|
-
...padding
|
|
4480
|
-
};
|
|
4481
|
-
}
|
|
4482
|
-
|
|
4483
|
-
function getSideObjectFromPadding(padding) {
|
|
4484
|
-
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
4485
|
-
top: padding,
|
|
4486
|
-
right: padding,
|
|
4487
|
-
bottom: padding,
|
|
4488
|
-
left: padding
|
|
4489
|
-
};
|
|
4490
|
-
}
|
|
4491
|
-
|
|
4492
|
-
function rectToClientRect(rect) {
|
|
4493
|
-
return {
|
|
4494
|
-
...rect,
|
|
4495
|
-
top: rect.y,
|
|
4496
|
-
left: rect.x,
|
|
4497
|
-
right: rect.x + rect.width,
|
|
4498
|
-
bottom: rect.y + rect.height
|
|
4499
|
-
};
|
|
4500
|
-
}
|
|
4501
|
-
|
|
4502
4574
|
/**
|
|
4503
4575
|
* Resolves with an object of overflow side offsets that determine how much the
|
|
4504
4576
|
* element is overflowing a given clipping boundary on each side.
|
|
@@ -4527,7 +4599,7 @@ async function detectOverflow(state, options) {
|
|
|
4527
4599
|
altBoundary = false,
|
|
4528
4600
|
padding = 0
|
|
4529
4601
|
} = evaluate(options, state);
|
|
4530
|
-
const paddingObject =
|
|
4602
|
+
const paddingObject = getPaddingObject(padding);
|
|
4531
4603
|
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
4532
4604
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
4533
4605
|
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
@@ -4562,82 +4634,6 @@ async function detectOverflow(state, options) {
|
|
|
4562
4634
|
};
|
|
4563
4635
|
}
|
|
4564
4636
|
|
|
4565
|
-
const min$1 = Math.min;
|
|
4566
|
-
const max$1 = Math.max;
|
|
4567
|
-
|
|
4568
|
-
function within(min$1$1, value, max$1$1) {
|
|
4569
|
-
return max$1(min$1$1, min$1(value, max$1$1));
|
|
4570
|
-
}
|
|
4571
|
-
|
|
4572
|
-
const oppositeSideMap = {
|
|
4573
|
-
left: 'right',
|
|
4574
|
-
right: 'left',
|
|
4575
|
-
bottom: 'top',
|
|
4576
|
-
top: 'bottom'
|
|
4577
|
-
};
|
|
4578
|
-
function getOppositePlacement(placement) {
|
|
4579
|
-
return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
|
|
4580
|
-
}
|
|
4581
|
-
|
|
4582
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
4583
|
-
if (rtl === void 0) {
|
|
4584
|
-
rtl = false;
|
|
4585
|
-
}
|
|
4586
|
-
const alignment = getAlignment(placement);
|
|
4587
|
-
const mainAxis = getMainAxisFromPlacement(placement);
|
|
4588
|
-
const length = getLengthFromAxis(mainAxis);
|
|
4589
|
-
let mainAlignmentSide = mainAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
4590
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
4591
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
4592
|
-
}
|
|
4593
|
-
return {
|
|
4594
|
-
main: mainAlignmentSide,
|
|
4595
|
-
cross: getOppositePlacement(mainAlignmentSide)
|
|
4596
|
-
};
|
|
4597
|
-
}
|
|
4598
|
-
|
|
4599
|
-
const oppositeAlignmentMap = {
|
|
4600
|
-
start: 'end',
|
|
4601
|
-
end: 'start'
|
|
4602
|
-
};
|
|
4603
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
4604
|
-
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
4605
|
-
}
|
|
4606
|
-
|
|
4607
|
-
function getExpandedPlacements(placement) {
|
|
4608
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
4609
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
4610
|
-
}
|
|
4611
|
-
|
|
4612
|
-
function getSideList(side, isStart, rtl) {
|
|
4613
|
-
const lr = ['left', 'right'];
|
|
4614
|
-
const rl = ['right', 'left'];
|
|
4615
|
-
const tb = ['top', 'bottom'];
|
|
4616
|
-
const bt = ['bottom', 'top'];
|
|
4617
|
-
switch (side) {
|
|
4618
|
-
case 'top':
|
|
4619
|
-
case 'bottom':
|
|
4620
|
-
if (rtl) return isStart ? rl : lr;
|
|
4621
|
-
return isStart ? lr : rl;
|
|
4622
|
-
case 'left':
|
|
4623
|
-
case 'right':
|
|
4624
|
-
return isStart ? tb : bt;
|
|
4625
|
-
default:
|
|
4626
|
-
return [];
|
|
4627
|
-
}
|
|
4628
|
-
}
|
|
4629
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
4630
|
-
const alignment = getAlignment(placement);
|
|
4631
|
-
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
4632
|
-
if (alignment) {
|
|
4633
|
-
list = list.map(side => side + "-" + alignment);
|
|
4634
|
-
if (flipAlignment) {
|
|
4635
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
4636
|
-
}
|
|
4637
|
-
}
|
|
4638
|
-
return list;
|
|
4639
|
-
}
|
|
4640
|
-
|
|
4641
4637
|
/**
|
|
4642
4638
|
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
4643
4639
|
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
@@ -4685,11 +4681,8 @@ const flip = function (options) {
|
|
|
4685
4681
|
overflows.push(overflow[side]);
|
|
4686
4682
|
}
|
|
4687
4683
|
if (checkCrossAxis) {
|
|
4688
|
-
const
|
|
4689
|
-
|
|
4690
|
-
cross
|
|
4691
|
-
} = getAlignmentSides(placement, rects, rtl);
|
|
4692
|
-
overflows.push(overflow[main], overflow[cross]);
|
|
4684
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
4685
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
4693
4686
|
}
|
|
4694
4687
|
overflowsData = [...overflowsData, {
|
|
4695
4688
|
placement,
|
|
@@ -4748,6 +4741,8 @@ const flip = function (options) {
|
|
|
4748
4741
|
};
|
|
4749
4742
|
};
|
|
4750
4743
|
|
|
4744
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
4745
|
+
// Derivable.
|
|
4751
4746
|
async function convertValueToCoords(state, options) {
|
|
4752
4747
|
const {
|
|
4753
4748
|
placement,
|
|
@@ -4757,7 +4752,7 @@ async function convertValueToCoords(state, options) {
|
|
|
4757
4752
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
4758
4753
|
const side = getSide(placement);
|
|
4759
4754
|
const alignment = getAlignment(placement);
|
|
4760
|
-
const isVertical =
|
|
4755
|
+
const isVertical = getSideAxis(placement) === 'y';
|
|
4761
4756
|
const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
|
|
4762
4757
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
4763
4758
|
const rawValue = evaluate(options, state);
|
|
@@ -4818,10 +4813,6 @@ const offset = function (options) {
|
|
|
4818
4813
|
};
|
|
4819
4814
|
};
|
|
4820
4815
|
|
|
4821
|
-
function getCrossAxis(axis) {
|
|
4822
|
-
return axis === 'x' ? 'y' : 'x';
|
|
4823
|
-
}
|
|
4824
|
-
|
|
4825
4816
|
/**
|
|
4826
4817
|
* Optimizes the visibility of the floating element by shifting it in order to
|
|
4827
4818
|
* keep it in view when it will overflow the clipping boundary.
|
|
@@ -4862,8 +4853,8 @@ const shift = function (options) {
|
|
|
4862
4853
|
y
|
|
4863
4854
|
};
|
|
4864
4855
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4865
|
-
const
|
|
4866
|
-
const
|
|
4856
|
+
const crossAxis = getSideAxis(getSide(placement));
|
|
4857
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
4867
4858
|
let mainAxisCoord = coords[mainAxis];
|
|
4868
4859
|
let crossAxisCoord = coords[crossAxis];
|
|
4869
4860
|
if (checkMainAxis) {
|
|
@@ -4871,14 +4862,14 @@ const shift = function (options) {
|
|
|
4871
4862
|
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
4872
4863
|
const min = mainAxisCoord + overflow[minSide];
|
|
4873
4864
|
const max = mainAxisCoord - overflow[maxSide];
|
|
4874
|
-
mainAxisCoord =
|
|
4865
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
4875
4866
|
}
|
|
4876
4867
|
if (checkCrossAxis) {
|
|
4877
4868
|
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
4878
4869
|
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
4879
4870
|
const min = crossAxisCoord + overflow[minSide];
|
|
4880
4871
|
const max = crossAxisCoord - overflow[maxSide];
|
|
4881
|
-
crossAxisCoord =
|
|
4872
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
4882
4873
|
}
|
|
4883
4874
|
const limitedCoords = limiter.fn({
|
|
4884
4875
|
...state,
|
|
@@ -4923,8 +4914,7 @@ const size = function (options) {
|
|
|
4923
4914
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
4924
4915
|
const side = getSide(placement);
|
|
4925
4916
|
const alignment = getAlignment(placement);
|
|
4926
|
-
const
|
|
4927
|
-
const isXAxis = axis === 'x';
|
|
4917
|
+
const isYAxis = getSideAxis(placement) === 'y';
|
|
4928
4918
|
const {
|
|
4929
4919
|
width,
|
|
4930
4920
|
height
|
|
@@ -4943,22 +4933,22 @@ const size = function (options) {
|
|
|
4943
4933
|
const noShift = !state.middlewareData.shift;
|
|
4944
4934
|
let availableHeight = overflowAvailableHeight;
|
|
4945
4935
|
let availableWidth = overflowAvailableWidth;
|
|
4946
|
-
if (
|
|
4936
|
+
if (isYAxis) {
|
|
4947
4937
|
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
4948
|
-
availableWidth = alignment || noShift ? min
|
|
4938
|
+
availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
|
|
4949
4939
|
} else {
|
|
4950
4940
|
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
4951
|
-
availableHeight = alignment || noShift ? min
|
|
4941
|
+
availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
|
|
4952
4942
|
}
|
|
4953
4943
|
if (noShift && !alignment) {
|
|
4954
|
-
const xMin = max
|
|
4955
|
-
const xMax = max
|
|
4956
|
-
const yMin = max
|
|
4957
|
-
const yMax = max
|
|
4958
|
-
if (
|
|
4959
|
-
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max
|
|
4944
|
+
const xMin = max(overflow.left, 0);
|
|
4945
|
+
const xMax = max(overflow.right, 0);
|
|
4946
|
+
const yMin = max(overflow.top, 0);
|
|
4947
|
+
const yMax = max(overflow.bottom, 0);
|
|
4948
|
+
if (isYAxis) {
|
|
4949
|
+
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
4960
4950
|
} else {
|
|
4961
|
-
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max
|
|
4951
|
+
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
4962
4952
|
}
|
|
4963
4953
|
}
|
|
4964
4954
|
await apply({
|
|
@@ -4979,18 +4969,6 @@ const size = function (options) {
|
|
|
4979
4969
|
};
|
|
4980
4970
|
};
|
|
4981
4971
|
|
|
4982
|
-
function getWindow(node) {
|
|
4983
|
-
var _node$ownerDocument;
|
|
4984
|
-
return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
4985
|
-
}
|
|
4986
|
-
|
|
4987
|
-
function getComputedStyle$1(element) {
|
|
4988
|
-
return getWindow(element).getComputedStyle(element);
|
|
4989
|
-
}
|
|
4990
|
-
|
|
4991
|
-
function isNode(value) {
|
|
4992
|
-
return value instanceof getWindow(value).Node;
|
|
4993
|
-
}
|
|
4994
4972
|
function getNodeName(node) {
|
|
4995
4973
|
if (isNode(node)) {
|
|
4996
4974
|
return (node.nodeName || '').toLowerCase();
|
|
@@ -5000,16 +4978,29 @@ function getNodeName(node) {
|
|
|
5000
4978
|
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
5001
4979
|
return '#document';
|
|
5002
4980
|
}
|
|
5003
|
-
|
|
4981
|
+
function getWindow(node) {
|
|
4982
|
+
var _node$ownerDocument;
|
|
4983
|
+
return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
4984
|
+
}
|
|
4985
|
+
function getDocumentElement(node) {
|
|
4986
|
+
var _ref;
|
|
4987
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
4988
|
+
}
|
|
4989
|
+
function isNode(value) {
|
|
4990
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
4991
|
+
}
|
|
4992
|
+
function isElement(value) {
|
|
4993
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
4994
|
+
}
|
|
5004
4995
|
function isHTMLElement(value) {
|
|
5005
4996
|
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
5006
4997
|
}
|
|
5007
|
-
function isShadowRoot(
|
|
4998
|
+
function isShadowRoot(value) {
|
|
5008
4999
|
// Browsers without `ShadowRoot` support.
|
|
5009
5000
|
if (typeof ShadowRoot === 'undefined') {
|
|
5010
5001
|
return false;
|
|
5011
5002
|
}
|
|
5012
|
-
return
|
|
5003
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
5013
5004
|
}
|
|
5014
5005
|
function isOverflowElement(element) {
|
|
5015
5006
|
const {
|
|
@@ -5024,28 +5015,83 @@ function isTableElement(element) {
|
|
|
5024
5015
|
return ['table', 'td', 'th'].includes(getNodeName(element));
|
|
5025
5016
|
}
|
|
5026
5017
|
function isContainingBlock(element) {
|
|
5027
|
-
const
|
|
5018
|
+
const webkit = isWebKit();
|
|
5028
5019
|
const css = getComputedStyle$1(element);
|
|
5029
5020
|
|
|
5030
5021
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
5031
|
-
return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !
|
|
5022
|
+
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));
|
|
5032
5023
|
}
|
|
5033
|
-
function
|
|
5024
|
+
function getContainingBlock(element) {
|
|
5025
|
+
let currentNode = getParentNode(element);
|
|
5026
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
5027
|
+
if (isContainingBlock(currentNode)) {
|
|
5028
|
+
return currentNode;
|
|
5029
|
+
} else {
|
|
5030
|
+
currentNode = getParentNode(currentNode);
|
|
5031
|
+
}
|
|
5032
|
+
}
|
|
5033
|
+
return null;
|
|
5034
|
+
}
|
|
5035
|
+
function isWebKit() {
|
|
5034
5036
|
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
5035
5037
|
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
5036
5038
|
}
|
|
5037
5039
|
function isLastTraversableNode(node) {
|
|
5038
5040
|
return ['html', 'body', '#document'].includes(getNodeName(node));
|
|
5039
5041
|
}
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
}
|
|
5042
|
+
function getComputedStyle$1(element) {
|
|
5043
|
+
return getWindow(element).getComputedStyle(element);
|
|
5044
|
+
}
|
|
5045
|
+
function getNodeScroll(element) {
|
|
5046
|
+
if (isElement(element)) {
|
|
5047
|
+
return {
|
|
5048
|
+
scrollLeft: element.scrollLeft,
|
|
5049
|
+
scrollTop: element.scrollTop
|
|
5050
|
+
};
|
|
5051
|
+
}
|
|
5052
|
+
return {
|
|
5053
|
+
scrollLeft: element.pageXOffset,
|
|
5054
|
+
scrollTop: element.pageYOffset
|
|
5055
|
+
};
|
|
5056
|
+
}
|
|
5057
|
+
function getParentNode(node) {
|
|
5058
|
+
if (getNodeName(node) === 'html') {
|
|
5059
|
+
return node;
|
|
5060
|
+
}
|
|
5061
|
+
const result =
|
|
5062
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
5063
|
+
node.assignedSlot ||
|
|
5064
|
+
// DOM Element detected.
|
|
5065
|
+
node.parentNode ||
|
|
5066
|
+
// ShadowRoot detected.
|
|
5067
|
+
isShadowRoot(node) && node.host ||
|
|
5068
|
+
// Fallback.
|
|
5069
|
+
getDocumentElement(node);
|
|
5070
|
+
return isShadowRoot(result) ? result.host : result;
|
|
5071
|
+
}
|
|
5072
|
+
function getNearestOverflowAncestor(node) {
|
|
5073
|
+
const parentNode = getParentNode(node);
|
|
5074
|
+
if (isLastTraversableNode(parentNode)) {
|
|
5075
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
5076
|
+
}
|
|
5077
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
5078
|
+
return parentNode;
|
|
5079
|
+
}
|
|
5080
|
+
return getNearestOverflowAncestor(parentNode);
|
|
5081
|
+
}
|
|
5082
|
+
function getOverflowAncestors(node, list) {
|
|
5083
|
+
var _node$ownerDocument2;
|
|
5084
|
+
if (list === void 0) {
|
|
5085
|
+
list = [];
|
|
5086
|
+
}
|
|
5087
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
5088
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
5089
|
+
const win = getWindow(scrollableAncestor);
|
|
5090
|
+
if (isBody) {
|
|
5091
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
|
|
5092
|
+
}
|
|
5093
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
5094
|
+
}
|
|
5049
5095
|
|
|
5050
5096
|
function getCssDimensions(element) {
|
|
5051
5097
|
const css = getComputedStyle$1(element);
|
|
@@ -5068,10 +5114,6 @@ function getCssDimensions(element) {
|
|
|
5068
5114
|
};
|
|
5069
5115
|
}
|
|
5070
5116
|
|
|
5071
|
-
function isElement(value) {
|
|
5072
|
-
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
5073
|
-
}
|
|
5074
|
-
|
|
5075
5117
|
function unwrapElement(element) {
|
|
5076
5118
|
return !isElement(element) ? element.contextElement : element;
|
|
5077
5119
|
}
|
|
@@ -5107,7 +5149,7 @@ function getScale(element) {
|
|
|
5107
5149
|
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
5108
5150
|
function getVisualOffsets(element) {
|
|
5109
5151
|
const win = getWindow(element);
|
|
5110
|
-
if (!
|
|
5152
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
5111
5153
|
return noOffsets;
|
|
5112
5154
|
}
|
|
5113
5155
|
return {
|
|
@@ -5156,7 +5198,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
5156
5198
|
while (currentIFrame && offsetParent && offsetWin !== win) {
|
|
5157
5199
|
const iframeScale = getScale(currentIFrame);
|
|
5158
5200
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
5159
|
-
const css = getComputedStyle(currentIFrame);
|
|
5201
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
5160
5202
|
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
5161
5203
|
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
5162
5204
|
x *= iframeScale.x;
|
|
@@ -5176,24 +5218,6 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
5176
5218
|
});
|
|
5177
5219
|
}
|
|
5178
5220
|
|
|
5179
|
-
function getNodeScroll(element) {
|
|
5180
|
-
if (isElement(element)) {
|
|
5181
|
-
return {
|
|
5182
|
-
scrollLeft: element.scrollLeft,
|
|
5183
|
-
scrollTop: element.scrollTop
|
|
5184
|
-
};
|
|
5185
|
-
}
|
|
5186
|
-
return {
|
|
5187
|
-
scrollLeft: element.pageXOffset,
|
|
5188
|
-
scrollTop: element.pageYOffset
|
|
5189
|
-
};
|
|
5190
|
-
}
|
|
5191
|
-
|
|
5192
|
-
function getDocumentElement(node) {
|
|
5193
|
-
var _ref;
|
|
5194
|
-
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
5195
|
-
}
|
|
5196
|
-
|
|
5197
5221
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
5198
5222
|
let {
|
|
5199
5223
|
rect,
|
|
@@ -5261,47 +5285,6 @@ function getDocumentRect(element) {
|
|
|
5261
5285
|
};
|
|
5262
5286
|
}
|
|
5263
5287
|
|
|
5264
|
-
function getParentNode(node) {
|
|
5265
|
-
if (getNodeName(node) === 'html') {
|
|
5266
|
-
return node;
|
|
5267
|
-
}
|
|
5268
|
-
const result =
|
|
5269
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
|
5270
|
-
node.assignedSlot ||
|
|
5271
|
-
// DOM Element detected.
|
|
5272
|
-
node.parentNode ||
|
|
5273
|
-
// ShadowRoot detected.
|
|
5274
|
-
isShadowRoot(node) && node.host ||
|
|
5275
|
-
// Fallback.
|
|
5276
|
-
getDocumentElement(node);
|
|
5277
|
-
return isShadowRoot(result) ? result.host : result;
|
|
5278
|
-
}
|
|
5279
|
-
|
|
5280
|
-
function getNearestOverflowAncestor(node) {
|
|
5281
|
-
const parentNode = getParentNode(node);
|
|
5282
|
-
if (isLastTraversableNode(parentNode)) {
|
|
5283
|
-
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
5284
|
-
}
|
|
5285
|
-
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
5286
|
-
return parentNode;
|
|
5287
|
-
}
|
|
5288
|
-
return getNearestOverflowAncestor(parentNode);
|
|
5289
|
-
}
|
|
5290
|
-
|
|
5291
|
-
function getOverflowAncestors(node, list) {
|
|
5292
|
-
var _node$ownerDocument;
|
|
5293
|
-
if (list === void 0) {
|
|
5294
|
-
list = [];
|
|
5295
|
-
}
|
|
5296
|
-
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
5297
|
-
const isBody = scrollableAncestor === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);
|
|
5298
|
-
const win = getWindow(scrollableAncestor);
|
|
5299
|
-
if (isBody) {
|
|
5300
|
-
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
|
|
5301
|
-
}
|
|
5302
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
5303
|
-
}
|
|
5304
|
-
|
|
5305
5288
|
function getViewportRect(element, strategy) {
|
|
5306
5289
|
const win = getWindow(element);
|
|
5307
5290
|
const html = getDocumentElement(element);
|
|
@@ -5313,7 +5296,7 @@ function getViewportRect(element, strategy) {
|
|
|
5313
5296
|
if (visualViewport) {
|
|
5314
5297
|
width = visualViewport.width;
|
|
5315
5298
|
height = visualViewport.height;
|
|
5316
|
-
const visualViewportBased =
|
|
5299
|
+
const visualViewportBased = isWebKit();
|
|
5317
5300
|
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
5318
5301
|
x = visualViewport.offsetLeft;
|
|
5319
5302
|
y = visualViewport.offsetTop;
|
|
@@ -5450,7 +5433,7 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
5450
5433
|
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
5451
5434
|
scroll = getNodeScroll(offsetParent);
|
|
5452
5435
|
}
|
|
5453
|
-
if (
|
|
5436
|
+
if (isOffsetParentAnElement) {
|
|
5454
5437
|
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
5455
5438
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
5456
5439
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
@@ -5475,17 +5458,6 @@ function getTrueOffsetParent(element, polyfill) {
|
|
|
5475
5458
|
}
|
|
5476
5459
|
return element.offsetParent;
|
|
5477
5460
|
}
|
|
5478
|
-
function getContainingBlock(element) {
|
|
5479
|
-
let currentNode = getParentNode(element);
|
|
5480
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
5481
|
-
if (isContainingBlock(currentNode)) {
|
|
5482
|
-
return currentNode;
|
|
5483
|
-
} else {
|
|
5484
|
-
currentNode = getParentNode(currentNode);
|
|
5485
|
-
}
|
|
5486
|
-
}
|
|
5487
|
-
return null;
|
|
5488
|
-
}
|
|
5489
5461
|
|
|
5490
5462
|
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
5491
5463
|
// such as table ancestors and cross browser bugs.
|
|
@@ -5523,7 +5495,7 @@ const getElementRects = async function (_ref) {
|
|
|
5523
5495
|
};
|
|
5524
5496
|
|
|
5525
5497
|
function isRTL(element) {
|
|
5526
|
-
return getComputedStyle(element).direction === 'rtl';
|
|
5498
|
+
return getComputedStyle$1(element).direction === 'rtl';
|
|
5527
5499
|
}
|
|
5528
5500
|
|
|
5529
5501
|
const platform = {
|