@iress-oss/ids-components 6.0.0-alpha.49 → 6.0.0-alpha.50
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/.ai/guides/migration-guides-v6.md +2 -1
- package/dist/{Autocomplete-C1SPFcaX.js → Autocomplete-B8Ac_bPk.js} +71 -67
- package/dist/{TableBody-DnTSsbYF.js → TableBody-r9poBt3c.js} +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +1 -1
- package/dist/components/Autocomplete/index.js +1 -1
- package/dist/components/Hide/helpers/normaliseHideValues.js +1 -1
- package/dist/components/Icon/Icon.constants.d.ts +1 -1
- package/dist/components/Icon/Icon.constants.js +2 -2
- package/dist/components/Icon/IconProvider.js +1 -1
- package/dist/components/Icon/index.js +4 -4
- package/dist/components/Select/Select.d.ts +3 -3
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/components/SelectActivator.js +50 -45
- package/dist/components/Select/components/SelectOptions.js +134 -129
- package/dist/components/Select/helpers/toPrimitiveValue.d.ts +4 -0
- package/dist/components/Select/helpers/toPrimitiveValue.js +7 -0
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/TableBody/TableBody.js +1 -1
- package/dist/components/Table/components/TableFilterButton.js +2 -2
- package/dist/components/Table/components/TableHeader.js +1 -1
- package/dist/components/Table/components/TableHeaderCell.js +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/constants.d.ts +93 -2
- package/dist/constants.js +139 -13
- package/dist/hooks/useBreakpoint.d.ts +1 -1
- package/dist/hooks/useBreakpoint.js +6 -6
- package/dist/hooks/useResponsiveProps.js +4 -4
- package/dist/main.js +266 -267
- package/dist/patterns/DropdownMenu/DropdownMenu.js +1 -1
- package/package.json +1 -1
- package/dist/Icon.constants-CITIz_Fu.js +0 -139
package/dist/constants.js
CHANGED
|
@@ -1,15 +1,141 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const n = {
|
|
2
|
+
/**
|
|
3
|
+
* Extra small breakpoint, for mobile devices
|
|
4
|
+
*/
|
|
5
|
+
xs: {
|
|
6
|
+
mediaQuery: "(min-width: 0) and (max-width: 575px)",
|
|
7
|
+
screenWidthRange: "0 - 575px",
|
|
8
|
+
margin: "spacing.4",
|
|
9
|
+
maxColumns: 4,
|
|
10
|
+
minScreenWidth: "0px",
|
|
11
|
+
maxScreenWidth: "575px",
|
|
12
|
+
containerMaxWidth: "100%",
|
|
13
|
+
viewportWidth: 360
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* Small breakpoint, for larger mobile devices and tablets
|
|
17
|
+
*/
|
|
18
|
+
sm: {
|
|
19
|
+
mediaQuery: "(min-width: 576px) and (max-width: 767px)",
|
|
20
|
+
screenWidthRange: "576px - 767px",
|
|
21
|
+
margin: "spacing.4",
|
|
22
|
+
minScreenWidth: "576px",
|
|
23
|
+
maxScreenWidth: "767px",
|
|
24
|
+
containerMaxWidth: "100%",
|
|
25
|
+
viewportWidth: 767
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Medium breakpoint for tablets and small desktops
|
|
29
|
+
*/
|
|
30
|
+
md: {
|
|
31
|
+
mediaQuery: "(min-width: 768px) and (max-width: 1023px)",
|
|
32
|
+
screenWidthRange: "768px - 1023px",
|
|
33
|
+
margin: "spacing.6",
|
|
34
|
+
maxColumns: 4,
|
|
35
|
+
minScreenWidth: "768px",
|
|
36
|
+
maxScreenWidth: "1023px",
|
|
37
|
+
containerMaxWidth: "100%",
|
|
38
|
+
viewportWidth: 1022
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* Large breakpoint for desktops
|
|
42
|
+
*/
|
|
43
|
+
lg: {
|
|
44
|
+
mediaQuery: "(min-width: 1024px) and (max-width: 1279px)",
|
|
45
|
+
screenWidthRange: "1024px - 1279px",
|
|
46
|
+
margin: "spacing.6",
|
|
47
|
+
maxColumns: 6,
|
|
48
|
+
minScreenWidth: "1024px",
|
|
49
|
+
maxScreenWidth: "1279px",
|
|
50
|
+
containerMaxWidth: "100%",
|
|
51
|
+
viewportWidth: 1278
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Extra large breakpoint for large desktops
|
|
55
|
+
*/
|
|
56
|
+
xl: {
|
|
57
|
+
mediaQuery: "(min-width: 1280px) and (max-width: 1599px)",
|
|
58
|
+
screenWidthRange: "1280px - 1599px",
|
|
59
|
+
margin: "spacing.8",
|
|
60
|
+
minScreenWidth: "1280px",
|
|
61
|
+
maxScreenWidth: "1599px",
|
|
62
|
+
containerMaxWidth: "1440px",
|
|
63
|
+
viewportWidth: 1504
|
|
64
|
+
},
|
|
65
|
+
/**
|
|
66
|
+
* Extra extra large breakpoint for extra large desktops (32inch)
|
|
67
|
+
*/
|
|
68
|
+
xxl: {
|
|
69
|
+
mediaQuery: "(min-width: 1600px)",
|
|
70
|
+
margin: "spacing.8",
|
|
71
|
+
screenWidthRange: "1600px and above",
|
|
72
|
+
minScreenWidth: "1600px",
|
|
73
|
+
containerMaxWidth: "1690px",
|
|
74
|
+
viewportWidth: 1754
|
|
75
|
+
}
|
|
76
|
+
}, e = Object.keys(
|
|
77
|
+
n
|
|
78
|
+
), t = [
|
|
79
|
+
"2",
|
|
80
|
+
"4",
|
|
81
|
+
"6",
|
|
82
|
+
"8",
|
|
83
|
+
"10",
|
|
84
|
+
"12",
|
|
85
|
+
"16",
|
|
86
|
+
"25%",
|
|
87
|
+
"50%",
|
|
88
|
+
"75%",
|
|
89
|
+
"100%"
|
|
90
|
+
], i = 12, a = {
|
|
91
|
+
DEFAULT: 0,
|
|
92
|
+
NAVBAR: 100,
|
|
93
|
+
POPOVER: 200,
|
|
94
|
+
SLIDEOUT: 300,
|
|
95
|
+
MODAL: 400,
|
|
96
|
+
TOAST: 500,
|
|
97
|
+
TOOLTIP: 600
|
|
98
|
+
}, d = {
|
|
99
|
+
family: "Material Symbols Rounded",
|
|
100
|
+
className: "material-symbols-rounded",
|
|
101
|
+
figmaGrade: "Emphasis",
|
|
102
|
+
figmaOpticalSize: "24dp",
|
|
103
|
+
grade: 0,
|
|
104
|
+
opticalSize: 36,
|
|
105
|
+
weight: 300
|
|
106
|
+
}, c = [
|
|
107
|
+
"around",
|
|
108
|
+
"between",
|
|
109
|
+
"center",
|
|
110
|
+
"evenly",
|
|
111
|
+
"left",
|
|
112
|
+
"right",
|
|
113
|
+
"stretch"
|
|
114
|
+
], r = [
|
|
115
|
+
"inherit",
|
|
116
|
+
"left",
|
|
117
|
+
"center",
|
|
118
|
+
"right",
|
|
119
|
+
"justify"
|
|
120
|
+
], x = [
|
|
121
|
+
"top",
|
|
122
|
+
"middle",
|
|
123
|
+
"bottom",
|
|
124
|
+
"between",
|
|
125
|
+
"around",
|
|
126
|
+
"evenly",
|
|
127
|
+
"stretch"
|
|
128
|
+
], m = n, p = e, s = t, o = i, h = c, S = d, E = r, W = x, T = a, I = 'button, a[href], input, select, textarea, [tabindex]:not([tabindex="-1"])', g = ["danger", "info", "success", "warning"];
|
|
3
129
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
130
|
+
p as BREAKPOINTS,
|
|
131
|
+
m as BREAKPOINT_DETAILS,
|
|
132
|
+
I as FOCUSABLE_QUERY_SELECTOR,
|
|
133
|
+
s as FORM_ELEMENT_WIDTHS,
|
|
134
|
+
o as GRID_SIZE,
|
|
135
|
+
h as HORIZONTAL_ALIGNS,
|
|
136
|
+
S as MATERIAL_SYMBOLS,
|
|
137
|
+
g as STATUSES,
|
|
138
|
+
E as TEXT_ALIGNS,
|
|
139
|
+
W as VERTICAL_ALIGNS,
|
|
140
|
+
T as Z_INDEX
|
|
15
141
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BREAKPOINTS as r, BREAKPOINT_DETAILS as o } from "../constants.js";
|
|
2
2
|
import { useSyncExternalStore as i } from "react";
|
|
3
|
-
const
|
|
3
|
+
const a = () => r.find((t) => window.matchMedia(o[t].mediaQuery)?.matches) ?? r[0], c = () => r[0], d = (t) => {
|
|
4
4
|
const n = r.map(
|
|
5
5
|
(e) => window.matchMedia(o[e].mediaQuery)
|
|
6
6
|
);
|
|
@@ -9,14 +9,14 @@ const s = () => r.find((t) => window.matchMedia(o[t].mediaQuery)?.matches) ?? r[
|
|
|
9
9
|
);
|
|
10
10
|
}, p = (t = {}) => {
|
|
11
11
|
const { disabled: n = !1 } = t, e = () => {
|
|
12
|
-
},
|
|
12
|
+
}, s = i(
|
|
13
13
|
n ? () => e : d,
|
|
14
|
-
n ? () =>
|
|
14
|
+
n ? () => a() : a,
|
|
15
15
|
c
|
|
16
16
|
);
|
|
17
17
|
return {
|
|
18
|
-
breakpoint:
|
|
19
|
-
detail: o[
|
|
18
|
+
breakpoint: s,
|
|
19
|
+
detail: o[s]
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { useBreakpoint as
|
|
3
|
-
import {
|
|
1
|
+
import { useMemo as m } from "react";
|
|
2
|
+
import { useBreakpoint as a } from "./useBreakpoint.js";
|
|
3
|
+
import { BREAKPOINTS as n } from "../constants.js";
|
|
4
4
|
const O = (e, f = {}) => {
|
|
5
|
-
const { inheritPrevious: o = !0, disabled: u = !1 } = f, { breakpoint: i } =
|
|
5
|
+
const { inheritPrevious: o = !0, disabled: u = !1 } = f, { breakpoint: i } = a({ disabled: u }), c = m(() => {
|
|
6
6
|
if (!e)
|
|
7
7
|
return;
|
|
8
8
|
if (!(typeof e == "object") || !n.some((r) => r in e))
|