@prokodo/ui 1.0.4 → 1.0.5

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 (43) hide show
  1. package/dist/components/animatedText/AnimatedText.server.js +2 -2
  2. package/dist/components/card/Card.client.js +0 -2
  3. package/dist/components/carousel/Carousel.client.js +14 -9
  4. package/dist/components/datePicker/DatePicker.client.js +36 -3
  5. package/dist/components/datePicker/DatePicker.css +2 -2
  6. package/dist/components/datePicker/DatePicker.module.css +2 -2
  7. package/dist/components/datePicker/DatePicker.view.js +3 -1
  8. package/dist/components/datePicker/DatePickerDialog.view.js +3 -1
  9. package/dist/components/dialog/Dialog.client.js +8 -0
  10. package/dist/components/dialog/Dialog.css +3 -5
  11. package/dist/components/dialog/Dialog.module.css +3 -5
  12. package/dist/components/dialog/Dialog.module.scss.js +1 -1
  13. package/dist/components/form/FormField.client.js +7 -5
  14. package/dist/components/image/Image.client.js +8 -4
  15. package/dist/components/image/Image.server.js +6 -3
  16. package/dist/components/input/Input.css +1 -1
  17. package/dist/components/input/Input.module.css +1 -1
  18. package/dist/components/input/Input.view.js +3 -3
  19. package/dist/components/list/List.css +0 -3
  20. package/dist/components/list/List.module.css +0 -3
  21. package/dist/components/select/Select.client.js +13 -3
  22. package/dist/components/select/Select.css +10 -27
  23. package/dist/components/select/Select.module.css +10 -27
  24. package/dist/components/snackbar/Snackbar.css +36 -0
  25. package/dist/components/snackbar/Snackbar.module.css +36 -0
  26. package/dist/components/snackbar/Snackbar.module.scss.js +6 -0
  27. package/dist/components/stepper/Stepper.css +11 -31
  28. package/dist/components/stepper/Stepper.module.css +11 -31
  29. package/dist/components/table/Table.css +9 -0
  30. package/dist/components/table/Table.js +2 -1
  31. package/dist/components/table/Table.module.css +9 -0
  32. package/dist/components/table/Table.module.scss.js +2 -0
  33. package/dist/components/tooltip/Tooltip.client.js +6 -2
  34. package/dist/constants/project.js +1 -1
  35. package/dist/theme.css +75 -71
  36. package/dist/tsconfig.build.tsbuildinfo +1 -1
  37. package/dist/types/components/datePicker/DatePicker.model.d.ts +2 -1
  38. package/dist/types/components/datePicker/DatePicker.view.d.ts +3 -2
  39. package/dist/types/components/datePicker/DatePickerDialog.view.d.ts +1 -1
  40. package/dist/types/components/form/Form.model.d.ts +5 -0
  41. package/dist/types/components/input/Input.view.d.ts +1 -1
  42. package/dist/types/components/select/Select.model.d.ts +2 -0
  43. package/package.json +1 -1
@@ -3,8 +3,8 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { AnimatedTextView } from "./AnimatedText.view.js";
5
5
  function AnimatedTextServer(props) {
6
- const { children: _ignored, ...rest } = props;
7
- return /* @__PURE__ */ jsx(AnimatedTextView, { ...rest, text: "" });
6
+ const { children, ...rest } = props;
7
+ return /* @__PURE__ */ jsx(AnimatedTextView, { ...rest, text: children });
8
8
  }
9
9
  __name(AnimatedTextServer, "AnimatedTextServer");
