@economic/taco 2.35.1 → 2.36.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Dialog/components/Content.d.ts +5 -0
- package/dist/components/Icon/components/index.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts +2 -1
- package/dist/components/Menu/components/Item.d.ts +1 -1
- package/dist/components/Menu/components/Link.d.ts +1 -1
- package/dist/components/Menu/components/Separator.d.ts +3 -2
- package/dist/components/Navigation2/components/Link.d.ts +1 -1
- package/dist/components/Provider/Localization.d.ts +6 -0
- package/dist/components/Report/Report.d.ts +1 -1
- package/dist/components/Select2/components/Option.d.ts +2 -2
- package/dist/components/Select2/components/Search.d.ts +1 -7
- package/dist/components/Table3/Table3.d.ts +29 -1
- package/dist/components/Table3/components/Row/Editing/CreateRowButton.d.ts +11 -0
- package/dist/components/Table3/features/useTableEditing.d.ts +1 -0
- package/dist/components/Table3/types.d.ts +16 -1
- package/dist/components/Table3/util/editing.d.ts +1 -0
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/esm/index.css +41 -21
- package/dist/esm/node_modules/babel-plugin-transform-async-to-promises/helpers.mjs.js +161 -1
- package/dist/esm/node_modules/babel-plugin-transform-async-to-promises/helpers.mjs.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/{ESignature.js → DocumentSignedSolid.js} +4 -4
- package/dist/esm/packages/taco/src/components/Icon/components/DocumentSignedSolid.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/{Home2.js → House.js} +4 -4
- package/dist/esm/packages/taco/src/components/Icon/components/{Home2.js.map → House.js.map} +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/{Home.js → HouseSolid.js} +4 -4
- package/dist/esm/packages/taco/src/components/Icon/components/HouseSolid.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/index.js +6 -6
- package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +7 -5
- package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +7 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +7 -16
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Search.js +2 -12
- package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js +8 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +3 -2
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +24 -3
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js +90 -0
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateRowButton.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +53 -15
- package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js +2 -1
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js +20 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +5 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +2 -4
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +2 -3
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +5 -4
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +3 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +6 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +11 -8
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +2 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +3 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +9 -0
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/dom.js +2 -2
- package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
- package/dist/index.css +41 -21
- package/dist/primitives/Table/Core/components/Header/components/Menu.d.ts +1 -0
- package/dist/primitives/Table/types.d.ts +8 -6
- package/dist/primitives/Table/useTableManager/features/useTableRowClick.d.ts +4 -4
- package/dist/primitives/Table/useTableManager/useTableManager.d.ts +1 -1
- package/dist/primitives/Table/useTableManager/util/presets.d.ts +1 -1
- package/dist/primitives/Table/useTableManager/util/setup.d.ts +2 -2
- package/dist/taco.cjs.development.js +454 -113
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/dist/utils/dom.d.ts +1 -1
- package/package.json +2 -2
- package/dist/components/Table/Table.storyexample.d.ts +0 -9
- package/dist/esm/packages/taco/src/components/Icon/components/ESignature.js.map +0 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Home.js.map +0 -1
- /package/dist/components/Icon/components/{ESignature.d.ts → DocumentSignedSolid.d.ts} +0 -0
- /package/dist/components/Icon/components/{Home.d.ts → House.d.ts} +0 -0
- /package/dist/components/Icon/components/{Home2.d.ts → HouseSolid.d.ts} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dom.js","sources":["../../../../../../src/utils/dom.ts"],"sourcesContent":["// taken from react-aria\nconst FOCUSABLE_ELEMENTS = [\n 'input:not([disabled]):not([type=hidden])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]',\n '[tabindex]:not([tabindex=\"-1\"]):not([disabled])',\n 'details:not([disabled])',\n 'summary:not(:disabled)',\n];\n\nexport const hasFocusableElement = (element: HTMLElement | null) => {\n if (!element) {\n return null;\n }\n\n return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));\n};\n\nexport const isOverflowing = (element: HTMLElement | null) =>\n element !== null ? element.scrollWidth > element.offsetWidth : false;\n\nexport const getIndexOfFirstChildOverflowingParent = (element: HTMLElement, overscan = 0) => {\n let index = 0;\n let boundaryChildIndex: number | null = null;\n const clientRect = element.getBoundingClientRect();\n\n for (const child of Array.from(element.children)) {\n const right = child.getBoundingClientRect().right - clientRect.left;\n const width = clientRect.width - overscan;\n\n if (right > width) {\n boundaryChildIndex = index;\n break;\n }\n index++;\n }\n\n return boundaryChildIndex;\n};\n\nexport const getNextFocussableElement = (currentElement: HTMLElement | null) => {\n if (!currentElement) {\n return null;\n }\n\n const focussableElements = [...document.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS.join(','))];\n const currentElementIndex = focussableElements.indexOf(currentElement);\n\n // If the currentElement is not in the focussable elements list or it is the last element\n if (currentElementIndex !== -1 && currentElementIndex === focussableElements.length - 1) {\n return null;\n }\n\n return focussableElements[currentElementIndex +
|
1
|
+
{"version":3,"file":"dom.js","sources":["../../../../../../src/utils/dom.ts"],"sourcesContent":["// taken from react-aria\nconst FOCUSABLE_ELEMENTS = [\n 'input:not([disabled]):not([type=hidden])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]',\n '[tabindex]:not([tabindex=\"-1\"]):not([disabled])',\n 'details:not([disabled])',\n 'summary:not(:disabled)',\n];\n\nexport const hasFocusableElement = (element: HTMLElement | null) => {\n if (!element) {\n return null;\n }\n\n return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));\n};\n\nexport const isOverflowing = (element: HTMLElement | null) =>\n element !== null ? element.scrollWidth > element.offsetWidth : false;\n\nexport const getIndexOfFirstChildOverflowingParent = (element: HTMLElement, overscan = 0) => {\n let index = 0;\n let boundaryChildIndex: number | null = null;\n const clientRect = element.getBoundingClientRect();\n\n for (const child of Array.from(element.children)) {\n const right = child.getBoundingClientRect().right - clientRect.left;\n const width = clientRect.width - overscan;\n\n if (right > width) {\n boundaryChildIndex = index;\n break;\n }\n index++;\n }\n\n return boundaryChildIndex;\n};\n\nexport const getNextFocussableElement = (currentElement: HTMLElement | null, direction: -1 | 1 = 1) => {\n if (!currentElement) {\n return null;\n }\n\n const focussableElements = [...document.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS.join(','))];\n const currentElementIndex = focussableElements.indexOf(currentElement);\n\n // If the currentElement is not in the focussable elements list or it is the last element\n if (currentElementIndex !== -1 && currentElementIndex === focussableElements.length - 1) {\n return null;\n }\n\n return focussableElements[currentElementIndex + direction];\n};\n\nconst getOverlaySelector = (element: Element | null) => {\n switch (element?.getAttribute('role')) {\n case 'dialog':\n return `[aria-controls='${element.id}']`;\n\n case 'menu':\n return `#${element.getAttribute('aria-labelledby')}`;\n\n default:\n return undefined;\n }\n};\n\nexport function isElementInsideOrTriggeredFromContainer(element: Element | null, container: Element | null) {\n const selector = getOverlaySelector(element) ?? getOverlaySelector(element?.closest('[role=dialog],[role=menu]') ?? null);\n\n if (selector) {\n if (container?.querySelector(selector)) {\n return true;\n }\n\n const elementInDocument = document.querySelector(selector);\n\n // if the element does exist, see if it is itself connected to somethng that was triggered from the container\n if (elementInDocument) {\n return isElementInsideOrTriggeredFromContainer(elementInDocument, container);\n }\n\n return false;\n }\n\n return !!container?.contains(element);\n}\n\nexport function isElementInsideOverlay(element: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]');\n}\n\nexport function isSiblingElementInsideSameParentOverlay(element: Element | null, sibling: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]')?.contains(sibling);\n}\n\nexport function isElementInteractive(element: Element | null) {\n if (!element) {\n return false;\n }\n\n return (\n ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'LABEL', 'OPTION'].includes(element.tagName) &&\n !(element as HTMLElement).hidden &&\n !(element as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement).disabled &&\n !(element as HTMLInputElement | HTMLTextAreaElement).readOnly\n );\n}\n\nexport function isElementInsideTable3OrReport(element: Element | null) {\n return !!element?.closest('[data-taco^=table]');\n}\n"],"names":["FOCUSABLE_ELEMENTS","hasFocusableElement","element","querySelector","join","getIndexOfFirstChildOverflowingParent","overscan","index","boundaryChildIndex","clientRect","getBoundingClientRect","child","Array","from","children","right","left","width","getNextFocussableElement","currentElement","direction","focussableElements","document","querySelectorAll","currentElementIndex","indexOf","length","getOverlaySelector","getAttribute","id","undefined","isElementInsideOrTriggeredFromContainer","container","selector","_getOverlaySelector","_element$closest","closest","elementInDocument","contains","isElementInsideOverlay","isSiblingElementInsideSameParentOverlay","sibling","_element$closest2","isElementInteractive","includes","tagName","hidden","disabled","readOnly","isElementInsideTable3OrReport"],"mappings":"AAAA;AACA,MAAMA,kBAAkB,GAAG,CACvB,0CAA0C,EAC1C,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,SAAS,EACT,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,iDAAiD,EACjD,yBAAyB,EACzB,wBAAwB,CAC3B;MAEYC,mBAAmB,GAAIC,OAA2B;EAC3D,IAAI,CAACA,OAAO,EAAE;IACV,OAAO,IAAI;;EAGf,OAAO,CAAC,CAACA,OAAO,CAACC,aAAa,CAACH,kBAAkB,CAACI,IAAI,CAAC,GAAG,CAAC,CAAC;AAChE;MAKaC,qCAAqC,GAAGA,CAACH,OAAoB,EAAEI,QAAQ,GAAG,CAAC;EACpF,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIC,kBAAkB,GAAkB,IAAI;EAC5C,MAAMC,UAAU,GAAGP,OAAO,CAACQ,qBAAqB,EAAE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CAAC4C,MAAM,IAChC,CAAE5C,OAA0F,CAAC6C,QAAQ,IACrG,CAAE7C,OAAkD,CAAC8C,QAAQ;AAErE;SAEgBC,6BAA6BA,CAAC/C,OAAuB;EACjE,OAAO,CAAC,EAACA,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEkC,OAAO,CAAC,oBAAoB,CAAC;AACnD;;;;"}
|
package/dist/index.css
CHANGED
@@ -814,13 +814,19 @@ table[data-taco^='table'][data-table-font-size='small'] td [data-taco='tag'] {
|
|
814
814
|
|
815
815
|
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='select2-container'],
|
816
816
|
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='Select2'],
|
817
|
-
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input'],
|
818
817
|
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='textarea'] {
|
819
818
|
@apply !-mx-[7px] !-my-[4px] !min-h-[theme(spacing.6)] !w-[calc(100%_+_14px)] text-xs focus:z-10;
|
820
819
|
}
|
821
820
|
|
821
|
+
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input-container']:has([data-taco='input']) {
|
822
|
+
@apply !-mx-[7px] !w-auto;
|
823
|
+
}
|
824
|
+
|
825
|
+
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input-container']:has([data-taco='input']) [data-taco='input'] {
|
826
|
+
@apply !-my-[4px] !min-h-[theme(spacing.6)] !w-[calc(100%_+_14px)] text-xs focus:z-10;
|
827
|
+
}
|
828
|
+
|
822
829
|
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='Select2'],
|
823
|
-
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input'],
|
824
830
|
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='textarea'] {
|
825
831
|
@apply !px-1.5;
|
826
832
|
}
|
@@ -839,16 +845,16 @@ table[data-taco^='table'][data-table-font-size='small'] td [data-taco='textarea'
|
|
839
845
|
}
|
840
846
|
|
841
847
|
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input-container'] [data-affix-type='postfix'] button {
|
842
|
-
@apply z-10
|
848
|
+
@apply z-10 !h-6 !min-h-[theme(spacing.6)] !w-6 !min-w-[theme(spacing.6)];
|
843
849
|
}
|
844
850
|
|
845
|
-
table[data-taco^='table'][data-table-font-size='small']
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
}
|
851
|
+
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input-container'] [data-affix-type='postfix']:not([data-taco='icon-button']), table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input-container'] [data-affix-type='prefix']:not([data-taco='icon-button']) {
|
852
|
+
@apply z-10;
|
853
|
+
}
|
854
|
+
|
855
|
+
table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input-container'] [data-affix-type='postfix']:not([data-taco='icon-button'])[data-taco='icon'], table[data-taco^='table'][data-table-font-size='small'] td [data-taco='input-container'] [data-affix-type='prefix']:not([data-taco='icon-button'])[data-taco='icon'] {
|
856
|
+
@apply !h-4 !w-4;
|
857
|
+
}
|
852
858
|
|
853
859
|
table[data-taco^='table'][data-table-font-size='small'] td [role='combobox'] {
|
854
860
|
@apply !flex;
|
@@ -898,11 +904,18 @@ table[data-taco^='table'][data-table-font-size='medium'] td [role='combobox'] [d
|
|
898
904
|
|
899
905
|
table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='select2-container'],
|
900
906
|
table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='Select2'],
|
901
|
-
table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='input'],
|
902
907
|
table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='textarea'] {
|
903
908
|
@apply !-mx-[9px] !-my-[6px] !min-h-[theme(spacing.8)] !w-[calc(100%_+_16px)] focus:z-10;
|
904
909
|
}
|
905
910
|
|
911
|
+
table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='input-container']:has([data-taco='input']) {
|
912
|
+
@apply !-mx-[9px] !w-auto;
|
913
|
+
}
|
914
|
+
|
915
|
+
table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='input-container']:has([data-taco='input']) [data-taco='input'] {
|
916
|
+
@apply !-my-[6px] !min-h-[theme(spacing.8)] !w-[calc(100%_+_16px)] focus:z-10;
|
917
|
+
}
|
918
|
+
|
906
919
|
table[data-taco^='table'][data-table-font-size='medium'] td[data-cell-align='right'] [data-taco='input'],
|
907
920
|
table[data-taco^='table'][data-table-font-size='medium'] td[data-cell-align='right'] [data-taco='textarea'] {
|
908
921
|
@apply pr-1.5;
|
@@ -929,9 +942,13 @@ table[data-taco^='table'][data-table-font-size='medium'] td[data-cell-truncate='
|
|
929
942
|
}
|
930
943
|
|
931
944
|
table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='input-container'] [data-affix-type='postfix'] button {
|
932
|
-
@apply z-10
|
945
|
+
@apply z-10;
|
933
946
|
}
|
934
947
|
|
948
|
+
table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='input-container'] [data-affix-type='postfix']:not([data-taco='icon-button']), table[data-taco^='table'][data-table-font-size='medium'] td [data-taco='input-container'] [data-affix-type='prefix']:not([data-taco='icon-button']) {
|
949
|
+
@apply z-10;
|
950
|
+
}
|
951
|
+
|
935
952
|
/* large font size */
|
936
953
|
table[data-taco^='table'][data-table-font-size='large'] td > [data-taco='spinner'] {
|
937
954
|
@apply !h-6 !w-6;
|
@@ -956,11 +973,18 @@ table[data-taco^='table'][data-table-font-size='large'] td [role='combobox'] [da
|
|
956
973
|
|
957
974
|
table[data-taco^='table'][data-table-font-size='large'] td [data-taco='select2-container'],
|
958
975
|
table[data-taco^='table'][data-table-font-size='large'] td [data-taco='Select2'],
|
959
|
-
table[data-taco^='table'][data-table-font-size='large'] td [data-taco='input'],
|
960
976
|
table[data-taco^='table'][data-table-font-size='large'] td [data-taco='textarea'] {
|
961
977
|
@apply !-mx-[11px] !-mb-[7.5px] !-mt-[8.5px] !w-[calc(100%_+_22px)] focus:z-10;
|
962
978
|
}
|
963
979
|
|
980
|
+
table[data-taco^='table'][data-table-font-size='large'] td [data-taco='input-container']:has([data-taco='input']) {
|
981
|
+
@apply !-mx-[11px] !w-auto;
|
982
|
+
}
|
983
|
+
|
984
|
+
table[data-taco^='table'][data-table-font-size='large'] td [data-taco='input-container']:has([data-taco='input']) [data-taco='input'] {
|
985
|
+
@apply !-mb-[7.5px] !-mt-[8.5px] !w-[calc(100%_+_22px)] focus:z-10;
|
986
|
+
}
|
987
|
+
|
964
988
|
table[data-taco^='table'][data-table-font-size='large'] td [data-taco='select2-container'] [data-taco='Select2'] {
|
965
989
|
@apply !m-auto !w-full;
|
966
990
|
}
|
@@ -992,16 +1016,12 @@ table[data-taco^='table'][data-table-font-size='large'] td [data-taco='textarea'
|
|
992
1016
|
}
|
993
1017
|
|
994
1018
|
table[data-taco^='table'][data-table-font-size='large'] td [data-taco='input-container'] [data-affix-type='postfix'] button {
|
995
|
-
@apply z-10
|
1019
|
+
@apply z-10 !h-10 !w-10;
|
996
1020
|
}
|
997
1021
|
|
998
|
-
table[data-taco^='table'][data-table-font-size='large']
|
999
|
-
|
1000
|
-
|
1001
|
-
[data-affix-type='postfix']
|
1002
|
-
[data-taco='icon'] {
|
1003
|
-
@apply !h-6 !w-6;
|
1004
|
-
}
|
1022
|
+
table[data-taco^='table'][data-table-font-size='large'] td [data-taco='input-container'] [data-affix-type='postfix']:not([data-taco='icon-button']), table[data-taco^='table'][data-table-font-size='large'] td [data-taco='input-container'] [data-affix-type='prefix']:not([data-taco='icon-button']) {
|
1023
|
+
@apply z-10;
|
1024
|
+
}
|
1005
1025
|
|
1006
1026
|
/* row/cell backgrounds -- we have to be specific so that nested tables don't inherit */
|
1007
1027
|
/* normal rows */
|
@@ -1,7 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ColumnFilter as ReactTableColumnFilter, ColumnFiltersState as ReactTableColumnFilterState, ColumnOrderState as ReactTableColumnOrderState, ColumnPinningState as ReactTableColumnPinningState, ColumnSort as ReactTableColumnSort, ColumnSizingState as ReactTableColumnSizingState, VisibilityState as ReactTableColumnVisibilityState, SortingState as ReactTableSortingState, BuiltInAggregationFn as ReactTableBuiltInAggregationFn, BuiltInSortingFn as ReactTableBuiltInSortingFn } from '@tanstack/react-table';
|
3
3
|
import { FontSize, FontSizes, ValueOf } from '../../types';
|
4
|
-
import { MenuProps } from '../../components/Menu/Menu';
|
5
4
|
import { MenuItemProps } from '../../components/Menu/components/Item';
|
6
5
|
export declare type TableRef = HTMLTableElement & {
|
7
6
|
instance: {
|
@@ -39,7 +38,7 @@ export declare type TableColumnAlignment = 'left' | 'center' | 'right';
|
|
39
38
|
export declare type TableColumnClassNameHandler<TType = unknown> = string | ((row: TType) => string | undefined);
|
40
39
|
export declare type TableColumnDataType = 'auto' | 'number' | 'alphanumeric' | 'alphanumericCaseSensitive' | 'datetime' | 'boolean';
|
41
40
|
export declare type TableColumnFilter = ReactTableColumnFilter;
|
42
|
-
export declare type TableColumnMenu = (
|
41
|
+
export declare type TableColumnMenu = ((columnId: string) => React.ReactNode | null)[];
|
43
42
|
export declare type TableColumnRenderer<TType, TValue> = (value: TValue, row: TType) => JSX.Element | string | number | null;
|
44
43
|
export declare type TableColumnRendererAggregate<TType, TValue> = (value: TValue, row: TType) => JSX.Element | string | number | null;
|
45
44
|
export declare type TableColumnRendererControl<TType = unknown> = ((props: TableColumnRendererControlProps, row?: TType) => JSX.Element) | 'datepicker' | 'input' | 'switch' | 'textarea';
|
@@ -123,7 +122,7 @@ export declare type TableEnableSettingsOptions = {
|
|
123
122
|
rowHeight: boolean;
|
124
123
|
sorting: boolean;
|
125
124
|
};
|
126
|
-
export declare type TableFeatureProps = {
|
125
|
+
export declare type TableFeatureProps<TType = unknown> = {
|
127
126
|
enableFiltering?: boolean;
|
128
127
|
enableSearch?: boolean;
|
129
128
|
enableSorting?: boolean;
|
@@ -139,14 +138,14 @@ export declare type TableFeatureProps = {
|
|
139
138
|
enablePrinting?: boolean;
|
140
139
|
enableRowActions?: boolean;
|
141
140
|
enableRowActive?: boolean;
|
142
|
-
enableRowClick?: boolean;
|
141
|
+
enableRowClick?: boolean | ((row: TType) => boolean);
|
143
142
|
enableRowDrag?: boolean;
|
144
143
|
enableRowDrop?: boolean;
|
145
144
|
enableRowGoto?: boolean;
|
146
145
|
enableRowHeight?: boolean;
|
147
146
|
enableSaveSettings?: boolean | Partial<TableEnableSettingsOptions>;
|
148
147
|
};
|
149
|
-
export declare type TableCommonProps<TType = unknown> = TableFeatureProps & {
|
148
|
+
export declare type TableCommonProps<TType = unknown> = TableFeatureProps<TType> & {
|
150
149
|
children: (JSX.Element | boolean | null | undefined)[];
|
151
150
|
data: TType[];
|
152
151
|
id: string;
|
@@ -161,7 +160,7 @@ export declare type TableCommonProps<TType = unknown> = TableFeatureProps & {
|
|
161
160
|
rowActionsForGroup?: TableRowActionGroupRenderer<TType>[];
|
162
161
|
rowActionsLength?: number;
|
163
162
|
rowExpansionRenderer?: TableRowExpansionRenderer<TType>;
|
164
|
-
|
163
|
+
rowIdentityColumnAccessor?: keyof TType | (keyof TType)[];
|
165
164
|
shortcuts?: TableShortcuts<TType>;
|
166
165
|
toolbarLeft?: JSX.Element;
|
167
166
|
toolbarRight?: JSX.Element;
|
@@ -279,6 +278,9 @@ export declare type TableTexts = {
|
|
279
278
|
buttons: {
|
280
279
|
addFilter: string;
|
281
280
|
clearFilters: string;
|
281
|
+
cancel: string;
|
282
|
+
clear: string;
|
283
|
+
apply: string;
|
282
284
|
};
|
283
285
|
comparators: {
|
284
286
|
contains: string;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { TableRowClickHandler } from '../../types';
|
3
|
-
export declare function useTableRowClick<TType = unknown>(isEnabled?: boolean, onRowClick?: TableRowClickHandler<TType>): {
|
4
|
-
isEnabled: boolean;
|
5
|
-
handleClick: (event: React.MouseEvent<HTMLTableRowElement>,
|
6
|
-
handleKeyDown: <TType_1 = unknown>(event: KeyboardEvent,
|
3
|
+
export declare function useTableRowClick<TType = unknown>(isEnabled?: boolean | ((row: TType) => boolean), onRowClick?: TableRowClickHandler<TType>): {
|
4
|
+
isEnabled: (row: TType) => boolean;
|
5
|
+
handleClick: (event: React.MouseEvent<HTMLTableRowElement>, rowData: TType) => void;
|
6
|
+
handleKeyDown: <TType_1 = unknown>(event: KeyboardEvent, rowData: TType_1) => void;
|
7
7
|
};
|
@@ -35,7 +35,7 @@ declare module '@tanstack/table-core' {
|
|
35
35
|
rowGoto: ReturnType<typeof useTableRowGoto>;
|
36
36
|
rowGroups: ReturnType<typeof useTableRowGroups>;
|
37
37
|
rowHeight: ReturnType<typeof useTableRowHeight>;
|
38
|
-
|
38
|
+
rowIdentityColumnAccessor: (keyof TData)[];
|
39
39
|
rowSelection: ReturnType<typeof useTableRowSelection>;
|
40
40
|
search: ReturnType<typeof useTableSearch>;
|
41
41
|
server: ReturnType<typeof useTableServerLoading>;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { TableFeatureProps, TableProps } from '../../types';
|
2
|
-
export declare function getTableFeaturePreset<TType = unknown>(props: TableProps<TType>): TableFeatureProps
|
2
|
+
export declare function getTableFeaturePreset<TType = unknown>(props: TableProps<TType>): TableFeatureProps<TType>;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { TableOptions as ReactTableOptions, ColumnDef as ReactTableColumnDef, ColumnSizingState as ReactTableColumnSizingState, ColumnSort as ReactTableColumnSort, TableState as ReactTableState, VisibilityState as ReactTableVisibilityState } from '@tanstack/react-table';
|
2
2
|
import { useTableManagerInternalColumns } from '../types';
|
3
3
|
import { TableFeatureProps, TableProps, TableSettings } from '../../types';
|
4
|
-
export declare function mapTableChildrenToColumns<TType = unknown>(props: TableProps<TType>, settings: TableSettings, options: TableFeatureProps
|
4
|
+
export declare function mapTableChildrenToColumns<TType = unknown>(props: TableProps<TType>, settings: TableSettings, options: TableFeatureProps<TType>, internalColumns?: useTableManagerInternalColumns<TType>): {
|
5
5
|
columns: ReactTableColumnDef<TType, unknown>[];
|
6
6
|
defaultSizing: Record<string, number>;
|
7
7
|
defaultSorting: ReactTableColumnSort[];
|
8
8
|
defaultVisibility: Record<string, boolean>;
|
9
9
|
};
|
10
|
-
export declare function configureReactTableOptions<TType = unknown>(options: TableFeatureProps
|
10
|
+
export declare function configureReactTableOptions<TType = unknown>(options: TableFeatureProps<TType>, props: TableProps<TType>): Partial<ReactTableOptions<TType>>;
|
11
11
|
export declare function useReactTableInitialState<TType = unknown>(props: TableProps<TType>, columns: ReactTableColumnDef<TType>[], persistedSettings: TableSettings, defaults: {
|
12
12
|
defaultSizing: ReactTableColumnSizingState;
|
13
13
|
defaultSorting: ReactTableColumnSort[];
|