@coinloger/dev-ui 0.1.0 → 0.1.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.
Files changed (47) hide show
  1. package/dist/cjs/components/Badge/Badge.cjs +1 -1
  2. package/dist/cjs/components/Button/Button.cjs +1 -1
  3. package/dist/cjs/components/Card/Card.cjs +1 -1
  4. package/dist/cjs/components/Checkbox/Checkbox.cjs +1 -1
  5. package/dist/cjs/components/Container/Container.cjs +1 -0
  6. package/dist/cjs/components/Flex/Flex.cjs +1 -0
  7. package/dist/cjs/components/Flex/FlexItem.cjs +1 -0
  8. package/dist/cjs/components/Input/Input.cjs +1 -1
  9. package/dist/cjs/components/Modal/Modal.cjs +1 -1
  10. package/dist/cjs/components/Radio/Radio.cjs +1 -1
  11. package/dist/cjs/components/Select/Select.cjs +1 -1
  12. package/dist/cjs/components/Switch/Switch.cjs +1 -1
  13. package/dist/cjs/components/Table/Table.cjs +1 -1
  14. package/dist/cjs/components/Tabs/Tabs.cjs +1 -1
  15. package/dist/cjs/components/Typography/Heading.cjs +1 -1
  16. package/dist/cjs/components/Typography/Text.cjs +1 -1
  17. package/dist/cjs/dev-ui.css +1 -1
  18. package/dist/cjs/index.cjs +1 -1
  19. package/dist/cjs/theme.cjs +1 -1
  20. package/dist/esm/components/Badge/Badge.js +14 -22
  21. package/dist/esm/components/Button/Button.js +12 -24
  22. package/dist/esm/components/Card/Card.js +10 -18
  23. package/dist/esm/components/Checkbox/Checkbox.js +17 -33
  24. package/dist/esm/components/Container/Container.d.ts +23 -0
  25. package/dist/esm/components/Container/Container.js +24 -0
  26. package/dist/esm/components/Flex/Flex.d.ts +64 -0
  27. package/dist/esm/components/Flex/Flex.js +39 -0
  28. package/dist/esm/components/Flex/FlexItem.d.ts +53 -0
  29. package/dist/esm/components/Flex/FlexItem.js +33 -0
  30. package/dist/esm/components/Input/Input.js +16 -46
  31. package/dist/esm/components/Modal/Modal.d.ts +0 -35
  32. package/dist/esm/components/Modal/Modal.js +60 -83
  33. package/dist/esm/components/Radio/Radio.js +16 -32
  34. package/dist/esm/components/Select/Select.d.ts +1 -17
  35. package/dist/esm/components/Select/Select.js +95 -93
  36. package/dist/esm/components/Switch/Switch.js +18 -34
  37. package/dist/esm/components/Table/Table.js +13 -22
  38. package/dist/esm/components/Tabs/Tabs.d.ts +0 -25
  39. package/dist/esm/components/Tabs/Tabs.js +45 -70
  40. package/dist/esm/components/Typography/Heading.js +15 -25
  41. package/dist/esm/components/Typography/Text.js +19 -32
  42. package/dist/esm/dev-ui.css +1 -1
  43. package/dist/esm/index.d.ts +2 -0
  44. package/dist/esm/index.js +20 -16
  45. package/dist/esm/theme.d.ts +0 -5
  46. package/dist/esm/theme.js +11 -16
  47. package/package.json +15 -5
