@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.
- package/README.md +11 -33
- package/dist/alert/variants.d.ts +78 -2
- package/dist/atoms/DsButton.d.ts +194 -0
- package/dist/atoms/DsButton.js +329 -0
- package/dist/atoms/icons/Close.d.ts +3 -0
- package/dist/atoms/icons/Close.js +22 -0
- package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowDown.js +22 -0
- package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
- package/dist/atoms/icons/KeyboardArrowUp.js +22 -0
- package/dist/atoms/icons/Visibility.d.ts +3 -0
- package/dist/atoms/icons/Visibility.js +22 -0
- package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
- package/dist/atoms/icons/VisibilityOff.js +22 -0
- package/dist/atoms/icons/index.d.ts +6 -0
- package/dist/atoms/icons/index.js +12 -0
- package/dist/atoms/icons/types.d.ts +10 -0
- package/dist/atoms/icons/types.js +1 -0
- package/dist/atoms/index.d.ts +2 -0
- package/dist/atoms/index.js +14 -0
- package/dist/autocomplete/autocomplete.js +131 -115
- package/dist/combo-box/dropdown-item.js +39 -40
- package/dist/data-table/data-table-footer.js +57 -51
- package/dist/data-table/data-table-header.d.ts +7 -7
- package/dist/data-table/data-table-header.js +97 -110
- package/dist/data-table/data-table-selected-rows.d.ts +1 -0
- package/dist/data-table/data-table-selected-rows.js +15 -19
- package/dist/forms/form-field/form-field.d.ts +2 -2
- package/dist/forms/form-field/form-field.js +40 -30
- package/dist/forms/form-field/types.d.ts +10 -3
- package/dist/header/components/header-slot.js +33 -32
- package/dist/header/variants.d.ts +220 -20
- package/dist/heading/heading.d.ts +70 -2
- package/dist/hooks/use-breakpoint.js +15 -12
- package/dist/icon/icon.d.ts +10 -0
- package/dist/icon/icon.js +64 -52
- package/dist/icon/icons.d.ts +1 -1
- package/dist/input-password/input-password.js +13 -12
- package/dist/input-text/input-text.js +18 -16
- package/dist/label/label.d.ts +43 -0
- package/dist/label/label.js +7 -6
- package/dist/modal/modal.js +8 -7
- package/dist/spinner/spinner.d.ts +30 -2
- package/dist/styles.css +12 -2
- package/dist/table/table.d.ts +22 -2
- package/dist/tabs/tab-item.d.ts +2 -2
- package/dist/text-input/text-input.d.ts +1 -1
- package/dist/textarea/textarea.js +27 -28
- package/dist/toast/ds-toast.d.ts +78 -2
- package/fonts.css +10 -0
- 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<
|
|
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<
|
|
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
|
|
3
|
-
const
|
|
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 ?
|
|
10
|
-
const [e,
|
|
11
|
-
return
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
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
|
|
17
|
-
globalThis.window.removeEventListener("resize",
|
|
19
|
+
return n(), globalThis.window.addEventListener("resize", n), () => {
|
|
20
|
+
globalThis.window.removeEventListener("resize", n);
|
|
18
21
|
};
|
|
19
|
-
}, []), { breakpoint: e, width:
|
|
22
|
+
}, []), { breakpoint: e, width: a };
|
|
20
23
|
};
|
|
21
24
|
export {
|
|
22
|
-
|
|
25
|
+
t as Breakpoint,
|
|
23
26
|
c as useBreakpoint
|
|
24
27
|
};
|
package/dist/icon/icon.d.ts
CHANGED
|
@@ -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
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as u } from "react";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
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
|
-
},
|
|
20
|
-
social_bluesky: { Component:
|
|
21
|
-
social_facebook: { Component:
|
|
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:
|
|
28
|
+
Component: R,
|
|
24
29
|
disabledClass: "gi-stroke-gray-700"
|
|
25
30
|
},
|
|
26
|
-
social_linkedin: { Component:
|
|
27
|
-
social_threads: { Component:
|
|
28
|
-
social_tiktok: { Component:
|
|
29
|
-
social_x: { Component:
|
|
30
|
-
social_youtube: { Component:
|
|
31
|
-
placeholder: { Component:
|
|
32
|
-
|
|
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:
|
|
44
|
+
icon: r,
|
|
35
45
|
size: g = "md",
|
|
36
|
-
filled:
|
|
37
|
-
disabled:
|
|
38
|
-
ariaHidden:
|
|
39
|
-
ariaLabel:
|
|
46
|
+
filled: p,
|
|
47
|
+
disabled: s,
|
|
48
|
+
ariaHidden: c,
|
|
49
|
+
ariaLabel: e,
|
|
40
50
|
inline: o,
|
|
41
|
-
className:
|
|
42
|
-
onClick:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
50
|
-
|
|
60
|
+
"gi-shrink-0",
|
|
61
|
+
s && (y || "gi-fill-gray-700"),
|
|
62
|
+
a
|
|
51
63
|
);
|
|
52
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ m(k, { size: t, className: _ });
|
|
53
65
|
}
|
|
54
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ m(
|
|
55
67
|
"span",
|
|
56
68
|
{
|
|
57
|
-
"aria-hidden":
|
|
58
|
-
"aria-label":
|
|
69
|
+
"aria-hidden": c,
|
|
70
|
+
"aria-label": e,
|
|
59
71
|
"data-testid": "govie-icon",
|
|
60
|
-
...
|
|
61
|
-
ref:
|
|
62
|
-
onClick:
|
|
63
|
-
role:
|
|
64
|
-
className:
|
|
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":
|
|
80
|
+
"gi-text-gray-700": s
|
|
69
81
|
},
|
|
70
82
|
"material-symbols-outlined",
|
|
71
|
-
|
|
83
|
+
a
|
|
72
84
|
),
|
|
73
85
|
style: {
|
|
74
86
|
fontSize: t,
|
|
75
|
-
fontVariationSettings: `'FILL' ${
|
|
76
|
-
...
|
|
87
|
+
fontVariationSettings: `'FILL' ${p ? 1 : 0}, 'wght' 400, 'GRAD' 0, 'opsz' ${t}`,
|
|
88
|
+
...i == null ? void 0 : i.style
|
|
77
89
|
},
|
|
78
|
-
children:
|
|
90
|
+
children: r
|
|
79
91
|
}
|
|
80
92
|
);
|
|
81
93
|
}
|
|
82
94
|
);
|
|
83
95
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
96
|
+
W as Icon,
|
|
97
|
+
W as default
|
|
86
98
|
};
|
package/dist/icon/icons.d.ts
CHANGED
|
@@ -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" | "
|
|
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
|
|
3
|
-
import { forwardRef as r, useState as
|
|
4
|
-
import { InputText as
|
|
5
|
-
const
|
|
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,
|
|
7
|
+
const [t, e] = a({
|
|
8
8
|
icon: "visibility",
|
|
9
9
|
type: "password"
|
|
10
|
-
}),
|
|
10
|
+
}), n = () => {
|
|
11
11
|
const i = t.type === "text";
|
|
12
|
-
|
|
12
|
+
e({
|
|
13
13
|
type: i ? "password" : "text",
|
|
14
14
|
icon: i ? "visibility" : "visibility_off"
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
|
|
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:
|
|
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
|
-
|
|
32
|
+
l.displayName = "InputPassword";
|
|
32
33
|
export {
|
|
33
|
-
|
|
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:
|
|
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:
|
|
46
|
+
iconEnd: l,
|
|
45
47
|
iconEndClassName: T,
|
|
46
48
|
onIconEndClick: C,
|
|
47
49
|
disabled: i,
|
|
48
|
-
inputClassName:
|
|
49
|
-
iconEndRef:
|
|
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": !!
|
|
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":
|
|
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": !!
|
|
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",
|
|
104
|
+
className: u("gi-input-text", b),
|
|
103
105
|
ref: z,
|
|
104
106
|
disabled: i,
|
|
105
107
|
...o
|
|
106
108
|
}
|
|
107
109
|
),
|
|
108
|
-
|
|
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:
|
|
116
|
-
children: typeof
|
|
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
|
-
...
|
|
136
|
+
...s
|
|
135
137
|
}) => /* @__PURE__ */ n(
|
|
136
138
|
O,
|
|
137
139
|
{
|
|
138
|
-
...
|
|
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
|
|
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
|
-
|
|
171
|
+
D as InputTextTableCell
|
|
170
172
|
};
|
package/dist/label/label.d.ts
CHANGED
|
@@ -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;
|
package/dist/label/label.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
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
|
-
}),
|
|
21
|
-
({ text: e, size: a = d.Medium, className:
|
|
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
|
-
|
|
23
|
+
c.displayName = "Label";
|
|
24
24
|
export {
|
|
25
|
-
|
|
26
|
-
d as LabelSize
|
|
25
|
+
c as Label,
|
|
26
|
+
d as LabelSize,
|
|
27
|
+
g as styles
|
|
27
28
|
};
|
package/dist/modal/modal.js
CHANGED
|
@@ -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
|
|
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),
|
|
89
|
+
), F = z.toArray(g), b = (m) => F.find(
|
|
89
90
|
(p) => et(p) === m
|
|
90
|
-
), 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 =
|
|
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": !
|
|
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
|
|
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 =
|
|
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<
|
|
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<
|
|
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;
|