@fluid-topics/ft-notice 2.0.38 → 2.1.1
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/build/definitions.d.ts +0 -2
- package/build/definitions.js +0 -2
- package/build/ft-notice.light.js +117 -806
- package/build/ft-notice.min.js +139 -827
- package/build/ft-notice.styles.d.ts +10 -10
- package/build/index.d.ts +0 -3
- package/build/index.js +0 -3
- package/package.json +27 -27
- package/build/ftds-notice.d.ts +0 -18
- package/build/ftds-notice.js +0 -94
- package/build/ftds-notice.properties.d.ts +0 -17
- package/build/ftds-notice.properties.js +0 -8
- package/build/ftds-notice.styles.d.ts +0 -2
- package/build/ftds-notice.styles.js +0 -85
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const FtNoticeCssVariables: {
|
|
2
|
-
noticeColor: import("@fluid-topics/
|
|
3
|
-
noticeLabelColor: import("@fluid-topics/
|
|
4
|
-
noticeIconColor: import("@fluid-topics/
|
|
5
|
-
borderRadius: import("@fluid-topics/
|
|
6
|
-
iconSize: import("@fluid-topics/
|
|
7
|
-
denseIconSize: import("@fluid-topics/
|
|
8
|
-
infoColor: import("@fluid-topics/
|
|
9
|
-
warningColor: import("@fluid-topics/
|
|
10
|
-
errorColor: import("@fluid-topics/
|
|
11
|
-
successColor: import("@fluid-topics/
|
|
2
|
+
noticeColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
3
|
+
noticeLabelColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
4
|
+
noticeIconColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
5
|
+
borderRadius: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
6
|
+
iconSize: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
7
|
+
denseIconSize: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
8
|
+
infoColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
9
|
+
warningColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
10
|
+
errorColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
11
|
+
successColor: import("@fluid-topics/design-system-variables").FtCssVariable;
|
|
12
12
|
};
|
|
13
13
|
export declare const styles: import("lit").CSSResult;
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
"name": "@fluid-topics/ft-notice",
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"description": "Notice to display different messages",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"Lit"
|
|
7
|
+
],
|
|
8
|
+
"author": "Fluid Topics <devtopics@antidot.net>",
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"main": "build/index.js",
|
|
11
|
+
"web": "build/ft-notice.min.js",
|
|
12
|
+
"typings": "build/index",
|
|
13
|
+
"files": [
|
|
14
|
+
"build/**/*.ts",
|
|
15
|
+
"build/**/*.js"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@fluid-topics/design-system-variables": "3.5.0",
|
|
23
|
+
"@fluid-topics/ft-icon": "2.1.1",
|
|
24
|
+
"@fluid-topics/ft-typography": "2.1.1",
|
|
25
|
+
"@fluid-topics/ft-wc-utils": "2.1.1",
|
|
26
|
+
"lit": "3.1.0"
|
|
27
|
+
},
|
|
28
|
+
"gitHead": "a9f1e471fb2dba9aeb8c12394a25460f675597dc"
|
|
29
29
|
}
|
package/build/ftds-notice.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FtdsTypographyVariants } from "@fluid-topics/ft-typography";
|
|
2
|
-
import { FtdsNoticeProperties, FtdsNoticeVariant } from "./ftds-notice.properties";
|
|
3
|
-
import { PropertyValues } from "lit";
|
|
4
|
-
import { DesignSystemFamily, ElementDefinitionsMap, FtdsBase } from "@fluid-topics/ft-wc-utils";
|
|
5
|
-
export declare class FtdsNotice extends FtdsBase implements FtdsNoticeProperties {
|
|
6
|
-
static elementDefinitions: ElementDefinitionsMap;
|
|
7
|
-
static styles: import("lit").CSSResult;
|
|
8
|
-
collapsible: boolean;
|
|
9
|
-
dense: boolean;
|
|
10
|
-
icon?: string;
|
|
11
|
-
family: DesignSystemFamily;
|
|
12
|
-
variant?: FtdsNoticeVariant;
|
|
13
|
-
forcedIcon?: string;
|
|
14
|
-
private iconByFamily;
|
|
15
|
-
protected willUpdate(props: PropertyValues): void;
|
|
16
|
-
protected render(): import("lit-html").TemplateResult<1>;
|
|
17
|
-
get typographyVariant(): FtdsTypographyVariants;
|
|
18
|
-
}
|
package/build/ftds-notice.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { FtdsTypography, FtdsTypographyVariants } from "@fluid-topics/ft-typography";
|
|
8
|
-
import { FtdsNoticeVariant } from "./ftds-notice.properties";
|
|
9
|
-
import { dsStyles } from "./ftds-notice.styles";
|
|
10
|
-
import { property } from "lit/decorators.js";
|
|
11
|
-
import { html } from "lit";
|
|
12
|
-
import { FtIcon, FtIcons } from "@fluid-topics/ft-icon";
|
|
13
|
-
import { classMap } from "lit/directives/class-map.js";
|
|
14
|
-
import { DesignSystemFamily, FtdsBase } from "@fluid-topics/ft-wc-utils";
|
|
15
|
-
export class FtdsNotice extends FtdsBase {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.collapsible = false;
|
|
19
|
-
this.dense = false;
|
|
20
|
-
// Override default value
|
|
21
|
-
this.family = DesignSystemFamily.info;
|
|
22
|
-
this.iconByFamily = {
|
|
23
|
-
[DesignSystemFamily.error]: FtIcons.CLOSE_PLAIN,
|
|
24
|
-
[DesignSystemFamily.info]: FtIcons.INFO,
|
|
25
|
-
[DesignSystemFamily.success]: FtIcons.CHECK_PLAIN,
|
|
26
|
-
[DesignSystemFamily.warning]: FtIcons.WARNING,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
willUpdate(props) {
|
|
30
|
-
super.willUpdate(props);
|
|
31
|
-
if (props.has("variant") && this.variant) {
|
|
32
|
-
switch (this.variant) {
|
|
33
|
-
case FtdsNoticeVariant.info:
|
|
34
|
-
this.family = DesignSystemFamily.info;
|
|
35
|
-
break;
|
|
36
|
-
case FtdsNoticeVariant.success:
|
|
37
|
-
this.family = DesignSystemFamily.success;
|
|
38
|
-
break;
|
|
39
|
-
case FtdsNoticeVariant.warning:
|
|
40
|
-
this.family = DesignSystemFamily.warning;
|
|
41
|
-
break;
|
|
42
|
-
case FtdsNoticeVariant.error:
|
|
43
|
-
this.family = DesignSystemFamily.error;
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (props.has("forcedIcon") && this.forcedIcon) {
|
|
48
|
-
this.icon = this.forcedIcon;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
render() {
|
|
52
|
-
const classes = {
|
|
53
|
-
"ftds-notice--collapsible": this.collapsible,
|
|
54
|
-
"ftds-notice--dense": this.dense,
|
|
55
|
-
...this.getDesignSystemBaseClasses(),
|
|
56
|
-
};
|
|
57
|
-
return html `
|
|
58
|
-
<div class="${classMap(classes)}" part="container">
|
|
59
|
-
<div part="icon">
|
|
60
|
-
<ft-icon value="${this.icon || this.iconByFamily[this.family]}"></ft-icon>
|
|
61
|
-
</div>
|
|
62
|
-
<ftds-typography part="label" variant="${this.typographyVariant}">
|
|
63
|
-
<slot></slot>
|
|
64
|
-
</ftds-typography>
|
|
65
|
-
</div>
|
|
66
|
-
`;
|
|
67
|
-
}
|
|
68
|
-
get typographyVariant() {
|
|
69
|
-
return this.dense ? FtdsTypographyVariants.caption1medium : FtdsTypographyVariants.body2regular;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
FtdsNotice.elementDefinitions = {
|
|
73
|
-
"ft-icon": FtIcon,
|
|
74
|
-
"ftds-typography": FtdsTypography,
|
|
75
|
-
};
|
|
76
|
-
FtdsNotice.styles = dsStyles;
|
|
77
|
-
__decorate([
|
|
78
|
-
property({ type: Boolean })
|
|
79
|
-
], FtdsNotice.prototype, "collapsible", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
property({ type: Boolean })
|
|
82
|
-
], FtdsNotice.prototype, "dense", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
property({ type: String })
|
|
85
|
-
], FtdsNotice.prototype, "icon", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
property()
|
|
88
|
-
], FtdsNotice.prototype, "family", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
property()
|
|
91
|
-
], FtdsNotice.prototype, "variant", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
property()
|
|
94
|
-
], FtdsNotice.prototype, "forcedIcon", void 0);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FtdsBaseProperties } from "@fluid-topics/ft-wc-utils";
|
|
2
|
-
/** @deprecated */
|
|
3
|
-
export declare enum FtdsNoticeVariant {
|
|
4
|
-
info = "info",
|
|
5
|
-
warning = "warning",
|
|
6
|
-
error = "error",
|
|
7
|
-
success = "success"
|
|
8
|
-
}
|
|
9
|
-
export interface FtdsNoticeProperties extends Omit<FtdsBaseProperties, "size"> {
|
|
10
|
-
collapsible: boolean;
|
|
11
|
-
dense: boolean;
|
|
12
|
-
icon?: string;
|
|
13
|
-
/** @deprecated */
|
|
14
|
-
variant?: FtdsNoticeVariant;
|
|
15
|
-
/** @deprecated */
|
|
16
|
-
forcedIcon?: string;
|
|
17
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** @deprecated */
|
|
2
|
-
export var FtdsNoticeVariant;
|
|
3
|
-
(function (FtdsNoticeVariant) {
|
|
4
|
-
FtdsNoticeVariant["info"] = "info";
|
|
5
|
-
FtdsNoticeVariant["warning"] = "warning";
|
|
6
|
-
FtdsNoticeVariant["error"] = "error";
|
|
7
|
-
FtdsNoticeVariant["success"] = "success";
|
|
8
|
-
})(FtdsNoticeVariant || (FtdsNoticeVariant = {}));
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { FtIconCssVariables } from "@fluid-topics/ft-icon/build/ft-icon.styles";
|
|
2
|
-
import { css } from "lit";
|
|
3
|
-
import { notice } from "@fluid-topics/design-system-variables";
|
|
4
|
-
export { notice as FtdsNoticeCssVariables } from "@fluid-topics/design-system-variables";
|
|
5
|
-
// language=CSS
|
|
6
|
-
export const dsStyles = css `
|
|
7
|
-
[part="container"] {
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
align-items: flex-start;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
border-width: ${notice.borderWidth};
|
|
12
|
-
border-style: solid;
|
|
13
|
-
border-radius: ${notice.borderRadius};
|
|
14
|
-
padding: ${notice.verticalPadding} ${notice.horizontalPadding};
|
|
15
|
-
gap: ${notice.gap};
|
|
16
|
-
|
|
17
|
-
${FtIconCssVariables.size.set(notice.iconSize)};
|
|
18
|
-
|
|
19
|
-
&.ftds-notice--dense {
|
|
20
|
-
background-color: transparent;
|
|
21
|
-
border: ${notice.denseBorderWidth};
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
gap: ${notice.denseGap};
|
|
24
|
-
padding: ${notice.denseVerticalPadding} ${notice.denseHorizontalPadding};
|
|
25
|
-
|
|
26
|
-
${FtIconCssVariables.size.set(notice.denseIconSize)};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
[part="icon"] {
|
|
31
|
-
align-self: baseline;
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: flex-start;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.ftds-notice--collapsible [part="label"] {
|
|
37
|
-
display: none;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ftds-notice--collapsible:hover [part="label"] {
|
|
41
|
-
display: initial;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** Family styles **/
|
|
45
|
-
|
|
46
|
-
.ftds--family-info {
|
|
47
|
-
color: ${notice.infoColor};
|
|
48
|
-
border-color: ${notice.infoBorderColor};
|
|
49
|
-
background-color: ${notice.infoBackgroundColor};
|
|
50
|
-
|
|
51
|
-
[part="icon"] {
|
|
52
|
-
color: ${notice.infoIconColor};
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.ftds--family-warning {
|
|
57
|
-
color: ${notice.warningColor};
|
|
58
|
-
border-color: ${notice.warningBorderColor};
|
|
59
|
-
background-color: ${notice.warningBackgroundColor};
|
|
60
|
-
|
|
61
|
-
[part="icon"] {
|
|
62
|
-
color: ${notice.warningIconColor};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.ftds--family-error {
|
|
67
|
-
color: ${notice.errorColor};
|
|
68
|
-
border-color: ${notice.errorBorderColor};
|
|
69
|
-
background-color: ${notice.errorBackgroundColor};
|
|
70
|
-
|
|
71
|
-
[part="icon"] {
|
|
72
|
-
color: ${notice.errorIconColor};
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.ftds--family-success {
|
|
77
|
-
color: ${notice.successColor};
|
|
78
|
-
border-color: ${notice.successBorderColor};
|
|
79
|
-
background-color: ${notice.successBackgroundColor};
|
|
80
|
-
|
|
81
|
-
[part="icon"] {
|
|
82
|
-
color: ${notice.successIconColor};
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
`;
|