@sprawlify/primitives 0.0.27 → 0.0.28

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 (101) hide show
  1. package/dist/collection.d.cts +2 -2
  2. package/dist/collection.d.mts +2 -2
  3. package/dist/date-utils.d.cts +5 -5
  4. package/dist/date-utils.d.mts +1 -1
  5. package/dist/{focus-trap-Brjt3GUU.cjs → focus-trap-BwUy71da.cjs} +6 -5
  6. package/dist/{focus-trap-C_QmP_9k.mjs → focus-trap-Bw_WJq_d.mjs} +6 -5
  7. package/dist/focus-trap.cjs +1 -1
  8. package/dist/focus-trap.d.cts +2 -1
  9. package/dist/focus-trap.d.mts +2 -1
  10. package/dist/focus-trap.mjs +1 -1
  11. package/dist/{index-DYzqCFaj.d.mts → index-BTwu-8ey.d.mts} +5 -5
  12. package/dist/{index-BI1GChBz.d.mts → index-BlM1bSkX.d.mts} +1 -1
  13. package/dist/{list-collection-DettiQL3.d.cts → list-collection-BvMwDNHf.d.cts} +1 -1
  14. package/dist/{list-collection-BbgocToA.d.mts → list-collection-CTt1eong.d.mts} +1 -1
  15. package/dist/machines/accordion/index.d.cts +1 -1
  16. package/dist/machines/accordion/index.d.mts +1 -1
  17. package/dist/machines/angle-slider/index.d.cts +1 -1
  18. package/dist/machines/angle-slider/index.d.mts +1 -1
  19. package/dist/machines/bottom-sheet/index.cjs +1 -1
  20. package/dist/machines/bottom-sheet/index.d.cts +1 -1
  21. package/dist/machines/bottom-sheet/index.d.mts +1 -1
  22. package/dist/machines/bottom-sheet/index.mjs +1 -1
  23. package/dist/machines/carousel/index.d.cts +1 -1
  24. package/dist/machines/carousel/index.d.mts +1 -1
  25. package/dist/machines/clipboard/index.d.cts +1 -1
  26. package/dist/machines/clipboard/index.d.mts +1 -1
  27. package/dist/machines/collapsible/index.d.cts +1 -1
  28. package/dist/machines/collapsible/index.d.mts +1 -1
  29. package/dist/machines/color-picker/index.d.cts +1 -1
  30. package/dist/machines/color-picker/index.d.mts +2 -2
  31. package/dist/machines/combobox/index.d.cts +2 -2
  32. package/dist/machines/combobox/index.d.mts +3 -3
  33. package/dist/machines/date-picker/index.d.cts +1 -1
  34. package/dist/machines/date-picker/index.d.mts +3 -3
  35. package/dist/machines/dialog/index.cjs +1 -1
  36. package/dist/machines/dialog/index.d.cts +1 -1
  37. package/dist/machines/dialog/index.d.mts +1 -1
  38. package/dist/machines/dialog/index.mjs +1 -1
  39. package/dist/machines/editable/index.d.cts +1 -1
  40. package/dist/machines/editable/index.d.mts +1 -1
  41. package/dist/machines/file-upload/index.d.cts +1 -1
  42. package/dist/machines/file-upload/index.d.mts +1 -1
  43. package/dist/machines/floating-panel/index.d.cts +1 -1
  44. package/dist/machines/floating-panel/index.d.mts +1 -1
  45. package/dist/machines/hover-card/index.d.cts +1 -1
  46. package/dist/machines/hover-card/index.d.mts +2 -2
  47. package/dist/machines/listbox/index.d.cts +3 -3
  48. package/dist/machines/listbox/index.d.mts +3 -3
  49. package/dist/machines/marquee/index.d.cts +3 -3
  50. package/dist/machines/marquee/index.d.mts +3 -3
  51. package/dist/machines/menu/index.d.cts +1 -1
  52. package/dist/machines/menu/index.d.mts +2 -2
  53. package/dist/machines/navigation-menu/index.d.cts +1 -1
  54. package/dist/machines/navigation-menu/index.d.mts +1 -1
  55. package/dist/machines/number-input/index.d.cts +1 -1
  56. package/dist/machines/number-input/index.d.mts +1 -1
  57. package/dist/machines/pagination/index.d.cts +1 -1
  58. package/dist/machines/pagination/index.d.mts +1 -1
  59. package/dist/machines/password-input/index.d.cts +1 -1
  60. package/dist/machines/password-input/index.d.mts +1 -1
  61. package/dist/machines/pin-input/index.d.cts +1 -1
  62. package/dist/machines/pin-input/index.d.mts +1 -1
  63. package/dist/machines/popover/index.cjs +1 -1
  64. package/dist/machines/popover/index.d.cts +1 -1
  65. package/dist/machines/popover/index.d.mts +2 -2
  66. package/dist/machines/popover/index.mjs +1 -1
  67. package/dist/machines/progress/index.d.cts +1 -1
  68. package/dist/machines/progress/index.d.mts +1 -1
  69. package/dist/machines/rating-group/index.d.cts +1 -1
  70. package/dist/machines/rating-group/index.d.mts +1 -1
  71. package/dist/machines/scroll-area/index.d.cts +1 -1
  72. package/dist/machines/scroll-area/index.d.mts +1 -1
  73. package/dist/machines/select/index.d.cts +2 -2
  74. package/dist/machines/select/index.d.mts +3 -3
  75. package/dist/machines/signature-pad/index.d.cts +1 -1
  76. package/dist/machines/signature-pad/index.d.mts +1 -1
  77. package/dist/machines/slider/index.d.cts +1 -1
  78. package/dist/machines/slider/index.d.mts +1 -1
  79. package/dist/machines/steps/index.d.cts +1 -1
  80. package/dist/machines/steps/index.d.mts +1 -1
  81. package/dist/machines/tabs/index.d.cts +1 -1
  82. package/dist/machines/tabs/index.d.mts +1 -1
  83. package/dist/machines/tags-input/index.d.cts +1 -1
  84. package/dist/machines/tags-input/index.d.mts +1 -1
  85. package/dist/machines/timer/index.d.cts +1 -1
  86. package/dist/machines/timer/index.d.mts +1 -1
  87. package/dist/machines/toast/index.d.cts +1 -1
  88. package/dist/machines/toast/index.d.mts +1 -1
  89. package/dist/machines/tooltip/index.d.cts +1 -1
  90. package/dist/machines/tooltip/index.d.mts +2 -2
  91. package/dist/machines/tour/index.cjs +4 -3
  92. package/dist/machines/tour/index.d.cts +1 -1
  93. package/dist/machines/tour/index.d.mts +2 -2
  94. package/dist/machines/tour/index.mjs +4 -3
  95. package/dist/machines/tree-view/index.d.cts +1 -1
  96. package/dist/machines/tree-view/index.d.mts +1 -1
  97. package/dist/popper.d.cts +1 -1
  98. package/dist/popper.d.mts +1 -1
  99. package/dist/{selection-CTaapzrB.d.mts → selection-JDFmyke7.d.mts} +1 -1
  100. package/dist/{selection-D3b3yV_x.d.cts → selection-vng1guNc.d.cts} +1 -1
  101. package/package.json +1 -1
