@slipstream-ui/core 0.6.0 → 0.6.1

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 (184) hide show
  1. package/dist/index.js +3 -2
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +3 -2
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/manifests/accordion.manifest.json +1 -1
  6. package/dist/manifests/alert.manifest.json +1 -1
  7. package/dist/manifests/announcement-bar.manifest.json +1 -1
  8. package/dist/manifests/app-shell.manifest.json +1 -1
  9. package/dist/manifests/applied-filters.manifest.json +1 -1
  10. package/dist/manifests/article-card.manifest.json +1 -1
  11. package/dist/manifests/auth-layout.manifest.json +1 -1
  12. package/dist/manifests/autocomplete.manifest.json +1 -1
  13. package/dist/manifests/avatar.manifest.json +1 -1
  14. package/dist/manifests/badge.manifest.json +1 -1
  15. package/dist/manifests/block.manifest.json +1 -1
  16. package/dist/manifests/breadcrumb.manifest.json +1 -1
  17. package/dist/manifests/button-group.manifest.json +1 -1
  18. package/dist/manifests/button.manifest.json +1 -1
  19. package/dist/manifests/card.manifest.json +1 -1
  20. package/dist/manifests/checkbox.manifest.json +1 -1
  21. package/dist/manifests/comparison-table.manifest.json +1 -1
  22. package/dist/manifests/confirm-dialog.manifest.json +1 -1
  23. package/dist/manifests/contact-strip.manifest.json +1 -1
  24. package/dist/manifests/container.manifest.json +1 -1
  25. package/dist/manifests/cta-section.manifest.json +1 -1
  26. package/dist/manifests/data-table.manifest.json +1 -1
  27. package/dist/manifests/date-picker.manifest.json +1 -1
  28. package/dist/manifests/date-range-picker.manifest.json +1 -1
  29. package/dist/manifests/dialog.manifest.json +1 -1
  30. package/dist/manifests/drawer.manifest.json +1 -1
  31. package/dist/manifests/empty-state.manifest.json +1 -1
  32. package/dist/manifests/feature-grid.manifest.json +1 -1
  33. package/dist/manifests/feature-row.manifest.json +1 -1
  34. package/dist/manifests/fieldset.manifest.json +1 -1
  35. package/dist/manifests/file-upload.manifest.json +1 -1
  36. package/dist/manifests/filter-bar.manifest.json +1 -1
  37. package/dist/manifests/filter-chips.manifest.json +1 -1
  38. package/dist/manifests/filter-panel.manifest.json +1 -1
  39. package/dist/manifests/flex.manifest.json +1 -1
  40. package/dist/manifests/form-field.manifest.json +1 -1
  41. package/dist/manifests/form-layout.manifest.json +1 -1
  42. package/dist/manifests/form.manifest.json +1 -1
  43. package/dist/manifests/grid.manifest.json +1 -1
  44. package/dist/manifests/heading.manifest.json +1 -1
  45. package/dist/manifests/hero.manifest.json +1 -1
  46. package/dist/manifests/input-group.manifest.json +1 -1
  47. package/dist/manifests/input.manifest.json +1 -1
  48. package/dist/manifests/label.manifest.json +1 -1
  49. package/dist/manifests/link-tabs.manifest.json +1 -1
  50. package/dist/manifests/link.manifest.json +1 -1
  51. package/dist/manifests/list.manifest.json +1 -1
  52. package/dist/manifests/logo-cloud.manifest.json +1 -1
  53. package/dist/manifests/menu.manifest.json +1 -1
  54. package/dist/manifests/metric-card.manifest.json +1 -1
  55. package/dist/manifests/multi-select.manifest.json +1 -1
  56. package/dist/manifests/newsletter.manifest.json +1 -1
  57. package/dist/manifests/page-header.manifest.json +1 -1
  58. package/dist/manifests/pagination.manifest.json +1 -1
  59. package/dist/manifests/password-input.manifest.json +1 -1
  60. package/dist/manifests/popover.manifest.json +1 -1
  61. package/dist/manifests/process-steps.manifest.json +1 -1
  62. package/dist/manifests/progress.manifest.json +1 -1
  63. package/dist/manifests/prose.manifest.json +1 -1
  64. package/dist/manifests/radio.manifest.json +1 -1
  65. package/dist/manifests/range-slider.manifest.json +1 -1
  66. package/dist/manifests/search.manifest.json +1 -1
  67. package/dist/manifests/section-heading.manifest.json +1 -1
  68. package/dist/manifests/section.manifest.json +1 -1
  69. package/dist/manifests/segmented-control.manifest.json +1 -1
  70. package/dist/manifests/select-menu.manifest.json +1 -1
  71. package/dist/manifests/select.manifest.json +1 -1
  72. package/dist/manifests/separator.manifest.json +1 -1
  73. package/dist/manifests/site-footer.manifest.json +1 -1
  74. package/dist/manifests/site-header.manifest.json +1 -1
  75. package/dist/manifests/skeleton.manifest.json +1 -1
  76. package/dist/manifests/spinner.manifest.json +1 -1
  77. package/dist/manifests/stat-band.manifest.json +1 -1
  78. package/dist/manifests/stepper.manifest.json +1 -1
  79. package/dist/manifests/switch.manifest.json +1 -1
  80. package/dist/manifests/table-card.manifest.json +1 -1
  81. package/dist/manifests/table-of-contents.manifest.json +1 -1
  82. package/dist/manifests/table.manifest.json +1 -1
  83. package/dist/manifests/tabs.manifest.json +1 -1
  84. package/dist/manifests/testimonial.manifest.json +1 -1
  85. package/dist/manifests/text.manifest.json +1 -1
  86. package/dist/manifests/textarea.manifest.json +1 -1
  87. package/dist/manifests/theme-toggle.manifest.json +1 -1
  88. package/dist/manifests/time-picker.manifest.json +1 -1
  89. package/dist/manifests/timeline.manifest.json +1 -1
  90. package/dist/manifests/toast.manifest.json +1 -1
  91. package/dist/manifests/tooltip.manifest.json +1 -1
  92. package/dist/src/utils/modal-layer.js +3 -2
  93. package/dist/src/utils/modal-layer.js.map +1 -1
  94. package/dist/src/utils/modal-layer.mjs +3 -2
  95. package/dist/src/utils/modal-layer.mjs.map +1 -1
  96. package/package.json +2 -2
  97. package/src/manifests/accordion.manifest.json +1 -1
  98. package/src/manifests/alert.manifest.json +1 -1
  99. package/src/manifests/announcement-bar.manifest.json +1 -1
  100. package/src/manifests/app-shell.manifest.json +1 -1
  101. package/src/manifests/applied-filters.manifest.json +1 -1
  102. package/src/manifests/article-card.manifest.json +1 -1
  103. package/src/manifests/auth-layout.manifest.json +1 -1
  104. package/src/manifests/autocomplete.manifest.json +1 -1
  105. package/src/manifests/avatar.manifest.json +1 -1
  106. package/src/manifests/badge.manifest.json +1 -1
  107. package/src/manifests/block.manifest.json +1 -1
  108. package/src/manifests/breadcrumb.manifest.json +1 -1
  109. package/src/manifests/button-group.manifest.json +1 -1
  110. package/src/manifests/button.manifest.json +1 -1
  111. package/src/manifests/card.manifest.json +1 -1
  112. package/src/manifests/checkbox.manifest.json +1 -1
  113. package/src/manifests/comparison-table.manifest.json +1 -1
  114. package/src/manifests/confirm-dialog.manifest.json +1 -1
  115. package/src/manifests/contact-strip.manifest.json +1 -1
  116. package/src/manifests/container.manifest.json +1 -1
  117. package/src/manifests/cta-section.manifest.json +1 -1
  118. package/src/manifests/data-table.manifest.json +1 -1
  119. package/src/manifests/date-picker.manifest.json +1 -1
  120. package/src/manifests/date-range-picker.manifest.json +1 -1
  121. package/src/manifests/dialog.manifest.json +1 -1
  122. package/src/manifests/drawer.manifest.json +1 -1
  123. package/src/manifests/empty-state.manifest.json +1 -1
  124. package/src/manifests/feature-grid.manifest.json +1 -1
  125. package/src/manifests/feature-row.manifest.json +1 -1
  126. package/src/manifests/fieldset.manifest.json +1 -1
  127. package/src/manifests/file-upload.manifest.json +1 -1
  128. package/src/manifests/filter-bar.manifest.json +1 -1
  129. package/src/manifests/filter-chips.manifest.json +1 -1
  130. package/src/manifests/filter-panel.manifest.json +1 -1
  131. package/src/manifests/flex.manifest.json +1 -1
  132. package/src/manifests/form-field.manifest.json +1 -1
  133. package/src/manifests/form-layout.manifest.json +1 -1
  134. package/src/manifests/form.manifest.json +1 -1
  135. package/src/manifests/grid.manifest.json +1 -1
  136. package/src/manifests/heading.manifest.json +1 -1
  137. package/src/manifests/hero.manifest.json +1 -1
  138. package/src/manifests/input-group.manifest.json +1 -1
  139. package/src/manifests/input.manifest.json +1 -1
  140. package/src/manifests/label.manifest.json +1 -1
  141. package/src/manifests/link-tabs.manifest.json +1 -1
  142. package/src/manifests/link.manifest.json +1 -1
  143. package/src/manifests/list.manifest.json +1 -1
  144. package/src/manifests/logo-cloud.manifest.json +1 -1
  145. package/src/manifests/menu.manifest.json +1 -1
  146. package/src/manifests/metric-card.manifest.json +1 -1
  147. package/src/manifests/multi-select.manifest.json +1 -1
  148. package/src/manifests/newsletter.manifest.json +1 -1
  149. package/src/manifests/page-header.manifest.json +1 -1
  150. package/src/manifests/pagination.manifest.json +1 -1
  151. package/src/manifests/password-input.manifest.json +1 -1
  152. package/src/manifests/popover.manifest.json +1 -1
  153. package/src/manifests/process-steps.manifest.json +1 -1
  154. package/src/manifests/progress.manifest.json +1 -1
  155. package/src/manifests/prose.manifest.json +1 -1
  156. package/src/manifests/radio.manifest.json +1 -1
  157. package/src/manifests/range-slider.manifest.json +1 -1
  158. package/src/manifests/search.manifest.json +1 -1
  159. package/src/manifests/section-heading.manifest.json +1 -1
  160. package/src/manifests/section.manifest.json +1 -1
  161. package/src/manifests/segmented-control.manifest.json +1 -1
  162. package/src/manifests/select-menu.manifest.json +1 -1
  163. package/src/manifests/select.manifest.json +1 -1
  164. package/src/manifests/separator.manifest.json +1 -1
  165. package/src/manifests/site-footer.manifest.json +1 -1
  166. package/src/manifests/site-header.manifest.json +1 -1
  167. package/src/manifests/skeleton.manifest.json +1 -1
  168. package/src/manifests/spinner.manifest.json +1 -1
  169. package/src/manifests/stat-band.manifest.json +1 -1
  170. package/src/manifests/stepper.manifest.json +1 -1
  171. package/src/manifests/switch.manifest.json +1 -1
  172. package/src/manifests/table-card.manifest.json +1 -1
  173. package/src/manifests/table-of-contents.manifest.json +1 -1
  174. package/src/manifests/table.manifest.json +1 -1
  175. package/src/manifests/tabs.manifest.json +1 -1
  176. package/src/manifests/testimonial.manifest.json +1 -1
  177. package/src/manifests/text.manifest.json +1 -1
  178. package/src/manifests/textarea.manifest.json +1 -1
  179. package/src/manifests/theme-toggle.manifest.json +1 -1
  180. package/src/manifests/time-picker.manifest.json +1 -1
  181. package/src/manifests/timeline.manifest.json +1 -1
  182. package/src/manifests/toast.manifest.json +1 -1
  183. package/src/manifests/tooltip.manifest.json +1 -1
  184. package/src/utils/modal-layer.ts +3 -2
