xmlui 0.10.11 → 0.10.12

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.
Files changed (44) hide show
  1. package/dist/lib/{index-BuIblMfO.mjs → index-CDOoBf2R.mjs} +1241 -1649
  2. package/dist/lib/index.css +1 -1
  3. package/dist/lib/{initMock-CV-9AUzP.mjs → initMock-BAV9RKui.mjs} +1 -1
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{metadata-utils-DzONZF-e.mjs → metadata-utils-D90qqMGc.mjs} +1 -1
  7. package/dist/lib/{server-common-Dsyp3-Ro.mjs → server-common-lmBDLpUh.mjs} +2595 -2571
  8. package/dist/lib/{transform-CBz7TQJh.mjs → transform-bHBjkKSL.mjs} +2 -1
  9. package/dist/lib/xmlui-parser.d.ts +17 -8
  10. package/dist/lib/xmlui-parser.mjs +2 -2
  11. package/dist/lib/{xmlui-serializer-Bf9bdvlV.mjs → xmlui-serializer-DB6BLiXK.mjs} +1 -1
  12. package/dist/lib/xmlui.d.ts +2 -0
  13. package/dist/lib/xmlui.mjs +2 -2
  14. package/dist/metadata/{collectedComponentMetadata-Cdi6AFD3.mjs → collectedComponentMetadata-Dp8BqWQO.mjs} +1315 -1722
  15. package/dist/metadata/{initMock-B7OlSKKb.mjs → initMock-BvEO8W8r.mjs} +1 -1
  16. package/dist/metadata/style.css +1 -1
  17. package/dist/metadata/xmlui-metadata.mjs +1 -1
  18. package/dist/metadata/xmlui-metadata.umd.js +3 -3
  19. package/dist/scripts/package.json +1 -1
  20. package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +1 -1
  21. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +5 -1
  22. package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +7 -4
  23. package/dist/scripts/src/components/Avatar/Avatar.js +1 -1
  24. package/dist/scripts/src/components/Charts/BarChart/BarChart.js +6 -6
  25. package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +25 -15
  26. package/dist/scripts/src/components/Charts/LineChart/LineChart.js +5 -5
  27. package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +14 -4
  28. package/dist/scripts/src/components/ComponentProvider.js +0 -2
  29. package/dist/scripts/src/components/Footer/FooterNative.js +1 -1
  30. package/dist/scripts/src/components/Form/FormNative.js +5 -3
  31. package/dist/scripts/src/components/FormItem/FormItemNative.js +0 -9
  32. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +3 -3
  33. package/dist/scripts/src/components/Icon/IconNative.js +24 -6
  34. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +8 -0
  35. package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +5 -3
  36. package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +208 -78
  37. package/dist/scripts/src/components/Spinner/SpinnerNative.js +3 -2
  38. package/dist/scripts/src/parsers/xmlui-parser/syntax-kind.js +9 -0
  39. package/dist/scripts/src/parsers/xmlui-parser/transform.js +2 -1
  40. package/dist/standalone/xmlui-standalone.es.d.ts +2 -0
  41. package/dist/standalone/xmlui-standalone.umd.js +36 -36
  42. package/package.json +1 -1
  43. package/dist/scripts/src/components/NumberBox/NumberBox2.js +0 -99
  44. package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +0 -420
@@ -60,6 +60,8 @@ const InputAdornment_1 = require("../Input/InputAdornment");
60
60
  const ButtonNative_1 = require("../Button/ButtonNative");
61
61
  const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
62
62
  const parts_1 = require("../../components-core/parts");
63
+ const PART_SPINNER_UP = "spinnerUp";
64
+ const PART_SPINNER_DOWN = "spinnerDown";
63
65
  // Default props for NumberBox component
