@refraction-ui/react 0.19.1 → 0.20.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.
- package/dist/chunk-533MCMSU.js +2355 -0
- package/dist/chunk-533MCMSU.js.map +7 -0
- package/dist/chunk-AMK4VCBG.js +250 -0
- package/dist/chunk-AMK4VCBG.js.map +7 -0
- package/dist/chunk-BOLFYVI6.js +90 -0
- package/dist/chunk-BOLFYVI6.js.map +7 -0
- package/dist/chunk-F7B64KT3.js +187 -0
- package/dist/chunk-F7B64KT3.js.map +7 -0
- package/dist/chunk-FD37DFCC.js +77 -0
- package/dist/chunk-FD37DFCC.js.map +7 -0
- package/dist/chunk-H54FLNAF.js +132 -0
- package/dist/chunk-H54FLNAF.js.map +7 -0
- package/dist/chunk-INP46354.js +664 -0
- package/dist/chunk-INP46354.js.map +7 -0
- package/dist/chunk-ONACRMG4.js +116 -0
- package/dist/chunk-ONACRMG4.js.map +7 -0
- package/dist/chunk-SDZ3LROZ.js +7 -0
- package/dist/chunk-SDZ3LROZ.js.map +7 -0
- package/dist/chunk-TOZBR4GL.js +154 -0
- package/dist/chunk-TOZBR4GL.js.map +7 -0
- package/dist/chunk-UNEM2TRI.js +225 -0
- package/dist/chunk-UNEM2TRI.js.map +7 -0
- package/dist/chunk-VK3EQ34F.js +92 -0
- package/dist/chunk-VK3EQ34F.js.map +7 -0
- package/dist/chunk-WK2IIUFO.js +316 -0
- package/dist/chunk-WK2IIUFO.js.map +7 -0
- package/dist/chunk-WSPJTQAV.js +59 -0
- package/dist/chunk-WSPJTQAV.js.map +7 -0
- package/dist/chunk-XWP763SH.js +3 -2
- package/dist/chunk-XWP763SH.js.map +7 -1
- package/dist/chunk-Y2FNNAIL.js +80 -0
- package/dist/chunk-Y2FNNAIL.js.map +1 -0
- package/dist/{chunk-4A4BW3GR.js → chunk-ZF3OHCGV.js} +28 -5
- package/dist/chunk-ZF3OHCGV.js.map +7 -0
- package/dist/form.cjs +5 -11
- package/dist/form.cjs.map +1 -1
- package/dist/form.js +6 -12
- package/dist/form.js.map +1 -1
- package/dist/index.cjs +2879 -33936
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +126 -28780
- package/dist/internal/react-app-shell/index.d.cts +2 -22
- package/dist/internal/react-app-shell/index.d.ts +2 -22
- package/dist/internal/react-badge/index.d.cts +5 -0
- package/dist/internal/react-badge/index.d.ts +5 -0
- package/dist/internal/react-callout/index.d.cts +4 -0
- package/dist/internal/react-callout/index.d.ts +4 -0
- package/dist/internal/react-card/index.d.cts +8 -1
- package/dist/internal/react-card/index.d.ts +8 -1
- package/dist/internal/react-collapsible/index.d.cts +0 -3
- package/dist/internal/react-collapsible/index.d.ts +0 -3
- package/dist/internal/react-combobox/index.d.cts +0 -3
- package/dist/internal/react-combobox/index.d.ts +0 -3
- package/dist/internal/react-command/index.d.cts +0 -3
- package/dist/internal/react-command/index.d.ts +0 -3
- package/dist/internal/react-data-table/index.d.cts +0 -3
- package/dist/internal/react-data-table/index.d.ts +0 -3
- package/dist/internal/react-dialog/index.d.cts +0 -3
- package/dist/internal/react-dialog/index.d.ts +0 -3
- package/dist/internal/react-dropdown-menu/index.d.cts +0 -3
- package/dist/internal/react-dropdown-menu/index.d.ts +0 -3
- package/dist/internal/react-feedback-dialog/index.d.cts +0 -3
- package/dist/internal/react-feedback-dialog/index.d.ts +0 -3
- package/dist/internal/react-form/index.d.cts +2 -21
- package/dist/internal/react-form/index.d.ts +2 -21
- package/dist/internal/react-keyboard-shortcut/index.d.cts +0 -6
- package/dist/internal/react-keyboard-shortcut/index.d.ts +0 -6
- package/dist/internal/react-link-card/index.d.cts +8 -2
- package/dist/internal/react-link-card/index.d.ts +8 -2
- package/dist/internal/react-popover/index.d.cts +0 -3
- package/dist/internal/react-popover/index.d.ts +0 -3
- package/dist/internal/react-sheet/index.d.cts +0 -3
- package/dist/internal/react-sheet/index.d.ts +0 -3
- package/dist/internal/react-slot/index.d.cts +23 -0
- package/dist/internal/react-slot/index.d.ts +23 -0
- package/dist/internal/react-toast/index.d.cts +0 -3
- package/dist/internal/react-toast/index.d.ts +0 -3
- package/dist/internal/react-tooltip/index.d.cts +0 -3
- package/dist/internal/react-tooltip/index.d.ts +0 -3
- package/dist/react-accordion.js +125 -0
- package/dist/react-accordion.js.map +7 -0
- package/dist/react-ai.js +257 -0
- package/dist/react-ai.js.map +7 -0
- package/dist/react-analytics.js +1698 -0
- package/dist/react-analytics.js.map +7 -0
- package/dist/react-animated-text.js +164 -0
- package/dist/react-animated-text.js.map +7 -0
- package/dist/react-app-shell.js +631 -0
- package/dist/react-app-shell.js.map +7 -0
- package/dist/react-audience-feature-card.js +53 -0
- package/dist/react-audience-feature-card.js.map +7 -0
- package/dist/react-audio-room.js +166 -0
- package/dist/react-audio-room.js.map +7 -0
- package/dist/react-auth.js +211 -0
- package/dist/react-auth.js.map +7 -0
- package/dist/react-avatar-group.js +154 -0
- package/dist/react-avatar-group.js.map +7 -0
- package/dist/react-avatar.js +168 -0
- package/dist/react-avatar.js.map +7 -0
- package/dist/react-badge.js +86 -0
- package/dist/react-badge.js.map +7 -0
- package/dist/react-bottom-nav.js +67 -0
- package/dist/react-bottom-nav.js.map +7 -0
- package/dist/react-brand-network-cell.js +92 -0
- package/dist/react-brand-network-cell.js.map +7 -0
- package/dist/react-breadcrumbs.js +104 -0
- package/dist/react-breadcrumbs.js.map +7 -0
- package/dist/react-browser-chrome-mock.js +89 -0
- package/dist/react-browser-chrome-mock.js.map +7 -0
- package/dist/react-button.js +13 -0
- package/dist/react-button.js.map +7 -0
- package/dist/react-calendar.js +301 -0
- package/dist/react-calendar.js.map +7 -0
- package/dist/react-call-controls.js +113 -0
- package/dist/react-call-controls.js.map +7 -0
- package/dist/react-callout.js +152 -0
- package/dist/react-callout.js.map +7 -0
- package/dist/react-card-grid.js +34 -0
- package/dist/react-card-grid.js.map +7 -0
- package/dist/react-card.js +200 -0
- package/dist/react-card.js.map +7 -0
- package/dist/react-carousel.js +132 -0
- package/dist/react-carousel.js.map +7 -0
- package/dist/react-charts.js +509 -0
- package/dist/react-charts.js.map +7 -0
- package/dist/react-checkbox.js +156 -0
- package/dist/react-checkbox.js.map +7 -0
- package/dist/react-checklist.js +168 -0
- package/dist/react-checklist.js.map +7 -0
- package/dist/react-code-block.js +78 -0
- package/dist/react-code-block.js.map +7 -0
- package/dist/react-code-editor.js +184 -0
- package/dist/react-code-editor.js.map +7 -0
- package/dist/react-collapsible.js +192 -0
- package/dist/react-collapsible.js.map +7 -0
- package/dist/react-combobox.js +609 -0
- package/dist/react-combobox.js.map +7 -0
- package/dist/react-command-input.js +202 -0
- package/dist/react-command-input.js.map +7 -0
- package/dist/react-command.js +364 -0
- package/dist/react-command.js.map +7 -0
- package/dist/react-composer.js +2036 -0
- package/dist/react-composer.js.map +7 -0
- package/dist/react-content-protection.js +133 -0
- package/dist/react-content-protection.js.map +7 -0
- package/dist/react-conversation.js +1226 -0
- package/dist/react-conversation.js.map +7 -0
- package/dist/react-cookie-consent.js +291 -0
- package/dist/react-cookie-consent.js.map +7 -0
- package/dist/react-data-table.js +310 -0
- package/dist/react-data-table.js.map +7 -0
- package/dist/react-date-picker.js +95 -0
- package/dist/react-date-picker.js.map +7 -0
- package/dist/react-device-frame.js +137 -0
- package/dist/react-device-frame.js.map +7 -0
- package/dist/react-dialog.js +218 -0
- package/dist/react-dialog.js.map +7 -0
- package/dist/react-diff-viewer.js +460 -0
- package/dist/react-diff-viewer.js.map +7 -0
- package/dist/react-dropdown-menu.js +292 -0
- package/dist/react-dropdown-menu.js.map +7 -0
- package/dist/react-editor-status-bar.js +148 -0
- package/dist/react-editor-status-bar.js.map +7 -0
- package/dist/react-editor-tabs.js +159 -0
- package/dist/react-editor-tabs.js.map +7 -0
- package/dist/react-emoji-picker.js +238 -0
- package/dist/react-emoji-picker.js.map +7 -0
- package/dist/react-empty-state.js +90 -0
- package/dist/react-empty-state.js.map +7 -0
- package/dist/react-feedback-dialog.js +275 -0
- package/dist/react-feedback-dialog.js.map +7 -0
- package/dist/react-file-tree.js +376 -0
- package/dist/react-file-tree.js.map +7 -0
- package/dist/react-file-upload.js +360 -0
- package/dist/react-file-upload.js.map +7 -0
- package/dist/react-floating-reactions.js +124 -0
- package/dist/react-floating-reactions.js.map +7 -0
- package/dist/react-flow-editor.js +198 -0
- package/dist/react-flow-editor.js.map +7 -0
- package/dist/react-footer.js +67 -0
- package/dist/react-footer.js.map +7 -0
- package/dist/react-graph-view.js +197 -0
- package/dist/react-graph-view.js.map +7 -0
- package/dist/react-icon-system.js +9 -0
- package/dist/react-icon-system.js.map +7 -0
- package/dist/react-infinite-canvas.js +8 -0
- package/dist/react-infinite-canvas.js.map +7 -0
- package/dist/react-inline-editor.js +216 -0
- package/dist/react-inline-editor.js.map +7 -0
- package/dist/react-input-group.js +150 -0
- package/dist/react-input-group.js.map +7 -0
- package/dist/react-input.js +10 -0
- package/dist/react-input.js.map +7 -0
- package/dist/react-install-prompt.js +132 -0
- package/dist/react-install-prompt.js.map +7 -0
- package/dist/react-kanban-board.js +198 -0
- package/dist/react-kanban-board.js.map +7 -0
- package/dist/react-keyboard-shortcut.js +36 -0
- package/dist/react-keyboard-shortcut.js.map +7 -0
- package/dist/react-language-selector.js +311 -0
- package/dist/react-language-selector.js.map +7 -0
- package/dist/react-link-card.js +48 -0
- package/dist/react-link-card.js.map +7 -0
- package/dist/react-live-captions.js +92 -0
- package/dist/react-live-captions.js.map +7 -0
- package/dist/react-live-cursors.js +145 -0
- package/dist/react-live-cursors.js.map +7 -0
- package/dist/react-live-transcript.js +117 -0
- package/dist/react-live-transcript.js.map +7 -0
- package/dist/react-location-selector.js +252 -0
- package/dist/react-location-selector.js.map +7 -0
- package/dist/react-logger.js +415 -0
- package/dist/react-logger.js.map +7 -0
- package/dist/react-markdown-renderer.js +12 -0
- package/dist/react-markdown-renderer.js.map +7 -0
- package/dist/react-marquee-strip.js +62 -0
- package/dist/react-marquee-strip.js.map +7 -0
- package/dist/react-mascot.js +367 -0
- package/dist/react-mascot.js.map +7 -0
- package/dist/react-mastery-bar.js +97 -0
- package/dist/react-mastery-bar.js.map +7 -0
- package/dist/react-mini-map.js +207 -0
- package/dist/react-mini-map.js.map +7 -0
- package/dist/react-mobile-nav.js +216 -0
- package/dist/react-mobile-nav.js.map +7 -0
- package/dist/react-navbar.js +96 -0
- package/dist/react-navbar.js.map +7 -0
- package/dist/react-numbered-steps.js +67 -0
- package/dist/react-numbered-steps.js.map +7 -0
- package/dist/react-otp-input.js +318 -0
- package/dist/react-otp-input.js.map +7 -0
- package/dist/react-pagination.js +199 -0
- package/dist/react-pagination.js.map +7 -0
- package/dist/react-password-input.js +104 -0
- package/dist/react-password-input.js.map +7 -0
- package/dist/react-payment.js +81 -0
- package/dist/react-payment.js.map +7 -0
- package/dist/react-popover.js +176 -0
- package/dist/react-popover.js.map +7 -0
- package/dist/react-pre-call-lobby.js +309 -0
- package/dist/react-pre-call-lobby.js.map +7 -0
- package/dist/react-presence-indicator.js +86 -0
- package/dist/react-presence-indicator.js.map +7 -0
- package/dist/react-pricing-card.js +142 -0
- package/dist/react-pricing-card.js.map +7 -0
- package/dist/react-progress-display.js +188 -0
- package/dist/react-progress-display.js.map +7 -0
- package/dist/react-radial-gauge.js +193 -0
- package/dist/react-radial-gauge.js.map +7 -0
- package/dist/react-radio.js +169 -0
- package/dist/react-radio.js.map +7 -0
- package/dist/react-rating-scale.js +171 -0
- package/dist/react-rating-scale.js.map +7 -0
- package/dist/react-reaction-bar.js +111 -0
- package/dist/react-reaction-bar.js.map +7 -0
- package/dist/react-resizable-layout.js +298 -0
- package/dist/react-resizable-layout.js.map +7 -0
- package/dist/react-rich-editor.js +1 -0
- package/dist/react-rich-editor.js.map +7 -0
- package/dist/react-search-bar.js +285 -0
- package/dist/react-search-bar.js.map +7 -0
- package/dist/react-section-head.js +65 -0
- package/dist/react-section-head.js.map +7 -0
- package/dist/react-segmented-control.js +215 -0
- package/dist/react-segmented-control.js.map +7 -0
- package/dist/react-select.js +389 -0
- package/dist/react-select.js.map +7 -0
- package/dist/react-separator.js +86 -0
- package/dist/react-separator.js.map +7 -0
- package/dist/react-sheet.js +310 -0
- package/dist/react-sheet.js.map +7 -0
- package/dist/react-sidebar.js +100 -0
- package/dist/react-sidebar.js.map +7 -0
- package/dist/react-skeleton.js +91 -0
- package/dist/react-skeleton.js.map +7 -0
- package/dist/react-skip-to-content.js +38 -0
- package/dist/react-skip-to-content.js.map +7 -0
- package/dist/react-slide-viewer.js +264 -0
- package/dist/react-slide-viewer.js.map +7 -0
- package/dist/react-slider.js +105 -0
- package/dist/react-slider.js.map +7 -0
- package/dist/react-slot-picker.js +184 -0
- package/dist/react-slot-picker.js.map +7 -0
- package/dist/react-slot.js +7 -0
- package/dist/react-slot.js.map +7 -0
- package/dist/react-social-auth-button.js +169 -0
- package/dist/react-social-auth-button.js.map +7 -0
- package/dist/react-sortable-list.js +204 -0
- package/dist/react-sortable-list.js.map +7 -0
- package/dist/react-stat-grid.js +69 -0
- package/dist/react-stat-grid.js.map +7 -0
- package/dist/react-status-indicator.js +117 -0
- package/dist/react-status-indicator.js.map +7 -0
- package/dist/react-steps.js +167 -0
- package/dist/react-steps.js.map +7 -0
- package/dist/react-sticky-note.js +131 -0
- package/dist/react-sticky-note.js.map +7 -0
- package/dist/react-switch.js +139 -0
- package/dist/react-switch.js.map +7 -0
- package/dist/react-table-of-contents.js +80 -0
- package/dist/react-table-of-contents.js.map +7 -0
- package/dist/react-tabs.js +230 -0
- package/dist/react-tabs.js.map +7 -0
- package/dist/react-terminal.js +101 -0
- package/dist/react-terminal.js.map +7 -0
- package/dist/react-test-results.js +158 -0
- package/dist/react-test-results.js.map +7 -0
- package/dist/react-textarea.js +89 -0
- package/dist/react-textarea.js.map +7 -0
- package/dist/react-thread-view.js +139 -0
- package/dist/react-thread-view.js.map +7 -0
- package/dist/react-timeline.js +153 -0
- package/dist/react-timeline.js.map +7 -0
- package/dist/react-toast.js +253 -0
- package/dist/react-toast.js.map +7 -0
- package/dist/react-tooltip.js +221 -0
- package/dist/react-tooltip.js.map +7 -0
- package/dist/react-version-selector.js +270 -0
- package/dist/react-version-selector.js.map +7 -0
- package/dist/react-video-grid.js +129 -0
- package/dist/react-video-grid.js.map +7 -0
- package/dist/react-video-player.js +206 -0
- package/dist/react-video-player.js.map +7 -0
- package/dist/react-video-tile.js +8 -0
- package/dist/react-video-tile.js.map +7 -0
- package/dist/react-voice-pill.js +314 -0
- package/dist/react-voice-pill.js.map +7 -0
- package/dist/react-waveform.js +558 -0
- package/dist/react-waveform.js.map +7 -0
- package/dist/react-wizard.js +337 -0
- package/dist/react-wizard.js.map +7 -0
- package/dist/styles.css +7 -0
- package/dist/theme.js +1 -1
- package/package.json +3 -2
- package/dist/applicationinsights-web-H7OBLIVJ.js +0 -23393
- package/dist/applicationinsights-web-H7OBLIVJ.js.map +0 -1
- package/dist/chunk-4A4BW3GR.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/module-X3HTTRQK.js +0 -6438
- package/dist/module-X3HTTRQK.js.map +0 -1
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ShortcutHint,
|
|
3
|
+
useShortcut
|
|
4
|
+
} from "./chunk-WK2IIUFO.js";
|
|
5
|
+
import {
|
|
6
|
+
Keys,
|
|
7
|
+
cn,
|
|
8
|
+
cva
|
|
9
|
+
} from "./chunk-ZF3OHCGV.js";
|
|
10
|
+
|
|
11
|
+
// ../react-button/dist/index.js
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
|
|
14
|
+
// ../button/dist/index.js
|
|
15
|
+
var BUTTON_VARIANT_ALIASES = {
|
|
16
|
+
primary: "default"
|
|
17
|
+
};
|
|
18
|
+
function resolveButtonVariant(variant) {
|
|
19
|
+
if (!variant) return variant;
|
|
20
|
+
return BUTTON_VARIANT_ALIASES[variant] ?? variant;
|
|
21
|
+
}
|
|
22
|
+
function createButton(props = {}) {
|
|
23
|
+
const { disabled = false, loading = false } = props;
|
|
24
|
+
const isInteractive = !disabled && !loading;
|
|
25
|
+
const ariaProps = {};
|
|
26
|
+
if (disabled) {
|
|
27
|
+
ariaProps["aria-disabled"] = true;
|
|
28
|
+
}
|
|
29
|
+
if (loading) {
|
|
30
|
+
ariaProps["aria-disabled"] = true;
|
|
31
|
+
ariaProps["aria-label"] = ariaProps["aria-label"] ?? void 0;
|
|
32
|
+
}
|
|
33
|
+
const dataAttributes = {};
|
|
34
|
+
if (loading) {
|
|
35
|
+
dataAttributes["data-loading"] = "";
|
|
36
|
+
}
|
|
37
|
+
if (disabled) {
|
|
38
|
+
dataAttributes["data-disabled"] = "";
|
|
39
|
+
}
|
|
40
|
+
const keyboardHandlers = {};
|
|
41
|
+
if (!isInteractive) {
|
|
42
|
+
keyboardHandlers[Keys.Enter] = (e) => e.preventDefault();
|
|
43
|
+
keyboardHandlers[Keys.Space] = (e) => e.preventDefault();
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
ariaProps,
|
|
47
|
+
keyboardHandlers,
|
|
48
|
+
isInteractive,
|
|
49
|
+
dataAttributes
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function getButtonType(props) {
|
|
53
|
+
return props.type ?? "button";
|
|
54
|
+
}
|
|
55
|
+
var buttonTokens = {
|
|
56
|
+
name: "button",
|
|
57
|
+
tokens: {
|
|
58
|
+
bg: { variable: "--rfr-button-bg", fallback: "hsl(var(--primary))" },
|
|
59
|
+
fg: { variable: "--rfr-button-fg", fallback: "hsl(var(--primary-foreground))" },
|
|
60
|
+
border: { variable: "--rfr-button-border", fallback: "hsl(var(--border))" },
|
|
61
|
+
radius: { variable: "--rfr-button-radius", fallback: "var(--radius)" },
|
|
62
|
+
ring: { variable: "--rfr-button-ring", fallback: "hsl(var(--ring))" }
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
var buttonVariants = cva({
|
|
66
|
+
base: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
67
|
+
variants: {
|
|
68
|
+
variant: {
|
|
69
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
70
|
+
// Alias for `default` — see resolveButtonVariant + issue #201. Same classes
|
|
71
|
+
// so styling stays identical even if a consumer reaches into `buttonVariants`
|
|
72
|
+
// directly without going through resolveButtonVariant.
|
|
73
|
+
primary: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
74
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
75
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
76
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
77
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
78
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
79
|
+
},
|
|
80
|
+
size: {
|
|
81
|
+
xs: "h-7 rounded px-2 text-xs",
|
|
82
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
83
|
+
default: "h-9 px-4 py-2",
|
|
84
|
+
lg: "h-10 rounded-md px-8",
|
|
85
|
+
icon: "h-9 w-9"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
defaultVariants: {
|
|
89
|
+
variant: "default",
|
|
90
|
+
size: "default"
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// ../react-button/dist/index.js
|
|
95
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
96
|
+
var Button = React.forwardRef(
|
|
97
|
+
function Button2({ variant, size, loading, asChild, className, disabled, children, shortcut, action, ...props }, ref) {
|
|
98
|
+
const resolvedVariant = resolveButtonVariant(variant);
|
|
99
|
+
const api = createButton({ variant: resolvedVariant, size, disabled, loading, asChild, type: props.type });
|
|
100
|
+
const classes = cn(buttonVariants({ variant: resolvedVariant, size }), className);
|
|
101
|
+
const internalRef = React.useRef(null);
|
|
102
|
+
const mergedRef = React.useCallback(
|
|
103
|
+
(node) => {
|
|
104
|
+
internalRef.current = node;
|
|
105
|
+
if (typeof ref === "function") ref(node);
|
|
106
|
+
else if (ref) ref.current = node;
|
|
107
|
+
},
|
|
108
|
+
[ref]
|
|
109
|
+
);
|
|
110
|
+
useShortcut({
|
|
111
|
+
shortcut,
|
|
112
|
+
action,
|
|
113
|
+
enabled: !disabled && !loading && (!!shortcut || !!action),
|
|
114
|
+
onTrigger: () => {
|
|
115
|
+
internalRef.current?.click();
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
if (asChild && React.isValidElement(children)) {
|
|
119
|
+
return React.cloneElement(children, {
|
|
120
|
+
ref: mergedRef,
|
|
121
|
+
className: cn(classes, children.props.className, "relative"),
|
|
122
|
+
type: getButtonType({ type: props.type }),
|
|
123
|
+
...api.ariaProps,
|
|
124
|
+
...api.dataAttributes,
|
|
125
|
+
...props,
|
|
126
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
127
|
+
(shortcut || action) && /* @__PURE__ */ jsx(ShortcutHint, { shortcut, action, className: "right-4" }),
|
|
128
|
+
children.props.children
|
|
129
|
+
] })
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return /* @__PURE__ */ jsxs(
|
|
133
|
+
"button",
|
|
134
|
+
{
|
|
135
|
+
ref: mergedRef,
|
|
136
|
+
type: getButtonType({ type: props.type }),
|
|
137
|
+
className: cn(classes, "relative"),
|
|
138
|
+
disabled: disabled || loading,
|
|
139
|
+
...api.ariaProps,
|
|
140
|
+
...api.dataAttributes,
|
|
141
|
+
...props,
|
|
142
|
+
children: [
|
|
143
|
+
(shortcut || action) && /* @__PURE__ */ jsx(ShortcutHint, { shortcut, action, className: "right-4" }),
|
|
144
|
+
loading && /* @__PURE__ */ jsxs(
|
|
145
|
+
"svg",
|
|
146
|
+
{
|
|
147
|
+
className: "animate-spin h-4 w-4",
|
|
148
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
149
|
+
fill: "none",
|
|
150
|
+
viewBox: "0 0 24 24",
|
|
151
|
+
"aria-hidden": "true",
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsx(
|
|
154
|
+
"circle",
|
|
155
|
+
{
|
|
156
|
+
className: "opacity-25",
|
|
157
|
+
cx: "12",
|
|
158
|
+
cy: "12",
|
|
159
|
+
r: "10",
|
|
160
|
+
stroke: "currentColor",
|
|
161
|
+
strokeWidth: "4"
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ jsx(
|
|
165
|
+
"path",
|
|
166
|
+
{
|
|
167
|
+
className: "opacity-75",
|
|
168
|
+
fill: "currentColor",
|
|
169
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
children
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
export {
|
|
183
|
+
buttonTokens,
|
|
184
|
+
buttonVariants,
|
|
185
|
+
Button
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=chunk-F7B64KT3.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../button/src/button.ts", "../../button/src/button.styles.ts", "../../react-button/src/button.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { AccessibilityProps, KeyboardHandlerMap } from '@refraction-ui/shared'\nimport { Keys } from '@refraction-ui/shared'\n\n/**\n * `primary` is an alias of `default` — included so the universal React-ecosystem\n * muscle-memory (`<Button variant=\"primary\">`) renders as the most-emphasized\n * button instead of falling through to the unstyled base. See issue #201.\n */\nexport type ButtonVariant =\n | 'default'\n | 'primary'\n | 'destructive'\n | 'outline'\n | 'secondary'\n | 'ghost'\n | 'link'\n\n/** Variants that map to the same visual style as `default`. */\nexport const BUTTON_VARIANT_ALIASES: Partial<Record<ButtonVariant, ButtonVariant>> = {\n primary: 'default',\n}\n\n/** Resolve an alias to its canonical variant. Pass-through for unknown/undefined. */\nexport function resolveButtonVariant(variant: ButtonVariant | undefined): ButtonVariant | undefined {\n if (!variant) return variant\n return BUTTON_VARIANT_ALIASES[variant] ?? variant\n}\nexport type ButtonSize = 'xs' | 'sm' | 'default' | 'lg' | 'icon'\n\nexport interface ButtonProps {\n variant?: ButtonVariant\n size?: ButtonSize\n disabled?: boolean\n loading?: boolean\n asChild?: boolean\n type?: 'button' | 'submit' | 'reset'\n}\n\nexport interface ButtonAPI {\n /** ARIA attributes to spread on the element */\n ariaProps: Partial<AccessibilityProps>\n /** Keyboard handlers to attach */\n keyboardHandlers: KeyboardHandlerMap\n /** Whether interaction should be blocked */\n isInteractive: boolean\n /** Data attributes for CSS styling hooks */\n dataAttributes: Record<string, string>\n}\n\nexport function createButton(props: ButtonProps = {}): ButtonAPI {\n const { disabled = false, loading = false } = props\n const isInteractive = !disabled && !loading\n\n const ariaProps: Partial<AccessibilityProps> = {}\n if (disabled) {\n ariaProps['aria-disabled'] = true\n }\n if (loading) {\n ariaProps['aria-disabled'] = true\n ariaProps['aria-label'] = ariaProps['aria-label'] ?? undefined\n }\n\n const dataAttributes: Record<string, string> = {}\n if (loading) {\n dataAttributes['data-loading'] = ''\n }\n if (disabled) {\n dataAttributes['data-disabled'] = ''\n }\n\n const keyboardHandlers: KeyboardHandlerMap = {}\n if (!isInteractive) {\n keyboardHandlers[Keys.Enter] = (e) => e.preventDefault()\n keyboardHandlers[Keys.Space] = (e) => e.preventDefault()\n }\n\n return {\n ariaProps,\n keyboardHandlers,\n isInteractive,\n dataAttributes,\n }\n}\n\nexport function getButtonType(props: ButtonProps): string {\n return props.type ?? 'button'\n}\n", "import { cva } from '@refraction-ui/shared'\nimport type { TokenContract } from '@refraction-ui/shared'\n\nexport const buttonTokens: TokenContract = {\n name: 'button',\n tokens: {\n bg: { variable: '--rfr-button-bg', fallback: 'hsl(var(--primary))' },\n fg: { variable: '--rfr-button-fg', fallback: 'hsl(var(--primary-foreground))' },\n border: { variable: '--rfr-button-border', fallback: 'hsl(var(--border))' },\n radius: { variable: '--rfr-button-radius', fallback: 'var(--radius)' },\n ring: { variable: '--rfr-button-ring', fallback: 'hsl(var(--ring))' },\n },\n}\n\nexport const buttonVariants = cva({\n base: 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n // Alias for `default` — see resolveButtonVariant + issue #201. Same classes\n // so styling stays identical even if a consumer reaches into `buttonVariants`\n // directly without going through resolveButtonVariant.\n primary: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',\n destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',\n outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n xs: 'h-7 rounded px-2 text-xs',\n sm: 'h-8 rounded-md px-3 text-xs',\n default: 'h-9 px-4 py-2',\n lg: 'h-10 rounded-md px-8',\n icon: 'h-9 w-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n})\n", "import * as React from 'react'\nimport {\n createButton,\n buttonVariants,\n getButtonType,\n resolveButtonVariant,\n type ButtonVariant,\n type ButtonSize,\n} from '@refraction-ui/button'\nimport { useShortcut, ShortcutHint } from '@refraction-ui/react-keyboard-shortcut'\nimport { cn } from '@refraction-ui/shared'\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant\n size?: ButtonSize\n loading?: boolean\n asChild?: boolean\n shortcut?: string\n action?: string\n}\n\n/**\n * Button component — renders a styled button with variant and size support.\n *\n * Uses the headless @refraction-ui/button core for state, ARIA, and keyboard handling.\n * Styling via Tailwind utility classes (no external CSS-in-JS).\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button({ variant, size, loading, asChild, className, disabled, children, shortcut, action, ...props }, ref) {\n // `primary` is an ecosystem-muscle-memory alias for `default` — resolve it\n // here so styling, aria, and data attributes all see the canonical variant.\n // See issue #201.\n const resolvedVariant = resolveButtonVariant(variant)\n const api = createButton({ variant: resolvedVariant, size, disabled, loading, asChild, type: props.type })\n const classes = cn(buttonVariants({ variant: resolvedVariant, size }), className)\n \n const internalRef = React.useRef<HTMLButtonElement>(null)\n const mergedRef = React.useCallback(\n (node: HTMLButtonElement | null) => {\n internalRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) ref.current = node\n },\n [ref]\n )\n\n useShortcut({\n shortcut,\n action,\n enabled: !disabled && !loading && (!!shortcut || !!action),\n onTrigger: () => {\n internalRef.current?.click()\n },\n })\n\n // When asChild, render the child element directly with button props merged in.\n // This allows <Button asChild><a href=\"/\">Link</a></Button>\n if (asChild && React.isValidElement(children)) {\n return React.cloneElement(children as React.ReactElement<Record<string, unknown>>, {\n ref: mergedRef,\n className: cn(classes, (children.props as Record<string, unknown>).className as string, 'relative'),\n type: getButtonType({ type: props.type }),\n ...api.ariaProps,\n ...api.dataAttributes,\n ...props,\n children: (\n <>\n {(shortcut || action) && <ShortcutHint shortcut={shortcut} action={action} className=\"right-4\" />}\n {(children.props as Record<string, unknown>).children}\n </>\n )\n })\n }\n\n return (\n <button\n ref={mergedRef}\n type={getButtonType({ type: props.type }) as 'button' | 'submit' | 'reset'}\n className={cn(classes, 'relative')}\n disabled={disabled || loading}\n {...api.ariaProps}\n {...api.dataAttributes}\n {...props}\n >\n {(shortcut || action) && <ShortcutHint shortcut={shortcut} action={action} className=\"right-4\" />}\n {loading && (\n <svg\n className=\"animate-spin h-4 w-4\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n aria-hidden=\"true\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n )}\n {children}\n </button>\n )\n },\n)\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAkBO,IAAM,yBAAwE;EACnF,SAAS;AACX;AAGO,SAAS,qBAAqB,SAA+D;AAClG,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO,uBAAuB,OAAO,KAAK;AAC5C;AAuBO,SAAS,aAAa,QAAqB,CAAA,GAAe;AAC/D,QAAM,EAAE,WAAW,OAAO,UAAU,MAAA,IAAU;AAC9C,QAAM,gBAAgB,CAAC,YAAY,CAAC;AAEpC,QAAM,YAAyC,CAAA;AAC/C,MAAI,UAAU;AACZ,cAAU,eAAe,IAAI;EAC/B;AACA,MAAI,SAAS;AACX,cAAU,eAAe,IAAI;AAC7B,cAAU,YAAY,IAAI,UAAU,YAAY,KAAK;EACvD;AAEA,QAAM,iBAAyC,CAAA;AAC/C,MAAI,SAAS;AACX,mBAAe,cAAc,IAAI;EACnC;AACA,MAAI,UAAU;AACZ,mBAAe,eAAe,IAAI;EACpC;AAEA,QAAM,mBAAuC,CAAA;AAC7C,MAAI,CAAC,eAAe;AAClB,qBAA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,0 +1,77 @@
|
|
|
1
|
+
// ../accordion/dist/index.js
|
|
2
|
+
function isItemOpen(state, itemValue) {
|
|
3
|
+
return state.type === "single" ? state.value === itemValue : Array.isArray(state.value) && state.value.includes(itemValue);
|
|
4
|
+
}
|
|
5
|
+
function valueEquals(a, b) {
|
|
6
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
7
|
+
return a.length === b.length && a.every((v, i) => v === b[i]);
|
|
8
|
+
}
|
|
9
|
+
return a === b;
|
|
10
|
+
}
|
|
11
|
+
function createAccordion(config = {}) {
|
|
12
|
+
let type = config.type ?? "single";
|
|
13
|
+
let collapsible = config.collapsible ?? false;
|
|
14
|
+
let onValueChange = config.onValueChange;
|
|
15
|
+
let uncontrolledValue = config.defaultValue ?? (type === "multiple" ? [] : "");
|
|
16
|
+
let controlledValue = config.value;
|
|
17
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
18
|
+
let snapshot = buildSnapshot();
|
|
19
|
+
function currentValue() {
|
|
20
|
+
return controlledValue !== void 0 ? controlledValue : uncontrolledValue;
|
|
21
|
+
}
|
|
22
|
+
function buildSnapshot() {
|
|
23
|
+
return { type, collapsible, value: currentValue() };
|
|
24
|
+
}
|
|
25
|
+
function emit() {
|
|
26
|
+
snapshot = buildSnapshot();
|
|
27
|
+
for (const l of listeners) l();
|
|
28
|
+
}
|
|
29
|
+
const api = {
|
|
30
|
+
getState() {
|
|
31
|
+
return snapshot;
|
|
32
|
+
},
|
|
33
|
+
subscribe(listener) {
|
|
34
|
+
listeners.add(listener);
|
|
35
|
+
return () => listeners.delete(listener);
|
|
36
|
+
},
|
|
37
|
+
toggleItem(itemValue) {
|
|
38
|
+
const value = currentValue();
|
|
39
|
+
let next;
|
|
40
|
+
if (type === "single") {
|
|
41
|
+
next = value === itemValue && collapsible ? "" : itemValue;
|
|
42
|
+
} else {
|
|
43
|
+
const arrValue = Array.isArray(value) ? value : [];
|
|
44
|
+
next = arrValue.includes(itemValue) ? arrValue.filter((v) => v !== itemValue) : [...arrValue, itemValue];
|
|
45
|
+
}
|
|
46
|
+
if (controlledValue === void 0) {
|
|
47
|
+
if (valueEquals(uncontrolledValue, next)) return;
|
|
48
|
+
uncontrolledValue = next;
|
|
49
|
+
}
|
|
50
|
+
onValueChange?.(next);
|
|
51
|
+
emit();
|
|
52
|
+
},
|
|
53
|
+
isOpen(itemValue) {
|
|
54
|
+
return isItemOpen(snapshot, itemValue);
|
|
55
|
+
},
|
|
56
|
+
setValue(value) {
|
|
57
|
+
if (controlledValue !== void 0 && valueEquals(controlledValue, value)) return;
|
|
58
|
+
controlledValue = value;
|
|
59
|
+
emit();
|
|
60
|
+
},
|
|
61
|
+
setOptions(options) {
|
|
62
|
+
const prevType = type;
|
|
63
|
+
const prevCollapsible = collapsible;
|
|
64
|
+
if (options.type !== void 0) type = options.type;
|
|
65
|
+
if (options.collapsible !== void 0) collapsible = options.collapsible;
|
|
66
|
+
if (options.onValueChange !== void 0) onValueChange = options.onValueChange;
|
|
67
|
+
if (type !== prevType || collapsible !== prevCollapsible) emit();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return api;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export {
|
|
74
|
+
isItemOpen,
|
|
75
|
+
createAccordion
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=chunk-FD37DFCC.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../accordion/src/accordion.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @refraction-ui/accordion — headless accordion (disclosure) state machine.\n *\n * Owns the *behavior* of an accordion: which item(s) are open, the single vs\n * multiple expansion modes, and the collapsible toggle rule. It has NO UI\n * opinion — React/Astro adapters subscribe to the store and render the parts.\n */\n\n/** Expansion mode: one item open at a time, or any number. */\nexport type AccordionType = 'single' | 'multiple'\n\n/** Open item id (`single`) or ids (`multiple`). */\nexport type AccordionValue = string | string[]\n\n/** Options for {@link createAccordion}. */\nexport interface AccordionConfig {\n /** Expansion mode (default `'single'`). */\n type?: AccordionType\n /** When `type=\"single\"`, allows the open item to be toggled fully closed. */\n collapsible?: boolean\n /** Controlled open item(s). Pair with `onValueChange`. */\n value?: AccordionValue\n /** Uncontrolled initial open item(s). */\n defaultValue?: AccordionValue\n /** Called whenever the open item(s) change. */\n onValueChange?: (value: AccordionValue) => void\n}\n\n/** Snapshot of the store. Returned by `getState()`; treat as immutable. */\nexport interface AccordionState {\n type: AccordionType\n collapsible: boolean\n /** Current open item id (`single`) or ids (`multiple`). */\n value: AccordionValue\n}\n\n/** The framework-agnostic store. React/Astro adapters wrap this. */\nexport interface AccordionAPI {\n /** Current immutable snapshot */\n getState(): AccordionState\n /** Subscribe to changes; returns an unsubscribe fn (suits useSyncExternalStore) */\n subscribe(listener: () => void): () => void\n /** Toggle an item open/closed per the type/collapsible rules */\n toggleItem(itemValue: string): void\n /** Whether an item is currently open */\n isOpen(itemValue: string): boolean\n /** Sync a controlled value into the store (adapters call when the prop changes) */\n setValue(value: AccordionValue): void\n /** Update options after creation (adapters keep props in sync) */\n setOptions(options: {\n type?: AccordionType\n collapsible?: boolean\n onValueChange?: (value: AccordionValue) => void\n }): void\n}\n\n/** Pure open-state check shared by every adapter. */\nexport function isItemOpen(state: AccordionState, itemValue: string): boolean {\n return state.type === 'single'\n ? state.value === itemValue\n : Array.isArray(state.value) && state.value.includes(itemValue)\n}\n\n/** Shallow value equality (arrays compared item-by-item, order-sensitive). */\nfunction valueEquals(a: AccordionValue, b: AccordionValue): boolean {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((v, i) => v === b[i])\n }\n return a === b\n}\n\n/**\n * createAccordion — headless accordion store.\n *\n * Supports controlled (`value`) and uncontrolled (`defaultValue`) usage.\n * `single` mode holds one open item id (`''` when all closed); `multiple`\n * holds an array of open ids. In `single` mode, re-toggling the open item\n * closes it only when `collapsible` is set.\n */\nexport function createAccordion(config: AccordionConfig = {}): AccordionAPI {\n let type: AccordionType = config.type ?? 'single'\n let collapsible: boolean = config.collapsible ?? false\n let onValueChange = config.onValueChange\n\n let uncontrolledValue: AccordionValue =\n config.defaultValue ?? (type === 'multiple' ? [] : '')\n let controlledValue: AccordionValue | undefined = config.value\n\n const listeners = new Set<() => void>()\n let snapshot: AccordionState = buildSnapshot()\n\n function currentValue(): AccordionValue {\n return controlledValue !== undefined ? controlledValue : uncontrolledValue\n }\n\n function buildSnapshot(): AccordionState {\n return { type, collapsible, value: currentValue() }\n }\n\n function emit(): void {\n snapshot = buildSnapshot()\n for (const l of listeners) l()\n }\n\n const api: AccordionAPI = {\n getState() {\n return snapshot\n },\n\n subscribe(listener) {\n listeners.add(listener)\n return () => listeners.delete(listener)\n },\n\n toggleItem(itemValue) {\n const value = currentValue()\n let next: AccordionValue\n if (type === 'single') {\n next = value === itemValue && collapsible ? '' : itemValue\n } else {\n const arrValue = Array.isArray(value) ? value : []\n next = arrValue.includes(itemValue)\n ? arrValue.filter((v) => v !== itemValue)\n : [...arrValue, itemValue]\n }\n if (controlledValue === undefined) {\n if (valueEquals(uncontrolledValue, next)) return\n uncontrolledValue = next\n }\n onValueChange?.(next)\n emit()\n },\n\n isOpen(itemValue) {\n return isItemOpen(snapshot, itemValue)\n },\n\n setValue(value) {\n if (controlledValue !== undefined && valueEquals(controlledValue, value)) return\n controlledValue = value\n emit()\n },\n\n setOptions(options) {\n const prevType = type\n const prevCollapsible = collapsible\n if (options.type !== undefined) type = options.type\n if (options.collapsible !== undefined) collapsible = options.collapsible\n if (options.onValueChange !== undefined) onValueChange = options.onValueChange\n if (type !== prevType || collapsible !== prevCollapsible) emit()\n },\n }\n\n return api\n}\n"],
|
|
5
|
+
"mappings": ";AAyDO,SAAS,WAAW,OAAuB,WAA4B;AAC5E,SAAO,MAAM,SAAS,WAClB,MAAM,UAAU,YAChB,MAAM,QAAQ,MAAM,KAAK,KAAK,MAAM,MAAM,SAAS,SAAS;AAClE;AAGA,SAAS,YA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;IAEA,OAAO,WAAW;AAChB,aAAO,WAAW,UAAU,SAAS;IACvC;IAEA,SAAS,OAAO;AACd,UAAI,oBAAoB,UAAa,YAAY,iBAAiB,KAAK,EAAG;AAC1E,wBAAkB;AAClB,WAAA;IACF;IAEA,WAAW,SAAS;AAClB,YAAM,WAAW;AACjB,YAAM,kBAAkB;AACxB,UAAI,QAAQ,SAAS,OAAW,QAAO,QAAQ;AAC/C,UAAI,QAAQ,gBAAgB,OAAW,eAAc,QAAQ;AAC7D,UAAI,QAAQ,kBAAkB,OAAW,iBAAgB,QAAQ;AACjE,UAAI,SAAS,YAAY,gBAAgB,gBAAiB,MAAA;IAC5D;EAAA;AAGF,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn,
|
|
3
|
+
cva
|
|
4
|
+
} from "./chunk-ZF3OHCGV.js";
|
|
5
|
+
|
|
6
|
+
// ../react-video-tile/dist/index.js
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
// ../video-tile/dist/index.js
|
|
10
|
+
function createVideoTile(props = {}) {
|
|
11
|
+
const { speaking = false, pinned = false } = props;
|
|
12
|
+
return {
|
|
13
|
+
dataAttributes: {
|
|
14
|
+
"data-speaking": speaking ? "true" : "false",
|
|
15
|
+
"data-pinned": pinned ? "true" : "false"
|
|
16
|
+
},
|
|
17
|
+
ariaProps: {
|
|
18
|
+
role: "group"
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function getInitials(name) {
|
|
23
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
24
|
+
return words.slice(0, 2).map((w) => w[0].toUpperCase()).join("");
|
|
25
|
+
}
|
|
26
|
+
var videoTileVariants = cva({
|
|
27
|
+
base: [
|
|
28
|
+
"relative aspect-video overflow-hidden rounded-lg bg-muted",
|
|
29
|
+
"transition-shadow duration-200"
|
|
30
|
+
].join(" "),
|
|
31
|
+
variants: {
|
|
32
|
+
speaking: {
|
|
33
|
+
"true": "ring-2 ring-emerald-500 dark:ring-emerald-400 ring-offset-2 ring-offset-background",
|
|
34
|
+
"false": ""
|
|
35
|
+
},
|
|
36
|
+
pinned: {
|
|
37
|
+
"true": "ring-2 ring-primary ring-offset-2 ring-offset-background",
|
|
38
|
+
"false": ""
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
speaking: "false",
|
|
43
|
+
pinned: "false"
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
var videoTileNameChipClass = "absolute bottom-2 left-2 flex items-center gap-1.5 rounded-md bg-background/70 px-2 py-0.5 text-xs font-medium text-foreground backdrop-blur-sm";
|
|
47
|
+
var videoTileMicIconClass = "text-destructive";
|
|
48
|
+
var videoTileAvatarFallbackClass = "absolute inset-0 flex items-center justify-center";
|
|
49
|
+
var videoTileAvatarCircleClass = "flex size-16 items-center justify-center rounded-full bg-card text-foreground text-xl font-semibold select-none";
|
|
50
|
+
var videoTileReactionBadgeClass = "absolute right-2 top-2 flex items-center justify-center rounded-full bg-background/70 px-1.5 py-0.5 text-sm backdrop-blur-sm";
|
|
51
|
+
|
|
52
|
+
// ../react-video-tile/dist/index.js
|
|
53
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
54
|
+
var VideoTile = React.forwardRef(
|
|
55
|
+
function VideoTile2({
|
|
56
|
+
name,
|
|
57
|
+
micState = "on",
|
|
58
|
+
speaking = false,
|
|
59
|
+
pinned = false,
|
|
60
|
+
avatarUrl,
|
|
61
|
+
mediaSlot,
|
|
62
|
+
reaction,
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}, ref) {
|
|
66
|
+
const api = createVideoTile({ speaking, pinned });
|
|
67
|
+
const initials = getInitials(name);
|
|
68
|
+
const isMuted = micState === "muted";
|
|
69
|
+
return /* @__PURE__ */ jsxs(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
ref,
|
|
73
|
+
className: cn(
|
|
74
|
+
videoTileVariants({
|
|
75
|
+
speaking: speaking ? "true" : "false",
|
|
76
|
+
pinned: pinned ? "true" : "false"
|
|
77
|
+
}),
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
"aria-label": name,
|
|
81
|
+
...api.ariaProps,
|
|
82
|
+
...api.dataAttributes,
|
|
83
|
+
...props,
|
|
84
|
+
children: [
|
|
85
|
+
mediaSlot != null ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0 h-full w-full object-cover", children: mediaSlot }) : (
|
|
86
|
+
/* Avatar fallback */
|
|
87
|
+
/* @__PURE__ */ jsx("div", { className: videoTileAvatarFallbackClass, children: avatarUrl ? /* @__PURE__ */ jsx(
|
|
88
|
+
"img",
|
|
89
|
+
{
|
|
90
|
+
src: avatarUrl,
|
|
91
|
+
alt: name,
|
|
92
|
+
className: videoTileAvatarCircleClass
|
|
93
|
+
}
|
|
94
|
+
) : /* @__PURE__ */ jsx("div", { className: videoTileAvatarCircleClass, "aria-hidden": "true", children: initials }) })
|
|
95
|
+
),
|
|
96
|
+
reaction != null && /* @__PURE__ */ jsx("div", { className: videoTileReactionBadgeClass, "aria-hidden": "true", children: reaction }),
|
|
97
|
+
/* @__PURE__ */ jsxs("div", { className: videoTileNameChipClass, children: [
|
|
98
|
+
/* @__PURE__ */ jsx("span", { children: `${name}${isMuted ? "" : ""}` }),
|
|
99
|
+
isMuted && /* @__PURE__ */ jsx("span", { className: videoTileMicIconClass, "aria-label": "Microphone muted", children: /* @__PURE__ */ jsxs(
|
|
100
|
+
"svg",
|
|
101
|
+
{
|
|
102
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
103
|
+
width: "12",
|
|
104
|
+
height: "12",
|
|
105
|
+
viewBox: "0 0 24 24",
|
|
106
|
+
fill: "none",
|
|
107
|
+
stroke: "currentColor",
|
|
108
|
+
strokeWidth: "2",
|
|
109
|
+
strokeLinecap: "round",
|
|
110
|
+
strokeLinejoin: "round",
|
|
111
|
+
"aria-hidden": "true",
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ jsx("line", { x1: "2", y1: "2", x2: "22", y2: "22" }),
|
|
114
|
+
/* @__PURE__ */ jsx("path", { d: "M18.89 13.23A7.12 7.12 0 0 0 19 12v-2" }),
|
|
115
|
+
/* @__PURE__ */ jsx("path", { d: "M5 10v2a7 7 0 0 0 12 5" }),
|
|
116
|
+
/* @__PURE__ */ jsx("path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33" }),
|
|
117
|
+
/* @__PURE__ */ jsx("path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12" }),
|
|
118
|
+
/* @__PURE__ */ jsx("line", { x1: "12", y1: "19", x2: "12", y2: "22" })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
) })
|
|
122
|
+
] })
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
|
|
129
|
+
export {
|
|
130
|
+
VideoTile
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=chunk-H54FLNAF.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../video-tile/src/video-tile.ts", "../../video-tile/src/video-tile.styles.ts", "../../react-video-tile/src/video-tile.tsx"],
|
|
4
|
+
"sourcesContent": ["/** Microphone state for a video participant. */\nexport type VideoTileMicState = 'on' | 'muted'\n\n/** Data describing a video meeting participant tile. */\nexport interface VideoTileData {\n /** Unique participant identifier. */\n id: string\n /** Display name shown in the name chip. */\n name: string\n /** Current microphone state. Defaults to 'on'. */\n micState?: VideoTileMicState\n /** Whether the participant is currently speaking (active audio). */\n speaking?: boolean\n /** Whether the tile is pinned in the grid. */\n pinned?: boolean\n}\n\nexport interface VideoTileHeadlessProps {\n /** Whether the participant is actively speaking. */\n speaking?: boolean\n /** Whether the tile is pinned in the grid. */\n pinned?: boolean\n}\n\nexport interface VideoTileAPI {\n /** Data attributes for styling hooks — spread onto the tile container. */\n dataAttributes: {\n 'data-speaking': string\n 'data-pinned': string\n }\n /** ARIA props — spread onto the tile container. */\n ariaProps: {\n role: 'group'\n }\n}\n\n/**\n * Derive framework-agnostic data attributes and ARIA props for a VideoTile.\n *\n * Adapters spread `dataAttributes` and `ariaProps` onto the tile container so\n * CSS selectors and assistive technology can reflect the current participant\n * state without coupling to a specific framework.\n */\nexport function createVideoTile(props: VideoTileHeadlessProps = {}): VideoTileAPI {\n const { speaking = false, pinned = false } = props\n\n return {\n dataAttributes: {\n 'data-speaking': speaking ? 'true' : 'false',\n 'data-pinned': pinned ? 'true' : 'false',\n },\n ariaProps: {\n role: 'group',\n },\n }\n}\n\n/**\n * Derive up to two uppercase initials from a display name.\n *\n * Splits on whitespace and takes the first character of the first two words.\n * Single-word names produce a single initial.\n *\n * @example\n * getInitials('Maya Goldberg') // 'MG'\n * getInitials('Alice') // 'A'\n */\nexport function getInitials(name: string): string {\n const words = name.trim().split(/\\s+/).filter(Boolean)\n return words\n .slice(0, 2)\n .map((w) => w[0].toUpperCase())\n .join('')\n}\n", "import { cva } from '@refraction-ui/shared'\n\n/**\n * Root tile container — aspect-video, rounded corners, clipped media.\n *\n * `speaking` variant adds a visible ring to indicate active audio.\n * `pinned` variant adds a stronger ring to mark a pinned participant.\n *\n * cva boolean-like variants use string values ('true'/'false') per the\n * refraction-ui convention — callers must pass strings, not raw booleans.\n */\nexport const videoTileVariants = cva({\n base: [\n 'relative aspect-video overflow-hidden rounded-lg bg-muted',\n 'transition-shadow duration-200',\n ].join(' '),\n variants: {\n speaking: {\n 'true': 'ring-2 ring-emerald-500 dark:ring-emerald-400 ring-offset-2 ring-offset-background',\n 'false': '',\n },\n pinned: {\n 'true': 'ring-2 ring-primary ring-offset-2 ring-offset-background',\n 'false': '',\n },\n },\n defaultVariants: {\n speaking: 'false',\n pinned: 'false',\n },\n})\n\n/**\n * Name chip anchored to the bottom-left of the tile.\n * Semi-transparent bg keeps it legible over any media content.\n */\nexport const videoTileNameChipClass =\n 'absolute bottom-2 left-2 flex items-center gap-1.5 rounded-md bg-background/70 px-2 py-0.5 text-xs font-medium text-foreground backdrop-blur-sm'\n\n/**\n * Mic-muted icon container — sits inside the name chip at the trailing edge.\n */\nexport const videoTileMicIconClass = 'text-destructive'\n\n/**\n * Avatar fallback circle — centred in the tile when no media stream is available.\n */\nexport const videoTileAvatarFallbackClass =\n 'absolute inset-0 flex items-center justify-center'\n\n/** Inner circle with initials. */\nexport const videoTileAvatarCircleClass =\n 'flex size-16 items-center justify-center rounded-full bg-card text-foreground text-xl font-semibold select-none'\n\n/**\n * Reaction badge slot — anchored to the top-right corner.\n */\nexport const videoTileReactionBadgeClass =\n 'absolute right-2 top-2 flex items-center justify-center rounded-full bg-background/70 px-1.5 py-0.5 text-sm backdrop-blur-sm'\n", "import * as React from 'react'\nimport {\n createVideoTile,\n getInitials,\n videoTileVariants,\n videoTileNameChipClass,\n videoTileMicIconClass,\n videoTileAvatarFallbackClass,\n videoTileAvatarCircleClass,\n videoTileReactionBadgeClass,\n type VideoTileMicState,\n type VideoTileData,\n} from '@refraction-ui/video-tile'\nimport { cn } from '@refraction-ui/shared'\n\nexport type { VideoTileMicState, VideoTileData }\n\nexport interface VideoTileProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content' | 'color'> {\n /** Participant display name — shown in the name chip and used for initials. */\n name: string\n /** Current microphone state. Defaults to 'on'. */\n micState?: VideoTileMicState\n /** Whether the participant is actively speaking. Adds an emerald ring. */\n speaking?: boolean\n /** Whether the tile is pinned in the grid. Adds a primary ring. */\n pinned?: boolean\n /** URL of the participant's avatar image, used in the fallback circle. */\n avatarUrl?: string\n /**\n * Media slot — pass a `<video>` element (or any ReactNode) to render as the\n * tile's background media layer. When omitted, an avatar fallback is shown.\n */\n mediaSlot?: React.ReactNode\n /** Optional emoji/reaction badge rendered at the top-right of the tile. */\n reaction?: React.ReactNode\n}\n\n/**\n * VideoTile — a single participant tile for a video meeting grid.\n *\n * Renders a `role=\"group\"` container with an aspect-video aspect ratio.\n * If a `mediaSlot` is provided it fills the tile; otherwise an avatar fallback\n * with initials is centred on a muted background.\n *\n * Overlays:\n * - Name chip (bottom-left) with optional mic-muted indicator\n * - Speaking ring (emerald) when `speaking` is true\n * - Pinned ring (primary) when `pinned` is true\n * - Reaction badge (top-right) when `reaction` is provided\n *\n * Logic and styles come from the headless `@refraction-ui/video-tile` core.\n */\nexport const VideoTile = React.forwardRef<HTMLDivElement, VideoTileProps>(\n function VideoTile(\n {\n name,\n micState = 'on',\n speaking = false,\n pinned = false,\n avatarUrl,\n mediaSlot,\n reaction,\n className,\n ...props\n },\n ref,\n ) {\n const api = createVideoTile({ speaking, pinned })\n const initials = getInitials(name)\n const isMuted = micState === 'muted'\n\n return (\n <div\n ref={ref}\n className={cn(\n videoTileVariants({\n speaking: speaking ? 'true' : 'false',\n pinned: pinned ? 'true' : 'false',\n }),\n className,\n )}\n aria-label={name}\n {...api.ariaProps}\n {...api.dataAttributes}\n {...props}\n >\n {/* Media layer */}\n {mediaSlot != null ? (\n <div className=\"absolute inset-0 h-full w-full object-cover\">\n {mediaSlot}\n </div>\n ) : (\n /* Avatar fallback */\n <div className={videoTileAvatarFallbackClass}>\n {avatarUrl ? (\n <img\n src={avatarUrl}\n alt={name}\n className={videoTileAvatarCircleClass}\n />\n ) : (\n <div className={videoTileAvatarCircleClass} aria-hidden=\"true\">\n {initials}\n </div>\n )}\n </div>\n )}\n\n {/* Reaction badge (top-right) */}\n {reaction != null && (\n <div className={videoTileReactionBadgeClass} aria-hidden=\"true\">\n {reaction}\n </div>\n )}\n\n {/* Name chip (bottom-left) */}\n <div className={videoTileNameChipClass}>\n <span>{`${name}${isMuted ? '' : ''}`}</span>\n {isMuted && (\n <span className={videoTileMicIconClass} aria-label=\"Microphone muted\">\n {/* Inline SVG mic-off icon — no external icon dep */}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <line x1=\"2\" y1=\"2\" x2=\"22\" y2=\"22\" />\n <path d=\"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2\" />\n <path d=\"M5 10v2a7 7 0 0 0 12 5\" />\n <path d=\"M15 9.34V5a3 3 0 0 0-5.68-1.33\" />\n <path d=\"M9 9v3a3 3 0 0 0 5.12 2.12\" />\n <line x1=\"12\" y1=\"19\" x2=\"12\" y2=\"22\" />\n </svg>\n </span>\n )}\n </div>\n </div>\n )\n },\n)\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AA2CO,SAAS,gBAAgB,QAAgC,CAAA,GAAkB;AAChF,QAAM,EAAE,WAAW,OAAO,SAAS,MAAA,IAAU;AAE7C,SAAO;IACL,gBAAgB;MACd,iBAAiB,WAAW,SAAS;MACrC,eAAe,SAAS,SAAS;IAAA;IAEnC,WAAW;MACT,MAAM;IAAA;EACR;AAEJ;AAYO,SAAS,YAAY,MAAsB;AAChD,QAAM,QAAQ,KAAK,KAAA,EAAO,MAAM,KAAK,EAAE,OAAO,OAAO;AACrD,SAAO,MACJ,MAAM,GAAG,CAAC,EACV,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,YAAA,CAAa,EAC7B,KAAK,EAAE;AACZ;AC9DO,IAAM,oBAAoB,IAAI;EACnC,MAAM;IACJ;IACA;EAAA,EACA,KAAK,GAAG;EACV,UAAU;IACR,UAAU;MACR,QAAQ;MACR,SAAS;IAAA;IAEX,QAAQ;MACN,QAAQ;MACR,SAAS;IAAA;EACX;EAEF,iBAAiB;IACf,UAAU;IACV,QAAQ;EAAA;AAEZ,CAAC;AAMM,IAAM,yBACX;AAKK,IAAM,wBAAwB;AAK9B,IAAM,+BACX;AAGK,IAAM,6BACX;AAKK,IAAM,8BACX;;;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