mertani-web-toolkit 0.1.34 → 0.1.35
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/components/inputs/MultiSelectInput/MultiSelectInput.css +189 -0
- package/dist/components/inputs/MultiSelectInput/MultiSelectInput.d.ts +20 -0
- package/dist/components/inputs/MultiSelectInput/MultiSelectInput.js +1 -0
- package/dist/components/inputs/MultiSelectInput/MultiSelectInput.svelte +589 -0
- package/dist/components/inputs/MultiSelectInput/MultiSelectInput.svelte.d.ts +40 -0
- package/dist/components/inputs/Radio/Radio.css +49 -0
- package/dist/components/inputs/Radio/Radio.svelte +148 -96
- package/dist/components/inputs/Radio/Radio.svelte.d.ts +21 -10
- package/dist/components/inputs/Segmented/Segmented.css +98 -0
- package/dist/components/inputs/Segmented/Segmented.svelte +153 -99
- package/dist/components/inputs/Segmented/Segmented.svelte.d.ts +21 -10
- package/dist/components/inputs/SelectInput/SelectInput.css +2 -2
- package/dist/components/inputs/Steppers/Steppers.css +106 -0
- package/dist/components/inputs/Steppers/Steppers.svelte +185 -75
- package/dist/components/inputs/Steppers/Steppers.svelte.d.ts +20 -9
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
.multi-select-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.multi-select-container.multi-select-side {
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: 12px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.multi-select-label {
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
color: var(--color-text-primary);
|
|
17
|
+
margin-bottom: 4px;
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.multi-select-container.multi-select-side .multi-select-label {
|
|
22
|
+
margin-bottom: 0;
|
|
23
|
+
min-width: 120px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.multi-select-label.label-left {
|
|
27
|
+
text-align: left;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.multi-select-label.label-right {
|
|
31
|
+
text-align: right;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.label-required {
|
|
35
|
+
color: var(--color-text-error-ti);
|
|
36
|
+
margin-left: 4px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.label-subLabel {
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
color: var(--color-text-tertiary);
|
|
42
|
+
margin-left: 4px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.multi-select-trigger {
|
|
46
|
+
flex: 1;
|
|
47
|
+
display: flex;
|
|
48
|
+
width: 100%;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
border-radius: 6px;
|
|
52
|
+
border: 1px solid var(--color-border-form);
|
|
53
|
+
padding: 0.625rem 1rem;
|
|
54
|
+
text-align: left;
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
color: var(--color-text-primary);
|
|
57
|
+
transition:
|
|
58
|
+
border-color 0.2s,
|
|
59
|
+
box-shadow 0.2s;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.multi-select-trigger:not(:disabled) {
|
|
63
|
+
background: var(--color-bg-surface);
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.multi-select-trigger:not(:disabled):hover {
|
|
68
|
+
border-color: var(--color-border-form);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.multi-select-trigger:not(:disabled):focus {
|
|
72
|
+
outline: none;
|
|
73
|
+
border-color: var(--color-bg-act-primary);
|
|
74
|
+
box-shadow: 0 0 0 2px var(--color-bg-act-primary) 40;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.multi-select-trigger:disabled {
|
|
78
|
+
cursor: not-allowed;
|
|
79
|
+
background: var(--color-bg-disabled);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.multi-select-trigger.error:not(:disabled) {
|
|
83
|
+
border-color: var(--color-text-error-ti);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.multi-select-trigger.error:not(:disabled):focus {
|
|
87
|
+
border-color: var(--color-text-error-ti);
|
|
88
|
+
box-shadow: 0 0 0 2px var(--color-text-error-ti) 40;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.multi-select-menu {
|
|
92
|
+
position: absolute;
|
|
93
|
+
right: 0;
|
|
94
|
+
left: 0;
|
|
95
|
+
z-index: 20;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
border-radius: 6px;
|
|
98
|
+
background: var(--color-bg-surface);
|
|
99
|
+
box-shadow:
|
|
100
|
+
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
101
|
+
0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.multi-select-option {
|
|
105
|
+
display: flex;
|
|
106
|
+
width: 100%;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: 0.5rem;
|
|
109
|
+
padding: 0.5rem 0.75rem;
|
|
110
|
+
text-align: left;
|
|
111
|
+
font-size: 14px;
|
|
112
|
+
transition: background-color 0.15s;
|
|
113
|
+
color: var(--color-text-primary);
|
|
114
|
+
background: transparent;
|
|
115
|
+
border: none;
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.multi-select-option:hover:not(.disabled) {
|
|
120
|
+
background: var(--color-bg-disabled);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.multi-select-option.disabled {
|
|
124
|
+
cursor: not-allowed;
|
|
125
|
+
color: var(--color-text-tertiary);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.multi-select-checkbox {
|
|
129
|
+
width: 16px;
|
|
130
|
+
height: 16px;
|
|
131
|
+
border-radius: 4px;
|
|
132
|
+
border: 1px solid var(--color-border-form);
|
|
133
|
+
background: var(--color-bg-surface);
|
|
134
|
+
display: inline-flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
flex: 0 0 auto;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.multi-select-checkbox.checked {
|
|
141
|
+
border-color: var(--color-bg-act-primary);
|
|
142
|
+
background: var(--color-bg-act-primary);
|
|
143
|
+
color: white;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.multi-select-empty {
|
|
147
|
+
padding: 0.5rem 0.75rem;
|
|
148
|
+
font-size: 12px;
|
|
149
|
+
color: var(--color-text-tertiary);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.search-input {
|
|
153
|
+
width: 100%;
|
|
154
|
+
border-radius: 6px;
|
|
155
|
+
border: 1px solid var(--color-border-form);
|
|
156
|
+
background: var(--color-bg-surface);
|
|
157
|
+
padding: 0.5rem 2.25rem 0.5rem 0.75rem;
|
|
158
|
+
font-size: 14px;
|
|
159
|
+
color: var(--color-text-primary);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.search-input::placeholder {
|
|
163
|
+
color: var(--color-text-tertiary);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.search-input:focus {
|
|
167
|
+
outline: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.search-icon {
|
|
171
|
+
pointer-events: none;
|
|
172
|
+
position: absolute;
|
|
173
|
+
top: 50%;
|
|
174
|
+
right: 0.75rem;
|
|
175
|
+
transform: translateY(-50%);
|
|
176
|
+
color: var(--color-text-tertiary);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.options-container {
|
|
180
|
+
max-height: 14rem;
|
|
181
|
+
overflow-y: auto;
|
|
182
|
+
padding: 0.25rem 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.error-message {
|
|
186
|
+
margin-top: 4px;
|
|
187
|
+
font-size: 12px;
|
|
188
|
+
color: var(--color-text-error-ti);
|
|
189
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type SortOptionsMode = 'none' | 'a-z' | 'z-a';
|
|
2
|
+
/**
|
|
3
|
+
* Options
|
|
4
|
+
* 1. Dynamic options = boolean
|
|
5
|
+
* 2. schema = example {
|
|
6
|
+
* "label":"option1",
|
|
7
|
+
* "value":1,
|
|
8
|
+
* "disable":false,
|
|
9
|
+
* "visible":true,
|
|
10
|
+
* "default":true
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export interface IMultiSelectOption {
|
|
14
|
+
label: string;
|
|
15
|
+
rightLabel?: string;
|
|
16
|
+
value: string | number;
|
|
17
|
+
disable?: boolean;
|
|
18
|
+
visible?: boolean;
|
|
19
|
+
default?: boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|