@ogcio/design-system-react 1.11.1 → 1.11.3

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 (293) hide show
  1. package/dist/accordion/accordion-item.d.ts +11 -0
  2. package/dist/accordion/accordion-item.js +76 -0
  3. package/dist/accordion/accordion.d.ts +10 -0
  4. package/dist/accordion/accordion.js +39 -0
  5. package/dist/alert/alert.d.ts +89 -0
  6. package/dist/alert/alert.js +115 -0
  7. package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.d.ts +2 -0
  8. package/dist/assets/logos/gov-of-ireland/harp-gold-text-green.js +322 -0
  9. package/dist/assets/logos/gov-of-ireland/harp-white.d.ts +2 -0
  10. package/dist/assets/logos/gov-of-ireland/harp-white.js +322 -0
  11. package/dist/assets/logos/harp/harp-white.d.ts +2 -0
  12. package/dist/assets/logos/harp/harp-white.js +60 -0
  13. package/dist/autocomplete/autocomplete.d.ts +4 -0
  14. package/dist/autocomplete/autocomplete.js +252 -0
  15. package/dist/autocomplete/types.d.ts +61 -0
  16. package/dist/autocomplete/types.js +13 -0
  17. package/dist/blockquote/blockquote.d.ts +3 -0
  18. package/dist/blockquote/blockquote.js +7 -0
  19. package/dist/breadcrumbs/breadcrumbs.d.ts +5 -0
  20. package/dist/breadcrumbs/breadcrumbs.js +38 -0
  21. package/dist/breadcrumbs/types.d.ts +17 -0
  22. package/dist/breadcrumbs/types.js +1 -0
  23. package/dist/button/button.d.ts +9 -0
  24. package/dist/button/button.js +38 -0
  25. package/dist/button/helpers.d.ts +13 -0
  26. package/dist/button/helpers.js +39 -0
  27. package/dist/button/types.d.ts +13 -0
  28. package/dist/button/types.js +4 -0
  29. package/dist/button-group/button-group.d.ts +21 -0
  30. package/dist/button-group/button-group.js +85 -0
  31. package/dist/card/card-legacy.d.ts +5 -0
  32. package/dist/card/card-legacy.js +68 -0
  33. package/dist/card/card-next.d.ts +13 -0
  34. package/dist/card/card-next.js +84 -0
  35. package/dist/card/card.d.ts +2 -0
  36. package/dist/card/card.js +26 -0
  37. package/dist/card/types.d.ts +92 -0
  38. package/dist/card/types.js +1 -0
  39. package/dist/checkbox/checkbox-group.d.ts +4 -0
  40. package/dist/checkbox/checkbox-group.js +7 -0
  41. package/dist/checkbox/checkbox.d.ts +4 -0
  42. package/dist/checkbox/checkbox.js +7 -0
  43. package/dist/checkbox/types.d.ts +14 -0
  44. package/dist/checkbox/types.js +5 -0
  45. package/dist/chip/chip.d.ts +9 -0
  46. package/dist/chip/chip.js +37 -0
  47. package/dist/cn.d.ts +2 -0
  48. package/dist/cn.js +19 -0
  49. package/dist/combo-box/combo-box.content.d.ts +12 -0
  50. package/dist/combo-box/combo-box.content.js +685 -0
  51. package/dist/combo-box/combo-box.d.ts +2 -0
  52. package/dist/combo-box/combo-box.js +17 -0
  53. package/dist/combo-box/dropdown-item.d.ts +2 -0
  54. package/dist/combo-box/dropdown-item.js +154 -0
  55. package/dist/combo-box/types.d.ts +18 -0
  56. package/dist/combo-box/types.js +1 -0
  57. package/dist/common/types.d.ts +7 -0
  58. package/dist/common/types.js +1 -0
  59. package/dist/container/container.d.ts +16 -0
  60. package/dist/container/container.js +37 -0
  61. package/dist/cookie-banner/cookie-banner.content.d.ts +3 -0
  62. package/dist/cookie-banner/cookie-banner.content.js +21 -0
  63. package/dist/cookie-banner/cookie-banner.d.ts +12 -0
  64. package/dist/cookie-banner/cookie-banner.js +31 -0
  65. package/dist/details/details.d.ts +4 -0
  66. package/dist/details/details.js +55 -0
  67. package/dist/drawer/drawer.content.d.ts +3 -0
  68. package/dist/drawer/drawer.content.js +68 -0
  69. package/dist/drawer/drawer.d.ts +26 -0
  70. package/dist/drawer/drawer.js +48 -0
  71. package/dist/error-text/error-text.d.ts +7 -0
  72. package/dist/error-text/error-text.js +40 -0
  73. package/dist/error-text/types.d.ts +8 -0
  74. package/dist/error-text/types.js +1 -0
  75. package/dist/file-upload/file-upload.d.ts +9 -0
  76. package/dist/file-upload/file-upload.js +6 -0
  77. package/dist/footer/footer.d.ts +11 -0
  78. package/dist/footer/footer.js +108 -0
  79. package/dist/forms/form-field-with-tag/form-field-with-tag.d.ts +24 -0
  80. package/dist/forms/form-field-with-tag/form-field-with-tag.js +50 -0
  81. package/dist/forms/form-field.d.ts +11 -0
  82. package/dist/forms/form-field.js +41 -0
  83. package/dist/forms/form.d.ts +4 -0
  84. package/dist/forms/form.js +5 -0
  85. package/dist/header/components/header-menu.d.ts +13 -0
  86. package/dist/header/components/header-menu.js +126 -0
  87. package/dist/header/components/header-search.d.ts +7 -0
  88. package/dist/header/components/header-search.js +59 -0
  89. package/dist/header/components/header-slot.d.ts +12 -0
  90. package/dist/header/components/header-slot.js +129 -0
  91. package/dist/header/header.d.ts +2 -0
  92. package/dist/header/header.js +201 -0
  93. package/dist/header/helper.d.ts +2 -0
  94. package/dist/header/helper.js +79 -0
  95. package/dist/header/types.d.ts +76 -0
  96. package/dist/header/types.js +1 -0
  97. package/dist/heading/heading.d.ts +82 -0
  98. package/dist/heading/heading.js +50 -0
  99. package/dist/hint-text/hint-text.d.ts +7 -0
  100. package/dist/hint-text/hint-text.js +30 -0
  101. package/dist/hint-text/types.d.ts +7 -0
  102. package/dist/hint-text/types.js +1 -0
  103. package/dist/hooks/use-breakpoint.d.ts +12 -0
  104. package/dist/hooks/use-breakpoint.js +24 -0
  105. package/dist/hooks/use-dom-id.d.ts +1 -0
  106. package/dist/hooks/use-dom-id.js +8 -0
  107. package/dist/i18n/config.d.ts +7 -0
  108. package/dist/i18n/config.js +13 -0
  109. package/dist/i18n/utility.d.ts +1 -0
  110. package/dist/i18n/utility.js +5 -0
  111. package/dist/i18next-DxWa09nx.js +1395 -0
  112. package/dist/icon/icon.d.ts +15 -0
  113. package/dist/icon/icon.js +173 -0
  114. package/dist/icon/icons.d.ts +2 -0
  115. package/dist/icon/icons.js +144 -0
  116. package/dist/icon/svg.d.ts +7 -0
  117. package/dist/icon/svg.js +22 -0
  118. package/dist/icon/svgs/bluesky.d.ts +5 -0
  119. package/dist/icon/svgs/bluesky.js +24 -0
  120. package/dist/icon/svgs/facebook.d.ts +5 -0
  121. package/dist/icon/svgs/facebook.js +24 -0
  122. package/dist/icon/svgs/instagram.d.ts +5 -0
  123. package/dist/icon/svgs/instagram.js +24 -0
  124. package/dist/icon/svgs/linkedin.d.ts +5 -0
  125. package/dist/icon/svgs/linkedin.js +24 -0
  126. package/dist/icon/svgs/placeholder.d.ts +5 -0
  127. package/dist/icon/svgs/placeholder.js +30 -0
  128. package/dist/icon/svgs/threads.d.ts +5 -0
  129. package/dist/icon/svgs/threads.js +24 -0
  130. package/dist/icon/svgs/tiktok.d.ts +5 -0
  131. package/dist/icon/svgs/tiktok.js +24 -0
  132. package/dist/icon/svgs/x.d.ts +5 -0
  133. package/dist/icon/svgs/x.js +24 -0
  134. package/dist/icon/svgs/youtube.d.ts +5 -0
  135. package/dist/icon/svgs/youtube.js +29 -0
  136. package/dist/icon-button/icon-button.d.ts +10 -0
  137. package/dist/icon-button/icon-button.js +43 -0
  138. package/dist/index-DNkhmzZp.js +2419 -0
  139. package/dist/index-ntYL1VRC.js +64 -0
  140. package/dist/index.d.ts +102 -0
  141. package/dist/index.js +190 -0
  142. package/dist/input-checkbox/input-checkbox.d.ts +3 -0
  143. package/dist/input-checkbox/input-checkbox.js +51 -0
  144. package/dist/input-checkbox/types.d.ts +12 -0
  145. package/dist/input-checkbox/types.js +8 -0
  146. package/dist/input-checkbox-group/input-checkbox-group.d.ts +2 -0
  147. package/dist/input-checkbox-group/input-checkbox-group.js +24 -0
  148. package/dist/input-checkbox-group/types.d.ts +7 -0
  149. package/dist/input-checkbox-group/types.js +1 -0
  150. package/dist/input-file/input-file.d.ts +2 -0
  151. package/dist/input-file/input-file.js +20 -0
  152. package/dist/input-file/types.d.ts +1 -0
  153. package/dist/input-file/types.js +1 -0
  154. package/dist/input-password/input-password.d.ts +2 -0
  155. package/dist/input-password/input-password.js +30 -0
  156. package/dist/input-password/types.d.ts +2 -0
  157. package/dist/input-password/types.js +1 -0
  158. package/dist/input-radio/input-radio.d.ts +3 -0
  159. package/dist/input-radio/input-radio.js +68 -0
  160. package/dist/input-radio/types.d.ts +14 -0
  161. package/dist/input-radio/types.js +8 -0
  162. package/dist/input-radio-group/input-radio-group.d.ts +3 -0
  163. package/dist/input-radio-group/input-radio-group.js +28 -0
  164. package/dist/input-radio-group/types.d.ts +5 -0
  165. package/dist/input-radio-group/types.js +1 -0
  166. package/dist/input-text/input-text.d.ts +19 -0
  167. package/dist/input-text/input-text.js +140 -0
  168. package/dist/input-text/type.d.ts +27 -0
  169. package/dist/input-text/type.js +1 -0
  170. package/dist/label/label.d.ts +11 -0
  171. package/dist/label/label.js +27 -0
  172. package/dist/label/types.d.ts +7 -0
  173. package/dist/label/types.js +1 -0
  174. package/dist/link/link.d.ts +47 -0
  175. package/dist/link/link.js +104 -0
  176. package/dist/list/list.d.ts +13 -0
  177. package/dist/list/list.js +44 -0
  178. package/dist/list-item/list-item.d.ts +9 -0
  179. package/dist/list-item/list-item.js +19 -0
  180. package/dist/modal/modal.content.d.ts +2 -0
  181. package/dist/modal/modal.content.js +19 -0
  182. package/dist/modal/modal.d.ts +11 -0
  183. package/dist/modal/modal.js +222 -0
  184. package/dist/modal/types.d.ts +39 -0
  185. package/dist/modal/types.js +1 -0
  186. package/dist/pagination/pagination.d.ts +8 -0
  187. package/dist/pagination/pagination.js +104 -0
  188. package/dist/paragraph/paragraph.d.ts +17 -0
  189. package/dist/paragraph/paragraph.js +60 -0
  190. package/dist/phase-banner/phase-banner.d.ts +5 -0
  191. package/dist/phase-banner/phase-banner.js +10 -0
  192. package/dist/popover/popover.d.ts +2 -0
  193. package/dist/popover/popover.js +946 -0
  194. package/dist/popover/types.d.ts +10 -0
  195. package/dist/popover/types.js +1 -0
  196. package/dist/primitives/anchor.d.ts +7 -0
  197. package/dist/primitives/anchor.js +14 -0
  198. package/dist/primitives/input.d.ts +3 -0
  199. package/dist/primitives/input.js +9 -0
  200. package/dist/progress-bar/progress-bar.d.ts +7 -0
  201. package/dist/progress-bar/progress-bar.js +40 -0
  202. package/dist/progress-stepper/progress-stepper.d.ts +5 -0
  203. package/dist/progress-stepper/progress-stepper.js +198 -0
  204. package/dist/progress-stepper/types.d.ts +49 -0
  205. package/dist/progress-stepper/types.js +7 -0
  206. package/dist/radio/radio-group.d.ts +4 -0
  207. package/dist/radio/radio-group.js +7 -0
  208. package/dist/radio/radio.d.ts +4 -0
  209. package/dist/radio/radio.js +7 -0
  210. package/dist/radio/types.d.ts +14 -0
  211. package/dist/radio/types.js +5 -0
  212. package/dist/score-select/score-select.d.ts +3 -0
  213. package/dist/score-select/score-select.js +124 -0
  214. package/dist/score-select/type.d.ts +14 -0
  215. package/dist/score-select/type.js +1 -0
  216. package/dist/section-break/section-break.d.ts +7 -0
  217. package/dist/section-break/section-break.js +38 -0
  218. package/dist/select/select-menu.d.ts +7 -0
  219. package/dist/select/select-menu.js +141 -0
  220. package/dist/select/select-native.d.ts +5 -0
  221. package/dist/select/select-native.js +27 -0
  222. package/dist/select/select-next.d.ts +5 -0
  223. package/dist/select/select-next.js +162 -0
  224. package/dist/select/select.d.ts +5 -0
  225. package/dist/select/select.js +10 -0
  226. package/dist/select/types.d.ts +62 -0
  227. package/dist/select/types.js +1 -0
  228. package/dist/side-nav/side-nav.d.ts +6 -0
  229. package/dist/side-nav/side-nav.js +171 -0
  230. package/dist/side-nav/types.d.ts +18 -0
  231. package/dist/side-nav/types.js +1 -0
  232. package/dist/spinner/spinner.d.ts +35 -0
  233. package/dist/spinner/spinner.js +84 -0
  234. package/dist/stack/stack.d.ts +3 -0
  235. package/dist/stack/stack.js +186 -0
  236. package/dist/stack/types.d.ts +32 -0
  237. package/dist/stack/types.js +1 -0
  238. package/dist/styles.css +3 -0
  239. package/dist/summary-list/summary-list.d.ts +14 -0
  240. package/dist/summary-list/summary-list.js +46 -0
  241. package/dist/summary-list/types.d.ts +20 -0
  242. package/dist/summary-list/types.js +1 -0
  243. package/dist/table/caption.d.ts +5 -0
  244. package/dist/table/caption.js +15 -0
  245. package/dist/table/column-group.d.ts +2 -0
  246. package/dist/table/column-group.js +10 -0
  247. package/dist/table/column.d.ts +2 -0
  248. package/dist/table/column.js +10 -0
  249. package/dist/table/table-body.d.ts +2 -0
  250. package/dist/table/table-body.js +10 -0
  251. package/dist/table/table-content.d.ts +1 -0
  252. package/dist/table/table-content.js +26 -0
  253. package/dist/table/table-data.d.ts +8 -0
  254. package/dist/table/table-data.js +35 -0
  255. package/dist/table/table-foot.d.ts +2 -0
  256. package/dist/table/table-foot.js +10 -0
  257. package/dist/table/table-head.d.ts +2 -0
  258. package/dist/table/table-head.js +10 -0
  259. package/dist/table/table-header.d.ts +8 -0
  260. package/dist/table/table-header.js +35 -0
  261. package/dist/table/table-row.d.ts +2 -0
  262. package/dist/table/table-row.js +10 -0
  263. package/dist/table/table.d.ts +25 -0
  264. package/dist/table/table.js +33 -0
  265. package/dist/tabs/tab-item.d.ts +17 -0
  266. package/dist/tabs/tab-item.js +42 -0
  267. package/dist/tabs/tab-list.d.ts +5 -0
  268. package/dist/tabs/tab-list.js +62 -0
  269. package/dist/tabs/tab-panel.d.ts +7 -0
  270. package/dist/tabs/tab-panel.js +22 -0
  271. package/dist/tabs/tabs-content.d.ts +1 -0
  272. package/dist/tabs/tabs-content.js +17 -0
  273. package/dist/tabs/tabs.d.ts +7 -0
  274. package/dist/tabs/tabs.js +24 -0
  275. package/dist/tag/tag.d.ts +19 -0
  276. package/dist/tag/tag.js +27 -0
  277. package/dist/text-input/text-input.d.ts +23 -0
  278. package/dist/text-input/text-input.js +7 -0
  279. package/dist/textarea/textarea.d.ts +13 -0
  280. package/dist/textarea/textarea.js +98 -0
  281. package/dist/toast/ds-toast.d.ts +82 -0
  282. package/dist/toast/ds-toast.js +116 -0
  283. package/dist/toast/toast.d.ts +6 -0
  284. package/dist/toast/toast.js +125 -0
  285. package/dist/toast/types.d.ts +24 -0
  286. package/dist/toast/types.js +1 -0
  287. package/dist/tooltip/tooltip.d.ts +10 -0
  288. package/dist/tooltip/tooltip.js +67 -0
  289. package/dist/utilities.d.ts +9 -0
  290. package/dist/utilities.js +13 -0
  291. package/dist/utils/utilities.d.ts +24 -0
  292. package/dist/utils/utilities.js +20 -0
  293. package/package.json +4 -4
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { jsx as o } from "react/jsx-runtime";
3
+ import { useState as c, Children as l, isValidElement as d, cloneElement as g } from "react";
4
+ const v = ({
5
+ groupId: t,
6
+ inline: n,
7
+ onChange: r,
8
+ children: e
9
+ }) => {
10
+ const [p, s] = c(), u = (i) => {
11
+ s(i.target.value), r == null || r(i);
12
+ }, a = l.map(e, (i) => d(i) ? g(i, {
13
+ onChange: u,
14
+ checked: p === i.props.value,
15
+ name: t
16
+ }) : i);
17
+ return /* @__PURE__ */ o("div", { className: "gi-input-group-container", children: /* @__PURE__ */ o("div", { className: "gi-input-group-options-container", children: /* @__PURE__ */ o(
18
+ "div",
19
+ {
20
+ role: "radiogroup",
21
+ className: n ? "gi-input-group-options-inline" : "gi-input-group-options-stacked",
22
+ children: a
23
+ }
24
+ ) }) });
25
+ };
26
+ export {
27
+ v as InputRadioGroup
28
+ };
@@ -0,0 +1,5 @@
1
+ export type InputRadioGroupProps = {
2
+ groupId: string;
3
+ inline?: boolean;
4
+ onChange?: (event?: React.ChangeEvent<HTMLInputElement>) => void;
5
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,19 @@
1
+ import { InputActionButtonProps } from './type.js';
2
+ export declare const InputActionButton: ({ onClick, ariaLabel, icon, dataTestId, ...props }: InputActionButtonProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const InputText: import('react').ForwardRefExoticComponent<import('react').InputHTMLAttributes<HTMLInputElement> & {
4
+ prefix?: React.ReactNode;
5
+ suffix?: React.ReactNode;
6
+ inputClassName?: string;
7
+ iconStart?: import('../icon/icon.js').IconId;
8
+ onIconStartClick?: () => void;
9
+ iconStartClassName?: string;
10
+ iconEnd?: import('../icon/icon.js').IconId;
11
+ iconEndClassName?: string;
12
+ onIconEndClick?: () => void;
13
+ inputActionButton?: InputActionButtonProps;
14
+ iconEndRef?: any;
15
+ inputActionPosition?: "beforeSuffix" | "afterSuffix";
16
+ type?: "text" | "date" | "datetime-local" | "email" | "month" | "number" | "password" | "tel" | "time" | "url" | "week" | "search";
17
+ halfFluid?: boolean;
18
+ clearButtonEnabled?: boolean;
19
+ } & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,140 @@
1
+ "use client";
2
+ import { jsx as t, jsxs as m } from "react/jsx-runtime";
3
+ import { forwardRef as f, useRef as _, useImperativeHandle as j, useMemo as C } from "react";
4
+ import { cn as c } from "../cn.js";
5
+ import { Icon as o } from "../icon/icon.js";
6
+ import { IconButton as O } from "../icon-button/icon-button.js";
7
+ import { Input as S } from "../primitives/input.js";
8
+ const b = f(
9
+ ({ onChange: a, ...r }, n) => {
10
+ const e = _(null);
11
+ return j(n, () => e.current), /* @__PURE__ */ t(
12
+ p,
13
+ {
14
+ ...r,
15
+ onChange: a,
16
+ ref: e,
17
+ inputActionButton: {
18
+ icon: "close",
19
+ onClick: () => {
20
+ e != null && e.current && (e.current.value = "", e.current.focus());
21
+ const d = {
22
+ target: e.current,
23
+ currentTarget: e.current,
24
+ __origin: "clear_button"
25
+ };
26
+ a && a(d);
27
+ }
28
+ }
29
+ }
30
+ );
31
+ }
32
+ ), p = f(
33
+ ({
34
+ prefix: a,
35
+ inputActionButton: r,
36
+ inputActionPosition: n = "beforeSuffix",
37
+ suffix: e,
38
+ halfFluid: s = !1,
39
+ className: d,
40
+ type: h = "text",
41
+ iconStart: u,
42
+ iconStartClassName: v,
43
+ onIconStartClick: g,
44
+ iconEnd: l,
45
+ iconEndClassName: I,
46
+ onIconEndClick: N,
47
+ disabled: i,
48
+ inputClassName: k,
49
+ iconEndRef: T,
50
+ ...w
51
+ }, z) => {
52
+ const R = C(() => r && n === "beforeSuffix" ? /* @__PURE__ */ t(
53
+ "div",
54
+ {
55
+ className: "gi-input-text-action-before-suffix",
56
+ "data-suffix": !!e,
57
+ "data-has-icon-end": !!l,
58
+ children: /* @__PURE__ */ t(x, { ...r, disabled: i })
59
+ }
60
+ ) : null, [r]);
61
+ return /* @__PURE__ */ m("div", { className: c(d, "gi-input-text-container"), children: [
62
+ a && /* @__PURE__ */ t("div", { className: "gi-input-text-prefix", "data-disabled": i, children: a }),
63
+ /* @__PURE__ */ m(
64
+ "div",
65
+ {
66
+ className: c("gi-input-text-inner", {
67
+ "gi-input-half-width": s
68
+ }),
69
+ children: [
70
+ u && /* @__PURE__ */ t(
71
+ "div",
72
+ {
73
+ className: c("gi-input-text-icon-start", v),
74
+ onClick: g,
75
+ "data-prefix": !!a,
76
+ children: /* @__PURE__ */ t(o, { icon: u, size: "md", disabled: i })
77
+ }
78
+ ),
79
+ /* @__PURE__ */ t(
80
+ S,
81
+ {
82
+ type: h,
83
+ "data-icon-start": !!u,
84
+ "data-icon-end": !!l,
85
+ "data-end-element": !!r,
86
+ "data-prefix": !!a,
87
+ "data-suffix": !!e,
88
+ className: c(k, "gi-input-text"),
89
+ ref: z,
90
+ disabled: i,
91
+ ...w
92
+ }
93
+ ),
94
+ l && /* @__PURE__ */ t(
95
+ "div",
96
+ {
97
+ className: c("gi-input-text-icon-end", I),
98
+ "data-end-element": !!r && n === "afterSuffix",
99
+ "data-suffix": !!e,
100
+ onClick: N,
101
+ ref: T,
102
+ children: /* @__PURE__ */ t(o, { icon: l, size: "md", disabled: i })
103
+ }
104
+ ),
105
+ R
106
+ ]
107
+ }
108
+ ),
109
+ r && n === "afterSuffix" && /* @__PURE__ */ t("div", { className: "gi-input-text-end-element", "data-suffix": !!e, children: /* @__PURE__ */ t(x, { ...r, disabled: i }) }),
110
+ e && /* @__PURE__ */ t("div", { className: "gi-input-text-suffix", "data-disabled": i, children: e })
111
+ ] });
112
+ }
113
+ ), x = ({
114
+ onClick: a,
115
+ ariaLabel: r,
116
+ icon: n,
117
+ dataTestId: e,
118
+ ...s
119
+ }) => /* @__PURE__ */ t(
120
+ O,
121
+ {
122
+ ...s,
123
+ icon: {
124
+ icon: n
125
+ },
126
+ "data-testid": e,
127
+ "aria-label": r || "",
128
+ onClick: a,
129
+ variant: "flat",
130
+ size: "small",
131
+ appearance: "dark"
132
+ }
133
+ ), H = f(
134
+ ({ type: a = "text", clearButtonEnabled: r, ...n }, e) => r ? /* @__PURE__ */ t(b, { ref: e, type: a, ...n }) : /* @__PURE__ */ t(p, { ref: e, type: a, ...n })
135
+ );
136
+ H.displayName = "InputText";
137
+ export {
138
+ x as InputActionButton,
139
+ H as InputText
140
+ };
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ import { IconId } from '../icon/icon.js';
3
+ export type InputActionButtonProps = {
4
+ icon: IconId;
5
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
6
+ disabled?: boolean;
7
+ ariaLabel?: string;
8
+ dataTestId?: string;
9
+ ref?: React.Ref<HTMLButtonElement>;
10
+ };
11
+ export type InputTextProps = React.InputHTMLAttributes<HTMLInputElement> & {
12
+ prefix?: React.ReactNode;
13
+ suffix?: React.ReactNode;
14
+ inputClassName?: string;
15
+ iconStart?: IconId;
16
+ onIconStartClick?: () => void;
17
+ iconStartClassName?: string;
18
+ iconEnd?: IconId;
19
+ iconEndClassName?: string;
20
+ onIconEndClick?: () => void;
21
+ inputActionButton?: InputActionButtonProps;
22
+ iconEndRef?: any;
23
+ inputActionPosition?: 'beforeSuffix' | 'afterSuffix';
24
+ type?: 'text' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'tel' | 'time' | 'url' | 'week' | 'search';
25
+ halfFluid?: boolean;
26
+ clearButtonEnabled?: boolean;
27
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,11 @@
1
+ export declare const LabelSize: {
2
+ readonly Small: "sm";
3
+ readonly Medium: "md";
4
+ readonly Large: "lg";
5
+ };
6
+ export declare const Label: import('react').ForwardRefExoticComponent<import('react').LabelHTMLAttributes<HTMLLabelElement> & {
7
+ text?: string | React.ReactElement;
8
+ size?: import('./types.js').LabelSizeType;
9
+ } & {
10
+ children?: import('react').ReactNode | undefined;
11
+ } & import('react').RefAttributes<HTMLLabelElement>>;
@@ -0,0 +1,27 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as r } from "react";
3
+ import { c as o } from "../index-DNkhmzZp.js";
4
+ const d = {
5
+ Small: "sm",
6
+ Medium: "md",
7
+ Large: "lg"
8
+ }, g = o({
9
+ base: "gi-label",
10
+ variants: {
11
+ size: {
12
+ sm: "gi-text-sm",
13
+ md: "gi-text-md",
14
+ lg: "gi-text-lg"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ size: "md"
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 })
22
+ );
23
+ b.displayName = "Label";
24
+ export {
25
+ b as Label,
26
+ d as LabelSize
27
+ };
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { LabelSize } from './label.js';
3
+ export type LabelSizeType = (typeof LabelSize)[keyof typeof LabelSize];
4
+ export type LabelTextProps = PropsWithChildren<React.LabelHTMLAttributes<HTMLLabelElement> & {
5
+ text?: string | React.ReactElement;
6
+ size?: LabelSizeType;
7
+ }>;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,47 @@
1
+ import { default as React } from 'react';
2
+ import { ButtonAppearance, ButtonSize, ButtonVariant } from '../button/types.js';
3
+ import { IconId } from '../icon/icon.js';
4
+ import { AnchorProps } from '../primitives/anchor.js';
5
+ export type LinkProps = AnchorProps & {
6
+ href?: string;
7
+ onClick?: React.MouseEventHandler<HTMLElement>;
8
+ asChild?: boolean;
9
+ noVisited?: boolean;
10
+ noUnderline?: boolean;
11
+ noColor?: boolean;
12
+ external?: boolean;
13
+ size?: 'sm' | 'md' | 'lg';
14
+ dataTestid?: string;
15
+ asButton?: {
16
+ variant?: ButtonVariant;
17
+ appearance?: ButtonAppearance;
18
+ size?: ButtonSize;
19
+ };
20
+ iconStart?: IconId;
21
+ iconEnd?: IconId;
22
+ disabled?: boolean;
23
+ appearance?: Extract<ButtonAppearance, 'default' | 'light'>;
24
+ };
25
+ export declare const Link: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & {
26
+ external?: boolean;
27
+ asChild?: boolean;
28
+ } & {
29
+ href?: string;
30
+ onClick?: React.MouseEventHandler<HTMLElement>;
31
+ asChild?: boolean;
32
+ noVisited?: boolean;
33
+ noUnderline?: boolean;
34
+ noColor?: boolean;
35
+ external?: boolean;
36
+ size?: "sm" | "md" | "lg";
37
+ dataTestid?: string;
38
+ asButton?: {
39
+ variant?: ButtonVariant;
40
+ appearance?: ButtonAppearance;
41
+ size?: ButtonSize;
42
+ };
43
+ iconStart?: IconId;
44
+ iconEnd?: IconId;
45
+ disabled?: boolean;
46
+ appearance?: Extract<ButtonAppearance, "default" | "light">;
47
+ } & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,104 @@
1
+ import { jsx as n, jsxs as S, Fragment as b } from "react/jsx-runtime";
2
+ import { a as j } from "../index-ntYL1VRC.js";
3
+ import { forwardRef as w } from "react";
4
+ import { getVariantAppearanceClass as I, getSizeClass as L } from "../button/helpers.js";
5
+ import { cn as A } from "../cn.js";
6
+ import { Icon as s } from "../icon/icon.js";
7
+ import y from "../primitives/anchor.js";
8
+ const F = ({
9
+ size: r,
10
+ iconStart: e,
11
+ asChild: l,
12
+ asButton: m,
13
+ children: p,
14
+ iconEnd: c
15
+ }) => {
16
+ const a = "sm", g = e && !m && !l, o = c && !m && !l;
17
+ return /* @__PURE__ */ S(b, { children: [
18
+ g && /* @__PURE__ */ n(
19
+ "span",
20
+ {
21
+ className: "gi-link-icon gi-link-icon-start",
22
+ "data-size": r || "sm",
23
+ children: /* @__PURE__ */ n(s, { icon: e, size: a })
24
+ }
25
+ ),
26
+ o || g ? /* @__PURE__ */ n("span", { className: "gi-pr-5 gi-pl-5", children: p }) : p,
27
+ o && /* @__PURE__ */ n(
28
+ "span",
29
+ {
30
+ className: "gi-link-icon gi-link-icon-end",
31
+ "data-size": r || "sm",
32
+ children: /* @__PURE__ */ n(s, { icon: c, size: a })
33
+ }
34
+ )
35
+ ] });
36
+ }, R = w(
37
+ ({
38
+ size: r,
39
+ asChild: e,
40
+ className: l,
41
+ children: m,
42
+ dataTestid: p,
43
+ noVisited: c,
44
+ noUnderline: a,
45
+ noColor: g,
46
+ external: o,
47
+ asButton: i,
48
+ iconStart: x,
49
+ iconEnd: h,
50
+ disabled: f,
51
+ appearance: k,
52
+ ...d
53
+ }, v) => {
54
+ const N = i && I({
55
+ disabled: !1,
56
+ variant: i == null ? void 0 : i.variant,
57
+ appearance: i == null ? void 0 : i.appearance
58
+ }), z = i && L(i == null ? void 0 : i.size);
59
+ return /* @__PURE__ */ n(
60
+ e ? j : y,
61
+ {
62
+ ...d,
63
+ ref: v,
64
+ "data-testid": p,
65
+ className: A(
66
+ {
67
+ "gi-link": !i,
68
+ "gi-link-no-underline": !i && a,
69
+ "gi-link-no-visited": !i && c,
70
+ "gi-link-inherit": !i && g,
71
+ "gi-btn": i,
72
+ "!gi-inline-flex": i,
73
+ "gi-link-disabled": f && !i && !e,
74
+ "gi-link-light": k === "light" && !i && !e && !g && !c && !f,
75
+ "gi-text-sm": r === "sm",
76
+ "gi-text-md": r === "md",
77
+ "gi-text-lg": r === "lg"
78
+ },
79
+ N,
80
+ z,
81
+ l
82
+ ),
83
+ "data-appearance": k,
84
+ external: o,
85
+ href: f ? "javascript:void(0)" : d.href,
86
+ children: e ? m : /* @__PURE__ */ n(
87
+ F,
88
+ {
89
+ asButton: i,
90
+ asChild: e,
91
+ iconEnd: h,
92
+ iconStart: x,
93
+ size: r,
94
+ children: m
95
+ }
96
+ )
97
+ }
98
+ );
99
+ }
100
+ );
101
+ R.displayName = "Link";
102
+ export {
103
+ R as Link
104
+ };
@@ -0,0 +1,13 @@
1
+ export declare const ListTypeEnum: {
2
+ readonly None: "none";
3
+ readonly Bullet: "bullet";
4
+ readonly Number: "number";
5
+ };
6
+ export type ListType = (typeof ListTypeEnum)[keyof typeof ListTypeEnum];
7
+ export type ListProps = {
8
+ items: Array<string | React.ReactElement>;
9
+ spaced?: boolean;
10
+ type?: ListType;
11
+ dataTestid?: string;
12
+ } & React.HTMLAttributes<HTMLUListElement>;
13
+ export declare function List({ items, type, spaced, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ const s = {
3
+ None: "none",
4
+ Bullet: "bullet",
5
+ Number: "number"
6
+ }, a = ({ spaced: i, type: t }) => {
7
+ const e = [];
8
+ switch (t) {
9
+ case s.Bullet: {
10
+ e.push("gi-list-bullet");
11
+ break;
12
+ }
13
+ case s.Number: {
14
+ e.push("gi-list-number");
15
+ break;
16
+ }
17
+ default: {
18
+ e.push("gi-list");
19
+ break;
20
+ }
21
+ }
22
+ return i && e.push("gi-list-spaced"), e.join(" ");
23
+ };
24
+ function o({
25
+ items: i,
26
+ type: t = s.None,
27
+ spaced: e,
28
+ ...l
29
+ }) {
30
+ return /* @__PURE__ */ n(
31
+ "ul",
32
+ {
33
+ role: t === s.None ? "list" : void 0,
34
+ className: a({ spaced: e, type: t }),
35
+ "data-testId": l.dataTestid,
36
+ ...l,
37
+ children: i.map((u, r) => /* @__PURE__ */ n("li", { children: u }, `listItem-${r}`))
38
+ }
39
+ );
40
+ }
41
+ export {
42
+ o as List,
43
+ s as ListTypeEnum
44
+ };
@@ -0,0 +1,9 @@
1
+ export type ListItemProps = {
2
+ label?: string;
3
+ action?: () => void;
4
+ href?: string;
5
+ external?: boolean;
6
+ bold?: boolean;
7
+ slot?: React.ReactNode;
8
+ };
9
+ export declare function ListItem({ label, href, external, bold, slot }: ListItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { cn as n } from "../cn.js";
3
+ import s from "../primitives/anchor.js";
4
+ function f({ label: i, href: t, external: o, bold: e, slot: r }) {
5
+ return /* @__PURE__ */ m(
6
+ s,
7
+ {
8
+ "aria-label": i,
9
+ href: t,
10
+ className: n("gi-list-item", { "gi-font-bold": e }),
11
+ external: o,
12
+ asChild: !!r,
13
+ children: r || /* @__PURE__ */ m("span", { className: "gi-text-sm gi-ml-1", children: i })
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ f as ListItem
19
+ };
@@ -0,0 +1,2 @@
1
+ export declare const HtmlContent: import("react/jsx-runtime").JSX.Element;
2
+ export declare const TriggerButton: import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsxs as i, Fragment as r, jsx as t } from "react/jsx-runtime";
2
+ import { Button as o } from "../button/button.js";
3
+ import { ModalTitle as e, ModalBody as a, ModalFooter as n } from "./modal.js";
4
+ const c = /* @__PURE__ */ i(r, { children: [
5
+ /* @__PURE__ */ t(e, { children: "Modal Title" }),
6
+ /* @__PURE__ */ t(a, { children: /* @__PURE__ */ t("p", { className: "gi-paragraph-md", children: "Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aperiam molestias error accusantium non nobis excepturi doloremque dolorem possimus corrupti. Nostrum quisquam est voluptate! Iure suscipit, commodi cupiditate sit minima veritatis." }) }),
7
+ /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(o, { children: "Primary" }) })
8
+ ] }), d = /* @__PURE__ */ t(
9
+ "button",
10
+ {
11
+ "data-testid": "trigger-button-container",
12
+ className: "gi-btn gi-btn-primary gi-btn-regular",
13
+ children: "Open Modal"
14
+ }
15
+ );
16
+ export {
17
+ c as HtmlContent,
18
+ d as TriggerButton
19
+ };
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { HeadingProps } from '../heading/heading.js';
3
+ import { ModalFooterProps, ModalProps, ModalWrapperProps } from './types.js';
4
+ export declare const ModalWrapper: ({ position, size, closeOnClick, closeOnOverlayClick, isOpen, onClose, closeButtonLabel, className, children, closeButtonSize, dataTestId, ...props }: ModalWrapperProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const ModalTitle: ({ children, as, ...props }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const ModalBody: ({ children, className, }: {
7
+ children: ReactNode;
8
+ className?: string;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const ModalFooter: ({ className, children, orientation, dataModalSize, }: ModalFooterProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Modal: ({ children, triggerButton, startsOpen, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element;