@limetech/lime-elements 38.46.3 → 38.47.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/CHANGELOG.md +7 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js +46 -0
- package/dist/cjs/limel-breadcrumbs_7.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/input-field/input-field.js +99 -0
- package/dist/collection/components/input-field/input-field.js.map +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-breadcrumbs_7.entry.js +46 -0
- package/dist/esm/limel-breadcrumbs_7.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/{p-b5e8a4af.entry.js → p-d973e943.entry.js} +2 -2
- package/dist/lime-elements/p-d973e943.entry.js.map +1 -0
- package/dist/types/components/input-field/input-field.d.ts +20 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/lime-elements/p-b5e8a4af.entry.js.map +0 -1
|
@@ -556,6 +556,52 @@ const InputField = class {
|
|
|
556
556
|
}
|
|
557
557
|
this.mdcTextField.disabled = this.disabled || this.readonly;
|
|
558
558
|
}
|
|
559
|
+
/**
|
|
560
|
+
* Returns the start position of the current text selection.
|
|
561
|
+
* Returns `null` if the input element is not available or if
|
|
562
|
+
* the input type does not support selection (e.g., `number`).
|
|
563
|
+
*/
|
|
564
|
+
async getSelectionStart() {
|
|
565
|
+
var _a, _b;
|
|
566
|
+
try {
|
|
567
|
+
return (_b = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.selectionStart) !== null && _b !== void 0 ? _b : null;
|
|
568
|
+
}
|
|
569
|
+
catch (_c) {
|
|
570
|
+
// Some input types (e.g., number) throw InvalidStateError
|
|
571
|
+
return null;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Returns the end position of the current text selection.
|
|
576
|
+
* Returns `null` if the input element is not available or if
|
|
577
|
+
* the input type does not support selection (e.g., `number`).
|
|
578
|
+
*/
|
|
579
|
+
async getSelectionEnd() {
|
|
580
|
+
var _a, _b;
|
|
581
|
+
try {
|
|
582
|
+
return (_b = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.selectionEnd) !== null && _b !== void 0 ? _b : null;
|
|
583
|
+
}
|
|
584
|
+
catch (_c) {
|
|
585
|
+
// Some input types (e.g., number) throw InvalidStateError
|
|
586
|
+
return null;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Returns the direction of the current text selection.
|
|
591
|
+
* Can be `'forward'`, `'backward'`, or `'none'`.
|
|
592
|
+
* Returns `null` if the input element is not available or if
|
|
593
|
+
* the input type does not support selection (e.g., `number`).
|
|
594
|
+
*/
|
|
595
|
+
async getSelectionDirection() {
|
|
596
|
+
var _a, _b;
|
|
597
|
+
try {
|
|
598
|
+
return (_b = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.selectionDirection) !== null && _b !== void 0 ? _b : null;
|
|
599
|
+
}
|
|
600
|
+
catch (_c) {
|
|
601
|
+
// Some input types (e.g., number) throw InvalidStateError
|
|
602
|
+
return null;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
559
605
|
render() {
|
|
560
606
|
const properties = this.getAdditionalProps();
|
|
561
607
|
properties['aria-labelledby'] = this.labelId;
|