quirk-ui 0.0.85 → 0.0.87

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import { d, i as m, r, g as t, s as e, f as s } from "../../vi.ClIskdbk-CZ8iFAMK.js";
2
+ import { d, i as r, r as m, g as t, s as e, f as s } from "../../vi.ClIskdbk-CZ8iFAMK.js";
3
3
  import { Accordion as a } from "./index.js";
4
4
  import "../../index-BBIdMcpm.js";
5
5
  d("Accordion", () => {
@@ -7,39 +7,39 @@ d("Accordion", () => {
7
7
  {
8
8
  id: "item1",
9
9
  title: "Title 1",
10
- content: "Content 1"
10
+ description: "Content 1"
11
11
  },
12
12
  {
13
13
  id: "item2",
14
14
  title: "Title 2",
15
- content: "Content 2"
15
+ description: "Content 2"
16
16
  },
17
17
  {
18
18
  id: "item3",
19
19
  title: "Title 3",
20
- content: "Content 3"
20
+ description: "Content 3"
21
21
  }
22
22
  ];
23
- m("renders accordion items", () => {
24
- r(/* @__PURE__ */ c(a, { items: l, multiple: !0 })), t(e.getByText("Title 1")).toBeInTheDocument(), t(e.getByText("Title 2")).toBeInTheDocument(), t(e.getByText("Title 3")).toBeInTheDocument();
25
- }), m("only one item is expanded at a time when multiple is false", () => {
26
- r(/* @__PURE__ */ c(a, { items: l, multiple: !1 }));
27
- const i = e.getByText("Title 1"), n = e.getByText("Content 1"), o = e.getByText("Title 2"), T = e.getByText("Content 2");
28
- s.click(i), t(n).toBeVisible(), s.click(o), setTimeout(() => {
29
- t(T).toBeVisible(), t(n).not.toBeVisible();
23
+ r("renders accordion items", () => {
24
+ m(/* @__PURE__ */ c(a, { items: l, multiple: !0 })), t(e.getByText("Title 1")).toBeInTheDocument(), t(e.getByText("Title 2")).toBeInTheDocument(), t(e.getByText("Title 3")).toBeInTheDocument();
25
+ }), r("only one item is expanded at a time when multiple is false", () => {
26
+ m(/* @__PURE__ */ c(a, { items: l, multiple: !1 }));
27
+ const n = e.getByText("Title 1"), i = e.getByText("Content 1"), o = e.getByText("Title 2"), T = e.getByText("Content 2");
28
+ s.click(n), t(i).toBeVisible(), s.click(o), setTimeout(() => {
29
+ t(T).toBeVisible(), t(i).not.toBeVisible();
30
30
  }, 400);
31
- }), m("multiple items can be expanded when multiple is true", () => {
32
- r(/* @__PURE__ */ c(a, { items: l, multiple: !1 }));
33
- const i = e.getByText("Title 1"), n = e.getByText("Content 1"), o = e.getByText("Title 2"), T = e.getByText("Content 2");
34
- s.click(i), s.click(o), setTimeout(() => {
35
- t(T).toBeVisible(), t(n).toBeVisible();
31
+ }), r("multiple items can be expanded when multiple is true", () => {
32
+ m(/* @__PURE__ */ c(a, { items: l, multiple: !1 }));
33
+ const n = e.getByText("Title 1"), i = e.getByText("Content 1"), o = e.getByText("Title 2"), T = e.getByText("Content 2");
34
+ s.click(n), s.click(o), setTimeout(() => {
35
+ t(T).toBeVisible(), t(i).toBeVisible();
36
36
  }, 300);
37
- }), m("applies correct transition classes when expanding and collapsing", () => {
37
+ }), r("applies correct transition classes when expanding and collapsing", () => {
38
38
  var o;
39
- r(/* @__PURE__ */ c(a, { items: l, multiple: !0 }));
40
- const i = e.getByText("Title 1");
41
- s.click(i);
42
- const n = (o = e.getByText("Content 1").parentElement) == null ? void 0 : o.parentElement;
43
- t(n).toHaveClass("open"), s.click(i), t(n).toHaveClass("closed");
39
+ m(/* @__PURE__ */ c(a, { items: l, multiple: !0 }));
40
+ const n = e.getByText("Title 1");
41
+ s.click(n);
42
+ const i = (o = e.getByText("Content 1").parentElement) == null ? void 0 : o.parentElement;
43
+ t(i).toHaveClass("open"), s.click(n), t(i).toHaveClass("closed");
44
44
  });
45
45
  });
@@ -20,7 +20,7 @@ function j({
20
20
  const [m, _] = p([]), l = (o) => {
21
21
  _((n) => i ? n.includes(o) ? n.filter((r) => r !== o) : [...n, o] : n.includes(o) ? [] : [o]);
22
22
  };
23
- return /* @__PURE__ */ e("div", { className: `${d ?? ""} ${c.accordion}`, children: s.map(({ id: o, title: n, content: r }) => {
23
+ return /* @__PURE__ */ e("div", { className: `${d ?? ""} ${c.accordion}`, children: s.map(({ id: o, title: n, description: r }) => {
24
24
  const t = m.includes(o);
25
25
  return /* @__PURE__ */ a("div", { className: c.accordionItem, children: [
26
26
  /* @__PURE__ */ a(
@@ -2,7 +2,7 @@ import { default as React } from 'react';
2
2
  export type AccordionItem = {
3
3
  id: string;
4
4
  title: string;
5
- content: React.ReactNode;
5
+ description: React.ReactNode;
6
6
  };
7
7
  type AccordionProps = {
8
8
  items: AccordionItem[];
@@ -20,6 +20,7 @@ export { Badge } from './components/Badge';
20
20
  export { Tooltip } from './components/Tooltip';
21
21
  export { Modal } from './components/Modal';
22
22
  export { Accordion } from './components/Accordion';
23
+ export type { AccordionItem } from './components/Accordion';
23
24
  export { Alert } from './components/Alert';
24
25
  export { Notification } from './components/Notification';
25
26
  export type { NotificationProps } from './components/Notification';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.85",
4
+ "version": "0.0.87",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {