@eeacms/volto-eea-design-system 0.4.0 → 0.4.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/CHANGELOG.md +35 -0
- package/package.json +1 -1
- package/src/semantic.less +16 -0
- package/src/ui/DownloadLabeledIcon/DownloadLabeledIcon.jsx +54 -0
- package/src/ui/DownloadLabeledIcon/DownloadLabeledIcon.stories.jsx +68 -0
- package/src/ui/LabeledIconGroup/LabeledIconGroup.jsx +67 -0
- package/src/ui/LabeledIconGroup/LabeledIconGroup.stories.jsx +74 -0
- package/src/ui/LanguageLabeledIcon/LanguageLabeledIcon.jsx +92 -0
- package/src/ui/LanguageLabeledIcon/LanguageLabeledIcon.stories.jsx +63 -0
- package/src/ui/NewTabLabeledIcon/NewTabLabeledIcon.jsx +26 -0
- package/src/ui/NewTabLabeledIcon/NewTabLabeledIcon.stories.jsx +49 -0
- package/src/ui/index.js +8 -0
- package/theme/theme.config +4 -0
- package/theme/themes/eea/extras/downloadLabeledIcon.less +87 -0
- package/theme/themes/eea/extras/downloadLabeledIcon.variables +45 -0
- package/theme/themes/eea/extras/labeledIconGroup.less +20 -0
- package/theme/themes/eea/extras/labeledIconGroup.variables +10 -0
- package/theme/themes/eea/extras/languageLabeledIcon.less +81 -0
- package/theme/themes/eea/extras/languageLabeledIcon.variables +41 -0
- package/theme/themes/eea/extras/newTabLabeledIcon.less +41 -0
- package/theme/themes/eea/extras/newTabLabeledIcon.variables +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,43 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [0.4.1](https://github.com/eea/volto-eea-design-system/compare/0.4.0...0.4.1)
|
|
8
|
+
|
|
9
|
+
- [R3] Labeled icons [`#137`](https://github.com/eea/volto-eea-design-system/pull/137)
|
|
10
|
+
- Autobuild of docusaurus docs [`724be48`](https://github.com/eea/volto-eea-design-system/commit/724be48bebb5421663969b694fca79181f007977)
|
|
11
|
+
- refactor(LanguageLabeledIcons):minor storybook change [`78f5544`](https://github.com/eea/volto-eea-design-system/commit/78f55442a80cbc2f716ba81274ed08204e3c502a)
|
|
12
|
+
- refactor(LanguageLabeledIcon): set language code to uppercase and minor storybook change [`ac28693`](https://github.com/eea/volto-eea-design-system/commit/ac286931282c0a69bc6d7803e96cbe302db8994f)
|
|
13
|
+
- refactor(labeledIcon): adjust paddings [`9c1ecdd`](https://github.com/eea/volto-eea-design-system/commit/9c1ecddc52c81be1d952d0af67862a284eba9eec)
|
|
14
|
+
- refactor(labeledIcon): add group wrapper in labeled icon stories [`4b7dd31`](https://github.com/eea/volto-eea-design-system/commit/4b7dd314230145b6239fd800d41f546ab5d9eebb)
|
|
15
|
+
- fix(LabeledIconGroup):fix based on Langauge & Download Labeled icon components changes [`3015864`](https://github.com/eea/volto-eea-design-system/commit/3015864ce740f534aa204402f85a9f392e342513)
|
|
16
|
+
- refactor(LanguageLabeledIcon):implement with pop up [`0f3dd8f`](https://github.com/eea/volto-eea-design-system/commit/0f3dd8f0388484f94351a0ab0798ab53e84c9229)
|
|
17
|
+
- refactor(DownloadLabeledIcon):implement with pop up [`aa61f9b`](https://github.com/eea/volto-eea-design-system/commit/aa61f9b7d449c08c08bc4c004da6a0458598c828)
|
|
18
|
+
- refactor(labeledIcons): update margins for group labeled icons [`5fa5ca9`](https://github.com/eea/volto-eea-design-system/commit/5fa5ca9103a5d8ad1510c90cc8c46d0c82abcc63)
|
|
19
|
+
- refactor(labeledIcons): update colors on download links [`c042642`](https://github.com/eea/volto-eea-design-system/commit/c04264229c91bfdea927fd22f4ee1e8ddbcebd5c)
|
|
20
|
+
- refactor(labeledIcons): adjust language labeled icon to figma [`5741e3d`](https://github.com/eea/volto-eea-design-system/commit/5741e3d2e95665ef12670335b12d29cfbf998fdc)
|
|
21
|
+
- refactor(labeledIcons): adjust new tab labeled icon to figma and replace px with rems [`904615d`](https://github.com/eea/volto-eea-design-system/commit/904615d789ea711678f43ce9f9d02a450289031f)
|
|
22
|
+
- refactor(labeledIcons): add variable for icon color [`9f9d3cb`](https://github.com/eea/volto-eea-design-system/commit/9f9d3cba5115c5c91aaaca49c1f834950400673a)
|
|
23
|
+
- refactor(labeledIcons): adjust download icon to figma and replace px with rems [`4ae8530`](https://github.com/eea/volto-eea-design-system/commit/4ae85307a62526fed75ef0b1d37ad59076370b5a)
|
|
24
|
+
- fix(LanguageLabeledIcon):bug fix & languages change [`1436e2b`](https://github.com/eea/volto-eea-design-system/commit/1436e2bc270f8f079f07b7909254bd2e6e087084)
|
|
25
|
+
- fix(Labeled Icons):minor bug fix [`00f3022`](https://github.com/eea/volto-eea-design-system/commit/00f3022cdc2bfad634707f0d6d05768868f599be)
|
|
26
|
+
- feat(languageLabeledIcon) : add new component [`110558e`](https://github.com/eea/volto-eea-design-system/commit/110558eeec37d5b5f616a95298a313ba230dd6f4)
|
|
27
|
+
- chore(LabeledIconGroup) : lint changes [`ab36476`](https://github.com/eea/volto-eea-design-system/commit/ab364763bb2526adbbb7fc3c656a16b497568940)
|
|
28
|
+
- fix(LabeledIconGroup) : fix links for tests [`daa1065`](https://github.com/eea/volto-eea-design-system/commit/daa10653ca37f3e83302e2ebcc566b5f5ec4c4d9)
|
|
29
|
+
- chore(labeledIconGroup) : lint changes [`535cee4`](https://github.com/eea/volto-eea-design-system/commit/535cee4795dff75b35856cb4406a9bd33ee07ca4)
|
|
30
|
+
- feat(LanguageLabeledIcon):add new component [`d00200c`](https://github.com/eea/volto-eea-design-system/commit/d00200c278e1dab02b449b460a325e0f2e7b8ccd)
|
|
31
|
+
- feat(labeledIconGroup) : add new component [`787d648`](https://github.com/eea/volto-eea-design-system/commit/787d648342d78c4f9d28fde9d08e83089ef7b08f)
|
|
32
|
+
- fix(LabeledIcon) : fix lint errors [`91b042f`](https://github.com/eea/volto-eea-design-system/commit/91b042f8c16bd3e99659c1c24a5f2a946c72b03f)
|
|
33
|
+
- fix(newTabLabeledIcon) : add link item [`b1a9ada`](https://github.com/eea/volto-eea-design-system/commit/b1a9ada3dd7dae9e1841cfde5319a6ab37b15de2)
|
|
34
|
+
- feat(newTabLabeledIcon) : add new component [`8f5cd31`](https://github.com/eea/volto-eea-design-system/commit/8f5cd31257a306a58c1d9cdbf7cb428701412369)
|
|
35
|
+
- style(downloadLabeledIcon) : fix alignment [`4558017`](https://github.com/eea/volto-eea-design-system/commit/455801701d2958515885ba2c398312f0c56057b0)
|
|
36
|
+
- style(downloadLabeledIcon) : fix styling [`6d8e3ac`](https://github.com/eea/volto-eea-design-system/commit/6d8e3acb3bac1a4174d4bb526d6188cb5e5f8faa)
|
|
37
|
+
- feat(DownLoadLabeledIcon) : add new component [`6ea2fa1`](https://github.com/eea/volto-eea-design-system/commit/6ea2fa1ec17ce235401a8ac741afa8fede920d26)
|
|
38
|
+
|
|
7
39
|
#### [0.4.0](https://github.com/eea/volto-eea-design-system/compare/0.3.1...0.4.0)
|
|
8
40
|
|
|
41
|
+
> 1 June 2022
|
|
42
|
+
|
|
43
|
+
- Release [`#177`](https://github.com/eea/volto-eea-design-system/pull/177)
|
|
9
44
|
- [Homepage] Carousel [`#161`](https://github.com/eea/volto-eea-design-system/pull/161)
|
|
10
45
|
- [R2] Label [`#160`](https://github.com/eea/volto-eea-design-system/pull/160)
|
|
11
46
|
- docs(homepage): adding homepage with links for upcoming sections [`#166`](https://github.com/eea/volto-eea-design-system/pull/166)
|
package/package.json
CHANGED
package/src/semantic.less
CHANGED
|
@@ -260,3 +260,19 @@
|
|
|
260
260
|
& {
|
|
261
261
|
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/relatedContent';
|
|
262
262
|
}
|
|
263
|
+
|
|
264
|
+
& {
|
|
265
|
+
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/downloadLabeledIcon';
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
& {
|
|
269
|
+
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/newTabLabeledIcon';
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
& {
|
|
273
|
+
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/labeledIconGroup';
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
& {
|
|
277
|
+
@import '@eeacms/volto-eea-design-system/../theme/themes/eea/extras/languageLabeledIcon';
|
|
278
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon, Popup } from 'semantic-ui-react';
|
|
3
|
+
|
|
4
|
+
function DownloadLabeledIcon({ children, ...rest }) {
|
|
5
|
+
return (
|
|
6
|
+
<div className="eea download labeled icon">
|
|
7
|
+
<Popup
|
|
8
|
+
className="download-popup"
|
|
9
|
+
trigger={rest.trigger}
|
|
10
|
+
content={children}
|
|
11
|
+
basic
|
|
12
|
+
on="click"
|
|
13
|
+
position="bottom center"
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const Label = ({ children, ...rest }) => {
|
|
20
|
+
return <div className="label">{children}</div>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const IconItem = ({ children, ...rest }) => {
|
|
24
|
+
return (
|
|
25
|
+
<div className="icon wrapper">
|
|
26
|
+
<Icon className={rest.icon} />
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const Dropdown = ({ children, ...rest }) => {
|
|
32
|
+
return (
|
|
33
|
+
<div className="dropdown">
|
|
34
|
+
<div className="link wrapper">
|
|
35
|
+
<ul>
|
|
36
|
+
{rest.links !== null &&
|
|
37
|
+
rest.links.map((item, index) => (
|
|
38
|
+
<li key={index}>
|
|
39
|
+
<a href={item.href}>
|
|
40
|
+
{item.linkName} <Icon className={rest.downloadIcon} />
|
|
41
|
+
</a>
|
|
42
|
+
</li>
|
|
43
|
+
))}
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
DownloadLabeledIcon.Label = Label;
|
|
51
|
+
DownloadLabeledIcon.Icon = IconItem;
|
|
52
|
+
DownloadLabeledIcon.Dropdown = Dropdown;
|
|
53
|
+
|
|
54
|
+
export default DownloadLabeledIcon;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import DownloadLabeledIcon from './DownloadLabeledIcon';
|
|
3
|
+
import LabeledIconGroup from '../LabeledIconGroup/LabeledIconGroup';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Labeled Icons/Download',
|
|
7
|
+
component: DownloadLabeledIcon,
|
|
8
|
+
argTypes: {
|
|
9
|
+
label: {
|
|
10
|
+
description: 'Download Label',
|
|
11
|
+
table: {
|
|
12
|
+
defaultValue: { summary: '""' },
|
|
13
|
+
type: { summary: 'string' },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
icon: {
|
|
17
|
+
description: 'Download Icon',
|
|
18
|
+
table: {
|
|
19
|
+
defaultValue: { summary: '""' },
|
|
20
|
+
type: { summary: 'string' },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
downloadIcon: {
|
|
24
|
+
description: 'Download option Icon',
|
|
25
|
+
table: {
|
|
26
|
+
defaultValue: { summary: '""' },
|
|
27
|
+
type: { summary: 'string' },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
links: {
|
|
31
|
+
description: 'array of list content',
|
|
32
|
+
table: {
|
|
33
|
+
type: { summary: 'object' },
|
|
34
|
+
defaultValue: { summary: ' "" ' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const DefaultTemplate = (args) => (
|
|
41
|
+
<LabeledIconGroup>
|
|
42
|
+
<DownloadLabeledIcon
|
|
43
|
+
{...args}
|
|
44
|
+
trigger={
|
|
45
|
+
<div>
|
|
46
|
+
<DownloadLabeledIcon.Icon {...args}>
|
|
47
|
+
{args.icon}
|
|
48
|
+
</DownloadLabeledIcon.Icon>
|
|
49
|
+
<DownloadLabeledIcon.Label>{args.label}</DownloadLabeledIcon.Label>
|
|
50
|
+
</div>
|
|
51
|
+
}
|
|
52
|
+
>
|
|
53
|
+
<DownloadLabeledIcon.Dropdown {...args}></DownloadLabeledIcon.Dropdown>
|
|
54
|
+
</DownloadLabeledIcon>
|
|
55
|
+
</LabeledIconGroup>
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
export const Default = DefaultTemplate.bind({});
|
|
59
|
+
Default.args = {
|
|
60
|
+
label: 'Download',
|
|
61
|
+
icon: 'ri-download-2-fill',
|
|
62
|
+
downloadIcon: 'ri-download-2-fill',
|
|
63
|
+
links: [
|
|
64
|
+
{ linkName: 'PDF', href: '/#' },
|
|
65
|
+
{ linkName: 'SVG', href: '/#' },
|
|
66
|
+
{ linkName: 'PNG', href: '/#' },
|
|
67
|
+
],
|
|
68
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import NewTabLabeledIcon from '../NewTabLabeledIcon/NewTabLabeledIcon';
|
|
3
|
+
import DownloadLabeledIcon from '../DownloadLabeledIcon/DownloadLabeledIcon';
|
|
4
|
+
import LanguageLabeledIcon from '../LanguageLabeledIcon/LanguageLabeledIcon';
|
|
5
|
+
|
|
6
|
+
function LabeledIconGroup({ children, ...rest }) {
|
|
7
|
+
return (
|
|
8
|
+
<div className="eea labeled icon group" {...rest}>
|
|
9
|
+
{children}
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
LabeledIconGroup.Download = ({ children, ...rest }) => {
|
|
15
|
+
return (
|
|
16
|
+
<div className="group wrapper">
|
|
17
|
+
<DownloadLabeledIcon
|
|
18
|
+
{...rest}
|
|
19
|
+
trigger={
|
|
20
|
+
<div>
|
|
21
|
+
<DownloadLabeledIcon.Icon {...rest}>
|
|
22
|
+
{rest.icon}
|
|
23
|
+
</DownloadLabeledIcon.Icon>
|
|
24
|
+
<DownloadLabeledIcon.Label>{rest.label}</DownloadLabeledIcon.Label>
|
|
25
|
+
</div>
|
|
26
|
+
}
|
|
27
|
+
>
|
|
28
|
+
<DownloadLabeledIcon.Dropdown {...rest}></DownloadLabeledIcon.Dropdown>
|
|
29
|
+
</DownloadLabeledIcon>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
LabeledIconGroup.NewTab = ({ children, ...rest }) => {
|
|
35
|
+
return (
|
|
36
|
+
<div className="group wrapper">
|
|
37
|
+
<NewTabLabeledIcon {...rest}>
|
|
38
|
+
<NewTabLabeledIcon.Icon {...rest}>{rest.icon}</NewTabLabeledIcon.Icon>
|
|
39
|
+
<NewTabLabeledIcon.Label>{rest.label}</NewTabLabeledIcon.Label>
|
|
40
|
+
</NewTabLabeledIcon>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
LabeledIconGroup.Language = ({ children, ...rest }) => {
|
|
46
|
+
return (
|
|
47
|
+
<div className="group wrapper">
|
|
48
|
+
<LanguageLabeledIcon
|
|
49
|
+
{...rest}
|
|
50
|
+
trigger={
|
|
51
|
+
<div>
|
|
52
|
+
<LanguageLabeledIcon.Icon
|
|
53
|
+
icon={rest.icon}
|
|
54
|
+
></LanguageLabeledIcon.Icon>
|
|
55
|
+
<LanguageLabeledIcon.Label>{rest.label}</LanguageLabeledIcon.Label>
|
|
56
|
+
</div>
|
|
57
|
+
}
|
|
58
|
+
>
|
|
59
|
+
<LanguageLabeledIcon.Dropdown
|
|
60
|
+
items={rest.items}
|
|
61
|
+
></LanguageLabeledIcon.Dropdown>
|
|
62
|
+
</LanguageLabeledIcon>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default LabeledIconGroup;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import LabeledIconGroup from './LabeledIconGroup';
|
|
3
|
+
// eslint-disable-next-line import/no-unresolved
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Labeled Icons/Group',
|
|
7
|
+
component: LabeledIconGroup,
|
|
8
|
+
argTypes: {
|
|
9
|
+
tab: {
|
|
10
|
+
description: 'NewTabLabeledIcon Component Contents',
|
|
11
|
+
table: {
|
|
12
|
+
type: { summary: 'Object' },
|
|
13
|
+
defaultValue: { summary: ' "" ' },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
download: {
|
|
17
|
+
description: 'DownloadLabeledIcon Component Contents',
|
|
18
|
+
table: {
|
|
19
|
+
type: { summary: 'Object' },
|
|
20
|
+
defaultValue: { summary: ' "" ' },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
language: {
|
|
24
|
+
description: 'LanguageLabeledIcon Component Contents',
|
|
25
|
+
table: {
|
|
26
|
+
type: { summary: 'Object' },
|
|
27
|
+
defaultValue: { summary: ' "" ' },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const DefaultTemplate = (args) => (
|
|
34
|
+
<div>
|
|
35
|
+
<LabeledIconGroup {...args}>
|
|
36
|
+
<LabeledIconGroup.Download {...args.download}></LabeledIconGroup.Download>
|
|
37
|
+
<LabeledIconGroup.NewTab {...args.tab}>
|
|
38
|
+
{args.tab.label}
|
|
39
|
+
</LabeledIconGroup.NewTab>
|
|
40
|
+
<LabeledIconGroup.Language {...args.language}></LabeledIconGroup.Language>
|
|
41
|
+
</LabeledIconGroup>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export const Default = DefaultTemplate.bind({});
|
|
46
|
+
Default.args = {
|
|
47
|
+
tab: {
|
|
48
|
+
label: 'Open in new Tab',
|
|
49
|
+
link: '/#',
|
|
50
|
+
icon: 'ri-share-box-fill',
|
|
51
|
+
},
|
|
52
|
+
download: {
|
|
53
|
+
label: 'Download',
|
|
54
|
+
icon: 'ri-download-2-fill',
|
|
55
|
+
downloadIcon: 'ri-download-2-fill',
|
|
56
|
+
links: [
|
|
57
|
+
{ linkName: 'PDF', href: '/#' },
|
|
58
|
+
{ linkName: 'SVG', href: '/#' },
|
|
59
|
+
{ linkName: 'PNG', href: '/#' },
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
language: {
|
|
63
|
+
label: 'Language',
|
|
64
|
+
icon: <i className="ri-global-line"></i>,
|
|
65
|
+
items: [
|
|
66
|
+
{ name: 'English', code: 'en' },
|
|
67
|
+
{ name: 'Eesti', code: 'et' },
|
|
68
|
+
{ name: 'Suomi', code: 'fi' },
|
|
69
|
+
{ name: 'Français', code: 'fr' },
|
|
70
|
+
{ name: 'Deutsch', code: 'de' },
|
|
71
|
+
{ name: 'Magyar', code: 'hu' },
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React, { useState, useContext, createContext } from 'react';
|
|
2
|
+
import { Popup } from 'semantic-ui-react';
|
|
3
|
+
|
|
4
|
+
const LanguageContext = createContext();
|
|
5
|
+
|
|
6
|
+
function LanguageLabeledIcon({ children, ...rest }) {
|
|
7
|
+
const [language, setLanguage] = useState('EN');
|
|
8
|
+
return (
|
|
9
|
+
<LanguageContext.Provider
|
|
10
|
+
value={{
|
|
11
|
+
language: language,
|
|
12
|
+
setLanguage: setLanguage,
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
<div className="eea language labeled icon">
|
|
16
|
+
<Popup
|
|
17
|
+
className="language-popup"
|
|
18
|
+
trigger={rest.trigger}
|
|
19
|
+
content={children}
|
|
20
|
+
basic
|
|
21
|
+
on="click"
|
|
22
|
+
position="bottom center"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</LanguageContext.Provider>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const Label = ({ children, ...rest }) => {
|
|
30
|
+
return <div className="label">{children}</div>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
LanguageLabeledIcon.Label = Label;
|
|
34
|
+
|
|
35
|
+
const Icon = ({ children, ...rest }) => {
|
|
36
|
+
const context = useContext(LanguageContext);
|
|
37
|
+
return (
|
|
38
|
+
<div className="icon wrapper">
|
|
39
|
+
{rest.icon}
|
|
40
|
+
<span>{context.language}</span>
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
LanguageLabeledIcon.Icon = Icon;
|
|
46
|
+
|
|
47
|
+
const Dropdown = ({ children, ...rest }) => {
|
|
48
|
+
const context = useContext(LanguageContext);
|
|
49
|
+
|
|
50
|
+
var length = rest.items.length;
|
|
51
|
+
var first = rest.items.slice(0, length / 2);
|
|
52
|
+
var second = rest.items.slice(length / 2);
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<div className="dropdown">
|
|
56
|
+
<div className={`link wrapper`}>
|
|
57
|
+
<ul>
|
|
58
|
+
{first.map((item, index) => (
|
|
59
|
+
<li key={index}>
|
|
60
|
+
<div
|
|
61
|
+
onClick={() => context.setLanguage(item.code.toUpperCase())}
|
|
62
|
+
onKeyDown={() => context.setHidden(!context.hidden)}
|
|
63
|
+
role="button"
|
|
64
|
+
tabIndex={0}
|
|
65
|
+
>
|
|
66
|
+
{item.name} <span>{item.code.toUpperCase()}</span>
|
|
67
|
+
</div>
|
|
68
|
+
</li>
|
|
69
|
+
))}
|
|
70
|
+
</ul>
|
|
71
|
+
<ul>
|
|
72
|
+
{second.map((item, index) => (
|
|
73
|
+
<li key={index}>
|
|
74
|
+
<div
|
|
75
|
+
onClick={() => context.setLanguage(item.code.toUpperCase())}
|
|
76
|
+
onKeyDown={() => context.setHidden(!context.hidden)}
|
|
77
|
+
role="button"
|
|
78
|
+
tabIndex={0}
|
|
79
|
+
>
|
|
80
|
+
{item.name} <span>{item.code.toUpperCase()}</span>
|
|
81
|
+
</div>
|
|
82
|
+
</li>
|
|
83
|
+
))}
|
|
84
|
+
</ul>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
LanguageLabeledIcon.Dropdown = Dropdown;
|
|
91
|
+
|
|
92
|
+
export default LanguageLabeledIcon;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import LanguageLabeledIcon from './LanguageLabeledIcon';
|
|
3
|
+
import LabeledIconGroup from '../LabeledIconGroup/LabeledIconGroup';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Labeled Icons/Language',
|
|
7
|
+
component: LanguageLabeledIcon,
|
|
8
|
+
argTypes: {
|
|
9
|
+
label: {
|
|
10
|
+
description: 'Download Label',
|
|
11
|
+
table: {
|
|
12
|
+
defaultValue: { summary: '""' },
|
|
13
|
+
type: { summary: 'string' },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
icon: {
|
|
17
|
+
description: 'Language Icon',
|
|
18
|
+
table: {
|
|
19
|
+
defaultValue: { summary: '""' },
|
|
20
|
+
type: { summary: 'string' },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
items: {
|
|
24
|
+
description: 'array of language list',
|
|
25
|
+
table: {
|
|
26
|
+
type: { summary: 'object' },
|
|
27
|
+
defaultValue: { summary: ' "" ' },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const Template = (args) => (
|
|
34
|
+
<LabeledIconGroup>
|
|
35
|
+
<LanguageLabeledIcon
|
|
36
|
+
{...args}
|
|
37
|
+
trigger={
|
|
38
|
+
<div>
|
|
39
|
+
<LanguageLabeledIcon.Icon icon={args.icon}></LanguageLabeledIcon.Icon>
|
|
40
|
+
<LanguageLabeledIcon.Label>{args.label}</LanguageLabeledIcon.Label>
|
|
41
|
+
</div>
|
|
42
|
+
}
|
|
43
|
+
>
|
|
44
|
+
<LanguageLabeledIcon.Dropdown
|
|
45
|
+
items={args.items}
|
|
46
|
+
></LanguageLabeledIcon.Dropdown>
|
|
47
|
+
</LanguageLabeledIcon>
|
|
48
|
+
</LabeledIconGroup>
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
export const Default = Template.bind({});
|
|
52
|
+
Default.args = {
|
|
53
|
+
label: 'Language',
|
|
54
|
+
icon: <i className="ri-global-line"></i>,
|
|
55
|
+
items: [
|
|
56
|
+
{ name: 'English', code: 'en' },
|
|
57
|
+
{ name: 'Eesti', code: 'et' },
|
|
58
|
+
{ name: 'Suomi', code: 'fi' },
|
|
59
|
+
{ name: 'Français', code: 'fr' },
|
|
60
|
+
{ name: 'Deutsch', code: 'de' },
|
|
61
|
+
{ name: 'Magyar', code: 'hu' },
|
|
62
|
+
],
|
|
63
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon } from 'semantic-ui-react';
|
|
3
|
+
|
|
4
|
+
function NewTabLabeledIcon({ children, ...rest }) {
|
|
5
|
+
return (
|
|
6
|
+
<div className="eea new tab labeled icon">
|
|
7
|
+
<a target="_blank" rel="noreferrer" href={rest.link}>
|
|
8
|
+
{children}
|
|
9
|
+
</a>
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
NewTabLabeledIcon.Label = ({ children, ...rest }) => {
|
|
15
|
+
return <div className="label">{children}</div>;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
NewTabLabeledIcon.Icon = ({ children, ...rest }) => {
|
|
19
|
+
return (
|
|
20
|
+
<div className="icon wrapper">
|
|
21
|
+
<Icon className={rest.icon} />
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default NewTabLabeledIcon;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import NewTabLabeledIcon from './NewTabLabeledIcon';
|
|
3
|
+
import LabeledIconGroup from '../LabeledIconGroup/LabeledIconGroup';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Labeled Icons/New Tab',
|
|
7
|
+
component: NewTabLabeledIcon,
|
|
8
|
+
argTypes: {
|
|
9
|
+
label: {
|
|
10
|
+
description: 'New Tab Label',
|
|
11
|
+
table: {
|
|
12
|
+
defaultValue: { summary: '""' },
|
|
13
|
+
type: { summary: 'string' },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
link: {
|
|
17
|
+
description: 'New Tab Link',
|
|
18
|
+
table: {
|
|
19
|
+
defaultValue: { summary: '""' },
|
|
20
|
+
type: { summary: 'string' },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
icon: {
|
|
24
|
+
description: 'New Tab Icon',
|
|
25
|
+
table: {
|
|
26
|
+
defaultValue: { summary: '""' },
|
|
27
|
+
type: { summary: 'string' },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const DefaultTemplate = (args) => (
|
|
34
|
+
<LabeledIconGroup>
|
|
35
|
+
<NewTabLabeledIcon {...args}>
|
|
36
|
+
<NewTabLabeledIcon.Icon {...args} e>
|
|
37
|
+
{args.icon}
|
|
38
|
+
</NewTabLabeledIcon.Icon>
|
|
39
|
+
<NewTabLabeledIcon.Label>{args.label}</NewTabLabeledIcon.Label>
|
|
40
|
+
</NewTabLabeledIcon>
|
|
41
|
+
</LabeledIconGroup>
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
export const Default = DefaultTemplate.bind({});
|
|
45
|
+
Default.args = {
|
|
46
|
+
label: 'Open in new Tab',
|
|
47
|
+
link: '/#',
|
|
48
|
+
icon: 'ri-share-box-fill',
|
|
49
|
+
};
|
package/src/ui/index.js
CHANGED
|
@@ -26,4 +26,12 @@ export AvatarGrid from './Card/AvatarGrid/AvatarGrid';
|
|
|
26
26
|
|
|
27
27
|
export KeyContent from './KeyContent/KeyContent';
|
|
28
28
|
|
|
29
|
+
export DownloadLabeledIcon from './DownloadLabeledIcon/DownloadLabeledIcon';
|
|
30
|
+
|
|
31
|
+
export NewTabLabeledIcon from './NewTabLabeledIcon/NewTabLabeledIcon';
|
|
32
|
+
|
|
33
|
+
export LabeledIconGroup from './LabeledIconGroup/LabeledIconGroup';
|
|
34
|
+
|
|
35
|
+
export LanguageLabeledIcon from './LanguageLabeledIcon/LanguageLabeledIcon';
|
|
36
|
+
|
|
29
37
|
export RelatedContent from './Card/RelatedContent/RelatedContent';
|
package/theme/theme.config
CHANGED
|
@@ -90,6 +90,10 @@
|
|
|
90
90
|
@avatarGrid : 'eea';
|
|
91
91
|
@keyContent : 'eea';
|
|
92
92
|
@publicationCard : 'eea';
|
|
93
|
+
@downloadLabeledIcon :'eea';
|
|
94
|
+
@newTabLabeledIcon : 'eea';
|
|
95
|
+
@labeledIconGroup : 'eea';
|
|
96
|
+
@languageLabeledIcon : 'eea';
|
|
93
97
|
@relatedContent : 'eea';
|
|
94
98
|
|
|
95
99
|
/*******************************
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
@type: 'extra';
|
|
2
|
+
@element: 'downloadLabeledIcon';
|
|
3
|
+
|
|
4
|
+
@import (multiple) '../../theme.config';
|
|
5
|
+
|
|
6
|
+
/*******************************
|
|
7
|
+
Download Labeled Icon
|
|
8
|
+
*******************************/
|
|
9
|
+
.eea.download.labeled.icon {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
width: @downloadLabeledIconWidth;
|
|
14
|
+
min-width: @downloadLabeledIconMinWidth;
|
|
15
|
+
text-align: @downloadLabeledIconTextAlign;
|
|
16
|
+
|
|
17
|
+
.label {
|
|
18
|
+
width: @downloadLabeledIconLabelWidth;
|
|
19
|
+
font-size: @downloadLabeledIconLabelFontSize;
|
|
20
|
+
color: @downloadLabeledIconLabelColor;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
.icon.wrapper {
|
|
24
|
+
text-align: center;
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
width: @downloadLabeledIconWrapperWidth;
|
|
28
|
+
padding: @downloadLabeledIconWrapperPadding;
|
|
29
|
+
|
|
30
|
+
.icon {
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
font-size: @downloadLabeledIconIconFontSize;
|
|
35
|
+
color: @downloadLabeledIconColor;
|
|
36
|
+
width: @downloadLabeledIconIconWidth;
|
|
37
|
+
height: @downloadLabeledIconWrapperIconHeight;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ui.popup.download-popup {
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 0;
|
|
45
|
+
border: none;
|
|
46
|
+
|
|
47
|
+
.dropdown {
|
|
48
|
+
position: relative;
|
|
49
|
+
width: @downloadLabeledIconDropdownWIdth;
|
|
50
|
+
|
|
51
|
+
.link.wrapper {
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
background-color: @downloadLabeledIconLinkWrapperBackgroundColor;
|
|
54
|
+
z-index: @downloadLabeledIconLinkWrapperZIndex;
|
|
55
|
+
width: @downloadLabeledIconLinkWrapperWidth;
|
|
56
|
+
|
|
57
|
+
ul {
|
|
58
|
+
list-style-type: none;
|
|
59
|
+
margin: @downloadLabeledIconUlMargin;
|
|
60
|
+
padding: @downloadLabeledIconUlPaddingInlineStart;
|
|
61
|
+
|
|
62
|
+
a {
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
font-weight: @downloadLabeledIconALinkFontWeight;
|
|
66
|
+
font-size: @downloadLabeledIconLinkFontSize;
|
|
67
|
+
padding: @downloadLabeledIconLinkIconPadding;
|
|
68
|
+
color: @downloadLabeledIconALinkColor;
|
|
69
|
+
|
|
70
|
+
.icon {
|
|
71
|
+
font-size: @downloadLabeledIconLinkIconFontSize;
|
|
72
|
+
line-height: @downloadLabeledIconLinkIconLineHeight;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
a:hover {
|
|
76
|
+
color: @downloadLabeledIconALinkColorHover;
|
|
77
|
+
}
|
|
78
|
+
li:hover {
|
|
79
|
+
background-color: @downloadLabeledIconLiHover;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
.link.wrapper.hidden {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*******************************
|
|
2
|
+
Download Labeled Icon
|
|
3
|
+
*******************************/
|
|
4
|
+
|
|
5
|
+
/* Body */
|
|
6
|
+
@downloadLabeledIconWidth: min-content;
|
|
7
|
+
@downloadLabeledIconMinWidth: 5rem;
|
|
8
|
+
@downloadLabeledIconTextAlign: center;
|
|
9
|
+
|
|
10
|
+
/* Label */
|
|
11
|
+
@downloadLabeledIconLabelWidth: 100%;
|
|
12
|
+
@downloadLabeledIconLabelFontSize: 0.875rem;
|
|
13
|
+
@downloadLabeledIconLabelColor: @deepBlue;
|
|
14
|
+
|
|
15
|
+
/* Wrapper */
|
|
16
|
+
@downloadLabeledIconWrapperWidth: 100%;
|
|
17
|
+
@downloadLabeledIconWrapperPadding: 0.5rem;
|
|
18
|
+
|
|
19
|
+
/* Icon */
|
|
20
|
+
@downloadLabeledIconIconFontSize: 1.563rem;
|
|
21
|
+
@downloadLabeledIconWrapperIconHeight: 1.25rem;
|
|
22
|
+
@downloadLabeledIconIconWidth: 1.25rem;
|
|
23
|
+
@downloadLabeledIconColor: @mediumPersianBlue;
|
|
24
|
+
|
|
25
|
+
/* Link Wrapper */
|
|
26
|
+
@downloadLabeledIconLinkWrapperBackgroundColor: #f9f9f9;
|
|
27
|
+
@downloadLabeledIconLinkWrapperZIndex: 1;
|
|
28
|
+
@downloadLabeledIconLinkWrapperWidth: 100%;
|
|
29
|
+
|
|
30
|
+
/* Dropdown */
|
|
31
|
+
@downloadLabeledIconDropdownWIdth: 100%;
|
|
32
|
+
|
|
33
|
+
/* List */
|
|
34
|
+
@downloadLabeledIconUlMargin: 0.25rem 0;
|
|
35
|
+
@downloadLabeledIconUlPaddingInlineStart: 0.25rem 0px;
|
|
36
|
+
@downloadLabeledIconLiHover: @japaneseIndigo;
|
|
37
|
+
|
|
38
|
+
/* Link */
|
|
39
|
+
@downloadLabeledIconALinkFontWeight: 700;
|
|
40
|
+
@downloadLabeledIconLinkFontSize: 0.875rem;
|
|
41
|
+
@downloadLabeledIconLinkIconFontSize: 1rem;
|
|
42
|
+
@downloadLabeledIconLinkIconPadding: 0.125rem 0.875rem;
|
|
43
|
+
@downloadLabeledIconLinkIconLineHeight: 1.25rem;
|
|
44
|
+
@downloadLabeledIconALinkColor: @japaneseIndigo;
|
|
45
|
+
@downloadLabeledIconALinkColorHover: @white;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@type: 'extra';
|
|
2
|
+
@element: 'labeledIconGroup';
|
|
3
|
+
|
|
4
|
+
@import (multiple) '../../theme.config';
|
|
5
|
+
|
|
6
|
+
/*******************************
|
|
7
|
+
Labeled Icon Group
|
|
8
|
+
*******************************/
|
|
9
|
+
.eea.labeled.icon.group {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
width: @labeledIconGroupWidth;
|
|
14
|
+
padding: @labeledIconGroupPadding;
|
|
15
|
+
|
|
16
|
+
.group.wrapper {
|
|
17
|
+
margin-left: @labeledIconGroupWrapperMarginLeft;
|
|
18
|
+
margin-right: @labeledIconGroupWrapperMarginRight;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@type: 'extra';
|
|
2
|
+
@element: 'languageLabeledIcon';
|
|
3
|
+
|
|
4
|
+
@import (multiple) '../../theme.config';
|
|
5
|
+
|
|
6
|
+
/*******************************
|
|
7
|
+
Language Labeled Icon
|
|
8
|
+
*******************************/
|
|
9
|
+
|
|
10
|
+
.eea.language.labeled.icon {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
align-items: center;
|
|
14
|
+
width: @languageLabeledIconWidth;
|
|
15
|
+
min-width: @languageLabeledIconMinWidth;
|
|
16
|
+
text-align: @languageLabeledIconTextAlign;
|
|
17
|
+
|
|
18
|
+
.icon.wrapper {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
font-size: @languageLabeledIconIconWrapperFontSize;
|
|
24
|
+
font-weight: @languageLabeledIconIconWrapperFontWeight;
|
|
25
|
+
color: @languageLabeledIconIconWrapperColor;
|
|
26
|
+
|
|
27
|
+
i {
|
|
28
|
+
color: @languageLabeledIconIconWrapperIconColor;
|
|
29
|
+
margin-right: @languageLabeledIconIconWrapperIconMarginRight;
|
|
30
|
+
font-size: @languageLabeledIconIconWrapperIconFontSize;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.label {
|
|
35
|
+
color: @languageLabeledIconLabelColor;
|
|
36
|
+
font-size: @languageLabeledIconLabelFontSize;
|
|
37
|
+
font-weight: @languageLabeledIconLabelFontWeight;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ui.popup.language-popup {
|
|
43
|
+
margin: 0;
|
|
44
|
+
padding: 0;
|
|
45
|
+
border: none;
|
|
46
|
+
|
|
47
|
+
.dropdown {
|
|
48
|
+
|
|
49
|
+
.link.wrapper {
|
|
50
|
+
display: flex;
|
|
51
|
+
width: @languageLabeledIconDropdowLinkWrapperWidth;
|
|
52
|
+
background-color: @languageLabeledIconDropdownBackgroundColor;
|
|
53
|
+
z-index: 1;
|
|
54
|
+
|
|
55
|
+
&.hidden {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
ul {
|
|
60
|
+
list-style-type: none;
|
|
61
|
+
margin: 0;
|
|
62
|
+
color: @languageLabeledIconLabelUlColor;
|
|
63
|
+
padding: @languageLabeledIconLabelUlPadding;
|
|
64
|
+
|
|
65
|
+
li {
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
padding: @languageLabeledIconLabelUlLiPadding;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
li:hover {
|
|
71
|
+
color: @languageLabeledIconLabelUlLiColor;
|
|
72
|
+
background-color: @languageLabeledIconLabelUlLiBackgroundColor;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
li span {
|
|
76
|
+
font-weight: @languageLabeledIconLabelUlLiSpanFontWeight;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*******************************
|
|
2
|
+
Language Labeled Icon
|
|
3
|
+
*******************************/
|
|
4
|
+
|
|
5
|
+
/* Body */
|
|
6
|
+
@languageLabeledIconWidth : min-content;
|
|
7
|
+
@languageLabeledIconMinWidth: 7rem;
|
|
8
|
+
@languageLabeledIconTextAlign: center;
|
|
9
|
+
|
|
10
|
+
/* Icon Wrapper */
|
|
11
|
+
@languageLabeledIconIconWrapperFontSize : 0.875rem;
|
|
12
|
+
@languageLabeledIconIconWrapperFontWeight : 400;
|
|
13
|
+
@languageLabeledIconIconWrapperColor : @deepBlue;
|
|
14
|
+
|
|
15
|
+
/* Icon */
|
|
16
|
+
@languageLabeledIconIconWrapperIconColor: @mediumPersianBlue;
|
|
17
|
+
@languageLabeledIconIconWrapperIconMarginRight: 0.25rem;
|
|
18
|
+
@languageLabeledIconIconWrapperIconFontSize: 1.5rem;
|
|
19
|
+
|
|
20
|
+
/* Label */
|
|
21
|
+
@languageLabeledIconLabelColor: @deepBlue;
|
|
22
|
+
@languageLabeledIconLabelFontSize: 0.875rem;
|
|
23
|
+
@languageLabeledIconLabelFontWeight: 400;
|
|
24
|
+
|
|
25
|
+
/* Dropdown */
|
|
26
|
+
@languageLabeledIconDropdownBackgroundColor: #f9f9f9;
|
|
27
|
+
|
|
28
|
+
/* Link */
|
|
29
|
+
@languageLabeledIconDropdowLinkWrapperWidth: max-content;
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
/* List */
|
|
33
|
+
@languageLabeledIconLabelUlMargin:0;
|
|
34
|
+
@languageLabeledIconLabelUlColor: @japaneseIndigo;
|
|
35
|
+
@languageLabeledIconLabelUlPadding: 0.25rem;
|
|
36
|
+
|
|
37
|
+
/* List Item */
|
|
38
|
+
@languageLabeledIconLabelUlLiPadding: 0.125rem 0.313rem;
|
|
39
|
+
@languageLabeledIconLabelUlLiColor: @white;
|
|
40
|
+
@languageLabeledIconLabelUlLiBackgroundColor: @japaneseIndigo;
|
|
41
|
+
@languageLabeledIconLabelUlLiSpanFontWeight: 700;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@type: 'extra';
|
|
2
|
+
@element: 'newTabLabeledIcon';
|
|
3
|
+
|
|
4
|
+
@import (multiple) '../../theme.config';
|
|
5
|
+
|
|
6
|
+
/*******************************
|
|
7
|
+
New Tab Labeled Icon
|
|
8
|
+
*******************************/
|
|
9
|
+
.eea.new.tab.labeled.icon {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
width: @newTabLabeledIconWidth;
|
|
14
|
+
min-width: @newTabLabeledIconMinWidth;
|
|
15
|
+
text-align: @newTabLabeledIconTextAlign;
|
|
16
|
+
|
|
17
|
+
.label {
|
|
18
|
+
width: @newTabLabeledIconLabelWidth;
|
|
19
|
+
font-size: @newTabLabeledIconLabelFontSize;
|
|
20
|
+
color: @newTabLabeledIconLabelColor;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.icon.wrapper {
|
|
25
|
+
text-align: center;
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
width: @newTabLabeledIconIconWrapperWidth;
|
|
29
|
+
padding: @newTabLabeledIconWrapperPadding;
|
|
30
|
+
|
|
31
|
+
.icon {
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
font-size: @newTabLabeledIconIconFontSize;
|
|
36
|
+
color: @newTabLabeledIconColor;
|
|
37
|
+
width: @newTabLabeledIconIconWidth;
|
|
38
|
+
height: @newTabLabeledIconWrapperIconHeight;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*******************************
|
|
2
|
+
New Tab Labeled Icon
|
|
3
|
+
*******************************/
|
|
4
|
+
|
|
5
|
+
/* Body */
|
|
6
|
+
@newTabLabeledIconWidth: min-content;
|
|
7
|
+
@newTabLabeledIconMinWidth: 7rem;
|
|
8
|
+
@newTabLabeledIconTextAlign: center;
|
|
9
|
+
|
|
10
|
+
/* Label */
|
|
11
|
+
@newTabLabeledIconLabelWidth: 100%;
|
|
12
|
+
@newTabLabeledIconLabelFontSize: 0.875rem;
|
|
13
|
+
@newTabLabeledIconLabelColor: @deepBlue;
|
|
14
|
+
@newTabLabeledIconColor: @mediumPersianBlue;
|
|
15
|
+
|
|
16
|
+
/* Icon Wrapper */
|
|
17
|
+
@newTabLabeledIconIconWrapperWidth: 100%;
|
|
18
|
+
@newTabLabeledIconWrapperPadding: 0.5rem;
|
|
19
|
+
|
|
20
|
+
/* Icon */
|
|
21
|
+
@newTabLabeledIconIconFontSize: 1.563rem;
|
|
22
|
+
@newTabLabeledIconWrapperIconHeight: 1.25rem;
|
|
23
|
+
@newTabLabeledIconIconWidth: 1.25rem;
|