@prokodo/ui 0.1.10 → 0.1.12
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 +3 -0
- package/dist/_virtual/_commonjsHelpers.js +2 -0
- package/dist/_virtual/quill.js +34 -0
- package/dist/_virtual/quill2.js +4 -0
- package/dist/components/RTE/RTE.client.js +367 -0
- package/dist/components/RTE/RTE.css +473 -0
- package/dist/components/RTE/RTE.js +12 -0
- package/dist/components/RTE/RTE.lazy.js +12 -0
- package/dist/components/RTE/RTE.module.css +473 -0
- package/dist/components/RTE/RTE.module.scss.js +22 -0
- package/dist/components/RTE/RTE.server.js +19 -0
- package/dist/components/RTE/RTE.styles.js +21 -0
- package/dist/components/RTE/RTE.theme.js +4 -0
- package/dist/components/RTE/RTE.utils.js +73 -0
- package/dist/components/RTE/RTE.view.js +107 -0
- package/dist/components/RTE/index.js +4 -0
- package/dist/components/avatar/Avatar.css +1 -3
- package/dist/components/avatar/Avatar.module.css +1 -3
- package/dist/components/avatar/Avatar.view.js +30 -17
- package/dist/components/base-link/BaseLink.client.js +11 -1
- package/dist/components/button/Button.css +1 -0
- package/dist/components/button/Button.module.css +1 -0
- package/dist/components/button/Button.view.js +1 -0
- package/dist/components/card/Card.css +10 -1
- package/dist/components/card/Card.module.css +10 -1
- package/dist/components/card/Card.module.scss.js +1 -0
- package/dist/components/chip/Chip.css +2 -2
- package/dist/components/chip/Chip.module.css +2 -2
- package/dist/components/chip/Chip.view.js +1 -1
- package/dist/components/input/Input.css +21 -2
- package/dist/components/input/Input.module.css +21 -2
- package/dist/components/input/Input.view.js +21 -13
- 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.client.js +31 -0
- package/dist/components/rich-text/RichText.css +13 -1
- package/dist/components/rich-text/RichText.module.css +13 -1
- package/dist/components/rich-text/RichText.module.scss.js +2 -0
- package/dist/components/rich-text/RichText.server.js +1 -0
- 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/tooltip/Tooltip.client.js +373 -0
- package/dist/components/tooltip/Tooltip.css +241 -0
- package/dist/components/tooltip/Tooltip.js +16 -0
- package/dist/components/tooltip/Tooltip.module.css +241 -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 +6 -0
- package/dist/node_modules/.pnpm/quill@2.0.3/node_modules/quill/dist/quill.js +6133 -0
- package/dist/node_modules/.pnpm/quill@2.0.3/node_modules/quill/dist/quill.snow.css.js +12 -0
- package/dist/theme.css +214 -26
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/RTE/RTE.client.d.ts +6 -0
- package/dist/types/components/RTE/RTE.d.ts +339 -0
- package/dist/types/components/RTE/RTE.lazy.d.ts +340 -0
- package/dist/types/components/RTE/RTE.model.d.ts +17 -0
- package/dist/types/components/RTE/RTE.server.d.ts +3 -0
- package/dist/types/components/RTE/RTE.styles.d.ts +1 -0
- package/dist/types/components/RTE/RTE.theme.d.ts +2 -0
- package/dist/types/components/RTE/RTE.utils.d.ts +5 -0
- package/dist/types/components/RTE/RTE.view.d.ts +11 -0
- package/dist/types/components/RTE/index.d.ts +2 -0
- package/dist/types/components/avatar/Avatar.model.d.ts +1 -1
- 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/input/Input.model.d.ts +13 -1
- package/dist/types/components/input/Input.view.d.ts +1 -1
- 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/rich-text/RichText.client.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.d.ts +1 -0
- package/dist/types/components/rich-text/RichText.lazy.d.ts +1 -0
- package/dist/types/components/rich-text/RichText.model.d.ts +1 -0
- package/dist/types/components/select/Select.model.d.ts +16 -1
- 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/helpers/validations.d.ts +2 -2
- package/dist/types/index.d.ts +3 -0
- package/package.json +19 -2
|
@@ -0,0 +1,191 @@
|
|
|
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
|
+
.prokodo-Pagination {
|
|
128
|
+
display: inline-flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
gap: 0.5rem;
|
|
131
|
+
}
|
|
132
|
+
.prokodo-Pagination__list {
|
|
133
|
+
display: inline-flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 0.5rem;
|
|
136
|
+
margin: 0;
|
|
137
|
+
padding: 0;
|
|
138
|
+
list-style: none;
|
|
139
|
+
}
|
|
140
|
+
.prokodo-Pagination__item {
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
}
|
|
144
|
+
.prokodo-Pagination__ellipsis {
|
|
145
|
+
color: var(--color-grey-700);
|
|
146
|
+
padding: 0 0.25rem;
|
|
147
|
+
-webkit-user-select: none;
|
|
148
|
+
-moz-user-select: none;
|
|
149
|
+
user-select: none;
|
|
150
|
+
font-weight: 400;
|
|
151
|
+
font-size: 1rem;
|
|
152
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
153
|
+
font-style: normal;
|
|
154
|
+
line-height: 1.45;
|
|
155
|
+
letter-spacing: 0.03em;
|
|
156
|
+
text-transform: none;
|
|
157
|
+
text-align: left;
|
|
158
|
+
text-decoration: none;
|
|
159
|
+
}
|
|
160
|
+
@media screen and (min-width: 480px) {
|
|
161
|
+
.prokodo-Pagination__ellipsis {
|
|
162
|
+
font-size: 0.875rem;
|
|
163
|
+
line-height: 1.4;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
@media screen and (min-width: 960px) {
|
|
167
|
+
.prokodo-Pagination__ellipsis {
|
|
168
|
+
font-size: 0.875rem;
|
|
169
|
+
line-height: 1.4;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
.prokodo-Pagination__btn {
|
|
173
|
+
width: 40px;
|
|
174
|
+
height: 40px;
|
|
175
|
+
}
|
|
176
|
+
.prokodo-Pagination__page {
|
|
177
|
+
min-width: 36px;
|
|
178
|
+
height: 36px;
|
|
179
|
+
padding: 0 0.25rem;
|
|
180
|
+
border-radius: 10px;
|
|
181
|
+
color: var(--color-grey-700);
|
|
182
|
+
border: 1px solid var(--color-grey-100);
|
|
183
|
+
text-align: center !important;
|
|
184
|
+
}
|
|
185
|
+
html[data-theme=dark] .prokodo-Pagination__page {
|
|
186
|
+
border: 1px solid var(--color-grey-500);
|
|
187
|
+
}
|
|
188
|
+
.prokodo-Pagination__page--active {
|
|
189
|
+
border: none;
|
|
190
|
+
pointer-events: none;
|
|
191
|
+
}
|
|
@@ -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 PaginationServer from "./Pagination.server.js";
|
|
5
|
+
const Pagination = createIsland({
|
|
6
|
+
name: "Pagination",
|
|
7
|
+
Server: PaginationServer,
|
|
8
|
+
loadLazy: /* @__PURE__ */ __name(() => import("./Pagination.lazy.js"), "loadLazy")
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
Pagination
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createLazyWrapper } from "../../helpers/createLazyWrapper.js";
|
|
3
|
+
import PaginationClient from "./Pagination.client.js";
|
|
4
|
+
import PaginationServer from "./Pagination.server.js";
|
|
5
|
+
const Pagination_lazy = createLazyWrapper({
|
|
6
|
+
name: "Pagination",
|
|
7
|
+
Client: PaginationClient,
|
|
8
|
+
Server: PaginationServer
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
Pagination_lazy as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,191 @@
|
|
|
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
|
+
.prokodo-Pagination {
|
|
128
|
+
display: inline-flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
gap: 0.5rem;
|
|
131
|
+
}
|
|
132
|
+
.prokodo-Pagination__list {
|
|
133
|
+
display: inline-flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 0.5rem;
|
|
136
|
+
margin: 0;
|
|
137
|
+
padding: 0;
|
|
138
|
+
list-style: none;
|
|
139
|
+
}
|
|
140
|
+
.prokodo-Pagination__item {
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
}
|
|
144
|
+
.prokodo-Pagination__ellipsis {
|
|
145
|
+
color: var(--color-grey-700);
|
|
146
|
+
padding: 0 0.25rem;
|
|
147
|
+
-webkit-user-select: none;
|
|
148
|
+
-moz-user-select: none;
|
|
149
|
+
user-select: none;
|
|
150
|
+
font-weight: 400;
|
|
151
|
+
font-size: 1rem;
|
|
152
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
153
|
+
font-style: normal;
|
|
154
|
+
line-height: 1.45;
|
|
155
|
+
letter-spacing: 0.03em;
|
|
156
|
+
text-transform: none;
|
|
157
|
+
text-align: left;
|
|
158
|
+
text-decoration: none;
|
|
159
|
+
}
|
|
160
|
+
@media screen and (min-width: 480px) {
|
|
161
|
+
.prokodo-Pagination__ellipsis {
|
|
162
|
+
font-size: 0.875rem;
|
|
163
|
+
line-height: 1.4;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
@media screen and (min-width: 960px) {
|
|
167
|
+
.prokodo-Pagination__ellipsis {
|
|
168
|
+
font-size: 0.875rem;
|
|
169
|
+
line-height: 1.4;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
.prokodo-Pagination__btn {
|
|
173
|
+
width: 40px;
|
|
174
|
+
height: 40px;
|
|
175
|
+
}
|
|
176
|
+
.prokodo-Pagination__page {
|
|
177
|
+
min-width: 36px;
|
|
178
|
+
height: 36px;
|
|
179
|
+
padding: 0 0.25rem;
|
|
180
|
+
border-radius: 10px;
|
|
181
|
+
color: var(--color-grey-700);
|
|
182
|
+
border: 1px solid var(--color-grey-100);
|
|
183
|
+
text-align: center !important;
|
|
184
|
+
}
|
|
185
|
+
html[data-theme=dark] .prokodo-Pagination__page {
|
|
186
|
+
border: 1px solid var(--color-grey-500);
|
|
187
|
+
}
|
|
188
|
+
.prokodo-Pagination__page--active {
|
|
189
|
+
border: none;
|
|
190
|
+
pointer-events: none;
|
|
191
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const styles = {
|
|
2
|
+
"prokodo-Pagination": "prokodo-Pagination",
|
|
3
|
+
"prokodo-Pagination__list": "prokodo-Pagination__list",
|
|
4
|
+
"prokodo-Pagination__item": "prokodo-Pagination__item",
|
|
5
|
+
"prokodo-Pagination__ellipsis": "prokodo-Pagination__ellipsis",
|
|
6
|
+
"prokodo-Pagination__btn": "prokodo-Pagination__btn",
|
|
7
|
+
"prokodo-Pagination__page": "prokodo-Pagination__page",
|
|
8
|
+
"prokodo-Pagination__page--active": "prokodo-Pagination__page--active"
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
styles as default
|
|
12
|
+
};
|
|
@@ -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 { PaginationView } from "./Pagination.view.js";
|
|
5
|
+
function PaginationServer(p) {
|
|
6
|
+
return /* @__PURE__ */ jsx(PaginationView, { ...p, readOnly: true });
|
|
7
|
+
}
|
|
8
|
+
__name(PaginationServer, "PaginationServer");
|
|
9
|
+
export {
|
|
10
|
+
PaginationServer as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
function clampInt(v, min, max) {
|
|
4
|
+
if (!Number.isFinite(v)) return min;
|
|
5
|
+
const x = Math.trunc(v);
|
|
6
|
+
return Math.min(max, Math.max(min, x));
|
|
7
|
+
}
|
|
8
|
+
__name(clampInt, "clampInt");
|
|
9
|
+
function buildPaginationItems(args) {
|
|
10
|
+
const total = Math.max(1, Math.trunc(args.totalPages));
|
|
11
|
+
const page = clampInt(args.page, 1, total);
|
|
12
|
+
const siblings = Math.max(0, Math.trunc(args.siblingCount));
|
|
13
|
+
const boundaries = Math.max(0, Math.trunc(args.boundaryCount));
|
|
14
|
+
const maxVisible = boundaries * 2 + siblings * 2 + 3 + 2;
|
|
15
|
+
if (total <= maxVisible) {
|
|
16
|
+
return Array.from({ length: total }, (_, i) => ({
|
|
17
|
+
type: "page",
|
|
18
|
+
value: i + 1
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
const items = [];
|
|
22
|
+
const startPages = Array.from({ length: boundaries }, (_, i) => i + 1);
|
|
23
|
+
const endPages = Array.from(
|
|
24
|
+
{ length: boundaries },
|
|
25
|
+
(_, i) => total - boundaries + 1 + i
|
|
26
|
+
);
|
|
27
|
+
const siblingsStart = Math.max(boundaries + 2, page - siblings);
|
|
28
|
+
const siblingsEnd = Math.min(total - boundaries - 1, page + siblings);
|
|
29
|
+
for (const p of startPages) items.push({ type: "page", value: p });
|
|
30
|
+
if (siblingsStart > boundaries + 2) {
|
|
31
|
+
items.push({ type: "ellipsis", key: "start-ellipsis" });
|
|
32
|
+
} else {
|
|
33
|
+
items.push({ type: "page", value: boundaries + 1 });
|
|
34
|
+
}
|
|
35
|
+
for (let p = siblingsStart; p <= siblingsEnd; p++) {
|
|
36
|
+
items.push({ type: "page", value: p });
|
|
37
|
+
}
|
|
38
|
+
if (siblingsEnd < total - boundaries - 1) {
|
|
39
|
+
items.push({ type: "ellipsis", key: "end-ellipsis" });
|
|
40
|
+
} else {
|
|
41
|
+
items.push({ type: "page", value: total - boundaries });
|
|
42
|
+
}
|
|
43
|
+
for (const p of endPages) items.push({ type: "page", value: p });
|
|
44
|
+
const seen = /* @__PURE__ */ new Set();
|
|
45
|
+
return items.filter((it) => {
|
|
46
|
+
const key = it.type === "page" ? `p-${it.value}` : `e-${it.key}`;
|
|
47
|
+
if (seen.has(key)) return false;
|
|
48
|
+
seen.add(key);
|
|
49
|
+
return true;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
__name(buildPaginationItems, "buildPaginationItems");
|
|
53
|
+
export {
|
|
54
|
+
buildPaginationItems
|
|
55
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
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 styles from "./Pagination.module.scss.js";
|
|
6
|
+
import { buildPaginationItems } from "./Pagination.utils.js";
|
|
7
|
+
import { Button } from "../button/Button.js";
|
|
8
|
+
const bem = create(styles, "Pagination");
|
|
9
|
+
function PaginationView({
|
|
10
|
+
className,
|
|
11
|
+
page,
|
|
12
|
+
totalPages,
|
|
13
|
+
disabled,
|
|
14
|
+
isPending,
|
|
15
|
+
siblingCount = 1,
|
|
16
|
+
boundaryCount = 1,
|
|
17
|
+
onPrev,
|
|
18
|
+
onNext,
|
|
19
|
+
onPageChange,
|
|
20
|
+
readOnly,
|
|
21
|
+
translations: t
|
|
22
|
+
}) {
|
|
23
|
+
const safeTotal = Math.max(1, Math.trunc(totalPages));
|
|
24
|
+
const safePage = Math.min(safeTotal, Math.max(1, Math.trunc(page)));
|
|
25
|
+
if (safeTotal <= 1) return null;
|
|
26
|
+
const isDisabled = Boolean(disabled) || Boolean(isPending) || Boolean(readOnly);
|
|
27
|
+
const items = buildPaginationItems({
|
|
28
|
+
page: safePage,
|
|
29
|
+
totalPages: safeTotal,
|
|
30
|
+
siblingCount,
|
|
31
|
+
boundaryCount
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
"nav",
|
|
35
|
+
{
|
|
36
|
+
"aria-label": (t == null ? void 0 : t.pagination) ?? "Pagination",
|
|
37
|
+
className: bem(void 0, void 0, className),
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ jsx(
|
|
40
|
+
Button,
|
|
41
|
+
{
|
|
42
|
+
"aria-label": (t == null ? void 0 : t.prev) ?? "Previous page",
|
|
43
|
+
className: bem("btn"),
|
|
44
|
+
disabled: isDisabled || safePage <= 1,
|
|
45
|
+
iconProps: { name: "ArrowLeft01Icon" },
|
|
46
|
+
variant: "outlined",
|
|
47
|
+
onClick: isDisabled ? void 0 : onPrev ?? (() => {
|
|
48
|
+
onPageChange == null ? void 0 : onPageChange(safePage - 1);
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ jsx("ul", { className: bem("list"), children: items.map((it) => {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
if (it.type === "ellipsis") {
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
"li",
|
|
57
|
+
{
|
|
58
|
+
className: bem("item"),
|
|
59
|
+
children: /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: bem("ellipsis"), children: "…" })
|
|
60
|
+
},
|
|
61
|
+
`${safePage}-${safeTotal}-${it.key}`
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
const isActive = it.value === safePage;
|
|
65
|
+
return /* @__PURE__ */ jsx("li", { className: bem("item"), children: /* @__PURE__ */ jsx(
|
|
66
|
+
Button,
|
|
67
|
+
{
|
|
68
|
+
"aria-current": isActive ? "page" : void 0,
|
|
69
|
+
className: bem("page", { active: isActive }),
|
|
70
|
+
disabled: isDisabled || isActive,
|
|
71
|
+
title: (_a = it.value) == null ? void 0 : _a.toString(),
|
|
72
|
+
variant: isActive ? "outlined" : "text",
|
|
73
|
+
"aria-label": isActive ? ((_b = t == null ? void 0 : t.pageCurrent) == null ? void 0 : _b.replace("{page}", String(it.value))) ?? `Current page ${it.value}` : ((_c = t == null ? void 0 : t.pageGoTo) == null ? void 0 : _c.replace("{page}", String(it.value))) ?? `Go to page ${it.value}`,
|
|
74
|
+
onClick: isDisabled ? void 0 : () => onPageChange == null ? void 0 : onPageChange(it.value)
|
|
75
|
+
}
|
|
76
|
+
) }, it.value);
|
|
77
|
+
}) }),
|
|
78
|
+
/* @__PURE__ */ jsx(
|
|
79
|
+
Button,
|
|
80
|
+
{
|
|
81
|
+
"aria-label": (t == null ? void 0 : t.next) ?? "Next page",
|
|
82
|
+
className: bem("btn"),
|
|
83
|
+
disabled: isDisabled || safePage >= safeTotal,
|
|
84
|
+
iconProps: { name: "ArrowRight01Icon" },
|
|
85
|
+
variant: "outlined",
|
|
86
|
+
onClick: isDisabled ? void 0 : onNext ?? (() => {
|
|
87
|
+
onPageChange == null ? void 0 : onPageChange(safePage + 1);
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
__name(PaginationView, "PaginationView");
|
|
96
|
+
export {
|
|
97
|
+
PaginationView
|
|
98
|
+
};
|
|
@@ -9,6 +9,7 @@ import { create } from "../../helpers/bem.js";
|
|
|
9
9
|
import { isString } from "../../helpers/validations.js";
|
|
10
10
|
import styles from "./RichText.module.scss.js";
|
|
11
11
|
import { Icon } from "../icon/Icon.js";
|
|
12
|
+
import { Image } from "../image/Image.js";
|
|
12
13
|
import { Link } from "../link/Link.js";
|
|
13
14
|
import { Headline } from "../headline/Headline.js";
|
|
14
15
|
import { AnimatedText } from "../animatedText/AnimatedText.js";
|
|
@@ -86,6 +87,7 @@ function RichTextClient({
|
|
|
86
87
|
className,
|
|
87
88
|
overrideParagraph,
|
|
88
89
|
codeTheme,
|
|
90
|
+
linkPolicy = "trusted",
|
|
89
91
|
...props
|
|
90
92
|
}) {
|
|
91
93
|
const containerRef = useRef(null);
|
|
@@ -250,6 +252,19 @@ function RichTextClient({
|
|
|
250
252
|
const href = elem.getAttribute("href") ?? "#";
|
|
251
253
|
const title = elem.getAttribute("title") ?? void 0;
|
|
252
254
|
const linkText = normalize(keyedChildren.map(renderAnimation));
|
|
255
|
+
const isHttp = /^https?:\/\//i.test(href);
|
|
256
|
+
const isExternalHttp = isHttp;
|
|
257
|
+
let target = void 0;
|
|
258
|
+
let rel = void 0;
|
|
259
|
+
if (linkPolicy === "ugc") {
|
|
260
|
+
rel = isExternalHttp ? "ugc nofollow noopener" : "ugc nofollow";
|
|
261
|
+
target = isExternalHttp ? "_blank" : void 0;
|
|
262
|
+
} else {
|
|
263
|
+
const htmlTarget = elem.getAttribute("target") ?? void 0;
|
|
264
|
+
const wantsBlank = htmlTarget === "_blank";
|
|
265
|
+
target = wantsBlank ? "_blank" : void 0;
|
|
266
|
+
rel = wantsBlank ? "noopener" : void 0;
|
|
267
|
+
}
|
|
253
268
|
return /* @__PURE__ */ jsx(
|
|
254
269
|
Link,
|
|
255
270
|
{
|
|
@@ -258,6 +273,8 @@ function RichTextClient({
|
|
|
258
273
|
className: cls,
|
|
259
274
|
href,
|
|
260
275
|
linkComponent,
|
|
276
|
+
rel,
|
|
277
|
+
target,
|
|
261
278
|
title,
|
|
262
279
|
variant: "primary",
|
|
263
280
|
children: linkText
|
|
@@ -282,6 +299,20 @@ function RichTextClient({
|
|
|
282
299
|
}
|
|
283
300
|
);
|
|
284
301
|
}
|
|
302
|
+
case "img": {
|
|
303
|
+
const existing = elem.getAttribute("class");
|
|
304
|
+
const src2 = elem.getAttribute("src");
|
|
305
|
+
const alt = elem.getAttribute("alt");
|
|
306
|
+
return /* @__PURE__ */ jsx("span", { className: bem("image__wrapper"), children: /* @__PURE__ */ jsx(
|
|
307
|
+
Image,
|
|
308
|
+
{
|
|
309
|
+
fill: true,
|
|
310
|
+
alt: alt ?? "",
|
|
311
|
+
className: [bem("image"), existing].filter(Boolean).join(" "),
|
|
312
|
+
src: src2 ?? ""
|
|
313
|
+
}
|
|
314
|
+
) });
|
|
315
|
+
}
|
|
285
316
|
case "ul": {
|
|
286
317
|
const cls = bem("ul");
|
|
287
318
|
return /* @__PURE__ */ jsx("ul", { className: cls, children: keyedChildren });
|
|
@@ -189,7 +189,6 @@ html[data-theme=dark] .prokodo-RichText__p {
|
|
|
189
189
|
text-align: inherit;
|
|
190
190
|
}
|
|
191
191
|
html[data-theme=dark] .prokodo-RichText__pre {
|
|
192
|
-
color: var(--color-grey-300);
|
|
193
192
|
background-color: var(--color-grey-50);
|
|
194
193
|
}
|
|
195
194
|
.prokodo-RichText__blockquote {
|
|
@@ -198,6 +197,19 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
198
197
|
padding: 1px 1rem;
|
|
199
198
|
margin: 0;
|
|
200
199
|
}
|
|
200
|
+
.prokodo-RichText__image {
|
|
201
|
+
-o-object-fit: cover;
|
|
202
|
+
object-fit: cover;
|
|
203
|
+
border-radius: 13px;
|
|
204
|
+
}
|
|
205
|
+
.prokodo-RichText__image__wrapper {
|
|
206
|
+
position: relative;
|
|
207
|
+
display: block;
|
|
208
|
+
width: 100%;
|
|
209
|
+
height: 300px;
|
|
210
|
+
overflow: hidden;
|
|
211
|
+
border-radius: 13px;
|
|
212
|
+
}
|
|
201
213
|
.prokodo-RichText__ul, .prokodo-RichText__ol {
|
|
202
214
|
padding: 0;
|
|
203
215
|
list-style-type: none;
|