@prokodo/ui 0.1.11 → 0.1.13
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 +6 -1
- package/dist/components/RTE/RTE.client.js +46 -5
- package/dist/components/RTE/RTE.css +226 -6
- package/dist/components/RTE/RTE.module.css +226 -6
- package/dist/components/RTE/RTE.module.scss.js +3 -0
- package/dist/components/RTE/RTE.utils.js +23 -1
- package/dist/components/accordion/Accordion.css +46 -0
- package/dist/components/accordion/Accordion.module.css +46 -0
- package/dist/components/accordion/Accordion.module.scss.js +4 -0
- package/dist/components/accordion/Accordion.view.js +25 -5
- package/dist/components/autocomplete/Autocomplete.client.js +132 -0
- package/dist/components/autocomplete/Autocomplete.css +317 -0
- package/dist/components/autocomplete/Autocomplete.js +12 -0
- package/dist/components/autocomplete/Autocomplete.lazy.js +12 -0
- package/dist/components/autocomplete/Autocomplete.module.css +317 -0
- package/dist/components/autocomplete/Autocomplete.module.scss.js +21 -0
- package/dist/components/autocomplete/Autocomplete.server.js +11 -0
- package/dist/components/autocomplete/Autocomplete.view.js +142 -0
- package/dist/components/autocomplete/index.js +4 -0
- package/dist/components/button/Button.css +1 -0
- package/dist/components/button/Button.module.css +1 -0
- package/dist/components/card/Card.css +9 -0
- package/dist/components/card/Card.module.css +9 -0
- package/dist/components/card/Card.module.scss.js +1 -0
- package/dist/components/dynamic-list/DynamicList.view.js +1 -1
- package/dist/components/input/Input.css +23 -4
- package/dist/components/input/Input.module.css +23 -4
- package/dist/components/pagination/Pagination.client.js +14 -0
- package/dist/components/pagination/Pagination.css +191 -0
- package/dist/components/pagination/Pagination.js +12 -0
- package/dist/components/pagination/Pagination.lazy.js +12 -0
- package/dist/components/pagination/Pagination.module.css +191 -0
- package/dist/components/pagination/Pagination.module.scss.js +12 -0
- package/dist/components/pagination/Pagination.server.js +11 -0
- package/dist/components/pagination/Pagination.utils.js +55 -0
- package/dist/components/pagination/Pagination.view.js +98 -0
- package/dist/components/pagination/index.js +4 -0
- package/dist/components/rich-text/RichText.css +0 -1
- package/dist/components/rich-text/RichText.module.css +0 -1
- package/dist/components/select/Select.client.js +230 -8
- package/dist/components/select/Select.css +47 -16
- package/dist/components/select/Select.module.css +47 -16
- package/dist/components/select/Select.module.scss.js +2 -0
- package/dist/components/select/Select.view.js +20 -57
- package/dist/components/switch/Switch.css +1 -1
- package/dist/components/switch/Switch.module.css +1 -1
- package/dist/components/switch/Switch.view.js +3 -1
- package/dist/components/tabs/Tabs.client.js +182 -0
- package/dist/components/tabs/Tabs.css +330 -0
- package/dist/components/tabs/Tabs.js +13 -0
- package/dist/components/tabs/Tabs.lazy.js +15 -0
- package/dist/components/tabs/Tabs.module.css +330 -0
- package/dist/components/tabs/Tabs.module.scss.js +19 -0
- package/dist/components/tabs/Tabs.server.js +11 -0
- package/dist/components/tabs/Tabs.view.js +157 -0
- package/dist/components/tabs/index.js +4 -0
- package/dist/components/tooltip/Tooltip.client.js +382 -0
- package/dist/components/tooltip/Tooltip.css +242 -0
- package/dist/components/tooltip/Tooltip.js +16 -0
- package/dist/components/tooltip/Tooltip.module.css +242 -0
- package/dist/components/tooltip/Tooltip.module.scss.js +15 -0
- package/dist/components/tooltip/Tooltip.server.js +12 -0
- package/dist/components/tooltip/Tooltip.view.js +127 -0
- package/dist/components/tooltip/index.js +4 -0
- package/dist/constants/project.js +1 -1
- package/dist/index.js +8 -0
- package/dist/theme.css +640 -22
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/RTE/RTE.utils.d.ts +1 -0
- package/dist/types/components/accordion/Accordion.d.ts +3 -0
- package/dist/types/components/accordion/Accordion.lazy.d.ts +3 -0
- package/dist/types/components/accordion/Accordion.model.d.ts +3 -0
- package/dist/types/components/accordion/Accordion.view.d.ts +1 -1
- package/dist/types/components/autocomplete/Autocomplete.client.d.ts +5 -0
- package/dist/types/components/autocomplete/Autocomplete.d.ts +4 -0
- package/dist/types/components/autocomplete/Autocomplete.lazy.d.ts +5 -0
- package/dist/types/components/autocomplete/Autocomplete.model.d.ts +58 -0
- package/dist/types/components/autocomplete/Autocomplete.server.d.ts +3 -0
- package/dist/types/components/autocomplete/Autocomplete.view.d.ts +3 -0
- package/dist/types/components/autocomplete/index.d.ts +2 -0
- package/dist/types/components/card/Card.model.d.ts +1 -1
- package/dist/types/components/grid/Grid.model.d.ts +37 -7
- package/dist/types/components/pagination/Pagination.client.d.ts +5 -0
- package/dist/types/components/pagination/Pagination.d.ts +4 -0
- package/dist/types/components/pagination/Pagination.lazy.d.ts +5 -0
- package/dist/types/components/pagination/Pagination.model.d.ts +22 -0
- package/dist/types/components/pagination/Pagination.server.d.ts +3 -0
- package/dist/types/components/pagination/Pagination.utils.d.ts +13 -0
- package/dist/types/components/pagination/Pagination.view.d.ts +3 -0
- package/dist/types/components/pagination/index.d.ts +2 -0
- package/dist/types/components/select/Select.model.d.ts +16 -1
- package/dist/types/components/tabs/Tabs.client.d.ts +5 -0
- package/dist/types/components/tabs/Tabs.d.ts +4 -0
- package/dist/types/components/tabs/Tabs.lazy.d.ts +5 -0
- package/dist/types/components/tabs/Tabs.model.d.ts +43 -0
- package/dist/types/components/tabs/Tabs.server.d.ts +3 -0
- package/dist/types/components/tabs/Tabs.view.d.ts +3 -0
- package/dist/types/components/tabs/index.d.ts +2 -0
- package/dist/types/components/tooltip/Tooltip.client.d.ts +5 -0
- package/dist/types/components/tooltip/Tooltip.d.ts +4 -0
- package/dist/types/components/tooltip/Tooltip.lazy.d.ts +5 -0
- package/dist/types/components/tooltip/Tooltip.model.d.ts +47 -0
- package/dist/types/components/tooltip/Tooltip.server.d.ts +3 -0
- package/dist/types/components/tooltip/Tooltip.view.d.ts +3 -0
- package/dist/types/components/tooltip/index.d.ts +2 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +23 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { createIsland } from "../../helpers/createIsland.js";
|
|
4
|
+
import AutocompleteServer from "./Autocomplete.server.js";
|
|
5
|
+
const Autocomplete = createIsland({
|
|
6
|
+
name: "Autocomplete",
|
|
7
|
+
Server: AutocompleteServer,
|
|
8
|
+
loadLazy: /* @__PURE__ */ __name(() => import("./Autocomplete.lazy.js"), "loadLazy")
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
Autocomplete
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createLazyWrapper } from "../../helpers/createLazyWrapper.js";
|
|
3
|
+
import AutocompleteClient from "./Autocomplete.client.js";
|
|
4
|
+
import AutocompleteServer from "./Autocomplete.server.js";
|
|
5
|
+
const Autocomplete_lazy = createLazyWrapper({
|
|
6
|
+
name: "Autocomplete",
|
|
7
|
+
Client: AutocompleteClient,
|
|
8
|
+
Server: AutocompleteServer
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
Autocomplete_lazy as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/* stylelint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Calculates a rem-based value by a given pixel size.
|
|
4
|
+
*/
|
|
5
|
+
/* stylelint-disable */
|
|
6
|
+
/**
|
|
7
|
+
* Applies flex-column and gap.
|
|
8
|
+
*/
|
|
9
|
+
/*
|
|
10
|
+
As example (light, primary)
|
|
11
|
+
See defined modes in designsystem/config/gradients
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Mixin that renders a media query that target screens that are larger than the
|
|
15
|
+
* given size.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Mixin that renders a media query that target screens that are smaller than the
|
|
19
|
+
* given size.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Mixin that renders a media query that target screens in between the given range.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Mixin that renders a media query that target screens that have height larger than the
|
|
26
|
+
* given size.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Mixin that renders a media query that target screens that have height smaller than the
|
|
30
|
+
* given size.
|
|
31
|
+
*/
|
|
32
|
+
/* stylelint-disable */
|
|
33
|
+
/* M3/Elevation Light/1 */
|
|
34
|
+
/* M3/Elevation Light/2 */
|
|
35
|
+
/* M3/Elevation/5 */
|
|
36
|
+
/* M3/Elevation/1 Text */
|
|
37
|
+
/* Inner elevations */
|
|
38
|
+
/* stylelint-disable */
|
|
39
|
+
/**
|
|
40
|
+
* Visually hides an element but not removes them for screen readers.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* The inverse of the `hidden` helper to reset a previously hidden element to be
|
|
44
|
+
* visible for users.
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* Creates a selector for :hover effects depending on the current user input
|
|
48
|
+
* device. If the input device is a mouse, this hover effect will appear.
|
|
49
|
+
* Keyboard and touch inputs are ignored.
|
|
50
|
+
*
|
|
51
|
+
* Example usage:
|
|
52
|
+
* .link {
|
|
53
|
+
* color: blue;
|
|
54
|
+
*
|
|
55
|
+
* @include when-hovered() {
|
|
56
|
+
* color: green;
|
|
57
|
+
* }
|
|
58
|
+
* }
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* Creates a selector for :active effects depending on the current user input
|
|
62
|
+
* device. The state applies when the input device is a mouse or keyboard. Touch
|
|
63
|
+
* devices will not show a pressed state.
|
|
64
|
+
*
|
|
65
|
+
* Example usage:
|
|
66
|
+
* .link {
|
|
67
|
+
* box-shadow: none;
|
|
68
|
+
*
|
|
69
|
+
* @include when-pressed() {
|
|
70
|
+
* box-shadow: inset 0 2px 4px grey;
|
|
71
|
+
* }
|
|
72
|
+
* }
|
|
73
|
+
*/
|
|
74
|
+
/**
|
|
75
|
+
* Creates a selector for :focus effects depending on the current user input
|
|
76
|
+
* device. When the user navigates using a keyboard, the focus effect defined in
|
|
77
|
+
* here is applied. For other input devices they don't show up.
|
|
78
|
+
*
|
|
79
|
+
* Example usage:
|
|
80
|
+
* .link {
|
|
81
|
+
* text-decoration: none;
|
|
82
|
+
*
|
|
83
|
+
* @include when-focused() {
|
|
84
|
+
* text-decoration: underline;
|
|
85
|
+
* }
|
|
86
|
+
* }
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Creates a selector for :focus-within effects depending on the current user
|
|
90
|
+
* input device. When the user navigates using a keyboard, the focus effect
|
|
91
|
+
* defined in here is applied. For other input devices they don't show up.
|
|
92
|
+
*
|
|
93
|
+
* Example usage:
|
|
94
|
+
* .link {
|
|
95
|
+
* img {
|
|
96
|
+
* opacity: 0.75;
|
|
97
|
+
*
|
|
98
|
+
* @include when-focused-within() {
|
|
99
|
+
* opacity: 1;
|
|
100
|
+
* }
|
|
101
|
+
* }
|
|
102
|
+
* }
|
|
103
|
+
*/
|
|
104
|
+
/**
|
|
105
|
+
* Wrapper for media query "prefers-reduced-motion".
|
|
106
|
+
*/
|
|
107
|
+
/**
|
|
108
|
+
* This helper hides the outline but still makes it visible for
|
|
109
|
+
* Windows high-contrast users. Use this instead of `outline: 0;`.
|
|
110
|
+
*/
|
|
111
|
+
/**
|
|
112
|
+
* This helper hides the outline but still makes it visible for
|
|
113
|
+
* Windows high-contrast users. Use this instead of `outline: 0;`.
|
|
114
|
+
*/
|
|
115
|
+
/**
|
|
116
|
+
* Renders an alternative, but application consistent focus-ring.
|
|
117
|
+
*/
|
|
118
|
+
/**
|
|
119
|
+
* Specifies the outer layout for all contents across breakpoints. Apply this
|
|
120
|
+
* mixin to the container element, to center the contents on the screen within
|
|
121
|
+
* the layout offsets.
|
|
122
|
+
*/
|
|
123
|
+
/**
|
|
124
|
+
* This mixin specifies basic text-styles for components that render a richtext
|
|
125
|
+
* content.
|
|
126
|
+
*/
|
|
127
|
+
@keyframes fade-in {
|
|
128
|
+
from {
|
|
129
|
+
opacity: 0;
|
|
130
|
+
transform: translateY(-4px);
|
|
131
|
+
}
|
|
132
|
+
to {
|
|
133
|
+
opacity: 1;
|
|
134
|
+
transform: translateY(0);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
.prokodo-Autocomplete {
|
|
138
|
+
position: relative;
|
|
139
|
+
}
|
|
140
|
+
.prokodo-Autocomplete__inputWrap {
|
|
141
|
+
position: relative;
|
|
142
|
+
z-index: 41;
|
|
143
|
+
border-radius: 1.5rem;
|
|
144
|
+
}
|
|
145
|
+
.prokodo-Autocomplete__input {
|
|
146
|
+
width: 100%;
|
|
147
|
+
}
|
|
148
|
+
.prokodo-Autocomplete__input__inner--is-open, .prokodo-Autocomplete__input__node--is-open {
|
|
149
|
+
border-bottom-left-radius: 0 !important;
|
|
150
|
+
border-bottom-right-radius: 0 !important;
|
|
151
|
+
}
|
|
152
|
+
.prokodo-Autocomplete__input__inner--is-open {
|
|
153
|
+
background: var(--gradient-border-4);
|
|
154
|
+
}
|
|
155
|
+
.prokodo-Autocomplete__list {
|
|
156
|
+
position: absolute;
|
|
157
|
+
top: 100%;
|
|
158
|
+
left: 0;
|
|
159
|
+
width: calc(100% - 4px);
|
|
160
|
+
margin: 0;
|
|
161
|
+
padding: 0 2px 2px;
|
|
162
|
+
list-style: none;
|
|
163
|
+
transform: none;
|
|
164
|
+
border-bottom-left-radius: 1.5rem;
|
|
165
|
+
border-bottom-right-radius: 1.5rem;
|
|
166
|
+
border-top-left-radius: 0;
|
|
167
|
+
border-top-right-radius: 0;
|
|
168
|
+
background: var(--gradient-border-4);
|
|
169
|
+
margin-top: -2px;
|
|
170
|
+
box-shadow: var(--elevation-3);
|
|
171
|
+
max-height: 260px;
|
|
172
|
+
overflow: auto;
|
|
173
|
+
z-index: 50;
|
|
174
|
+
animation: fade-in 180ms ease-out;
|
|
175
|
+
scrollbar-width: none;
|
|
176
|
+
}
|
|
177
|
+
.prokodo-Autocomplete__list::-webkit-scrollbar {
|
|
178
|
+
display: none;
|
|
179
|
+
}
|
|
180
|
+
.prokodo-Autocomplete__state {
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
gap: 0.5rem;
|
|
184
|
+
margin: 0;
|
|
185
|
+
padding: 0.5rem 1rem 1rem 1rem;
|
|
186
|
+
background: var(--color-white);
|
|
187
|
+
color: var(--color-grey-700);
|
|
188
|
+
border-bottom-left-radius: 1.5rem;
|
|
189
|
+
border-bottom-right-radius: 1.5rem;
|
|
190
|
+
font-weight: 400;
|
|
191
|
+
font-size: 1rem;
|
|
192
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
193
|
+
font-style: normal;
|
|
194
|
+
line-height: 1.45;
|
|
195
|
+
letter-spacing: 0.03em;
|
|
196
|
+
text-transform: none;
|
|
197
|
+
text-align: left;
|
|
198
|
+
text-decoration: none;
|
|
199
|
+
}
|
|
200
|
+
@media screen and (min-width: 480px) {
|
|
201
|
+
.prokodo-Autocomplete__state {
|
|
202
|
+
font-size: 0.875rem;
|
|
203
|
+
line-height: 1.4;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
@media screen and (min-width: 960px) {
|
|
207
|
+
.prokodo-Autocomplete__state {
|
|
208
|
+
font-size: 0.875rem;
|
|
209
|
+
line-height: 1.4;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
html[data-theme=dark] .prokodo-Autocomplete__state {
|
|
213
|
+
background: rgb(16, 19, 27);
|
|
214
|
+
color: var(--color-grey-500);
|
|
215
|
+
}
|
|
216
|
+
.prokodo-Autocomplete__itemRow {
|
|
217
|
+
list-style: none;
|
|
218
|
+
margin: 0;
|
|
219
|
+
padding: 0;
|
|
220
|
+
}
|
|
221
|
+
.prokodo-Autocomplete__itemRow--is-last {
|
|
222
|
+
border-bottom-left-radius: 1.5rem;
|
|
223
|
+
border-bottom-right-radius: 1.5rem;
|
|
224
|
+
}
|
|
225
|
+
.prokodo-Autocomplete__item {
|
|
226
|
+
width: 100%;
|
|
227
|
+
border: none;
|
|
228
|
+
background: var(--color-white);
|
|
229
|
+
color: inherit;
|
|
230
|
+
text-align: left;
|
|
231
|
+
display: grid;
|
|
232
|
+
grid-gap: 0.25rem;
|
|
233
|
+
gap: 0.25rem;
|
|
234
|
+
padding: 0.5rem 1rem;
|
|
235
|
+
cursor: pointer;
|
|
236
|
+
transition: background-color 120ms ease;
|
|
237
|
+
}
|
|
238
|
+
html[data-theme=dark] .prokodo-Autocomplete__item {
|
|
239
|
+
background: rgb(16, 19, 27);
|
|
240
|
+
}
|
|
241
|
+
.prokodo-Autocomplete__item:hover {
|
|
242
|
+
background: var(--color-primary-50);
|
|
243
|
+
}
|
|
244
|
+
html[data-theme=dark] .prokodo-Autocomplete__item:hover {
|
|
245
|
+
background: var(--color-primary-50);
|
|
246
|
+
}
|
|
247
|
+
.prokodo-Autocomplete__item:focus-visible {
|
|
248
|
+
outline: 0;
|
|
249
|
+
background: var(--color-primary-50);
|
|
250
|
+
}
|
|
251
|
+
html[data-theme=dark] .prokodo-Autocomplete__item:focus-visible {
|
|
252
|
+
background: var(--color-primary-50);
|
|
253
|
+
}
|
|
254
|
+
.prokodo-Autocomplete__item--is-first {
|
|
255
|
+
border-top-left-radius: 0;
|
|
256
|
+
border-top-right-radius: 0;
|
|
257
|
+
}
|
|
258
|
+
.prokodo-Autocomplete__item--is-last {
|
|
259
|
+
border-bottom-left-radius: 1.5rem;
|
|
260
|
+
border-bottom-right-radius: 1.5rem;
|
|
261
|
+
}
|
|
262
|
+
.prokodo-Autocomplete__item--is-active {
|
|
263
|
+
background: var(--color-primary-100);
|
|
264
|
+
}
|
|
265
|
+
html[data-theme=dark] .prokodo-Autocomplete__item--is-active {
|
|
266
|
+
background: var(--color-primary-100);
|
|
267
|
+
}
|
|
268
|
+
.prokodo-Autocomplete__itemLabel {
|
|
269
|
+
margin: 0;
|
|
270
|
+
color: var(--color-grey-900);
|
|
271
|
+
font-weight: 400;
|
|
272
|
+
font-size: 1rem;
|
|
273
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
274
|
+
font-style: normal;
|
|
275
|
+
line-height: 1.45;
|
|
276
|
+
letter-spacing: 0.03em;
|
|
277
|
+
text-transform: none;
|
|
278
|
+
text-align: left;
|
|
279
|
+
text-decoration: none;
|
|
280
|
+
}
|
|
281
|
+
@media screen and (min-width: 480px) {
|
|
282
|
+
.prokodo-Autocomplete__itemLabel {
|
|
283
|
+
font-size: 0.875rem;
|
|
284
|
+
line-height: 1.4;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
@media screen and (min-width: 960px) {
|
|
288
|
+
.prokodo-Autocomplete__itemLabel {
|
|
289
|
+
font-size: 0.875rem;
|
|
290
|
+
line-height: 1.4;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
.prokodo-Autocomplete__itemDescription {
|
|
294
|
+
margin: 0;
|
|
295
|
+
color: var(--color-grey-700);
|
|
296
|
+
font-weight: 400;
|
|
297
|
+
font-size: 1rem;
|
|
298
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
299
|
+
font-style: normal;
|
|
300
|
+
line-height: 1.45;
|
|
301
|
+
letter-spacing: 0.03em;
|
|
302
|
+
text-transform: none;
|
|
303
|
+
text-align: left;
|
|
304
|
+
text-decoration: none;
|
|
305
|
+
}
|
|
306
|
+
@media screen and (min-width: 480px) {
|
|
307
|
+
.prokodo-Autocomplete__itemDescription {
|
|
308
|
+
font-size: 0.875rem;
|
|
309
|
+
line-height: 1.4;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
@media screen and (min-width: 960px) {
|
|
313
|
+
.prokodo-Autocomplete__itemDescription {
|
|
314
|
+
font-size: 0.875rem;
|
|
315
|
+
line-height: 1.4;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const styles = {
|
|
2
|
+
"prokodo-Autocomplete": "prokodo-Autocomplete",
|
|
3
|
+
"prokodo-Autocomplete__inputWrap": "prokodo-Autocomplete__inputWrap",
|
|
4
|
+
"prokodo-Autocomplete__input": "prokodo-Autocomplete__input",
|
|
5
|
+
"prokodo-Autocomplete__input__inner--is-open": "prokodo-Autocomplete__input__inner--is-open",
|
|
6
|
+
"prokodo-Autocomplete__input__node--is-open": "prokodo-Autocomplete__input__node--is-open",
|
|
7
|
+
"prokodo-Autocomplete__list": "prokodo-Autocomplete__list",
|
|
8
|
+
"fade-in": "fade-in",
|
|
9
|
+
"prokodo-Autocomplete__state": "prokodo-Autocomplete__state",
|
|
10
|
+
"prokodo-Autocomplete__itemRow": "prokodo-Autocomplete__itemRow",
|
|
11
|
+
"prokodo-Autocomplete__itemRow--is-last": "prokodo-Autocomplete__itemRow--is-last",
|
|
12
|
+
"prokodo-Autocomplete__item": "prokodo-Autocomplete__item",
|
|
13
|
+
"prokodo-Autocomplete__item--is-first": "prokodo-Autocomplete__item--is-first",
|
|
14
|
+
"prokodo-Autocomplete__item--is-last": "prokodo-Autocomplete__item--is-last",
|
|
15
|
+
"prokodo-Autocomplete__item--is-active": "prokodo-Autocomplete__item--is-active",
|
|
16
|
+
"prokodo-Autocomplete__itemLabel": "prokodo-Autocomplete__itemLabel",
|
|
17
|
+
"prokodo-Autocomplete__itemDescription": "prokodo-Autocomplete__itemDescription"
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
styles as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { AutocompleteView } from "./Autocomplete.view.js";
|
|
5
|
+
function AutocompleteServer(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx(AutocompleteView, { ...props, readOnly: true });
|
|
7
|
+
}
|
|
8
|
+
__name(AutocompleteServer, "AutocompleteServer");
|
|
9
|
+
export {
|
|
10
|
+
AutocompleteServer as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
+
import { create } from "../../helpers/bem.js";
|
|
5
|
+
import { isArray, isNumber } from "../../helpers/validations.js";
|
|
6
|
+
import styles from "./Autocomplete.module.scss.js";
|
|
7
|
+
import { Input } from "../input/Input.js";
|
|
8
|
+
import { Loading } from "../loading/Loading.js";
|
|
9
|
+
const bem = create(styles, "Autocomplete");
|
|
10
|
+
function AutocompleteView({
|
|
11
|
+
id,
|
|
12
|
+
name,
|
|
13
|
+
label,
|
|
14
|
+
placeholder,
|
|
15
|
+
required,
|
|
16
|
+
disabled,
|
|
17
|
+
fullWidth,
|
|
18
|
+
readOnly,
|
|
19
|
+
autoComplete,
|
|
20
|
+
"aria-describedby": ariaDescribedBy,
|
|
21
|
+
"aria-labelledby": ariaLabelledBy,
|
|
22
|
+
value,
|
|
23
|
+
items,
|
|
24
|
+
loading,
|
|
25
|
+
loadingText,
|
|
26
|
+
emptyText,
|
|
27
|
+
minQueryLength = 2,
|
|
28
|
+
minQueryLengthText,
|
|
29
|
+
className,
|
|
30
|
+
inputClassName,
|
|
31
|
+
listClassName,
|
|
32
|
+
itemClassName,
|
|
33
|
+
inputProps,
|
|
34
|
+
_clientState,
|
|
35
|
+
onChange,
|
|
36
|
+
onSelect
|
|
37
|
+
}) {
|
|
38
|
+
const { hideLabel, ...restInputProps } = inputProps ?? {};
|
|
39
|
+
const hasItems = isArray(items) && items.length > 0;
|
|
40
|
+
const canShowList = Boolean(_clientState == null ? void 0 : _clientState.open);
|
|
41
|
+
const canSearch = String(value ?? "").trim().length >= minQueryLength;
|
|
42
|
+
return /* @__PURE__ */ jsxs("div", { className: bem(void 0, void 0, className), children: [
|
|
43
|
+
/* @__PURE__ */ jsx("div", { className: bem("inputWrap"), children: /* @__PURE__ */ jsx(
|
|
44
|
+
Input,
|
|
45
|
+
{
|
|
46
|
+
...restInputProps,
|
|
47
|
+
"aria-describedby": ariaDescribedBy,
|
|
48
|
+
"aria-labelledby": ariaLabelledBy,
|
|
49
|
+
autoComplete,
|
|
50
|
+
disabled,
|
|
51
|
+
fullWidth,
|
|
52
|
+
hideLegend: hideLabel || (restInputProps == null ? void 0 : restInputProps.hideLegend),
|
|
53
|
+
id,
|
|
54
|
+
label,
|
|
55
|
+
name,
|
|
56
|
+
placeholder,
|
|
57
|
+
readOnly,
|
|
58
|
+
required,
|
|
59
|
+
value,
|
|
60
|
+
className: bem(
|
|
61
|
+
"input",
|
|
62
|
+
{
|
|
63
|
+
"is-open": canShowList
|
|
64
|
+
},
|
|
65
|
+
inputClassName
|
|
66
|
+
),
|
|
67
|
+
inputClassName: bem(
|
|
68
|
+
"input__node",
|
|
69
|
+
{
|
|
70
|
+
"is-open": canShowList
|
|
71
|
+
},
|
|
72
|
+
restInputProps == null ? void 0 : restInputProps.inputClassName
|
|
73
|
+
),
|
|
74
|
+
inputContainerClassName: bem(
|
|
75
|
+
"input__inner",
|
|
76
|
+
{
|
|
77
|
+
"is-open": canShowList
|
|
78
|
+
},
|
|
79
|
+
restInputProps == null ? void 0 : restInputProps.inputContainerClassName
|
|
80
|
+
),
|
|
81
|
+
onKeyDown: _clientState == null ? void 0 : _clientState.onInputKeyDown,
|
|
82
|
+
onChange: /* @__PURE__ */ __name((event) => {
|
|
83
|
+
var _a;
|
|
84
|
+
_clientState == null ? void 0 : _clientState.onInputChange(((_a = event == null ? void 0 : event.target) == null ? void 0 : _a.value) ?? "");
|
|
85
|
+
}, "onChange"),
|
|
86
|
+
onFocus: /* @__PURE__ */ __name(() => {
|
|
87
|
+
_clientState == null ? void 0 : _clientState.onInputFocus();
|
|
88
|
+
}, "onFocus")
|
|
89
|
+
}
|
|
90
|
+
) }),
|
|
91
|
+
canShowList && /* @__PURE__ */ jsx(
|
|
92
|
+
"ul",
|
|
93
|
+
{
|
|
94
|
+
className: bem("list", void 0, listClassName),
|
|
95
|
+
role: "listbox",
|
|
96
|
+
tabIndex: -1,
|
|
97
|
+
style: {
|
|
98
|
+
top: isNumber(_clientState == null ? void 0 : _clientState.listTop) ? `${_clientState.listTop}px` : void 0
|
|
99
|
+
},
|
|
100
|
+
children: Boolean(loading) ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("p", { className: bem("state"), children: [
|
|
101
|
+
/* @__PURE__ */ jsx(Loading, { size: "sm" }),
|
|
102
|
+
loadingText
|
|
103
|
+
] }) }) : !canSearch ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("p", { className: bem("state"), children: isNumber(minQueryLength) ? (minQueryLengthText ?? "{count} characters required").replaceAll("{count}", String(minQueryLength)) : "Type to search" }) }) : !hasItems ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("p", { className: bem("state"), children: emptyText }) }) : items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx(
|
|
104
|
+
"li",
|
|
105
|
+
{
|
|
106
|
+
"aria-selected": (_clientState == null ? void 0 : _clientState.activeIndex) === index,
|
|
107
|
+
className: bem("itemRow"),
|
|
108
|
+
role: "option",
|
|
109
|
+
children: /* @__PURE__ */ jsxs(
|
|
110
|
+
"button",
|
|
111
|
+
{
|
|
112
|
+
type: "button",
|
|
113
|
+
className: bem(
|
|
114
|
+
"item",
|
|
115
|
+
{
|
|
116
|
+
"is-active": (_clientState == null ? void 0 : _clientState.activeIndex) === index,
|
|
117
|
+
"is-first": index === 0,
|
|
118
|
+
"is-last": index === items.length - 1
|
|
119
|
+
},
|
|
120
|
+
itemClassName
|
|
121
|
+
),
|
|
122
|
+
onMouseDown: /* @__PURE__ */ __name((event) => {
|
|
123
|
+
event.preventDefault();
|
|
124
|
+
_clientState == null ? void 0 : _clientState.onSelectItem(item);
|
|
125
|
+
}, "onMouseDown"),
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ jsx("p", { className: bem("itemLabel"), children: item.label }),
|
|
128
|
+
item.description ? /* @__PURE__ */ jsx("p", { className: bem("itemDescription"), children: item.description }) : null
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
},
|
|
133
|
+
item.value
|
|
134
|
+
))
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] });
|
|
138
|
+
}
|
|
139
|
+
__name(AutocompleteView, "AutocompleteView");
|
|
140
|
+
export {
|
|
141
|
+
AutocompleteView
|
|
142
|
+
};
|
|
@@ -157,6 +157,15 @@
|
|
|
157
157
|
html[data-theme=dark] .prokodo-Card--white {
|
|
158
158
|
background-color: transparent;
|
|
159
159
|
}
|
|
160
|
+
.prokodo-Card--panel {
|
|
161
|
+
background: rgba(255, 255, 255, 0.03);
|
|
162
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
163
|
+
/* in light mode trotzdem lesbar */
|
|
164
|
+
}
|
|
165
|
+
html:not([data-theme=dark]) .prokodo-Card--panel {
|
|
166
|
+
background: var(--color-white);
|
|
167
|
+
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
168
|
+
}
|
|
160
169
|
.prokodo-Card__skeleton {
|
|
161
170
|
position: absolute;
|
|
162
171
|
z-index: 3;
|
|
@@ -157,6 +157,15 @@
|
|
|
157
157
|
html[data-theme=dark] .prokodo-Card--white {
|
|
158
158
|
background-color: transparent;
|
|
159
159
|
}
|
|
160
|
+
.prokodo-Card--panel {
|
|
161
|
+
background: rgba(255, 255, 255, 0.03);
|
|
162
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
163
|
+
/* in light mode trotzdem lesbar */
|
|
164
|
+
}
|
|
165
|
+
html:not([data-theme=dark]) .prokodo-Card--panel {
|
|
166
|
+
background: var(--color-white);
|
|
167
|
+
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
168
|
+
}
|
|
160
169
|
.prokodo-Card__skeleton {
|
|
161
170
|
position: absolute;
|
|
162
171
|
z-index: 3;
|
|
@@ -4,6 +4,7 @@ const styles = {
|
|
|
4
4
|
"prokodo-Card": "prokodo-Card",
|
|
5
5
|
"prokodo-Card--inherit": "prokodo-Card--inherit",
|
|
6
6
|
"prokodo-Card--white": "prokodo-Card--white",
|
|
7
|
+
"prokodo-Card--panel": "prokodo-Card--panel",
|
|
7
8
|
"prokodo-Card__skeleton": "prokodo-Card__skeleton",
|
|
8
9
|
"prokodo-Card__background": "prokodo-Card__background",
|
|
9
10
|
"prokodo-Card__link": "prokodo-Card__link",
|
|
@@ -4,10 +4,10 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import { create } from "../../helpers/bem.js";
|
|
5
5
|
import { isString } from "../../helpers/validations.js";
|
|
6
6
|
import styles from "./DynamicList.module.scss.js";
|
|
7
|
-
import { Input } from "../input/Input.js";
|
|
8
7
|
import { Select } from "../select/Select.js";
|
|
9
8
|
import { Button } from "../button/Button.js";
|
|
10
9
|
import { Label } from "../label/Label.js";
|
|
10
|
+
import { Input } from "../input/Input.js";
|
|
11
11
|
const bem = create(styles, "DynamicList");
|
|
12
12
|
function DynamicListView({
|
|
13
13
|
id,
|
|
@@ -129,7 +129,6 @@
|
|
|
129
129
|
position: relative;
|
|
130
130
|
display: flex;
|
|
131
131
|
flex-direction: column;
|
|
132
|
-
justify-content: space-around;
|
|
133
132
|
height: 100%;
|
|
134
133
|
width: 100%;
|
|
135
134
|
}
|
|
@@ -161,6 +160,9 @@
|
|
|
161
160
|
background-color: var(--color-white);
|
|
162
161
|
padding: 0 0.25rem;
|
|
163
162
|
}
|
|
163
|
+
html[data-theme=dark] .prokodo-Input__label--is-focused {
|
|
164
|
+
background-color: rgb(16, 19, 27);
|
|
165
|
+
}
|
|
164
166
|
}
|
|
165
167
|
.prokodo-Input__inner {
|
|
166
168
|
position: relative;
|
|
@@ -197,6 +199,13 @@
|
|
|
197
199
|
background-color: var(--color-white);
|
|
198
200
|
color: var(--color-grey-900);
|
|
199
201
|
}
|
|
202
|
+
html[data-theme=dark] .prokodo-Input__input input:-webkit-autofill, html[data-theme=dark] .prokodo-Input__input textarea:-webkit-autofill {
|
|
203
|
+
background-color: rgb(16, 19, 27);
|
|
204
|
+
}
|
|
205
|
+
html[data-theme=dark] .prokodo-Input__input input:autofill,
|
|
206
|
+
html[data-theme=dark] .prokodo-Input__input textarea:autofill {
|
|
207
|
+
background-color: rgb(16, 19, 27);
|
|
208
|
+
}
|
|
200
209
|
.prokodo-Input__input input:-webkit-autofill,
|
|
201
210
|
.prokodo-Input__input input:-webkit-autofill:hover,
|
|
202
211
|
.prokodo-Input__input input:-webkit-autofill:focus,
|
|
@@ -217,6 +226,10 @@
|
|
|
217
226
|
background-color: var(--color-white);
|
|
218
227
|
color: var(--color-grey-900);
|
|
219
228
|
}
|
|
229
|
+
html[data-theme=dark] .prokodo-Input__input input:-moz-autofill,
|
|
230
|
+
html[data-theme=dark] .prokodo-Input__input textarea:-moz-autofill {
|
|
231
|
+
background-color: rgb(16, 19, 27);
|
|
232
|
+
}
|
|
220
233
|
.prokodo-Input__input input:is(:-webkit-autofill, :-webkit-autofill), .prokodo-Input__input textarea:is(:-webkit-autofill, :-webkit-autofill) {
|
|
221
234
|
border-color: none; /* adjust as needed */
|
|
222
235
|
}
|
|
@@ -251,8 +264,8 @@
|
|
|
251
264
|
background: var(--gradient-border-8);
|
|
252
265
|
}
|
|
253
266
|
.prokodo-Input__input__node {
|
|
254
|
-
width: calc(100% -
|
|
255
|
-
padding: 0.875rem
|
|
267
|
+
width: calc(100% - 1rem - 1rem - 0.25rem);
|
|
268
|
+
padding: 0.875rem 1rem;
|
|
256
269
|
margin: 2px;
|
|
257
270
|
border: none;
|
|
258
271
|
outline: none;
|
|
@@ -279,6 +292,9 @@
|
|
|
279
292
|
font-size: 1rem;
|
|
280
293
|
}
|
|
281
294
|
}
|
|
295
|
+
html[data-theme=dark] .prokodo-Input__input__node {
|
|
296
|
+
background-color: rgb(16, 19, 27);
|
|
297
|
+
}
|
|
282
298
|
.prokodo-Input__input__node {
|
|
283
299
|
font-size: 1rem;
|
|
284
300
|
}
|
|
@@ -307,9 +323,12 @@
|
|
|
307
323
|
pointer-events: none;
|
|
308
324
|
}
|
|
309
325
|
.prokodo-Input__input__node:disabled {
|
|
310
|
-
color: var(--color-grey-
|
|
326
|
+
color: var(--color-grey-700);
|
|
311
327
|
background: var(--color-white);
|
|
312
328
|
}
|
|
329
|
+
html[data-theme=dark] .prokodo-Input__input__node:disabled {
|
|
330
|
+
background-color: rgb(16, 19, 27);
|
|
331
|
+
}
|
|
313
332
|
.prokodo-Input__input:focus {
|
|
314
333
|
border-color: var(--color-primary-500);
|
|
315
334
|
box-shadow: 0 0 5px var(--color-primary-500);
|