linkedunion-design-kit 1.7.3 → 1.7.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.
Files changed (57) hide show
  1. package/dist/src/components/Button/Button.js +4 -4
  2. package/dist/src/components/Card/MultipleNews/MultiNews.jsx +73 -0
  3. package/dist/src/components/Card/MultipleNews/MultiNews.stories.d.ts +7 -7
  4. package/dist/src/components/Card/MultipleNews/MultiNews.stories.js +6 -6
  5. package/dist/src/components/Card/{MultiNews.stories.jsx → MultipleNews/MultiNews.stories.jsx} +1 -1
  6. package/dist/src/components/Card/PhotoGallery.jsx +17 -0
  7. package/dist/src/components/Card/PhotoGallery.stories.jsx +34 -0
  8. package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +10 -10
  9. package/dist/src/components/Card/SinglePost/SinglePost.d.ts +2 -0
  10. package/dist/src/components/Card/SinglePost/SinglePost.js +10 -0
  11. package/dist/src/components/Card/SinglePost/SinglePost.stories.d.ts +7 -0
  12. package/dist/src/components/Card/{MultiNews.stories.js → SinglePost/SinglePost.stories.js} +7 -13
  13. package/dist/src/components/Card/card.js +1 -1
  14. package/dist/src/components/Card/card.jsx +4 -2
  15. package/dist/src/components/Card/contactProfile/ContactProfile.jsx +60 -0
  16. package/dist/src/components/Card/{ContactProfile.stories.jsx → contactProfile/ContactProfile.stories.jsx} +1 -1
  17. package/dist/src/components/Icons/LUIcon.jsx +1 -1
  18. package/dist/src/components/ImageUploader/imageUploader.js +1 -1
  19. package/dist/src/components/ImageUploader/imageUploader.jsx +4 -2
  20. package/dist/src/components/Label/Label.jsx +1 -1
  21. package/dist/src/components/RadioButton/radio-button.jsx +0 -1
  22. package/dist/src/components/Slider/Slider.stories.jsx +159 -0
  23. package/dist/src/components/Slider/slider.jsx +31 -0
  24. package/dist/src/components/Typography/Heading/heading.jsx +1 -1
  25. package/dist/src/components/ui/accordion.js +1 -1
  26. package/dist/src/components/ui/accordion.jsx +4 -4
  27. package/dist/src/components/ui/switch.js +4 -4
  28. package/dist/src/components/ui/tabs.js +2 -2
  29. package/dist/src/components/ui/tabs.jsx +2 -3
  30. package/dist/src/utils/iconList.js +1 -1
  31. package/dist/styles/global.css +46 -26
  32. package/package.json +1 -1
  33. package/dist/src/components/Card/ContactProfile.d.ts +0 -2
  34. package/dist/src/components/Card/ContactProfile.js +0 -35
  35. package/dist/src/components/Card/ContactProfile.jsx +0 -57
  36. package/dist/src/components/Card/ContactProfile.stories.d.ts +0 -9
  37. package/dist/src/components/Card/ContactProfile.stories.js +0 -52
  38. package/dist/src/components/Card/MultiNews.d.ts +0 -2
  39. package/dist/src/components/Card/MultiNews.js +0 -43
  40. package/dist/src/components/Card/MultiNews.jsx +0 -59
  41. package/dist/src/components/Card/MultiNews.stories.d.ts +0 -9
  42. package/dist/src/components/Card/PostByCategory.d.ts +0 -2
  43. package/dist/src/components/Card/PostByCategory.js +0 -38
  44. package/dist/src/components/Card/PostByCategory.stories.d.ts +0 -9
  45. package/dist/src/components/Card/PostByCategory.stories.js +0 -54
  46. package/dist/src/components/EditorTooltip/EditorTooltip.d.ts +0 -5
  47. package/dist/src/components/EditorTooltip/EditorTooltip.js +0 -8
  48. package/dist/src/components/EditorTooltip/EditorTooltip.stories.d.ts +0 -6
  49. package/dist/src/components/EditorTooltip/EditorTooltip.stories.js +0 -24
  50. package/dist/src/components/Label/type.d.ts +0 -9
  51. package/dist/src/components/Label/type.js +0 -1
  52. package/dist/src/components/ui/body.d.ts +0 -0
  53. package/dist/src/components/ui/body.js +0 -1
  54. package/dist/src/components/ui/label.d.ts +0 -12
  55. package/dist/src/components/ui/label.js +0 -41
  56. package/dist/src/components/ui/radio-button.d.ts +0 -3
  57. package/dist/src/components/ui/radio-button.js +0 -42
