@midas-ds/components 17.38.2 → 17.38.3
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 +6 -0
- package/assets/table.css +1 -1
- package/chunks/table-BZsinvvB.js +95 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/table/index.js +1 -1
- package/chunks/table-B4-N2P6X.js +0 -84
package/CHANGELOG.md
CHANGED
package/assets/table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._table_eie5w_1{border-spacing:0;font-family:var(--midas-typography-font-family);font-size:var(--midas-typography-font-size-20);line-height:var(--midas-typography-line-height-20)}._table_eie5w_1>div{pointer-events:auto!important}._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12{background-color:var(--midas-layer-accent-01-base);color:var(--midas-text-primary);padding:var(--midas-space-75) var(--midas-space-medium);text-align:left;font-weight:500}._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12[data-focus-visible]{outline:var(--midas-space-10) solid var(--midas-border-color-primary);outline-offset:-4px}._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12[data-allows-sorting]{cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:manipulation}._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12[data-allows-sorting] ._columnContent_eie5w_29{align-items:center;gap:var(--midas-space-xsmall);display:flex}._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12[data-allows-sorting] ._columnLabel_eie5w_35{min-width:0}._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12[data-allows-sorting] ._sortIndicator_eie5w_39{flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12[data-allows-sorting] ._sortIconNeutral_eie5w_46{opacity:0;transition:opacity var(--midas-transition-duration-quick) var(--midas-transition-timing-ease-in-out)}@media (prefers-reduced-motion){._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12[data-allows-sorting] ._sortIconNeutral_eie5w_46{transition:none}}@media (hover:none){._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12[data-allows-sorting] ._sortIconNeutral_eie5w_46{opacity:.5}}._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12[data-allows-sorting]:hover ._sortIconNeutral_eie5w_46{opacity:.5}._table_eie5w_1 ._tableHeader_eie5w_11 ._column_eie5w_12 ._selection_eie5w_65{height:18px}._table_eie5w_1 ._row_eie5w_71{background-color:var(--midas-layer-01-base)}._table_eie5w_1 ._row_eie5w_71[data-focused]{outline:var(--midas-space-10) solid var(--midas-border-color-primary);outline-offset:-4px}._table_eie5w_1 ._row_eie5w_71{height:100%}._table_eie5w_1 ._row_eie5w_71[data-href],._table_eie5w_1 ._row_eie5w_71[data-react-aria-pressable]{cursor:pointer}._table_eie5w_1 ._row_eie5w_71[data-hovered]{background-color:var(--midas-layer-01-hover)}._table_eie5w_1 ._row_eie5w_71 ._cell_eie5w_90{border-bottom:1px var(--midas-border-color-subtle) solid;color:var(--midas-text-primary);padding:calc(var(--midas-space-75) - 1px) var(--midas-space-medium) var(--midas-space-75)}._table_eie5w_1 ._row_eie5w_71 ._cell_eie5w_90[data-focus-visible]{outline-offset:-4px;outline:var(--midas-space-10) solid var(--midas-border-color-primary)}._table_eie5w_1 ._row_eie5w_71 ._cell_eie5w_90 ._selection_eie5w_65{height:18px}._table_eie5w_1._narrow_eie5w_107{font-size:var(--midas-typography-font-size-10);line-height:var(--midas-typography-line-height-10)}._table_eie5w_1._narrow_eie5w_107 ._column_eie5w_12{padding:var(--midas-space-xsmall) var(--midas-space-medium);height:14px}._table_eie5w_1._narrow_eie5w_107 ._column_eie5w_12 ._selection_eie5w_65{height:14px}._table_eie5w_1._narrow_eie5w_107 ._cell_eie5w_90{padding:calc(var(--midas-space-xsmall) - 1px) var(--midas-space-medium) var(--midas-space-xsmall)}._table_eie5w_1._narrow_eie5w_107 ._cell_eie5w_90 ._selection_eie5w_65{height:16px}._table_eie5w_1._medium_eie5w_130:not(._narrow_eie5w_107) ._column_eie5w_12{padding:calc(var(--midas-space-60) - 1px) var(--midas-space-medium)}._table_eie5w_1._medium_eie5w_130:not(._narrow_eie5w_107) ._cell_eie5w_90{padding:calc(var(--midas-space-60) - 2px) var(--midas-space-medium) calc(var(--midas-space-60) - 1px)}._table_eie5w_1._striped_eie5w_141 ._row_eie5w_71:nth-child(odd):not([data-even=false]),._table_eie5w_1._striped_eie5w_141 ._row_eie5w_71[data-even=true]{background-color:#0000}:is(._table_eie5w_1._striped_eie5w_141 ._row_eie5w_71:nth-child(odd):not([data-even=false]),._table_eie5w_1._striped_eie5w_141 ._row_eie5w_71[data-even=true])[data-hovered]{background-color:var(--midas-layer-accent-01-hover)}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Collection as e } from "../aria/index.js";
|
|
3
|
+
import { n as t } from "./checkbox-MN5mhbFU.js";
|
|
4
|
+
import { t as n } from "./clsx-BtGY0yFD.js";
|
|
5
|
+
import { Button as r, Cell as i, Column as a, Row as o, Table as s, TableBody as c, TableHeader as l, useTableOptions as u } from "react-aria-components";
|
|
6
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
+
import { ArrowDown as p, ArrowUp as m, ArrowUpDown as h, GripVertical as g } from "lucide-react";
|
|
8
|
+
import '../assets/table.css';var _ = {
|
|
9
|
+
table: "_table_eie5w_1",
|
|
10
|
+
tableHeader: "_tableHeader_eie5w_11",
|
|
11
|
+
column: "_column_eie5w_12",
|
|
12
|
+
columnContent: "_columnContent_eie5w_29",
|
|
13
|
+
columnLabel: "_columnLabel_eie5w_35",
|
|
14
|
+
sortIndicator: "_sortIndicator_eie5w_39",
|
|
15
|
+
sortIconNeutral: "_sortIconNeutral_eie5w_46",
|
|
16
|
+
selection: "_selection_eie5w_65",
|
|
17
|
+
row: "_row_eie5w_71",
|
|
18
|
+
cell: "_cell_eie5w_90",
|
|
19
|
+
narrow: "_narrow_eie5w_107",
|
|
20
|
+
medium: "_medium_eie5w_130",
|
|
21
|
+
striped: "_striped_eie5w_141"
|
|
22
|
+
}, v = ({ size: e = "large", striped: t = !1, className: r, ...i }) => /* @__PURE__ */ d(s, {
|
|
23
|
+
className: n(_.table, r, {
|
|
24
|
+
[_.medium]: e === "medium",
|
|
25
|
+
[_.striped]: t
|
|
26
|
+
}),
|
|
27
|
+
...i
|
|
28
|
+
}), y = ({ columns: r, children: i, className: a }) => {
|
|
29
|
+
let { selectionBehavior: o, selectionMode: s, allowsDragging: c } = u();
|
|
30
|
+
return /* @__PURE__ */ f(l, {
|
|
31
|
+
className: n(a, _.tableHeader),
|
|
32
|
+
children: [
|
|
33
|
+
c && /* @__PURE__ */ d(x, {}),
|
|
34
|
+
o === "toggle" && /* @__PURE__ */ d(x, {
|
|
35
|
+
width: 50,
|
|
36
|
+
children: s === "multiple" && /* @__PURE__ */ d(t, {
|
|
37
|
+
className: _.selection,
|
|
38
|
+
slot: "selection"
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ d(e, {
|
|
42
|
+
items: r,
|
|
43
|
+
children: i
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
}, b = ({ id: i, columns: a, children: s, className: c, ...l }) => {
|
|
48
|
+
let { selectionBehavior: p, allowsDragging: m } = u();
|
|
49
|
+
return /* @__PURE__ */ f(o, {
|
|
50
|
+
id: i,
|
|
51
|
+
className: n(c, _.row),
|
|
52
|
+
...l,
|
|
53
|
+
children: [
|
|
54
|
+
m && /* @__PURE__ */ d(S, { children: /* @__PURE__ */ d(r, {
|
|
55
|
+
slot: "drag",
|
|
56
|
+
children: /* @__PURE__ */ d(g, { size: 20 })
|
|
57
|
+
}) }),
|
|
58
|
+
p === "toggle" && /* @__PURE__ */ d(S, { children: /* @__PURE__ */ d(t, {
|
|
59
|
+
className: _.selection,
|
|
60
|
+
slot: "selection"
|
|
61
|
+
}) }),
|
|
62
|
+
/* @__PURE__ */ d(e, {
|
|
63
|
+
items: a,
|
|
64
|
+
children: s
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
}, x = ({ children: e, className: t, ...r }) => /* @__PURE__ */ d(a, {
|
|
69
|
+
className: n(t, _.column),
|
|
70
|
+
...r,
|
|
71
|
+
children: (t) => {
|
|
72
|
+
let { allowsSorting: n, sortDirection: r } = t, i = typeof e == "function" ? e(t) : e;
|
|
73
|
+
return n ? /* @__PURE__ */ f("div", {
|
|
74
|
+
className: _.columnContent,
|
|
75
|
+
children: [/* @__PURE__ */ d("span", {
|
|
76
|
+
className: _.columnLabel,
|
|
77
|
+
children: i
|
|
78
|
+
}), /* @__PURE__ */ d("span", {
|
|
79
|
+
"aria-hidden": "true",
|
|
80
|
+
className: _.sortIndicator,
|
|
81
|
+
children: r === "ascending" ? /* @__PURE__ */ d(m, { size: 16 }) : r === "descending" ? /* @__PURE__ */ d(p, { size: 16 }) : /* @__PURE__ */ d(h, {
|
|
82
|
+
size: 16,
|
|
83
|
+
className: _.sortIconNeutral
|
|
84
|
+
})
|
|
85
|
+
})]
|
|
86
|
+
}) : i;
|
|
87
|
+
}
|
|
88
|
+
}), S = ({ className: e, ...t }) => /* @__PURE__ */ d(i, {
|
|
89
|
+
className: n(e, _.cell),
|
|
90
|
+
...t
|
|
91
|
+
}), C = ({ className: e, ...t }) => /* @__PURE__ */ d(c, {
|
|
92
|
+
className: n(e, _.tableBody),
|
|
93
|
+
...t
|
|
94
|
+
});
|
|
95
|
+
export { C as a, v as i, x as n, y as o, b as r, S as t };
|
package/index.js
CHANGED
|
@@ -45,7 +45,7 @@ import { i as Je, n as Ye, r as Xe, t as Ze } from "./chunks/radio-BXjMFwia.js";
|
|
|
45
45
|
import { t as Qe } from "./chunks/search-field-mQvQC_fC.js";
|
|
46
46
|
import { t as $e } from "./chunks/skeleton-6y5HNJZp.js";
|
|
47
47
|
import { t as et } from "./chunks/stack-DKjRicm1.js";
|
|
48
|
-
import { a as tt, i as nt, n as rt, o as it, r as at, t as ot } from "./chunks/table-
|
|
48
|
+
import { a as tt, i as nt, n as rt, o as it, r as at, t as ot } from "./chunks/table-BZsinvvB.js";
|
|
49
49
|
import { i as st, n as ct, r as lt, t as ut } from "./chunks/tabs-ZCpVhr_r.js";
|
|
50
50
|
import { i as dt, n as ft, r as pt, t as mt } from "./chunks/textfield-O1kNTcwC.js";
|
|
51
51
|
import { t as ht } from "./chunks/time-field-Dte4G0is.js";
|
|
@@ -63,7 +63,7 @@ var St = {
|
|
|
63
63
|
description: "Midas Components",
|
|
64
64
|
homepage: "https://designsystem.migrationsverket.se/",
|
|
65
65
|
license: "CC0-1.0",
|
|
66
|
-
version: "17.38.
|
|
66
|
+
version: "17.38.3",
|
|
67
67
|
module: "./index.js",
|
|
68
68
|
type: "module",
|
|
69
69
|
main: "./index.js",
|
package/package.json
CHANGED
package/table/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Cell, n as Column, r as Row, i as Table, a as TableBody, o as TableHeader } from "../chunks/table-
|
|
1
|
+
export { t as Cell, n as Column, r as Row, i as Table, a as TableBody, o as TableHeader } from "../chunks/table-BZsinvvB.js";
|
package/chunks/table-B4-N2P6X.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { Collection as e } from "../aria/index.js";
|
|
3
|
-
import { n as t } from "./checkbox-MN5mhbFU.js";
|
|
4
|
-
import { t as n } from "./clsx-BtGY0yFD.js";
|
|
5
|
-
import { Button as r, Cell as i, Column as a, Row as o, Table as s, TableBody as c, TableHeader as l, useTableOptions as u } from "react-aria-components";
|
|
6
|
-
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
-
import { ArrowDown as m, ArrowUp as h, ArrowUpDown as g, GripVertical as _ } from "lucide-react";
|
|
8
|
-
import '../assets/table.css';var v = {
|
|
9
|
-
table: "_table_1lyes_1",
|
|
10
|
-
tableHeader: "_tableHeader_1lyes_11",
|
|
11
|
-
column: "_column_1lyes_12",
|
|
12
|
-
sortIndicator: "_sortIndicator_1lyes_29",
|
|
13
|
-
sortIconNeutral: "_sortIconNeutral_1lyes_37",
|
|
14
|
-
selection: "_selection_1lyes_56",
|
|
15
|
-
row: "_row_1lyes_62",
|
|
16
|
-
cell: "_cell_1lyes_81",
|
|
17
|
-
narrow: "_narrow_1lyes_98",
|
|
18
|
-
medium: "_medium_1lyes_121",
|
|
19
|
-
striped: "_striped_1lyes_132"
|
|
20
|
-
}, y = ({ size: e = "large", striped: t = !1, className: r, ...i }) => /* @__PURE__ */ f(s, {
|
|
21
|
-
className: n(v.table, r, {
|
|
22
|
-
[v.medium]: e === "medium",
|
|
23
|
-
[v.striped]: t
|
|
24
|
-
}),
|
|
25
|
-
...i
|
|
26
|
-
}), b = ({ columns: r, children: i, className: a }) => {
|
|
27
|
-
let { selectionBehavior: o, selectionMode: s, allowsDragging: c } = u();
|
|
28
|
-
return /* @__PURE__ */ p(l, {
|
|
29
|
-
className: n(a, v.tableHeader),
|
|
30
|
-
children: [
|
|
31
|
-
c && /* @__PURE__ */ f(S, {}),
|
|
32
|
-
o === "toggle" && /* @__PURE__ */ f(S, {
|
|
33
|
-
width: 50,
|
|
34
|
-
children: s === "multiple" && /* @__PURE__ */ f(t, {
|
|
35
|
-
className: v.selection,
|
|
36
|
-
slot: "selection"
|
|
37
|
-
})
|
|
38
|
-
}),
|
|
39
|
-
/* @__PURE__ */ f(e, {
|
|
40
|
-
items: r,
|
|
41
|
-
children: i
|
|
42
|
-
})
|
|
43
|
-
]
|
|
44
|
-
});
|
|
45
|
-
}, x = ({ id: i, columns: a, children: s, className: c, ...l }) => {
|
|
46
|
-
let { selectionBehavior: d, allowsDragging: m } = u();
|
|
47
|
-
return /* @__PURE__ */ p(o, {
|
|
48
|
-
id: i,
|
|
49
|
-
className: n(c, v.row),
|
|
50
|
-
...l,
|
|
51
|
-
children: [
|
|
52
|
-
m && /* @__PURE__ */ f(C, { children: /* @__PURE__ */ f(r, {
|
|
53
|
-
slot: "drag",
|
|
54
|
-
children: /* @__PURE__ */ f(_, { size: 20 })
|
|
55
|
-
}) }),
|
|
56
|
-
d === "toggle" && /* @__PURE__ */ f(C, { children: /* @__PURE__ */ f(t, {
|
|
57
|
-
className: v.selection,
|
|
58
|
-
slot: "selection"
|
|
59
|
-
}) }),
|
|
60
|
-
/* @__PURE__ */ f(e, {
|
|
61
|
-
items: a,
|
|
62
|
-
children: s
|
|
63
|
-
})
|
|
64
|
-
]
|
|
65
|
-
});
|
|
66
|
-
}, S = ({ children: e, className: t, ...r }) => /* @__PURE__ */ f(a, {
|
|
67
|
-
className: n(t, v.column),
|
|
68
|
-
...r,
|
|
69
|
-
children: ({ allowsSorting: t, sortDirection: n }) => /* @__PURE__ */ p(d, { children: [e, t && /* @__PURE__ */ f("span", {
|
|
70
|
-
"aria-hidden": "true",
|
|
71
|
-
className: v.sortIndicator,
|
|
72
|
-
children: n === "ascending" ? /* @__PURE__ */ f(h, { size: 16 }) : n === "descending" ? /* @__PURE__ */ f(m, { size: 16 }) : /* @__PURE__ */ f(g, {
|
|
73
|
-
size: 16,
|
|
74
|
-
className: v.sortIconNeutral
|
|
75
|
-
})
|
|
76
|
-
})] })
|
|
77
|
-
}), C = ({ className: e, ...t }) => /* @__PURE__ */ f(i, {
|
|
78
|
-
className: n(e, v.cell),
|
|
79
|
-
...t
|
|
80
|
-
}), w = ({ className: e, ...t }) => /* @__PURE__ */ f(c, {
|
|
81
|
-
className: n(e, v.tableBody),
|
|
82
|
-
...t
|
|
83
|
-
});
|
|
84
|
-
export { w as a, y as i, S as n, b as o, x as r, C as t };
|