@@ -4,7 +4,7 @@ const require_utils = require('../../utils-CtgLe8Vv.cjs');
4
4
  const require_core = require('../../core-DHn58LRl.cjs');
5
5
  const require_interact_outside = require('../../interact-outside-Dp8GERFa.cjs');
6
6
  const require_dismissable = require('../../dismissable-rIq_LmT8.cjs');
7
- const require_focus_trap = require('../../focus-trap-Brjt3GUU.cjs');
7
+ const require_focus_trap = require('../../focus-trap-BwUy71da.cjs');
8
8
  const require_popper = require('../../popper-kp05O3Bm.cjs');
9
9
  const require_create_props = require('../../create-props-l5q5b8Wo.cjs');
10
10
 
@@ -873,10 +873,11 @@ const machine = require_core.createMachine({
873
873
  const contentEl = () => getContentEl(scope);
874
874
  return require_dismissable.trackDismissableBranch(contentEl, { defer: true });
875
875
  },
876
- trapFocus({ computed, scope }) {
876
+ trapFocus({ computed, scope, context }) {
877
877
  if (computed("step") == null) return;
878
878
  const contentEl = () => getContentEl(scope);
879
- return require_focus_trap.trapFocus(contentEl, {
879
+ const targetEl = () => context.get("resolvedTarget");
880
+ return require_focus_trap.trapFocus([contentEl, targetEl], {
880
881
  escapeDeactivates: false,
881
882
  allowOutsideClick: true,
882
883
  preventScroll: true,
@@ -6,7 +6,7 @@ import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusO
6
6
  import { c as Placement } from "../../types-TUsgVjZA.cjs";
7
7
 
8
8
  //#region src/machines/tour/tour.anatomy.d.ts
9
- declare const anatomy: AnatomyInstance<"content" | "title" | "description" | "actionTrigger" | "closeTrigger" | "positioner" | "arrow" | "arrowTip" | "progressText" | "backdrop" | "spotlight">;
9
+ declare const anatomy: AnatomyInstance<"title" | "content" | "arrow" | "positioner" | "arrowTip" | "actionTrigger" | "description" | "closeTrigger" | "progressText" | "backdrop" | "spotlight">;
10
10
  //#endregion
11
11
  //#region src/machines/tour/utils/rect.d.ts
12
12
  interface Point {
@@ -3,10 +3,10 @@ import { p as Machine, u as EventObject, y as Service } from "../../types-jyV564
3
3
  import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVcPBg7R.mjs";
4
4
  import { i as waitForPromise, n as WaitForPromiseReturn, r as waitForElement, t as WaitForOptions } from "../../wait-for-Pn6RmrHX.mjs";
5
5
  import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusOutsideEvent, r as InteractOutsideEvent } from "../../index-9OlOKr2i.mjs";
6
- import { u as Placement } from "../../index-BI1GChBz.mjs";
6
+ import { u as Placement } from "../../index-BlM1bSkX.mjs";
7
7
 
8
8
  //#region src/machines/tour/tour.anatomy.d.ts
9
- declare const anatomy: AnatomyInstance<"content" | "title" | "description" | "actionTrigger" | "closeTrigger" | "positioner" | "arrow" | "arrowTip" | "progressText" | "backdrop" | "spotlight">;
9
+ declare const anatomy: AnatomyInstance<"title" | "content" | "arrow" | "positioner" | "arrowTip" | "actionTrigger" | "description" | "closeTrigger" | "progressText" | "backdrop" | "spotlight">;
10
10
  //#endregion
11
11
  //#region src/machines/tour/utils/rect.d.ts
12
12
  interface Point {
@@ -4,7 +4,7 @@ import { Et as nextIndex, dt as isString, ft as isEqual, i as warn, kt as prevIn
4
4
  import { a as createMachine, c as mergeProps, i as createGuards } from "../../core-DVmt6PX7.mjs";
5
5
  import { t as trackInteractOutside } from "../../interact-outside-D9gKK1XW.mjs";
6
6
  import { t as trackDismissableBranch } from "../../dismissable-CyZwVu7n.mjs";
7
- import { t as trapFocus } from "../../focus-trap-C_QmP_9k.mjs";
7
+ import { t as trapFocus } from "../../focus-trap-Bw_WJq_d.mjs";
8
8
  import { n as getPlacement, t as getPlacementStyles } from "../../popper-CjBC91Tz.mjs";
9
9
  import { t as createProps } from "../../create-props-SRSjdUTq.mjs";
10
10
 
@@ -873,10 +873,11 @@ const machine = createMachine({
873
873
  const contentEl = () => getContentEl(scope);
874
874
  return trackDismissableBranch(contentEl, { defer: true });
875
875
  },
876
- trapFocus({ computed, scope }) {
876
+ trapFocus({ computed, scope, context }) {
877
877
  if (computed("step") == null) return;
878
878
  const contentEl = () => getContentEl(scope);
879
- return trapFocus(contentEl, {
879
+ const targetEl = () => context.get("resolvedTarget");
880
+ return trapFocus([contentEl, targetEl], {
880
881
  escapeDeactivates: false,
881
882
  allowOutsideClick: true,
882
883
  preventScroll: true,
@@ -6,7 +6,7 @@ import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as Comm
6
6
  import { n as TypeaheadState } from "../../typeahead-BWyD_KIb.cjs";
7
7
 
8
8
  //#region src/machines/tree-view/tree-view.anatomy.d.ts
9
- declare const anatomy: AnatomyInstance<"root" | "label" | "item" | "itemIndicator" | "tree" | "branch" | "branchContent" | "branchControl" | "branchIndentGuide" | "branchIndicator" | "branchText" | "branchTrigger" | "itemText" | "nodeCheckbox" | "nodeRenameInput">;
9
+ declare const anatomy: AnatomyInstance<"root" | "label" | "item" | "branch" | "branchContent" | "branchControl" | "branchIndentGuide" | "branchIndicator" | "branchText" | "branchTrigger" | "itemIndicator" | "itemText" | "nodeCheckbox" | "nodeRenameInput" | "tree">;
10
10
  //#endregion
11
11
  //#region src/machines/tree-view/tree-view.collection.d.ts
12
12
  declare const collection: {
@@ -6,7 +6,7 @@ import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as Comm
6
6
  import { n as TypeaheadState } from "../../typeahead-BX-BWYjD.mjs";
7
7
 
8
8
  //#region src/machines/tree-view/tree-view.anatomy.d.ts
9
- declare const anatomy: AnatomyInstance<"root" | "label" | "item" | "itemIndicator" | "tree" | "branch" | "branchContent" | "branchControl" | "branchIndentGuide" | "branchIndicator" | "branchText" | "branchTrigger" | "itemText" | "nodeCheckbox" | "nodeRenameInput">;
9
+ declare const anatomy: AnatomyInstance<"root" | "label" | "item" | "branch" | "branchContent" | "branchControl" | "branchIndentGuide" | "branchIndicator" | "branchText" | "branchTrigger" | "itemIndicator" | "itemText" | "nodeCheckbox" | "nodeRenameInput" | "tree">;
10
10
  //#endregion
11
11
  //#region src/machines/tree-view/tree-view.collection.d.ts
12
12
  declare const collection: {
package/dist/popper.d.cts CHANGED
@@ -53,7 +53,7 @@ declare function getPlacementStyles(options?: Pick<PositioningOptions, "placemen
53
53
  readonly zIndex: "inherit";
54
54
  };
55
55
  floating: {
56
- readonly position: "fixed" | "absolute";
56
+ readonly position: "absolute" | "fixed";
57
57
  readonly isolation: "isolate";
58
58
  readonly minWidth: "max-content" | undefined;
59
59
  readonly width: "var(--reference-width)" | undefined;
package/dist/popper.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as getPlacement, c as Boundary, d as PlacementAlign, f as PlacementSide, i as getPlacementStyles, l as ComputePositionReturn, n as isValidPlacement, o as AnchorRect, p as PositioningOptions, r as GetPlacementStylesOptions, s as AutoUpdateOptions, t as getPlacementSide, u as Placement } from "./index-BI1GChBz.mjs";
1
+ import { a as getPlacement, c as Boundary, d as PlacementAlign, f as PlacementSide, i as getPlacementStyles, l as ComputePositionReturn, n as isValidPlacement, o as AnchorRect, p as PositioningOptions, r as GetPlacementStylesOptions, s as AutoUpdateOptions, t as getPlacementSide, u as Placement } from "./index-BlM1bSkX.mjs";
2
2
  export { AnchorRect, AutoUpdateOptions, Boundary, ComputePositionReturn, GetPlacementStylesOptions, Placement, PlacementAlign, PlacementSide, PositioningOptions, getPlacement, getPlacementSide, getPlacementStyles, isValidPlacement };
@@ -1,5 +1,5 @@
1
1
  import { r as CollectionOptions, t as CollectionItem } from "./types-Df8ZhdY-.mjs";
2
- import { t as ListCollection } from "./list-collection-BbgocToA.mjs";
2
+ import { t as ListCollection } from "./list-collection-CTt1eong.mjs";
3
3
 
4
4
  //#region src/shared/collection/grid-collection.d.ts
5
5
  interface GridCollectionOptions<T> extends CollectionOptions<T> {
@@ -1,5 +1,5 @@
1
1
  import { r as CollectionOptions, t as CollectionItem } from "./types-CADkcKtr.cjs";
2
- import { t as ListCollection } from "./list-collection-DettiQL3.cjs";
2
+ import { t as ListCollection } from "./list-collection-BvMwDNHf.cjs";
3
3
 
4
4
  //#region src/shared/collection/grid-collection.d.ts
5
5
  interface GridCollectionOptions<T> extends CollectionOptions<T> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprawlify/primitives",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "type": "module",
5
5
  "description": "A set of primitive components for building user interfaces.",
6
6
  "author": "sprawlify <npm@sprawlify.com>",