@semcore/data-table 16.0.0-prerelease.2 → 16.0.0-prerelease.21
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/CHANGELOG.md +25 -1
- package/lib/cjs/components/Body/Body.js +439 -0
- package/lib/cjs/components/Body/Body.js.map +1 -0
- package/lib/cjs/components/Body/Body.types.js +2 -0
- package/lib/cjs/components/Body/Body.types.js.map +1 -0
- package/lib/cjs/components/Body/Cell.js +195 -0
- package/lib/cjs/components/Body/Cell.js.map +1 -0
- package/lib/cjs/components/Body/Cell.types.js +2 -0
- package/lib/cjs/components/Body/Cell.types.js.map +1 -0
- package/lib/cjs/components/Body/MergedCells.js +29 -0
- package/lib/cjs/components/Body/MergedCells.js.map +1 -0
- package/lib/cjs/components/Body/Row.js +252 -0
- package/lib/cjs/components/Body/Row.js.map +1 -0
- package/lib/cjs/components/Body/Row.types.js +4 -0
- package/lib/cjs/components/Body/Row.types.js.map +1 -0
- package/lib/cjs/components/Body/style.shadow.css +263 -0
- package/lib/cjs/components/DataTable/DataTable.js +1025 -0
- package/lib/cjs/components/DataTable/DataTable.js.map +1 -0
- package/lib/cjs/{types.js → components/DataTable/DataTable.types.js} +1 -1
- package/lib/cjs/components/DataTable/DataTable.types.js.map +1 -0
- package/lib/cjs/components/DataTable/dataTable.shadow.css +17 -0
- package/lib/cjs/components/Head/Column.js +311 -0
- package/lib/cjs/components/Head/Column.js.map +1 -0
- package/lib/cjs/components/Head/Column.types.js +2 -0
- package/lib/cjs/components/Head/Column.types.js.map +1 -0
- package/lib/cjs/components/Head/Group.js +116 -0
- package/lib/cjs/components/Head/Group.js.map +1 -0
- package/lib/cjs/components/Head/Group.type.js +2 -0
- package/lib/cjs/components/Head/Group.type.js.map +1 -0
- package/lib/cjs/components/Head/Head.js +207 -0
- package/lib/cjs/components/Head/Head.js.map +1 -0
- package/lib/cjs/components/Head/Head.types.js +2 -0
- package/lib/cjs/components/Head/Head.types.js.map +1 -0
- package/lib/cjs/components/Head/style.shadow.css +180 -0
- package/lib/cjs/index.js +25 -15
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/scroll-shadows.shadow.css +45 -5
- package/lib/cjs/translations/en.json +6 -1
- package/lib/es6/components/Body/Body.js +432 -0
- package/lib/es6/components/Body/Body.js.map +1 -0
- package/lib/es6/components/Body/Body.types.js +2 -0
- package/lib/es6/components/Body/Body.types.js.map +1 -0
- package/lib/es6/components/Body/Cell.js +188 -0
- package/lib/es6/components/Body/Cell.js.map +1 -0
- package/lib/es6/components/Body/Cell.types.js +2 -0
- package/lib/es6/components/Body/Cell.types.js.map +1 -0
- package/lib/es6/components/Body/MergedCells.js +20 -0
- package/lib/es6/components/Body/MergedCells.js.map +1 -0
- package/lib/es6/components/Body/Row.js +245 -0
- package/lib/es6/components/Body/Row.js.map +1 -0
- package/lib/es6/components/Body/Row.types.js +2 -0
- package/lib/es6/components/Body/Row.types.js.map +1 -0
- package/lib/es6/components/Body/style.shadow.css +263 -0
- package/lib/es6/components/DataTable/DataTable.js +1013 -0
- package/lib/es6/components/DataTable/DataTable.js.map +1 -0
- package/lib/es6/components/DataTable/DataTable.types.js +2 -0
- package/lib/es6/components/DataTable/DataTable.types.js.map +1 -0
- package/lib/es6/components/DataTable/dataTable.shadow.css +17 -0
- package/lib/es6/components/Head/Column.js +304 -0
- package/lib/es6/components/Head/Column.js.map +1 -0
- package/lib/es6/components/Head/Column.types.js +2 -0
- package/lib/es6/components/Head/Column.types.js.map +1 -0
- package/lib/es6/components/Head/Group.js +109 -0
- package/lib/es6/components/Head/Group.js.map +1 -0
- package/lib/es6/components/Head/Group.type.js +2 -0
- package/lib/es6/components/Head/Group.type.js.map +1 -0
- package/lib/es6/components/Head/Head.js +201 -0
- package/lib/es6/components/Head/Head.js.map +1 -0
- package/lib/es6/components/Head/Head.types.js +2 -0
- package/lib/es6/components/Head/Head.types.js.map +1 -0
- package/lib/es6/components/Head/style.shadow.css +180 -0
- package/lib/es6/index.js +5 -2
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/scroll-shadows.shadow.css +45 -5
- package/lib/es6/translations/en.json +6 -1
- package/lib/esm/components/Body/Body.mjs +394 -0
- package/lib/esm/components/Body/Cell.mjs +186 -0
- package/lib/esm/components/Body/MergedCells.mjs +23 -0
- package/lib/esm/components/Body/Row.mjs +224 -0
- package/lib/esm/components/Body/style.shadow.css +263 -0
- package/lib/esm/components/DataTable/DataTable.mjs +944 -0
- package/lib/esm/components/DataTable/dataTable.shadow.css +17 -0
- package/lib/esm/components/Head/Column.mjs +296 -0
- package/lib/esm/components/Head/Group.mjs +103 -0
- package/lib/esm/components/Head/Head.mjs +181 -0
- package/lib/esm/components/Head/style.shadow.css +180 -0
- package/lib/esm/index.mjs +9 -6
- package/lib/esm/style/scroll-shadows.shadow.css +47 -0
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +30 -30
- package/lib/esm/translations/de.json.mjs +5 -4
- package/lib/esm/translations/en.json.mjs +10 -4
- package/lib/esm/translations/es.json.mjs +5 -4
- package/lib/esm/translations/fr.json.mjs +5 -4
- package/lib/esm/translations/it.json.mjs +5 -4
- package/lib/esm/translations/ja.json.mjs +5 -4
- package/lib/esm/translations/ko.json.mjs +5 -4
- package/lib/esm/translations/nl.json.mjs +5 -4
- package/lib/esm/translations/pl.json.mjs +5 -4
- package/lib/esm/translations/pt.json.mjs +5 -4
- package/lib/esm/translations/sv.json.mjs +5 -4
- package/lib/esm/translations/tr.json.mjs +5 -4
- package/lib/esm/translations/vi.json.mjs +5 -4
- package/lib/esm/translations/zh.json.mjs +5 -4
- package/lib/types/components/Body/Body.d.ts +8 -0
- package/lib/types/components/Body/Body.types.d.ts +57 -0
- package/lib/types/components/Body/Cell.d.ts +3 -0
- package/lib/types/components/Body/Cell.types.d.ts +20 -0
- package/lib/types/components/Body/MergedCells.d.ts +14 -0
- package/lib/types/components/Body/Row.d.ts +3 -0
- package/lib/types/components/Body/Row.types.d.ts +43 -0
- package/lib/types/components/DataTable/DataTable.d.ts +13 -0
- package/lib/types/components/DataTable/DataTable.types.d.ts +125 -0
- package/lib/types/components/Head/Column.d.ts +30 -0
- package/lib/types/components/Head/Column.types.d.ts +71 -0
- package/lib/types/components/Head/Group.d.ts +15 -0
- package/lib/types/components/Head/Group.type.d.ts +16 -0
- package/lib/types/components/Head/Head.d.ts +98 -0
- package/lib/types/components/Head/Head.types.d.ts +40 -0
- package/lib/types/index.d.ts +10 -2
- package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +5 -0
- package/package.json +11 -6
- package/vite.config.ts +0 -3
- package/lib/cjs/Body.js +0 -475
- package/lib/cjs/Body.js.map +0 -1
- package/lib/cjs/DataTable.js +0 -622
- package/lib/cjs/DataTable.js.map +0 -1
- package/lib/cjs/Head.js +0 -399
- package/lib/cjs/Head.js.map +0 -1
- package/lib/cjs/style/data-table.shadow.css +0 -394
- package/lib/cjs/types.js.map +0 -1
- package/lib/cjs/utils.js +0 -57
- package/lib/cjs/utils.js.map +0 -1
- package/lib/es6/Body.js +0 -468
- package/lib/es6/Body.js.map +0 -1
- package/lib/es6/DataTable.js +0 -614
- package/lib/es6/DataTable.js.map +0 -1
- package/lib/es6/Head.js +0 -391
- package/lib/es6/Head.js.map +0 -1
- package/lib/es6/style/data-table.shadow.css +0 -394
- package/lib/es6/types.js +0 -2
- package/lib/es6/types.js.map +0 -1
- package/lib/es6/utils.js +0 -48
- package/lib/es6/utils.js.map +0 -1
- package/lib/esm/Body.mjs +0 -320
- package/lib/esm/DataTable.mjs +0 -439
- package/lib/esm/Head.mjs +0 -258
- package/lib/esm/utils.mjs +0 -37
- package/lib/types/Body.d.ts +0 -61
- package/lib/types/DataTable.d.ts +0 -205
- package/lib/types/Head.d.ts +0 -45
- package/lib/types/types.d.ts +0 -73
- package/lib/types/utils.d.ts +0 -4
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
+
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
+
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
import { sstyled as _sstyled } from "@semcore/core";
|
|
10
|
+
import { assignProps as _assignProps } from "@semcore/core";
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import { Component, Root, sstyled, createComponent } from '@semcore/core';
|
|
13
|
+
import { Box, Collapse } from '@semcore/base-components';
|
|
14
|
+
/*!__reshadow-styles__:"./style.shadow.css"*/
|
|
15
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SBody_1sflu_gg_,.___SRowGroup_1sflu_gg_,.___SRow_1sflu_gg_{display:contents}.___SBody_1sflu_gg_.__compact_1sflu_gg_ .___SCell_1sflu_gg_{padding:var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px)}.___SBody_1sflu_gg_.__compact_1sflu_gg_ .___SCell_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + (var(--intergalactic-spacing-5x, 20px)*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_.__gridArea_1sflu_gg_,.___SCollapseRow_1sflu_gg_.__gridArea_1sflu_gg_,.___SRow_1sflu_gg_.__gridArea_1sflu_gg_{grid-area:var(--gridArea_1sflu)}.___SCollapseRow_1sflu_gg_ .___SCell_1sflu_gg_{display:block}.___SRow_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_.__expanded_1sflu_gg_._accordionType_cell_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_).__withAccordion_1sflu_gg_,.___SRow_1sflu_gg_.__expanded_1sflu_gg_._accordionType_row_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SCollapseRow_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_.__expanded_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-accordion, #f4f5f9)}@media (hover:hover){.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_muted_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_muted_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_muted_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_muted_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_._theme_muted_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_muted_1sflu_gg_,.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-hover, #f0f0f4)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_info_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_info_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_info_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_info_1sflu_gg_,.___SRow_1sflu_gg_._theme_info_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_info_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-selected-hover, #c4e5fe)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_success_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_success_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_success_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_success_1sflu_gg_,.___SRow_1sflu_gg_._theme_success_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_success_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-new-hover, #9ef2c9)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_warning_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_warning_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_warning_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_warning_1sflu_gg_,.___SRow_1sflu_gg_._theme_warning_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_warning_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-warning-hover, #ffdca2)}.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_._theme_danger_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_[data-grouped-by=rowgroup]._theme_danger_1sflu_gg_,.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_._theme_danger_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRowGroup_1sflu_gg_:has(.___SCell_1sflu_gg_[data-grouped-by=rowgroup]:hover)>.___SRow_1sflu_gg_>.___SCell_1sflu_gg_._theme_danger_1sflu_gg_,.___SRow_1sflu_gg_._theme_danger_1sflu_gg_:hover>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_),.___SRow_1sflu_gg_:hover>.___SCell_1sflu_gg_._theme_danger_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-critical-hover, #ffd7df)}}.___SRow_1sflu_gg_._theme_muted_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SRow_1sflu_gg_._theme_muted_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-active, #e6e7ed)}.___SRow_1sflu_gg_._theme_info_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SRow_1sflu_gg_._theme_info_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-selected-active, #c4e5fe)}.___SRow_1sflu_gg_._theme_success_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SRow_1sflu_gg_._theme_success_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-new-active, #9ef2c9)}.___SRow_1sflu_gg_._theme_warning_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SRow_1sflu_gg_._theme_warning_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-warning-active, #ffdca2)}.___SRow_1sflu_gg_._theme_danger_1sflu_gg_ .___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SRow_1sflu_gg_._theme_danger_1sflu_gg_.__active_1sflu_gg_>.___SCell_1sflu_gg_:not(.__theme_1sflu_gg_){background-color:var(--intergalactic-table-td-cell-critical-active, #ffd7df)}.___SCell_1sflu_gg_{display:flex;height:100%;font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);color:var(--intergalactic-text-primary, #191b23);box-sizing:border-box;border-bottom:1px solid var(--intergalactic-border-secondary, #e0e1e9);overflow:hidden;white-space:pre-wrap;word-break:break-word;font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;transition:width calc(var(--intergalactic-duration-extra-fast, 100)*1ms) ease-in-out;outline:0}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_{margin-right:var(--intergalactic-spacing-3x, 12px);margin-top:var(--intergalactic-spacing-05x, 2px);height:-moz-fit-content;height:fit-content}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_ svg{transition:transform calc(var(--intergalactic-duration-accordion, 200)*1ms) ease-out}.___SCell_1sflu_gg_ .___SAccordionToggle_1sflu_gg_.__expanded_1sflu_gg_ svg{transform:rotate(90deg)}.___SCheckboxCell_1sflu_gg_,.___SRow_1sflu_gg_._accordionType_cell_1sflu_gg_>.___SCell_1sflu_gg_.__withAccordion_1sflu_gg_,.___SRow_1sflu_gg_._accordionType_row_1sflu_gg_>.___SCell_1sflu_gg_{cursor:pointer}.___SCell_1sflu_gg_._use_primary_1sflu_gg_{padding:var(--intergalactic-spacing-3x, 12px);min-height:45px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1sflu_gg_._use_primary_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-3x, 12px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_._use_secondary_1sflu_gg_{padding:var(--intergalactic-spacing-2x, 8px);min-height:37px;background-color:var(--intergalactic-bg-primary-neutral, #ffffff)}.___SCell_1sflu_gg_._use_secondary_1sflu_gg_[data-aria-level]{padding-left:calc(var(--intergalactic-spacing-2x, 8px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px))*(var(--data-aria-level_1sflu) - 1)))}.___SCell_1sflu_gg_._borders_both_1sflu_gg_,.___SCell_1sflu_gg_._borders_left_1sflu_gg_{border-left:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1sflu_gg_._borders_both_1sflu_gg_,.___SCell_1sflu_gg_._borders_right_1sflu_gg_{border-right:1px solid var(--intergalactic-border-secondary, #e0e1e9)}.___SCell_1sflu_gg_.__fixed_1sflu_gg_{position:sticky;z-index:2}.___SCell_1sflu_gg_._theme_muted_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-unread, #f4f5f9)}.___SCell_1sflu_gg_._theme_info_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-selected, #e9f7ff)}.___SCell_1sflu_gg_._theme_success_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-new, #dbfee8)}.___SCell_1sflu_gg_._theme_warning_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-warning, #fff3d9)}.___SCell_1sflu_gg_._theme_danger_1sflu_gg_{background-color:var(--intergalactic-table-td-cell-critical, #fff0f7)}.___SSpinContainer_1sflu_gg_{position:absolute;left:0;right:0;bottom:0;top:0;display:flex;align-items:center;justify-content:center;background-color:var(--intergalactic-overlay-limitation-secondary, rgba(255, 255, 255, 0.85))}.___SSpinContainer_1sflu_gg_.__headerHeight_1sflu_gg_{top:var(--headerHeight_1sflu)}.___SEmptyData_1sflu_gg_{grid-column:1/-1}.___SRow_1sflu_gg_._sideIndents_wide_1sflu_gg_ .___SCell_1sflu_gg_:first-child{padding-left:var(--intergalactic-spacing-5x, 20px)}.___SRow_1sflu_gg_._sideIndents_wide_1sflu_gg_ .___SCell_1sflu_gg_:last-child{padding-right:var(--intergalactic-spacing-5x, 20px)}", /*__inner_css_end__*/"1sflu_gg_"),
|
|
16
|
+
/*__reshadow_css_end__*/
|
|
17
|
+
{
|
|
18
|
+
"__SBody": "___SBody_1sflu_gg_",
|
|
19
|
+
"__SRow": "___SRow_1sflu_gg_",
|
|
20
|
+
"__SRowGroup": "___SRowGroup_1sflu_gg_",
|
|
21
|
+
"_gridArea": "__gridArea_1sflu_gg_",
|
|
22
|
+
"__SCell": "___SCell_1sflu_gg_",
|
|
23
|
+
"__SCollapseRow": "___SCollapseRow_1sflu_gg_",
|
|
24
|
+
"--gridArea": "--gridArea_1sflu",
|
|
25
|
+
"_active": "__active_1sflu_gg_",
|
|
26
|
+
"_theme": "__theme_1sflu_gg_",
|
|
27
|
+
"_expanded": "__expanded_1sflu_gg_",
|
|
28
|
+
"_accordionType_row": "_accordionType_row_1sflu_gg_",
|
|
29
|
+
"_accordionType_cell": "_accordionType_cell_1sflu_gg_",
|
|
30
|
+
"_withAccordion": "__withAccordion_1sflu_gg_",
|
|
31
|
+
"_theme_muted": "_theme_muted_1sflu_gg_",
|
|
32
|
+
"_theme_info": "_theme_info_1sflu_gg_",
|
|
33
|
+
"_theme_success": "_theme_success_1sflu_gg_",
|
|
34
|
+
"_theme_warning": "_theme_warning_1sflu_gg_",
|
|
35
|
+
"_theme_danger": "_theme_danger_1sflu_gg_",
|
|
36
|
+
"__SCheckboxCell": "___SCheckboxCell_1sflu_gg_",
|
|
37
|
+
"_borders_both": "_borders_both_1sflu_gg_",
|
|
38
|
+
"_borders_left": "_borders_left_1sflu_gg_",
|
|
39
|
+
"_borders_right": "_borders_right_1sflu_gg_",
|
|
40
|
+
"_fixed": "__fixed_1sflu_gg_",
|
|
41
|
+
"__SSpinContainer": "___SSpinContainer_1sflu_gg_",
|
|
42
|
+
"_headerHeight": "__headerHeight_1sflu_gg_",
|
|
43
|
+
"--headerHeight": "--headerHeight_1sflu",
|
|
44
|
+
"__SEmptyData": "___SEmptyData_1sflu_gg_",
|
|
45
|
+
"_compact": "__compact_1sflu_gg_",
|
|
46
|
+
"--data-aria-level": "--data-aria-level_1sflu",
|
|
47
|
+
"__SAccordionToggle": "___SAccordionToggle_1sflu_gg_",
|
|
48
|
+
"_use_primary": "_use_primary_1sflu_gg_",
|
|
49
|
+
"_use_secondary": "_use_secondary_1sflu_gg_",
|
|
50
|
+
"_sideIndents_wide": "_sideIndents_wide_1sflu_gg_"
|
|
51
|
+
});
|
|
52
|
+
import { Body } from './Body';
|
|
53
|
+
import { ACCORDION, SELECT_ALL } from '../DataTable/DataTable';
|
|
54
|
+
import { MergedColumnsCell, MergedRowsCell } from './MergedCells';
|
|
55
|
+
import Checkbox from '@semcore/checkbox';
|
|
56
|
+
var RowRoot = /*#__PURE__*/function (_Component) {
|
|
57
|
+
_inherits(RowRoot, _Component);
|
|
58
|
+
var _super = _createSuper(RowRoot);
|
|
59
|
+
function RowRoot() {
|
|
60
|
+
var _this;
|
|
61
|
+
_classCallCheck(this, RowRoot);
|
|
62
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
63
|
+
args[_key] = arguments[_key];
|
|
64
|
+
}
|
|
65
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
66
|
+
_defineProperty(_assertThisInitialized(_this), "cellIndex", -1);
|
|
67
|
+
_defineProperty(_assertThisInitialized(_this), "handleSelectRow", function (value, event) {
|
|
68
|
+
var _this$asProps = _this.asProps,
|
|
69
|
+
row = _this$asProps.row,
|
|
70
|
+
rowIndex = _this$asProps.rowIndex,
|
|
71
|
+
onSelectRow = _this$asProps.onSelectRow;
|
|
72
|
+
onSelectRow === null || onSelectRow === void 0 ? void 0 : onSelectRow(value, rowIndex, row, event);
|
|
73
|
+
});
|
|
74
|
+
_defineProperty(_assertThisInitialized(_this), "handleClickCheckbox", function (value) {
|
|
75
|
+
return function (event) {
|
|
76
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
77
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
78
|
+
var _this$asProps2 = _this.asProps,
|
|
79
|
+
row = _this$asProps2.row,
|
|
80
|
+
rowIndex = _this$asProps2.rowIndex,
|
|
81
|
+
onSelectRow = _this$asProps2.onSelectRow;
|
|
82
|
+
onSelectRow === null || onSelectRow === void 0 ? void 0 : onSelectRow(value, rowIndex, row, event);
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
_defineProperty(_assertThisInitialized(_this), "handleBackFromAccordion", function (e) {
|
|
86
|
+
if (e.key === 'Escape') {
|
|
87
|
+
_this.asProps.onBackFromAccordion(_this.cellIndex);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
return _this;
|
|
91
|
+
}
|
|
92
|
+
_createClass(RowRoot, [{
|
|
93
|
+
key: "cellHasAccordion",
|
|
94
|
+
value: function cellHasAccordion(cellValue) {
|
|
95
|
+
return !(cellValue instanceof MergedRowsCell || cellValue instanceof MergedColumnsCell) && Boolean(cellValue === null || cellValue === void 0 ? void 0 : cellValue[ACCORDION]);
|
|
96
|
+
}
|
|
97
|
+
}, {
|
|
98
|
+
key: "render",
|
|
99
|
+
value: function render() {
|
|
100
|
+
var _ref = this.asProps,
|
|
101
|
+
_ref2,
|
|
102
|
+
_this2 = this,
|
|
103
|
+
_scrollAreaRef$curren,
|
|
104
|
+
_row$ACCORDION;
|
|
105
|
+
var SRow = Box;
|
|
106
|
+
var SCollapseRow = Collapse;
|
|
107
|
+
var SCell = Body.Cell;
|
|
108
|
+
var SCheckboxCell = Body.Cell;
|
|
109
|
+
var _this$asProps3 = this.asProps,
|
|
110
|
+
columns = _this$asProps3.columns,
|
|
111
|
+
row = _this$asProps3.row,
|
|
112
|
+
styles = _this$asProps3.styles,
|
|
113
|
+
rowIndex = _this$asProps3.rowIndex,
|
|
114
|
+
ariaRowIndex = _this$asProps3.ariaRowIndex,
|
|
115
|
+
gridRowIndex = _this$asProps3.gridRowIndex,
|
|
116
|
+
expanded = _this$asProps3.expanded,
|
|
117
|
+
accordionDataGridArea = _this$asProps3.accordionDataGridArea,
|
|
118
|
+
expandedRows = _this$asProps3.expandedRows,
|
|
119
|
+
onExpandRow = _this$asProps3.onExpandRow,
|
|
120
|
+
_this$asProps3$ariaL = _this$asProps3['aria-level'],
|
|
121
|
+
ariaLevel = _this$asProps3$ariaL === void 0 ? 1 : _this$asProps3$ariaL,
|
|
122
|
+
scrollAreaRef = _this$asProps3.scrollAreaRef,
|
|
123
|
+
selectedRows = _this$asProps3.selectedRows,
|
|
124
|
+
uid = _this$asProps3.uid,
|
|
125
|
+
getFixedStyle = _this$asProps3.getFixedStyle;
|
|
126
|
+
var accordion = row[ACCORDION];
|
|
127
|
+
var accordionType = accordion ? 'row' : undefined;
|
|
128
|
+
if (!accordion) {
|
|
129
|
+
var cells = Object.values(row);
|
|
130
|
+
var cellWithAccordionIndex = cells.findIndex(function (value) {
|
|
131
|
+
return _this2.cellHasAccordion(value);
|
|
132
|
+
});
|
|
133
|
+
this.cellIndex = cellWithAccordionIndex;
|
|
134
|
+
var cellWithAccordion = cells[cellWithAccordionIndex];
|
|
135
|
+
accordion = cellWithAccordion === null || cellWithAccordion === void 0 ? void 0 : cellWithAccordion[ACCORDION];
|
|
136
|
+
accordionType = 'cell';
|
|
137
|
+
}
|
|
138
|
+
return _ref2 = sstyled(styles), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SRow, _ref2.cn("SRow", _objectSpread({}, _assignProps({
|
|
139
|
+
"role": 'row',
|
|
140
|
+
"aria-rowindex": ariaRowIndex,
|
|
141
|
+
"accordionType": accordionType,
|
|
142
|
+
"theme": selectedRows !== null && selectedRows !== void 0 && selectedRows.includes(rowIndex) ? 'info' : undefined
|
|
143
|
+
}, _ref))), columns.map(function (column, i) {
|
|
144
|
+
if (selectedRows && i === 0) {
|
|
145
|
+
var _ref3;
|
|
146
|
+
var checked = selectedRows.includes(rowIndex);
|
|
147
|
+
return _ref3 = sstyled(styles), /*#__PURE__*/React.createElement(SCheckboxCell, _ref3.cn("SCheckboxCell", {
|
|
148
|
+
"key": i,
|
|
149
|
+
"row": row,
|
|
150
|
+
"rowIndex": rowIndex,
|
|
151
|
+
"column": {
|
|
152
|
+
name: SELECT_ALL.toString()
|
|
153
|
+
},
|
|
154
|
+
"columnIndex": 0,
|
|
155
|
+
"gridRowIndex": gridRowIndex,
|
|
156
|
+
"onClick": _this2.handleClickCheckbox(!checked)
|
|
157
|
+
}), /*#__PURE__*/React.createElement(Checkbox, _ref3.cn("Checkbox", {
|
|
158
|
+
"checked": checked,
|
|
159
|
+
"aria-labelledby": "".concat(uid, "_").concat(ariaRowIndex, "_1"),
|
|
160
|
+
"onChange": _this2.handleSelectRow
|
|
161
|
+
})));
|
|
162
|
+
}
|
|
163
|
+
var index = i;
|
|
164
|
+
var cellValue = row[column.name];
|
|
165
|
+
if (cellValue === undefined) {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
var style = {};
|
|
169
|
+
if (column.fixed) {
|
|
170
|
+
var _getFixedStyle = getFixedStyle(column),
|
|
171
|
+
_getFixedStyle2 = _slicedToArray(_getFixedStyle, 2),
|
|
172
|
+
name = _getFixedStyle2[0],
|
|
173
|
+
value = _getFixedStyle2[1];
|
|
174
|
+
if (name !== undefined && value !== undefined) {
|
|
175
|
+
style[name] = value;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return /*#__PURE__*/React.createElement(Body.Cell, {
|
|
179
|
+
key: index,
|
|
180
|
+
id: "".concat(uid, "_").concat(ariaRowIndex, "_").concat(index),
|
|
181
|
+
accordionId: "".concat(uid, "_").concat(ariaRowIndex + 1),
|
|
182
|
+
"data-aria-level": index === 0 ? ariaLevel : undefined,
|
|
183
|
+
row: row,
|
|
184
|
+
rowIndex: rowIndex,
|
|
185
|
+
gridRowIndex: gridRowIndex,
|
|
186
|
+
columnIndex: index,
|
|
187
|
+
style: style,
|
|
188
|
+
column: column
|
|
189
|
+
// @ts-ignore
|
|
190
|
+
,
|
|
191
|
+
withAccordion: _this2.cellHasAccordion(cellValue)
|
|
192
|
+
});
|
|
193
|
+
})), /*#__PURE__*/React.isValidElement(accordion) && /*#__PURE__*/React.createElement(SCollapseRow, _ref2.cn("SCollapseRow", {
|
|
194
|
+
"key": rowIndex,
|
|
195
|
+
"role": 'row',
|
|
196
|
+
"aria-rowindex": ariaRowIndex + 1,
|
|
197
|
+
"id": "".concat(uid, "_").concat(ariaRowIndex + 1),
|
|
198
|
+
"visible": expanded,
|
|
199
|
+
"interactive": true,
|
|
200
|
+
"gridArea": accordionDataGridArea,
|
|
201
|
+
"duration": 200,
|
|
202
|
+
"zIndex": 5
|
|
203
|
+
}), /*#__PURE__*/React.createElement(SCell, _ref2.cn("SCell", {
|
|
204
|
+
"aria-colindex": 1,
|
|
205
|
+
"aria-level": ariaLevel + 1,
|
|
206
|
+
"aria-setsize": 1,
|
|
207
|
+
"aria-posinset": 1,
|
|
208
|
+
"row": row,
|
|
209
|
+
"rowIndex": rowIndex + 1,
|
|
210
|
+
"columnIndex": 1,
|
|
211
|
+
"column": {
|
|
212
|
+
name: ACCORDION
|
|
213
|
+
},
|
|
214
|
+
"position": 'sticky',
|
|
215
|
+
"left": 0,
|
|
216
|
+
"w": (_scrollAreaRef$curren = scrollAreaRef.current) === null || _scrollAreaRef$curren === void 0 ? void 0 : _scrollAreaRef$curren.clientWidth,
|
|
217
|
+
"onKeyDown": this.handleBackFromAccordion
|
|
218
|
+
}), accordion)), row[ACCORDION] && Array.isArray(row[ACCORDION]) && expanded && ((_row$ACCORDION = row[ACCORDION]) === null || _row$ACCORDION === void 0 ? void 0 : _row$ACCORDION.map(function (subrow, i) {
|
|
219
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
220
|
+
key: i,
|
|
221
|
+
row: subrow,
|
|
222
|
+
columns: columns,
|
|
223
|
+
rows: row[ACCORDION],
|
|
224
|
+
rowIndex: rowIndex,
|
|
225
|
+
"aria-posinset": i + 1,
|
|
226
|
+
"aria-level": ariaLevel + 1,
|
|
227
|
+
ariaRowIndex: ariaRowIndex + 1 + i,
|
|
228
|
+
gridRowIndex: gridRowIndex + 1 + i,
|
|
229
|
+
expanded: true,
|
|
230
|
+
getFixedStyle: getFixedStyle
|
|
231
|
+
});
|
|
232
|
+
})));
|
|
233
|
+
}
|
|
234
|
+
}]);
|
|
235
|
+
return RowRoot;
|
|
236
|
+
}(Component); // @ts-ignore
|
|
237
|
+
_defineProperty(RowRoot, "displayName", 'Row');
|
|
238
|
+
_defineProperty(RowRoot, "style", style);
|
|
239
|
+
_defineProperty(RowRoot, "defaultProps", {
|
|
240
|
+
'aria-level': undefined
|
|
241
|
+
});
|
|
242
|
+
export var Row = createComponent(RowRoot, {}, {
|
|
243
|
+
parent: Body
|
|
244
|
+
});
|
|
245
|
+
//# sourceMappingURL=Row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Row.js","names":["React","Component","Root","sstyled","createComponent","Box","Collapse","style","_sstyled","insert","Body","ACCORDION","SELECT_ALL","MergedColumnsCell","MergedRowsCell","Checkbox","RowRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","value","event","_this$asProps","asProps","row","rowIndex","onSelectRow","preventDefault","stopPropagation","_this$asProps2","e","key","onBackFromAccordion","cellIndex","_createClass","cellHasAccordion","cellValue","Boolean","render","_ref","_ref2","_this2","_scrollAreaRef$curren","_row$ACCORDION","SRow","SCollapseRow","SCell","Cell","SCheckboxCell","_this$asProps3","columns","styles","ariaRowIndex","gridRowIndex","expanded","accordionDataGridArea","expandedRows","onExpandRow","_this$asProps3$ariaL","ariaLevel","scrollAreaRef","selectedRows","uid","getFixedStyle","accordion","accordionType","undefined","cells","Object","values","cellWithAccordionIndex","findIndex","cellWithAccordion","createElement","Fragment","cn","_objectSpread","_assignProps","includes","map","column","i","_ref3","checked","name","toString","handleClickCheckbox","handleSelectRow","index","fixed","_getFixedStyle","_getFixedStyle2","_slicedToArray","id","accordionId","columnIndex","withAccordion","isValidElement","current","clientWidth","handleBackFromAccordion","isArray","subrow","Row","rows","parent"],"sources":["../../../../src/components/Body/Row.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Component, Root, sstyled, createComponent } from '@semcore/core';\nimport { DataTableRowProps, RowPropsInner } from './Row.types';\nimport { Box, Collapse } from '@semcore/base-components';\nimport style from './style.shadow.css';\nimport { Body } from './Body';\nimport { ACCORDION, SELECT_ALL } from '../DataTable/DataTable';\nimport { MergedColumnsCell, MergedRowsCell } from './MergedCells';\nimport { DTValue } from '../DataTable/DataTable.types';\nimport Checkbox from '@semcore/checkbox';\n\nclass RowRoot extends Component<DataTableRowProps, {}, {}, [], RowPropsInner> {\n static displayName = 'Row';\n static style = style;\n\n static defaultProps = {\n 'aria-level': undefined,\n };\n\n private cellIndex = -1;\n\n cellHasAccordion(cellValue?: DTValue | MergedColumnsCell | MergedRowsCell): cellValue is DTValue {\n return (\n !(cellValue instanceof MergedRowsCell || cellValue instanceof MergedColumnsCell) &&\n Boolean(cellValue?.[ACCORDION])\n );\n }\n\n handleSelectRow = (value: boolean, event?: React.SyntheticEvent<HTMLElement>) => {\n const { row, rowIndex, onSelectRow } = this.asProps;\n\n onSelectRow?.(value, rowIndex, row, event);\n };\n\n handleClickCheckbox = (value: boolean) => (event?: React.SyntheticEvent<HTMLElement>) => {\n event?.preventDefault();\n event?.stopPropagation();\n const { row, rowIndex, onSelectRow } = this.asProps;\n\n onSelectRow?.(value, rowIndex, row, event);\n };\n\n handleBackFromAccordion = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n this.asProps.onBackFromAccordion(this.cellIndex);\n }\n };\n\n render() {\n const SRow = Root;\n const SCollapseRow = Collapse;\n const SCell = Body.Cell;\n const SCheckboxCell = Body.Cell;\n const {\n columns,\n row,\n styles,\n rowIndex,\n ariaRowIndex,\n gridRowIndex,\n expanded,\n accordionDataGridArea,\n expandedRows,\n onExpandRow,\n 'aria-level': ariaLevel = 1,\n scrollAreaRef,\n selectedRows,\n uid,\n getFixedStyle,\n } = this.asProps;\n\n let accordion = row[ACCORDION];\n let accordionType = accordion ? 'row' : undefined;\n\n if (!accordion) {\n const cells = Object.values(row);\n const cellWithAccordionIndex = cells.findIndex((value) => {\n return this.cellHasAccordion(value);\n });\n\n this.cellIndex = cellWithAccordionIndex;\n\n const cellWithAccordion = cells[cellWithAccordionIndex] as DTValue | undefined;\n\n accordion = cellWithAccordion?.[ACCORDION];\n accordionType = 'cell';\n }\n\n return sstyled(styles)(\n <>\n <SRow\n render={Box}\n role={'row'}\n aria-rowindex={ariaRowIndex}\n accordionType={accordionType}\n theme={selectedRows?.includes(rowIndex) ? 'info' : undefined}\n >\n {columns.map((column, i) => {\n if (selectedRows && i === 0) {\n const checked = selectedRows.includes(rowIndex);\n return sstyled(styles)(\n <SCheckboxCell\n key={i}\n row={row}\n rowIndex={rowIndex}\n // @ts-ignore\n column={{ name: SELECT_ALL.toString() }}\n columnIndex={0}\n gridRowIndex={gridRowIndex}\n onClick={this.handleClickCheckbox(!checked)}\n >\n <Checkbox\n checked={checked}\n aria-labelledby={`${uid}_${ariaRowIndex}_1`}\n onChange={this.handleSelectRow}\n />\n </SCheckboxCell>,\n );\n }\n\n const index = i;\n const cellValue = row[column.name];\n\n if (cellValue === undefined) {\n return null;\n }\n\n const style: React.CSSProperties = {};\n\n if (column.fixed) {\n const [name, value] = getFixedStyle(column);\n\n if (name !== undefined && value !== undefined) {\n style[name] = value;\n }\n }\n\n return (\n <Body.Cell\n key={index}\n id={`${uid}_${ariaRowIndex}_${index}`}\n accordionId={`${uid}_${ariaRowIndex + 1}`}\n data-aria-level={index === 0 ? ariaLevel : undefined}\n row={row}\n rowIndex={rowIndex}\n gridRowIndex={gridRowIndex}\n columnIndex={index}\n style={style}\n column={column}\n // @ts-ignore\n withAccordion={this.cellHasAccordion(cellValue)}\n />\n );\n })}\n </SRow>\n\n {React.isValidElement(accordion) && (\n <SCollapseRow\n key={rowIndex}\n role={'row'}\n aria-rowindex={ariaRowIndex + 1}\n id={`${uid}_${ariaRowIndex + 1}`}\n visible={expanded}\n interactive\n gridArea={accordionDataGridArea}\n duration={200}\n zIndex={5}\n >\n <SCell\n aria-colindex={1}\n aria-level={ariaLevel + 1}\n aria-setsize={1}\n aria-posinset={1}\n row={row}\n rowIndex={rowIndex + 1}\n columnIndex={1}\n // @ts-ignore\n column={{ name: ACCORDION }}\n position={'sticky'}\n left={0}\n w={scrollAreaRef.current?.clientWidth}\n onKeyDown={this.handleBackFromAccordion}\n >\n {accordion}\n </SCell>\n </SCollapseRow>\n )}\n\n {row[ACCORDION] &&\n Array.isArray(row[ACCORDION]) &&\n expanded &&\n row[ACCORDION]?.map((subrow, i) => {\n return (\n <Row\n key={i}\n row={subrow}\n columns={columns}\n rows={row[ACCORDION]}\n rowIndex={rowIndex}\n aria-posinset={i + 1}\n aria-level={ariaLevel + 1}\n ariaRowIndex={ariaRowIndex + 1 + i}\n gridRowIndex={gridRowIndex + 1 + i}\n expanded={true}\n getFixedStyle={getFixedStyle}\n />\n );\n })}\n </>,\n );\n }\n}\n\n// @ts-ignore\nexport const Row = createComponent(RowRoot, {}, { parent: Body });\n"],"mappings":";;;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,IAAI,EAAEC,OAAO,EAAEC,eAAe,QAAQ,eAAe;AAEzE,SAASC,GAAG,EAAEC,QAAQ,QAAQ,0BAA0B;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;E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;UACrB,cAAYtB,SAAS,GAAG,CAAE;UAC1BP,YAAY,EAAEA,YAAY,GAAG,CAAC,GAAG6B,CAAE;UACnC5B,YAAY,EAAEA,YAAY,GAAG,CAAC,GAAG4B,CAAE;UACnC3B,QAAQ,EAAE,IAAK;UACfS,aAAa,EAAEA;QAAc,EAC7B;MAEN,CAAC,CAAC,EACH;IAEP;EAAC;EAAA,OAAA7D,OAAA;AAAA,EAvMmBf,SAAS,GA0M/B;AAAA+B,eAAA,CA1MMhB,OAAO,iBACU,KAAK;AAAAgB,eAAA,CADtBhB,OAAO,WAEIT,KAAK;AAAAyB,eAAA,CAFhBhB,OAAO,kBAIW;EACpB,YAAY,EAAEgE;AAChB,CAAC;AAqMH,OAAO,IAAMqC,GAAG,GAAGjH,eAAe,CAACY,OAAO,EAAE,CAAC,CAAC,EAAE;EAAEuG,MAAM,EAAE7G;AAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Row.types.js","names":["ACCORDION","ROW_INDEX","UNIQ_ROW_KEY"],"sources":["../../../../src/components/Body/Row.types.ts"],"sourcesContent":["import { DTValue, DTUse, DataTableData } from '../DataTable/DataTable.types';\nimport { DTColumn } from '../Head/Column.types';\nimport { MergedColumnsCell, MergedRowsCell } from './MergedCells';\nimport { ACCORDION, ROW_INDEX, UNIQ_ROW_KEY } from '../DataTable/DataTable';\n\nexport type DTRow = {\n [UNIQ_ROW_KEY]: string;\n [ROW_INDEX]: number;\n [key: string]: DTValue | MergedRowsCell | MergedColumnsCell;\n [ACCORDION]?: React.ReactNode | DataTableData | undefined;\n};\nexport type DTRows = Array<DTRow | DTRow[]>;\n\nexport type DataTableRowProps = {\n row: DTRow;\n offset?: number;\n};\n\nexport type RowPropsInner = JSX.IntrinsicElements['div'] & {\n use: DTUse;\n /**\n * Expanded flag for rows with accordion\n * @default false\n */\n expanded?: boolean;\n\n columns: DTColumn[];\n row: DTRow | DTRow[];\n rows: DTRows;\n rowIndex: number; // from 0\n ariaRowIndex: number; // from 1 + 1 header\n gridRowIndex: number; // from 1 + 1 (or 2 if it has group) header\n\n expandedRows: Set<string>;\n onExpandRow: (expandedRow: DTRow) => void;\n\n gridTemplateAreas: string[];\n gridTemplateColumns: string[];\n accordionDataGridArea: string;\n\n selectedRows?: number[];\n onSelectRow?: (\n isSelect: boolean,\n selectedRowIndex: number,\n row: DTRow,\n event?: React.SyntheticEvent<HTMLElement>,\n ) => void;\n\n inert?: '';\n\n onBackFromAccordion: (colIndex: number) => void;\n\n scrollAreaRef: React.RefObject<HTMLDivElement>;\n uid: string;\n sideIndents?: 'wide';\n getFixedStyle: (\n cell: Pick<DTColumn, 'name' | 'fixed'>,\n ) => [side: 'left' | 'right', style: string | number] | [side: undefined, style: undefined];\n};\n"],"mappings":"AAGA,SAASA,SAAS,EAAEC,SAAS,EAAEC,YAAY,QAAQ,wBAAwB"}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
SBody, SRow, SRowGroup {
|
|
2
|
+
display: contents;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
SBody[compact] {
|
|
6
|
+
SCell {
|
|
7
|
+
padding: var(--intergalactic-spacing-3x, 12px) var(--intergalactic-spacing-2x, 8px);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
SCell[data-aria-level] {
|
|
11
|
+
padding-left: calc(var(--intergalactic-spacing-2x, 8px) + (var(--intergalactic-spacing-5x, 20px) * (var(--data-aria-level) - 1)));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
SRow[gridArea], SCell[gridArea], SCollapseRow[gridArea] {
|
|
16
|
+
grid-area: var(--gridArea);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
SCollapseRow SCell {
|
|
20
|
+
display: block;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* DEFAULT THEME */
|
|
24
|
+
SRow[active] > SCell:not([theme]) {
|
|
25
|
+
/* The color is hardcoded because need hex(in figma rgba) */
|
|
26
|
+
/* disable-tokens-validator */
|
|
27
|
+
background-color: var(--intergalactic-table-td-cell-active, #e6e7ed);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
SRow[expanded][accordionType='row'] > SCell:not([theme]) {
|
|
31
|
+
background-color: var(--intergalactic-table-td-cell-active, #e6e7ed);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
SRow[expanded][accordionType='cell'] > SCell:not([theme])[withAccordion] {
|
|
35
|
+
background-color: var(--intergalactic-table-td-cell-active, #e6e7ed);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
SCollapseRow > SCell:not([theme]), SRow[expanded] > SCell:not([theme]) {
|
|
39
|
+
background-color: var(--intergalactic-table-td-cell-accordion, #f4f5f9);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* we need a media query here because of the postcssHoverMediaFeature plugin. it doesn't handle this type of selectors correctly */
|
|
43
|
+
@media (hover: hover) {
|
|
44
|
+
SRow:hover > SCell:not([theme]),
|
|
45
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow > SCell:not([theme]),
|
|
46
|
+
SRowGroup:has(SCell:hover) > SRow > SCell[data-grouped-by='rowgroup']:not([theme]) {
|
|
47
|
+
background-color: var(--intergalactic-table-td-cell-hover, #f0f0f4);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* MUTED THEME */
|
|
51
|
+
SRow:hover > SCell[theme='muted'],
|
|
52
|
+
SRow[theme='muted']:hover > SCell:not([theme]),
|
|
53
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow > SCell[theme='muted'],
|
|
54
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow[theme='muted'] > SCell:not([theme]),
|
|
55
|
+
SRowGroup:has(SCell:hover) > SRow > SCell[data-grouped-by='rowgroup'][theme='muted'],
|
|
56
|
+
SRowGroup:has(SCell:hover) > SRow[theme='muted'] > SCell[data-grouped-by='rowgroup']:not([theme]) {
|
|
57
|
+
/* The color is hardcoded because need hex(in figma rgba) */
|
|
58
|
+
/* disable-tokens-validator */
|
|
59
|
+
background-color: var(--intergalactic-table-td-cell-hover, #f0f0f4);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* INFO THEME */
|
|
63
|
+
SRow:hover > SCell[theme='info'],
|
|
64
|
+
SRow[theme='info']:hover > SCell:not([theme]),
|
|
65
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow > SCell[theme='info'],
|
|
66
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow[theme='info'] > SCell:not([theme]),
|
|
67
|
+
SRowGroup:has(SCell:hover) > SRow > SCell[data-grouped-by='rowgroup'][theme='info'],
|
|
68
|
+
SRowGroup:has(SCell:hover) > SRow[theme='info'] > SCell[data-grouped-by='rowgroup']:not([theme]) {
|
|
69
|
+
background-color: var(--intergalactic-table-td-cell-selected-hover, #c4e5fe);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* SUCCESS THEME */
|
|
73
|
+
SRow:hover > SCell[theme='success'],
|
|
74
|
+
SRow[theme='success']:hover > SCell:not([theme]),
|
|
75
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow > SCell[theme='success'],
|
|
76
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow[theme='success'] > SCell:not([theme]),
|
|
77
|
+
SRowGroup:has(SCell:hover) > SRow > SCell[data-grouped-by='rowgroup'][theme='success'],
|
|
78
|
+
SRowGroup:has(SCell:hover) > SRow[theme='success'] > SCell[data-grouped-by='rowgroup']:not([theme]) {
|
|
79
|
+
background-color: var(--intergalactic-table-td-cell-new-hover, #9ef2c9);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* WARNING THEME */
|
|
83
|
+
SRow:hover > SCell[theme='warning'],
|
|
84
|
+
SRow[theme='warning']:hover > SCell:not([theme]),
|
|
85
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow > SCell[theme='warning'],
|
|
86
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow[theme='warning'] > SCell:not([theme]),
|
|
87
|
+
SRowGroup:has(SCell:hover) > SRow > SCell[data-grouped-by='rowgroup'][theme='warning'],
|
|
88
|
+
SRowGroup:has(SCell:hover) > SRow[theme='warning'] > SCell[data-grouped-by='rowgroup']:not([theme]) {
|
|
89
|
+
background-color: var(--intergalactic-table-td-cell-warning-hover, #ffdca2);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* DANGER THEME */
|
|
93
|
+
SRow:hover > SCell[theme='danger'],
|
|
94
|
+
SRow[theme='danger']:hover > SCell:not([theme]),
|
|
95
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow > SCell[theme='danger'],
|
|
96
|
+
SRowGroup:has(SCell[data-grouped-by='rowgroup']:hover) > SRow[theme='danger'] > SCell:not([theme]),
|
|
97
|
+
SRowGroup:has(SCell:hover) > SRow > SCell[data-grouped-by='rowgroup'][theme='danger'],
|
|
98
|
+
SRowGroup:has(SCell:hover) > SRow[theme='danger'] > SCell[data-grouped-by='rowgroup']:not([theme]) {
|
|
99
|
+
background-color: var(--intergalactic-table-td-cell-critical-hover, #ffd7df);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* MUTED THEME */
|
|
104
|
+
SRow[theme='muted'] SCell:not([theme]) {
|
|
105
|
+
background-color: var(--intergalactic-table-td-cell-unread, #f4f5f9);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
SRow[theme='muted'][active] > SCell:not([theme]) {
|
|
109
|
+
/* The color is hardcoded because need hex(in figma rgba) */
|
|
110
|
+
/* disable-tokens-validator */
|
|
111
|
+
background-color: var(--intergalactic-table-td-cell-active, #e6e7ed);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* INFO THEME */
|
|
115
|
+
SRow[theme='info'] SCell:not([theme]) {
|
|
116
|
+
background-color: var(--intergalactic-table-td-cell-selected, #e9f7ff);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
SRow[theme='info'][active] > SCell:not([theme]) {
|
|
120
|
+
background-color: var(--intergalactic-table-td-cell-selected-active, #c4e5fe);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* SUCCESS THEME */
|
|
124
|
+
SRow[theme='success'] SCell:not([theme]) {
|
|
125
|
+
background-color: var(--intergalactic-table-td-cell-new, #dbfee8);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
SRow[theme='success'][active] > SCell:not([theme]) {
|
|
129
|
+
background-color: var(--intergalactic-table-td-cell-new-active, #9ef2c9);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* WARNING THEME */
|
|
133
|
+
SRow[theme='warning'] SCell:not([theme]) {
|
|
134
|
+
background-color: var(--intergalactic-table-td-cell-warning, #fff3d9);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
SRow[theme='warning'][active] > SCell:not([theme]) {
|
|
138
|
+
background-color: var(--intergalactic-table-td-cell-warning-active, #ffdca2);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* DANGER THEME */
|
|
142
|
+
SRow[theme='danger'] SCell:not([theme]) {
|
|
143
|
+
background-color: var(--intergalactic-table-td-cell-critical, #fff0f7);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
SRow[theme='danger'][active] > SCell:not([theme]) {
|
|
147
|
+
background-color: var(--intergalactic-table-td-cell-critical-active, #ffd7df);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
SCell {
|
|
151
|
+
display: flex;
|
|
152
|
+
height: 100%;
|
|
153
|
+
font-size: var(--intergalactic-fs-200, 14px);
|
|
154
|
+
line-height: var(--intergalactic-lh-200, 142%);
|
|
155
|
+
color: var(--intergalactic-text-primary, #191b23);
|
|
156
|
+
box-sizing: border-box;
|
|
157
|
+
border-bottom: 1px solid var(--intergalactic-border-secondary, #e0e1e9);
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
white-space: pre-wrap;
|
|
160
|
+
word-break: break-word;
|
|
161
|
+
font-variant-numeric: tabular-nums;
|
|
162
|
+
transition: width calc(var(--intergalactic-duration-extra-fast, 100) * 1ms) ease-in-out;
|
|
163
|
+
outline: none;
|
|
164
|
+
|
|
165
|
+
SAccordionToggle {
|
|
166
|
+
margin-right: var(--intergalactic-spacing-3x, 12px);
|
|
167
|
+
margin-top: var(--intergalactic-spacing-05x, 2px);
|
|
168
|
+
height: fit-content;
|
|
169
|
+
|
|
170
|
+
svg {
|
|
171
|
+
transition: transform calc(var(--intergalactic-duration-accordion, 200) * 1ms) ease-out;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
&[expanded] svg {
|
|
175
|
+
transform: rotate(90deg);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
SRow[accordionType='row'] > SCell, SRow[accordionType='cell'] > SCell[withAccordion], SCheckboxCell {
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
SCell[use='primary'] {
|
|
185
|
+
padding: var(--intergalactic-spacing-3x, 12px);
|
|
186
|
+
min-height: 45px;
|
|
187
|
+
background-color: var(--intergalactic-bg-primary-neutral, #ffffff);
|
|
188
|
+
|
|
189
|
+
&[data-aria-level] {
|
|
190
|
+
padding-left: calc(var(--intergalactic-spacing-3x, 12px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px)) * (var(--data-aria-level) - 1)));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
SCell[use='secondary'] {
|
|
195
|
+
padding: var(--intergalactic-spacing-2x, 8px);
|
|
196
|
+
min-height: 37px;
|
|
197
|
+
background-color: var(--intergalactic-bg-primary-neutral, #ffffff);
|
|
198
|
+
|
|
199
|
+
&[data-aria-level] {
|
|
200
|
+
padding-left: calc(var(--intergalactic-spacing-2x, 8px) + ((var(--intergalactic-spacing-5x, 20px) + var(--intergalactic-spacing-2x, 8px)) * (var(--data-aria-level) - 1)));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
SCell[borders='both'], SCell[borders='left'] {
|
|
205
|
+
border-left: 1px solid var(--intergalactic-border-secondary, #e0e1e9);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
SCell[borders='both'], SCell[borders='right'] {
|
|
209
|
+
border-right: 1px solid var(--intergalactic-border-secondary, #e0e1e9);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
SCell[fixed] {
|
|
213
|
+
position: sticky;
|
|
214
|
+
z-index: 2;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
SCell[theme='muted'] {
|
|
218
|
+
background-color: var(--intergalactic-table-td-cell-unread, #f4f5f9);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
SCell[theme='info'] {
|
|
222
|
+
background-color: var(--intergalactic-table-td-cell-selected, #e9f7ff);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
SCell[theme='success'] {
|
|
226
|
+
background-color: var(--intergalactic-table-td-cell-new, #dbfee8);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
SCell[theme='warning'] {
|
|
230
|
+
background-color: var(--intergalactic-table-td-cell-warning, #fff3d9);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
SCell[theme='danger'] {
|
|
234
|
+
background-color: var(--intergalactic-table-td-cell-critical, #fff0f7);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
SSpinContainer {
|
|
238
|
+
position: absolute;
|
|
239
|
+
left: 0;
|
|
240
|
+
right: 0;
|
|
241
|
+
bottom: 0;
|
|
242
|
+
top: 0;
|
|
243
|
+
display: flex;
|
|
244
|
+
align-items: center;
|
|
245
|
+
justify-content: center;
|
|
246
|
+
background-color: var(--intergalactic-overlay-limitation-secondary, rgba(255, 255, 255, 0.85));
|
|
247
|
+
}
|
|
248
|
+
SSpinContainer[headerHeight] {
|
|
249
|
+
top: var(--headerHeight);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
SEmptyData {
|
|
253
|
+
grid-column: 1 / -1;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
SRow[sideIndents='wide'] {
|
|
257
|
+
SCell:first-child {
|
|
258
|
+
padding-left: var(--intergalactic-spacing-5x, 20px);
|
|
259
|
+
}
|
|
260
|
+
SCell:last-child {
|
|
261
|
+
padding-right: var(--intergalactic-spacing-5x, 20px);
|
|
262
|
+
}
|
|
263
|
+
}
|