@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,242 @@
|
|
|
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-Tooltip {
|
|
128
|
+
position: relative;
|
|
129
|
+
display: inline-flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
/* Visually hidden described-by node (portal a11y). */
|
|
132
|
+
/* CSS-only fallback (only works for inline mode). */
|
|
133
|
+
}
|
|
134
|
+
.prokodo-Tooltip--disabled {
|
|
135
|
+
pointer-events: none;
|
|
136
|
+
}
|
|
137
|
+
.prokodo-Tooltip__sr {
|
|
138
|
+
position: absolute;
|
|
139
|
+
width: 1px;
|
|
140
|
+
height: 1px;
|
|
141
|
+
padding: 0;
|
|
142
|
+
margin: -1px;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
clip: rect(0, 0, 0, 0);
|
|
145
|
+
border: 0;
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
}
|
|
148
|
+
.prokodo-Tooltip__trigger {
|
|
149
|
+
width: -moz-max-content !important;
|
|
150
|
+
width: max-content !important;
|
|
151
|
+
flex: 0 0 auto !important;
|
|
152
|
+
}
|
|
153
|
+
.prokodo-Tooltip__bubble {
|
|
154
|
+
/* Make sizing measurable and stable. */
|
|
155
|
+
display: block;
|
|
156
|
+
position: fixed;
|
|
157
|
+
left: 0;
|
|
158
|
+
top: 0;
|
|
159
|
+
/* Position via CSS vars, but NO animated transform/scale */
|
|
160
|
+
transform: translate3d(var(--pk-tt-x, 0px), var(--pk-tt-y, 0px), 0);
|
|
161
|
+
/* Only opacity changes for animation */
|
|
162
|
+
will-change: opacity;
|
|
163
|
+
z-index: var(--pk-tt-z, 2147483647);
|
|
164
|
+
max-width: min(360px, 100vw - 16px);
|
|
165
|
+
white-space: normal;
|
|
166
|
+
overflow-wrap: anywhere;
|
|
167
|
+
padding: 0.25rem 0.5rem;
|
|
168
|
+
border-radius: 10px;
|
|
169
|
+
box-shadow: var(--elevation-2);
|
|
170
|
+
background: var(--color-grey-900);
|
|
171
|
+
color: var(--color-white);
|
|
172
|
+
opacity: 0;
|
|
173
|
+
visibility: hidden;
|
|
174
|
+
pointer-events: none;
|
|
175
|
+
/* fade only */
|
|
176
|
+
transition: opacity 120ms ease, visibility 120ms ease;
|
|
177
|
+
font-weight: 400;
|
|
178
|
+
font-size: 1rem;
|
|
179
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
180
|
+
font-style: normal;
|
|
181
|
+
line-height: 1.45;
|
|
182
|
+
letter-spacing: 0.03em;
|
|
183
|
+
text-transform: none;
|
|
184
|
+
text-align: left;
|
|
185
|
+
text-decoration: none;
|
|
186
|
+
}
|
|
187
|
+
@media screen and (min-width: 480px) {
|
|
188
|
+
.prokodo-Tooltip__bubble {
|
|
189
|
+
font-size: 0.875rem;
|
|
190
|
+
line-height: 1.4;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
@media screen and (min-width: 960px) {
|
|
194
|
+
.prokodo-Tooltip__bubble {
|
|
195
|
+
font-size: 0.875rem;
|
|
196
|
+
line-height: 1.4;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
.prokodo-Tooltip__bubble--open {
|
|
200
|
+
opacity: 1;
|
|
201
|
+
visibility: visible;
|
|
202
|
+
pointer-events: auto;
|
|
203
|
+
}
|
|
204
|
+
.prokodo-Tooltip__bubble::after {
|
|
205
|
+
content: "";
|
|
206
|
+
position: absolute;
|
|
207
|
+
width: 0;
|
|
208
|
+
height: 0;
|
|
209
|
+
border-style: solid;
|
|
210
|
+
}
|
|
211
|
+
.prokodo-Tooltip__bubble--top::after {
|
|
212
|
+
left: var(--pk-tt-arrow-x, 50%);
|
|
213
|
+
top: 100%;
|
|
214
|
+
transform: translateX(-50%);
|
|
215
|
+
border-width: 8px 8px 0 8px;
|
|
216
|
+
border-color: var(--color-grey-900) transparent transparent transparent;
|
|
217
|
+
}
|
|
218
|
+
.prokodo-Tooltip__bubble--bottom::after {
|
|
219
|
+
left: var(--pk-tt-arrow-x, 50%);
|
|
220
|
+
bottom: 100%;
|
|
221
|
+
transform: translateX(-50%);
|
|
222
|
+
border-width: 0 8px 8px 8px;
|
|
223
|
+
border-color: transparent transparent var(--color-grey-900) transparent;
|
|
224
|
+
}
|
|
225
|
+
.prokodo-Tooltip__bubble--left::after {
|
|
226
|
+
top: var(--pk-tt-arrow-y, 50%);
|
|
227
|
+
left: 100%;
|
|
228
|
+
transform: translateY(-50%);
|
|
229
|
+
border-width: 8px 0 8px 8px;
|
|
230
|
+
border-color: transparent transparent transparent var(--color-grey-900);
|
|
231
|
+
}
|
|
232
|
+
.prokodo-Tooltip__bubble--right::after {
|
|
233
|
+
top: var(--pk-tt-arrow-y, 50%);
|
|
234
|
+
right: 100%;
|
|
235
|
+
transform: translateY(-50%);
|
|
236
|
+
border-width: 8px 8px 8px 0;
|
|
237
|
+
border-color: transparent var(--color-grey-900) transparent transparent;
|
|
238
|
+
}
|
|
239
|
+
.prokodo-Tooltip:hover .prokodo-Tooltip__bubble, .prokodo-Tooltip:focus-within .prokodo-Tooltip__bubble {
|
|
240
|
+
opacity: 1;
|
|
241
|
+
visibility: visible;
|
|
242
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const styles = {
|
|
2
|
+
"prokodo-Tooltip": "prokodo-Tooltip",
|
|
3
|
+
"prokodo-Tooltip--disabled": "prokodo-Tooltip--disabled",
|
|
4
|
+
"prokodo-Tooltip__sr": "prokodo-Tooltip__sr",
|
|
5
|
+
"prokodo-Tooltip__trigger": "prokodo-Tooltip__trigger",
|
|
6
|
+
"prokodo-Tooltip__bubble": "prokodo-Tooltip__bubble",
|
|
7
|
+
"prokodo-Tooltip__bubble--open": "prokodo-Tooltip__bubble--open",
|
|
8
|
+
"prokodo-Tooltip__bubble--top": "prokodo-Tooltip__bubble--top",
|
|
9
|
+
"prokodo-Tooltip__bubble--bottom": "prokodo-Tooltip__bubble--bottom",
|
|
10
|
+
"prokodo-Tooltip__bubble--left": "prokodo-Tooltip__bubble--left",
|
|
11
|
+
"prokodo-Tooltip__bubble--right": "prokodo-Tooltip__bubble--right"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
styles as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 { TooltipView } from "./Tooltip.view.js";
|
|
5
|
+
function TooltipServer(props) {
|
|
6
|
+
const portal = props.portal ?? true;
|
|
7
|
+
return /* @__PURE__ */ jsx(TooltipView, { ...props, __renderVisualBubble: !portal });
|
|
8
|
+
}
|
|
9
|
+
__name(TooltipServer, "TooltipServer");
|
|
10
|
+
export {
|
|
11
|
+
TooltipServer as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
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 { useId, cloneElement } from "react";
|
|
5
|
+
import { create } from "../../helpers/bem.js";
|
|
6
|
+
import styles from "./Tooltip.module.scss.js";
|
|
7
|
+
const bem = create(styles, "Tooltip");
|
|
8
|
+
function mergeClassName(a, b) {
|
|
9
|
+
const v = [a, b].filter(Boolean).join(" ");
|
|
10
|
+
return v.length ? v : void 0;
|
|
11
|
+
}
|
|
12
|
+
__name(mergeClassName, "mergeClassName");
|
|
13
|
+
function compose(a, b) {
|
|
14
|
+
if (!a && !b) return;
|
|
15
|
+
return (...args) => {
|
|
16
|
+
if (typeof a === "function") a(...args);
|
|
17
|
+
if (typeof b === "function") b(...args);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
__name(compose, "compose");
|
|
21
|
+
function setRef(ref, value) {
|
|
22
|
+
if (!ref) return;
|
|
23
|
+
if (typeof ref === "function") {
|
|
24
|
+
ref(value);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
;
|
|
29
|
+
ref.current = value;
|
|
30
|
+
} catch {
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
__name(setRef, "setRef");
|
|
34
|
+
function TooltipView(props) {
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
36
|
+
const {
|
|
37
|
+
id,
|
|
38
|
+
content,
|
|
39
|
+
children,
|
|
40
|
+
placement = "top",
|
|
41
|
+
disabled,
|
|
42
|
+
open,
|
|
43
|
+
className,
|
|
44
|
+
tooltipClassName,
|
|
45
|
+
triggerClassName,
|
|
46
|
+
triggerProps,
|
|
47
|
+
__rootRef,
|
|
48
|
+
__triggerRef,
|
|
49
|
+
__bubbleRef,
|
|
50
|
+
__bubbleStyle,
|
|
51
|
+
__renderVisualBubble = true,
|
|
52
|
+
__open,
|
|
53
|
+
__placement,
|
|
54
|
+
__tooltipId
|
|
55
|
+
} = props;
|
|
56
|
+
const rid = useId();
|
|
57
|
+
const tooltipId = __tooltipId ?? id ?? `tt-${rid}`;
|
|
58
|
+
const describedBy = !disabled ? tooltipId : void 0;
|
|
59
|
+
const effectivePlacement = __placement ?? placement;
|
|
60
|
+
const effectiveOpen = __open ?? open;
|
|
61
|
+
const child = children;
|
|
62
|
+
const childProps = child.props;
|
|
63
|
+
const mergedStyle = {
|
|
64
|
+
...childProps.style ?? {},
|
|
65
|
+
...(triggerProps == null ? void 0 : triggerProps.style) ?? {},
|
|
66
|
+
// ✅ critical: prevent full-width triggers (global button resets, flex rules, etc.)
|
|
67
|
+
display: ((_a = triggerProps == null ? void 0 : triggerProps.style) == null ? void 0 : _a.display) ?? ((_b = childProps.style) == null ? void 0 : _b.display) ?? "inline-flex",
|
|
68
|
+
width: ((_c = triggerProps == null ? void 0 : triggerProps.style) == null ? void 0 : _c.width) ?? ((_d = childProps.style) == null ? void 0 : _d.width) ?? "max-content",
|
|
69
|
+
maxWidth: ((_e = triggerProps == null ? void 0 : triggerProps.style) == null ? void 0 : _e.maxWidth) ?? ((_f = childProps.style) == null ? void 0 : _f.maxWidth) ?? "max-content",
|
|
70
|
+
flex: ((_g = triggerProps == null ? void 0 : triggerProps.style) == null ? void 0 : _g.flex) ?? ((_h = childProps.style) == null ? void 0 : _h.flex) ?? "0 0 auto"
|
|
71
|
+
};
|
|
72
|
+
const merged = {
|
|
73
|
+
...childProps,
|
|
74
|
+
...triggerProps,
|
|
75
|
+
style: mergedStyle,
|
|
76
|
+
className: mergeClassName(
|
|
77
|
+
childProps.className,
|
|
78
|
+
bem("trigger", void 0, triggerClassName)
|
|
79
|
+
),
|
|
80
|
+
"aria-describedby": mergeClassName(
|
|
81
|
+
childProps["aria-describedby"],
|
|
82
|
+
describedBy
|
|
83
|
+
),
|
|
84
|
+
onMouseEnter: compose(childProps.onMouseEnter, triggerProps == null ? void 0 : triggerProps.onMouseEnter),
|
|
85
|
+
onMouseLeave: compose(childProps.onMouseLeave, triggerProps == null ? void 0 : triggerProps.onMouseLeave),
|
|
86
|
+
onFocus: compose(childProps.onFocus, triggerProps == null ? void 0 : triggerProps.onFocus),
|
|
87
|
+
onBlur: compose(childProps.onBlur, triggerProps == null ? void 0 : triggerProps.onBlur),
|
|
88
|
+
onKeyDown: compose(childProps.onKeyDown, triggerProps == null ? void 0 : triggerProps.onKeyDown),
|
|
89
|
+
ref: /* @__PURE__ */ __name((node) => {
|
|
90
|
+
setRef(childProps.ref, node);
|
|
91
|
+
if (__triggerRef) __triggerRef.current = node;
|
|
92
|
+
}, "ref")
|
|
93
|
+
};
|
|
94
|
+
const inlineBubbleClass = bem(
|
|
95
|
+
"bubble",
|
|
96
|
+
{ open: Boolean(effectiveOpen), [effectivePlacement]: true },
|
|
97
|
+
tooltipClassName
|
|
98
|
+
);
|
|
99
|
+
return /* @__PURE__ */ jsxs(
|
|
100
|
+
"span",
|
|
101
|
+
{
|
|
102
|
+
ref: __rootRef,
|
|
103
|
+
className: bem(void 0, { disabled: Boolean(disabled) }, className),
|
|
104
|
+
"data-placement": effectivePlacement,
|
|
105
|
+
"data-open": effectiveOpen === void 0 ? void 0 : String(Boolean(effectiveOpen)),
|
|
106
|
+
children: [
|
|
107
|
+
cloneElement(child, merged),
|
|
108
|
+
!disabled && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: bem("sr"), id: tooltipId, children: content }),
|
|
109
|
+
!disabled && __renderVisualBubble && /* @__PURE__ */ jsx(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
ref: __bubbleRef,
|
|
113
|
+
"aria-hidden": effectiveOpen === void 0 ? void 0 : !effectiveOpen,
|
|
114
|
+
className: inlineBubbleClass,
|
|
115
|
+
role: "tooltip",
|
|
116
|
+
style: __bubbleStyle,
|
|
117
|
+
children: content
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
__name(TooltipView, "TooltipView");
|
|
125
|
+
export {
|
|
126
|
+
TooltipView
|
|
127
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { UIRuntimeProvider, useUIRuntime } from "./helpers/runtime.client.js";
|
|
|
2
2
|
import { Accordion } from "./components/accordion/Accordion.js";
|
|
3
3
|
import { Animated } from "./components/animated/Animated.js";
|
|
4
4
|
import { AnimatedText } from "./components/animatedText/AnimatedText.js";
|
|
5
|
+
import { Autocomplete } from "./components/autocomplete/Autocomplete.js";
|
|
5
6
|
import { Avatar } from "./components/avatar/Avatar.js";
|
|
6
7
|
import { BaseLink } from "./components/base-link/BaseLink.js";
|
|
7
8
|
import { Button } from "./components/button/Button.js";
|
|
@@ -29,6 +30,7 @@ import { List } from "./components/list/List.js";
|
|
|
29
30
|
import { Loading } from "./components/loading/Loading.js";
|
|
30
31
|
import { Lottie } from "./components/lottie/Lottie.js";
|
|
31
32
|
import { Map } from "./components/map/Map.js";
|
|
33
|
+
import { Pagination } from "./components/pagination/Pagination.js";
|
|
32
34
|
import { PostItem } from "./components/post-item/PostItem.js";
|
|
33
35
|
import { PostTeaser } from "./components/post-teaser/PostTeaser.js";
|
|
34
36
|
import { PostWidget } from "./components/post-widget/PostWidget.js";
|
|
@@ -46,11 +48,14 @@ import { Snackbar } from "./components/snackbar/Snackbar.js";
|
|
|
46
48
|
import { Stepper } from "./components/stepper/Stepper.js";
|
|
47
49
|
import { Switch } from "./components/switch/Switch.js";
|
|
48
50
|
import { Table } from "./components/table/Table.js";
|
|
51
|
+
import { Tabs } from "./components/tabs/Tabs.js";
|
|
49
52
|
import { Teaser } from "./components/teaser/Teaser.js";
|
|
53
|
+
import { Tooltip } from "./components/tooltip/Tooltip.js";
|
|
50
54
|
export {
|
|
51
55
|
Accordion,
|
|
52
56
|
Animated,
|
|
53
57
|
AnimatedText,
|
|
58
|
+
Autocomplete,
|
|
54
59
|
Avatar,
|
|
55
60
|
BaseLink,
|
|
56
61
|
Button,
|
|
@@ -78,6 +83,7 @@ export {
|
|
|
78
83
|
Loading,
|
|
79
84
|
Lottie,
|
|
80
85
|
Map,
|
|
86
|
+
Pagination,
|
|
81
87
|
PostItem,
|
|
82
88
|
PostTeaser,
|
|
83
89
|
PostWidget,
|
|
@@ -95,7 +101,9 @@ export {
|
|
|
95
101
|
Stepper,
|
|
96
102
|
Switch,
|
|
97
103
|
Table,
|
|
104
|
+
Tabs,
|
|
98
105
|
Teaser,
|
|
106
|
+
Tooltip,
|
|
99
107
|
UIRuntimeProvider,
|
|
100
108
|
useUIRuntime
|
|
101
109
|
};
|