Skip to content

Commit 4f0131d

Browse files
Merge pull request #475 from juspay/staging
Staging to Main
2 parents e97398e + 10c4da9 commit 4f0131d

File tree

181 files changed

+47210
-10660
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+47210
-10660
lines changed

FIGMA_CODE_CONNECT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
### Existing Code Connect Components
3030

3131
1. Button - `apps/storybook/stories/components/Button/Button.figma.tsx`
32-
2. ButtonGroupV2 - `apps/storybook/stories/components/Button/ButtonGroupV2.figma.tsx`
32+
2. ButtonGroup - `apps/storybook/stories/components/Button/ButtonGroup.figma.tsx`
3333
3. Breadcrumb - `apps/storybook/stories/components/Breadcrumb/Breadcrumb.figma.tsx`
3434
4. Tags - `apps/storybook/stories/components/Tags/Tags.figma.tsx`
3535
5. SplitTag - `apps/storybook/stories/components/Tags/SplitTag.figma.tsx`

apps/ascent/app/components/features/Documentation/PreviewWrapper.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ const previewComponents = {
1212
ssr: false,
1313
}),
1414
TagPreview: dynamic(() => import('./Previews/TagPreview'), { ssr: false }),
15-
ButtonGroupV2Preview: dynamic(
16-
() => import('./Previews/ButtonGroupV2Preview'),
17-
{ ssr: false }
18-
),
15+
ButtonGroupPreview: dynamic(() => import('./Previews/ButtonGroupPreview'), {
16+
ssr: false,
17+
}),
1918
TabsPreview: dynamic(() => import('./Previews/TabsPreview'), {
2019
ssr: false,
2120
}),
@@ -74,9 +73,6 @@ const previewComponents = {
7473
DataTablePreview: dynamic(() => import('./Previews/DataTablePreview'), {
7574
ssr: false,
7675
}),
77-
ButtonGroupPreview: dynamic(() => import('./Previews/ButtonGroupPreview'), {
78-
ssr: false,
79-
}),
8076
DrawerPreview: dynamic(() => import('./Previews/DrawerPreview'), {
8177
ssr: false,
8278
}),

apps/ascent/app/components/features/Documentation/Previews/ButtonGroupV2Preview.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import { ButtonGroup, Button, ButtonType } from '@juspay/blend-design-system'
33
import React from 'react'
44
import ComponentPreview from '@/components/features/Documentation/Previews/ComponentPreview'
55

6-
const ButtonGroupV2Preview = () => {
7-
const tsCode = `import { ButtonGroupV2, Button, ButtonType } from "@juspay/blend-design-system";
6+
const ButtonGroupPreview = () => {
7+
const tsCode = `import { ButtonGroup, Button, ButtonType } from "@juspay/blend-design-system";
88
99
function MyComponent() {
1010
return (
11-
<ButtonGroupV2 stacked={true}>
11+
<ButtonGroup stacked={true}>
1212
<Button text="Cancel" buttonType={ButtonType.SUCCESS} />
1313
<Button text="Save" buttonType={ButtonType.PRIMARY} />
14-
</ButtonGroupV2>
14+
</ButtonGroup>
1515
);
1616
}`
1717

18-
const reCode = `type buttonGroupV2Props = {
18+
const reCode = `type ButtonGroupProps = {
1919
stacked: option<bool>,
2020
children: React.element,
2121
}
@@ -25,16 +25,16 @@ let make = (
2525
~stacked: option<bool>=?,
2626
~children: React.element,
2727
) => {
28-
<ButtonGroupV2Binding ?stacked>
28+
<ButtonGroupBinding ?stacked>
2929
{children}
30-
</ButtonGroupV2Binding>
30+
</ButtonGroupBinding>
3131
}`
3232

3333
const bindingCode = `@module("@juspay/blend-design-system") @react.component
3434
external make: (
3535
~stacked: bool=?,
3636
~children: React.element,
37-
) => React.element = "ButtonGroupV2"`
37+
) => React.element = "ButtonGroup"`
3838

3939
return (
4040
<ComponentPreview
@@ -50,4 +50,4 @@ external make: (
5050
)
5151
}
5252

53-
export default ButtonGroupV2Preview
53+
export default ButtonGroupPreview

apps/ascent/app/components/features/Documentation/Previews/MenuPreview.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ import {
33
Menu,
44
MenuAlignment,
55
MenuSide,
6-
MenuItemV2Variant,
7-
MenuItemV2ActionType,
6+
MenuItemVariant,
7+
MenuItemActionType,
88
} from '@juspay/blend-design-system'
99
import React from 'react'
1010
import ComponentPreview from '@/components/features/Documentation/Previews/ComponentPreview'
1111
import { Button, ButtonType } from '@juspay/blend-design-system'
1212
import { Settings, User, LogOut, ChevronDown } from 'lucide-react'
1313

1414
const MenuPreview = () => {
15-
const tsCode = `import { Menu, MenuAlignment, MenuSide, MenuItemV2Variant, MenuItemV2ActionType } from "@juspay/blend-design-system";
15+
const tsCode = `import { Menu, MenuAlignment, MenuSide, MenuItemVariant, MenuItemActionType } from "@juspay/blend-design-system";
1616
import { Button, ButtonType } from "@juspay/blend-design-system";
1717
import { Settings, User, LogOut, ChevronDown } from "lucide-react";
1818
@@ -31,8 +31,8 @@ function MyComponent() {
3131
{
3232
label: "Logout",
3333
slot1: <LogOut size={16} />,
34-
variant: MenuItemV2Variant.ACTION,
35-
actionType: MenuItemV2ActionType.DANGER,
34+
variant: MenuItemVariant.ACTION,
35+
actionType: MenuItemActionType.DANGER,
3636
onClick: () => console.log("Logout clicked"),
3737
},
3838
];
@@ -136,8 +136,8 @@ external make: (
136136
{
137137
label: 'Logout',
138138
slot1: <LogOut size={16} />,
139-
variant: MenuItemV2Variant.ACTION,
140-
actionType: MenuItemV2ActionType.DANGER,
139+
variant: MenuItemVariant.ACTION,
140+
actionType: MenuItemActionType.DANGER,
141141
onClick: () => console.log('Logout clicked'),
142142
},
143143
]

apps/ascent/app/components/mdx/PreviewComponents.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const PREVIEW_COMPONENT_NAMES = [
1212
'Alert',
1313
'Tag',
1414
'ButtonGroup',
15-
'ButtonGroupV2',
1615
'Tabs',
1716
'SplitTag',
1817
'Modal',
@@ -61,7 +60,6 @@ export const ButtonPreview = PreviewComponents.ButtonPreview
6160
export const AlertPreview = PreviewComponents.AlertPreview
6261
export const TagPreview = PreviewComponents.TagPreview
6362
export const ButtonGroupPreview = PreviewComponents.ButtonGroupPreview
64-
export const ButtonGroupV2Preview = PreviewComponents.ButtonGroupV2Preview
6563
export const TabsPreview = PreviewComponents.TabsPreview
6664
export const SplitTagPreview = PreviewComponents.SplitTagPreview
6765
export const ModalPreview = PreviewComponents.ModalPreview

apps/ascent/app/docs/components.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const COMPONENT_REGISTRY: ComponentMetadata[] = [
6666
slug: 'button-group',
6767
title: 'Button Group V2',
6868
description:
69-
'The ButtonGroupV2 component is a container that groups multiple Button components together with flexible layout options and automatic positioning.',
69+
'The ButtonGroup component is a container that groups multiple Button components together with flexible layout options and automatic positioning.',
7070
icon: createIcon(
7171
[],
7272
[

apps/ascent/app/docs/content/components/menu.mdx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import {
2222
Menu,
2323
MenuAlignment,
2424
MenuSide,
25-
MenuItemV2Variant,
26-
MenuItemV2ActionType,
25+
MenuItemVariant,
26+
MenuItemActionType,
2727
} from 'blend-v1'
2828
import { Button, ButtonType } from 'blend-v1'
2929
import { Settings, User, LogOut, ChevronDown } from 'lucide-react'
@@ -53,8 +53,8 @@ function MyComponent() {
5353
{
5454
label: 'Sign Out',
5555
slot1: <LogOut size={16} />,
56-
variant: MenuItemV2Variant.ACTION,
57-
actionType: MenuItemV2ActionType.DANGER,
56+
variant: MenuItemVariant.ACTION,
57+
actionType: MenuItemActionType.DANGER,
5858
onClick: () => console.log('Sign out clicked'),
5959
},
6060
],
@@ -244,7 +244,7 @@ Structure for grouping menu items:
244244
content: 'items',
245245
hintText: 'Array of menu items in this group',
246246
},
247-
{ content: 'MenuItemV2Type[]', hintText: 'array' },
247+
{ content: 'MenuItemType[]', hintText: 'array' },
248248
{ content: '' },
249249
],
250250
[
@@ -261,7 +261,7 @@ Structure for grouping menu items:
261261
loadingMessage="Loading props..."
262262
/>
263263

264-
### MenuItemV2Type
264+
### MenuItemType
265265

266266
Structure for individual menu items:
267267

@@ -320,15 +320,15 @@ Structure for individual menu items:
320320
content: 'variant',
321321
hintText: 'Visual variant of the menu item',
322322
},
323-
{ content: 'MenuItemV2Variant', hintText: 'enum' },
324-
{ content: 'MenuItemV2Variant.DEFAULT' },
323+
{ content: 'MenuItemVariant', hintText: 'enum' },
324+
{ content: 'MenuItemVariant.DEFAULT' },
325325
],
326326
[
327327
{
328328
content: 'actionType',
329329
hintText: 'Action type for styling (used with ACTION variant)',
330330
},
331-
{ content: 'MenuItemV2ActionType', hintText: 'enum' },
331+
{ content: 'MenuItemActionType', hintText: 'enum' },
332332
{ content: '' },
333333
],
334334
[
@@ -352,7 +352,7 @@ Structure for individual menu items:
352352
content: 'subMenu',
353353
hintText: 'Nested menu items for creating submenus',
354354
},
355-
{ content: 'MenuItemV2Type[]', hintText: 'array' },
355+
{ content: 'MenuItemType[]', hintText: 'array' },
356356
{ content: '' },
357357
],
358358
]}
@@ -399,8 +399,8 @@ const basicItems = [
399399
{
400400
label: 'Delete',
401401
slot1: <Trash size={16} />,
402-
variant: MenuItemV2Variant.ACTION,
403-
actionType: MenuItemV2ActionType.DANGER,
402+
variant: MenuItemVariant.ACTION,
403+
actionType: MenuItemActionType.DANGER,
404404
onClick: () => console.log('Delete clicked'),
405405
},
406406
],
@@ -485,8 +485,8 @@ const groupedItems = [
485485
{
486486
label: 'Sign Out',
487487
slot1: <LogOut size={16} />,
488-
variant: MenuItemV2Variant.ACTION,
489-
actionType: MenuItemV2ActionType.DANGER,
488+
variant: MenuItemVariant.ACTION,
489+
actionType: MenuItemActionType.DANGER,
490490
onClick: () => console.log('Sign out'),
491491
},
492492
],
@@ -683,7 +683,7 @@ export type MenuTokensType = {
683683
fontSize: CSSObject['fontSize']
684684

685685
colors: {
686-
[key in MenuItemV2Variant]: {
686+
[key in MenuItemVariant]: {
687687
default: {
688688
background: CSSObject['backgroundColor']
689689
text: CSSObject['color']
@@ -700,7 +700,7 @@ export type MenuTokensType = {
700700
}
701701

702702
actionColors: {
703-
[key in MenuItemV2ActionType]: {
703+
[key in MenuItemActionType]: {
704704
default: CSSObject['color']
705705
hover: CSSObject['color']
706706
}
@@ -776,19 +776,19 @@ enum MenuSide {
776776
}
777777
```
778778

779-
### MenuItemV2Variant
779+
### MenuItemVariant
780780

781781
```tsx
782-
enum MenuItemV2Variant {
782+
enum MenuItemVariant {
783783
DEFAULT = 'default', // Standard menu item styling
784784
ACTION = 'action', // Special styling for actions (with actionType)
785785
}
786786
```
787787

788-
### MenuItemV2ActionType
788+
### MenuItemActionType
789789

790790
```tsx
791-
enum MenuItemV2ActionType {
791+
enum MenuItemActionType {
792792
PRIMARY = 'primary', // Primary action styling (blue)
793793
DANGER = 'danger', // Danger action styling (red)
794794
}

0 commit comments

Comments
 (0)