64
66
  exports.defaultProps = {
65
67
  enabled: true,
@@ -140,45 +142,83 @@ exports.NumberBox = (0, react_1.forwardRef)(function NumberBox(_a, forwardedRef)
140
142
  // --- Register stepper logic to buttons
141
143
  useLongPress(upButton.current, handleIncStep);
142
144
  useLongPress(downButton.current, handleDecStep);
143
- // --- This logic prevenst the user from typing invalid characters (in the current typing context)
144
- const handleOnBeforeInput = (event) => {
145
- var _a, _b;
146
- // --- Prevent the default behavior for some characters
147
- let shouldPreventDefault = false;
148
- const currentValue = (_a = event.target.value) !== null && _a !== void 0 ? _a : "";
149
- const currentPos = event.target.selectionStart;
145
+ // --- Shared character validation logic
146
+ const processCharacterInput = (0, react_1.useCallback)((char, currentValue, currentPos, predictedValue, isForPaste = false) => {
150
147
  // --- Are the caret after the exponential separator?
151
- const beforeCaret = currentValue.substring(0, event.target.selectionStart);
152
- // --- If "expPos" is -1, the caret is not after the exponential separator
148
+ const beforeCaret = currentValue.substring(0, currentPos);
153
149
  const expPos = beforeCaret.indexOf(numberbox_abstractions_1.EXPONENTIAL_SEPARATOR);
154
- switch (event.data) {
150
+ let shouldAccept = true;
151
+ let shouldPreventDefault = false;
152
+ let newValue = currentValue;
153
+ let newPos = currentPos;
154
+ switch (char) {
155
155
  case "-":
156
+ shouldAccept = false;
156
157
  shouldPreventDefault = true;
158
+ if (zeroOrPositive) {
159
+ // --- No minus sign allowed
160
+ break;
161
+ }
157
162
  if (expPos === -1) {
158
163
  // --- Change the first char to "-" if we are before the exponential separator and it's not already there
159
164
  if (!currentValue.startsWith("-")) {
160
- setNewValue("-" + currentValue, currentPos + 1);
165
+ newValue = "-" + currentValue;
166
+ newPos = currentPos + 1;
161
167
  }
162
168
  }
163
169
  else {
164
170
  // --- Change the char after the exponential separator to "-" if it's not already there
165
171
  if (currentValue[expPos + 1] !== "-") {
166
- setNewValue(currentValue.substring(0, expPos + 1) + "-" + currentValue.substring(expPos + 1), currentPos + 1);
172
+ newValue =
173
+ currentValue.substring(0, expPos + 1) + "-" + currentValue.substring(expPos + 1);
174
+ newPos = currentPos + 1;
167
175
  }
168
176
  }
169
177
  break;
170
178
  case "+":
179
+ shouldAccept = false;
171
180
  shouldPreventDefault = true;
172
181
  if (expPos === -1) {
173
182
  // --- Remove the first char if it's "-" and we are before the exponential separator
174
183
  if (currentValue.startsWith("-")) {
175
- setNewValue(currentValue.substring(1), currentPos - 1);
184
+ newValue = currentValue.substring(1);
185
+ newPos = Math.max(0, currentPos - 1);
176
186
  }
177
187
  }
178
188
  else {
179
189
  // --- Remove the char after the exponential separator if it's "-"
180
190
  if (currentValue[expPos + 1] === "-") {
181
- setNewValue(currentValue.substring(0, expPos + 1) + currentValue.substring(expPos + 2), currentPos - 1);
191
+ newValue = currentValue.substring(0, expPos + 1) + currentValue.substring(expPos + 2);
192
+ newPos = Math.max(expPos + 1, currentPos - 1);
193
+ }
194
+ }
195
+ break;
196
+ case "0":
197
+ // --- Prevent leading zeros (before decimal or exponential separator)
198
+ if (currentValue === "0") {
199
+ shouldAccept = false;
200
+ shouldPreventDefault = true;
201
+ }
202
+ break;
203
+ case "1":
204
+ case "2":
205
+ case "3":
206
+ case "4":
207
+ case "5":
208
+ case "6":
209
+ case "7":
210
+ case "8":
211
+ case "9":
212
+ // --- Replace leading zero with this digit
213
+ if (currentValue === "0" && currentPos === 1) {
214
+ if (isForPaste) {
215
+ newValue = char;
216
+ shouldAccept = false; // Don't add it again for paste
217
+ }
218
+ else {
219
+ newValue = char;
220
+ newPos = 1;
221
+ shouldPreventDefault = true;
182
222
  }
183
223
  }
184
224
  break;
@@ -186,97 +226,170 @@ exports.NumberBox = (0, react_1.forwardRef)(function NumberBox(_a, forwardedRef)
186
226
  // --- Prevent multiple decimal separators (integers only),
187
227
  // --- or decimal separator after the exponential separator
188
228
  if (integersOnly || currentValue.includes(numberbox_abstractions_1.DECIMAL_SEPARATOR) || expPos !== -1) {
229
+ shouldAccept = false;
230
+ shouldPreventDefault = true;
231
+ }
232
+ else if (predictedValue.startsWith(numberbox_abstractions_1.DECIMAL_SEPARATOR) && currentPos === 0) {
233
+ newValue = "0" + predictedValue;
234
+ newPos = currentPos + 2;
189
235
  shouldPreventDefault = true;
190
236
  }
191
237
  break;
192
238
  case numberbox_abstractions_1.EXPONENTIAL_SEPARATOR:
193
239
  // --- Prevent exponential notation for integers
194
240
  if (integersOnly) {
241
+ shouldAccept = false;
195
242
  shouldPreventDefault = true;
196
243
  break;
197
244
  }
198
- // --- Prevent multiple exponential separators (and too many digits after it)
199
- if (currentValue.includes(numberbox_abstractions_1.EXPONENTIAL_SEPARATOR) ||
200
- tooManyDigitsAfterExponentialSeparator(currentPos, 2)) {
245
+ // --- Prevent multiple exponential separators
246
+ if (currentValue.includes(numberbox_abstractions_1.EXPONENTIAL_SEPARATOR)) {
247
+ shouldAccept = false;
201
248
  shouldPreventDefault = true;
202
249
  }
203
250
  break;
204
251
  default:
205
- let newInput = event.data;
206
- const selectionStart = event.target.selectionStart;
207
- // --- Test for multi-character input (perhaps paste)
208
- if (((_b = event.data) === null || _b === void 0 ? void 0 : _b.length) > 0) {
209
- // --- Decide whether to accept the optional sign character
210
- if (newInput.startsWith("-")) {
211
- if (selectionStart > 0) {
212
- shouldPreventDefault = true;
213
- break;
214
- }
215
- }
216
- else if (newInput.startsWith("+")) {
252
+ // --- Only allow digits for single characters
253
+ if (char >= "0" && char <= "9") {
254
+ // --- Prevent digits before minus sign
255
+ if (currentValue.startsWith("-") && currentPos === 0) {
256
+ shouldAccept = false;
217
257
  shouldPreventDefault = true;
218
258
  break;
219
259
  }
220
- // --- Replace the selection with the new input
221
- const newValue = currentValue.substring(0, selectionStart) +
222
- newInput +
223
- currentValue.substring(event.target.selectionEnd);
224
- // --- Check for integers
225
- if (integersOnly && !numberbox_abstractions_1.INT_REGEXP.test(newValue)) {
226
- // --- The result is not an integer, drop the pasted input
227
- shouldPreventDefault = true;
228
- }
229
- else if (!numberbox_abstractions_1.FLOAT_REGEXP.test(newValue)) {
230
- // --- The result is not a loat, drop the pasted input
231
- shouldPreventDefault = true;
260
+ // --- For beforeInput, check for too many digits after exponential separator
261
+ if (!isForPaste && expPos !== -1) {
262
+ const tooManyDigitsAfterExponentialSeparator = (pos, maxDigits) => {
263
+ let numDigitsAfter = 0;
264
+ while (pos < currentValue.length) {
265
+ if (/\d/.test(currentValue[pos++])) {
266
+ numDigitsAfter++;
267
+ }
268
+ else {
269
+ numDigitsAfter = maxDigits + 1;
270
+ break;
271
+ }
272
+ }
273
+ return numDigitsAfter > maxDigits;
274
+ };
275
+ if (tooManyDigitsAfterExponentialSeparator(expPos + 1, 1)) {
276
+ shouldAccept = false;
277
+ shouldPreventDefault = true;
278
+ }
232
279
  }
233
- break;
234
280
  }
235
- // --- Single character input
236
- // --- Prevent non-digit characters
237
- if (event.data < "0" || event.data > "9") {
281
+ else {
282
+ // --- Reject non-digit characters
283
+ shouldAccept = false;
284
+ shouldPreventDefault = true;
285
+ }
286
+ break;
287
+ }
288
+ return { shouldAccept, newValue, newPos, shouldPreventDefault };
289
+ }, [integersOnly, zeroOrPositive]);
290
+ // --- This logic prevents the user from typing invalid characters (in the current typing context)
291
+ const handleOnBeforeInput = (event) => {
292
+ var _a, _b;
293
+ const currentValue = (_a = event.target.value) !== null && _a !== void 0 ? _a : "";
294
+ const currentPos = event.target.selectionStart;
295
+ const expectedNewValue = currentValue.substring(0, currentPos) +
296
+ event.data +
297
+ currentValue.substring(event.target.selectionEnd);
298
+ // --- Handle multi-character input (paste) through the legacy path
299
+ if (((_b = event.data) === null || _b === void 0 ? void 0 : _b.length) > 1) {
300
+ let shouldPreventDefault = false;
301
+ const selectionStart = event.target.selectionStart;
302
+ let newInput = event.data;
303
+ // --- Decide whether to accept the optional sign character
304
+ if (newInput.startsWith("-")) {
305
+ if (selectionStart > 0) {
238
306
  shouldPreventDefault = true;
239
- break;
240
307
  }
241
- // --- Prevent digits before minus sign
242
- if (currentValue.startsWith("-") && selectionStart === 0) {
308
+ }
309
+ else if (newInput.startsWith("+")) {
310
+ shouldPreventDefault = true;
311
+ }
312
+ if (!shouldPreventDefault) {
313
+ // --- Check for integers
314
+ if (integersOnly && !numberbox_abstractions_1.INT_REGEXP.test(expectedNewValue)) {
315
+ // --- The result is not an integer, drop the pasted input
243
316
  shouldPreventDefault = true;
244
- break;
245
317
  }
246
- // --- Prevent too many digits after the exponential separator
247
- if (expPos !== -1 && tooManyDigitsAfterExponentialSeparator(expPos + 1, 1)) {
248
- // --- Caret after the exponential separator
249
- // --- Prevent typing a digi if more than 2 digits after the exponential separator
318
+ else if (!numberbox_abstractions_1.FLOAT_REGEXP.test(expectedNewValue)) {
319
+ // --- The result is not a float, drop the pasted input
250
320
  shouldPreventDefault = true;
251
321
  }
252
- break;
322
+ }
323
+ if (shouldPreventDefault) {
324
+ event.preventDefault();
325
+ }
326
+ return;
253
327
  }
254
- // --- Done.
255
- if (shouldPreventDefault) {
328
+ // --- Single character processing
329
+ const result = processCharacterInput(event.data, currentValue, currentPos, expectedNewValue, false);
330
+ if (result.shouldPreventDefault) {
256
331
  event.preventDefault();
257
332
  }
258
- return;
259
- // --- Helpers
260
- function tooManyDigitsAfterExponentialSeparator(pos, maxDigits) {
261
- let numDigitsAfter = 0;
262
- while (pos < currentValue.length) {
263
- if (/\d/.test(currentValue[pos++])) {
264
- numDigitsAfter++;
265
- }
266
- else {
267
- numDigitsAfter = maxDigits + 1;
268
- break;
269
- }
333
+ // --- Apply value changes if needed
334
+ if (result.newValue !== currentValue) {
335
+ const setNewValue = (newValue, pos) => {
336
+ var _a;
337
+ event.target.value = newValue;
338
+ updateValue(newValue, newValue);
339
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.setSelectionRange(pos, pos);
340
+ };
341
+ setNewValue(result.newValue, result.newPos);
342
+ }
343
+ };
344
+ // --- Handle paste events by applying the same character validation logic
345
+ const handleOnPaste = (0, react_1.useCallback)((event) => {
346
+ var _a, _b, _c;
347
+ event.preventDefault();
348
+ const pastedText = event.clipboardData.getData("text/plain");
349
+ if (!pastedText)
350
+ return;
351
+ const inputElement = event.currentTarget;
352
+ const currentValue = (_a = inputElement.value) !== null && _a !== void 0 ? _a : "";
353
+ const selectionStart = (_b = inputElement.selectionStart) !== null && _b !== void 0 ? _b : 0;
354
+ const selectionEnd = (_c = inputElement.selectionEnd) !== null && _c !== void 0 ? _c : 0;
355
+ const expectedNewValue = currentValue.substring(0, selectionStart) +
356
+ pastedText +
357
+ currentValue.substring(selectionEnd);
358
+ // --- Start with the value before the selection
359
+ let resultValue = currentValue.substring(0, selectionStart);
360
+ let currentPos = selectionStart;
361
+ // --- Process each character from the pasted text
362
+ for (let i = 0; i < pastedText.length; i++) {
363
+ const char = pastedText[i];
364
+ const result = processCharacterInput(char, resultValue, currentPos, expectedNewValue, true);
365
+ if (result.shouldAccept) {
366
+ resultValue =
367
+ resultValue.substring(0, currentPos) + char + resultValue.substring(currentPos);
368
+ currentPos++;
369
+ }
370
+ else if (result.newValue !== resultValue) {
371
+ // --- Handle special cases like sign changes or zero replacement
372
+ resultValue = result.newValue;
373
+ currentPos = result.newPos;
270
374
  }
271
- return numDigitsAfter > maxDigits;
272
375
  }
273
- function setNewValue(newValue, pos) {
274
- var _a;
275
- event.target.value = newValue;
276
- updateValue(newValue, newValue);
277
- (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.setSelectionRange(pos, pos);
376
+ // --- Add the rest of the original value after the selection
377
+ resultValue += currentValue.substring(selectionEnd);
378
+ // --- Final validation - ensure the result is a valid number format
379
+ let isValidFinal = false;
380
+ if (integersOnly) {
381
+ isValidFinal = numberbox_abstractions_1.INT_REGEXP.test(resultValue) || resultValue === "" || resultValue === "-";
278
382
  }
279
- };
383
+ else {
384
+ isValidFinal = numberbox_abstractions_1.FLOAT_REGEXP.test(resultValue) || resultValue === "" || resultValue === "-";
385
+ }
386
+ // --- Apply the result if valid
387
+ if (isValidFinal) {
388
+ inputElement.value = resultValue;
389
+ updateValue(resultValue, resultValue);
390
+ inputElement.setSelectionRange(currentPos, currentPos);
391
+ }
392
+ }, [processCharacterInput, updateValue, integersOnly]);
280
393
  // --- Setting steppers with keyboard
281
394
  const handleOnKey = (0, react_1.useCallback)((event) => {
282
395
  if (event.code === "ArrowUp") {
@@ -293,9 +406,26 @@ exports.NumberBox = (0, react_1.forwardRef)(function NumberBox(_a, forwardedRef)
293
406
  onFocus === null || onFocus === void 0 ? void 0 : onFocus();
294
407
  }, [onFocus]);
295
408
  const handleOnBlur = (0, react_1.useCallback)(() => {
296
- setValueStrRep((0, numberbox_abstractions_1.mapToRepresentation)(value));
409
+ var _a, _b;
410
+ // --- Get the current input value
411
+ const currentInputValue = (_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "";
412
+ // --- Check if we need to add a trailing zero
413
+ let finalValue = currentInputValue;
414
+ if (!integersOnly && currentInputValue.endsWith(numberbox_abstractions_1.DECIMAL_SEPARATOR)) {
415
+ // --- Add trailing zero if the value ends with decimal separator
416
+ finalValue = currentInputValue + "0";
417
+ // --- Update the input and state with the new value
418
+ if (inputRef.current) {
419
+ inputRef.current.value = finalValue;
420
+ }
421
+ updateValue(finalValue, finalValue);
422
+ }
423
+ else {
424
+ // --- Use the standard representation mapping
425
+ setValueStrRep((0, numberbox_abstractions_1.mapToRepresentation)(value));
426
+ }
297
427
  onBlur === null || onBlur === void 0 ? void 0 : onBlur();
298
- }, [value, onBlur]);
428
+ }, [value, onBlur, integersOnly, updateValue]);
299
429
  const focus = (0, react_1.useCallback)(() => {
300
430
  var _a;
301
431
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
@@ -323,7 +453,7 @@ exports.NumberBox = (0, react_1.forwardRef)(function NumberBox(_a, forwardedRef)
323
453
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
324
454
  }, style: { gap }, children: [(0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { "data-part-id": parts_1.PART_START_ADORNMENT, text: startText, iconName: startIcon, className: (0, classnames_1.default)(NumberBox_module_scss_1.default.adornment) }), (0, jsx_runtime_1.jsx)("input", { id: id, "data-part-id": parts_1.PART_INPUT, type: "text", inputMode: "numeric", className: (0, classnames_1.default)(NumberBox_module_scss_1.default.input, {
325
455
  [NumberBox_module_scss_1.default.readOnly]: readOnly,
326
- }), disabled: !enabled, value: valueStrRep, step: step, placeholder: placeholder, onChange: onInputChange, onFocus: handleOnFocus, onBlur: handleOnBlur, onBeforeInput: handleOnBeforeInput, onKeyDown: handleOnKey, readOnly: readOnly, ref: inputRef, autoFocus: autoFocus, maxLength: maxLength, required: required }), (0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { "data-part-id": parts_1.PART_END_ADORNMENT, text: endText, iconName: endIcon, className: (0, classnames_1.default)(NumberBox_module_scss_1.default.adornment) }), hasSpinBox && ((0, jsx_runtime_1.jsxs)("div", { className: NumberBox_module_scss_1.default.spinnerBox, children: [(0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { "data-spinner": "up", type: "button", role: "spinbutton", variant: "ghost", themeColor: "secondary", tabIndex: -1, className: NumberBox_module_scss_1.default.spinnerButton, disabled: !enabled || readOnly, ref: upButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: spinnerUpIcon || "spinnerUp:NumberBox", fallback: "chevronup", size: "sm" }) }), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { "data-spinner": "down", type: "button", role: "spinbutton", tabIndex: -1, variant: "ghost", themeColor: "secondary", className: NumberBox_module_scss_1.default.spinnerButton, disabled: !enabled || readOnly, ref: downButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: spinnerDownIcon || "spinnerDown:NumberBox", fallback: "chevrondown", size: "sm" }) })] }))] }) })));
456
+ }), disabled: !enabled, value: valueStrRep, step: step, placeholder: placeholder, onChange: onInputChange, onFocus: handleOnFocus, onBlur: handleOnBlur, onBeforeInput: handleOnBeforeInput, onPaste: handleOnPaste, onKeyDown: handleOnKey, readOnly: readOnly, ref: inputRef, autoFocus: autoFocus, maxLength: maxLength, required: required }), (0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { "data-part-id": parts_1.PART_END_ADORNMENT, text: endText, iconName: endIcon, className: (0, classnames_1.default)(NumberBox_module_scss_1.default.adornment) }), hasSpinBox && ((0, jsx_runtime_1.jsxs)("div", { className: NumberBox_module_scss_1.default.spinnerBox, children: [(0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { "data-part-id": PART_SPINNER_UP, "data-spinner": "up", type: "button", role: "spinbutton", variant: "ghost", themeColor: "secondary", tabIndex: -1, className: NumberBox_module_scss_1.default.spinnerButton, disabled: !enabled || readOnly, ref: upButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: spinnerUpIcon || "spinnerUp:NumberBox", fallback: "chevronup", size: "sm" }) }), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { "data-part-id": PART_SPINNER_DOWN, "data-spinner": "down", type: "button", role: "spinbutton", tabIndex: -1, variant: "ghost", themeColor: "secondary", className: NumberBox_module_scss_1.default.spinnerButton, disabled: !enabled || readOnly, ref: downButton, children: (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: spinnerDownIcon || "spinnerDown:NumberBox", fallback: "chevrondown", size: "sm" }) })] }))] }) })));
327
457
  });
