@softwareone/spi-sv5-library 0.1.3 → 1.0.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/dist/Avatar/Avatar.svelte +33 -0
- package/dist/Avatar/Avatar.svelte.d.ts +10 -0
- package/dist/Breadcrumbs/Breadcrumbs.svelte +10 -20
- package/dist/Button/Button.svelte +59 -119
- package/dist/Button/Button.svelte.d.ts +8 -6
- package/dist/Card/Card.svelte +18 -44
- package/dist/Card/Card.svelte.d.ts +1 -1
- package/dist/Chips/Chips.svelte +25 -28
- package/dist/Chips/Chips.svelte.d.ts +2 -1
- package/dist/Chips/chipsState.svelte.d.ts +7 -0
- package/dist/Chips/chipsState.svelte.js +8 -0
- package/dist/ErrorPage/ErrorPage.svelte +98 -0
- package/dist/ErrorPage/ErrorPage.svelte.d.ts +8 -0
- package/dist/Footer/Footer.svelte +29 -135
- package/dist/Footer/Footer.svelte.d.ts +1 -1
- package/dist/Form/Input/Input.svelte +398 -0
- package/dist/Form/Input/Input.svelte.d.ts +14 -0
- package/dist/Form/Input/InputIcon.svelte +97 -0
- package/dist/Form/Input/InputIcon.svelte.d.ts +9 -0
- package/dist/Form/TextArea/TextArea.svelte +258 -0
- package/dist/Form/TextArea/TextArea.svelte.d.ts +13 -0
- package/dist/Form/Toggle/Toggle.svelte +120 -0
- package/dist/{Toggle → Form/Toggle}/Toggle.svelte.d.ts +4 -3
- package/dist/Header/Header.svelte +55 -133
- package/dist/Header/Header.svelte.d.ts +2 -1
- package/dist/Header/HeaderAccount.svelte +6 -29
- package/dist/HighlightPanel/HighlightPanel.svelte +125 -0
- package/dist/HighlightPanel/HighlightPanel.svelte.d.ts +10 -0
- package/dist/HighlightPanel/highlightPanelState.svelte.d.ts +35 -0
- package/dist/HighlightPanel/highlightPanelState.svelte.js +13 -0
- package/dist/Menu/Menu.svelte +158 -0
- package/dist/Menu/Menu.svelte.d.ts +8 -0
- package/dist/Menu/MenuItem.svelte +153 -0
- package/dist/Menu/MenuItem.svelte.d.ts +11 -0
- package/dist/Menu/Sidebar.svelte +228 -0
- package/dist/Menu/Sidebar.svelte.d.ts +11 -0
- package/dist/Menu/SidebarState.svelte.d.ts +6 -0
- package/dist/Menu/SidebarState.svelte.js +1 -0
- package/dist/Modal/Modal.svelte +2 -3
- package/dist/Modal/ModalContent.svelte +11 -18
- package/dist/Modal/ModalFooter.svelte +10 -14
- package/dist/Modal/ModalHeader.svelte +7 -9
- package/dist/ProgressWizard/ProgressWizard.svelte +19 -34
- package/dist/Tabs/Tabs.svelte +111 -0
- package/dist/Tabs/Tabs.svelte.d.ts +8 -0
- package/dist/Tabs/tabsState.svelte.d.ts +7 -0
- package/dist/Tabs/tabsState.svelte.js +1 -0
- package/dist/Toast/Toast.svelte +7 -12
- package/dist/Tooltip/Tooltip.svelte +168 -0
- package/dist/Tooltip/Tooltip.svelte.d.ts +13 -0
- package/dist/assets/icons/feedback.svg +5 -0
- package/dist/index.d.ts +25 -8
- package/dist/index.js +23 -9
- package/package.json +2 -1
- package/dist/Toggle/Toggle.svelte +0 -170
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StatusCodes } from 'http-status-codes';
|
|
2
|
+
interface ErrorPageProps {
|
|
3
|
+
status: StatusCodes;
|
|
4
|
+
title?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const ErrorPage: import("svelte").Component<ErrorPageProps, {}, "">;
|
|
7
|
+
type ErrorPage = ReturnType<typeof ErrorPage>;
|
|
8
|
+
export default ErrorPage;
|
|
@@ -1,162 +1,56 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
interface FooterProps {
|
|
3
|
-
|
|
3
|
+
homeUrl?: string;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
let { isInternal }: FooterProps = $props();
|
|
7
|
-
|
|
8
|
-
isInternal = isInternal ?? false;
|
|
5
|
+
let { homeUrl = '/' }: FooterProps = $props();
|
|
9
6
|
</script>
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<article class="footer-links">
|
|
26
|
-
<div class="footer-link">Privacy Supplement - Cloud Control Platform</div>
|
|
27
|
-
<div class="footer-link">© 2024 SoftwareOne. All rights reserved</div>
|
|
28
|
-
</article>
|
|
29
|
-
</section>
|
|
30
|
-
{:else}
|
|
31
|
-
<div class="logo-legal-section">
|
|
32
|
-
<div class="logo">
|
|
33
|
-
<div class="powered-by">Powered by</div>
|
|
34
|
-
<div class="software-one">
|
|
35
|
-
<svg
|
|
36
|
-
width="120"
|
|
37
|
-
height="43"
|
|
38
|
-
viewBox="0 0 120 43"
|
|
39
|
-
fill="none"
|
|
40
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
<div class="footer-section">
|
|
9
|
+
<a href={homeUrl} title="Home">
|
|
10
|
+
<img alt="SoftwareOne logo" class="logo-image" src="/softwareone-logo-white.svg" />
|
|
11
|
+
</a>
|
|
12
|
+
<ul class="links">
|
|
13
|
+
<li>
|
|
14
|
+
<a href="mailto:support@softwareone.com" title="support@softwareone.com">Support</a>
|
|
15
|
+
</li>
|
|
16
|
+
<li>
|
|
17
|
+
<a
|
|
18
|
+
href="https://softwareone.atlassian.net/wiki/spaces/MA/pages/4642996240/GDAP+Manual"
|
|
19
|
+
title="GDAP Manual"
|
|
20
|
+
target="_blank"
|
|
21
|
+
rel="noopener noreferrer">Documentation</a
|
|
41
22
|
>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
fill="white"
|
|
49
|
-
/>
|
|
50
|
-
</svg>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
<div class="legal">
|
|
54
|
-
<div class="legal-text">
|
|
55
|
-
SoftwareONE is a trademark of SoftwareONE, Inc. "The Software Licensing Experts" is a
|
|
56
|
-
service mark of SoftwareONE, Inc. VAR assist is a trademark of SoftwareONE, Inc. "It pays to
|
|
57
|
-
partner" is a service mark of SoftwareONE, Incorporated. All other trademarks, service marks
|
|
58
|
-
or trade names appearing herein are the property of their respective owners.
|
|
59
|
-
</div>
|
|
60
|
-
<div class="legal-text">Privacy Statement | Terms of Service</div>
|
|
61
|
-
</div>
|
|
23
|
+
</li>
|
|
24
|
+
</ul>
|
|
25
|
+
<ul class="legal">
|
|
26
|
+
<li>Privacy Supplement - Cloud Control Platform</li>
|
|
27
|
+
<li>© 2025 SoftwareOne. All rights reserved</li>
|
|
28
|
+
</ul>
|
|
62
29
|
</div>
|
|
63
|
-
{/if}
|
|
64
30
|
|
|
65
31
|
<style>
|
|
66
|
-
/* Footer sticks to the bottom */
|
|
67
32
|
.footer-section {
|
|
68
33
|
background-color: #25282d;
|
|
69
34
|
display: flex;
|
|
70
|
-
flex-direction: row;
|
|
71
35
|
gap: 96px;
|
|
72
36
|
align-items: center;
|
|
73
37
|
justify-content: center;
|
|
74
38
|
padding: 24px;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.footer-logo {
|
|
78
|
-
display: flex;
|
|
79
|
-
justify-content: center;
|
|
39
|
+
color: white;
|
|
80
40
|
}
|
|
81
41
|
|
|
82
42
|
.logo-image {
|
|
83
43
|
width: 192px;
|
|
84
44
|
}
|
|
85
45
|
|
|
86
|
-
.footer-links
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
font-family: 'Haas Grotesk Display Pro', sans-serif;
|
|
92
|
-
font-size: 16px;
|
|
93
|
-
font-weight: 400;
|
|
94
|
-
color: white;
|
|
95
|
-
padding-bottom: 4px;
|
|
96
|
-
text-decoration: none;
|
|
46
|
+
.footer-section .links,
|
|
47
|
+
.footer-section .legal {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
gap: 4px;
|
|
97
51
|
}
|
|
98
52
|
|
|
99
|
-
.footer-
|
|
100
|
-
color: #fff;
|
|
101
|
-
cursor: pointer;
|
|
53
|
+
.footer-section a:hover {
|
|
102
54
|
text-decoration: underline;
|
|
103
55
|
}
|
|
104
|
-
|
|
105
|
-
.logo-legal-section {
|
|
106
|
-
display: inline-flex;
|
|
107
|
-
height: 118.35px;
|
|
108
|
-
width: 100%;
|
|
109
|
-
align-items: center;
|
|
110
|
-
justify-content: space-between;
|
|
111
|
-
padding: 10px 20px;
|
|
112
|
-
position: absolute;
|
|
113
|
-
bottom: 0;
|
|
114
|
-
left: 0;
|
|
115
|
-
margin-left:24px;
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.legal-text {
|
|
120
|
-
font-size: 12px;
|
|
121
|
-
color: #6b7180;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.logo-legal-section {
|
|
125
|
-
display: inline-flex;
|
|
126
|
-
height: 118.35px;
|
|
127
|
-
width: 1440px;
|
|
128
|
-
align-items: center;
|
|
129
|
-
justify-content: start;
|
|
130
|
-
gap: 20px;
|
|
131
|
-
padding: 6px;
|
|
132
|
-
}
|
|
133
|
-
.logo {
|
|
134
|
-
display: inline-flex;
|
|
135
|
-
flex-direction: column;
|
|
136
|
-
align-items: start;
|
|
137
|
-
justify-content: start;
|
|
138
|
-
gap: 2px;
|
|
139
|
-
}
|
|
140
|
-
.powered-by {
|
|
141
|
-
font-family: 'Haas Grot Text', sans-serif;
|
|
142
|
-
font-size: 14px;
|
|
143
|
-
font-weight: 500;
|
|
144
|
-
line-height: 1.5;
|
|
145
|
-
color: #6b7180;
|
|
146
|
-
}
|
|
147
|
-
.legal {
|
|
148
|
-
display: inline-flex;
|
|
149
|
-
flex-grow: 1;
|
|
150
|
-
flex-direction: column;
|
|
151
|
-
align-items: start;
|
|
152
|
-
justify-content: start;
|
|
153
|
-
gap: 2px;
|
|
154
|
-
}
|
|
155
|
-
.legal-text {
|
|
156
|
-
font-family: 'Haas Grot Text', sans-serif;
|
|
157
|
-
width: 100%;
|
|
158
|
-
font-size: 12px;
|
|
159
|
-
font-weight: 500;
|
|
160
|
-
color: #6b7180;
|
|
161
|
-
}
|
|
162
56
|
</style>
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
3
|
+
import InputIcon from './InputIcon.svelte';
|
|
4
|
+
|
|
5
|
+
type InputType = 'text' | 'password' | 'number' | 'date' | 'money';
|
|
6
|
+
|
|
7
|
+
interface InputProps extends Omit<HTMLInputAttributes, 'type' | 'value'> {
|
|
8
|
+
label?: string;
|
|
9
|
+
type?: InputType;
|
|
10
|
+
value?: string | number;
|
|
11
|
+
optional?: boolean;
|
|
12
|
+
error?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
currency?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
label,
|
|
19
|
+
type = 'text',
|
|
20
|
+
value = $bindable(''),
|
|
21
|
+
optional = false,
|
|
22
|
+
error,
|
|
23
|
+
description,
|
|
24
|
+
currency,
|
|
25
|
+
id,
|
|
26
|
+
disabled,
|
|
27
|
+
readonly,
|
|
28
|
+
required,
|
|
29
|
+
oninput,
|
|
30
|
+
...props
|
|
31
|
+
}: InputProps = $props();
|
|
32
|
+
|
|
33
|
+
let isPasswordVisible = $state(false);
|
|
34
|
+
|
|
35
|
+
const componentId = $props.id();
|
|
36
|
+
const inputId = id || componentId;
|
|
37
|
+
|
|
38
|
+
const isInvalid = $derived(!!error);
|
|
39
|
+
const isValid = $derived(!isInvalid && (!!value || optional));
|
|
40
|
+
const hasStatus = $derived(isInvalid || isValid);
|
|
41
|
+
const showIcon = $derived(hasStatus || ['password', 'money'].includes(type));
|
|
42
|
+
const showDatePicker = $derived(type === 'date');
|
|
43
|
+
|
|
44
|
+
const transformationType = $derived<Record<string, string>>({
|
|
45
|
+
money: 'number',
|
|
46
|
+
password: isPasswordVisible ? 'text' : 'password'
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const handleInput = (event: Event): void => {
|
|
50
|
+
const target = event.target as HTMLInputElement;
|
|
51
|
+
value = type === 'number' || type === 'money' ? target.valueAsNumber : target.value;
|
|
52
|
+
oninput?.(event as Event & { currentTarget: EventTarget & HTMLInputElement });
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<div class="form-container">
|
|
57
|
+
{#if label}
|
|
58
|
+
<div class="form-label-container">
|
|
59
|
+
<label for={inputId}>{label}</label>
|
|
60
|
+
{#if required}
|
|
61
|
+
<span class="form-label-required">Required</span>
|
|
62
|
+
{:else if optional}
|
|
63
|
+
<span class="form-label-optional">Optional</span>
|
|
64
|
+
{/if}
|
|
65
|
+
</div>
|
|
66
|
+
{/if}
|
|
67
|
+
|
|
68
|
+
<div
|
|
69
|
+
class={[
|
|
70
|
+
'form-input-wrapper',
|
|
71
|
+
isInvalid && 'error',
|
|
72
|
+
isValid && 'success',
|
|
73
|
+
type === 'money' && currency && 'money-with-icon'
|
|
74
|
+
]}
|
|
75
|
+
>
|
|
76
|
+
<input
|
|
77
|
+
{...props}
|
|
78
|
+
id={inputId}
|
|
79
|
+
type={transformationType[type] ?? type}
|
|
80
|
+
{value}
|
|
81
|
+
{disabled}
|
|
82
|
+
{readonly}
|
|
83
|
+
class={[
|
|
84
|
+
'form-input',
|
|
85
|
+
disabled && 'form-input-disabled',
|
|
86
|
+
readonly && 'form-input-readonly',
|
|
87
|
+
(showIcon || showDatePicker) && 'form-input-with-icon',
|
|
88
|
+
showDatePicker && 'form-input-date'
|
|
89
|
+
]}
|
|
90
|
+
aria-invalid={isInvalid}
|
|
91
|
+
oninput={handleInput}
|
|
92
|
+
/>
|
|
93
|
+
|
|
94
|
+
{#if type === 'money' && currency}
|
|
95
|
+
<div class="form-input-currency">{currency}</div>
|
|
96
|
+
{/if}
|
|
97
|
+
|
|
98
|
+
{#if showIcon}
|
|
99
|
+
<div
|
|
100
|
+
class={[
|
|
101
|
+
'form-input-icon-container',
|
|
102
|
+
type === 'password' && hasStatus && 'form-input-icon-container-password'
|
|
103
|
+
]}
|
|
104
|
+
>
|
|
105
|
+
{#if hasStatus}
|
|
106
|
+
<InputIcon type={isInvalid ? 'error' : 'success'} isDateInput={showDatePicker} />
|
|
107
|
+
{/if}
|
|
108
|
+
|
|
109
|
+
{#if type === 'password'}
|
|
110
|
+
<InputIcon type="password" bind:isPasswordVisible />
|
|
111
|
+
{/if}
|
|
112
|
+
</div>
|
|
113
|
+
{/if}
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
{#if description}
|
|
117
|
+
<p class="form-message form-message-description">
|
|
118
|
+
{description}
|
|
119
|
+
</p>
|
|
120
|
+
{/if}
|
|
121
|
+
{#if isInvalid}
|
|
122
|
+
<p class="form-message form-message-error">
|
|
123
|
+
{error}
|
|
124
|
+
</p>
|
|
125
|
+
{/if}
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<style>
|
|
129
|
+
.form-container {
|
|
130
|
+
display: flex;
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
gap: 8px;
|
|
133
|
+
font-size: 14px;
|
|
134
|
+
line-height: 20px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.form-label-container {
|
|
138
|
+
display: flex;
|
|
139
|
+
gap: 8px;
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.form-label-optional {
|
|
144
|
+
color: #6b7180;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.form-label-required {
|
|
148
|
+
color: #dc2626;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.form-message {
|
|
152
|
+
font-size: 12px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.form-input-wrapper {
|
|
156
|
+
position: relative;
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
width: 100%;
|
|
160
|
+
border-radius: 8px;
|
|
161
|
+
border: 1px solid #6b7180;
|
|
162
|
+
background: #fff;
|
|
163
|
+
transition: all 0.2s ease-in-out;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.form-input-wrapper:hover:not(:has(.form-input:disabled)):not(:has(.form-input:read-only)),
|
|
167
|
+
.form-input-wrapper:focus-within {
|
|
168
|
+
border-color: #472aff;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.form-input-wrapper:focus-within,
|
|
172
|
+
.form-input-wrapper:not(.money-with-icon):not(.error):not(.success) .form-input:focus-visible {
|
|
173
|
+
box-shadow: 0px 0px 0px 3px rgba(149, 155, 255, 0.3);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.form-input-wrapper:not(.money-with-icon):not(.error):not(.success) .form-input:focus-visible {
|
|
177
|
+
outline: none;
|
|
178
|
+
border-color: #472aff;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.form-input {
|
|
182
|
+
font-size: 14px;
|
|
183
|
+
line-height: 20px;
|
|
184
|
+
display: flex;
|
|
185
|
+
width: 100%;
|
|
186
|
+
padding: 8px 16px;
|
|
187
|
+
align-items: center;
|
|
188
|
+
border: none;
|
|
189
|
+
border-radius: 8px;
|
|
190
|
+
color: #000;
|
|
191
|
+
transition: all 0.2s ease-in-out;
|
|
192
|
+
text-overflow: ellipsis;
|
|
193
|
+
white-space: nowrap;
|
|
194
|
+
overflow: hidden;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.form-input-with-icon {
|
|
198
|
+
padding-right: 52px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.form-input:focus {
|
|
202
|
+
outline: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.form-input-disabled {
|
|
206
|
+
background-color: #f3f4f6;
|
|
207
|
+
border-color: #d1d5db;
|
|
208
|
+
color: #6b7180;
|
|
209
|
+
cursor: not-allowed;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.form-input-readonly {
|
|
213
|
+
background-color: #f9fafb;
|
|
214
|
+
border-color: #d1d5db;
|
|
215
|
+
cursor: default;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.form-input-date {
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
position: relative;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.form-input-date::-webkit-calendar-picker-indicator {
|
|
224
|
+
opacity: 1;
|
|
225
|
+
cursor: pointer;
|
|
226
|
+
width: 20px;
|
|
227
|
+
height: 20px;
|
|
228
|
+
position: absolute;
|
|
229
|
+
right: 10px;
|
|
230
|
+
top: 50%;
|
|
231
|
+
transform: translateY(-50%);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.form-input-date::-moz-calendar-picker-indicator {
|
|
235
|
+
opacity: 1;
|
|
236
|
+
cursor: pointer;
|
|
237
|
+
width: 20px;
|
|
238
|
+
height: 20px;
|
|
239
|
+
position: absolute;
|
|
240
|
+
right: 12px;
|
|
241
|
+
top: 50%;
|
|
242
|
+
transform: translateY(-50%);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@-moz-document url-prefix() {
|
|
246
|
+
.form-input-date.form-input-with-icon {
|
|
247
|
+
padding-right: 10px;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.form-input-date.form-input-with-icon::-webkit-calendar-picker-indicator,
|
|
252
|
+
.form-input-date.form-input-with-icon::-moz-calendar-picker-indicator {
|
|
253
|
+
right: 40px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.form-input-date.form-input-with-icon::before {
|
|
257
|
+
content: '';
|
|
258
|
+
position: absolute;
|
|
259
|
+
right: 43px;
|
|
260
|
+
top: 0;
|
|
261
|
+
bottom: 0;
|
|
262
|
+
width: 1px;
|
|
263
|
+
background-color: #6b7180;
|
|
264
|
+
z-index: 1;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.form-input::placeholder,
|
|
268
|
+
.form-input:disabled::placeholder {
|
|
269
|
+
color: #6b7180;
|
|
270
|
+
opacity: 1;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.form-message-error {
|
|
274
|
+
color: #dc2626;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.form-message-description {
|
|
278
|
+
color: #6b7180;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.form-input-icon-container {
|
|
282
|
+
position: absolute;
|
|
283
|
+
right: 12px;
|
|
284
|
+
top: 50%;
|
|
285
|
+
transform: translateY(-50%);
|
|
286
|
+
display: flex;
|
|
287
|
+
align-items: center;
|
|
288
|
+
justify-content: center;
|
|
289
|
+
gap: 24px;
|
|
290
|
+
pointer-events: none;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.form-input-icon-container-password {
|
|
294
|
+
gap: 8px;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.form-input-wrapper:has(.form-input-icon-container-password) .form-input {
|
|
298
|
+
padding-right: 72px;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.form-input-icon-container :global(.form-input-icon) {
|
|
302
|
+
position: static;
|
|
303
|
+
transform: none;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.form-input-wrapper:not(.money-with-icon):not(.error):not(.success) .form-input:focus-visible {
|
|
307
|
+
outline: none;
|
|
308
|
+
border-color: #472aff;
|
|
309
|
+
box-shadow: 0px 0px 0px 3px rgba(149, 155, 255, 0.3);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.form-input-currency {
|
|
313
|
+
display: flex;
|
|
314
|
+
align-items: center;
|
|
315
|
+
padding: 0 10px 0 10px;
|
|
316
|
+
color: #000;
|
|
317
|
+
font-size: 12px;
|
|
318
|
+
font-weight: 400;
|
|
319
|
+
height: 100%;
|
|
320
|
+
flex-shrink: 0;
|
|
321
|
+
position: relative;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.form-input-currency::before {
|
|
325
|
+
content: '';
|
|
326
|
+
position: absolute;
|
|
327
|
+
left: 0;
|
|
328
|
+
top: -8px;
|
|
329
|
+
bottom: -8px;
|
|
330
|
+
width: 1px;
|
|
331
|
+
background-color: #6b7180;
|
|
332
|
+
z-index: 1;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.form-input-wrapper:focus-within {
|
|
336
|
+
border-color: #472aff;
|
|
337
|
+
box-shadow: 0px 0px 0px 3px rgba(149, 155, 255, 0.3);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.form-input-wrapper.error,
|
|
341
|
+
.form-input-wrapper.error:hover:not(:has(.form-input:disabled)):not(:has(.form-input:read-only)),
|
|
342
|
+
.form-input-wrapper.error:focus-within {
|
|
343
|
+
border-color: #dc2626;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.form-input-wrapper.error:focus-within {
|
|
347
|
+
box-shadow: 0px 0px 0px 3px rgba(220, 38, 38, 0.2);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.form-input-wrapper.success {
|
|
351
|
+
border-color: #008556;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.form-input-wrapper.success:hover:not(:has(.form-input:disabled)):not(:has(.form-input:read-only)),
|
|
355
|
+
.form-input-wrapper.success:focus-within {
|
|
356
|
+
border-color: #10b981;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.form-input-wrapper.success:focus-within {
|
|
360
|
+
box-shadow: 0px 0px 0px 3px rgba(16, 185, 129, 0.15);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.form-input-wrapper:has(.form-input-currency) .form-input-icon-container {
|
|
364
|
+
right: 50px;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.form-input-wrapper.money-with-icon .form-input-icon-container {
|
|
368
|
+
right: 55px;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
input::-webkit-outer-spin-button,
|
|
372
|
+
input::-webkit-inner-spin-button {
|
|
373
|
+
-webkit-appearance: none;
|
|
374
|
+
margin: 0;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
input[type='number'] {
|
|
378
|
+
appearance: textfield;
|
|
379
|
+
-moz-appearance: textfield;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
@media (prefers-contrast: high) {
|
|
383
|
+
.form-input {
|
|
384
|
+
border-width: 2px;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.form-input:focus {
|
|
388
|
+
outline: 2px solid;
|
|
389
|
+
outline-offset: 2px;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
@media (prefers-reduced-motion: reduce) {
|
|
394
|
+
.form-input {
|
|
395
|
+
transition: none;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
|
+
type InputType = 'text' | 'password' | 'number' | 'date' | 'money';
|
|
3
|
+
interface InputProps extends Omit<HTMLInputAttributes, 'type' | 'value'> {
|
|
4
|
+
label?: string;
|
|
5
|
+
type?: InputType;
|
|
6
|
+
value?: string | number;
|
|
7
|
+
optional?: boolean;
|
|
8
|
+
error?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
currency?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Input: import("svelte").Component<InputProps, {}, "value">;
|
|
13
|
+
type Input = ReturnType<typeof Input>;
|
|
14
|
+
export default Input;
|