@iress-oss/ids-components 6.0.0-alpha.1 → 6.0.0-alpha.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.
- package/dist/{Autocomplete-CLvWVHp6.js → Autocomplete-C5ubHBTi.js} +1 -1
- package/dist/{Button-D6AL0bia.js → Button-mmhMLwp9.js} +4 -1
- package/dist/{Provider-BXQiO7Gp.js → Provider-8wS70V56.js} +13 -13
- package/dist/{TableProvider-_4Whj6P5.js → TableProvider-bdUNuoG-.js} +1 -11
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/Alert/Alert.styles.js +14 -14
- package/dist/components/Autocomplete/Autocomplete.js +2 -2
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/Badge/Badge.styles.js +4 -4
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/CloseButton/CloseButton.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Card/Card.styles.js +16 -16
- package/dist/components/Checkbox/Checkbox.styles.js +5 -5
- package/dist/components/CheckboxGroup/CheckboxGroup.styles.js +10 -10
- package/dist/components/Container/Container.styles.js +1 -1
- package/dist/components/Divider/Divider.styles.js +1 -1
- package/dist/components/Expander/Expander.styles.js +3 -3
- package/dist/components/Field/Field.styles.js +9 -9
- package/dist/components/Field/FieldGroup/FieldGroup.styles.js +5 -5
- package/dist/components/Field/components/FieldHint.js +1 -1
- package/dist/components/Filter/Filter.js +3 -3
- package/dist/components/Filter/Filter.styles.js +3 -3
- package/dist/components/Filter/components/FilterResetButton.js +1 -1
- package/dist/components/Inline/Inline.styles.js +1 -1
- package/dist/components/Input/Input.js +84 -86
- package/dist/components/Input/Input.styles.js +7 -7
- package/dist/components/Label/Label.styles.js +3 -3
- package/dist/components/Link/Link.styles.js +2 -2
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/Menu.styles.js +11 -11
- package/dist/components/Menu/MenuItem/MenuItem.js +2 -2
- package/dist/components/Menu/MenuText/MenuText.js +1 -1
- package/dist/components/Modal/Modal.js +106 -112
- package/dist/components/Modal/Modal.styles.js +8 -8
- package/dist/components/Popover/components/NestedPopoverActivator.js +1 -1
- package/dist/components/Popover/components/PopoverContent.js +1 -1
- package/dist/components/Popover/helpers/handlePopoverTabKey.js +1 -1
- package/dist/components/Popover/hooks/usePopover.js +1 -1
- package/dist/components/Popover/hooks/usePopoverItem.js +1 -1
- package/dist/components/Popover/hooks/usePopoverNavigation.js +1 -1
- package/dist/components/Progress/Progress.js +35 -41
- package/dist/components/Progress/Progress.styles.js +3 -3
- package/dist/components/Provider/Provider.js +3 -3
- package/dist/components/Provider/index.js +1 -1
- package/dist/components/Radio/Radio.js +66 -60
- package/dist/components/Radio/Radio.styles.js +5 -5
- package/dist/components/RadioGroup/RadioGroup.styles.js +4 -4
- package/dist/components/Readonly/Readonly.styles.js +4 -4
- package/dist/components/RichSelect/RichSelect.js +2 -2
- package/dist/components/RichSelect/RichSelect.styles.js +9 -9
- package/dist/components/RichSelect/SelectHeading/SelectHeading.js +1 -1
- package/dist/components/RichSelect/SelectLabel/SelectLabel.styles.js +5 -5
- package/dist/components/RichSelect/SelectTags/SelectTags.js +49 -51
- package/dist/components/RichSelect/SelectTags/SelectTags.styles.js +3 -3
- package/dist/components/RichSelect/index.js +1 -1
- package/dist/components/Select/Select.styles.js +8 -8
- package/dist/components/Skeleton/Skeleton.styles.js +1 -1
- package/dist/components/SkipLink/SkipLink.js +1 -1
- package/dist/components/SkipLink/SkipLink.styles.js +1 -1
- package/dist/components/Slideout/Slideout.js +75 -70
- package/dist/components/Slideout/Slideout.styles.js +7 -7
- package/dist/components/Slideout/components/SlideoutInner.js +1 -1
- package/dist/components/Slideout/hooks/usePushElement.js +1 -1
- package/dist/components/Slider/Slider.styles.js +3 -3
- package/dist/components/Stack/Stack.styles.js +1 -1
- package/dist/components/TabSet/Tab/Tab.js +1 -1
- package/dist/components/TabSet/Tab/Tab.styles.js +2 -2
- package/dist/components/TabSet/TabSet.js +55 -52
- package/dist/components/TabSet/TabSet.styles.js +3 -3
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/TableBody/TableBody.js +1 -1
- package/dist/components/Table/TableProvider.js +2 -2
- package/dist/components/Table/components/TableEmpty.js +1 -1
- package/dist/components/Table/components/TableHeader.js +1 -1
- package/dist/components/Table/components/TableHeaderCell.js +1 -1
- package/dist/components/Table/components/TableRows.js +1 -1
- package/dist/components/Table/helpers/composeTableColumnDefs.js +1 -1
- package/dist/components/Table/hooks/useTableColumnSort.js +1 -1
- package/dist/components/Table/hooks/useTableColumnStyles.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.styles.js +4 -4
- package/dist/components/Text/Text.styles.js +3 -2
- package/dist/components/Toaster/Toaster.js +1 -1
- package/dist/components/Toaster/Toaster.styles.js +1 -1
- package/dist/components/Toaster/components/Toast/Toast.js +1 -1
- package/dist/components/Toaster/components/Toast/Toast.styles.js +12 -12
- package/dist/components/Toaster/components/Toast/ToastAnimated.js +18 -16
- package/dist/components/Toggle/Toggle.js +63 -58
- package/dist/components/Toggle/Toggle.styles.js +12 -12
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/Tooltip.styles.js +1 -1
- package/dist/components/ValidationMessage/ValidationMessage.js +1 -1
- package/dist/components/ValidationMessage/ValidationSummary/ValidationSummary.js +4 -4
- package/dist/{composeTableColumnDefs-Hmd6yfdj.js → composeTableColumnDefs-BfFBOARB.js} +0 -10
- package/dist/constants.js +1 -1
- package/dist/{floating-ui.react-CmSaAiNF.js → floating-ui.react-BetVZ099.js} +1 -1
- package/dist/helpers/styling/mapGutterToGap.js +7 -7
- package/dist/helpers/transition/getTransitionDuration.js +2 -2
- package/dist/{index-CvOVcYUc.js → index-CZ9ot38T.js} +83 -131
- package/dist/{index.esm-8uZEha-3.js → index.esm-CL8gh5wr.js} +0 -4
- package/dist/main.js +3 -3
- package/dist/patterns/Loading/Loading.styles.js +13 -13
- package/dist/patterns/Loading/LoadingSuspense.js +27 -27
- package/dist/patterns/Loading/components/ComponentLoading.js +38 -43
- package/dist/patterns/Loading/components/PageLoading.js +57 -60
- package/dist/patterns/Loading/components/ValidateLoading.js +1 -1
- package/dist/patterns/Loading/hooks/useEstimatedProgressValue.js +8 -12
- package/dist/patterns/Loading/hooks/useShouldRenderLoading.js +14 -14
- package/dist/patterns/Shadow/Shadow.js +8832 -19058
- package/dist/src/components/Alert/Alert.styles.d.ts +1 -1
- package/dist/src/components/Badge/Badge.styles.d.ts +2 -2
- package/dist/src/components/Card/Card.styles.d.ts +2 -2
- package/dist/src/components/Checkbox/Checkbox.styles.d.ts +3 -3
- package/dist/src/components/CheckboxGroup/CheckboxGroup.styles.d.ts +4 -4
- package/dist/src/components/Expander/Expander.styles.d.ts +2 -2
- package/dist/src/components/Field/Field.styles.d.ts +6 -6
- package/dist/src/components/Inline/Inline.d.ts +1 -2
- package/dist/src/components/Menu/Menu.styles.d.ts +5 -5
- package/dist/src/components/Modal/Modal.styles.d.ts +2 -2
- package/dist/src/components/Radio/Radio.styles.d.ts +1 -1
- package/dist/src/components/RadioGroup/RadioGroup.styles.d.ts +4 -4
- package/dist/src/components/RichSelect/RichSelect.styles.d.ts +7 -7
- package/dist/src/components/Row/Row.d.ts +1 -2
- package/dist/src/components/Select/Select.styles.d.ts +7 -7
- package/dist/src/components/Skeleton/Skeleton.styles.d.ts +1 -1
- package/dist/src/components/Slideout/Slideout.styles.d.ts +2 -2
- package/dist/src/components/Stack/Stack.d.ts +1 -2
- package/dist/src/components/Toaster/components/Toast/Toast.styles.d.ts +4 -4
- package/dist/src/components/Toggle/Toggle.d.ts +10 -2
- package/dist/src/components/Toggle/Toggle.styles.d.ts +4 -4
- package/dist/src/interfaces.d.ts +8 -10
- package/dist/src/patterns/Loading/Loading.styles.d.ts +10 -10
- package/dist/src/styled-system/jsx/create-style-context.d.ts +17 -10
- package/dist/src/styled-system/tokens/tokens.d.ts +1 -1
- package/dist/src/styled-system/types/conditions.d.ts +1 -1
- package/dist/src/styled-system/types/jsx.d.ts +8 -6
- package/dist/src/styled-system/types/prop-type.d.ts +2 -2
- package/dist/src/types.d.ts +3 -1
- package/dist/style.css +1 -1
- package/package.json +19 -18
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { useControlledState as
|
|
4
|
-
import { useIdIfNeeded as
|
|
5
|
-
import { propagateTestid as
|
|
6
|
-
import { IressReadonly as
|
|
1
|
+
import { jsx as e, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, useContext as A } from "react";
|
|
3
|
+
import { useControlledState as B } from "../../hooks/useControlledState.js";
|
|
4
|
+
import { useIdIfNeeded as E } from "../../hooks/useIdIfNeeded.js";
|
|
5
|
+
import { propagateTestid as l } from "../../helpers/utility/propagateTestid.js";
|
|
6
|
+
import { IressReadonly as H } from "../Readonly/Readonly.js";
|
|
7
7
|
import "../Readonly/Readonly.styles.js";
|
|
8
|
-
import { getFormControlValueAsString as
|
|
9
|
-
import { c as
|
|
10
|
-
import { c as
|
|
11
|
-
import { radio as
|
|
12
|
-
import { GlobalCSSClass as
|
|
13
|
-
import { IressCheckboxMark as
|
|
8
|
+
import { getFormControlValueAsString as P } from "../../helpers/form/getFormControlValueAsString.js";
|
|
9
|
+
import { c as C } from "../../css-fGu_jDvv.js";
|
|
10
|
+
import { c as z } from "../../cx-DN21T1EH.js";
|
|
11
|
+
import { radio as D } from "./Radio.styles.js";
|
|
12
|
+
import { GlobalCSSClass as p } from "../../enums.js";
|
|
13
|
+
import { IressCheckboxMark as J } from "../CheckboxMark/CheckboxMark.js";
|
|
14
14
|
import "../CheckboxMark/CheckboxMark.styles.js";
|
|
15
|
-
import { getRadioGroupContext as
|
|
15
|
+
import { getRadioGroupContext as K } from "../RadioGroup/RadioGroup.js";
|
|
16
16
|
import "../RadioGroup/RadioGroup.styles.js";
|
|
17
|
-
import { s as
|
|
18
|
-
import { s as
|
|
19
|
-
import { IressText as
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
import { s as h } from "../../factory-oPXoMw9H.js";
|
|
18
|
+
import { s as L } from "../../is-valid-prop-Ce0wiweq.js";
|
|
19
|
+
import { IressText as Q } from "../Text/Text.js";
|
|
20
|
+
const T = (a) => /* @__PURE__ */ e(
|
|
21
|
+
h.svg,
|
|
22
|
+
{
|
|
23
|
+
version: "1.1",
|
|
24
|
+
viewBox: "0 0 200 200",
|
|
25
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26
|
+
...a,
|
|
27
|
+
className: p.FormElement,
|
|
28
|
+
children: /* @__PURE__ */ e("circle", { cx: "100", cy: "100", r: "70" })
|
|
29
|
+
}
|
|
30
|
+
), U = ({
|
|
31
|
+
checked: a,
|
|
32
|
+
children: u,
|
|
23
33
|
className: x,
|
|
24
34
|
"data-testid": i,
|
|
25
35
|
defaultChecked: g,
|
|
@@ -30,84 +40,80 @@ const U = ({
|
|
|
30
40
|
required: b,
|
|
31
41
|
value: r,
|
|
32
42
|
touch: M,
|
|
33
|
-
...
|
|
43
|
+
...n
|
|
34
44
|
}, N) => {
|
|
35
|
-
const
|
|
45
|
+
const f = E(n), o = A(K()), { value: S, setValue: G } = B({
|
|
36
46
|
component: "Radio",
|
|
37
47
|
defaultValue: !!g,
|
|
38
|
-
value:
|
|
48
|
+
value: a,
|
|
39
49
|
propName: "checked"
|
|
40
|
-
}),
|
|
41
|
-
if (
|
|
50
|
+
}), d = !!o?.onChange, s = d ? o.value === r : S;
|
|
51
|
+
if (d ? o.readOnly : v)
|
|
42
52
|
return s ? /* @__PURE__ */ e(
|
|
43
|
-
|
|
53
|
+
H,
|
|
44
54
|
{
|
|
45
|
-
...
|
|
55
|
+
...n,
|
|
46
56
|
width: void 0,
|
|
47
|
-
value:
|
|
48
|
-
children:
|
|
57
|
+
value: P(r),
|
|
58
|
+
children: u
|
|
49
59
|
}
|
|
50
60
|
) : null;
|
|
51
|
-
const I = o?.name ?? R,
|
|
52
|
-
hiddenControl:
|
|
61
|
+
const I = o?.name ?? R, c = o?.hiddenRadio ?? y, O = o?.required ?? b, q = o?.touch ?? M, t = D.raw({
|
|
62
|
+
hiddenControl: c,
|
|
53
63
|
touch: q,
|
|
54
64
|
checked: s
|
|
55
|
-
}), F = ()
|
|
56
|
-
|
|
57
|
-
{
|
|
58
|
-
version: "1.1",
|
|
59
|
-
viewBox: "0 0 200 200",
|
|
60
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
61
|
-
...t.radioMark,
|
|
62
|
-
className: l.FormElement,
|
|
63
|
-
children: /* @__PURE__ */ e("circle", { cx: "100", cy: "100", r: "70" })
|
|
64
|
-
}
|
|
65
|
-
), [V, j] = Q(a);
|
|
66
|
-
return /* @__PURE__ */ f(
|
|
65
|
+
}), [F, V] = L(n);
|
|
66
|
+
return /* @__PURE__ */ k(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
"data-testid": i,
|
|
70
|
-
className:
|
|
70
|
+
className: z(
|
|
71
71
|
x,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
C(t.root, F),
|
|
73
|
+
p.Group,
|
|
74
|
+
p.Radio
|
|
75
75
|
),
|
|
76
76
|
children: [
|
|
77
77
|
/* @__PURE__ */ e(
|
|
78
|
-
|
|
78
|
+
h.input,
|
|
79
79
|
{
|
|
80
|
-
...
|
|
80
|
+
...V,
|
|
81
81
|
...t.input,
|
|
82
82
|
type: "radio",
|
|
83
|
-
id:
|
|
83
|
+
id: f,
|
|
84
84
|
name: I,
|
|
85
85
|
ref: N,
|
|
86
|
-
"data-testid":
|
|
87
|
-
onChange: (
|
|
88
|
-
|
|
86
|
+
"data-testid": l(i, "input"),
|
|
87
|
+
onChange: (m) => {
|
|
88
|
+
d || G(m.target.checked), w?.(m, r), o?.onChange?.(m, r);
|
|
89
89
|
},
|
|
90
90
|
value: String(r),
|
|
91
91
|
checked: s,
|
|
92
92
|
required: O
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
!
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
/* @__PURE__ */ k(h.label, { htmlFor: f, ...t.label, children: [
|
|
96
|
+
!c && /* @__PURE__ */ e(
|
|
97
|
+
T,
|
|
98
|
+
{
|
|
99
|
+
...t.radioMark,
|
|
100
|
+
"data-testid": l(i, "radioMark")
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
c && /* @__PURE__ */ e(
|
|
104
|
+
J,
|
|
99
105
|
{
|
|
100
|
-
className:
|
|
106
|
+
className: C(t.checkboxMark),
|
|
101
107
|
checked: s,
|
|
102
|
-
"data-testid":
|
|
108
|
+
"data-testid": l(i, "checkboxMark")
|
|
103
109
|
}
|
|
104
110
|
),
|
|
105
|
-
/* @__PURE__ */ e(
|
|
111
|
+
/* @__PURE__ */ e(Q, { element: "span", children: u })
|
|
106
112
|
] })
|
|
107
113
|
]
|
|
108
114
|
}
|
|
109
115
|
);
|
|
110
|
-
}, fo =
|
|
116
|
+
}, fo = j(U);
|
|
111
117
|
export {
|
|
112
118
|
fo as IressRadio
|
|
113
119
|
};
|
|
@@ -13,7 +13,7 @@ const e = r({
|
|
|
13
13
|
color: "colour.primary.fill",
|
|
14
14
|
display: "flex",
|
|
15
15
|
position: "relative",
|
|
16
|
-
padding: "spacing.
|
|
16
|
+
padding: "spacing.0",
|
|
17
17
|
transition: "[all 0.2s ease-out]",
|
|
18
18
|
"&:has(svg:hover)": {
|
|
19
19
|
color: "colour.primary.fillHover"
|
|
@@ -25,14 +25,14 @@ const e = r({
|
|
|
25
25
|
height: "[1px]",
|
|
26
26
|
margin: "[-1px]",
|
|
27
27
|
overflow: "hidden",
|
|
28
|
-
padding: "spacing.
|
|
28
|
+
padding: "spacing.0",
|
|
29
29
|
position: "absolute",
|
|
30
30
|
width: "[1px]"
|
|
31
31
|
},
|
|
32
32
|
label: {
|
|
33
33
|
display: "inline-flex",
|
|
34
34
|
alignItems: "center",
|
|
35
|
-
padding: "spacing.
|
|
35
|
+
padding: "spacing.0",
|
|
36
36
|
border: "[0px solid transparent]",
|
|
37
37
|
borderRadius: "radius.system.form",
|
|
38
38
|
backgroundColor: "[transparent]",
|
|
@@ -54,7 +54,7 @@ const e = r({
|
|
|
54
54
|
width: "[calc(1.3 * 1rem)]",
|
|
55
55
|
height: "[calc(1.3 * 1rem)]",
|
|
56
56
|
borderRadius: "[100%]",
|
|
57
|
-
marginInlineEnd: "spacing.
|
|
57
|
+
marginInlineEnd: "spacing.2",
|
|
58
58
|
flexShrink: 0,
|
|
59
59
|
color: "[currentColor]",
|
|
60
60
|
"& circle": {
|
|
@@ -94,7 +94,7 @@ const e = r({
|
|
|
94
94
|
borderStyle: "solid",
|
|
95
95
|
borderColor: "colour.neutral.40",
|
|
96
96
|
borderRadius: "radius.050",
|
|
97
|
-
padding: "spacing.
|
|
97
|
+
padding: "spacing.4"
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
},
|
|
@@ -6,7 +6,7 @@ const i = a({
|
|
|
6
6
|
stack: {
|
|
7
7
|
display: "inline-flex",
|
|
8
8
|
flexFlow: "column wrap",
|
|
9
|
-
rowGap: "spacing.
|
|
9
|
+
rowGap: "spacing.2",
|
|
10
10
|
"& > *": {
|
|
11
11
|
flexBasis: "[0]"
|
|
12
12
|
}
|
|
@@ -14,7 +14,7 @@ const i = a({
|
|
|
14
14
|
block: {
|
|
15
15
|
display: "flex",
|
|
16
16
|
flexFlow: "column wrap",
|
|
17
|
-
rowGap: "spacing.
|
|
17
|
+
rowGap: "spacing.2",
|
|
18
18
|
"& label": {
|
|
19
19
|
flexBasis: "[100%]"
|
|
20
20
|
}
|
|
@@ -23,7 +23,7 @@ const i = a({
|
|
|
23
23
|
display: "flex",
|
|
24
24
|
flexFlow: "row wrap",
|
|
25
25
|
width: "[100%]",
|
|
26
|
-
gap: "spacing.
|
|
26
|
+
gap: "spacing.2",
|
|
27
27
|
"& label": {
|
|
28
28
|
flexBasis: "[auto]",
|
|
29
29
|
flexGrow: "[0]"
|
|
@@ -31,7 +31,7 @@ const i = a({
|
|
|
31
31
|
},
|
|
32
32
|
inlineFlex: {
|
|
33
33
|
display: "inline-flex",
|
|
34
|
-
gap: "spacing.
|
|
34
|
+
gap: "spacing.2"
|
|
35
35
|
},
|
|
36
36
|
inlineEqualWidth: {
|
|
37
37
|
display: "flex",
|
|
@@ -26,16 +26,16 @@ const i = t({
|
|
|
26
26
|
display: "none"
|
|
27
27
|
},
|
|
28
28
|
"& > *": {
|
|
29
|
-
px: "spacing.
|
|
29
|
+
px: "spacing.3"
|
|
30
30
|
},
|
|
31
31
|
_first: {
|
|
32
32
|
"& > *": {
|
|
33
|
-
pl: "spacing.
|
|
33
|
+
pl: "spacing.0"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
_last: {
|
|
37
37
|
"& > *": {
|
|
38
|
-
pr: "spacing.
|
|
38
|
+
pr: "spacing.0"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
},
|
|
@@ -43,7 +43,7 @@ const i = t({
|
|
|
43
43
|
display: "flex",
|
|
44
44
|
alignItems: "center",
|
|
45
45
|
"& > *": {
|
|
46
|
-
padding: "[0 {spacing.spacing.
|
|
46
|
+
padding: "[0 {spacing.spacing.3}]"
|
|
47
47
|
},
|
|
48
48
|
_empty: {
|
|
49
49
|
display: "none"
|
|
@@ -3,7 +3,7 @@ import "react";
|
|
|
3
3
|
import "../../cx-DN21T1EH.js";
|
|
4
4
|
import "./RichSelect.styles.js";
|
|
5
5
|
import "./hooks/useRichSelectState.js";
|
|
6
|
-
import { I as K } from "../../Autocomplete-
|
|
6
|
+
import { I as K } from "../../Autocomplete-C5ubHBTi.js";
|
|
7
7
|
import "./SelectBody/SelectBody.styles.js";
|
|
8
8
|
import "../../enums.js";
|
|
9
9
|
import "../Menu/Menu.js";
|
|
@@ -21,7 +21,7 @@ import "../Popover/Popover.styles.js";
|
|
|
21
21
|
import "../Popover/InputPopover/InputPopover.js";
|
|
22
22
|
import "./SelectSearchInput/SelectSearchInput.js";
|
|
23
23
|
import "./SelectTags/SelectTags.styles.js";
|
|
24
|
-
import "../../Button-
|
|
24
|
+
import "../../Button-mmhMLwp9.js";
|
|
25
25
|
import "../Button/CloseButton/CloseButton.js";
|
|
26
26
|
import "../Tag/Tag.styles.js";
|
|
27
27
|
import "../Tag/TagInput/TagInput.js";
|
|
@@ -20,8 +20,8 @@ const i = c({
|
|
|
20
20
|
width: "[100%]"
|
|
21
21
|
},
|
|
22
22
|
dropdownClear: {
|
|
23
|
-
paddingX: "spacing.
|
|
24
|
-
paddingY: "spacing.
|
|
23
|
+
paddingX: "spacing.2",
|
|
24
|
+
paddingY: "spacing.1",
|
|
25
25
|
minHeight: "[0px]",
|
|
26
26
|
boxShadow: "[none]"
|
|
27
27
|
},
|
|
@@ -35,37 +35,37 @@ const i = c({
|
|
|
35
35
|
width: {
|
|
36
36
|
2: {
|
|
37
37
|
richSelect: {
|
|
38
|
-
width: "[calc({spacing.spacing.
|
|
38
|
+
width: "[calc({spacing.spacing.2} + calc({sizes.chevron.select} * 2) + {sizes.input.2})]"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
4: {
|
|
42
42
|
richSelect: {
|
|
43
|
-
width: "[calc({spacing.spacing.
|
|
43
|
+
width: "[calc({spacing.spacing.2} + calc({sizes.chevron.select} * 2) + {sizes.input.4})]"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
6: {
|
|
47
47
|
richSelect: {
|
|
48
|
-
width: "[calc({spacing.spacing.
|
|
48
|
+
width: "[calc({spacing.spacing.2} + calc({sizes.chevron.select} * 2) + {sizes.input.6})]"
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
8: {
|
|
52
52
|
richSelect: {
|
|
53
|
-
width: "[calc({spacing.spacing.
|
|
53
|
+
width: "[calc({spacing.spacing.2} + calc({sizes.chevron.select} * 2) + {sizes.input.8})]"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
10: {
|
|
57
57
|
richSelect: {
|
|
58
|
-
width: "[calc({spacing.spacing.
|
|
58
|
+
width: "[calc({spacing.spacing.2} + calc({sizes.chevron.select} * 2) + {sizes.input.10})]"
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
12: {
|
|
62
62
|
richSelect: {
|
|
63
|
-
width: "[calc({spacing.spacing.
|
|
63
|
+
width: "[calc({spacing.spacing.2} + calc({sizes.chevron.select} * 2) + {sizes.input.12})]"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
16: {
|
|
67
67
|
richSelect: {
|
|
68
|
-
width: "[calc({spacing.spacing.
|
|
68
|
+
width: "[calc({spacing.spacing.2} + calc({sizes.chevron.select} * 2) + {sizes.input.16})]"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"25perc": {
|
|
@@ -8,7 +8,7 @@ import "../../Divider/Divider.styles.js";
|
|
|
8
8
|
import { GlobalCSSClass as p } from "../../../enums.js";
|
|
9
9
|
import "../../Menu/MenuItem/MenuItem.js";
|
|
10
10
|
import { IressMenuHeading as I } from "../../Menu/MenuText/MenuText.js";
|
|
11
|
-
import { I as v } from "../../../Button-
|
|
11
|
+
import { I as v } from "../../../Button-mmhMLwp9.js";
|
|
12
12
|
import "../../Button/CloseButton/CloseButton.js";
|
|
13
13
|
import "../../Popover/Popover.js";
|
|
14
14
|
import "../../Popover/Popover.styles.js";
|
|
@@ -8,8 +8,8 @@ const n = e({
|
|
|
8
8
|
justifyContent: "space-between",
|
|
9
9
|
alignItems: "center",
|
|
10
10
|
minHeight: "input.height",
|
|
11
|
-
paddingInline: "spacing.
|
|
12
|
-
paddingBlock: "spacing.
|
|
11
|
+
paddingInline: "spacing.2",
|
|
12
|
+
paddingBlock: "spacing.0",
|
|
13
13
|
backgroundColor: "colour.neutral.10",
|
|
14
14
|
border: "input",
|
|
15
15
|
borderRadius: "radius.system.form",
|
|
@@ -59,14 +59,14 @@ const n = e({
|
|
|
59
59
|
display: "inline-flex",
|
|
60
60
|
alignItems: "center",
|
|
61
61
|
color: "colour.neutral.40",
|
|
62
|
-
gap: "spacing.
|
|
62
|
+
gap: "spacing.1"
|
|
63
63
|
},
|
|
64
64
|
append: {
|
|
65
65
|
display: "inline-flex",
|
|
66
66
|
alignItems: "center",
|
|
67
67
|
color: "colour.neutral.70",
|
|
68
|
-
gap: "spacing.
|
|
69
|
-
marginInlineEnd: "spacing.
|
|
68
|
+
gap: "spacing.1",
|
|
69
|
+
marginInlineEnd: "spacing.1",
|
|
70
70
|
pointerEvents: "none"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
@@ -1,132 +1,130 @@
|
|
|
1
1
|
import { jsxs as N, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { propagateTestid as b } from "../../../helpers/utility/propagateTestid.js";
|
|
3
|
-
import { toArray as
|
|
4
|
-
import { composeLabelValueDescriptor as
|
|
5
|
-
import { getFormControlValueAsStringIfDefined as
|
|
6
|
-
import { useMemo as M, useState as j, useContext as
|
|
7
|
-
import { focusableElements as
|
|
8
|
-
import { PopoverContext as
|
|
3
|
+
import { toArray as k } from "../../../helpers/formatting/toArray.js";
|
|
4
|
+
import { composeLabelValueDescriptor as w } from "../../../helpers/label-value/composeLabelValueDescriptor.js";
|
|
5
|
+
import { getFormControlValueAsStringIfDefined as E } from "../../../helpers/form/getFormControlValueAsStringIfDefined.js";
|
|
6
|
+
import { useMemo as M, useState as j, useContext as A, useCallback as I } from "react";
|
|
7
|
+
import { focusableElements as B } from "../../../helpers/dom/focusableElements.js";
|
|
8
|
+
import { PopoverContext as O } from "../../Popover/hooks/usePopover.js";
|
|
9
9
|
import { IressText as v } from "../../Text/Text.js";
|
|
10
|
-
import { c as
|
|
11
|
-
import { selectTags as
|
|
10
|
+
import { c as L } from "../../../cx-DN21T1EH.js";
|
|
11
|
+
import { selectTags as F } from "./SelectTags.styles.js";
|
|
12
12
|
import { IressTag as T } from "../../Tag/Tag.js";
|
|
13
13
|
import "../../Tag/Tag.styles.js";
|
|
14
14
|
import "../../Tag/TagInput/TagInput.js";
|
|
15
|
-
import { IressMenu as
|
|
15
|
+
import { IressMenu as V } from "../../Menu/Menu.js";
|
|
16
16
|
import "../../Menu/Menu.styles.js";
|
|
17
17
|
import "../../Divider/Divider.styles.js";
|
|
18
18
|
import { GlobalCSSClass as C } from "../../../enums.js";
|
|
19
19
|
import { IressMenuItem as D } from "../../Menu/MenuItem/MenuItem.js";
|
|
20
|
-
import { IressPopover as
|
|
20
|
+
import { IressPopover as G } from "../../Popover/Popover.js";
|
|
21
21
|
import "../../Popover/Popover.styles.js";
|
|
22
22
|
import "../../Popover/InputPopover/InputPopover.js";
|
|
23
|
-
import { I as
|
|
23
|
+
import { I as R } from "../../../Button-mmhMLwp9.js";
|
|
24
24
|
import "../../Button/CloseButton/CloseButton.js";
|
|
25
|
-
import { IressIcon as
|
|
25
|
+
import { IressIcon as W } from "../../Icon/Icon.js";
|
|
26
26
|
import "../../Icon/Icon.styles.js";
|
|
27
27
|
import "../../Inline/Inline.styles.js";
|
|
28
|
-
import { IressInline as
|
|
28
|
+
import { IressInline as $ } from "../../Inline/Inline.js";
|
|
29
29
|
const S = (r, s) => {
|
|
30
30
|
if (!r?.api.elements.reference || !s)
|
|
31
31
|
return;
|
|
32
|
-
const a = r.getFocusableActivator(), n =
|
|
32
|
+
const a = r.getFocusableActivator(), n = B(
|
|
33
33
|
r.api.elements.reference
|
|
34
34
|
).filter((l) => l !== a);
|
|
35
35
|
if (n.length < 1)
|
|
36
36
|
a?.focus();
|
|
37
37
|
else {
|
|
38
|
-
const l = n.indexOf(s.currentTarget),
|
|
38
|
+
const l = n.indexOf(s.currentTarget), t = n.filter(
|
|
39
39
|
(m) => m !== s.currentTarget
|
|
40
40
|
), i = Math.max(l - 1, 0);
|
|
41
|
-
!
|
|
41
|
+
!t[i] && t[0] ? t[0].focus() : t[0] ? t[i].focus() : a?.focus();
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, q = ({
|
|
44
44
|
"data-testid": r,
|
|
45
45
|
limit: s = 5,
|
|
46
46
|
onDelete: a,
|
|
47
47
|
onDeleteAll: n,
|
|
48
48
|
onToggleActions: l,
|
|
49
|
-
selectedArray:
|
|
49
|
+
selectedArray: t,
|
|
50
50
|
selectedOptionsText: i
|
|
51
51
|
}) => {
|
|
52
|
-
const [m,
|
|
53
|
-
(
|
|
52
|
+
const [m, u] = j(!1), c = A(O), p = F(), h = I(
|
|
53
|
+
(e, f) => {
|
|
54
54
|
a?.(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
),
|
|
55
|
+
t.find((x) => x.label === e),
|
|
56
|
+
f
|
|
57
|
+
), f.stopPropagation(), S(c, f);
|
|
58
58
|
},
|
|
59
|
-
[a, c,
|
|
59
|
+
[a, c, t]
|
|
60
60
|
), g = I(
|
|
61
|
-
(
|
|
62
|
-
n?.(
|
|
61
|
+
(e) => {
|
|
62
|
+
n?.(e), c?.getFocusableActivator()?.focus();
|
|
63
63
|
},
|
|
64
64
|
[n, c]
|
|
65
65
|
);
|
|
66
|
-
return
|
|
67
|
-
e.length || f(!1);
|
|
68
|
-
}, [e]), m || !s || e.length <= s ? e.map((t) => /* @__PURE__ */ o(
|
|
66
|
+
return m || !s || t.length <= s ? t.map((e) => /* @__PURE__ */ o(
|
|
69
67
|
T,
|
|
70
68
|
{
|
|
71
69
|
className: p.tag,
|
|
72
70
|
"data-testid": b(r, "tag"),
|
|
73
|
-
deleteButtonText: `Delete ${
|
|
71
|
+
deleteButtonText: `Delete ${e.label}`,
|
|
74
72
|
onDelete: h,
|
|
75
|
-
children:
|
|
73
|
+
children: e.label
|
|
76
74
|
},
|
|
77
|
-
|
|
75
|
+
E(e.value) ?? e.label
|
|
78
76
|
)) : /* @__PURE__ */ o(
|
|
79
77
|
T,
|
|
80
78
|
{
|
|
81
79
|
className: p.tag,
|
|
82
80
|
"data-testid": b(r, "tag"),
|
|
83
81
|
deleteButton: /* @__PURE__ */ o(
|
|
84
|
-
|
|
82
|
+
G,
|
|
85
83
|
{
|
|
86
|
-
activator: /* @__PURE__ */ o(
|
|
87
|
-
|
|
84
|
+
activator: /* @__PURE__ */ o(R, { mode: "tertiary", children: /* @__PURE__ */ o(
|
|
85
|
+
W,
|
|
88
86
|
{
|
|
89
87
|
name: "chevron-circle-down",
|
|
90
88
|
screenreaderText: "Actions"
|
|
91
89
|
}
|
|
92
90
|
) }),
|
|
93
91
|
onActivated: () => l?.(!0),
|
|
94
|
-
onClick: (
|
|
95
|
-
|
|
92
|
+
onClick: (e) => {
|
|
93
|
+
e.stopPropagation(), S(c, e);
|
|
96
94
|
},
|
|
97
95
|
onDeactivated: () => l?.(!1),
|
|
98
|
-
children: /* @__PURE__ */ N(
|
|
99
|
-
/* @__PURE__ */ o(D, { onClick: () =>
|
|
96
|
+
children: /* @__PURE__ */ N(V, { children: [
|
|
97
|
+
/* @__PURE__ */ o(D, { onClick: () => u(!0), children: "Expand all" }),
|
|
100
98
|
/* @__PURE__ */ o(D, { onClick: g, children: "Delete all" })
|
|
101
99
|
] })
|
|
102
100
|
}
|
|
103
101
|
),
|
|
104
|
-
children:
|
|
102
|
+
children: w(t, i)
|
|
105
103
|
}
|
|
106
104
|
);
|
|
107
|
-
},
|
|
105
|
+
}, xe = ({
|
|
108
106
|
append: r = "",
|
|
109
107
|
className: s,
|
|
110
108
|
"data-testid": a,
|
|
111
109
|
id: n,
|
|
112
110
|
limit: l = 5,
|
|
113
|
-
onDelete:
|
|
111
|
+
onDelete: t,
|
|
114
112
|
onDeleteAll: i,
|
|
115
113
|
onToggleActions: m,
|
|
116
|
-
placeholder:
|
|
114
|
+
placeholder: u,
|
|
117
115
|
prepend: c,
|
|
118
116
|
selected: p,
|
|
119
117
|
selectedOptionsText: h = "{{numOptions}} selected",
|
|
120
118
|
...g
|
|
121
119
|
}) => {
|
|
122
|
-
const
|
|
120
|
+
const e = M(() => k(p), [p]), f = !e.length && u, x = !!e.length, P = r == null || r === "" || !r, d = F({ showDefaultChevron: P });
|
|
123
121
|
return /* @__PURE__ */ N(
|
|
124
122
|
v,
|
|
125
123
|
{
|
|
126
124
|
...g,
|
|
127
125
|
id: n,
|
|
128
126
|
tabIndex: 0,
|
|
129
|
-
className:
|
|
127
|
+
className: L(
|
|
130
128
|
s,
|
|
131
129
|
d.root,
|
|
132
130
|
C.FormElementInner,
|
|
@@ -134,16 +132,16 @@ const S = (r, s) => {
|
|
|
134
132
|
),
|
|
135
133
|
children: [
|
|
136
134
|
c && /* @__PURE__ */ o("span", { className: d.prepend, children: c }),
|
|
137
|
-
|
|
138
|
-
x && /* @__PURE__ */ o(
|
|
139
|
-
|
|
135
|
+
f && /* @__PURE__ */ o(v, { className: d.placeholder, children: u }),
|
|
136
|
+
x && /* @__PURE__ */ o($, { gap: "sm", className: d.tagsList, children: /* @__PURE__ */ o(
|
|
137
|
+
q,
|
|
140
138
|
{
|
|
141
139
|
"data-testid": a,
|
|
142
140
|
limit: l,
|
|
143
|
-
onDelete:
|
|
141
|
+
onDelete: t,
|
|
144
142
|
onDeleteAll: i,
|
|
145
143
|
onToggleActions: m,
|
|
146
|
-
selectedArray:
|
|
144
|
+
selectedArray: e,
|
|
147
145
|
selectedOptionsText: h
|
|
148
146
|
}
|
|
149
147
|
) }),
|
|
@@ -161,5 +159,5 @@ const S = (r, s) => {
|
|
|
161
159
|
);
|
|
162
160
|
};
|
|
163
161
|
export {
|
|
164
|
-
|
|
162
|
+
xe as IressSelectTags
|
|
165
163
|
};
|
|
@@ -6,8 +6,8 @@ const r = o({
|
|
|
6
6
|
display: "flex",
|
|
7
7
|
alignItems: "center",
|
|
8
8
|
width: "[100%]",
|
|
9
|
-
paddingBlock: "spacing.
|
|
10
|
-
paddingInline: "spacing.
|
|
9
|
+
paddingBlock: "spacing.1",
|
|
10
|
+
paddingInline: "spacing.2",
|
|
11
11
|
minHeight: "input.height",
|
|
12
12
|
alignSelf: "auto",
|
|
13
13
|
backgroundColor: "colour.neutral.10",
|
|
@@ -52,7 +52,7 @@ const r = o({
|
|
|
52
52
|
prepend: {
|
|
53
53
|
display: "inline-flex",
|
|
54
54
|
alignItems: "center",
|
|
55
|
-
gap: "spacing.
|
|
55
|
+
gap: "spacing.0",
|
|
56
56
|
color: "colour.neutral.70"
|
|
57
57
|
},
|
|
58
58
|
append: {},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRichSelectState as t } from "./hooks/useRichSelectState.js";
|
|
2
|
-
import { I as s } from "../../Autocomplete-
|
|
2
|
+
import { I as s } from "../../Autocomplete-C5ubHBTi.js";
|
|
3
3
|
import { IressSelectBody as S } from "./SelectBody/SelectBody.js";
|
|
4
4
|
import { IressSelectCreate as p } from "./SelectCreate/SelectCreate.js";
|
|
5
5
|
import { IressSelectHeading as f } from "./SelectHeading/SelectHeading.js";
|