@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.
Files changed (107) hide show
  1. package/README.md +6 -1
  2. package/dist/components/RTE/RTE.client.js +46 -5
  3. package/dist/components/RTE/RTE.css +226 -6
  4. package/dist/components/RTE/RTE.module.css +226 -6
  5. package/dist/components/RTE/RTE.module.scss.js +3 -0
  6. package/dist/components/RTE/RTE.utils.js +23 -1
  7. package/dist/components/accordion/Accordion.css +46 -0
  8. package/dist/components/accordion/Accordion.module.css +46 -0
  9. package/dist/components/accordion/Accordion.module.scss.js +4 -0
  10. package/dist/components/accordion/Accordion.view.js +25 -5
  11. package/dist/components/autocomplete/Autocomplete.client.js +132 -0
  12. package/dist/components/autocomplete/Autocomplete.css +317 -0
  13. package/dist/components/autocomplete/Autocomplete.js +12 -0
  14. package/dist/components/autocomplete/Autocomplete.lazy.js +12 -0
  15. package/dist/components/autocomplete/Autocomplete.module.css +317 -0
  16. package/dist/components/autocomplete/Autocomplete.module.scss.js +21 -0
  17. package/dist/components/autocomplete/Autocomplete.server.js +11 -0
  18. package/dist/components/autocomplete/Autocomplete.view.js +142 -0
  19. package/dist/components/autocomplete/index.js +4 -0
  20. package/dist/components/button/Button.css +1 -0
  21. package/dist/components/button/Button.module.css +1 -0
  22. package/dist/components/card/Card.css +9 -0
  23. package/dist/components/card/Card.module.css +9 -0
  24. package/dist/components/card/Card.module.scss.js +1 -0
  25. package/dist/components/dynamic-list/DynamicList.view.js +1 -1
  26. package/dist/components/input/Input.css +23 -4
  27. package/dist/components/input/Input.module.css +23 -4
  28. package/dist/components/pagination/Pagination.client.js +14 -0
  29. package/dist/components/pagination/Pagination.css +191 -0
  30. package/dist/components/pagination/Pagination.js +12 -0
  31. package/dist/components/pagination/Pagination.lazy.js +12 -0
  32. package/dist/components/pagination/Pagination.module.css +191 -0
  33. package/dist/components/pagination/Pagination.module.scss.js +12 -0
  34. package/dist/components/pagination/Pagination.server.js +11 -0
  35. package/dist/components/pagination/Pagination.utils.js +55 -0
  36. package/dist/components/pagination/Pagination.view.js +98 -0
  37. package/dist/components/pagination/index.js +4 -0
  38. package/dist/components/rich-text/RichText.css +0 -1
  39. package/dist/components/rich-text/RichText.module.css +0 -1
  40. package/dist/components/select/Select.client.js +230 -8
  41. package/dist/components/select/Select.css +47 -16
  42. package/dist/components/select/Select.module.css +47 -16
  43. package/dist/components/select/Select.module.scss.js +2 -0
  44. package/dist/components/select/Select.view.js +20 -57
  45. package/dist/components/switch/Switch.css +1 -1
  46. package/dist/components/switch/Switch.module.css +1 -1
  47. package/dist/components/switch/Switch.view.js +3 -1
  48. package/dist/components/tabs/Tabs.client.js +182 -0
  49. package/dist/components/tabs/Tabs.css +330 -0
  50. package/dist/components/tabs/Tabs.js +13 -0
  51. package/dist/components/tabs/Tabs.lazy.js +15 -0
  52. package/dist/components/tabs/Tabs.module.css +330 -0
  53. package/dist/components/tabs/Tabs.module.scss.js +19 -0
  54. package/dist/components/tabs/Tabs.server.js +11 -0
  55. package/dist/components/tabs/Tabs.view.js +157 -0
  56. package/dist/components/tabs/index.js +4 -0
  57. package/dist/components/tooltip/Tooltip.client.js +382 -0
  58. package/dist/components/tooltip/Tooltip.css +242 -0
  59. package/dist/components/tooltip/Tooltip.js +16 -0
  60. package/dist/components/tooltip/Tooltip.module.css +242 -0
  61. package/dist/components/tooltip/Tooltip.module.scss.js +15 -0
  62. package/dist/components/tooltip/Tooltip.server.js +12 -0
  63. package/dist/components/tooltip/Tooltip.view.js +127 -0
  64. package/dist/components/tooltip/index.js +4 -0
  65. package/dist/constants/project.js +1 -1
  66. package/dist/index.js +8 -0
  67. package/dist/theme.css +640 -22
  68. package/dist/tsconfig.build.tsbuildinfo +1 -1
  69. package/dist/types/components/RTE/RTE.utils.d.ts +1 -0
  70. package/dist/types/components/accordion/Accordion.d.ts +3 -0
  71. package/dist/types/components/accordion/Accordion.lazy.d.ts +3 -0
  72. package/dist/types/components/accordion/Accordion.model.d.ts +3 -0
  73. package/dist/types/components/accordion/Accordion.view.d.ts +1 -1
  74. package/dist/types/components/autocomplete/Autocomplete.client.d.ts +5 -0
  75. package/dist/types/components/autocomplete/Autocomplete.d.ts +4 -0
  76. package/dist/types/components/autocomplete/Autocomplete.lazy.d.ts +5 -0
  77. package/dist/types/components/autocomplete/Autocomplete.model.d.ts +58 -0
  78. package/dist/types/components/autocomplete/Autocomplete.server.d.ts +3 -0
  79. package/dist/types/components/autocomplete/Autocomplete.view.d.ts +3 -0
  80. package/dist/types/components/autocomplete/index.d.ts +2 -0
  81. package/dist/types/components/card/Card.model.d.ts +1 -1
  82. package/dist/types/components/grid/Grid.model.d.ts +37 -7
  83. package/dist/types/components/pagination/Pagination.client.d.ts +5 -0
  84. package/dist/types/components/pagination/Pagination.d.ts +4 -0
  85. package/dist/types/components/pagination/Pagination.lazy.d.ts +5 -0
  86. package/dist/types/components/pagination/Pagination.model.d.ts +22 -0
  87. package/dist/types/components/pagination/Pagination.server.d.ts +3 -0
  88. package/dist/types/components/pagination/Pagination.utils.d.ts +13 -0
  89. package/dist/types/components/pagination/Pagination.view.d.ts +3 -0
  90. package/dist/types/components/pagination/index.d.ts +2 -0
  91. package/dist/types/components/select/Select.model.d.ts +16 -1
  92. package/dist/types/components/tabs/Tabs.client.d.ts +5 -0
  93. package/dist/types/components/tabs/Tabs.d.ts +4 -0
  94. package/dist/types/components/tabs/Tabs.lazy.d.ts +5 -0
  95. package/dist/types/components/tabs/Tabs.model.d.ts +43 -0
  96. package/dist/types/components/tabs/Tabs.server.d.ts +3 -0
  97. package/dist/types/components/tabs/Tabs.view.d.ts +3 -0
  98. package/dist/types/components/tabs/index.d.ts +2 -0
  99. package/dist/types/components/tooltip/Tooltip.client.d.ts +5 -0
  100. package/dist/types/components/tooltip/Tooltip.d.ts +4 -0
  101. package/dist/types/components/tooltip/Tooltip.lazy.d.ts +5 -0
  102. package/dist/types/components/tooltip/Tooltip.model.d.ts +47 -0
  103. package/dist/types/components/tooltip/Tooltip.server.d.ts +3 -0
  104. package/dist/types/components/tooltip/Tooltip.view.d.ts +3 -0
  105. package/dist/types/components/tooltip/index.d.ts +2 -0
  106. package/dist/types/index.d.ts +4 -0
  107. package/package.json +23 -2
