@human-kit/ui 1.4.2 → 1.4.3

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.
@@ -79,7 +79,6 @@
79
79
  >
80
80
  <Popover.Content
81
81
  id={dialogId}
82
- anchorRef={datePicker.fieldRef}
83
82
  class={className}
84
83
  aria-label={resolvedAriaLabel}
85
84
  onmousedown={composeEventHandlers(handlePointerDown, onMouseDownExternal ?? undefined)}
@@ -19,12 +19,6 @@ export type DatePickerContext = {
19
19
  maxValue: DatePickerDateValue | undefined;
20
20
  triggerRef: HTMLElement | null;
21
21
  setTriggerRef: (element: HTMLElement | null) => void;
22
- /**
23
- * What the popover is placed against: the root, which holds the whole field. The trigger is
24
- * only a part of it, and a popover anchored to a small button inside a field landed a pixel
25
- * under the field's own bottom edge, its border running beside the field's.
26
- */
27
- fieldRef: HTMLElement | null;
28
22
  setFocusVisible: (visible: boolean) => void;
29
23
  syncFocusWithin: () => void;
30
24
  setActiveSegment: (segment: Exclude<DatePickerSegmentType, 'literal'> | null) => void;
@@ -90,7 +90,6 @@
90
90
  const instanceId = untrack(() => id) ?? generatedInstanceId;
91
91
 
92
92
  let triggerRef: HTMLElement | null = $state(null);
93
- let fieldRef: HTMLDivElement | null = $state(null);
94
93
  let openInternal = $state((() => defaultOpen)());
95
94
  let focusVisible = $state(false);
96
95
  let focusWithin = $state(false);
@@ -420,9 +419,6 @@
420
419
  return triggerRef;
421
420
  },
422
421
  setTriggerRef,
423
- get fieldRef() {
424
- return fieldRef;
425
- },
426
422
  setFocusVisible,
427
423
  syncFocusWithin,
428
424
  setActiveSegment,
@@ -457,7 +453,6 @@
457
453
  </script>
458
454
 
459
455
  <div
460
- bind:this={fieldRef}
461
456
  id={instanceId}
462
457
  class={className}
463
458
  role={ariaLabel ? 'group' : undefined}
@@ -82,7 +82,6 @@
82
82
  >
83
83
  <Popover.Content
84
84
  id={dialogId}
85
- anchorRef={dateRangePicker.fieldRef}
86
85
  class={className}
87
86
  aria-label={resolvedAriaLabel}
88
87
  onmousedown={composeEventHandlers(handlePointerDown, onMouseDownExternal ?? undefined)}
@@ -29,12 +29,6 @@ export type DateRangePickerContext = {
29
29
  maxValue: DatePickerDateValue | undefined;
30
30
  triggerRef: HTMLElement | null;
31
31
  setTriggerRef: (element: HTMLElement | null) => void;
32
- /**
33
- * What the popover is placed against: the root, which holds the whole field. The trigger is
34
- * only a part of it, and a popover anchored to a small button inside a field landed a pixel
35
- * under the field's own bottom edge, its border running beside the field's.
36
- */
37
- fieldRef: HTMLElement | null;
38
32
  setFocusVisible: (visible: boolean) => void;
39
33
  syncFocusWithin: () => void;
40
34
  setActiveSegment: (part: DateRangePickerRangePart, segment: Exclude<DatePickerSegmentType, 'literal'> | null) => void;
@@ -97,7 +97,6 @@
97
97
  const instanceId = untrack(() => id) ?? generatedInstanceId;
98
98
 
99
99
  let triggerRef: HTMLElement | null = $state(null);
100
- let fieldRef: HTMLDivElement | null = $state(null);
101
100
  let openInternal = $state((() => defaultOpen)());
102
101
  let focusVisible = $state(false);
103
102
  let focusWithin = $state(false);
@@ -665,9 +664,6 @@
665
664
  return triggerRef;
666
665
  },
667
666
  setTriggerRef,
668
- get fieldRef() {
669
- return fieldRef;
670
- },
671
667
  setFocusVisible,
672
668
  syncFocusWithin,
673
669
  setActiveSegment,
@@ -702,7 +698,6 @@
702
698
  </script>
703
699
 
704
700
  <div
705
- bind:this={fieldRef}
706
701
  id={instanceId}
707
702
  class={className}
708
703
  role={ariaLabel ? 'group' : undefined}