@@ -161,7 +161,7 @@
161
161
  ],
162
162
  "package": "@slipstream-ui/core",
163
163
  "importPath": "@slipstream-ui/core",
164
- "version": "0.6.0",
164
+ "version": "0.6.1",
165
165
  "sourceDir": "search",
166
166
  "exportName": "Search"
167
167
  }
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "section-heading",
9
9
  "exportName": "SectionHeading",
10
10
  "description": "Section heading block: eyebrow, title (level 2-4), description and actions, with left/center alignment and three sizes.",
@@ -4,7 +4,7 @@
4
4
  "tier": "organism",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "section",
9
9
  "exportName": "Section",
10
10
  "description": "Full-width page section with a surface tone, vertical rhythm and an optional centered container.",
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "segmented-control",
9
9
  "exportName": "SegmentedControl",
10
10
  "description": "Single- or multi-select segmented control for view and filter switches.",
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "select-menu",
9
9
  "exportName": "SelectMenu",
10
10
  "description": "Custom listbox select for rich options: descriptions, icons, groups, multi-select, custom rows and hidden inputs for forms.",
@@ -123,7 +123,7 @@
123
123
  ],
124
124
  "package": "@slipstream-ui/core",
125
125
  "importPath": "@slipstream-ui/core",
126
- "version": "0.6.0",
126
+ "version": "0.6.1",
127
127
  "sourceDir": "select",
