@algorithm-shift/design-system 1.2.13 → 1.2.15

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.mts CHANGED
@@ -97,6 +97,7 @@ interface NotificationProps extends ElementProps {
97
97
 
98
98
  interface LogoProps extends ElementProps {
99
99
  imageUrl?: string;
100
+ altText?: string;
100
101
  }
101
102
 
102
103
  declare const Flex: ({ children, className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
@@ -110,7 +111,7 @@ declare const Typography: ({ className, style, tagName, textContent, }: Typograp
110
111
 
111
112
  declare const Shape: ({ children, className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
112
113
 
113
- declare const ImageControl$1: ({ className, style, imageUrl, imageUrlExternal, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
114
+ declare const ImageControl: ({ className, style, imageUrl, imageUrlExternal, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
114
115
 
115
116
  declare const TextInput: ({ className, style, ...props }: TextInputProps) => react_jsx_runtime.JSX.Element;
116
117
 
@@ -158,8 +159,8 @@ declare const Profile: ({ profileType, showName, userName, className, style }: P
158
159
 
159
160
  declare const Notification: ({ className, style, badgeType, badgeCount, hideBadgeWhenZero }: NotificationProps) => react_jsx_runtime.JSX.Element;
160
161
 
161
- declare const ImageControl: ({ className, style, imageUrl }: LogoProps) => react_jsx_runtime.JSX.Element;
162
+ declare const Logo: ({ className, style, imageUrl, altText, }: LogoProps) => react_jsx_runtime.JSX.Element;
162
163
 
163
164
  declare function cn(...inputs: ClassValue[]): string;
164
165
 
165
- export { Button, CheckboxInput, DatePicker, DateRange, Dropdown, EmailInput, FileInput, Flex as FlexLayout, Grid as GridLayout, ImageControl$1 as Image, ImageControl as Logo, MultiCheckbox, Notification, NumberInput, PasswordInput, PhoneInput, Profile, RadioInput, RichText, SearchInput, Shape, Spacer, StagesComponent as Stages, SwitchToggle, Table, Tabs, TextInput, Textarea, Typography, UrlInput, buttonVariants, cn };
166
+ export { Button, CheckboxInput, DatePicker, DateRange, Dropdown, EmailInput, FileInput, Flex as FlexLayout, Grid as GridLayout, ImageControl as Image, Logo, MultiCheckbox, Notification, NumberInput, PasswordInput, PhoneInput, Profile, RadioInput, RichText, SearchInput, Shape, Spacer, StagesComponent as Stages, SwitchToggle, Table, Tabs, TextInput, Textarea, Typography, UrlInput, buttonVariants, cn };
package/dist/index.d.ts CHANGED
@@ -97,6 +97,7 @@ interface NotificationProps extends ElementProps {
97
97
 
98
98
  interface LogoProps extends ElementProps {
99
99
  imageUrl?: string;
100
+ altText?: string;
100
101
  }
101
102
 
102
103
  declare const Flex: ({ children, className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
@@ -110,7 +111,7 @@ declare const Typography: ({ className, style, tagName, textContent, }: Typograp
110
111
 
111
112
  declare const Shape: ({ children, className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
112
113
 
113
- declare const ImageControl$1: ({ className, style, imageUrl, imageUrlExternal, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
114
+ declare const ImageControl: ({ className, style, imageUrl, imageUrlExternal, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
114
115
 
115
116
  declare const TextInput: ({ className, style, ...props }: TextInputProps) => react_jsx_runtime.JSX.Element;
116
117
 
@@ -158,8 +159,8 @@ declare const Profile: ({ profileType, showName, userName, className, style }: P
158
159
 
159
160
  declare const Notification: ({ className, style, badgeType, badgeCount, hideBadgeWhenZero }: NotificationProps) => react_jsx_runtime.JSX.Element;
160
161
 
161
- declare const ImageControl: ({ className, style, imageUrl }: LogoProps) => react_jsx_runtime.JSX.Element;
162
+ declare const Logo: ({ className, style, imageUrl, altText, }: LogoProps) => react_jsx_runtime.JSX.Element;
162
163
 
163
164
  declare function cn(...inputs: ClassValue[]): string;
164
165
 
165
- export { Button, CheckboxInput, DatePicker, DateRange, Dropdown, EmailInput, FileInput, Flex as FlexLayout, Grid as GridLayout, ImageControl$1 as Image, ImageControl as Logo, MultiCheckbox, Notification, NumberInput, PasswordInput, PhoneInput, Profile, RadioInput, RichText, SearchInput, Shape, Spacer, StagesComponent as Stages, SwitchToggle, Table, Tabs, TextInput, Textarea, Typography, UrlInput, buttonVariants, cn };
166
+ export { Button, CheckboxInput, DatePicker, DateRange, Dropdown, EmailInput, FileInput, Flex as FlexLayout, Grid as GridLayout, ImageControl as Image, Logo, MultiCheckbox, Notification, NumberInput, PasswordInput, PhoneInput, Profile, RadioInput, RichText, SearchInput, Shape, Spacer, StagesComponent as Stages, SwitchToggle, Table, Tabs, TextInput, Textarea, Typography, UrlInput, buttonVariants, cn };
package/dist/index.js CHANGED
@@ -191,34 +191,16 @@ var ImageControl = ({
191
191
  }) => {
192
192
  const imageClass = cn(
193
193
  "h-[200px] w-[200px] border-1",
194
- "border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition",
195
- className
194
+ "border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition"
196
195
  );
197
196
  const defaultImgClass = cn(
198
197
  "w-full h-full",
199
198
  className
200
199
  );
201
- let src;
202
- let extraProps;
203
- if (imageUrlExternal) {
204
- src = imageUrlExternal;
205
- extraProps = {
206
- className: defaultImgClass
207
- };
208
- } else if (imageUrl) {
209
- src = imageUrl;
210
- extraProps = {
211
- className: defaultImgClass
212
- };
213
- } else {
214
- src = "./image-placeholder.png";
215
- extraProps = {
216
- width: 50,
217
- height: 50,
218
- className: "opacity-50"
219
- };
200
+ if (!imageUrl && !imageUrlExternal) {
201
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: imageClass, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src: "./image-placeholder.png", alt: altText, className: "opacity-50", width: 50, height: 50 }) });
220
202
  }
221
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: imageClass, style, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src, alt: altText, ...extraProps }) });
203
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src: imageUrlExternal || imageUrl, alt: altText, className: defaultImgClass, style });
222
204
  };
223
205
  var Image_default = ImageControl;
224
206
 
@@ -1965,29 +1947,28 @@ var Notification_default = Notification;
1965
1947
 
1966
1948
  // src/components/Navigation/Logo/Logo.tsx
1967
1949
  var import_jsx_runtime43 = require("react/jsx-runtime");
1968
- var ImageControl2 = ({
1950
+ var Logo = ({
1969
1951
  className,
1970
1952
  style,
1971
- imageUrl
1953
+ imageUrl,
1954
+ altText = "Preview"
1972
1955
  }) => {
1973
- let src;
1974
- let extraProps;
1975
- if (imageUrl) {
1976
- src = imageUrl;
1977
- extraProps = {
1978
- className: "w-full h-full"
1979
- };
1980
- } else {
1981
- src = "https://builder.development.algorithmshift.ai/_next/image?url=%2Fdrag_and_drop.png&w=1920&q=75";
1982
- extraProps = {
1983
- width: 50,
1984
- height: 50,
1985
- className: "opacity-50"
1986
- };
1956
+ if (!imageUrl) {
1957
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
1958
+ "div",
1959
+ {
1960
+ className: cn(
1961
+ className,
1962
+ "p-0"
1963
+ ),
1964
+ style,
1965
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("img", { src: "/logo_placeholder.png", alt: altText, className: "opacity-50", width: 150, height: 80 })
1966
+ }
1967
+ );
1987
1968
  }
1988
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className, style, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("img", { src, alt: "Preview", sizes: "100vw", ...extraProps }) });
1969
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("img", { src: imageUrl, alt: altText, className, style });
1989
1970
  };
1990
- var Logo_default = ImageControl2;
1971
+ var Logo_default = Logo;
1991
1972
  // Annotate the CommonJS export names for ESM import in node:
1992
1973
  0 && (module.exports = {
1993
1974
  Button,