banhaten 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/CONTRIBUTING.md +44 -0
- package/README.md +145 -328
- package/SECURITY.md +15 -0
- package/banhaten.config.example.json +1 -3
- package/docs/design-system/README.md +20 -0
- package/docs/design-system/adoption-quality-remediation.md +87 -0
- package/docs/design-system/agent-usage.md +13 -0
- package/docs/design-system/appearance-presets.md +189 -0
- package/docs/design-system/appearances/default.md +94 -0
- package/docs/design-system/appearances/rounded.md +95 -0
- package/docs/design-system/appearances/sharp.md +95 -0
- package/docs/design-system/component-docs-pattern.md +81 -0
- package/docs/design-system/component-showcase-consistency-report.md +217 -0
- package/docs/design-system/component-token-consistency-audit.md +173 -0
- package/docs/design-system/components/README.md +75 -0
- package/docs/design-system/components/accordion.md +67 -0
- package/docs/design-system/components/activity-feed.md +106 -0
- package/docs/design-system/components/alert-dialog.md +87 -0
- package/docs/design-system/components/alert.md +111 -0
- package/docs/design-system/components/aspect-ratio.md +59 -0
- package/docs/design-system/components/attribute.md +103 -0
- package/docs/design-system/components/autocomplete.md +93 -0
- package/docs/design-system/components/avatar.md +70 -0
- package/docs/design-system/components/badge.md +72 -0
- package/docs/design-system/components/banner.md +99 -0
- package/docs/design-system/components/breadcrumbs.md +188 -0
- package/docs/design-system/components/button-group.md +117 -0
- package/docs/design-system/components/button.md +95 -0
- package/docs/design-system/components/card.md +95 -0
- package/docs/design-system/components/carousel.md +61 -0
- package/docs/design-system/components/catalog-components.md +59 -0
- package/docs/design-system/components/chart.md +58 -0
- package/docs/design-system/components/checkbox.md +68 -0
- package/docs/design-system/components/collapsible.md +63 -0
- package/docs/design-system/components/command.md +75 -0
- package/docs/design-system/components/context-menu.md +59 -0
- package/docs/design-system/components/date-picker.md +97 -0
- package/docs/design-system/components/divider.md +117 -0
- package/docs/design-system/components/empty-state.md +72 -0
- package/docs/design-system/components/field.md +86 -0
- package/docs/design-system/components/file-upload.md +199 -0
- package/docs/design-system/components/hover-card.md +61 -0
- package/docs/design-system/components/icons.md +48 -0
- package/docs/design-system/components/input-group.md +73 -0
- package/docs/design-system/components/input-otp.md +73 -0
- package/docs/design-system/components/input.md +84 -0
- package/docs/design-system/components/item.md +72 -0
- package/docs/design-system/components/kbd.md +62 -0
- package/docs/design-system/components/label.md +64 -0
- package/docs/design-system/components/menu.md +76 -0
- package/docs/design-system/components/menubar.md +60 -0
- package/docs/design-system/components/modal.md +119 -0
- package/docs/design-system/components/native-select.md +70 -0
- package/docs/design-system/components/navigation-menu.md +63 -0
- package/docs/design-system/components/onboarding-step-list-item.md +94 -0
- package/docs/design-system/components/page-header.md +98 -0
- package/docs/design-system/components/pagination.md +71 -0
- package/docs/design-system/components/popover.md +77 -0
- package/docs/design-system/components/progress-slider.md +66 -0
- package/docs/design-system/components/progress.md +92 -0
- package/docs/design-system/components/radio-card.md +65 -0
- package/docs/design-system/components/radio-group.md +72 -0
- package/docs/design-system/components/resizable.md +57 -0
- package/docs/design-system/components/scroll-area.md +60 -0
- package/docs/design-system/components/segmented-control.md +71 -0
- package/docs/design-system/components/select.md +87 -0
- package/docs/design-system/components/sheet.md +82 -0
- package/docs/design-system/components/sidebar.md +83 -0
- package/docs/design-system/components/skeleton.md +91 -0
- package/docs/design-system/components/slideout.md +77 -0
- package/docs/design-system/components/slider.md +81 -0
- package/docs/design-system/components/social-button.md +65 -0
- package/docs/design-system/components/spinner.md +77 -0
- package/docs/design-system/components/steps.md +77 -0
- package/docs/design-system/components/table.md +411 -0
- package/docs/design-system/components/tabs.md +69 -0
- package/docs/design-system/components/tag.md +95 -0
- package/docs/design-system/components/textarea.md +64 -0
- package/docs/design-system/components/timeline.md +95 -0
- package/docs/design-system/components/toast.md +73 -0
- package/docs/design-system/components/toggle.md +96 -0
- package/docs/design-system/components/toolbar.md +105 -0
- package/docs/design-system/components/tooltip.md +107 -0
- package/docs/design-system/components/typography.md +18 -0
- package/docs/design-system/density-and-elevation.md +44 -0
- package/docs/design-system/design-system-test-missing-items.md +368 -0
- package/docs/design-system/direction-and-localization.md +23 -0
- package/docs/design-system/form-recipes.md +73 -0
- package/docs/design-system/gap-promotion-policy.md +21 -0
- package/docs/design-system/gap-promotion-report.md +166 -0
- package/docs/design-system/icons.md +69 -0
- package/docs/design-system/installation.md +68 -0
- package/docs/design-system/launch-comparison-shadcn.md +98 -0
- package/docs/design-system/registry-and-cli.md +64 -0
- package/docs/design-system/release-policy.md +30 -0
- package/docs/design-system/roadmap.md +14 -0
- package/docs/design-system/support-matrix.md +23 -0
- package/docs/design-system/tabs.md +53 -0
- package/docs/design-system/token-governance.md +60 -0
- package/package.json +97 -65
- package/registry/component-contract.json +40 -0
- package/registry/components/alert-dialog.tsx +297 -0
- package/registry/components/alert.tsx +86 -65
- package/registry/components/aspect-ratio.tsx +30 -0
- package/registry/components/autocomplete.tsx +23 -9
- package/registry/components/avatar.tsx +7 -7
- package/registry/components/badge.tsx +1 -1
- package/registry/components/button-group.tsx +321 -4
- package/registry/components/button.tsx +38 -17
- package/registry/components/card.tsx +68 -59
- package/registry/components/carousel.tsx +282 -0
- package/registry/components/chart.tsx +203 -0
- package/registry/components/checkbox.tsx +3 -3
- package/registry/components/collapsible.tsx +69 -0
- package/registry/components/command.tsx +174 -0
- package/registry/components/context-menu.tsx +236 -0
- package/registry/components/date-picker.tsx +246 -105
- package/registry/components/expanded/ActivityFeed.tsx +6 -15
- package/registry/components/expanded/Banner.tsx +3 -3
- package/registry/components/expanded/Breadcrumbs.tsx +5 -5
- package/registry/components/expanded/CatalogComponentsShowcase.tsx +13 -13
- package/registry/components/expanded/CatalogDivider.tsx +1 -1
- package/registry/components/expanded/EmptyState.tsx +1 -1
- package/registry/components/expanded/FileUpload.tsx +9 -2
- package/registry/components/expanded/OnboardingStepListItem.tsx +2 -4
- package/registry/components/expanded/PageHeader.tsx +14 -14
- package/registry/components/expanded/Slideout.tsx +15 -415
- package/registry/components/expanded/Steps.tsx +4 -4
- package/registry/components/expanded/Table.tsx +116 -69
- package/registry/components/expanded/Timeline.tsx +3 -3
- package/registry/components/expanded/activityFeed.css +1 -1
- package/registry/components/expanded/breadcrumbs.css +139 -139
- package/registry/components/expanded/catalogComponentsShowcase.css +83 -83
- package/registry/components/expanded/divider.css +1 -1
- package/registry/components/expanded/emptyState.css +1 -1
- package/registry/components/expanded/fileUpload.css +6 -6
- package/registry/components/expanded/slideout.css +9 -685
- package/registry/components/expanded/steps.css +274 -274
- package/registry/components/expanded/table.css +2 -2
- package/registry/components/expanded/timeline.css +264 -264
- package/registry/components/field.tsx +230 -0
- package/registry/components/hover-card.tsx +48 -0
- package/registry/components/input-content.ts +1 -0
- package/registry/components/input-group.tsx +130 -0
- package/registry/components/input-otp.tsx +13 -3
- package/registry/components/input.tsx +70 -45
- package/registry/components/item.tsx +189 -0
- package/registry/components/kbd.tsx +151 -0
- package/registry/components/label.tsx +78 -0
- package/registry/components/menu.tsx +34 -246
- package/registry/components/menubar.tsx +226 -0
- package/registry/components/modal.tsx +216 -143
- package/registry/components/native-select.tsx +205 -0
- package/registry/components/navigation-menu.tsx +171 -0
- package/registry/components/pagination.tsx +80 -58
- package/registry/components/popover.tsx +162 -664
- package/registry/components/radio-card.tsx +116 -87
- package/registry/components/radio-group.tsx +1 -1
- package/registry/components/resizable.tsx +74 -0
- package/registry/components/scroll-area.tsx +67 -0
- package/registry/components/segmented-control.tsx +87 -0
- package/registry/components/select-content.tsx +2 -2
- package/registry/components/select.tsx +54 -20
- package/registry/components/sheet.tsx +305 -0
- package/registry/components/sidebar.tsx +352 -0
- package/registry/components/skeleton.css +0 -3
- package/registry/components/social-button.tsx +116 -30
- package/registry/components/spinner.tsx +18 -55
- package/registry/components/{expanded/tabs.css → tabs.css} +127 -106
- package/registry/components/tabs.tsx +246 -0
- package/registry/components/tag.tsx +2 -2
- package/registry/components/textarea.tsx +4 -4
- package/registry/components/toast.tsx +136 -0
- package/registry/components/toggle.tsx +2 -2
- package/registry/components/toolbar.tsx +89 -17
- package/registry/components/tooltip.tsx +1 -1
- package/registry/examples/alert-demo.tsx +25 -5
- package/registry/examples/alert-dialog-demo.tsx +42 -0
- package/registry/examples/aspect-ratio-demo.tsx +11 -0
- package/registry/examples/attribute-demo.tsx +1 -1
- package/registry/examples/autocomplete-demo.tsx +3 -3
- package/registry/examples/avatar-demo.tsx +7 -7
- package/registry/examples/badge-demo.tsx +1 -1
- package/registry/examples/button-demo.tsx +6 -6
- package/registry/examples/button-group-demo.tsx +23 -2
- package/registry/examples/card-demo.tsx +46 -8
- package/registry/examples/carousel-demo.tsx +43 -0
- package/registry/examples/chart-demo.tsx +33 -0
- package/registry/examples/checkbox-demo.tsx +5 -5
- package/registry/examples/collapsible-demo.tsx +16 -0
- package/registry/examples/collection-filter-bar-demo.tsx +135 -0
- package/registry/examples/command-demo.tsx +42 -0
- package/registry/examples/{expanded/command-bar-demo.tsx → command-palette-demo.tsx} +5 -15
- package/registry/examples/context-menu-demo.tsx +29 -0
- package/registry/examples/control-density-contract-demo.tsx +61 -0
- package/registry/examples/date-picker-demo.tsx +12 -12
- package/registry/examples/divider-demo.tsx +3 -3
- package/registry/examples/expanded/banner-demo.tsx +1 -1
- package/registry/examples/expanded/breadcrumbs-demo.tsx +1 -1
- package/registry/examples/expanded/empty-state-demo.tsx +1 -1
- package/registry/examples/expanded/file-upload-demo.tsx +1 -1
- package/registry/examples/expanded/onboarding-step-demo.tsx +1 -1
- package/registry/examples/expanded/slideout-demo.tsx +2 -2
- package/registry/examples/expanded/steps-demo.tsx +1 -1
- package/registry/examples/expanded/tabs-demo.tsx +2 -2
- package/registry/examples/expanded/timeline-demo.tsx +1 -1
- package/registry/examples/field-demo.tsx +51 -0
- package/registry/examples/hover-card-demo.tsx +23 -0
- package/registry/examples/input-demo.tsx +6 -6
- package/registry/examples/input-group-demo.tsx +16 -0
- package/registry/examples/input-otp-demo.tsx +4 -4
- package/registry/examples/item-demo.tsx +46 -0
- package/registry/examples/kbd-demo.tsx +11 -0
- package/registry/examples/label-demo.tsx +20 -0
- package/registry/examples/menu-demo.tsx +1 -1
- package/registry/examples/menubar-demo.tsx +34 -0
- package/registry/examples/modal-demo.tsx +67 -9
- package/registry/examples/native-select-demo.tsx +16 -0
- package/registry/examples/navigation-menu-demo.tsx +29 -0
- package/registry/examples/pagination-demo.tsx +6 -3
- package/registry/examples/popover-demo.tsx +19 -19
- package/registry/examples/progress-demo.tsx +1 -1
- package/registry/examples/progress-slider-demo.tsx +1 -1
- package/registry/examples/radio-card-demo.tsx +4 -4
- package/registry/examples/radio-group-demo.tsx +2 -2
- package/registry/examples/resizable-demo.tsx +22 -0
- package/registry/examples/results-toolbar-demo.tsx +44 -0
- package/registry/examples/scroll-area-demo.tsx +15 -0
- package/registry/examples/segmented-control-demo.tsx +39 -0
- package/registry/examples/select-demo.tsx +1 -1
- package/registry/examples/sheet-demo.tsx +47 -0
- package/registry/examples/sidebar-demo.tsx +55 -0
- package/registry/examples/slider-demo.tsx +3 -3
- package/registry/examples/social-button-demo.tsx +18 -8
- package/registry/examples/spinner-demo.tsx +13 -13
- package/registry/examples/tabs-demo.tsx +13 -0
- package/registry/examples/tag-demo.tsx +1 -1
- package/registry/examples/textarea-demo.tsx +4 -4
- package/registry/examples/toast-demo.tsx +35 -0
- package/registry/examples/toggle-demo.tsx +6 -6
- package/registry/examples/tooltip-demo.tsx +4 -4
- package/registry/guidance/USAGE.md +27 -0
- package/registry/hooks/use-direction.ts +193 -13
- package/registry/index.json +6010 -432
- package/registry/styles/globals.css +3112 -4690
- package/registry.json +1582 -0
- package/schema/config.schema.json +51 -0
- package/schema/registry.schema.json +190 -0
- package/schema/tokens.schema.json +163 -0
- package/src/cli/command-line.js +194 -0
- package/src/cli/config-editors.js +9 -0
- package/src/cli/doctor.js +399 -0
- package/src/cli/file-transaction.js +295 -0
- package/src/cli/global-css.js +153 -0
- package/src/cli/index.js +639 -1391
- package/src/cli/install-plan.js +592 -0
- package/src/cli/install-receipt.js +171 -0
- package/src/cli/jsonc.js +203 -0
- package/src/cli/package-install-state.js +254 -0
- package/src/cli/package-manager.js +238 -0
- package/src/cli/package-plan.js +185 -0
- package/src/cli/package-version.js +97 -0
- package/src/cli/registry-query.js +207 -0
- package/src/cli/reporting.js +55 -0
- package/src/cli/schema-validation.js +19 -0
- package/src/cli/source-scanner.js +686 -0
- package/src/cli/vite-config.js +478 -0
- package/tokens/banhaten.tokens.json +4313 -310
- package/registry/assets/avatars/avatar-02.jpg +0 -0
- package/registry/assets/avatars/avatar-03.jpg +0 -0
- package/registry/assets/avatars/avatar-04.jpg +0 -0
- package/registry/assets/avatars/avatar-05.jpg +0 -0
- package/registry/assets/avatars/avatar-06.jpg +0 -0
- package/registry/assets/avatars/avatar-07.jpg +0 -0
- package/registry/assets/avatars/avatar-08.jpg +0 -0
- package/registry/assets/avatars/avatar-09.jpg +0 -0
- package/registry/assets/avatars/avatar-10.jpg +0 -0
- package/registry/assets/avatars/avatar-11.jpg +0 -0
- package/registry/assets/avatars/avatar-12.jpg +0 -0
- package/registry/assets/avatars/avatar-13.jpg +0 -0
- package/registry/assets/avatars/avatar-14.jpg +0 -0
- package/registry/assets/avatars/avatar-15.jpg +0 -0
- package/registry/assets/avatars/avatar-16.jpg +0 -0
- package/registry/assets/avatars/avatar-17.jpg +0 -0
- package/registry/assets/avatars/avatar-18.jpg +0 -0
- package/registry/assets/avatars/avatar-19.jpg +0 -0
- package/registry/assets/avatars/avatar-20.jpg +0 -0
- package/registry/assets/avatars/avatar-21.jpg +0 -0
- package/registry/assets/avatars/avatar-22.jpg +0 -0
- package/registry/assets/avatars/avatar-23.jpg +0 -0
- package/registry/assets/avatars/avatar-24.jpg +0 -0
- package/registry/assets/avatars/avatar-25.jpg +0 -0
- package/registry/assets/avatars/avatar-26.jpg +0 -0
- package/registry/assets/avatars/avatar-27.jpg +0 -0
- package/registry/assets/avatars/avatar-28.jpg +0 -0
- package/registry/assets/avatars/avatar-29.jpg +0 -0
- package/registry/assets/avatars/avatar-30.jpg +0 -0
- package/registry/assets/avatars/avatar-31.jpg +0 -0
- package/registry/assets/avatars/avatar-32.jpg +0 -0
- package/registry/assets/avatars/avatar-33.jpg +0 -0
- package/registry/assets/avatars/avatar-34.jpg +0 -0
- package/registry/assets/avatars/avatar-35.jpg +0 -0
- package/registry/assets/image-assets.json +0 -744
- package/registry/assets/images/art-02.jpg +0 -0
- package/registry/assets/images/art-03.jpg +0 -0
- package/registry/assets/images/art-04.jpg +0 -0
- package/registry/assets/images/art-05.jpg +0 -0
- package/registry/assets/images/art-06.jpg +0 -0
- package/registry/assets/images/art-07.jpg +0 -0
- package/registry/assets/images/art-08.jpg +0 -0
- package/registry/assets/images/art-09.jpg +0 -0
- package/registry/assets/images/art-10.jpg +0 -0
- package/registry/assets/images/art-11.jpg +0 -0
- package/registry/assets/images/art-12.jpg +0 -0
- package/registry/assets/images/art-13.jpg +0 -0
- package/registry/assets/images/art-14.jpg +0 -0
- package/registry/assets/images/art-15.jpg +0 -0
- package/registry/assets/images/art-16.jpg +0 -0
- package/registry/assets/images/art-17.jpg +0 -0
- package/registry/assets/images/art-18.jpg +0 -0
- package/registry/assets/images/art-19.jpg +0 -0
- package/registry/assets/images/art-20.jpg +0 -0
- package/registry/assets/images/art-21.jpg +0 -0
- package/registry/assets/images/art-22.jpg +0 -0
- package/registry/assets/images/art-23.jpg +0 -0
- package/registry/assets/images/art-24.jpg +0 -0
- package/registry/assets/images/art-25.jpg +0 -0
- package/registry/assets/images/art-26.jpg +0 -0
- package/registry/assets/images/art-27.jpg +0 -0
- package/registry/assets/images/nature-01.jpg +0 -0
- package/registry/assets/images/nature-02.jpg +0 -0
- package/registry/assets/images/nature-03.jpg +0 -0
- package/registry/assets/images/nature-04.jpg +0 -0
- package/registry/assets/images/nature-05.jpg +0 -0
- package/registry/assets/images/nature-06.jpg +0 -0
- package/registry/assets/images/nature-07.jpg +0 -0
- package/registry/assets/images/nature-08.jpg +0 -0
- package/registry/assets/images/nature-09.jpg +0 -0
- package/registry/assets/images/nature-10.jpg +0 -0
- package/registry/assets/images/nature-11.jpg +0 -0
- package/registry/assets/images/nature-12.jpg +0 -0
- package/registry/assets/images/nature-13.jpg +0 -0
- package/registry/assets/images/nature-14.jpg +0 -0
- package/registry/assets/images/nature-15.jpg +0 -0
- package/registry/assets/images/nature-16.jpg +0 -0
- package/registry/assets/images/nature-17.jpg +0 -0
- package/registry/assets/images/nature-18.jpg +0 -0
- package/registry/assets/images/nature-19.jpg +0 -0
- package/registry/assets/images/nature-20.jpg +0 -0
- package/registry/components/expanded/BannerBoard.tsx +0 -225
- package/registry/components/expanded/CatalogTag.tsx +0 -85
- package/registry/components/expanded/CommandBar.tsx +0 -386
- package/registry/components/expanded/IconExplorer.tsx +0 -612
- package/registry/components/expanded/Tabs.tsx +0 -86
- package/registry/components/expanded/TimelineShowcase.tsx +0 -158
- package/registry/components/expanded/commandBar.css +0 -470
- package/registry/components/expanded/iconExplorer.css +0 -764
- package/registry/components/expanded/iconPacks.ts +0 -866
- package/registry/components/expanded/tag.css +0 -148
- package/registry/examples/expanded/icons-demo.tsx +0 -5
- package/tokens/Color mode.zip +0 -0
- package/tokens/Numbers.zip +0 -0
- package/tokens/Radius.zip +0 -0
- package/tokens/Theme.zip +0 -0
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useMemo, useState, type CSSProperties, type ReactNode } from "react";
|
|
2
2
|
import {
|
|
3
3
|
ArrowUpDownIcon,
|
|
4
|
-
CheckIcon as LucideCheckIcon,
|
|
5
4
|
EditIcon as LucideEditIcon,
|
|
6
5
|
EllipsisIcon,
|
|
7
6
|
EyeIcon,
|
|
8
7
|
FileIcon as LucideFileIcon,
|
|
9
|
-
MinusIcon,
|
|
10
8
|
Trash2Icon,
|
|
11
9
|
} from "lucide-react";
|
|
12
10
|
import { Pagination, type PaginationPage, type PaginationProps } from "@/components/ui/pagination";
|
|
13
11
|
import { Spinner } from "@/components/ui/spinner";
|
|
12
|
+
import { Avatar as AvatarPrimitive, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
13
|
+
import { Badge } from "@/components/ui/badge";
|
|
14
|
+
import { Button } from "@/components/ui/button";
|
|
15
|
+
import { Checkbox } from "@/components/ui/checkbox";
|
|
16
|
+
import { Progress as ProgressPrimitive } from "@/components/ui/progress";
|
|
17
|
+
import { Tag } from "@/components/ui/tag";
|
|
18
|
+
import { Toggle } from "@/components/ui/toggle";
|
|
14
19
|
import {
|
|
15
20
|
Toolbar,
|
|
16
21
|
ToolbarBadge,
|
|
@@ -65,21 +70,22 @@ export type AvatarItem = {
|
|
|
65
70
|
};
|
|
66
71
|
|
|
67
72
|
export type TableAction = {
|
|
73
|
+
disabled?: boolean;
|
|
68
74
|
icon: "view" | "edit" | "delete" | "more";
|
|
69
75
|
label: string;
|
|
70
76
|
onAction?: () => void;
|
|
71
77
|
};
|
|
72
78
|
|
|
73
79
|
export type TableItem =
|
|
74
|
-
| { type: "checkbox"; checked: boolean; indeterminate?: boolean }
|
|
80
|
+
| { type: "checkbox"; ariaLabel?: string; checked: boolean; disabled?: boolean; indeterminate?: boolean; onCheckedChange?: (checked: boolean) => void }
|
|
75
81
|
| { type: "text"; tone?: "default" | "subtle"; value: string; weight?: "regular" | "medium" }
|
|
76
82
|
| { type: "avatarText"; caption?: string; name: string; src?: string; status?: "top" | "bottom" }
|
|
77
83
|
| { type: "rating"; max?: 5; value: number }
|
|
78
84
|
| { type: "progress"; label?: string; tone?: "success" | "brand"; value: number }
|
|
79
|
-
| { type: "toggle"; checked: boolean; disabled?: boolean }
|
|
85
|
+
| { type: "toggle"; ariaLabel?: string; checked: boolean; disabled?: boolean; onCheckedChange?: (checked: boolean) => void }
|
|
80
86
|
| { type: "badges"; items: BadgeItem[]; maxVisible?: number }
|
|
81
87
|
| { type: "onlyAvatar"; alt: string; src?: string }
|
|
82
|
-
| { type: "avatarStack"; avatars: AvatarItem[]; canAdd?: boolean; count?: number }
|
|
88
|
+
| { type: "avatarStack"; addLabel?: string; avatars: AvatarItem[]; canAdd?: boolean; count?: number; onAdd?: () => void }
|
|
83
89
|
| { type: "tags"; items: string[]; maxVisible?: number }
|
|
84
90
|
| { type: "file"; label?: string }
|
|
85
91
|
| { type: "brandLogoText"; label: string; logoSrc?: string }
|
|
@@ -185,7 +191,7 @@ function cx(...classes: Array<string | false | undefined>) {
|
|
|
185
191
|
|
|
186
192
|
export function Table<Row extends TableRowBase>({
|
|
187
193
|
columns,
|
|
188
|
-
dir
|
|
194
|
+
dir,
|
|
189
195
|
onSelectedRowIdsChange,
|
|
190
196
|
onSortChange,
|
|
191
197
|
rows,
|
|
@@ -311,7 +317,7 @@ export function DataTable<Row extends TableRowBase>({
|
|
|
311
317
|
columns,
|
|
312
318
|
defaultSort = null,
|
|
313
319
|
description,
|
|
314
|
-
dir
|
|
320
|
+
dir,
|
|
315
321
|
emptyState,
|
|
316
322
|
error = false,
|
|
317
323
|
filters = [],
|
|
@@ -752,7 +758,15 @@ function clampNumber(value: number, min: number, max: number) {
|
|
|
752
758
|
function renderTableItem(item: TableItem) {
|
|
753
759
|
switch (item.type) {
|
|
754
760
|
case "checkbox":
|
|
755
|
-
return
|
|
761
|
+
return (
|
|
762
|
+
<SelectionCheckbox
|
|
763
|
+
checked={item.checked}
|
|
764
|
+
disabled={item.disabled ?? !item.onCheckedChange}
|
|
765
|
+
indeterminate={item.indeterminate}
|
|
766
|
+
label={item.ariaLabel ?? "Select row"}
|
|
767
|
+
onChange={item.onCheckedChange}
|
|
768
|
+
/>
|
|
769
|
+
);
|
|
756
770
|
case "text":
|
|
757
771
|
return <span className={`ds-table-item-text ds-table-item-text--${item.tone ?? "default"} ds-table-item-text--${item.weight ?? "regular"}`}>{item.value}</span>;
|
|
758
772
|
case "avatarText":
|
|
@@ -770,13 +784,29 @@ function renderTableItem(item: TableItem) {
|
|
|
770
784
|
case "progress":
|
|
771
785
|
return <Progress value={item.value} label={item.label} tone={item.tone ?? "success"} />;
|
|
772
786
|
case "toggle":
|
|
773
|
-
return
|
|
787
|
+
return (
|
|
788
|
+
<Toggle
|
|
789
|
+
aria-label={item.ariaLabel ?? "Toggle row value"}
|
|
790
|
+
checked={item.checked}
|
|
791
|
+
disabled={item.disabled ?? !item.onCheckedChange}
|
|
792
|
+
onCheckedChange={item.onCheckedChange}
|
|
793
|
+
size="sm"
|
|
794
|
+
/>
|
|
795
|
+
);
|
|
774
796
|
case "badges":
|
|
775
797
|
return <BadgeList items={item.items} maxVisible={item.maxVisible} />;
|
|
776
798
|
case "onlyAvatar":
|
|
777
799
|
return <Avatar name={item.alt} src={item.src} />;
|
|
778
800
|
case "avatarStack":
|
|
779
|
-
return
|
|
801
|
+
return (
|
|
802
|
+
<AvatarStack
|
|
803
|
+
addLabel={item.addLabel}
|
|
804
|
+
avatars={item.avatars}
|
|
805
|
+
canAdd={item.canAdd}
|
|
806
|
+
count={item.count}
|
|
807
|
+
onAdd={item.onAdd}
|
|
808
|
+
/>
|
|
809
|
+
);
|
|
780
810
|
case "tags":
|
|
781
811
|
return <TagList items={item.items} maxVisible={item.maxVisible} />;
|
|
782
812
|
case "file":
|
|
@@ -793,7 +823,7 @@ function renderTableItem(item: TableItem) {
|
|
|
793
823
|
return (
|
|
794
824
|
<span className="ds-table-action-group">
|
|
795
825
|
{item.actions.map((action) => (
|
|
796
|
-
<IconButton key={action.label} icon={action.icon} label={action.label} onClick={action.onAction} />
|
|
826
|
+
<IconButton disabled={action.disabled} key={action.label} icon={action.icon} label={action.label} onClick={action.onAction} />
|
|
797
827
|
))}
|
|
798
828
|
</span>
|
|
799
829
|
);
|
|
@@ -813,31 +843,15 @@ function SelectionCheckbox({
|
|
|
813
843
|
disabled?: boolean;
|
|
814
844
|
indeterminate?: boolean;
|
|
815
845
|
label: string;
|
|
816
|
-
onChange
|
|
846
|
+
onChange?: (checked: boolean) => void;
|
|
817
847
|
}) {
|
|
818
|
-
const inputRef = useRef<HTMLInputElement | null>(null);
|
|
819
|
-
|
|
820
|
-
useEffect(() => {
|
|
821
|
-
if (inputRef.current) {
|
|
822
|
-
inputRef.current.indeterminate = indeterminate;
|
|
823
|
-
}
|
|
824
|
-
}, [indeterminate]);
|
|
825
|
-
|
|
826
848
|
return (
|
|
827
|
-
<
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
onChange={(event) => onChange(event.currentTarget.checked)}
|
|
834
|
-
ref={inputRef}
|
|
835
|
-
type="checkbox"
|
|
836
|
-
/>
|
|
837
|
-
<span aria-hidden="true">
|
|
838
|
-
{indeterminate ? <IndeterminateIcon /> : <CheckIcon />}
|
|
839
|
-
</span>
|
|
840
|
-
</label>
|
|
849
|
+
<Checkbox
|
|
850
|
+
aria-label={label}
|
|
851
|
+
checked={indeterminate ? "indeterminate" : checked}
|
|
852
|
+
disabled={disabled}
|
|
853
|
+
onCheckedChange={(nextChecked) => onChange?.(nextChecked === true)}
|
|
854
|
+
/>
|
|
841
855
|
);
|
|
842
856
|
}
|
|
843
857
|
|
|
@@ -849,17 +863,38 @@ function Avatar({ name, src }: { name: string; src?: string }) {
|
|
|
849
863
|
.join("")
|
|
850
864
|
.toUpperCase();
|
|
851
865
|
|
|
852
|
-
return
|
|
866
|
+
return (
|
|
867
|
+
<AvatarPrimitive className="ds-table-avatar" size="sm">
|
|
868
|
+
{src ? <AvatarImage alt="" src={src} /> : null}
|
|
869
|
+
<AvatarFallback>{initials}</AvatarFallback>
|
|
870
|
+
</AvatarPrimitive>
|
|
871
|
+
);
|
|
853
872
|
}
|
|
854
873
|
|
|
855
|
-
function AvatarStack({
|
|
874
|
+
function AvatarStack({
|
|
875
|
+
addLabel = "Add person",
|
|
876
|
+
avatars,
|
|
877
|
+
canAdd,
|
|
878
|
+
count,
|
|
879
|
+
onAdd,
|
|
880
|
+
}: {
|
|
881
|
+
addLabel?: string;
|
|
882
|
+
avatars: AvatarItem[];
|
|
883
|
+
canAdd?: boolean;
|
|
884
|
+
count?: number;
|
|
885
|
+
onAdd?: () => void;
|
|
886
|
+
}) {
|
|
856
887
|
return (
|
|
857
888
|
<span className="ds-table-avatar-stack">
|
|
858
889
|
{avatars.slice(0, 3).map((avatar) => (
|
|
859
890
|
<Avatar key={avatar.alt} name={avatar.alt} src={avatar.src} />
|
|
860
891
|
))}
|
|
861
892
|
{count ? <span className="ds-table-avatar ds-table-avatar--count">+{count}</span> : null}
|
|
862
|
-
{canAdd ?
|
|
893
|
+
{canAdd ? (
|
|
894
|
+
<button aria-label={addLabel} disabled={!onAdd} onClick={onAdd} type="button">
|
|
895
|
+
+
|
|
896
|
+
</button>
|
|
897
|
+
) : null}
|
|
863
898
|
</span>
|
|
864
899
|
);
|
|
865
900
|
}
|
|
@@ -871,12 +906,17 @@ function BadgeList({ items, maxVisible = items.length }: { items: BadgeItem[]; m
|
|
|
871
906
|
return (
|
|
872
907
|
<span className="ds-table-badges">
|
|
873
908
|
{visible.map((item, index) => (
|
|
874
|
-
<
|
|
875
|
-
|
|
909
|
+
<Badge
|
|
910
|
+
badgeStyle="light"
|
|
911
|
+
color={badgeColor(item.tone)}
|
|
912
|
+
key={`${item.label}-${index}`}
|
|
913
|
+
size="xs"
|
|
914
|
+
type={item.dot ? "dot" : "default"}
|
|
915
|
+
>
|
|
876
916
|
{item.label}
|
|
877
|
-
</
|
|
917
|
+
</Badge>
|
|
878
918
|
))}
|
|
879
|
-
{overflow > 0 && <
|
|
919
|
+
{overflow > 0 && <Badge size="xs">+{overflow}</Badge>}
|
|
880
920
|
</span>
|
|
881
921
|
);
|
|
882
922
|
}
|
|
@@ -888,23 +928,22 @@ function TagList({ items, maxVisible = items.length }: { items: string[]; maxVis
|
|
|
888
928
|
return (
|
|
889
929
|
<span className="ds-table-tags">
|
|
890
930
|
{visible.map((item, index) => (
|
|
891
|
-
<
|
|
931
|
+
<Tag key={`${item}-${index}`} size="xs">{item}</Tag>
|
|
892
932
|
))}
|
|
893
|
-
{overflow > 0 && <
|
|
933
|
+
{overflow > 0 && <Tag size="xs">+{overflow}</Tag>}
|
|
894
934
|
</span>
|
|
895
935
|
);
|
|
896
936
|
}
|
|
897
937
|
|
|
898
938
|
function Progress({ label, tone, value }: { label?: string; tone: "success" | "brand"; value: number }) {
|
|
899
|
-
const safeValue = Math.max(0, Math.min(100, value));
|
|
900
|
-
|
|
901
939
|
return (
|
|
902
|
-
<
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
940
|
+
<ProgressPrimitive
|
|
941
|
+
className={`ds-table-progress ds-table-progress--${tone}`}
|
|
942
|
+
indicator={label}
|
|
943
|
+
labelPosition="inline"
|
|
944
|
+
size="sm"
|
|
945
|
+
value={value}
|
|
946
|
+
/>
|
|
908
947
|
);
|
|
909
948
|
}
|
|
910
949
|
|
|
@@ -927,14 +966,30 @@ function IconLabel({ icon, label }: { icon: ReactNode; label: string }) {
|
|
|
927
966
|
);
|
|
928
967
|
}
|
|
929
968
|
|
|
930
|
-
function IconButton({
|
|
969
|
+
function IconButton({
|
|
970
|
+
disabled,
|
|
971
|
+
icon,
|
|
972
|
+
label,
|
|
973
|
+
onClick,
|
|
974
|
+
}: {
|
|
975
|
+
disabled?: boolean;
|
|
976
|
+
icon: TableAction["icon"];
|
|
977
|
+
label: string;
|
|
978
|
+
onClick?: () => void;
|
|
979
|
+
}) {
|
|
931
980
|
return (
|
|
932
|
-
<
|
|
981
|
+
<Button aria-label={label} className="ds-table-icon-button" disabled={disabled ?? !onClick} onClick={onClick} size="icon-xs" type="button" variant="ghost">
|
|
933
982
|
{renderActionIcon(icon)}
|
|
934
|
-
</
|
|
983
|
+
</Button>
|
|
935
984
|
);
|
|
936
985
|
}
|
|
937
986
|
|
|
987
|
+
function badgeColor(tone: BadgeItem["tone"]) {
|
|
988
|
+
if (tone === "success") return "green" as const;
|
|
989
|
+
if (tone === "warning") return "amber" as const;
|
|
990
|
+
return tone ?? "neutral";
|
|
991
|
+
}
|
|
992
|
+
|
|
938
993
|
function renderActionIcon(icon: TableAction["icon"]) {
|
|
939
994
|
switch (icon) {
|
|
940
995
|
case "view":
|
|
@@ -949,38 +1004,30 @@ function renderActionIcon(icon: TableAction["icon"]) {
|
|
|
949
1004
|
}
|
|
950
1005
|
}
|
|
951
1006
|
|
|
952
|
-
function CheckIcon() {
|
|
953
|
-
return <LucideCheckIcon strokeWidth={2.6} />;
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
function IndeterminateIcon() {
|
|
957
|
-
return <MinusIcon strokeWidth={2.6} />;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
1007
|
function SortIcon({ direction }: { direction?: TableSortDirection }) {
|
|
961
1008
|
return (
|
|
962
|
-
<ArrowUpDownIcon aria-hidden="true" data-direction={direction ?? "none"} strokeWidth=
|
|
1009
|
+
<ArrowUpDownIcon aria-hidden="true" data-direction={direction ?? "none"} strokeWidth="var(--bh-icon-stroke-190)" />
|
|
963
1010
|
);
|
|
964
1011
|
}
|
|
965
1012
|
|
|
966
1013
|
function MoreIcon() {
|
|
967
|
-
return <EllipsisIcon aria-hidden="true" strokeWidth=
|
|
1014
|
+
return <EllipsisIcon aria-hidden="true" strokeWidth="var(--bh-icon-stroke-225)" />;
|
|
968
1015
|
}
|
|
969
1016
|
|
|
970
1017
|
function ViewIcon() {
|
|
971
|
-
return <EyeIcon aria-hidden="true" strokeWidth=
|
|
1018
|
+
return <EyeIcon aria-hidden="true" strokeWidth="var(--bh-icon-stroke-190)" />;
|
|
972
1019
|
}
|
|
973
1020
|
|
|
974
1021
|
function EditIcon() {
|
|
975
|
-
return <LucideEditIcon aria-hidden="true" strokeWidth=
|
|
1022
|
+
return <LucideEditIcon aria-hidden="true" strokeWidth="var(--bh-icon-stroke-190)" />;
|
|
976
1023
|
}
|
|
977
1024
|
|
|
978
1025
|
function DeleteIcon() {
|
|
979
|
-
return <Trash2Icon aria-hidden="true" strokeWidth=
|
|
1026
|
+
return <Trash2Icon aria-hidden="true" strokeWidth="var(--bh-icon-stroke-190)" />;
|
|
980
1027
|
}
|
|
981
1028
|
|
|
982
1029
|
function FileIcon() {
|
|
983
|
-
return <LucideFileIcon strokeWidth=
|
|
1030
|
+
return <LucideFileIcon strokeWidth="var(--bh-icon-stroke-190)" />;
|
|
984
1031
|
}
|
|
985
1032
|
|
|
986
1033
|
function BrandIcon() {
|
|
@@ -103,7 +103,7 @@ export function TimelineItem({
|
|
|
103
103
|
caption,
|
|
104
104
|
className,
|
|
105
105
|
date,
|
|
106
|
-
dir
|
|
106
|
+
dir,
|
|
107
107
|
icon,
|
|
108
108
|
label,
|
|
109
109
|
orientation = "vertical",
|
|
@@ -175,7 +175,7 @@ export function TimelineItem({
|
|
|
175
175
|
export function Timeline({
|
|
176
176
|
ariaLabel,
|
|
177
177
|
className,
|
|
178
|
-
dir
|
|
178
|
+
dir,
|
|
179
179
|
orientation = "vertical",
|
|
180
180
|
steps = [],
|
|
181
181
|
variant = "default",
|
|
@@ -212,5 +212,5 @@ export function Timeline({
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
function CheckIcon() {
|
|
215
|
-
return <LucideCheckIcon aria-hidden="true" className="ds-timeline__check" strokeWidth=
|
|
215
|
+
return <LucideCheckIcon aria-hidden="true" className="ds-timeline__check" strokeWidth="var(--bh-icon-stroke-300)" />;
|
|
216
216
|
}
|
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
.ds-breadcrumbs {
|
|
2
|
-
--breadcrumbs-color: var(--bh-content-subtle);
|
|
3
|
-
--breadcrumbs-current: var(--bh-content-default);
|
|
4
|
-
--breadcrumbs-border: var(--bh-border-subtle);
|
|
5
|
-
--breadcrumbs-surface: var(--bh-bg-raised);
|
|
6
|
-
--breadcrumbs-radius: var(--bh-radius-lg-8);
|
|
7
|
-
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
display: block;
|
|
10
|
-
max-width: 100%;
|
|
11
|
-
min-width: 0;
|
|
12
|
-
overflow-x: auto;
|
|
13
|
-
overflow-y: hidden;
|
|
14
|
-
color: var(--breadcrumbs-color);
|
|
15
|
-
font-family: var(--bh-font-family);
|
|
16
|
-
font-size: var(--bh-text-body-md-font-size);
|
|
17
|
-
font-weight: var(--bh-font-weight-medium);
|
|
18
|
-
letter-spacing:
|
|
19
|
-
line-height: var(--bh-text-body-md-line-height);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.ds-breadcrumbs *,
|
|
23
|
-
.ds-breadcrumbs *::before,
|
|
24
|
-
.ds-breadcrumbs *::after {
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.ds-breadcrumbs ol {
|
|
29
|
-
display: inline-flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
gap: var(--bh-space-xs-4);
|
|
32
|
-
max-width: 100%;
|
|
33
|
-
min-width: 0;
|
|
34
|
-
margin: 0;
|
|
35
|
-
padding: 0;
|
|
36
|
-
list-style: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.ds-breadcrumbs--raised ol {
|
|
40
|
-
gap: var(--bh-space-md-8);
|
|
41
|
-
padding: var(--bh-space-xl-12);
|
|
42
|
-
border: var(--bh-space-xxxs-1) solid var(--breadcrumbs-border);
|
|
43
|
-
border-radius: var(--breadcrumbs-radius);
|
|
44
|
-
background: var(--breadcrumbs-surface);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.ds-breadcrumbs li,
|
|
48
|
-
.ds-breadcrumbs a,
|
|
49
|
-
.ds-breadcrumbs li > span {
|
|
50
|
-
min-width: 0;
|
|
51
|
-
display: inline-flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
gap: var(--bh-space-xs-4);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.ds-breadcrumbs a {
|
|
57
|
-
color: inherit;
|
|
58
|
-
text-decoration: none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.ds-breadcrumbs a:hover {
|
|
62
|
-
color: var(--breadcrumbs-current);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.ds-breadcrumbs a:focus-visible {
|
|
66
|
-
border-radius: var(--bh-radius-sm-4);
|
|
1
|
+
.ds-breadcrumbs {
|
|
2
|
+
--breadcrumbs-color: var(--bh-content-subtle);
|
|
3
|
+
--breadcrumbs-current: var(--bh-content-default);
|
|
4
|
+
--breadcrumbs-border: var(--bh-border-subtle);
|
|
5
|
+
--breadcrumbs-surface: var(--bh-bg-raised);
|
|
6
|
+
--breadcrumbs-radius: var(--bh-radius-lg-8);
|
|
7
|
+
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
display: block;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
min-width: 0;
|
|
12
|
+
overflow-x: auto;
|
|
13
|
+
overflow-y: hidden;
|
|
14
|
+
color: var(--breadcrumbs-color);
|
|
15
|
+
font-family: var(--bh-font-family);
|
|
16
|
+
font-size: var(--bh-text-body-md-font-size);
|
|
17
|
+
font-weight: var(--bh-font-weight-medium);
|
|
18
|
+
letter-spacing: var(--bh-text-base-letter-spacing);
|
|
19
|
+
line-height: var(--bh-text-body-md-line-height);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ds-breadcrumbs *,
|
|
23
|
+
.ds-breadcrumbs *::before,
|
|
24
|
+
.ds-breadcrumbs *::after {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ds-breadcrumbs ol {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: var(--bh-space-xs-4);
|
|
32
|
+
max-width: 100%;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
list-style: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ds-breadcrumbs--raised ol {
|
|
40
|
+
gap: var(--bh-space-md-8);
|
|
41
|
+
padding: var(--bh-space-xl-12);
|
|
42
|
+
border: var(--bh-space-xxxs-1) solid var(--breadcrumbs-border);
|
|
43
|
+
border-radius: var(--breadcrumbs-radius);
|
|
44
|
+
background: var(--breadcrumbs-surface);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ds-breadcrumbs li,
|
|
48
|
+
.ds-breadcrumbs a,
|
|
49
|
+
.ds-breadcrumbs li > span {
|
|
50
|
+
min-width: 0;
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: var(--bh-space-xs-4);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.ds-breadcrumbs a {
|
|
57
|
+
color: inherit;
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ds-breadcrumbs a:hover {
|
|
62
|
+
color: var(--breadcrumbs-current);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ds-breadcrumbs a:focus-visible {
|
|
66
|
+
border-radius: var(--bh-radius-sm-4);
|
|
67
67
|
outline: var(--bh-focus-ring-width) solid var(--bh-border-focus);
|
|
68
|
-
outline-offset: var(--bh-space-xxs-2);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.ds-breadcrumbs .is-current {
|
|
72
|
-
color: var(--breadcrumbs-current);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.ds-breadcrumbs__icon {
|
|
76
|
-
width: var(--bh-space-4xl-20);
|
|
77
|
-
height: var(--bh-space-4xl-20);
|
|
78
|
-
flex: 0 0 auto;
|
|
79
|
-
display: inline-grid;
|
|
80
|
-
place-items: center;
|
|
81
|
-
color: currentColor;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.ds-breadcrumbs__icon:empty {
|
|
85
|
-
display: none;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.ds-breadcrumbs__icon svg {
|
|
89
|
-
width: var(--bh-space-4xl-20);
|
|
90
|
-
height: var(--bh-space-4xl-20);
|
|
91
|
-
display: block;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.ds-breadcrumbs__label {
|
|
95
|
-
max-width: 20ch;
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
text-overflow: ellipsis;
|
|
98
|
-
white-space: nowrap;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.ds-breadcrumbs__label--hidden {
|
|
102
|
-
position: absolute;
|
|
103
|
-
width: var(--bh-space-xxxs-1);
|
|
104
|
-
height: var(--bh-space-xxxs-1);
|
|
105
|
-
overflow: hidden;
|
|
106
|
-
clip: rect(0 0 0 0);
|
|
107
|
-
white-space: nowrap;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.ds-breadcrumbs__separator {
|
|
111
|
-
width: var(--bh-space-3xl-16);
|
|
112
|
-
height: var(--bh-space-3xl-16);
|
|
113
|
-
display: inline-flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
justify-content: center;
|
|
116
|
-
color: var(--breadcrumbs-color);
|
|
117
|
-
line-height: var(--bh-text-body-2xs-regular-line-height);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.ds-breadcrumbs__separator svg {
|
|
121
|
-
width: var(--bh-space-3xl-16);
|
|
122
|
-
height: var(--bh-space-3xl-16);
|
|
123
|
-
display: block;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.ds-breadcrumbs[dir="rtl"] .ds-breadcrumbs__separator svg {
|
|
127
|
-
transform: scaleX(-1);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.ds-breadcrumbs--icon-only a,
|
|
131
|
-
.ds-breadcrumbs--icon-only li > span:not(.ds-breadcrumbs__separator) {
|
|
132
|
-
width: var(--bh-space-6xl-32);
|
|
133
|
-
height: var(--bh-space-6xl-32);
|
|
134
|
-
justify-content: center;
|
|
135
|
-
border-radius: var(--breadcrumbs-radius);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.ds-breadcrumbs--icon-only a:hover {
|
|
139
|
-
background: var(--bh-interactive-ghost-hover);
|
|
140
|
-
}
|
|
68
|
+
outline-offset: var(--bh-space-xxs-2);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ds-breadcrumbs .is-current {
|
|
72
|
+
color: var(--breadcrumbs-current);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ds-breadcrumbs__icon {
|
|
76
|
+
width: var(--bh-space-4xl-20);
|
|
77
|
+
height: var(--bh-space-4xl-20);
|
|
78
|
+
flex: 0 0 auto;
|
|
79
|
+
display: inline-grid;
|
|
80
|
+
place-items: center;
|
|
81
|
+
color: currentColor;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.ds-breadcrumbs__icon:empty {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.ds-breadcrumbs__icon svg {
|
|
89
|
+
width: var(--bh-space-4xl-20);
|
|
90
|
+
height: var(--bh-space-4xl-20);
|
|
91
|
+
display: block;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ds-breadcrumbs__label {
|
|
95
|
+
max-width: 20ch;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ds-breadcrumbs__label--hidden {
|
|
102
|
+
position: absolute;
|
|
103
|
+
width: var(--bh-space-xxxs-1);
|
|
104
|
+
height: var(--bh-space-xxxs-1);
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
clip: rect(0 0 0 0);
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.ds-breadcrumbs__separator {
|
|
111
|
+
width: var(--bh-space-3xl-16);
|
|
112
|
+
height: var(--bh-space-3xl-16);
|
|
113
|
+
display: inline-flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
color: var(--breadcrumbs-color);
|
|
117
|
+
line-height: var(--bh-text-body-2xs-regular-line-height);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ds-breadcrumbs__separator svg {
|
|
121
|
+
width: var(--bh-space-3xl-16);
|
|
122
|
+
height: var(--bh-space-3xl-16);
|
|
123
|
+
display: block;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.ds-breadcrumbs[dir="rtl"] .ds-breadcrumbs__separator svg {
|
|
127
|
+
transform: scaleX(-1);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.ds-breadcrumbs--icon-only a,
|
|
131
|
+
.ds-breadcrumbs--icon-only li > span:not(.ds-breadcrumbs__separator) {
|
|
132
|
+
width: var(--bh-space-6xl-32);
|
|
133
|
+
height: var(--bh-space-6xl-32);
|
|
134
|
+
justify-content: center;
|
|
135
|
+
border-radius: var(--breadcrumbs-radius);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.ds-breadcrumbs--icon-only a:hover {
|
|
139
|
+
background: var(--bh-interactive-ghost-hover);
|
|
140
|
+
}
|