@ogcio/design-system-react 1.29.0 → 1.30.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.
Files changed (51) hide show
  1. package/README.md +11 -33
  2. package/dist/alert/variants.d.ts +78 -2
  3. package/dist/atoms/DsButton.d.ts +194 -0
  4. package/dist/atoms/DsButton.js +329 -0
  5. package/dist/atoms/icons/Close.d.ts +3 -0
  6. package/dist/atoms/icons/Close.js +22 -0
  7. package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
  8. package/dist/atoms/icons/KeyboardArrowDown.js +22 -0
  9. package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
  10. package/dist/atoms/icons/KeyboardArrowUp.js +22 -0
  11. package/dist/atoms/icons/Visibility.d.ts +3 -0
  12. package/dist/atoms/icons/Visibility.js +22 -0
  13. package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
  14. package/dist/atoms/icons/VisibilityOff.js +22 -0
  15. package/dist/atoms/icons/index.d.ts +6 -0
  16. package/dist/atoms/icons/index.js +12 -0
  17. package/dist/atoms/icons/types.d.ts +10 -0
  18. package/dist/atoms/icons/types.js +1 -0
  19. package/dist/atoms/index.d.ts +2 -0
  20. package/dist/atoms/index.js +14 -0
  21. package/dist/autocomplete/autocomplete.js +131 -115
  22. package/dist/combo-box/dropdown-item.js +39 -40
  23. package/dist/data-table/data-table-footer.js +57 -51
  24. package/dist/data-table/data-table-header.d.ts +7 -7
  25. package/dist/data-table/data-table-header.js +97 -110
  26. package/dist/data-table/data-table-selected-rows.d.ts +1 -0
  27. package/dist/data-table/data-table-selected-rows.js +15 -19
  28. package/dist/forms/form-field/form-field.d.ts +2 -2
  29. package/dist/forms/form-field/form-field.js +40 -30
  30. package/dist/forms/form-field/types.d.ts +10 -3
  31. package/dist/header/components/header-slot.js +33 -32
  32. package/dist/header/variants.d.ts +220 -20
  33. package/dist/heading/heading.d.ts +70 -2
  34. package/dist/hooks/use-breakpoint.js +15 -12
  35. package/dist/icon/icon.d.ts +10 -0
  36. package/dist/icon/icon.js +64 -52
  37. package/dist/icon/icons.d.ts +1 -1
  38. package/dist/input-password/input-password.js +13 -12
  39. package/dist/input-text/input-text.js +18 -16
  40. package/dist/label/label.d.ts +43 -0
  41. package/dist/label/label.js +7 -6
  42. package/dist/modal/modal.js +8 -7
  43. package/dist/spinner/spinner.d.ts +30 -2
  44. package/dist/styles.css +12 -2
  45. package/dist/table/table.d.ts +22 -2
  46. package/dist/tabs/tab-item.d.ts +2 -2
  47. package/dist/text-input/text-input.d.ts +1 -1
  48. package/dist/textarea/textarea.js +27 -28
  49. package/dist/toast/ds-toast.d.ts +78 -2
  50. package/fonts.css +10 -0
  51. package/package.json +12 -7
