@agility/plenum-ui 2.2.8 → 2.2.9
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/index.d.ts +10 -29
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/tailwind.css +13 -29
- package/dist/types/stories/atoms/index.d.ts +3 -3
- package/dist/types/stories/atoms/loaders/Loader.d.ts +2 -0
- package/dist/types/stories/atoms/loaders/index.d.ts +2 -3
- package/dist/types/stories/index.d.ts +3 -3
- package/package.json +1 -1
- package/stories/atoms/index.ts +1 -3
- package/stories/atoms/loaders/Loader.stories.ts +7 -7
- package/stories/atoms/loaders/Loader.tsx +11 -3
- package/stories/atoms/loaders/index.ts +3 -4
- package/stories/index.ts +0 -4
- package/dist/types/stories/atoms/loaders/NProgress/RadialProgress.d.ts +0 -11
- package/dist/types/stories/atoms/loaders/NProgress/index.d.ts +0 -3
- package/stories/atoms/loaders/NProgress/RadialProgress.stories.tsx +0 -19
- package/stories/atoms/loaders/NProgress/RadialProgress.tsx +0 -74
- package/stories/atoms/loaders/NProgress/index.ts +0 -3
package/dist/tailwind.css
CHANGED
|
@@ -811,10 +811,6 @@ select {
|
|
|
811
811
|
position: relative;
|
|
812
812
|
}
|
|
813
813
|
|
|
814
|
-
.inset-0 {
|
|
815
|
-
inset: 0px;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
814
|
.inset-y-0 {
|
|
819
815
|
top: 0px;
|
|
820
816
|
bottom: 0px;
|
|
@@ -1288,10 +1284,6 @@ select {
|
|
|
1288
1284
|
margin: 0px;
|
|
1289
1285
|
}
|
|
1290
1286
|
|
|
1291
|
-
.m-1 {
|
|
1292
|
-
margin: 0.25rem;
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
1287
|
.m-10 {
|
|
1296
1288
|
margin: 2.5rem;
|
|
1297
1289
|
}
|
|
@@ -2068,11 +2060,6 @@ select {
|
|
|
2068
2060
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
2069
2061
|
}
|
|
2070
2062
|
|
|
2071
|
-
.-rotate-90 {
|
|
2072
|
-
--tw-rotate: -90deg;
|
|
2073
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
2063
|
.transform {
|
|
2077
2064
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
2078
2065
|
}
|
|
@@ -3164,10 +3151,6 @@ select {
|
|
|
3164
3151
|
overflow: hidden;
|
|
3165
3152
|
}
|
|
3166
3153
|
|
|
3167
|
-
.overflow-visible {
|
|
3168
|
-
overflow: visible;
|
|
3169
|
-
}
|
|
3170
|
-
|
|
3171
3154
|
.truncate {
|
|
3172
3155
|
overflow: hidden;
|
|
3173
3156
|
text-overflow: ellipsis;
|
|
@@ -3258,10 +3241,6 @@ select {
|
|
|
3258
3241
|
border-width: 2px;
|
|
3259
3242
|
}
|
|
3260
3243
|
|
|
3261
|
-
.border-4 {
|
|
3262
|
-
border-width: 4px;
|
|
3263
|
-
}
|
|
3264
|
-
|
|
3265
3244
|
.\!border-l-0 {
|
|
3266
3245
|
border-left-width: 0px !important;
|
|
3267
3246
|
}
|
|
@@ -12203,6 +12182,14 @@ select {
|
|
|
12203
12182
|
border-color: rgb(19 78 74 / 0.95);
|
|
12204
12183
|
}
|
|
12205
12184
|
|
|
12185
|
+
.border-transparent-black-20 {
|
|
12186
|
+
border-color: rgba(0, 0, 0, 0.2);
|
|
12187
|
+
}
|
|
12188
|
+
|
|
12189
|
+
.border-transparent-white-50 {
|
|
12190
|
+
border-color: rgba(255, 255, 255, 0.5);
|
|
12191
|
+
}
|
|
12192
|
+
|
|
12206
12193
|
.border-violet-100 {
|
|
12207
12194
|
--tw-border-opacity: 1;
|
|
12208
12195
|
border-color: rgb(237 233 254 / var(--tw-border-opacity, 1));
|
|
@@ -35398,6 +35385,11 @@ select {
|
|
|
35398
35385
|
border-left-color: rgb(128 102 20 / 0.95);
|
|
35399
35386
|
}
|
|
35400
35387
|
|
|
35388
|
+
.border-r-black {
|
|
35389
|
+
--tw-border-opacity: 1;
|
|
35390
|
+
border-right-color: rgb(0 0 0 / var(--tw-border-opacity, 1));
|
|
35391
|
+
}
|
|
35392
|
+
|
|
35401
35393
|
.border-r-blue-100 {
|
|
35402
35394
|
--tw-border-opacity: 1;
|
|
35403
35395
|
border-right-color: rgb(219 234 254 / var(--tw-border-opacity, 1));
|
|
@@ -67485,14 +67477,6 @@ select {
|
|
|
67485
67477
|
fill: #fff;
|
|
67486
67478
|
}
|
|
67487
67479
|
|
|
67488
|
-
.stroke-gray-200 {
|
|
67489
|
-
stroke: #E5E7EB;
|
|
67490
|
-
}
|
|
67491
|
-
|
|
67492
|
-
.stroke-purple-600 {
|
|
67493
|
-
stroke: #691AD8;
|
|
67494
|
-
}
|
|
67495
|
-
|
|
67496
67480
|
.stroke-1 {
|
|
67497
67481
|
stroke-width: 1;
|
|
67498
67482
|
}
|
|
@@ -2,9 +2,9 @@ import Avatar, { IAvatarProps } from "./Avatar";
|
|
|
2
2
|
import Badge, { IBadgeProps } from "./badges";
|
|
3
3
|
import { Button, Capsule, BTNActionType, IButtonProps, ICapsuleProps } from "./buttons";
|
|
4
4
|
import { DynamicIcon, IDynamicIconProps, IIconWithShadowProps, IconName, IconWithShadow, UnifiedIconName, isHeroIcon, isTablerIcon, isUnifiedIconName } from "./icons";
|
|
5
|
-
import { ILoaderProps,
|
|
5
|
+
import { ILoaderProps, Loader } from "./loaders";
|
|
6
6
|
import { Heading, HeadingProps } from "./Typography/Heading";
|
|
7
7
|
import { Label, LabelProps } from "./Typography/Label";
|
|
8
8
|
import { Paragraph, ParagraphProps } from "./Typography/Paragraph";
|
|
9
|
-
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps,
|
|
10
|
-
export { Avatar, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader,
|
|
9
|
+
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, HeadingProps, LabelProps, ParagraphProps, UnifiedIconName, IconName, BTNActionType };
|
|
10
|
+
export { Avatar, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader, Heading, Label, Paragraph, isHeroIcon, isTablerIcon, isUnifiedIconName };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps,
|
|
1
|
+
import { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, UnifiedIconName, IconName, BTNActionType, Avatar, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader, isHeroIcon, isTablerIcon, isUnifiedIconName, Heading, HeadingProps, Label, LabelProps, Paragraph, ParagraphProps } from "./atoms";
|
|
2
2
|
import { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, TextInput, ITextInputProps, ISimpleSelectOptions } from "./molecules";
|
|
3
3
|
import { IAnimatedLabelInputProps, AnimatedLabelTextArea, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, AnimatedLabelInput, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, TextInputSelect, ITextInputSelectProps, IAnimatedFormInputWithAddons, AnimatedFormInputWithAddons, DropdownWithMultiSelect, MultiSelectItemProps } from "./organisms";
|
|
4
|
-
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, ITextInputSelectProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps,
|
|
5
|
-
export { Avatar, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, AnimatedLabelInput, AnimatedLabelTextArea, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader,
|
|
4
|
+
export type { IAvatarProps, IBadgeProps, IButtonProps, ICapsuleProps, ITextInputSelectProps, IDynamicIconProps, IIconWithShadowProps, ILoaderProps, ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextareaProps, IToggleSwitchProps, AcceptedInputTypes, IAnimatedLabelInputProps, IAnimatedLabelTextAreaProps, IButtonDropdownProps, IDropdownProps, IEmptySectionPlaceholderProps, IItemProp, IFormInputWithAddonsProps, UnifiedIconName, IconName, BTNActionType, ITextInputProps, ISimpleSelectOptions, IAnimatedFormInputWithAddons, MultiSelectItemProps, HeadingProps, LabelProps, ParagraphProps };
|
|
5
|
+
export { Avatar, Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, Textarea, ToggleSwitch, AnimatedLabelInput, AnimatedLabelTextArea, ButtonDropdown, Dropdown, EmptySectionPlaceholder, FormInputWithAddons, Badge, Button, Capsule, DynamicIcon, IconWithShadow, Loader, isHeroIcon, isTablerIcon, isUnifiedIconName, TextInput, TextInputSelect, AnimatedFormInputWithAddons, DropdownWithMultiSelect, Heading, Label, Paragraph };
|
package/package.json
CHANGED
package/stories/atoms/index.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
isTablerIcon,
|
|
13
13
|
isUnifiedIconName
|
|
14
14
|
} from "./icons";
|
|
15
|
-
import { ILoaderProps,
|
|
15
|
+
import { ILoaderProps, Loader } from "./loaders";
|
|
16
16
|
import { Heading, HeadingProps } from "./Typography/Heading";
|
|
17
17
|
import { Label, LabelProps } from "./Typography/Label";
|
|
18
18
|
import { Paragraph, ParagraphProps } from "./Typography/Paragraph";
|
|
@@ -24,7 +24,6 @@ export type {
|
|
|
24
24
|
IDynamicIconProps,
|
|
25
25
|
IIconWithShadowProps,
|
|
26
26
|
ILoaderProps,
|
|
27
|
-
IRadialProgressProps,
|
|
28
27
|
HeadingProps,
|
|
29
28
|
LabelProps,
|
|
30
29
|
ParagraphProps,
|
|
@@ -40,7 +39,6 @@ export {
|
|
|
40
39
|
DynamicIcon,
|
|
41
40
|
IconWithShadow,
|
|
42
41
|
Loader,
|
|
43
|
-
RadialProgress,
|
|
44
42
|
Heading,
|
|
45
43
|
Label,
|
|
46
44
|
Paragraph,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import Loader from "./Loader"
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Loader from "./Loader";
|
|
3
3
|
|
|
4
4
|
const meta: Meta<typeof Loader> = {
|
|
5
5
|
title: "Design System/atoms/Loaders/Loader",
|
|
6
6
|
component: Loader
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
|
|
9
|
-
type Story = StoryObj<typeof Loader
|
|
9
|
+
type Story = StoryObj<typeof Loader>;
|
|
10
10
|
|
|
11
11
|
export const DefaultLoader: Story = {
|
|
12
|
-
|
|
13
|
-
}
|
|
12
|
+
args: { size: "lg", variant: "primary" }
|
|
13
|
+
};
|
|
14
14
|
|
|
15
|
-
export default meta
|
|
15
|
+
export default meta;
|
|
@@ -2,15 +2,23 @@ import React from "react";
|
|
|
2
2
|
import { default as cn } from "classnames";
|
|
3
3
|
|
|
4
4
|
export interface ILoaderProps {
|
|
5
|
+
size?: "lg" | "md" | "sm";
|
|
6
|
+
variant?: "primary" | "black" | "white";
|
|
5
7
|
className?: string;
|
|
6
8
|
}
|
|
7
|
-
const Loader: React.FC<ILoaderProps> = ({ className }) => {
|
|
9
|
+
const Loader: React.FC<ILoaderProps> = ({ size = "lg", variant = "primary", className }) => {
|
|
8
10
|
return (
|
|
9
11
|
<>
|
|
10
12
|
<i
|
|
11
13
|
className={cn(
|
|
12
|
-
"rounded-full
|
|
13
|
-
|
|
14
|
+
"rounded-full inline-block animate-spinSlower m-auto",
|
|
15
|
+
size === "lg" ? "w-10 h-10 border-2" : size === "md" ? "w-5 h-5 border" : "w-4 h-4 border",
|
|
16
|
+
variant === "primary"
|
|
17
|
+
? "border-transparent-black-20 border-r-violet-800"
|
|
18
|
+
: variant === "black"
|
|
19
|
+
? "border-transparent-black-20 border-r-black"
|
|
20
|
+
: "border-transparent-white-50 border-r-white",
|
|
21
|
+
className
|
|
14
22
|
)}
|
|
15
23
|
role="status"
|
|
16
24
|
/>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import Loader, { ILoaderProps } from "./Loader"
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export type { ILoaderProps, IRadialProgressProps }
|
|
1
|
+
import Loader, { ILoaderProps } from "./Loader";
|
|
2
|
+
export { Loader };
|
|
3
|
+
export type { ILoaderProps };
|
package/stories/index.ts
CHANGED
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
IDynamicIconProps,
|
|
8
8
|
IIconWithShadowProps,
|
|
9
9
|
ILoaderProps,
|
|
10
|
-
IRadialProgressProps,
|
|
11
10
|
UnifiedIconName,
|
|
12
11
|
IconName,
|
|
13
12
|
BTNActionType,
|
|
@@ -18,7 +17,6 @@ import {
|
|
|
18
17
|
DynamicIcon,
|
|
19
18
|
IconWithShadow,
|
|
20
19
|
Loader,
|
|
21
|
-
RadialProgress,
|
|
22
20
|
isHeroIcon,
|
|
23
21
|
isTablerIcon,
|
|
24
22
|
isUnifiedIconName,
|
|
@@ -86,7 +84,6 @@ export type {
|
|
|
86
84
|
IDynamicIconProps,
|
|
87
85
|
IIconWithShadowProps,
|
|
88
86
|
ILoaderProps,
|
|
89
|
-
IRadialProgressProps,
|
|
90
87
|
ICheckboxProps,
|
|
91
88
|
IComboboxProps,
|
|
92
89
|
IInputFieldProps,
|
|
@@ -138,7 +135,6 @@ export {
|
|
|
138
135
|
DynamicIcon,
|
|
139
136
|
IconWithShadow,
|
|
140
137
|
Loader,
|
|
141
|
-
RadialProgress,
|
|
142
138
|
isHeroIcon,
|
|
143
139
|
isTablerIcon,
|
|
144
140
|
isUnifiedIconName,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface IRadialProgressProps extends React.PropsWithChildren {
|
|
3
|
-
/** Percentage value to display */
|
|
4
|
-
inputValue: number;
|
|
5
|
-
/** Radius for the circle - Max value of 100 */
|
|
6
|
-
radius: number;
|
|
7
|
-
/** Additional classnames */
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const RadialProgress: React.FC<IRadialProgressProps>;
|
|
11
|
-
export default RadialProgress;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
2
|
-
import RadialProgress from "./RadialProgress"
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof RadialProgress> = {
|
|
5
|
-
title: "Design System/atoms/Loaders/NProgress/RadialProgress",
|
|
6
|
-
component: RadialProgress
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type Story = StoryObj<typeof RadialProgress>
|
|
10
|
-
|
|
11
|
-
export const DefaultRadialProgress: Story = {
|
|
12
|
-
args: {
|
|
13
|
-
inputValue: 33,
|
|
14
|
-
radius: 20,
|
|
15
|
-
children: <></>
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default meta
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from "react"
|
|
2
|
-
import { default as cn } from "classnames"
|
|
3
|
-
export interface IRadialProgressProps extends React.PropsWithChildren {
|
|
4
|
-
/** Percentage value to display */
|
|
5
|
-
inputValue: number
|
|
6
|
-
/** Radius for the circle - Max value of 100 */
|
|
7
|
-
radius: number
|
|
8
|
-
/** Additional classnames */
|
|
9
|
-
className?: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const RadialProgress: React.FC<IRadialProgressProps> = ({
|
|
13
|
-
inputValue,
|
|
14
|
-
radius,
|
|
15
|
-
children,
|
|
16
|
-
className,
|
|
17
|
-
}) => {
|
|
18
|
-
const r = radius / 2
|
|
19
|
-
|
|
20
|
-
if (inputValue < 0) {
|
|
21
|
-
inputValue = 0
|
|
22
|
-
}
|
|
23
|
-
if (inputValue > 100) {
|
|
24
|
-
inputValue = 100
|
|
25
|
-
}
|
|
26
|
-
if (radius < 0) {
|
|
27
|
-
radius = 0
|
|
28
|
-
}
|
|
29
|
-
if (radius > 100) {
|
|
30
|
-
radius = 100
|
|
31
|
-
}
|
|
32
|
-
const drawPercentage = useMemo(() => {
|
|
33
|
-
const roundCircum = Math.round(2 * r * Math.PI)
|
|
34
|
-
return (inputValue * roundCircum) / 50
|
|
35
|
-
}, [inputValue, r])
|
|
36
|
-
|
|
37
|
-
const xyPos = (radius + 2) * -1
|
|
38
|
-
const viewPortXY = (radius + 2) * 2
|
|
39
|
-
return (
|
|
40
|
-
<div
|
|
41
|
-
className={cn(`overflow-visible`, className && className)}
|
|
42
|
-
style={{ height: `${viewPortXY}px`, width: `${viewPortXY}px` }}
|
|
43
|
-
>
|
|
44
|
-
<svg
|
|
45
|
-
viewBox={`${xyPos} ${xyPos} ${viewPortXY} ${viewPortXY}`}
|
|
46
|
-
data-percent={drawPercentage}
|
|
47
|
-
fill="none"
|
|
48
|
-
>
|
|
49
|
-
<circle
|
|
50
|
-
className="-rotate-90 stroke-gray-200 stroke-1"
|
|
51
|
-
cx={0}
|
|
52
|
-
cy={0}
|
|
53
|
-
r={radius}
|
|
54
|
-
></circle>
|
|
55
|
-
<circle
|
|
56
|
-
strokeDasharray={`${drawPercentage} 999`}
|
|
57
|
-
className="m-1 -rotate-90 stroke-purple-600 stroke-1 transition-all"
|
|
58
|
-
cx={0}
|
|
59
|
-
cy={0}
|
|
60
|
-
r={radius}
|
|
61
|
-
></circle>
|
|
62
|
-
</svg>
|
|
63
|
-
<div
|
|
64
|
-
className={cn(
|
|
65
|
-
`h-[${viewPortXY}px] w-[${viewPortXY}px] absolute inset-0 flex items-center justify-center overflow-hidden `
|
|
66
|
-
)}
|
|
67
|
-
>
|
|
68
|
-
{children}
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export default RadialProgress
|