@icen.ai/ui 0.2.0 → 0.2.1

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.
@@ -86,7 +86,7 @@ function initModal(root = document) {
86
86
  const opener = target.closest("[data-modal-open]");
87
87
  if (opener?.dataset.modalOpen) {
88
88
  opener.setAttribute("aria-haspopup", "dialog");
89
- open(opener.dataset.modalOpen);
89
+ openModal(opener.dataset.modalOpen);
90
90
  return;
91
91
  }
92
92
  const closer = target.closest("[data-modal-close]");
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@icen.ai/ui",
4
- version: "0.2.0",
4
+ version: "0.2.1",
5
5
  description: "Icen Design System \u2014 \u8BBE\u8BA1 tokens\uFF086 \u9884\u8BBE \xD7 \u660E\u6697\uFF09\u3001\u65E0\u6846\u67B6\u7EC4\u4EF6 CSS \u4E0E\u884C\u4E3A JS",
6
6
  repository: {
7
7
  type: "git",
@@ -774,7 +774,7 @@ function initModal(root = document) {
774
774
  const opener = target.closest("[data-modal-open]");
775
775
  if (opener?.dataset.modalOpen) {
776
776
  opener.setAttribute("aria-haspopup", "dialog");
777
- open(opener.dataset.modalOpen);
777
+ openModal(opener.dataset.modalOpen);
778
778
  return;
779
779
  }
780
780
  const closer = target.closest("[data-modal-close]");
@@ -1314,9 +1314,9 @@ function setup6(container) {
1314
1314
  if (!trigger) return;
1315
1315
  const item = trigger.closest(".accordion-item");
1316
1316
  if (!item || trigger.closest(".accordion") !== container) return;
1317
- const open2 = item.classList.toggle("is-open");
1318
- trigger.setAttribute("aria-expanded", String(open2));
1319
- if (single && open2) {
1317
+ const open = item.classList.toggle("is-open");
1318
+ trigger.setAttribute("aria-expanded", String(open));
1319
+ if (single && open) {
1320
1320
  container.querySelectorAll(".accordion-item.is-open").forEach((other) => {
1321
1321
  if (other === item) return;
1322
1322
  other.classList.remove("is-open");
@@ -1724,8 +1724,8 @@ function setup10(sidebar) {
1724
1724
  if (title.closest(".sidebar") !== el) return;
1725
1725
  const group = title.closest(".sidebar-group");
1726
1726
  if (!group) return;
1727
- const open2 = group.classList.toggle("is-open");
1728
- title.setAttribute("aria-expanded", String(open2));
1727
+ const open = group.classList.toggle("is-open");
1728
+ title.setAttribute("aria-expanded", String(open));
1729
1729
  });
1730
1730
  }
1731
1731
  function initSidebar(root = document) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icen.ai/ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "tokens": [
5
5
  "colors.css",
6
6
  "style-profiles.css",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icen.ai/ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Icen Design System — 设计 tokens(6 预设 × 明暗)、无框架组件 CSS 与行为 JS",
5
5
  "repository": {
6
6
  "type": "git",