@synerise/ds-inline-alert 1.1.14 → 1.1.15
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/CHANGELOG.md +4 -0
- package/dist/InlineAlert.const.d.ts +2 -2
- package/dist/InlineAlert.const.js +11 -8
- package/dist/InlineAlert.d.ts +2 -2
- package/dist/InlineAlert.js +28 -28
- package/dist/InlineAlert.styles.d.ts +5 -5
- package/dist/InlineAlert.styles.js +23 -29
- package/dist/InlineAlert.types.d.ts +2 -2
- package/dist/InlineAlert.types.js +1 -1
- package/dist/index.js +4 -2
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.1.15](https://github.com/Synerise/synerise-design/compare/@synerise/ds-inline-alert@1.1.14...@synerise/ds-inline-alert@1.1.15) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-inline-alert
|
|
9
|
+
|
|
6
10
|
## [1.1.14](https://github.com/Synerise/synerise-design/compare/@synerise/ds-inline-alert@1.1.13...@synerise/ds-inline-alert@1.1.14) (2026-03-20)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @synerise/ds-inline-alert
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { InlineAlertType } from './InlineAlert.types';
|
|
3
3
|
export declare const ICONS: Record<InlineAlertType, ReactNode>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
success:
|
|
5
|
-
alert:
|
|
6
|
-
warning:
|
|
7
|
-
info:
|
|
8
|
-
};
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InfoFillM, WarningFillM, Check3M } from "@synerise/ds-icon";
|
|
3
|
+
const ICONS = {
|
|
4
|
+
success: /* @__PURE__ */ jsx(Check3M, {}),
|
|
5
|
+
alert: /* @__PURE__ */ jsx(WarningFillM, {}),
|
|
6
|
+
warning: /* @__PURE__ */ jsx(WarningFillM, {}),
|
|
7
|
+
info: /* @__PURE__ */ jsx(InfoFillM, {})
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
ICONS
|
|
11
|
+
};
|
package/dist/InlineAlert.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { InlineAlertProps } from './InlineAlert.types';
|
|
3
3
|
declare const InlineAlert: ({ className, type, message, withLink, withEmphasis, hoverButton, disabled, customIcon, ...rest }: InlineAlertProps) => React.JSX.Element;
|
|
4
4
|
export default InlineAlert;
|
package/dist/InlineAlert.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
19
|
-
var icon = useMemo(function () {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import Icon from "@synerise/ds-icon";
|
|
4
|
+
import { ICONS } from "./InlineAlert.const.js";
|
|
5
|
+
import { InlineAlertWrapper, Message, LinkWrapper, EmphasisWrapper } from "./InlineAlert.styles.js";
|
|
6
|
+
const InlineAlert = ({
|
|
7
|
+
className,
|
|
8
|
+
type = "warning",
|
|
9
|
+
message,
|
|
10
|
+
withLink,
|
|
11
|
+
withEmphasis,
|
|
12
|
+
hoverButton,
|
|
13
|
+
disabled,
|
|
14
|
+
customIcon,
|
|
15
|
+
...rest
|
|
16
|
+
}) => {
|
|
17
|
+
const icon = useMemo(() => {
|
|
20
18
|
return ICONS[type];
|
|
21
19
|
}, [type]);
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
20
|
+
return /* @__PURE__ */ jsxs(InlineAlertWrapper, { ...rest, type, disabled, hoverButton, className: `ds-inline-alert ${className || ""}`, children: [
|
|
21
|
+
customIcon || /* @__PURE__ */ jsx(Icon, { component: icon }),
|
|
22
|
+
message && /* @__PURE__ */ jsxs(Message, { children: [
|
|
23
|
+
message,
|
|
24
|
+
withLink && /* @__PURE__ */ jsx(LinkWrapper, { children: withLink }),
|
|
25
|
+
withEmphasis && !withLink && /* @__PURE__ */ jsx(EmphasisWrapper, { children: withEmphasis })
|
|
26
|
+
] })
|
|
27
|
+
] });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
InlineAlert as default
|
|
30
31
|
};
|
|
31
|
-
export default InlineAlert;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const Message: import(
|
|
3
|
-
export declare const InlineAlertWrapper: import(
|
|
1
|
+
import { InlineAlertType } from './InlineAlert.types';
|
|
2
|
+
export declare const Message: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
3
|
+
export declare const InlineAlertWrapper: import('styled-components').StyledComponent<"span", any, {
|
|
4
4
|
type: InlineAlertType;
|
|
5
5
|
hoverButton?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}, never>;
|
|
8
|
-
export declare const EmphasisWrapper: import(
|
|
9
|
-
export declare const LinkWrapper: import(
|
|
8
|
+
export declare const EmphasisWrapper: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
9
|
+
export declare const LinkWrapper: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
@@ -1,41 +1,35 @@
|
|
|
1
|
-
import styled, { css } from
|
|
2
|
-
|
|
3
|
-
success:
|
|
4
|
-
warning:
|
|
5
|
-
alert:
|
|
6
|
-
info:
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
const COLORS = {
|
|
3
|
+
success: "green-600",
|
|
4
|
+
warning: "yellow-600",
|
|
5
|
+
alert: "red-600",
|
|
6
|
+
info: "grey-600"
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
success:
|
|
10
|
-
warning:
|
|
11
|
-
alert:
|
|
12
|
-
info:
|
|
8
|
+
const COLORS_HOVER = {
|
|
9
|
+
success: "green-700",
|
|
10
|
+
warning: "yellow-700",
|
|
11
|
+
alert: "red-700",
|
|
12
|
+
info: "grey-700"
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
const Message = /* @__PURE__ */ styled.span.withConfig({
|
|
15
15
|
displayName: "InlineAlertstyles__Message",
|
|
16
16
|
componentId: "sc-cu91um-0"
|
|
17
17
|
})(["display:flex;align-items:center;font-size:13px;line-height:18px;font-weight:400;color:inherit;margin-left:4px;"]);
|
|
18
|
-
|
|
18
|
+
const InlineAlertWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
19
19
|
displayName: "InlineAlertstyles__InlineAlertWrapper",
|
|
20
20
|
componentId: "sc-cu91um-1"
|
|
21
|
-
})(["display:flex;justify-content:flex-start;flex-direction:row;&:hover{cursor:", ";color:", ";}&:active{color:", ";}color:", ";", ";", "{color:", ";}"],
|
|
22
|
-
|
|
23
|
-
}, function (props) {
|
|
24
|
-
return props.hoverButton ? props.theme.palette[COLORS_HOVER[props.type]] : props.theme.palette[COLORS[props.type]];
|
|
25
|
-
}, function (props) {
|
|
26
|
-
return props.theme.palette[COLORS[props.type]];
|
|
27
|
-
}, function (props) {
|
|
28
|
-
return props.theme.palette[COLORS[props.type]];
|
|
29
|
-
}, function (props) {
|
|
30
|
-
return !!props.disabled && css(["pointer-events:none;opacity:0.4;"]);
|
|
31
|
-
}, Message, function (props) {
|
|
32
|
-
return props.theme.palette['grey-600'];
|
|
33
|
-
});
|
|
34
|
-
export var EmphasisWrapper = styled.span.withConfig({
|
|
21
|
+
})(["display:flex;justify-content:flex-start;flex-direction:row;&:hover{cursor:", ";color:", ";}&:active{color:", ";}color:", ";", ";", "{color:", ";}"], (props) => props.hoverButton ? "pointer" : "auto", (props) => props.hoverButton ? props.theme.palette[COLORS_HOVER[props.type]] : props.theme.palette[COLORS[props.type]], (props) => props.theme.palette[COLORS[props.type]], (props) => props.theme.palette[COLORS[props.type]], (props) => !!props.disabled && css(["pointer-events:none;opacity:0.4;"]), Message, (props) => props.theme.palette["grey-600"]);
|
|
22
|
+
const EmphasisWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
35
23
|
displayName: "InlineAlertstyles__EmphasisWrapper",
|
|
36
24
|
componentId: "sc-cu91um-2"
|
|
37
25
|
})(["display:flex;padding-bottom:1px;font-size:13px;line-height:1.39;padding-left:3px;font-weight:500;color:inherit;"]);
|
|
38
|
-
|
|
26
|
+
const LinkWrapper = /* @__PURE__ */ styled.span.withConfig({
|
|
39
27
|
displayName: "InlineAlertstyles__LinkWrapper",
|
|
40
28
|
componentId: "sc-cu91um-3"
|
|
41
|
-
})(["display:flex;font-size:13px;line-height:1.39;font-weight:400;margin-left:3px;color:inherit;text-decoration:underline;cursor:pointer;"]);
|
|
29
|
+
})(["display:flex;font-size:13px;line-height:1.39;font-weight:400;margin-left:3px;color:inherit;text-decoration:underline;cursor:pointer;"]);
|
|
30
|
+
export {
|
|
31
|
+
EmphasisWrapper,
|
|
32
|
+
InlineAlertWrapper,
|
|
33
|
+
LinkWrapper,
|
|
34
|
+
Message
|
|
35
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { WithHTMLAttributes } from '@synerise/ds-utils';
|
|
3
3
|
export type InlineAlertType = 'success' | 'alert' | 'warning' | 'info';
|
|
4
4
|
export type InlineAlertProps = WithHTMLAttributes<HTMLDivElement, {
|
|
5
5
|
type: InlineAlertType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/index.js
CHANGED
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-inline-alert",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"description": "InlineAlert UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"prepublish": "pnpm run build",
|
|
25
25
|
"types": "tsc --noEmit",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-icon": "^1.15.
|
|
38
|
-
"@synerise/ds-utils": "^1.7.
|
|
37
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
38
|
+
"@synerise/ds-utils": "^1.7.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@synerise/ds-core": "*",
|
|
42
42
|
"react": ">=16.9.0 <= 18.3.1",
|
|
43
43
|
"styled-components": "^5.3.3"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
46
46
|
}
|