@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.
Files changed (156) hide show
  1. package/dist/{chunk-V24GDHUX.js → chunk-4ACSHPCM.js} +2 -2
  2. package/dist/{chunk-SDAJVXD4.js → chunk-5P56PN3J.js} +2 -2
  3. package/dist/chunk-75BKRTPO.js +417 -0
  4. package/dist/{chunk-2Q6HHFAN.js.map → chunk-75BKRTPO.js.map} +1 -1
  5. package/dist/{chunk-QPCKJ2YR.js → chunk-GG6MZDGV.js} +2 -2
  6. package/dist/{chunk-QDMLIDYN.js → chunk-GU5MI7FX.js} +2 -2
  7. package/dist/{chunk-Z5IHYNQD.js → chunk-JZQ5ZL46.js} +3 -3
  8. package/dist/{chunk-RSWOLRIC.js → chunk-KIZD73DK.js} +2 -2
  9. package/dist/{chunk-XMFNBOPO.js → chunk-PY2TIFCT.js} +2 -2
  10. package/dist/{chunk-3I3DYDHR.js → chunk-WNLYPQOS.js} +2 -2
  11. package/dist/{chunk-63N4PZUJ.js → chunk-X6HEKRWE.js} +2 -2
  12. package/dist/{chunk-WYKPPK3W.js → chunk-XAJDSVZR.js} +2 -2
  13. package/dist/index.js +1 -1
  14. package/dist/react-accordion.js +1 -1
  15. package/dist/react-action-list.js +1 -1
  16. package/dist/react-ai.js +1 -1
  17. package/dist/react-analytics.js +1 -1
  18. package/dist/react-animated-text.js +1 -1
  19. package/dist/react-app-shell.js +1 -1
  20. package/dist/react-audience-feature-card.js +1 -1
  21. package/dist/react-audio-room.js +1 -1
  22. package/dist/react-auth.js +1 -1
  23. package/dist/react-avatar-group.js +1 -1
  24. package/dist/react-avatar.js +1 -1
  25. package/dist/react-badge.js +1 -1
  26. package/dist/react-bottom-nav.js +1 -1
  27. package/dist/react-brand-network-cell.js +1 -1
  28. package/dist/react-breadcrumbs.js +1 -1
  29. package/dist/react-browser-chrome-mock.js +1 -1
  30. package/dist/react-button.js +3 -3
  31. package/dist/react-calendar.js +1 -1
  32. package/dist/react-call-controls.js +1 -1
  33. package/dist/react-callout.js +1 -1
  34. package/dist/react-card-grid.js +1 -1
  35. package/dist/react-card.js +1 -1
  36. package/dist/react-carousel.js +1 -1
  37. package/dist/react-charts.js +1 -1
  38. package/dist/react-checkbox.js +1 -1
  39. package/dist/react-checklist.js +1 -1
  40. package/dist/react-code-block.js +1 -1
  41. package/dist/react-code-editor.js +1 -1
  42. package/dist/react-collapsible.js +1 -1
  43. package/dist/react-combobox.js +1 -1
  44. package/dist/react-command-input.js +1 -1
  45. package/dist/react-command.js +1 -1
  46. package/dist/react-composer.js +3 -3
  47. package/dist/react-content-protection.js +1 -1
  48. package/dist/react-conversation.js +5 -5
  49. package/dist/react-cookie-consent.js +1 -1
  50. package/dist/react-data-table.js +1 -1
  51. package/dist/react-date-picker.js +1 -1
  52. package/dist/react-device-frame.js +1 -1
  53. package/dist/react-dialog.js +2 -2
  54. package/dist/react-diff-viewer.js +1 -1
  55. package/dist/react-dropdown-menu.js +1 -1
  56. package/dist/react-editor-status-bar.js +1 -1
  57. package/dist/react-editor-tabs.js +1 -1
  58. package/dist/react-emoji-picker.js +2 -2
  59. package/dist/react-empty-state.js +1 -1
  60. package/dist/react-feedback-dialog.js +2 -2
  61. package/dist/react-file-tree.js +1 -1
  62. package/dist/react-file-upload.js +1 -1
  63. package/dist/react-floating-reactions.js +1 -1
  64. package/dist/react-flow-editor.js +2 -2
  65. package/dist/react-footer.js +1 -1
  66. package/dist/react-funnel-chart.js +1 -1
  67. package/dist/react-graph-view.js +2 -2
  68. package/dist/react-infinite-canvas.js +2 -2
  69. package/dist/react-inline-editor.js +1 -1
  70. package/dist/react-input-group.js +1 -1
  71. package/dist/react-input.js +2 -2
  72. package/dist/react-install-prompt.js +1 -1
  73. package/dist/react-kanban-board.js +1 -1
  74. package/dist/react-keyboard-shortcut.js +2 -2
  75. package/dist/react-language-selector.js +1 -1
  76. package/dist/react-line-chart.js +1 -1
  77. package/dist/react-link-card.js +1 -1
  78. package/dist/react-live-captions.js +1 -1
  79. package/dist/react-live-cursors.js +1 -1
  80. package/dist/react-live-transcript.js +1 -1
  81. package/dist/react-location-selector.js +1 -1
  82. package/dist/react-logger.js +1 -1
  83. package/dist/react-markdown-renderer.js +2 -2
  84. package/dist/react-marquee-strip.js +1 -1
  85. package/dist/react-mascot.js +1 -1
  86. package/dist/react-mastery-bar.js +1 -1
  87. package/dist/react-mini-map.js +1 -1
  88. package/dist/react-mobile-nav.js +1 -1
  89. package/dist/react-native-select.js +1 -1
  90. package/dist/react-navbar.js +1 -1
  91. package/dist/react-numbered-steps.js +1 -1
  92. package/dist/react-otp-input.js +1 -1
  93. package/dist/react-page-header.js +1 -1
  94. package/dist/react-pagination.js +1 -1
  95. package/dist/react-password-input.js +2 -2
  96. package/dist/react-payment.js +1 -1
  97. package/dist/react-popover.js +1 -1
  98. package/dist/react-pre-call-lobby.js +1 -1
  99. package/dist/react-presence-indicator.js +1 -1
  100. package/dist/react-pricing-card.js +1 -1
  101. package/dist/react-progress-display.js +1 -1
  102. package/dist/react-radial-gauge.js +1 -1
  103. package/dist/react-radio.js +1 -1
  104. package/dist/react-rating-scale.js +1 -1
  105. package/dist/react-reaction-bar.js +1 -1
  106. package/dist/react-resizable-layout.js +1 -1
  107. package/dist/react-search-bar.js +1 -1
  108. package/dist/react-section-head.js +1 -1
  109. package/dist/react-segmented-control.js +1 -1
  110. package/dist/react-select.js +1 -1
  111. package/dist/react-separator.js +1 -1
  112. package/dist/react-sheet.js +1 -1
  113. package/dist/react-sidebar.js +1 -1
  114. package/dist/react-skeleton.js +1 -1
  115. package/dist/react-skip-to-content.js +1 -1
  116. package/dist/react-slide-viewer.js +1 -1
  117. package/dist/react-slider.js +1 -1
  118. package/dist/react-slot-picker.js +1 -1
  119. package/dist/react-social-auth-button.js +3 -3
  120. package/dist/react-sortable-list.js +1 -1
  121. package/dist/react-stat-grid.js +1 -1
  122. package/dist/react-status-indicator.js +1 -1
  123. package/dist/react-steps.js +1 -1
  124. package/dist/react-sticky-note.js +1 -1
  125. package/dist/react-switch.js +1 -1
  126. package/dist/react-table-of-contents.js +1 -1
  127. package/dist/react-table.js +1 -1
  128. package/dist/react-tabs.js +1 -1
  129. package/dist/react-terminal.js +1 -1
  130. package/dist/react-test-results.js +1 -1
  131. package/dist/react-textarea.js +1 -1
  132. package/dist/react-thread-view.js +2 -2
  133. package/dist/react-timeline.js +1 -1
  134. package/dist/react-toast.js +1 -1
  135. package/dist/react-tooltip.js +1 -1
  136. package/dist/react-version-selector.js +1 -1
  137. package/dist/react-video-grid.js +2 -2
  138. package/dist/react-video-player.js +1 -1
  139. package/dist/react-video-tile.js +2 -2
  140. package/dist/react-voice-pill.js +1 -1
  141. package/dist/react-waveform.js +1 -1
  142. package/dist/react-wizard.js +1 -1
  143. package/dist/shared.js +53 -0
  144. package/dist/shared.js.map +7 -0
  145. package/package.json +1 -1
  146. package/dist/chunk-2Q6HHFAN.js +0 -164
  147. /package/dist/{chunk-V24GDHUX.js.map → chunk-4ACSHPCM.js.map} +0 -0
  148. /package/dist/{chunk-SDAJVXD4.js.map → chunk-5P56PN3J.js.map} +0 -0
  149. /package/dist/{chunk-QPCKJ2YR.js.map → chunk-GG6MZDGV.js.map} +0 -0
  150. /package/dist/{chunk-QDMLIDYN.js.map → chunk-GU5MI7FX.js.map} +0 -0
  151. /package/dist/{chunk-Z5IHYNQD.js.map → chunk-JZQ5ZL46.js.map} +0 -0
  152. /package/dist/{chunk-RSWOLRIC.js.map → chunk-KIZD73DK.js.map} +0 -0
  153. /package/dist/{chunk-XMFNBOPO.js.map → chunk-PY2TIFCT.js.map} +0 -0
  154. /package/dist/{chunk-3I3DYDHR.js.map → chunk-WNLYPQOS.js.map} +0 -0
  155. /package/dist/{chunk-63N4PZUJ.js.map → chunk-X6HEKRWE.js.map} +0 -0
  156. /package/dist/{chunk-WYKPPK3W.js.map → chunk-XAJDSVZR.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  cva,
4
4
  devWarn,
5
5
  generateId
6
- } from "./chunk-2Q6HHFAN.js";
6
+ } from "./chunk-75BKRTPO.js";
7
7
 