128
128
  "exportName": "Select"
129
129
  }
@@ -84,7 +84,7 @@
84
84
  ],
85
85
  "package": "@slipstream-ui/core",
86
86
  "importPath": "@slipstream-ui/core",
87
- "version": "0.6.0",
87
+ "version": "0.6.1",
88
88
  "sourceDir": "separator",
89
89
  "exportName": "Separator"
90
90
  }
@@ -4,7 +4,7 @@
4
4
  "tier": "organism",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "site-footer",
9
9
  "exportName": "SiteFooter",
10
10
  "description": "Marketing footer: brand + tagline column, link columns and a legal bar; router-agnostic via linkComponent.",
@@ -4,7 +4,7 @@
4
4
  "tier": "organism",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "site-header",
9
9
  "exportName": "SiteHeader",
10
10
  "description": "Marketing/site header: sticky bar with brand, horizontal navigation with prefix-aware active states, right-aligned actions and a mobile drawer.",
@@ -126,7 +126,7 @@
126
126
  ],
127
127
  "package": "@slipstream-ui/core",
128
128
  "importPath": "@slipstream-ui/core",
129
- "version": "0.6.0",
129
+ "version": "0.6.1",
130
130
  "sourceDir": "skeleton",
131
131
  "exportName": "Skeleton"
132
132
  }
@@ -52,7 +52,7 @@
52
52
  ],
53
53
  "package": "@slipstream-ui/core",
