linkedunion-design-kit 1.7.4 → 1.7.5
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/src/components/Card/PhotoGallery.css +11 -0
- package/dist/src/components/Label/Label.js +5 -5
- package/dist/src/components/Typography/Heading/heading.js +6 -6
- package/dist/src/components/ui/caption.js +1 -1
- package/dist/styles/global.css +0 -4
- package/package.json +1 -1
- package/dist/app/layout.jsx +0 -13
- package/dist/app/page.jsx +0 -5
- package/dist/src/components/Accordion/Accordion.stories.jsx +0 -25
- package/dist/src/components/Avatar/Avatar.jsx +0 -17
- package/dist/src/components/Avatar/Avatar.stories.jsx +0 -31
- package/dist/src/components/Avatar/Avatar.test.jsx +0 -51
- package/dist/src/components/Button/Button.jsx +0 -93
- package/dist/src/components/Button/Button.stories.jsx +0 -248
- package/dist/src/components/Button/Button.test.jsx +0 -73
- package/dist/src/components/Button/IconButton.jsx +0 -70
- package/dist/src/components/Button/IconButton.stories.jsx +0 -53
- package/dist/src/components/Button/IconButton.test.jsx +0 -27
- package/dist/src/components/Card/MultipleNews/MultiNews.jsx +0 -73
- package/dist/src/components/Card/MultipleNews/MultiNews.stories.jsx +0 -52
- package/dist/src/components/Card/PhotoGallery.jsx +0 -17
- package/dist/src/components/Card/PhotoGallery.stories.jsx +0 -34
- package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +0 -60
- package/dist/src/components/Card/PostByCategory/PostByCategory.stories.jsx +0 -54
- package/dist/src/components/Card/SinglePost.d.ts +0 -2
- package/dist/src/components/Card/SinglePost.js +0 -10
- package/dist/src/components/Card/SinglePost.jsx +0 -27
- package/dist/src/components/Card/SinglePost.stories.d.ts +0 -7
- package/dist/src/components/Card/SinglePost.stories.js +0 -46
- package/dist/src/components/Card/SinglePost.stories.jsx +0 -46
- package/dist/src/components/Card/card.jsx +0 -33
- package/dist/src/components/Card/contactProfile/ContactProfile.jsx +0 -60
- package/dist/src/components/Card/contactProfile/ContactProfile.stories.jsx +0 -52
- package/dist/src/components/Checkbox/checkbox.stories.jsx +0 -91
- package/dist/src/components/ColorPicker/ColorPicker.jsx +0 -65
- package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +0 -14
- package/dist/src/components/Colors/color.jsx +0 -5
- package/dist/src/components/Colors/color.stories.jsx +0 -20
- package/dist/src/components/Colors/color.test.jsx +0 -23
- package/dist/src/components/Icons/IconList.test.jsx +0 -57
- package/dist/src/components/Icons/IconView.jsx +0 -25
- package/dist/src/components/Icons/IconView.stories.jsx +0 -8
- package/dist/src/components/Icons/LUIcon.jsx +0 -37
- package/dist/src/components/Icons/LUIcon.stories.jsx +0 -63
- package/dist/src/components/Icons/SingleIcon.test.jsx +0 -56
- package/dist/src/components/ImageUploader/ImageUploader.stories.jsx +0 -18
- package/dist/src/components/ImageUploader/imageUploader.jsx +0 -83
- package/dist/src/components/Images/LuImage.jsx +0 -19
- package/dist/src/components/Images/LuImage.stories.jsx +0 -154
- package/dist/src/components/Images/LuImage.test.jsx +0 -44
- package/dist/src/components/Input/Input.stories.jsx +0 -34
- package/dist/src/components/Label/Label.jsx +0 -32
- package/dist/src/components/Label/Label.stories.jsx +0 -30
- package/dist/src/components/MediaCard/Card.jsx +0 -36
- package/dist/src/components/MediaCard/Card.stories.jsx +0 -56
- package/dist/src/components/MediaCard/Card.test.jsx +0 -27
- package/dist/src/components/MediaCard/ContactProfile/ContactProfile.jsx +0 -22
- package/dist/src/components/MediaCard/ContactProfile/ContactProfile.test.jsx +0 -60
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme1.jsx +0 -27
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme1.test.jsx +0 -87
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme2.jsx +0 -23
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme2.test.jsx +0 -87
- package/dist/src/components/MediaCard/PostByCategory/PostByCategory.jsx +0 -24
- package/dist/src/components/MediaCard/PostByCategory/PostByCategory.test.jsx +0 -61
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme1.jsx +0 -25
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme1.test.jsx +0 -87
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme2.jsx +0 -23
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme2.test.jsx +0 -87
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.jsx +0 -30
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.stories.jsx +0 -65
- package/dist/src/components/RadioButton/RadioButton.stories.jsx +0 -40
- package/dist/src/components/RadioButton/radio-button.jsx +0 -29
- package/dist/src/components/Slider/Slider.stories.jsx +0 -159
- package/dist/src/components/Slider/slider.jsx +0 -31
- package/dist/src/components/Switch/Switch.stories.jsx +0 -66
- package/dist/src/components/Tabs/Tabs.stories.jsx +0 -29
- package/dist/src/components/Title/Title.jsx +0 -8
- package/dist/src/components/Title/Title.stories.jsx +0 -37
- package/dist/src/components/Title/Title.test.jsx +0 -24
- package/dist/src/components/ToolTip/Tooltip.jsx +0 -18
- package/dist/src/components/ToolTip/Tooltip.stories.jsx +0 -25
- package/dist/src/components/Typography/Body/Body.stories.jsx +0 -34
- package/dist/src/components/Typography/Body/body.jsx +0 -52
- package/dist/src/components/Typography/Caption/Caption.stories.jsx +0 -24
- package/dist/src/components/Typography/Display/Display.stories.jsx +0 -24
- package/dist/src/components/Typography/Display/display.jsx +0 -39
- package/dist/src/components/Typography/Heading/Heading.stories.jsx +0 -24
- package/dist/src/components/Typography/Heading/heading.jsx +0 -60
- package/dist/src/components/ui/accordion.jsx +0 -39
- package/dist/src/components/ui/caption.jsx +0 -25
- package/dist/src/components/ui/checkbox.jsx +0 -24
- package/dist/src/components/ui/input.jsx +0 -18
- package/dist/src/components/ui/switch.jsx +0 -61
- package/dist/src/components/ui/tabs.jsx +0 -31
- package/dist/src/components/ui/tooltip.jsx +0 -38
- package/dist/src/components/ui/typography.jsx +0 -56
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { RadioButton } from "./radio-button";
|
|
2
|
-
import { Label } from "../Label/Label";
|
|
3
|
-
var meta = {
|
|
4
|
-
title: "Components/RadioButton",
|
|
5
|
-
component: RadioButton,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
args: {
|
|
8
|
-
id: "radio-example",
|
|
9
|
-
name: "example",
|
|
10
|
-
value: "option1",
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
//Basic Radio (no label)
|
|
15
|
-
export var Default = {
|
|
16
|
-
args: {
|
|
17
|
-
checked: true,
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
//With Label wrapping the radio
|
|
21
|
-
export var WithLabel = {
|
|
22
|
-
render: function (args) { return (<Label htmlFor="radio-with-label">
|
|
23
|
-
<RadioButton {...args} id="radio-with-label"/>
|
|
24
|
-
Upload a Video
|
|
25
|
-
</Label>); },
|
|
26
|
-
};
|
|
27
|
-
//Disabled
|
|
28
|
-
export var Disabled = {
|
|
29
|
-
render: function (args) { return (<Label htmlFor="radio-disabled">
|
|
30
|
-
<RadioButton {...args} id="radio-disabled" disabled/>
|
|
31
|
-
Disabled Option
|
|
32
|
-
</Label>); },
|
|
33
|
-
};
|
|
34
|
-
//Checked by default
|
|
35
|
-
export var Checked = {
|
|
36
|
-
render: function (args) { return (<Label htmlFor="radio-checked">
|
|
37
|
-
<RadioButton {...args} id="radio-checked" checked/>
|
|
38
|
-
Pre-selected
|
|
39
|
-
</Label>); },
|
|
40
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
import { cn } from "../../lib/utils";
|
|
14
|
-
var RadioButton = React.forwardRef(function (_a, ref) {
|
|
15
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
16
|
-
return (<input ref={ref} type="radio" className={cn(
|
|
17
|
-
// Size and shape
|
|
18
|
-
"size-4 shrink-0 rounded-full border",
|
|
19
|
-
// Unchecked state
|
|
20
|
-
"border-gray-400",
|
|
21
|
-
// Checked state
|
|
22
|
-
"checked:border-blue-600 checked:bg-blue-600",
|
|
23
|
-
// Smooth transition
|
|
24
|
-
"transition-all duration-150 ease-in-out",
|
|
25
|
-
// Disabled state
|
|
26
|
-
"disabled:cursor-not-allowed disabled:opacity-50", className)} {...props}/>);
|
|
27
|
-
});
|
|
28
|
-
RadioButton.displayName = "RadioButton";
|
|
29
|
-
export { RadioButton };
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { Slider } from "./slider";
|
|
2
|
-
var meta = {
|
|
3
|
-
title: "Components/Slider",
|
|
4
|
-
component: Slider,
|
|
5
|
-
tags: ["autodocs"],
|
|
6
|
-
parameters: {
|
|
7
|
-
docs: {
|
|
8
|
-
description: {
|
|
9
|
-
component: "Slider component that allows users to select a value or range by dragging a handle along a track.",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
controls: {
|
|
13
|
-
expanded: true,
|
|
14
|
-
sort: "requiredFirst",
|
|
15
|
-
hideNoControlsWarning: true,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
args: {
|
|
19
|
-
// Default values for the slider
|
|
20
|
-
min: 0,
|
|
21
|
-
max: 100,
|
|
22
|
-
step: 1,
|
|
23
|
-
orientation: "horizontal",
|
|
24
|
-
},
|
|
25
|
-
argTypes: {
|
|
26
|
-
min: {
|
|
27
|
-
control: { type: "number" },
|
|
28
|
-
description: "The minimum value of the slider",
|
|
29
|
-
defaultValue: 0,
|
|
30
|
-
table: {
|
|
31
|
-
defaultValue: { summary: "0" },
|
|
32
|
-
type: { summary: "number" },
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
max: {
|
|
36
|
-
control: { type: "number" },
|
|
37
|
-
description: "The maximum value of the slider",
|
|
38
|
-
defaultValue: 100,
|
|
39
|
-
table: {
|
|
40
|
-
defaultValue: { summary: "100" },
|
|
41
|
-
type: { summary: "number" },
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
step: {
|
|
45
|
-
control: { type: "number" },
|
|
46
|
-
description: "The step increment value for the slider",
|
|
47
|
-
defaultValue: 1,
|
|
48
|
-
table: {
|
|
49
|
-
defaultValue: { summary: "1" },
|
|
50
|
-
type: { summary: "number" },
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
value: {
|
|
54
|
-
control: { type: "object" },
|
|
55
|
-
description: "The controlled value of the slider (for controlled components)",
|
|
56
|
-
table: {
|
|
57
|
-
defaultValue: { summary: "undefined" },
|
|
58
|
-
type: { summary: "number[]" },
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
defaultValue: {
|
|
62
|
-
control: { type: "object" },
|
|
63
|
-
description: "The default value of the slider (for uncontrolled components)",
|
|
64
|
-
table: {
|
|
65
|
-
defaultValue: { summary: "[min, max]" },
|
|
66
|
-
type: { summary: "number[]" },
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
orientation: {
|
|
70
|
-
control: { type: "radio" },
|
|
71
|
-
options: ["horizontal", "vertical"],
|
|
72
|
-
description: "The orientation of the slider",
|
|
73
|
-
defaultValue: "horizontal",
|
|
74
|
-
table: {
|
|
75
|
-
defaultValue: { summary: "horizontal" },
|
|
76
|
-
type: { summary: "string" },
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
disabled: {
|
|
80
|
-
control: { type: "boolean" },
|
|
81
|
-
description: "Whether the slider is disabled",
|
|
82
|
-
defaultValue: false,
|
|
83
|
-
table: {
|
|
84
|
-
defaultValue: { summary: "false" },
|
|
85
|
-
type: { summary: "boolean" },
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
onValueChange: {
|
|
89
|
-
action: "valueChanged",
|
|
90
|
-
description: "Callback function called when the value changes",
|
|
91
|
-
table: {
|
|
92
|
-
category: "Events",
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
|
-
export default meta;
|
|
98
|
-
// Basic single value slider
|
|
99
|
-
export var Default = {
|
|
100
|
-
args: {
|
|
101
|
-
defaultValue: [50],
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
// Slider with predefined value
|
|
105
|
-
export var PresetValue = {
|
|
106
|
-
args: {
|
|
107
|
-
value: [40],
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
// Range slider with two thumbs
|
|
111
|
-
export var Range = {
|
|
112
|
-
args: {
|
|
113
|
-
defaultValue: [25, 75],
|
|
114
|
-
},
|
|
115
|
-
};
|
|
116
|
-
// Slider with custom step
|
|
117
|
-
export var CustomStep = {
|
|
118
|
-
args: {
|
|
119
|
-
defaultValue: [50],
|
|
120
|
-
step: 10,
|
|
121
|
-
},
|
|
122
|
-
};
|
|
123
|
-
// Disabled slider
|
|
124
|
-
export var Disabled = {
|
|
125
|
-
args: {
|
|
126
|
-
defaultValue: [50],
|
|
127
|
-
disabled: true,
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
// Vertical orientation
|
|
131
|
-
export var VerticalSlider = {
|
|
132
|
-
args: {
|
|
133
|
-
defaultValue: [50],
|
|
134
|
-
orientation: "vertical",
|
|
135
|
-
},
|
|
136
|
-
parameters: {
|
|
137
|
-
docs: {
|
|
138
|
-
description: {
|
|
139
|
-
story: "A slider with vertical orientation. Note that you may need to set a height on the container.",
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
|
-
// Vertical range slider
|
|
145
|
-
export var VerticalRange = {
|
|
146
|
-
args: {
|
|
147
|
-
defaultValue: [25, 75],
|
|
148
|
-
orientation: "vertical",
|
|
149
|
-
},
|
|
150
|
-
};
|
|
151
|
-
// Custom range slider
|
|
152
|
-
export var CustomRange = {
|
|
153
|
-
args: {
|
|
154
|
-
min: 100,
|
|
155
|
-
max: 1000,
|
|
156
|
-
defaultValue: [400, 700],
|
|
157
|
-
step: 100,
|
|
158
|
-
},
|
|
159
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
14
|
-
import { cn } from "../../lib/utils";
|
|
15
|
-
function Slider(_a) {
|
|
16
|
-
var className = _a.className, defaultValue = _a.defaultValue, value = _a.value, _b = _a.min, min = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, props = __rest(_a, ["className", "defaultValue", "value", "min", "max"]);
|
|
17
|
-
var _values = React.useMemo(function () {
|
|
18
|
-
return Array.isArray(value)
|
|
19
|
-
? value
|
|
20
|
-
: Array.isArray(defaultValue)
|
|
21
|
-
? defaultValue
|
|
22
|
-
: [min, max];
|
|
23
|
-
}, [value, defaultValue, min, max]);
|
|
24
|
-
return (<SliderPrimitive.Root data-slot="slider" defaultValue={defaultValue} value={value} min={min} max={max} className={cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className)} {...props}>
|
|
25
|
-
<SliderPrimitive.Track data-slot="slider-track" className={cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5")}>
|
|
26
|
-
<SliderPrimitive.Range data-slot="slider-range" className={cn("bg-blue-600 absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")}/>
|
|
27
|
-
</SliderPrimitive.Track>
|
|
28
|
-
{Array.from({ length: _values.length }, function (_, index) { return (<SliderPrimitive.Thumb data-slot="slider-thumb" key={index} className="border-blue-600 bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"/>); })}
|
|
29
|
-
</SliderPrimitive.Root>);
|
|
30
|
-
}
|
|
31
|
-
export { Slider };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { size, Switch, variant } from "../ui/switch";
|
|
2
|
-
export default {
|
|
3
|
-
title: "Components/Switch",
|
|
4
|
-
component: Switch,
|
|
5
|
-
tags: ["autodocs"],
|
|
6
|
-
};
|
|
7
|
-
var Template = function (args) { return <Switch {...args}></Switch>; };
|
|
8
|
-
export var _Switch = Template.bind({});
|
|
9
|
-
_Switch.args = {
|
|
10
|
-
size: "md",
|
|
11
|
-
variant: "default",
|
|
12
|
-
defaultChecked: false,
|
|
13
|
-
onCheckedChange: function (checked) {
|
|
14
|
-
return console.log("Switch is ".concat(checked ? "on" : "off"));
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
_Switch.argTypes = {
|
|
18
|
-
variant: {
|
|
19
|
-
control: { type: "select" },
|
|
20
|
-
options: Object.keys(variant),
|
|
21
|
-
description: "Switch variant",
|
|
22
|
-
table: {
|
|
23
|
-
defaultValue: { summary: "default" },
|
|
24
|
-
type: { summary: "string" },
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
size: {
|
|
28
|
-
control: { type: "select" },
|
|
29
|
-
options: Object.keys(size),
|
|
30
|
-
description: "Switch size",
|
|
31
|
-
table: {
|
|
32
|
-
defaultValue: { summary: "md" },
|
|
33
|
-
type: { summary: "string" },
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
defaultChecked: {
|
|
37
|
-
control: { type: "boolean" },
|
|
38
|
-
description: "Initial checked state for uncontrolled switch",
|
|
39
|
-
table: {
|
|
40
|
-
defaultValue: { summary: "false" },
|
|
41
|
-
type: { summary: "boolean" },
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
checked: {
|
|
45
|
-
control: { type: "boolean" },
|
|
46
|
-
description: "Controlled checked state (e.g., checked={field.value} for form libraries)",
|
|
47
|
-
table: {
|
|
48
|
-
type: { summary: "boolean" },
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
onCheckedChange: {
|
|
52
|
-
action: "checked changed",
|
|
53
|
-
description: "Callback function when switch state changes",
|
|
54
|
-
table: {
|
|
55
|
-
type: { summary: "(checked: boolean) => void" },
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
disabled: {
|
|
59
|
-
control: { type: "boolean" },
|
|
60
|
-
description: "Disables the switch",
|
|
61
|
-
table: {
|
|
62
|
-
defaultValue: { summary: "false" },
|
|
63
|
-
type: { summary: "boolean" },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/Tabs",
|
|
5
|
-
component: Tabs,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
var Template = function (args) {
|
|
9
|
-
return <>{args.children}</>;
|
|
10
|
-
};
|
|
11
|
-
export var _Tabs = Template.bind({});
|
|
12
|
-
_Tabs.args = {
|
|
13
|
-
children: (<Tabs defaultValue="account">
|
|
14
|
-
<TabsList>
|
|
15
|
-
<TabsTrigger value="account">Account</TabsTrigger>
|
|
16
|
-
<TabsTrigger value="password">Password</TabsTrigger>
|
|
17
|
-
</TabsList>
|
|
18
|
-
<TabsContent value="account">Account Settings</TabsContent>
|
|
19
|
-
<TabsContent value="password">Change Password</TabsContent>
|
|
20
|
-
</Tabs>),
|
|
21
|
-
};
|
|
22
|
-
_Tabs.argTypes = {
|
|
23
|
-
children: {
|
|
24
|
-
description: "Pass `TabList` components as children. Each item includes an `TabsTrigger` (the clickable label) and `TabsContent`. You can customize both with any valid React nodes \n\nFor more details and usage examples, refer to the [ShadCN Tabs documentation](https://ui.shadcn.com/docs/components/tabs).",
|
|
25
|
-
table: {
|
|
26
|
-
type: { summary: "React.ReactNode" },
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Dummy_Title } from "../../utils/constants";
|
|
3
|
-
import TitleStyles from "./Title.module.css";
|
|
4
|
-
var Title = function (_a) {
|
|
5
|
-
var _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.children, children = _c === void 0 ? Dummy_Title : _c;
|
|
6
|
-
return (<h2 className={"".concat(TitleStyles["main-title"], " ").concat(className)}>{children}</h2>);
|
|
7
|
-
};
|
|
8
|
-
export default Title;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Dummy_Title } from "../../utils/constants";
|
|
2
|
-
import Title from "./Title";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/Title",
|
|
5
|
-
component: Title,
|
|
6
|
-
parameters: {
|
|
7
|
-
docs: {
|
|
8
|
-
description: {
|
|
9
|
-
component: "A configurable body text component with design system-approved styling variants",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
argTypes: {
|
|
14
|
-
className: {
|
|
15
|
-
description: "Additional CSS classes",
|
|
16
|
-
control: "text",
|
|
17
|
-
table: {
|
|
18
|
-
type: { summary: "string" },
|
|
19
|
-
defaultValue: { summary: "" },
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
children: {
|
|
23
|
-
description: "Text to be displayed",
|
|
24
|
-
control: "text",
|
|
25
|
-
table: {
|
|
26
|
-
type: { summary: "string" },
|
|
27
|
-
defaultValue: { summary: "Title" },
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
var Template = function (args) { return <Title {...args}/>; };
|
|
33
|
-
export var _Title = Template.bind({});
|
|
34
|
-
_Title.args = {
|
|
35
|
-
children: Dummy_Title,
|
|
36
|
-
className: "",
|
|
37
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { render, screen } from "@testing-library/react";
|
|
2
|
-
import { Dummy_Title } from "../../utils/constants";
|
|
3
|
-
import Title from "./Title";
|
|
4
|
-
describe("Title Component", function () {
|
|
5
|
-
it("renders with default props", function () {
|
|
6
|
-
render(<Title />);
|
|
7
|
-
expect(screen.getByText(Dummy_Title)).toBeInTheDocument();
|
|
8
|
-
});
|
|
9
|
-
it("renders with custom children", function () {
|
|
10
|
-
var customText = "Custom Title";
|
|
11
|
-
render(<Title>{customText}</Title>);
|
|
12
|
-
expect(screen.getByText(customText)).toBeInTheDocument();
|
|
13
|
-
});
|
|
14
|
-
it("applies custom className", function () {
|
|
15
|
-
var customClass = "custom-class";
|
|
16
|
-
render(<Title className={customClass}/>);
|
|
17
|
-
var titleElement = screen.getByText(Dummy_Title);
|
|
18
|
-
expect(titleElement).toHaveClass("main-title custom-class");
|
|
19
|
-
});
|
|
20
|
-
it("renders without crashing", function () {
|
|
21
|
-
var container = render(<Title />).container;
|
|
22
|
-
expect(container).toBeDefined();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Tooltip as ShadTooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../ui/tooltip";
|
|
2
|
-
import { Body } from "../Typography/Body/body";
|
|
3
|
-
var Tooltip = function (_a) {
|
|
4
|
-
var title = _a.title, className = _a.className, children = _a.children;
|
|
5
|
-
return (<TooltipProvider>
|
|
6
|
-
<ShadTooltip>
|
|
7
|
-
<TooltipTrigger asChild className={className}>
|
|
8
|
-
{children}
|
|
9
|
-
</TooltipTrigger>
|
|
10
|
-
<TooltipContent>
|
|
11
|
-
<Body variant="body-md" className="text-center">
|
|
12
|
-
{title}
|
|
13
|
-
</Body>
|
|
14
|
-
</TooltipContent>
|
|
15
|
-
</ShadTooltip>
|
|
16
|
-
</TooltipProvider>);
|
|
17
|
-
};
|
|
18
|
-
export default Tooltip;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import Tooltip from "./Tooltip";
|
|
2
|
-
import { IconButton } from "../Button/IconButton";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/Tooltip",
|
|
5
|
-
component: Tooltip,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
var Template = function (args) { return (<Tooltip {...args}></Tooltip>); };
|
|
9
|
-
export var _ToolTip = Template.bind({});
|
|
10
|
-
_ToolTip.args = {
|
|
11
|
-
children: <IconButton icon="volume-high" shape="rounded-full"/>,
|
|
12
|
-
title: "Tooltip",
|
|
13
|
-
};
|
|
14
|
-
_ToolTip.argTypes = {
|
|
15
|
-
children: {
|
|
16
|
-
description: "React component to be wrapped",
|
|
17
|
-
control: false,
|
|
18
|
-
table: {
|
|
19
|
-
type: { summary: "string" },
|
|
20
|
-
defaultValue: {
|
|
21
|
-
summary: '<IconButton icon={<LUIcon icon="volume-high" size="sm"/>} shape="rounded-full"/>',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Dummy_Para } from "../../../utils/constants";
|
|
2
|
-
import { Body, variant } from "../../../components/Typography/Body/body";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/Typography/Body",
|
|
5
|
-
component: Body,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
var Template = function (args) { return <Body {...args}></Body>; };
|
|
9
|
-
export var _Body = Template.bind({});
|
|
10
|
-
_Body.args = {
|
|
11
|
-
children: Dummy_Para,
|
|
12
|
-
variant: "body-base",
|
|
13
|
-
as: "p",
|
|
14
|
-
};
|
|
15
|
-
_Body.argTypes = {
|
|
16
|
-
variant: {
|
|
17
|
-
control: { type: "select" },
|
|
18
|
-
options: Object.keys(variant),
|
|
19
|
-
description: "Body Variant",
|
|
20
|
-
table: {
|
|
21
|
-
defaultValue: { summary: "body-base" },
|
|
22
|
-
type: { summary: "string" },
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
as: {
|
|
26
|
-
control: { type: "select" },
|
|
27
|
-
options: ["p", "span"],
|
|
28
|
-
description: "HTML tag to render",
|
|
29
|
-
table: {
|
|
30
|
-
defaultValue: { summary: "p" },
|
|
31
|
-
type: { summary: '"p" | "span"' },
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
import { cva } from "class-variance-authority";
|
|
14
|
-
import { cn } from "../../../lib/utils";
|
|
15
|
-
export var variant = {
|
|
16
|
-
"body-xl": "text-xl font-normal",
|
|
17
|
-
"body-xl-500": "text-xl font-medium",
|
|
18
|
-
"body-xl-600": "text-xl font-semibold",
|
|
19
|
-
"body-xl-700": "text-xl font-bold",
|
|
20
|
-
"body-lg": "text-lg font-normal",
|
|
21
|
-
"body-lg-500": "text-lg font-medium",
|
|
22
|
-
"body-lg-600": "text-lg font-semibold",
|
|
23
|
-
"body-lg-700": "text-lg font-bold",
|
|
24
|
-
"body-md": "text-base font-normal",
|
|
25
|
-
"body-md-500": "text-base font-medium",
|
|
26
|
-
"body-md-600": "text-base font-semibold",
|
|
27
|
-
"body-md-700": "text-base font-bold",
|
|
28
|
-
"body-sm": "text-sm font-normal",
|
|
29
|
-
"body-sm-500": "text-sm font-medium",
|
|
30
|
-
"body-sm-600": "text-sm font-semibold",
|
|
31
|
-
"body-sm-700": "text-sm font-bold",
|
|
32
|
-
"body-xs": "text-xs font-normal",
|
|
33
|
-
"body-xs-500": "text-xs font-medium",
|
|
34
|
-
"body-xs-600": "text-xs font-semibold",
|
|
35
|
-
"body-xs-700": "text-xs font-bold",
|
|
36
|
-
};
|
|
37
|
-
var bodyVariants = cva("!leading-normal m-0", {
|
|
38
|
-
variants: {
|
|
39
|
-
variant: variant,
|
|
40
|
-
},
|
|
41
|
-
defaultVariants: {
|
|
42
|
-
variant: "body-md",
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
function Body(_a) {
|
|
46
|
-
var as = _a.as, className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["as", "className", "variant", "children"]);
|
|
47
|
-
var Tag = as || "p";
|
|
48
|
-
return (<Tag className={cn(bodyVariants({ variant: variant }), className)} {...props}>
|
|
49
|
-
{children}
|
|
50
|
-
</Tag>);
|
|
51
|
-
}
|
|
52
|
-
export { Body, bodyVariants };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Dummy_Para } from "../../../utils/constants";
|
|
2
|
-
import { Caption, variantClasses } from "../../../components/ui/caption";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/Typography/Caption",
|
|
5
|
-
component: Caption,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
var Template = function (args) { return <Caption {...args}></Caption>; };
|
|
9
|
-
export var _Caption = Template.bind({});
|
|
10
|
-
_Caption.args = {
|
|
11
|
-
children: Dummy_Para,
|
|
12
|
-
variant: "md",
|
|
13
|
-
};
|
|
14
|
-
_Caption.argTypes = {
|
|
15
|
-
variant: {
|
|
16
|
-
control: { type: "select" },
|
|
17
|
-
options: Object.keys(variantClasses),
|
|
18
|
-
description: "Caption Variant",
|
|
19
|
-
table: {
|
|
20
|
-
defaultValue: { summary: "md" },
|
|
21
|
-
type: { summary: "string" },
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Dummy_Para } from "../../../utils/constants";
|
|
2
|
-
import { Display, variant } from "../../../components/Typography/Display/display";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/Typography/Display",
|
|
5
|
-
component: Display,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
var Template = function (args) { return <Display {...args}></Display>; };
|
|
9
|
-
export var _Display = Template.bind({});
|
|
10
|
-
_Display.args = {
|
|
11
|
-
children: Dummy_Para,
|
|
12
|
-
variant: "display-md",
|
|
13
|
-
};
|
|
14
|
-
_Display.argTypes = {
|
|
15
|
-
variant: {
|
|
16
|
-
control: { type: "select" },
|
|
17
|
-
options: Object.keys(variant),
|
|
18
|
-
description: "Display Variant",
|
|
19
|
-
table: {
|
|
20
|
-
defaultValue: { summary: "display-md" },
|
|
21
|
-
type: { summary: "string" },
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
import { cva } from "class-variance-authority";
|
|
14
|
-
import { cn } from "../../../lib/utils";
|
|
15
|
-
export var variant = {
|
|
16
|
-
"display-lg": "text-7xl font-bold",
|
|
17
|
-
"display-md": "text-6xl font-bold",
|
|
18
|
-
"display-sm": "text-5xl font-bold",
|
|
19
|
-
};
|
|
20
|
-
var displayVariants = cva("!leading-normal", // Default base class
|
|
21
|
-
{
|
|
22
|
-
variants: {
|
|
23
|
-
variant: variant,
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
variant: "display-md",
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
function Display(_a) {
|
|
30
|
-
var className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["className", "variant", "children"]);
|
|
31
|
-
var Tag = "div";
|
|
32
|
-
if (variant === null || variant === void 0 ? void 0 : variant.startsWith("display")) {
|
|
33
|
-
Tag = "div";
|
|
34
|
-
}
|
|
35
|
-
return (<Tag className={cn(displayVariants({ variant: variant, className: className }))} {...props}>
|
|
36
|
-
{children}
|
|
37
|
-
</Tag>);
|
|
38
|
-
}
|
|
39
|
-
export { Display, displayVariants };
|