@refraction-ui/react 0.23.0 → 0.23.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.
- package/dist/{chunk-V24GDHUX.js → chunk-4ACSHPCM.js} +2 -2
- package/dist/{chunk-SDAJVXD4.js → chunk-5P56PN3J.js} +2 -2
- package/dist/chunk-75BKRTPO.js +417 -0
- package/dist/{chunk-2Q6HHFAN.js.map → chunk-75BKRTPO.js.map} +1 -1
- package/dist/{chunk-QPCKJ2YR.js → chunk-GG6MZDGV.js} +2 -2
- package/dist/{chunk-QDMLIDYN.js → chunk-GU5MI7FX.js} +2 -2
- package/dist/{chunk-Z5IHYNQD.js → chunk-JZQ5ZL46.js} +3 -3
- package/dist/{chunk-RSWOLRIC.js → chunk-KIZD73DK.js} +2 -2
- package/dist/{chunk-XMFNBOPO.js → chunk-PY2TIFCT.js} +2 -2
- package/dist/{chunk-3I3DYDHR.js → chunk-WNLYPQOS.js} +2 -2
- package/dist/{chunk-63N4PZUJ.js → chunk-X6HEKRWE.js} +2 -2
- package/dist/{chunk-WYKPPK3W.js → chunk-XAJDSVZR.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/react-accordion.js +1 -1
- package/dist/react-action-list.js +1 -1
- package/dist/react-ai.js +1 -1
- package/dist/react-analytics.js +1 -1
- package/dist/react-animated-text.js +1 -1
- package/dist/react-app-shell.js +1 -1
- package/dist/react-audience-feature-card.js +1 -1
- package/dist/react-audio-room.js +1 -1
- package/dist/react-auth.js +1 -1
- package/dist/react-avatar-group.js +1 -1
- package/dist/react-avatar.js +1 -1
- package/dist/react-badge.js +1 -1
- package/dist/react-bottom-nav.js +1 -1
- package/dist/react-brand-network-cell.js +1 -1
- package/dist/react-breadcrumbs.js +1 -1
- package/dist/react-browser-chrome-mock.js +1 -1
- package/dist/react-button.js +3 -3
- package/dist/react-calendar.js +1 -1
- package/dist/react-call-controls.js +1 -1
- package/dist/react-callout.js +1 -1
- package/dist/react-card-grid.js +1 -1
- package/dist/react-card.js +1 -1
- package/dist/react-carousel.js +1 -1
- package/dist/react-charts.js +1 -1
- package/dist/react-checkbox.js +1 -1
- package/dist/react-checklist.js +1 -1
- package/dist/react-code-block.js +1 -1
- package/dist/react-code-editor.js +1 -1
- package/dist/react-collapsible.js +1 -1
- package/dist/react-combobox.js +1 -1
- package/dist/react-command-input.js +1 -1
- package/dist/react-command.js +1 -1
- package/dist/react-composer.js +3 -3
- package/dist/react-content-protection.js +1 -1
- package/dist/react-conversation.js +5 -5
- package/dist/react-cookie-consent.js +1 -1
- package/dist/react-data-table.js +1 -1
- package/dist/react-date-picker.js +1 -1
- package/dist/react-device-frame.js +1 -1
- package/dist/react-dialog.js +2 -2
- package/dist/react-diff-viewer.js +1 -1
- package/dist/react-dropdown-menu.js +1 -1
- package/dist/react-editor-status-bar.js +1 -1
- package/dist/react-editor-tabs.js +1 -1
- package/dist/react-emoji-picker.js +2 -2
- package/dist/react-empty-state.js +1 -1
- package/dist/react-feedback-dialog.js +2 -2
- package/dist/react-file-tree.js +1 -1
- package/dist/react-file-upload.js +1 -1
- package/dist/react-floating-reactions.js +1 -1
- package/dist/react-flow-editor.js +2 -2
- package/dist/react-footer.js +1 -1
- package/dist/react-funnel-chart.js +1 -1
- package/dist/react-graph-view.js +2 -2
- package/dist/react-infinite-canvas.js +2 -2
- package/dist/react-inline-editor.js +1 -1
- package/dist/react-input-group.js +1 -1
- package/dist/react-input.js +2 -2
- package/dist/react-install-prompt.js +1 -1
- package/dist/react-kanban-board.js +1 -1
- package/dist/react-keyboard-shortcut.js +2 -2
- package/dist/react-language-selector.js +1 -1
- package/dist/react-line-chart.js +1 -1
- package/dist/react-link-card.js +1 -1
- package/dist/react-live-captions.js +1 -1
- package/dist/react-live-cursors.js +1 -1
- package/dist/react-live-transcript.js +1 -1
- package/dist/react-location-selector.js +1 -1
- package/dist/react-logger.js +1 -1
- package/dist/react-markdown-renderer.js +2 -2
- package/dist/react-marquee-strip.js +1 -1
- package/dist/react-mascot.js +1 -1
- package/dist/react-mastery-bar.js +1 -1
- package/dist/react-mini-map.js +1 -1
- package/dist/react-mobile-nav.js +1 -1
- package/dist/react-native-select.js +1 -1
- package/dist/react-navbar.js +1 -1
- package/dist/react-numbered-steps.js +1 -1
- package/dist/react-otp-input.js +1 -1
- package/dist/react-page-header.js +1 -1
- package/dist/react-pagination.js +1 -1
- package/dist/react-password-input.js +2 -2
- package/dist/react-payment.js +1 -1
- package/dist/react-popover.js +1 -1
- package/dist/react-pre-call-lobby.js +1 -1
- package/dist/react-presence-indicator.js +1 -1
- package/dist/react-pricing-card.js +1 -1
- package/dist/react-progress-display.js +1 -1
- package/dist/react-radial-gauge.js +1 -1
- package/dist/react-radio.js +1 -1
- package/dist/react-rating-scale.js +1 -1
- package/dist/react-reaction-bar.js +1 -1
- package/dist/react-resizable-layout.js +1 -1
- package/dist/react-search-bar.js +1 -1
- package/dist/react-section-head.js +1 -1
- package/dist/react-segmented-control.js +1 -1
- package/dist/react-select.js +1 -1
- package/dist/react-separator.js +1 -1
- package/dist/react-sheet.js +1 -1
- package/dist/react-sidebar.js +1 -1
- package/dist/react-skeleton.js +1 -1
- package/dist/react-skip-to-content.js +1 -1
- package/dist/react-slide-viewer.js +1 -1
- package/dist/react-slider.js +1 -1
- package/dist/react-slot-picker.js +1 -1
- package/dist/react-social-auth-button.js +3 -3
- package/dist/react-sortable-list.js +1 -1
- package/dist/react-stat-grid.js +1 -1
- package/dist/react-status-indicator.js +1 -1
- package/dist/react-steps.js +1 -1
- package/dist/react-sticky-note.js +1 -1
- package/dist/react-switch.js +1 -1
- package/dist/react-table-of-contents.js +1 -1
- package/dist/react-table.js +1 -1
- package/dist/react-tabs.js +1 -1
- package/dist/react-terminal.js +1 -1
- package/dist/react-test-results.js +1 -1
- package/dist/react-textarea.js +1 -1
- package/dist/react-thread-view.js +2 -2
- package/dist/react-timeline.js +1 -1
- package/dist/react-toast.js +1 -1
- package/dist/react-tooltip.js +1 -1
- package/dist/react-version-selector.js +1 -1
- package/dist/react-video-grid.js +2 -2
- package/dist/react-video-player.js +1 -1
- package/dist/react-video-tile.js +2 -2
- package/dist/react-voice-pill.js +1 -1
- package/dist/react-waveform.js +1 -1
- package/dist/react-wizard.js +1 -1
- package/dist/shared.js +53 -0
- package/dist/shared.js.map +7 -0
- package/package.json +1 -1
- package/dist/chunk-2Q6HHFAN.js +0 -164
- /package/dist/{chunk-V24GDHUX.js.map → chunk-4ACSHPCM.js.map} +0 -0
- /package/dist/{chunk-SDAJVXD4.js.map → chunk-5P56PN3J.js.map} +0 -0
- /package/dist/{chunk-QPCKJ2YR.js.map → chunk-GG6MZDGV.js.map} +0 -0
- /package/dist/{chunk-QDMLIDYN.js.map → chunk-GU5MI7FX.js.map} +0 -0
- /package/dist/{chunk-Z5IHYNQD.js.map → chunk-JZQ5ZL46.js.map} +0 -0
- /package/dist/{chunk-RSWOLRIC.js.map → chunk-KIZD73DK.js.map} +0 -0
- /package/dist/{chunk-XMFNBOPO.js.map → chunk-PY2TIFCT.js.map} +0 -0
- /package/dist/{chunk-3I3DYDHR.js.map → chunk-WNLYPQOS.js.map} +0 -0
- /package/dist/{chunk-63N4PZUJ.js.map → chunk-X6HEKRWE.js.map} +0 -0
- /package/dist/{chunk-WYKPPK3W.js.map → chunk-XAJDSVZR.js.map} +0 -0
package/dist/react-tooltip.js
CHANGED
package/dist/react-video-grid.js
CHANGED
package/dist/react-video-tile.js
CHANGED
package/dist/react-voice-pill.js
CHANGED
package/dist/react-waveform.js
CHANGED
package/dist/react-wizard.js
CHANGED
package/dist/shared.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FOCUSABLE_SELECTOR,
|
|
3
|
+
Keys,
|
|
4
|
+
captureLibraryOriginError,
|
|
5
|
+
cn,
|
|
6
|
+
createFocusTrap,
|
|
7
|
+
createKeyboardHandler,
|
|
8
|
+
createLiveRegion,
|
|
9
|
+
createMachine,
|
|
10
|
+
createSkipLink,
|
|
11
|
+
cva,
|
|
12
|
+
devError,
|
|
13
|
+
devWarn,
|
|
14
|
+
generateId,
|
|
15
|
+
getAnimationDuration,
|
|
16
|
+
getFocusableElements,
|
|
17
|
+
isLibraryOriginError,
|
|
18
|
+
libraryOriginEnvelope,
|
|
19
|
+
libraryOriginError,
|
|
20
|
+
mergeAriaProps,
|
|
21
|
+
prefersReducedMotion,
|
|
22
|
+
resetDevFeedback,
|
|
23
|
+
resetIdCounter,
|
|
24
|
+
setDevFeedbackSink,
|
|
25
|
+
stackFingerprint
|
|
26
|
+
} from "./chunk-75BKRTPO.js";
|
|
27
|
+
export {
|
|
28
|
+
FOCUSABLE_SELECTOR,
|
|
29
|
+
Keys,
|
|
30
|
+
captureLibraryOriginError,
|
|
31
|
+
cn,
|
|
32
|
+
createFocusTrap,
|
|
33
|
+
createKeyboardHandler,
|
|
34
|
+
createLiveRegion,
|
|
35
|
+
createMachine,
|
|
36
|
+
createSkipLink,
|
|
37
|
+
cva,
|
|
38
|
+
devError,
|
|
39
|
+
devWarn,
|
|
40
|
+
generateId,
|
|
41
|
+
getAnimationDuration,
|
|
42
|
+
getFocusableElements,
|
|
43
|
+
isLibraryOriginError,
|
|
44
|
+
libraryOriginEnvelope,
|
|
45
|
+
libraryOriginError,
|
|
46
|
+
mergeAriaProps,
|
|
47
|
+
prefersReducedMotion,
|
|
48
|
+
resetDevFeedback,
|
|
49
|
+
resetIdCounter,
|
|
50
|
+
setDevFeedbackSink,
|
|
51
|
+
stackFingerprint
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=shared.js.map
|
package/package.json
CHANGED
package/dist/chunk-2Q6HHFAN.js
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
// ../shared/dist/index.js
|
|
2
|
-
var idCounter = 0;
|
|
3
|
-
function generateId(prefix = "rfr") {
|
|
4
|
-
idCounter++;
|
|
5
|
-
return `${prefix}-${idCounter}`;
|
|
6
|
-
}
|
|
7
|
-
var Keys = {
|
|
8
|
-
Enter: "Enter",
|
|
9
|
-
Space: " ",
|
|
10
|
-
Escape: "Escape",
|
|
11
|
-
Tab: "Tab",
|
|
12
|
-
ArrowUp: "ArrowUp",
|
|
13
|
-
ArrowDown: "ArrowDown",
|
|
14
|
-
ArrowLeft: "ArrowLeft",
|
|
15
|
-
ArrowRight: "ArrowRight",
|
|
16
|
-
Home: "Home",
|
|
17
|
-
End: "End",
|
|
18
|
-
PageUp: "PageUp",
|
|
19
|
-
PageDown: "PageDown",
|
|
20
|
-
Backspace: "Backspace",
|
|
21
|
-
Delete: "Delete"
|
|
22
|
-
};
|
|
23
|
-
function createKeyboardHandler(handlers) {
|
|
24
|
-
return (event) => {
|
|
25
|
-
const handler = handlers[event.key];
|
|
26
|
-
if (handler) {
|
|
27
|
-
handler(event);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function createMachine(config) {
|
|
32
|
-
let current = config.initial;
|
|
33
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
34
|
-
return {
|
|
35
|
-
get state() {
|
|
36
|
-
return current;
|
|
37
|
-
},
|
|
38
|
-
send(event) {
|
|
39
|
-
const stateConfig = config.states[current];
|
|
40
|
-
const next = stateConfig?.on?.[event];
|
|
41
|
-
if (next && next !== current) {
|
|
42
|
-
current = next;
|
|
43
|
-
for (const fn of listeners) {
|
|
44
|
-
fn(current);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
subscribe(fn) {
|
|
49
|
-
listeners.add(fn);
|
|
50
|
-
return () => {
|
|
51
|
-
listeners.delete(fn);
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
matches(state) {
|
|
55
|
-
return current === state;
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
function cn(...inputs) {
|
|
60
|
-
const classes = [];
|
|
61
|
-
for (const input of inputs) {
|
|
62
|
-
if (!input) continue;
|
|
63
|
-
if (typeof input === "string") {
|
|
64
|
-
classes.push(input);
|
|
65
|
-
} else if (typeof input === "number") {
|
|
66
|
-
classes.push(String(input));
|
|
67
|
-
} else if (Array.isArray(input)) {
|
|
68
|
-
const nested = cn(...input);
|
|
69
|
-
if (nested) classes.push(nested);
|
|
70
|
-
} else if (typeof input === "object") {
|
|
71
|
-
for (const [key, value] of Object.entries(input)) {
|
|
72
|
-
if (value) classes.push(key);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return classes.join(" ");
|
|
77
|
-
}
|
|
78
|
-
function cva(config) {
|
|
79
|
-
return (props) => {
|
|
80
|
-
const classes = [];
|
|
81
|
-
if (config.base) {
|
|
82
|
-
classes.push(config.base);
|
|
83
|
-
}
|
|
84
|
-
if (config.variants) {
|
|
85
|
-
for (const [variantKey, variantOptions] of Object.entries(config.variants)) {
|
|
86
|
-
const selectedValue = props?.[variantKey] ?? config.defaultVariants?.[variantKey];
|
|
87
|
-
if (selectedValue != null) {
|
|
88
|
-
const variantClass = variantOptions[selectedValue];
|
|
89
|
-
if (variantClass) {
|
|
90
|
-
classes.push(variantClass);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
if (config.compoundVariants) {
|
|
96
|
-
for (const compound of config.compoundVariants) {
|
|
97
|
-
const { class: compoundClass, ...conditions } = compound;
|
|
98
|
-
let matches = true;
|
|
99
|
-
for (const [key, value] of Object.entries(conditions)) {
|
|
100
|
-
const propValue = props?.[key] ?? config.defaultVariants?.[key];
|
|
101
|
-
if (propValue !== value) {
|
|
102
|
-
matches = false;
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
if (matches) {
|
|
107
|
-
classes.push(compoundClass);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (props?.className) {
|
|
112
|
-
classes.push(props.className);
|
|
113
|
-
}
|
|
114
|
-
return classes.filter(Boolean).join(" ");
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
function prefersReducedMotion() {
|
|
118
|
-
if (typeof window === "undefined") return false;
|
|
119
|
-
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
120
|
-
}
|
|
121
|
-
var seen = /* @__PURE__ */ new Set();
|
|
122
|
-
var injectedSink = null;
|
|
123
|
-
function isDev() {
|
|
124
|
-
return typeof process === "undefined" || true;
|
|
125
|
-
}
|
|
126
|
-
function emit(level, code, message, detail) {
|
|
127
|
-
if (!isDev()) return;
|
|
128
|
-
const key = `${level}:${code}`;
|
|
129
|
-
if (seen.has(key)) return;
|
|
130
|
-
seen.add(key);
|
|
131
|
-
const text = `[refraction-ui] ${code}: ${message}`;
|
|
132
|
-
if (level === "error") {
|
|
133
|
-
console.error(text, detail ?? "");
|
|
134
|
-
} else {
|
|
135
|
-
console.warn(text, detail ?? "");
|
|
136
|
-
}
|
|
137
|
-
if (injectedSink) {
|
|
138
|
-
const record = {
|
|
139
|
-
level,
|
|
140
|
-
message: `${code}: ${message}`,
|
|
141
|
-
timestamp: Date.now(),
|
|
142
|
-
context: { code, ...detail ?? {} }
|
|
143
|
-
};
|
|
144
|
-
try {
|
|
145
|
-
injectedSink.log(record);
|
|
146
|
-
} catch {
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
function devWarn(code, message, detail) {
|
|
151
|
-
emit("warn", code, message, detail);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export {
|
|
155
|
-
generateId,
|
|
156
|
-
Keys,
|
|
157
|
-
createKeyboardHandler,
|
|
158
|
-
createMachine,
|
|
159
|
-
cn,
|
|
160
|
-
cva,
|
|
161
|
-
prefersReducedMotion,
|
|
162
|
-
devWarn
|
|
163
|
-
};
|
|
164
|
-
//# sourceMappingURL=chunk-2Q6HHFAN.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|