accessibility-plugin-react 2.12.0 → 2.13.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/README.md +1 -0
- package/dist/index.d.mts +22 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.js +416 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +411 -72
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +54 -0
- package/docs/API.md +3 -3
- package/docs/BUILD_AND_RELEASE_PLAN.md +1 -1
- package/docs/FEATURES.md +1 -0
- package/docs/TOOLTIPS.md +102 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
AccessibilityContext: () => AccessibilityContext,
|
|
27
27
|
AccessibilityList: () => AccessibilityList,
|
|
28
28
|
AccessibilityPlugin: () => AccessibilityPlugin,
|
|
29
|
+
AccessibleTooltipsController: () => AccessibleTooltipsController,
|
|
29
30
|
BigCursorController: () => BigCursorController,
|
|
30
31
|
CONTRAST_MODES: () => CONTRAST_MODES,
|
|
31
32
|
CONTRAST_PALETTES: () => CONTRAST_PALETTES,
|
|
@@ -77,10 +78,13 @@ __export(index_exports, {
|
|
|
77
78
|
TextAlignController: () => TextAlignController,
|
|
78
79
|
TextScaleController: () => TextScaleController,
|
|
79
80
|
ToggleControl: () => ToggleControl,
|
|
81
|
+
TooltipsController: () => TooltipsController,
|
|
80
82
|
WordSpacingController: () => WordSpacingController,
|
|
81
83
|
createInitialPreferencesState: () => createInitialPreferencesState,
|
|
82
84
|
enLocale: () => enLocale,
|
|
85
|
+
enableAccessibleTooltips: () => enableAccessibleTooltips,
|
|
83
86
|
findMainLandmark: () => findMainLandmark,
|
|
87
|
+
getAuthoredDescription: () => getAuthoredDescription,
|
|
84
88
|
getScriptSpacingConstraints: () => getScriptSpacingConstraints,
|
|
85
89
|
hasFinePointer: () => hasFinePointer,
|
|
86
90
|
isEligibleDecorativeImage: () => isEligibleDecorativeImage,
|
|
@@ -96,6 +100,7 @@ __export(index_exports, {
|
|
|
96
100
|
normalizePreferenceValue: () => normalizePreferenceValue,
|
|
97
101
|
normalizePreferences: () => normalizePreferences,
|
|
98
102
|
nudgeReadingAid: () => nudgeReadingAid,
|
|
103
|
+
positionTooltip: () => positionTooltip,
|
|
99
104
|
preferencesReducer: () => preferencesReducer,
|
|
100
105
|
registerLocale: () => registerLocale,
|
|
101
106
|
resolveEffectivePreferences: () => resolveEffectivePreferences,
|
|
@@ -130,7 +135,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
// src/styles/tailwind.css
|
|
133
|
-
styleInject('.arap-root {\n --arap-surface: #fff;\n --arap-text: #111827;\n --arap-muted: #475569;\n --arap-border: #cbd5e1;\n --arap-divider: #e2e8f0;\n --arap-accent: #1d4ed8;\n --arap-accent-hover: #1e40af;\n --arap-selected: #eff6ff;\n --arap-control: #f8fafc;\n color-scheme: light;\n font: 15px/1.5 system-ui, sans-serif;\n color: var(--arap-text);\n text-align: left;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n.arap-skip-to-main {\n position: fixed;\n top: 12px;\n left: 16px;\n z-index: 2147483647;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n pointer-events: none;\n font-family: inherit;\n font-size: 0.9375rem;\n font-weight: 600;\n text-decoration: none;\n color: var(--arap-accent, #008060);\n background: var(--arap-surface, #ffffff);\n border-radius: 8px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n}\n.arap-skip-to-main:focus,\n.arap-skip-to-main:focus-visible {\n width: auto;\n height: auto;\n min-height: 44px;\n margin: 0;\n padding: 10px 18px;\n clip-path: none;\n overflow: visible;\n white-space: normal;\n pointer-events: auto;\n border: 2px solid var(--arap-accent, #008060);\n outline: 3px solid var(--arap-accent, #008060);\n outline-offset: 3px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n@media (forced-colors: active) {\n .arap-skip-to-main {\n background: Canvas;\n color: CanvasText;\n border-color: Highlight;\n }\n .arap-skip-to-main:focus,\n .arap-skip-to-main:focus-visible {\n outline: 3px solid Highlight;\n }\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-credits {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 2px;\n padding-top: 8px;\n color: var(--arap-muted);\n text-align: center;\n font-size: 11px;\n line-height: 1.4;\n}\n.arap-credits a {\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.arap-credits a:hover {\n color: var(--arap-accent-hover);\n}\n.arap-credits a:focus-visible {\n outline: 2px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n.arap-notice {\n grid-column: 1 / -1;\n margin-top: 6px;\n padding: 8px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 1.45;\n background: #fefce8;\n border: 1px solid #fef08a;\n color: #854d0e;\n}\n.arap-notice-warning {\n background: #fffbeb;\n border-color: #fde68a;\n color: #92400e;\n}\n.arap-reading-mask {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-reading-guide {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-feature-expandable {\n flex-direction: column !important;\n align-items: stretch !important;\n}\n');
|
|
138
|
+
styleInject('.arap-root {\n --arap-surface: #fff;\n --arap-text: #111827;\n --arap-muted: #475569;\n --arap-border: #cbd5e1;\n --arap-divider: #e2e8f0;\n --arap-accent: #1d4ed8;\n --arap-accent-hover: #1e40af;\n --arap-selected: #eff6ff;\n --arap-control: #f8fafc;\n color-scheme: light;\n font: 15px/1.5 system-ui, sans-serif;\n color: var(--arap-text);\n text-align: left;\n letter-spacing: normal;\n}\n.arap-root *,\n.arap-root *::before,\n.arap-root *::after {\n box-sizing: border-box;\n}\n.arap-root button {\n font: inherit;\n cursor: pointer;\n color: inherit;\n text-transform: none;\n letter-spacing: normal;\n transition: background-color 0.15s, border-color 0.15s;\n}\n.arap-root button:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n.arap-root button:focus-visible,\n.arap-panel:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 3px;\n}\n.arap-root .arap-btn {\n position: fixed;\n z-index: 2147483001;\n bottom: max(16px, env(safe-area-inset-bottom));\n right: max(16px, env(safe-area-inset-right));\n width: 56px;\n height: 56px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px solid var(--arap-surface);\n border-radius: 50%;\n background: var(--arap-accent);\n color: #fff;\n box-shadow: 0 4px 12px #0f172a26, 0 10px 24px #0f172a14;\n}\n.arap-root .arap-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-root .arap-btn[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-position=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-panel {\n position: fixed;\n z-index: 2147483000;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n right: max(16px, env(safe-area-inset-right));\n width: min(400px, calc(100vw - 32px));\n max-height: calc(100vh - 120px);\n max-height: calc(100dvh - 120px - env(safe-area-inset-bottom));\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 20px;\n border: 1px solid var(--arap-divider);\n border-radius: 16px;\n background: var(--arap-surface);\n box-shadow: 0 8px 16px #0f172a0d, 0 20px 48px #0f172a1a;\n}\n.arap-root .arap-panel[hidden] {\n display: none !important;\n}\n.arap-root .arap-panel[data-position=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-panel[data-position=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-heading {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 8px;\n padding-bottom: 18px;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-heading-copy {\n min-width: 0;\n}\n.arap-heading h2 {\n margin: 0;\n font: 700 22px/1.3 system-ui, sans-serif;\n letter-spacing: -0.025em;\n color: var(--arap-text);\n overflow-wrap: anywhere;\n}\n.arap-description {\n margin: 6px 0 0;\n color: var(--arap-muted);\n font: 14px/1.5 system-ui, sans-serif;\n overflow-wrap: anywhere;\n}\n.arap-heading button {\n flex: none;\n width: 44px;\n height: 44px;\n margin-top: -6px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--arap-muted);\n font-size: 28px;\n line-height: 1;\n}\n.arap-heading button:hover {\n background: var(--arap-control);\n border-color: var(--arap-border);\n}\n.arap-feature {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px 12px;\n padding: 18px 0;\n border-bottom: 1px solid var(--arap-divider);\n}\n.arap-feature:last-child {\n border: 0;\n padding-bottom: 0;\n}\n.arap-label {\n display: flex;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.arap-icon {\n flex: none;\n width: 22px;\n height: 22px;\n display: inline-block;\n vertical-align: middle;\n}\n.arap-controls {\n display: flex;\n align-items: stretch;\n border: 1px solid var(--arap-border);\n border-radius: 9px;\n overflow: hidden;\n background: var(--arap-control);\n}\n.arap-root .arap-btn-sm {\n flex: none;\n width: 44px;\n height: 44px;\n border: 0;\n border-radius: 0;\n background: transparent;\n font-size: 22px;\n}\n.arap-root .arap-btn-sm:hover:not(:disabled) {\n background: var(--arap-selected);\n color: var(--arap-accent);\n}\n.arap-root .arap-controls button:focus-visible {\n outline-offset: -4px;\n}\n.arap-value {\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 56px;\n padding: 0 6px;\n text-align: center;\n font-weight: 600;\n border-inline: 1px solid var(--arap-divider);\n background: var(--arap-surface);\n}\n.arap-segmented {\n grid-column: 1 / -1;\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n min-width: 0;\n}\n.arap-root .arap-segment {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-muted);\n overflow-wrap: anywhere;\n}\n.arap-root .arap-segment:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-root .arap-segment-active {\n background: var(--arap-accent);\n color: #fff;\n border-color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-segment-active:hover {\n background: var(--arap-accent-hover);\n color: #fff;\n}\n.arap-check {\n flex: none;\n font-size: 15px;\n line-height: 1;\n}\n.arap-root .arap-toggle {\n position: relative;\n width: 56px;\n height: 44px;\n padding: 0;\n border: 0;\n border-radius: 10px;\n background: transparent;\n}\n.arap-toggle::before {\n content: "";\n position: absolute;\n inset: 6px 0;\n border: 2px solid #64748b;\n border-radius: 20px;\n background: #e2e8f0;\n}\n.arap-toggle-knob {\n position: absolute;\n top: 10px;\n left: 4px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background: #475569;\n pointer-events: none;\n transition: transform 0.15s;\n}\n.arap-toggle-active::before {\n background: var(--arap-accent);\n border-color: var(--arap-accent);\n}\n.arap-toggle-active .arap-toggle-knob {\n transform: translateX(24px);\n background: #fff;\n}\n.arap-toggle-active .arap-toggle-knob::after {\n content: "\\2713";\n display: block;\n color: var(--arap-accent);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n text-align: center;\n}\n.arap-root .arap-toggle:hover::before {\n border-color: var(--arap-accent);\n}\n.arap-feature-reset {\n display: block;\n}\n.arap-root .arap-reset-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n width: 100%;\n min-height: 48px;\n padding: 10px;\n border: 1px solid var(--arap-border);\n border-radius: 10px;\n background: var(--arap-control);\n color: var(--arap-accent);\n font-weight: 600;\n}\n.arap-root .arap-reset-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n@media (max-width: 380px) {\n .arap-root .arap-panel {\n padding: 16px;\n }\n .arap-heading h2 {\n font-size: 20px;\n }\n .arap-feature-stepper {\n grid-template-columns: minmax(0, 1fr);\n }\n .arap-controls {\n width: 100%;\n }\n .arap-value {\n flex: 1;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .arap-root *,\n .arap-root *::before,\n .arap-root *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .arap-root {\n --arap-surface: Canvas;\n --arap-text: CanvasText;\n --arap-muted: CanvasText;\n --arap-border: ButtonText;\n --arap-divider: ButtonText;\n --arap-accent: Highlight;\n --arap-control: Canvas;\n --arap-selected: Canvas;\n }\n .arap-root button[aria-pressed=true] {\n outline: 2px solid Highlight;\n outline-offset: -4px;\n }\n .arap-root .arap-segment-active {\n color: HighlightText;\n background: Highlight;\n }\n .arap-toggle::before {\n border-color: ButtonText;\n background: Canvas;\n }\n .arap-toggle-knob {\n background: ButtonText;\n }\n .arap-toggle-active .arap-toggle-knob {\n background: Highlight;\n }\n .arap-toggle-active .arap-toggle-knob::after {\n color: HighlightText;\n }\n}\n.arap-root .arap-panel {\n display: flex;\n flex-direction: column;\n overflow: visible;\n}\n.arap-heading {\n flex: none;\n}\n.arap-tools {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n scrollbar-width: thin;\n scrollbar-color: var(--arap-border) transparent;\n padding: 0 3px;\n margin: 0 -3px;\n}\n.arap-tools:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: -3px;\n}\n.arap-quick-actions {\n position: relative;\n flex: none;\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 14px;\n margin-top: 8px;\n border-top: 1px solid var(--arap-divider);\n}\n.arap-actions {\n flex: 1;\n min-width: 0;\n}\n.arap-actions:empty {\n display: none;\n}\n.arap-actions .arap-feature-reset {\n padding: 0;\n margin: 0;\n border: 0;\n}\n.arap-root .arap-position-button,\n.arap-root .arap-position-default,\n.arap-root .arap-position-arrows button {\n min-width: 44px;\n min-height: 44px;\n padding: 8px 10px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n color: var(--arap-accent);\n}\n.arap-root .arap-position-button:hover,\n.arap-root .arap-position-default:hover,\n.arap-root .arap-position-arrows button:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n}\n.arap-position-popover {\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 0;\n width: 100%;\n max-height: calc(100dvh - 160px);\n overflow: auto;\n padding: 14px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n box-shadow: 0 8px 24px #0f172a26;\n}\n.arap-position-popover[hidden] {\n display: none !important;\n}\n.arap-position-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.arap-position-popover select {\n width: 100%;\n min-height: 44px;\n padding: 8px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n font: inherit;\n color: var(--arap-text);\n background: var(--arap-surface);\n}\n.arap-position-popover select:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-position-arrows {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 10px;\n}\n.arap-position-default {\n width: 100%;\n margin-top: 8px;\n}\n.arap-root .arap-btn[data-draggable=true] {\n touch-action: none;\n user-select: none;\n cursor: grab;\n}\n.arap-root .arap-btn[data-dragging=true] {\n cursor: grabbing;\n}\n.arap-root .arap-btn[data-corner$=left],\n.arap-root .arap-panel[data-corner$=left] {\n right: auto;\n left: max(16px, env(safe-area-inset-left));\n}\n.arap-root .arap-btn[data-corner$=right],\n.arap-root .arap-panel[data-corner$=right] {\n left: auto;\n right: max(16px, env(safe-area-inset-right));\n}\n.arap-root .arap-btn[data-corner^=top] {\n bottom: auto;\n top: max(16px, env(safe-area-inset-top));\n}\n.arap-root .arap-btn[data-corner^=bottom] {\n top: auto;\n bottom: max(16px, env(safe-area-inset-bottom));\n}\n.arap-root .arap-panel[data-corner^=top] {\n bottom: auto;\n top: max(88px, calc(env(safe-area-inset-top) + 72px));\n}\n.arap-root .arap-panel[data-corner^=bottom] {\n top: auto;\n bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));\n}\n.arap-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.arap-root .arap-skip-actions {\n position: absolute;\n top: 12px;\n left: 20px;\n width: 44px;\n height: 44px;\n clip-path: inset(50%);\n overflow: hidden;\n pointer-events: none;\n}\n.arap-root .arap-skip-actions:focus-visible {\n right: 20px;\n width: auto;\n height: auto;\n min-height: 44px;\n clip-path: none;\n pointer-events: auto;\n z-index: 2;\n padding: 8px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-accent);\n}\n.arap-skip-to-main {\n position: fixed;\n top: 12px;\n left: 16px;\n z-index: 2147483647;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n pointer-events: none;\n font-family: inherit;\n font-size: 0.9375rem;\n font-weight: 600;\n text-decoration: none;\n color: var(--arap-accent, #008060);\n background: var(--arap-surface, #ffffff);\n border-radius: 8px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n}\n.arap-skip-to-main:focus,\n.arap-skip-to-main:focus-visible {\n width: auto;\n height: auto;\n min-height: 44px;\n margin: 0;\n padding: 10px 18px;\n clip-path: none;\n overflow: visible;\n white-space: normal;\n pointer-events: auto;\n border: 2px solid var(--arap-accent, #008060);\n outline: 3px solid var(--arap-accent, #008060);\n outline-offset: 3px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n@media (forced-colors: active) {\n .arap-skip-to-main {\n background: Canvas;\n color: CanvasText;\n border-color: Highlight;\n }\n .arap-skip-to-main:focus,\n .arap-skip-to-main:focus-visible {\n outline: 3px solid Highlight;\n }\n}\n@media (max-height: 480px) {\n .arap-root .arap-panel {\n top: max(16px, env(safe-area-inset-top)) !important;\n bottom: max(16px, env(safe-area-inset-bottom)) !important;\n max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;\n padding: 8px;\n }\n .arap-heading {\n padding-bottom: 8px;\n }\n .arap-heading h2 {\n font-size: 18px;\n }\n .arap-heading button {\n margin-top: 0;\n }\n .arap-description {\n display: none;\n }\n .arap-quick-actions {\n padding-top: 8px;\n margin-top: 0;\n }\n .arap-root .arap-reset-btn {\n min-height: 44px;\n }\n .arap-root .arap-btn[data-open=true] {\n visibility: hidden;\n }\n .arap-position-popover {\n max-height: calc(100dvh - 96px);\n }\n}\n.arap-statement {\n flex: none;\n padding-top: 10px;\n text-align: center;\n}\n.arap-statement-link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: 44px;\n padding: 6px 12px;\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 4px;\n font-size: 14px;\n font-weight: 500;\n border-radius: 8px;\n}\n.arap-statement-link:hover {\n color: var(--arap-accent-hover);\n background: var(--arap-selected);\n}\n.arap-statement-link:focus-visible {\n outline: 3px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-credits {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 2px;\n padding-top: 8px;\n color: var(--arap-muted);\n text-align: center;\n font-size: 11px;\n line-height: 1.4;\n}\n.arap-credits a {\n color: var(--arap-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.arap-credits a:hover {\n color: var(--arap-accent-hover);\n}\n.arap-credits a:focus-visible {\n outline: 2px solid var(--arap-accent);\n outline-offset: 2px;\n}\n.arap-root .arap-btn[data-large-controls=true] {\n width: 64px;\n height: 64px;\n min-width: 48px;\n min-height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] {\n width: min(440px, calc(100vw - 32px));\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-heading button {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 32px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-btn-sm {\n width: 48px;\n height: 48px;\n min-width: 48px;\n min-height: 48px;\n font-size: 24px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-value {\n min-width: 64px;\n font-size: 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-segment {\n min-width: 48px;\n min-height: 48px;\n padding: 10px 14px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle {\n width: 64px;\n height: 48px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle::before {\n inset: 8px 0;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-knob {\n top: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-toggle-active .arap-toggle-knob {\n transform: translateX(28px);\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-reset-btn {\n min-height: 52px;\n font-size: 16px;\n padding: 12px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-button,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-default,\n.arap-root .arap-panel[data-large-controls=true] .arap-position-arrows button {\n min-width: 48px;\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-position-popover select {\n min-height: 48px;\n font-size: 15px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-statement-link {\n min-height: 48px;\n font-size: 15px;\n padding: 10px 16px;\n}\n.arap-root .arap-panel[data-large-controls=true] .arap-skip-actions {\n min-width: 48px;\n min-height: 48px;\n}\n.arap-feature-card {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 12px;\n}\n.arap-card-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-card-title {\n font-weight: 600;\n font-size: 15px;\n color: var(--arap-text);\n}\n.arap-card-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-status-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 9999px;\n font-size: 11px;\n font-weight: 600;\n background: var(--arap-control);\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-card-alert {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13px;\n line-height: 1.4;\n}\n.arap-alert-icon {\n flex: none;\n font-size: 16px;\n line-height: 1;\n}\n.arap-card-error {\n background: #fef2f2;\n border: 1px solid #fecaca;\n color: #991b1b;\n}\n.arap-card-unavailable {\n background: #f8fafc;\n border: 1px solid var(--arap-border);\n color: var(--arap-muted);\n}\n.arap-card-permission {\n background: #fffbeb;\n border: 1px solid #fde68a;\n color: #92400e;\n}\n.arap-permission-content {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-permission-btn {\n align-self: flex-start;\n padding: 4px 10px;\n border: 1px solid #d97706;\n border-radius: 6px;\n background: #f59e0b;\n color: #fff;\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n}\n.arap-permission-btn:hover {\n background: #d97706;\n}\n.arap-card-content {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.arap-choice-group {\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 100%;\n}\n.arap-choice-group-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-choice-badge {\n font-size: 11px;\n padding: 1px 5px;\n border-radius: 4px;\n background: var(--arap-divider);\n color: var(--arap-muted);\n}\n.arap-segment-active .arap-choice-badge {\n background: rgba(255, 255, 255, 0.25);\n color: #fff;\n}\n.arap-stepper-control-wrapper {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n}\n.arap-slider-container {\n display: flex;\n align-items: center;\n padding: 4px 0;\n}\n.arap-slider {\n width: 100%;\n accent-color: var(--arap-accent);\n cursor: pointer;\n}\n.arap-search-count {\n padding: 6px 0;\n font-size: 12px;\n font-weight: 500;\n color: var(--arap-muted);\n}\n.arap-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 24px 16px;\n gap: 8px;\n}\n.arap-empty-icon {\n font-size: 32px;\n}\n.arap-empty-title {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-empty-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n}\n.arap-empty-btn,\n.arap-retry-btn {\n margin-top: 6px;\n padding: 8px 16px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-control);\n font-weight: 500;\n font-size: 13px;\n color: var(--arap-text);\n cursor: pointer;\n}\n.arap-empty-btn:hover,\n.arap-retry-btn:hover {\n background: var(--arap-selected);\n border-color: var(--arap-accent);\n color: var(--arap-accent);\n}\n.arap-profile-card {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 16px;\n border: 1px solid var(--arap-border);\n border-radius: 12px;\n background: var(--arap-surface);\n transition: border-color 0.15s, box-shadow 0.15s;\n}\n.arap-profile-card-active {\n border-color: var(--arap-accent);\n background: var(--arap-selected);\n box-shadow: 0 0 0 1px var(--arap-accent);\n}\n.arap-profile-header {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.arap-profile-title-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.arap-profile-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--arap-text);\n}\n.arap-profile-active-badge {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-accent);\n background: #dbeafe;\n padding: 2px 8px;\n border-radius: 9999px;\n}\n.arap-profile-desc {\n margin: 0;\n font-size: 13px;\n color: var(--arap-muted);\n line-height: 1.4;\n}\n.arap-profile-affected {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.arap-profile-affected-label {\n font-size: 11px;\n font-weight: 600;\n color: var(--arap-muted);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n}\n.arap-profile-chips {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n.arap-profile-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--arap-control);\n border: 1px solid var(--arap-divider);\n font-size: 12px;\n color: var(--arap-text);\n}\n.arap-profile-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n.arap-profile-apply-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-accent);\n border-radius: 8px;\n background: var(--arap-accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-apply-btn:hover {\n background: var(--arap-accent-hover);\n}\n.arap-profile-revert-btn {\n flex: 1;\n padding: 8px 14px;\n border: 1px solid var(--arap-border);\n border-radius: 8px;\n background: var(--arap-surface);\n color: var(--arap-muted);\n font-size: 13px;\n font-weight: 600;\n cursor: pointer;\n text-align: center;\n}\n.arap-profile-revert-btn:hover {\n background: var(--arap-control);\n color: var(--arap-text);\n border-color: var(--arap-text);\n}\n.arap-notice {\n grid-column: 1 / -1;\n margin-top: 6px;\n padding: 8px 12px;\n border-radius: 8px;\n font-size: 12px;\n line-height: 1.45;\n background: #fefce8;\n border: 1px solid #fef08a;\n color: #854d0e;\n}\n.arap-notice-warning {\n background: #fffbeb;\n border-color: #fde68a;\n color: #92400e;\n}\n.arap-reading-mask {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-reading-guide {\n position: fixed !important;\n left: 0 !important;\n right: 0 !important;\n pointer-events: none !important;\n user-select: none !important;\n -webkit-user-select: none !important;\n touch-action: none !important;\n z-index: 2147482999 !important;\n}\n.arap-feature-expandable {\n flex-direction: column !important;\n align-items: stretch !important;\n}\n.arap-accessible-tooltip {\n position: fixed !important;\n z-index: 2147483646 !important;\n max-width: 320px !important;\n min-width: 48px !important;\n box-sizing: border-box !important;\n padding: 6px 12px !important;\n background: #0f172a !important;\n color: #ffffff !important;\n font-family:\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif !important;\n font-size: 13px !important;\n line-height: 1.4 !important;\n font-weight: 500 !important;\n border-radius: 6px !important;\n box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.15) !important;\n pointer-events: auto !important;\n word-break: break-word !important;\n white-space: normal !important;\n opacity: 0 !important;\n visibility: hidden !important;\n transition: opacity 120ms ease, transform 120ms ease !important;\n transform: translateY(2px) !important;\n}\n.arap-accessible-tooltip[data-visible=true] {\n opacity: 1 !important;\n visibility: visible !important;\n transform: translateY(0) !important;\n}\n.arap-accessible-tooltip[data-placement=top] {\n transform: translateY(-2px) !important;\n}\n.arap-accessible-tooltip[data-placement=top][data-visible=true] {\n transform: translateY(0) !important;\n}\n@media (forced-colors: active) {\n .arap-accessible-tooltip {\n background: Canvas !important;\n color: CanvasText !important;\n border: 2px solid Highlight !important;\n box-shadow: none !important;\n }\n}\n');
|
|
134
139
|
|
|
135
140
|
// src/core/AccessibilityPlugin.tsx
|
|
136
141
|
var import_react4 = require("react");
|
|
@@ -438,7 +443,9 @@ for (const key of [
|
|
|
438
443
|
"readingGuide",
|
|
439
444
|
"highlightFocus",
|
|
440
445
|
"focusHighlight",
|
|
441
|
-
"reduceMotion"
|
|
446
|
+
"reduceMotion",
|
|
447
|
+
"tooltips",
|
|
448
|
+
"accessibleTooltips"
|
|
442
449
|
]) {
|
|
443
450
|
builtins[key] = {
|
|
444
451
|
defaultValue: false,
|
|
@@ -1593,6 +1600,274 @@ function useBuiltinEffects(values, onDisable) {
|
|
|
1593
1600
|
if (!values.readingGuide) return;
|
|
1594
1601
|
return readingAid(false, 4, onDisable);
|
|
1595
1602
|
}, [values.readingGuide, onDisable]);
|
|
1603
|
+
(0, import_react3.useEffect)(() => {
|
|
1604
|
+
if (!values.tooltips && !values.accessibleTooltips) return;
|
|
1605
|
+
return enableAccessibleTooltips();
|
|
1606
|
+
}, [values.tooltips, values.accessibleTooltips]);
|
|
1607
|
+
}
|
|
1608
|
+
var SENSITIVE_AUTOCOMPLETE_PATTERN = /password|credit-card|cc-|card-|security-code|cvc|cvv|one-time-code/i;
|
|
1609
|
+
function getAuthoredDescription(element) {
|
|
1610
|
+
if (!(element instanceof HTMLElement || element instanceof SVGElement)) {
|
|
1611
|
+
return null;
|
|
1612
|
+
}
|
|
1613
|
+
if (element.closest("[data-arap-ui]")) {
|
|
1614
|
+
return null;
|
|
1615
|
+
}
|
|
1616
|
+
if (element.matches("script, style, link, meta, noscript, template")) {
|
|
1617
|
+
return null;
|
|
1618
|
+
}
|
|
1619
|
+
if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement) {
|
|
1620
|
+
if (element instanceof HTMLInputElement && element.type === "password") {
|
|
1621
|
+
return null;
|
|
1622
|
+
}
|
|
1623
|
+
const ac = element.getAttribute("autocomplete");
|
|
1624
|
+
if (ac && SENSITIVE_AUTOCOMPLETE_PATTERN.test(ac)) {
|
|
1625
|
+
return null;
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
if (element.getAttribute("data-sensitive") === "true") {
|
|
1629
|
+
return null;
|
|
1630
|
+
}
|
|
1631
|
+
if (element.getAttribute("aria-hidden") === "true" || element.getAttribute("role") === "presentation" || element.getAttribute("role") === "none") {
|
|
1632
|
+
return null;
|
|
1633
|
+
}
|
|
1634
|
+
const ariaDesc = element.getAttribute("aria-description")?.trim();
|
|
1635
|
+
let describedByText = "";
|
|
1636
|
+
const describedBy = element.getAttribute("aria-describedby");
|
|
1637
|
+
if (describedBy) {
|
|
1638
|
+
const ids = describedBy.trim().split(/\s+/);
|
|
1639
|
+
const parts = [];
|
|
1640
|
+
for (const id of ids) {
|
|
1641
|
+
const target = document.getElementById(id);
|
|
1642
|
+
if (target) {
|
|
1643
|
+
const text = target.textContent?.trim();
|
|
1644
|
+
if (text) parts.push(text);
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
if (parts.length > 0) {
|
|
1648
|
+
describedByText = parts.join(" ");
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
const explicitDesc = ariaDesc || describedByText || null;
|
|
1652
|
+
const ariaLabel = element.getAttribute("aria-label")?.trim() || null;
|
|
1653
|
+
const visibleText = (element.textContent || "").trim();
|
|
1654
|
+
const alt = element instanceof HTMLImageElement || element instanceof HTMLAreaElement || element instanceof HTMLInputElement && element.type === "image" ? element.getAttribute("alt")?.trim() || null : null;
|
|
1655
|
+
const title = element.getAttribute("title")?.trim() || null;
|
|
1656
|
+
if (explicitDesc) {
|
|
1657
|
+
if (ariaLabel && ariaLabel.toLowerCase() !== visibleText.toLowerCase() && ariaLabel.toLowerCase() !== explicitDesc.toLowerCase()) {
|
|
1658
|
+
return `${ariaLabel} \u2014 ${explicitDesc}`;
|
|
1659
|
+
}
|
|
1660
|
+
if (explicitDesc.toLowerCase() !== visibleText.toLowerCase()) {
|
|
1661
|
+
return explicitDesc;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
if (ariaLabel && ariaLabel.toLowerCase() !== visibleText.toLowerCase()) {
|
|
1665
|
+
return ariaLabel;
|
|
1666
|
+
}
|
|
1667
|
+
if (alt && alt !== "") {
|
|
1668
|
+
return alt;
|
|
1669
|
+
}
|
|
1670
|
+
if (title && title.toLowerCase() !== visibleText.toLowerCase()) {
|
|
1671
|
+
return title;
|
|
1672
|
+
}
|
|
1673
|
+
return null;
|
|
1674
|
+
}
|
|
1675
|
+
function positionTooltip(tooltip, target) {
|
|
1676
|
+
const rect = target.getBoundingClientRect();
|
|
1677
|
+
const tooltipRect = tooltip.getBoundingClientRect();
|
|
1678
|
+
const tooltipWidth = tooltipRect.width || tooltip.offsetWidth || 180;
|
|
1679
|
+
const tooltipHeight = tooltipRect.height || tooltip.offsetHeight || 32;
|
|
1680
|
+
const gap = 8;
|
|
1681
|
+
const vw = typeof window !== "undefined" && window.innerWidth || document.documentElement.clientWidth || 800;
|
|
1682
|
+
const vh = typeof window !== "undefined" && window.innerHeight || document.documentElement.clientHeight || 600;
|
|
1683
|
+
let placement = "top";
|
|
1684
|
+
let top = rect.top - tooltipHeight - gap;
|
|
1685
|
+
if (top < gap) {
|
|
1686
|
+
top = rect.bottom + gap;
|
|
1687
|
+
placement = "bottom";
|
|
1688
|
+
}
|
|
1689
|
+
if (top + tooltipHeight > vh - gap) {
|
|
1690
|
+
top = Math.max(gap, vh - tooltipHeight - gap);
|
|
1691
|
+
}
|
|
1692
|
+
let left = rect.left + (rect.width - tooltipWidth) / 2;
|
|
1693
|
+
left = Math.max(gap, Math.min(vw - tooltipWidth - gap, left));
|
|
1694
|
+
tooltip.style.top = `${Math.round(top)}px`;
|
|
1695
|
+
tooltip.style.left = `${Math.round(left)}px`;
|
|
1696
|
+
tooltip.setAttribute("data-placement", placement);
|
|
1697
|
+
}
|
|
1698
|
+
function enableAccessibleTooltips() {
|
|
1699
|
+
if (typeof document === "undefined") return () => {
|
|
1700
|
+
};
|
|
1701
|
+
let tooltipEl = document.createElement("div");
|
|
1702
|
+
tooltipEl.className = "arap-accessible-tooltip";
|
|
1703
|
+
tooltipEl.setAttribute("role", "presentation");
|
|
1704
|
+
tooltipEl.setAttribute("aria-hidden", "true");
|
|
1705
|
+
tooltipEl.setAttribute("data-arap-ui", "true");
|
|
1706
|
+
document.body.appendChild(tooltipEl);
|
|
1707
|
+
let activeTarget = null;
|
|
1708
|
+
let dismissedTarget = null;
|
|
1709
|
+
let hideTimeout = null;
|
|
1710
|
+
let isPointerOverTooltip = false;
|
|
1711
|
+
function show(target, text) {
|
|
1712
|
+
if (hideTimeout) {
|
|
1713
|
+
clearTimeout(hideTimeout);
|
|
1714
|
+
hideTimeout = null;
|
|
1715
|
+
}
|
|
1716
|
+
activeTarget = target;
|
|
1717
|
+
if (!tooltipEl || !document.body.contains(tooltipEl)) {
|
|
1718
|
+
tooltipEl = document.createElement("div");
|
|
1719
|
+
tooltipEl.className = "arap-accessible-tooltip";
|
|
1720
|
+
tooltipEl.setAttribute("role", "presentation");
|
|
1721
|
+
tooltipEl.setAttribute("aria-hidden", "true");
|
|
1722
|
+
tooltipEl.setAttribute("data-arap-ui", "true");
|
|
1723
|
+
document.body.appendChild(tooltipEl);
|
|
1724
|
+
}
|
|
1725
|
+
tooltipEl.textContent = text;
|
|
1726
|
+
tooltipEl.setAttribute("data-visible", "true");
|
|
1727
|
+
positionTooltip(tooltipEl, target);
|
|
1728
|
+
}
|
|
1729
|
+
function hide(immediate = false) {
|
|
1730
|
+
if (hideTimeout) {
|
|
1731
|
+
clearTimeout(hideTimeout);
|
|
1732
|
+
hideTimeout = null;
|
|
1733
|
+
}
|
|
1734
|
+
const doHide = () => {
|
|
1735
|
+
if (isPointerOverTooltip) return;
|
|
1736
|
+
if (tooltipEl) {
|
|
1737
|
+
tooltipEl.removeAttribute("data-visible");
|
|
1738
|
+
tooltipEl.style.top = "-9999px";
|
|
1739
|
+
tooltipEl.style.left = "-9999px";
|
|
1740
|
+
}
|
|
1741
|
+
activeTarget = null;
|
|
1742
|
+
};
|
|
1743
|
+
if (immediate) {
|
|
1744
|
+
doHide();
|
|
1745
|
+
} else {
|
|
1746
|
+
hideTimeout = setTimeout(doHide, 100);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
function findTargetWithDescription(node) {
|
|
1750
|
+
if (!(node instanceof Element)) return null;
|
|
1751
|
+
if (node.closest("[data-arap-ui]")) return null;
|
|
1752
|
+
let curr = node;
|
|
1753
|
+
while (curr && curr !== document.body && curr !== document.documentElement) {
|
|
1754
|
+
const desc = getAuthoredDescription(curr);
|
|
1755
|
+
if (desc) return { element: curr, text: desc };
|
|
1756
|
+
curr = curr.parentElement;
|
|
1757
|
+
}
|
|
1758
|
+
return null;
|
|
1759
|
+
}
|
|
1760
|
+
const handlePointerOver = (event) => {
|
|
1761
|
+
if (tooltipEl && (event.target === tooltipEl || tooltipEl.contains(event.target))) {
|
|
1762
|
+
isPointerOverTooltip = true;
|
|
1763
|
+
if (hideTimeout) {
|
|
1764
|
+
clearTimeout(hideTimeout);
|
|
1765
|
+
hideTimeout = null;
|
|
1766
|
+
}
|
|
1767
|
+
return;
|
|
1768
|
+
}
|
|
1769
|
+
const match = findTargetWithDescription(event.target);
|
|
1770
|
+
if (!match) {
|
|
1771
|
+
if (activeTarget && !isPointerOverTooltip) {
|
|
1772
|
+
hide();
|
|
1773
|
+
}
|
|
1774
|
+
return;
|
|
1775
|
+
}
|
|
1776
|
+
if (match.element === dismissedTarget) {
|
|
1777
|
+
return;
|
|
1778
|
+
}
|
|
1779
|
+
if (match.element === activeTarget) {
|
|
1780
|
+
if (hideTimeout) {
|
|
1781
|
+
clearTimeout(hideTimeout);
|
|
1782
|
+
hideTimeout = null;
|
|
1783
|
+
}
|
|
1784
|
+
return;
|
|
1785
|
+
}
|
|
1786
|
+
show(match.element, match.text);
|
|
1787
|
+
};
|
|
1788
|
+
const handlePointerOut = (event) => {
|
|
1789
|
+
if (dismissedTarget === event.target) {
|
|
1790
|
+
dismissedTarget = null;
|
|
1791
|
+
}
|
|
1792
|
+
if (tooltipEl && (event.target === tooltipEl || tooltipEl.contains(event.target))) {
|
|
1793
|
+
isPointerOverTooltip = false;
|
|
1794
|
+
const related = event.relatedTarget;
|
|
1795
|
+
if (activeTarget && (activeTarget === related || activeTarget.contains(related))) {
|
|
1796
|
+
return;
|
|
1797
|
+
}
|
|
1798
|
+
hide();
|
|
1799
|
+
return;
|
|
1800
|
+
}
|
|
1801
|
+
const match = findTargetWithDescription(event.target);
|
|
1802
|
+
if (match && match.element === activeTarget) {
|
|
1803
|
+
const related = event.relatedTarget;
|
|
1804
|
+
if (tooltipEl && (related === tooltipEl || tooltipEl.contains(related))) {
|
|
1805
|
+
return;
|
|
1806
|
+
}
|
|
1807
|
+
hide();
|
|
1808
|
+
}
|
|
1809
|
+
};
|
|
1810
|
+
const handleFocusIn = (event) => {
|
|
1811
|
+
const match = findTargetWithDescription(event.target);
|
|
1812
|
+
if (!match) {
|
|
1813
|
+
hide(true);
|
|
1814
|
+
return;
|
|
1815
|
+
}
|
|
1816
|
+
if (match.element === dismissedTarget) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
show(match.element, match.text);
|
|
1820
|
+
};
|
|
1821
|
+
const handleFocusOut = (event) => {
|
|
1822
|
+
if (dismissedTarget === event.target) {
|
|
1823
|
+
dismissedTarget = null;
|
|
1824
|
+
}
|
|
1825
|
+
if (activeTarget && activeTarget === event.target) {
|
|
1826
|
+
hide(true);
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1829
|
+
const handleKeyDown = (event) => {
|
|
1830
|
+
if (event.key === "Escape" && activeTarget) {
|
|
1831
|
+
dismissedTarget = activeTarget;
|
|
1832
|
+
hide(true);
|
|
1833
|
+
}
|
|
1834
|
+
};
|
|
1835
|
+
const handleReposition = () => {
|
|
1836
|
+
if (activeTarget && tooltipEl && tooltipEl.getAttribute("data-visible") === "true") {
|
|
1837
|
+
if (!document.contains(activeTarget)) {
|
|
1838
|
+
hide(true);
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
positionTooltip(tooltipEl, activeTarget);
|
|
1842
|
+
}
|
|
1843
|
+
};
|
|
1844
|
+
document.addEventListener("pointerover", handlePointerOver, {
|
|
1845
|
+
passive: true
|
|
1846
|
+
});
|
|
1847
|
+
document.addEventListener("mouseover", handlePointerOver, { passive: true });
|
|
1848
|
+
document.addEventListener("pointerout", handlePointerOut, { passive: true });
|
|
1849
|
+
document.addEventListener("mouseout", handlePointerOut, { passive: true });
|
|
1850
|
+
document.addEventListener("focusin", handleFocusIn);
|
|
1851
|
+
document.addEventListener("focusout", handleFocusOut);
|
|
1852
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
1853
|
+
window.addEventListener("scroll", handleReposition, { passive: true });
|
|
1854
|
+
window.addEventListener("resize", handleReposition, { passive: true });
|
|
1855
|
+
return () => {
|
|
1856
|
+
if (hideTimeout) clearTimeout(hideTimeout);
|
|
1857
|
+
document.removeEventListener("pointerover", handlePointerOver);
|
|
1858
|
+
document.removeEventListener("mouseover", handlePointerOver);
|
|
1859
|
+
document.removeEventListener("pointerout", handlePointerOut);
|
|
1860
|
+
document.removeEventListener("mouseout", handlePointerOut);
|
|
1861
|
+
document.removeEventListener("focusin", handleFocusIn);
|
|
1862
|
+
document.removeEventListener("focusout", handleFocusOut);
|
|
1863
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
1864
|
+
window.removeEventListener("scroll", handleReposition);
|
|
1865
|
+
window.removeEventListener("resize", handleReposition);
|
|
1866
|
+
if (tooltipEl) {
|
|
1867
|
+
tooltipEl.remove();
|
|
1868
|
+
tooltipEl = null;
|
|
1869
|
+
}
|
|
1870
|
+
};
|
|
1596
1871
|
}
|
|
1597
1872
|
function CustomEffect({
|
|
1598
1873
|
definition,
|
|
@@ -2817,6 +3092,14 @@ var drawings = {
|
|
|
2817
3092
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 5h18M3 10h12M3 19h18" }),
|
|
2818
3093
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M2 15h20", strokeWidth: "3" })
|
|
2819
3094
|
] }),
|
|
3095
|
+
tooltips: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3096
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
|
|
3097
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 9h8M8 13h5" })
|
|
3098
|
+
] }),
|
|
3099
|
+
accessibleTooltips: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
3100
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
|
|
3101
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M8 9h8M8 13h5" })
|
|
3102
|
+
] }),
|
|
2820
3103
|
reset: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M3 10a9 9 0 1 1 1 7M3 4v6h6" }) })
|
|
2821
3104
|
};
|
|
2822
3105
|
function FeatureIcon({ name }) {
|
|
@@ -4147,10 +4430,66 @@ function ReduceMotionController() {
|
|
|
4147
4430
|
] });
|
|
4148
4431
|
}
|
|
4149
4432
|
|
|
4433
|
+
// src/features/TooltipsController.tsx
|
|
4434
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
4435
|
+
var FEATURE_KEY22 = "tooltips";
|
|
4436
|
+
var DEFAULT_VALUE22 = false;
|
|
4437
|
+
function TooltipsController({
|
|
4438
|
+
className = "",
|
|
4439
|
+
label = "Accessible Tooltips",
|
|
4440
|
+
description = "Show authored alt text and descriptions on hover or focus"
|
|
4441
|
+
}) {
|
|
4442
|
+
const { value, setValue } = useAccessibility(
|
|
4443
|
+
FEATURE_KEY22,
|
|
4444
|
+
DEFAULT_VALUE22
|
|
4445
|
+
);
|
|
4446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
4447
|
+
"div",
|
|
4448
|
+
{
|
|
4449
|
+
className: `arap-feature ${className}`,
|
|
4450
|
+
role: "group",
|
|
4451
|
+
"aria-label": label,
|
|
4452
|
+
children: [
|
|
4453
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "arap-label", children: [
|
|
4454
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FeatureIcon, { name: FEATURE_KEY22 }),
|
|
4455
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { children: [
|
|
4456
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { style: { display: "block" }, children: label }),
|
|
4457
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4458
|
+
"span",
|
|
4459
|
+
{
|
|
4460
|
+
style: {
|
|
4461
|
+
display: "block",
|
|
4462
|
+
fontSize: "11px",
|
|
4463
|
+
fontWeight: 400,
|
|
4464
|
+
color: "var(--arap-muted, #64748b)",
|
|
4465
|
+
marginTop: "1px"
|
|
4466
|
+
},
|
|
4467
|
+
children: description
|
|
4468
|
+
}
|
|
4469
|
+
)
|
|
4470
|
+
] })
|
|
4471
|
+
] }),
|
|
4472
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4473
|
+
"button",
|
|
4474
|
+
{
|
|
4475
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
4476
|
+
onClick: () => setValue(!value),
|
|
4477
|
+
"aria-label": label,
|
|
4478
|
+
"aria-pressed": Boolean(value),
|
|
4479
|
+
type: "button",
|
|
4480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
4481
|
+
}
|
|
4482
|
+
)
|
|
4483
|
+
]
|
|
4484
|
+
}
|
|
4485
|
+
);
|
|
4486
|
+
}
|
|
4487
|
+
var AccessibleTooltipsController = TooltipsController;
|
|
4488
|
+
|
|
4150
4489
|
// src/features/ResetController.tsx
|
|
4151
4490
|
var import_react_dom2 = require("react-dom");
|
|
4152
4491
|
var import_react16 = require("react");
|
|
4153
|
-
var
|
|
4492
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4154
4493
|
function ResetController() {
|
|
4155
4494
|
const ctx = (0, import_react16.useContext)(AccessibilityContext);
|
|
4156
4495
|
if (!ctx) {
|
|
@@ -4161,15 +4500,15 @@ function ResetController() {
|
|
|
4161
4500
|
const actionHost = (0, import_react16.useContext)(PanelActionsContext);
|
|
4162
4501
|
const { resetAll } = ctx;
|
|
4163
4502
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
4164
|
-
const button = /* @__PURE__ */ (0,
|
|
4165
|
-
/* @__PURE__ */ (0,
|
|
4503
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
4504
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FeatureIcon, { name: "reset" }),
|
|
4166
4505
|
strings.resetAll
|
|
4167
4506
|
] }) });
|
|
4168
4507
|
return actionHost ? (0, import_react_dom2.createPortal)(button, actionHost) : button;
|
|
4169
4508
|
}
|
|
4170
4509
|
|
|
4171
4510
|
// src/core/controls/ToggleControl.tsx
|
|
4172
|
-
var
|
|
4511
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4173
4512
|
function ToggleControl({
|
|
4174
4513
|
id,
|
|
4175
4514
|
label,
|
|
@@ -4191,12 +4530,12 @@ function ToggleControl({
|
|
|
4191
4530
|
onChange(!checked);
|
|
4192
4531
|
}
|
|
4193
4532
|
};
|
|
4194
|
-
return /* @__PURE__ */ (0,
|
|
4533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4195
4534
|
"div",
|
|
4196
4535
|
{
|
|
4197
4536
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4198
4537
|
style,
|
|
4199
|
-
children: /* @__PURE__ */ (0,
|
|
4538
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4200
4539
|
"button",
|
|
4201
4540
|
{
|
|
4202
4541
|
id,
|
|
@@ -4210,7 +4549,7 @@ function ToggleControl({
|
|
|
4210
4549
|
disabled: !isInteractive,
|
|
4211
4550
|
onClick: handleClick,
|
|
4212
4551
|
title: unavailableReason || description || toggleLabel,
|
|
4213
|
-
children: /* @__PURE__ */ (0,
|
|
4552
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4214
4553
|
"span",
|
|
4215
4554
|
{
|
|
4216
4555
|
className: "arap-toggle-knob",
|
|
@@ -4227,7 +4566,7 @@ function ToggleControl({
|
|
|
4227
4566
|
|
|
4228
4567
|
// src/core/controls/ChoiceControl.tsx
|
|
4229
4568
|
var import_react17 = require("react");
|
|
4230
|
-
var
|
|
4569
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4231
4570
|
function ChoiceControl({
|
|
4232
4571
|
id,
|
|
4233
4572
|
label,
|
|
@@ -4283,7 +4622,7 @@ function ChoiceControl({
|
|
|
4283
4622
|
const renderOptionButton = (opt) => {
|
|
4284
4623
|
const isSelected = value === opt.value;
|
|
4285
4624
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
4286
|
-
return /* @__PURE__ */ (0,
|
|
4625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4287
4626
|
"button",
|
|
4288
4627
|
{
|
|
4289
4628
|
type: "button",
|
|
@@ -4297,15 +4636,15 @@ function ChoiceControl({
|
|
|
4297
4636
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
4298
4637
|
title: opt.description,
|
|
4299
4638
|
children: [
|
|
4300
|
-
isSelected && /* @__PURE__ */ (0,
|
|
4301
|
-
/* @__PURE__ */ (0,
|
|
4302
|
-
opt.badge && /* @__PURE__ */ (0,
|
|
4639
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
4640
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: opt.label }),
|
|
4641
|
+
opt.badge && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
4303
4642
|
]
|
|
4304
4643
|
},
|
|
4305
4644
|
String(opt.value)
|
|
4306
4645
|
);
|
|
4307
4646
|
};
|
|
4308
|
-
return /* @__PURE__ */ (0,
|
|
4647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4309
4648
|
"div",
|
|
4310
4649
|
{
|
|
4311
4650
|
ref: containerRef,
|
|
@@ -4316,15 +4655,15 @@ function ChoiceControl({
|
|
|
4316
4655
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4317
4656
|
style,
|
|
4318
4657
|
onKeyDown: handleKeyDown,
|
|
4319
|
-
children: groups ? groups.map((group) => /* @__PURE__ */ (0,
|
|
4658
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
4320
4659
|
"div",
|
|
4321
4660
|
{
|
|
4322
4661
|
className: "arap-choice-group",
|
|
4323
4662
|
role: "group",
|
|
4324
4663
|
"aria-label": group.label,
|
|
4325
4664
|
children: [
|
|
4326
|
-
/* @__PURE__ */ (0,
|
|
4327
|
-
/* @__PURE__ */ (0,
|
|
4665
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "arap-choice-group-title", children: group.label }),
|
|
4666
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
4328
4667
|
]
|
|
4329
4668
|
},
|
|
4330
4669
|
group.label
|
|
@@ -4334,7 +4673,7 @@ function ChoiceControl({
|
|
|
4334
4673
|
}
|
|
4335
4674
|
|
|
4336
4675
|
// src/core/controls/StepperControl.tsx
|
|
4337
|
-
var
|
|
4676
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4338
4677
|
function StepperControl({
|
|
4339
4678
|
id,
|
|
4340
4679
|
label,
|
|
@@ -4364,15 +4703,15 @@ function StepperControl({
|
|
|
4364
4703
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
4365
4704
|
}
|
|
4366
4705
|
};
|
|
4367
|
-
return /* @__PURE__ */ (0,
|
|
4706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4368
4707
|
"div",
|
|
4369
4708
|
{
|
|
4370
4709
|
id,
|
|
4371
4710
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4372
4711
|
style,
|
|
4373
4712
|
children: [
|
|
4374
|
-
/* @__PURE__ */ (0,
|
|
4375
|
-
/* @__PURE__ */ (0,
|
|
4713
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "arap-controls", children: [
|
|
4714
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4376
4715
|
"button",
|
|
4377
4716
|
{
|
|
4378
4717
|
type: "button",
|
|
@@ -4383,8 +4722,8 @@ function StepperControl({
|
|
|
4383
4722
|
children: "\u2212"
|
|
4384
4723
|
}
|
|
4385
4724
|
),
|
|
4386
|
-
/* @__PURE__ */ (0,
|
|
4387
|
-
/* @__PURE__ */ (0,
|
|
4725
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
4726
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4388
4727
|
"button",
|
|
4389
4728
|
{
|
|
4390
4729
|
type: "button",
|
|
@@ -4396,7 +4735,7 @@ function StepperControl({
|
|
|
4396
4735
|
}
|
|
4397
4736
|
)
|
|
4398
4737
|
] }),
|
|
4399
|
-
showSlider && /* @__PURE__ */ (0,
|
|
4738
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "arap-slider-container", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4400
4739
|
"input",
|
|
4401
4740
|
{
|
|
4402
4741
|
type: "range",
|
|
@@ -4420,7 +4759,7 @@ function StepperControl({
|
|
|
4420
4759
|
}
|
|
4421
4760
|
|
|
4422
4761
|
// src/core/controls/FeatureCard.tsx
|
|
4423
|
-
var
|
|
4762
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4424
4763
|
function FeatureCard({
|
|
4425
4764
|
id,
|
|
4426
4765
|
featureKey,
|
|
@@ -4439,7 +4778,7 @@ function FeatureCard({
|
|
|
4439
4778
|
largeControls = false
|
|
4440
4779
|
}) {
|
|
4441
4780
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
4442
|
-
return /* @__PURE__ */ (0,
|
|
4781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
4443
4782
|
"div",
|
|
4444
4783
|
{
|
|
4445
4784
|
id,
|
|
@@ -4448,27 +4787,27 @@ function FeatureCard({
|
|
|
4448
4787
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4449
4788
|
style,
|
|
4450
4789
|
children: [
|
|
4451
|
-
/* @__PURE__ */ (0,
|
|
4452
|
-
/* @__PURE__ */ (0,
|
|
4453
|
-
icon ?? (featureKey ? /* @__PURE__ */ (0,
|
|
4454
|
-
/* @__PURE__ */ (0,
|
|
4790
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-card-header", children: [
|
|
4791
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "arap-label", children: [
|
|
4792
|
+
icon ?? (featureKey ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FeatureIcon, { name: featureKey }) : null),
|
|
4793
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-card-title", children: title })
|
|
4455
4794
|
] }),
|
|
4456
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
4795
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
4457
4796
|
] }),
|
|
4458
|
-
description && /* @__PURE__ */ (0,
|
|
4459
|
-
status === "error" && errorMessage && /* @__PURE__ */ (0,
|
|
4460
|
-
/* @__PURE__ */ (0,
|
|
4461
|
-
/* @__PURE__ */ (0,
|
|
4797
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "arap-card-desc", children: description }),
|
|
4798
|
+
status === "error" && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
4799
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
4800
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: errorMessage })
|
|
4462
4801
|
] }),
|
|
4463
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0,
|
|
4464
|
-
/* @__PURE__ */ (0,
|
|
4465
|
-
/* @__PURE__ */ (0,
|
|
4802
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
4803
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
4804
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: unavailableMessage })
|
|
4466
4805
|
] }),
|
|
4467
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0,
|
|
4468
|
-
/* @__PURE__ */ (0,
|
|
4469
|
-
/* @__PURE__ */ (0,
|
|
4470
|
-
/* @__PURE__ */ (0,
|
|
4471
|
-
onRequestPermission && /* @__PURE__ */ (0,
|
|
4806
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
4807
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
4808
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "arap-permission-content", children: [
|
|
4809
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: permissionMessage }),
|
|
4810
|
+
onRequestPermission && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4472
4811
|
"button",
|
|
4473
4812
|
{
|
|
4474
4813
|
type: "button",
|
|
@@ -4479,14 +4818,14 @@ function FeatureCard({
|
|
|
4479
4818
|
)
|
|
4480
4819
|
] })
|
|
4481
4820
|
] }),
|
|
4482
|
-
/* @__PURE__ */ (0,
|
|
4821
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "arap-card-content", children })
|
|
4483
4822
|
]
|
|
4484
4823
|
}
|
|
4485
4824
|
);
|
|
4486
4825
|
}
|
|
4487
4826
|
|
|
4488
4827
|
// src/core/controls/FeatureStatusState.tsx
|
|
4489
|
-
var
|
|
4828
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4490
4829
|
function SearchCount({
|
|
4491
4830
|
totalCount,
|
|
4492
4831
|
matchedCount,
|
|
@@ -4495,7 +4834,7 @@ function SearchCount({
|
|
|
4495
4834
|
style
|
|
4496
4835
|
}) {
|
|
4497
4836
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
4498
|
-
return /* @__PURE__ */ (0,
|
|
4837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4499
4838
|
"div",
|
|
4500
4839
|
{
|
|
4501
4840
|
role: "status",
|
|
@@ -4515,17 +4854,17 @@ function EmptyState({
|
|
|
4515
4854
|
className = "",
|
|
4516
4855
|
style
|
|
4517
4856
|
}) {
|
|
4518
|
-
return /* @__PURE__ */ (0,
|
|
4857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4519
4858
|
"div",
|
|
4520
4859
|
{
|
|
4521
4860
|
role: "status",
|
|
4522
4861
|
className: `arap-empty-state ${className}`,
|
|
4523
4862
|
style,
|
|
4524
4863
|
children: [
|
|
4525
|
-
/* @__PURE__ */ (0,
|
|
4526
|
-
/* @__PURE__ */ (0,
|
|
4527
|
-
/* @__PURE__ */ (0,
|
|
4528
|
-
onAction && /* @__PURE__ */ (0,
|
|
4864
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
4865
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "arap-empty-title", children: title }),
|
|
4866
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "arap-empty-desc", children: description }),
|
|
4867
|
+
onAction && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
4529
4868
|
]
|
|
4530
4869
|
}
|
|
4531
4870
|
);
|
|
@@ -4538,18 +4877,18 @@ function ErrorState({
|
|
|
4538
4877
|
className = "",
|
|
4539
4878
|
style
|
|
4540
4879
|
}) {
|
|
4541
|
-
return /* @__PURE__ */ (0,
|
|
4880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4542
4881
|
"div",
|
|
4543
4882
|
{
|
|
4544
4883
|
role: "alert",
|
|
4545
4884
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
4546
4885
|
style,
|
|
4547
4886
|
children: [
|
|
4548
|
-
/* @__PURE__ */ (0,
|
|
4549
|
-
/* @__PURE__ */ (0,
|
|
4550
|
-
title && /* @__PURE__ */ (0,
|
|
4551
|
-
/* @__PURE__ */ (0,
|
|
4552
|
-
onRetry && /* @__PURE__ */ (0,
|
|
4887
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
4888
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "arap-error-content", children: [
|
|
4889
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h4", { className: "arap-error-title", children: title }),
|
|
4890
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "arap-error-message", children: message }),
|
|
4891
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
4553
4892
|
] })
|
|
4554
4893
|
]
|
|
4555
4894
|
}
|
|
@@ -4557,7 +4896,7 @@ function ErrorState({
|
|
|
4557
4896
|
}
|
|
4558
4897
|
|
|
4559
4898
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
4560
|
-
var
|
|
4899
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4561
4900
|
function ProfilePreviewCard({
|
|
4562
4901
|
profile,
|
|
4563
4902
|
isActive,
|
|
@@ -4607,7 +4946,7 @@ function ProfilePreviewCard({
|
|
|
4607
4946
|
if (val === null || val === void 0) return "Original";
|
|
4608
4947
|
return String(val);
|
|
4609
4948
|
};
|
|
4610
|
-
return /* @__PURE__ */ (0,
|
|
4949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4611
4950
|
"div",
|
|
4612
4951
|
{
|
|
4613
4952
|
role: "group",
|
|
@@ -4615,10 +4954,10 @@ function ProfilePreviewCard({
|
|
|
4615
4954
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4616
4955
|
style,
|
|
4617
4956
|
children: [
|
|
4618
|
-
/* @__PURE__ */ (0,
|
|
4619
|
-
/* @__PURE__ */ (0,
|
|
4620
|
-
/* @__PURE__ */ (0,
|
|
4621
|
-
isActive && /* @__PURE__ */ (0,
|
|
4957
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "arap-profile-header", children: [
|
|
4958
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "arap-profile-title-row", children: [
|
|
4959
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "arap-profile-title", children: profile.label }),
|
|
4960
|
+
isActive && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4622
4961
|
"span",
|
|
4623
4962
|
{
|
|
4624
4963
|
className: "arap-profile-active-badge",
|
|
@@ -4627,14 +4966,14 @@ function ProfilePreviewCard({
|
|
|
4627
4966
|
}
|
|
4628
4967
|
)
|
|
4629
4968
|
] }),
|
|
4630
|
-
/* @__PURE__ */ (0,
|
|
4969
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "arap-profile-desc", children: profile.description })
|
|
4631
4970
|
] }),
|
|
4632
|
-
/* @__PURE__ */ (0,
|
|
4633
|
-
/* @__PURE__ */ (0,
|
|
4634
|
-
/* @__PURE__ */ (0,
|
|
4971
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "arap-profile-affected", children: [
|
|
4972
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
4973
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
4635
4974
|
const val = profile.settings[key];
|
|
4636
|
-
return /* @__PURE__ */ (0,
|
|
4637
|
-
/* @__PURE__ */ (0,
|
|
4975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "arap-profile-chip", children: [
|
|
4976
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("strong", { children: [
|
|
4638
4977
|
formatKeyName(key),
|
|
4639
4978
|
":"
|
|
4640
4979
|
] }),
|
|
@@ -4643,7 +4982,7 @@ function ProfilePreviewCard({
|
|
|
4643
4982
|
] }, key);
|
|
4644
4983
|
}) })
|
|
4645
4984
|
] }),
|
|
4646
|
-
/* @__PURE__ */ (0,
|
|
4985
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4647
4986
|
"button",
|
|
4648
4987
|
{
|
|
4649
4988
|
type: "button",
|
|
@@ -4652,7 +4991,7 @@ function ProfilePreviewCard({
|
|
|
4652
4991
|
"aria-label": `Revert ${profile.label} profile`,
|
|
4653
4992
|
children: "Revert to custom settings"
|
|
4654
4993
|
}
|
|
4655
|
-
) : /* @__PURE__ */ (0,
|
|
4994
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4656
4995
|
"button",
|
|
4657
4996
|
{
|
|
4658
4997
|
type: "button",
|
|
@@ -4672,6 +5011,7 @@ function ProfilePreviewCard({
|
|
|
4672
5011
|
AccessibilityContext,
|
|
4673
5012
|
AccessibilityList,
|
|
4674
5013
|
AccessibilityPlugin,
|
|
5014
|
+
AccessibleTooltipsController,
|
|
4675
5015
|
BigCursorController,
|
|
4676
5016
|
CONTRAST_MODES,
|
|
4677
5017
|
CONTRAST_PALETTES,
|
|
@@ -4723,10 +5063,13 @@ function ProfilePreviewCard({
|
|
|
4723
5063
|
TextAlignController,
|
|
4724
5064
|
TextScaleController,
|
|
4725
5065
|
ToggleControl,
|
|
5066
|
+
TooltipsController,
|
|
4726
5067
|
WordSpacingController,
|
|
4727
5068
|
createInitialPreferencesState,
|
|
4728
5069
|
enLocale,
|
|
5070
|
+
enableAccessibleTooltips,
|
|
4729
5071
|
findMainLandmark,
|
|
5072
|
+
getAuthoredDescription,
|
|
4730
5073
|
getScriptSpacingConstraints,
|
|
4731
5074
|
hasFinePointer,
|
|
4732
5075
|
isEligibleDecorativeImage,
|
|
@@ -4742,6 +5085,7 @@ function ProfilePreviewCard({
|
|
|
4742
5085
|
normalizePreferenceValue,
|
|
4743
5086
|
normalizePreferences,
|
|
4744
5087
|
nudgeReadingAid,
|
|
5088
|
+
positionTooltip,
|
|
4745
5089
|
preferencesReducer,
|
|
4746
5090
|
registerLocale,
|
|
4747
5091
|
resolveEffectivePreferences,
|