stargazer-ui 1.0.3 → 1.0.4

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,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export type BaseAnchorType = React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
3
3
  export type BaseButtonType = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
4
+ export type BaseDialogType = React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
4
5
  export type BaseDivType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
5
6
  export type BaseFormType = React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
6
7
  export type BaseHeadingType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
@@ -8,8 +9,11 @@ export type BaseInputType = React.DetailedHTMLProps<React.InputHTMLAttributes<HT
8
9
  export type BaseHrType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
9
10
  export type BaseLabelType = React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
10
11
  export type BaseLItemType = React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
12
+ export type BaseNavType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
11
13
  export type BaseParagraphType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
12
14
  export type BaseSelectType = React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
13
15
  export type BaseSmallType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
14
16
  export type BaseSpanType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
17
+ export type BaseTableType = React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
15
18
  export type BaseUListType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
19
+ export type BaseElementType = React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { BaseButtonType } from "../BaseTypes";
3
3
  export type ButtonType = {
4
- children: typeof React.Children;
4
+ children: React.ReactNode;
5
5
  variant?: string;
6
6
  className?: string;
7
7
  } & BaseButtonType;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { BaseDivType, BaseAnchorType, BaseButtonType, BaseUListType, BaseHrType } from "../BaseTypes";
2
+ import { BaseDivType, BaseAnchorType, BaseButtonType, BaseUListType, BaseHrType, BaseElementType } from "../BaseTypes";
3
3
  export type DropdownContextType = {
4
4
  align: string;
5
5
  drop: string;
@@ -23,6 +23,10 @@ export type DropdownContextType = {
23
23
  }>>;
24
24
  };
25
25
  export declare const DropdownContext: React.Context<DropdownContextType | null>;
26
+ export declare const DropdownContextProvider: ({ children, value }: {
27
+ children: React.ReactNode;
28
+ value: DropdownContextType;
29
+ }) => import("react/jsx-runtime").JSX.Element;
26
30
  export declare const useDropdownContext: () => DropdownContextType;
27
31
  export type DropdownType = {
28
32
  children: React.ReactNode;
@@ -41,7 +45,7 @@ export type DropdownToggleType = {
41
45
  navDropdown?: boolean;
42
46
  as?: React.ElementType;
43
47
  variant?: string;
44
- } & (BaseAnchorType | BaseButtonType);
48
+ } & (BaseAnchorType | BaseButtonType | BaseElementType);
45
49
  export declare const Toggle: React.ForwardRefExoticComponent<(Omit<{
46
50
  children: React.ReactNode;
47
51
  className?: string | undefined;
@@ -54,7 +58,13 @@ export declare const Toggle: React.ForwardRefExoticComponent<(Omit<{
54
58
  navDropdown?: boolean | undefined;
55
59
  as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
56
60
  variant?: string | undefined;
57
- } & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
61
+ } & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref"> | Omit<{
62
+ children: React.ReactNode;
63
+ className?: string | undefined;
64
+ navDropdown?: boolean | undefined;
65
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
66
+ variant?: string | undefined;
67
+ } & React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement>, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
58
68
  export type DropdownMenuType = {
59
69
  children: React.ReactNode;
60
70
  className?: string;
@@ -92,7 +102,13 @@ declare const _default: React.ForwardRefExoticComponent<Omit<DropdownType, "ref"
92
102
  navDropdown?: boolean | undefined;
93
103
  as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
94
104
  variant?: string | undefined;
95
- } & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
105
+ } & React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "ref"> | Omit<{
106
+ children: React.ReactNode;
107
+ className?: string | undefined;
108
+ navDropdown?: boolean | undefined;
109
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
110
+ variant?: string | undefined;
111
+ } & React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement>, "ref">) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
96
112
  Menu: React.ForwardRefExoticComponent<Omit<DropdownMenuType, "ref"> & React.RefAttributes<HTMLUListElement>>;