@@ -0,0 +1,159 @@
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
+ };
@@ -0,0 +1,31 @@
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 };
@@ -53,7 +53,7 @@ function Heading(_a) {
53
53
  if (variant === null || variant === void 0 ? void 0 : variant.startsWith("h")) {
54
54
  Tag = variant.split("-")[0];
55
55
  }
56
- return (<Tag className={cn(headingVariants({ variant: variant, className: className }))} {...props}>
56
+ return (<Tag className={cn(headingVariants({ variant: variant, className: className }), "m-0")} {...props}>
57
57
  {children}
58
58
  </Tag>);
59
59
  }
@@ -38,6 +38,6 @@ function AccordionTrigger(_a) {
38
38
  }
39
39
  function AccordionContent(_a) {
40
40
  var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
41
- return (_jsx(AccordionPrimitive.Content, __assign({ "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm" }, props, { children: _jsx("div", { className: cn("!pt-0 !pb-4", className), children: children }) })));
41
+ return (_jsx(AccordionPrimitive.Content, __assign({ "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down !overflow-visible text-sm" }, props, { children: _jsx("div", { className: cn("!pt-0 !pb-4", className), children: children }) })));
42
42
  }
43
43
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import * as React from "react";
13
13
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
14
14
  import { cn } from "../../lib/utils";
15
- import LUIcon from "../Icons/LUIcon";
15
+ import { IconButton } from "../Button/IconButton";
16
16
  function Accordion(_a) {
17
17
  var props = __rest(_a, []);
18
18
  return <AccordionPrimitive.Root data-slot="accordion" {...props}/>;
@@ -24,15 +24,15 @@ function AccordionItem(_a) {
24
24
  function AccordionTrigger(_a) {
25
25
  var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
26
26
  return (<AccordionPrimitive.Header className="flex">
27
- <AccordionPrimitive.Trigger data-slot="accordion-trigger" className={cn("focus-visible:border-ring focus-visible:ring-ring/50 !flex !flex-1 !items-start !justify-between gap-4 !rounded-md !py-2 !text-left !text-sm !font-normal transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>div]:rotate-180", className)} {...props}>
27
+ <AccordionPrimitive.Trigger data-slot="accordion-trigger" className={cn("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between !rounded-md !py-2 !text-left !text-sm !font-normal transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>.luIcon-wrapper]:rotate-180", className)} {...props}>
28
28
  {children}
29
- <LUIcon icon={"angle-down"} size="sm" variant="padded" color="light-blue" className="bg-blue-100 text-blue-600 pointer-events-none shrink-0 translate-y-0.5 transition-transform duration-200"/>
29
+ <IconButton color="blue-light" icon="angle-down" size="sm" className="pointer-events-none shrink-0 transition-transform duration-200"/>
30
30
  </AccordionPrimitive.Trigger>
31
31
  </AccordionPrimitive.Header>);
32
32
  }
33
33
  function AccordionContent(_a) {
34
34
  var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
35
- return (<AccordionPrimitive.Content data-slot="accordion-content" className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm" {...props}>
35
+ return (<AccordionPrimitive.Content data-slot="accordion-content" className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down !overflow-visible text-sm" {...props}>
36
36
  <div className={cn("!pt-0 !pb-4", className)}>{children}</div>
37
37
  </AccordionPrimitive.Content>);
38
38
  }
@@ -59,12 +59,12 @@ var thumbVariants = cva("pointer-events-none block !rounded-full ring-0 transiti
59
59
  });
60
60
  // Define translate distance for each size
61
61
  var thumbTranslateVariants = {
62
- sm: "data-[state=checked]:translate-x-3",
63
- md: "data-[state=checked]:translate-x-7",
64
- lg: "data-[state=checked]:translate-x-9",
62
+ sm: "data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-2",
63
+ md: "data-[state=unchecked]:translate-x-0.5 data-[state=checked]:translate-x-7",
64
+ lg: "data-[state=unchecked]:translate-x-0.5 data-[state=checked]:translate-x-8",
65
65
  };
66
66
  function Switch(_a) {
67
67
  var className = _a.className, size = _a.size, variant = _a.variant, props = __rest(_a, ["className", "size", "variant"]);
68
- return (_jsx(SwitchPrimitive.Root, __assign({ "data-slot": "switch", className: cn(switchVariants({ size: size, variant: variant }), className) }, props, { children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn(thumbVariants({ size: size }), size ? thumbTranslateVariants[size] : "", "data-[state=unchecked]:translate-x-0 bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground") }) })));
68
+ return (_jsx(SwitchPrimitive.Root, __assign({ "data-slot": "switch", className: cn(switchVariants({ size: size, variant: variant }), className) }, props, { children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn(thumbVariants({ size: size }), size ? thumbTranslateVariants[size] : "", "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground") }) })));
69
69
  }
