@lavalogic/scoria 0.0.16 → 0.0.18
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.
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
<script lang="ts" module>
|
|
4
4
|
import { InputVariant } from '../Types/Internal/InputVariant.js';
|
|
5
|
-
import type { InputDate } from '../Types/Internal/Misc.js';
|
|
5
|
+
import type { InputDate, InputDateWithTime } from '../Types/Internal/Misc.js';
|
|
6
6
|
import { Size } from '../Types/Internal/Size.js';
|
|
7
7
|
import Icon, { type PartialIconProps } from './Icon.svelte';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
type DTType = 'date' | 'datetime-local' | undefined;
|
|
10
|
+
|
|
11
|
+
export interface DateInputProps<
|
|
12
|
+
DT = DTType,
|
|
13
|
+
ValueType = DT extends undefined | 'date' ? InputDate : InputDateWithTime
|
|
14
|
+
> {
|
|
15
|
+
value?: ValueType | null;
|
|
11
16
|
label?: string;
|
|
12
17
|
placeholder?: string;
|
|
13
18
|
required?: boolean;
|
|
@@ -15,7 +20,7 @@
|
|
|
15
20
|
min?: string;
|
|
16
21
|
max?: string;
|
|
17
22
|
optional?: boolean;
|
|
18
|
-
type?:
|
|
23
|
+
type?: DT;
|
|
19
24
|
disabled?: boolean;
|
|
20
25
|
leftIcon?: PartialIconProps;
|
|
21
26
|
rightIcon?: PartialIconProps;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { InputVariant } from '../Types/Internal/InputVariant.js';
|
|
2
|
-
import type { InputDate } from '../Types/Internal/Misc.js';
|
|
2
|
+
import type { InputDate, InputDateWithTime } from '../Types/Internal/Misc.js';
|
|
3
3
|
import { type PartialIconProps } from './Icon.svelte';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type DTType = 'date' | 'datetime-local' | undefined;
|
|
5
|
+
export interface DateInputProps<DT = DTType, ValueType = DT extends undefined | 'date' ? InputDate : InputDateWithTime> {
|
|
6
|
+
value?: ValueType | null;
|
|
6
7
|
label?: string;
|
|
7
8
|
placeholder?: string;
|
|
8
9
|
required?: boolean;
|
|
@@ -10,7 +11,7 @@ export interface DateInputProps {
|
|
|
10
11
|
min?: string;
|
|
11
12
|
max?: string;
|
|
12
13
|
optional?: boolean;
|
|
13
|
-
type?:
|
|
14
|
+
type?: DT;
|
|
14
15
|
disabled?: boolean;
|
|
15
16
|
leftIcon?: PartialIconProps;
|
|
16
17
|
rightIcon?: PartialIconProps;
|
|
@@ -19,6 +20,6 @@ export interface DateInputProps {
|
|
|
19
20
|
onblur?: (e: FocusEvent) => void;
|
|
20
21
|
onfocus?: (e: FocusEvent) => void;
|
|
21
22
|
}
|
|
22
|
-
declare const DateInput: import("svelte").Component<DateInputProps, {}, "value">;
|
|
23
|
+
declare const DateInput: import("svelte").Component<DateInputProps<DTType, InputDate | InputDateWithTime>, {}, "value">;
|
|
23
24
|
type DateInput = ReturnType<typeof DateInput>;
|
|
24
25
|
export default DateInput;
|
package/dist/index.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export { type KeyValuePair, type SummaryCardProps, default as SummaryCard } from
|
|
|
77
77
|
export { default as TextAreaModal } from './Components/Touch/TextAreaModal.svelte';
|
|
78
78
|
export { default as TextModal } from './Components/Touch/TextModal.svelte';
|
|
79
79
|
export { default as TouchCard } from './Components/Touch/TouchCard.svelte';
|
|
80
|
-
export { default as TouchModal } from './Components/Touch/TouchModal.svelte';
|
|
80
|
+
export { default as TouchModal, type DefaultTimer } from './Components/Touch/TouchModal.svelte';
|
|
81
81
|
export { default as UtilityButton } from './Components/Touch/UtilityButton.svelte';
|
|
82
82
|
export { default as Action } from './Components/Action.svelte';
|
|
83
83
|
export { default as AlertModal } from './Components/AlertModal.svelte';
|
|
@@ -143,7 +143,7 @@ export { type GridStringItem } from './Types/Internal/GridStringItem.js';
|
|
|
143
143
|
export { type GridTextItem } from './Types/Internal/GridTextItem.js';
|
|
144
144
|
export { type IdentifiableToastMessage } from './Types/Internal/IdentifiableToastMessage.js';
|
|
145
145
|
export { InputVariant } from './Types/Internal/InputVariant.js';
|
|
146
|
-
export { type NonNullableKey, type ValueProp, type Unsubscriber, type Pixels, type Centimetres, type InputDate, type InputDateWithTime, type BrandedString, type BrandedNumber, type BrandedInteger } from './Types/Internal/Misc.js';
|
|
146
|
+
export { type NonNullableKey, type ValueProp, type Unsubscriber, type Pixels, type Centimetres, type InputDate, type InputDateWithTime, type BrandedString, type BrandedNumber, type BrandedInteger, type SQLDate } from './Types/Internal/Misc.js';
|
|
147
147
|
export { type RefWrapper } from './Types/Internal/RefWrapper.js';
|
|
148
148
|
export { type SelectOption } from './Types/Internal/SelectOption.js';
|
|
149
149
|
export { Shape } from './Types/Internal/Shape.js';
|