@mattilsynet/design 0.2.0 → 0.2.2
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/mtds/field/field.js +6 -7
- package/mtds/field/field.js.map +1 -1
- package/mtds/fieldset/fieldset.js +11 -12
- package/mtds/fieldset/fieldset.js.map +1 -1
- package/mtds/index.d.ts +2 -2
- package/mtds/index.iife.js +2 -2
- package/mtds/index.iife.js.map +1 -1
- package/mtds/index.js +14 -12
- package/mtds/index.js.map +1 -1
- package/mtds/logo/logo.stories.d.ts +1 -0
- package/mtds/popover/popover.js +12 -13
- package/mtds/popover/popover.js.map +1 -1
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +30 -30
- package/mtds/styles.module.css.js +44 -44
- package/mtds/table/table.js +8 -9
- package/mtds/table/table.js.map +1 -1
- package/package.json +2 -2
package/mtds/styles.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
"alert": "
|
|
3
|
-
"avatar": "
|
|
4
|
-
"breadcrumbs": "
|
|
5
|
-
"button": "
|
|
6
|
-
"card": "
|
|
7
|
-
"chip": "
|
|
8
|
-
"details": "
|
|
9
|
-
"errorsummary": "
|
|
10
|
-
"field": "
|
|
11
|
-
"fieldChildAdded": "
|
|
12
|
-
"affixes": "
|
|
13
|
-
"count": "
|
|
14
|
-
"fieldset": "
|
|
15
|
-
"fieldsetValidationAdded": "
|
|
16
|
-
"input": "
|
|
17
|
-
"grid": "
|
|
18
|
-
"flex": "
|
|
19
|
-
"box": "
|
|
20
|
-
"link": "
|
|
21
|
-
"logo": "
|
|
22
|
-
"modal": "
|
|
23
|
-
"pagination": "
|
|
24
|
-
"popover": "
|
|
25
|
-
"table": "
|
|
26
|
-
"scrollShadow": "
|
|
27
|
-
"tableChildAdded": "
|
|
28
|
-
"tabs": "
|
|
29
|
-
"tag": "
|
|
30
|
-
"validation": "
|
|
31
|
-
"body": "
|
|
2
|
+
"alert": "_alert_1xgwh_1 _ds-alert_14y6r_1",
|
|
3
|
+
"avatar": "_avatar_1xgwh_1 _ds-avatar_14y6r_1",
|
|
4
|
+
"breadcrumbs": "_breadcrumbs_1xgwh_1 _ds-breadcrumbs_14y6r_1",
|
|
5
|
+
"button": "_button_1xgwh_1 _ds-button_14y6r_1",
|
|
6
|
+
"card": "_card_1xgwh_1 _ds-card_14y6r_1",
|
|
7
|
+
"chip": "_chip_1xgwh_1 _ds-chip_14y6r_1",
|
|
8
|
+
"details": "_details_1xgwh_1 _ds-details_14y6r_1",
|
|
9
|
+
"errorsummary": "_errorsummary_1xgwh_1 _ds-error-summary_14y6r_1",
|
|
10
|
+
"field": "_field_1xgwh_1 _ds-field_14y6r_1",
|
|
11
|
+
"fieldChildAdded": "_fieldChildAdded_1xgwh_1",
|
|
12
|
+
"affixes": "_affixes_1xgwh_1 _ds-field-affixes_14y6r_1",
|
|
13
|
+
"count": "_count_1xgwh_1",
|
|
14
|
+
"fieldset": "_fieldset_1xgwh_1 _ds-fieldset_14y6r_1",
|
|
15
|
+
"fieldsetValidationAdded": "_fieldsetValidationAdded_1xgwh_1",
|
|
16
|
+
"input": "_input_1xgwh_1 _ds-input_14y6r_1",
|
|
17
|
+
"grid": "_grid_1xgwh_1",
|
|
18
|
+
"flex": "_flex_1xgwh_1",
|
|
19
|
+
"box": "_box_1xgwh_1",
|
|
20
|
+
"link": "_link_1xgwh_1",
|
|
21
|
+
"logo": "_logo_1xgwh_1 _ds-focus_14y6r_1",
|
|
22
|
+
"modal": "_modal_1xgwh_1 _ds-modal_14y6r_1",
|
|
23
|
+
"pagination": "_pagination_1xgwh_1 _ds-pagination_14y6r_1",
|
|
24
|
+
"popover": "_popover_1xgwh_1",
|
|
25
|
+
"table": "_table_1xgwh_1 _ds-table_14y6r_1",
|
|
26
|
+
"scrollShadow": "_scrollShadow_1xgwh_1",
|
|
27
|
+
"tableChildAdded": "_tableChildAdded_1xgwh_1",
|
|
28
|
+
"tabs": "_tabs_1xgwh_1",
|
|
29
|
+
"tag": "_tag_1xgwh_1 _ds-tag_14y6r_1",
|
|
30
|
+
"validation": "_validation_1xgwh_1 _ds-validation-message_14y6r_1",
|
|
31
|
+
"body": "_body_1xgwh_76"
|
|
32
32
|
}
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
const _ = "
|
|
1
|
+
const _ = "_alert_1xgwh_1 _ds-alert_14y6r_1", d = "_avatar_1xgwh_1 _ds-avatar_14y6r_1", t = "_breadcrumbs_1xgwh_1 _ds-breadcrumbs_14y6r_1", s = "_button_1xgwh_1 _ds-button_14y6r_1", o = "_card_1xgwh_1 _ds-card_14y6r_1", a = "_chip_1xgwh_1 _ds-chip_14y6r_1", e = "_details_1xgwh_1 _ds-details_14y6r_1", i = "_errorsummary_1xgwh_1 _ds-error-summary_14y6r_1", l = "_field_1xgwh_1 _ds-field_14y6r_1", r = "_fieldChildAdded_1xgwh_1", n = "_affixes_1xgwh_1 _ds-field-affixes_14y6r_1", c = "_count_1xgwh_1", g = "_fieldset_1xgwh_1 _ds-fieldset_14y6r_1", h = "_fieldsetValidationAdded_1xgwh_1", x = "_input_1xgwh_1 _ds-input_14y6r_1", w = "_grid_1xgwh_1", b = "_flex_1xgwh_1", f = "_box_1xgwh_1", y = "_link_1xgwh_1", u = "_logo_1xgwh_1 _ds-focus_14y6r_1", p = "_modal_1xgwh_1 _ds-modal_14y6r_1", m = "_pagination_1xgwh_1 _ds-pagination_14y6r_1", v = "_popover_1xgwh_1", A = "_table_1xgwh_1 _ds-table_14y6r_1", C = "_scrollShadow_1xgwh_1", k = "_tableChildAdded_1xgwh_1", S = "_tabs_1xgwh_1", V = "_tag_1xgwh_1 _ds-tag_14y6r_1", j = "_validation_1xgwh_1 _ds-validation-message_14y6r_1", q = "_body_1xgwh_76", z = {
|
|
2
2
|
alert: _,
|
|
3
3
|
avatar: d,
|
|
4
|
-
breadcrumbs:
|
|
5
|
-
button:
|
|
6
|
-
card:
|
|
7
|
-
chip:
|
|
8
|
-
details:
|
|
9
|
-
errorsummary:
|
|
4
|
+
breadcrumbs: t,
|
|
5
|
+
button: s,
|
|
6
|
+
card: o,
|
|
7
|
+
chip: a,
|
|
8
|
+
details: e,
|
|
9
|
+
errorsummary: i,
|
|
10
10
|
field: l,
|
|
11
11
|
fieldChildAdded: r,
|
|
12
12
|
affixes: n,
|
|
13
|
-
count:
|
|
14
|
-
fieldset:
|
|
13
|
+
count: c,
|
|
14
|
+
fieldset: g,
|
|
15
15
|
fieldsetValidationAdded: h,
|
|
16
|
-
input:
|
|
17
|
-
grid:
|
|
16
|
+
input: x,
|
|
17
|
+
grid: w,
|
|
18
18
|
flex: b,
|
|
19
19
|
box: f,
|
|
20
|
-
link:
|
|
21
|
-
logo:
|
|
22
|
-
modal:
|
|
23
|
-
pagination:
|
|
20
|
+
link: y,
|
|
21
|
+
logo: u,
|
|
22
|
+
modal: p,
|
|
23
|
+
pagination: m,
|
|
24
24
|
popover: v,
|
|
25
|
-
table:
|
|
26
|
-
scrollShadow:
|
|
27
|
-
tableChildAdded:
|
|
28
|
-
tabs:
|
|
29
|
-
tag:
|
|
30
|
-
validation:
|
|
31
|
-
body:
|
|
25
|
+
table: A,
|
|
26
|
+
scrollShadow: C,
|
|
27
|
+
tableChildAdded: k,
|
|
28
|
+
tabs: S,
|
|
29
|
+
tag: V,
|
|
30
|
+
validation: j,
|
|
31
|
+
body: q
|
|
32
32
|
};
|
|
33
33
|
export {
|
|
34
34
|
n as affixes,
|
|
35
35
|
_ as alert,
|
|
36
36
|
d as avatar,
|
|
37
|
-
|
|
37
|
+
q as body,
|
|
38
38
|
f as box,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
t as breadcrumbs,
|
|
40
|
+
s as button,
|
|
41
|
+
o as card,
|
|
42
|
+
a as chip,
|
|
43
|
+
c as count,
|
|
44
|
+
z as default,
|
|
45
|
+
e as details,
|
|
46
|
+
i as errorsummary,
|
|
47
47
|
l as field,
|
|
48
48
|
r as fieldChildAdded,
|
|
49
|
-
|
|
49
|
+
g as fieldset,
|
|
50
50
|
h as fieldsetValidationAdded,
|
|
51
51
|
b as flex,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
w as grid,
|
|
53
|
+
x as input,
|
|
54
|
+
y as link,
|
|
55
|
+
u as logo,
|
|
56
|
+
p as modal,
|
|
57
|
+
m as pagination,
|
|
58
58
|
v as popover,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
C as scrollShadow,
|
|
60
|
+
A as table,
|
|
61
|
+
k as tableChildAdded,
|
|
62
|
+
S as tabs,
|
|
63
|
+
V as tag,
|
|
64
|
+
j as validation
|
|
65
65
|
};
|
|
66
66
|
//# sourceMappingURL=styles.module.css.js.map
|
package/mtds/table/table.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import f from "../styles.module.css.js";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
function
|
|
2
|
+
import { onAdd as d } from "../utils.js";
|
|
3
|
+
const i = f.table.split(" ")[0], l = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function b(t) {
|
|
5
5
|
var o, e;
|
|
6
6
|
for (const n of t) if (n instanceof HTMLTableElement) {
|
|
7
7
|
const a = Array.from(((e = (o = n.tHead) == null ? void 0 : o.rows[0]) == null ? void 0 : e.cells) || [], (r) => {
|
|
@@ -14,17 +14,16 @@ function m(t) {
|
|
|
14
14
|
c.setAttribute("data-th", a[c.cellIndex] || "");
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const o = t.getElementsByClassName(b), e = i(f.tableChildAdded, () => m(o));
|
|
17
|
+
function u(t) {
|
|
18
|
+
const o = t.getElementsByClassName(i), e = d(f.tableChildAdded, () => b(o));
|
|
20
19
|
l.set(t, e), e.observe(t);
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function A(t) {
|
|
23
22
|
var o;
|
|
24
23
|
(o = l.get(t)) == null || o.disconnect(t);
|
|
25
24
|
}
|
|
26
25
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
u as observe,
|
|
27
|
+
A as unobserve
|
|
29
28
|
};
|
|
30
29
|
//# sourceMappingURL=table.js.map
|
package/mtds/table/table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sources":["../../designsystem/table/table.ts"],"sourcesContent":["import styles from '../styles.module.css';\nimport {
|
|
1
|
+
{"version":3,"file":"table.js","sources":["../../designsystem/table/table.ts"],"sourcesContent":["import styles from '../styles.module.css';\nimport { onAdd } from '../utils';\nconst CSS_TABLE = styles.table.split(' ')[0];\nconst BOUND = new WeakMap<Element | Document, ReturnType<typeof onAdd>>();\n\nfunction process(tables: HTMLCollectionOf<Element>) {\n for(const table of tables) if (table instanceof HTMLTableElement) {\n const ths = Array.from(table.tHead?.rows[0]?.cells || [], (el) => el.innerText?.trim()); // Using innerText to only include visible text\n for (const tbody of table.tBodies) {\n for (const row of tbody.rows) {\n for (const cell of row.cells) {\n cell.setAttribute('data-th', ths[cell.cellIndex] || '');\n }\n }\n }\n }\n}\n\nexport function observe (el: Element | Document) {\n const tables = el.getElementsByClassName(CSS_TABLE);\n const add = onAdd(styles.tableChildAdded, () => process(tables));\n BOUND.set(el, add);\n add.observe(el);\n}\n\nexport function unobserve (el: Element | Document) {\n BOUND.get(el)?.disconnect(el);\n}\n"],"names":["CSS_TABLE","styles","BOUND","process","tables","table","ths","_b","_a","el","tbody","row","cell","observe","add","onAdd","unobserve"],"mappings":";;AAEA,MAAMA,IAAYC,EAAO,MAAM,MAAM,GAAG,EAAE,CAAC,GACrCC,wBAAY,QAAsD;AAExE,SAASC,EAAQC,GAAmC;;AAClD,aAAUC,KAASD,EAAY,KAAAC,aAAiB,kBAAkB;AAChE,UAAMC,IAAM,MAAM,OAAKC,KAAAC,IAAAH,EAAM,UAAN,gBAAAG,EAAa,KAAK,OAAlB,gBAAAD,EAAsB,UAAS,IAAI,CAACE,MAAO;;AAAA,cAAAD,IAAAC,EAAG,cAAH,gBAAAD,EAAc;AAAA,KAAM;AAC3E,eAAAE,KAASL,EAAM;AACb,iBAAAM,KAAOD,EAAM;AACX,mBAAAE,KAAQD,EAAI;AACrB,UAAAC,EAAK,aAAa,WAAWN,EAAIM,EAAK,SAAS,KAAK,EAAE;AAAA,EAG5D;AAEJ;AAEO,SAASC,EAASJ,GAAwB;AACzC,QAAAL,IAASK,EAAG,uBAAuBT,CAAS,GAC5Cc,IAAMC,EAAMd,EAAO,iBAAiB,MAAME,EAAQC,CAAM,CAAC;AACzD,EAAAF,EAAA,IAAIO,GAAIK,CAAG,GACjBA,EAAI,QAAQL,CAAE;AAChB;AAEO,SAASO,EAAWP,GAAwB;;AACjD,GAAAD,IAAAN,EAAM,IAAIO,CAAE,MAAZ,QAAAD,EAAe,WAAWC;AAC5B;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mattilsynet/design",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./mtds/index.js",
|
|
6
6
|
"types": "./mtds/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "vite build && rm -rf mtds/docs/",
|
|
30
30
|
"lint": "npx @biomejs/biome lint",
|
|
31
|
-
"publish:clojure": "cd ./clojure && ./publish.sh",
|
|
31
|
+
"publish:clojure": "npm run build && cd ./clojure && ./publish.sh",
|
|
32
32
|
"publish:minor": "npm run build && npm version minor --message 'Release %s' && git push --tags && npm publish --access public",
|
|
33
33
|
"publish:patch": "npm run build && npm version patch --message 'Release %s' && git push --tags && npm publish --access public",
|
|
34
34
|
"start": "vite",
|