@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"),l=require("react"),p=require("./emotion-styled.browser.esm-BtEseadx.cjs"),o=require("./utils-DmMdPm9O.cjs"),y=require("./consts-goSZX3xP.cjs"),N=require("./Icon.cjs"),$=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),W=p.styled.div`
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
- ${o.truncateTextInRows(2)}
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
- ${o.truncateTextInRows(2)}
48
+ ${l.truncateTextInRows(2)}
49
49
  }
50
50
  }
51
51
  cursor: pointer;
52
- `,C=p.styled.div`
52
+ `,k=p.styled.div`
53
53
  width: 100%;
54
54
  height: 11.625rem;
55
55
  border-radius: 0.75rem;
56
- background: ${o.linearGradientAnimation("-90deg")};
57
- `,R=p.styled.div`
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: ${y.MOBILE_SIZE_PX+"px"}) {
108
+ @media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
109
109
  min-width: fit-content;
110
110
  }
111
- `,F=p.styled.div`
111
+ `,N=p.styled.div`
112
112
  width: 7rem;
113
113
  height: 3rem;
114
114
  border-radius: 999px;
115
- background: ${o.linearGradientAnimation("-90deg")};
116
- `,q=l.forwardRef(({},i)=>r.jsx(F,{})),E=l.forwardRef(({name:i,isActive:s,icon:t,onSelectCard:a=()=>{}},m)=>r.jsxs(R,{className:s?"active":"",onClick:a,children:[o.isDefinedNotEmptyString(t)&&r.jsx(N,{icon:t,className:"wrapper__icon"}),r.jsx("div",{className:"wrapper__text",children:i})]})),O=l.forwardRef(({image:i,imageComponent:s,name:t,description:a,onSelectCard:m=()=>{}},g)=>{const{theme:d}=$.useTheme();return r.jsxs(W,{theme:d,onClick:m,children:[o.isDefined(s)?s:r.jsx("img",{src:i,className:"wrapper__image"}),r.jsxs("div",{className:"wrapper__content",children:[t&&r.jsx("div",{className:"wrapper__title",children:t}),a&&r.jsx("div",{className:"wrapper__description",children:a})]})]})}),z=l.forwardRef(({},i)=>r.jsx(C,{})),A=p.styled.div`
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: ${y.MOBILE_SIZE_PX+"px"}) {
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
- `,D=l.forwardRef(({title:i,subtitle:s,tags:t=[],limitTags:a=7,limitTagsForMobile:m=7,limit:g=3,limitForMobile:d=2,items:f=[],selectedTag:c,isLoadingTags:b=!1,isLoadingItems:j=!1,onSelectTag:_=()=>{},onSelectCard:h=()=>{},getImage:k=()=>{}},I)=>{var u,v;const w=e=>{_==null||_(e)},x=e=>{h==null||h(e)};return r.jsxs(A,{ref:I,limitTags:a,limitTagsForMobile:m,limitCards:g,limitCardsForMobile:d,children:[r.jsxs("div",{className:"wrapper__heading",children:[i&&r.jsx("div",{className:"wrapper__title",children:i}),s&&r.jsx("div",{className:"wrapper__subtitle",children:s})]}),r.jsx("div",{className:"wrapper__tags",children:b?(u=Array.from("123"))==null?void 0:u.map((e,n)=>r.jsx(q,{},`field-of-interests-with-tags-card-tag-skeleton__${n+1}`)):t==null?void 0:t.map((e,n)=>r.jsx(E,{icon:e==null?void 0:e.icon,name:e==null?void 0:e.name,isActive:(e==null?void 0:e.uuid)===(c==null?void 0:c.uuid),onSelectCard:()=>w==null?void 0:w(e)},`field-of-interests-with-tags-card-tag__${n+1}`))}),r.jsx("div",{className:"wrapper__cards",children:j?(v=Array.from("123"))==null?void 0:v.map((e,n)=>r.jsx(z,{},`field-of-interests-with-tags-card-skeleton__${n+1}`)):f==null?void 0:f.map((e,n)=>r.jsx(O,{image:k(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid),imageComponent:e==null?void 0:e.imageComponent,name:e==null?void 0:e.name,description:(e==null?void 0:e.description)||(e==null?void 0:e.shortDescription),onSelectCard:()=>x==null?void 0:x(e)},`field-of-interests-with-tags-card__${n+1}`))})]})});module.exports=D;
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 l } from "react";
3
- import { s as p } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
- import { p as y, o as b, k as C, l as j } from "./utils-BPdU4_1q.js";
5
- import { M as k } from "./consts-BuFChS64.js";
6
- import F from "./Icon.js";
7
- import { u as z } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
8
- const O = p.div`
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
- ${y(2)}
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
- ${y(2)}
55
+ ${x(2)}
56
56
  }
