@papillonarts/components 0.32.0 → 0.34.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.
- package/build/Legacy/Alert/__tests__/Alert.markdown.docs.md +112 -0
- package/build/Legacy/MarkdownDocs/MarkdownDocs.d.ts +3 -0
- package/build/Legacy/MarkdownDocs/MarkdownDocs.d.ts.map +1 -0
- package/build/Legacy/MarkdownDocs/MarkdownDocs.js +51 -0
- package/build/Legacy/MarkdownDocs/MarkdownDocs.type.d.ts +15 -0
- package/build/Legacy/MarkdownDocs/MarkdownDocs.type.d.ts.map +1 -0
- package/build/Legacy/MarkdownDocs/MarkdownDocs.type.js +14 -0
- package/build/Legacy/MarkdownDocs/__tests__/MarkdownDocs.markdown.docs.md +33 -0
- package/build/Legacy/MarkdownDocs/index.d.ts +2 -0
- package/build/Legacy/MarkdownDocs/index.d.ts.map +1 -0
- package/build/Legacy/MarkdownDocs/index.js +12 -0
- package/build/Legacy/PreformattedCode/PreformattedCode.d.ts +3 -0
- package/build/Legacy/PreformattedCode/PreformattedCode.d.ts.map +1 -0
- package/build/Legacy/PreformattedCode/PreformattedCode.js +39 -0
- package/build/Legacy/PreformattedCode/PreformattedCode.type.d.ts +32 -0
- package/build/Legacy/PreformattedCode/PreformattedCode.type.d.ts.map +1 -0
- package/build/Legacy/PreformattedCode/PreformattedCode.type.js +25 -0
- package/build/Legacy/PreformattedCode/PreformattedCodeHLJS.d.ts +3 -0
- package/build/Legacy/PreformattedCode/PreformattedCodeHLJS.d.ts.map +1 -0
- package/build/Legacy/PreformattedCode/PreformattedCodeHLJS.js +31 -0
- package/build/Legacy/PreformattedCode/PreformattedCodePrism.d.ts +3 -0
- package/build/Legacy/PreformattedCode/PreformattedCodePrism.d.ts.map +1 -0
- package/build/Legacy/PreformattedCode/PreformattedCodePrism.js +33 -0
- package/build/Legacy/PreformattedCode/__tests__/PreformattedCode.markdown.docs.md +61 -0
- package/build/Legacy/PreformattedCode/index.d.ts +3 -0
- package/build/Legacy/PreformattedCode/index.d.ts.map +1 -0
- package/build/Legacy/PreformattedCode/index.js +31 -0
- package/build/Legacy/index.d.ts +4 -0
- package/build/Legacy/index.d.ts.map +1 -1
- package/build/Legacy/index.js +4 -0
- package/build/Modern/Flash/Flash.js +3 -4
- package/package.json +4 -4
- package/build/Modern/Flash/Flash.features.d.ts +0 -9
- package/build/Modern/Flash/Flash.features.d.ts.map +0 -1
- package/build/Modern/Flash/Flash.features.js +0 -136
- package/build/Modern/Flash/Flash.features.stories.d.ts +0 -19
- package/build/Modern/Flash/Flash.features.stories.d.ts.map +0 -1
- package/build/Modern/Flash/Flash.features.stories.js +0 -43
- package/build/Modern/Flash/Flash.stories.d.ts +0 -14
- package/build/Modern/Flash/Flash.stories.d.ts.map +0 -1
- package/build/Modern/Flash/Flash.stories.js +0 -28
- /package/build/Modern/Flash/{Flash.features.stories.module.scss → __tests__/Flash.features.stories.module.scss} +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Alert
|
|
2
|
+
|
|
3
|
+
> Alert component all features
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
# Featues
|
|
7
|
+
|
|
8
|
+
> Regular, RegularMultipleParagraphs
|
|
9
|
+
> Info, Warning, Error, Success
|
|
10
|
+
> Full, Banner
|
|
11
|
+
> RegularConsentWithInput, RegularConsentWithoutInput
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Regular
|
|
15
|
+
|
|
16
|
+
> Alert component regular feature
|
|
17
|
+
|
|
18
|
+
```jsx
|
|
19
|
+
<Alert variant={AlertVariant.Default}>{children}</Alert>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## RegularMultipleParagraphs
|
|
23
|
+
|
|
24
|
+
> Alert component regular multiple paragraphs feature
|
|
25
|
+
|
|
26
|
+
```jsx
|
|
27
|
+
<Alert variant={AlertVariant.Default}>
|
|
28
|
+
<p>
|
|
29
|
+
This is a longer flash message in it's own paragraph. It ends up looking something like this. If we keep adding more text, it will
|
|
30
|
+
eventually wrap to a new line.
|
|
31
|
+
</p>
|
|
32
|
+
<p>And this is another paragraph.</p>
|
|
33
|
+
</Alert>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Info
|
|
37
|
+
|
|
38
|
+
> Alert component info feature
|
|
39
|
+
|
|
40
|
+
```jsx
|
|
41
|
+
<Alert variant={AlertVariant.Info}>{children}</Alert>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Warning
|
|
45
|
+
|
|
46
|
+
> Alert component warning feature
|
|
47
|
+
|
|
48
|
+
```jsx
|
|
49
|
+
<Alert variant={AlertVariant.Warning}>{children}</Alert>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Error
|
|
53
|
+
|
|
54
|
+
> Alert component error feature
|
|
55
|
+
|
|
56
|
+
```jsx
|
|
57
|
+
<Alert variant={AlertVariant.Error}>{children}</Alert>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Success
|
|
61
|
+
|
|
62
|
+
> Alert component success feature
|
|
63
|
+
|
|
64
|
+
```jsx
|
|
65
|
+
<Alert variant={AlertVariant.Success}>{children}</Alert>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Full
|
|
69
|
+
|
|
70
|
+
> Alert component full feature
|
|
71
|
+
|
|
72
|
+
```jsx
|
|
73
|
+
<Alert variant={AlertVariant.Full}>{children}</Alert>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Banner
|
|
77
|
+
|
|
78
|
+
> Alert component banner feature
|
|
79
|
+
|
|
80
|
+
```jsx
|
|
81
|
+
<Alert variant={AlertVariant.Banner}>{children}</Alert>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## RegularConsentWithInput
|
|
85
|
+
|
|
86
|
+
> Alert component regular consent with input feature
|
|
87
|
+
|
|
88
|
+
```jsx
|
|
89
|
+
<Alert variant={AlertVariant.Default} consent={getConsent({ hasInput: true })}>
|
|
90
|
+
{children}
|
|
91
|
+
</Alert>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## RegularConsentWithoutInput
|
|
95
|
+
|
|
96
|
+
> Alert component regular consent without input feature
|
|
97
|
+
|
|
98
|
+
```jsx
|
|
99
|
+
<Alert variant={AlertVariant.Default} consent={getConsent({ hasInput: false })}>
|
|
100
|
+
{children}
|
|
101
|
+
</Alert>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## RegularConsentCustom
|
|
105
|
+
|
|
106
|
+
> Alert component regular consent custom feature
|
|
107
|
+
|
|
108
|
+
```jsx
|
|
109
|
+
<Alert variant={AlertVariant.Default} consent={consent}>
|
|
110
|
+
{children}
|
|
111
|
+
</Alert>
|
|
112
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownDocs.d.ts","sourceRoot":"","sources":["../../../src/Legacy/MarkdownDocs/MarkdownDocs.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAgD,MAAM,qBAAqB,CAAA;AAEjG,wBAAgB,YAAY,CAAC,EAAE,WAA6C,EAAE,QAAQ,EAAE,EAAE,aAAa,2CAgDtG"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.MarkdownDocs = MarkdownDocs;
|
|
8
|
+
var _reactMarkdown = _interopRequireDefault(require("react-markdown"));
|
|
9
|
+
var _remarkGfm = _interopRequireDefault(require("remark-gfm"));
|
|
10
|
+
var _PreformattedCode = require("../PreformattedCode");
|
|
11
|
+
var _MarkdownDocs = require("./MarkdownDocs.type");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function MarkdownDocs(_ref) {
|
|
14
|
+
var _ref$highlighter = _ref.highlighter,
|
|
15
|
+
highlighter = _ref$highlighter === void 0 ? _MarkdownDocs.MarkdownDocsDefault.Highlighter : _ref$highlighter,
|
|
16
|
+
children = _ref.children;
|
|
17
|
+
if (highlighter == _MarkdownDocs.MarkdownDocsHighlighter.HLJS) {
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactMarkdown["default"], {
|
|
19
|
+
remarkPlugins: [_remarkGfm["default"]],
|
|
20
|
+
components: {
|
|
21
|
+
code: function code(props) {
|
|
22
|
+
var propsChildren = props.children;
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PreformattedCode.PreformattedCode, {
|
|
24
|
+
highlighter: _PreformattedCode.PreformattedCodeHighlighter.HLJS,
|
|
25
|
+
language: _PreformattedCode.PreformattedCodeLanguage.Markdown,
|
|
26
|
+
style: _PreformattedCode.PreformattedCodeStyle.Ocean,
|
|
27
|
+
children: String(propsChildren).replace(/\n$/, '')
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
children: children
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (highlighter == _MarkdownDocs.MarkdownDocsHighlighter.PRISM) {
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactMarkdown["default"], {
|
|
36
|
+
remarkPlugins: [_remarkGfm["default"]],
|
|
37
|
+
components: {
|
|
38
|
+
code: function code(props) {
|
|
39
|
+
var propsChildren = props.children;
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PreformattedCode.PreformattedCode, {
|
|
41
|
+
highlighter: _PreformattedCode.PreformattedCodeHighlighter.PRISM,
|
|
42
|
+
language: _PreformattedCode.PreformattedCodeLanguage.Markdown,
|
|
43
|
+
style: _PreformattedCode.PreformattedCodeStyle.Nord,
|
|
44
|
+
children: String(propsChildren).replace(/\n$/, '')
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
children: children
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface IMarkdownDocsHighlighter {
|
|
2
|
+
HLJS: string;
|
|
3
|
+
PRISM: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const MarkdownDocsHighlighter: IMarkdownDocsHighlighter;
|
|
6
|
+
export interface IMarkdownDocsDefault {
|
|
7
|
+
Highlighter?: string;
|
|
8
|
+
Children: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const MarkdownDocsDefault: IMarkdownDocsDefault;
|
|
11
|
+
export interface IMarkdownDocs {
|
|
12
|
+
highlighter?: string;
|
|
13
|
+
children?: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=MarkdownDocs.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownDocs.type.d.ts","sourceRoot":"","sources":["../../../src/Legacy/MarkdownDocs/MarkdownDocs.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,uBAAuB,EAAE,wBAGrC,CAAA;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,mBAAmB,EAAE,oBAGjC,CAAA;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MarkdownDocsHighlighter = exports.MarkdownDocsDefault = void 0;
|
|
7
|
+
var MarkdownDocsHighlighter = exports.MarkdownDocsHighlighter = {
|
|
8
|
+
HLJS: 'HLJS',
|
|
9
|
+
PRISM: 'PRISM'
|
|
10
|
+
};
|
|
11
|
+
var MarkdownDocsDefault = exports.MarkdownDocsDefault = {
|
|
12
|
+
Highlighter: MarkdownDocsHighlighter.PRISM,
|
|
13
|
+
Children: ''
|
|
14
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# MarkdownDocs
|
|
2
|
+
|
|
3
|
+
> MarkdownDocs component all features
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
# Features
|
|
7
|
+
|
|
8
|
+
> Regular
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Regular
|
|
12
|
+
|
|
13
|
+
> MarkdownDocs component regular feature
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<MarkdownDocs>{MarkdownDocsUnformattedCode}</MarkdownDocs>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## HLJS
|
|
20
|
+
|
|
21
|
+
> MarkdownDocs component hljs feature
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
<MarkdownDocs highlighter={MarkdownDocsHighlighter.HLJS}>{MarkdownUnformattedCode}</MarkdownDocs>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Prism
|
|
28
|
+
|
|
29
|
+
> MarkdownDocs component prism feature
|
|
30
|
+
|
|
31
|
+
```jsx
|
|
32
|
+
<MarkdownDocs highlighter={MarkdownDocsHighlighter.PRISM}>{MarkdownUnformattedCode}</MarkdownDocs>
|
|
33
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Legacy/MarkdownDocs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "MarkdownDocs", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _MarkdownDocs.MarkdownDocs;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _MarkdownDocs = require("./MarkdownDocs");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreformattedCode.d.ts","sourceRoot":"","sources":["../../../src/Legacy/PreformattedCode/PreformattedCode.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAwD,MAAM,yBAAyB,CAAA;AAIjH,wBAAgB,gBAAgB,CAAC,EAC/B,WAAiD,EACjD,QAA2C,EAC3C,KAAqC,EACrC,QAAQ,GACT,EAAE,iBAAiB,2CAgBnB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PreformattedCode = PreformattedCode;
|
|
7
|
+
var _PreformattedCode = require("./PreformattedCode.type");
|
|
8
|
+
var _PreformattedCodeHLJS = require("./PreformattedCodeHLJS");
|
|
9
|
+
var _PreformattedCodePrism = require("./PreformattedCodePrism");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
// https://github.com/react-syntax-highlighter/react-syntax-highlighter
|
|
12
|
+
// https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_LANGUAGES_HLJS.MD
|
|
13
|
+
// https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_STYLES_HLJS.MD
|
|
14
|
+
// https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_LANGUAGES_PRISM.MD
|
|
15
|
+
// https://github.com/react-syntax-highlighter/react-syntax-highlighter/blob/master/AVAILABLE_STYLES_PRISM.MD
|
|
16
|
+
|
|
17
|
+
function PreformattedCode(_ref) {
|
|
18
|
+
var _ref$highlighter = _ref.highlighter,
|
|
19
|
+
highlighter = _ref$highlighter === void 0 ? _PreformattedCode.PreformattedCodeDefault.Highlighter : _ref$highlighter,
|
|
20
|
+
_ref$language = _ref.language,
|
|
21
|
+
language = _ref$language === void 0 ? _PreformattedCode.PreformattedCodeDefault.Language : _ref$language,
|
|
22
|
+
_ref$style = _ref.style,
|
|
23
|
+
style = _ref$style === void 0 ? _PreformattedCode.PreformattedCodeDefault.Style : _ref$style,
|
|
24
|
+
children = _ref.children;
|
|
25
|
+
if (highlighter == _PreformattedCode.PreformattedCodeHighlighter.HLJS) {
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PreformattedCodeHLJS.PreformattedCodeHLJS, {
|
|
27
|
+
language: language,
|
|
28
|
+
style: style,
|
|
29
|
+
children: children
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (highlighter == _PreformattedCode.PreformattedCodeHighlighter.PRISM) {
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PreformattedCodePrism.PreformattedCodePrism, {
|
|
34
|
+
language: language,
|
|
35
|
+
style: style,
|
|
36
|
+
children: children
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface IPreformattedCodeHighlighter {
|
|
2
|
+
HLJS: string;
|
|
3
|
+
PRISM: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const PreformattedCodeHighlighter: IPreformattedCodeHighlighter;
|
|
6
|
+
export interface IPreformattedCodeLanguage {
|
|
7
|
+
TypeScript: string;
|
|
8
|
+
JavaScript: string;
|
|
9
|
+
Markdown: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const PreformattedCodeLanguage: IPreformattedCodeLanguage;
|
|
12
|
+
export interface IPreformattedCodeStyle {
|
|
13
|
+
Ocean: string;
|
|
14
|
+
Nord: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const PreformattedCodeStyle: IPreformattedCodeStyle;
|
|
17
|
+
export interface IPreformattedCodeDefault {
|
|
18
|
+
Highlighter?: string;
|
|
19
|
+
Language: string;
|
|
20
|
+
Style: string;
|
|
21
|
+
Children: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const PreformattedCodeDefault: IPreformattedCodeDefault;
|
|
24
|
+
export interface IPreformattedCode extends IPreformattedCodeBase {
|
|
25
|
+
highlighter?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IPreformattedCodeBase {
|
|
28
|
+
language?: string;
|
|
29
|
+
style?: string;
|
|
30
|
+
children?: string;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=PreformattedCode.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreformattedCode.type.d.ts","sourceRoot":"","sources":["../../../src/Legacy/PreformattedCode/PreformattedCode.type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,2BAA2B,EAAE,4BAGzC,CAAA;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,wBAAwB,EAAE,yBAItC,CAAA;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,qBAAqB,EAAE,sBAGnC,CAAA;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,uBAAuB,EAAE,wBAKrC,CAAA;AAED,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PreformattedCodeStyle = exports.PreformattedCodeLanguage = exports.PreformattedCodeHighlighter = exports.PreformattedCodeDefault = void 0;
|
|
7
|
+
var PreformattedCodeHighlighter = exports.PreformattedCodeHighlighter = {
|
|
8
|
+
HLJS: 'HLJS',
|
|
9
|
+
PRISM: 'PRISM'
|
|
10
|
+
};
|
|
11
|
+
var PreformattedCodeLanguage = exports.PreformattedCodeLanguage = {
|
|
12
|
+
TypeScript: 'typescript',
|
|
13
|
+
JavaScript: 'javascript',
|
|
14
|
+
Markdown: 'markdown'
|
|
15
|
+
};
|
|
16
|
+
var PreformattedCodeStyle = exports.PreformattedCodeStyle = {
|
|
17
|
+
Ocean: 'ocean',
|
|
18
|
+
Nord: 'nord'
|
|
19
|
+
};
|
|
20
|
+
var PreformattedCodeDefault = exports.PreformattedCodeDefault = {
|
|
21
|
+
Highlighter: PreformattedCodeHighlighter.HLJS,
|
|
22
|
+
Language: PreformattedCodeLanguage.TypeScript,
|
|
23
|
+
Style: PreformattedCodeStyle.Ocean,
|
|
24
|
+
Children: ''
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreformattedCodeHLJS.d.ts","sourceRoot":"","sources":["../../../src/Legacy/PreformattedCode/PreformattedCodeHLJS.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAkD,MAAM,yBAAyB,CAAA;AAI/G,wBAAgB,oBAAoB,CAAC,EACnC,QAA2C,EAC3C,KAAqC,EACrC,QAAQ,GACT,EAAE,qBAAqB,2CAYvB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.PreformattedCodeHLJS = PreformattedCodeHLJS;
|
|
8
|
+
var _reactSyntaxHighlighter = require("react-syntax-highlighter");
|
|
9
|
+
var _typescript = _interopRequireDefault(require("react-syntax-highlighter/dist/esm/languages/hljs/typescript"));
|
|
10
|
+
var _hljs = require("react-syntax-highlighter/dist/esm/styles/hljs");
|
|
11
|
+
var _PreformattedCode = require("./PreformattedCode.type");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
// https://github.com/react-syntax-highlighter/react-syntax-highlighter?tab=readme-ov-file#light-build
|
|
14
|
+
|
|
15
|
+
_reactSyntaxHighlighter.Light.registerLanguage('typescript', _typescript["default"]);
|
|
16
|
+
function PreformattedCodeHLJS(_ref) {
|
|
17
|
+
var _ref$language = _ref.language,
|
|
18
|
+
language = _ref$language === void 0 ? _PreformattedCode.PreformattedCodeDefault.Language : _ref$language,
|
|
19
|
+
_ref$style = _ref.style,
|
|
20
|
+
style = _ref$style === void 0 ? _PreformattedCode.PreformattedCodeDefault.Style : _ref$style,
|
|
21
|
+
children = _ref.children;
|
|
22
|
+
var highlighterStyle;
|
|
23
|
+
if (style == _PreformattedCode.PreformattedCodeStyle.Ocean) {
|
|
24
|
+
highlighterStyle = _hljs.ocean;
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSyntaxHighlighter.Light, {
|
|
27
|
+
language: language,
|
|
28
|
+
style: highlighterStyle,
|
|
29
|
+
children: children
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreformattedCodePrism.d.ts","sourceRoot":"","sources":["../../../src/Legacy/PreformattedCode/PreformattedCodePrism.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAkD,MAAM,yBAAyB,CAAA;AAK/G,wBAAgB,qBAAqB,CAAC,EACpC,QAA2C,EAC3C,KAAqC,EACrC,QAAQ,GACT,EAAE,qBAAqB,2CAWvB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.PreformattedCodePrism = PreformattedCodePrism;
|
|
8
|
+
var _reactSyntaxHighlighter = require("react-syntax-highlighter");
|
|
9
|
+
var _markdown = _interopRequireDefault(require("react-syntax-highlighter/dist/esm/languages/prism/markdown"));
|
|
10
|
+
var _typescript = _interopRequireDefault(require("react-syntax-highlighter/dist/esm/languages/prism/typescript"));
|
|
11
|
+
var _prism = require("react-syntax-highlighter/dist/esm/styles/prism");
|
|
12
|
+
var _PreformattedCode = require("./PreformattedCode.type");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
// https://github.com/react-syntax-highlighter/react-syntax-highlighter?tab=readme-ov-file#light-build
|
|
15
|
+
|
|
16
|
+
_reactSyntaxHighlighter.PrismLight.registerLanguage('typescript', _typescript["default"]);
|
|
17
|
+
_reactSyntaxHighlighter.PrismLight.registerLanguage('markdown', _markdown["default"]);
|
|
18
|
+
function PreformattedCodePrism(_ref) {
|
|
19
|
+
var _ref$language = _ref.language,
|
|
20
|
+
language = _ref$language === void 0 ? _PreformattedCode.PreformattedCodeDefault.Language : _ref$language,
|
|
21
|
+
_ref$style = _ref.style,
|
|
22
|
+
style = _ref$style === void 0 ? _PreformattedCode.PreformattedCodeDefault.Style : _ref$style,
|
|
23
|
+
children = _ref.children;
|
|
24
|
+
var highlighterStyle;
|
|
25
|
+
if (style == _PreformattedCode.PreformattedCodeStyle.Nord) {
|
|
26
|
+
highlighterStyle = _prism.nord;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSyntaxHighlighter.PrismLight, {
|
|
29
|
+
language: language,
|
|
30
|
+
style: highlighterStyle,
|
|
31
|
+
children: children
|
|
32
|
+
});
|
|
33
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# PreformattedCode
|
|
2
|
+
|
|
3
|
+
> PreformattedCode component all features
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
# Features
|
|
7
|
+
|
|
8
|
+
> Regular
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Regular
|
|
12
|
+
|
|
13
|
+
> MarkdownDocs component regular feature
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
<PreformattedCode>{TypeScriptUnformattedCode}</PreformattedCode>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## HLJS TypeScript
|
|
20
|
+
|
|
21
|
+
> MarkdownDocs component hljs typescript feature
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
<PreformattedCode
|
|
25
|
+
highlighter={PreformattedCodeHighlighter.HLJS}
|
|
26
|
+
language={PreformattedCodeLanguage.TypeScript}
|
|
27
|
+
style={PreformattedCodeStyle.Ocean}
|
|
28
|
+
>
|
|
29
|
+
{TypeScriptUnformattedCode}
|
|
30
|
+
</PreformattedCode>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## HLJS Markdown
|
|
34
|
+
|
|
35
|
+
> MarkdownDocs component hljs markdown feature
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
<MarkdownDocs highlighter={MarkdownDocsHighlighter.HLJS}>{PreformattedCodeMarkdownDocs}</MarkdownDocs>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Prism TypeScript
|
|
42
|
+
|
|
43
|
+
> MarkdownDocs component prism typescript feature
|
|
44
|
+
|
|
45
|
+
```jsx
|
|
46
|
+
<PreformattedCode
|
|
47
|
+
highlighter={PreformattedCodeHighlighter.PRISM}
|
|
48
|
+
language={PreformattedCodeLanguage.TypeScript}
|
|
49
|
+
style={PreformattedCodeStyle.Nord}
|
|
50
|
+
>
|
|
51
|
+
{TypeScriptUnformattedCode}
|
|
52
|
+
</PreformattedCode>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Prism Markdown
|
|
56
|
+
|
|
57
|
+
> MarkdownDocs component prism markdown feature
|
|
58
|
+
|
|
59
|
+
```jsx
|
|
60
|
+
<MarkdownDocs highlighter={MarkdownDocsHighlighter.PRISM}>{PreformattedCodeMarkdownDocs}</MarkdownDocs>
|
|
61
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Legacy/PreformattedCode/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "PreformattedCode", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _PreformattedCode.PreformattedCode;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PreformattedCodeHighlighter", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _PreformattedCode2.PreformattedCodeHighlighter;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "PreformattedCodeLanguage", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _PreformattedCode2.PreformattedCodeLanguage;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "PreformattedCodeStyle", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _PreformattedCode2.PreformattedCodeStyle;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
var _PreformattedCode = require("./PreformattedCode");
|
|
31
|
+
var _PreformattedCode2 = require("./PreformattedCode.type");
|
package/build/Legacy/index.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ import { ErrorBoundary } from './ErrorBoundary';
|
|
|
8
8
|
import { Icon } from './Icon';
|
|
9
9
|
import { Label } from './Label';
|
|
10
10
|
import { Loader } from './Loader';
|
|
11
|
+
import { MarkdownDocs } from './MarkdownDocs';
|
|
11
12
|
import { Popover } from './Popover';
|
|
13
|
+
import { PreformattedCode } from './PreformattedCode';
|
|
12
14
|
import { Progress } from './Progress';
|
|
13
15
|
import { Select } from './Select';
|
|
14
16
|
import { SelectMenu } from './SelectMenu';
|
|
@@ -717,6 +719,7 @@ export declare const Legacy: {
|
|
|
717
719
|
Loader: typeof Loader;
|
|
718
720
|
LoaderVariant: import("./Loader/Loader.type").ILoaderVariant;
|
|
719
721
|
};
|
|
722
|
+
MarkdownDocs: typeof MarkdownDocs;
|
|
720
723
|
Navigation: {
|
|
721
724
|
Menu: typeof import("./Navigation/Menu").Menu;
|
|
722
725
|
TabNav: typeof import("./Navigation/TabNav").TabNav;
|
|
@@ -734,6 +737,7 @@ export declare const Legacy: {
|
|
|
734
737
|
PopoverVariant: import("./Popover/Popover.type").IPopoverVariant;
|
|
735
738
|
PopoverSize: import("./Popover/Popover.type").IPopoverSize;
|
|
736
739
|
};
|
|
740
|
+
PreformattedCode: typeof PreformattedCode;
|
|
737
741
|
Progress: {
|
|
738
742
|
Progress: typeof Progress;
|
|
739
743
|
ProgressVariant: import("./Progress/Progress.type").IProgressVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Legacy/index.ts"],"names":[],"mappings":"AAAA,OAAO,2CAA2C,CAAA;AAClD,OAAO,EAAE,KAAK,EAAgB,MAAM,SAAS,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAmB,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAyF,MAAM,UAAU,CAAA;AACxH,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG/C,OAAO,EAAE,IAAI,EAAsB,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAiB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Legacy/index.ts"],"names":[],"mappings":"AAAA,OAAO,2CAA2C,CAAA;AAClD,OAAO,EAAE,KAAK,EAAgB,MAAM,SAAS,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAmB,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAyF,MAAM,UAAU,CAAA;AACxH,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG/C,OAAO,EAAE,IAAI,EAAsB,MAAM,QAAQ,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAiB,MAAM,UAAU,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C,OAAO,EAAE,OAAO,EAA+B,MAAM,WAAW,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAmB,MAAM,YAAY,CAAA;AACtD,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAgB,MAAM,SAAS,CAAA;AAE7C,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAE3C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DlB,CAAA"}
|
package/build/Legacy/index.js
CHANGED
|
@@ -16,9 +16,11 @@ var _Grid = require("./Grid");
|
|
|
16
16
|
var _Icon = require("./Icon");
|
|
17
17
|
var _Label = require("./Label");
|
|
18
18
|
var _Loader = require("./Loader");
|
|
19
|
+
var _MarkdownDocs = require("./MarkdownDocs");
|
|
19
20
|
var _Navigation = require("./Navigation");
|
|
20
21
|
var _Pagination = require("./Pagination");
|
|
21
22
|
var _Popover = require("./Popover");
|
|
23
|
+
var _PreformattedCode = require("./PreformattedCode");
|
|
22
24
|
var _Progress = require("./Progress");
|
|
23
25
|
var _Select = require("./Select");
|
|
24
26
|
var _SelectMenu = require("./SelectMenu");
|
|
@@ -63,6 +65,7 @@ var Legacy = exports.Legacy = {
|
|
|
63
65
|
Loader: _Loader.Loader,
|
|
64
66
|
LoaderVariant: _Loader.LoaderVariant
|
|
65
67
|
},
|
|
68
|
+
MarkdownDocs: _MarkdownDocs.MarkdownDocs,
|
|
66
69
|
Navigation: _Navigation.Navigation,
|
|
67
70
|
Pagination: _Pagination.Pagination,
|
|
68
71
|
Popover: {
|
|
@@ -70,6 +73,7 @@ var Legacy = exports.Legacy = {
|
|
|
70
73
|
PopoverVariant: _Popover.PopoverVariant,
|
|
71
74
|
PopoverSize: _Popover.PopoverSize
|
|
72
75
|
},
|
|
76
|
+
PreformattedCode: _PreformattedCode.PreformattedCode,
|
|
73
77
|
Progress: {
|
|
74
78
|
Progress: _Progress.Progress,
|
|
75
79
|
ProgressVariant: _Progress.ProgressVariant
|
|
@@ -30,8 +30,7 @@ var Flash = /*#__PURE__*/(0, _react.forwardRef)(function Flash(_ref, ref) {
|
|
|
30
30
|
"data-variant": variant
|
|
31
31
|
}));
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// }
|
|
33
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
34
|
+
Flash.displayName = 'Flash';
|
|
35
|
+
}
|
|
37
36
|
var _default = exports["default"] = Flash;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papillonarts/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Papillon Arts Components",
|
|
5
5
|
"homepage": "https://github.com/papillonarts/papillonarts/tree/master/packages/components",
|
|
6
6
|
"repository": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"build-release": "npm run build"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@papillonarts/css": "^0.
|
|
30
|
-
"@papillonarts/library": "^0.
|
|
29
|
+
"@papillonarts/css": "^0.34.0",
|
|
30
|
+
"@papillonarts/library": "^0.34.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "1d84f25ec55009565a268dee39ca2d0ba1cecbbf"
|
|
33
33
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const Flash: any;
|
|
2
|
-
export declare function regular(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export declare function success(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare function danger(): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare function warning(): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare function full(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare function withIconAndAction(): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare function withIconActionDismiss(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
//# sourceMappingURL=Flash.features.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Flash.features.d.ts","sourceRoot":"","sources":["../../../src/Modern/Flash/Flash.features.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,KAAK,KAGgC,CAAA;AAElD,wBAAgB,OAAO,4CAEtB;AAED,wBAAgB,OAAO,4CAgBtB;AAED,wBAAgB,MAAM,4CAgBrB;AAED,wBAAgB,OAAO,4CAgBtB;AAED,wBAAgB,IAAI,4CAgBnB;AAED,wBAAgB,iBAAiB,4CAahC;AAED,wBAAgB,qBAAqB,4CAcpC"}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.Flash = void 0;
|
|
8
|
-
exports.danger = danger;
|
|
9
|
-
exports.full = full;
|
|
10
|
-
exports.regular = regular;
|
|
11
|
-
exports.success = success;
|
|
12
|
-
exports.warning = warning;
|
|
13
|
-
exports.withIconActionDismiss = withIconActionDismiss;
|
|
14
|
-
exports.withIconAndAction = withIconAndAction;
|
|
15
|
-
var _octiconsReact = require("@primer/octicons-react");
|
|
16
|
-
var _FlashFeaturesStoriesModule = _interopRequireDefault(require("./Flash.features.stories.module.scss"));
|
|
17
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
// import { Button, IconButton } from '../Button'
|
|
19
|
-
// import Link from '../Link'
|
|
20
|
-
|
|
21
|
-
var Flash = exports.Flash = process.env.NODE_ENV === 'develop' || process.env.NODE_ENV === 'test' ? require('../../index').Modern.Flash.Flash : require('../../../build').Modern.Flash.Flash;
|
|
22
|
-
function regular() {
|
|
23
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Flash, {
|
|
24
|
-
children: "Default"
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
function success() {
|
|
28
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Flash, {
|
|
29
|
-
variant: "success",
|
|
30
|
-
style: {
|
|
31
|
-
display: 'grid',
|
|
32
|
-
gridTemplateColumns: 'min-content 1fr minmax(0, auto)',
|
|
33
|
-
gridTemplateAreas: "'visual message actions'"
|
|
34
|
-
},
|
|
35
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
36
|
-
className: _FlashFeaturesStoriesModule["default"].Visual,
|
|
37
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.CheckCircleIcon, {
|
|
38
|
-
"aria-label": "Success"
|
|
39
|
-
})
|
|
40
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
41
|
-
className: _FlashFeaturesStoriesModule["default"].Message,
|
|
42
|
-
children: "Success"
|
|
43
|
-
})]
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function danger() {
|
|
47
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Flash, {
|
|
48
|
-
variant: "danger",
|
|
49
|
-
style: {
|
|
50
|
-
display: 'grid',
|
|
51
|
-
gridTemplateColumns: 'min-content 1fr minmax(0, auto)',
|
|
52
|
-
gridTemplateAreas: "'visual message actions'"
|
|
53
|
-
},
|
|
54
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
|
-
className: _FlashFeaturesStoriesModule["default"].Visual,
|
|
56
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.InfoIcon, {
|
|
57
|
-
"aria-label": "Danger"
|
|
58
|
-
})
|
|
59
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
60
|
-
className: _FlashFeaturesStoriesModule["default"].Message,
|
|
61
|
-
children: "Danger"
|
|
62
|
-
})]
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
function warning() {
|
|
66
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Flash, {
|
|
67
|
-
variant: "warning",
|
|
68
|
-
style: {
|
|
69
|
-
display: 'grid',
|
|
70
|
-
gridTemplateColumns: 'min-content 1fr minmax(0, auto)',
|
|
71
|
-
gridTemplateAreas: "'visual message actions'"
|
|
72
|
-
},
|
|
73
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
74
|
-
className: _FlashFeaturesStoriesModule["default"].Visual,
|
|
75
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.AlertIcon, {
|
|
76
|
-
"aria-label": "Warning"
|
|
77
|
-
})
|
|
78
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
-
className: _FlashFeaturesStoriesModule["default"].Message,
|
|
80
|
-
children: "Warning"
|
|
81
|
-
})]
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function full() {
|
|
85
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Flash, {
|
|
86
|
-
full: true,
|
|
87
|
-
style: {
|
|
88
|
-
display: 'grid',
|
|
89
|
-
gridTemplateColumns: 'min-content 1fr minmax(0, auto)',
|
|
90
|
-
gridTemplateAreas: "'visual message actions'"
|
|
91
|
-
},
|
|
92
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
93
|
-
className: _FlashFeaturesStoriesModule["default"].Visual,
|
|
94
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.InfoIcon, {
|
|
95
|
-
"aria-label": "Info"
|
|
96
|
-
})
|
|
97
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
98
|
-
className: _FlashFeaturesStoriesModule["default"].Message,
|
|
99
|
-
children: "Full"
|
|
100
|
-
})]
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
function withIconAndAction() {
|
|
104
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Flash, {
|
|
105
|
-
className: _FlashFeaturesStoriesModule["default"].WithIconAndAction,
|
|
106
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
107
|
-
className: _FlashFeaturesStoriesModule["default"].Visual,
|
|
108
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.InfoIcon, {
|
|
109
|
-
"aria-label": "Info"
|
|
110
|
-
})
|
|
111
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
112
|
-
className: _FlashFeaturesStoriesModule["default"].Message,
|
|
113
|
-
children: "This is a flash message with an icon and an action."
|
|
114
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
115
|
-
className: _FlashFeaturesStoriesModule["default"].ActionsResponsive
|
|
116
|
-
})]
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
function withIconActionDismiss() {
|
|
120
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Flash, {
|
|
121
|
-
className: _FlashFeaturesStoriesModule["default"].WithIconActionDismiss,
|
|
122
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
123
|
-
className: _FlashFeaturesStoriesModule["default"].Visual,
|
|
124
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_octiconsReact.InfoIcon, {
|
|
125
|
-
"aria-label": "Info"
|
|
126
|
-
})
|
|
127
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
128
|
-
className: _FlashFeaturesStoriesModule["default"].Message,
|
|
129
|
-
children: "This is a flash message with an icon and an action."
|
|
130
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
131
|
-
className: _FlashFeaturesStoriesModule["default"].ActionsResponsive
|
|
132
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
133
|
-
className: _FlashFeaturesStoriesModule["default"].Close
|
|
134
|
-
})]
|
|
135
|
-
});
|
|
136
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: any;
|
|
5
|
-
decorators: ((...args: any[]) => any)[];
|
|
6
|
-
parameters: {
|
|
7
|
-
jest: string[];
|
|
8
|
-
};
|
|
9
|
-
excludeStories: string[];
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const Success: Story;
|
|
14
|
-
export declare const Danger: Story;
|
|
15
|
-
export declare const Warning: Story;
|
|
16
|
-
export declare const Full: Story;
|
|
17
|
-
export declare const WithIconAndAction: Story;
|
|
18
|
-
export declare const WithIconActionDismiss: Story;
|
|
19
|
-
//# sourceMappingURL=Flash.features.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Flash.features.stories.d.ts","sourceRoot":"","sources":["../../../src/Modern/Flash/Flash.features.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAI/D,QAAA,MAAM,IAAI;;;;;;;;CAMoB,CAAA;AAE9B,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAA2B,CAAA;AAEjD,eAAO,MAAM,MAAM,EAAE,KAA0B,CAAA;AAE/C,eAAO,MAAM,OAAO,EAAE,KAA2B,CAAA;AAEjD,eAAO,MAAM,IAAI,EAAE,KAAwB,CAAA;AAE3C,eAAO,MAAM,iBAAiB,EAAE,KAAqC,CAAA;AAErE,eAAO,MAAM,qBAAqB,EAAE,KAAyC,CAAA"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = exports.WithIconAndAction = exports.WithIconActionDismiss = exports.Warning = exports.Success = exports.Full = exports.Danger = void 0;
|
|
8
|
-
var _addonJest = require("@storybook/addon-jest");
|
|
9
|
-
var _jestTestResults = _interopRequireDefault(require("../../../../../.jest-test-results.json"));
|
|
10
|
-
var _Flash = require("./Flash.features");
|
|
11
|
-
// https://storybook.js.org/docs/writing-stories
|
|
12
|
-
// https://storybook.js.org/docs/api/csf
|
|
13
|
-
|
|
14
|
-
var meta = {
|
|
15
|
-
title: 'Modern/Flash/Features',
|
|
16
|
-
component: _Flash.Flash,
|
|
17
|
-
decorators: [(0, _addonJest.withTests)({
|
|
18
|
-
results: _jestTestResults["default"]
|
|
19
|
-
})],
|
|
20
|
-
parameters: {
|
|
21
|
-
jest: ['Flash.test.ts']
|
|
22
|
-
},
|
|
23
|
-
excludeStories: ['Custom']
|
|
24
|
-
};
|
|
25
|
-
var _default = exports["default"] = meta;
|
|
26
|
-
var Success = exports.Success = {
|
|
27
|
-
render: _Flash.success
|
|
28
|
-
};
|
|
29
|
-
var Danger = exports.Danger = {
|
|
30
|
-
render: _Flash.danger
|
|
31
|
-
};
|
|
32
|
-
var Warning = exports.Warning = {
|
|
33
|
-
render: _Flash.warning
|
|
34
|
-
};
|
|
35
|
-
var Full = exports.Full = {
|
|
36
|
-
render: _Flash.full
|
|
37
|
-
};
|
|
38
|
-
var WithIconAndAction = exports.WithIconAndAction = {
|
|
39
|
-
render: _Flash.withIconAndAction
|
|
40
|
-
};
|
|
41
|
-
var WithIconActionDismiss = exports.WithIconActionDismiss = {
|
|
42
|
-
render: _Flash.withIconActionDismiss
|
|
43
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: any;
|
|
5
|
-
decorators: ((...args: any[]) => any)[];
|
|
6
|
-
parameters: {
|
|
7
|
-
jest: string[];
|
|
8
|
-
};
|
|
9
|
-
excludeStories: string[];
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const Default: Story;
|
|
14
|
-
//# sourceMappingURL=Flash.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Flash.stories.d.ts","sourceRoot":"","sources":["../../../src/Modern/Flash/Flash.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAI/D,QAAA,MAAM,IAAI;;;;;;;;CAMoB,CAAA;AAE9B,eAAe,IAAI,CAAA;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAA2B,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = exports.Default = void 0;
|
|
8
|
-
var _addonJest = require("@storybook/addon-jest");
|
|
9
|
-
var _jestTestResults = _interopRequireDefault(require("../../../../../.jest-test-results.json"));
|
|
10
|
-
var _Flash = require("./Flash.features");
|
|
11
|
-
// https://storybook.js.org/docs/writing-stories
|
|
12
|
-
// https://storybook.js.org/docs/api/csf
|
|
13
|
-
|
|
14
|
-
var meta = {
|
|
15
|
-
title: 'Modern/Flash',
|
|
16
|
-
component: _Flash.Flash,
|
|
17
|
-
decorators: [(0, _addonJest.withTests)({
|
|
18
|
-
results: _jestTestResults["default"]
|
|
19
|
-
})],
|
|
20
|
-
parameters: {
|
|
21
|
-
jest: ['Flash.test.ts']
|
|
22
|
-
},
|
|
23
|
-
excludeStories: ['Custom']
|
|
24
|
-
};
|
|
25
|
-
var _default = exports["default"] = meta;
|
|
26
|
-
var Default = exports.Default = {
|
|
27
|
-
render: _Flash.regular
|
|
28
|
-
};
|
|
File without changes
|