@wireapp/react-ui-kit 9.55.0 → 9.56.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/lib/Misc/Badge/Badge.d.ts +4 -0
- package/lib/Misc/Badge/Badge.d.ts.map +1 -0
- package/lib/Misc/Badge/Badge.js +27 -0
- package/lib/Misc/Badge/Badge.stories.d.ts +9 -0
- package/lib/Misc/Badge/Badge.stories.d.ts.map +1 -0
- package/lib/Misc/Badge/Badge.stories.js +28 -0
- package/lib/Misc/Badge/Badge.styles.d.ts +4 -0
- package/lib/Misc/Badge/Badge.styles.d.ts.map +1 -0
- package/lib/Misc/Badge/Badge.styles.js +41 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/Misc/Badge/Badge.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,KAAK,iBAAgB;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,qDAMnD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Badge = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
/*
|
|
6
|
+
* Wire
|
|
7
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
8
|
+
*
|
|
9
|
+
* This program is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const Badge_styles_1 = require("./Badge.styles");
|
|
24
|
+
const Badge = ({ children }) => {
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)("div", { css: Badge_styles_1.wrapperStyles, children: (0, jsx_runtime_1.jsx)("span", { css: Badge_styles_1.textStyles, children: children }) }));
|
|
26
|
+
};
|
|
27
|
+
exports.Badge = Badge;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Badge } from './Badge';
|
|
3
|
+
declare const meta: Meta<typeof Badge>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Badge>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const ShortText: Story;
|
|
8
|
+
export declare const TruncatedText: Story;
|
|
9
|
+
//# sourceMappingURL=Badge.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.stories.d.ts","sourceRoot":"","sources":["../../../src/Misc/Badge/Badge.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAU5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAI3B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TruncatedText = exports.ShortText = exports.Default = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Badge_1 = require("./Badge");
|
|
6
|
+
const meta = {
|
|
7
|
+
component: Badge_1.Badge,
|
|
8
|
+
title: 'Misc/Badge',
|
|
9
|
+
decorators: [
|
|
10
|
+
Story => ((0, jsx_runtime_1.jsx)("div", { style: { padding: '24px', maxWidth: '300px', margin: '0 auto', background: 'white' }, children: (0, jsx_runtime_1.jsx)(Story, {}) })),
|
|
11
|
+
],
|
|
12
|
+
};
|
|
13
|
+
exports.default = meta;
|
|
14
|
+
exports.Default = {
|
|
15
|
+
args: {
|
|
16
|
+
children: 'Default Badge',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
exports.ShortText = {
|
|
20
|
+
args: {
|
|
21
|
+
children: 'New',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
exports.TruncatedText = {
|
|
25
|
+
args: {
|
|
26
|
+
children: 'This is a very long badge text that should be truncated',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.styles.d.ts","sourceRoot":"","sources":["../../../src/Misc/Badge/Badge.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,eAAO,MAAM,aAAa,EAAE,SAc3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,SAGxB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.textStyles = exports.wrapperStyles = void 0;
|
|
22
|
+
const util_1 = require("../../util");
|
|
23
|
+
exports.wrapperStyles = {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
minWidth: 0,
|
|
28
|
+
height: '24px',
|
|
29
|
+
padding: '0 4px',
|
|
30
|
+
background: 'var(--accent-color-highlight)',
|
|
31
|
+
color: 'var(--accent-color)',
|
|
32
|
+
borderRadius: '8px',
|
|
33
|
+
fontWeight: 500,
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
width: 'fit-content',
|
|
36
|
+
maxWidth: '100%',
|
|
37
|
+
};
|
|
38
|
+
exports.textStyles = {
|
|
39
|
+
...(0, util_1.ellipsis)(),
|
|
40
|
+
width: '100%',
|
|
41
|
+
};
|
package/package.json
CHANGED