@adam-milo/ui 1.0.33 → 1.0.34

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 (152) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +57 -23
  3. package/dist/index10.cjs +1 -1
  4. package/dist/index10.js +94 -56
  5. package/dist/index11.cjs +1 -1
  6. package/dist/index11.js +199 -40
  7. package/dist/index12.cjs +1 -1
  8. package/dist/index12.js +305 -105
  9. package/dist/index13.cjs +1 -1
  10. package/dist/index13.js +260 -74
  11. package/dist/index14.cjs +1 -1
  12. package/dist/index14.js +135 -27
  13. package/dist/index15.cjs +1 -1
  14. package/dist/index15.js +52 -469
  15. package/dist/index16.cjs +1 -1
  16. package/dist/index16.js +57 -111
  17. package/dist/index17.cjs +1 -1
  18. package/dist/index17.js +101 -20
  19. package/dist/index18.cjs +1 -1
  20. package/dist/index18.js +76 -21
  21. package/dist/index19.cjs +1 -1
  22. package/dist/index19.js +25 -29
  23. package/dist/index2.cjs +1 -1
  24. package/dist/index2.js +6 -4
  25. package/dist/index20.cjs +1 -1
  26. package/dist/index20.js +468 -31
  27. package/dist/index21.cjs +1 -1
  28. package/dist/index21.js +155 -39
  29. package/dist/index22.cjs +1 -1
  30. package/dist/index22.js +16 -27
  31. package/dist/index23.cjs +1 -1
  32. package/dist/index23.js +36 -12
  33. package/dist/index24.cjs +1 -0
  34. package/dist/index24.js +46 -0
  35. package/dist/index25.cjs +1 -1
  36. package/dist/index25.js +80 -263
  37. package/dist/index26.cjs +1 -1
  38. package/dist/index26.js +52 -13
  39. package/dist/index27.cjs +1 -0
  40. package/dist/index27.js +45 -0
  41. package/dist/index28.cjs +1 -0
  42. package/dist/index28.js +53 -0
  43. package/dist/index29.cjs +1 -0
  44. package/dist/index29.js +55 -0
  45. package/dist/index3.cjs +1 -1
  46. package/dist/index3.js +33 -33
  47. package/dist/index30.cjs +1 -0
  48. package/dist/index30.js +72 -0
  49. package/dist/index31.cjs +1 -0
  50. package/dist/index31.js +14 -0
  51. package/dist/index32.cjs +1 -0
  52. package/dist/index32.js +332 -0
  53. package/dist/index36.cjs +1 -1
  54. package/dist/index36.js +383 -6
  55. package/dist/index37.cjs +1 -0
  56. package/dist/index37.js +16 -0
  57. package/dist/index4.cjs +1 -1
  58. package/dist/index4.js +59 -11
  59. package/dist/index5.cjs +1 -1
  60. package/dist/index5.js +19 -35
  61. package/dist/index50.cjs +1 -0
  62. package/dist/index50.js +9 -0
  63. package/dist/index6.cjs +1 -1
  64. package/dist/index6.js +11 -101
  65. package/dist/index62.cjs +1 -0
  66. package/dist/index62.js +502 -0
  67. package/dist/index64.cjs +1 -0
  68. package/dist/index64.js +11 -0
  69. package/dist/index65.cjs +1 -0
  70. package/dist/index65.js +39 -0
  71. package/dist/index66.cjs +1 -0
  72. package/dist/index66.js +64 -0
  73. package/dist/index67.cjs +1 -0
  74. package/dist/index67.js +212 -0
  75. package/dist/index68.cjs +1 -0
  76. package/dist/index68.js +14 -0
  77. package/dist/index69.cjs +1 -0
  78. package/dist/index69.js +293 -0
  79. package/dist/index7.cjs +1 -1
  80. package/dist/index7.js +46 -97
  81. package/dist/index70.cjs +1 -0
  82. package/dist/index70.js +18 -0
  83. package/dist/index71.cjs +1 -0
  84. package/dist/index71.js +129 -0
  85. package/dist/index72.cjs +1 -0
  86. package/dist/index72.js +43 -0
  87. package/dist/index73.cjs +1 -0
  88. package/dist/index73.js +99 -0
  89. package/dist/index74.cjs +1 -0
  90. package/dist/index74.js +71 -0
  91. package/dist/index75.cjs +1 -0
  92. package/dist/index75.js +36 -0
  93. package/dist/index76.cjs +1 -0
  94. package/dist/index76.js +14 -0
  95. package/dist/index77.cjs +1 -0
  96. package/dist/index77.js +17 -0
  97. package/dist/index78.cjs +1 -0
  98. package/dist/index78.js +6 -0
  99. package/dist/index79.cjs +1 -0
  100. package/dist/index79.js +297 -0
  101. package/dist/index8.cjs +1 -1
  102. package/dist/index8.js +97 -88
  103. package/dist/index80.cjs +1 -0
  104. package/dist/index80.js +25 -0
  105. package/dist/index81.cjs +1 -0
  106. package/dist/index81.js +39 -0
  107. package/dist/index82.cjs +1 -0
  108. package/dist/index82.js +625 -0
  109. package/dist/index83.cjs +1 -0
  110. package/dist/index83.js +721 -0
  111. package/dist/index84.cjs +1 -0
  112. package/dist/index84.js +154 -0
  113. package/dist/index85.cjs +1 -0
  114. package/dist/index85.js +173 -0
  115. package/dist/index9.cjs +1 -1
  116. package/dist/index9.js +55 -197
  117. package/dist/src/components/core/button/Button.component.d.ts +13 -7
  118. package/dist/src/components/core/button/Button.component.d.ts.map +1 -1
  119. package/dist/src/components/core/icon/Icon.component.d.ts +1 -1
  120. package/dist/src/components/core/icon/Icon.component.d.ts.map +1 -1
  121. package/dist/src/components/core/icon-button/IconButton.component.d.ts +36 -0
  122. package/dist/src/components/core/icon-button/IconButton.component.d.ts.map +1 -0
  123. package/dist/src/components/core/menu-icon-button/MenuIconButton.component.d.ts +79 -0
  124. package/dist/src/components/core/menu-icon-button/MenuIconButton.component.d.ts.map +1 -0
  125. package/dist/src/components/feedback/spinner/Spinner.component.d.ts +62 -0
  126. package/dist/src/components/feedback/spinner/Spinner.component.d.ts.map +1 -0
  127. package/dist/src/components/forms/input/Input.component.d.ts +5 -0
  128. package/dist/src/components/forms/input/Input.component.d.ts.map +1 -1
  129. package/dist/src/components/forms/otp-input/OTPInput.component.d.ts +82 -0
  130. package/dist/src/components/forms/otp-input/OTPInput.component.d.ts.map +1 -0
  131. package/dist/src/components/forms/phone-input/PhoneInput.component.d.ts +96 -0
  132. package/dist/src/components/forms/phone-input/PhoneInput.component.d.ts.map +1 -0
  133. package/dist/src/components/forms/phone-input/countries.d.ts +93 -0
  134. package/dist/src/components/forms/phone-input/countries.d.ts.map +1 -0
  135. package/dist/src/components/forms/select/Select.component.d.ts +5 -1
  136. package/dist/src/components/forms/select/Select.component.d.ts.map +1 -1
  137. package/dist/src/components/forms/toggle/Toggle.component.d.ts +80 -0
  138. package/dist/src/components/forms/toggle/Toggle.component.d.ts.map +1 -0
  139. package/dist/src/components/layout/auth-layout/AuthLayout.component.d.ts +86 -0
  140. package/dist/src/components/layout/auth-layout/AuthLayout.component.d.ts.map +1 -0
  141. package/dist/src/components/overlays/dialog/Dialog.component.d.ts +36 -2
  142. package/dist/src/components/overlays/dialog/Dialog.component.d.ts.map +1 -1
  143. package/dist/src/components/typography/heading/Heading.component.d.ts +3 -2
  144. package/dist/src/components/typography/heading/Heading.component.d.ts.map +1 -1
  145. package/dist/src/components/typography/link/Link.component.d.ts +80 -0
  146. package/dist/src/components/typography/link/Link.component.d.ts.map +1 -0
  147. package/dist/src/index.d.ts +22 -5
  148. package/dist/src/index.d.ts.map +1 -1
  149. package/dist/style.css +1 -1
  150. package/package.json +2 -1
  151. /package/dist/{index44.cjs → index61.cjs} +0 -0
  152. /package/dist/{index44.js → index61.js} +0 -0
