@rovula/ui 0.1.42 → 0.1.44

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.
@@ -61,13 +61,15 @@ export type AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOption>
61
61
  listboxClassName?: string;
62
62
  /** Extra inline styles applied to the options list container */
63
63
  listboxStyle?: React.CSSProperties;
64
+ /** Extra inline styles applied to the Popover content wrapper (portal mode only) */
65
+ popoverStyle?: React.CSSProperties;
64
66
  /** Extra className applied to each option item */
65
67
  optionClassName?: string;
66
68
  /** Extra inline styles applied to each option item */
67
69
  optionStyle?: React.CSSProperties;
68
70
  "data-testid"?: string;
69
71
  } & Omit<InputProps, OmittedInputProps>;
70
- declare function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: AutoCompleteProps<T>, ref: React.ForwardedRef<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
72
+ declare function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, popoverStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: AutoCompleteProps<T>, ref: React.ForwardedRef<HTMLInputElement>): import("react/jsx-runtime").JSX.Element;
71
73
  declare const AutoComplete: <T extends AutoCompleteOption = AutoCompleteOption>(props: AutoCompleteProps<T> & {
72
74
  ref?: React.ForwardedRef<HTMLInputElement>;
73
75
  }) => ReturnType<typeof AutoCompleteInner>;
@@ -5,7 +5,7 @@ declare const meta: {
5
5
  title: string;
6
6
  component: <T extends AutoCompleteOption = AutoCompleteOption>(props: import("./AutoComplete").AutoCompleteProps<T> & {
7
7
  ref?: React.ForwardedRef<HTMLInputElement>;
8
- }) => ReturnType<(<T_1 extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: import("./AutoComplete").AutoCompleteProps<T_1>, ref: React.ForwardedRef<HTMLInputElement>) => import("react/jsx-runtime").JSX.Element)>;
8
+ }) => ReturnType<(<T_1 extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, popoverStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: import("./AutoComplete").AutoCompleteProps<T_1>, ref: React.ForwardedRef<HTMLInputElement>) => import("react/jsx-runtime").JSX.Element)>;
9
9
  tags: string[];
