@wallarm-org/design-system 0.44.1 → 0.45.0-rc-feature-WDS-121-progress.1
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/Progress/Progress.d.ts +12 -0
- package/dist/components/Progress/Progress.js +46 -0
- package/dist/components/Progress/classes.d.ts +8 -0
- package/dist/components/Progress/classes.js +51 -0
- package/dist/components/Progress/constants.d.ts +23 -0
- package/dist/components/Progress/constants.js +24 -0
- package/dist/components/Progress/index.d.ts +4 -0
- package/dist/components/Progress/index.js +4 -0
- package/dist/components/Progress/types.d.ts +3 -0
- package/dist/components/Progress/types.js +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/metadata/components.json +338 -2
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FC, HTMLAttributes, Ref } from 'react';
|
|
2
|
+
import type { TestableProps } from '../../utils/testId';
|
|
3
|
+
import type { ProgressColor, ProgressSize } from './types';
|
|
4
|
+
export interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>, TestableProps {
|
|
5
|
+
value?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
size?: ProgressSize;
|
|
8
|
+
color?: ProgressColor;
|
|
9
|
+
showLabel?: boolean;
|
|
10
|
+
ref?: Ref<HTMLDivElement>;
|
|
11
|
+
}
|
|
12
|
+
export declare const Progress: FC<ProgressProps>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { progressIndicatorVariants, progressTrackVariants } from "./classes.js";
|
|
4
|
+
const Progress = ({ value = 0, max = 100, size = 'md', color = 'w-orange', showLabel = false, className, 'data-testid': testId, ref, ...props })=>{
|
|
5
|
+
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
6
|
+
const roundedPercentage = Math.round(percentage);
|
|
7
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
8
|
+
...props,
|
|
9
|
+
ref: ref,
|
|
10
|
+
"data-slot": "progress",
|
|
11
|
+
"data-testid": testId,
|
|
12
|
+
role: "progressbar",
|
|
13
|
+
"aria-valuenow": value,
|
|
14
|
+
"aria-valuemin": 0,
|
|
15
|
+
"aria-valuemax": max,
|
|
16
|
+
className: cn('flex flex-1 items-center gap-8 min-w-118 w-full', className),
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ jsx("div", {
|
|
19
|
+
"data-slot": "progress-track",
|
|
20
|
+
className: progressTrackVariants({
|
|
21
|
+
size
|
|
22
|
+
}),
|
|
23
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
24
|
+
"data-slot": "progress-indicator",
|
|
25
|
+
className: progressIndicatorVariants({
|
|
26
|
+
size,
|
|
27
|
+
color
|
|
28
|
+
}),
|
|
29
|
+
style: {
|
|
30
|
+
width: `${percentage}%`
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
showLabel && /*#__PURE__*/ jsxs("span", {
|
|
35
|
+
"data-slot": "progress-label",
|
|
36
|
+
className: "text-text-secondary font-sans-display text-xs font-medium tabular-nums",
|
|
37
|
+
children: [
|
|
38
|
+
roundedPercentage,
|
|
39
|
+
"%"
|
|
40
|
+
]
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Progress.displayName = 'Progress';
|
|
46
|
+
export { Progress };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProgressColor } from './types';
|
|
2
|
+
export declare const progressTrackVariants: (props?: ({
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const progressIndicatorVariants: (props?: ({
|
|
6
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
7
|
+
color?: ProgressColor | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
const progressColorMap = {
|
|
3
|
+
slate: 'bg-badge-slate-strong',
|
|
4
|
+
red: 'bg-badge-red-strong',
|
|
5
|
+
'w-orange': 'bg-badge-w-orange-strong',
|
|
6
|
+
amber: 'bg-badge-amber-strong',
|
|
7
|
+
yellow: 'bg-badge-yellow-strong',
|
|
8
|
+
lime: 'bg-badge-lime-strong',
|
|
9
|
+
green: 'bg-badge-green-strong',
|
|
10
|
+
emerald: 'bg-badge-emerald-strong',
|
|
11
|
+
teal: 'bg-badge-teal-strong',
|
|
12
|
+
cyan: 'bg-badge-cyan-strong',
|
|
13
|
+
sky: 'bg-badge-sky-strong',
|
|
14
|
+
blue: 'bg-badge-blue-strong',
|
|
15
|
+
indigo: 'bg-badge-indigo-strong',
|
|
16
|
+
violet: 'bg-badge-violet-strong',
|
|
17
|
+
fuchsia: 'bg-badge-fuchsia-strong',
|
|
18
|
+
pink: 'bg-badge-pink-strong',
|
|
19
|
+
rose: 'bg-badge-rose-strong',
|
|
20
|
+
gray: 'bg-badge-gray-strong',
|
|
21
|
+
zinc: 'bg-badge-zinc-strong',
|
|
22
|
+
neutral: 'bg-badge-neutral-strong',
|
|
23
|
+
stone: 'bg-badge-stone-strong'
|
|
24
|
+
};
|
|
25
|
+
const progressTrackVariants = cva('relative w-full overflow-hidden bg-bg-strong-primary', {
|
|
26
|
+
variants: {
|
|
27
|
+
size: {
|
|
28
|
+
sm: 'h-4 rounded-2',
|
|
29
|
+
md: 'h-8 rounded-4',
|
|
30
|
+
lg: 'h-12 rounded-6'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
size: 'md'
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const progressIndicatorVariants = cva('h-full transition-all duration-300 ease-out', {
|
|
38
|
+
variants: {
|
|
39
|
+
size: {
|
|
40
|
+
sm: 'rounded-2',
|
|
41
|
+
md: 'rounded-4',
|
|
42
|
+
lg: 'rounded-6'
|
|
43
|
+
},
|
|
44
|
+
color: progressColorMap
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
size: 'md',
|
|
48
|
+
color: 'blue'
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export { progressIndicatorVariants, progressTrackVariants };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const ProgressColorEnum: {
|
|
2
|
+
readonly Slate: "slate";
|
|
3
|
+
readonly Red: "red";
|
|
4
|
+
readonly WOrange: "w-orange";
|
|
5
|
+
readonly Amber: "amber";
|
|
6
|
+
readonly Yellow: "yellow";
|
|
7
|
+
readonly Lime: "lime";
|
|
8
|
+
readonly Green: "green";
|
|
9
|
+
readonly Emerald: "emerald";
|
|
10
|
+
readonly Teal: "teal";
|
|
11
|
+
readonly Cyan: "cyan";
|
|
12
|
+
readonly Sky: "sky";
|
|
13
|
+
readonly Blue: "blue";
|
|
14
|
+
readonly Indigo: "indigo";
|
|
15
|
+
readonly Violet: "violet";
|
|
16
|
+
readonly Fuchsia: "fuchsia";
|
|
17
|
+
readonly Pink: "pink";
|
|
18
|
+
readonly Rose: "rose";
|
|
19
|
+
readonly Gray: "gray";
|
|
20
|
+
readonly Zinc: "zinc";
|
|
21
|
+
readonly Neutral: "neutral";
|
|
22
|
+
readonly Stone: "stone";
|
|
23
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const ProgressColorEnum = {
|
|
2
|
+
Slate: 'slate',
|
|
3
|
+
Red: 'red',
|
|
4
|
+
WOrange: 'w-orange',
|
|
5
|
+
Amber: 'amber',
|
|
6
|
+
Yellow: 'yellow',
|
|
7
|
+
Lime: 'lime',
|
|
8
|
+
Green: 'green',
|
|
9
|
+
Emerald: 'emerald',
|
|
10
|
+
Teal: 'teal',
|
|
11
|
+
Cyan: 'cyan',
|
|
12
|
+
Sky: 'sky',
|
|
13
|
+
Blue: 'blue',
|
|
14
|
+
Indigo: 'indigo',
|
|
15
|
+
Violet: 'violet',
|
|
16
|
+
Fuchsia: 'fuchsia',
|
|
17
|
+
Pink: 'pink',
|
|
18
|
+
Rose: 'rose',
|
|
19
|
+
Gray: 'gray',
|
|
20
|
+
Zinc: 'zinc',
|
|
21
|
+
Neutral: 'neutral',
|
|
22
|
+
Stone: 'stone'
|
|
23
|
+
};
|
|
24
|
+
export { ProgressColorEnum };
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export { OverflowTooltip, OverflowTooltipContent, type OverflowTooltipContentPro
|
|
|
47
47
|
export { type CopyFormatData, formatAsFilter, ParameterPath, type ParameterPathProps, } from './components/ParameterPath';
|
|
48
48
|
export { Popover, PopoverContent, PopoverTrigger } from './components/Popover';
|
|
49
49
|
export { type BreadcrumbSegment, findDrillNode, findFirstLinkPath, type MatchNavResult, matchNav, type NavConfig, type NavConfigDrill, type NavConfigGroup, type NavConfigLink, type NavConfigNode, type NavStackEntry, ProductNav, ProductNavBreadcrumbs, type ProductNavContextValue, ProductNavPanel, type ProductNavProps, type UseProductNavResult, useProductNav, useProductNavContext, } from './components/ProductNav';
|
|
50
|
+
export { Progress, type ProgressColor, type ProgressProps, } from './components/Progress';
|
|
50
51
|
export { Radio, RadioDescription, type RadioDescriptionProps, RadioGroup, type RadioGroupProps, RadioIndicator, RadioLabel, type RadioLabelProps, type RadioProps, } from './components/Radio';
|
|
51
52
|
export { RemoteShell, RemoteShellBreadcrumb, type RemoteShellBreadcrumbProps, RemoteShellContent, type RemoteShellContentProps, RemoteShellPanel, type RemoteShellPanelProps, type RemoteShellProps, } from './components/RemoteShell';
|
|
52
53
|
export { getResponseCodeCategory, RESPONSE_CODE_COLOR, ResponseCode, type ResponseCodeCategory, type ResponseCodeProps, } from './components/ResponseCode';
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ import { OverflowTooltip, OverflowTooltipContent } from "./components/OverflowTo
|
|
|
36
36
|
import { ParameterPath, formatAsFilter } from "./components/ParameterPath/index.js";
|
|
37
37
|
import { Popover, PopoverContent, PopoverTrigger } from "./components/Popover/index.js";
|
|
38
38
|
import { ProductNav, ProductNavBreadcrumbs, ProductNavPanel, findDrillNode, findFirstLinkPath, matchNav, useProductNav, useProductNavContext } from "./components/ProductNav/index.js";
|
|
39
|
+
import { Progress } from "./components/Progress/index.js";
|
|
39
40
|
import { Radio, RadioDescription, RadioGroup, RadioIndicator, RadioLabel } from "./components/Radio/index.js";
|
|
40
41
|
import { RemoteShell, RemoteShellBreadcrumb, RemoteShellContent, RemoteShellPanel } from "./components/RemoteShell/index.js";
|
|
41
42
|
import { RESPONSE_CODE_COLOR, ResponseCode, getResponseCodeCategory } from "./components/ResponseCode/index.js";
|
|
@@ -62,4 +63,4 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "./components/Tooltip/in
|
|
|
62
63
|
import { TopHeader, TopHeaderActions, TopHeaderLogo } from "./components/TopHeader/index.js";
|
|
63
64
|
import { Tour, beaconStepEffect, useTour, waitForStepEvent } from "./components/Tour/index.js";
|
|
64
65
|
import { TestIdProvider, useTestId } from "./utils/testId.js";
|
|
65
|
-
export { Accordion, AccordionActions, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertClose, AlertContent, AlertControls, AlertDescription, AlertIcon, AlertTitle, AppShell, AppShellHeader, AppShellRail, AppShellRemote, Attribute, AttributeActions, AttributeActionsContent, AttributeActionsItem, AttributeActionsTarget, AttributeLabel, AttributeLabelDescription, AttributeLabelInfo, AttributeValue, Badge, Breadcrumbs, BreadcrumbsEllipsis, BreadcrumbsItem, BreadcrumbsScopeSwitcher, BreadcrumbsSeparator, Button, Calendar, CalendarApplyButton, CalendarBody, CalendarContent, CalendarDate, CalendarDateTime, CalendarDayName, CalendarFooter, CalendarFooterControls, CalendarGrid, CalendarGrids, CalendarHeader, CalendarInputHeader, CalendarKeyboardHints, CalendarPresetItem, CalendarPresets, CalendarProvider, CalendarResetButton, CalendarTrigger, Card, CardContent, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxDescription, CheckboxGroup, CheckboxIndicator, CheckboxLabel, Code, Country, CountryFlag, CountryName, DAY_NAMES, DEFAULT_RANGE_PRESETS, DEFAULT_SINGLE_PRESETS, DateFormatProvider, DateInput, DateRangeEndValue, DateRangeInput, DateRangeProvider, DateRangeSeparator, DateRangeStartValue, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerFooter, DrawerFooterControls, DrawerHeader, DrawerPositioner, DrawerResizeHandle, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuContextTrigger, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuInput, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDescription, DropdownMenuItemIcon, DropdownMenuItemText, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, DropdownMenuTriggerItem, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FilterInput, FilterInputChip, FilterInputFieldMenu, FilterInputOperatorMenu, Flex, FormatDateTime, HStack, HTTP_METHODS, HTTP_METHOD_COLOR, Heading, HttpMethod, Input, InputGroup, InputGroupAddon, InputGroupText, Ip, IpAddress, IpCountry, IpList, IpPort, IpProvider, Kbd, KbdGroup, Link, Loader, Logo, MONTH_NAMES, NavRail, NavRailBody, NavRailFooter, NavRailItem, NavRailSeparator, NumberInput, NumericBadge, OverflowTooltip, OverflowTooltipContent, ParameterPath, Popover, PopoverContent, PopoverTrigger, ProductNav, ProductNavBreadcrumbs, ProductNavPanel, RESPONSE_CODE_COLOR, Radio, RadioDescription, RadioGroup, RadioIndicator, RadioLabel, RemoteShell, RemoteShellBreadcrumb, RemoteShellContent, RemoteShellPanel, ResponseCode, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaViewport, SegmentedControl, SegmentedControlButton, SegmentedControlItem, SegmentedControlSeparator, SegmentedTabs, SegmentedTabsButton, SegmentedTabsContent, SegmentedTabsList, SegmentedTabsSeparator, SegmentedTabsTrigger, SegmentedTabsTriggerButton, Select, SelectButton, SelectClearTrigger, SelectContent, SelectFooter, SelectGroup, SelectGroupLabel, SelectHeader, SelectInput, SelectOption, SelectOptionDescription, SelectOptionIndicator, SelectOptionText, SelectPositioner, SelectSearchInput, SelectSeparator, Selection, SelectionAll, SelectionBulkBar, SelectionItem, Separator, Skeleton, SplitButton, Stack, Switch, SwitchControl, SwitchDescription, SwitchLabel, Table, TableActionBar, TableEmptyState, TableSettingsMenu, Tabs, TabsButton, TabsContent, TabsLineActions, TabsList, TabsSeparator, TabsTrigger, Tag, TagClose, TestIdProvider, Text, Textarea, ThemeProvider, Time, TimeInput, Toast, ToastActions, Toaster, ToggleButton, Tooltip, TooltipContent, TooltipTrigger, TopHeader, TopHeaderActions, TopHeaderLogo, Tour, VStack, ZonedDateTime, beaconStepEffect, cardVariants, createTableColumnHelper, datacenters, drawerContentVariants, drawerPositionerVariants, findDrillNode, findFirstLinkPath, formatAsFilter, getLocalTimeZone, getResponseCodeCategory, matchNav, parseDate, parseDateTime, parseTime, parseZonedDateTime, proxyTypes, sourceLabels, toaster, today, useCalendarContext, useDateFormat, useDateRangeContext, useDrawerContext, useProductNav, useProductNavContext, useTestId, useTheme, useTour, waitForStepEvent };
|
|
66
|
+
export { Accordion, AccordionActions, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertClose, AlertContent, AlertControls, AlertDescription, AlertIcon, AlertTitle, AppShell, AppShellHeader, AppShellRail, AppShellRemote, Attribute, AttributeActions, AttributeActionsContent, AttributeActionsItem, AttributeActionsTarget, AttributeLabel, AttributeLabelDescription, AttributeLabelInfo, AttributeValue, Badge, Breadcrumbs, BreadcrumbsEllipsis, BreadcrumbsItem, BreadcrumbsScopeSwitcher, BreadcrumbsSeparator, Button, Calendar, CalendarApplyButton, CalendarBody, CalendarContent, CalendarDate, CalendarDateTime, CalendarDayName, CalendarFooter, CalendarFooterControls, CalendarGrid, CalendarGrids, CalendarHeader, CalendarInputHeader, CalendarKeyboardHints, CalendarPresetItem, CalendarPresets, CalendarProvider, CalendarResetButton, CalendarTrigger, Card, CardContent, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxDescription, CheckboxGroup, CheckboxIndicator, CheckboxLabel, Code, Country, CountryFlag, CountryName, DAY_NAMES, DEFAULT_RANGE_PRESETS, DEFAULT_SINGLE_PRESETS, DateFormatProvider, DateInput, DateRangeEndValue, DateRangeInput, DateRangeProvider, DateRangeSeparator, DateRangeStartValue, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerFooter, DrawerFooterControls, DrawerHeader, DrawerPositioner, DrawerResizeHandle, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuContextTrigger, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuInput, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDescription, DropdownMenuItemIcon, DropdownMenuItemText, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, DropdownMenuTriggerItem, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FilterInput, FilterInputChip, FilterInputFieldMenu, FilterInputOperatorMenu, Flex, FormatDateTime, HStack, HTTP_METHODS, HTTP_METHOD_COLOR, Heading, HttpMethod, Input, InputGroup, InputGroupAddon, InputGroupText, Ip, IpAddress, IpCountry, IpList, IpPort, IpProvider, Kbd, KbdGroup, Link, Loader, Logo, MONTH_NAMES, NavRail, NavRailBody, NavRailFooter, NavRailItem, NavRailSeparator, NumberInput, NumericBadge, OverflowTooltip, OverflowTooltipContent, ParameterPath, Popover, PopoverContent, PopoverTrigger, ProductNav, ProductNavBreadcrumbs, ProductNavPanel, Progress, RESPONSE_CODE_COLOR, Radio, RadioDescription, RadioGroup, RadioIndicator, RadioLabel, RemoteShell, RemoteShellBreadcrumb, RemoteShellContent, RemoteShellPanel, ResponseCode, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaScrollbar, ScrollAreaViewport, SegmentedControl, SegmentedControlButton, SegmentedControlItem, SegmentedControlSeparator, SegmentedTabs, SegmentedTabsButton, SegmentedTabsContent, SegmentedTabsList, SegmentedTabsSeparator, SegmentedTabsTrigger, SegmentedTabsTriggerButton, Select, SelectButton, SelectClearTrigger, SelectContent, SelectFooter, SelectGroup, SelectGroupLabel, SelectHeader, SelectInput, SelectOption, SelectOptionDescription, SelectOptionIndicator, SelectOptionText, SelectPositioner, SelectSearchInput, SelectSeparator, Selection, SelectionAll, SelectionBulkBar, SelectionItem, Separator, Skeleton, SplitButton, Stack, Switch, SwitchControl, SwitchDescription, SwitchLabel, Table, TableActionBar, TableEmptyState, TableSettingsMenu, Tabs, TabsButton, TabsContent, TabsLineActions, TabsList, TabsSeparator, TabsTrigger, Tag, TagClose, TestIdProvider, Text, Textarea, ThemeProvider, Time, TimeInput, Toast, ToastActions, Toaster, ToggleButton, Tooltip, TooltipContent, TooltipTrigger, TopHeader, TopHeaderActions, TopHeaderLogo, Tour, VStack, ZonedDateTime, beaconStepEffect, cardVariants, createTableColumnHelper, datacenters, drawerContentVariants, drawerPositionerVariants, findDrillNode, findFirstLinkPath, formatAsFilter, getLocalTimeZone, getResponseCodeCategory, matchNav, parseDate, parseDateTime, parseTime, parseZonedDateTime, proxyTypes, sourceLabels, toaster, today, useCalendarContext, useDateFormat, useDateRangeContext, useDrawerContext, useProductNav, useProductNavContext, useTestId, useTheme, useTour, waitForStepEvent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.44.
|
|
3
|
-
"generatedAt": "2026-05-
|
|
2
|
+
"version": "0.44.1",
|
|
3
|
+
"generatedAt": "2026-05-21T17:56:57.484Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Accordion",
|
|
@@ -30537,6 +30537,342 @@
|
|
|
30537
30537
|
"subComponents": [],
|
|
30538
30538
|
"examples": []
|
|
30539
30539
|
},
|
|
30540
|
+
{
|
|
30541
|
+
"name": "Progress",
|
|
30542
|
+
"importPath": "@wallarm-org/design-system/Progress",
|
|
30543
|
+
"props": [
|
|
30544
|
+
{
|
|
30545
|
+
"name": "value",
|
|
30546
|
+
"type": "number | undefined",
|
|
30547
|
+
"required": false,
|
|
30548
|
+
"defaultValue": "0"
|
|
30549
|
+
},
|
|
30550
|
+
{
|
|
30551
|
+
"name": "max",
|
|
30552
|
+
"type": "number | undefined",
|
|
30553
|
+
"required": false,
|
|
30554
|
+
"defaultValue": "100"
|
|
30555
|
+
},
|
|
30556
|
+
{
|
|
30557
|
+
"name": "size",
|
|
30558
|
+
"type": "ProgressSize | undefined",
|
|
30559
|
+
"required": false,
|
|
30560
|
+
"defaultValue": "md"
|
|
30561
|
+
},
|
|
30562
|
+
{
|
|
30563
|
+
"name": "color",
|
|
30564
|
+
"type": "ProgressColor | undefined",
|
|
30565
|
+
"required": false,
|
|
30566
|
+
"defaultValue": "w-orange"
|
|
30567
|
+
},
|
|
30568
|
+
{
|
|
30569
|
+
"name": "showLabel",
|
|
30570
|
+
"type": "boolean | undefined",
|
|
30571
|
+
"required": false,
|
|
30572
|
+
"defaultValue": "false"
|
|
30573
|
+
},
|
|
30574
|
+
{
|
|
30575
|
+
"name": "defaultChecked",
|
|
30576
|
+
"type": "boolean | undefined",
|
|
30577
|
+
"required": false
|
|
30578
|
+
},
|
|
30579
|
+
{
|
|
30580
|
+
"name": "defaultValue",
|
|
30581
|
+
"type": "string | number | readonly string[] | undefined",
|
|
30582
|
+
"required": false
|
|
30583
|
+
},
|
|
30584
|
+
{
|
|
30585
|
+
"name": "suppressContentEditableWarning",
|
|
30586
|
+
"type": "boolean | undefined",
|
|
30587
|
+
"required": false
|
|
30588
|
+
},
|
|
30589
|
+
{
|
|
30590
|
+
"name": "suppressHydrationWarning",
|
|
30591
|
+
"type": "boolean | undefined",
|
|
30592
|
+
"required": false
|
|
30593
|
+
},
|
|
30594
|
+
{
|
|
30595
|
+
"name": "accessKey",
|
|
30596
|
+
"type": "string | undefined",
|
|
30597
|
+
"required": false
|
|
30598
|
+
},
|
|
30599
|
+
{
|
|
30600
|
+
"name": "autoCapitalize",
|
|
30601
|
+
"type": "\"off\" | \"none\" | \"on\" | \"sentences\" | \"words\" | \"characters\" | (string & {}) | undefined",
|
|
30602
|
+
"required": false
|
|
30603
|
+
},
|
|
30604
|
+
{
|
|
30605
|
+
"name": "autoFocus",
|
|
30606
|
+
"type": "boolean | undefined",
|
|
30607
|
+
"required": false
|
|
30608
|
+
},
|
|
30609
|
+
{
|
|
30610
|
+
"name": "contentEditable",
|
|
30611
|
+
"type": "Booleanish | \"inherit\" | \"plaintext-only\" | undefined",
|
|
30612
|
+
"required": false
|
|
30613
|
+
},
|
|
30614
|
+
{
|
|
30615
|
+
"name": "contextMenu",
|
|
30616
|
+
"type": "string | undefined",
|
|
30617
|
+
"required": false
|
|
30618
|
+
},
|
|
30619
|
+
{
|
|
30620
|
+
"name": "dir",
|
|
30621
|
+
"type": "string | undefined",
|
|
30622
|
+
"required": false
|
|
30623
|
+
},
|
|
30624
|
+
{
|
|
30625
|
+
"name": "draggable",
|
|
30626
|
+
"type": "Booleanish | undefined",
|
|
30627
|
+
"required": false
|
|
30628
|
+
},
|
|
30629
|
+
{
|
|
30630
|
+
"name": "enterKeyHint",
|
|
30631
|
+
"type": "\"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined",
|
|
30632
|
+
"required": false
|
|
30633
|
+
},
|
|
30634
|
+
{
|
|
30635
|
+
"name": "hidden",
|
|
30636
|
+
"type": "boolean | undefined",
|
|
30637
|
+
"required": false
|
|
30638
|
+
},
|
|
30639
|
+
{
|
|
30640
|
+
"name": "id",
|
|
30641
|
+
"type": "string | undefined",
|
|
30642
|
+
"required": false
|
|
30643
|
+
},
|
|
30644
|
+
{
|
|
30645
|
+
"name": "lang",
|
|
30646
|
+
"type": "string | undefined",
|
|
30647
|
+
"required": false
|
|
30648
|
+
},
|
|
30649
|
+
{
|
|
30650
|
+
"name": "nonce",
|
|
30651
|
+
"type": "string | undefined",
|
|
30652
|
+
"required": false
|
|
30653
|
+
},
|
|
30654
|
+
{
|
|
30655
|
+
"name": "slot",
|
|
30656
|
+
"type": "string | undefined",
|
|
30657
|
+
"required": false
|
|
30658
|
+
},
|
|
30659
|
+
{
|
|
30660
|
+
"name": "spellCheck",
|
|
30661
|
+
"type": "Booleanish | undefined",
|
|
30662
|
+
"required": false
|
|
30663
|
+
},
|
|
30664
|
+
{
|
|
30665
|
+
"name": "tabIndex",
|
|
30666
|
+
"type": "number | undefined",
|
|
30667
|
+
"required": false
|
|
30668
|
+
},
|
|
30669
|
+
{
|
|
30670
|
+
"name": "title",
|
|
30671
|
+
"type": "string | undefined",
|
|
30672
|
+
"required": false
|
|
30673
|
+
},
|
|
30674
|
+
{
|
|
30675
|
+
"name": "translate",
|
|
30676
|
+
"type": "\"yes\" | \"no\" | undefined",
|
|
30677
|
+
"required": false
|
|
30678
|
+
},
|
|
30679
|
+
{
|
|
30680
|
+
"name": "radioGroup",
|
|
30681
|
+
"type": "string | undefined",
|
|
30682
|
+
"required": false
|
|
30683
|
+
},
|
|
30684
|
+
{
|
|
30685
|
+
"name": "role",
|
|
30686
|
+
"type": "AriaRole | undefined",
|
|
30687
|
+
"required": false
|
|
30688
|
+
},
|
|
30689
|
+
{
|
|
30690
|
+
"name": "about",
|
|
30691
|
+
"type": "string | undefined",
|
|
30692
|
+
"required": false
|
|
30693
|
+
},
|
|
30694
|
+
{
|
|
30695
|
+
"name": "content",
|
|
30696
|
+
"type": "string | undefined",
|
|
30697
|
+
"required": false
|
|
30698
|
+
},
|
|
30699
|
+
{
|
|
30700
|
+
"name": "datatype",
|
|
30701
|
+
"type": "string | undefined",
|
|
30702
|
+
"required": false
|
|
30703
|
+
},
|
|
30704
|
+
{
|
|
30705
|
+
"name": "inlist",
|
|
30706
|
+
"type": "any",
|
|
30707
|
+
"required": false
|
|
30708
|
+
},
|
|
30709
|
+
{
|
|
30710
|
+
"name": "prefix",
|
|
30711
|
+
"type": "string | undefined",
|
|
30712
|
+
"required": false
|
|
30713
|
+
},
|
|
30714
|
+
{
|
|
30715
|
+
"name": "property",
|
|
30716
|
+
"type": "string | undefined",
|
|
30717
|
+
"required": false
|
|
30718
|
+
},
|
|
30719
|
+
{
|
|
30720
|
+
"name": "rel",
|
|
30721
|
+
"type": "string | undefined",
|
|
30722
|
+
"required": false
|
|
30723
|
+
},
|
|
30724
|
+
{
|
|
30725
|
+
"name": "resource",
|
|
30726
|
+
"type": "string | undefined",
|
|
30727
|
+
"required": false
|
|
30728
|
+
},
|
|
30729
|
+
{
|
|
30730
|
+
"name": "rev",
|
|
30731
|
+
"type": "string | undefined",
|
|
30732
|
+
"required": false
|
|
30733
|
+
},
|
|
30734
|
+
{
|
|
30735
|
+
"name": "typeof",
|
|
30736
|
+
"type": "string | undefined",
|
|
30737
|
+
"required": false
|
|
30738
|
+
},
|
|
30739
|
+
{
|
|
30740
|
+
"name": "vocab",
|
|
30741
|
+
"type": "string | undefined",
|
|
30742
|
+
"required": false
|
|
30743
|
+
},
|
|
30744
|
+
{
|
|
30745
|
+
"name": "autoCorrect",
|
|
30746
|
+
"type": "string | undefined",
|
|
30747
|
+
"required": false
|
|
30748
|
+
},
|
|
30749
|
+
{
|
|
30750
|
+
"name": "autoSave",
|
|
30751
|
+
"type": "string | undefined",
|
|
30752
|
+
"required": false
|
|
30753
|
+
},
|
|
30754
|
+
{
|
|
30755
|
+
"name": "itemProp",
|
|
30756
|
+
"type": "string | undefined",
|
|
30757
|
+
"required": false
|
|
30758
|
+
},
|
|
30759
|
+
{
|
|
30760
|
+
"name": "itemScope",
|
|
30761
|
+
"type": "boolean | undefined",
|
|
30762
|
+
"required": false
|
|
30763
|
+
},
|
|
30764
|
+
{
|
|
30765
|
+
"name": "itemType",
|
|
30766
|
+
"type": "string | undefined",
|
|
30767
|
+
"required": false
|
|
30768
|
+
},
|
|
30769
|
+
{
|
|
30770
|
+
"name": "itemID",
|
|
30771
|
+
"type": "string | undefined",
|
|
30772
|
+
"required": false
|
|
30773
|
+
},
|
|
30774
|
+
{
|
|
30775
|
+
"name": "itemRef",
|
|
30776
|
+
"type": "string | undefined",
|
|
30777
|
+
"required": false
|
|
30778
|
+
},
|
|
30779
|
+
{
|
|
30780
|
+
"name": "results",
|
|
30781
|
+
"type": "number | undefined",
|
|
30782
|
+
"required": false
|
|
30783
|
+
},
|
|
30784
|
+
{
|
|
30785
|
+
"name": "security",
|
|
30786
|
+
"type": "string | undefined",
|
|
30787
|
+
"required": false
|
|
30788
|
+
},
|
|
30789
|
+
{
|
|
30790
|
+
"name": "unselectable",
|
|
30791
|
+
"type": "\"off\" | \"on\" | undefined",
|
|
30792
|
+
"required": false
|
|
30793
|
+
},
|
|
30794
|
+
{
|
|
30795
|
+
"name": "popover",
|
|
30796
|
+
"type": "\"\" | \"auto\" | \"manual\" | \"hint\" | undefined",
|
|
30797
|
+
"required": false
|
|
30798
|
+
},
|
|
30799
|
+
{
|
|
30800
|
+
"name": "popoverTargetAction",
|
|
30801
|
+
"type": "\"toggle\" | \"show\" | \"hide\" | undefined",
|
|
30802
|
+
"required": false
|
|
30803
|
+
},
|
|
30804
|
+
{
|
|
30805
|
+
"name": "popoverTarget",
|
|
30806
|
+
"type": "string | undefined",
|
|
30807
|
+
"required": false
|
|
30808
|
+
},
|
|
30809
|
+
{
|
|
30810
|
+
"name": "inert",
|
|
30811
|
+
"type": "boolean | undefined",
|
|
30812
|
+
"required": false,
|
|
30813
|
+
"description": "@see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert"
|
|
30814
|
+
},
|
|
30815
|
+
{
|
|
30816
|
+
"name": "inputMode",
|
|
30817
|
+
"type": "\"none\" | \"search\" | \"text\" | \"tel\" | \"url\" | \"email\" | \"numeric\" | \"decimal\" | undefined",
|
|
30818
|
+
"required": false,
|
|
30819
|
+
"description": "Hints at the type of data that might be entered by the user while editing the element or its contents"
|
|
30820
|
+
},
|
|
30821
|
+
{
|
|
30822
|
+
"name": "is",
|
|
30823
|
+
"type": "string | undefined",
|
|
30824
|
+
"required": false,
|
|
30825
|
+
"description": "Specify that a standard HTML element should behave like a defined custom built-in element"
|
|
30826
|
+
},
|
|
30827
|
+
{
|
|
30828
|
+
"name": "exportparts",
|
|
30829
|
+
"type": "string | undefined",
|
|
30830
|
+
"required": false,
|
|
30831
|
+
"description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts}"
|
|
30832
|
+
},
|
|
30833
|
+
{
|
|
30834
|
+
"name": "part",
|
|
30835
|
+
"type": "string | undefined",
|
|
30836
|
+
"required": false,
|
|
30837
|
+
"description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}"
|
|
30838
|
+
}
|
|
30839
|
+
],
|
|
30840
|
+
"variants": [
|
|
30841
|
+
{
|
|
30842
|
+
"name": "size",
|
|
30843
|
+
"options": [
|
|
30844
|
+
"sm",
|
|
30845
|
+
"md",
|
|
30846
|
+
"lg"
|
|
30847
|
+
],
|
|
30848
|
+
"defaultValue": "md"
|
|
30849
|
+
},
|
|
30850
|
+
{
|
|
30851
|
+
"name": "color",
|
|
30852
|
+
"options": [],
|
|
30853
|
+
"defaultValue": "blue"
|
|
30854
|
+
}
|
|
30855
|
+
],
|
|
30856
|
+
"subComponents": [],
|
|
30857
|
+
"examples": [
|
|
30858
|
+
{
|
|
30859
|
+
"name": "Basic",
|
|
30860
|
+
"code": "args => (\n <div className='w-280'>\n <Progress {...args} />\n </div>\n)"
|
|
30861
|
+
},
|
|
30862
|
+
{
|
|
30863
|
+
"name": "Sizes",
|
|
30864
|
+
"code": "() => (\n <div className='w-300'>\n <HStack gap={12}>\n <VStack align='end'>\n <Text truncate>Small</Text>\n <Text truncate>Medium (default)</Text>\n <Text truncate>Large</Text>\n </VStack>\n\n <VStack fullWidth justify='between' style={{ height: 'stretch' }}>\n <Progress value={20} size='sm' />\n <Progress value={40} size='md' />\n <Progress value={60} size='lg' />\n </VStack>\n </HStack>\n </div>\n)"
|
|
30865
|
+
},
|
|
30866
|
+
{
|
|
30867
|
+
"name": "Colors",
|
|
30868
|
+
"code": "() => (\n <div className='w-300'>\n <HStack gap={12}>\n <VStack align='end'>\n {Object.entries(ProgressColorEnum).map(([key]) => (\n <Text key={key}>{key}</Text>\n ))}\n </VStack>\n\n <VStack fullWidth justify='between' style={{ height: 'stretch' }}>\n {Object.entries(ProgressColorEnum).map(([_, color], index) => (\n <Progress\n key={color}\n value={index + 1}\n max={Object.entries(ProgressColorEnum).length}\n color={color}\n className='flex-1'\n />\n ))}\n </VStack>\n </HStack>\n </div>\n)"
|
|
30869
|
+
},
|
|
30870
|
+
{
|
|
30871
|
+
"name": "WithLabel",
|
|
30872
|
+
"code": "() => (\n <div className='w-280'>\n <VStack>\n <Progress value={25} size='sm' showLabel />\n <Progress value={50} showLabel color='green' />\n <Progress value={75} showLabel color='pink' size='lg' />\n </VStack>\n </div>\n)"
|
|
30873
|
+
}
|
|
30874
|
+
]
|
|
30875
|
+
},
|
|
30540
30876
|
{
|
|
30541
30877
|
"name": "Radio",
|
|
30542
30878
|
"importPath": "@wallarm-org/design-system/Radio",
|
package/package.json
CHANGED