@shmidko61/lc-ui-kit 0.0.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.
Files changed (128) hide show
  1. package/README.md +38 -0
  2. package/dist/accordion/accordion-context.d.ts +3 -0
  3. package/dist/accordion/accordion-item.d.ts +48 -0
  4. package/dist/accordion/accordion-root.d.ts +5 -0
  5. package/dist/accordion/accordion.d.ts +8 -0
  6. package/dist/accordion.cjs +1 -0
  7. package/dist/accordion.js +206 -0
  8. package/dist/arrow-CS6d64Y4.cjs +1 -0
  9. package/dist/arrow-DBc2opRL.js +5 -0
  10. package/dist/box/box.d.ts +7 -0
  11. package/dist/box/box.helpers.d.ts +11 -0
  12. package/dist/box/box.types.d.ts +62 -0
  13. package/dist/box.cjs +1 -0
  14. package/dist/box.js +342 -0
  15. package/dist/button/button.d.ts +22 -0
  16. package/dist/button/button.helpers.d.ts +119 -0
  17. package/dist/button.cjs +1 -0
  18. package/dist/button.js +438 -0
  19. package/dist/design-tokens/color.tokens.d.ts +6 -0
  20. package/dist/design-tokens/typography.tokens.d.ts +9 -0
  21. package/dist/drop-down-CdIuWbLC.cjs +1 -0
  22. package/dist/drop-down-DH2_3qXq.js +5 -0
  23. package/dist/eye-open-5zYaeyLp.cjs +1 -0
  24. package/dist/eye-open-CoTSj5cT.js +5 -0
  25. package/dist/flex/flex.d.ts +5 -0
  26. package/dist/flex/flex.helpers.d.ts +9 -0
  27. package/dist/flex/flex.types.d.ts +12 -0
  28. package/dist/flex.cjs +1 -0
  29. package/dist/flex.js +128 -0
  30. package/dist/grid/grid.d.ts +25 -0
  31. package/dist/grid/grid.helpers.d.ts +13 -0
  32. package/dist/grid/grid.types.d.ts +49 -0
  33. package/dist/grid.cjs +1 -0
  34. package/dist/grid.js +103 -0
  35. package/dist/icons/icons.d.ts +30 -0
  36. package/dist/icons.cjs +1 -0
  37. package/dist/icons.js +38 -0
  38. package/dist/index.cjs +1 -0
  39. package/dist/index.d.ts +22 -0
  40. package/dist/index.js +97 -0
  41. package/dist/input/input.d.ts +49 -0
  42. package/dist/input/input.helpers.d.ts +9 -0
  43. package/dist/input.cjs +1 -0
  44. package/dist/input.js +85 -0
  45. package/dist/media-card/components/media-card-pick-indicator.d.ts +6 -0
  46. package/dist/media-card/components/media-card-preview.d.ts +7 -0
  47. package/dist/media-card/components/media-card-upload-footer.d.ts +7 -0
  48. package/dist/media-card/components/media-card-upload.d.ts +5 -0
  49. package/dist/media-card/media-card-pick.d.ts +5 -0
  50. package/dist/media-card/media-card.d.ts +4 -0
  51. package/dist/media-card/media-card.types.d.ts +10 -0
  52. package/dist/media-card.cjs +1 -0
  53. package/dist/media-card.js +104 -0
  54. package/dist/media-gallery/media-gallery.d.ts +12 -0
  55. package/dist/media-gallery/media-gallery.helpers.d.ts +27 -0
  56. package/dist/media-gallery/media-gallery.types.d.ts +59 -0
  57. package/dist/media-gallery.cjs +1 -0
  58. package/dist/media-gallery.js +100 -0
  59. package/dist/media-picture-BN4saEVT.js +6 -0
  60. package/dist/media-picture-BmERSmsd.cjs +1 -0
  61. package/dist/modal/modal.d.ts +50 -0
  62. package/dist/modal.cjs +1 -0
  63. package/dist/modal.js +143 -0
  64. package/dist/pagination/pagination.d.ts +22 -0
  65. package/dist/pagination.cjs +1 -0
  66. package/dist/pagination.js +155 -0
  67. package/dist/picture/picture.d.ts +12 -0
  68. package/dist/picture/picture.helpers.d.ts +9 -0
  69. package/dist/picture/picture.types.d.ts +56 -0
  70. package/dist/picture.cjs +1 -0
  71. package/dist/picture.js +55 -0
  72. package/dist/responsive-style.config-B2m9jVlX.cjs +1 -0
  73. package/dist/responsive-style.config-DFuATrIM.js +19 -0
  74. package/dist/responsive-style.utils-BdyoDkKg.cjs +1 -0
  75. package/dist/responsive-style.utils-D10sC561.js +25 -0
  76. package/dist/select/select.d.ts +55 -0
  77. package/dist/select/select.helpers.d.ts +14 -0
  78. package/dist/select/select.types.d.ts +12 -0
  79. package/dist/select.cjs +1 -0
  80. package/dist/select.js +179 -0
  81. package/dist/shared/lib/cn.d.ts +2 -0
  82. package/dist/shared/responsive-style/responsive-style.config.d.ts +20 -0
  83. package/dist/shared/responsive-style/responsive-style.types.d.ts +52 -0
  84. package/dist/shared/responsive-style/responsive-style.utils.d.ts +17 -0
  85. package/dist/status-badge/status-badge.d.ts +11 -0
  86. package/dist/status-badge.cjs +1 -0
  87. package/dist/status-badge.js +39 -0
  88. package/dist/styles.css +1 -0
  89. package/dist/switch/switch.d.ts +34 -0
  90. package/dist/switch.cjs +1 -0
  91. package/dist/switch.js +127 -0
  92. package/dist/table/data-table.d.ts +3 -0
  93. package/dist/table/table-container.d.ts +8 -0
  94. package/dist/table/table-primitives.d.ts +40 -0
  95. package/dist/table/table-status.d.ts +12 -0
  96. package/dist/table/table.d.ts +8 -0
  97. package/dist/table/table.types.d.ts +48 -0
  98. package/dist/table-container-BsE-uIE1.js +242 -0
  99. package/dist/table-container-DqqqkChm.cjs +1 -0
  100. package/dist/table.cjs +1 -0
  101. package/dist/table.js +16 -0
  102. package/dist/telephone-DVftjRG9.cjs +1 -0
  103. package/dist/telephone-DvXakgBQ.js +26 -0
  104. package/dist/time-clock-DOwPzcx7.cjs +1 -0
  105. package/dist/time-clock-DjqcZ8tI.js +5 -0
  106. package/dist/types/flex.types.d.ts +25 -0
  107. package/dist/types/index.d.ts +7 -0
  108. package/dist/types/interaction.types.d.ts +8 -0
  109. package/dist/types/layout.types.d.ts +52 -0
  110. package/dist/types/shared.types.d.ts +8 -0
  111. package/dist/types/spacing.types.d.ts +123 -0
  112. package/dist/types/typography.types.d.ts +75 -0
  113. package/dist/types/visual.types.d.ts +82 -0
  114. package/dist/types.cjs +1 -0
  115. package/dist/types.js +1 -0
  116. package/dist/typography/typography.d.ts +39 -0
  117. package/dist/typography/typography.helpers.d.ts +237 -0
  118. package/dist/typography.cjs +1 -0
  119. package/dist/typography.js +469 -0
  120. package/dist/ui-kit-provider/ui-kit-provider.d.ts +53 -0
  121. package/dist/ui-kit-provider-C6Mk5g_7.js +167 -0
  122. package/dist/ui-kit-provider-raEFsUm0.cjs +1 -0
  123. package/dist/ui-kit-provider.cjs +1 -0
  124. package/dist/ui-kit-provider.js +8 -0
  125. package/dist/vite.config.d.ts +2 -0
  126. package/dist/x-mark-DId-ylR6.cjs +1 -0
  127. package/dist/x-mark-WU1eT82T.js +5 -0
  128. package/package.json +219 -0
