@andespindola/ui-core 0.2.0 → 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/cjs/{floating-ui.dom-BPemvNRD.js → floating-ui.dom-BZk7Blsu.js} +93 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ui-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ui-avatar-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ui-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ui-button.cjs.entry.js +1 -1
- package/dist/cjs/ui-card.cjs.entry.js +1 -1
- package/dist/cjs/ui-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ui-combobox.cjs.entry.js +153 -0
- package/dist/cjs/ui-container.cjs.entry.js +1 -1
- package/dist/cjs/ui-date-picker.cjs.entry.js +171 -0
- package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ui-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ui-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/ui-dropdown-menu.cjs.entry.js +2 -2
- package/dist/cjs/ui-field.cjs.entry.js +1 -1
- package/dist/cjs/ui-file-upload.cjs.entry.js +57 -0
- package/dist/cjs/ui-grid.cjs.entry.js +1 -1
- package/dist/cjs/ui-input.cjs.entry.js +1 -1
- package/dist/cjs/ui-label.cjs.entry.js +1 -1
- package/dist/cjs/ui-navbar.cjs.entry.js +17 -0
- package/dist/cjs/ui-pagination.cjs.entry.js +2 -2
- package/dist/cjs/ui-popover.cjs.entry.js +2 -2
- package/dist/cjs/ui-progress-circular.cjs.entry.js +44 -0
- package/dist/cjs/ui-progress.cjs.entry.js +1 -1
- package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ui-rating.cjs.entry.js +45 -0
- package/dist/cjs/ui-reveal.cjs.entry.js +1 -1
- package/dist/cjs/ui-scroll-progress.cjs.entry.js +1 -1
- package/dist/cjs/ui-section.cjs.entry.js +1 -1
- package/dist/cjs/ui-segmented.cjs.entry.js +1 -1
- package/dist/cjs/ui-select.cjs.entry.js +1 -1
- package/dist/cjs/ui-separator.cjs.entry.js +1 -1
- package/dist/cjs/ui-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ui-slider.cjs.entry.js +1 -1
- package/dist/cjs/ui-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ui-stack.cjs.entry.js +1 -1
- package/dist/cjs/ui-stat.cjs.entry.js +1 -1
- package/dist/cjs/ui-switch.cjs.entry.js +1 -1
- package/dist/cjs/ui-table.cjs.entry.js +25 -0
- package/dist/cjs/ui-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ui-theme-toggle.cjs.entry.js +1 -1
- package/dist/cjs/ui-toast.cjs.entry.js +1 -1
- package/dist/cjs/ui-toaster.cjs.entry.js +1 -1
- package/dist/cjs/ui-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/uikit.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +7 -0
- package/dist/collection/components/ui-accordion/ui-accordion.js +1 -1
- package/dist/collection/components/ui-accordion-item/ui-accordion-item.js +1 -1
- package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
- package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +1 -1
- package/dist/collection/components/ui-breadcrumb/ui-breadcrumb.js +1 -1
- package/dist/collection/components/ui-breadcrumb-item/ui-breadcrumb-item.js +1 -1
- package/dist/collection/components/ui-button/ui-button.css +2 -0
- package/dist/collection/components/ui-card/ui-card.js +1 -1
- package/dist/collection/components/ui-checkbox/ui-checkbox.js +1 -1
- package/dist/collection/components/ui-combobox/ui-combobox.css +93 -0
- package/dist/collection/components/ui-combobox/ui-combobox.js +248 -0
- package/dist/collection/components/ui-container/ui-container.js +1 -1
- package/dist/collection/components/ui-date-picker/ui-date-picker.css +176 -0
- package/dist/collection/components/ui-date-picker/ui-date-picker.js +243 -0
- package/dist/collection/components/ui-dialog/ui-dialog.js +1 -1
- package/dist/collection/components/ui-drawer/ui-drawer.js +1 -1
- package/dist/collection/components/ui-dropdown-item/ui-dropdown-item.js +1 -1
- package/dist/collection/components/ui-dropdown-menu/ui-dropdown-menu.js +1 -1
- package/dist/collection/components/ui-field/ui-field.js +1 -1
- package/dist/collection/components/ui-file-upload/ui-file-upload.css +79 -0
- package/dist/collection/components/ui-file-upload/ui-file-upload.js +151 -0
- package/dist/collection/components/ui-grid/ui-grid.js +1 -1
- package/dist/collection/components/ui-input/ui-input.js +1 -1
- package/dist/collection/components/ui-label/ui-label.js +1 -1
- package/dist/collection/components/ui-navbar/ui-navbar.css +36 -0
- package/dist/collection/components/ui-navbar/ui-navbar.js +18 -0
- package/dist/collection/components/ui-pagination/ui-pagination.js +2 -2
- package/dist/collection/components/ui-popover/ui-popover.js +1 -1
- package/dist/collection/components/ui-progress/ui-progress.js +1 -1
- package/dist/collection/components/ui-progress-circular/ui-progress-circular.css +46 -0
- package/dist/collection/components/ui-progress-circular/ui-progress-circular.js +171 -0
- package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
- package/dist/collection/components/ui-rating/ui-rating.css +52 -0
- package/dist/collection/components/ui-rating/ui-rating.js +134 -0
- package/dist/collection/components/ui-reveal/ui-reveal.js +1 -1
- package/dist/collection/components/ui-scroll-progress/ui-scroll-progress.js +1 -1
- package/dist/collection/components/ui-section/ui-section.js +1 -1
- package/dist/collection/components/ui-segmented/ui-segmented.js +1 -1
- package/dist/collection/components/ui-select/ui-select.js +1 -1
- package/dist/collection/components/ui-separator/ui-separator.js +1 -1
- package/dist/collection/components/ui-skeleton/ui-skeleton.js +1 -1
- package/dist/collection/components/ui-slider/ui-slider.js +1 -1
- package/dist/collection/components/ui-spinner/ui-spinner.js +1 -1
- package/dist/collection/components/ui-stack/ui-stack.js +1 -1
- package/dist/collection/components/ui-stat/ui-stat.js +1 -1
- package/dist/collection/components/ui-switch/ui-switch.js +1 -1
- package/dist/collection/components/ui-table/ui-table.css +46 -0
- package/dist/collection/components/ui-table/ui-table.js +119 -0
- package/dist/collection/components/ui-tabs/ui-tabs.js +2 -2
- package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
- package/dist/collection/components/ui-theme-toggle/ui-theme-toggle.js +1 -1
- package/dist/collection/components/ui-toast/ui-toast.js +1 -1
- package/dist/collection/components/ui-toaster/ui-toaster.js +1 -1
- package/dist/collection/components/ui-tooltip/ui-tooltip.js +1 -1
- package/dist/components/{p-CgsjJD8o.js → p-DDJE__UC.js} +1 -1
- package/dist/{uikit/p-CyBRmmbs.js → components/p-DDtwbwIl.js} +1 -1
- package/dist/components/{p-BwNtNvTb.js → p-DUT2Q8Df.js} +1 -1
- package/dist/components/ui-accordion-item.js +1 -1
- package/dist/components/ui-accordion.js +1 -1
- package/dist/components/ui-avatar-group.js +1 -1
- package/dist/components/ui-avatar.js +1 -1
- package/dist/components/ui-breadcrumb-item.js +1 -1
- package/dist/components/ui-breadcrumb.js +1 -1
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-card.js +1 -1
- package/dist/components/ui-checkbox.js +1 -1
- package/dist/components/ui-combobox.d.ts +11 -0
- package/dist/components/ui-combobox.js +1 -0
- package/dist/components/ui-container.js +1 -1
- package/dist/components/ui-date-picker.d.ts +11 -0
- package/dist/components/ui-date-picker.js +1 -0
- package/dist/components/ui-dialog.js +1 -1
- package/dist/components/ui-drawer.js +1 -1
- package/dist/components/ui-dropdown-item.js +1 -1
- package/dist/components/ui-dropdown-menu.js +1 -1
- package/dist/components/ui-field.js +1 -1
- package/dist/components/ui-file-upload.d.ts +11 -0
- package/dist/components/ui-file-upload.js +1 -0
- package/dist/components/ui-grid.js +1 -1
- package/dist/components/ui-input.js +1 -1
- package/dist/components/ui-label.js +1 -1
- package/dist/components/ui-loading-overlay.js +1 -1
- package/dist/components/ui-navbar.d.ts +11 -0
- package/dist/components/ui-navbar.js +1 -0
- package/dist/components/ui-pagination.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-progress-circular.d.ts +11 -0
- package/dist/components/ui-progress-circular.js +1 -0
- package/dist/components/ui-progress.js +1 -1
- package/dist/components/ui-radio-group.js +1 -1
- package/dist/components/ui-rating.d.ts +11 -0
- package/dist/components/ui-rating.js +1 -0
- package/dist/components/ui-reveal.js +1 -1
- package/dist/components/ui-scroll-progress.js +1 -1
- package/dist/components/ui-section.js +1 -1
- package/dist/components/ui-segmented.js +1 -1
- package/dist/components/ui-select.js +1 -1
- package/dist/components/ui-separator.js +1 -1
- package/dist/components/ui-skeleton.js +1 -1
- package/dist/components/ui-slider.js +1 -1
- package/dist/components/ui-spinner.js +1 -1
- package/dist/components/ui-stack.js +1 -1
- package/dist/components/ui-stat.js +1 -1
- package/dist/components/ui-switch.js +1 -1
- package/dist/components/ui-table.d.ts +11 -0
- package/dist/components/ui-table.js +1 -0
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-textarea.js +1 -1
- package/dist/components/ui-theme-toggle.js +1 -1
- package/dist/components/ui-toast.js +1 -1
- package/dist/components/ui-toaster.js +1 -1
- package/dist/components/ui-tooltip.js +1 -1
- package/dist/esm/{floating-ui.dom-CyBRmmbs.js → floating-ui.dom-DDtwbwIl.js} +93 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ui-accordion-item.entry.js +1 -1
- package/dist/esm/ui-accordion.entry.js +1 -1
- package/dist/esm/ui-avatar-group.entry.js +1 -1
- package/dist/esm/ui-avatar.entry.js +1 -1
- package/dist/esm/ui-breadcrumb-item.entry.js +1 -1
- package/dist/esm/ui-breadcrumb.entry.js +1 -1
- package/dist/esm/ui-button.entry.js +1 -1
- package/dist/esm/ui-card.entry.js +1 -1
- package/dist/esm/ui-checkbox.entry.js +1 -1
- package/dist/esm/ui-combobox.entry.js +151 -0
- package/dist/esm/ui-container.entry.js +1 -1
- package/dist/esm/ui-date-picker.entry.js +169 -0
- package/dist/esm/ui-dialog.entry.js +1 -1
- package/dist/esm/ui-drawer.entry.js +1 -1
- package/dist/esm/ui-dropdown-item.entry.js +1 -1
- package/dist/esm/ui-dropdown-menu.entry.js +2 -2
- package/dist/esm/ui-field.entry.js +1 -1
- package/dist/esm/ui-file-upload.entry.js +55 -0
- package/dist/esm/ui-grid.entry.js +1 -1
- package/dist/esm/ui-input.entry.js +1 -1
- package/dist/esm/ui-label.entry.js +1 -1
- package/dist/esm/ui-navbar.entry.js +15 -0
- package/dist/esm/ui-pagination.entry.js +2 -2
- package/dist/esm/ui-popover.entry.js +2 -2
- package/dist/esm/ui-progress-circular.entry.js +42 -0
- package/dist/esm/ui-progress.entry.js +1 -1
- package/dist/esm/ui-radio-group.entry.js +1 -1
- package/dist/esm/ui-rating.entry.js +43 -0
- package/dist/esm/ui-reveal.entry.js +1 -1
- package/dist/esm/ui-scroll-progress.entry.js +1 -1
- package/dist/esm/ui-section.entry.js +1 -1
- package/dist/esm/ui-segmented.entry.js +1 -1
- package/dist/esm/ui-select.entry.js +1 -1
- package/dist/esm/ui-separator.entry.js +1 -1
- package/dist/esm/ui-skeleton.entry.js +1 -1
- package/dist/esm/ui-slider.entry.js +1 -1
- package/dist/esm/ui-spinner.entry.js +1 -1
- package/dist/esm/ui-stack.entry.js +1 -1
- package/dist/esm/ui-stat.entry.js +1 -1
- package/dist/esm/ui-switch.entry.js +1 -1
- package/dist/esm/ui-table.entry.js +23 -0
- package/dist/esm/ui-tabs.entry.js +2 -2
- package/dist/esm/ui-textarea.entry.js +1 -1
- package/dist/esm/ui-theme-toggle.entry.js +1 -1
- package/dist/esm/ui-toast.entry.js +1 -1
- package/dist/esm/ui-toaster.entry.js +1 -1
- package/dist/esm/ui-tooltip.entry.js +2 -2
- package/dist/esm/uikit.js +1 -1
- package/dist/types/components/ui-combobox/ui-combobox.d.ts +38 -0
- package/dist/types/components/ui-date-picker/ui-date-picker.d.ts +42 -0
- package/dist/types/components/ui-file-upload/ui-file-upload.d.ts +24 -0
- package/dist/types/components/ui-navbar/ui-navbar.d.ts +3 -0
- package/dist/types/components/ui-progress-circular/ui-progress-circular.d.ts +17 -0
- package/dist/types/components/ui-rating/ui-rating.d.ts +17 -0
- package/dist/types/components/ui-table/ui-table.d.ts +16 -0
- package/dist/types/components.d.ts +409 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/uikit/{p-81b45a43.entry.js → p-008118af.entry.js} +1 -1
- package/dist/uikit/p-0715db16.entry.js +1 -0
- package/dist/uikit/p-10afa395.entry.js +1 -0
- package/dist/uikit/{p-25637424.entry.js → p-1449f229.entry.js} +1 -1
- package/dist/uikit/{p-567f7496.entry.js → p-1514ae37.entry.js} +1 -1
- package/dist/uikit/{p-cd0ec835.entry.js → p-1685191b.entry.js} +1 -1
- package/dist/uikit/p-1ef7948f.entry.js +1 -0
- package/dist/uikit/p-283e7623.entry.js +1 -0
- package/dist/uikit/p-2d92ce04.entry.js +1 -0
- package/dist/uikit/{p-faa98928.entry.js → p-3995852d.entry.js} +1 -1
- package/dist/uikit/p-3b1f92da.entry.js +1 -0
- package/dist/uikit/p-3fdfad2e.entry.js +1 -0
- package/dist/uikit/p-4044ebde.entry.js +1 -0
- package/dist/uikit/{p-95cd976e.entry.js → p-413cfbc6.entry.js} +1 -1
- package/dist/uikit/p-4ba0e4bc.entry.js +1 -0
- package/dist/uikit/{p-635862e6.entry.js → p-5e0bc34a.entry.js} +1 -1
- package/dist/uikit/{p-86ed6154.entry.js → p-60910c03.entry.js} +1 -1
- package/dist/uikit/{p-c73c1009.entry.js → p-62881327.entry.js} +1 -1
- package/dist/uikit/p-6c51a216.entry.js +1 -0
- package/dist/uikit/p-6d363a02.entry.js +1 -0
- package/dist/uikit/{p-67963692.entry.js → p-8535f5c9.entry.js} +1 -1
- package/dist/uikit/{p-2601d8b6.entry.js → p-88238a16.entry.js} +1 -1
- package/dist/uikit/{p-595e146f.entry.js → p-894fc85f.entry.js} +1 -1
- package/dist/uikit/p-8b882367.entry.js +1 -0
- package/dist/uikit/{p-12db6a6e.entry.js → p-9310b73b.entry.js} +1 -1
- package/dist/uikit/{p-1d016ea4.entry.js → p-99b7e461.entry.js} +1 -1
- package/dist/uikit/p-9d8d420e.entry.js +1 -0
- package/dist/uikit/{p-55a23f91.entry.js → p-9dbe7e12.entry.js} +1 -1
- package/dist/uikit/{p-09895cd0.entry.js → p-9f09fcec.entry.js} +1 -1
- package/dist/{components/p-CyBRmmbs.js → uikit/p-DDtwbwIl.js} +1 -1
- package/dist/uikit/{p-a977a0db.entry.js → p-a3d819cd.entry.js} +1 -1
- package/dist/uikit/{p-979f6178.entry.js → p-b0f2b1c8.entry.js} +1 -1
- package/dist/uikit/{p-3996590f.entry.js → p-b7e30398.entry.js} +1 -1
- package/dist/uikit/p-bac2c523.entry.js +1 -0
- package/dist/uikit/p-bbc718ef.entry.js +1 -0
- package/dist/uikit/{p-74b60a60.entry.js → p-bdd30484.entry.js} +1 -1
- package/dist/uikit/{p-fd832f52.entry.js → p-c1a9db7c.entry.js} +1 -1
- package/dist/uikit/p-c2138fb9.entry.js +1 -0
- package/dist/uikit/{p-ddd70374.entry.js → p-c94492ff.entry.js} +1 -1
- package/dist/uikit/{p-7f2c2924.entry.js → p-ccca2aeb.entry.js} +1 -1
- package/dist/uikit/{p-a01305a5.entry.js → p-d7ab158f.entry.js} +1 -1
- package/dist/uikit/p-da807078.entry.js +1 -0
- package/dist/uikit/p-e2065caa.entry.js +1 -0
- package/dist/uikit/{p-dca9f6f9.entry.js → p-f2983e94.entry.js} +1 -1
- package/dist/uikit/{p-2de05aac.entry.js → p-f4344cce.entry.js} +1 -1
- package/dist/uikit/{p-3fc062a6.entry.js → p-fb89d9a4.entry.js} +1 -1
- package/dist/uikit/p-fbe7806c.entry.js +1 -0
- package/dist/uikit/p-ffcd1faf.entry.js +1 -0
- package/dist/uikit/uikit.esm.js +1 -1
- package/package.json +1 -1
- package/dist/uikit/p-0cba0d11.entry.js +0 -1
- package/dist/uikit/p-6c0e9809.entry.js +0 -1
- package/dist/uikit/p-7a3d85da.entry.js +0 -1
- package/dist/uikit/p-94ad46a5.entry.js +0 -1
- package/dist/uikit/p-97d4dbf4.entry.js +0 -1
- package/dist/uikit/p-9a4dc343.entry.js +0 -1
- package/dist/uikit/p-9a9590b9.entry.js +0 -1
- package/dist/uikit/p-a080f46a.entry.js +0 -1
- package/dist/uikit/p-a92a7b19.entry.js +0 -1
- package/dist/uikit/p-b2df8437.entry.js +0 -1
- package/dist/uikit/p-d20452b4.entry.js +0 -1
- package/dist/uikit/p-d7021157.entry.js +0 -1
- package/dist/uikit/p-db07f9c5.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r,p as e,H as i,c as s,h as a,a as t}from"./index.js";const n=e(class extends i{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.uiInput=s(this,"uiInput"),this.uiChange=s(this,"uiChange"),this.value=50,this.min=0,this.max=100,this.step=1,this.disabled=!1,this.onInput=r=>{const e=Number(r.target.value);this.value=e,this.uiInput.emit(e)},this.onChange=r=>{this.uiChange.emit(Number(r.target.value))}}render(){return a(t,{key:"
|
|
1
|
+
import{t as r,p as e,H as i,c as s,h as a,a as t}from"./index.js";const n=e(class extends i{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.uiInput=s(this,"uiInput"),this.uiChange=s(this,"uiChange"),this.value=50,this.min=0,this.max=100,this.step=1,this.disabled=!1,this.onInput=r=>{const e=Number(r.target.value);this.value=e,this.uiInput.emit(e)},this.onChange=r=>{this.uiChange.emit(Number(r.target.value))}}render(){return a(t,{key:"eeb569c6927ebcda5c1702c8bdbade3e15ede9c2"},a("input",{key:"1fd45574a52ed9d857941c870650995f092283f8",class:"slider",type:"range",min:this.min,max:this.max,step:this.step,value:this.value,disabled:this.disabled,onInput:this.onInput,onChange:this.onChange}))}static get style(){return":host{display:block}.slider{width:100%;height:1.25rem;margin:0;background:transparent;cursor:pointer;outline:none;-webkit-appearance:none;appearance:none}.slider:disabled{opacity:0.5;pointer-events:none}.slider::-webkit-slider-runnable-track{height:0.375rem;border-radius:var(--ui-radius-full);background:var(--ui-chip)}.slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:1.125rem;height:1.125rem;margin-top:-0.375rem;border-radius:var(--ui-radius-full);background:var(--ui-accent);box-shadow:var(--ui-shadow-sm);transition:transform var(--ui-duration) var(--ui-ease)}.slider::-webkit-slider-thumb:hover{transform:scale(1.1)}.slider:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring)}.slider::-moz-range-track{height:0.375rem;border-radius:var(--ui-radius-full);background:var(--ui-chip)}.slider::-moz-range-progress{height:0.375rem;border-radius:var(--ui-radius-full);background:var(--ui-accent)}.slider::-moz-range-thumb{width:1.125rem;height:1.125rem;border:none;border-radius:var(--ui-radius-full);background:var(--ui-accent);box-shadow:var(--ui-shadow-sm);transition:transform var(--ui-duration) var(--ui-ease)}.slider::-moz-range-thumb:hover{transform:scale(1.1)}.slider:focus-visible::-moz-range-thumb{box-shadow:0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring)}"}},[1,"ui-slider",{value:[1026],min:[2],max:[2],step:[2],disabled:[4]}]);function u(){"undefined"!=typeof customElements&&["ui-slider"].forEach((e=>{"ui-slider"===e&&(customElements.get(r(e))||customElements.define(r(e),n))}))}u();const d=n,o=u;export{d as UiSlider,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as o,d as s}from"./p-
|
|
1
|
+
import{U as o,d as s}from"./p-DUT2Q8Df.js";const p=o,r=s;export{p as UiSpinner,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as s,h as a,a as
|
|
1
|
+
import{t,p as e,H as s,h as a,a as c}from"./index.js";const r={xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem"},n={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},i={start:"flex-start",center:"center",end:"flex-end",between:"space-between"},l=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.direction="vertical",this.gap="md",this.align="stretch",this.justify="start",this.wrap=!1}render(){return a(c,{key:"f10c42228c323efa8c5ded4e8ca552e38d1ef923"},a("div",{key:"c296191b05e5ad4e9fdec382808b24b6e798867d",class:"stack",style:{flexDirection:"horizontal"===this.direction?"row":"column",gap:r[this.gap],alignItems:n[this.align],justifyContent:i[this.justify],flexWrap:this.wrap?"wrap":"nowrap"}},a("slot",{key:"8cc418111a0833cf404e0578e81c23f9aaa69fda"})))}static get style(){return":host{display:block}.stack{display:flex;font-family:var(--ui-font-sans)}"}},[257,"ui-stack",{direction:[1],gap:[1],align:[1],justify:[1],wrap:[4]}]);function o(){"undefined"!=typeof customElements&&["ui-stack"].forEach((e=>{"ui-stack"===e&&(customElements.get(t(e))||customElements.define(t(e),l))}))}o();const f=l,d=o;export{f as UiStack,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as a,H as r,h as t,a as i}from"./index.js";const s=a(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.trend="neutral"}renderArrow(){return"down"===this.trend?t("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"currentColor","aria-hidden":"true"},t("path",{d:"M6 11 1 4h10z"})):"up"===this.trend?t("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"currentColor","aria-hidden":"true"},t("path",{d:"M6 1 11 8H1z"})):null}render(){return t(i,{key:"
|
|
1
|
+
import{t as e,p as a,H as r,h as t,a as i}from"./index.js";const s=a(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.trend="neutral"}renderArrow(){return"down"===this.trend?t("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"currentColor","aria-hidden":"true"},t("path",{d:"M6 11 1 4h10z"})):"up"===this.trend?t("svg",{width:"10",height:"10",viewBox:"0 0 12 12",fill:"currentColor","aria-hidden":"true"},t("path",{d:"M6 1 11 8H1z"})):null}render(){return t(i,{key:"d4d0f5f87e9049b60b849afa096438bb5defa710"},t("div",{key:"9dbd07ca51110a52ea852894401b0908b4cf7d30",class:"card"},t("p",{key:"41e30e19f7ca5d26df13381e34a6c6a87ca530ce",class:"label"},this.label),t("div",{key:"40c72d2e2bda9fb9017a52eec04737c673910ea3",class:"value-row"},t("span",{key:"b217030e5603cd2c0e0a99913461e83047a73378",class:"value"},this.value),this.delta&&t("span",{key:"df0a67ef011043f334512a43c1a6fb1ac9bb6978",class:{delta:!0,["trend-"+this.trend]:!0}},this.renderArrow(),this.delta)),t("div",{key:"3e4fb6a69cf7b22d2a1f60f28f5f5747f900165a",class:"extra"},t("slot",{key:"97237fcf1fc5c46a30426728c0f240cab4808541"}))))}static get style(){return":host{display:block}.card{display:flex;flex-direction:column;gap:0.5rem;padding:1.25rem;border:1px solid var(--ui-border);border-radius:var(--ui-radius-lg);background:var(--ui-panel);backdrop-filter:blur(22px);font-family:var(--ui-font-sans)}.label{margin:0;text-transform:uppercase;letter-spacing:0.08em;font-size:0.7rem;font-weight:500;color:var(--ui-text-faint)}.value-row{display:flex;align-items:baseline;gap:0.625rem}.value{font-size:1.875rem;font-weight:600;line-height:1.1;color:var(--ui-foreground)}.delta{display:inline-flex;align-items:center;gap:0.25rem;padding:0.125rem 0.5rem;border-radius:var(--ui-radius-full);font-size:0.75rem;font-weight:600}.delta svg{display:block}.trend-up{color:var(--ui-success);background:color-mix(in srgb, var(--ui-success) 14%, transparent)}.trend-down{color:var(--ui-danger);background:color-mix(in srgb, var(--ui-danger) 14%, transparent)}.trend-neutral{color:var(--ui-text-muted);background:var(--ui-chip)}.extra{font-size:0.8125rem;color:var(--ui-text-muted)}"}},[257,"ui-stat",{label:[1],value:[1],delta:[1],trend:[1]}]);function d(){"undefined"!=typeof customElements&&["ui-stat"].forEach((a=>{"ui-stat"===a&&(customElements.get(e(a))||customElements.define(e(a),s))}))}d();const n=s,l=d;export{n as UiStat,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as i,H as e,c as s,h as r,a}from"./index.js";const o=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.uiChange=s(this,"uiChange"),this.checked=!1,this.disabled=!1,this.toggle=()=>{this.disabled||(this.checked=!this.checked,this.uiChange.emit(this.checked))},this.onKeyDown=t=>{" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.toggle())}}render(){return r(a,{key:"
|
|
1
|
+
import{t,p as i,H as e,c as s,h as r,a}from"./index.js";const o=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.uiChange=s(this,"uiChange"),this.checked=!1,this.disabled=!1,this.toggle=()=>{this.disabled||(this.checked=!this.checked,this.uiChange.emit(this.checked))},this.onKeyDown=t=>{" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.toggle())}}render(){return r(a,{key:"428fb05e4d51811bca60b1e3513c38002bcdd6f7"},r("button",{key:"39192341845fd5877a6a73f3c7ef8257a526601e",class:"switch",type:"button",role:"switch","aria-checked":this.checked?"true":"false",disabled:this.disabled,onClick:this.toggle,onKeyDown:this.onKeyDown},r("span",{key:"51fa9f37d6e7083e8aaf4de69e234dbb56bc4c8b",class:"thumb"})))}static get style(){return':host{display:inline-flex}.switch{position:relative;width:2.75rem;height:1.5rem;padding:0;border:1px solid var(--ui-border);border-radius:var(--ui-radius-full);background:var(--ui-chip);cursor:pointer;outline:none;transition:background var(--ui-duration) var(--ui-ease)}.switch:focus-visible{box-shadow:0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring)}.switch[aria-checked="true"]{background:var(--ui-accent);border-color:var(--ui-accent)}.switch:disabled{opacity:0.5;pointer-events:none}.thumb{position:absolute;top:50%;left:0.125rem;width:1.25rem;height:1.25rem;border-radius:9999px;background:var(--ui-on-status);box-shadow:var(--ui-shadow-sm);transform:translateY(-50%);transition:transform var(--ui-duration) var(--ui-ease)}.switch[aria-checked="true"] .thumb{transform:translate(1.25rem, -50%)}'}},[1,"ui-switch",{checked:[1540],disabled:[4]}]);function n(){"undefined"!=typeof customElements&&["ui-switch"].forEach((i=>{"ui-switch"===i&&(customElements.get(t(i))||customElements.define(t(i),o))}))}n();const c=o,u=n;export{c as UiSwitch,u as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface UiTable extends Components.UiTable, HTMLElement {}
|
|
4
|
+
export const UiTable: {
|
|
5
|
+
prototype: UiTable;
|
|
6
|
+
new (): UiTable;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as t,H as a,h as r,a as d}from"./index.js";const s=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.columns=[],this.rows=[],this.striped=!1,this.hoverable=!0}render(){return r(d,{key:"e62b59e8da83f4b9f0c3d622623bbe216d3cfb8f"},r("div",{key:"e46a0eeeedaa9efa10867a9e38a03514a6d23d0b",class:"wrapper"},r("table",{key:"fe0a34ee49101b57d74e0e2ad765861bf5e3509e",class:{table:!0,striped:this.striped,hoverable:this.hoverable}},r("thead",{key:"0ea948edf967524a5fc55df8bdc453a3fd6a58a4"},r("tr",{key:"69d9be2deeb57d4811ebdb8714d0713d675c8c1e"},this.columns.map((e=>r("th",{key:e.key,style:{textAlign:e.align??"left"}},e.label))))),r("tbody",{key:"4b0fa5fbc25f6f0952da9a85bd03289f24ffdf9a"},this.rows.map(((e,t)=>r("tr",{key:t},this.columns.map((t=>r("td",{key:t.key,style:{textAlign:t.align??"left"}},(e[t.key]??"")+""))))))))))}static get style(){return":host{display:block}.wrapper{overflow:hidden;border:1px solid var(--ui-border);background:var(--ui-panel);box-shadow:var(--ui-shadow-lg);backdrop-filter:blur(22px) saturate(140%);border-radius:var(--ui-radius-lg);font-family:var(--ui-font-sans)}.table{width:100%;border-collapse:collapse}.table thead th{padding:0.75rem 1rem;font-size:0.7rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--ui-text-faint);background:var(--ui-chip)}.table tbody td{padding:0.75rem 1rem;font-size:0.875rem;color:var(--ui-text-soft)}.table tbody tr{border-top:1px solid var(--ui-border)}.table.striped tbody tr:nth-child(even){background:color-mix(in srgb, var(--ui-chip) 50%, transparent)}.table.hoverable tbody tr:hover{background:var(--ui-chip)}"}},[1,"ui-table",{columns:[16],rows:[16],striped:[4],hoverable:[4]}]);function o(){"undefined"!=typeof customElements&&["ui-table"].forEach((t=>{"ui-table"===t&&(customElements.get(e(t))||customElements.define(e(t),s))}))}o();const i=s,b=o;export{i as UiTable,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as e,p as t,H as a,c as r,h as i,a as s}from"./index.js";const o=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uiChange=r(this,"uiChange"),this.value="",this.items=[],this.select=e=>{e!==this.value&&(this.value=e,this.uiChange.emit(e))}}render(){return i(s,{key:"498d6b8302e63ed96533c7d68f4ac00c06b513cb"},i("div",{key:"20699e632c2596a7157dd69e0f77b7db75b8b40e",class:"tablist",role:"tablist"},this.items.map((e=>{const t=e.value===this.value;return i("button",{key:e.value,class:{tab:!0,active:t},type:"button",role:"tab","aria-selected":t?"true":"false",onClick:()=>this.select(e.value)},e.label)}))),i("div",{key:"d4d5577f928378d8e400779954831fd5f6416c04",class:"panel",role:"tabpanel"},i("slot",{key:"77e86a40c41666945704a560222edd22cd92443f",name:this.value})))}static get style(){return":host{display:block;font-family:var(--ui-font-sans)}.tablist{display:inline-flex;gap:0.25rem;padding:0.25rem;border:1px solid var(--ui-border);border-radius:var(--ui-radius-full);background:var(--ui-chip)}.tab{appearance:none;border:none;padding:0.375rem 0.875rem;border-radius:var(--ui-radius-full);background:transparent;color:var(--ui-text-muted);font:inherit;font-size:0.875rem;font-weight:500;cursor:pointer;outline:none;transition:background var(--ui-duration) var(--ui-ease), color var(--ui-duration) var(--ui-ease)}.tab:focus-visible{box-shadow:0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring)}.tab:hover:not(.active){color:var(--ui-foreground)}.tab.active{background:var(--ui-panel-strong);color:var(--ui-foreground);box-shadow:var(--ui-shadow-sm)}.panel{margin-top:1.25rem;color:var(--ui-text-soft);font-size:0.9375rem;line-height:1.5}"}},[257,"ui-tabs",{value:[1537],items:[16]}]);function n(){"undefined"!=typeof customElements&&["ui-tabs"].forEach((t=>{"ui-tabs"===t&&(customElements.get(e(t))||customElements.define(e(t),o))}))}n();const u=o,d=n;export{u as UiTabs,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as a,c as i,h as r,a as s}from"./index.js";const o=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uiInput=i(this,"uiInput"),this.uiChange=i(this,"uiChange"),this.value="",this.disabled=!1,this.invalid=!1,this.rows=4,this.onInput=e=>{const t=e.target;this.value=t.value,this.uiInput.emit(t.value)},this.onChange=e=>{this.uiChange.emit(e.target.value)}}render(){return r(s,{key:"
|
|
1
|
+
import{t as e,p as t,H as a,c as i,h as r,a as s}from"./index.js";const o=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uiInput=i(this,"uiInput"),this.uiChange=i(this,"uiChange"),this.value="",this.disabled=!1,this.invalid=!1,this.rows=4,this.onInput=e=>{const t=e.target;this.value=t.value,this.uiInput.emit(t.value)},this.onChange=e=>{this.uiChange.emit(e.target.value)}}render(){return r(s,{key:"4134da9c40b56d7a690aacf84f285d32c76e0e97"},r("textarea",{key:"ed094856a7982bb44cc2a6b756daf5ee12f57c01",class:{textarea:!0,invalid:this.invalid},name:this.name,rows:this.rows,placeholder:this.placeholder,disabled:this.disabled,"aria-invalid":this.invalid?"true":null,onInput:this.onInput,onChange:this.onChange},this.value))}static get style(){return":host{display:block}.textarea{width:100%;min-height:7rem;padding:0.75rem 1rem;border:1px solid var(--ui-border);border-radius:var(--ui-radius-sm);background:var(--ui-panel);color:var(--ui-foreground);font-family:var(--ui-font-sans);font-size:0.875rem;line-height:1.5;outline:none;backdrop-filter:blur(22px);transition:all var(--ui-duration) var(--ui-ease);box-sizing:border-box;resize:vertical}.textarea::placeholder{color:var(--ui-text-faint)}.textarea:hover:not(:disabled){border-color:var(--ui-border-strong)}.textarea:focus-visible{border-color:var(--ui-accent);box-shadow:0 0 0 2px var(--ui-ring)}.textarea:disabled{opacity:0.5;pointer-events:none}.textarea.invalid{border-color:var(--ui-danger)}.textarea.invalid:focus-visible{box-shadow:0 0 0 2px color-mix(in srgb, var(--ui-danger) 40%, transparent)}"}},[1,"ui-textarea",{value:[1025],placeholder:[1],disabled:[4],invalid:[4],name:[1],rows:[2]}]);function n(){"undefined"!=typeof customElements&&["ui-textarea"].forEach((t=>{"ui-textarea"===t&&(customElements.get(e(t))||customElements.define(e(t),o))}))}n();const d=o,l=n;export{d as UiTextarea,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as i,H as t,c as r,h as n,a as o}from"./index.js";const s="ui-theme",a=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uiThemeChange=r(this,"uiThemeChange"),this.isDark=!1,this.toggle=()=>{if(this.isDark=!this.isDark,"undefined"!=typeof window)try{window.localStorage.setItem(s,this.isDark?"dark":"light")}catch{}this.applyTheme(),this.uiThemeChange.emit(this.isDark?"dark":"light")}}connectedCallback(){this.isDark=this.resolveInitialTheme(),this.applyTheme()}resolveInitialTheme(){if("undefined"==typeof window)return!1;try{const e=window.localStorage.getItem(s);if("dark"===e)return!0;if("light"===e)return!1}catch{}return"function"==typeof window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}applyTheme(){"undefined"!=typeof document&&document.documentElement.classList.toggle("dark",this.isDark)}renderIcon(){return this.isDark?n("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},n("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})):n("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},n("circle",{cx:"12",cy:"12",r:"4"}),n("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),n("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),n("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),n("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),n("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),n("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),n("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),n("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"}))}render(){return n(o,{key:"
|
|
1
|
+
import{t as e,p as i,H as t,c as r,h as n,a as o}from"./index.js";const s="ui-theme",a=i(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.uiThemeChange=r(this,"uiThemeChange"),this.isDark=!1,this.toggle=()=>{if(this.isDark=!this.isDark,"undefined"!=typeof window)try{window.localStorage.setItem(s,this.isDark?"dark":"light")}catch{}this.applyTheme(),this.uiThemeChange.emit(this.isDark?"dark":"light")}}connectedCallback(){this.isDark=this.resolveInitialTheme(),this.applyTheme()}resolveInitialTheme(){if("undefined"==typeof window)return!1;try{const e=window.localStorage.getItem(s);if("dark"===e)return!0;if("light"===e)return!1}catch{}return"function"==typeof window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}applyTheme(){"undefined"!=typeof document&&document.documentElement.classList.toggle("dark",this.isDark)}renderIcon(){return this.isDark?n("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},n("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})):n("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},n("circle",{cx:"12",cy:"12",r:"4"}),n("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),n("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),n("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),n("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),n("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),n("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),n("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),n("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"}))}render(){return n(o,{key:"a654dba08923ee4ede01577964a9c1ae00152eeb"},n("button",{key:"84477ec9d4693aa93457fb6564ceae1ab2c3516b",class:"toggle",type:"button","aria-label":this.isDark?"Ativar tema claro":"Ativar tema escuro","aria-pressed":this.isDark?"true":"false",onClick:this.toggle},this.renderIcon()))}static get style(){return":host{display:inline-flex}.toggle{display:inline-flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;padding:0;border:1px solid var(--ui-border);border-radius:var(--ui-radius-full);background:var(--ui-chip);color:var(--ui-foreground);cursor:pointer;outline:none;transition:background var(--ui-duration) var(--ui-ease), color var(--ui-duration) var(--ui-ease)}.toggle:focus-visible{box-shadow:0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring)}.toggle:hover{color:var(--ui-accent)}"}},[1,"ui-theme-toggle",{isDark:[32]}]);function d(){"undefined"!=typeof customElements&&["ui-theme-toggle"].forEach((i=>{"ui-theme-toggle"===i&&(customElements.get(e(i))||customElements.define(e(i),a))}))}d();const l=a,u=d;export{l as UiThemeToggle,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{U as o,d as s}from"./p-
|
|
1
|
+
import{U as o,d as s}from"./p-DDJE__UC.js";const p=o,r=s;export{p as UiToast,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as
|
|
1
|
+
import{t,p as e,H as s,h as i,a as o}from"./index.js";import{d as a}from"./p-DDJE__UC.js";const n=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.items=[],this.counter=0}async toast(t){const e=`toast-${this.counter++}-${Math.random().toString(36).slice(2)}`;this.items=[...this.items,{...t,id:e}]}remove(t){this.items=this.items.filter((e=>e.id!==t))}render(){return i(o,{key:"608a15f7a5805eb336aeb5eed46fc7ca9f7ef32e"},i("div",{key:"ebf5b3f7cdafa526fe0845d3025bf10579beb848",class:"container"},this.items.map((t=>i("ui-toast",{key:t.id,open:!0,heading:t.heading,description:t.description,variant:t.variant??"default",duration:t.duration??4e3,onUiClose:()=>this.remove(t.id)})))))}static get style(){return":host{display:contents}.container{position:fixed;bottom:0;right:0;z-index:100;display:flex;flex-direction:column;gap:0.5rem;padding:1rem;max-width:24rem}"}},[1,"ui-toaster",{items:[32],toast:[64]}]);function r(){"undefined"!=typeof customElements&&["ui-toaster","ui-toast"].forEach((e=>{switch(e){case"ui-toaster":customElements.get(t(e))||customElements.define(t(e),n);break;case"ui-toast":customElements.get(t(e))||a()}}))}r();const c=n,d=r;export{c as UiToaster,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as i,H as s,h as e,a as o}from"./index.js";import{a,c as r,o as n,f as h,s as
|
|
1
|
+
import{t,p as i,H as s,h as e,a as o}from"./index.js";import{a,c as r,o as n,f as h,s as c}from"./p-DDtwbwIl.js";const l=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.content="",this.placement="top",this.openDelay=200,this.visible=!1,this.onEnter=()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>{this.visible=!0,requestAnimationFrame((()=>this.start()))}),this.openDelay)},this.onLeave=()=>{this.timer&&clearTimeout(this.timer),this.visible=!1,this.stop()}}disconnectedCallback(){this.stop(),this.timer&&clearTimeout(this.timer)}start(){this.triggerEl&&this.floatingEl&&(this.stop(),this.cleanup=a(this.triggerEl,this.floatingEl,(()=>{this.triggerEl&&this.floatingEl&&r(this.triggerEl,this.floatingEl,{placement:this.placement,middleware:[n(8),h(),c({padding:8})]}).then((({x:t,y:i})=>{Object.assign(this.floatingEl.style,{left:t+"px",top:i+"px"})}))})))}stop(){this.cleanup?.(),this.cleanup=void 0}render(){return e(o,{key:"401cfeba060afec776fd2455ab597f5591733566",onMouseEnter:this.onEnter,onMouseLeave:this.onLeave,onFocusin:this.onEnter,onFocusout:this.onLeave},e("span",{key:"6ee621aefa5092194d3e1c3dabf5a33501421c6c",class:"trigger",ref:t=>this.triggerEl=t},e("slot",{key:"771078940a2c4e17ecf30dc39f6e0f0c90691b5e"})),e("div",{key:"263d4868a251cab4f302a8fe1d890a419f4158d1",class:{tooltip:!0,"is-visible":this.visible},role:"tooltip",ref:t=>this.floatingEl=t},this.content))}get host(){return this}static get style(){return":host{display:inline-block}.trigger{display:inline-flex}.tooltip{position:fixed;top:0;left:0;z-index:50;width:max-content;max-width:18rem;padding:0.4rem 0.7rem;font-family:var(--ui-font-sans);font-size:0.75rem;font-weight:500;line-height:1.4;color:var(--ui-foreground);background:color-mix(in srgb, var(--ui-background) 90%, var(--ui-foreground) 8%);border:1px solid var(--ui-border-strong);box-shadow:var(--ui-shadow-lg);border-radius:var(--ui-radius-sm);pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-duration) var(--ui-ease), transform var(--ui-duration) var(--ui-ease)}.tooltip.is-visible{opacity:1;transform:scale(1)}"}},[257,"ui-tooltip",{content:[1],placement:[1],openDelay:[2,"open-delay"],visible:[32]}]);function d(){"undefined"!=typeof customElements&&["ui-tooltip"].forEach((i=>{"ui-tooltip"===i&&(customElements.get(t(i))||customElements.define(t(i),l))}))}d();const u=l,p=d;export{u as UiTooltip,p as defineCustomElement}
|
|
@@ -646,6 +646,90 @@ const shift$1 = function (options) {
|
|
|
646
646
|
};
|
|
647
647
|
};
|
|
648
648
|
|
|
649
|
+
/**
|
|
650
|
+
* Provides data that allows you to change the size of the floating element —
|
|
651
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
652
|
+
* width of the reference element.
|
|
653
|
+
* @see https://floating-ui.com/docs/size
|
|
654
|
+
*/
|
|
655
|
+
const size$1 = function (options) {
|
|
656
|
+
if (options === void 0) {
|
|
657
|
+
options = {};
|
|
658
|
+
}
|
|
659
|
+
return {
|
|
660
|
+
name: 'size',
|
|
661
|
+
options,
|
|
662
|
+
async fn(state) {
|
|
663
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
664
|
+
const {
|
|
665
|
+
placement,
|
|
666
|
+
rects,
|
|
667
|
+
platform,
|
|
668
|
+
elements
|
|
669
|
+
} = state;
|
|
670
|
+
const {
|
|
671
|
+
apply = () => {},
|
|
672
|
+
...detectOverflowOptions
|
|
673
|
+
} = evaluate(options, state);
|
|
674
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
675
|
+
const side = getSide(placement);
|
|
676
|
+
const alignment = getAlignment(placement);
|
|
677
|
+
const isYAxis = getSideAxis(placement) === 'y';
|
|
678
|
+
const {
|
|
679
|
+
width,
|
|
680
|
+
height
|
|
681
|
+
} = rects.floating;
|
|
682
|
+
let heightSide;
|
|
683
|
+
let widthSide;
|
|
684
|
+
if (side === 'top' || side === 'bottom') {
|
|
685
|
+
heightSide = side;
|
|
686
|
+
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
|
|
687
|
+
} else {
|
|
688
|
+
widthSide = side;
|
|
689
|
+
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
690
|
+
}
|
|
691
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
692
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
693
|
+
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
694
|
+
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
695
|
+
const noShift = !state.middlewareData.shift;
|
|
696
|
+
let availableHeight = overflowAvailableHeight;
|
|
697
|
+
let availableWidth = overflowAvailableWidth;
|
|
698
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
699
|
+
availableWidth = maximumClippingWidth;
|
|
700
|
+
}
|
|
701
|
+
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
702
|
+
availableHeight = maximumClippingHeight;
|
|
703
|
+
}
|
|
704
|
+
if (noShift && !alignment) {
|
|
705
|
+
const xMin = max(overflow.left, 0);
|
|
706
|
+
const xMax = max(overflow.right, 0);
|
|
707
|
+
const yMin = max(overflow.top, 0);
|
|
708
|
+
const yMax = max(overflow.bottom, 0);
|
|
709
|
+
if (isYAxis) {
|
|
710
|
+
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
711
|
+
} else {
|
|
712
|
+
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
await apply({
|
|
716
|
+
...state,
|
|
717
|
+
availableWidth,
|
|
718
|
+
availableHeight
|
|
719
|
+
});
|
|
720
|
+
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
721
|
+
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
722
|
+
return {
|
|
723
|
+
reset: {
|
|
724
|
+
rects: true
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
return {};
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
|
|
649
733
|
function hasWindow() {
|
|
650
734
|
return typeof window !== 'undefined';
|
|
651
735
|
}
|
|
@@ -1510,6 +1594,14 @@ const shift = shift$1;
|
|
|
1510
1594
|
*/
|
|
1511
1595
|
const flip = flip$1;
|
|
1512
1596
|
|
|
1597
|
+
/**
|
|
1598
|
+
* Provides data that allows you to change the size of the floating element —
|
|
1599
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
1600
|
+
* width of the reference element.
|
|
1601
|
+
* @see https://floating-ui.com/docs/size
|
|
1602
|
+
*/
|
|
1603
|
+
const size = size$1;
|
|
1604
|
+
|
|
1513
1605
|
/**
|
|
1514
1606
|
* Computes the `x` and `y` coordinates that will place the floating element
|
|
1515
1607
|
* next to a given reference element.
|
|
@@ -1533,4 +1625,4 @@ const computePosition = (reference, floating, options) => {
|
|
|
1533
1625
|
});
|
|
1534
1626
|
};
|
|
1535
1627
|
|
|
1536
|
-
export { autoUpdate as a, computePosition as c, flip as f, offset as o, shift as s };
|
|
1628
|
+
export { autoUpdate as a, size as b, computePosition as c, flip as f, offset as o, shift as s };
|
package/dist/esm/loader.js
CHANGED
|
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-DYwlrXg_.js';
|
|
|
4
4
|
const defineCustomElements = async (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
6
|
await globalScripts();
|
|
7
|
-
return bootstrapLazy([["ui-loading-overlay",[[1,"ui-loading-overlay",{"visible":[4],"label":[1],"spinnerSize":[1,"spinner-size"]}]]],["ui-toaster",[[1,"ui-toaster",{"items":[32],"toast":[64]}]]],["ui-accordion",[[257,"ui-accordion"]]],["ui-accordion-item",[[257,"ui-accordion-item",{"heading":[1],"open":[1540]}]]],["ui-alert",[[257,"ui-alert",{"variant":[1],"heading":[1],"dismissible":[4],"open":[32]}]]],["ui-avatar",[[1,"ui-avatar",{"src":[1],"alt":[1],"fallback":[1],"status":[1]}]]],["ui-avatar-group",[[257,"ui-avatar-group"]]],["ui-badge",[[257,"ui-badge",{"variant":[1],"dot":[4],"removable":[4]}]]],["ui-breadcrumb",[[257,"ui-breadcrumb"]]],["ui-breadcrumb-item",[[257,"ui-breadcrumb-item",{"href":[1],"current":[4]}]]],["ui-button",[[257,"ui-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"type":[1],"full":[516]}]]],["ui-card",[[257,"ui-card"]]],["ui-checkbox",[[1,"ui-checkbox",{"checked":[1540],"disabled":[4],"name":[1],"value":[1]}]]],["ui-container",[[257,"ui-container",{"size":[1],"padded":[4]}]]],["ui-dialog",[[257,"ui-dialog",{"open":[1540],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-drawer",[[257,"ui-drawer",{"open":[1540],"side":[513],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-dropdown-item",[[257,"ui-dropdown-item",{"disabled":[516]}]]],["ui-dropdown-menu",[[257,"ui-dropdown-menu",{"open":[1540],"placement":[1],"show":[64],"close":[64]},[[0,"uiDropdownClose","onItemClose"]],{"open":[{"onOpenChange":0}]}]]],["ui-field",[[257,"ui-field",{"label":[1],"description":[1],"error":[1],"required":[4],"fieldId":[1,"field-id"]}]]],["ui-grid",[[257,"ui-grid",{"columns":[2],"gap":[1],"minItemWidth":[1,"min-item-width"]}]]],["ui-input",[[257,"ui-input",{"value":[1025],"placeholder":[1],"type":[1],"disabled":[4],"invalid":[4],"name":[1],"clearable":[4]}]]],["ui-label",[[257,"ui-label"]]],["ui-pagination",[[1,"ui-pagination",{"total":[2],"current":[1538],"siblings":[2]}]]],["ui-popover",[[257,"ui-popover",{"open":[1540],"placement":[1],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-progress",[[1,"ui-progress",{"value":[2],"max":[2],"indeterminate":[4]}]]],["ui-radio-group",[[1,"ui-radio-group",{"value":[1025],"name":[1],"options":[16],"disabled":[4]}]]],["ui-reveal",[[257,"ui-reveal",{"delay":[2],"visible":[32]}]]],["ui-scroll-progress",[[1,"ui-scroll-progress",{"progress":[32]}]]],["ui-section",[[257,"ui-section",{"eyebrow":[1],"heading":[1],"description":[1]}]]],["ui-segmented",[[1,"ui-segmented",{"items":[16],"value":[1537]}]]],["ui-select",[[1,"ui-select",{"value":[1025],"disabled":[4],"name":[1],"options":[16],"placeholder":[1]}]]],["ui-separator",[[1,"ui-separator",{"orientation":[513]}]]],["ui-skeleton",[[1,"ui-skeleton"]]],["ui-slider",[[1,"ui-slider",{"value":[1026],"min":[2],"max":[2],"step":[2],"disabled":[4]}]]],["ui-stack",[[257,"ui-stack",{"direction":[1],"gap":[1],"align":[1],"justify":[1],"wrap":[4]}]]],["ui-stat",[[257,"ui-stat",{"label":[1],"value":[1],"delta":[1],"trend":[1]}]]],["ui-switch",[[1,"ui-switch",{"checked":[1540],"disabled":[4]}]]],["ui-tabs",[[257,"ui-tabs",{"value":[1537],"items":[16]}]]],["ui-textarea",[[1,"ui-textarea",{"value":[1025],"placeholder":[1],"disabled":[4],"invalid":[4],"name":[1],"rows":[2]}]]],["ui-theme-toggle",[[1,"ui-theme-toggle",{"isDark":[32]}]]],["ui-tooltip",[[257,"ui-tooltip",{"content":[1],"placement":[1],"openDelay":[2,"open-delay"],"visible":[32]}]]],["ui-spinner",[[1,"ui-spinner",{"size":[1]}]]],["ui-toast",[[1,"ui-toast",{"open":[1540],"variant":[1],"heading":[1],"description":[1],"duration":[2],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]]], options);
|
|
7
|
+
return bootstrapLazy([["ui-loading-overlay",[[1,"ui-loading-overlay",{"visible":[4],"label":[1],"spinnerSize":[1,"spinner-size"]}]]],["ui-toaster",[[1,"ui-toaster",{"items":[32],"toast":[64]}]]],["ui-accordion",[[257,"ui-accordion"]]],["ui-accordion-item",[[257,"ui-accordion-item",{"heading":[1],"open":[1540]}]]],["ui-alert",[[257,"ui-alert",{"variant":[1],"heading":[1],"dismissible":[4],"open":[32]}]]],["ui-avatar",[[1,"ui-avatar",{"src":[1],"alt":[1],"fallback":[1],"status":[1]}]]],["ui-avatar-group",[[257,"ui-avatar-group"]]],["ui-badge",[[257,"ui-badge",{"variant":[1],"dot":[4],"removable":[4]}]]],["ui-breadcrumb",[[257,"ui-breadcrumb"]]],["ui-breadcrumb-item",[[257,"ui-breadcrumb-item",{"href":[1],"current":[4]}]]],["ui-button",[[257,"ui-button",{"variant":[1],"size":[1],"disabled":[4],"loading":[4],"type":[1],"full":[516]}]]],["ui-card",[[257,"ui-card"]]],["ui-checkbox",[[1,"ui-checkbox",{"checked":[1540],"disabled":[4],"name":[1],"value":[1]}]]],["ui-combobox",[[1,"ui-combobox",{"options":[16],"value":[1025],"placeholder":[1],"query":[32],"open":[32],"activeIndex":[32]}]]],["ui-container",[[257,"ui-container",{"size":[1],"padded":[4]}]]],["ui-date-picker",[[1,"ui-date-picker",{"value":[1025],"placeholder":[1],"open":[32],"viewYear":[32],"viewMonth":[32]},null,{"value":[{"onValueChange":0}]}]]],["ui-dialog",[[257,"ui-dialog",{"open":[1540],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-drawer",[[257,"ui-drawer",{"open":[1540],"side":[513],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-dropdown-item",[[257,"ui-dropdown-item",{"disabled":[516]}]]],["ui-dropdown-menu",[[257,"ui-dropdown-menu",{"open":[1540],"placement":[1],"show":[64],"close":[64]},[[0,"uiDropdownClose","onItemClose"]],{"open":[{"onOpenChange":0}]}]]],["ui-field",[[257,"ui-field",{"label":[1],"description":[1],"error":[1],"required":[4],"fieldId":[1,"field-id"]}]]],["ui-file-upload",[[1,"ui-file-upload",{"accept":[1],"multiple":[4],"label":[1],"files":[32],"dragging":[32]}]]],["ui-grid",[[257,"ui-grid",{"columns":[2],"gap":[1],"minItemWidth":[1,"min-item-width"]}]]],["ui-input",[[257,"ui-input",{"value":[1025],"placeholder":[1],"type":[1],"disabled":[4],"invalid":[4],"name":[1],"clearable":[4]}]]],["ui-label",[[257,"ui-label"]]],["ui-navbar",[[257,"ui-navbar"]]],["ui-pagination",[[1,"ui-pagination",{"total":[2],"current":[1538],"siblings":[2]}]]],["ui-popover",[[257,"ui-popover",{"open":[1540],"placement":[1],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]],["ui-progress",[[1,"ui-progress",{"value":[2],"max":[2],"indeterminate":[4]}]]],["ui-progress-circular",[[1,"ui-progress-circular",{"value":[2],"max":[2],"size":[1],"strokeWidth":[2,"stroke-width"],"indeterminate":[4],"showValue":[4,"show-value"]}]]],["ui-radio-group",[[1,"ui-radio-group",{"value":[1025],"name":[1],"options":[16],"disabled":[4]}]]],["ui-rating",[[1,"ui-rating",{"value":[1026],"max":[2],"readonly":[4],"hoverValue":[32]}]]],["ui-reveal",[[257,"ui-reveal",{"delay":[2],"visible":[32]}]]],["ui-scroll-progress",[[1,"ui-scroll-progress",{"progress":[32]}]]],["ui-section",[[257,"ui-section",{"eyebrow":[1],"heading":[1],"description":[1]}]]],["ui-segmented",[[1,"ui-segmented",{"items":[16],"value":[1537]}]]],["ui-select",[[1,"ui-select",{"value":[1025],"disabled":[4],"name":[1],"options":[16],"placeholder":[1]}]]],["ui-separator",[[1,"ui-separator",{"orientation":[513]}]]],["ui-skeleton",[[1,"ui-skeleton"]]],["ui-slider",[[1,"ui-slider",{"value":[1026],"min":[2],"max":[2],"step":[2],"disabled":[4]}]]],["ui-stack",[[257,"ui-stack",{"direction":[1],"gap":[1],"align":[1],"justify":[1],"wrap":[4]}]]],["ui-stat",[[257,"ui-stat",{"label":[1],"value":[1],"delta":[1],"trend":[1]}]]],["ui-switch",[[1,"ui-switch",{"checked":[1540],"disabled":[4]}]]],["ui-table",[[1,"ui-table",{"columns":[16],"rows":[16],"striped":[4],"hoverable":[4]}]]],["ui-tabs",[[257,"ui-tabs",{"value":[1537],"items":[16]}]]],["ui-textarea",[[1,"ui-textarea",{"value":[1025],"placeholder":[1],"disabled":[4],"invalid":[4],"name":[1],"rows":[2]}]]],["ui-theme-toggle",[[1,"ui-theme-toggle",{"isDark":[32]}]]],["ui-tooltip",[[257,"ui-tooltip",{"content":[1],"placement":[1],"openDelay":[2,"open-delay"],"visible":[32]}]]],["ui-spinner",[[1,"ui-spinner",{"size":[1]}]]],["ui-toast",[[1,"ui-toast",{"open":[1540],"variant":[1],"heading":[1],"description":[1],"duration":[2],"show":[64],"close":[64]},null,{"open":[{"onOpenChange":0}]}]]]], options);
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { defineCustomElements };
|
|
@@ -17,7 +17,7 @@ const UiAccordionItem = class {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '613b3accfe538702304aeaa7d826297948cd2c45' }, h("details", { key: '912854f32a5e15fbb2e708b4de5e0c4059733722', open: this.open, onToggle: this.onToggle }, h("summary", { key: '814a3332eb5dd4fbf340ae7cdb55fe8f618c0253' }, h("span", { key: '63ab8d2d1a60ea7327577b80547897aa0d78e2dd', class: "heading" }, this.heading), h("svg", { key: 'c6812c39cbe86ad0e09d61d44bfff3784c93d462', class: "chevron", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("polyline", { key: '67969ddf96e125133c9b7a4d59edb5a9af21a319', points: "6 9 12 15 18 9" }))), h("div", { key: 'e8e1adb834e3749848db663b0a27b672fb33302d', class: "content" }, h("slot", { key: '3d22b0d25f5000e6e9402658ec52996c2f9f3c09' })))));
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
UiAccordionItem.style = uiAccordionItemCss();
|
|
@@ -7,7 +7,7 @@ const UiAccordion = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '0242c529aecf9b0f35958f21f9df65d4cba8ba37' }, h("slot", { key: '394493e0939fa0224be6233830f588e88e49a2d3' })));
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
UiAccordion.style = uiAccordionCss();
|
|
@@ -7,7 +7,7 @@ const UiAvatarGroup = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'ffbc4f069a58a5c5e9bf014ec9fc41d11ceb24b8' }, h("div", { key: 'c6f7c559740f193c0347f7834169fbd2eb252272', class: "group" }, h("slot", { key: 'd66719ad68488098d753eefc8da5cc65bf6a85a4' }))));
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
UiAvatarGroup.style = uiAvatarGroupCss();
|
|
@@ -9,7 +9,7 @@ const UiAvatar = class {
|
|
|
9
9
|
this.alt = "";
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '3f5862531fd7c0df254cca0be373c4f5661bac1c' }, h("span", { key: '2c831417964e89d68f3535321868aa0fab82df26', class: "wrapper" }, h("span", { key: '7573d9b9bdd3c07e7913002923722e19eb652d8e', class: "avatar" }, this.src ? (h("img", { class: "image", src: this.src, alt: this.alt })) : (h("span", { class: "fallback" }, this.fallback))), this.status && (h("span", { key: 'adb6bf39438427a853fffe2eb84b95474aa8c123', class: `status status-${this.status}`, "aria-label": this.status })))));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
UiAvatar.style = uiAvatarCss();
|
|
@@ -13,7 +13,7 @@ const UiBreadcrumbItem = class {
|
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
15
|
const isLink = this.href && !this.current;
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '20f1a108e5275c29e2fbb243720a8b70efb10b24' }, isLink ? (h("a", { class: "link", href: this.href }, h("slot", null))) : (h("span", { class: "current", "aria-current": this.current ? "page" : undefined }, h("slot", null))), !this.current && this.renderSeparator()));
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
UiBreadcrumbItem.style = uiBreadcrumbItemCss();
|
|
@@ -7,7 +7,7 @@ const UiBreadcrumb = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '93726eb6ef05c505f409ec5b313e7db50c0d0a78' }, h("nav", { key: 'dc02b8d95d1c0998e2e7533ab8ed214fb9c19a63', "aria-label": "breadcrumb" }, h("ol", { key: '41dc2d7fe3cbf1b684723d759ef0d00f17bf2e00' }, h("slot", { key: 'eb64652ac37ca5ce1ebd865260ad1ac2c5dd7548' })))));
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
UiBreadcrumb.style = uiBreadcrumbCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-DYwlrXg_.js';
|
|
2
2
|
|
|
3
|
-
const uiButtonCss = () => `:host{display:inline-block}:host([full]){display:block;width:100%}:host([full]) .btn{width:100%}.btn{display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;white-space:nowrap;border:1px solid transparent;border-radius:var(--ui-radius-full);font-family:var(--ui-font-sans);font-weight:500;cursor:pointer;outline:none;transition:all var(--ui-duration) var(--ui-ease)}.btn:active{transform:scale(0.98)}.btn:focus-visible{box-shadow:0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring)}.btn:disabled{pointer-events:none;opacity:0.5}.size-sm{height:2.25rem;padding:0 1rem;font-size:0.75rem}.size-md{height:2.75rem;padding:0 1.25rem;font-size:0.875rem}.size-lg{height:3rem;padding:0 1.5rem;font-size:1rem}.size-icon{height:2.5rem;width:2.5rem;padding:0}.variant-solid{background:var(--ui-accent);color:var(--ui-accent-contrast);box-shadow:var(--ui-shadow)}.variant-solid:hover{filter:brightness(1.1)}.variant-default{background:var(--ui-panel-strong);color:var(--ui-foreground);border-color:var(--ui-border);backdrop-filter:blur(22px)}.variant-default:hover{border-color:var(--ui-border-strong)}.variant-subtle{background:var(--ui-chip);color:var(--ui-foreground);border-color:var(--ui-border);backdrop-filter:blur(22px)}.variant-subtle:hover{background:var(--ui-panel)}.variant-outline{color:var(--ui-foreground);border-color:color-mix(in srgb, var(--ui-foreground) 30%, transparent)}.variant-outline:hover{background:var(--ui-chip);border-color:color-mix(in srgb, var(--ui-foreground) 45%, transparent)}.variant-ghost{color:var(--ui-text-soft)}.variant-ghost:hover{background:var(--ui-chip)}.variant-destructive{background:var(--ui-danger);color:var(--ui-on-status)}.variant-destructive:hover{filter:brightness(1.1)}.variant-link{color:var(--ui-accent);text-underline-offset:4px}.variant-link:hover{text-decoration:underline}.spinner{width:1rem;height:1rem;border-radius:9999px;border:2px solid currentColor;border-top-color:transparent;animation:ui-button-spin 0.7s linear infinite}@keyframes ui-button-spin{to{transform:rotate(360deg)}}`;
|
|
3
|
+
const uiButtonCss = () => `:host{display:inline-block}:host([full]){display:block;width:100%}:host([full]) .btn{width:100%}.btn{display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;white-space:nowrap;border:1px solid transparent;border-radius:var(--ui-radius-full);background:transparent;color:var(--ui-foreground);font-family:var(--ui-font-sans);font-weight:500;cursor:pointer;outline:none;transition:all var(--ui-duration) var(--ui-ease)}.btn:active{transform:scale(0.98)}.btn:focus-visible{box-shadow:0 0 0 2px var(--ui-background), 0 0 0 4px var(--ui-ring)}.btn:disabled{pointer-events:none;opacity:0.5}.size-sm{height:2.25rem;padding:0 1rem;font-size:0.75rem}.size-md{height:2.75rem;padding:0 1.25rem;font-size:0.875rem}.size-lg{height:3rem;padding:0 1.5rem;font-size:1rem}.size-icon{height:2.5rem;width:2.5rem;padding:0}.variant-solid{background:var(--ui-accent);color:var(--ui-accent-contrast);box-shadow:var(--ui-shadow)}.variant-solid:hover{filter:brightness(1.1)}.variant-default{background:var(--ui-panel-strong);color:var(--ui-foreground);border-color:var(--ui-border);backdrop-filter:blur(22px)}.variant-default:hover{border-color:var(--ui-border-strong)}.variant-subtle{background:var(--ui-chip);color:var(--ui-foreground);border-color:var(--ui-border);backdrop-filter:blur(22px)}.variant-subtle:hover{background:var(--ui-panel)}.variant-outline{color:var(--ui-foreground);border-color:color-mix(in srgb, var(--ui-foreground) 30%, transparent)}.variant-outline:hover{background:var(--ui-chip);border-color:color-mix(in srgb, var(--ui-foreground) 45%, transparent)}.variant-ghost{color:var(--ui-text-soft)}.variant-ghost:hover{background:var(--ui-chip)}.variant-destructive{background:var(--ui-danger);color:var(--ui-on-status)}.variant-destructive:hover{filter:brightness(1.1)}.variant-link{color:var(--ui-accent);text-underline-offset:4px}.variant-link:hover{text-decoration:underline}.spinner{width:1rem;height:1rem;border-radius:9999px;border:2px solid currentColor;border-top-color:transparent;animation:ui-button-spin 0.7s linear infinite}@keyframes ui-button-spin{to{transform:rotate(360deg)}}`;
|
|
4
4
|
|
|
5
5
|
const UiButton = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -7,7 +7,7 @@ const UiCard = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '2f6568112992159a78a5c9dac99bd1a453cd779a' }, h("div", { key: '3d76798bf20f98b20a8d7b1847896f9641585cda', class: "card" }, h("slot", { key: 'cf396f9448c56b96859072327f5f82bb00f0c36d', name: "title" }), h("slot", { key: '04fdf85b8c4ffa318b084616ba902998d085a990', name: "description" }), h("slot", { key: 'a716446f123d47c8f47bea6915ac7489dd41fd45' }), h("slot", { key: '9b2e4abc3987a04e72b13eff8cacf3257b89f174', name: "footer" }))));
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
UiCard.style = uiCardCss();
|
|
@@ -24,7 +24,7 @@ const UiCheckbox = class {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: 'ec07dd3898dfb9eeac1a07d41895be145a8f03f0' }, h("button", { key: '7d1e72daf042994ba140703e5f8ce2bb5558932d', class: "checkbox", type: "button", role: "checkbox", "aria-checked": this.checked ? "true" : "false", disabled: this.disabled, onClick: this.toggle, onKeyDown: this.onKeyDown }, h("svg", { key: 'f1a59bc59f90e6bce5b289a4a05da51778788c19', class: "check", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("polyline", { key: '6ea7bc0406e6e8befd6ceea7193423bd433d9a63', points: "20 6 9 17 4 12" })))));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
UiCheckbox.style = uiCheckboxCss();
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-DYwlrXg_.js';
|
|
2
|
+
import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shift, b as size } from './floating-ui.dom-DDtwbwIl.js';
|
|
3
|
+
|
|
4
|
+
const uiComboboxCss = () => `:host{display:block}.field{display:flex;align-items:center;gap:0.5rem;width:100%;height:2.75rem;padding:0 0.875rem;border:1px solid var(--ui-border);border-radius:var(--ui-radius-sm);background:var(--ui-panel);backdrop-filter:blur(22px);transition:all var(--ui-duration) var(--ui-ease);box-sizing:border-box}.field:hover{border-color:var(--ui-border-strong)}.field:focus-within{border-color:var(--ui-accent);box-shadow:0 0 0 2px var(--ui-ring)}.input{flex:1;min-width:0;height:100%;border:none;background:transparent;color:var(--ui-foreground);font-family:var(--ui-font-sans);font-size:0.875rem;outline:none}.input::placeholder{color:var(--ui-text-faint)}.list{position:fixed;top:0;left:0;z-index:50;max-height:16rem;overflow-y:auto;padding:0.25rem;font-family:var(--ui-font-sans);color:var(--ui-foreground);border:1px solid var(--ui-border);background:var(--ui-panel-strong);box-shadow:var(--ui-shadow-lg);backdrop-filter:blur(22px);border-radius:var(--ui-radius);visibility:hidden;opacity:0;transition:opacity var(--ui-duration) var(--ui-ease), visibility var(--ui-duration) var(--ui-ease)}.list.is-open{visibility:visible;opacity:1}.option{padding:0.5rem 0.75rem;font-size:0.875rem;color:var(--ui-foreground);border-radius:var(--ui-radius-sm);cursor:pointer;transition:background var(--ui-duration) var(--ui-ease)}.option.active{background:var(--ui-chip)}.option.selected{color:var(--ui-accent)}.empty{padding:0.5rem 0.75rem;font-size:0.875rem;color:var(--ui-text-faint)}`;
|
|
5
|
+
|
|
6
|
+
const UiCombobox = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.uiChange = createEvent(this, "uiChange");
|
|
10
|
+
/** Opções disponíveis para autocomplete. */
|
|
11
|
+
this.options = [];
|
|
12
|
+
/** Valor selecionado. */
|
|
13
|
+
this.value = "";
|
|
14
|
+
/** Placeholder do campo. */
|
|
15
|
+
this.placeholder = "";
|
|
16
|
+
/** Texto digitado no campo. */
|
|
17
|
+
this.query = "";
|
|
18
|
+
/** Indica se a lista flutuante está aberta. */
|
|
19
|
+
this.open = false;
|
|
20
|
+
/** Índice da opção destacada. */
|
|
21
|
+
this.activeIndex = -1;
|
|
22
|
+
this.listId = `ui-combobox-list-${Math.random().toString(36).slice(2, 9)}`;
|
|
23
|
+
this.onInput = (event) => {
|
|
24
|
+
this.query = event.target.value;
|
|
25
|
+
this.activeIndex = -1;
|
|
26
|
+
this.setOpen(true);
|
|
27
|
+
};
|
|
28
|
+
this.onFocus = () => {
|
|
29
|
+
this.setOpen(true);
|
|
30
|
+
};
|
|
31
|
+
this.onKeydown = (event) => {
|
|
32
|
+
const items = this.filtered;
|
|
33
|
+
switch (event.key) {
|
|
34
|
+
case "ArrowDown":
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
if (!this.open) {
|
|
37
|
+
this.setOpen(true);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (items.length === 0)
|
|
41
|
+
return;
|
|
42
|
+
this.activeIndex = (this.activeIndex + 1) % items.length;
|
|
43
|
+
break;
|
|
44
|
+
case "ArrowUp":
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
if (items.length === 0)
|
|
47
|
+
return;
|
|
48
|
+
this.activeIndex =
|
|
49
|
+
(this.activeIndex - 1 + items.length) % items.length;
|
|
50
|
+
break;
|
|
51
|
+
case "Enter":
|
|
52
|
+
if (this.open && this.activeIndex >= 0 && items[this.activeIndex]) {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
this.select(items[this.activeIndex]);
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
57
|
+
case "Escape":
|
|
58
|
+
if (this.open) {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
this.setOpen(false);
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
this.onDocumentClick = (event) => {
|
|
66
|
+
if (!this.open)
|
|
67
|
+
return;
|
|
68
|
+
if (event.composedPath().includes(this.host))
|
|
69
|
+
return;
|
|
70
|
+
this.setOpen(false);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
componentWillLoad() {
|
|
74
|
+
const selected = this.options.find((option) => option.value === this.value);
|
|
75
|
+
if (selected)
|
|
76
|
+
this.query = selected.label;
|
|
77
|
+
}
|
|
78
|
+
disconnectedCallback() {
|
|
79
|
+
this.stop();
|
|
80
|
+
document.removeEventListener("click", this.onDocumentClick);
|
|
81
|
+
}
|
|
82
|
+
get filtered() {
|
|
83
|
+
const term = this.query.toLowerCase();
|
|
84
|
+
return this.options.filter((option) => option.label.toLowerCase().includes(term));
|
|
85
|
+
}
|
|
86
|
+
setOpen(value) {
|
|
87
|
+
if (this.open === value)
|
|
88
|
+
return;
|
|
89
|
+
this.open = value;
|
|
90
|
+
if (value) {
|
|
91
|
+
requestAnimationFrame(() => this.start());
|
|
92
|
+
document.addEventListener("click", this.onDocumentClick);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.stop();
|
|
96
|
+
this.activeIndex = -1;
|
|
97
|
+
document.removeEventListener("click", this.onDocumentClick);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
start() {
|
|
101
|
+
if (!this.inputEl || !this.listEl)
|
|
102
|
+
return;
|
|
103
|
+
this.stop();
|
|
104
|
+
this.cleanup = autoUpdate(this.inputEl, this.listEl, () => {
|
|
105
|
+
if (!this.inputEl || !this.listEl)
|
|
106
|
+
return;
|
|
107
|
+
computePosition(this.inputEl, this.listEl, {
|
|
108
|
+
placement: "bottom-start",
|
|
109
|
+
middleware: [
|
|
110
|
+
offset(6),
|
|
111
|
+
flip(),
|
|
112
|
+
shift({ padding: 8 }),
|
|
113
|
+
size({
|
|
114
|
+
apply: ({ rects, elements }) => {
|
|
115
|
+
Object.assign(elements.floating.style, {
|
|
116
|
+
width: `${rects.reference.width}px`,
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
}),
|
|
120
|
+
],
|
|
121
|
+
}).then(({ x, y }) => {
|
|
122
|
+
Object.assign(this.listEl.style, { left: `${x}px`, top: `${y}px` });
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
stop() {
|
|
127
|
+
this.cleanup?.();
|
|
128
|
+
this.cleanup = undefined;
|
|
129
|
+
}
|
|
130
|
+
select(option) {
|
|
131
|
+
this.value = option.value;
|
|
132
|
+
this.query = option.label;
|
|
133
|
+
this.setOpen(false);
|
|
134
|
+
this.uiChange.emit(option.value);
|
|
135
|
+
}
|
|
136
|
+
render() {
|
|
137
|
+
const items = this.filtered;
|
|
138
|
+
return (h(Host, { key: '64d332f96d0cb39e1889eb56dbf448f67e5ed240' }, h("div", { key: '30f829b5eff180aa97a2bbb2f90a4e289768df71', class: "field" }, h("input", { key: 'f6df95047db674d2e49d34fed6057cffc86eab49', class: "input", type: "text", role: "combobox", value: this.query, placeholder: this.placeholder, autocomplete: "off", "aria-expanded": this.open ? "true" : "false", "aria-controls": this.listId, "aria-autocomplete": "list", ref: (el) => (this.inputEl = el), onInput: this.onInput, onFocus: this.onFocus, onKeyDown: this.onKeydown })), h("div", { key: 'de55c7ad59dfa3e35aeac8799366e3ee849d1398', id: this.listId, class: { list: true, "is-open": this.open }, role: "listbox", ref: (el) => (this.listEl = el) }, items.length === 0 ? (h("div", { class: "empty" }, "Nenhum resultado")) : (items.map((option, index) => (h("div", { class: {
|
|
139
|
+
option: true,
|
|
140
|
+
active: index === this.activeIndex,
|
|
141
|
+
selected: option.value === this.value,
|
|
142
|
+
}, role: "option", "aria-selected": option.value === this.value ? "true" : "false", onMouseEnter: () => (this.activeIndex = index), onMouseDown: (event) => {
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
this.select(option);
|
|
145
|
+
} }, option.label)))))));
|
|
146
|
+
}
|
|
147
|
+
get host() { return getElement(this); }
|
|
148
|
+
};
|
|
149
|
+
UiCombobox.style = uiComboboxCss();
|
|
150
|
+
|
|
151
|
+
export { UiCombobox as ui_combobox };
|
|
@@ -16,7 +16,7 @@ const UiContainer = class {
|
|
|
16
16
|
[`size-${this.size}`]: true,
|
|
17
17
|
padded: this.padded,
|
|
18
18
|
};
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: 'd9f407cdd15aa38d7e21898f4088d58846e38f22' }, h("div", { key: '7c7596a79dedc3daf94ac5440447c4608e037854', class: classes }, h("slot", { key: '5005378ea1514e2d96fa0cdba219055161ee6688' }))));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
UiContainer.style = uiContainerCss();
|