linkedunion-design-kit 1.8.2 → 1.8.4
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 +0 -1
- package/dist/index.js +0 -1
- package/dist/src/components/Accordion/Accordion.stories.js +2 -2
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.js +1 -1
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.js +1 -1
- package/dist/src/components/ui/accordion.js +24 -3
- package/dist/styles/global.css +14 -20
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export { Display } from "./src/components/Typography/Display/display";
|
|
|
17
17
|
export { Caption } from "./src/components/ui/caption";
|
|
18
18
|
export { default as Tooltip } from "./src/components/ToolTip/Tooltip";
|
|
19
19
|
export { Button } from "./src/components/Button/Button";
|
|
20
|
-
export { AppIcon } from "./src/components/AppIcons";
|
|
21
20
|
export { Label } from "./src/components/Label/Label";
|
|
22
21
|
export { Slider } from "./src/components/Slider/slider";
|
|
23
22
|
export { RadioButton } from "./src/components/RadioButton/radio-button";
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,6 @@ export { Display } from "./src/components/Typography/Display/display";
|
|
|
17
17
|
export { Caption } from "./src/components/ui/caption";
|
|
18
18
|
export { default as Tooltip } from "./src/components/ToolTip/Tooltip";
|
|
19
19
|
export { Button } from "./src/components/Button/Button";
|
|
20
|
-
export { AppIcon } from "./src/components/AppIcons";
|
|
21
20
|
export { Label } from "./src/components/Label/Label";
|
|
22
21
|
export { Slider } from "./src/components/Slider/slider";
|
|
23
22
|
export { RadioButton } from "./src/components/RadioButton/radio-button";
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "../ui/accordion";
|
|
14
14
|
import ColorPicker from "../ColorPicker/ColorPicker";
|
|
15
15
|
export default {
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
var Template = function (args) { return (_jsx(Accordion, __assign({ type: "single", collapsible: true, defaultValue: "menus" }, args))); };
|
|
21
21
|
export var _Accordion = Template.bind({});
|
|
22
22
|
_Accordion.args = {
|
|
23
|
-
children: (_jsxs(AccordionItem, { value: "menus", children: [_jsx(AccordionTrigger, { children: "Menus" }), _jsx(AccordionContent, { children: _jsx(ColorPicker, { value: "#000000", onChange: function () { return console.log("color"); } }) })] })),
|
|
23
|
+
children: (_jsxs(_Fragment, { children: [_jsxs(AccordionItem, { value: "menus", children: [_jsx(AccordionTrigger, { children: "Menus" }), _jsx(AccordionContent, { children: _jsx(ColorPicker, { value: "#000000", onChange: function () { return console.log("color"); } }) })] }), _jsxs(AccordionItem, { value: "second", children: [_jsx(AccordionTrigger, { children: "Menus" }), _jsx(AccordionContent, { children: _jsx(ColorPicker, { value: "#000000", onChange: function () { return console.log("color"); } }) })] })] })),
|
|
24
24
|
};
|
|
25
25
|
_Accordion.argTypes = {
|
|
26
26
|
children: {
|
|
@@ -4,5 +4,5 @@ export var AvatarGroup = function (_a) {
|
|
|
4
4
|
var images = _a.images;
|
|
5
5
|
var visibleImages = images.slice(0, 2);
|
|
6
6
|
var remainingCount = images.length - visibleImages.length;
|
|
7
|
-
return (_jsxs("div", { className: "flex -space-x-5", children: [visibleImages.map(function (img) { return (_jsx(Avatar, { className: "size-9 !border !border-white !bg-black !shadow-sm", children: _jsx(AvatarImage, { src: img.image, alt: img.name || "Avatar image" }) }, img.id)); }), remainingCount > 0 && (_jsx(Avatar, { className: "size-9 !border !border-white", children: _jsxs(AvatarFallback, { className: "!text-
|
|
7
|
+
return (_jsxs("div", { className: "flex -space-x-5", children: [visibleImages.map(function (img) { return (_jsx(Avatar, { className: "size-9 !border !border-white !bg-black !shadow-sm", children: _jsx(AvatarImage, { src: img.image, alt: img.name || "Avatar image" }) }, img.id)); }), remainingCount > 0 && (_jsx(Avatar, { className: "size-9 !border !border-white", children: _jsxs(AvatarFallback, { className: "!text-black text-xs font-semibold !bg-white !shadow-sm", children: ["+", remainingCount] }) }))] }));
|
|
8
8
|
};
|
|
@@ -6,7 +6,7 @@ import { AvatarGroup } from "../../Avatar/AvatarGroup/AvatarGroup";
|
|
|
6
6
|
export var PhotoAlbum = function (_a) {
|
|
7
7
|
var image = _a.image, item = _a.item, _b = _a.altText, altText = _b === void 0 ? "Photo Album" : _b, editor = _a.editor, theme = _a.theme;
|
|
8
8
|
var hasImages = Array.isArray(item === null || item === void 0 ? void 0 : item.images) && item.images.length > 0;
|
|
9
|
-
return (_jsxs("div", { className: "group relative max-w-md cursor-pointer ".concat(editor === null || editor === void 0 ? void 0 : editor.card, " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardImage), children: [_jsx(LuImage, { src: image, width: 448, height: 448, alt: altText, className: "aspect-square object-cover transition-transform" }), _jsx("div", { className: "absolute inset-0 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardOverlay, "
|
|
9
|
+
return (_jsxs("div", { className: "group relative max-w-md cursor-pointer ".concat(editor === null || editor === void 0 ? void 0 : editor.card, " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardImage), children: [_jsx(LuImage, { src: image, width: 448, height: 448, alt: altText, className: "aspect-square object-cover transition-transform" }), _jsx("div", { className: "absolute inset-0 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardOverlay, " bg-linear-to-t from-black to-transparent") }), theme === "theme2" ? (_jsxs("div", { className: "absolute bottom-0 right-0 w-full bg-black/75 !px-5 !py-3 flex items-center justify-between duration-300\n group-hover:bg-transparent", children: [_jsx(Heading, { variant: "h4-700", className: "line-clamp-1 text-white uppercase ".concat(editor === null || editor === void 0 ? void 0 : editor.cardText), children: item === null || item === void 0 ? void 0 : item.title }), hasImages && (_jsx("div", { children: _jsx(AvatarGroup, { images: ((item === null || item === void 0 ? void 0 : item.images) || []).map(function (img) { return ({
|
|
10
10
|
id: img.gallery_id,
|
|
11
11
|
image: img.gallery_image,
|
|
12
12
|
}); }) }) }))] })) : (_jsxs(_Fragment, { children: [hasImages && (_jsx("div", { className: "absolute top-0 right-0 !px-5 !py-3", children: _jsx(AvatarGroup, { images: ((item === null || item === void 0 ? void 0 : item.images) || []).map(function (img) { return ({
|
|
@@ -21,20 +21,41 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import * as React from "react";
|
|
24
25
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
25
26
|
import { cn } from "../../lib/utils";
|
|
26
|
-
import
|
|
27
|
+
import LUIcon from "../Icons/LUIcon";
|
|
27
28
|
function Accordion(_a) {
|
|
28
29
|
var props = __rest(_a, []);
|
|
29
30
|
return _jsx(AccordionPrimitive.Root, __assign({ "data-slot": "accordion" }, props));
|
|
30
31
|
}
|
|
31
32
|
function AccordionItem(_a) {
|
|
32
33
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
33
|
-
return (_jsx(AccordionPrimitive.Item, __assign({ "data-slot": "accordion-item", className: cn("!border-b last:!border-b-
|
|
34
|
+
return (_jsx(AccordionPrimitive.Item, __assign({ "data-slot": "accordion-item", className: cn("!py-4 !border-b last:!border-b !border-gray-100", className) }, props)));
|
|
34
35
|
}
|
|
35
36
|
function AccordionTrigger(_a) {
|
|
36
37
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
37
|
-
|
|
38
|
+
var ref = React.useRef(null);
|
|
39
|
+
var _b = React.useState(false), isOpen = _b[0], setIsOpen = _b[1];
|
|
40
|
+
React.useEffect(function () {
|
|
41
|
+
var updateOpenState = function () {
|
|
42
|
+
if (ref.current) {
|
|
43
|
+
var state = ref.current.getAttribute("data-state");
|
|
44
|
+
setIsOpen(state === "open");
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
updateOpenState();
|
|
48
|
+
// Create a mutation observer to watch for attribute changes
|
|
49
|
+
var observer = new MutationObserver(updateOpenState);
|
|
50
|
+
if (ref.current) {
|
|
51
|
+
observer.observe(ref.current, {
|
|
52
|
+
attributes: true,
|
|
53
|
+
attributeFilter: ["data-state"],
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return function () { return observer.disconnect(); };
|
|
57
|
+
}, []);
|
|
58
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, __assign({ ref: ref, "data-slot": "accordion-trigger", className: cn("flex items-center gap-2 cursor-pointer !text-sm !font-normal !leading-normal grow", className) }, props, { children: [_jsx(LUIcon, { color: "dark-gray", icon: isOpen ? "minus" : "plus", size: "md", className: "pointer-events-none shrink-0" }), children] })) }));
|
|
38
59
|
}
|
|
39
60
|
function AccordionContent(_a) {
|
|
40
61
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
package/dist/styles/global.css
CHANGED
|
@@ -663,9 +663,6 @@
|
|
|
663
663
|
.items-center {
|
|
664
664
|
align-items: center;
|
|
665
665
|
}
|
|
666
|
-
.items-start {
|
|
667
|
-
align-items: flex-start;
|
|
668
|
-
}
|
|
669
666
|
.items-stretch {
|
|
670
667
|
align-items: stretch;
|
|
671
668
|
}
|
|
@@ -817,6 +814,9 @@
|
|
|
817
814
|
--tw-border-style: dashed !important;
|
|
818
815
|
border-style: dashed !important;
|
|
819
816
|
}
|
|
817
|
+
.\!border-gray-100 {
|
|
818
|
+
border-color: #ecedee !important;
|
|
819
|
+
}
|
|
820
820
|
.\!border-gray-300 {
|
|
821
821
|
border-color: #b7babd !important;
|
|
822
822
|
}
|
|
@@ -844,6 +844,9 @@
|
|
|
844
844
|
.\!bg-primary {
|
|
845
845
|
background-color: var(--primary) !important;
|
|
846
846
|
}
|
|
847
|
+
.\!bg-white {
|
|
848
|
+
background-color: #fefefe !important;
|
|
849
|
+
}
|
|
847
850
|
.bg-background {
|
|
848
851
|
background-color: var(--background);
|
|
849
852
|
}
|
|
@@ -1165,15 +1168,15 @@
|
|
|
1165
1168
|
.\!py-3\.5 {
|
|
1166
1169
|
padding-block: calc(var(--spacing) * 3.5) !important;
|
|
1167
1170
|
}
|
|
1171
|
+
.\!py-4 {
|
|
1172
|
+
padding-block: calc(var(--spacing) * 4) !important;
|
|
1173
|
+
}
|
|
1168
1174
|
.py-2 {
|
|
1169
1175
|
padding-block: calc(var(--spacing) * 2);
|
|
1170
1176
|
}
|
|
1171
1177
|
.\!ps-12 {
|
|
1172
1178
|
padding-inline-start: calc(var(--spacing) * 12) !important;
|
|
1173
1179
|
}
|
|
1174
|
-
.\!text-left {
|
|
1175
|
-
text-align: left !important;
|
|
1176
|
-
}
|
|
1177
1180
|
.text-center {
|
|
1178
1181
|
text-align: center;
|
|
1179
1182
|
}
|
|
@@ -1319,12 +1322,12 @@
|
|
|
1319
1322
|
.whitespace-nowrap {
|
|
1320
1323
|
white-space: nowrap;
|
|
1321
1324
|
}
|
|
1325
|
+
.\!text-black {
|
|
1326
|
+
color: #0f0f0f !important;
|
|
1327
|
+
}
|
|
1322
1328
|
.\!text-primary-foreground {
|
|
1323
1329
|
color: var(--primary-foreground) !important;
|
|
1324
1330
|
}
|
|
1325
|
-
.\!text-white {
|
|
1326
|
-
color: #fefefe !important;
|
|
1327
|
-
}
|
|
1328
1331
|
.text-blue-50 {
|
|
1329
1332
|
color: #fbfcfe;
|
|
1330
1333
|
}
|
|
@@ -1632,10 +1635,6 @@
|
|
|
1632
1635
|
--tw-duration: 150ms;
|
|
1633
1636
|
transition-duration: 150ms;
|
|
1634
1637
|
}
|
|
1635
|
-
.duration-200 {
|
|
1636
|
-
--tw-duration: 200ms;
|
|
1637
|
-
transition-duration: 200ms;
|
|
1638
|
-
}
|
|
1639
1638
|
.duration-300 {
|
|
1640
1639
|
--tw-duration: 300ms;
|
|
1641
1640
|
transition-duration: 300ms;
|
|
@@ -1773,10 +1772,10 @@
|
|
|
1773
1772
|
color: var(--muted-foreground);
|
|
1774
1773
|
}
|
|
1775
1774
|
}
|
|
1776
|
-
.last\:\!border-b
|
|
1775
|
+
.last\:\!border-b {
|
|
1777
1776
|
&:last-child {
|
|
1778
1777
|
border-bottom-style: var(--tw-border-style) !important;
|
|
1779
|
-
border-bottom-width:
|
|
1778
|
+
border-bottom-width: 1px !important;
|
|
1780
1779
|
}
|
|
1781
1780
|
}
|
|
1782
1781
|
.checked\:border-blue-600 {
|
|
@@ -3301,11 +3300,6 @@
|
|
|
3301
3300
|
flex-shrink: 0;
|
|
3302
3301
|
}
|
|
3303
3302
|
}
|
|
3304
|
-
.\[\&\[data-state\=open\]\>\.luIcon-wrapper\]\:rotate-180 {
|
|
3305
|
-
&[data-state=open]>.luIcon-wrapper {
|
|
3306
|
-
rotate: 180deg;
|
|
3307
|
-
}
|
|
3308
|
-
}
|
|
3309
3303
|
}
|
|
3310
3304
|
@property --tw-animation-delay {
|
|
3311
3305
|
syntax: "*";
|