@sentry/scraps 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.
Files changed (188) hide show
  1. package/README.md +13 -21
  2. package/dist/alert/alert.d.ts +25 -0
  3. package/dist/alert/alert.js +262 -0
  4. package/dist/alert/alertLink.d.ts +32 -0
  5. package/dist/alert/alertLink.js +94 -0
  6. package/dist/alert/index.d.ts +2 -0
  7. package/dist/alert/index.js +2 -0
  8. package/dist/backdrop/backdrop.d.ts +9 -0
  9. package/dist/backdrop/backdrop.js +28 -0
  10. package/dist/backdrop/index.d.ts +1 -0
  11. package/dist/backdrop/index.js +1 -0
  12. package/dist/badge/badge.d.ts +12 -0
  13. package/dist/badge/badge.js +80 -0
  14. package/dist/badge/featureBadge.d.ts +6 -0
  15. package/dist/badge/featureBadge.js +86 -0
  16. package/dist/badge/index.d.ts +3 -0
  17. package/dist/badge/index.js +3 -0
  18. package/dist/badge/tag.d.ts +15 -0
  19. package/dist/badge/tag.js +119 -0
  20. package/dist/boundaryContext.d.ts +2 -0
  21. package/dist/boundaryContext.js +5 -0
  22. package/dist/button/button.d.ts +3 -0
  23. package/dist/button/button.js +83 -0
  24. package/dist/button/buttonBar.d.ts +10 -0
  25. package/dist/button/buttonBar.js +135 -0
  26. package/dist/button/index.d.ts +5 -0
  27. package/dist/button/index.js +4 -0
  28. package/dist/button/linkButton.d.ts +3 -0
  29. package/dist/button/linkButton.js +110 -0
  30. package/dist/button/styles.d.ts +10 -0
  31. package/dist/button/styles.js +247 -0
  32. package/dist/button/types.d.ts +77 -0
  33. package/dist/button/types.js +0 -0
  34. package/dist/button/useButtonFunctionality.d.ts +5 -0
  35. package/dist/button/useButtonFunctionality.js +9 -0
  36. package/dist/checkbox/checkbox.d.ts +20 -0
  37. package/dist/checkbox/checkbox.js +193 -0
  38. package/dist/checkbox/index.d.ts +1 -0
  39. package/dist/checkbox/index.js +1 -0
  40. package/dist/chip/chip.d.ts +128 -0
  41. package/dist/chip/chip.js +364 -0
  42. package/dist/chip/index.d.ts +1 -0
  43. package/dist/chip/index.js +1 -0
  44. package/dist/code/inlineCode.d.ts +1 -0
  45. package/dist/datetime.d.ts +39 -0
  46. package/dist/datetime.js +20 -0
  47. package/dist/descriptionList/descriptionList.d.ts +69 -0
  48. package/dist/descriptionList/descriptionList.js +76 -0
  49. package/dist/descriptionList/index.d.ts +1 -0
  50. package/dist/descriptionList/index.js +1 -0
  51. package/dist/disclosure/disclosure.d.ts +37 -0
  52. package/dist/disclosure/disclosure.js +155 -0
  53. package/dist/disclosure/index.d.ts +1 -0
  54. package/dist/disclosure/index.js +1 -0
  55. package/dist/emptyState/emptyState.d.ts +10 -0
  56. package/dist/emptyState/emptyState.js +81 -0
  57. package/dist/emptyState/index.d.ts +1 -0
  58. package/dist/emptyState/index.js +1 -0
  59. package/dist/hotkey/hotkey.d.ts +22 -0
  60. package/dist/hotkey/hotkey.js +41 -0
  61. package/dist/hotkey/index.d.ts +4 -0
  62. package/dist/hotkey/index.js +3 -0
  63. package/dist/hotkey/kbd.d.ts +1 -0
  64. package/dist/hotkey/keyMappings.d.ts +23 -0
  65. package/dist/hotkey/keyMappings.js +223 -0
  66. package/dist/hotkey/useHotkeys.d.ts +47 -0
  67. package/dist/hotkey/useHotkeys.js +44 -0
  68. package/dist/image/image.d.ts +21 -0
  69. package/dist/image/image.js +20 -0
  70. package/dist/image/index.d.ts +1 -0
  71. package/dist/image/index.js +1 -0
  72. package/dist/info/index.d.ts +2 -0
  73. package/dist/info/index.js +2 -0
  74. package/dist/info/infoText.d.ts +15 -0
  75. package/dist/info/infoText.js +43 -0
  76. package/dist/info/infoTip.d.ts +10 -0
  77. package/dist/info/infoTip.js +54 -0
  78. package/dist/interactionStateLayer/index.d.ts +1 -0
  79. package/dist/interactionStateLayer/index.js +1 -0
  80. package/dist/interactionStateLayer/interactionStateLayer.d.ts +23 -0
  81. package/dist/interactionStateLayer/interactionStateLayer.js +67 -0
  82. package/dist/layout/flex.d.ts +1 -0
  83. package/dist/layout/grid.d.ts +1 -0
  84. package/dist/layout/index.d.ts +1 -1
  85. package/dist/layout/index.js +1 -1
  86. package/dist/layout/stack.d.ts +1 -0
  87. package/dist/layout/styles.d.ts +1 -1
  88. package/dist/layout/surface.d.ts +1 -0
  89. package/dist/link/index.d.ts +2 -0
  90. package/dist/link/index.js +2 -0
  91. package/dist/link/link.d.ts +43 -0
  92. package/dist/link/link.js +71 -0
  93. package/dist/link/linkBehaviorContext.d.ts +14 -0
  94. package/dist/link/linkBehaviorContext.js +31 -0
  95. package/dist/loader/indeterminateLoader.d.ts +1 -0
  96. package/dist/overlay.d.ts +59 -0
  97. package/dist/overlay.js +113 -0
  98. package/dist/overlayArrow.d.ts +9 -0
  99. package/dist/overlayArrow.js +55 -0
  100. package/dist/overlayPositioning.d.ts +61 -0
  101. package/dist/overlayPositioning.js +126 -0
  102. package/dist/panelProvider.d.ts +8 -0
  103. package/dist/panelProvider.js +20 -0
  104. package/dist/quote/quote.js +1 -1
  105. package/dist/radio/index.d.ts +1 -0
  106. package/dist/radio/index.js +1 -0
  107. package/dist/radio/radio.d.ts +9 -0
  108. package/dist/radio/radio.js +77 -0
  109. package/dist/renderToString.d.ts +2 -0
  110. package/dist/renderToString.js +25 -0
  111. package/dist/revealOnHover/index.d.ts +1 -0
  112. package/dist/revealOnHover/index.js +1 -0
  113. package/dist/revealOnHover/revealOnHover.d.ts +20 -0
  114. package/dist/revealOnHover/revealOnHover.js +62 -0
  115. package/dist/segmentedControl/index.d.ts +1 -0
  116. package/dist/segmentedControl/index.js +1 -0
  117. package/dist/segmentedControl/segmentedControl.d.ts +41 -0
  118. package/dist/segmentedControl/segmentedControl.js +217 -0
  119. package/dist/separator/separator.d.ts +4 -3
  120. package/dist/separator/separator.js +1 -1
  121. package/dist/sizeContext.d.ts +9 -0
  122. package/dist/sizeContext.js +13 -0
  123. package/dist/slider/index.d.ts +1 -0
  124. package/dist/slider/index.js +1 -0
  125. package/dist/slider/slider.d.ts +41 -0
  126. package/dist/slider/slider.js +386 -0
  127. package/dist/slot/index.d.ts +1 -0
  128. package/dist/slot/index.js +1 -0
  129. package/dist/slot/knownContexts.d.ts +1 -0
  130. package/dist/slot/knownContexts.js +7 -0
  131. package/dist/slot/slot.d.ts +26 -0
  132. package/dist/slot/slot.js +274 -0
  133. package/dist/statusIndicator/index.d.ts +1 -0
  134. package/dist/statusIndicator/index.js +1 -0
  135. package/dist/statusIndicator/statusIndicator.d.ts +24 -0
  136. package/dist/statusIndicator/statusIndicator.js +130 -0
  137. package/dist/switch/index.d.ts +1 -0
  138. package/dist/switch/index.js +1 -0
  139. package/dist/switch/switch.d.ts +6 -0
  140. package/dist/switch/switch.js +172 -0
  141. package/dist/text/heading.d.ts +1 -0
  142. package/dist/text/index.d.ts +1 -0
  143. package/dist/text/index.js +1 -0
  144. package/dist/text/prose.d.ts +8 -0
  145. package/dist/text/prose.js +45 -0
  146. package/dist/text/text.d.ts +1 -0
  147. package/dist/theme/dark.d.ts +129 -10
  148. package/dist/theme/dark.js +41 -13
  149. package/dist/theme/index.d.ts +3 -12
  150. package/dist/theme/index.js +2 -2
  151. package/dist/theme/light.d.ts +129 -10
  152. package/dist/theme/light.js +42 -14
  153. package/dist/theme/swatch.d.ts +27 -0
  154. package/dist/theme/swatch.js +37 -0
  155. package/dist/theme/theme.d.ts +648 -0
  156. package/dist/theme/theme.js +780 -0
  157. package/dist/theme/types.d.ts +1 -0
  158. package/dist/theme/useInvertedTheme.d.ts +1 -0
  159. package/dist/theme/useInvertedTheme.js +7 -0
  160. package/dist/tooltip/index.d.ts +2 -0
  161. package/dist/tooltip/index.js +2 -0
  162. package/dist/tooltip/tooltip.d.ts +166 -0
  163. package/dist/tooltip/tooltip.js +181 -0
  164. package/dist/tooltip/useDisabledTooltip.d.ts +22 -0
  165. package/dist/tooltip/useDisabledTooltip.js +24 -0
  166. package/dist/trackingContext.d.ts +34 -0
  167. package/dist/trackingContext.js +29 -0
  168. package/dist/translation/index.d.ts +4 -0
  169. package/dist/translation/index.js +4 -0
  170. package/dist/translation/translationContext.d.ts +6 -0
  171. package/dist/translation/translationContext.js +6 -0
  172. package/dist/translation/useTranslation.d.ts +1 -0
  173. package/dist/translation/useTranslation.js +6 -0
  174. package/dist/unreachable.d.ts +1 -0
  175. package/dist/unreachable.js +4 -0
  176. package/dist/useHoverOverlay.d.ts +113 -0
  177. package/dist/useHoverOverlay.js +370 -0
  178. package/dist/useIsInsideInteractiveElement.d.ts +6 -0
  179. package/dist/useIsInsideInteractiveElement.js +31 -0
  180. package/dist/useOverlay.d.ts +82 -0
  181. package/dist/useOverlay.js +216 -0
  182. package/dist/useScrollLock.d.ts +5 -0
  183. package/dist/useScrollLock.js +100 -0
  184. package/dist/useStableMergeRef.d.ts +9 -0
  185. package/dist/useStableMergeRef.js +18 -0
  186. package/package.json +193 -11
  187. package/dist/index.d.ts +0 -9
  188. package/dist/index.js +0 -9
