chore: remove not needed index.d.ts files, minor type improvements
This commit is contained in:
parent
3f50c798f1
commit
de0e0d52b5
7 changed files with 3 additions and 60 deletions
52
packages/form-core/index.d.ts
vendored
52
packages/form-core/index.d.ts
vendored
|
|
@ -1,52 +0,0 @@
|
|||
export { FocusMixin } from './src/FocusMixin.js';
|
||||
export { FormatMixin } from './src/FormatMixin.js';
|
||||
export { FormControlMixin } from './src/FormControlMixin.js';
|
||||
export { InteractionStateMixin } from './src/InteractionStateMixin.js'; // applies FocusMixin
|
||||
export { LionField } from './src/LionField.js';
|
||||
export { FormRegisteringMixin } from './src/registration/FormRegisteringMixin.js';
|
||||
export { FormRegistrarMixin } from './src/registration/FormRegistrarMixin.js';
|
||||
export { FormRegistrarPortalMixin } from './src/registration/FormRegistrarPortalMixin.js';
|
||||
export { FormControlsCollection } from './src/registration/FormControlsCollection.js';
|
||||
|
||||
// validate
|
||||
|
||||
export { ValidateMixin } from './src/validate/ValidateMixin.js';
|
||||
export { Unparseable } from './src/validate/Unparseable.js';
|
||||
export { Validator } from './src/validate/Validator.js';
|
||||
export { ResultValidator } from './src/validate/ResultValidator.js';
|
||||
|
||||
export { Required } from './src/validate/validators/Required.js';
|
||||
|
||||
export {
|
||||
IsString,
|
||||
EqualsLength,
|
||||
MinLength,
|
||||
MaxLength,
|
||||
MinMaxLength,
|
||||
IsEmail,
|
||||
Pattern,
|
||||
} from './src/validate/validators/StringValidators.js';
|
||||
|
||||
export {
|
||||
IsNumber,
|
||||
MinNumber,
|
||||
MaxNumber,
|
||||
MinMaxNumber,
|
||||
} from './src/validate/validators/NumberValidators.js';
|
||||
|
||||
export {
|
||||
IsDate,
|
||||
MinDate,
|
||||
MaxDate,
|
||||
MinMaxDate,
|
||||
IsDateDisabled,
|
||||
} from './src/validate/validators/DateValidators.js';
|
||||
|
||||
export { DefaultSuccess } from './src/validate/resultValidators/DefaultSuccess.js';
|
||||
|
||||
export { LionValidationFeedback } from './src/validate/LionValidationFeedback.js';
|
||||
|
||||
export { ChoiceGroupMixin } from './src/choice-group/ChoiceGroupMixin.js';
|
||||
export { ChoiceInputMixin } from './src/choice-group/ChoiceInputMixin.js';
|
||||
|
||||
export { FormGroupMixin } from './src/form-group/FormGroupMixin.js';
|
||||
3
packages/input-amount/index.d.ts
vendored
3
packages/input-amount/index.d.ts
vendored
|
|
@ -1,3 +0,0 @@
|
|||
export { LionInputAmount } from './src/LionInputAmount.js';
|
||||
export { formatAmount } from './src/formatters.js';
|
||||
export { parseAmount } from './src/parsers.js';
|
||||
|
|
@ -68,7 +68,7 @@ function getParseMode(value, { mode = 'auto' } = {}) {
|
|||
* @param {string} [options.locale]
|
||||
*/
|
||||
function parseWithLocale(value, options) {
|
||||
const locale = options && options.locale ? options.locale : null;
|
||||
const locale = options && options.locale ? options.locale : undefined;
|
||||
const separator = getDecimalSeparator(locale);
|
||||
const regexNumberAndLocaleSeparator = new RegExp(`[0-9${separator}-]`, 'g');
|
||||
let numberAndLocaleSeparator = value.match(regexNumberAndLocaleSeparator)?.join('');
|
||||
|
|
|
|||
1
packages/input/index.d.ts
vendored
1
packages/input/index.d.ts
vendored
|
|
@ -1 +0,0 @@
|
|||
export { LionInput } from './src/LionInput.js';
|
||||
|
|
@ -3,7 +3,7 @@ import { getLocale } from './getLocale.js';
|
|||
/**
|
||||
* To get the decimal separator
|
||||
*
|
||||
* @param {string|null} locale To override the browser locale
|
||||
* @param {string} [locale] To override the browser locale
|
||||
* @returns {string} The separator
|
||||
*/
|
||||
export function getDecimalSeparator(locale) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { localize } from '../localize.js';
|
|||
/**
|
||||
* Gets the locale to use
|
||||
*
|
||||
* @param {string|null} [locale] Locale to override browser locale
|
||||
* @param {string} [locale] Locale to override browser locale
|
||||
* @returns {string}
|
||||
*/
|
||||
export function getLocale(locale) {
|
||||
|
|
|
|||
1
packages/tabs/index.d.ts
vendored
1
packages/tabs/index.d.ts
vendored
|
|
@ -1 +0,0 @@
|
|||
export { LionTabs } from "./src/LionTabs.js";
|
||||
Loading…
Reference in a new issue