@eyesee/ui-components 0.3.0 → 0.4.0

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,70 +1,84 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { useRef as N, Suspense as k } from "react";
3
- import C from "react-dom";
4
- import D from "../../hooks/useClickOutside.js";
5
- import { useEscapeKey as v } from "../../hooks/useEscapeKey.js";
6
- import { LoadingIcon as I } from "../icons-v2/LoadingIcon.js";
7
- import { XIcon as M } from "../icons-v2/XIcon.js";
8
- import { Button as b } from "../Button/Button.js";
9
- import l from "./Modal.module.scss.js";
10
- const r = {
1
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
+ import { useRef as E, Suspense as L } from "react";
3
+ import O from "react-dom";
4
+ import Q from "../../hooks/useClickOutside.js";
5
+ import { useEscapeKey as _ } from "../../hooks/useEscapeKey.js";
6
+ import { LoadingIcon as b } from "../icons-v2/LoadingIcon.js";
7
+ import { XIcon as A } from "../icons-v2/XIcon.js";
8
+ import { Button as H } from "../Button/Button.js";
9
+ import e from "./Modal.module.scss.js";
10
+ const n = {
11
11
  default: "960px",
12
12
  mediaQuery: "880px"
13
- }, A = ({
14
- children: n = null,
15
- onClose: s = () => {
13
+ }, r = {
14
+ default: "480px",
15
+ mediaQuery: "360px"
16
+ }, I = {
17
+ scroll: e.content,
18
+ fixed: `${e.content} ${e.contentFixed}`
19
+ }, j = ({
20
+ children: d = null,
21
+ onClose: c = () => {
16
22
  },
17
- visible: d = !1,
18
- title: c = "",
19
- icon: t = null,
20
- description: m = null,
23
+ visible: s = !1,
24
+ title: m = "",
25
+ icon: a = null,
26
+ description: u = null,
21
27
  footer: i = null,
22
- maxWidth: u = r,
23
- loadingFallback: p = /* @__PURE__ */ e(I, { iconSize: "xl" }),
24
- portalContainer: f
28
+ maxWidth: f = n,
29
+ bodyLayout: h = "scroll",
30
+ // 'scroll' or 'fixed'
31
+ bodyHeight: p = r,
32
+ loadingFallback: y = /* @__PURE__ */ t(b, { iconSize: "xl" }),
33
+ portalContainer: x
25
34
  }) => {
26
- const { default: h, mediaQuery: x } = {
35
+ const { default: D, mediaQuery: N } = {
36
+ ...n,
37
+ ...f
38
+ }, { default: g, mediaQuery: C } = {
27
39
  ...r,
28
- ...u
29
- }, y = N(), o = () => s();
30
- return D(y, o), v(o), d ? C.createPortal(
31
- /* @__PURE__ */ a("div", { className: l.transition, children: [
32
- /* @__PURE__ */ e("div", { className: l.backdrop, onClick: o }),
33
- /* @__PURE__ */ e(
40
+ ...p
41
+ }, k = E(), o = () => c();
42
+ return Q(k, o), _(o), s ? O.createPortal(
43
+ /* @__PURE__ */ l("div", { className: e.transition, children: [
44
+ /* @__PURE__ */ t("div", { className: e.backdrop, onClick: o }),
45
+ /* @__PURE__ */ t(
34
46
  "dialog",
35
47
  {
36
- className: l.modal,
48
+ className: e.modal,
37
49
  open: !0,
38
50
  style: {
39
- "--modal-width": h,
40
- "--modal-width-media-query": x
51
+ "--modal-width": D,
52
+ "--modal-width-media-query": N,
53
+ "--modal-content-height": g,
54
+ "--modal-content-height-media-query": C
41
55
  },
42
- children: /* @__PURE__ */ a(k, { fallback: p, children: [
43
- /* @__PURE__ */ a("header", { className: l.header, children: [
44
- t && t,
45
- /* @__PURE__ */ a("div", { className: l.textContainer, children: [
46
- /* @__PURE__ */ e("span", { className: l.title, children: c }),
47
- /* @__PURE__ */ e("span", { className: l.description, children: m })
56
+ children: /* @__PURE__ */ l(L, { fallback: y, children: [
57
+ /* @__PURE__ */ l("header", { className: e.header, children: [
58
+ a && a,
59
+ /* @__PURE__ */ l("div", { className: e.textContainer, children: [
60
+ /* @__PURE__ */ t("span", { className: e.title, children: m }),
61
+ /* @__PURE__ */ t("span", { className: e.description, children: u })
48
62
  ] }),
49
- /* @__PURE__ */ e(
50
- b,
63
+ /* @__PURE__ */ t(
64
+ H,
51
65
  {
52
66
  variant: "neutral",
53
- icon: /* @__PURE__ */ e(M, {}),
67
+ icon: /* @__PURE__ */ t(A, {}),
54
68
  size: "xxxs",
55
69
  onClick: o
56
70
  }
57
71
  )
58
72
  ] }),
59
- /* @__PURE__ */ e("section", { className: l.content, children: n }),
60
- i && /* @__PURE__ */ e("footer", { children: i })
73
+ /* @__PURE__ */ t("section", { className: I[h], children: d }),
74
+ i && /* @__PURE__ */ t("footer", { children: i })
61
75
  ] })
62
76
  }
63
77
  )
64
78
  ] }),
65
- f ?? document.getElementById("modal") ?? document.body
79
+ x ?? document.getElementById("modal") ?? document.body
66
80
  ) : null;
67
81
  };
68
82
  export {
69
- A as Modal
83
+ j as Modal
70
84
  };
@@ -1,21 +1,23 @@
1
- const t = "_transition_11g3r_3", n = "_backdrop_11g3r_7", o = "_modal_11g3r_18", e = "_header_11g3r_37", r = "_textContainer_11g3r_45", _ = "_title_11g3r_53", c = "_description_11g3r_62", i = "_content_11g3r_70", a = {
1
+ const t = "_transition_m2to3_3", o = "_backdrop_m2to3_7", n = "_modal_m2to3_18", e = "_header_m2to3_37", _ = "_textContainer_m2to3_45", c = "_title_m2to3_53", i = "_description_m2to3_62", s = "_content_m2to3_70", a = "_contentFixed_m2to3_76", d = {
2
2
  transition: t,
3
- backdrop: n,
4
- modal: o,
3
+ backdrop: o,
4
+ modal: n,
5
5
  header: e,
6
- textContainer: r,
7
- title: _,
8
- description: c,
9
- content: i
6
+ textContainer: _,
7
+ title: c,
8
+ description: i,
9
+ content: s,
10
+ contentFixed: a
10
11
  };
11
12
  export {
12
- n as backdrop,
13
- i as content,
14
- a as default,
15
- c as description,
13
+ o as backdrop,
14
+ s as content,
15
+ a as contentFixed,
16
+ d as default,
17
+ i as description,
16
18
  e as header,
17
- o as modal,
18
- r as textContainer,
19
- _ as title,
19
+ n as modal,
20
+ _ as textContainer,
21
+ c as title,
20
22
  t as transition
21
23
  };
@@ -18,31 +18,21 @@ const f = {
18
18
  }) => {
19
19
  if (s == null || s === "") return null;
20
20
  const c = (u.includes(l) ? l : "rectangle") === "pill" ? e.shapePill : e.shapeRectangle;
21
- return /* @__PURE__ */ o(
22
- "span",
23
- {
24
- className: d(
25
- e.tag,
26
- c,
27
- f[t] ?? e.stateDefault
28
- ),
29
- children: [
30
- i && /* @__PURE__ */ a("span", { className: e.icon, "aria-hidden": !0, children: /* @__PURE__ */ a(m, { iconSize: "m" }) }),
31
- /* @__PURE__ */ a("span", { className: e.label, children: s }),
32
- r && n ? /* @__PURE__ */ a(
33
- "button",
34
- {
35
- type: "button",
36
- className: e.dismiss,
37
- onClick: n,
38
- disabled: t === "disabled",
39
- "aria-label": `Remove ${s}`,
40
- children: /* @__PURE__ */ a("span", { className: e.dismissIcon, "aria-hidden": !0, children: /* @__PURE__ */ a(p, { iconSize: "m" }) })
41
- }
42
- ) : null
43
- ]
44
- }
45
- );
21
+ return /* @__PURE__ */ o("span", { className: d(e.tag, c, f[t] ?? e.stateDefault), children: [
22
+ i && /* @__PURE__ */ a("span", { className: e.icon, "aria-hidden": !0, children: /* @__PURE__ */ a(m, { iconSize: "m" }) }),
23
+ /* @__PURE__ */ a("span", { className: e.label, children: s }),
24
+ r && n ? /* @__PURE__ */ a(
25
+ "button",
26
+ {
27
+ type: "button",
28
+ className: e.dismiss,
29
+ onClick: n,
30
+ disabled: t === "disabled",
31
+ "aria-label": `Remove ${s}`,
32
+ children: /* @__PURE__ */ a("span", { className: e.dismissIcon, "aria-hidden": !0, children: /* @__PURE__ */ a(p, { iconSize: "m" }) })
33
+ }
34
+ ) : null
35
+ ] });
46
36
  };
47
37
  export {
48
38
  A as Tag
@@ -1,14 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import a from "clsx";
3
3
  import t from "./TextHoverable.module.scss.js";
4
- const x = ({ children: o, className: r, ...s }) => /* @__PURE__ */ e(
5
- "span",
6
- {
7
- className: a(t.textHoverable, r),
8
- ...s,
9
- children: /* @__PURE__ */ e("span", { className: t.text, children: o })
10
- }
11
- );
4
+ const x = ({ children: o, className: r, ...s }) => /* @__PURE__ */ e("span", { className: a(t.textHoverable, r), ...s, children: /* @__PURE__ */ e("span", { className: t.text, children: o }) });
12
5
  export {
13
6
  x as TextHoverable
14
7
  };
@@ -0,0 +1,15 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { createIcon as t } from "./createIcon.js";
3
+ const c = t(({ strokeColor: o, strokeWidth: r }) => /* @__PURE__ */ n(
4
+ "path",
5
+ {
6
+ d: "M16 4H5.33333C4.97971 4 4.64057 4.14048 4.39052 4.39052C4.14048 4.64057 4 4.97971 4 5.33333V26.6667C4 27.0203 4.14048 27.3594 4.39052 27.6095C4.64057 27.8595 4.97971 28 5.33333 28H16M16 4H26.6667C27.0203 4 27.3594 4.14048 27.6095 4.39052C27.8595 4.64057 28 4.97971 28 5.33333V26.6667C28 27.0203 27.8595 27.3594 27.6095 27.6095C27.3594 27.8595 27.0203 28 26.6667 28H16M16 4V28",
7
+ stroke: o,
8
+ strokeWidth: r,
9
+ strokeLinecap: "round",
10
+ strokeLinejoin: "round"
11
+ }
12
+ ));
13
+ export {
14
+ c as ColumnIcon
15
+ };
@@ -7,7 +7,7 @@ import { ExternalLinkIcon as l } from "./ExternalLinkIcon.js";
7
7
  import { PlusIcon as s } from "./PlusIcon.js";
8
8
  import { ImageIcon as h } from "./ImageIcon.js";
9
9
  import { DeleteIcon as C } from "./DeleteIcon.js";
10
- import { EditIcon as u } from "./EditIcon.js";
10
+ import { EditIcon as S } from "./EditIcon.js";
11
11
  import { AlphabetIcon as A } from "./AlphabetIcon.js";
12
12
  import { AdIcon as w } from "./AdIcon.js";
13
13
  import { AddMessageIcon as v } from "./AddMessageIcon.js";
@@ -33,7 +33,7 @@ import { BoxIcon as xo } from "./BoxIcon.js";
33
33
  import { BooksIcon as lo } from "./BooksIcon.js";
34
34
  import { BookIcon as so } from "./BookIcon.js";
35
35
  import { BookmarkIcon as go } from "./BookmarkIcon.js";
36
- import { BoltIcon as So } from "./BoltIcon.js";
36
+ import { BoltIcon as uo } from "./BoltIcon.js";
37
37
  import { BoldIcon as ko } from "./BoldIcon.js";
38
38
  import { BellIcon as bo } from "./BellIcon.js";
39
39
  import { AttributesEvaluationIcon as Lo } from "./AttributesEvaluationIcon.js";
@@ -60,7 +60,7 @@ import { ClickIcon as ar } from "./ClickIcon.js";
60
60
  import { ClipboardIcon as ir } from "./ClipboardIcon.js";
61
61
  import { ClockIcon as dr } from "./ClockIcon.js";
62
62
  import { ClockShareIcon as gr } from "./ClockShareIcon.js";
63
- import { CloseIcon as Sr } from "./CloseIcon.js";
63
+ import { CloseIcon as ur } from "./CloseIcon.js";
64
64
  import { CopyIcon as kr } from "./CopyIcon.js";
65
65
  import { CreditCardIcon as br } from "./CreditCardIcon.js";
66
66
  import { CropIcon as Lr } from "./CropIcon.js";
@@ -87,7 +87,7 @@ import { FileIcon as ae } from "./FileIcon.js";
87
87
  import { FileExportIcon as ie } from "./FileExportIcon.js";
88
88
  import { FileImportIcon as de } from "./FileImportIcon.js";
89
89
  import { FileNewIcon as ge } from "./FileNewIcon.js";
90
- import { FileRemoveIcon as Se } from "./FileRemoveIcon.js";
90
+ import { FileRemoveIcon as ue } from "./FileRemoveIcon.js";
91
91
  import { FilesIcon as ke } from "./FilesIcon.js";
92
92
  import { FileTemplateIcon as be } from "./FileTemplateIcon.js";
93
93
  import { FileUploadIcon as Le } from "./FileUploadIcon.js";
@@ -114,7 +114,7 @@ import { LikeIcon as at } from "./LikeIcon.js";
114
114
  import { LinkIcon as it } from "./LinkIcon.js";
115
115
  import { ListViewIcon as dt } from "./ListViewIcon.js";
116
116
  import { LoaderIcon as gt } from "./LoaderIcon.js";
117
- import { LoadingIcon as St } from "./LoadingIcon.js";
117
+ import { LoadingIcon as ut } from "./LoadingIcon.js";
118
118
  import { LockIcon as kt } from "./LockIcon.js";
119
119
  import { LockOffIcon as bt } from "./LockOffIcon.js";
120
120
  import { LoginIcon as Lt } from "./LoginIcon.js";
@@ -141,7 +141,7 @@ import { NotifyIcon as an } from "./NotifyIcon.js";
141
141
  import { NoteOffIcon as sn } from "./NoteOffIcon.js";
142
142
  import { NoteIcon as hn } from "./NoteIcon.js";
143
143
  import { Multiplier05Icon as Cn } from "./Multiplier05Icon.js";
144
- import { Multiplier10Icon as un } from "./Multiplier10Icon.js";
144
+ import { Multiplier10Icon as Sn } from "./Multiplier10Icon.js";
145
145
  import { Multiplier15Icon as An } from "./Multiplier15Icon.js";
146
146
  import { Multiplier20Icon as wn } from "./Multiplier20Icon.js";
147
147
  import { PlayIcon as vn } from "./PlayIcon.js";
@@ -168,7 +168,7 @@ import { SocialTiktok2Icon as lc } from "./SocialTiktok2Icon.js";
168
168
  import { SocialTiktokIcon as sc } from "./SocialTiktokIcon.js";
169
169
  import { SocialXIcon as hc } from "./SocialXIcon.js";
170
170
  import { SocialYoutubeIcon as Cc } from "./SocialYoutubeIcon.js";
171
- import { SortHorizontalIcon as uc } from "./SortHorizontalIcon.js";
171
+ import { SortHorizontalIcon as Sc } from "./SortHorizontalIcon.js";
172
172
  import { StopIcon as Ac } from "./StopIcon.js";
173
173
  import { SurveyIcon as wc } from "./SurveyIcon.js";
174
174
  import { TableIcon as vc } from "./TableIcon.js";
@@ -195,7 +195,7 @@ import { VolumeOnIcon as lp } from "./VolumeOnIcon.js";
195
195
  import { VolumeOffIcon as sp } from "./VolumeOffIcon.js";
196
196
  import { WebIcon as hp } from "./WebIcon.js";
197
197
  import { XIcon as Cp } from "./XIcon.js";
198
- import { ZipFileIcon as up } from "./ZipFileIcon.js";
198
+ import { ZipFileIcon as Sp } from "./ZipFileIcon.js";
199
199
  import { ZoomInIcon as Ap } from "./ZoomInIcon.js";
200
200
  import { ZoomOutIcon as wp } from "./ZoomOutIcon.js";
201
201
  import { ZonePercentageIcon as vp } from "./ZonePercentageIcon.js";
@@ -203,6 +203,7 @@ import { PinskewedIcon as Mp } from "./PinskewedIcon.js";
203
203
  import { MinusIcon as Fp } from "./MinusIcon.js";
204
204
  import { SquareAddIcon as yp } from "./SquareAddIcon.js";
205
205
  import { RectanglesAddIcon as Tp } from "./RectanglesAddIcon.js";
206
+ import { ColumnIcon as Op } from "./ColumnIcon.js";
206
207
  export {
207
208
  w as AdIcon,
208
209
  v as AddMessageIcon,
@@ -226,7 +227,7 @@ export {
226
227
  Lo as AttributesEvaluationIcon,
227
228
  bo as BellIcon,
228
229
  ko as BoldIcon,
229
- So as BoltIcon,
230
+ uo as BoltIcon,
230
231
  so as BookIcon,
231
232
  go as BookmarkIcon,
232
233
  lo as BooksIcon,
@@ -258,7 +259,8 @@ export {
258
259
  ir as ClipboardIcon,
259
260
  dr as ClockIcon,
260
261
  gr as ClockShareIcon,
261
- Sr as CloseIcon,
262
+ ur as CloseIcon,
263
+ Op as ColumnIcon,
262
264
  kr as CopyIcon,
263
265
  br as CreditCardIcon,
264
266
  Lr as CropIcon,
@@ -273,7 +275,7 @@ export {
273
275
  Hr as DownloadIcon,
274
276
  Zr as DragToolIcon,
275
277
  Xr as DrawRectangleIcon,
276
- u as EditIcon,
278
+ S as EditIcon,
277
279
  Jr as EmailIcon,
278
280
  Yr as EmojiNeutralIcon,
279
281
  Qr as EmojiSadIcon,
@@ -288,7 +290,7 @@ export {
288
290
  ae as FileIcon,
289
291
  de as FileImportIcon,
290
292
  ge as FileNewIcon,
291
- Se as FileRemoveIcon,
293
+ ue as FileRemoveIcon,
292
294
  be as FileTemplateIcon,
293
295
  Le as FileUploadIcon,
294
296
  ke as FilesIcon,
@@ -317,7 +319,7 @@ export {
317
319
  it as LinkIcon,
318
320
  dt as ListViewIcon,
319
321
  gt as LoaderIcon,
320
- St as LoadingIcon,
322
+ ut as LoadingIcon,
321
323
  kt as LockIcon,
322
324
  bt as LockOffIcon,
323
325
  Lt as LoginIcon,
@@ -334,7 +336,7 @@ export {
334
336
  Jt as MouseIcon,
335
337
  Xt as MoveIcon,
336
338
  Cn as Multiplier05Icon,
337
- un as Multiplier10Icon,
339
+ Sn as Multiplier10Icon,
338
340
  An as Multiplier15Icon,
339
341
  wn as Multiplier20Icon,
340
342
  hn as NoteIcon,
@@ -376,7 +378,7 @@ export {
376
378
  sc as SocialTiktokIcon,
377
379
  hc as SocialXIcon,
378
380
  Cc as SocialYoutubeIcon,
379
- uc as SortHorizontalIcon,
381
+ Sc as SortHorizontalIcon,
380
382
  yp as SquareAddIcon,
381
383
  x as StarIcon,
382
384
  Ac as StopIcon,
@@ -405,7 +407,7 @@ export {
405
407
  lp as VolumeOnIcon,
406
408
  hp as WebIcon,
407
409
  Cp as XIcon,
408
- up as ZipFileIcon,
410
+ Sp as ZipFileIcon,
409
411
  vp as ZonePercentageIcon,
410
412
  Ap as ZoomInIcon,
411
413
  wp as ZoomOutIcon