@sito/dashboard 0.0.67 → 0.0.69
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/README.md +7 -0
- package/dist/{Dropdown-CAxauIXt.cjs → Dropdown-CR8mco5s.cjs} +1 -1
- package/dist/{Dropdown-CbaxuMbk.js → Dropdown-D-fYEGo2.js} +13 -14
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.css +1 -1
- package/dist/Dropdown.js +1 -1
- package/dist/FileInput-CqzVk1gQ.cjs +1 -0
- package/dist/{FileInput-DCR_Pyqe.js → FileInput-Cr4TxWUg.js} +34 -32
- package/dist/FiltersProvider-BoCTMqk8.js +60 -0
- package/dist/FiltersProvider-Bxge43VS.cjs +1 -0
- package/dist/FiltersProvider.cjs +1 -1
- package/dist/FiltersProvider.js +1 -1
- package/dist/Form.cjs +1 -1
- package/dist/Form.js +2 -2
- package/dist/Table-BLhy0EYJ.cjs +1 -0
- package/dist/Table-CeD0yXGZ.js +1113 -0
- package/dist/Table.cjs +1 -1
- package/dist/Table.css +1 -1
- package/dist/Table.js +1 -1
- package/dist/TableOptions.cjs +1 -1
- package/dist/TableOptions.js +1 -1
- package/dist/TableOptionsProvider-BJdeNIQj.cjs +1 -0
- package/dist/TableOptionsProvider-DBr-FW53.js +106 -0
- package/dist/TextInput-C27RFuya.cjs +1 -0
- package/dist/TextInput-DPYxzgm3.js +335 -0
- package/dist/TextInput.css +1 -1
- package/dist/Translation.cjs +1 -1
- package/dist/Translation.js +1 -1
- package/dist/{TranslationProvider-COebIyxr.js → TranslationProvider-BR4s--Vu.js} +2 -2
- package/dist/TranslationProvider-Czr0WIDH.cjs +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Form/FileInput/types.d.ts +1 -1
- package/dist/components/Table/components/types.d.ts +1 -1
- package/dist/components/Table/types.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +7 -7
- package/dist/providers/Translation/TranslationProvider.d.ts +5 -4
- package/package.json +1 -1
- package/dist/FileInput-Ch-GCxrS.cjs +0 -1
- package/dist/FiltersProvider-CY2fsw_F.js +0 -57
- package/dist/FiltersProvider-CYqLFEI9.cjs +0 -1
- package/dist/Table-BtZGG0d7.js +0 -1056
- package/dist/Table-DjIhOMXQ.cjs +0 -1
- package/dist/TableOptionsProvider-BchUDA3B.cjs +0 -1
- package/dist/TableOptionsProvider-BfQS8l1N.js +0 -50
- package/dist/TextInput-BqW5YX-3.js +0 -320
- package/dist/TextInput-CY1fh4mf.cjs +0 -1
- package/dist/TranslationProvider-51Pc9Xrr.cjs +0 -1
- package/dist/components/Actions/Actions.stories.d.ts +0 -20
- package/dist/components/Actions/Actions.test.d.ts +0 -1
- package/dist/components/Actions/ActionsDropdown.stories.d.ts +0 -17
- package/dist/components/Actions/ActionsDropdown.test.d.ts +0 -1
- package/dist/components/Badge/Badge.stories.d.ts +0 -8
- package/dist/components/Button/Button.stories.d.ts +0 -29
- package/dist/components/Chip/Chip.stories.d.ts +0 -9
- package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -8
- package/dist/components/Dropdown/Dropdown.test.d.ts +0 -1
- package/dist/components/Form/AutocompleteInput/AutocompleteInput.stories.d.ts +0 -8
- package/dist/components/Form/CheckInput/CheckInput.stories.d.ts +0 -6
- package/dist/components/Form/FileInput/FileInput.stories.d.ts +0 -7
- package/dist/components/Form/FileInput/FileInput.test.d.ts +0 -1
- package/dist/components/Form/FileInput/utils.test.d.ts +0 -1
- package/dist/components/Form/SelectInput/SelectInput.stories.d.ts +0 -7
- package/dist/components/Form/TextInput/TextInput.stories.d.ts +0 -10
- package/dist/components/Form/TextInput/TextInput.test.d.ts +0 -1
- package/dist/components/Form/utils.test.d.ts +0 -1
- package/dist/components/IconButton/IconButton.stories.d.ts +0 -30
- package/dist/components/Loading/Loading.stories.d.ts +0 -7
- package/dist/components/Table/Table.expandable.test.d.ts +0 -1
- package/dist/components/Table/Table.selection.test.d.ts +0 -1
- package/dist/components/Table/Table.stories.d.ts +0 -18
- package/dist/components/Table/components/Filters/FilterDropdown/FilterDropdown.test.d.ts +0 -1
- package/dist/components/Table/components/TableSelectionBar.test.d.ts +0 -1
- package/dist/components/Table/utils.test.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -6
- package/dist/providers/FiltersProvider/utils.test.d.ts +0 -1
- package/dist/providers/TableOptions/TableOptionsProvider.test.d.ts +0 -1
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-BLhy0EYJ.cjs");exports.ActiveFilters=e.ActiveFilters;exports.ArrayChip=e.ArrayChip;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) * 9);width:calc(var(--spacing,.25rem) * 9);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-button{font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}.filter-dropdown-button.normal{padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 2)}.filter-dropdown-button.small{padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:calc(var(--spacing,.25rem) * .5)}.filter-dropdown-trigger-icon{height:calc(var(--spacing,.25rem) * 4);width:calc(var(--spacing,.25rem) * 4);fill:currentColor}.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-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%}.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}}}.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}
|
package/dist/Table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, a as o, C as r, b as t, F as i, c as l, N as n, P as p, R as C, d as T, g as b, T as F, e as d, f as g, r as m } from "./Table-
|
|
1
|
+
import { A as s, a as o, C as r, b as t, F as i, c as l, N as n, P as p, R as C, d as T, g as b, T as F, e as d, f as g, r as m } from "./Table-CeD0yXGZ.js";
|
|
2
2
|
export {
|
|
3
3
|
s as ActiveFilters,
|
|
4
4
|
o as ArrayChip,
|
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-BJdeNIQj.cjs");exports.TableOptionsProvider=e.TableOptionsProvider;exports.useTableOptions=e.useTableOptions;
|
package/dist/TableOptions.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const N=require("react/jsx-runtime"),b=require("./query-81BrXp3i.cjs"),e=require("react"),T=[20,50,100],j=e.createContext(void 0),h=s=>{if(s===null||typeof s>"u")return!1;if(typeof s=="string")return s.trim().length>0;if(Array.isArray(s))return s.length>0;if(typeof s=="object"){const o=s;return"start"in o||"end"in o?h(o.start)||h(o.end):!0}return!0},B=s=>{const{children:o}=s,[c,A]=e.useState(0),[i,q]=e.useState(20),[C,a]=e.useState(0),[l,g]=e.useState("id"),[u,p]=e.useState(b.SortOrder.DESC),[d,f]=e.useState({}),S=e.useCallback((t,r)=>r<=0?0:Math.max(0,Math.ceil(t/r)-1),[]),m=e.useCallback(t=>{const r=Number.isFinite(t)?Math.max(0,t):0;A(r),a(n=>Math.min(n,S(r,i)))},[S,i]),M=e.useCallback(t=>{!Number.isFinite(t)||t<=0||(q(t),a(0))},[]),F=e.useCallback(t=>{if(!Number.isFinite(t))return;const r=Math.max(0,Math.floor(t));a(Math.min(r,S(c,i)))},[S,i,c]),x=e.useCallback((t,r)=>{let n=u;l===t&&(u===b.SortOrder.ASC?n=b.SortOrder.DESC:n=b.SortOrder.ASC),g(t),p(n),r&&r(t,n)},[l,u]),y=e.useCallback(t=>{const r=Object.entries(t).reduce((n,[E,O])=>(O&&h(O.value)&&(n[E]=O.value),n),{});f(r),a(0)},[]),k=e.useCallback(t=>{f(t?r=>{const n={...r};return delete n[t],n}:{}),a(0)},[f]),P=e.useMemo(()=>Object.keys(d).length,[d]),w=e.useMemo(()=>({onSort:x,total:c,setTotal:m,sortingBy:l,setSortingBy:g,sortingOrder:u,setSortingOrder:p,pageSize:i,pageSizes:T,setPageSize:M,currentPage:C,setCurrentPage:F,filters:d,onFilterApply:y,clearFilters:k,countOfFilters:P}),[x,c,m,l,g,u,p,i,T,M,C,F,d,y,k,P]);return N.jsx(j.Provider,{value:w,children:o})},D=()=>{const s=e.useContext(j);if(!s)throw new Error("tableOptionsContext must be used within a Provider");return s};exports.TableOptionsProvider=B;exports.useTableOptions=D;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx as V } from "react/jsx-runtime";
|
|
2
|
+
import { S as g } from "./query-CwuehjY1.js";
|
|
3
|
+
import { useState as a, useCallback as s, useMemo as j, createContext as z, useContext as q } from "react";
|
|
4
|
+
const w = [20, 50, 100], E = z(
|
|
5
|
+
void 0
|
|
6
|
+
), O = (r) => {
|
|
7
|
+
if (r === null || typeof r > "u") return !1;
|
|
8
|
+
if (typeof r == "string")
|
|
9
|
+
return r.trim().length > 0;
|
|
10
|
+
if (Array.isArray(r))
|
|
11
|
+
return r.length > 0;
|
|
12
|
+
if (typeof r == "object") {
|
|
13
|
+
const o = r;
|
|
14
|
+
return "start" in o || "end" in o ? O(o.start) || O(o.end) : !0;
|
|
15
|
+
}
|
|
16
|
+
return !0;
|
|
17
|
+
}, I = (r) => {
|
|
18
|
+
const { children: o } = r, [l, N] = a(0), [i, k] = a(20), [F, c] = a(0), [f, h] = a("id"), [u, S] = a(g.DESC), [d, p] = a({}), m = s(
|
|
19
|
+
(t, e) => e <= 0 ? 0 : Math.max(0, Math.ceil(t / e) - 1),
|
|
20
|
+
[]
|
|
21
|
+
), M = s(
|
|
22
|
+
(t) => {
|
|
23
|
+
const e = Number.isFinite(t) ? Math.max(0, t) : 0;
|
|
24
|
+
N(e), c(
|
|
25
|
+
(n) => Math.min(n, m(e, i))
|
|
26
|
+
);
|
|
27
|
+
},
|
|
28
|
+
[m, i]
|
|
29
|
+
), x = s((t) => {
|
|
30
|
+
!Number.isFinite(t) || t <= 0 || (k(t), c(0));
|
|
31
|
+
}, []), C = s(
|
|
32
|
+
(t) => {
|
|
33
|
+
if (!Number.isFinite(t)) return;
|
|
34
|
+
const e = Math.max(0, Math.floor(t));
|
|
35
|
+
c(Math.min(e, m(l, i)));
|
|
36
|
+
},
|
|
37
|
+
[m, i, l]
|
|
38
|
+
), y = s(
|
|
39
|
+
(t, e) => {
|
|
40
|
+
let n = u;
|
|
41
|
+
f === t && (u === g.ASC ? n = g.DESC : n = g.ASC), h(t), S(n), e && e(t, n);
|
|
42
|
+
},
|
|
43
|
+
[f, u]
|
|
44
|
+
), P = s((t) => {
|
|
45
|
+
const e = Object.entries(t).reduce(
|
|
46
|
+
(n, [D, b]) => (b && O(b.value) && (n[D] = b.value), n),
|
|
47
|
+
{}
|
|
48
|
+
);
|
|
49
|
+
p(e), c(0);
|
|
50
|
+
}, []), T = s(
|
|
51
|
+
(t) => {
|
|
52
|
+
p(t ? (e) => {
|
|
53
|
+
const n = { ...e };
|
|
54
|
+
return delete n[t], n;
|
|
55
|
+
} : {}), c(0);
|
|
56
|
+
},
|
|
57
|
+
[p]
|
|
58
|
+
), A = j(() => Object.keys(d).length, [d]), B = j(
|
|
59
|
+
() => ({
|
|
60
|
+
onSort: y,
|
|
61
|
+
total: l,
|
|
62
|
+
setTotal: M,
|
|
63
|
+
sortingBy: f,
|
|
64
|
+
setSortingBy: h,
|
|
65
|
+
sortingOrder: u,
|
|
66
|
+
setSortingOrder: S,
|
|
67
|
+
pageSize: i,
|
|
68
|
+
pageSizes: w,
|
|
69
|
+
setPageSize: x,
|
|
70
|
+
currentPage: F,
|
|
71
|
+
setCurrentPage: C,
|
|
72
|
+
filters: d,
|
|
73
|
+
onFilterApply: P,
|
|
74
|
+
clearFilters: T,
|
|
75
|
+
countOfFilters: A
|
|
76
|
+
}),
|
|
77
|
+
[
|
|
78
|
+
y,
|
|
79
|
+
l,
|
|
80
|
+
M,
|
|
81
|
+
f,
|
|
82
|
+
h,
|
|
83
|
+
u,
|
|
84
|
+
S,
|
|
85
|
+
i,
|
|
86
|
+
w,
|
|
87
|
+
x,
|
|
88
|
+
F,
|
|
89
|
+
C,
|
|
90
|
+
d,
|
|
91
|
+
P,
|
|
92
|
+
T,
|
|
93
|
+
A
|
|
94
|
+
]
|
|
95
|
+
);
|
|
96
|
+
return /* @__PURE__ */ V(E.Provider, { value: B, children: o });
|
|
97
|
+
}, J = () => {
|
|
98
|
+
const r = q(E);
|
|
99
|
+
if (!r)
|
|
100
|
+
throw new Error("tableOptionsContext must be used within a Provider");
|
|
101
|
+
return r;
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
I as T,
|
|
105
|
+
J as u
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var G=require("./TextInput.css");const a=require("react/jsx-runtime"),l=require("react"),L=require("./Chip-D17UJHW6.cjs"),U=require("./IconButton-CVnmT2E9.cjs"),M=require("./Close-O9P7wJGf.cjs"),O=l.forwardRef(function(n,N){const{state:v,value:e,onChange:s,options:p=[],name:g="",id:m="",label:i="",containerClassName:j="",inputContainerClassName:d="",helperText:f="",placeholder:b="",multiple:u=!1,...y}=n,[c,r]=l.useState("");l.useEffect(()=>{if(!u&&e&&!Array.isArray(e)){r(String(e.value??e.name??""));return}r("")},[u,e]);const[T,$]=l.useState(!1),k=l.useMemo(()=>p.filter(t=>{const o=String(t.value??t.name).toLowerCase().includes(c?.toLowerCase());return Array.isArray(e)&&e.length?o&&!e.some(C=>C.id===t.id):e&&!Array.isArray(e)?o&&e.id!==t.id:o}),[p,e,c]),x=l.useRef(null),R=l.useRef(null),[F,E]=l.useState(!1),S=l.useRef(null);l.useEffect(()=>{const t=C=>{x.current&&!x.current.contains(C.target)&&$(!1)},o=C=>{C.key==="Escape"&&$(!1)};return document.addEventListener("mousedown",t),document.addEventListener("keydown",o),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("keydown",o)}},[]);const B=l.useCallback(t=>{r(t.target.value)},[]),h=l.useCallback(t=>{t?u?(r(""),Array.isArray(e)&&e.length?s([...e,t]):s([t])):(r(String(t.name??t.value??"")),s(t)):s(null),$(!1)},[u,s,e]),D=l.useCallback(t=>{if(!Array.isArray(e)){s(null);return}const o=e.filter((C,H)=>H!==t);o.length?s(o):s(null)},[s,e]),W=l.useCallback(()=>{Array.isArray(e)&&s([e[0]])},[s,e]);return l.useLayoutEffect(()=>{const t=S.current?.offsetWidth??0,o=x.current?.offsetWidth??0;E(t>o*.4)},[e]),a.jsxs("div",{className:`autocomplete-input-container ${j}`,ref:x,children:[a.jsxs("div",{className:"autocomplete-value-input-container",children:[a.jsx(V,{state:v,name:g,id:m,value:c,onChange:B,placeholder:b,helperText:f,onFocus:()=>$(!0),label:i,containerClassName:`autocomplete-text-input ${d}`,ref:N??R,...y,children:!u&&e&&!Array.isArray(e)&&(e.value||e.name)&&a.jsx(U.IconButton,{icon:a.jsx(M.Close,{}),className:"autocomplete-delete-button",onClick:t=>{h(),t.stopPropagation()}})}),u&&Array.isArray(e)&&e.length?a.jsx("ul",{ref:S,className:"autocomplete-value-container",children:F?a.jsxs(a.Fragment,{children:[a.jsx("li",{children:a.jsx(L.Chip,{text:e[0]?.value??e[0]?.name,onDelete:t=>{D(0),t.stopPropagation()}})}),e.length>1&&a.jsx("li",{children:a.jsx(L.Chip,{text:`+${e.length-1}`,onDelete:t=>{W(),t.stopPropagation()}})})]}):e.map((t,o)=>a.jsx("li",{children:a.jsx(L.Chip,{text:String(t.value??t.name),onDelete:C=>{D(o),C.stopPropagation()}})},t.id??t.value??t.name))}):null]}),T&&a.jsx("ul",{className:"autocomplete-suggestions-container",style:{width:x.current?.offsetWidth},children:k.map(t=>a.jsx("li",{className:"autocomplete-suggestion-item",onClick:o=>{h(t),o.stopPropagation()},children:t.value??t.name},t.id??t.value??t.name))})]})});var A=(n=>(n.error="error",n.good="good",n.default="default",n))(A||{});const w=n=>{switch(n){case"error":return"input-error";case"good":return"input-good";default:return"input-normal"}},I=n=>{switch(n){case"error":return"input-label-error";case"good":return"input-label-good";default:return"input-label-normal"}},q=n=>{switch(n){case"error":return"input-helper-text-error";case"good":return"input-helper-text-good";default:return"input-helper-text-normal"}},_=l.forwardRef(function(n,N){const{checked:v,onChange:e,name:s="",id:p="",label:g="",state:m=A.default,containerClassName:i="",inputClassName:j="",labelClassName:d="",...f}=n;return a.jsxs("label",{className:`input-check-container ${i}`,children:[a.jsx("input",{id:p,ref:N,name:s,type:"checkbox",checked:v,onChange:e,className:`input-check ${w(m)} ${j}`,...f}),a.jsx("span",{className:`input-check-label ${I(m)} ${d}`,children:g})]})}),z=l.forwardRef(function(n,N){const{value:v,onChange:e,options:s,containerClassName:p="",inputClassName:g="",labelClassName:m="",helperText:i="",helperTextClassName:j="",label:d="",name:f="",id:b="",state:u=A.default,children:y,...c}=n;return a.jsxs("div",{className:`select-input-container ${p}`,children:[a.jsx("select",{...c,id:b,ref:N,name:f,value:v,onChange:e,className:`select-input ${w(u)} peer ${g}`,children:s?.map(r=>a.jsx("option",{value:r.id,children:r.value??r.name??r.id},r.id))}),a.jsx("label",{htmlFor:b,className:`select-input-label ${I(u)} ${m}`,children:d}),y,i&&a.jsx("p",{className:`select-input-helper-text ${q(u)} ${j}`,children:i})]})}),P=n=>n==null?!1:Array.isArray(n)?n.length>0:`${n}`.length>0,V=l.forwardRef(function(n,N){const{children:v,state:e=A.default,label:s="",containerClassName:p="",inputClassName:g="",labelClassName:m="",helperText:i="",helperTextClassName:j="",value:d,defaultValue:f,onChange:b,onFocus:u,onBlur:y,...c}=n,r=d!==void 0,[T,$]=l.useState(()=>P(f)),[k,x]=l.useState(!1),R=r?P(d):T,F=!!c.placeholder||k,E=h=>{r||$(h.currentTarget.value.length>0),b?.(h)},S=h=>{k||x(!0),u?.(h)},B=h=>{k||x(!0),y?.(h)};return a.jsxs("div",{className:`text-input-container ${p}`,children:[a.jsx("input",{ref:N,defaultValue:f,onChange:E,onFocus:S,onBlur:B,...r?{value:d}:{},className:`text-input ${w(e)} ${g} ${R?"has-value":""} ${c.placeholder?"has-placeholder":""} ${F?"keep-label-up":""}`,...c}),!!s&&a.jsxs("label",{htmlFor:c.id,className:`text-input-label ${I(e)} ${m}`,children:[s,c.required?" *":""]}),v,!!i&&a.jsx("p",{className:`text-input-helper-text ${q(e)} ${j}`,children:i})]})});exports.AutocompleteInput=O;exports.CheckInput=_;exports.SelectInput=z;exports.State=A;exports.TextInput=V;exports.helperTextStateClassName=q;exports.inputStateClassName=w;exports.labelStateClassName=I;
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import "./TextInput.css";
|
|
2
|
+
import { jsxs as x, jsx as n, Fragment as z } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as F, useState as w, useEffect as U, useMemo as G, useRef as R, useCallback as T, useLayoutEffect as J } from "react";
|
|
4
|
+
import { C as V } from "./Chip-C5ogKbFn.js";
|
|
5
|
+
import { I as K } from "./IconButton-BpsTEj0z.js";
|
|
6
|
+
import { C as Q } from "./Close-rKC9AcNX.js";
|
|
7
|
+
const le = F(function(a, N) {
|
|
8
|
+
const {
|
|
9
|
+
state: v,
|
|
10
|
+
value: e,
|
|
11
|
+
onChange: l,
|
|
12
|
+
options: h = [],
|
|
13
|
+
name: g = "",
|
|
14
|
+
id: m = "",
|
|
15
|
+
label: i = "",
|
|
16
|
+
containerClassName: $ = "",
|
|
17
|
+
inputContainerClassName: u = "",
|
|
18
|
+
helperText: p = "",
|
|
19
|
+
placeholder: y = "",
|
|
20
|
+
multiple: o = !1,
|
|
21
|
+
...A
|
|
22
|
+
} = a, [c, r] = w("");
|
|
23
|
+
U(() => {
|
|
24
|
+
if (!o && e && !Array.isArray(e)) {
|
|
25
|
+
r(String(e.value ?? e.name ?? ""));
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
r("");
|
|
29
|
+
}, [o, e]);
|
|
30
|
+
const [E, b] = w(!1), k = G(
|
|
31
|
+
() => h.filter((t) => {
|
|
32
|
+
const s = String(t.value ?? t.name).toLowerCase().includes(c?.toLowerCase());
|
|
33
|
+
return Array.isArray(e) && e.length ? s && !e.some((C) => C.id === t.id) : e && !Array.isArray(e) ? s && e.id !== t.id : s;
|
|
34
|
+
}),
|
|
35
|
+
[h, e, c]
|
|
36
|
+
), f = R(null), L = R(null), [B, D] = w(!1), S = R(null);
|
|
37
|
+
U(() => {
|
|
38
|
+
const t = (C) => {
|
|
39
|
+
f.current && !f.current.contains(C.target) && b(!1);
|
|
40
|
+
}, s = (C) => {
|
|
41
|
+
C.key === "Escape" && b(!1);
|
|
42
|
+
};
|
|
43
|
+
return document.addEventListener("mousedown", t), document.addEventListener("keydown", s), () => {
|
|
44
|
+
document.removeEventListener("mousedown", t), document.removeEventListener("keydown", s);
|
|
45
|
+
};
|
|
46
|
+
}, []);
|
|
47
|
+
const P = T((t) => {
|
|
48
|
+
r(t.target.value);
|
|
49
|
+
}, []), d = T(
|
|
50
|
+
(t) => {
|
|
51
|
+
t ? o ? (r(""), Array.isArray(e) && e.length ? l([...e, t]) : l([t])) : (r(String(t.name ?? t.value ?? "")), l(t)) : l(null), b(!1);
|
|
52
|
+
},
|
|
53
|
+
[o, l, e]
|
|
54
|
+
), j = T(
|
|
55
|
+
(t) => {
|
|
56
|
+
if (!Array.isArray(e)) {
|
|
57
|
+
l(null);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const s = e.filter((C, _) => _ !== t);
|
|
61
|
+
s.length ? l(s) : l(null);
|
|
62
|
+
},
|
|
63
|
+
[l, e]
|
|
64
|
+
), O = T(() => {
|
|
65
|
+
Array.isArray(e) && l([e[0]]);
|
|
66
|
+
}, [l, e]);
|
|
67
|
+
return J(() => {
|
|
68
|
+
const t = S.current?.offsetWidth ?? 0, s = f.current?.offsetWidth ?? 0;
|
|
69
|
+
D(t > s * 0.4);
|
|
70
|
+
}, [e]), /* @__PURE__ */ x(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
className: `autocomplete-input-container ${$}`,
|
|
74
|
+
ref: f,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ x("div", { className: "autocomplete-value-input-container", children: [
|
|
77
|
+
/* @__PURE__ */ n(
|
|
78
|
+
X,
|
|
79
|
+
{
|
|
80
|
+
state: v,
|
|
81
|
+
name: g,
|
|
82
|
+
id: m,
|
|
83
|
+
value: c,
|
|
84
|
+
onChange: P,
|
|
85
|
+
placeholder: y,
|
|
86
|
+
helperText: p,
|
|
87
|
+
onFocus: () => b(!0),
|
|
88
|
+
label: i,
|
|
89
|
+
containerClassName: `autocomplete-text-input ${u}`,
|
|
90
|
+
ref: N ?? L,
|
|
91
|
+
...A,
|
|
92
|
+
children: !o && e && !Array.isArray(e) && (e.value || e.name) && /* @__PURE__ */ n(
|
|
93
|
+
K,
|
|
94
|
+
{
|
|
95
|
+
icon: /* @__PURE__ */ n(Q, {}),
|
|
96
|
+
className: "autocomplete-delete-button",
|
|
97
|
+
onClick: (t) => {
|
|
98
|
+
d(), t.stopPropagation();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
o && Array.isArray(e) && e.length ? /* @__PURE__ */ n("ul", { ref: S, className: "autocomplete-value-container", children: B ? /* @__PURE__ */ x(z, { children: [
|
|
105
|
+
/* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
106
|
+
V,
|
|
107
|
+
{
|
|
108
|
+
text: e[0]?.value ?? e[0]?.name,
|
|
109
|
+
onDelete: (t) => {
|
|
110
|
+
j(0), t.stopPropagation();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
) }),
|
|
114
|
+
e.length > 1 && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
115
|
+
V,
|
|
116
|
+
{
|
|
117
|
+
text: `+${e.length - 1}`,
|
|
118
|
+
onDelete: (t) => {
|
|
119
|
+
O(), t.stopPropagation();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
) })
|
|
123
|
+
] }) : e.map((t, s) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
124
|
+
V,
|
|
125
|
+
{
|
|
126
|
+
text: String(t.value ?? t.name),
|
|
127
|
+
onDelete: (C) => {
|
|
128
|
+
j(s), C.stopPropagation();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
) }, t.id ?? t.value ?? t.name)) }) : null
|
|
132
|
+
] }),
|
|
133
|
+
E && /* @__PURE__ */ n(
|
|
134
|
+
"ul",
|
|
135
|
+
{
|
|
136
|
+
className: "autocomplete-suggestions-container",
|
|
137
|
+
style: { width: f.current?.offsetWidth },
|
|
138
|
+
children: k.map((t) => /* @__PURE__ */ n(
|
|
139
|
+
"li",
|
|
140
|
+
{
|
|
141
|
+
className: "autocomplete-suggestion-item",
|
|
142
|
+
onClick: (s) => {
|
|
143
|
+
d(t), s.stopPropagation();
|
|
144
|
+
},
|
|
145
|
+
children: t.value ?? t.name
|
|
146
|
+
},
|
|
147
|
+
t.id ?? t.value ?? t.name
|
|
148
|
+
))
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
});
|
|
155
|
+
var I = /* @__PURE__ */ ((a) => (a.error = "error", a.good = "good", a.default = "default", a))(I || {});
|
|
156
|
+
const W = (a) => {
|
|
157
|
+
switch (a) {
|
|
158
|
+
case "error":
|
|
159
|
+
return "input-error";
|
|
160
|
+
case "good":
|
|
161
|
+
return "input-good";
|
|
162
|
+
default:
|
|
163
|
+
return "input-normal";
|
|
164
|
+
}
|
|
165
|
+
}, H = (a) => {
|
|
166
|
+
switch (a) {
|
|
167
|
+
case "error":
|
|
168
|
+
return "input-label-error";
|
|
169
|
+
case "good":
|
|
170
|
+
return "input-label-good";
|
|
171
|
+
default:
|
|
172
|
+
return "input-label-normal";
|
|
173
|
+
}
|
|
174
|
+
}, M = (a) => {
|
|
175
|
+
switch (a) {
|
|
176
|
+
case "error":
|
|
177
|
+
return "input-helper-text-error";
|
|
178
|
+
case "good":
|
|
179
|
+
return "input-helper-text-good";
|
|
180
|
+
default:
|
|
181
|
+
return "input-helper-text-normal";
|
|
182
|
+
}
|
|
183
|
+
}, re = F(function(a, N) {
|
|
184
|
+
const {
|
|
185
|
+
checked: v,
|
|
186
|
+
onChange: e,
|
|
187
|
+
name: l = "",
|
|
188
|
+
id: h = "",
|
|
189
|
+
label: g = "",
|
|
190
|
+
state: m = I.default,
|
|
191
|
+
containerClassName: i = "",
|
|
192
|
+
inputClassName: $ = "",
|
|
193
|
+
labelClassName: u = "",
|
|
194
|
+
...p
|
|
195
|
+
} = a;
|
|
196
|
+
return /* @__PURE__ */ x("label", { className: `input-check-container ${i}`, children: [
|
|
197
|
+
/* @__PURE__ */ n(
|
|
198
|
+
"input",
|
|
199
|
+
{
|
|
200
|
+
id: h,
|
|
201
|
+
ref: N,
|
|
202
|
+
name: l,
|
|
203
|
+
type: "checkbox",
|
|
204
|
+
checked: v,
|
|
205
|
+
onChange: e,
|
|
206
|
+
className: `input-check ${W(m)} ${$}`,
|
|
207
|
+
...p
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
/* @__PURE__ */ n(
|
|
211
|
+
"span",
|
|
212
|
+
{
|
|
213
|
+
className: `input-check-label ${H(m)} ${u}`,
|
|
214
|
+
children: g
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
] });
|
|
218
|
+
}), se = F(function(a, N) {
|
|
219
|
+
const {
|
|
220
|
+
value: v,
|
|
221
|
+
onChange: e,
|
|
222
|
+
options: l,
|
|
223
|
+
containerClassName: h = "",
|
|
224
|
+
inputClassName: g = "",
|
|
225
|
+
labelClassName: m = "",
|
|
226
|
+
helperText: i = "",
|
|
227
|
+
helperTextClassName: $ = "",
|
|
228
|
+
label: u = "",
|
|
229
|
+
name: p = "",
|
|
230
|
+
id: y = "",
|
|
231
|
+
state: o = I.default,
|
|
232
|
+
children: A,
|
|
233
|
+
...c
|
|
234
|
+
} = a;
|
|
235
|
+
return /* @__PURE__ */ x("div", { className: `select-input-container ${h}`, children: [
|
|
236
|
+
/* @__PURE__ */ n(
|
|
237
|
+
"select",
|
|
238
|
+
{
|
|
239
|
+
...c,
|
|
240
|
+
id: y,
|
|
241
|
+
ref: N,
|
|
242
|
+
name: p,
|
|
243
|
+
value: v,
|
|
244
|
+
onChange: e,
|
|
245
|
+
className: `select-input ${W(o)} peer ${g}`,
|
|
246
|
+
children: l?.map((r) => /* @__PURE__ */ n("option", { value: r.id, children: r.value ?? r.name ?? r.id }, r.id))
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
/* @__PURE__ */ n(
|
|
250
|
+
"label",
|
|
251
|
+
{
|
|
252
|
+
htmlFor: y,
|
|
253
|
+
className: `select-input-label ${H(o)} ${m}`,
|
|
254
|
+
children: u
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
A,
|
|
258
|
+
i && /* @__PURE__ */ n(
|
|
259
|
+
"p",
|
|
260
|
+
{
|
|
261
|
+
className: `select-input-helper-text ${M(o)} ${$}`,
|
|
262
|
+
children: i
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
] });
|
|
266
|
+
}), q = (a) => a == null ? !1 : Array.isArray(a) ? a.length > 0 : `${a}`.length > 0, X = F(function(a, N) {
|
|
267
|
+
const {
|
|
268
|
+
children: v,
|
|
269
|
+
state: e = I.default,
|
|
270
|
+
label: l = "",
|
|
271
|
+
containerClassName: h = "",
|
|
272
|
+
inputClassName: g = "",
|
|
273
|
+
labelClassName: m = "",
|
|
274
|
+
helperText: i = "",
|
|
275
|
+
helperTextClassName: $ = "",
|
|
276
|
+
value: u,
|
|
277
|
+
defaultValue: p,
|
|
278
|
+
onChange: y,
|
|
279
|
+
onFocus: o,
|
|
280
|
+
onBlur: A,
|
|
281
|
+
...c
|
|
282
|
+
} = a, r = u !== void 0, [E, b] = w(
|
|
283
|
+
() => q(p)
|
|
284
|
+
), [k, f] = w(!1), L = r ? q(u) : E, B = !!c.placeholder || k, D = (d) => {
|
|
285
|
+
r || b(d.currentTarget.value.length > 0), y?.(d);
|
|
286
|
+
}, S = (d) => {
|
|
287
|
+
k || f(!0), o?.(d);
|
|
288
|
+
}, P = (d) => {
|
|
289
|
+
k || f(!0), A?.(d);
|
|
290
|
+
};
|
|
291
|
+
return /* @__PURE__ */ x("div", { className: `text-input-container ${h}`, children: [
|
|
292
|
+
/* @__PURE__ */ n(
|
|
293
|
+
"input",
|
|
294
|
+
{
|
|
295
|
+
ref: N,
|
|
296
|
+
defaultValue: p,
|
|
297
|
+
onChange: D,
|
|
298
|
+
onFocus: S,
|
|
299
|
+
onBlur: P,
|
|
300
|
+
...r ? { value: u } : {},
|
|
301
|
+
className: `text-input ${W(e)} ${g} ${L ? "has-value" : ""} ${c.placeholder ? "has-placeholder" : ""} ${B ? "keep-label-up" : ""}`,
|
|
302
|
+
...c
|
|
303
|
+
}
|
|
304
|
+
),
|
|
305
|
+
!!l && /* @__PURE__ */ x(
|
|
306
|
+
"label",
|
|
307
|
+
{
|
|
308
|
+
htmlFor: c.id,
|
|
309
|
+
className: `text-input-label ${H(e)} ${m}`,
|
|
310
|
+
children: [
|
|
311
|
+
l,
|
|
312
|
+
c.required ? " *" : ""
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
),
|
|
316
|
+
v,
|
|
317
|
+
!!i && /* @__PURE__ */ n(
|
|
318
|
+
"p",
|
|
319
|
+
{
|
|
320
|
+
className: `text-input-helper-text ${M(e)} ${$}`,
|
|
321
|
+
children: i
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
] });
|
|
325
|
+
});
|
|
326
|
+
export {
|
|
327
|
+
le as A,
|
|
328
|
+
re as C,
|
|
329
|
+
se as S,
|
|
330
|
+
X as T,
|
|
331
|
+
I as a,
|
|
332
|
+
M as h,
|
|
333
|
+
W as i,
|
|
334
|
+
H as l
|
|
335
|
+
};
|
package/dist/TextInput.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@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-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}}}.autocomplete-input-container{margin-bottom:calc(var(--spacing,.25rem) * 5);width:100%}.autocomplete-value-input-container{width:100%;position:relative}.autocomplete-text-input{margin-bottom:calc(var(--spacing,.25rem) * 0)!important}.autocomplete-delete-button{top:50%;right:calc(var(--spacing,.25rem) * 2);--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y);justify-content:center;align-items:center;display:flex;position:absolute}.autocomplete-delete-button svg{height:calc(var(--spacing,.25rem) * 3);width:calc(var(--spacing,.25rem) * 3)}.autocomplete-suggestions-container{z-index:10;margin:calc(var(--spacing,.25rem) * 0);max-height:calc(var(--spacing,.25rem) * 44);width:100%;padding:calc(var(--spacing,.25rem) * 0);--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px 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);position:absolute;overflow:auto}.autocomplete-suggestion-item{cursor:pointer;padding:calc(var(--spacing,.25rem) * 2)}.autocomplete-value-container{top:50%;right:calc(var(--spacing,.25rem) * 2);justify-content:flex-start;align-items:center;gap:calc(var(--spacing,.25rem) * 2);flex-wrap:wrap;display:flex;position:absolute;transform:translateY(-50%)}@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-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;--tw-font-weight:initial}}}.input-check-container{align-items:center;display:flex}.input-check{border-style:var(--tw-border-style);border-width:1px;border-radius:.25rem}.input-check:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.input-check-label{margin-left:calc(var(--spacing,.25rem) * 2);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-medium,500);font-weight:var(--font-weight-medium,500)}@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-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;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-duration:initial;--tw-font-weight:initial}}}.select-input-container{z-index:0;margin-bottom:calc(var(--spacing,.25rem) * 5);width:100%;position:relative}.select-input{appearance:none;border-style:var(--tw-border-style);border-width:0;border-bottom-style:var(--tw-border-style);width:100%;padding-inline:calc(var(--spacing,.25rem) * 0);padding-block:calc(var(--spacing,.25rem) * 2.5);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));background-color:#0000;border-bottom-width:2px;display:block}.select-input:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style:none;outline-style:none}.select-input-label{top:calc(var(--spacing,.25rem) * 3);z-index:-10;transform-origin:0;--tw-translate-y:calc(var(--spacing,.25rem) * -6);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);transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-duration:.3s;transition-duration:.3s;position:absolute}.select-input-label:is(:where(.peer):placeholder-shown~*){--tw-translate-y:calc(var(--spacing,.25rem) * 0);translate:var(--tw-translate-x) var(--tw-translate-y);--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.select-input-label:is(:where(.peer):focus~*){--tw-translate-y:calc(var(--spacing,.25rem) * -6);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);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);inset-inline-start:calc(var(--spacing,.25rem) * 0)}.select-input-label:where(:dir(rtl),[dir=rtl],[dir=rtl] *):is(:where(.peer):focus~*){--tw-translate-x: 25% ;translate:var(--tw-translate-x) var(--tw-translate-y);left:auto}.select-input-helper-text{margin-top:calc(var(--spacing,.25rem) * 2);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@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-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;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-duration:initial;--tw-font-weight:initial}}}.text-input-container{z-index:0;margin-bottom:calc(var(--spacing,.25rem) * 5);width:100%;position:relative}.text-input{appearance:none;border-style:var(--tw-border-style);border-width:0;border-bottom-style:var(--tw-border-style);width:100%;padding-inline:calc(var(--spacing,.25rem) * 0);padding-block:calc(var(--spacing,.25rem) * 2.5);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));background-color:#0000;border-bottom-width:2px;display:block}.text-input:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style:none;outline-style:none}.text-input-label{top:calc(var(--spacing,.25rem) * 3);transform-origin:0;--tw-translate-y:calc(var(--spacing,.25rem) * 0);translate:var(--tw-translate-x) var(--tw-translate-y);--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-duration:.3s;transition-duration:.3s;position:absolute}.text-input:focus~.text-input-label{--tw-translate-y:calc(var(--spacing,.25rem) * -7);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);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);inset-inline-start:calc(var(--spacing,.25rem) * 0)}[dir=rtl] .text-input:focus~.text-input-label{--tw-translate-x: 25% ;translate:var(--tw-translate-x) var(--tw-translate-y);left:auto}.text-input.has-placeholder~.text-input-label,.text-input.has-value~.text-input-label{--tw-translate-y:calc(var(--spacing,.25rem) * -7);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)}.text-input-helper-text{margin-top:calc(var(--spacing,.25rem) * 2);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@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}@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}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}
|
|
1
|
+
@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-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}}}.autocomplete-input-container{margin-bottom:calc(var(--spacing,.25rem) * 5);width:100%}.autocomplete-value-input-container{width:100%;position:relative}.autocomplete-text-input{margin-bottom:calc(var(--spacing,.25rem) * 0)!important}.autocomplete-delete-button{top:50%;right:calc(var(--spacing,.25rem) * 2);--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y);justify-content:center;align-items:center;display:flex;position:absolute}.autocomplete-delete-button svg{height:calc(var(--spacing,.25rem) * 3);width:calc(var(--spacing,.25rem) * 3)}.autocomplete-suggestions-container{z-index:30;margin:calc(var(--spacing,.25rem) * 0);max-height:calc(var(--spacing,.25rem) * 44);width:100%;padding:calc(var(--spacing,.25rem) * 0);--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px 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);position:absolute;overflow:auto}.autocomplete-suggestion-item{cursor:pointer;padding:calc(var(--spacing,.25rem) * 2)}.autocomplete-value-container{top:50%;right:calc(var(--spacing,.25rem) * 2);justify-content:flex-start;align-items:center;gap:calc(var(--spacing,.25rem) * 2);flex-wrap:wrap;display:flex;position:absolute;transform:translateY(-50%)}@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-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;--tw-font-weight:initial}}}.input-check-container{align-items:center;display:flex}.input-check{border-style:var(--tw-border-style);border-width:1px;border-radius:.25rem}.input-check:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.input-check-label{margin-left:calc(var(--spacing,.25rem) * 2);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-medium,500);font-weight:var(--font-weight-medium,500)}@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-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;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-duration:initial;--tw-font-weight:initial}}}.select-input-container{z-index:0;margin-bottom:calc(var(--spacing,.25rem) * 5);width:100%;position:relative}.select-input{appearance:none;border-style:var(--tw-border-style);border-width:0;border-bottom-style:var(--tw-border-style);width:100%;padding-inline:calc(var(--spacing,.25rem) * 0);padding-block:calc(var(--spacing,.25rem) * 2.5);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));background-color:#0000;border-bottom-width:2px;display:block}.select-input:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style:none;outline-style:none}.select-input-label{top:calc(var(--spacing,.25rem) * 3);z-index:-10;transform-origin:0;--tw-translate-y:calc(var(--spacing,.25rem) * -6);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);transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-duration:.3s;transition-duration:.3s;position:absolute}.select-input-label:is(:where(.peer):placeholder-shown~*){--tw-translate-y:calc(var(--spacing,.25rem) * 0);translate:var(--tw-translate-x) var(--tw-translate-y);--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.select-input-label:is(:where(.peer):focus~*){--tw-translate-y:calc(var(--spacing,.25rem) * -6);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);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);inset-inline-start:calc(var(--spacing,.25rem) * 0)}.select-input-label:where(:dir(rtl),[dir=rtl],[dir=rtl] *):is(:where(.peer):focus~*){--tw-translate-x: 25% ;translate:var(--tw-translate-x) var(--tw-translate-y);left:auto}.select-input-helper-text{margin-top:calc(var(--spacing,.25rem) * 2);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@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-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;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-duration:initial;--tw-font-weight:initial}}}.text-input-container{z-index:0;margin-bottom:calc(var(--spacing,.25rem) * 5);width:100%;position:relative}.text-input{appearance:none;border-style:var(--tw-border-style);border-width:0;border-bottom-style:var(--tw-border-style);width:100%;padding-inline:calc(var(--spacing,.25rem) * 0);padding-block:calc(var(--spacing,.25rem) * 2.5);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));background-color:#0000;border-bottom-width:2px;display:block}.text-input:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-outline-style:none;outline-style:none}.text-input-label{top:calc(var(--spacing,.25rem) * 3);transform-origin:0;--tw-translate-y:calc(var(--spacing,.25rem) * 0);translate:var(--tw-translate-x) var(--tw-translate-y);--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y);transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)));--tw-duration:.3s;transition-duration:.3s;position:absolute}.text-input:focus~.text-input-label{--tw-translate-y:calc(var(--spacing,.25rem) * -7);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);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);inset-inline-start:calc(var(--spacing,.25rem) * 0)}[dir=rtl] .text-input.keep-label-up~.text-input-label,[dir=rtl] .text-input:focus~.text-input-label{--tw-translate-x: 25% ;translate:var(--tw-translate-x) var(--tw-translate-y);left:auto}.text-input.keep-label-up~.text-input-label,.text-input.has-placeholder~.text-input-label,.text-input.has-value~.text-input-label{--tw-translate-y:calc(var(--spacing,.25rem) * -7);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);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);inset-inline-start:calc(var(--spacing,.25rem) * 0)}.text-input-helper-text{margin-top:calc(var(--spacing,.25rem) * 2);font-size:var(--text-sm,.875rem);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25 / .875)))}@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}@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}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}
|
package/dist/Translation.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./TranslationProvider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./TranslationProvider-Czr0WIDH.cjs");exports.TranslationProvider=r.TranslationProvider;exports.useTranslation=r.useTranslation;
|
package/dist/Translation.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as i, useContext as s } from "react";
|
|
3
3
|
const n = i(
|
|
4
|
-
|
|
4
|
+
void 0
|
|
5
5
|
);
|
|
6
6
|
function l(t) {
|
|
7
7
|
const { children: o, t: r, language: e } = t;
|
|
@@ -9,7 +9,7 @@ function l(t) {
|
|
|
9
9
|
}
|
|
10
10
|
const x = () => {
|
|
11
11
|
const t = s(n);
|
|
12
|
-
if (t
|
|
12
|
+
if (!t)
|
|
13
13
|
throw new Error("translationContext must be used within a Provider");
|
|
14
14
|
return t;
|
|
15
15
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),n=require("react"),r=n.createContext(void 0);function a(t){const{children:e,t:o,language:s}=t;return i.jsx(r.Provider,{value:{t:o,language:s},children:e})}const u=()=>{const t=n.useContext(r);if(!t)throw new Error("translationContext must be used within a Provider");return t};exports.TranslationProvider=a;exports.useTranslation=u;
|
|
@@ -4,4 +4,4 @@ import { DropdownPropsType } from './types';
|
|
|
4
4
|
* @param props - props parameter.
|
|
5
5
|
* @returns Function result.
|
|
6
6
|
*/
|
|
7
|
-
export declare const Dropdown: (props: DropdownPropsType) => import('react').ReactPortal;
|
|
7
|
+
export declare const Dropdown: (props: DropdownPropsType) => import('react').ReactPortal | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseInputPropsType } from 'main';
|
|
2
1
|
import { HTMLProps, ReactNode } from 'react';
|
|
2
|
+
import { BaseInputPropsType } from '../types';
|
|
3
3
|
export interface FileInputPropsType extends Omit<HTMLProps<HTMLInputElement>, "value">, Omit<BaseInputPropsType, "value" | "label"> {
|
|
4
4
|
iconClassName?: string;
|
|
5
5
|
multiple?: boolean;
|
|
@@ -22,7 +22,7 @@ export type ColumnType<TRow extends BaseDto> = {
|
|
|
22
22
|
/** custom body of the cell */
|
|
23
23
|
renderBody?: (value: unknown, row: TRow) => ReactNode;
|
|
24
24
|
/** custom head of the cell */
|
|
25
|
-
renderHead?: () =>
|
|
25
|
+
renderHead?: () => ReactNode;
|
|
26
26
|
/** filter options */
|
|
27
27
|
filterOptions?: ColumnFilterOptions;
|
|
28
28
|
};
|