@ktjs/mui 0.17.8 → 0.17.9
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.ts +2 -2
- package/dist/index.iife.js +3 -5
- package/dist/index.mjs +3 -5
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,9 +9,9 @@ interface AlertProps {
|
|
|
9
9
|
severity?: 'error' | 'warning' | 'info' | 'success';
|
|
10
10
|
variant?: 'standard' | 'filled' | 'outlined';
|
|
11
11
|
icon?: HTMLElement | KTHTMLElement | false;
|
|
12
|
-
|
|
12
|
+
'mui:close'?: () => void;
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
14
|
+
/**s
|
|
15
15
|
* Alert component - mimics MUI Alert appearance and behavior
|
|
16
16
|
*/
|
|
17
17
|
declare function Alert(props: AlertProps): KTHTMLElement;
|
package/dist/index.iife.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
var __ktjs_mui__ = (function (exports, jsxRuntime, kt_js) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
/**
|
|
4
|
+
/**s
|
|
5
5
|
* Alert component - mimics MUI Alert appearance and behavior
|
|
6
6
|
*/
|
|
7
7
|
function Alert(props) {
|
|
8
|
-
const { children, severity = 'info', variant = 'standard', icon, onClose, sx } = props;
|
|
9
|
-
const classes =
|
|
10
|
-
.filter(Boolean)
|
|
11
|
-
.join(' ');
|
|
8
|
+
const { children, severity = 'info', variant = 'standard', icon, 'mui:close': onClose, sx } = props;
|
|
9
|
+
const classes = `mui-alert mui-alert-${severity} mui-alert-${variant} ${props.class ? props.class : ''}`;
|
|
12
10
|
// Convert sx object to style string
|
|
13
11
|
let styleString = props.style || '';
|
|
14
12
|
if (sx) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'kt.js/jsx-runtime';
|
|
2
2
|
import { ref as ref$1, createRedrawable } from 'kt.js';
|
|
3
3
|
|
|
4
|
-
/**
|
|
4
|
+
/**s
|
|
5
5
|
* Alert component - mimics MUI Alert appearance and behavior
|
|
6
6
|
*/
|
|
7
7
|
function Alert(props) {
|
|
8
|
-
const { children, severity = 'info', variant = 'standard', icon, onClose, sx } = props;
|
|
9
|
-
const classes =
|
|
10
|
-
.filter(Boolean)
|
|
11
|
-
.join(' ');
|
|
8
|
+
const { children, severity = 'info', variant = 'standard', icon, 'mui:close': onClose, sx } = props;
|
|
9
|
+
const classes = `mui-alert mui-alert-${severity} mui-alert-${variant} ${props.class ? props.class : ''}`;
|
|
12
10
|
// Convert sx object to style string
|
|
13
11
|
let styleString = props.style || '';
|
|
14
12
|
if (sx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ktjs/mui",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.9",
|
|
4
4
|
"description": "Material-UI inspired components for kt.js - pre-styled UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"directory": "packages/mui"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@ktjs/core": "0.
|
|
38
|
+
"@ktjs/core": "0.18.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "rollup -c rollup.config.mjs",
|