@iress-oss/ids-components 6.0.0-alpha.26 → 6.0.0-alpha.28

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 (164) hide show
  1. package/dist/{Button-DNFXX5JD.js → Button-BFMrbk9D.js} +46 -40
  2. package/dist/components/Alert/Alert.d.ts +11 -7
  3. package/dist/components/Alert/Alert.js +52 -49
  4. package/dist/components/Alert/Alert.styles.d.ts +42 -0
  5. package/dist/components/Alert/Alert.styles.js +44 -1
  6. package/dist/components/Autocomplete/components/AutocompleteInstructions.js +0 -1
  7. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +1 -1
  8. package/dist/components/Button/Button.d.ts +4 -0
  9. package/dist/components/Button/Button.js +1 -1
  10. package/dist/components/Button/CloseButton/CloseButton.js +6 -5
  11. package/dist/components/Button/index.js +1 -1
  12. package/dist/components/Card/Card.js +31 -30
  13. package/dist/components/Card/Card.styles.js +1 -1
  14. package/dist/components/Container/Container.styles.d.ts +5 -1
  15. package/dist/components/Container/Container.styles.js +14 -11
  16. package/dist/components/Input/Input.js +3 -2
  17. package/dist/components/Input/Input.styles.js +1 -1
  18. package/dist/components/Menu/Menu.d.ts +19 -6
  19. package/dist/components/Menu/Menu.js +76 -57
  20. package/dist/components/Menu/Menu.styles.d.ts +19 -86
  21. package/dist/components/Menu/Menu.styles.js +23 -175
  22. package/dist/components/Menu/MenuGroup/MenuGroup.d.ts +59 -0
  23. package/dist/components/Menu/MenuGroup/MenuGroup.js +127 -0
  24. package/dist/components/Menu/MenuGroup/MenuGroup.styles.d.ts +39 -0
  25. package/dist/components/Menu/MenuGroup/MenuGroup.styles.js +94 -0
  26. package/dist/components/Menu/MenuItem/MenuItem.d.ts +12 -2
  27. package/dist/components/Menu/MenuItem/MenuItem.js +154 -127
  28. package/dist/components/Menu/MenuItem/MenuItem.styles.d.ts +170 -0
  29. package/dist/components/Menu/MenuItem/MenuItem.styles.js +286 -0
  30. package/dist/components/Menu/MenuText/MenuText.js +9 -9
  31. package/dist/components/Menu/index.d.ts +3 -0
  32. package/dist/components/Menu/index.js +15 -9
  33. package/dist/components/Modal/Modal.js +2 -2
  34. package/dist/components/Panel/Panel.d.ts +3 -15
  35. package/dist/components/Panel/Panel.js +12 -9
  36. package/dist/components/Panel/index.d.ts +0 -1
  37. package/dist/components/Panel/index.js +1 -3
  38. package/dist/components/Popover/InputPopover/InputPopover.d.ts +1 -1
  39. package/dist/components/Popover/InputPopover/InputPopover.js +55 -62
  40. package/dist/components/Popover/Popover.d.ts +11 -1
  41. package/dist/components/Popover/Popover.js +55 -58
  42. package/dist/components/Popover/components/PopoverContent.js +55 -48
  43. package/dist/components/Popover/helpers/composeFloatingProps.js +15 -17
  44. package/dist/components/Popover/helpers/handlePopoverTabKey.js +32 -21
  45. package/dist/components/Popover/hooks/useFloatingPopover.d.ts +70 -2
  46. package/dist/components/Popover/hooks/useFloatingPopover.js +75 -71
  47. package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +13 -12
  48. package/dist/components/Popover/hooks/usePopoverImperativeHandle.d.ts +12 -0
  49. package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
  50. package/dist/components/Popover/hooks/usePopoverNavigation.js +14 -13
  51. package/dist/components/Progress/Progress.js +1 -1
  52. package/dist/components/Progress/Progress.styles.js +1 -1
  53. package/dist/components/Select/Select.d.ts +1 -1
  54. package/dist/components/Select/SelectCreate/SelectCreate.js +7 -4
  55. package/dist/components/Select/SelectHeading/SelectHeading.js +4 -1
  56. package/dist/components/Select/SelectMenu/SelectMenu.js +165 -88
  57. package/dist/components/Select/SelectMenu/SelectMenuItem.js +21 -18
  58. package/dist/components/Select/SelectSearch/SelectSearch.d.ts +1 -1
  59. package/dist/components/Select/SelectTags/SelectTags.js +18 -15
  60. package/dist/components/Select/components/SelectOptions.js +54 -51
  61. package/dist/components/SkipLink/SkipLink.js +1 -1
  62. package/dist/components/Slideout/Slideout.js +1 -1
  63. package/dist/components/Slideout/components/SlideoutInner.js +1 -1
  64. package/dist/components/Slideout/hooks/usePushElement.js +1 -1
  65. package/dist/components/TabSet/Tab/Tab.js +14 -14
  66. package/dist/components/TabSet/Tab/Tab.styles.d.ts +10 -0
  67. package/dist/components/TabSet/Tab/Tab.styles.js +16 -5
  68. package/dist/components/TabSet/TabSet.d.ts +8 -1
  69. package/dist/components/TabSet/TabSet.js +38 -36
  70. package/dist/components/TabSet/TabSet.styles.d.ts +11 -1
  71. package/dist/components/TabSet/TabSet.styles.js +22 -1
  72. package/dist/components/TabSet/TabSetProvider.d.ts +4 -1
  73. package/dist/components/TabSet/TabSetProvider.js +59 -54
  74. package/dist/components/Tag/Tag.js +1 -1
  75. package/dist/components/Toaster/Toaster.d.ts +2 -2
  76. package/dist/components/Toaster/Toaster.js +7 -7
  77. package/dist/components/Toaster/components/Toast/Toast.d.ts +18 -25
  78. package/dist/components/Toaster/components/Toast/Toast.js +64 -100
  79. package/dist/components/Toaster/components/Toast/Toast.styles.d.ts +12 -96
  80. package/dist/components/Toaster/components/Toast/Toast.styles.js +27 -164
  81. package/dist/components/Toaster/hooks/useToaster.js +13 -13
  82. package/dist/components/Toaster/index.d.ts +0 -1
  83. package/dist/components/Tooltip/Tooltip.js +5 -5
  84. package/dist/components/Tooltip/Tooltip.styles.js +2 -1
  85. package/dist/constants.d.ts +9 -0
  86. package/dist/constants.js +40 -31
  87. package/dist/enums.d.ts +5 -0
  88. package/dist/enums.js +1 -1
  89. package/dist/{floating-ui.react-BlU6Nz_4.js → floating-ui.react-B0nDXRN6.js} +767 -757
  90. package/dist/{index-BD6y-Q5p.js → index-BPhnth66.js} +14 -6
  91. package/dist/interfaces.d.ts +18 -10
  92. package/dist/main.d.ts +4 -1
  93. package/dist/main.js +276 -258
  94. package/dist/patterns/Breadcrumbs/Breadcrumbs.d.ts +47 -0
  95. package/dist/patterns/Breadcrumbs/Breadcrumbs.js +130 -0
  96. package/dist/patterns/Breadcrumbs/Breadcrumbs.styles.d.ts +1 -0
  97. package/dist/patterns/Breadcrumbs/Breadcrumbs.styles.js +57 -0
  98. package/dist/patterns/Breadcrumbs/index.d.ts +2 -0
  99. package/dist/patterns/Breadcrumbs/index.js +6 -0
  100. package/dist/patterns/ContextualMenu/ContextualMenu.d.ts +50 -0
  101. package/dist/patterns/ContextualMenu/ContextualMenu.js +99 -0
  102. package/dist/patterns/ContextualMenu/ContextualMenu.styles.d.ts +59 -0
  103. package/dist/patterns/ContextualMenu/ContextualMenu.styles.js +100 -0
  104. package/dist/patterns/ContextualMenu/index.d.ts +2 -0
  105. package/dist/patterns/ContextualMenu/index.js +6 -0
  106. package/dist/patterns/ContextualMenu/meta/Thumbnail.d.ts +2 -0
  107. package/dist/patterns/ContextualMenu/meta/index.d.ts +7 -0
  108. package/dist/patterns/DropdownMenu/DropdownMenu.d.ts +76 -0
  109. package/dist/patterns/DropdownMenu/DropdownMenu.js +221 -0
  110. package/dist/patterns/DropdownMenu/DropdownMenu.styles.d.ts +1 -0
  111. package/dist/patterns/DropdownMenu/DropdownMenu.styles.js +75 -0
  112. package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.d.ts +7 -0
  113. package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.js +25 -0
  114. package/dist/patterns/DropdownMenu/index.d.ts +2 -0
  115. package/dist/patterns/DropdownMenu/index.js +6 -0
  116. package/dist/patterns/DropdownMenu/meta/Thumbnail.d.ts +2 -0
  117. package/dist/patterns/DropdownMenu/meta/index.d.ts +7 -0
  118. package/dist/patterns/Form/FormField/hooks/useFieldRenderProps.js +26 -24
  119. package/dist/patterns/Form/components/LongForm.js +4 -5
  120. package/dist/patterns/Loading/components/LongLoading.js +0 -1
  121. package/dist/patterns/Loading/components/ValidateLoading.js +1 -1
  122. package/dist/patterns/Shadow/Shadow.js +747 -441
  123. package/dist/patterns/SideNav/SideNav.d.ts +156 -0
  124. package/dist/patterns/SideNav/SideNav.helpers.d.ts +5 -0
  125. package/dist/patterns/SideNav/SideNav.helpers.js +4 -0
  126. package/dist/patterns/SideNav/SideNav.js +212 -0
  127. package/dist/patterns/SideNav/SideNav.styles.d.ts +14 -0
  128. package/dist/patterns/SideNav/SideNav.styles.js +87 -0
  129. package/dist/patterns/SideNav/hooks/useSideNavState.d.ts +47 -0
  130. package/dist/patterns/SideNav/hooks/useSideNavState.js +57 -0
  131. package/dist/patterns/SideNav/index.d.ts +2 -0
  132. package/dist/patterns/SideNav/index.js +6 -0
  133. package/dist/patterns/SideNav/meta/Thumbnail.d.ts +2 -0
  134. package/dist/patterns/SideNav/meta/index.d.ts +7 -0
  135. package/dist/style.css +1 -1
  136. package/dist/styled-system/recipes/button.d.ts +1 -0
  137. package/dist/styled-system/tokens/tokens.d.ts +2 -2
  138. package/dist/styled-system/types/conditions.d.ts +16 -16
  139. package/dist/styled-system/types/prop-type.d.ts +1 -1
  140. package/package.json +13 -13
  141. package/dist/components/Filter/Filter.d.ts +0 -76
  142. package/dist/components/Filter/Filter.js +0 -227
  143. package/dist/components/Filter/Filter.styles.d.ts +0 -2
  144. package/dist/components/Filter/Filter.styles.js +0 -67
  145. package/dist/components/Filter/components/FilterLabel.d.ts +0 -6
  146. package/dist/components/Filter/components/FilterLabel.js +0 -11
  147. package/dist/components/Filter/components/FilterResetButton.d.ts +0 -1
  148. package/dist/components/Filter/components/FilterResetButton.js +0 -27
  149. package/dist/components/Filter/components/FilterResultsDescriptor.d.ts +0 -19
  150. package/dist/components/Filter/components/FilterResultsDescriptor.js +0 -19
  151. package/dist/components/Filter/components/FilterSearch.d.ts +0 -18
  152. package/dist/components/Filter/components/FilterSearch.js +0 -32
  153. package/dist/components/Filter/hooks/useFilterFlags.d.ts +0 -7
  154. package/dist/components/Filter/hooks/useFilterFlags.js +0 -25
  155. package/dist/components/Filter/index.d.ts +0 -1
  156. package/dist/components/Filter/index.js +0 -4
  157. package/dist/components/Panel/Panel.styles.d.ts +0 -7
  158. package/dist/components/Panel/Panel.styles.js +0 -25
  159. package/dist/components/Popover/components/NestedPopoverActivator.d.ts +0 -8
  160. package/dist/components/Popover/components/NestedPopoverActivator.js +0 -10
  161. package/dist/components/Toaster/components/Toast/ToastAnimated.d.ts +0 -22
  162. package/dist/components/Toaster/components/Toast/ToastAnimated.js +0 -53
  163. /package/dist/{components/Filter → patterns/Breadcrumbs}/meta/Thumbnail.d.ts +0 -0
  164. /package/dist/{components/Filter → patterns/Breadcrumbs}/meta/index.d.ts +0 -0