70
70
  export { Switch };
@@ -30,11 +30,11 @@ function Tabs(_a) {
30
30
  }
31
31
  function TabsList(_a) {
32
32
  var className = _a.className, props = __rest(_a, ["className"]);
33
- return (_jsx(TabsPrimitive.List, __assign({ "data-slot": "tabs-list", className: cn("bg-blue-100 !p-1 inline-flex items-center justify-center rounded-lg", className) }, props)));
33
+ return (_jsx(TabsPrimitive.List, __assign({ "data-slot": "tabs-list", className: cn("bg-blue-100 !p-1 sm:!p-2 rounded-lg", className) }, props)));
34
34
  }
35
35
  function TabsTrigger(_a) {
36
36
  var className = _a.className, props = __rest(_a, ["className"]);
37
- return (_jsx(TabsPrimitive.Trigger, __assign({ "data-slot": "tabs-trigger", className: cn("!py-2.5 !px-5 transition-all !rounded-sm text-sm font-normal w-full", "data-[state=active]:bg-blue-600 data-[state=active]:text-white", "data-[state=inactive]:bg-blue-100 data-[state=inactive]:text-blue-600", className) }, props)));
37
+ return (_jsx(TabsPrimitive.Trigger, __assign({ "data-slot": "tabs-trigger", className: cn("!py-2.5 !px-5 transition-all !rounded-sm text-sm font-normal w-1/2 max-sm:w-full", "data-[state=active]:bg-blue-600 data-[state=active]:text-white", "data-[state=inactive]:bg-blue-100 data-[state=inactive]:text-blue-600", className) }, props)));
38
38
  }