54
54
  "importPath": "@slipstream-ui/core",
55
- "version": "0.6.0",
55
+ "version": "0.6.1",
56
56
  "sourceDir": "spinner",
57
57
  "exportName": "Spinner"
58
58
  }
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "stat-band",
9
9
  "exportName": "StatBand",
10
10
  "description": "Semantic description list of headline stats with labels, optional hints and column presets.",
@@ -89,7 +89,7 @@
89
89
  ],
90
90
  "package": "@slipstream-ui/core",
91
91
  "importPath": "@slipstream-ui/core",
92
- "version": "0.6.0",
92
+ "version": "0.6.1",
93
93
  "sourceDir": "stepper",
94
94
  "exportName": "Stepper"
95
95
  }
@@ -102,7 +102,7 @@
102
102
  ],
103
103
  "package": "@slipstream-ui/core",
104
104
  "importPath": "@slipstream-ui/core",
105
- "version": "0.6.0",
105
+ "version": "0.6.1",
106
106
  "sourceDir": "switch",
107
107
  "exportName": "Switch"
108
108
  }
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "table-card",
9
9
  "exportName": "TableCard",
10
10
  "description": "Table shell with title/description, header actions, optional toolbar, edge-to-edge body and a footer row.",
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "table-of-contents",
9
9
  "exportName": "TableOfContents",
10
10
  "description": "Sticky 'On this page' navigation with nested levels and aria-current, plus a useScrollSpy hook for the active heading.",
@@ -78,7 +78,7 @@
78
78
  ],
79
79
  "package": "@slipstream-ui/core",
80
80
  "importPath": "@slipstream-ui/core",
81
- "version": "0.6.0",
81
+ "version": "0.6.1",
82
82
  "sourceDir": "table",
83
83
  "exportName": "Table"
84
84
  }
@@ -138,7 +138,7 @@
138
138
  ],
139
139
  "package": "@slipstream-ui/core",
140
140
  "importPath": "@slipstream-ui/core",
141
- "version": "0.6.0",
141
+ "version": "0.6.1",
142
142
  "sourceDir": "tabs",
143
143
  "exportName": "Tabs"
144
144
  }
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "testimonial",
9
9
  "exportName": "Testimonial",
10
10
  "description": "Semantic written testimonial with quote, person, role, company, avatar and logo slots.",
@@ -107,7 +107,7 @@
107
107
  ],
108
108
  "package": "@slipstream-ui/core",
109
109
  "importPath": "@slipstream-ui/core",
110
- "version": "0.6.0",
110
+ "version": "0.6.1",
111
111
  "sourceDir": "text",
112
112
  "exportName": "Text"
113
113
  }
@@ -102,7 +102,7 @@
102
102
  ],
103
103
  "package": "@slipstream-ui/core",
104
104
  "importPath": "@slipstream-ui/core",
105
- "version": "0.6.0",
105
+ "version": "0.6.1",
106
106
  "sourceDir": "textarea",
107
107
  "exportName": "Textarea"
108
108
  }
@@ -112,7 +112,7 @@
112
112
  ],
113
113
  "package": "@slipstream-ui/core",
114
114
  "importPath": "@slipstream-ui/core",
115
- "version": "0.6.0",
115
+ "version": "0.6.1",
116
116
  "sourceDir": "theme-toggle",
117
117
  "exportName": "ThemeToggle"
118
118
  }
@@ -87,7 +87,7 @@
87
87
  ],
88
88
  "package": "@slipstream-ui/core",
89
89
  "importPath": "@slipstream-ui/core",
90
- "version": "0.6.0",
90
+ "version": "0.6.1",
91
91
  "sourceDir": "time-picker",
92
92
  "exportName": "TimePicker"
93
93
  }
@@ -63,7 +63,7 @@
63
63
  ],
64
64
  "package": "@slipstream-ui/core",
65
65
  "importPath": "@slipstream-ui/core",
66
- "version": "0.6.0",
66
+ "version": "0.6.1",
67
67
  "sourceDir": "timeline",
68
68
  "exportName": "Timeline"
69
69
  }
@@ -161,7 +161,7 @@
161
161
  ],
162
162
  "package": "@slipstream-ui/core",
163
163
  "importPath": "@slipstream-ui/core",
164
- "version": "0.6.0",
164
+ "version": "0.6.1",
165
165
  "sourceDir": "toast",
166
166
  "exportName": "ToastProvider"
167
167
  }
@@ -109,7 +109,7 @@
109
109
  ],
110
110
  "package": "@slipstream-ui/core",
111
111
  "importPath": "@slipstream-ui/core",
112
- "version": "0.6.0",
112
+ "version": "0.6.1",
113
113
  "sourceDir": "tooltip",
114
114
  "exportName": "Tooltip"
115
115
  }
