welcome-ui 10.0.0-alpha.10 → 10.0.0-alpha.12

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 (37) hide show
  1. package/dist/Alert.css +1 -1
  2. package/dist/Alert.js +62 -62
  3. package/dist/Checkbox.js +12 -11
  4. package/dist/DatePicker.js +69 -68
  5. package/dist/DateTimePicker.js +10 -10
  6. package/dist/Field.css +1 -1
  7. package/dist/Field.js +48 -49
  8. package/dist/FileDrop.js +7 -1
  9. package/dist/Icon.js +212 -211
  10. package/dist/InputText.js +6 -6
  11. package/dist/Modal.js +65 -56
  12. package/dist/Search.js +1 -1
  13. package/dist/Select.js +350 -332
  14. package/dist/Slider.js +1 -1
  15. package/dist/Swiper.js +201 -191
  16. package/dist/Tabs.css +1 -1
  17. package/dist/Tabs.js +320 -319
  18. package/dist/Textarea.js +14 -13
  19. package/dist/TimePicker.js +46 -45
  20. package/dist/Toggle.js +11 -11
  21. package/dist/types/components/Icon/icons.d.ts +2 -2
  22. package/dist/types/components/Modal/Assets/AssetContent.d.ts +1 -1
  23. package/dist/types/components/Modal/Assets/index.d.ts +1 -1
  24. package/dist/types/components/Modal/components/Content.d.ts +1 -1
  25. package/dist/types/components/Modal/index.d.ts +2 -2
  26. package/dist/types/components/Modal/types.d.ts +1 -1
  27. package/dist/types/components/Select/types.d.ts +1 -0
  28. package/dist/types/components/Tabs/Tab.d.ts +2 -0
  29. package/dist/types/components/Tabs/{components/TabPanel/index.d.ts → TabPanel.d.ts} +1 -1
  30. package/dist/types/components/Tabs/index.d.ts +6 -5
  31. package/dist/types/components/Tabs/types.d.ts +6 -12
  32. package/dist/types/components/Tabs/utils.d.ts +4 -7
  33. package/package.json +1 -1
  34. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +0 -5
  35. package/dist/types/components/Tabs/components/TabList/index.d.ts +0 -3
  36. package/dist/use-viewport-CgrficYB.js +0 -17
  37. package/dist/useForkRef-D807AV7D.js +0 -22
package/dist/Textarea.js CHANGED
@@ -2,34 +2,35 @@
2
2
  import './Textarea.css';
3
3
  import { jsx as _ } from "react/jsx-runtime";
4
4
  import { forwardRef as f } from "react";