39
39
  function TabsContent(_a) {
40
40
  var className = _a.className, props = __rest(_a, ["className"]);
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  var __rest = (this && this.__rest) || function (s, e) {
3
2
  var t = {};
4
3
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -19,11 +18,11 @@ function Tabs(_a) {
19
18
  }
20
19
  function TabsList(_a) {
21
20
  var className = _a.className, props = __rest(_a, ["className"]);
22
- return (<TabsPrimitive.List data-slot="tabs-list" className={cn("bg-blue-100 !p-2 inline-flex w-fit items-center justify-center rounded-lg text-sm font-normal ", className)} {...props}/>);
21
+ return (<TabsPrimitive.List data-slot="tabs-list" className={cn("bg-blue-100 !p-1 sm:!p-2 rounded-lg", className)} {...props}/>);
23
22
  }
24
23
  function TabsTrigger(_a) {
25
24
  var className = _a.className, props = __rest(_a, ["className"]);
26
- return (<TabsPrimitive.Trigger data-slot="tabs-trigger" className={cn("!py-2.5 !px-5 transition-all rounded-sm", "data-[state=active]:bg-blue-600 data-[state=active]:text-white", "data-[state=inactive]:bg-blue-100 data-[state=inactive]:text-blue-600", className)} {...props}/>);
25
+ return (<TabsPrimitive.Trigger data-slot="tabs-trigger" className={cn("!py-2.5 !px-5 transition-all !rounded-sm text-sm font-normal max-sm:w-full w-1/2", "data-[state=active]:bg-blue-600 data-[state=active]:text-white", "data-[state=inactive]:bg-blue-100 data-[state=inactive]:text-blue-600", className)} {...props}/>);
27
26
  }
28
27
  function TabsContent(_a) {
29
28
  var className = _a.className, props = __rest(_a, ["className"]);
@@ -541,7 +541,7 @@ export var iconList = [
541
541
  },
542
542
  {
543
543
  key: "xMark",
544
- path: "M31.0529 5.46494C32.3024 4.21552 32.3024 2.18647 31.0529 0.937061C29.8035 -0.312354 27.7745 -0.312354 26.5251 0.937061L16 11.4721L5.46494 0.947056C4.21552 -0.302358 2.18647 -0.302358 0.937061 0.947056C-0.312354 2.19647 -0.312354 4.22552 0.937061 5.47493L11.4721 16L0.947056 26.5351C-0.302358 27.7845 -0.302358 29.8135 0.947056 31.0629C2.19647 32.3124 4.22552 32.3124 5.47493 31.0629L16 20.5279L26.5351 31.0529C27.7845 32.3024 29.8135 32.3024 31.0629 31.0529C32.3124 29.8035 32.3124 27.7745 31.0629 26.5251L20.5279 16L31.0529 5.46494Z",
544
+ path: "M28.0991 0.66939C28.9917 -0.223089 30.4379 -0.223155 31.3305 0.66939C32.2231 1.56199 32.223 3.00817 31.3305 3.90084L19.2309 15.9995L31.3305 28.0981L31.4877 28.271C32.2202 29.1687 32.1675 30.4936 31.3305 31.3305C30.4936 32.1675 29.1687 32.2202 28.271 31.4877L28.0981 31.3305L15.9995 19.2309L3.90084 31.3305C3.00817 32.223 1.56199 32.2231 0.66939 31.3305C-0.223155 30.4379 -0.223089 28.9917 0.66939 28.0991L12.768 15.9995L0.66939 3.90084C-0.223069 3.00818 -0.223191 1.56197 0.66939 0.66939C1.56197 -0.223191 3.00818 -0.223069 3.90084 0.66939L15.9995 12.768L28.0991 0.66939Z",
545
545
  label: "xMark",
546
546
  },
547
547
  {
@@ -500,6 +500,9 @@
500
500
  .\!w-fit {
501
501
  width: fit-content !important;
502
502
  }
503
+ .w-1\/2 {
504
+ width: calc(1/2 * 100%);
505
+ }
503
506
  .w-6 {
504
507
  width: calc(var(--spacing) * 6);
505
508
  }
@@ -613,9 +616,6 @@
613
616
  .grid-cols-1 {
614
617
  grid-template-columns: repeat(1, minmax(0, 1fr));
615
618
  }
616
- .grid-cols-2 {
617
- grid-template-columns: repeat(2, minmax(0, 1fr));
618
- }
619
619
  .grid-cols-3 {
620
620
  grid-template-columns: repeat(3, minmax(0, 1fr));
621
621
  }
@@ -652,6 +652,9 @@
652
652
  .\!gap-2 {
653
653
  gap: calc(var(--spacing) * 2) !important;
654
654
  }
655
+ .\!gap-3 {
656
+ gap: calc(var(--spacing) * 3) !important;
657
+ }
655
658
  .\!gap-5 {
656
659
  gap: calc(var(--spacing) * 5) !important;
657
660
  }
@@ -664,9 +667,6 @@
664
667
  .gap-2 {
665
668
  gap: calc(var(--spacing) * 2);
666
669
  }
667
- .gap-3 {
668
- gap: calc(var(--spacing) * 3);
669
- }
670
670
  .gap-5 {
671
671
  gap: calc(var(--spacing) * 5);
672
672
  }
@@ -700,6 +700,9 @@
700
700
  margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)));
701
701
  }
