@softwareone/spi-sv5-library 1.14.0 → 1.14.1
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 +0 -5
- package/dist/Accordion/Accordion.svelte +2 -7
- package/dist/Accordion/Accordion.svelte.d.ts +2 -2
- package/dist/Announcement/Announcement.svelte +1 -1
- package/dist/Announcement/Announcement.svelte.d.ts +1 -1
- package/dist/Avatar/Avatar.svelte +2 -2
- package/dist/Avatar/Avatar.svelte.d.ts +2 -2
- package/dist/Button/Button.svelte +2 -2
- package/dist/Button/Button.svelte.d.ts +2 -2
- package/dist/Card/Card.svelte +2 -2
- package/dist/Card/Card.svelte.d.ts +2 -2
- package/dist/Chips/Chips.svelte +3 -3
- package/dist/Chips/Chips.svelte.d.ts +3 -3
- package/dist/Controls/AttachFile/AttachFile.svelte +1 -1
- package/dist/Controls/AttachFile/AttachFile.svelte.d.ts +1 -1
- package/dist/Controls/AttachFile/Warnings.svelte +2 -2
- package/dist/Controls/AttachFile/Warnings.svelte.d.ts +2 -2
- package/dist/Controls/Input/Input.svelte +3 -3
- package/dist/Controls/Input/Input.svelte.d.ts +3 -3
- package/dist/Controls/Label/Label.svelte +1 -1
- package/dist/Controls/Label/Label.svelte.d.ts +1 -1
- package/dist/Controls/RadioGroup/RadioGroup.svelte +4 -4
- package/dist/Controls/RadioGroup/RadioGroup.svelte.d.ts +4 -4
- package/dist/Controls/Select/Select.svelte +22 -10
- package/dist/Controls/Select/Select.svelte.d.ts +3 -3
- package/dist/Controls/TextArea/TextArea.svelte +3 -3
- package/dist/Controls/TextArea/TextArea.svelte.d.ts +3 -3
- package/dist/Controls/Toggle/Toggle.svelte +3 -3
- package/dist/Controls/Toggle/Toggle.svelte.d.ts +3 -3
- package/dist/DeleteConfirmation/DeleteConfirmation.svelte +2 -2
- package/dist/DeleteConfirmation/DeleteConfirmation.svelte.d.ts +2 -2
- package/dist/ErrorPage/ErrorPage.svelte +2 -2
- package/dist/ErrorPage/ErrorPage.svelte.d.ts +2 -2
- package/dist/Footer/Footer.svelte +3 -2
- package/dist/Footer/Footer.svelte.d.ts +2 -2
- package/dist/Header/Header.svelte +3 -3
- package/dist/Header/Header.svelte.d.ts +3 -3
- package/dist/HighlightPanel/HighlightPanel.svelte +2 -2
- package/dist/HighlightPanel/HighlightPanel.svelte.d.ts +2 -2
- package/dist/HighlightPanel/enums.d.ts +12 -0
- package/dist/HighlightPanel/{highlightPanelState.svelte.d.ts → types.d.ts} +1 -12
- package/dist/Home/Home.svelte +2 -2
- package/dist/Home/Home.svelte.d.ts +2 -2
- package/dist/Menu/Menu.svelte +3 -3
- package/dist/Menu/Menu.svelte.d.ts +3 -3
- package/dist/Menu/MenuItem.svelte +3 -3
- package/dist/Menu/MenuItem.svelte.d.ts +3 -3
- package/dist/Menu/Sidebar.svelte +1 -1
- package/dist/Menu/Sidebar.svelte.d.ts +1 -1
- package/dist/Menu/{MenuState.svelte.d.ts → types.d.ts} +0 -1
- package/dist/Menu/utils.d.ts +2 -0
- package/dist/Modal/Modal.svelte +1 -1
- package/dist/Modal/Modal.svelte.d.ts +1 -1
- package/dist/Modal/ModalContent.svelte +2 -2
- package/dist/Modal/ModalContent.svelte.d.ts +2 -2
- package/dist/Modal/ModalFooter.svelte +1 -1
- package/dist/Modal/ModalFooter.svelte.d.ts +1 -1
- package/dist/Modal/ModalHeader.svelte +1 -1
- package/dist/Modal/ModalHeader.svelte.d.ts +1 -1
- package/dist/Notification/Notification.svelte +10 -1
- package/dist/Notification/Notification.svelte.d.ts +8 -1
- package/dist/Processing/Processing.svelte +8 -2
- package/dist/Processing/Processing.svelte.d.ts +7 -2
- package/dist/ProgressPage/ProgressPage.svelte +3 -3
- package/dist/ProgressPage/ProgressPage.svelte.d.ts +3 -3
- package/dist/ProgressWizard/ProgressWizard.svelte +2 -2
- package/dist/ProgressWizard/ProgressWizard.svelte.d.ts +2 -2
- package/dist/ProgressWizard/context.d.ts +1 -1
- package/dist/ProgressWizard/{progressWizardState.svelte.d.ts → types.d.ts} +0 -1
- package/dist/ProgressWizard/utils.d.ts +2 -0
- package/dist/Spinner/Spinner.svelte +2 -2
- package/dist/Spinner/Spinner.svelte.d.ts +2 -2
- package/dist/Switcher/Switcher.svelte +2 -2
- package/dist/Switcher/Switcher.svelte.d.ts +2 -2
- package/dist/Table/AdvancedFilter.svelte +1 -1
- package/dist/Table/Header.svelte +1 -1
- package/dist/Table/Table.svelte +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Tabs/Tabs.svelte +2 -2
- package/dist/Tabs/Tabs.svelte.d.ts +2 -2
- package/dist/Toast/Toast.svelte +3 -3
- package/dist/Toast/Toast.svelte.d.ts +2 -2
- package/dist/Toast/{toastState.svelte.d.ts → state.svelte.d.ts} +1 -6
- package/dist/Toast/types.d.ts +7 -0
- package/dist/Toast/types.js +1 -0
- package/dist/Tooltip/Tooltip.svelte +2 -2
- package/dist/Tooltip/Tooltip.svelte.d.ts +2 -2
- package/dist/Waffle/Waffle.svelte +1 -1
- package/dist/Waffle/Waffle.svelte.d.ts +1 -1
- package/dist/Waffle/types.js +1 -0
- package/dist/index.d.ts +27 -32
- package/dist/index.js +17 -19
- package/package.json +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.svelte +0 -78
- package/dist/Breadcrumbs/Breadcrumbs.svelte.d.ts +0 -18
- package/dist/Breadcrumbs/breadcrumbsState.svelte.d.ts +0 -8
- package/dist/Breadcrumbs/breadcrumbsState.svelte.js +0 -24
- package/dist/Notification/notificationState.svelte.d.ts +0 -9
- package/dist/Processing/processingState.svelte.d.ts +0 -6
- /package/dist/Announcement/{AnnouncementState.svelte.d.ts → types.d.ts} +0 -0
- /package/dist/Announcement/{AnnouncementState.svelte.js → types.js} +0 -0
- /package/dist/Chips/{chipsState.svelte.d.ts → enums.d.ts} +0 -0
- /package/dist/Chips/{chipsState.svelte.js → enums.js} +0 -0
- /package/dist/Controls/Label/{labelState.svelte.d.ts → types.d.ts} +0 -0
- /package/dist/Controls/Label/{labelState.svelte.js → types.js} +0 -0
- /package/dist/Controls/RadioGroup/{radioGroupState.svelte.d.ts → types.d.ts} +0 -0
- /package/dist/Controls/RadioGroup/{radioGroupState.svelte.js → types.js} +0 -0
- /package/dist/Controls/Select/{selectState.svelte.d.ts → types.d.ts} +0 -0
- /package/dist/Controls/Select/{selectState.svelte.js → types.js} +0 -0
- /package/dist/HighlightPanel/{highlightPanelState.svelte.js → enums.js} +0 -0
- /package/dist/{Modal/modalState.svelte.js → HighlightPanel/types.js} +0 -0
- /package/dist/{Notification/notificationState.svelte.js → Menu/types.js} +0 -0
- /package/dist/Menu/{MenuState.svelte.js → utils.js} +0 -0
- /package/dist/Modal/{modalState.svelte.d.ts → types.d.ts} +0 -0
- /package/dist/{Processing/processingState.svelte.js → Modal/types.js} +0 -0
- /package/dist/{Switcher/switcherState.svelte.js → ProgressWizard/types.js} +0 -0
- /package/dist/ProgressWizard/{progressWizardState.svelte.js → utils.js} +0 -0
- /package/dist/Switcher/{switcherState.svelte.d.ts → types.d.ts} +0 -0
- /package/dist/{Waffle/waffleState.svelte.js → Switcher/types.js} +0 -0
- /package/dist/Table/{util.d.ts → utils.d.ts} +0 -0
- /package/dist/Table/{util.js → utils.js} +0 -0
- /package/dist/Tabs/{tabsState.svelte.d.ts → types.d.ts} +0 -0
- /package/dist/Tabs/{tabsState.svelte.js → types.js} +0 -0
- /package/dist/Toast/{toastState.svelte.js → state.svelte.js} +0 -0
- /package/dist/Waffle/{waffleState.svelte.d.ts → types.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -17,7 +17,6 @@ Import the components you need into your Svelte application:
|
|
|
17
17
|
```javascript
|
|
18
18
|
import {
|
|
19
19
|
Avatar,
|
|
20
|
-
Breadcrumbs,
|
|
21
20
|
Button,
|
|
22
21
|
Card,
|
|
23
22
|
Chips,
|
|
@@ -45,7 +44,6 @@ Import the types you need into your Svelte application:
|
|
|
45
44
|
|
|
46
45
|
```javascript
|
|
47
46
|
import {
|
|
48
|
-
type BreadcrumbsNameMap,
|
|
49
47
|
type HighlightPanelColumn,
|
|
50
48
|
type MenuItem,
|
|
51
49
|
type ModalProps,
|
|
@@ -58,7 +56,6 @@ import {
|
|
|
58
56
|
# List of components
|
|
59
57
|
|
|
60
58
|
- Avatar
|
|
61
|
-
- Breadcrumbs
|
|
62
59
|
- Button
|
|
63
60
|
- Card
|
|
64
61
|
- Chips
|
|
@@ -84,8 +81,6 @@ import {
|
|
|
84
81
|
|
|
85
82
|
# List of types per component
|
|
86
83
|
|
|
87
|
-
- Breadcrumbs
|
|
88
|
-
- BreadcrumbsNameMap
|
|
89
84
|
- Chips
|
|
90
85
|
- ChipType
|
|
91
86
|
- HighlightPanel
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface Props {
|
|
5
5
|
title: string;
|
|
6
6
|
disableBorder?: boolean;
|
|
7
7
|
isOpen?: boolean;
|
|
8
8
|
children: Snippet;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
let {
|
|
12
|
-
title,
|
|
13
|
-
disableBorder = false,
|
|
14
|
-
isOpen = $bindable(false),
|
|
15
|
-
children
|
|
16
|
-
}: AccordionProps = $props();
|
|
11
|
+
let { title, disableBorder = false, isOpen = $bindable(false), children }: Props = $props();
|
|
17
12
|
|
|
18
13
|
const toggleAccordion = () => {
|
|
19
14
|
isOpen = !isOpen;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
interface
|
|
2
|
+
interface Props {
|
|
3
3
|
title: string;
|
|
4
4
|
disableBorder?: boolean;
|
|
5
5
|
isOpen?: boolean;
|
|
6
6
|
children: Snippet;
|
|
7
7
|
}
|
|
8
|
-
declare const Accordion: import("svelte").Component<
|
|
8
|
+
declare const Accordion: import("svelte").Component<Props, {}, "isOpen">;
|
|
9
9
|
type Accordion = ReturnType<typeof Accordion>;
|
|
10
10
|
export default Accordion;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
type BackgroundColor = '#472AFF' | '#25282D';
|
|
3
3
|
type TextColor = '#333840' | '#FFFFFF';
|
|
4
4
|
|
|
5
|
-
interface
|
|
5
|
+
interface Props {
|
|
6
6
|
text: string;
|
|
7
7
|
backgroundColor?: BackgroundColor;
|
|
8
8
|
textColor?: TextColor;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
backgroundColor = '#25282D',
|
|
15
15
|
textColor = '#FFFFFF',
|
|
16
16
|
keepOrder = false
|
|
17
|
-
}:
|
|
17
|
+
}: Props = $props();
|
|
18
18
|
|
|
19
19
|
const avatarSrc = (text: string): string => {
|
|
20
20
|
const defaultValue = 'SO';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
type BackgroundColor = '#472AFF' | '#25282D';
|
|
2
2
|
type TextColor = '#333840' | '#FFFFFF';
|
|
3
|
-
interface
|
|
3
|
+
interface Props {
|
|
4
4
|
text: string;
|
|
5
5
|
backgroundColor?: BackgroundColor;
|
|
6
6
|
textColor?: TextColor;
|
|
7
7
|
keepOrder?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare const Avatar: import("svelte").Component<
|
|
9
|
+
declare const Avatar: import("svelte").Component<Props, {}, "">;
|
|
10
10
|
type Avatar = ReturnType<typeof Avatar>;
|
|
11
11
|
export default Avatar;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type Variant = 'primary' | 'secondary' | 'outline' | 'outline-none';
|
|
7
7
|
type VariantColor = 'primary' | 'danger';
|
|
8
8
|
|
|
9
|
-
interface
|
|
9
|
+
interface Props extends HTMLButtonAttributes {
|
|
10
10
|
variant?: Variant;
|
|
11
11
|
variantColor?: VariantColor;
|
|
12
12
|
loading?: boolean;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
disabled = false,
|
|
21
21
|
children,
|
|
22
22
|
...props
|
|
23
|
-
}:
|
|
23
|
+
}: Props = $props();
|
|
24
24
|
|
|
25
25
|
const clearButtonFocus: Attachment<HTMLButtonElement> = (element: HTMLButtonElement) => {
|
|
26
26
|
if (loading) element.blur();
|
|
@@ -2,12 +2,12 @@ import type { Snippet } from 'svelte';
|
|
|
2
2
|
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
3
3
|
type Variant = 'primary' | 'secondary' | 'outline' | 'outline-none';
|
|
4
4
|
type VariantColor = 'primary' | 'danger';
|
|
5
|
-
interface
|
|
5
|
+
interface Props extends HTMLButtonAttributes {
|
|
6
6
|
variant?: Variant;
|
|
7
7
|
variantColor?: VariantColor;
|
|
8
8
|
loading?: boolean;
|
|
9
9
|
children: Snippet;
|
|
10
10
|
}
|
|
11
|
-
declare const Button: import("svelte").Component<
|
|
11
|
+
declare const Button: import("svelte").Component<Props, {}, "">;
|
|
12
12
|
type Button = ReturnType<typeof Button>;
|
|
13
13
|
export default Button;
|
package/dist/Card/Card.svelte
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface Props {
|
|
5
5
|
children?: Snippet;
|
|
6
6
|
disablePadding?: boolean;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
let { children, disablePadding = false }:
|
|
9
|
+
let { children, disablePadding = false }: Props = $props();
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<div class={['card', !disablePadding && 'padding']}>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
|
-
interface
|
|
2
|
+
interface Props {
|
|
3
3
|
children?: Snippet;
|
|
4
4
|
disablePadding?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const Card: import("svelte").Component<
|
|
6
|
+
declare const Card: import("svelte").Component<Props, {}, "">;
|
|
7
7
|
type Card = ReturnType<typeof Card>;
|
|
8
8
|
export default Card;
|
package/dist/Chips/Chips.svelte
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { ChipType } from './
|
|
2
|
+
import { ChipType } from './enums.js';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface Props {
|
|
5
5
|
type?: ChipType;
|
|
6
6
|
text?: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
let { type = ChipType.Info, text = type.charAt(0).toUpperCase() + type.slice(1) }:
|
|
9
|
+
let { type = ChipType.Info, text = type.charAt(0).toUpperCase() + type.slice(1) }: Props =
|
|
10
10
|
$props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ChipType } from './
|
|
2
|
-
interface
|
|
1
|
+
import { ChipType } from './enums.js';
|
|
2
|
+
interface Props {
|
|
3
3
|
type?: ChipType;
|
|
4
4
|
text?: string;
|
|
5
5
|
}
|
|
6
|
-
declare const Chips: import("svelte").Component<
|
|
6
|
+
declare const Chips: import("svelte").Component<Props, {}, "">;
|
|
7
7
|
type Chips = ReturnType<typeof Chips>;
|
|
8
8
|
export default Chips;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Attachment } from 'svelte/attachments';
|
|
3
3
|
|
|
4
|
-
import type { LabelProps } from '../Label/
|
|
4
|
+
import type { LabelProps } from '../Label/types.js';
|
|
5
5
|
import { Label, Notification } from '../../index.js';
|
|
6
6
|
import FileManager from './FileManager.svelte';
|
|
7
7
|
import Warnings from './Warnings.svelte';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface Props {
|
|
2
2
|
validationMessages: string[];
|
|
3
3
|
}
|
|
4
|
-
declare const Warnings: import("svelte").Component<
|
|
4
|
+
declare const Warnings: import("svelte").Component<Props, {}, "">;
|
|
5
5
|
type Warnings = ReturnType<typeof Warnings>;
|
|
6
6
|
export default Warnings;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
3
3
|
|
|
4
4
|
import Label from '../Label/Label.svelte';
|
|
5
|
-
import type { LabelProps } from '../Label/
|
|
5
|
+
import type { LabelProps } from '../Label/types.js';
|
|
6
6
|
import InputIcon from './InputIcon.svelte';
|
|
7
7
|
|
|
8
8
|
type InputType = 'text' | 'password' | 'number' | 'date' | 'money';
|
|
9
9
|
|
|
10
|
-
interface
|
|
10
|
+
interface Props extends Omit<HTMLInputAttributes, 'type' | 'value'>, LabelProps {
|
|
11
11
|
type?: InputType;
|
|
12
12
|
value?: string | number | null;
|
|
13
13
|
error?: string | string[];
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
disableValidationColor = false,
|
|
32
32
|
infoTooltip,
|
|
33
33
|
...props
|
|
34
|
-
}:
|
|
34
|
+
}: Props = $props();
|
|
35
35
|
|
|
36
36
|
let isPasswordVisible = $state(false);
|
|
37
37
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
|
-
import type { LabelProps } from '../Label/
|
|
2
|
+
import type { LabelProps } from '../Label/types.js';
|
|
3
3
|
type InputType = 'text' | 'password' | 'number' | 'date' | 'money';
|
|
4
|
-
interface
|
|
4
|
+
interface Props extends Omit<HTMLInputAttributes, 'type' | 'value'>, LabelProps {
|
|
5
5
|
type?: InputType;
|
|
6
6
|
value?: string | number | null;
|
|
7
7
|
error?: string | string[];
|
|
@@ -9,6 +9,6 @@ interface InputProps extends Omit<HTMLInputAttributes, 'type' | 'value'>, LabelP
|
|
|
9
9
|
currency?: string;
|
|
10
10
|
disableValidationColor?: boolean;
|
|
11
11
|
}
|
|
12
|
-
declare const Input: import("svelte").Component<
|
|
12
|
+
declare const Input: import("svelte").Component<Props, {}, "value">;
|
|
13
13
|
type Input = ReturnType<typeof Input>;
|
|
14
14
|
export default Input;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Label from '../Label/Label.svelte';
|
|
3
|
-
import type { LabelProps } from '../Label/
|
|
4
|
-
import type { OptionValueType, RadioOption } from './
|
|
3
|
+
import type { LabelProps } from '../Label/types.js';
|
|
4
|
+
import type { OptionValueType, RadioOption } from './types.js';
|
|
5
5
|
|
|
6
|
-
interface
|
|
6
|
+
interface Props extends LabelProps {
|
|
7
7
|
options: string[] | RadioOption[];
|
|
8
8
|
name: string;
|
|
9
9
|
value?: OptionValueType;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
row = false,
|
|
26
26
|
description,
|
|
27
27
|
onchange
|
|
28
|
-
}:
|
|
28
|
+
}: Props = $props();
|
|
29
29
|
|
|
30
30
|
const isStringArray = (items: string[] | RadioOption[]): items is string[] =>
|
|
31
31
|
typeof items[0] === 'string';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { LabelProps } from '../Label/
|
|
2
|
-
import type { OptionValueType, RadioOption } from './
|
|
3
|
-
interface
|
|
1
|
+
import type { LabelProps } from '../Label/types.js';
|
|
2
|
+
import type { OptionValueType, RadioOption } from './types.js';
|
|
3
|
+
interface Props extends LabelProps {
|
|
4
4
|
options: string[] | RadioOption[];
|
|
5
5
|
name: string;
|
|
6
6
|
value?: OptionValueType;
|
|
@@ -9,6 +9,6 @@ interface RadioGroupProps extends LabelProps {
|
|
|
9
9
|
description?: string;
|
|
10
10
|
onchange?: (value: OptionValueType) => void;
|
|
11
11
|
}
|
|
12
|
-
declare const RadioGroup: import("svelte").Component<
|
|
12
|
+
declare const RadioGroup: import("svelte").Component<Props, {}, "value">;
|
|
13
13
|
type RadioGroup = ReturnType<typeof RadioGroup>;
|
|
14
14
|
export default RadioGroup;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import { Search, type SelectOption } from '../../index.js';
|
|
7
7
|
import Label from '../Label/Label.svelte';
|
|
8
|
-
import type { LabelProps } from '../Label/
|
|
8
|
+
import type { LabelProps } from '../Label/types.js';
|
|
9
9
|
|
|
10
|
-
interface
|
|
10
|
+
interface Props extends LabelProps {
|
|
11
11
|
options: string[] | SelectOption[];
|
|
12
12
|
placeholder?: string;
|
|
13
13
|
searchable?: boolean;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
customOption,
|
|
50
50
|
onclear,
|
|
51
51
|
onchange
|
|
52
|
-
}:
|
|
52
|
+
}: Props = $props();
|
|
53
53
|
|
|
54
54
|
let searchText = $state('');
|
|
55
55
|
let showListOptions = $state(false);
|
|
@@ -107,6 +107,11 @@
|
|
|
107
107
|
: originalOptions.filter((option) => option.label.toLowerCase().includes(text));
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
+
const focusInput: Attachment<HTMLElement> = () => {
|
|
111
|
+
const searchElement = document.getElementById('search-options') as HTMLInputElement;
|
|
112
|
+
searchElement.focus();
|
|
113
|
+
};
|
|
114
|
+
|
|
110
115
|
const activeOptionScroll: Action<HTMLElement, boolean> = (node, isActive) => {
|
|
111
116
|
$effect(() => {
|
|
112
117
|
if (isActive) {
|
|
@@ -196,7 +201,11 @@
|
|
|
196
201
|
|
|
197
202
|
const onClearSearch = () => (searchText = '');
|
|
198
203
|
|
|
199
|
-
const onFocusDropdownContainer = () =>
|
|
204
|
+
const onFocusDropdownContainer = (event: Event) => {
|
|
205
|
+
event.stopPropagation();
|
|
206
|
+
showListOptions = true;
|
|
207
|
+
dropdownContainer.focus();
|
|
208
|
+
};
|
|
200
209
|
|
|
201
210
|
const onToggleListOptions = () => (showListOptions = !showListOptions);
|
|
202
211
|
|
|
@@ -275,12 +284,15 @@
|
|
|
275
284
|
{@attach autoDirection}
|
|
276
285
|
>
|
|
277
286
|
{#if searchable && !noOptionsAvailable}
|
|
278
|
-
<
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
287
|
+
<div {@attach focusInput}>
|
|
288
|
+
<Search
|
|
289
|
+
id="search-options"
|
|
290
|
+
placeholder="Search"
|
|
291
|
+
bind:value={searchText}
|
|
292
|
+
onclear={onClearSearch}
|
|
293
|
+
autocomplete="off"
|
|
294
|
+
/>
|
|
295
|
+
</div>
|
|
284
296
|
{/if}
|
|
285
297
|
|
|
286
298
|
{#if noOptionsAvailable || !filteredOptions.length}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
2
|
import { type SelectOption } from '../../index.js';
|
|
3
|
-
import type { LabelProps } from '../Label/
|
|
4
|
-
interface
|
|
3
|
+
import type { LabelProps } from '../Label/types.js';
|
|
4
|
+
interface Props extends LabelProps {
|
|
5
5
|
options: string[] | SelectOption[];
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
searchable?: boolean;
|
|
@@ -20,6 +20,6 @@ interface SelectProps extends LabelProps {
|
|
|
20
20
|
onclear?: () => void;
|
|
21
21
|
onchange?: (option: SelectOption) => void;
|
|
22
22
|
}
|
|
23
|
-
declare const Select: import("svelte").Component<
|
|
23
|
+
declare const Select: import("svelte").Component<Props, {}, "value">;
|
|
24
24
|
type Select = ReturnType<typeof Select>;
|
|
25
25
|
export default Select;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
|
3
3
|
|
|
4
|
-
import type { LabelProps } from '../Label/labelState.svelte.js';
|
|
5
4
|
import Label from '../Label/Label.svelte';
|
|
5
|
+
import type { LabelProps } from '../Label/types.js';
|
|
6
6
|
|
|
7
|
-
interface
|
|
7
|
+
interface Props extends Omit<HTMLTextareaAttributes, 'value'>, LabelProps {
|
|
8
8
|
value?: string | null;
|
|
9
9
|
error?: string | string[];
|
|
10
10
|
description?: string;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
infoTooltip,
|
|
27
27
|
disableValidationColor = false,
|
|
28
28
|
...props
|
|
29
|
-
}:
|
|
29
|
+
}: Props = $props();
|
|
30
30
|
|
|
31
31
|
const componentId = $props.id();
|
|
32
32
|
const textareaId = id || componentId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
|
2
|
-
import type { LabelProps } from '../Label/
|
|
3
|
-
interface
|
|
2
|
+
import type { LabelProps } from '../Label/types.js';
|
|
3
|
+
interface Props extends Omit<HTMLTextareaAttributes, 'value'>, LabelProps {
|
|
4
4
|
value?: string | null;
|
|
5
5
|
error?: string | string[];
|
|
6
6
|
description?: string;
|
|
@@ -8,6 +8,6 @@ interface TextAreaProps extends Omit<HTMLTextareaAttributes, 'value'>, LabelProp
|
|
|
8
8
|
resize?: boolean;
|
|
9
9
|
disableValidationColor?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare const TextArea: import("svelte").Component<
|
|
11
|
+
declare const TextArea: import("svelte").Component<Props, {}, "value">;
|
|
12
12
|
type TextArea = ReturnType<typeof TextArea>;
|
|
13
13
|
export default TextArea;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import Label from '../Label/Label.svelte';
|
|
3
|
-
import type { LabelProps } from '../Label/
|
|
3
|
+
import type { LabelProps } from '../Label/types.js';
|
|
4
4
|
|
|
5
|
-
interface
|
|
5
|
+
interface Props extends Pick<LabelProps, 'id' | 'label' | 'infoTooltip'> {
|
|
6
6
|
checked?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
vertical?: boolean;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
infoTooltip,
|
|
18
18
|
vertical,
|
|
19
19
|
onchange
|
|
20
|
-
}:
|
|
20
|
+
}: Props = $props();
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<div class="container" class:vertical>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { LabelProps } from '../Label/
|
|
2
|
-
interface
|
|
1
|
+
import type { LabelProps } from '../Label/types.js';
|
|
2
|
+
interface Props extends Pick<LabelProps, 'id' | 'label' | 'infoTooltip'> {
|
|
3
3
|
checked?: boolean;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
vertical?: boolean;
|
|
6
6
|
onchange?: (event: Event) => void;
|
|
7
7
|
}
|
|
8
|
-
declare const Toggle: import("svelte").Component<
|
|
8
|
+
declare const Toggle: import("svelte").Component<Props, {}, "checked">;
|
|
9
9
|
type Toggle = ReturnType<typeof Toggle>;
|
|
10
10
|
export default Toggle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Button, Input, Modal, Spinner, addToast } from '../index.js';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface Props {
|
|
5
5
|
confirmationName?: string;
|
|
6
6
|
enableDoubleConfirmation?: boolean;
|
|
7
7
|
showModal?: boolean;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
showModal = $bindable(false),
|
|
16
16
|
ondelete,
|
|
17
17
|
onclose
|
|
18
|
-
}:
|
|
18
|
+
}: Props = $props();
|
|
19
19
|
|
|
20
20
|
let confirmationText = $derived(
|
|
21
21
|
`Are you sure you want to delete ${confirmationName || 'this item'}?`
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface Props {
|
|
2
2
|
confirmationName?: string;
|
|
3
3
|
enableDoubleConfirmation?: boolean;
|
|
4
4
|
showModal?: boolean;
|
|
5
5
|
ondelete: () => Promise<string | void> | string | void;
|
|
6
6
|
onclose?: VoidFunction;
|
|
7
7
|
}
|
|
8
|
-
declare const DeleteConfirmation: import("svelte").Component<
|
|
8
|
+
declare const DeleteConfirmation: import("svelte").Component<Props, {}, "showModal">;
|
|
9
9
|
type DeleteConfirmation = ReturnType<typeof DeleteConfirmation>;
|
|
10
10
|
export default DeleteConfirmation;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import FeedbackIcon from '../assets/icons/feedback.svg';
|
|
6
6
|
import { Button } from '../index.js';
|
|
7
7
|
|
|
8
|
-
interface
|
|
8
|
+
interface Props {
|
|
9
9
|
status: number;
|
|
10
10
|
title?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
let { status, title }:
|
|
13
|
+
let { status, title }: Props = $props();
|
|
14
14
|
|
|
15
15
|
const errorTitle: Record<number, string> = {
|
|
16
16
|
[404]: 'Page not found',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface Props {
|
|
2
2
|
status: number;
|
|
3
3
|
title?: string;
|
|
4
4
|
}
|
|
5
|
-
declare const ErrorPage: import("svelte").Component<
|
|
5
|
+
declare const ErrorPage: import("svelte").Component<Props, {}, "">;
|
|
6
6
|
type ErrorPage = ReturnType<typeof ErrorPage>;
|
|
7
7
|
export default ErrorPage;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
interface
|
|
2
|
+
interface Props {
|
|
3
3
|
homeUrl?: string;
|
|
4
4
|
logoUrl?: string;
|
|
5
5
|
documentationUrl?: string;
|
|
6
6
|
}
|
|
7
|
+
|
|
7
8
|
let {
|
|
8
9
|
homeUrl = '/',
|
|
9
10
|
logoUrl = '/softwareone-logo-white.svg',
|
|
10
11
|
documentationUrl = 'https://softwareone-internal.atlassian.net/wiki/spaces/ATM/pages/17961910574/Services+Portal+BackOffice'
|
|
11
|
-
}:
|
|
12
|
+
}: Props = $props();
|
|
12
13
|
</script>
|
|
13
14
|
|
|
14
15
|
<footer class="footer-section">
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface Props {
|
|
2
2
|
homeUrl?: string;
|
|
3
3
|
logoUrl?: string;
|
|
4
4
|
documentationUrl?: string;
|
|
5
5
|
}
|
|
6
|
-
declare const Footer: import("svelte").Component<
|
|
6
|
+
declare const Footer: import("svelte").Component<Props, {}, "">;
|
|
7
7
|
type Footer = ReturnType<typeof Footer>;
|
|
8
8
|
export default Footer;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import Announcement from '../Announcement/Announcement.svelte';
|
|
4
4
|
import Menu from '../Menu/Menu.svelte';
|
|
5
5
|
import Waffle from '../Waffle/Waffle.svelte';
|
|
6
|
-
import type { WaffleItem } from '../Waffle/
|
|
6
|
+
import type { WaffleItem } from '../Waffle/types.js';
|
|
7
7
|
import HeaderAccount from './HeaderAccount.svelte';
|
|
8
8
|
import HeaderLoader from './HeaderLoader.svelte';
|
|
9
9
|
import HeaderLogo from './HeaderLogo.svelte';
|
|
10
10
|
|
|
11
|
-
interface
|
|
11
|
+
interface Props {
|
|
12
12
|
title?: string;
|
|
13
13
|
homeUrl?: string;
|
|
14
14
|
hideAccount?: boolean;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
profileMenuItems,
|
|
39
39
|
announcementItems,
|
|
40
40
|
onreadannouncementitems
|
|
41
|
-
}:
|
|
41
|
+
}: Props = $props();
|
|
42
42
|
|
|
43
43
|
let showWaffle = $state(false);
|
|
44
44
|
let showMenu = $state(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnnouncementItem, MenuItem } from '../index.js';
|
|
2
|
-
import type { WaffleItem } from '../Waffle/
|
|
3
|
-
interface
|
|
2
|
+
import type { WaffleItem } from '../Waffle/types.js';
|
|
3
|
+
interface Props {
|
|
4
4
|
title?: string;
|
|
5
5
|
homeUrl?: string;
|
|
6
6
|
hideAccount?: boolean;
|
|
@@ -15,6 +15,6 @@ interface HeaderProps {
|
|
|
15
15
|
announcementItems?: AnnouncementItem[];
|
|
16
16
|
onreadannouncementitems?: VoidFunction;
|
|
17
17
|
}
|
|
18
|
-
declare const Header: import("svelte").Component<
|
|
18
|
+
declare const Header: import("svelte").Component<Props, {}, "">;
|
|
19
19
|
type Header = ReturnType<typeof Header>;
|
|
20
20
|
export default Header;
|