10
10
  parameters: {
11
11
  layout: string;
@@ -25,6 +25,7 @@ declare const meta: {
25
25
  portal?: boolean | undefined;
26
26
  listboxClassName?: string | undefined;
27
27
  listboxStyle?: React.CSSProperties | undefined;
28
+ popoverStyle?: React.CSSProperties | undefined;
28
29
  optionClassName?: string | undefined;
29
30
  optionStyle?: React.CSSProperties | undefined;
30
31
  "data-testid"?: string | undefined;
package/dist/index.d.ts CHANGED
@@ -534,13 +534,15 @@ type AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOption> = {
534
534
  listboxClassName?: string;
535
535
  /** Extra inline styles applied to the options list container */
536
536
  listboxStyle?: React__default.CSSProperties;
537
+ /** Extra inline styles applied to the Popover content wrapper (portal mode only) */
538
+ popoverStyle?: React__default.CSSProperties;
537
539
  /** Extra className applied to each option item */
538
540
  optionClassName?: string;
539
541
  /** Extra inline styles applied to each option item */
540
542
  optionStyle?: React__default.CSSProperties;
541
543
  "data-testid"?: string;
542
544
  } & Omit<InputProps, OmittedInputProps>;
543
- declare function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: AutoCompleteProps<T>, ref: React__default.ForwardedRef<HTMLInputElement>): react_jsx_runtime.JSX.Element;
545
+ declare function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>({ options, value, onChange, onSelect, onBlur, onSearch, loading, noOptionsText, showNoOptions, renderOption, filterOptions, portal, listboxClassName, listboxStyle, popoverStyle, optionClassName, optionStyle, "data-testid": testId, id, label, fullwidth, size, rounded, variant, disabled, ...rest }: AutoCompleteProps<T>, ref: React__default.ForwardedRef<HTMLInputElement>): react_jsx_runtime.JSX.Element;
544
546
  declare const AutoComplete: <T extends AutoCompleteOption = AutoCompleteOption>(props: AutoCompleteProps<T> & {
545
547
  ref?: React__default.ForwardedRef<HTMLInputElement>;
546
548
  }) => ReturnType<typeof AutoCompleteInner>;
@@ -830,13 +830,13 @@
830
830
  --bg-bg1-skyller: #ffffff;
831
831
  --bg-bg2-xspector: #0a1b2e;
832
832
  --bg-bg2-report-xspector-light-mode: #ffffff;
833
- --bg-bg2-skyller: #f8fbff;
833
+ --bg-bg2-skyller: #eff6fe;
834
834
  --bg-bg3-xspector: #0e2841;
835
835
  --bg-bg3-report-xspector-light-mode: #ffffff;
836
- --bg-bg3-skyller: #f8fbff;
836
+ --bg-bg3-skyller: #dfedfe;
837
837
  --bg-stroke1-xspector: #1c3955;
838
838
  --bg-stroke1-report-xspector-light-mode: #e2e2e2;
839
- --bg-stroke1-skyller: #ececec;
839
+ --bg-stroke1-skyller: #afd2fd;
840
840
  --bg-stroke2-xspector: #294664;
841
841
  --bg-stroke2-report-xspector-light-mode: #e5e5e5;
842
842
  --bg-stroke2-skyller: #e5e5e5;
@@ -878,7 +878,7 @@
878
878
  --function-default-hover-bg-skyller: rgba(23 23 23 / 0.08);
879
879
  --function-default-stroke-xspector: rgba(158 158 158 / 0.24);
880
880
  --function-default-stroke-report-xspector-light-mode: rgba(30 50 73 / 0.48);
881
- --function-default-stroke-skyller: rgba(0 0 0 / 0.48);
881
+ --function-default-stroke-skyller: rgba(158 158 158 / 0.48);
882
882
  --function-default-icon-xspector: #212b36;
883
883
  --function-default-icon-report-xspector-light-mode: #ffffff;
884
884
  --function-default-icon-skyller: #ffffff;
@@ -1046,7 +1046,7 @@
1046
1046
  --bg-bg5-skyller: #000000;
1047
1047
  --bg-stroke3-xspector: #2d2e30;
1048
1048
  --bg-stroke3-report-xspector-light-mode: #e5e5e5;
1049
- --bg-stroke3-skyller: #d4d4d4;
1049
+ --bg-stroke3-skyller: #afd2fd;
1050
1050
  --bg-stroke4-xspector: #000000;
1051
1051
  --bg-stroke4-report-xspector-light-mode: #000000;
1052
1052
  --bg-stroke4-skyller: #000000;
@@ -1058,7 +1058,7 @@
1058
1058
  --table-bg-main-skyller: #bfdbfd;
1059
1059
  --table-bg-line-xspector: #1c3955;
1060
1060
  --table-bg-line-report-xspector-light-mode: #d2d2d2;
1061
- --table-bg-line-skyller: #ececec;
1061
+ --table-bg-line-skyller: #dfedfe;
1062
1062
  --table-bg-a-xspector: #0c2845;
1063
1063
  --table-bg-a-report-xspector-light-mode: #f3f3f3;
1064
1064
  --table-bg-a-skyller: #fdfdfd;
@@ -1073,10 +1073,10 @@
1073
1073
  --table-bg-hover-skyller: #cfe4fd;
1074
1074
  --table-panel-sub-line-xspector: #393b3f;
1075
1075
  --table-panel-sub-line-report-xspector-light-mode: #d4d4d4;
1076
- --table-panel-sub-line-skyller: #ececec;
1076
+ --table-panel-sub-line-skyller: #bfdbfd;
1077
1077
  --table-panel-main-line-xspector: #606b77;
1078
1078
  --table-panel-main-line-report-xspector-light-mode: #d4d4d4;
1079
- --table-panel-main-line-skyller: #d4d4d4;
1079
+ --table-panel-main-line-skyller: #60a5fa;
1080
1080
  --table-panel-selected-xspector: #6f6700;
1081
1081
  --table-panel-selected-report-xspector-light-mode: #d4d4d4;
1082
1082
  --table-panel-selected-skyller: #afd2fd;
@@ -3153,7 +3153,7 @@
3153
3153
  /* Hover overlay on body rows. */
3154
3154
  --table-c-hover: var(--table-bg-hover);
3155
3155
  /* Selected row overlay (data-state="selected" on <tr>). */
3156
- --table-c-selected: var(--transparent-primary-12);
3156
+ --table-c-selected: color-mix(in srgb, var(--table-panel-selected) 24%, transparent);
3157
3157
  }
