@kuina-ui/vue 0.3.0 → 0.5.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 +143 -143
- package/dist/components/date-picker/DateCalendar.vue.d.ts +2 -3
- package/dist/components/date-picker/DateCalendarPopover.vue.d.ts +61 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +3 -9
- package/dist/components/date-picker/DatePickerField.vue.d.ts +38 -0
- package/dist/components/date-picker/DateRangePicker.vue.d.ts +4 -18
- package/dist/components/date-picker/DateRangePickerField.vue.d.ts +40 -0
- package/dist/components/date-picker/datePickerProps.d.ts +42 -6
- package/dist/components/date-picker/index.d.ts +8 -2
- package/dist/components/date-picker/useDatePickerControl.d.ts +63 -0
- package/dist/components/date-picker/useDatePickerPopover.d.ts +2 -2
- package/dist/components/date-picker/useDateRangeSelection.d.ts +30 -0
- package/dist/components/date-picker/useDateRangeTyping.d.ts +45 -0
- package/dist/components/date-picker/useDateTypingFocus.d.ts +28 -0
- package/dist/components/date-picker/useSingleDateSelection.d.ts +15 -0
- package/dist/components/date-picker/useSingleDateTyping.d.ts +43 -0
- package/dist/components/date-picker/useTypedDateInput.d.ts +32 -0
- package/dist/components/select/SelectField.vue.d.ts +5 -5
- package/dist/components/text-field/TextField.vue.d.ts +7 -1
- package/dist/elements/segmented-control/SegmentedControl.vue.d.ts +35 -0
- package/dist/elements/segmented-control/index.d.ts +2 -0
- package/dist/elements/segmented-control/segmented-control.theme.d.ts +62 -0
- package/dist/elements/select-field-control/SelectFieldControl.vue.d.ts +61 -0
- package/dist/elements/select-field-control/index.d.ts +3 -0
- package/dist/elements/select-field-control/select-field-control.theme.d.ts +101 -0
- package/dist/elements/text-link/TextLink.vue.d.ts +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +1 -1
- package/dist/nuxt.js +1 -1
- package/dist/shared/composables/useMask.d.ts +10 -0
- package/dist/shared/composables/useSlidingThumb.d.ts +12 -0
- package/dist/shared/types/mask.d.ts +17 -0
- package/dist/shared/utils/createDateInputMask.d.ts +19 -0
- package/dist/shared/utils/createMask.d.ts +10 -0
- package/dist/shared/utils/isoDate.d.ts +8 -0
- package/dist/shared/utils/resolvePressScale.d.ts +2 -0
- package/dist/{src-Cl5gtlze.js → src-Bnn36nLV.js} +3952 -2465
- package/package.json +75 -75
- package/dist/components/select/select-field.theme.d.ts +0 -250
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Describe how dates are typed in a language: the mask pattern, the format hint, and how typed text becomes a date. */
|
|
2
|
+
export declare function createDateInputMask(locale: string): {
|
|
3
|
+
pattern: string;
|
|
4
|
+
formatHint: string;
|
|
5
|
+
formatIsoDate: (isoDate: string) => string;
|
|
6
|
+
parseTypedDate: (typedText: string) => string | undefined;
|
|
7
|
+
normalizeTypedDate: (typedText: string) => string;
|
|
8
|
+
rangePattern: string;
|
|
9
|
+
rangeFormatHint: string;
|
|
10
|
+
formatIsoRange: ([rangeStart, rangeEnd]: [string, string]) => string;
|
|
11
|
+
parseTypedRange: (typedText: string) => {
|
|
12
|
+
hasCompleteStart: boolean;
|
|
13
|
+
hasCompleteEnd: boolean;
|
|
14
|
+
rangeStart: string | undefined;
|
|
15
|
+
rangeEnd: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
normalizeTypedRange: (typedText: string) => string;
|
|
18
|
+
};
|
|
19
|
+
export type DateInputMask = ReturnType<typeof createDateInputMask>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MaskOptions, MaskResult, MaskTokens } from '../types/mask';
|
|
2
|
+
export declare const defaultMaskTokens: MaskTokens;
|
|
3
|
+
/** Build a mask from a pattern like `##/##/####`, where tokens accept characters and anything else is written as is. */
|
|
4
|
+
export declare function createMask(maskOptions: MaskOptions): {
|
|
5
|
+
apply: (text: string, applyOptions?: {
|
|
6
|
+
eager?: boolean;
|
|
7
|
+
}) => MaskResult;
|
|
8
|
+
findCaretPosition: (maskedText: string, acceptedCharacterCount: number) => number;
|
|
9
|
+
};
|
|
10
|
+
export type Mask = ReturnType<typeof createMask>;
|
|
@@ -13,6 +13,14 @@ export declare function countMonthsBetweenIsoMonths(fromIsoMonth: string, toIsoM
|
|
|
13
13
|
export declare function countDaysBetweenIsoDates(fromIsoDate: string, toIsoDate: string): number;
|
|
14
14
|
/** Tell whether a date is one of the listed dates, or falls inside one of the listed ranges, both ends included. */
|
|
15
15
|
export declare function isIsoDateInDateList(isoDate: string, dateList: DateOrDateRange[]): boolean;
|
|
16
|
+
export interface IsoDateLimits {
|
|
17
|
+
min?: string;
|
|
18
|
+
max?: string;
|
|
19
|
+
disabledDates?: DateOrDateRange[];
|
|
20
|
+
isDateDisabled?: (isoDate: string) => boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Tell whether a date falls outside min and max, or is disabled by the list or the function. */
|
|
23
|
+
export declare function isIsoDateUnavailable(isoDate: string, dateLimits: IsoDateLimits): boolean;
|
|
16
24
|
export declare function clampIsoDate(isoDate: string, minIsoDate?: string, maxIsoDate?: string): string;
|
|
17
25
|
/** Read today's date in the time zone of the device, which is the day its user sees on the calendar. */
|
|
18
26
|
export declare function findLocalTodayIsoDate(): string;
|