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.mjs
CHANGED
|
@@ -24,7 +24,7 @@ function styleInject(css, { insertAt } = {}) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// src/styles/tailwind.css
|
|
27
|
-
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');
|
|
27
|
+
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');
|
|
28
28
|
|
|
29
29
|
// src/core/AccessibilityPlugin.tsx
|
|
30
30
|
import {
|
|
@@ -340,7 +340,9 @@ for (const key of [
|
|
|
340
340
|
"readingGuide",
|
|
341
341
|
"highlightFocus",
|
|
342
342
|
"focusHighlight",
|
|
343
|
-
"reduceMotion"
|
|
343
|
+
"reduceMotion",
|
|
344
|
+
"tooltips",
|
|
345
|
+
"accessibleTooltips"
|
|
344
346
|
]) {
|
|
345
347
|
builtins[key] = {
|
|
346
348
|
defaultValue: false,
|
|
@@ -1495,6 +1497,274 @@ function useBuiltinEffects(values, onDisable) {
|
|
|
1495
1497
|
if (!values.readingGuide) return;
|
|
1496
1498
|
return readingAid(false, 4, onDisable);
|
|
1497
1499
|
}, [values.readingGuide, onDisable]);
|
|
1500
|
+
useEffect(() => {
|
|
1501
|
+
if (!values.tooltips && !values.accessibleTooltips) return;
|
|
1502
|
+
return enableAccessibleTooltips();
|
|
1503
|
+
}, [values.tooltips, values.accessibleTooltips]);
|
|
1504
|
+
}
|
|
1505
|
+
var SENSITIVE_AUTOCOMPLETE_PATTERN = /password|credit-card|cc-|card-|security-code|cvc|cvv|one-time-code/i;
|
|
1506
|
+
function getAuthoredDescription(element) {
|
|
1507
|
+
if (!(element instanceof HTMLElement || element instanceof SVGElement)) {
|
|
1508
|
+
return null;
|
|
1509
|
+
}
|
|
1510
|
+
if (element.closest("[data-arap-ui]")) {
|
|
1511
|
+
return null;
|
|
1512
|
+
}
|
|
1513
|
+
if (element.matches("script, style, link, meta, noscript, template")) {
|
|
1514
|
+
return null;
|
|
1515
|
+
}
|
|
1516
|
+
if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement) {
|
|
1517
|
+
if (element instanceof HTMLInputElement && element.type === "password") {
|
|
1518
|
+
return null;
|
|
1519
|
+
}
|
|
1520
|
+
const ac = element.getAttribute("autocomplete");
|
|
1521
|
+
if (ac && SENSITIVE_AUTOCOMPLETE_PATTERN.test(ac)) {
|
|
1522
|
+
return null;
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
if (element.getAttribute("data-sensitive") === "true") {
|
|
1526
|
+
return null;
|
|
1527
|
+
}
|
|
1528
|
+
if (element.getAttribute("aria-hidden") === "true" || element.getAttribute("role") === "presentation" || element.getAttribute("role") === "none") {
|
|
1529
|
+
return null;
|
|
1530
|
+
}
|
|
1531
|
+
const ariaDesc = element.getAttribute("aria-description")?.trim();
|
|
1532
|
+
let describedByText = "";
|
|
1533
|
+
const describedBy = element.getAttribute("aria-describedby");
|
|
1534
|
+
if (describedBy) {
|
|
1535
|
+
const ids = describedBy.trim().split(/\s+/);
|
|
1536
|
+
const parts = [];
|
|
1537
|
+
for (const id of ids) {
|
|
1538
|
+
const target = document.getElementById(id);
|
|
1539
|
+
if (target) {
|
|
1540
|
+
const text = target.textContent?.trim();
|
|
1541
|
+
if (text) parts.push(text);
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
if (parts.length > 0) {
|
|
1545
|
+
describedByText = parts.join(" ");
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
const explicitDesc = ariaDesc || describedByText || null;
|
|
1549
|
+
const ariaLabel = element.getAttribute("aria-label")?.trim() || null;
|
|
1550
|
+
const visibleText = (element.textContent || "").trim();
|
|
1551
|
+
const alt = element instanceof HTMLImageElement || element instanceof HTMLAreaElement || element instanceof HTMLInputElement && element.type === "image" ? element.getAttribute("alt")?.trim() || null : null;
|
|
1552
|
+
const title = element.getAttribute("title")?.trim() || null;
|
|
1553
|
+
if (explicitDesc) {
|
|
1554
|
+
if (ariaLabel && ariaLabel.toLowerCase() !== visibleText.toLowerCase() && ariaLabel.toLowerCase() !== explicitDesc.toLowerCase()) {
|
|
1555
|
+
return `${ariaLabel} \u2014 ${explicitDesc}`;
|
|
1556
|
+
}
|
|
1557
|
+
if (explicitDesc.toLowerCase() !== visibleText.toLowerCase()) {
|
|
1558
|
+
return explicitDesc;
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
if (ariaLabel && ariaLabel.toLowerCase() !== visibleText.toLowerCase()) {
|
|
1562
|
+
return ariaLabel;
|
|
1563
|
+
}
|
|
1564
|
+
if (alt && alt !== "") {
|
|
1565
|
+
return alt;
|
|
1566
|
+
}
|
|
1567
|
+
if (title && title.toLowerCase() !== visibleText.toLowerCase()) {
|
|
1568
|
+
return title;
|
|
1569
|
+
}
|
|
1570
|
+
return null;
|
|
1571
|
+
}
|
|
1572
|
+
function positionTooltip(tooltip, target) {
|
|
1573
|
+
const rect = target.getBoundingClientRect();
|
|
1574
|
+
const tooltipRect = tooltip.getBoundingClientRect();
|
|
1575
|
+
const tooltipWidth = tooltipRect.width || tooltip.offsetWidth || 180;
|
|
1576
|
+
const tooltipHeight = tooltipRect.height || tooltip.offsetHeight || 32;
|
|
1577
|
+
const gap = 8;
|
|
1578
|
+
const vw = typeof window !== "undefined" && window.innerWidth || document.documentElement.clientWidth || 800;
|
|
1579
|
+
const vh = typeof window !== "undefined" && window.innerHeight || document.documentElement.clientHeight || 600;
|
|
1580
|
+
let placement = "top";
|
|
1581
|
+
let top = rect.top - tooltipHeight - gap;
|
|
1582
|
+
if (top < gap) {
|
|
1583
|
+
top = rect.bottom + gap;
|
|
1584
|
+
placement = "bottom";
|
|
1585
|
+
}
|
|
1586
|
+
if (top + tooltipHeight > vh - gap) {
|
|
1587
|
+
top = Math.max(gap, vh - tooltipHeight - gap);
|
|
1588
|
+
}
|
|
1589
|
+
let left = rect.left + (rect.width - tooltipWidth) / 2;
|
|
1590
|
+
left = Math.max(gap, Math.min(vw - tooltipWidth - gap, left));
|
|
1591
|
+
tooltip.style.top = `${Math.round(top)}px`;
|
|
1592
|
+
tooltip.style.left = `${Math.round(left)}px`;
|
|
1593
|
+
tooltip.setAttribute("data-placement", placement);
|
|
1594
|
+
}
|
|
1595
|
+
function enableAccessibleTooltips() {
|
|
1596
|
+
if (typeof document === "undefined") return () => {
|
|
1597
|
+
};
|
|
1598
|
+
let tooltipEl = document.createElement("div");
|
|
1599
|
+
tooltipEl.className = "arap-accessible-tooltip";
|
|
1600
|
+
tooltipEl.setAttribute("role", "presentation");
|
|
1601
|
+
tooltipEl.setAttribute("aria-hidden", "true");
|
|
1602
|
+
tooltipEl.setAttribute("data-arap-ui", "true");
|
|
1603
|
+
document.body.appendChild(tooltipEl);
|
|
1604
|
+
let activeTarget = null;
|
|
1605
|
+
let dismissedTarget = null;
|
|
1606
|
+
let hideTimeout = null;
|
|
1607
|
+
let isPointerOverTooltip = false;
|
|
1608
|
+
function show(target, text) {
|
|
1609
|
+
if (hideTimeout) {
|
|
1610
|
+
clearTimeout(hideTimeout);
|
|
1611
|
+
hideTimeout = null;
|
|
1612
|
+
}
|
|
1613
|
+
activeTarget = target;
|
|
1614
|
+
if (!tooltipEl || !document.body.contains(tooltipEl)) {
|
|
1615
|
+
tooltipEl = document.createElement("div");
|
|
1616
|
+
tooltipEl.className = "arap-accessible-tooltip";
|
|
1617
|
+
tooltipEl.setAttribute("role", "presentation");
|
|
1618
|
+
tooltipEl.setAttribute("aria-hidden", "true");
|
|
1619
|
+
tooltipEl.setAttribute("data-arap-ui", "true");
|
|
1620
|
+
document.body.appendChild(tooltipEl);
|
|
1621
|
+
}
|
|
1622
|
+
tooltipEl.textContent = text;
|
|
1623
|
+
tooltipEl.setAttribute("data-visible", "true");
|
|
1624
|
+
positionTooltip(tooltipEl, target);
|
|
1625
|
+
}
|
|
1626
|
+
function hide(immediate = false) {
|
|
1627
|
+
if (hideTimeout) {
|
|
1628
|
+
clearTimeout(hideTimeout);
|
|
1629
|
+
hideTimeout = null;
|
|
1630
|
+
}
|
|
1631
|
+
const doHide = () => {
|
|
1632
|
+
if (isPointerOverTooltip) return;
|
|
1633
|
+
if (tooltipEl) {
|
|
1634
|
+
tooltipEl.removeAttribute("data-visible");
|
|
1635
|
+
tooltipEl.style.top = "-9999px";
|
|
1636
|
+
tooltipEl.style.left = "-9999px";
|
|
1637
|
+
}
|
|
1638
|
+
activeTarget = null;
|
|
1639
|
+
};
|
|
1640
|
+
if (immediate) {
|
|
1641
|
+
doHide();
|
|
1642
|
+
} else {
|
|
1643
|
+
hideTimeout = setTimeout(doHide, 100);
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
function findTargetWithDescription(node) {
|
|
1647
|
+
if (!(node instanceof Element)) return null;
|
|
1648
|
+
if (node.closest("[data-arap-ui]")) return null;
|
|
1649
|
+
let curr = node;
|
|
1650
|
+
while (curr && curr !== document.body && curr !== document.documentElement) {
|
|
1651
|
+
const desc = getAuthoredDescription(curr);
|
|
1652
|
+
if (desc) return { element: curr, text: desc };
|
|
1653
|
+
curr = curr.parentElement;
|
|
1654
|
+
}
|
|
1655
|
+
return null;
|
|
1656
|
+
}
|
|
1657
|
+
const handlePointerOver = (event) => {
|
|
1658
|
+
if (tooltipEl && (event.target === tooltipEl || tooltipEl.contains(event.target))) {
|
|
1659
|
+
isPointerOverTooltip = true;
|
|
1660
|
+
if (hideTimeout) {
|
|
1661
|
+
clearTimeout(hideTimeout);
|
|
1662
|
+
hideTimeout = null;
|
|
1663
|
+
}
|
|
1664
|
+
return;
|
|
1665
|
+
}
|
|
1666
|
+
const match = findTargetWithDescription(event.target);
|
|
1667
|
+
if (!match) {
|
|
1668
|
+
if (activeTarget && !isPointerOverTooltip) {
|
|
1669
|
+
hide();
|
|
1670
|
+
}
|
|
1671
|
+
return;
|
|
1672
|
+
}
|
|
1673
|
+
if (match.element === dismissedTarget) {
|
|
1674
|
+
return;
|
|
1675
|
+
}
|
|
1676
|
+
if (match.element === activeTarget) {
|
|
1677
|
+
if (hideTimeout) {
|
|
1678
|
+
clearTimeout(hideTimeout);
|
|
1679
|
+
hideTimeout = null;
|
|
1680
|
+
}
|
|
1681
|
+
return;
|
|
1682
|
+
}
|
|
1683
|
+
show(match.element, match.text);
|
|
1684
|
+
};
|
|
1685
|
+
const handlePointerOut = (event) => {
|
|
1686
|
+
if (dismissedTarget === event.target) {
|
|
1687
|
+
dismissedTarget = null;
|
|
1688
|
+
}
|
|
1689
|
+
if (tooltipEl && (event.target === tooltipEl || tooltipEl.contains(event.target))) {
|
|
1690
|
+
isPointerOverTooltip = false;
|
|
1691
|
+
const related = event.relatedTarget;
|
|
1692
|
+
if (activeTarget && (activeTarget === related || activeTarget.contains(related))) {
|
|
1693
|
+
return;
|
|
1694
|
+
}
|
|
1695
|
+
hide();
|
|
1696
|
+
return;
|
|
1697
|
+
}
|
|
1698
|
+
const match = findTargetWithDescription(event.target);
|
|
1699
|
+
if (match && match.element === activeTarget) {
|
|
1700
|
+
const related = event.relatedTarget;
|
|
1701
|
+
if (tooltipEl && (related === tooltipEl || tooltipEl.contains(related))) {
|
|
1702
|
+
return;
|
|
1703
|
+
}
|
|
1704
|
+
hide();
|
|
1705
|
+
}
|
|
1706
|
+
};
|
|
1707
|
+
const handleFocusIn = (event) => {
|
|
1708
|
+
const match = findTargetWithDescription(event.target);
|
|
1709
|
+
if (!match) {
|
|
1710
|
+
hide(true);
|
|
1711
|
+
return;
|
|
1712
|
+
}
|
|
1713
|
+
if (match.element === dismissedTarget) {
|
|
1714
|
+
return;
|
|
1715
|
+
}
|
|
1716
|
+
show(match.element, match.text);
|
|
1717
|
+
};
|
|
1718
|
+
const handleFocusOut = (event) => {
|
|
1719
|
+
if (dismissedTarget === event.target) {
|
|
1720
|
+
dismissedTarget = null;
|
|
1721
|
+
}
|
|
1722
|
+
if (activeTarget && activeTarget === event.target) {
|
|
1723
|
+
hide(true);
|
|
1724
|
+
}
|
|
1725
|
+
};
|
|
1726
|
+
const handleKeyDown = (event) => {
|
|
1727
|
+
if (event.key === "Escape" && activeTarget) {
|
|
1728
|
+
dismissedTarget = activeTarget;
|
|
1729
|
+
hide(true);
|
|
1730
|
+
}
|
|
1731
|
+
};
|
|
1732
|
+
const handleReposition = () => {
|
|
1733
|
+
if (activeTarget && tooltipEl && tooltipEl.getAttribute("data-visible") === "true") {
|
|
1734
|
+
if (!document.contains(activeTarget)) {
|
|
1735
|
+
hide(true);
|
|
1736
|
+
return;
|
|
1737
|
+
}
|
|
1738
|
+
positionTooltip(tooltipEl, activeTarget);
|
|
1739
|
+
}
|
|
1740
|
+
};
|
|
1741
|
+
document.addEventListener("pointerover", handlePointerOver, {
|
|
1742
|
+
passive: true
|
|
1743
|
+
});
|
|
1744
|
+
document.addEventListener("mouseover", handlePointerOver, { passive: true });
|
|
1745
|
+
document.addEventListener("pointerout", handlePointerOut, { passive: true });
|
|
1746
|
+
document.addEventListener("mouseout", handlePointerOut, { passive: true });
|
|
1747
|
+
document.addEventListener("focusin", handleFocusIn);
|
|
1748
|
+
document.addEventListener("focusout", handleFocusOut);
|
|
1749
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
1750
|
+
window.addEventListener("scroll", handleReposition, { passive: true });
|
|
1751
|
+
window.addEventListener("resize", handleReposition, { passive: true });
|
|
1752
|
+
return () => {
|
|
1753
|
+
if (hideTimeout) clearTimeout(hideTimeout);
|
|
1754
|
+
document.removeEventListener("pointerover", handlePointerOver);
|
|
1755
|
+
document.removeEventListener("mouseover", handlePointerOver);
|
|
1756
|
+
document.removeEventListener("pointerout", handlePointerOut);
|
|
1757
|
+
document.removeEventListener("mouseout", handlePointerOut);
|
|
1758
|
+
document.removeEventListener("focusin", handleFocusIn);
|
|
1759
|
+
document.removeEventListener("focusout", handleFocusOut);
|
|
1760
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
1761
|
+
window.removeEventListener("scroll", handleReposition);
|
|
1762
|
+
window.removeEventListener("resize", handleReposition);
|
|
1763
|
+
if (tooltipEl) {
|
|
1764
|
+
tooltipEl.remove();
|
|
1765
|
+
tooltipEl = null;
|
|
1766
|
+
}
|
|
1767
|
+
};
|
|
1498
1768
|
}
|
|
1499
1769
|
function CustomEffect({
|
|
1500
1770
|
definition,
|
|
@@ -2719,6 +2989,14 @@ var drawings = {
|
|
|
2719
2989
|
/* @__PURE__ */ jsx7("path", { d: "M3 5h18M3 10h12M3 19h18" }),
|
|
2720
2990
|
/* @__PURE__ */ jsx7("path", { d: "M2 15h20", strokeWidth: "3" })
|
|
2721
2991
|
] }),
|
|
2992
|
+
tooltips: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2993
|
+
/* @__PURE__ */ jsx7("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
|
|
2994
|
+
/* @__PURE__ */ jsx7("path", { d: "M8 9h8M8 13h5" })
|
|
2995
|
+
] }),
|
|
2996
|
+
accessibleTooltips: /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2997
|
+
/* @__PURE__ */ jsx7("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }),
|
|
2998
|
+
/* @__PURE__ */ jsx7("path", { d: "M8 9h8M8 13h5" })
|
|
2999
|
+
] }),
|
|
2722
3000
|
reset: /* @__PURE__ */ jsx7(Fragment, { children: /* @__PURE__ */ jsx7("path", { d: "M3 10a9 9 0 1 1 1 7M3 4v6h6" }) })
|
|
2723
3001
|
};
|
|
2724
3002
|
function FeatureIcon({ name }) {
|
|
@@ -4049,10 +4327,66 @@ function ReduceMotionController() {
|
|
|
4049
4327
|
] });
|
|
4050
4328
|
}
|
|
4051
4329
|
|
|
4330
|
+
// src/features/TooltipsController.tsx
|
|
4331
|
+
import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4332
|
+
var FEATURE_KEY22 = "tooltips";
|
|
4333
|
+
var DEFAULT_VALUE22 = false;
|
|
4334
|
+
function TooltipsController({
|
|
4335
|
+
className = "",
|
|
4336
|
+
label = "Accessible Tooltips",
|
|
4337
|
+
description = "Show authored alt text and descriptions on hover or focus"
|
|
4338
|
+
}) {
|
|
4339
|
+
const { value, setValue } = useAccessibility(
|
|
4340
|
+
FEATURE_KEY22,
|
|
4341
|
+
DEFAULT_VALUE22
|
|
4342
|
+
);
|
|
4343
|
+
return /* @__PURE__ */ jsxs27(
|
|
4344
|
+
"div",
|
|
4345
|
+
{
|
|
4346
|
+
className: `arap-feature ${className}`,
|
|
4347
|
+
role: "group",
|
|
4348
|
+
"aria-label": label,
|
|
4349
|
+
children: [
|
|
4350
|
+
/* @__PURE__ */ jsxs27("span", { className: "arap-label", children: [
|
|
4351
|
+
/* @__PURE__ */ jsx29(FeatureIcon, { name: FEATURE_KEY22 }),
|
|
4352
|
+
/* @__PURE__ */ jsxs27("span", { children: [
|
|
4353
|
+
/* @__PURE__ */ jsx29("span", { style: { display: "block" }, children: label }),
|
|
4354
|
+
description && /* @__PURE__ */ jsx29(
|
|
4355
|
+
"span",
|
|
4356
|
+
{
|
|
4357
|
+
style: {
|
|
4358
|
+
display: "block",
|
|
4359
|
+
fontSize: "11px",
|
|
4360
|
+
fontWeight: 400,
|
|
4361
|
+
color: "var(--arap-muted, #64748b)",
|
|
4362
|
+
marginTop: "1px"
|
|
4363
|
+
},
|
|
4364
|
+
children: description
|
|
4365
|
+
}
|
|
4366
|
+
)
|
|
4367
|
+
] })
|
|
4368
|
+
] }),
|
|
4369
|
+
/* @__PURE__ */ jsx29(
|
|
4370
|
+
"button",
|
|
4371
|
+
{
|
|
4372
|
+
className: `arap-toggle ${value ? "arap-toggle-active" : ""}`,
|
|
4373
|
+
onClick: () => setValue(!value),
|
|
4374
|
+
"aria-label": label,
|
|
4375
|
+
"aria-pressed": Boolean(value),
|
|
4376
|
+
type: "button",
|
|
4377
|
+
children: /* @__PURE__ */ jsx29("span", { className: "arap-toggle-knob", "aria-hidden": "true" })
|
|
4378
|
+
}
|
|
4379
|
+
)
|
|
4380
|
+
]
|
|
4381
|
+
}
|
|
4382
|
+
);
|
|
4383
|
+
}
|
|
4384
|
+
var AccessibleTooltipsController = TooltipsController;
|
|
4385
|
+
|
|
4052
4386
|
// src/features/ResetController.tsx
|
|
4053
4387
|
import { createPortal as createPortal2 } from "react-dom";
|
|
4054
4388
|
import { useContext as useContext6 } from "react";
|
|
4055
|
-
import { jsx as
|
|
4389
|
+
import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4056
4390
|
function ResetController() {
|
|
4057
4391
|
const ctx = useContext6(AccessibilityContext);
|
|
4058
4392
|
if (!ctx) {
|
|
@@ -4063,15 +4397,15 @@ function ResetController() {
|
|
|
4063
4397
|
const actionHost = useContext6(PanelActionsContext);
|
|
4064
4398
|
const { resetAll } = ctx;
|
|
4065
4399
|
const strings = resolveLocaleStrings(ctx.locale);
|
|
4066
|
-
const button = /* @__PURE__ */
|
|
4067
|
-
/* @__PURE__ */
|
|
4400
|
+
const button = /* @__PURE__ */ jsx30("div", { className: "arap-feature arap-feature-reset", children: /* @__PURE__ */ jsxs28("button", { className: "arap-reset-btn", onClick: resetAll, type: "button", children: [
|
|
4401
|
+
/* @__PURE__ */ jsx30(FeatureIcon, { name: "reset" }),
|
|
4068
4402
|
strings.resetAll
|
|
4069
4403
|
] }) });
|
|
4070
4404
|
return actionHost ? createPortal2(button, actionHost) : button;
|
|
4071
4405
|
}
|
|
4072
4406
|
|
|
4073
4407
|
// src/core/controls/ToggleControl.tsx
|
|
4074
|
-
import { jsx as
|
|
4408
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4075
4409
|
function ToggleControl({
|
|
4076
4410
|
id,
|
|
4077
4411
|
label,
|
|
@@ -4093,12 +4427,12 @@ function ToggleControl({
|
|
|
4093
4427
|
onChange(!checked);
|
|
4094
4428
|
}
|
|
4095
4429
|
};
|
|
4096
|
-
return /* @__PURE__ */
|
|
4430
|
+
return /* @__PURE__ */ jsx31(
|
|
4097
4431
|
"div",
|
|
4098
4432
|
{
|
|
4099
4433
|
className: `arap-toggle-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4100
4434
|
style,
|
|
4101
|
-
children: /* @__PURE__ */
|
|
4435
|
+
children: /* @__PURE__ */ jsx31(
|
|
4102
4436
|
"button",
|
|
4103
4437
|
{
|
|
4104
4438
|
id,
|
|
@@ -4112,7 +4446,7 @@ function ToggleControl({
|
|
|
4112
4446
|
disabled: !isInteractive,
|
|
4113
4447
|
onClick: handleClick,
|
|
4114
4448
|
title: unavailableReason || description || toggleLabel,
|
|
4115
|
-
children: /* @__PURE__ */
|
|
4449
|
+
children: /* @__PURE__ */ jsx31(
|
|
4116
4450
|
"span",
|
|
4117
4451
|
{
|
|
4118
4452
|
className: "arap-toggle-knob",
|
|
@@ -4129,7 +4463,7 @@ function ToggleControl({
|
|
|
4129
4463
|
|
|
4130
4464
|
// src/core/controls/ChoiceControl.tsx
|
|
4131
4465
|
import { useCallback as useCallback4, useMemo as useMemo2, useRef as useRef5 } from "react";
|
|
4132
|
-
import { jsx as
|
|
4466
|
+
import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4133
4467
|
function ChoiceControl({
|
|
4134
4468
|
id,
|
|
4135
4469
|
label,
|
|
@@ -4185,7 +4519,7 @@ function ChoiceControl({
|
|
|
4185
4519
|
const renderOptionButton = (opt) => {
|
|
4186
4520
|
const isSelected = value === opt.value;
|
|
4187
4521
|
const isOptionDisabled = disabled || Boolean(opt.disabled);
|
|
4188
|
-
return /* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsxs29(
|
|
4189
4523
|
"button",
|
|
4190
4524
|
{
|
|
4191
4525
|
type: "button",
|
|
@@ -4199,15 +4533,15 @@ function ChoiceControl({
|
|
|
4199
4533
|
onClick: () => !isOptionDisabled && onChange(opt.value),
|
|
4200
4534
|
title: opt.description,
|
|
4201
4535
|
children: [
|
|
4202
|
-
isSelected && /* @__PURE__ */
|
|
4203
|
-
/* @__PURE__ */
|
|
4204
|
-
opt.badge && /* @__PURE__ */
|
|
4536
|
+
isSelected && /* @__PURE__ */ jsx32("span", { className: "arap-check", "aria-hidden": "true", children: "\u2713" }),
|
|
4537
|
+
/* @__PURE__ */ jsx32("span", { children: opt.label }),
|
|
4538
|
+
opt.badge && /* @__PURE__ */ jsx32("span", { className: "arap-choice-badge", "aria-hidden": "true", children: opt.badge })
|
|
4205
4539
|
]
|
|
4206
4540
|
},
|
|
4207
4541
|
String(opt.value)
|
|
4208
4542
|
);
|
|
4209
4543
|
};
|
|
4210
|
-
return /* @__PURE__ */
|
|
4544
|
+
return /* @__PURE__ */ jsx32(
|
|
4211
4545
|
"div",
|
|
4212
4546
|
{
|
|
4213
4547
|
ref: containerRef,
|
|
@@ -4218,15 +4552,15 @@ function ChoiceControl({
|
|
|
4218
4552
|
className: `arap-choice-control arap-segmented ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4219
4553
|
style,
|
|
4220
4554
|
onKeyDown: handleKeyDown,
|
|
4221
|
-
children: groups ? groups.map((group) => /* @__PURE__ */
|
|
4555
|
+
children: groups ? groups.map((group) => /* @__PURE__ */ jsxs29(
|
|
4222
4556
|
"div",
|
|
4223
4557
|
{
|
|
4224
4558
|
className: "arap-choice-group",
|
|
4225
4559
|
role: "group",
|
|
4226
4560
|
"aria-label": group.label,
|
|
4227
4561
|
children: [
|
|
4228
|
-
/* @__PURE__ */
|
|
4229
|
-
/* @__PURE__ */
|
|
4562
|
+
/* @__PURE__ */ jsx32("span", { className: "arap-choice-group-title", children: group.label }),
|
|
4563
|
+
/* @__PURE__ */ jsx32("div", { className: "arap-segmented", children: group.options.map(renderOptionButton) })
|
|
4230
4564
|
]
|
|
4231
4565
|
},
|
|
4232
4566
|
group.label
|
|
@@ -4236,7 +4570,7 @@ function ChoiceControl({
|
|
|
4236
4570
|
}
|
|
4237
4571
|
|
|
4238
4572
|
// src/core/controls/StepperControl.tsx
|
|
4239
|
-
import { jsx as
|
|
4573
|
+
import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4240
4574
|
function StepperControl({
|
|
4241
4575
|
id,
|
|
4242
4576
|
label,
|
|
@@ -4266,15 +4600,15 @@ function StepperControl({
|
|
|
4266
4600
|
onChange(Math.min(max, Number((value + step).toFixed(2))));
|
|
4267
4601
|
}
|
|
4268
4602
|
};
|
|
4269
|
-
return /* @__PURE__ */
|
|
4603
|
+
return /* @__PURE__ */ jsxs30(
|
|
4270
4604
|
"div",
|
|
4271
4605
|
{
|
|
4272
4606
|
id,
|
|
4273
4607
|
className: `arap-stepper-control-wrapper ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4274
4608
|
style,
|
|
4275
4609
|
children: [
|
|
4276
|
-
/* @__PURE__ */
|
|
4277
|
-
/* @__PURE__ */
|
|
4610
|
+
/* @__PURE__ */ jsxs30("div", { className: "arap-controls", children: [
|
|
4611
|
+
/* @__PURE__ */ jsx33(
|
|
4278
4612
|
"button",
|
|
4279
4613
|
{
|
|
4280
4614
|
type: "button",
|
|
@@ -4285,8 +4619,8 @@ function StepperControl({
|
|
|
4285
4619
|
children: "\u2212"
|
|
4286
4620
|
}
|
|
4287
4621
|
),
|
|
4288
|
-
/* @__PURE__ */
|
|
4289
|
-
/* @__PURE__ */
|
|
4622
|
+
/* @__PURE__ */ jsx33("output", { className: "arap-value", "aria-live": "polite", children: displayValue }),
|
|
4623
|
+
/* @__PURE__ */ jsx33(
|
|
4290
4624
|
"button",
|
|
4291
4625
|
{
|
|
4292
4626
|
type: "button",
|
|
@@ -4298,7 +4632,7 @@ function StepperControl({
|
|
|
4298
4632
|
}
|
|
4299
4633
|
)
|
|
4300
4634
|
] }),
|
|
4301
|
-
showSlider && /* @__PURE__ */
|
|
4635
|
+
showSlider && /* @__PURE__ */ jsx33("div", { className: "arap-slider-container", children: /* @__PURE__ */ jsx33(
|
|
4302
4636
|
"input",
|
|
4303
4637
|
{
|
|
4304
4638
|
type: "range",
|
|
@@ -4322,7 +4656,7 @@ function StepperControl({
|
|
|
4322
4656
|
}
|
|
4323
4657
|
|
|
4324
4658
|
// src/core/controls/FeatureCard.tsx
|
|
4325
|
-
import { jsx as
|
|
4659
|
+
import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4326
4660
|
function FeatureCard({
|
|
4327
4661
|
id,
|
|
4328
4662
|
featureKey,
|
|
@@ -4341,7 +4675,7 @@ function FeatureCard({
|
|
|
4341
4675
|
largeControls = false
|
|
4342
4676
|
}) {
|
|
4343
4677
|
const cardTitle = typeof title === "string" ? title : void 0;
|
|
4344
|
-
return /* @__PURE__ */
|
|
4678
|
+
return /* @__PURE__ */ jsxs31(
|
|
4345
4679
|
"div",
|
|
4346
4680
|
{
|
|
4347
4681
|
id,
|
|
@@ -4350,27 +4684,27 @@ function FeatureCard({
|
|
|
4350
4684
|
className: `arap-feature arap-feature-card ${status !== "idle" ? `arap-feature-${status}` : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4351
4685
|
style,
|
|
4352
4686
|
children: [
|
|
4353
|
-
/* @__PURE__ */
|
|
4354
|
-
/* @__PURE__ */
|
|
4355
|
-
icon ?? (featureKey ? /* @__PURE__ */
|
|
4356
|
-
/* @__PURE__ */
|
|
4687
|
+
/* @__PURE__ */ jsxs31("div", { className: "arap-card-header", children: [
|
|
4688
|
+
/* @__PURE__ */ jsxs31("span", { className: "arap-label", children: [
|
|
4689
|
+
icon ?? (featureKey ? /* @__PURE__ */ jsx34(FeatureIcon, { name: featureKey }) : null),
|
|
4690
|
+
/* @__PURE__ */ jsx34("span", { className: "arap-card-title", children: title })
|
|
4357
4691
|
] }),
|
|
4358
|
-
statusBadge && /* @__PURE__ */
|
|
4692
|
+
statusBadge && /* @__PURE__ */ jsx34("span", { className: "arap-status-badge", "aria-hidden": "true", children: statusBadge })
|
|
4359
4693
|
] }),
|
|
4360
|
-
description && /* @__PURE__ */
|
|
4361
|
-
status === "error" && errorMessage && /* @__PURE__ */
|
|
4362
|
-
/* @__PURE__ */
|
|
4363
|
-
/* @__PURE__ */
|
|
4694
|
+
description && /* @__PURE__ */ jsx34("p", { className: "arap-card-desc", children: description }),
|
|
4695
|
+
status === "error" && errorMessage && /* @__PURE__ */ jsxs31("div", { className: "arap-card-alert arap-card-error", role: "alert", children: [
|
|
4696
|
+
/* @__PURE__ */ jsx34("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
4697
|
+
/* @__PURE__ */ jsx34("span", { children: errorMessage })
|
|
4364
4698
|
] }),
|
|
4365
|
-
status === "unavailable" && unavailableMessage && /* @__PURE__ */
|
|
4366
|
-
/* @__PURE__ */
|
|
4367
|
-
/* @__PURE__ */
|
|
4699
|
+
status === "unavailable" && unavailableMessage && /* @__PURE__ */ jsxs31("div", { className: "arap-card-alert arap-card-unavailable", role: "status", children: [
|
|
4700
|
+
/* @__PURE__ */ jsx34("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u2139\uFE0F" }),
|
|
4701
|
+
/* @__PURE__ */ jsx34("span", { children: unavailableMessage })
|
|
4368
4702
|
] }),
|
|
4369
|
-
status === "permission-required" && permissionMessage && /* @__PURE__ */
|
|
4370
|
-
/* @__PURE__ */
|
|
4371
|
-
/* @__PURE__ */
|
|
4372
|
-
/* @__PURE__ */
|
|
4373
|
-
onRequestPermission && /* @__PURE__ */
|
|
4703
|
+
status === "permission-required" && permissionMessage && /* @__PURE__ */ jsxs31("div", { className: "arap-card-alert arap-card-permission", role: "status", children: [
|
|
4704
|
+
/* @__PURE__ */ jsx34("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u{1F512}" }),
|
|
4705
|
+
/* @__PURE__ */ jsxs31("div", { className: "arap-permission-content", children: [
|
|
4706
|
+
/* @__PURE__ */ jsx34("span", { children: permissionMessage }),
|
|
4707
|
+
onRequestPermission && /* @__PURE__ */ jsx34(
|
|
4374
4708
|
"button",
|
|
4375
4709
|
{
|
|
4376
4710
|
type: "button",
|
|
@@ -4381,14 +4715,14 @@ function FeatureCard({
|
|
|
4381
4715
|
)
|
|
4382
4716
|
] })
|
|
4383
4717
|
] }),
|
|
4384
|
-
/* @__PURE__ */
|
|
4718
|
+
/* @__PURE__ */ jsx34("div", { className: "arap-card-content", children })
|
|
4385
4719
|
]
|
|
4386
4720
|
}
|
|
4387
4721
|
);
|
|
4388
4722
|
}
|
|
4389
4723
|
|
|
4390
4724
|
// src/core/controls/FeatureStatusState.tsx
|
|
4391
|
-
import { jsx as
|
|
4725
|
+
import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4392
4726
|
function SearchCount({
|
|
4393
4727
|
totalCount,
|
|
4394
4728
|
matchedCount,
|
|
@@ -4397,7 +4731,7 @@ function SearchCount({
|
|
|
4397
4731
|
style
|
|
4398
4732
|
}) {
|
|
4399
4733
|
const text = query ? `Showing ${matchedCount} of ${totalCount} tools matching "${query}"` : `Showing all ${totalCount} tools`;
|
|
4400
|
-
return /* @__PURE__ */
|
|
4734
|
+
return /* @__PURE__ */ jsx35(
|
|
4401
4735
|
"div",
|
|
4402
4736
|
{
|
|
4403
4737
|
role: "status",
|
|
@@ -4417,17 +4751,17 @@ function EmptyState({
|
|
|
4417
4751
|
className = "",
|
|
4418
4752
|
style
|
|
4419
4753
|
}) {
|
|
4420
|
-
return /* @__PURE__ */
|
|
4754
|
+
return /* @__PURE__ */ jsxs32(
|
|
4421
4755
|
"div",
|
|
4422
4756
|
{
|
|
4423
4757
|
role: "status",
|
|
4424
4758
|
className: `arap-empty-state ${className}`,
|
|
4425
4759
|
style,
|
|
4426
4760
|
children: [
|
|
4427
|
-
/* @__PURE__ */
|
|
4428
|
-
/* @__PURE__ */
|
|
4429
|
-
/* @__PURE__ */
|
|
4430
|
-
onAction && /* @__PURE__ */
|
|
4761
|
+
/* @__PURE__ */ jsx35("div", { className: "arap-empty-icon", "aria-hidden": "true", children: icon ?? "\u{1F50D}" }),
|
|
4762
|
+
/* @__PURE__ */ jsx35("h3", { className: "arap-empty-title", children: title }),
|
|
4763
|
+
/* @__PURE__ */ jsx35("p", { className: "arap-empty-desc", children: description }),
|
|
4764
|
+
onAction && /* @__PURE__ */ jsx35("button", { type: "button", className: "arap-empty-btn", onClick: onAction, children: actionLabel })
|
|
4431
4765
|
]
|
|
4432
4766
|
}
|
|
4433
4767
|
);
|
|
@@ -4440,18 +4774,18 @@ function ErrorState({
|
|
|
4440
4774
|
className = "",
|
|
4441
4775
|
style
|
|
4442
4776
|
}) {
|
|
4443
|
-
return /* @__PURE__ */
|
|
4777
|
+
return /* @__PURE__ */ jsxs32(
|
|
4444
4778
|
"div",
|
|
4445
4779
|
{
|
|
4446
4780
|
role: "alert",
|
|
4447
4781
|
className: `arap-error-state arap-card-alert arap-card-error ${className}`,
|
|
4448
4782
|
style,
|
|
4449
4783
|
children: [
|
|
4450
|
-
/* @__PURE__ */
|
|
4451
|
-
/* @__PURE__ */
|
|
4452
|
-
title && /* @__PURE__ */
|
|
4453
|
-
/* @__PURE__ */
|
|
4454
|
-
onRetry && /* @__PURE__ */
|
|
4784
|
+
/* @__PURE__ */ jsx35("span", { className: "arap-alert-icon", "aria-hidden": "true", children: "\u26A0\uFE0F" }),
|
|
4785
|
+
/* @__PURE__ */ jsxs32("div", { className: "arap-error-content", children: [
|
|
4786
|
+
title && /* @__PURE__ */ jsx35("h4", { className: "arap-error-title", children: title }),
|
|
4787
|
+
/* @__PURE__ */ jsx35("p", { className: "arap-error-message", children: message }),
|
|
4788
|
+
onRetry && /* @__PURE__ */ jsx35("button", { type: "button", className: "arap-retry-btn", onClick: onRetry, children: retryLabel })
|
|
4455
4789
|
] })
|
|
4456
4790
|
]
|
|
4457
4791
|
}
|
|
@@ -4459,7 +4793,7 @@ function ErrorState({
|
|
|
4459
4793
|
}
|
|
4460
4794
|
|
|
4461
4795
|
// src/core/controls/ProfilePreviewCard.tsx
|
|
4462
|
-
import { jsx as
|
|
4796
|
+
import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4463
4797
|
function ProfilePreviewCard({
|
|
4464
4798
|
profile,
|
|
4465
4799
|
isActive,
|
|
@@ -4509,7 +4843,7 @@ function ProfilePreviewCard({
|
|
|
4509
4843
|
if (val === null || val === void 0) return "Original";
|
|
4510
4844
|
return String(val);
|
|
4511
4845
|
};
|
|
4512
|
-
return /* @__PURE__ */
|
|
4846
|
+
return /* @__PURE__ */ jsxs33(
|
|
4513
4847
|
"div",
|
|
4514
4848
|
{
|
|
4515
4849
|
role: "group",
|
|
@@ -4517,10 +4851,10 @@ function ProfilePreviewCard({
|
|
|
4517
4851
|
className: `arap-profile-card ${isActive ? "arap-profile-card-active" : ""} ${largeControls ? "arap-large-controls" : ""} ${className}`,
|
|
4518
4852
|
style,
|
|
4519
4853
|
children: [
|
|
4520
|
-
/* @__PURE__ */
|
|
4521
|
-
/* @__PURE__ */
|
|
4522
|
-
/* @__PURE__ */
|
|
4523
|
-
isActive && /* @__PURE__ */
|
|
4854
|
+
/* @__PURE__ */ jsxs33("div", { className: "arap-profile-header", children: [
|
|
4855
|
+
/* @__PURE__ */ jsxs33("div", { className: "arap-profile-title-row", children: [
|
|
4856
|
+
/* @__PURE__ */ jsx36("h4", { className: "arap-profile-title", children: profile.label }),
|
|
4857
|
+
isActive && /* @__PURE__ */ jsx36(
|
|
4524
4858
|
"span",
|
|
4525
4859
|
{
|
|
4526
4860
|
className: "arap-profile-active-badge",
|
|
@@ -4529,14 +4863,14 @@ function ProfilePreviewCard({
|
|
|
4529
4863
|
}
|
|
4530
4864
|
)
|
|
4531
4865
|
] }),
|
|
4532
|
-
/* @__PURE__ */
|
|
4866
|
+
/* @__PURE__ */ jsx36("p", { className: "arap-profile-desc", children: profile.description })
|
|
4533
4867
|
] }),
|
|
4534
|
-
/* @__PURE__ */
|
|
4535
|
-
/* @__PURE__ */
|
|
4536
|
-
/* @__PURE__ */
|
|
4868
|
+
/* @__PURE__ */ jsxs33("div", { className: "arap-profile-affected", children: [
|
|
4869
|
+
/* @__PURE__ */ jsx36("span", { className: "arap-profile-affected-label", children: "Affected settings:" }),
|
|
4870
|
+
/* @__PURE__ */ jsx36("div", { className: "arap-profile-chips", children: affectedKeys.map((key) => {
|
|
4537
4871
|
const val = profile.settings[key];
|
|
4538
|
-
return /* @__PURE__ */
|
|
4539
|
-
/* @__PURE__ */
|
|
4872
|
+
return /* @__PURE__ */ jsxs33("span", { className: "arap-profile-chip", children: [
|
|
4873
|
+
/* @__PURE__ */ jsxs33("strong", { children: [
|
|
4540
4874
|
formatKeyName(key),
|
|
4541
4875
|
":"
|
|
4542
4876
|
] }),
|
|
@@ -4545,7 +4879,7 @@ function ProfilePreviewCard({
|
|
|
4545
4879
|
] }, key);
|
|
4546
4880
|
}) })
|
|
4547
4881
|
] }),
|
|
4548
|
-
/* @__PURE__ */
|
|
4882
|
+
/* @__PURE__ */ jsx36("div", { className: "arap-profile-actions", children: isActive ? /* @__PURE__ */ jsx36(
|
|
4549
4883
|
"button",
|
|
4550
4884
|
{
|
|
4551
4885
|
type: "button",
|
|
@@ -4554,7 +4888,7 @@ function ProfilePreviewCard({
|
|
|
4554
4888
|
"aria-label": `Revert ${profile.label} profile`,
|
|
4555
4889
|
children: "Revert to custom settings"
|
|
4556
4890
|
}
|
|
4557
|
-
) : /* @__PURE__ */
|
|
4891
|
+
) : /* @__PURE__ */ jsx36(
|
|
4558
4892
|
"button",
|
|
4559
4893
|
{
|
|
4560
4894
|
type: "button",
|
|
@@ -4573,6 +4907,7 @@ export {
|
|
|
4573
4907
|
AccessibilityContext,
|
|
4574
4908
|
AccessibilityList,
|
|
4575
4909
|
AccessibilityPlugin,
|
|
4910
|
+
AccessibleTooltipsController,
|
|
4576
4911
|
BigCursorController,
|
|
4577
4912
|
CONTRAST_MODES,
|
|
4578
4913
|
CONTRAST_PALETTES,
|
|
@@ -4624,10 +4959,13 @@ export {
|
|
|
4624
4959
|
TextAlignController,
|
|
4625
4960
|
TextScaleController,
|
|
4626
4961
|
ToggleControl,
|
|
4962
|
+
TooltipsController,
|
|
4627
4963
|
WordSpacingController,
|
|
4628
4964
|
createInitialPreferencesState,
|
|
4629
4965
|
enLocale,
|
|
4966
|
+
enableAccessibleTooltips,
|
|
4630
4967
|
findMainLandmark,
|
|
4968
|
+
getAuthoredDescription,
|
|
4631
4969
|
getScriptSpacingConstraints,
|
|
4632
4970
|
hasFinePointer,
|
|
4633
4971
|
isEligibleDecorativeImage,
|
|
@@ -4643,6 +4981,7 @@ export {
|
|
|
4643
4981
|
normalizePreferenceValue,
|
|
4644
4982
|
normalizePreferences,
|
|
4645
4983
|
nudgeReadingAid,
|
|
4984
|
+
positionTooltip,
|
|
4646
4985
|
preferencesReducer,
|
|
4647
4986
|
registerLocale,
|
|
4648
4987
|
resolveEffectivePreferences,
|