@behavioral-agentic-design-system/core 0.42.0 → 0.47.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/package.json +38 -8
- package/scripts/a11y-lint.cjs +101 -14
- package/scripts/bads-sync.mjs +1 -1
- package/scripts/build-tokens.cjs +122 -7
- package/scripts/check-dark-contrast.mjs +204 -0
- package/scripts/check-flush-edges.mjs +245 -0
- package/scripts/check-spec.mjs +73 -0
- package/scripts/deal-directions.mjs +186 -0
- package/scripts/design-system-advisory/README.md +239 -0
- package/scripts/design-system-advisory/check-copy-punctuation.mjs +44 -0
- package/scripts/design-system-advisory/check-even-padding.mjs +35 -0
- package/scripts/design-system-advisory/check-hand-built-button.mjs +46 -0
- package/scripts/design-system-advisory/check-html-nesting.mjs +51 -0
- package/scripts/design-system-advisory/check-icon-sizing.mjs +79 -0
- package/scripts/design-system-advisory/check-label-case.mjs +92 -0
- package/scripts/design-system-advisory/check-native-form-controls.mjs +53 -0
- package/scripts/design-system-advisory/check-radius.mjs +56 -0
- package/scripts/design-system-advisory/check-raw-values.mjs +61 -0
- package/scripts/design-system-advisory/check-small-text.mjs +72 -0
- package/scripts/design-system-advisory/check-tap-target.mjs +70 -0
- package/scripts/design-system-advisory/defaults.mjs +90 -0
- package/scripts/design-system-advisory/fixtures/clean.tsx.fixture +12 -0
- package/scripts/design-system-advisory/fixtures/violations.tsx.fixture +19 -0
- package/scripts/design-system-advisory/lib.mjs +255 -0
- package/scripts/design-system-advisory/run.mjs +189 -0
- package/scripts/design-system-advisory/workflow.yml +82 -0
- package/scripts/health-report.mjs +20 -14
- package/scripts/lib/copy-strings.mjs +146 -0
- package/scripts/lib/counted-lint.mjs +100 -0
- package/scripts/lib/dark-contrast.mjs +120 -0
- package/scripts/lib/flush-edges.mjs +294 -0
- package/scripts/lib/lab-lint.mjs +62 -0
- package/scripts/lib/marketing-library.mjs +129 -0
- package/scripts/lib/mount-page.mjs +25 -0
- package/scripts/lib/on-system.mjs +249 -0
- package/scripts/lib/random.mjs +22 -0
- package/scripts/lib/source-scan.mjs +173 -0
- package/scripts/lib/spec-parse.d.mts +25 -0
- package/scripts/lib/spec-parse.mjs +188 -0
- package/scripts/lib/tells.mjs +366 -0
- package/scripts/lint-arbitrary-tokens.mjs +47 -0
- package/scripts/lint-component-token-refs.mjs +63 -0
- package/scripts/lint-content-hierarchy.mjs +114 -0
- package/scripts/lint-control-baseline.mjs +72 -0
- package/scripts/lint-copy-punctuation.mjs +60 -0
- package/scripts/lint-css-vars.mjs +175 -0
- package/scripts/lint-even-padding.mjs +58 -0
- package/scripts/lint-html-nesting.mjs +116 -0
- package/scripts/lint-label-case.mjs +219 -0
- package/scripts/lint-live-ctas.mjs +138 -0
- package/scripts/lint-microanimation.mjs +2 -2
- package/scripts/lint-proximity.mjs +181 -0
- package/scripts/lint-slop.mjs +1 -1
- package/scripts/lint-spacing-scale.mjs +78 -0
- package/scripts/lint-target-size.cjs +132 -0
- package/scripts/lint-token-primitives.mjs +307 -0
- package/scripts/on-system-score.mjs +95 -0
- package/scripts/size-audit.cjs +2 -2
- package/scripts/slop-rules.mjs +1 -1
- package/scripts/source-images.mjs +180 -0
- package/scripts/ux-tells.mjs +80 -0
- package/scripts/wcag-audit.cjs +25 -4
- package/src/api/brand-colors.ts +3 -0
- package/src/api/brand-fonts.ts +3 -0
- package/src/api/brand-mark.ts +6 -1
- package/src/api/dev-write-guard.ts +53 -0
- package/src/api/layers/file.ts +9 -4
- package/src/api/onboarding-extract.ts +85 -30
- package/src/api/onboarding.ts +3 -0
- package/src/api/save-tokens.ts +3 -0
- package/src/api/site-auth.ts +14 -2
- package/src/app/layout.tsx +6 -0
- package/src/app/preview/canvas/page.tsx +12 -0
- package/src/app/preview/components/page.tsx +828 -14
- package/src/app/preview/sticker-sheet/page.tsx +329 -0
- package/src/app/preview/sticker-sheet/specimens.tsx +296 -0
- package/src/app/preview/studio/blank-screen.tsx +143 -0
- package/src/app/preview/studio/page.tsx +7 -0
- package/src/app/shell.tsx +164 -47
- package/src/components/Foundations/Colors.stories.tsx +119 -8
- package/src/components/canvas/canvas.tsx +458 -0
- package/src/components/canvas/layout.ts +72 -0
- package/src/components/canvas/parse-canvas.ts +32 -0
- package/src/components/canvas/sample.ts +90 -0
- package/src/components/canvas/spec-frame.tsx +43 -0
- package/src/components/canvas/types.ts +33 -0
- package/src/components/docs-tab.tsx +7 -7
- package/src/components/home-recent.tsx +73 -0
- package/src/components/home-tab.tsx +19 -14
- package/src/components/layers-tab.tsx +2 -2
- package/src/components/markdown-preview.tsx +60 -12
- package/src/components/onboarding-wizard.tsx +1 -1
- package/src/components/studio/control-panel.tsx +299 -0
- package/src/components/studio/control-row.tsx +77 -0
- package/src/components/studio/preview-frame.tsx +165 -0
- package/src/components/studio/preview-pane.tsx +247 -0
- package/src/components/studio/studio.tsx +133 -128
- package/src/components/studio/types.ts +218 -0
- package/src/components/studio/use-studio-tweaks.ts +128 -0
- package/src/components/studio/use-studio-view-state.ts +72 -0
- package/src/components/ui/autocomplete.tsx +1 -1
- package/src/components/ui/avatar.tsx +4 -0
- package/src/components/ui/chart.tsx +134 -42
- package/src/components/ui/checkbox-group.tsx +1 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/color-picker.tsx +20 -4
- package/src/components/ui/combobox.tsx +1 -0
- package/src/components/ui/command.tsx +1 -1
- package/src/components/ui/data-table.tsx +64 -3
- package/src/components/ui/date-field.tsx +1 -1
- package/src/components/ui/date-picker.tsx +2 -0
- package/src/components/ui/date-range-picker.tsx +4 -0
- package/src/components/ui/editable.tsx +1 -0
- package/src/components/ui/faceted-filter.tsx +187 -0
- package/src/components/ui/file-upload.tsx +21 -2
- package/src/components/ui/gauge-chart.tsx +18 -4
- package/src/components/ui/heatmap.tsx +3 -1
- package/src/components/ui/inline-edit.tsx +175 -0
- package/src/components/ui/input-group.tsx +5 -2
- package/src/components/ui/month-picker.tsx +1 -1
- package/src/components/ui/multi-select.tsx +1 -0
- package/src/components/ui/number-input.tsx +28 -5
- package/src/components/ui/otp-input.tsx +208 -0
- package/src/components/ui/phone-input.tsx +274 -0
- package/src/components/ui/radio-group.tsx +2 -2
- package/src/components/ui/search-input.tsx +1 -1
- package/src/components/ui/sparkline.tsx +33 -4
- package/src/components/ui/spinner.tsx +23 -4
- package/src/components/ui/table.tsx +9 -0
- package/src/components/ui/tags-input.tsx +1 -1
- package/src/components/ui/timer.tsx +1 -0
- package/src/components/ui/transfer-list.tsx +13 -26
- package/src/components/ui/week-picker.tsx +1 -13
- package/src/components/ui/year-picker.tsx +1 -1
- package/src/data/component-added.json +966 -0
- package/src/data/docs-index.ts +35 -2
- package/src/data/history.json +161 -161
- package/src/data/sticker-sheet.json +9244 -0
- package/src/docs-trace-globs.json +1 -0
- package/src/hooks/use-global-mono-font.ts +1 -0
- package/src/hooks/use-global-primary-color.ts +1 -0
- package/src/hooks/use-global-sans-font.ts +1 -0
- package/src/hooks/use-global-serif-font.ts +1 -0
- package/src/hooks/use-global-type-scale.ts +17 -2
- package/src/hooks/use-mobile.ts +2 -0
- package/src/hooks/use-sync-type-scale.ts +7 -11
- package/src/lib/chart-motion.ts +41 -0
- package/src/lib/get-icon-color.ts +1 -1
- package/src/lib/spec-parse.ts +4 -0
- package/src/lib/svg-sanitize.ts +19 -9
- package/src/stories/Accordion.stories.tsx +7 -0
- package/src/stories/ActionBar.stories.tsx +5 -0
- package/src/stories/Affix.stories.tsx +4 -0
- package/src/stories/AiBadge.stories.tsx +9 -7
- package/src/stories/Alert.stories.tsx +13 -0
- package/src/stories/AlertDialog.stories.tsx +4 -0
- package/src/stories/Anchor.stories.tsx +5 -0
- package/src/stories/AngleSlider.stories.tsx +6 -3
- package/src/stories/AspectRatio.stories.tsx +4 -0
- package/src/stories/Autocomplete.stories.tsx +8 -0
- package/src/stories/Avatar.stories.tsx +10 -0
- package/src/stories/Badge.stories.tsx +14 -6
- package/src/stories/Blockquote.stories.tsx +6 -0
- package/src/stories/BottomNavigation.stories.tsx +4 -0
- package/src/stories/Breadcrumb.stories.tsx +3 -0
- package/src/stories/Burger.stories.tsx +1 -0
- package/src/stories/Button.stories.tsx +24 -0
- package/src/stories/ButtonGroup.stories.tsx +9 -0
- package/src/stories/Calendar.stories.tsx +3 -0
- package/src/stories/Canvas.stories.tsx +45 -0
- package/src/stories/Card.stories.tsx +4 -0
- package/src/stories/Carousel.stories.tsx +6 -0
- package/src/stories/Cascader.stories.tsx +4 -0
- package/src/stories/Chart.stories.tsx +46 -1
- package/src/stories/ChatBubble.stories.tsx +8 -2
- package/src/stories/ChatMarker.stories.tsx +1 -0
- package/src/stories/Checkbox.stories.tsx +40 -0
- package/src/stories/CheckboxCard.stories.tsx +8 -0
- package/src/stories/CheckboxGroup.stories.tsx +19 -0
- package/src/stories/Chip.stories.tsx +10 -19
- package/src/stories/CircularProgress.stories.tsx +13 -27
- package/src/stories/Clipboard.stories.tsx +6 -0
- package/src/stories/CloseButton.stories.tsx +6 -4
- package/src/stories/Code.stories.tsx +8 -1
- package/src/stories/Collapsible.stories.tsx +2 -0
- package/src/stories/ColorPicker.stories.tsx +46 -0
- package/src/stories/ColorSwatch.stories.tsx +1 -0
- package/src/stories/Combobox.stories.tsx +9 -0
- package/src/stories/Command.stories.tsx +2 -0
- package/src/stories/Container.stories.tsx +8 -0
- package/src/stories/ContextMenu.stories.tsx +9 -0
- package/src/stories/CopyButton.stories.tsx +12 -36
- package/src/stories/DataList.stories.tsx +8 -0
- package/src/stories/DataTable.stories.tsx +39 -0
- package/src/stories/DateField.stories.tsx +28 -0
- package/src/stories/DatePicker.stories.tsx +34 -0
- package/src/stories/DateRangePicker.stories.tsx +32 -0
- package/src/stories/Dialog.stories.tsx +8 -0
- package/src/stories/Drawer.stories.tsx +6 -0
- package/src/stories/DropdownMenu.stories.tsx +2 -0
- package/src/stories/Editable.stories.tsx +12 -0
- package/src/stories/EmptyState.stories.tsx +9 -0
- package/src/stories/FacetedFilter.stories.tsx +197 -0
- package/src/stories/Field.stories.tsx +7 -0
- package/src/stories/Fieldset.stories.tsx +8 -0
- package/src/stories/FileButton.stories.tsx +4 -0
- package/src/stories/FileUpload.stories.tsx +16 -17
- package/src/stories/FloatLabel.stories.tsx +3 -8
- package/src/stories/FloatingActionButton.stories.tsx +10 -0
- package/src/stories/FloatingIndicator.stories.tsx +4 -0
- package/src/stories/FloatingPanel.stories.tsx +6 -0
- package/src/stories/FocusTrap.stories.tsx +5 -0
- package/src/stories/FormatByte.stories.tsx +6 -0
- package/src/stories/FormatDate.stories.tsx +8 -0
- package/src/stories/FormatNumber.stories.tsx +9 -0
- package/src/stories/GaugeChart.stories.tsx +9 -3
- package/src/stories/Heatmap.stories.tsx +11 -0
- package/src/stories/Highlight.stories.tsx +6 -0
- package/src/stories/HoverCard.stories.tsx +4 -0
- package/src/stories/Image.stories.tsx +9 -0
- package/src/stories/Indicator.stories.tsx +19 -0
- package/src/stories/InlineEdit.stories.tsx +106 -0
- package/src/stories/Input.stories.tsx +7 -0
- package/src/stories/InputClearButton.stories.tsx +3 -0
- package/src/stories/InputGroup.stories.tsx +40 -0
- package/src/stories/Kbd.stories.tsx +7 -1
- package/src/stories/KeyboardShortcut.stories.tsx +2 -0
- package/src/stories/Label.stories.tsx +2 -0
- package/src/stories/Link.stories.tsx +9 -0
- package/src/stories/List.stories.tsx +8 -0
- package/src/stories/Listbox.stories.tsx +1 -0
- package/src/stories/LoadingDots.stories.tsx +5 -3
- package/src/stories/LoadingOverlay.stories.tsx +5 -1
- package/src/stories/Mark.stories.tsx +5 -0
- package/src/stories/MarkdownPreview.stories.tsx +53 -0
- package/src/stories/Marquee.stories.tsx +4 -0
- package/src/stories/Masonry.stories.tsx +5 -0
- package/src/stories/Menubar.stories.tsx +3 -0
- package/src/stories/Meter.stories.tsx +11 -17
- package/src/stories/MonthPicker.stories.tsx +26 -1
- package/src/stories/MotionToggle.stories.tsx +1 -0
- package/src/stories/MultiSelect.stories.tsx +9 -0
- package/src/stories/NativeSelect.stories.tsx +1 -0
- package/src/stories/NavLink.stories.tsx +7 -0
- package/src/stories/NavigationMenu.stories.tsx +5 -0
- package/src/stories/NavigationRail.stories.tsx +10 -0
- package/src/stories/Notification.stories.tsx +13 -34
- package/src/stories/NumberInput.stories.tsx +33 -1
- package/src/stories/OtpInput.stories.tsx +110 -0
- package/src/stories/Overlay.stories.tsx +5 -1
- package/src/stories/Pagination.stories.tsx +8 -0
- package/src/stories/PasswordInput.stories.tsx +2 -0
- package/src/stories/PhoneInput.stories.tsx +127 -0
- package/src/stories/PinInput.stories.tsx +9 -2
- package/src/stories/Popover.stories.tsx +2 -0
- package/src/stories/Progress.stories.tsx +6 -1
- package/src/stories/Prose.stories.tsx +8 -0
- package/src/stories/QrCode.stories.tsx +2 -0
- package/src/stories/Questionnaire.stories.tsx +7 -0
- package/src/stories/RadioGroup.stories.tsx +40 -0
- package/src/stories/RatingGroup.stories.tsx +8 -4
- package/src/stories/Resizable.stories.tsx +4 -2
- package/src/stories/Result.stories.tsx +3 -0
- package/src/stories/Reveal.stories.tsx +2 -0
- package/src/stories/RollingNumber.stories.tsx +5 -0
- package/src/stories/ScrollArea.stories.tsx +3 -1
- package/src/stories/SearchInput.stories.tsx +10 -6
- package/src/stories/SegmentedControl.stories.tsx +11 -0
- package/src/stories/Select.stories.tsx +7 -0
- package/src/stories/Separator.stories.tsx +6 -0
- package/src/stories/Sheet.stories.tsx +5 -0
- package/src/stories/Sidebar.stories.tsx +40 -1
- package/src/stories/SimpleGrid.stories.tsx +5 -0
- package/src/stories/Skeleton.stories.tsx +8 -0
- package/src/stories/SkeletonTable.stories.tsx +6 -5
- package/src/stories/SkipLink.stories.tsx +3 -0
- package/src/stories/Slider.stories.tsx +2 -1
- package/src/stories/Sonner.stories.tsx +7 -0
- package/src/stories/Sparkline.stories.tsx +14 -1
- package/src/stories/Spinner.stories.tsx +20 -10
- package/src/stories/Spoiler.stories.tsx +5 -0
- package/src/stories/Squircle.stories.tsx +7 -0
- package/src/stories/Stack.stories.tsx +7 -0
- package/src/stories/StatusBadge.stories.tsx +12 -6
- package/src/stories/Stepper.stories.tsx +5 -0
- package/src/stories/Switch.stories.tsx +4 -0
- package/src/stories/Table.stories.tsx +10 -1
- package/src/stories/Tabs.stories.tsx +8 -0
- package/src/stories/Tag.stories.tsx +13 -5
- package/src/stories/TagsInput.stories.tsx +15 -0
- package/src/stories/Text.stories.tsx +12 -0
- package/src/stories/Textarea.stories.tsx +9 -0
- package/src/stories/ThemeIcon.stories.tsx +6 -3
- package/src/stories/TimePicker.stories.tsx +2 -0
- package/src/stories/Timeline.stories.tsx +12 -0
- package/src/stories/Timer.stories.tsx +30 -0
- package/src/stories/Toggle.stories.tsx +7 -5
- package/src/stories/ToggleGroup.stories.tsx +5 -0
- package/src/stories/ToggleTip.stories.tsx +4 -0
- package/src/stories/Toolbar.stories.tsx +6 -0
- package/src/stories/Tooltip.stories.tsx +3 -0
- package/src/stories/Tour.stories.tsx +3 -0
- package/src/stories/TransferList.stories.tsx +7 -0
- package/src/stories/TreeSelect.stories.tsx +4 -0
- package/src/stories/TreeView.stories.tsx +5 -0
- package/src/stories/TypingIndicator.stories.tsx +4 -0
- package/src/stories/VisuallyHidden.stories.tsx +3 -0
- package/src/stories/Watermark.stories.tsx +6 -0
- package/src/stories/WeekPicker.stories.tsx +25 -1
- package/src/stories/WordRotate.stories.tsx +5 -0
- package/src/stories/YearPicker.stories.tsx +26 -11
- package/src/stories/story-groups.json +22 -16
- package/src/styles.css +50 -2
- package/src/tokens.json +86 -58
|
@@ -122,6 +122,10 @@ import { PasswordInput } from "@behavioral-agentic-design-system/core/components
|
|
|
122
122
|
import { Notification } from "@behavioral-agentic-design-system/core/components/ui/notification";
|
|
123
123
|
import { FloatingPanel } from "@behavioral-agentic-design-system/core/components/ui/floating-panel";
|
|
124
124
|
import { NumberInput } from "@behavioral-agentic-design-system/core/components/ui/number-input";
|
|
125
|
+
import { InlineEdit } from "@behavioral-agentic-design-system/core/components/ui/inline-edit";
|
|
126
|
+
import { OTPInput } from "@behavioral-agentic-design-system/core/components/ui/otp-input";
|
|
127
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@behavioral-agentic-design-system/core/components/ui/collapsible";
|
|
128
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
125
129
|
import { FileUpload } from "@behavioral-agentic-design-system/core/components/ui/file-upload";
|
|
126
130
|
import { Spinner } from "@behavioral-agentic-design-system/core/components/ui/spinner";
|
|
127
131
|
import { CircularProgress } from "@behavioral-agentic-design-system/core/components/ui/circular-progress";
|
|
@@ -451,11 +455,22 @@ import {
|
|
|
451
455
|
NavigationProgress,
|
|
452
456
|
useNavigationProgress,
|
|
453
457
|
} from "@behavioral-agentic-design-system/core/components/ui/navigation-progress";
|
|
458
|
+
import {
|
|
459
|
+
FacetedFilter,
|
|
460
|
+
type FacetedFilterOption,
|
|
461
|
+
} from "@behavioral-agentic-design-system/core/components/ui/faceted-filter";
|
|
454
462
|
import { Attachment } from "@behavioral-agentic-design-system/core/components/ui/attachment";
|
|
455
463
|
import {
|
|
456
464
|
Paperclip as AttachmentPaperclipIcon,
|
|
457
465
|
SendHorizontal as AttachmentSendIcon,
|
|
458
466
|
} from "lucide-react";
|
|
467
|
+
import { PhoneInput } from "@behavioral-agentic-design-system/core/components/ui/phone-input";
|
|
468
|
+
import { PaymentMethodCard } from "@/components/payment-method-card";
|
|
469
|
+
import { TwoFactorCard } from "@/components/two-factor-card";
|
|
470
|
+
import { TeamMembersCard } from "@/components/team-members-card";
|
|
471
|
+
import { ActiveSessionsCard } from "@/components/active-sessions-card";
|
|
472
|
+
import { DomainVerificationCard } from "@/components/domain-verification-card";
|
|
473
|
+
import { NotificationPreferencesCard } from "@/components/notification-preferences-card";
|
|
459
474
|
|
|
460
475
|
// Stable, deterministic data for ScrollArea — never use Math.random in
|
|
461
476
|
// SSR-rendered output, it causes hydration mismatches.
|
|
@@ -1621,7 +1636,7 @@ export default function ComponentsPreview() {
|
|
|
1621
1636
|
<div className="space-y-4">
|
|
1622
1637
|
{(["sm", "default", "lg"] as const).map((size) => (
|
|
1623
1638
|
<div key={size} className="space-y-1">
|
|
1624
|
-
<p className="text-xs text-muted-foreground
|
|
1639
|
+
<p className="text-xs text-muted-foreground">size="{size}"</p>
|
|
1625
1640
|
<Pagination size={size}>
|
|
1626
1641
|
<PaginationContent>
|
|
1627
1642
|
<PaginationItem><PaginationPrevious href="#" /></PaginationItem>
|
|
@@ -2006,9 +2021,8 @@ export default function ComponentsPreview() {
|
|
|
2006
2021
|
<span className="text-xs text-muted-foreground">muted</span>
|
|
2007
2022
|
</div>
|
|
2008
2023
|
<div className="flex flex-col items-center gap-2">
|
|
2009
|
-
<div className="flex size-16 items-center justify-center rounded-md bg-
|
|
2010
|
-
|
|
2011
|
-
<Spinner variant="primary" className="[&>svg]:text-primary-foreground" />
|
|
2024
|
+
<div className="flex size-16 items-center justify-center rounded-md border bg-card">
|
|
2025
|
+
<Spinner variant="primary" />
|
|
2012
2026
|
</div>
|
|
2013
2027
|
<span className="text-xs text-muted-foreground">primary</span>
|
|
2014
2028
|
</div>
|
|
@@ -2019,7 +2033,7 @@ export default function ComponentsPreview() {
|
|
|
2019
2033
|
<p className="text-sm font-medium text-muted-foreground">Button loading state</p>
|
|
2020
2034
|
<div className="flex flex-wrap items-center gap-3">
|
|
2021
2035
|
<Button disabled className="gap-2">
|
|
2022
|
-
<Spinner size="xs"
|
|
2036
|
+
<Spinner size="xs" label="Saving" />
|
|
2023
2037
|
Saving changes…
|
|
2024
2038
|
</Button>
|
|
2025
2039
|
<Button variant="outline" disabled className="gap-2">
|
|
@@ -3024,7 +3038,7 @@ export default function ComponentsPreview() {
|
|
|
3024
3038
|
</Section>
|
|
3025
3039
|
|
|
3026
3040
|
<Section title="Table">
|
|
3027
|
-
<Table>
|
|
3041
|
+
<Table aria-label="Design System Team contributions, Q2">
|
|
3028
3042
|
<TableCaption>Design System Team — Q2 contributions</TableCaption>
|
|
3029
3043
|
<TableHeader>
|
|
3030
3044
|
<TableRow>
|
|
@@ -4237,7 +4251,7 @@ export default function ComponentsPreview() {
|
|
|
4237
4251
|
<ColorSwatch color="#171717" size="lg" aria-label="Selected: near-black">
|
|
4238
4252
|
<CheckIcon strokeWidth={1.5} className="text-white" />
|
|
4239
4253
|
</ColorSwatch>
|
|
4240
|
-
{/* Picker's own label pattern (see
|
|
4254
|
+
{/* Picker's own label pattern (see AGENTS.md -> Customize Tab):
|
|
4241
4255
|
shows the user's raw hex pick back as text, not a style
|
|
4242
4256
|
value — SC 1.4.6 doesn't apply to displayed data. */}
|
|
4243
4257
|
<span className="tabular-nums text-muted-foreground">
|
|
@@ -6401,9 +6415,42 @@ export default function ComponentsPreview() {
|
|
|
6401
6415
|
<Section title="NavigationProgress">
|
|
6402
6416
|
<NavigationProgressShowcase />
|
|
6403
6417
|
</Section>
|
|
6418
|
+
<Section title="Faceted Filter">
|
|
6419
|
+
<FacetedFilterShowcase />
|
|
6420
|
+
</Section>
|
|
6404
6421
|
<Section title="Attachment">
|
|
6405
6422
|
<AttachmentShowcase />
|
|
6406
6423
|
</Section>
|
|
6424
|
+
<Section title="Phone Input">
|
|
6425
|
+
<PhoneInputShowcase />
|
|
6426
|
+
</Section>
|
|
6427
|
+
<Section title="TwoFactorCard">
|
|
6428
|
+
<TwoFactorCardShowcase />
|
|
6429
|
+
</Section>
|
|
6430
|
+
<Section title="PaymentMethodCard">
|
|
6431
|
+
<PaymentMethodCardShowcase />
|
|
6432
|
+
</Section>
|
|
6433
|
+
<Section title="TeamMembersCard">
|
|
6434
|
+
<TeamMembersCardShowcase />
|
|
6435
|
+
</Section>
|
|
6436
|
+
<Section title="ActiveSessionsCard">
|
|
6437
|
+
<ActiveSessionsCardShowcase />
|
|
6438
|
+
</Section>
|
|
6439
|
+
<Section title="DomainVerificationCard">
|
|
6440
|
+
<DomainVerificationCardShowcase />
|
|
6441
|
+
</Section>
|
|
6442
|
+
<Section title="NotificationPreferencesCard">
|
|
6443
|
+
<NotificationPreferencesCardShowcase />
|
|
6444
|
+
</Section>
|
|
6445
|
+
<Section title="InlineEdit">
|
|
6446
|
+
<InlineEditShowcase />
|
|
6447
|
+
</Section>
|
|
6448
|
+
<Section title="OTPInput">
|
|
6449
|
+
<OTPInputShowcase />
|
|
6450
|
+
</Section>
|
|
6451
|
+
<Section title="Collapsible">
|
|
6452
|
+
<CollapsibleShowcase />
|
|
6453
|
+
</Section>
|
|
6407
6454
|
</div>
|
|
6408
6455
|
</div>
|
|
6409
6456
|
);
|
|
@@ -11815,7 +11862,7 @@ function LoadingDotsShowcase() {
|
|
|
11815
11862
|
<LoadingDots size="xs" aria-label="Saving" />
|
|
11816
11863
|
</Button>
|
|
11817
11864
|
<p className="flex items-center gap-2 text-sm text-muted-foreground">
|
|
11818
|
-
Fetching results <LoadingDots size="sm"
|
|
11865
|
+
Fetching results <LoadingDots size="sm" tone="muted" />
|
|
11819
11866
|
</p>
|
|
11820
11867
|
<div className="flex h-12 w-full items-center justify-center rounded-md border border-dashed">
|
|
11821
11868
|
<LoadingDots tone="muted" aria-label="Loading content" />
|
|
@@ -12429,12 +12476,21 @@ function SparklineShowcase() {
|
|
|
12429
12476
|
<p className="mb-3 text-xs font-medium text-muted-foreground">
|
|
12430
12477
|
withDot — marks last data point
|
|
12431
12478
|
</p>
|
|
12432
|
-
<
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12479
|
+
<div className="flex gap-4">
|
|
12480
|
+
<Sparkline
|
|
12481
|
+
data={revenueData}
|
|
12482
|
+
withDot
|
|
12483
|
+
className="w-40"
|
|
12484
|
+
aria-label="Monthly revenue trend with current-value dot"
|
|
12485
|
+
/>
|
|
12486
|
+
<Sparkline
|
|
12487
|
+
data={revenueData}
|
|
12488
|
+
type="line"
|
|
12489
|
+
withDot
|
|
12490
|
+
className="w-40"
|
|
12491
|
+
aria-label="Monthly revenue line with current-value dot"
|
|
12492
|
+
/>
|
|
12493
|
+
</div>
|
|
12438
12494
|
</div>
|
|
12439
12495
|
|
|
12440
12496
|
<div>
|
|
@@ -14394,6 +14450,72 @@ function NavigationProgressShowcase() {
|
|
|
14394
14450
|
);
|
|
14395
14451
|
}
|
|
14396
14452
|
|
|
14453
|
+
// ---------------------------------------------------------------------------
|
|
14454
|
+
// FacetedFilter showcase
|
|
14455
|
+
// ---------------------------------------------------------------------------
|
|
14456
|
+
|
|
14457
|
+
const FACET_STATUS_OPTIONS: FacetedFilterOption[] = [
|
|
14458
|
+
{ label: "Active", value: "active", count: 124 },
|
|
14459
|
+
{ label: "Inactive", value: "inactive", count: 38 },
|
|
14460
|
+
{ label: "Pending", value: "pending", count: 17 },
|
|
14461
|
+
{ label: "Archived", value: "archived", count: 6 },
|
|
14462
|
+
];
|
|
14463
|
+
|
|
14464
|
+
const FACET_ROLE_OPTIONS: FacetedFilterOption[] = [
|
|
14465
|
+
{ label: "Admin", value: "admin", count: 8 },
|
|
14466
|
+
{ label: "Member", value: "member", count: 93 },
|
|
14467
|
+
{ label: "Viewer", value: "viewer", count: 64 },
|
|
14468
|
+
];
|
|
14469
|
+
|
|
14470
|
+
function FacetedFilterShowcase() {
|
|
14471
|
+
const [statusSelected, setStatusSelected] = React.useState<Set<string>>(
|
|
14472
|
+
new Set()
|
|
14473
|
+
);
|
|
14474
|
+
const [roleSelected, setRoleSelected] = React.useState<Set<string>>(
|
|
14475
|
+
new Set(["admin"])
|
|
14476
|
+
);
|
|
14477
|
+
return (
|
|
14478
|
+
<div className="flex flex-col gap-6">
|
|
14479
|
+
{/* Filter toolbar demo */}
|
|
14480
|
+
{/* lint-disable: card-bypass — inline demo wrapper, not a Card bypass */}
|
|
14481
|
+
<div className="flex flex-wrap items-center gap-2 rounded-lg border bg-card p-4">
|
|
14482
|
+
<span className="text-sm font-medium text-muted-foreground">
|
|
14483
|
+
Filters:
|
|
14484
|
+
</span>
|
|
14485
|
+
<FacetedFilter
|
|
14486
|
+
title="Status"
|
|
14487
|
+
options={FACET_STATUS_OPTIONS}
|
|
14488
|
+
selectedValues={statusSelected}
|
|
14489
|
+
onSelectionChange={setStatusSelected}
|
|
14490
|
+
/>
|
|
14491
|
+
<FacetedFilter
|
|
14492
|
+
title="Role"
|
|
14493
|
+
options={FACET_ROLE_OPTIONS}
|
|
14494
|
+
selectedValues={roleSelected}
|
|
14495
|
+
onSelectionChange={setRoleSelected}
|
|
14496
|
+
/>
|
|
14497
|
+
</div>
|
|
14498
|
+
{/* Badge count threshold demo — 2 vs 3+ */}
|
|
14499
|
+
<div className="flex flex-wrap gap-3">
|
|
14500
|
+
<FacetedFilter
|
|
14501
|
+
title="2 selected"
|
|
14502
|
+
options={FACET_STATUS_OPTIONS}
|
|
14503
|
+
selectedValues={new Set(["active", "pending"])}
|
|
14504
|
+
/>
|
|
14505
|
+
<FacetedFilter
|
|
14506
|
+
title="3+ selected"
|
|
14507
|
+
options={FACET_STATUS_OPTIONS}
|
|
14508
|
+
selectedValues={new Set(["active", "inactive", "pending", "archived"])}
|
|
14509
|
+
/>
|
|
14510
|
+
</div>
|
|
14511
|
+
</div>
|
|
14512
|
+
);
|
|
14513
|
+
}
|
|
14514
|
+
|
|
14515
|
+
// ---------------------------------------------------------------------------
|
|
14516
|
+
// Attachment showcase
|
|
14517
|
+
// ---------------------------------------------------------------------------
|
|
14518
|
+
|
|
14397
14519
|
// File names and byte counts from content/personas/bads.json → files[].
|
|
14398
14520
|
const ATTACHMENT_FILES = [
|
|
14399
14521
|
{ name: "roi-report-2026-06.pdf", bytes: 1_536_000, type: "application/pdf" },
|
|
@@ -14557,3 +14679,695 @@ function AttachmentShowcase() {
|
|
|
14557
14679
|
</div>
|
|
14558
14680
|
);
|
|
14559
14681
|
}
|
|
14682
|
+
|
|
14683
|
+
function PhoneInputShowcase() {
|
|
14684
|
+
const [value, setValue] = React.useState("+14155550182");
|
|
14685
|
+
const [gbValue, setGbValue] = React.useState("+447911123456");
|
|
14686
|
+
const [emptyValue, setEmptyValue] = React.useState("");
|
|
14687
|
+
return (
|
|
14688
|
+
<div className="space-y-8">
|
|
14689
|
+
<p className="text-sm text-muted-foreground">
|
|
14690
|
+
Composites a country dial-code select with a tel input. Outputs E.164
|
|
14691
|
+
format (+CC localNumber). Stateless — controlled via value + onChange.
|
|
14692
|
+
No libphonenumber validation; wire your own form-layer validation.
|
|
14693
|
+
</p>
|
|
14694
|
+
<div className="space-y-4">
|
|
14695
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
14696
|
+
Default — US, controlled
|
|
14697
|
+
</p>
|
|
14698
|
+
<div className="grid w-full max-w-xs gap-2">
|
|
14699
|
+
<label htmlFor="phone-demo-us" className="text-sm font-medium">
|
|
14700
|
+
Phone number
|
|
14701
|
+
</label>
|
|
14702
|
+
<PhoneInput
|
|
14703
|
+
id="phone-demo-us"
|
|
14704
|
+
aria-labelledby="phone-demo-us"
|
|
14705
|
+
value={value}
|
|
14706
|
+
onChange={setValue}
|
|
14707
|
+
/>
|
|
14708
|
+
<p className="text-xs text-muted-foreground">Value: {value || "(empty)"}</p>
|
|
14709
|
+
</div>
|
|
14710
|
+
</div>
|
|
14711
|
+
<div className="space-y-4">
|
|
14712
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
14713
|
+
UK default country
|
|
14714
|
+
</p>
|
|
14715
|
+
<div className="grid w-full max-w-xs gap-2">
|
|
14716
|
+
<label htmlFor="phone-demo-gb" className="text-sm font-medium">
|
|
14717
|
+
Mobile number
|
|
14718
|
+
</label>
|
|
14719
|
+
<PhoneInput
|
|
14720
|
+
id="phone-demo-gb"
|
|
14721
|
+
aria-labelledby="phone-demo-gb"
|
|
14722
|
+
value={gbValue}
|
|
14723
|
+
onChange={setGbValue}
|
|
14724
|
+
defaultCountry="GB"
|
|
14725
|
+
/>
|
|
14726
|
+
</div>
|
|
14727
|
+
</div>
|
|
14728
|
+
<div className="space-y-4">
|
|
14729
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
14730
|
+
Error state
|
|
14731
|
+
</p>
|
|
14732
|
+
<div className="grid w-full max-w-xs gap-2">
|
|
14733
|
+
<label htmlFor="phone-demo-error" className="text-sm font-medium">
|
|
14734
|
+
Phone number
|
|
14735
|
+
</label>
|
|
14736
|
+
<PhoneInput
|
|
14737
|
+
id="phone-demo-error"
|
|
14738
|
+
aria-labelledby="phone-demo-error"
|
|
14739
|
+
value={emptyValue}
|
|
14740
|
+
onChange={setEmptyValue}
|
|
14741
|
+
error
|
|
14742
|
+
aria-describedby="phone-demo-error-msg"
|
|
14743
|
+
/>
|
|
14744
|
+
<p id="phone-demo-error-msg" className="text-xs text-destructive">
|
|
14745
|
+
A valid phone number is required.
|
|
14746
|
+
</p>
|
|
14747
|
+
</div>
|
|
14748
|
+
</div>
|
|
14749
|
+
<div className="space-y-4">
|
|
14750
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
14751
|
+
Disabled
|
|
14752
|
+
</p>
|
|
14753
|
+
<div className="grid w-full max-w-xs gap-2">
|
|
14754
|
+
<label htmlFor="phone-demo-disabled" className="text-sm font-medium text-muted-foreground">
|
|
14755
|
+
Phone number
|
|
14756
|
+
</label>
|
|
14757
|
+
<PhoneInput
|
|
14758
|
+
id="phone-demo-disabled"
|
|
14759
|
+
aria-labelledby="phone-demo-disabled"
|
|
14760
|
+
value="+14155550182"
|
|
14761
|
+
onChange={() => {}}
|
|
14762
|
+
disabled
|
|
14763
|
+
/>
|
|
14764
|
+
</div>
|
|
14765
|
+
</div>
|
|
14766
|
+
</div>
|
|
14767
|
+
);
|
|
14768
|
+
}
|
|
14769
|
+
|
|
14770
|
+
function TwoFactorCardShowcase() {
|
|
14771
|
+
return (
|
|
14772
|
+
<div className="space-y-8">
|
|
14773
|
+
<p className="text-sm text-muted-foreground">
|
|
14774
|
+
Dedicated two-factor authentication management card. Shows method-by-method
|
|
14775
|
+
status (authenticator app, SMS, hardware key), backup code count with a
|
|
14776
|
+
low-code warning, and a primary manage CTA. Distinct from SecurityCard which
|
|
14777
|
+
is a full security overview.
|
|
14778
|
+
</p>
|
|
14779
|
+
|
|
14780
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
|
14781
|
+
<div className="space-y-2">
|
|
14782
|
+
<p className="text-xs font-medium text-muted-foreground">Enabled — authenticator only</p>
|
|
14783
|
+
<TwoFactorCard
|
|
14784
|
+
enabled
|
|
14785
|
+
methods={[
|
|
14786
|
+
{ method: "authenticator", enabled: true, label: "Google Authenticator" },
|
|
14787
|
+
{ method: "sms", enabled: false, label: "" },
|
|
14788
|
+
{ method: "hardware-key", enabled: false, label: "" },
|
|
14789
|
+
]}
|
|
14790
|
+
backupCodesRemaining={7}
|
|
14791
|
+
onManage={() => {}}
|
|
14792
|
+
/>
|
|
14793
|
+
</div>
|
|
14794
|
+
|
|
14795
|
+
<div className="space-y-2">
|
|
14796
|
+
<p className="text-xs font-medium text-muted-foreground">Disabled — not set up</p>
|
|
14797
|
+
<TwoFactorCard
|
|
14798
|
+
enabled={false}
|
|
14799
|
+
methods={[
|
|
14800
|
+
{ method: "authenticator", enabled: false, label: "" },
|
|
14801
|
+
{ method: "sms", enabled: false, label: "" },
|
|
14802
|
+
{ method: "hardware-key", enabled: false, label: "" },
|
|
14803
|
+
]}
|
|
14804
|
+
backupCodesRemaining={0}
|
|
14805
|
+
onManage={() => {}}
|
|
14806
|
+
/>
|
|
14807
|
+
</div>
|
|
14808
|
+
|
|
14809
|
+
<div className="space-y-2">
|
|
14810
|
+
<p className="text-xs font-medium text-muted-foreground">Multiple methods + low backup codes</p>
|
|
14811
|
+
<TwoFactorCard
|
|
14812
|
+
enabled
|
|
14813
|
+
methods={[
|
|
14814
|
+
{ method: "authenticator", enabled: true, label: "1Password TOTP" },
|
|
14815
|
+
{ method: "sms", enabled: true, label: "+1 •••• 5182" },
|
|
14816
|
+
{ method: "hardware-key", enabled: false, label: "" },
|
|
14817
|
+
]}
|
|
14818
|
+
backupCodesRemaining={1}
|
|
14819
|
+
onManage={() => {}}
|
|
14820
|
+
onRegenerateBackupCodes={() => {}}
|
|
14821
|
+
/>
|
|
14822
|
+
</div>
|
|
14823
|
+
|
|
14824
|
+
<div className="space-y-2">
|
|
14825
|
+
<p className="text-xs font-medium text-muted-foreground">All methods — no manage CTA</p>
|
|
14826
|
+
<TwoFactorCard
|
|
14827
|
+
enabled
|
|
14828
|
+
methods={[
|
|
14829
|
+
{ method: "authenticator", enabled: true, label: "1Password TOTP" },
|
|
14830
|
+
{ method: "sms", enabled: true, label: "+1 •••• 3847" },
|
|
14831
|
+
{ method: "hardware-key", enabled: true, label: "YubiKey 5C" },
|
|
14832
|
+
]}
|
|
14833
|
+
backupCodesRemaining={9}
|
|
14834
|
+
/>
|
|
14835
|
+
</div>
|
|
14836
|
+
</div>
|
|
14837
|
+
</div>
|
|
14838
|
+
);
|
|
14839
|
+
}
|
|
14840
|
+
|
|
14841
|
+
function PaymentMethodCardShowcase() {
|
|
14842
|
+
return (
|
|
14843
|
+
<div className="flex flex-col gap-6 w-full max-w-md">
|
|
14844
|
+
<div className="space-y-1">
|
|
14845
|
+
<p className="text-xs font-medium text-muted-foreground">Default — one card, add + actions</p>
|
|
14846
|
+
<PaymentMethodCard
|
|
14847
|
+
methods={[
|
|
14848
|
+
{ id: "pm_1", brand: "visa", last4: "4242", expiry: "09/27", name: "Priya Raghavan", isDefault: true },
|
|
14849
|
+
]}
|
|
14850
|
+
onAddMethod={() => {}}
|
|
14851
|
+
onSetDefault={() => {}}
|
|
14852
|
+
onRemove={() => {}}
|
|
14853
|
+
/>
|
|
14854
|
+
</div>
|
|
14855
|
+
<div className="space-y-1">
|
|
14856
|
+
<p className="text-xs font-medium text-muted-foreground">Multiple cards with expired</p>
|
|
14857
|
+
<PaymentMethodCard
|
|
14858
|
+
methods={[
|
|
14859
|
+
{ id: "pm_1", brand: "visa", last4: "4242", expiry: "09/27", name: "Priya Raghavan", isDefault: true },
|
|
14860
|
+
{ id: "pm_2", brand: "mastercard", last4: "5555", expiry: "03/26", name: "Priya Raghavan", isDefault: false },
|
|
14861
|
+
{ id: "pm_3", brand: "amex", last4: "3782", expiry: "11/24", name: "Priya Raghavan", isDefault: false, isExpired: true },
|
|
14862
|
+
]}
|
|
14863
|
+
onAddMethod={() => {}}
|
|
14864
|
+
onSetDefault={() => {}}
|
|
14865
|
+
onRemove={() => {}}
|
|
14866
|
+
/>
|
|
14867
|
+
</div>
|
|
14868
|
+
<div className="space-y-1">
|
|
14869
|
+
<p className="text-xs font-medium text-muted-foreground">Empty state</p>
|
|
14870
|
+
<PaymentMethodCard methods={[]} onAddMethod={() => {}} />
|
|
14871
|
+
</div>
|
|
14872
|
+
<div className="space-y-1">
|
|
14873
|
+
<p className="text-xs font-medium text-muted-foreground">Read-only (no actions)</p>
|
|
14874
|
+
<PaymentMethodCard
|
|
14875
|
+
methods={[
|
|
14876
|
+
{ id: "pm_1", brand: "visa", last4: "4242", expiry: "09/27", name: "Soo-Jin Park", isDefault: true },
|
|
14877
|
+
]}
|
|
14878
|
+
/>
|
|
14879
|
+
</div>
|
|
14880
|
+
</div>
|
|
14881
|
+
);
|
|
14882
|
+
}
|
|
14883
|
+
|
|
14884
|
+
function TeamMembersCardShowcase() {
|
|
14885
|
+
return (
|
|
14886
|
+
<div className="space-y-8">
|
|
14887
|
+
<p className="text-sm text-muted-foreground">
|
|
14888
|
+
Team member list card: avatar, name, email, and role badge per member,
|
|
14889
|
+
with an optional invite action and overflow count. Sources: GitHub repo
|
|
14890
|
+
collaborators/settings, Vercel team page, Linear team settings, Figma
|
|
14891
|
+
team page, Notion workspace members (5 cross-system sources).
|
|
14892
|
+
</p>
|
|
14893
|
+
|
|
14894
|
+
<div className="space-y-4">
|
|
14895
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
14896
|
+
Default — 5 members, invite action
|
|
14897
|
+
</p>
|
|
14898
|
+
<div className="w-80">
|
|
14899
|
+
<TeamMembersCard
|
|
14900
|
+
members={[
|
|
14901
|
+
{ id: "1", name: "Jordan Reeves", email: "jordan@reeves.design", role: "owner" },
|
|
14902
|
+
{ id: "2", name: "Seo-yun Park", email: "seoyun.park@figma.com", role: "admin" },
|
|
14903
|
+
{ id: "3", name: "Marcus Lindqvist", email: "marcus@lindqvist.dev", role: "member" },
|
|
14904
|
+
{ id: "4", name: "Anika Patel", email: "anika.patel@stripe.com", role: "member" },
|
|
14905
|
+
{ id: "5", name: "Tomás Herrera", email: "tomas.herrera@vercel.com", role: "viewer" },
|
|
14906
|
+
]}
|
|
14907
|
+
description="Northwind Health workspace"
|
|
14908
|
+
onInvite={() => {}}
|
|
14909
|
+
/>
|
|
14910
|
+
</div>
|
|
14911
|
+
</div>
|
|
14912
|
+
|
|
14913
|
+
<div className="space-y-4">
|
|
14914
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
14915
|
+
With overflow count — 3 shown of 12
|
|
14916
|
+
</p>
|
|
14917
|
+
<div className="w-80">
|
|
14918
|
+
<TeamMembersCard
|
|
14919
|
+
members={[
|
|
14920
|
+
{ id: "1", name: "Jordan Reeves", email: "jordan@reeves.design", role: "owner" },
|
|
14921
|
+
{ id: "2", name: "Kofi Asante", email: "kofi@northwindhealth.com", role: "admin" },
|
|
14922
|
+
{ id: "3", name: "Seo-yun Park", email: "seoyun.park@figma.com", role: "member" },
|
|
14923
|
+
]}
|
|
14924
|
+
totalCount={12}
|
|
14925
|
+
description="Meridian Payments · Design Systems"
|
|
14926
|
+
onInvite={() => {}}
|
|
14927
|
+
/>
|
|
14928
|
+
</div>
|
|
14929
|
+
</div>
|
|
14930
|
+
|
|
14931
|
+
<div className="space-y-4">
|
|
14932
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
14933
|
+
Read-only — no invite action (viewer context)
|
|
14934
|
+
</p>
|
|
14935
|
+
<div className="w-80">
|
|
14936
|
+
<TeamMembersCard
|
|
14937
|
+
members={[
|
|
14938
|
+
{ id: "1", name: "Yuki Tanaka", email: "yuki@fieldnotelabs.io", role: "owner" },
|
|
14939
|
+
{ id: "2", name: "Chloé Dubois-Martin", email: "chloe@harborline.com", role: "admin" },
|
|
14940
|
+
{ id: "3", name: "Marcus Lindqvist", email: "marcus@lindqvist.dev", role: "member" },
|
|
14941
|
+
]}
|
|
14942
|
+
description="Fieldnote Labs workspace"
|
|
14943
|
+
/>
|
|
14944
|
+
</div>
|
|
14945
|
+
</div>
|
|
14946
|
+
</div>
|
|
14947
|
+
);
|
|
14948
|
+
}
|
|
14949
|
+
|
|
14950
|
+
function ActiveSessionsCardShowcase() {
|
|
14951
|
+
return (
|
|
14952
|
+
<div className="space-y-8">
|
|
14953
|
+
<p className="text-sm text-muted-foreground">
|
|
14954
|
+
Active login sessions management card — device/browser info, last-seen
|
|
14955
|
+
time, geographic location, and a per-session revoke action. The current
|
|
14956
|
+
session is highlighted with a badge and protected from revoke. An
|
|
14957
|
+
optional footer CTA lets users revoke all other sessions at once. Sources:
|
|
14958
|
+
GitHub Security settings, Vercel account security, Linear security
|
|
14959
|
+
settings, Stripe dashboard, Auth0 (5 cross-system sources).
|
|
14960
|
+
</p>
|
|
14961
|
+
|
|
14962
|
+
<div className="space-y-4">
|
|
14963
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
14964
|
+
Default — multiple sessions, current highlighted
|
|
14965
|
+
</p>
|
|
14966
|
+
<div className="w-96">
|
|
14967
|
+
<ActiveSessionsCard
|
|
14968
|
+
sessions={[
|
|
14969
|
+
{
|
|
14970
|
+
id: "sess_current",
|
|
14971
|
+
browser: "Chrome 129 on macOS",
|
|
14972
|
+
location: "San Francisco, CA",
|
|
14973
|
+
lastSeen: new Date().toISOString(),
|
|
14974
|
+
isCurrent: true,
|
|
14975
|
+
device: "desktop",
|
|
14976
|
+
},
|
|
14977
|
+
{
|
|
14978
|
+
id: "sess_2",
|
|
14979
|
+
browser: "Firefox 130 on Ubuntu",
|
|
14980
|
+
location: "Austin, TX",
|
|
14981
|
+
lastSeen: new Date(Date.now() - 2 * 60 * 60 * 1000).toISOString(),
|
|
14982
|
+
device: "desktop",
|
|
14983
|
+
},
|
|
14984
|
+
{
|
|
14985
|
+
id: "sess_3",
|
|
14986
|
+
browser: "Safari 18 on iOS",
|
|
14987
|
+
location: "New York, NY",
|
|
14988
|
+
lastSeen: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString(),
|
|
14989
|
+
device: "mobile",
|
|
14990
|
+
},
|
|
14991
|
+
]}
|
|
14992
|
+
onRevoke={(id) => console.log("Revoke:", id)}
|
|
14993
|
+
onRevokeAll={() => console.log("Revoke all")}
|
|
14994
|
+
/>
|
|
14995
|
+
</div>
|
|
14996
|
+
</div>
|
|
14997
|
+
|
|
14998
|
+
<div className="space-y-4">
|
|
14999
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
15000
|
+
Single session — no revoke actions rendered
|
|
15001
|
+
</p>
|
|
15002
|
+
<div className="w-96">
|
|
15003
|
+
<ActiveSessionsCard
|
|
15004
|
+
sessions={[
|
|
15005
|
+
{
|
|
15006
|
+
id: "sess_current",
|
|
15007
|
+
browser: "Arc 1.62 on macOS",
|
|
15008
|
+
location: "San Francisco, CA",
|
|
15009
|
+
lastSeen: new Date().toISOString(),
|
|
15010
|
+
isCurrent: true,
|
|
15011
|
+
device: "desktop",
|
|
15012
|
+
},
|
|
15013
|
+
]}
|
|
15014
|
+
onRevoke={(id) => console.log("Revoke:", id)}
|
|
15015
|
+
/>
|
|
15016
|
+
</div>
|
|
15017
|
+
</div>
|
|
15018
|
+
|
|
15019
|
+
<div className="space-y-4">
|
|
15020
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
15021
|
+
Many devices — desktop, mobile, tablet, with revoke all
|
|
15022
|
+
</p>
|
|
15023
|
+
<div className="w-96">
|
|
15024
|
+
<ActiveSessionsCard
|
|
15025
|
+
sessions={[
|
|
15026
|
+
{
|
|
15027
|
+
id: "sess_current",
|
|
15028
|
+
browser: "Chrome 129 on macOS",
|
|
15029
|
+
location: "San Francisco, CA",
|
|
15030
|
+
lastSeen: new Date().toISOString(),
|
|
15031
|
+
isCurrent: true,
|
|
15032
|
+
device: "desktop",
|
|
15033
|
+
},
|
|
15034
|
+
{
|
|
15035
|
+
id: "sess_2",
|
|
15036
|
+
browser: "Safari 18 on iOS",
|
|
15037
|
+
location: "Chicago, IL",
|
|
15038
|
+
lastSeen: new Date(Date.now() - 30 * 60 * 1000).toISOString(),
|
|
15039
|
+
device: "mobile",
|
|
15040
|
+
},
|
|
15041
|
+
{
|
|
15042
|
+
id: "sess_3",
|
|
15043
|
+
browser: "Safari 18 on iPadOS",
|
|
15044
|
+
location: "New York, NY",
|
|
15045
|
+
lastSeen: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString(),
|
|
15046
|
+
device: "tablet",
|
|
15047
|
+
},
|
|
15048
|
+
{
|
|
15049
|
+
id: "sess_4",
|
|
15050
|
+
browser: "Firefox 130 on Ubuntu",
|
|
15051
|
+
location: "Austin, TX",
|
|
15052
|
+
lastSeen: new Date(Date.now() - 8 * 24 * 60 * 60 * 1000).toISOString(),
|
|
15053
|
+
device: "desktop",
|
|
15054
|
+
},
|
|
15055
|
+
]}
|
|
15056
|
+
onRevoke={(id) => console.log("Revoke:", id)}
|
|
15057
|
+
onRevokeAll={() => console.log("Revoke all")}
|
|
15058
|
+
/>
|
|
15059
|
+
</div>
|
|
15060
|
+
</div>
|
|
15061
|
+
</div>
|
|
15062
|
+
);
|
|
15063
|
+
}
|
|
15064
|
+
|
|
15065
|
+
function DomainVerificationCardShowcase() {
|
|
15066
|
+
return (
|
|
15067
|
+
<div className="space-y-8">
|
|
15068
|
+
<p className="text-sm text-muted-foreground">
|
|
15069
|
+
Custom domain setup and verification card — DNS record display (CNAME/TXT/A/MX)
|
|
15070
|
+
with copy-to-clipboard, status badge (pending/verifying/verified/failed), and
|
|
15071
|
+
verify/remove actions. Status is never conveyed by color alone. Sources: Vercel
|
|
15072
|
+
custom domains, GitHub Pages, Linear workspace domain, Stripe custom email domain,
|
|
15073
|
+
Resend domain verification (5 cross-system sources).
|
|
15074
|
+
</p>
|
|
15075
|
+
|
|
15076
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
|
|
15077
|
+
<div className="space-y-2">
|
|
15078
|
+
<p className="text-xs font-medium text-muted-foreground">Pending — CNAME record</p>
|
|
15079
|
+
<DomainVerificationCard
|
|
15080
|
+
domain="mail.northwindhealth.io"
|
|
15081
|
+
status="pending"
|
|
15082
|
+
records={[
|
|
15083
|
+
{ type: "CNAME", name: "_bads", value: "verify.bads.io", ttl: "86400" },
|
|
15084
|
+
]}
|
|
15085
|
+
onVerify={() => {}}
|
|
15086
|
+
onRemove={() => {}}
|
|
15087
|
+
/>
|
|
15088
|
+
</div>
|
|
15089
|
+
|
|
15090
|
+
<div className="space-y-2">
|
|
15091
|
+
<p className="text-xs font-medium text-muted-foreground">Verified — domain confirmed</p>
|
|
15092
|
+
<DomainVerificationCard
|
|
15093
|
+
domain="app.meridianpayments.com"
|
|
15094
|
+
status="verified"
|
|
15095
|
+
records={[
|
|
15096
|
+
{ type: "CNAME", name: "_bads", value: "verify.bads.io", ttl: "86400" },
|
|
15097
|
+
]}
|
|
15098
|
+
onVerify={() => {}}
|
|
15099
|
+
onRemove={() => {}}
|
|
15100
|
+
/>
|
|
15101
|
+
</div>
|
|
15102
|
+
|
|
15103
|
+
<div className="space-y-2">
|
|
15104
|
+
<p className="text-xs font-medium text-muted-foreground">Failed — DNS mismatch</p>
|
|
15105
|
+
<DomainVerificationCard
|
|
15106
|
+
domain="fieldnotelabs.io"
|
|
15107
|
+
status="failed"
|
|
15108
|
+
records={[
|
|
15109
|
+
{ type: "TXT", name: "@", value: "v=spf1 include:_spf.bads.io ~all", ttl: "86400" },
|
|
15110
|
+
]}
|
|
15111
|
+
onVerify={() => {}}
|
|
15112
|
+
onRemove={() => {}}
|
|
15113
|
+
/>
|
|
15114
|
+
</div>
|
|
15115
|
+
|
|
15116
|
+
<div className="space-y-2">
|
|
15117
|
+
<p className="text-xs font-medium text-muted-foreground">Multiple records — SPF, DKIM, DMARC, MX</p>
|
|
15118
|
+
<DomainVerificationCard
|
|
15119
|
+
domain="mail.northwindhealth.io"
|
|
15120
|
+
status="pending"
|
|
15121
|
+
records={[
|
|
15122
|
+
{ type: "TXT", name: "@", value: "v=spf1 include:_spf.bads.io ~all", ttl: "86400" },
|
|
15123
|
+
{ type: "TXT", name: "bads._domainkey", value: "bads-verification=a1b2c3d4e5f6", ttl: "86400" },
|
|
15124
|
+
{ type: "TXT", name: "_dmarc", value: "v=DMARC1; p=quarantine; rua=mailto:dmarc@northwindhealth.io", ttl: "3600" },
|
|
15125
|
+
{ type: "MX", name: "@", value: "inbound-smtp.bads.io", ttl: "300" },
|
|
15126
|
+
]}
|
|
15127
|
+
onVerify={() => {}}
|
|
15128
|
+
onRemove={() => {}}
|
|
15129
|
+
/>
|
|
15130
|
+
</div>
|
|
15131
|
+
</div>
|
|
15132
|
+
</div>
|
|
15133
|
+
);
|
|
15134
|
+
}
|
|
15135
|
+
|
|
15136
|
+
function NotificationPreferencesCardShowcase() {
|
|
15137
|
+
return (
|
|
15138
|
+
<div className="space-y-8">
|
|
15139
|
+
<p className="text-sm text-muted-foreground">
|
|
15140
|
+
Notification preference matrix card — rows are notification types
|
|
15141
|
+
(mentions, comments, deploys, billing, security alerts), columns are
|
|
15142
|
+
delivery channels (email, push, Slack, SMS). Each intersection is a
|
|
15143
|
+
Switch toggle. Column headers use sr-only text. Sources: GitHub, Vercel,
|
|
15144
|
+
Linear, Stripe, Notion notification settings (5 cross-system sources).
|
|
15145
|
+
</p>
|
|
15146
|
+
|
|
15147
|
+
<div className="space-y-4">
|
|
15148
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
15149
|
+
Default — email + push (2 channels)
|
|
15150
|
+
</p>
|
|
15151
|
+
<div className="w-96">
|
|
15152
|
+
<NotificationPreferencesCard
|
|
15153
|
+
preferences={[
|
|
15154
|
+
{ key: "mentions", label: "Mentions", description: "When someone @mentions you", enabledChannels: ["email", "push"] },
|
|
15155
|
+
{ key: "comments", label: "Comments", description: "New comments on your items", enabledChannels: ["email"] },
|
|
15156
|
+
{ key: "deploys", label: "Deploys", description: "Deployment started, succeeded, or failed", enabledChannels: [] },
|
|
15157
|
+
{ key: "billing", label: "Billing", description: "Invoices and payment alerts", enabledChannels: ["email"] },
|
|
15158
|
+
]}
|
|
15159
|
+
channels={["email", "push"]}
|
|
15160
|
+
/>
|
|
15161
|
+
</div>
|
|
15162
|
+
</div>
|
|
15163
|
+
|
|
15164
|
+
<div className="space-y-4">
|
|
15165
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
15166
|
+
Three channels — email + push + Slack, with save action
|
|
15167
|
+
</p>
|
|
15168
|
+
<div className="w-[28rem]">
|
|
15169
|
+
<NotificationPreferencesCard
|
|
15170
|
+
preferences={[
|
|
15171
|
+
{ key: "mentions", label: "Mentions", description: "When someone @mentions you", enabledChannels: ["email", "push", "slack"] },
|
|
15172
|
+
{ key: "comments", label: "Comments", description: "New comments on your items", enabledChannels: ["email", "push"] },
|
|
15173
|
+
{ key: "deploys", label: "Deploys", description: "Deployment started, succeeded, or failed", enabledChannels: ["slack"] },
|
|
15174
|
+
{ key: "billing", label: "Billing", description: "Invoices, receipts, and payment alerts", enabledChannels: ["email"] },
|
|
15175
|
+
{ key: "security-alerts", label: "Security alerts", description: "New sign-ins and suspicious activity", enabledChannels: ["email", "push", "slack"] },
|
|
15176
|
+
]}
|
|
15177
|
+
channels={["email", "push", "slack"]}
|
|
15178
|
+
onSave={() => {}}
|
|
15179
|
+
/>
|
|
15180
|
+
</div>
|
|
15181
|
+
</div>
|
|
15182
|
+
|
|
15183
|
+
<div className="space-y-4">
|
|
15184
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
15185
|
+
All off — zero enabled channels (fresh account / reset state)
|
|
15186
|
+
</p>
|
|
15187
|
+
<div className="w-96">
|
|
15188
|
+
<NotificationPreferencesCard
|
|
15189
|
+
preferences={[
|
|
15190
|
+
{ key: "mentions", label: "Mentions", description: "When someone @mentions you", enabledChannels: [] },
|
|
15191
|
+
{ key: "comments", label: "Comments", description: "New comments on your items", enabledChannels: [] },
|
|
15192
|
+
{ key: "deploys", label: "Deploys", description: "Deployment started, succeeded, or failed", enabledChannels: [] },
|
|
15193
|
+
{ key: "billing", label: "Billing", description: "Invoices and payment alerts", enabledChannels: [] },
|
|
15194
|
+
]}
|
|
15195
|
+
channels={["email", "push", "slack"]}
|
|
15196
|
+
/>
|
|
15197
|
+
</div>
|
|
15198
|
+
</div>
|
|
15199
|
+
</div>
|
|
15200
|
+
);
|
|
15201
|
+
}
|
|
15202
|
+
|
|
15203
|
+
function InlineEditShowcase() {
|
|
15204
|
+
const [name, setName] = React.useState("Evelyn Nakamura")
|
|
15205
|
+
const [title, setTitle] = React.useState("Senior Product Designer")
|
|
15206
|
+
return (
|
|
15207
|
+
<div className="space-y-8">
|
|
15208
|
+
<p className="text-sm text-muted-foreground">
|
|
15209
|
+
Ghost variant — blends with ambient text; edit affordance revealed on
|
|
15210
|
+
hover. Confirm with Enter or blur; cancel with Escape.
|
|
15211
|
+
</p>
|
|
15212
|
+
<div className="flex w-80 flex-col gap-2">
|
|
15213
|
+
<p className="text-xs font-medium text-muted-foreground">Ghost (default)</p>
|
|
15214
|
+
<InlineEdit defaultValue="Click to rename this project" />
|
|
15215
|
+
</div>
|
|
15216
|
+
<div className="flex w-80 flex-col gap-2">
|
|
15217
|
+
<p className="text-xs font-medium text-muted-foreground">Outline</p>
|
|
15218
|
+
<InlineEdit variant="outline" defaultValue="Outline variant" />
|
|
15219
|
+
</div>
|
|
15220
|
+
<div className="flex w-80 flex-col gap-2">
|
|
15221
|
+
<p className="text-xs font-medium text-muted-foreground">Sizes — sm / default / lg</p>
|
|
15222
|
+
<InlineEdit size="sm" defaultValue="Small (h-8)" />
|
|
15223
|
+
<InlineEdit size="default" defaultValue="Default (h-9)" />
|
|
15224
|
+
<InlineEdit size="lg" defaultValue="Large (h-10)" />
|
|
15225
|
+
</div>
|
|
15226
|
+
<div className="flex w-80 flex-col gap-2">
|
|
15227
|
+
<p className="text-xs font-medium text-muted-foreground">Disabled</p>
|
|
15228
|
+
<InlineEdit disabled defaultValue="Cannot be edited" />
|
|
15229
|
+
</div>
|
|
15230
|
+
<div className="flex w-80 flex-col gap-2">
|
|
15231
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
15232
|
+
Realistic use — user profile editor
|
|
15233
|
+
</p>
|
|
15234
|
+
<div className="rounded-lg border p-4">
|
|
15235
|
+
<div className="flex flex-col gap-1">
|
|
15236
|
+
<span className="text-xs text-muted-foreground">Name</span>
|
|
15237
|
+
<InlineEdit value={name} onConfirm={setName} variant="outline" />
|
|
15238
|
+
</div>
|
|
15239
|
+
<div className="mt-3 flex flex-col gap-1">
|
|
15240
|
+
<span className="text-xs text-muted-foreground">Title</span>
|
|
15241
|
+
<InlineEdit value={title} onConfirm={setTitle} variant="outline" />
|
|
15242
|
+
</div>
|
|
15243
|
+
</div>
|
|
15244
|
+
</div>
|
|
15245
|
+
</div>
|
|
15246
|
+
)
|
|
15247
|
+
}
|
|
15248
|
+
|
|
15249
|
+
function OTPInputShowcase() {
|
|
15250
|
+
const [value, setValue] = React.useState("")
|
|
15251
|
+
const [status, setStatus] = React.useState<"idle" | "verifying" | "success" | "error">("idle")
|
|
15252
|
+
|
|
15253
|
+
function handleComplete(v: string) {
|
|
15254
|
+
setStatus("verifying")
|
|
15255
|
+
setTimeout(() => {
|
|
15256
|
+
setStatus(v === "000000" ? "error" : "success")
|
|
15257
|
+
}, 800)
|
|
15258
|
+
}
|
|
15259
|
+
|
|
15260
|
+
return (
|
|
15261
|
+
<div className="space-y-8">
|
|
15262
|
+
<p className="text-sm text-muted-foreground">
|
|
15263
|
+
Individual character slots with auto-advance, backspace-retreat, and
|
|
15264
|
+
paste support. Use for 2FA codes, email confirmation, and invite codes.
|
|
15265
|
+
</p>
|
|
15266
|
+
<div className="flex flex-col gap-3">
|
|
15267
|
+
<p className="text-xs font-medium text-muted-foreground">Sizes — sm / default / lg</p>
|
|
15268
|
+
<OTPInput length={6} size="sm" aria-label="Small OTP" />
|
|
15269
|
+
<OTPInput length={6} size="default" aria-label="Default OTP" />
|
|
15270
|
+
<OTPInput length={6} size="lg" aria-label="Large OTP" />
|
|
15271
|
+
</div>
|
|
15272
|
+
<div className="flex flex-col gap-3">
|
|
15273
|
+
<p className="text-xs font-medium text-muted-foreground">With separator (groups of 3)</p>
|
|
15274
|
+
<OTPInput length={6} separatorAfter={2} aria-label="OTP with separator" />
|
|
15275
|
+
</div>
|
|
15276
|
+
<div className="flex flex-col gap-3">
|
|
15277
|
+
<p className="text-xs font-medium text-muted-foreground">States — disabled / invalid</p>
|
|
15278
|
+
<OTPInput length={6} value="123456" disabled aria-label="Disabled OTP" />
|
|
15279
|
+
<OTPInput length={6} value="12345" invalid aria-label="Invalid OTP" />
|
|
15280
|
+
</div>
|
|
15281
|
+
<div className="flex flex-col items-start gap-3">
|
|
15282
|
+
<p className="text-xs font-medium text-muted-foreground">Realistic use — 2FA verification</p>
|
|
15283
|
+
<div className="rounded-lg border p-6">
|
|
15284
|
+
<div className="flex flex-col items-center gap-4 text-center">
|
|
15285
|
+
<div className="space-y-1">
|
|
15286
|
+
<p className="text-sm font-medium">Enter verification code</p>
|
|
15287
|
+
<p className="text-sm text-muted-foreground">Sent to elara.voss@designcraft.co</p>
|
|
15288
|
+
</div>
|
|
15289
|
+
<OTPInput
|
|
15290
|
+
value={value}
|
|
15291
|
+
onChange={(v) => { setValue(v); if (status !== "idle") setStatus("idle") }}
|
|
15292
|
+
onComplete={handleComplete}
|
|
15293
|
+
separatorAfter={2}
|
|
15294
|
+
invalid={status === "error"}
|
|
15295
|
+
disabled={status === "verifying" || status === "success"}
|
|
15296
|
+
aria-label="Email verification code"
|
|
15297
|
+
/>
|
|
15298
|
+
{status === "verifying" && <p className="text-sm text-muted-foreground">Verifying…</p>}
|
|
15299
|
+
{status === "success" && <p className="text-sm text-green-600 dark:text-green-400">Verified successfully</p>}
|
|
15300
|
+
{status === "error" && <p className="text-sm text-destructive">Incorrect code. Try again.</p>}
|
|
15301
|
+
</div>
|
|
15302
|
+
</div>
|
|
15303
|
+
</div>
|
|
15304
|
+
</div>
|
|
15305
|
+
)
|
|
15306
|
+
}
|
|
15307
|
+
|
|
15308
|
+
function CollapsibleShowcase() {
|
|
15309
|
+
const [open, setOpen] = React.useState(false)
|
|
15310
|
+
return (
|
|
15311
|
+
<div className="flex flex-col gap-6">
|
|
15312
|
+
<div className="flex flex-col items-start gap-3">
|
|
15313
|
+
<p className="text-xs font-medium text-muted-foreground">Default — closed, one disclosure</p>
|
|
15314
|
+
<Collapsible className="w-full max-w-md rounded-lg border p-4">
|
|
15315
|
+
<CollapsibleTrigger asChild>
|
|
15316
|
+
<Button variant="ghost" size="xl" className="group w-full justify-between px-3">
|
|
15317
|
+
What changed in this release
|
|
15318
|
+
<ChevronDownIcon strokeWidth={1.5} className="size-5 transition-transform group-data-[state=open]:rotate-180" />
|
|
15319
|
+
</Button>
|
|
15320
|
+
</CollapsibleTrigger>
|
|
15321
|
+
<CollapsibleContent className="px-3 pt-2 text-sm text-muted-foreground">
|
|
15322
|
+
Variants and sizes now match the registry, upload rejections are announced to screen readers, and
|
|
15323
|
+
the date fields stay controlled when they start empty.
|
|
15324
|
+
</CollapsibleContent>
|
|
15325
|
+
</Collapsible>
|
|
15326
|
+
</div>
|
|
15327
|
+
<div className="flex flex-col items-start gap-3">
|
|
15328
|
+
<p className="text-xs font-medium text-muted-foreground">Open by default</p>
|
|
15329
|
+
<Collapsible defaultOpen className="w-full max-w-md rounded-lg border p-4">
|
|
15330
|
+
<CollapsibleTrigger asChild>
|
|
15331
|
+
<Button variant="ghost" size="xl" className="group w-full justify-between px-3">
|
|
15332
|
+
Accessibility floor
|
|
15333
|
+
<ChevronDownIcon strokeWidth={1.5} className="size-5 transition-transform group-data-[state=open]:rotate-180" />
|
|
15334
|
+
</Button>
|
|
15335
|
+
</CollapsibleTrigger>
|
|
15336
|
+
<CollapsibleContent className="px-3 pt-2 text-sm text-muted-foreground">
|
|
15337
|
+
7:1 text contrast, 44px touch targets, and a visible focus ring on every control.
|
|
15338
|
+
</CollapsibleContent>
|
|
15339
|
+
</Collapsible>
|
|
15340
|
+
</div>
|
|
15341
|
+
<div className="flex flex-col items-start gap-3">
|
|
15342
|
+
<p className="text-xs font-medium text-muted-foreground">Disabled</p>
|
|
15343
|
+
<Collapsible disabled className="w-full max-w-md rounded-lg border p-4">
|
|
15344
|
+
<CollapsibleTrigger asChild>
|
|
15345
|
+
<Button variant="ghost" size="xl" className="group w-full justify-between px-3" disabled>
|
|
15346
|
+
Details unavailable
|
|
15347
|
+
<ChevronDownIcon strokeWidth={1.5} className="size-5" />
|
|
15348
|
+
</Button>
|
|
15349
|
+
</CollapsibleTrigger>
|
|
15350
|
+
<CollapsibleContent className="px-3 pt-2 text-sm text-muted-foreground">Hidden.</CollapsibleContent>
|
|
15351
|
+
</Collapsible>
|
|
15352
|
+
</div>
|
|
15353
|
+
<div className="flex flex-col items-start gap-3">
|
|
15354
|
+
<p className="text-xs font-medium text-muted-foreground">Realistic use — controlled, with a count</p>
|
|
15355
|
+
<Collapsible open={open} onOpenChange={setOpen} className="w-full max-w-md rounded-lg border p-4">
|
|
15356
|
+
<div className="flex items-center justify-between gap-3">
|
|
15357
|
+
<p className="text-sm font-medium">3 reviews waiting on you</p>
|
|
15358
|
+
<CollapsibleTrigger asChild>
|
|
15359
|
+
<Button variant="outline" size="xl">
|
|
15360
|
+
{open ? "Hide details" : "Show details"}
|
|
15361
|
+
</Button>
|
|
15362
|
+
</CollapsibleTrigger>
|
|
15363
|
+
</div>
|
|
15364
|
+
<CollapsibleContent className="mt-3 flex flex-col gap-2 text-sm text-muted-foreground">
|
|
15365
|
+
<p>Priya Nair: table row spacing at the dense size.</p>
|
|
15366
|
+
<p>Theo Okafor: focus ring on the date field.</p>
|
|
15367
|
+
<p>Seo-yun Park: new variant for the tag primitive.</p>
|
|
15368
|
+
</CollapsibleContent>
|
|
15369
|
+
</Collapsible>
|
|
15370
|
+
</div>
|
|
15371
|
+
</div>
|
|
15372
|
+
)
|
|
15373
|
+
}
|