@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.
- package/dist/{Button-DNFXX5JD.js → Button-BFMrbk9D.js} +46 -40
- package/dist/components/Alert/Alert.d.ts +11 -7
- package/dist/components/Alert/Alert.js +52 -49
- package/dist/components/Alert/Alert.styles.d.ts +42 -0
- package/dist/components/Alert/Alert.styles.js +44 -1
- package/dist/components/Autocomplete/components/AutocompleteInstructions.js +0 -1
- package/dist/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/CloseButton/CloseButton.js +6 -5
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Card/Card.js +31 -30
- package/dist/components/Card/Card.styles.js +1 -1
- package/dist/components/Container/Container.styles.d.ts +5 -1
- package/dist/components/Container/Container.styles.js +14 -11
- package/dist/components/Input/Input.js +3 -2
- package/dist/components/Input/Input.styles.js +1 -1
- package/dist/components/Menu/Menu.d.ts +19 -6
- package/dist/components/Menu/Menu.js +76 -57
- package/dist/components/Menu/Menu.styles.d.ts +19 -86
- package/dist/components/Menu/Menu.styles.js +23 -175
- package/dist/components/Menu/MenuGroup/MenuGroup.d.ts +59 -0
- package/dist/components/Menu/MenuGroup/MenuGroup.js +127 -0
- package/dist/components/Menu/MenuGroup/MenuGroup.styles.d.ts +39 -0
- package/dist/components/Menu/MenuGroup/MenuGroup.styles.js +94 -0
- package/dist/components/Menu/MenuItem/MenuItem.d.ts +12 -2
- package/dist/components/Menu/MenuItem/MenuItem.js +154 -127
- package/dist/components/Menu/MenuItem/MenuItem.styles.d.ts +170 -0
- package/dist/components/Menu/MenuItem/MenuItem.styles.js +286 -0
- package/dist/components/Menu/MenuText/MenuText.js +9 -9
- package/dist/components/Menu/index.d.ts +3 -0
- package/dist/components/Menu/index.js +15 -9
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Panel/Panel.d.ts +3 -15
- package/dist/components/Panel/Panel.js +12 -9
- package/dist/components/Panel/index.d.ts +0 -1
- package/dist/components/Panel/index.js +1 -3
- package/dist/components/Popover/InputPopover/InputPopover.d.ts +1 -1
- package/dist/components/Popover/InputPopover/InputPopover.js +55 -62
- package/dist/components/Popover/Popover.d.ts +11 -1
- package/dist/components/Popover/Popover.js +55 -58
- package/dist/components/Popover/components/PopoverContent.js +55 -48
- package/dist/components/Popover/helpers/composeFloatingProps.js +15 -17
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +32 -21
- package/dist/components/Popover/hooks/useFloatingPopover.d.ts +70 -2
- package/dist/components/Popover/hooks/useFloatingPopover.js +75 -71
- package/dist/components/Popover/hooks/usePopoverActivatorInteractions.js +13 -12
- package/dist/components/Popover/hooks/usePopoverImperativeHandle.d.ts +12 -0
- package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
- package/dist/components/Popover/hooks/usePopoverNavigation.js +14 -13
- package/dist/components/Progress/Progress.js +1 -1
- package/dist/components/Progress/Progress.styles.js +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/SelectCreate/SelectCreate.js +7 -4
- package/dist/components/Select/SelectHeading/SelectHeading.js +4 -1
- package/dist/components/Select/SelectMenu/SelectMenu.js +165 -88
- package/dist/components/Select/SelectMenu/SelectMenuItem.js +21 -18
- package/dist/components/Select/SelectSearch/SelectSearch.d.ts +1 -1
- package/dist/components/Select/SelectTags/SelectTags.js +18 -15
- package/dist/components/Select/components/SelectOptions.js +54 -51
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/Slideout/Slideout.js +1 -1
- package/dist/components/Slideout/components/SlideoutInner.js +1 -1
- package/dist/components/Slideout/hooks/usePushElement.js +1 -1
- package/dist/components/TabSet/Tab/Tab.js +14 -14
- package/dist/components/TabSet/Tab/Tab.styles.d.ts +10 -0
- package/dist/components/TabSet/Tab/Tab.styles.js +16 -5
- package/dist/components/TabSet/TabSet.d.ts +8 -1
- package/dist/components/TabSet/TabSet.js +38 -36
- package/dist/components/TabSet/TabSet.styles.d.ts +11 -1
- package/dist/components/TabSet/TabSet.styles.js +22 -1
- package/dist/components/TabSet/TabSetProvider.d.ts +4 -1
- package/dist/components/TabSet/TabSetProvider.js +59 -54
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Toaster/Toaster.d.ts +2 -2
- package/dist/components/Toaster/Toaster.js +7 -7
- package/dist/components/Toaster/components/Toast/Toast.d.ts +18 -25
- package/dist/components/Toaster/components/Toast/Toast.js +64 -100
- package/dist/components/Toaster/components/Toast/Toast.styles.d.ts +12 -96
- package/dist/components/Toaster/components/Toast/Toast.styles.js +27 -164
- package/dist/components/Toaster/hooks/useToaster.js +13 -13
- package/dist/components/Toaster/index.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.js +5 -5
- package/dist/components/Tooltip/Tooltip.styles.js +2 -1
- package/dist/constants.d.ts +9 -0
- package/dist/constants.js +40 -31
- package/dist/enums.d.ts +5 -0
- package/dist/enums.js +1 -1
- package/dist/{floating-ui.react-BlU6Nz_4.js → floating-ui.react-B0nDXRN6.js} +767 -757
- package/dist/{index-BD6y-Q5p.js → index-BPhnth66.js} +14 -6
- package/dist/interfaces.d.ts +18 -10
- package/dist/main.d.ts +4 -1
- package/dist/main.js +276 -258
- package/dist/patterns/Breadcrumbs/Breadcrumbs.d.ts +47 -0
- package/dist/patterns/Breadcrumbs/Breadcrumbs.js +130 -0
- package/dist/patterns/Breadcrumbs/Breadcrumbs.styles.d.ts +1 -0
- package/dist/patterns/Breadcrumbs/Breadcrumbs.styles.js +57 -0
- package/dist/patterns/Breadcrumbs/index.d.ts +2 -0
- package/dist/patterns/Breadcrumbs/index.js +6 -0
- package/dist/patterns/ContextualMenu/ContextualMenu.d.ts +50 -0
- package/dist/patterns/ContextualMenu/ContextualMenu.js +99 -0
- package/dist/patterns/ContextualMenu/ContextualMenu.styles.d.ts +59 -0
- package/dist/patterns/ContextualMenu/ContextualMenu.styles.js +100 -0
- package/dist/patterns/ContextualMenu/index.d.ts +2 -0
- package/dist/patterns/ContextualMenu/index.js +6 -0
- package/dist/patterns/ContextualMenu/meta/Thumbnail.d.ts +2 -0
- package/dist/patterns/ContextualMenu/meta/index.d.ts +7 -0
- package/dist/patterns/DropdownMenu/DropdownMenu.d.ts +76 -0
- package/dist/patterns/DropdownMenu/DropdownMenu.js +221 -0
- package/dist/patterns/DropdownMenu/DropdownMenu.styles.d.ts +1 -0
- package/dist/patterns/DropdownMenu/DropdownMenu.styles.js +75 -0
- package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.d.ts +7 -0
- package/dist/patterns/DropdownMenu/hooks/useDropdownMenuFlags.js +25 -0
- package/dist/patterns/DropdownMenu/index.d.ts +2 -0
- package/dist/patterns/DropdownMenu/index.js +6 -0
- package/dist/patterns/DropdownMenu/meta/Thumbnail.d.ts +2 -0
- package/dist/patterns/DropdownMenu/meta/index.d.ts +7 -0
- package/dist/patterns/Form/FormField/hooks/useFieldRenderProps.js +26 -24
- package/dist/patterns/Form/components/LongForm.js +4 -5
- package/dist/patterns/Loading/components/LongLoading.js +0 -1
- package/dist/patterns/Loading/components/ValidateLoading.js +1 -1
- package/dist/patterns/Shadow/Shadow.js +747 -441
- package/dist/patterns/SideNav/SideNav.d.ts +156 -0
- package/dist/patterns/SideNav/SideNav.helpers.d.ts +5 -0
- package/dist/patterns/SideNav/SideNav.helpers.js +4 -0
- package/dist/patterns/SideNav/SideNav.js +212 -0
- package/dist/patterns/SideNav/SideNav.styles.d.ts +14 -0
- package/dist/patterns/SideNav/SideNav.styles.js +87 -0
- package/dist/patterns/SideNav/hooks/useSideNavState.d.ts +47 -0
- package/dist/patterns/SideNav/hooks/useSideNavState.js +57 -0
- package/dist/patterns/SideNav/index.d.ts +2 -0
- package/dist/patterns/SideNav/index.js +6 -0
- package/dist/patterns/SideNav/meta/Thumbnail.d.ts +2 -0
- package/dist/patterns/SideNav/meta/index.d.ts +7 -0
- package/dist/style.css +1 -1
- package/dist/styled-system/recipes/button.d.ts +1 -0
- package/dist/styled-system/tokens/tokens.d.ts +2 -2
- package/dist/styled-system/types/conditions.d.ts +16 -16
- package/dist/styled-system/types/prop-type.d.ts +1 -1
- package/package.json +13 -13
- package/dist/components/Filter/Filter.d.ts +0 -76
- package/dist/components/Filter/Filter.js +0 -227
- package/dist/components/Filter/Filter.styles.d.ts +0 -2
- package/dist/components/Filter/Filter.styles.js +0 -67
- package/dist/components/Filter/components/FilterLabel.d.ts +0 -6
- package/dist/components/Filter/components/FilterLabel.js +0 -11
- package/dist/components/Filter/components/FilterResetButton.d.ts +0 -1
- package/dist/components/Filter/components/FilterResetButton.js +0 -27
- package/dist/components/Filter/components/FilterResultsDescriptor.d.ts +0 -19
- package/dist/components/Filter/components/FilterResultsDescriptor.js +0 -19
- package/dist/components/Filter/components/FilterSearch.d.ts +0 -18
- package/dist/components/Filter/components/FilterSearch.js +0 -32
- package/dist/components/Filter/hooks/useFilterFlags.d.ts +0 -7
- package/dist/components/Filter/hooks/useFilterFlags.js +0 -25
- package/dist/components/Filter/index.d.ts +0 -1
- package/dist/components/Filter/index.js +0 -4
- package/dist/components/Panel/Panel.styles.d.ts +0 -7
- package/dist/components/Panel/Panel.styles.js +0 -25
- package/dist/components/Popover/components/NestedPopoverActivator.d.ts +0 -8
- package/dist/components/Popover/components/NestedPopoverActivator.js +0 -10
- package/dist/components/Toaster/components/Toast/ToastAnimated.d.ts +0 -22
- package/dist/components/Toaster/components/Toast/ToastAnimated.js +0 -53
- /package/dist/{components/Filter → patterns/Breadcrumbs}/meta/Thumbnail.d.ts +0 -0
- /package/dist/{components/Filter → patterns/Breadcrumbs}/meta/index.d.ts +0 -0
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { IressSpinner as
|
|
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
|
|
9
|
-
import { s as
|
|
10
|
-
import { m as
|
|
11
|
-
import { c as
|
|
12
|
-
import { c as
|
|
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
|
|
16
|
+
import { usePopover as Z } from "./components/Popover/hooks/usePopover.js";
|
|
17
17
|
import "./components/Popover/hooks/useFloatingPopover.js";
|
|
18
|
-
import { IressIcon as
|
|
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
|
|
21
|
+
import { IressTooltip as oo } from "./components/Tooltip/Tooltip.js";
|
|
22
22
|
import "./components/Tooltip/Tooltip.styles.js";
|
|
23
|
-
const I = {},
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
-
],
|
|
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
|
|
462
|
+
return J(o, S);
|
|
459
463
|
},
|
|
460
|
-
getVariantProps:
|
|
461
|
-
}),
|
|
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:
|
|
477
|
+
noWrap: F = !1,
|
|
473
478
|
onClick: v,
|
|
474
|
-
status:
|
|
475
|
-
value:
|
|
479
|
+
status: B,
|
|
480
|
+
value: G,
|
|
476
481
|
..._
|
|
477
|
-
},
|
|
478
|
-
const i =
|
|
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 ??
|
|
486
|
+
o ?? q?.isActiveActivator(m.current)
|
|
482
487
|
),
|
|
488
|
+
compact: k,
|
|
483
489
|
fluid: f === !0 ? "true" : f,
|
|
484
490
|
inButtonGroup: !!e,
|
|
485
|
-
mode:
|
|
491
|
+
mode: N,
|
|
486
492
|
iconOnly: !!l,
|
|
487
493
|
loading: !!s,
|
|
488
|
-
noWrap:
|
|
489
|
-
status:
|
|
494
|
+
noWrap: F,
|
|
495
|
+
status: B
|
|
490
496
|
}), [h, a] = d(
|
|
491
|
-
() =>
|
|
497
|
+
() => W(_),
|
|
492
498
|
[_]
|
|
493
|
-
), C =
|
|
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__ */
|
|
506
|
+
children: /* @__PURE__ */ O(j, { children: [
|
|
501
507
|
y && !s && /* @__PURE__ */ n("span", { className: t.prepend, children: y }),
|
|
502
508
|
!!s && /* @__PURE__ */ n(
|
|
503
|
-
|
|
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(
|
|
516
|
+
l ? /* @__PURE__ */ n($, { name: l }) : r,
|
|
511
517
|
c && /* @__PURE__ */ n("span", { className: t.append, children: c })
|
|
512
518
|
] }),
|
|
513
|
-
className:
|
|
519
|
+
className: X(
|
|
514
520
|
x,
|
|
515
521
|
b.FormElement,
|
|
516
522
|
b.FormElementInner,
|
|
517
523
|
t.root,
|
|
518
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
},
|
|
571
|
-
|
|
576
|
+
}, lo = M(ao);
|
|
577
|
+
lo.displayName = "IressButton";
|
|
572
578
|
export {
|
|
573
|
-
|
|
574
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { IressIcon as
|
|
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
|
|
9
|
-
import { c as
|
|
10
|
-
import { c as
|
|
11
|
-
import { GlobalCSSClass as
|
|
12
|
-
import { I as
|
|
13
|
-
import { IressCloseButton as
|
|
14
|
-
import { useControlledState as
|
|
15
|
-
import { s as
|
|
16
|
-
const
|
|
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
|
-
|
|
20
|
+
warning: "error",
|
|
21
|
+
neutral: "info"
|
|
22
|
+
}, D = ({
|
|
22
23
|
actions: n,
|
|
23
|
-
children:
|
|
24
|
-
className:
|
|
25
|
-
|
|
26
|
-
|
|
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:
|
|
31
|
+
icon: c,
|
|
30
32
|
multiLine: p = !1,
|
|
31
|
-
|
|
33
|
+
onClose: f,
|
|
32
34
|
status: s = "info",
|
|
33
35
|
variant: a,
|
|
34
|
-
...
|
|
36
|
+
...i
|
|
35
37
|
}) => {
|
|
36
|
-
const b = !!f, N = !!n?.length,
|
|
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: "
|
|
41
|
+
propName: "closed",
|
|
40
42
|
value: S
|
|
41
|
-
}), h =
|
|
42
|
-
if (
|
|
43
|
+
}), h = V(() => {
|
|
44
|
+
if (c === !1)
|
|
43
45
|
return null;
|
|
44
|
-
const r =
|
|
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,
|
|
54
|
-
return
|
|
55
|
+
}, [e.icon, c, s]);
|
|
56
|
+
return j ? null : /* @__PURE__ */ l(
|
|
55
57
|
u,
|
|
56
58
|
{
|
|
57
|
-
className:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
className: A(
|
|
60
|
+
C,
|
|
61
|
+
G(v.alert, k),
|
|
62
|
+
M.Alert
|
|
61
63
|
),
|
|
62
|
-
...
|
|
64
|
+
...w,
|
|
63
65
|
children: [
|
|
64
66
|
a !== "sidebar" && h,
|
|
65
|
-
/* @__PURE__ */
|
|
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(
|
|
71
|
-
children: typeof t == "string" ? /* @__PURE__ */
|
|
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:
|
|
79
|
-
|
|
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(
|
|
85
|
+
"data-testid": I(i["data-testid"], "footer"),
|
|
84
86
|
children: [
|
|
85
|
-
N && /* @__PURE__ */ o("div", { className: e.footerActions, children: n?.map((r,
|
|
86
|
-
|
|
87
|
+
N && /* @__PURE__ */ o("div", { className: e.footerActions, children: n?.map((r, E) => /* @__PURE__ */ _(
|
|
88
|
+
O,
|
|
87
89
|
{
|
|
88
90
|
...r,
|
|
89
|
-
className:
|
|
91
|
+
className: A(r.className, e.action),
|
|
90
92
|
status: s,
|
|
91
|
-
key:
|
|
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
|
-
|
|
102
|
+
R,
|
|
101
103
|
{
|
|
102
104
|
className: e.dismiss,
|
|
103
105
|
onClick: (r) => {
|
|
104
|
-
f?.(r),
|
|
105
|
-
}
|
|
106
|
+
f?.(r), B(!0);
|
|
107
|
+
},
|
|
108
|
+
screenreaderText: T
|
|
106
109
|
}
|
|
107
110
|
)
|
|
108
111
|
]
|
|
109
112
|
}
|
|
110
113
|
);
|
|
111
114
|
};
|
|
112
|
-
|
|
115
|
+
D.displayName = "IressAlert";
|
|
113
116
|
export {
|
|
114
|
-
|
|
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: {
|
|
@@ -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
|
|
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-
|
|
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-
|
|
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
|
-
...
|
|
11
|
-
},
|
|
10
|
+
...r
|
|
11
|
+
}, t) => /* @__PURE__ */ e(
|
|
12
12
|
m,
|
|
13
13
|
{
|
|
14
|
-
|
|
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:
|
|
20
|
+
ref: t
|
|
20
21
|
}
|
|
21
22
|
)
|
|
22
23
|
);
|