@lostgradient/cinder 0.1.1 → 0.2.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/CHANGELOG.md +62 -0
- package/README.md +163 -0
- package/components.json +390 -3
- package/dist/_internal/chart/chart-focus-ring.d.ts +57 -0
- package/dist/_internal/chart/chart-utilities.d.ts +2 -0
- package/dist/_internal/chart/heatmap-utilities.d.ts +60 -0
- package/dist/components/accordion/index.js +14 -1
- package/dist/components/alert/alert.schema.js +3 -3
- package/dist/components/alert/alert.types.d.ts +3 -2
- package/dist/components/alert/index.js +3 -2
- package/dist/components/alert-dialog/index.js +11 -2
- package/dist/components/area-chart/area-chart.css +57 -7
- package/dist/components/area-chart/index.js +283 -40
- package/dist/components/avatar-group/avatar-group.css +2 -3
- package/dist/components/badge/badge.css +17 -0
- package/dist/components/badge/badge.schema.js +6 -1
- package/dist/components/badge/badge.types.d.ts +7 -0
- package/dist/components/badge/index.js +4 -2
- package/dist/components/bar-chart/bar-chart.css +57 -7
- package/dist/components/bar-chart/index.js +233 -45
- package/dist/components/button/button.css +5 -3
- package/dist/components/button/index.js +11 -2
- package/dist/components/capability-gate/capability-gate.css +131 -0
- package/dist/components/capability-gate/capability-gate.schema.d.ts +3 -0
- package/dist/components/capability-gate/capability-gate.schema.js +128 -0
- package/dist/components/capability-gate/capability-gate.svelte.d.ts +19 -0
- package/dist/components/capability-gate/capability-gate.types.d.ts +70 -0
- package/dist/components/capability-gate/capability-gate.variables.d.ts +2 -0
- package/dist/components/capability-gate/capability-gate.variables.js +61 -0
- package/dist/components/capability-gate/index.d.ts +5 -0
- package/dist/components/capability-gate/index.js +285 -0
- package/dist/components/card/card.css +4 -0
- package/dist/components/card/card.schema.js +5 -1
- package/dist/components/card/card.svelte.d.ts +1 -1
- package/dist/components/card/card.types.d.ts +4 -0
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +8 -4
- package/dist/components/chat/index.css +2 -2
- package/dist/components/chat/index.js +159 -81
- package/dist/components/choice-grid/choice-grid-context.d.ts +23 -0
- package/dist/components/choice-grid/choice-grid.css +27 -0
- package/dist/components/choice-grid/choice-grid.schema.d.ts +3 -0
- package/dist/components/choice-grid/choice-grid.schema.js +121 -0
- package/dist/components/choice-grid/choice-grid.svelte.d.ts +20 -0
- package/dist/components/choice-grid/choice-grid.types.d.ts +122 -0
- package/dist/components/choice-grid/choice-grid.variables.d.ts +2 -0
- package/dist/components/choice-grid/choice-grid.variables.js +61 -0
- package/dist/components/choice-grid/index.d.ts +13 -0
- package/dist/components/choice-grid/index.js +466 -0
- package/dist/components/choice-grid-item/choice-grid-item.css +139 -0
- package/dist/components/choice-grid-item/choice-grid-item.schema.d.ts +3 -0
- package/dist/components/choice-grid-item/choice-grid-item.schema.js +93 -0
- package/dist/components/choice-grid-item/choice-grid-item.svelte.d.ts +17 -0
- package/dist/components/choice-grid-item/choice-grid-item.types.d.ts +24 -0
- package/dist/components/choice-grid-item/choice-grid-item.variables.d.ts +2 -0
- package/dist/components/choice-grid-item/choice-grid-item.variables.js +61 -0
- package/dist/components/choice-grid-item/index.d.ts +5 -0
- package/dist/components/choice-grid-item/index.js +203 -0
- package/dist/components/color-field/color-field.css +6 -9
- package/dist/components/color-picker/color-picker.css +31 -24
- package/dist/components/color-swatch-picker/color-swatch-picker.css +6 -9
- package/dist/components/confirm-dialog/index.js +11 -2
- package/dist/components/context-menu/index.js +114 -43
- package/dist/components/context-menu-trigger/index.js +6 -4
- package/dist/components/data-table/data-table.css +30 -0
- package/dist/components/data-table/data-table.schema.d.ts +3 -0
- package/dist/components/data-table/data-table.schema.js +103 -0
- package/dist/components/data-table/data-table.svelte.d.ts +39 -0
- package/dist/components/data-table/data-table.types.d.ts +86 -0
- package/dist/components/data-table/data-table.variables.d.ts +2 -0
- package/dist/components/data-table/data-table.variables.js +61 -0
- package/dist/components/data-table/index.d.ts +5 -0
- package/dist/components/data-table/index.js +591 -0
- package/dist/components/diff-viewer/index.js +14 -3
- package/dist/components/dropdown/index.js +115 -46
- package/dist/components/dropdown-item/dropdown-item.schema.js +13 -1
- package/dist/components/dropdown-item/dropdown-item.svelte.d.ts +1 -1
- package/dist/components/dropdown-item/dropdown-item.types.d.ts +46 -2
- package/dist/components/dropdown-item/index.d.ts +1 -1
- package/dist/components/dropdown-item/index.js +97 -28
- package/dist/components/floating-action-button/floating-action-button.css +4 -2
- package/dist/components/json-schema-editor/index.js +29 -4
- package/dist/components/keyboard-shortcuts/index.d.ts +5 -0
- package/dist/components/keyboard-shortcuts/index.js +238 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.css +84 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.schema.d.ts +3 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.schema.js +87 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.svelte.d.ts +17 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.types.d.ts +42 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.variables.d.ts +2 -0
- package/dist/components/keyboard-shortcuts/keyboard-shortcuts.variables.js +61 -0
- package/dist/components/line-chart/index.js +283 -40
- package/dist/components/line-chart/line-chart.css +57 -8
- package/dist/components/markdown-editor/index.js +129 -51
- package/dist/components/matrix-chart/index.d.ts +5 -0
- package/dist/components/matrix-chart/index.js +1232 -0
- package/dist/components/matrix-chart/matrix-chart.css +50 -0
- package/dist/components/matrix-chart/matrix-chart.schema.d.ts +3 -0
- package/dist/components/matrix-chart/matrix-chart.schema.js +123 -0
- package/dist/components/matrix-chart/matrix-chart.svelte.d.ts +20 -0
- package/dist/components/matrix-chart/matrix-chart.types.d.ts +52 -0
- package/dist/components/matrix-chart/matrix-chart.variables.d.ts +2 -0
- package/dist/components/matrix-chart/matrix-chart.variables.js +61 -0
- package/dist/components/media-controls/index.d.ts +5 -0
- package/dist/components/media-controls/index.js +338 -0
- package/dist/components/media-controls/media-controls.css +112 -0
- package/dist/components/media-controls/media-controls.schema.d.ts +3 -0
- package/dist/components/media-controls/media-controls.schema.js +125 -0
- package/dist/components/media-controls/media-controls.svelte.d.ts +18 -0
- package/dist/components/media-controls/media-controls.types.d.ts +77 -0
- package/dist/components/media-controls/media-controls.variables.d.ts +2 -0
- package/dist/components/media-controls/media-controls.variables.js +61 -0
- package/dist/components/navigation-bar/navigation-bar.schema.js +5 -5
- package/dist/components/navigation-bar/navigation-bar.types.d.ts +2 -1
- package/dist/components/pricing-card/index.d.ts +5 -0
- package/dist/components/pricing-card/index.js +406 -0
- package/dist/components/pricing-card/pricing-card.css +173 -0
- package/dist/components/pricing-card/pricing-card.schema.d.ts +3 -0
- package/dist/components/pricing-card/pricing-card.schema.js +100 -0
- package/dist/components/pricing-card/pricing-card.svelte.d.ts +18 -0
- package/dist/components/pricing-card/pricing-card.types.d.ts +47 -0
- package/dist/components/pricing-card/pricing-card.variables.d.ts +2 -0
- package/dist/components/pricing-card/pricing-card.variables.js +61 -0
- package/dist/components/review-editor/index.js +212 -132
- package/dist/components/share-card/index.d.ts +5 -0
- package/dist/components/share-card/index.js +446 -0
- package/dist/components/share-card/share-card.css +115 -0
- package/dist/components/share-card/share-card.schema.d.ts +3 -0
- package/dist/components/share-card/share-card.schema.js +113 -0
- package/dist/components/share-card/share-card.svelte.d.ts +18 -0
- package/dist/components/share-card/share-card.types.d.ts +66 -0
- package/dist/components/share-card/share-card.variables.d.ts +2 -0
- package/dist/components/share-card/share-card.variables.js +61 -0
- package/dist/components/shortcut-hint/index.d.ts +5 -0
- package/dist/components/shortcut-hint/index.js +197 -0
- package/dist/components/shortcut-hint/shortcut-hint.css +26 -0
- package/dist/components/shortcut-hint/shortcut-hint.schema.d.ts +3 -0
- package/dist/components/shortcut-hint/shortcut-hint.schema.js +96 -0
- package/dist/components/shortcut-hint/shortcut-hint.svelte.d.ts +17 -0
- package/dist/components/shortcut-hint/shortcut-hint.types.d.ts +33 -0
- package/dist/components/shortcut-hint/shortcut-hint.variables.d.ts +2 -0
- package/dist/components/shortcut-hint/shortcut-hint.variables.js +61 -0
- package/dist/components/skip-link/index.d.ts +4 -0
- package/dist/components/skip-link/index.js +180 -0
- package/dist/components/skip-link/skip-link.schema.d.ts +3 -0
- package/dist/components/skip-link/skip-link.schema.js +76 -0
- package/dist/components/skip-link/skip-link.svelte.d.ts +19 -0
- package/dist/components/skip-link/skip-link.types.d.ts +38 -0
- package/dist/components/skip-link/skip-link.variables.d.ts +2 -0
- package/dist/components/skip-link/skip-link.variables.js +61 -0
- package/dist/components/spectrogram/index.d.ts +5 -0
- package/dist/components/spectrogram/index.js +1156 -0
- package/dist/components/spectrogram/spectrogram.css +43 -0
- package/dist/components/spectrogram/spectrogram.schema.d.ts +3 -0
- package/dist/components/spectrogram/spectrogram.schema.js +103 -0
- package/dist/components/spectrogram/spectrogram.svelte.d.ts +21 -0
- package/dist/components/spectrogram/spectrogram.types.d.ts +60 -0
- package/dist/components/spectrogram/spectrogram.variables.d.ts +2 -0
- package/dist/components/spectrogram/spectrogram.variables.js +61 -0
- package/dist/components/spectrum-chart/index.d.ts +5 -0
- package/dist/components/spectrum-chart/index.js +1056 -0
- package/dist/components/spectrum-chart/spectrum-chart.css +49 -0
- package/dist/components/spectrum-chart/spectrum-chart.schema.d.ts +3 -0
- package/dist/components/spectrum-chart/spectrum-chart.schema.js +97 -0
- package/dist/components/spectrum-chart/spectrum-chart.svelte.d.ts +21 -0
- package/dist/components/spectrum-chart/spectrum-chart.types.d.ts +41 -0
- package/dist/components/spectrum-chart/spectrum-chart.variables.d.ts +2 -0
- package/dist/components/spectrum-chart/spectrum-chart.variables.js +61 -0
- package/dist/components/status-dot/status-dot.css +8 -0
- package/dist/components/status-dot/status-dot.schema.js +3 -3
- package/dist/components/status-dot/status-dot.types.d.ts +5 -2
- package/dist/components/subscription-badge/index.d.ts +5 -0
- package/dist/components/subscription-badge/index.js +383 -0
- package/dist/components/subscription-badge/subscription-badge.css +18 -0
- package/dist/components/subscription-badge/subscription-badge.schema.d.ts +3 -0
- package/dist/components/subscription-badge/subscription-badge.schema.js +77 -0
- package/dist/components/subscription-badge/subscription-badge.svelte.d.ts +19 -0
- package/dist/components/subscription-badge/subscription-badge.types.d.ts +28 -0
- package/dist/components/subscription-badge/subscription-badge.variables.d.ts +2 -0
- package/dist/components/subscription-badge/subscription-badge.variables.js +61 -0
- package/dist/components/tab/index.js +14 -1
- package/dist/components/table/index.js +26 -17
- package/dist/components/table-cell/index.js +18 -9
- package/dist/components/table-cell/table-cell.schema.js +5 -1
- package/dist/components/table-cell/table-cell.types.d.ts +16 -1
- package/dist/components/tabs/index.js +14 -1
- package/dist/components/waveform/index.d.ts +5 -0
- package/dist/components/waveform/index.js +1075 -0
- package/dist/components/waveform/waveform.css +53 -0
- package/dist/components/waveform/waveform.schema.d.ts +3 -0
- package/dist/components/waveform/waveform.schema.js +98 -0
- package/dist/components/waveform/waveform.svelte.d.ts +20 -0
- package/dist/components/waveform/waveform.types.d.ts +42 -0
- package/dist/components/waveform/waveform.variables.d.ts +2 -0
- package/dist/components/waveform/waveform.variables.js +61 -0
- package/dist/index.d.ts +33 -2
- package/dist/index.js +144 -115
- package/dist/server/components/accordion/index.js +14 -1
- package/dist/server/components/alert/alert.schema.js +3 -3
- package/dist/server/components/alert/index.js +3 -2
- package/dist/server/components/alert-dialog/index.js +12 -3
- package/dist/server/components/area-chart/index.css +50 -3
- package/dist/server/components/area-chart/index.js +181 -2
- package/dist/server/components/avatar-group/index.css +1 -1
- package/dist/server/components/badge/badge.schema.js +6 -1
- package/dist/server/components/badge/index.css +4 -0
- package/dist/server/components/badge/index.js +3 -1
- package/dist/server/components/bar-chart/index.css +50 -3
- package/dist/server/components/bar-chart/index.js +166 -2
- package/dist/server/components/button/index.css +1 -1
- package/dist/server/components/button/index.js +12 -3
- package/dist/server/components/capability-gate/capability-gate.schema.js +110 -0
- package/dist/server/components/capability-gate/capability-gate.variables.js +43 -0
- package/dist/server/components/capability-gate/index.css +121 -0
- package/dist/server/components/capability-gate/index.js +168 -0
- package/dist/server/components/card/card.schema.js +5 -1
- package/dist/server/components/card/index.css +9 -1
- package/dist/server/components/card/index.js +3 -2
- package/dist/server/components/chat/index.css +2 -2
- package/dist/server/components/chat/index.js +78 -19
- package/dist/server/components/choice-grid/choice-grid.schema.js +103 -0
- package/dist/server/components/choice-grid/choice-grid.variables.js +43 -0
- package/dist/server/components/choice-grid/index.css +103 -0
- package/dist/server/components/choice-grid/index.js +383 -0
- package/dist/server/components/choice-grid-item/choice-grid-item.schema.js +75 -0
- package/dist/server/components/choice-grid-item/choice-grid-item.variables.js +43 -0
- package/dist/server/components/choice-grid-item/index.css +86 -0
- package/dist/server/components/choice-grid-item/index.js +139 -0
- package/dist/server/components/color-field/index.css +2 -4
- package/dist/server/components/color-picker/index.css +14 -10
- package/dist/server/components/color-swatch-picker/index.css +2 -4
- package/dist/server/components/confirm-dialog/index.js +12 -3
- package/dist/server/components/context-menu/index.js +72 -20
- package/dist/server/components/context-menu-trigger/index.js +6 -4
- package/dist/server/components/data-table/data-table.schema.js +85 -0
- package/dist/server/components/data-table/data-table.variables.js +43 -0
- package/dist/server/components/data-table/index.css +182 -0
- package/dist/server/components/data-table/index.js +469 -0
- package/dist/server/components/diff-viewer/index.js +14 -3
- package/dist/server/components/dropdown/index.js +67 -17
- package/dist/server/components/dropdown-item/dropdown-item.schema.js +13 -1
- package/dist/server/components/dropdown-item/index.js +67 -17
- package/dist/server/components/floating-action-button/index.css +1 -1
- package/dist/server/components/json-schema-editor/index.js +29 -4
- package/dist/server/components/keyboard-shortcuts/index.css +86 -0
- package/dist/server/components/keyboard-shortcuts/index.js +149 -0
- package/dist/server/components/keyboard-shortcuts/keyboard-shortcuts.schema.js +69 -0
- package/dist/server/components/keyboard-shortcuts/keyboard-shortcuts.variables.js +43 -0
- package/dist/server/components/line-chart/index.css +50 -3
- package/dist/server/components/line-chart/index.js +181 -2
- package/dist/server/components/markdown-editor/index.js +78 -19
- package/dist/server/components/matrix-chart/index.css +52 -0
- package/dist/server/components/matrix-chart/index.js +1026 -0
- package/dist/server/components/matrix-chart/matrix-chart.schema.js +105 -0
- package/dist/server/components/matrix-chart/matrix-chart.variables.js +43 -0
- package/dist/server/components/media-controls/index.css +109 -0
- package/dist/server/components/media-controls/index.js +192 -0
- package/dist/server/components/media-controls/media-controls.schema.js +107 -0
- package/dist/server/components/media-controls/media-controls.variables.js +43 -0
- package/dist/server/components/navigation-bar/navigation-bar.schema.js +5 -5
- package/dist/server/components/pricing-card/index.css +131 -0
- package/dist/server/components/pricing-card/index.js +258 -0
- package/dist/server/components/pricing-card/pricing-card.schema.js +82 -0
- package/dist/server/components/pricing-card/pricing-card.variables.js +43 -0
- package/dist/server/components/review-editor/index.css +2 -2
- package/dist/server/components/review-editor/index.js +80 -19
- package/dist/server/components/share-card/index.css +113 -0
- package/dist/server/components/share-card/index.js +270 -0
- package/dist/server/components/share-card/share-card.schema.js +95 -0
- package/dist/server/components/share-card/share-card.variables.js +43 -0
- package/dist/server/components/shortcut-hint/index.css +28 -0
- package/dist/server/components/shortcut-hint/index.js +134 -0
- package/dist/server/components/shortcut-hint/shortcut-hint.schema.js +78 -0
- package/dist/server/components/shortcut-hint/shortcut-hint.variables.js +43 -0
- package/dist/server/components/skip-link/index.js +141 -0
- package/dist/server/components/skip-link/skip-link.schema.js +58 -0
- package/dist/server/components/skip-link/skip-link.variables.js +43 -0
- package/dist/server/components/spectrogram/index.css +45 -0
- package/dist/server/components/spectrogram/index.js +970 -0
- package/dist/server/components/spectrogram/spectrogram.schema.js +85 -0
- package/dist/server/components/spectrogram/spectrogram.variables.js +43 -0
- package/dist/server/components/spectrum-chart/index.css +51 -0
- package/dist/server/components/spectrum-chart/index.js +871 -0
- package/dist/server/components/spectrum-chart/spectrum-chart.schema.js +79 -0
- package/dist/server/components/spectrum-chart/spectrum-chart.variables.js +43 -0
- package/dist/server/components/status-dot/index.css +8 -0
- package/dist/server/components/status-dot/status-dot.schema.js +3 -3
- package/dist/server/components/subscription-badge/index.css +2 -0
- package/dist/server/components/subscription-badge/index.js +339 -0
- package/dist/server/components/subscription-badge/subscription-badge.schema.js +59 -0
- package/dist/server/components/subscription-badge/subscription-badge.variables.js +43 -0
- package/dist/server/components/tab/index.js +14 -1
- package/dist/server/components/table/index.js +13 -8
- package/dist/server/components/table-cell/index.js +13 -8
- package/dist/server/components/table-cell/table-cell.schema.js +5 -1
- package/dist/server/components/tabs/index.js +14 -1
- package/dist/server/components/waveform/index.css +55 -0
- package/dist/server/components/waveform/index.js +907 -0
- package/dist/server/components/waveform/waveform.schema.js +80 -0
- package/dist/server/components/waveform/waveform.variables.js +43 -0
- package/dist/server/index.css +1137 -55
- package/dist/server/index.js +4225 -1750
- package/package.json +380 -2
- package/src/_internal/chart/chart-focus-ring.ts +209 -0
- package/src/_internal/chart/chart-utilities.ts +4 -0
- package/src/_internal/chart/heatmap-utilities.ts +159 -0
- package/src/components/accordion/accordion.examples.json +1 -0
- package/src/components/alert/README.md +5 -5
- package/src/components/alert/alert.schema.json +2 -2
- package/src/components/alert/alert.schema.ts +3 -2
- package/src/components/alert/alert.svelte +5 -1
- package/src/components/alert/alert.types.ts +3 -2
- package/src/components/area-chart/README.md +62 -0
- package/src/components/area-chart/area-chart.css +57 -7
- package/src/components/area-chart/area-chart.svelte +128 -10
- package/src/components/avatar-group/avatar-group.css +2 -3
- package/src/components/avatar-group/avatar-group.examples.json +1 -0
- package/src/components/backdrop/README.md +56 -0
- package/src/components/badge/README.md +6 -5
- package/src/components/badge/badge.css +17 -0
- package/src/components/badge/badge.schema.json +5 -0
- package/src/components/badge/badge.schema.ts +6 -0
- package/src/components/badge/badge.svelte +2 -0
- package/src/components/badge/badge.types.ts +7 -0
- package/src/components/bar-chart/README.md +65 -0
- package/src/components/bar-chart/bar-chart.css +57 -7
- package/src/components/bar-chart/bar-chart.svelte +94 -13
- package/src/components/button/button.css +5 -3
- package/src/components/button/button.examples.json +1 -0
- package/src/components/button/button.svelte +15 -0
- package/src/components/capability-gate/README.md +60 -0
- package/src/components/capability-gate/capability-gate.css +131 -0
- package/src/components/capability-gate/capability-gate.examples.json +19 -0
- package/src/components/capability-gate/capability-gate.schema.json +68 -0
- package/src/components/capability-gate/capability-gate.schema.ts +72 -0
- package/src/components/capability-gate/capability-gate.svelte +186 -0
- package/src/components/capability-gate/capability-gate.types.ts +83 -0
- package/src/components/capability-gate/capability-gate.variables.json +1 -0
- package/src/components/capability-gate/capability-gate.variables.ts +3 -0
- package/src/components/capability-gate/index.ts +10 -0
- package/src/components/card/README.md +1 -0
- package/src/components/card/card.css +4 -0
- package/src/components/card/card.examples.json +6 -0
- package/src/components/card/card.schema.json +4 -0
- package/src/components/card/card.schema.ts +5 -0
- package/src/components/card/card.svelte +9 -2
- package/src/components/card/card.types.ts +4 -0
- package/src/components/card/index.ts +1 -1
- package/src/components/chat/README.md +81 -0
- package/src/components/chat/container/chat-jump-controls.svelte +12 -9
- package/src/components/chat/input/chat-input.svelte +7 -8
- package/src/components/chat/message/chat-message.svelte +15 -20
- package/src/components/chat/message/tool-call-group.svelte +10 -4
- package/src/components/choice-grid/README.md +66 -0
- package/src/components/choice-grid/choice-grid-context.ts +30 -0
- package/src/components/choice-grid/choice-grid.css +27 -0
- package/src/components/choice-grid/choice-grid.examples.json +31 -0
- package/src/components/choice-grid/choice-grid.schema.json +61 -0
- package/src/components/choice-grid/choice-grid.schema.ts +70 -0
- package/src/components/choice-grid/choice-grid.svelte +272 -0
- package/src/components/choice-grid/choice-grid.types.ts +152 -0
- package/src/components/choice-grid/choice-grid.variables.json +1 -0
- package/src/components/choice-grid/choice-grid.variables.ts +3 -0
- package/src/components/choice-grid/index.ts +22 -0
- package/src/components/choice-grid-item/README.md +41 -0
- package/src/components/choice-grid-item/choice-grid-item.css +139 -0
- package/src/components/choice-grid-item/choice-grid-item.schema.json +32 -0
- package/src/components/choice-grid-item/choice-grid-item.schema.ts +38 -0
- package/src/components/choice-grid-item/choice-grid-item.svelte +139 -0
- package/src/components/choice-grid-item/choice-grid-item.types.ts +30 -0
- package/src/components/choice-grid-item/choice-grid-item.variables.json +1 -0
- package/src/components/choice-grid-item/choice-grid-item.variables.ts +3 -0
- package/src/components/choice-grid-item/index.ts +6 -0
- package/src/components/click-away-listener/README.md +50 -0
- package/src/components/color-field/color-field.css +6 -9
- package/src/components/color-picker/color-picker.css +31 -24
- package/src/components/color-swatch-picker/color-swatch-picker.css +6 -9
- package/src/components/command-menu/README.md +61 -0
- package/src/components/confirm-dialog/confirm-dialog.examples.json +6 -0
- package/src/components/context-menu/README.md +55 -0
- package/src/components/context-menu-trigger/README.md +50 -0
- package/src/components/context-menu-trigger/context-menu-trigger.svelte +5 -3
- package/src/components/data-table/README.md +67 -0
- package/src/components/data-table/data-table.css +30 -0
- package/src/components/data-table/data-table.examples.json +19 -0
- package/src/components/data-table/data-table.schema.json +43 -0
- package/src/components/data-table/data-table.schema.ts +50 -0
- package/src/components/data-table/data-table.svelte +106 -0
- package/src/components/data-table/data-table.types.ts +89 -0
- package/src/components/data-table/data-table.variables.json +1 -0
- package/src/components/data-table/data-table.variables.ts +3 -0
- package/src/components/data-table/index.ts +6 -0
- package/src/components/diff-viewer/README.md +59 -0
- package/src/components/diff-viewer/front-matter-header.svelte +20 -4
- package/src/components/dropdown-group/README.md +52 -0
- package/src/components/dropdown-item/README.md +10 -7
- package/src/components/dropdown-item/dropdown-item.schema.json +12 -0
- package/src/components/dropdown-item/dropdown-item.schema.ts +14 -0
- package/src/components/dropdown-item/dropdown-item.svelte +108 -25
- package/src/components/dropdown-item/dropdown-item.types.ts +58 -2
- package/src/components/dropdown-item/index.ts +6 -1
- package/src/components/floating-action-button/README.md +53 -0
- package/src/components/floating-action-button/floating-action-button.css +4 -2
- package/src/components/form-section/form-section.examples.json +6 -0
- package/src/components/hover-card/README.md +60 -0
- package/src/components/json-schema-editor/README.md +59 -0
- package/src/components/kanban-board/README.md +62 -0
- package/src/components/keyboard-shortcuts/README.md +51 -0
- package/src/components/keyboard-shortcuts/index.ts +10 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.css +84 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.examples.json +13 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.schema.json +27 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.schema.ts +31 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.svelte +91 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.types.ts +46 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.variables.json +1 -0
- package/src/components/keyboard-shortcuts/keyboard-shortcuts.variables.ts +3 -0
- package/src/components/line-chart/README.md +61 -0
- package/src/components/line-chart/line-chart.css +57 -8
- package/src/components/line-chart/line-chart.svelte +128 -10
- package/src/components/link/README.md +55 -0
- package/src/components/markdown-editor/README.md +70 -0
- package/src/components/markdown-editor/editor-toolbar/toolbar-button.svelte +9 -4
- package/src/components/markdown-editor/editor-toolbar/toolbar-dropdown.svelte +9 -4
- package/src/components/markdown-editor/prosemirror.css +4 -2
- package/src/components/matrix-chart/README.md +61 -0
- package/src/components/matrix-chart/index.ts +10 -0
- package/src/components/matrix-chart/matrix-chart.css +50 -0
- package/src/components/matrix-chart/matrix-chart.examples.json +19 -0
- package/src/components/matrix-chart/matrix-chart.schema.json +63 -0
- package/src/components/matrix-chart/matrix-chart.schema.ts +67 -0
- package/src/components/matrix-chart/matrix-chart.svelte +336 -0
- package/src/components/matrix-chart/matrix-chart.types.ts +56 -0
- package/src/components/matrix-chart/matrix-chart.variables.json +1 -0
- package/src/components/matrix-chart/matrix-chart.variables.ts +3 -0
- package/src/components/media-controls/README.md +60 -0
- package/src/components/media-controls/index.ts +6 -0
- package/src/components/media-controls/media-controls.css +112 -0
- package/src/components/media-controls/media-controls.examples.json +19 -0
- package/src/components/media-controls/media-controls.schema.json +65 -0
- package/src/components/media-controls/media-controls.schema.ts +69 -0
- package/src/components/media-controls/media-controls.svelte +238 -0
- package/src/components/media-controls/media-controls.types.ts +80 -0
- package/src/components/media-controls/media-controls.variables.json +1 -0
- package/src/components/media-controls/media-controls.variables.ts +3 -0
- package/src/components/menu-bar/README.md +53 -0
- package/src/components/navigation-bar/README.md +1 -1
- package/src/components/navigation-bar/navigation-bar.schema.json +4 -4
- package/src/components/navigation-bar/navigation-bar.schema.ts +4 -4
- package/src/components/navigation-bar/navigation-bar.types.ts +2 -1
- package/src/components/pricing-card/README.md +55 -0
- package/src/components/pricing-card/index.ts +6 -0
- package/src/components/pricing-card/pricing-card.css +173 -0
- package/src/components/pricing-card/pricing-card.examples.json +19 -0
- package/src/components/pricing-card/pricing-card.schema.json +40 -0
- package/src/components/pricing-card/pricing-card.schema.ts +44 -0
- package/src/components/pricing-card/pricing-card.svelte +70 -0
- package/src/components/pricing-card/pricing-card.types.ts +49 -0
- package/src/components/pricing-card/pricing-card.variables.json +1 -0
- package/src/components/pricing-card/pricing-card.variables.ts +3 -0
- package/src/components/review-editor/README.md +64 -0
- package/src/components/review-editor/comment-composer.svelte +8 -8
- package/src/components/review-editor/comment-list.svelte +10 -1
- package/src/components/search-field/search-field.examples.json +13 -0
- package/src/components/segment/README.md +55 -0
- package/src/components/share-card/README.md +58 -0
- package/src/components/share-card/index.ts +6 -0
- package/src/components/share-card/share-card.css +115 -0
- package/src/components/share-card/share-card.examples.json +19 -0
- package/src/components/share-card/share-card.schema.json +53 -0
- package/src/components/share-card/share-card.schema.ts +57 -0
- package/src/components/share-card/share-card.svelte +330 -0
- package/src/components/share-card/share-card.types.ts +69 -0
- package/src/components/share-card/share-card.variables.json +1 -0
- package/src/components/share-card/share-card.variables.ts +3 -0
- package/src/components/shortcut-hint/README.md +52 -0
- package/src/components/shortcut-hint/index.ts +6 -0
- package/src/components/shortcut-hint/shortcut-hint.css +26 -0
- package/src/components/shortcut-hint/shortcut-hint.examples.json +13 -0
- package/src/components/shortcut-hint/shortcut-hint.schema.json +36 -0
- package/src/components/shortcut-hint/shortcut-hint.schema.ts +40 -0
- package/src/components/shortcut-hint/shortcut-hint.svelte +62 -0
- package/src/components/shortcut-hint/shortcut-hint.types.ts +35 -0
- package/src/components/shortcut-hint/shortcut-hint.variables.json +1 -0
- package/src/components/shortcut-hint/shortcut-hint.variables.ts +3 -0
- package/src/components/side-navigation/side-navigation.examples.json +6 -0
- package/src/components/skip-link/README.md +50 -0
- package/src/components/skip-link/index.ts +5 -0
- package/src/components/skip-link/skip-link.examples.json +13 -0
- package/src/components/skip-link/skip-link.schema.json +16 -0
- package/src/components/skip-link/skip-link.schema.ts +20 -0
- package/src/components/skip-link/skip-link.svelte +86 -0
- package/src/components/skip-link/skip-link.types.ts +40 -0
- package/src/components/skip-link/skip-link.variables.json +1 -0
- package/src/components/skip-link/skip-link.variables.ts +3 -0
- package/src/components/spectrogram/README.md +58 -0
- package/src/components/spectrogram/index.ts +10 -0
- package/src/components/spectrogram/spectrogram.css +43 -0
- package/src/components/spectrogram/spectrogram.examples.json +13 -0
- package/src/components/spectrogram/spectrogram.schema.json +43 -0
- package/src/components/spectrogram/spectrogram.schema.ts +47 -0
- package/src/components/spectrogram/spectrogram.svelte +284 -0
- package/src/components/spectrogram/spectrogram.types.ts +63 -0
- package/src/components/spectrogram/spectrogram.variables.json +1 -0
- package/src/components/spectrogram/spectrogram.variables.ts +3 -0
- package/src/components/spectrum-chart/README.md +57 -0
- package/src/components/spectrum-chart/index.ts +10 -0
- package/src/components/spectrum-chart/spectrum-chart.css +49 -0
- package/src/components/spectrum-chart/spectrum-chart.examples.json +13 -0
- package/src/components/spectrum-chart/spectrum-chart.schema.json +37 -0
- package/src/components/spectrum-chart/spectrum-chart.schema.ts +41 -0
- package/src/components/spectrum-chart/spectrum-chart.svelte +247 -0
- package/src/components/spectrum-chart/spectrum-chart.types.ts +44 -0
- package/src/components/spectrum-chart/spectrum-chart.variables.json +1 -0
- package/src/components/spectrum-chart/spectrum-chart.variables.ts +3 -0
- package/src/components/status-dot/README.md +7 -7
- package/src/components/status-dot/status-dot.css +8 -0
- package/src/components/status-dot/status-dot.schema.json +2 -2
- package/src/components/status-dot/status-dot.schema.ts +3 -2
- package/src/components/status-dot/status-dot.types.ts +13 -2
- package/src/components/subscription-badge/README.md +50 -0
- package/src/components/subscription-badge/index.ts +6 -0
- package/src/components/subscription-badge/subscription-badge.css +18 -0
- package/src/components/subscription-badge/subscription-badge.examples.json +19 -0
- package/src/components/subscription-badge/subscription-badge.schema.json +16 -0
- package/src/components/subscription-badge/subscription-badge.schema.ts +21 -0
- package/src/components/subscription-badge/subscription-badge.svelte +69 -0
- package/src/components/subscription-badge/subscription-badge.types.ts +37 -0
- package/src/components/subscription-badge/subscription-badge.variables.json +1 -0
- package/src/components/subscription-badge/subscription-badge.variables.ts +3 -0
- package/src/components/table-cell/README.md +6 -5
- package/src/components/table-cell/table-cell.schema.json +4 -0
- package/src/components/table-cell/table-cell.schema.ts +5 -0
- package/src/components/table-cell/table-cell.svelte +9 -3
- package/src/components/table-cell/table-cell.types.ts +16 -1
- package/src/components/tag-input/README.md +75 -0
- package/src/components/typography/README.md +51 -0
- package/src/components/waveform/README.md +57 -0
- package/src/components/waveform/index.ts +6 -0
- package/src/components/waveform/waveform.css +53 -0
- package/src/components/waveform/waveform.examples.json +19 -0
- package/src/components/waveform/waveform.schema.json +38 -0
- package/src/components/waveform/waveform.schema.ts +42 -0
- package/src/components/waveform/waveform.svelte +286 -0
- package/src/components/waveform/waveform.types.ts +45 -0
- package/src/components/waveform/waveform.variables.json +1 -0
- package/src/components/waveform/waveform.variables.ts +3 -0
- package/src/index.ts +85 -2
- package/src/styles/components.css +13 -0
- package/src/styles/shell.css +3 -0
- package/src/styles/tokens-base.css +59 -22
|
@@ -8,6 +8,8 @@ export type BadgeSize = 'xs' | 'sm' | 'md';
|
|
|
8
8
|
export type BadgeProps = HTMLAttributes<HTMLSpanElement> & {
|
|
9
9
|
variant?: BadgeVariant;
|
|
10
10
|
size?: BadgeSize;
|
|
11
|
+
/** Render the badge label in a monospace font. */
|
|
12
|
+
mono?: boolean;
|
|
11
13
|
class?: string;
|
|
12
14
|
/**
|
|
13
15
|
* Badge content — intentionally required. A badge without content is
|
|
@@ -28,6 +30,11 @@ export interface BadgeSchemaProps {
|
|
|
28
30
|
* @default "md"
|
|
29
31
|
*/
|
|
30
32
|
size?: BadgeSize;
|
|
33
|
+
/**
|
|
34
|
+
* Render the badge label in a monospace font. Useful for version strings, error codes, or other technical labels.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
mono?: boolean;
|
|
31
38
|
/** Custom class merged with `.cinder-badge`. */
|
|
32
39
|
class?: string;
|
|
33
40
|
}
|
|
@@ -67,12 +67,13 @@ function classNames(...parts) {
|
|
|
67
67
|
var root = $.from_html(`<span><!></span>`);
|
|
68
68
|
function Badge($$anchor, $$props) {
|
|
69
69
|
$.push($$props, true);
|
|
70
|
-
let variant = $.prop($$props, "variant", 3, "neutral"), size = $.prop($$props, "size", 3, "md"), rest = $.rest_props($$props, [
|
|
70
|
+
let variant = $.prop($$props, "variant", 3, "neutral"), size = $.prop($$props, "size", 3, "md"), mono = $.prop($$props, "mono", 3, false), rest = $.rest_props($$props, [
|
|
71
71
|
"$$slots",
|
|
72
72
|
"$$events",
|
|
73
73
|
"$$legacy",
|
|
74
74
|
"variant",
|
|
75
75
|
"size",
|
|
76
|
+
"mono",
|
|
76
77
|
"class",
|
|
77
78
|
"children"
|
|
78
79
|
]);
|
|
@@ -81,6 +82,7 @@ function Badge($$anchor, $$props) {
|
|
|
81
82
|
class: $0,
|
|
82
83
|
"data-cinder-variant": variant(),
|
|
83
84
|
"data-cinder-size": size(),
|
|
85
|
+
"data-cinder-mono": mono() ? "" : undefined,
|
|
84
86
|
...rest
|
|
85
87
|
}), [() => classNames("cinder-badge", $$props.class)]);
|
|
86
88
|
var node = $.child(span);
|
|
@@ -97,4 +99,4 @@ export {
|
|
|
97
99
|
Badge
|
|
98
100
|
};
|
|
99
101
|
|
|
100
|
-
//# debugId=
|
|
102
|
+
//# debugId=444406534289814864756E2164756E21
|
|
@@ -71,14 +71,64 @@
|
|
|
71
71
|
pointer-events: none;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
.cinder-bar-chart__focus-target:focus-visible:not([data-cinder-focus-ring-active='true']) {
|
|
75
|
+
fill: transparent;
|
|
76
|
+
stroke: var(--cinder-ring-color);
|
|
77
|
+
stroke-width: var(--cinder-ring-width);
|
|
78
|
+
vector-effect: non-scaling-stroke;
|
|
79
|
+
filter: none;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.cinder-bar-chart__focus-ring-layer {
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cinder-bar-chart__focus-ring,
|
|
87
|
+
.cinder-bar-chart__focus-ring-halo,
|
|
88
|
+
.cinder-bar-chart__focus-ring-connector,
|
|
89
|
+
.cinder-bar-chart__focus-ring-dot {
|
|
90
|
+
fill: none;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
vector-effect: non-scaling-stroke;
|
|
93
|
+
stroke-linecap: round;
|
|
94
|
+
stroke-linejoin: round;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.cinder-bar-chart__focus-ring {
|
|
98
|
+
stroke: var(--cinder-ring-color);
|
|
80
99
|
stroke-width: var(--cinder-ring-width);
|
|
81
|
-
filter:
|
|
100
|
+
filter: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.cinder-bar-chart__focus-ring-halo {
|
|
104
|
+
stroke: var(--cinder-ring-offset-color);
|
|
105
|
+
stroke-width: calc(
|
|
106
|
+
var(--cinder-ring-width) + var(--cinder-ring-offset) + var(--cinder-ring-offset)
|
|
107
|
+
);
|
|
108
|
+
filter: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media (forced-colors: active) {
|
|
112
|
+
.cinder-bar-chart__focus-ring-halo {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.cinder-bar-chart__focus-ring,
|
|
117
|
+
.cinder-bar-chart__focus-ring-connector,
|
|
118
|
+
.cinder-bar-chart__focus-ring-dot {
|
|
119
|
+
fill: none;
|
|
120
|
+
stroke: ButtonText;
|
|
121
|
+
stroke-width: var(--cinder-ring-width);
|
|
122
|
+
filter: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.cinder-bar-chart__focus-target:focus-visible:not([data-cinder-focus-ring-active='true']) {
|
|
126
|
+
fill: transparent;
|
|
127
|
+
stroke: ButtonText;
|
|
128
|
+
stroke-width: var(--cinder-ring-width);
|
|
129
|
+
vector-effect: non-scaling-stroke;
|
|
130
|
+
filter: none;
|
|
131
|
+
}
|
|
82
132
|
}
|
|
83
133
|
|
|
84
134
|
.cinder-bar-chart__tick-label {
|
|
@@ -388,6 +388,7 @@ function createBarModel(options) {
|
|
|
388
388
|
const categoryTicks = sortedCategories.map((category, index) => {
|
|
389
389
|
const categoryPosition = categoryScale(category.key) ?? 0;
|
|
390
390
|
return {
|
|
391
|
+
categoryKey: category.key,
|
|
391
392
|
label: formatXValue(category, orientation === "vertical" ? xAxis : yAxis, { index }),
|
|
392
393
|
x: orientation === "vertical" ? categoryPosition + categoryScale.bandwidth() / 2 : -8,
|
|
393
394
|
y: orientation === "vertical" ? geometry.plotHeight + 20 : categoryPosition + categoryScale.bandwidth() / 2
|
|
@@ -473,6 +474,7 @@ function createBarModel(options) {
|
|
|
473
474
|
});
|
|
474
475
|
if (rowValues.length > 0) {
|
|
475
476
|
tableRows.push({
|
|
477
|
+
categoryKey: category.key,
|
|
476
478
|
categoryLabel: formatXValue(category, orientation === "vertical" ? xAxis : yAxis, {
|
|
477
479
|
index: tableRows.length
|
|
478
480
|
}),
|
|
@@ -713,6 +715,125 @@ function formatPathNumber(value) {
|
|
|
713
715
|
return Number(value.toFixed(3)).toString();
|
|
714
716
|
}
|
|
715
717
|
|
|
718
|
+
// src/_internal/chart/chart-focus-ring.ts
|
|
719
|
+
var DEFAULT_CHART_FOCUS_RING_STROKE_PADDING = 8;
|
|
720
|
+
var DEFAULT_POINT_FOCUS_RING_RADIUS = 10;
|
|
721
|
+
var MINIMUM_FOCUS_RING_SIZE = 2;
|
|
722
|
+
var MINIMUM_BAR_FOCUS_RING_SIZE = 12;
|
|
723
|
+
var FOCUS_RING_DOT_RADIUS = 2.5;
|
|
724
|
+
function createPointFocusRingGeometry(options) {
|
|
725
|
+
const {
|
|
726
|
+
target,
|
|
727
|
+
plotWidth,
|
|
728
|
+
plotHeight,
|
|
729
|
+
strokePadding = DEFAULT_CHART_FOCUS_RING_STROKE_PADDING,
|
|
730
|
+
radius = DEFAULT_POINT_FOCUS_RING_RADIUS
|
|
731
|
+
} = options;
|
|
732
|
+
if (plotWidth <= 0 || plotHeight <= 0)
|
|
733
|
+
return null;
|
|
734
|
+
const drawableWidth = plotWidth - strokePadding * 2;
|
|
735
|
+
const drawableHeight = plotHeight - strokePadding * 2;
|
|
736
|
+
const largestDrawableRadius = Math.min(drawableWidth, drawableHeight) / 2;
|
|
737
|
+
if (largestDrawableRadius < MINIMUM_FOCUS_RING_SIZE || drawableWidth < FOCUS_RING_DOT_RADIUS * 2 || drawableHeight < FOCUS_RING_DOT_RADIUS * 2) {
|
|
738
|
+
return createPlotFrameFocusRingGeometry(plotWidth, plotHeight, strokePadding);
|
|
739
|
+
}
|
|
740
|
+
const resolvedRadius = Math.min(Math.max(radius, MINIMUM_FOCUS_RING_SIZE), largestDrawableRadius);
|
|
741
|
+
const minimumCenterX = strokePadding + resolvedRadius;
|
|
742
|
+
const maximumCenterX = plotWidth - strokePadding - resolvedRadius;
|
|
743
|
+
const minimumCenterY = strokePadding + resolvedRadius;
|
|
744
|
+
const maximumCenterY = plotHeight - strokePadding - resolvedRadius;
|
|
745
|
+
const cx = clamp(target.x, minimumCenterX, maximumCenterX);
|
|
746
|
+
const cy = clamp(target.y, minimumCenterY, maximumCenterY);
|
|
747
|
+
const dotInset = strokePadding + FOCUS_RING_DOT_RADIUS;
|
|
748
|
+
let targetX = clamp(target.x, dotInset, plotWidth - dotInset);
|
|
749
|
+
let targetY = clamp(target.y, dotInset, plotHeight - dotInset);
|
|
750
|
+
const initialOffsetX = targetX - cx;
|
|
751
|
+
const initialOffsetY = targetY - cy;
|
|
752
|
+
const initialOffsetDistance = Math.hypot(initialOffsetX, initialOffsetY);
|
|
753
|
+
if (initialOffsetDistance > resolvedRadius) {
|
|
754
|
+
const scale = resolvedRadius / initialOffsetDistance;
|
|
755
|
+
targetX = cx + initialOffsetX * scale;
|
|
756
|
+
targetY = cy + initialOffsetY * scale;
|
|
757
|
+
}
|
|
758
|
+
const offsetX = targetX - cx;
|
|
759
|
+
const offsetY = targetY - cy;
|
|
760
|
+
const offsetDistance = Math.hypot(offsetX, offsetY);
|
|
761
|
+
const geometry = {
|
|
762
|
+
kind: "point",
|
|
763
|
+
cx,
|
|
764
|
+
cy,
|
|
765
|
+
radius: resolvedRadius,
|
|
766
|
+
targetX,
|
|
767
|
+
targetY,
|
|
768
|
+
offsetX,
|
|
769
|
+
offsetY,
|
|
770
|
+
offsetDistance
|
|
771
|
+
};
|
|
772
|
+
if (offsetDistance <= 0)
|
|
773
|
+
return geometry;
|
|
774
|
+
return {
|
|
775
|
+
...geometry,
|
|
776
|
+
connector: {
|
|
777
|
+
x1: targetX,
|
|
778
|
+
y1: targetY,
|
|
779
|
+
x2: cx,
|
|
780
|
+
y2: cy
|
|
781
|
+
},
|
|
782
|
+
dot: {
|
|
783
|
+
cx: targetX,
|
|
784
|
+
cy: targetY,
|
|
785
|
+
radius: FOCUS_RING_DOT_RADIUS
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
function createBarFocusRingGeometry(options) {
|
|
790
|
+
const {
|
|
791
|
+
target,
|
|
792
|
+
plotWidth,
|
|
793
|
+
plotHeight,
|
|
794
|
+
strokePadding = DEFAULT_CHART_FOCUS_RING_STROKE_PADDING,
|
|
795
|
+
minimumWidth = MINIMUM_BAR_FOCUS_RING_SIZE,
|
|
796
|
+
minimumHeight = MINIMUM_BAR_FOCUS_RING_SIZE
|
|
797
|
+
} = options;
|
|
798
|
+
if (plotWidth <= 0 || plotHeight <= 0)
|
|
799
|
+
return null;
|
|
800
|
+
const requestedWidth = Math.max(target.width ?? 0, minimumWidth);
|
|
801
|
+
const requestedHeight = Math.max(target.height ?? 0, minimumHeight);
|
|
802
|
+
const drawableWidth = plotWidth - strokePadding * 2;
|
|
803
|
+
const drawableHeight = plotHeight - strokePadding * 2;
|
|
804
|
+
if (drawableWidth < MINIMUM_FOCUS_RING_SIZE || drawableHeight < MINIMUM_FOCUS_RING_SIZE) {
|
|
805
|
+
return createPlotFrameFocusRingGeometry(plotWidth, plotHeight, strokePadding);
|
|
806
|
+
}
|
|
807
|
+
const width = Math.min(requestedWidth, drawableWidth);
|
|
808
|
+
const height = Math.min(requestedHeight, drawableHeight);
|
|
809
|
+
const x = clamp(target.x - width / 2, strokePadding, plotWidth - width - strokePadding);
|
|
810
|
+
const y = clamp(target.y - height / 2, strokePadding, plotHeight - height - strokePadding);
|
|
811
|
+
return {
|
|
812
|
+
kind: "bar",
|
|
813
|
+
x,
|
|
814
|
+
y,
|
|
815
|
+
width,
|
|
816
|
+
height,
|
|
817
|
+
radius: Math.min(4, width / 2, height / 2)
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
function createPlotFrameFocusRingGeometry(plotWidth, plotHeight, strokePadding) {
|
|
821
|
+
const inset = Math.min(strokePadding, Math.max(0, plotWidth - MINIMUM_FOCUS_RING_SIZE) / 2, Math.max(0, plotHeight - MINIMUM_FOCUS_RING_SIZE) / 2);
|
|
822
|
+
return {
|
|
823
|
+
kind: "plot-frame",
|
|
824
|
+
x: inset,
|
|
825
|
+
y: inset,
|
|
826
|
+
width: Math.max(0, plotWidth - inset * 2),
|
|
827
|
+
height: Math.max(0, plotHeight - inset * 2),
|
|
828
|
+
radius: 0
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
function clamp(value, minimum, maximum) {
|
|
832
|
+
if (maximum < minimum)
|
|
833
|
+
return (minimum + maximum) / 2;
|
|
834
|
+
return Math.min(Math.max(value, minimum), maximum);
|
|
835
|
+
}
|
|
836
|
+
|
|
716
837
|
// src/_internal/chart/chart-interaction.svelte.ts
|
|
717
838
|
import * as $ from "svelte/internal/client";
|
|
718
839
|
class ChartInteraction {
|
|
@@ -839,13 +960,14 @@ var root_15 = $2.from_svg(`<line class="cinder-bar-chart__crosshair" y1="0" aria
|
|
|
839
960
|
var root_16 = $2.from_svg(`<line class="cinder-bar-chart__crosshair" x1="0" aria-hidden="true"></line>`);
|
|
840
961
|
var root_19 = $2.from_svg(`<rect class="cinder-bar-chart__focus-target" width="12" height="12" tabindex="0" role="button"></rect>`);
|
|
841
962
|
var root_17 = $2.from_svg(`<rect class="cinder-bar-chart__hit-surface" role="presentation"></rect><!>`, 1);
|
|
842
|
-
var root_20 = $2.
|
|
843
|
-
var root_21 = $2.from_html(`<
|
|
844
|
-
var
|
|
845
|
-
var
|
|
846
|
-
var
|
|
847
|
-
var
|
|
848
|
-
var
|
|
963
|
+
var root_20 = $2.from_svg(`<g class="cinder-bar-chart__focus-ring-layer" aria-hidden="true"><rect class="cinder-bar-chart__focus-ring-halo"></rect><rect class="cinder-bar-chart__focus-ring"></rect></g>`);
|
|
964
|
+
var root_21 = $2.from_html(`<div role="tooltip" class="cinder-bar-chart__tooltip"><strong> </strong><span> </span></div>`);
|
|
965
|
+
var root_22 = $2.from_html(`<p class="cinder-sr-only">Use the data table to inspect this chart with a keyboard.</p>`);
|
|
966
|
+
var root_25 = $2.from_html(`<tr><th scope="row"> </th><td> </td><td> </td></tr>`);
|
|
967
|
+
var root_23 = $2.from_html(`<table><caption> </caption><thead><tr><th scope="col">Category</th><th scope="col">Series</th><th scope="col">Value</th></tr></thead><tbody></tbody></table>`);
|
|
968
|
+
var root_27 = $2.from_html(`<button type="button"><span></span> </button>`);
|
|
969
|
+
var root_26 = $2.from_html(`<div class="cinder-bar-chart__legend" aria-label="Series"></div>`);
|
|
970
|
+
var root = $2.from_html(`<figure><!> <!> <div class="cinder-bar-chart__viewport"><!> <svg><!><g><!><!><!><!><!><!></g></svg> <!></div> <!> <!> <!></figure>`);
|
|
849
971
|
function Bar_chart($$anchor, $$props) {
|
|
850
972
|
const generatedId = $2.props_id();
|
|
851
973
|
$2.push($$props, true);
|
|
@@ -898,13 +1020,51 @@ function Bar_chart($$anchor, $$props) {
|
|
|
898
1020
|
const keyboardEnabled = $2.derived(() => $2.get(model).targets.length > 0 && $2.get(model).targets.length <= maximumInteractivePoints());
|
|
899
1021
|
const hasDataTable = $2.derived(() => dataTableVisibility() !== "hidden");
|
|
900
1022
|
const guidanceId = $2.derived(() => !$2.get(keyboardEnabled) && $2.get(hasDataTable) && $2.get(model).targets.length > 0 ? `${$2.get(rootId)}-table-guidance` : undefined);
|
|
1023
|
+
const focusedTarget = $2.derived(() => {
|
|
1024
|
+
const currentTarget = interaction.focusedTarget;
|
|
1025
|
+
if (!currentTarget)
|
|
1026
|
+
return;
|
|
1027
|
+
return $2.get(model).targets.find((target) => target.id === currentTarget.id);
|
|
1028
|
+
});
|
|
1029
|
+
let keyboardFocusModality = $2.state(false);
|
|
1030
|
+
let focusVisibleTargetId = $2.state(undefined);
|
|
1031
|
+
const focusRingTarget = $2.derived(() => $2.get(keyboardFocusModality) && $2.get(focusedTarget) && $2.get(focusVisibleTargetId) === $2.get(focusedTarget).id ? $2.get(focusedTarget) : undefined);
|
|
1032
|
+
const barFocusRing = $2.derived(() => $2.get(focusRingTarget) ? createBarFocusRingGeometry({
|
|
1033
|
+
target: $2.get(focusRingTarget),
|
|
1034
|
+
plotWidth: $2.get(model).geometry.plotWidth,
|
|
1035
|
+
plotHeight: $2.get(model).geometry.plotHeight,
|
|
1036
|
+
strokePadding: DEFAULT_CHART_FOCUS_RING_STROKE_PADDING
|
|
1037
|
+
}) : null);
|
|
901
1038
|
$2.user_effect(() => {
|
|
902
1039
|
assertValidNonNegativeInteger("bar-chart", "invalid-maximum-interactive-points", maximumInteractivePoints(), "maximumInteractivePoints");
|
|
903
1040
|
});
|
|
904
1041
|
$2.user_effect(() => {
|
|
905
1042
|
interaction.clearStaleTargets(loading(), $2.get(model).empty, $2.get(model).targets);
|
|
906
1043
|
});
|
|
1044
|
+
function rememberKeyboardFocusModality(event2) {
|
|
1045
|
+
if (event2.key === "Tab" || event2.key === "Home" || event2.key === "End" || event2.key.startsWith("Arrow")) {
|
|
1046
|
+
$2.set(keyboardFocusModality, true);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
function clearKeyboardFocusModality() {
|
|
1050
|
+
$2.set(keyboardFocusModality, false);
|
|
1051
|
+
$2.set(focusVisibleTargetId, undefined);
|
|
1052
|
+
}
|
|
1053
|
+
function handleTargetFocus(target) {
|
|
1054
|
+
interaction.focusedTarget = target;
|
|
1055
|
+
$2.set(focusVisibleTargetId, $2.get(keyboardFocusModality) ? target.id : undefined, true);
|
|
1056
|
+
}
|
|
1057
|
+
function handleTargetBlur() {
|
|
1058
|
+
interaction.focusedTarget = undefined;
|
|
1059
|
+
$2.set(focusVisibleTargetId, undefined);
|
|
1060
|
+
}
|
|
1061
|
+
function handleTargetKeydown(event2) {
|
|
1062
|
+
rememberKeyboardFocusModality(event2);
|
|
1063
|
+
interaction.activateByKeyboard(event2, $2.get(rootElement), $2.get(model).targets, $2.get(keyboardEnabled));
|
|
1064
|
+
}
|
|
907
1065
|
var figure = root();
|
|
1066
|
+
$2.event("keydown", $2.window, rememberKeyboardFocusModality);
|
|
1067
|
+
$2.event("pointerdown", $2.window, clearKeyboardFocusModality);
|
|
908
1068
|
$2.attribute_effect(figure, ($0) => ({
|
|
909
1069
|
...rest,
|
|
910
1070
|
id: $2.get(rootId),
|
|
@@ -935,7 +1095,7 @@ function Bar_chart($$anchor, $$props) {
|
|
|
935
1095
|
{
|
|
936
1096
|
var consequent_1 = ($$anchor2) => {
|
|
937
1097
|
var div = root_2();
|
|
938
|
-
$2.each(div, 23, () => $$props.series, (item) => item.id, ($$anchor3, item,
|
|
1098
|
+
$2.each(div, 23, () => $$props.series, (item) => item.id, ($$anchor3, item, index) => {
|
|
939
1099
|
var button = root_3();
|
|
940
1100
|
var span = $2.child(button);
|
|
941
1101
|
let styles;
|
|
@@ -948,7 +1108,7 @@ function Bar_chart($$anchor, $$props) {
|
|
|
948
1108
|
}, [
|
|
949
1109
|
() => !hiddenSeriesIds().includes($2.get(item).id),
|
|
950
1110
|
() => ({
|
|
951
|
-
background: $2.get(item).color ?? chartPaletteColor($2.get(
|
|
1111
|
+
background: $2.get(item).color ?? chartPaletteColor($2.get(index))
|
|
952
1112
|
})
|
|
953
1113
|
]);
|
|
954
1114
|
$2.delegated("click", button, () => hiddenSeriesIds(interaction.toggleSeries(hiddenSeriesIds(), $2.get(item).id)));
|
|
@@ -1042,18 +1202,18 @@ function Bar_chart($$anchor, $$props) {
|
|
|
1042
1202
|
}
|
|
1043
1203
|
var g = $2.sibling(node_7);
|
|
1044
1204
|
var node_8 = $2.child(g);
|
|
1045
|
-
$2.each(node_8,
|
|
1205
|
+
$2.each(node_8, 18, () => $2.get(model).yTicks, (tick) => tick, ($$anchor2, tick, index) => {
|
|
1046
1206
|
var text_5 = root_11();
|
|
1047
1207
|
var text_6 = $2.child(text_5, true);
|
|
1048
1208
|
$2.reset(text_5);
|
|
1049
1209
|
$2.template_effect(($0) => {
|
|
1050
|
-
$2.set_attribute(text_5, "x", orientation() === "vertical" ? -8 : (
|
|
1051
|
-
$2.set_attribute(text_5, "y", orientation() === "vertical" ? $2.get(model).geometry.plotHeight - (
|
|
1210
|
+
$2.set_attribute(text_5, "x", orientation() === "vertical" ? -8 : (tick - $2.get(model).valueDomain[0]) / ($2.get(model).valueDomain[1] - $2.get(model).valueDomain[0]) * $2.get(model).geometry.plotWidth);
|
|
1211
|
+
$2.set_attribute(text_5, "y", orientation() === "vertical" ? $2.get(model).geometry.plotHeight - (tick - $2.get(model).valueDomain[0]) / ($2.get(model).valueDomain[1] - $2.get(model).valueDomain[0]) * $2.get(model).geometry.plotHeight : $2.get(model).geometry.plotHeight + 20);
|
|
1052
1212
|
$2.set_attribute(text_5, "text-anchor", orientation() === "vertical" ? "end" : "middle");
|
|
1053
1213
|
$2.set_attribute(text_5, "dominant-baseline", orientation() === "vertical" ? "middle" : undefined);
|
|
1054
1214
|
$2.set_text(text_6, $0);
|
|
1055
1215
|
}, [
|
|
1056
|
-
() => formatNumericValue(
|
|
1216
|
+
() => formatNumericValue(tick, orientation() === "vertical" ? $$props.yAxis : $$props.xAxis, undefined, { index: $2.get(index) })
|
|
1057
1217
|
]);
|
|
1058
1218
|
$2.append($$anchor2, text_5);
|
|
1059
1219
|
});
|
|
@@ -1072,7 +1232,7 @@ function Bar_chart($$anchor, $$props) {
|
|
|
1072
1232
|
$2.append($$anchor2, rect);
|
|
1073
1233
|
});
|
|
1074
1234
|
var node_10 = $2.sibling(node_9);
|
|
1075
|
-
$2.each(node_10, 17, () => $2.get(model).categoryTicks, (tick) => tick.
|
|
1235
|
+
$2.each(node_10, 17, () => $2.get(model).categoryTicks, (tick) => tick.categoryKey, ($$anchor2, tick) => {
|
|
1076
1236
|
var text_7 = root_13();
|
|
1077
1237
|
var text_8 = $2.child(text_7, true);
|
|
1078
1238
|
$2.reset(text_7);
|
|
@@ -1139,12 +1299,14 @@ function Bar_chart($$anchor, $$props) {
|
|
|
1139
1299
|
$2.set_attribute(rect_2, "x", ($2.get(target).x ?? 0) - 6);
|
|
1140
1300
|
$2.set_attribute(rect_2, "y", ($2.get(target).y ?? 0) - 6);
|
|
1141
1301
|
$2.set_attribute(rect_2, "data-cinder-target-id", $2.get(target).id);
|
|
1302
|
+
$2.set_attribute(rect_2, "data-cinder-series-id", $2.get(target).seriesId);
|
|
1303
|
+
$2.set_attribute(rect_2, "data-cinder-focus-ring-active", $2.get(barFocusRing) && $2.get(focusRingTarget)?.id === $2.get(target).id ? "true" : undefined);
|
|
1142
1304
|
$2.set_attribute(rect_2, "aria-label", `${$2.get(target).seriesLabel}, ${$2.get(target).xLabel}, ${$2.get(target).valueLabel}`);
|
|
1143
1305
|
$2.set_attribute(rect_2, "aria-describedby", interaction.activeTarget?.id === $2.get(target).id ? `${$2.get(rootId)}-tooltip` : undefined);
|
|
1144
1306
|
});
|
|
1145
|
-
$2.event("focus", rect_2, () =>
|
|
1146
|
-
$2.event("blur", rect_2,
|
|
1147
|
-
$2.delegated("keydown", rect_2,
|
|
1307
|
+
$2.event("focus", rect_2, () => handleTargetFocus($2.get(target)));
|
|
1308
|
+
$2.event("blur", rect_2, handleTargetBlur);
|
|
1309
|
+
$2.delegated("keydown", rect_2, handleTargetKeydown);
|
|
1148
1310
|
$2.append($$anchor4, rect_2);
|
|
1149
1311
|
});
|
|
1150
1312
|
$2.append($$anchor3, fragment_4);
|
|
@@ -1167,12 +1329,38 @@ function Bar_chart($$anchor, $$props) {
|
|
|
1167
1329
|
$$render(consequent_10);
|
|
1168
1330
|
});
|
|
1169
1331
|
}
|
|
1332
|
+
var node_16 = $2.sibling(node_13);
|
|
1333
|
+
{
|
|
1334
|
+
var consequent_11 = ($$anchor2) => {
|
|
1335
|
+
var g_1 = root_20();
|
|
1336
|
+
var rect_3 = $2.child(g_1);
|
|
1337
|
+
var rect_4 = $2.sibling(rect_3);
|
|
1338
|
+
$2.reset(g_1);
|
|
1339
|
+
$2.template_effect(() => {
|
|
1340
|
+
$2.set_attribute(rect_3, "x", $2.get(barFocusRing).x);
|
|
1341
|
+
$2.set_attribute(rect_3, "y", $2.get(barFocusRing).y);
|
|
1342
|
+
$2.set_attribute(rect_3, "width", $2.get(barFocusRing).width);
|
|
1343
|
+
$2.set_attribute(rect_3, "height", $2.get(barFocusRing).height);
|
|
1344
|
+
$2.set_attribute(rect_3, "rx", $2.get(barFocusRing).radius);
|
|
1345
|
+
$2.set_attribute(rect_4, "x", $2.get(barFocusRing).x);
|
|
1346
|
+
$2.set_attribute(rect_4, "y", $2.get(barFocusRing).y);
|
|
1347
|
+
$2.set_attribute(rect_4, "width", $2.get(barFocusRing).width);
|
|
1348
|
+
$2.set_attribute(rect_4, "height", $2.get(barFocusRing).height);
|
|
1349
|
+
$2.set_attribute(rect_4, "rx", $2.get(barFocusRing).radius);
|
|
1350
|
+
});
|
|
1351
|
+
$2.append($$anchor2, g_1);
|
|
1352
|
+
};
|
|
1353
|
+
$2.if(node_16, ($$render) => {
|
|
1354
|
+
if ($2.get(barFocusRing))
|
|
1355
|
+
$$render(consequent_11);
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1170
1358
|
$2.reset(g);
|
|
1171
1359
|
$2.reset(svg);
|
|
1172
|
-
var
|
|
1360
|
+
var node_17 = $2.sibling(svg, 2);
|
|
1173
1361
|
{
|
|
1174
|
-
var
|
|
1175
|
-
var div_4 =
|
|
1362
|
+
var consequent_12 = ($$anchor2) => {
|
|
1363
|
+
var div_4 = root_21();
|
|
1176
1364
|
let styles_2;
|
|
1177
1365
|
var strong = $2.child(div_4);
|
|
1178
1366
|
var text_9 = $2.child(strong, true);
|
|
@@ -1192,37 +1380,37 @@ function Bar_chart($$anchor, $$props) {
|
|
|
1192
1380
|
});
|
|
1193
1381
|
$2.append($$anchor2, div_4);
|
|
1194
1382
|
};
|
|
1195
|
-
$2.if(
|
|
1383
|
+
$2.if(node_17, ($$render) => {
|
|
1196
1384
|
if (interaction.activeTarget)
|
|
1197
|
-
$$render(
|
|
1385
|
+
$$render(consequent_12);
|
|
1198
1386
|
});
|
|
1199
1387
|
}
|
|
1200
1388
|
$2.reset(div_1);
|
|
1201
|
-
var
|
|
1389
|
+
var node_18 = $2.sibling(div_1, 2);
|
|
1202
1390
|
{
|
|
1203
|
-
var
|
|
1204
|
-
var p_1 =
|
|
1391
|
+
var consequent_13 = ($$anchor2) => {
|
|
1392
|
+
var p_1 = root_22();
|
|
1205
1393
|
$2.template_effect(() => $2.set_attribute(p_1, "id", $2.get(guidanceId)));
|
|
1206
1394
|
$2.append($$anchor2, p_1);
|
|
1207
1395
|
};
|
|
1208
|
-
$2.if(
|
|
1396
|
+
$2.if(node_18, ($$render) => {
|
|
1209
1397
|
if ($2.get(guidanceId))
|
|
1210
|
-
$$render(
|
|
1398
|
+
$$render(consequent_13);
|
|
1211
1399
|
});
|
|
1212
1400
|
}
|
|
1213
|
-
var
|
|
1401
|
+
var node_19 = $2.sibling(node_18, 2);
|
|
1214
1402
|
{
|
|
1215
|
-
var
|
|
1216
|
-
var table =
|
|
1403
|
+
var consequent_14 = ($$anchor2) => {
|
|
1404
|
+
var table = root_23();
|
|
1217
1405
|
var caption = $2.child(table);
|
|
1218
1406
|
var text_11 = $2.child(caption, true);
|
|
1219
1407
|
$2.reset(caption);
|
|
1220
1408
|
var tbody = $2.sibling(caption, 2);
|
|
1221
|
-
$2.each(tbody, 21, () => $2.get(model).tableRows,
|
|
1409
|
+
$2.each(tbody, 21, () => $2.get(model).tableRows, (row) => row.categoryKey, ($$anchor3, row) => {
|
|
1222
1410
|
var fragment_5 = $2.comment();
|
|
1223
|
-
var
|
|
1224
|
-
$2.each(
|
|
1225
|
-
var tr =
|
|
1411
|
+
var node_20 = $2.first_child(fragment_5);
|
|
1412
|
+
$2.each(node_20, 17, () => $2.get(row).values, (value) => value.seriesId, ($$anchor4, value) => {
|
|
1413
|
+
var tr = root_25();
|
|
1226
1414
|
var th = $2.child(tr);
|
|
1227
1415
|
var text_12 = $2.child(th, true);
|
|
1228
1416
|
$2.reset(th);
|
|
@@ -1251,17 +1439,17 @@ function Bar_chart($$anchor, $$props) {
|
|
|
1251
1439
|
}, [() => $2.clsx(dataTableClass(dataTableVisibility()))]);
|
|
1252
1440
|
$2.append($$anchor2, table);
|
|
1253
1441
|
};
|
|
1254
|
-
$2.if(
|
|
1442
|
+
$2.if(node_19, ($$render) => {
|
|
1255
1443
|
if ($2.get(hasDataTable))
|
|
1256
|
-
$$render(
|
|
1444
|
+
$$render(consequent_14);
|
|
1257
1445
|
});
|
|
1258
1446
|
}
|
|
1259
|
-
var
|
|
1447
|
+
var node_21 = $2.sibling(node_19, 2);
|
|
1260
1448
|
{
|
|
1261
|
-
var
|
|
1262
|
-
var div_5 =
|
|
1263
|
-
$2.each(div_5, 23, () => $$props.series, (item) => item.id, ($$anchor3, item,
|
|
1264
|
-
var button_1 =
|
|
1449
|
+
var consequent_15 = ($$anchor2) => {
|
|
1450
|
+
var div_5 = root_26();
|
|
1451
|
+
$2.each(div_5, 23, () => $$props.series, (item) => item.id, ($$anchor3, item, index) => {
|
|
1452
|
+
var button_1 = root_27();
|
|
1265
1453
|
var span_2 = $2.child(button_1);
|
|
1266
1454
|
let styles_3;
|
|
1267
1455
|
var text_15 = $2.sibling(span_2, 1, true);
|
|
@@ -1273,7 +1461,7 @@ function Bar_chart($$anchor, $$props) {
|
|
|
1273
1461
|
}, [
|
|
1274
1462
|
() => !hiddenSeriesIds().includes($2.get(item).id),
|
|
1275
1463
|
() => ({
|
|
1276
|
-
background: $2.get(item).color ?? chartPaletteColor($2.get(
|
|
1464
|
+
background: $2.get(item).color ?? chartPaletteColor($2.get(index))
|
|
1277
1465
|
})
|
|
1278
1466
|
]);
|
|
1279
1467
|
$2.delegated("click", button_1, () => hiddenSeriesIds(interaction.toggleSeries(hiddenSeriesIds(), $2.get(item).id)));
|
|
@@ -1283,9 +1471,9 @@ function Bar_chart($$anchor, $$props) {
|
|
|
1283
1471
|
$2.append($$anchor2, div_5);
|
|
1284
1472
|
};
|
|
1285
1473
|
var d_1 = $2.derived(() => legendVisible(legendPosition(), $$props.series.length) && legendPosition() === "bottom");
|
|
1286
|
-
$2.if(
|
|
1474
|
+
$2.if(node_21, ($$render) => {
|
|
1287
1475
|
if ($2.get(d_1))
|
|
1288
|
-
$$render(
|
|
1476
|
+
$$render(consequent_15);
|
|
1289
1477
|
});
|
|
1290
1478
|
}
|
|
1291
1479
|
$2.reset(figure);
|
|
@@ -1310,4 +1498,4 @@ export {
|
|
|
1310
1498
|
Bar_chart as BarChart
|
|
1311
1499
|
};
|
|
1312
1500
|
|
|
1313
|
-
//# debugId=
|
|
1501
|
+
//# debugId=1B363E1DE33010AB64756E2164756E21
|
|
@@ -194,8 +194,8 @@
|
|
|
194
194
|
* ---------------------------------------- */
|
|
195
195
|
|
|
196
196
|
.cinder-button[data-cinder-variant='primary'] {
|
|
197
|
-
/* Ring uses the dedicated --cinder-ring-color (not the
|
|
198
|
-
the
|
|
197
|
+
/* Ring uses the dedicated --cinder-ring-color (not the fill-accent):
|
|
198
|
+
the accent is the button face, so an accent ring would be invisible
|
|
199
199
|
against it and fail WCAG 1.4.11 (3:1) against the page. */
|
|
200
200
|
--_cinder-button-ring: var(--cinder-ring-color);
|
|
201
201
|
background: var(--cinder-accent);
|
|
@@ -423,7 +423,9 @@
|
|
|
423
423
|
* hover paint when both states are active on hover-capable devices. Unwrapped
|
|
424
424
|
* so they fire on tap. */
|
|
425
425
|
.cinder-button[data-cinder-variant='primary']:active:not(:disabled):not([aria-disabled='true']) {
|
|
426
|
-
|
|
426
|
+
/* Use the gentler on-fill pressed token so the --cinder-accent-contrast label stays AA-legible
|
|
427
|
+
on the pressed fill (the general --cinder-accent-active would drop the label below 4.5:1). */
|
|
428
|
+
background: var(--cinder-accent-active-on-fill);
|
|
427
429
|
}
|
|
428
430
|
|
|
429
431
|
.cinder-button[data-cinder-variant='secondary']:active:not(:disabled):not(
|
|
@@ -188,7 +188,10 @@ function Button($$anchor, $$props) {
|
|
|
188
188
|
"aria-disabled",
|
|
189
189
|
"aria-busy",
|
|
190
190
|
"aria-label",
|
|
191
|
-
"aria-labelledby"
|
|
191
|
+
"aria-labelledby",
|
|
192
|
+
"aria-expanded",
|
|
193
|
+
"aria-controls",
|
|
194
|
+
"aria-haspopup"
|
|
192
195
|
]);
|
|
193
196
|
const mergedClassName = $.derived(() => classNames("cinder-button", $$props.class));
|
|
194
197
|
const dataAttributes = $.derived(() => ({
|
|
@@ -246,6 +249,9 @@ function Button($$anchor, $$props) {
|
|
|
246
249
|
"aria-busy": $.get(resolvedAriaBusy),
|
|
247
250
|
"aria-label": $.get(resolvedAriaLabel),
|
|
248
251
|
"aria-labelledby": $.get(resolvedAriaLabelledBy),
|
|
252
|
+
"aria-expanded": $$props["aria-expanded"],
|
|
253
|
+
"aria-controls": $$props["aria-controls"],
|
|
254
|
+
"aria-haspopup": $$props["aria-haspopup"],
|
|
249
255
|
onclick: handleClick
|
|
250
256
|
}));
|
|
251
257
|
var node_10 = $.child(a);
|
|
@@ -265,6 +271,9 @@ function Button($$anchor, $$props) {
|
|
|
265
271
|
"aria-busy": $.get(resolvedAriaBusy),
|
|
266
272
|
"aria-label": $.get(resolvedAriaLabel),
|
|
267
273
|
"aria-labelledby": $.get(resolvedAriaLabelledBy),
|
|
274
|
+
"aria-expanded": $$props["aria-expanded"],
|
|
275
|
+
"aria-controls": $$props["aria-controls"],
|
|
276
|
+
"aria-haspopup": $$props["aria-haspopup"],
|
|
268
277
|
onclick: handleClick
|
|
269
278
|
}));
|
|
270
279
|
var node_11 = $.child(button);
|
|
@@ -290,4 +299,4 @@ export {
|
|
|
290
299
|
Button
|
|
291
300
|
};
|
|
292
301
|
|
|
293
|
-
//# debugId=
|
|
302
|
+
//# debugId=EE1D1546C33F459A64756E2164756E21
|