xmlui 0.11.1 → 0.11.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/lib/{index-CEq6OdjV.js → index-DSUDwtWN.js} +68 -39
- package/dist/lib/{initMock-DhUnLKrR.js → initMock-DdH1iCH-.js} +1 -1
- package/dist/lib/language-server-web-worker.js +1 -1
- package/dist/lib/language-server.js +1 -1
- package/dist/lib/{server-common-2DaoOOL5.js → server-common-hq0poDwA.js} +2548 -2464
- package/dist/lib/xmlui.js +1 -1
- package/dist/metadata/{collectedComponentMetadata-BAI5eK2v.js → collectedComponentMetadata-C8Lr9TFe.js} +68 -39
- package/dist/metadata/{initMock-CekNG5Ax.js → initMock-CWwgOjW_.js} +1 -1
- package/dist/metadata/xmlui-metadata.js +1 -1
- package/dist/metadata/xmlui-metadata.umd.cjs +1 -1
- package/dist/scripts/package.json +3 -4
- package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +10 -4
- package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +1 -1
- package/dist/scripts/src/components/Splitter/Splitter.js +2 -1
- package/dist/scripts/src/components/Splitter/Splitter.spec.js +88 -0
- package/dist/scripts/src/components/Splitter/SplitterNative.js +38 -14
- package/dist/scripts/src/components/Splitter/utils.js +7 -2
- package/dist/scripts/src/components/Text/Text.js +17 -16
- package/dist/scripts/src/components/Text/Text.spec.js +284 -0
- package/dist/standalone/xmlui-standalone.umd.js +6 -6
- package/package.json +3 -4
|
@@ -1061,6 +1061,290 @@ fixtures_1.test.describe("Theme Variables", () => {
|
|
|
1061
1061
|
const component = (yield createTextDriver()).component;
|
|
1062
1062
|
yield (0, fixtures_1.expect)(component).toHaveCSS("line-break", EXPECTED);
|
|
1063
1063
|
}));
|
|
1064
|
+
// =============================================================================
|
|
1065
|
+
// PREDEFINED VARIANT TESTS
|
|
1066
|
+
// =============================================================================
|
|
1067
|
+
(0, fixtures_1.test)("variant='secondary' applies secondary theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, createTextDriver, }) {
|
|
1068
|
+
yield initTestBed(`
|
|
1069
|
+
<Theme fontSize-Text-secondary="14px" textColor-Text-secondary="rgb(100, 100, 100)">
|
|
1070
|
+
<Text variant="secondary" testId="text">Secondary text</Text>
|
|
1071
|
+
</Theme>
|
|
1072
|
+
`);
|
|
1073
|
+
const component = (yield createTextDriver("text")).component;
|
|
1074
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "14px");
|
|
1075
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("color", "rgb(100, 100, 100)");
|
|
1076
|
+
}));
|
|
1077
|
+
(0, fixtures_1.test)("variant='abbr' applies abbreviation theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1078
|
+
yield initTestBed(`
|
|
1079
|
+
<Theme fontWeight-Text-abbr="700" textTransform-Text-abbr="uppercase">
|
|
1080
|
+
<Text variant="abbr" testId="text">HTML</Text>
|
|
1081
|
+
</Theme>
|
|
1082
|
+
`);
|
|
1083
|
+
const component = page.getByTestId("text");
|
|
1084
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-weight", "700");
|
|
1085
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("text-transform", "uppercase");
|
|
1086
|
+
}));
|
|
1087
|
+
(0, fixtures_1.test)("variant='cite' applies citation theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1088
|
+
yield initTestBed(`
|
|
1089
|
+
<Theme fontStyle-Text-cite="italic">
|
|
1090
|
+
<Text variant="cite" testId="text">Citation</Text>
|
|
1091
|
+
</Theme>
|
|
1092
|
+
`);
|
|
1093
|
+
const component = page.getByTestId("text");
|
|
1094
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-style", "italic");
|
|
1095
|
+
}));
|
|
1096
|
+
(0, fixtures_1.test)("variant='code' applies inline code theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1097
|
+
yield initTestBed(`
|
|
1098
|
+
<Theme
|
|
1099
|
+
fontFamily-Text-code="monospace"
|
|
1100
|
+
fontSize-Text-code="14px"
|
|
1101
|
+
borderWidth-Text-code="1px"
|
|
1102
|
+
borderStyle-Text-code="solid"
|
|
1103
|
+
borderRadius-Text-code="4px"
|
|
1104
|
+
paddingHorizontal-Text-code="4px"
|
|
1105
|
+
paddingBottom-Text-code="2px"
|
|
1106
|
+
backgroundColor-Text-code="rgb(240, 240, 240)"
|
|
1107
|
+
borderColor-Text-code="rgb(200, 200, 200)"
|
|
1108
|
+
>
|
|
1109
|
+
<Text variant="code" testId="text">code</Text>
|
|
1110
|
+
</Theme>
|
|
1111
|
+
`);
|
|
1112
|
+
const component = page.getByTestId("text");
|
|
1113
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-family", "monospace");
|
|
1114
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "14px");
|
|
1115
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-width", "1px");
|
|
1116
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-style", "solid");
|
|
1117
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-radius", "4px");
|
|
1118
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("padding-left", "4px");
|
|
1119
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("padding-right", "4px");
|
|
1120
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("padding-bottom", "2px");
|
|
1121
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("background-color", "rgb(240, 240, 240)");
|
|
1122
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-color", "rgb(200, 200, 200)");
|
|
1123
|
+
}));
|
|
1124
|
+
(0, fixtures_1.test)("variant='deleted' applies deleted text theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1125
|
+
yield initTestBed(`
|
|
1126
|
+
<Theme textDecorationLine-Text-deleted="line-through">
|
|
1127
|
+
<Text variant="deleted" testId="text">Deleted text</Text>
|
|
1128
|
+
</Theme>
|
|
1129
|
+
`);
|
|
1130
|
+
const component = page.getByTestId("text");
|
|
1131
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("text-decoration-line", "line-through");
|
|
1132
|
+
}));
|
|
1133
|
+
(0, fixtures_1.test)("variant='inserted' applies inserted text theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page, }) {
|
|
1134
|
+
yield initTestBed(`
|
|
1135
|
+
<Theme textDecorationLine-Text-inserted="underline">
|
|
1136
|
+
<Text variant="inserted" testId="text">Inserted text</Text>
|
|
1137
|
+
</Theme>
|
|
1138
|
+
`);
|
|
1139
|
+
const component = page.getByTestId("text");
|
|
1140
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("text-decoration-line", "underline");
|
|
1141
|
+
}));
|
|
1142
|
+
(0, fixtures_1.test)("variant='keyboard' applies keyboard theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1143
|
+
yield initTestBed(`
|
|
1144
|
+
<Theme
|
|
1145
|
+
fontFamily-Text-keyboard="monospace"
|
|
1146
|
+
fontSize-Text-keyboard="14px"
|
|
1147
|
+
fontWeight-Text-keyboard="700"
|
|
1148
|
+
borderWidth-Text-keyboard="1px"
|
|
1149
|
+
paddingHorizontal-Text-keyboard="4px"
|
|
1150
|
+
backgroundColor-Text-keyboard="rgb(245, 245, 245)"
|
|
1151
|
+
borderColor-Text-keyboard="rgb(180, 180, 180)"
|
|
1152
|
+
>
|
|
1153
|
+
<Text variant="keyboard" testId="text">Ctrl+C</Text>
|
|
1154
|
+
</Theme>
|
|
1155
|
+
`);
|
|
1156
|
+
const component = page.getByTestId("text");
|
|
1157
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-family", "monospace");
|
|
1158
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "14px");
|
|
1159
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-weight", "700");
|
|
1160
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-width", "1px");
|
|
1161
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("padding-left", "4px");
|
|
1162
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("padding-right", "4px");
|
|
1163
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("background-color", "rgb(245, 245, 245)");
|
|
1164
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("border-color", "rgb(180, 180, 180)");
|
|
1165
|
+
}));
|
|
1166
|
+
(0, fixtures_1.test)("variant='sample' applies sample theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1167
|
+
yield initTestBed(`
|
|
1168
|
+
<Theme
|
|
1169
|
+
fontFamily-Text-sample="monospace"
|
|
1170
|
+
fontSize-Text-sample="14px"
|
|
1171
|
+
>
|
|
1172
|
+
<Text variant="sample" testId="text">Sample output</Text>
|
|
1173
|
+
</Theme>
|
|
1174
|
+
`);
|
|
1175
|
+
const component = page.getByTestId("text");
|
|
1176
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-family", "monospace");
|
|
1177
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "14px");
|
|
1178
|
+
}));
|
|
1179
|
+
(0, fixtures_1.test)("variant='sup' applies superscript theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1180
|
+
yield initTestBed(`
|
|
1181
|
+
<Theme
|
|
1182
|
+
fontSize-Text-sup="12px"
|
|
1183
|
+
verticalAlignment-Text-sup="super"
|
|
1184
|
+
>
|
|
1185
|
+
<Text variant="sup" testId="text">2</Text>
|
|
1186
|
+
</Theme>
|
|
1187
|
+
`);
|
|
1188
|
+
const component = page.getByTestId("text");
|
|
1189
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "12px");
|
|
1190
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("vertical-align", "super");
|
|
1191
|
+
}));
|
|
1192
|
+
(0, fixtures_1.test)("variant='sub' applies subscript theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1193
|
+
yield initTestBed(`
|
|
1194
|
+
<Theme
|
|
1195
|
+
fontSize-Text-sub="12px"
|
|
1196
|
+
verticalAlignment-Text-sub="sub"
|
|
1197
|
+
>
|
|
1198
|
+
<Text variant="sub" testId="text">2</Text>
|
|
1199
|
+
</Theme>
|
|
1200
|
+
`);
|
|
1201
|
+
const component = page.getByTestId("text");
|
|
1202
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "12px");
|
|
1203
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("vertical-align", "sub");
|
|
1204
|
+
}));
|
|
1205
|
+
(0, fixtures_1.test)("variant='var' applies variable theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1206
|
+
yield initTestBed(`
|
|
1207
|
+
<Theme fontStyle-Text-var="italic">
|
|
1208
|
+
<Text variant="var" testId="text">variable</Text>
|
|
1209
|
+
</Theme>
|
|
1210
|
+
`);
|
|
1211
|
+
const component = page.getByTestId("text");
|
|
1212
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-style", "italic");
|
|
1213
|
+
}));
|
|
1214
|
+
(0, fixtures_1.test)("variant='em' applies emphasis theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1215
|
+
yield initTestBed(`
|
|
1216
|
+
<Theme fontStyle-Text-em="italic">
|
|
1217
|
+
<Text variant="em" testId="text">Emphasized</Text>
|
|
1218
|
+
</Theme>
|
|
1219
|
+
`);
|
|
1220
|
+
const component = page.getByTestId("text");
|
|
1221
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-style", "italic");
|
|
1222
|
+
}));
|
|
1223
|
+
(0, fixtures_1.test)("variant='mono' applies monospace theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1224
|
+
yield initTestBed(`
|
|
1225
|
+
<Theme fontFamily-Text-mono="monospace">
|
|
1226
|
+
<Text variant="mono" testId="text">Monospace text</Text>
|
|
1227
|
+
</Theme>
|
|
1228
|
+
`);
|
|
1229
|
+
const component = page.getByTestId("text");
|
|
1230
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-family", "monospace");
|
|
1231
|
+
}));
|
|
1232
|
+
(0, fixtures_1.test)("variant='title' applies title theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1233
|
+
yield initTestBed(`
|
|
1234
|
+
<Theme fontSize-Text-title="32px">
|
|
1235
|
+
<Text variant="title" testId="text">Main Title</Text>
|
|
1236
|
+
</Theme>
|
|
1237
|
+
`);
|
|
1238
|
+
const component = page.getByTestId("text");
|
|
1239
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "32px");
|
|
1240
|
+
}));
|
|
1241
|
+
(0, fixtures_1.test)("variant='subtitle' applies subtitle theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1242
|
+
yield initTestBed(`
|
|
1243
|
+
<Theme fontSize-Text-subtitle="24px">
|
|
1244
|
+
<Text variant="subtitle" testId="text">Subtitle</Text>
|
|
1245
|
+
</Theme>
|
|
1246
|
+
`);
|
|
1247
|
+
const component = page.getByTestId("text");
|
|
1248
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "24px");
|
|
1249
|
+
}));
|
|
1250
|
+
(0, fixtures_1.test)("variant='small' applies small text theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1251
|
+
yield initTestBed(`
|
|
1252
|
+
<Theme fontSize-Text-small="14px">
|
|
1253
|
+
<Text variant="small" testId="text">Small text</Text>
|
|
1254
|
+
</Theme>
|
|
1255
|
+
`);
|
|
1256
|
+
const component = page.getByTestId("text");
|
|
1257
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "14px");
|
|
1258
|
+
}));
|
|
1259
|
+
(0, fixtures_1.test)("variant='caption' applies caption theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1260
|
+
yield initTestBed(`
|
|
1261
|
+
<Theme letterSpacing-Text-caption="0.8px">
|
|
1262
|
+
<Text variant="caption" testId="text">Caption text</Text>
|
|
1263
|
+
</Theme>
|
|
1264
|
+
`);
|
|
1265
|
+
const component = page.getByTestId("text");
|
|
1266
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("letter-spacing", "0.8px");
|
|
1267
|
+
}));
|
|
1268
|
+
(0, fixtures_1.test)("variant='placeholder' applies placeholder theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page, }) {
|
|
1269
|
+
yield initTestBed(`
|
|
1270
|
+
<Theme
|
|
1271
|
+
fontSize-Text-placeholder="12px"
|
|
1272
|
+
textColor-Text-placeholder="rgb(150, 150, 150)"
|
|
1273
|
+
>
|
|
1274
|
+
<Text variant="placeholder" testId="text">Placeholder text</Text>
|
|
1275
|
+
</Theme>
|
|
1276
|
+
`);
|
|
1277
|
+
const component = page.getByTestId("text");
|
|
1278
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "12px");
|
|
1279
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("color", "rgb(150, 150, 150)");
|
|
1280
|
+
}));
|
|
1281
|
+
(0, fixtures_1.test)("variant='paragraph' applies paragraph theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1282
|
+
yield initTestBed(`
|
|
1283
|
+
<Theme paddingVertical-Text-paragraph="4px">
|
|
1284
|
+
<Text variant="paragraph" testId="text">Paragraph text</Text>
|
|
1285
|
+
</Theme>
|
|
1286
|
+
`);
|
|
1287
|
+
const component = page.getByTestId("text");
|
|
1288
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("padding-top", "4px");
|
|
1289
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("padding-bottom", "4px");
|
|
1290
|
+
}));
|
|
1291
|
+
(0, fixtures_1.test)("variant='subheading' applies subheading theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1292
|
+
yield initTestBed(`
|
|
1293
|
+
<Theme
|
|
1294
|
+
fontSize-Text-subheading="18px"
|
|
1295
|
+
fontWeight-Text-subheading="700"
|
|
1296
|
+
letterSpacing-Text-subheading="0.8px"
|
|
1297
|
+
textTransform-Text-subheading="uppercase"
|
|
1298
|
+
textColor-Text-subheading="rgb(80, 80, 80)"
|
|
1299
|
+
>
|
|
1300
|
+
<Text variant="subheading" testId="text">Subheading</Text>
|
|
1301
|
+
</Theme>
|
|
1302
|
+
`);
|
|
1303
|
+
const component = page.getByTestId("text");
|
|
1304
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "18px");
|
|
1305
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-weight", "700");
|
|
1306
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("letter-spacing", "0.8px");
|
|
1307
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("text-transform", "uppercase");
|
|
1308
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("color", "rgb(80, 80, 80)");
|
|
1309
|
+
}));
|
|
1310
|
+
(0, fixtures_1.test)("variant='tableheading' applies table heading theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page, }) {
|
|
1311
|
+
yield initTestBed(`
|
|
1312
|
+
<Theme
|
|
1313
|
+
marginTop-Text-tableheading="4px"
|
|
1314
|
+
marginBottom-Text-tableheading="16px"
|
|
1315
|
+
paddingHorizontal-Text-tableheading="4px"
|
|
1316
|
+
fontSize-Text-tableheading="18px"
|
|
1317
|
+
fontWeight-Text-tableheading="700"
|
|
1318
|
+
>
|
|
1319
|
+
<Text variant="tableheading" testId="text">Table Header</Text>
|
|
1320
|
+
</Theme>
|
|
1321
|
+
`);
|
|
1322
|
+
const component = page.getByTestId("text");
|
|
1323
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("margin-top", "4px");
|
|
1324
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("margin-bottom", "16px");
|
|
1325
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("padding-left", "4px");
|
|
1326
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("padding-right", "4px");
|
|
1327
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-size", "18px");
|
|
1328
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-weight", "700");
|
|
1329
|
+
}));
|
|
1330
|
+
(0, fixtures_1.test)("variant='strong' applies strong theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1331
|
+
yield initTestBed(`
|
|
1332
|
+
<Theme fontWeight-Text-strong="700">
|
|
1333
|
+
<Text variant="strong" testId="text">Strong text</Text>
|
|
1334
|
+
</Theme>
|
|
1335
|
+
`);
|
|
1336
|
+
const component = page.getByTestId("text");
|
|
1337
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("font-weight", "700");
|
|
1338
|
+
}));
|
|
1339
|
+
(0, fixtures_1.test)("variant='marked' applies marked theme variables", (_a) => __awaiter(void 0, [_a], void 0, function* ({ initTestBed, page }) {
|
|
1340
|
+
yield initTestBed(`
|
|
1341
|
+
<Theme backgroundColor-Text-marked="rgb(255, 255, 0)">
|
|
1342
|
+
<Text variant="marked" testId="text">Highlighted text</Text>
|
|
1343
|
+
</Theme>
|
|
1344
|
+
`);
|
|
1345
|
+
const component = page.getByTestId("text");
|
|
1346
|
+
yield (0, fixtures_1.expect)(component).toHaveCSS("background-color", "rgb(255, 255, 0)");
|
|
1347
|
+
}));
|
|
1064
1348
|
});
|
|
1065
1349
|
// =============================================================================
|
|
1066
1350
|
// CUSTOM VARIANT TESTS
|