@ogcio/design-system-react 1.32.0 → 1.33.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 (42) hide show
  1. package/dist/accordion/accordion-item.js +62 -57
  2. package/dist/alert/alert.js +37 -39
  3. package/dist/alert/variants.d.ts +49 -52
  4. package/dist/alert/variants.js +17 -18
  5. package/dist/atoms/Button.d.ts +2 -2
  6. package/dist/atoms/Button.js +2 -1
  7. package/dist/button/button.d.ts +2 -9
  8. package/dist/button/button.js +65 -32
  9. package/dist/button/helpers.d.ts +2 -1
  10. package/dist/button/types.d.ts +25 -8
  11. package/dist/button-group/button-group.js +43 -45
  12. package/dist/button-group/types.d.ts +5 -5
  13. package/dist/card/card-legacy.js +1 -1
  14. package/dist/card/types.d.ts +1 -1
  15. package/dist/combo-box/dropdown-item.js +1 -1
  16. package/dist/cookie-banner/cookie-banner.d.ts +1 -1
  17. package/dist/data-table/data-table-header.js +1 -1
  18. package/dist/drawer/drawer.d.ts +1 -1
  19. package/dist/drawer/drawer.js +17 -17
  20. package/dist/error-text/error-text.js +28 -27
  21. package/dist/forms/form-field/form-field.js +24 -25
  22. package/dist/header/components/header-search.js +2 -2
  23. package/dist/hint-text/hint-text.js +26 -20
  24. package/dist/icon-button/icon-button.d.ts +3 -5
  25. package/dist/index.d.ts +1 -1
  26. package/dist/label/label.d.ts +78 -30
  27. package/dist/label/label.js +29 -14
  28. package/dist/modal/modal.content.js +1 -1
  29. package/dist/modal/modal.js +38 -38
  30. package/dist/modal/types.d.ts +5 -4
  31. package/dist/pagination/pagination.js +27 -28
  32. package/dist/score-select/type.d.ts +2 -2
  33. package/dist/select/select-next.js +87 -87
  34. package/dist/side-nav/side-nav.js +1 -1
  35. package/dist/styles.css +1 -1
  36. package/dist/tabs/tab-item.js +53 -71
  37. package/dist/tabs/variants.d.ts +269 -0
  38. package/dist/tabs/variants.js +87 -0
  39. package/dist/tooltip/tooltip.js +27 -35
  40. package/dist/tooltip/variants.d.ts +115 -0
  41. package/dist/tooltip/variants.js +59 -0
  42. package/package.json +2 -2
@@ -1,3 +1,4 @@
1
+ import { IconButtonProps } from '../icon-button/icon-button.js';
1
2
  import { ButtonAppearance, ButtonVariant, ButtonSize } from './types.js';
