@prokodo/ui 0.1.12 → 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 +4 -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/dynamic-list/DynamicList.view.js +1 -1
- package/dist/components/input/Input.css +2 -2
- package/dist/components/input/Input.module.css +2 -2
- package/dist/components/rich-text/RichText.css +0 -1
- package/dist/components/rich-text/RichText.module.css +0 -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 +10 -1
- package/dist/components/tooltip/Tooltip.css +1 -0
- package/dist/components/tooltip/Tooltip.module.css +1 -0
- package/dist/constants/project.js +1 -1
- package/dist/index.js +4 -0
- package/dist/theme.css +445 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- 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/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/index.d.ts +2 -0
- package/package.json +11 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { memo, useState, useRef, useEffect, useMemo, useCallback } from "react";
|
|
6
|
+
import { TabsView } from "./Tabs.view.js";
|
|
7
|
+
function getFirstEnabledIndex(items) {
|
|
8
|
+
const index = items.findIndex((item) => item.disabled !== true);
|
|
9
|
+
return index >= 0 ? index : 0;
|
|
10
|
+
}
|
|
11
|
+
__name(getFirstEnabledIndex, "getFirstEnabledIndex");
|
|
12
|
+
function getEnabledIndices(items) {
|
|
13
|
+
return items.map((item, index) => ({ item, index })).filter((entry) => entry.item.disabled !== true).map((entry) => entry.index);
|
|
14
|
+
}
|
|
15
|
+
__name(getEnabledIndices, "getEnabledIndices");
|
|
16
|
+
function resolveInitialValue(items, value, defaultValue) {
|
|
17
|
+
if (!items.length) {
|
|
18
|
+
return value ?? defaultValue ?? "";
|
|
19
|
+
}
|
|
20
|
+
const candidate = value ?? defaultValue;
|
|
21
|
+
if (candidate !== void 0) {
|
|
22
|
+
const valid = items.find(
|
|
23
|
+
(item) => item.value === candidate && item.disabled !== true
|
|
24
|
+
);
|
|
25
|
+
if (valid) return valid.value;
|
|
26
|
+
}
|
|
27
|
+
const firstEnabled = items.find((item) => item.disabled !== true) ?? items[0];
|
|
28
|
+
return (firstEnabled == null ? void 0 : firstEnabled.value) ?? value ?? defaultValue ?? "";
|
|
29
|
+
}
|
|
30
|
+
__name(resolveInitialValue, "resolveInitialValue");
|
|
31
|
+
function findIndexByValue(items, value) {
|
|
32
|
+
const found = items.findIndex((item) => item.value === value);
|
|
33
|
+
return found >= 0 ? found : getFirstEnabledIndex(items);
|
|
34
|
+
}
|
|
35
|
+
__name(findIndexByValue, "findIndexByValue");
|
|
36
|
+
function TabsClient({
|
|
37
|
+
items,
|
|
38
|
+
value,
|
|
39
|
+
defaultValue,
|
|
40
|
+
activationMode = "automatic",
|
|
41
|
+
disabled,
|
|
42
|
+
onChange,
|
|
43
|
+
...rest
|
|
44
|
+
}) {
|
|
45
|
+
const isControlled = value !== void 0;
|
|
46
|
+
const [internalValue, setInternalValue] = useState(
|
|
47
|
+
() => resolveInitialValue(items, value, defaultValue)
|
|
48
|
+
);
|
|
49
|
+
const tabsRef = useRef([]);
|
|
50
|
+
const activeValue = isControlled ? value : internalValue;
|
|
51
|
+
const [focusIndex, setFocusIndex] = useState(
|
|
52
|
+
() => findIndexByValue(items, activeValue)
|
|
53
|
+
);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (isControlled) return;
|
|
56
|
+
setInternalValue(resolveInitialValue(items, void 0, defaultValue));
|
|
57
|
+
}, [defaultValue, isControlled, items]);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
setFocusIndex(findIndexByValue(items, activeValue));
|
|
60
|
+
}, [activeValue, items]);
|
|
61
|
+
const enabledIndices = useMemo(() => getEnabledIndices(items), [items]);
|
|
62
|
+
const selectByIndex = useCallback(
|
|
63
|
+
(index) => {
|
|
64
|
+
const next = items[index];
|
|
65
|
+
if (!next || next.disabled === true || disabled === true) return;
|
|
66
|
+
if (!isControlled) {
|
|
67
|
+
setInternalValue(next.value);
|
|
68
|
+
}
|
|
69
|
+
onChange == null ? void 0 : onChange({
|
|
70
|
+
value: next.value,
|
|
71
|
+
index
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
[disabled, isControlled, items, onChange]
|
|
75
|
+
);
|
|
76
|
+
const moveFocus = useCallback(
|
|
77
|
+
(currentIndex, direction) => {
|
|
78
|
+
if (!enabledIndices.length) return currentIndex;
|
|
79
|
+
const currentEnabledPos = enabledIndices.findIndex(
|
|
80
|
+
(enabledIndex) => enabledIndex === currentIndex
|
|
81
|
+
);
|
|
82
|
+
const safePosition = currentEnabledPos >= 0 ? currentEnabledPos : enabledIndices.findIndex((index) => index >= currentIndex);
|
|
83
|
+
const normalizedPosition = safePosition >= 0 ? safePosition : 0;
|
|
84
|
+
const nextPosition = (normalizedPosition + direction + enabledIndices.length) % enabledIndices.length;
|
|
85
|
+
return enabledIndices[nextPosition] ?? currentIndex;
|
|
86
|
+
},
|
|
87
|
+
[enabledIndices]
|
|
88
|
+
);
|
|
89
|
+
const focusTab = useCallback(
|
|
90
|
+
(index) => {
|
|
91
|
+
var _a;
|
|
92
|
+
setFocusIndex(index);
|
|
93
|
+
(_a = tabsRef.current[index]) == null ? void 0 : _a.focus();
|
|
94
|
+
},
|
|
95
|
+
[tabsRef]
|
|
96
|
+
);
|
|
97
|
+
const handleTabClick = useCallback(
|
|
98
|
+
(index) => {
|
|
99
|
+
focusTab(index);
|
|
100
|
+
selectByIndex(index);
|
|
101
|
+
},
|
|
102
|
+
[focusTab, selectByIndex]
|
|
103
|
+
);
|
|
104
|
+
const handleTabKeyDown = useCallback(
|
|
105
|
+
(index, event) => {
|
|
106
|
+
if (disabled === true) return;
|
|
107
|
+
const isHorizontal = (rest.orientation ?? "horizontal") === "horizontal";
|
|
108
|
+
if (isHorizontal && event.key === "ArrowRight" || !isHorizontal && event.key === "ArrowDown") {
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
const nextIndex = moveFocus(index, 1);
|
|
111
|
+
focusTab(nextIndex);
|
|
112
|
+
if (activationMode === "automatic") {
|
|
113
|
+
selectByIndex(nextIndex);
|
|
114
|
+
}
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (isHorizontal && event.key === "ArrowLeft" || !isHorizontal && event.key === "ArrowUp") {
|
|
118
|
+
event.preventDefault();
|
|
119
|
+
const nextIndex = moveFocus(index, -1);
|
|
120
|
+
focusTab(nextIndex);
|
|
121
|
+
if (activationMode === "automatic") {
|
|
122
|
+
selectByIndex(nextIndex);
|
|
123
|
+
}
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
if (event.key === "Home") {
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
const nextIndex = enabledIndices[0] ?? 0;
|
|
129
|
+
focusTab(nextIndex);
|
|
130
|
+
if (activationMode === "automatic") {
|
|
131
|
+
selectByIndex(nextIndex);
|
|
132
|
+
}
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (event.key === "End") {
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
const nextIndex = enabledIndices[enabledIndices.length - 1] ?? 0;
|
|
138
|
+
focusTab(nextIndex);
|
|
139
|
+
if (activationMode === "automatic") {
|
|
140
|
+
selectByIndex(nextIndex);
|
|
141
|
+
}
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
selectByIndex(index);
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
[
|
|
150
|
+
activationMode,
|
|
151
|
+
disabled,
|
|
152
|
+
enabledIndices,
|
|
153
|
+
focusTab,
|
|
154
|
+
moveFocus,
|
|
155
|
+
rest.orientation,
|
|
156
|
+
selectByIndex
|
|
157
|
+
]
|
|
158
|
+
);
|
|
159
|
+
return /* @__PURE__ */ jsx(
|
|
160
|
+
TabsView,
|
|
161
|
+
{
|
|
162
|
+
...rest,
|
|
163
|
+
items,
|
|
164
|
+
value: activeValue,
|
|
165
|
+
_clientState: {
|
|
166
|
+
activeValue,
|
|
167
|
+
focusIndex,
|
|
168
|
+
tabsRef,
|
|
169
|
+
onTabClick: /* @__PURE__ */ __name((index, event) => {
|
|
170
|
+
event.preventDefault();
|
|
171
|
+
handleTabClick(index);
|
|
172
|
+
}, "onTabClick"),
|
|
173
|
+
onTabKeyDown: handleTabKeyDown
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
__name(TabsClient, "TabsClient");
|
|
179
|
+
const TabsClient$1 = memo(TabsClient);
|
|
180
|
+
export {
|
|
181
|
+
TabsClient$1 as default
|
|
182
|
+
};
|
|
@@ -0,0 +1,330 @@
|
|
|
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-Tabs {
|
|
128
|
+
width: 100%;
|
|
129
|
+
}
|
|
130
|
+
.prokodo-Tabs--vertical {
|
|
131
|
+
display: grid;
|
|
132
|
+
grid-gap: 1rem;
|
|
133
|
+
gap: 1rem;
|
|
134
|
+
grid-template-columns: minmax(px-to-rem(180px), px-to-rem(260px)) 1fr;
|
|
135
|
+
}
|
|
136
|
+
.prokodo-Tabs__list {
|
|
137
|
+
align-items: stretch;
|
|
138
|
+
border-bottom: 1px solid var(--color-grey-200);
|
|
139
|
+
display: flex;
|
|
140
|
+
gap: 0;
|
|
141
|
+
overflow-x: auto;
|
|
142
|
+
padding: 0;
|
|
143
|
+
position: relative;
|
|
144
|
+
scrollbar-width: none;
|
|
145
|
+
}
|
|
146
|
+
html[data-theme=dark] .prokodo-Tabs__list {
|
|
147
|
+
border-bottom-color: var(--color-grey-700);
|
|
148
|
+
}
|
|
149
|
+
.prokodo-Tabs__list--vertical {
|
|
150
|
+
border-bottom: none;
|
|
151
|
+
border-right: 1px solid var(--color-grey-200);
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
overflow-x: visible;
|
|
154
|
+
}
|
|
155
|
+
html[data-theme=dark] .prokodo-Tabs__list--vertical {
|
|
156
|
+
border-right-color: var(--color-grey-700);
|
|
157
|
+
}
|
|
158
|
+
.prokodo-Tabs__list--disabled {
|
|
159
|
+
opacity: 0.7;
|
|
160
|
+
}
|
|
161
|
+
.prokodo-Tabs__tab {
|
|
162
|
+
align-items: center;
|
|
163
|
+
background: transparent;
|
|
164
|
+
border: none;
|
|
165
|
+
border-top-left-radius: 1.5rem;
|
|
166
|
+
border-top-right-radius: 1.5rem;
|
|
167
|
+
box-shadow: none;
|
|
168
|
+
color: var(--color-grey-700);
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
display: inline-flex;
|
|
171
|
+
gap: 0.5rem;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
min-height: px-to-rem(44px);
|
|
174
|
+
padding: 0.75rem 1rem;
|
|
175
|
+
position: relative;
|
|
176
|
+
transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
|
|
177
|
+
font-weight: 400;
|
|
178
|
+
font-size: 1.125rem;
|
|
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.55;
|
|
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-Tabs__tab {
|
|
189
|
+
font-size: 1rem;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
@media screen and (min-width: 960px) {
|
|
193
|
+
.prokodo-Tabs__tab {
|
|
194
|
+
font-size: 1rem;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
.prokodo-Tabs__tab--vertical {
|
|
198
|
+
border-top-left-radius: 0;
|
|
199
|
+
border-top-right-radius: 0;
|
|
200
|
+
}
|
|
201
|
+
.prokodo-Tabs__tab:hover {
|
|
202
|
+
background: var(--color-primary-50);
|
|
203
|
+
}
|
|
204
|
+
.prokodo-Tabs__tab:focus-visible {
|
|
205
|
+
outline: 0;
|
|
206
|
+
background: var(--color-primary-50);
|
|
207
|
+
}
|
|
208
|
+
.prokodo-Tabs__tab::after {
|
|
209
|
+
background: transparent;
|
|
210
|
+
bottom: 0;
|
|
211
|
+
content: "";
|
|
212
|
+
height: 3px;
|
|
213
|
+
left: 0;
|
|
214
|
+
position: absolute;
|
|
215
|
+
right: 0;
|
|
216
|
+
transform: scaleX(0.35);
|
|
217
|
+
transform-origin: center;
|
|
218
|
+
transition: background-color 180ms ease, transform 180ms ease;
|
|
219
|
+
}
|
|
220
|
+
.prokodo-Tabs__tab--fullWidth {
|
|
221
|
+
flex: 1 1;
|
|
222
|
+
}
|
|
223
|
+
.prokodo-Tabs__tab--selected {
|
|
224
|
+
color: var(--color-primary-900);
|
|
225
|
+
}
|
|
226
|
+
.prokodo-Tabs__tab--selected::after {
|
|
227
|
+
background: var(--gradient-border-4);
|
|
228
|
+
transform: scaleX(1);
|
|
229
|
+
}
|
|
230
|
+
.prokodo-Tabs__tab--disabled {
|
|
231
|
+
color: var(--color-grey-500);
|
|
232
|
+
cursor: not-allowed;
|
|
233
|
+
opacity: 0.58;
|
|
234
|
+
}
|
|
235
|
+
.prokodo-Tabs__tab--disabled:hover {
|
|
236
|
+
background: transparent;
|
|
237
|
+
}
|
|
238
|
+
.prokodo-Tabs__tab--disabled::after {
|
|
239
|
+
background: transparent;
|
|
240
|
+
}
|
|
241
|
+
.prokodo-Tabs__list--vertical .prokodo-Tabs__tab {
|
|
242
|
+
justify-content: flex-start;
|
|
243
|
+
text-align: left;
|
|
244
|
+
}
|
|
245
|
+
.prokodo-Tabs__list--vertical .prokodo-Tabs__tab::after {
|
|
246
|
+
bottom: 0;
|
|
247
|
+
height: auto;
|
|
248
|
+
left: 0;
|
|
249
|
+
right: auto;
|
|
250
|
+
top: 0;
|
|
251
|
+
transform: scaleY(0.35);
|
|
252
|
+
transform-origin: center;
|
|
253
|
+
width: 3px;
|
|
254
|
+
}
|
|
255
|
+
.prokodo-Tabs__list--vertical .prokodo-Tabs__tab--selected::after {
|
|
256
|
+
transform: scaleY(1);
|
|
257
|
+
}
|
|
258
|
+
.prokodo-Tabs__tabLabel {
|
|
259
|
+
display: -webkit-box;
|
|
260
|
+
-webkit-line-clamp: 1;
|
|
261
|
+
-webkit-box-orient: vertical;
|
|
262
|
+
overflow: hidden;
|
|
263
|
+
}
|
|
264
|
+
.prokodo-Tabs__badge {
|
|
265
|
+
align-items: center;
|
|
266
|
+
background: var(--color-grey-200);
|
|
267
|
+
border-radius: px-to-rem(999px);
|
|
268
|
+
color: var(--color-grey-700);
|
|
269
|
+
display: inline-flex;
|
|
270
|
+
justify-content: center;
|
|
271
|
+
min-width: px-to-rem(20px);
|
|
272
|
+
padding: 0 0.25rem;
|
|
273
|
+
font-size: px-to-rem(12px);
|
|
274
|
+
font-weight: 400;
|
|
275
|
+
font-size: 1.125rem;
|
|
276
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
277
|
+
font-style: normal;
|
|
278
|
+
line-height: 1.55;
|
|
279
|
+
letter-spacing: 0.03em;
|
|
280
|
+
text-transform: none;
|
|
281
|
+
text-align: left;
|
|
282
|
+
text-decoration: none;
|
|
283
|
+
}
|
|
284
|
+
@media screen and (min-width: 480px) {
|
|
285
|
+
.prokodo-Tabs__badge {
|
|
286
|
+
font-size: 1rem;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
@media screen and (min-width: 960px) {
|
|
290
|
+
.prokodo-Tabs__badge {
|
|
291
|
+
font-size: 1rem;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
.prokodo-Tabs__badgeChip {
|
|
295
|
+
pointer-events: none;
|
|
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-Tabs__badgeChip {
|
|
308
|
+
font-size: 0.875rem;
|
|
309
|
+
line-height: 1.4;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
@media screen and (min-width: 960px) {
|
|
313
|
+
.prokodo-Tabs__badgeChip {
|
|
314
|
+
font-size: 0.875rem;
|
|
315
|
+
line-height: 1.4;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
.prokodo-Tabs__panel {
|
|
319
|
+
background: transparent;
|
|
320
|
+
border-radius: 0;
|
|
321
|
+
box-shadow: none;
|
|
322
|
+
padding: 1rem;
|
|
323
|
+
}
|
|
324
|
+
.prokodo-Tabs__panel[hidden] {
|
|
325
|
+
display: none !important;
|
|
326
|
+
}
|
|
327
|
+
.prokodo-Tabs__panel:focus-visible {
|
|
328
|
+
outline: 0;
|
|
329
|
+
background: var(--gradient-border-4);
|
|
330
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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 TabsServer from "./Tabs.server.js";
|
|
5
|
+
const Tabs = createIsland({
|
|
6
|
+
name: "Tabs",
|
|
7
|
+
Server: TabsServer,
|
|
8
|
+
loadLazy: /* @__PURE__ */ __name(() => import("./Tabs.lazy.js"), "loadLazy"),
|
|
9
|
+
isInteractive: /* @__PURE__ */ __name(() => true, "isInteractive")
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
Tabs
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
+
import { createLazyWrapper } from "../../helpers/createLazyWrapper.js";
|
|
5
|
+
import TabsClient from "./Tabs.client.js";
|
|
6
|
+
import TabsServer from "./Tabs.server.js";
|
|
7
|
+
const Tabs_lazy = createLazyWrapper({
|
|
8
|
+
name: "Tabs",
|
|
9
|
+
Client: TabsClient,
|
|
10
|
+
Server: TabsServer,
|
|
11
|
+
isInteractive: /* @__PURE__ */ __name(() => true, "isInteractive")
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
Tabs_lazy as default
|
|
15
|
+
};
|