@@ -1,4 +1,4 @@
1
- import * as PropTypes from 'prop-types';
1
+
2
2
  export interface SelectOption {
3
3
  value: string | number;
4
4
  label: string;
@@ -57,20 +57,4 @@ export interface SelectProps {
57
57
  export declare const Select: {
58
58
  ({ options, value, onChange, placeholder, label, error, helperText, disabled, fullWidth, size, className, }: SelectProps): import("react/jsx-runtime").JSX.Element;
59
59
  displayName: string;
60
- propTypes: {
61
- options: PropTypes.Validator<(PropTypes.InferProps<{
62
- value: PropTypes.Validator<NonNullable<NonNullable<string | number | null | undefined>>>;
63
- label: PropTypes.Validator<string>;
64
- }> | null | undefined)[]>;
65
- value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
66
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
67
- placeholder: PropTypes.Requireable<string>;
68
- label: PropTypes.Requireable<string>;
69
- error: PropTypes.Requireable<boolean>;
70
- helperText: PropTypes.Requireable<string>;
71
- disabled: PropTypes.Requireable<boolean>;
72
- fullWidth: PropTypes.Requireable<boolean>;
73
- size: PropTypes.Requireable<string>;
74
- className: PropTypes.Requireable<string>;
75
- };
76
60
  };
@@ -1,110 +1,112 @@
1
- import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
- import { useState as w, useRef as T, useEffect as R } from "react";
3
- import { clsx as r } from "clsx";
4
- import * as e from "prop-types";
1
+ import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
+ import { useState as N, useRef as C, useEffect as g } from "react";
3
+ import { clsx as n } from "clsx";
5
4
  /* empty css */
6
- const b = ({
7
- options: i,
8
- value: n,
9
- onChange: m,
10
- placeholder: y = "Select an option",
11
- label: p,
12
- error: f,
13
- helperText: h,
14
- disabled: o,
15
- fullWidth: g,
16
- size: v = "md",
17
- className: x
5
+ const O = ({
6
+ options: c,
7
+ value: a,
8
+ onChange: p,
9
+ placeholder: x = "Select an option",
10
+ label: f,
11
+ error: h,
12
+ helperText: v,
13
+ disabled: u,
14
+ fullWidth: w,
15
+ size: k = "md",
16
+ className: y
18
17
  }) => {
19
- const [t, a] = w(!1), c = T(null), u = i.find((l) => l.value === n), N = () => {
20
- o || a(!t);
21
- }, k = (l) => {
22
- m && m(l), a(!1);
18
+ const [t, d] = N(!1), [L, b] = N("bottom"), i = C(null), m = c.find((e) => e.value === a), l = () => {
19
+ if (i.current) {
20
+ const e = i.current.getBoundingClientRect(), o = window.innerHeight - e.bottom, B = e.top;
21
+ o < 250 && B > o ? b("top") : b("bottom");
22
+ }
23
+ }, E = () => {
24
+ u || (t || l(), d(!t));
25
+ }, S = (e) => {
26
+ p && p(e), d(!1);
23
27
  };
24
- return R(() => {
25
- const l = (O) => {
26
- c.current && !c.current.contains(O.target) && a(!1);
28
+ return g(() => (t && (window.addEventListener("resize", l), window.addEventListener("scroll", l, { capture: !0 })), () => {
29
+ window.removeEventListener("resize", l), window.removeEventListener("scroll", l, { capture: !0 });
30
+ }), [t]), g(() => {
31
+ const e = (o) => {
32
+ i.current && !i.current.contains(o.target) && d(!1);
27
33
  };
28
- return t && document.addEventListener("mousedown", l), () => {
29
- document.removeEventListener("mousedown", l);
34
+ return t && document.addEventListener("mousedown", e), () => {
35
+ document.removeEventListener("mousedown", e);
30
36
  };
31
- }, [t]), /* @__PURE__ */ d(
37
+ }, [t]), /* @__PURE__ */ r(
32
38
  "div",
33
39
  {
34
- className: r("ui-select-wrapper", g && "ui-w-full", x),
35
- ref: c,
36
- style: { width: g ? "100%" : "auto" },
40
+ className: n("ui-select-wrapper", w && "ui-w-full", y),
41
+ ref: i,
42
+ style: { width: w ? "100%" : "auto" },
37
43
  children: [
38
- p && /* @__PURE__ */ s("label", { className: "ui-label", style: { marginBottom: "0.375rem", display: "block" }, children: p }),
39
- /* @__PURE__ */ d(
40
- "button",
41
- {
42
- type: "button",
43
- className: r(
44
- "ui-select-trigger",
45
- `ui-select-${v}`,
46
- f && "ui-select-error",
47
- o && "ui-select-disabled",
48
- t && "ui-select-open"
49
- ),
50
- onClick: N,
51
- disabled: o,
52
- "aria-haspopup": "listbox",
53
- "aria-expanded": t,
54
- children: [
55
- /* @__PURE__ */ s("span", { className: r(!u && "ui-select-placeholder"), children: u ? u.label : y }),
56
- /* @__PURE__ */ s(
57
- "svg",
58
- {
59
- className: "ui-select-icon",
60
- fill: "none",
61
- stroke: "currentColor",
62
- viewBox: "0 0 24 24",
63
- children: /* @__PURE__ */ s("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
64
- }
65
- )
66
- ]
67
- }
68
- ),
69
- t && /* @__PURE__ */ d("ul", { className: "ui-select-menu", role: "listbox", children: [
70
- i.map((l) => /* @__PURE__ */ s(
71
- "li",
44
+ f && /* @__PURE__ */ s("label", { className: "ui-label", style: { marginBottom: "0.375rem", display: "block" }, children: f }),
45
+ /* @__PURE__ */ r("div", { className: "ui-select-input-container", children: [
46
+ /* @__PURE__ */ r(
47
+ "button",
48
+ {
49
+ type: "button",
50
+ className: n(
51
+ "ui-select-trigger",
52
+ `ui-select-${k}`,
53
+ h && "ui-select-error",
54
+ u && "ui-select-disabled",
55
+ t && "ui-select-open"
56
+ ),
57
+ onClick: E,
58
+ disabled: u,
59
+ "aria-haspopup": "listbox",
60
+ "aria-expanded": t,
61
+ children: [
62
+ /* @__PURE__ */ s("span", { className: n(!m && "ui-select-placeholder"), children: m ? m.label : x }),
63
+ /* @__PURE__ */ s(
64
+ "svg",
65
+ {
66
+ className: "ui-select-icon",
67
+ fill: "none",
68
+ stroke: "currentColor",
69
+ viewBox: "0 0 24 24",
70
+ children: /* @__PURE__ */ s("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
71
+ }
72
+ )
73
+ ]
74
+ }
75
+ ),
76
+ t && /* @__PURE__ */ r(
77
+ "ul",
72
78
  {
73
- className: r(
74
- "ui-select-option",
75
- l.value === n && "ui-select-selected"
79
+ className: n(
80
+ "ui-select-menu",
81
+ L === "top" && "ui-select-menu-top"
76
82
  ),
77
- onClick: () => k(l.value),
78
- role: "option",
79
- "aria-selected": l.value === n,
80
- children: l.label
81
- },
82
- l.value
83
- )),
84
- i.length === 0 && /* @__PURE__ */ s("li", { className: "ui-select-option", style: { color: "var(--ui-text-muted)", cursor: "default" }, children: "No options" })
83
+ role: "listbox",
84
+ children: [
85
+ c.map((e) => /* @__PURE__ */ s(
86
+ "li",
87
+ {
88
+ className: n(
89
+ "ui-select-option",
90
+ e.value === a && "ui-select-selected"
91
+ ),
92
+ onClick: () => S(e.value),
93
+ role: "option",
94
+ "aria-selected": e.value === a,
95
+ children: e.label
96
+ },
97
+ e.value
98
+ )),
99
+ c.length === 0 && /* @__PURE__ */ s("li", { className: "ui-select-option", style: { color: "var(--ui-text-muted)", cursor: "default" }, children: "No options" })
100
+ ]
101
+ }
102
+ )
85
103
  ] }),
86
- h && /* @__PURE__ */ s("span", { className: r("ui-helper-text", f && "ui-helper-text-error"), style: { marginTop: "0.375rem", display: "block" }, children: h })
104
+ v && /* @__PURE__ */ s("span", { className: n("ui-helper-text", h && "ui-helper-text-error"), style: { marginTop: "0.375rem", display: "block" }, children: v })
87
105
  ]
88
106
  }
89
107
  );
90
108
  };
91
- b.displayName = "Select";
92
- b.propTypes = {
93
- options: e.arrayOf(e.shape({
94
- value: e.oneOfType([e.string, e.number]).isRequired,
95
- label: e.string.isRequired
96
- })).isRequired,
97
- value: e.oneOfType([e.string, e.number]),
98
- onChange: e.func,
99
- placeholder: e.string,
100
- label: e.string,
101
- error: e.bool,
102
- helperText: e.string,
103
- disabled: e.bool,
104
- fullWidth: e.bool,
105
- size: e.oneOf(["sm", "md", "lg", "xl"]),
106
- className: e.string
107
- };
109
+ O.displayName = "Select";
108
110
  export {
109
- b as Select
111
+ O as Select
110
112
  };
@@ -1,53 +1,37 @@
1
- import { jsxs as m, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as p } from "react";
3
- import { clsx as h } from "clsx";
4
- import * as e from "prop-types";
1
+ import { jsxs as m, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as l } from "react";
3
+ import { clsx as o } from "clsx";
5
4
  /* empty css */
6
- const a = p(
7
- ({ className: o, label: i, error: u, disabled: r, size: t = "md", variant: c = "primary", ...n }, l) => /* @__PURE__ */ m(
5
+ const p = l(
6
+ ({ className: c, label: s, error: u, disabled: t, size: r = "md", variant: a = "primary", ...e }, h) => /* @__PURE__ */ m(
8
7
  "label",
9
8
  {
10
- className: h(
9
+ className: o(
11
10
  "ui-switch-label",
12
- `ui-switch-${t}`,
13
- `ui-switch-${c}`,
14
- r && "ui-switch-disabled",
15
- o
11
+ `ui-switch-${r}`,
12
+ `ui-switch-${a}`,
13
+ t && "ui-switch-disabled",
14
+ c
16
15
  ),
17
16
  children: [
18
- /* @__PURE__ */ s(
17
+ /* @__PURE__ */ i(
19
18
  "input",
20
19
  {
21
20
  type: "checkbox",
22
21
  className: "ui-switch-input",
23
- disabled: r,
24
- ref: l,
22
+ disabled: t,
23
+ ref: h,
25
24
  role: "switch",
26
- ...n
25
+ ...e
27
26
  }
28
27
  ),
29
- /* @__PURE__ */ s("span", { className: "ui-switch-track", children: /* @__PURE__ */ s("span", { className: "ui-switch-thumb" }) }),
30
- i && /* @__PURE__ */ s("span", { className: "ui-switch-text", children: i })
28
+ /* @__PURE__ */ i("span", { className: "ui-switch-track", children: /* @__PURE__ */ i("span", { className: "ui-switch-thumb" }) }),
29
+ s && /* @__PURE__ */ i("span", { className: "ui-switch-text", children: s })
31
30
  ]
32
31
  }
33
32
  )
34
33
  );
35
- a.displayName = "Switch";
36
- a.propTypes = {
37
- label: e.node,
38
- error: e.bool,
39
- size: e.oneOf(["sm", "md", "lg", "xl"]),
40
- variant: e.oneOf(["primary", "success", "warning", "danger"]),
41
- checked: e.bool,
42
- defaultChecked: e.bool,
43
- onChange: e.func,
44
- name: e.string,
45
- value: e.oneOfType([e.string, e.number]),
46
- disabled: e.bool,
47
- required: e.bool,
48
- id: e.string,
49
- className: e.string
50
- };
34
+ p.displayName = "Switch";
51
35
  export {
52
- a as Switch
36
+ p as Switch
53
37
  };
@@ -1,29 +1,20 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as n } from "react";
3
- import * as e from "prop-types";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as d } from "react";
4
3
  /* empty css */
5
- const r = n(
6
- ({ className: s, bordered: a = !0, striped: i, hover: l, size: t = "md", children: m, ...b }, d) => {
7
- const p = [
4
+ const u = d(
5
+ ({ className: a, bordered: r = !0, striped: t, hover: i, size: l = "md", children: s, ...o }, m) => {
6
+ const b = [
8
7
  "ui-table",
9
- a && "ui-table-bordered",
10
- i && "ui-table-striped",
11
- l && "ui-table-hover",
12
- t === "sm" && "ui-table-sm",
13
- s
8
+ r && "ui-table-bordered",
9
+ t && "ui-table-striped",
10
+ i && "ui-table-hover",
11
+ l === "sm" && "ui-table-sm",
12
+ a
14
13
  ].filter(Boolean).join(" ");
15
- return /* @__PURE__ */ o("div", { className: "ui-table-responsive", children: /* @__PURE__ */ o("table", { ref: d, className: p, ...b, children: m }) });
14
+ return /* @__PURE__ */ e("div", { className: "ui-table-responsive", children: /* @__PURE__ */ e("table", { ref: m, className: b, ...o, children: s }) });
16
15
  }
17
16
  );
18
- r.displayName = "Table";
19
- r.propTypes = {
20
- bordered: e.bool,
21
- striped: e.bool,
22
- hover: e.bool,
23
- size: e.oneOf(["sm", "md"]),
24
- children: e.node,
25
- className: e.string
26
- };
17
+ u.displayName = "Table";
27
18
  export {
28
- r as Table
19
+ u as Table
29
20
  };
@@ -1,6 +1,5 @@
1
1
  import { ReactNode, MouseEventHandler } from 'react';
2
2
 
3
- import * as PropTypes from 'prop-types';
4
3
  /**
5
4
  * Tabs Root properties.
6
5
  */
@@ -40,41 +39,17 @@ export interface TabsContentProps {
40
39
  export declare const Tabs: {
41
40
  ({ defaultValue, value, onValueChange, children, className }: TabsProps): import("react/jsx-runtime").JSX.Element;
42
41
  displayName: string;
43
- propTypes: {
44
- defaultValue: PropTypes.Requireable<string>;
45
- value: PropTypes.Requireable<string>;
46
- onValueChange: PropTypes.Requireable<(...args: any[]) => any>;
47
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
48
- className: PropTypes.Requireable<string>;
49
- };
50
42
  } & {
51
43
  List: {
52
44
  ({ className, children, variant, ...props }: TabsListProps): import("react/jsx-runtime").JSX.Element;
53
45
  displayName: string;
54
- propTypes: {
55
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
56
- variant: PropTypes.Requireable<string>;
57
- className: PropTypes.Requireable<string>;
58
- };
59
46
  };
60
47
  Trigger: {
61
48
  ({ value, className, children, onClick, ...props }: TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
62
49
  displayName: string;
63
- propTypes: {
64
- value: PropTypes.Validator<string>;
65
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
66
- className: PropTypes.Requireable<string>;
67
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
68
- disabled: PropTypes.Requireable<boolean>;
69
- };
70
50
  };
71
51
  Content: {
72
52
  ({ value, className, children, ...props }: TabsContentProps): import("react/jsx-runtime").JSX.Element | null;
73
53
  displayName: string;
74
- propTypes: {
75
- value: PropTypes.Validator<string>;
76
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
77
- className: PropTypes.Requireable<string>;
78
- };
79
54
  };
80
55
  };
@@ -1,92 +1,67 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { createContext as N, useState as v, useId as y, useContext as f } from "react";
3
- import { clsx as d } from "clsx";
4
- import * as t from "prop-types";
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { createContext as x, useState as $, useId as N, useContext as m } from "react";
3
+ import { clsx as b } from "clsx";
5
4
  /* empty css */
6
- const p = N(null), m = ({ defaultValue: e, value: n, onValueChange: i, children: r, className: a }) => {
7
- const [s, o] = v(e || ""), c = n !== void 0, b = c ? n : s, u = y(), g = (I) => {
8
- c || o(I), i?.(I);
5
+ const u = x(null), C = ({ defaultValue: t, value: s, onValueChange: a, children: o, className: n }) => {
6
+ const [e, i] = $(t || ""), r = s !== void 0, l = r ? s : e, d = N(), g = (T) => {
7
+ r || i(T), a?.(T);
9
8
  };
10
- return /* @__PURE__ */ l(p.Provider, { value: { value: b, onChange: g, baseId: u }, children: /* @__PURE__ */ l("div", { className: d("ui-tabs", a), children: r }) });
11
- }, T = ({ className: e, children: n, variant: i = "line", ...r }) => /* @__PURE__ */ l(
9
+ return /* @__PURE__ */ c(u.Provider, { value: { value: l, onChange: g, baseId: d }, children: /* @__PURE__ */ c("div", { className: b("ui-tabs", n), children: o }) });
10
+ }, I = ({ className: t, children: s, variant: a = "line", ...o }) => /* @__PURE__ */ c(
12
11
  "div",
13
12
  {
14
13
  role: "tablist",
15
- className: d("ui-tabs-list", `ui-tabs-list-${i}`, e),
16
- ...r,
17
- children: n
14
+ className: b("ui-tabs-list", `ui-tabs-list-${a}`, t),
15
+ ...o,
16
+ children: s
18
17
  }
19
- ), h = ({ value: e, className: n, children: i, onClick: r, ...a }) => {
20
- const s = f(p);
21
- if (!s) throw new Error("TabsTrigger must be used within Tabs");
22
- const o = s.value === e, c = `${s.baseId}-trigger-${e}`, b = `${s.baseId}-content-${e}`, u = (g) => {
23
- s.onChange(e), r?.(g);
18
+ ), p = ({ value: t, className: s, children: a, onClick: o, ...n }) => {
19
+ const e = m(u);
20
+ if (!e) throw new Error("TabsTrigger must be used within Tabs");
21
+ const i = e.value === t, r = `${e.baseId}-trigger-${t}`, l = `${e.baseId}-content-${t}`, d = (g) => {
22
+ e.onChange(t), o?.(g);
24
23
  };
25
- return /* @__PURE__ */ l(
24
+ return /* @__PURE__ */ c(
26
25
  "button",
27
26
  {
28
27
  type: "button",
29
28
  role: "tab",
30
- "aria-selected": o,
31
- "aria-controls": b,
32
- id: c,
33
- tabIndex: o ? 0 : -1,
34
- "data-state": o ? "active" : "inactive",
35
- className: d("ui-tabs-trigger", n),
36
- onClick: u,
37
- ...a,
38
- children: i
29
+ "aria-selected": i,
30
+ "aria-controls": l,
31
+ id: r,
32
+ tabIndex: i ? 0 : -1,
33
+ "data-state": i ? "active" : "inactive",
34
+ className: b("ui-tabs-trigger", s),
35
+ onClick: d,
36
+ ...n,
37
+ children: a
39
38
  }
40
39
  );
41
- }, C = ({ value: e, className: n, children: i, ...r }) => {
42
- const a = f(p);
43
- if (!a) throw new Error("TabsContent must be used within Tabs");
44
- const s = a.value === e, o = `${a.baseId}-trigger-${e}`, c = `${a.baseId}-content-${e}`;
45
- return s ? /* @__PURE__ */ l(
40
+ }, h = ({ value: t, className: s, children: a, ...o }) => {
41
+ const n = m(u);
42
+ if (!n) throw new Error("TabsContent must be used within Tabs");
43
+ const e = n.value === t, i = `${n.baseId}-trigger-${t}`, r = `${n.baseId}-content-${t}`;
44
+ return e ? /* @__PURE__ */ c(
46
45
  "div",
47
46
  {
48
47
  role: "tabpanel",
49
- id: c,
50
- "aria-labelledby": o,
48
+ id: r,
49
+ "aria-labelledby": i,
51
50
  tabIndex: 0,
52
- className: d("ui-tabs-content", n),
53
- ...r,
54
- children: i
51
+ className: b("ui-tabs-content", s),
52
+ ...o,
53
+ children: a
55
54
  }
56
55
  ) : null;
57
- }, k = Object.assign(m, {
58
- List: T,
59
- Trigger: h,
60
- Content: C
56
+ }, L = Object.assign(C, {
57
+ List: I,
58
+ Trigger: p,
59
+ Content: h
61
60
  });
62
- m.displayName = "Tabs";
63
- T.displayName = "TabsList";
64
- h.displayName = "TabsTrigger";
65
- C.displayName = "TabsContent";
66
- m.propTypes = {
67
- defaultValue: t.string,
68
- value: t.string,
69
- onValueChange: t.func,
70
- children: t.node,
71
- className: t.string
72
- };
73
- T.propTypes = {
74
- children: t.node,
75
- variant: t.oneOf(["line", "pills"]),
76
- className: t.string
77
- };
78
- h.propTypes = {
79
- value: t.string.isRequired,
80
- children: t.node,
81
- className: t.string,
82
- onClick: t.func,
83
- disabled: t.bool
84
- };
85
- C.propTypes = {
86
- value: t.string.isRequired,
87
- children: t.node,
88
- className: t.string
89
- };
61
+ C.displayName = "Tabs";
62
+ I.displayName = "TabsList";
63
+ p.displayName = "TabsTrigger";
64
+ h.displayName = "TabsContent";
90
65
  export {
91
- k as Tabs
66
+ L as Tabs
92
67
  };
@@ -1,39 +1,29 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as u } from "react";
3
- import { clsx as f } from "clsx";
4
- import * as e from "prop-types";
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { forwardRef as d } from "react";
3
+ import { clsx as s } from "clsx";
5
4
  /* empty css */
6
- const i = u(
7
- ({ className: n, children: a, level: o = 1, truncate: m, lines: t, style: r, ...p }, s) => {
8
- const c = `h${o}`, l = t ? { ...r, "--ui-line-clamp": t } : r;
9
- return /* @__PURE__ */ d(
5
+ const f = d(
6
+ ({ className: i, children: r, level: o = 1, truncate: m, lines: t, style: a, ...e }, n) => {
7
+ const c = `h${o}`, p = t ? { ...a, "--ui-line-clamp": t } : a;
8
+ return /* @__PURE__ */ u(
10
9
  c,
11
10
  {
12
- ref: s,
13
- className: f(
11
+ ref: n,
12
+ className: s(
14
13
  "ui-heading",
15
14
  `ui-heading-h${o}`,
16
15
  m && "ui-text-truncate",
17
16
  t && "ui-text-clamp",
18
- n
17
+ i
19
18
  ),
20
- style: l,
21
- ...p,
22
- children: a
19
+ style: p,
20
+ ...e,
21
+ children: r
23
22
  }
24
23
  );
25
24
  }
26
25
  );
27
- i.displayName = "Heading";
28
- i.propTypes = {
29
- level: e.oneOf([1, 2, 3, 4, 5, 6]),
30
- truncate: e.bool,
31
- lines: e.number,
32
- children: e.node,
33
- className: e.string,
34
- style: e.object,
35
- id: e.string
36
- };
26
+ f.displayName = "Heading";
37
27
  export {
38
- i as Heading
28
+ f as Heading
39
29
  };