@sqrzro/ui 4.0.0-alpha.42 → 4.0.0-alpha.43
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.
|
@@ -16,7 +16,6 @@ function StaticTextInput({ classNames, classNameProps, details, hasError, icon,
|
|
|
16
16
|
function handleClear() {
|
|
17
17
|
onClear?.();
|
|
18
18
|
}
|
|
19
|
-
console.log(isOptional, value, hasValue(value));
|
|
20
19
|
return (_jsxs("div", { className: tw('relative', componentClassNames?.root, isDisabled ? 'pointer-events-none opacity-30' : null), children: [_jsx("input", { name: name, type: "hidden", value: value ? value.toString() : '' }), label ? (_jsxs(Fragment, { children: [_jsx("span", { className: componentClassNames?.label, children: label }), details ? (_jsx("small", { className: componentClassNames?.details, children: details })) : null] })) : (_jsx("span", { className: componentClassNames?.placeholder, children: placeholder })), onClick ? (_jsx("button", { className: "absolute -bottom-px -left-px -right-px -top-px", disabled: isDisabled, onClick: onClick, onKeyDown: onKeyDown, tabIndex: 0, type: "button", children: _jsx(Assistive, { children: "Toggle" }) })) : null, _jsxs("div", { className: "absolute bottom-0 right-1 top-0 flex w-0 items-center justify-end", children: [isOptional && hasValue(value) ? (_jsxs("button", { className: tw('flex-none', componentClassNames?.clear), onClick: handleClear, type: "button", children: [ClearIcon ? _jsx(ClearIcon, {}) : null, _jsx(Assistive, { children: "Clear" })] })) : null, icon && !isDisabled ? (_jsx("div", { className: tw('pointer-events-none flex-none bg-red-300', componentClassNames?.icon), children: icon })) : null] })] }));
|
|
21
20
|
}
|
|
22
21
|
export default StaticTextInput;
|
|
@@ -4,7 +4,6 @@ import path from 'node:path';
|
|
|
4
4
|
async function convertToDataURI(fileName) {
|
|
5
5
|
try {
|
|
6
6
|
const filePath = path.resolve(fileName);
|
|
7
|
-
console.log('Converting file to Data URI:', filePath);
|
|
8
7
|
const mimeType = 'image/' + path.extname(filePath).slice(1);
|
|
9
8
|
const imageData = fs.readFileSync(filePath);
|
|
10
9
|
const base64Image = Buffer.from(imageData).toString('base64');
|