@@ -0,0 +1,386 @@
1
+ import { jsx, jsxs } from "@emotion/react/jsx-runtime";
2
+ import { useCallback, useImperativeHandle, useMemo, useRef } from "react";
3
+ import is_prop_valid from "@emotion/is-prop-valid";
4
+ import { css } from "@emotion/react";
5
+ import styled from "@emotion/styled";
6
+ import { useNumberFormatter } from "@react-aria/i18n";
7
+ import { useSlider, useSliderThumb } from "@react-aria/slider";
8
+ import { VisuallyHidden } from "@react-aria/visually-hidden";
9
+ import { useSliderState } from "@react-stately/slider";
10
+ function Slider({ min = 0, max = 100, step = 1, disabled = false, ticks, formatOptions, name, id, onChangeEnd, className, ref, ...props }) {
11
+ const trackRef = useRef(null);
12
+ const inputRef = useRef(null);
13
+ const { value, onChange, defaultValue, 'aria-valuetext': ariaValueText, ...restProps } = props;
14
+ const effectiveValue = '' === value ? void 0 : value;
15
+ const htmlProps = restProps;
16
+ const isHidden = 'hidden' === formatOptions;
17
+ const numberFormatter = useNumberFormatter(isHidden ? {} : formatOptions ?? {});
18
+ const ariaProps = {
19
+ minValue: min,
20
+ maxValue: max,
21
+ step,
22
+ isDisabled: disabled,
23
+ 'aria-label': htmlProps['aria-label'],
24
+ 'aria-labelledby': htmlProps['aria-labelledby'],
25
+ ...void 0 !== effectiveValue && {
26
+ value: [
27
+ effectiveValue
28
+ ]
29
+ },
30
+ ...void 0 !== defaultValue && void 0 === effectiveValue && {
31
+ defaultValue: [
32
+ defaultValue
33
+ ]
34
+ },
35
+ onChange: (values)=>onChange?.(Array.isArray(values) ? values[0] ?? min : values),
36
+ onChangeEnd: onChangeEnd ? (values)=>onChangeEnd(Array.isArray(values) ? values[0] ?? min : values) : void 0
37
+ };
38
+ const state = useSliderState({
39
+ ...ariaProps,
40
+ numberFormatter
41
+ });
42
+ const { groupProps, trackProps } = useSlider(ariaProps, state, trackRef);
43
+ const { thumbProps, inputProps } = useSliderThumb({
44
+ index: 0,
45
+ trackRef,
46
+ inputRef,
47
+ isDisabled: disabled
48
+ }, state);
49
+ useImperativeHandle(ref, ()=>inputRef.current, []);
50
+ const thumbPercent = state.getThumbPercent(0);
51
+ const thumbValue = state.values[0] ?? min;
52
+ const allTickValues = useMemo(()=>{
53
+ if (!ticks) return [];
54
+ if ('values' in ticks) return ticks.values;
55
+ if ('interval' in ticks) {
56
+ const count = Math.floor((max - min) / ticks.interval) + 1;
57
+ return Array.from({
58
+ length: count
59
+ }, (_, i)=>min + i * ticks.interval);
60
+ }
61
+ if (ticks.count >= 2) {
62
+ const range = max - min;
63
+ return Array.from({
64
+ length: ticks.count
65
+ }, (_, i)=>min + i * (range / (ticks.count - 1)));
66
+ }
67
+ return [];
68
+ }, [
69
+ ticks,
70
+ min,
71
+ max
72
+ ]);
73
+ const intermediateTickValues = useMemo(()=>allTickValues.filter((tickValue)=>tickValue !== min && tickValue !== max), [
74
+ allTickValues,
75
+ min,
76
+ max
77
+ ]);
78
+ const getFormattedValue = useCallback((val)=>{
79
+ if ('' === val) return '';
80
+ return state.getFormattedValue(val);
81
+ }, [
82
+ state
83
+ ]);
84
+ const hasTicks = allTickValues.length > 0;
85
+ const tickAnimationDuration = hasTicks ? 160 : 60;
86
+ const tickDelay = hasTicks ? tickAnimationDuration / intermediateTickValues.length : 0;
87
+ return /*#__PURE__*/ jsxs(SliderWrapper, {
88
+ ...groupProps,
89
+ ...htmlProps,
90
+ className: className,
91
+ "aria-disabled": disabled || void 0,
92
+ children: [
93
+ /*#__PURE__*/ jsxs(TrackArea, {
94
+ ref: trackRef,
95
+ ...trackProps,
96
+ disabled: disabled,
97
+ children: [
98
+ /*#__PURE__*/ jsxs(SliderTrackBar, {
99
+ children: [
100
+ /*#__PURE__*/ jsx(ActiveTrack, {
101
+ style: {
102
+ width: `${100 * thumbPercent}%`
103
+ }
104
+ }),
105
+ /*#__PURE__*/ jsx(InactiveTrack, {
106
+ style: {
107
+ width: `${(1 - thumbPercent) * 100}%`
108
+ }
109
+ }),
110
+ intermediateTickValues.map((tickValue)=>/*#__PURE__*/ jsx(SliderTick, {
111
+ "aria-hidden": true,
112
+ "data-filled": tickValue <= thumbValue || void 0,
113
+ style: {
114
+ left: `${(100 * state.getValuePercent(tickValue)).toFixed(2)}%`
115
+ }
116
+ }, tickValue))
117
+ ]
118
+ }),
119
+ /*#__PURE__*/ jsxs(SliderThumbHitbox, {
120
+ ...thumbProps,
121
+ style: {
122
+ left: `${100 * thumbPercent}%`
123
+ },
124
+ children: [
125
+ /*#__PURE__*/ jsx(SliderThumbChonk, {
126
+ children: /*#__PURE__*/ jsx(SliderThumbSurface, {})
127
+ }),
128
+ /*#__PURE__*/ jsx(VisuallyHidden, {
129
+ children: /*#__PURE__*/ jsx("input", {
130
+ ref: inputRef,
131
+ ...inputProps,
132
+ name: name,
133
+ id: id ?? inputProps.id,
134
+ "aria-labelledby": htmlProps['aria-labelledby'] ?? inputProps['aria-labelledby'],
135
+ "aria-invalid": htmlProps['aria-invalid'],
136
+ ...void 0 !== ariaValueText && {
137
+ 'aria-valuetext': ariaValueText
138
+ }
139
+ })
140
+ })
141
+ ]
142
+ }),
143
+ !isHidden && /*#__PURE__*/ jsx(ValueLabel, {
144
+ "aria-hidden": true,
145
+ style: {
146
+ '--thumb-value': `${100 * thumbPercent}%`,
147
+ '--thumb-offset': `${(2 * thumbPercent - 1) * 12}px`
148
+ },
149
+ children: getFormattedValue(thumbValue)
150
+ })
151
+ ]
152
+ }),
153
+ !isHidden && /*#__PURE__*/ jsxs(TrackLabels, {
154
+ "aria-hidden": true,
155
+ children: [
156
+ /*#__PURE__*/ jsx(TrackLabel, {
157
+ "data-position": "start",
158
+ style: {
159
+ transitionDelay: '0ms'
160
+ },
161
+ children: getFormattedValue(min)
162
+ }),
163
+ hasTicks && intermediateTickValues.map((tickValue, index)=>/*#__PURE__*/ jsx(TrackLabel, {
164
+ "data-intermediate": true,
165
+ "data-show": ticks?.labels || void 0,
166
+ style: {
167
+ transitionDelay: `${((index + 1) * tickDelay).toFixed(2)}ms`,
168
+ left: `${(100 * state.getValuePercent(tickValue)).toFixed(2)}%`
169
+ },
170
+ children: getFormattedValue(tickValue)
171
+ }, tickValue)),
172
+ /*#__PURE__*/ jsx(TrackLabel, {
173
+ "data-position": "end",
174
+ style: {
175
+ transitionDelay: `${tickAnimationDuration}ms`
176
+ },
177
+ children: getFormattedValue(max)
178
+ })
179
+ ]
180
+ })
181
+ ]
182
+ });
183
+ }
184
+ const SliderWrapper = styled('div')`
185
+ isolation: isolate;
186
+ position: relative;
187
+ width: 100%;
188
+ display: flex;
189
+ flex-direction: column;
190
+ white-space: nowrap;
191
+ user-select: none;
192
+ height: 64px;
193
+ `;
194
+ const TrackArea = styled('div', {
195
+ shouldForwardProp: (prop)=>'string' == typeof prop && is_prop_valid(prop) && 'disabled' !== prop
196
+ })`
197
+ position: relative;
198
+ width: 100%;
199
+ padding-top: 20px;
200
+ padding-bottom: 6px;
201
+ cursor: ${(p)=>p.disabled ? 'not-allowed' : 'pointer'};
202
+
203
+ ${SliderWrapper}:is([aria-disabled]) & {
204
+ pointer-events: none;
205
+ opacity: ${(p)=>p.theme.tokens.interactive.disabled};
206
+ }
207
+ `;
208
+ const SliderTrackBar = styled('div')`
209
+ position: relative;
210
+ width: 100%;
211
+ height: 24px;
212
+ display: flex;
213
+ align-items: center;
214
+ pointer-events: none;
215
+ `;
216
+ const trackBarBase = css`
217
+ height: 12px;
218
+ pointer-events: none;
219
+ `;
220
+ const ActiveTrack = styled('div')`
221
+ ${trackBarBase}
222
+ border-top-left-radius: ${(p)=>p.theme.radius.lg};
223
+ border-bottom-left-radius: ${(p)=>p.theme.radius.lg};
224
+ background: ${(p)=>p.theme.tokens.interactive.chonky.debossed.accent.background};
225
+ border-style: solid;
226
+ border-color: ${(p)=>p.theme.tokens.interactive.chonky.debossed.accent.chonk};
227
+ border-width: 2px 0 1px 1px;
228
+ `;
229
+ const InactiveTrack = styled('div')`
230
+ ${trackBarBase}
231
+ flex: 1;
232
+ border-top-right-radius: ${(p)=>p.theme.radius.lg};
233
+ border-bottom-right-radius: ${(p)=>p.theme.radius.lg};
234
+ background: ${(p)=>p.theme.tokens.interactive.chonky.debossed.neutral.background};
235
+ border-style: solid;
236
+ border-color: ${(p)=>p.theme.tokens.interactive.chonky.debossed.neutral.chonk};
237
+ border-width: 2px 1px 1px 0;
238
+ `;
239
+ const SliderThumbHitbox = styled('div')`
240
+ position: absolute;
241
+ /* 20px padding-top + 12px (half of 24px track row) = 32px to track center */
242
+ top: 32px;
243
+ width: 24px;
244
+ height: 24px;
245
+ transform: translate(-50%, -50%);
246
+ cursor: pointer;
247
+ display: flex;
248
+ align-items: center;
249
+ justify-content: center;
250
+ `;
251
+ const SliderThumbChonk = styled('div')`
252
+ width: 22px;
253
+ height: 23px;
254
+ border-radius: ${(p)=>p.theme.radius.md};
255
+ background: ${(p)=>p.theme.tokens.interactive.chonky.embossed.neutral.chonk};
256
+ display: flex;
257
+ align-items: flex-start;
258
+ justify-content: center;
259
+ pointer-events: none;
260
+ flex-shrink: 0;
261
+ transition:
262
+ background 120ms ease,
263
+ box-shadow 120ms ease;
264
+
265
+ ${SliderWrapper}:not([aria-disabled]):is(:hover, :active, :focus-within) & {
266
+ background: ${(p)=>p.theme.tokens.interactive.chonky.embossed.accent.chonk};
267
+ }
268
+ `;
269
+ const SliderThumbSurface = styled('div')`
270
+ margin-top: 1px;
271
+ width: 20px;
272
+ height: 20px;
273
+ border-radius: ${(p)=>p.theme.radius.sm};
274
+ background: ${(p)=>p.theme.tokens.background.overlay};
275
+ pointer-events: none;
276
+ `;
277
+ const SliderTick = styled('div')`
278
+ position: absolute;
279
+ top: 50%;
280
+ transform: translate(-50%, -50%);
281
+ width: 1px;
282
+ height: 12px;
283
+ border: 1px solid ${(p)=>p.theme.tokens.interactive.chonky.debossed.neutral.chonk};
284
+ pointer-events: none;
285
+
286
+ &[data-filled] {
287
+ border-color: ${(p)=>p.theme.tokens.interactive.chonky.debossed.accent.chonk};
288
+ }
289
+ `;
290
+ const TrackLabels = styled('div')`
291
+ display: flex;
292
+ position: relative;
293
+ width: 100%;
294
+ height: 20px;
295
+ pointer-events: none;
296
+ justify-content: space-between;
297
+ align-items: center;
298
+ --tx: 0;
299
+ --ty: -${(p)=>p.theme.space.xs};
300
+
301
+ ${SliderWrapper}:not([aria-disabled]):is(:hover, :focus-within) & {
302
+ --ty: 0;
303
+ --opacity: 1;
304
+ }
305
+ `;
306
+ const TrackLabel = styled('span')`
307
+ display: block;
308
+ font-size: ${(p)=>p.theme.font.size.xs};
309
+ font-weight: ${(p)=>p.theme.font.weight.sans.regular};
310
+ font-variant-numeric: tabular-nums;
311
+ color: ${(p)=>p.theme.tokens.content.secondary};
312
+ opacity: var(--opacity, 0);
313
+ white-space: nowrap;
314
+ transform: translate(var(--tx, 0), var(--ty, 0));
315
+ transition:
316
+ transform ${(p)=>p.theme.motion.enter.fast},
317
+ opacity ${(p)=>p.theme.motion.enter.fast};
318
+
319
+ &[data-intermediate] {
320
+ --tx: -50%;
321
+ position: absolute;
322
+ }
323
+
324
+ &[data-intermediate]:not([data-show]) {
325
+ --opacity: 0;
326
+ }
327
+
328
+ ${SliderWrapper}[aria-disabled] & {
329
+ color: ${(p)=>p.theme.tokens.content.disabled};
330
+ }
331
+ `;
332
+ const ValueLabel = styled('output')`
333
+ position: absolute;
334
+ top: 0;
335
+ left: var(--thumb-value, 50%);
336
+ transform: translateX(calc(-1 * var(--thumb-value, 50%) + var(--thumb-offset, 0px)))
337
+ translateY(var(--thumb-y, 0px));
338
+ font-size: ${(p)=>p.theme.font.size.sm};
339
+ font-weight: ${(p)=>p.theme.font.weight.sans.medium};
340
+ font-variant-numeric: tabular-nums;
341
+ white-space: nowrap;
342
+ pointer-events: none;
343
+ color: ${(p)=>p.theme.tokens.content.secondary};
344
+ transition:
345
+ background ${(p)=>p.theme.motion.snap.moderate},
346
+ color ${(p)=>p.theme.motion.snap.moderate},
347
+ padding ${(p)=>p.theme.motion.snap.moderate},
348
+ border-color ${(p)=>p.theme.motion.snap.moderate};
349
+ min-width: 24px;
350
+ border: 1px solid transparent;
351
+ border-radius: ${(p)=>p.theme.radius.xs};
352
+ padding: 1px ${(p)=>p.theme.space['2xs']};
353
+ text-align: center;
354
+ line-height: 1;
355
+
356
+ &::after {
357
+ content: '';
358
+ position: absolute;
359
+ inset: -4px;
360
+ bottom: -32px;
361
+ border-radius: ${(p)=>p.theme.radius.md};
362
+ }
363
+
364
+ ${SliderWrapper}:has(:focus-visible) &::after {
365
+ ${(p)=>p.theme.focusRing()};
366
+ }
367
+
368
+ ${SliderWrapper}:hover:not(:active, :focus-within) & {
369
+ color: ${(p)=>p.theme.tokens.content.accent};
370
+ }
371
+
372
+ ${SliderWrapper}:not([aria-disabled]):is(:active, :focus-within) & {
373
+ background: ${(p)=>p.theme.tokens.background.accent.vibrant};
374
+ border-color: ${(p)=>p.theme.tokens.interactive.chonky.embossed.accent.chonk};
375
+ color: ${(p)=>p.theme.tokens.content.onVibrant.light};
376
+ --thumb-y: 0;
377
+ }
378
+
379
+ ${SliderWrapper}[aria-disabled] & {
380
+ background: transparent;
381
+ border-color: transparent;
382
+ color: ${(p)=>p.theme.tokens.content.disabled};
383
+ --thumb-y: 0;
384
+ }
385
+ `;
386
+ export { Slider };
@@ -0,0 +1 @@
1
+ export { slot } from './slot.js';
@@ -0,0 +1 @@
1
+ export { slot } from "./slot.js";
@@ -0,0 +1 @@
1
+ export declare const KNOWN_BRIDGED_CONTEXTS: readonly [import("react").Context<("xs" | "sm" | "md") | undefined>, import("react").Context<"xs" | "sm" | "md" | "2xs" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "zero" | "3xs" | "5xl" | null>];
@@ -0,0 +1,7 @@
1
+ import { ContainerQueryContext } from "../layout/styles.js";
2
+ import { SizeContext } from "../sizeContext.js";
3
+ const KNOWN_BRIDGED_CONTEXTS = [
4
+ SizeContext,
5
+ ContainerQueryContext
6
+ ];
7
+ export { KNOWN_BRIDGED_CONTEXTS };
@@ -0,0 +1,26 @@
1
+ import type * as React from 'react';
2
+ type Slot = string;
3
+ interface SlotProviderProps {
4
+ children: React.ReactNode;
5
+ }
6
+ interface SlotConsumerProps<T extends Slot> {
7
+ children: React.ReactNode;
8
+ name: T;
9
+ }
10
+ interface SlotOutletProps<T extends Slot> {
11
+ children: (props: {
12
+ ref: React.RefCallback<HTMLElement | null>;
13
+ }, hasConsumers: boolean) => React.ReactNode;
14
+ name: T;
15
+ }
16
+ interface SlotFallbackProps {
17
+ children: React.ReactNode;
18
+ }
19
+ type SlotModule<T extends Slot> = React.FunctionComponent<SlotConsumerProps<T>> & {
20
+ Fallback: React.ComponentType<SlotFallbackProps>;
21
+ Outlet: React.ComponentType<SlotOutletProps<T>>;
22
+ Provider: React.ComponentType<SlotProviderProps>;
23
+ useSlotOutletRef: () => React.RefObject<HTMLElement | null>;
24
+ };
25
+ export declare function slot<T extends readonly Slot[]>(names: T): SlotModule<T[number]>;
26
+ export {};