linkedunion-design-kit 1.10.5-beta.0 → 1.10.5-beta.2

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.
@@ -14,7 +14,7 @@ export var buttonStyles = {
14
14
  "light-indigo": "bg-indigo-100 text-indigo-600 hover:bg-indigo-700 hover:text-indigo-50 active:bg-indigo-800 active:text-indigo-50",
15
15
  gray: "bg-gray-900 text-gray-50 hover:bg-gray-100 hover:text-gray-950 active:bg-gray-300 active:text-gray-950",
16
16
  "light-gray": "bg-gray-50 text-gray-950 hover:bg-gray-100 active:bg-gray-300",
17
- disabled: "bg-gray-100 text-gray-300",
17
+ disabled: "bg-gray-100 text-gray-300 cursor-not-allowed",
18
18
  },
19
19
  size: {
20
20
  xl: "h-13 !py-3.5 !px-6 !text-base !font-normal !leading-normal",
@@ -32,7 +32,7 @@ export var ContactProfile = function (_a) {
32
32
  };
33
33
  // Horizontal layout
34
34
  if (orientation === "horizontal") {
35
- return (_jsxs("div", { className: "!p-5 bg-white rounded-xl flex ".concat(safeMediaPosition === "left" ? "sm:flex-row" : "sm:flex-row-reverse", " max-w-5xl !gap-5 items-center shadow-lg ").concat(editor === null || editor === void 0 ? void 0 : editor.card), children: [_jsx(CardMedia, { className: "".concat(safeMediaPosition === "right" ? "order-3" : "order-1", " w-full max-w-40 aspect-square object-cover") }), _jsxs("div", { className: "flex-1 flex flex-col !gap-1 md:!gap-2.5 text-center sm:!text-left h-full justify-center min-w-0 ".concat(safeMediaPosition === "right" ? "order-1" : "order-2"), children: [_jsx(CardContent, {}), _jsx(CardButton, {})] })] }));
35
+ return (_jsxs("div", { className: "!p-5 bg-white rounded-xl flex ".concat(safeMediaPosition === "left" ? "sm:flex-row" : "sm:flex-row-reverse", " max-w-5xl !gap-5 items-center shadow-lg ").concat(editor === null || editor === void 0 ? void 0 : editor.card), children: [_jsx(CardMedia, { className: "".concat(safeMediaPosition === "right" ? "order-3" : "order-1", " w-full max-w-40 aspect-square object-cover") }), _jsxs("div", { className: "flex-1 flex flex-col !gap-1 md:!gap-2.5 sm:!text-left h-full justify-center min-w-0 ".concat(safeMediaPosition === "right" ? "order-1" : "order-2"), children: [_jsx(CardContent, {}), _jsx(CardButton, {})] })] }));
36
36
  }
37
37
  // Vertical layout
38
38
  return (_jsxs("div", { className: "p-8 bg-white rounded-xl flex flex-col gap-6 max-w-md items-center shadow-lg ".concat(editor === null || editor === void 0 ? void 0 : editor.card), children: [_jsxs("div", { className: "flex w-full ".concat(safeMediaPosition === "top" ? "flex-col" : "flex-col-reverse", " items-center !gap-5 text-center"), children: [_jsx(CardMedia, { className: "w-full h-full aspect-5/4 object-cover" }), _jsx(CardContent, { className: "h-20" })] }), _jsx(CardButton, {})] }));
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Dialog } from "../../../components/ui/dialog";
3
+ declare const meta: Meta<typeof Dialog>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Dialog>;
6
+ export declare const Default: Story;
7
+ export declare const WithoutCloseButton: Story;
8
+ export declare const LongContent: Story;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "../../../components/ui/dialog";
3
+ import { Button } from "../../../components/Button/Button/Button";
4
+ var meta = {
5
+ title: "Components/Dialog",
6
+ component: Dialog,
7
+ tags: ["autodocs"],
8
+ parameters: {
9
+ layout: "centered",
10
+ },
11
+ };
12
+ export default meta;
13
+ export var Default = {
14
+ render: function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Dialog" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Dialog Title" }), _jsx(DialogDescription, { children: "This is a simple dialog component. You can use it to display important information or get user confirmation." })] }), _jsx("div", { className: "py-4", children: _jsx("p", { className: "text-sm", children: "Dialog content goes here." }) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", children: "Cancel" }), _jsx(Button, { children: "Confirm" })] })] })] })); },
15
+ };
16
+ export var WithoutCloseButton = {
17
+ render: function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Dialog" }) }), _jsxs(DialogContent, { showCloseButton: false, children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Confirmation Required" }), _jsx(DialogDescription, { children: "This dialog doesn't have a close button. You must use one of the action buttons below." })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", children: "Cancel" }), _jsx(Button, { children: "Confirm" })] })] })] })); },
18
+ };
19
+ export var LongContent = {
20
+ render: function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Dialog" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Terms and Conditions" }), _jsx(DialogDescription, { children: "Please read the following terms carefully." })] }), _jsxs("div", { className: "py-4 max-h-[400px] overflow-y-auto", children: [_jsx("p", { className: "text-sm mb-4", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }), _jsx("p", { className: "text-sm mb-4", children: "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." }), _jsx("p", { className: "text-sm mb-4", children: "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." }), _jsx("p", { className: "text-sm", children: "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", children: "Decline" }), _jsx(Button, { children: "Accept" })] })] })] })); },
21
+ };
@@ -39,7 +39,7 @@ var DialogOverlay = React.forwardRef(function (_a, ref) {
39
39
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
40
40
  var DialogContent = React.forwardRef(function (_a, ref) {
41
41
  var className = _a.className, children = _a.children, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.shadow, shadow = _c === void 0 ? true : _c, _d = _a.showCloseIcon, showCloseIcon = _d === void 0 ? true : _d, props = __rest(_a, ["className", "children", "size", "shadow", "showCloseIcon"]);
42
- return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(ModalSizeContext.Provider, { value: size, children: _jsxs(DialogPrimitive.Content, __assign({ ref: ref, className: cn("fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%] gap-0 border bg-background rounded-lg transition-all duration-300 ease-in-out data-[state=open]:opacity-100 data-[state=open]:scale-100 data-[state=closed]:opacity-0 data-[state=closed]:scale-95 overflow-hidden", sizes[size], shadow ? "shadow-backdrop-shadow-xl" : "shadow-none", className) }, props, { children: [children, showCloseIcon && (_jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-offset-2 hover:cursor-pointer disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(LUIcon, { icon: "xMark", size: iconSizes[size] }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })) })] }));
42
+ return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(ModalSizeContext.Provider, { value: size, children: _jsxs(DialogPrimitive.Content, __assign({ ref: ref, className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-0 border bg-background rounded-lg transition-all duration-300 ease-in-out data-[state=open]:opacity-100 data-[state=open]:scale-100 data-[state=closed]:opacity-0 data-[state=closed]:scale-95 overflow-hidden", sizes[size], shadow ? "shadow-backdrop-shadow-xl" : "shadow-none", className) }, props, { children: [children, showCloseIcon && (_jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-offset-2 hover:cursor-pointer disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(LUIcon, { icon: "xMark", variant: "padded", size: iconSizes[size] }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })) })] }));
43
43
  });
44
44
  DialogContent.displayName = DialogPrimitive.Content.displayName;
45
45
  var DialogHeader = function (_a) {
@@ -52,7 +52,7 @@ var DialogHeader = function (_a) {
52
52
  DialogHeader.displayName = "DialogHeader";
53
53
  var DialogBody = function (_a) {
54
54
  var className = _a.className, props = __rest(_a, ["className"]);
55
- return (_jsx("div", __assign({ className: cn("py-4 px-4", className) }, props)));
55
+ return (_jsx("div", __assign({ className: cn("!py-4 !px-4", className) }, props)));
56
56
  };
57
57
  DialogBody.displayName = "DialogBody";
58
58
  var DialogFooter = function (_a) {
@@ -65,10 +65,10 @@ var DialogFooter = function (_a) {
65
65
  DialogFooter.displayName = "DialogFooter";
66
66
  var DialogTitle = React.forwardRef(function (_a, ref) {
67
67
  var _b;
68
- var className = _a.className, size = _a.size, props = __rest(_a, ["className", "size"]);
68
+ var className = _a.className, size = _a.size, children = _a.children, props = __rest(_a, ["className", "size", "children"]);
69
69
  var contextSize = React.useContext(ModalSizeContext);
70
70
  var effectiveSize = (_b = size !== null && size !== void 0 ? size : contextSize) !== null && _b !== void 0 ? _b : "md";
71
- return (_jsx(DialogPrimitive.Title, __assign({ ref: ref, className: cn(titleSizeClasses[effectiveSize], "leading-normal text-gray-950", className), "data-size": effectiveSize }, props)));
71
+ return (_jsx(DialogPrimitive.Title, __assign({ ref: ref, className: cn("leading-normal text-gray-950", titleSizeClasses[effectiveSize], className), "data-size": effectiveSize }, props, { children: children })));
72
72
  });
73
73
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
74
74
  var DialogSubTitle = React.forwardRef(function (_a, ref) {
@@ -37,9 +37,9 @@ export declare const titleSizeClasses: {
37
37
  full: string;
38
38
  };
39
39
  export declare const subTitleSizeClasses: {
40
- sm: string;
41
- md: string;
42
- lg: string;
43
- xl: string;
44
- full: string;
40
+ readonly sm: `!pt-0 !px-4 !pb-3 ${string}`;
41
+ readonly md: `!pt-0 !px-4 !pb-3 ${string}`;
42
+ readonly lg: `!pt-0 !px-4 !pb-4 ${string}`;
43
+ readonly xl: `!pt-0 !px-4 !pb-4 ${string}`;
44
+ readonly full: `!pt-0 !px-4 !pb-4 ${string}`;
45
45
  };
@@ -1,11 +1,11 @@
1
1
  import { variant } from "../Typography/Heading/heading";
2
2
  import { variant as bodyVariant } from "../Typography/Body/body";
3
3
  export var sizes = {
4
- sm: "max-w-xs",
5
- md: "max-w-lg",
6
- lg: "max-w-4xl",
7
- xl: "max-w-6xl",
8
- full: "w-full",
4
+ sm: "max-w-[min(20rem,calc(100%-2rem))]",
5
+ md: "max-w-[min(32rem,calc(100%-2rem))]",
6
+ lg: "max-w-[min(56rem,calc(100%-2rem))]",
7
+ xl: "max-w-[min(72rem,calc(100%-2rem))]",
8
+ full: "max-w-[calc(100%-2rem)]",
9
9
  };
10
10
  export var iconSizes = {
11
11
  sm: "sm",
@@ -38,6 +38,13 @@ export var titleSizeClasses = {
38
38
  xl: "!pt-4 !px-4 !pb-0 ".concat(variant["h4-600"]),
39
39
  full: "!pt-4 !px-4 !pb-0 ".concat(variant["h4-600"]),
40
40
  };
41
+ // export const titleSizeClasses = {
42
+ // sm: `h5-600`,
43
+ // md: `h5-600`,
44
+ // lg: `h4-600`,
45
+ // xl: `h4-600`,
46
+ // full: `h4-600`,
47
+ // } as const;
41
48
  export var subTitleSizeClasses = {
42
49
  sm: "!pt-0 !px-4 !pb-3 ".concat(bodyVariant["body-sm"]),
43
50
  md: "!pt-0 !px-4 !pb-3 ".concat(bodyVariant["body-md"]),
@@ -47,7 +47,7 @@ function DialogOverlay(_a) {
47
47
  }
48
48
  function DialogContent(_a) {
49
49
  var className = _a.className, children = _a.children, _b = _a.showCloseButton, showCloseButton = _b === void 0 ? true : _b, props = __rest(_a, ["className", "children", "showCloseButton"]);
50
- return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, __assign({ "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200", className) }, props, { children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] }))] }));
50
+ return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, __assign({ "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className) }, props, { children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] }))] }));
51
51
  }
52
52
  function DialogHeader(_a) {
53
53
  var className = _a.className, props = __rest(_a, ["className"]);
@@ -11,9 +11,7 @@
11
11
  --container-xs: 20rem;
12
12
  --container-md: 28rem;
13
13
  --container-lg: 32rem;
14
- --container-4xl: 56rem;
15
14
  --container-5xl: 64rem;
16
- --container-6xl: 72rem;
17
15
  --text-xs: 0.75rem;
18
16
  --text-xs--line-height: calc(1 / 0.75);
19
17
  --text-sm: 0.875rem;
@@ -867,15 +865,9 @@
867
865
  .w-xs {
868
866
  width: var(--container-xs);
869
867
  }
870
- .max-w-4xl {
871
- max-width: var(--container-4xl);
872
- }
873
868
  .max-w-5xl {
874
869
  max-width: var(--container-5xl);
875
870
  }
876
- .max-w-6xl {
877
- max-width: var(--container-6xl);
878
- }
879
871
  .max-w-40 {
880
872
  max-width: calc(var(--spacing) * 40);
881
873
  }
@@ -891,18 +883,24 @@
891
883
  .max-w-\[calc\(100\%-2rem\)\] {
892
884
  max-width: calc(100% - 2rem);
893
885
  }
886
+ .max-w-\[min\(20rem\,calc\(100\%-2rem\)\)\] {
887
+ max-width: min(20rem, calc(100% - 2rem));
888
+ }
889
+ .max-w-\[min\(32rem\,calc\(100\%-2rem\)\)\] {
890
+ max-width: min(32rem, calc(100% - 2rem));
891
+ }
892
+ .max-w-\[min\(56rem\,calc\(100\%-2rem\)\)\] {
893
+ max-width: min(56rem, calc(100% - 2rem));
894
+ }
895
+ .max-w-\[min\(72rem\,calc\(100\%-2rem\)\)\] {
896
+ max-width: min(72rem, calc(100% - 2rem));
897
+ }
894
898
  .max-w-fit {
895
899
  max-width: fit-content;
896
900
  }
897
- .max-w-lg {
898
- max-width: var(--container-lg);
899
- }
900
901
  .max-w-md {
901
902
  max-width: var(--container-md);
902
903
  }
903
- .max-w-xs {
904
- max-width: var(--container-xs);
905
- }
906
904
  .min-w-0 {
907
905
  min-width: calc(var(--spacing) * 0);
908
906
  }
@@ -1650,6 +1648,9 @@
1650
1648
  .bg-yellow-950 {
1651
1649
  background-color: #473800;
1652
1650
  }
1651
+ .lu-bg-transparent {
1652
+ background-color: transparent;
1653
+ }
1653
1654
  .bg-linear-to-t {
1654
1655
  --tw-gradient-position: to top;
1655
1656
  @supports (background-image: linear-gradient(in lab, red, red)) {
@@ -1827,9 +1828,6 @@
1827
1828
  .py-3 {
1828
1829
  padding-block: calc(var(--spacing) * 3);
1829
1830
  }
1830
- .py-4 {
1831
- padding-block: calc(var(--spacing) * 4);
1832
- }
1833
1831
  .py-6 {
1834
1832
  padding-block: calc(var(--spacing) * 6);
1835
1833
  }
@@ -3224,6 +3222,13 @@
3224
3222
  }
3225
3223
  }
3226
3224
  }
3225
+ .hover\:lu-bg-transparent {
3226
+ &:hover {
3227
+ @media (hover: hover) {
3228
+ background-color: transparent;
3229
+ }
3230
+ }
3231
+ }
3227
3232
  .hover\:text-blue-50 {
3228
3233
  &:hover {
3229
3234
  @media (hover: hover) {
@@ -3725,6 +3730,11 @@
3725
3730
  background-color: var(--accent);
3726
3731
  }
3727
3732
  }
3733
+ .focus\:lu-bg-transparent {
3734
+ &:focus {
3735
+ background-color: transparent;
3736
+ }
3737
+ }
3728
3738
  .focus\:text-accent-foreground {
3729
3739
  &:focus {
3730
3740
  color: var(--accent-foreground);
@@ -3966,6 +3976,11 @@
3966
3976
  background-color: #dbac00;
3967
3977
  }
3968
3978
  }
3979
+ .active\:lu-bg-transparent {
3980
+ &:active {
3981
+ background-color: transparent;
3982
+ }
3983
+ }
3969
3984
  .active\:text-blue-50 {
3970
3985
  &:active {
3971
3986
  color: #fbfcfe;
@@ -5286,11 +5301,6 @@
5286
5301
  --sidebar-border: oklch(0.922 0 0);
5287
5302
  --sidebar-ring: oklch(0.708 0 0);
5288
5303
  }
5289
- @layer utilities {
5290
- .lu-bg-transparent {
5291
- background-color: transparent;
5292
- }
5293
- }
5294
5304
  @property --tw-border-spacing-x {
5295
5305
  syntax: "<length>";
5296
5306
  inherits: false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkedunion-design-kit",
3
- "version": "1.10.5-beta.0",
3
+ "version": "1.10.5-beta.2",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",