702
702
  }
703
+ .\!overflow-visible {
704
+ overflow: visible !important;
705
+ }
703
706
  .overflow-hidden {
704
707
  overflow: hidden;
705
708
  }
@@ -751,18 +754,6 @@
751
754
  .rounded-xs {
752
755
  border-radius: var(--radius-xs);
753
756
  }
754
- .rounded-tl-3xl {
755
- border-top-left-radius: var(--radius-3xl);
756
- }
757
- .rounded-tr-3xl {
758
- border-top-right-radius: var(--radius-3xl);
759
- }
760
- .rounded-br-3xl {
761
- border-bottom-right-radius: var(--radius-3xl);
762
- }
763
- .rounded-bl-3xl {
764
- border-bottom-left-radius: var(--radius-3xl);
765
- }
766
757
  .\!border {
767
758
  border-style: var(--tw-border-style) !important;
768
759
  border-width: 1px !important;
@@ -1218,14 +1209,14 @@
1218
1209
  font-size: var(--text-xs);
1219
1210
  line-height: var(--tw-leading, var(--text-xs--line-height));
1220
1211
  }
1212
+ .\!leading-5 {
1213
+ --tw-leading: calc(var(--spacing) * 5) !important;
1214
+ line-height: calc(var(--spacing) * 5) !important;
1215
+ }
1221
1216
  .\!leading-normal {
1222
1217
  --tw-leading: var(--leading-normal) !important;
1223
1218
  line-height: var(--leading-normal) !important;
1224
1219
  }
1225
- .leading-5 {
1226
- --tw-leading: calc(var(--spacing) * 5);
1227
- line-height: calc(var(--spacing) * 5);
1228
- }
1229
1220
  .leading-none {
1230
1221
  --tw-leading: 1;
1231
1222
  line-height: 1;
@@ -2941,9 +2932,9 @@
2941
2932
  color: #fefefe;
2942
2933
  }
2943
2934
  }
2944
- .data-\[state\=checked\]\:translate-x-3 {
2935
+ .data-\[state\=checked\]\:translate-x-2 {
2945
2936
  &[data-state="checked"] {
2946
- --tw-translate-x: calc(var(--spacing) * 3);
2937
+ --tw-translate-x: calc(var(--spacing) * 2);
2947
2938
  translate: var(--tw-translate-x) var(--tw-translate-y);
2948
2939
  }
2949
2940
  }
@@ -2953,9 +2944,9 @@
2953
2944
  translate: var(--tw-translate-x) var(--tw-translate-y);
2954
2945
  }
2955
2946
  }
2956
- .data-\[state\=checked\]\:translate-x-9 {
2947
+ .data-\[state\=checked\]\:translate-x-8 {
2957
2948
  &[data-state="checked"] {
2958
- --tw-translate-x: calc(var(--spacing) * 9);
2949
+ --tw-translate-x: calc(var(--spacing) * 8);
2959
2950
  translate: var(--tw-translate-x) var(--tw-translate-y);
2960
2951
  }
2961
2952
  }
@@ -3027,6 +3018,12 @@
3027
3018
  translate: var(--tw-translate-x) var(--tw-translate-y);
3028
3019
  }
3029
3020
  }