@@ -38,8 +38,9 @@ let restoreScroll = null;
38
38
  function useModalLayer(open) {
39
39
  const id = React.useRef(/* @__PURE__ */ Symbol("modal-layer"));
40
40
  React.useEffect(() => {
41
+ const layerId = id.current;
41
42
  if (!open) return;
42
- layers.push(id.current);
43
+ layers.push(layerId);
43
44
  if (layers.length === 1) {
44
45
  const previousOverflow = document.body.style.overflow;
45
46
  document.body.style.overflow = "hidden";
@@ -48,7 +49,7 @@ function useModalLayer(open) {
48
49
  };
49
50
  }
50
51
  return () => {
51
- const index = layers.indexOf(id.current);
52
+ const index = layers.indexOf(layerId);
52
53
  if (index >= 0) layers.splice(index, 1);
53
54
  if (layers.length === 0) {
54
55
  restoreScroll?.();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/modal-layer.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Module-level stack of open modal layers.\n *\n * Dialog and Drawer share this stack so nested modals close one at a time and\n * the body scroll lock is released only after the last layer closes.\n */\nconst layers: symbol[] = [];\nlet restoreScroll: (() => void) | null = null;\n\nexport function useModalLayer(open: boolean) {\n const id = React.useRef(Symbol('modal-layer'));\n\n React.useEffect(() => {\n if (!open) return;\n layers.push(id.current);\n\n if (layers.length === 1) {\n const previousOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n restoreScroll = () => {\n document.body.style.overflow = previousOverflow;\n };\n }\n\n return () => {\n const index = layers.indexOf(id.current);\n if (index >= 0) layers.splice(index, 1);\n if (layers.length === 0) {\n restoreScroll?.();\n restoreScroll = null;\n }\n };\n }, [open]);\n\n return React.useCallback(() => layers[layers.length - 1] === id.current, []);\n}\n\n/** Test-only helper: number of currently registered modal layers. */\nexport function openModalLayerCount() {\n return layers.length;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AAQvB,MAAM,SAAmB,CAAC;AAC1B,IAAI,gBAAqC;AAElC,SAAS,cAAc,MAAe;AAC3C,QAAM,KAAK,MAAM,OAAO,uBAAO,aAAa,CAAC;AAE7C,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,KAAM;AACX,WAAO,KAAK,GAAG,OAAO;AAEtB,QAAI,OAAO,WAAW,GAAG;AACvB,YAAM,mBAAmB,SAAS,KAAK,MAAM;AAC7C,eAAS,KAAK,MAAM,WAAW;AAC/B,sBAAgB,MAAM;AACpB,iBAAS,KAAK,MAAM,WAAW;AAAA,MACjC;AAAA,IACF;AAEA,WAAO,MAAM;AACX,YAAM,QAAQ,OAAO,QAAQ,GAAG,OAAO;AACvC,UAAI,SAAS,EAAG,QAAO,OAAO,OAAO,CAAC;AACtC,UAAI,OAAO,WAAW,GAAG;AACvB,wBAAgB;AAChB,wBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AAET,SAAO,MAAM,YAAY,MAAM,OAAO,OAAO,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAC7E;AAGO,SAAS,sBAAsB;AACpC,SAAO,OAAO;AAChB;","names":[]}
1
+ {"version":3,"sources":["../../../src/utils/modal-layer.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Module-level stack of open modal layers.\n *\n * Dialog and Drawer share this stack so nested modals close one at a time and\n * the body scroll lock is released only after the last layer closes.\n */\nconst layers: symbol[] = [];\nlet restoreScroll: (() => void) | null = null;\n\nexport function useModalLayer(open: boolean) {\n const id = React.useRef(Symbol('modal-layer'));\n\n React.useEffect(() => {\n const layerId = id.current;\n if (!open) return;\n layers.push(layerId);\n\n if (layers.length === 1) {\n const previousOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n restoreScroll = () => {\n document.body.style.overflow = previousOverflow;\n };\n }\n\n return () => {\n const index = layers.indexOf(layerId);\n if (index >= 0) layers.splice(index, 1);\n if (layers.length === 0) {\n restoreScroll?.();\n restoreScroll = null;\n }\n };\n }, [open]);\n\n return React.useCallback(() => layers[layers.length - 1] === id.current, []);\n}\n\n/** Test-only helper: number of currently registered modal layers. */\nexport function openModalLayerCount() {\n return layers.length;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AAQvB,MAAM,SAAmB,CAAC;AAC1B,IAAI,gBAAqC;AAElC,SAAS,cAAc,MAAe;AAC3C,QAAM,KAAK,MAAM,OAAO,uBAAO,aAAa,CAAC;AAE7C,QAAM,UAAU,MAAM;AACpB,UAAM,UAAU,GAAG;AACnB,QAAI,CAAC,KAAM;AACX,WAAO,KAAK,OAAO;AAEnB,QAAI,OAAO,WAAW,GAAG;AACvB,YAAM,mBAAmB,SAAS,KAAK,MAAM;AAC7C,eAAS,KAAK,MAAM,WAAW;AAC/B,sBAAgB,MAAM;AACpB,iBAAS,KAAK,MAAM,WAAW;AAAA,MACjC;AAAA,IACF;AAEA,WAAO,MAAM;AACX,YAAM,QAAQ,OAAO,QAAQ,OAAO;AACpC,UAAI,SAAS,EAAG,QAAO,OAAO,OAAO,CAAC;AACtC,UAAI,OAAO,WAAW,GAAG;AACvB,wBAAgB;AAChB,wBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AAET,SAAO,MAAM,YAAY,MAAM,OAAO,OAAO,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAC7E;AAGO,SAAS,sBAAsB;AACpC,SAAO,OAAO;AAChB;","names":[]}
@@ -4,8 +4,9 @@ let restoreScroll = null;
4
4
  function useModalLayer(open) {
5
5
  const id = React.useRef(/* @__PURE__ */ Symbol("modal-layer"));
6
6
  React.useEffect(() => {
7
+ const layerId = id.current;
7
8
  if (!open) return;
8
- layers.push(id.current);
9
+ layers.push(layerId);
9
10
  if (layers.length === 1) {
10
11
  const previousOverflow = document.body.style.overflow;
11
12
  document.body.style.overflow = "hidden";
@@ -14,7 +15,7 @@ function useModalLayer(open) {
14
15
  };
15
16
  }
16
17
  return () => {
17
- const index = layers.indexOf(id.current);
18
+ const index = layers.indexOf(layerId);
18
19
  if (index >= 0) layers.splice(index, 1);
19
20
  if (layers.length === 0) {
20
21
  restoreScroll?.();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/modal-layer.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Module-level stack of open modal layers.\n *\n * Dialog and Drawer share this stack so nested modals close one at a time and\n * the body scroll lock is released only after the last layer closes.\n */\nconst layers: symbol[] = [];\nlet restoreScroll: (() => void) | null = null;\n\nexport function useModalLayer(open: boolean) {\n const id = React.useRef(Symbol('modal-layer'));\n\n React.useEffect(() => {\n if (!open) return;\n layers.push(id.current);\n\n if (layers.length === 1) {\n const previousOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n restoreScroll = () => {\n document.body.style.overflow = previousOverflow;\n };\n }\n\n return () => {\n const index = layers.indexOf(id.current);\n if (index >= 0) layers.splice(index, 1);\n if (layers.length === 0) {\n restoreScroll?.();\n restoreScroll = null;\n }\n };\n }, [open]);\n\n return React.useCallback(() => layers[layers.length - 1] === id.current, []);\n}\n\n/** Test-only helper: number of currently registered modal layers. */\nexport function openModalLayerCount() {\n return layers.length;\n}\n"],"mappings":"AAAA,YAAY,WAAW;AAQvB,MAAM,SAAmB,CAAC;AAC1B,IAAI,gBAAqC;AAElC,SAAS,cAAc,MAAe;AAC3C,QAAM,KAAK,MAAM,OAAO,uBAAO,aAAa,CAAC;AAE7C,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,KAAM;AACX,WAAO,KAAK,GAAG,OAAO;AAEtB,QAAI,OAAO,WAAW,GAAG;AACvB,YAAM,mBAAmB,SAAS,KAAK,MAAM;AAC7C,eAAS,KAAK,MAAM,WAAW;AAC/B,sBAAgB,MAAM;AACpB,iBAAS,KAAK,MAAM,WAAW;AAAA,MACjC;AAAA,IACF;AAEA,WAAO,MAAM;AACX,YAAM,QAAQ,OAAO,QAAQ,GAAG,OAAO;AACvC,UAAI,SAAS,EAAG,QAAO,OAAO,OAAO,CAAC;AACtC,UAAI,OAAO,WAAW,GAAG;AACvB,wBAAgB;AAChB,wBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AAET,SAAO,MAAM,YAAY,MAAM,OAAO,OAAO,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAC7E;AAGO,SAAS,sBAAsB;AACpC,SAAO,OAAO;AAChB;","names":[]}
1
+ {"version":3,"sources":["../../../src/utils/modal-layer.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Module-level stack of open modal layers.\n *\n * Dialog and Drawer share this stack so nested modals close one at a time and\n * the body scroll lock is released only after the last layer closes.\n */\nconst layers: symbol[] = [];\nlet restoreScroll: (() => void) | null = null;\n\nexport function useModalLayer(open: boolean) {\n const id = React.useRef(Symbol('modal-layer'));\n\n React.useEffect(() => {\n const layerId = id.current;\n if (!open) return;\n layers.push(layerId);\n\n if (layers.length === 1) {\n const previousOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n restoreScroll = () => {\n document.body.style.overflow = previousOverflow;\n };\n }\n\n return () => {\n const index = layers.indexOf(layerId);\n if (index >= 0) layers.splice(index, 1);\n if (layers.length === 0) {\n restoreScroll?.();\n restoreScroll = null;\n }\n };\n }, [open]);\n\n return React.useCallback(() => layers[layers.length - 1] === id.current, []);\n}\n\n/** Test-only helper: number of currently registered modal layers. */\nexport function openModalLayerCount() {\n return layers.length;\n}\n"],"mappings":"AAAA,YAAY,WAAW;AAQvB,MAAM,SAAmB,CAAC;AAC1B,IAAI,gBAAqC;AAElC,SAAS,cAAc,MAAe;AAC3C,QAAM,KAAK,MAAM,OAAO,uBAAO,aAAa,CAAC;AAE7C,QAAM,UAAU,MAAM;AACpB,UAAM,UAAU,GAAG;AACnB,QAAI,CAAC,KAAM;AACX,WAAO,KAAK,OAAO;AAEnB,QAAI,OAAO,WAAW,GAAG;AACvB,YAAM,mBAAmB,SAAS,KAAK,MAAM;AAC7C,eAAS,KAAK,MAAM,WAAW;AAC/B,sBAAgB,MAAM;AACpB,iBAAS,KAAK,MAAM,WAAW;AAAA,MACjC;AAAA,IACF;AAEA,WAAO,MAAM;AACX,YAAM,QAAQ,OAAO,QAAQ,OAAO;AACpC,UAAI,SAAS,EAAG,QAAO,OAAO,OAAO,CAAC;AACtC,UAAI,OAAO,WAAW,GAAG;AACvB,wBAAgB;AAChB,wBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,IAAI,CAAC;AAET,SAAO,MAAM,YAAY,MAAM,OAAO,OAAO,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAC7E;AAGO,SAAS,sBAAsB;AACpC,SAAO,OAAO;AAChB;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slipstream-ui/core",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/michaelmcshinsky/slipstream-ui.git",
@@ -55,9 +55,9 @@
55
55
  "tsup": "^9.0.0",
56
56
  "typescript": "^5.3.3",
57
57
  "vitest": "^5.0.5",
58
- "@slipstream-ui/eslint-config": "0.0.1",
59
58
  "@slipstream-ui/tailwind-config": "0.0.1",
60
59
  "@slipstream-ui/typescript-config": "0.0.1",
60
+ "@slipstream-ui/eslint-config": "0.0.1",
61
61
  "@slipstream-ui/vitest-config": "0.0.1"
62
62
  },
63
63
  "peerDependencies": {
@@ -132,7 +132,7 @@
132
132
  ],
133
133
  "package": "@slipstream-ui/core",
134
134
  "importPath": "@slipstream-ui/core",
135
- "version": "0.6.0",
135
+ "version": "0.6.1",
136
136
  "sourceDir": "accordion",
137
137
  "exportName": "Accordion"
138
138
  }
@@ -91,7 +91,7 @@
91
91
  ],
92
92
  "package": "@slipstream-ui/core",
93
93
  "importPath": "@slipstream-ui/core",
94
- "version": "0.6.0",
94
+ "version": "0.6.1",
95
95
  "sourceDir": "alert",
96
96
  "exportName": "Alert"
97
97
  }
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "announcement-bar",
9
9
  "exportName": "AnnouncementBar",
10
10
  "description": "Dismissible announcement bar with optional action, tone and sticky positioning.",
@@ -214,7 +214,7 @@
214
214
  ],
215
215
  "package": "@slipstream-ui/core",
216
216
  "importPath": "@slipstream-ui/core",
217
- "version": "0.6.0",
217
+ "version": "0.6.1",
218
218
  "sourceDir": "app-shell",
219
219
  "exportName": "AppShell"
220
220
  }
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "applied-filters",
9
9
  "exportName": "AppliedFilters",
10
10
  "description": "Applied-filter summary with a live count, removable chips and an edit action.",
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "article-card",
9
9
  "exportName": "ArticleCard",
10
10
  "description": "Linked article or resource card with media, eyebrow, title, summary and metadata.",
@@ -106,7 +106,7 @@
106
106
  ],
107
107
  "package": "@slipstream-ui/core",
108
108
  "importPath": "@slipstream-ui/core",
109
- "version": "0.6.0",
109
+ "version": "0.6.1",
110
110
  "sourceDir": "auth-layout",
111
111
  "exportName": "AuthLayout"
112
112
  }
@@ -194,7 +194,7 @@
194
194
  ],
195
195
  "package": "@slipstream-ui/core",
196
196
  "importPath": "@slipstream-ui/core",
197
- "version": "0.6.0",
197
+ "version": "0.6.1",
198
198
  "sourceDir": "autocomplete",
199
199
  "exportName": "Autocomplete"
200
200
  }
@@ -152,7 +152,7 @@
152
152
  ],
153
153
  "package": "@slipstream-ui/core",
154
154
  "importPath": "@slipstream-ui/core",
155
- "version": "0.6.0",
155
+ "version": "0.6.1",
156
156
  "sourceDir": "avatar",
157
157
  "exportName": "Avatar"
158
158
  }
@@ -193,7 +193,7 @@
193
193
  ],