@@ -0,0 +1,469 @@
1
+ import { jsx as q } from "react/jsx-runtime";
2
+ import { a as j, c as $ } from "./responsive-style.config-DFuATrIM.js";
3
+ import { n as k, m as J } from "./responsive-style.utils-D10sC561.js";
4
+ const L = "text-[length:var(--typography-font-size)] font-[var(--typography-font-weight)] leading-[var(--typography-line-height)] text-[var(--typography-color,var(--color-text-primary))] tracking-[var(--typography-letter-spacing)] [font-family:var(--typography-font-family,var(--font-family))] [font-style:var(--typography-font-style)] [height:var(--typography-height)] [margin-bottom:var(--typography-margin-bottom,0)] [margin-left:var(--typography-margin-left,0)] [margin-right:var(--typography-margin-right,0)] [margin-top:var(--typography-margin-top,0)] [max-height:var(--typography-max-height)] [max-width:var(--typography-max-width)] [min-height:var(--typography-min-height)] [min-width:var(--typography-min-width)] [padding-bottom:var(--typography-padding-bottom,0)] [padding-left:var(--typography-padding-left,0)] [padding-right:var(--typography-padding-right,0)] [padding-top:var(--typography-padding-top,0)] [text-align:var(--typography-text-align)] [text-decoration:var(--typography-text-decoration)] [text-overflow:var(--typography-text-overflow)] [text-transform:var(--typography-text-transform)] [vertical-align:var(--typography-vertical-align)] [white-space:var(--typography-white-space)] [width:var(--typography-width)] [word-break:var(--typography-word-break)]", o = {
5
+ color: "--typography-color",
6
+ fontSize: "--typography-font-size",
7
+ fontFamily: "--typography-font-family",
8
+ fontStyle: "--typography-font-style",
9
+ fontWeight: "--typography-font-weight",
10
+ height: "--typography-height",
11
+ letterSpacing: "--typography-letter-spacing",
12
+ lineHeight: "--typography-line-height",
13
+ marginBottom: "--typography-margin-bottom",
14
+ marginLeft: "--typography-margin-left",
15
+ marginRight: "--typography-margin-right",
16
+ marginTop: "--typography-margin-top",
17
+ maxHeight: "--typography-max-height",
18
+ maxWidth: "--typography-max-width",
19
+ minHeight: "--typography-min-height",
20
+ minWidth: "--typography-min-width",
21
+ paddingBottom: "--typography-padding-bottom",
22
+ paddingLeft: "--typography-padding-left",
23
+ paddingRight: "--typography-padding-right",
24
+ paddingTop: "--typography-padding-top",
25
+ textAlign: "--typography-text-align",
26
+ textDecoration: "--typography-text-decoration",
27
+ textOverflow: "--typography-text-overflow",
28
+ textTransform: "--typography-text-transform",
29
+ verticalAlign: "--typography-vertical-align",
30
+ whiteSpace: "--typography-white-space",
31
+ width: "--typography-width",
32
+ wordBreak: "--typography-word-break"
33
+ }, K = {
34
+ [o.color]: "color",
35
+ [o.fontSize]: "font-size",
36
+ [o.fontFamily]: "font-family",
37
+ [o.fontStyle]: "font-style",
38
+ [o.fontWeight]: "font-weight",
39
+ [o.height]: "height",
40
+ [o.letterSpacing]: "letter-spacing",
41
+ [o.lineHeight]: "line-height",
42
+ [o.marginBottom]: "margin-bottom",
43
+ [o.marginLeft]: "margin-left",
44
+ [o.marginRight]: "margin-right",
45
+ [o.marginTop]: "margin-top",
46
+ [o.maxHeight]: "max-height",
47
+ [o.maxWidth]: "max-width",
48
+ [o.minHeight]: "min-height",
49
+ [o.minWidth]: "min-width",
50
+ [o.paddingBottom]: "padding-bottom",
51
+ [o.paddingLeft]: "padding-left",
52
+ [o.paddingRight]: "padding-right",
53
+ [o.paddingTop]: "padding-top",
54
+ [o.textAlign]: "text-align",
55
+ [o.textDecoration]: "text-decoration",
56
+ [o.textOverflow]: "text-overflow",
57
+ [o.textTransform]: "text-transform",
58
+ [o.verticalAlign]: "vertical-align",
59
+ [o.whiteSpace]: "white-space",
60
+ [o.width]: "width",
61
+ [o.wordBreak]: "word-break"
62
+ };
63
+ function Q(t) {
64
+ const i = [], e = { ...t.vars ?? {} };
65
+ for (const a of j)
66
+ for (const [n, p] of Object.entries(t[a]?.vars ?? {})) {
67
+ const h = K[n];
68
+ if (!h || p === void 0 || p === null)
69
+ continue;
70
+ const g = `--${a}-${n.slice(2)}`;
71
+ e[g] = p, i.push(`${a}:[${h}:var(${g})]`);
72
+ }
73
+ return {
74
+ className: i.join(" "),
75
+ style: Object.keys(e).length > 0 ? e : void 0
76
+ };
77
+ }
78
+ const _ = {
79
+ h1: {
80
+ base: {
81
+ fontSize: "--typo-fs-h1-sm",
82
+ fontWeight: "--typo-fw-h1-sm",
83
+ lineHeight: "--typo-lh-h1-sm"
84
+ },
85
+ md: {
86
+ fontSize: "--typo-fs-h1-md",
87
+ fontWeight: "--typo-fw-h1-md",
88
+ lineHeight: "--typo-lh-h1-md"
89
+ },
90
+ lg: {
91
+ fontSize: "--typo-fs-h1-lg",
92
+ fontWeight: "--typo-fw-h1-lg",
93
+ lineHeight: "--typo-lh-h1-lg"
94
+ }
95
+ },
96
+ h2: {
97
+ base: {
98
+ fontSize: "--typo-fs-h2-md",
99
+ fontWeight: "--typo-fw-h2-md",
100
+ lineHeight: "--typo-lh-h2-md"
101
+ },
102
+ lg: {
103
+ fontSize: "--typo-fs-h2-lg",
104
+ fontWeight: "--typo-fw-h2-lg",
105
+ lineHeight: "--typo-lh-h2-lg"
106
+ }
107
+ },
108
+ h3: {
109
+ base: {
110
+ fontSize: "--typo-fs-h3-md",
111
+ fontWeight: "--typo-fw-h3-md",
112
+ lineHeight: "--typo-lh-h3-md"
113
+ },
114
+ md: {
115
+ fontSize: "--typo-fs-h3-lg",
116
+ fontWeight: "--typo-fw-h3-lg",
117
+ lineHeight: "--typo-lh-h3-lg"
118
+ }
119
+ },
120
+ h4: {
121
+ base: {
122
+ fontSize: "--typo-fs-h4-md",
123
+ fontWeight: "--typo-fw-h4-md",
124
+ lineHeight: "--typo-lh-h4-md"
125
+ },
126
+ lg: {
127
+ fontSize: "--typo-fs-h4-lg",
128
+ fontWeight: "--typo-fw-h4-lg",
129
+ lineHeight: "--typo-lh-h4-lg"
130
+ }
131
+ },
132
+ sh: {
133
+ base: {
134
+ fontSize: "--typo-fs-h4-lg",
135
+ fontWeight: "--typo-fw-h4-lg",
136
+ lineHeight: "--typo-lh-h4-lg"
137
+ }
138
+ },
139
+ b1: {
140
+ base: {
141
+ fontSize: "--typo-fs-b1-md",
142
+ fontWeight: "--typo-fw-b1-md",
143
+ lineHeight: "--typo-lh-b1-md"
144
+ },
145
+ lg: {
146
+ fontSize: "--typo-fs-b1-lg",
147
+ fontWeight: "--typo-fw-b1-lg",
148
+ lineHeight: "--typo-lh-b1-lg"
149
+ }
150
+ },
151
+ b2: {
152
+ base: {
153
+ fontSize: "--typo-fs-b2-md",
154
+ fontWeight: "--typo-fw-b2-md",
155
+ lineHeight: "--typo-lh-b2-md"
156
+ },
157
+ lg: {
158
+ fontSize: "--typo-fs-b2-lg",
159
+ fontWeight: "--typo-fw-b2-lg",
160
+ lineHeight: "--typo-lh-b2-lg"
161
+ }
162
+ },
163
+ b3: {
164
+ base: {
165
+ fontSize: "--typo-fs-b3-md",
166
+ fontWeight: "--typo-fw-b3-md",
167
+ lineHeight: "--typo-lh-b3-md"
168
+ },
169
+ lg: {
170
+ fontSize: "--typo-fs-b3-lg",
171
+ fontWeight: "--typo-fw-b3-lg",
172
+ lineHeight: "--typo-lh-b3-lg"
173
+ }
174
+ },
175
+ caption: {
176
+ base: {
177
+ fontSize: "--typo-fs-caption-lg",
178
+ fontWeight: "--typo-fw-caption-lg",
179
+ lineHeight: "--typo-lh-caption-lg"
180
+ }
181
+ },
182
+ "caption-caps": {
183
+ base: {
184
+ fontSize: "--typo-fs-caption-lg",
185
+ fontWeight: "--typo-fw-caption-lg",
186
+ lineHeight: "--typo-lh-caption-lg"
187
+ },
188
+ className: "uppercase"
189
+ }
190
+ };
191
+ function yt({
192
+ className: t,
193
+ variant: i = "b2"
194
+ } = {}) {
195
+ const e = _[i];
196
+ return $(L, e.className, t);
197
+ }
198
+ function X(t) {
199
+ return {
200
+ vars: A(t.base),
201
+ md: t.md ? { vars: A(t.md) } : void 0,
202
+ lg: t.lg ? { vars: A(t.lg) } : void 0
203
+ };
204
+ }
205
+ function Z({
206
+ color: t,
207
+ fontSize: i,
208
+ fontWeight: e,
209
+ lineHeight: a,
210
+ verticalAlign: n,
211
+ horizontalAlign: p,
212
+ textTransform: h,
213
+ textDecoration: g,
214
+ textOverflow: y,
215
+ whiteSpace: d,
216
+ wordBreak: m,
217
+ italic: c,
218
+ fontFamily: v,
219
+ width: b,
220
+ minWidth: w,
221
+ maxWidth: x,
222
+ height: S,
223
+ minHeight: u,
224
+ maxHeight: z,
225
+ p: W,
226
+ m: T,
227
+ md: r,
228
+ lg: f,
229
+ xl: s
230
+ }) {
231
+ return {
232
+ vars: O({
233
+ color: t,
234
+ fontSize: i,
235
+ fontWeight: e,
236
+ lineHeight: a,
237
+ verticalAlign: n,
238
+ horizontalAlign: p,
239
+ textTransform: h,
240
+ textDecoration: g,
241
+ textOverflow: y,
242
+ whiteSpace: d,
243
+ wordBreak: m,
244
+ italic: c,
245
+ fontFamily: v,
246
+ width: b,
247
+ minWidth: w,
248
+ maxWidth: x,
249
+ height: S,
250
+ minHeight: u,
251
+ maxHeight: z,
252
+ p: W,
253
+ m: T
254
+ }),
255
+ md: r ? { vars: O(r) } : void 0,
256
+ lg: f ? { vars: O(f) } : void 0,
257
+ xl: s ? { vars: O(s) } : void 0
258
+ };
259
+ }
260
+ function tt(t, i) {
261
+ const e = new Set(Object.keys(i.vars ?? {})), a = {
262
+ colors: t.colors,
263
+ typography: t.typography,
264
+ vars: t.vars
265
+ };
266
+ for (const n of j) {
267
+ for (const y of Object.keys(i[n]?.vars ?? {}))
268
+ e.add(y);
269
+ const p = t[n];
270
+ if (!p)
271
+ continue;
272
+ const h = Object.fromEntries(
273
+ Object.entries(p.vars ?? {}).filter(
274
+ ([y]) => !e.has(y)
275
+ )
276
+ ), g = {
277
+ colors: p.colors,
278
+ typography: p.typography,
279
+ vars: Object.keys(h).length > 0 ? h : void 0
280
+ };
281
+ (g.colors || g.typography || g.vars) && (a[n] = g);
282
+ }
283
+ return a;
284
+ }
285
+ function A(t) {
286
+ return {
287
+ [o.fontSize]: `var(${t.fontSize})`,
288
+ [o.fontWeight]: `var(${t.fontWeight})`,
289
+ [o.letterSpacing]: 0,
290
+ [o.lineHeight]: `var(${t.lineHeight})`
291
+ };
292
+ }
293
+ function O({
294
+ color: t,
295
+ fontSize: i,
296
+ fontWeight: e,
297
+ lineHeight: a,
298
+ verticalAlign: n,
299
+ horizontalAlign: p,
300
+ textTransform: h,
301
+ textDecoration: g,
302
+ textOverflow: y,
303
+ whiteSpace: d,
304
+ wordBreak: m,
305
+ italic: c,
306
+ fontFamily: v,
307
+ width: b,
308
+ minWidth: w,
309
+ maxWidth: x,
310
+ height: S,
311
+ minHeight: u,
312
+ maxHeight: z,
313
+ p: W,
314
+ m: T
315
+ }) {
316
+ const r = {}, f = i, s = e, P = a;
317
+ return t !== void 0 && (r[o.color] = k(t)), f !== void 0 && (r[o.fontSize] = k(f)), s !== void 0 && (r[o.fontWeight] = k(s)), P !== void 0 && (r[o.lineHeight] = k(P)), n !== void 0 && (r[o.verticalAlign] = n), p !== void 0 && (r[o.textAlign] = p), h !== void 0 && (r[o.textTransform] = rt(h)), g !== void 0 && (r[o.textDecoration] = nt(g)), y !== void 0 && (r[o.textOverflow] = y), d !== void 0 && (r[o.whiteSpace] = d), m !== void 0 && (r[o.wordBreak] = at(m)), c !== void 0 && (r[o.fontStyle] = c ? "italic" : "normal"), v !== void 0 && (r[o.fontFamily] = k(v)), b !== void 0 && (r[o.width] = H(b)), w !== void 0 && (r[o.minWidth] = H(w)), x !== void 0 && (r[o.maxWidth] = H(x)), S !== void 0 && (r[o.height] = H(S)), u !== void 0 && (r[o.minHeight] = H(u)), z !== void 0 && (r[o.maxHeight] = H(z)), Object.assign(r, ot({ p: W, m: T })), Object.keys(r).length > 0 ? r : void 0;
318
+ }
319
+ function H(t) {
320
+ return typeof t == "number" ? `${t}px` : t;
321
+ }
322
+ function ot({ p: t, m: i }) {
323
+ const e = {}, a = it(t), n = et(i);
324
+ return a.top !== void 0 && (e[o.paddingTop] = l(a.top)), a.right !== void 0 && (e[o.paddingRight] = l(a.right)), a.bottom !== void 0 && (e[o.paddingBottom] = l(a.bottom)), a.left !== void 0 && (e[o.paddingLeft] = l(a.left)), n.top !== void 0 && (e[o.marginTop] = l(n.top)), n.right !== void 0 && (e[o.marginRight] = l(n.right)), n.bottom !== void 0 && (e[o.marginBottom] = l(n.bottom)), n.left !== void 0 && (e[o.marginLeft] = l(n.left)), e;
325
+ }
326
+ function it(t) {
327
+ if (t === void 0)
328
+ return {};
329
+ if (Array.isArray(t)) {
330
+ const [e, a, n, p] = t;
331
+ return { top: e, right: a, bottom: n, left: p };
332
+ }
333
+ if (typeof t != "object")
334
+ return {
335
+ top: t,
336
+ right: t,
337
+ bottom: t,
338
+ left: t
339
+ };
340
+ const i = t;
341
+ return {
342
+ top: i.py ?? i.pt,
343
+ right: i.px ?? i.pr,
344
+ bottom: i.py ?? i.pb,
345
+ left: i.px ?? i.pl
346
+ };
347
+ }
348
+ function et(t) {
349
+ if (t === void 0)
350
+ return {};
351
+ if (Array.isArray(t)) {
352
+ const [e, a, n, p] = t;
353
+ return { top: e, right: a, bottom: n, left: p };
354
+ }
355
+ if (typeof t != "object")
356
+ return {
357
+ top: t,
358
+ right: t,
359
+ bottom: t,
360
+ left: t
361
+ };
362
+ const i = t;
363
+ return {
364
+ top: i.my ?? i.mt,
365
+ right: i.mx ?? i.mr,
366
+ bottom: i.my ?? i.mb,
367
+ left: i.mx ?? i.ml
368
+ };
369
+ }
370
+ function l(t) {
371
+ return typeof t == "number" ? `${t}px` : t;
372
+ }
373
+ function rt(t) {
374
+ return t === "normal-case" ? "none" : t;
375
+ }
376
+ function nt(t) {
377
+ return t === "no-underline" ? "none" : t;
378
+ }
379
+ function at(t) {
380
+ return {
381
+ all: "break-all",
382
+ keep: "keep-all",
383
+ normal: "normal",
384
+ word: "break-word"
385
+ }[t];
386
+ }
387
+ function lt({
388
+ as: t,
389
+ children: i,
390
+ className: e,
391
+ color: a,
392
+ fontSize: n,
393
+ fontWeight: p,
394
+ lineHeight: h,
395
+ verticalAlign: g,
396
+ horizontalAlign: y,
397
+ textTransform: d,
398
+ textDecoration: m,
399
+ textOverflow: c,
400
+ whiteSpace: v,
401
+ wordBreak: b,
402
+ italic: w,
403
+ fontFamily: x,
404
+ width: S,
405
+ minWidth: u,
406
+ maxWidth: z,
407
+ height: W,
408
+ minHeight: T,
409
+ maxHeight: r,
410
+ p: f,
411
+ m: s,
412
+ md: P,
413
+ lg: Y,
414
+ xl: C,
415
+ style: R,
416
+ variant: D = "b2",
417
+ ...E
418
+ }) {
419
+ const F = t ?? "p", B = _[D], G = X(B), N = Z({
420
+ color: a,
421
+ fontSize: n,
422
+ fontWeight: p,
423
+ lineHeight: h,
424
+ verticalAlign: g,
425
+ horizontalAlign: y,
426
+ textTransform: d,
427
+ textDecoration: m,
428
+ textOverflow: c,
429
+ whiteSpace: v,
430
+ wordBreak: b,
431
+ italic: w,
432
+ fontFamily: x,
433
+ width: S,
434
+ minWidth: u,
435
+ maxWidth: z,
436
+ height: W,
437
+ minHeight: T,
438
+ maxHeight: r,
439
+ p: f,
440
+ m: s,
441
+ md: P,
442
+ lg: Y,
443
+ xl: C
444
+ }), I = tt(
445
+ G,
446
+ N
447
+ ), M = J(I, N), V = Q(M), U = V.style || R ? {
448
+ ...V.style,
449
+ ...R
450
+ } : void 0;
451
+ return /* @__PURE__ */ q(
452
+ F,
453
+ {
454
+ className: $(
455
+ L,
456
+ B.className,
457
+ V.className,
458
+ e
459
+ ),
460
+ style: U,
461
+ ...E,
462
+ children: i
463
+ }
464
+ );
465
+ }
466
+ export {
467
+ lt as Typography,
468
+ yt as typographyVariants
469
+ };
@@ -0,0 +1,53 @@
1
+ import { AnchorHTMLAttributes, ComponentPropsWithoutRef, ElementType, ForwardRefExoticComponent, PropsWithChildren, ReactNode, RefAttributes } from 'react';
2
+ import { ResponsiveStyleBreakpoint, UiKitStyleProps } from '../shared/responsive-style/responsive-style.types';
3
+ export type UiKitLinkProps = PropsWithChildren<AnchorHTMLAttributes<HTMLAnchorElement>>;
4
+ export type UiKitLinkComponent = ForwardRefExoticComponent<UiKitLinkProps & RefAttributes<HTMLAnchorElement>>;
5
+ export type UiKitComponentsConfig = {
6
+ /**
7
+ * Единый компонент ссылки для компонентов ui-kit.
8
+ *
9
+ * По умолчанию используется обычный `<a>`. В приложении можно передать
10
+ * router-aware компонент, например обёртку над `next/link`.
11
+ */
12
+ Link: UiKitLinkComponent;
13
+ };
14
+ export type UiKitConfig = {
15
+ /**
16
+ * Переопределяемые компоненты, которые ui-kit использует внутри составных
17
+ * компонентов.
18
+ */
19
+ components: UiKitComponentsConfig;
20
+ };
21
+ type UiKitProviderBreakpointStyleProps = Pick<UiKitStyleProps, 'colors' | 'typography'>;
22
+ type UiKitProviderResponsiveStyleProps = UiKitStyleProps & Partial<Record<ResponsiveStyleBreakpoint, UiKitProviderBreakpointStyleProps>>;
23
+ type UiKitProviderOwnProps<TElement extends ElementType> = UiKitProviderResponsiveStyleProps & {
24
+ /** HTML-тег или React-компонент, которым будет отрендерен provider scope. */
25
+ as?: TElement;
26
+ children?: ReactNode;
27
+ className?: string;
28
+ /**
29
+ * Переопределение внутренних компонентов ui-kit.
30
+ *
31
+ * Пример: `components={{ Link: AppLink }}`.
32
+ */
33
+ components?: Partial<UiKitComponentsConfig>;
34
+ };
35
+ export type UiKitProviderProps<TElement extends ElementType = 'div'> = UiKitProviderOwnProps<TElement> & Omit<ComponentPropsWithoutRef<TElement>, keyof UiKitProviderOwnProps<TElement>>;
36
+ export type UiKitProviderBaseProps = {
37
+ children?: ReactNode;
38
+ /**
39
+ * Переопределение внутренних компонентов ui-kit.
40
+ */
41
+ components?: Partial<UiKitComponentsConfig>;
42
+ };
43
+ /** Возвращает runtime-конфигурацию ui-kit для responsive-компонентов. */
44
+ /**
45
+ * Runtime-конфигурация и дизайн-scope ui-kit.
46
+ *
47
+ * Оборачивайте приложение в `UiKitProvider`, если проекту нужны собственные
48
+ * глобальные переопределения дизайн-токенов. Responsive breakpoint-ы статичны
49
+ * и совпадают с breakpoint-ами собранного Tailwind CSS.
50
+ */
51
+ export declare function UiKitProvider<TElement extends ElementType = 'div'>({ as, children, className, components, colors, typography, vars, md, lg, xl, style, ...props }: UiKitProviderProps<TElement>): ReactNode;
52
+ export declare function useUiKitConfig(): UiKitConfig;
53
+ export {};
@@ -0,0 +1,167 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as k, createContext as C, useContext as m, useMemo as P } from "react";
3
+ import { c as x, a as N } from "./responsive-style.config-DFuATrIM.js";
4
+ const K = [
5
+ "--color-text-secondary",
6
+ "--color-text-primary",
7
+ "--color-primary-accent",
8
+ "--color-background-subtle",
9
+ "--color-background-default",
10
+ "--color-background-inverted",
11
+ "--color-background-muted",
12
+ "--color-secondary-accent-1",
13
+ "--color-secondary-accent-2",
14
+ "--color-secondary-accent-3"
15
+ ], U = [
16
+ /**
17
+ * h1
18
+ */
19
+ "--typo-fs-h1-sm",
20
+ "--typo-fw-h1-sm",
21
+ "--typo-lh-h1-sm",
22
+ "--typo-fs-h1-md",
23
+ "--typo-fw-h1-md",
24
+ "--typo-lh-h1-md",
25
+ "--typo-fs-h1-lg",
26
+ "--typo-fw-h1-lg",
27
+ "--typo-lh-h1-lg",
28
+ /**
29
+ * h2
30
+ */
31
+ "--typo-fs-h2-md",
32
+ "--typo-fw-h2-md",
33
+ "--typo-lh-h2-md",
34
+ "--typo-fs-h2-lg",
35
+ "--typo-fw-h2-lg",
36
+ "--typo-lh-h2-lg",
37
+ /**
38
+ * h3
39
+ */
40
+ "--typo-fs-h3-lg",
41
+ "--typo-fw-h3-lg",
42
+ "--typo-lh-h3-lg",
43
+ "--typo-fs-h3-md",
44
+ "--typo-fw-h3-md",
45
+ "--typo-lh-h3-md",
46
+ /**
47
+ * h4
48
+ */
49
+ "--typo-fs-h4-lg",
50
+ "--typo-fw-h4-lg",
51
+ "--typo-lh-h4-lg",
52
+ "--typo-fs-h4-md",
53
+ "--typo-fw-h4-md",
54
+ "--typo-lh-h4-md",
55
+ /**
56
+ * b1
57
+ */
58
+ "--typo-fs-b1-lg",
59
+ "--typo-fw-b1-lg",
60
+ "--typo-lh-b1-lg",
61
+ "--typo-fs-b1-md",
62
+ "--typo-fw-b1-md",
63
+ "--typo-lh-b1-md",
64
+ /**
65
+ * b2
66
+ */
67
+ "--typo-fs-b2-lg",
68
+ "--typo-fw-b2-lg",
69
+ "--typo-lh-b2-lg",
70
+ "--typo-fs-b2-md",
71
+ "--typo-fw-b2-md",
72
+ "--typo-lh-b2-md",
73
+ /**
74
+ * b3
75
+ */
76
+ "--typo-fs-b3-lg",
77
+ "--typo-fw-b3-lg",
78
+ "--typo-lh-b3-lg",
79
+ "--typo-fs-b3-md",
80
+ "--typo-fw-b3-md",
81
+ "--typo-lh-b3-md",
82
+ /**
83
+ * caption
84
+ */
85
+ "--typo-fs-caption-lg",
86
+ "--typo-fw-caption-lg",
87
+ "--typo-lh-caption-lg"
88
+ ], $ = k(
89
+ function(s, l) {
90
+ return /* @__PURE__ */ i("a", { ref: l, ...s });
91
+ }
92
+ ), T = {
93
+ components: {
94
+ Link: $
95
+ }
96
+ }, p = C(T);
97
+ function O({
98
+ as: t,
99
+ children: s,
100
+ className: l,
101
+ components: o,
102
+ colors: a,
103
+ typography: y,
104
+ vars: n,
105
+ md: e,
106
+ lg: c,
107
+ xl: g,
108
+ style: f,
109
+ ...u
110
+ }) {
111
+ const b = t ?? "div", h = m(p), w = P(
112
+ () => ({
113
+ components: {
114
+ ...h.components,
115
+ ...o
116
+ }
117
+ }),
118
+ [o, h.components]
119
+ ), r = L({ colors: a, typography: y, vars: n, md: e, lg: c, xl: g }), v = r.style || f ? {
120
+ ...r.style,
121
+ ...f
122
+ } : void 0;
123
+ return /* @__PURE__ */ i(p.Provider, { value: w, children: /* @__PURE__ */ i(
124
+ b,
125
+ {
126
+ className: x("w-full", r.className, l),
127
+ style: v,
128
+ ...u,
129
+ children: s
130
+ }
131
+ ) });
132
+ }
133
+ function R() {
134
+ return m(p);
135
+ }
136
+ const j = [...K, ...U];
137
+ function L(t) {
138
+ const s = [], l = { ...t.vars ?? {} };
139
+ d({ ...t.colors, ...t.typography }, s, l);
140
+ for (const o of N)
141
+ d(
142
+ { ...t[o]?.colors, ...t[o]?.typography },
143
+ s,
144
+ l,
145
+ o
146
+ );
147
+ return {
148
+ className: s.join(" "),
149
+ style: Object.keys(l).length > 0 ? l : void 0
150
+ };
151
+ }
152
+ function d(t, s, l, o) {
153
+ const a = o ? `${o}:` : "", y = o ? `${o}-` : "base-";
154
+ for (const n of j) {
155
+ const e = t[n];
156
+ if (e == null)
157
+ continue;
158
+ const c = `--${y}${n.slice(2)}`;
159
+ l[c] = e, s.push(`${a}[${n}:var(${c})]`);
160
+ }
161
+ }
162
+ export {
163
+ O as U,
164
+ U as a,
165
+ R as b,
166
+ K as u
167
+ };
@@ -0,0 +1 @@
1
+ "use strict";const p=require("react/jsx-runtime"),i=require("react"),u=require("./responsive-style.config-B2m9jVlX.cjs"),g=["--color-text-secondary","--color-text-primary","--color-primary-accent","--color-background-subtle","--color-background-default","--color-background-inverted","--color-background-muted","--color-secondary-accent-1","--color-secondary-accent-2","--color-secondary-accent-3"],b=["--typo-fs-h1-sm","--typo-fw-h1-sm","--typo-lh-h1-sm","--typo-fs-h1-md","--typo-fw-h1-md","--typo-lh-h1-md","--typo-fs-h1-lg","--typo-fw-h1-lg","--typo-lh-h1-lg","--typo-fs-h2-md","--typo-fw-h2-md","--typo-lh-h2-md","--typo-fs-h2-lg","--typo-fw-h2-lg","--typo-lh-h2-lg","--typo-fs-h3-lg","--typo-fw-h3-lg","--typo-lh-h3-lg","--typo-fs-h3-md","--typo-fw-h3-md","--typo-lh-h3-md","--typo-fs-h4-lg","--typo-fw-h4-lg","--typo-lh-h4-lg","--typo-fs-h4-md","--typo-fw-h4-md","--typo-lh-h4-md","--typo-fs-b1-lg","--typo-fw-b1-lg","--typo-lh-b1-lg","--typo-fs-b1-md","--typo-fw-b1-md","--typo-lh-b1-md","--typo-fs-b2-lg","--typo-fw-b2-lg","--typo-lh-b2-lg","--typo-fs-b2-md","--typo-fw-b2-md","--typo-lh-b2-md","--typo-fs-b3-lg","--typo-fw-b3-lg","--typo-lh-b3-lg","--typo-fs-b3-md","--typo-fw-b3-md","--typo-lh-b3-md","--typo-fs-caption-lg","--typo-fw-caption-lg","--typo-lh-caption-lg"],K=i.forwardRef(function(e,n){return p.jsx("a",{ref:n,...e})}),P={components:{Link:K}},f=i.createContext(P);function N({as:t,children:e,className:n,components:o,colors:r,typography:y,vars:s,md:l,lg:c,xl:v,style:h,...w}){const k=t??"div",d=i.useContext(f),C=i.useMemo(()=>({components:{...d.components,...o}}),[o,d.components]),a=$({colors:r,typography:y,vars:s,md:l,lg:c,xl:v}),x=a.style||h?{...a.style,...h}:void 0;return p.jsx(f.Provider,{value:C,children:p.jsx(k,{className:u.cn("w-full",a.className,n),style:x,...w,children:e})})}function T(){return i.useContext(f)}const U=[...g,...b];function $(t){const e=[],n={...t.vars??{}};m({...t.colors,...t.typography},e,n);for(const o of u.responsiveBreakpoints)m({...t[o]?.colors,...t[o]?.typography},e,n,o);return{className:e.join(" "),style:Object.keys(n).length>0?n:void 0}}function m(t,e,n,o){const r=o?`${o}:`:"",y=o?`${o}-`:"base-";for(const s of U){const l=t[s];if(l==null)continue;const c=`--${y}${s.slice(2)}`;n[c]=l,e.push(`${r}[${s}:var(${c})]`)}}exports.UiKitProvider=N;exports.uiKitColorTokens=g;exports.uiKitTypographyTokens=b;exports.useUiKitConfig=T;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");require("./responsive-style.config-B2m9jVlX.cjs");const i=require("./ui-kit-provider-raEFsUm0.cjs");exports.UiKitProvider=i.UiKitProvider;exports.useUiKitConfig=i.useUiKitConfig;
@@ -0,0 +1,8 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "./responsive-style.config-DFuATrIM.js";
4
+ import { U as p, b as e } from "./ui-kit-provider-C6Mk5g_7.js";
5
+ export {
6
+ p as UiKitProvider,
7
+ e as useUiKitConfig
8
+ };