5
- import { useField as v } from "./Field.js";
6
- import { c as p } from "./index-PAaZGbyz.js";
7
- const m = "_root_161f5_2", d = "_adaptative_161f5_45", l = {
8
- root: m,
5
+ import { useField as p } from "./Field.js";
6
+ import { c as v } from "./index-PAaZGbyz.js";
7
+ const d = "_root_161f5_2", m = "_adaptative_161f5_45", l = {
8
+ root: d,
9
9
  "variant-danger": "_variant-danger_161f5_36",
10
10
  "variant-warning": "_variant-warning_161f5_39",
11
11
  "variant-success": "_variant-success_161f5_42",
12
- adaptative: d
13
- }, x = p(l), u = f(
14
- ({ className: t, isAdaptative: r = !1, minRows: e = 5, variant: o, ...s }, n) => {
15
- const { getInputProps: i, variant: c } = v(), a = c || o;
12
+ adaptative: m
13
+ }, u = v(l), x = f(
14
+ ({ className: t, isAdaptative: r = !1, minRows: e = 5, variant: n, ...o }, s) => {
15
+ const { getInputProps: i, variant: c } = p(), a = c || n;
16
16
  return /* @__PURE__ */ _(
17
17
  "textarea",
18
18
  {
19
- className: x(
19
+ className: u(
20
20
  "root",
21
21
  a && `variant-${a}`,
22
22
  r && "adaptative",
23
+ "field-input",
23
24
  t
24
25
  ),
25
- ref: n,
26
+ ref: s,
26
27
  rows: e,
27
- ...i(s)
28
+ ...i(o)
28
29
  }
29
30
  );
30
31
  }
31
32
  );
32
- u.displayName = "Textarea";
33
+ x.displayName = "Textarea";
33
34
  export {
34
- u as Textarea
35
+ x as Textarea
35
36
  };
@@ -1,83 +1,84 @@
1
1
  "use client";
2
2
  import { jsx as f } from "react/jsx-runtime";
3
- import { forwardRef as S, useState as w, useRef as j, useEffect as d } from "react";
4
- import { D as F, C as I } from "./CustomPopper-C1wIDHbM.js";
5
- import { b as L, D as M, s as O } from "./utils-BD597oo6.js";
6
- import { InputText as U } from "./InputText.js";
7
- import { c as _ } from "./index-PAaZGbyz.js";
8
- const q = _(O), z = S(
3
+ import { forwardRef as S, useState as j, useRef as F, useEffect as d } from "react";
4
+ import { D as I, C as L } from "./CustomPopper-C1wIDHbM.js";
5
+ import { b as M, D as O, s as U } from "./utils-BD597oo6.js";
6
+ import { InputText as _ } from "./InputText.js";
7
+ import { c as q } from "./index-PAaZGbyz.js";
8
+ const a = q(U), z = S(
9
9
  ({
10
10
  autoFocus: o,
11
11
  className: T,
12
12
  dateFormat: D = "HH:mm",
13
- disabled: a,
14
- icon: R,
15
- iconPlacement: k = "left",
13
+ disabled: k,
14
+ icon: N,
15
+ iconPlacement: R = "left",
16
16
  onChange: t,
17
- placeholder: x,
18
- size: y = "md",
19
- timeIntervals: i = 15,
20
- transparent: A,
21
- value: r = M,
22
- ...m
17
+ placeholder: w,
18
+ size: x = "md",
19
+ timeIntervals: m = 15,
20
+ transparent: y,
21
+ value: r = O,
22
+ ...c
23
23
  }, p) => {
24
- const l = (s) => L(s, i), [H, c] = w(l(r)), N = j(), P = p || N;
24
+ const i = (e) => M(e, m), [A, l] = j(i(r)), H = F(), P = p || H;
25
25
  d(() => {
26
- t == null || t(l(r));
26
+ t == null || t(i(r));
27
27
  }, []), d(() => {
28
- var e;
29
- const s = l(r);
30
- ((e = new Date(r)) == null ? void 0 : e.getTime()) - (s == null ? void 0 : s.getTime()) !== 0 && (t == null || t(s)), c(s);
28
+ var s;
29
+ const e = i(r);
30
+ ((s = new Date(r)) == null ? void 0 : s.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && (t == null || t(e)), l(e);
31
31
  }, [r]);
32
- const b = (s) => {
33
- var e;
34
- s.preventDefault(), (e = P.current) == null || e.blur(), c(null), t == null || t(null);
35
- }, E = (s) => {
36
- if (!s) {
37
- c(null), t == null || t(null);
32
+ const b = (e) => {
33
+ var s;
34
+ e.preventDefault(), (s = P.current) == null || s.blur(), l(null), t == null || t(null);
35
+ }, E = (e) => {
36
+ if (!e) {
37
+ l(null), t == null || t(null);
38
38
  return;
39
39
  }
40
- const e = Array.isArray(s) ? s[0] : s;
41
- if (!e) {
42
- c(null), t == null || t(null);
40
+ const s = Array.isArray(e) ? e[0] : e;
41
+ if (!s) {
42
+ l(null), t == null || t(null);
43
43
  return;
44
44
  }
45
- const u = l(e);
46
- e.setHours(u.getHours(), u.getMinutes()), c(e), t == null || t(new Date(e));
45
+ const u = i(s);
46
+ s.setHours(u.getHours(), u.getMinutes()), l(s), t == null || t(new Date(s));
47
47
  };
48
48
  return (
49
49
  // type issue in react-datepicker (https://github.com/Hacker0x01/react-datepicker/issues/5391)
50
50
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
51
51
  // @ts-expect-error
52
52
  /* @__PURE__ */ f(
53
- F,
53
+ I,
54
54
  {
55
55
  calendarClassName: "time-picker-popper",
56
56
  customInput: /* @__PURE__ */ f(
57
- U,
57
+ _,
58
58
  {
59
59
  autoFocus: o,
60
- className: q("time-picker", T),
61
- "data-testid": m["data-testid"],
62
- disabled: a,
63
- icon: R,
64
- iconPlacement: k,
60
+ className: a("time-picker", T),
61
+ "data-testid": c["data-testid"],
62
+ disabled: k,
63
+ icon: N,
64
+ iconPlacement: R,
65
65
  isClearable: !1,
66
66
  onReset: b,
67
67
  ref: p,
68
- size: y,
69
- transparent: A
68
+ size: x,
69
+ transparent: y
70
70
  }
71
71
  ),
72
72
  dateFormat: D,
73
73
  onChange: E,
74
- placeholderText: x,
75
- popperContainer: I,
76
- selected: H,
74
+ placeholderText: w,
75
+ popperContainer: L,
76
+ selected: A,
77
77
  showTimeSelect: !0,
78
78
  showTimeSelectOnly: !0,
79
- timeIntervals: i,
80
- ...m
79
+ timeIntervals: m,
80
+ ...c,
81
+ wrapperClassName: a(c.wrapperClassName, "date-picker-wrapper", "field-input")
81
82
  }
82
83
  )
83
84
  );
package/dist/Toggle.js CHANGED
@@ -2,24 +2,24 @@
2
2
  import './Toggle.css';
3
3
  import { jsxs as z, jsx as e } from "react/jsx-runtime";
4
4
  import { a as v } from "./KPUWHTQJ-Dv3cAqjP.js";
5
- import { forwardRef as g } from "react";
6
- import { useField as f } from "./Field.js";
5
+ import { forwardRef as f } from "react";
6
+ import { useField as g } from "./Field.js";
7
7
  import { Icon as n } from "./Icon.js";
8
8
  import { c as h } from "./index-PAaZGbyz.js";
9
- const w = "_root_1czvn_2", k = "_wrapper_1czvn_100", u = "_checked_1czvn_120", x = "_disabled_1czvn_124", N = {
9
+ const w = "_root_1czvn_2", u = "_wrapper_1czvn_100", k = "_checked_1czvn_120", x = "_disabled_1czvn_124", N = {
10
10
  root: w,
11
11
  "size-sm": "_size-sm_1czvn_82",
12
12
  "size-md": "_size-md_1czvn_88",
13
13
  "size-lg": "_size-lg_1czvn_94",
14
- wrapper: k,
14
+ wrapper: u,
15
15
  "icon-wrapper": "_icon-wrapper_1czvn_106",
16
- checked: u,
16
+ checked: k,
17
17
  disabled: x
18
- }, c = h(N), b = g(
19
- ({ checked: o, className: a, disabled: s, onClick: i, size: r = "md", withVisibilityIcon: t, ...l }, p) => {
20
- const { getInputProps: m } = f(), _ = m(l), d = s ? null : i;
21
- return /* @__PURE__ */ z("div", { className: c("wrapper"), onClick: d, children: [
22
- t ? /* @__PURE__ */ e(
18
+ }, c = h(N), b = f(
19
+ ({ checked: o, className: i, disabled: s, onClick: t, size: r = "md", withVisibilityIcon: a, ...l }, p) => {
20
+ const { getInputProps: m } = g(), _ = m(l), d = s ? null : t;
21
+ return /* @__PURE__ */ z("div", { className: c("wrapper", "field-input"), onClick: d, children: [
22
+ a ? /* @__PURE__ */ e(
23
23
  "div",
24
24
  {
25
25
  className: c(
@@ -35,7 +35,7 @@ const w = "_root_1czvn_2", k = "_wrapper_1czvn_100", u = "_checked_1czvn_120", x
35
35
  v,
36
36
  {
37
37
  checked: o,
38
- className: c("root", `size-${r}`, a),
38
+ className: c("root", `size-${r}`, i),
39
39
  disabled: s,
40
40
  ref: p,
41
41
  ..._
@@ -3,10 +3,10 @@ export declare const actions: readonly ["asterisk", "info-circle", "chart-line",
3
3
  export declare const chat: string[];
4
4
  export declare const miscellaneous: readonly ["music", "rocket", "file-alt", "user-square", "book-reader", "file-question-alt", "sad-solid", "smile-beam-solid", "sad", "smile-beam", "sign-right", "exclamation-triangle", "exclamation-circle", "exclamation-octagon", "chart-pie", "paperclip", "chart-bar", "fire", "user-check", "apps", "trophy", "bookmark-solid", "bookmark", "clock", "comment-alt-lines", "file-edit-alt", "illustration", "calendar", "users-alt", "globe", "graduation-cap", "envelope", "equal-circle", "minus", "venus", "mars", "estate", "info-circle", "columns", "english-to-chinese", "bag-alt", "chart-line", "map-marker-alt", "lock-alt", "flag", "at", "user", "user-circle", "clipboard-check", "building", "compass", "phone", "pin", "microphone", "user-search", "house-user", "star-solid", "star", "coins", "euro-circle", "file-search-alt", "question-circle", "gift", "birthday-cake", "bunting-flags", "tag-alt", "tablet", "mobile", "video", "plus-circle", "pen", "check-circle", "certified", "plug"];
5
5
  export declare const player: readonly ["play", "stop-circle-solid", "pause-circle-solid", "previous", "step-forward", "expand-arrows-alt", "compress-arrows", "screen-share", "stop-screen-share", "microphone", "microphone-slash", "cast", "cast-connected", "cast-unavailable", "video", "video-slash", "airplay", "history", "playlist", "volume-up", "volume-mute", "closed-captioning"];
6
- export declare const wtf: readonly ["package", "basketball", "book-alt", "lightbulb-alt", "life-ring", "calculator-alt", "camera", "shopping-cart", "clipboard-notes", "coffee", "ruler", "desktop", "hard-hat", "credit-card", "moon-solid", "moon", "crosshair", "crown", "restaurant", "diamond", "industry", "fingerprint", "flag", "flag-solid", "setting", "handshake", "hashtag", "headphones", "heart", "estate", "balance-scale", "key-skeleton", "leaf", "map", "masonry", "masonry-plus", "megaphone", "microphone", "processor", "euro-circle", "mountains", "pen", "images", "chart-pie-alt", "pizza-slice", "puzzle-piece-solid", "puzzle-piece", "shield", "wrench", "sparkles", "server", "sun", "hunting", "thumbs-up", "thumbs-down", "trees", "sofa", "exit", "redo", "play", "ban"];
6
+ export declare const wtf: readonly ["icons", "package", "basketball", "book-alt", "lightbulb-alt", "life-ring", "calculator-alt", "camera", "shopping-cart", "clipboard-notes", "coffee", "ruler", "desktop", "hard-hat", "credit-card", "moon-solid", "moon", "crosshair", "crown", "restaurant", "diamond", "industry", "fingerprint", "flag", "flag-solid", "setting", "handshake", "hashtag", "headphones", "heart", "estate", "balance-scale", "key-skeleton", "leaf", "map", "masonry", "masonry-plus", "megaphone", "microphone", "processor", "euro-circle", "mountains", "pen", "images", "chart-pie-alt", "pizza-slice", "puzzle-piece-solid", "puzzle-piece", "shield", "wrench", "sparkles", "server", "sun", "hunting", "thumbs-up", "thumbs-down", "trees", "sofa", "exit", "redo", "play", "ban"];
7
7
  export declare const foldersAndFiles: readonly ["folder", "folder-open", "folder-full", "file", "image"];
8
8
  export declare const markdown: readonly ["bold", "arrow", "brackets-curly", "italic", "list-ol-alt", "list-ul", "quote", "text-strike-through", "heading", "heading-1", "heading-2", "heading-3", "heading-4", "heading-5", "heading-6", "font", "underline"];
9
9
  export declare const brands: readonly ["behance", "dribbble", "facebook", "github", "google", "instagram", "linkedin", "npm", "pinterest", "slack", "stackoverflow", "tiktok", "twitch", "x", "xing", "youtube", "zapier"];
10
10
  export declare const welcome: readonly ["symbol", "wttj"];
11
11
  export declare const flags: readonly ["flag-fr", "flag-en", "flag-us"];
12
- export declare const icons: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "edit", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share", "angle-left-b", "angle-right-b", "angle-up", "angle-down", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "left-arrow-to-left", "arrow-to-right", "top-arrow-to-top", "arrow-to-bottom", "angle-double-left", "angle-double-right", "angle-left", "angle-right", "behance", "dribbble", "facebook", "github", "google", "instagram", "linkedin", "npm", "pinterest", "slack", "stackoverflow", "tiktok", "twitch", "x", "xing", "youtube", "zapier", ...string[], "folder", "folder-open", "folder-full", "file", "image", "flag-fr", "flag-en", "flag-us", "bold", "arrow", "brackets-curly", "italic", "list-ol-alt", "list-ul", "quote", "text-strike-through", "heading", "heading-1", "heading-2", "heading-3", "heading-4", "heading-5", "heading-6", "font", "underline", "music", "rocket", "file-alt", "user-square", "book-reader", "file-question-alt", "sad-solid", "smile-beam-solid", "sad", "smile-beam", "sign-right", "exclamation-triangle", "exclamation-circle", "exclamation-octagon", "chart-pie", "paperclip", "chart-bar", "fire", "user-check", "apps", "trophy", "bookmark-solid", "bookmark", "clock", "comment-alt-lines", "file-edit-alt", "illustration", "calendar", "users-alt", "globe", "graduation-cap", "envelope", "equal-circle", "minus", "venus", "mars", "estate", "info-circle", "columns", "english-to-chinese", "bag-alt", "chart-line", "map-marker-alt", "lock-alt", "flag", "at", "user", "user-circle", "clipboard-check", "building", "compass", "phone", "pin", "microphone", "user-search", "house-user", "star-solid", "star", "coins", "euro-circle", "file-search-alt", "question-circle", "gift", "birthday-cake", "bunting-flags", "tag-alt", "tablet", "mobile", "video", "plus-circle", "pen", "check-circle", "certified", "plug", "play", "stop-circle-solid", "pause-circle-solid", "previous", "step-forward", "expand-arrows-alt", "compress-arrows", "screen-share", "stop-screen-share", "microphone", "microphone-slash", "cast", "cast-connected", "cast-unavailable", "video", "video-slash", "airplay", "history", "playlist", "volume-up", "volume-mute", "closed-captioning", "symbol", "wttj", "package", "basketball", "book-alt", "lightbulb-alt", "life-ring", "calculator-alt", "camera", "shopping-cart", "clipboard-notes", "coffee", "ruler", "desktop", "hard-hat", "credit-card", "moon-solid", "moon", "crosshair", "crown", "restaurant", "diamond", "industry", "fingerprint", "flag", "flag-solid", "setting", "handshake", "hashtag", "headphones", "heart", "estate", "balance-scale", "key-skeleton", "leaf", "map", "masonry", "masonry-plus", "megaphone", "microphone", "processor", "euro-circle", "mountains", "pen", "images", "chart-pie-alt", "pizza-slice", "puzzle-piece-solid", "puzzle-piece", "shield", "wrench", "sparkles", "server", "sun", "hunting", "thumbs-up", "thumbs-down", "trees", "sofa", "exit", "redo", "play", "ban"];
12
+ export declare const icons: readonly ["asterisk", "info-circle", "chart-line", "plus", "chart-line", "archive-alt", "arrows-merge-v", "arrows-shrink-v", "apps", "edit", "user-check", "user-plus", "user-times", "check", "times", "trash", "import", "upload", "draggable-dots", "copy", "pen", "left-arrow-from-left", "arrow-from-right", "resize-handle", "arrow-resize-diagonal", "external-link-alt", "heart-solid", "heart", "filter", "eye", "eye-slash", "link", "sign-out-alt", "bars", "ellipsis-v", "ellipsis-h", "move-arrow", "bell", "print", "bolt-alt", "redo", "save", "search", "setting", "share-alt", "share", "angle-left-b", "angle-right-b", "angle-up", "angle-down", "arrow-left", "arrow-right", "arrow-up", "arrow-down", "left-arrow-to-left", "arrow-to-right", "top-arrow-to-top", "arrow-to-bottom", "angle-double-left", "angle-double-right", "angle-left", "angle-right", "behance", "dribbble", "facebook", "github", "google", "instagram", "linkedin", "npm", "pinterest", "slack", "stackoverflow", "tiktok", "twitch", "x", "xing", "youtube", "zapier", ...string[], "folder", "folder-open", "folder-full", "file", "image", "flag-fr", "flag-en", "flag-us", "bold", "arrow", "brackets-curly", "italic", "list-ol-alt", "list-ul", "quote", "text-strike-through", "heading", "heading-1", "heading-2", "heading-3", "heading-4", "heading-5", "heading-6", "font", "underline", "music", "rocket", "file-alt", "user-square", "book-reader", "file-question-alt", "sad-solid", "smile-beam-solid", "sad", "smile-beam", "sign-right", "exclamation-triangle", "exclamation-circle", "exclamation-octagon", "chart-pie", "paperclip", "chart-bar", "fire", "user-check", "apps", "trophy", "bookmark-solid", "bookmark", "clock", "comment-alt-lines", "file-edit-alt", "illustration", "calendar", "users-alt", "globe", "graduation-cap", "envelope", "equal-circle", "minus", "venus", "mars", "estate", "info-circle", "columns", "english-to-chinese", "bag-alt", "chart-line", "map-marker-alt", "lock-alt", "flag", "at", "user", "user-circle", "clipboard-check", "building", "compass", "phone", "pin", "microphone", "user-search", "house-user", "star-solid", "star", "coins", "euro-circle", "file-search-alt", "question-circle", "gift", "birthday-cake", "bunting-flags", "tag-alt", "tablet", "mobile", "video", "plus-circle", "pen", "check-circle", "certified", "plug", "play", "stop-circle-solid", "pause-circle-solid", "previous", "step-forward", "expand-arrows-alt", "compress-arrows", "screen-share", "stop-screen-share", "microphone", "microphone-slash", "cast", "cast-connected", "cast-unavailable", "video", "video-slash", "airplay", "history", "playlist", "volume-up", "volume-mute", "closed-captioning", "symbol", "wttj", "icons", "package", "basketball", "book-alt", "lightbulb-alt", "life-ring", "calculator-alt", "camera", "shopping-cart", "clipboard-notes", "coffee", "ruler", "desktop", "hard-hat", "credit-card", "moon-solid", "moon", "crosshair", "crown", "restaurant", "diamond", "industry", "fingerprint", "flag", "flag-solid", "setting", "handshake", "hashtag", "headphones", "heart", "estate", "balance-scale", "key-skeleton", "leaf", "map", "masonry", "masonry-plus", "megaphone", "microphone", "processor", "euro-circle", "mountains", "pen", "images", "chart-pie-alt", "pizza-slice", "puzzle-piece-solid", "puzzle-piece", "shield", "wrench", "sparkles", "server", "sun", "hunting", "thumbs-up", "thumbs-down", "trees", "sofa", "exit", "redo", "play", "ban"];
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes, default as React } from 'react';
2
2
  export declare const AssetContent: {
3
- ({ children, ...rest }: React.PropsWithChildren<HTMLAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
3
+ ({ children, className, ...rest }: React.PropsWithChildren<HTMLAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
4
4
  displayName: string;
5
5
  };
@@ -5,7 +5,7 @@ export declare const Assets: {
5
5
  AssetWithTitle: import('react').ForwardRefExoticComponent<Omit<import('./types').AssetWithTitleProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
6
6
  Backdrop: import('react').ForwardRefExoticComponent<import('../types').BackdropProps & import('react').RefAttributes<HTMLDivElement>>;
7
7
  Content: {
8
- ({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
8
+ ({ children, className, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
9
9
  displayName: string;
10
10
  };
11
11
  Iframe: {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @name Modal.Content
3
3
  */
4
- export declare const Content: import('react').ForwardRefExoticComponent<{
4
+ export declare const Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
5
5
  withClosingButton?: boolean;
6
6
  } & {
7
7
  children?: import('react').ReactNode | undefined;
@@ -4,7 +4,7 @@ export declare const Modal: import('../../utils').FunctionComponentWithAs<"div",
4
4
  Body: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLElement> & {
5
5
  children?: import('react').ReactNode | undefined;
6
6
  } & import('react').RefAttributes<HTMLElement>>;
7
- Content: import('react').ForwardRefExoticComponent<{
7
+ Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
8
8
  withClosingButton?: boolean;
9
9
  } & {
10
10
  children?: import('react').ReactNode | undefined;
@@ -20,7 +20,7 @@ export declare const AssetModal: {
20
20
  AssetWithTitle: import('react').ForwardRefExoticComponent<Omit<import('./Assets/types').AssetWithTitleProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
21
21
  Backdrop: import('react').ForwardRefExoticComponent<import('./types').BackdropProps & import('react').RefAttributes<HTMLDivElement>>;
22
22
  Content: {
23
- ({ children, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
23
+ ({ children, className, ...rest }: React.PropsWithChildren<import('react').HTMLAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
24
24
  displayName: string;
25
25
  };
26
26
  Iframe: {
@@ -27,7 +27,7 @@ export interface HeaderOptions {
27
27
  }
28
28
  export type HeaderProps = MergeProps<HeaderOptions, HTMLAttributes<HTMLDivElement>>;
29
29
  export type BodyProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
30
- export type ContentProps = PropsWithChildren<{
30
+ export type ContentProps = PropsWithChildren<HTMLAttributes<HTMLDivElement> & {
31
31
  /**
32
32
  * show or hide the closing button
33
33
  */
@@ -36,6 +36,7 @@ export interface SelectOptions {
36
36
  renderGroupHeader?: (option: SelectOptionGroup) => React.ReactNode;
37
37
  renderItem?: (item: SelectOption, isItemSelected?: boolean) => React.ReactElement | string;
38
38
  renderMultiple?: (values: SelectOption[], handleRemove: (value: string) => void) => React.ReactElement;
39
+ renderNoResults?: (inputValue: SelectValue) => React.ReactNode;
39
40
  size?: Size;
40
41
  transparent?: boolean;
41
42
  value?: SelectValue;
@@ -0,0 +1,2 @@
1
+ import { TabProps } from './types';
2
+ export declare const Tab: import('../../utils').FunctionComponentWithAs<"button", TabProps>;
@@ -1,2 +1,2 @@
1
- import { TabPanelProps } from '../../types';
1
+ import { TabPanelProps } from './types';
2
2
  export declare const TabPanel: import('react').ForwardRefExoticComponent<TabPanelProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,8 +1,9 @@
1
- import { TabProps } from './types';
2
- export declare const TabComponent: import('../../utils').FunctionComponentWithAs<"button", TabProps>;
3
- export declare const Tab: import('../../utils').FunctionComponentWithAs<"button", TabProps> & {
4
- List: import('react').ForwardRefExoticComponent<import('./types').TabListProps & import('react').RefAttributes<HTMLDivElement>>;
5
- Panel: import('react').ForwardRefExoticComponent<import('./types').TabPanelProps & import('react').RefAttributes<HTMLDivElement>>;
1
+ import { default as React } from 'react';
2
+ import { TabListProps } from './types';
3
+ export declare const TabsComponent: React.ForwardRefExoticComponent<TabListProps & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const Tabs: React.ForwardRefExoticComponent<TabListProps & React.RefAttributes<HTMLDivElement>> & {
5
+ Panel: React.ForwardRefExoticComponent<import('./types').TabPanelProps & React.RefAttributes<HTMLDivElement>>;
6
+ Tab: import('../../utils').FunctionComponentWithAs<"button", import('./types').TabProps>;
6
7
  };
7
8
  export { useTabStore as useTab } from '@ariakit/react';
8
9
  export type { TabStore as UseTab, TabStoreProps as UseTabProps, TabStoreState as UseTabState, } from '@ariakit/react';
@@ -1,16 +1,7 @@
1
1
  import { TabStore, TabStoreProps } from '@ariakit/react';
2
- import { UseTab, UseTabState } from '.';
3
- export interface ActiveBarProps {
4
- activeTab: HTMLElement;
5
- listRef: React.MutableRefObject<undefined>;
6
- orientation: Omit<UseTabState['orientation'], 'both'>;
7
- }
8
- export interface ActiveBarReturn {
9
- offset?: number;
10
- orientation?: Omit<UseTabState['orientation'], 'both'>;
11
- size?: number;
12
- }
13
- export type Size = 'md' | 'sm';
2
+ import { IconName } from '../Icon/types';
3
+ import { UseTab } from './index';
4
+ export type Size = 'lg' | 'md';
14
5
  export type TabListProps = {
15
6
  children: React.ReactNode;
16
7
  className?: string;
@@ -18,8 +9,11 @@ export type TabListProps = {
18
9
  store: UseTab;
19
10
  };
20
11
  export interface TabOptions {
12
+ badge?: number | string;
21
13
  children: React.ReactNode;
22
14
  className?: string;
15
+ icon?: IconName | React.ReactNode;
16
+ iconColor?: 'blue' | 'green' | 'orange' | 'pink' | 'teal' | 'violet' | 'warm';
23
17
  id?: string;
24
18
  size?: Size;
25
19
  store: TabStore;
@@ -1,7 +1,4 @@
1
- import { default as React } from 'react';
2
- import { UseTabState } from '.';
3
- export declare const getParentScale: (element: HTMLElement | null) => number;
4
- export declare function useTrackActiveTabs(selectedId: UseTabState['selectedId'], children: React.ReactNode): {
5
- activeTab: HTMLElement | null;
6
- tabs: React.ReactNode;
7
- };
1
+ import { TabProps } from './types';
2
+ export declare function getIcon({ icon, iconColor, isActive, }: Pick<TabProps, 'icon' | 'iconColor'> & {
3
+ isActive: boolean;
4
+ }): number | true | Iterable<import('react').ReactNode> | import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "10.0.0-alpha.10",
3
+ "version": "10.0.0-alpha.12",
4
4
  "description": "Customizable design system with react, typescript, tailwindcss and ariakit.",
5
5
  "files": [
6
6
  "dist"
@@ -1,5 +0,0 @@
1
- import { ActiveBarProps } from '../../types';
2
- export declare const ActiveBar: {
3
- ({ activeTab, listRef, orientation }: ActiveBarProps): import("react/jsx-runtime").JSX.Element;
4
- displayName: string;
5
- };
@@ -1,3 +0,0 @@
1
- import { default as React } from 'react';
2
- import { TabListProps } from '../../types';
3
- export declare const TabList: React.ForwardRefExoticComponent<TabListProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,17 +0,0 @@
1
- "use client";
2
- import { useEffect as n, useLayoutEffect as o, useState as d } from "react";
3
- const r = typeof window > "u" ? n : o;
4
- function w() {
5
- const [t, e] = d({ height: void 0, width: void 0 });
6
- return r(() => {
7
- e({ height: window.innerHeight, width: window.innerWidth });
8
- function i() {
9
- e({ height: window.innerHeight, width: window.innerWidth });
10
- }
11
- return window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
12
- }, []), t;
13
- }
14
- export {
15
- r as a,
16
- w as u
17
- };
@@ -1,22 +0,0 @@
1
- "use client";
2
- import u, { useRef as o, useMemo as f } from "react";
3
- function i(e) {
4
- return u.isValidElement(e) && Object.prototype.hasOwnProperty.call(e, "ref") ? e == null ? void 0 : e.ref : null;
5
- }
6
- function s(...e) {
7
- return (t) => {
8
- e.forEach((n) => a(n, t));
9
- };
10
- }
11
- function a(e, t) {
12
- e && (typeof e == "function" && t !== void 0 ? e(t) : e.current = t ?? null);
13
- }
14
- function R(e, t) {
15
- const n = o(null), r = f(() => s(e, n, t), [e, n, t]);
16
- return [n, r];
17
- }
18
- export {
19
- i as g,
20
- s as m,
21
- R as u
22
- };