@santi020k/lumen-core 1.4.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/THIRD_PARTY_NOTICES.md +21 -2
- package/dist/charts.d.ts +119 -0
- package/dist/charts.d.ts.map +1 -1
- package/dist/charts.js +446 -49
- package/dist/code.d.ts.map +1 -1
- package/dist/code.js +22 -9
- package/dist/components.d.ts +32 -7
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +13 -3
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +32 -10
- package/dist/error-state.d.ts +13 -0
- package/dist/error-state.d.ts.map +1 -0
- package/dist/error-state.js +3 -0
- package/dist/foundations.generated.d.ts +149 -24
- package/dist/foundations.generated.d.ts.map +1 -1
- package/dist/foundations.generated.js +148 -24
- package/dist/illustrations.generated.d.ts +77 -0
- package/dist/illustrations.generated.d.ts.map +1 -0
- package/dist/illustrations.generated.js +137 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/phone.d.ts +24 -0
- package/dist/phone.d.ts.map +1 -0
- package/dist/phone.js +90 -0
- package/dist/rich-text.d.ts +1 -0
- package/dist/rich-text.d.ts.map +1 -1
- package/dist/rich-text.js +11 -4
- package/dist/schedule.d.ts.map +1 -1
- package/dist/schedule.js +18 -10
- package/dist/tabs.d.ts +7 -0
- package/dist/tabs.d.ts.map +1 -0
- package/dist/tabs.js +6 -0
- package/dist/tokens.d.ts +48 -22
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +5 -21
- package/package.json +13 -4
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/* This file is generated by scripts/generate-platform-tokens.mjs. */
|
|
2
2
|
export const lumenColorTokens = {
|
|
3
3
|
light: {
|
|
4
|
-
canvas: "#
|
|
4
|
+
canvas: "#F9FAFB",
|
|
5
5
|
surface: "#FFFFFF",
|
|
6
|
-
surfaceMuted: "#
|
|
7
|
-
surfaceStrong: "#
|
|
8
|
-
line: "#
|
|
9
|
-
ink: "#
|
|
10
|
-
inkSoft: "#
|
|
11
|
-
inkMuted: "#
|
|
12
|
-
brand: "#
|
|
13
|
-
brandSolid: "#
|
|
14
|
-
brandSoft: "#
|
|
6
|
+
surfaceMuted: "#EFF2F5",
|
|
7
|
+
surfaceStrong: "#DBE0E6",
|
|
8
|
+
line: "#CFD5DD",
|
|
9
|
+
ink: "#161D27",
|
|
10
|
+
inkSoft: "#4D5766",
|
|
11
|
+
inkMuted: "#737D8C",
|
|
12
|
+
brand: "#0369A0",
|
|
13
|
+
brandSolid: "#035C8C",
|
|
14
|
+
brandSoft: "#DEF0F8",
|
|
15
15
|
onBrand: "#FFFFFF",
|
|
16
|
-
accent: "#
|
|
17
|
-
success: "#
|
|
16
|
+
accent: "#13967E",
|
|
17
|
+
success: "#16A249",
|
|
18
18
|
warning: "#F59F0A",
|
|
19
19
|
danger: "#EF4343",
|
|
20
20
|
onDanger: "#000000"
|
|
@@ -41,20 +41,20 @@ export const lumenColorTokens = {
|
|
|
41
41
|
};
|
|
42
42
|
export const lumenCssColorTokens = {
|
|
43
43
|
light: {
|
|
44
|
-
canvas: "
|
|
44
|
+
canvas: "210 24% 98%",
|
|
45
45
|
surface: "0 0% 100%",
|
|
46
|
-
surfaceMuted: "
|
|
47
|
-
surfaceStrong: "
|
|
48
|
-
line: "
|
|
49
|
-
ink: "
|
|
50
|
-
inkSoft: "215
|
|
51
|
-
inkMuted: "215
|
|
52
|
-
brand: "
|
|
53
|
-
brandSolid: "
|
|
54
|
-
brandSoft: "
|
|
46
|
+
surfaceMuted: "210 22% 95%",
|
|
47
|
+
surfaceStrong: "213 18% 88%",
|
|
48
|
+
line: "214 17% 84%",
|
|
49
|
+
ink: "216 28% 12%",
|
|
50
|
+
inkSoft: "215 14% 35%",
|
|
51
|
+
inkMuted: "215 10% 50%",
|
|
52
|
+
brand: "201 96% 32%",
|
|
53
|
+
brandSolid: "201 96% 28%",
|
|
54
|
+
brandSoft: "198 64% 92%",
|
|
55
55
|
onBrand: "0 0% 100%",
|
|
56
|
-
accent: "
|
|
57
|
-
success: "142
|
|
56
|
+
accent: "169 78% 33%",
|
|
57
|
+
success: "142 76% 36%",
|
|
58
58
|
warning: "38 92% 50%",
|
|
59
59
|
danger: "0 84% 60%",
|
|
60
60
|
onDanger: "0 0% 0%"
|
|
@@ -79,6 +79,109 @@ export const lumenCssColorTokens = {
|
|
|
79
79
|
onDanger: "224 24% 8%"
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
+
export const lumenChartColorTokens = {
|
|
83
|
+
light: {
|
|
84
|
+
axis: "#737D8C",
|
|
85
|
+
grid: "#CFD5DD",
|
|
86
|
+
reference: "#4D5766",
|
|
87
|
+
selection: "#0369A0",
|
|
88
|
+
tooltipBackground: "#161D27",
|
|
89
|
+
tooltipForeground: "#FFFFFF",
|
|
90
|
+
sequentialLow: "#DEF0F8",
|
|
91
|
+
sequentialMid: "#3EAEEA",
|
|
92
|
+
sequentialHigh: "#024F78",
|
|
93
|
+
divergingNegative: "#EF4343",
|
|
94
|
+
divergingMid: "#DBE0E6",
|
|
95
|
+
divergingPositive: "#0369A0",
|
|
96
|
+
series1: "#0369A0",
|
|
97
|
+
series2: "#13967E",
|
|
98
|
+
series3: "#A43FDF",
|
|
99
|
+
series4: "#FA6A14",
|
|
100
|
+
series5: "#E73270",
|
|
101
|
+
series6: "#13A3C3",
|
|
102
|
+
series7: "#DCBD09",
|
|
103
|
+
series8: "#657187"
|
|
104
|
+
},
|
|
105
|
+
dark: {
|
|
106
|
+
axis: "#949CA8",
|
|
107
|
+
grid: "#393F4C",
|
|
108
|
+
reference: "#BCC3CD",
|
|
109
|
+
selection: "#29B4F5",
|
|
110
|
+
tooltipBackground: "#F3F5F7",
|
|
111
|
+
tooltipForeground: "#101219",
|
|
112
|
+
sequentialLow: "#07354B",
|
|
113
|
+
sequentialMid: "#1E8BB8",
|
|
114
|
+
sequentialHigh: "#5CC7F7",
|
|
115
|
+
divergingNegative: "#F15B5B",
|
|
116
|
+
divergingMid: "#303540",
|
|
117
|
+
divergingPositive: "#29B4F5",
|
|
118
|
+
series1: "#29B4F5",
|
|
119
|
+
series2: "#1AC19A",
|
|
120
|
+
series3: "#CE81ED",
|
|
121
|
+
series4: "#FD9A3F",
|
|
122
|
+
series5: "#F26A94",
|
|
123
|
+
series6: "#2DC9E7",
|
|
124
|
+
series7: "#F7D832",
|
|
125
|
+
series8: "#A2AABD"
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
export const lumenChartCssColorTokens = {
|
|
129
|
+
light: {
|
|
130
|
+
axis: "var(--ink-muted)",
|
|
131
|
+
grid: "var(--line)",
|
|
132
|
+
reference: "var(--ink-soft)",
|
|
133
|
+
selection: "var(--brand)",
|
|
134
|
+
tooltipBackground: "var(--ink)",
|
|
135
|
+
tooltipForeground: "var(--surface)",
|
|
136
|
+
sequentialLow: "198 64% 92%",
|
|
137
|
+
sequentialMid: "201 80% 58%",
|
|
138
|
+
sequentialHigh: "201 96% 24%",
|
|
139
|
+
divergingNegative: "0 84% 60%",
|
|
140
|
+
divergingMid: "213 18% 88%",
|
|
141
|
+
divergingPositive: "201 96% 32%",
|
|
142
|
+
series1: "201 96% 32%",
|
|
143
|
+
series2: "169 78% 33%",
|
|
144
|
+
series3: "280 72% 56%",
|
|
145
|
+
series4: "25 95% 53%",
|
|
146
|
+
series5: "340 82% 55%",
|
|
147
|
+
series6: "190 82% 42%",
|
|
148
|
+
series7: "52 92% 45%",
|
|
149
|
+
series8: "215 16% 47%"
|
|
150
|
+
},
|
|
151
|
+
dark: {
|
|
152
|
+
axis: "var(--ink-muted)",
|
|
153
|
+
grid: "var(--line)",
|
|
154
|
+
reference: "var(--ink-soft)",
|
|
155
|
+
selection: "var(--brand)",
|
|
156
|
+
tooltipBackground: "var(--ink)",
|
|
157
|
+
tooltipForeground: "var(--canvas)",
|
|
158
|
+
sequentialLow: "199 84% 16%",
|
|
159
|
+
sequentialMid: "199 72% 42%",
|
|
160
|
+
sequentialHigh: "199 91% 66%",
|
|
161
|
+
divergingNegative: "0 84% 65%",
|
|
162
|
+
divergingMid: "222 14% 22%",
|
|
163
|
+
divergingPositive: "199 91% 56%",
|
|
164
|
+
series1: "199 91% 56%",
|
|
165
|
+
series2: "166 76% 43%",
|
|
166
|
+
series3: "285 82% 72%",
|
|
167
|
+
series4: "31 96% 62%",
|
|
168
|
+
series5: "342 88% 68%",
|
|
169
|
+
series6: "188 86% 54%",
|
|
170
|
+
series7: "52 94% 58%",
|
|
171
|
+
series8: "215 18% 68%"
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
export const lumenChartStrokeWidths = {
|
|
175
|
+
grid: 1,
|
|
176
|
+
reference: 1,
|
|
177
|
+
series: 2,
|
|
178
|
+
selected: 3
|
|
179
|
+
};
|
|
180
|
+
export const lumenChartOpacities = {
|
|
181
|
+
area: 0.18,
|
|
182
|
+
grid: 0.45,
|
|
183
|
+
muted: 0.35
|
|
184
|
+
};
|
|
82
185
|
export const lumenSpacing = {
|
|
83
186
|
zero: 0,
|
|
84
187
|
xs: 4,
|
|
@@ -93,6 +196,9 @@ export const lumenRadii = {
|
|
|
93
196
|
sm: 6,
|
|
94
197
|
md: 10,
|
|
95
198
|
lg: 12,
|
|
199
|
+
xl: 16,
|
|
200
|
+
"2xl": 20,
|
|
201
|
+
"3xl": 24,
|
|
96
202
|
full: 9999
|
|
97
203
|
};
|
|
98
204
|
export const lumenFontFamilies = {
|
|
@@ -126,3 +232,21 @@ export const lumenElevation = {
|
|
|
126
232
|
raised: 3,
|
|
127
233
|
overlay: 6
|
|
128
234
|
};
|
|
235
|
+
export const lumenGraphicFrameSizes = {
|
|
236
|
+
sm: 160,
|
|
237
|
+
md: 240,
|
|
238
|
+
lg: 320
|
|
239
|
+
};
|
|
240
|
+
export const lumenIllustrationSizes = {
|
|
241
|
+
sm: 96,
|
|
242
|
+
md: 128,
|
|
243
|
+
lg: 176
|
|
244
|
+
};
|
|
245
|
+
export const lumenGraphicStrokeWidths = {
|
|
246
|
+
standard: 3
|
|
247
|
+
};
|
|
248
|
+
export const lumenGraphicOpacities = {
|
|
249
|
+
wash: 0.1,
|
|
250
|
+
grid: 0.18,
|
|
251
|
+
orbit: 0.24
|
|
252
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export type LumenIllustrationToneRole = 'accent' | 'brand' | 'danger' | 'ink-muted' | 'success';
|
|
2
|
+
export type LumenIllustrationElement = {
|
|
3
|
+
readonly cx: number;
|
|
4
|
+
readonly cy: number;
|
|
5
|
+
readonly kind: 'circle';
|
|
6
|
+
readonly r: number;
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: 'line' | 'polygon' | 'polyline';
|
|
9
|
+
readonly points: readonly number[];
|
|
10
|
+
} | {
|
|
11
|
+
readonly height: number;
|
|
12
|
+
readonly kind: 'rounded-rect';
|
|
13
|
+
readonly radius: number;
|
|
14
|
+
readonly width: number;
|
|
15
|
+
readonly x: number;
|
|
16
|
+
readonly y: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const lumenIllustrations: {
|
|
19
|
+
readonly empty: {
|
|
20
|
+
readonly elements: readonly [{
|
|
21
|
+
readonly kind: "polygon";
|
|
22
|
+
readonly points: readonly [32, 48, 88, 48, 81, 83, 39, 83];
|
|
23
|
+
}, {
|
|
24
|
+
readonly kind: "polyline";
|
|
25
|
+
readonly points: readonly [43, 48, 49, 36, 71, 36, 77, 48];
|
|
26
|
+
}, {
|
|
27
|
+
readonly kind: "line";
|
|
28
|
+
readonly points: readonly [47, 66, 73, 66];
|
|
29
|
+
}];
|
|
30
|
+
readonly semanticTone: "brand";
|
|
31
|
+
};
|
|
32
|
+
readonly success: {
|
|
33
|
+
readonly elements: readonly [{
|
|
34
|
+
readonly cx: 60;
|
|
35
|
+
readonly cy: 60;
|
|
36
|
+
readonly kind: "circle";
|
|
37
|
+
readonly r: 28;
|
|
38
|
+
}, {
|
|
39
|
+
readonly kind: "polyline";
|
|
40
|
+
readonly points: readonly [45, 60, 55, 70, 76, 47];
|
|
41
|
+
}];
|
|
42
|
+
readonly semanticTone: "success";
|
|
43
|
+
};
|
|
44
|
+
readonly error: {
|
|
45
|
+
readonly elements: readonly [{
|
|
46
|
+
readonly cx: 60;
|
|
47
|
+
readonly cy: 60;
|
|
48
|
+
readonly kind: "circle";
|
|
49
|
+
readonly r: 28;
|
|
50
|
+
}, {
|
|
51
|
+
readonly kind: "line";
|
|
52
|
+
readonly points: readonly [49, 49, 71, 71];
|
|
53
|
+
}, {
|
|
54
|
+
readonly kind: "line";
|
|
55
|
+
readonly points: readonly [71, 49, 49, 71];
|
|
56
|
+
}];
|
|
57
|
+
readonly semanticTone: "danger";
|
|
58
|
+
};
|
|
59
|
+
readonly offline: {
|
|
60
|
+
readonly elements: readonly [{
|
|
61
|
+
readonly height: 35;
|
|
62
|
+
readonly kind: "rounded-rect";
|
|
63
|
+
readonly radius: 18;
|
|
64
|
+
readonly width: 72;
|
|
65
|
+
readonly x: 24;
|
|
66
|
+
readonly y: 45;
|
|
67
|
+
}, {
|
|
68
|
+
readonly kind: "line";
|
|
69
|
+
readonly points: readonly [30, 30, 90, 90];
|
|
70
|
+
}];
|
|
71
|
+
readonly semanticTone: "ink-muted";
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export type LumenIllustrationName = keyof typeof lumenIllustrations;
|
|
75
|
+
export declare const lumenIllustrationNames: readonly ("success" | "error" | "offline" | "empty")[];
|
|
76
|
+
export declare const renderLumenIllustrationSvg: (name: LumenIllustrationName) => string;
|
|
77
|
+
//# sourceMappingURL=illustrations.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"illustrations.generated.d.ts","sourceRoot":"","sources":["../src/illustrations.generated.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAA;AAE/F,MAAM,MAAM,wBAAwB,GAChC;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GACzF;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACtF;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvJ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqH7B,CAAA;AAGF,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,kBAAkB,CAAA;AACnE,eAAO,MAAM,sBAAsB,wDAElC,CAAA;AAwBD,eAAO,MAAM,0BAA0B,GAAI,MAAM,qBAAqB,KAAG,MAIxE,CAAA"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* This file is generated by scripts/generate-platform-graphics.mjs. */
|
|
2
|
+
export const lumenIllustrations = {
|
|
3
|
+
"empty": {
|
|
4
|
+
"elements": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "polygon",
|
|
7
|
+
"points": [
|
|
8
|
+
32,
|
|
9
|
+
48,
|
|
10
|
+
88,
|
|
11
|
+
48,
|
|
12
|
+
81,
|
|
13
|
+
83,
|
|
14
|
+
39,
|
|
15
|
+
83
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"kind": "polyline",
|
|
20
|
+
"points": [
|
|
21
|
+
43,
|
|
22
|
+
48,
|
|
23
|
+
49,
|
|
24
|
+
36,
|
|
25
|
+
71,
|
|
26
|
+
36,
|
|
27
|
+
77,
|
|
28
|
+
48
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"kind": "line",
|
|
33
|
+
"points": [
|
|
34
|
+
47,
|
|
35
|
+
66,
|
|
36
|
+
73,
|
|
37
|
+
66
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"semanticTone": "brand"
|
|
42
|
+
},
|
|
43
|
+
"success": {
|
|
44
|
+
"elements": [
|
|
45
|
+
{
|
|
46
|
+
"cx": 60,
|
|
47
|
+
"cy": 60,
|
|
48
|
+
"kind": "circle",
|
|
49
|
+
"r": 28
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"kind": "polyline",
|
|
53
|
+
"points": [
|
|
54
|
+
45,
|
|
55
|
+
60,
|
|
56
|
+
55,
|
|
57
|
+
70,
|
|
58
|
+
76,
|
|
59
|
+
47
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"semanticTone": "success"
|
|
64
|
+
},
|
|
65
|
+
"error": {
|
|
66
|
+
"elements": [
|
|
67
|
+
{
|
|
68
|
+
"cx": 60,
|
|
69
|
+
"cy": 60,
|
|
70
|
+
"kind": "circle",
|
|
71
|
+
"r": 28
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"kind": "line",
|
|
75
|
+
"points": [
|
|
76
|
+
49,
|
|
77
|
+
49,
|
|
78
|
+
71,
|
|
79
|
+
71
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"kind": "line",
|
|
84
|
+
"points": [
|
|
85
|
+
71,
|
|
86
|
+
49,
|
|
87
|
+
49,
|
|
88
|
+
71
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"semanticTone": "danger"
|
|
93
|
+
},
|
|
94
|
+
"offline": {
|
|
95
|
+
"elements": [
|
|
96
|
+
{
|
|
97
|
+
"height": 35,
|
|
98
|
+
"kind": "rounded-rect",
|
|
99
|
+
"radius": 18,
|
|
100
|
+
"width": 72,
|
|
101
|
+
"x": 24,
|
|
102
|
+
"y": 45
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"kind": "line",
|
|
106
|
+
"points": [
|
|
107
|
+
30,
|
|
108
|
+
30,
|
|
109
|
+
90,
|
|
110
|
+
90
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"semanticTone": "ink-muted"
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
export const lumenIllustrationNames = Object.freeze(Object.keys(lumenIllustrations));
|
|
118
|
+
const points = (values) => {
|
|
119
|
+
const pairs = [];
|
|
120
|
+
for (let index = 0; index < values.length; index += 2) {
|
|
121
|
+
pairs.push(`${String(values[index])},${String(values[index + 1])}`);
|
|
122
|
+
}
|
|
123
|
+
return pairs.join(' ');
|
|
124
|
+
};
|
|
125
|
+
const renderElement = (element) => {
|
|
126
|
+
if (element.kind === 'circle') {
|
|
127
|
+
return `<circle cx="${element.cx}" cy="${element.cy}" r="${element.r}" />`;
|
|
128
|
+
}
|
|
129
|
+
if (element.kind === 'rounded-rect') {
|
|
130
|
+
return `<rect height="${element.height}" rx="${element.radius}" width="${element.width}" x="${element.x}" y="${element.y}" />`;
|
|
131
|
+
}
|
|
132
|
+
return `<${element.kind} points="${points(element.points)}" />`;
|
|
133
|
+
};
|
|
134
|
+
export const renderLumenIllustrationSvg = (name) => {
|
|
135
|
+
const artwork = lumenIllustrations[name];
|
|
136
|
+
return `<svg aria-hidden="true" fill="none" viewBox="0 0 120 120"><circle class="ui-illustration__wash" cx="60" cy="60" r="48" />${artwork.elements.map(renderElement).join('')}</svg>`;
|
|
137
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
export { alignLumenChartSeries, createLumenBarGeometry, createLumenLineGeometry, createLumenPieGeometry, getLumenChartCategories, getLumenChartDomain, getLumenChartTicks, getLumenChartToneClassName, getLumenChartValueRatio, getLumenPieChartVariantClassName, hasLumenChartData, hasLumenPieData, type LumenBarChartLayout, type LumenBarGeometry, type LumenBarGeometryCategory, type LumenBarGeometryMark, type LumenBarGeometryOptions, type LumenChartDatum, type LumenChartDomain, type LumenChartGeometryPoint, type LumenChartOrientation, type LumenChartSeries, type LumenChartTone, lumenChartTones, type LumenLineGeometry, type LumenLineGeometryOptions, type LumenPieChartVariant, type LumenPieGeometry, type LumenPieGeometryOptions, type LumenPieGeometrySlice, resolveLumenChartTone, scaleLumenChartValue } from './charts.js';
|
|
1
|
+
export { alignLumenChartSeries, appendLumenChartDatum, createLumenBarGeometry, createLumenHeatmapGeometry, createLumenLineGeometry, createLumenPieGeometry, createLumenRangeGeometry, createLumenScatterGeometry, downsampleLumenChartData, formatLumenChartSummary, getLumenChartCategories, getLumenChartDomain, getLumenChartNumericX, getLumenChartTicks, getLumenChartToneClassName, getLumenChartValueRatio, getLumenPieChartVariantClassName, hasLumenChartData, hasLumenPieData, type LumenBarChartLayout, type LumenBarGeometry, type LumenBarGeometryCategory, type LumenBarGeometryMark, type LumenBarGeometryOptions, type LumenChartAnnotation, type LumenChartAxis, type LumenChartAxisPosition, type LumenChartDatum, type LumenChartDomain, type LumenChartGeometryPoint, type LumenChartOrientation, type LumenChartScaleType, type LumenChartSelection, type LumenChartSeries, type LumenChartSummary, type LumenChartTone, lumenChartTones, type LumenChartValidationIssue, type LumenComboMark, type LumenComboSeries, type LumenHeatmapDatum, type LumenHeatmapGeometry, type LumenHeatmapGeometryCell, type LumenLineGeometry, type LumenLineGeometryOptions, type LumenPieChartVariant, type LumenPieGeometry, type LumenPieGeometryOptions, type LumenPieGeometrySlice, type LumenRangeDatum, type LumenRangeGeometry, type LumenRangeGeometryPoint, type LumenScatterGeometry, type LumenScatterGeometryOptions, type LumenScatterGeometryPoint, resolveLumenChartTone, scaleLumenChartValue, summarizeLumenChart, validateLumenChartSeries } from './charts.js';
|
|
2
2
|
export { type LumenCodeToken, lumenCodeTokenClassNames, type LumenCodeTokenKind, normalizeLumenCode, renderLumenCodeHtml, tokenizeLumenCode } from './code.js';
|
|
3
3
|
export { type LumenComponentBehavior, lumenComponentBehavior, type LumenComponentName, lumenComponentNames, type LumenGlobalBehavior, lumenGlobalBehaviors, lumenPackages, type LumenPackageTarget, type LumenStylingContract, lumenStylingContracts } from './components.js';
|
|
4
4
|
export { applyDataViewState, createDataViewRequestUrl, createDataViewSearchParams, createDataViewServerRequest, createDataViewState, createDataViewStorageKey, filterDataRecords, getVirtualRange, loadDataViewState, type LumenDataRecord, type LumenDataViewServerRequest, type LumenDataViewState, type LumenKeyValueReader, type LumenKeyValueStorage, type LumenKeyValueWriter, type LumenSortDirection, paginateDataRecords, parseDataViewState, pinDataViewColumn, saveDataViewState, serializeDataViewState, sortDataRecords, toggleDataViewSelection, unpinDataViewColumn } from './data.js';
|
|
5
|
+
export { type LumenErrorStateAnnouncement, lumenErrorStateAnnouncements, type LumenErrorStateContent, type LumenErrorStateKind, lumenErrorStateKinds, type LumenErrorStateLayout, lumenErrorStateLayouts } from './error-state.js';
|
|
5
6
|
export { createFigmaVariableName, exportThemeDesignTokens, exportThemeFigmaVariables, hslTokenToFigmaColor, hslTokenToHexColor, type LumenDesignToken, type LumenDesignTokenExport, type LumenDesignTokenType, type LumenEffectDesignToken, type LumenFigmaColorValue, type LumenFigmaVariable, type LumenFigmaVariableCollection, type LumenFigmaVariableExportOptions, type LumenFigmaVariableMode, type LumenStructureDesignToken } from './figma.js';
|
|
6
7
|
export { createLumenFormFailure, createLumenFormSuccess, getLumenFieldErrors, type LumenFieldError, type LumenFormErrorInput, type LumenFormErrors, type LumenFormFailure, type LumenFormResult, type LumenFormStatus, lumenFormStatuses, type LumenFormSuccess, normalizeLumenFormErrors } from './forms.js';
|
|
7
8
|
export { getLumenIcon, getLumenIconPack, getRegisteredLumenIconNames, type LumenIconData, type LumenIconName, lumenIconNames, type LumenIconNode, type LumenIconPack, lumenIcons, type LumenIconStyle, registerLumenIconPack, renderLumenIconSvg, resolveLumenIconName } from './icons.js';
|
|
9
|
+
export { type LumenIllustrationElement, type LumenIllustrationName, lumenIllustrationNames, lumenIllustrations, type LumenIllustrationToneRole, renderLumenIllustrationSvg } from './illustrations.generated.js';
|
|
8
10
|
export { createLumenKanbanMoveDetail, getAdjacentKanbanColumn, type LumenKanbanMoveDetail, type LumenKanbanMoveInput } from './kanban.js';
|
|
9
11
|
export { formatLumenLanguageLabel, getLumenLocalePair, lumenDefaultLocales, type LumenLocaleOption, normalizeLumenLocales } from './language.js';
|
|
12
|
+
export { createEmptyLumenPhoneNumber, getLumenPhoneCountries, getLumenPhoneCountry, getLumenPhoneFlag, type LumenPhoneCountry, type LumenPhoneCountryOptions, type LumenPhoneNumber, resolveLumenPhoneNumber, sanitizeLumenPhoneInput } from './phone.js';
|
|
10
13
|
export { type LumenAstroPropsResult, type LumenClassValue, type LumenGlass, resolveLumenAstroProps, resolveLumenGlass } from './props.js';
|
|
11
14
|
export { getLumenRichTextShortcut, isLumenRichTextToggleCommand, type LumenRichTextChangeDetail, type LumenRichTextCommandDetail, type LumenRichTextShortcutEvent, type LumenRichTextToggleCommand, lumenRichTextToggleCommands } from './rich-text.js';
|
|
12
15
|
export { canPlaceScheduleEvent, createScheduleSlots, createScheduleStorageKey, expandRecurringScheduleEvent, getScheduleConflicts, loadScheduleEvents, type LumenScheduleConflict, type LumenScheduleEvent, type LumenScheduleKeyValueReader, type LumenScheduleKeyValueStorage, type LumenScheduleKeyValueWriter, type LumenScheduleResizeEdge, type LumenScheduleResizeOptions, type LumenScheduleResource, type LumenScheduleSlot, moveScheduleEvent, parseScheduleEvents, resizeScheduleEvent, resizeScheduleEvents, saveScheduleEvents, scheduleEventsOverlap, serializeScheduleEvents } from './schedule.js';
|
|
16
|
+
export { type LumenTabsChangeDetail, type LumenTabsChangeEvent, scrollLumenTabIntoView } from './tabs.js';
|
|
13
17
|
export { createThemeFromHue, createThemePalette, exportThemeCss, getContrastRatio, type LumenColorTokenName, lumenColorTokenNames, type LumenContrastScore, type LumenGlassColorTokenName, lumenGlassColorTokenNames, type LumenGlassEffectTokenName, lumenGlassEffectTokenNames, type LumenGlassTokenName, lumenGlassTokenNames, type LumenMotionTokenName, lumenMotionTokenNames, type LumenRadiusTokenName, lumenRadiusTokenNames, type LumenSemanticColorTokenName, lumenSemanticColorTokenNames, type LumenShadowTokenName, lumenShadowTokenNames, type LumenStructureTokenName, lumenStructureTokenNames, type LumenThemeContrastSuggestion, type LumenThemeFromHueOptions, type LumenThemeTokenName, type LumenThemeTokens, lumenTokenNames, type LumenTypographyTokenName, lumenTypographyTokenNames, mergeThemeTokens, parseThemeCss, scoreThemeContrast, suggestReadableInk, tuneThemeContrast } from './theme.js';
|
|
14
18
|
export { coerceThemeBuilderExportFormat, coerceThemeBuilderMode, coerceThemeBuilderScheme, createThemeBuilderTokens, exportThemeBuilderCss, exportThemeBuilderValue, type LumenThemeBuilderExportFormat, type LumenThemeBuilderMode, type LumenThemeBuilderOptions, type LumenThemeBuilderResult, type LumenThemeBuilderScheme, normalizeThemeBuilderHex, normalizeThemeBuilderHue, themeBuilderHexToHsl } from './theme-builder.js';
|
|
15
|
-
export { composeClassName, lumenChart, lumenColors, type LumenColorScheme, lumenColorTokens, lumenCssColorTokens, lumenDarkColors, lumenDarkTheme, lumenDurations, lumenEasings, lumenElevation, lumenFont, lumenFontFamilies, lumenFontSizes, lumenFontWeights, lumenGlass, lumenLightTheme, lumenMotion, lumenRadii, lumenRadius, type LumenSemanticColor, lumenShadow, lumenSpacing, lumenThemeAttribute } from './tokens.js';
|
|
19
|
+
export { composeClassName, lumenChart, lumenColors, type LumenColorScheme, lumenColorTokens, lumenCssColorTokens, lumenDarkColors, lumenDarkTheme, lumenDurations, lumenEasings, lumenElevation, lumenFont, lumenFontFamilies, lumenFontSizes, lumenFontWeights, lumenGlass, lumenGraphicFrameSizes, lumenGraphicOpacities, lumenGraphicStrokeWidths, lumenIllustrationSizes, lumenLightTheme, lumenMotion, lumenRadii, lumenRadius, type LumenSemanticColor, lumenShadow, lumenSpacing, lumenThemeAttribute } from './tokens.js';
|
|
16
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,gCAAgC,EAChC,iBAAiB,EACjB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,qBAAqB,EACrB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAm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X,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,KAAK,kBAAkB,EACvB,WAAW,EACX,YAAY,EACZ,mBAAmB,EACpB,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
export { alignLumenChartSeries, createLumenBarGeometry, createLumenLineGeometry, createLumenPieGeometry, getLumenChartCategories, getLumenChartDomain, getLumenChartTicks, getLumenChartToneClassName, getLumenChartValueRatio, getLumenPieChartVariantClassName, hasLumenChartData, hasLumenPieData, lumenChartTones, resolveLumenChartTone, scaleLumenChartValue } from './charts.js';
|
|
1
|
+
export { alignLumenChartSeries, appendLumenChartDatum, createLumenBarGeometry, createLumenHeatmapGeometry, createLumenLineGeometry, createLumenPieGeometry, createLumenRangeGeometry, createLumenScatterGeometry, downsampleLumenChartData, formatLumenChartSummary, getLumenChartCategories, getLumenChartDomain, getLumenChartNumericX, getLumenChartTicks, getLumenChartToneClassName, getLumenChartValueRatio, getLumenPieChartVariantClassName, hasLumenChartData, hasLumenPieData, lumenChartTones, resolveLumenChartTone, scaleLumenChartValue, summarizeLumenChart, validateLumenChartSeries } from './charts.js';
|
|
2
2
|
export { lumenCodeTokenClassNames, normalizeLumenCode, renderLumenCodeHtml, tokenizeLumenCode } from './code.js';
|
|
3
3
|
export { lumenComponentBehavior, lumenComponentNames, lumenGlobalBehaviors, lumenPackages, lumenStylingContracts } from './components.js';
|
|
4
4
|
export { applyDataViewState, createDataViewRequestUrl, createDataViewSearchParams, createDataViewServerRequest, createDataViewState, createDataViewStorageKey, filterDataRecords, getVirtualRange, loadDataViewState, paginateDataRecords, parseDataViewState, pinDataViewColumn, saveDataViewState, serializeDataViewState, sortDataRecords, toggleDataViewSelection, unpinDataViewColumn } from './data.js';
|
|
5
|
+
export { lumenErrorStateAnnouncements, lumenErrorStateKinds, lumenErrorStateLayouts } from './error-state.js';
|
|
5
6
|
export { createFigmaVariableName, exportThemeDesignTokens, exportThemeFigmaVariables, hslTokenToFigmaColor, hslTokenToHexColor } from './figma.js';
|
|
6
7
|
export { createLumenFormFailure, createLumenFormSuccess, getLumenFieldErrors, lumenFormStatuses, normalizeLumenFormErrors } from './forms.js';
|
|
7
8
|
export { getLumenIcon, getLumenIconPack, getRegisteredLumenIconNames, lumenIconNames, lumenIcons, registerLumenIconPack, renderLumenIconSvg, resolveLumenIconName } from './icons.js';
|
|
9
|
+
export { lumenIllustrationNames, lumenIllustrations, renderLumenIllustrationSvg } from './illustrations.generated.js';
|
|
8
10
|
export { createLumenKanbanMoveDetail, getAdjacentKanbanColumn } from './kanban.js';
|
|
9
11
|
export { formatLumenLanguageLabel, getLumenLocalePair, lumenDefaultLocales, normalizeLumenLocales } from './language.js';
|
|
12
|
+
export { createEmptyLumenPhoneNumber, getLumenPhoneCountries, getLumenPhoneCountry, getLumenPhoneFlag, resolveLumenPhoneNumber, sanitizeLumenPhoneInput } from './phone.js';
|
|
10
13
|
export { resolveLumenAstroProps, resolveLumenGlass } from './props.js';
|
|
11
14
|
export { getLumenRichTextShortcut, isLumenRichTextToggleCommand, lumenRichTextToggleCommands } from './rich-text.js';
|
|
12
15
|
export { canPlaceScheduleEvent, createScheduleSlots, createScheduleStorageKey, expandRecurringScheduleEvent, getScheduleConflicts, loadScheduleEvents, moveScheduleEvent, parseScheduleEvents, resizeScheduleEvent, resizeScheduleEvents, saveScheduleEvents, scheduleEventsOverlap, serializeScheduleEvents } from './schedule.js';
|
|
16
|
+
export { scrollLumenTabIntoView } from './tabs.js';
|
|
13
17
|
export { createThemeFromHue, createThemePalette, exportThemeCss, getContrastRatio, lumenColorTokenNames, lumenGlassColorTokenNames, lumenGlassEffectTokenNames, lumenGlassTokenNames, lumenMotionTokenNames, lumenRadiusTokenNames, lumenSemanticColorTokenNames, lumenShadowTokenNames, lumenStructureTokenNames, lumenTokenNames, lumenTypographyTokenNames, mergeThemeTokens, parseThemeCss, scoreThemeContrast, suggestReadableInk, tuneThemeContrast } from './theme.js';
|
|
14
18
|
export { coerceThemeBuilderExportFormat, coerceThemeBuilderMode, coerceThemeBuilderScheme, createThemeBuilderTokens, exportThemeBuilderCss, exportThemeBuilderValue, normalizeThemeBuilderHex, normalizeThemeBuilderHue, themeBuilderHexToHsl } from './theme-builder.js';
|
|
15
|
-
export { composeClassName, lumenChart, lumenColors, lumenColorTokens, lumenCssColorTokens, lumenDarkColors, lumenDarkTheme, lumenDurations, lumenEasings, lumenElevation, lumenFont, lumenFontFamilies, lumenFontSizes, lumenFontWeights, lumenGlass, lumenLightTheme, lumenMotion, lumenRadii, lumenRadius, lumenShadow, lumenSpacing, lumenThemeAttribute } from './tokens.js';
|
|
19
|
+
export { composeClassName, lumenChart, lumenColors, lumenColorTokens, lumenCssColorTokens, lumenDarkColors, lumenDarkTheme, lumenDurations, lumenEasings, lumenElevation, lumenFont, lumenFontFamilies, lumenFontSizes, lumenFontWeights, lumenGlass, lumenGraphicFrameSizes, lumenGraphicOpacities, lumenGraphicStrokeWidths, lumenIllustrationSizes, lumenLightTheme, lumenMotion, lumenRadii, lumenRadius, lumenShadow, lumenSpacing, lumenThemeAttribute } from './tokens.js';
|
package/dist/phone.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type CountryCode } from 'libphonenumber-js/max';
|
|
2
|
+
export interface LumenPhoneCountry {
|
|
3
|
+
callingCode: `+${string}`;
|
|
4
|
+
displayName: string;
|
|
5
|
+
flag: string;
|
|
6
|
+
pickerLabel: string;
|
|
7
|
+
regionCode: CountryCode;
|
|
8
|
+
}
|
|
9
|
+
export interface LumenPhoneNumber {
|
|
10
|
+
country: LumenPhoneCountry;
|
|
11
|
+
e164: string | null;
|
|
12
|
+
isValid: boolean;
|
|
13
|
+
nationalNumber: string;
|
|
14
|
+
}
|
|
15
|
+
export interface LumenPhoneCountryOptions {
|
|
16
|
+
locale?: string | readonly string[];
|
|
17
|
+
}
|
|
18
|
+
export declare const getLumenPhoneFlag: (regionCode: string) => string;
|
|
19
|
+
export declare const getLumenPhoneCountry: (regionCode: string, options?: LumenPhoneCountryOptions) => LumenPhoneCountry | null;
|
|
20
|
+
export declare const getLumenPhoneCountries: (options?: LumenPhoneCountryOptions) => readonly LumenPhoneCountry[];
|
|
21
|
+
export declare const createEmptyLumenPhoneNumber: (country: LumenPhoneCountry) => LumenPhoneNumber;
|
|
22
|
+
export declare const sanitizeLumenPhoneInput: (input: string) => string;
|
|
23
|
+
export declare const resolveLumenPhoneNumber: (country: LumenPhoneCountry, input: string, options?: LumenPhoneCountryOptions) => LumenPhoneNumber;
|
|
24
|
+
//# sourceMappingURL=phone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone.d.ts","sourceRoot":"","sources":["../src/phone.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAGI,MAAM,uBAAuB,CAAA;AAInD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,IAAI,MAAM,EAAE,CAAA;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,WAAW,CAAA;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,iBAAiB,CAAA;IAC1B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAA;CACpC;AAcD,eAAO,MAAM,iBAAiB,GAAI,YAAY,MAAM,KAAG,MAStD,CAAA;AAED,eAAO,MAAM,oBAAoB,GAC/B,YAAY,MAAM,EAClB,UAAS,wBAA6B,KACrC,iBAAiB,GAAG,IAiBtB,CAAA;AAED,eAAO,MAAM,sBAAsB,GACjC,UAAS,wBAA6B,KACrC,SAAS,iBAAiB,EAG8D,CAAA;AAE3F,eAAO,MAAM,2BAA2B,GACtC,SAAS,iBAAiB,KACzB,gBAKD,CAAA;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,MAAM,KAAG,MAYvD,CAAA;AAgCD,eAAO,MAAM,uBAAuB,GAClC,SAAS,iBAAiB,EAC1B,OAAO,MAAM,EACb,UAAS,wBAA6B,KACrC,gBA6BF,CAAA"}
|
package/dist/phone.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { AsYouType, getCountries, getCountryCallingCode, isSupportedCountry } from 'libphonenumber-js/max';
|
|
2
|
+
const regionalIndicatorA = 0x1F1E6;
|
|
3
|
+
const getRegionDisplayNames = (locale) => {
|
|
4
|
+
if (typeof Intl.DisplayNames !== 'function')
|
|
5
|
+
return null;
|
|
6
|
+
try {
|
|
7
|
+
return new Intl.DisplayNames(locale, { type: 'region' });
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export const getLumenPhoneFlag = (regionCode) => {
|
|
14
|
+
const normalizedRegion = regionCode.toUpperCase();
|
|
15
|
+
if (normalizedRegion.length !== 2)
|
|
16
|
+
return '';
|
|
17
|
+
const first = String.fromCodePoint(regionalIndicatorA + normalizedRegion.charCodeAt(0) - 65);
|
|
18
|
+
const second = String.fromCodePoint(regionalIndicatorA + normalizedRegion.charCodeAt(1) - 65);
|
|
19
|
+
return first + second;
|
|
20
|
+
};
|
|
21
|
+
export const getLumenPhoneCountry = (regionCode, options = {}) => {
|
|
22
|
+
const normalizedRegion = regionCode.toUpperCase();
|
|
23
|
+
if (!isSupportedCountry(normalizedRegion))
|
|
24
|
+
return null;
|
|
25
|
+
const displayNames = getRegionDisplayNames(options.locale);
|
|
26
|
+
const displayName = displayNames?.of(normalizedRegion) ?? normalizedRegion;
|
|
27
|
+
const callingCode = `+${getCountryCallingCode(normalizedRegion)}`;
|
|
28
|
+
const flag = getLumenPhoneFlag(normalizedRegion);
|
|
29
|
+
return {
|
|
30
|
+
callingCode,
|
|
31
|
+
displayName,
|
|
32
|
+
flag,
|
|
33
|
+
pickerLabel: `${flag} ${displayName} (${callingCode})`,
|
|
34
|
+
regionCode: normalizedRegion
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export const getLumenPhoneCountries = (options = {}) => getCountries()
|
|
38
|
+
.map(regionCode => getLumenPhoneCountry(regionCode, options))
|
|
39
|
+
.filter((country) => country !== null)
|
|
40
|
+
.sort((left, right) => left.displayName.localeCompare(right.displayName, options.locale));
|
|
41
|
+
export const createEmptyLumenPhoneNumber = (country) => ({
|
|
42
|
+
country,
|
|
43
|
+
e164: null,
|
|
44
|
+
isValid: false,
|
|
45
|
+
nationalNumber: ''
|
|
46
|
+
});
|
|
47
|
+
export const sanitizeLumenPhoneInput = (input) => {
|
|
48
|
+
let normalized = '';
|
|
49
|
+
for (const character of input.trim()) {
|
|
50
|
+
if (character >= '0' && character <= '9') {
|
|
51
|
+
normalized += character;
|
|
52
|
+
}
|
|
53
|
+
else if (character === '+' && normalized.length === 0) {
|
|
54
|
+
normalized = character;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return normalized;
|
|
58
|
+
};
|
|
59
|
+
const createLumenPhoneFormatter = (country, normalized) => {
|
|
60
|
+
if (normalized.startsWith('+'))
|
|
61
|
+
return new AsYouType();
|
|
62
|
+
return new AsYouType(country.regionCode);
|
|
63
|
+
};
|
|
64
|
+
const resolveParsedLumenPhoneCountry = (fallback, normalized, parsedRegion, options) => {
|
|
65
|
+
if (!normalized.startsWith('+') || !parsedRegion)
|
|
66
|
+
return fallback;
|
|
67
|
+
return getLumenPhoneCountry(parsedRegion, options) ?? fallback;
|
|
68
|
+
};
|
|
69
|
+
const resolveLumenNationalPhoneNumber = (formattedInput, formattedNationalNumber, normalized) => {
|
|
70
|
+
if (!normalized.startsWith('+') || formattedNationalNumber === undefined)
|
|
71
|
+
return formattedInput;
|
|
72
|
+
return formattedNationalNumber;
|
|
73
|
+
};
|
|
74
|
+
export const resolveLumenPhoneNumber = (country, input, options = {}) => {
|
|
75
|
+
const normalized = sanitizeLumenPhoneInput(input);
|
|
76
|
+
if (!normalized || normalized === '+')
|
|
77
|
+
return createEmptyLumenPhoneNumber(country);
|
|
78
|
+
const formatter = createLumenPhoneFormatter(country, normalized);
|
|
79
|
+
const formattedInput = formatter.input(normalized);
|
|
80
|
+
const parsedNumber = formatter.getNumber();
|
|
81
|
+
const isValid = formatter.isValid() && parsedNumber !== undefined;
|
|
82
|
+
const parsedCountry = resolveParsedLumenPhoneCountry(country, normalized, parsedNumber?.country, options);
|
|
83
|
+
const formattedNationalNumber = isValid ? parsedNumber.formatNational() : undefined;
|
|
84
|
+
return {
|
|
85
|
+
country: parsedCountry,
|
|
86
|
+
e164: isValid ? parsedNumber.number : null,
|
|
87
|
+
isValid,
|
|
88
|
+
nationalNumber: resolveLumenNationalPhoneNumber(formattedInput, formattedNationalNumber, normalized)
|
|
89
|
+
};
|
|
90
|
+
};
|
package/dist/rich-text.d.ts
CHANGED
package/dist/rich-text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich-text.d.ts","sourceRoot":"","sources":["../src/rich-text.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,mIAS7B,CAAA;AAEX,MAAM,MAAM,0BAA0B,GAAG,OAAO,2BAA2B,CAAC,MAAM,CAAC,CAAA;AAEnF,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAA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