@ims360/svelte-ivory 0.5.1 → 0.5.3
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/dist/colorTheme.svelte.d.ts.map +1 -1
- package/dist/colorTheme.svelte.js +1 -1
- package/dist/components/inputs/EmailInput.svelte +10 -8
- package/dist/components/inputs/EmailInput.svelte.d.ts +5 -1
- package/dist/components/inputs/EmailInput.svelte.d.ts.map +1 -1
- package/dist/components/inputs/index.d.ts +1 -1
- package/dist/components/inputs/index.d.ts.map +1 -1
- package/dist/components/layout/tabs/Tab.svelte +1 -2
- package/dist/components/layout/tabs/Tab.svelte.d.ts.map +1 -1
- package/dist/utils/attachments/shortcut.svelte.d.ts.map +1 -1
- package/dist/utils/attachments/shortcut.svelte.js +1 -1
- package/package.json +2 -2
- package/src/lib/colorTheme.svelte.ts +2 -1
- package/src/lib/components/inputs/EmailInput.svelte +10 -8
- package/src/lib/components/inputs/index.ts +1 -1
- package/src/lib/components/layout/tabs/Tab.svelte +1 -2
- package/src/lib/utils/attachments/shortcut.svelte.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorTheme.svelte.d.ts","sourceRoot":"","sources":["../src/lib/colorTheme.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"colorTheme.svelte.d.ts","sourceRoot":"","sources":["../src/lib/colorTheme.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAK5C,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAI/D,cAAM,eAAe;IACjB,OAAO,CAAC,YAAY,CAA0C;;IAY9D,IAAI,KAAK,IAWQ,oBAAoB,CATpC;IAED,IAAI,OAAO,qBAKV;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,oBAAoB,EAepC;IAED,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAcZ;CACL;AAED,eAAO,MAAM,UAAU,iBAAwB,CAAC"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { FullAutoFill } from 'svelte/elements';
|
|
2
3
|
import Input, { type InputProps } from './Input.svelte';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
export type EmailInputProps = InputProps<string> & {
|
|
6
|
+
autocomplete?: FullAutoFill;
|
|
7
|
+
};
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
let { autocomplete = 'email', ...props }: EmailInputProps = $props();
|
|
5
12
|
</script>
|
|
6
13
|
|
|
7
14
|
<Input {...props}>
|
|
8
15
|
{#snippet children(inputProps)}
|
|
9
|
-
<input
|
|
10
|
-
{...inputProps}
|
|
11
|
-
{...props.form.as?.('email')}
|
|
12
|
-
autocomplete="email"
|
|
13
|
-
autocapitalize="off"
|
|
14
|
-
/>
|
|
16
|
+
<input {...inputProps} {...props.form.as?.('email')} {autocomplete} autocapitalize="off" />
|
|
15
17
|
{/snippet}
|
|
16
18
|
</Input>
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import type { FullAutoFill } from 'svelte/elements';
|
|
1
2
|
import { type InputProps } from './Input.svelte';
|
|
2
|
-
|
|
3
|
+
export type EmailInputProps = InputProps<string> & {
|
|
4
|
+
autocomplete?: FullAutoFill;
|
|
5
|
+
};
|
|
6
|
+
declare const EmailInput: import("svelte").Component<EmailInputProps, {}, "">;
|
|
3
7
|
type EmailInput = ReturnType<typeof EmailInput>;
|
|
4
8
|
export default EmailInput;
|
|
5
9
|
//# sourceMappingURL=EmailInput.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailInput.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/inputs/EmailInput.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmailInput.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/components/inputs/EmailInput.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAc,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG;IAC/C,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B,CAAC;AAgBN,QAAA,MAAM,UAAU,qDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as CheckboxInput } from './CheckboxInput.svelte';
|
|
2
2
|
export { default as ColorInput } from './ColorInput.svelte';
|
|
3
3
|
export { default as DateInput } from './DateInput.svelte';
|
|
4
|
-
export { default as EmailInput } from './EmailInput.svelte';
|
|
4
|
+
export { default as EmailInput, type EmailInputProps } from './EmailInput.svelte';
|
|
5
5
|
export { default as FileInput, type FileInputProps } from './FileInput.svelte';
|
|
6
6
|
export { default as FullscreenDropzone, type FullscreenDropzoneProps } from './FullscreenDropzone.svelte';
|
|
7
7
|
export { default as Input, type InputProps } from './Input.svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/components/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/components/inputs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EACH,OAAO,IAAI,kBAAkB,EAC7B,KAAK,uBAAuB,EAC/B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACH,OAAO,IAAI,mBAAmB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import { page } from '$app/state';
|
|
3
2
|
import type { IvoryComponent } from '../../../types';
|
|
4
3
|
import { merge, pseudoRandomId } from '../../../utils/functions';
|
|
5
4
|
import { onMount, type Snippet } from 'svelte';
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
if (typeof active === 'boolean') {
|
|
34
33
|
return active;
|
|
35
34
|
} else if (href) {
|
|
36
|
-
return
|
|
35
|
+
return window.location.href.startsWith(href);
|
|
37
36
|
} else if (tabs && tabs.selectedTab === tabId) {
|
|
38
37
|
return true;
|
|
39
38
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tabs/Tab.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tab.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/layout/tabs/Tab.svelte.ts"],"names":[],"mappings":"AAGI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IAC3E,KAAK,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,QAAQ,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC;IACzD,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IAC3C,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AA6CL,QAAA,MAAM,GAAG,8CAAwC,CAAC;AAClD,KAAK,GAAG,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;AAClC,eAAe,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortcut.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/attachments/shortcut.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shortcut.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/attachments/shortcut.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,MAAM,WAAW,cAAc;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AA8CD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,UAAU,CAQ3D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ims360/svelte-ivory",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"svelte"
|
|
6
6
|
],
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"@eslint/compat": "^2.0.2",
|
|
87
87
|
"@eslint/js": "^10.0.1",
|
|
88
88
|
"@sveltejs/adapter-auto": "^7.0.1",
|
|
89
|
+
"@sveltejs/kit": "^2.55.0",
|
|
89
90
|
"@sveltejs/package": "^2.5.7",
|
|
90
91
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
91
92
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -112,7 +113,6 @@
|
|
|
112
113
|
},
|
|
113
114
|
"peerDependencies": {
|
|
114
115
|
"@skeletonlabs/skeleton": "^4.0.0",
|
|
115
|
-
"@sveltejs/kit": "^2.55.0",
|
|
116
116
|
"svelte": "^5.55.1"
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { browser } from '$app/environment';
|
|
2
1
|
import type { Handle } from '@sveltejs/kit';
|
|
3
2
|
import { cookie } from './utils/functions';
|
|
4
3
|
|
|
@@ -6,6 +5,8 @@ const COOKIE_THEME_KEY = 'theme';
|
|
|
6
5
|
|
|
7
6
|
export type ColorThemePreference = 'system' | 'light' | 'dark';
|
|
8
7
|
|
|
8
|
+
const browser = typeof window !== 'undefined';
|
|
9
|
+
|
|
9
10
|
class ThemeController {
|
|
10
11
|
private currentTheme = $state<ColorThemePreference>('system');
|
|
11
12
|
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
<script lang="ts">
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { FullAutoFill } from 'svelte/elements';
|
|
2
3
|
import Input, { type InputProps } from './Input.svelte';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
export type EmailInputProps = InputProps<string> & {
|
|
6
|
+
autocomplete?: FullAutoFill;
|
|
7
|
+
};
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
let { autocomplete = 'email', ...props }: EmailInputProps = $props();
|
|
5
12
|
</script>
|
|
6
13
|
|
|
7
14
|
<Input {...props}>
|
|
8
15
|
{#snippet children(inputProps)}
|
|
9
|
-
<input
|
|
10
|
-
{...inputProps}
|
|
11
|
-
{...props.form.as?.('email')}
|
|
12
|
-
autocomplete="email"
|
|
13
|
-
autocapitalize="off"
|
|
14
|
-
/>
|
|
16
|
+
<input {...inputProps} {...props.form.as?.('email')} {autocomplete} autocapitalize="off" />
|
|
15
17
|
{/snippet}
|
|
16
18
|
</Input>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as CheckboxInput } from './CheckboxInput.svelte';
|
|
2
2
|
export { default as ColorInput } from './ColorInput.svelte';
|
|
3
3
|
export { default as DateInput } from './DateInput.svelte';
|
|
4
|
-
export { default as EmailInput } from './EmailInput.svelte';
|
|
4
|
+
export { default as EmailInput, type EmailInputProps } from './EmailInput.svelte';
|
|
5
5
|
export { default as FileInput, type FileInputProps } from './FileInput.svelte';
|
|
6
6
|
export {
|
|
7
7
|
default as FullscreenDropzone,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
|
-
import { page } from '$app/state';
|
|
3
2
|
import type { IvoryComponent } from '$lib/types';
|
|
4
3
|
import { merge, pseudoRandomId } from '$lib/utils/functions';
|
|
5
4
|
import { onMount, type Snippet } from 'svelte';
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
if (typeof active === 'boolean') {
|
|
34
33
|
return active;
|
|
35
34
|
} else if (href) {
|
|
36
|
-
return
|
|
35
|
+
return window.location.href.startsWith(href);
|
|
37
36
|
} else if (tabs && tabs.selectedTab === tabId) {
|
|
38
37
|
return true;
|
|
39
38
|
} else {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { browser } from '$app/environment';
|
|
2
1
|
import type { Attachment } from 'svelte/attachments';
|
|
3
2
|
import { pseudoRandomId } from '../functions';
|
|
4
3
|
|
|
@@ -10,6 +9,8 @@ export interface ShortcutParams {
|
|
|
10
9
|
callback: () => void;
|
|
11
10
|
}
|
|
12
11
|
|
|
12
|
+
const browser = typeof window !== 'undefined';
|
|
13
|
+
|
|
13
14
|
// eslint-disable-next-line svelte/prefer-svelte-reactivity
|
|
14
15
|
const callbacks: Map<string, IdShortcutParams[]> = new Map();
|
|
15
16
|
|