@paperless/core 3.2.3 → 3.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/build/p-413e2751.entry.js +1 -0
- package/dist/build/p-63ef1d8d.entry.js +1 -0
- package/dist/build/{p-340daf05.js → p-d5390a8e.js} +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/p-empty-state_8.cjs.entry.js +2 -2
- package/dist/cjs/p-modal-body_4.cjs.entry.js +4 -3
- package/dist/collection/components/atoms/modal/container/modal-container.component.css +1 -1
- package/dist/collection/components/atoms/modal/container/modal-container.component.js +5 -4
- package/dist/collection/components/molecules/table/footer/table-footer.component.js +2 -2
- package/dist/collection/components/organisms/modal/modal.component.js +2 -2
- package/dist/components/p-CrAZWi4n.js +1 -0
- package/dist/components/p-CxOhqNqH.js +1 -0
- package/dist/components/p-modal-container.js +1 -1
- package/dist/components/p-modal.js +1 -1
- package/dist/components/p-table-footer.js +1 -1
- package/dist/components/p-table.js +1 -1
- package/dist/esm/p-empty-state_8.entry.js +2 -2
- package/dist/esm/p-modal-body_4.entry.js +4 -3
- package/dist/index.html +1 -1
- package/dist/paperless/p-413e2751.entry.js +1 -0
- package/dist/paperless/p-63ef1d8d.entry.js +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/modal/container/modal-container.component.d.ts +1 -1
- package/dist/types/components/organisms/modal/modal.component.d.ts +1 -1
- package/dist/types/components.d.ts +4 -4
- package/hydrate/index.js +6 -5
- package/hydrate/index.mjs +6 -5
- package/package.json +1 -1
- package/dist/build/p-902adabf.entry.js +0 -1
- package/dist/build/p-e30ef289.entry.js +0 -1
- package/dist/components/p-CCqpQJ15.js +0 -1
- package/dist/components/p-CoBFv4r3.js +0 -1
- package/dist/paperless/p-902adabf.entry.js +0 -1
- package/dist/paperless/p-e30ef289.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as i,c as s,h as a,d as o}from"./p-CySg37XO.js";import{f as n,g as l}from"./p-CwQG70_4.js";import{f as r}from"./p-WEZng7dj.js";import{f as c}from"./p-CWO2YJCh.js";import{c as h}from"./p-xs4N_Y-0.js";import{P as p,a as m,T as d}from"./p-CEaB2BT0.js";import{d as u}from"./p-Crasy6LB.js";import{d as b}from"./p-AkD55vN_.js";import{d as f}from"./p-ShAy0ruV.js";import{d as g}from"./p-DP6H82uQ.js";import{d as k}from"./p-N5WuUoFr.js";import{d as w}from"./p-BtH8h7p9.js";import{d as y}from"./p-DlQumf-0.js";import{d as S}from"./p-nGuULFe2.js";import{d as _}from"./p-06SzeIsG.js";import{d as x}from"./p-Cr_WB0kg.js";import{d as C}from"./p-DT72kk3I.js";import{d as v}from"./p-BmU3MAfH.js";import{d as E}from"./p-SYK2C-7G.js";import{d as A}from"./p-aZcUXH1b.js";import{d as F}from"./p-CMmvAq1F.js";import{d as R}from"./p-D8faiybE.js";import{d as j}from"./p-CcNA1hkp.js";import{d as D}from"./p-B-BsxOeK.js";import{d as z}from"./p-BBAR0LE7.js";import{d as B}from"./p-DWHcD5b-.js";import{d as L}from"./p-DDV-lx3_.js";import{d as H}from"./p-DR1auS78.js";import{d as T}from"./p-B9s4_6Vm.js";import{d as P}from"./p-CtAGaRd5.js";import{d as q}from"./p-CCqpQJ15.js";import{d as I}from"./p-TfYQFmRD.js";import{d as O}from"./p-C16aqi4P.js";import{d as Q}from"./p-qeQ4j6y4.js";import{d as U}from"./p-2yaxaWU2.js";const M=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.selectedRowsChange=s(this,"selectedRowsChange",3),this.rowClick=s(this,"rowClick",3),this.rowSelected=s(this,"rowSelected",3),this.rowDeselected=s(this,"rowDeselected",3),this.hasRendered=s(this,"hasRendered",3),this.quickFilter=s(this,"quickFilter",3),this.queryChange=s(this,"queryChange",3),this.filter=s(this,"filter",3),this.action=s(this,"action",3),this.pageChange=s(this,"pageChange",3),this.pageSizeChange=s(this,"pageSizeChange",3),this.export=s(this,"export",3),this.emptyStateActionClick=s(this,"emptyStateActionClick",3)}items;loading=!1;headerLoading=!1;footerLoading=!1;amountOfLoadingRows=6;enableRowSelection=!0;rowSelectionLimit;enableRowClick=!0;selectedRows=[];enableFloatingMenu=!0;floatingMenuAmountSelectedTemplate=t=>n((1===t?this._locales.floating_menu?.amount_selected:this._locales.floating_menu?.amount_selected_plural)?.replace("{{amount}}",t));selectedRowsChange;selectionKey;canSelectKey;rowClick;rowSelected;rowDeselected;hasRendered;enableHeader=!0;quickFilters=[];activeQuickFilterIdentifier;enableSearch=!0;query;enableFilter=!0;enableFilterDesktop=!0;selectedFiltersAmount;filterButtonTemplate;enableAction=!1;actionButtonLoading=!1;actionButtonEnabled=!1;actionButtonIcon="pencil";actionButtonText;actionButtonTemplate;quickFilter;queryChange;filter;action;enableFooter=!0;enablePaginationSize=!0;enablePaginationPages=!0;enableExport=!0;page=1;total;pageChange;pageSize=p;pageSizeOptions=m;pageSizeChange;export;hideOnSinglePage=!0;emptyStateHeader=()=>n(this._locales.empty_state?.no_filter.header);emptyStateContent=()=>n(this._locales.empty_state?.no_filter.content);emptyStateAction=()=>n(this._locales.empty_state?.no_filter.action);enableEmptyStateAction=!0;emptyStateFilteredHeader=()=>n(this._locales.empty_state.filtered.header);emptyStateFilteredContent=()=>n(this._locales.empty_state.filtered.content);emptyStateActionClick;shadow=!0;get _el(){return this}_locales={};_extraHeaders=[];_columns=[];_items=[];_enableRowSelection=this.enableRowSelection;_rowSelectionLimit;_rowActionsFloatingAll=[];_rowActionsFloating=[];_rowActionsRow=[];_footerHidden=!1;_ctrlDown=!1;_hasCustomFilterSlot=!1;_hasCustomActionsSlot=!1;_floatingMenuShown=!1;_resizeTimeout;componentWillLoad(){this._hasCustomFilterSlot=!!this._el.querySelector(':scope > [slot="custom-filter"]'),this._hasCustomActionsSlot=!!this._el.querySelector(':scope > [slot="custom-actions"]'),this._setRowSelectionData(),this._setLocales(),this._parseItems(this.items),this._generateExtraHeaders(),this._generateColumns()}componentDidRender(){this.hasRendered.emit()}render(){return a(o,{key:"7ece1479d7c90b408fa55f045feba734f9e27b28",class:"z-0 flex flex-col"},a("p-table-container",{key:"290cf20abdacab6257ebef5479b834df529bccbd"},this.enableHeader&&a("p-table-header",{key:"6a1af71c86b2b23d26d8d344b1528b1356d7bd7b",actionButtonTemplate:this.actionButtonTemplate,actionIcon:this.actionButtonIcon,actionLoading:this.actionButtonLoading,actionText:this.actionButtonText,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,canUseAction:this.actionButtonEnabled,class:"mb-8",enableAction:this.enableAction,enableExport:this.enableExport,enableFilter:this.enableFilter,enableFilterDesktop:this.enableFilterDesktop,enableSearch:this.enableSearch,filterButtonTemplate:this.filterButtonTemplate,itemsSelectedAmount:this.selectedRows?.length,loading:this.headerLoading,query:this.query,quickFilters:this.quickFilters,selectedFiltersAmount:this.selectedFiltersAmount,onAction:()=>this.action.emit(),onExport:()=>this.export.emit(),onFilter:()=>this.filter.emit(),onQueryChange:({detail:t})=>this.queryChange.emit(t),onQuickFilter:({detail:t})=>this.quickFilter.emit(t)},this._hasCustomFilterSlot&&a("slot",{key:"6bfe4727050ba7d6a3e6e280cc1c467259b9166b",name:"custom-filter",slot:"custom-filter"}),this._hasCustomActionsSlot&&a("slot",{key:"da4f2aea31f0daa62749393a0390219fa4342b20",name:"custom-actions",slot:"custom-actions"})),this._getExtraHeader(),this._getHeader(),a("div",{key:"799d65d57bf36a924ff40e6cb9416c4be0da4eaf",class:"flex flex-1 flex-col"},this._getRows(),a("slot",{key:"b0060fa16edf49898787df195c86a35adf397798",name:"custom-rows"})),this.enableFloatingMenu&&this._enableRowSelection?a("p-floating-menu-container",{amount:this.selectedRows?.length,amountSelectedTemplate:this.floatingMenuAmountSelectedTemplate,class:r({hasFooter:this.enableFooter&&!this._footerHidden,active:!!this.selectedRows?.length,shown:this._floatingMenuShown}),enableAmountSelected:!!this._rowActionsFloating?.length,usedInTable:!0,onClose:()=>this._selectAllChange(null,!1)},this._rowActionsFloating?.length&&this._rowActionsFloating.map((t=>a("p-floating-menu-item",{disabled:t.disabled,icon:t.icon,iconFlip:t.iconFlip,iconRotate:t.iconRotate,loading:t.loading,slot:"floating-menu-item",onClick:()=>t.disabled||t.loading||!t.action||"single"!==t.type?t.action(this.selectedRows,!0):t.action(this.selectedRows[0],!1)},t.label)))):"",this.enableFooter&&a("p-table-footer",{key:"57d24f1f3803e58053eba3da5fad1ab6474eccc6",enablePaginationPages:this.enablePaginationPages,enablePaginationSize:this.enablePaginationSize,hideOnSinglePage:this.hideOnSinglePage,loading:this.footerLoading,page:this.page,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,tableHeaderHasAction:this.enableHeader&&this.enableAction&&this.actionButtonEnabled,total:this.total,onHiddenChange:({detail:t})=>this._footerHidden=t,onPageChange:({detail:t})=>this.pageChange.emit(t),onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t)})))}async _setLocales(){this._locales=await l(this._el)}onTableDefinitionUpdated(){this._generateColumns()}keyDown({key:t}){"Control"===t&&!0!==this._ctrlDown&&(this._ctrlDown=!0)}keyUp({key:t}){"Control"===t&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}visibilityChange(){"hidden"===document.visibilityState&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}_parseItems(t){this._items=t?Array.isArray(t)?t:JSON.parse(t):[]}_setRowSelectionData(){this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout((()=>{const t=c(),e=[...this._el.querySelectorAll(":scope > p-table-row-action")];this._rowActionsRow=e.filter((t=>"both"===t.type||"single"===t.type)),this._rowActionsFloatingAll=e.filter((e=>this.enableRowSelection&&("both"===e.type||"multi"===e.type)||t&&"single"===e.type)).map((t=>("single"===t.type&&(t.disabled=this.selectedRows?.length>1),t)));let i=this.rowSelectionLimit;t&&this._rowActionsFloatingAll?.length&&(void 0!==i&&this.enableRowSelection||!this.enableRowSelection)&&(i=1),this._rowSelectionLimit=i;let s=this.enableRowSelection;t&&this._rowActionsFloatingAll?.length&&!s&&(s=!0),this._enableRowSelection=s,this._floatingMenuShown&&this._showFloatingMenu()}),200)}_generateExtraHeaders(){let t=[...this._el.querySelectorAll("p-table-extra-header")];t=this._parseDefinitions(t),this._extraHeaders=t}_generateColumns(){let t=[...this._el.querySelectorAll("p-table-column")];t=this._parseDefinitions(t),this._columns=t}_getExtraHeader(){return this._extraHeaders?.length?a("p-table-row",{isLast:!0,variant:"header-secondary"},this._extraHeaders.map(((t,e)=>a("p-table-cell",{checkboxOffset:0===e&&this._enableRowSelection,definition:t,index:e,variant:"header-secondary"},a("b",null,t.name))))):null}_getHeader(){return a("p-table-row",{variant:"header"},this._columns.map(((t,e)=>a("p-table-cell",{checkbox:0===e||t.hasCheckbox?this._getCheckbox(null,this.loading?"loading":"header"):null,definition:t,index:e,value:t.name,variant:"header"}))))}_getRows(){return this.loading?Array.from({length:this.amountOfLoadingRows},((t,e)=>a("p-table-row",{enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this.amountOfLoadingRows-1},this._getLoadingColumns(e)))):0===this._items.length?this._getEmptyState():this._items.map(((t,e)=>a("p-table-row",{checked:this._selectionContains(e),enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this._items.length-1,onClick:t=>this._rowClick(t,e)},this._getRowColumns(t,e),this._getActions(t,e))))}_getActions(t,e){const i=this._rowActionsRow.filter((e=>!e.showFunction||e.showFunction(t)));return i?.length&&!c()?a("p-table-row-actions-container",{checked:this._selectionContains(e),slot:"actions"},i.map((e=>a("p-tooltip",{content:e.label,strategy:"fixed"},a("p-button",{icon:e.icon,iconFlip:e.iconFlip,iconOnly:!0,iconRotate:e.iconRotate,size:"sm",slot:"trigger",variant:"secondary","data-is-action":!0,onClick:()=>"function"==typeof e.action&&e.action?.(t,!1)}))))):null}_getRowColumns(t,e){return this._columns.map(((i,s)=>a("p-table-cell",{checkbox:0===s||i.hasCheckbox?this._getCheckbox(e):null,definition:i,index:s,item:t,rowIndex:e})))}_getLoadingColumns(t){return this._columns.map(((e,i)=>a("p-table-cell",{checkbox:0===i||e.hasCheckbox?this._getCheckbox(t,"loading"):null,definition:e,index:i,rowIndex:t,variant:"loading"})))}_getCheckbox(t,e="default"){if(!this._enableRowSelection||!this.selectionKey&&!this._rowActionsFloating?.length)return;if("loading"===e)return a("p-loader",{class:"h-6 w-6 rounded",variant:"ghost"});if("header"===e)return a("p-checkbox",{checked:this._selectionContainsAll(),class:h({"opacity-0":void 0!==this._rowSelectionLimit}),disabled:void 0!==this._rowSelectionLimit,indeterminate:this._selectionIndeterminate(),onCheckedChange:t=>this._selectAllChange(t)});const i=this._items[t],s=this._selectionContains(t);return a("p-checkbox",{checked:s,class:"flex-shrink-0",disabled:this.canSelectKey&&!i[this.canSelectKey]||void 0!==this._rowSelectionLimit&&!s&&this.selectedRows.length===this._rowSelectionLimit,onCheckedChange:e=>this._checkboxChange(e,t)})}_getEmptyState(){return a("p-empty-state",this.query?.length||this.selectedFiltersAmount?{class:"my-16 self-center",content:this.emptyStateFilteredContent(),header:this.emptyStateFilteredHeader(),illustration:"search"}:{actionIcon:"plus",actionText:this.emptyStateAction(),class:"my-16 self-center",content:this.emptyStateContent(),enableAction:this.enableEmptyStateAction,header:this.emptyStateHeader(),illustration:"table",onAction:()=>this.enableAction&&this.action.emit()})}_selectAllChange(t,e){if(this._enableRowSelection){if(void 0===e?t?.detail??e:e){const t=[];for(let e=0;e<this._items.length;e++){const i=this._items[e];if((!this.canSelectKey||i[this.canSelectKey])&&!this._selectionContains(e)&&(t.push(i),this.rowSelected.emit(i),void 0!==this._rowSelectionLimit&&this.selectedRows.length+t.length===this._rowSelectionLimit))break}return this.selectedRows=[...this.selectedRows,...t],this.selectedRowsChange.emit(this.selectedRows),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu())}for(let t=0;t<this.selectedRows.length;t++){const e=this.selectedRows[t],i=this._items.find((i=>this._getSelectionValue(i,t)===this._getSelectionValue(e,t)));i&&this.rowDeselected.emit(i)}this.selectedRows=[],this.selectedRowsChange.emit(this.selectedRows)}}_checkboxChange({detail:t,target:e},i){if(!this._enableRowSelection)return;if(t&&void 0!==this._rowSelectionLimit&&this.selectedRows.length>=this._rowSelectionLimit)return void(e.checked=!1);const s=this._items[i];if(this.canSelectKey&&!s[this.canSelectKey])return void(e.checked=!1);if(t)return this.selectedRows=[...this.selectedRows,{...s,index:i}],this.selectedRowsChange.emit(this.selectedRows),this.rowSelected.emit(s),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu());const a=this._selectionContains(i,!0),o=[...this.selectedRows];o.splice(a,1),this.selectedRows=o,this.selectedRowsChange.emit(this.selectedRows),this.rowDeselected.emit(s)}_getSelectionValue(t,e){return this.selectionKey&&t?.[this.selectionKey]||e}_selectionContains(t,e=!1){const i=this.selectedRows.findIndex((e=>e.index===t));return e?i:-1!==i}_selectionContainsAll(){let t=!0;if(!this._items?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!0;for(let e=0;e<this._items?.length;e++)if(!this._selectionContains(e)){t=!1;break}return t}_selectionIndeterminate(){if(!this._items?.length||!this.selectedRows?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!1;let t=0;for(let e=0;e<this._items?.length;e++)this._selectionContains(e)&&t++;return t>0&&t!==this._items.length}_rowClick(t,e){const i=t.target;if("input"===i.tagName.toLowerCase()||"checkbox"===i.type)return;const s=this._findRow(t.target);if(this._findRowAction(t.target))return;if(this.enableRowClick)return void this.rowClick.emit({item:this._items[e],ctrlDown:this._ctrlDown});if(!this._enableRowSelection)return;const a=s?.querySelector('input[type="checkbox"]');a&&(a.checked=!a.checked,this._checkboxChange(a,e))}_findRow(t){return t?"p-table-row"===t?.tagName?.toLowerCase()?t:this._findRow(t?.parentElement):t}_findRowAction(t){return t?null!==t.dataset.isAction&&"false"!==t.dataset.isAction?t:"p-table-row"===t?.tagName?.toLowerCase()?null:this._findRowAction(t?.parentElement):null}_showFloatingMenu(){let t=this._rowActionsFloatingAll;1===this.rowSelectionLimit&&t.some((t=>("single"===t.type||"both"===t.type)&&t.showFunction))&&(t=t.filter((t=>"multi"===t.type||!t.showFunction||t.showFunction(this.selectedRows[0])))),this._rowActionsFloating=t,this._floatingMenuShown=!0}_parseDefinitions(t){return t.map((t=>this._parseDefinitionSizes(t)))}_parseDefinitionSizes(t){const e=t;let i={default:"full"};"string"!=typeof t.sizes||["auto","hidden","full"].includes(t.sizes)||(t.sizes=JSON.parse(t.sizes));for(const[t,s]of d.entries())i[s]="auto"!==e.sizes&&"hidden"!==e.sizes&&"full"!==e.sizes&&"number"!=typeof e.sizes?e.sizes[s]??i[d[t-1]]:"auto"===e.sizes?"full":e.sizes;return t.parsedSizes=i,t}static get watchers(){return{items:[{_parseItems:0}],enableRowSelection:[{_setRowSelectionData:0}],rowSelectionLimit:[{_setRowSelectionData:0}],selectedRows:[{_setRowSelectionData:0}]}}static get style(){return"*{box-sizing:border-box}.static{position:static}.fixed{position:fixed}.z-0{z-index:0}.my-16{margin-bottom:4rem;margin-top:4rem}.mb-8{margin-bottom:2rem}.flex{display:flex}.table{display:table}.hidden{display:none}.h-6{height:1.5rem}.w-6{width:1.5rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.resize{resize:both}.flex-col{flex-direction:column}.self-center{align-self:center}.rounded{border-radius:.25rem}.opacity-0{opacity:0}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}"}},[772,"p-table",{items:[1],loading:[4],headerLoading:[4,"header-loading"],footerLoading:[4,"footer-loading"],amountOfLoadingRows:[2,"amount-of-loading-rows"],enableRowSelection:[4,"enable-row-selection"],rowSelectionLimit:[2,"row-selection-limit"],enableRowClick:[4,"enable-row-click"],selectedRows:[16],enableFloatingMenu:[4,"enable-floating-menu"],floatingMenuAmountSelectedTemplate:[16],selectionKey:[1,"selection-key"],canSelectKey:[1,"can-select-key"],enableHeader:[4,"enable-header"],quickFilters:[1,"quick-filters"],activeQuickFilterIdentifier:[1,"active-quick-filter-identifier"],enableSearch:[4,"enable-search"],query:[1025],enableFilter:[4,"enable-filter"],enableFilterDesktop:[4,"enable-filter-desktop"],selectedFiltersAmount:[2,"selected-filters-amount"],filterButtonTemplate:[16],enableAction:[4,"enable-action"],actionButtonLoading:[4,"action-button-loading"],actionButtonEnabled:[4,"action-button-enabled"],actionButtonIcon:[1,"action-button-icon"],actionButtonText:[1,"action-button-text"],actionButtonTemplate:[16],enableFooter:[4,"enable-footer"],enablePaginationSize:[4,"enable-pagination-size"],enablePaginationPages:[4,"enable-pagination-pages"],enableExport:[4,"enable-export"],page:[1538],total:[2],pageSize:[2,"page-size"],pageSizeOptions:[16],hideOnSinglePage:[4,"hide-on-single-page"],emptyStateHeader:[16],emptyStateContent:[16],emptyStateAction:[16],enableEmptyStateAction:[4,"enable-empty-state-action"],emptyStateFilteredHeader:[16],emptyStateFilteredContent:[16],shadow:[4],_locales:[32],_extraHeaders:[32],_columns:[32],_items:[32],_enableRowSelection:[32],_rowSelectionLimit:[32],_rowActionsFloating:[32],_rowActionsRow:[32],_footerHidden:[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"],[9,"resize","_setRowSelectionData"]],{items:[{_parseItems:0}],enableRowSelection:[{_setRowSelectionData:0}],rowSelectionLimit:[{_setRowSelectionData:0}],selectedRows:[{_setRowSelectionData:0}]}]);function W(){"undefined"!=typeof customElements&&["p-table","p-badge","p-button","p-checkbox","p-divider","p-dropdown","p-dropdown-menu-container","p-dropdown-menu-item","p-empty-state","p-field","p-field-container","p-floating-menu-container","p-floating-menu-item","p-helper","p-icon","p-illustration","p-loader","p-pagination","p-pagination-pages","p-pagination-pages-item","p-pagination-size","p-segment-container","p-segment-item","p-table-cell","p-table-container","p-table-footer","p-table-header","p-table-row","p-table-row-actions-container","p-tooltip"].forEach((e=>{switch(e){case"p-table":customElements.get(t(e))||customElements.define(t(e),M);break;case"p-badge":customElements.get(t(e))||u();break;case"p-button":customElements.get(t(e))||b();break;case"p-checkbox":customElements.get(t(e))||f();break;case"p-divider":customElements.get(t(e))||g();break;case"p-dropdown":customElements.get(t(e))||k();break;case"p-dropdown-menu-container":customElements.get(t(e))||w();break;case"p-dropdown-menu-item":customElements.get(t(e))||y();break;case"p-empty-state":customElements.get(t(e))||S();break;case"p-field":customElements.get(t(e))||_();break;case"p-field-container":customElements.get(t(e))||x();break;case"p-floating-menu-container":customElements.get(t(e))||C();break;case"p-floating-menu-item":customElements.get(t(e))||v();break;case"p-helper":customElements.get(t(e))||E();break;case"p-icon":customElements.get(t(e))||A();break;case"p-illustration":customElements.get(t(e))||F();break;case"p-loader":customElements.get(t(e))||R();break;case"p-pagination":customElements.get(t(e))||j();break;case"p-pagination-pages":customElements.get(t(e))||D();break;case"p-pagination-pages-item":customElements.get(t(e))||z();break;case"p-pagination-size":customElements.get(t(e))||B();break;case"p-segment-container":customElements.get(t(e))||L();break;case"p-segment-item":customElements.get(t(e))||H();break;case"p-table-cell":customElements.get(t(e))||T();break;case"p-table-container":customElements.get(t(e))||P();break;case"p-table-footer":customElements.get(t(e))||q();break;case"p-table-header":customElements.get(t(e))||I();break;case"p-table-row":customElements.get(t(e))||O();break;case"p-table-row-actions-container":customElements.get(t(e))||Q();break;case"p-tooltip":customElements.get(t(e))||U()}}))}W();const K=M,N=W;export{K as PTable,N as defineCustomElement}
|
|
1
|
+
import{t,p as e,H as i,c as s,h as a,d as o}from"./p-CySg37XO.js";import{f as n,g as l}from"./p-CwQG70_4.js";import{f as r}from"./p-WEZng7dj.js";import{f as c}from"./p-CWO2YJCh.js";import{c as h}from"./p-xs4N_Y-0.js";import{P as p,a as m,T as d}from"./p-CEaB2BT0.js";import{d as u}from"./p-Crasy6LB.js";import{d as b}from"./p-AkD55vN_.js";import{d as f}from"./p-ShAy0ruV.js";import{d as g}from"./p-DP6H82uQ.js";import{d as k}from"./p-N5WuUoFr.js";import{d as w}from"./p-BtH8h7p9.js";import{d as y}from"./p-DlQumf-0.js";import{d as S}from"./p-nGuULFe2.js";import{d as _}from"./p-06SzeIsG.js";import{d as x}from"./p-Cr_WB0kg.js";import{d as C}from"./p-DT72kk3I.js";import{d as v}from"./p-BmU3MAfH.js";import{d as E}from"./p-SYK2C-7G.js";import{d as A}from"./p-aZcUXH1b.js";import{d as F}from"./p-CMmvAq1F.js";import{d as R}from"./p-D8faiybE.js";import{d as j}from"./p-CcNA1hkp.js";import{d as D}from"./p-B-BsxOeK.js";import{d as z}from"./p-BBAR0LE7.js";import{d as B}from"./p-DWHcD5b-.js";import{d as L}from"./p-DDV-lx3_.js";import{d as H}from"./p-DR1auS78.js";import{d as T}from"./p-B9s4_6Vm.js";import{d as P}from"./p-CtAGaRd5.js";import{d as I}from"./p-CrAZWi4n.js";import{d as q}from"./p-TfYQFmRD.js";import{d as O}from"./p-C16aqi4P.js";import{d as Q}from"./p-qeQ4j6y4.js";import{d as U}from"./p-2yaxaWU2.js";const M=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.selectedRowsChange=s(this,"selectedRowsChange",3),this.rowClick=s(this,"rowClick",3),this.rowSelected=s(this,"rowSelected",3),this.rowDeselected=s(this,"rowDeselected",3),this.hasRendered=s(this,"hasRendered",3),this.quickFilter=s(this,"quickFilter",3),this.queryChange=s(this,"queryChange",3),this.filter=s(this,"filter",3),this.action=s(this,"action",3),this.pageChange=s(this,"pageChange",3),this.pageSizeChange=s(this,"pageSizeChange",3),this.export=s(this,"export",3),this.emptyStateActionClick=s(this,"emptyStateActionClick",3)}items;loading=!1;headerLoading=!1;footerLoading=!1;amountOfLoadingRows=6;enableRowSelection=!0;rowSelectionLimit;enableRowClick=!0;selectedRows=[];enableFloatingMenu=!0;floatingMenuAmountSelectedTemplate=t=>n((1===t?this._locales.floating_menu?.amount_selected:this._locales.floating_menu?.amount_selected_plural)?.replace("{{amount}}",t));selectedRowsChange;selectionKey;canSelectKey;rowClick;rowSelected;rowDeselected;hasRendered;enableHeader=!0;quickFilters=[];activeQuickFilterIdentifier;enableSearch=!0;query;enableFilter=!0;enableFilterDesktop=!0;selectedFiltersAmount;filterButtonTemplate;enableAction=!1;actionButtonLoading=!1;actionButtonEnabled=!1;actionButtonIcon="pencil";actionButtonText;actionButtonTemplate;quickFilter;queryChange;filter;action;enableFooter=!0;enablePaginationSize=!0;enablePaginationPages=!0;enableExport=!0;page=1;total;pageChange;pageSize=p;pageSizeOptions=m;pageSizeChange;export;hideOnSinglePage=!0;emptyStateHeader=()=>n(this._locales.empty_state?.no_filter.header);emptyStateContent=()=>n(this._locales.empty_state?.no_filter.content);emptyStateAction=()=>n(this._locales.empty_state?.no_filter.action);enableEmptyStateAction=!0;emptyStateFilteredHeader=()=>n(this._locales.empty_state.filtered.header);emptyStateFilteredContent=()=>n(this._locales.empty_state.filtered.content);emptyStateActionClick;shadow=!0;get _el(){return this}_locales={};_extraHeaders=[];_columns=[];_items=[];_enableRowSelection=this.enableRowSelection;_rowSelectionLimit;_rowActionsFloatingAll=[];_rowActionsFloating=[];_rowActionsRow=[];_footerHidden=!1;_ctrlDown=!1;_hasCustomFilterSlot=!1;_hasCustomActionsSlot=!1;_floatingMenuShown=!1;_resizeTimeout;componentWillLoad(){this._hasCustomFilterSlot=!!this._el.querySelector(':scope > [slot="custom-filter"]'),this._hasCustomActionsSlot=!!this._el.querySelector(':scope > [slot="custom-actions"]'),this._setRowSelectionData(),this._setLocales(),this._parseItems(this.items),this._generateExtraHeaders(),this._generateColumns()}componentDidRender(){this.hasRendered.emit()}render(){return a(o,{key:"7ece1479d7c90b408fa55f045feba734f9e27b28",class:"z-0 flex flex-col"},a("p-table-container",{key:"290cf20abdacab6257ebef5479b834df529bccbd"},this.enableHeader&&a("p-table-header",{key:"6a1af71c86b2b23d26d8d344b1528b1356d7bd7b",actionButtonTemplate:this.actionButtonTemplate,actionIcon:this.actionButtonIcon,actionLoading:this.actionButtonLoading,actionText:this.actionButtonText,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,canUseAction:this.actionButtonEnabled,class:"mb-8",enableAction:this.enableAction,enableExport:this.enableExport,enableFilter:this.enableFilter,enableFilterDesktop:this.enableFilterDesktop,enableSearch:this.enableSearch,filterButtonTemplate:this.filterButtonTemplate,itemsSelectedAmount:this.selectedRows?.length,loading:this.headerLoading,query:this.query,quickFilters:this.quickFilters,selectedFiltersAmount:this.selectedFiltersAmount,onAction:()=>this.action.emit(),onExport:()=>this.export.emit(),onFilter:()=>this.filter.emit(),onQueryChange:({detail:t})=>this.queryChange.emit(t),onQuickFilter:({detail:t})=>this.quickFilter.emit(t)},this._hasCustomFilterSlot&&a("slot",{key:"6bfe4727050ba7d6a3e6e280cc1c467259b9166b",name:"custom-filter",slot:"custom-filter"}),this._hasCustomActionsSlot&&a("slot",{key:"da4f2aea31f0daa62749393a0390219fa4342b20",name:"custom-actions",slot:"custom-actions"})),this._getExtraHeader(),this._getHeader(),a("div",{key:"799d65d57bf36a924ff40e6cb9416c4be0da4eaf",class:"flex flex-1 flex-col"},this._getRows(),a("slot",{key:"b0060fa16edf49898787df195c86a35adf397798",name:"custom-rows"})),this.enableFloatingMenu&&this._enableRowSelection?a("p-floating-menu-container",{amount:this.selectedRows?.length,amountSelectedTemplate:this.floatingMenuAmountSelectedTemplate,class:r({hasFooter:this.enableFooter&&!this._footerHidden,active:!!this.selectedRows?.length,shown:this._floatingMenuShown}),enableAmountSelected:!!this._rowActionsFloating?.length,usedInTable:!0,onClose:()=>this._selectAllChange(null,!1)},this._rowActionsFloating?.length&&this._rowActionsFloating.map((t=>a("p-floating-menu-item",{disabled:t.disabled,icon:t.icon,iconFlip:t.iconFlip,iconRotate:t.iconRotate,loading:t.loading,slot:"floating-menu-item",onClick:()=>t.disabled||t.loading||!t.action||"single"!==t.type?t.action(this.selectedRows,!0):t.action(this.selectedRows[0],!1)},t.label)))):"",this.enableFooter&&a("p-table-footer",{key:"57d24f1f3803e58053eba3da5fad1ab6474eccc6",enablePaginationPages:this.enablePaginationPages,enablePaginationSize:this.enablePaginationSize,hideOnSinglePage:this.hideOnSinglePage,loading:this.footerLoading,page:this.page,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,tableHeaderHasAction:this.enableHeader&&this.enableAction&&this.actionButtonEnabled,total:this.total,onHiddenChange:({detail:t})=>this._footerHidden=t,onPageChange:({detail:t})=>this.pageChange.emit(t),onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t)})))}async _setLocales(){this._locales=await l(this._el)}onTableDefinitionUpdated(){this._generateColumns()}keyDown({key:t}){"Control"===t&&!0!==this._ctrlDown&&(this._ctrlDown=!0)}keyUp({key:t}){"Control"===t&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}visibilityChange(){"hidden"===document.visibilityState&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}_parseItems(t){this._items=t?Array.isArray(t)?t:JSON.parse(t):[]}_setRowSelectionData(){this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout((()=>{const t=c(),e=[...this._el.querySelectorAll(":scope > p-table-row-action")];this._rowActionsRow=e.filter((t=>"both"===t.type||"single"===t.type)),this._rowActionsFloatingAll=e.filter((e=>this.enableRowSelection&&("both"===e.type||"multi"===e.type)||t&&"single"===e.type)).map((t=>("single"===t.type&&(t.disabled=this.selectedRows?.length>1),t)));let i=this.rowSelectionLimit;t&&this._rowActionsFloatingAll?.length&&(void 0!==i&&this.enableRowSelection||!this.enableRowSelection)&&(i=1),this._rowSelectionLimit=i;let s=this.enableRowSelection;t&&this._rowActionsFloatingAll?.length&&!s&&(s=!0),this._enableRowSelection=s,this._floatingMenuShown&&this._showFloatingMenu()}),200)}_generateExtraHeaders(){let t=[...this._el.querySelectorAll("p-table-extra-header")];t=this._parseDefinitions(t),this._extraHeaders=t}_generateColumns(){let t=[...this._el.querySelectorAll("p-table-column")];t=this._parseDefinitions(t),this._columns=t}_getExtraHeader(){return this._extraHeaders?.length?a("p-table-row",{isLast:!0,variant:"header-secondary"},this._extraHeaders.map(((t,e)=>a("p-table-cell",{checkboxOffset:0===e&&this._enableRowSelection,definition:t,index:e,variant:"header-secondary"},a("b",null,t.name))))):null}_getHeader(){return a("p-table-row",{variant:"header"},this._columns.map(((t,e)=>a("p-table-cell",{checkbox:0===e||t.hasCheckbox?this._getCheckbox(null,this.loading?"loading":"header"):null,definition:t,index:e,value:t.name,variant:"header"}))))}_getRows(){return this.loading?Array.from({length:this.amountOfLoadingRows},((t,e)=>a("p-table-row",{enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this.amountOfLoadingRows-1},this._getLoadingColumns(e)))):0===this._items.length?this._getEmptyState():this._items.map(((t,e)=>a("p-table-row",{checked:this._selectionContains(e),enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this._items.length-1,onClick:t=>this._rowClick(t,e)},this._getRowColumns(t,e),this._getActions(t,e))))}_getActions(t,e){const i=this._rowActionsRow.filter((e=>!e.showFunction||e.showFunction(t)));return i?.length&&!c()?a("p-table-row-actions-container",{checked:this._selectionContains(e),slot:"actions"},i.map((e=>a("p-tooltip",{content:e.label,strategy:"fixed"},a("p-button",{icon:e.icon,iconFlip:e.iconFlip,iconOnly:!0,iconRotate:e.iconRotate,size:"sm",slot:"trigger",variant:"secondary","data-is-action":!0,onClick:()=>"function"==typeof e.action&&e.action?.(t,!1)}))))):null}_getRowColumns(t,e){return this._columns.map(((i,s)=>a("p-table-cell",{checkbox:0===s||i.hasCheckbox?this._getCheckbox(e):null,definition:i,index:s,item:t,rowIndex:e})))}_getLoadingColumns(t){return this._columns.map(((e,i)=>a("p-table-cell",{checkbox:0===i||e.hasCheckbox?this._getCheckbox(t,"loading"):null,definition:e,index:i,rowIndex:t,variant:"loading"})))}_getCheckbox(t,e="default"){if(!this._enableRowSelection||!this.selectionKey&&!this._rowActionsFloating?.length)return;if("loading"===e)return a("p-loader",{class:"h-6 w-6 rounded",variant:"ghost"});if("header"===e)return a("p-checkbox",{checked:this._selectionContainsAll(),class:h({"opacity-0":void 0!==this._rowSelectionLimit}),disabled:void 0!==this._rowSelectionLimit,indeterminate:this._selectionIndeterminate(),onCheckedChange:t=>this._selectAllChange(t)});const i=this._items[t],s=this._selectionContains(t);return a("p-checkbox",{checked:s,class:"flex-shrink-0",disabled:this.canSelectKey&&!i[this.canSelectKey]||void 0!==this._rowSelectionLimit&&!s&&this.selectedRows.length===this._rowSelectionLimit,onCheckedChange:e=>this._checkboxChange(e,t)})}_getEmptyState(){return a("p-empty-state",this.query?.length||this.selectedFiltersAmount?{class:"my-16 self-center",content:this.emptyStateFilteredContent(),header:this.emptyStateFilteredHeader(),illustration:"search"}:{actionIcon:"plus",actionText:this.emptyStateAction(),class:"my-16 self-center",content:this.emptyStateContent(),enableAction:this.enableEmptyStateAction,header:this.emptyStateHeader(),illustration:"table",onAction:()=>this.enableAction&&this.action.emit()})}_selectAllChange(t,e){if(this._enableRowSelection){if(void 0===e?t?.detail??e:e){const t=[];for(let e=0;e<this._items.length;e++){const i=this._items[e];if((!this.canSelectKey||i[this.canSelectKey])&&!this._selectionContains(e)&&(t.push(i),this.rowSelected.emit(i),void 0!==this._rowSelectionLimit&&this.selectedRows.length+t.length===this._rowSelectionLimit))break}return this.selectedRows=[...this.selectedRows,...t],this.selectedRowsChange.emit(this.selectedRows),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu())}for(let t=0;t<this.selectedRows.length;t++){const e=this.selectedRows[t],i=this._items.find((i=>this._getSelectionValue(i,t)===this._getSelectionValue(e,t)));i&&this.rowDeselected.emit(i)}this.selectedRows=[],this.selectedRowsChange.emit(this.selectedRows)}}_checkboxChange({detail:t,target:e},i){if(!this._enableRowSelection)return;if(t&&void 0!==this._rowSelectionLimit&&this.selectedRows.length>=this._rowSelectionLimit)return void(e.checked=!1);const s=this._items[i];if(this.canSelectKey&&!s[this.canSelectKey])return void(e.checked=!1);if(t)return this.selectedRows=[...this.selectedRows,{...s,index:i}],this.selectedRowsChange.emit(this.selectedRows),this.rowSelected.emit(s),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu());const a=this._selectionContains(i,!0),o=[...this.selectedRows];o.splice(a,1),this.selectedRows=o,this.selectedRowsChange.emit(this.selectedRows),this.rowDeselected.emit(s)}_getSelectionValue(t,e){return this.selectionKey&&t?.[this.selectionKey]||e}_selectionContains(t,e=!1){const i=this.selectedRows.findIndex((e=>e.index===t));return e?i:-1!==i}_selectionContainsAll(){let t=!0;if(!this._items?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!0;for(let e=0;e<this._items?.length;e++)if(!this._selectionContains(e)){t=!1;break}return t}_selectionIndeterminate(){if(!this._items?.length||!this.selectedRows?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!1;let t=0;for(let e=0;e<this._items?.length;e++)this._selectionContains(e)&&t++;return t>0&&t!==this._items.length}_rowClick(t,e){const i=t.target;if("input"===i.tagName.toLowerCase()||"checkbox"===i.type)return;const s=this._findRow(t.target);if(this._findRowAction(t.target))return;if(this.enableRowClick)return void this.rowClick.emit({item:this._items[e],ctrlDown:this._ctrlDown});if(!this._enableRowSelection)return;const a=s?.querySelector('input[type="checkbox"]');a&&(a.checked=!a.checked,this._checkboxChange(a,e))}_findRow(t){return t?"p-table-row"===t?.tagName?.toLowerCase()?t:this._findRow(t?.parentElement):t}_findRowAction(t){return t?null!==t.dataset.isAction&&"false"!==t.dataset.isAction?t:"p-table-row"===t?.tagName?.toLowerCase()?null:this._findRowAction(t?.parentElement):null}_showFloatingMenu(){let t=this._rowActionsFloatingAll;1===this.rowSelectionLimit&&t.some((t=>("single"===t.type||"both"===t.type)&&t.showFunction))&&(t=t.filter((t=>"multi"===t.type||!t.showFunction||t.showFunction(this.selectedRows[0])))),this._rowActionsFloating=t,this._floatingMenuShown=!0}_parseDefinitions(t){return t.map((t=>this._parseDefinitionSizes(t)))}_parseDefinitionSizes(t){const e=t;let i={default:"full"};"string"!=typeof t.sizes||["auto","hidden","full"].includes(t.sizes)||(t.sizes=JSON.parse(t.sizes));for(const[t,s]of d.entries())i[s]="auto"!==e.sizes&&"hidden"!==e.sizes&&"full"!==e.sizes&&"number"!=typeof e.sizes?e.sizes[s]??i[d[t-1]]:"auto"===e.sizes?"full":e.sizes;return t.parsedSizes=i,t}static get watchers(){return{items:[{_parseItems:0}],enableRowSelection:[{_setRowSelectionData:0}],rowSelectionLimit:[{_setRowSelectionData:0}],selectedRows:[{_setRowSelectionData:0}]}}static get style(){return"*{box-sizing:border-box}.static{position:static}.fixed{position:fixed}.z-0{z-index:0}.my-16{margin-bottom:4rem;margin-top:4rem}.mb-8{margin-bottom:2rem}.flex{display:flex}.table{display:table}.hidden{display:none}.h-6{height:1.5rem}.w-6{width:1.5rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.resize{resize:both}.flex-col{flex-direction:column}.self-center{align-self:center}.rounded{border-radius:.25rem}.opacity-0{opacity:0}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}"}},[772,"p-table",{items:[1],loading:[4],headerLoading:[4,"header-loading"],footerLoading:[4,"footer-loading"],amountOfLoadingRows:[2,"amount-of-loading-rows"],enableRowSelection:[4,"enable-row-selection"],rowSelectionLimit:[2,"row-selection-limit"],enableRowClick:[4,"enable-row-click"],selectedRows:[16],enableFloatingMenu:[4,"enable-floating-menu"],floatingMenuAmountSelectedTemplate:[16],selectionKey:[1,"selection-key"],canSelectKey:[1,"can-select-key"],enableHeader:[4,"enable-header"],quickFilters:[1,"quick-filters"],activeQuickFilterIdentifier:[1,"active-quick-filter-identifier"],enableSearch:[4,"enable-search"],query:[1025],enableFilter:[4,"enable-filter"],enableFilterDesktop:[4,"enable-filter-desktop"],selectedFiltersAmount:[2,"selected-filters-amount"],filterButtonTemplate:[16],enableAction:[4,"enable-action"],actionButtonLoading:[4,"action-button-loading"],actionButtonEnabled:[4,"action-button-enabled"],actionButtonIcon:[1,"action-button-icon"],actionButtonText:[1,"action-button-text"],actionButtonTemplate:[16],enableFooter:[4,"enable-footer"],enablePaginationSize:[4,"enable-pagination-size"],enablePaginationPages:[4,"enable-pagination-pages"],enableExport:[4,"enable-export"],page:[1538],total:[2],pageSize:[2,"page-size"],pageSizeOptions:[16],hideOnSinglePage:[4,"hide-on-single-page"],emptyStateHeader:[16],emptyStateContent:[16],emptyStateAction:[16],enableEmptyStateAction:[4,"enable-empty-state-action"],emptyStateFilteredHeader:[16],emptyStateFilteredContent:[16],shadow:[4],_locales:[32],_extraHeaders:[32],_columns:[32],_items:[32],_enableRowSelection:[32],_rowSelectionLimit:[32],_rowActionsFloating:[32],_rowActionsRow:[32],_footerHidden:[32]},[[16,"localeChanged","_setLocales"],[16,"tableDefinitionChanged","onTableDefinitionUpdated"],[4,"keydown","keyDown"],[4,"keyup","keyUp"],[4,"visibilitychange","visibilityChange"],[9,"resize","_setRowSelectionData"]],{items:[{_parseItems:0}],enableRowSelection:[{_setRowSelectionData:0}],rowSelectionLimit:[{_setRowSelectionData:0}],selectedRows:[{_setRowSelectionData:0}]}]);function W(){"undefined"!=typeof customElements&&["p-table","p-badge","p-button","p-checkbox","p-divider","p-dropdown","p-dropdown-menu-container","p-dropdown-menu-item","p-empty-state","p-field","p-field-container","p-floating-menu-container","p-floating-menu-item","p-helper","p-icon","p-illustration","p-loader","p-pagination","p-pagination-pages","p-pagination-pages-item","p-pagination-size","p-segment-container","p-segment-item","p-table-cell","p-table-container","p-table-footer","p-table-header","p-table-row","p-table-row-actions-container","p-tooltip"].forEach((e=>{switch(e){case"p-table":customElements.get(t(e))||customElements.define(t(e),M);break;case"p-badge":customElements.get(t(e))||u();break;case"p-button":customElements.get(t(e))||b();break;case"p-checkbox":customElements.get(t(e))||f();break;case"p-divider":customElements.get(t(e))||g();break;case"p-dropdown":customElements.get(t(e))||k();break;case"p-dropdown-menu-container":customElements.get(t(e))||w();break;case"p-dropdown-menu-item":customElements.get(t(e))||y();break;case"p-empty-state":customElements.get(t(e))||S();break;case"p-field":customElements.get(t(e))||_();break;case"p-field-container":customElements.get(t(e))||x();break;case"p-floating-menu-container":customElements.get(t(e))||C();break;case"p-floating-menu-item":customElements.get(t(e))||v();break;case"p-helper":customElements.get(t(e))||E();break;case"p-icon":customElements.get(t(e))||A();break;case"p-illustration":customElements.get(t(e))||F();break;case"p-loader":customElements.get(t(e))||R();break;case"p-pagination":customElements.get(t(e))||j();break;case"p-pagination-pages":customElements.get(t(e))||D();break;case"p-pagination-pages-item":customElements.get(t(e))||z();break;case"p-pagination-size":customElements.get(t(e))||B();break;case"p-segment-container":customElements.get(t(e))||L();break;case"p-segment-item":customElements.get(t(e))||H();break;case"p-table-cell":customElements.get(t(e))||T();break;case"p-table-container":customElements.get(t(e))||P();break;case"p-table-footer":customElements.get(t(e))||I();break;case"p-table-header":customElements.get(t(e))||q();break;case"p-table-row":customElements.get(t(e))||O();break;case"p-table-row-actions-container":customElements.get(t(e))||Q();break;case"p-tooltip":customElements.get(t(e))||U()}}))}W();const K=M,N=W;export{K as PTable,N as defineCustomElement}
|
|
@@ -378,7 +378,7 @@ const TableFooter = class {
|
|
|
378
378
|
const rect = this._el.getBoundingClientRect();
|
|
379
379
|
const modal = this._el.closest('p-modal');
|
|
380
380
|
const layout = document.querySelector('p-layout');
|
|
381
|
-
if (modal) {
|
|
381
|
+
if (modal && !this._hidden) {
|
|
382
382
|
const modalBody = modal.shadowRoot.querySelector('p-modal-body');
|
|
383
383
|
const innerContent = modalBody.shadowRoot.querySelector('div');
|
|
384
384
|
const innerContentComputed = getComputedStyle(innerContent);
|
|
@@ -386,7 +386,7 @@ const TableFooter = class {
|
|
|
386
386
|
this._el.style.bottom = `-${modalPaddingBottom}px`;
|
|
387
387
|
this._el.style.marginBottom = `-${modalPaddingBottom - 1}px`;
|
|
388
388
|
}
|
|
389
|
-
if (layout && !modal) {
|
|
389
|
+
if (layout && !modal && !this._hidden) {
|
|
390
390
|
const innerContent = layout.shadowRoot.querySelector('.content');
|
|
391
391
|
const innerContentComputed = getComputedStyle(innerContent);
|
|
392
392
|
const layoutPaddingBottom = Number.parseInt(innerContentComputed.paddingBottom, 10);
|
|
@@ -49,7 +49,7 @@ const ModalBody = class {
|
|
|
49
49
|
};
|
|
50
50
|
ModalBody.style = modalBodyComponentCss();
|
|
51
51
|
|
|
52
|
-
const modalContainerComponentCss = () => `.flex{display:flex}.w-full{width:100%}.justify-center{justify-content:center}*{box-sizing:border-box}:host{display:flex;justify-content:center;width:100%}@media (min-width:64rem){:host{margin:auto}}.pointer-events-none{pointer-events:none}.static{position:static}.z-modal{z-index:600}.max-h-\\[calc\\(100dvh-4rem\\)\\]{max-height:calc(100dvh - 4rem)}.min-w-0{min-width:0}.flex-1{flex:1 1 0%}@keyframes slideInBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}.animate-slide-in-bottom{animation:slideInBottom .5s ease forwards}@keyframes slideOutBottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}.animate-slide-out-bottom{animation:slideOutBottom .5s ease forwards}.flex-col{flex-direction:column}.rounded-b-none{border-bottom-left-radius:0;border-bottom-right-radius:0}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.shadow-modal{--tw-shadow:0 0 0 1px rgba(0,2,2,.1),0 1px 1px 0 rgba(0,2,2,.2),0 2px 2px 0 rgba(0,2,2,.08),0 4px 4px 0 rgba(0,2,2,.08),0 8px 8px 0 rgba(0,2,2,.08);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color),0 1px 1px 0 var(--tw-shadow-color),0 2px 2px 0 var(--tw-shadow-color),0 4px 4px 0 var(--tw-shadow-color),0 8px 8px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}@media (min-width:40rem){.tablet\\:max-w-\\[20rem\\]{max-width:20rem}.tablet\\:max-w-\\[35rem\\]{max-width:35rem}.tablet\\:max-w-\\[41rem\\]{max-width:41rem}.tablet\\:max-w-\\[45rem\\]{max-width:45rem}.tablet\\:max-w-\\[65rem\\]{max-width:65rem}}@media (min-width:64rem){@keyframes slideInBottomSmall{0%{transform:translateY(20%)}to{transform:translateY(0)}}.desktop-xs\\:animate-slide-in-bottom-small{animation:slideInBottomSmall .5s ease forwards}@keyframes slideOutBottomSmall{0%{transform:translateY(0)}to{transform:translateY(20%)}}.desktop-xs\\:animate-slide-out-bottom-small{animation:slideOutBottomSmall .5s ease forwards}.desktop-xs\\:rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}}.dark\\:border:where(:host([data-theme=dark]),:host([data-theme=dark]) *){border-width:1px}.dark\\:border-solid:where(:host([data-theme=dark]),:host([data-theme=dark]) *){border-style:solid}.dark\\:border-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-border-opacity:1;border-color:rgb(70 75 84/var(--tw-border-opacity,1))}.dark\\:border:where([data-theme=dark],[data-theme=dark] *){border-width:1px}.dark\\:border-solid:where([data-theme=dark],[data-theme=dark] *){border-style:solid}.dark\\:border-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-border-opacity:1;border-color:rgb(70 75 84/var(--tw-border-opacity,1))}`;
|
|
52
|
+
const modalContainerComponentCss = () => `.flex{display:flex}.w-full{width:100%}.justify-center{justify-content:center}*{box-sizing:border-box}:host{display:flex;justify-content:center;width:100%}@media (min-width:64rem){:host{margin:auto}}.pointer-events-none{pointer-events:none}.static{position:static}.z-modal{z-index:600}.max-h-\\[calc\\(100dvh-4rem\\)\\]{max-height:calc(100dvh - 4rem)}.min-w-0{min-width:0}.flex-1{flex:1 1 0%}@keyframes slideInBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}.animate-slide-in-bottom{animation:slideInBottom .5s ease forwards}@keyframes slideOutBottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}.animate-slide-out-bottom{animation:slideOutBottom .5s ease forwards}.flex-col{flex-direction:column}.rounded-b-none{border-bottom-left-radius:0;border-bottom-right-radius:0}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.shadow-modal{--tw-shadow:0 0 0 1px rgba(0,2,2,.1),0 1px 1px 0 rgba(0,2,2,.2),0 2px 2px 0 rgba(0,2,2,.08),0 4px 4px 0 rgba(0,2,2,.08),0 8px 8px 0 rgba(0,2,2,.08);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color),0 1px 1px 0 var(--tw-shadow-color),0 2px 2px 0 var(--tw-shadow-color),0 4px 4px 0 var(--tw-shadow-color),0 8px 8px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}@media (min-width:40rem){.tablet\\:max-w-\\[20rem\\]{max-width:20rem}.tablet\\:max-w-\\[27\\.5rem\\]{max-width:27.5rem}.tablet\\:max-w-\\[35rem\\]{max-width:35rem}.tablet\\:max-w-\\[41rem\\]{max-width:41rem}.tablet\\:max-w-\\[45rem\\]{max-width:45rem}.tablet\\:max-w-\\[65rem\\]{max-width:65rem}}@media (min-width:64rem){@keyframes slideInBottomSmall{0%{transform:translateY(20%)}to{transform:translateY(0)}}.desktop-xs\\:animate-slide-in-bottom-small{animation:slideInBottomSmall .5s ease forwards}@keyframes slideOutBottomSmall{0%{transform:translateY(0)}to{transform:translateY(20%)}}.desktop-xs\\:animate-slide-out-bottom-small{animation:slideOutBottomSmall .5s ease forwards}.desktop-xs\\:rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}}.dark\\:border:where(:host([data-theme=dark]),:host([data-theme=dark]) *){border-width:1px}.dark\\:border-solid:where(:host([data-theme=dark]),:host([data-theme=dark]) *){border-style:solid}.dark\\:border-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-border-opacity:1;border-color:rgb(70 75 84/var(--tw-border-opacity,1))}.dark\\:border:where([data-theme=dark],[data-theme=dark] *){border-width:1px}.dark\\:border-solid:where([data-theme=dark],[data-theme=dark] *){border-style:solid}.dark\\:border-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-border-opacity:1;border-color:rgb(70 75 84/var(--tw-border-opacity,1))}`;
|
|
53
53
|
|
|
54
54
|
const container = cva([
|
|
55
55
|
'w-full min-w-0 flex-1',
|
|
@@ -65,6 +65,7 @@ const container = cva([
|
|
|
65
65
|
variants: {
|
|
66
66
|
size: {
|
|
67
67
|
xs: 'tablet:max-w-[20rem]',
|
|
68
|
+
sm: 'tablet:max-w-[27.5rem]',
|
|
68
69
|
base: 'tablet:max-w-[35rem]',
|
|
69
70
|
lg: 'tablet:max-w-[41rem]',
|
|
70
71
|
xl: 'tablet:max-w-[45rem]',
|
|
@@ -95,10 +96,10 @@ const ModalContainer = class {
|
|
|
95
96
|
*/
|
|
96
97
|
closing = false;
|
|
97
98
|
render() {
|
|
98
|
-
return (h(ThemedHost, { key: '
|
|
99
|
+
return (h(ThemedHost, { key: '8ed1013a9a1216531efe3e94181c106584d3f407' }, h("div", { key: '2bfb6ca7cc65b070beed31244654a102f9036255', class: container({
|
|
99
100
|
size: this.size,
|
|
100
101
|
closing: asBoolean(this.closing),
|
|
101
|
-
}) }, h("slot", { key: '
|
|
102
|
+
}) }, h("slot", { key: '38ae19861439e290af0109bea1015f9fb862ed15' }))));
|
|
102
103
|
}
|
|
103
104
|
};
|
|
104
105
|
ModalContainer.style = modalContainerComponentCss();
|
package/dist/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" name="viewport"> <title>Stencil Component Starter</title> <link rel="modulepreload" href="/build/p-
|
|
1
|
+
<!doctype html><html dir="ltr" lang="en"><head> <meta charset="utf-8"> <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" name="viewport"> <title>Stencil Component Starter</title> <link rel="modulepreload" href="/build/p-d5390a8e.js"><link rel="modulepreload" href="/build/p-6XOzWrsN.js"><link rel="modulepreload" href="/build/p-C5CTp9IA.js"><link rel="modulepreload" href="/build/p-CBWjHURv.js"><link rel="modulepreload" href="/build/p-CSySY6aC.js"><link rel="modulepreload" href="/build/p-ChV9xqsO.js"><link rel="modulepreload" href="/build/p-DPmts3W0.js"><link rel="modulepreload" href="/build/p-xs4N_Y-0.js"><link rel="modulepreload" href="/build/p-yFtRjnrU.js"><script type="module" src="/build/p-d5390a8e.js" data-stencil data-resources-url="/build/" data-stencil-namespace="paperless"></script> <script nomodule="" src="/build/paperless.js" data-stencil></script> <link href="/build/p-ea6cc0bf.css" rel="stylesheet"> </head> <body> <p-button>Test</p-button> <script data-build="2026-02-24T14:49:50">
|
|
2
2
|
if ('serviceWorker' in navigator && location.protocol !== 'file:') {
|
|
3
3
|
window.addEventListener('load', function() {
|
|
4
4
|
navigator.serviceWorker.register('/sw.js')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,a}from"./p-yFtRjnrU.js";import{c as r}from"./p-CBWjHURv.js";import{T as o}from"./p-CSySY6aC.js";import{a as d}from"./p-C5CTp9IA.js";import"./p-ChV9xqsO.js";import"./p-6XOzWrsN.js";const i=r("\n -mt-px bg-white p-4\n dark:bg-hurricane-600\n ",{variants:{roundedBottom:{true:"\n rounded-b-none pb-[calc(env(safe-area-inset-bottom)+1rem)]\n desktop-xs:rounded-b-2xl\n ",false:"pb-4"},roundedTop:{true:"\n rounded-t-lg\n desktop-xs:rounded-t-2xl\n ",false:null}}}),n=class{constructor(t){e(this,t)}roundedBottom=!1;roundedTop=!1;render(){return t(o,{key:"4f460cc8150f3610e72bdeb18040abe0be4f88a6"},t("div",{key:"5c6027a2eb2aa2efe427acd5b5ff621c0908a794",class:i({roundedBottom:this.roundedBottom,roundedTop:this.roundedTop})},t("slot",{key:"fbb1db79d47487b2fa20f98f3233fb04fa8c3782"})))}};n.style="*{box-sizing:border-box}.static{position:static}.-mt-px{margin-top:-1px}.rounded{border-radius:.25rem}.rounded-b-none{border-bottom-left-radius:0;border-bottom-right-radius:0}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-4{padding:1rem}.pb-4{padding-bottom:1rem}.pb-\\[calc\\(env\\(safe-area-inset-bottom\\)\\+1rem\\)\\]{padding-bottom:calc(env(safe-area-inset-bottom) + 1rem)}@media (min-width:64rem){.desktop-xs\\:rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.desktop-xs\\:rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}}.dark\\:bg-hurricane-600:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))}.dark\\:bg-hurricane-600:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))}";const s=r(["w-full min-w-0 flex-1","z-modal flex flex-col","\n rounded-b-none rounded-t-2xl\n desktop-xs:rounded-b-2xl\n ","max-h-[calc(100dvh-4rem)]","shadow-modal","dark:border dark:border-solid dark:border-hurricane-400"],{variants:{size:{xs:"tablet:max-w-[20rem]",sm:"tablet:max-w-[27.5rem]",base:"tablet:max-w-[35rem]",lg:"tablet:max-w-[41rem]",xl:"tablet:max-w-[45rem]","2xl":"tablet:max-w-[65rem]"},closing:{false:"\n animate-slide-in-bottom\n desktop-xs:animate-slide-in-bottom-small\n ",true:"\n pointer-events-none animate-slide-out-bottom\n desktop-xs:animate-slide-out-bottom-small\n "}}}),m=class{constructor(t){e(this,t)}size="base";closing=!1;render(){return t(o,{key:"8ed1013a9a1216531efe3e94181c106584d3f407"},t("div",{key:"2bfb6ca7cc65b070beed31244654a102f9036255",class:s({size:this.size,closing:d(this.closing)})},t("slot",{key:"38ae19861439e290af0109bea1015f9fb862ed15"})))}};m.style=".flex{display:flex}.w-full{width:100%}.justify-center{justify-content:center}*{box-sizing:border-box}:host{display:flex;justify-content:center;width:100%}@media (min-width:64rem){:host{margin:auto}}.pointer-events-none{pointer-events:none}.static{position:static}.z-modal{z-index:600}.max-h-\\[calc\\(100dvh-4rem\\)\\]{max-height:calc(100dvh - 4rem)}.min-w-0{min-width:0}.flex-1{flex:1 1 0%}@keyframes slideInBottom{0%{transform:translateY(100%)}to{transform:translateY(0)}}.animate-slide-in-bottom{animation:slideInBottom .5s ease forwards}@keyframes slideOutBottom{0%{transform:translateY(0)}to{transform:translateY(100%)}}.animate-slide-out-bottom{animation:slideOutBottom .5s ease forwards}.flex-col{flex-direction:column}.rounded-b-none{border-bottom-left-radius:0;border-bottom-right-radius:0}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.shadow-modal{--tw-shadow:0 0 0 1px rgba(0,2,2,.1),0 1px 1px 0 rgba(0,2,2,.2),0 2px 2px 0 rgba(0,2,2,.08),0 4px 4px 0 rgba(0,2,2,.08),0 8px 8px 0 rgba(0,2,2,.08);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color),0 1px 1px 0 var(--tw-shadow-color),0 2px 2px 0 var(--tw-shadow-color),0 4px 4px 0 var(--tw-shadow-color),0 8px 8px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}@media (min-width:40rem){.tablet\\:max-w-\\[20rem\\]{max-width:20rem}.tablet\\:max-w-\\[27\\.5rem\\]{max-width:27.5rem}.tablet\\:max-w-\\[35rem\\]{max-width:35rem}.tablet\\:max-w-\\[41rem\\]{max-width:41rem}.tablet\\:max-w-\\[45rem\\]{max-width:45rem}.tablet\\:max-w-\\[65rem\\]{max-width:65rem}}@media (min-width:64rem){@keyframes slideInBottomSmall{0%{transform:translateY(20%)}to{transform:translateY(0)}}.desktop-xs\\:animate-slide-in-bottom-small{animation:slideInBottomSmall .5s ease forwards}@keyframes slideOutBottomSmall{0%{transform:translateY(0)}to{transform:translateY(20%)}}.desktop-xs\\:animate-slide-out-bottom-small{animation:slideOutBottomSmall .5s ease forwards}.desktop-xs\\:rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}}.dark\\:border:where(:host([data-theme=dark]),:host([data-theme=dark]) *){border-width:1px}.dark\\:border-solid:where(:host([data-theme=dark]),:host([data-theme=dark]) *){border-style:solid}.dark\\:border-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-border-opacity:1;border-color:rgb(70 75 84/var(--tw-border-opacity,1))}.dark\\:border:where([data-theme=dark],[data-theme=dark] *){border-width:1px}.dark\\:border-solid:where([data-theme=dark],[data-theme=dark] *){border-style:solid}.dark\\:border-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-border-opacity:1;border-color:rgb(70 75 84/var(--tw-border-opacity,1))}";const l=class{constructor(t){e(this,t)}render(){return t(o,{key:"db7731369d6e62f4e6cd9a45d49202c1d9600284"},t("div",{key:"a0ef39283aa6a636ccf2e2aed077c5e4b78be0b2",class:"\n flex flex-col rounded-b-none bg-white px-4\n pb-[calc(env(safe-area-inset-bottom)+1rem)]\n desktop-xs:rounded-b-2xl\n dark:bg-hurricane-600\n "},t("p-divider",{key:"307cc08feaf5555108d153a8b956ced52a24848b",class:"\n mb-4 hidden text-off-white-700\n desktop-xs:inline-block\n dark:text-white/10\n "}),t("div",{key:"1e21b3ceb5e1eb58115b3d46c2c36771c8f0842e",class:"\n flex flex-col gap-4\n tablet:flex-row\n "},t("slot",{key:"f383532efab19f9810097b2712c18184b18967a1"}))))}};l.style="*{box-sizing:border-box}.static{position:static}.mb-4{margin-bottom:1rem}.flex{display:flex}.hidden{display:none}.flex-col{flex-direction:column}.gap-4{gap:1rem}.rounded-b-none{border-bottom-left-radius:0;border-bottom-right-radius:0}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-4{padding-left:1rem;padding-right:1rem}.pb-\\[calc\\(env\\(safe-area-inset-bottom\\)\\+1rem\\)\\]{padding-bottom:calc(env(safe-area-inset-bottom) + 1rem)}.text-off-white-700{--tw-text-opacity:1;color:rgb(222 219 213/var(--tw-text-opacity,1))}@media (min-width:40rem){.tablet\\:flex-row{flex-direction:row}}@media (min-width:64rem){.desktop-xs\\:inline-block{display:inline-block}.desktop-xs\\:rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}}.dark\\:bg-hurricane-600:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))}.dark\\:text-white\\/10:where(:host([data-theme=dark]),:host([data-theme=dark]) *){color:hsla(0,0%,100%,.1)}.dark\\:bg-hurricane-600:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))}.dark\\:text-white\\/10:where([data-theme=dark],[data-theme=dark] *){color:hsla(0,0%,100%,.1)}";const b=r(["\n relative z-[1] w-full flex-col overflow-hidden rounded-t-2xl bg-white\n dark:bg-hurricane-600\n ","inline-flex aspect-[7/1] max-h-28"]),c=r(["flex justify-end","h-12 w-full p-4 pb-0"]),h=r(["flex-1 text-center","w-[calc(100%-7rem)]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2","\n text-ambit text-2xl font-bold text-storm-500\n dark:text-white\n "]),x=class{constructor(t){e(this,t),this.close=a(this,"close",3)}showClose=!0;close;render(){return t(o,{key:"dbb51f33774127b65d699fba9053651fd98509bb"},t("div",{key:"b3d864bbf0b006ce7247c282f889c4500bb6c379",class:b()},t("div",{key:"d8b71c2d987b85e946b4c49372561290ff1ae54d",class:c()},t("div",{key:"acb36bfe313501f90a9f034de27cbcc2909d1256",class:h()},t("slot",{key:"4a7b12ebae3fbe321a47a9e0e00572b3e2bc01bc"})),this.showClose&&t("p-button",{key:"069df47301c8ce0790ca61d8141f21fcc3191258",icon:"negative",iconOnly:!0,variant:"secondary",onClick:e=>this.close.emit(e)})),t("p-smile",{key:"ab9cdfc56527962b7414b574fde67dbb4c046f29",class:"dark:text-hurricane-400"})))}};x.style="*{box-sizing:border-box}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.z-\\[1\\]{z-index:1}.flex{display:flex}.inline-flex{display:inline-flex}.aspect-\\[7\\/1\\]{aspect-ratio:7/1}.h-12{height:3rem}.max-h-28{max-height:7rem}.w-\\[calc\\(100\\%-7rem\\)\\]{width:calc(100% - 7rem)}.w-full{width:100%}.flex-1{flex:1 1 0%}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.overflow-hidden{overflow:hidden}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-4{padding:1rem}.pb-0{padding-bottom:0}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.font-bold{font-weight:700}.text-storm-500{--tw-text-opacity:1;color:rgb(24 30 41/var(--tw-text-opacity,1))}.dark\\:bg-hurricane-600:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))}.dark\\:text-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:bg-hurricane-600:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))}.dark\\:text-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}";export{n as p_modal_body,m as p_modal_container,l as p_modal_footer,x as p_modal_header}
|