@wallarm-org/design-system 0.13.0 → 0.14.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/components/Country/Country.js +1 -1
- package/dist/components/{DateTime/DateTime.d.ts → FormatDateTime/FormatDateTime.d.ts} +6 -6
- package/dist/components/{DateTime/DateTime.js → FormatDateTime/FormatDateTime.js} +8 -8
- package/dist/components/FormatDateTime/index.d.ts +1 -0
- package/dist/components/FormatDateTime/index.js +2 -0
- package/dist/components/Ip/IpCountry.js +1 -1
- package/dist/components/Table/mocks.js +2 -2
- package/dist/components/Toast/ToastClose.js +23 -11
- package/dist/components/Toast/Toaster.js +1 -1
- package/dist/components/Tour/TourClose.js +4 -2
- package/dist/components/Tour/TourContent.js +1 -1
- package/dist/components/Tour/TourFooter.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/metadata/components.json +865 -865
- package/dist/utils/formatDateTime.d.ts +1 -1
- package/dist/utils/formatDateTime.js +2 -1
- package/package.json +1 -1
- package/dist/components/DateTime/index.d.ts +0 -1
- package/dist/components/DateTime/index.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"generatedAt": "2026-03-
|
|
2
|
+
"version": "0.13.0",
|
|
3
|
+
"generatedAt": "2026-03-17T17:09:22.854Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Alert",
|
|
@@ -11399,7 +11399,7 @@
|
|
|
11399
11399
|
"name": "size",
|
|
11400
11400
|
"type": "{ small: string; medium: string; }",
|
|
11401
11401
|
"required": false,
|
|
11402
|
-
"defaultValue": "
|
|
11402
|
+
"defaultValue": "small"
|
|
11403
11403
|
},
|
|
11404
11404
|
{
|
|
11405
11405
|
"name": "asChild",
|
|
@@ -12454,868 +12454,544 @@
|
|
|
12454
12454
|
]
|
|
12455
12455
|
},
|
|
12456
12456
|
{
|
|
12457
|
-
"name": "
|
|
12458
|
-
"importPath": "@wallarm-org/design-system/
|
|
12459
|
-
"props": [
|
|
12460
|
-
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
"required": false
|
|
12464
|
-
},
|
|
12457
|
+
"name": "Dialog",
|
|
12458
|
+
"importPath": "@wallarm-org/design-system/Dialog",
|
|
12459
|
+
"props": [],
|
|
12460
|
+
"variants": [],
|
|
12461
|
+
"subComponents": [],
|
|
12462
|
+
"examples": [
|
|
12465
12463
|
{
|
|
12466
|
-
"name": "
|
|
12467
|
-
"
|
|
12468
|
-
"
|
|
12464
|
+
"name": "Basic",
|
|
12465
|
+
"code": "() => {\n return (\n <Dialog data-testid='dialog'>\n <DialogTrigger asChild>\n <Button>Open Dialog</Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Dialog Title</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <ContentPlaceholder />\n </DialogBody>\n </DialogContent>\n </Dialog>\n );\n}",
|
|
12466
|
+
"description": "Basic uncontrolled dialog"
|
|
12469
12467
|
},
|
|
12470
12468
|
{
|
|
12471
|
-
"name": "
|
|
12472
|
-
"
|
|
12473
|
-
"
|
|
12469
|
+
"name": "WithFooter",
|
|
12470
|
+
"code": "() => {\n return (\n <Dialog>\n <DialogTrigger asChild>\n <Button>Open Dialog</Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Dialog's title</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <ContentPlaceholder />\n </DialogBody>\n\n <DialogFooter>\n <DialogFooterControls>\n <Button variant='ghost' color='neutral' size='large'>\n Button\n </Button>\n <Button variant='primary' color='brand' size='large'>\n Button\n </Button>\n </DialogFooterControls>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}",
|
|
12471
|
+
"description": "Minimal example"
|
|
12474
12472
|
},
|
|
12475
12473
|
{
|
|
12476
|
-
"name": "
|
|
12477
|
-
"
|
|
12478
|
-
"
|
|
12474
|
+
"name": "WithFooterLeftActions",
|
|
12475
|
+
"code": "() => (\n <Dialog>\n <DialogTrigger asChild>\n <Button>Open with Footer Actions</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Footer with Left Actions</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <ContentPlaceholder />\n </DialogBody>\n\n <DialogFooter>\n <DialogFooterControls placement='left'>\n <Switch>\n <SwitchControl />\n <SwitchLabel>Remember choice</SwitchLabel>\n </Switch>\n </DialogFooterControls>\n\n <DialogClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Cancel\n </Button>\n </DialogClose>\n <Button variant='primary' color='brand' size='large'>\n Apply\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n)",
|
|
12476
|
+
"description": "With footer left actions"
|
|
12479
12477
|
},
|
|
12480
12478
|
{
|
|
12481
|
-
"name": "
|
|
12482
|
-
"
|
|
12483
|
-
"
|
|
12479
|
+
"name": "Sizes",
|
|
12480
|
+
"code": "() => (\n <HStack gap={8} justify='center'>\n <Dialog width={DIALOG_SIZES.small}>\n <DialogTrigger asChild>\n <Button>Open Small ({DIALOG_SIZES.small}px)</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Small Dialog ({DIALOG_SIZES.small}px)</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <ContentPlaceholder />\n </DialogBody>\n </DialogContent>\n </Dialog>\n\n <Dialog width={DIALOG_SIZES.medium}>\n <DialogTrigger asChild>\n <Button>Open Medium ({DIALOG_SIZES.medium}px)</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Medium Dialog ({DIALOG_SIZES.medium}px)</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <ContentPlaceholder />\n </DialogBody>\n </DialogContent>\n </Dialog>\n\n <Dialog width={DIALOG_SIZES.large}>\n <DialogTrigger asChild>\n <Button>Open Large ({DIALOG_SIZES.large}px)</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Large Dialog ({DIALOG_SIZES.large}px)</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <ContentPlaceholder />\n </DialogBody>\n </DialogContent>\n </Dialog>\n </HStack>\n)",
|
|
12481
|
+
"description": "Dialog with different sizes - Small"
|
|
12484
12482
|
},
|
|
12485
12483
|
{
|
|
12486
|
-
"name": "
|
|
12487
|
-
"
|
|
12488
|
-
"
|
|
12484
|
+
"name": "CustomSizes",
|
|
12485
|
+
"code": "() => {\n return (\n <HStack gap={8} justify='center'>\n <Dialog width='50%'>\n <DialogTrigger asChild>\n <Button>50% Width</Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>50% Width Dialog</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <div className='py-12'>\n <p>This dialog takes 50% of the viewport width.</p>\n </div>\n </DialogBody>\n </DialogContent>\n </Dialog>\n\n <Dialog width={1000}>\n <DialogTrigger asChild>\n <Button>1000px Width</Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>1000px Width Dialog</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <div className='py-12'>\n <p>This dialog has a fixed width of 1000px.</p>\n </div>\n </DialogBody>\n </DialogContent>\n </Dialog>\n </HStack>\n );\n}",
|
|
12486
|
+
"description": "Custom width with percentage"
|
|
12489
12487
|
},
|
|
12490
12488
|
{
|
|
12491
|
-
"name": "
|
|
12492
|
-
"
|
|
12493
|
-
"
|
|
12489
|
+
"name": "Scrollable",
|
|
12490
|
+
"code": "() => {\n return (\n <Dialog>\n <DialogTrigger asChild>\n <Button>Open Dialog with Scroll</Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Scrollable Content</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <div className='flex flex-col gap-16 py-12'>\n {Array.from({ length: 20 }).map((_, i) => (\n <ContentPlaceholder key={i} height={100} />\n ))}\n </div>\n </DialogBody>\n\n <DialogFooter>\n <DialogClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Close\n </Button>\n </DialogClose>\n <Button variant='primary' color='brand' size='large'>\n Confirm\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}",
|
|
12491
|
+
"description": "Dialog with scrollable content"
|
|
12494
12492
|
},
|
|
12495
12493
|
{
|
|
12496
|
-
"name": "
|
|
12497
|
-
"
|
|
12498
|
-
"
|
|
12494
|
+
"name": "Controlled",
|
|
12495
|
+
"code": "() => {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n <Button onClick={() => setOpen(true)}>Open Controlled Dialog</Button>\n\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Controlled Dialog</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <div className='py-12'>\n <p className='mb-16'>This dialog is controlled externally.</p>\n <ContentPlaceholder />\n </div>\n </DialogBody>\n\n <DialogFooter>\n <DialogClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Cancel\n </Button>\n </DialogClose>\n <Button variant='primary' color='brand' size='large'>\n Save Changes\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </>\n );\n}",
|
|
12496
|
+
"description": "Controlled dialog with external state"
|
|
12499
12497
|
},
|
|
12500
12498
|
{
|
|
12501
|
-
"name": "
|
|
12502
|
-
"
|
|
12503
|
-
"
|
|
12499
|
+
"name": "NoClosableOnEsc",
|
|
12500
|
+
"code": "() => {\n return (\n <Dialog closeOnEscape={false}>\n <DialogTrigger asChild>\n <Button>Open Dialog</Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Dialog Title</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <ContentPlaceholder />\n </DialogBody>\n </DialogContent>\n </Dialog>\n );\n}",
|
|
12501
|
+
"description": "No closable on ESC"
|
|
12504
12502
|
},
|
|
12505
12503
|
{
|
|
12506
|
-
"name": "
|
|
12507
|
-
"
|
|
12508
|
-
"
|
|
12504
|
+
"name": "NoOverlay",
|
|
12505
|
+
"code": "() => {\n return (\n <VStack gap={12}>\n <Text>\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has\n been the industry's standard dummy text ever since the 1500s, when an unknown printer took a\n galley of type and scrambled it to make a type specimen book. It has survived not only five\n centuries, but also the leap into electronic typesetting, remaining essentially unchanged.\n It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum\n passages, and more recently with desktop publishing software like Aldus PageMaker including\n versions of Lorem Ipsum. Why do we use it? It is a long established fact that a reader will\n be distracted by the readable content of a page when looking at its layout. The point of\n using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed\n to using 'Content here, content here', making it look like readable English. Many desktop\n publishing packages and web page editors now use Lorem Ipsum as their default model text,\n and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various\n versions have evolved over the years, sometimes by accident, sometimes on purpose (injected\n humour and the like).\n </Text>\n\n <Dialog overlay={false}>\n <DialogTrigger asChild>\n <Button>Open without Overlay</Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>No Overlay</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <div className='py-12'>\n <p>This dialog has no overlay backdrop.</p>\n </div>\n </DialogBody>\n </DialogContent>\n </Dialog>\n\n <Text>\n Where does it come from? Contrary to popular belief, Lorem Ipsum is not simply random text.\n It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years\n old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up\n one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going\n through the cites of the word in classical literature, discovered the undoubtable source.\n Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of \"de Finibus Bonorum et Malorum\" (The\n Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the\n theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, \"Lorem\n ipsum dolor sit amet..\", comes from a line in section 1.10.32. The standard chunk of Lorem\n Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and\n 1.10.33 from \"de Finibus Bonorum et Malorum\" by Cicero are also reproduced in their exact\n original form, accompanied by English versions from the 1914 translation by H. Rackham.\n </Text>\n </VStack>\n );\n}",
|
|
12506
|
+
"description": "Without overlay"
|
|
12509
12507
|
},
|
|
12510
12508
|
{
|
|
12511
|
-
"name": "
|
|
12512
|
-
"
|
|
12513
|
-
"
|
|
12509
|
+
"name": "WithNested",
|
|
12510
|
+
"code": "() => {\n return (\n <Dialog>\n <DialogTrigger asChild>\n <Button>1st level dialog</Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>[Level 1] Main Dialog</DialogTitle>\n\n {/* Level 2 dialog */}\n <Dialog>\n <DialogTrigger asChild>\n <Button variant='ghost' color='neutral' size='small'>\n <PanelRight />\n 2nd level dialog\n </Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>[Level 2] Detail View</DialogTitle>\n {/* Level 3 dialog */}\n <Dialog>\n <DialogTrigger asChild>\n <Button variant='ghost' color='neutral' size='small'>\n <PanelRight />\n 3nd level dialog\n </Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>[Level 3] Deep Nested</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <VStack gap={12} align='start'>\n <Text>Level 3! Unlimited nesting works.</Text>\n <ContentPlaceholder height={150} />\n </VStack>\n </DialogBody>\n\n <DialogFooter>\n <DialogClose asChild>\n <Button size='large' variant='ghost' color='neutral'>\n Back\n </Button>\n </DialogClose>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </DialogHeader>\n\n <DialogBody>\n <VStack gap={12} align='start'>\n <Text>This is Level 2 dialog. Main dialog is pushed back.</Text>\n\n <ContentPlaceholder height={150} />\n </VStack>\n </DialogBody>\n\n <DialogFooter>\n <DialogClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Back\n </Button>\n </DialogClose>\n <Button variant='primary' color='brand' size='large'>\n Apply\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </DialogHeader>\n\n <DialogBody>\n <VStack gap={12} align='start'>\n <Text>This is Level 1 dialog. Click above to open nested dialogs:</Text>\n\n <ContentPlaceholder height={150} />\n </VStack>\n </DialogBody>\n\n <DialogFooter>\n <DialogClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Cancel\n </Button>\n </DialogClose>\n <Button variant='primary' color='brand' size='large'>\n Save\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}",
|
|
12511
|
+
"description": "Nested dialogs with push-back effect"
|
|
12514
12512
|
},
|
|
12515
12513
|
{
|
|
12516
|
-
"name": "
|
|
12517
|
-
"
|
|
12518
|
-
"
|
|
12519
|
-
}
|
|
12514
|
+
"name": "WithTabs",
|
|
12515
|
+
"code": "() => {\n const [activeTab, setActiveTab] = useState('tab1');\n\n return (\n <Dialog width={960}>\n <DialogTrigger asChild>\n <Button>Open Dialog with Tabs</Button>\n </DialogTrigger>\n\n <DialogContent>\n <Tabs value={activeTab} onChange={setActiveTab} asChild>\n <DialogHeader>\n <DialogTitle>Tabbed Content</DialogTitle>\n </DialogHeader>\n\n <TabsList>\n <TabsTrigger value='tab1'>General</TabsTrigger>\n <TabsTrigger value='tab2'>Settings</TabsTrigger>\n <TabsTrigger value='tab3'>Advanced</TabsTrigger>\n </TabsList>\n\n <DialogBody>\n <div className='pt-12'>\n <TabsContent value='tab1'>\n <h3 className='text-lg font-medium mb-8'>General Settings</h3>\n <ContentPlaceholder height={300} />\n </TabsContent>\n <TabsContent value='tab2'>\n <h3 className='text-lg font-medium mb-8'>Configuration</h3>\n <ContentPlaceholder height={300} />\n </TabsContent>\n <TabsContent value='tab3'>\n <h3 className='text-lg font-medium mb-8'>Advanced Options</h3>\n <ContentPlaceholder height={300} />\n </TabsContent>\n </div>\n </DialogBody>\n </Tabs>\n\n <DialogFooter>\n <DialogClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Cancel\n </Button>\n </DialogClose>\n <Button variant='primary' color='brand' size='large'>\n Apply Settings\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}",
|
|
12516
|
+
"description": "With tabs"
|
|
12517
|
+
}
|
|
12518
|
+
]
|
|
12519
|
+
},
|
|
12520
|
+
{
|
|
12521
|
+
"name": "Drawer",
|
|
12522
|
+
"importPath": "@wallarm-org/design-system/Drawer",
|
|
12523
|
+
"props": [
|
|
12520
12524
|
{
|
|
12521
|
-
"name": "
|
|
12525
|
+
"name": "open",
|
|
12522
12526
|
"type": "boolean | undefined",
|
|
12523
|
-
"required": false
|
|
12527
|
+
"required": false,
|
|
12528
|
+
"description": "Controlled open state"
|
|
12524
12529
|
},
|
|
12525
12530
|
{
|
|
12526
|
-
"name": "
|
|
12527
|
-
"type": "
|
|
12528
|
-
"required": false
|
|
12531
|
+
"name": "closeOnEscape",
|
|
12532
|
+
"type": "boolean | undefined",
|
|
12533
|
+
"required": false,
|
|
12534
|
+
"description": "Whether ESC key closes the drawer (default: true)",
|
|
12535
|
+
"defaultValue": "true"
|
|
12529
12536
|
},
|
|
12530
12537
|
{
|
|
12531
|
-
"name": "
|
|
12532
|
-
"type": "
|
|
12533
|
-
"required": false
|
|
12538
|
+
"name": "closeOnOutsideClick",
|
|
12539
|
+
"type": "boolean | undefined",
|
|
12540
|
+
"required": false,
|
|
12541
|
+
"description": "Whether clicking outside closes the drawer (default: true)",
|
|
12542
|
+
"defaultValue": "true"
|
|
12534
12543
|
},
|
|
12535
12544
|
{
|
|
12536
|
-
"name": "
|
|
12537
|
-
"type": "
|
|
12538
|
-
"required": false
|
|
12545
|
+
"name": "overlay",
|
|
12546
|
+
"type": "boolean | undefined",
|
|
12547
|
+
"required": false,
|
|
12548
|
+
"description": "Overlay visibility (default: true)",
|
|
12549
|
+
"defaultValue": "true"
|
|
12539
12550
|
},
|
|
12540
12551
|
{
|
|
12541
|
-
"name": "
|
|
12542
|
-
"type": "string | undefined",
|
|
12543
|
-
"required": false
|
|
12552
|
+
"name": "width",
|
|
12553
|
+
"type": "string | number | undefined",
|
|
12554
|
+
"required": false,
|
|
12555
|
+
"description": "Width - number for pixels, string for percentage (e.g., \"50%\")"
|
|
12544
12556
|
},
|
|
12545
12557
|
{
|
|
12546
|
-
"name": "
|
|
12547
|
-
"type": "
|
|
12548
|
-
"required": false
|
|
12558
|
+
"name": "minWidth",
|
|
12559
|
+
"type": "number | undefined",
|
|
12560
|
+
"required": false,
|
|
12561
|
+
"description": "Minimum width in pixels"
|
|
12549
12562
|
},
|
|
12550
12563
|
{
|
|
12551
|
-
"name": "
|
|
12564
|
+
"name": "maxWidth",
|
|
12552
12565
|
"type": "number | undefined",
|
|
12553
|
-
"required": false
|
|
12554
|
-
|
|
12566
|
+
"required": false,
|
|
12567
|
+
"description": "Maximum width in pixels"
|
|
12568
|
+
}
|
|
12569
|
+
],
|
|
12570
|
+
"variants": [
|
|
12555
12571
|
{
|
|
12556
|
-
"name": "
|
|
12557
|
-
"
|
|
12558
|
-
|
|
12559
|
-
|
|
12572
|
+
"name": "isResizing",
|
|
12573
|
+
"options": [
|
|
12574
|
+
"true"
|
|
12575
|
+
]
|
|
12576
|
+
}
|
|
12577
|
+
],
|
|
12578
|
+
"subComponents": [
|
|
12560
12579
|
{
|
|
12561
|
-
"name": "
|
|
12562
|
-
"
|
|
12563
|
-
"required": false
|
|
12580
|
+
"name": "DrawerBody",
|
|
12581
|
+
"props": []
|
|
12564
12582
|
},
|
|
12565
12583
|
{
|
|
12566
|
-
"name": "
|
|
12567
|
-
"
|
|
12568
|
-
|
|
12584
|
+
"name": "DrawerClose",
|
|
12585
|
+
"props": [
|
|
12586
|
+
{
|
|
12587
|
+
"name": "asChild",
|
|
12588
|
+
"type": "boolean | undefined",
|
|
12589
|
+
"required": false,
|
|
12590
|
+
"description": "Render as child component",
|
|
12591
|
+
"defaultValue": "false"
|
|
12592
|
+
}
|
|
12593
|
+
]
|
|
12569
12594
|
},
|
|
12570
12595
|
{
|
|
12571
|
-
"name": "
|
|
12572
|
-
"
|
|
12573
|
-
|
|
12596
|
+
"name": "DrawerContent",
|
|
12597
|
+
"props": [
|
|
12598
|
+
{
|
|
12599
|
+
"name": "asChild",
|
|
12600
|
+
"type": "boolean | undefined",
|
|
12601
|
+
"required": false
|
|
12602
|
+
}
|
|
12603
|
+
]
|
|
12574
12604
|
},
|
|
12575
12605
|
{
|
|
12576
|
-
"name": "
|
|
12577
|
-
"
|
|
12578
|
-
"required": false
|
|
12606
|
+
"name": "DrawerFooter",
|
|
12607
|
+
"props": []
|
|
12579
12608
|
},
|
|
12580
12609
|
{
|
|
12581
|
-
"name": "
|
|
12582
|
-
"
|
|
12583
|
-
|
|
12610
|
+
"name": "DrawerFooterControls",
|
|
12611
|
+
"props": [
|
|
12612
|
+
{
|
|
12613
|
+
"name": "placement",
|
|
12614
|
+
"type": "{ left: string; right: string; }",
|
|
12615
|
+
"required": false,
|
|
12616
|
+
"defaultValue": "right"
|
|
12617
|
+
}
|
|
12618
|
+
]
|
|
12584
12619
|
},
|
|
12585
12620
|
{
|
|
12586
|
-
"name": "
|
|
12587
|
-
"
|
|
12588
|
-
"required": false
|
|
12621
|
+
"name": "DrawerHeader",
|
|
12622
|
+
"props": []
|
|
12589
12623
|
},
|
|
12590
12624
|
{
|
|
12591
|
-
"name": "
|
|
12592
|
-
"
|
|
12593
|
-
|
|
12625
|
+
"name": "DrawerPositioner",
|
|
12626
|
+
"props": [
|
|
12627
|
+
{
|
|
12628
|
+
"name": "isResizing",
|
|
12629
|
+
"type": "boolean",
|
|
12630
|
+
"required": true
|
|
12631
|
+
}
|
|
12632
|
+
]
|
|
12594
12633
|
},
|
|
12595
12634
|
{
|
|
12596
|
-
"name": "
|
|
12597
|
-
"
|
|
12598
|
-
"required": false
|
|
12635
|
+
"name": "DrawerTitle",
|
|
12636
|
+
"props": []
|
|
12599
12637
|
},
|
|
12600
12638
|
{
|
|
12601
|
-
"name": "
|
|
12602
|
-
"
|
|
12603
|
-
|
|
12639
|
+
"name": "DrawerTrigger",
|
|
12640
|
+
"props": [
|
|
12641
|
+
{
|
|
12642
|
+
"name": "asChild",
|
|
12643
|
+
"type": "boolean | undefined",
|
|
12644
|
+
"required": false,
|
|
12645
|
+
"description": "Render as child component",
|
|
12646
|
+
"defaultValue": "false"
|
|
12647
|
+
}
|
|
12648
|
+
]
|
|
12649
|
+
}
|
|
12650
|
+
],
|
|
12651
|
+
"examples": [
|
|
12652
|
+
{
|
|
12653
|
+
"name": "Basic",
|
|
12654
|
+
"code": "() => {\n return (\n <Drawer data-testid='drawer'>\n <DrawerTrigger asChild>\n <Button>Open Drawer</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Drawer Title</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <ContentPlaceholder fillHeight />\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n );\n}",
|
|
12655
|
+
"description": "Basic uncontrolled drawer"
|
|
12604
12656
|
},
|
|
12605
12657
|
{
|
|
12606
|
-
"name": "
|
|
12607
|
-
"
|
|
12608
|
-
"
|
|
12658
|
+
"name": "WithFooter",
|
|
12659
|
+
"code": "() => {\n return (\n <Drawer>\n <DrawerTrigger asChild>\n <Button>Open Drawer</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Drawer's title</DrawerTitle>\n </DrawerHeader>\n <DrawerBody>\n <ContentPlaceholder fillHeight />\n </DrawerBody>\n <DrawerFooter>\n <DrawerFooterControls>\n <Button variant='ghost' color='neutral' size='large'>\n Button\n </Button>\n <Button variant='primary' color='brand' size='large'>\n Button\n </Button>\n </DrawerFooterControls>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n );\n}",
|
|
12660
|
+
"description": "Minimal example"
|
|
12609
12661
|
},
|
|
12610
12662
|
{
|
|
12611
|
-
"name": "
|
|
12612
|
-
"
|
|
12613
|
-
"
|
|
12663
|
+
"name": "WithFooterLeftActions",
|
|
12664
|
+
"code": "() => (\n <Drawer>\n <DrawerTrigger asChild>\n <Button>Open with Footer Actions</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Footer with Left Actions</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <ContentPlaceholder fillHeight />\n </DrawerBody>\n\n <DrawerFooter>\n <DrawerFooterControls placement='left'>\n <Switch>\n <SwitchControl />\n <SwitchLabel>Remember choice</SwitchLabel>\n </Switch>\n </DrawerFooterControls>\n\n <DrawerClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Cancel\n </Button>\n </DrawerClose>\n <Button variant='primary' color='brand' size='large'>\n Apply\n </Button>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n)",
|
|
12665
|
+
"description": "With footer left actions"
|
|
12614
12666
|
},
|
|
12615
12667
|
{
|
|
12616
|
-
"name": "
|
|
12617
|
-
"
|
|
12618
|
-
"
|
|
12668
|
+
"name": "Sizes",
|
|
12669
|
+
"code": "() => (\n <HStack gap={8} justify='center'>\n <Drawer width={DRAWER_SIZES.small}>\n <DrawerTrigger asChild>\n <Button>Open Small ({DRAWER_SIZES.small}px)</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Small Drawer ({DRAWER_SIZES.small}px)</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <ContentPlaceholder fillHeight />\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n\n <Drawer width={DRAWER_SIZES.medium}>\n <DrawerTrigger asChild>\n <Button>Open Medium ({DRAWER_SIZES.medium}px)</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Medium Drawer ({DRAWER_SIZES.medium}px)</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <ContentPlaceholder fillHeight />\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n\n <Drawer width={DRAWER_SIZES.large}>\n <DrawerTrigger asChild>\n <Button>Open Large ({DRAWER_SIZES.large}px)</Button>\n </DrawerTrigger>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Large Drawer ({DRAWER_SIZES.large}px)</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <ContentPlaceholder fillHeight />\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n </HStack>\n)",
|
|
12670
|
+
"description": "Drawer with different sizes - Small"
|
|
12619
12671
|
},
|
|
12620
12672
|
{
|
|
12621
|
-
"name": "
|
|
12622
|
-
"
|
|
12623
|
-
"
|
|
12624
|
-
},
|
|
12625
|
-
{
|
|
12626
|
-
"name": "vocab",
|
|
12627
|
-
"type": "string | undefined",
|
|
12628
|
-
"required": false
|
|
12629
|
-
},
|
|
12630
|
-
{
|
|
12631
|
-
"name": "autoCorrect",
|
|
12632
|
-
"type": "string | undefined",
|
|
12633
|
-
"required": false
|
|
12634
|
-
},
|
|
12635
|
-
{
|
|
12636
|
-
"name": "autoSave",
|
|
12637
|
-
"type": "string | undefined",
|
|
12638
|
-
"required": false
|
|
12639
|
-
},
|
|
12640
|
-
{
|
|
12641
|
-
"name": "color",
|
|
12642
|
-
"type": "string | undefined",
|
|
12643
|
-
"required": false
|
|
12644
|
-
},
|
|
12645
|
-
{
|
|
12646
|
-
"name": "itemProp",
|
|
12647
|
-
"type": "string | undefined",
|
|
12648
|
-
"required": false
|
|
12649
|
-
},
|
|
12650
|
-
{
|
|
12651
|
-
"name": "itemScope",
|
|
12652
|
-
"type": "boolean | undefined",
|
|
12653
|
-
"required": false
|
|
12654
|
-
},
|
|
12655
|
-
{
|
|
12656
|
-
"name": "itemType",
|
|
12657
|
-
"type": "string | undefined",
|
|
12658
|
-
"required": false
|
|
12659
|
-
},
|
|
12660
|
-
{
|
|
12661
|
-
"name": "itemID",
|
|
12662
|
-
"type": "string | undefined",
|
|
12663
|
-
"required": false
|
|
12664
|
-
},
|
|
12665
|
-
{
|
|
12666
|
-
"name": "itemRef",
|
|
12667
|
-
"type": "string | undefined",
|
|
12668
|
-
"required": false
|
|
12669
|
-
},
|
|
12670
|
-
{
|
|
12671
|
-
"name": "results",
|
|
12672
|
-
"type": "number | undefined",
|
|
12673
|
-
"required": false
|
|
12674
|
-
},
|
|
12675
|
-
{
|
|
12676
|
-
"name": "security",
|
|
12677
|
-
"type": "string | undefined",
|
|
12678
|
-
"required": false
|
|
12679
|
-
},
|
|
12680
|
-
{
|
|
12681
|
-
"name": "unselectable",
|
|
12682
|
-
"type": "\"off\" | \"on\" | undefined",
|
|
12683
|
-
"required": false
|
|
12684
|
-
},
|
|
12685
|
-
{
|
|
12686
|
-
"name": "popover",
|
|
12687
|
-
"type": "\"\" | \"auto\" | \"manual\" | \"hint\" | undefined",
|
|
12688
|
-
"required": false
|
|
12689
|
-
},
|
|
12690
|
-
{
|
|
12691
|
-
"name": "popoverTargetAction",
|
|
12692
|
-
"type": "\"toggle\" | \"show\" | \"hide\" | undefined",
|
|
12693
|
-
"required": false
|
|
12673
|
+
"name": "CustomSizes",
|
|
12674
|
+
"code": "() => {\n return (\n <HStack gap={8} justify='center'>\n <Drawer width='50%'>\n <DrawerTrigger asChild>\n <Button>50% Width</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>50% Width Drawer</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <div className='py-12'>\n <p>This drawer takes 50% of the viewport width.</p>\n </div>\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n\n <Drawer width={1000}>\n <DrawerTrigger asChild>\n <Button>1000px Width</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>1000px Width Drawer</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <div className='py-12'>\n <p>This drawer has a fixed width of 1000px.</p>\n </div>\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n </HStack>\n );\n}",
|
|
12675
|
+
"description": "Custom width with percentage"
|
|
12694
12676
|
},
|
|
12695
12677
|
{
|
|
12696
|
-
"name": "
|
|
12697
|
-
"
|
|
12698
|
-
"
|
|
12678
|
+
"name": "Resizable",
|
|
12679
|
+
"code": "() => {\n return (\n <VStack gap={12}>\n <Drawer width={800}>\n <DrawerTrigger asChild>\n <Button>Open Resizable Drawer (as number)</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerResizeHandle />\n <DrawerHeader>\n <DrawerTitle>Resizable Drawer</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <div className='py-12'>\n <p className='mb-16'>Drag the left edge to resize this drawer.</p>\n <ContentPlaceholder height={300} />\n </div>\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n\n <Drawer width='900px'>\n <DrawerTrigger asChild>\n <Button>Open Resizable Drawer (900px)</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerResizeHandle />\n <DrawerHeader>\n <DrawerTitle>Resizable Drawer with \"900px\" width</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <div className='py-12'>\n <p className='mb-16'>Width is set as \"900px\" string. Drag the left edge to resize.</p>\n <ContentPlaceholder height={300} />\n </div>\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n\n <Drawer width='50%'>\n <DrawerTrigger asChild>\n <Button>Open Resizable Drawer (50%)</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerResizeHandle />\n <DrawerHeader>\n <DrawerTitle>Resizable Drawer with 50% width</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <div className='py-12'>\n <p className='mb-16'>\n Width is set as \"50%\". Drag the left edge to resize - it will convert to pixels.\n </p>\n <ContentPlaceholder height={300} />\n </div>\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n </VStack>\n );\n}",
|
|
12680
|
+
"description": "Resizable drawer"
|
|
12699
12681
|
},
|
|
12700
12682
|
{
|
|
12701
|
-
"name": "
|
|
12702
|
-
"
|
|
12703
|
-
"
|
|
12704
|
-
"description": "@see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert"
|
|
12683
|
+
"name": "Scrollable",
|
|
12684
|
+
"code": "() => {\n return (\n <Drawer>\n <DrawerTrigger asChild>\n <Button>Open Drawer with Scroll</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Scrollable Content</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <div className='flex flex-col gap-16 py-12'>\n {Array.from({ length: 20 }).map((_, i) => (\n <ContentPlaceholder key={i} height={100} />\n ))}\n </div>\n </DrawerBody>\n\n <DrawerFooter>\n <DrawerClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Close\n </Button>\n </DrawerClose>\n <Button variant='primary' color='brand' size='large'>\n Confirm\n </Button>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n );\n}",
|
|
12685
|
+
"description": "Drawer with scrollable content"
|
|
12705
12686
|
},
|
|
12706
12687
|
{
|
|
12707
|
-
"name": "
|
|
12708
|
-
"
|
|
12709
|
-
"
|
|
12710
|
-
"description": "Hints at the type of data that might be entered by the user while editing the element or its contents"
|
|
12688
|
+
"name": "Controlled",
|
|
12689
|
+
"code": "() => {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n <Button onClick={() => setOpen(true)}>Open Controlled Drawer</Button>\n\n <Drawer open={open} onOpenChange={setOpen}>\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Controlled Drawer</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <div className='py-12'>\n <p className='mb-16'>This drawer is controlled externally.</p>\n <ContentPlaceholder />\n </div>\n </DrawerBody>\n\n <DrawerFooter>\n <DrawerClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Cancel\n </Button>\n </DrawerClose>\n <Button variant='primary' color='brand' size='large'>\n Save Changes\n </Button>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n </>\n );\n}",
|
|
12690
|
+
"description": "Controlled drawer with external state"
|
|
12711
12691
|
},
|
|
12712
12692
|
{
|
|
12713
|
-
"name": "
|
|
12714
|
-
"
|
|
12715
|
-
"
|
|
12716
|
-
"description": "Specify that a standard HTML element should behave like a defined custom built-in element"
|
|
12693
|
+
"name": "NoClosableOnEsc",
|
|
12694
|
+
"code": "() => {\n return (\n <Drawer closeOnEscape={false}>\n <DrawerTrigger asChild>\n <Button>Open Drawer</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Drawer Title</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <ContentPlaceholder fillHeight />\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n );\n}",
|
|
12695
|
+
"description": "No closable on ESC"
|
|
12717
12696
|
},
|
|
12718
12697
|
{
|
|
12719
|
-
"name": "
|
|
12720
|
-
"
|
|
12721
|
-
"
|
|
12722
|
-
"description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts}"
|
|
12698
|
+
"name": "NoOverlay",
|
|
12699
|
+
"code": "() => {\n return (\n <Drawer overlay={false}>\n <DrawerTrigger asChild>\n <Button>Open without Overlay</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>No Overlay</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <div className='py-12'>\n <p>This drawer has no overlay backdrop.</p>\n </div>\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n );\n}",
|
|
12700
|
+
"description": "Without overlay"
|
|
12723
12701
|
},
|
|
12724
12702
|
{
|
|
12725
|
-
"name": "
|
|
12726
|
-
"
|
|
12727
|
-
"
|
|
12728
|
-
"description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}"
|
|
12703
|
+
"name": "WithNested",
|
|
12704
|
+
"code": "() => {\n return (\n <Drawer>\n <DrawerTrigger asChild>\n <Button>1st level drawer</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>[Level 1] Main Drawer</DrawerTitle>\n\n {/* Level 2 drawer */}\n <Drawer>\n <DrawerTrigger asChild>\n <Button variant='ghost' color='neutral' size='small'>\n <PanelRight />\n 2nd level drawer\n </Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>[Level 2] Detail View</DrawerTitle>\n {/* Level 3 drawer */}\n <Drawer>\n <DrawerTrigger asChild>\n <Button variant='ghost' color='neutral' size='small'>\n <PanelRight />\n 3nd level drawer\n </Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>[Level 3] Deep Nested</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <VStack gap={12} align='start'>\n <Text>Level 3! Unlimited nesting works.</Text>\n <ContentPlaceholder height={150} />\n </VStack>\n </DrawerBody>\n\n <DrawerFooter>\n <DrawerClose asChild>\n <Button size='large' variant='ghost' color='neutral'>\n Back\n </Button>\n </DrawerClose>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n </DrawerHeader>\n\n <DrawerBody>\n <VStack gap={12} align='start'>\n <Text>\n This is Level 2 drawer. Main drawer is pushed back. You can go deeper:\n </Text>\n\n <ContentPlaceholder height={150} />\n </VStack>\n </DrawerBody>\n\n <DrawerFooter>\n <DrawerClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Back\n </Button>\n </DrawerClose>\n <Button variant='primary' color='brand' size='large'>\n Apply\n </Button>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n </DrawerHeader>\n\n <DrawerBody>\n <VStack gap={12} align='start'>\n <Text>This is Level 1 drawer. Click below to open nested drawers:</Text>\n\n <ContentPlaceholder height={300} />\n </VStack>\n </DrawerBody>\n\n <DrawerFooter>\n <DrawerClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Cancel\n </Button>\n </DrawerClose>\n <Button variant='primary' color='brand' size='large'>\n Save\n </Button>\n </DrawerFooter>\n </DrawerContent>\n </Drawer>\n );\n}",
|
|
12705
|
+
"description": "Nested drawers with push-back effect"
|
|
12729
12706
|
},
|
|
12730
12707
|
{
|
|
12731
|
-
"name": "
|
|
12732
|
-
"
|
|
12733
|
-
"
|
|
12734
|
-
|
|
12735
|
-
|
|
12708
|
+
"name": "WithTabs",
|
|
12709
|
+
"code": "() => {\n const [activeTab, setActiveTab] = useState('tab1');\n\n return (\n <Drawer width={960}>\n <DrawerTrigger asChild>\n <Button>Open Drawer with Tabs</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <Tabs value={activeTab} onChange={setActiveTab} asChild>\n <DrawerHeader>\n <DrawerTitle>Tabbed Content</DrawerTitle>\n </DrawerHeader>\n\n <TabsList>\n <TabsTrigger value='tab1'>General</TabsTrigger>\n <TabsTrigger value='tab2'>Settings</TabsTrigger>\n <TabsTrigger value='tab3'>Advanced</TabsTrigger>\n </TabsList>\n\n <DrawerBody>\n <div className='pt-12'>\n <TabsContent value='tab1'>\n <h3 className='text-lg font-medium mb-8'>General Settings</h3>\n <ContentPlaceholder height={300} />\n </TabsContent>\n <TabsContent value='tab2'>\n <h3 className='text-lg font-medium mb-8'>Configuration</h3>\n <ContentPlaceholder height={300} />\n </TabsContent>\n <TabsContent value='tab3'>\n <h3 className='text-lg font-medium mb-8'>Advanced Options</h3>\n <ContentPlaceholder height={300} />\n </TabsContent>\n </div>\n </DrawerBody>\n\n <DrawerFooter>\n <DrawerClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Cancel\n </Button>\n </DrawerClose>\n <Button variant='primary' color='brand' size='large'>\n Apply Settings\n </Button>\n </DrawerFooter>\n </Tabs>\n </DrawerContent>\n </Drawer>\n );\n}",
|
|
12710
|
+
"description": "With tabs"
|
|
12711
|
+
}
|
|
12712
|
+
]
|
|
12713
|
+
},
|
|
12714
|
+
{
|
|
12715
|
+
"name": "DropdownMenu",
|
|
12716
|
+
"importPath": "@wallarm-org/design-system/DropdownMenu",
|
|
12717
|
+
"props": [],
|
|
12718
|
+
"variants": [
|
|
12736
12719
|
{
|
|
12737
|
-
"name": "
|
|
12738
|
-
"
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12720
|
+
"name": "variant",
|
|
12721
|
+
"options": [
|
|
12722
|
+
"default",
|
|
12723
|
+
"brand",
|
|
12724
|
+
"destructive"
|
|
12725
|
+
]
|
|
12742
12726
|
},
|
|
12743
12727
|
{
|
|
12744
|
-
"name": "
|
|
12745
|
-
"
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
"defaultValue": "true"
|
|
12728
|
+
"name": "inset",
|
|
12729
|
+
"options": [
|
|
12730
|
+
"true"
|
|
12731
|
+
]
|
|
12749
12732
|
}
|
|
12750
12733
|
],
|
|
12751
|
-
"variants": [],
|
|
12752
12734
|
"subComponents": [],
|
|
12753
12735
|
"examples": [
|
|
12754
12736
|
{
|
|
12755
|
-
"name": "
|
|
12756
|
-
"code": "() => (\n <
|
|
12737
|
+
"name": "Basic",
|
|
12738
|
+
"code": "() => (\n <DropdownMenu data-testid='dropdown-menu'>\n <DropdownMenuTrigger asChild>\n <Button variant='outline' color='neutral'>\n Open\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuLabel>My Account</DropdownMenuLabel>\n <DropdownMenuGroup>\n <DropdownMenuItem>\n Profile\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>P</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuItem>\n Billing\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>B</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuItem>\n Settings\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>S</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuItem>\n Keyboard shortcuts super\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>K</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n\n <DropdownMenuSeparator />\n\n <DropdownMenuGroup>\n <DropdownMenuItem>Team</DropdownMenuItem>\n <DropdownMenu>\n <DropdownMenuTriggerItem>Invite users</DropdownMenuTriggerItem>\n <DropdownMenuContent>\n <DropdownMenuItem>Email</DropdownMenuItem>\n <DropdownMenuItem>Message</DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem>More...</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n <DropdownMenuItem>\n New Team\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>T</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n\n <DropdownMenuSeparator />\n\n <DropdownMenuItem>GitHub</DropdownMenuItem>\n <DropdownMenuItem>Support</DropdownMenuItem>\n <DropdownMenuItem disabled>API</DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem variant='destructive'>\n Log out\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>Q</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n)"
|
|
12757
12739
|
},
|
|
12758
12740
|
{
|
|
12759
|
-
"name": "
|
|
12760
|
-
"code": "() => (\n <
|
|
12741
|
+
"name": "Context",
|
|
12742
|
+
"code": "() => (\n <DropdownMenu>\n <DropdownMenuContextTrigger asChild>\n <div className='flex items-center justify-center w-300 h-192 border border-border-primary border-dashed rounded-8'>\n Right click here\n </div>\n </DropdownMenuContextTrigger>\n <DropdownMenuContent>\n <DropdownMenuLabel>My Account</DropdownMenuLabel>\n <DropdownMenuGroup>\n <DropdownMenuItem>\n Profile\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>P</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuItem>\n Billing\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>B</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuItem>\n Settings\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>S</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuItem>\n Keyboard shortcuts super\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>K</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n\n <DropdownMenuSeparator />\n\n <DropdownMenuGroup>\n <DropdownMenuItem>Team</DropdownMenuItem>\n <DropdownMenu>\n <DropdownMenuTriggerItem>Invite users</DropdownMenuTriggerItem>\n <DropdownMenuContent>\n <DropdownMenuItem>Email</DropdownMenuItem>\n <DropdownMenuItem>Message</DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem>More...</DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n <DropdownMenuItem>\n New Team\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>T</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n\n <DropdownMenuSeparator />\n\n <DropdownMenuItem>GitHub</DropdownMenuItem>\n <DropdownMenuItem>Support</DropdownMenuItem>\n <DropdownMenuItem disabled>API</DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem variant='destructive'>\n Log out\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>Q</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n)"
|
|
12761
12743
|
},
|
|
12762
12744
|
{
|
|
12763
|
-
"name": "
|
|
12764
|
-
"code": "() => (\n <
|
|
12745
|
+
"name": "WithDescriptions",
|
|
12746
|
+
"code": "() => (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant='outline' color='neutral'>\n <Plus />\n Add Widget\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuItem>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Bar-volume chart</DropdownMenuItemText>\n <DropdownMenuItemDescription>Description</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Canvas</DropdownMenuItemText>\n <DropdownMenuItemDescription>Description</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Attacks heat-map</DropdownMenuItemText>\n <DropdownMenuItemDescription>Description</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>Q</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n\n <DropdownMenuItem variant='brand'>\n <CirclePlus />\n <DropdownMenuItemText>Request custom widget</DropdownMenuItemText>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n)"
|
|
12765
12747
|
},
|
|
12766
12748
|
{
|
|
12767
|
-
"name": "
|
|
12768
|
-
"code": "() => (\n <
|
|
12749
|
+
"name": "WithIcons",
|
|
12750
|
+
"code": "() => (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant='outline' color='neutral'>\n <Plus />\n Add Widget\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <LayoutTemplate />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Bar-volume chart</DropdownMenuItemText>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <Maximize />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Canvas</DropdownMenuItemText>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <Earth />\n </DropdownMenuItemIcon>\n <DropdownMenuItemText>Attacks heat-map</DropdownMenuItemText>\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>Q</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n\n <DropdownMenuItem variant='brand'>\n <CirclePlus />\n <DropdownMenuItemText>Request custom widget</DropdownMenuItemText>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n)"
|
|
12769
12751
|
},
|
|
12770
12752
|
{
|
|
12771
|
-
"name": "
|
|
12772
|
-
"code": "() => (\n <
|
|
12753
|
+
"name": "WithFooter",
|
|
12754
|
+
"code": "() => (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant='outline' color='neutral'>\n Open\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuItem>Profile</DropdownMenuItem>\n <DropdownMenuItem>Billing</DropdownMenuItem>\n <DropdownMenuItem>Settings</DropdownMenuItem>\n <DropdownMenuItem>Notifications</DropdownMenuItem>\n <DropdownMenuItem>Integrations</DropdownMenuItem>\n <DropdownMenuItem>Security</DropdownMenuItem>\n <DropdownMenuItem>API Keys</DropdownMenuItem>\n <DropdownMenuItem>Webhooks</DropdownMenuItem>\n <DropdownMenuItem>Audit Log</DropdownMenuItem>\n <DropdownMenuItem>Team Members</DropdownMenuItem>\n <DropdownMenuItem>Permissions</DropdownMenuItem>\n <DropdownMenuItem>Usage</DropdownMenuItem>\n <DropdownMenuFooter>\n <span className='flex items-center gap-4'>\n <KbdGroup>\n <Kbd>↑</Kbd>\n <Kbd>↓</Kbd>\n </KbdGroup>\n to navigate\n </span>\n <span className='flex items-center gap-4'>\n <KbdGroup>\n <Kbd>↵</Kbd>\n </KbdGroup>\n to select\n </span>\n </DropdownMenuFooter>\n </DropdownMenuContent>\n </DropdownMenu>\n)"
|
|
12773
12755
|
},
|
|
12774
12756
|
{
|
|
12775
|
-
"name": "
|
|
12776
|
-
"code": "() => (\n <
|
|
12757
|
+
"name": "WithDescriptionAndIcons",
|
|
12758
|
+
"code": "() => (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant='outline' color='neutral'>\n <Plus />\n Add Widget\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <LayoutTemplate />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Bar-volume chart</DropdownMenuItemText>\n <DropdownMenuItemDescription>Description</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <Maximize />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Canvas</DropdownMenuItemText>\n <DropdownMenuItemDescription>Description</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <Earth />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Attacks heat-map</DropdownMenuItemText>\n <DropdownMenuItemDescription>Description</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>Q</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n\n <DropdownMenuItem variant='brand'>\n <CirclePlus />\n <DropdownMenuItemText>Request custom widget</DropdownMenuItemText>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n)"
|
|
12777
12759
|
}
|
|
12778
12760
|
]
|
|
12779
12761
|
},
|
|
12780
12762
|
{
|
|
12781
|
-
"name": "
|
|
12782
|
-
"importPath": "@wallarm-org/design-system/
|
|
12763
|
+
"name": "Field",
|
|
12764
|
+
"importPath": "@wallarm-org/design-system/Field",
|
|
12783
12765
|
"props": [],
|
|
12784
|
-
"variants": [
|
|
12766
|
+
"variants": [
|
|
12767
|
+
{
|
|
12768
|
+
"name": "orientation",
|
|
12769
|
+
"options": [
|
|
12770
|
+
"vertical",
|
|
12771
|
+
"horizontal",
|
|
12772
|
+
"responsive"
|
|
12773
|
+
],
|
|
12774
|
+
"defaultValue": "vertical"
|
|
12775
|
+
}
|
|
12776
|
+
],
|
|
12785
12777
|
"subComponents": [],
|
|
12786
12778
|
"examples": [
|
|
12787
12779
|
{
|
|
12788
12780
|
"name": "Basic",
|
|
12789
|
-
"code": "() => {\n return (\n <
|
|
12790
|
-
"description": "Basic uncontrolled dialog"
|
|
12791
|
-
},
|
|
12792
|
-
{
|
|
12793
|
-
"name": "WithFooter",
|
|
12794
|
-
"code": "() => {\n return (\n <Dialog>\n <DialogTrigger asChild>\n <Button>Open Dialog</Button>\n </DialogTrigger>\n\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Dialog's title</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <ContentPlaceholder />\n </DialogBody>\n\n <DialogFooter>\n <DialogFooterControls>\n <Button variant='ghost' color='neutral' size='large'>\n Button\n </Button>\n <Button variant='primary' color='brand' size='large'>\n Button\n </Button>\n </DialogFooterControls>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}",
|
|
12795
|
-
"description": "Minimal example"
|
|
12796
|
-
},
|
|
12797
|
-
{
|
|
12798
|
-
"name": "WithFooterLeftActions",
|
|
12799
|
-
"code": "() => (\n <Dialog>\n <DialogTrigger asChild>\n <Button>Open with Footer Actions</Button>\n </DialogTrigger>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Footer with Left Actions</DialogTitle>\n </DialogHeader>\n\n <DialogBody>\n <ContentPlaceholder />\n </DialogBody>\n\n <DialogFooter>\n <DialogFooterControls placement='left'>\n <Switch>\n <SwitchControl />\n <SwitchLabel>Remember choice</SwitchLabel>\n </Switch>\n </DialogFooterControls>\n\n <DialogClose asChild>\n <Button variant='ghost' color='neutral' size='large'>\n Cancel\n </Button>\n </DialogClose>\n <Button variant='primary' color='brand' size='large'>\n Apply\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n)",
|
|
12800
|
-
"description": "With footer left actions"
|
|
12781
|
+
"code": "() => {\n const monthsCollection = createListCollection({\n items: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],\n });\n\n const yearsCollection = createListCollection({\n items: ['2025', '2026', '2027', '2028', '2029'],\n });\n\n return (\n <div className='min-w-320'>\n <form>\n <FieldGroup>\n <FieldSet>\n <FieldLegend>Payment Method</FieldLegend>\n\n <FieldDescription>All transactions are secure and encrypted</FieldDescription>\n\n <FieldGroup>\n <Field>\n <FieldLabel>Name on Card</FieldLabel>\n <Input placeholder='Evil Rabbit' />\n </Field>\n <Field>\n <FieldLabel htmlFor='checkout-7j9-card-number-uw1'>Card Number</FieldLabel>\n <Input\n id='checkout-7j9-card-number-uw1'\n placeholder='1234 5678 9012 3456'\n required\n />\n <FieldDescription>Enter your 16-digit card number</FieldDescription>\n </Field>\n\n <HStack>\n <Field>\n <FieldLabel>Month</FieldLabel>\n <Select collection={monthsCollection}>\n <SelectButton placeholder='Month' />\n <SelectPositioner>\n <SelectContent>\n {monthsCollection.items.map(month => (\n <SelectOption key={month} item={month}>\n <SelectOptionText>{month}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n </Field>\n\n <Field>\n <FieldLabel>Year</FieldLabel>\n\n <Select collection={yearsCollection}>\n <SelectButton placeholder='Year' />\n\n <SelectPositioner>\n <SelectContent>\n {yearsCollection.items.map(year => (\n <SelectOption key={year} item={year}>\n <SelectOptionText>{year}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n </Field>\n\n <Field>\n <FieldLabel>CVV</FieldLabel>\n <Input placeholder='123' required />\n </Field>\n </HStack>\n\n <Field>\n <FieldLabel>Amount</FieldLabel>\n <NumberInput defaultValue='1000' />\n </Field>\n </FieldGroup>\n </FieldSet>\n\n <FieldSeparator />\n\n <FieldSet>\n <FieldLegend>Billing Address</FieldLegend>\n\n <FieldDescription>\n The billing address associated with your payment method\n </FieldDescription>\n\n <FieldGroup>\n <Field orientation='horizontal'>\n <Checkbox defaultChecked>\n <CheckboxIndicator />\n <CheckboxLabel>Same as shipping address</CheckboxLabel>\n </Checkbox>\n </Field>\n </FieldGroup>\n </FieldSet>\n\n <FieldSeparator />\n\n <FieldSet>\n <FieldLegend>Subscription Plan</FieldLegend>\n\n <FieldDescription>\n Yearly and lifetime plans offer significant savings.\n </FieldDescription>\n\n <Field>\n <RadioGroup defaultValue='monthly'>\n <Radio value='monthly'>\n <RadioIndicator />\n <RadioLabel>Monthly ($9.99/month)</RadioLabel>\n </Radio>\n <Radio value='yearly'>\n <RadioIndicator />\n <RadioLabel>Yearly ($99.99/year)</RadioLabel>\n </Radio>\n <Radio value='lifetime'>\n <RadioIndicator />\n <RadioLabel>Lifetime ($299.99)</RadioLabel>\n </Radio>\n </RadioGroup>\n </Field>\n </FieldSet>\n\n <FieldSeparator />\n\n <FieldSet>\n <FieldGroup>\n <Field orientation='horizontal'>\n <Switch>\n <SwitchControl />\n <SwitchLabel>Notice when delivered</SwitchLabel>\n </Switch>\n </Field>\n </FieldGroup>\n </FieldSet>\n\n <FieldSet>\n <FieldGroup>\n <Field>\n <FieldLabel>Comments</FieldLabel>\n <Textarea placeholder='Add any additional comments' />\n </Field>\n </FieldGroup>\n </FieldSet>\n\n <Field orientation='horizontal'>\n <Button type='submit'>Submit</Button>\n\n <Button variant='outline' color='neutral' type='button'>\n Cancel\n </Button>\n </Field>\n </FieldGroup>\n </form>\n </div>\n );\n}"
|
|
12801
12782
|
},
|
|
12802
12783
|
{
|
|
12803
|
-
"name": "
|
|
12804
|
-
"code": "() => (\n <
|
|
12805
|
-
"description": "Dialog with different sizes - Small"
|
|
12784
|
+
"name": "Inputs",
|
|
12785
|
+
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldGroup>\n <Field>\n <FieldLabel>Username</FieldLabel>\n <Input type='text' placeholder='Max Leiter' />\n <FieldDescription>Choose a unique username for your account.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Password</FieldLabel>\n <FieldDescription>Must be at least 8 characters long.</FieldDescription>\n <Input type='password' placeholder='********' />\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
12806
12786
|
},
|
|
12807
12787
|
{
|
|
12808
|
-
"name": "
|
|
12809
|
-
"code": "() =>
|
|
12810
|
-
"description": "Custom width with percentage"
|
|
12788
|
+
"name": "Textareas",
|
|
12789
|
+
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldGroup>\n <Field>\n <FieldLabel>Feedback</FieldLabel>\n <Textarea placeholder='Your feedback helps us improve...' rows={4} />\n <FieldDescription>Share your thoughts about our service.</FieldDescription>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
12811
12790
|
},
|
|
12812
12791
|
{
|
|
12813
|
-
"name": "
|
|
12814
|
-
"code": "() =>
|
|
12815
|
-
"description": "Dialog with scrollable content"
|
|
12792
|
+
"name": "Fieldset",
|
|
12793
|
+
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Profile</FieldLegend>\n <FieldDescription>This appears on invoices and emails.</FieldDescription>\n\n <FieldGroup>\n <Field>\n <FieldLabel>\n Full name\n <FieldAction>Generate new</FieldAction>\n </FieldLabel>\n <Input autoComplete='off' placeholder='Evil Rabbit' />\n <FieldDescription>This appears on invoices and emails.</FieldDescription>\n </Field>\n <Field required>\n <FieldLabel>\n Username\n <FieldIndicator />\n </FieldLabel>\n <Input placeholder='@paveldurov' autoComplete='off' error />\n <FieldError>Choose another username.</FieldError>\n </Field>\n <Field>\n <FieldLabel>\n Message\n <Tooltip>\n <TooltipTrigger>\n <Info />\n </TooltipTrigger>\n <TooltipContent>Additional information</TooltipContent>\n </Tooltip>\n </FieldLabel>\n <Textarea placeholder='Your message...' />\n <FieldDescription>Enter your message.</FieldDescription>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
12816
12794
|
},
|
|
12817
12795
|
{
|
|
12818
|
-
"name": "
|
|
12819
|
-
"code": "() =>
|
|
12820
|
-
"description": "Controlled dialog with external state"
|
|
12796
|
+
"name": "Switches",
|
|
12797
|
+
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Notification Settings</FieldLegend>\n <FieldDescription>Manage your notification preferences.</FieldDescription>\n\n <FieldGroup>\n <Field orientation='horizontal'>\n <Switch defaultChecked>\n <SwitchControl />\n <SwitchLabel>Email notifications</SwitchLabel>\n <SwitchDescription>Receive email alerts for important updates.</SwitchDescription>\n </Switch>\n </Field>\n\n <Field orientation='horizontal'>\n <Switch>\n <SwitchControl />\n <SwitchLabel>Push notifications</SwitchLabel>\n <SwitchDescription>Get push notifications on your device.</SwitchDescription>\n </Switch>\n </Field>\n\n <Field orientation='horizontal'>\n <Switch defaultChecked>\n <SwitchControl />\n <SwitchLabel>SMS notifications</SwitchLabel>\n <SwitchDescription>Receive text messages for critical alerts.</SwitchDescription>\n </Switch>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
12821
12798
|
},
|
|
12822
12799
|
{
|
|
12823
|
-
"name": "
|
|
12824
|
-
"code": "() =>
|
|
12825
|
-
"description": "No closable on ESC"
|
|
12800
|
+
"name": "Radios",
|
|
12801
|
+
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Delivery Method</FieldLegend>\n <FieldDescription>Choose how you want to receive your order.</FieldDescription>\n\n <Field>\n <RadioGroup defaultValue='standard'>\n <Radio value='standard'>\n <RadioIndicator />\n <RadioLabel>Standard Shipping (5-7 days)</RadioLabel>\n </Radio>\n <Radio value='express'>\n <RadioIndicator />\n <RadioLabel>Express Shipping (2-3 days)</RadioLabel>\n </Radio>\n <Radio value='overnight'>\n <RadioIndicator />\n <RadioLabel>Overnight Shipping (1 day)</RadioLabel>\n </Radio>\n <Radio value='pickup'>\n <RadioIndicator />\n <RadioLabel>In-store Pickup</RadioLabel>\n </Radio>\n </RadioGroup>\n\n <FieldDescription>Shipping costs will be calculated at checkout.</FieldDescription>\n </Field>\n </FieldSet>\n </div>\n)"
|
|
12826
12802
|
},
|
|
12827
12803
|
{
|
|
12828
|
-
"name": "
|
|
12829
|
-
"code": "() =>
|
|
12830
|
-
"description": "Without overlay"
|
|
12804
|
+
"name": "Checkboxes",
|
|
12805
|
+
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Terms and Preferences</FieldLegend>\n <FieldDescription>Select which terms you agree to.</FieldDescription>\n\n <FieldGroup>\n <Field orientation='horizontal'>\n <Checkbox defaultChecked>\n <CheckboxIndicator />\n <CheckboxLabel>I accept the terms and conditions</CheckboxLabel>\n <CheckboxDescription>You must agree to our terms to continue.</CheckboxDescription>\n </Checkbox>\n </Field>\n <Field orientation='horizontal'>\n <Checkbox>\n <CheckboxIndicator />\n <CheckboxLabel>Subscribe to newsletter</CheckboxLabel>\n <CheckboxDescription>Get weekly updates and exclusive offers.</CheckboxDescription>\n </Checkbox>\n </Field>\n <Field orientation='horizontal'>\n <Checkbox defaultChecked>\n <CheckboxIndicator />\n <CheckboxLabel>Share usage data</CheckboxLabel>\n <CheckboxDescription>Help us improve our services.</CheckboxDescription>\n </Checkbox>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
12831
12806
|
},
|
|
12832
12807
|
{
|
|
12833
|
-
"name": "
|
|
12834
|
-
"code": "() =>
|
|
12835
|
-
"description": "Nested dialogs with push-back effect"
|
|
12808
|
+
"name": "NumberInputs",
|
|
12809
|
+
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Product Details</FieldLegend>\n <FieldDescription>Configure your product quantity and pricing.</FieldDescription>\n\n <FieldGroup>\n <Field>\n <FieldLabel>Quantity</FieldLabel>\n <NumberInput defaultValue='1' min={1} max={100} />\n <FieldDescription>Choose between 1 and 100 items.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Price per unit</FieldLabel>\n <NumberInput\n defaultValue='99.99'\n step={0.01}\n formatOptions={{ style: 'currency', currency: 'USD' }}\n />\n <FieldDescription>Set the price for each unit.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Discount percentage</FieldLabel>\n <NumberInput defaultValue='10' min={0} max={100} formatOptions={{ style: 'percent' }} />\n <FieldDescription>Apply a discount from 0% to 100%.</FieldDescription>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
12836
12810
|
},
|
|
12837
12811
|
{
|
|
12838
|
-
"name": "
|
|
12839
|
-
"code": "() => {\n const [
|
|
12840
|
-
"description": "With tabs"
|
|
12812
|
+
"name": "Selects",
|
|
12813
|
+
"code": "() => {\n const countriesCollection = createListCollection({\n items: [\n { value: 'us', label: 'United States' },\n { value: 'uk', label: 'United Kingdom' },\n { value: 'ca', label: 'Canada' },\n { value: 'au', label: 'Australia' },\n { value: 'fr', label: 'France' },\n { value: 'de', label: 'Germany' },\n { value: 'jp', label: 'Japan' },\n ],\n });\n\n const languagesCollection = createListCollection({\n items: [\n { value: 'en', label: 'English' },\n { value: 'es', label: 'Spanish' },\n { value: 'fr', label: 'French' },\n { value: 'de', label: 'German' },\n { value: 'it', label: 'Italian' },\n { value: 'pt', label: 'Portuguese' },\n { value: 'ru', label: 'Russian' },\n { value: 'zh', label: 'Chinese' },\n { value: 'ja', label: 'Japanese' },\n ],\n });\n\n const timezonesCollection = createListCollection({\n items: [\n { value: 'utc-8', label: 'Pacific Time (UTC-8)' },\n { value: 'utc-5', label: 'Eastern Time (UTC-5)' },\n { value: 'utc', label: 'UTC' },\n { value: 'utc+1', label: 'Central European Time (UTC+1)' },\n { value: 'utc+8', label: 'China Standard Time (UTC+8)' },\n { value: 'utc+9', label: 'Japan Standard Time (UTC+9)' },\n ],\n });\n\n return (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Regional Settings</FieldLegend>\n <FieldDescription>Configure your location and language preferences.</FieldDescription>\n\n <FieldGroup>\n <Field>\n <FieldLabel>Country</FieldLabel>\n <Select collection={countriesCollection}>\n <SelectButton placeholder='Select a country' />\n <SelectPositioner>\n <SelectContent>\n {countriesCollection.items.map(country => (\n <SelectOption key={country.value} item={country}>\n <SelectOptionText>{country.label}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n <FieldDescription>Your country determines available features.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Language</FieldLabel>\n <Select collection={languagesCollection}>\n <SelectButton placeholder='Select a language' />\n <SelectPositioner>\n <SelectContent>\n {languagesCollection.items.map(language => (\n <SelectOption key={language.value} item={language}>\n <SelectOptionText>{language.label}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n <FieldDescription>Choose your preferred language.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Timezone</FieldLabel>\n <Select collection={timezonesCollection}>\n <SelectButton placeholder='Select a timezone' />\n <SelectPositioner>\n <SelectContent>\n {timezonesCollection.items.map(timezone => (\n <SelectOption key={timezone.value} item={timezone}>\n <SelectOptionText>{timezone.label}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n <FieldDescription>All times will be displayed in this timezone.</FieldDescription>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n );\n}"
|
|
12841
12814
|
}
|
|
12842
12815
|
]
|
|
12843
12816
|
},
|
|
12844
12817
|
{
|
|
12845
|
-
"name": "
|
|
12846
|
-
"
|
|
12818
|
+
"name": "FilterInput",
|
|
12819
|
+
"description": "FilterInput - Self-contained filter component.\nHandles autocomplete flow (field → operator → value), chip creation, and expression management.\nSupports multiple conditions joined by AND/OR connectors.\nJust pass `fields` config from backend API and it works.",
|
|
12820
|
+
"importPath": "@wallarm-org/design-system/FilterInput",
|
|
12847
12821
|
"props": [
|
|
12848
12822
|
{
|
|
12849
|
-
"name": "
|
|
12850
|
-
"type": "
|
|
12823
|
+
"name": "fields",
|
|
12824
|
+
"type": "FieldMetadata[] | undefined",
|
|
12851
12825
|
"required": false,
|
|
12852
|
-
"description": "
|
|
12826
|
+
"description": "Available fields from backend API config",
|
|
12827
|
+
"defaultValue": "[]"
|
|
12853
12828
|
},
|
|
12854
12829
|
{
|
|
12855
|
-
"name": "
|
|
12856
|
-
"type": "
|
|
12830
|
+
"name": "value",
|
|
12831
|
+
"type": "ExprNode | null | undefined",
|
|
12857
12832
|
"required": false,
|
|
12858
|
-
"description": "
|
|
12859
|
-
"defaultValue": "true"
|
|
12833
|
+
"description": "Current filter expression value (controlled mode)"
|
|
12860
12834
|
},
|
|
12861
12835
|
{
|
|
12862
|
-
"name": "
|
|
12863
|
-
"type": "
|
|
12836
|
+
"name": "placeholder",
|
|
12837
|
+
"type": "string | undefined",
|
|
12864
12838
|
"required": false,
|
|
12865
|
-
"description": "
|
|
12866
|
-
"defaultValue": "
|
|
12839
|
+
"description": "Placeholder text to display when field is empty",
|
|
12840
|
+
"defaultValue": "Type to filter..."
|
|
12867
12841
|
},
|
|
12868
12842
|
{
|
|
12869
|
-
"name": "
|
|
12843
|
+
"name": "error",
|
|
12870
12844
|
"type": "boolean | undefined",
|
|
12871
12845
|
"required": false,
|
|
12872
|
-
"description": "
|
|
12873
|
-
"defaultValue": "
|
|
12846
|
+
"description": "Whether the field has a validation error",
|
|
12847
|
+
"defaultValue": "false"
|
|
12874
12848
|
},
|
|
12875
12849
|
{
|
|
12876
|
-
"name": "
|
|
12877
|
-
"type": "
|
|
12850
|
+
"name": "showKeyboardHint",
|
|
12851
|
+
"type": "boolean | undefined",
|
|
12878
12852
|
"required": false,
|
|
12879
|
-
"description": "
|
|
12853
|
+
"description": "Whether to show the keyboard hint (⌘K or Ctrl+K)",
|
|
12854
|
+
"defaultValue": "false"
|
|
12880
12855
|
},
|
|
12881
12856
|
{
|
|
12882
|
-
"name": "
|
|
12883
|
-
"type": "
|
|
12884
|
-
"required": false
|
|
12885
|
-
"description": "Minimum width in pixels"
|
|
12857
|
+
"name": "defaultChecked",
|
|
12858
|
+
"type": "boolean | undefined",
|
|
12859
|
+
"required": false
|
|
12886
12860
|
},
|
|
12887
12861
|
{
|
|
12888
|
-
"name": "
|
|
12889
|
-
"type": "number | undefined",
|
|
12890
|
-
"required": false
|
|
12891
|
-
"description": "Maximum width in pixels"
|
|
12892
|
-
}
|
|
12893
|
-
],
|
|
12894
|
-
"variants": [
|
|
12895
|
-
{
|
|
12896
|
-
"name": "isResizing",
|
|
12897
|
-
"options": [
|
|
12898
|
-
"true"
|
|
12899
|
-
]
|
|
12900
|
-
}
|
|
12901
|
-
],
|
|
12902
|
-
"subComponents": [
|
|
12903
|
-
{
|
|
12904
|
-
"name": "DrawerBody",
|
|
12905
|
-
"props": []
|
|
12862
|
+
"name": "defaultValue",
|
|
12863
|
+
"type": "string | number | readonly string[] | undefined",
|
|
12864
|
+
"required": false
|
|
12906
12865
|
},
|
|
12907
12866
|
{
|
|
12908
|
-
"name": "
|
|
12909
|
-
"
|
|
12910
|
-
|
|
12911
|
-
"name": "asChild",
|
|
12912
|
-
"type": "boolean | undefined",
|
|
12913
|
-
"required": false,
|
|
12914
|
-
"description": "Render as child component",
|
|
12915
|
-
"defaultValue": "false"
|
|
12916
|
-
}
|
|
12917
|
-
]
|
|
12867
|
+
"name": "suppressContentEditableWarning",
|
|
12868
|
+
"type": "boolean | undefined",
|
|
12869
|
+
"required": false
|
|
12918
12870
|
},
|
|
12919
12871
|
{
|
|
12920
|
-
"name": "
|
|
12921
|
-
"
|
|
12922
|
-
|
|
12923
|
-
"name": "asChild",
|
|
12924
|
-
"type": "boolean | undefined",
|
|
12925
|
-
"required": false
|
|
12926
|
-
}
|
|
12927
|
-
]
|
|
12872
|
+
"name": "suppressHydrationWarning",
|
|
12873
|
+
"type": "boolean | undefined",
|
|
12874
|
+
"required": false
|
|
12928
12875
|
},
|
|
12929
12876
|
{
|
|
12930
|
-
"name": "
|
|
12931
|
-
"
|
|
12877
|
+
"name": "accessKey",
|
|
12878
|
+
"type": "string | undefined",
|
|
12879
|
+
"required": false
|
|
12932
12880
|
},
|
|
12933
12881
|
{
|
|
12934
|
-
"name": "
|
|
12935
|
-
"
|
|
12936
|
-
|
|
12937
|
-
"name": "placement",
|
|
12938
|
-
"type": "{ left: string; right: string; }",
|
|
12939
|
-
"required": false,
|
|
12940
|
-
"defaultValue": "right"
|
|
12941
|
-
}
|
|
12942
|
-
]
|
|
12882
|
+
"name": "autoCapitalize",
|
|
12883
|
+
"type": "\"off\" | \"none\" | \"on\" | \"sentences\" | \"words\" | \"characters\" | (string & {}) | undefined",
|
|
12884
|
+
"required": false
|
|
12943
12885
|
},
|
|
12944
12886
|
{
|
|
12945
|
-
"name": "
|
|
12946
|
-
"
|
|
12887
|
+
"name": "autoFocus",
|
|
12888
|
+
"type": "boolean | undefined",
|
|
12889
|
+
"required": false
|
|
12947
12890
|
},
|
|
12948
12891
|
{
|
|
12949
|
-
"name": "
|
|
12950
|
-
"
|
|
12951
|
-
|
|
12952
|
-
"name": "isResizing",
|
|
12953
|
-
"type": "boolean",
|
|
12954
|
-
"required": true
|
|
12955
|
-
}
|
|
12956
|
-
]
|
|
12892
|
+
"name": "contentEditable",
|
|
12893
|
+
"type": "Booleanish | \"inherit\" | \"plaintext-only\" | undefined",
|
|
12894
|
+
"required": false
|
|
12957
12895
|
},
|
|
12958
12896
|
{
|
|
12959
|
-
"name": "
|
|
12960
|
-
"
|
|
12897
|
+
"name": "contextMenu",
|
|
12898
|
+
"type": "string | undefined",
|
|
12899
|
+
"required": false
|
|
12961
12900
|
},
|
|
12962
12901
|
{
|
|
12963
|
-
"name": "
|
|
12964
|
-
"
|
|
12965
|
-
|
|
12966
|
-
"name": "asChild",
|
|
12967
|
-
"type": "boolean | undefined",
|
|
12968
|
-
"required": false,
|
|
12969
|
-
"description": "Render as child component",
|
|
12970
|
-
"defaultValue": "false"
|
|
12971
|
-
}
|
|
12972
|
-
]
|
|
12973
|
-
}
|
|
12974
|
-
],
|
|
12975
|
-
"examples": [
|
|
12976
|
-
{
|
|
12977
|
-
"name": "Basic",
|
|
12978
|
-
"code": "() => {\n return (\n <Drawer data-testid='drawer'>\n <DrawerTrigger asChild>\n <Button>Open Drawer</Button>\n </DrawerTrigger>\n\n <DrawerContent>\n <DrawerHeader>\n <DrawerTitle>Drawer Title</DrawerTitle>\n </DrawerHeader>\n\n <DrawerBody>\n <ContentPlaceholder fillHeight />\n </DrawerBody>\n </DrawerContent>\n </Drawer>\n );\n}",
|
|
12979
|
-
"description": "Basic uncontrolled drawer"
|
|
12902
|
+
"name": "dir",
|
|
12903
|
+
"type": "string | undefined",
|
|
12904
|
+
"required": false
|
|
12980
12905
|
},
|
|
12981
12906
|
{
|
|
12982
|
-
"name": "
|
|
12983
|
-
"
|
|
12984
|
-
"
|
|
12907
|
+
"name": "draggable",
|
|
12908
|
+
"type": "Booleanish | undefined",
|
|
12909
|
+
"required": false
|
|
12985
12910
|
},
|
|
12986
12911
|
{
|
|
12987
|
-
"name": "
|
|
12988
|
-
"
|
|
12989
|
-
"
|
|
12912
|
+
"name": "enterKeyHint",
|
|
12913
|
+
"type": "\"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined",
|
|
12914
|
+
"required": false
|
|
12990
12915
|
},
|
|
12991
12916
|
{
|
|
12992
|
-
"name": "
|
|
12993
|
-
"
|
|
12994
|
-
"
|
|
12917
|
+
"name": "hidden",
|
|
12918
|
+
"type": "boolean | undefined",
|
|
12919
|
+
"required": false
|
|
12995
12920
|
},
|
|
12996
12921
|
{
|
|
12997
|
-
"name": "
|
|
12998
|
-
"
|
|
12999
|
-
"
|
|
12922
|
+
"name": "id",
|
|
12923
|
+
"type": "string | undefined",
|
|
12924
|
+
"required": false
|
|
13000
12925
|
},
|
|
13001
12926
|
{
|
|
13002
|
-
"name": "
|
|
13003
|
-
"
|
|
13004
|
-
"
|
|
12927
|
+
"name": "lang",
|
|
12928
|
+
"type": "string | undefined",
|
|
12929
|
+
"required": false
|
|
13005
12930
|
},
|
|
13006
12931
|
{
|
|
13007
|
-
"name": "
|
|
13008
|
-
"
|
|
13009
|
-
"
|
|
12932
|
+
"name": "nonce",
|
|
12933
|
+
"type": "string | undefined",
|
|
12934
|
+
"required": false
|
|
13010
12935
|
},
|
|
13011
12936
|
{
|
|
13012
|
-
"name": "
|
|
13013
|
-
"
|
|
13014
|
-
"
|
|
12937
|
+
"name": "slot",
|
|
12938
|
+
"type": "string | undefined",
|
|
12939
|
+
"required": false
|
|
13015
12940
|
},
|
|
13016
12941
|
{
|
|
13017
|
-
"name": "
|
|
13018
|
-
"
|
|
13019
|
-
"
|
|
12942
|
+
"name": "spellCheck",
|
|
12943
|
+
"type": "Booleanish | undefined",
|
|
12944
|
+
"required": false
|
|
13020
12945
|
},
|
|
13021
12946
|
{
|
|
13022
|
-
"name": "
|
|
13023
|
-
"
|
|
13024
|
-
"
|
|
12947
|
+
"name": "tabIndex",
|
|
12948
|
+
"type": "number | undefined",
|
|
12949
|
+
"required": false
|
|
13025
12950
|
},
|
|
13026
12951
|
{
|
|
13027
|
-
"name": "
|
|
13028
|
-
"
|
|
13029
|
-
"
|
|
12952
|
+
"name": "title",
|
|
12953
|
+
"type": "string | undefined",
|
|
12954
|
+
"required": false
|
|
13030
12955
|
},
|
|
13031
12956
|
{
|
|
13032
|
-
"name": "
|
|
13033
|
-
"
|
|
13034
|
-
"
|
|
13035
|
-
}
|
|
13036
|
-
]
|
|
13037
|
-
},
|
|
13038
|
-
{
|
|
13039
|
-
"name": "DropdownMenu",
|
|
13040
|
-
"importPath": "@wallarm-org/design-system/DropdownMenu",
|
|
13041
|
-
"props": [],
|
|
13042
|
-
"variants": [
|
|
12957
|
+
"name": "translate",
|
|
12958
|
+
"type": "\"yes\" | \"no\" | undefined",
|
|
12959
|
+
"required": false
|
|
12960
|
+
},
|
|
13043
12961
|
{
|
|
13044
|
-
"name": "
|
|
13045
|
-
"
|
|
13046
|
-
|
|
13047
|
-
"brand",
|
|
13048
|
-
"destructive"
|
|
13049
|
-
]
|
|
12962
|
+
"name": "radioGroup",
|
|
12963
|
+
"type": "string | undefined",
|
|
12964
|
+
"required": false
|
|
13050
12965
|
},
|
|
13051
12966
|
{
|
|
13052
|
-
"name": "
|
|
13053
|
-
"
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
}
|
|
13057
|
-
],
|
|
13058
|
-
"subComponents": [],
|
|
13059
|
-
"examples": [
|
|
12967
|
+
"name": "role",
|
|
12968
|
+
"type": "AriaRole | undefined",
|
|
12969
|
+
"required": false
|
|
12970
|
+
},
|
|
13060
12971
|
{
|
|
13061
|
-
"name": "
|
|
13062
|
-
"
|
|
12972
|
+
"name": "about",
|
|
12973
|
+
"type": "string | undefined",
|
|
12974
|
+
"required": false
|
|
13063
12975
|
},
|
|
13064
12976
|
{
|
|
13065
|
-
"name": "
|
|
13066
|
-
"
|
|
12977
|
+
"name": "content",
|
|
12978
|
+
"type": "string | undefined",
|
|
12979
|
+
"required": false
|
|
13067
12980
|
},
|
|
13068
12981
|
{
|
|
13069
|
-
"name": "
|
|
13070
|
-
"
|
|
12982
|
+
"name": "datatype",
|
|
12983
|
+
"type": "string | undefined",
|
|
12984
|
+
"required": false
|
|
13071
12985
|
},
|
|
13072
12986
|
{
|
|
13073
|
-
"name": "
|
|
13074
|
-
"
|
|
12987
|
+
"name": "inlist",
|
|
12988
|
+
"type": "any",
|
|
12989
|
+
"required": false
|
|
13075
12990
|
},
|
|
13076
12991
|
{
|
|
13077
|
-
"name": "
|
|
13078
|
-
"
|
|
13079
|
-
|
|
13080
|
-
{
|
|
13081
|
-
"name": "WithDescriptionAndIcons",
|
|
13082
|
-
"code": "() => (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant='outline' color='neutral'>\n <Plus />\n Add Widget\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <LayoutTemplate />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Bar-volume chart</DropdownMenuItemText>\n <DropdownMenuItemDescription>Description</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <Maximize />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Canvas</DropdownMenuItemText>\n <DropdownMenuItemDescription>Description</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n </DropdownMenuItem>\n <DropdownMenuItem>\n <DropdownMenuItemIcon>\n <Earth />\n </DropdownMenuItemIcon>\n <DropdownMenuItemContent>\n <DropdownMenuItemText>Attacks heat-map</DropdownMenuItemText>\n <DropdownMenuItemDescription>Description</DropdownMenuItemDescription>\n </DropdownMenuItemContent>\n <DropdownMenuShortcut>\n <KbdGroup>\n <Kbd>⌘</Kbd>\n <Kbd>Q</Kbd>\n </KbdGroup>\n </DropdownMenuShortcut>\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n\n <DropdownMenuItem variant='brand'>\n <CirclePlus />\n <DropdownMenuItemText>Request custom widget</DropdownMenuItemText>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n)"
|
|
13083
|
-
}
|
|
13084
|
-
]
|
|
13085
|
-
},
|
|
13086
|
-
{
|
|
13087
|
-
"name": "Field",
|
|
13088
|
-
"importPath": "@wallarm-org/design-system/Field",
|
|
13089
|
-
"props": [],
|
|
13090
|
-
"variants": [
|
|
13091
|
-
{
|
|
13092
|
-
"name": "orientation",
|
|
13093
|
-
"options": [
|
|
13094
|
-
"vertical",
|
|
13095
|
-
"horizontal",
|
|
13096
|
-
"responsive"
|
|
13097
|
-
],
|
|
13098
|
-
"defaultValue": "vertical"
|
|
13099
|
-
}
|
|
13100
|
-
],
|
|
13101
|
-
"subComponents": [],
|
|
13102
|
-
"examples": [
|
|
13103
|
-
{
|
|
13104
|
-
"name": "Basic",
|
|
13105
|
-
"code": "() => {\n const monthsCollection = createListCollection({\n items: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'],\n });\n\n const yearsCollection = createListCollection({\n items: ['2025', '2026', '2027', '2028', '2029'],\n });\n\n return (\n <div className='min-w-320'>\n <form>\n <FieldGroup>\n <FieldSet>\n <FieldLegend>Payment Method</FieldLegend>\n\n <FieldDescription>All transactions are secure and encrypted</FieldDescription>\n\n <FieldGroup>\n <Field>\n <FieldLabel>Name on Card</FieldLabel>\n <Input placeholder='Evil Rabbit' />\n </Field>\n <Field>\n <FieldLabel htmlFor='checkout-7j9-card-number-uw1'>Card Number</FieldLabel>\n <Input\n id='checkout-7j9-card-number-uw1'\n placeholder='1234 5678 9012 3456'\n required\n />\n <FieldDescription>Enter your 16-digit card number</FieldDescription>\n </Field>\n\n <HStack>\n <Field>\n <FieldLabel>Month</FieldLabel>\n <Select collection={monthsCollection}>\n <SelectButton placeholder='Month' />\n <SelectPositioner>\n <SelectContent>\n {monthsCollection.items.map(month => (\n <SelectOption key={month} item={month}>\n <SelectOptionText>{month}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n </Field>\n\n <Field>\n <FieldLabel>Year</FieldLabel>\n\n <Select collection={yearsCollection}>\n <SelectButton placeholder='Year' />\n\n <SelectPositioner>\n <SelectContent>\n {yearsCollection.items.map(year => (\n <SelectOption key={year} item={year}>\n <SelectOptionText>{year}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n </Field>\n\n <Field>\n <FieldLabel>CVV</FieldLabel>\n <Input placeholder='123' required />\n </Field>\n </HStack>\n\n <Field>\n <FieldLabel>Amount</FieldLabel>\n <NumberInput defaultValue='1000' />\n </Field>\n </FieldGroup>\n </FieldSet>\n\n <FieldSeparator />\n\n <FieldSet>\n <FieldLegend>Billing Address</FieldLegend>\n\n <FieldDescription>\n The billing address associated with your payment method\n </FieldDescription>\n\n <FieldGroup>\n <Field orientation='horizontal'>\n <Checkbox defaultChecked>\n <CheckboxIndicator />\n <CheckboxLabel>Same as shipping address</CheckboxLabel>\n </Checkbox>\n </Field>\n </FieldGroup>\n </FieldSet>\n\n <FieldSeparator />\n\n <FieldSet>\n <FieldLegend>Subscription Plan</FieldLegend>\n\n <FieldDescription>\n Yearly and lifetime plans offer significant savings.\n </FieldDescription>\n\n <Field>\n <RadioGroup defaultValue='monthly'>\n <Radio value='monthly'>\n <RadioIndicator />\n <RadioLabel>Monthly ($9.99/month)</RadioLabel>\n </Radio>\n <Radio value='yearly'>\n <RadioIndicator />\n <RadioLabel>Yearly ($99.99/year)</RadioLabel>\n </Radio>\n <Radio value='lifetime'>\n <RadioIndicator />\n <RadioLabel>Lifetime ($299.99)</RadioLabel>\n </Radio>\n </RadioGroup>\n </Field>\n </FieldSet>\n\n <FieldSeparator />\n\n <FieldSet>\n <FieldGroup>\n <Field orientation='horizontal'>\n <Switch>\n <SwitchControl />\n <SwitchLabel>Notice when delivered</SwitchLabel>\n </Switch>\n </Field>\n </FieldGroup>\n </FieldSet>\n\n <FieldSet>\n <FieldGroup>\n <Field>\n <FieldLabel>Comments</FieldLabel>\n <Textarea placeholder='Add any additional comments' />\n </Field>\n </FieldGroup>\n </FieldSet>\n\n <Field orientation='horizontal'>\n <Button type='submit'>Submit</Button>\n\n <Button variant='outline' color='neutral' type='button'>\n Cancel\n </Button>\n </Field>\n </FieldGroup>\n </form>\n </div>\n );\n}"
|
|
13106
|
-
},
|
|
13107
|
-
{
|
|
13108
|
-
"name": "Inputs",
|
|
13109
|
-
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldGroup>\n <Field>\n <FieldLabel>Username</FieldLabel>\n <Input type='text' placeholder='Max Leiter' />\n <FieldDescription>Choose a unique username for your account.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Password</FieldLabel>\n <FieldDescription>Must be at least 8 characters long.</FieldDescription>\n <Input type='password' placeholder='********' />\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
13110
|
-
},
|
|
13111
|
-
{
|
|
13112
|
-
"name": "Textareas",
|
|
13113
|
-
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldGroup>\n <Field>\n <FieldLabel>Feedback</FieldLabel>\n <Textarea placeholder='Your feedback helps us improve...' rows={4} />\n <FieldDescription>Share your thoughts about our service.</FieldDescription>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
13114
|
-
},
|
|
13115
|
-
{
|
|
13116
|
-
"name": "Fieldset",
|
|
13117
|
-
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Profile</FieldLegend>\n <FieldDescription>This appears on invoices and emails.</FieldDescription>\n\n <FieldGroup>\n <Field>\n <FieldLabel>\n Full name\n <FieldAction>Generate new</FieldAction>\n </FieldLabel>\n <Input autoComplete='off' placeholder='Evil Rabbit' />\n <FieldDescription>This appears on invoices and emails.</FieldDescription>\n </Field>\n <Field required>\n <FieldLabel>\n Username\n <FieldIndicator />\n </FieldLabel>\n <Input placeholder='@paveldurov' autoComplete='off' error />\n <FieldError>Choose another username.</FieldError>\n </Field>\n <Field>\n <FieldLabel>\n Message\n <Tooltip>\n <TooltipTrigger>\n <Info />\n </TooltipTrigger>\n <TooltipContent>Additional information</TooltipContent>\n </Tooltip>\n </FieldLabel>\n <Textarea placeholder='Your message...' />\n <FieldDescription>Enter your message.</FieldDescription>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
13118
|
-
},
|
|
13119
|
-
{
|
|
13120
|
-
"name": "Switches",
|
|
13121
|
-
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Notification Settings</FieldLegend>\n <FieldDescription>Manage your notification preferences.</FieldDescription>\n\n <FieldGroup>\n <Field orientation='horizontal'>\n <Switch defaultChecked>\n <SwitchControl />\n <SwitchLabel>Email notifications</SwitchLabel>\n <SwitchDescription>Receive email alerts for important updates.</SwitchDescription>\n </Switch>\n </Field>\n\n <Field orientation='horizontal'>\n <Switch>\n <SwitchControl />\n <SwitchLabel>Push notifications</SwitchLabel>\n <SwitchDescription>Get push notifications on your device.</SwitchDescription>\n </Switch>\n </Field>\n\n <Field orientation='horizontal'>\n <Switch defaultChecked>\n <SwitchControl />\n <SwitchLabel>SMS notifications</SwitchLabel>\n <SwitchDescription>Receive text messages for critical alerts.</SwitchDescription>\n </Switch>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
13122
|
-
},
|
|
13123
|
-
{
|
|
13124
|
-
"name": "Radios",
|
|
13125
|
-
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Delivery Method</FieldLegend>\n <FieldDescription>Choose how you want to receive your order.</FieldDescription>\n\n <Field>\n <RadioGroup defaultValue='standard'>\n <Radio value='standard'>\n <RadioIndicator />\n <RadioLabel>Standard Shipping (5-7 days)</RadioLabel>\n </Radio>\n <Radio value='express'>\n <RadioIndicator />\n <RadioLabel>Express Shipping (2-3 days)</RadioLabel>\n </Radio>\n <Radio value='overnight'>\n <RadioIndicator />\n <RadioLabel>Overnight Shipping (1 day)</RadioLabel>\n </Radio>\n <Radio value='pickup'>\n <RadioIndicator />\n <RadioLabel>In-store Pickup</RadioLabel>\n </Radio>\n </RadioGroup>\n\n <FieldDescription>Shipping costs will be calculated at checkout.</FieldDescription>\n </Field>\n </FieldSet>\n </div>\n)"
|
|
13126
|
-
},
|
|
13127
|
-
{
|
|
13128
|
-
"name": "Checkboxes",
|
|
13129
|
-
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Terms and Preferences</FieldLegend>\n <FieldDescription>Select which terms you agree to.</FieldDescription>\n\n <FieldGroup>\n <Field orientation='horizontal'>\n <Checkbox defaultChecked>\n <CheckboxIndicator />\n <CheckboxLabel>I accept the terms and conditions</CheckboxLabel>\n <CheckboxDescription>You must agree to our terms to continue.</CheckboxDescription>\n </Checkbox>\n </Field>\n <Field orientation='horizontal'>\n <Checkbox>\n <CheckboxIndicator />\n <CheckboxLabel>Subscribe to newsletter</CheckboxLabel>\n <CheckboxDescription>Get weekly updates and exclusive offers.</CheckboxDescription>\n </Checkbox>\n </Field>\n <Field orientation='horizontal'>\n <Checkbox defaultChecked>\n <CheckboxIndicator />\n <CheckboxLabel>Share usage data</CheckboxLabel>\n <CheckboxDescription>Help us improve our services.</CheckboxDescription>\n </Checkbox>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
13130
|
-
},
|
|
13131
|
-
{
|
|
13132
|
-
"name": "NumberInputs",
|
|
13133
|
-
"code": "() => (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Product Details</FieldLegend>\n <FieldDescription>Configure your product quantity and pricing.</FieldDescription>\n\n <FieldGroup>\n <Field>\n <FieldLabel>Quantity</FieldLabel>\n <NumberInput defaultValue='1' min={1} max={100} />\n <FieldDescription>Choose between 1 and 100 items.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Price per unit</FieldLabel>\n <NumberInput\n defaultValue='99.99'\n step={0.01}\n formatOptions={{ style: 'currency', currency: 'USD' }}\n />\n <FieldDescription>Set the price for each unit.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Discount percentage</FieldLabel>\n <NumberInput defaultValue='10' min={0} max={100} formatOptions={{ style: 'percent' }} />\n <FieldDescription>Apply a discount from 0% to 100%.</FieldDescription>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n)"
|
|
13134
|
-
},
|
|
13135
|
-
{
|
|
13136
|
-
"name": "Selects",
|
|
13137
|
-
"code": "() => {\n const countriesCollection = createListCollection({\n items: [\n { value: 'us', label: 'United States' },\n { value: 'uk', label: 'United Kingdom' },\n { value: 'ca', label: 'Canada' },\n { value: 'au', label: 'Australia' },\n { value: 'fr', label: 'France' },\n { value: 'de', label: 'Germany' },\n { value: 'jp', label: 'Japan' },\n ],\n });\n\n const languagesCollection = createListCollection({\n items: [\n { value: 'en', label: 'English' },\n { value: 'es', label: 'Spanish' },\n { value: 'fr', label: 'French' },\n { value: 'de', label: 'German' },\n { value: 'it', label: 'Italian' },\n { value: 'pt', label: 'Portuguese' },\n { value: 'ru', label: 'Russian' },\n { value: 'zh', label: 'Chinese' },\n { value: 'ja', label: 'Japanese' },\n ],\n });\n\n const timezonesCollection = createListCollection({\n items: [\n { value: 'utc-8', label: 'Pacific Time (UTC-8)' },\n { value: 'utc-5', label: 'Eastern Time (UTC-5)' },\n { value: 'utc', label: 'UTC' },\n { value: 'utc+1', label: 'Central European Time (UTC+1)' },\n { value: 'utc+8', label: 'China Standard Time (UTC+8)' },\n { value: 'utc+9', label: 'Japan Standard Time (UTC+9)' },\n ],\n });\n\n return (\n <div className='min-w-320'>\n <FieldSet>\n <FieldLegend>Regional Settings</FieldLegend>\n <FieldDescription>Configure your location and language preferences.</FieldDescription>\n\n <FieldGroup>\n <Field>\n <FieldLabel>Country</FieldLabel>\n <Select collection={countriesCollection}>\n <SelectButton placeholder='Select a country' />\n <SelectPositioner>\n <SelectContent>\n {countriesCollection.items.map(country => (\n <SelectOption key={country.value} item={country}>\n <SelectOptionText>{country.label}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n <FieldDescription>Your country determines available features.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Language</FieldLabel>\n <Select collection={languagesCollection}>\n <SelectButton placeholder='Select a language' />\n <SelectPositioner>\n <SelectContent>\n {languagesCollection.items.map(language => (\n <SelectOption key={language.value} item={language}>\n <SelectOptionText>{language.label}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n <FieldDescription>Choose your preferred language.</FieldDescription>\n </Field>\n <Field>\n <FieldLabel>Timezone</FieldLabel>\n <Select collection={timezonesCollection}>\n <SelectButton placeholder='Select a timezone' />\n <SelectPositioner>\n <SelectContent>\n {timezonesCollection.items.map(timezone => (\n <SelectOption key={timezone.value} item={timezone}>\n <SelectOptionText>{timezone.label}</SelectOptionText>\n </SelectOption>\n ))}\n </SelectContent>\n </SelectPositioner>\n </Select>\n <FieldDescription>All times will be displayed in this timezone.</FieldDescription>\n </Field>\n </FieldGroup>\n </FieldSet>\n </div>\n );\n}"
|
|
13138
|
-
}
|
|
13139
|
-
]
|
|
13140
|
-
},
|
|
13141
|
-
{
|
|
13142
|
-
"name": "FilterInput",
|
|
13143
|
-
"description": "FilterInput - Self-contained filter component.\nHandles autocomplete flow (field → operator → value), chip creation, and expression management.\nSupports multiple conditions joined by AND/OR connectors.\nJust pass `fields` config from backend API and it works.",
|
|
13144
|
-
"importPath": "@wallarm-org/design-system/FilterInput",
|
|
13145
|
-
"props": [
|
|
13146
|
-
{
|
|
13147
|
-
"name": "fields",
|
|
13148
|
-
"type": "FieldMetadata[] | undefined",
|
|
13149
|
-
"required": false,
|
|
13150
|
-
"description": "Available fields from backend API config",
|
|
13151
|
-
"defaultValue": "[]"
|
|
13152
|
-
},
|
|
13153
|
-
{
|
|
13154
|
-
"name": "value",
|
|
13155
|
-
"type": "ExprNode | null | undefined",
|
|
13156
|
-
"required": false,
|
|
13157
|
-
"description": "Current filter expression value (controlled mode)"
|
|
13158
|
-
},
|
|
13159
|
-
{
|
|
13160
|
-
"name": "placeholder",
|
|
13161
|
-
"type": "string | undefined",
|
|
13162
|
-
"required": false,
|
|
13163
|
-
"description": "Placeholder text to display when field is empty",
|
|
13164
|
-
"defaultValue": "Type to filter..."
|
|
13165
|
-
},
|
|
13166
|
-
{
|
|
13167
|
-
"name": "error",
|
|
13168
|
-
"type": "boolean | undefined",
|
|
13169
|
-
"required": false,
|
|
13170
|
-
"description": "Whether the field has a validation error",
|
|
13171
|
-
"defaultValue": "false"
|
|
13172
|
-
},
|
|
13173
|
-
{
|
|
13174
|
-
"name": "showKeyboardHint",
|
|
13175
|
-
"type": "boolean | undefined",
|
|
13176
|
-
"required": false,
|
|
13177
|
-
"description": "Whether to show the keyboard hint (⌘K or Ctrl+K)",
|
|
13178
|
-
"defaultValue": "false"
|
|
13179
|
-
},
|
|
13180
|
-
{
|
|
13181
|
-
"name": "defaultChecked",
|
|
13182
|
-
"type": "boolean | undefined",
|
|
13183
|
-
"required": false
|
|
13184
|
-
},
|
|
13185
|
-
{
|
|
13186
|
-
"name": "defaultValue",
|
|
13187
|
-
"type": "string | number | readonly string[] | undefined",
|
|
13188
|
-
"required": false
|
|
13189
|
-
},
|
|
13190
|
-
{
|
|
13191
|
-
"name": "suppressContentEditableWarning",
|
|
13192
|
-
"type": "boolean | undefined",
|
|
13193
|
-
"required": false
|
|
13194
|
-
},
|
|
13195
|
-
{
|
|
13196
|
-
"name": "suppressHydrationWarning",
|
|
13197
|
-
"type": "boolean | undefined",
|
|
13198
|
-
"required": false
|
|
13199
|
-
},
|
|
13200
|
-
{
|
|
13201
|
-
"name": "accessKey",
|
|
13202
|
-
"type": "string | undefined",
|
|
13203
|
-
"required": false
|
|
13204
|
-
},
|
|
13205
|
-
{
|
|
13206
|
-
"name": "autoCapitalize",
|
|
13207
|
-
"type": "\"off\" | \"none\" | \"on\" | \"sentences\" | \"words\" | \"characters\" | (string & {}) | undefined",
|
|
13208
|
-
"required": false
|
|
13209
|
-
},
|
|
13210
|
-
{
|
|
13211
|
-
"name": "autoFocus",
|
|
13212
|
-
"type": "boolean | undefined",
|
|
13213
|
-
"required": false
|
|
13214
|
-
},
|
|
13215
|
-
{
|
|
13216
|
-
"name": "contentEditable",
|
|
13217
|
-
"type": "Booleanish | \"inherit\" | \"plaintext-only\" | undefined",
|
|
13218
|
-
"required": false
|
|
13219
|
-
},
|
|
13220
|
-
{
|
|
13221
|
-
"name": "contextMenu",
|
|
13222
|
-
"type": "string | undefined",
|
|
13223
|
-
"required": false
|
|
13224
|
-
},
|
|
13225
|
-
{
|
|
13226
|
-
"name": "dir",
|
|
13227
|
-
"type": "string | undefined",
|
|
13228
|
-
"required": false
|
|
13229
|
-
},
|
|
13230
|
-
{
|
|
13231
|
-
"name": "draggable",
|
|
13232
|
-
"type": "Booleanish | undefined",
|
|
13233
|
-
"required": false
|
|
13234
|
-
},
|
|
13235
|
-
{
|
|
13236
|
-
"name": "enterKeyHint",
|
|
13237
|
-
"type": "\"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined",
|
|
13238
|
-
"required": false
|
|
13239
|
-
},
|
|
13240
|
-
{
|
|
13241
|
-
"name": "hidden",
|
|
13242
|
-
"type": "boolean | undefined",
|
|
13243
|
-
"required": false
|
|
13244
|
-
},
|
|
13245
|
-
{
|
|
13246
|
-
"name": "id",
|
|
13247
|
-
"type": "string | undefined",
|
|
13248
|
-
"required": false
|
|
13249
|
-
},
|
|
13250
|
-
{
|
|
13251
|
-
"name": "lang",
|
|
13252
|
-
"type": "string | undefined",
|
|
13253
|
-
"required": false
|
|
13254
|
-
},
|
|
13255
|
-
{
|
|
13256
|
-
"name": "nonce",
|
|
13257
|
-
"type": "string | undefined",
|
|
13258
|
-
"required": false
|
|
13259
|
-
},
|
|
13260
|
-
{
|
|
13261
|
-
"name": "slot",
|
|
13262
|
-
"type": "string | undefined",
|
|
13263
|
-
"required": false
|
|
13264
|
-
},
|
|
13265
|
-
{
|
|
13266
|
-
"name": "spellCheck",
|
|
13267
|
-
"type": "Booleanish | undefined",
|
|
13268
|
-
"required": false
|
|
13269
|
-
},
|
|
13270
|
-
{
|
|
13271
|
-
"name": "tabIndex",
|
|
13272
|
-
"type": "number | undefined",
|
|
13273
|
-
"required": false
|
|
13274
|
-
},
|
|
13275
|
-
{
|
|
13276
|
-
"name": "title",
|
|
13277
|
-
"type": "string | undefined",
|
|
13278
|
-
"required": false
|
|
13279
|
-
},
|
|
13280
|
-
{
|
|
13281
|
-
"name": "translate",
|
|
13282
|
-
"type": "\"yes\" | \"no\" | undefined",
|
|
13283
|
-
"required": false
|
|
13284
|
-
},
|
|
13285
|
-
{
|
|
13286
|
-
"name": "radioGroup",
|
|
13287
|
-
"type": "string | undefined",
|
|
13288
|
-
"required": false
|
|
13289
|
-
},
|
|
13290
|
-
{
|
|
13291
|
-
"name": "role",
|
|
13292
|
-
"type": "AriaRole | undefined",
|
|
13293
|
-
"required": false
|
|
13294
|
-
},
|
|
13295
|
-
{
|
|
13296
|
-
"name": "about",
|
|
13297
|
-
"type": "string | undefined",
|
|
13298
|
-
"required": false
|
|
13299
|
-
},
|
|
13300
|
-
{
|
|
13301
|
-
"name": "content",
|
|
13302
|
-
"type": "string | undefined",
|
|
13303
|
-
"required": false
|
|
13304
|
-
},
|
|
13305
|
-
{
|
|
13306
|
-
"name": "datatype",
|
|
13307
|
-
"type": "string | undefined",
|
|
13308
|
-
"required": false
|
|
13309
|
-
},
|
|
13310
|
-
{
|
|
13311
|
-
"name": "inlist",
|
|
13312
|
-
"type": "any",
|
|
13313
|
-
"required": false
|
|
13314
|
-
},
|
|
13315
|
-
{
|
|
13316
|
-
"name": "prefix",
|
|
13317
|
-
"type": "string | undefined",
|
|
13318
|
-
"required": false
|
|
12992
|
+
"name": "prefix",
|
|
12993
|
+
"type": "string | undefined",
|
|
12994
|
+
"required": false
|
|
13319
12995
|
},
|
|
13320
12996
|
{
|
|
13321
12997
|
"name": "property",
|
|
@@ -13930,11 +13606,499 @@
|
|
|
13930
13606
|
]
|
|
13931
13607
|
}
|
|
13932
13608
|
],
|
|
13933
|
-
"examples": []
|
|
13609
|
+
"examples": []
|
|
13610
|
+
},
|
|
13611
|
+
{
|
|
13612
|
+
"name": "Flex",
|
|
13613
|
+
"importPath": "@wallarm-org/design-system/Flex",
|
|
13614
|
+
"props": [
|
|
13615
|
+
{
|
|
13616
|
+
"name": "defaultChecked",
|
|
13617
|
+
"type": "boolean | undefined",
|
|
13618
|
+
"required": false
|
|
13619
|
+
},
|
|
13620
|
+
{
|
|
13621
|
+
"name": "defaultValue",
|
|
13622
|
+
"type": "string | number | readonly string[] | undefined",
|
|
13623
|
+
"required": false
|
|
13624
|
+
},
|
|
13625
|
+
{
|
|
13626
|
+
"name": "suppressContentEditableWarning",
|
|
13627
|
+
"type": "boolean | undefined",
|
|
13628
|
+
"required": false
|
|
13629
|
+
},
|
|
13630
|
+
{
|
|
13631
|
+
"name": "suppressHydrationWarning",
|
|
13632
|
+
"type": "boolean | undefined",
|
|
13633
|
+
"required": false
|
|
13634
|
+
},
|
|
13635
|
+
{
|
|
13636
|
+
"name": "accessKey",
|
|
13637
|
+
"type": "string | undefined",
|
|
13638
|
+
"required": false
|
|
13639
|
+
},
|
|
13640
|
+
{
|
|
13641
|
+
"name": "autoCapitalize",
|
|
13642
|
+
"type": "\"off\" | \"none\" | \"on\" | \"sentences\" | \"words\" | \"characters\" | (string & {}) | undefined",
|
|
13643
|
+
"required": false
|
|
13644
|
+
},
|
|
13645
|
+
{
|
|
13646
|
+
"name": "autoFocus",
|
|
13647
|
+
"type": "boolean | undefined",
|
|
13648
|
+
"required": false
|
|
13649
|
+
},
|
|
13650
|
+
{
|
|
13651
|
+
"name": "contentEditable",
|
|
13652
|
+
"type": "Booleanish | \"inherit\" | \"plaintext-only\" | undefined",
|
|
13653
|
+
"required": false
|
|
13654
|
+
},
|
|
13655
|
+
{
|
|
13656
|
+
"name": "contextMenu",
|
|
13657
|
+
"type": "string | undefined",
|
|
13658
|
+
"required": false
|
|
13659
|
+
},
|
|
13660
|
+
{
|
|
13661
|
+
"name": "dir",
|
|
13662
|
+
"type": "string | undefined",
|
|
13663
|
+
"required": false
|
|
13664
|
+
},
|
|
13665
|
+
{
|
|
13666
|
+
"name": "draggable",
|
|
13667
|
+
"type": "Booleanish | undefined",
|
|
13668
|
+
"required": false
|
|
13669
|
+
},
|
|
13670
|
+
{
|
|
13671
|
+
"name": "enterKeyHint",
|
|
13672
|
+
"type": "\"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined",
|
|
13673
|
+
"required": false
|
|
13674
|
+
},
|
|
13675
|
+
{
|
|
13676
|
+
"name": "hidden",
|
|
13677
|
+
"type": "boolean | undefined",
|
|
13678
|
+
"required": false
|
|
13679
|
+
},
|
|
13680
|
+
{
|
|
13681
|
+
"name": "id",
|
|
13682
|
+
"type": "string | undefined",
|
|
13683
|
+
"required": false
|
|
13684
|
+
},
|
|
13685
|
+
{
|
|
13686
|
+
"name": "lang",
|
|
13687
|
+
"type": "string | undefined",
|
|
13688
|
+
"required": false
|
|
13689
|
+
},
|
|
13690
|
+
{
|
|
13691
|
+
"name": "nonce",
|
|
13692
|
+
"type": "string | undefined",
|
|
13693
|
+
"required": false
|
|
13694
|
+
},
|
|
13695
|
+
{
|
|
13696
|
+
"name": "slot",
|
|
13697
|
+
"type": "string | undefined",
|
|
13698
|
+
"required": false
|
|
13699
|
+
},
|
|
13700
|
+
{
|
|
13701
|
+
"name": "spellCheck",
|
|
13702
|
+
"type": "Booleanish | undefined",
|
|
13703
|
+
"required": false
|
|
13704
|
+
},
|
|
13705
|
+
{
|
|
13706
|
+
"name": "tabIndex",
|
|
13707
|
+
"type": "number | undefined",
|
|
13708
|
+
"required": false
|
|
13709
|
+
},
|
|
13710
|
+
{
|
|
13711
|
+
"name": "title",
|
|
13712
|
+
"type": "string | undefined",
|
|
13713
|
+
"required": false
|
|
13714
|
+
},
|
|
13715
|
+
{
|
|
13716
|
+
"name": "translate",
|
|
13717
|
+
"type": "\"yes\" | \"no\" | undefined",
|
|
13718
|
+
"required": false
|
|
13719
|
+
},
|
|
13720
|
+
{
|
|
13721
|
+
"name": "radioGroup",
|
|
13722
|
+
"type": "string | undefined",
|
|
13723
|
+
"required": false
|
|
13724
|
+
},
|
|
13725
|
+
{
|
|
13726
|
+
"name": "role",
|
|
13727
|
+
"type": "AriaRole | undefined",
|
|
13728
|
+
"required": false
|
|
13729
|
+
},
|
|
13730
|
+
{
|
|
13731
|
+
"name": "about",
|
|
13732
|
+
"type": "string | undefined",
|
|
13733
|
+
"required": false
|
|
13734
|
+
},
|
|
13735
|
+
{
|
|
13736
|
+
"name": "content",
|
|
13737
|
+
"type": "string | undefined",
|
|
13738
|
+
"required": false
|
|
13739
|
+
},
|
|
13740
|
+
{
|
|
13741
|
+
"name": "datatype",
|
|
13742
|
+
"type": "string | undefined",
|
|
13743
|
+
"required": false
|
|
13744
|
+
},
|
|
13745
|
+
{
|
|
13746
|
+
"name": "inlist",
|
|
13747
|
+
"type": "any",
|
|
13748
|
+
"required": false
|
|
13749
|
+
},
|
|
13750
|
+
{
|
|
13751
|
+
"name": "prefix",
|
|
13752
|
+
"type": "string | undefined",
|
|
13753
|
+
"required": false
|
|
13754
|
+
},
|
|
13755
|
+
{
|
|
13756
|
+
"name": "property",
|
|
13757
|
+
"type": "string | undefined",
|
|
13758
|
+
"required": false
|
|
13759
|
+
},
|
|
13760
|
+
{
|
|
13761
|
+
"name": "rel",
|
|
13762
|
+
"type": "string | undefined",
|
|
13763
|
+
"required": false
|
|
13764
|
+
},
|
|
13765
|
+
{
|
|
13766
|
+
"name": "resource",
|
|
13767
|
+
"type": "string | undefined",
|
|
13768
|
+
"required": false
|
|
13769
|
+
},
|
|
13770
|
+
{
|
|
13771
|
+
"name": "rev",
|
|
13772
|
+
"type": "string | undefined",
|
|
13773
|
+
"required": false
|
|
13774
|
+
},
|
|
13775
|
+
{
|
|
13776
|
+
"name": "typeof",
|
|
13777
|
+
"type": "string | undefined",
|
|
13778
|
+
"required": false
|
|
13779
|
+
},
|
|
13780
|
+
{
|
|
13781
|
+
"name": "vocab",
|
|
13782
|
+
"type": "string | undefined",
|
|
13783
|
+
"required": false
|
|
13784
|
+
},
|
|
13785
|
+
{
|
|
13786
|
+
"name": "autoCorrect",
|
|
13787
|
+
"type": "string | undefined",
|
|
13788
|
+
"required": false
|
|
13789
|
+
},
|
|
13790
|
+
{
|
|
13791
|
+
"name": "autoSave",
|
|
13792
|
+
"type": "string | undefined",
|
|
13793
|
+
"required": false
|
|
13794
|
+
},
|
|
13795
|
+
{
|
|
13796
|
+
"name": "color",
|
|
13797
|
+
"type": "string | undefined",
|
|
13798
|
+
"required": false
|
|
13799
|
+
},
|
|
13800
|
+
{
|
|
13801
|
+
"name": "itemProp",
|
|
13802
|
+
"type": "string | undefined",
|
|
13803
|
+
"required": false
|
|
13804
|
+
},
|
|
13805
|
+
{
|
|
13806
|
+
"name": "itemScope",
|
|
13807
|
+
"type": "boolean | undefined",
|
|
13808
|
+
"required": false
|
|
13809
|
+
},
|
|
13810
|
+
{
|
|
13811
|
+
"name": "itemType",
|
|
13812
|
+
"type": "string | undefined",
|
|
13813
|
+
"required": false
|
|
13814
|
+
},
|
|
13815
|
+
{
|
|
13816
|
+
"name": "itemID",
|
|
13817
|
+
"type": "string | undefined",
|
|
13818
|
+
"required": false
|
|
13819
|
+
},
|
|
13820
|
+
{
|
|
13821
|
+
"name": "itemRef",
|
|
13822
|
+
"type": "string | undefined",
|
|
13823
|
+
"required": false
|
|
13824
|
+
},
|
|
13825
|
+
{
|
|
13826
|
+
"name": "results",
|
|
13827
|
+
"type": "number | undefined",
|
|
13828
|
+
"required": false
|
|
13829
|
+
},
|
|
13830
|
+
{
|
|
13831
|
+
"name": "security",
|
|
13832
|
+
"type": "string | undefined",
|
|
13833
|
+
"required": false
|
|
13834
|
+
},
|
|
13835
|
+
{
|
|
13836
|
+
"name": "unselectable",
|
|
13837
|
+
"type": "\"off\" | \"on\" | undefined",
|
|
13838
|
+
"required": false
|
|
13839
|
+
},
|
|
13840
|
+
{
|
|
13841
|
+
"name": "popover",
|
|
13842
|
+
"type": "\"\" | \"auto\" | \"manual\" | \"hint\" | undefined",
|
|
13843
|
+
"required": false
|
|
13844
|
+
},
|
|
13845
|
+
{
|
|
13846
|
+
"name": "popoverTargetAction",
|
|
13847
|
+
"type": "\"toggle\" | \"show\" | \"hide\" | undefined",
|
|
13848
|
+
"required": false
|
|
13849
|
+
},
|
|
13850
|
+
{
|
|
13851
|
+
"name": "popoverTarget",
|
|
13852
|
+
"type": "string | undefined",
|
|
13853
|
+
"required": false
|
|
13854
|
+
},
|
|
13855
|
+
{
|
|
13856
|
+
"name": "inert",
|
|
13857
|
+
"type": "boolean | undefined",
|
|
13858
|
+
"required": false,
|
|
13859
|
+
"description": "@see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert"
|
|
13860
|
+
},
|
|
13861
|
+
{
|
|
13862
|
+
"name": "inputMode",
|
|
13863
|
+
"type": "\"none\" | \"search\" | \"text\" | \"tel\" | \"url\" | \"email\" | \"numeric\" | \"decimal\" | undefined",
|
|
13864
|
+
"required": false,
|
|
13865
|
+
"description": "Hints at the type of data that might be entered by the user while editing the element or its contents"
|
|
13866
|
+
},
|
|
13867
|
+
{
|
|
13868
|
+
"name": "is",
|
|
13869
|
+
"type": "string | undefined",
|
|
13870
|
+
"required": false,
|
|
13871
|
+
"description": "Specify that a standard HTML element should behave like a defined custom built-in element"
|
|
13872
|
+
},
|
|
13873
|
+
{
|
|
13874
|
+
"name": "exportparts",
|
|
13875
|
+
"type": "string | undefined",
|
|
13876
|
+
"required": false,
|
|
13877
|
+
"description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts}"
|
|
13878
|
+
},
|
|
13879
|
+
{
|
|
13880
|
+
"name": "part",
|
|
13881
|
+
"type": "string | undefined",
|
|
13882
|
+
"required": false,
|
|
13883
|
+
"description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}"
|
|
13884
|
+
},
|
|
13885
|
+
{
|
|
13886
|
+
"name": "inline",
|
|
13887
|
+
"type": "{ true: string; false: string; }",
|
|
13888
|
+
"required": false,
|
|
13889
|
+
"defaultValue": "false"
|
|
13890
|
+
},
|
|
13891
|
+
{
|
|
13892
|
+
"name": "direction",
|
|
13893
|
+
"type": "{ row: string; column: string; 'row-reverse': string; 'column-reverse': string; }",
|
|
13894
|
+
"required": false,
|
|
13895
|
+
"defaultValue": "row"
|
|
13896
|
+
},
|
|
13897
|
+
{
|
|
13898
|
+
"name": "align",
|
|
13899
|
+
"type": "{ start: string; center: string; end: string; stretch: string; baseline: string; }",
|
|
13900
|
+
"required": false,
|
|
13901
|
+
"defaultValue": "stretch"
|
|
13902
|
+
},
|
|
13903
|
+
{
|
|
13904
|
+
"name": "justify",
|
|
13905
|
+
"type": "{ start: string; center: string; end: string; between: string; around: string; evenly: string; }",
|
|
13906
|
+
"required": false,
|
|
13907
|
+
"defaultValue": "start"
|
|
13908
|
+
},
|
|
13909
|
+
{
|
|
13910
|
+
"name": "wrap",
|
|
13911
|
+
"type": "{ wrap: string; nowrap: string; reverse: string; }",
|
|
13912
|
+
"required": false,
|
|
13913
|
+
"defaultValue": "nowrap"
|
|
13914
|
+
},
|
|
13915
|
+
{
|
|
13916
|
+
"name": "gap",
|
|
13917
|
+
"type": "complex",
|
|
13918
|
+
"required": false
|
|
13919
|
+
},
|
|
13920
|
+
{
|
|
13921
|
+
"name": "grow",
|
|
13922
|
+
"type": "{ true: string; false: string; }",
|
|
13923
|
+
"required": false
|
|
13924
|
+
},
|
|
13925
|
+
{
|
|
13926
|
+
"name": "shrink",
|
|
13927
|
+
"type": "{ true: string; false: string; }",
|
|
13928
|
+
"required": false
|
|
13929
|
+
},
|
|
13930
|
+
{
|
|
13931
|
+
"name": "fullWidth",
|
|
13932
|
+
"type": "{ true: string; }",
|
|
13933
|
+
"required": false
|
|
13934
|
+
},
|
|
13935
|
+
{
|
|
13936
|
+
"name": "basis",
|
|
13937
|
+
"type": "complex",
|
|
13938
|
+
"required": false
|
|
13939
|
+
},
|
|
13940
|
+
{
|
|
13941
|
+
"name": "asChild",
|
|
13942
|
+
"type": "boolean | undefined",
|
|
13943
|
+
"required": false,
|
|
13944
|
+
"defaultValue": "false"
|
|
13945
|
+
}
|
|
13946
|
+
],
|
|
13947
|
+
"variants": [
|
|
13948
|
+
{
|
|
13949
|
+
"name": "inline",
|
|
13950
|
+
"options": [
|
|
13951
|
+
"true",
|
|
13952
|
+
"false"
|
|
13953
|
+
]
|
|
13954
|
+
},
|
|
13955
|
+
{
|
|
13956
|
+
"name": "direction",
|
|
13957
|
+
"options": [
|
|
13958
|
+
"row",
|
|
13959
|
+
"column",
|
|
13960
|
+
"row-reverse",
|
|
13961
|
+
"column-reverse"
|
|
13962
|
+
]
|
|
13963
|
+
},
|
|
13964
|
+
{
|
|
13965
|
+
"name": "align",
|
|
13966
|
+
"options": [
|
|
13967
|
+
"start",
|
|
13968
|
+
"center",
|
|
13969
|
+
"end",
|
|
13970
|
+
"stretch",
|
|
13971
|
+
"baseline"
|
|
13972
|
+
]
|
|
13973
|
+
},
|
|
13974
|
+
{
|
|
13975
|
+
"name": "justify",
|
|
13976
|
+
"options": [
|
|
13977
|
+
"start",
|
|
13978
|
+
"center",
|
|
13979
|
+
"end",
|
|
13980
|
+
"between",
|
|
13981
|
+
"around",
|
|
13982
|
+
"evenly"
|
|
13983
|
+
]
|
|
13984
|
+
},
|
|
13985
|
+
{
|
|
13986
|
+
"name": "wrap",
|
|
13987
|
+
"options": [
|
|
13988
|
+
"wrap",
|
|
13989
|
+
"nowrap",
|
|
13990
|
+
"reverse"
|
|
13991
|
+
]
|
|
13992
|
+
},
|
|
13993
|
+
{
|
|
13994
|
+
"name": "gap",
|
|
13995
|
+
"options": [
|
|
13996
|
+
"1",
|
|
13997
|
+
"2",
|
|
13998
|
+
"4",
|
|
13999
|
+
"6",
|
|
14000
|
+
"8",
|
|
14001
|
+
"12",
|
|
14002
|
+
"16",
|
|
14003
|
+
"20",
|
|
14004
|
+
"24",
|
|
14005
|
+
"28",
|
|
14006
|
+
"32",
|
|
14007
|
+
"36",
|
|
14008
|
+
"40",
|
|
14009
|
+
"44",
|
|
14010
|
+
"48",
|
|
14011
|
+
"56",
|
|
14012
|
+
"64",
|
|
14013
|
+
"80",
|
|
14014
|
+
"96",
|
|
14015
|
+
"112",
|
|
14016
|
+
"128",
|
|
14017
|
+
"144"
|
|
14018
|
+
]
|
|
14019
|
+
},
|
|
14020
|
+
{
|
|
14021
|
+
"name": "grow",
|
|
14022
|
+
"options": [
|
|
14023
|
+
"true",
|
|
14024
|
+
"false"
|
|
14025
|
+
]
|
|
14026
|
+
},
|
|
14027
|
+
{
|
|
14028
|
+
"name": "shrink",
|
|
14029
|
+
"options": [
|
|
14030
|
+
"true",
|
|
14031
|
+
"false"
|
|
14032
|
+
]
|
|
14033
|
+
},
|
|
14034
|
+
{
|
|
14035
|
+
"name": "fullWidth",
|
|
14036
|
+
"options": [
|
|
14037
|
+
"true"
|
|
14038
|
+
]
|
|
14039
|
+
},
|
|
14040
|
+
{
|
|
14041
|
+
"name": "basis",
|
|
14042
|
+
"options": [
|
|
14043
|
+
"auto",
|
|
14044
|
+
"full",
|
|
14045
|
+
"1/2",
|
|
14046
|
+
"1/3",
|
|
14047
|
+
"2/3",
|
|
14048
|
+
"1/4",
|
|
14049
|
+
"2/4",
|
|
14050
|
+
"3/4",
|
|
14051
|
+
"1/5",
|
|
14052
|
+
"2/5",
|
|
14053
|
+
"3/5",
|
|
14054
|
+
"4/5",
|
|
14055
|
+
"1/6",
|
|
14056
|
+
"2/6",
|
|
14057
|
+
"3/6",
|
|
14058
|
+
"4/6",
|
|
14059
|
+
"5/6",
|
|
14060
|
+
"1/12",
|
|
14061
|
+
"2/12",
|
|
14062
|
+
"3/12",
|
|
14063
|
+
"4/12",
|
|
14064
|
+
"5/12",
|
|
14065
|
+
"6/12",
|
|
14066
|
+
"7/12",
|
|
14067
|
+
"8/12",
|
|
14068
|
+
"9/12",
|
|
14069
|
+
"10/12",
|
|
14070
|
+
"11/12",
|
|
14071
|
+
"0"
|
|
14072
|
+
]
|
|
14073
|
+
}
|
|
14074
|
+
],
|
|
14075
|
+
"subComponents": [],
|
|
14076
|
+
"examples": [
|
|
14077
|
+
{
|
|
14078
|
+
"name": "Basic",
|
|
14079
|
+
"code": "({ ...args }) => (\n <Flex {...args} gap={4}>\n <Box>A</Box>\n <Box>B</Box>\n <Box>C</Box>\n </Flex>\n)"
|
|
14080
|
+
},
|
|
14081
|
+
{
|
|
14082
|
+
"name": "Direction",
|
|
14083
|
+
"code": "({ ...args }) => (\n <Flex direction='column' gap={8}>\n <VStack>\n <Heading>Row (default)</Heading>\n <Flex {...args} direction='row' gap={2}>\n <Box className='h-32 py-2 px-4 text-sm'>1</Box>\n <Box className='h-32 py-2 px-4 text-sm'>2</Box>\n <Box className='h-32 py-2 px-4 text-sm'>3</Box>\n </Flex>\n </VStack>\n\n <VStack>\n <Heading>Column</Heading>\n <Flex {...args} direction='column' gap={2}>\n <Box className='h-32 py-2 px-4 text-sm'>1</Box>\n <Box className='h-32 py-2 px-4 text-sm'>2</Box>\n <Box className='h-32 py-2 px-4 text-sm'>3</Box>\n </Flex>\n </VStack>\n\n <VStack>\n <Heading>Row Reverse</Heading>\n <Flex {...args} direction='row-reverse' gap={2}>\n <Box className='h-32 py-2 px-4 text-sm'>1</Box>\n <Box className='h-32 py-2 px-4 text-sm'>2</Box>\n <Box className='h-32 py-2 px-4 text-sm'>3</Box>\n </Flex>\n </VStack>\n </Flex>\n)"
|
|
14084
|
+
},
|
|
14085
|
+
{
|
|
14086
|
+
"name": "Alignment",
|
|
14087
|
+
"code": "({ ...args }) => (\n <Flex direction='column' gap={8}>\n <VStack>\n <Heading>Justify Start (default)</Heading>\n <Flex {...args} justify='start' fullWidth>\n <Box className='h-16 w-16 text-xs'>A</Box>\n <Box className='h-16 w-16 text-xs'>B</Box>\n </Flex>\n </VStack>\n\n <VStack>\n <Heading>Justify Center</Heading>\n <Flex {...args} justify='center' fullWidth>\n <Box className='h-16 w-16 text-xs'>A</Box>\n <Box className='h-16 w-16 text-xs'>B</Box>\n </Flex>\n </VStack>\n\n <VStack>\n <Heading>Justify Between</Heading>\n <Flex {...args} justify='between' fullWidth>\n <Box className='h-16 w-16 text-xs'>A</Box>\n <Box className='h-16 w-16 text-xs'>B</Box>\n </Flex>\n </VStack>\n </Flex>\n)"
|
|
14088
|
+
},
|
|
14089
|
+
{
|
|
14090
|
+
"name": "Wrap",
|
|
14091
|
+
"code": "({ ...args }) => (\n <VStack>\n <Heading>Wrap enabled (container: 24rem)</Heading>\n <Flex {...args} wrap='wrap' gap={2} fullWidth>\n {new Array(40).fill(null).map((_, index) => {\n const key = `${index + 1}`;\n\n return (\n <Box className='h-20 w-20 text-xs' key={key}>\n {key}\n </Box>\n );\n })}\n </Flex>\n </VStack>\n)"
|
|
14092
|
+
},
|
|
14093
|
+
{
|
|
14094
|
+
"name": "GrowShrink",
|
|
14095
|
+
"code": "({ ...args }) => (\n <Flex direction='column' gap={8}>\n <VStack>\n <Heading>Grow: items expand to fill space</Heading>\n <Flex {...args} fullWidth>\n <Box className='h-16 flex-1 text-xs'>Flex-1</Box>\n <Box className='h-16 flex-1 text-xs'>Flex-1</Box>\n <Box className='h-16 text-xs'>Fixed</Box>\n </Flex>\n </VStack>\n\n <VStack>\n <Heading>Shrink: items shrink when needed</Heading>\n <Flex {...args} fullWidth>\n <Box className='h-16 flex-shrink text-xs'>Shrinkable long content</Box>\n <Box className='h-16 flex-shrink-0 text-xs'>No shrink</Box>\n </Flex>\n </VStack>\n </Flex>\n)"
|
|
14096
|
+
}
|
|
14097
|
+
]
|
|
13934
14098
|
},
|
|
13935
14099
|
{
|
|
13936
|
-
"name": "
|
|
13937
|
-
"importPath": "@wallarm-org/design-system/
|
|
14100
|
+
"name": "FormatDateTime",
|
|
14101
|
+
"importPath": "@wallarm-org/design-system/FormatDateTime",
|
|
13938
14102
|
"props": [
|
|
13939
14103
|
{
|
|
13940
14104
|
"name": "defaultChecked",
|
|
@@ -14207,216 +14371,52 @@
|
|
|
14207
14371
|
"description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}"
|
|
14208
14372
|
},
|
|
14209
14373
|
{
|
|
14210
|
-
"name": "
|
|
14211
|
-
"type": "
|
|
14212
|
-
"required":
|
|
14213
|
-
"
|
|
14214
|
-
},
|
|
14215
|
-
{
|
|
14216
|
-
"name": "direction",
|
|
14217
|
-
"type": "{ row: string; column: string; 'row-reverse': string; 'column-reverse': string; }",
|
|
14218
|
-
"required": false,
|
|
14219
|
-
"defaultValue": "row"
|
|
14220
|
-
},
|
|
14221
|
-
{
|
|
14222
|
-
"name": "align",
|
|
14223
|
-
"type": "{ start: string; center: string; end: string; stretch: string; baseline: string; }",
|
|
14224
|
-
"required": false,
|
|
14225
|
-
"defaultValue": "stretch"
|
|
14226
|
-
},
|
|
14227
|
-
{
|
|
14228
|
-
"name": "justify",
|
|
14229
|
-
"type": "{ start: string; center: string; end: string; between: string; around: string; evenly: string; }",
|
|
14230
|
-
"required": false,
|
|
14231
|
-
"defaultValue": "start"
|
|
14374
|
+
"name": "value",
|
|
14375
|
+
"type": "string | number | Date | null | undefined",
|
|
14376
|
+
"required": true,
|
|
14377
|
+
"description": "ISO string, Date object, or Unix timestamp (ms)"
|
|
14232
14378
|
},
|
|
14233
14379
|
{
|
|
14234
|
-
"name": "
|
|
14235
|
-
"type": "
|
|
14380
|
+
"name": "format",
|
|
14381
|
+
"type": "FormatDateTimeFormat | undefined",
|
|
14236
14382
|
"required": false,
|
|
14237
|
-
"
|
|
14238
|
-
|
|
14239
|
-
{
|
|
14240
|
-
"name": "gap",
|
|
14241
|
-
"type": "complex",
|
|
14242
|
-
"required": false
|
|
14243
|
-
},
|
|
14244
|
-
{
|
|
14245
|
-
"name": "grow",
|
|
14246
|
-
"type": "{ true: string; false: string; }",
|
|
14247
|
-
"required": false
|
|
14248
|
-
},
|
|
14249
|
-
{
|
|
14250
|
-
"name": "shrink",
|
|
14251
|
-
"type": "{ true: string; false: string; }",
|
|
14252
|
-
"required": false
|
|
14253
|
-
},
|
|
14254
|
-
{
|
|
14255
|
-
"name": "fullWidth",
|
|
14256
|
-
"type": "{ true: string; }",
|
|
14257
|
-
"required": false
|
|
14258
|
-
},
|
|
14259
|
-
{
|
|
14260
|
-
"name": "basis",
|
|
14261
|
-
"type": "complex",
|
|
14262
|
-
"required": false
|
|
14383
|
+
"description": "Display format. Default: 'relative'",
|
|
14384
|
+
"defaultValue": "relative"
|
|
14263
14385
|
},
|
|
14264
14386
|
{
|
|
14265
|
-
"name": "
|
|
14387
|
+
"name": "showSeconds",
|
|
14266
14388
|
"type": "boolean | undefined",
|
|
14267
14389
|
"required": false,
|
|
14268
|
-
"
|
|
14269
|
-
|
|
14270
|
-
],
|
|
14271
|
-
"variants": [
|
|
14272
|
-
{
|
|
14273
|
-
"name": "inline",
|
|
14274
|
-
"options": [
|
|
14275
|
-
"true",
|
|
14276
|
-
"false"
|
|
14277
|
-
]
|
|
14278
|
-
},
|
|
14279
|
-
{
|
|
14280
|
-
"name": "direction",
|
|
14281
|
-
"options": [
|
|
14282
|
-
"row",
|
|
14283
|
-
"column",
|
|
14284
|
-
"row-reverse",
|
|
14285
|
-
"column-reverse"
|
|
14286
|
-
]
|
|
14287
|
-
},
|
|
14288
|
-
{
|
|
14289
|
-
"name": "align",
|
|
14290
|
-
"options": [
|
|
14291
|
-
"start",
|
|
14292
|
-
"center",
|
|
14293
|
-
"end",
|
|
14294
|
-
"stretch",
|
|
14295
|
-
"baseline"
|
|
14296
|
-
]
|
|
14297
|
-
},
|
|
14298
|
-
{
|
|
14299
|
-
"name": "justify",
|
|
14300
|
-
"options": [
|
|
14301
|
-
"start",
|
|
14302
|
-
"center",
|
|
14303
|
-
"end",
|
|
14304
|
-
"between",
|
|
14305
|
-
"around",
|
|
14306
|
-
"evenly"
|
|
14307
|
-
]
|
|
14308
|
-
},
|
|
14309
|
-
{
|
|
14310
|
-
"name": "wrap",
|
|
14311
|
-
"options": [
|
|
14312
|
-
"wrap",
|
|
14313
|
-
"nowrap",
|
|
14314
|
-
"reverse"
|
|
14315
|
-
]
|
|
14316
|
-
},
|
|
14317
|
-
{
|
|
14318
|
-
"name": "gap",
|
|
14319
|
-
"options": [
|
|
14320
|
-
"1",
|
|
14321
|
-
"2",
|
|
14322
|
-
"4",
|
|
14323
|
-
"6",
|
|
14324
|
-
"8",
|
|
14325
|
-
"12",
|
|
14326
|
-
"16",
|
|
14327
|
-
"20",
|
|
14328
|
-
"24",
|
|
14329
|
-
"28",
|
|
14330
|
-
"32",
|
|
14331
|
-
"36",
|
|
14332
|
-
"40",
|
|
14333
|
-
"44",
|
|
14334
|
-
"48",
|
|
14335
|
-
"56",
|
|
14336
|
-
"64",
|
|
14337
|
-
"80",
|
|
14338
|
-
"96",
|
|
14339
|
-
"112",
|
|
14340
|
-
"128",
|
|
14341
|
-
"144"
|
|
14342
|
-
]
|
|
14343
|
-
},
|
|
14344
|
-
{
|
|
14345
|
-
"name": "grow",
|
|
14346
|
-
"options": [
|
|
14347
|
-
"true",
|
|
14348
|
-
"false"
|
|
14349
|
-
]
|
|
14350
|
-
},
|
|
14351
|
-
{
|
|
14352
|
-
"name": "shrink",
|
|
14353
|
-
"options": [
|
|
14354
|
-
"true",
|
|
14355
|
-
"false"
|
|
14356
|
-
]
|
|
14357
|
-
},
|
|
14358
|
-
{
|
|
14359
|
-
"name": "fullWidth",
|
|
14360
|
-
"options": [
|
|
14361
|
-
"true"
|
|
14362
|
-
]
|
|
14363
|
-
},
|
|
14364
|
-
{
|
|
14365
|
-
"name": "basis",
|
|
14366
|
-
"options": [
|
|
14367
|
-
"auto",
|
|
14368
|
-
"full",
|
|
14369
|
-
"1/2",
|
|
14370
|
-
"1/3",
|
|
14371
|
-
"2/3",
|
|
14372
|
-
"1/4",
|
|
14373
|
-
"2/4",
|
|
14374
|
-
"3/4",
|
|
14375
|
-
"1/5",
|
|
14376
|
-
"2/5",
|
|
14377
|
-
"3/5",
|
|
14378
|
-
"4/5",
|
|
14379
|
-
"1/6",
|
|
14380
|
-
"2/6",
|
|
14381
|
-
"3/6",
|
|
14382
|
-
"4/6",
|
|
14383
|
-
"5/6",
|
|
14384
|
-
"1/12",
|
|
14385
|
-
"2/12",
|
|
14386
|
-
"3/12",
|
|
14387
|
-
"4/12",
|
|
14388
|
-
"5/12",
|
|
14389
|
-
"6/12",
|
|
14390
|
-
"7/12",
|
|
14391
|
-
"8/12",
|
|
14392
|
-
"9/12",
|
|
14393
|
-
"10/12",
|
|
14394
|
-
"11/12",
|
|
14395
|
-
"0"
|
|
14396
|
-
]
|
|
14390
|
+
"description": "Show seconds in tooltip absolute time. Default: true",
|
|
14391
|
+
"defaultValue": "true"
|
|
14397
14392
|
}
|
|
14398
14393
|
],
|
|
14394
|
+
"variants": [],
|
|
14399
14395
|
"subComponents": [],
|
|
14400
14396
|
"examples": [
|
|
14401
14397
|
{
|
|
14402
|
-
"name": "
|
|
14403
|
-
"code": "({
|
|
14398
|
+
"name": "Relative",
|
|
14399
|
+
"code": "() => (\n <VStack gap={12} align='start'>\n <HStack gap={16} align='center'>\n <Text size='sm' color='secondary' className='w-128'>\n Just now\n </Text>\n <FormatDateTime value={subSeconds(now, 10)} format='relative' />\n </HStack>\n <HStack gap={16} align='center'>\n <Text size='sm' color='secondary' className='w-128'>\n Minutes ago\n </Text>\n <FormatDateTime value={subMinutes(now, 12)} format='relative' />\n </HStack>\n <HStack gap={16} align='center'>\n <Text size='sm' color='secondary' className='w-128'>\n Hours ago\n </Text>\n <FormatDateTime value={subHours(now, 3)} format='relative' />\n </HStack>\n <HStack gap={16} align='center'>\n <Text size='sm' color='secondary' className='w-128'>\n Yesterday\n </Text>\n <FormatDateTime value={subHours(now, 30)} format='relative' />\n </HStack>\n <HStack gap={16} align='center'>\n <Text size='sm' color='secondary' className='w-128'>\n Days ago\n </Text>\n <FormatDateTime value={subDays(now, 5)} format='relative' />\n </HStack>\n <HStack gap={16} align='center'>\n <Text size='sm' color='secondary' className='w-128'>\n Weeks ago\n </Text>\n <FormatDateTime value={subDays(now, 21)} format='relative' />\n </HStack>\n <HStack gap={16} align='center'>\n <Text size='sm' color='secondary' className='w-128'>\n Months ago\n </Text>\n <FormatDateTime value={subMonths(now, 3)} format='relative' />\n </HStack>\n <HStack gap={16} align='center'>\n <Text size='sm' color='secondary' className='w-128'>\n Short date\n </Text>\n <FormatDateTime value={subDays(now, 200)} format='relative' />\n </HStack>\n <HStack gap={16} align='center'>\n <Text size='sm' color='secondary' className='w-128'>\n Full date\n </Text>\n <FormatDateTime value={subYears(now, 2)} format='relative' />\n </HStack>\n </VStack>\n)"
|
|
14404
14400
|
},
|
|
14405
14401
|
{
|
|
14406
|
-
"name": "
|
|
14407
|
-
"code": "(
|
|
14402
|
+
"name": "DateFormat",
|
|
14403
|
+
"code": "() => (\n <VStack gap={12} align='start'>\n <FormatDateTime value='2026-01-01T00:00:00' format='date' />\n <FormatDateTime value='2026-02-11T14:32:07' format='date' />\n <FormatDateTime value='2025-06-15T09:00:00' format='date' />\n </VStack>\n)"
|
|
14408
14404
|
},
|
|
14409
14405
|
{
|
|
14410
|
-
"name": "
|
|
14411
|
-
"code": "(
|
|
14406
|
+
"name": "DatetimeFormat",
|
|
14407
|
+
"code": "() => (\n <VStack gap={12} align='start'>\n <FormatDateTime value='2026-01-01T11:00:00' format='datetime' />\n <FormatDateTime value='2026-02-11T14:32:07' format='datetime' />\n <FormatDateTime value='2025-12-25T23:59:59' format='datetime' />\n </VStack>\n)"
|
|
14412
14408
|
},
|
|
14413
14409
|
{
|
|
14414
|
-
"name": "
|
|
14415
|
-
"code": "(
|
|
14410
|
+
"name": "WithDescription",
|
|
14411
|
+
"code": "() => (\n <VStack gap={12} align='start'>\n <VStack gap={2}>\n <FormatDateTime value='2026-01-01T00:00:00' format='date' />\n <Text size='sm' color='secondary'>\n Created by admin\n </Text>\n </VStack>\n <VStack gap={2}>\n <FormatDateTime value='2026-02-11T14:32:07' format='date' />\n <Text size='sm' color='secondary'>\n Last modified\n </Text>\n </VStack>\n </VStack>\n)"
|
|
14416
14412
|
},
|
|
14417
14413
|
{
|
|
14418
|
-
"name": "
|
|
14419
|
-
"code": "(
|
|
14414
|
+
"name": "NullValue",
|
|
14415
|
+
"code": "() => (\n <VStack gap={12} align='start'>\n <FormatDateTime value={null} />\n <FormatDateTime value={undefined} />\n </VStack>\n)"
|
|
14416
|
+
},
|
|
14417
|
+
{
|
|
14418
|
+
"name": "FutureDate",
|
|
14419
|
+
"code": "() => (\n <FormatDateTime value={new Date(Date.now() + 5 * 60 * 1000)} format='relative' />\n)"
|
|
14420
14420
|
}
|
|
14421
14421
|
]
|
|
14422
14422
|
},
|