@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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# MenuBar
|
|
2
|
+
|
|
3
|
+
Command menubar for application chrome such as File, Edit, and View menus.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { MenuBar } from '@lostgradient/cinder/menu-bar';
|
|
10
|
+
</script>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Guidance
|
|
14
|
+
|
|
15
|
+
### Use When
|
|
16
|
+
|
|
17
|
+
- Building a desktop-style command menubar with dropdown command groups.
|
|
18
|
+
- Exposing top-level application menus that need arrow-key traversal and optional submenus.
|
|
19
|
+
|
|
20
|
+
### Avoid When
|
|
21
|
+
|
|
22
|
+
- Linking between routes or sections — use navigation-bar or side-navigation instead.
|
|
23
|
+
- Showing one standalone trigger with a menu — use dropdown, dropdown-menu, and dropdown-item directly.
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
<!-- generated:props:start -->
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Required | Default | Description |
|
|
30
|
+
| ------------ | ---------- | -------- | ------- | ------------------------------------------------------------------------------------------------------- |
|
|
31
|
+
| `class` | `string` | no | — | |
|
|
32
|
+
| `id` | `string` | no | — | |
|
|
33
|
+
| `label` | `string` | no | — | |
|
|
34
|
+
| `labelledBy` | `string` | no | — | |
|
|
35
|
+
| `menus` | `(opaque)` | no | — | A prop whose shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
36
|
+
|
|
37
|
+
<!-- generated:props:end -->
|
|
38
|
+
|
|
39
|
+
## CSS Variables
|
|
40
|
+
|
|
41
|
+
<!-- generated:variables:start -->
|
|
42
|
+
|
|
43
|
+
This component does not declare any local CSS variables.
|
|
44
|
+
|
|
45
|
+
<!-- generated:variables:end -->
|
|
46
|
+
|
|
47
|
+
## Subcomponents
|
|
48
|
+
|
|
49
|
+
<!-- generated:subcomponents:start -->
|
|
50
|
+
|
|
51
|
+
None.
|
|
52
|
+
|
|
53
|
+
<!-- generated:subcomponents:end -->
|
|
@@ -18,11 +18,11 @@ Top-level horizontal navigation bar for primary site or app destinations.
|
|
|
18
18
|
|
|
19
19
|
| Prop | Type | Required | Default | Description |
|
|
20
20
|
| ---------------- | ---------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `class` | `string` | no | — | Custom class merged onto the root `<nav>` element. |
|
|
21
22
|
| `mobileMenuOpen` | `boolean` | no | — | Two-way bindable open state of the mobile menu. |
|
|
22
23
|
| `navAriaLabel` | `string` | no | — | Accessible name for the <nav> landmark. Wins over any aria-label passed via rest. Default 'Main navigation'. |
|
|
23
24
|
| `actions` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
24
25
|
| `brand` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
25
|
-
| `class` | `(opaque)` | no | — | A prop whose shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
26
26
|
| `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. |
|
|
27
27
|
| `menuToggle` | `(opaque)` | no | — | A function or snippet prop. Its shape is not captured by the JSON schema; see the component types for the exact signature. |
|
|
28
28
|
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"type": "object",
|
|
4
4
|
"properties": {
|
|
5
|
+
"class": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "Custom class merged onto the root `<nav>` element."
|
|
8
|
+
},
|
|
5
9
|
"mobileMenuOpen": {
|
|
6
10
|
"type": "boolean",
|
|
7
11
|
"description": "Two-way bindable open state of the mobile menu."
|
|
@@ -22,10 +26,6 @@
|
|
|
22
26
|
"name": "brand",
|
|
23
27
|
"reason": "function-or-snippet"
|
|
24
28
|
},
|
|
25
|
-
{
|
|
26
|
-
"name": "class",
|
|
27
|
-
"reason": "unknown-shape"
|
|
28
|
-
},
|
|
29
29
|
{
|
|
30
30
|
"name": "items",
|
|
31
31
|
"reason": "function-or-snippet"
|
|
@@ -4,6 +4,10 @@ const schema = {
|
|
|
4
4
|
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
5
5
|
type: 'object',
|
|
6
6
|
properties: {
|
|
7
|
+
class: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
description: 'Custom class merged onto the root `<nav>` element.',
|
|
10
|
+
},
|
|
7
11
|
mobileMenuOpen: {
|
|
8
12
|
type: 'boolean',
|
|
9
13
|
description: 'Two-way bindable open state of the mobile menu.',
|
|
@@ -25,10 +29,6 @@ const schema = {
|
|
|
25
29
|
name: 'brand',
|
|
26
30
|
reason: 'function-or-snippet',
|
|
27
31
|
},
|
|
28
|
-
{
|
|
29
|
-
name: 'class',
|
|
30
|
-
reason: 'unknown-shape',
|
|
31
|
-
},
|
|
32
32
|
{
|
|
33
33
|
name: 'items',
|
|
34
34
|
reason: 'function-or-snippet',
|
|
@@ -11,7 +11,8 @@ export type NavigationBarToggleAttributes = {
|
|
|
11
11
|
export type NavigationBarItemsContext = {
|
|
12
12
|
variant: NavigationVariant;
|
|
13
13
|
};
|
|
14
|
-
export type NavigationBarProps = HTMLAttributes<HTMLElement> & {
|
|
14
|
+
export type NavigationBarProps = Omit<HTMLAttributes<HTMLElement>, 'class'> & {
|
|
15
|
+
/** Custom class merged onto the root `<nav>` element. */
|
|
15
16
|
class?: string;
|
|
16
17
|
brand?: Snippet;
|
|
17
18
|
/** Receives a context object with the current variant. */
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# PricingCard
|
|
2
|
+
|
|
3
|
+
Presents a single pricing plan with its name, price, feature list, an optional caveat line, and a call-to-action button, with a selectable/active state.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```svelte
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { PricingCard } from '@lostgradient/cinder/pricing-card';
|
|
10
|
+
</script>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Guidance
|
|
14
|
+
|
|
15
|
+
### Use When
|
|
16
|
+
|
|
17
|
+
- Letting users compare and select subscription tiers or product plans.
|
|
18
|
+
- Highlighting one tier as selected or recommended in a pricing comparison.
|
|
19
|
+
|
|
20
|
+
### Avoid When
|
|
21
|
+
|
|
22
|
+
- Showing generic grouped content without a distinct price or CTA — use card instead.
|
|
23
|
+
- Displaying a single key metric in isolation — use stat or stat-group instead.
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
<!-- generated:props:start -->
|
|
28
|
+
|
|
29
|
+
| Prop | Type | Required | Default | Description |
|
|
30
|
+
| ---------- | ---------- | -------- | ------- | ------------------------------------------------------ |
|
|
31
|
+
| `caveat` | `string` | no | — | Optional footnote or caveat beneath the features list. |
|
|
32
|
+
| `class` | `string` | no | — | Custom class merged with `.cinder-pricing-card`. |
|
|
33
|
+
| `cta` | `string` | yes | — | Label for the call-to-action button. |
|
|
34
|
+
| `features` | `string`[] | yes | — | Feature strings to display in the bulleted list. |
|
|
35
|
+
| `name` | `string` | yes | — | Plan name displayed as the card heading. |
|
|
36
|
+
| `price` | `string` | yes | — | Price string, e.g. "$9/mo" or "Free". |
|
|
37
|
+
| `selected` | `boolean` | no | `false` | Whether this card is the currently selected plan. |
|
|
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,173 @@
|
|
|
1
|
+
@layer cinder.tokens, cinder.foundation, cinder.components, cinder.utilities;
|
|
2
|
+
@layer cinder.components {
|
|
3
|
+
/* ========================================
|
|
4
|
+
* PRICING CARD
|
|
5
|
+
* ======================================== */
|
|
6
|
+
|
|
7
|
+
.cinder-pricing-card {
|
|
8
|
+
container-type: inline-size;
|
|
9
|
+
container-name: cinder-pricing-card;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
inline-size: 100%;
|
|
13
|
+
border-radius: var(--cinder-radius-lg);
|
|
14
|
+
background: var(--cinder-surface-raised);
|
|
15
|
+
border: 1px solid var(--cinder-border-muted);
|
|
16
|
+
color: var(--cinder-text);
|
|
17
|
+
box-shadow: var(--cinder-shadow-sm);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
transition:
|
|
20
|
+
border-color var(--cinder-duration-fast) var(--cinder-ease-standard),
|
|
21
|
+
box-shadow var(--cinder-duration-fast) var(--cinder-ease-standard);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.cinder-pricing-card[data-cinder-selected] {
|
|
25
|
+
border-color: var(--cinder-accent);
|
|
26
|
+
box-shadow:
|
|
27
|
+
var(--cinder-shadow-sm),
|
|
28
|
+
0 0 0 2px color-mix(in oklch, var(--cinder-accent), transparent 70%);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* ----------------------------------------
|
|
32
|
+
* Header
|
|
33
|
+
* ---------------------------------------- */
|
|
34
|
+
|
|
35
|
+
.cinder-pricing-card__header {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: var(--cinder-space-1);
|
|
39
|
+
padding: var(--cinder-space-4) var(--cinder-space-4) var(--cinder-space-3);
|
|
40
|
+
border-bottom: 1px solid var(--cinder-border-muted);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.cinder-pricing-card[data-cinder-selected] .cinder-pricing-card__header {
|
|
44
|
+
background: color-mix(in oklch, var(--cinder-accent), transparent 92%);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.cinder-pricing-card__heading-row {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
gap: var(--cinder-space-2);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Non-color cue for the selected plan (WCAG 1.4.1): a text pill in the header
|
|
55
|
+
* so selection is conveyed independently of the accent treatment. */
|
|
56
|
+
.cinder-pricing-card__selected-flag {
|
|
57
|
+
flex-shrink: 0;
|
|
58
|
+
font-size: var(--cinder-text-xs);
|
|
59
|
+
font-weight: var(--cinder-font-semibold);
|
|
60
|
+
letter-spacing: 0.025em;
|
|
61
|
+
text-transform: uppercase;
|
|
62
|
+
color: var(--cinder-accent-text);
|
|
63
|
+
background: color-mix(in oklch, var(--cinder-accent), transparent 85%);
|
|
64
|
+
border-radius: var(--cinder-radius-full);
|
|
65
|
+
padding: var(--cinder-space-1) var(--cinder-space-2);
|
|
66
|
+
line-height: 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* ----------------------------------------
|
|
70
|
+
* Name & price
|
|
71
|
+
* ---------------------------------------- */
|
|
72
|
+
|
|
73
|
+
.cinder-pricing-card__name {
|
|
74
|
+
font-size: var(--cinder-text-sm);
|
|
75
|
+
font-weight: var(--cinder-font-semibold);
|
|
76
|
+
color: var(--cinder-text);
|
|
77
|
+
margin: 0;
|
|
78
|
+
letter-spacing: 0.025em;
|
|
79
|
+
text-transform: uppercase;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.cinder-pricing-card[data-cinder-selected] .cinder-pricing-card__name {
|
|
83
|
+
color: var(--cinder-accent-text);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cinder-pricing-card__price {
|
|
87
|
+
font-size: var(--cinder-text-3xl);
|
|
88
|
+
font-weight: var(--cinder-font-bold);
|
|
89
|
+
color: var(--cinder-text);
|
|
90
|
+
margin: 0;
|
|
91
|
+
line-height: 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* ----------------------------------------
|
|
95
|
+
* Body
|
|
96
|
+
* ---------------------------------------- */
|
|
97
|
+
|
|
98
|
+
.cinder-pricing-card__body {
|
|
99
|
+
flex: 1;
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
gap: var(--cinder-space-3);
|
|
103
|
+
padding: var(--cinder-space-4);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* ----------------------------------------
|
|
107
|
+
* Features list
|
|
108
|
+
* ---------------------------------------- */
|
|
109
|
+
|
|
110
|
+
.cinder-pricing-card__features {
|
|
111
|
+
list-style: none;
|
|
112
|
+
margin: 0;
|
|
113
|
+
padding: 0;
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: var(--cinder-space-2);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.cinder-pricing-card__feature {
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: baseline;
|
|
122
|
+
gap: var(--cinder-space-2);
|
|
123
|
+
font-size: var(--cinder-text-sm);
|
|
124
|
+
color: var(--cinder-text);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.cinder-pricing-card__feature::before {
|
|
128
|
+
content: '';
|
|
129
|
+
display: inline-block;
|
|
130
|
+
inline-size: 0.375rem;
|
|
131
|
+
block-size: 0.375rem;
|
|
132
|
+
border-radius: var(--cinder-radius-full);
|
|
133
|
+
background: var(--cinder-accent);
|
|
134
|
+
flex-shrink: 0;
|
|
135
|
+
translate: 0 0.1em;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* ----------------------------------------
|
|
139
|
+
* Caveat
|
|
140
|
+
* ---------------------------------------- */
|
|
141
|
+
|
|
142
|
+
.cinder-pricing-card__caveat {
|
|
143
|
+
font-size: var(--cinder-text-xs);
|
|
144
|
+
color: var(--cinder-text-subtle);
|
|
145
|
+
margin: 0;
|
|
146
|
+
font-style: italic;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* ----------------------------------------
|
|
150
|
+
* Footer (CTA)
|
|
151
|
+
* ---------------------------------------- */
|
|
152
|
+
|
|
153
|
+
.cinder-pricing-card__footer {
|
|
154
|
+
padding: var(--cinder-space-3) var(--cinder-space-4) var(--cinder-space-4);
|
|
155
|
+
border-top: 1px solid var(--cinder-border-muted);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* ----------------------------------------
|
|
159
|
+
* Responsive
|
|
160
|
+
* ---------------------------------------- */
|
|
161
|
+
|
|
162
|
+
/* Shrink the price only when the card itself is genuinely cramped — near the
|
|
163
|
+
* tight end of an auto-fit grid (examples floor at ~14rem). A viewport @media
|
|
164
|
+
* here would be wrong: a pricing card reacts to its own box width, not the
|
|
165
|
+
* viewport (RESPONSIVE-POLICY.md). The previous 640px viewport breakpoint
|
|
166
|
+
* fired on phones; the equivalent container threshold is far smaller because
|
|
167
|
+
* pricing cards render at ~14–22rem, not full-viewport width. */
|
|
168
|
+
@container cinder-pricing-card (max-width: 16rem) {
|
|
169
|
+
.cinder-pricing-card__price {
|
|
170
|
+
font-size: var(--cinder-text-2xl);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../schemas/examples.schema.json",
|
|
3
|
+
"component": "pricing-card",
|
|
4
|
+
"import": "@lostgradient/cinder/pricing-card",
|
|
5
|
+
"examples": [
|
|
6
|
+
{
|
|
7
|
+
"id": "tiers",
|
|
8
|
+
"title": "Pricing tiers",
|
|
9
|
+
"description": "Three plan tiles side by side with one pre-selected.",
|
|
10
|
+
"code": "<script lang=\"ts\">\n import { PricingCard } from '@lostgradient/cinder/pricing-card';\n\n let selectedPlan = $state<'starter' | 'pro' | 'enterprise'>('pro');\n</script>\n\n<div\n style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--cinder-space-4); align-items: start;\"\n>\n <PricingCard\n name=\"Starter\"\n price=\"Free\"\n features={['3 projects', '1 GB storage', 'Community support']}\n cta=\"Get started\"\n selected={selectedPlan === 'starter'}\n onselect={() => {\n selectedPlan = 'starter';\n }}\n />\n\n <PricingCard\n name=\"Pro\"\n price=\"$9/mo\"\n features={['Unlimited projects', '10 GB storage', 'Priority support', 'Custom domains']}\n cta=\"Choose Pro\"\n selected={selectedPlan === 'pro'}\n onselect={() => {\n selectedPlan = 'pro';\n }}\n />\n\n <PricingCard\n name=\"Enterprise\"\n price=\"$49/mo\"\n features={[\n 'Unlimited projects',\n '500 GB storage',\n 'Dedicated support',\n 'Custom domains',\n 'SSO & audit logs',\n ]}\n cta=\"Contact sales\"\n selected={selectedPlan === 'enterprise'}\n onselect={() => {\n selectedPlan = 'enterprise';\n }}\n />\n</div>\n"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "with-caveat",
|
|
14
|
+
"title": "With caveat",
|
|
15
|
+
"description": "A pricing card with a consumer-supplied caveat beneath the feature list, useful for legal disclaimers or billing notes.",
|
|
16
|
+
"code": "<script lang=\"ts\">\n import { PricingCard } from '@lostgradient/cinder/pricing-card';\n</script>\n\n<div style=\"max-inline-size: 22rem;\">\n <PricingCard\n name=\"Growth\"\n price=\"$29/mo\"\n features={['Unlimited projects', '50 GB storage', 'Email & chat support', 'Advanced analytics']}\n caveat=\"Billed annually. Monthly billing available at $35/mo.\"\n cta=\"Start free trial\"\n onselect={() => {}}\n />\n</div>\n"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"name": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "Plan name displayed as the card heading."
|
|
8
|
+
},
|
|
9
|
+
"price": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Price string, e.g. \"$9/mo\" or \"Free\"."
|
|
12
|
+
},
|
|
13
|
+
"features": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"description": "Feature strings to display in the bulleted list."
|
|
19
|
+
},
|
|
20
|
+
"cta": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Label for the call-to-action button."
|
|
23
|
+
},
|
|
24
|
+
"caveat": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "Optional footnote or caveat beneath the features list."
|
|
27
|
+
},
|
|
28
|
+
"selected": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Whether this card is the currently selected plan.",
|
|
31
|
+
"default": false
|
|
32
|
+
},
|
|
33
|
+
"class": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Custom class merged with `.cinder-pricing-card`."
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"required": ["cta", "features", "name", "price"]
|
|
40
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
name: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
description: 'Plan name displayed as the card heading.',
|
|
10
|
+
},
|
|
11
|
+
price: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'Price string, e.g. "$9/mo" or "Free".',
|
|
14
|
+
},
|
|
15
|
+
features: {
|
|
16
|
+
type: 'array',
|
|
17
|
+
items: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
},
|
|
20
|
+
description: 'Feature strings to display in the bulleted list.',
|
|
21
|
+
},
|
|
22
|
+
cta: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'Label for the call-to-action button.',
|
|
25
|
+
},
|
|
26
|
+
caveat: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Optional footnote or caveat beneath the features list.',
|
|
29
|
+
},
|
|
30
|
+
selected: {
|
|
31
|
+
type: 'boolean',
|
|
32
|
+
description: 'Whether this card is the currently selected plan.',
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
class: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'Custom class merged with `.cinder-pricing-card`.',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
additionalProperties: false,
|
|
41
|
+
required: ['cta', 'features', 'name', 'price'],
|
|
42
|
+
} satisfies ComponentSchema;
|
|
43
|
+
|
|
44
|
+
export default schema as ComponentSchema;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* @cinder
|
|
4
|
+
* @category data-display
|
|
5
|
+
* @status alpha
|
|
6
|
+
* @purpose Presents a single pricing plan with its name, price, feature list, and a call-to-action button.
|
|
7
|
+
* @tag pricing
|
|
8
|
+
* @tag plan
|
|
9
|
+
* @useWhen Letting users compare and select subscription tiers or product plans.
|
|
10
|
+
* @useWhen Highlighting one tier as selected or recommended in a pricing comparison.
|
|
11
|
+
* @avoidWhen Showing generic grouped content without a distinct price or CTA — use card instead.
|
|
12
|
+
* @avoidWhen Displaying a single key metric in isolation — use stat or stat-group instead.
|
|
13
|
+
* @related card, button, stat, stat-group
|
|
14
|
+
*/
|
|
15
|
+
export type { PricingCardProps } from './pricing-card.types.ts';
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import { classNames } from '../../utilities/class-names.ts';
|
|
20
|
+
import Button from '../button/button.svelte';
|
|
21
|
+
import type { PricingCardProps } from './pricing-card.types.ts';
|
|
22
|
+
|
|
23
|
+
let {
|
|
24
|
+
name,
|
|
25
|
+
price,
|
|
26
|
+
features,
|
|
27
|
+
cta,
|
|
28
|
+
onselect,
|
|
29
|
+
caveat,
|
|
30
|
+
selected = false,
|
|
31
|
+
class: className,
|
|
32
|
+
...rest
|
|
33
|
+
}: PricingCardProps = $props();
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<div
|
|
37
|
+
class={classNames('cinder-pricing-card', className)}
|
|
38
|
+
data-cinder-selected={selected ? '' : undefined}
|
|
39
|
+
aria-current={selected ? 'true' : undefined}
|
|
40
|
+
{...rest}
|
|
41
|
+
>
|
|
42
|
+
<div class="cinder-pricing-card__header">
|
|
43
|
+
<div class="cinder-pricing-card__heading-row">
|
|
44
|
+
<h3 class="cinder-pricing-card__name">{name}</h3>
|
|
45
|
+
<!-- A visible, non-color cue for the selected plan: the accent border and
|
|
46
|
+
CTA tint alone would not be perceivable to a colour-blind sighted
|
|
47
|
+
user (WCAG 1.4.1), so the selected state also carries explicit text. -->
|
|
48
|
+
{#if selected}
|
|
49
|
+
<span class="cinder-pricing-card__selected-flag">Selected</span>
|
|
50
|
+
{/if}
|
|
51
|
+
</div>
|
|
52
|
+
<p class="cinder-pricing-card__price">{price}</p>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="cinder-pricing-card__body">
|
|
56
|
+
<ul class="cinder-pricing-card__features">
|
|
57
|
+
{#each features as feature, index (index)}
|
|
58
|
+
<li class="cinder-pricing-card__feature">{feature}</li>
|
|
59
|
+
{/each}
|
|
60
|
+
</ul>
|
|
61
|
+
|
|
62
|
+
{#if caveat}
|
|
63
|
+
<p class="cinder-pricing-card__caveat" data-cinder-caveat="">{caveat}</p>
|
|
64
|
+
{/if}
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div class="cinder-pricing-card__footer">
|
|
68
|
+
<Button label={cta} variant={selected ? 'primary' : 'secondary'} fullWidth onclick={onselect} />
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
|
|
3
|
+
/** Props for the PricingCard component. */
|
|
4
|
+
export type PricingCardProps = Omit<HTMLAttributes<HTMLDivElement>, 'onselect'> & {
|
|
5
|
+
/** Plan name displayed as the card heading. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Price string, e.g. "$9/mo" or "Free". Rendered verbatim — include any currency symbol and billing period. */
|
|
8
|
+
price: string;
|
|
9
|
+
/** List of feature strings to display. Rendered as a bulleted list. */
|
|
10
|
+
features: string[];
|
|
11
|
+
/** Label for the call-to-action button. */
|
|
12
|
+
cta: string;
|
|
13
|
+
/** Called when the CTA button is clicked. */
|
|
14
|
+
onselect: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Optional footnote or caveat displayed beneath the features list.
|
|
17
|
+
* Use for legal disclaimers, billing notes, or conditional terms.
|
|
18
|
+
* Rendered in a visually subdued style to distinguish it from the main feature list.
|
|
19
|
+
*/
|
|
20
|
+
caveat?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether this card represents the currently selected plan.
|
|
23
|
+
* Sets `data-cinder-selected` and `aria-current="true"` on the root element.
|
|
24
|
+
*/
|
|
25
|
+
selected?: boolean;
|
|
26
|
+
/** Merged with the root element's class list. */
|
|
27
|
+
class?: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** Cinder-specific props for the PricingCard component, used by the schema generator. */
|
|
31
|
+
export interface PricingCardSchemaProps {
|
|
32
|
+
/** Plan name displayed as the card heading. */
|
|
33
|
+
name: string;
|
|
34
|
+
/** Price string, e.g. "$9/mo" or "Free". */
|
|
35
|
+
price: string;
|
|
36
|
+
/** Feature strings to display in the bulleted list. */
|
|
37
|
+
features: string[];
|
|
38
|
+
/** Label for the call-to-action button. */
|
|
39
|
+
cta: string;
|
|
40
|
+
/** Optional footnote or caveat beneath the features list. */
|
|
41
|
+
caveat?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Whether this card is the currently selected plan.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
selected?: boolean;
|
|
47
|
+
/** Custom class merged with `.cinder-pricing-card`. */
|
|
48
|
+
class?: string;
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|