@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
-
|
|
3
|
+
/** `danger` is an accepted alias for `error` — both render identically. */
|
|
4
|
+
export type AlertVariant = 'info' | 'success' | 'warning' | 'error' | 'danger';
|
|
4
5
|
/**
|
|
5
6
|
* Props for the {@link Alert} component — a live-region notification card.
|
|
6
7
|
*
|
|
@@ -30,7 +31,7 @@ export type AlertProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'role
|
|
|
30
31
|
*/
|
|
31
32
|
export interface AlertSchemaProps {
|
|
32
33
|
/**
|
|
33
|
-
* Visual style.
|
|
34
|
+
* Visual style. `danger` is an accepted alias for `error` — both render identically.
|
|
34
35
|
* @default "info"
|
|
35
36
|
*/
|
|
36
37
|
variant?: AlertVariant;
|
|
@@ -82,6 +82,7 @@ function Alert($$anchor, $$props) {
|
|
|
82
82
|
"children",
|
|
83
83
|
"icon"
|
|
84
84
|
]);
|
|
85
|
+
const resolvedVariant = $.derived(() => variant() === "danger" ? "error" : variant());
|
|
85
86
|
let visible = $.state(true);
|
|
86
87
|
let rootElement = $.state(undefined);
|
|
87
88
|
async function handleDismiss() {
|
|
@@ -133,7 +134,7 @@ function Alert($$anchor, $$props) {
|
|
|
133
134
|
$.attribute_effect(div, ($0) => ({
|
|
134
135
|
...$.get(restWithoutForbidden),
|
|
135
136
|
class: $0,
|
|
136
|
-
"data-cinder-variant":
|
|
137
|
+
"data-cinder-variant": $.get(resolvedVariant),
|
|
137
138
|
role: "alert"
|
|
138
139
|
}), [
|
|
139
140
|
() => classNames("cinder-alert", "cinder-_status-surface", $$props.class)
|
|
@@ -189,4 +190,4 @@ export {
|
|
|
189
190
|
Alert
|
|
190
191
|
};
|
|
191
192
|
|
|
192
|
-
//# debugId=
|
|
193
|
+
//# debugId=1C9AC3DB40B76D6C64756E2164756E21
|
|
@@ -192,7 +192,10 @@ function Button($$anchor, $$props) {
|
|
|
192
192
|
"aria-disabled",
|
|
193
193
|
"aria-busy",
|
|
194
194
|
"aria-label",
|
|
195
|
-
"aria-labelledby"
|
|
195
|
+
"aria-labelledby",
|
|
196
|
+
"aria-expanded",
|
|
197
|
+
"aria-controls",
|
|
198
|
+
"aria-haspopup"
|
|
196
199
|
]);
|
|
197
200
|
const mergedClassName = $.derived(() => classNames("cinder-button", $$props.class));
|
|
198
201
|
const dataAttributes = $.derived(() => ({
|
|
@@ -250,6 +253,9 @@ function Button($$anchor, $$props) {
|
|
|
250
253
|
"aria-busy": $.get(resolvedAriaBusy),
|
|
251
254
|
"aria-label": $.get(resolvedAriaLabel),
|
|
252
255
|
"aria-labelledby": $.get(resolvedAriaLabelledBy),
|
|
256
|
+
"aria-expanded": $$props["aria-expanded"],
|
|
257
|
+
"aria-controls": $$props["aria-controls"],
|
|
258
|
+
"aria-haspopup": $$props["aria-haspopup"],
|
|
253
259
|
onclick: handleClick
|
|
254
260
|
}));
|
|
255
261
|
var node_10 = $.child(a);
|
|
@@ -269,6 +275,9 @@ function Button($$anchor, $$props) {
|
|
|
269
275
|
"aria-busy": $.get(resolvedAriaBusy),
|
|
270
276
|
"aria-label": $.get(resolvedAriaLabel),
|
|
271
277
|
"aria-labelledby": $.get(resolvedAriaLabelledBy),
|
|
278
|
+
"aria-expanded": $$props["aria-expanded"],
|
|
279
|
+
"aria-controls": $$props["aria-controls"],
|
|
280
|
+
"aria-haspopup": $$props["aria-haspopup"],
|
|
272
281
|
onclick: handleClick
|
|
273
282
|
}));
|
|
274
283
|
var node_11 = $.child(button);
|
|
@@ -759,4 +768,4 @@ export {
|
|
|
759
768
|
Alert_dialog as AlertDialog
|
|
760
769
|
};
|
|
761
770
|
|
|
762
|
-
//# debugId=
|
|
771
|
+
//# debugId=80F37765CC5B76FE64756E2164756E21
|
|
@@ -81,14 +81,64 @@
|
|
|
81
81
|
pointer-events: none;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
.cinder-area-chart__focus-target:focus-visible:not([data-cinder-focus-ring-active='true']) {
|
|
85
|
+
fill: transparent;
|
|
86
|
+
stroke: var(--cinder-ring-color);
|
|
87
|
+
stroke-width: var(--cinder-ring-width);
|
|
88
|
+
vector-effect: non-scaling-stroke;
|
|
89
|
+
filter: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cinder-area-chart__focus-ring-layer {
|
|
93
|
+
pointer-events: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cinder-area-chart__focus-ring,
|
|
97
|
+
.cinder-area-chart__focus-ring-halo,
|
|
98
|
+
.cinder-area-chart__focus-ring-connector,
|
|
99
|
+
.cinder-area-chart__focus-ring-dot {
|
|
100
|
+
fill: none;
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
vector-effect: non-scaling-stroke;
|
|
103
|
+
stroke-linecap: round;
|
|
104
|
+
stroke-linejoin: round;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.cinder-area-chart__focus-ring {
|
|
108
|
+
stroke: var(--cinder-ring-color);
|
|
90
109
|
stroke-width: var(--cinder-ring-width);
|
|
91
|
-
filter:
|
|
110
|
+
filter: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.cinder-area-chart__focus-ring-halo {
|
|
114
|
+
stroke: var(--cinder-ring-offset-color);
|
|
115
|
+
stroke-width: calc(
|
|
116
|
+
var(--cinder-ring-width) + var(--cinder-ring-offset) + var(--cinder-ring-offset)
|
|
117
|
+
);
|
|
118
|
+
filter: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (forced-colors: active) {
|
|
122
|
+
.cinder-area-chart__focus-ring-halo {
|
|
123
|
+
display: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.cinder-area-chart__focus-ring,
|
|
127
|
+
.cinder-area-chart__focus-ring-connector,
|
|
128
|
+
.cinder-area-chart__focus-ring-dot {
|
|
129
|
+
fill: none;
|
|
130
|
+
stroke: ButtonText;
|
|
131
|
+
stroke-width: var(--cinder-ring-width);
|
|
132
|
+
filter: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.cinder-area-chart__focus-target:focus-visible:not([data-cinder-focus-ring-active='true']) {
|
|
136
|
+
fill: transparent;
|
|
137
|
+
stroke: ButtonText;
|
|
138
|
+
stroke-width: var(--cinder-ring-width);
|
|
139
|
+
vector-effect: non-scaling-stroke;
|
|
140
|
+
filter: none;
|
|
141
|
+
}
|
|
92
142
|
}
|
|
93
143
|
|
|
94
144
|
.cinder-area-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 {
|
|
@@ -838,13 +959,17 @@ var root_14 = $2.from_svg(`<path class="cinder-area-chart__area" aria-hidden="tr
|
|
|
838
959
|
var root_15 = $2.from_svg(`<line class="cinder-area-chart__crosshair" y1="0" aria-hidden="true"></line>`);
|
|
839
960
|
var root_18 = $2.from_svg(`<circle class="cinder-area-chart__focus-target" r="8" tabindex="0" role="button"></circle>`);
|
|
840
961
|
var root_16 = $2.from_svg(`<rect class="cinder-area-chart__hit-surface" role="presentation"></rect><!>`, 1);
|
|
841
|
-
var
|
|
842
|
-
var root_20 = $2.
|
|
843
|
-
var root_22 = $2.
|
|
844
|
-
var
|
|
845
|
-
var
|
|
846
|
-
var
|
|
847
|
-
var
|
|
962
|
+
var root_21 = $2.from_svg(`<path class="cinder-area-chart__focus-ring-connector cinder-area-chart__focus-ring-halo"></path><path class="cinder-area-chart__focus-ring-connector cinder-area-chart__focus-ring"></path><circle class="cinder-area-chart__focus-ring-dot cinder-area-chart__focus-ring-halo"></circle><circle class="cinder-area-chart__focus-ring-dot cinder-area-chart__focus-ring"></circle>`, 1);
|
|
963
|
+
var root_20 = $2.from_svg(`<circle class="cinder-area-chart__focus-ring-halo"></circle><circle class="cinder-area-chart__focus-ring"></circle><!>`, 1);
|
|
964
|
+
var root_22 = $2.from_svg(`<rect class="cinder-area-chart__focus-ring-halo"></rect><rect class="cinder-area-chart__focus-ring"></rect>`, 1);
|
|
965
|
+
var root_19 = $2.from_svg(`<g class="cinder-area-chart__focus-ring-layer" aria-hidden="true"><!></g>`);
|
|
966
|
+
var root_23 = $2.from_html(`<div role="tooltip" class="cinder-area-chart__tooltip"><strong> </strong><span> </span></div>`);
|
|
967
|
+
var root_24 = $2.from_html(`<p class="cinder-sr-only">Use the data table to inspect this chart with a keyboard.</p>`);
|
|
968
|
+
var root_26 = $2.from_html(`<tr><th scope="row"> </th><td> </td><td> </td></tr>`);
|
|
969
|
+
var root_25 = $2.from_html(`<table><caption> </caption><thead><tr><th scope="col">Series</th><th scope="col">X</th><th scope="col">Value</th></tr></thead><tbody></tbody></table>`);
|
|
970
|
+
var root_28 = $2.from_html(`<button type="button"><span></span> </button>`);
|
|
971
|
+
var root_27 = $2.from_html(`<div class="cinder-area-chart__legend" aria-label="Series"></div>`);
|
|
972
|
+
var root = $2.from_html(`<figure><!> <!> <div class="cinder-area-chart__viewport"><!> <svg><!><g><!><!><!><!><!><!></g></svg> <!></div> <!> <!> <!></figure>`);
|
|
848
973
|
function Area_chart($$anchor, $$props) {
|
|
849
974
|
const generatedId = $2.props_id();
|
|
850
975
|
$2.push($$props, true);
|
|
@@ -892,13 +1017,51 @@ function Area_chart($$anchor, $$props) {
|
|
|
892
1017
|
const keyboardEnabled = $2.derived(() => $2.get(model).targets.length > 0 && $2.get(model).targets.length <= maximumInteractivePoints());
|
|
893
1018
|
const hasDataTable = $2.derived(() => dataTableVisibility() !== "hidden");
|
|
894
1019
|
const guidanceId = $2.derived(() => !$2.get(keyboardEnabled) && $2.get(hasDataTable) && $2.get(model).targets.length > 0 ? `${$2.get(rootId)}-table-guidance` : undefined);
|
|
1020
|
+
const focusedTarget = $2.derived(() => {
|
|
1021
|
+
const currentTarget = interaction.focusedTarget;
|
|
1022
|
+
if (!currentTarget)
|
|
1023
|
+
return;
|
|
1024
|
+
return $2.get(model).targets.find((target) => target.id === currentTarget.id);
|
|
1025
|
+
});
|
|
1026
|
+
let keyboardFocusModality = $2.state(false);
|
|
1027
|
+
let focusVisibleTargetId = $2.state(undefined);
|
|
1028
|
+
const focusRingTarget = $2.derived(() => $2.get(keyboardFocusModality) && $2.get(focusedTarget) && $2.get(focusVisibleTargetId) === $2.get(focusedTarget).id ? $2.get(focusedTarget) : undefined);
|
|
1029
|
+
const pointFocusRing = $2.derived(() => $2.get(focusRingTarget) ? createPointFocusRingGeometry({
|
|
1030
|
+
target: $2.get(focusRingTarget),
|
|
1031
|
+
plotWidth: $2.get(model).geometry.plotWidth,
|
|
1032
|
+
plotHeight: $2.get(model).geometry.plotHeight,
|
|
1033
|
+
strokePadding: DEFAULT_CHART_FOCUS_RING_STROKE_PADDING
|
|
1034
|
+
}) : null);
|
|
895
1035
|
$2.user_effect(() => {
|
|
896
1036
|
assertValidNonNegativeInteger("area-chart", "invalid-maximum-interactive-points", maximumInteractivePoints(), "maximumInteractivePoints");
|
|
897
1037
|
});
|
|
898
1038
|
$2.user_effect(() => {
|
|
899
1039
|
interaction.clearStaleTargets(loading(), $2.get(model).empty, $2.get(model).targets);
|
|
900
1040
|
});
|
|
1041
|
+
function rememberKeyboardFocusModality(event2) {
|
|
1042
|
+
if (event2.key === "Tab" || event2.key === "Home" || event2.key === "End" || event2.key.startsWith("Arrow")) {
|
|
1043
|
+
$2.set(keyboardFocusModality, true);
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
function clearKeyboardFocusModality() {
|
|
1047
|
+
$2.set(keyboardFocusModality, false);
|
|
1048
|
+
$2.set(focusVisibleTargetId, undefined);
|
|
1049
|
+
}
|
|
1050
|
+
function handleTargetFocus(target) {
|
|
1051
|
+
interaction.focusedTarget = target;
|
|
1052
|
+
$2.set(focusVisibleTargetId, $2.get(keyboardFocusModality) ? target.id : undefined, true);
|
|
1053
|
+
}
|
|
1054
|
+
function handleTargetBlur() {
|
|
1055
|
+
interaction.focusedTarget = undefined;
|
|
1056
|
+
$2.set(focusVisibleTargetId, undefined);
|
|
1057
|
+
}
|
|
1058
|
+
function handleTargetKeydown(event2) {
|
|
1059
|
+
rememberKeyboardFocusModality(event2);
|
|
1060
|
+
interaction.activateByKeyboard(event2, $2.get(rootElement), $2.get(model).targets, $2.get(keyboardEnabled));
|
|
1061
|
+
}
|
|
901
1062
|
var figure = root();
|
|
1063
|
+
$2.event("keydown", $2.window, rememberKeyboardFocusModality);
|
|
1064
|
+
$2.event("pointerdown", $2.window, clearKeyboardFocusModality);
|
|
902
1065
|
$2.attribute_effect(figure, ($0) => ({
|
|
903
1066
|
...rest,
|
|
904
1067
|
id: $2.get(rootId),
|
|
@@ -928,7 +1091,7 @@ function Area_chart($$anchor, $$props) {
|
|
|
928
1091
|
{
|
|
929
1092
|
var consequent_1 = ($$anchor2) => {
|
|
930
1093
|
var div = root_2();
|
|
931
|
-
$2.each(div, 23, () => $$props.series, (item) => item.id, ($$anchor3, item,
|
|
1094
|
+
$2.each(div, 23, () => $$props.series, (item) => item.id, ($$anchor3, item, index) => {
|
|
932
1095
|
var button = root_3();
|
|
933
1096
|
var span = $2.child(button);
|
|
934
1097
|
let styles;
|
|
@@ -941,7 +1104,7 @@ function Area_chart($$anchor, $$props) {
|
|
|
941
1104
|
}, [
|
|
942
1105
|
() => !hiddenSeriesIds().includes($2.get(item).id),
|
|
943
1106
|
() => ({
|
|
944
|
-
background: $2.get(item).color ?? chartPaletteColor($2.get(
|
|
1107
|
+
background: $2.get(item).color ?? chartPaletteColor($2.get(index))
|
|
945
1108
|
})
|
|
946
1109
|
]);
|
|
947
1110
|
$2.delegated("click", button, () => hiddenSeriesIds(interaction.toggleSeries(hiddenSeriesIds(), $2.get(item).id)));
|
|
@@ -1035,8 +1198,8 @@ function Area_chart($$anchor, $$props) {
|
|
|
1035
1198
|
}
|
|
1036
1199
|
var g = $2.sibling(node_7);
|
|
1037
1200
|
var node_8 = $2.child(g);
|
|
1038
|
-
$2.each(node_8,
|
|
1039
|
-
const tickY = $2.derived(() => $2.get(model).geometry.plotHeight - (
|
|
1201
|
+
$2.each(node_8, 18, () => $2.get(model).yTicks, (tick) => tick, ($$anchor2, tick, index) => {
|
|
1202
|
+
const tickY = $2.derived(() => $2.get(model).geometry.plotHeight - (tick - $2.get(model).yDomain[0]) / ($2.get(model).yDomain[1] - $2.get(model).yDomain[0]) * $2.get(model).geometry.plotHeight);
|
|
1040
1203
|
var fragment_2 = root_11();
|
|
1041
1204
|
var line = $2.first_child(fragment_2);
|
|
1042
1205
|
var text_5 = $2.sibling(line);
|
|
@@ -1049,7 +1212,7 @@ function Area_chart($$anchor, $$props) {
|
|
|
1049
1212
|
$2.set_attribute(text_5, "y", $2.get(tickY));
|
|
1050
1213
|
$2.set_text(text_6, $0);
|
|
1051
1214
|
}, [
|
|
1052
|
-
() => formatNumericValue(
|
|
1215
|
+
() => formatNumericValue(tick, $$props.yAxis, undefined, { index: $2.get(index) })
|
|
1053
1216
|
]);
|
|
1054
1217
|
$2.append($$anchor2, fragment_2);
|
|
1055
1218
|
});
|
|
@@ -1123,12 +1286,14 @@ function Area_chart($$anchor, $$props) {
|
|
|
1123
1286
|
$2.set_attribute(circle, "cx", $2.get(target).x);
|
|
1124
1287
|
$2.set_attribute(circle, "cy", $2.get(target).y);
|
|
1125
1288
|
$2.set_attribute(circle, "data-cinder-target-id", $2.get(target).id);
|
|
1289
|
+
$2.set_attribute(circle, "data-cinder-series-id", $2.get(target).seriesId);
|
|
1290
|
+
$2.set_attribute(circle, "data-cinder-focus-ring-active", $2.get(pointFocusRing) && $2.get(focusRingTarget)?.id === $2.get(target).id ? "true" : undefined);
|
|
1126
1291
|
$2.set_attribute(circle, "aria-label", `${$2.get(target).seriesLabel}, ${$2.get(target).xLabel}, ${$2.get(target).valueLabel}`);
|
|
1127
1292
|
$2.set_attribute(circle, "aria-describedby", interaction.activeTarget?.id === $2.get(target).id ? `${$2.get(rootId)}-tooltip` : undefined);
|
|
1128
1293
|
});
|
|
1129
|
-
$2.event("focus", circle, () =>
|
|
1130
|
-
$2.event("blur", circle,
|
|
1131
|
-
$2.delegated("keydown", circle,
|
|
1294
|
+
$2.event("focus", circle, () => handleTargetFocus($2.get(target)));
|
|
1295
|
+
$2.event("blur", circle, handleTargetBlur);
|
|
1296
|
+
$2.delegated("keydown", circle, handleTargetKeydown);
|
|
1132
1297
|
$2.append($$anchor4, circle);
|
|
1133
1298
|
});
|
|
1134
1299
|
$2.append($$anchor3, fragment_6);
|
|
@@ -1151,12 +1316,90 @@ function Area_chart($$anchor, $$props) {
|
|
|
1151
1316
|
$$render(consequent_10);
|
|
1152
1317
|
});
|
|
1153
1318
|
}
|
|
1319
|
+
var node_16 = $2.sibling(node_13);
|
|
1320
|
+
{
|
|
1321
|
+
var consequent_13 = ($$anchor2) => {
|
|
1322
|
+
var g_1 = root_19();
|
|
1323
|
+
var node_17 = $2.child(g_1);
|
|
1324
|
+
{
|
|
1325
|
+
var consequent_12 = ($$anchor3) => {
|
|
1326
|
+
var fragment_7 = root_20();
|
|
1327
|
+
var circle_1 = $2.first_child(fragment_7);
|
|
1328
|
+
var circle_2 = $2.sibling(circle_1);
|
|
1329
|
+
var node_18 = $2.sibling(circle_2);
|
|
1330
|
+
{
|
|
1331
|
+
var consequent_11 = ($$anchor4) => {
|
|
1332
|
+
var fragment_8 = root_21();
|
|
1333
|
+
var path_2 = $2.first_child(fragment_8);
|
|
1334
|
+
var path_3 = $2.sibling(path_2);
|
|
1335
|
+
var circle_3 = $2.sibling(path_3);
|
|
1336
|
+
var circle_4 = $2.sibling(circle_3);
|
|
1337
|
+
$2.template_effect(() => {
|
|
1338
|
+
$2.set_attribute(path_2, "d", `M ${$2.get(pointFocusRing).connector.x1} ${$2.get(pointFocusRing).connector.y1} L ${$2.get(pointFocusRing).connector.x2} ${$2.get(pointFocusRing).connector.y2}`);
|
|
1339
|
+
$2.set_attribute(path_3, "d", `M ${$2.get(pointFocusRing).connector.x1} ${$2.get(pointFocusRing).connector.y1} L ${$2.get(pointFocusRing).connector.x2} ${$2.get(pointFocusRing).connector.y2}`);
|
|
1340
|
+
$2.set_attribute(circle_3, "cx", $2.get(pointFocusRing).dot.cx);
|
|
1341
|
+
$2.set_attribute(circle_3, "cy", $2.get(pointFocusRing).dot.cy);
|
|
1342
|
+
$2.set_attribute(circle_3, "r", $2.get(pointFocusRing).dot.radius);
|
|
1343
|
+
$2.set_attribute(circle_4, "cx", $2.get(pointFocusRing).dot.cx);
|
|
1344
|
+
$2.set_attribute(circle_4, "cy", $2.get(pointFocusRing).dot.cy);
|
|
1345
|
+
$2.set_attribute(circle_4, "r", $2.get(pointFocusRing).dot.radius);
|
|
1346
|
+
});
|
|
1347
|
+
$2.append($$anchor4, fragment_8);
|
|
1348
|
+
};
|
|
1349
|
+
$2.if(node_18, ($$render) => {
|
|
1350
|
+
if ($2.get(pointFocusRing).connector && $2.get(pointFocusRing).dot)
|
|
1351
|
+
$$render(consequent_11);
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
$2.template_effect(() => {
|
|
1355
|
+
$2.set_attribute(circle_1, "cx", $2.get(pointFocusRing).cx);
|
|
1356
|
+
$2.set_attribute(circle_1, "cy", $2.get(pointFocusRing).cy);
|
|
1357
|
+
$2.set_attribute(circle_1, "r", $2.get(pointFocusRing).radius);
|
|
1358
|
+
$2.set_attribute(circle_2, "cx", $2.get(pointFocusRing).cx);
|
|
1359
|
+
$2.set_attribute(circle_2, "cy", $2.get(pointFocusRing).cy);
|
|
1360
|
+
$2.set_attribute(circle_2, "r", $2.get(pointFocusRing).radius);
|
|
1361
|
+
});
|
|
1362
|
+
$2.append($$anchor3, fragment_7);
|
|
1363
|
+
};
|
|
1364
|
+
var alternate_2 = ($$anchor3) => {
|
|
1365
|
+
var fragment_9 = root_22();
|
|
1366
|
+
var rect_1 = $2.first_child(fragment_9);
|
|
1367
|
+
var rect_2 = $2.sibling(rect_1);
|
|
1368
|
+
$2.template_effect(() => {
|
|
1369
|
+
$2.set_attribute(rect_1, "x", $2.get(pointFocusRing).x);
|
|
1370
|
+
$2.set_attribute(rect_1, "y", $2.get(pointFocusRing).y);
|
|
1371
|
+
$2.set_attribute(rect_1, "width", $2.get(pointFocusRing).width);
|
|
1372
|
+
$2.set_attribute(rect_1, "height", $2.get(pointFocusRing).height);
|
|
1373
|
+
$2.set_attribute(rect_1, "rx", $2.get(pointFocusRing).radius);
|
|
1374
|
+
$2.set_attribute(rect_2, "x", $2.get(pointFocusRing).x);
|
|
1375
|
+
$2.set_attribute(rect_2, "y", $2.get(pointFocusRing).y);
|
|
1376
|
+
$2.set_attribute(rect_2, "width", $2.get(pointFocusRing).width);
|
|
1377
|
+
$2.set_attribute(rect_2, "height", $2.get(pointFocusRing).height);
|
|
1378
|
+
$2.set_attribute(rect_2, "rx", $2.get(pointFocusRing).radius);
|
|
1379
|
+
});
|
|
1380
|
+
$2.append($$anchor3, fragment_9);
|
|
1381
|
+
};
|
|
1382
|
+
$2.if(node_17, ($$render) => {
|
|
1383
|
+
if ($2.get(pointFocusRing).kind === "point")
|
|
1384
|
+
$$render(consequent_12);
|
|
1385
|
+
else
|
|
1386
|
+
$$render(alternate_2, -1);
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
$2.reset(g_1);
|
|
1390
|
+
$2.append($$anchor2, g_1);
|
|
1391
|
+
};
|
|
1392
|
+
$2.if(node_16, ($$render) => {
|
|
1393
|
+
if ($2.get(pointFocusRing))
|
|
1394
|
+
$$render(consequent_13);
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1154
1397
|
$2.reset(g);
|
|
1155
1398
|
$2.reset(svg);
|
|
1156
|
-
var
|
|
1399
|
+
var node_19 = $2.sibling(svg, 2);
|
|
1157
1400
|
{
|
|
1158
|
-
var
|
|
1159
|
-
var div_4 =
|
|
1401
|
+
var consequent_14 = ($$anchor2) => {
|
|
1402
|
+
var div_4 = root_23();
|
|
1160
1403
|
let styles_2;
|
|
1161
1404
|
var strong = $2.child(div_4);
|
|
1162
1405
|
var text_9 = $2.child(strong, true);
|
|
@@ -1176,34 +1419,34 @@ function Area_chart($$anchor, $$props) {
|
|
|
1176
1419
|
});
|
|
1177
1420
|
$2.append($$anchor2, div_4);
|
|
1178
1421
|
};
|
|
1179
|
-
$2.if(
|
|
1422
|
+
$2.if(node_19, ($$render) => {
|
|
1180
1423
|
if (interaction.activeTarget)
|
|
1181
|
-
$$render(
|
|
1424
|
+
$$render(consequent_14);
|
|
1182
1425
|
});
|
|
1183
1426
|
}
|
|
1184
1427
|
$2.reset(div_1);
|
|
1185
|
-
var
|
|
1428
|
+
var node_20 = $2.sibling(div_1, 2);
|
|
1186
1429
|
{
|
|
1187
|
-
var
|
|
1188
|
-
var p_1 =
|
|
1430
|
+
var consequent_15 = ($$anchor2) => {
|
|
1431
|
+
var p_1 = root_24();
|
|
1189
1432
|
$2.template_effect(() => $2.set_attribute(p_1, "id", $2.get(guidanceId)));
|
|
1190
1433
|
$2.append($$anchor2, p_1);
|
|
1191
1434
|
};
|
|
1192
|
-
$2.if(
|
|
1435
|
+
$2.if(node_20, ($$render) => {
|
|
1193
1436
|
if ($2.get(guidanceId))
|
|
1194
|
-
$$render(
|
|
1437
|
+
$$render(consequent_15);
|
|
1195
1438
|
});
|
|
1196
1439
|
}
|
|
1197
|
-
var
|
|
1440
|
+
var node_21 = $2.sibling(node_20, 2);
|
|
1198
1441
|
{
|
|
1199
|
-
var
|
|
1200
|
-
var table =
|
|
1442
|
+
var consequent_16 = ($$anchor2) => {
|
|
1443
|
+
var table = root_25();
|
|
1201
1444
|
var caption = $2.child(table);
|
|
1202
1445
|
var text_11 = $2.child(caption, true);
|
|
1203
1446
|
$2.reset(caption);
|
|
1204
1447
|
var tbody = $2.sibling(caption, 2);
|
|
1205
1448
|
$2.each(tbody, 21, () => $2.get(model).tableRows, (row) => row.id, ($$anchor3, row) => {
|
|
1206
|
-
var tr =
|
|
1449
|
+
var tr = root_26();
|
|
1207
1450
|
var th = $2.child(tr);
|
|
1208
1451
|
var text_12 = $2.child(th, true);
|
|
1209
1452
|
$2.reset(th);
|
|
@@ -1230,17 +1473,17 @@ function Area_chart($$anchor, $$props) {
|
|
|
1230
1473
|
}, [() => $2.clsx(dataTableClass(dataTableVisibility()))]);
|
|
1231
1474
|
$2.append($$anchor2, table);
|
|
1232
1475
|
};
|
|
1233
|
-
$2.if(
|
|
1476
|
+
$2.if(node_21, ($$render) => {
|
|
1234
1477
|
if ($2.get(hasDataTable))
|
|
1235
|
-
$$render(
|
|
1478
|
+
$$render(consequent_16);
|
|
1236
1479
|
});
|
|
1237
1480
|
}
|
|
1238
|
-
var
|
|
1481
|
+
var node_22 = $2.sibling(node_21, 2);
|
|
1239
1482
|
{
|
|
1240
|
-
var
|
|
1241
|
-
var div_5 =
|
|
1242
|
-
$2.each(div_5, 23, () => $$props.series, (item) => item.id, ($$anchor3, item,
|
|
1243
|
-
var button_1 =
|
|
1483
|
+
var consequent_17 = ($$anchor2) => {
|
|
1484
|
+
var div_5 = root_27();
|
|
1485
|
+
$2.each(div_5, 23, () => $$props.series, (item) => item.id, ($$anchor3, item, index) => {
|
|
1486
|
+
var button_1 = root_28();
|
|
1244
1487
|
var span_2 = $2.child(button_1);
|
|
1245
1488
|
let styles_3;
|
|
1246
1489
|
var text_15 = $2.sibling(span_2, 1, true);
|
|
@@ -1252,7 +1495,7 @@ function Area_chart($$anchor, $$props) {
|
|
|
1252
1495
|
}, [
|
|
1253
1496
|
() => !hiddenSeriesIds().includes($2.get(item).id),
|
|
1254
1497
|
() => ({
|
|
1255
|
-
background: $2.get(item).color ?? chartPaletteColor($2.get(
|
|
1498
|
+
background: $2.get(item).color ?? chartPaletteColor($2.get(index))
|
|
1256
1499
|
})
|
|
1257
1500
|
]);
|
|
1258
1501
|
$2.delegated("click", button_1, () => hiddenSeriesIds(interaction.toggleSeries(hiddenSeriesIds(), $2.get(item).id)));
|
|
@@ -1262,9 +1505,9 @@ function Area_chart($$anchor, $$props) {
|
|
|
1262
1505
|
$2.append($$anchor2, div_5);
|
|
1263
1506
|
};
|
|
1264
1507
|
var d_1 = $2.derived(() => legendVisible(legendPosition(), $$props.series.length) && legendPosition() === "bottom");
|
|
1265
|
-
$2.if(
|
|
1508
|
+
$2.if(node_22, ($$render) => {
|
|
1266
1509
|
if ($2.get(d_1))
|
|
1267
|
-
$$render(
|
|
1510
|
+
$$render(consequent_17);
|
|
1268
1511
|
});
|
|
1269
1512
|
}
|
|
1270
1513
|
$2.reset(figure);
|
|
@@ -1289,4 +1532,4 @@ export {
|
|
|
1289
1532
|
Area_chart as AreaChart
|
|
1290
1533
|
};
|
|
1291
1534
|
|
|
1292
|
-
//# debugId=
|
|
1535
|
+
//# debugId=49A93DA48AE0E3F664756E2164756E21
|
|
@@ -47,9 +47,8 @@
|
|
|
47
47
|
ring; the outline is intentionally suppressed. */
|
|
48
48
|
outline: none;
|
|
49
49
|
box-shadow:
|
|
50
|
-
0 0 0 var(--cinder-ring-offset
|
|
51
|
-
0 0 0 calc(var(--cinder-ring-offset
|
|
52
|
-
var(--cinder-ring-color);
|
|
50
|
+
0 0 0 var(--cinder-ring-offset, 1px) var(--cinder-ring-offset-color),
|
|
51
|
+
0 0 0 calc(var(--cinder-ring-offset, 1px) + var(--cinder-ring-width)) var(--cinder-ring-color);
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
.cinder-avatar-group__overflow {
|
|
@@ -82,4 +82,21 @@
|
|
|
82
82
|
color: var(--cinder-accent-text);
|
|
83
83
|
border-color: color-mix(in oklch, var(--cinder-accent), transparent 60%);
|
|
84
84
|
}
|
|
85
|
+
|
|
86
|
+
/* ----------------------------------------
|
|
87
|
+
* Mono affordance
|
|
88
|
+
* ---------------------------------------- */
|
|
89
|
+
|
|
90
|
+
.cinder-badge[data-cinder-mono] {
|
|
91
|
+
font-family: var(
|
|
92
|
+
--cinder-font-mono,
|
|
93
|
+
ui-monospace,
|
|
94
|
+
SFMono-Regular,
|
|
95
|
+
'SF Mono',
|
|
96
|
+
Menlo,
|
|
97
|
+
Consolas,
|
|
98
|
+
'Liberation Mono',
|
|
99
|
+
monospace
|
|
100
|
+
);
|
|
101
|
+
}
|
|
85
102
|
}
|
|
@@ -66,6 +66,11 @@ var schema = {
|
|
|
66
66
|
description: "Size of the badge.",
|
|
67
67
|
default: "md"
|
|
68
68
|
},
|
|
69
|
+
mono: {
|
|
70
|
+
type: "boolean",
|
|
71
|
+
description: "Render the badge label in a monospace font. Useful for version strings, error codes, or other technical labels.",
|
|
72
|
+
default: false
|
|
73
|
+
},
|
|
69
74
|
class: {
|
|
70
75
|
type: "string",
|
|
71
76
|
description: "Custom class merged with `.cinder-badge`."
|
|
@@ -78,4 +83,4 @@ export {
|
|
|
78
83
|
badge_schema_default as default
|
|
79
84
|
};
|
|
80
85
|
|
|
81
|
-
//# debugId=
|
|
86
|
+
//# debugId=6D0CB5C3A7D42A5464756E2164756E21
|