@heyramzi/ui 6.1.0 → 8.0.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/COMPONENTS.md +32 -40
- package/README.md +10 -4
- package/package.json +31 -29
- package/scripts/sync-shadcn.mjs +29 -16
- package/scripts/sync-transitions.mjs +11 -11
- package/src/ai/ai-button/AiButton.svelte +86 -0
- package/src/ai/ai-button/index.ts +4 -0
- package/src/ai/confirmation/Confirmation.svelte +8 -8
- package/src/ai/confirmation/confirmation-context.svelte.ts +2 -2
- package/src/ai/generation-progress/GenerationProgress.svelte +354 -0
- package/src/ai/generation-progress/index.ts +7 -0
- package/src/ai/index.ts +16 -24
- package/src/ai/prompt-input/PromptInput.svelte +19 -1
- package/src/ai/prompt-input/PromptInputSubmit.svelte +9 -3
- package/src/ai/reasoning/Reasoning.svelte +11 -8
- package/src/ambient.d.ts +4 -0
- package/src/animations/README.md +17 -17
- package/src/animations/index.css +3 -14
- package/src/animations/upstream-coverage.test.ts +1 -1
- package/src/components/copy/clipboard.test.ts +206 -0
- package/src/components/copy/clipboard.ts +49 -0
- package/src/components/copy/copied.svelte.ts +39 -0
- package/src/components/copy/copy-button.svelte +175 -0
- package/src/components/copy/copy-button.test.ts +110 -0
- package/src/components/copy/index.ts +3 -0
- package/src/components/data-table/data-table.test.ts +134 -0
- package/src/components/data-table/data-table.ts +77 -0
- package/src/components/data-table/index.ts +20 -0
- package/src/components/data-table/infinite-scroll.svelte +69 -0
- package/src/components/data-table/pagination.svelte +62 -0
- package/src/components/data-table/row-arrow.svelte +28 -0
- package/src/components/data-table/row-context-menu.svelte +106 -0
- package/src/components/data-table/row-context-menu.test.ts +18 -0
- package/src/components/data-table/sortable-head.svelte +56 -0
- package/src/components/data-table/table-skeleton.svelte +83 -0
- package/src/components/hold-to-confirm/hold-to-confirm.svelte +232 -0
- package/src/components/hold-to-confirm/index.ts +1 -0
- package/src/components/icon/icon.svelte +23 -0
- package/src/components/icon/index.ts +1 -0
- package/src/components/language-flag/index.ts +1 -0
- package/src/components/language-flag/language-flag.svelte +60 -0
- package/src/components/list-page/detail-empty.svelte +50 -0
- package/src/components/list-page/detail-header.svelte +107 -0
- package/src/components/list-page/detail-panel.svelte +90 -0
- package/src/components/list-page/detail-row.svelte +36 -0
- package/src/components/list-page/detail-stack.svelte +33 -0
- package/src/components/list-page/empty-state.svelte +91 -0
- package/src/components/list-page/filter-item.svelte +49 -0
- package/src/components/list-page/filter-popover.svelte +88 -0
- package/src/components/list-page/filter-section.ts +12 -0
- package/src/components/list-page/grouped-list.svelte +116 -0
- package/src/components/list-page/index.ts +28 -0
- package/src/components/list-page/list-page-shell.svelte +195 -0
- package/src/components/list-page/list-table.ts +19 -0
- package/src/components/list-page/master-detail.svelte +206 -0
- package/src/components/list-page/master-detail.test.ts +37 -0
- package/src/components/list-page/notice-bar.svelte +68 -0
- package/src/components/list-page/prev-next.svelte +104 -0
- package/src/components/list-page/queue-rail.ts +25 -0
- package/src/components/list-page/rail-body.svelte +29 -0
- package/src/components/list-page/rail-empty.svelte +51 -0
- package/src/components/list-page/rail-head.svelte +49 -0
- package/src/components/list-page/rail-row.svelte +163 -0
- package/src/components/list-page/section-host.ts +24 -0
- package/src/components/list-page/section-label.svelte +39 -0
- package/src/components/list-page/step.test.ts +21 -0
- package/src/components/list-page/step.ts +10 -0
- package/src/components/list-page/toolbar-search.svelte +63 -0
- package/src/components/list-page/toolbar-trigger.ts +23 -0
- package/src/components/list-page/types.ts +1 -0
- package/src/components/locale-switch/index.ts +1 -0
- package/src/components/locale-switch/locale-switch.svelte +59 -0
- package/src/components/mark/index.ts +1 -0
- package/src/components/mark/mark.svelte +70 -0
- package/src/components/open-in/index.ts +6 -0
- package/src/components/open-in/open-in.svelte +106 -0
- package/src/components/picker/index.ts +4 -0
- package/src/components/picker/mark-picker.svelte +84 -0
- package/src/components/picker/picker.svelte +143 -0
- package/src/components/picker/trigger.ts +42 -0
- package/src/components/picker/types.ts +26 -0
- package/src/components/segmented/animated-tabs.svelte +175 -0
- package/src/components/segmented/collapse.test.ts +49 -0
- package/src/components/segmented/collapse.ts +39 -0
- package/src/components/segmented/index.ts +41 -0
- package/src/components/segmented/section-runs.svelte +79 -0
- package/src/components/segmented/segment.svelte +106 -0
- package/src/components/segmented/segmented-filter.svelte +125 -0
- package/src/components/segmented/segmented-nav.svelte +82 -0
- package/src/components/segmented/segmented-overflow.svelte +85 -0
- package/src/components/segmented/segmented-track.svelte +181 -0
- package/src/components/segmented/segmented.test.ts +20 -0
- package/src/components/segmented/segmented.ts +80 -0
- package/src/components/star-rating-input/index.ts +9 -0
- package/src/components/star-rating-input/star-rating-input.svelte +256 -0
- package/src/components/svg/index.ts +1 -0
- package/src/components/svg/svg.svelte +9 -0
- package/src/effects/border-beam/BorderBeam.svelte +1 -1
- package/src/effects/image-comparison/ImageComparison.css +42 -8
- package/src/effects/image-comparison/ImageComparison.svelte +138 -21
- package/src/effects/image-comparison/compare.test.ts +17 -0
- package/src/effects/image-comparison/compare.ts +5 -0
- package/src/effects/interactive-hover-button/InteractiveHoverButton.svelte +338 -0
- package/src/effects/magic-card/MagicCard.css +47 -0
- package/src/effects/magic-card/MagicCard.svelte +57 -0
- package/src/effects/marquee/Marquee.css +27 -1
- package/src/effects/marquee/Marquee.svelte +67 -3
- package/src/effects/reveal/index.ts +2 -1
- package/src/effects/reveal/observe.test.ts +60 -0
- package/src/effects/reveal/observe.ts +33 -1
- package/src/effects/reveal/types.ts +7 -0
- package/src/effects/theme-toggle/ThemeToggle.css +199 -6
- package/src/effects/theme-toggle/ThemeToggle.svelte +51 -26
- package/src/gallery.test.ts +52 -0
- package/src/index.ts +5 -1
- package/src/lib/panel.ts +7 -1
- package/src/lib/sliding-pill.ts +68 -0
- package/src/lib/theme-transition.ts +41 -13
- package/src/lib/tone.ts +48 -0
- package/src/shadcn/accordion/accordion-trigger.svelte +15 -6
- package/src/shadcn/alert/alert.svelte +3 -1
- package/src/shadcn/badge/badge.svelte +8 -7
- package/src/shadcn/breadcrumb/breadcrumb-ellipsis.svelte +2 -2
- package/src/shadcn/breadcrumb/breadcrumb-separator.svelte +2 -2
- package/src/shadcn/calendar/calendar-month-select.svelte +2 -2
- package/src/shadcn/calendar/calendar-next-button.svelte +2 -2
- package/src/shadcn/calendar/calendar-prev-button.svelte +2 -2
- package/src/shadcn/calendar/calendar-year-select.svelte +2 -2
- package/src/shadcn/calendar/calendar.svelte +6 -0
- package/src/shadcn/code-block/code-block-actions.svelte +23 -0
- package/src/shadcn/code-block/code-block-content.svelte +55 -0
- package/src/shadcn/code-block/code-block-copy-button.svelte +10 -0
- package/src/shadcn/code-block/code-block-footer.svelte +20 -0
- package/src/shadcn/code-block/code-block-header.svelte +23 -0
- package/src/shadcn/code-block/code-block-line.svelte +71 -0
- package/src/shadcn/code-block/code-block-title.svelte +23 -0
- package/src/shadcn/code-block/code-block.svelte +47 -0
- package/src/shadcn/code-block/index.ts +42 -0
- package/src/shadcn/command/index.ts +3 -0
- package/src/shadcn/field/index.ts +3 -0
- package/src/shadcn/field/simple-field.svelte +71 -0
- package/src/shadcn/field/simple-field.test.ts +47 -0
- package/src/shadcn/hooks/highlighter.ts +132 -0
- package/src/shadcn/hooks/use-highlighted-code.svelte.ts +98 -0
- package/src/shadcn/kbd/index.ts +10 -0
- package/src/shadcn/kbd/kbd-group.svelte +20 -0
- package/src/shadcn/kbd/kbd.svelte +23 -0
- package/src/shadcn/message-scroller/index.ts +28 -0
- package/src/shadcn/message-scroller/message-scroller-button.svelte +52 -0
- package/src/shadcn/message-scroller/message-scroller-content.svelte +17 -0
- package/src/shadcn/message-scroller/message-scroller-item.svelte +22 -0
- package/src/shadcn/message-scroller/message-scroller-provider.svelte +7 -0
- package/src/shadcn/message-scroller/message-scroller-viewport.svelte +20 -0
- package/src/shadcn/message-scroller/message-scroller.svelte +20 -0
- package/src/shadcn/radio-group/radio-group-item.svelte +3 -2
- package/src/shadcn/sheet/sheet-content.svelte +1 -0
- package/src/shadcn/sheet/sheet.css +48 -0
- package/src/shadcn/sonner/sonner.svelte +7 -10
- package/src/shadcn/tabs/tabs-list.svelte +13 -2
- package/src/shadcn/tabs/tabs-trigger.svelte +1 -1
- package/src/shadcn/toggle-group/toggle-group.svelte +10 -3
- package/src/shadcn/trace/index.ts +29 -0
- package/src/shadcn/trace/trace-collapsible-content.svelte +29 -0
- package/src/shadcn/trace/trace-collapsible-trigger.svelte +29 -0
- package/src/shadcn/trace/trace-collapsible.svelte +20 -0
- package/src/shadcn/trace/trace-description.svelte +20 -0
- package/src/shadcn/trace/trace-icon.svelte +24 -0
- package/src/shadcn/trace/trace-line.svelte +31 -0
- package/src/shadcn/trace/trace-title.svelte +20 -0
- package/src/shadcn/trace/trace.svelte +23 -0
- package/src/ai/composer/Composer.css +0 -108
- package/src/ai/composer/Composer.svelte +0 -111
- package/src/ai/composer/index.ts +0 -10
- package/src/ai/conversation/Conversation.svelte +0 -28
- package/src/ai/conversation/ConversationContent.svelte +0 -35
- package/src/ai/conversation/ConversationEmptyState.svelte +0 -46
- package/src/ai/conversation/ConversationScrollButton.svelte +0 -51
- package/src/ai/conversation/index.ts +0 -33
- package/src/ai/conversation/stick-to-bottom-context.svelte.ts +0 -131
- package/src/animations/accordion.css +0 -58
- package/src/animations/icon-swap.css +0 -43
- package/src/animations/notification-badge.css +0 -81
- package/src/animations/panel.css +0 -86
- package/src/animations/reasoning-stream.css +0 -49
- package/src/animations/skeleton-reveal.css +0 -97
- package/src/animations/streaming-text.css +0 -31
- package/src/animations/tabs-sliding.css +0 -83
- package/src/animations/texts-reveal.css +0 -70
- package/src/animations/tooltip.css +0 -72
- package/src/animations/view-transition-reveal.ts +0 -74
- package/src/charts/animated-value.css +0 -7
- package/src/charts/animated-value.svelte +0 -110
- package/src/charts/area-chart.css +0 -29
- package/src/charts/area-chart.svelte +0 -195
- package/src/charts/bar-chart.css +0 -119
- package/src/charts/bar-chart.svelte +0 -269
- package/src/charts/charts.css +0 -201
- package/src/charts/crosshair.svelte +0 -35
- package/src/charts/donut-chart.css +0 -56
- package/src/charts/donut-chart.svelte +0 -158
- package/src/charts/edge-fade.svelte +0 -43
- package/src/charts/edge-fade.ts +0 -16
- package/src/charts/figure.css +0 -100
- package/src/charts/figure.svelte +0 -122
- package/src/charts/gauge-chart.css +0 -94
- package/src/charts/gauge-chart.svelte +0 -303
- package/src/charts/hover-band.test.ts +0 -30
- package/src/charts/hover-band.ts +0 -21
- package/src/charts/hover-focus.svelte +0 -85
- package/src/charts/index.ts +0 -30
- package/src/charts/legend.css +0 -131
- package/src/charts/legend.svelte +0 -112
- package/src/charts/line-chart.css +0 -26
- package/src/charts/line-chart.svelte +0 -256
- package/src/charts/motion.ts +0 -19
- package/src/charts/number-chart.css +0 -168
- package/src/charts/number-chart.svelte +0 -177
- package/src/charts/primitives/chart-container.svelte +0 -57
- package/src/charts/primitives/chart-style.svelte +0 -36
- package/src/charts/primitives/chart-tooltip.svelte +0 -161
- package/src/charts/primitives/chart-utils.ts +0 -54
- package/src/charts/primitives/index.ts +0 -11
- package/src/charts/reveal.svelte +0 -61
- package/src/charts/ring-chart.css +0 -96
- package/src/charts/ring-chart.svelte +0 -158
- package/src/charts/sparkline.css +0 -45
- package/src/charts/sparkline.svelte +0 -140
- package/src/charts/stat-card.css +0 -103
- package/src/charts/stat-card.svelte +0 -267
- package/src/charts/time-series-chart.css +0 -28
- package/src/charts/time-series-chart.svelte +0 -179
- package/src/charts/trend-pill.css +0 -38
- package/src/charts/trend-pill.svelte +0 -48
- package/src/lib/hooks/is-mobile.svelte.ts +0 -11
- package/src/lib/utils.ts +0 -45
- package/src/showcase/AiSection.svelte +0 -157
- package/src/showcase/AnimationsSection.svelte +0 -1658
- package/src/showcase/ChartsSection.svelte +0 -458
- package/src/showcase/EffectsSection.svelte +0 -152
- package/src/showcase/ShadcnSection.svelte +0 -27
- package/src/showcase/ShowcaseImport.svelte +0 -126
- package/src/showcase/ShowcaseList.svelte +0 -132
- package/src/showcase/ShowcaseNav.svelte +0 -247
- package/src/showcase/ShowcaseSection.svelte +0 -112
- package/src/showcase/ShowcaseShell.svelte +0 -55
- package/src/showcase/ShowcaseStage.svelte +0 -342
- package/src/showcase/ShowcaseVariant.svelte +0 -109
- package/src/showcase/assets/image-reveal/art-1.jpg +0 -0
- package/src/showcase/assets/image-reveal/art-2.jpg +0 -0
- package/src/showcase/assets/image-reveal/art-3.jpg +0 -0
- package/src/showcase/check.svg +0 -1
- package/src/showcase/chevron-arms.svg +0 -2
- package/src/showcase/chevron-down.svg +0 -1
- package/src/showcase/copy.svg +0 -2
- package/src/showcase/demos/ai/confirmation.svelte +0 -59
- package/src/showcase/demos/ai/conversation.svelte +0 -59
- package/src/showcase/demos/ai/loading-state.svelte +0 -19
- package/src/showcase/demos/ai/prompt-input.svelte +0 -57
- package/src/showcase/demos/ai/reasoning.svelte +0 -19
- package/src/showcase/demos/ai/thinking-dots.svelte +0 -15
- package/src/showcase/demos/ai/voice-waveform.svelte +0 -24
- package/src/showcase/demos/effects/animated-beam.svelte +0 -50
- package/src/showcase/demos/effects/animated-group.svelte +0 -47
- package/src/showcase/demos/effects/border-beam-default.svelte +0 -20
- package/src/showcase/demos/effects/border-beam-line.svelte +0 -20
- package/src/showcase/demos/effects/border-beam-mono.svelte +0 -20
- package/src/showcase/demos/effects/border-beam-sunset.svelte +0 -20
- package/src/showcase/demos/effects/image-comparison.svelte +0 -25
- package/src/showcase/demos/effects/image-reveal.svelte +0 -49
- package/src/showcase/demos/effects/in-view.svelte +0 -41
- package/src/showcase/demos/effects/integrations-hub.svelte +0 -82
- package/src/showcase/demos/effects/magnetic.svelte +0 -31
- package/src/showcase/demos/effects/marquee.svelte +0 -33
- package/src/showcase/demos/effects/progressive-blur.svelte +0 -47
- package/src/showcase/demos/effects/spotlight.svelte +0 -40
- package/src/showcase/demos/effects/text-effect.svelte +0 -55
- package/src/showcase/demos/shadcn/accordion.svelte +0 -45
- package/src/showcase/demos/shadcn/alert-dialog.svelte +0 -23
- package/src/showcase/demos/shadcn/alert.svelte +0 -30
- package/src/showcase/demos/shadcn/attachment.svelte +0 -71
- package/src/showcase/demos/shadcn/avatar.svelte +0 -30
- package/src/showcase/demos/shadcn/badge.svelte +0 -26
- package/src/showcase/demos/shadcn/breadcrumb.svelte +0 -34
- package/src/showcase/demos/shadcn/bubble.svelte +0 -36
- package/src/showcase/demos/shadcn/button.svelte +0 -11
- package/src/showcase/demos/shadcn/calendar.svelte +0 -8
- package/src/showcase/demos/shadcn/card.svelte +0 -39
- package/src/showcase/demos/shadcn/checkbox.svelte +0 -39
- package/src/showcase/demos/shadcn/collapsible.svelte +0 -20
- package/src/showcase/demos/shadcn/command.svelte +0 -48
- package/src/showcase/demos/shadcn/context-menu.svelte +0 -54
- package/src/showcase/demos/shadcn/demo-harness.svelte +0 -12
- package/src/showcase/demos/shadcn/demos.test.ts +0 -20
- package/src/showcase/demos/shadcn/dialog.svelte +0 -38
- package/src/showcase/demos/shadcn/dropdown-menu.svelte +0 -59
- package/src/showcase/demos/shadcn/empty.svelte +0 -29
- package/src/showcase/demos/shadcn/field.svelte +0 -115
- package/src/showcase/demos/shadcn/hover-card.svelte +0 -32
- package/src/showcase/demos/shadcn/index.ts +0 -358
- package/src/showcase/demos/shadcn/input-otp.svelte +0 -19
- package/src/showcase/demos/shadcn/input.svelte +0 -5
- package/src/showcase/demos/shadcn/label.svelte +0 -11
- package/src/showcase/demos/shadcn/marker.svelte +0 -30
- package/src/showcase/demos/shadcn/message.svelte +0 -75
- package/src/showcase/demos/shadcn/popover.svelte +0 -36
- package/src/showcase/demos/shadcn/progress.svelte +0 -13
- package/src/showcase/demos/shadcn/radio-group.svelte +0 -19
- package/src/showcase/demos/shadcn/scroll-area.svelte +0 -18
- package/src/showcase/demos/shadcn/select.svelte +0 -29
- package/src/showcase/demos/shadcn/separator.svelte +0 -12
- package/src/showcase/demos/shadcn/sheet.svelte +0 -48
- package/src/showcase/demos/shadcn/skeleton.svelte +0 -11
- package/src/showcase/demos/shadcn/slider.svelte +0 -7
- package/src/showcase/demos/shadcn/sonner.svelte +0 -18
- package/src/showcase/demos/shadcn/spinner.svelte +0 -11
- package/src/showcase/demos/shadcn/switch.svelte +0 -9
- package/src/showcase/demos/shadcn/table.svelte +0 -76
- package/src/showcase/demos/shadcn/tabs.svelte +0 -62
- package/src/showcase/demos/shadcn/textarea.svelte +0 -5
- package/src/showcase/demos/shadcn/toggle-group.svelte +0 -18
- package/src/showcase/demos/shadcn/toggle.svelte +0 -14
- package/src/showcase/demos/shadcn/tooltip.svelte +0 -13
- package/src/showcase/heart.svg +0 -1
- package/src/showcase/index.ts +0 -38
- package/src/showcase/kit.test.ts +0 -72
- package/src/showcase/kit.ts +0 -17
- package/src/showcase/plus.svg +0 -1
- package/src/showcase/showcase-shell.css +0 -91
- package/src/showcase/stacked-section.css +0 -15
- package/src/showcase/success-check.svg +0 -1
- package/src/showcase/types.ts +0 -29
- package/src/svg-raw.d.ts +0 -7
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Popover from "../../../shadcn/popover/index.js";
|
|
3
|
-
import { buttonVariants } from "../../../shadcn/button/index.js";
|
|
4
|
-
import { Input } from "../../../shadcn/input/index.js";
|
|
5
|
-
import { Label } from "../../../shadcn/label/index.js";
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<Popover.Root>
|
|
9
|
-
<Popover.Trigger class={buttonVariants({ variant: "outline" })}>Open popover</Popover.Trigger>
|
|
10
|
-
<Popover.Content class="w-80">
|
|
11
|
-
<div class="grid gap-4">
|
|
12
|
-
<div class="space-y-2">
|
|
13
|
-
<h4 class="leading-none font-medium">Dimensions</h4>
|
|
14
|
-
<p class="text-sm text-muted-foreground">Set the dimensions for the layer.</p>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="grid gap-2">
|
|
17
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
18
|
-
<Label for="width">Width</Label>
|
|
19
|
-
<Input id="width" value="100%" class="col-span-2 h-8" />
|
|
20
|
-
</div>
|
|
21
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
22
|
-
<Label for="maxWidth">Max. width</Label>
|
|
23
|
-
<Input id="maxWidth" value="300px" class="col-span-2 h-8" />
|
|
24
|
-
</div>
|
|
25
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
26
|
-
<Label for="height">Height</Label>
|
|
27
|
-
<Input id="height" value="25px" class="col-span-2 h-8" />
|
|
28
|
-
</div>
|
|
29
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
30
|
-
<Label for="maxHeight">Max. height</Label>
|
|
31
|
-
<Input id="maxHeight" value="none" class="col-span-2 h-8" />
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</Popover.Content>
|
|
36
|
-
</Popover.Root>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { onMount } from "svelte";
|
|
3
|
-
import { Progress } from "../../../shadcn/progress/index.js";
|
|
4
|
-
|
|
5
|
-
let value = $state(13);
|
|
6
|
-
|
|
7
|
-
onMount(() => {
|
|
8
|
-
const timer = setTimeout(() => (value = 66), 500);
|
|
9
|
-
return () => clearTimeout(timer);
|
|
10
|
-
});
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<Progress {value} max={100} class="w-[60%]" />
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as RadioGroup from "../../../shadcn/radio-group/index.js";
|
|
3
|
-
import { Label } from "../../../shadcn/label/index.js";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<RadioGroup.Root value="comfortable">
|
|
7
|
-
<div class="flex items-center space-x-2">
|
|
8
|
-
<RadioGroup.Item value="default" id="r1" />
|
|
9
|
-
<Label for="r1">Default</Label>
|
|
10
|
-
</div>
|
|
11
|
-
<div class="flex items-center space-x-2">
|
|
12
|
-
<RadioGroup.Item value="comfortable" id="r2" />
|
|
13
|
-
<Label for="r2">Comfortable</Label>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="flex items-center space-x-2">
|
|
16
|
-
<RadioGroup.Item value="compact" id="r3" />
|
|
17
|
-
<Label for="r3">Compact</Label>
|
|
18
|
-
</div>
|
|
19
|
-
</RadioGroup.Root>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { ScrollArea } from "../../../shadcn/scroll-area/index.js";
|
|
3
|
-
import { Separator } from "../../../shadcn/separator/index.js";
|
|
4
|
-
|
|
5
|
-
const tags = Array.from({ length: 50 }).map((_, i, a) => `v1.2.0-beta.${a.length - i}`);
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<ScrollArea class="h-72 w-48 rounded-md border">
|
|
9
|
-
<div class="p-4">
|
|
10
|
-
<h4 class="mb-4 text-sm leading-none font-medium">Tags</h4>
|
|
11
|
-
{#each tags as tag (tag)}
|
|
12
|
-
<div class="text-sm">
|
|
13
|
-
{tag}
|
|
14
|
-
</div>
|
|
15
|
-
<Separator class="my-2" />
|
|
16
|
-
{/each}
|
|
17
|
-
</div>
|
|
18
|
-
</ScrollArea>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Select from "../../../shadcn/select/index.js";
|
|
3
|
-
|
|
4
|
-
const fruits = [
|
|
5
|
-
{ value: "apple", label: "Apple" },
|
|
6
|
-
{ value: "banana", label: "Banana" },
|
|
7
|
-
{ value: "blueberry", label: "Blueberry" },
|
|
8
|
-
{ value: "grapes", label: "Grapes", disabled: true },
|
|
9
|
-
{ value: "pineapple", label: "Pineapple" },
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
let value = $state("");
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<Select.Root type="single" name="favoriteFruit" items={fruits} bind:value>
|
|
16
|
-
<Select.Trigger class="w-[180px]">
|
|
17
|
-
<Select.Value placeholder="Select a fruit" />
|
|
18
|
-
</Select.Trigger>
|
|
19
|
-
<Select.Content>
|
|
20
|
-
<Select.Group>
|
|
21
|
-
<Select.Label>Fruits</Select.Label>
|
|
22
|
-
{#each fruits as fruit (fruit.value)}
|
|
23
|
-
<Select.Item value={fruit.value} label={fruit.label} disabled={fruit.disabled}>
|
|
24
|
-
{fruit.label}
|
|
25
|
-
</Select.Item>
|
|
26
|
-
{/each}
|
|
27
|
-
</Select.Group>
|
|
28
|
-
</Select.Content>
|
|
29
|
-
</Select.Root>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Separator } from "../../../shadcn/separator/index.js";
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<div class="flex max-w-sm flex-col gap-4 text-sm">
|
|
6
|
-
<div class="flex flex-col gap-1.5">
|
|
7
|
-
<div class="leading-none font-medium">shadcn/ui</div>
|
|
8
|
-
<div class="text-muted-foreground">The Foundation for your Design System</div>
|
|
9
|
-
</div>
|
|
10
|
-
<Separator />
|
|
11
|
-
<div>A set of beautifully designed components that you can customize, extend, and build on.</div>
|
|
12
|
-
</div>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Sheet from "../../../shadcn/sheet/index.js";
|
|
3
|
-
import { Button } from "../../../shadcn/button/index.js";
|
|
4
|
-
import { buttonVariants } from "../../../shadcn/button/index.js";
|
|
5
|
-
import { Input } from "../../../shadcn/input/index.js";
|
|
6
|
-
import { Label } from "../../../shadcn/label/index.js";
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<div class="flex flex-wrap gap-2">
|
|
10
|
-
<Sheet.Root>
|
|
11
|
-
<Sheet.Trigger class={buttonVariants({ variant: "outline" })}>Open from the right</Sheet.Trigger>
|
|
12
|
-
<Sheet.Content side="right">
|
|
13
|
-
<Sheet.Header>
|
|
14
|
-
<Sheet.Title>Edit profile</Sheet.Title>
|
|
15
|
-
<Sheet.Description>
|
|
16
|
-
Make changes to your profile here. Click save when you're done.
|
|
17
|
-
</Sheet.Description>
|
|
18
|
-
</Sheet.Header>
|
|
19
|
-
<div class="grid flex-1 auto-rows-min gap-6 px-4">
|
|
20
|
-
<div class="grid gap-3">
|
|
21
|
-
<Label for="name" class="text-end">Name</Label>
|
|
22
|
-
<Input id="name" value="Pedro Duarte" />
|
|
23
|
-
</div>
|
|
24
|
-
<div class="grid gap-3">
|
|
25
|
-
<Label for="username" class="text-end">Username</Label>
|
|
26
|
-
<Input id="username" value="@peduarte" />
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<Sheet.Footer>
|
|
30
|
-
<Button type="submit">Save changes</Button>
|
|
31
|
-
<Sheet.Close class={buttonVariants({ variant: "outline" })}>Close</Sheet.Close>
|
|
32
|
-
</Sheet.Footer>
|
|
33
|
-
</Sheet.Content>
|
|
34
|
-
</Sheet.Root>
|
|
35
|
-
<Sheet.Root>
|
|
36
|
-
<Sheet.Trigger class={buttonVariants({ variant: "outline" })}>Open from the bottom</Sheet.Trigger>
|
|
37
|
-
<Sheet.Content side="bottom">
|
|
38
|
-
<Sheet.Header>
|
|
39
|
-
<Sheet.Title>Share this page</Sheet.Title>
|
|
40
|
-
<Sheet.Description>Anyone with the link can view it.</Sheet.Description>
|
|
41
|
-
</Sheet.Header>
|
|
42
|
-
<Sheet.Footer>
|
|
43
|
-
<Button type="submit">Copy link</Button>
|
|
44
|
-
<Sheet.Close class={buttonVariants({ variant: "outline" })}>Close</Sheet.Close>
|
|
45
|
-
</Sheet.Footer>
|
|
46
|
-
</Sheet.Content>
|
|
47
|
-
</Sheet.Root>
|
|
48
|
-
</div>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Skeleton } from "../../../shadcn/skeleton/index.js";
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<div class="flex items-center space-x-4">
|
|
6
|
-
<Skeleton class="size-12 rounded-full" />
|
|
7
|
-
<div class="space-y-2">
|
|
8
|
-
<Skeleton class="h-4 w-[250px]" />
|
|
9
|
-
<Skeleton class="h-4 w-[200px]" />
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { toast } from "svelte-sonner";
|
|
3
|
-
import { Button } from "../../../shadcn/button/index.js";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<Button
|
|
7
|
-
variant="outline"
|
|
8
|
-
onclick={() =>
|
|
9
|
-
toast("Event has been created", {
|
|
10
|
-
description: "Sunday, December 03, 2023 at 9:00 AM",
|
|
11
|
-
action: {
|
|
12
|
-
label: "Undo",
|
|
13
|
-
onClick: () => console.info("Undo"),
|
|
14
|
-
},
|
|
15
|
-
})}
|
|
16
|
-
>
|
|
17
|
-
Show Toast
|
|
18
|
-
</Button>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Spinner } from "../../../shadcn/spinner/index.js";
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<div class="flex w-full max-w-xs flex-col gap-4 [--radius:1rem]">
|
|
6
|
-
<div class="bg-muted/50 flex items-center gap-3 rounded-md border p-3 text-sm">
|
|
7
|
-
<Spinner />
|
|
8
|
-
<span class="line-clamp-1 flex-1 font-medium">Processing payment...</span>
|
|
9
|
-
<span class="tabular-nums">$100.00</span>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Label } from "../../../shadcn/label/index.js";
|
|
3
|
-
import { Switch } from "../../../shadcn/switch/index.js";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<div class="flex items-center space-x-2">
|
|
7
|
-
<Switch id="airplane-mode" />
|
|
8
|
-
<Label for="airplane-mode">Airplane Mode</Label>
|
|
9
|
-
</div>
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Table from "../../../shadcn/table/index.js";
|
|
3
|
-
|
|
4
|
-
const invoices = [
|
|
5
|
-
{
|
|
6
|
-
invoice: "INV001",
|
|
7
|
-
paymentStatus: "Paid",
|
|
8
|
-
totalAmount: "$250.00",
|
|
9
|
-
paymentMethod: "Credit Card",
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
invoice: "INV002",
|
|
13
|
-
paymentStatus: "Pending",
|
|
14
|
-
totalAmount: "$150.00",
|
|
15
|
-
paymentMethod: "PayPal",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
invoice: "INV003",
|
|
19
|
-
paymentStatus: "Unpaid",
|
|
20
|
-
totalAmount: "$350.00",
|
|
21
|
-
paymentMethod: "Bank Transfer",
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
invoice: "INV004",
|
|
25
|
-
paymentStatus: "Paid",
|
|
26
|
-
totalAmount: "$450.00",
|
|
27
|
-
paymentMethod: "Credit Card",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
invoice: "INV005",
|
|
31
|
-
paymentStatus: "Paid",
|
|
32
|
-
totalAmount: "$550.00",
|
|
33
|
-
paymentMethod: "PayPal",
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
invoice: "INV006",
|
|
37
|
-
paymentStatus: "Pending",
|
|
38
|
-
totalAmount: "$200.00",
|
|
39
|
-
paymentMethod: "Bank Transfer",
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
invoice: "INV007",
|
|
43
|
-
paymentStatus: "Unpaid",
|
|
44
|
-
totalAmount: "$300.00",
|
|
45
|
-
paymentMethod: "Credit Card",
|
|
46
|
-
},
|
|
47
|
-
];
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
<Table.Root>
|
|
51
|
-
<Table.Caption>A list of your recent invoices.</Table.Caption>
|
|
52
|
-
<Table.Header>
|
|
53
|
-
<Table.Row>
|
|
54
|
-
<Table.Head class="w-[100px]">Invoice</Table.Head>
|
|
55
|
-
<Table.Head>Status</Table.Head>
|
|
56
|
-
<Table.Head>Method</Table.Head>
|
|
57
|
-
<Table.Head class="text-end">Amount</Table.Head>
|
|
58
|
-
</Table.Row>
|
|
59
|
-
</Table.Header>
|
|
60
|
-
<Table.Body>
|
|
61
|
-
{#each invoices as invoice (invoice)}
|
|
62
|
-
<Table.Row>
|
|
63
|
-
<Table.Cell class="font-medium">{invoice.invoice}</Table.Cell>
|
|
64
|
-
<Table.Cell>{invoice.paymentStatus}</Table.Cell>
|
|
65
|
-
<Table.Cell>{invoice.paymentMethod}</Table.Cell>
|
|
66
|
-
<Table.Cell class="text-end">{invoice.totalAmount}</Table.Cell>
|
|
67
|
-
</Table.Row>
|
|
68
|
-
{/each}
|
|
69
|
-
</Table.Body>
|
|
70
|
-
<Table.Footer>
|
|
71
|
-
<Table.Row>
|
|
72
|
-
<Table.Cell colspan={3}>Total</Table.Cell>
|
|
73
|
-
<Table.Cell class="text-end">$2,500.00</Table.Cell>
|
|
74
|
-
</Table.Row>
|
|
75
|
-
</Table.Footer>
|
|
76
|
-
</Table.Root>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Card from "../../../shadcn/card/index.js";
|
|
3
|
-
import * as Tabs from "../../../shadcn/tabs/index.js";
|
|
4
|
-
import { Button } from "../../../shadcn/button/index.js";
|
|
5
|
-
import { Input } from "../../../shadcn/input/index.js";
|
|
6
|
-
import { Label } from "../../../shadcn/label/index.js";
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<div class="-mb-4 flex w-full max-w-sm flex-col gap-6">
|
|
10
|
-
<Tabs.Root value="account">
|
|
11
|
-
<Tabs.List>
|
|
12
|
-
<Tabs.Trigger value="account">Account</Tabs.Trigger>
|
|
13
|
-
<Tabs.Trigger value="password">Password</Tabs.Trigger>
|
|
14
|
-
</Tabs.List>
|
|
15
|
-
<Tabs.Content value="account">
|
|
16
|
-
<Card.Root>
|
|
17
|
-
<Card.Header>
|
|
18
|
-
<Card.Title>Account</Card.Title>
|
|
19
|
-
<Card.Description>
|
|
20
|
-
Make changes to your account here. Click save when you're done.
|
|
21
|
-
</Card.Description>
|
|
22
|
-
</Card.Header>
|
|
23
|
-
<Card.Content class="grid gap-6">
|
|
24
|
-
<div class="grid gap-3">
|
|
25
|
-
<Label for="tabs-demo-name">Name</Label>
|
|
26
|
-
<Input id="tabs-demo-name" value="Pedro Duarte" />
|
|
27
|
-
</div>
|
|
28
|
-
<div class="grid gap-3">
|
|
29
|
-
<Label for="tabs-demo-username">Username</Label>
|
|
30
|
-
<Input id="tabs-demo-username" value="@peduarte" />
|
|
31
|
-
</div>
|
|
32
|
-
</Card.Content>
|
|
33
|
-
<Card.Footer>
|
|
34
|
-
<Button>Save changes</Button>
|
|
35
|
-
</Card.Footer>
|
|
36
|
-
</Card.Root>
|
|
37
|
-
</Tabs.Content>
|
|
38
|
-
<Tabs.Content value="password">
|
|
39
|
-
<Card.Root>
|
|
40
|
-
<Card.Header>
|
|
41
|
-
<Card.Title>Password</Card.Title>
|
|
42
|
-
<Card.Description>
|
|
43
|
-
Change your password here. After saving, you'll be logged out.
|
|
44
|
-
</Card.Description>
|
|
45
|
-
</Card.Header>
|
|
46
|
-
<Card.Content class="grid gap-6">
|
|
47
|
-
<div class="grid gap-3">
|
|
48
|
-
<Label for="tabs-demo-current">Current password</Label>
|
|
49
|
-
<Input id="tabs-demo-current" type="password" />
|
|
50
|
-
</div>
|
|
51
|
-
<div class="grid gap-3">
|
|
52
|
-
<Label for="tabs-demo-new">New password</Label>
|
|
53
|
-
<Input id="tabs-demo-new" type="password" />
|
|
54
|
-
</div>
|
|
55
|
-
</Card.Content>
|
|
56
|
-
<Card.Footer>
|
|
57
|
-
<Button>Save password</Button>
|
|
58
|
-
</Card.Footer>
|
|
59
|
-
</Card.Root>
|
|
60
|
-
</Tabs.Content>
|
|
61
|
-
</Tabs.Root>
|
|
62
|
-
</div>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import BoldIcon from "@lucide/svelte/icons/bold";
|
|
3
|
-
import ItalicIcon from "@lucide/svelte/icons/italic";
|
|
4
|
-
import UnderlineIcon from "@lucide/svelte/icons/underline";
|
|
5
|
-
import * as ToggleGroup from "../../../shadcn/toggle-group/index.js";
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<ToggleGroup.Root variant="outline" type="multiple">
|
|
9
|
-
<ToggleGroup.Item value="bold" aria-label="Toggle bold">
|
|
10
|
-
<BoldIcon class="h-4 w-4" />
|
|
11
|
-
</ToggleGroup.Item>
|
|
12
|
-
<ToggleGroup.Item value="italic" aria-label="Toggle italic">
|
|
13
|
-
<ItalicIcon class="h-4 w-4" />
|
|
14
|
-
</ToggleGroup.Item>
|
|
15
|
-
<ToggleGroup.Item value="strikethrough" aria-label="Toggle strikethrough">
|
|
16
|
-
<UnderlineIcon class="h-4 w-4" />
|
|
17
|
-
</ToggleGroup.Item>
|
|
18
|
-
</ToggleGroup.Root>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import BookmarkIcon from "@lucide/svelte/icons/bookmark";
|
|
3
|
-
import { Toggle } from "../../../shadcn/toggle/index.js";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<Toggle
|
|
7
|
-
aria-label="Toggle bookmark"
|
|
8
|
-
size="sm"
|
|
9
|
-
variant="outline"
|
|
10
|
-
class="data-[state=on]:bg-transparent data-[state=on]:*:[svg]:fill-blue-500 data-[state=on]:*:[svg]:stroke-blue-500"
|
|
11
|
-
>
|
|
12
|
-
<BookmarkIcon />
|
|
13
|
-
Bookmark
|
|
14
|
-
</Toggle>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Tooltip from "../../../shadcn/tooltip/index.js";
|
|
3
|
-
import { buttonVariants } from "../../../shadcn/button/index.js";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<Tooltip.Provider>
|
|
7
|
-
<Tooltip.Root>
|
|
8
|
-
<Tooltip.Trigger class={buttonVariants({ variant: "outline" })}>Hover</Tooltip.Trigger>
|
|
9
|
-
<Tooltip.Content>
|
|
10
|
-
<p>Add to library</p>
|
|
11
|
-
</Tooltip.Content>
|
|
12
|
-
</Tooltip.Root>
|
|
13
|
-
</Tooltip.Provider>
|
package/src/showcase/heart.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg class="t-like-heart" viewBox="0 0 24 24" width="18" height="18" stroke-width="1.6"><path d="M12 20s-7-4.35-7-9a4 4 0 017-2.65A4 4 0 0119 11c0 4.65-7 9-7 9z" stroke-linejoin="round" /></svg>
|
package/src/showcase/index.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// Chrome for a component showcase: the sticky section rail, the section frame, the demo stage, the compact row for a component with no demo, and the copy control they share.
|
|
2
|
-
|
|
3
|
-
// WHY the chrome is shared and the content is not: every Studio app vendors its own component kit, so the inventory and the demos are local by nature.
|
|
4
|
-
|
|
5
|
-
// What repeats across apps is the reading structure, and it was drifting.
|
|
6
|
-
|
|
7
|
-
// Styling is scoped CSS, not Tailwind utilities: a consumer does not `@source` this package, so utility classes written here would never be generated. Every colour reads `var(--color-x, var(--x))`.
|
|
8
|
-
|
|
9
|
-
// Tailwind v4's `@theme inline` resolves a token into the utilities that use it and emits no custom property, so an app built that way has `--card` and no `--color-card`,
|
|
10
|
-
|
|
11
|
-
// while an app that declares its palette in `@theme` has the opposite. The pair covers both.
|
|
12
|
-
export {
|
|
13
|
-
default as ShowcaseShell,
|
|
14
|
-
type ShowcaseShellProps,
|
|
15
|
-
} from "./ShowcaseShell.svelte";
|
|
16
|
-
export { default as ShowcaseNav, type ShowcaseNavProps } from "./ShowcaseNav.svelte";
|
|
17
|
-
export {
|
|
18
|
-
default as ShowcaseSection,
|
|
19
|
-
type ShowcaseSectionProps,
|
|
20
|
-
} from "./ShowcaseSection.svelte";
|
|
21
|
-
export {
|
|
22
|
-
default as ShowcaseStage,
|
|
23
|
-
type ShowcaseStageProps,
|
|
24
|
-
} from "./ShowcaseStage.svelte";
|
|
25
|
-
export {
|
|
26
|
-
default as ShowcaseVariant,
|
|
27
|
-
type ShowcaseVariantProps,
|
|
28
|
-
} from "./ShowcaseVariant.svelte";
|
|
29
|
-
export {
|
|
30
|
-
default as ShowcaseList,
|
|
31
|
-
type ShowcaseListProps,
|
|
32
|
-
type ShowcaseListItem,
|
|
33
|
-
} from "./ShowcaseList.svelte";
|
|
34
|
-
export {
|
|
35
|
-
default as ShowcaseImport,
|
|
36
|
-
type ShowcaseImportProps,
|
|
37
|
-
} from "./ShowcaseImport.svelte";
|
|
38
|
-
export type { ShowcaseSectionMeta } from "./types.js";
|
package/src/showcase/kit.test.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* The showcase has to hold everything the package ships.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* A demo that is written once and then forgotten is how a kit ends up with a page that shows two thirds of it.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
* These assert coverage off the source, not off a number typed here: an animation with no stage, or a synced primitive missing from the generated list, fails.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
14
|
-
import { dirname, join } from "node:path";
|
|
15
|
-
import { flushSync, mount, unmount } from "svelte";
|
|
16
|
-
import { describe, expect, it } from "vite-plus/test";
|
|
17
|
-
import AnimationsSection from "./AnimationsSection.svelte";
|
|
18
|
-
import ShadcnSection from "./ShadcnSection.svelte";
|
|
19
|
-
import { SHADCN_DEMOS } from "./demos/shadcn/index.js";
|
|
20
|
-
|
|
21
|
-
/** The runner's cwd is the workspace root or the package; find the package. */
|
|
22
|
-
function packageRoot(): string {
|
|
23
|
-
let dir = process.cwd();
|
|
24
|
-
for (;;) {
|
|
25
|
-
if (existsSync(join(dir, "src", "showcase", "kit.ts"))) return dir;
|
|
26
|
-
const candidate = join(dir, "packages", "ui");
|
|
27
|
-
if (existsSync(join(candidate, "src", "showcase", "kit.ts"))) return candidate;
|
|
28
|
-
const parent = dirname(dir);
|
|
29
|
-
if (parent === dir) throw new Error("packages/ui not found");
|
|
30
|
-
dir = parent;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const PKG = packageRoot();
|
|
35
|
-
const SRC = join(PKG, "src");
|
|
36
|
-
|
|
37
|
-
function render(Comp: Parameters<typeof mount>[0]) {
|
|
38
|
-
const target = document.createElement("div");
|
|
39
|
-
document.body.appendChild(target);
|
|
40
|
-
const app = mount(Comp, { target });
|
|
41
|
-
flushSync();
|
|
42
|
-
const stages = target.querySelectorAll(".sc-stage").length;
|
|
43
|
-
void unmount(app);
|
|
44
|
-
target.remove();
|
|
45
|
-
return stages;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
describe("showcase coverage", () => {
|
|
49
|
-
it("gives every animation a stage", () => {
|
|
50
|
-
const section = readFileSync(join(SRC, "showcase", "AnimationsSection.svelte"), "utf8");
|
|
51
|
-
const missing = readdirSync(join(SRC, "animations"))
|
|
52
|
-
.filter((file) => file.endsWith(".css") && file !== "index.css")
|
|
53
|
-
.filter((file) => !section.includes(`animations/${file.replace(".css", "")}`));
|
|
54
|
-
expect(missing).toEqual([]);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it("lists every synced shadcn demo", () => {
|
|
58
|
-
const vendored = readdirSync(join(PKG, ".upstream", "shadcn-demos"))
|
|
59
|
-
.filter((file) => file.endsWith(".svelte"))
|
|
60
|
-
.map((file) => file.replace(".svelte", ""));
|
|
61
|
-
const listed = new Set(SHADCN_DEMOS.map((demo) => demo.name));
|
|
62
|
-
expect(vendored.filter((name) => !listed.has(name))).toEqual([]);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it("renders a stage for every shadcn primitive", () => {
|
|
66
|
-
expect(render(ShadcnSection)).toBe(SHADCN_DEMOS.length);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it("renders the animation stages", () => {
|
|
70
|
-
expect(render(AnimationsSection)).toBe(27);
|
|
71
|
-
});
|
|
72
|
-
});
|
package/src/showcase/kit.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// The showcase of @heyramzi/ui itself: its shadcn primitives,
|
|
2
|
-
// its motion vocabulary, its visual effects, its chart set and its AI surface.
|
|
3
|
-
|
|
4
|
-
// WHY they ship with the package and not with the app showing them: they demo
|
|
5
|
-
|
|
6
|
-
// what every consumer installs identically, so a second copy in a second app is only a copy that drifts. Recovered from the retired orcastrate GUI (vibe-kit @ ccbccb7a^).
|
|
7
|
-
|
|
8
|
-
// The shadcn stages are not written here at all: `pnpm sync:shadcn` vendors
|
|
9
|
-
// upstream's own example per primitive and generates the list.
|
|
10
|
-
|
|
11
|
-
// Each section brings its own layout, so render it inside a `ShowcaseSection`
|
|
12
|
-
// marked `bare`, or in a bare <section> carrying the anchor id.
|
|
13
|
-
export { default as AnimationsSection } from "./AnimationsSection.svelte";
|
|
14
|
-
export { default as ShadcnSection } from "./ShadcnSection.svelte";
|
|
15
|
-
export { default as EffectsSection } from "./EffectsSection.svelte";
|
|
16
|
-
export { default as ChartsSection } from "./ChartsSection.svelte";
|
|
17
|
-
export { default as AiSection } from "./AiSection.svelte";
|
package/src/showcase/plus.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><path d="M8 3.5v9M3.5 8h9" /></svg>
|