2
3
  export declare const getVariantAppearanceClass: ({ disabled, variant, appearance, }: {
3
4
  disabled?: boolean;
@@ -5,7 +6,7 @@ export declare const getVariantAppearanceClass: ({ disabled, variant, appearance
5
6
  appearance?: ButtonAppearance;
6
7
  }) => string | undefined;
7
8
  export declare const getSizeClass: (size?: ButtonSize) => "gi-btn-small" | "gi-btn-large" | "gi-btn-regular";
8
- export declare const getButtonIconSizeClass: (size?: ButtonSize) => "gi-icon-btn-small" | "gi-icon-btn-large" | "gi-icon-btn-extra-large" | "gi-icon-btn-regular";
9
+ export declare const getButtonIconSizeClass: (size?: IconButtonProps["size"]) => "gi-icon-btn-small" | "gi-icon-btn-large" | "gi-icon-btn-extra-large" | "gi-icon-btn-regular";
9
10
  export declare const isButtonDisabled: ({ disabled, variant, appearance, }: {
10
11
  disabled?: boolean;
11
12
  variant?: ButtonVariant;
@@ -1,13 +1,30 @@
1
+ import { Props as GiButtonProps } from '../atoms/Button.js';
2
+ import * as React from 'react';
1
3
  export declare const ButtonVariants: readonly ["primary", "secondary", "flat"];
2
4
  export type ButtonVariant = (typeof ButtonVariants)[number];
3
5
  export type ButtonAppearance = 'default' | 'dark' | 'light';
4
- export type ButtonSize = 'medium' | 'small' | 'large' | 'extraLarge';
5
- export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
6
- variant?: ButtonVariant;
7
- appearance?: ButtonAppearance;
8
- size?: ButtonSize;
9
- form?: string;
10
- value?: string;
11
- className?: string;
6
+ export type ButtonSize = 'medium' | 'small' | 'large';
7
+ export type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-checked' | 'aria-pressed' | 'aria-expanded' | 'aria-controls' | 'aria-haspopup' | 'aria-busy'> & GiButtonProps & {
8
+ /** @deprecated Use dataTestId instead */
12
9
  dataTestid?: string;
10
+ /** @deprecated Use dataTestId instead */
11
+ 'data-testid'?: string;
12
+ /** @deprecated Use ariaLabel instead */
13
+ 'aria-label'?: string;
14
+ /** @deprecated Use ariaLabelledBy instead */
15
+ 'aria-labelledby'?: string;
16
+ /** @deprecated Use ariaDescribedBy instead */
17
+ 'aria-describedby'?: string;
18
+ /** @deprecated Use ariaChecked instead */
19
+ 'aria-checked'?: boolean | 'true' | 'false' | 'mixed';
20
+ /** @deprecated Use ariaPressed instead */
21
+ 'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';
22
+ /** @deprecated Use ariaExpanded instead */
23
+ 'aria-expanded'?: boolean | 'true' | 'false';
24
+ /** @deprecated Use ariaControls instead */
25
+ 'aria-controls'?: string;
26
+ /** @deprecated Use ariaHasPopup instead */
27
+ 'aria-haspopup'?: boolean | 'true' | 'false' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
28
+ /** @deprecated Use ariaBusy instead */
29
+ 'aria-busy'?: boolean | 'true' | 'false';
13
30
  };
@@ -1,95 +1,93 @@
1
1
  "use client";
2
- import { jsx as x } from "react/jsx-runtime";
2
+ import { jsx as f } from "react/jsx-runtime";
3
3
  import { createContext as G, useState as V, useEffect as k, useContext as w } from "react";
4
- import { Button as S } from "../button/button.js";
4
+ import S from "../atoms/Button.js";
5
5
  import { cn as g } from "../cn.js";
6
6
  import { useDomId as j } from "../hooks/use-dom-id.js";
7
- const I = G(
7
+ const y = G(
8
8
  void 0
9
9
  ), D = ({
10
- value: r,
10
+ value: o,
11
11
  children: s,
12
12
  role: d,
13
13
  "aria-checked": e,
14
- "aria-label": a,
15
- ...t
14
+ "aria-label": n
16
15
  }) => {
17
- const c = w(I);
18
- if (!c)
16
+ const t = w(y);
17
+ if (!t)
19
18
  throw new Error("ButtonGroupItem must be used within a ButtonGroup");
20
19
  const {
21
- selectedValue: n,
22
- setSelectedValue: l,
23
- size: u,
24
- onChange: o,
20
+ selectedValue: a,
21
+ setSelectedValue: u,
22
+ size: l,
23
+ onChange: r,
25
24
  groupId: m,
26
25
  appearance: p
27
- } = c, i = n === r, b = () => {
28
- l(r), o == null || o(r);
29
- }, f = `${m}-${r}`;
30
- return /* @__PURE__ */ x(
26
+ } = t, i = a === o, c = () => {
27
+ u(o), r == null || r(o);
28
+ }, b = `${m}-${o}`;
29
+ return /* @__PURE__ */ f(
31
30
  S,
32
31
  {
33
32
  variant: i ? "primary" : "secondary",
34
- size: u,
33
+ size: l,
35
34
  appearance: p,
36
- onClick: b,
37
- id: f,
35
+ onClick: c,
36
+ id: b,
38
37
  role: d || "radio",
39
- "aria-checked": e === void 0 ? i : e,
40
- "aria-label": a,
38
+ ariaChecked: e === void 0 ? i : e,
39
+ ariaLabel: n,
41
40
  type: "button",
42
- ...t,
43
41
  children: s
44
42
  }
45
43
  );
46
44
  }, N = ({
47
- name: r,
45
+ name: o,
48
46
  size: s = "medium",
49
47
  appearance: d = "dark",
50
48
  onChange: e,
51
- defaultValue: a,
49
+ defaultValue: n,
52
50
  value: t,
53
- children: c,
54
- role: n,
51
+ children: a,
52
+ role: u,
55
53
  "aria-labelledby": l,
56
- "aria-describedby": u,
57
- className: o,
58
- ...m
54
+ "aria-describedby": r,
55
+ className: m,
56
+ ...p
59
57
  }) => {
60
- const [p, i] = V(
61
- a
62
- ), b = t === void 0 ? p : t;
58
+ const [i, c] = V(
59
+ n
60
+ ), b = t === void 0 ? i : t;
63
61
  k(() => {
64
- t !== void 0 && i(t);
62
+ t !== void 0 && c(t);
65
63
  }, [t]);
66
- const f = (y) => {
67
- t === void 0 && i(y), e == null || e(y);
64
+ const I = (x) => {
65
+ t === void 0 && c(x), e == null || e(x);
68
66
  }, B = j();
69
- return /* @__PURE__ */ x(
70
- I.Provider,
67
+ return /* @__PURE__ */ f(
68
+ y.Provider,
71
69
  {
72
70
  value: {
73
71
  selectedValue: b,
74
- setSelectedValue: f,
75
- name: r,
72
+ setSelectedValue: I,
73
+ name: o,
76
74
  size: s,
77
75
  onChange: e,
78
76
  groupId: B,
79
77
  appearance: d,
80
- ...m
78
+ ...p
81
79
  },
82
- children: /* @__PURE__ */ x(
80
+ children: /* @__PURE__ */ f(
83
81
  "div",
84
82
  {
85
83
  className: g(
86
84
  "gi-flex gi-flex-wrap gi-gap-3 [&_button]:gi-min-w-12 [&_button]:gi-justify-center",
87
- o
85
+ m
88
86
  ),
89
- role: n || "radiogroup",
87
+ role: u || "radiogroup",
90
88
  "aria-labelledby": l,
91
- "aria-describedby": u,
92
- children: c
89
+ "aria-describedby": r,
90
+ children: a
93
91
  }
94
92
  )
95
93
  }
@@ -1,9 +1,9 @@
1
1
  import { PropsWithChildren } from 'react';
2
- import { ButtonAppearance, ButtonSize } from '../button/types.js';
2
+ import { Props as ButtonProps } from '../atoms/Button';
3
3
  export type ButtonGroupProps = PropsWithChildren<{
4
4
  name: string;
5
- size?: ButtonSize;
6
- appearance?: ButtonAppearance;
5
+ size?: ButtonProps['size'];
6
+ appearance?: ButtonProps['appearance'];
7
7
  onChange?: (value: string) => void;
8
8
  defaultValue?: string;
9
9
  value?: string;
@@ -22,8 +22,8 @@ export type ButtonGroupContextType = {
22
22
  selectedValue?: string;
23
23
  setSelectedValue: (value: string) => void;
24
24
  name: string;
25
- size: ButtonSize;
26
- appearance?: ButtonAppearance;
25
+ size: ButtonProps['size'];
26
+ appearance?: ButtonProps['appearance'];
27
27
  onChange?: (value: string) => void;
28
28
  groupId: string;
29
29
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { Button as k } from "../button/button.js";
2
+ import k from "../atoms/Button.js";
3
3
  import { translate as c } from "../i18n/utility.js";
4
4
  import { Link as u } from "../link/link.js";
5
5
  import { CardNext as b, CardMedia as L, CardContainer as T, CardHeader as V, CardTitle as $, CardSubtitle as j, CardTag as A, CardDescription as B, CardAction as H } from "./card-next.js";
@@ -1,5 +1,5 @@
1
1
  import { ComponentPropsWithoutRef, ReactElement } from 'react';
2
- import { ButtonProps } from '../button/types.js';
2
+ import { Props as ButtonProps } from '../atoms/Button';
3
3
  import { IconProps } from '../icon/icon.js';
4
4
  import { LinkProps } from '../link/link.js';
5
5
  import { TagProps } from '../tag/tag.js';
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as n, jsx as a } from "react/jsx-runtime";
3
3
  import { useState as u, useId as j, useEffect as q } from "react";
4
- import { Button as B } from "../button/button.js";
4
+ import B from "../atoms/Button.js";
5
5
  import { cn as x } from "../cn.js";
6
6
  import { translate as N } from "../i18n/utility.js";
7
7
  import { Icon as D } from "../icon/icon.js";
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { ButtonProps } from '../button/types.js';
2
+ import { Props as ButtonProps } from '../atoms/Button';
3
3
  import { LinkProps } from '../link/link.js';
4
4
  export type CookieBannerProps = {
5
5
  showConsent: boolean;
@@ -1,7 +1,7 @@
1
1
  import { jsxs as d, jsx as i } from "react/jsx-runtime";
2
2
  import { useMemo as A, Children as L, isValidElement as O } from "react";
3
3
  import { c as P } from "../index-CB-zPpNk.js";
4
- import { Button as w } from "../button/button.js";
4
+ import w from "../atoms/Button.js";
5
5
  import { Chip as S } from "../chip/chip.js";
6
6
  import { cn as n } from "../cn.js";
7
7
  import { translate as x } from "../i18n/utility.js";
@@ -1,5 +1,5 @@
1
1
  import { Fragment, ReactElement } from 'react';
2
- import { ButtonProps } from '../button/types.js';
2
+ import { Props as ButtonProps } from '../atoms/Button';
3
3
  import { ModalProps, ModalWrapperProps } from '../modal/types.js';
4
4
  type DrawerChildren = Array<ReactElement<typeof DrawerBody | typeof DrawerBody>> | ReactElement<typeof Fragment>;
5
5
  export type DrawerPosition = 'left' | 'right' | 'bottom';
@@ -3,7 +3,7 @@ import { jsx as a, jsxs as x, Fragment as C } from "react/jsx-runtime";
3
3
  import { useState as D, cloneElement as O } from "react";
4
4
  import { cn as l } from "../cn.js";
5
5
  import { ModalBody as u, ModalFooter as j, ModalWrapper as v } from "../modal/modal.js";
6
- const h = ({
6
+ const T = ({
7
7
  children: o,
8
8
  className: e,
9
9
  ...r
@@ -15,29 +15,29 @@ const h = ({
15
15
  ...r,
16
16
  children: o
17
17
  }
18
- ), k = ({
18
+ ), h = ({
19
19
  children: o,
20
20
  triggerButton: e,
21
21
  startsOpen: r,
22
- closeButtonLabel: p,
22
+ closeButtonLabel: i,
23
23
  position: t = "right",
24
24
  className: f
25
25
  }) => {
26
26
  const [d, s] = D(!!r), m = () => s(!0), w = () => s(!1), b = O(e, {
27
- "data-testid": "drawer-trigger-button-container",
27
+ dataTestId: "drawer-trigger-button-container",
28
28
  onClick: (y) => {
29
- var c, i;
30
- const n = typeof ((c = e == null ? void 0 : e.props) == null ? void 0 : c.onClick) == "function" ? (i = e == null ? void 0 : e.props) == null ? void 0 : i.onClick : void 0;
29
+ var c, p;
30
+ const n = typeof ((c = e == null ? void 0 : e.props) == null ? void 0 : c.onClick) == "function" ? (p = e == null ? void 0 : e.props) == null ? void 0 : p.onClick : void 0;
31
31
  n && n(y), m();
32
32
  }
33
33
  });
34
34
  return /* @__PURE__ */ x(C, { children: [
35
35
  b,
36
36
  /* @__PURE__ */ a(
37
- h,
37
+ T,
38
38
  {
39
39
  children: o,
40
- closeButtonLabel: p,
40
+ closeButtonLabel: i,
41
41
  position: t,
42
42
  className: f,
43
43
  isOpen: d,
@@ -46,12 +46,12 @@ const h = ({
46
46
  )
47
47
  ] });
48
48
  };
49
- Object.defineProperty(k, "componentType", {
49
+ Object.defineProperty(h, "componentType", {
50
50
  value: "Drawer",
51
51
  writable: !1,
52
52
  enumerable: !1
53
53
  });
54
- const F = ({ children: o, className: e }) => /* @__PURE__ */ a(
54
+ const k = ({ children: o, className: e }) => /* @__PURE__ */ a(
55
55
  u,
56
56
  {
57
57
  includeModalClass: !1,
@@ -62,24 +62,24 @@ const F = ({ children: o, className: e }) => /* @__PURE__ */ a(
62
62
  children: o
63
63
  }
64
64
  );
65
- Object.defineProperty(F, "componentType", {
65
+ Object.defineProperty(k, "componentType", {
66
66
  value: "DrawerBody",
67
67
  writable: !1,
68
68
  enumerable: !1
69
69
  });
70
- const M = ({
70
+ const F = ({
71
71
  children: o,
72
72
  className: e,
73
73
  stacked: r
74
74
  }) => /* @__PURE__ */ a(j, { stacked: r, className: l("gi-drawer-footer", e), children: o });
75
- Object.defineProperty(M, "componentType", {
75
+ Object.defineProperty(F, "componentType", {
76
76
  value: "DrawerFooter",
77
77
  writable: !1,
78
78
  enumerable: !1
79
79
  });
80
80
  export {
81
- k as Drawer,
82
- F as DrawerBody,
83
- M as DrawerFooter,
84
- h as DrawerWrapper
81
+ h as Drawer,
82
+ k as DrawerBody,
83
+ F as DrawerFooter,
84
+ T as DrawerWrapper
85
85
  };
@@ -1,40 +1,41 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { c as m } from "../index-CB-zPpNk.js";
3
- const d = {
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { c as s } from "../index-CB-zPpNk.js";
3
+ const l = {
4
4
  Small: "sm",
5
5
  Medium: "md",
6
6
  Large: "lg"
7
- }, l = m({
8
- base: "gi-error-text",
9
- variants: {
10
- size: {
11
- sm: "gi-error-text-sm",
12
- md: "gi-error-text-md",
13
- lg: "gi-error-text-lg"
14
- }
15
- },
16
- defaultVariants: {
17
- size: "md"
18
- }
19
- }), x = ({
20
- text: r,
7
+ }, d = ({
8
+ text: t,
21
9
  className: e,
22
- size: t = d.Medium,
10
+ size: r = l.Medium,
23
11
  dataTestid: i,
24
- children: o,
25
- ...s
26
- }) => /* @__PURE__ */ a(
12
+ children: a,
13
+ ...o
14
+ }) => /* @__PURE__ */ m(
27
15
  "div",
28
16
  {
29
17
  role: "alert",
30
- className: l({ size: t, className: e }),
18
+ className: n({ size: r, className: e }),
31
19
  "data-testid": i,
32
- ...s,
33
- children: o ?? r
20
+ ...o,
21
+ children: a ?? t
34
22
  }
35
23
  );
36
- x.displayName = "ErrorText";
24
+ d.displayName = "ErrorText";
25
+ const n = s({
26
+ base: "gi-font-normal gi-text-color-text-intent-error-default",
27
+ variants: {
28
+ size: {
29
+ sm: "gi-text-sm",
30
+ md: "gi-text-md",
31
+ lg: "gi-text-lg"
32
+ }
33
+ },
34
+ defaultVariants: {
35
+ size: "md"
36
+ }
37
+ });
37
38
  export {
38
- d as ErrorSize,
39
- x as ErrorText
39
+ l as ErrorSize,
40
+ d as ErrorText
40
41
  };
@@ -1,19 +1,19 @@
1
1
  "use client";
2
- import { jsx as l, jsxs as m, Fragment as x } from "react/jsx-runtime";
2
+ import { jsx as l, jsxs as d, Fragment as x } from "react/jsx-runtime";
3
3
  import { S as p } from "../../index-D_wwt4P0.js";
4
- import { createContext as N, useContext as v, Children as C } from "react";
5
- import { cn as d } from "../../cn.js";
4
+ import { createContext as v, useContext as N, Children as C } from "react";
5
+ import { cn as s } from "../../cn.js";
6
6
  import { ErrorText as L } from "../../error-text/error-text.js";
7
7
  import { HintText as E } from "../../hint-text/hint-text.js";
8
8
  import { Label as H, styles as P } from "../../label/label.js";
9
9
  import { getSpecialComponentType as F, isSpecialComponent as w } from "../../utils/utilities.js";
10
- const f = N(null);
10
+ const f = v(null);
11
11
  function b(e) {
12
- v(f) || console.error(`[${e}] must be used within a <FormField>.`);
12
+ N(f) || console.error(`[${e}] must be used within a <FormField>.`);
13
13
  }
14
14
  const U = (e) => ["error", "hint", "label"].some((r) => r in e) ? (console.warn(
15
15
  "[FormField] Using legacy props. Please migrate to the new composable API."
16
- ), /* @__PURE__ */ l(f.Provider, { value: !0, children: /* @__PURE__ */ m(y, { ...e, children: [
16
+ ), /* @__PURE__ */ l(f.Provider, { value: !0, children: /* @__PURE__ */ d(y, { ...e, children: [
17
17
  e.label && /* @__PURE__ */ l(u, { ...e.label }),
18
18
  e.hint && /* @__PURE__ */ l(h, { ...e.hint }),
19
19
  e.error && /* @__PURE__ */ l(g, { ...e.error }),
@@ -25,31 +25,31 @@ const U = (e) => ["error", "hint", "label"].some((r) => r in e) ? (console.warn(
25
25
  }) => {
26
26
  const r = C.toArray(e), n = r.find(
27
27
  (t) => F(t) === "FormFieldLabel"
28
- ), c = r.find(
28
+ ), m = r.find(
29
29
  (t) => F(t) === "FormFieldHint"
30
30
  ), a = r.find(
31
31
  (t) => F(t) === "FormFieldError"
32
- ), s = r.filter(
32
+ ), c = r.filter(
33
33
  (t) => !w(t, [
34
34
  "FormFieldLabel",
35
35
  "FormFieldHint",
36
36
  "FormFieldError"
37
37
  ])
38
38
  );
39
- return /* @__PURE__ */ m(
39
+ return /* @__PURE__ */ d(
40
40
  "fieldset",
41
41
  {
42
- className: d({ "gi-error-state": !!a }, i),
42
+ className: s({ "gi-error-state": !!a }, i),
43
43
  ...o,
44
44
  children: [
45
- /* @__PURE__ */ m("div", { className: "gi-pb-3 gi-flex gi-flex-col gi-gap-1", children: [
46
- /* @__PURE__ */ m("div", { children: [
45
+ /* @__PURE__ */ d("div", { className: "gi-pb-3 gi-flex gi-flex-col gi-gap-1", children: [
46
+ /* @__PURE__ */ d("div", { children: [
47
47
  n,
48
- c
48
+ m
49
49
  ] }),
50
50
  a
51
51
  ] }),
52
- /* @__PURE__ */ l(p, { children: s })
52
+ /* @__PURE__ */ l(p, { children: c })
53
53
  ]
54
54
  }
55
55
  );
@@ -59,32 +59,31 @@ const U = (e) => ["error", "hint", "label"].some((r) => r in e) ? (console.warn(
59
59
  size: o,
60
60
  htmlFor: r,
61
61
  className: n,
62
- secondaryLabel: c,
62
+ secondaryLabel: m,
63
63
  ...a
64
64
  }) => {
65
65
  b("FormFieldLabel");
66
- const s = /* @__PURE__ */ m(x, { children: [
66
+ const c = /* @__PURE__ */ d(x, { children: [
67
67
  i ?? e,
68
- c ? /* @__PURE__ */ l("span", { className: "gi-secondary-label", children: c }) : null
68
+ m ? /* @__PURE__ */ l("span", { className: "gi-secondary-label", children: m }) : null
69
69
  ] });
70
70
  return r ? /* @__PURE__ */ l(
71
71
  H,
72
72
  {
73
73
  size: o,
74
74
  htmlFor: r,
75
- className: d("gi-font-bold", n),
75
+ className: s("gi-font-bold", n),
76
76
  ...a,
77
- children: s
77
+ children: c
78
78
  }
79
79
  ) : /* @__PURE__ */ l(
80
80
  "legend",
81
81
  {
82
- className: P({
83
- size: o,
84
- className: d("gi-font-bold", n)
82
+ className: P({ size: o }).base({
83
+ className: s("gi-font-bold", n)
85
84
  }),
86
85
  ...a,
87
- children: s
86
+ children: c
88
87
  }
89
88
  );
90
89
  };
@@ -94,7 +93,7 @@ Object.defineProperty(u, "componentType", {
94
93
  enumerable: !1
95
94
  });
96
95
  u.displayName = "FormFieldLabel";
97
- const h = ({ children: e, text: i, size: o, className: r }) => (b("FormFieldHint"), /* @__PURE__ */ l(E, { text: i, size: o, className: d("gi-mb-1", r), children: e }));
96
+ const h = ({ children: e, text: i, size: o, className: r }) => (b("FormFieldHint"), /* @__PURE__ */ l(E, { text: i, size: o, className: r, children: e }));
98
97
  Object.defineProperty(h, "componentType", {
99
98
  value: "FormFieldHint",
100
99
  writable: !1,
@@ -112,7 +111,7 @@ const g = ({
112
111
  {
113
112
  text: i,
114
113
  size: o,
115
- className: d("gi-mb-1", r),
114
+ className: s("gi-mb-1", r),
116
115
  ...n,
117
116
  children: e
118
117
  }
@@ -1,6 +1,6 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import c from "../../Heading.js";
3
- import { Button as h } from "../../button/button.js";
3
+ import h from "../../atoms/Button.js";
4
4
  import { translate as a } from "../../i18n/utility.js";
5
5
  import { IconButton as d } from "../../icon-button/icon-button.js";
6
6
  import { InputText as m } from "../../input-text/input-text.js";
@@ -35,7 +35,7 @@ function b({
35
35
  /* @__PURE__ */ e("div", { className: "gi-ml-1 gi-flex-none gi-hidden md:gi-block", children: /* @__PURE__ */ e(
36
36
  h,
37
37
  {
38
- "aria-label": a("header.submitSearch", {
38
+ ariaLabel: a("header.submitSearch", {
39
39
  defaultValue: "Submit Search"
40
40
  }),
41
41
  children: a("header.search", { defaultValue: "Search" })
@@ -1,30 +1,36 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { c as a } from "../index-CB-zPpNk.js";
3
- const d = {
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { c as o } from "../index-CB-zPpNk.js";
3
+ const n = {
4
4
  Small: "sm",
5
5
  Medium: "md",
6
6
  Large: "lg"
7
- }, l = a({
8
- base: "gi-hint-text",
7
+ }, r = ({
8
+ text: t,
9
+ children: e,
10
+ className: i,
11
+ size: m = n.Medium,
12
+ ...s
13
+ }) => /* @__PURE__ */ a(
14
+ "div",
15
+ {
16
+ className: l({ size: m, className: i }),
17
+ "data-testid": "hint-text",
18
+ ...s,
19
+ children: e ?? t
20
+ }
21
+ );
22
+ r.displayName = "HintText";
23
+ const l = o({
24
+ base: "gi-font-normal gi-text-color-text-system-neutral-muted gi-stroke-color-text-system-neutral-muted gi-mb-0",
9
25
  variants: {
10
26
  size: {
11
- sm: "gi-hint-text-sm",
12
- md: "gi-hint-text-md",
13
- lg: "gi-hint-text-lg"
27
+ sm: "gi-text-sm",
28
+ md: "gi-text-md",
29
+ lg: "gi-text-lg"
14
30
  }
15
- },
16
- defaultVariants: {
17
- size: "md"
18
31
  }
19
- }), r = ({
20
- text: t,
21
- children: i,
22
- className: e,
23
- size: m = d.Medium,
24
- ...s
25
- }) => /* @__PURE__ */ n("div", { className: l({ size: m, className: e }), ...s, children: i ?? t });
26
- r.displayName = "HintText";
32
+ });
27
33
  export {
28
- d as HintSize,
34
+ n as HintSize,
29
35
  r as HintText
30
36
  };
@@ -1,10 +1,8 @@
1
1
  import { ButtonProps } from '../button/types.js';
2
2
  import { IconProps } from '../icon/icon.js';
3
- export type IconButtonProps = Omit<ButtonProps, 'children'> & {
3
+ export type IconButtonProps = Omit<ButtonProps, 'children' | 'size'> & {
4
4
  icon: Omit<IconProps, 'size'>;
5
5
  className?: string;
6
+ size?: 'medium' | 'small' | 'large' | 'extraLarge';
6
7
  };
7
- export declare const IconButton: import('react').ForwardRefExoticComponent<Omit<ButtonProps, "children"> & {
8
- icon: Omit<IconProps, "size">;
9
- className?: string;
10
- } & import('react').RefAttributes<HTMLButtonElement>>;
8
+ export declare const IconButton: import('react').ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ export { type BreadcrumbLinkProps, type BreadcrumbProps, } from './breadcrumbs/t
11
11
  export { ButtonGroup, ButtonGroupItem } from './button-group/button-group.js';
12
12
  export * from './button-group/types.js';
13
13
  export { Button } from './button/button.js';
14
- export { type ButtonProps } from './button/types.js';
14
+ export type { ButtonProps } from './button/types';
15
15
  export { CardAction, CardContainer, CardDescription, CardHeader, CardMedia, CardSubtitle, CardTag, CardTitle, } from './card/card-next.js';
16
16
  export { Card } from './card/card.js';
17
17
  export type { CardActionProps, CardContainerProps, CardDescriptionProps, CardHeaderProps, CardMediaProps, CardProps, } from './card/types.js';