Skip to content

Commit d4e1a4f

Browse files
committed
fix: hide tmp the examples grid for input types
1 parent 8d7d62f commit d4e1a4f

File tree

6 files changed

+36
-37
lines changed

6 files changed

+36
-37
lines changed

app/_components/ui/button.tsx

+22-20
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,48 @@ import { type VariantProps, cva } from 'class-variance-authority';
66
import { cn } from "@/app/_utils/cn";
77

88
const buttonVariants = cva(
9-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9+
"inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring/70 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
1010
{
1111
variants: {
1212
variant: {
13-
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
14-
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
15-
outline: 'border border-input bg-background hover:border-neutral-200 dark:hover:bg-neutral-900',
16-
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
17-
ghost: 'hover:bg-accent hover:text-accent-foreground',
18-
link: 'text-primary underline-offset-4 hover:underline',
13+
default: "bg-primary text-primary-foreground shadow-sm shadow-black/5 hover:bg-primary/90",
14+
destructive:
15+
"bg-destructive text-destructive-foreground shadow-sm shadow-black/5 hover:bg-destructive/90",
16+
outline:
17+
"border border-input bg-background shadow-sm shadow-black/5 hover:bg-accent hover:text-accent-foreground",
18+
secondary:
19+
"bg-secondary text-secondary-foreground shadow-sm shadow-black/5 hover:bg-secondary/80",
20+
ghost: "hover:bg-accent hover:text-accent-foreground",
21+
link: "text-primary underline-offset-4 hover:underline",
1922
},
2023
size: {
21-
default: 'h-10 px-4 py-2',
22-
sm: 'h-9 rounded-md px-3',
23-
lg: 'h-11 rounded-md px-8',
24-
icon: 'h-10 w-10',
24+
default: "h-9 px-4 py-2",
25+
sm: "h-8 rounded-lg px-3 text-xs",
26+
lg: "h-10 rounded-lg px-8",
27+
icon: "h-9 w-9",
2528
},
2629
},
2730
defaultVariants: {
28-
variant: 'default',
29-
size: 'default',
31+
variant: "default",
32+
size: "default",
3033
},
3134
},
32-
)
35+
);
3336

3437
export interface ButtonProps
3538
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
3639
VariantProps<typeof buttonVariants> {
37-
asChild?: boolean
40+
asChild?: boolean;
3841
}
3942

4043
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
4144
({ className, variant, size, asChild = false, ...props }, ref) => {
42-
const Comp = asChild ? Slot : 'button'
45+
const Comp = asChild ? Slot : "button";
4346
return (
4447
<Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />
45-
)
48+
);
4649
},
47-
)
48-
Button.displayName = 'Button'
50+
);
51+
Button.displayName = "Button";
4952

5053
export { Button, buttonVariants };
51-

content/en/glossary/aria-attributes.mdx

-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ ARIA (Accessible Rich Internet Applications) attributes are HTML attributes that
3636
## Related Patterns
3737

3838
- [Pagination](/patterns/navigation/pagination)
39-
- [Navigation Patterns](/patterns/navigation)

content/en/pattern-guide/choosing-input-types.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { PatternNextSteps } from "@app/_components/pattern-comparison/pattern-ne
3333
<DecisionFlowSection nodes={inputTypeNodes} edges={inputTypeEdges} title="Input Types Decision Flow" />
3434
<ComparisonGrid patterns={comparisonData.patterns} />
3535
<ImplementationMetrics patterns={implementationData.patterns} />
36-
<ExamplesGrid examples={examplesData.examples} />
36+
{/* <ExamplesGrid examples={examplesData.examples} /> */}
3737
<PatternNextSteps patterns={nextStepsData.patterns} />
3838
</div>
3939

@@ -399,17 +399,17 @@ export const nextStepsData = {
399399
{
400400
title: "Text Input Implementation",
401401
description: "How to implement and style text inputs",
402-
href: "/patterns/forms/text-input",
402+
href: "/patterns/forms/text-field",
403403
},
404404
{
405405
title: "Select Component Guide",
406406
description: "Building accessible select components",
407-
href: "/patterns/forms/select",
407+
href: "/patterns/forms/selection-input",
408408
},
409409
{
410-
title: "Radio & Checkbox Patterns",
410+
title: "Radio Pattern",
411411
description: "Best practices for option selection",
412-
href: "/patterns/forms/radio-checkbox",
412+
href: "/patterns/forms/radio",
413413
},
414414
],
415415
};

content/en/patterns/forms/button.mdx

+6-8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ status: complete
88
import { BrowserSupport } from "@app/_components/browser-support";
99
import { BuildEffort } from "@app/_components/build-effort";
1010
import { FaqStructuredData } from "@app/_components/faq-structured-data";
11+
import {
12+
ButtonTextOnly,
13+
ButtonWithIcon,
14+
} from "@app/_components/variations/buttons";
1115

1216
# Button
1317

@@ -137,17 +141,11 @@ end
137141

138142
1. **Text Only**
139143

140-
```html
141-
<button type="button">Button</button>
142-
```
144+
<ButtonTextOnly />
143145

144146
2. **Icon Only**
145147

146-
```html
147-
<button type="button" aria-label="Settings">
148-
<svg aria-hidden="true">...</svg>
149-
</button>
150-
```
148+
<ButtonWithIcon />
151149

152150
3. **Icon + Text**
153151

content/en/patterns/forms/input-selection-guide.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ description: "Learn how to select the most appropriate input types for your web
44
icon: Text
55
---
66

7-
### When to use Different Types of Text Fields?
7+
# Input Selection Guide
8+
9+
## When to use Different Types of Text Fields?
810

911
```mermaid
1012
graph TD

content/en/patterns/forms/password.mdx

-2
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ Password fields are commonly used in **authentication forms, account creation, a
141141
## Related Patterns
142142

143143
- [Text Field](/patterns/forms/text-field) – Standard input for non-sensitive text.
144-
- [Two-Factor Authentication](/patterns/security/2fa) – Additional authentication layer.
145-
- [Security Best Practices](/patterns/security/best-practices) – Guidelines for secure input handling.
146144

147145
## Frequently Asked Questions
148146

0 commit comments

Comments
 (0)