328
458
  function applyStep(valueStrRep, step, min, max, integersOnly) {
329
459
  const currentValue = (0, numberbox_abstractions_1.toUsableNumber)(valueStrRep, integersOnly);
@@ -19,6 +19,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const react_1 = require("react");
20
20
  const Spinner_module_scss_1 = __importDefault(require("./Spinner.module.scss"));
21
21
  const classnames_1 = __importDefault(require("classnames"));
22
+ const PART_RING = "ring";
22
23
  exports.defaultProps = {
23
24
  delay: 400,
24
25
  fullScreen: false,
@@ -40,8 +41,8 @@ exports.Spinner = (0, react_1.forwardRef)(function Spinner(_a, forwardedRef) {
40
41
  }
41
42
  else {
42
43
  if (fullScreen) {
43
- return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, rest, { role: "status", "aria-label": "Loading", className: Spinner_module_scss_1.default.fullScreenSpinnerWrapper, children: (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(Spinner_module_scss_1.default["lds-ring"], className), style: style, ref: forwardedRef, children: [(0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {})] }) })));
44
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({}, rest, { role: "status", "aria-label": "Loading", className: Spinner_module_scss_1.default.fullScreenSpinnerWrapper, children: (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(Spinner_module_scss_1.default["lds-ring"], className), style: style, ref: forwardedRef, children: [(0, jsx_runtime_1.jsx)("div", { "data-part-id": PART_RING }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {})] }) })));
44
45
  }