8
8
  // ../react-tooltip/dist/index.js
9
9
  import * as React from "react";
@@ -4,7 +4,7 @@ import {
4
4
  createKeyboardHandler,
5
5
  cva,
6
6
  generateId
7
- } from "./chunk-2Q6HHFAN.js";
7
+ } from "./chunk-75BKRTPO.js";
8
8
 
9
9
  // ../react-version-selector/dist/index.js
10
10
  import * as React from "react";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  VideoTile
3
- } from "./chunk-63N4PZUJ.js";
3
+ } from "./chunk-X6HEKRWE.js";
4
4
  import {
5
5
  cn,
6
6
  cva
7
- } from "./chunk-2Q6HHFAN.js";
7
+ } from "./chunk-75BKRTPO.js";
8
8
 
9
9
  // ../react-video-grid/dist/index.js
10
10
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-2Q6HHFAN.js";
4
+ } from "./chunk-75BKRTPO.js";
5
5
 
6
6
  // ../react-video-player/dist/index.js
7
7
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  VideoTile
3
- } from "./chunk-63N4PZUJ.js";
4
- import "./chunk-2Q6HHFAN.js";
3
+ } from "./chunk-X6HEKRWE.js";
4
+ import "./chunk-75BKRTPO.js";
5
5
  export {
6
6
  VideoTile
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-2Q6HHFAN.js";
4
+ } from "./chunk-75BKRTPO.js";
5
5
 
6
6
  // ../react-voice-pill/dist/index.js
7
7
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-2Q6HHFAN.js";
4
+ } from "./chunk-75BKRTPO.js";
5
5
 
6
6
  // ../react-waveform/dist/index.js
7
7
  import * as React from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cn,
3
3
  cva
4
- } from "./chunk-2Q6HHFAN.js";
4
+ } from "./chunk-75BKRTPO.js";
5
5
 
6
6
  // ../react-wizard/dist/index.js
7
7
  import * as React from "react";
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
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refraction-ui/react",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "All Refraction UI React components in one package — headless, accessible, zero-dependency",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -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