3021
+ .data-\[state\=unchecked\]\:translate-x-0\.5 {
3022
+ &[data-state="unchecked"] {
3023
+ --tw-translate-x: calc(var(--spacing) * 0.5);
3024
+ translate: var(--tw-translate-x) var(--tw-translate-y);
3025
+ }
3026
+ }
3030
3027
  .data-\[state\=unchecked\]\:bg-input {
3031
3028
  &[data-state="unchecked"] {
3032
3029
  background-color: var(--input);
@@ -3060,6 +3057,11 @@
3060
3057
  margin-top: 7px;
3061
3058
  }
3062
3059
  }
3060
+ .max-sm\:w-full {
3061
+ @media (width < 40rem) {
3062
+ width: 100%;
3063
+ }
3064
+ }
3063
3065
  .sm\:col-span-2 {
3064
3066
  @media (width >= 40rem) {
3065
3067
  grid-column: span 2 / span 2;
@@ -3070,6 +3072,11 @@
3070
3072
  aspect-ratio: 1 / 1;
3071
3073
  }
3072
3074
  }
3075
+ .sm\:grid-cols-2 {
3076
+ @media (width >= 40rem) {
3077
+ grid-template-columns: repeat(2, minmax(0, 1fr));
3078
+ }
3079
+ }
3073
3080
  .sm\:grid-cols-3 {
3074
3081
  @media (width >= 40rem) {
3075
3082
  grid-template-columns: repeat(3, minmax(0, 1fr));
@@ -3090,11 +3097,24 @@
3090
3097
  grid-template-columns: auto 1fr;
3091
3098
  }
3092
3099
  }
3100
+ .sm\:\!p-2 {
3101
+ @media (width >= 40rem) {
3102
+ padding: calc(var(--spacing) * 2) !important;
3103
+ }
3104
+ }
3093
3105
  .sm\:\!text-left {
3094
3106
  @media (width >= 40rem) {
3095
3107
  text-align: left !important;
3096
3108
  }
3097
3109
  }