@@ -35,7 +35,41 @@ export declare const headingVariants: import('tailwind-variants').TVReturnType<{
35
35
  }, {
36
36
  text: string;
37
37
  base: string;
38
- }, undefined, TVConfig<V, EV>, {
38
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
39
+ size: {
40
+ xl: string;
41
+ lg: string;
42
+ md: string;
43
+ sm: string;
44
+ xs: string;
45
+ '2xs': string;
46
+ };
47
+ as: {
48
+ h1: string;
49
+ h2: string;
50
+ h3: string;
51
+ h4: string;
52
+ h5: string;
53
+ h6: string;
54
+ };
55
+ }, {
56
+ size: {
57
+ xl: string;
58
+ lg: string;
59
+ md: string;
60
+ sm: string;
61
+ xs: string;
62
+ '2xs': string;
63
+ };
64
+ as: {
65
+ h1: string;
66
+ h2: string;
67
+ h3: string;
68
+ h4: string;
69
+ h5: string;
70
+ h6: string;
71
+ };
72
+ }>, {
39
73
  size: {
40
74
  xl: string;
41
75
  lg: string;
@@ -75,7 +109,41 @@ export declare const headingVariants: import('tailwind-variants').TVReturnType<{
75
109
  }, {
76
110
  text: string;
77
111
  base: string;
78
- }, undefined, TVConfig<V, EV>, unknown, unknown, undefined>>;
112
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
113
+ size: {
114
+ xl: string;
115
+ lg: string;
116
+ md: string;
117
+ sm: string;
118
+ xs: string;
119
+ '2xs': string;
120
+ };
121
+ as: {
122
+ h1: string;
123
+ h2: string;
124
+ h3: string;
125
+ h4: string;
126
+ h5: string;
127
+ h6: string;
128
+ };
129
+ }, {
130
+ size: {
131
+ xl: string;
132
+ lg: string;
133
+ md: string;
134
+ sm: string;
135
+ xs: string;
136
+ '2xs': string;
137
+ };
138
+ as: {
139
+ h1: string;
140
+ h2: string;
141
+ h3: string;
142
+ h4: string;
143
+ h5: string;
144
+ h6: string;
145
+ };
146
+ }>, unknown, unknown, undefined>>;
79
147
  export type HeadingProps = VariantProps<typeof headingVariants> & {
80
148
  caption?: string;
81
149
  } & React.HTMLAttributes<HTMLHeadingElement>;
@@ -1,24 +1,27 @@
1
1
  "use client";
2
- import { useState as i, useEffect as o } from "react";
3
- const r = {
2
+ import { useState as i, useEffect as s } from "react";
3
+ const t = {
4
4
  ExtraSmall: "xs",
5
5
  Small: "sm",
6
6
  Medium: "md",
7
7
  Large: "lg",
8
8
  ExtraLarge: "xl"
9
- }, u = (e) => e < 480 ? r.ExtraSmall : e < 640 ? r.Small : e < 768 ? r.Medium : e < 1024 ? r.Large : r.ExtraLarge, c = () => {
10
- const [e, a] = i(null), [s, l] = i(null);
11
- return o(() => {
12
- const t = () => {
13
- const n = globalThis.window.innerWidth;
14
- l(n), a(u(n));
9
+ }, u = (e) => e < 480 ? t.ExtraSmall : e < 640 ? t.Small : e < 768 ? t.Medium : e < 1024 ? t.Large : t.ExtraLarge, c = () => {
10
+ const [e, l] = i(null), [a, o] = i(null);
11
+ return s(() => {
12
+ const n = () => {
13
+ const r = Math.min(
14
+ globalThis.document.documentElement.clientWidth,
15
+ globalThis.window.innerWidth
16
+ );
17
+ o(r), l(u(r));
15
18
  };
16
- return t(), globalThis.window.addEventListener("resize", t), () => {
17
- globalThis.window.removeEventListener("resize", t);
19
+ return n(), globalThis.window.addEventListener("resize", n), () => {
20
+ globalThis.window.removeEventListener("resize", n);
18
21
  };
19
- }, []), { breakpoint: e, width: s };
22
+ }, []), { breakpoint: e, width: a };
20
23
  };
21
24
  export {
22
- r as Breakpoint,
25
+ t as Breakpoint,
23
26
  c as useBreakpoint
24
27
  };
@@ -12,6 +12,11 @@ export type IconProps = {
12
12
  inline?: boolean;
13
13
  className?: string;
14
14
  onClick?: MouseEventHandler<HTMLSpanElement>;
15
+ /**
16
+ * Use font icon instead of svg
17
+ * Used as a fallback for consistency during Mitosis migration.
18
+ */
19
+ useFontIcon?: boolean;
15
20
  } & Omit<ComponentPropsWithoutRef<'span'>, 'children'>;
16
21
  export declare const Icon: import('react').ForwardRefExoticComponent<{
17
22
  icon: IconId;
@@ -23,5 +28,10 @@ export declare const Icon: import('react').ForwardRefExoticComponent<{
23
28
  inline?: boolean;
24
29
  className?: string;
25
30
  onClick?: MouseEventHandler<HTMLSpanElement>;
31
+ /**
32
+ * Use font icon instead of svg
33
+ * Used as a fallback for consistency during Mitosis migration.
34
+ */
35
+ useFontIcon?: boolean;
26
36
  } & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "children"> & import('react').RefAttributes<HTMLSpanElement>>;
27
37
  export default Icon;
package/dist/icon/icon.js CHANGED
@@ -1,86 +1,98 @@
1
1
  "use client";
2
- import { jsx as n } from "react/jsx-runtime";
2
+ import { jsx as m } from "react/jsx-runtime";
3
3
  import { forwardRef as u } from "react";
4
- import { cn as m } from "../cn.js";
5
- import _ from "./svgs/bluesky.js";
6
- import x from "./svgs/facebook.js";
7
- import h from "./svgs/instagram.js";
8
- import I from "./svgs/linkedin.js";
9
- import S from "./svgs/placeholder.js";
10
- import R from "./svgs/threads.js";
11
- import z from "./svgs/tiktok.js";
12
- import T from "./svgs/x.js";
13
- import v from "./svgs/youtube.js";
4
+ import x from "../atoms/icons/KeyboardArrowDown.js";
5
+ import h from "../atoms/icons/KeyboardArrowUp.js";
6
+ import w from "../atoms/icons/Close.js";
7
+ import I from "../atoms/icons/Visibility.js";
8
+ import S from "../atoms/icons/VisibilityOff.js";
9
+ import { cn as l } from "../cn.js";
10
+ import v from "./svgs/bluesky.js";
11
+ import A from "./svgs/facebook.js";
12
+ import R from "./svgs/instagram.js";
13
+ import z from "./svgs/linkedin.js";
14
+ import T from "./svgs/placeholder.js";
15
+ import V from "./svgs/threads.js";
16
+ import D from "./svgs/tiktok.js";
17
+ import E from "./svgs/x.js";
18
+ import F from "./svgs/youtube.js";
14
19
  const d = {
15
20
  sm: "16px",
16
21
  md: "24px",
17
22
  lg: "32px",
18
23
  xl: "48px"
19
- }, w = {
20
- social_bluesky: { Component: _, disabledClass: "gi-stroke-gray-700" },
21
- social_facebook: { Component: x, disabledClass: "gi-stroke-gray-700" },
24
+ }, G = {
25
+ social_bluesky: { Component: v, disabledClass: "gi-stroke-gray-700" },
26
+ social_facebook: { Component: A, disabledClass: "gi-stroke-gray-700" },
22
27
  social_instagram: {
23
- Component: h,
28
+ Component: R,
24
29
  disabledClass: "gi-stroke-gray-700"
25
30
  },
26
- social_linkedin: { Component: I, disabledClass: "gi-stroke-gray-700" },
27
- social_threads: { Component: R, disabledClass: "gi-stroke-gray-700" },
28
- social_tiktok: { Component: z, disabledClass: "gi-stroke-gray-700" },
29
- social_x: { Component: T, disabledClass: "gi-stroke-gray-700" },
30
- social_youtube: { Component: v, disabledClass: "gi-stroke-gray-700" },
31
- placeholder: { Component: S, disabledClass: "gi-fill-gray-700" }
32
- }, M = u(
31
+ social_linkedin: { Component: z, disabledClass: "gi-stroke-gray-700" },
32
+ social_threads: { Component: V, disabledClass: "gi-stroke-gray-700" },
33
+ social_tiktok: { Component: D, disabledClass: "gi-stroke-gray-700" },
34
+ social_x: { Component: E, disabledClass: "gi-stroke-gray-700" },
35
+ social_youtube: { Component: F, disabledClass: "gi-stroke-gray-700" },
36
+ placeholder: { Component: T },
37
+ keyboard_arrow_down: { Component: x },
38
+ keyboard_arrow_up: { Component: h },
39
+ close: { Component: w },
40
+ visibility: { Component: I },
41
+ visibility_off: { Component: S }
42
+ }, W = u(
33
43
  ({
34
- icon: i,
44
+ icon: r,
35
45
  size: g = "md",
36
- filled: c,
37
- disabled: e,
38
- ariaHidden: k,
39
- ariaLabel: a,
46
+ filled: p,
47
+ disabled: s,
48
+ ariaHidden: c,
49
+ ariaLabel: e,
40
50
  inline: o,
41
- className: r,
42
- onClick: C,
43
- ...s
44
- }, p) => {
45
- const t = d[g] ?? d.md, l = w[String(i)];
46
- if (l) {
47
- const { Component: f, disabledClass: b } = l, y = m(
51
+ className: a,
52
+ onClick: f,
53
+ useFontIcon: C,
54
+ ...i
55
+ }, b) => {
56
+ const t = d[g] ?? d.md, n = G[String(r)];
57
+ if (n && !C) {
58
+ const { Component: k, disabledClass: y } = n, _ = l(
48
59
  { "gi-block": !o, "gi-inline-block": o },
49
- e && b,
50
- r
60
+ "gi-shrink-0",
61
+ s && (y || "gi-fill-gray-700"),
62
+ a
51
63
  );
52
- return /* @__PURE__ */ n(f, { size: t, className: y });
64
+ return /* @__PURE__ */ m(k, { size: t, className: _ });
53
65
  }
54
- return /* @__PURE__ */ n(
66
+ return /* @__PURE__ */ m(
55
67
  "span",
56
68
  {
57
- "aria-hidden": k,
58
- "aria-label": a,
69
+ "aria-hidden": c,
70
+ "aria-label": e,
59
71
  "data-testid": "govie-icon",
60
- ...s,
61
- ref: p,
62
- onClick: C,
63
- role: a ? "img" : "presentation",
64
- className: m(
72
+ ...i,
73
+ ref: b,
74
+ onClick: f,
75
+ role: e ? "img" : "presentation",
76
+ className: l(
65
77
  {
66
78
  "gi-block": !o,
67
79
  "gi-inline-block": o,
68
- "gi-text-gray-700": e
80
+ "gi-text-gray-700": s
69
81
  },
70
82
  "material-symbols-outlined",
71
- r
83
+ a
72
84
  ),
73
85
  style: {
74
86
  fontSize: t,
75
- fontVariationSettings: `'FILL' ${c ? 1 : 0}, 'wght' 400, 'GRAD' 0, 'opsz' ${t}`,
76
- ...s == null ? void 0 : s.style
87
+ fontVariationSettings: `'FILL' ${p ? 1 : 0}, 'wght' 400, 'GRAD' 0, 'opsz' ${t}`,
88
+ ...i == null ? void 0 : i.style
77
89
  },
78
- children: i
90
+ children: r
79
91
  }
80
92
  );
81
93
  }
82
94
  );
83
95
  export {
84
- M as Icon,
85
- M as default
96
+ W as Icon,
97
+ W as default
86
98
  };
@@ -1,2 +1,2 @@
1
1
  export declare const iconIds: readonly ["accessibility_new", "add_circle", "apps", "arrow_back", "arrow_downward", "arrow_drop_down", "arrow_drop_up", "arrow_forward", "arrow_left_alt", "arrow_outward", "arrow_right_alt", "arrow_upward", "attach_file", "block", "call", "cancel", "candlestick_chart", "chat_bubble", "check", "check_circle", "chevron_left", "chevron_right", "child_care", "close", "content_copy", "credit_card", "delete", "directions_car", "do_not_disturb_on", "download", "edit", "error", "event", "filter_list", "health_and_safety", "home", "info", "keyboard_arrow_down", "keyboard_arrow_up", "link", "location_on", "login", "logout", "mail", "menu", "mic", "more_horiz", "more_vert", "open_in_new", "person", "person_cancel", "person_check", "refresh", "search", "send", "settings", "sort", "space_dashboard", "sync", "swap_vert", "thumb_down", "thumb_up", "unfold_more", "upload", "visibility", "visibility_off", "warning", "work", "social_bluesky", "social_facebook", "social_instagram", "social_linkedin", "social_threads", "social_tiktok", "social_x", "social_youtube", "placeholder", "first_page", "last_page"];
2
- export declare const Icons: ("accessibility_new" | "add_circle" | "apps" | "arrow_back" | "arrow_downward" | "arrow_drop_down" | "arrow_drop_up" | "arrow_forward" | "arrow_left_alt" | "arrow_outward" | "arrow_right_alt" | "arrow_upward" | "attach_file" | "block" | "call" | "cancel" | "candlestick_chart" | "chat_bubble" | "check" | "check_circle" | "chevron_left" | "chevron_right" | "child_care" | "close" | "content_copy" | "credit_card" | "delete" | "directions_car" | "do_not_disturb_on" | "download" | "edit" | "error" | "event" | "filter_list" | "health_and_safety" | "home" | "info" | "keyboard_arrow_down" | "keyboard_arrow_up" | "link" | "location_on" | "login" | "logout" | "mail" | "menu" | "mic" | "more_horiz" | "more_vert" | "open_in_new" | "person" | "person_cancel" | "person_check" | "refresh" | "search" | "send" | "settings" | "sort" | "space_dashboard" | "sync" | "swap_vert" | "thumb_down" | "thumb_up" | "unfold_more" | "upload" | "visibility" | "visibility_off" | "warning" | "work" | "social_bluesky" | "social_facebook" | "social_instagram" | "social_linkedin" | "social_threads" | "social_tiktok" | "social_x" | "social_youtube" | "placeholder" | "first_page" | "last_page")[];
2
+ export declare const Icons: ("search" | "link" | "sort" | "menu" | "keyboard_arrow_down" | "keyboard_arrow_up" | "close" | "visibility" | "accessibility_new" | "add_circle" | "apps" | "arrow_back" | "arrow_downward" | "arrow_drop_down" | "arrow_drop_up" | "arrow_forward" | "arrow_left_alt" | "arrow_outward" | "arrow_right_alt" | "arrow_upward" | "attach_file" | "block" | "call" | "cancel" | "candlestick_chart" | "chat_bubble" | "check" | "check_circle" | "chevron_left" | "chevron_right" | "child_care" | "content_copy" | "credit_card" | "delete" | "directions_car" | "do_not_disturb_on" | "download" | "edit" | "error" | "event" | "filter_list" | "health_and_safety" | "home" | "info" | "location_on" | "login" | "logout" | "mail" | "mic" | "more_horiz" | "more_vert" | "open_in_new" | "person" | "person_cancel" | "person_check" | "refresh" | "send" | "settings" | "space_dashboard" | "sync" | "swap_vert" | "thumb_down" | "thumb_up" | "unfold_more" | "upload" | "visibility_off" | "warning" | "work" | "social_bluesky" | "social_facebook" | "social_instagram" | "social_linkedin" | "social_threads" | "social_tiktok" | "social_x" | "social_youtube" | "placeholder" | "first_page" | "last_page")[];
@@ -1,34 +1,35 @@
1
1
  "use client";
2
- import { jsx as e } from "react/jsx-runtime";
3
- import { forwardRef as r, useState as c } from "react";
4
- import { InputText as l } from "../input-text/input-text.js";
5
- const u = r(
2
+ import { jsx as p } from "react/jsx-runtime";
3
+ import { forwardRef as r, useState as a } from "react";
4
+ import { InputText as c } from "../input-text/input-text.js";
5
+ const l = r(
6
6
  (o, s) => {
7
- const [t, n] = c({
7
+ const [t, e] = a({
8
8
  icon: "visibility",
9
9
  type: "password"
10
- }), p = () => {
10
+ }), n = () => {
11
11
  const i = t.type === "text";
12
- n({
12
+ e({
13
13
  type: i ? "password" : "text",
14
14
  icon: i ? "visibility" : "visibility_off"
15
15
  });
16
16
  };
17
- return /* @__PURE__ */ e(
18
- l,
17
+ return /* @__PURE__ */ p(
18
+ c,
19
19
  {
20
20
  ...o,
21
21
  type: t.type,
22
22
  inputActionButton: {
23
23
  icon: t.icon,
24
- onClick: p
24
+ onClick: n,
25
+ ariaLabel: t.type === "text" ? "show" : "hide"
25
26
  },
26
27
  ref: s
27
28
  }
28
29
  );
29
30
  }
30
31
  );
31
- u.displayName = "InputPassword";
32
+ l.displayName = "InputPassword";
32
33
  export {
33
- u as InputPassword
34
+ l as InputPassword
34
35
  };
@@ -24,7 +24,9 @@ const H = d(
24
24
  __origin: "clear_button"
25
25
  };
26
26
  a && a(f);
27
- }
27
+ },
28
+ ariaLabel: "Clear input"
29
+ // TODO I18N: translation
28
30
  }
29
31
  }
30
32
  );
@@ -35,18 +37,18 @@ const H = d(
35
37
  inputActionButton: e,
36
38
  inputActionPosition: r = "beforeSuffix",
37
39
  suffix: t,
38
- halfFluid: l = !1,
40
+ halfFluid: s = !1,
39
41
  className: f,
40
42
  type: g = "text",
41
43
  iconStart: c,
42
44
  iconStartClassName: v,
43
45
  onIconStartClick: N,
44
- iconEnd: s,
46
+ iconEnd: l,
45
47
  iconEndClassName: T,
46
48
  onIconEndClick: C,
47
49
  disabled: i,
48
- inputClassName: w,
49
- iconEndRef: b,
50
+ inputClassName: b,
51
+ iconEndRef: w,
50
52
  containerProps: k,
51
53
  ...o
52
54
  }, z) => {
@@ -55,7 +57,7 @@ const H = d(
55
57
  {
56
58
  className: "gi-input-text-action-before-suffix",
57
59
  "data-suffix": !!t,
58
- "data-has-icon-end": !!s,
60
+ "data-has-icon-end": !!l,
59
61
  children: /* @__PURE__ */ n(p, { ...e, disabled: i })
60
62
  }
61
63
  ) : null, [e]);
@@ -70,7 +72,7 @@ const H = d(
70
72
  "div",
71
73
  {
72
74
  className: u("gi-input-text-inner", {
73
- "gi-input-half-width": l
75
+ "gi-input-half-width": s
74
76
  }),
75
77
  children: [
76
78
  c && /* @__PURE__ */ n(
@@ -94,26 +96,26 @@ const H = d(
94
96
  {
95
97
  type: g,
96
98
  "data-icon-start": !!c,
97
- "data-icon-end": !!s,
99
+ "data-icon-end": !!l,
98
100
  "data-end-element": !!e,
99
101
  "data-prefix": !!a,
100
102
  "data-suffix": !!t,
101
103
  "data-testid": o.dataTestId,
102
- className: u("gi-input-text", w),
104
+ className: u("gi-input-text", b),
103
105
  ref: z,
104
106
  disabled: i,
105
107
  ...o
106
108
  }
107
109
  ),
108
- s && /* @__PURE__ */ n(
110
+ l && /* @__PURE__ */ n(
109
111
  "div",
110
112
  {
111
113
  className: u("gi-input-text-icon-end", T),
112
114
  "data-end-element": !!e && r === "afterSuffix",
113
115
  "data-suffix": !!t,
114
116
  onClick: C,
115
- ref: b,
116
- children: typeof s == "string" ? /* @__PURE__ */ n(x, { icon: s, size: "md", disabled: i }) : s
117
+ ref: w,
118
+ children: typeof l == "string" ? /* @__PURE__ */ n(x, { icon: l, size: "md", disabled: i }) : l
117
119
  }
118
120
  ),
119
121
  R
@@ -131,11 +133,11 @@ const H = d(
131
133
  ariaLabel: e,
132
134
  icon: r,
133
135
  dataTestId: t,
134
- ...l
136
+ ...s
135
137
  }) => /* @__PURE__ */ n(
136
138
  O,
137
139
  {
138
- ...l,
140
+ ...s,
139
141
  icon: {
140
142
  icon: r
141
143
  },
@@ -150,7 +152,7 @@ const H = d(
150
152
  ({ type: a = "text", clearButtonEnabled: e, ...r }, t) => e || a === "search" ? /* @__PURE__ */ n(H, { ref: t, type: a, ...r }) : /* @__PURE__ */ n(h, { ref: t, type: a, ...r })
151
153
  );
152
154
  I.displayName = "InputText";
153
- const F = d(({ type: a = "text", error: e, ...r }, t) => /* @__PURE__ */ n(
155
+ const D = d(({ type: a = "text", error: e, ...r }, t) => /* @__PURE__ */ n(
154
156
  I,
155
157
  {
156
158
  ...r,
@@ -166,5 +168,5 @@ const F = d(({ type: a = "text", error: e, ...r }, t) => /* @__PURE__ */ n(
166
168
  export {
167
169
  p as InputActionButton,
168
170
  I as InputText,
169
- F as InputTextTableCell
171
+ D as InputTextTableCell
170
172
  };
@@ -3,6 +3,49 @@ export declare const LabelSize: {
3
3
  readonly Medium: "md";
4
4
  readonly Large: "lg";
5
5
  };
6
+ export declare const styles: import('tailwind-variants').TVReturnType<{
7
+ size: {
8
+ sm: string;
9
+ md: string;
10
+ lg: string;
11
+ };
12
+ }, undefined, "gi-label", import('tailwind-variants/dist/config.js').TVConfig<{
13
+ size: {
14
+ sm: string;
15
+ md: string;
16
+ lg: string;
17
+ };
18
+ }, {
19
+ size: {
20
+ sm: string;
21
+ md: string;
22
+ lg: string;
23
+ };
24
+ }>, {
25
+ size: {
26
+ sm: string;
27
+ md: string;
28
+ lg: string;
29
+ };
30
+ }, undefined, import('tailwind-variants').TVReturnType<{
31
+ size: {
32
+ sm: string;
33
+ md: string;
34
+ lg: string;
35
+ };
36
+ }, undefined, "gi-label", import('tailwind-variants/dist/config.js').TVConfig<{
37
+ size: {
38
+ sm: string;
39
+ md: string;
40
+ lg: string;
41
+ };
42
+ }, {
43
+ size: {
44
+ sm: string;
45
+ md: string;
46
+ lg: string;
47
+ };
48
+ }>, unknown, unknown, undefined>>;
6
49
  export declare const Label: import('react').ForwardRefExoticComponent<import('react').LabelHTMLAttributes<HTMLLabelElement> & {
7
50
  text?: string | React.ReactElement;
8
51
  size?: import('./types.js').LabelSizeType;
@@ -1,4 +1,4 @@
1
- import { jsx as s } from "react/jsx-runtime";
1
+ import { jsx as i } from "react/jsx-runtime";
2
2
  import { forwardRef as r } from "react";
3
3
  import { c as o } from "../index-CB-zPpNk.js";
4
4
  const d = {
@@ -17,11 +17,12 @@ const d = {
17
17
  defaultVariants: {
18
18
  size: "md"
19
19
  }
20
- }), b = r(
21
- ({ text: e, size: a = d.Medium, className: l, children: m, ...t }, i) => /* @__PURE__ */ s("label", { className: g({ size: a, className: l }), ref: i, ...t, children: m ?? e })
20
+ }), c = r(
21
+ ({ text: e, size: a = d.Medium, className: m, children: s, ...t }, l) => /* @__PURE__ */ i("label", { className: g({ size: a, className: m }), ref: l, ...t, children: s ?? e })
22
22
  );
23
- b.displayName = "Label";
23
+ c.displayName = "Label";
24
24
  export {
25
- b as Label,
26
- d as LabelSize
25
+ c as Label,
26
+ d as LabelSize,
27
+ g as styles
27
28
  };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as i, jsxs as y, Fragment as j } from "react/jsx-runtime";
3
- import { isValidElement as U, cloneElement as N, useState as A, useRef as W, useMemo as _, Children as z, useId as G, useEffect as C } from "react";
3
+ import { isValidElement as U, cloneElement as T, useState as A, useRef as W, useMemo as _, Children as z, useId as G, useEffect as C } from "react";
4
4
  import { createPortal as J } from "react-dom";
5
5
  import { Button as E } from "../button/button.js";
6
6
  import { cn as u } from "../cn.js";
@@ -45,6 +45,7 @@ const I = {
45
45
  variant: "flat",
46
46
  size: t,
47
47
  appearance: "dark",
48
+ dataTestid: "modal-close-button",
48
49
  ...o
49
50
  }
50
51
  );
@@ -85,12 +86,12 @@ const I = {
85
86
  const [D, S] = _(
86
87
  () => R(v),
87
88
  [v]
88
- ), F = z.toArray(g), T = (m) => F.find(
89
+ ), F = z.toArray(g), b = (m) => F.find(
89
90
  (p) => et(p) === m
90
- ), f = T("ModalTitle"), b = T("ModalFooter") || T("DrawerFooter"), L = G(), H = ((k = f == null ? void 0 : f.props) == null ? void 0 : k.id) || `gi-modal-title-${L}`, $ = f ? N(f, {
91
+ ), f = b("ModalTitle"), N = b("ModalFooter") || b("DrawerFooter"), L = G(), H = ((k = f == null ? void 0 : f.props) == null ? void 0 : k.id) || `gi-modal-title-${L}`, $ = f ? T(f, {
91
92
  as: t === "sm" ? "h5" : "h4",
92
93
  id: H
93
- }) : null, V = b ? N(b, {
94
+ }) : null, V = N ? T(N, {
94
95
  dataModalSize: t
95
96
  }) : null, q = F.filter(
96
97
  (m) => !tt(m, ["ModalTitle", "ModalFooter", "DrawerFooter"])
@@ -159,7 +160,7 @@ const I = {
159
160
  closeButtonSize: a
160
161
  }
161
162
  ),
162
- /* @__PURE__ */ y("div", { className: u({ "gi-pb-6": !b }), children: [
163
+ /* @__PURE__ */ y("div", { className: u({ "gi-pb-6": !N }), children: [
163
164
  q,
164
165
  V
165
166
  ] })
@@ -223,7 +224,7 @@ const ht = ({
223
224
  children: d.map(
224
225
  (a, l) => {
225
226
  var c;
226
- return N(a, {
227
+ return T(a, {
227
228
  key: a.key || a.props.id || a.props.dataTestid || `modal-footer-button-${l}`,
228
229
  id: a.props.id || `modal-footer-button-${l}`,
229
230
  className: u((c = a == null ? void 0 : a.props) == null ? void 0 : c.className, g)
@@ -259,7 +260,7 @@ const nt = ({
259
260
  startsOpen: o,
260
261
  ...n
261
262
  }) => {
262
- const [r, s] = A(!!o), h = () => s(!0), d = () => s(!1), g = N(t, {
263
+ const [r, s] = A(!!o), h = () => s(!0), d = () => s(!1), g = T(t, {
263
264
  "data-testid": "modal-trigger-button-container",
264
265
  "aria-haspopup": "dialog",
265
266
  onClick: h
@@ -12,7 +12,21 @@ declare const spinnerVariants: import('tailwind-variants').TVReturnType<{
12
12
  md: string;
13
13
  sm: string;
14
14
  };
15
- }, undefined, undefined, TVConfig<V, EV>, {
15
+ }, undefined, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
16
+ size: {
17
+ xl: string;
18
+ lg: string;
19
+ md: string;
20
+ sm: string;
21
+ };
22
+ }, {
23
+ size: {
24
+ xl: string;
25
+ lg: string;
26
+ md: string;
27
+ sm: string;
28
+ };
29
+ }>, {
16
30
  size: {
17
31
  xl: string;
18
32
  lg: string;
@@ -26,7 +40,21 @@ declare const spinnerVariants: import('tailwind-variants').TVReturnType<{
26
40
  md: string;
27
41
  sm: string;
28
42
  };
29
- }, undefined, undefined, TVConfig<V, EV>, unknown, unknown, undefined>>;
43
+ }, undefined, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
44
+ size: {
45
+ xl: string;
46
+ lg: string;
47
+ md: string;
48
+ sm: string;
49
+ };
50
+ }, {
51
+ size: {
52
+ xl: string;
53
+ lg: string;
54
+ md: string;
55
+ sm: string;
56
+ };
57
+ }>, unknown, unknown, undefined>>;
30
58
  export type SpinnerProps = VariantProps<typeof spinnerVariants> & {
31
59
  inline?: boolean;
32
60
  dataTestid?: string;