@@ -1,26 +1,26 @@
1
- import { jsxs as N, Fragment as O, jsx as n } from "react/jsx-runtime";
2
- import { forwardRef as j, useId as M, useRef as R, useMemo as d, useCallback as E, useImperativeHandle as T } from "react";
3
- import { IressSpinner as A } from "./components/Spinner/Spinner.js";
1
+ import { jsxs as O, Fragment as j, jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as M, useId as R, useRef as E, useMemo as d, useCallback as T, useImperativeHandle as A } from "react";
3
+ import { IressSpinner as K } from "./components/Spinner/Spinner.js";
4
4
  import "./components/Spinner/Spinner.styles.js";
5
5
  import { GlobalCSSClass as b } from "./enums.js";
6
6
  import "./components/ButtonGroup/ButtonGroup.js";
7
7
  import "./components/ButtonGroup/ButtonGroup.styles.js";
8
- import { useButtonGroupItem as K } from "./components/ButtonGroup/hooks/useButtonGroupItem.js";
9
- import { s as L } from "./is-valid-prop-C5D641yn.js";
10
- import { m as W, a as D, s as z, i as J, c as Q } from "./css-DVJ-ALYD.js";
11
- import { c as U } from "./cx-DN21T1EH.js";
12
- import { c as X } from "./create-recipe-BDTG8O8S.js";
8
+ import { useButtonGroupItem as L } from "./components/ButtonGroup/hooks/useButtonGroupItem.js";
9
+ import { s as W } from "./is-valid-prop-C5D641yn.js";
10
+ import { m as D, a as z, s as J, i as Q, c as U } from "./css-DVJ-ALYD.js";
11
+ import { c as X } from "./cx-DN21T1EH.js";
12
+ import { c as Y } from "./create-recipe-BDTG8O8S.js";
13
13
  import "./components/Popover/Popover.js";