@@ -13,7 +13,6 @@ Description: Floating panel rendered in a portal. Supports context mode (`Popove
13
13
  | `placement` | `ExtendedPlacement` | `'bottom'` | Preferred floating placement. |
14
14
  | `shouldFlip` | `boolean` | `true` | Enables automatic fallback placement when space is limited. |
15
15
  | `boundaryElement` | `Element \| null` | `null` | Optional boundary element for positioning constraints. |
16
- | `anchorRef` | `HTMLElement \| null` | `null` | Element the panel is placed against, if not the trigger (a picker's field). |
17
16
  | `children` | `Snippet` | `undefined` | Rendered popover panel content. |
18
17
  | `class` | `string` | `''` | CSS class names for the panel element. |
19
18
  | `nonModal` | `boolean` | `false` | Disables modal behaviors (focus trap, scroll lock, outside aria hiding). |
@@ -37,11 +37,6 @@
37
37
  shouldFlip?: boolean;
38
38
  /** The element that gives the limits of the position. */
39
39
  boundaryElement?: Element | null;
40
- /**
41
- * The element the panel is placed against, when it is not the trigger: a picker's whole field,
42
- * whose button is only a small part of it. The trigger still owns the focus and the open state.
43
- */
44
- anchorRef?: HTMLElement | null;
45
40
  /** The content of the popover. */
46
41
  children?: Snippet;
47
42
  /** The CSS class names of the popover container. */
@@ -75,7 +70,6 @@
75
70
  placement = 'bottom',
76
71
  shouldFlip = true,
77
72
  boundaryElement = null,
78
- anchorRef = null,
79
73
  children,
80
74
  class: className = '',
81
75
  nonModal = false,
@@ -338,7 +332,7 @@
338
332
  data-exiting={presence.isExiting || undefined}
339
333
  data-placement={resolvedPlacement}
340
334
  use:floating={{
341
- anchor: anchorRef ?? triggerRef,
335
+ anchor: triggerRef,
342
336
  offset,
343
337
  placement,
344
338
  shouldFlip,
@@ -16,11 +16,6 @@ type PopoverContentProps = {
16
16
  shouldFlip?: boolean;
17
17
  /** The element that gives the limits of the position. */
18
18
  boundaryElement?: Element | null;
19
- /**
20
- * The element the panel is placed against, when it is not the trigger: a picker's whole field,
21
- * whose button is only a small part of it. The trigger still owns the focus and the open state.
22
- */
23
- anchorRef?: HTMLElement | null;
24
19
  /** The content of the popover. */
25
20
  children?: Snippet;
26
21
  /** The CSS class names of the popover container. */
@@ -73,7 +73,6 @@
73
73
  >
74
74
  <Popover.Content
75
75
  id={dialogId}
76
- anchorRef={timePicker.fieldRef}
77
76
  class={className}
78
77
  aria-label={ariaLabel}
79
78
  onmousedown={composeEventHandlers(handlePointerDown, onMouseDownExternal ?? undefined)}
@@ -18,12 +18,6 @@ export type TimePickerContext = {
18
18
  triggerRef: HTMLElement | null;
19
19
  activeSegment: Exclude<TimePickerSegmentType, 'literal'> | null;
20
20
  setTriggerRef: (element: HTMLElement | null) => void;
21
- /**
22
- * What the popover is placed against: the root, which holds the whole field. The trigger is
23
- * only a part of it, and a popover anchored to a small button inside a field landed a pixel
24
- * under the field's own bottom edge, its border running beside the field's.
25
- */
26
- fieldRef: HTMLElement | null;
27
21
  setFocusVisible: (visible: boolean) => void;
28
22
  syncFocusWithin: () => void;
29
23
  setActiveSegment: (segment: Exclude<TimePickerSegmentType, 'literal'> | null) => void;
@@ -399,9 +399,6 @@
399
399
  return activeSegment;
400
400
  },
401
401
  setTriggerRef,
402
- get fieldRef() {
403
- return rootRef;
404
- },
405
402
  setFocusVisible,
406
403
  syncFocusWithin,
407
404
  setActiveSegment,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@human-kit/ui",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "Accessible, typed UI components for Svelte 5 — shipped as native ESM with per-component subpath exports so bundlers only include what you import.",
5
5
  "license": "MIT",
6
6
  "author": "Agustin Delgado <agustindariodelgado@gmail.com>",