@editora/ui-core 0.2.2 → 0.3.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/{ElementBase-DxbvhLJs.js → ElementBase-CbUsP3D6.js} +1 -1
- package/dist/{ElementBase-BeZT54Hj.mjs → ElementBase-D5QsC5Vw.mjs} +10 -1
- package/dist/ElementBase.d.ts +7 -0
- package/dist/ElementBase.d.ts.map +1 -1
- package/dist/accordion.cjs.js +1 -1
- package/dist/accordion.esm.js +1 -1
- package/dist/add-icons-CVeHOsWl.js +1 -0
- package/dist/add-icons-DBUZJ0g7.mjs +14 -0
- package/dist/add-icons.cjs.js +1 -0
- package/dist/add-icons.d.ts +16 -0
- package/dist/add-icons.d.ts.map +1 -0
- package/dist/add-icons.esm.js +4 -0
- package/dist/alert-dialog.cjs.js +24 -24
- package/dist/alert-dialog.esm.js +112 -107
- package/dist/alert.cjs.js +8 -8
- package/dist/alert.esm.js +22 -22
- package/dist/animated-beam.cjs.js +1 -1
- package/dist/animated-beam.esm.js +1 -1
- package/dist/animated-list.cjs.js +1 -1
- package/dist/animated-list.esm.js +1 -1
- package/dist/animated-text.cjs.js +1 -1
- package/dist/animated-text.esm.js +1 -1
- package/dist/app-header.cjs.js +15 -3
- package/dist/app-header.esm.js +31 -4
- package/dist/aspect-ratio.cjs.js +1 -1
- package/dist/aspect-ratio.esm.js +1 -1
- package/dist/avatar.cjs.js +1 -1
- package/dist/avatar.esm.js +1 -1
- package/dist/badge.cjs.js +1 -1
- package/dist/badge.esm.js +1 -1
- package/dist/block-controls.cjs.js +1 -1
- package/dist/block-controls.esm.js +1 -1
- package/dist/box.cjs.js +1 -1
- package/dist/box.esm.js +1 -1
- package/dist/breadcrumb.cjs.js +4 -4
- package/dist/breadcrumb.esm.js +93 -84
- package/dist/button.cjs.js +520 -1
- package/dist/button.esm.js +682 -2
- package/dist/{calendar-CzpWDxLc.js → calendar-BsVqtpjM.js} +6 -6
- package/dist/{calendar-DkSDFg33.mjs → calendar-CFafqZVA.mjs} +6 -6
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +1 -1
- package/dist/card.cjs.js +6 -5
- package/dist/card.esm.js +52 -39
- package/dist/chart.cjs.js +2 -2
- package/dist/chart.esm.js +2 -2
- package/dist/checkbox.cjs.js +4 -4
- package/dist/checkbox.esm.js +36 -15
- package/dist/clone-source-BxK2pEVw.mjs +11 -0
- package/dist/clone-source-C7E_ri5f.js +1 -0
- package/dist/collapsible.cjs.js +1 -1
- package/dist/collapsible.esm.js +1 -1
- package/dist/color-picker.cjs.js +2 -2
- package/dist/color-picker.esm.js +3 -3
- package/dist/combobox.cjs.js +4 -4
- package/dist/combobox.esm.js +22 -19
- package/dist/command-palette.cjs.js +1 -1
- package/dist/command-palette.esm.js +1 -1
- package/dist/command.cjs.js +1 -1
- package/dist/command.esm.js +1 -1
- package/dist/components/ui-alert-dialog.d.ts.map +1 -1
- package/dist/components/ui-alert.d.ts.map +1 -1
- package/dist/components/ui-app-header.d.ts +1 -0
- package/dist/components/ui-app-header.d.ts.map +1 -1
- package/dist/components/ui-breadcrumb.d.ts.map +1 -1
- package/dist/components/ui-card.d.ts +7 -0
- package/dist/components/ui-card.d.ts.map +1 -1
- package/dist/components/ui-checkbox.d.ts +6 -0
- package/dist/components/ui-checkbox.d.ts.map +1 -1
- package/dist/components/ui-combobox.d.ts.map +1 -1
- package/dist/components/ui-date-time-picker.d.ts.map +1 -1
- package/dist/components/ui-dialog.d.ts +1 -0
- package/dist/components/ui-dialog.d.ts.map +1 -1
- package/dist/components/ui-drawer.d.ts.map +1 -1
- package/dist/components/ui-dropdown.d.ts.map +1 -1
- package/dist/components/ui-empty-state.d.ts.map +1 -1
- package/dist/components/ui-hover-card.d.ts.map +1 -1
- package/dist/components/ui-icon.d.ts +1 -0
- package/dist/components/ui-icon.d.ts.map +1 -1
- package/dist/components/ui-input.d.ts +16 -0
- package/dist/components/ui-input.d.ts.map +1 -1
- package/dist/components/ui-layout.d.ts +20 -0
- package/dist/components/ui-layout.d.ts.map +1 -1
- package/dist/components/ui-menu.d.ts +1 -0
- package/dist/components/ui-menu.d.ts.map +1 -1
- package/dist/components/ui-menubar.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts +6 -0
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-number-field.d.ts +6 -0
- package/dist/components/ui-number-field.d.ts.map +1 -1
- package/dist/components/ui-pagination.d.ts.map +1 -1
- package/dist/components/ui-password-field.d.ts +11 -0
- package/dist/components/ui-password-field.d.ts.map +1 -1
- package/dist/components/ui-popover.d.ts.map +1 -1
- package/dist/components/ui-positioner.d.ts.map +1 -1
- package/dist/components/ui-radio-group.d.ts +6 -0
- package/dist/components/ui-radio-group.d.ts.map +1 -1
- package/dist/components/ui-rating.d.ts +1 -0
- package/dist/components/ui-rating.d.ts.map +1 -1
- package/dist/components/ui-select.d.ts +7 -0
- package/dist/components/ui-select.d.ts.map +1 -1
- package/dist/components/ui-sidebar.d.ts +1 -0
- package/dist/components/ui-sidebar.d.ts.map +1 -1
- package/dist/components/ui-slider.d.ts +6 -0
- package/dist/components/ui-slider.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts +1 -0
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/components/ui-switch.d.ts +6 -0
- package/dist/components/ui-switch.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts +2 -0
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-textarea.d.ts +6 -0
- package/dist/components/ui-textarea.d.ts.map +1 -1
- package/dist/components/ui-toast.d.ts.map +1 -1
- package/dist/components/ui-tooltip.d.ts.map +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/context-menu.cjs.js +2 -2
- package/dist/context-menu.esm.js +2 -2
- package/dist/control-group.cjs.js +1 -1
- package/dist/control-group.esm.js +1 -1
- package/dist/data-table.cjs.js +5 -5
- package/dist/data-table.esm.js +7 -7
- package/dist/date-field.cjs.js +1 -1
- package/dist/date-field.esm.js +3 -3
- package/dist/date-picker.cjs.js +2 -2
- package/dist/date-picker.esm.js +17 -17
- package/dist/date-range-picker.cjs.js +2 -2
- package/dist/date-range-picker.esm.js +4 -4
- package/dist/date-range-time-picker.cjs.js +3 -3
- package/dist/date-range-time-picker.esm.js +16 -16
- package/dist/date-time-picker.cjs.js +26 -23
- package/dist/date-time-picker.esm.js +49 -46
- package/dist/{date-time-utils-zAx4ghvC.mjs → date-time-utils-CJUksWj3.mjs} +1 -1
- package/dist/{date-time-utils-C-4eHTyy.js → date-time-utils-D3hQQ5Om.js} +1 -1
- package/dist/description.cjs.js +1 -1
- package/dist/description.esm.js +1 -1
- package/dist/dialog.cjs.js +7 -7
- package/dist/dialog.esm.js +51 -47
- package/dist/direction-provider.cjs.js +1 -1
- package/dist/direction-provider.esm.js +1 -1
- package/dist/dismissable-layer.cjs.js +1 -1
- package/dist/dismissable-layer.esm.js +1 -1
- package/dist/dock.cjs.js +1 -1
- package/dist/dock.esm.js +1 -1
- package/dist/drawer.cjs.js +5 -5
- package/dist/drawer.esm.js +18 -17
- package/dist/dropdown.cjs.js +7 -7
- package/dist/dropdown.esm.js +39 -38
- package/dist/empty-state.cjs.js +12 -2
- package/dist/empty-state.esm.js +17 -7
- package/dist/field-error.cjs.js +1 -1
- package/dist/field-error.esm.js +1 -1
- package/dist/field.cjs.js +2 -2
- package/dist/field.esm.js +2 -2
- package/dist/fieldset.cjs.js +1 -1
- package/dist/fieldset.esm.js +1 -1
- package/dist/file-upload.cjs.js +1 -1
- package/dist/file-upload.esm.js +1 -1
- package/dist/flex.cjs.js +1 -1
- package/dist/flex.esm.js +1 -1
- package/dist/floating-toolbar.cjs.js +2 -2
- package/dist/floating-toolbar.esm.js +2 -2
- package/dist/focus-scope-Dl0qk5GP.mjs +177 -0
- package/dist/focus-scope-Doz0bnE1.js +1 -0
- package/dist/focus-scope.cjs.js +1 -1
- package/dist/focus-scope.esm.js +2 -2
- package/dist/form-control-B90_3kYN.js +1 -0
- package/dist/form-control-D9wWUMBl.mjs +86 -0
- package/dist/form.cjs.js +2 -2
- package/dist/form.esm.js +2 -2
- package/dist/gantt.cjs.js +2 -2
- package/dist/gantt.esm.js +2 -2
- package/dist/grid.cjs.js +1 -1
- package/dist/grid.esm.js +1 -1
- package/dist/hover-card.cjs.js +5 -5
- package/dist/hover-card.esm.js +19 -18
- package/dist/icon-cloud.cjs.js +1 -1
- package/dist/icon-cloud.esm.js +1 -1
- package/dist/icon.cjs.js +207 -1
- package/dist/icon.esm.js +294 -2
- package/dist/icons-CpCpPXV5.js +1 -0
- package/dist/icons-DWYbbhb0.mjs +115 -0
- package/dist/icons.d.ts +11 -1
- package/dist/icons.d.ts.map +1 -1
- package/dist/implicit-submit-B6M5Uc56.js +1 -0
- package/dist/implicit-submit-Lr0-q2LR.mjs +44 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +309 -299
- package/dist/inline-edit.cjs.js +1 -1
- package/dist/inline-edit.esm.js +1 -1
- package/dist/input.cjs.js +62 -20
- package/dist/input.esm.js +164 -58
- package/dist/label.cjs.js +1 -1
- package/dist/label.esm.js +1 -1
- package/dist/layout.cjs.js +145 -4
- package/dist/layout.esm.js +278 -40
- package/dist/marquee.cjs.js +1 -1
- package/dist/marquee.esm.js +1 -1
- package/dist/masonry-grid.cjs.js +1 -1
- package/dist/masonry-grid.esm.js +1 -1
- package/dist/menu.cjs.js +8 -8
- package/dist/menu.esm.js +51 -47
- package/dist/menubar.cjs.js +9 -9
- package/dist/menubar.esm.js +41 -40
- package/dist/meter.cjs.js +1 -1
- package/dist/meter.esm.js +1 -1
- package/dist/multi-select.cjs.js +7 -7
- package/dist/multi-select.esm.js +55 -34
- package/dist/navigate-CXebafwF.mjs +18 -0
- package/dist/navigate-ChJVIIuS.js +1 -0
- package/dist/navigation-menu.cjs.js +1 -1
- package/dist/navigation-menu.esm.js +1 -1
- package/dist/number-attribute-BAF07JrU.mjs +8 -0
- package/dist/number-attribute-C4Rrl7d3.js +1 -0
- package/dist/number-field.cjs.js +8 -8
- package/dist/number-field.esm.js +90 -69
- package/dist/number-ticker.cjs.js +1 -1
- package/dist/number-ticker.esm.js +1 -1
- package/dist/odometer.cjs.js +1 -1
- package/dist/odometer.esm.js +1 -1
- package/dist/orbiter.cjs.js +1 -1
- package/dist/orbiter.esm.js +1 -1
- package/dist/pagination.cjs.js +24 -23
- package/dist/pagination.esm.js +61 -46
- package/dist/{panel-group-BVHJEdfx.js → panel-group-BIzzpQ5i.js} +1 -1
- package/dist/{panel-group-BxO_eNW6.mjs → panel-group-CFLjzRWI.mjs} +1 -1
- package/dist/panel-group.cjs.js +1 -1
- package/dist/panel-group.esm.js +1 -1
- package/dist/panel.cjs.js +1 -1
- package/dist/panel.esm.js +1 -1
- package/dist/password-field.cjs.js +36 -16
- package/dist/password-field.esm.js +113 -44
- package/dist/pin-input.cjs.js +1 -1
- package/dist/pin-input.esm.js +1 -1
- package/dist/placement-grid.cjs.js +1 -1
- package/dist/placement-grid.esm.js +1 -1
- package/dist/plugin-panel.cjs.js +1 -1
- package/dist/plugin-panel.esm.js +1 -1
- package/dist/popover.cjs.js +2 -2
- package/dist/popover.esm.js +28 -26
- package/dist/portal.cjs.js +1 -1
- package/dist/portal.esm.js +1 -1
- package/dist/positioner.cjs.js +2 -2
- package/dist/positioner.esm.js +35 -38
- package/dist/preload.cjs.js +221 -0
- package/dist/preload.css +220 -0
- package/dist/preload.d.ts +17 -0
- package/dist/preload.d.ts.map +1 -0
- package/dist/preload.esm.js +224 -0
- package/dist/presence.cjs.js +1 -1
- package/dist/presence.esm.js +1 -1
- package/dist/primitives/clone-source.d.ts +3 -0
- package/dist/primitives/clone-source.d.ts.map +1 -0
- package/dist/primitives/focus-scope.d.ts +6 -0
- package/dist/primitives/focus-scope.d.ts.map +1 -1
- package/dist/primitives/form-control.d.ts +68 -0
- package/dist/primitives/form-control.d.ts.map +1 -0
- package/dist/primitives/implicit-submit.d.ts +17 -0
- package/dist/primitives/implicit-submit.d.ts.map +1 -0
- package/dist/primitives/navigate.d.ts +27 -0
- package/dist/primitives/navigate.d.ts.map +1 -0
- package/dist/primitives/number-attribute.d.ts +7 -0
- package/dist/primitives/number-attribute.d.ts.map +1 -0
- package/dist/primitives/slotted-input.d.ts +19 -0
- package/dist/primitives/slotted-input.d.ts.map +1 -0
- package/dist/progress.cjs.js +3 -3
- package/dist/progress.esm.js +3 -3
- package/dist/quick-actions.cjs.js +5 -5
- package/dist/quick-actions.esm.js +3 -3
- package/dist/radio-group.cjs.js +9 -9
- package/dist/radio-group.esm.js +47 -24
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +1 -1
- package/dist/rating.cjs.js +6 -6
- package/dist/rating.esm.js +21 -10
- package/dist/{runtime-CJzoaC8Z.mjs → runtime-CORXjP7e.mjs} +366 -352
- package/dist/runtime-uCly3ECd.js +5 -0
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +1 -1
- package/dist/scroll-area.cjs.js +1 -1
- package/dist/scroll-area.esm.js +1 -1
- package/dist/section.cjs.js +1 -1
- package/dist/section.esm.js +1 -1
- package/dist/select.cjs.js +21 -21
- package/dist/select.esm.js +111 -71
- package/dist/selection-popup.cjs.js +2 -2
- package/dist/selection-popup.esm.js +2 -2
- package/dist/semantic-tokens.d.ts.map +1 -1
- package/dist/separator.cjs.js +1 -1
- package/dist/separator.esm.js +1 -1
- package/dist/sidebar.cjs.js +15 -15
- package/dist/sidebar.esm.js +48 -42
- package/dist/skeleton.cjs.js +1 -1
- package/dist/skeleton.esm.js +1 -1
- package/dist/slider.cjs.js +11 -11
- package/dist/slider.esm.js +40 -23
- package/dist/slot.cjs.js +1 -1
- package/dist/slot.esm.js +1 -1
- package/dist/slotted-input-BVq2QQg2.js +1 -0
- package/dist/slotted-input-atWznLfm.mjs +13 -0
- package/dist/sortable.cjs.js +25 -25
- package/dist/sortable.esm.js +29 -21
- package/dist/spinning-text.cjs.js +1 -1
- package/dist/spinning-text.esm.js +1 -1
- package/dist/split-button.cjs.js +1 -1
- package/dist/split-button.esm.js +1 -1
- package/dist/splitter.cjs.js +1 -1
- package/dist/splitter.esm.js +1 -1
- package/dist/standalone/add-icons.d.ts +2 -0
- package/dist/standalone/add-icons.d.ts.map +1 -0
- package/dist/standalone/preload.d.ts +2 -0
- package/dist/standalone/preload.d.ts.map +1 -0
- package/dist/stepper.cjs.js +3 -3
- package/dist/stepper.esm.js +3 -3
- package/dist/switch.cjs.js +9 -9
- package/dist/switch.esm.js +56 -35
- package/dist/table.cjs.js +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/tabs.cjs.js +14 -14
- package/dist/tabs.esm.js +129 -115
- package/dist/tags-input.cjs.js +1 -1
- package/dist/tags-input.esm.js +1 -1
- package/dist/textarea.cjs.js +33 -11
- package/dist/textarea.esm.js +74 -35
- package/dist/theme.d.ts +6 -0
- package/dist/theme.d.ts.map +1 -1
- package/dist/time-field.cjs.js +1 -1
- package/dist/time-field.esm.js +2 -2
- package/dist/time-picker.cjs.js +1 -1
- package/dist/time-picker.esm.js +3 -3
- package/dist/timeline.cjs.js +2 -2
- package/dist/timeline.esm.js +2 -2
- package/dist/toast.cjs.js +4 -4
- package/dist/toast.esm.js +17 -16
- package/dist/toggle-group.cjs.js +1 -1
- package/dist/toggle-group.esm.js +1 -1
- package/dist/toggle.cjs.js +3 -3
- package/dist/toggle.esm.js +9 -9
- package/dist/toolbar.cjs.js +1 -1
- package/dist/toolbar.esm.js +1 -1
- package/dist/tooltip.cjs.js +2 -2
- package/dist/tooltip.esm.js +12 -14
- package/dist/transfer-list.cjs.js +1 -1
- package/dist/transfer-list.esm.js +1 -1
- package/dist/{tree-33fVNnaf.mjs → tree-CD2k2lIC.mjs} +1 -1
- package/dist/{tree-Dc02MChE.js → tree-ChQfhxya.js} +1 -1
- package/dist/tree-item.cjs.js +1 -1
- package/dist/tree-item.esm.js +1 -1
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +1 -1
- package/dist/visually-hidden.cjs.js +1 -1
- package/dist/visually-hidden.esm.js +1 -1
- package/dist/wizard.cjs.js +4 -4
- package/dist/wizard.esm.js +4 -4
- package/package.json +3 -2
- package/dist/focus-scope-Bwug2gDv.js +0 -1
- package/dist/focus-scope-CmEsG5UZ.mjs +0 -138
- package/dist/runtime-DYSIU3sR.js +0 -5
- package/dist/ui-button-C3OmI7Sn.mjs +0 -684
- package/dist/ui-button-CnLwXBnx.js +0 -520
- package/dist/ui-icon-D3avtxX_.js +0 -207
- package/dist/ui-icon-DLhB08Fo.mjs +0 -361
package/dist/popover.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("./ElementBase-CbUsP3D6.js"),g=require("./number-attribute-C4Rrl7d3.js"),c=require("./clone-source-C7E_ri5f.js"),m=require("./portal-XbYR3m_q.js"),_=require("./dismissable-layer-DNfrKA20.js"),x=require("./positioner-DZ1FW6A9.js"),s=require("./overlay-motion-B56x1GoY.js"),y=`
|
|
2
2
|
${s.OVERLAY_MOTION_CSS}
|
|
3
3
|
|
|
4
4
|
.popover-shell {
|
|
@@ -271,4 +271,4 @@
|
|
|
271
271
|
box-shadow: none;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
`;class
|
|
274
|
+
`;class h extends b.ElementBase{constructor(){super(),this._portalEl=null,this._panelEl=null,this._positioner=null,this._layer=null,this._isOpen=!1,this._restoreFocusEl=null,this._contentObserver=null,this._hostObserver=null,this._syncPortalScheduled=!1,this._onHostClick=this._handleHostClick.bind(this)}static get observedAttributes(){return["open","placement","offset","flip","shift","close-on-escape","close-on-outside","variant","tone","size","radius","elevation"]}attributeChangedCallback(e,t,r){if(t!==r){if(e==="open"){this._syncOpenState();return}this._isOpen&&this._portalEl?.isConnected&&(e==="placement"||e==="offset"||e==="flip"||e==="shift"||e==="variant"||e==="tone"||e==="size"||e==="radius"||e==="elevation"?this._mountPortal():(e==="close-on-escape"||e==="close-on-outside")&&this._syncDismissableLayer())}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onHostClick),this._observeHost(),c.hideCloneSource(this.querySelector('[slot="content"]')),this._syncOpenState()}disconnectedCallback(){this.removeEventListener("click",this._onHostClick),this._hostObserver?.disconnect(),this._hostObserver=null,this._teardownPortal(),super.disconnectedCallback()}_handleHostClick(e){const t=this._getTrigger();if(!t)return;const r=typeof e.composedPath=="function"?e.composedPath():[],o=e.target instanceof Node?e.target:null;(r.includes(t)||o&&(t===o||t.contains(o)))&&this.toggle()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open")}toggle(){this.hasAttribute("open")?this.close():this.open()}updatePosition(){this._positioner?.update()}_getTrigger(){return this.querySelector('[slot="trigger"]')}_buildPortalContent(){const e=document.createElement("div");e.className="popover-shell",e.style.pointerEvents="auto";const t=this.getAttribute("variant");t&&(e.dataset.variant=t);const r=this.getAttribute("tone");r&&(e.dataset.tone=r);const o=this.getAttribute("size");o&&(e.dataset.size=o);const a=this.getAttribute("elevation");a&&(e.dataset.elevation=a);const n=this.getAttribute("radius");if(n&&n.trim()){const l=n.trim(),f=/^-?\d+(\.\d+)?$/.test(l)?`${l}px`:l;e.style.setProperty("--ui-popover-radius",f)}const u=document.createElement("style");u.textContent=y,e.appendChild(u);const i=document.createElement("div");i.className="panel show",this._panelEl=i;const v=document.createElement("div");v.className="arrow",i.appendChild(v);const d=this.querySelector('[slot="content"]'),p=document.createElement("div");return p.className="content",d&&p.appendChild(c.revealClone(d.cloneNode(!0))),i.appendChild(p),e.appendChild(i),e}_getContentSource(){return this.querySelector('[slot="content"]')}_placement(){const e=this.getAttribute("placement");return e||"bottom"}_offset(){const e=g.numberAttribute(this.getAttribute("offset"),8);return Number.isFinite(e)?e:8}_closeOnEscape(){return this.getAttribute("close-on-escape")!=="false"}_closeOnOutside(){return this.getAttribute("close-on-outside")!=="false"}_syncDismissableLayer(){const e=this._getTrigger();!e||!this._panelEl||(this._layer?.destroy(),this._layer=_.createDismissableLayer({node:this._panelEl,trigger:e,closeOnEscape:this._closeOnEscape(),closeOnPointerOutside:this._closeOnOutside(),onDismiss:()=>this.close()}))}_teardownPortal(e=!1){this._contentObserver?.disconnect(),this._contentObserver=null,this._layer?.destroy(),this._layer=null,this._positioner?.destroy(),this._positioner=null,this._panelEl=null,e?s.retireOverlay(this._portalEl):s.removeOverlay(this._portalEl),this._portalEl=null}_schedulePortalSync(){this._syncPortalScheduled||!this._isOpen||(this._syncPortalScheduled=!0,queueMicrotask(()=>{this._syncPortalScheduled=!1,this._isOpen&&this._mountPortal()}))}_observeContent(){this._contentObserver?.disconnect(),this._contentObserver=null;const e=this._getContentSource();c.hideCloneSource(e),!(!e||typeof MutationObserver>"u")&&(this._contentObserver=new MutationObserver(()=>this._schedulePortalSync()),this._contentObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))}_observeHost(){this._hostObserver?.disconnect(),this._hostObserver=null,!(typeof MutationObserver>"u")&&(this._hostObserver=new MutationObserver(()=>this._schedulePortalSync()),this._hostObserver.observe(this,{childList:!0,subtree:!1}))}_mountPortal(){const e=this._getTrigger();if(!e)return;this._teardownPortal(),this._portalEl=this._buildPortalContent();const t=m.createPortalContainer();t&&(t.appendChild(this._portalEl),this._observeContent(),this._positioner=x.createPositioner({anchor:e,floating:this._portalEl,placement:this._placement(),offset:this._offset(),shift:this.getAttribute("shift")!=="false",flip:this.getAttribute("flip")!=="false",arrow:this._portalEl.querySelector(".arrow")}),s.openOverlay(this._portalEl),this._syncDismissableLayer())}_syncOpenState(){const e=this.hasAttribute("open");if(e===this._isOpen){e&&(!this._portalEl||!this._portalEl.isConnected?this._mountPortal():this._positioner?.update());return}if(this._isOpen=e,e){this._restoreFocusEl=document.activeElement instanceof HTMLElement?document.activeElement:null,this._mountPortal(),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!0},bubbles:!0,composed:!0}));return}this._teardownPortal(!0),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("open-change",{detail:{open:!1},bubbles:!0,composed:!0}));const t=this._getTrigger(),r=this._restoreFocusEl;this._restoreFocusEl=null;const o=(t&&t.isConnected?t:r)||null;if(o&&o.isConnected)try{o.focus()}catch{}}render(){this.setContent('<slot name="trigger"></slot>')}shouldRenderOnAttributeChange(e,t,r){return!1}}typeof customElements<"u"&&!customElements.get("ui-popover")&&customElements.define("ui-popover",h);exports.UIPopover=h;
|
package/dist/popover.esm.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { E as h } from "./ElementBase-D5QsC5Vw.mjs";
|
|
2
|
+
import { n as f } from "./number-attribute-BAF07JrU.mjs";
|
|
3
|
+
import { h as v, r as b } from "./clone-source-BxK2pEVw.mjs";
|
|
4
|
+
import { b as g } from "./portal-DeaM1tYY.mjs";
|
|
5
|
+
import { c as m } from "./dismissable-layer-BmPIoK80.mjs";
|
|
6
|
+
import { e as _ } from "./positioner-BE8Nbho2.mjs";
|
|
7
|
+
import { O as x, r as w, a as y, o as E } from "./overlay-motion-BX3dPLay.mjs";
|
|
8
|
+
const C = `
|
|
9
|
+
${x}
|
|
8
10
|
|
|
9
11
|
.popover-shell {
|
|
10
12
|
--ui-popover-accent: var(--ui-color-primary, var(--ui-primary, #2563eb));
|
|
@@ -277,7 +279,7 @@ const w = `
|
|
|
277
279
|
}
|
|
278
280
|
}
|
|
279
281
|
`;
|
|
280
|
-
class
|
|
282
|
+
class O extends h {
|
|
281
283
|
constructor() {
|
|
282
284
|
super(), this._portalEl = null, this._panelEl = null, this._positioner = null, this._layer = null, this._isOpen = !1, this._restoreFocusEl = null, this._contentObserver = null, this._hostObserver = null, this._syncPortalScheduled = !1, this._onHostClick = this._handleHostClick.bind(this);
|
|
283
285
|
}
|
|
@@ -307,7 +309,7 @@ class y extends d {
|
|
|
307
309
|
}
|
|
308
310
|
}
|
|
309
311
|
connectedCallback() {
|
|
310
|
-
super.connectedCallback(), this.addEventListener("click", this._onHostClick), this._observeHost(), this._syncOpenState();
|
|
312
|
+
super.connectedCallback(), this.addEventListener("click", this._onHostClick), this._observeHost(), v(this.querySelector('[slot="content"]')), this._syncOpenState();
|
|
311
313
|
}
|
|
312
314
|
disconnectedCallback() {
|
|
313
315
|
this.removeEventListener("click", this._onHostClick), this._hostObserver?.disconnect(), this._hostObserver = null, this._teardownPortal(), super.disconnectedCallback();
|
|
@@ -342,21 +344,21 @@ class y extends d {
|
|
|
342
344
|
r && (e.dataset.tone = r);
|
|
343
345
|
const o = this.getAttribute("size");
|
|
344
346
|
o && (e.dataset.size = o);
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
const
|
|
348
|
-
if (
|
|
349
|
-
const p =
|
|
350
|
-
e.style.setProperty("--ui-popover-radius",
|
|
347
|
+
const s = this.getAttribute("elevation");
|
|
348
|
+
s && (e.dataset.elevation = s);
|
|
349
|
+
const a = this.getAttribute("radius");
|
|
350
|
+
if (a && a.trim()) {
|
|
351
|
+
const p = a.trim(), d = /^-?\d+(\.\d+)?$/.test(p) ? `${p}px` : p;
|
|
352
|
+
e.style.setProperty("--ui-popover-radius", d);
|
|
351
353
|
}
|
|
352
354
|
const l = document.createElement("style");
|
|
353
|
-
l.textContent =
|
|
355
|
+
l.textContent = C, e.appendChild(l);
|
|
354
356
|
const i = document.createElement("div");
|
|
355
357
|
i.className = "panel show", this._panelEl = i;
|
|
356
358
|
const c = document.createElement("div");
|
|
357
359
|
c.className = "arrow", i.appendChild(c);
|
|
358
360
|
const u = this.querySelector('[slot="content"]'), n = document.createElement("div");
|
|
359
|
-
return n.className = "content", u && n.appendChild(u.cloneNode(!0)), i.appendChild(n), e.appendChild(i), e;
|
|
361
|
+
return n.className = "content", u && n.appendChild(b(u.cloneNode(!0))), i.appendChild(n), e.appendChild(i), e;
|
|
360
362
|
}
|
|
361
363
|
_getContentSource() {
|
|
362
364
|
return this.querySelector('[slot="content"]');
|
|
@@ -366,7 +368,7 @@ class y extends d {
|
|
|
366
368
|
return e || "bottom";
|
|
367
369
|
}
|
|
368
370
|
_offset() {
|
|
369
|
-
const e =
|
|
371
|
+
const e = f(this.getAttribute("offset"), 8);
|
|
370
372
|
return Number.isFinite(e) ? e : 8;
|
|
371
373
|
}
|
|
372
374
|
_closeOnEscape() {
|
|
@@ -377,7 +379,7 @@ class y extends d {
|
|
|
377
379
|
}
|
|
378
380
|
_syncDismissableLayer() {
|
|
379
381
|
const e = this._getTrigger();
|
|
380
|
-
!e || !this._panelEl || (this._layer?.destroy(), this._layer =
|
|
382
|
+
!e || !this._panelEl || (this._layer?.destroy(), this._layer = m({
|
|
381
383
|
node: this._panelEl,
|
|
382
384
|
trigger: e,
|
|
383
385
|
closeOnEscape: this._closeOnEscape(),
|
|
@@ -386,7 +388,7 @@ class y extends d {
|
|
|
386
388
|
}));
|
|
387
389
|
}
|
|
388
390
|
_teardownPortal(e = !1) {
|
|
389
|
-
this._contentObserver?.disconnect(), this._contentObserver = null, this._layer?.destroy(), this._layer = null, this._positioner?.destroy(), this._positioner = null, this._panelEl = null, e ?
|
|
391
|
+
this._contentObserver?.disconnect(), this._contentObserver = null, this._layer?.destroy(), this._layer = null, this._positioner?.destroy(), this._positioner = null, this._panelEl = null, e ? w(this._portalEl) : y(this._portalEl), this._portalEl = null;
|
|
390
392
|
}
|
|
391
393
|
_schedulePortalSync() {
|
|
392
394
|
this._syncPortalScheduled || !this._isOpen || (this._syncPortalScheduled = !0, queueMicrotask(() => {
|
|
@@ -396,7 +398,7 @@ class y extends d {
|
|
|
396
398
|
_observeContent() {
|
|
397
399
|
this._contentObserver?.disconnect(), this._contentObserver = null;
|
|
398
400
|
const e = this._getContentSource();
|
|
399
|
-
!e || typeof MutationObserver > "u"
|
|
401
|
+
v(e), !(!e || typeof MutationObserver > "u") && (this._contentObserver = new MutationObserver(() => this._schedulePortalSync()), this._contentObserver.observe(e, {
|
|
400
402
|
attributes: !0,
|
|
401
403
|
childList: !0,
|
|
402
404
|
characterData: !0,
|
|
@@ -413,8 +415,8 @@ class y extends d {
|
|
|
413
415
|
const e = this._getTrigger();
|
|
414
416
|
if (!e) return;
|
|
415
417
|
this._teardownPortal(), this._portalEl = this._buildPortalContent();
|
|
416
|
-
const t =
|
|
417
|
-
t && (t.appendChild(this._portalEl), this._observeContent(), this._positioner =
|
|
418
|
+
const t = g();
|
|
419
|
+
t && (t.appendChild(this._portalEl), this._observeContent(), this._positioner = _({
|
|
418
420
|
anchor: e,
|
|
419
421
|
floating: this._portalEl,
|
|
420
422
|
placement: this._placement(),
|
|
@@ -422,7 +424,7 @@ class y extends d {
|
|
|
422
424
|
shift: this.getAttribute("shift") !== "false",
|
|
423
425
|
flip: this.getAttribute("flip") !== "false",
|
|
424
426
|
arrow: this._portalEl.querySelector(".arrow")
|
|
425
|
-
}),
|
|
427
|
+
}), E(this._portalEl), this._syncDismissableLayer());
|
|
426
428
|
}
|
|
427
429
|
_syncOpenState() {
|
|
428
430
|
const e = this.hasAttribute("open");
|
|
@@ -451,7 +453,7 @@ class y extends d {
|
|
|
451
453
|
return !1;
|
|
452
454
|
}
|
|
453
455
|
}
|
|
454
|
-
typeof customElements < "u" && !customElements.get("ui-popover") && customElements.define("ui-popover",
|
|
456
|
+
typeof customElements < "u" && !customElements.get("ui-popover") && customElements.define("ui-popover", O);
|
|
455
457
|
export {
|
|
456
|
-
|
|
458
|
+
O as UIPopover
|
|
457
459
|
};
|
package/dist/portal.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./ElementBase-CbUsP3D6.js"),l=require("./selector-BvAh35ve.js"),a=`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
color-scheme: light dark;
|
package/dist/portal.esm.js
CHANGED
package/dist/positioner.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("./ElementBase-CbUsP3D6.js"),h=require("./positioner-DZ1FW6A9.js"),a=require("./selector-BvAh35ve.js"),d=require("./number-attribute-C4Rrl7d3.js"),f=`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
color-scheme: light dark;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
`,r=(e,t=0)=>d.numberAttribute(e,t);function o(e){if(e==null)return!1;const t=e.toLowerCase();return t!=="false"&&t!=="0"&&t!=="off"}function b(e){return new Set(["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"]).has(e)?e:"bottom"}function m(e){return e==="absolute"?"absolute":"fixed"}class u extends c.ElementBase{constructor(){super(...arguments),this._positioner=null,this._observer=null}static get observedAttributes(){return["open","placement","strategy","offset","cross-offset","flip","shift","match-width","fit-viewport","auto-placement","hide-when-detached","inline","boundary-padding","dir","anchor","headless"]}connectedCallback(){super.connectedCallback(),this._observer=new MutationObserver(()=>this._syncPositioner()),this._observer.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["slot","id"]}),this._syncPositioner()}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._destroyPositioner(),super.disconnectedCallback()}attributeChangedCallback(t,s,i){s!==i&&this._syncPositioner()}open(){this.setAttribute("open","")}close(){this.removeAttribute("open")}updatePosition(){this._positioner?.update()}_destroyPositioner(){this._positioner?.destroy(),this._positioner=null}_resolveAnchor(){const t=this.getAttribute("anchor");if(t){const i=this.getRootNode(),n=i instanceof ShadowRoot||i instanceof Document?a.safeQuerySelector(i,t):null;if(n instanceof HTMLElement)return n;const l=a.safeQuerySelector(document,t);if(l instanceof HTMLElement)return l}const s=this.querySelector('[slot="anchor"]');return s instanceof HTMLElement?s:null}_resolveFloating(){const t=this.querySelector('[slot="content"]');return t instanceof HTMLElement?t:Array.from(this.children).find(s=>s.getAttribute("slot")!=="anchor")}_syncPositioner(){if(!this.isConnected)return;if(this.hasAttribute("headless")||!this.hasAttribute("open")){this._destroyPositioner();return}const t=this._resolveAnchor(),s=this._resolveFloating();if(!(t instanceof HTMLElement)||!(s instanceof HTMLElement)){this._destroyPositioner();return}this._destroyPositioner(),this._positioner=h.createPositioner({anchor:t,floating:s,placement:b(this.getAttribute("placement")),strategy:m(this.getAttribute("strategy")),dir:this.getAttribute("dir")==="rtl"?"rtl":"ltr",offset:r(this.getAttribute("offset"),8),crossOffset:r(this.getAttribute("cross-offset"),0),flip:!this.hasAttribute("flip")||o(this.getAttribute("flip")),shift:!this.hasAttribute("shift")||o(this.getAttribute("shift")),matchWidth:o(this.getAttribute("match-width")),fitViewport:o(this.getAttribute("fit-viewport")),autoPlacement:o(this.getAttribute("auto-placement")),hideWhenDetached:o(this.getAttribute("hide-when-detached")),inline:o(this.getAttribute("inline")),boundaryPadding:r(this.getAttribute("boundary-padding"),4),arrow:this.querySelector('[slot="arrow"], .arrow'),onUpdate:i=>{this.dispatchEvent(new CustomEvent("position-change",{detail:i,bubbles:!0,composed:!0}))}})}render(){this.setContent(`<style>${f}</style><slot name="anchor"></slot><slot name="content"></slot><slot></slot>`)}shouldRenderOnAttributeChange(){return!1}}typeof customElements<"u"&&!customElements.get("ui-positioner")&&customElements.define("ui-positioner",u);exports.UIPositioner=u;
|
package/dist/positioner.esm.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import { E as h } from "./ElementBase-
|
|
1
|
+
import { E as h } from "./ElementBase-D5QsC5Vw.mjs";
|
|
2
2
|
import { e as c } from "./positioner-BE8Nbho2.mjs";
|
|
3
3
|
import { s as l } from "./selector-WI8pD7YO.mjs";
|
|
4
|
-
|
|
4
|
+
import { n as u } from "./number-attribute-BAF07JrU.mjs";
|
|
5
|
+
const d = `
|
|
5
6
|
:host {
|
|
6
7
|
display: contents;
|
|
7
8
|
color-scheme: light dark;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
function o(s) {
|
|
15
|
-
if (s == null) return !1;
|
|
16
|
-
const t = s.toLowerCase();
|
|
10
|
+
`, r = (e, t = 0) => u(e, t);
|
|
11
|
+
function i(e) {
|
|
12
|
+
if (e == null) return !1;
|
|
13
|
+
const t = e.toLowerCase();
|
|
17
14
|
return t !== "false" && t !== "0" && t !== "off";
|
|
18
15
|
}
|
|
19
|
-
function
|
|
16
|
+
function f(e) {
|
|
20
17
|
return (/* @__PURE__ */ new Set([
|
|
21
18
|
"top",
|
|
22
19
|
"top-start",
|
|
@@ -30,12 +27,12 @@ function d(s) {
|
|
|
30
27
|
"left",
|
|
31
28
|
"left-start",
|
|
32
29
|
"left-end"
|
|
33
|
-
])).has(
|
|
30
|
+
])).has(e) ? e : "bottom";
|
|
34
31
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
32
|
+
function b(e) {
|
|
33
|
+
return e === "absolute" ? "absolute" : "fixed";
|
|
37
34
|
}
|
|
38
|
-
class
|
|
35
|
+
class m extends h {
|
|
39
36
|
constructor() {
|
|
40
37
|
super(...arguments), this._positioner = null, this._observer = null;
|
|
41
38
|
}
|
|
@@ -65,8 +62,8 @@ class b extends h {
|
|
|
65
62
|
disconnectedCallback() {
|
|
66
63
|
this._observer?.disconnect(), this._observer = null, this._destroyPositioner(), super.disconnectedCallback();
|
|
67
64
|
}
|
|
68
|
-
attributeChangedCallback(t,
|
|
69
|
-
|
|
65
|
+
attributeChangedCallback(t, s, o) {
|
|
66
|
+
s !== o && this._syncPositioner();
|
|
70
67
|
}
|
|
71
68
|
open() {
|
|
72
69
|
this.setAttribute("open", "");
|
|
@@ -83,17 +80,17 @@ class b extends h {
|
|
|
83
80
|
_resolveAnchor() {
|
|
84
81
|
const t = this.getAttribute("anchor");
|
|
85
82
|
if (t) {
|
|
86
|
-
const
|
|
83
|
+
const o = this.getRootNode(), n = o instanceof ShadowRoot || o instanceof Document ? l(o, t) : null;
|
|
87
84
|
if (n instanceof HTMLElement) return n;
|
|
88
85
|
const a = l(document, t);
|
|
89
86
|
if (a instanceof HTMLElement) return a;
|
|
90
87
|
}
|
|
91
|
-
const
|
|
92
|
-
return
|
|
88
|
+
const s = this.querySelector('[slot="anchor"]');
|
|
89
|
+
return s instanceof HTMLElement ? s : null;
|
|
93
90
|
}
|
|
94
91
|
_resolveFloating() {
|
|
95
92
|
const t = this.querySelector('[slot="content"]');
|
|
96
|
-
return t instanceof HTMLElement ? t : Array.from(this.children).find((
|
|
93
|
+
return t instanceof HTMLElement ? t : Array.from(this.children).find((s) => s.getAttribute("slot") !== "anchor");
|
|
97
94
|
}
|
|
98
95
|
_syncPositioner() {
|
|
99
96
|
if (!this.isConnected) return;
|
|
@@ -101,41 +98,41 @@ class b extends h {
|
|
|
101
98
|
this._destroyPositioner();
|
|
102
99
|
return;
|
|
103
100
|
}
|
|
104
|
-
const t = this._resolveAnchor(),
|
|
105
|
-
if (!(t instanceof HTMLElement) || !(
|
|
101
|
+
const t = this._resolveAnchor(), s = this._resolveFloating();
|
|
102
|
+
if (!(t instanceof HTMLElement) || !(s instanceof HTMLElement)) {
|
|
106
103
|
this._destroyPositioner();
|
|
107
104
|
return;
|
|
108
105
|
}
|
|
109
106
|
this._destroyPositioner(), this._positioner = c({
|
|
110
107
|
anchor: t,
|
|
111
|
-
floating:
|
|
112
|
-
placement:
|
|
113
|
-
strategy:
|
|
108
|
+
floating: s,
|
|
109
|
+
placement: f(this.getAttribute("placement")),
|
|
110
|
+
strategy: b(this.getAttribute("strategy")),
|
|
114
111
|
dir: this.getAttribute("dir") === "rtl" ? "rtl" : "ltr",
|
|
115
112
|
offset: r(this.getAttribute("offset"), 8),
|
|
116
113
|
crossOffset: r(this.getAttribute("cross-offset"), 0),
|
|
117
|
-
flip: !this.hasAttribute("flip") ||
|
|
118
|
-
shift: !this.hasAttribute("shift") ||
|
|
119
|
-
matchWidth:
|
|
120
|
-
fitViewport:
|
|
121
|
-
autoPlacement:
|
|
122
|
-
hideWhenDetached:
|
|
123
|
-
inline:
|
|
114
|
+
flip: !this.hasAttribute("flip") || i(this.getAttribute("flip")),
|
|
115
|
+
shift: !this.hasAttribute("shift") || i(this.getAttribute("shift")),
|
|
116
|
+
matchWidth: i(this.getAttribute("match-width")),
|
|
117
|
+
fitViewport: i(this.getAttribute("fit-viewport")),
|
|
118
|
+
autoPlacement: i(this.getAttribute("auto-placement")),
|
|
119
|
+
hideWhenDetached: i(this.getAttribute("hide-when-detached")),
|
|
120
|
+
inline: i(this.getAttribute("inline")),
|
|
124
121
|
boundaryPadding: r(this.getAttribute("boundary-padding"), 4),
|
|
125
122
|
arrow: this.querySelector('[slot="arrow"], .arrow'),
|
|
126
|
-
onUpdate: (
|
|
127
|
-
this.dispatchEvent(new CustomEvent("position-change", { detail:
|
|
123
|
+
onUpdate: (o) => {
|
|
124
|
+
this.dispatchEvent(new CustomEvent("position-change", { detail: o, bubbles: !0, composed: !0 }));
|
|
128
125
|
}
|
|
129
126
|
});
|
|
130
127
|
}
|
|
131
128
|
render() {
|
|
132
|
-
this.setContent(`<style>${
|
|
129
|
+
this.setContent(`<style>${d}</style><slot name="anchor"></slot><slot name="content"></slot><slot></slot>`);
|
|
133
130
|
}
|
|
134
131
|
shouldRenderOnAttributeChange() {
|
|
135
132
|
return !1;
|
|
136
133
|
}
|
|
137
134
|
}
|
|
138
|
-
typeof customElements < "u" && !customElements.get("ui-positioner") && customElements.define("ui-positioner",
|
|
135
|
+
typeof customElements < "u" && !customElements.get("ui-positioner") && customElements.define("ui-positioner", m);
|
|
139
136
|
export {
|
|
140
|
-
|
|
137
|
+
m as UIPositioner
|
|
141
138
|
};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=`@layer editora-preload {
|
|
2
|
+
ui-alert:not(:defined),
|
|
3
|
+
ui-alert-dialog:not(:defined),
|
|
4
|
+
ui-app-header:not(:defined),
|
|
5
|
+
ui-aspect-ratio:not(:defined),
|
|
6
|
+
ui-box:not(:defined),
|
|
7
|
+
ui-breadcrumb:not(:defined),
|
|
8
|
+
ui-calendar:not(:defined),
|
|
9
|
+
ui-card:not(:defined),
|
|
10
|
+
ui-chart:not(:defined),
|
|
11
|
+
ui-collapsible:not(:defined),
|
|
12
|
+
ui-container:not(:defined),
|
|
13
|
+
ui-context-menu:not(:defined),
|
|
14
|
+
ui-control-group:not(:defined),
|
|
15
|
+
ui-data-table:not(:defined),
|
|
16
|
+
ui-date-field:not(:defined),
|
|
17
|
+
ui-description:not(:defined),
|
|
18
|
+
ui-dialog:not(:defined),
|
|
19
|
+
ui-drawer:not(:defined),
|
|
20
|
+
ui-empty-state:not(:defined),
|
|
21
|
+
ui-field:not(:defined),
|
|
22
|
+
ui-field-error:not(:defined),
|
|
23
|
+
ui-fieldset:not(:defined),
|
|
24
|
+
ui-file-upload:not(:defined),
|
|
25
|
+
ui-form:not(:defined),
|
|
26
|
+
ui-gantt:not(:defined),
|
|
27
|
+
ui-inline-edit:not(:defined),
|
|
28
|
+
ui-input:not(:defined),
|
|
29
|
+
ui-layout:not(:defined),
|
|
30
|
+
ui-masonry-grid:not(:defined),
|
|
31
|
+
ui-meter:not(:defined),
|
|
32
|
+
ui-multi-select:not(:defined),
|
|
33
|
+
ui-navigation-menu:not(:defined),
|
|
34
|
+
ui-number-field:not(:defined),
|
|
35
|
+
ui-otp-input:not(:defined),
|
|
36
|
+
ui-panel:not(:defined),
|
|
37
|
+
ui-panel-group:not(:defined),
|
|
38
|
+
ui-password-field:not(:defined),
|
|
39
|
+
ui-pin-input:not(:defined),
|
|
40
|
+
ui-plugin-panel:not(:defined),
|
|
41
|
+
ui-progress:not(:defined),
|
|
42
|
+
ui-quick-actions:not(:defined),
|
|
43
|
+
ui-radio-group:not(:defined),
|
|
44
|
+
ui-scroll-area:not(:defined),
|
|
45
|
+
ui-section:not(:defined),
|
|
46
|
+
ui-separator:not(:defined),
|
|
47
|
+
ui-sidebar:not(:defined),
|
|
48
|
+
ui-skeleton:not(:defined),
|
|
49
|
+
ui-sortable:not(:defined),
|
|
50
|
+
ui-splitter:not(:defined),
|
|
51
|
+
ui-stepper:not(:defined),
|
|
52
|
+
ui-table:not(:defined),
|
|
53
|
+
ui-tabs:not(:defined),
|
|
54
|
+
ui-tags-input:not(:defined),
|
|
55
|
+
ui-time-field:not(:defined),
|
|
56
|
+
ui-timeline:not(:defined),
|
|
57
|
+
ui-toast:not(:defined),
|
|
58
|
+
ui-toolbar:not(:defined),
|
|
59
|
+
ui-transfer-list:not(:defined),
|
|
60
|
+
ui-tree:not(:defined),
|
|
61
|
+
ui-tree-item:not(:defined) {
|
|
62
|
+
display: block;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
ui-flex:not(:defined) {
|
|
66
|
+
display: flex;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
ui-command:not(:defined),
|
|
70
|
+
ui-grid:not(:defined),
|
|
71
|
+
ui-placement-grid:not(:defined) {
|
|
72
|
+
display: grid;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
ui-avatar:not(:defined),
|
|
76
|
+
ui-color-picker:not(:defined),
|
|
77
|
+
ui-combobox:not(:defined),
|
|
78
|
+
ui-menu:not(:defined),
|
|
79
|
+
ui-menubar:not(:defined) {
|
|
80
|
+
display: inline-block;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
ui-anchor:not(:defined),
|
|
84
|
+
ui-badge:not(:defined),
|
|
85
|
+
ui-block-controls:not(:defined),
|
|
86
|
+
ui-button:not(:defined),
|
|
87
|
+
ui-checkbox:not(:defined),
|
|
88
|
+
ui-hover-card:not(:defined),
|
|
89
|
+
ui-label:not(:defined),
|
|
90
|
+
ui-odometer:not(:defined),
|
|
91
|
+
ui-pagination:not(:defined),
|
|
92
|
+
ui-radio:not(:defined),
|
|
93
|
+
ui-rating:not(:defined),
|
|
94
|
+
ui-slot:not(:defined),
|
|
95
|
+
ui-switch:not(:defined),
|
|
96
|
+
ui-toggle:not(:defined),
|
|
97
|
+
ui-toggle-group:not(:defined) {
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
ui-date-picker:not(:defined),
|
|
102
|
+
ui-date-range-picker:not(:defined),
|
|
103
|
+
ui-date-range-time-picker:not(:defined),
|
|
104
|
+
ui-date-time-picker:not(:defined),
|
|
105
|
+
ui-dropdown:not(:defined),
|
|
106
|
+
ui-icon:not(:defined),
|
|
107
|
+
ui-select:not(:defined),
|
|
108
|
+
ui-slider:not(:defined),
|
|
109
|
+
ui-textarea:not(:defined),
|
|
110
|
+
ui-time-picker:not(:defined) {
|
|
111
|
+
display: inline-grid;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
ui-direction-provider:not(:defined),
|
|
115
|
+
ui-dismissable-layer:not(:defined),
|
|
116
|
+
ui-focus-scope:not(:defined),
|
|
117
|
+
ui-portal:not(:defined),
|
|
118
|
+
ui-positioner:not(:defined),
|
|
119
|
+
ui-presence:not(:defined),
|
|
120
|
+
ui-visually-hidden:not(:defined) {
|
|
121
|
+
display: contents;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
ui-command-palette:not(:defined),
|
|
125
|
+
ui-floating-toolbar:not(:defined),
|
|
126
|
+
ui-selection-popup:not(:defined) {
|
|
127
|
+
display: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Spacing the elements draw around slotted content (default size; approximate for others). */
|
|
131
|
+
ui-tabs:not(:defined) > [slot="panel"] {
|
|
132
|
+
display: block;
|
|
133
|
+
margin-block-start: 12px;
|
|
134
|
+
padding-block: 8px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
ui-card:not(:defined) {
|
|
138
|
+
display: grid;
|
|
139
|
+
gap: var(--ui-card-gap, 8px);
|
|
140
|
+
padding: var(--ui-card-padding, 16px) var(--ui-card-padding, 16px) 0;
|
|
141
|
+
border: 1px solid transparent;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* Content the element renders itself, or only shows on demand. */
|
|
145
|
+
ui-dialog:not(:defined),
|
|
146
|
+
ui-alert-dialog:not(:defined),
|
|
147
|
+
ui-drawer:not(:defined),
|
|
148
|
+
ui-toast:not(:defined) {
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
ui-dropdown:not(:defined) > [slot="content"],
|
|
153
|
+
ui-menu:not(:defined) > [slot="content"],
|
|
154
|
+
ui-menu:not(:defined) > [slot="item"],
|
|
155
|
+
ui-menubar:not(:defined) > [slot="content"],
|
|
156
|
+
ui-context-menu:not(:defined) > [slot="content"],
|
|
157
|
+
ui-popover:not(:defined) > [slot="content"],
|
|
158
|
+
ui-hover-card:not(:defined) > [slot="card"],
|
|
159
|
+
ui-navigation-menu:not(:defined) > [slot="panel"],
|
|
160
|
+
ui-split-button:not(:defined) > [slot="menuitem"],
|
|
161
|
+
ui-select:not(:defined) > :is(option, optgroup),
|
|
162
|
+
ui-multi-select:not(:defined) > :is(option, optgroup),
|
|
163
|
+
ui-combobox:not(:defined) > :is(option, optgroup),
|
|
164
|
+
ui-tabs:not(:defined) > [slot="panel"] ~ [slot="panel"] {
|
|
165
|
+
display: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Form controls draw their field in the shadow root, so they take no space until defined: reserve
|
|
169
|
+
the height they will have (measured: 32px control, about 26px more with a label and another
|
|
170
|
+
24px with a description). */
|
|
171
|
+
:is(ui-input, ui-password-field, ui-number-field, ui-select, ui-multi-select, ui-combobox, ui-tags-input, ui-date-field, ui-time-field, ui-date-picker, ui-time-picker, ui-date-time-picker, ui-date-range-picker, ui-date-range-time-picker):not(:defined),
|
|
172
|
+
ui-button:not(:defined),
|
|
173
|
+
ui-pagination:not(:defined) {
|
|
174
|
+
min-block-size: var(--ui-control-height-2, 32px);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:is(ui-input, ui-password-field, ui-number-field, ui-select, ui-multi-select, ui-combobox, ui-tags-input, ui-date-field, ui-time-field, ui-date-picker, ui-time-picker, ui-date-time-picker, ui-date-range-picker, ui-date-range-time-picker)[label]:not(:defined) {
|
|
178
|
+
min-block-size: calc(var(--ui-control-height-2, 32px) + 26px);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:is(ui-input, ui-password-field, ui-number-field, ui-select, ui-multi-select, ui-combobox, ui-tags-input, ui-date-field, ui-time-field, ui-date-picker, ui-time-picker, ui-date-time-picker, ui-date-range-picker, ui-date-range-time-picker)[label][description]:not(:defined) {
|
|
182
|
+
min-block-size: calc(var(--ui-control-height-2, 32px) + 50px);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
ui-textarea:not(:defined) {
|
|
186
|
+
min-block-size: 122px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
ui-textarea[label]:not(:defined) {
|
|
190
|
+
min-block-size: 148px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* The selected panel (a server-rendered selected attribute), not the first. Browsers without
|
|
194
|
+
:nth-child(… of S) drop these rules and keep showing the first panel. */
|
|
195
|
+
ui-tabs[selected="1"]:not(:defined) > [slot="panel"]:not(:nth-child(2 of [slot="panel"])) { display: none; }
|
|
196
|
+
ui-tabs[selected="1"]:not(:defined) > :nth-child(2 of [slot="panel"]) { display: block; }
|
|
197
|
+
ui-tabs[selected="2"]:not(:defined) > [slot="panel"]:not(:nth-child(3 of [slot="panel"])) { display: none; }
|
|
198
|
+
ui-tabs[selected="2"]:not(:defined) > :nth-child(3 of [slot="panel"]) { display: block; }
|
|
199
|
+
ui-tabs[selected="3"]:not(:defined) > [slot="panel"]:not(:nth-child(4 of [slot="panel"])) { display: none; }
|
|
200
|
+
ui-tabs[selected="3"]:not(:defined) > :nth-child(4 of [slot="panel"]) { display: block; }
|
|
201
|
+
ui-tabs[selected="4"]:not(:defined) > [slot="panel"]:not(:nth-child(5 of [slot="panel"])) { display: none; }
|
|
202
|
+
ui-tabs[selected="4"]:not(:defined) > :nth-child(5 of [slot="panel"]) { display: block; }
|
|
203
|
+
ui-tabs[selected="5"]:not(:defined) > [slot="panel"]:not(:nth-child(6 of [slot="panel"])) { display: none; }
|
|
204
|
+
ui-tabs[selected="5"]:not(:defined) > :nth-child(6 of [slot="panel"]) { display: block; }
|
|
205
|
+
ui-tabs[selected="6"]:not(:defined) > [slot="panel"]:not(:nth-child(7 of [slot="panel"])) { display: none; }
|
|
206
|
+
ui-tabs[selected="6"]:not(:defined) > :nth-child(7 of [slot="panel"]) { display: block; }
|
|
207
|
+
ui-tabs[selected="7"]:not(:defined) > [slot="panel"]:not(:nth-child(8 of [slot="panel"])) { display: none; }
|
|
208
|
+
ui-tabs[selected="7"]:not(:defined) > :nth-child(8 of [slot="panel"]) { display: block; }
|
|
209
|
+
ui-tabs[selected="8"]:not(:defined) > [slot="panel"]:not(:nth-child(9 of [slot="panel"])) { display: none; }
|
|
210
|
+
ui-tabs[selected="8"]:not(:defined) > :nth-child(9 of [slot="panel"]) { display: block; }
|
|
211
|
+
ui-tabs[selected="9"]:not(:defined) > [slot="panel"]:not(:nth-child(10 of [slot="panel"])) { display: none; }
|
|
212
|
+
ui-tabs[selected="9"]:not(:defined) > :nth-child(10 of [slot="panel"]) { display: block; }
|
|
213
|
+
|
|
214
|
+
/* Tab labels in a row of about the strip's height, instead of stacked blocks. */
|
|
215
|
+
ui-tabs:not(:defined) > [slot="tab"] {
|
|
216
|
+
display: inline-block;
|
|
217
|
+
padding: 8px 12px;
|
|
218
|
+
line-height: 20px;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
`;exports.PRELOAD_CSS=e;
|