@sito/dashboard 0.0.69 → 0.0.70
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/{FiltersProvider-BoCTMqk8.js → FiltersProvider-BV023mmu.js} +1 -1
- package/dist/{FiltersProvider-Bxge43VS.cjs → FiltersProvider-DVMj0LV0.cjs} +1 -1
- package/dist/FiltersProvider.cjs +1 -1
- package/dist/FiltersProvider.js +1 -1
- package/dist/SvgIcons.cjs +1 -1
- package/dist/SvgIcons.js +11 -9
- package/dist/Table-CWcHaZeQ.cjs +1 -0
- package/dist/Table-LcN-UV8f.js +1184 -0
- package/dist/Table.cjs +1 -1
- package/dist/Table.css +1 -1
- package/dist/Table.js +9 -8
- package/dist/TableColumns-BjTNomZf.cjs +1 -0
- package/dist/{Filters-DL5jd8ps.js → TableColumns-CIddkosX.js} +37 -9
- package/dist/TableOptions.cjs +1 -1
- package/dist/TableOptions.js +1 -1
- package/dist/TableOptionsProvider-BgnISoXx.js +120 -0
- package/dist/TableOptionsProvider-i4uVLLwH.cjs +1 -0
- package/dist/components/Form/CheckInput/types.d.ts +1 -1
- package/dist/components/Form/FileInput/types.d.ts +2 -2
- package/dist/components/Form/SelectInput/types.d.ts +1 -1
- package/dist/components/Form/TextInput/types.d.ts +1 -1
- package/dist/components/Form/types.d.ts +2 -1
- package/dist/components/SvgIcons/BarsStaggered.d.ts +7 -0
- package/dist/components/SvgIcons/ChevronDown.d.ts +1 -1
- package/dist/components/SvgIcons/ChevronLeft.d.ts +1 -1
- package/dist/components/SvgIcons/ChevronRight.d.ts +1 -1
- package/dist/components/SvgIcons/ChevronUp.d.ts +1 -1
- package/dist/components/SvgIcons/Close.d.ts +1 -1
- package/dist/components/SvgIcons/Ellipsis.d.ts +1 -1
- package/dist/components/SvgIcons/File.d.ts +1 -1
- package/dist/components/SvgIcons/Filters.d.ts +1 -1
- package/dist/components/SvgIcons/TableColumns.d.ts +7 -0
- package/dist/components/SvgIcons/index.d.ts +2 -0
- package/dist/components/Table/components/ColumnVisibilityMenu.d.ts +12 -0
- package/dist/components/Table/components/TableHeader/types.d.ts +2 -0
- package/dist/components/Table/components/index.d.ts +1 -0
- package/dist/components/Table/components/types.d.ts +2 -0
- package/dist/components/Table/utils.d.ts +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +58 -55
- package/dist/providers/TableOptions/types.d.ts +5 -0
- package/package.json +1 -1
- package/dist/Filters-Dyee8QYH.cjs +0 -1
- package/dist/Table-BLhy0EYJ.cjs +0 -1
- package/dist/Table-CeD0yXGZ.js +0 -1113
- package/dist/TableOptionsProvider-BJdeNIQj.cjs +0 -1
- package/dist/TableOptionsProvider-DBr-FW53.js +0 -106
package/dist/Table.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Table-CWcHaZeQ.cjs");exports.ActiveFilters=e.ActiveFilters;exports.ArrayChip=e.ArrayChip;exports.ColumnVisibilityMenu=e.ColumnVisibilityMenu;exports.Columns=e.Columns;exports.CountOfTotal=e.CountOfTotal;exports.FilterDropdown=e.FilterDropdown;exports.Footer=e.Footer;exports.Navigation=e.Navigation;exports.PageSize=e.PageSize;exports.RangeChip=e.RangeChip;exports.Rows=e.Rows;exports.Table=e.Table;exports.TableEmpty=e.TableEmpty;exports.TableHeader=e.TableHeader;exports.TableSelectionBar=e.TableSelectionBar;exports.renderFilterComponent=e.renderFilterComponent;
|
package/dist/Table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.actions-container{justify-content:flex-end;align-items:center;gap:calc(var(--spacing,.25rem) * 1);width:100%;display:flex}.actions-dropdown .action{width:100%;padding-inline:calc(var(--spacing,.25rem) * 2);justify-content:flex-start}.actions-dropdown .actions-container li{width:100%}.action{justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem) * 2);background-color:var(--color-base,#f2f2f2);color:var(--color-text,#0d0d0d);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));display:flex}@media(hover:hover){.action:hover{background-color:var(--color-base-light,#fff)}}.icon-action{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);border-radius:3.40282e38px}.text-action{border-radius:var(--radius-4xl,2rem);padding-inline:calc(var(--spacing,.25rem) * 4);padding-block:calc(var(--spacing,.25rem) * 2)}.actions-dropdown-list{flex-direction:column}.action-dropdown-item{justify-content:flex-start;width:100%}.actions-dropdown-trigger svg{height:calc(var(--spacing,.25rem) * 5);width:calc(var(--spacing,.25rem) * 5)}.active-filters-main{justify-content:flex-start;align-items:center;gap:calc(var(--spacing,.25rem) * 2);flex-wrap:wrap;display:flex}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-border-style:solid}}}.filter-dropdown-trigger-icon{height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4);fill:currentColor}.filter-dropdown-button{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}.filter-dropdown-backdrop{width:100%;transition:grid-template-rows .5s;display:grid;overflow:hidden}.filter-dropdown-backdrop.opened{grid-template-rows:1fr}.filter-dropdown-backdrop.closed{grid-template-rows:0fr}.filter-popup{min-height:0;overflow:auto}.filter-title{margin-bottom:calc(var(--spacing,.25rem) * 3);padding-inline:calc(var(--spacing,.25rem) * 3);padding-top:calc(var(--spacing,.25rem) * 1.5);padding-bottom:calc(var(--spacing,.25rem) * 2);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600);text-transform:uppercase}.filter-container{margin-bottom:calc(var(--spacing,.25rem) * 4);column-gap:calc(var(--spacing,.25rem) * 6);row-gap:calc(var(--spacing,.25rem) * 8);padding:calc(var(--spacing,.25rem) * 3);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}.filter-container-item{align-items:center;display:flex}.filter-footer{border-top-style:var(--tw-border-style);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2);border-top-width:1px}.filter-buttons-row{justify-content:space-between;align-items:center;display:flex}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-duration:initial;--tw-border-style:solid}}}.table-main{height:100%;min-height:calc(var(--spacing,.25rem) * 0);flex-direction:column;width:100%;display:flex}.table-header{gap:calc(var(--spacing,.25rem) * 2);grid-template-columns:repeat(1,minmax(0,1fr));display:grid}.table-header.showing-filters{margin-bottom:calc(var(--spacing,.25rem) * 5)}.table-header-content{justify-content:flex-end;align-items:center;gap:calc(var(--spacing,.25rem) * 2);justify-self:flex-end;width:100%;display:flex}.table-header-title{font-size:var(--text-2xl,1.5rem);line-height:var(--tw-leading,var(--text-2xl--line-height,calc(2 / 1.5)));--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700)}@media(min-width:48rem){.table-header-title{font-size:var(--text-3xl,1.875rem);line-height:var(--tw-leading,var(--text-3xl--line-height, 1.2 ))}}.table-body{min-height:calc(var(--spacing,.25rem) * 0);flex:1;width:100%;overflow:auto}.table-content{border-collapse:separate;--tw-border-spacing-x:calc(var(--spacing,.25rem) * 0);--tw-border-spacing-y:calc(var(--spacing,.25rem) * 0);width:100%;height:100%;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y);text-align:left;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}.table-loading{top:calc(var(--spacing,.25rem) * 0);left:calc(var(--spacing,.25rem) * 0);width:100%;height:100%}.table-row-cell{padding-inline:calc(var(--spacing,.25rem) * 6);padding-block:calc(var(--spacing,.25rem) * 4);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}.table-row-cell.basic{white-space:nowrap}.table-row-cell-action{justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem) * 3);display:flex}.table-row{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;transition-duration:.15s}.table-row.expandable{cursor:pointer}@media(hover:hover){.table-row.expandable:hover{background-color:var(--color-base,#f2f2f2)}}.table-row.selected,.table-row.expanded{background-color:var(--color-base,#f2f2f2)}.table-row-checkbox{width:calc(var(--spacing,.25rem) * 12);padding-inline:calc(var(--spacing,.25rem) * 3);text-align:center}.table-row-checkbox input{cursor:pointer}.table-row-expand-content{align-items:center;gap:calc(var(--spacing,.25rem) * 2);display:flex}.table-row-expand-indicator{color:var(--color-text-muted,#4d4d4d);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.table-row-expand-indicator[data-state=expanded]{color:var(--color-text,#0d0d0d)}.table-row-expand-chevron{height:calc(var(--spacing,.25rem) * 2.5);width:calc(var(--spacing,.25rem) * 2.5)}.table-row-expanded-cell{border-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem) * 0);background-color:#0000;border-width:0}.table-row-expanded-content{opacity:0;grid-template-rows:0fr;transition:grid-template-rows .22s,opacity .22s;display:grid}.table-row-expanded-content.open{opacity:1;grid-template-rows:1fr}.table-row-expanded-content.closed{opacity:0;grid-template-rows:0fr}.table-row-expanded-inner{border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--color-border,#ccc);background-color:var(--color-base,#f2f2f2);padding-inline:calc(var(--spacing,.25rem) * 6);padding-block:calc(var(--spacing,.25rem) * 4);overflow:hidden}.table-selection-bar{margin-bottom:calc(var(--spacing,.25rem) * 3);justify-content:space-between;align-items:center;gap:calc(var(--spacing,.25rem) * 4);background-color:var(--color-base,#f2f2f2);padding-inline:calc(var(--spacing,.25rem) * 4);padding-block:calc(var(--spacing,.25rem) * 2);color:var(--color-text,#0d0d0d);border-radius:.25rem;display:flex}.table-selection-bar-count{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600)}.table-selection-bar-actions{align-items:center;gap:calc(var(--spacing,.25rem) * 2);display:flex}.multi-table-action{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);justify-content:center;align-items:center;display:flex}.multi-table-action:disabled{cursor:not-allowed;opacity:.5}@property --tw-border-spacing-x{syntax:"<length>";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"<length>";inherits:false;initial-value:0}@property --tw-duration{syntax:"*";inherits:false}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-border-style:solid}}}.jump-to-page,.page-size{justify-content:flex-start;align-items:center;gap:calc(var(--spacing,.25rem) * 2);display:flex}.jump-to-page-input,.page-size-input{--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700);--tw-border-style:none!important;padding-block:calc(var(--spacing,.25rem) * 0)!important;padding-right:calc(var(--spacing,.25rem) * 7)!important;padding-left:calc(var(--spacing,.25rem) * 2)!important;border-style:none!important}.jump-to-page-input-container,.page-size-input-container{margin-bottom:calc(var(--spacing,.25rem) * 0)!important;--tw-border-style:none!important;border-style:none!important;width:auto!important}.table-headers-column{top:calc(var(--spacing,.25rem) * 0);z-index:20;background-color:var(--color-base,#f2f2f2);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2);position:sticky}.table-headers-checkbox{width:calc(var(--spacing,.25rem) * 12);text-align:center}.table-headers-checkbox input{cursor:pointer}.table-headers-label{white-space:nowrap}.table-headers-sort-indicator{width:calc(var(--spacing,.25rem) * 3)}.table-headers-action{top:calc(var(--spacing,.25rem) * 0);z-index:20;background-color:var(--color-base,#f2f2f2);width:1px;padding-inline:calc(var(--spacing,.25rem) * 6);padding-block:calc(var(--spacing,.25rem) * 3);text-align:center;--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-text,#0d0d0d);white-space:nowrap;position:sticky}.table-empty{border-top-style:var(--tw-border-style);width:100%;padding-block:calc(var(--spacing,.25rem) * 2);border-top-width:1px;justify-content:center;align-items:center;display:flex}.table-footer{margin-top:calc(var(--spacing,.25rem) * 5);justify-content:flex-end;align-items:center;gap:calc(var(--spacing,.25rem) * 5);width:100%;padding-inline:calc(var(--spacing,.25rem) * 5);display:flex}.table-navigation-sizes{justify-content:flex-start;align-items:center;gap:calc(var(--spacing,.25rem) * 1);display:flex}.table-navigation-pages{justify-content:flex-end;align-items:center;gap:calc(var(--spacing,.25rem) * 5);display:flex}.table-navigation-icon{width:calc(var(--spacing,.25rem) * 2.5)}.table-header-sr{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.options-widget-container{margin-bottom:calc(var(--spacing,.25rem) * 0);padding-bottom:calc(var(--spacing,.25rem) * 2)}.input-widget-container{margin-bottom:calc(var(--spacing,.25rem) * 0);width:100%}.range-widget-container .input-widget-label{top:calc(var(--spacing,.25rem) * 0);--tw-translate-y:calc(var(--spacing,.25rem) * -4);translate:var(--tw-translate-x) var(--tw-translate-y);--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.range-widget-row{align-items:center;gap:calc(var(--spacing,.25rem) * 6);display:flex}.range-widget-container{width:100%;position:relative}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
|
|
1
|
+
.actions-container{justify-content:flex-end;align-items:center;gap:calc(var(--spacing,.25rem) * 1);width:100%;display:flex}.actions-dropdown .action{width:100%;padding-inline:calc(var(--spacing,.25rem) * 2);justify-content:flex-start}.actions-dropdown .actions-container li{width:100%}.action{justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem) * 2);background-color:var(--color-base,#f2f2f2);color:var(--color-text,#0d0d0d);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));display:flex}@media(hover:hover){.action:hover{background-color:var(--color-base-light,#fff)}}.icon-action{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);border-radius:3.40282e38px}.text-action{border-radius:var(--radius-4xl,2rem);padding-inline:calc(var(--spacing,.25rem) * 4);padding-block:calc(var(--spacing,.25rem) * 2)}.actions-dropdown-list{flex-direction:column}.action-dropdown-item{justify-content:flex-start;width:100%}.actions-dropdown-trigger svg{height:calc(var(--spacing,.25rem) * 5);width:calc(var(--spacing,.25rem) * 5)}.active-filters-main{justify-content:flex-start;align-items:center;gap:calc(var(--spacing,.25rem) * 2);flex-wrap:wrap;display:flex}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-border-style:solid}}}.filter-dropdown-trigger-icon{height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4);fill:currentColor}.filter-dropdown-button{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}.filter-dropdown-backdrop{width:100%;transition:grid-template-rows .5s;display:grid;overflow:hidden}.filter-dropdown-backdrop.opened{grid-template-rows:1fr}.filter-dropdown-backdrop.closed{grid-template-rows:0fr}.filter-popup{min-height:0;overflow:auto}.filter-title{margin-bottom:calc(var(--spacing,.25rem) * 3);padding-inline:calc(var(--spacing,.25rem) * 3);padding-top:calc(var(--spacing,.25rem) * 1.5);padding-bottom:calc(var(--spacing,.25rem) * 2);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600);text-transform:uppercase}.filter-container{margin-bottom:calc(var(--spacing,.25rem) * 4);column-gap:calc(var(--spacing,.25rem) * 6);row-gap:calc(var(--spacing,.25rem) * 8);padding:calc(var(--spacing,.25rem) * 3);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}.filter-container-item{align-items:center;display:flex}.filter-footer{border-top-style:var(--tw-border-style);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2);border-top-width:1px}.filter-buttons-row{justify-content:space-between;align-items:center;display:flex}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-duration:initial;--tw-border-style:solid}}}.table-main{height:100%;min-height:calc(var(--spacing,.25rem) * 0);flex-direction:column;width:100%;display:flex}.table-header{gap:calc(var(--spacing,.25rem) * 2);grid-template-columns:repeat(1,minmax(0,1fr));display:grid}.table-header.showing-filters{margin-bottom:calc(var(--spacing,.25rem) * 5)}.table-header-content{justify-content:flex-end;align-items:center;gap:calc(var(--spacing,.25rem) * 2);justify-self:flex-end;width:100%;display:flex}.table-header-title{font-size:var(--text-2xl,1.5rem);line-height:var(--tw-leading,var(--text-2xl--line-height,calc(2 / 1.5)));--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700)}@media(min-width:48rem){.table-header-title{font-size:var(--text-3xl,1.875rem);line-height:var(--tw-leading,var(--text-3xl--line-height, 1.2 ))}}.table-body{min-height:calc(var(--spacing,.25rem) * 0);flex:1;width:100%;overflow:auto}.table-content{border-collapse:separate;--tw-border-spacing-x:calc(var(--spacing,.25rem) * 0);--tw-border-spacing-y:calc(var(--spacing,.25rem) * 0);width:100%;height:100%;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y);text-align:left;font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}.table-loading{top:calc(var(--spacing,.25rem) * 0);left:calc(var(--spacing,.25rem) * 0);width:100%;height:100%}.table-row-cell{padding-inline:calc(var(--spacing,.25rem) * 6);padding-block:calc(var(--spacing,.25rem) * 4);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}.table-row-cell.basic{white-space:nowrap}.table-row-cell-action{justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem) * 3);display:flex}.table-row{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;transition-duration:.15s}.table-row.expandable{cursor:pointer}@media(hover:hover){.table-row.expandable:hover{background-color:var(--color-base,#f2f2f2)}}.table-row.selected,.table-row.expanded{background-color:var(--color-base,#f2f2f2)}.table-row-checkbox{width:calc(var(--spacing,.25rem) * 12);padding-inline:calc(var(--spacing,.25rem) * 3);text-align:center}.table-row-checkbox input{cursor:pointer}.table-row-expand-content{align-items:center;gap:calc(var(--spacing,.25rem) * 2);display:flex}.table-row-expand-indicator{color:var(--color-text-muted,#4d4d4d);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.table-row-expand-indicator[data-state=expanded]{color:var(--color-text,#0d0d0d)}.table-row-expand-chevron{height:calc(var(--spacing,.25rem) * 2.5);width:calc(var(--spacing,.25rem) * 2.5)}.table-row-expanded-cell{border-style:var(--tw-border-style);padding:calc(var(--spacing,.25rem) * 0);background-color:#0000;border-width:0}.table-row-expanded-content{opacity:0;grid-template-rows:0fr;transition:grid-template-rows .22s,opacity .22s;display:grid}.table-row-expanded-content.open{opacity:1;grid-template-rows:1fr}.table-row-expanded-content.closed{opacity:0;grid-template-rows:0fr}.table-row-expanded-inner{border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--color-border,#ccc);background-color:var(--color-base,#f2f2f2);padding-inline:calc(var(--spacing,.25rem) * 6);padding-block:calc(var(--spacing,.25rem) * 4);overflow:hidden}.table-selection-bar{margin-bottom:calc(var(--spacing,.25rem) * 3);justify-content:space-between;align-items:center;gap:calc(var(--spacing,.25rem) * 4);background-color:var(--color-base,#f2f2f2);padding-inline:calc(var(--spacing,.25rem) * 4);padding-block:calc(var(--spacing,.25rem) * 2);color:var(--color-text,#0d0d0d);border-radius:.25rem;display:flex}.table-selection-bar-count{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600)}.table-selection-bar-actions{align-items:center;gap:calc(var(--spacing,.25rem) * 2);display:flex}.multi-table-action{height:calc(var(--spacing,.25rem) * 8);width:calc(var(--spacing,.25rem) * 8);justify-content:center;align-items:center;display:flex}.multi-table-action:disabled{cursor:not-allowed;opacity:.5}@property --tw-border-spacing-x{syntax:"<length>";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"<length>";inherits:false;initial-value:0}@property --tw-duration{syntax:"*";inherits:false}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.jump-to-page,.page-size{justify-content:flex-start;align-items:center;gap:calc(var(--spacing,.25rem) * 2);display:flex}.jump-to-page-input,.page-size-input{--tw-font-weight:var(--font-weight-bold,700);font-weight:var(--font-weight-bold,700);--tw-border-style:none!important;padding-block:calc(var(--spacing,.25rem) * 0)!important;padding-right:calc(var(--spacing,.25rem) * 7)!important;padding-left:calc(var(--spacing,.25rem) * 2)!important;border-style:none!important}.jump-to-page-input-container,.page-size-input-container{margin-bottom:calc(var(--spacing,.25rem) * 0)!important;--tw-border-style:none!important;border-style:none!important;width:auto!important}.table-headers-column{top:calc(var(--spacing,.25rem) * 0);z-index:20;background-color:var(--color-base,#f2f2f2);padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2);position:sticky}.table-headers-checkbox{width:calc(var(--spacing,.25rem) * 12);text-align:center}.table-headers-checkbox input{cursor:pointer}.table-headers-label{white-space:nowrap}.table-headers-sort-indicator{width:calc(var(--spacing,.25rem) * 3)}.table-headers-action{top:calc(var(--spacing,.25rem) * 0);z-index:20;background-color:var(--color-base,#f2f2f2);width:1px;padding-inline:calc(var(--spacing,.25rem) * 6);padding-block:calc(var(--spacing,.25rem) * 3);text-align:center;--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--color-text,#0d0d0d);white-space:nowrap;position:sticky}.table-empty{border-top-style:var(--tw-border-style);width:100%;padding-block:calc(var(--spacing,.25rem) * 2);border-top-width:1px;justify-content:center;align-items:center;display:flex}.table-footer{margin-top:calc(var(--spacing,.25rem) * 5);justify-content:flex-end;align-items:center;gap:calc(var(--spacing,.25rem) * 5);width:100%;padding-inline:calc(var(--spacing,.25rem) * 5);display:flex}.table-navigation-sizes{justify-content:flex-start;align-items:center;gap:calc(var(--spacing,.25rem) * 1);display:flex}.table-navigation-pages{justify-content:flex-end;align-items:center;gap:calc(var(--spacing,.25rem) * 5);display:flex}.table-navigation-icon{width:calc(var(--spacing,.25rem) * 2.5)}.table-header-sr{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.column-visibility-menu{position:relative}.column-visibility-icon{height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4)}.column-visibility-trigger{align-items:center;display:flex}.column-visibility-backdrop{inset:calc(var(--spacing,.25rem) * 0);z-index:30;position:fixed}.column-visibility-dropdown{top:100%;right:calc(var(--spacing,.25rem) * 0);z-index:40;margin-top:calc(var(--spacing,.25rem) * 1);max-height:calc(var(--spacing,.25rem) * 64);min-width:calc(var(--spacing,.25rem) * 48);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-border,#ccc);background-color:var(--color-base,#f2f2f2);padding:calc(var(--spacing,.25rem) * 2);--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-radius:.25rem;position:absolute;overflow-y:auto}.column-visibility-item{cursor:pointer;padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:calc(var(--spacing,.25rem) * 1);border-radius:.25rem}@media(hover:hover){.column-visibility-item:hover{background-color:var(--color-base,#f2f2f2)}}.reset-table-icon{height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4)}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}.options-widget-container{margin-bottom:calc(var(--spacing,.25rem) * 0);padding-bottom:calc(var(--spacing,.25rem) * 2)}.input-widget-container{margin-bottom:calc(var(--spacing,.25rem) * 0);width:100%}.range-widget-container .input-widget-label{top:calc(var(--spacing,.25rem) * 0);--tw-translate-y:calc(var(--spacing,.25rem) * -4);translate:var(--tw-translate-x) var(--tw-translate-y);--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.range-widget-row{align-items:center;gap:calc(var(--spacing,.25rem) * 6);display:flex}.range-widget-container{width:100%;position:relative}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
|
package/dist/Table.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { A as s,
|
|
1
|
+
import { A as s, b as o, a as i, C as r, c as t, F as l, d as n, N as C, P as b, R as p, e as T, h as m, T as F, f as d, g, r as u } from "./Table-LcN-UV8f.js";
|
|
2
2
|
export {
|
|
3
3
|
s as ActiveFilters,
|
|
4
4
|
o as ArrayChip,
|
|
5
|
+
i as ColumnVisibilityMenu,
|
|
5
6
|
r as Columns,
|
|
6
7
|
t as CountOfTotal,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
l as FilterDropdown,
|
|
9
|
+
n as Footer,
|
|
10
|
+
C as Navigation,
|
|
11
|
+
b as PageSize,
|
|
12
|
+
p as RangeChip,
|
|
12
13
|
T as Rows,
|
|
13
|
-
|
|
14
|
+
m as Table,
|
|
14
15
|
F as TableEmpty,
|
|
15
16
|
d as TableHeader,
|
|
16
17
|
g as TableSelectionBar,
|
|
17
|
-
|
|
18
|
+
u as renderFilterComponent
|
|
18
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime");function t(r){const{className:n=""}=r;return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",fill:"currentColor",children:s.jsx("path",{d:"M64 160C64 142.3 78.3 128 96 128L480 128C497.7 128 512 142.3 512 160C512 177.7 497.7 192 480 192L96 192C78.3 192 64 177.7 64 160zM128 320C128 302.3 142.3 288 160 288L544 288C561.7 288 576 302.3 576 320C576 337.7 561.7 352 544 352L160 352C142.3 352 128 337.7 128 320zM512 480C512 497.7 497.7 512 480 512L96 512C78.3 512 64 497.7 64 480C64 462.3 78.3 448 96 448L480 448C497.7 448 512 462.3 512 480z"})})}function l(r){const{className:n=""}=r;return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:s.jsx("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})})}function e(r){const{className:n=""}=r;return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",fill:"currentColor",children:s.jsx("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"})})}function o(r){const{className:n=""}=r;return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",fill:"currentColor",children:s.jsx("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})})}function c(r){const{className:n=""}=r;return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:s.jsx("path",{d:"M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"})})}function C(r){const{className:n=""}=r;return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",fill:"currentColor",children:s.jsx("path",{d:"M320 208C289.1 208 264 182.9 264 152C264 121.1 289.1 96 320 96C350.9 96 376 121.1 376 152C376 182.9 350.9 208 320 208zM320 432C350.9 432 376 457.1 376 488C376 518.9 350.9 544 320 544C289.1 544 264 518.9 264 488C264 457.1 289.1 432 320 432zM376 320C376 350.9 350.9 376 320 376C289.1 376 264 350.9 264 320C264 289.1 289.1 264 320 264C350.9 264 376 289.1 376 320z"})})}const i=r=>{const{className:n=""}=r;return s.jsx("svg",{className:n,viewBox:"0 0 16 16",children:s.jsx("path",{d:"M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z"})})};function a(r){const{className:n=""}=r;return s.jsx("svg",{className:n,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",fill:"currentColor",children:s.jsx("path",{d:"M96 160C96 124.7 124.7 96 160 96L480 96C515.3 96 544 124.7 544 160L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160zM160 224L160 480L288 480L288 224L160 224zM480 224L352 224L352 480L480 480L480 224z"})})}exports.BarsStaggered=t;exports.ChevronDown=l;exports.ChevronLeft=e;exports.ChevronRight=o;exports.ChevronUp=c;exports.Ellipsis=C;exports.Filters=i;exports.TableColumns=a;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
function l(r) {
|
|
3
|
+
const { className: n = "" } = r;
|
|
4
|
+
return /* @__PURE__ */ s(
|
|
5
|
+
"svg",
|
|
6
|
+
{
|
|
7
|
+
className: n,
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
viewBox: "0 0 640 640",
|
|
10
|
+
fill: "currentColor",
|
|
11
|
+
children: /* @__PURE__ */ s("path", { d: "M64 160C64 142.3 78.3 128 96 128L480 128C497.7 128 512 142.3 512 160C512 177.7 497.7 192 480 192L96 192C78.3 192 64 177.7 64 160zM128 320C128 302.3 142.3 288 160 288L544 288C561.7 288 576 302.3 576 320C576 337.7 561.7 352 544 352L160 352C142.3 352 128 337.7 128 320zM512 480C512 497.7 497.7 512 480 512L96 512C78.3 512 64 497.7 64 480C64 462.3 78.3 448 96 448L480 448C497.7 448 512 462.3 512 480z" })
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function o(r) {
|
|
3
16
|
const { className: n = "" } = r;
|
|
4
17
|
return /* @__PURE__ */ s(
|
|
5
18
|
"svg",
|
|
@@ -25,7 +38,7 @@ function c(r) {
|
|
|
25
38
|
}
|
|
26
39
|
);
|
|
27
40
|
}
|
|
28
|
-
function
|
|
41
|
+
function e(r) {
|
|
29
42
|
const { className: n = "" } = r;
|
|
30
43
|
return /* @__PURE__ */ s(
|
|
31
44
|
"svg",
|
|
@@ -38,7 +51,7 @@ function o(r) {
|
|
|
38
51
|
}
|
|
39
52
|
);
|
|
40
53
|
}
|
|
41
|
-
function
|
|
54
|
+
function a(r) {
|
|
42
55
|
const { className: n = "" } = r;
|
|
43
56
|
return /* @__PURE__ */ s(
|
|
44
57
|
"svg",
|
|
@@ -51,7 +64,7 @@ function e(r) {
|
|
|
51
64
|
}
|
|
52
65
|
);
|
|
53
66
|
}
|
|
54
|
-
function
|
|
67
|
+
function C(r) {
|
|
55
68
|
const { className: n = "" } = r;
|
|
56
69
|
return /* @__PURE__ */ s(
|
|
57
70
|
"svg",
|
|
@@ -64,15 +77,30 @@ function a(r) {
|
|
|
64
77
|
}
|
|
65
78
|
);
|
|
66
79
|
}
|
|
67
|
-
const
|
|
80
|
+
const w = (r) => {
|
|
68
81
|
const { className: n = "" } = r;
|
|
69
82
|
return /* @__PURE__ */ s("svg", { className: n, viewBox: "0 0 16 16", children: /* @__PURE__ */ s("path", { d: "M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z" }) });
|
|
70
83
|
};
|
|
84
|
+
function i(r) {
|
|
85
|
+
const { className: n = "" } = r;
|
|
86
|
+
return /* @__PURE__ */ s(
|
|
87
|
+
"svg",
|
|
88
|
+
{
|
|
89
|
+
className: n,
|
|
90
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
91
|
+
viewBox: "0 0 640 640",
|
|
92
|
+
fill: "currentColor",
|
|
93
|
+
children: /* @__PURE__ */ s("path", { d: "M96 160C96 124.7 124.7 96 160 96L480 96C515.3 96 544 124.7 544 160L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160zM160 224L160 480L288 480L288 224L160 224zM480 224L352 224L352 480L480 480L480 224z" })
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
71
97
|
export {
|
|
72
|
-
l as
|
|
73
|
-
|
|
74
|
-
|
|
98
|
+
l as B,
|
|
99
|
+
o as C,
|
|
100
|
+
C as E,
|
|
101
|
+
w as F,
|
|
102
|
+
i as T,
|
|
75
103
|
c as a,
|
|
76
|
-
|
|
77
|
-
|
|
104
|
+
e as b,
|
|
105
|
+
a as c
|
|
78
106
|
};
|
package/dist/TableOptions.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TableOptionsProvider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./TableOptionsProvider-i4uVLLwH.cjs");exports.TableOptionsProvider=e.TableOptionsProvider;exports.useTableOptions=e.useTableOptions;
|
package/dist/TableOptions.js
CHANGED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import { S as d } from "./query-CwuehjY1.js";
|
|
3
|
+
import { useState as o, useCallback as s, useMemo as B, createContext as J, useContext as K } from "react";
|
|
4
|
+
const H = [20, 50, 100], V = J(
|
|
5
|
+
void 0
|
|
6
|
+
), F = (n) => {
|
|
7
|
+
if (n === null || typeof n > "u") return !1;
|
|
8
|
+
if (typeof n == "string")
|
|
9
|
+
return n.trim().length > 0;
|
|
10
|
+
if (Array.isArray(n))
|
|
11
|
+
return n.length > 0;
|
|
12
|
+
if (typeof n == "object") {
|
|
13
|
+
const i = n;
|
|
14
|
+
return "start" in i || "end" in i ? F(i.start) || F(i.end) : !0;
|
|
15
|
+
}
|
|
16
|
+
return !0;
|
|
17
|
+
}, U = (n) => {
|
|
18
|
+
const { children: i, defaultHiddenColumns: b = [] } = n, [f, z] = o(0), [a, k] = o(20), [M, c] = o(0), [m, g] = o("id"), [u, p] = o(d.DESC), [h, l] = o({}), [x, S] = o(b), C = s(
|
|
19
|
+
(t, e) => e <= 0 ? 0 : Math.max(0, Math.ceil(t / e) - 1),
|
|
20
|
+
[]
|
|
21
|
+
), T = s(
|
|
22
|
+
(t) => {
|
|
23
|
+
const e = Number.isFinite(t) ? Math.max(0, t) : 0;
|
|
24
|
+
z(e), c(
|
|
25
|
+
(r) => Math.min(r, C(e, a))
|
|
26
|
+
);
|
|
27
|
+
},
|
|
28
|
+
[C, a]
|
|
29
|
+
), y = s((t) => {
|
|
30
|
+
!Number.isFinite(t) || t <= 0 || (k(t), c(0));
|
|
31
|
+
}, []), P = s(
|
|
32
|
+
(t) => {
|
|
33
|
+
if (!Number.isFinite(t)) return;
|
|
34
|
+
const e = Math.max(0, Math.floor(t));
|
|
35
|
+
c(Math.min(e, C(f, a)));
|
|
36
|
+
},
|
|
37
|
+
[C, a, f]
|
|
38
|
+
), A = s(
|
|
39
|
+
(t, e) => {
|
|
40
|
+
let r = u;
|
|
41
|
+
m === t && (u === d.ASC ? r = d.DESC : r = d.ASC), g(t), p(r), e && e(t, r);
|
|
42
|
+
},
|
|
43
|
+
[m, u]
|
|
44
|
+
), j = s((t) => {
|
|
45
|
+
const e = Object.entries(t).reduce(
|
|
46
|
+
(r, [G, O]) => (O && F(O.value) && (r[G] = O.value), r),
|
|
47
|
+
{}
|
|
48
|
+
);
|
|
49
|
+
l(e), c(0);
|
|
50
|
+
}, []), w = s(
|
|
51
|
+
(t) => {
|
|
52
|
+
l(t ? (e) => {
|
|
53
|
+
const r = { ...e };
|
|
54
|
+
return delete r[t], r;
|
|
55
|
+
} : {}), c(0);
|
|
56
|
+
},
|
|
57
|
+
[l]
|
|
58
|
+
), E = B(() => Object.keys(h).length, [h]), D = s((t) => {
|
|
59
|
+
S(
|
|
60
|
+
(e) => e.includes(t) ? e.filter((r) => r !== t) : [...e, t]
|
|
61
|
+
);
|
|
62
|
+
}, []), N = s(() => {
|
|
63
|
+
S(b), g("id"), p(d.DESC), l({}), c(0);
|
|
64
|
+
}, [b]), q = B(
|
|
65
|
+
() => ({
|
|
66
|
+
onSort: A,
|
|
67
|
+
total: f,
|
|
68
|
+
setTotal: T,
|
|
69
|
+
sortingBy: m,
|
|
70
|
+
setSortingBy: g,
|
|
71
|
+
sortingOrder: u,
|
|
72
|
+
setSortingOrder: p,
|
|
73
|
+
pageSize: a,
|
|
74
|
+
pageSizes: H,
|
|
75
|
+
setPageSize: y,
|
|
76
|
+
currentPage: M,
|
|
77
|
+
setCurrentPage: P,
|
|
78
|
+
filters: h,
|
|
79
|
+
onFilterApply: j,
|
|
80
|
+
clearFilters: w,
|
|
81
|
+
countOfFilters: E,
|
|
82
|
+
hiddenColumns: x,
|
|
83
|
+
toggleColumn: D,
|
|
84
|
+
setHiddenColumns: S,
|
|
85
|
+
resetTableOptions: N
|
|
86
|
+
}),
|
|
87
|
+
[
|
|
88
|
+
A,
|
|
89
|
+
f,
|
|
90
|
+
T,
|
|
91
|
+
m,
|
|
92
|
+
g,
|
|
93
|
+
u,
|
|
94
|
+
p,
|
|
95
|
+
a,
|
|
96
|
+
H,
|
|
97
|
+
y,
|
|
98
|
+
M,
|
|
99
|
+
P,
|
|
100
|
+
h,
|
|
101
|
+
j,
|
|
102
|
+
w,
|
|
103
|
+
E,
|
|
104
|
+
x,
|
|
105
|
+
D,
|
|
106
|
+
S,
|
|
107
|
+
N
|
|
108
|
+
]
|
|
109
|
+
);
|
|
110
|
+
return /* @__PURE__ */ I(V.Provider, { value: q, children: i });
|
|
111
|
+
}, W = () => {
|
|
112
|
+
const n = K(V);
|
|
113
|
+
if (!n)
|
|
114
|
+
throw new Error("tableOptionsContext must be used within a Provider");
|
|
115
|
+
return n;
|
|
116
|
+
};
|
|
117
|
+
export {
|
|
118
|
+
U as T,
|
|
119
|
+
W as u
|
|
120
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const z=require("react/jsx-runtime"),l=require("./query-81BrXp3i.cjs"),e=require("react"),E=[20,50,100],D=e.createContext(void 0),p=n=>{if(n===null||typeof n>"u")return!1;if(typeof n=="string")return n.trim().length>0;if(Array.isArray(n))return n.length>0;if(typeof n=="object"){const o=n;return"start"in o||"end"in o?p(o.start)||p(o.end):!0}return!0},R=n=>{const{children:o,defaultHiddenColumns:m=[]}=n,[d,N]=e.useState(0),[i,B]=e.useState(20),[M,a]=e.useState(0),[S,f]=e.useState("id"),[u,b]=e.useState(l.SortOrder.DESC),[C,c]=e.useState({}),[F,g]=e.useState(m),O=e.useCallback((t,r)=>r<=0?0:Math.max(0,Math.ceil(t/r)-1),[]),x=e.useCallback(t=>{const r=Number.isFinite(t)?Math.max(0,t):0;N(r),a(s=>Math.min(s,O(r,i)))},[O,i]),k=e.useCallback(t=>{!Number.isFinite(t)||t<=0||(B(t),a(0))},[]),T=e.useCallback(t=>{if(!Number.isFinite(t))return;const r=Math.max(0,Math.floor(t));a(Math.min(r,O(d,i)))},[O,i,d]),y=e.useCallback((t,r)=>{let s=u;S===t&&(u===l.SortOrder.ASC?s=l.SortOrder.DESC:s=l.SortOrder.ASC),f(t),b(s),r&&r(t,s)},[S,u]),P=e.useCallback(t=>{const r=Object.entries(t).reduce((s,[V,h])=>(h&&p(h.value)&&(s[V]=h.value),s),{});c(r),a(0)},[]),j=e.useCallback(t=>{c(t?r=>{const s={...r};return delete s[t],s}:{}),a(0)},[c]),A=e.useMemo(()=>Object.keys(C).length,[C]),q=e.useCallback(t=>{g(r=>r.includes(t)?r.filter(s=>s!==t):[...r,t])},[]),w=e.useCallback(()=>{g(m),f("id"),b(l.SortOrder.DESC),c({}),a(0)},[m]),H=e.useMemo(()=>({onSort:y,total:d,setTotal:x,sortingBy:S,setSortingBy:f,sortingOrder:u,setSortingOrder:b,pageSize:i,pageSizes:E,setPageSize:k,currentPage:M,setCurrentPage:T,filters:C,onFilterApply:P,clearFilters:j,countOfFilters:A,hiddenColumns:F,toggleColumn:q,setHiddenColumns:g,resetTableOptions:w}),[y,d,x,S,f,u,b,i,E,k,M,T,C,P,j,A,F,q,g,w]);return z.jsx(D.Provider,{value:H,children:o})},G=()=>{const n=e.useContext(D);if(!n)throw new Error("tableOptionsContext must be used within a Provider");return n};exports.TableOptionsProvider=R;exports.useTableOptions=G;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLProps } from 'react';
|
|
2
2
|
import { BaseInputPropsType } from '../types';
|
|
3
|
-
export interface CheckInputPropsType extends HTMLProps<HTMLInputElement>, Omit<BaseInputPropsType, "value" | "onChange"> {
|
|
3
|
+
export interface CheckInputPropsType extends Omit<HTMLProps<HTMLInputElement>, "label">, Omit<BaseInputPropsType, "value" | "onChange"> {
|
|
4
4
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLProps, ReactNode } from 'react';
|
|
2
2
|
import { BaseInputPropsType } from '../types';
|
|
3
|
-
export interface FileInputPropsType extends Omit<HTMLProps<HTMLInputElement>, "value">, Omit<BaseInputPropsType, "value" | "label"> {
|
|
3
|
+
export interface FileInputPropsType extends Omit<HTMLProps<HTMLInputElement>, "value" | "label">, Omit<BaseInputPropsType, "value" | "label"> {
|
|
4
4
|
iconClassName?: string;
|
|
5
5
|
multiple?: boolean;
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
label: string;
|
|
7
|
+
label: string | ReactNode;
|
|
8
8
|
onClear?: () => void;
|
|
9
9
|
}
|
|
@@ -5,6 +5,6 @@ export type Option = {
|
|
|
5
5
|
value?: number | string;
|
|
6
6
|
name?: string;
|
|
7
7
|
};
|
|
8
|
-
export interface SelectInputPropsType extends Omit<HTMLProps<HTMLSelectElement>, "value">, BaseInputPropsType<string | number | readonly string[] | undefined> {
|
|
8
|
+
export interface SelectInputPropsType extends Omit<HTMLProps<HTMLSelectElement>, "value" | "label">, BaseInputPropsType<string | number | readonly string[] | undefined> {
|
|
9
9
|
options: Option[];
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLProps, ReactNode } from 'react';
|
|
2
2
|
import { BaseInputPropsType } from '../types';
|
|
3
|
-
export interface TextInputPropsType extends Omit<HTMLProps<HTMLInputElement>, "value">, BaseInputPropsType<string | number | readonly string[] | undefined> {
|
|
3
|
+
export interface TextInputPropsType extends Omit<HTMLProps<HTMLInputElement>, "value" | "label">, BaseInputPropsType<string | number | readonly string[] | undefined> {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { State } from './utils';
|
|
2
3
|
export type BaseInputPropsType<TValue = unknown> = {
|
|
3
4
|
state?: State;
|
|
4
5
|
value: TValue;
|
|
5
6
|
name?: string;
|
|
6
7
|
id?: string;
|
|
7
|
-
label?: string;
|
|
8
|
+
label?: string | ReactNode;
|
|
8
9
|
containerClassName?: string;
|
|
9
10
|
inputClassName?: string;
|
|
10
11
|
labelClassName?: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IconProps } from 'main';
|
|
2
|
+
/**
|
|
3
|
+
* Staggered bars icon — used in the Table reset button to restore default filters, sort, and column visibility.
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
|
+
* @returns Function result.
|
|
6
|
+
*/
|
|
7
|
+
export declare function BarsStaggered(props: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Renders the ChevronDown component.
|
|
4
|
-
* @param props -
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
5
|
* @returns Function result.
|
|
6
6
|
*/
|
|
7
7
|
export declare function ChevronDown(props: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Renders the ChevronLeft component.
|
|
4
|
-
* @param props -
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
5
|
* @returns Function result.
|
|
6
6
|
*/
|
|
7
7
|
export declare function ChevronLeft(props: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Renders the ChevronRight component.
|
|
4
|
-
* @param props -
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
5
|
* @returns Function result.
|
|
6
6
|
*/
|
|
7
7
|
export declare function ChevronRight(props: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Renders the ChevronUp component.
|
|
4
|
-
* @param props -
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
5
|
* @returns Function result.
|
|
6
6
|
*/
|
|
7
7
|
export declare function ChevronUp(props: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Renders the Close component.
|
|
4
|
-
* @param props -
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
5
|
* @returns Function result.
|
|
6
6
|
*/
|
|
7
7
|
export declare function Close(props: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Renders the Ellipsis component.
|
|
4
|
-
* @param props -
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
5
|
* @returns Function result.
|
|
6
6
|
*/
|
|
7
7
|
export declare function Ellipsis(props: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Renders the File component.
|
|
4
|
-
* @param props -
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
5
|
* @returns Function result.
|
|
6
6
|
*/
|
|
7
7
|
export declare function File(props: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconProps } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Renders the Filters component.
|
|
4
|
-
* @param props -
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
5
|
* @returns Function result.
|
|
6
6
|
*/
|
|
7
7
|
export declare const Filters: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IconProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Table columns icon — used in the ColumnVisibilityMenu to toggle column visibility.
|
|
4
|
+
* @param props - {@link IconProps}
|
|
5
|
+
* @returns Function result.
|
|
6
|
+
*/
|
|
7
|
+
export declare function TableColumns(props: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './BarsStaggered';
|
|
1
2
|
export * from './ChevronDown';
|
|
2
3
|
export * from './ChevronLeft';
|
|
3
4
|
export * from './ChevronRight';
|
|
@@ -6,4 +7,5 @@ export * from './Close';
|
|
|
6
7
|
export * from './Ellipsis';
|
|
7
8
|
export * from './File';
|
|
8
9
|
export * from './Filters';
|
|
10
|
+
export * from './TableColumns';
|
|
9
11
|
export * from './types';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseDto } from '../../../lib';
|
|
2
|
+
import { ColumnType } from './types';
|
|
3
|
+
type ColumnVisibilityMenuPropsType<TRow extends BaseDto> = {
|
|
4
|
+
columns: ColumnType<TRow>[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Renders the ColumnVisibilityMenu component.
|
|
8
|
+
* @param props - props parameter.
|
|
9
|
+
* @returns Function result.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ColumnVisibilityMenu<TRow extends BaseDto>(props: ColumnVisibilityMenuPropsType<TRow>): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export {};
|
|
@@ -17,6 +17,8 @@ export type ColumnType<TRow extends BaseDto> = {
|
|
|
17
17
|
};
|
|
18
18
|
className?: string;
|
|
19
19
|
display?: "visible" | "none";
|
|
20
|
+
/** if the column can be toggled visible/hidden by the user */
|
|
21
|
+
hideable?: boolean;
|
|
20
22
|
/** column position from 0 */
|
|
21
23
|
pos?: number;
|
|
22
24
|
/** custom body of the cell */
|
|
@@ -3,6 +3,7 @@ import { ColumnType } from './components/types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns columns sorted by position (descending) with hidden columns filtered out.
|
|
5
5
|
* @param columns - Array of column definitions to sort and filter.
|
|
6
|
+
* @param hiddenColumns - Array of column keys to hide at runtime.
|
|
6
7
|
* @returns Sorted and filtered array of visible columns.
|
|
7
8
|
*/
|
|
8
|
-
export declare function getSortedVisibleColumns<TRow extends BaseDto>(columns: ColumnType<TRow>[]): ColumnType<TRow>[];
|
|
9
|
+
export declare function getSortedVisibleColumns<TRow extends BaseDto>(columns: ColumnType<TRow>[], hiddenColumns?: string[]): ColumnType<TRow>[];
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var h=require("./index.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./lib.cjs"),s=require("./query-81BrXp3i.cjs"),e=require("./Table-CWcHaZeQ.cjs"),a=require("./Badge-Z78MlGoQ.cjs"),u=require("./Button-BlYa3uPc.cjs"),p=require("./Chip-D17UJHW6.cjs"),c=require("./Dropdown-CR8mco5s.cjs"),t=require("./TextInput-C27RFuya.cjs"),C=require("./FileInput-CqzVk1gQ.cjs"),T=require("./IconButton-CVnmT2E9.cjs"),d=require("./Loading-CNECRan-.cjs"),r=require("./TableColumns-BjTNomZf.cjs"),F=require("./Close-O9P7wJGf.cjs"),b=require("./File-_Hjw2d3F.cjs"),v=require("./Tooltip-BSKAgRkc.cjs"),o=require("./FiltersProvider-DVMj0LV0.cjs"),i=require("./TableOptionsProvider-i4uVLLwH.cjs"),n=require("./TranslationProvider-Czr0WIDH.cjs");exports.FilterTypes=l.FilterTypes;exports.SortOrder=s.SortOrder;exports.Action=e.Action;exports.Actions=e.Actions;exports.ActionsDropdown=e.ActionsDropdown;exports.ActiveFilters=e.ActiveFilters;exports.ArrayChip=e.ArrayChip;exports.ColumnVisibilityMenu=e.ColumnVisibilityMenu;exports.Columns=e.Columns;exports.CountOfTotal=e.CountOfTotal;exports.FilterDropdown=e.FilterDropdown;exports.Footer=e.Footer;exports.Navigation=e.Navigation;exports.PageSize=e.PageSize;exports.RangeChip=e.RangeChip;exports.Rows=e.Rows;exports.Table=e.Table;exports.TableEmpty=e.TableEmpty;exports.TableHeader=e.TableHeader;exports.TableSelectionBar=e.TableSelectionBar;exports.renderFilterComponent=e.renderFilterComponent;exports.Badge=a.Badge;exports.Button=u.Button;exports.Chip=p.Chip;exports.Dropdown=c.Dropdown;exports.AutocompleteInput=t.AutocompleteInput;exports.CheckInput=t.CheckInput;exports.SelectInput=t.SelectInput;exports.State=t.State;exports.TextInput=t.TextInput;exports.helperTextStateClassName=t.helperTextStateClassName;exports.inputStateClassName=t.inputStateClassName;exports.labelStateClassName=t.labelStateClassName;exports.FileInput=C.FileInput;exports.IconButton=T.IconButton;exports.Loading=d.Loading;exports.BarsStaggered=r.BarsStaggered;exports.ChevronDown=r.ChevronDown;exports.ChevronLeft=r.ChevronLeft;exports.ChevronRight=r.ChevronRight;exports.ChevronUp=r.ChevronUp;exports.Ellipsis=r.Ellipsis;exports.Filters=r.Filters;exports.TableColumns=r.TableColumns;exports.Close=F.Close;exports.File=b.File;exports.Tooltip=v.Tooltip;exports.FiltersActions=o.FiltersActions;exports.FiltersProvider=o.FiltersProvider;exports.filtersReducer=o.filtersReducer;exports.initializer=o.initializer;exports.useFilters=o.useFilters;exports.TableOptionsProvider=i.TableOptionsProvider;exports.useTableOptions=i.useTableOptions;exports.TranslationProvider=n.TranslationProvider;exports.useTranslation=n.useTranslation;
|