194
194
  "package": "@slipstream-ui/core",
195
195
  "importPath": "@slipstream-ui/core",
196
- "version": "0.6.0",
196
+ "version": "0.6.1",
197
197
  "sourceDir": "badge",
198
198
  "exportName": "Badge"
199
199
  }
@@ -101,7 +101,7 @@
101
101
  ],
102
102
  "package": "@slipstream-ui/core",
103
103
  "importPath": "@slipstream-ui/core",
104
- "version": "0.6.0",
104
+ "version": "0.6.1",
105
105
  "sourceDir": "block",
106
106
  "exportName": "Block"
107
107
  }
@@ -129,7 +129,7 @@
129
129
  ],
130
130
  "package": "@slipstream-ui/core",
131
131
  "importPath": "@slipstream-ui/core",
132
- "version": "0.6.0",
132
+ "version": "0.6.1",
133
133
  "sourceDir": "breadcrumb",
134
134
  "exportName": "Breadcrumb"
135
135
  }
@@ -105,7 +105,7 @@
105
105
  ],
106
106
  "package": "@slipstream-ui/core",
107
107
  "importPath": "@slipstream-ui/core",
108
- "version": "0.6.0",
108
+ "version": "0.6.1",
109
109
  "sourceDir": "button-group",
110
110
  "exportName": "ButtonGroup"
