@vygruppen/spor-react 12.23.0 → 12.24.0
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/.turbo/turbo-build.log +8 -8
- package/.turbo/turbo-postinstall.log +2 -2
- package/CHANGELOG.md +10 -0
- package/dist/index.cjs +34 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +35 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/table/Table.tsx +33 -21
- package/src/table/sort-utils.ts +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@12.
|
|
2
|
+
> @vygruppen/spor-react@12.24.0 build /home/runner/work/spor/spor/packages/spor-react
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
CLI Building entry: src/index.tsx, src/icons/index.tsx
|
|
@@ -11,17 +11,17 @@ CLI Cleaning output folder
|
|
|
11
11
|
ESM Build start
|
|
12
12
|
CJS Build start
|
|
13
13
|
DTS Build start
|
|
14
|
+
ESM dist/index.mjs 330.53 KB
|
|
14
15
|
ESM dist/icons/index.mjs 110.00 B
|
|
15
|
-
ESM dist/index.mjs
|
|
16
|
+
ESM dist/index.mjs.map 700.07 KB
|
|
16
17
|
ESM dist/icons/index.mjs.map 157.00 B
|
|
17
|
-
ESM
|
|
18
|
-
|
|
19
|
-
CJS dist/index.cjs 353.93 KB
|
|
18
|
+
ESM ⚡️ Build success in 2926ms
|
|
19
|
+
CJS dist/index.cjs 354.42 KB
|
|
20
20
|
CJS dist/icons/index.cjs 381.00 B
|
|
21
|
-
CJS dist/index.cjs.map
|
|
21
|
+
CJS dist/index.cjs.map 700.07 KB
|
|
22
22
|
CJS dist/icons/index.cjs.map 157.00 B
|
|
23
|
-
CJS ⚡️ Build success in
|
|
24
|
-
DTS ⚡️ Build success in
|
|
23
|
+
CJS ⚡️ Build success in 2927ms
|
|
24
|
+
DTS ⚡️ Build success in 22676ms
|
|
25
25
|
DTS dist/icons/index.d.ts 44.00 B
|
|
26
26
|
DTS dist/index.d.ts 147.69 KB
|
|
27
27
|
DTS dist/icons/index.d.cts 44.00 B
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @vygruppen/spor-react@12.
|
|
2
|
+
> @vygruppen/spor-react@12.24.0 postinstall /home/runner/work/spor/spor/packages/spor-react
|
|
3
3
|
> chakra typegen src/theme/index.ts
|
|
4
4
|
|
|
5
|
-
[dotenv@17.2.3] injecting env (0) from .env -- tip:
|
|
5
|
+
[dotenv@17.2.3] injecting env (0) from .env -- tip: ⚙️ override existing env vars with { override: true }
|
|
6
6
|
[90m┌[39m Chakra CLI ⚡️
|
|
7
7
|
[?25l[90m│[39m
|
|
8
8
|
[35m◒[39m Generating conditions types...
|
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -6281,11 +6281,13 @@ var TabsList = react.Tabs.List;
|
|
|
6281
6281
|
var TabsTrigger = react.Tabs.Trigger;
|
|
6282
6282
|
var TabsIndicator = react.Tabs.Indicator;
|
|
6283
6283
|
var TabsContent = react.Tabs.Content;
|
|
6284
|
-
var getNextSortState = (current, key, columnIndex) =>
|
|
6285
|
-
key
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
}
|
|
6284
|
+
var getNextSortState = (current, key, columnIndex) => {
|
|
6285
|
+
if (current.key !== key)
|
|
6286
|
+
return { key, columnIndex, direction: "asc" };
|
|
6287
|
+
if (current.direction === "asc")
|
|
6288
|
+
return { key, columnIndex, direction: "desc" };
|
|
6289
|
+
return { key: null, direction: "asc", columnIndex: null };
|
|
6290
|
+
};
|
|
6289
6291
|
var getSortKey = (children) => typeof children === "string" ? children.trim() : null;
|
|
6290
6292
|
var getColumnIndex = (element) => {
|
|
6291
6293
|
var _a5;
|
|
@@ -6357,28 +6359,35 @@ var Table = React20.forwardRef(
|
|
|
6357
6359
|
}
|
|
6358
6360
|
);
|
|
6359
6361
|
Table.displayName = "Table";
|
|
6360
|
-
var TableColumnHeader = React20.forwardRef(({ children,
|
|
6362
|
+
var TableColumnHeader = React20.forwardRef(({ children, ...rest }, ref) => {
|
|
6361
6363
|
const { enabled, sortState, onSort } = useTableSort();
|
|
6362
6364
|
const key = getSortKey(children);
|
|
6363
|
-
const
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
onClick
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6365
|
+
const props = rest;
|
|
6366
|
+
const columnSortable = enabled && key != null && !("data-nosort" in props);
|
|
6367
|
+
const isActive = columnSortable && key === sortState.key;
|
|
6368
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Table.ColumnHeader, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { children: [
|
|
6369
|
+
children,
|
|
6370
|
+
columnSortable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6371
|
+
react.Button,
|
|
6372
|
+
{
|
|
6373
|
+
variant: "ghost",
|
|
6374
|
+
onClick: (event) => {
|
|
6375
|
+
const th = event.currentTarget.closest("th");
|
|
6376
|
+
if (th)
|
|
6377
|
+
onSort(key, getColumnIndex(th));
|
|
6378
|
+
},
|
|
6379
|
+
p: "0px !important",
|
|
6380
|
+
size: "xs",
|
|
6381
|
+
children: isActive ? sortState.direction === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowUpFill18Icon, { color: "outline.focus" }) : /* @__PURE__ */ jsxRuntime.jsx(spor_icon_react_star.ArrowDownFill18Icon, { color: "outline.focus" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6382
|
+
spor_icon_react_star.ChangeDirectionFill18Icon,
|
|
6383
|
+
{
|
|
6384
|
+
transform: "rotate(90deg)",
|
|
6385
|
+
color: "icon.disabled"
|
|
6386
|
+
}
|
|
6387
|
+
)
|
|
6388
|
+
}
|
|
6389
|
+
)
|
|
6390
|
+
] }) });
|
|
6382
6391
|
});
|
|
6383
6392
|
TableColumnHeader.displayName = "ColumnHeader";
|
|
6384
6393
|
var TableRow = React20.forwardRef(
|