@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
@@ -0,0 +1,23 @@
1
+ import { ElementType, HTMLAttributes, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
2
+
3
+ export interface ContainerProps extends HTMLAttributes<HTMLElement> {
4
+ /**
5
+ * If true, container will be fluid (100% width) at all breakpoints.
6
+ * @default false
7
+ */
8
+ fluid?: boolean;
9
+ /**
10
+ * The component used for the root node.
11
+ * @default 'div'
12
+ */
13
+ as?: ElementType;
14
+ /**
15
+ * The content of the component.
16
+ */
17
+ children?: ReactNode;
18
+ }
19
+ /**
20
+ * A container component to center your content horizontally.
21
+ * It's the most basic layout element.
22
+ */
23
+ export declare const Container: ForwardRefExoticComponent<ContainerProps & RefAttributes<HTMLElement>>;
@@ -0,0 +1,24 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ import { clsx as c } from "clsx";
4
+ /* empty css */
5
+ const f = m(
6
+ ({
7
+ className: r,
8
+ children: o,
9
+ fluid: i = !1,
10
+ as: a = "div",
11
+ ...s
12
+ }, t) => {
13
+ const e = c(
14
+ "ui-container",
15
+ i && "ui-container--fluid",
16
+ r
17
+ );
18
+ return /* @__PURE__ */ n(a, { ref: t, className: e, ...s, children: o });
19
+ }
20
+ );
21
+ f.displayName = "Container";
22
+ export {
23
+ f as Container
24
+ };
@@ -0,0 +1,64 @@
1
+ import { ElementType, CSSProperties, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ import { FlexItem } from './FlexItem';
3
+
4
+ export interface FlexProps {
5
+ /**
6
+ * The direction of the flex container.
7
+ * @default 'row'
8
+ */
9
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
10
+ /**
11
+ * Alignment of items along the main axis.
12
+ * @default 'start'
13
+ */
14
+ justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
15
+ /**
16
+ * Alignment of items along the cross axis.
17
+ * @default 'stretch'
18
+ */
19
+ align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
20
+ /**
21
+ * Whether items should wrap to the next line.
22
+ * @default 'nowrap'
23
+ */
24
+ wrap?: 'nowrap' | 'wrap' | 'wrap-reverse';
25
+ /**
26
+ * Gap between items.
27
+ * Can be a predefined size ('sm', 'md', 'lg', 'xl') or a valid CSS value (number or string).
28
+ * @default 'md'
29
+ */
30
+ gap?: 'sm' | 'md' | 'lg' | 'xl' | number | string;
31
+ /**
32
+ * If true, renders as an inline-flex container.
33
+ * @default false
34
+ */
35
+ inline?: boolean;
36
+ /**
37
+ * The component used for the root node.
38
+ * @default 'div'
39
+ */
40
+ as?: ElementType;
41
+ /**
42
+ * The content of the component.
43
+ */
44
+ children?: ReactNode;
45
+ /**
46
+ * Additional CSS class names.
47
+ */
48
+ className?: string;
49
+ /**
50
+ * Inline styles.
51
+ */
52
+ style?: CSSProperties;
53
+ /**
54
+ * Optional ID.
55
+ */
56
+ id?: string;
57
+ }
58
+ /**
59
+ * A flexible layout component (Flexbox).
60
+ * building block for creating structured layouts.
61
+ */
62
+ export declare const Flex: ForwardRefExoticComponent<FlexProps & RefAttributes<HTMLElement>> & {
63
+ Item: typeof FlexItem;
64
+ };
@@ -0,0 +1,39 @@
1
+ import { jsx as y } from "react/jsx-runtime";
2
+ import { forwardRef as $ } from "react";
3
+ import { clsx as w } from "clsx";
4
+ import { FlexItem as F } from "./FlexItem.js";
5
+ /* empty css */
6
+ const s = $(
7
+ ({
8
+ className: i,
9
+ children: l,
10
+ direction: r = "row",
11
+ justify: o = "start",
12
+ align: m = "stretch",
13
+ wrap: f = "nowrap",
14
+ gap: e = "md",
15
+ inline: x = !1,
16
+ as: u = "div",
17
+ style: n,
18
+ ...c
19
+ }, a) => {
20
+ const t = typeof e == "number" || typeof e == "string" && !["sm", "md", "lg", "xl"].includes(e), p = w(
21
+ x ? "ui-flex--inline" : "ui-flex",
22
+ `ui-flex--dir-${r}`,
23
+ `ui-flex--justify-${o}`,
24
+ `ui-flex--align-${m}`,
25
+ `ui-flex--wrap-${f}`,
26
+ !t && e && `ui-flex--gap-${e}`,
27
+ i
28
+ ), d = {
29
+ ...n,
30
+ ...t ? { gap: e } : {}
31
+ };
32
+ return /* @__PURE__ */ y(u, { ref: a, className: p, style: d, ...c, children: l });
33
+ }
34
+ );
35
+ s.displayName = "Flex";
36
+ s.Item = F;
37
+ export {
38
+ s as Flex
39
+ };
@@ -0,0 +1,53 @@
1
+ import { ElementType, CSSProperties, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
2
+
3
+ export interface FlexItemProps {
4
+ /**
5
+ * Flex grow factor.
6
+ * @default 0
7
+ */
8
+ grow?: boolean | number;
9
+ /**
10
+ * Flex shrink factor.
11
+ * @default 1
12
+ */
13
+ shrink?: boolean | number;
14
+ /**
15
+ * Flex basis value.
16
+ * @default 'auto'
17
+ */
18
+ basis?: string | number;
19
+ /**
20
+ * Flex shorthand.
21
+ */
22
+ flex?: string | number;
23
+ /**
24
+ * Explicit width.
25
+ */
26
+ width?: string | number;
27
+ /**
28
+ * Order of the item.
29
+ */
30
+ order?: number;
31
+ /**
32
+ * The component used for the root node.
33
+ * @default 'div'
34
+ */
35
+ as?: ElementType;
36
+ /**
37
+ * The content of the component.
38
+ */
39
+ children?: ReactNode;
40
+ /**
41
+ * Additional CSS class names.
42
+ */
43
+ className?: string;
44
+ /**
45
+ * Inline styles.
46
+ */
47
+ style?: CSSProperties;
48
+ /**
49
+ * Optional ID.
50
+ */
51
+ id?: string;
52
+ }
53
+ export declare const FlexItem: ForwardRefExoticComponent<FlexItemProps & RefAttributes<HTMLElement>>;
@@ -0,0 +1,33 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ import { clsx as u } from "clsx";
4
+ const y = p(
5
+ ({
6
+ className: i,
7
+ children: s,
8
+ grow: e,
9
+ shrink: o,
10
+ basis: t,
11
+ flex: l,
12
+ width: m,
13
+ order: f,
14
+ as: a = "div",
15
+ style: x,
16
+ ...d
17
+ }, r) => {
18
+ const v = {
19
+ ...x,
20
+ ...e !== void 0 && { flexGrow: e === !0 ? 1 : e === !1 ? 0 : e },
21
+ ...o !== void 0 && { flexShrink: o === !0 ? 1 : o === !1 ? 0 : o },
22
+ ...t !== void 0 && { flexBasis: t },
23
+ ...l !== void 0 && { flex: l },
24
+ ...m !== void 0 && { width: m },
25
+ ...f !== void 0 && { order: f }
26
+ };
27
+ return /* @__PURE__ */ c(a, { ref: r, className: u("ui-flex-item", i), style: v, ...d, children: s });
28
+ }
29
+ );
30
+ y.displayName = "Flex.Item";
31
+ export {
32
+ y as FlexItem
33
+ };
@@ -1,61 +1,31 @@
1
- import { jsxs as g, jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as c, useId as b } from "react";
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as d, useId as f } from "react";
3
3
  import { clsx as r } from "clsx";
4
- import * as e from "prop-types";
5
4
  /* empty css */
6
- const u = c(
7
- ({ className: p, label: t, error: i, helperText: o, fullWidth: l, size: a = "md", id: m, ...d }, f) => {
8
- const s = m || b();
9
- return /* @__PURE__ */ g("div", { className: r("ui-input-wrapper", l && "ui-input-wrapper-full"), children: [
10
- t && /* @__PURE__ */ n("label", { htmlFor: s, className: "ui-label", children: t }),
11
- /* @__PURE__ */ n(
5
+ const h = d(
6
+ ({ className: s, label: p, error: t, helperText: u, fullWidth: n, size: a = "md", id: l, ...m }, o) => {
7
+ const e = l || f();
8
+ return /* @__PURE__ */ c("div", { className: r("ui-input-wrapper", n && "ui-input-wrapper-full"), children: [
9
+ p && /* @__PURE__ */ i("label", { htmlFor: e, className: "ui-label", children: p }),
10
+ /* @__PURE__ */ i(
12
11
  "input",
13
12
  {
14
- ref: f,
15
- id: s,
13
+ ref: o,
14
+ id: e,
16
15
  className: r(
17
16
  "ui-input",
18
17
  `ui-input-${a}`,
19
- i && "ui-input-error",
20
- p
18
+ t && "ui-input-error",
19
+ s
21
20
  ),
22
- ...d
21
+ ...m
23
22
  }
24
23
  ),
25
- o && /* @__PURE__ */ n("span", { className: r("ui-helper-text", i && "ui-helper-text-error"), children: o })
24
+ u && /* @__PURE__ */ i("span", { className: r("ui-helper-text", t && "ui-helper-text-error"), children: u })
26
25
  ] });
27
26
  }
28
27
  );
29
- u.displayName = "Input";
30
- u.propTypes = {
31
- label: e.node,
32
- error: e.bool,
33
- helperText: e.string,
34
- fullWidth: e.bool,
35
- size: e.oneOf(["sm", "md", "lg", "xl"]),
36
- value: e.oneOfType([e.string, e.number]),
37
- defaultValue: e.oneOfType([e.string, e.number]),
38
- onChange: e.func,
39
- onBlur: e.func,
40
- onFocus: e.func,
41
- name: e.string,
42
- id: e.string,
43
- placeholder: e.string,
44
- type: e.string,
45
- disabled: e.bool,
46
- readOnly: e.bool,
47
- required: e.bool,
48
- autoComplete: e.string,
49
- autoFocus: e.bool,
50
- min: e.oneOfType([e.string, e.number]),
51
- max: e.oneOfType([e.string, e.number]),
52
- step: e.oneOfType([e.string, e.number]),
53
- minLength: e.number,
54
- maxLength: e.number,
55
- pattern: e.string,
56
- inputMode: e.string,
57
- className: e.string
58
- };
28
+ h.displayName = "Input";
59
29
  export {
60
- u as Input
30
+ h as Input
61
31
  };
@@ -1,16 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
- import * as PropTypes from 'prop-types';
4
3
  export declare const ModalHeader: {
5
4
  ({ children, className }: {
6
5
  children: ReactNode;
7
6
  className?: string;
8
7
  }): import("react/jsx-runtime").JSX.Element;
9
8
  displayName: string;
10
- propTypes: {
11
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
12
- className: PropTypes.Requireable<string>;
13
- };
14
9
  };
15
10
  export declare const ModalBody: {
16
11
  ({ children, className }: {
@@ -18,10 +13,6 @@ export declare const ModalBody: {
18
13
  className?: string;
19
14
  }): import("react/jsx-runtime").JSX.Element;
20
15
  displayName: string;
21
- propTypes: {
22
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
23
- className: PropTypes.Requireable<string>;
24
- };
25
16
  };
26
17
  export declare const ModalFooter: {
27
18
  ({ children, className }: {
@@ -29,10 +20,6 @@ export declare const ModalFooter: {
29
20
  className?: string;
30
21
  }): import("react/jsx-runtime").JSX.Element;
31
22
  displayName: string;
32
- propTypes: {
33
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
34
- className: PropTypes.Requireable<string>;
35
- };
36
23
  };
37
24
  /**
38
25
  * Modal component properties.
@@ -76,16 +63,6 @@ export interface ModalProps {
76
63
  export declare const Modal: {
77
64
  ({ isOpen, onClose, title, children, footer, size, className, closeOnBackdropClick, }: ModalProps): import('react').ReactPortal | null;
78
65
  displayName: string;
79
- propTypes: {
80
- isOpen: PropTypes.Validator<boolean>;
81
- onClose: PropTypes.Validator<(...args: any[]) => any>;
82
- title: PropTypes.Requireable<PropTypes.ReactNodeLike>;
83
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
84
- footer: PropTypes.Requireable<PropTypes.ReactNodeLike>;
85
- size: PropTypes.Requireable<string>;
86
- className: PropTypes.Requireable<string>;
87
- closeOnBackdropClick: PropTypes.Requireable<boolean>;
88
- };
89
66
  } & {
90
67
  Header: {
91
68
  ({ children, className }: {
@@ -93,10 +70,6 @@ export declare const Modal: {
93
70
  className?: string;
94
71
  }): import("react/jsx-runtime").JSX.Element;
95
72
  displayName: string;
96
- propTypes: {
97
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
98
- className: PropTypes.Requireable<string>;
99
- };
100
73
  };
101
74
  Body: {
102
75
  ({ children, className }: {
@@ -104,10 +77,6 @@ export declare const Modal: {
104
77
  className?: string;
105
78
  }): import("react/jsx-runtime").JSX.Element;
106
79
  displayName: string;
107
- propTypes: {
108
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
109
- className: PropTypes.Requireable<string>;
110
- };
111
80
  };
112
81
  Footer: {
113
82
  ({ children, className }: {
@@ -115,9 +84,5 @@ export declare const Modal: {
115
84
  className?: string;
116
85
  }): import("react/jsx-runtime").JSX.Element;
117
86
  displayName: string;
118
- propTypes: {
119
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
120
- className: PropTypes.Requireable<string>;
121
- };
122
87
  };
123
88
  };
@@ -1,123 +1,100 @@
1
- import { jsx as r, jsxs as c, Fragment as C } from "react/jsx-runtime";
2
- import { createContext as E, useRef as B, useState as R, useEffect as h, useContext as T } from "react";
3
- import { createPortal as j } from "react-dom";
4
- import { clsx as l } from "clsx";
5
- import * as o from "prop-types";
1
+ import { jsx as e, jsxs as r, Fragment as g } from "react/jsx-runtime";
2
+ import { createContext as E, useRef as C, useState as B, useEffect as f, useContext as j } from "react";
3
+ import { createPortal as F } from "react-dom";
4
+ import { clsx as d } from "clsx";
6
5
  /* empty css */
7
- const v = E(void 0), F = () => {
8
- const e = T(v);
9
- if (!e)
6
+ const h = E(void 0), L = () => {
7
+ const o = j(h);
8
+ if (!o)
10
9
  throw new Error("Modal compound components must be used within a Modal");
11
- return e;
12
- }, a = ({ children: e, className: d }) => {
13
- const { onClose: n } = F();
14
- return /* @__PURE__ */ c("div", { className: l("ui-modal-header", d), children: [
15
- /* @__PURE__ */ r("h3", { className: "ui-modal-title", children: e }),
16
- /* @__PURE__ */ r(
10
+ return o;
11
+ }, n = ({ children: o, className: t }) => {
12
+ const { onClose: a } = L();
13
+ return /* @__PURE__ */ r("div", { className: d("ui-modal-header", t), children: [
14
+ /* @__PURE__ */ e("h3", { className: "ui-modal-title", children: o }),
15
+ /* @__PURE__ */ e(
17
16
  "button",
18
17
  {
19
18
  className: "ui-modal-close",
20
- onClick: n,
19
+ onClick: a,
21
20
  "aria-label": "Close modal",
22
- children: /* @__PURE__ */ c("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
23
- /* @__PURE__ */ r("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
24
- /* @__PURE__ */ r("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
21
+ children: /* @__PURE__ */ r("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
22
+ /* @__PURE__ */ e("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
23
+ /* @__PURE__ */ e("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
25
24
  ] })
26
25
  }
27
26
  )
28
27
  ] });
29
- }, i = ({ children: e, className: d }) => /* @__PURE__ */ r("div", { className: l("ui-modal-body", d), children: e }), s = ({ children: e, className: d }) => /* @__PURE__ */ r("div", { className: l("ui-modal-footer", d), children: e }), m = ({
30
- isOpen: e,
31
- onClose: d,
32
- title: n,
33
- children: u,
34
- footer: y,
28
+ }, i = ({ children: o, className: t }) => /* @__PURE__ */ e("div", { className: d("ui-modal-body", t), children: o }), s = ({ children: o, className: t }) => /* @__PURE__ */ e("div", { className: d("ui-modal-footer", t), children: o }), v = ({
29
+ isOpen: o,
30
+ onClose: t,
31
+ title: a,
32
+ children: c,
33
+ footer: m,
35
34
  size: x = "md",
36
- className: N,
37
- closeOnBackdropClick: g = !0
35
+ className: M,
36
+ closeOnBackdropClick: k = !0
38
37
  }) => {
39
- const p = B(null), [k, f] = R(e);
40
- h(() => {
41
- e && f(!0);
42
- }, [e]);
43
- const M = () => {
44
- e || f(!1);
38
+ const u = C(null), [N, y] = B(o);
39
+ f(() => {
40
+ o && y(!0);
41
+ }, [o]);
42
+ const b = () => {
43
+ o || y(!1);
45
44
  };
46
- if (h(() => {
47
- const t = (w) => {
48
- w.key === "Escape" && d();
45
+ if (f(() => {
46
+ const l = (w) => {
47
+ w.key === "Escape" && t();
49
48
  };
50
- return e && (document.addEventListener("keydown", t), document.body.style.overflow = "hidden"), () => {
51
- document.removeEventListener("keydown", t), document.body.style.overflow = "";
49
+ return o && (document.addEventListener("keydown", l), document.body.style.overflow = "hidden"), () => {
50
+ document.removeEventListener("keydown", l), document.body.style.overflow = "";
52
51
  };
53
- }, [e, d]), !k) return null;
54
- const b = (t) => {
55
- g && t.target === p.current && d();
52
+ }, [o, t]), !N) return null;
53
+ const p = (l) => {
54
+ k && l.target === u.current && t();
56
55
  };
57
- return j(
58
- /* @__PURE__ */ r(v.Provider, { value: { onClose: d }, children: /* @__PURE__ */ r(
56
+ return F(
57
+ /* @__PURE__ */ e(h.Provider, { value: { onClose: t }, children: /* @__PURE__ */ e(
59
58
  "div",
60
59
  {
61
- className: l("ui-modal-overlay", !e && "ui-modal-closing"),
62
- ref: p,
63
- onClick: b,
64
- onAnimationEnd: M,
65
- children: /* @__PURE__ */ r(
60
+ className: d("ui-modal-overlay", !o && "ui-modal-closing"),
61
+ ref: u,
62
+ onClick: p,
63
+ onAnimationEnd: b,
64
+ children: /* @__PURE__ */ e(
66
65
  "div",
67
66
  {
68
- className: l(
67
+ className: d(
69
68
  "ui-modal",
70
69
  `ui-modal-${x}`,
71
- !e && "ui-modal-closing",
72
- N
70
+ !o && "ui-modal-closing",
71
+ M
73
72
  ),
74
73
  role: "dialog",
75
74
  "aria-modal": "true",
76
- children: n ? /* @__PURE__ */ c(C, { children: [
77
- /* @__PURE__ */ r(a, { children: n }),
78
- /* @__PURE__ */ r(i, { children: u }),
79
- y && /* @__PURE__ */ r(s, { children: y })
80
- ] }) : u
75
+ children: a ? /* @__PURE__ */ r(g, { children: [
76
+ /* @__PURE__ */ e(n, { children: a }),
77
+ /* @__PURE__ */ e(i, { children: c }),
78
+ m && /* @__PURE__ */ e(s, { children: m })
79
+ ] }) : c
81
80
  }
82
81
  )
83
82
  }
84
83
  ) }),
85
84
  document.body
86
85
  );
87
- }, V = Object.assign(m, {
88
- Header: a,
86
+ }, I = Object.assign(v, {
87
+ Header: n,
89
88
  Body: i,
90
89
  Footer: s
91
90
  });
92
- m.displayName = "Modal";
93
- a.displayName = "ModalHeader";
91
+ v.displayName = "Modal";
92
+ n.displayName = "ModalHeader";
94
93
  i.displayName = "ModalBody";
95
94
  s.displayName = "ModalFooter";
96
- m.propTypes = {
97
- isOpen: o.bool.isRequired,
98
- onClose: o.func.isRequired,
99
- title: o.node,
100
- children: o.node,
101
- footer: o.node,
102
- size: o.oneOf(["sm", "md", "lg", "xl"]),
103
- className: o.string,
104
- closeOnBackdropClick: o.bool
105
- };
106
- a.propTypes = {
107
- children: o.node,
108
- className: o.string
109
- };
110
- i.propTypes = {
111
- children: o.node,
112
- className: o.string
113
- };
114
- s.propTypes = {
115
- children: o.node,
116
- className: o.string
117
- };
118
95
  export {
119
- V as Modal,
96
+ I as Modal,
120
97
  i as ModalBody,
121
98
  s as ModalFooter,
122
- a as ModalHeader
99
+ n as ModalHeader
123
100
  };
@@ -1,52 +1,36 @@
1
- import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as t } from "react";
3
- import { clsx as c } from "clsx";
4
- import * as r from "prop-types";
1
+ import { jsxs as t, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as p } from "react";
3
+ import { clsx as l } from "clsx";
5
4
  /* empty css */
6
- const e = t(
7
- ({ className: s, label: a, error: u, disabled: i, size: d = "md", variant: n = "primary", ...l }, m) => /* @__PURE__ */ p(
5
+ const u = p(
6
+ ({ className: o, label: a, error: c, disabled: r, size: s = "md", variant: d = "primary", ...e }, m) => /* @__PURE__ */ t(
8
7
  "label",
9
8
  {
10
- className: c(
9
+ className: l(
11
10
  "ui-radio-label",
11
+ `ui-radio-${s}`,
12
12
  `ui-radio-${d}`,
13
- `ui-radio-${n}`,
14
- i && "ui-radio-disabled",
15
- s
13
+ r && "ui-radio-disabled",
14
+ o
16
15
  ),
17
16
  children: [
18
- /* @__PURE__ */ o(
17
+ /* @__PURE__ */ i(
19
18
  "input",
20
19
  {
21
20
  type: "radio",
22
21
  className: "ui-radio-input",
23
- disabled: i,
22
+ disabled: r,
24
23
  ref: m,
25
- ...l
24
+ ...e
26
25
  }
27
26
  ),
28
- /* @__PURE__ */ o("span", { className: "ui-radio-custom", children: /* @__PURE__ */ o("span", { className: "ui-radio-dot" }) }),
29
- a && /* @__PURE__ */ o("span", { className: "ui-radio-text", children: a })
27
+ /* @__PURE__ */ i("span", { className: "ui-radio-custom", children: /* @__PURE__ */ i("span", { className: "ui-radio-dot" }) }),
28
+ a && /* @__PURE__ */ i("span", { className: "ui-radio-text", children: a })
30
29
  ]
31
30
  }
32
31
  )
33
32
  );
34
- e.displayName = "Radio";
35
- e.propTypes = {
36
- label: r.node,
37
- error: r.bool,
38
- size: r.oneOf(["sm", "md", "lg", "xl"]),
39
- variant: r.oneOf(["primary", "success", "warning", "danger"]),
40
- checked: r.bool,
41
- defaultChecked: r.bool,
42
- onChange: r.func,
43
- name: r.string,
44
- value: r.oneOfType([r.string, r.number]),
45
- disabled: r.bool,
46
- required: r.bool,
47
- id: r.string,
48
- className: r.string
49
- };
33
+ u.displayName = "Radio";
50
34
  export {
51
- e as Radio
35
+ u as Radio
52
36
  };