nillud-data-table 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -12
- package/dist/styles.css +8 -5
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -125,7 +125,7 @@ var Cell = ({
|
|
125
125
|
children: content
|
126
126
|
}
|
127
127
|
);
|
128
|
-
const renderSelectableCell = () => /* @__PURE__ */ jsx5("
|
128
|
+
const renderSelectableCell = () => /* @__PURE__ */ jsx5("div", { className: "ndt-cell ndt-checkbox-cell", children: /* @__PURE__ */ jsx5("input", { type: "checkbox", checked: !!isRowSelected }) });
|
129
129
|
return /* @__PURE__ */ jsx5(Fragment3, { children: column.selectable ? renderSelectableCell() : renderCell() });
|
130
130
|
};
|
131
131
|
var Cell_default = Cell;
|
@@ -143,18 +143,26 @@ var Row = ({
|
|
143
143
|
onRowSelect
|
144
144
|
}) => {
|
145
145
|
const isSelectable = columns.find((element) => element.selectable);
|
146
|
-
return /* @__PURE__ */ jsx6(
|
147
|
-
|
146
|
+
return /* @__PURE__ */ jsx6(
|
147
|
+
"div",
|
148
148
|
{
|
149
|
-
row
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
149
|
+
className: `ndt-table-row ${isSelectable && "ndt-table-row-selectable"} ${isRowSelected && "ndt-table-row-selected"}`,
|
150
|
+
style: { gridTemplateColumns: widths },
|
151
|
+
onClick: onRowSelect,
|
152
|
+
children: columns.map((column, id) => /* @__PURE__ */ jsx6(
|
153
|
+
Cell_default,
|
154
|
+
{
|
155
|
+
row,
|
156
|
+
column,
|
157
|
+
displayId,
|
158
|
+
isTitles,
|
159
|
+
isRowSelected,
|
160
|
+
onRowSelect
|
161
|
+
},
|
162
|
+
`cell-${rowId}-${id}`
|
163
|
+
))
|
164
|
+
}
|
165
|
+
);
|
158
166
|
};
|
159
167
|
var Row_default = Row;
|
160
168
|
|
package/dist/styles.css
CHANGED
@@ -91,14 +91,17 @@
|
|
91
91
|
.ndt-table-container .ndt-table .ndt-table-body .ndt-table-row:nth-child(2n) {
|
92
92
|
background-color: rgba(0, 0, 0, 0.04);
|
93
93
|
}
|
94
|
-
.ndt-table-container .ndt-table .ndt-table-body .ndt-table-row:hover {
|
95
|
-
background-color: rgba(
|
94
|
+
.ndt-table-container .ndt-table .ndt-table-body .ndt-table-row:hover, .ndt-table-container .ndt-table .ndt-table-body .ndt-table-row:nth-child(2n):hover {
|
95
|
+
background-color: rgba(0, 0, 0, 0.08);
|
96
96
|
}
|
97
|
-
.ndt-table-container .ndt-table .ndt-table-body .ndt-table-row
|
97
|
+
.ndt-table-container .ndt-table .ndt-table-body .ndt-table-row.ndt-table-row-selectable {
|
98
98
|
cursor: pointer;
|
99
99
|
}
|
100
|
-
.ndt-table-container .ndt-table .ndt-table-body .ndt-table-row .ndt-table-row-
|
101
|
-
background-color:
|
100
|
+
.ndt-table-container .ndt-table .ndt-table-body .ndt-table-row.ndt-table-row-selectable:hover, .ndt-table-container .ndt-table .ndt-table-body .ndt-table-row.ndt-table-row-selectable:nth-child(2n):hover {
|
101
|
+
background-color: rgba(144, 202, 249, 0.1);
|
102
|
+
}
|
103
|
+
.ndt-table-container .ndt-table .ndt-table-body .ndt-table-row.ndt-table-row-selected, .ndt-table-container .ndt-table .ndt-table-body .ndt-table-row:nth-child(2n).ndt-table-row-selected {
|
104
|
+
background-color: rgba(144, 202, 249, 0.25);
|
102
105
|
}
|
103
106
|
.ndt-table-container .ndt-table .ndt-table-body .ndt-table-row .ndt-cell {
|
104
107
|
display: flex;
|
package/dist/styles.css.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../components/data-table/styles/data-table.scss"],"names":[],"mappings":";AACI;EACI;EACA;;AAEA;AAAA;EAEI;;AAGJ;AAAA;EAEI;;AAGJ;EACI;;AAEA;EACI;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAMR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAMhB;EACI;;AAEA;EACI;EACA;EACA;;AAGA;EACI;AACA;;AAGJ;EACI;AACA;EACA;AACA;;AAGJ;EACI;AACA;EACA;AACA;;AAGJ;EACI;AACA;;AAKJ;EACI;;AAGJ;EACI;;AAGJ;
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../components/data-table/styles/data-table.scss"],"names":[],"mappings":";AACI;EACI;EACA;;AAEA;AAAA;EAEI;;AAGJ;AAAA;EAEI;;AAGJ;EACI;;AAEA;EACI;;AAEA;EACI;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAMR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAMhB;EACI;;AAEA;EACI;EACA;EACA;;AAGA;EACI;AACA;;AAGJ;EACI;AACA;EACA;AACA;;AAGJ;EACI;AACA;EACA;AACA;;AAGJ;EACI;AACA;;AAKJ;EACI;;AAGJ;EACI;;AAGJ;EAEI;;AAGJ;EACI;;AAEA;EAEI;;AAIR;EAEI;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAMhB;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EACI;;AAGI;EACI;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAIR;EACI;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAGJ;EAGI;;AAGJ;EACI;EACA;;AAIR;EACI;EACA;;AAEA;EACI;;AAEA;EACI;EACA;EACA;;;AAUhC;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAEA;EAGI;EACA;EACA;;AAIR;EACI;;AAEA;EAGI;EACA;EACA;;;AAKZ;EACI;EACA;EACA;EACA;EACA;;AAIA;EACI","file":"styles.css"}
|