57
57
  }
58
58
  cursor: pointer;
59
- `, A = p.div`
59
+ `, W = m.div`
60
60
  width: 100%;
61
61
  height: 11.625rem;
62
62
  border-radius: 0.75rem;
63
- background: ${b("-90deg")};
64
- `, E = p.div`
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: ${k + "px"}) {
115
+ @media (max-width: ${v + "px"}) {
116
116
  min-width: fit-content;
117
117
  }
118
- `, D = p.div`
118
+ `, F = m.div`
119
119
  width: 7rem;
120
120
  height: 3rem;
121
121
  border-radius: 999px;
122
- background: ${b("-90deg")};
123
- `, M = l(({}, i) => /* @__PURE__ */ r(D, {})), G = l(
124
- ({ name: i, isActive: n, icon: t, onSelectCard: o = () => {
125
- } }, m) => /* @__PURE__ */ s(E, { className: n ? "active" : "", onClick: o, children: [
126
- C(t) && /* @__PURE__ */ r(F, { icon: t, className: "wrapper__icon" }),
127
- /* @__PURE__ */ r("div", { className: "wrapper__text", children: i })
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
- ), L = l(
130
- ({ image: i, imageComponent: n, name: t, description: o, onSelectCard: m = () => {
131
- } }, u) => {
132
- const { theme: f } = z();
133
- return /* @__PURE__ */ s(O, { theme: f, onClick: m, children: [
134
- j(n) ? n : /* @__PURE__ */ r("img", { src: i, className: "wrapper__image" }),
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
- t && /* @__PURE__ */ r("div", { className: "wrapper__title", children: t }),
137
- o && /* @__PURE__ */ r("div", { className: "wrapper__description", children: o })
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
- ), R = l(({}, i) => /* @__PURE__ */ r(A, {})), T = p.div`
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: ${(i) => `repeat(${i == null ? void 0 : i.limitCards}, minmax(0, 1fr))`};
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: ${k + "px"}) {
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
- `, J = l(
216
+ `, P = p(
217
217
  ({
218
- title: i,
219
- subtitle: n,
220
- tags: t = [],
221
- limitTags: o = 7,
222
- limitTagsForMobile: m = 7,
223
- limit: u = 3,
224
- limitForMobile: f = 2,
225
- items: d = [],
226
- selectedTag: c,
227
- isLoadingTags: N = !1,
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
- }, W) => {
236
- var x, v;
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
- T,
234
+ E,
244
235
  {
245
- ref: W,
246
- limitTags: o,
247
- limitTagsForMobile: m,
248
- limitCards: u,
249
- limitCardsForMobile: f,
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
- i && /* @__PURE__ */ r("div", { className: "wrapper__title", children: i }),
253
- n && /* @__PURE__ */ r("div", { className: "wrapper__subtitle", children: n })
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: N ? (x = Array.from("123")) == null ? void 0 : x.map((e, a) => /* @__PURE__ */ r(
256
- M,
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.name,
264
- isActive: (e == null ? void 0 : e.uuid) === (c == null ? void 0 : c.uuid),
265
- onSelectCard: () => w == null ? void 0 : w(e)
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__${a + 1}`
268
- )) }),
269
- /* @__PURE__ */ r("div", { className: "wrapper__cards", children: $ ? (v = Array.from("123")) == null ? void 0 : v.map((e, a) => /* @__PURE__ */ r(
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__${a + 1}`
273
- )) : d == null ? void 0 : d.map((e, a) => /* @__PURE__ */ r(
274
- L,
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: I(e == null ? void 0 : e.image, e == null ? void 0 : e.uuid, e == null ? void 0 : e.sellerUuid),
263
+ image: e == null ? void 0 : e.image,
277
264
  imageComponent: e == null ? void 0 : e.imageComponent,
278
- name: e == null ? void 0 : e.name,
279
- description: (e == null ? void 0 : e.description) || (e == null ? void 0 : e.shortDescription),
280
- onSelectCard: () => g == null ? void 0 : g(e)
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__${a + 1}`
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
- J as default
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.135",
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",