111
111
  }
@@ -253,7 +253,7 @@
253
253
  ],
254
254
  "package": "@slipstream-ui/core",
255
255
  "importPath": "@slipstream-ui/core",
256
- "version": "0.6.0",
256
+ "version": "0.6.1",
257
257
  "sourceDir": "button",
258
258
  "exportName": "Button"
259
259
  }
@@ -86,7 +86,7 @@
86
86
  ],
87
87
  "package": "@slipstream-ui/core",
88
88
  "importPath": "@slipstream-ui/core",
89
- "version": "0.6.0",
89
+ "version": "0.6.1",
90
90
  "sourceDir": "card",
91
91
  "exportName": "Card"
92
92
  }
@@ -160,7 +160,7 @@
160
160
  ],
161
161
  "package": "@slipstream-ui/core",
162
162
  "importPath": "@slipstream-ui/core",
163
- "version": "0.6.0",
163
+ "version": "0.6.1",
164
164
  "sourceDir": "checkbox",
165
165
  "exportName": "Checkbox"
166
166
  }
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "comparison-table",
9
9
  "exportName": "ComparisonTable",
10
10
  "description": "Marketing comparison table with check/dash boolean cells, a highlighted column and responsive overflow.",
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "confirm-dialog",
9
9
  "exportName": "ConfirmDialog",