package/dist/index21.js CHANGED
@@ -1,53 +1,169 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
4
+ import { cn } from "./index31.js";
3
5
  /* empty css */
4
- const levelToSizeMap = {
5
- 1: "2xl",
6
- 2: "xl",
7
- 3: "lg",
8
- 4: "md",
9
- 5: "sm",
10
- 6: "xs"
6
+ import { Icon } from "@adam-milo/icons";
7
+ const Dialog = DialogPrimitive.Root;
8
+ const DialogTrigger = DialogPrimitive.Trigger;
9
+ const DialogPortal = DialogPrimitive.Portal;
10
+ const DialogClose = DialogPrimitive.Close;
11
+ const DialogCloseButton = forwardRef(({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
12
+ const finalDataCy = dataCy || "dialog-close-button";
13
+ const finalTestId = dataTestId || "dialog-close-button";
14
+ return /* @__PURE__ */ jsx(
15
+ DialogPrimitive.Close,
16
+ {
17
+ ref,
18
+ className: cn("dialog-close-button", className),
19
+ "data-cy": finalDataCy,
20
+ "data-testid": finalTestId,
21
+ "aria-label": "Close dialog",
22
+ ...props,
23
+ children: /* @__PURE__ */ jsx(Icon, { name: "Cross2Icon", size: "sm", decorative: true })
24
+ }
25
+ );
26
+ });
27
+ DialogCloseButton.displayName = "DialogCloseButton";
28
+ const DialogIcon = ({
29
+ children,
30
+ variant = "default",
31
+ className,
32
+ "data-cy": dataCy,
33
+ "data-testid": dataTestId,
34
+ ...props
35
+ }) => {
36
+ const finalDataCy = dataCy || "dialog-icon";
37
+ const finalTestId = dataTestId || "dialog-icon";
38
+ return /* @__PURE__ */ jsx(
39
+ "div",
40
+ {
41
+ className: cn("dialog-icon", `dialog-icon--${variant}`, className),
42
+ "data-cy": finalDataCy,
43
+ "data-testid": finalTestId,
44
+ "aria-hidden": "true",
45
+ ...props,
46
+ children
47
+ }
48
+ );
11
49
  };
12
- const Heading = forwardRef(
13
- ({
14
- level = 2,
15
- size,
16
- weight = "bold",
17
- color = "text",
18
- align = "start",
19
- className = "",
20
- "data-cy": dataCy,
21
- "data-testid": dataTestId,
22
- children,
23
- ...props
24
- }, ref) => {
25
- const resolvedSize = size ?? levelToSizeMap[level];
26
- const finalDataCy = dataCy || `heading-h${level}-${resolvedSize}`;
27
- const finalDataTestId = dataTestId || `heading-h${level}-${resolvedSize}`;
28
- const classes = [
29
- "heading",
30
- `heading--size-${resolvedSize}`,
31
- `heading--weight-${weight}`,
32
- `heading--color-${color}`,
33
- `heading--align-${align}`,
34
- className
35
- ].filter(Boolean).join(" ");
36
- const Tag = `h${level}`;
37
- return /* @__PURE__ */ jsx(
38
- Tag,
50
+ DialogIcon.displayName = "DialogIcon";
51
+ const DialogOverlay = forwardRef(({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
52
+ const finalDataCy = dataCy || "dialog-overlay";
53
+ const finalTestId = dataTestId || "dialog-overlay";
54
+ return /* @__PURE__ */ jsx(
55
+ DialogPrimitive.Overlay,
56
+ {
57
+ ref,
58
+ className: cn("dialog-overlay", className),
59
+ "data-cy": finalDataCy,
60
+ "data-testid": finalTestId,
61
+ ...props
62
+ }
63
+ );
64
+ });
65
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
66
+ const DialogContent = forwardRef(({ className, children, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
67
+ const finalDataCy = dataCy || "dialog-content";
68
+ const finalTestId = dataTestId || "dialog-content";
69
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [
70
+ /* @__PURE__ */ jsx(DialogOverlay, {}),
71
+ /* @__PURE__ */ jsx(
72
+ DialogPrimitive.Content,
39
73
  {
40
74
  ref,
41
- className: classes,
75
+ className: cn("dialog-content", className),
42
76
  "data-cy": finalDataCy,
43
- "data-testid": finalDataTestId,
77
+ "data-testid": finalTestId,
44
78
  ...props,
45
79
  children
46
80
  }
81
+ )
82
+ ] });
83
+ });
84
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
85
+ const DialogHeader = ({
86
+ centered = false,
87
+ className,
88
+ "data-cy": dataCy,
89
+ "data-testid": dataTestId,
90
+ ...props
91
+ }) => {
92
+ const finalDataCy = dataCy || "dialog-header";
93
+ const finalTestId = dataTestId || "dialog-header";
94
+ return /* @__PURE__ */ jsx(
95
+ "div",
96
+ {
97
+ className: cn("dialog-header", centered && "dialog-header--centered", className),
98
+ "data-cy": finalDataCy,
99
+ "data-testid": finalTestId,
100
+ ...props
101
+ }
102
+ );
103
+ };
104
+ DialogHeader.displayName = "DialogHeader";
105
+ const DialogFooter = ({
106
+ className,
107
+ "data-cy": dataCy,
108
+ "data-testid": dataTestId,
109
+ ...props
110
+ }) => {
111
+ const finalDataCy = dataCy || "dialog-footer";
112
+ const finalTestId = dataTestId || "dialog-footer";
113
+ return /* @__PURE__ */ jsx(
114
+ "div",
115
+ {
116
+ className: cn("dialog-footer", className),
117
+ "data-cy": finalDataCy,
118
+ "data-testid": finalTestId,
119
+ ...props
120
+ }
121
+ );
122
+ };
123
+ DialogFooter.displayName = "DialogFooter";
124
+ const DialogTitle = forwardRef(
125
+ ({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
126
+ const finalDataCy = dataCy || "dialog-title";
127
+ const finalTestId = dataTestId || "dialog-title";
128
+ return /* @__PURE__ */ jsx(
129
+ DialogPrimitive.Title,
130
+ {
131
+ ref,
132
+ className: cn("dialog-title", className),
133
+ "data-cy": finalDataCy,
134
+ "data-testid": finalTestId,
135
+ ...props
136
+ }
47
137
  );
48
138
  }
49
139
  );
50
- Heading.displayName = "Heading";
140
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
141
+ const DialogDescription = forwardRef(({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
142
+ const finalDataCy = dataCy || "dialog-description";
143
+ const finalTestId = dataTestId || "dialog-description";
144
+ return /* @__PURE__ */ jsx(
145
+ DialogPrimitive.Description,
146
+ {
147
+ ref,
148
+ className: cn("dialog-description", className),
149
+ "data-cy": finalDataCy,
150
+ "data-testid": finalTestId,
151
+ ...props
152
+ }
153
+ );
154
+ });
155
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
51
156
  export {
52
- Heading
157
+ Dialog,
158
+ DialogClose,
159
+ DialogCloseButton,
160
+ DialogContent,
161
+ DialogDescription,
162
+ DialogFooter,
163
+ DialogHeader,
164
+ DialogIcon,
165
+ DialogOverlay,
166
+ DialogPortal,
167
+ DialogTitle,
168
+ DialogTrigger
53
169
  };
package/dist/index22.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("react"),e=require("./index23.cjs");;/* empty css */const t=i.forwardRef(({columns:i=3,rows:t,gap:a="4",rowGap:d,columnGap:s,align:c="stretch",justify:o="stretch",autoFitMinWidth:n="15rem",className:g,children:l,style:u,"data-cy":m,"data-testid":p,...y},$)=>{const f=m||`grid-${i}col`,j=p||`grid-${i}col`,x={...u,..."auto"===i&&{"--grid-auto-fit-min":n}};return r.jsx("div",{ref:$,className:e.cn("grid",`grid--columns-${i}`,t&&`grid--rows-${t}`,`grid--gap-${a}`,d&&`grid--row-gap-${d}`,s&&`grid--column-gap-${s}`,`grid--align-${c}`,`grid--justify-${o}`,g),style:x,"data-cy":f,"data-testid":j,...y,children:l})});t.displayName="Grid",exports.Grid=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),e=require("./index31.cjs");;/* empty css */const s=a.forwardRef(({direction:a="vertical",spacing:s="4",align:c="stretch",justify:r="start",wrap:i=!1,className:n,children:d,"data-cy":l,"data-testid":o,...u},k)=>{const p=l||`stack-${a}`,j=o||`stack-${a}`;return t.jsx("div",{ref:k,className:e.cn("stack",`stack--${a}`,`stack--spacing-${s}`,`stack--align-${c}`,`stack--justify-${r}`,i&&"stack--wrap",n),"data-cy":p,"data-testid":j,...u,children:d})});s.displayName="Stack",exports.Stack=s;
package/dist/index22.js CHANGED
@@ -1,46 +1,35 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { cn } from "./index23.js";
3
+ import { cn } from "./index31.js";
4
4
  /* empty css */
5
- const Grid = forwardRef(
5
+ const Stack = forwardRef(
6
6
  ({
7
- columns = 3,
8
- rows,
9
- gap = "4",
10
- rowGap,
11
- columnGap,
7
+ direction = "vertical",
8
+ spacing = "4",
12
9
  align = "stretch",
13
- justify = "stretch",
14
- autoFitMinWidth = "15rem",
10
+ justify = "start",
11
+ wrap = false,
15
12
  className,
16
13
  children,
17
- style,
18
14
  "data-cy": dataCy,
19
15
  "data-testid": dataTestId,
20
16
  ...props
21
17
  }, ref) => {
22
- const finalDataCy = dataCy || `grid-${columns}col`;
23
- const finalTestId = dataTestId || `grid-${columns}col`;
24
- const customStyle = {
25
- ...style,
26
- ...columns === "auto" && { "--grid-auto-fit-min": autoFitMinWidth }
27
- };
18
+ const finalDataCy = dataCy || `stack-${direction}`;
19
+ const finalTestId = dataTestId || `stack-${direction}`;
28
20
  return /* @__PURE__ */ jsx(
29
21
  "div",
30
22
  {
31
23
  ref,
32
24
  className: cn(
33
- "grid",
34
- `grid--columns-${columns}`,
35
- rows && `grid--rows-${rows}`,
36
- `grid--gap-${gap}`,
37
- rowGap && `grid--row-gap-${rowGap}`,
38
- columnGap && `grid--column-gap-${columnGap}`,
39
- `grid--align-${align}`,
40
- `grid--justify-${justify}`,
25
+ "stack",
26
+ `stack--${direction}`,
27
+ `stack--spacing-${spacing}`,
28
+ `stack--align-${align}`,
29
+ `stack--justify-${justify}`,
30
+ wrap && "stack--wrap",
41
31
  className
42
32
  ),
43
- style: customStyle,
44
33
  "data-cy": finalDataCy,
45
34
  "data-testid": finalTestId,
46
35
  ...props,
@@ -49,7 +38,7 @@ const Grid = forwardRef(
49
38
  );
50
39
  }
51
40
  );
52
- Grid.displayName = "Grid";
41
+ Stack.displayName = "Stack";
53
42
  export {
54
- Grid
43
+ Stack
55
44
  };
package/dist/index23.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("clsx"),r=require("tailwind-merge");let t=0;exports.cn=function(...t){return r.twMerge(e.clsx(t))},exports.generateId=function(e="id"){return t+=1,`${e}-${t}`};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("./index31.cjs");;/* empty css */const a=t.forwardRef(({className:t,maxWidth:a="lg",padding:n="md","data-cy":i,"data-testid":d,children:c,...s},o)=>{const l=i||"container",u=d||"container";return e.jsx("div",{ref:o,className:r.cn("container",`container--max-width-${a}`,`container--padding-${n}`,t),"data-cy":l,"data-testid":u,...s,children:c})});a.displayName="Container",exports.Container=a;
package/dist/index23.js CHANGED
@@ -1,14 +1,38 @@
1
- import { clsx } from "clsx";
2
- import { twMerge } from "tailwind-merge";
3
- function cn(...inputs) {
4
- return twMerge(clsx(inputs));
5
- }
6
- let idCounter = 0;
7
- function generateId(prefix = "id") {
8
- idCounter += 1;
9
- return `${prefix}-${idCounter}`;
10
- }
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cn } from "./index31.js";
4
+ /* empty css */
5
+ const Container = forwardRef(
6
+ ({
7
+ className,
8
+ maxWidth = "lg",
9
+ padding = "md",
10
+ "data-cy": dataCy,
11
+ "data-testid": dataTestId,
12
+ children,
13
+ ...props
14
+ }, ref) => {
15
+ const finalDataCy = dataCy || "container";
16
+ const finalTestId = dataTestId || "container";
17
+ return /* @__PURE__ */ jsx(
18
+ "div",
19
+ {
20
+ ref,
21
+ className: cn(
22
+ "container",
23
+ `container--max-width-${maxWidth}`,
24
+ `container--padding-${padding}`,
25
+ className
26
+ ),
27
+ "data-cy": finalDataCy,
28
+ "data-testid": finalTestId,
29
+ ...props,
30
+ children
31
+ }
32
+ );
33
+ }
34
+ );
35
+ Container.displayName = "Container";
11
36
  export {
12
- cn,
13
- generateId
37
+ Container
14
38
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),t=require("@radix-ui/react-separator"),i=require("./index31.cjs");function a(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)};/* empty css */const o=a(t),d=r.forwardRef(({orientation:r="horizontal",decorative:t=!0,spacing:a="0",color:d,className:c,style:n,"data-cy":s,"data-testid":u,...l},f)=>{const v=s||`divider-${r}`,g=u||`divider-${r}`;return e.jsx(o.Root,{ref:f,decorative:t,orientation:r,className:i.cn("divider",`divider--${r}`,`divider--spacing-${a}`,c),style:{...d&&{backgroundColor:d},...n},"data-cy":v,"data-testid":g,...l})});d.displayName="Divider",exports.Divider=d;
@@ -0,0 +1,46 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
4
+ import { cn } from "./index31.js";
5
+ /* empty css */
6
+ const Divider = forwardRef(
7
+ ({
8
+ orientation = "horizontal",
9
+ decorative = true,
10
+ spacing = "0",
11
+ color,
12
+ className,
13
+ style,
14
+ "data-cy": dataCy,
15
+ "data-testid": dataTestId,
16
+ ...props
17
+ }, ref) => {
18
+ const finalDataCy = dataCy || `divider-${orientation}`;
19
+ const finalTestId = dataTestId || `divider-${orientation}`;
20
+ return /* @__PURE__ */ jsx(
21
+ SeparatorPrimitive.Root,
22
+ {
23
+ ref,
24
+ decorative,
25
+ orientation,
26
+ className: cn(
27
+ "divider",
28
+ `divider--${orientation}`,
29
+ `divider--spacing-${spacing}`,
30
+ className
31
+ ),
32
+ style: {
33
+ ...color && { backgroundColor: color },
34
+ ...style
35
+ },
36
+ "data-cy": finalDataCy,
37
+ "data-testid": finalTestId,
38
+ ...props
39
+ }
40
+ );
41
+ }
42
+ );
43
+ Divider.displayName = "Divider";
44
+ export {
45
+ Divider
46
+ };
package/dist/index25.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),t=require("./index23.cjs");;/* empty css */const a=require("./index26.cjs"),s=require("./index44.cjs"),n=r.forwardRef(({type:n="text",label:l,error:i,helperText:o,fullWidth:u=!1,showPasswordToggle:d=!0,showLastChar:c=!0,lastCharDelay:p=500,validate:h,onValidationChange:f,className:g,id:x,onChange:v,onBlur:w,required:j,value:m,"data-cy":y,"data-testid":k,...b},C)=>{const[$,N]=r.useState(!1),[_,q]=r.useState(),[M,S]=r.useState(!1),[L,R]=r.useState(!1),T=r.useRef(!1),[E,W]=r.useState(""),B=r.useRef(""),F=r.useRef(null),I=r.useRef(null),z=a.useMergedRef(C,I),D=r.useId(),O=x||D,P=`${O}-error`,V=`${O}-helper`,H=y||"input",A=k||"input",G="password"===n,J=G&&d,K=G&&c&&!$,Q=G&&($||K&&B.current.length>0)?"text":n,U=l&&j&&!l.includes("*")?`${l} *`:l,X=r.useMemo(()=>s.debounce(e=>{if(h&&T.current){const r=h(e);q(r),null==f||f(!r)}},300),[h,f]),Y=r.useRef(X);r.useEffect(()=>{Y.current=X},[X]),r.useEffect(()=>{process.env.NODE_ENV},[G,c,m]),r.useEffect(()=>()=>{F.current&&clearTimeout(F.current),Y.current.cancel()},[]);const Z=K&&void 0===m?E:$&&G&&void 0===m?B.current||"":m,ee=i||_,re=b.disabled?"disabled":ee?"error":M?"focus":L?"hover":"idle";return e.jsxs("div",{className:t.cn("input-wrapper",u&&"input-wrapper--full-width"),"data-cy":`${H}-wrapper`,"data-testid":`${A}-wrapper`,children:[l&&e.jsx("label",{htmlFor:O,className:"input__label","data-cy":`${H}-label`,"data-testid":`${A}-label`,children:U}),e.jsxs("div",{className:"input__field-container",children:[e.jsx("input",{ref:z,id:O,type:Q,value:Z,className:t.cn("input",ee&&"input--error",u&&"input--full-width",J&&"input--with-toggle",g),"aria-invalid":ee?"true":"false","aria-required":j?"true":void 0,"aria-describedby":ee?P:o?V:void 0,"data-cy":H,"data-testid":A,"data-state":re,onChange:e=>{null==v||v(e);let r=e.target.value;if(K){const t=e.target,a=t.value;B.current=a;const s=a?"•".repeat(a.length-1)+a.slice(-1):"";W(s),t.value=s,r=a,F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{W("•".repeat(a.length))},p)}T.current&&X(r)},onFocus:e=>{var r;S(!0),null==(r=b.onFocus)||r.call(b,e)},onBlur:e=>{if(S(!1),T.current=!0,h){const r=K?B.current:e.target.value,t=h(r);q(t),null==f||f(!t)}null==w||w(e)},onMouseEnter:()=>{R(!0)},onMouseLeave:()=>{R(!1)},required:j,...b}),J&&e.jsx("button",{type:"button",className:"input__toggle",onClick:()=>{N(e=>!e),setTimeout(()=>{var e;return null==(e=I.current)?void 0:e.focus()},0)},"aria-label":$?"Hide password":"Show password","data-cy":`${H}-toggle`,"data-testid":`${A}-toggle`,children:$?e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsx("path",{d:"M10 4C5.5 4 2 10 2 10s3.5 6 8 6 8-6 8-6-3.5-6-8-6z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),e.jsx("circle",{cx:"10",cy:"10",r:"2.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})]}):e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsx("path",{d:"M10 4C5.5 4 2 10 2 10s3.5 6 8 6 8-6 8-6-3.5-6-8-6z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),e.jsx("circle",{cx:"10",cy:"10",r:"2.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M3 3l14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})]}),ee&&e.jsx("span",{id:P,className:"input__error",role:"alert","data-cy":`${H}-error`,"data-testid":`${A}-error`,children:ee}),o&&!ee&&e.jsx("span",{id:V,className:"input__helper","data-cy":`${H}-helper`,"data-testid":`${A}-helper`,children:o})]})});n.displayName="Input",exports.Input=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),t=require("react"),e=require("./index31.cjs"),s=require("./index4.cjs");;/* empty css */const d=t.forwardRef(({children:t,cardSize:d="lg",logo:i,showSettings:n=!0,showUserMenu:r=!0,userInitials:u,onSettingsClick:c,onUserMenuClick:l,activeMenu:o=null,"data-testid":h,"data-cy":y,...m},$)=>{const g=y||"auth-layout",x=h||"auth-layout";return a.jsxs("div",{ref:$,className:"auth-layout","data-testid":x,"data-cy":g,...m,children:[a.jsx("div",{className:"auth-layout__background","data-testid":`${x}-background`,"data-cy":`${g}-background`,"aria-hidden":"true"}),a.jsxs("header",{className:"auth-layout__header","data-testid":`${x}-header`,"data-cy":`${g}-header`,children:[a.jsx("div",{className:"auth-layout__logo","data-testid":`${x}-logo`,"data-cy":`${g}-logo`,children:i}),a.jsxs("div",{className:"auth-layout__menu","data-testid":`${x}-menu`,"data-cy":`${g}-menu`,children:[n&&a.jsx(s.MenuIconButton,{variant:"settings",selected:"settings"===o,onClick:c,"aria-label":"Settings","data-testid":`${x}-settings-btn`,"data-cy":`${g}-settings-btn`}),r&&a.jsx(s.MenuIconButton,{variant:"user",initials:u,selected:"user"===o,onClick:l,"aria-label":u?`User menu - ${u}`:"User menu","data-testid":`${x}-user-btn`,"data-cy":`${g}-user-btn`})]})]}),a.jsx("main",{className:"auth-layout__main","data-testid":`${x}-main`,"data-cy":`${g}-main`,children:a.jsx("div",{className:e.cn("auth-layout__card",`auth-layout__card--${d}`),"data-testid":`${x}-card`,"data-cy":`${g}-card`,children:t})})]})});d.displayName="AuthLayout",exports.AuthLayout=d;