@lilydesignsystem/react-headless 0.1.0 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,37 @@
3
3
  The format is loosely based on [Keep a Changelog](https://keepachangelog.com/)
4
4
  and the package follows [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## 0.2.0 — 2026-09-21
7
+
8
+ **`Listbox` and `IconButton` extended, additively, to support the
9
+ `react-helpers` catalog's icon-button-triggered pickers depending on
10
+ them instead of hand-rolling equivalent markup/keyboard logic** —
11
+ porting the same change already made to `@lilydesignsystem/svelte-headless`.
12
+ Both components had zero real consumers elsewhere in this
13
+ 491-component catalog (confirmed by search before changing either;
14
+ `Listbox` had two doc-comment *mentions* as an example, no actual
15
+ imports) — full suite (2679 tests) still green.
16
+
17
+ - `IconButton` gains `baseClass` (default `"icon-button"`, unchanged)
18
+ and a forwarded ref (`React.forwardRef`) exposing the rendered
19
+ `<button>`. Its props interface now extends
20
+ `React.ButtonHTMLAttributes<HTMLButtonElement>` instead of a
21
+ `[key: string]: unknown` catch-all — restProps (`aria-haspopup`,
22
+ `aria-expanded`, `aria-controls`, `onKeyDown`, etc.) keep real types,
23
+ and `forwardRef`'s `Omit<P, "ref">` machinery no longer collapses
24
+ named properties on an indexed type during `.d.ts` generation (a
25
+ real build break this refactor hit and fixed, not a style choice).
26
+ - `Listbox` gains an opt-in `navigation="active-descendant"` mode
27
+ (default remains `"roving-focus"`, byte-for-byte unchanged
28
+ behaviour): the root holds real focus and tracks a virtual cursor
29
+ (`aria-activedescendant`, a controlled/uncontrolled `activeIndex` +
30
+ `onActiveIndexChange`, mirroring Svelte's bindable `activeIndex`)
31
+ rather than moving DOM focus between options, plus `clamp` (vs.
32
+ wrap), `typeahead`, `pageSize` paging, `onActivate`/`onEscape`/
33
+ `onTabOut` callbacks, `baseClass`, `as` (root tag, default `"div"`),
34
+ and a forwarded ref. Same props interface fix as `IconButton`
35
+ (extends `React.HTMLAttributes<HTMLElement>`, no index signature).
36
+
6
37
  ## 0.1.0 — 2026-09-16
7
38
 
8
39
  **Package renamed: `lily-design-system-react-headless` → `@lilydesignsystem/react-headless`.** npm scoped packages
package/dist/index.d.ts CHANGED
@@ -2724,23 +2724,17 @@ interface IconProps {
2724
2724
  }
2725
2725
  declare function Icon({ className, label, decorative, children, ...restProps }: IconProps): React__default.JSX.Element;
2726
2726
 
2727
- interface IconButtonProps {
2728
- className?: string;
2727
+ interface IconButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
2728
+ /** Base class token, replacing "icon-button" outright (not appended). */
2729
+ baseClass?: string;
2729
2730
  /** aria-label for the icon button (required for accessibility) */
2730
2731
  label: string;
2731
- /** HTML button type */
2732
- type?: "button" | "submit" | "reset";
2733
- /** Whether the button is disabled */
2734
- disabled?: boolean;
2735
2732
  /** Toggle button pressed state (undefined = not a toggle) */
2736
2733
  pressed?: boolean;
2737
- /** Click event handler */
2738
- onClick?: (event: React__default.MouseEvent) => void;
2739
2734
  /** The icon content */
2740
2735
  children: React__default.ReactNode;
2741
- [key: string]: unknown;
2742
2736
  }
2743
- declare function IconButton({ className, label, type, disabled, pressed, onClick, children, ...restProps }: IconButtonProps): React__default.JSX.Element;
2737
+ declare const IconButton: React__default.ForwardRefExoticComponent<IconButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
2744
2738
 
2745
2739
  interface IconListProps {
2746
2740
  className?: string;
@@ -3192,15 +3186,37 @@ interface LineChartProps {
3192
3186
  }
3193
3187
  declare function LineChart({ className, label, children, ...restProps }: LineChartProps): React$1.JSX.Element;
3194
3188
 
3195
- interface ListboxProps {
3196
- className?: string;
3189
+ interface ListboxProps extends React__default.HTMLAttributes<HTMLElement> {
3190
+ /** Base class token, replacing "listbox" outright (not appended). */
3191
+ baseClass?: string;
3192
+ /** Root element tag. Default "div" (unchanged). */
3193
+ as?: React__default.ElementType;
3197
3194
  /** Accessible label. */
3198
3195
  label: string;
3199
3196
  /** Option elements. */
3200
3197
  children: React__default.ReactNode;
3201
- [key: string]: unknown;
3202
- }
3203
- declare function Listbox({ className, label, children, ...restProps }: ListboxProps): React__default.JSX.Element;
3198
+ /** Navigation/focus model. Default "roving-focus" (unchanged legacy behaviour). */
3199
+ navigation?: "roving-focus" | "active-descendant";
3200
+ /** Controlled virtual cursor position (active-descendant mode). */
3201
+ activeIndex?: number;
3202
+ /** Initial cursor when uncontrolled. Default -1. */
3203
+ defaultActiveIndex?: number;
3204
+ /** Fires on every cursor move (active-descendant mode). */
3205
+ onActiveIndexChange?: (index: number) => void;
3206
+ /** Arrow keys clamp instead of wrap (active-descendant mode). */
3207
+ clamp?: boolean;
3208
+ /** Printable-character typeahead (active-descendant mode). */
3209
+ typeahead?: boolean;
3210
+ /** PageUp/PageDown step size (active-descendant mode). */
3211
+ pageSize?: number;
3212
+ /** Enter/Space on the active option (active-descendant mode). */
3213
+ onActivate?: (index: number) => void;
3214
+ /** Escape pressed (active-descendant mode). */
3215
+ onEscape?: () => void;
3216
+ /** Tab pressed, called before the key is processed (active-descendant mode). */
3217
+ onTabOut?: (event: React__default.KeyboardEvent) => void;
3218
+ }
3219
+ declare const Listbox: React__default.ForwardRefExoticComponent<ListboxProps & React__default.RefAttributes<HTMLElement>>;
3204
3220
 
3205
3221
  interface LoadingProps {
3206
3222
  className?: string;
package/dist/index.js CHANGED
@@ -5858,31 +5858,37 @@ function Icon({
5858
5858
  }
5859
5859
 
5860
5860
  // components/IconButton.tsx
5861
+ import React29 from "react";
5861
5862
  import { jsx as jsx225 } from "react/jsx-runtime";
5862
- function IconButton({
5863
- className = "",
5864
- label,
5865
- type = "button",
5866
- disabled = false,
5867
- pressed = void 0,
5868
- onClick = void 0,
5869
- children,
5870
- ...restProps
5871
- }) {
5872
- return /* @__PURE__ */ jsx225(
5873
- "button",
5874
- {
5875
- className: `icon-button ${className}`,
5876
- type,
5877
- disabled,
5878
- "aria-label": label,
5879
- "aria-pressed": pressed,
5880
- onClick,
5881
- ...restProps,
5882
- children
5883
- }
5884
- );
5885
- }
5863
+ var IconButton = React29.forwardRef(
5864
+ function IconButton2({
5865
+ className = "",
5866
+ baseClass = "icon-button",
5867
+ label,
5868
+ type = "button",
5869
+ disabled = false,
5870
+ pressed = void 0,
5871
+ onClick = void 0,
5872
+ children,
5873
+ ...restProps
5874
+ }, ref) {
5875
+ return /* @__PURE__ */ jsx225(
5876
+ "button",
5877
+ {
5878
+ className: `${baseClass} ${className}`,
5879
+ type,
5880
+ disabled,
5881
+ "aria-label": label,
5882
+ "aria-pressed": pressed,
5883
+ onClick,
5884
+ ref,
5885
+ ...restProps,
5886
+ children
5887
+ }
5888
+ );
5889
+ }
5890
+ );
5891
+ var IconButton_default = IconButton;
5886
5892
 
5887
5893
  // components/IconList.tsx
5888
5894
  import { jsx as jsx226 } from "react/jsx-runtime";
@@ -6758,60 +6764,170 @@ function LineChart({
6758
6764
  }
6759
6765
 
6760
6766
  // components/Listbox.tsx
6761
- import { useRef as useRef5 } from "react";
6767
+ import React30, { useLayoutEffect, useRef as useRef5, useState as useState19 } from "react";
6762
6768
  import { jsx as jsx264 } from "react/jsx-runtime";
6763
- function Listbox({
6769
+ var Listbox = React30.forwardRef(function Listbox2({
6764
6770
  className = "",
6771
+ baseClass = "listbox",
6772
+ as: Tag2 = "div",
6765
6773
  label,
6766
6774
  children,
6775
+ navigation = "roving-focus",
6776
+ activeIndex: controlledActiveIndex,
6777
+ defaultActiveIndex = -1,
6778
+ onActiveIndexChange,
6779
+ clamp = false,
6780
+ typeahead = false,
6781
+ pageSize = 10,
6782
+ onActivate,
6783
+ onEscape,
6784
+ onTabOut,
6767
6785
  ...restProps
6768
- }) {
6786
+ }, forwardedRef) {
6769
6787
  const listRef = useRef5(null);
6770
- function handleKeyDown(event) {
6771
- if (!listRef.current) return;
6772
- const options = Array.from(
6773
- listRef.current.querySelectorAll("[role='option']")
6774
- );
6788
+ const [uncontrolledActiveIndex, setUncontrolledActiveIndex] = useState19(defaultActiveIndex);
6789
+ const activeIndex = controlledActiveIndex ?? uncontrolledActiveIndex;
6790
+ const typeaheadBuffer = useRef5("");
6791
+ const typeaheadTimer = useRef5(void 0);
6792
+ function setRef(node) {
6793
+ listRef.current = node;
6794
+ if (typeof forwardedRef === "function") forwardedRef(node);
6795
+ else if (forwardedRef) forwardedRef.current = node;
6796
+ }
6797
+ function setActiveIndex(next) {
6798
+ if (controlledActiveIndex === void 0) setUncontrolledActiveIndex(next);
6799
+ onActiveIndexChange?.(next);
6800
+ }
6801
+ function options() {
6802
+ return listRef.current ? Array.from(listRef.current.querySelectorAll("[role='option']")) : [];
6803
+ }
6804
+ function handleRovingFocusKeyDown(event) {
6805
+ const opts = options();
6775
6806
  const current = document.activeElement;
6776
- const index = options.indexOf(current);
6807
+ const index = opts.indexOf(current);
6777
6808
  switch (event.key) {
6778
6809
  case "ArrowDown": {
6779
6810
  event.preventDefault();
6780
- const next = index < options.length - 1 ? index + 1 : 0;
6781
- options[next]?.focus();
6811
+ const next = index < opts.length - 1 ? index + 1 : 0;
6812
+ opts[next]?.focus();
6782
6813
  break;
6783
6814
  }
6784
6815
  case "ArrowUp": {
6785
6816
  event.preventDefault();
6786
- const prev = index > 0 ? index - 1 : options.length - 1;
6787
- options[prev]?.focus();
6817
+ const prev = index > 0 ? index - 1 : opts.length - 1;
6818
+ opts[prev]?.focus();
6788
6819
  break;
6789
6820
  }
6790
6821
  case "Home": {
6791
6822
  event.preventDefault();
6792
- options[0]?.focus();
6823
+ opts[0]?.focus();
6793
6824
  break;
6794
6825
  }
6795
6826
  case "End": {
6796
6827
  event.preventDefault();
6797
- options[options.length - 1]?.focus();
6828
+ opts[opts.length - 1]?.focus();
6798
6829
  break;
6799
6830
  }
6800
6831
  }
6801
6832
  }
6833
+ function moveActive(delta) {
6834
+ const count = options().length;
6835
+ if (count === 0) return;
6836
+ const next = activeIndex + delta;
6837
+ setActiveIndex(clamp ? Math.min(Math.max(next, 0), count - 1) : (next % count + count) % count);
6838
+ }
6839
+ function runTypeahead(char) {
6840
+ const opts = options();
6841
+ if (opts.length === 0) return;
6842
+ const lower = char.toLowerCase();
6843
+ const buffer = typeaheadBuffer.current;
6844
+ const sameCharRun = buffer === "" || [...buffer].every((c) => c === lower);
6845
+ typeaheadBuffer.current += lower;
6846
+ clearTimeout(typeaheadTimer.current);
6847
+ typeaheadTimer.current = setTimeout(() => typeaheadBuffer.current = "", 500);
6848
+ const query = sameCharRun ? lower : typeaheadBuffer.current;
6849
+ const anchor = activeIndex < 0 ? 0 : activeIndex;
6850
+ const start = sameCharRun ? anchor + 1 : anchor;
6851
+ for (let n = 0; n < opts.length; n++) {
6852
+ const i = (start + n) % opts.length;
6853
+ if ((opts[i].textContent ?? "").trim().toLowerCase().startsWith(query)) {
6854
+ setActiveIndex(i);
6855
+ return;
6856
+ }
6857
+ }
6858
+ }
6859
+ function handleActiveDescendantKeyDown(event) {
6860
+ switch (event.key) {
6861
+ case "ArrowDown":
6862
+ event.preventDefault();
6863
+ moveActive(1);
6864
+ break;
6865
+ case "ArrowUp":
6866
+ event.preventDefault();
6867
+ moveActive(-1);
6868
+ break;
6869
+ case "Home":
6870
+ event.preventDefault();
6871
+ setActiveIndex(options().length ? 0 : -1);
6872
+ break;
6873
+ case "End":
6874
+ event.preventDefault();
6875
+ setActiveIndex(options().length - 1);
6876
+ break;
6877
+ case "PageDown":
6878
+ event.preventDefault();
6879
+ moveActive(pageSize);
6880
+ break;
6881
+ case "PageUp":
6882
+ event.preventDefault();
6883
+ moveActive(-pageSize);
6884
+ break;
6885
+ case "Enter":
6886
+ case " ":
6887
+ event.preventDefault();
6888
+ if (activeIndex >= 0) onActivate?.(activeIndex);
6889
+ break;
6890
+ case "Escape":
6891
+ event.preventDefault();
6892
+ onEscape?.();
6893
+ break;
6894
+ case "Tab":
6895
+ onTabOut?.(event);
6896
+ break;
6897
+ default:
6898
+ if (typeahead && event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
6899
+ runTypeahead(event.key);
6900
+ }
6901
+ }
6902
+ }
6903
+ function handleKeyDown(event) {
6904
+ if (navigation === "active-descendant") handleActiveDescendantKeyDown(event);
6905
+ else handleRovingFocusKeyDown(event);
6906
+ }
6907
+ const [activeId, setActiveId] = useState19(void 0);
6908
+ useLayoutEffect(() => {
6909
+ if (navigation !== "active-descendant" || activeIndex < 0) {
6910
+ setActiveId(void 0);
6911
+ return;
6912
+ }
6913
+ setActiveId(options()[activeIndex]?.id || void 0);
6914
+ });
6802
6915
  return /* @__PURE__ */ jsx264(
6803
- "div",
6916
+ Tag2,
6804
6917
  {
6805
- className: `listbox ${className}`,
6918
+ className: `${baseClass} ${className}`,
6806
6919
  role: "listbox",
6807
6920
  "aria-label": label,
6808
- ref: listRef,
6921
+ tabIndex: navigation === "active-descendant" ? -1 : void 0,
6922
+ "aria-activedescendant": activeId,
6923
+ ref: setRef,
6809
6924
  onKeyDown: handleKeyDown,
6810
6925
  ...restProps,
6811
6926
  children
6812
6927
  }
6813
6928
  );
6814
- }
6929
+ });
6930
+ var Listbox_default = Listbox;
6815
6931
 
6816
6932
  // components/Loading.tsx
6817
6933
  import { jsx as jsx265 } from "react/jsx-runtime";
@@ -7082,7 +7198,7 @@ function MeasurementUnitView({
7082
7198
  }
7083
7199
 
7084
7200
  // components/MedicalBanner.tsx
7085
- import { useState as useState19 } from "react";
7201
+ import { useState as useState20 } from "react";
7086
7202
  import { Fragment as Fragment29, jsx as jsx277, jsxs as jsxs48 } from "react/jsx-runtime";
7087
7203
  function MedicalBanner({
7088
7204
  className = "",
@@ -7094,7 +7210,7 @@ function MedicalBanner({
7094
7210
  children,
7095
7211
  ...restProps
7096
7212
  }) {
7097
- const [visible, setVisible] = useState19(true);
7213
+ const [visible, setVisible] = useState20(true);
7098
7214
  function dismiss() {
7099
7215
  setVisible(false);
7100
7216
  onClose?.();
@@ -8251,7 +8367,7 @@ function PasswordInput({
8251
8367
  }
8252
8368
 
8253
8369
  // components/PasswordInputOrTextInputDiv.tsx
8254
- import { useState as useState20 } from "react";
8370
+ import { useState as useState21 } from "react";
8255
8371
  import { jsx as jsx324, jsxs as jsxs53 } from "react/jsx-runtime";
8256
8372
  function PasswordInputOrTextInputDiv({
8257
8373
  className = "",
@@ -8264,7 +8380,7 @@ function PasswordInputOrTextInputDiv({
8264
8380
  onChange,
8265
8381
  ...restProps
8266
8382
  }) {
8267
- const [visible, setVisible] = useState20(false);
8383
+ const [visible, setVisible] = useState21(false);
8268
8384
  return /* @__PURE__ */ jsxs53(
8269
8385
  "div",
8270
8386
  {
@@ -8387,7 +8503,7 @@ function Pictogram({
8387
8503
  }
8388
8504
 
8389
8505
  // components/PinInputDiv.tsx
8390
- import { useState as useState21, useRef as useRef8, useEffect as useEffect3 } from "react";
8506
+ import { useState as useState22, useRef as useRef8, useEffect as useEffect3 } from "react";
8391
8507
  import { jsx as jsx329 } from "react/jsx-runtime";
8392
8508
  function PinInputDiv({
8393
8509
  className = "",
@@ -8398,7 +8514,7 @@ function PinInputDiv({
8398
8514
  onChange,
8399
8515
  ...restProps
8400
8516
  }) {
8401
- const [digits, setDigits] = useState21(() => Array.from({ length }, () => ""));
8517
+ const [digits, setDigits] = useState22(() => Array.from({ length }, () => ""));
8402
8518
  const inputRefs = useRef8([]);
8403
8519
  useEffect3(() => {
8404
8520
  const combined = digits.join("");
@@ -8989,7 +9105,7 @@ function RadioGroup({
8989
9105
  }
8990
9106
 
8991
9107
  // components/RadioInput.tsx
8992
- import { useState as useState22 } from "react";
9108
+ import { useState as useState23 } from "react";
8993
9109
  import { jsx as jsx352 } from "react/jsx-runtime";
8994
9110
  function RadioInput({
8995
9111
  className = "",
@@ -9001,7 +9117,7 @@ function RadioInput({
9001
9117
  onChange,
9002
9118
  ...restProps
9003
9119
  }) {
9004
- const [checked, setChecked] = useState22(checkedProp);
9120
+ const [checked, setChecked] = useState23(checkedProp);
9005
9121
  const handleChange = (e) => {
9006
9122
  setChecked(e.target.checked);
9007
9123
  onChange?.(e);
@@ -9898,7 +10014,7 @@ function SharePage({
9898
10014
  }
9899
10015
 
9900
10016
  // components/Sheet.tsx
9901
- import { useState as useState23 } from "react";
10017
+ import { useState as useState24 } from "react";
9902
10018
  import { Fragment as Fragment34, jsx as jsx387 } from "react/jsx-runtime";
9903
10019
  function Sheet({
9904
10020
  className = "",
@@ -9909,7 +10025,7 @@ function Sheet({
9909
10025
  children,
9910
10026
  ...restProps
9911
10027
  }) {
9912
- const [open, setOpen] = useState23(openProp);
10028
+ const [open, setOpen] = useState24(openProp);
9913
10029
  function handleKeyDown(event) {
9914
10030
  if (event.key === "Escape") {
9915
10031
  event.preventDefault();
@@ -10011,7 +10127,7 @@ function SkipLink({
10011
10127
  }
10012
10128
 
10013
10129
  // components/SlideOutDrawer.tsx
10014
- import { useState as useState24 } from "react";
10130
+ import { useState as useState25 } from "react";
10015
10131
  import { Fragment as Fragment36, jsx as jsx392 } from "react/jsx-runtime";
10016
10132
  function SlideOutDrawer({
10017
10133
  className = "",
@@ -10021,7 +10137,7 @@ function SlideOutDrawer({
10021
10137
  children,
10022
10138
  ...restProps
10023
10139
  }) {
10024
- const [open, setOpen] = useState24(openProp);
10140
+ const [open, setOpen] = useState25(openProp);
10025
10141
  function handleKeyDown(event) {
10026
10142
  if (event.key === "Escape") {
10027
10143
  setOpen(false);
@@ -10074,7 +10190,7 @@ function Slider({
10074
10190
  }
10075
10191
 
10076
10192
  // components/SliderButton.tsx
10077
- import { useState as useState25 } from "react";
10193
+ import { useState as useState26 } from "react";
10078
10194
  import { jsx as jsx394 } from "react/jsx-runtime";
10079
10195
  function SliderButton({
10080
10196
  className = "",
@@ -10085,7 +10201,7 @@ function SliderButton({
10085
10201
  children,
10086
10202
  ...restProps
10087
10203
  }) {
10088
- const [position, setPosition] = useState25(0);
10204
+ const [position, setPosition] = useState26(0);
10089
10205
  const fireIfComplete = (next) => {
10090
10206
  if (next >= 100) {
10091
10207
  setPosition(0);
@@ -10819,7 +10935,7 @@ function SverigePersonnummerView({
10819
10935
  }
10820
10936
 
10821
10937
  // components/SwitchButton.tsx
10822
- import { useEffect as useEffect6, useState as useState26 } from "react";
10938
+ import { useEffect as useEffect6, useState as useState27 } from "react";
10823
10939
  import { jsx as jsx422 } from "react/jsx-runtime";
10824
10940
  function SwitchButton({
10825
10941
  className = "",
@@ -10829,7 +10945,7 @@ function SwitchButton({
10829
10945
  onChange,
10830
10946
  ...restProps
10831
10947
  }) {
10832
- const [checked, setChecked] = useState26(checkedProp);
10948
+ const [checked, setChecked] = useState27(checkedProp);
10833
10949
  useEffect6(() => {
10834
10950
  setChecked(checkedProp);
10835
10951
  }, [checkedProp]);
@@ -11269,7 +11385,7 @@ function TaskList({
11269
11385
  }
11270
11386
 
11271
11387
  // components/TaskListItem.tsx
11272
- import { useState as useState27 } from "react";
11388
+ import { useState as useState28 } from "react";
11273
11389
  import { jsx as jsx439, jsxs as jsxs71 } from "react/jsx-runtime";
11274
11390
  function TaskListItem({
11275
11391
  className = "",
@@ -11279,7 +11395,7 @@ function TaskListItem({
11279
11395
  onChange,
11280
11396
  ...restProps
11281
11397
  }) {
11282
- const [checked, setChecked] = useState27(checkedProp);
11398
+ const [checked, setChecked] = useState28(checkedProp);
11283
11399
  const handleChange = (e) => {
11284
11400
  const newChecked = e.target.checked;
11285
11401
  setChecked(newChecked);
@@ -11845,7 +11961,7 @@ function Timer({
11845
11961
  }
11846
11962
 
11847
11963
  // components/TimerButton.tsx
11848
- import { useEffect as useEffect7, useRef as useRef14, useState as useState28 } from "react";
11964
+ import { useEffect as useEffect7, useRef as useRef14, useState as useState29 } from "react";
11849
11965
  import { jsx as jsx458 } from "react/jsx-runtime";
11850
11966
  function TimerButton({
11851
11967
  className = "",
@@ -11856,7 +11972,7 @@ function TimerButton({
11856
11972
  children,
11857
11973
  ...restProps
11858
11974
  }) {
11859
- const [remainingSeconds, setRemainingSeconds] = useState28(duration);
11975
+ const [remainingSeconds, setRemainingSeconds] = useState29(duration);
11860
11976
  const firedRef = useRef14(false);
11861
11977
  useEffect7(() => {
11862
11978
  if (disabled) return;
@@ -11917,7 +12033,7 @@ function Toast({
11917
12033
  }
11918
12034
 
11919
12035
  // components/ToggleButton.tsx
11920
- import { useState as useState29 } from "react";
12036
+ import { useState as useState30 } from "react";
11921
12037
  import { Fragment as Fragment37, jsx as jsx460 } from "react/jsx-runtime";
11922
12038
  function ToggleButton({
11923
12039
  className = "",
@@ -11928,7 +12044,7 @@ function ToggleButton({
11928
12044
  children,
11929
12045
  ...restProps
11930
12046
  }) {
11931
- const [pressed, setPressed] = useState29(pressedProp);
12047
+ const [pressed, setPressed] = useState30(pressedProp);
11932
12048
  function toggle() {
11933
12049
  if (!disabled) {
11934
12050
  const newPressed = !pressed;
@@ -12696,7 +12812,7 @@ function VideoPlayer({
12696
12812
  }
12697
12813
 
12698
12814
  // components/Visible.tsx
12699
- import { useEffect as useEffect9, useRef as useRef18, useState as useState30 } from "react";
12815
+ import { useEffect as useEffect9, useRef as useRef18, useState as useState31 } from "react";
12700
12816
  import { jsx as jsx487 } from "react/jsx-runtime";
12701
12817
  function Visible({
12702
12818
  className = "",
@@ -12707,7 +12823,7 @@ function Visible({
12707
12823
  ...restProps
12708
12824
  }) {
12709
12825
  const ref = useRef18(null);
12710
- const [visible, setVisible] = useState30(false);
12826
+ const [visible, setVisible] = useState31(false);
12711
12827
  useEffect9(() => {
12712
12828
  const el = ref.current;
12713
12829
  if (!el || typeof IntersectionObserver === "undefined") return;
@@ -13044,7 +13160,7 @@ export {
13044
13160
  HrvatskaOsobniIdentifikacijskiBrojInput,
13045
13161
  HrvatskaOsobniIdentifikacijskiBrojView,
13046
13162
  Icon,
13047
- IconButton,
13163
+ IconButton_default as IconButton,
13048
13164
  IconList,
13049
13165
  IconListItem,
13050
13166
  Image,
@@ -13083,7 +13199,7 @@ export {
13083
13199
  LietuvaPasasInput,
13084
13200
  LietuvaPasasView,
13085
13201
  LineChart,
13086
- Listbox,
13202
+ Listbox_default as Listbox,
13087
13203
  Loading,
13088
13204
  MaltaNationalIdentificationNumberInput,
13089
13205
  MaltaNationalIdentificationNumberView,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilydesignsystem/react-headless",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "engines": {
5
5
  "node": "=26"
6
6
  },
@@ -38,20 +38,20 @@
38
38
  },
39
39
  "homepage": "https://lilydesignsystem.com/",
40
40
  "devDependencies": {
41
- "@storybook/react-vite": "^10.5.10",
41
+ "@storybook/react-vite": "^10.6.0",
42
42
  "@testing-library/react": "^16.3.3",
43
43
  "@testing-library/user-event": "^14.6.7",
44
- "@types/react": "^19.2.18",
45
- "@types/react-dom": "^19.2.5",
44
+ "@types/react": "^19.3.0",
45
+ "@types/react-dom": "^19.3.0",
46
46
  "@vitejs/plugin-react": "^6.1.1",
47
- "@vitest/ui": "^4.1.11",
47
+ "@vitest/ui": "^5.0.0",
48
48
  "jsdom": "^30.0.1",
49
- "react": "^19.2.8",
50
- "react-dom": "^19.2.8",
51
- "storybook": "^10.5.10",
49
+ "react": "^19.3.0",
50
+ "react-dom": "^19.3.0",
51
+ "storybook": "^10.6.0",
52
52
  "tsup": "^8.5.1",
53
53
  "typescript": "^5.9.3",
54
- "vitest": "^4.1.11"
54
+ "vitest": "^5.0.0"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "react": "^18.0.0 || ^19.0.0",