45
- return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, rest, { className: (0, classnames_1.default)(Spinner_module_scss_1.default["lds-ring"], className), role: "status", "aria-label": "Loading", style: style, ref: forwardedRef, children: [(0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {})] })));
46
+ return ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, rest, { className: (0, classnames_1.default)(Spinner_module_scss_1.default["lds-ring"], className), role: "status", "aria-label": "Loading", style: style, ref: forwardedRef, children: [(0, jsx_runtime_1.jsx)("div", { "data-part-id": PART_RING }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("div", {})] })));
46
47
  }
47
48
  });
@@ -15,14 +15,23 @@ var SyntaxKind;
15
15
  SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 4] = "WhitespaceTrivia";
16
16
  // Effective tokens
17
17
  SyntaxKind[SyntaxKind["Identifier"] = 5] = "Identifier";
18
+ /** < */
18
19
  SyntaxKind[SyntaxKind["OpenNodeStart"] = 6] = "OpenNodeStart";
20
+ /** </ */
19
21
  SyntaxKind[SyntaxKind["CloseNodeStart"] = 7] = "CloseNodeStart";
22
+ /** > */
20
23
  SyntaxKind[SyntaxKind["NodeEnd"] = 8] = "NodeEnd";
24
+ /** /> */
21
25
  SyntaxKind[SyntaxKind["NodeClose"] = 9] = "NodeClose";