97
113
  Item: React.ForwardRefExoticComponent<(Omit<{
98
114
  children: React.ReactNode;
@@ -1,9 +1,9 @@
1
1
  import { jsx as v } from "react/jsx-runtime";
2
2
  import { createContext as D, forwardRef as E, useState as y, useMemo as $, useEffect as C, useLayoutEffect as A, useContext as P } from "react";
3
3
  const L = (d, o, r = !1) => {
4
- const u = r ? "top-end" : "top-start", m = r ? "top-start" : "top-end", i = r ? "bottom-end" : "bottom-start", h = r ? "bottom-start" : "bottom-end", g = r ? "right-start" : "left-start", a = r ? "right-end" : "left-end", w = r ? "left-start" : "right-start", l = r ? "left-end" : "right-end";
4
+ const u = r ? "top-end" : "top-start", m = r ? "top-start" : "top-end", i = r ? "bottom-end" : "bottom-start", h = r ? "bottom-start" : "bottom-end", g = r ? "right-start" : "left-start", c = r ? "right-end" : "left-end", w = r ? "left-start" : "right-start", l = r ? "left-end" : "right-end";
5
5
  let n = d ? h : i;
6
- return o === "up" ? n = d ? m : u : o === "end" ? n = d ? l : w : o === "start" ? n = d ? a : g : o === "down-centered" ? n = "bottom" : o === "up-centered" && (n = "top"), n;
6
+ return o === "up" ? n = d ? m : u : o === "end" ? n = d ? l : w : o === "start" ? n = d ? c : g : o === "down-centered" ? n = "bottom" : o === "up-centered" && (n = "top"), n;
7
7
  }, k = (d, o = "") => {
8
8
  let r = d.target, u = !0, m = !1;
9
9
  for (; u; )
@@ -25,16 +25,16 @@ const L = (d, o, r = !1) => {
25
25
  drop: i = "down",
26
26
  align: h = "start",
27
27
  autoClose: g = !0,
28
- show: a = "default",
28
+ show: c = "default",
29
29
  ...w
30
30
  }, l) => {
31
- const [n, e] = y(a && !1), [f, b] = y({ case: "" }), c = (B) => {
31
+ const [n, e] = y(c === "default" ? !1 : c), [f, b] = y({ case: "" }), a = (B) => {
32
32
  B.stopPropagation(), e((S) => !S);
33
33
  }, s = L(h === "end", i), p = $(() => ({
34
34
  align: h,
35
35
  drop: i,
36
- showInternal: a != "default" && u ? a : n,
37
- handleToggle: a != "default" && u ? u : c,
36
+ showInternal: c != "default" && u ? c : n,
37
+ handleToggle: c != "default" && u ? u : a,
38
38
  placement: s,
39
39
  directionClasses: {
40
40
  down: "dropdown",
@@ -47,17 +47,17 @@ const L = (d, o, r = !1) => {
47
47
  controlId: m,
48
48
  activeDescendant: f,
49
49
  setActiveDescendant: b
50
- }), [h, i, a, n, u, s, m, f, b]);
50
+ }), [h, i, c, n, u, s, m, f, b]);
51
51
  return /* @__PURE__ */ v("div", { id: m + "-wrapper", ref: l, className: `sg-dropdown${o ? " " + o : ""}`, ...w, children: /* @__PURE__ */ v(M, { value: p, children: d }) });
52
52
  }), q = E(({ children: d, className: o, navDropdown: r = !1, as: u = "button", variant: m = "primary", ...i }, h) => {
53
- const { controlId: g, handleToggle: a, setActiveDescendant: w, showInternal: l } = x(), n = u, e = (t) => {
53
+ const { controlId: g, handleToggle: c, setActiveDescendant: w, showInternal: l } = x(), n = u, e = (t) => {
54
54
  let s = !1;
55
55
  switch (console.log(t.key), t.key) {
56
56
  case "ArrowDown":
57
- s = !0, l ? w((p) => ({ ...p, case: "next" })) : (a(t), w((p) => ({ ...p, case: "first" })));
57
+ s = !0, l ? w((p) => ({ ...p, case: "next" })) : (c(t), w((p) => ({ ...p, case: "first" })));
58
58
  break;
59
59
  case "ArrowUp":
60
- s = !0, l ? w((p) => ({ ...p, case: "previous" })) : (a(t), w((p) => ({ ...p, case: "last" })));
60
+ s = !0, l ? w((p) => ({ ...p, case: "previous" })) : (c(t), w((p) => ({ ...p, case: "last" })));
61
61
  break;
62
62
  case "Home":
63
63
  s = !0, l && w((p) => ({ ...p, case: "first" }));
@@ -66,15 +66,15 @@ const L = (d, o, r = !1) => {
66
66
  s = !0, l && w((p) => ({ ...p, case: "last" }));
67
67
  break;
68
68
  case "Tab":
69
- l && a(t);
69
+ l && c(t);
70
70
  break;
71
71
  case "Escape":
72
- s = !0, l && a(t);
72
+ s = !0, l && c(t);
73
73
  break;
74
74
  case "Enter":
75
75
  case " ":
76
76
  if (l) {
77
- s = !0, document.querySelector(".sg-dropdown-item-visual-focus").click(), a(t);
77
+ s = !0, document.querySelector(".sg-dropdown-item-visual-focus").click(), c(t);
78
78
  break;
79
79
  } else {
80
80
  w((p) => ({ ...p, case: "first" }));
@@ -85,9 +85,9 @@ const L = (d, o, r = !1) => {
85
85
  }, f = (t) => {
86
86
  if (l && t.target.id !== g) {
87
87
  if (!k(t, g))
88
- a(t);
88
+ c(t);
89
89
  else if (k(t, g)) {
90
- a(t);
90
+ c(t);
91
91
  const s = document.getElementById(g);
92
92
  s == null || s.focus();
93
93
  }
@@ -100,10 +100,10 @@ const L = (d, o, r = !1) => {
100
100
  };
101
101
  }, [e, g]);
102
102
  const b = (t) => {
103
- a(t), l || w((s) => ({ ...s, case: "first" }));
103
+ c(t), l || w((s) => ({ ...s, case: "first" }));
104
104
  };
105
- let c = `sg-button sg-button${m ? "-" + m : "-primary"} sg-dropdown-toggle${o ? " " + o : ""}`;
106
- return (n === "a" || r) && (c = `sg-nav-dropdown-toggle sg-dropdown-toggle${o ? " " + o : ""}`), /* @__PURE__ */ v(
105
+ let a = `sg-button sg-button${m ? "-" + m : "-primary"} sg-dropdown-toggle${o ? " " + o : ""}`;
106
+ return (n === "a" || r) && (a = `sg-nav-dropdown-toggle sg-dropdown-toggle${o ? " " + o : ""}`), /* @__PURE__ */ v(
107
107
  n,
108
108
  {
109
109
  tabIndex: "0",
@@ -113,14 +113,14 @@ const L = (d, o, r = !1) => {
113
113
  "aria-expanded": l,
114
114
  id: g,
115
115
  ref: h,
116
- className: c,
116
+ className: a,
117
117
  onClick: (t) => b(t),
118
118
  ...i,
119
119
  children: d
120
120
  }
121
121
  );
122
122
  }), j = E(({ children: d, className: o, style: r = {}, ...u }, m) => {
123
- const { controlId: i, showInternal: h, activeDescendant: g } = x(), [a, w] = y(r);
123
+ const { controlId: i, showInternal: h, activeDescendant: g } = x(), [c, w] = y(r);
124
124
  A(() => {
125
125
  if (h) {
126
126
  const n = document.getElementById(i + "-menu");
@@ -130,39 +130,39 @@ const L = (d, o, r = !1) => {
130
130
  }, [h]), C(() => {
131
131
  if (h) {
132
132
  const n = document.getElementById(i + "-menu"), e = document.getElementById(i + "-menu").children, f = e.length - 1, b = document.querySelector(".sg-dropdown-item-visual-focus");
133
- let c = 0, t = e[0].children[0];
133
+ let a = 0, t = e[0].children[0];
134
134
  if (b != null) {
135
135
  b.classList.remove("sg-dropdown-item-visual-focus");
136
136
  for (let s = 0; s < e.length; s++)
137
137
  if (e[s] === b.parentElement) {
138
- c = s;
138
+ a = s;
139
139
  break;
140
140
  }
141
141
  }
142
142
  switch (g.case) {
143
143
  case "first":
144
- t = e[0].children[0], c = 0;
144
+ t = e[0].children[0], a = 0;
145
145
  break;
146
146
  case "last":
147
- t = e[f].children[0], c = f;
147
+ t = e[f].children[0], a = f;
148
148
  break;
149
149
  case "next":
150
- c = c === f ? 0 : c + 1, t = e[c].children[0];
150
+ a = a === f ? 0 : a + 1, t = e[a].children[0];
151
151
  break;
152
152
  case "previous":
153
- c = c === 0 ? f : c - 1, t = e[c].children[0];
153
+ a = a === 0 ? f : a - 1, t = e[a].children[0];
154
154
  break;
155
155
  }
156
- n.setAttribute("aria-activedescendant", t.id), e[c].children[0].classList.add("sg-dropdown-item-visual-focus");
156
+ n.setAttribute("aria-activedescendant", t.id), e[a].children[0].classList.add("sg-dropdown-item-visual-focus");
157
157
  } else
158
158
  document.getElementById(i + "-menu").setAttribute("aria-activedescendant", "");
159
159
  }, [i, h, g]);
160
160
  const l = (n) => {
161
- var c;
161
+ var a;
162
162
  const e = n.target;
163
163
  let f = e.classList.contains("sg-dropdown-item-visual-focus");
164
164
  const b = document.getElementById(i + "-menu");
165
- f || ((c = document.querySelector(".sg-dropdown-item-visual-focus")) == null || c.classList.remove("sg-dropdown-item-visual-focus"), b.setAttribute("aria-activedescendant", ""), e.classList.add("sg-dropdown-item-visual-focus"), b.setAttribute("aria-activedescendant", e.id));
165
+ f || ((a = document.querySelector(".sg-dropdown-item-visual-focus")) == null || a.classList.remove("sg-dropdown-item-visual-focus"), b.setAttribute("aria-activedescendant", ""), e.classList.add("sg-dropdown-item-visual-focus"), b.setAttribute("aria-activedescendant", e.id));
166
166
  };
167
167
  return C(() => {
168
168
  const n = document.getElementById(i + "-menu");
@@ -181,7 +181,7 @@ const L = (d, o, r = !1) => {
181
181
  "aria-labelledby": i,
182
182
  ref: m,
183
183
  className: `sg-dropdown-list${o ? " " + o : ""}${h ? " show" : ""}`,
184
- style: a,
184
+ style: c,
185
185
  ...u,
186
186
  children: d
187
187
  }
@@ -196,6 +196,7 @@ const L = (d, o, r = !1) => {
196
196
  export {
197
197
  V as Divider,
198
198
  I as DropdownContext,
199
+ M as DropdownContextProvider,
199
200
  H as Item,
200
201
  j as Menu,
201
202
  q as Toggle,
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { BaseLabelType } from "../BaseTypes";
3
+ export type FloatingLabelType = {
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ htmlFor?: string;
7
+ label: string;
8
+ controlId: string;
9
+ } & BaseLabelType;
10
+ declare const FloatingLabel: React.ForwardRefExoticComponent<Omit<FloatingLabelType, "ref"> & React.RefAttributes<HTMLLabelElement>>;
11
+ export default FloatingLabel;
@@ -1,13 +1,13 @@
1
- import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
- import { forwardRef as s, useMemo as i } from "react";
3
- import { FormContext as f } from "../Form/index.js";
4
- const u = s(({ children: e, label: t, controlId: l, ...a }, m) => {
5
- const o = i(() => ({ controlId: l }));
6
- return /* @__PURE__ */ r(f.Provider, { value: o, children: /* @__PURE__ */ n("div", { className: "sg-form-floating", children: [
7
- e,
8
- /* @__PURE__ */ r("label", { ref: m, htmlFor: o.controlId, className: "sg-form-floating-label", ...a, children: t })
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { forwardRef as i, useMemo as f } from "react";
3
+ import { FormContextProvider as n } from "../Form/index.js";
4
+ const x = i(({ children: o, label: a, controlId: r, className: c, htmlFor: d, ...l }, t) => {
5
+ const m = f(() => ({ controlId: r }), [r]);
6
+ return /* @__PURE__ */ e(n, { value: m, children: /* @__PURE__ */ s("div", { className: "sg-form-floating", children: [
7
+ o,
8
+ /* @__PURE__ */ e("label", { ref: t, htmlFor: r, className: "sg-form-floating-label", ...l, children: a })
9
9
  ] }) });
10
10
  });
11
11
  export {
12
- u as default
12
+ x as default
13
13
  };
@@ -4,6 +4,10 @@ export type FormContextType = {
4
4
  controlId: string;
5
5
  };
6
6
  export declare const FormContext: React.Context<FormContextType | null>;
7
+ export declare const FormContextProvider: ({ children, value }: {
8
+ children: React.ReactNode;
9
+ value: FormContextType;
10
+ }) => import("react/jsx-runtime").JSX.Element;
7
11
  export declare const useFormContext: () => FormContextType;
8
12
  export type FormType = {
9
13
  children: React.ReactNode;
@@ -57,6 +57,7 @@ const w = b(null), H = ({ children: e, value: t }) => /* @__PURE__ */ n(w.Provid
57
57
  });
58
58
  export {
59
59
  w as FormContext,
60
+ H as FormContextProvider,
60
61
  z as default,
61
62
  g as useFormContext
62
63
  };
@@ -0,0 +1,19 @@
1
+ import { jsx as C } from "react/jsx-runtime";
2
+ import { forwardRef as h } from "react";
3
+ const j = ({ children: u, as: i = "div", className: d = "", ...o }, p) => {
4
+ const g = i, m = ["xxl", "xl", "lg", "md", "sm", "xs"], x = "xs";
5
+ let n = "", c = "", r = [];
6
+ m.forEach((e) => {
7
+ const t = o[e];
8
+ delete o[e];
9
+ let l, f, a;
10
+ typeof t == "object" && t != null ? { span: l, offset: f, order: a } = t : l = t;
11
+ const s = e !== x ? `-${e}` : "";
12
+ l && (c += l === !0 ? ` sg-col${s}` : ` sg-col${s}-${l}`, r.push(l === !0 ? ` sg-col${s}` : ` sg-col${s}-${l}`)), a != null && (n += ` order${s}-${a}`), f != null && (n += ` offset${s}-${f}`);
13
+ });
14
+ let $ = d + n + c;
15
+ return $ += r.length ? "" : " sg-col", /* @__PURE__ */ C(g, { ref: p, className: $, ...o, children: u });
16
+ }, v = h(j);
17
+ export {
18
+ v as default
19
+ };
@@ -0,0 +1,9 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as s } from "react";
3
+ const l = ({ children: e, className: o, fluid: r, ...f }, i) => {
4
+ let t = "sg-container", n = typeof r == "string" ? `-${r}` : "-fluid";
5
+ return /* @__PURE__ */ a("div", { ref: i, className: `${r ? t + n : t} ${o}`, ...f, children: e });
6
+ }, d = s(l);
7
+ export {
8
+ d as default
9
+ };
@@ -0,0 +1,17 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { forwardRef as x } from "react";
3
+ const $ = ({ children: n, className: c = "", as: f = "div", ...t }, a) => {
4
+ const r = f, m = ["xxl", "xl", "lg", "md", "sm", "xs"], d = "xs";
5
+ let e = "";
6
+ return m.forEach((o) => {
7
+ const l = t[o];
8
+ delete t[o];
9
+ let s;
10
+ l != null && typeof l == "object" ? { cols: s } = l : s = l;
11
+ const i = o !== d ? `-${o}` : "";
12
+ s != null && (e += ` sg-row-cols${i}-${s}`);
13
+ }), /* @__PURE__ */ u(r, { ref: a, className: `sg-row ${c}${e}`, ...t, children: n });
14
+ }, g = x($);
15
+ export {
16
+ g as default
17
+ };
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { BaseDivType } from "../BaseTypes";
3
+ export type InputGroupType = {
4
+ children: React.ReactNode;
5
+ className?: string;
6
+ } & BaseDivType;
7
+ export type InputGroupText = {
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ };
11
+ declare const _default: React.ForwardRefExoticComponent<Omit<InputGroupType, "ref"> & React.RefAttributes<HTMLDivElement>> & {
12
+ Text: React.ForwardRefExoticComponent<InputGroupText & React.RefAttributes<HTMLSpanElement>>;
13
+ };
14
+ export default _default;
@@ -1,7 +1,8 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { forwardRef as e } from "react";
3
- const n = e(({ children: r, className: t, ...o }, p) => /* @__PURE__ */ u("div", { ref: p, className: `sg-input-group${t ? " " + t : ""}`, ...o, children: r })), s = ({ children: r, className: t, ...o }, p) => /* @__PURE__ */ u("span", { ref: p, className: `sg-input-group-text${t ? " " + t : ""}`, ...o, children: r });
4
- n.Text = e(s);
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { forwardRef as s } from "react";
3
+ const e = s(({ children: r, className: t, ...o }, n) => /* @__PURE__ */ p("div", { ref: n, className: `sg-input-group${t ? " " + t : ""}`, ...o, children: r })), u = s(({ children: r, className: t, ...o }, n) => /* @__PURE__ */ p("span", { ref: n, className: `sg-input-group-text${t ? " " + t : ""}`, ...o, children: r })), f = Object.assign(e, {
4
+ Text: u
5
+ });
5
6
  export {
6
- n as default
7
+ f as default
7
8
  };
@@ -0,0 +1,70 @@
1
+ import React from "react";
2
+ import { BaseDialogType, BaseDivType, BaseHeadingType, BaseSpanType } from "../BaseTypes";
3
+ export type ModalContextType = Function | null;
4
+ export type ModalType = {
5
+ children: React.ReactNode;
6
+ className?: string;
7
+ id?: string;
8
+ centered?: boolean;
9
+ size?: string;
10
+ show: boolean;
11
+ backdrop?: string;
12
+ onHide: Function;
13
+ } & BaseDialogType;
14
+ export type ModalHeaderType = {
15
+ children: React.ReactNode;
16
+ as?: React.ElementType;
17
+ className?: string;
18
+ closeButton?: boolean;
19
+ onClick?: (event: React.MouseEvent) => void;
20
+ } & (BaseDivType | BaseHeadingType | BaseSpanType);
21
+ export type ModalTitleType = {
22
+ children: React.ReactNode;
23
+ as?: React.ElementType;
24
+ className?: string;
25
+ } & (BaseDivType | BaseHeadingType | BaseSpanType);
26
+ export type ModalBodyType = {
27
+ children: React.ReactNode;
28
+ className?: string;
29
+ } & BaseDivType;
30
+ export type ModalFooterType = {
31
+ children: React.ReactNode;
32
+ className?: string;
33
+ } & BaseDivType;
34
+ declare const _default: (({ children, centered, size, show, backdrop, onHide, className, id, ...restProps }: ModalType) => React.ReactPortal) & {
35
+ Header: React.ForwardRefExoticComponent<(Omit<{
36
+ children: React.ReactNode;
37
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
38
+ className?: string | undefined;
39
+ closeButton?: boolean | undefined;
40
+ onClick?: ((event: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
41
+ } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> | Omit<{
42
+ children: React.ReactNode;
43
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
44
+ className?: string | undefined;
45
+ closeButton?: boolean | undefined;
46
+ onClick?: ((event: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
47
+ } & React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "ref"> | Omit<{
48
+ children: React.ReactNode;
49
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
50
+ className?: string | undefined;
51
+ closeButton?: boolean | undefined;
52
+ onClick?: ((event: React.MouseEvent<Element, MouseEvent>) => void) | undefined;
53
+ } & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement>, "ref">) & React.RefAttributes<HTMLDivElement | HTMLHeadingElement | HTMLSpanElement>>;
54
+ Title: React.ForwardRefExoticComponent<(Omit<{
55
+ children: React.ReactNode;
56
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
57
+ className?: string | undefined;
58
+ } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, "ref"> | Omit<{
59
+ children: React.ReactNode;
60
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
61
+ className?: string | undefined;
62
+ } & React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement>, "ref"> | Omit<{
63
+ children: React.ReactNode;
64
+ as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
65
+ className?: string | undefined;
66
+ } & React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement>, "ref">) & React.RefAttributes<HTMLDivElement | HTMLHeadingElement | HTMLSpanElement>>;
67
+ Body: React.ForwardRefExoticComponent<Omit<ModalBodyType, "ref"> & React.RefAttributes<HTMLDivElement>>;
68
+ Footer: React.ForwardRefExoticComponent<Omit<ModalBodyType, "ref"> & React.RefAttributes<HTMLDivElement>>;
69
+ };
70
+ export default _default;