10
10
  export {
@@ -31,7 +31,6 @@ function CardClient({
31
31
  },
32
32
  [onClick, onKeyDown, disabled]
33
33
  );
34
- const linkRole = isString(redirect == null ? void 0 : redirect.href) && !Boolean(disabled) ? "link" : void 0;
35
34
  const linkTabIndex = isString(redirect == null ? void 0 : redirect.href) && !Boolean(disabled) ? 0 : void 0;
36
35
  return /* @__PURE__ */ jsx(
37
36
  CardView,
@@ -40,7 +39,6 @@ function CardClient({
40
39
  disabled,
41
40
  isClickable,
42
41
  redirect,
43
- role: linkRole,
44
42
  tabIndex: linkTabIndex,
45
43
  onClick: !Boolean(disabled) ? handleClickVoid : void 0,
46
44
  onKeyDown: handleKey,
@@ -180,15 +180,20 @@ function CarouselClient(props) {
180
180
  transform: getTransformValue(),
181
181
  transition: transitioning ? "transform 0.3s ease-in-out" : "none"
182
182
  },
183
- children: items.map((child, i) => /* @__PURE__ */ jsx(
184
- "div",
185
- {
186
- className: bem("item", void 0, classNameItem),
187
- style: { width: `${100 / effectiveItemsToShow}%` },
188
- children: child
189
- },
190
- `cl-${i}`
191
- ))
183
+ children: items.map((child, i) => {
184
+ const isClone = i < effectiveItemsToShow || i >= effectiveItemsToShow + num;
185
+ return /* @__PURE__ */ jsx(
186
+ "div",
187
+ {
188
+ "aria-hidden": isClone || void 0,
189
+ className: bem("item", void 0, classNameItem),
190
+ inert: isClone || void 0,
191
+ style: { width: `${100 / effectiveItemsToShow}%` },
192
+ children: child
193
+ },
194
+ `cl-${i}`
195
+ );
196
+ })
192
197
  }
193
198
  ),
194
199
  /* @__PURE__ */ jsx(
@@ -46,6 +46,7 @@ const DatePickerClient = /* @__PURE__ */ __name(({
46
46
  const [isOpen, setIsOpen] = useState(false);
47
47
  const [isMobile, setIsMobile] = useState(false);
48
48
  const [viewMode, setViewMode] = useState("days");
49
+ const [triggerRect, setTriggerRect] = useState(null);
49
50
  const viewModeRef = useRef("days");
50
51
  viewModeRef.current = viewMode;
51
52
  const swipeTouchStart = useRef(null);
@@ -100,7 +101,12 @@ const DatePickerClient = /* @__PURE__ */ __name(({
100
101
  useEffect(() => {
101
102
  if (!isOpen || isMobile) return;
102
103
  function handlePointerDown(e) {
103
- if (rootRef.current && !rootRef.current.contains(e.target)) {
104
+ var _a;
105
+ const target = e.target;
106
+ const inRoot = (_a = rootRef.current) == null ? void 0 : _a.contains(target);
107
+ const dialogEl = document.getElementById(`${name}-dialog`);
108
+ const inDialog = dialogEl == null ? void 0 : dialogEl.contains(target);
109
+ if (!inRoot && !inDialog) {
104
110
  setIsOpen(false);
105
111
  setDraft(date);
106
112
  }
@@ -108,7 +114,23 @@ const DatePickerClient = /* @__PURE__ */ __name(({
108
114
  __name(handlePointerDown, "handlePointerDown");
109
115
  document.addEventListener("pointerdown", handlePointerDown);
110
116
  return () => document.removeEventListener("pointerdown", handlePointerDown);
111
- }, [isOpen, isMobile, date]);
117
+ }, [isOpen, isMobile, date, name]);
118
+ useEffect(() => {
119
+ if (!isOpen || isMobile || !rootRef.current) return;
120
+ function sync() {
121
+ const el = rootRef.current;
122
+ if (!el) return;
123
+ const r = el.getBoundingClientRect();
124
+ setTriggerRect({ top: r.bottom, left: r.left, width: r.width });
125
+ }
126
+ __name(sync, "sync");
127
+ document.addEventListener("scroll", sync, true);
128
+ window.addEventListener("resize", sync);
129
+ return () => {
130
+ document.removeEventListener("scroll", sync, true);
131
+ window.removeEventListener("resize", sync);
132
+ };
133
+ }, [isOpen, isMobile]);
112
134
  const validateDate = useCallback(
113
135
  (d) => {
114
136
  if (isNull(d)) {
@@ -143,6 +165,10 @@ const DatePickerClient = /* @__PURE__ */ __name(({
143
165
  setViewingMonth(date ?? dayjs());
144
166
  setDraft(date);
145
167
  setViewMode("days");
168
+ if (rootRef.current) {
169
+ const r = rootRef.current.getBoundingClientRect();
170
+ setTriggerRect({ top: r.bottom, left: r.left, width: r.width });
171
+ }
146
172
  }
147
173
  return !prev;
148
174
  });
@@ -218,6 +244,12 @@ const DatePickerClient = /* @__PURE__ */ __name(({
218
244
  },
219
245
  []
220
246
  );
247
+ const dialogStyle = !isMobile && triggerRect ? {
248
+ position: "fixed",
249
+ top: triggerRect.top + 8,
250
+ left: triggerRect.left,
251
+ zIndex: 1400
252
+ } : void 0;
221
253
  return /* @__PURE__ */ jsx(
222
254
  "div",
223
255
  {
@@ -228,7 +260,8 @@ const DatePickerClient = /* @__PURE__ */ __name(({
228
260
  {
229
261
  ...rest,
230
262
  color,
231
- dialogPortalTarget: isMobile ? document.body : null,
263
+ dialogPortalTarget: document.body,
264
+ dialogStyle,
232
265
  errorText: error,
233
266
  format: fmt,
234
267
  helperText,
@@ -280,7 +280,7 @@ html[data-theme=dark] .prokodo-DatePicker--info, [data-theme=dark] .prokodo-Date
280
280
  position: absolute;
281
281
  top: calc(100% + var(--pk-space-xs));
282
282
  left: 0;
283
- z-index: 200;
283
+ z-index: var(--pk-z-popover, 1400);
284
284
  min-width: var(--pk-dp-dialog-min-width);
285
285
  width: -moz-max-content;
286
286
  width: max-content;
@@ -340,7 +340,7 @@ html[data-theme=dark] .prokodo-DatePicker__dialog, [data-theme=dark] .prokodo-Da
340
340
  display: block;
341
341
  position: fixed;
342
342
  inset: 0;
343
- z-index: 199;
343
+ z-index: var(--pk-z-popover, 1400);
344
344
  background: rgba(0, 0, 0, 0.5);
345
345
  backdrop-filter: blur(4px);
346
346
  -webkit-backdrop-filter: blur(4px);
@@ -280,7 +280,7 @@ html[data-theme=dark] .prokodo-DatePicker--info, [data-theme=dark] .prokodo-Date
280
280
  position: absolute;
281
281
  top: calc(100% + var(--pk-space-xs));
282
282
  left: 0;
283
- z-index: 200;
283
+ z-index: var(--pk-z-popover, 1400);
284
284
  min-width: var(--pk-dp-dialog-min-width);
285
285
  width: -moz-max-content;
286
286
  width: max-content;
@@ -340,7 +340,7 @@ html[data-theme=dark] .prokodo-DatePicker__dialog, [data-theme=dark] .prokodo-Da
340
340
  display: block;
341
341
  position: fixed;
342
342
  inset: 0;
343
- z-index: 199;
343
+ z-index: var(--pk-z-popover, 1400);
344
344
  background: rgba(0, 0, 0, 0.5);
345
345
  backdrop-filter: blur(4px);
346
346
  -webkit-backdrop-filter: blur(4px);
@@ -52,7 +52,8 @@ function DatePickerView({
52
52
  viewMode,
53
53
  onViewModeChange,
54
54
  onMonthSelect,
55
- onYearSelect
55
+ onYearSelect,
56
+ dialogStyle
56
57
  }) {
57
58
  const effectiveFormat = format ?? (withTime ? "YYYY-MM-DDTHH:mm" : "YYYY-MM-DD");
58
59
  const displayValue = (selectedDate == null ? void 0 : selectedDate.format(effectiveFormat)) ?? "";
@@ -103,6 +104,7 @@ function DatePickerView({
103
104
  prevAriaLabel,
104
105
  prevIcon,
105
106
  selectedDate,
107
+ style: dialogStyle,
106
108
  timeLabel,
107
109
  todayLabel,
108
110
  viewingMonth,
@@ -42,7 +42,8 @@ function DatePickerDialog({
42
42
  viewMode = "days",
43
43
  onViewModeChange,
44
44
  onMonthSelect,
45
- onYearSelect
45
+ onYearSelect,
46
+ style
46
47
  }) {
47
48
  const calendarDays = buildCalendarGrid(viewingMonth, minDate, maxDate);
48
49
  const hours = buildHours();
@@ -63,6 +64,7 @@ function DatePickerDialog({
63
64
  "aria-modal": "true",
64
65
  id: `${name}-dialog`,
65
66
  role: "dialog",
67
+ style,
66
68
  className: [
67
69
  bem("dialog"),
68
70
  dialogColor ? bem(void 0, { [dialogColor]: true }) : ""
@@ -45,6 +45,14 @@ function DialogClient({
45
45
  useEffect(() => {
46
46
  if (open) openDialog();
47
47
  }, [open, openDialog]);
48
+ useEffect(() => {
49
+ if (!isOpen) return;
50
+ const prev = document.body.style.overflow;
51
+ document.body.style.overflow = "hidden";
52
+ return () => {
53
+ document.body.style.overflow = prev;
54
+ };
55
+ }, [isOpen]);
48
56
  useEffect(() => {
49
57
  if (!isOpen) return;
50
58
  const handleKey = /* @__PURE__ */ __name((e) => {
@@ -150,6 +150,9 @@
150
150
  align-items: center;
151
151
  z-index: var(--pk-z-modal);
152
152
  }
153
+ .prokodo-Dialog--is-visible {
154
+ display: flex;
155
+ }
153
156
  .prokodo-Dialog__backdrop {
154
157
  display: none;
155
158
  position: fixed;
@@ -158,16 +161,11 @@
158
161
  align-items: center;
159
162
  z-index: var(--pk-z-modal);
160
163
  background-color: rgb(var(--pk-color-overlay-rgb)/var(--pk-color-overlay-alpha));
161
- }
162
- .prokodo-Dialog__backdrop {
163
164
  animation: Dialog_backdropFadeIn var(--pk-timing-normal) ease;
164
165
  }
165
166
  .prokodo-Dialog__backdrop--is-visible {
166
167
  display: flex;
167
168
  }
168
- .prokodo-Dialog--is-visible {
169
- display: flex;
170
- }
171
169
  .prokodo-Dialog__backdrop .prokodo-Dialog, .prokodo-Dialog__backdrop .prokodo-Dialog--is-visible {
172
170
  position: static;
173
171
  inset: auto;
@@ -150,6 +150,9 @@
150
150
  align-items: center;
151
151
  z-index: var(--pk-z-modal);
152
152
  }
153
+ .prokodo-Dialog--is-visible {
154
+ display: flex;
155
+ }
153
156
  .prokodo-Dialog__backdrop {
154
157
  display: none;
155
158
  position: fixed;
@@ -158,16 +161,11 @@
158
161
  align-items: center;
159
162
  z-index: var(--pk-z-modal);
160
163
  background-color: rgb(var(--pk-color-overlay-rgb)/var(--pk-color-overlay-alpha));
161
- }
162
- .prokodo-Dialog__backdrop {
163
164
  animation: Dialog_backdropFadeIn var(--pk-timing-normal) ease;
164
165
  }
165
166
  .prokodo-Dialog__backdrop--is-visible {
166
167
  display: flex;
167
168
  }
168
- .prokodo-Dialog--is-visible {
169
- display: flex;
170
- }
171
169
  .prokodo-Dialog__backdrop .prokodo-Dialog, .prokodo-Dialog__backdrop .prokodo-Dialog--is-visible {
172
170
  position: static;
173
171
  inset: auto;
@@ -2,10 +2,10 @@ const Dialog_backdropFadeIn = "Dialog_backdropFadeIn";
2
2
  const Dialog_fadeIn = "Dialog_fadeIn";
3
3
  const styles = {
4
4
  "prokodo-Dialog": "prokodo-Dialog",
5
+ "prokodo-Dialog--is-visible": "prokodo-Dialog--is-visible",
5
6
  "prokodo-Dialog__backdrop": "prokodo-Dialog__backdrop",
6
7
  Dialog_backdropFadeIn,
7
8
  "prokodo-Dialog__backdrop--is-visible": "prokodo-Dialog__backdrop--is-visible",
8
- "prokodo-Dialog--is-visible": "prokodo-Dialog--is-visible",
9
9
  "prokodo-Dialog__container": "prokodo-Dialog__container",
10
10
  Dialog_fadeIn,
11
11
  "prokodo-Dialog__container--fullScreen": "prokodo-Dialog__container--fullScreen",
@@ -26,7 +26,7 @@ function FormFieldClient({
26
26
  onValidate,
27
27
  ...props
28
28
  }) {
29
- var _a, _b, _c, _d;
29
+ var _a, _b, _c, _d, _e, _f;
30
30
  const renderFieldContainer = useCallback(
31
31
  (children) => /* @__PURE__ */ jsx(GridRow, { className: bem(), xs: 12, children }),
32
32
  []
@@ -66,6 +66,8 @@ function FormFieldClient({
66
66
  priority: true,
67
67
  color,
68
68
  ...props,
69
+ closeAriaLabel: props.closeAriaLabel ?? ((_a = messagesFields == null ? void 0 : messagesFields.select) == null ? void 0 : _a.closeAriaLabel),
70
+ doneLabel: props.doneLabel ?? ((_b = messagesFields == null ? void 0 : messagesFields.select) == null ? void 0 : _b.doneLabel),
69
71
  onChange: (
70
72
  /* istanbul ignore next */
71
73
  /* @__PURE__ */ __name((_, value) => onChange == null ? void 0 : onChange(props, value ?? void 0), "onChange")
@@ -80,7 +82,7 @@ function FormFieldClient({
80
82
  {
81
83
  priority: true,
82
84
  color,
83
- errorTranslations: (_a = messagesFields == null ? void 0 : messagesFields.errors) == null ? void 0 : _a.input,
85
+ errorTranslations: (_c = messagesFields == null ? void 0 : messagesFields.errors) == null ? void 0 : _c.input,
84
86
  onValidate: /* @__PURE__ */ __name((_, err) => onValidate == null ? void 0 : onValidate(props, err), "onValidate"),
85
87
  onChange: /* @__PURE__ */ __name((e) => onChange == null ? void 0 : onChange(props, e.target.value), "onChange"),
86
88
  ...props
@@ -95,7 +97,7 @@ function FormFieldClient({
95
97
  priority: true,
96
98
  color,
97
99
  ...props,
98
- translations: (_b = messagesFields == null ? void 0 : messagesFields.errors) == null ? void 0 : _b.date,
100
+ translations: (_d = messagesFields == null ? void 0 : messagesFields.errors) == null ? void 0 : _d.date,
99
101
  onValidate: /* @__PURE__ */ __name((_, err) => onValidate == null ? void 0 : onValidate(props, err), "onValidate"),
100
102
  onChange: /* @__PURE__ */ __name((value) => onChange == null ? void 0 : onChange(
101
103
  props,
@@ -117,7 +119,7 @@ function FormFieldClient({
117
119
  color,
118
120
  ...p,
119
121
  value: p == null ? void 0 : p.value,
120
- fields: (_c = p == null ? void 0 : p.fields) == null ? void 0 : _c.map((field) => ({
122
+ fields: (_e = p == null ? void 0 : p.fields) == null ? void 0 : _e.map((field) => ({
121
123
  ...field,
122
124
  onValidate: /* @__PURE__ */ __name((_, err) => onValidate == null ? void 0 : onValidate(p, err), "onValidate")
123
125
  })),
@@ -133,7 +135,7 @@ function FormFieldClient({
133
135
  priority: true,
134
136
  color,
135
137
  ...props,
136
- errorTranslations: (_d = messagesFields == null ? void 0 : messagesFields.errors) == null ? void 0 : _d.input,
138
+ errorTranslations: (_f = messagesFields == null ? void 0 : messagesFields.errors) == null ? void 0 : _f.input,
137
139
  onValidate: /* @__PURE__ */ __name((_, err) => onValidate == null ? void 0 : onValidate(props, err), "onValidate"),
138
140
  onChange: /* @__PURE__ */ __name((e) => {
139
141
  var _a2;
@@ -44,10 +44,13 @@ function toPlainImgProps(p) {
44
44
  width,
45
45
  height
46
46
  };
47
- if (Boolean(priority)) {
48
- imgProps.loading = "eager";
49
- imgProps.fetchPriority = "high";
47
+ if (!Boolean(priority)) {
48
+ imgProps.loading = "lazy";
50
49
  }
50
+ imgProps.decoding = "async";
51
+ imgProps["data-nimg"] = "1";
52
+ imgProps.style = { color: "transparent", ...imgProps.style };
53
+ imgProps["suppressHydrationWarning"] = true;
51
54
  return imgProps;
52
55
  }
53
56
  __name(toPlainImgProps, "toPlainImgProps");
@@ -63,13 +66,14 @@ const ImageClient = /* @__PURE__ */ __name(({
63
66
  const renderImage = /* @__PURE__ */ __name(() => {
64
67
  if (ctxImage !== void 0) {
65
68
  const CustomImage = ctxImage;
69
+ const ctxProps = { ...rawProps, suppressHydrationWarning: true };
66
70
  return /* @__PURE__ */ jsx(
67
71
  CustomImage,
68
72
  {
69
73
  alt: alt ?? /* istanbul ignore next */
70
74
  "",
71
75
  className: bem("image", void 0, className),
72
- ...rawProps
76
+ ...ctxProps
73
77
  }
74
78
  );
75
79
  }
@@ -39,10 +39,13 @@ function toImgOnlyProps(p) {
39
39
  width,
40
40
  height
41
41
  };
42
- if (Boolean(priority)) {
43
- imgProps.loading = "eager";
44
- imgProps.fetchPriority = "high";
42
+ if (!Boolean(priority)) {
43
+ imgProps.loading = "lazy";
45
44
  }
45
+ imgProps.decoding = "async";
46
+ imgProps["data-nimg"] = "1";
47
+ imgProps.style = { color: "transparent", ...imgProps.style };
48
+ imgProps["suppressHydrationWarning"] = true;
46
49
  return imgProps;
47
50
  }
48
51
  __name(toImgOnlyProps, "toImgOnlyProps");
@@ -472,7 +472,7 @@ html[data-theme=dark] .prokodo-Input--info, [data-theme=dark] .prokodo-Input--in
472
472
  }
473
473
  .prokodo-Input__counter {
474
474
  padding-top: var(--pk-space-md);
475
- color: var(--pk-palette-grey-600);
475
+ color: var(--pk-input-helper-fg);
476
476
  font-weight: 400;
477
477
  font-size: 1rem;
478
478
  font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
@@ -472,7 +472,7 @@ html[data-theme=dark] .prokodo-Input--info, [data-theme=dark] .prokodo-Input--in
472
472
  }
473
473
  .prokodo-Input__counter {
474
474
  padding-top: var(--pk-space-md);
475
- color: var(--pk-palette-grey-600);
475
+ color: var(--pk-input-helper-fg);
476
476
  font-weight: 400;
477
477
  font-size: 1rem;
478
478
  font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
@@ -28,7 +28,7 @@ function InputView({
28
28
  inputClassName,
29
29
  hideCounter,
30
30
  rows,
31
- hideLegend: _hideLegend,
31
+ hideLegend,
32
32
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
33
33
  minRows,
34
34
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -76,14 +76,14 @@ function InputView({
76
76
  }
77
77
  ),
78
78
  /* @__PURE__ */ jsxs("div", { className: bem("field", void 0, fieldClassName), children: [
79
- typeof label === "string" && /* @__PURE__ */ jsx(
79
+ !hideLegend && /* @__PURE__ */ jsx(
80
80
  "fieldset",
81
81
  {
82
82
  "aria-hidden": "true",
83
83
  className: bem("notch", {
84
84
  "is-focused": Boolean(isFocused) || hasValue
85
85
  }),
86
- children: /* @__PURE__ */ jsx("legend", { className: bem("notchLegend"), children: /* @__PURE__ */ jsx("span", { children: label }) })
86
+ children: typeof label === "string" && /* @__PURE__ */ jsx("legend", { className: bem("notchLegend"), children: /* @__PURE__ */ jsx("span", { children: label }) })
87
87
  }
88
88
  ),
89
89
  /* @__PURE__ */ jsx(
@@ -211,9 +211,6 @@
211
211
  border-radius: 1000rem;
212
212
  background-color: var(--pk-color-surface-raised);
213
213
  }
214
- html[data-theme=dark] .prokodo-List__item__icon {
215
- background-color: var(--pk-palette-grey-400);
216
- }
217
214
  .prokodo-List__item__icon__wrapper {
218
215
  display: flex;
219
216
  align-items: center;
@@ -211,9 +211,6 @@
211
211
  border-radius: 1000rem;
212
212
  background-color: var(--pk-color-surface-raised);
213
213
  }
214
- html[data-theme=dark] .prokodo-List__item__icon {
215
- background-color: var(--pk-palette-grey-400);
216
- }
217
214
  .prokodo-List__item__icon__wrapper {
218
215
  display: flex;
219
216
  align-items: center;
@@ -49,6 +49,7 @@ function SelectClient({
49
49
  const [popupReady, setPopupReady] = useState(false);
50
50
  const [isMobile, setIsMobile] = useState(false);
51
51
  const sheetSwipeStart = useRef(null);
52
+ const didInitFocus = useRef(false);
52
53
  const hasPlaceholder = !Boolean(required) && !Boolean(multiple);
53
54
  const optionCount = (hasPlaceholder ? 1 : 0) + items.length;
54
55
  useEffect(() => {
@@ -114,7 +115,12 @@ function SelectClient({
114
115
  []
115
116
  );
116
117
  useEffect(() => {
117
- if (!open || !popupReady) return;
118
+ if (!open) {
119
+ didInitFocus.current = false;
120
+ return;
121
+ }
122
+ if (!popupReady || didInitFocus.current) return;
123
+ didInitFocus.current = true;
118
124
  setActiveIndex(valueToIndex());
119
125
  requestAnimationFrame(() => {
120
126
  var _a;
@@ -150,6 +156,10 @@ function SelectClient({
150
156
  window.removeEventListener("scroll", onScroll, true);
151
157
  };
152
158
  }, [open, updatePopupPosition]);
159
+ useEffect(() => {
160
+ if (!open) return;
161
+ requestAnimationFrame(() => updatePopupPosition());
162
+ }, [val, open, updatePopupPosition]);
153
163
  useEffect(() => {
154
164
  if (!open) return;
155
165
  const handleOutside = /* @__PURE__ */ __name((e) => {
@@ -326,7 +336,7 @@ function SelectClient({
326
336
  /* @__PURE__ */ jsx(
327
337
  "button",
328
338
  {
329
- "aria-label": "Close",
339
+ "aria-label": rest.closeAriaLabel ?? "Close",
330
340
  className: bem("sheet__close"),
331
341
  type: "button",
332
342
  onClick: close,
@@ -419,7 +429,7 @@ function SelectClient({
419
429
  className: bem("sheet__done"),
420
430
  type: "button",
421
431
  onClick: close,
422
- children: "Done"
432
+ children: rest.doneLabel ?? "Done"
423
433
  }
424
434
  ) })
425
435
  ]
@@ -556,7 +556,7 @@ html[data-theme=dark] .prokodo-Select__listbox, [data-theme=dark] .prokodo-Selec
556
556
  .prokodo-Select__sheet__backdrop {
557
557
  position: fixed;
558
558
  inset: 0;
559
- z-index: 199;
559
+ z-index: var(--pk-z-popover, 1400);
560
560
  background: rgba(0, 0, 0, 0.5);
561
561
  backdrop-filter: blur(4px);
562
562
  -webkit-backdrop-filter: blur(4px);
@@ -567,7 +567,7 @@ html[data-theme=dark] .prokodo-Select__listbox, [data-theme=dark] .prokodo-Selec
567
567
  bottom: 0;
568
568
  left: 0;
569
569
  right: 0;
570
- z-index: 200;
570
+ z-index: calc(var(--pk-z-popover, 1400) + 1);
571
571
  box-sizing: border-box;
572
572
  display: flex;
573
573
  flex-direction: column;
@@ -759,35 +759,18 @@ html[data-theme=dark] .prokodo-Select__sheet, [data-theme=dark] .prokodo-Select_
759
759
  }
760
760
  .prokodo-Select__sheet__done {
761
761
  width: 100%;
762
- padding: 0.75rem;
763
- border-radius: var(--pk-select-radius, 8px);
762
+ height: 3rem;
763
+ padding: var(--pk-space-xs, 0.25rem) var(--pk-space-sm, 0.5rem);
764
+ border-radius: var(--pk-radius-lg, 12px);
764
765
  border: none;
765
766
  cursor: pointer;
766
- font-weight: 700;
767
- background: linear-gradient(90deg, var(--pk-select-gradient-from), var(--pk-select-gradient-to));
767
+ font-size: 0.9375rem;
768
+ font-weight: 600;
769
+ text-align: center;
770
+ background: linear-gradient(135deg, var(--pk-select-gradient-from), var(--pk-select-gradient-to));
768
771
  color: #fff;
772
+ box-shadow: 0 4px 16px color-mix(in srgb, var(--pk-select-gradient-from) 30%, transparent);
769
773
  transition: opacity var(--pk-timing-fast) ease;
770
- font-weight: 700;
771
- font-size: 1.75rem;
772
- font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
773
- font-style: normal;
774
- line-height: 1.6;
775
- letter-spacing: 0.03em;
776
- text-transform: none;
777
- text-align: left;
778
- text-decoration: none;
779
- }
780
- @media screen and (min-width: 480px) {
781
- .prokodo-Select__sheet__done {
782
- font-size: 1.5rem;
783
- line-height: 1.55;
784
- }
785
- }
786
- @media screen and (min-width: 960px) {
787
- .prokodo-Select__sheet__done {
788
- font-size: 1.5rem;
789
- line-height: 1.55;
790
- }
791
774
  }
792
775
  .prokodo-Select__sheet__done:hover {
793
776
  opacity: 0.9;
@@ -556,7 +556,7 @@ html[data-theme=dark] .prokodo-Select__listbox, [data-theme=dark] .prokodo-Selec
556
556
  .prokodo-Select__sheet__backdrop {
557
557
  position: fixed;
558
558
  inset: 0;
559
- z-index: 199;
559
+ z-index: var(--pk-z-popover, 1400);
560
560
  background: rgba(0, 0, 0, 0.5);
561
561
  backdrop-filter: blur(4px);
562
562
  -webkit-backdrop-filter: blur(4px);
@@ -567,7 +567,7 @@ html[data-theme=dark] .prokodo-Select__listbox, [data-theme=dark] .prokodo-Selec
567
567
  bottom: 0;
568
568
  left: 0;
569
569
  right: 0;
570
- z-index: 200;
570
+ z-index: calc(var(--pk-z-popover, 1400) + 1);
571
571
  box-sizing: border-box;
572
572
  display: flex;
573
573
  flex-direction: column;
@@ -759,35 +759,18 @@ html[data-theme=dark] .prokodo-Select__sheet, [data-theme=dark] .prokodo-Select_
759
759
  }
760
760
  .prokodo-Select__sheet__done {
761
761
  width: 100%;
762
- padding: 0.75rem;
763
- border-radius: var(--pk-select-radius, 8px);
762
+ height: 3rem;
763
+ padding: var(--pk-space-xs, 0.25rem) var(--pk-space-sm, 0.5rem);
764
+ border-radius: var(--pk-radius-lg, 12px);
764
765
  border: none;
765
766
  cursor: pointer;
766
- font-weight: 700;
767
- background: linear-gradient(90deg, var(--pk-select-gradient-from), var(--pk-select-gradient-to));
767
+ font-size: 0.9375rem;
768
+ font-weight: 600;
769
+ text-align: center;
770
+ background: linear-gradient(135deg, var(--pk-select-gradient-from), var(--pk-select-gradient-to));
768
771
  color: #fff;
772
+ box-shadow: 0 4px 16px color-mix(in srgb, var(--pk-select-gradient-from) 30%, transparent);
769
773
  transition: opacity var(--pk-timing-fast) ease;
770
- font-weight: 700;
771
- font-size: 1.75rem;
772
- font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
773
- font-style: normal;
774
- line-height: 1.6;
775
- letter-spacing: 0.03em;
776
- text-transform: none;
777
- text-align: left;
778
- text-decoration: none;
779
- }
780
- @media screen and (min-width: 480px) {
781
- .prokodo-Select__sheet__done {
782
- font-size: 1.5rem;
783
- line-height: 1.55;
784
- }
785
- }
786
- @media screen and (min-width: 960px) {
787
- .prokodo-Select__sheet__done {
788
- font-size: 1.5rem;
789
- line-height: 1.55;
790
- }
791
774
  }
792
775
  .prokodo-Select__sheet__done:hover {
793
776
  opacity: 0.9;