@algorithm-shift/design-system 1.2.6 → 1.2.7
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 +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -20,13 +20,14 @@ interface ElementProps {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
interface TypographyProps extends ElementProps {
|
|
23
|
-
tagName
|
|
24
|
-
textContent
|
|
23
|
+
tagName?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
|
|
24
|
+
textContent?: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
interface ImageProps extends ElementProps {
|
|
28
28
|
imageUrl?: string;
|
|
29
29
|
altText?: string;
|
|
30
|
+
imageUrlExternal?: string;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
type InputProperties = {
|
|
@@ -109,7 +110,7 @@ declare const Typography: ({ className, style, tagName, textContent, }: Typograp
|
|
|
109
110
|
|
|
110
111
|
declare const Shape: ({ children, className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
111
112
|
|
|
112
|
-
declare const ImageControl$1: ({ className, style, imageUrl, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
|
|
113
|
+
declare const ImageControl$1: ({ className, style, imageUrl, imageUrlExternal, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
|
|
113
114
|
|
|
114
115
|
declare const TextInput: ({ className, style, ...props }: TextInputProps) => react_jsx_runtime.JSX.Element;
|
|
115
116
|
|
package/dist/index.d.ts
CHANGED
|
@@ -20,13 +20,14 @@ interface ElementProps {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
interface TypographyProps extends ElementProps {
|
|
23
|
-
tagName
|
|
24
|
-
textContent
|
|
23
|
+
tagName?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
|
|
24
|
+
textContent?: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
interface ImageProps extends ElementProps {
|
|
28
28
|
imageUrl?: string;
|
|
29
29
|
altText?: string;
|
|
30
|
+
imageUrlExternal?: string;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
type InputProperties = {
|
|
@@ -109,7 +110,7 @@ declare const Typography: ({ className, style, tagName, textContent, }: Typograp
|
|
|
109
110
|
|
|
110
111
|
declare const Shape: ({ children, className, style }: ElementProps) => react_jsx_runtime.JSX.Element;
|
|
111
112
|
|
|
112
|
-
declare const ImageControl$1: ({ className, style, imageUrl, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
|
|
113
|
+
declare const ImageControl$1: ({ className, style, imageUrl, imageUrlExternal, altText, }: ImageProps) => react_jsx_runtime.JSX.Element;
|
|
113
114
|
|
|
114
115
|
declare const TextInput: ({ className, style, ...props }: TextInputProps) => react_jsx_runtime.JSX.Element;
|
|
115
116
|
|
package/dist/index.js
CHANGED
|
@@ -186,10 +186,10 @@ var ImageControl = ({
|
|
|
186
186
|
className,
|
|
187
187
|
style,
|
|
188
188
|
imageUrl,
|
|
189
|
+
imageUrlExternal,
|
|
189
190
|
altText = "Preview"
|
|
190
191
|
}) => {
|
|
191
192
|
const imageClass = cn(
|
|
192
|
-
"relative group",
|
|
193
193
|
"h-[200px] w-[200px] border-1",
|
|
194
194
|
"border-2 border-dashed border-gray-400 flex items-center justify-center cursor-pointer hover:border-blue-500 transition",
|
|
195
195
|
className
|
|
@@ -200,7 +200,12 @@ var ImageControl = ({
|
|
|
200
200
|
);
|
|
201
201
|
let src;
|
|
202
202
|
let extraProps;
|
|
203
|
-
if (
|
|
203
|
+
if (imageUrlExternal) {
|
|
204
|
+
src = imageUrlExternal;
|
|
205
|
+
extraProps = {
|
|
206
|
+
className: defaultImgClass
|
|
207
|
+
};
|
|
208
|
+
} else if (imageUrl) {
|
|
204
209
|
src = imageUrl;
|
|
205
210
|
extraProps = {
|
|
206
211
|
className: defaultImgClass
|
|
@@ -213,7 +218,7 @@ var ImageControl = ({
|
|
|
213
218
|
className: "opacity-50"
|
|
214
219
|
};
|
|
215
220
|
}
|
|
216
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: imageClass, style, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src, alt: altText
|
|
221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: imageClass, style, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("img", { src, alt: altText }) });
|
|
217
222
|
};
|
|
218
223
|
var Image_default = ImageControl;
|
|
219
224
|
|