10
10
  "description": "Accessible confirmation dialog with async pending state, destructive variant and cancellable actions, built on Dialog.",
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "contact-strip",
9
9
  "exportName": "ContactStrip",
10
10
  "description": "Compact labelled contact rows with optional icons and links.",
@@ -4,7 +4,7 @@
4
4
  "tier": "atom",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "container",
9
9
  "exportName": "Container",
10
10
  "description": "Centered, width-constrained page container with shared gutters and four width presets.",
@@ -4,7 +4,7 @@
4
4
  "tier": "organism",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "cta-section",
9
9
  "exportName": "CTASection",
10
10
  "description": "Full-width conversion band with eyebrow, headline, supporting copy and actions.",
@@ -315,7 +315,7 @@
315
315
  ],
316
316
  "package": "@slipstream-ui/core",
317
317
  "importPath": "@slipstream-ui/core",
318
- "version": "0.6.0",
318
+ "version": "0.6.1",
319
319
  "sourceDir": "data-table",
320
320
  "exportName": "DataTable"
321
321
  }
@@ -88,7 +88,7 @@
88
88
  ],
89
89
  "package": "@slipstream-ui/core",
90
90
  "importPath": "@slipstream-ui/core",
91
- "version": "0.6.0",
91
+ "version": "0.6.1",
92
92
  "sourceDir": "date-picker",
93
93
  "exportName": "DatePicker"
94
94
  }
@@ -4,7 +4,7 @@
4
4
  "tier": "molecule",
5
5
  "package": "@slipstream-ui/core",
6
6
  "importPath": "@slipstream-ui/core",
7
- "version": "0.6.0",
7
+ "version": "0.6.1",
8
8
  "sourceDir": "date-range-picker",
9
9
  "exportName": "DateRangePicker",
10
10
  "description": "Start/end date range with ISO strings and quick presets.",
@@ -163,7 +163,7 @@
163
163
  ],
164
164
  "package": "@slipstream-ui/core",
165
165
  "importPath": "@slipstream-ui/core",
166
- "version": "0.6.0",
166
+ "version": "0.6.1",
167
167
  "sourceDir": "dialog",
168
168
  "exportName": "Dialog"
169
169
  }
@@ -213,7 +213,7 @@
213
213
  ],
214
214
  "package": "@slipstream-ui/core",
215
215
  "importPath": "@slipstream-ui/core",
216
- "version": "0.6.0",
216
+ "version": "0.6.1",
217
217
  "sourceDir": "drawer",
218
218
  "exportName": "Drawer"
219
219
  }