@bearmenu/ui 0.6.0 → 0.7.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/dist/chunk-A5ONAJCE.js +102 -0
- package/dist/chunk-AV777R4G.js +43 -0
- package/dist/{chunk-WKMLZDUT.js → chunk-FRPPIXMY.js} +1 -1
- package/dist/{chunk-PSR7N36A.js → chunk-HCM6LKM5.js} +1 -1
- package/dist/{chunk-YJ6OBKZJ.js → chunk-TL4YU2O5.js} +10 -3
- package/dist/chunk-UX6SWAKH.js +320 -0
- package/dist/{chunk-7PPCH42H.js → chunk-VQNDZVI7.js} +1 -1
- package/dist/chunk-WSRWFA6K.js +26 -0
- package/dist/chunk-YLNYXPIH.js +61 -0
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert.d.ts +2 -2
- package/dist/components/badge.d.ts +3 -2
- package/dist/components/badge.js +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/card.d.ts +2 -2
- package/dist/components/card.js +127 -4
- package/dist/components/combobox.js +2 -2
- package/dist/components/command.d.ts +15 -15
- package/dist/components/command.js +2 -2
- package/dist/components/currency-input.js +1 -1
- package/dist/components/date-input.d.ts +1 -1
- package/dist/components/date-input.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/filter-category-row.d.ts +13 -0
- package/dist/components/filter-category-row.js +44 -0
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.js +10 -5
- package/dist/components/input.d.ts +1 -0
- package/dist/components/input.js +1 -1
- package/dist/components/item.d.ts +2 -2
- package/dist/components/multi-select-combobox.js +3 -3
- package/dist/components/phone-frame.js +1 -1
- package/dist/components/place-about-tab.d.ts +2 -2
- package/dist/components/place-about-tab.js +4 -3
- package/dist/components/place-details-mobile.js +5 -3
- package/dist/components/place-schedule-week.d.ts +19 -0
- package/dist/components/place-schedule-week.js +4 -0
- package/dist/components/place-types.d.ts +18 -9
- package/dist/components/scroll-fade.d.ts +15 -0
- package/dist/components/scroll-fade.js +121 -0
- package/dist/components/searchable-select.js +2 -2
- package/dist/components/separator.js +3 -26
- package/dist/components/sheet.js +1 -1
- package/dist/components/sliding-panels.d.ts +1 -0
- package/dist/components/sliding-panels.js +22 -6
- package/dist/components/sort-option-list.d.ts +16 -0
- package/dist/components/sort-option-list.js +46 -0
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/tabs.js +98 -17
- package/dist/components/tag.d.ts +2 -2
- package/dist/components/tag.js +3 -61
- package/dist/components/text.d.ts +3 -3
- package/dist/components/toast.js +1 -1
- package/dist/components/toaster.js +1 -1
- package/package.json +23 -112
- package/src/components/accordion.tsx +1 -1
- package/src/components/badge.tsx +9 -2
- package/src/components/card.tsx +22 -18
- package/src/components/dialog.tsx +1 -1
- package/src/components/filter-category-row.tsx +52 -0
- package/src/components/input-group.tsx +9 -4
- package/src/components/input.tsx +8 -3
- package/src/components/phone-frame.tsx +1 -1
- package/src/components/place-about-tab.stories.tsx +24 -13
- package/src/components/place-about-tab.test.tsx +92 -38
- package/src/components/place-about-tab.tsx +310 -344
- package/src/components/place-schedule-week.tsx +128 -0
- package/src/components/place-types.ts +27 -8
- package/src/components/scroll-fade.stories.tsx +98 -0
- package/src/components/scroll-fade.tsx +132 -0
- package/src/components/sheet.tsx +1 -1
- package/src/components/sliding-panels.tsx +33 -6
- package/src/components/sort-option-list.tsx +57 -0
- package/src/components/tabs.tsx +76 -11
- package/src/components/toast.tsx +1 -1
- package/src/globals.css +77 -19
- package/src/lib/motion.ts +137 -0
- package/dist/chunk-BAZFVSSG.js +0 -279
- package/dist/chunk-RIDXFY6M.js +0 -38
- package/dist/chunk-XK2ZDQVE.js +0 -122
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bearmenu/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "BearMenu design system — shared UI tokens, primitives, and components",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -17,118 +17,19 @@
|
|
|
17
17
|
],
|
|
18
18
|
"exports": {
|
|
19
19
|
"./globals.css": "./src/globals.css",
|
|
20
|
-
"./components
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"./
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"./
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"./components/carousel": "./src/components/carousel.tsx",
|
|
32
|
-
"./components/checkbox": "./src/components/checkbox.tsx",
|
|
33
|
-
"./components/circular-progress": "./src/components/circular-progress.tsx",
|
|
34
|
-
"./components/collapsible": "./src/components/collapsible.tsx",
|
|
35
|
-
"./components/combobox": "./src/components/combobox.tsx",
|
|
36
|
-
"./components/command": "./src/components/command.tsx",
|
|
37
|
-
"./components/currency-input": "./src/components/currency-input.tsx",
|
|
38
|
-
"./components/date-input": "./src/components/date-input.tsx",
|
|
39
|
-
"./components/description-list": "./src/components/description-list.tsx",
|
|
40
|
-
"./components/dialog": "./src/components/dialog.tsx",
|
|
41
|
-
"./components/drawer": "./src/components/drawer.tsx",
|
|
42
|
-
"./components/dropdown-menu": "./src/components/dropdown-menu.tsx",
|
|
43
|
-
"./components/empty-state": "./src/components/empty-state.tsx",
|
|
44
|
-
"./components/field": "./src/components/field.tsx",
|
|
45
|
-
"./components/form": "./src/components/form.tsx",
|
|
46
|
-
"./components/haptic-button": "./src/components/haptic-button.tsx",
|
|
47
|
-
"./components/input-group": "./src/components/input-group.tsx",
|
|
48
|
-
"./components/input-otp": "./src/components/input-otp.tsx",
|
|
49
|
-
"./components/input": "./src/components/input.tsx",
|
|
50
|
-
"./components/item": "./src/components/item.tsx",
|
|
51
|
-
"./components/kbd": "./src/components/kbd.tsx",
|
|
52
|
-
"./components/label": "./src/components/label.tsx",
|
|
53
|
-
"./components/lazy-markdown": "./src/components/lazy-markdown.tsx",
|
|
54
|
-
"./components/link-button": "./src/components/link-button.tsx",
|
|
55
|
-
"./components/markdown-renderer": "./src/components/markdown-renderer.tsx",
|
|
56
|
-
"./components/multi-select-combobox": "./src/components/multi-select-combobox.tsx",
|
|
57
|
-
"./components/multi-select-menu": "./src/components/multi-select-menu.tsx",
|
|
58
|
-
"./components/native-select": "./src/components/native-select.tsx",
|
|
59
|
-
"./components/pagination": "./src/components/pagination.tsx",
|
|
60
|
-
"./components/phone-frame": "./src/components/phone-frame.tsx",
|
|
61
|
-
"./components/place-about-tab": "./src/components/place-about-tab.tsx",
|
|
62
|
-
"./components/place-card": "./src/components/place-card.tsx",
|
|
63
|
-
"./components/place-details-mobile": "./src/components/place-details-mobile.tsx",
|
|
64
|
-
"./components/place-types": "./src/components/place-types.ts",
|
|
65
|
-
"./components/popover": "./src/components/popover.tsx",
|
|
66
|
-
"./components/progress": "./src/components/progress.tsx",
|
|
67
|
-
"./components/radio-group": "./src/components/radio-group.tsx",
|
|
68
|
-
"./components/rating": "./src/components/rating.tsx",
|
|
69
|
-
"./components/scroll-area": "./src/components/scroll-area.tsx",
|
|
70
|
-
"./components/search-bar": "./src/components/search-bar.tsx",
|
|
71
|
-
"./components/searchable-select": "./src/components/searchable-select.tsx",
|
|
72
|
-
"./components/select": "./src/components/select.tsx",
|
|
73
|
-
"./components/selection-bar": "./src/components/selection-bar.tsx",
|
|
74
|
-
"./components/separator": "./src/components/separator.tsx",
|
|
75
|
-
"./components/sheet": "./src/components/sheet.tsx",
|
|
76
|
-
"./components/skeleton-card": "./src/components/skeleton-card.tsx",
|
|
77
|
-
"./components/skeleton": "./src/components/skeleton.tsx",
|
|
78
|
-
"./components/slider": "./src/components/slider.tsx",
|
|
79
|
-
"./components/sliding-panels": "./src/components/sliding-panels.tsx",
|
|
80
|
-
"./components/sonner": "./src/components/sonner.tsx",
|
|
81
|
-
"./components/spinner": "./src/components/spinner.tsx",
|
|
82
|
-
"./components/stepper": "./src/components/stepper.tsx",
|
|
83
|
-
"./components/sticky-container": "./src/components/sticky-container.tsx",
|
|
84
|
-
"./components/switch": "./src/components/switch.tsx",
|
|
85
|
-
"./components/table": "./src/components/table.tsx",
|
|
86
|
-
"./components/tabs": "./src/components/tabs.tsx",
|
|
87
|
-
"./components/tag-group": "./src/components/tag-group.tsx",
|
|
88
|
-
"./components/tag": "./src/components/tag.tsx",
|
|
89
|
-
"./components/text": "./src/components/text.tsx",
|
|
90
|
-
"./components/textarea": "./src/components/textarea.tsx",
|
|
91
|
-
"./components/toast": "./src/components/toast.tsx",
|
|
92
|
-
"./components/toaster": "./src/components/toaster.tsx",
|
|
93
|
-
"./components/toggle-group": "./src/components/toggle-group.tsx",
|
|
94
|
-
"./components/toggle": "./src/components/toggle.tsx",
|
|
95
|
-
"./components/tooltip": "./src/components/tooltip.tsx",
|
|
96
|
-
"./components/use-mobile": "./src/components/use-mobile.tsx",
|
|
97
|
-
"./components/use-toast": "./src/components/use-toast.ts",
|
|
98
|
-
"./hooks/use-haptic": "./src/hooks/use-haptic.ts",
|
|
99
|
-
"./hooks/use-mobile": "./src/hooks/use-mobile.ts",
|
|
100
|
-
"./hooks/use-mounted-theme": "./src/hooks/use-mounted-theme.ts",
|
|
101
|
-
"./hooks/use-sticky": "./src/hooks/use-sticky.ts",
|
|
102
|
-
"./lib/utils": "./src/lib/utils.ts"
|
|
103
|
-
},
|
|
104
|
-
"publishConfig": {
|
|
105
|
-
"exports": {
|
|
106
|
-
"./globals.css": "./src/globals.css",
|
|
107
|
-
"./components/*": {
|
|
108
|
-
"types": "./dist/components/*.d.ts",
|
|
109
|
-
"import": "./dist/components/*.js"
|
|
110
|
-
},
|
|
111
|
-
"./hooks/*": {
|
|
112
|
-
"types": "./dist/hooks/*.d.ts",
|
|
113
|
-
"import": "./dist/hooks/*.js"
|
|
114
|
-
},
|
|
115
|
-
"./lib/*": {
|
|
116
|
-
"types": "./dist/lib/*.d.ts",
|
|
117
|
-
"import": "./dist/lib/*.js"
|
|
118
|
-
}
|
|
20
|
+
"./components/*": {
|
|
21
|
+
"types": "./dist/components/*.d.ts",
|
|
22
|
+
"import": "./dist/components/*.js"
|
|
23
|
+
},
|
|
24
|
+
"./hooks/*": {
|
|
25
|
+
"types": "./dist/hooks/*.d.ts",
|
|
26
|
+
"import": "./dist/hooks/*.js"
|
|
27
|
+
},
|
|
28
|
+
"./lib/*": {
|
|
29
|
+
"types": "./dist/lib/*.d.ts",
|
|
30
|
+
"import": "./dist/lib/*.js"
|
|
119
31
|
}
|
|
120
32
|
},
|
|
121
|
-
"scripts": {
|
|
122
|
-
"storybook": "storybook dev -p 6006",
|
|
123
|
-
"build-storybook": "storybook build",
|
|
124
|
-
"build": "tsup",
|
|
125
|
-
"dev": "tsup --watch",
|
|
126
|
-
"typecheck": "tsc --noEmit",
|
|
127
|
-
"test": "vitest run",
|
|
128
|
-
"test:watch": "vitest",
|
|
129
|
-
"clean": "rm -rf dist",
|
|
130
|
-
"prepublishOnly": "pnpm run build"
|
|
131
|
-
},
|
|
132
33
|
"peerDependencies": {
|
|
133
34
|
"@hookform/resolvers": "^3.0.0 || ^5.0.0",
|
|
134
35
|
"@radix-ui/react-accordion": "*",
|
|
@@ -236,5 +137,15 @@
|
|
|
236
137
|
"vaul": "^1.1.2",
|
|
237
138
|
"vitest": "^4.1.5",
|
|
238
139
|
"zod": "^3.25.67"
|
|
140
|
+
},
|
|
141
|
+
"scripts": {
|
|
142
|
+
"storybook": "storybook dev -p 6006",
|
|
143
|
+
"build-storybook": "storybook build",
|
|
144
|
+
"build": "tsup",
|
|
145
|
+
"dev": "tsup --watch",
|
|
146
|
+
"typecheck": "tsc --noEmit",
|
|
147
|
+
"test": "vitest run",
|
|
148
|
+
"test:watch": "vitest",
|
|
149
|
+
"clean": "rm -rf dist"
|
|
239
150
|
}
|
|
240
|
-
}
|
|
151
|
+
}
|
|
@@ -38,7 +38,7 @@ const AccordionTrigger = React.forwardRef<
|
|
|
38
38
|
{...props}
|
|
39
39
|
>
|
|
40
40
|
{children}
|
|
41
|
-
<ChevronDown className="size-4 shrink-0 text-muted-foreground transition-transform duration-
|
|
41
|
+
<ChevronDown className="size-4 shrink-0 text-muted-foreground transition-transform duration-[var(--duration-quick)] ease-[var(--ease-standard)]" />
|
|
42
42
|
</AccordionPrimitive.Trigger>
|
|
43
43
|
</AccordionPrimitive.Header>
|
|
44
44
|
));
|
package/src/components/badge.tsx
CHANGED
|
@@ -22,9 +22,16 @@ const badgeVariants = cva(
|
|
|
22
22
|
"border-transparent bg-warning text-warning-foreground",
|
|
23
23
|
brown: "border-transparent bg-brown text-brown-foreground",
|
|
24
24
|
},
|
|
25
|
+
// v1.0 motion: "live" surface signal — applies `live-pulse` archetype.
|
|
26
|
+
// Pair with a colored variant (e.g. variant="destructive" live).
|
|
27
|
+
live: {
|
|
28
|
+
true: "motion-live-pulse motion-reduce:animate-none",
|
|
29
|
+
false: "",
|
|
30
|
+
},
|
|
25
31
|
},
|
|
26
32
|
defaultVariants: {
|
|
27
33
|
variant: "default",
|
|
34
|
+
live: false,
|
|
28
35
|
},
|
|
29
36
|
}
|
|
30
37
|
);
|
|
@@ -32,8 +39,8 @@ const badgeVariants = cva(
|
|
|
32
39
|
export interface BadgeProps
|
|
33
40
|
extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
|
|
34
41
|
|
|
35
|
-
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
36
|
-
return <div data-slot="badge" className={cn(badgeVariants({ variant }), className)} {...props} />;
|
|
42
|
+
function Badge({ className, variant, live, ...props }: BadgeProps) {
|
|
43
|
+
return <div data-slot="badge" className={cn(badgeVariants({ variant, live }), className)} {...props} />;
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
export { Badge, badgeVariants };
|
package/src/components/card.tsx
CHANGED
|
@@ -3,25 +3,29 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import { cn } from "../lib/utils";
|
|
4
4
|
import { textVariants } from "./text";
|
|
5
5
|
|
|
6
|
-
const cardVariants = cva(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
const cardVariants = cva(
|
|
7
|
+
"rounded-3xl text-card-foreground transition-[background-color,border-color] duration-[var(--duration-quick)] ease-[var(--ease-standard)]",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
surface: "bg-card border border-border",
|
|
12
|
+
glass: "glass",
|
|
13
|
+
outline: "bg-transparent border border-border",
|
|
14
|
+
muted: "bg-muted border border-transparent",
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
sm: "[&_[data-slot=card-header]]:p-4 [&_[data-slot=card-content]]:p-4 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-4 [&_[data-slot=card-footer]]:pt-0",
|
|
18
|
+
default:
|
|
19
|
+
"[&_[data-slot=card-header]]:p-6 [&_[data-slot=card-content]]:p-6 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-6 [&_[data-slot=card-footer]]:pt-0",
|
|
20
|
+
lg: "[&_[data-slot=card-header]]:p-8 [&_[data-slot=card-content]]:p-8 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-8 [&_[data-slot=card-footer]]:pt-0",
|
|
21
|
+
},
|
|
22
|
+
// Interactive variant follows v1.0 `press-response` archetype:
|
|
23
|
+
// hover lift via shadow + translate (200ms), press scale-down (instant).
|
|
24
|
+
interactive: {
|
|
25
|
+
true: "cursor-pointer transition-[transform,border-color,box-shadow] duration-[var(--duration-quick)] ease-[var(--ease-standard)] hover:border-primary/40 hover:-translate-y-0.5 hover:shadow-md active:scale-[0.97] active:duration-[var(--duration-instant)] motion-reduce:hover:translate-y-0 motion-reduce:active:scale-100",
|
|
26
|
+
false: "",
|
|
27
|
+
},
|
|
13
28
|
},
|
|
14
|
-
size: {
|
|
15
|
-
sm: "[&_[data-slot=card-header]]:p-4 [&_[data-slot=card-content]]:p-4 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-4 [&_[data-slot=card-footer]]:pt-0",
|
|
16
|
-
default:
|
|
17
|
-
"[&_[data-slot=card-header]]:p-6 [&_[data-slot=card-content]]:p-6 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-6 [&_[data-slot=card-footer]]:pt-0",
|
|
18
|
-
lg: "[&_[data-slot=card-header]]:p-8 [&_[data-slot=card-content]]:p-8 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-8 [&_[data-slot=card-footer]]:pt-0",
|
|
19
|
-
},
|
|
20
|
-
interactive: {
|
|
21
|
-
true: "cursor-pointer hover:border-primary/40 hover:-translate-y-0.5 transition-[transform,border-color] duration-200",
|
|
22
|
-
false: "",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
29
|
defaultVariants: {
|
|
26
30
|
variant: "surface",
|
|
27
31
|
size: "default",
|
|
@@ -28,7 +28,7 @@ const DialogOverlay = React.forwardRef<
|
|
|
28
28
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
29
29
|
|
|
30
30
|
const dialogContentVariants = cva(
|
|
31
|
-
"fixed left-[50%] top-[50%] z-[1000] grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 bg-card p-6 shadow-2xl
|
|
31
|
+
"fixed left-[50%] top-[50%] z-[1000] grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 bg-card p-6 shadow-2xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:duration-[var(--duration-deliberate)] data-[state=closed]:duration-[var(--duration-exit-standard)] data-[state=open]:ease-[var(--ease-enter)] data-[state=closed]:ease-[var(--ease-exit)] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-2xl border border-border",
|
|
32
32
|
{
|
|
33
33
|
variants: {
|
|
34
34
|
size: {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { ChevronRight, type LucideIcon } from "lucide-react";
|
|
4
|
+
import { Badge } from "./badge";
|
|
5
|
+
import { Text } from "./text";
|
|
6
|
+
|
|
7
|
+
interface FilterCategoryRowProps {
|
|
8
|
+
icon: LucideIcon;
|
|
9
|
+
label: string;
|
|
10
|
+
description: string;
|
|
11
|
+
count?: number;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function FilterCategoryRow({
|
|
16
|
+
icon: Icon,
|
|
17
|
+
label,
|
|
18
|
+
description,
|
|
19
|
+
count = 0,
|
|
20
|
+
onClick,
|
|
21
|
+
}: FilterCategoryRowProps) {
|
|
22
|
+
return (
|
|
23
|
+
<button
|
|
24
|
+
type="button"
|
|
25
|
+
onClick={onClick}
|
|
26
|
+
className="flex items-center justify-between w-full py-3 transition-colors hover:bg-muted/50 rounded-lg px-2 -mx-2"
|
|
27
|
+
>
|
|
28
|
+
<div className="flex items-center gap-3">
|
|
29
|
+
<Icon
|
|
30
|
+
aria-hidden="true"
|
|
31
|
+
className="w-5 h-5 text-muted-foreground flex-shrink-0"
|
|
32
|
+
/>
|
|
33
|
+
<div className="text-left">
|
|
34
|
+
<Text as="p" weight="medium">
|
|
35
|
+
{label}
|
|
36
|
+
</Text>
|
|
37
|
+
<Text as="p" variant="body-sm" color="muted">
|
|
38
|
+
{description}
|
|
39
|
+
</Text>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div className="flex items-center gap-2">
|
|
43
|
+
{count > 0 && (
|
|
44
|
+
<Badge variant="secondary" className="text-xs">
|
|
45
|
+
{count}
|
|
46
|
+
</Badge>
|
|
47
|
+
)}
|
|
48
|
+
<ChevronRight className="w-5 h-5 text-muted-foreground" />
|
|
49
|
+
</div>
|
|
50
|
+
</button>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -6,7 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
6
6
|
import { cn } from "../lib/utils";
|
|
7
7
|
|
|
8
8
|
const inputGroupVariants = cva(
|
|
9
|
-
"flex items-center w-full
|
|
9
|
+
"flex items-center w-full border border-border bg-background text-base md:text-sm text-foreground transition-colors focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50 aria-invalid:border-destructive aria-invalid:focus-within:ring-destructive/40",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
size: {
|
|
@@ -14,9 +14,14 @@ const inputGroupVariants = cva(
|
|
|
14
14
|
default: "h-11",
|
|
15
15
|
lg: "h-12",
|
|
16
16
|
},
|
|
17
|
+
shape: {
|
|
18
|
+
rounded: "rounded-xl focus-within:ring-ring",
|
|
19
|
+
pill: "rounded-full shadow-[var(--shadow-card)] focus-within:ring-accent/30",
|
|
20
|
+
},
|
|
17
21
|
},
|
|
18
22
|
defaultVariants: {
|
|
19
23
|
size: "default",
|
|
24
|
+
shape: "rounded",
|
|
20
25
|
},
|
|
21
26
|
}
|
|
22
27
|
);
|
|
@@ -27,12 +32,12 @@ const InputGroupContext = React.createContext<InputGroupContextValue>({});
|
|
|
27
32
|
const InputGroup = React.forwardRef<
|
|
28
33
|
HTMLDivElement,
|
|
29
34
|
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof inputGroupVariants>
|
|
30
|
-
>(({ className, size, children, ...props }, ref) => (
|
|
31
|
-
<InputGroupContext.Provider value={{ size }}>
|
|
35
|
+
>(({ className, size, shape, children, ...props }, ref) => (
|
|
36
|
+
<InputGroupContext.Provider value={{ size, shape }}>
|
|
32
37
|
<div
|
|
33
38
|
ref={ref}
|
|
34
39
|
data-slot="input-group"
|
|
35
|
-
className={cn(inputGroupVariants({ size }), className)}
|
|
40
|
+
className={cn(inputGroupVariants({ size, shape }), className)}
|
|
36
41
|
{...props}
|
|
37
42
|
>
|
|
38
43
|
{children}
|
package/src/components/input.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import { cn } from "../lib/utils";
|
|
4
4
|
|
|
5
5
|
const inputVariants = cva(
|
|
6
|
-
"flex w-full
|
|
6
|
+
"flex w-full border border-border bg-input/50 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:bg-input disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/40",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
size: {
|
|
@@ -11,9 +11,14 @@ const inputVariants = cva(
|
|
|
11
11
|
default: "h-11 px-4 py-2",
|
|
12
12
|
lg: "h-12 px-5 text-base",
|
|
13
13
|
},
|
|
14
|
+
shape: {
|
|
15
|
+
rounded: "rounded-xl focus-visible:ring-ring",
|
|
16
|
+
pill: "rounded-full bg-background shadow-[var(--shadow-card)] focus-visible:ring-accent/30",
|
|
17
|
+
},
|
|
14
18
|
},
|
|
15
19
|
defaultVariants: {
|
|
16
20
|
size: "default",
|
|
21
|
+
shape: "rounded",
|
|
17
22
|
},
|
|
18
23
|
}
|
|
19
24
|
);
|
|
@@ -23,12 +28,12 @@ export interface InputProps
|
|
|
23
28
|
VariantProps<typeof inputVariants> {}
|
|
24
29
|
|
|
25
30
|
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
26
|
-
({ className, type, size, ...props }, ref) => {
|
|
31
|
+
({ className, type, size, shape, ...props }, ref) => {
|
|
27
32
|
return (
|
|
28
33
|
<input
|
|
29
34
|
type={type}
|
|
30
35
|
data-slot="input"
|
|
31
|
-
className={cn(inputVariants({ size }), className)}
|
|
36
|
+
className={cn(inputVariants({ size, shape }), className)}
|
|
32
37
|
ref={ref}
|
|
33
38
|
{...props}
|
|
34
39
|
/>
|
|
@@ -32,7 +32,7 @@ export function PhoneFrame({
|
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
34
|
<div className={cn("relative mx-auto shrink-0", className)} style={{ width }}>
|
|
35
|
-
<div className="rounded-[2.5rem] border-[1.5px] border-white/15 bg-black
|
|
35
|
+
<div className="rounded-[2.5rem] border-[1.5px] border-white/15 bg-black p-1.5 shadow-2xl shadow-black/40">
|
|
36
36
|
<div className="absolute top-[10px] left-1/2 -translate-x-1/2 w-[68px] h-[20px] bg-black rounded-full z-10" />
|
|
37
37
|
<div
|
|
38
38
|
className="rounded-[2rem] overflow-hidden bg-background relative"
|
|
@@ -3,27 +3,29 @@ import { PlaceAboutTab } from "./place-about-tab";
|
|
|
3
3
|
import type { PlaceAboutTabLabels, PlacePreview } from "./place-types";
|
|
4
4
|
|
|
5
5
|
const labels: PlaceAboutTabLabels = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
whatPeopleSay: "What people say",
|
|
9
|
-
contactAndLocation: "Contact & Location",
|
|
10
|
-
address: "Address",
|
|
6
|
+
description: "About",
|
|
7
|
+
contactAndLocation: "Contact",
|
|
11
8
|
instagram: "Instagram",
|
|
12
9
|
facebook: "Facebook",
|
|
13
|
-
todayHours: "
|
|
14
|
-
statusOpen: "Open now",
|
|
10
|
+
todayHours: "Hours",
|
|
15
11
|
statusClosed: "Closed",
|
|
16
12
|
typicalBusyness: "Typical busyness",
|
|
17
13
|
cuisines: "Cuisines",
|
|
18
14
|
amenities: "Amenities",
|
|
19
|
-
paymentOptions: "Payment
|
|
15
|
+
paymentOptions: "Payment",
|
|
20
16
|
accessibility: "Accessibility",
|
|
21
17
|
parking: "Parking",
|
|
22
|
-
nearbyLandmarks: "Nearby
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
nearbyLandmarks: "Nearby",
|
|
19
|
+
scheduleDays: {
|
|
20
|
+
monday: "Monday",
|
|
21
|
+
tuesday: "Tuesday",
|
|
22
|
+
wednesday: "Wednesday",
|
|
23
|
+
thursday: "Thursday",
|
|
24
|
+
friday: "Friday",
|
|
25
|
+
saturday: "Saturday",
|
|
26
|
+
sunday: "Sunday",
|
|
27
|
+
},
|
|
28
|
+
noHoursAvailable: "Hours not available",
|
|
27
29
|
amenityLabels: {
|
|
28
30
|
wifi: "Wi-Fi",
|
|
29
31
|
outdoor_seating: "Outdoor seating",
|
|
@@ -62,6 +64,15 @@ const richPlace: PlacePreview = {
|
|
|
62
64
|
"Diners praise the friendly service and the lamb shoulder; some note that reservations are essential on weekends.",
|
|
63
65
|
open_now: true,
|
|
64
66
|
hours: [{ opens_at: 11, closes_at: 23 }],
|
|
67
|
+
schedule: {
|
|
68
|
+
monday: [{ opens_at: 11, closes_at: 23 }],
|
|
69
|
+
tuesday: [{ opens_at: 11, closes_at: 23 }],
|
|
70
|
+
wednesday: [{ opens_at: 11, closes_at: 23 }],
|
|
71
|
+
thursday: [{ opens_at: 11, closes_at: 23 }],
|
|
72
|
+
friday: [{ opens_at: 11, closes_at: 24 }],
|
|
73
|
+
saturday: [{ opens_at: 12, closes_at: 24 }],
|
|
74
|
+
sunday: [],
|
|
75
|
+
},
|
|
65
76
|
location: { address: "Strada Mihai Eminescu 15, București" },
|
|
66
77
|
phone: "+40 21 555 0123",
|
|
67
78
|
website_url: "https://casagri.example.com",
|