3110
+ .md\:line-clamp-2 {
3111
+ @media (width >= 48rem) {
3112
+ overflow: hidden;
3113
+ display: -webkit-box;
3114
+ -webkit-box-orient: vertical;
3115
+ -webkit-line-clamp: 2;
3116
+ }
3117
+ }
3098
3118
  .md\:grid-cols-6 {
3099
3119
  @media (width >= 48rem) {
3100
3120
  grid-template-columns: repeat(6, minmax(0, 1fr));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkedunion-design-kit",
3
- "version": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,2 +0,0 @@
1
- import { CardInterface } from "./type";
2
- export declare const ContactProfile: ({ item, image, href, btnLabel, editor, mediaPosition, orientation, }: CardInterface) => import("react/jsx-runtime").JSX.Element;
@@ -1,35 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import LuImage from "../Images/LuImage";
3
- import Link from "next/link";
4
- import { Heading } from "../Typography/Heading/heading";
5
- import { Body } from "../Typography/Body/body";
6
- import { Button } from "../Button/Button";
7
- export var ContactProfile = function (_a) {
8
- var item = _a.item, image = _a.image, _b = _a.href, href = _b === void 0 ? "https://www.google.com/" : _b, _c = _a.btnLabel, btnLabel = _c === void 0 ? "View More" : _c, editor = _a.editor, _d = _a.mediaPosition, mediaPosition = _d === void 0 ? "right" : _d, orientation = _a.orientation;
9
- // Normalize mediaPosition based on orientation
10
- var normalizedMediaPosition = orientation === "horizontal"
11
- ? mediaPosition === "left" || mediaPosition === "right"
12
- ? mediaPosition
13
- : "right"
14
- : mediaPosition === "top" || mediaPosition === "bottom"
15
- ? mediaPosition
16
- : "top";
17
- // Common image component to avoid repetition
18
- var ProfileImage = function () { return (_jsx(LuImage, { src: image, width: 240, height: 240, className: "w-full h-full rounded-full max-w-[160px] aspect-square object-cover ".concat(editor === null || editor === void 0 ? void 0 : editor.cardImage), alt: "Image" })); };
19
- // Common content section (title and description)
20
- var ContentSection = function (_a) {
21
- var _b = _a.className, className = _b === void 0 ? "" : _b;
22
- return (_jsxs("div", { className: "flex flex-col gap-1 ".concat(className), children: [_jsx(Heading, { variant: "h5-700", className: "".concat(editor === null || editor === void 0 ? void 0 : editor.cardTitle), children: item === null || item === void 0 ? void 0 : item.title }), _jsx(Body, { variant: "body-md", className: "".concat(editor === null || editor === void 0 ? void 0 : editor.cardText, " line-clamp-2"), children: item === null || item === void 0 ? void 0 : item.description })] }));
23
- };
24
- // Common button component
25
- var ActionButton = function (_a) {
26
- var _b = _a.className, className = _b === void 0 ? "" : _b;
27
- return (_jsx(Link, { href: href, passHref: true, className: className, children: _jsx(Button, { endIcon: "angle-right", size: "sm", className: "".concat(editor === null || editor === void 0 ? void 0 : editor.cardBtn), children: btnLabel }) }));
28
- };
29
- // Horizontal layout card
30
- if (orientation === "horizontal") {
31
- return (_jsxs("div", { className: "p-5 bg-white rounded-xl inline-flex ".concat(normalizedMediaPosition === "right" ? "flex-row-reverse" : "", " gap-10 items-center shadow-lg ").concat(editor === null || editor === void 0 ? void 0 : editor.card), children: [_jsx(ProfileImage, {}), _jsxs("div", { className: "flex flex-col gap-1 w-full", children: [_jsx(ContentSection, {}), _jsx(ActionButton, { className: "mt-5" })] })] }));
32
- }
33
- // Vertical layout card
34
- return (_jsxs("div", { className: "p-8 bg-white rounded-xl inline-flex flex-col gap-5 max-w-[365px] items-center shadow-lg ".concat(editor === null || editor === void 0 ? void 0 : editor.card), children: [_jsxs("div", { className: "flex ".concat(normalizedMediaPosition === "top" ? "flex-col" : "flex-col-reverse", " items-center gap-5 text-center"), children: [_jsx(ProfileImage, {}), _jsx(ContentSection, {})] }), _jsx(ActionButton, {})] }));
35
- };
@@ -1,57 +0,0 @@
1
- import LuImage from "../Images/LuImage";
2
- import Link from "next/link";
3
- import { Heading } from "../Typography/Heading/heading";
4
- import { Body } from "../Typography/Body/body";
5
- import { Button } from "../Button/Button";
6
- export var ContactProfile = function (_a) {
7
- var item = _a.item, image = _a.image, _b = _a.href, href = _b === void 0 ? "https://www.google.com/" : _b, _c = _a.btnLabel, btnLabel = _c === void 0 ? "View More" : _c, editor = _a.editor, _d = _a.mediaPosition, mediaPosition = _d === void 0 ? "right" : _d, orientation = _a.orientation;
8
- // Normalize mediaPosition based on orientation
9
- var normalizedMediaPosition = orientation === "horizontal"
10
- ? mediaPosition === "left" || mediaPosition === "right"
11
- ? mediaPosition
12
- : "right"
13
- : mediaPosition === "top" || mediaPosition === "bottom"
14
- ? mediaPosition
15
- : "top";
16
- // Common image component to avoid repetition
17
- var ProfileImage = function () { return (<LuImage src={image} width={240} height={240} className={"w-full h-full rounded-full max-w-[160px] aspect-square object-cover ".concat(editor === null || editor === void 0 ? void 0 : editor.cardImage)} alt="Image"/>); };
18
- // Common content section (title and description)
19
- var ContentSection = function (_a) {
20
- var _b = _a.className, className = _b === void 0 ? "" : _b;
21
- return (<div className={"flex flex-col gap-1 ".concat(className)}>
22
- <Heading variant="h5-700" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardTitle)}>
23
- {item === null || item === void 0 ? void 0 : item.title}
24
- </Heading>
25
- <Body variant="body-md" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardText, " line-clamp-2")}>
26
- {item === null || item === void 0 ? void 0 : item.description}
27
- </Body>
28
- </div>);
29
- };
30
- // Common button component
31
- var ActionButton = function (_a) {
32
- var _b = _a.className, className = _b === void 0 ? "" : _b;
33
- return (<Link href={href} passHref className={className}>
34
- <Button endIcon={"angle-right"} size="sm" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardBtn)}>
35
- {btnLabel}
36
- </Button>
37
- </Link>);
38
- };
39
- // Horizontal layout card
40
- if (orientation === "horizontal") {
41
- return (<div className={"p-5 bg-white rounded-xl inline-flex ".concat(normalizedMediaPosition === "right" ? "flex-row-reverse" : "", " gap-10 items-center shadow-lg ").concat(editor === null || editor === void 0 ? void 0 : editor.card)}>
42
- <ProfileImage />
43
- <div className="flex flex-col gap-1 w-full">
44
- <ContentSection />
45
- <ActionButton className="mt-5"/>
46
- </div>
47
- </div>);
48
- }
49
- // Vertical layout card
50
- return (<div className={"p-8 bg-white rounded-xl inline-flex flex-col gap-5 max-w-[365px] items-center shadow-lg ".concat(editor === null || editor === void 0 ? void 0 : editor.card)}>
51
- <div className={"flex ".concat(normalizedMediaPosition === "top" ? "flex-col" : "flex-col-reverse", " items-center gap-5 text-center")}>
52
- <ProfileImage />
53
- <ContentSection />
54
- </div>
55
- <ActionButton />
56
- </div>);
57
- };
@@ -1,9 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { ContactProfile } from "./ContactProfile";
3
- declare const meta: Meta<typeof ContactProfile>;
4
- export default meta;
5
- type Story = StoryObj<typeof ContactProfile>;
6
- export declare const ContactProfileHorizontalLeft: Story;
7
- export declare const ContactProfileHorizontalRight: Story;
8
- export declare const ContactProfileVerticalTop: Story;
9
- export declare const ContactProfileVerticalBottom: Story;
@@ -1,52 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { ContactProfile } from "./ContactProfile";
13
- import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, Dummy_Url, } from "../../utils/constants";
14
- var meta = {
15
- title: "Components/NewCard/ContactProfile",
16
- component: ContactProfile,
17
- parameters: {
18
- layout: "centered",
19
- },
20
- };
21
- export default meta;
22
- var baseCardArgs = {
23
- type: "contactProfile",
24
- item: {
25
- image: Dummy_Image,
26
- title: Dummy_Title,
27
- description: Dummy_Para,
28
- subtitle: Dummy_Subtitle,
29
- },
30
- image: Dummy_Image,
31
- href: Dummy_Url,
32
- btnLabel: "View More",
33
- editor: {
34
- card: "",
35
- cardImage: "",
36
- cardTitle: "",
37
- cardText: "",
38
- cardBtn: "",
39
- },
40
- };
41
- export var ContactProfileHorizontalLeft = {
42
- args: __assign(__assign({}, baseCardArgs), { orientation: "horizontal", mediaPosition: "left" }),
43
- };
44
- export var ContactProfileHorizontalRight = {
45
- args: __assign(__assign({}, baseCardArgs), { orientation: "horizontal", mediaPosition: "right" }),
46
- };
47
- export var ContactProfileVerticalTop = {
48
- args: __assign(__assign({}, baseCardArgs), { orientation: "vertical", mediaPosition: "top" }),
49
- };
50
- export var ContactProfileVerticalBottom = {
51
- args: __assign(__assign({}, baseCardArgs), { orientation: "vertical", mediaPosition: "bottom" }),
52
- };
@@ -1,2 +0,0 @@
1
- import { CardInterface } from "./type";
2
- export declare const MultiNews: ({ item, image, href, btnLabel, editor, mediaPosition, orientation, }: CardInterface) => import("react/jsx-runtime").JSX.Element;