@telia-ace/knowledge-widget-components-tag-list 1.1.2-rc.0 → 1.1.2-rc.10
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/index.js +1 -1
- package/index.mjs +41 -34
- package/package.json +6 -6
- package/tag-list-bd4c0029.js +83 -0
- package/{tag-list-798af384.mjs → tag-list-d143c7b3.mjs} +65 -59
- package/tag-list-23a44b0b.js +0 -82
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const d=require("@telia-ace/knowledge-data-client"),g=require("@telia-ace/knowledge-widget-core"),p=require("@telia-ace/knowledge-widget-ui"),b=s=>p.createReactComponent(s,"tag-list",Promise.resolve().then(()=>require("./tag-list-
|
|
1
|
+
"use strict";const d=require("@telia-ace/knowledge-data-client"),g=require("@telia-ace/knowledge-widget-core"),p=require("@telia-ace/knowledge-widget-ui"),b=s=>p.createReactComponent(s,"tag-list",Promise.resolve().then(()=>require("./tag-list-bd4c0029.js")),t=>{const{events:o}=s.get("$widget"),[c,u]=g.createEventSubscriber(o);t.actions.create("fetch",({items:e=[]})=>t.actions.dispatch("fetched",{items:e,loading:!0})),t.actions.create("fetched",e=>t.writeProperties({...e,loading:!1}));const a=(e={})=>{t.writeProperties({loading:!0,error:void 0}),t.actions.dispatch("fetch",e)};return s.getAsync("router").then(e=>{const{params:i}=e.getRouteData();a(i)}),c("router:changed",(e,{current:i})=>{a(i.routeData.params)}),()=>{u()}}).then(()=>g.extendComponent(s,"tag-list",t=>{t.actions.watch("tag-list.fetch",(o,c)=>d.DataClient.getInstance(s).then(u=>{const{static:a=!1,rootTagLabel:e=""}=t.properties(),{phrase:i,guideCategory:h,tag:l}=o;return u.fetch(a?d.DataType.Tags:d.DataType.TagsOnGuides,{searchPhrase:i,categories:h,tagId:l}).then((n=[])=>{if(a){const r=n.findIndex(f=>f.id==="0");r>-1&&n.unshift(n.splice(r,1)[0])}return c({items:n.map(r=>(r.id==="0"&&(r.title=e),r))})}).catch(n=>c({items:[]}))}))}));module.exports=b;
|
package/index.mjs
CHANGED
|
@@ -1,40 +1,47 @@
|
|
|
1
1
|
import { DataClient as p, DataType as d } from "@telia-ace/knowledge-data-client";
|
|
2
2
|
import { createEventSubscriber as l, extendComponent as m } from "@telia-ace/knowledge-widget-core";
|
|
3
3
|
import { createReactComponent as b } from "@telia-ace/knowledge-widget-ui";
|
|
4
|
-
const w = (a) => b(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
4
|
+
const w = (a) => b(
|
|
5
|
+
a,
|
|
6
|
+
"tag-list",
|
|
7
|
+
import("./tag-list-d143c7b3.mjs"),
|
|
8
|
+
(e) => {
|
|
9
|
+
const { events: o } = a.get("$widget"), [n, u] = l(o);
|
|
10
|
+
e.actions.create("fetch", ({ items: t = [] }) => e.actions.dispatch("fetched", {
|
|
11
|
+
items: t,
|
|
12
|
+
loading: !0
|
|
13
|
+
})), e.actions.create("fetched", (t) => e.writeProperties({ ...t, loading: !1 }));
|
|
14
|
+
const s = (t = {}) => {
|
|
15
|
+
e.writeProperties({ loading: !0, error: void 0 }), e.actions.dispatch("fetch", t);
|
|
16
|
+
};
|
|
17
|
+
return a.getAsync("router").then((t) => {
|
|
18
|
+
const { params: i } = t.getRouteData();
|
|
19
|
+
s(i);
|
|
20
|
+
}), n("router:changed", (t, { current: i }) => {
|
|
21
|
+
s(i.routeData.params);
|
|
22
|
+
}), () => {
|
|
23
|
+
u();
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
).then(() => m(a, "tag-list", (e) => {
|
|
27
|
+
e.actions.watch("tag-list.fetch", (o, n) => p.getInstance(a).then(
|
|
28
|
+
(u) => {
|
|
29
|
+
const { static: s = !1, rootTagLabel: t = "" } = e.properties(), { phrase: i, guideCategory: h, tag: f } = o;
|
|
30
|
+
return u.fetch(s ? d.Tags : d.TagsOnGuides, {
|
|
31
|
+
searchPhrase: i,
|
|
32
|
+
categories: h,
|
|
33
|
+
tagId: f
|
|
34
|
+
}).then((c = []) => {
|
|
35
|
+
if (s) {
|
|
36
|
+
const r = c.findIndex((g) => g.id === "0");
|
|
37
|
+
r > -1 && c.unshift(c.splice(r, 1)[0]);
|
|
38
|
+
}
|
|
39
|
+
return n({
|
|
40
|
+
items: c.map((r) => (r.id === "0" && (r.title = t), r))
|
|
41
|
+
});
|
|
42
|
+
}).catch((c) => n({ items: [] }));
|
|
43
|
+
}
|
|
44
|
+
));
|
|
38
45
|
}));
|
|
39
46
|
export {
|
|
40
47
|
w as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/knowledge-widget-components-tag-list",
|
|
3
|
-
"version": "1.1.2-rc.
|
|
3
|
+
"version": "1.1.2-rc.10",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@telia-ace/knowledge-widget-core": "^1.1.2-rc.
|
|
14
|
-
"@telia-ace/knowledge-data-client": "^1.1.2-rc.
|
|
15
|
-
"@telia-ace/knowledge-widget-ui": "^1.1.2-rc.
|
|
16
|
-
"@telia-ace/widget-utilities": "^1.1.2-rc.
|
|
17
|
-
"@telia-ace/knowledge-widget-component-utilities": "^1.1.2-rc.
|
|
13
|
+
"@telia-ace/knowledge-widget-core": "^1.1.2-rc.10",
|
|
14
|
+
"@telia-ace/knowledge-data-client": "^1.1.2-rc.10",
|
|
15
|
+
"@telia-ace/knowledge-widget-ui": "^1.1.2-rc.10",
|
|
16
|
+
"@telia-ace/widget-utilities": "^1.1.2-rc.10",
|
|
17
|
+
"@telia-ace/knowledge-widget-component-utilities": "^1.1.2-rc.10",
|
|
18
18
|
"@webprovisions/platform": "^1.1.4"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("@emotion/react"),l=require("@emotion/styled"),C=require("@telia-ace/knowledge-widget-component-utilities"),s=require("@telia-ace/knowledge-widget-ui"),y=require("@telia-ace/widget-utilities"),I=(e,t,o)=>e&&o?r.jsx(x,{symbol:o,size:18}):t?r.jsx(x,{symbol:t,size:18}):null,q=({className:e,...t})=>{const{route:o="search",items:h=[],header:$,loading:a=!1,style:c="badge",showMatchCount:w=!1,showIcons:S=!1,static:i=!1,fallbackOnInitialRoute:z=!1,itemAriaLabel:p}=s.useProperties(),j=s.useContainer(),{params:m}=s.useRouteData();if(!h.length&&(!a||i))return s.createEmptyComponent(j,{...t,className:y.appendClassNames(e,"humany-tag-list")});const v=c==="badge"?A:B;return r.jsx(R,{...t,"data-loading":!i&&a,className:y.appendClassNames(e,"humany-tag-list"),header:!i&&a?"":$,items:h,type:c,renderItem:n=>{const{id:b,title:f,defaultIcon:L,activeIcon:T,matches:d}=n,g=(m.tag?m.tag.split(","):[]).includes(n.id)||!m.tag&&n.id==="0",k=p&&p.replace("{{title}}",f).replace("{{matches}}",`${d}`);return r.jsx(M,{notAllowed:(i&&!d&&c==="pill").toString(),"data-tag":b,children:r.jsxs(v,{...C.initialRouteFallback(n,o,z,"tag"),role:"button","aria-pressed":g,"aria-label":k,disabled:i&&!d,selected:g,text:f,children:[S&&I(g,L,T),w&&r.jsx(U,{children:`(${d})`})]})},b)},children:!i&&r.jsx(s.Loader,{loading:a})})},R=l(s.ItemList)`
|
|
2
|
+
${s.contentBox}
|
|
3
|
+
${s.itemList}
|
|
4
|
+
${s.loadingOpacity}
|
|
5
|
+
justify-content: flex-start;
|
|
6
|
+
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.large}};
|
|
7
|
+
ul {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
${e=>e.type==="pill"&&u.css`
|
|
11
|
+
justify-content: center;
|
|
12
|
+
`}
|
|
13
|
+
|
|
14
|
+
li {
|
|
15
|
+
margin: 0 ${e=>{var t,o;return`${(t=e.theme.sizes)==null?void 0:t.small} ${(o=e.theme.sizes)==null?void 0:o.small}`}} 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`,A=l(s.TextLink)`
|
|
19
|
+
padding: 8px 15px;
|
|
20
|
+
background-color: ${e=>{var t,o;return e.selected?(t=e.theme.colors)==null?void 0:t.text:(o=e.theme.colors)==null?void 0:o.primary}};
|
|
21
|
+
border-radius: ${e=>e.theme.borderRadius};
|
|
22
|
+
font-weight: 300;
|
|
23
|
+
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
color: #ffffff;
|
|
27
|
+
|
|
28
|
+
&:focus-visible {
|
|
29
|
+
${s.borderTabStyle}
|
|
30
|
+
padding: 6px 15px;
|
|
31
|
+
background-color: transparent;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media (hover: hover) {
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: ${e=>{var t,o;return e.selected?(t=e.theme.colors)==null?void 0:t.primary:(o=e.theme.colors)==null?void 0:o.text}};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`,B=l(s.TextLink)`
|
|
40
|
+
border: 1px solid
|
|
41
|
+
${e=>{var t;return e.selected?(t=e.theme.colors)==null?void 0:t.text:"transparent"}};
|
|
42
|
+
line-height: 2em;
|
|
43
|
+
border-radius: 1em;
|
|
44
|
+
padding: 0 0.5em;
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
font-weight: ${e=>e.selected?"normal":300};
|
|
48
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
49
|
+
|
|
50
|
+
&:disabled {
|
|
51
|
+
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.textLight}};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
${s.borderTabStyle}
|
|
56
|
+
border-radius: 1em;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (hover: hover) {
|
|
60
|
+
&:hover {
|
|
61
|
+
border: 1px solid ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
${e=>e.disabled&&u.css`
|
|
66
|
+
opacity: 0.5;
|
|
67
|
+
`}
|
|
68
|
+
`,U=l(s.Text)`
|
|
69
|
+
order: 2;
|
|
70
|
+
margin-left: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}};
|
|
71
|
+
`,x=l(s.SymbolBadge)`
|
|
72
|
+
margin-right: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}};
|
|
73
|
+
${e=>{if(e.symbol.type==="Uri")return`
|
|
74
|
+
width: ${e.size}px;
|
|
75
|
+
height: ${e.size}px;
|
|
76
|
+
`;if(e.symbol.type==="FontAwesome")return`
|
|
77
|
+
font-size: ${e.size}px;
|
|
78
|
+
`}}
|
|
79
|
+
`,M=l.li`
|
|
80
|
+
${e=>e.notAllowed==="true"&&u.css`
|
|
81
|
+
cursor: not-allowed;
|
|
82
|
+
`}
|
|
83
|
+
`;exports.default=q;
|
|
@@ -42,7 +42,12 @@ const G = (e, t, o) => e && o ? /* @__PURE__ */ r(b, { symbol: o, size: 18 }) :
|
|
|
42
42
|
children: /* @__PURE__ */ j(
|
|
43
43
|
I,
|
|
44
44
|
{
|
|
45
|
-
...A(
|
|
45
|
+
...A(
|
|
46
|
+
i,
|
|
47
|
+
o,
|
|
48
|
+
L,
|
|
49
|
+
"tag"
|
|
50
|
+
),
|
|
46
51
|
role: "button",
|
|
47
52
|
"aria-pressed": m,
|
|
48
53
|
"aria-label": C,
|
|
@@ -63,110 +68,111 @@ const G = (e, t, o) => e && o ? /* @__PURE__ */ r(b, { symbol: o, size: 18 }) :
|
|
|
63
68
|
}
|
|
64
69
|
);
|
|
65
70
|
}, H = a(O)`
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
${P}
|
|
72
|
+
${D}
|
|
68
73
|
${E}
|
|
69
74
|
justify-content: flex-start;
|
|
70
|
-
|
|
75
|
+
padding: ${(e) => {
|
|
71
76
|
var t;
|
|
72
77
|
return (t = e.theme.sizes) == null ? void 0 : t.large;
|
|
73
78
|
}};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
ul {
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-wrap: wrap;
|
|
82
|
+
${(e) => e.type === "pill" && h`
|
|
83
|
+
justify-content: center;
|
|
84
|
+
`}
|
|
80
85
|
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
li {
|
|
87
|
+
margin: 0 ${(e) => {
|
|
83
88
|
var t, o;
|
|
84
89
|
return `${(t = e.theme.sizes) == null ? void 0 : t.small} ${(o = e.theme.sizes) == null ? void 0 : o.small}`;
|
|
85
90
|
}} 0;
|
|
86
|
-
}
|
|
87
91
|
}
|
|
92
|
+
}
|
|
88
93
|
`, J = a($)`
|
|
89
|
-
|
|
90
|
-
|
|
94
|
+
padding: 8px 15px;
|
|
95
|
+
background-color: ${(e) => {
|
|
91
96
|
var t, o;
|
|
92
97
|
return e.selected ? (t = e.theme.colors) == null ? void 0 : t.text : (o = e.theme.colors) == null ? void 0 : o.primary;
|
|
93
98
|
}};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
border-radius: ${(e) => e.theme.borderRadius};
|
|
100
|
+
font-weight: 300;
|
|
101
|
+
font-size: ${(e) => {
|
|
97
102
|
var t;
|
|
98
103
|
return (t = e.theme.fonts) == null ? void 0 : t.normal;
|
|
99
104
|
}};
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
color: #ffffff;
|
|
103
108
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
&:focus-visible {
|
|
110
|
+
${x}
|
|
111
|
+
padding: 6px 15px;
|
|
112
|
+
background-color: transparent;
|
|
113
|
+
}
|
|
109
114
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
115
|
+
@media (hover: hover) {
|
|
116
|
+
&:hover {
|
|
117
|
+
background-color: ${(e) => {
|
|
113
118
|
var t, o;
|
|
114
119
|
return e.selected ? (t = e.theme.colors) == null ? void 0 : t.primary : (o = e.theme.colors) == null ? void 0 : o.text;
|
|
115
120
|
}};
|
|
116
|
-
}
|
|
117
121
|
}
|
|
122
|
+
}
|
|
118
123
|
`, K = a($)`
|
|
119
|
-
|
|
124
|
+
border: 1px solid
|
|
125
|
+
${(e) => {
|
|
120
126
|
var t;
|
|
121
127
|
return e.selected ? (t = e.theme.colors) == null ? void 0 : t.text : "transparent";
|
|
122
128
|
}};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
line-height: 2em;
|
|
130
|
+
border-radius: 1em;
|
|
131
|
+
padding: 0 0.5em;
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
font-weight: ${(e) => e.selected ? "normal" : 300};
|
|
135
|
+
color: ${(e) => {
|
|
130
136
|
var t;
|
|
131
137
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
132
138
|
}};
|
|
133
139
|
|
|
134
|
-
|
|
135
|
-
|
|
140
|
+
&:disabled {
|
|
141
|
+
color: ${(e) => {
|
|
136
142
|
var t;
|
|
137
143
|
return (t = e.theme.colors) == null ? void 0 : t.textLight;
|
|
138
144
|
}};
|
|
139
|
-
|
|
145
|
+
}
|
|
140
146
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
147
|
+
&:focus-visible {
|
|
148
|
+
${x}
|
|
149
|
+
border-radius: 1em;
|
|
150
|
+
}
|
|
145
151
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
152
|
+
@media (hover: hover) {
|
|
153
|
+
&:hover {
|
|
154
|
+
border: 1px solid ${(e) => {
|
|
149
155
|
var t;
|
|
150
156
|
return (t = e.theme.colors) == null ? void 0 : t.text;
|
|
151
157
|
}};
|
|
152
|
-
}
|
|
153
158
|
}
|
|
159
|
+
}
|
|
154
160
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
${(e) => e.disabled && h`
|
|
162
|
+
opacity: 0.5;
|
|
163
|
+
`}
|
|
158
164
|
`, Q = a(U)`
|
|
159
|
-
|
|
160
|
-
|
|
165
|
+
order: 2;
|
|
166
|
+
margin-left: ${(e) => {
|
|
161
167
|
var t;
|
|
162
168
|
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
163
169
|
}};
|
|
164
170
|
`, b = a(q)`
|
|
165
|
-
|
|
171
|
+
margin-right: ${(e) => {
|
|
166
172
|
var t;
|
|
167
173
|
return (t = e.theme.sizes) == null ? void 0 : t.small;
|
|
168
174
|
}};
|
|
169
|
-
|
|
175
|
+
${(e) => {
|
|
170
176
|
if (e.symbol.type === "Uri")
|
|
171
177
|
return `
|
|
172
178
|
width: ${e.size}px;
|
|
@@ -178,9 +184,9 @@ const G = (e, t, o) => e && o ? /* @__PURE__ */ r(b, { symbol: o, size: 18 }) :
|
|
|
178
184
|
`;
|
|
179
185
|
}}
|
|
180
186
|
`, V = a.li`
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
187
|
+
${(e) => e.notAllowed === "true" && h`
|
|
188
|
+
cursor: not-allowed;
|
|
189
|
+
`}
|
|
184
190
|
`;
|
|
185
191
|
export {
|
|
186
192
|
oe as default
|
package/tag-list-23a44b0b.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("@emotion/react"),l=require("@emotion/styled"),C=require("@telia-ace/knowledge-widget-component-utilities"),s=require("@telia-ace/knowledge-widget-ui"),y=require("@telia-ace/widget-utilities"),I=(e,t,o)=>e&&o?r.jsx(x,{symbol:o,size:18}):t?r.jsx(x,{symbol:t,size:18}):null,q=({className:e,...t})=>{const{route:o="search",items:h=[],header:$,loading:a=!1,style:c="badge",showMatchCount:w=!1,showIcons:S=!1,static:i=!1,fallbackOnInitialRoute:z=!1,itemAriaLabel:p}=s.useProperties(),j=s.useContainer(),{params:m}=s.useRouteData();if(!h.length&&(!a||i))return s.createEmptyComponent(j,{...t,className:y.appendClassNames(e,"humany-tag-list")});const v=c==="badge"?A:B;return r.jsx(R,{...t,"data-loading":!i&&a,className:y.appendClassNames(e,"humany-tag-list"),header:!i&&a?"":$,items:h,type:c,renderItem:n=>{const{id:b,title:f,defaultIcon:L,activeIcon:T,matches:d}=n,g=(m.tag?m.tag.split(","):[]).includes(n.id)||!m.tag&&n.id==="0",k=p&&p.replace("{{title}}",f).replace("{{matches}}",`${d}`);return r.jsx(M,{notAllowed:(i&&!d&&c==="pill").toString(),"data-tag":b,children:r.jsxs(v,{...C.initialRouteFallback(n,o,z,"tag"),role:"button","aria-pressed":g,"aria-label":k,disabled:i&&!d,selected:g,text:f,children:[S&&I(g,L,T),w&&r.jsx(U,{children:`(${d})`})]})},b)},children:!i&&r.jsx(s.Loader,{loading:a})})},R=l(s.ItemList)`
|
|
2
|
-
${s.contentBox}
|
|
3
|
-
${s.itemList}
|
|
4
|
-
${s.loadingOpacity}
|
|
5
|
-
justify-content: flex-start;
|
|
6
|
-
padding: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.large}};
|
|
7
|
-
ul {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-wrap: wrap;
|
|
10
|
-
${e=>e.type==="pill"&&u.css`
|
|
11
|
-
justify-content: center;
|
|
12
|
-
`}
|
|
13
|
-
|
|
14
|
-
li {
|
|
15
|
-
margin: 0 ${e=>{var t,o;return`${(t=e.theme.sizes)==null?void 0:t.small} ${(o=e.theme.sizes)==null?void 0:o.small}`}} 0;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
`,A=l(s.TextLink)`
|
|
19
|
-
padding: 8px 15px;
|
|
20
|
-
background-color: ${e=>{var t,o;return e.selected?(t=e.theme.colors)==null?void 0:t.text:(o=e.theme.colors)==null?void 0:o.primary}};
|
|
21
|
-
border-radius: ${e=>e.theme.borderRadius};
|
|
22
|
-
font-weight: 300;
|
|
23
|
-
font-size: ${e=>{var t;return(t=e.theme.fonts)==null?void 0:t.normal}};
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
color: #ffffff;
|
|
27
|
-
|
|
28
|
-
&:focus-visible {
|
|
29
|
-
${s.borderTabStyle}
|
|
30
|
-
padding: 6px 15px;
|
|
31
|
-
background-color: transparent;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@media (hover: hover) {
|
|
35
|
-
&:hover {
|
|
36
|
-
background-color: ${e=>{var t,o;return e.selected?(t=e.theme.colors)==null?void 0:t.primary:(o=e.theme.colors)==null?void 0:o.text}};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`,B=l(s.TextLink)`
|
|
40
|
-
border: 1px solid ${e=>{var t;return e.selected?(t=e.theme.colors)==null?void 0:t.text:"transparent"}};
|
|
41
|
-
line-height: 2em;
|
|
42
|
-
border-radius: 1em;
|
|
43
|
-
padding: 0 0.5em;
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
font-weight: ${e=>e.selected?"normal":300};
|
|
47
|
-
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
48
|
-
|
|
49
|
-
&:disabled {
|
|
50
|
-
color: ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.textLight}};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&:focus-visible {
|
|
54
|
-
${s.borderTabStyle}
|
|
55
|
-
border-radius: 1em;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@media (hover: hover) {
|
|
59
|
-
&:hover {
|
|
60
|
-
border: 1px solid ${e=>{var t;return(t=e.theme.colors)==null?void 0:t.text}};
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
${e=>e.disabled&&u.css`
|
|
65
|
-
opacity: 0.5;
|
|
66
|
-
`}
|
|
67
|
-
`,U=l(s.Text)`
|
|
68
|
-
order: 2;
|
|
69
|
-
margin-left: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}};
|
|
70
|
-
`,x=l(s.SymbolBadge)`
|
|
71
|
-
margin-right: ${e=>{var t;return(t=e.theme.sizes)==null?void 0:t.small}};
|
|
72
|
-
${e=>{if(e.symbol.type==="Uri")return`
|
|
73
|
-
width: ${e.size}px;
|
|
74
|
-
height: ${e.size}px;
|
|
75
|
-
`;if(e.symbol.type==="FontAwesome")return`
|
|
76
|
-
font-size: ${e.size}px;
|
|
77
|
-
`}}
|
|
78
|
-
`,M=l.li`
|
|
79
|
-
${e=>e.notAllowed==="true"&&u.css`
|
|
80
|
-
cursor: not-allowed;
|
|
81
|
-
`}
|
|
82
|
-
`;exports.default=q;
|