@lanaco/lnc-react-ui 4.0.135 → 4.0.137
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),d=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),l=require("./utils-DmMdPm9O.cjs"),g=require("./consts-goSZX3xP.cjs"),y=require("./Icon.cjs"),b=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),j=p.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: flex-start;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
font-style: normal;
|
|
36
36
|
font-weight: 500;
|
|
37
37
|
line-height: 1.5rem;
|
|
38
|
-
${
|
|
38
|
+
${l.truncateTextInRows(2)}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
& .wrapper__description {
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
font-weight: 400;
|
|
46
46
|
line-height: 1rem;
|
|
47
47
|
letter-spacing: 0.025rem;
|
|
48
|
-
${
|
|
48
|
+
${l.truncateTextInRows(2)}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
cursor: pointer;
|
|
52
|
-
`,
|
|
52
|
+
`,k=p.styled.div`
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 11.625rem;
|
|
55
55
|
border-radius: 0.75rem;
|
|
56
|
-
background: ${
|
|
57
|
-
`,
|
|
56
|
+
background: ${l.linearGradientAnimation("-90deg")};
|
|
57
|
+
`,I=p.styled.div`
|
|
58
58
|
display: flex;
|
|
59
59
|
padding: 0 0.75rem 0 0.75rem;
|
|
60
60
|
align-items: center;
|
|
@@ -105,15 +105,15 @@
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
@media (max-width: ${
|
|
108
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
109
109
|
min-width: fit-content;
|
|
110
110
|
}
|
|
111
|
-
`,
|
|
111
|
+
`,N=p.styled.div`
|
|
112
112
|
width: 7rem;
|
|
113
113
|
height: 3rem;
|
|
114
114
|
border-radius: 999px;
|
|
115
|
-
background: ${
|
|
116
|
-
|
|
115
|
+
background: ${l.linearGradientAnimation("-90deg")};
|
|
116
|
+
`,$=d.forwardRef(({},i)=>r.jsx(N,{})),C=d.forwardRef(({name:i,isActive:n,icon:t,onSelectCard:o=()=>{}},c)=>r.jsxs(I,{className:n?"active":"",onClick:o,children:[l.isDefinedNotEmptyString(t)&&r.jsx(y,{icon:t,className:"wrapper__icon"}),r.jsx("div",{className:"wrapper__text",children:i})]})),W=d.forwardRef(({image:i,imageComponent:n,name:t,description:o,onSelectCard:c=()=>{}},_)=>{const{theme:m}=b.useTheme();return r.jsxs(j,{theme:m,onClick:c,children:[l.isDefined(n)?n:r.jsx("img",{src:i,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__content",children:[t&&r.jsx("div",{className:"wrapper__title",children:t}),o&&r.jsx("div",{className:"wrapper__description",children:o})]})]})}),R=d.forwardRef(({},i)=>r.jsx(k,{})),F=p.styled.div`
|
|
117
117
|
display: flex;
|
|
118
118
|
flex-direction: column;
|
|
119
119
|
align-items: center;
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
width: 100%;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
@media (max-width: ${
|
|
164
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
165
165
|
& .wrapper__tags {
|
|
166
166
|
overflow-x: scroll;
|
|
167
167
|
justify-content: flex-start;
|
|
@@ -188,4 +188,4 @@
|
|
|
188
188
|
gap: 1rem;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
`,
|
|
191
|
+
`,T=d.forwardRef(({title:i,subtitle:n,tags:t=[],limitTags:o=7,limitTagsForMobile:c=7,limit:_=3,limitForMobile:m=2,items:a=[],selectedTag:u,onSelectTag:f=()=>{},onSelectCard:h=()=>{}},v)=>{var w,x;return r.jsxs(F,{ref:v,limitTags:o,limitTagsForMobile:c,limitCards:_,limitCardsForMobile:m,children:[r.jsxs("div",{className:"wrapper__heading",children:[i&&r.jsx("div",{className:"wrapper__title",children:i}),n&&r.jsx("div",{className:"wrapper__subtitle",children:n})]}),r.jsx("div",{className:"wrapper__tags",children:t&&(t==null?void 0:t.length)>0?t==null?void 0:t.map((e,s)=>r.jsx(C,{icon:e==null?void 0:e.icon,name:e==null?void 0:e.title,isActive:(e==null?void 0:e.code)===u,onSelectCard:()=>f==null?void 0:f(e)},`field-of-interests-with-tags-card-tag__${s+1}`)):(w=Array.from("123"))==null?void 0:w.map((e,s)=>r.jsx($,{},`field-of-interests-with-tags-card-tag-skeleton__${s+1}`))}),r.jsx("div",{className:"wrapper__cards",children:a&&(a==null?void 0:a.length)>0?a==null?void 0:a.map((e,s)=>r.jsx(W,{image:e==null?void 0:e.image,imageComponent:e==null?void 0:e.imageComponent,name:e==null?void 0:e.title,description:e==null?void 0:e.description,onSelectCard:()=>h==null?void 0:h(e)},`field-of-interests-with-tags-card__${s+1}`)):(x=Array.from("123"))==null?void 0:x.map((e,s)=>r.jsx(R,{},`field-of-interests-with-tags-card-skeleton__${s+1}`))})]})});module.exports=T;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
4
|
-
import { p as
|
|
5
|
-
import { M as
|
|
6
|
-
import
|
|
7
|
-
import { u as
|
|
8
|
-
const
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { s as m } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
|
+
import { p as x, o as u, k, l as N } from "./utils-BPdU4_1q.js";
|
|
5
|
+
import { M as v } from "./consts-BuFChS64.js";
|
|
6
|
+
import $ from "./Icon.js";
|
|
7
|
+
import { u as C } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
|
|
8
|
+
const I = m.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: flex-start;
|
|
@@ -42,7 +42,7 @@ const O = p.div`
|
|
|
42
42
|
font-style: normal;
|
|
43
43
|
font-weight: 500;
|
|
44
44
|
line-height: 1.5rem;
|
|
45
|
-
${
|
|
45
|
+
${x(2)}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
& .wrapper__description {
|
|
@@ -52,16 +52,16 @@ const O = p.div`
|
|
|
52
52
|
font-weight: 400;
|
|
53
53
|
line-height: 1rem;
|
|
54
54
|
letter-spacing: 0.025rem;
|
|
55
|
-
${
|
|
55
|
+
${x(2)}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
cursor: pointer;
|
|
59
|
-
`,
|
|
59
|
+
`, W = m.div`
|
|
60
60
|
width: 100%;
|
|
61
61
|
height: 11.625rem;
|
|
62
62
|
border-radius: 0.75rem;
|
|
63
|
-
background: ${
|
|
64
|
-
`,
|
|
63
|
+
background: ${u("-90deg")};
|
|
64
|
+
`, j = m.div`
|
|
65
65
|
display: flex;
|
|
66
66
|
padding: 0 0.75rem 0 0.75rem;
|
|
67
67
|
align-items: center;
|
|
@@ -112,33 +112,33 @@ const O = p.div`
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
@media (max-width: ${
|
|
115
|
+
@media (max-width: ${v + "px"}) {
|
|
116
116
|
min-width: fit-content;
|
|
117
117
|
}
|
|
118
|
-
`,
|
|
118
|
+
`, F = m.div`
|
|
119
119
|
width: 7rem;
|
|
120
120
|
height: 3rem;
|
|
121
121
|
border-radius: 999px;
|
|
122
|
-
background: ${
|
|
123
|
-
`,
|
|
124
|
-
({ name:
|
|
125
|
-
} },
|
|
126
|
-
|
|
127
|
-
/* @__PURE__ */ r("div", { className: "wrapper__text", children:
|
|
122
|
+
background: ${u("-90deg")};
|
|
123
|
+
`, T = p(({}, t) => /* @__PURE__ */ r(F, {})), z = p(
|
|
124
|
+
({ name: t, isActive: a, icon: i, onSelectCard: l = () => {
|
|
125
|
+
} }, d) => /* @__PURE__ */ s(j, { className: a ? "active" : "", onClick: l, children: [
|
|
126
|
+
k(i) && /* @__PURE__ */ r($, { icon: i, className: "wrapper__icon" }),
|
|
127
|
+
/* @__PURE__ */ r("div", { className: "wrapper__text", children: t })
|
|
128
128
|
] })
|
|
129
|
-
),
|
|
130
|
-
({ image:
|
|
131
|
-
} },
|
|
132
|
-
const { theme:
|
|
133
|
-
return /* @__PURE__ */ s(
|
|
134
|
-
|
|
129
|
+
), O = p(
|
|
130
|
+
({ image: t, imageComponent: a, name: i, description: l, onSelectCard: d = () => {
|
|
131
|
+
} }, _) => {
|
|
132
|
+
const { theme: c } = C();
|
|
133
|
+
return /* @__PURE__ */ s(I, { theme: c, onClick: d, children: [
|
|
134
|
+
N(a) ? a : /* @__PURE__ */ r("img", { src: t, className: "wrapper__image" }),
|
|
135
135
|
/* @__PURE__ */ s("div", { className: "wrapper__content", children: [
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
i && /* @__PURE__ */ r("div", { className: "wrapper__title", children: i }),
|
|
137
|
+
l && /* @__PURE__ */ r("div", { className: "wrapper__description", children: l })
|
|
138
138
|
] })
|
|
139
139
|
] });
|
|
140
140
|
}
|
|
141
|
-
),
|
|
141
|
+
), A = p(({}, t) => /* @__PURE__ */ r(W, {})), E = m.div`
|
|
142
142
|
display: flex;
|
|
143
143
|
flex-direction: column;
|
|
144
144
|
align-items: center;
|
|
@@ -179,14 +179,14 @@ const O = p.div`
|
|
|
179
179
|
|
|
180
180
|
& .wrapper__cards {
|
|
181
181
|
display: grid;
|
|
182
|
-
grid-template-columns: ${(
|
|
182
|
+
grid-template-columns: ${(t) => `repeat(${t == null ? void 0 : t.limitCards}, minmax(0, 1fr))`};
|
|
183
183
|
justify-content: center;
|
|
184
184
|
align-items: center;
|
|
185
185
|
gap: 1.5rem;
|
|
186
186
|
width: 100%;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
@media (max-width: ${
|
|
189
|
+
@media (max-width: ${v + "px"}) {
|
|
190
190
|
& .wrapper__tags {
|
|
191
191
|
overflow-x: scroll;
|
|
192
192
|
justify-content: flex-start;
|
|
@@ -213,73 +213,64 @@ const O = p.div`
|
|
|
213
213
|
gap: 1rem;
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
`,
|
|
216
|
+
`, P = p(
|
|
217
217
|
({
|
|
218
|
-
title:
|
|
219
|
-
subtitle:
|
|
220
|
-
tags:
|
|
221
|
-
limitTags:
|
|
222
|
-
limitTagsForMobile:
|
|
223
|
-
limit:
|
|
224
|
-
limitForMobile:
|
|
225
|
-
items:
|
|
226
|
-
selectedTag:
|
|
227
|
-
|
|
228
|
-
isLoadingItems: $ = !1,
|
|
229
|
-
onSelectTag: h = () => {
|
|
218
|
+
title: t,
|
|
219
|
+
subtitle: a,
|
|
220
|
+
tags: i = [],
|
|
221
|
+
limitTags: l = 7,
|
|
222
|
+
limitTagsForMobile: d = 7,
|
|
223
|
+
limit: _ = 3,
|
|
224
|
+
limitForMobile: c = 2,
|
|
225
|
+
items: n = [],
|
|
226
|
+
selectedTag: y,
|
|
227
|
+
onSelectTag: f = () => {
|
|
230
228
|
},
|
|
231
|
-
onSelectCard:
|
|
232
|
-
},
|
|
233
|
-
getImage: I = () => {
|
|
229
|
+
onSelectCard: h = () => {
|
|
234
230
|
}
|
|
235
|
-
},
|
|
236
|
-
var
|
|
237
|
-
const w = (e) => {
|
|
238
|
-
h == null || h(e);
|
|
239
|
-
}, g = (e) => {
|
|
240
|
-
_ == null || _(e);
|
|
241
|
-
};
|
|
231
|
+
}, b) => {
|
|
232
|
+
var w, g;
|
|
242
233
|
return /* @__PURE__ */ s(
|
|
243
|
-
|
|
234
|
+
E,
|
|
244
235
|
{
|
|
245
|
-
ref:
|
|
246
|
-
limitTags:
|
|
247
|
-
limitTagsForMobile:
|
|
248
|
-
limitCards:
|
|
249
|
-
limitCardsForMobile:
|
|
236
|
+
ref: b,
|
|
237
|
+
limitTags: l,
|
|
238
|
+
limitTagsForMobile: d,
|
|
239
|
+
limitCards: _,
|
|
240
|
+
limitCardsForMobile: c,
|
|
250
241
|
children: [
|
|
251
242
|
/* @__PURE__ */ s("div", { className: "wrapper__heading", children: [
|
|
252
|
-
|
|
253
|
-
|
|
243
|
+
t && /* @__PURE__ */ r("div", { className: "wrapper__title", children: t }),
|
|
244
|
+
a && /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: a })
|
|
254
245
|
] }),
|
|
255
|
-
/* @__PURE__ */ r("div", { className: "wrapper__tags", children:
|
|
256
|
-
|
|
257
|
-
{},
|
|
258
|
-
`field-of-interests-with-tags-card-tag-skeleton__${a + 1}`
|
|
259
|
-
)) : t == null ? void 0 : t.map((e, a) => /* @__PURE__ */ r(
|
|
260
|
-
G,
|
|
246
|
+
/* @__PURE__ */ r("div", { className: "wrapper__tags", children: i && (i == null ? void 0 : i.length) > 0 ? i == null ? void 0 : i.map((e, o) => /* @__PURE__ */ r(
|
|
247
|
+
z,
|
|
261
248
|
{
|
|
262
249
|
icon: e == null ? void 0 : e.icon,
|
|
263
|
-
name: e == null ? void 0 : e.
|
|
264
|
-
isActive: (e == null ? void 0 : e.
|
|
265
|
-
onSelectCard: () =>
|
|
250
|
+
name: e == null ? void 0 : e.title,
|
|
251
|
+
isActive: (e == null ? void 0 : e.code) === y,
|
|
252
|
+
onSelectCard: () => f == null ? void 0 : f(e)
|
|
266
253
|
},
|
|
267
|
-
`field-of-interests-with-tags-card-tag__${
|
|
268
|
-
))
|
|
269
|
-
|
|
270
|
-
R,
|
|
254
|
+
`field-of-interests-with-tags-card-tag__${o + 1}`
|
|
255
|
+
)) : (w = Array.from("123")) == null ? void 0 : w.map((e, o) => /* @__PURE__ */ r(
|
|
256
|
+
T,
|
|
271
257
|
{},
|
|
272
|
-
`field-of-interests-with-tags-card-skeleton__${
|
|
273
|
-
))
|
|
274
|
-
|
|
258
|
+
`field-of-interests-with-tags-card-tag-skeleton__${o + 1}`
|
|
259
|
+
)) }),
|
|
260
|
+
/* @__PURE__ */ r("div", { className: "wrapper__cards", children: n && (n == null ? void 0 : n.length) > 0 ? n == null ? void 0 : n.map((e, o) => /* @__PURE__ */ r(
|
|
261
|
+
O,
|
|
275
262
|
{
|
|
276
|
-
image:
|
|
263
|
+
image: e == null ? void 0 : e.image,
|
|
277
264
|
imageComponent: e == null ? void 0 : e.imageComponent,
|
|
278
|
-
name: e == null ? void 0 : e.
|
|
279
|
-
description:
|
|
280
|
-
onSelectCard: () =>
|
|
265
|
+
name: e == null ? void 0 : e.title,
|
|
266
|
+
description: e == null ? void 0 : e.description,
|
|
267
|
+
onSelectCard: () => h == null ? void 0 : h(e)
|
|
281
268
|
},
|
|
282
|
-
`field-of-interests-with-tags-card__${
|
|
269
|
+
`field-of-interests-with-tags-card__${o + 1}`
|
|
270
|
+
)) : (g = Array.from("123")) == null ? void 0 : g.map((e, o) => /* @__PURE__ */ r(
|
|
271
|
+
A,
|
|
272
|
+
{},
|
|
273
|
+
`field-of-interests-with-tags-card-skeleton__${o + 1}`
|
|
283
274
|
)) })
|
|
284
275
|
]
|
|
285
276
|
}
|
|
@@ -287,5 +278,5 @@ const O = p.div`
|
|
|
287
278
|
}
|
|
288
279
|
);
|
|
289
280
|
export {
|
|
290
|
-
|
|
281
|
+
P as default
|
|
291
282
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lanaco/lnc-react-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.137",
|
|
4
4
|
"description": "React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -173,6 +173,7 @@
|
|
|
173
173
|
"@emotion/react": "^11.10.5",
|
|
174
174
|
"@emotion/styled": "^11.10.5",
|
|
175
175
|
"@floating-ui/react": "^0.17.0",
|
|
176
|
+
"@hookform/resolvers": "^5.2.2",
|
|
176
177
|
"@mdx-js/preact": "^2.1.5",
|
|
177
178
|
"@mdx-js/react": "^2.1.5",
|
|
178
179
|
"classnames": "^2.3.2",
|
|
@@ -203,7 +204,8 @@
|
|
|
203
204
|
"react-transition-group": "^4.4.5",
|
|
204
205
|
"react-use": "^17.3.2",
|
|
205
206
|
"styled-components": "^5.3.6",
|
|
206
|
-
"use-state-with-callback": "^2.0.3"
|
|
207
|
+
"use-state-with-callback": "^2.0.3",
|
|
208
|
+
"yup": "^0.32.11"
|
|
207
209
|
},
|
|
208
210
|
"peerDependencies": {
|
|
209
211
|
"@emotion/react": "^11.10.5",
|