@thi.ng/rdom-components 1.0.73 → 1.0.76

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/README.md CHANGED
@@ -67,7 +67,7 @@ Browser ESM import:
67
67
 
68
68
  [JSDelivr documentation](https://www.jsdelivr.com/)
69
69
 
70
- Package sizes (brotli'd, pre-treeshake): ESM: 1.43 KB
70
+ Package sizes (brotli'd, pre-treeshake): ESM: 1.44 KB
71
71
 
72
72
  ## Dependencies
73
73
 
package/accordion.js CHANGED
@@ -5,17 +5,17 @@ import { $promise } from "@thi.ng/rdom/promise";
5
5
  import { dedupe } from "@thi.ng/transducers/dedupe";
6
6
  import { map } from "@thi.ng/transducers/map";
7
7
  import { range } from "@thi.ng/transducers/range";
8
- const accordion = (src, { attribs, head, sections, error }) => {
9
- return $list(
10
- src.transform(
11
- dedupe(),
12
- map((id) => [
13
- ...map((i) => [i, i === id], range(sections.length))
14
- ])
15
- ),
16
- "div",
17
- attribs.wrapper,
18
- ([i, sel]) => section(
8
+ const accordion = (src, { attribs, head, sections, error }) => $list(
9
+ src.transform(
10
+ dedupe(),
11
+ map((id) => [
12
+ ...map((i) => [i, i === id], range(sections.length))
13
+ ])
14
+ ),
15
+ {
16
+ el: "div",
17
+ attribs: attribs.wrapper,
18
+ item: ([i, sel]) => section(
19
19
  sel ? attribs.sectionOn : attribs.sectionOff,
20
20
  head(src, sections[i].title, i, sel),
21
21
  sel ? div(
@@ -23,8 +23,8 @@ const accordion = (src, { attribs, head, sections, error }) => {
23
23
  $promise(sections[i].content(i), error)
24
24
  ) : null
25
25
  )
26
- );
27
- };
26
+ }
27
+ );
28
28
  export {
29
29
  accordion
30
30
  };
package/dropdown.js CHANGED
@@ -9,12 +9,11 @@ const dynamicDropdown = (items, sel, opts) => {
9
9
  label: String,
10
10
  ...opts
11
11
  };
12
- return $list(
13
- items,
14
- "select",
15
- { onchange: $input(sel), ...opts.attribs },
16
- $option(sel, opts)
17
- );
12
+ return $list(items, {
13
+ el: "select",
14
+ attribs: { onchange: $input(sel), ...opts.attribs },
15
+ item: $option(sel, opts)
16
+ });
18
17
  };
19
18
  const staticDropdown = (items, sel, opts) => {
20
19
  opts = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rdom-components",
3
- "version": "1.0.73",
3
+ "version": "1.0.76",
4
4
  "description": "Collection of unstyled, customizable components for @thi.ng/rdom",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,18 +40,18 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.12.20",
44
- "@thi.ng/hiccup-html": "^2.8.1",
45
- "@thi.ng/object-utils": "^1.3.12",
46
- "@thi.ng/rdom": "^1.7.89",
47
- "@thi.ng/rstream": "^9.5.3",
48
- "@thi.ng/strings": "^3.12.2",
49
- "@thi.ng/transducers": "^9.6.33"
43
+ "@thi.ng/api": "^8.12.22",
44
+ "@thi.ng/hiccup-html": "^2.8.4",
45
+ "@thi.ng/object-utils": "^1.3.14",
46
+ "@thi.ng/rdom": "^2.0.2",
47
+ "@thi.ng/rstream": "^9.5.6",
48
+ "@thi.ng/strings": "^3.12.4",
49
+ "@thi.ng/transducers": "^9.6.36"
50
50
  },
51
51
  "devDependencies": {
52
52
  "esbuild": "^0.28.0",
53
- "typedoc": "^0.28.18",
54
- "typescript": "^5.9.3"
53
+ "typedoc": "^0.28.19",
54
+ "typescript": "^6.0.3"
55
55
  },
56
56
  "keywords": [
57
57
  "browser",
@@ -112,5 +112,5 @@
112
112
  "status": "alpha",
113
113
  "year": 2020
114
114
  },
115
- "gitHead": "92be63f24030506f09d6d156804da2798c381dc4"
115
+ "gitHead": "17d2d1a6542704f55f2daa37550a4213b4a32cd8"
116
116
  }
package/tabs.js CHANGED
@@ -14,9 +14,11 @@ const tabs = (src, opts) => {
14
14
  src.map((id) => [
15
15
  ...map((i) => [i, i === id], range(sections.length))
16
16
  ]),
17
- "div",
18
- attribs.tab,
19
- ([i, sel]) => head(src, sections[i].title, i, sel)
17
+ {
18
+ el: "div",
19
+ attribs: attribs.tab,
20
+ item: ([i, sel]) => head(src, sections[i].title, i, sel)
21
+ }
20
22
  ),
21
23
  $switch(
22
24
  src.transform(dedupe()),