@adgytec/adgytec-web-ui-components 0.0.11 → 0.0.13

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.
@@ -0,0 +1,50 @@
1
+ import { jsx as s, Fragment as m, jsxs as n } from "react/jsx-runtime";
2
+ import { L as b } from "./Loader-CLMHp6L7.js";
3
+ import { TriangleAlert as t, Check as g } from "lucide-react";
4
+ import './assets/ButtonChild.css';var a = /* @__PURE__ */ ((e) => (e.enabled = "enabled", e.disabled = "disabled", e.pending = "pending", e.completed = "completed", e.error = "error", e))(a || {});
5
+ const c = {
6
+ "with-icon": "_with-icon_1rah3_1"
7
+ }, x = ({ buttonState: e, value: d }) => {
8
+ const {
9
+ enabled: i,
10
+ disabled: l = i,
11
+ pending: o = i,
12
+ completed: p = i,
13
+ error: h = "Try again"
14
+ } = d;
15
+ let r;
16
+ switch (e) {
17
+ case a.enabled:
18
+ r = i;
19
+ break;
20
+ case a.disabled:
21
+ r = l;
22
+ break;
23
+ case a.pending:
24
+ r = /* @__PURE__ */ n("span", { className: c["with-icon"], children: [
25
+ /* @__PURE__ */ s(b, {}),
26
+ " ",
27
+ o
28
+ ] });
29
+ break;
30
+ case a.completed:
31
+ r = /* @__PURE__ */ n("span", { className: c["with-icon"], children: [
32
+ /* @__PURE__ */ s(g, {}),
33
+ " ",
34
+ p
35
+ ] });
36
+ break;
37
+ case a.error:
38
+ r = /* @__PURE__ */ n("span", { className: c["with-icon"], children: [
39
+ /* @__PURE__ */ s(t, {}),
40
+ " ",
41
+ h
42
+ ] });
43
+ break;
44
+ }
45
+ return /* @__PURE__ */ s(m, { children: r });
46
+ };
47
+ export {
48
+ x as B,
49
+ a
50
+ };
@@ -0,0 +1,8 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { LoaderCircle as r } from "lucide-react";
3
+ import './assets/Loader.css';const e = "_loader_1u883_1", a = {
4
+ loader: e
5
+ }, l = () => /* @__PURE__ */ o(r, { className: a.loader });
6
+ export {
7
+ l as L
8
+ };
@@ -0,0 +1 @@
1
+ ._with-icon_1rah3_1{display:flex;gap:.5em;align-items:center;justify-content:space-between}._with-icon_1rah3_1 svg{width:1.125em;height:1.125em}
@@ -0,0 +1 @@
1
+ ._loader_1u883_1{animation:_loader_1u883_1 1s infinite linear}@keyframes _loader_1u883_1{0%{rotate:0deg}to{rotate:360deg}}
@@ -0,0 +1,2 @@
1
+ import { ButtonChildProps } from './types';
2
+ export declare const ButtonChild: ({ buttonState, value }: ButtonChildProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './ButtonChild';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { B as o, a as B } from "../../ButtonChild-BTPuUMU5.js";
2
+ export {
3
+ o as ButtonChild,
4
+ B as ButtonState
5
+ };
@@ -0,0 +1,18 @@
1
+ export declare enum ButtonState {
2
+ enabled = "enabled",
3
+ disabled = "disabled",
4
+ pending = "pending",
5
+ completed = "completed",
6
+ error = "error"
7
+ }
8
+ export interface ButtonStateText {
9
+ enabled: string;
10
+ disabled?: string;
11
+ pending?: string;
12
+ completed?: string;
13
+ error?: string;
14
+ }
15
+ export interface ButtonChildProps {
16
+ buttonState: ButtonState;
17
+ value: ButtonStateText;
18
+ }
@@ -1,8 +1,8 @@
1
1
  import { FormProps as AriaFormProps } from 'react-aria-components';
2
2
  import * as z from "zod";
3
3
  export type FormReset = () => void;
4
- export type submitHandler<T> = (values: T, reset: FormReset) => void | Promise<void> | Promise<Partial<Record<keyof T, string | string[]>>>;
4
+ export type SubmitHandler<T> = (values: T, reset: FormReset) => void | Promise<void | Partial<Record<keyof T, string | string[]>>>;
5
5
  export interface FormProps<T extends z.ZodObject<any>> extends Omit<AriaFormProps, "onSubmit" | "validationErrors"> {
6
6
  schema: T;
7
- onSubmit: submitHandler<z.infer<T>>;
7
+ onSubmit: SubmitHandler<z.infer<T>>;
8
8
  }
@@ -0,0 +1 @@
1
+ export declare const Loader: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Loader';
@@ -0,0 +1,4 @@
1
+ import { L as a } from "../../Loader-CLMHp6L7.js";
2
+ export {
3
+ a as Loader
4
+ };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './utils/types';
2
2
  export * from './components/Avatar';
3
3
  export * from './components/Button';
4
+ export * from './components/ButtonChild';
4
5
  export * from './components/Disclosure/Disclosure';
5
6
  export * from './components/Disclosure/DisclousureGroup';
6
7
  export * from './components/Error';
@@ -8,6 +9,7 @@ export * from './components/Form/Form';
8
9
  export * from './components/Form/Input';
9
10
  export * from './components/Form/TextArea';
10
11
  export * from './components/Link';
12
+ export * from './components/Loader';
11
13
  export * from './components/Menu';
12
14
  export * from './components/Modal';
13
15
  export * from './components/Modal/ModalAction';
package/dist/index.js CHANGED
@@ -1,64 +1,69 @@
1
- import { C as e } from "./types-C1YOMbh5.js";
1
+ import { C as t } from "./types-C1YOMbh5.js";
2
2
  import { A as s, a as p, b as m } from "./Avatar-BRt91J0i.js";
3
3
  import { a as i, B as n } from "./useSplash-DOL9j-2c.js";
4
4
  import { F as u, O as l } from "./OutlinedButton-BcGOfKx6.js";
5
- import { T as S } from "./TextButton-CmbDjZsQ.js";
6
- import { D as M } from "./Disclosure-BUNppuMs.js";
7
- import { D as b } from "./DisclousreGroup-3n2noZn8.js";
8
- import { E as v } from "./Error--Jbz8Uoy.js";
5
+ import { T as B } from "./TextButton-CmbDjZsQ.js";
6
+ import { B as M, a as T } from "./ButtonChild-BTPuUMU5.js";
7
+ import { D as c } from "./Disclosure-BUNppuMs.js";
8
+ import { D as A } from "./DisclousreGroup-3n2noZn8.js";
9
+ import { E as F } from "./Error--Jbz8Uoy.js";
9
10
  import "zod";
10
- import { F } from "./Form-B7w2oUTu.js";
11
- import { I as g } from "./Input-fPkzWJI-.js";
12
- import { T as D } from "./TextArea-BqYpfMqm.js";
13
- import { F as P, O as k } from "./OutlinedButtonLink-B31MVQKz.js";
14
- import { L as h } from "./Link-DV_dPWbm.js";
15
- import { M as E } from "./MenuButton-BikS-I_v.js";
16
- import { M as I } from "./MenuLabel-CqOBBOhO.js";
17
- import { M as R, a as V, b as j } from "./ModalAction-CG_70YMt.js";
18
- import { M as w } from "./ModalBase-DLaR_yid.js";
19
- import { N as J } from "./NavigationResponsive-DijNGfH2.js";
20
- import { S as Q, a as U, b as W } from "./Sidebar-LlVvowsG.js";
21
- import { N as Y } from "./NavigationSidebar-QiavBbjq.js";
22
- import { N as _ } from "./NavigationMenu-BJh51iq8.js";
23
- import { P as oo } from "./Popover-D3iGWJwQ.js";
24
- import { S as ao } from "./Select-DIaQ_hk2.js";
25
- import { S as to } from "./Success-FBfAAtBv.js";
26
- import { T as po } from "./ToggleButtonGroup-B1eveh6s.js";
27
- import { T as xo } from "./Tree-DwJPCnFr.js";
11
+ import { F as g } from "./Form-B7w2oUTu.js";
12
+ import { I as D } from "./Input-fPkzWJI-.js";
13
+ import { T as P } from "./TextArea-BqYpfMqm.js";
14
+ import { F as k, O as z } from "./OutlinedButtonLink-B31MVQKz.js";
15
+ import { L as G } from "./Link-DV_dPWbm.js";
16
+ import { L as y } from "./Loader-CLMHp6L7.js";
17
+ import { M as V } from "./MenuButton-BikS-I_v.js";
18
+ import { M as q } from "./MenuLabel-CqOBBOhO.js";
19
+ import { M as H, a as J, b as K } from "./ModalAction-CG_70YMt.js";
20
+ import { M as U } from "./ModalBase-DLaR_yid.js";
21
+ import { N as X } from "./NavigationResponsive-DijNGfH2.js";
22
+ import { S as Z, a as _, b as $ } from "./Sidebar-LlVvowsG.js";
23
+ import { N as ro } from "./NavigationSidebar-QiavBbjq.js";
24
+ import { N as to } from "./NavigationMenu-BJh51iq8.js";
25
+ import { P as so } from "./Popover-D3iGWJwQ.js";
26
+ import { S as mo } from "./Select-DIaQ_hk2.js";
27
+ import { S as io } from "./Success-FBfAAtBv.js";
28
+ import { T as fo } from "./ToggleButtonGroup-B1eveh6s.js";
29
+ import { T as lo } from "./Tree-DwJPCnFr.js";
28
30
  export {
29
31
  s as Avatar,
30
32
  p as AvatarSize,
31
33
  m as AvatarType,
34
+ M as ButtonChild,
32
35
  i as ButtonShape,
36
+ T as ButtonState,
33
37
  n as ButtonVariant,
34
- e as ColorTheme,
35
- M as Disclosure,
36
- b as DisclosureGroup,
37
- v as Error,
38
+ t as ColorTheme,
39
+ c as Disclosure,
40
+ A as DisclosureGroup,
41
+ F as Error,
38
42
  u as FilledButton,
39
- P as FilledButtonLink,
40
- F as Form,
41
- g as Input,
42
- h as Link,
43
- E as MenuButton,
44
- I as MenuLabel,
45
- R as ModalAction,
46
- V as ModalActionPlacement,
47
- w as ModalBase,
48
- j as ModalCloseText,
49
- _ as NavigationMenu,
50
- J as NavigationResponsive,
51
- Y as NavigationSidebar,
43
+ k as FilledButtonLink,
44
+ g as Form,
45
+ D as Input,
46
+ G as Link,
47
+ y as Loader,
48
+ V as MenuButton,
49
+ q as MenuLabel,
50
+ H as ModalAction,
51
+ J as ModalActionPlacement,
52
+ U as ModalBase,
53
+ K as ModalCloseText,
54
+ to as NavigationMenu,
55
+ X as NavigationResponsive,
56
+ ro as NavigationSidebar,
52
57
  l as OutlinedButton,
53
- k as OutlinedButtonLink,
54
- oo as Popover,
55
- ao as Select,
56
- Q as Sidebar,
57
- U as SidebarPosition,
58
- W as SidebarSize,
59
- to as Success,
60
- D as TextArea,
61
- S as TextButton,
62
- po as ToggleButtonGroup,
63
- xo as Tree
58
+ z as OutlinedButtonLink,
59
+ so as Popover,
60
+ mo as Select,
61
+ Z as Sidebar,
62
+ _ as SidebarPosition,
63
+ $ as SidebarSize,
64
+ io as Success,
65
+ P as TextArea,
66
+ B as TextButton,
67
+ fo as ToggleButtonGroup,
68
+ lo as Tree
64
69
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adgytec/adgytec-web-ui-components",
3
3
  "private": false,
4
- "version": "0.0.11",
4
+ "version": "0.0.13",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"