@blaze-dev/ui 0.2.0 → 0.3.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-box.d.ts","sourceRoot":"","sources":["../../src/feedback/error-box.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-box.d.ts","sourceRoot":"","sources":["../../src/feedback/error-box.tsx"],"names":[],"mappings":"AAAA,UAAU,aAAa;IACrB,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,aAAa,2CAiB3E"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ExclamationCircleIcon } from '@heroicons/react/24/outline';
|
|
3
2
|
export function ErrorBox({ error, onRetry, className, title }) {
|
|
4
3
|
const detail = typeof error === 'string' ? error : error.message || 'Unknown error';
|
|
5
4
|
const message = title ? `${title}: ${detail}` : detail;
|
|
6
|
-
return (_jsxs("div", { className: className ? `alert alert-error ${className}` : 'alert alert-error', children: [_jsx(
|
|
5
|
+
return (_jsxs("div", { className: className ? `alert alert-error ${className}` : 'alert alert-error', children: [_jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', fill: 'none', viewBox: '0 0 24 24', strokeWidth: 1.5, stroke: 'currentColor', className: 'h-6 w-6 shrink-0', children: _jsx("path", { strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z' }) }), _jsx("span", { className: 'flex-1 break-words', children: message }), onRetry && (_jsx("button", { type: 'button', onClick: onRetry, className: 'btn btn-sm btn-ghost', children: "Retry" }))] }));
|
|
7
6
|
}
|
|
8
7
|
//# sourceMappingURL=error-box.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-box.js","sourceRoot":"","sources":["../../src/feedback/error-box.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"error-box.js","sourceRoot":"","sources":["../../src/feedback/error-box.tsx"],"names":[],"mappings":";AAOA,MAAM,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAiB;IAC1E,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,eAAe,CAAA;IACnF,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAA;IAEtD,OAAO,CACL,eAAK,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,qBAAqB,SAAS,EAAE,CAAC,CAAC,CAAC,mBAAmB,aAChF,cAAK,KAAK,EAAC,4BAA4B,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,WAAW,EAAE,GAAG,EAAE,MAAM,EAAC,cAAc,EAAC,SAAS,EAAC,kBAAkB,YAC1I,eAAM,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAC,CAAC,EAAC,0EAA0E,GAAG,GAC9H,EACN,eAAM,SAAS,EAAC,oBAAoB,YAAE,OAAO,GAAQ,EACpD,OAAO,IAAI,CACV,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,sBAAsB,sBAE/D,CACV,IACG,CACP,CAAA;AACH,CAAC"}
|
package/dist/modal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../src/modal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../src/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,UAAU,UAAU;IAClB,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAA;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAUD,wBAAgB,KAAK,CAAC,EACpB,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,IAAW,EACX,SAAc,GACf,EAAE,UAAU,kDAiCZ"}
|
package/dist/modal.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { XMarkIcon } from '@heroicons/react/24/outline';
|
|
3
2
|
const sizeClasses = {
|
|
4
3
|
sm: 'max-w-sm',
|
|
5
4
|
md: 'max-w-md',
|
|
@@ -10,6 +9,6 @@ const sizeClasses = {
|
|
|
10
9
|
export function Modal({ isOpen, onClose, title, subtitle, children, size = 'lg', className = '', }) {
|
|
11
10
|
if (!isOpen)
|
|
12
11
|
return null;
|
|
13
|
-
return (_jsxs("div", { className: 'modal modal-open', role: 'dialog', "aria-modal": 'true', children: [_jsxs("div", { className: `modal-box p-0 overflow-hidden w-[calc(100%-2rem)] sm:w-full ${sizeClasses[size]} ${className}`, children: [_jsxs("div", { className: 'flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-base-300 bg-base-200', children: [_jsxs("div", { children: [_jsx("h3", { className: 'text-lg font-semibold', children: title }), subtitle && _jsx("p", { className: 'text-sm text-base-content/60', children: subtitle })] }), _jsx("button", { type: 'button', onClick: onClose, className: 'btn btn-ghost btn-sm btn-circle', "aria-label": 'Close modal', children: _jsx(
|
|
12
|
+
return (_jsxs("div", { className: 'modal modal-open', role: 'dialog', "aria-modal": 'true', children: [_jsxs("div", { className: `modal-box p-0 overflow-hidden w-[calc(100%-2rem)] sm:w-full ${sizeClasses[size]} ${className}`, children: [_jsxs("div", { className: 'flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-base-300 bg-base-200', children: [_jsxs("div", { children: [_jsx("h3", { className: 'text-lg font-semibold', children: title }), subtitle && _jsx("p", { className: 'text-sm text-base-content/60', children: subtitle })] }), _jsx("button", { type: 'button', onClick: onClose, className: 'btn btn-ghost btn-sm btn-circle', "aria-label": 'Close modal', children: _jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', fill: 'none', viewBox: '0 0 24 24', strokeWidth: 1.5, stroke: 'currentColor', className: 'w-5 h-5', children: _jsx("path", { strokeLinecap: 'round', strokeLinejoin: 'round', d: 'M6 18L18 6M6 6l12 12' }) }) })] }), children] }), _jsx("button", { type: 'button', className: 'modal-backdrop', onClick: onClose, "aria-label": 'Close modal', tabIndex: 0 })] }));
|
|
14
13
|
}
|
|
15
14
|
//# sourceMappingURL=modal.js.map
|
package/dist/modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../src/modal.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../src/modal.tsx"],"names":[],"mappings":";AAYA,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,UAAU;IACd,K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9
9
|
"description": "Shared React + DaisyUI component library for Blaze projects",
|
|
10
10
|
"type": "module",
|
|
@@ -34,11 +34,9 @@
|
|
|
34
34
|
"react": ">=18.0.0",
|
|
35
35
|
"react-dom": ">=18.0.0",
|
|
36
36
|
"@tanstack/react-table": ">=8.0.0",
|
|
37
|
-
"react-hook-form": ">=7.0.0"
|
|
38
|
-
"@heroicons/react": ">=2.0.0"
|
|
37
|
+
"react-hook-form": ">=7.0.0"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
|
-
"@heroicons/react": "^2.2.0",
|
|
42
40
|
"@tanstack/react-table": "^8.21.0",
|
|
43
41
|
"@types/react": "^19.0.0",
|
|
44
42
|
"react": "^19.0.0",
|