@cakejp/design-system 0.22.1 → 0.24.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 +102 -0
- package/CLAUDE.md +4 -2
- package/MIGRATION.md +79 -0
- package/UPDATING.md +1 -1
- package/bin/check-tokens.mjs +20 -0
- package/contracts/components.json +87 -25
- package/contracts/composition.json +9 -9
- package/contracts/rules.json +1 -1
- package/contracts/screen-patterns.json +1 -1
- package/dist/components/ec/admin-shell.js +7 -7
- package/dist/components/ec/anniversary-card.js +1 -1
- package/dist/components/ec/chart-controls.js +7 -7
- package/dist/components/ec/coupon-card.js +10 -10
- package/dist/components/ec/delivery-calendar.js +1 -1
- package/dist/components/ec/mypage-shell.js +1 -1
- package/dist/components/ec/order-section.js +1 -1
- package/dist/components/ec/order-summary.js +7 -5
- package/dist/components/ec/product-card.js +32 -30
- package/dist/components/ec/product-detail-sidebar.js +1 -1
- package/dist/components/ec/product-list-item.js +57 -56
- package/dist/components/ec/product-option.js +30 -30
- package/dist/components/ec/review-summary.js +1 -1
- package/dist/components/ec/shop-card.js +7 -7
- package/dist/components/foundations/accordion.js +1 -1
- package/dist/components/foundations/alert-dialog.js +65 -43
- package/dist/components/foundations/alert.js +75 -69
- package/dist/components/foundations/badge.js +8 -8
- package/dist/components/foundations/button.js +15 -15
- package/dist/components/foundations/checkbox-card.js +18 -18
- package/dist/components/foundations/checkbox.js +6 -6
- package/dist/components/foundations/chip-variants.js +8 -8
- package/dist/components/foundations/data-table.js +244 -209
- package/dist/components/foundations/dialog.js +84 -60
- package/dist/components/foundations/drawer.js +61 -53
- package/dist/components/foundations/field.js +51 -35
- package/dist/components/foundations/file-input.js +1 -1
- package/dist/components/foundations/input.js +9 -8
- package/dist/components/foundations/popover.js +15 -12
- package/dist/components/foundations/progress.js +19 -18
- package/dist/components/foundations/radio-group.js +26 -23
- package/dist/components/foundations/select.js +9 -8
- package/dist/components/foundations/sheet.js +82 -59
- package/dist/components/foundations/skeleton.js +6 -6
- package/dist/components/foundations/slider.js +7 -7
- package/dist/components/foundations/sonner.js +19 -18
- package/dist/components/foundations/switch.js +3 -2
- package/dist/components/foundations/tabs.js +5 -5
- package/dist/components/foundations/textarea.js +7 -6
- package/dist/components/foundations/toggle-group.js +5 -5
- package/dist/components/primitives/admin-header.js +3 -3
- package/dist/components/primitives/admin-side-nav.js +101 -92
- package/dist/components/primitives/category-shortcuts.js +6 -6
- package/dist/components/primitives/chat-composer.js +1 -1
- package/dist/components/primitives/chip.js +25 -25
- package/dist/components/primitives/combobox.js +74 -63
- package/dist/components/primitives/content-carousel.js +64 -62
- package/dist/components/primitives/date-picker.js +99 -96
- package/dist/components/primitives/error-state.js +9 -9
- package/dist/components/primitives/filter-bar.js +4 -4
- package/dist/components/primitives/footer.js +1 -1
- package/dist/components/primitives/form-field.js +8 -8
- package/dist/components/primitives/funnel-shell.js +5 -5
- package/dist/components/primitives/header.js +16 -16
- package/dist/components/primitives/image-carousel.js +42 -41
- package/dist/components/primitives/image-gallery.js +61 -58
- package/dist/components/primitives/image-input.js +2 -2
- package/dist/components/primitives/image-uploader.js +1 -1
- package/dist/components/primitives/kebab-menu.js +20 -16
- package/dist/components/primitives/list-item.js +17 -17
- package/dist/components/primitives/menu-drawer.js +11 -11
- package/dist/components/primitives/multi-select.js +66 -66
- package/dist/components/primitives/notification-list.js +13 -13
- package/dist/components/primitives/number-input.js +118 -112
- package/dist/components/primitives/progress-steps.js +3 -3
- package/dist/components/primitives/search-bar.js +6 -6
- package/dist/components/primitives/section-nav.js +1 -1
- package/dist/components/primitives/side-nav.js +1 -1
- package/dist/components/primitives/sub-nav.js +12 -12
- package/dist/components/primitives/tag.js +8 -8
- package/dist/components/primitives/workspace-shell.js +8 -8
- package/dist/index.css +1 -1
- package/dist/index.js +1487 -712
- package/dist/lib/focus-restore.js +67 -0
- package/dist/lib/focus-ring.js +1 -1
- package/dist/lib/ime.js +17 -0
- package/dist/lib/search-normalize.js +30 -0
- package/dist/types/components/ec/admin-shell.d.ts +1 -1
- package/dist/types/components/foundations/alert-dialog.d.ts +2 -2
- package/dist/types/components/foundations/alert.d.ts +14 -1
- package/dist/types/components/foundations/card.d.ts +3 -3
- package/dist/types/components/foundations/confirm-dialog.d.ts +3 -3
- package/dist/types/components/foundations/data-table.d.ts +1 -1
- package/dist/types/components/foundations/dialog.d.ts +2 -2
- package/dist/types/components/foundations/drawer.d.ts +1 -1
- package/dist/types/components/foundations/field.d.ts +23 -3
- package/dist/types/components/foundations/popover.d.ts +1 -1
- package/dist/types/components/foundations/sheet.d.ts +4 -3
- package/dist/types/components/foundations/sonner.d.ts +3 -2
- package/dist/types/components/primitives/admin-side-nav.d.ts +2 -0
- package/dist/types/components/primitives/combobox.d.ts +6 -0
- package/dist/types/components/primitives/date-picker.d.ts +8 -3
- package/dist/types/components/primitives/funnel-shell.d.ts +1 -1
- package/dist/types/components/primitives/kebab-menu.d.ts +10 -1
- package/dist/types/components/primitives/number-input.d.ts +20 -1
- package/dist/types/components/primitives/progress-steps.d.ts +1 -1
- package/dist/types/components/primitives/section.d.ts +1 -1
- package/dist/types/components/primitives/workspace-shell.d.ts +2 -2
- package/dist/types/index.d.ts +3 -4
- package/dist/types/lib/focus-restore.d.ts +52 -0
- package/dist/types/lib/focus-ring.d.ts +3 -0
- package/dist/types/lib/ime.d.ts +36 -0
- package/dist/types/lib/search-normalize.d.ts +28 -0
- package/package.json +3 -1
- package/src/components/COMPONENT_LOOKUP.md +12 -12
- package/src/preset-standalone.css +50 -24
- package/src/preset.css +36 -18
- package/src/styles/primitive.css +1 -0
- package/src/styles/semantic.css +21 -5
- package/tokens.json +48 -11
package/dist/index.js
CHANGED
|
@@ -1,507 +1,506 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
import { cn as t } from "./lib/utils.js";
|
|
3
|
-
import { FOCUS_RING as n, FOCUS_RING_INSET as i, FOCUS_RING_ONLY as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import { AdminHeader as nn } from "./components/primitives/admin-header.js";
|
|
3
|
+
import { FOCUS_RING as n, FOCUS_RING_INSET as i, FOCUS_RING_ONLY as l, FOCUS_RING_WITHIN as p, FORCED_COLORS_COMMAND_ITEM as m, FORCED_COLORS_FOCUS as x, FORCED_COLORS_FOCUS_INSET as u, FORCED_COLORS_FOCUS_WITHIN as C, FORCED_COLORS_MENU_ITEM as f } from "./lib/focus-ring.js";
|
|
4
|
+
import { Accordion as g, AccordionContent as c, AccordionItem as S, AccordionTrigger as s } from "./components/foundations/accordion.js";
|
|
5
|
+
import { Alert as b, AlertDescription as T, AlertTitle as M } from "./components/foundations/alert.js";
|
|
6
|
+
import { AlertDialog as F, AlertDialogAction as v, AlertDialogCancel as h, AlertDialogContent as R, AlertDialogDescription as P, AlertDialogFooter as w, AlertDialogHeader as A, AlertDialogOverlay as O, AlertDialogPortal as k, AlertDialogTitle as B, AlertDialogTrigger as L } from "./components/foundations/alert-dialog.js";
|
|
7
|
+
import { AspectRatio as y } from "./components/foundations/aspect-ratio.js";
|
|
8
|
+
import { Avatar as _, AvatarFallback as H, AvatarImage as E } from "./components/foundations/avatar.js";
|
|
9
|
+
import { Badge as U, badgeVariants as W } from "./components/foundations/badge.js";
|
|
10
|
+
import { Breadcrumb as z, BreadcrumbEllipsis as K, BreadcrumbItem as Y, BreadcrumbLink as j, BreadcrumbList as q, BreadcrumbPage as J, BreadcrumbSeparator as X } from "./components/foundations/breadcrumb.js";
|
|
11
|
+
import { Button as $, buttonVariants as ee } from "./components/foundations/button.js";
|
|
12
|
+
import { Calendar as re } from "./components/foundations/calendar.js";
|
|
13
|
+
import { Card as ae, CardAction as ne, CardContent as ie, CardDescription as le, CardFooter as pe, CardHeader as me, CardTitle as xe, cardVariants as ue } from "./components/foundations/card.js";
|
|
14
|
+
import { Checkbox as fe } from "./components/foundations/checkbox.js";
|
|
15
|
+
import { CheckboxCardGroup as ge, CheckboxCardItem as ce } from "./components/foundations/checkbox-card.js";
|
|
16
|
+
import { CheckboxGroup as se, CheckboxGroupItem as De } from "./components/foundations/checkbox-group.js";
|
|
17
|
+
import { Collapsible as Te, CollapsibleContent as Me, CollapsibleTrigger as Ie } from "./components/foundations/collapsible.js";
|
|
18
|
+
import { Command as ve, CommandDialog as he, CommandEmpty as Re, CommandGroup as Pe, CommandInput as we, CommandItem as Ae, CommandList as Oe, CommandSeparator as ke, CommandShortcut as Be } from "./components/foundations/command.js";
|
|
19
|
+
import { ConfirmDialogProvider as Ne, useConfirm as ye } from "./components/foundations/confirm-dialog.js";
|
|
20
|
+
import { ContextMenu as _e, ContextMenuCheckboxItem as He, ContextMenuContent as Ee, ContextMenuGroup as Ve, ContextMenuItem as Ue, ContextMenuLabel as We, ContextMenuPortal as Qe, ContextMenuRadioGroup as ze, ContextMenuRadioItem as Ke, ContextMenuSeparator as Ye, ContextMenuShortcut as je, ContextMenuSub as qe, ContextMenuSubContent as Je, ContextMenuSubTrigger as Xe, ContextMenuTrigger as Ze } from "./components/foundations/context-menu.js";
|
|
21
|
+
import { DataTable as eo, DataTableActionCell as oo, DataTableAddRow as ro, DataTableAvatarCell as to, DataTableBody as ao, DataTableBulkActions as no, DataTableCell as io, DataTableCheckboxCell as lo, DataTableDragHandleCell as po, DataTableEmptyState as mo, DataTableHead as xo, DataTableHeader as uo, DataTableImageCell as Co, DataTableInputCell as fo, DataTableLinkCell as go, DataTableNumberCell as co, DataTableRow as So, DataTableSectionRow as so, DataTableSelectCell as Do, DataTableTable as bo } from "./components/foundations/data-table.js";
|
|
22
|
+
import { Dialog as Mo, DialogClose as Io, DialogContent as Fo, DialogDescription as vo, DialogFooter as ho, DialogHeader as Ro, DialogOverlay as Po, DialogPortal as wo, DialogTitle as Ao, DialogTrigger as Oo } from "./components/foundations/dialog.js";
|
|
23
|
+
import { Drawer as Bo, DrawerClose as Lo, DrawerContent as No, DrawerDescription as yo, DrawerFooter as Go, DrawerHeader as _o, DrawerOverlay as Ho, DrawerPortal as Eo, DrawerTitle as Vo, DrawerTrigger as Uo } from "./components/foundations/drawer.js";
|
|
24
|
+
import { DropdownMenu as Qo, DropdownMenuCheckboxItem as zo, DropdownMenuContent as Ko, DropdownMenuGroup as Yo, DropdownMenuItem as jo, DropdownMenuLabel as qo, DropdownMenuPortal as Jo, DropdownMenuRadioGroup as Xo, DropdownMenuRadioItem as Zo, DropdownMenuSeparator as $o, DropdownMenuShortcut as er, DropdownMenuSub as or, DropdownMenuSubContent as rr, DropdownMenuSubTrigger as tr, DropdownMenuTrigger as ar } from "./components/foundations/dropdown-menu.js";
|
|
25
|
+
import { Field as ir, FieldDescription as lr, FieldError as pr, FieldGroup as mr, FieldLabel as xr, FieldLegend as ur, FieldSeparator as Cr, FieldSet as fr, fieldVariants as dr } from "./components/foundations/field.js";
|
|
26
|
+
import { FileInput as cr, formatFileNames as Sr, validateFileSize as sr } from "./components/foundations/file-input.js";
|
|
27
|
+
import { Form as br, FormControl as Tr, FormDescription as Mr, FormField as Ir, FormItem as Fr, FormLabel as vr, FormMessage as hr, useFormField as Rr } from "./components/foundations/form.js";
|
|
28
|
+
import { HoverCard as wr, HoverCardContent as Ar, HoverCardTrigger as Or } from "./components/foundations/hover-card.js";
|
|
29
|
+
import { IconBadge as Br, iconBadgeVariants as Lr } from "./components/foundations/icon-badge.js";
|
|
30
|
+
import { Input as yr } from "./components/foundations/input.js";
|
|
31
|
+
import { Label as _r } from "./components/foundations/label.js";
|
|
32
|
+
import { Menubar as Er, MenubarCheckboxItem as Vr, MenubarContent as Ur, MenubarGroup as Wr, MenubarItem as Qr, MenubarLabel as zr, MenubarMenu as Kr, MenubarPortal as Yr, MenubarRadioGroup as jr, MenubarRadioItem as qr, MenubarSeparator as Jr, MenubarShortcut as Xr, MenubarSub as Zr, MenubarSubContent as $r, MenubarSubTrigger as et, MenubarTrigger as ot } from "./components/foundations/menubar.js";
|
|
33
|
+
import { NavigationMenu as tt, NavigationMenuContent as at, NavigationMenuIndicator as nt, NavigationMenuItem as it, NavigationMenuLink as lt, NavigationMenuList as pt, NavigationMenuTrigger as mt, NavigationMenuViewport as xt, navigationMenuTriggerStyle as ut } from "./components/foundations/navigation-menu.js";
|
|
34
|
+
import { Pagination as ft, PaginationContent as dt, PaginationEllipsis as gt, PaginationItem as ct, PaginationLink as St, PaginationNext as st, PaginationPrevious as Dt } from "./components/foundations/pagination.js";
|
|
35
|
+
import { getPaginationRange as Tt } from "./lib/pagination-range.js";
|
|
36
|
+
import { Popover as It, PopoverAnchor as Ft, PopoverContent as vt, PopoverTrigger as ht } from "./components/foundations/popover.js";
|
|
37
|
+
import { Progress as Pt } from "./components/foundations/progress.js";
|
|
38
|
+
import { ResponsiveDialog as At, ResponsiveDialogClose as Ot, ResponsiveDialogContent as kt, ResponsiveDialogDescription as Bt, ResponsiveDialogFooter as Lt, ResponsiveDialogHeader as Nt, ResponsiveDialogTitle as yt, ResponsiveDialogTrigger as Gt, useIsMobile as _t } from "./components/foundations/responsive-dialog.js";
|
|
39
|
+
import { RadioGroup as Et, RadioGroupItem as Vt } from "./components/foundations/radio-group.js";
|
|
40
|
+
import { ScrollArea as Wt, ScrollBar as Qt } from "./components/foundations/scroll-area.js";
|
|
41
|
+
import { Select as Kt, SelectContent as Yt, SelectGroup as jt, SelectItem as qt, SelectLabel as Jt, SelectScrollDownButton as Xt, SelectScrollUpButton as Zt, SelectSeparator as $t, SelectTrigger as ea, SelectValue as oa } from "./components/foundations/select.js";
|
|
42
|
+
import { Separator as ta } from "./components/foundations/separator.js";
|
|
43
|
+
import { Sheet as na, SheetClose as ia, SheetContent as la, SheetDescription as pa, SheetFooter as ma, SheetHeader as xa, SheetTitle as ua, SheetTrigger as Ca } from "./components/foundations/sheet.js";
|
|
44
|
+
import { Skeleton as da } from "./components/foundations/skeleton.js";
|
|
45
|
+
import { SkipLink as ca } from "./components/foundations/skip-link.js";
|
|
46
|
+
import { Slider as sa } from "./components/foundations/slider.js";
|
|
47
|
+
import { Spinner as ba } from "./components/foundations/spinner.js";
|
|
48
|
+
import { SocialIcon as Ma } from "./components/foundations/social-icon.js";
|
|
49
|
+
import { Switch as Fa } from "./components/foundations/switch.js";
|
|
50
|
+
import { Table as ha, TableBody as Ra, TableCaption as Pa, TableCell as wa, TableFooter as Aa, TableHead as Oa, TableHeader as ka, TableRow as Ba } from "./components/foundations/table.js";
|
|
51
|
+
import { Tabs as Na, TabsContent as ya, TabsList as Ga, TabsTrigger as _a } from "./components/foundations/tabs.js";
|
|
52
|
+
import { Textarea as Ea } from "./components/foundations/textarea.js";
|
|
53
|
+
import { Toaster as Ua, toast as Wa } from "./components/foundations/sonner.js";
|
|
54
|
+
import { Toggle as za, toggleVariants as Ka } from "./components/foundations/toggle.js";
|
|
55
|
+
import { ToggleGroup as ja, ToggleGroupItem as qa } from "./components/foundations/toggle-group.js";
|
|
56
|
+
import { Tooltip as Xa, TooltipContent as Za, TooltipProvider as $a, TooltipTrigger as en } from "./components/foundations/tooltip.js";
|
|
57
|
+
import { AdminSideNav as rn } from "./components/primitives/admin-side-nav.js";
|
|
58
|
+
import { AdminHeader as an } from "./components/primitives/admin-header.js";
|
|
60
59
|
import { CoachMark as ln } from "./components/primitives/coach-mark.js";
|
|
61
|
-
import { Combobox as
|
|
62
|
-
import { BannerCarousel as
|
|
63
|
-
import { ContentCarousel as
|
|
64
|
-
import { MultiSelect as
|
|
65
|
-
import { StickyActionBar as
|
|
66
|
-
import { BottomTabBar as
|
|
67
|
-
import { BulkActionBar as
|
|
68
|
-
import { CategoryShortcuts as
|
|
69
|
-
import { CategoryScroll as
|
|
70
|
-
import { ChatComposer as
|
|
71
|
-
import { Chip as
|
|
72
|
-
import { Prose as
|
|
73
|
-
import { ContentCard as
|
|
74
|
-
import { StandardPageShell as
|
|
75
|
-
import { EmptyState as
|
|
76
|
-
import { DatePicker as
|
|
77
|
-
import { ErrorState as
|
|
78
|
-
import { FilterBar as
|
|
79
|
-
import { Footer as
|
|
80
|
-
import { FormField as
|
|
81
|
-
import { FunnelShell as
|
|
82
|
-
import { Header as
|
|
83
|
-
import { ImageCarousel as
|
|
84
|
-
import { ImageGallery as
|
|
85
|
-
import { ImageInput as li, imageInputPreviewVariants as
|
|
86
|
-
import { ImageUploader as
|
|
87
|
-
import { KebabMenu as
|
|
88
|
-
import { ListItem as
|
|
89
|
-
import { MenuDrawer as
|
|
90
|
-
import { SubNav as
|
|
91
|
-
import { NotificationBadge as
|
|
92
|
-
import { NotificationList as
|
|
93
|
-
import { PriceDisplay as
|
|
94
|
-
import { ProgressSteps as
|
|
95
|
-
import { Timeline as
|
|
96
|
-
import { NumberInput as
|
|
97
|
-
import { SearchBar as
|
|
98
|
-
import { SearchPanel as
|
|
99
|
-
import { Container as
|
|
100
|
-
import { ScrollRow as
|
|
101
|
-
import { Section as
|
|
102
|
-
import { SectionHeader as
|
|
103
|
-
import { SectionNav as
|
|
104
|
-
import { ShareButtons as
|
|
105
|
-
import { SideNav as
|
|
106
|
-
import { SocialLoginButton as
|
|
107
|
-
import { StatusCountTabs as
|
|
108
|
-
import { Tag as
|
|
109
|
-
import { WorkspaceShell as
|
|
110
|
-
import { AdminShell as
|
|
111
|
-
import { AnniversaryCard as
|
|
112
|
-
import { CakeLogo as
|
|
113
|
-
import { ChartControls as
|
|
114
|
-
import { CountdownTimer as
|
|
115
|
-
import { CouponCard as
|
|
116
|
-
import { DeliveryCalendar as
|
|
117
|
-
import { mypageMenuGroups as
|
|
118
|
-
import { OrderSection as
|
|
119
|
-
import { OrderSummary as
|
|
120
|
-
import { CreditCardIcon as
|
|
121
|
-
import { BookmarkRibbonIcon as
|
|
122
|
-
import { ProductCarousel as
|
|
123
|
-
import { ProductCTA as
|
|
124
|
-
import { ProductDetailBar as
|
|
125
|
-
import { ProductDetailSidebar as
|
|
126
|
-
import { ProductListItem as
|
|
127
|
-
import { OptionImageUpload as
|
|
128
|
-
import { RatingStars as
|
|
129
|
-
import { ReviewCard as
|
|
130
|
-
import { ReviewForm as
|
|
131
|
-
import { ReviewItem as
|
|
132
|
-
import { MypageShell as
|
|
133
|
-
import { ShopCard as
|
|
134
|
-
import { StatCard as
|
|
135
|
-
import { chipVariants as
|
|
60
|
+
import { Combobox as mn } from "./components/primitives/combobox.js";
|
|
61
|
+
import { BannerCarousel as un } from "./components/primitives/banner-carousel.js";
|
|
62
|
+
import { ContentCarousel as fn } from "./components/primitives/content-carousel.js";
|
|
63
|
+
import { MultiSelect as gn } from "./components/primitives/multi-select.js";
|
|
64
|
+
import { StickyActionBar as Sn } from "./components/primitives/sticky-action-bar.js";
|
|
65
|
+
import { BottomTabBar as Dn } from "./components/primitives/bottom-tab-bar.js";
|
|
66
|
+
import { BulkActionBar as Tn } from "./components/primitives/bulk-action-bar.js";
|
|
67
|
+
import { CategoryShortcuts as In } from "./components/primitives/category-shortcuts.js";
|
|
68
|
+
import { CategoryScroll as vn } from "./components/primitives/category-scroll.js";
|
|
69
|
+
import { ChatComposer as Rn } from "./components/primitives/chat-composer.js";
|
|
70
|
+
import { Chip as wn } from "./components/primitives/chip.js";
|
|
71
|
+
import { Prose as On } from "./components/primitives/prose.js";
|
|
72
|
+
import { ContentCard as Bn, ContentList as Ln } from "./components/primitives/content-card.js";
|
|
73
|
+
import { StandardPageShell as yn, StandardPageShell as Gn } from "./components/primitives/standard-page-shell.js";
|
|
74
|
+
import { EmptyState as Hn } from "./components/primitives/empty-state.js";
|
|
75
|
+
import { DatePicker as Vn, DateTimePicker as Un } from "./components/primitives/date-picker.js";
|
|
76
|
+
import { ErrorState as Qn, NotFoundIllustration as zn } from "./components/primitives/error-state.js";
|
|
77
|
+
import { FilterBar as Yn } from "./components/primitives/filter-bar.js";
|
|
78
|
+
import { Footer as qn } from "./components/primitives/footer.js";
|
|
79
|
+
import { FormField as Xn } from "./components/primitives/form-field.js";
|
|
80
|
+
import { FunnelShell as $n } from "./components/primitives/funnel-shell.js";
|
|
81
|
+
import { Header as oi } from "./components/primitives/header.js";
|
|
82
|
+
import { ImageCarousel as ti } from "./components/primitives/image-carousel.js";
|
|
83
|
+
import { ImageGallery as ni } from "./components/primitives/image-gallery.js";
|
|
84
|
+
import { ImageInput as li, imageInputPreviewVariants as pi } from "./components/primitives/image-input.js";
|
|
85
|
+
import { ImageUploader as xi } from "./components/primitives/image-uploader.js";
|
|
86
|
+
import { KebabMenu as Ci } from "./components/primitives/kebab-menu.js";
|
|
87
|
+
import { ListItem as di } from "./components/primitives/list-item.js";
|
|
88
|
+
import { MenuDrawer as ci } from "./components/primitives/menu-drawer.js";
|
|
89
|
+
import { SubNav as si } from "./components/primitives/sub-nav.js";
|
|
90
|
+
import { NotificationBadge as bi, notificationBadgeVariants as Ti } from "./components/primitives/notification-badge.js";
|
|
91
|
+
import { NotificationList as Ii } from "./components/primitives/notification-list.js";
|
|
92
|
+
import { PriceDisplay as vi, priceDisplayVariants as hi } from "./components/primitives/price-display.js";
|
|
93
|
+
import { ProgressSteps as Pi } from "./components/primitives/progress-steps.js";
|
|
94
|
+
import { Timeline as Ai } from "./components/primitives/timeline.js";
|
|
95
|
+
import { NumberInput as ki, QuantitySelector as Bi } from "./components/primitives/number-input.js";
|
|
96
|
+
import { SearchBar as Ni } from "./components/primitives/search-bar.js";
|
|
97
|
+
import { SearchPanel as Gi } from "./components/primitives/search-panel.js";
|
|
98
|
+
import { Container as Hi, containerVariants as Ei } from "./components/primitives/container.js";
|
|
99
|
+
import { ScrollRow as Ui } from "./components/primitives/scroll-row.js";
|
|
100
|
+
import { Section as Qi, sectionScrimVariants as zi, sectionVariants as Ki } from "./components/primitives/section.js";
|
|
101
|
+
import { SectionHeader as ji } from "./components/primitives/section-header.js";
|
|
102
|
+
import { SectionNav as Ji } from "./components/primitives/section-nav.js";
|
|
103
|
+
import { ShareButtons as Zi } from "./components/primitives/share-buttons.js";
|
|
104
|
+
import { SideNav as el } from "./components/primitives/side-nav.js";
|
|
105
|
+
import { SocialLoginButton as rl } from "./components/primitives/social-login-button.js";
|
|
106
|
+
import { StatusCountTabs as al } from "./components/primitives/status-count-tabs.js";
|
|
107
|
+
import { Tag as il, tagVariants as ll } from "./components/primitives/tag.js";
|
|
108
|
+
import { WorkspaceShell as ml, WorkspaceShell as xl } from "./components/primitives/workspace-shell.js";
|
|
109
|
+
import { AdminShell as Cl, AdminShell as fl, MissingComponent as dl } from "./components/ec/admin-shell.js";
|
|
110
|
+
import { AnniversaryCard as cl } from "./components/ec/anniversary-card.js";
|
|
111
|
+
import { CakeLogo as sl } from "./components/ec/cake-logo.js";
|
|
112
|
+
import { ChartControls as bl } from "./components/ec/chart-controls.js";
|
|
113
|
+
import { CountdownTimer as Ml } from "./components/ec/countdown-timer.js";
|
|
114
|
+
import { CouponCard as Fl } from "./components/ec/coupon-card.js";
|
|
115
|
+
import { DeliveryCalendar as hl } from "./components/ec/delivery-calendar.js";
|
|
116
|
+
import { mypageMenuGroups as Pl } from "./components/ec/_mypage-menu-data.js";
|
|
117
|
+
import { OrderSection as Al } from "./components/ec/order-section.js";
|
|
118
|
+
import { OrderSummary as kl } from "./components/ec/order-summary.js";
|
|
119
|
+
import { CreditCardIcon as Ll, PaymentMethodDisplay as Nl } from "./components/ec/payment-method.js";
|
|
120
|
+
import { BookmarkRibbonIcon as Gl, ProductCard as _l } from "./components/ec/product-card.js";
|
|
121
|
+
import { ProductCarousel as El } from "./components/ec/product-carousel.js";
|
|
122
|
+
import { ProductCTA as Ul } from "./components/ec/product-cta.js";
|
|
123
|
+
import { ProductDetailBar as Ql } from "./components/ec/product-detail-bar.js";
|
|
124
|
+
import { ProductDetailSidebar as Kl } from "./components/ec/product-detail-sidebar.js";
|
|
125
|
+
import { ProductListItem as jl } from "./components/ec/product-list-item.js";
|
|
126
|
+
import { OptionImageUpload as Jl, OptionQuantity as Xl, OptionSelect as Zl, OptionText as $l, ProductOption as ep } from "./components/ec/product-option.js";
|
|
127
|
+
import { RatingStars as rp, SparkleIcon as tp } from "./components/ec/rating-stars.js";
|
|
128
|
+
import { ReviewCard as np } from "./components/ec/review-card.js";
|
|
129
|
+
import { ReviewForm as lp } from "./components/ec/review-form.js";
|
|
130
|
+
import { ReviewItem as mp, ReviewSummary as xp } from "./components/ec/review-summary.js";
|
|
131
|
+
import { MypageShell as Cp } from "./components/ec/mypage-shell.js";
|
|
132
|
+
import { ShopCard as dp } from "./components/ec/shop-card.js";
|
|
133
|
+
import { StatCard as cp } from "./components/ec/stat-card.js";
|
|
134
|
+
import { chipVariants as sp } from "./components/foundations/chip-variants.js";
|
|
136
135
|
export {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
136
|
+
g as Accordion,
|
|
137
|
+
c as AccordionContent,
|
|
138
|
+
S as AccordionItem,
|
|
139
|
+
s as AccordionTrigger,
|
|
140
|
+
an as AdminHeader,
|
|
141
|
+
Cl as AdminLayout,
|
|
142
|
+
fl as AdminShell,
|
|
143
|
+
rn as AdminSideNav,
|
|
144
|
+
b as Alert,
|
|
145
|
+
T as AlertDescription,
|
|
146
|
+
F as AlertDialog,
|
|
147
|
+
v as AlertDialogAction,
|
|
148
|
+
h as AlertDialogCancel,
|
|
149
|
+
R as AlertDialogContent,
|
|
150
|
+
P as AlertDialogDescription,
|
|
151
|
+
w as AlertDialogFooter,
|
|
152
|
+
A as AlertDialogHeader,
|
|
153
|
+
O as AlertDialogOverlay,
|
|
154
|
+
k as AlertDialogPortal,
|
|
155
|
+
B as AlertDialogTitle,
|
|
156
|
+
L as AlertDialogTrigger,
|
|
157
|
+
M as AlertTitle,
|
|
158
|
+
cl as AnniversaryCard,
|
|
159
|
+
y as AspectRatio,
|
|
160
|
+
_ as Avatar,
|
|
161
|
+
H as AvatarFallback,
|
|
162
|
+
E as AvatarImage,
|
|
163
|
+
U as Badge,
|
|
164
|
+
un as BannerCarousel,
|
|
165
|
+
Gl as BookmarkRibbonIcon,
|
|
166
|
+
Dn as BottomTabBar,
|
|
167
|
+
z as Breadcrumb,
|
|
168
|
+
K as BreadcrumbEllipsis,
|
|
169
|
+
Y as BreadcrumbItem,
|
|
170
|
+
j as BreadcrumbLink,
|
|
171
|
+
q as BreadcrumbList,
|
|
172
|
+
J as BreadcrumbPage,
|
|
173
|
+
X as BreadcrumbSeparator,
|
|
174
|
+
Tn as BulkActionBar,
|
|
175
|
+
$ as Button,
|
|
176
|
+
Xn as CakeFormField,
|
|
177
|
+
sl as CakeLogo,
|
|
178
|
+
re as Calendar,
|
|
179
|
+
ae as Card,
|
|
180
|
+
ne as CardAction,
|
|
181
|
+
ie as CardContent,
|
|
182
|
+
le as CardDescription,
|
|
183
|
+
pe as CardFooter,
|
|
184
|
+
me as CardHeader,
|
|
185
|
+
xe as CardTitle,
|
|
186
|
+
vn as CategoryScroll,
|
|
187
|
+
In as CategoryShortcuts,
|
|
188
|
+
bl as ChartControls,
|
|
189
|
+
Rn as ChatComposer,
|
|
190
|
+
fe as Checkbox,
|
|
191
|
+
ge as CheckboxCardGroup,
|
|
192
|
+
ce as CheckboxCardItem,
|
|
193
|
+
se as CheckboxGroup,
|
|
194
|
+
De as CheckboxGroupItem,
|
|
195
|
+
wn as Chip,
|
|
197
196
|
ln as CoachMark,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
197
|
+
Te as Collapsible,
|
|
198
|
+
Me as CollapsibleContent,
|
|
199
|
+
Ie as CollapsibleTrigger,
|
|
200
|
+
mn as Combobox,
|
|
201
|
+
ve as Command,
|
|
202
|
+
he as CommandDialog,
|
|
203
|
+
Re as CommandEmpty,
|
|
204
|
+
Pe as CommandGroup,
|
|
205
|
+
we as CommandInput,
|
|
206
|
+
Ae as CommandItem,
|
|
207
|
+
Oe as CommandList,
|
|
208
|
+
ke as CommandSeparator,
|
|
209
|
+
Be as CommandShortcut,
|
|
210
|
+
Ne as ConfirmDialogProvider,
|
|
211
|
+
Hi as Container,
|
|
212
|
+
Bn as ContentCard,
|
|
213
|
+
fn as ContentCarousel,
|
|
214
|
+
Ln as ContentList,
|
|
215
|
+
_e as ContextMenu,
|
|
216
|
+
He as ContextMenuCheckboxItem,
|
|
217
|
+
Ee as ContextMenuContent,
|
|
218
|
+
Ve as ContextMenuGroup,
|
|
219
|
+
Ue as ContextMenuItem,
|
|
220
|
+
We as ContextMenuLabel,
|
|
221
|
+
Qe as ContextMenuPortal,
|
|
222
|
+
ze as ContextMenuRadioGroup,
|
|
223
|
+
Ke as ContextMenuRadioItem,
|
|
224
|
+
Ye as ContextMenuSeparator,
|
|
225
|
+
je as ContextMenuShortcut,
|
|
226
|
+
qe as ContextMenuSub,
|
|
227
|
+
Je as ContextMenuSubContent,
|
|
228
|
+
Xe as ContextMenuSubTrigger,
|
|
229
|
+
Ze as ContextMenuTrigger,
|
|
230
|
+
Ml as CountdownTimer,
|
|
231
|
+
Fl as CouponCard,
|
|
232
|
+
Ll as CreditCardIcon,
|
|
233
|
+
eo as DataTable,
|
|
234
|
+
oo as DataTableActionCell,
|
|
235
|
+
ro as DataTableAddRow,
|
|
236
|
+
to as DataTableAvatarCell,
|
|
237
|
+
ao as DataTableBody,
|
|
238
|
+
no as DataTableBulkActions,
|
|
239
|
+
io as DataTableCell,
|
|
240
|
+
lo as DataTableCheckboxCell,
|
|
241
|
+
po as DataTableDragHandleCell,
|
|
242
|
+
mo as DataTableEmptyState,
|
|
243
|
+
xo as DataTableHead,
|
|
244
|
+
uo as DataTableHeader,
|
|
245
|
+
Co as DataTableImageCell,
|
|
246
|
+
fo as DataTableInputCell,
|
|
247
|
+
go as DataTableLinkCell,
|
|
248
|
+
co as DataTableNumberCell,
|
|
249
|
+
So as DataTableRow,
|
|
250
|
+
so as DataTableSectionRow,
|
|
251
|
+
Do as DataTableSelectCell,
|
|
252
|
+
bo as DataTableTable,
|
|
253
|
+
Vn as DatePicker,
|
|
254
|
+
Un as DateTimePicker,
|
|
255
|
+
hl as DeliveryCalendar,
|
|
256
|
+
Mo as Dialog,
|
|
257
|
+
Io as DialogClose,
|
|
258
|
+
Fo as DialogContent,
|
|
259
|
+
vo as DialogDescription,
|
|
260
|
+
ho as DialogFooter,
|
|
261
|
+
Ro as DialogHeader,
|
|
262
|
+
Po as DialogOverlay,
|
|
263
|
+
wo as DialogPortal,
|
|
264
|
+
Ao as DialogTitle,
|
|
265
|
+
Oo as DialogTrigger,
|
|
266
|
+
Bo as Drawer,
|
|
267
|
+
Lo as DrawerClose,
|
|
268
|
+
No as DrawerContent,
|
|
269
|
+
yo as DrawerDescription,
|
|
270
|
+
Go as DrawerFooter,
|
|
271
|
+
_o as DrawerHeader,
|
|
272
|
+
Ho as DrawerOverlay,
|
|
273
|
+
Eo as DrawerPortal,
|
|
274
|
+
Vo as DrawerTitle,
|
|
275
|
+
Uo as DrawerTrigger,
|
|
276
|
+
Qo as DropdownMenu,
|
|
277
|
+
zo as DropdownMenuCheckboxItem,
|
|
278
|
+
Ko as DropdownMenuContent,
|
|
279
|
+
Yo as DropdownMenuGroup,
|
|
280
|
+
jo as DropdownMenuItem,
|
|
281
|
+
qo as DropdownMenuLabel,
|
|
282
|
+
Jo as DropdownMenuPortal,
|
|
283
|
+
Xo as DropdownMenuRadioGroup,
|
|
284
|
+
Zo as DropdownMenuRadioItem,
|
|
285
|
+
$o as DropdownMenuSeparator,
|
|
286
|
+
er as DropdownMenuShortcut,
|
|
287
|
+
or as DropdownMenuSub,
|
|
288
|
+
rr as DropdownMenuSubContent,
|
|
289
|
+
tr as DropdownMenuSubTrigger,
|
|
290
|
+
ar as DropdownMenuTrigger,
|
|
291
|
+
yn as EcPageShell,
|
|
292
|
+
Hn as EmptyState,
|
|
293
|
+
Qn as ErrorState,
|
|
295
294
|
n as FOCUS_RING,
|
|
296
295
|
i as FOCUS_RING_INSET,
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
l as FOCUS_RING_ONLY,
|
|
297
|
+
p as FOCUS_RING_WITHIN,
|
|
299
298
|
m as FORCED_COLORS_COMMAND_ITEM,
|
|
300
299
|
x as FORCED_COLORS_FOCUS,
|
|
301
300
|
u as FORCED_COLORS_FOCUS_INSET,
|
|
302
301
|
C as FORCED_COLORS_FOCUS_WITHIN,
|
|
303
302
|
f as FORCED_COLORS_MENU_ITEM,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
303
|
+
ir as Field,
|
|
304
|
+
lr as FieldDescription,
|
|
305
|
+
pr as FieldError,
|
|
306
|
+
mr as FieldGroup,
|
|
307
|
+
xr as FieldLabel,
|
|
308
|
+
ur as FieldLegend,
|
|
309
|
+
Cr as FieldSeparator,
|
|
310
|
+
fr as FieldSet,
|
|
311
|
+
cr as FileInput,
|
|
312
|
+
Yn as FilterBar,
|
|
313
|
+
qn as Footer,
|
|
314
|
+
br as Form,
|
|
315
|
+
Tr as FormControl,
|
|
316
|
+
Mr as FormDescription,
|
|
317
|
+
Ir as FormField,
|
|
318
|
+
Fr as FormItem,
|
|
319
|
+
vr as FormLabel,
|
|
320
|
+
hr as FormMessage,
|
|
321
|
+
$n as FunnelShell,
|
|
322
|
+
oi as Header,
|
|
323
|
+
wr as HoverCard,
|
|
324
|
+
Ar as HoverCardContent,
|
|
325
|
+
Or as HoverCardTrigger,
|
|
326
|
+
Br as IconBadge,
|
|
327
|
+
ti as ImageCarousel,
|
|
328
|
+
ni as ImageGallery,
|
|
330
329
|
li as ImageInput,
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
330
|
+
xi as ImageUploader,
|
|
331
|
+
yr as Input,
|
|
332
|
+
Ci as KebabMenu,
|
|
333
|
+
_r as Label,
|
|
334
|
+
di as ListItem,
|
|
335
|
+
ci as MenuDrawer,
|
|
336
|
+
Er as Menubar,
|
|
337
|
+
Vr as MenubarCheckboxItem,
|
|
338
|
+
Ur as MenubarContent,
|
|
339
|
+
Wr as MenubarGroup,
|
|
340
|
+
Qr as MenubarItem,
|
|
341
|
+
zr as MenubarLabel,
|
|
342
|
+
Kr as MenubarMenu,
|
|
343
|
+
Yr as MenubarPortal,
|
|
344
|
+
jr as MenubarRadioGroup,
|
|
345
|
+
qr as MenubarRadioItem,
|
|
346
|
+
Jr as MenubarSeparator,
|
|
347
|
+
Xr as MenubarShortcut,
|
|
348
|
+
Zr as MenubarSub,
|
|
349
|
+
$r as MenubarSubContent,
|
|
350
|
+
et as MenubarSubTrigger,
|
|
351
|
+
ot as MenubarTrigger,
|
|
352
|
+
dl as MissingComponent,
|
|
353
|
+
gn as MultiSelect,
|
|
354
|
+
Cp as MypageShell,
|
|
355
|
+
tt as NavigationMenu,
|
|
356
|
+
at as NavigationMenuContent,
|
|
357
|
+
nt as NavigationMenuIndicator,
|
|
358
|
+
it as NavigationMenuItem,
|
|
359
|
+
lt as NavigationMenuLink,
|
|
360
|
+
pt as NavigationMenuList,
|
|
361
|
+
mt as NavigationMenuTrigger,
|
|
362
|
+
xt as NavigationMenuViewport,
|
|
363
|
+
zn as NotFoundIllustration,
|
|
364
|
+
bi as NotificationBadge,
|
|
365
|
+
Ii as NotificationList,
|
|
366
|
+
ki as NumberInput,
|
|
367
|
+
Jl as OptionImageUpload,
|
|
368
|
+
Xl as OptionQuantity,
|
|
369
|
+
Zl as OptionSelect,
|
|
370
|
+
$l as OptionText,
|
|
371
|
+
Al as OrderSection,
|
|
372
|
+
kl as OrderSummary,
|
|
373
|
+
ft as Pagination,
|
|
374
|
+
dt as PaginationContent,
|
|
375
|
+
gt as PaginationEllipsis,
|
|
376
|
+
ct as PaginationItem,
|
|
377
|
+
St as PaginationLink,
|
|
378
|
+
st as PaginationNext,
|
|
379
|
+
Dt as PaginationPrevious,
|
|
380
|
+
Nl as PaymentMethodDisplay,
|
|
381
|
+
It as Popover,
|
|
382
|
+
Ft as PopoverAnchor,
|
|
383
|
+
vt as PopoverContent,
|
|
384
|
+
ht as PopoverTrigger,
|
|
385
|
+
vi as PriceDisplay,
|
|
386
|
+
Ul as ProductCTA,
|
|
387
|
+
_l as ProductCard,
|
|
388
|
+
El as ProductCarousel,
|
|
389
|
+
Ql as ProductDetailBar,
|
|
390
|
+
Kl as ProductDetailSidebar,
|
|
391
|
+
jl as ProductListItem,
|
|
392
|
+
ep as ProductOption,
|
|
393
|
+
Pt as Progress,
|
|
394
|
+
Pi as ProgressSteps,
|
|
395
|
+
On as Prose,
|
|
396
|
+
Bi as QuantitySelector,
|
|
397
|
+
Et as RadioGroup,
|
|
398
|
+
Vt as RadioGroupItem,
|
|
399
|
+
rp as RatingStars,
|
|
400
|
+
At as ResponsiveDialog,
|
|
401
|
+
Ot as ResponsiveDialogClose,
|
|
402
|
+
kt as ResponsiveDialogContent,
|
|
403
|
+
Bt as ResponsiveDialogDescription,
|
|
404
|
+
Lt as ResponsiveDialogFooter,
|
|
405
|
+
Nt as ResponsiveDialogHeader,
|
|
406
|
+
yt as ResponsiveDialogTitle,
|
|
407
|
+
Gt as ResponsiveDialogTrigger,
|
|
408
|
+
np as ReviewCard,
|
|
409
|
+
lp as ReviewForm,
|
|
410
|
+
mp as ReviewItem,
|
|
411
|
+
xp as ReviewSummary,
|
|
412
|
+
Wt as ScrollArea,
|
|
413
|
+
Qt as ScrollBar,
|
|
414
|
+
Ui as ScrollRow,
|
|
415
|
+
Ni as SearchBar,
|
|
416
|
+
Gi as SearchPanel,
|
|
417
|
+
Qi as Section,
|
|
418
|
+
ji as SectionHeader,
|
|
419
|
+
Ji as SectionNav,
|
|
420
|
+
Kt as Select,
|
|
421
|
+
Yt as SelectContent,
|
|
422
|
+
jt as SelectGroup,
|
|
423
|
+
qt as SelectItem,
|
|
424
|
+
Jt as SelectLabel,
|
|
425
|
+
Xt as SelectScrollDownButton,
|
|
426
|
+
Zt as SelectScrollUpButton,
|
|
427
|
+
$t as SelectSeparator,
|
|
428
|
+
ea as SelectTrigger,
|
|
429
|
+
oa as SelectValue,
|
|
430
|
+
ta as Separator,
|
|
431
|
+
Zi as ShareButtons,
|
|
432
|
+
na as Sheet,
|
|
433
|
+
ia as SheetClose,
|
|
434
|
+
la as SheetContent,
|
|
435
|
+
pa as SheetDescription,
|
|
436
|
+
ma as SheetFooter,
|
|
437
|
+
xa as SheetHeader,
|
|
438
|
+
ua as SheetTitle,
|
|
439
|
+
Ca as SheetTrigger,
|
|
440
|
+
dp as ShopCard,
|
|
441
|
+
el as SideNav,
|
|
442
|
+
da as Skeleton,
|
|
443
|
+
ca as SkipLink,
|
|
444
|
+
sa as Slider,
|
|
445
|
+
Ma as SocialIcon,
|
|
446
|
+
rl as SocialLoginButton,
|
|
447
|
+
tp as SparkleIcon,
|
|
448
|
+
ba as Spinner,
|
|
449
|
+
Gn as StandardPageShell,
|
|
450
|
+
cp as StatCard,
|
|
451
|
+
al as StatusCountTabs,
|
|
452
|
+
Sn as StickyActionBar,
|
|
453
|
+
si as SubNav,
|
|
454
|
+
Fa as Switch,
|
|
455
|
+
ha as Table,
|
|
456
|
+
Ra as TableBody,
|
|
457
|
+
Pa as TableCaption,
|
|
458
|
+
wa as TableCell,
|
|
459
|
+
Aa as TableFooter,
|
|
460
|
+
Oa as TableHead,
|
|
461
|
+
ka as TableHeader,
|
|
462
|
+
Ba as TableRow,
|
|
463
|
+
Na as Tabs,
|
|
464
|
+
ya as TabsContent,
|
|
465
|
+
Ga as TabsList,
|
|
466
|
+
_a as TabsTrigger,
|
|
467
|
+
il as Tag,
|
|
468
|
+
Ea as Textarea,
|
|
469
|
+
Ai as Timeline,
|
|
470
|
+
Ua as Toaster,
|
|
471
|
+
za as Toggle,
|
|
472
|
+
ja as ToggleGroup,
|
|
473
|
+
qa as ToggleGroupItem,
|
|
474
|
+
Xa as Tooltip,
|
|
475
|
+
Za as TooltipContent,
|
|
476
|
+
$a as TooltipProvider,
|
|
477
|
+
en as TooltipTrigger,
|
|
478
|
+
ml as WorkspaceLayout,
|
|
479
|
+
xl as WorkspaceShell,
|
|
480
|
+
W as badgeVariants,
|
|
481
|
+
ee as buttonVariants,
|
|
482
|
+
ue as cardVariants,
|
|
483
|
+
sp as chipVariants,
|
|
485
484
|
t as cn,
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
485
|
+
Ei as containerVariants,
|
|
486
|
+
dr as fieldVariants,
|
|
487
|
+
Sr as formatFileNames,
|
|
488
|
+
Tt as getPaginationRange,
|
|
489
|
+
Lr as iconBadgeVariants,
|
|
490
|
+
pi as imageInputPreviewVariants,
|
|
491
|
+
Pl as mypageMenuGroups,
|
|
492
|
+
ut as navigationMenuTriggerStyle,
|
|
493
|
+
Ti as notificationBadgeVariants,
|
|
494
|
+
hi as priceDisplayVariants,
|
|
495
|
+
zi as sectionScrimVariants,
|
|
496
|
+
Ki as sectionVariants,
|
|
497
|
+
ll as tagVariants,
|
|
498
|
+
Wa as toast,
|
|
499
|
+
Ka as toggleVariants,
|
|
500
|
+
ye as useConfirm,
|
|
501
|
+
Rr as useFormField,
|
|
502
|
+
_t as useIsMobile,
|
|
503
|
+
sr as validateFileSize
|
|
505
504
|
};
|
|
506
505
|
|
|
507
506
|
|
|
@@ -712,7 +711,7 @@ export {
|
|
|
712
711
|
// *
|
|
713
712
|
// * ## 配下 Card のサーフェス
|
|
714
713
|
// *
|
|
715
|
-
// * 地が Surface-Secondary なので、シェルが配下 `Card` の既定サーフェスを白にする文脈
|
|
714
|
+
// * 地が Surface-Neutral-Secondary なので、シェルが配下 `Card` の既定サーフェスを白にする文脈
|
|
716
715
|
// * (`--card-surface`)を宣言する。`Card` は `surface` 未指定のまま地から浮く(#150)。
|
|
717
716
|
// *
|
|
718
717
|
// * 参照元:
|
|
@@ -934,21 +933,21 @@ export {
|
|
|
934
933
|
//
|
|
935
934
|
// const defaultHeaderActions = (
|
|
936
935
|
// <>
|
|
937
|
-
// <button className="relative flex items-center justify-center size-10 shrink-0 rounded-lg hover:bg-[var(--Surface-Secondary)]" aria-label="通知">
|
|
936
|
+
// <button className="relative flex items-center justify-center size-10 shrink-0 rounded-lg hover:bg-[var(--Surface-Neutral-Secondary)]" aria-label="通知">
|
|
938
937
|
// <Notification size={20} className="text-[var(--Text-High-Emphasis)]" />
|
|
939
938
|
// <span className="absolute top-1.5 right-1.5 size-2 rounded-full bg-[var(--Surface-Caution)]" />
|
|
940
939
|
// </button>
|
|
941
|
-
// <button className="flex items-center justify-center size-10 shrink-0 rounded-full bg-[var(--Surface-Tertiary)]" aria-label="プロフィール">
|
|
940
|
+
// <button className="flex items-center justify-center size-10 shrink-0 rounded-full bg-[var(--Surface-Neutral-Tertiary)]" aria-label="プロフィール">
|
|
942
941
|
// <User size={20} className="text-[var(--Text-Medium-Emphasis)]" />
|
|
943
942
|
// </button>
|
|
944
943
|
// </>
|
|
945
944
|
// )
|
|
946
945
|
//
|
|
947
946
|
// return (
|
|
948
|
-
// // 地が Surface-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
|
|
947
|
+
// // 地が Surface-Neutral-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
|
|
949
948
|
// // (#150 の Section と同じ仕組み。dark は半透明白が重なって浮くため据え置き)。
|
|
950
949
|
// <div
|
|
951
|
-
// className="@container flex min-h-screen bg-[var(--Surface-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]"
|
|
950
|
+
// className="@container flex min-h-screen bg-[var(--Surface-Neutral-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]"
|
|
952
951
|
// data-slot="admin-shell"
|
|
953
952
|
// >
|
|
954
953
|
// {/* a11y: キーボードでサイドナビ/ヘッダーを飛ばして本文へ移動(sr-only・視覚無影響)。skipLink={false} で無効化 */}
|
|
@@ -1128,7 +1127,7 @@ export {
|
|
|
1128
1127
|
// <p className="typo-label-md text-[var(--Text-High-Emphasis)]">
|
|
1129
1128
|
// {name}
|
|
1130
1129
|
// </p>
|
|
1131
|
-
// <span className="typo-label-xs text-[var(--Text-Medium-Emphasis)] bg-[var(--Surface-Secondary)] px-2 py-0.5 rounded-full">
|
|
1130
|
+
// <span className="typo-label-xs text-[var(--Text-Medium-Emphasis)] bg-[var(--Surface-Neutral-Secondary)] px-2 py-0.5 rounded-full">
|
|
1132
1131
|
// {relation}
|
|
1133
1132
|
// </span>
|
|
1134
1133
|
// </div>
|
|
@@ -1307,7 +1306,7 @@ export {
|
|
|
1307
1306
|
// "px-3 py-1 rounded typo-label-sm transition-colors",
|
|
1308
1307
|
// active
|
|
1309
1308
|
// ? "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)]"
|
|
1310
|
-
// : "text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Secondary)]"
|
|
1309
|
+
// : "text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)]"
|
|
1311
1310
|
// )}
|
|
1312
1311
|
// >
|
|
1313
1312
|
// {children}
|
|
@@ -1571,7 +1570,7 @@ export {
|
|
|
1571
1570
|
// >
|
|
1572
1571
|
// {/* Image area */}
|
|
1573
1572
|
// {imageUrl && (
|
|
1574
|
-
// <div className="relative aspect-[5/2] w-full overflow-hidden bg-[var(--Surface-Secondary)]">
|
|
1573
|
+
// <div className="relative aspect-[5/2] w-full overflow-hidden bg-[var(--Surface-Neutral-Secondary)]">
|
|
1575
1574
|
// <img
|
|
1576
1575
|
// src={imageUrl}
|
|
1577
1576
|
// alt={imageAlt ?? title}
|
|
@@ -1716,14 +1715,14 @@ export {
|
|
|
1716
1715
|
// }
|
|
1717
1716
|
// if (status === "acquired") {
|
|
1718
1717
|
// return (
|
|
1719
|
-
// <div className={cn(baseClass, "bg-[var(--Surface-Secondary)] text-[var(--Text-Medium-Emphasis)] animate-in fade-in duration-[var(--Motion-Duration-Slow)] gap-1.5")}>
|
|
1718
|
+
// <div className={cn(baseClass, "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-Medium-Emphasis)] animate-in fade-in duration-[var(--Motion-Duration-Slow)] gap-1.5")}>
|
|
1720
1719
|
// <Check className="size-4" />
|
|
1721
1720
|
// 獲得済み
|
|
1722
1721
|
// </div>
|
|
1723
1722
|
// )
|
|
1724
1723
|
// }
|
|
1725
1724
|
// return (
|
|
1726
|
-
// <div className={cn(baseClass, "bg-[var(--Surface-Secondary)] text-[var(--Text-Low-Emphasis)]")}>
|
|
1725
|
+
// <div className={cn(baseClass, "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-Low-Emphasis)]")}>
|
|
1727
1726
|
// 獲得不可
|
|
1728
1727
|
// </div>
|
|
1729
1728
|
// )
|
|
@@ -1894,7 +1893,7 @@ export {
|
|
|
1894
1893
|
// onClick={() => clickable && onDaySelect?.(day.date)}
|
|
1895
1894
|
// className={cn(
|
|
1896
1895
|
// "flex flex-col items-center gap-0.5 rounded-md py-1.5 typo-body-md transition-colors",
|
|
1897
|
-
// clickable && "cursor-pointer hover:bg-[var(--Surface-Secondary)]",
|
|
1896
|
+
// clickable && "cursor-pointer hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
1898
1897
|
// selected && "relative z-10 bg-[var(--Brand-Cake-Orange)]/10 ring-1 ring-inset ring-[var(--Brand-Cake-Orange)]",
|
|
1899
1898
|
// // forced-colors(Windows ハイコントラスト)では薄い地が Canvas に、枠(ring = box-shadow)が
|
|
1900
1899
|
// // 消えて選んだ日が見えなかった。選んだ日だけ OS の選択色で示し、日付と ○△× も
|
|
@@ -2150,7 +2149,7 @@ export {
|
|
|
2150
2149
|
// )
|
|
2151
2150
|
//
|
|
2152
2151
|
// return (
|
|
2153
|
-
// <div className="@container min-h-screen bg-[var(--Surface-Secondary)]">
|
|
2152
|
+
// <div className="@container min-h-screen bg-[var(--Surface-Neutral-Secondary)]">
|
|
2154
2153
|
// {/* a11y: キーボードでヘッダー/サイドを飛ばして本文へ移動(sr-only・視覚無影響)。skipLink={false} で無効化 */}
|
|
2155
2154
|
// {skipLink !== false && <SkipLink href={`#${mainId}`} />}
|
|
2156
2155
|
//
|
|
@@ -2272,7 +2271,7 @@ export {
|
|
|
2272
2271
|
// status === "error" || status === "empty"
|
|
2273
2272
|
// ? "border-[var(--Border-Caution)]"
|
|
2274
2273
|
// : "border-[var(--Border-Medium-Emphasis)]",
|
|
2275
|
-
// onEdit && "cursor-pointer hover:bg-[var(--Surface-Secondary)] hover:border-[var(--Border-High-Emphasis)]",
|
|
2274
|
+
// onEdit && "cursor-pointer hover:bg-[var(--Surface-Neutral-Secondary)] hover:border-[var(--Border-High-Emphasis)]",
|
|
2276
2275
|
// className
|
|
2277
2276
|
// )}
|
|
2278
2277
|
// {...props}
|
|
@@ -2450,7 +2449,9 @@ export {
|
|
|
2450
2449
|
// data-slot="order-summary"
|
|
2451
2450
|
// className={cn(
|
|
2452
2451
|
// // fixed 表示はスクロール内容の上に重なるため地は Surface-Elevated(disableFixed 側はページ内フローなので Surface-Primary のまま)
|
|
2453
|
-
//
|
|
2452
|
+
// // bottom: BottomTabBar(高さ 52px + 下端の safe-area)の真上に重ねる。
|
|
2453
|
+
// // safe-area の分を足さないと、ホームインジケータのある iPhone(viewport-fit=cover)でタブバーに重なる。safe-area が 0 の環境では 52px のまま
|
|
2454
|
+
// "fixed inset-x-0 bottom-[calc(52px+env(safe-area-inset-bottom))] z-[var(--Z-Sticky)] mx-auto max-w-[430px] border-t border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Elevated)]",
|
|
2454
2455
|
// className
|
|
2455
2456
|
// )}
|
|
2456
2457
|
// {...props}
|
|
@@ -2625,6 +2626,7 @@ export {
|
|
|
2625
2626
|
// import * as React from "react"
|
|
2626
2627
|
//
|
|
2627
2628
|
// import { cn } from "@/lib/utils"
|
|
2629
|
+
// import { FOCUS_RING_ONLY } from "@/lib/focus-ring"
|
|
2628
2630
|
// import type { LinkComponent } from "@/lib/link-component"
|
|
2629
2631
|
// import { buttonVariants } from "@/components/foundations/button"
|
|
2630
2632
|
// import { PriceDisplay } from "@/components/primitives/price-display"
|
|
@@ -2792,7 +2794,8 @@ export {
|
|
|
2792
2794
|
// <button
|
|
2793
2795
|
// type="button"
|
|
2794
2796
|
// className={cn(
|
|
2795
|
-
// "relative z-10 flex items-center justify-center rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)]/80 backdrop-blur-sm transition-colors hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Tertiary)]",
|
|
2797
|
+
// "relative z-10 flex items-center justify-center rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)]/80 backdrop-blur-sm transition-colors hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)] focus-visible:outline-none",
|
|
2798
|
+
// FOCUS_RING_ONLY,
|
|
2796
2799
|
// size === "sm" ? "size-[30px]" : "size-9"
|
|
2797
2800
|
// )}
|
|
2798
2801
|
// onClick={(e) => {
|
|
@@ -3781,7 +3784,7 @@ export {
|
|
|
3781
3784
|
// <div
|
|
3782
3785
|
// data-slot="product-detail-sidebar"
|
|
3783
3786
|
// className={cn(
|
|
3784
|
-
// "flex w-[400px] max-w-full flex-col rounded-2xl border-2 border-[var(--Surface-Tertiary)] bg-[var(--Surface-Primary)]",
|
|
3787
|
+
// "flex w-[400px] max-w-full flex-col rounded-2xl border-2 border-[var(--Surface-Neutral-Tertiary)] bg-[var(--Surface-Primary)]",
|
|
3785
3788
|
// className
|
|
3786
3789
|
// )}
|
|
3787
3790
|
// {...props}
|
|
@@ -4099,6 +4102,7 @@ export {
|
|
|
4099
4102
|
// src/components/ec/product-list-item.tsx
|
|
4100
4103
|
// import * as React from "react"
|
|
4101
4104
|
// import { cn } from "@/lib/utils"
|
|
4105
|
+
// import { FOCUS_RING_INSET } from "@/lib/focus-ring"
|
|
4102
4106
|
// import type { LinkComponent } from "@/lib/link-component"
|
|
4103
4107
|
// import { Button } from "@/components/foundations/button"
|
|
4104
4108
|
// import { Tag } from "@/components/primitives/tag"
|
|
@@ -4320,7 +4324,7 @@ export {
|
|
|
4320
4324
|
// {!leftSlot && imageUrl && isCart && (
|
|
4321
4325
|
// <div
|
|
4322
4326
|
// className={cn(
|
|
4323
|
-
// "relative shrink-0 overflow-hidden rounded-lg bg-[var(--Surface-Secondary)]",
|
|
4327
|
+
// "relative shrink-0 overflow-hidden rounded-lg bg-[var(--Surface-Neutral-Secondary)]",
|
|
4324
4328
|
// imgSize
|
|
4325
4329
|
// )}
|
|
4326
4330
|
// >
|
|
@@ -4541,7 +4545,8 @@ export {
|
|
|
4541
4545
|
// ) : showBookmark && !isReview && (
|
|
4542
4546
|
// <button
|
|
4543
4547
|
// type="button"
|
|
4544
|
-
//
|
|
4548
|
+
// // 行は overflow-hidden(lp は余白 0)なので、リングが切り取られない内側に描く
|
|
4549
|
+
// className={`flex size-9 shrink-0 items-center justify-center self-start rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Neutral-Secondary)] transition-colors hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)] focus-visible:outline-none ${FOCUS_RING_INSET}`}
|
|
4545
4550
|
// aria-label="ブックマーク"
|
|
4546
4551
|
// >
|
|
4547
4552
|
// <svg
|
|
@@ -4783,7 +4788,7 @@ export {
|
|
|
4783
4788
|
// onChange={(e) => onChange?.(e.target.value)}
|
|
4784
4789
|
// aria-label={placeholder}
|
|
4785
4790
|
// className={cn(
|
|
4786
|
-
// "w-full appearance-none rounded-md border border-[var(--Border-High-Emphasis)] bg-[var(--Surface-Primary)] px-3 py-2 pr-8 typo-body-md text-[var(--Text-High-Emphasis)] focus:border-[var(--Focus-High-Emphasis)] focus:outline-none focus:ring-[3px] focus:ring-[var(--Focus-High-Emphasis)]
|
|
4791
|
+
// "w-full appearance-none rounded-md border border-[var(--Border-High-Emphasis)] bg-[var(--Surface-Primary)] px-3 py-2 pr-8 typo-body-md text-[var(--Text-High-Emphasis)] focus:border-[var(--Focus-High-Emphasis)] focus:outline-none focus:ring-[3px] focus:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--Focus-High-Emphasis)_50%,transparent))]",
|
|
4787
4792
|
// FORCED_COLORS_FOCUS
|
|
4788
4793
|
// )}
|
|
4789
4794
|
// >
|
|
@@ -4846,7 +4851,7 @@ export {
|
|
|
4846
4851
|
// type="button"
|
|
4847
4852
|
// onClick={onUpload}
|
|
4848
4853
|
// aria-label="画像をアップロード"
|
|
4849
|
-
// className={`flex h-24 w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Secondary)] text-[var(--Text-Low-Emphasis)] transition-colors hover:border-[var(--Brand-Cake-Orange)] hover:text-[var(--Brand-Cake-Orange)] ${FOCUS_RING_ONLY} focus-visible:outline-none`}
|
|
4854
|
+
// className={`flex h-24 w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-Low-Emphasis)] transition-colors hover:border-[var(--Brand-Cake-Orange)] hover:text-[var(--Brand-Cake-Orange)] ${FOCUS_RING_ONLY} focus-visible:outline-none`}
|
|
4850
4855
|
// {...rest}
|
|
4851
4856
|
// >
|
|
4852
4857
|
// <ExportSquare size={24} />
|
|
@@ -5488,7 +5493,7 @@ export {
|
|
|
5488
5493
|
// <span className="w-3 shrink-0 text-right typo-label-sm tabular-nums text-[var(--Text-Medium-Emphasis)]">
|
|
5489
5494
|
// {item.stars}
|
|
5490
5495
|
// </span>
|
|
5491
|
-
// <div className="h-2.5 flex-1 overflow-hidden rounded-full bg-[var(--Surface-Secondary)]">
|
|
5496
|
+
// <div className="h-2.5 flex-1 overflow-hidden rounded-full bg-[var(--Surface-Neutral-Secondary)]">
|
|
5492
5497
|
// <div
|
|
5493
5498
|
// className="h-full rounded-full bg-[var(--Brand-Cake-Orange)] transition-all duration-[var(--Motion-Duration-Base)]"
|
|
5494
5499
|
// style={{
|
|
@@ -5725,7 +5730,7 @@ export {
|
|
|
5725
5730
|
// {...compactWrapperProps}
|
|
5726
5731
|
// data-slot="shop-card"
|
|
5727
5732
|
// className={cn(
|
|
5728
|
-
// "flex items-center gap-3 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-3 transition-colors hover:bg-[var(--Surface-Secondary)] max-w-[400px]",
|
|
5733
|
+
// "flex items-center gap-3 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-3 transition-colors hover:bg-[var(--Surface-Neutral-Secondary)] max-w-[400px]",
|
|
5729
5734
|
// className
|
|
5730
5735
|
// )}
|
|
5731
5736
|
// {...(props as React.HTMLAttributes<HTMLElement>)}
|
|
@@ -5757,7 +5762,7 @@ export {
|
|
|
5757
5762
|
// <div
|
|
5758
5763
|
// data-slot="shop-card"
|
|
5759
5764
|
// className={cn(
|
|
5760
|
-
// "relative min-w-[200px] grid grid-rows-[auto_1fr] gap-2 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-3 transition-colors hover:bg-[var(--Surface-Secondary)]",
|
|
5765
|
+
// "relative min-w-[200px] grid grid-rows-[auto_1fr] gap-2 rounded-lg border border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] p-3 transition-colors hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
5761
5766
|
// className
|
|
5762
5767
|
// )}
|
|
5763
5768
|
// {...props}
|
|
@@ -6030,7 +6035,7 @@ export {
|
|
|
6030
6035
|
// <AccordionPrimitive.Trigger
|
|
6031
6036
|
// data-slot="accordion-trigger"
|
|
6032
6037
|
// className={cn(
|
|
6033
|
-
// "flex w-full flex-1 cursor-pointer items-center justify-between gap-4 py-4 text-left typo-label-md text-[var(--Text-High-Emphasis)] transition-all outline-none hover:bg-[var(--Surface-Tertiary)]/60 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
6038
|
+
// "flex w-full flex-1 cursor-pointer items-center justify-between gap-4 py-4 text-left typo-label-md text-[var(--Text-High-Emphasis)] transition-all outline-none hover:bg-[var(--Surface-Neutral-Tertiary)]/60 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--ring)_50%,transparent))] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
6034
6039
|
// FORCED_COLORS_FOCUS,
|
|
6035
6040
|
// className
|
|
6036
6041
|
// )}
|
|
@@ -6063,16 +6068,39 @@ export {
|
|
|
6063
6068
|
// export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
|
|
6064
6069
|
//
|
|
6065
6070
|
// src/components/foundations/alert-dialog.tsx
|
|
6071
|
+
// "use client"
|
|
6072
|
+
//
|
|
6066
6073
|
// import * as React from "react"
|
|
6067
6074
|
// import { AlertDialog as AlertDialogPrimitive } from "radix-ui"
|
|
6068
6075
|
//
|
|
6069
6076
|
// import { cn } from "@/lib/utils"
|
|
6077
|
+
// import {
|
|
6078
|
+
// OverlayFocusRootContext,
|
|
6079
|
+
// useOverlayFocusRoot,
|
|
6080
|
+
// useRestoreFocusToOpener,
|
|
6081
|
+
// } from "@/lib/focus-restore"
|
|
6082
|
+
// import { composeEscapeKeyDownWithImeGuard } from "@/lib/ime"
|
|
6070
6083
|
// import { Button } from "@/components/foundations/button"
|
|
6071
6084
|
//
|
|
6072
6085
|
// function AlertDialog({
|
|
6086
|
+
// open,
|
|
6087
|
+
// defaultOpen,
|
|
6088
|
+
// onOpenChange,
|
|
6073
6089
|
// ...props
|
|
6074
6090
|
// }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
6075
|
-
//
|
|
6091
|
+
// // 閉じたときに opener へフォーカスを戻すための記録(AlertDialogContent が使う)
|
|
6092
|
+
// const { root, handleOpenChange } = useOverlayFocusRoot(open, defaultOpen, onOpenChange)
|
|
6093
|
+
// return (
|
|
6094
|
+
// <OverlayFocusRootContext.Provider value={root}>
|
|
6095
|
+
// <AlertDialogPrimitive.Root
|
|
6096
|
+
// data-slot="alert-dialog"
|
|
6097
|
+
// open={open}
|
|
6098
|
+
// defaultOpen={defaultOpen}
|
|
6099
|
+
// onOpenChange={handleOpenChange}
|
|
6100
|
+
// {...props}
|
|
6101
|
+
// />
|
|
6102
|
+
// </OverlayFocusRootContext.Provider>
|
|
6103
|
+
// )
|
|
6076
6104
|
// }
|
|
6077
6105
|
//
|
|
6078
6106
|
// function AlertDialogTrigger({
|
|
@@ -6110,16 +6138,25 @@ export {
|
|
|
6110
6138
|
// function AlertDialogContent({
|
|
6111
6139
|
// className,
|
|
6112
6140
|
// size = "default",
|
|
6141
|
+
// onOpenAutoFocus,
|
|
6142
|
+
// onCloseAutoFocus,
|
|
6143
|
+
// onEscapeKeyDown,
|
|
6113
6144
|
// ...props
|
|
6114
6145
|
// }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
6115
6146
|
// size?: "default" | "sm"
|
|
6116
6147
|
// }) {
|
|
6148
|
+
// // 開いたときは Radix 既定(AlertDialogCancel)へ入れたまま、閉じたときは Trigger 無しで
|
|
6149
|
+
// // 開いても、その回に開いた要素へ戻す
|
|
6150
|
+
// const autoFocusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })
|
|
6117
6151
|
// return (
|
|
6118
6152
|
// <AlertDialogPortal>
|
|
6119
6153
|
// <AlertDialogOverlay />
|
|
6120
6154
|
// <AlertDialogPrimitive.Content
|
|
6121
6155
|
// data-slot="alert-dialog-content"
|
|
6122
6156
|
// data-size={size}
|
|
6157
|
+
// {...autoFocusHandlers}
|
|
6158
|
+
// // 日本語入力の変換中の Esc(変換の取り消し)では閉じない
|
|
6159
|
+
// onEscapeKeyDown={composeEscapeKeyDownWithImeGuard(onEscapeKeyDown)}
|
|
6123
6160
|
// className={cn(
|
|
6124
6161
|
// // 画面端との余白は上下左右 40px(calc(100%-5rem))。
|
|
6125
6162
|
// // 幅上限は端末幅に応じて: SP は端末幅-80px に追従 / sm 以上は
|
|
@@ -6303,11 +6340,11 @@ export {
|
|
|
6303
6340
|
// {
|
|
6304
6341
|
// variants: {
|
|
6305
6342
|
// variant: {
|
|
6306
|
-
// /** success —
|
|
6343
|
+
// /** success — mint border, mint title, white bg(dark は従来の緑の枠) */
|
|
6307
6344
|
// success: [
|
|
6308
6345
|
// "flex flex-col items-start overflow-clip rounded-lg",
|
|
6309
6346
|
// "bg-[var(--Surface-Primary)]",
|
|
6310
|
-
// "shadow-[0_0_0_5px_rgba(31,204,132,0.2)]",
|
|
6347
|
+
// "shadow-[0_0_0_5px_rgba(62,152,122,0.2)] dark:shadow-[0_0_0_5px_rgba(31,204,132,0.2)]",
|
|
6311
6348
|
// ].join(" "),
|
|
6312
6349
|
// /** info — gray border, dark title, white bg */
|
|
6313
6350
|
// info: [
|
|
@@ -6359,7 +6396,7 @@ export {
|
|
|
6359
6396
|
// {
|
|
6360
6397
|
// variants: {
|
|
6361
6398
|
// variant: {
|
|
6362
|
-
// success: "border-[var(--Focus-High-Emphasis)]",
|
|
6399
|
+
// success: "border-[var(--Object-Success)] dark:border-[var(--Focus-High-Emphasis)]",
|
|
6363
6400
|
// info: "border-[var(--Border-Medium-Emphasis)]",
|
|
6364
6401
|
// error: "border-[var(--Border-Caution)]",
|
|
6365
6402
|
// warning: "border-[var(--Primitive-Wood-800)]",
|
|
@@ -6412,9 +6449,43 @@ export {
|
|
|
6412
6449
|
// "inline-warning": { Icon: Warning2, color: "text-[var(--Text-Warning)]" },
|
|
6413
6450
|
// } as const
|
|
6414
6451
|
//
|
|
6452
|
+
// /**
|
|
6453
|
+
// * 読み上げの強さ(ライブリージョンの種類)。
|
|
6454
|
+
// * - `"alert"`: 即時に割り込んで読み上げる。エラー・警告向け
|
|
6455
|
+
// * - `"status"`: 読み上げ中の内容を遮らず、区切りで読み上げる。補足・成功向け
|
|
6456
|
+
// * - `"off"`: 読み上げ領域にしない(role を付けない)。画面表示時から出ている静的な補足向け
|
|
6457
|
+
// */
|
|
6458
|
+
// type AlertLive = "alert" | "status" | "off"
|
|
6459
|
+
//
|
|
6460
|
+
// /** variant ごとの既定の読み上げ。error / warning 系は assertive、info / success / 補足系は polite。 */
|
|
6461
|
+
// const defaultAlertLive = (variant: AlertVariant): Exclude<AlertLive, "off"> =>
|
|
6462
|
+
// variant === "error" ||
|
|
6463
|
+
// variant === "warning" ||
|
|
6464
|
+
// variant === "inline-caution" ||
|
|
6465
|
+
// variant === "inline-warning"
|
|
6466
|
+
// ? "alert"
|
|
6467
|
+
// : "status"
|
|
6468
|
+
//
|
|
6469
|
+
// /** `role`(明示指定)> `live` > variant の既定、の順で role 属性の値を決める。 */
|
|
6470
|
+
// const resolveAlertRole = (
|
|
6471
|
+
// variant: AlertVariant,
|
|
6472
|
+
// live: AlertLive | undefined,
|
|
6473
|
+
// role: React.AriaRole | undefined,
|
|
6474
|
+
// ): React.AriaRole | undefined => {
|
|
6475
|
+
// if (role !== undefined) return role
|
|
6476
|
+
// const effective = live ?? defaultAlertLive(variant)
|
|
6477
|
+
// return effective === "off" ? undefined : effective
|
|
6478
|
+
// }
|
|
6479
|
+
//
|
|
6415
6480
|
// type AlertProps = React.ComponentProps<"div"> &
|
|
6416
6481
|
// VariantProps<typeof alertVariants> & {
|
|
6417
6482
|
// /**
|
|
6483
|
+
// * 読み上げの強さ。未指定は variant で決まる
|
|
6484
|
+
// * (error / warning / inline-caution / inline-warning は "alert"、success / info / inline-info は "status")。
|
|
6485
|
+
// * "off" で role を付けない。`role` を直接渡した場合はそちらが優先。
|
|
6486
|
+
// */
|
|
6487
|
+
// live?: AlertLive
|
|
6488
|
+
// /**
|
|
6418
6489
|
// * prop-based API のタイトル(旧 Banner.title 相当)。
|
|
6419
6490
|
// * children と排他(children 優先)。bordered / inline 両 variant で有効。
|
|
6420
6491
|
// */
|
|
@@ -6435,8 +6506,11 @@ export {
|
|
|
6435
6506
|
// description,
|
|
6436
6507
|
// icon,
|
|
6437
6508
|
// action,
|
|
6509
|
+
// live,
|
|
6510
|
+
// role,
|
|
6438
6511
|
// ...props
|
|
6439
6512
|
// }: AlertProps) {
|
|
6513
|
+
// const resolvedRole = resolveAlertRole(variant, live, role)
|
|
6440
6514
|
// const bordered = isBorderedVariant(variant)
|
|
6441
6515
|
// const inline = isInlineVariant(variant)
|
|
6442
6516
|
// const usePropBased = (bordered || inline) && !children && (title || description)
|
|
@@ -6453,7 +6527,7 @@ export {
|
|
|
6453
6527
|
// <div
|
|
6454
6528
|
// data-slot="alert"
|
|
6455
6529
|
// data-variant={variant}
|
|
6456
|
-
// role=
|
|
6530
|
+
// role={resolvedRole}
|
|
6457
6531
|
// className={cn(alertVariants({ variant }), className)}
|
|
6458
6532
|
// {...props}
|
|
6459
6533
|
// >
|
|
@@ -6487,7 +6561,7 @@ export {
|
|
|
6487
6561
|
// <div
|
|
6488
6562
|
// data-slot="alert"
|
|
6489
6563
|
// data-variant={variant}
|
|
6490
|
-
// role=
|
|
6564
|
+
// role={resolvedRole}
|
|
6491
6565
|
// className={cn(alertVariants({ variant }), className)}
|
|
6492
6566
|
// {...props}
|
|
6493
6567
|
// >
|
|
@@ -6516,7 +6590,7 @@ export {
|
|
|
6516
6590
|
// <div
|
|
6517
6591
|
// data-slot="alert"
|
|
6518
6592
|
// data-variant={variant}
|
|
6519
|
-
// role=
|
|
6593
|
+
// role={resolvedRole}
|
|
6520
6594
|
// className={cn(alertVariants({ variant }), className)}
|
|
6521
6595
|
// {...props}
|
|
6522
6596
|
// >
|
|
@@ -6532,7 +6606,7 @@ export {
|
|
|
6532
6606
|
//
|
|
6533
6607
|
// /* --- Title variant styles --- */
|
|
6534
6608
|
// const alertTitleVariants: Record<string, string> = {
|
|
6535
|
-
// success: "text-[var(--
|
|
6609
|
+
// success: "text-[var(--Text-Success)]",
|
|
6536
6610
|
// info: "text-[var(--Text-High-Emphasis)]",
|
|
6537
6611
|
// error: "text-[var(--Text-Caution)]",
|
|
6538
6612
|
// warning: "text-[var(--Text-Warning)]",
|
|
@@ -6742,13 +6816,13 @@ export {
|
|
|
6742
6816
|
// destructive:
|
|
6743
6817
|
// "bg-[var(--Surface-Caution)] text-[var(--Text-on-Inverse)] focus-visible:ring-destructive/20 [a&]:hover:bg-destructive/90",
|
|
6744
6818
|
// success:
|
|
6745
|
-
// "bg-[var(--
|
|
6819
|
+
// "bg-[var(--Surface-Success)] text-[var(--Text-on-Inverse)] [a&]:hover:bg-[var(--Primitive-Teal-900)] dark:[a&]:hover:bg-[var(--Primitive-Forest-700)]",
|
|
6746
6820
|
//
|
|
6747
6821
|
// // ── サブトル(薄い背景 + 色文字)— ステータス表示用 ──
|
|
6748
6822
|
// "info-subtle":
|
|
6749
6823
|
// "bg-[var(--Primitive-Sea-100)] text-[var(--Primitive-Sea-700)]",
|
|
6750
6824
|
// "success-subtle":
|
|
6751
|
-
// "bg-[var(--
|
|
6825
|
+
// "bg-[var(--Surface-Success-Light)] text-[var(--Text-Success)]",
|
|
6752
6826
|
// "accent-subtle":
|
|
6753
6827
|
// "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)]",
|
|
6754
6828
|
// "caution-subtle":
|
|
@@ -6756,15 +6830,15 @@ export {
|
|
|
6756
6830
|
// "warning-subtle":
|
|
6757
6831
|
// "bg-[var(--Surface-Warning)] text-[var(--Text-Warning)] border-[var(--Primitive-Wood-200)]",
|
|
6758
6832
|
// "muted-subtle":
|
|
6759
|
-
// "bg-[var(--Surface-Tertiary)] text-[var(--Text-Medium-Emphasis)]",
|
|
6833
|
+
// "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Medium-Emphasis)]",
|
|
6760
6834
|
//
|
|
6761
6835
|
// // ── 構造系 ──
|
|
6762
6836
|
// secondary:
|
|
6763
|
-
// "bg-[var(--Surface-Secondary)] text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Tertiary)]",
|
|
6837
|
+
// "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
6764
6838
|
// outline:
|
|
6765
|
-
// "border-[var(--Border-Medium-Emphasis)] text-[var(--Text-High-Emphasis)] [a&]:hover:bg-[var(--Surface-Secondary)]",
|
|
6839
|
+
// "border-[var(--Border-Medium-Emphasis)] text-[var(--Text-High-Emphasis)] [a&]:hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
6766
6840
|
// ghost:
|
|
6767
|
-
// "text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Secondary)]",
|
|
6841
|
+
// "text-[var(--Text-Medium-Emphasis)] [a&]:hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
6768
6842
|
// link: "text-[var(--Brand-Cake-Orange)] underline-offset-4 [a&]:hover:underline",
|
|
6769
6843
|
// },
|
|
6770
6844
|
// },
|
|
@@ -6931,13 +7005,13 @@ export {
|
|
|
6931
7005
|
// variants: {
|
|
6932
7006
|
// variant: {
|
|
6933
7007
|
// default:
|
|
6934
|
-
// "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Primary-Button)] active:bg-[var(--Active-Primary-Button)] disabled:bg-[var(--Surface-Tertiary)] disabled:text-[var(--Text-Disable)]",
|
|
7008
|
+
// "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Hover-Primary-Button)] active:bg-[var(--Active-Primary-Button)] disabled:bg-[var(--Surface-Neutral-Tertiary)] disabled:text-[var(--Text-Disable)]",
|
|
6935
7009
|
// secondary:
|
|
6936
|
-
// "border border-transparent bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)] hover:border-[var(--Hover-Primary-Button)] hover:bg-[var(--Hover-Secondary-Button)] hover:text-[var(--Hover-Primary-Button)] active:border-[var(--Active-Primary-Button)] active:bg-[var(--Active-Secondary-Button)] active:text-[var(--Active-Primary-Button)] disabled:border-transparent disabled:bg-[var(--Surface-Tertiary)] disabled:text-[var(--Text-Disable)]",
|
|
7010
|
+
// "border border-transparent bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)] hover:border-[var(--Hover-Primary-Button)] hover:bg-[var(--Hover-Secondary-Button)] hover:text-[var(--Hover-Primary-Button)] active:border-[var(--Active-Primary-Button)] active:bg-[var(--Active-Secondary-Button)] active:text-[var(--Active-Primary-Button)] disabled:border-transparent disabled:bg-[var(--Surface-Neutral-Tertiary)] disabled:text-[var(--Text-Disable)]",
|
|
6937
7011
|
// tertiary:
|
|
6938
|
-
// "bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] hover:bg-[var(--Hover-Tertiary-Button)] active:bg-[var(--Active-Tertiary-Button)] disabled:text-[var(--Text-Disable)]",
|
|
7012
|
+
// "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] hover:bg-[var(--Hover-Tertiary-Button)] active:bg-[var(--Active-Tertiary-Button)] disabled:text-[var(--Text-Disable)]",
|
|
6939
7013
|
// destructive:
|
|
6940
|
-
// "bg-[var(--Surface-Caution)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Primitive-Sun-900)] active:bg-[var(--Primitive-Sun-900)] disabled:bg-[var(--Surface-Tertiary)] disabled:text-[var(--Text-Disable)]",
|
|
7014
|
+
// "bg-[var(--Surface-Caution)] text-[var(--Text-on-Inverse)] hover:bg-[var(--Primitive-Sun-900)] active:bg-[var(--Primitive-Sun-900)] disabled:bg-[var(--Surface-Neutral-Tertiary)] disabled:text-[var(--Text-Disable)]",
|
|
6941
7015
|
// ghost:
|
|
6942
7016
|
// "text-[var(--Text-High-Emphasis)] hover:bg-[var(--Hover-Text-Button)] active:bg-[var(--Active-Text-Button)] disabled:text-[var(--Text-Disable)]",
|
|
6943
7017
|
// /**
|
|
@@ -6977,7 +7051,7 @@ export {
|
|
|
6977
7051
|
// // 下地 Surface-Overlay-Light は「メディア上の可読性のため light/dark で切替えない」
|
|
6978
7052
|
// // 設計(常に白80%)。文字色にセマンティック(dark で白に反転する Text-High-Emphasis)を
|
|
6979
7053
|
// // 使うとダークモードで白地×白文字になり消えるため、文字も非反転の Primitive 固定にする
|
|
6980
|
-
// "border border-[var(--Border-Hairline)] bg-[var(--Surface-Overlay-Light)] text-[var(--Primitive-Gray-900)] shadow-md backdrop-blur-sm hover:bg-[var(--Primitive-White-alpha-900)] active:bg-[var(--Primitive-White-alpha-1000)] disabled:bg-[var(--Surface-Tertiary)] disabled:text-[var(--Text-Disable)] disabled:shadow-none",
|
|
7054
|
+
// "border border-[var(--Border-Hairline)] bg-[var(--Surface-Overlay-Light)] text-[var(--Primitive-Gray-900)] shadow-md backdrop-blur-sm hover:bg-[var(--Primitive-White-alpha-900)] active:bg-[var(--Primitive-White-alpha-1000)] disabled:bg-[var(--Surface-Neutral-Tertiary)] disabled:text-[var(--Text-Disable)] disabled:shadow-none",
|
|
6981
7055
|
// },
|
|
6982
7056
|
// size: {
|
|
6983
7057
|
// /**
|
|
@@ -7520,12 +7594,12 @@ export {
|
|
|
7520
7594
|
// * ## サーフェス文脈の伝播(#150)
|
|
7521
7595
|
// *
|
|
7522
7596
|
// * `Section background="subtle" | "accent-subtle"` は配下に `--card-surface: var(--Surface-Primary)`
|
|
7523
|
-
// *
|
|
7524
|
-
// * 「あとからカードを1枚足したら prop
|
|
7597
|
+
// * を流す。そのため**色地の Section に置いた Card は `surface` 未指定でも自動で白**になり、
|
|
7598
|
+
// * 「あとからカードを1枚足したら prop を付け忘れて色地に沈む」事故が構造的に起きない。
|
|
7525
7599
|
// *
|
|
7526
7600
|
// * 伝播は CSS カスタムプロパティのカスケードだけで成立する(React context 不使用)。
|
|
7527
7601
|
// * したがって Card / Section は Server Component のまま使え、DS の `Section` を使わない
|
|
7528
|
-
// *
|
|
7602
|
+
// * 自前の色地でも同じ効果を得られる:
|
|
7529
7603
|
// *
|
|
7530
7604
|
// * ```tsx
|
|
7531
7605
|
// * // 任意の要素にサーフェス文脈を宣言する(consumer 側の escape hatch)
|
|
@@ -7754,13 +7828,13 @@ export {
|
|
|
7754
7828
|
// // lint-scratch-allow: p-[15px] は border-2 を含めた見た目余白を Figma に合わせる補正値
|
|
7755
7829
|
// "group flex cursor-pointer gap-2 rounded-lg border-2 border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] p-[15px] text-left outline-none transition-colors",
|
|
7756
7830
|
// expandedContent ? "flex-col items-stretch" : "items-center",
|
|
7757
|
-
// "hover:border-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Secondary)]",
|
|
7831
|
+
// "hover:border-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
7758
7832
|
// "data-[state=checked]:border-[var(--Object-Accent-Primary)] data-[state=checked]:bg-[var(--Surface-Primary)]",
|
|
7759
7833
|
// // フォーカス意匠は DS 共通(FOCUS_RING = 緑リング)。以前はオレンジの
|
|
7760
7834
|
// // ring-2 で選択状態と紛らわしかったため統一した。
|
|
7761
7835
|
// FOCUS_RING,
|
|
7762
7836
|
// "aria-invalid:border-[var(--Border-Caution)]",
|
|
7763
|
-
// "disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Secondary)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Secondary)]",
|
|
7837
|
+
// "disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
7764
7838
|
// className,
|
|
7765
7839
|
// )}
|
|
7766
7840
|
// {...props}
|
|
@@ -7774,7 +7848,7 @@ export {
|
|
|
7774
7848
|
// // lint-scratch-allow: rounded-[5px] は Figma チェックボックス固有値(トークン外)
|
|
7775
7849
|
// "flex size-5 shrink-0 items-center justify-center rounded-[5px] border-2 border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] transition-colors",
|
|
7776
7850
|
// "group-data-[state=checked]:border-transparent group-data-[state=checked]:bg-transparent",
|
|
7777
|
-
// "group-data-[disabled]:border-[var(--Border-Medium-Emphasis)] group-data-[disabled]:bg-[var(--Surface-Secondary)]",
|
|
7851
|
+
// "group-data-[disabled]:border-[var(--Border-Medium-Emphasis)] group-data-[disabled]:bg-[var(--Surface-Neutral-Secondary)]",
|
|
7778
7852
|
// )}
|
|
7779
7853
|
// >
|
|
7780
7854
|
// <CheckboxPrimitive.Indicator
|
|
@@ -8169,8 +8243,8 @@ export {
|
|
|
8169
8243
|
// data-disabled={props.disabled || undefined}
|
|
8170
8244
|
// className={cn(
|
|
8171
8245
|
// "flex items-center gap-3 rounded-md px-3 py-2 transition-colors cursor-pointer",
|
|
8172
|
-
// "hover:bg-[var(--Surface-Tertiary)]",
|
|
8173
|
-
// "has-[:focus-visible]:bg-[var(--Surface-Tertiary)]",
|
|
8246
|
+
// "hover:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
8247
|
+
// "has-[:focus-visible]:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
8174
8248
|
// props.disabled && "cursor-not-allowed opacity-60 hover:bg-transparent has-[:focus-visible]:bg-transparent",
|
|
8175
8249
|
// containerClassName,
|
|
8176
8250
|
// )}
|
|
@@ -8223,15 +8297,15 @@ export {
|
|
|
8223
8297
|
// variants: {
|
|
8224
8298
|
// variant: {
|
|
8225
8299
|
// filled: [
|
|
8226
|
-
// "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)]",
|
|
8227
|
-
// "hover:bg-[var(--Surface-Tertiary)]",
|
|
8228
|
-
// "disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Secondary)]",
|
|
8300
|
+
// "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-High-Emphasis)]",
|
|
8301
|
+
// "hover:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
8302
|
+
// "disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
8229
8303
|
// ].join(" "),
|
|
8230
8304
|
// /** accent — 薄いブランド色地 + ブランド色文字。Chip の selected は使わなくなった(明示指定の互換のために残す) */
|
|
8231
8305
|
// accent: [
|
|
8232
8306
|
// "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)]",
|
|
8233
8307
|
// "hover:bg-[var(--Surface-Accent-Primary)] hover:text-[var(--Text-on-Inverse)]",
|
|
8234
|
-
// "disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Secondary)] disabled:hover:text-[var(--Text-Disable)]",
|
|
8308
|
+
// "disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:text-[var(--Text-Disable)] disabled:hover:bg-[var(--Surface-Neutral-Secondary)] disabled:hover:text-[var(--Text-Disable)]",
|
|
8235
8309
|
// ].join(" "),
|
|
8236
8310
|
// /**
|
|
8237
8311
|
// * selected — Chip の選択中。ブランド色を使わず、グレー地 + 1px の黒系の枠で示す
|
|
@@ -8241,9 +8315,9 @@ export {
|
|
|
8241
8315
|
// * forced-colors では box-shadow が消えるため、Chip 側が Highlight の塗りで選択中を示す。
|
|
8242
8316
|
// */
|
|
8243
8317
|
// selected: [
|
|
8244
|
-
// "bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] inset-ring-1 inset-ring-[var(--Border-High-Emphasis)]",
|
|
8318
|
+
// "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] inset-ring-1 inset-ring-[var(--Border-High-Emphasis)]",
|
|
8245
8319
|
// "hover:bg-[var(--Hover-Tertiary-Button)]",
|
|
8246
|
-
// "disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:inset-ring-transparent disabled:hover:bg-[var(--Surface-Secondary)]",
|
|
8320
|
+
// "disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:text-[var(--Text-Disable)] disabled:inset-ring-transparent disabled:hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
8247
8321
|
// ].join(" "),
|
|
8248
8322
|
// },
|
|
8249
8323
|
// size: {
|
|
@@ -8616,9 +8690,9 @@ export {
|
|
|
8616
8690
|
// * - 同時に複数呼ばれたら待ち行列にして 1 件ずつ表示する。
|
|
8617
8691
|
// * - Provider が unmount されたとき、未解決の confirm は false で resolve する
|
|
8618
8692
|
// * (画面遷移で await が宙に浮いたままにならないようにする)。unmount 後の呼び出しも即 false。
|
|
8619
|
-
// * - 閉じた後は confirm() を呼んだ時点でフォーカスがあった要素へ戻す(
|
|
8620
|
-
// *
|
|
8621
|
-
// *
|
|
8693
|
+
// * - 閉じた後は confirm() を呼んだ時点でフォーカスがあった要素へ戻す(AlertDialogContent の
|
|
8694
|
+
// * 共通の復帰は「開いた時点の要素」を使うため、メニューから呼んだときに戻せない。ここで上書きする)。
|
|
8695
|
+
// * 閉じるアニメーション中に次の confirm() が来ても、最後に閉じたときは元の呼び出し元へ戻る。
|
|
8622
8696
|
// */
|
|
8623
8697
|
// function ConfirmDialogProvider({ children }: ConfirmDialogProviderProps) {
|
|
8624
8698
|
// const [state, setState] = React.useState<ConfirmQueueState>(INITIAL_STATE)
|
|
@@ -8673,7 +8747,10 @@ export {
|
|
|
8673
8747
|
//
|
|
8674
8748
|
// // 閉じた後のフォーカスを呼び出し元へ戻す(AlertDialogContent の onCloseAutoFocus)
|
|
8675
8749
|
// const restoreFocus = React.useCallback((event: Event, request: ConfirmRequest) => {
|
|
8676
|
-
// //
|
|
8750
|
+
// // AlertDialogContent も「開いたときの要素」へ戻すが、確認ダイアログは自前で戻す。
|
|
8751
|
+
// // 共通の復帰処理には、戻り先を confirm() を呼んだ時点で覚える(開いた時点ではメニュー項目が
|
|
8752
|
+
// // 既に消えている)・消えていたらメニューのトリガーへ戻す・待ち行列の次の確認へ引き継ぐ、の
|
|
8753
|
+
// // 3 点が無いため。preventDefault すると AlertDialogContent 側は何もしない
|
|
8677
8754
|
// event.preventDefault()
|
|
8678
8755
|
// // 待ち行列の次の確認が既に開いてフォーカスを持っているなら動かさない
|
|
8679
8756
|
// // (閉じた側の通知は Radix が setTimeout で遅らせて出すため、次の表示より後に届く)
|
|
@@ -9165,7 +9242,7 @@ export {
|
|
|
9165
9242
|
// {
|
|
9166
9243
|
// variants: {
|
|
9167
9244
|
// state: {
|
|
9168
|
-
// default: "hover:bg-[var(--Surface-Tertiary)]",
|
|
9245
|
+
// default: "hover:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
9169
9246
|
// selected: "bg-[var(--Surface-Accent-Primary-Light)] hover:bg-[var(--Surface-Accent-Primary-Light)] border-l-[3px] border-l-[var(--Brand-Cake-Orange)]",
|
|
9170
9247
|
// },
|
|
9171
9248
|
// },
|
|
@@ -9175,15 +9252,95 @@ export {
|
|
|
9175
9252
|
// }
|
|
9176
9253
|
// )
|
|
9177
9254
|
//
|
|
9255
|
+
// /**
|
|
9256
|
+
// * 行の onClick / Enter・Space を発火させない「入れ子の操作要素」のセレクタ。
|
|
9257
|
+
// * セル内の Select・入力欄・リンク・ボタンを操作したとき、行(詳細を開く・選択トグル等)まで
|
|
9258
|
+
// * 反応させないために使う。行自身は含まない。
|
|
9259
|
+
// * セルの td に `data-table-ignore-row-click` を付けると、そのセル内の操作も行へ伝えない。
|
|
9260
|
+
// */
|
|
9261
|
+
// const DATA_TABLE_INTERACTIVE_SELECTOR = [
|
|
9262
|
+
// "a[href]",
|
|
9263
|
+
// "button",
|
|
9264
|
+
// "input",
|
|
9265
|
+
// "select",
|
|
9266
|
+
// "textarea",
|
|
9267
|
+
// "label",
|
|
9268
|
+
// "[contenteditable]:not([contenteditable='false'])",
|
|
9269
|
+
// "[role='button']",
|
|
9270
|
+
// "[role='link']",
|
|
9271
|
+
// "[role='menuitem']",
|
|
9272
|
+
// "[role='checkbox']",
|
|
9273
|
+
// "[role='radio']",
|
|
9274
|
+
// "[role='switch']",
|
|
9275
|
+
// "[role='combobox']",
|
|
9276
|
+
// "[role='option']",
|
|
9277
|
+
// "[role='listbox']",
|
|
9278
|
+
// "[role='dialog']",
|
|
9279
|
+
// "[data-table-ignore-row-click]",
|
|
9280
|
+
// ].join(",")
|
|
9281
|
+
//
|
|
9282
|
+
// /**
|
|
9283
|
+
// * イベントが行の内側の操作要素、または行の DOM の外(Radix の Portal 先)から来たかを判定する。
|
|
9284
|
+
// *
|
|
9285
|
+
// * Select の選択肢・Popover・Dialog の中身は body へ Portal されるため DOM 上は行の子孫ではないが、
|
|
9286
|
+
// * React の合成イベントは Portal を越えて行まで届く。`closest()` だけでは判定できないので、
|
|
9287
|
+
// * `currentTarget` の DOM の外から来たイベントは入れ子の操作として扱う。
|
|
9288
|
+
// * `closest()` で見つけた要素は行の内側にあるものだけを数える(表ごと `role="dialog"` の中に置いても
|
|
9289
|
+
// * 行クリックが全部止まらないようにする)。
|
|
9290
|
+
// */
|
|
9291
|
+
// function isFromNestedInteractive(
|
|
9292
|
+
// event: React.SyntheticEvent<HTMLElement>
|
|
9293
|
+
// ): boolean {
|
|
9294
|
+
// const target = event.target
|
|
9295
|
+
// const currentTarget = event.currentTarget
|
|
9296
|
+
// if (!(target instanceof Node)) return false
|
|
9297
|
+
// if (target === currentTarget) return false
|
|
9298
|
+
// if (!currentTarget.contains(target)) return true
|
|
9299
|
+
// if (!(target instanceof Element)) return false
|
|
9300
|
+
// const interactive = target.closest(DATA_TABLE_INTERACTIVE_SELECTOR)
|
|
9301
|
+
// return Boolean(
|
|
9302
|
+
// interactive && interactive !== currentTarget && currentTarget.contains(interactive)
|
|
9303
|
+
// )
|
|
9304
|
+
// }
|
|
9305
|
+
//
|
|
9178
9306
|
// function DataTableRow({
|
|
9179
9307
|
// className,
|
|
9180
9308
|
// state,
|
|
9309
|
+
// onClick,
|
|
9310
|
+
// onKeyDown,
|
|
9181
9311
|
// ...props
|
|
9182
9312
|
// }: React.ComponentProps<"tr"> & VariantProps<typeof dataTableRowVariants>) {
|
|
9183
9313
|
// return (
|
|
9184
9314
|
// <tr
|
|
9185
9315
|
// data-slot="data-table-row"
|
|
9186
9316
|
// className={cn(dataTableRowVariants({ state }), className)}
|
|
9317
|
+
// // セル内の Select・入力欄・リンク・ボタン(と Portal 先のポップアップ)の操作は、行の onClick に渡さない
|
|
9318
|
+
// onClick={
|
|
9319
|
+
// onClick
|
|
9320
|
+
// ? (event) => {
|
|
9321
|
+
// // 子の処理が preventDefault したクリック(リンクの遷移を止めた等)は行の操作として扱わない
|
|
9322
|
+
// if (event.defaultPrevented || isFromNestedInteractive(event)) return
|
|
9323
|
+
// onClick(event)
|
|
9324
|
+
// }
|
|
9325
|
+
// : undefined
|
|
9326
|
+
// }
|
|
9327
|
+
// // 行に付けたキー処理は、子が preventDefault したキーを(キーの種類に関わらず)渡さない。
|
|
9328
|
+
// // セル内の操作要素から来た Enter / Space も渡さない(操作要素自身の確定操作のため)。Tab や矢印は、子が止めていなければ渡す
|
|
9329
|
+
// onKeyDown={
|
|
9330
|
+
// onKeyDown
|
|
9331
|
+
// ? (event) => {
|
|
9332
|
+
// // 子が preventDefault したキーは行へ渡さない
|
|
9333
|
+
// if (event.defaultPrevented) return
|
|
9334
|
+
// if (
|
|
9335
|
+
// (event.key === "Enter" || event.key === " ") &&
|
|
9336
|
+
// isFromNestedInteractive(event)
|
|
9337
|
+
// ) {
|
|
9338
|
+
// return
|
|
9339
|
+
// }
|
|
9340
|
+
// onKeyDown(event)
|
|
9341
|
+
// }
|
|
9342
|
+
// : undefined
|
|
9343
|
+
// }
|
|
9187
9344
|
// {...props}
|
|
9188
9345
|
// />
|
|
9189
9346
|
// )
|
|
@@ -9229,7 +9386,7 @@ export {
|
|
|
9229
9386
|
// className={cn(
|
|
9230
9387
|
// "h-16 px-4 text-left align-middle typo-label-sm whitespace-nowrap text-[var(--Text-Medium-Emphasis)]",
|
|
9231
9388
|
// "[&:has([role=checkbox])]:w-12 [&:has([role=checkbox])]:pr-0",
|
|
9232
|
-
// sortable && "hover:bg-[var(--Surface-Tertiary)]",
|
|
9389
|
+
// sortable && "hover:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
9233
9390
|
// width === "max" && "min-w-[320px] max-w-[360px]",
|
|
9234
9391
|
// width === "hug" && "min-w-0 w-0",
|
|
9235
9392
|
// className
|
|
@@ -9518,7 +9675,7 @@ export {
|
|
|
9518
9675
|
// return (
|
|
9519
9676
|
// <tr
|
|
9520
9677
|
// data-slot="data-table-add-row"
|
|
9521
|
-
// className={cn("border-b border-[var(--Border-Low-Emphasis)] hover:bg-[var(--Surface-Tertiary)] cursor-pointer transition-colors", className)}
|
|
9678
|
+
// className={cn("border-b border-[var(--Border-Low-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)] cursor-pointer transition-colors", className)}
|
|
9522
9679
|
// onClick={onClick}
|
|
9523
9680
|
// {...props}
|
|
9524
9681
|
// >
|
|
@@ -9596,7 +9753,7 @@ export {
|
|
|
9596
9753
|
// return (
|
|
9597
9754
|
// <DataTableCell className={cn("min-w-[200px]", className)} {...props}>
|
|
9598
9755
|
// <div className="flex items-center gap-3">
|
|
9599
|
-
// <div className="size-10 rounded-lg bg-[var(--Surface-Tertiary)] overflow-hidden shrink-0">
|
|
9756
|
+
// <div className="size-10 rounded-lg bg-[var(--Surface-Neutral-Tertiary)] overflow-hidden shrink-0">
|
|
9600
9757
|
// {src && (
|
|
9601
9758
|
// <img
|
|
9602
9759
|
// src={src}
|
|
@@ -9759,7 +9916,7 @@ export {
|
|
|
9759
9916
|
// }) {
|
|
9760
9917
|
// return (
|
|
9761
9918
|
// <DataTableCell
|
|
9762
|
-
// className={cn("hover:bg-[var(--Surface-Tertiary)] cursor-pointer p-0", className)}
|
|
9919
|
+
// className={cn("hover:bg-[var(--Surface-Neutral-Tertiary)] cursor-pointer p-0", className)}
|
|
9763
9920
|
// {...props}
|
|
9764
9921
|
// >
|
|
9765
9922
|
// <Select value={value} onValueChange={onValueChange}>
|
|
@@ -9823,17 +9980,40 @@ export {
|
|
|
9823
9980
|
// export type { SortDirection }
|
|
9824
9981
|
//
|
|
9825
9982
|
// src/components/foundations/dialog.tsx
|
|
9983
|
+
// "use client"
|
|
9984
|
+
//
|
|
9826
9985
|
// import * as React from "react"
|
|
9827
9986
|
// import { XIcon } from "lucide-react"
|
|
9828
9987
|
// import { Dialog as DialogPrimitive } from "radix-ui"
|
|
9829
9988
|
//
|
|
9830
9989
|
// import { cn } from "@/lib/utils"
|
|
9990
|
+
// import {
|
|
9991
|
+
// OverlayFocusRootContext,
|
|
9992
|
+
// useOverlayFocusRoot,
|
|
9993
|
+
// useRestoreFocusToOpener,
|
|
9994
|
+
// } from "@/lib/focus-restore"
|
|
9995
|
+
// import { composeEscapeKeyDownWithImeGuard } from "@/lib/ime"
|
|
9831
9996
|
// import { Button } from "@/components/foundations/button"
|
|
9832
9997
|
//
|
|
9833
9998
|
// function Dialog({
|
|
9999
|
+
// open,
|
|
10000
|
+
// defaultOpen,
|
|
10001
|
+
// onOpenChange,
|
|
9834
10002
|
// ...props
|
|
9835
10003
|
// }: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
9836
|
-
//
|
|
10004
|
+
// // 閉じたときに opener へフォーカスを戻すための記録(DialogContent が使う)
|
|
10005
|
+
// const { root, handleOpenChange } = useOverlayFocusRoot(open, defaultOpen, onOpenChange)
|
|
10006
|
+
// return (
|
|
10007
|
+
// <OverlayFocusRootContext.Provider value={root}>
|
|
10008
|
+
// <DialogPrimitive.Root
|
|
10009
|
+
// data-slot="dialog"
|
|
10010
|
+
// open={open}
|
|
10011
|
+
// defaultOpen={defaultOpen}
|
|
10012
|
+
// onOpenChange={handleOpenChange}
|
|
10013
|
+
// {...props}
|
|
10014
|
+
// />
|
|
10015
|
+
// </OverlayFocusRootContext.Provider>
|
|
10016
|
+
// )
|
|
9837
10017
|
// }
|
|
9838
10018
|
//
|
|
9839
10019
|
// function DialogTrigger({
|
|
@@ -9899,6 +10079,9 @@ export {
|
|
|
9899
10079
|
// children,
|
|
9900
10080
|
// showCloseButton = true,
|
|
9901
10081
|
// size,
|
|
10082
|
+
// onOpenAutoFocus,
|
|
10083
|
+
// onCloseAutoFocus,
|
|
10084
|
+
// onEscapeKeyDown,
|
|
9902
10085
|
// ...props
|
|
9903
10086
|
// }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9904
10087
|
// showCloseButton?: boolean
|
|
@@ -9917,12 +10100,20 @@ export {
|
|
|
9917
10100
|
// */
|
|
9918
10101
|
// size?: DialogSize
|
|
9919
10102
|
// }) {
|
|
10103
|
+
// // 開いたときの自動フォーカスは従来どおり止める(consumer が onOpenAutoFocus を渡したときは
|
|
10104
|
+
// // その指定に任せる)。閉じたときは、Trigger 無しで開いても、その回に開いた要素へ戻す
|
|
10105
|
+
// const autoFocusHandlers = useRestoreFocusToOpener({
|
|
10106
|
+
// onOpenAutoFocus: onOpenAutoFocus ?? ((e) => e.preventDefault()),
|
|
10107
|
+
// onCloseAutoFocus,
|
|
10108
|
+
// })
|
|
9920
10109
|
// return (
|
|
9921
10110
|
// <DialogPortal data-slot="dialog-portal">
|
|
9922
10111
|
// <DialogOverlay />
|
|
9923
10112
|
// <DialogPrimitive.Content
|
|
9924
10113
|
// data-slot="dialog-content"
|
|
9925
|
-
//
|
|
10114
|
+
// {...autoFocusHandlers}
|
|
10115
|
+
// // 日本語入力の変換中の Esc(変換の取り消し)では閉じない
|
|
10116
|
+
// onEscapeKeyDown={composeEscapeKeyDownWithImeGuard(onEscapeKeyDown)}
|
|
9926
10117
|
// className={cn(
|
|
9927
10118
|
// "fixed top-[50%] left-[50%] z-[var(--Z-Modal)] grid w-[calc(100%_-_32px)] max-w-[calc(100%_-_32px)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl bg-[var(--Surface-Elevated)] p-6 shadow-lg duration-[var(--Motion-Duration-Base)] outline-none focus-visible:ring-2 focus-visible:ring-[var(--Focus-High-Emphasis)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
9928
10119
|
// // 型に無い size(AlertDialog の "default" と取り違えた JSX など)でも幅の上限を消さず、未指定と同じにする
|
|
@@ -9935,7 +10126,7 @@ export {
|
|
|
9935
10126
|
// {showCloseButton && (
|
|
9936
10127
|
// <DialogPrimitive.Close
|
|
9937
10128
|
// data-slot="dialog-close"
|
|
9938
|
-
// className="absolute top-2 right-2 flex size-10 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus-visible:ring-2 focus-visible:ring-[var(--Focus-High-Emphasis)] focus-visible:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
10129
|
+
// className="absolute top-2 right-2 flex size-10 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Neutral-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus-visible:ring-2 focus-visible:ring-[var(--Focus-High-Emphasis)] focus-visible:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
9939
10130
|
// >
|
|
9940
10131
|
// <XIcon className="size-5" />
|
|
9941
10132
|
// <span className="sr-only">閉じる</span>
|
|
@@ -10029,11 +10220,19 @@ export {
|
|
|
10029
10220
|
// import { Drawer as DrawerPrimitive } from "vaul"
|
|
10030
10221
|
//
|
|
10031
10222
|
// import { cn } from "@/lib/utils"
|
|
10223
|
+
// import { OverlayFocusRootContext, useRestoreFocusToOpener } from "@/lib/focus-restore"
|
|
10224
|
+
// import { composeEscapeKeyDownWithImeGuard } from "@/lib/ime"
|
|
10032
10225
|
//
|
|
10033
10226
|
// function Drawer({
|
|
10034
10227
|
// ...props
|
|
10035
10228
|
// }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
10036
|
-
//
|
|
10229
|
+
// // Drawer は opener の記録を DrawerContent 側に持つ。外側の Dialog / Sheet の記録を
|
|
10230
|
+
// // 誤って使わないよう、ここで切る
|
|
10231
|
+
// return (
|
|
10232
|
+
// <OverlayFocusRootContext.Provider value={null}>
|
|
10233
|
+
// <DrawerPrimitive.Root data-slot="drawer" {...props} />
|
|
10234
|
+
// </OverlayFocusRootContext.Provider>
|
|
10235
|
+
// )
|
|
10037
10236
|
// }
|
|
10038
10237
|
//
|
|
10039
10238
|
// function DrawerTrigger({
|
|
@@ -10073,13 +10272,21 @@ export {
|
|
|
10073
10272
|
// function DrawerContent({
|
|
10074
10273
|
// className,
|
|
10075
10274
|
// children,
|
|
10275
|
+
// onOpenAutoFocus,
|
|
10276
|
+
// onCloseAutoFocus,
|
|
10277
|
+
// onEscapeKeyDown,
|
|
10076
10278
|
// ...props
|
|
10077
10279
|
// }: React.ComponentProps<typeof DrawerPrimitive.Content>) {
|
|
10280
|
+
// // 閉じたときは Trigger 無しで開いても、その回に開いた要素へ戻す
|
|
10281
|
+
// const autoFocusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })
|
|
10078
10282
|
// return (
|
|
10079
10283
|
// <DrawerPortal data-slot="drawer-portal">
|
|
10080
10284
|
// <DrawerOverlay />
|
|
10081
10285
|
// <DrawerPrimitive.Content
|
|
10082
10286
|
// data-slot="drawer-content"
|
|
10287
|
+
// {...autoFocusHandlers}
|
|
10288
|
+
// // 日本語入力の変換中の Esc(変換の取り消し)では閉じない
|
|
10289
|
+
// onEscapeKeyDown={composeEscapeKeyDownWithImeGuard(onEscapeKeyDown)}
|
|
10083
10290
|
// className={cn(
|
|
10084
10291
|
// "group/drawer-content fixed z-[var(--Z-Modal)] flex h-auto flex-col border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Elevated)]",
|
|
10085
10292
|
// "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
@@ -10519,17 +10726,47 @@ export {
|
|
|
10519
10726
|
// )
|
|
10520
10727
|
// }
|
|
10521
10728
|
//
|
|
10729
|
+
// /** FieldSet の子の間隔の段。sm=8px / md=16px / lg=24px */
|
|
10730
|
+
// type FieldSetGap = "sm" | "md" | "lg"
|
|
10731
|
+
//
|
|
10732
|
+
// /**
|
|
10733
|
+
// * gap 指定時のクラス。`<legend>` は fieldset の枠側に描かれ flex の並びに入らないため、
|
|
10734
|
+
// * 子の間隔(gap)とは別に legend の下にも同じ間隔(margin-bottom)を付ける。
|
|
10735
|
+
// * Tailwind の静的抽出のため完全な文字列で持つ。
|
|
10736
|
+
// */
|
|
10737
|
+
// const FIELD_SET_GAP_CLASSES: Record<FieldSetGap, string> = {
|
|
10738
|
+
// sm: "gap-2 [&>[data-slot=field-legend]]:mb-2",
|
|
10739
|
+
// md: "gap-4 [&>[data-slot=field-legend]]:mb-4",
|
|
10740
|
+
// lg: "gap-6 [&>[data-slot=field-legend]]:mb-6",
|
|
10741
|
+
// }
|
|
10742
|
+
//
|
|
10522
10743
|
// /**
|
|
10523
10744
|
// * FieldSet — フォーム全体 or 大きなセクションの枠。
|
|
10524
10745
|
// * `<fieldset>` の既定スタイル(ブラウザ枠線・padding)をリセットし、
|
|
10525
|
-
// *
|
|
10746
|
+
// * 複数 `FieldGroup` を gap-6 の縦リズムで並べる。
|
|
10747
|
+
// *
|
|
10748
|
+
// * `<legend>` は flex の並びに入らないため、`gap` 未指定のときは legend の直下の間隔が 0 になる
|
|
10749
|
+
// * (従来の見た目。既定は変えない)。`gap` を指定すると子の間隔をその段にし、legend の下にも同じ間隔を空ける。
|
|
10526
10750
|
// */
|
|
10527
|
-
// function FieldSet({
|
|
10751
|
+
// function FieldSet({
|
|
10752
|
+
// className,
|
|
10753
|
+
// gap,
|
|
10754
|
+
// ...props
|
|
10755
|
+
// }: React.ComponentProps<"fieldset"> & {
|
|
10756
|
+
// /**
|
|
10757
|
+
// * 子の間隔(opt-in)。"sm"=8px / "md"=16px / "lg"=24px。
|
|
10758
|
+
// * 指定すると FieldLegend の下にも同じ間隔を空ける。未指定は従来どおり gap-6 で legend の直下は 0px。
|
|
10759
|
+
// * 絞り込みの選択肢グループのような詰めた並びは `gap="sm"` + `<FieldLegend size="sm">`。
|
|
10760
|
+
// */
|
|
10761
|
+
// gap?: FieldSetGap
|
|
10762
|
+
// }) {
|
|
10528
10763
|
// return (
|
|
10529
10764
|
// <fieldset
|
|
10530
10765
|
// data-slot="field-set"
|
|
10766
|
+
// data-gap={gap}
|
|
10531
10767
|
// className={cn(
|
|
10532
10768
|
// "flex min-w-0 flex-col gap-6 border-0 p-0",
|
|
10769
|
+
// gap && FIELD_SET_GAP_CLASSES[gap],
|
|
10533
10770
|
// className
|
|
10534
10771
|
// )}
|
|
10535
10772
|
// {...props}
|
|
@@ -10540,12 +10777,26 @@ export {
|
|
|
10540
10777
|
// /**
|
|
10541
10778
|
// * FieldLegend — FieldSet の見出し。`<legend>` として描画。
|
|
10542
10779
|
// */
|
|
10543
|
-
// function FieldLegend({
|
|
10780
|
+
// function FieldLegend({
|
|
10781
|
+
// className,
|
|
10782
|
+
// size,
|
|
10783
|
+
// ...props
|
|
10784
|
+
// }: React.ComponentProps<"legend"> & {
|
|
10785
|
+
// /**
|
|
10786
|
+
// * 見出しの大きさ。
|
|
10787
|
+
// * - "md"(既定): typo-label-lg + Text-High-Emphasis(フォームのセクション見出し・従来)
|
|
10788
|
+
// * - "sm": typo-label-md + Text-Medium-Emphasis(絞り込みの選択肢グループ等の小見出し)
|
|
10789
|
+
// */
|
|
10790
|
+
// size?: "md" | "sm"
|
|
10791
|
+
// }) {
|
|
10544
10792
|
// return (
|
|
10545
10793
|
// <legend
|
|
10546
10794
|
// data-slot="field-legend"
|
|
10795
|
+
// data-size={size}
|
|
10547
10796
|
// className={cn(
|
|
10548
|
-
//
|
|
10797
|
+
// size === "sm"
|
|
10798
|
+
// ? "typo-label-md text-[var(--Text-Medium-Emphasis)]"
|
|
10799
|
+
// : "typo-label-lg text-[var(--Text-High-Emphasis)]",
|
|
10549
10800
|
// className
|
|
10550
10801
|
// )}
|
|
10551
10802
|
// {...props}
|
|
@@ -10649,6 +10900,7 @@ export {
|
|
|
10649
10900
|
// }
|
|
10650
10901
|
// // eslint-disable-next-line react-refresh/only-export-components -- shadcn 慣習: variants はコンポーネントと同居 export(分割は公開 API の破壊変更)
|
|
10651
10902
|
// export { fieldVariants }
|
|
10903
|
+
// export type { FieldSetGap }
|
|
10652
10904
|
// export type FieldProps = React.ComponentProps<"div"> &
|
|
10653
10905
|
// VariantProps<typeof fieldVariants>
|
|
10654
10906
|
//
|
|
@@ -10878,7 +11130,7 @@ export {
|
|
|
10878
11130
|
// // :hover:focus-within は詳細度が :hover より高いので確実に上書きできる。
|
|
10879
11131
|
// "[&:hover:focus-within]:border-[var(--Focus-High-Emphasis)] [&:hover:focus-within]:outline-transparent",
|
|
10880
11132
|
// disabled &&
|
|
10881
|
-
// "pointer-events-none border-transparent bg-[var(--Surface-Tertiary)] text-[var(--Text-Disable)]",
|
|
11133
|
+
// "pointer-events-none border-transparent bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Disable)]",
|
|
10882
11134
|
// )}
|
|
10883
11135
|
// >
|
|
10884
11136
|
// <Paperclip className="size-4" aria-hidden="true" />
|
|
@@ -11201,6 +11453,8 @@ export {
|
|
|
11201
11453
|
// export { IconBadge, iconBadgeVariants }
|
|
11202
11454
|
//
|
|
11203
11455
|
// src/components/foundations/input.tsx
|
|
11456
|
+
// "use client"
|
|
11457
|
+
//
|
|
11204
11458
|
// import * as React from "react"
|
|
11205
11459
|
//
|
|
11206
11460
|
// import { cn } from "@/lib/utils"
|
|
@@ -11262,7 +11516,7 @@ export {
|
|
|
11262
11516
|
// // tokens.json の touchTarget["text-input"].min = 44px を満たす最小サイズで、
|
|
11263
11517
|
// // 管理画面の情報密度とタッチターゲットのバランスが取れる(iOS HIG の 44pt とも一致)。
|
|
11264
11518
|
// // より大きくしたい場合は consumer が className="h-12" 等で上書きする。
|
|
11265
|
-
// "h-11 w-full min-w-0 rounded-lg border border-[var(--Border-High-Emphasis)] bg-transparent px-3 py-1 typo-body-lg md:typo-body-md transition-[color,box-shadow,border-color] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:typo-label-sm file:text-foreground placeholder:text-muted-foreground hover:border-[var(--Focus-High-Emphasis)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-[var(--Border-Low-Emphasis)] disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:placeholder:text-[var(--Text-Disable)]",
|
|
11519
|
+
// "h-11 w-full min-w-0 rounded-lg border border-[var(--Border-High-Emphasis)] bg-transparent px-3 py-1 typo-body-lg md:typo-body-md transition-[color,box-shadow,border-color] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:typo-label-sm file:text-foreground placeholder:text-muted-foreground hover:border-[var(--Focus-High-Emphasis)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-[var(--Border-Low-Emphasis)] disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:text-[var(--Text-Disable)] disabled:placeholder:text-[var(--Text-Disable)]",
|
|
11266
11520
|
// // フォーカス意匠は DS 共通(FOCUS_RING)。Tailwind の variant 順で
|
|
11267
11521
|
// // focus-visible は hover より後に出力されるため、hover の枠線に必ず勝つ。
|
|
11268
11522
|
// FOCUS_RING,
|
|
@@ -11948,6 +12202,7 @@ export {
|
|
|
11948
12202
|
// import { Popover as PopoverPrimitive } from "radix-ui"
|
|
11949
12203
|
//
|
|
11950
12204
|
// import { cn } from "@/lib/utils"
|
|
12205
|
+
// import { composeEscapeKeyDownWithImeGuard } from "@/lib/ime"
|
|
11951
12206
|
//
|
|
11952
12207
|
// function Popover({
|
|
11953
12208
|
// ...props
|
|
@@ -11965,6 +12220,7 @@ export {
|
|
|
11965
12220
|
// className,
|
|
11966
12221
|
// align = "center",
|
|
11967
12222
|
// sideOffset = 4,
|
|
12223
|
+
// onEscapeKeyDown,
|
|
11968
12224
|
// ...props
|
|
11969
12225
|
// }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
11970
12226
|
// return (
|
|
@@ -11973,6 +12229,8 @@ export {
|
|
|
11973
12229
|
// data-slot="popover-content"
|
|
11974
12230
|
// align={align}
|
|
11975
12231
|
// sideOffset={sideOffset}
|
|
12232
|
+
// // 日本語入力の変換中の Esc(変換の取り消し)では閉じない(Combobox / MultiSelect の検索欄など)
|
|
12233
|
+
// onEscapeKeyDown={composeEscapeKeyDownWithImeGuard(onEscapeKeyDown)}
|
|
11976
12234
|
// // max-w は画面内に使える幅(Radix の available-width)まで。長い項目や className の広い幅でも
|
|
11977
12235
|
// // 幅 390px の画面で右へはみ出さない。収まる幅には効かない(既定の見た目は変わらない)。
|
|
11978
12236
|
// className={cn(
|
|
@@ -12051,9 +12309,21 @@ export {
|
|
|
12051
12309
|
// const hasName =
|
|
12052
12310
|
// props["aria-label"] !== undefined || props["aria-labelledby"] !== undefined
|
|
12053
12311
|
//
|
|
12312
|
+
// // Radix の Root に value を渡すと aria-valuenow / data-state(loading / complete)が付く。
|
|
12313
|
+
// // 0〜max に丸める(max 未指定は 100)。max を渡したのに 100 で丸めると、Radix の範囲検査(0〜max)に
|
|
12314
|
+
// // 通らず不確定(indeterminate)になる。未指定・null・NaN も不確定のままにして、Radix の範囲外エラーを避ける
|
|
12315
|
+
// const max = typeof props.max === "number" && Number.isFinite(props.max) && props.max > 0 ? props.max : 100
|
|
12316
|
+
// const normalized =
|
|
12317
|
+
// typeof value === "number" && Number.isFinite(value)
|
|
12318
|
+
// ? Math.min(max, Math.max(0, value))
|
|
12319
|
+
// : undefined
|
|
12320
|
+
// // 帯の長さは 0〜max を 0〜100% に直したもの
|
|
12321
|
+
// const percent = normalized === undefined ? 0 : (normalized / max) * 100
|
|
12322
|
+
//
|
|
12054
12323
|
// return (
|
|
12055
12324
|
// <ProgressPrimitive.Root
|
|
12056
12325
|
// data-slot="progress"
|
|
12326
|
+
// value={normalized}
|
|
12057
12327
|
// aria-label={hasName ? undefined : "進捗"}
|
|
12058
12328
|
// className={cn(
|
|
12059
12329
|
// "relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
|
|
@@ -12068,7 +12338,7 @@ export {
|
|
|
12068
12338
|
// <ProgressPrimitive.Indicator
|
|
12069
12339
|
// data-slot="progress-indicator"
|
|
12070
12340
|
// className="h-full w-full flex-1 bg-primary transition-all forced-colors:bg-[Highlight]"
|
|
12071
|
-
// style={{ transform: `translateX(-${100 -
|
|
12341
|
+
// style={{ transform: `translateX(-${100 - percent}%)` }}
|
|
12072
12342
|
// />
|
|
12073
12343
|
// </ProgressPrimitive.Root>
|
|
12074
12344
|
// )
|
|
@@ -12084,6 +12354,7 @@ export {
|
|
|
12084
12354
|
//
|
|
12085
12355
|
// import { cn } from "@/lib/utils"
|
|
12086
12356
|
// import { FOCUS_RING } from "@/lib/focus-ring"
|
|
12357
|
+
// import { resolveFieldAria, useFieldLabelling } from "@/lib/field-labelling"
|
|
12087
12358
|
// import { chipVariants } from "@/components/foundations/chip-variants"
|
|
12088
12359
|
//
|
|
12089
12360
|
// /** RadioGroup の描画スタイル。tile=タイル型(既定)/ chip=チップ型(choice chip)。 */
|
|
@@ -12104,6 +12375,11 @@ export {
|
|
|
12104
12375
|
// */
|
|
12105
12376
|
// variant?: RadioGroupVariant
|
|
12106
12377
|
// }) {
|
|
12378
|
+
// // role="radiogroup" は <label for> では名前が付かない。FormField 配下ではラベル id を
|
|
12379
|
+
// // aria-labelledby で、説明・エラーを aria-describedby / aria-invalid で受け取る
|
|
12380
|
+
// // (Select / Switch 等と同じ方針 — issue #202。利用側の明示指定が優先)
|
|
12381
|
+
// const fieldAria = resolveFieldAria(props, useFieldLabelling())
|
|
12382
|
+
//
|
|
12107
12383
|
// return (
|
|
12108
12384
|
// <RadioGroupContext.Provider value={variant}>
|
|
12109
12385
|
// <RadioGroupPrimitive.Root
|
|
@@ -12114,6 +12390,7 @@ export {
|
|
|
12114
12390
|
// className,
|
|
12115
12391
|
// )}
|
|
12116
12392
|
// {...props}
|
|
12393
|
+
// {...fieldAria}
|
|
12117
12394
|
// />
|
|
12118
12395
|
// </RadioGroupContext.Provider>
|
|
12119
12396
|
// )
|
|
@@ -12170,13 +12447,13 @@ export {
|
|
|
12170
12447
|
// // lint-scratch-allow: p-[15px] は border-2 を含めた見た目余白を Figma に合わせる補正値
|
|
12171
12448
|
// "group flex cursor-pointer gap-2 rounded-lg border-2 border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] p-[15px] text-left outline-none transition-colors",
|
|
12172
12449
|
// expandedContent ? "flex-col items-stretch" : "items-center",
|
|
12173
|
-
// "hover:border-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Secondary)]",
|
|
12450
|
+
// "hover:border-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
12174
12451
|
// "data-[state=checked]:border-[var(--Object-Accent-Primary)] data-[state=checked]:bg-[var(--Surface-Primary)]",
|
|
12175
12452
|
// // フォーカス意匠は DS 共通(FOCUS_RING = 緑リング)。以前はオレンジの
|
|
12176
12453
|
// // ring-2 で checked 状態(同じくブランド色の枠)と紛らわしかったため統一した。
|
|
12177
12454
|
// FOCUS_RING,
|
|
12178
12455
|
// "aria-invalid:border-[var(--Border-Caution)]",
|
|
12179
|
-
// "disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Secondary)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Secondary)]",
|
|
12456
|
+
// "disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
12180
12457
|
// className,
|
|
12181
12458
|
// )}
|
|
12182
12459
|
// {...props}
|
|
@@ -12189,14 +12466,17 @@ export {
|
|
|
12189
12466
|
// className={cn(
|
|
12190
12467
|
// "flex size-5 shrink-0 items-center justify-center rounded-full border-2 border-[var(--Border-High-Emphasis)] bg-[var(--Surface-Primary)] transition-colors",
|
|
12191
12468
|
// "group-data-[state=checked]:border-[var(--Object-Accent-Primary)]",
|
|
12192
|
-
// "group-data-[disabled]:border-[var(--Border-Medium-Emphasis)] group-data-[disabled]:bg-[var(--Surface-Secondary)]",
|
|
12469
|
+
// "group-data-[disabled]:border-[var(--Border-Medium-Emphasis)] group-data-[disabled]:bg-[var(--Surface-Neutral-Secondary)]",
|
|
12193
12470
|
// )}
|
|
12194
12471
|
// >
|
|
12195
12472
|
// <RadioGroupPrimitive.Indicator
|
|
12196
12473
|
// data-slot="radio-group-indicator"
|
|
12197
12474
|
// className="flex items-center justify-center"
|
|
12198
12475
|
// >
|
|
12199
|
-
//
|
|
12476
|
+
// {/* 点は背景色で描いているため、forced-colors(Windows ハイコントラスト)では地が Canvas に
|
|
12477
|
+
// 置き換わって選択中でも中が空に見える。forced-colors のときだけ OS の選択色で塗る
|
|
12478
|
+
// (無効時は GrayText)。通常表示は変わらない */}
|
|
12479
|
+
// <span className="size-2.5 rounded-full bg-[var(--Object-Accent-Primary)] forced-colors:bg-[Highlight] forced-colors:group-data-[disabled]:bg-[GrayText]" />
|
|
12200
12480
|
// </RadioGroupPrimitive.Indicator>
|
|
12201
12481
|
// </span>
|
|
12202
12482
|
//
|
|
@@ -12581,6 +12861,8 @@ export {
|
|
|
12581
12861
|
// export { ScrollArea, ScrollBar }
|
|
12582
12862
|
//
|
|
12583
12863
|
// src/components/foundations/select.tsx
|
|
12864
|
+
// "use client"
|
|
12865
|
+
//
|
|
12584
12866
|
// import * as React from "react"
|
|
12585
12867
|
// import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
|
|
12586
12868
|
// import { Select as SelectPrimitive } from "radix-ui"
|
|
@@ -12625,7 +12907,7 @@ export {
|
|
|
12625
12907
|
// data-slot="select-trigger"
|
|
12626
12908
|
// data-size={size}
|
|
12627
12909
|
// className={cn(
|
|
12628
|
-
// "flex w-full items-center justify-between gap-2 rounded-lg border border-[var(--Border-High-Emphasis)] bg-transparent px-3 py-2 typo-body-md whitespace-nowrap transition-[color,box-shadow,border-color] outline-none hover:border-[var(--Focus-High-Emphasis)] hover:bg-[var(--Surface-Secondary)] disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Secondary)] aria-invalid:border-[var(--Border-Caution)] aria-invalid:ring-[var(--Border-Caution)]/20 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
12910
|
+
// "flex w-full items-center justify-between gap-2 rounded-lg border border-[var(--Border-High-Emphasis)] bg-transparent px-3 py-2 typo-body-md whitespace-nowrap transition-[color,box-shadow,border-color] outline-none hover:border-[var(--Focus-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)] disabled:cursor-not-allowed disabled:border-[var(--Border-Medium-Emphasis)] disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:text-[var(--Text-Disable)] disabled:hover:border-[var(--Border-Medium-Emphasis)] disabled:hover:bg-[var(--Surface-Neutral-Secondary)] aria-invalid:border-[var(--Border-Caution)] aria-invalid:ring-[var(--Border-Caution)]/20 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
12629
12911
|
// // フォーカス意匠は DS 共通(FOCUS_RING)。
|
|
12630
12912
|
// FOCUS_RING,
|
|
12631
12913
|
// // 高さは「素のクラス」で当てる。data 属性セレクタ(data-[size=default]:h-10)だと
|
|
@@ -12821,14 +13103,40 @@ export {
|
|
|
12821
13103
|
// export { Separator }
|
|
12822
13104
|
//
|
|
12823
13105
|
// src/components/foundations/sheet.tsx
|
|
13106
|
+
// "use client"
|
|
13107
|
+
//
|
|
12824
13108
|
// import * as React from "react"
|
|
12825
13109
|
// import { XIcon } from "lucide-react"
|
|
12826
13110
|
// import { Dialog as SheetPrimitive } from "radix-ui"
|
|
12827
13111
|
//
|
|
12828
13112
|
// import { cn } from "@/lib/utils"
|
|
13113
|
+
// import {
|
|
13114
|
+
// OverlayFocusRootContext,
|
|
13115
|
+
// useOverlayFocusRoot,
|
|
13116
|
+
// useRestoreFocusToOpener,
|
|
13117
|
+
// } from "@/lib/focus-restore"
|
|
13118
|
+
// import { composeEscapeKeyDownWithImeGuard } from "@/lib/ime"
|
|
12829
13119
|
//
|
|
12830
|
-
// function Sheet({
|
|
12831
|
-
//
|
|
13120
|
+
// function Sheet({
|
|
13121
|
+
// open,
|
|
13122
|
+
// defaultOpen,
|
|
13123
|
+
// onOpenChange,
|
|
13124
|
+
// ...props
|
|
13125
|
+
// }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
|
13126
|
+
// // 閉じたときに opener へフォーカスを戻すための記録。SheetContent ごとではなく Sheet 側に置き、
|
|
13127
|
+
// // 開いたまま consumer が SheetContent を作り直しても(key の変更など)記録を引き継ぐ
|
|
13128
|
+
// const { root, handleOpenChange } = useOverlayFocusRoot(open, defaultOpen, onOpenChange)
|
|
13129
|
+
// return (
|
|
13130
|
+
// <OverlayFocusRootContext.Provider value={root}>
|
|
13131
|
+
// <SheetPrimitive.Root
|
|
13132
|
+
// data-slot="sheet"
|
|
13133
|
+
// open={open}
|
|
13134
|
+
// defaultOpen={defaultOpen}
|
|
13135
|
+
// onOpenChange={handleOpenChange}
|
|
13136
|
+
// {...props}
|
|
13137
|
+
// />
|
|
13138
|
+
// </OverlayFocusRootContext.Provider>
|
|
13139
|
+
// )
|
|
12832
13140
|
// }
|
|
12833
13141
|
//
|
|
12834
13142
|
// function SheetTrigger({
|
|
@@ -12890,6 +13198,7 @@ export {
|
|
|
12890
13198
|
// autoFocus = true,
|
|
12891
13199
|
// onOpenAutoFocus,
|
|
12892
13200
|
// onCloseAutoFocus,
|
|
13201
|
+
// onEscapeKeyDown,
|
|
12893
13202
|
// ...props
|
|
12894
13203
|
// }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
12895
13204
|
// side?: "top" | "right" | "bottom" | "left"
|
|
@@ -12905,24 +13214,30 @@ export {
|
|
|
12905
13214
|
// size?: SheetSize
|
|
12906
13215
|
// showCloseButton?: boolean
|
|
12907
13216
|
// /**
|
|
12908
|
-
// * 開閉時のフォーカス自動移動。既定 true
|
|
13217
|
+
// * 開閉時のフォーカス自動移動。既定 true(開いたら中へ入り、閉じたらその回に開いた要素へ戻る。
|
|
13218
|
+
// * Trigger を使わず state で開いたときも戻る)。
|
|
12909
13219
|
// * WCAG 2.4.3 を満たすため、止めたい特別な事情があるときだけ false にする。
|
|
12910
13220
|
// */
|
|
12911
13221
|
// autoFocus?: boolean
|
|
12912
13222
|
// }) {
|
|
13223
|
+
// const autoFocusHandlers = useRestoreFocusToOpener({
|
|
13224
|
+
// onOpenAutoFocus: (e) => {
|
|
13225
|
+
// if (!autoFocus) e.preventDefault()
|
|
13226
|
+
// onOpenAutoFocus?.(e)
|
|
13227
|
+
// },
|
|
13228
|
+
// onCloseAutoFocus: (e) => {
|
|
13229
|
+
// if (!autoFocus) e.preventDefault()
|
|
13230
|
+
// onCloseAutoFocus?.(e)
|
|
13231
|
+
// },
|
|
13232
|
+
// })
|
|
12913
13233
|
// return (
|
|
12914
13234
|
// <SheetPortal>
|
|
12915
13235
|
// <SheetOverlay />
|
|
12916
13236
|
// <SheetPrimitive.Content
|
|
12917
13237
|
// data-slot="sheet-content"
|
|
12918
|
-
//
|
|
12919
|
-
//
|
|
12920
|
-
//
|
|
12921
|
-
// }}
|
|
12922
|
-
// onCloseAutoFocus={(e) => {
|
|
12923
|
-
// if (!autoFocus) e.preventDefault()
|
|
12924
|
-
// onCloseAutoFocus?.(e)
|
|
12925
|
-
// }}
|
|
13238
|
+
// {...autoFocusHandlers}
|
|
13239
|
+
// // 日本語入力の変換中の Esc(変換の取り消し)では閉じない
|
|
13240
|
+
// onEscapeKeyDown={composeEscapeKeyDownWithImeGuard(onEscapeKeyDown)}
|
|
12926
13241
|
// className={cn(
|
|
12927
13242
|
// "fixed z-[var(--Z-Modal)] flex flex-col gap-4 border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Elevated)] shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-[var(--Motion-Duration-Slow)] data-[state=open]:animate-in data-[state=open]:duration-[var(--Motion-Duration-Slower)]",
|
|
12928
13243
|
// side === "right" &&
|
|
@@ -12941,7 +13256,7 @@ export {
|
|
|
12941
13256
|
// >
|
|
12942
13257
|
// {children}
|
|
12943
13258
|
// {showCloseButton && (
|
|
12944
|
-
// <SheetPrimitive.Close className="absolute top-2 right-2 flex size-10 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus:ring-2 focus:ring-[var(--Focus-High-Emphasis)] focus:outline-hidden disabled:pointer-events-none">
|
|
13259
|
+
// <SheetPrimitive.Close className="absolute top-2 right-2 flex size-10 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Neutral-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus:ring-2 focus:ring-[var(--Focus-High-Emphasis)] focus:outline-hidden disabled:pointer-events-none">
|
|
12945
13260
|
// <XIcon className="size-5" />
|
|
12946
13261
|
// <span className="sr-only">閉じる</span>
|
|
12947
13262
|
// </SheetPrimitive.Close>
|
|
@@ -13021,7 +13336,7 @@ export {
|
|
|
13021
13336
|
// return (
|
|
13022
13337
|
// <div
|
|
13023
13338
|
// data-slot="skeleton"
|
|
13024
|
-
// className={cn("animate-pulse motion-reduce:animate-none rounded-md bg-[var(--Surface-Tertiary)]", className)}
|
|
13339
|
+
// className={cn("animate-pulse motion-reduce:animate-none rounded-md bg-[var(--Surface-Neutral-Tertiary)]", className)}
|
|
13025
13340
|
// {...props}
|
|
13026
13341
|
// />
|
|
13027
13342
|
// )
|
|
@@ -13243,7 +13558,7 @@ export {
|
|
|
13243
13558
|
// <SliderPrimitive.Track
|
|
13244
13559
|
// data-slot="slider-track"
|
|
13245
13560
|
// className={cn(
|
|
13246
|
-
// "relative grow overflow-hidden rounded-full bg-[var(--Surface-Control-Track,var(--Surface-Tertiary))] data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5",
|
|
13561
|
+
// "relative grow overflow-hidden rounded-full bg-[var(--Surface-Control-Track,var(--Surface-Neutral-Tertiary))] data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5",
|
|
13247
13562
|
// // forced-colors(Windows ハイコントラスト)ではレールも範囲も Canvas に置き換わり見えなかった。
|
|
13248
13563
|
// // レールは輪郭線(レイアウトに影響しない outline)、範囲は OS の選択色で示す。通常表示は不変
|
|
13249
13564
|
// "forced-colors:outline forced-colors:outline-1 forced-colors:outline-[CanvasText]"
|
|
@@ -13429,7 +13744,7 @@ export {
|
|
|
13429
13744
|
// TriangleAlertIcon,
|
|
13430
13745
|
// } from "lucide-react"
|
|
13431
13746
|
// import { useTheme } from "next-themes"
|
|
13432
|
-
// import { Toaster as Sonner, type ToasterProps } from "sonner"
|
|
13747
|
+
// import { Toaster as Sonner, toast as sonnerToast, type ToasterProps } from "sonner"
|
|
13433
13748
|
//
|
|
13434
13749
|
// const Toaster = ({ ...props }: ToasterProps) => {
|
|
13435
13750
|
// const { theme = "system" } = useTheme()
|
|
@@ -13453,13 +13768,13 @@ export {
|
|
|
13453
13768
|
// actionButton:
|
|
13454
13769
|
// "!bg-[var(--Brand-Cake-Orange)] !text-[var(--Text-on-Inverse)] !typo-label-sm !rounded-lg !px-4 !py-2 !h-8 hover:!bg-[var(--Hover-Primary-Button)]",
|
|
13455
13770
|
// cancelButton:
|
|
13456
|
-
// "!bg-[var(--Surface-Tertiary)] !text-[var(--Text-High-Emphasis)] !typo-label-sm !rounded-lg !px-4 !py-2 !h-8",
|
|
13771
|
+
// "!bg-[var(--Surface-Neutral-Tertiary)] !text-[var(--Text-High-Emphasis)] !typo-label-sm !rounded-lg !px-4 !py-2 !h-8",
|
|
13457
13772
|
// // 状態トースト(success/error/warning/info)は背景を primitive の明色で固定しているため、
|
|
13458
13773
|
// // 中の description / cancel もモード反転しない primitive に固定する。
|
|
13459
13774
|
// // semantic(Text-Medium-Emphasis 等)のままだとダークモードで白系に反転し、
|
|
13460
13775
|
// // 明色背景の上で文字が不可視になる(デフォルトトーストは背景が反転するので semantic のままで正しい)
|
|
13461
13776
|
// success:
|
|
13462
|
-
// "!bg-[var(--
|
|
13777
|
+
// "!bg-[var(--Surface-Success-Light)] !border-[var(--Border-Success)] !text-[var(--Text-Success)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]",
|
|
13463
13778
|
// error:
|
|
13464
13779
|
// "!bg-[var(--Surface-Caution-Light)] !border-[var(--Border-Caution)] !text-[var(--Primitive-Sun-800)] [&_[data-description]]:!text-[var(--Primitive-Gray-700)] [&_[data-cancel]]:!bg-[var(--Primitive-Gray-100)] [&_[data-cancel]]:!text-[var(--Primitive-Gray-900)]",
|
|
13465
13780
|
// warning:
|
|
@@ -13483,7 +13798,15 @@ export {
|
|
|
13483
13798
|
// )
|
|
13484
13799
|
// }
|
|
13485
13800
|
//
|
|
13486
|
-
// export {
|
|
13801
|
+
// // toast は src/index.ts から直接 `export { toast } from "sonner"` せず、この module で束ねて公開する。
|
|
13802
|
+
// // バレルが sonner を直接 import すると、sonner(package.json に sideEffects 指定が無い)が
|
|
13803
|
+
// // 未使用でも利用側のバンドルに残る(部品を 1 つ import しただけで約 19KB。npm run check:bundle で検査)。
|
|
13804
|
+
// // `export { toast } from "sonner"` のままだとビルドが再 export をたどってバレルに import を戻すため、
|
|
13805
|
+
// // ローカルの const にして、この module(未使用なら丸ごと消える)が sonner を持つ形にしている。
|
|
13806
|
+
// const toast: typeof sonnerToast = sonnerToast
|
|
13807
|
+
//
|
|
13808
|
+
// // eslint-disable-next-line react-refresh/only-export-components -- toast は関数。Toaster と対で使うため同居 export(バレルから sonner を直接 import させないため)
|
|
13809
|
+
// export { Toaster, toast }
|
|
13487
13810
|
//
|
|
13488
13811
|
// src/components/foundations/spinner.tsx
|
|
13489
13812
|
// import * as React from "react"
|
|
@@ -13523,6 +13846,8 @@ export {
|
|
|
13523
13846
|
// export { Spinner }
|
|
13524
13847
|
//
|
|
13525
13848
|
// src/components/foundations/switch.tsx
|
|
13849
|
+
// "use client"
|
|
13850
|
+
//
|
|
13526
13851
|
// import * as React from "react"
|
|
13527
13852
|
// import { Switch as SwitchPrimitive } from "radix-ui"
|
|
13528
13853
|
// import { Check } from "lucide-react"
|
|
@@ -13775,7 +14100,7 @@ export {
|
|
|
13775
14100
|
// "w-full bg-transparent overflow-x-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
|
|
13776
14101
|
// // 縦向きでは縦長の地に rounded-full だと上下が半円になり、先頭・末尾のタブの角がはみ出すため角丸を 2xl に抑える
|
|
13777
14102
|
// segment:
|
|
13778
|
-
// "w-fit rounded-full bg-[var(--Surface-Tertiary)] p-2 data-[orientation=vertical]:rounded-2xl",
|
|
14103
|
+
// "w-fit rounded-full bg-[var(--Surface-Neutral-Tertiary)] p-2 data-[orientation=vertical]:rounded-2xl",
|
|
13779
14104
|
// },
|
|
13780
14105
|
// scrollable: {
|
|
13781
14106
|
// true: "gap-4",
|
|
@@ -13881,6 +14206,8 @@ export {
|
|
|
13881
14206
|
// export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }
|
|
13882
14207
|
//
|
|
13883
14208
|
// src/components/foundations/textarea.tsx
|
|
14209
|
+
// "use client"
|
|
14210
|
+
//
|
|
13884
14211
|
// import * as React from "react"
|
|
13885
14212
|
//
|
|
13886
14213
|
// import { cn } from "@/lib/utils"
|
|
@@ -13935,7 +14262,7 @@ export {
|
|
|
13935
14262
|
// maxLength={maxLength}
|
|
13936
14263
|
// onChange={showCount ? handleChange : onChange}
|
|
13937
14264
|
// className={cn(
|
|
13938
|
-
// "flex field-sizing-content min-h-16 w-full rounded-lg border border-[var(--Border-High-Emphasis)] bg-transparent px-3 py-2 typo-body-lg md:typo-body-md transition-[color,box-shadow,border-color] outline-none placeholder:text-muted-foreground hover:border-[var(--Focus-High-Emphasis)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-[var(--Border-Low-Emphasis)] disabled:bg-[var(--Surface-Secondary)] disabled:text-[var(--Text-Disable)] disabled:placeholder:text-[var(--Text-Disable)] aria-invalid:border-[var(--Border-Caution)] aria-invalid:ring-[var(--Border-Caution)]/20",
|
|
14265
|
+
// "flex field-sizing-content min-h-16 w-full rounded-lg border border-[var(--Border-High-Emphasis)] bg-transparent px-3 py-2 typo-body-lg md:typo-body-md transition-[color,box-shadow,border-color] outline-none placeholder:text-muted-foreground hover:border-[var(--Focus-High-Emphasis)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-[var(--Border-Low-Emphasis)] disabled:bg-[var(--Surface-Neutral-Secondary)] disabled:text-[var(--Text-Disable)] disabled:placeholder:text-[var(--Text-Disable)] aria-invalid:border-[var(--Border-Caution)] aria-invalid:ring-[var(--Border-Caution)]/20",
|
|
13939
14266
|
// // フォーカス意匠は DS 共通(FOCUS_RING)。
|
|
13940
14267
|
// FOCUS_RING,
|
|
13941
14268
|
// className
|
|
@@ -13994,7 +14321,7 @@ export {
|
|
|
13994
14321
|
// */
|
|
13995
14322
|
//
|
|
13996
14323
|
// const toggleGroupVariants = cva(
|
|
13997
|
-
// "flex items-center gap-1.5 py-1.5 overflow-x-auto scrollbar-
|
|
14324
|
+
// "flex items-center gap-1.5 py-1.5 overflow-x-auto scrollbar-hide",
|
|
13998
14325
|
// {
|
|
13999
14326
|
// variants: {
|
|
14000
14327
|
// /** グループ全体の幅 */
|
|
@@ -14030,15 +14357,15 @@ export {
|
|
|
14030
14357
|
// variants: {
|
|
14031
14358
|
// variant: {
|
|
14032
14359
|
// default: [
|
|
14033
|
-
// "bg-[var(--Surface-Tertiary)] text-[var(--Text-Medium-Emphasis)]",
|
|
14034
|
-
// "hover:bg-[var(--Surface-Tertiary)]/80",
|
|
14360
|
+
// "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Medium-Emphasis)]",
|
|
14361
|
+
// "hover:bg-[var(--Surface-Neutral-Tertiary)]/80",
|
|
14035
14362
|
// "data-[state=on]:bg-[var(--Surface-Accent-Primary-Light)] data-[state=on]:text-[var(--Text-Accent-Primary)] data-[state=on]:font-bold",
|
|
14036
|
-
// "dark:bg-[var(--Surface-Secondary)] dark:text-[var(--Text-Low-Emphasis)]",
|
|
14363
|
+
// "dark:bg-[var(--Surface-Neutral-Secondary)] dark:text-[var(--Text-Low-Emphasis)]",
|
|
14037
14364
|
// "dark:data-[state=on]:bg-[var(--Surface-Accent-Primary-Light)] dark:data-[state=on]:text-[var(--Text-Accent-Primary)]",
|
|
14038
14365
|
// ].join(" "),
|
|
14039
14366
|
// outline: [
|
|
14040
14367
|
// "border border-[var(--Border-Control,var(--Border-Low-Emphasis))] bg-transparent text-[var(--Text-Low-Emphasis)]",
|
|
14041
|
-
// "hover:bg-[var(--Surface-Tertiary)]",
|
|
14368
|
+
// "hover:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
14042
14369
|
// "data-[state=on]:border-[var(--Text-High-Emphasis)] data-[state=on]:bg-transparent data-[state=on]:text-[var(--Text-High-Emphasis)]",
|
|
14043
14370
|
// ].join(" "),
|
|
14044
14371
|
// },
|
|
@@ -14285,7 +14612,7 @@ export {
|
|
|
14285
14612
|
// {onMenuClick && (
|
|
14286
14613
|
// <button
|
|
14287
14614
|
// type="button"
|
|
14288
|
-
// className="flex items-center justify-center size-10 shrink-0 rounded-lg hover:bg-[var(--Surface-Secondary)] @md:hidden"
|
|
14615
|
+
// className="flex items-center justify-center size-10 shrink-0 rounded-lg hover:bg-[var(--Surface-Neutral-Secondary)] @md:hidden"
|
|
14289
14616
|
// aria-label="メニュー"
|
|
14290
14617
|
// onClick={onMenuClick}
|
|
14291
14618
|
// >
|
|
@@ -14382,6 +14709,8 @@ export {
|
|
|
14382
14709
|
// * モバイルドロワーの開閉要求ハンドラ。背景・閉じるボタンに加え、ドロワー内のリンク
|
|
14383
14710
|
// * (項目・サブ項目)を押したときも `onOpenChange(false)` が呼ばれる
|
|
14384
14711
|
// * (`linkComponent` でクライアント遷移するとページが再読み込みされず、開いたままになるため)。
|
|
14712
|
+
// * ただし Cmd/Ctrl/Shift/Alt 付きクリック・中クリック・`target="_blank"` のリンクは、
|
|
14713
|
+
// * 今の画面が移らないので閉じない。
|
|
14385
14714
|
// */
|
|
14386
14715
|
// onOpenChange?: (open: boolean) => void
|
|
14387
14716
|
// /** nav の aria-label */
|
|
@@ -14401,6 +14730,19 @@ export {
|
|
|
14401
14730
|
// // ============================================================
|
|
14402
14731
|
//
|
|
14403
14732
|
// /**
|
|
14733
|
+
// * ドロワー内のリンクを押したとき、ドロワーを閉じてよいかを判定する。
|
|
14734
|
+
// * Cmd/Ctrl/Shift/Alt 付きクリック・中クリック・`target="_blank"` などの別タブ・別ウィンドウで開く操作は、
|
|
14735
|
+
// * 今の画面が移らないのでドロワーを開いたままにする。通常の左クリック(SPA の preventDefault 含む)は閉じる。
|
|
14736
|
+
// */
|
|
14737
|
+
// function shouldCloseDrawerOnLinkClick(event: React.MouseEvent<HTMLElement>): boolean {
|
|
14738
|
+
// if (event.button !== 0) return false
|
|
14739
|
+
// if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return false
|
|
14740
|
+
// const target = event.currentTarget.getAttribute("target")
|
|
14741
|
+
// if (target && target !== "_self") return false
|
|
14742
|
+
// return true
|
|
14743
|
+
// }
|
|
14744
|
+
//
|
|
14745
|
+
// /**
|
|
14404
14746
|
// * 管理画面向けサイドナビゲーション
|
|
14405
14747
|
// *
|
|
14406
14748
|
// * PC は左端固定の縦型アイコンレール(ホバーでサブメニューをポップアップ)、
|
|
@@ -14811,7 +15153,7 @@ export {
|
|
|
14811
15153
|
// <span className="typo-label-md text-[var(--Text-High-Emphasis)]">{drawerTitle}</span>
|
|
14812
15154
|
// <button
|
|
14813
15155
|
// onClick={() => onOpenChange?.(false)}
|
|
14814
|
-
// className="flex size-10 shrink-0 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus-visible:ring-2 focus-visible:ring-[var(--Focus-High-Emphasis)] focus-visible:outline-hidden"
|
|
15156
|
+
// className="flex size-10 shrink-0 items-center justify-center rounded-full text-[var(--Text-Low-Emphasis)] transition-colors hover:bg-[var(--Surface-Neutral-Tertiary)] hover:text-[var(--Text-High-Emphasis)] focus-visible:ring-2 focus-visible:ring-[var(--Focus-High-Emphasis)] focus-visible:outline-hidden"
|
|
14815
15157
|
// aria-label="閉じる"
|
|
14816
15158
|
// >
|
|
14817
15159
|
// <XIcon className="size-5" />
|
|
@@ -14827,7 +15169,7 @@ export {
|
|
|
14827
15169
|
// "flex w-full items-center gap-3 px-4 py-3 transition-colors",
|
|
14828
15170
|
// isActive
|
|
14829
15171
|
// ? "text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)]"
|
|
14830
|
-
// : "text-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Secondary)]",
|
|
15172
|
+
// : "text-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
14831
15173
|
// )
|
|
14832
15174
|
// const rowContent = (
|
|
14833
15175
|
// <>
|
|
@@ -14845,7 +15187,9 @@ export {
|
|
|
14845
15187
|
// aria-current={isActive ? "page" : undefined}
|
|
14846
15188
|
// // クライアント遷移(linkComponent)ではページが再読み込みされないため、
|
|
14847
15189
|
// // リンクを押したらドロワーを閉じる(素の <a> でも閉じてから遷移して問題ない)
|
|
14848
|
-
// onClick={() =>
|
|
15190
|
+
// onClick={(event: React.MouseEvent<HTMLElement>) => {
|
|
15191
|
+
// if (shouldCloseDrawerOnLinkClick(event)) onOpenChange?.(false)
|
|
15192
|
+
// }}
|
|
14849
15193
|
// >
|
|
14850
15194
|
// {rowContent}
|
|
14851
15195
|
// </LinkTag>
|
|
@@ -14856,12 +15200,14 @@ export {
|
|
|
14856
15200
|
// )
|
|
14857
15201
|
// })()}
|
|
14858
15202
|
// {hasSubMenu && (
|
|
14859
|
-
// <div className="bg-[var(--Surface-Secondary)] dark:bg-[var(--Primitive-Gray-900)]">
|
|
15203
|
+
// <div className="bg-[var(--Surface-Neutral-Secondary)] dark:bg-[var(--Primitive-Gray-900)]">
|
|
14860
15204
|
// {item.subMenus!.map((sub) => (
|
|
14861
15205
|
// <LinkTag
|
|
14862
15206
|
// key={sub.label}
|
|
14863
15207
|
// href={sub.href}
|
|
14864
|
-
// onClick={() =>
|
|
15208
|
+
// onClick={(event: React.MouseEvent<HTMLElement>) => {
|
|
15209
|
+
// if (shouldCloseDrawerOnLinkClick(event)) onOpenChange?.(false)
|
|
15210
|
+
// }}
|
|
14865
15211
|
// // py-2.5(10px×2) + typo-body-md の行高 24.5px = 44.5px で既に 44px を満たすが、
|
|
14866
15212
|
// // 行高の変動に左右されないよう min-h-11 で下限を固定する。
|
|
14867
15213
|
// className="flex min-h-11 items-center px-12 py-2.5 typo-body-md text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)]"
|
|
@@ -15545,7 +15891,7 @@ export {
|
|
|
15545
15891
|
// {...wrapperProps}
|
|
15546
15892
|
// className={cn(
|
|
15547
15893
|
// "flex shrink-0 flex-col items-center gap-1 rounded-lg p-1 transition-colors",
|
|
15548
|
-
// isInteractive && "hover:bg-[var(--Surface-Secondary)]",
|
|
15894
|
+
// isInteractive && "hover:bg-[var(--Surface-Neutral-Secondary)]",
|
|
15549
15895
|
// item.isSelected && "bg-[var(--Surface-Accent-Primary-Light)]"
|
|
15550
15896
|
// )}
|
|
15551
15897
|
// >
|
|
@@ -15779,7 +16125,7 @@ export {
|
|
|
15779
16125
|
// // 枠はこのラッパーが描く(内側の Textarea はリングを消している)
|
|
15780
16126
|
// FOCUS_RING_WITHIN,
|
|
15781
16127
|
// disabled &&
|
|
15782
|
-
// "border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Secondary)]",
|
|
16128
|
+
// "border-[var(--Border-Low-Emphasis)] bg-[var(--Surface-Neutral-Secondary)]",
|
|
15783
16129
|
// className
|
|
15784
16130
|
// )}
|
|
15785
16131
|
// >
|
|
@@ -15986,7 +16332,7 @@ export {
|
|
|
15986
16332
|
// const isSoldOut = soldOut && !selected
|
|
15987
16333
|
//
|
|
15988
16334
|
// const soldOutStyles = isSoldOut
|
|
15989
|
-
// ? "border border-[var(--Text-Disable)] bg-[var(--Surface-Secondary)] text-[var(--Text-Disable)]"
|
|
16335
|
+
// ? "border border-[var(--Text-Disable)] bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-Disable)]"
|
|
15990
16336
|
// : undefined
|
|
15991
16337
|
//
|
|
15992
16338
|
// const countBadge = count !== undefined && (
|
|
@@ -15995,7 +16341,7 @@ export {
|
|
|
15995
16341
|
// "inline-flex items-center justify-center rounded-full px-1.5 min-w-[1.25rem] typo-label-xs transition-colors",
|
|
15996
16342
|
// selected
|
|
15997
16343
|
// ? "bg-[var(--Surface-Primary)] text-[var(--Text-High-Emphasis)]"
|
|
15998
|
-
// : "bg-[var(--Surface-Tertiary)] text-[var(--Text-Medium-Emphasis)]"
|
|
16344
|
+
// : "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Medium-Emphasis)]"
|
|
15999
16345
|
// )}
|
|
16000
16346
|
// >
|
|
16001
16347
|
// {count}
|
|
@@ -16268,10 +16614,15 @@ export {
|
|
|
16268
16614
|
// import { Popover, PopoverContent, PopoverTrigger } from "@/components/foundations/popover"
|
|
16269
16615
|
// import { resolveFieldAria, useFieldLabelling } from "@/lib/field-labelling"
|
|
16270
16616
|
// import { HIGH_CONTRAST_OUTLINE } from "@/lib/high-contrast"
|
|
16617
|
+
// import { matchesSearch } from "@/lib/search-normalize"
|
|
16271
16618
|
//
|
|
16272
16619
|
// export interface ComboboxOption {
|
|
16273
16620
|
// value: string
|
|
16274
16621
|
// label: string
|
|
16622
|
+
// /**
|
|
16623
|
+
// * 絞り込みに使う別名(読み・略称など)。label と同じく、大文字小文字・全角半角・
|
|
16624
|
+
// * ひらがな/カタカナ・漢字に挟まれた「ヶ/ケ/ヵ/が」の違いを区別せずに部分一致で当てる
|
|
16625
|
+
// */
|
|
16275
16626
|
// keywords?: string[]
|
|
16276
16627
|
// disabled?: boolean
|
|
16277
16628
|
// }
|
|
@@ -16299,6 +16650,8 @@ export {
|
|
|
16299
16650
|
// * トリガーのアクセシブルネーム(日本語)。
|
|
16300
16651
|
// * `role="combobox"` は内容からは名前が付かないため、FormField の外で単体利用する
|
|
16301
16652
|
// * ときはこれか `aria-labelledby` を指定する(未指定時は placeholder を名前に使う)。
|
|
16653
|
+
// * 選択中は、この名前(FormField 配下では FormField のラベル)の後ろに選択中の値が続く
|
|
16654
|
+
// * (例「都道府県 東京都」)。
|
|
16302
16655
|
// */
|
|
16303
16656
|
// "aria-label"?: string
|
|
16304
16657
|
// /** ラベル要素の id を直接指定する場合 */
|
|
@@ -16338,6 +16691,29 @@ export {
|
|
|
16338
16691
|
// // (role="combobox" は内容からアクセシブルネームを得られないため)
|
|
16339
16692
|
// const fallbackLabel =
|
|
16340
16693
|
// !field && !ariaLabel && !ariaLabelledby ? placeholder : undefined
|
|
16694
|
+
// // 候補一覧のポップアップ(role="dialog")の名前。トリガーと同じ名前の出どころ(利用側の
|
|
16695
|
+
// // aria-labelledby → aria-label / placeholder → FormField のラベル)を使う。無名の dialog にしない
|
|
16696
|
+
// const popupName = ariaLabelledby
|
|
16697
|
+
// ? { "aria-labelledby": ariaLabelledby }
|
|
16698
|
+
// : (ariaLabel ?? fallbackLabel)
|
|
16699
|
+
// ? { "aria-label": ariaLabel ?? fallbackLabel }
|
|
16700
|
+
// : field
|
|
16701
|
+
// ? { "aria-labelledby": field.labelId }
|
|
16702
|
+
// : {}
|
|
16703
|
+
// /**
|
|
16704
|
+
// * 選択中は読み上げ名に値を足す(「都道府県 東京都」)。トリガーの表示文字は
|
|
16705
|
+
// * aria-label / aria-labelledby があると名前計算に使われないため、値の要素を aria-labelledby で指す。
|
|
16706
|
+
// * 名前の先頭は 利用側の aria-labelledby → aria-label(または placeholder)→ FormField のラベル の順。
|
|
16707
|
+
// * aria-label は id を持たないので、同じ文字の隠し要素を作って指す。
|
|
16708
|
+
// * 未選択のときは従来どおり(名前に placeholder を重ねない)。
|
|
16709
|
+
// */
|
|
16710
|
+
// const baseId = React.useId()
|
|
16711
|
+
// const valueId = `${baseId}-value`
|
|
16712
|
+
// const nameTextId = `${baseId}-name`
|
|
16713
|
+
// const nameText = ariaLabelledby ? undefined : (ariaLabel ?? fallbackLabel)
|
|
16714
|
+
// const nameHead = ariaLabelledby ?? (nameText ? nameTextId : field?.labelId)
|
|
16715
|
+
// const selectedNameAria =
|
|
16716
|
+
// selected && nameHead ? { "aria-labelledby": `${nameHead} ${valueId}` } : {}
|
|
16341
16717
|
// return (
|
|
16342
16718
|
// <Popover open={open} onOpenChange={setOpen}>
|
|
16343
16719
|
// <PopoverTrigger asChild>
|
|
@@ -16353,6 +16729,7 @@ export {
|
|
|
16353
16729
|
// aria-label={ariaLabel ?? fallbackLabel}
|
|
16354
16730
|
// aria-labelledby={ariaLabelledby}
|
|
16355
16731
|
// {...fieldAria}
|
|
16732
|
+
// {...selectedNameAria}
|
|
16356
16733
|
// disabled={disabled}
|
|
16357
16734
|
// className={cn(
|
|
16358
16735
|
// "w-full justify-between bg-[var(--Surface-Primary)]",
|
|
@@ -16369,14 +16746,24 @@ export {
|
|
|
16369
16746
|
// className
|
|
16370
16747
|
// )}
|
|
16371
16748
|
// >
|
|
16372
|
-
// <span
|
|
16749
|
+
// <span
|
|
16750
|
+
// id={selected ? valueId : undefined}
|
|
16751
|
+
// className={selected ? "text-[var(--Text-High-Emphasis)]" : "text-[var(--Text-Low-Emphasis)]"}
|
|
16752
|
+
// >
|
|
16373
16753
|
// {selected?.label ?? placeholder}
|
|
16374
16754
|
// </span>
|
|
16755
|
+
// {selected && nameText && (
|
|
16756
|
+
// <span id={nameTextId} hidden>
|
|
16757
|
+
// {nameText}
|
|
16758
|
+
// </span>
|
|
16759
|
+
// )}
|
|
16375
16760
|
// <ChevronsUpDown aria-hidden="true" className="text-[var(--Object-Medium-Emphasis)]" />
|
|
16376
16761
|
// </Button>
|
|
16377
16762
|
// </PopoverTrigger>
|
|
16378
|
-
// <PopoverContent align="start" className="w-[var(--radix-popover-trigger-width)] p-0">
|
|
16379
|
-
//
|
|
16763
|
+
// <PopoverContent align="start" className="w-[var(--radix-popover-trigger-width)] p-0" {...popupName}>
|
|
16764
|
+
// {/* 既定の cmdk の絞り込み(大文字小文字だけそろえる)では「しぶや」で「シブヤ」、「市ケ谷」で
|
|
16765
|
+
// 「市ヶ谷」に当たらないため、表記ゆれをそろえた部分一致に差し替える */}
|
|
16766
|
+
// <Command filter={(itemValue, search, keywords) => (matchesSearch(keywords ?? [itemValue], search) ? 1 : 0)}>
|
|
16380
16767
|
// <CommandInput placeholder={searchPlaceholder} />
|
|
16381
16768
|
// <CommandList>
|
|
16382
16769
|
// <CommandEmpty>{emptyLabel}</CommandEmpty>
|
|
@@ -16385,6 +16772,7 @@ export {
|
|
|
16385
16772
|
// <CommandItem
|
|
16386
16773
|
// key={option.value}
|
|
16387
16774
|
// value={[option.label, ...(option.keywords ?? [])].join(" ")}
|
|
16775
|
+
// keywords={[option.label, ...(option.keywords ?? [])]}
|
|
16388
16776
|
// disabled={option.disabled}
|
|
16389
16777
|
// onSelect={() => {
|
|
16390
16778
|
// onValueChange?.(option.value)
|
|
@@ -16655,6 +17043,7 @@ export {
|
|
|
16655
17043
|
// import ArrowRight2 from "iconsax-reactjs/dist/esm/ArrowRight2.js"
|
|
16656
17044
|
//
|
|
16657
17045
|
// import { cn } from "@/lib/utils"
|
|
17046
|
+
// import { FOCUS_RING_ONLY } from "@/lib/focus-ring"
|
|
16658
17047
|
// import { usePrefersReducedMotion } from "@/lib/use-prefers-reduced-motion"
|
|
16659
17048
|
//
|
|
16660
17049
|
// export type ContentCarouselItemsPerView = 1 | 2 | 3 | 4
|
|
@@ -16864,7 +17253,7 @@ export {
|
|
|
16864
17253
|
// <div
|
|
16865
17254
|
// ref={scrollRef}
|
|
16866
17255
|
// className={cn(
|
|
16867
|
-
// "flex snap-x snap-mandatory overflow-x-auto scroll-smooth motion-reduce:scroll-auto scrollbar-
|
|
17256
|
+
// "flex snap-x snap-mandatory overflow-x-auto scroll-smooth motion-reduce:scroll-auto scrollbar-hide",
|
|
16868
17257
|
// // peek: 端の余白 = Container の gutter(外に置いたときは 16px)。Container の中では
|
|
16869
17258
|
// // gutter 分だけ外へはみ出して画面端までスクロールさせる。scroll-padding も同じ幅にして、
|
|
16870
17259
|
// // スナップ後も端の余白が消えないようにする。PC (@[960px]:) では peek しないので外す
|
|
@@ -16901,7 +17290,7 @@ export {
|
|
|
16901
17290
|
// type="button"
|
|
16902
17291
|
// onClick={prev}
|
|
16903
17292
|
// aria-label="前へ"
|
|
16904
|
-
// className=
|
|
17293
|
+
// className={`absolute left-2 top-1/2 z-10 hidden size-10 -translate-y-1/2 items-center justify-center rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Neutral-Secondary)] shadow-md transition-opacity hover:bg-[var(--Surface-Neutral-Tertiary)] @md:flex @[960px]:opacity-0 @[960px]:group-hover/carousel:opacity-100 @[960px]:focus-visible:opacity-100 focus-visible:outline-none ${FOCUS_RING_ONLY}`}
|
|
16905
17294
|
// >
|
|
16906
17295
|
// <ArrowLeft2 size={20} className="text-[var(--Object-High-Emphasis)]" />
|
|
16907
17296
|
// </button>
|
|
@@ -16909,7 +17298,7 @@ export {
|
|
|
16909
17298
|
// type="button"
|
|
16910
17299
|
// onClick={next}
|
|
16911
17300
|
// aria-label="次へ"
|
|
16912
|
-
// className=
|
|
17301
|
+
// className={`absolute right-2 top-1/2 z-10 hidden size-10 -translate-y-1/2 items-center justify-center rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Neutral-Secondary)] shadow-md transition-opacity hover:bg-[var(--Surface-Neutral-Tertiary)] @md:flex @[960px]:opacity-0 @[960px]:group-hover/carousel:opacity-100 @[960px]:focus-visible:opacity-100 focus-visible:outline-none ${FOCUS_RING_ONLY}`}
|
|
16913
17302
|
// >
|
|
16914
17303
|
// <ArrowRight2 size={20} className="text-[var(--Object-High-Emphasis)]" />
|
|
16915
17304
|
// </button>
|
|
@@ -16927,10 +17316,11 @@ export {
|
|
|
16927
17316
|
// aria-label={`スライド ${i + 1}`}
|
|
16928
17317
|
// className={cn(
|
|
16929
17318
|
// // shrink-0 必須: 空要素なので min-content 幅が 0、既定の flex-shrink:1 だとドットが消える
|
|
16930
|
-
// "size-2 shrink-0 rounded-full transition-colors",
|
|
17319
|
+
// "size-2 shrink-0 rounded-full transition-colors focus-visible:outline-none",
|
|
17320
|
+
// FOCUS_RING_ONLY,
|
|
16931
17321
|
// i === activeIndex
|
|
16932
17322
|
// ? "bg-[var(--Text-High-Emphasis)]"
|
|
16933
|
-
// : "bg-[var(--Surface-Tertiary)]"
|
|
17323
|
+
// : "bg-[var(--Surface-Neutral-Tertiary)]"
|
|
16934
17324
|
// )}
|
|
16935
17325
|
// />
|
|
16936
17326
|
// ))}
|
|
@@ -16967,9 +17357,9 @@ export {
|
|
|
16967
17357
|
// * そのまま読み書きする。UTC 保存が必要な consumer は送信前に自前で変換すること。
|
|
16968
17358
|
// *
|
|
16969
17359
|
// * ### クリア(任意項目のとき)
|
|
16970
|
-
// *
|
|
16971
|
-
// *
|
|
16972
|
-
// *
|
|
17360
|
+
// * カレンダーで選択中の日をもう一度押しても値は消えない(同じ日のまま閉じる)。
|
|
17361
|
+
// * 値を消す手段は `clearable` の × だけで、押すと `onChange(undefined)` を呼ぶ。
|
|
17362
|
+
// * **null 許容の項目では `clearable` を付ける**(付けないと一度入れた値を空に戻せない)。
|
|
16973
17363
|
// *
|
|
16974
17364
|
// * ### 日付変更時の時刻の扱い(DateTimePicker)
|
|
16975
17365
|
// * カレンダーが返す `Date` はその日の 00:00:00 だが、`DateTimePicker` は
|
|
@@ -17051,13 +17441,18 @@ export {
|
|
|
17051
17441
|
// max?: Date
|
|
17052
17442
|
// /** 個別に無効化する日(Calendar の disabled マッチャーをそのまま透過) */
|
|
17053
17443
|
// disabledDates?: Matcher | Matcher[]
|
|
17444
|
+
// /**
|
|
17445
|
+
// * カレンダーを開いたときに表示する月。指定すると `value` より優先する。
|
|
17446
|
+
// * 未指定なら、値があるときは選択中の日の月、無いときは今月を開く
|
|
17447
|
+
// */
|
|
17448
|
+
// defaultMonth?: Date
|
|
17054
17449
|
// /** trigger を無効化する */
|
|
17055
17450
|
// disabled?: boolean
|
|
17056
17451
|
// /**
|
|
17057
17452
|
// * 選択済みの値を消すクリアボタン(×)を trigger 右端に出す。既定 false(後方互換)。
|
|
17058
17453
|
// * `value` があり `disabled` でないときだけ描画し、押すと `onChange(undefined)` を呼ぶ。
|
|
17059
|
-
// *
|
|
17060
|
-
// *
|
|
17454
|
+
// * カレンダーで選択中の日を再び押しても値は消えないため、値を空に戻せるのはこの × だけ。
|
|
17455
|
+
// * 任意項目(null 許容)では true にする。
|
|
17061
17456
|
// */
|
|
17062
17457
|
// clearable?: boolean
|
|
17063
17458
|
// /** クリアボタンの aria-label。既定「日付をクリア」 */
|
|
@@ -17085,6 +17480,7 @@ export {
|
|
|
17085
17480
|
// min,
|
|
17086
17481
|
// max,
|
|
17087
17482
|
// disabledDates,
|
|
17483
|
+
// defaultMonth,
|
|
17088
17484
|
// disabled,
|
|
17089
17485
|
// clearable = false,
|
|
17090
17486
|
// clearLabel = "日付をクリア",
|
|
@@ -17130,7 +17526,7 @@ export {
|
|
|
17130
17526
|
// data-empty={!value}
|
|
17131
17527
|
// className={cn(
|
|
17132
17528
|
// // h-11(44px)= 入力コントロールの共通高さ(Input / SelectTrigger / Button default と揃える)
|
|
17133
|
-
// "h-11 w-full justify-start gap-2 border border-[var(--Border-High-Emphasis)] bg-transparent px-3 typo-body-md text-[var(--Text-High-Emphasis)] hover:border-[var(--Focus-High-Emphasis)] hover:bg-[var(--Surface-Secondary)] data-[empty=true]:text-[var(--Text-Low-Emphasis)]",
|
|
17529
|
+
// "h-11 w-full justify-start gap-2 border border-[var(--Border-High-Emphasis)] bg-transparent px-3 typo-body-md text-[var(--Text-High-Emphasis)] hover:border-[var(--Focus-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)] data-[empty=true]:text-[var(--Text-Low-Emphasis)]",
|
|
17134
17530
|
// // エラー時の枠は Input / Select と同じ Border-Caution(Button 共通の destructive を上書き)
|
|
17135
17531
|
// "aria-invalid:border-[var(--Border-Caution)]",
|
|
17136
17532
|
// // クリアボタンの領域を空ける
|
|
@@ -17146,7 +17542,13 @@ export {
|
|
|
17146
17542
|
// <PopoverContent className="w-auto p-0" align="start">
|
|
17147
17543
|
// <Calendar
|
|
17148
17544
|
// mode="single"
|
|
17545
|
+
// // 選択中の日の再押下で値を消さない(誤操作で消えて気付けないため)。
|
|
17546
|
+
// // 再押下では同じ日が返り、そのまま閉じる。クリアは clearable の × で明示的に行う
|
|
17547
|
+
// required
|
|
17149
17548
|
// selected={value}
|
|
17549
|
+
// // 開くたびに選択中の日の月を表示する(PopoverContent は閉じると外れるので、開くたびに効く)。
|
|
17550
|
+
// // 指定が無いと今月が開き、別の月の値では選択中の日が見えなかった
|
|
17551
|
+
// defaultMonth={defaultMonth ?? value}
|
|
17150
17552
|
// onSelect={(date) => {
|
|
17151
17553
|
// onChange?.(date)
|
|
17152
17554
|
// setOpen(false)
|
|
@@ -17430,7 +17832,7 @@ export {
|
|
|
17430
17832
|
// {...props}
|
|
17431
17833
|
// >
|
|
17432
17834
|
// {/* 皿 */}
|
|
17433
|
-
// <ellipse cx="100" cy="146" rx="74" ry="11" fill="var(--Surface-Tertiary)" />
|
|
17835
|
+
// <ellipse cx="100" cy="146" rx="74" ry="11" fill="var(--Surface-Neutral-Tertiary)" />
|
|
17434
17836
|
// {/* ケーキ本体 */}
|
|
17435
17837
|
// <path
|
|
17436
17838
|
// d="M42 96 h116 v26 a14 14 0 0 1 -14 14 H56 a14 14 0 0 1 -14 -14 Z"
|
|
@@ -17461,8 +17863,8 @@ export {
|
|
|
17461
17863
|
// <circle cx="100" cy="86" r="5" fill="var(--Surface-Primary)" stroke="currentColor" strokeWidth="2.5" />
|
|
17462
17864
|
// {/* 宙に浮く「見つからない」感を出す小片 */}
|
|
17463
17865
|
// <circle cx="163" cy="66" r="4" fill="var(--Brand-Cake-Orange)" />
|
|
17464
|
-
// <circle cx="150" cy="52" r="3" fill="var(--Surface-Tertiary)" />
|
|
17465
|
-
// <circle cx="40" cy="70" r="3.5" fill="var(--Surface-Tertiary)" />
|
|
17866
|
+
// <circle cx="150" cy="52" r="3" fill="var(--Surface-Neutral-Tertiary)" />
|
|
17867
|
+
// <circle cx="40" cy="70" r="3.5" fill="var(--Surface-Neutral-Tertiary)" />
|
|
17466
17868
|
// </svg>
|
|
17467
17869
|
// )
|
|
17468
17870
|
// }
|
|
@@ -17694,7 +18096,7 @@ export {
|
|
|
17694
18096
|
// {/* フィルターアイコン — 本番 p-search-filter-nav__icon */}
|
|
17695
18097
|
// <button
|
|
17696
18098
|
// type="button"
|
|
17697
|
-
// className="relative flex size-9 shrink-0 items-center justify-center rounded-full bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] transition-colors hover:opacity-80"
|
|
18099
|
+
// className="relative flex size-9 shrink-0 items-center justify-center rounded-full bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] transition-colors hover:opacity-80"
|
|
17698
18100
|
// onClick={onMoreFilters}
|
|
17699
18101
|
// aria-label="絞り込み"
|
|
17700
18102
|
// >
|
|
@@ -17716,7 +18118,7 @@ export {
|
|
|
17716
18118
|
// "flex h-9 shrink-0 items-center gap-0.5 rounded-full px-2.5 typo-body-md transition-colors max-w-[180px]",
|
|
17717
18119
|
// filter.isActive
|
|
17718
18120
|
// ? "bg-[var(--Surface-Accent-Primary-Light)] typo-label-md text-[var(--Text-Accent-Primary)] dark:bg-[var(--Brand-Cake-Orange)] dark:text-[var(--Primitive-White-alpha-1000)] dark:ring-0"
|
|
17719
|
-
// : "bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] hover:opacity-80"
|
|
18121
|
+
// : "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] hover:opacity-80"
|
|
17720
18122
|
// )}
|
|
17721
18123
|
// >
|
|
17722
18124
|
// <span className="truncate">{filter.isActive && filter.value ? filter.value : filter.label}</span>
|
|
@@ -17757,7 +18159,7 @@ export {
|
|
|
17757
18159
|
// "flex h-9 shrink-0 items-center gap-0.5 rounded-full px-3 typo-body-md transition-colors @md:hidden",
|
|
17758
18160
|
// sortLabel
|
|
17759
18161
|
// ? "bg-[var(--Surface-Accent-Primary-Light)] typo-label-md text-[var(--Text-Accent-Primary)] dark:bg-[var(--Brand-Cake-Orange)] dark:text-[var(--Primitive-White-alpha-1000)] dark:ring-0"
|
|
17760
|
-
// : "bg-[var(--Surface-Tertiary)] text-[var(--Text-High-Emphasis)] hover:opacity-80"
|
|
18162
|
+
// : "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-High-Emphasis)] hover:opacity-80"
|
|
17761
18163
|
// )}
|
|
17762
18164
|
// >
|
|
17763
18165
|
// <SortIcon className="size-4" />
|
|
@@ -17773,7 +18175,7 @@ export {
|
|
|
17773
18175
|
// <button
|
|
17774
18176
|
// type="button"
|
|
17775
18177
|
// onClick={onSortClick}
|
|
17776
|
-
// className="flex items-center gap-1 rounded-full bg-[var(--Surface-Tertiary)] px-3 py-1.5 typo-body-md text-[var(--Text-High-Emphasis)] transition-colors hover:opacity-80"
|
|
18178
|
+
// className="flex items-center gap-1 rounded-full bg-[var(--Surface-Neutral-Tertiary)] px-3 py-1.5 typo-body-md text-[var(--Text-High-Emphasis)] transition-colors hover:opacity-80"
|
|
17777
18179
|
// >
|
|
17778
18180
|
// {sortLabel}
|
|
17779
18181
|
// <ArrowDown2 size={12} />
|
|
@@ -17953,7 +18355,7 @@ export {
|
|
|
17953
18355
|
// className="overflow-hidden transition-[max-height] duration-[var(--Motion-Duration-Base)] ease-in-out"
|
|
17954
18356
|
// style={{ maxHeight: isOpen ? `${contentHeight}px` : "0px" }}
|
|
17955
18357
|
// >
|
|
17956
|
-
// <div className="bg-[var(--Surface-Secondary)]">
|
|
18358
|
+
// <div className="bg-[var(--Surface-Neutral-Secondary)]">
|
|
17957
18359
|
// {children}
|
|
17958
18360
|
// </div>
|
|
17959
18361
|
// </div>
|
|
@@ -18466,7 +18868,7 @@ export {
|
|
|
18466
18868
|
// </span>
|
|
18467
18869
|
// )}
|
|
18468
18870
|
// {optional && (
|
|
18469
|
-
// <span className="inline-flex items-center px-1.5 py-0.5 rounded bg-[var(--Surface-Tertiary)] typo-label-xs text-[var(--Text-Low-Emphasis)]">
|
|
18871
|
+
// <span className="inline-flex items-center px-1.5 py-0.5 rounded bg-[var(--Surface-Neutral-Tertiary)] typo-label-xs text-[var(--Text-Low-Emphasis)]">
|
|
18470
18872
|
// 任意
|
|
18471
18873
|
// </span>
|
|
18472
18874
|
// )}
|
|
@@ -18583,7 +18985,7 @@ export {
|
|
|
18583
18985
|
// * で表す。各ステップはドット(上)+ラベル(下)の縦積みで、コネクタ線はドット中心の
|
|
18584
18986
|
// * 高さで隣ステップ中心まで引く。ラベルは SP でも省略しない。
|
|
18585
18987
|
// * - `bottomAction` を渡すと本文の下余白はシェルが管理する(二重がけ/付け忘れの構造的防止)。
|
|
18586
|
-
// * - 地が Surface-Secondary なので、配下 `Card` の既定サーフェスを白にする文脈
|
|
18988
|
+
// * - 地が Surface-Neutral-Secondary なので、配下 `Card` の既定サーフェスを白にする文脈
|
|
18587
18989
|
// * (`--card-surface`)をシェルが宣言する。`Card` は `surface` 未指定のまま地から浮く(#150)。
|
|
18588
18990
|
// *
|
|
18589
18991
|
// * 管理画面の集中編集は `WorkspaceShell`(EC 購入導線=本コンポーネント)。
|
|
@@ -18608,9 +19010,9 @@ export {
|
|
|
18608
19010
|
// <div
|
|
18609
19011
|
// data-slot="funnel-shell"
|
|
18610
19012
|
// className={cn(
|
|
18611
|
-
// // 地が Surface-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
|
|
19013
|
+
// // 地が Surface-Neutral-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
|
|
18612
19014
|
// // (#150 の Section と同じ仕組み。dark は半透明白が重なって浮くため据え置き)。
|
|
18613
|
-
// "@container flex min-h-dvh flex-col bg-[var(--Surface-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]",
|
|
19015
|
+
// "@container flex min-h-dvh flex-col bg-[var(--Surface-Neutral-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]",
|
|
18614
19016
|
// className
|
|
18615
19017
|
// )}
|
|
18616
19018
|
// >
|
|
@@ -18906,7 +19308,7 @@ export {
|
|
|
18906
19308
|
// "px-3 py-1.5 typo-body-md rounded-md transition-colors whitespace-nowrap",
|
|
18907
19309
|
// isActive
|
|
18908
19310
|
// ? "text-[var(--Text-High-Emphasis)] font-bold"
|
|
18909
|
-
// : "text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Secondary)]"
|
|
19311
|
+
// : "text-[var(--Text-Medium-Emphasis)] hover:text-[var(--Text-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)]"
|
|
18910
19312
|
// )
|
|
18911
19313
|
// }
|
|
18912
19314
|
//
|
|
@@ -19523,7 +19925,7 @@ export {
|
|
|
19523
19925
|
// // (axe: scrollable-region-focusable)。DS 標準のフォーカスリングを併せて付ける。
|
|
19524
19926
|
// tabIndex={0}
|
|
19525
19927
|
// className={cn(
|
|
19526
|
-
// "flex snap-x snap-mandatory overflow-x-auto scroll-smooth motion-reduce:scroll-auto scrollbar-
|
|
19928
|
+
// "flex snap-x snap-mandatory overflow-x-auto scroll-smooth motion-reduce:scroll-auto scrollbar-hide",
|
|
19527
19929
|
// `focus-visible:outline-none ${FOCUS_RING_ONLY}`,
|
|
19528
19930
|
// // peek: 端の余白 = Container の gutter(外に置いたときは 16px)。Container の中では
|
|
19529
19931
|
// // gutter 分だけ外へはみ出して画面端までスクロールさせる。scroll-padding も同じ幅にして、
|
|
@@ -19597,7 +19999,7 @@ export {
|
|
|
19597
19999
|
// type="button"
|
|
19598
20000
|
// onClick={prev}
|
|
19599
20001
|
// aria-label="前へ"
|
|
19600
|
-
// className=
|
|
20002
|
+
// className={`absolute left-2 top-1/2 z-10 hidden size-10 -translate-y-1/2 items-center justify-center rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Neutral-Secondary)] shadow-md transition-opacity hover:bg-[var(--Surface-Neutral-Tertiary)] @md:flex @[960px]:opacity-0 @[960px]:group-hover/carousel:opacity-100 @[960px]:focus-visible:opacity-100 focus-visible:outline-none ${FOCUS_RING_ONLY}`}
|
|
19601
20003
|
// >
|
|
19602
20004
|
// <ArrowLeft2 size={20} className="text-[var(--Object-High-Emphasis)]" />
|
|
19603
20005
|
// </button>
|
|
@@ -19605,7 +20007,7 @@ export {
|
|
|
19605
20007
|
// type="button"
|
|
19606
20008
|
// onClick={next}
|
|
19607
20009
|
// aria-label="次へ"
|
|
19608
|
-
// className=
|
|
20010
|
+
// className={`absolute right-2 top-1/2 z-10 hidden size-10 -translate-y-1/2 items-center justify-center rounded-full border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Neutral-Secondary)] shadow-md transition-opacity hover:bg-[var(--Surface-Neutral-Tertiary)] @md:flex @[960px]:opacity-0 @[960px]:group-hover/carousel:opacity-100 @[960px]:focus-visible:opacity-100 focus-visible:outline-none ${FOCUS_RING_ONLY}`}
|
|
19609
20011
|
// >
|
|
19610
20012
|
// <ArrowRight2 size={20} className="text-[var(--Object-High-Emphasis)]" />
|
|
19611
20013
|
// </button>
|
|
@@ -19623,10 +20025,11 @@ export {
|
|
|
19623
20025
|
// aria-label={`スライド ${i + 1}`}
|
|
19624
20026
|
// className={cn(
|
|
19625
20027
|
// // shrink-0 必須: 空要素なので min-content 幅が 0、既定の flex-shrink:1 だとドットが消える
|
|
19626
|
-
// "size-2 shrink-0 rounded-full transition-colors",
|
|
20028
|
+
// "size-2 shrink-0 rounded-full transition-colors focus-visible:outline-none",
|
|
20029
|
+
// FOCUS_RING_ONLY,
|
|
19627
20030
|
// i === activeIndex
|
|
19628
20031
|
// ? "bg-[var(--Text-High-Emphasis)]"
|
|
19629
|
-
// : "bg-[var(--Surface-Tertiary)]"
|
|
20032
|
+
// : "bg-[var(--Surface-Neutral-Tertiary)]"
|
|
19630
20033
|
// )}
|
|
19631
20034
|
// />
|
|
19632
20035
|
// ))}
|
|
@@ -19646,6 +20049,7 @@ export {
|
|
|
19646
20049
|
// import ArrowRight2 from "iconsax-reactjs/dist/esm/ArrowRight2.js"
|
|
19647
20050
|
//
|
|
19648
20051
|
// import { cn } from "@/lib/utils"
|
|
20052
|
+
// import { FOCUS_RING_ONLY } from "@/lib/focus-ring"
|
|
19649
20053
|
// import { reconcileImageIndex } from "@/lib/image-index"
|
|
19650
20054
|
//
|
|
19651
20055
|
// export interface ImageGalleryProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -19753,9 +20157,9 @@ export {
|
|
|
19753
20157
|
// )}
|
|
19754
20158
|
// </div>
|
|
19755
20159
|
//
|
|
19756
|
-
// {/*
|
|
20160
|
+
// {/* サムネイル列(左側・縦並び)。overflow の領域がフォーカスリング(3px)を切り取るので、4px の余白を内側に取り、同じ分だけ負マージンで外へ戻す(静止時のレイアウトは不変) */}
|
|
19757
20161
|
// {images.length > 1 && (
|
|
19758
|
-
// <div className="flex w-16 shrink-0 flex-col gap-2 overflow-y-auto scrollbar-hide">
|
|
20162
|
+
// <div className="-m-1 box-content flex w-16 shrink-0 flex-col gap-2 overflow-y-auto p-1 scrollbar-hide">
|
|
19759
20163
|
// {images.map((img, i) => (
|
|
19760
20164
|
// <button
|
|
19761
20165
|
// key={i}
|
|
@@ -19763,7 +20167,8 @@ export {
|
|
|
19763
20167
|
// onClick={() => goTo(i)}
|
|
19764
20168
|
// onMouseOver={() => goTo(i)}
|
|
19765
20169
|
// className={cn(
|
|
19766
|
-
// "size-16 shrink-0 overflow-hidden rounded-lg border-2 transition-colors",
|
|
20170
|
+
// "size-16 shrink-0 overflow-hidden rounded-lg border-2 transition-colors focus-visible:outline-none",
|
|
20171
|
+
// FOCUS_RING_ONLY,
|
|
19767
20172
|
// i === safeCurrentIndex
|
|
19768
20173
|
// ? "border-[var(--Border-Accent-Primary)]"
|
|
19769
20174
|
// : "border-transparent opacity-60 hover:opacity-100"
|
|
@@ -19810,7 +20215,7 @@ export {
|
|
|
19810
20215
|
// <>
|
|
19811
20216
|
// <button
|
|
19812
20217
|
// type="button"
|
|
19813
|
-
// className=
|
|
20218
|
+
// className={`absolute left-2 top-1/2 flex size-10 -translate-y-1/2 items-center justify-center rounded-full bg-[var(--Surface-Primary)]/80 shadow-sm transition-colors hover:bg-[var(--Surface-Primary)] focus-visible:outline-none ${FOCUS_RING_ONLY}`}
|
|
19814
20219
|
// onClick={() => goTo(safeCurrentIndex - 1)}
|
|
19815
20220
|
// aria-label="前の画像"
|
|
19816
20221
|
// >
|
|
@@ -19818,7 +20223,7 @@ export {
|
|
|
19818
20223
|
// </button>
|
|
19819
20224
|
// <button
|
|
19820
20225
|
// type="button"
|
|
19821
|
-
// className=
|
|
20226
|
+
// className={`absolute right-2 top-1/2 flex size-10 -translate-y-1/2 items-center justify-center rounded-full bg-[var(--Surface-Primary)]/80 shadow-sm transition-colors hover:bg-[var(--Surface-Primary)] focus-visible:outline-none ${FOCUS_RING_ONLY}`}
|
|
19822
20227
|
// onClick={() => goTo(safeCurrentIndex + 1)}
|
|
19823
20228
|
// aria-label="次の画像"
|
|
19824
20229
|
// >
|
|
@@ -19844,7 +20249,7 @@ export {
|
|
|
19844
20249
|
// type="button"
|
|
19845
20250
|
// onClick={() => goTo(i)}
|
|
19846
20251
|
// // shrink-0 必須: 中身が空なので min-content 幅が 0、既定の flex-shrink:1 だとドットが消える
|
|
19847
|
-
// className=
|
|
20252
|
+
// className={`flex h-6 shrink-0 items-center justify-center rounded-full px-0.5 focus-visible:outline-none ${FOCUS_RING_ONLY}`}
|
|
19848
20253
|
// aria-label={`画像 ${i + 1}`}
|
|
19849
20254
|
// >
|
|
19850
20255
|
// <span
|
|
@@ -19860,16 +20265,21 @@ export {
|
|
|
19860
20265
|
// </div>
|
|
19861
20266
|
// )}
|
|
19862
20267
|
//
|
|
19863
|
-
// {/* Thumbnails
|
|
20268
|
+
// {/* Thumbnails。overflow の領域がフォーカスリング(3px)を切り取るので、4px の余白を内側に取り、負マージンで外へ戻す。
|
|
20269
|
+
// 上下と左は余白と負マージンが相殺されるので、サムネイルの位置(先頭は root の左端)と列の高さは余白が無いときと同じ。
|
|
20270
|
+
// 右は負マージンを使わない: 画面幅いっぱいに置いたとき右へ 4px はみ出して横スクロールが生まれるため(左のはみ出しはスクロールにならない)。
|
|
20271
|
+
// その代わり、列の中身の幅は root より 4px 狭くなる(左の余白 4px + 右の余白 4px − 左へはみ出した 4px)。
|
|
20272
|
+
// サムネイルの合計幅がちょうどその境目(root − 4px 超 root 以下)のときだけ、列の中に数 px の横スクロールが出うる。許容している */}
|
|
19864
20273
|
// {showThumbnails && images.length > 1 && (
|
|
19865
|
-
// <div className="flex gap-1.5 overflow-x-auto scrollbar-hide">
|
|
20274
|
+
// <div className="-my-1 -ml-1 flex gap-1.5 overflow-x-auto p-1 scrollbar-hide">
|
|
19866
20275
|
// {images.map((img, i) => (
|
|
19867
20276
|
// <button
|
|
19868
20277
|
// key={i}
|
|
19869
20278
|
// type="button"
|
|
19870
20279
|
// onClick={() => goTo(i)}
|
|
19871
20280
|
// className={cn(
|
|
19872
|
-
// "size-14 shrink-0 overflow-hidden rounded-md border-2 transition-colors",
|
|
20281
|
+
// "size-14 shrink-0 overflow-hidden rounded-md border-2 transition-colors focus-visible:outline-none",
|
|
20282
|
+
// FOCUS_RING_ONLY,
|
|
19873
20283
|
// i === safeCurrentIndex
|
|
19874
20284
|
// ? "border-[var(--Brand-Cake-Orange)]"
|
|
19875
20285
|
// : "border-transparent opacity-60 hover:opacity-100"
|
|
@@ -19987,7 +20397,7 @@ export {
|
|
|
19987
20397
|
// * landscape は OGP 相当の 1200:630(≒1.9:1)。
|
|
19988
20398
|
// */
|
|
19989
20399
|
// const imageInputPreviewVariants = cva(
|
|
19990
|
-
// "relative w-full overflow-hidden rounded-lg bg-[var(--Surface-Tertiary)]",
|
|
20400
|
+
// "relative w-full overflow-hidden rounded-lg bg-[var(--Surface-Neutral-Tertiary)]",
|
|
19991
20401
|
// {
|
|
19992
20402
|
// variants: {
|
|
19993
20403
|
// aspect: {
|
|
@@ -20194,7 +20604,7 @@ export {
|
|
|
20194
20604
|
// imageInputPreviewVariants({ aspect, size }),
|
|
20195
20605
|
// hasPreview
|
|
20196
20606
|
// ? "border border-[var(--Border-Low-Emphasis)]"
|
|
20197
|
-
// : // 未選択の破線枠は地(Surface-Tertiary)とのコントラストを確保するため High-Emphasis。
|
|
20607
|
+
// : // 未選択の破線枠は地(Surface-Neutral-Tertiary)とのコントラストを確保するため High-Emphasis。
|
|
20198
20608
|
// // Medium-Emphasis はダークモードで地と同値になり枠が消える
|
|
20199
20609
|
// "border-2 border-dashed border-[var(--Border-High-Emphasis)]"
|
|
20200
20610
|
// )}
|
|
@@ -20339,7 +20749,7 @@ export {
|
|
|
20339
20749
|
// {images.map((image, i) => (
|
|
20340
20750
|
// <div
|
|
20341
20751
|
// key={i}
|
|
20342
|
-
// className="relative aspect-square rounded-xl bg-[var(--Surface-Tertiary)] border border-[var(--Border-Low-Emphasis)] overflow-hidden group"
|
|
20752
|
+
// className="relative aspect-square rounded-xl bg-[var(--Surface-Neutral-Tertiary)] border border-[var(--Border-Low-Emphasis)] overflow-hidden group"
|
|
20343
20753
|
// >
|
|
20344
20754
|
// <img
|
|
20345
20755
|
// src={image.src}
|
|
@@ -20408,9 +20818,13 @@ export {
|
|
|
20408
20818
|
// * | Prop | 型 | デフォルト | 説明 |
|
|
20409
20819
|
// * |------|-----|-----------|------|
|
|
20410
20820
|
// * | items | { label, icon?, onClick, destructive? }[] | — | メニュー項目 |
|
|
20821
|
+
// * | menuLabel | string | "メニュー" | トリガーの読み上げ名(aria-label) |
|
|
20411
20822
|
// *
|
|
20412
20823
|
// * ### AI 向け使用ルール
|
|
20413
20824
|
// * - テーブル行のアクション列に使用
|
|
20825
|
+
// * - 一覧の各行に置くときは `menuLabel` に行を特定できる名前を渡す(例: `${商品名}のメニュー`)。
|
|
20826
|
+
// * 全部「メニュー」だと読み上げで区別できない
|
|
20827
|
+
// * - 見た目は 32px のまま、当たり判定は `tap-target` で 44px に広げている。隣のボタンとの間は 12px 以上空ける
|
|
20414
20828
|
// * - DropdownMenu を内部で利用
|
|
20415
20829
|
// */
|
|
20416
20830
|
// import * as React from "react"
|
|
@@ -20421,6 +20835,7 @@ export {
|
|
|
20421
20835
|
// DropdownMenuItem,
|
|
20422
20836
|
// DropdownMenuTrigger,
|
|
20423
20837
|
// } from "@/components/foundations/dropdown-menu"
|
|
20838
|
+
// import { FOCUS_RING_ONLY } from "@/lib/focus-ring"
|
|
20424
20839
|
// import More from "iconsax-reactjs/dist/esm/More.js"
|
|
20425
20840
|
//
|
|
20426
20841
|
// export interface KebabMenuItem {
|
|
@@ -20437,21 +20852,29 @@ export {
|
|
|
20437
20852
|
// export interface KebabMenuProps {
|
|
20438
20853
|
// /** メニュー項目 */
|
|
20439
20854
|
// items: KebabMenuItem[]
|
|
20855
|
+
// /**
|
|
20856
|
+
// * トリガーボタンの読み上げ名(aria-label)。既定は「メニュー」。
|
|
20857
|
+
// * 一覧の各行に置くときは「○○のメニュー」のように対象が分かる名前にする
|
|
20858
|
+
// */
|
|
20859
|
+
// menuLabel?: string
|
|
20440
20860
|
// /** 追加クラス */
|
|
20441
20861
|
// className?: string
|
|
20442
20862
|
// }
|
|
20443
20863
|
//
|
|
20444
|
-
// export function KebabMenu({ items, className }: KebabMenuProps) {
|
|
20864
|
+
// export function KebabMenu({ items, menuLabel = "メニュー", className }: KebabMenuProps) {
|
|
20445
20865
|
// return (
|
|
20446
20866
|
// <DropdownMenu>
|
|
20447
20867
|
// <DropdownMenuTrigger asChild>
|
|
20448
20868
|
// <button
|
|
20449
20869
|
// className={cn(
|
|
20450
20870
|
// // shrink-0 必須: 長いタイトルと同じ flex row に並ぶため、既定の flex-shrink:1 だと 32px が潰れる
|
|
20451
|
-
//
|
|
20871
|
+
// // tap-target: 見た目は 32px のまま、透明な疑似要素で当たり判定だけ 44px に広げる
|
|
20872
|
+
// "tap-target flex items-center justify-center size-8 shrink-0 rounded-md hover:bg-[var(--Surface-Neutral-Secondary)] transition-colors focus-visible:outline-none",
|
|
20873
|
+
// // 枠が無いのでリングだけ(フォーカスしていないときの見た目は変わらない)
|
|
20874
|
+
// FOCUS_RING_ONLY,
|
|
20452
20875
|
// className
|
|
20453
20876
|
// )}
|
|
20454
|
-
// aria-label=
|
|
20877
|
+
// aria-label={menuLabel}
|
|
20455
20878
|
// data-slot="kebab-menu"
|
|
20456
20879
|
// >
|
|
20457
20880
|
// <More size={16} className="text-[var(--Text-Low-Emphasis)]" />
|
|
@@ -20636,8 +21059,8 @@ export {
|
|
|
20636
21059
|
// const rowClassName = cn(
|
|
20637
21060
|
// "relative flex w-full items-center gap-2 bg-[var(--Surface-Primary)] px-4 rounded-lg",
|
|
20638
21061
|
// minHeightClass,
|
|
20639
|
-
// selected && "bg-[var(--Surface-Secondary)]",
|
|
20640
|
-
// interactive && "transition-colors hover:bg-[var(--Surface-Tertiary)]",
|
|
21062
|
+
// selected && "bg-[var(--Surface-Neutral-Secondary)]",
|
|
21063
|
+
// interactive && "transition-colors hover:bg-[var(--Surface-Neutral-Tertiary)]",
|
|
20641
21064
|
// isButton &&
|
|
20642
21065
|
// `cursor-pointer focus-visible:outline-none ${FOCUS_RING_ONLY}`,
|
|
20643
21066
|
// isButton && LIST_ITEM_FOCUS_INSET,
|
|
@@ -20700,7 +21123,7 @@ export {
|
|
|
20700
21123
|
//
|
|
20701
21124
|
// {/* Border */}
|
|
20702
21125
|
// {showBorder && resolvedSize !== "lg" && (
|
|
20703
|
-
// <div className="absolute bottom-0 left-4 right-4 h-px bg-[var(--Surface-Secondary)]" aria-hidden />
|
|
21126
|
+
// <div className="absolute bottom-0 left-4 right-4 h-px bg-[var(--Surface-Neutral-Secondary)]" aria-hidden />
|
|
20704
21127
|
// )}
|
|
20705
21128
|
// {showBorder && resolvedSize === "lg" && (
|
|
20706
21129
|
// <div className="absolute bottom-0 left-4 right-4 h-px bg-[var(--Border-Medium-Emphasis)]" aria-hidden />
|
|
@@ -20845,7 +21268,7 @@ export {
|
|
|
20845
21268
|
// * 既定値のままで prefers-reduced-motion のトークン制御が効かない。
|
|
20846
21269
|
// */
|
|
20847
21270
|
// const menuRowClass =
|
|
20848
|
-
// "flex min-h-12 items-center gap-1 mx-2 rounded-lg px-2 py-3 typo-body-md text-[var(--Text-High-Emphasis)] transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Secondary)] active:bg-[var(--Surface-Tertiary)]"
|
|
21271
|
+
// "flex min-h-12 items-center gap-1 mx-2 rounded-lg px-2 py-3 typo-body-md text-[var(--Text-High-Emphasis)] transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Neutral-Secondary)] active:bg-[var(--Surface-Neutral-Tertiary)]"
|
|
20849
21272
|
//
|
|
20850
21273
|
// function MenuDrawer({
|
|
20851
21274
|
// userName,
|
|
@@ -21168,6 +21591,15 @@ export {
|
|
|
21168
21591
|
// // FormField の外で単体利用され、名前の指定も無いときは placeholder を名前にする
|
|
21169
21592
|
// const fallbackLabel =
|
|
21170
21593
|
// !field && !ariaLabel && !ariaLabelledby ? placeholder : undefined
|
|
21594
|
+
// // 候補一覧のポップアップ(role="dialog")の名前。トリガーと同じ名前の出どころ(利用側の
|
|
21595
|
+
// // aria-labelledby → aria-label / placeholder → FormField のラベル)を使う。無名の dialog にしない
|
|
21596
|
+
// const popupName = ariaLabelledby
|
|
21597
|
+
// ? { "aria-labelledby": ariaLabelledby }
|
|
21598
|
+
// : (ariaLabel ?? fallbackLabel)
|
|
21599
|
+
// ? { "aria-label": ariaLabel ?? fallbackLabel }
|
|
21600
|
+
// : field
|
|
21601
|
+
// ? { "aria-labelledby": field.labelId }
|
|
21602
|
+
// : {}
|
|
21171
21603
|
// const toggle = (next: string) =>
|
|
21172
21604
|
// onValueChange?.(value.includes(next) ? value.filter((item) => item !== next) : [...value, next])
|
|
21173
21605
|
//
|
|
@@ -21236,7 +21668,7 @@ export {
|
|
|
21236
21668
|
// <ChevronsUpDown aria-hidden="true" className="text-[var(--Object-Medium-Emphasis)]" />
|
|
21237
21669
|
// </Button>
|
|
21238
21670
|
// </PopoverTrigger>
|
|
21239
|
-
// <PopoverContent align="start" className="w-[var(--radix-popover-trigger-width)] p-0">
|
|
21671
|
+
// <PopoverContent align="start" className="w-[var(--radix-popover-trigger-width)] p-0" {...popupName}>
|
|
21240
21672
|
// <Command>
|
|
21241
21673
|
// <CommandInput placeholder={searchPlaceholder} />
|
|
21242
21674
|
// <CommandList>
|
|
@@ -21500,7 +21932,7 @@ export {
|
|
|
21500
21932
|
// <Wrapper
|
|
21501
21933
|
// key={item.id}
|
|
21502
21934
|
// {...(item.href ? { href: item.href } : {})}
|
|
21503
|
-
// className="flex items-center gap-3 px-4 py-3 transition-colors hover:bg-[var(--Surface-Secondary)]"
|
|
21935
|
+
// className="flex items-center gap-3 px-4 py-3 transition-colors hover:bg-[var(--Surface-Neutral-Secondary)]"
|
|
21504
21936
|
// >
|
|
21505
21937
|
// <span className="typo-body-sm text-[var(--Text-Low-Emphasis)] shrink-0 w-[88px]">
|
|
21506
21938
|
// {item.date}
|
|
@@ -21521,7 +21953,7 @@ export {
|
|
|
21521
21953
|
// <Wrapper
|
|
21522
21954
|
// key={item.id}
|
|
21523
21955
|
// {...(item.href ? { href: item.href } : {})}
|
|
21524
|
-
// className="flex items-start gap-3 px-4 py-3.5 transition-colors hover:bg-[var(--Surface-Secondary)]"
|
|
21956
|
+
// className="flex items-start gap-3 px-4 py-3.5 transition-colors hover:bg-[var(--Surface-Neutral-Secondary)]"
|
|
21525
21957
|
// >
|
|
21526
21958
|
// {/* Unread dot */}
|
|
21527
21959
|
// <div className="flex shrink-0 items-center pt-1.5">
|
|
@@ -21563,6 +21995,25 @@ export {
|
|
|
21563
21995
|
// import { HIGH_CONTRAST_OUTLINE } from "@/lib/high-contrast"
|
|
21564
21996
|
// import { mergeIdRefs, useFieldLabelling } from "@/lib/field-labelling"
|
|
21565
21997
|
//
|
|
21998
|
+
// /** NumberInput の inputProps。値・id・aria・disabled 等の部品が管理する属性は除く */
|
|
21999
|
+
// export type NumberInputInputProps = Omit<
|
|
22000
|
+
// React.InputHTMLAttributes<HTMLInputElement>,
|
|
22001
|
+
// | "value"
|
|
22002
|
+
// | "defaultValue"
|
|
22003
|
+
// | "onChange"
|
|
22004
|
+
// | "type"
|
|
22005
|
+
// | "id"
|
|
22006
|
+
// | "name"
|
|
22007
|
+
// | "disabled"
|
|
22008
|
+
// | "inputMode"
|
|
22009
|
+
// | "pattern"
|
|
22010
|
+
// | "aria-label"
|
|
22011
|
+
// | "aria-labelledby"
|
|
22012
|
+
// | "aria-describedby"
|
|
22013
|
+
// | "aria-invalid"
|
|
22014
|
+
// | "aria-live"
|
|
22015
|
+
// >
|
|
22016
|
+
//
|
|
21566
22017
|
// export interface NumberInputProps
|
|
21567
22018
|
// extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
21568
22019
|
// /** 現在の値(制御) */
|
|
@@ -21599,6 +22050,23 @@ export {
|
|
|
21599
22050
|
// /** 入力欄の id。FormField 配下では未指定でも FormField の htmlFor と同じ id になる */
|
|
21600
22051
|
// inputId?: string
|
|
21601
22052
|
// /**
|
|
22053
|
+
// * フォーム送信時の名前。`<form>` の FormData に現在値(素の数値)が `name` で入る。
|
|
22054
|
+
// * editable かつ formatOptions 無しのときは表示中の入力欄に付く。表示が数値そのものでないとき
|
|
22055
|
+
// * (formatOptions で桁区切り・通貨表示する / editable=false)は、素の数値を持つ hidden input に付ける
|
|
22056
|
+
// * (`inputProps.form` で form 外から関連付けた場合は hidden input にも同じ form が付く)
|
|
22057
|
+
// */
|
|
22058
|
+
// name?: string
|
|
22059
|
+
// /** 内部の入力欄(`<input>`)への ref。フォーカス制御・フォームライブラリの登録に使う。editable=false では入力欄が無いので null */
|
|
22060
|
+
// inputRef?: React.Ref<HTMLInputElement>
|
|
22061
|
+
// /**
|
|
22062
|
+
// * 内部の入力欄(`<input>`)に渡す属性。onFocus / onBlur / onKeyDown 等の入力欄だけのイベントや
|
|
22063
|
+
// * autoComplete・data-* に使う(その他の props は従来どおりグループの div に付く)。
|
|
22064
|
+
// * onFocus / onBlur は部品内部の処理(編集開始・値の確定)の後に呼ぶ。onKeyDown は部品のキー処理
|
|
22065
|
+
// * (Enter で確定・矢印キーで増減)の前に呼び、preventDefault するとそれを止める。
|
|
22066
|
+
// * 値・id・name・aria・disabled は部品が管理するため渡せない
|
|
22067
|
+
// */
|
|
22068
|
+
// inputProps?: NumberInputInputProps
|
|
22069
|
+
// /**
|
|
21602
22070
|
// * 入力欄・増減ボタンの読み上げラベル。既定はカート数量向けの「数量」。
|
|
21603
22071
|
// * 価格・在庫など数量以外に使うときは必ず指定する(例: "販売価格")。
|
|
21604
22072
|
// * FormField 配下で未指定のときは FormField のラベルが名前になる
|
|
@@ -21667,6 +22135,9 @@ export {
|
|
|
21667
22135
|
// formatOptions,
|
|
21668
22136
|
// locale = "ja-JP",
|
|
21669
22137
|
// inputId,
|
|
22138
|
+
// name,
|
|
22139
|
+
// inputRef,
|
|
22140
|
+
// inputProps,
|
|
21670
22141
|
// label: labelProp,
|
|
21671
22142
|
// ...props
|
|
21672
22143
|
// }: NumberInputProps) {
|
|
@@ -21755,6 +22226,8 @@ export {
|
|
|
21755
22226
|
// }
|
|
21756
22227
|
//
|
|
21757
22228
|
// const handleInputKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
22229
|
+
// inputProps?.onKeyDown?.(e)
|
|
22230
|
+
// if (e.defaultPrevented) return
|
|
21758
22231
|
// if (e.key === "Enter") {
|
|
21759
22232
|
// handleInputBlur()
|
|
21760
22233
|
// return
|
|
@@ -21769,6 +22242,40 @@ export {
|
|
|
21769
22242
|
// }
|
|
21770
22243
|
// }
|
|
21771
22244
|
//
|
|
22245
|
+
// /**
|
|
22246
|
+
// * 入力欄に共通で付ける属性(md / sm 共通)。利用側の inputProps は先に展開し、値・id・イベントは
|
|
22247
|
+
// * 部品側で上書きする(利用側の onFocus / onBlur は部品の処理の後、onKeyDown は handleInputKeyDown の
|
|
22248
|
+
// * 先頭で呼ぶ。onKeyDown は restInputProps に残るが下の onKeyDown で上書きされる)
|
|
22249
|
+
// */
|
|
22250
|
+
// const { onFocus: onInputFocus, onBlur: onInputBlur, className: inputClassName, ...restInputProps } = inputProps ?? {}
|
|
22251
|
+
// // 表示が素の数値のときだけ入力欄に name を付ける。桁区切り表示では hidden input に素の数値を持たせる
|
|
22252
|
+
// const nameOnInput = editable && !formatOptions ? name : undefined
|
|
22253
|
+
// const hiddenValueInput =
|
|
22254
|
+
// name !== undefined && nameOnInput === undefined ? (
|
|
22255
|
+
// <input type="hidden" name={name} value={current} disabled={disabled} form={inputProps?.form} />
|
|
22256
|
+
// ) : null
|
|
22257
|
+
// const sharedInputProps = {
|
|
22258
|
+
// ...restInputProps,
|
|
22259
|
+
// ref: inputRef,
|
|
22260
|
+
// name: nameOnInput,
|
|
22261
|
+
// type: "text",
|
|
22262
|
+
// inputMode: "numeric" as const,
|
|
22263
|
+
// pattern: "[0-9]*",
|
|
22264
|
+
// id: resolvedInputId,
|
|
22265
|
+
// onFocus: (e: React.FocusEvent<HTMLInputElement>) => {
|
|
22266
|
+
// setEditing(true)
|
|
22267
|
+
// setInputValue(String(current))
|
|
22268
|
+
// onInputFocus?.(e)
|
|
22269
|
+
// },
|
|
22270
|
+
// onChange: handleInputChange,
|
|
22271
|
+
// onBlur: (e: React.FocusEvent<HTMLInputElement>) => {
|
|
22272
|
+
// handleInputBlur()
|
|
22273
|
+
// onInputBlur?.(e)
|
|
22274
|
+
// },
|
|
22275
|
+
// onKeyDown: handleInputKeyDown,
|
|
22276
|
+
// disabled,
|
|
22277
|
+
// }
|
|
22278
|
+
//
|
|
21772
22279
|
// /** 非編集時の表示。Intl の JPY は全角 ¥ を返すが、DS の価格表記は半角 ¥ */
|
|
21773
22280
|
// const display = editing
|
|
21774
22281
|
// ? inputValue
|
|
@@ -21788,7 +22295,7 @@ export {
|
|
|
21788
22295
|
// // px-1(4px)は上下の余白((36-28)/2 = 4px)と揃える値。
|
|
21789
22296
|
// // ホバー時の円が外枠に対して上下左右とも同じ内側余白で収まる
|
|
21790
22297
|
// // shrink-0 必須: カート行など flex row の子として置かれるため、既定の flex-shrink:1 だと 108px が潰れる
|
|
21791
|
-
// "inline-flex h-9 w-[108px] shrink-0 items-center justify-between rounded-full bg-[var(--Surface-Tertiary)] px-1",
|
|
22298
|
+
// "inline-flex h-9 w-[108px] shrink-0 items-center justify-between rounded-full bg-[var(--Surface-Neutral-Tertiary)] px-1",
|
|
21792
22299
|
// HIGH_CONTRAST_OUTLINE,
|
|
21793
22300
|
// invalid && "ring-2 ring-[var(--Surface-Caution)]",
|
|
21794
22301
|
// disabled && "cursor-not-allowed",
|
|
@@ -21820,26 +22327,16 @@ export {
|
|
|
21820
22327
|
//
|
|
21821
22328
|
// {editable ? (
|
|
21822
22329
|
// <input
|
|
21823
|
-
//
|
|
21824
|
-
// inputMode="numeric"
|
|
21825
|
-
// pattern="[0-9]*"
|
|
21826
|
-
// id={resolvedInputId}
|
|
22330
|
+
// {...sharedInputProps}
|
|
21827
22331
|
// value={display}
|
|
21828
|
-
// onFocus={() => {
|
|
21829
|
-
// setEditing(true)
|
|
21830
|
-
// setInputValue(String(current))
|
|
21831
|
-
// }}
|
|
21832
|
-
// onChange={handleInputChange}
|
|
21833
|
-
// onBlur={handleInputBlur}
|
|
21834
|
-
// onKeyDown={handleInputKeyDown}
|
|
21835
|
-
// disabled={disabled}
|
|
21836
22332
|
// className={cn(
|
|
21837
22333
|
// "w-7 shrink-0 rounded bg-transparent text-center typo-label-md outline-none transition-colors",
|
|
21838
22334
|
// "hover:bg-[var(--Overlay-Light)] focus-visible:bg-[var(--Surface-Primary)]",
|
|
21839
22335
|
// FOCUS_RING,
|
|
21840
22336
|
// disabled
|
|
21841
22337
|
// ? "text-[var(--Text-Disable)]"
|
|
21842
|
-
// : "text-[var(--Text-High-Emphasis)]"
|
|
22338
|
+
// : "text-[var(--Text-High-Emphasis)]",
|
|
22339
|
+
// inputClassName
|
|
21843
22340
|
// )}
|
|
21844
22341
|
// {...inputAria}
|
|
21845
22342
|
// aria-live="polite"
|
|
@@ -21874,6 +22371,7 @@ export {
|
|
|
21874
22371
|
// >
|
|
21875
22372
|
// <Add size={14} />
|
|
21876
22373
|
// </button>
|
|
22374
|
+
// {hiddenValueInput}
|
|
21877
22375
|
// </div>
|
|
21878
22376
|
// )
|
|
21879
22377
|
// }
|
|
@@ -21898,7 +22396,7 @@ export {
|
|
|
21898
22396
|
// "flex size-10 shrink-0 items-center justify-center rounded-full border transition-colors outline-none",
|
|
21899
22397
|
// FOCUS_RING,
|
|
21900
22398
|
// canDecrement || canTrash
|
|
21901
|
-
// ? "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] text-[var(--Object-High-Emphasis)] hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Tertiary)] active:bg-[var(--Surface-Tertiary)]"
|
|
22399
|
+
// ? "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] text-[var(--Object-High-Emphasis)] hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)] active:bg-[var(--Surface-Neutral-Tertiary)]"
|
|
21902
22400
|
// : "border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] text-[var(--Object-Disable)]"
|
|
21903
22401
|
// )}
|
|
21904
22402
|
// onClick={handleDecrement}
|
|
@@ -21915,19 +22413,8 @@ export {
|
|
|
21915
22413
|
// {/* 数値コンテナ */}
|
|
21916
22414
|
// {editable ? (
|
|
21917
22415
|
// <input
|
|
21918
|
-
//
|
|
21919
|
-
// inputMode="numeric"
|
|
21920
|
-
// pattern="[0-9]*"
|
|
21921
|
-
// id={resolvedInputId}
|
|
22416
|
+
// {...sharedInputProps}
|
|
21922
22417
|
// value={display}
|
|
21923
|
-
// onFocus={() => {
|
|
21924
|
-
// setEditing(true)
|
|
21925
|
-
// setInputValue(String(current))
|
|
21926
|
-
// }}
|
|
21927
|
-
// onChange={handleInputChange}
|
|
21928
|
-
// onBlur={handleInputBlur}
|
|
21929
|
-
// onKeyDown={handleInputKeyDown}
|
|
21930
|
-
// disabled={disabled}
|
|
21931
22418
|
// className={cn(
|
|
21932
22419
|
// // formatOptions で桁が増えるため、内容に応じて広がるよう min-w にしている
|
|
21933
22420
|
// "h-10 shrink-0 rounded-lg border text-center typo-label-lg outline-none transition-colors",
|
|
@@ -21939,8 +22426,9 @@ export {
|
|
|
21939
22426
|
// : "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] hover:border-[var(--Border-High-Emphasis)]",
|
|
21940
22427
|
// FOCUS_RING,
|
|
21941
22428
|
// disabled
|
|
21942
|
-
// ? "bg-[var(--Surface-Tertiary)] text-[var(--Text-Disable)]"
|
|
21943
|
-
// : "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)]"
|
|
22429
|
+
// ? "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Disable)]"
|
|
22430
|
+
// : "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-High-Emphasis)]",
|
|
22431
|
+
// inputClassName
|
|
21944
22432
|
// )}
|
|
21945
22433
|
// {...inputAria}
|
|
21946
22434
|
// aria-live="polite"
|
|
@@ -21954,8 +22442,8 @@ export {
|
|
|
21954
22442
|
// ? "border-[var(--Border-Caution)]"
|
|
21955
22443
|
// : "border-[var(--Border-Control,var(--Border-Medium-Emphasis))]",
|
|
21956
22444
|
// disabled
|
|
21957
|
-
// ? "bg-[var(--Surface-Tertiary)] text-[var(--Text-Disable)]"
|
|
21958
|
-
// : "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)]"
|
|
22445
|
+
// ? "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Disable)]"
|
|
22446
|
+
// : "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-High-Emphasis)]"
|
|
21959
22447
|
// )}
|
|
21960
22448
|
// aria-live="polite"
|
|
21961
22449
|
// aria-atomic="true"
|
|
@@ -21971,7 +22459,7 @@ export {
|
|
|
21971
22459
|
// "flex size-10 shrink-0 items-center justify-center rounded-full border transition-colors outline-none",
|
|
21972
22460
|
// FOCUS_RING,
|
|
21973
22461
|
// canIncrement
|
|
21974
|
-
// ? "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] text-[var(--Object-High-Emphasis)] hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Tertiary)] active:bg-[var(--Surface-Tertiary)]"
|
|
22462
|
+
// ? "border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Primary)] text-[var(--Object-High-Emphasis)] hover:border-[var(--Border-High-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)] active:bg-[var(--Surface-Neutral-Tertiary)]"
|
|
21975
22463
|
// : "border-[var(--Border-Medium-Emphasis)] bg-[var(--Surface-Primary)] text-[var(--Object-Disable)]"
|
|
21976
22464
|
// )}
|
|
21977
22465
|
// onClick={handleIncrement}
|
|
@@ -21980,6 +22468,7 @@ export {
|
|
|
21980
22468
|
// >
|
|
21981
22469
|
// <Add size={18} />
|
|
21982
22470
|
// </button>
|
|
22471
|
+
// {hiddenValueInput}
|
|
21983
22472
|
// </div>
|
|
21984
22473
|
// )
|
|
21985
22474
|
// }
|
|
@@ -22166,7 +22655,7 @@ export {
|
|
|
22166
22655
|
// * - チェックアウト・会員登録など段階フロー画面で使用
|
|
22167
22656
|
// * - `currentStep` で現在のステップをハイライト
|
|
22168
22657
|
// * - 完了済みステップにはチェックマークアイコン
|
|
22169
|
-
// * - アクティブ/完了: Brand-Cake-Orange、未到達: Surface-Tertiary
|
|
22658
|
+
// * - アクティブ/完了: Brand-Cake-Orange、未到達: Surface-Neutral-Tertiary
|
|
22170
22659
|
// */
|
|
22171
22660
|
// function ProgressSteps({
|
|
22172
22661
|
// className,
|
|
@@ -22198,7 +22687,7 @@ export {
|
|
|
22198
22687
|
// "flex size-7 items-center justify-center rounded-full typo-label-sm transition-colors",
|
|
22199
22688
|
// isActive
|
|
22200
22689
|
// ? "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)]"
|
|
22201
|
-
// : "bg-[var(--Surface-Tertiary)] text-[var(--Text-Low-Emphasis)]"
|
|
22690
|
+
// : "bg-[var(--Surface-Neutral-Tertiary)] text-[var(--Text-Low-Emphasis)]"
|
|
22202
22691
|
// )}
|
|
22203
22692
|
// aria-current={isCurrent ? "step" : undefined}
|
|
22204
22693
|
// >
|
|
@@ -22512,7 +23001,7 @@ export {
|
|
|
22512
23001
|
// }
|
|
22513
23002
|
//
|
|
22514
23003
|
// const rootClassName = cn(
|
|
22515
|
-
// "group flex items-center overflow-hidden rounded-lg border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Secondary)] transition-colors",
|
|
23004
|
+
// "group flex items-center overflow-hidden rounded-lg border border-[var(--Border-Control,var(--Border-Medium-Emphasis))] bg-[var(--Surface-Neutral-Secondary)] transition-colors",
|
|
22516
23005
|
// // Tailwind の variant 順では focus-within が hover より先に出力される
|
|
22517
23006
|
// // = hover が後勝ちしてフォーカス枠を潰すため、hover 側を明示的に抑制する。
|
|
22518
23007
|
// "hover:not-focus-within:border-[var(--Border-High-Emphasis)]",
|
|
@@ -22539,7 +23028,7 @@ export {
|
|
|
22539
23028
|
// <button
|
|
22540
23029
|
// type={isFormMode ? "submit" : "button"}
|
|
22541
23030
|
// className={cn(
|
|
22542
|
-
// "flex shrink-0 items-center justify-center border-l border-[var(--Border-Control,var(--Border-Medium-Emphasis))] text-[var(--Text-Low-Emphasis)] transition-colors outline-none hover:bg-[var(--Surface-Tertiary)] hover:text-[var(--Text-High-Emphasis)]",
|
|
23031
|
+
// "flex shrink-0 items-center justify-center border-l border-[var(--Border-Control,var(--Border-Medium-Emphasis))] text-[var(--Text-Low-Emphasis)] transition-colors outline-none hover:bg-[var(--Surface-Neutral-Tertiary)] hover:text-[var(--Text-High-Emphasis)]",
|
|
22543
23032
|
// // 親が overflow-hidden なので外向きリングは切れる。内側に描く。
|
|
22544
23033
|
// FOCUS_RING_INSET,
|
|
22545
23034
|
// // 高さは親の枠(border 1px)の内側いっぱい(h-full)。以前は親と同じ高さ(h-9 / h-11)で、
|
|
@@ -23128,7 +23617,7 @@ export {
|
|
|
23128
23617
|
// "flex items-center gap-3 px-4 py-2.5 typo-body-md transition-colors cursor-pointer",
|
|
23129
23618
|
// isActive
|
|
23130
23619
|
// ? "border-l-2 border-[var(--Brand-Cake-Orange)] text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)] pl-3.5"
|
|
23131
|
-
// : "border-l-2 border-transparent text-[var(--Text-Medium-Emphasis)] hover:bg-[var(--Surface-Secondary)] hover:text-[var(--Text-High-Emphasis)]",
|
|
23620
|
+
// : "border-l-2 border-transparent text-[var(--Text-Medium-Emphasis)] hover:bg-[var(--Surface-Neutral-Secondary)] hover:text-[var(--Text-High-Emphasis)]",
|
|
23132
23621
|
// )}
|
|
23133
23622
|
// aria-current={isActive ? "location" : undefined}
|
|
23134
23623
|
// >
|
|
@@ -23199,7 +23688,7 @@ export {
|
|
|
23199
23688
|
// * `--card-surface: var(--Surface-Primary)` を配下に流すことで、**Section 配下の Card は
|
|
23200
23689
|
// * `surface` 未指定でも白**になる(`Card surface="primary"` の明示指定は従来通り優先)。
|
|
23201
23690
|
// *
|
|
23202
|
-
// *
|
|
23691
|
+
// * 「色地の上の Card は白」を**構造で**保証するのが狙いで、あとからカードを足しても
|
|
23203
23692
|
// * prop の付け忘れが起きない。伝播は CSS カスタムプロパティのカスケードのみで、React context は
|
|
23204
23693
|
// * 使わない(Server Component のまま使える/DS 外の要素は影響を受けない)。
|
|
23205
23694
|
// *
|
|
@@ -23730,7 +24219,7 @@ export {
|
|
|
23730
24219
|
// className={cn(
|
|
23731
24220
|
// // hover はモーショントークン参照(prefers-reduced-motion で自動停止する)。
|
|
23732
24221
|
// // 素の transition-colors は Tailwind 既定値でトークン制御が効かない(#201)
|
|
23733
|
-
// "flex items-center gap-3 px-4 py-2.5 typo-body-md transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Secondary)] cursor-pointer",
|
|
24222
|
+
// "flex items-center gap-3 px-4 py-2.5 typo-body-md transition-colors duration-[var(--Motion-Duration-Base)] ease-[var(--Motion-Easing-Standard)] hover:bg-[var(--Surface-Neutral-Secondary)] cursor-pointer",
|
|
23734
24223
|
// active
|
|
23735
24224
|
// ? "border-l-2 border-[var(--Brand-Cake-Orange)] text-[var(--Text-Accent-Primary)] bg-[var(--Surface-Accent-Primary-Light)] pl-3.5"
|
|
23736
24225
|
// : "text-[var(--Text-High-Emphasis)] border-l-2 border-transparent",
|
|
@@ -24161,7 +24650,7 @@ export {
|
|
|
24161
24650
|
// "shrink-0 rounded-full px-3 typo-label-sm transition-colors h-8 inline-flex items-center justify-center",
|
|
24162
24651
|
// item.isActive
|
|
24163
24652
|
// ? "bg-[var(--Brand-Cake-Orange)] text-[var(--Text-on-Inverse)]"
|
|
24164
|
-
// : "bg-[var(--Surface-Secondary)] text-[var(--Text-Medium-Emphasis)] hover:bg-[var(--Surface-Tertiary)]"
|
|
24653
|
+
// : "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-Medium-Emphasis)] hover:bg-[var(--Surface-Neutral-Tertiary)]"
|
|
24165
24654
|
// )}
|
|
24166
24655
|
// {...compProps}
|
|
24167
24656
|
// >
|
|
@@ -24246,7 +24735,7 @@ export {
|
|
|
24246
24735
|
// variants: {
|
|
24247
24736
|
// variant: {
|
|
24248
24737
|
// default:
|
|
24249
|
-
// "bg-[var(--Surface-Secondary)] text-[var(--Text-High-Emphasis)] dark:bg-[var(--Surface-Tertiary)] dark:text-[var(--Text-High-Emphasis)] dark:ring-1 dark:ring-[var(--Border-Medium-Emphasis)]",
|
|
24738
|
+
// "bg-[var(--Surface-Neutral-Secondary)] text-[var(--Text-High-Emphasis)] dark:bg-[var(--Surface-Neutral-Tertiary)] dark:text-[var(--Text-High-Emphasis)] dark:ring-1 dark:ring-[var(--Border-Medium-Emphasis)]",
|
|
24250
24739
|
// // 写真上のオーバーレイ用。画像の明暗に依存しない不透明な面を使う。
|
|
24251
24740
|
// image:
|
|
24252
24741
|
// "bg-[var(--Primitive-Gray-900)] text-[var(--Primitive-White-alpha-1000)]",
|
|
@@ -24261,7 +24750,7 @@ export {
|
|
|
24261
24750
|
// "info-fill":
|
|
24262
24751
|
// "bg-[var(--Primitive-Sea-600)] text-[var(--Text-on-Inverse)]",
|
|
24263
24752
|
// success:
|
|
24264
|
-
// "bg-[var(--
|
|
24753
|
+
// "bg-[var(--Surface-Success-Light)] text-[var(--Text-Success)]",
|
|
24265
24754
|
// accent:
|
|
24266
24755
|
// "bg-[var(--Surface-Accent-Primary-Light)] text-[var(--Text-Accent-Primary)]",
|
|
24267
24756
|
// timesale:
|
|
@@ -24477,8 +24966,8 @@ export {
|
|
|
24477
24966
|
// * - ヘッダーは既存 `Header`(variant="back")を使う。左上=戻る導線、
|
|
24478
24967
|
// * 右上=`primaryAction`(ワークスペース全体の上位アクションがある場合のみ)。
|
|
24479
24968
|
// * - `sectionNav` は編集内ナビのみ。グロナビは置かない。
|
|
24480
|
-
// * - `sectionNav` は Surface-Secondary から浮いた独立パネルとして、シェル側で角丸パネルにラップされる。
|
|
24481
|
-
// * - 地が Surface-Secondary なので、配下 `Card` の既定サーフェスを白にする文脈
|
|
24969
|
+
// * - `sectionNav` は Surface-Neutral-Secondary から浮いた独立パネルとして、シェル側で角丸パネルにラップされる。
|
|
24970
|
+
// * - 地が Surface-Neutral-Secondary なので、配下 `Card` の既定サーフェスを白にする文脈
|
|
24482
24971
|
// * (`--card-surface`)をシェルが宣言する。`Card` は `surface` 未指定のまま地から浮く(#150)。
|
|
24483
24972
|
// * - 標準的な編集は `AdminShell`(Standard Page(Edit)/旧 Form Page)。複雑・集中編集・没入執筆のみ本コンポーネント。
|
|
24484
24973
|
// *
|
|
@@ -24501,9 +24990,9 @@ export {
|
|
|
24501
24990
|
// <div
|
|
24502
24991
|
// data-slot="workspace-shell"
|
|
24503
24992
|
// className={cn(
|
|
24504
|
-
// // 地が Surface-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
|
|
24993
|
+
// // 地が Surface-Neutral-Secondary なので、配下 Card の既定サーフェスを白に切り替える文脈を宣言する
|
|
24505
24994
|
// // (#150 の Section と同じ仕組み。dark は半透明白が重なって浮くため据え置き)。
|
|
24506
|
-
// "@container min-h-screen bg-[var(--Surface-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]",
|
|
24995
|
+
// "@container min-h-screen bg-[var(--Surface-Neutral-Secondary)] [--card-surface:var(--Surface-Primary)] dark:[--card-surface:var(--Surface-Secondary)]",
|
|
24507
24996
|
// className
|
|
24508
24997
|
// )}
|
|
24509
24998
|
// >
|
|
@@ -25345,7 +25834,6 @@ export {
|
|
|
25345
25834
|
// FORCED_COLORS_COMMAND_ITEM,
|
|
25346
25835
|
// } from "./lib/focus-ring"
|
|
25347
25836
|
// export type { LinkComponent } from "./lib/link-component"
|
|
25348
|
-
// export { toast } from "sonner"
|
|
25349
25837
|
//
|
|
25350
25838
|
// // ============================================================
|
|
25351
25839
|
// // Foundations (shadcn ベース・全事業共通)
|
|
@@ -25397,7 +25885,7 @@ export {
|
|
|
25397
25885
|
// export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from "./components/foundations/drawer"
|
|
25398
25886
|
// export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./components/foundations/dropdown-menu"
|
|
25399
25887
|
// export { Field, FieldLabel, FieldSet, FieldLegend, FieldGroup, FieldDescription, FieldError, FieldSeparator, fieldVariants } from "./components/foundations/field"
|
|
25400
|
-
// export type { FieldProps } from "./components/foundations/field"
|
|
25888
|
+
// export type { FieldProps, FieldSetGap } from "./components/foundations/field"
|
|
25401
25889
|
// export { FileInput, formatFileNames, validateFileSize } from "./components/foundations/file-input"
|
|
25402
25890
|
// export type { FileInputProps, FileInputError } from "./components/foundations/file-input"
|
|
25403
25891
|
// export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from "./components/foundations/form"
|
|
@@ -25432,7 +25920,7 @@ export {
|
|
|
25432
25920
|
// export { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/foundations/tabs"
|
|
25433
25921
|
// export { Textarea } from "./components/foundations/textarea"
|
|
25434
25922
|
// export type { TextareaProps } from "./components/foundations/textarea"
|
|
25435
|
-
// export { Toaster } from "./components/foundations/sonner"
|
|
25923
|
+
// export { Toaster, toast } from "./components/foundations/sonner"
|
|
25436
25924
|
// export { Toggle, toggleVariants } from "./components/foundations/toggle"
|
|
25437
25925
|
// export { ToggleGroup, ToggleGroupItem } from "./components/foundations/toggle-group"
|
|
25438
25926
|
// export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/foundations/tooltip"
|
|
@@ -25528,7 +26016,7 @@ export {
|
|
|
25528
26016
|
// export { Timeline } from "./components/primitives/timeline"
|
|
25529
26017
|
// export type { TimelineItem, TimelineProps } from "./components/primitives/timeline"
|
|
25530
26018
|
// export { NumberInput, QuantitySelector } from "./components/primitives/number-input"
|
|
25531
|
-
// export type { NumberInputProps, QuantitySelectorProps } from "./components/primitives/number-input"
|
|
26019
|
+
// export type { NumberInputProps, NumberInputInputProps, QuantitySelectorProps } from "./components/primitives/number-input"
|
|
25532
26020
|
// export { SearchBar } from "./components/primitives/search-bar"
|
|
25533
26021
|
// export type { SearchBarProps } from "./components/primitives/search-bar"
|
|
25534
26022
|
// export { SearchPanel } from "./components/primitives/search-panel"
|
|
@@ -25773,6 +26261,166 @@ export {
|
|
|
25773
26261
|
// mergeIdRefs,
|
|
25774
26262
|
// }
|
|
25775
26263
|
//
|
|
26264
|
+
// src/lib/focus-restore.ts
|
|
26265
|
+
// "use client"
|
|
26266
|
+
//
|
|
26267
|
+
// import * as React from "react"
|
|
26268
|
+
//
|
|
26269
|
+
// /**
|
|
26270
|
+
// * オーバーレイ(Dialog / Sheet / AlertDialog / Drawer)を閉じたときに、その回に開く直前に
|
|
26271
|
+
// * フォーカスがあった要素(opener)へフォーカスを戻す共通処理。
|
|
26272
|
+
// *
|
|
26273
|
+
// * Radix の既定は「Trigger へ戻す」だけなので、Trigger を使わず state で開く使い方
|
|
26274
|
+
// * (一覧の行のボタンから 1 つのダイアログを開く等)では閉じたあとのフォーカスが body に落ちる。
|
|
26275
|
+
// *
|
|
26276
|
+
// * - 記録は開くたびに上書きし、閉じるときに取り出して空に戻す(開閉をまたいで古い opener を残さない)
|
|
26277
|
+
// * - opener が DOM から消えている・disabled・inert の中・body のときは戻さず、Radix の既定に任せる
|
|
26278
|
+
// * (Safari / iOS はクリックでボタンにフォーカスが乗らないため、body が記録されることがある)
|
|
26279
|
+
// * - consumer の `onCloseAutoFocus` を先に呼び、`preventDefault()` されたら何もしない
|
|
26280
|
+
// * - 閉じた時点でフォーカスが body 以外(非モーダルで外側の要素を押した等)にあるなら奪わない
|
|
26281
|
+
// * - 戻すときは `preventScroll: true`(画面外の行へ一覧がスクロールで飛ばないように)
|
|
26282
|
+
// */
|
|
26283
|
+
//
|
|
26284
|
+
// /** opener へ戻してよいか(DOM 上にあり、disabled / inert ではなく、body / html でない)。 */
|
|
26285
|
+
// export function canRestoreFocusTo(el: Element | null | undefined): el is HTMLElement {
|
|
26286
|
+
// if (!(el instanceof HTMLElement) || !el.isConnected) return false
|
|
26287
|
+
// const doc = el.ownerDocument
|
|
26288
|
+
// if (el === doc.body || el === doc.documentElement) return false
|
|
26289
|
+
// return !el.matches(":disabled, [inert], [inert] *")
|
|
26290
|
+
// }
|
|
26291
|
+
//
|
|
26292
|
+
// /** フォーカスがどこにも無い(body / html / null)か。 */
|
|
26293
|
+
// function isFocusNowhere(doc: Document): boolean {
|
|
26294
|
+
// const active = doc.activeElement
|
|
26295
|
+
// return active == null || active === doc.body || active === doc.documentElement
|
|
26296
|
+
// }
|
|
26297
|
+
//
|
|
26298
|
+
// /**
|
|
26299
|
+
// * Root 部品(Dialog / Sheet / AlertDialog)が持つ、開閉 1 回分の記録。
|
|
26300
|
+
// * opener を Content ごとではなく Root 側に置くことで、開いたまま consumer が Content を
|
|
26301
|
+
// * 作り直した(key の変更など)ときも記録を引き継ぐ。
|
|
26302
|
+
// */
|
|
26303
|
+
// export interface OverlayFocusRoot {
|
|
26304
|
+
// openerRef: React.RefObject<HTMLElement | null>
|
|
26305
|
+
// /** 今開いているか(controlled なら open、uncontrolled なら onOpenChange で追う)。 */
|
|
26306
|
+
// isOpen: () => boolean
|
|
26307
|
+
// /** Content のマウント中に数える。0 なら Content ごと外された(閉じたのと同じ扱い)。 */
|
|
26308
|
+
// registerContent: () => () => void
|
|
26309
|
+
// hasContent: () => boolean
|
|
26310
|
+
// }
|
|
26311
|
+
//
|
|
26312
|
+
// /**
|
|
26313
|
+
// * Content が読む Root の記録。Drawer のように Root 側の記録を持たない部品は null を流して、
|
|
26314
|
+
// * 外側の Dialog などの記録を誤って使わないようにする。
|
|
26315
|
+
// */
|
|
26316
|
+
// export const OverlayFocusRootContext = React.createContext<OverlayFocusRoot | null>(null)
|
|
26317
|
+
//
|
|
26318
|
+
// /** SSR(React 18 の peer を含む)で useLayoutEffect の警告を出さないための切り替え。 */
|
|
26319
|
+
// const useIsomorphicLayoutEffect = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect
|
|
26320
|
+
//
|
|
26321
|
+
// /**
|
|
26322
|
+
// * Root 部品で使う。開閉状態を追い、Content へ流す記録と、Radix Root へ渡す `onOpenChange` を返す。
|
|
26323
|
+
// */
|
|
26324
|
+
// export function useOverlayFocusRoot(
|
|
26325
|
+
// open: boolean | undefined,
|
|
26326
|
+
// defaultOpen: boolean | undefined,
|
|
26327
|
+
// onOpenChange: ((open: boolean) => void) | undefined
|
|
26328
|
+
// ): { root: OverlayFocusRoot; handleOpenChange: (open: boolean) => void } {
|
|
26329
|
+
// const openerRef = React.useRef<HTMLElement | null>(null)
|
|
26330
|
+
// const openRef = React.useRef(open ?? defaultOpen ?? false)
|
|
26331
|
+
// const contentCountRef = React.useRef(0)
|
|
26332
|
+
//
|
|
26333
|
+
// // useEffect だと Radix の setTimeout(0) の onCloseAutoFocus より後に反映されうるため layout effect で追う
|
|
26334
|
+
// useIsomorphicLayoutEffect(() => {
|
|
26335
|
+
// if (open !== undefined) openRef.current = open
|
|
26336
|
+
// }, [open])
|
|
26337
|
+
//
|
|
26338
|
+
// const handleOpenChange = React.useCallback(
|
|
26339
|
+
// (next: boolean) => {
|
|
26340
|
+
// // controlled のときは consumer が open を変えた時点(上の layout effect)で追う
|
|
26341
|
+
// if (open === undefined) openRef.current = next
|
|
26342
|
+
// onOpenChange?.(next)
|
|
26343
|
+
// },
|
|
26344
|
+
// [open, onOpenChange]
|
|
26345
|
+
// )
|
|
26346
|
+
//
|
|
26347
|
+
// const root = React.useMemo<OverlayFocusRoot>(
|
|
26348
|
+
// () => ({
|
|
26349
|
+
// openerRef,
|
|
26350
|
+
// isOpen: () => openRef.current,
|
|
26351
|
+
// registerContent: () => {
|
|
26352
|
+
// contentCountRef.current += 1
|
|
26353
|
+
// return () => {
|
|
26354
|
+
// contentCountRef.current -= 1
|
|
26355
|
+
// }
|
|
26356
|
+
// },
|
|
26357
|
+
// hasContent: () => contentCountRef.current > 0,
|
|
26358
|
+
// }),
|
|
26359
|
+
// []
|
|
26360
|
+
// )
|
|
26361
|
+
//
|
|
26362
|
+
// return { root, handleOpenChange }
|
|
26363
|
+
// }
|
|
26364
|
+
//
|
|
26365
|
+
// /**
|
|
26366
|
+
// * 開くときに呼ぶ。今フォーカスがある要素で記録を上書きする。
|
|
26367
|
+
// *
|
|
26368
|
+
// * 例外: 戻せる opener を記録済みで、今のフォーカスが body(どこにも無い)のときは上書きしない。
|
|
26369
|
+
// * 開いたまま Content が作り直されると、新しい側の onOpenAutoFocus は「古い Content が消えて
|
|
26370
|
+
// * body に落ちた」瞬間に呼ばれるため、ここで上書きすると本来の opener を失う。
|
|
26371
|
+
// * 通常の開閉では閉じるときに記録を空に戻すので、この例外は作り直しのときにしか効かない。
|
|
26372
|
+
// */
|
|
26373
|
+
// function captureOpener(ref: React.RefObject<HTMLElement | null>): void {
|
|
26374
|
+
// if (typeof document === "undefined") return
|
|
26375
|
+
// if (isFocusNowhere(document) && canRestoreFocusTo(ref.current)) return
|
|
26376
|
+
// const active = document.activeElement
|
|
26377
|
+
// ref.current = active instanceof HTMLElement ? active : null
|
|
26378
|
+
// }
|
|
26379
|
+
//
|
|
26380
|
+
// interface AutoFocusHandlers {
|
|
26381
|
+
// onOpenAutoFocus?: (event: Event) => void
|
|
26382
|
+
// onCloseAutoFocus?: (event: Event) => void
|
|
26383
|
+
// }
|
|
26384
|
+
//
|
|
26385
|
+
// /**
|
|
26386
|
+
// * Content 部品で使う。consumer の `onOpenAutoFocus` / `onCloseAutoFocus` を合成した
|
|
26387
|
+
// * ハンドラーを返す。Radix の Content にそのまま渡す。
|
|
26388
|
+
// */
|
|
26389
|
+
// export function useRestoreFocusToOpener({
|
|
26390
|
+
// onOpenAutoFocus,
|
|
26391
|
+
// onCloseAutoFocus,
|
|
26392
|
+
// }: AutoFocusHandlers): Required<AutoFocusHandlers> {
|
|
26393
|
+
// const root = React.useContext(OverlayFocusRootContext)
|
|
26394
|
+
// const localOpenerRef = React.useRef<HTMLElement | null>(null)
|
|
26395
|
+
// const openerRef = root?.openerRef ?? localOpenerRef
|
|
26396
|
+
//
|
|
26397
|
+
// React.useEffect(() => root?.registerContent(), [root])
|
|
26398
|
+
//
|
|
26399
|
+
// return {
|
|
26400
|
+
// onOpenAutoFocus: (event) => {
|
|
26401
|
+
// captureOpener(openerRef)
|
|
26402
|
+
// onOpenAutoFocus?.(event)
|
|
26403
|
+
// },
|
|
26404
|
+
// onCloseAutoFocus: (event) => {
|
|
26405
|
+
// // 開いたまま Content が作り直された(古い側の FocusScope が外れた)ときも呼ばれる。
|
|
26406
|
+
// // そのときは記録を残し、フォーカスも新しい Content から動かさない
|
|
26407
|
+
// const recreated = root != null && root.isOpen() && root.hasContent()
|
|
26408
|
+
// const opener = recreated ? null : openerRef.current
|
|
26409
|
+
// if (!recreated) openerRef.current = null
|
|
26410
|
+
// onCloseAutoFocus?.(event)
|
|
26411
|
+
// if (event.defaultPrevented) return
|
|
26412
|
+
// if (recreated) {
|
|
26413
|
+
// event.preventDefault()
|
|
26414
|
+
// return
|
|
26415
|
+
// }
|
|
26416
|
+
// if (typeof document === "undefined" || !isFocusNowhere(document)) return
|
|
26417
|
+
// if (!canRestoreFocusTo(opener)) return
|
|
26418
|
+
// event.preventDefault()
|
|
26419
|
+
// opener.focus({ preventScroll: true })
|
|
26420
|
+
// },
|
|
26421
|
+
// }
|
|
26422
|
+
// }
|
|
26423
|
+
//
|
|
25776
26424
|
// src/lib/focus-ring.ts
|
|
25777
26425
|
// /**
|
|
25778
26426
|
// * DS 正規のフォーカス可視化(フォーカスリング)。
|
|
@@ -25870,13 +26518,16 @@ export {
|
|
|
25870
26518
|
// * ラッパーが枠を描き、内側の要素がフォーカスを受け取る合成コントロール用
|
|
25871
26519
|
// * (SearchBar の枠、FileInput の label 等)。
|
|
25872
26520
|
// *
|
|
26521
|
+
// * リングの色は {@link FOCUS_RING} と同じ(既定は緑の 50% 透過、高コントラストのときだけ
|
|
26522
|
+
// * `--Focus-Ring-Control` の不透明な緑に切り替わる)。
|
|
26523
|
+
// *
|
|
25873
26524
|
// * hover で同じプロパティを変える場合は `hover:not-focus-within:*` で書くこと。
|
|
25874
26525
|
// *
|
|
25875
26526
|
// * @example
|
|
25876
26527
|
// * <div className={cn("border hover:not-focus-within:border-x", FOCUS_RING_WITHIN)}>
|
|
25877
26528
|
// */
|
|
25878
26529
|
// export const FOCUS_RING_WITHIN = [
|
|
25879
|
-
// "focus-within:border-[var(--Focus-High-Emphasis)] focus-within:ring-[3px] focus-within:ring-[var(--Focus-High-Emphasis)]
|
|
26530
|
+
// "focus-within:border-[var(--Focus-High-Emphasis)] focus-within:ring-[3px] focus-within:ring-[color:var(--Focus-Ring-Control,color-mix(in_oklab,var(--Focus-High-Emphasis)_50%,transparent))]",
|
|
25880
26531
|
// FORCED_COLORS_FOCUS_WITHIN,
|
|
25881
26532
|
// ].join(" ")
|
|
25882
26533
|
//
|
|
@@ -25953,6 +26604,59 @@ export {
|
|
|
25953
26604
|
// return Math.min(currentIndex, images.length - 1)
|
|
25954
26605
|
// }
|
|
25955
26606
|
//
|
|
26607
|
+
// src/lib/ime.ts
|
|
26608
|
+
// /**
|
|
26609
|
+
// * 日本語入力(IME)の変換中に押されたキーを見分けるための判定。
|
|
26610
|
+
// *
|
|
26611
|
+
// * 判定は 2 段構え:
|
|
26612
|
+
// * 1. `isComposing` — 標準。Chrome / Firefox はこれで足りる
|
|
26613
|
+
// * 2. `keyCode === 229` — Safari(WebKit)は変換を終えるキーの keydown を compositionend の
|
|
26614
|
+
// * 後に出すため、その keydown では `isComposing` が false になる。代わりに keyCode が
|
|
26615
|
+
// * 229("process" キー)になるので、それも変換中として扱う。一部の Android WebView も
|
|
26616
|
+
// * `isComposing` を立てずに 229 だけを送る
|
|
26617
|
+
// */
|
|
26618
|
+
//
|
|
26619
|
+
// /** 判定に必要な最小限の形(React.KeyboardEvent と DOM の KeyboardEvent の両方を受ける)。 */
|
|
26620
|
+
// export interface ImeKeyEventLike {
|
|
26621
|
+
// nativeEvent?: { isComposing?: boolean; keyCode?: number }
|
|
26622
|
+
// isComposing?: boolean
|
|
26623
|
+
// keyCode?: number
|
|
26624
|
+
// }
|
|
26625
|
+
//
|
|
26626
|
+
// /** 変換中の keydown なら true。 */
|
|
26627
|
+
// export function isImeComposing(event: ImeKeyEventLike): boolean {
|
|
26628
|
+
// const source = event.nativeEvent ?? event
|
|
26629
|
+
// return source.isComposing === true || source.keyCode === 229
|
|
26630
|
+
// }
|
|
26631
|
+
//
|
|
26632
|
+
// /**
|
|
26633
|
+
// * オーバーレイ(Dialog / Sheet / AlertDialog / Drawer / Popover)の `onEscapeKeyDown` で使う。
|
|
26634
|
+
// * 変換中の Esc(変換の取り消し)なら `preventDefault()` して true を返す。
|
|
26635
|
+
// *
|
|
26636
|
+
// * Radix の DismissableLayer は `key === "Escape"` だけを見て閉じるため、変換を取り消すつもりの
|
|
26637
|
+
// * Esc で入力中のダイアログやシートごと閉じ、入力した内容が消えていた。preventDefault すると
|
|
26638
|
+
// * Radix は閉じない。変換していないときの Esc は従来どおり閉じる。
|
|
26639
|
+
// * consumer の `onEscapeKeyDown` を先に呼んでから、このガードを呼ぶこと。
|
|
26640
|
+
// */
|
|
26641
|
+
// export function guardEscapeDuringIme(event: Pick<Event, "preventDefault"> & ImeKeyEventLike): boolean {
|
|
26642
|
+
// if (!isImeComposing(event)) return false
|
|
26643
|
+
// event.preventDefault()
|
|
26644
|
+
// return true
|
|
26645
|
+
// }
|
|
26646
|
+
//
|
|
26647
|
+
// /**
|
|
26648
|
+
// * consumer の `onEscapeKeyDown` を先に呼び、そのあと変換中の Esc を止めるハンドラーを作る。
|
|
26649
|
+
// * Content 部品の `onEscapeKeyDown` にそのまま渡す。
|
|
26650
|
+
// */
|
|
26651
|
+
// export function composeEscapeKeyDownWithImeGuard(
|
|
26652
|
+
// handler: ((event: KeyboardEvent) => void) | undefined
|
|
26653
|
+
// ): (event: KeyboardEvent) => void {
|
|
26654
|
+
// return (event) => {
|
|
26655
|
+
// handler?.(event)
|
|
26656
|
+
// guardEscapeDuringIme(event)
|
|
26657
|
+
// }
|
|
26658
|
+
// }
|
|
26659
|
+
//
|
|
25956
26660
|
// src/lib/link-component.ts
|
|
25957
26661
|
// import type * as React from "react"
|
|
25958
26662
|
//
|
|
@@ -26098,6 +26802,77 @@ export {
|
|
|
26098
26802
|
// ]
|
|
26099
26803
|
// }
|
|
26100
26804
|
//
|
|
26805
|
+
// src/lib/search-normalize.ts
|
|
26806
|
+
// /**
|
|
26807
|
+
// * ## 絞り込み検索の表記ゆれ吸収(Combobox 等)
|
|
26808
|
+
// *
|
|
26809
|
+
// * 日本語の候補を部分一致で絞り込むとき、次の違いを同じとみなす:
|
|
26810
|
+
// * - 大文字 / 小文字(`Tokyo` / `tokyo`)
|
|
26811
|
+
// * - 全角 / 半角(NFKC。`ABC` / `ABC`、`シブヤ` / `シブヤ`)
|
|
26812
|
+
// * - ひらがな / カタカナ(`しぶや` / `シブヤ`)
|
|
26813
|
+
// * - 漢字に挟まれた「ヶ / ケ / ヵ / が」(`市ヶ谷` / `市ケ谷`、`霞が関` / `霞ケ関`)
|
|
26814
|
+
// *
|
|
26815
|
+
// * 「ヶ」系の同一視は漢字に挟まれたときだけに限る(`ケーキ` が `がーき` に当たらないように)。
|
|
26816
|
+
// * 姉妹 DS(KSK #853)の Combobox の既定の絞り込みを移植したもの。
|
|
26817
|
+
// */
|
|
26818
|
+
//
|
|
26819
|
+
// const HAN = /\p{Script=Han}/u
|
|
26820
|
+
// // 文字コードの表なのでコードポイントで持つ
|
|
26821
|
+
// const KATAKANA_FIRST = 0x30a1 // ァ
|
|
26822
|
+
// const KATAKANA_LAST = 0x30f6 // ヶ
|
|
26823
|
+
// const KATAKANA_TO_HIRAGANA = 0x60
|
|
26824
|
+
// // カタカナ→ひらがな変換後の「ヶ / ケ / ヵ / が」(ゖ U+3096 / け U+3051 / ゕ U+3095 / が U+304C)
|
|
26825
|
+
// const KE_CANONICAL = String.fromCharCode(0x3096)
|
|
26826
|
+
// const KE_VARIANTS = new Set([0x3096, 0x3051, 0x3095, 0x304c].map((c) => String.fromCharCode(c)))
|
|
26827
|
+
//
|
|
26828
|
+
// /** 文脈に依らない正規化: NFKC(全角半角)→ 小文字 → カタカナをひらがなへ */
|
|
26829
|
+
// function normalizeSearchText(text: string): string {
|
|
26830
|
+
// return Array.from(text.normalize("NFKC").toLowerCase(), (c) => {
|
|
26831
|
+
// const code = c.charCodeAt(0)
|
|
26832
|
+
// return code >= KATAKANA_FIRST && code <= KATAKANA_LAST
|
|
26833
|
+
// ? String.fromCharCode(code - KATAKANA_TO_HIRAGANA)
|
|
26834
|
+
// : c
|
|
26835
|
+
// }).join("")
|
|
26836
|
+
// }
|
|
26837
|
+
//
|
|
26838
|
+
// /**
|
|
26839
|
+
// * 表記ゆれ用の正規化。{@link normalizeSearchText} 済みの文字列について、漢字に挟まれた
|
|
26840
|
+
// * 「ヶ / ケ / ヵ / が」を同じ字にする。直後が文字列の終わりでも同一視する(「市ヶ」まで打った途中でも
|
|
26841
|
+
// * 当たるように)。`isQuery` のときは先頭の直前を漢字とみなす(「ヶ谷」と打っても候補の「漢字 + ケ」に当たるように)。
|
|
26842
|
+
// */
|
|
26843
|
+
// function normalizeKeVariants(normalized: string, isQuery: boolean): string {
|
|
26844
|
+
// const chars = Array.from(normalized)
|
|
26845
|
+
// return chars
|
|
26846
|
+
// .map((c, i) => {
|
|
26847
|
+
// if (!KE_VARIANTS.has(c)) return c
|
|
26848
|
+
// const prev = chars[i - 1]
|
|
26849
|
+
// const next = chars[i + 1]
|
|
26850
|
+
// const prevIsHan = prev === undefined ? isQuery : HAN.test(prev)
|
|
26851
|
+
// const nextIsHanOrEnd = next === undefined || HAN.test(next)
|
|
26852
|
+
// return prevIsHan && nextIsHanOrEnd ? KE_CANONICAL : c
|
|
26853
|
+
// })
|
|
26854
|
+
// .join("")
|
|
26855
|
+
// }
|
|
26856
|
+
//
|
|
26857
|
+
// /**
|
|
26858
|
+
// * 候補(ラベル・別名)のどれかが検索語を部分一致で含むか。
|
|
26859
|
+
// * 素の正規化での部分一致、または「ヶ」系もそろえた正規化での部分一致のどちらかで当てる
|
|
26860
|
+
// * (同一視は「追加で当てる」だけにし、`ケ谷` → `市ケ谷` のような素の一致を落とさない)。
|
|
26861
|
+
// * 検索語が空白だけのときは全件に当たる。
|
|
26862
|
+
// */
|
|
26863
|
+
// function matchesSearch(candidates: ReadonlyArray<string | undefined>, query: string): boolean {
|
|
26864
|
+
// const q = normalizeSearchText(query.trim())
|
|
26865
|
+
// if (q === "") return true
|
|
26866
|
+
// const qKe = normalizeKeVariants(q, true)
|
|
26867
|
+
// return candidates.some((candidate) => {
|
|
26868
|
+
// if (!candidate) return false
|
|
26869
|
+
// const c = normalizeSearchText(candidate)
|
|
26870
|
+
// return c.includes(q) || normalizeKeVariants(c, false).includes(qKe)
|
|
26871
|
+
// })
|
|
26872
|
+
// }
|
|
26873
|
+
//
|
|
26874
|
+
// export { normalizeSearchText, normalizeKeVariants, matchesSearch }
|
|
26875
|
+
//
|
|
26101
26876
|
// src/lib/story-navigation.ts
|
|
26102
26877
|
// /**
|
|
26103
26878
|
// * Storybook ストーリー間ナビゲーション
|