@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
|
@@ -36,20 +36,17 @@
|
|
|
36
36
|
|
|
37
37
|
.cinder-color-field__swatch[data-cinder-alpha]:not([data-cinder-empty]) {
|
|
38
38
|
/* structural-pattern: transparency checkerboard so partially-transparent
|
|
39
|
-
* swatches stay visible
|
|
40
|
-
|
|
41
|
-
--_cinder-color-field-checker-base: #fff; /* cinder-allow-raw-color: structural-pattern — checkerboard backing */
|
|
42
|
-
--_cinder-color-field-checker-tile: #ccc; /* cinder-allow-raw-color: structural-pattern — checkerboard tile */
|
|
43
|
-
background-color: var(--_cinder-color-field-checker-base);
|
|
39
|
+
* swatches stay visible while following the shared checker tokens. */
|
|
40
|
+
background-color: var(--cinder-color-checker-base);
|
|
44
41
|
background-image:
|
|
45
42
|
linear-gradient(
|
|
46
43
|
var(--cinder-color-field-swatch, transparent),
|
|
47
44
|
var(--cinder-color-field-swatch, transparent)
|
|
48
45
|
),
|
|
49
|
-
linear-gradient(45deg, var(--
|
|
50
|
-
linear-gradient(-45deg, var(--
|
|
51
|
-
linear-gradient(45deg, transparent 75%, var(--
|
|
52
|
-
linear-gradient(-45deg, transparent 75%, var(--
|
|
46
|
+
linear-gradient(45deg, var(--cinder-color-checker-tile) 25%, transparent 25%),
|
|
47
|
+
linear-gradient(-45deg, var(--cinder-color-checker-tile) 25%, transparent 25%),
|
|
48
|
+
linear-gradient(45deg, transparent 75%, var(--cinder-color-checker-tile) 75%),
|
|
49
|
+
linear-gradient(-45deg, transparent 75%, var(--cinder-color-checker-tile) 75%);
|
|
53
50
|
background-size:
|
|
54
51
|
auto,
|
|
55
52
|
6px 6px,
|
|
@@ -13,12 +13,21 @@
|
|
|
13
13
|
width: 100%;
|
|
14
14
|
max-width: 280px;
|
|
15
15
|
|
|
16
|
-
/* structural-pattern: the
|
|
17
|
-
*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
--_cinder-color-picker-
|
|
21
|
-
--_cinder-color-picker-
|
|
16
|
+
/* structural-pattern: the thumb sits over arbitrary picked colors, so the
|
|
17
|
+
* white ring and dark edge stay fixed; dark chrome gets one extra outer ring. */
|
|
18
|
+
--_cinder-color-picker-thumb-border: #fff; /* cinder-allow-raw-color: structural-pattern — thumb contrast ring over arbitrary picked color */
|
|
19
|
+
/* prettier-ignore */
|
|
20
|
+
--_cinder-color-picker-thumb-shadow-edge: rgba(0, 0, 0, 0.5); /* cinder-allow-raw-color: structural-pattern — thumb outline over arbitrary picked color */
|
|
21
|
+
--_cinder-color-picker-thumb-shadow-support-light: transparent;
|
|
22
|
+
/* prettier-ignore */
|
|
23
|
+
--_cinder-color-picker-thumb-shadow-support-dark: rgba(255, 255, 255, 0.65); /* cinder-allow-raw-color: structural-pattern — thumb outline over dark chrome */
|
|
24
|
+
--_cinder-color-picker-thumb-shadow-support: light-dark(
|
|
25
|
+
var(--_cinder-color-picker-thumb-shadow-support-light),
|
|
26
|
+
var(--_cinder-color-picker-thumb-shadow-support-dark)
|
|
27
|
+
);
|
|
28
|
+
--_cinder-color-picker-thumb-shadow:
|
|
29
|
+
0 0 0 1px var(--_cinder-color-picker-thumb-shadow-edge),
|
|
30
|
+
0 0 0 2px var(--_cinder-color-picker-thumb-shadow-support);
|
|
22
31
|
}
|
|
23
32
|
|
|
24
33
|
.cinder-color-picker[data-cinder-disabled] {
|
|
@@ -62,12 +71,11 @@
|
|
|
62
71
|
width: 14px;
|
|
63
72
|
height: 14px;
|
|
64
73
|
/* structural-pattern: the draggable thumb sits over the user's chosen color,
|
|
65
|
-
* so its white ring +
|
|
66
|
-
|
|
67
|
-
border: 2px solid #fff; /* cinder-allow-raw-color: structural-pattern — thumb contrast ring over arbitrary picked color */
|
|
74
|
+
* so its white ring + contrast outline are hue-agnostic devices. */
|
|
75
|
+
border: 2px solid var(--_cinder-color-picker-thumb-border);
|
|
68
76
|
border-radius: 50%;
|
|
69
77
|
transform: translate(-50%, -50%);
|
|
70
|
-
box-shadow:
|
|
78
|
+
box-shadow: var(--_cinder-color-picker-thumb-shadow);
|
|
71
79
|
pointer-events: none;
|
|
72
80
|
}
|
|
73
81
|
|
|
@@ -92,13 +100,13 @@
|
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
.cinder-color-picker__alpha {
|
|
95
|
-
background-color: var(--
|
|
103
|
+
background-color: var(--cinder-color-checker-base);
|
|
96
104
|
background-image:
|
|
97
105
|
linear-gradient(to right, transparent, var(--cinder-color-picker-base, currentColor)),
|
|
98
|
-
linear-gradient(45deg, var(--
|
|
99
|
-
linear-gradient(-45deg, var(--
|
|
100
|
-
linear-gradient(45deg, transparent 75%, var(--
|
|
101
|
-
linear-gradient(-45deg, transparent 75%, var(--
|
|
106
|
+
linear-gradient(45deg, var(--cinder-color-checker-tile) 25%, transparent 25%),
|
|
107
|
+
linear-gradient(-45deg, var(--cinder-color-checker-tile) 25%, transparent 25%),
|
|
108
|
+
linear-gradient(45deg, transparent 75%, var(--cinder-color-checker-tile) 75%),
|
|
109
|
+
linear-gradient(-45deg, transparent 75%, var(--cinder-color-checker-tile) 75%);
|
|
102
110
|
background-size:
|
|
103
111
|
auto,
|
|
104
112
|
8px 8px,
|
|
@@ -126,13 +134,12 @@
|
|
|
126
134
|
width: 14px;
|
|
127
135
|
height: 14px;
|
|
128
136
|
/* structural-pattern: slider thumb sits over the hue rail / alpha
|
|
129
|
-
* checkerboard, so its
|
|
130
|
-
|
|
131
|
-
border: 2px solid #fff; /* cinder-allow-raw-color: structural-pattern — slider thumb contrast ring */
|
|
137
|
+
* checkerboard, so its ring + outline follow the gradient handle. */
|
|
138
|
+
border: 2px solid var(--_cinder-color-picker-thumb-border);
|
|
132
139
|
border-radius: 50%;
|
|
133
140
|
background: transparent;
|
|
134
141
|
transform: translate(-50%, -50%);
|
|
135
|
-
box-shadow:
|
|
142
|
+
box-shadow: var(--_cinder-color-picker-thumb-shadow);
|
|
136
143
|
pointer-events: none;
|
|
137
144
|
}
|
|
138
145
|
|
|
@@ -154,16 +161,16 @@
|
|
|
154
161
|
}
|
|
155
162
|
|
|
156
163
|
.cinder-color-picker__preview[data-cinder-alpha] {
|
|
157
|
-
background-color: var(--
|
|
164
|
+
background-color: var(--cinder-color-checker-base);
|
|
158
165
|
background-image:
|
|
159
166
|
linear-gradient(
|
|
160
167
|
var(--cinder-color-picker-preview, transparent),
|
|
161
168
|
var(--cinder-color-picker-preview, transparent)
|
|
162
169
|
),
|
|
163
|
-
linear-gradient(45deg, var(--
|
|
164
|
-
linear-gradient(-45deg, var(--
|
|
165
|
-
linear-gradient(45deg, transparent 75%, var(--
|
|
166
|
-
linear-gradient(-45deg, transparent 75%, var(--
|
|
170
|
+
linear-gradient(45deg, var(--cinder-color-checker-tile) 25%, transparent 25%),
|
|
171
|
+
linear-gradient(-45deg, var(--cinder-color-checker-tile) 25%, transparent 25%),
|
|
172
|
+
linear-gradient(45deg, transparent 75%, var(--cinder-color-checker-tile) 75%),
|
|
173
|
+
linear-gradient(-45deg, transparent 75%, var(--cinder-color-checker-tile) 75%);
|
|
167
174
|
background-size:
|
|
168
175
|
auto,
|
|
169
176
|
8px 8px,
|
|
@@ -71,17 +71,14 @@
|
|
|
71
71
|
|
|
72
72
|
.cinder-color-swatch-picker__swatch[data-cinder-alpha] {
|
|
73
73
|
/* structural-pattern: transparency checkerboard beneath the color layer — a
|
|
74
|
-
*
|
|
75
|
-
|
|
76
|
-
--_cinder-color-swatch-picker-checker-base: #fff; /* cinder-allow-raw-color: structural-pattern — checkerboard backing */
|
|
77
|
-
--_cinder-color-swatch-picker-checker-tile: #ccc; /* cinder-allow-raw-color: structural-pattern — checkerboard tile */
|
|
78
|
-
background-color: var(--_cinder-color-swatch-picker-checker-base);
|
|
74
|
+
* shared grid signalling "see-through" in both light and dark chrome. */
|
|
75
|
+
background-color: var(--cinder-color-checker-base);
|
|
79
76
|
background-image:
|
|
80
77
|
linear-gradient(var(--swatch-color), var(--swatch-color)),
|
|
81
|
-
linear-gradient(45deg, var(--
|
|
82
|
-
linear-gradient(-45deg, var(--
|
|
83
|
-
linear-gradient(45deg, transparent 75%, var(--
|
|
84
|
-
linear-gradient(-45deg, transparent 75%, var(--
|
|
78
|
+
linear-gradient(45deg, var(--cinder-color-checker-tile) 25%, transparent 25%),
|
|
79
|
+
linear-gradient(-45deg, var(--cinder-color-checker-tile) 25%, transparent 25%),
|
|
80
|
+
linear-gradient(45deg, transparent 75%, var(--cinder-color-checker-tile) 75%),
|
|
81
|
+
linear-gradient(-45deg, transparent 75%, var(--cinder-color-checker-tile) 75%);
|
|
85
82
|
background-size:
|
|
86
83
|
auto,
|
|
87
84
|
8px 8px,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# CommandMenu
|
|
2
|
+
|
|
3
|
+
Inline caret-anchored slash-command list for textareas and single-line text inputs.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { CommandMenu } from '@lostgradient/cinder/command-menu';
|
|
10
|
+
</script>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Guidance
|
|
14
|
+
|
|
15
|
+
### Use When
|
|
16
|
+
|
|
17
|
+
- Showing a contextual command list at the caret while a user types in a textarea or input.
|
|
18
|
+
- Building slash-command insertion flows where the host owns text replacement.
|
|
19
|
+
|
|
20
|
+
### Avoid When
|
|
21
|
+
|
|
22
|
+
- Exposing a global app launcher — use command-palette instead.
|
|
23
|
+
- Selecting from a static form option list — use combobox instead.
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
<!-- generated:props:start -->
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Required | Default | Description |
|
|
30
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `caretIndex` | `number` | yes | — | Caret offset within the anchor value. |
|
|
32
|
+
| `class` | `string` | no | — | Class merged with `.cinder-command-menu`. |
|
|
33
|
+
| `label` | `string` | no | — | Accessible listbox label. Default `'Commands'`. |
|
|
34
|
+
| `offset` | `number` | no | — | Distance in px between the caret and menu. Default `6`. |
|
|
35
|
+
| `open` | `boolean` | no | — | Open state. Bindable. Default `false`. |
|
|
36
|
+
| `placement` | `"top"` \| `"bottom"` \| `"left"` \| `"right"` \| `"top-start"` \| `"top-end"` \| `"bottom-start"` \| `"bottom-end"` | no | — | Caret-relative placement. Default `'bottom-start'`. |
|
|
37
|
+
| `query` | `string` | no | — | Query text after the trigger character. Bindable. Default `''`. |
|
|
38
|
+
| `anchor` | `(opaque)` | no | — | A prop whose shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
39
|
+
| `empty` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
40
|
+
| `items` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
41
|
+
| `ondismiss` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
42
|
+
| `onselect` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
43
|
+
| `onstatechange` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
44
|
+
|
|
45
|
+
<!-- generated:props:end -->
|
|
46
|
+
|
|
47
|
+
## CSS Variables
|
|
48
|
+
|
|
49
|
+
<!-- generated:variables:start -->
|
|
50
|
+
|
|
51
|
+
This component does not declare any local CSS variables.
|
|
52
|
+
|
|
53
|
+
<!-- generated:variables:end -->
|
|
54
|
+
|
|
55
|
+
## Subcomponents
|
|
56
|
+
|
|
57
|
+
<!-- generated:subcomponents:start -->
|
|
58
|
+
|
|
59
|
+
None.
|
|
60
|
+
|
|
61
|
+
<!-- generated:subcomponents:end -->
|
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
"title": "Confirm dialog",
|
|
9
9
|
"description": "A destructive action gated behind an explicit confirm and cancel prompt.",
|
|
10
10
|
"code": "<script lang=\"ts\">\n import { Button } from '@lostgradient/cinder/button';\n import { ConfirmDialog } from '@lostgradient/cinder/confirm-dialog';\n\n let open = $state(false);\n let triggerRef: HTMLElement | null = $state(null);\n let lastAction = $state('');\n</script>\n\n<div style=\"display: flex; flex-direction: column; gap: 1rem; align-items: flex-start;\">\n <Button\n label=\"Delete item\"\n variant=\"danger\"\n onclick={(event) => {\n triggerRef = event.currentTarget as HTMLElement;\n open = true;\n }}\n />\n\n {#if lastAction}\n <p style=\"margin: 0; color: var(--cinder-text-muted); font-size: var(--cinder-text-sm);\">\n Last action: <strong>{lastAction}</strong>\n </p>\n {/if}\n</div>\n\n<ConfirmDialog\n bind:open\n {triggerRef}\n title=\"Delete item?\"\n description=\"This permanently removes the item. This action cannot be undone.\"\n destructive\n confirmLabel=\"Delete\"\n onconfirm={() => (lastAction = 'confirmed')}\n oncancel={() => (lastAction = 'cancelled')}\n/>\n"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "delete-account",
|
|
14
|
+
"title": "Delete account",
|
|
15
|
+
"description": "A destructive ConfirmDialog for permanent account and data deletion. Default focus lands on Cancel to guard against accidental confirmation.",
|
|
16
|
+
"code": "<script lang=\"ts\">\n import { Button } from '@lostgradient/cinder/button';\n import { ConfirmDialog } from '@lostgradient/cinder/confirm-dialog';\n\n let open = $state(false);\n let triggerRef: HTMLElement | null = $state(null);\n let lastAction = $state('');\n</script>\n\n<div style=\"display: flex; flex-direction: column; gap: 1rem; align-items: flex-start;\">\n <Button\n label=\"Delete account\"\n variant=\"danger\"\n onclick={(event) => {\n triggerRef = event.currentTarget as HTMLElement;\n open = true;\n }}\n />\n\n {#if lastAction}\n <p style=\"margin: 0; color: var(--cinder-text-muted); font-size: var(--cinder-text-sm);\">\n Last action: <strong>{lastAction}</strong>\n </p>\n {/if}\n</div>\n\n<ConfirmDialog\n bind:open\n {triggerRef}\n title=\"Delete your account?\"\n description=\"This will permanently delete your account and all associated data. This action cannot be undone.\"\n destructive\n confirmLabel=\"Delete account\"\n onconfirm={() => (lastAction = 'account deleted')}\n oncancel={() => (lastAction = 'cancelled')}\n/>\n"
|
|
11
17
|
}
|
|
12
18
|
]
|
|
13
19
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# ContextMenu
|
|
2
|
+
|
|
3
|
+
Right-click and long-press menu positioned at the user's pointer while reusing dropdown menu parts.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { ContextMenu } from '@lostgradient/cinder/context-menu';
|
|
10
|
+
</script>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Guidance
|
|
14
|
+
|
|
15
|
+
### Use When
|
|
16
|
+
|
|
17
|
+
- Providing contextual actions for a canvas, list row, file, or selected item.
|
|
18
|
+
- Opening a menu from a pointer location instead of a visible dropdown trigger.
|
|
19
|
+
|
|
20
|
+
### Avoid When
|
|
21
|
+
|
|
22
|
+
- The menu should open from a button — use dropdown.
|
|
23
|
+
- Showing arbitrary rich content rather than menu actions — use popover.
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
<!-- generated:props:start -->
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Required | Default | Description |
|
|
30
|
+
| ---------------- | ---------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `anchorPoint` | { x: `number`; y: `number` } | no | — | |
|
|
32
|
+
| `class` | `string` | no | — | |
|
|
33
|
+
| `disabled` | `boolean` | no | — | |
|
|
34
|
+
| `longPressDelay` | `number` | no | — | |
|
|
35
|
+
| `open` | `boolean` | no | — | |
|
|
36
|
+
| `children` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
37
|
+
| `onopenchange` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
38
|
+
|
|
39
|
+
<!-- generated:props:end -->
|
|
40
|
+
|
|
41
|
+
## CSS Variables
|
|
42
|
+
|
|
43
|
+
<!-- generated:variables:start -->
|
|
44
|
+
|
|
45
|
+
This component does not declare any local CSS variables.
|
|
46
|
+
|
|
47
|
+
<!-- generated:variables:end -->
|
|
48
|
+
|
|
49
|
+
## Subcomponents
|
|
50
|
+
|
|
51
|
+
<!-- generated:subcomponents:start -->
|
|
52
|
+
|
|
53
|
+
None.
|
|
54
|
+
|
|
55
|
+
<!-- generated:subcomponents:end -->
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# ContextMenuTrigger
|
|
2
|
+
|
|
3
|
+
Compose-only trigger region that opens a context-menu on right-click or touch long-press.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { ContextMenuTrigger } from '@lostgradient/cinder/context-menu-trigger';
|
|
10
|
+
</script>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Guidance
|
|
14
|
+
|
|
15
|
+
### Use When
|
|
16
|
+
|
|
17
|
+
- Wrapping the region that should own contextual actions inside ContextMenu.
|
|
18
|
+
- Pairing pointer-positioned menu behavior with dropdown menu items.
|
|
19
|
+
|
|
20
|
+
### Avoid When
|
|
21
|
+
|
|
22
|
+
- Used outside context-menu — it requires the ContextMenu provider.
|
|
23
|
+
- Opening a normal click menu from a visible button — use dropdown-trigger.
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
<!-- generated:props:start -->
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Required | Default | Description |
|
|
30
|
+
| ---------- | ---------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `class` | `string` | no | — | |
|
|
32
|
+
| `children` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
33
|
+
|
|
34
|
+
<!-- generated:props:end -->
|
|
35
|
+
|
|
36
|
+
## CSS Variables
|
|
37
|
+
|
|
38
|
+
<!-- generated:variables:start -->
|
|
39
|
+
|
|
40
|
+
This component does not declare any local CSS variables.
|
|
41
|
+
|
|
42
|
+
<!-- generated:variables:end -->
|
|
43
|
+
|
|
44
|
+
## Subcomponents
|
|
45
|
+
|
|
46
|
+
<!-- generated:subcomponents:start -->
|
|
47
|
+
|
|
48
|
+
None.
|
|
49
|
+
|
|
50
|
+
<!-- generated:subcomponents:end -->
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
let startX = 0;
|
|
46
46
|
let startY = 0;
|
|
47
47
|
let suppressClick = false;
|
|
48
|
-
let
|
|
48
|
+
let suppressNextContextmenu = false;
|
|
49
49
|
|
|
50
50
|
type TriggerEvent<EventType extends Event> = EventType & {
|
|
51
51
|
currentTarget: EventTarget & HTMLDivElement;
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
callTriggerHandler(oncontextmenu, event);
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
if (
|
|
78
|
+
if (suppressNextContextmenu) {
|
|
79
79
|
event.preventDefault();
|
|
80
80
|
callTriggerHandler(oncontextmenu, event);
|
|
81
81
|
return;
|
|
@@ -91,14 +91,16 @@
|
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
93
|
if (event.pointerType !== 'touch') {
|
|
94
|
+
suppressNextContextmenu = false;
|
|
94
95
|
callTriggerHandler(onpointerdown, event);
|
|
95
96
|
return;
|
|
96
97
|
}
|
|
98
|
+
suppressNextContextmenu = false;
|
|
97
99
|
startX = event.clientX;
|
|
98
100
|
startY = event.clientY;
|
|
99
101
|
clearLongPress();
|
|
100
102
|
longPressTimer = setTimeout(() => {
|
|
101
|
-
|
|
103
|
+
suppressNextContextmenu = true;
|
|
102
104
|
suppressClick = true;
|
|
103
105
|
context.openAt(startX, startY);
|
|
104
106
|
}, context.longPressDelay);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# DataTable
|
|
2
|
+
|
|
3
|
+
Data-driven accessible table that renders rows and columns into a real `<table>` with `<caption>`, scoped column and row headers, optional sortable columns, and a horizontal-scroll responsive container.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { DataTable } from '@lostgradient/cinder/data-table';
|
|
10
|
+
|
|
11
|
+
const columns = [
|
|
12
|
+
{ key: 'name', label: 'Name', rowHeader: true },
|
|
13
|
+
{ key: 'score', label: 'Score', sortable: true, align: 'end' },
|
|
14
|
+
];
|
|
15
|
+
const rows = [
|
|
16
|
+
{ name: 'Ada', score: 98 },
|
|
17
|
+
{ name: 'Grace', score: 95 },
|
|
18
|
+
];
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<DataTable {columns} {rows} caption="Class roster" />
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Guidance
|
|
25
|
+
|
|
26
|
+
### Use When
|
|
27
|
+
|
|
28
|
+
- Rendering a roster, cohort, or assignment view from row/column data with real table semantics.
|
|
29
|
+
- Needing sortable columns with screen-reader-announced sort state out of the box.
|
|
30
|
+
|
|
31
|
+
### Avoid When
|
|
32
|
+
|
|
33
|
+
- Composing a bespoke table layout with custom cell markup — use the compositional Table family directly.
|
|
34
|
+
- Visualizing dense numeric magnitude across two dimensions — use matrix-chart instead.
|
|
35
|
+
|
|
36
|
+
## Props
|
|
37
|
+
|
|
38
|
+
<!-- generated:props:start -->
|
|
39
|
+
|
|
40
|
+
| Prop | Type | Required | Default | Description |
|
|
41
|
+
| -------------- | ------------------------------------------------ | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| `caption` | `string` | no | — | Visual caption rendered as a `<caption>` element above the table. |
|
|
43
|
+
| `class` | `string` | no | — | Additional class names merged onto DataTable's root wrapper element (the `<div class="cinder-data-table">` that contains the table). To style the `<table>` itself, target `.cinder-data-table table` from this class. |
|
|
44
|
+
| `density` | `"comfortable"` \| `"condensed"` \| `"spacious"` | no | — | Vertical padding density for header and body cells. Defaults to `'comfortable'`. |
|
|
45
|
+
| `scrollable` | `boolean` | no | — | When true, wraps the table in a `.cinder-table-scroll` container that enables horizontal overflow scrolling on small viewports. |
|
|
46
|
+
| `stickyHeader` | `boolean` | no | — | When true, the header sticks to the top of the scrolling container. |
|
|
47
|
+
| `columns` | `(opaque)` | no | — | A prop whose shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
48
|
+
| `rows` | `(opaque)` | no | — | A generically typed prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
49
|
+
| `sort` | `(opaque)` | no | — | A prop whose shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
50
|
+
|
|
51
|
+
<!-- generated:props:end -->
|
|
52
|
+
|
|
53
|
+
## CSS Variables
|
|
54
|
+
|
|
55
|
+
<!-- generated:variables:start -->
|
|
56
|
+
|
|
57
|
+
This component does not declare any local CSS variables.
|
|
58
|
+
|
|
59
|
+
<!-- generated:variables:end -->
|
|
60
|
+
|
|
61
|
+
## Subcomponents
|
|
62
|
+
|
|
63
|
+
<!-- generated:subcomponents:start -->
|
|
64
|
+
|
|
65
|
+
None.
|
|
66
|
+
|
|
67
|
+
<!-- generated:subcomponents:end -->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@layer cinder.tokens, cinder.foundation, cinder.components, cinder.utilities;
|
|
2
|
+
/* Compound-family aggregation: DataTable renders the whole Table family, so
|
|
3
|
+
* `cinder/data-table/styles` must pull in the Table CSS (which itself imports
|
|
4
|
+
* table-body / table-cell / table-header / table-header-cell / table-row and
|
|
5
|
+
* defines `.cinder-table-scroll`). Without this, the data-table subpath ships
|
|
6
|
+
* an unstyled table and the scroll override below has no base behaviour to
|
|
7
|
+
* extend. Sibling-leaf paths resolve identically in `src/` and `dist/`. */
|
|
8
|
+
@import '../table/table.css';
|
|
9
|
+
|
|
10
|
+
@layer cinder.components {
|
|
11
|
+
/* ========================================
|
|
12
|
+
* DATA TABLE
|
|
13
|
+
* Thin wrapper div that scopes the data-driven DataTable component.
|
|
14
|
+
* Visual treatment for the table itself lives in table.css.
|
|
15
|
+
* ======================================== */
|
|
16
|
+
|
|
17
|
+
/* The non-scrollable wrapper is a pure structural pass-through: `display:
|
|
18
|
+
* contents` lets the inner <table> participate directly in the parent layout
|
|
19
|
+
* with no extra box. */
|
|
20
|
+
.cinder-data-table {
|
|
21
|
+
display: contents;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* When scrollable, the wrapper MUST generate a box so its `overflow-x: auto`
|
|
25
|
+
* (from .cinder-table-scroll) has something to scroll — `display: contents`
|
|
26
|
+
* would erase the box and silently disable horizontal scrolling. */
|
|
27
|
+
.cinder-data-table.cinder-table-scroll {
|
|
28
|
+
display: block;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schemas/examples.schema.json",
|
|
3
|
+
"component": "data-table",
|
|
4
|
+
"import": "@lostgradient/cinder/data-table",
|
|
5
|
+
"examples": [
|
|
6
|
+
{
|
|
7
|
+
"id": "roster",
|
|
8
|
+
"title": "Class roster",
|
|
9
|
+
"description": "A class roster with a sortable grade column. The Name column is the row header (scope=\"row\"). Bind sort state and reorder rows in a $derived expression.",
|
|
10
|
+
"code": "<script lang=\"ts\">\n import { DataTable } from '@lostgradient/cinder/data-table';\n import type { TableSort } from '@lostgradient/cinder/table';\n\n type Student = {\n name: string;\n subject: string;\n grade: number;\n };\n\n const students: Student[] = [\n { name: 'Ada Lovelace', subject: 'Mathematics', grade: 98 },\n { name: 'Grace Hopper', subject: 'Computer Science', grade: 92 },\n { name: 'Alan Turing', subject: 'Cryptography', grade: 95 },\n { name: 'Margaret Hamilton', subject: 'Software Engineering', grade: 89 },\n ];\n\n const columns = [\n { key: 'name' as const, label: 'Name', rowHeader: true },\n { key: 'subject' as const, label: 'Subject' },\n { key: 'grade' as const, label: 'Grade', sortable: true, align: 'end' as const },\n ];\n\n let sort: TableSort | undefined = $state();\n\n const sortedStudents = $derived.by(() => {\n if (!sort) return students;\n return [...students].sort((a, b) => {\n const key = sort!.column as keyof Student;\n const aValue = a[key];\n const bValue = b[key];\n const comparison =\n typeof aValue === 'number' && typeof bValue === 'number'\n ? aValue - bValue\n : String(aValue).localeCompare(String(bValue));\n return sort!.direction === 'ascending' ? comparison : -comparison;\n });\n });\n</script>\n\n<DataTable caption=\"Spring semester roster\" {columns} rows={sortedStudents} bind:sort />\n"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "sortable",
|
|
14
|
+
"title": "Sortable data table",
|
|
15
|
+
"description": "Multiple sortable columns with a scrollable wrapper. Sort state is bound and rows are reordered via $derived.",
|
|
16
|
+
"code": "<script lang=\"ts\">\n import { DataTable } from '@lostgradient/cinder/data-table';\n import type { TableSort } from '@lostgradient/cinder/table';\n\n type Contributor = {\n name: string;\n role: string;\n commits: number;\n reviews: number;\n };\n\n const contributors: Contributor[] = [\n { name: 'Ada Lovelace', role: 'Mathematician', commits: 142, reviews: 34 },\n { name: 'Grace Hopper', role: 'Computer Scientist', commits: 98, reviews: 41 },\n { name: 'Alan Turing', role: 'Cryptanalyst', commits: 76, reviews: 28 },\n { name: 'Margaret Hamilton', role: 'Software Engineer', commits: 304, reviews: 87 },\n { name: 'Linus Torvalds', role: 'Systems Engineer', commits: 512, reviews: 19 },\n { name: 'Dennis Ritchie', role: 'Language Designer', commits: 231, reviews: 55 },\n ];\n\n const columns = [\n { key: 'name' as const, label: 'Name', sortable: true, rowHeader: true },\n { key: 'role' as const, label: 'Role', sortable: true },\n { key: 'commits' as const, label: 'Commits', sortable: true, align: 'end' as const },\n { key: 'reviews' as const, label: 'Reviews', sortable: true, align: 'end' as const },\n ];\n\n let sort: TableSort | undefined = $state();\n\n const sortedContributors = $derived.by(() => {\n if (!sort) return contributors;\n return [...contributors].sort((a, b) => {\n const key = sort!.column as keyof Contributor;\n const aValue = a[key];\n const bValue = b[key];\n const comparison =\n typeof aValue === 'number' && typeof bValue === 'number'\n ? aValue - bValue\n : String(aValue).localeCompare(String(bValue));\n return sort!.direction === 'ascending' ? comparison : -comparison;\n });\n });\n</script>\n\n<DataTable caption=\"Top contributors\" {columns} rows={sortedContributors} bind:sort scrollable />\n"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"caption": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "Visual caption rendered as a `<caption>` element above the table."
|
|
8
|
+
},
|
|
9
|
+
"stickyHeader": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"description": "When true, the header sticks to the top of the scrolling container."
|
|
12
|
+
},
|
|
13
|
+
"density": {
|
|
14
|
+
"enum": ["comfortable", "condensed", "spacious"],
|
|
15
|
+
"description": "Vertical padding density for header and body cells.\nDefaults to `'comfortable'`."
|
|
16
|
+
},
|
|
17
|
+
"scrollable": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "When true, wraps the table in a `.cinder-table-scroll` container that\nenables horizontal overflow scrolling on small viewports."
|
|
20
|
+
},
|
|
21
|
+
"class": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Additional class names merged onto DataTable's root wrapper element (the\n`<div class=\"cinder-data-table\">` that contains the table). To style the\n`<table>` itself, target `.cinder-data-table table` from this class."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"metadata": {
|
|
28
|
+
"unsupportedProps": [
|
|
29
|
+
{
|
|
30
|
+
"name": "columns",
|
|
31
|
+
"reason": "unknown-shape"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "rows",
|
|
35
|
+
"reason": "generic-type-parameter"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "sort",
|
|
39
|
+
"reason": "unknown-shape"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { ComponentSchema } from '../../schema-types';
|
|
2
|
+
|
|
3
|
+
const schema = {
|
|
4
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
caption: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
description: 'Visual caption rendered as a `<caption>` element above the table.',
|
|
10
|
+
},
|
|
11
|
+
stickyHeader: {
|
|
12
|
+
type: 'boolean',
|
|
13
|
+
description: 'When true, the header sticks to the top of the scrolling container.',
|
|
14
|
+
},
|
|
15
|
+
density: {
|
|
16
|
+
enum: ['comfortable', 'condensed', 'spacious'],
|
|
17
|
+
description:
|
|
18
|
+
"Vertical padding density for header and body cells.\nDefaults to `'comfortable'`.",
|
|
19
|
+
},
|
|
20
|
+
scrollable: {
|
|
21
|
+
type: 'boolean',
|
|
22
|
+
description:
|
|
23
|
+
'When true, wraps the table in a `.cinder-table-scroll` container that\nenables horizontal overflow scrolling on small viewports.',
|
|
24
|
+
},
|
|
25
|
+
class: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description:
|
|
28
|
+
'Additional class names merged onto DataTable\'s root wrapper element (the\n`<div class="cinder-data-table">` that contains the table). To style the\n`<table>` itself, target `.cinder-data-table table` from this class.',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
additionalProperties: false,
|
|
32
|
+
metadata: {
|
|
33
|
+
unsupportedProps: [
|
|
34
|
+
{
|
|
35
|
+
name: 'columns',
|
|
36
|
+
reason: 'unknown-shape',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'rows',
|
|
40
|
+
reason: 'generic-type-parameter',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'sort',
|
|
44
|
+
reason: 'unknown-shape',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
} satisfies ComponentSchema;
|
|
49
|
+
|
|
50
|
+
export default schema as ComponentSchema;
|