@@ -26,6 +26,7 @@ function SelectView({
26
26
  items,
27
27
  _clientState
28
28
  }) {
29
+ var _a;
29
30
  if (!(items == null ? void 0 : items.length)) return null;
30
31
  const isError = Boolean(errorText);
31
32
  const hasHelper = Boolean(helperText);
@@ -34,7 +35,6 @@ function SelectView({
34
35
  const helperId = hasHelper ? `${id}-helper` : void 0;
35
36
  const open = Boolean(_clientState == null ? void 0 : _clientState.open) ?? false;
36
37
  const btnRef = _clientState == null ? void 0 : _clientState.buttonRef;
37
- const listRef = _clientState == null ? void 0 : _clientState.listRef;
38
38
  const selectedItems = Array.isArray(value) ? items.filter((i) => value.includes(i.value)) : items.filter((i) => i.value === value);
39
39
  const display = selectedItems.length === 0 ? /* @__PURE__ */ jsx(
40
40
  "span",
@@ -47,9 +47,9 @@ function SelectView({
47
47
  children: placeholder
48
48
  }
49
49
  ) : /* @__PURE__ */ jsx("span", { className: bem("button__inner", { expanded: open }), children: selectedItems.map((i, idx) => {
50
- var _a;
50
+ var _a2;
51
51
  return /* @__PURE__ */ jsxs(Fragment, { children: [
52
- Boolean(iconVisible) && ((_a = i.icon) == null ? void 0 : _a.call(i)),
52
+ Boolean(iconVisible) && ((_a2 = i.icon) == null ? void 0 : _a2.call(i)),
53
53
  i.label,
54
54
  idx < selectedItems.length - 1 && ", "
55
55
  ] }, i == null ? void 0 : i.label);
@@ -104,60 +104,23 @@ function SelectView({
104
104
  value: Array.isArray(value) ? value.join(",") : value ?? ""
105
105
  }
106
106
  ),
107
- /* @__PURE__ */ jsxs(
108
- "ul",
109
- {
110
- ref: listRef,
111
- className: bem("listbox", { "is-open": open, "is-closed": !open }),
112
- hidden: !open,
113
- id: listId,
114
- role: "listbox",
115
- tabIndex: -1,
116
- children: [
117
- !Boolean(required) && !Boolean(multiple) && /* @__PURE__ */ jsx(
118
- "li",
119
- {
120
- "aria-selected": selectedItems.length === 0,
121
- className: bem("item", { selected: selectedItems.length === 0 }),
122
- role: "option",
123
- onClick: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(null), "onClick"),
124
- onKeyDown: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(null), "onKeyDown"),
125
- children: placeholder
126
- },
127
- "placeholder"
128
- ),
129
- items.map((opt) => {
130
- var _a;
131
- const selected = Array.isArray(value) ? value.includes(opt.value) : opt.value === value;
132
- return /* @__PURE__ */ jsxs(
133
- "li",
134
- {
135
- "aria-selected": selected,
136
- className: bem("item", { selected }),
137
- role: "option",
138
- onClick: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(opt.value), "onClick"),
139
- onKeyDown: /* @__PURE__ */ __name(() => _clientState == null ? void 0 : _clientState.onOptionClick(opt.value), "onKeyDown"),
140
- children: [
141
- Boolean(multiple) && /* @__PURE__ */ jsx(
142
- "input",
143
- {
144
- readOnly: true,
145
- "aria-hidden": "true",
146
- className: bem("checkbox", { checked: selected }),
147
- defaultChecked: selected,
148
- type: "checkbox"
149
- }
150
- ),
151
- Boolean(iconVisible) && ((_a = opt.icon) == null ? void 0 : _a.call(opt)),
152
- opt.label
153
- ]
154
- },
155
- `${id}-${opt.value}`
156
- );
157
- })
158
- ]
159
- }
160
- )
107
+ (_a = _clientState == null ? void 0 : _clientState.renderListbox) == null ? void 0 : _a.call(_clientState, {
108
+ id: listId,
109
+ className: bem("listbox", { "is-open": open, "is-closed": !open }),
110
+ open,
111
+ required,
112
+ multiple,
113
+ placeholder,
114
+ items,
115
+ value: value ?? (Boolean(multiple) ? [] : ""),
116
+ onOptionClick: /* @__PURE__ */ __name((opt) => {
117
+ var _a2;
118
+ return (_a2 = _clientState == null ? void 0 : _clientState.onOptionClick) == null ? void 0 : _a2.call(_clientState, opt);
119
+ }, "onOptionClick"),
120
+ iconVisible,
121
+ bemItem: /* @__PURE__ */ __name((mods) => bem("item", mods), "bemItem"),
122
+ bemCheckbox: /* @__PURE__ */ __name((mods) => bem("checkbox", mods), "bemCheckbox")
123
+ })
161
124
  ] }),
162
125
  (isError || Boolean(helperText)) && /* @__PURE__ */ jsx(
163
126
  "div",
@@ -203,7 +203,7 @@
203
203
  left: 5px;
204
204
  }
205
205
  .prokodo-Switch__thumb--disabled {
206
- background-color: var(--color-grey-200);
206
+ background-color: var(--color-grey-600);
207
207
  }
208
208
  .prokodo-Switch__thumb {
209
209
  /* Center child icon */
@@ -203,7 +203,7 @@
203
203
  left: 5px;
204
204
  }
205
205
  .prokodo-Switch__thumb--disabled {
206
- background-color: var(--color-grey-200);
206
+ background-color: var(--color-grey-600);
207
207
  }
208
208
  .prokodo-Switch__thumb {
209
209
  /* Center child icon */
@@ -20,7 +20,8 @@ const SwitchView = /* @__PURE__ */ __name(({
20
20
  className,
21
21
  onChangeInternal,
22
22
  onFocusInternal,
23
- onBlurInternal
23
+ onBlurInternal,
24
+ ...props
24
25
  }) => {
25
26
  const hasLabel = typeof label === "string" && label.length > 0;
26
27
  return /* @__PURE__ */ jsxs("div", { className: bem(void 0, { [variant]: true }, className), children: [
@@ -58,6 +59,7 @@ const SwitchView = /* @__PURE__ */ __name(({
58
59
  /* @__PURE__ */ jsx(
59
60
  "input",
60
61
  {
62
+ ...props,
61
63
  "aria-checked": isChecked,
62
64
  "aria-disabled": disabled || void 0,
63
65
  "aria-required": required || void 0,
@@ -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
+ };