@smart-react-components/ui 2.0.0-alpha-114 → 2.0.0-alpha-116
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/Alert/index.js +3 -25
- package/components/Alert/AlertContent.d.ts +4 -0
- package/components/Alert/AlertContent.js +12 -0
- package/components/Alert/AlertElement.d.ts +0 -1
- package/components/Alert/AlertElement.js +2 -8
- package/components/Breadcrumb/BreadcrumbItemElement.js +6 -6
- package/package.json +7 -7
package/Alert/index.js
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
@@ -30,7 +7,8 @@ const element_props_1 = __importDefault(require("@smart-react-components/core/el
|
|
|
30
7
|
const click_events_1 = __importDefault(require("@smart-react-components/core/element-props/click-events"));
|
|
31
8
|
const intrinsic_styled_core_props_1 = __importDefault(require("@smart-react-components/core/element-props/intrinsic-styled-core-props"));
|
|
32
9
|
const react_1 = __importDefault(require("react"));
|
|
33
|
-
const
|
|
10
|
+
const AlertContent_1 = __importDefault(require("../components/Alert/AlertContent"));
|
|
11
|
+
const AlertElement_1 = __importDefault(require("../components/Alert/AlertElement"));
|
|
34
12
|
const types_1 = require("../types");
|
|
35
13
|
const Alert = props => {
|
|
36
14
|
const { children, hasIconLeft, hasIconRight, hasThickBorder } = react_1.default.useMemo(() => {
|
|
@@ -66,7 +44,7 @@ const Alert = props => {
|
|
|
66
44
|
return {
|
|
67
45
|
children: (react_1.default.createElement(react_1.default.Fragment, null,
|
|
68
46
|
iconLeft && iconLeft,
|
|
69
|
-
react_1.default.createElement(
|
|
47
|
+
react_1.default.createElement(AlertContent_1.default, null, content),
|
|
70
48
|
iconRight && iconRight)),
|
|
71
49
|
hasIconLeft: !!iconLeft,
|
|
72
50
|
hasIconRight: !!iconRight,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
7
|
+
exports.default = styled_components_1.default.div.attrs({
|
|
8
|
+
className: 'src-alert-content',
|
|
9
|
+
}) `
|
|
10
|
+
flex: 1 1 auto;
|
|
11
|
+
min-width: 1px;
|
|
12
|
+
`;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StyledProps } from '@smart-react-components/core/styled-props';
|
|
2
2
|
import { PaletteProp, ResponsiveProp, ShapeProp, SizeProp } from '@smart-react-components/core/types';
|
|
3
|
-
export declare const Content: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
3
|
interface Props extends StyledProps, ResponsiveProp<'alertSize', SizeProp> {
|
|
5
4
|
hasIconLeft: boolean;
|
|
6
5
|
hasIconRight: boolean;
|
|
@@ -3,19 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Content = void 0;
|
|
7
6
|
const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"));
|
|
8
7
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
8
|
const css_1 = require("../../util/css");
|
|
10
|
-
exports.Content = styled_components_1.default.div `
|
|
11
|
-
flex: 1 1 auto;
|
|
12
|
-
min-width: 1px;
|
|
13
|
-
`;
|
|
14
9
|
exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIconLeft, hasIconRight }) => ({
|
|
15
10
|
getAlertSize: (v, t) => `
|
|
16
11
|
font-size: ${t.$.size.alert[v].fontSize};
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
.src-alert-content {
|
|
19
14
|
padding: ${t.$.size.alert[v].padding.y} ${t.$.size.alert[v].padding.x};
|
|
20
15
|
|
|
21
16
|
${hasIconLeft
|
|
@@ -29,7 +24,6 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
|
|
|
29
24
|
padding-right: ${(0, css_1.toCSSValue)(t.$.size.alert[v].padding.x)(v => v / 2)};
|
|
30
25
|
`
|
|
31
26
|
: ''}
|
|
32
|
-
|
|
33
27
|
}
|
|
34
28
|
`,
|
|
35
29
|
}))(({ theme, hasThickBorder, isOutline, isSoft, palette, shape }) => `
|
|
@@ -78,7 +72,7 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ hasIc
|
|
|
78
72
|
border-left-width: 10px;
|
|
79
73
|
`}
|
|
80
74
|
|
|
81
|
-
|
|
75
|
+
.src-alert-content > {
|
|
82
76
|
header, h1, h2, h3, h4, h5, h6, p, hr {
|
|
83
77
|
margin-bottom: ${theme.$.length['3']};
|
|
84
78
|
margin-top: 0;
|
|
@@ -45,8 +45,8 @@ exports.default = (0, styled_components_1.default)(Li_1.default)(({ theme, isAct
|
|
|
45
45
|
fill: ${theme.$.palette[palette].font};
|
|
46
46
|
`
|
|
47
47
|
: `
|
|
48
|
-
color: ${theme.$.palette[palette].
|
|
49
|
-
fill: ${theme.$.palette[palette].
|
|
48
|
+
color: ${theme.$.palette[palette].darkest};
|
|
49
|
+
fill: ${theme.$.palette[palette].darkest};
|
|
50
50
|
`}
|
|
51
51
|
`
|
|
52
52
|
: `
|
|
@@ -72,8 +72,8 @@ exports.default = (0, styled_components_1.default)(Li_1.default)(({ theme, isAct
|
|
|
72
72
|
fill: ${theme.$.palette[palette].main};
|
|
73
73
|
`
|
|
74
74
|
: `
|
|
75
|
-
color: ${theme.$.color.dynamic.
|
|
76
|
-
fill: ${theme.$.color.dynamic.
|
|
75
|
+
color: ${theme.$.color.dynamic.bodyFont};
|
|
76
|
+
fill: ${theme.$.color.dynamic.bodyFont};
|
|
77
77
|
`}
|
|
78
78
|
`
|
|
79
79
|
: `
|
|
@@ -83,8 +83,8 @@ exports.default = (0, styled_components_1.default)(Li_1.default)(({ theme, isAct
|
|
|
83
83
|
fill: ${theme.$.palette[palette].soft};
|
|
84
84
|
`
|
|
85
85
|
: `
|
|
86
|
-
color: ${theme.$.color.dynamic.
|
|
87
|
-
fill: ${theme.$.color.dynamic.
|
|
86
|
+
color: ${theme.$.color.dynamic.bodyFont};
|
|
87
|
+
fill: ${theme.$.color.dynamic.bodyFont};
|
|
88
88
|
`}
|
|
89
89
|
`}
|
|
90
90
|
`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smart-react-components/ui",
|
|
3
|
-
"version": "2.0.0-alpha-
|
|
3
|
+
"version": "2.0.0-alpha-116",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"description": "SRC UI includes React and Styled components.",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"test": "jest"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@smart-react-components/core": "2.0.0-alpha-
|
|
68
|
-
"@smart-react-components/router": "2.0.0-alpha-
|
|
69
|
-
"@smart-react-components/transition": "2.0.0-alpha-
|
|
67
|
+
"@smart-react-components/core": "2.0.0-alpha-44",
|
|
68
|
+
"@smart-react-components/router": "2.0.0-alpha-41",
|
|
69
|
+
"@smart-react-components/transition": "2.0.0-alpha-38",
|
|
70
70
|
"@testing-library/react": "13.4.0",
|
|
71
71
|
"@types/jest": "29.0.1",
|
|
72
72
|
"@types/react": "18.0.19",
|
|
@@ -83,9 +83,9 @@
|
|
|
83
83
|
"typescript": "4.8.3"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@smart-react-components/core": "^2.0.0-alpha-
|
|
87
|
-
"@smart-react-components/router": "^2.0.0-alpha-
|
|
88
|
-
"@smart-react-components/transition": "^2.0.0-alpha-
|
|
86
|
+
"@smart-react-components/core": "^2.0.0-alpha-44",
|
|
87
|
+
"@smart-react-components/router": "^2.0.0-alpha-41",
|
|
88
|
+
"@smart-react-components/transition": "^2.0.0-alpha-38",
|
|
89
89
|
"react": "^18.2.0",
|
|
90
90
|
"react-dom": "^18.2.0",
|
|
91
91
|
"styled-components": "^5.3.5"
|