14
14
  import "./components/Popover/Popover.styles.js";
15
15
  import "./components/Popover/InputPopover/InputPopover.js";
16
- import { usePopover as Y } from "./components/Popover/hooks/usePopover.js";
16
+ import { usePopover as Z } from "./components/Popover/hooks/usePopover.js";
17
17
  import "./components/Popover/hooks/useFloatingPopover.js";
18
- import { IressIcon as Z } from "./components/Icon/Icon.js";
18
+ import { IressIcon as $ } from "./components/Icon/Icon.js";
19
19
  import "./components/Icon/Icon.styles.js";
20
20
  import "./components/Icon/IconProvider.js";
21
- import { IressTooltip as $ } from "./components/Tooltip/Tooltip.js";
21
+ import { IressTooltip as oo } from "./components/Tooltip/Tooltip.js";
22
22
  import "./components/Tooltip/Tooltip.styles.js";
23
- const I = {}, oo = [
23
+ const I = {}, ro = [
24
24
  {
25
25
  mode: "primary",
26
26
  status: "danger",
@@ -383,7 +383,7 @@ const I = {}, oo = [
383
383
  }
384
384
  }
385
385
  }
386
- ], ro = [
386
+ ], so = [
387
387
  [
388
388
  "root",
389
389
  "button__root"
@@ -400,8 +400,9 @@ const I = {}, oo = [
400
400
  "spinner",
401
401
  "button__spinner"
402
402
  ]
403
- ], so = /* @__PURE__ */ ro.map(([o, c]) => [o, X(c, I, J(oo, o))]), eo = W((o = {}) => Object.fromEntries(so.map(([c, r]) => [c, r.recipeFn(o)]))), S = [
403
+ ], eo = /* @__PURE__ */ so.map(([o, c]) => [o, Y(c, I, Q(ro, o))]), to = D((o = {}) => Object.fromEntries(eo.map(([c, r]) => [c, r.recipeFn(o)]))), S = [
404
404
  "active",
405
+ "compact",
405
406
  "fluid",
406
407
  "inButtonGroup",
407
408
  "iconOnly",
@@ -409,7 +410,7 @@ const I = {}, oo = [
409
410
  "mode",
410
411
  "noWrap",
411
412
  "status"
412
- ], to = (o) => ({ ...I, ...D(o) }), co = /* @__PURE__ */ Object.assign(eo, {
413
+ ], co = (o) => ({ ...I, ...z(o) }), no = /* @__PURE__ */ Object.assign(to, {
413
414
  __recipe__: !1,
414
415
  __name__: "button",
415
416
  raw: (o) => o,
@@ -419,6 +420,9 @@ const I = {}, oo = [
419
420
  active: [
420
421
  "true"
421
422
  ],
423
+ compact: [
424
+ "true"
425
+ ],
422
426
  fluid: [
423
427
  "true",
424
428
  "xs",
@@ -455,67 +459,69 @@ const I = {}, oo = [
455
459
  ]
456
460
  },
457
461
  splitVariantProps(o) {
458
- return z(o, S);
462
+ return J(o, S);
459
463
  },
460
- getVariantProps: to
461
- }), no = ({
464
+ getVariantProps: co
465
+ }), ao = ({
462
466
  active: o,
463
467
  append: c,
464
468
  children: r,
465
469
  className: x,
470
+ compact: k,
466
471
  element: u,
467
472
  fluid: f,
468
473
  icon: l,
469
474
  loading: s = !1,
470
475
  mode: g = "secondary",
471
476
  prepend: y,
472
- noWrap: k = !1,
477
+ noWrap: F = !1,
473
478
  onClick: v,
474
- status: F,
475
- value: B,
479
+ status: B,
480
+ value: G,
476
481
  ..._
477
- }, G) => {
478
- const i = M(), P = B ?? (typeof r == "string" || typeof r == "number" || typeof r == "boolean" ? r : void 0), V = Y(), m = R(null), e = K({ value: P }), q = d(() => e ? e.active ? "primary" : "tertiary" : g, [e, g]), t = co({
482
+ }, P) => {
483
+ const i = R(), V = G ?? (typeof r == "string" || typeof r == "number" || typeof r == "boolean" ? r : void 0), q = Z(), m = E(null), e = L({ value: V }), N = d(() => e ? e.active ? "primary" : "tertiary" : g, [e, g]), t = no({
479
484
  active: (
480
485
  // eslint-disable-next-line react-hooks/refs -- ref needed for forwarding
481
- o ?? V?.isActiveActivator(m.current)
486
+ o ?? q?.isActiveActivator(m.current)
482
487
  ),
488
+ compact: k,
483
489
  fluid: f === !0 ? "true" : f,
484
490
  inButtonGroup: !!e,
485
- mode: q,
491
+ mode: N,
486
492
  iconOnly: !!l,
487
493
  loading: !!s,
488
- noWrap: k,
489
- status: F
494
+ noWrap: F,
495
+ status: B
490
496
  }), [h, a] = d(
491
- () => L(_),
497
+ () => W(_),
492
498
  [_]
493
- ), C = E(
499
+ ), C = T(
494
500
  (p) => {
495
501
  s || (v?.(p), e?.toggle());
496
502
  },
497
503
  [e, s, v]
498
504
  ), w = d(
499
505
  () => ({
500
- children: /* @__PURE__ */ N(O, { children: [
506
+ children: /* @__PURE__ */ O(j, { children: [
501
507
  y && !s && /* @__PURE__ */ n("span", { className: t.prepend, children: y }),
502
508
  !!s && /* @__PURE__ */ n(
503
- A,
509
+ K,
504
510
  {
505
511
  className: t.spinner,
506
512
  id: i,
507
513
  screenreaderText: s === !0 ? "Loading" : s
508
514
  }
509
515
  ),
510
- l ? /* @__PURE__ */ n(Z, { name: l }) : r,
516
+ l ? /* @__PURE__ */ n($, { name: l }) : r,
511
517
  c && /* @__PURE__ */ n("span", { className: t.append, children: c })
512
518
  ] }),
513
- className: U(
519
+ className: X(
514
520
  x,
515
521
  b.FormElement,
516
522
  b.FormElementInner,
517
523
  t.root,
518
- Q(h),
524
+ U(h),
519
525
  b.Button
520
526
  ),
521
527
  onClick: C
@@ -536,14 +542,14 @@ const I = {}, oo = [
536
542
  t.spinner
537
543
  ]
538
544
  );
539
- T(G, () => m.current);
545
+ A(P, () => m.current);
540
546
  const H = d(
541
547
  () => u ?? (a.href ? "a" : "button"),
542
548
  [u, a.href]
543
549
  );
544
550
  if (l && r) {
545
551
  const p = String(r);
546
- return /* @__PURE__ */ n($, { tooltipText: p, children: /* @__PURE__ */ n(
552
+ return /* @__PURE__ */ n(oo, { tooltipText: p, children: /* @__PURE__ */ n(
547
553
  H,
548
554
  {
549
555
  "aria-label": p,
@@ -567,9 +573,9 @@ const I = {}, oo = [
567
573
  ref: m
568
574
  }
569
575
  );
570
- }, ao = j(no);
571
- ao.displayName = "IressButton";
576
+ }, lo = M(ao);
577
+ lo.displayName = "IressButton";
572
578
  export {
573
- ao as I,
574
- co as b
579
+ lo as I,
580
+ no as b
575
581
  };
@@ -1,8 +1,8 @@
1
1
  import { IressIconProps } from '../Icon';
2
2
  import { IressTextProps } from '../Text';
3
- import { ReactNode } from 'react';
3
+ import { ReactNode, MouseEvent } from 'react';
4
4
  import { Statuses } from '../../types';
5
- import { IressButtonProps, IressCloseButtonProps } from '../Button';
5
+ import { IressButtonProps } from '../Button';
6
6
  export interface IressAlertButtonProps extends Omit<IressButtonProps, 'mode' | 'status'> {
7
7
  mode?: 'secondary' | 'tertiary';
8
8
  }
@@ -19,11 +19,15 @@ export interface IressAlertProps extends Omit<IressTextProps, 'element'> {
19
19
  /**
20
20
  * If true, the alert will be dismissed and unrendered from the DOM. Use for uncontrolled dismissal of the alert, where the component manages its own dismissed state internally.
21
21
  **/
22
- defaultDismissed?: boolean;
22
+ defaultClosed?: boolean;
23
23
  /**
24
24
  * If true, the alert will be dismissed and unrendered from the DOM. Use for controlled dismissal of the alert, where the parent component manages the dismissed state and passes it down via this prop.
25
25
  **/
26
- dismissed?: boolean;
26
+ closed?: boolean;
27
+ /**
28
+ * Optional override for the default close button label "Close".
29
+ */
30
+ closeLabel?: string;
27
31
  /**
28
32
  * Buttons and controls for the alert.
29
33
  * @deprecated Use `actions` instead for buttons with opinionated styling. If you need other footer content, use the `children` prop instead.
@@ -48,12 +52,12 @@ export interface IressAlertProps extends Omit<IressTextProps, 'element'> {
48
52
  * If set to `false`, no icon will be displayed.
49
53
  * If not provided, the icon will be determined by the `status` prop.
50
54
  **/
51
- onDismiss?: IressCloseButtonProps['onClick'];
55
+ onClose?: (e?: MouseEvent<HTMLButtonElement>) => void;
52
56
  /**
53
57
  * Alert type - danger, info, success or warning.
54
58
  * @default info
55
59
  */
56
- status?: Statuses;
60
+ status?: Statuses | 'neutral';
57
61
  /**
58
62
  * Variants of the alert, allowing it to be styled differently based on where its used in the application.
59
63
  * - Sidebar: The icon will be aligned to the heading, and the text will appear below the icon.
@@ -62,6 +66,6 @@ export interface IressAlertProps extends Omit<IressTextProps, 'element'> {
62
66
  variant?: 'sidebar' | 'full-width';
63
67
  }
64
68
  export declare const IressAlert: {
65
- ({ actions, children, className, defaultDismissed, dismissed: dismissedProp, footer, heading, icon: iconProp, multiLine, onDismiss, status, variant, ...restProps }: IressAlertProps): import("react/jsx-runtime").JSX.Element | null;
69
+ ({ actions, children, className, defaultClosed, closed: closedProp, closeLabel, footer, heading, icon: iconProp, multiLine, onClose, status, variant, ...restProps }: IressAlertProps): import("react/jsx-runtime").JSX.Element | null;
66
70
  displayName: string;
67
71
  };
@@ -1,94 +1,96 @@
1
- import { jsx as o, jsxs as i } from "react/jsx-runtime";
2
- import { useMemo as E, createElement as V } from "react";
3
- import { IressIcon as _ } from "../Icon/Icon.js";
1
+ import { jsx as o, jsxs as l } from "react/jsx-runtime";
2
+ import { useMemo as V, createElement as _ } from "react";
3
+ import { IressIcon as F } from "../Icon/Icon.js";
4
4
  import "../Icon/Icon.styles.js";
5
5
  import "../Icon/IconProvider.js";
6
6
  import { IressText as u } from "../Text/Text.js";
7
7
  import { propagateTestid as I } from "../../helpers/utility/propagateTestid.js";
8
- import { alert as A } from "./Alert.styles.js";
9
- import { c as F } from "../../css-DVJ-ALYD.js";
10
- import { c as C } from "../../cx-DN21T1EH.js";
11
- import { GlobalCSSClass as G } from "../../enums.js";
12
- import { I as M } from "../../Button-DNFXX5JD.js";
13
- import { IressCloseButton as O } from "../Button/CloseButton/CloseButton.js";
14
- import { useControlledState as R } from "../../hooks/useControlledState.js";
15
- import { s as $ } from "../../is-valid-prop-C5D641yn.js";
16
- const q = {
8
+ import { alert as x } from "./Alert.styles.js";
9
+ import { c as G } from "../../css-DVJ-ALYD.js";
10
+ import { c as A } from "../../cx-DN21T1EH.js";
11
+ import { GlobalCSSClass as M } from "../../enums.js";
12
+ import { I as O } from "../../Button-BFMrbk9D.js";
13
+ import { IressCloseButton as R } from "../Button/CloseButton/CloseButton.js";
14
+ import { useControlledState as $ } from "../../hooks/useControlledState.js";
15
+ import { s as q } from "../../is-valid-prop-C5D641yn.js";
16
+ const z = {
17
17
  danger: "cancel",
18
18
  info: "info",
19
19
  success: "check_circle",
20
- warning: "error"
21
- }, z = ({
20
+ warning: "error",
21
+ neutral: "info"
22
+ }, D = ({
22
23
  actions: n,
23
- children: x,
24
- className: y,
25
- defaultDismissed: g,
26
- dismissed: S,
24
+ children: y,
25
+ className: C,
26
+ defaultClosed: g,
27
+ closed: S,
28
+ closeLabel: T,
27
29
  footer: d,
28
30
  heading: t,
29
- icon: l,
31
+ icon: c,
30
32
  multiLine: p = !1,
31
- onDismiss: f,
33
+ onClose: f,
32
34
  status: s = "info",
33
35
  variant: a,
34
- ...m
36
+ ...i
35
37
  }) => {
36
- const b = !!f, N = !!n?.length, c = !!d || N, e = A({ hasFooter: c, multiLine: p, status: s, variant: a }), v = A.raw({ hasFooter: c, multiLine: p, status: s, variant: a }), [T, k] = $(m), { value: w, setValue: j } = R({
38
+ const b = !!f, N = !!n?.length, m = !!d || N, e = x({ hasFooter: m, multiLine: p, status: s, variant: a }), v = x.raw({ hasFooter: m, multiLine: p, status: s, variant: a }), [k, w] = q(i), { value: j, setValue: B } = $({
37
39
  component: "IressAlert",
38
40
  defaultValue: g,
39
- propName: "dismissed",
41
+ propName: "closed",
40
42
  value: S
41
- }), h = E(() => {
42
- if (l === !1)
43
+ }), h = V(() => {
44
+ if (c === !1)
43
45
  return null;
44
- const r = l ?? q[s];
46
+ const r = c ?? z[s];
45
47
  return /* @__PURE__ */ o(
46
- _,
48
+ F,
47
49
  {
48
50
  name: r,
49
51
  screenreaderText: `${s}: `,
50
52
  className: e.icon
51
53
  }
52
54
  );
53
- }, [e.icon, l, s]);
54
- return w ? null : /* @__PURE__ */ i(
55
+ }, [e.icon, c, s]);
56
+ return j ? null : /* @__PURE__ */ l(
55
57
  u,
56
58
  {
57
- className: C(
58
- y,
59
- F(v.alert, T),
60
- G.Alert
59
+ className: A(
60
+ C,
61
+ G(v.alert, k),
62
+ M.Alert
61
63
  ),
62
- ...k,
64
+ ...w,
63
65
  children: [
64
66
  a !== "sidebar" && h,
65
- /* @__PURE__ */ i("div", { className: e.wrapper, children: [
67
+ /* @__PURE__ */ l("div", { className: e.wrapper, children: [
66
68
  t && /* @__PURE__ */ o(
67
69
  "div",
68
70
  {
69
71
  className: e.heading,
70
- "data-testid": I(m["data-testid"], "heading"),
71
- children: typeof t == "string" ? /* @__PURE__ */ i(u, { element: "h2", className: e.heading, children: [
72
+ "data-testid": I(i["data-testid"], "heading"),
73
+ children: typeof t == "string" ? /* @__PURE__ */ l(u, { element: "h2", className: e.heading, children: [
72
74
  a === "sidebar" && h,
73
75
  " ",
74
76
  t
75
77
  ] }) : t
76
78
  }
77
79
  ),
78
- /* @__PURE__ */ o("div", { className: e.children, children: x }),
79
- c && /* @__PURE__ */ i(
80
+ /* @__PURE__ */ o("div", { className: e.children, children: y }),
81
+ m && /* @__PURE__ */ l(
80
82
  "div",
81
83
  {
82
84
  className: e.footer,
83
- "data-testid": I(m["data-testid"], "footer"),
85
+ "data-testid": I(i["data-testid"], "footer"),
84
86
  children: [
85
- N && /* @__PURE__ */ o("div", { className: e.footerActions, children: n?.map((r, B) => /* @__PURE__ */ V(
86
- M,
87
+ N && /* @__PURE__ */ o("div", { className: e.footerActions, children: n?.map((r, E) => /* @__PURE__ */ _(
88
+ O,
87
89
  {
88
90
  ...r,
89
- className: C(r.className, e.action),
91
+ className: A(r.className, e.action),
90
92
  status: s,
91
- key: B
93
+ key: E
92
94
  }
93
95
  )) }),
94
96
  d
@@ -97,19 +99,20 @@ const q = {
97
99
  )
98
100
  ] }),
99
101
  b && /* @__PURE__ */ o(
100
- O,
102
+ R,
101
103
  {
102
104
  className: e.dismiss,
103
105
  onClick: (r) => {
104
- f?.(r), j(!0);
105
- }
106
+ f?.(r), B(!0);
107
+ },
108
+ screenreaderText: T
106
109
  }
107
110
  )
108
111
  ]
109
112
  }
110
113
  );
111
114
  };
112
- z.displayName = "IressAlert";
115
+ D.displayName = "IressAlert";
113
116
  export {
114
- z as IressAlert
117
+ D as IressAlert
115
118
  };
@@ -173,6 +173,48 @@ export declare const alert: import('../../styled-system/types').SlotRecipeRuntim
173
173
  };
174
174
  };
175
175
  };
176
+ neutral: {
177
+ alert: {
178
+ backgroundColor: "colour.neutral.20";
179
+ color: "colour.neutral.90";
180
+ borderColor: "colour.neutral.90";
181
+ };
182
+ heading: {
183
+ color: "colour.neutral.90";
184
+ };
185
+ children: {
186
+ color: "colour.neutral.90";
187
+ };
188
+ icon: {
189
+ color: "colour.neutral.90";
190
+ };
191
+ dismiss: {
192
+ color: "colour.neutral.90";
193
+ _hover: {
194
+ bg: "colour.neutral.30";
195
+ borderColor: "colour.neutral.30";
196
+ };
197
+ };
198
+ action: {
199
+ '&.button__root--mode_secondary': {
200
+ bg: "colour.neutral.70";
201
+ borderColor: "colour.neutral.70";
202
+ color: "colour.neutral.20";
203
+ _hover: {
204
+ bg: "colour.neutral.80";
205
+ borderColor: "colour.neutral.80";
206
+ };
207
+ _active: {
208
+ boxShadow: "color-mix(in srgb, {colour.neutral.70}, transparent 80%) 0px 0px 0px 3px";
209
+ };
210
+ };
211
+ '&.button__root--mode_tertiary': {
212
+ _hover: {
213
+ bg: "colour.neutral.30";
214
+ };
215
+ };
216
+ };
217
+ };
176
218
  };
177
219
  variant: {
178
220
  sidebar: {
@@ -74,7 +74,8 @@ const e = o({
74
74
  },
75
75
  dismiss: {
76
76
  marginLeft: "auto",
77
- my: "-spacing.2"
77
+ my: "-spacing.2",
78
+ mr: "-spacing.1"
78
79
  }
79
80
  },
80
81
  variants: {
@@ -251,6 +252,48 @@ const e = o({
251
252
  }
252
253
  }
253
254
  }
255
+ },
256
+ neutral: {
257
+ alert: {
258
+ backgroundColor: "colour.neutral.20",
259
+ color: "colour.neutral.90",
260
+ borderColor: "colour.neutral.90"
261
+ },
262
+ heading: {
263
+ color: "colour.neutral.90"
264
+ },
265
+ children: {
266
+ color: "colour.neutral.90"
267
+ },
268
+ icon: {
269
+ color: "colour.neutral.90"
270
+ },
271
+ dismiss: {
272
+ color: "colour.neutral.90",
273
+ _hover: {
274
+ bg: "colour.neutral.30",
275
+ borderColor: "colour.neutral.30"
276
+ }
277
+ },
278
+ action: {
279
+ "&.button__root--mode_secondary": {
280
+ bg: "colour.neutral.70",
281
+ borderColor: "colour.neutral.70",
282
+ color: "colour.neutral.20",
283
+ _hover: {
284
+ bg: "colour.neutral.80",
285
+ borderColor: "colour.neutral.80"
286
+ },
287
+ _active: {
288
+ boxShadow: "color-mix(in srgb, {colour.neutral.70}, transparent 80%) 0px 0px 0px 3px"
289
+ }
290
+ },
291
+ "&.button__root--mode_tertiary": {
292
+ _hover: {
293
+ bg: "colour.neutral.30"
294
+ }
295
+ }
296
+ }
254
297
  }
255
298
  },
256
299
  variant: {
@@ -1,6 +1,5 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { IressPanel as s } from "../../Panel/Panel.js";
3
- import "../../Panel/Panel.styles.js";
4
3
  const e = ({
5
4
  minSearchLength: t
6
5
  }) => {
@@ -24,7 +24,7 @@ export interface AutocompleteSearchHookProps {
24
24
  /**
25
25
  * Options data set, shown when the input is not empty.
26
26
  */
27
- options?: LabelValueMeta[] | ((query: string) => Promise<LabelValueMeta[]>);
27
+ options: LabelValueMeta[] | ((query: string) => Promise<LabelValueMeta[]>);
28
28
  /**
29
29
  * The query value to filter items by and create search results.
30
30
  */
@@ -33,6 +33,10 @@ export interface InternalButtonProps<C extends ElementType | undefined = undefin
33
33
  * Content is placed between prepend and append if provided. Used to describe the expected action of this button.
34
34
  */
35
35
  children?: ReactNode;
36
+ /**
37
+ * Makes the button more compact by reducing padding and font size. Used for buttons with icon only or when space is limited.
38
+ */
39
+ compact?: boolean;
36
40
  /**
37
41
  * Change the component that will be rendered as the button, used for third-party libraries that require a specific element type.
38
42
  * By default, it will render a button or an anchor tag based on the `href` prop.
@@ -9,7 +9,7 @@ import "../ButtonGroup/hooks/useButtonGroupItem.js";
9
9
  import "../../is-valid-prop-C5D641yn.js";
10
10
  import "../../css-DVJ-ALYD.js";
11
11
  import "../../cx-DN21T1EH.js";
12
- import { I as q } from "../../Button-DNFXX5JD.js";
12
+ import { I as q } from "../../Button-BFMrbk9D.js";
13
13
  import "../Popover/Popover.js";
14
14
  import "../Popover/Popover.styles.js";
15
15
  import "../Popover/InputPopover/InputPopover.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { I as m } from "../../../Button-DNFXX5JD.js";
2
+ import { I as m } from "../../../Button-BFMrbk9D.js";
3
3
  import { forwardRef as a } from "react";
4
4
  import { c as l } from "../../../cx-DN21T1EH.js";
5
5
  import { GlobalCSSClass as i } from "../../../enums.js";
@@ -7,16 +7,17 @@ const f = a(
7
7
  ({
8
8
  className: o,
9
9
  screenreaderText: s = "Close button",
10
- ...t
11
- }, r) => /* @__PURE__ */ e(
10
+ ...r
11
+ }, t) => /* @__PURE__ */ e(
12
12
  m,
13
13
  {
14
- ...t,
14
+ borderRadius: "50%",
15
+ ...r,
15
16
  "aria-label": s,
16
17
  className: l(o, i.CloseButton),
17
18
  mode: "muted",
18
19
  icon: "close",
19
- ref: r
20
+ ref: t
20
21
  }
21
22
  )
22
23
  );
@@ -1,4 +1,4 @@
1
- import { I as s, b as r } from "../../Button-DNFXX5JD.js";
1
+ import { I as s, b as r } from "../../Button-BFMrbk9D.js";
2
2
  import { IressCloseButton as n } from "./CloseButton/CloseButton.js";
3
3
  export {
4
4
  s as IressButton,