3158
3158
 
3159
3159
  /* ------------------------------------------------------------------ */
@@ -5178,6 +5178,14 @@ input[type=number] {
5178
5178
  border-radius: 2px;
5179
5179
  }
5180
5180
 
5181
+ .rounded-\[4px\] {
5182
+ border-radius: 4px;
5183
+ }
5184
+
5185
+ .rounded-\[6px\] {
5186
+ border-radius: 6px;
5187
+ }
5188
+
5181
5189
  .rounded-\[8px\] {
5182
5190
  border-radius: 8px;
5183
5191
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.1.42",
3
+ "version": "0.1.44",
4
4
  "main": "dist/cjs/bundle.js",
5
5
  "module": "dist/esm/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -87,7 +87,7 @@
87
87
  "@dnd-kit/modifiers": "^9.0.0",
88
88
  "@dnd-kit/sortable": "^10.0.0",
89
89
  "@dnd-kit/utilities": "^3.2.2",
90
- "@headlessui/react": "^2.0.3",
90
+ "@headlessui/react": "^2.2.10",
91
91
  "@heroicons/react": "^2.1.3",
92
92
  "@hookform/resolvers": "^5.2.2",
93
93
  "@radix-ui/react-alert-dialog": "^1.0.5",
@@ -115,6 +115,9 @@ export type AutoCompleteProps<
115
115
  /** Extra inline styles applied to the options list container */
116
116
  listboxStyle?: React.CSSProperties;
117
117
 
118
+ /** Extra inline styles applied to the Popover content wrapper (portal mode only) */
119
+ popoverStyle?: React.CSSProperties;
120
+
118
121
  /** Extra className applied to each option item */
119
122
  optionClassName?: string;
120
123
 
@@ -151,6 +154,7 @@ function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>(
151
154
  portal = true,
152
155
  listboxClassName,
153
156
  listboxStyle,
157
+ popoverStyle,
154
158
  optionClassName,
155
159
  optionStyle,
156
160
  "data-testid": testId,
@@ -243,7 +247,8 @@ function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>(
243
247
  role="listbox"
244
248
  style={{ boxShadow: "var(--dropdown-menu-shadow)", ...listboxStyle }}
245
249
  className={cn(
246
- "rounded-md border border-bg-stroke3 overflow-hidden",
250
+ "max-h-60 overflow-y-auto",
251
+ "rounded-md border border-bg-stroke3",
247
252
  "bg-modal-dropdown-surface text-text-g-contrast-high",
248
253
  !portal && "absolute top-full left-0 w-full -mt-3 z-[51]",
249
254
  portal && "z-[51]",
@@ -352,7 +357,7 @@ function AutoCompleteInner<T extends AutoCompleteOption = AutoCompleteOption>(
352
357
  side="bottom"
353
358
  align="start"
354
359
  sideOffset={-12}
355
- style={{ width: "var(--radix-popover-trigger-width)" }}
360
+ style={{ width: "var(--radix-popover-trigger-width)", zIndex: 51, ...popoverStyle }}
356
361
  >
357
362
  {listContent}
358
363
  </PopoverPrimitive.Content>
@@ -2,7 +2,7 @@ import { cva } from "class-variance-authority";
2
2
 
3
3
  export const badgeVariants = cva(
4
4
  [
5
- "inline-flex items-center justify-center rounded-lg px-3 py-1",
5
+ "inline-flex items-center justify-center rounded-[6px] px-3 py-1",
6
6
  "typography-body3",
7
7
  ],
8
8
  {
@@ -50,7 +50,7 @@ export const badgeVariants = cva(
50
50
 
51
51
  export const severityBadgeVariants = cva(
52
52
  [
53
- "inline-flex items-center justify-center rounded px-1 py-0.5",
53
+ "inline-flex items-center justify-center rounded-[4px] px-1 py-0.5",
54
54
  "typography-small6 text-[var(--badge-severity-text)]",
55
55
  ],
56
56
  {
@@ -1,4 +1,4 @@
1
- import React, { useCallback, useEffect, useMemo, useState } from "react";
1
+ import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
2
  import type { ColumnDef, Row, RowData } from "@tanstack/react-table";
3
3
 
4
4
  import TextInput from "@/components/TextInput/TextInput";
@@ -562,6 +562,22 @@ function EditCellSelect<TData extends RowData>({
562
562
  keepOpenAfterSelect?: boolean;
563
563
  errorMessage?: string;
564
564
  }) {
565
+ const selectRef = useRef<HTMLInputElement>(null);
566
+
567
+ // Cell mode: React's `autoFocus` fires el.focus() during the commit phase,
568
+ // which causes Headless UI's flushSync-inside-microTask to run while React
569
+ // is still committing → silent failure in concurrent mode. Delay focus to a
570
+ // rAF (same approach as row-mode Tab navigation) so it fires safely after
571
+ // the commit. Cancel on cleanup so StrictMode's double-mount is safe.
572
+ useEffect(() => {
573
+ if (!autoFocus) return;
574
+ const el = selectRef.current;
575
+ if (!el) return;
576
+ const rafId = requestAnimationFrame(() => el.focus());
577
+ return () => cancelAnimationFrame(rafId);
578
+ // eslint-disable-next-line react-hooks/exhaustive-deps
579
+ }, []);
580
+
565
581
  const displayValue = String(
566
582
  (row.original as Record<string, unknown>)[columnId] ?? "",
567
583
  );
@@ -586,6 +602,7 @@ function EditCellSelect<TData extends RowData>({
586
602
  <div>
587
603
  <Dropdown
588
604
  id={`edit-dd-${columnId}-${row.id}`}
605
+ ref={selectRef}
589
606
  options={options}
590
607
  value={selected}
591
608
  onSelect={(opt) => {
@@ -601,7 +618,7 @@ function EditCellSelect<TData extends RowData>({
601
618
  label=""
602
619
  keepFooterSpace={false}
603
620
  segmentedInput
604
- autoFocus={autoFocus}
621
+ autoFocus={false}
605
622
  onBlur={onBlurField}
606
623
  onKeyDown={onKeyDown}
607
624
  keepOpenAfterSelect={keepOpenAfterSelect}
@@ -301,7 +301,10 @@ const Dropdown = forwardRef<HTMLInputElement, DropdownProps>(
301
301
  */}
302
302
  <ComboboxOptions
303
303
  {...(portal
304
- ? { portal: true, anchor: { to: "bottom start" as const, gap: 4 } }
304
+ ? {
305
+ portal: true,
306
+ anchor: { to: "bottom start" as const, gap: 4 },
307
+ }
305
308
  : {})}
306
309
  className={cn(
307
310
  !portal && "absolute top-full left-0 w-full -mt-3 z-[51]",
@@ -830,13 +830,13 @@
830
830
  --bg-bg1-skyller: #ffffff;
831
831
  --bg-bg2-xspector: #0a1b2e;
832
832
  --bg-bg2-report-xspector-light-mode: #ffffff;
833
- --bg-bg2-skyller: #f8fbff;
833
+ --bg-bg2-skyller: #eff6fe;
834
834
  --bg-bg3-xspector: #0e2841;
835
835
  --bg-bg3-report-xspector-light-mode: #ffffff;
836
- --bg-bg3-skyller: #f8fbff;
836
+ --bg-bg3-skyller: #dfedfe;
837
837
  --bg-stroke1-xspector: #1c3955;
838
838
  --bg-stroke1-report-xspector-light-mode: #e2e2e2;
839
- --bg-stroke1-skyller: #ececec;
839
+ --bg-stroke1-skyller: #afd2fd;
840
840
  --bg-stroke2-xspector: #294664;
841
841
  --bg-stroke2-report-xspector-light-mode: #e5e5e5;
842
842
  --bg-stroke2-skyller: #e5e5e5;
@@ -878,7 +878,7 @@
878
878
  --function-default-hover-bg-skyller: rgba(23 23 23 / 0.08);
879
879
  --function-default-stroke-xspector: rgba(158 158 158 / 0.24);
880
880
  --function-default-stroke-report-xspector-light-mode: rgba(30 50 73 / 0.48);
881
- --function-default-stroke-skyller: rgba(0 0 0 / 0.48);
881
+ --function-default-stroke-skyller: rgba(158 158 158 / 0.48);
882
882
  --function-default-icon-xspector: #212b36;
883
883
  --function-default-icon-report-xspector-light-mode: #ffffff;
884
884
  --function-default-icon-skyller: #ffffff;
@@ -1046,7 +1046,7 @@
1046
1046
  --bg-bg5-skyller: #000000;
1047
1047
  --bg-stroke3-xspector: #2d2e30;
1048
1048
  --bg-stroke3-report-xspector-light-mode: #e5e5e5;
1049
- --bg-stroke3-skyller: #d4d4d4;
1049
+ --bg-stroke3-skyller: #afd2fd;
1050
1050
  --bg-stroke4-xspector: #000000;
1051
1051
  --bg-stroke4-report-xspector-light-mode: #000000;
1052
1052
  --bg-stroke4-skyller: #000000;
@@ -1058,7 +1058,7 @@
1058
1058
  --table-bg-main-skyller: #bfdbfd;
1059
1059
  --table-bg-line-xspector: #1c3955;
1060
1060
  --table-bg-line-report-xspector-light-mode: #d2d2d2;
1061
- --table-bg-line-skyller: #ececec;
1061
+ --table-bg-line-skyller: #dfedfe;
1062
1062
  --table-bg-a-xspector: #0c2845;
1063
1063
  --table-bg-a-report-xspector-light-mode: #f3f3f3;
1064
1064
  --table-bg-a-skyller: #fdfdfd;
@@ -1073,10 +1073,10 @@
1073
1073
  --table-bg-hover-skyller: #cfe4fd;
1074
1074
  --table-panel-sub-line-xspector: #393b3f;
1075
1075
  --table-panel-sub-line-report-xspector-light-mode: #d4d4d4;
1076
- --table-panel-sub-line-skyller: #ececec;
1076
+ --table-panel-sub-line-skyller: #bfdbfd;
1077
1077
  --table-panel-main-line-xspector: #606b77;
1078
1078
  --table-panel-main-line-report-xspector-light-mode: #d4d4d4;
1079
- --table-panel-main-line-skyller: #d4d4d4;
1079
+ --table-panel-main-line-skyller: #60a5fa;
1080
1080
  --table-panel-selected-xspector: #6f6700;
1081
1081
  --table-panel-selected-report-xspector-light-mode: #d4d4d4;
1082
1082
  --table-panel-selected-skyller: #afd2fd;
@@ -40,7 +40,7 @@
40
40
  --table-c-hover: var(--table-bg-hover);
41
41
 
42
42
  /* Selected row overlay (data-state="selected" on <tr>). */
43
- --table-c-selected: var(--transparent-primary-12);
43
+ --table-c-selected: color-mix(in srgb, var(--table-panel-selected) 24%, transparent);
44
44
  }
45
45
 
46
46
  /* ------------------------------------------------------------------ */