26
+ /** : */
22
27
  SyntaxKind[SyntaxKind["Colon"] = 10] = "Colon";
28
+ /** = */
23
29
  SyntaxKind[SyntaxKind["Equal"] = 11] = "Equal";
30
+ /** string literal */
24
31
  SyntaxKind[SyntaxKind["StringLiteral"] = 12] = "StringLiteral";
32
+ /** <![CDATA[ ... ]]> */
25
33
  SyntaxKind[SyntaxKind["CData"] = 13] = "CData";
34
+ /** <script>...</script> */
26
35
  SyntaxKind[SyntaxKind["Script"] = 14] = "Script";
27
36
  // A token created by the parser which contains arbitrary text, but not the '<' character
28
37
  SyntaxKind[SyntaxKind["TextNode"] = 15] = "TextNode";
@@ -304,7 +304,8 @@ function nodeToComponentDef(node, originalGetText, fileId) {
304
304
  }
305
305
  catch (err) {
306
306
  if (parser.errors && parser.errors.length > 0) {
307
- comp.scriptError = parser.errors;
307
+ const errMsg = parser.errors[0];
308
+ throw new ParserError_1.ParserError(`${errMsg.text} [${errMsg.line}: ${errMsg.column}]`, errMsg.code);
308
309
  }
309
310
  else {
310
311
  comp.scriptError = err;
@@ -828,6 +828,8 @@ declare interface IconBaseProps extends default_2.SVGAttributes<SVGElement> {
828
828
  fallback?: string;
829
829
  style?: CSSProperties;
830
830
  className?: string;
831
+ tabIndex?: number;
832
+ onKeyDown?: default_2.KeyboardEventHandler<any>;
831
833
  }
832
834
 
833
835
  declare type IconPosition = (typeof iconPositionValues)[number];