@julseb-lib/react 1.1.33 → 1.1.34

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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { c as LibColorsHover, af as CssTextAlign, L as LibColors, a as LibColorsShort, b as LibAllColors, e as LibOverlays, f as LibAllColorsAndOverlays, k as LibSpacers, ak as CssAlignContent, ai as CssAlignItems, aj as CssJustifyContent, ah as CssJustifyItems, E as LibMaxWidth, l as LibRadiuses, an as CssObjectFit, u as LibButtonVariantExtended, j as LibShadows, ag as CssVerticalAlign, h as LibFontSizes, i as LibFontWeights, ad as DispatchState, a5 as TranslateLang, aa as ReactChildren, p as LibThemeNames, ac as FC$1, a7 as LibCountry, ab as ReactElement, s as LibLoaderVariant } from './global-CXiIaXyy.cjs';
2
- export { av as designTokens } from './global-CXiIaXyy.cjs';
1
+ import { c as LibColorsHover, af as CssTextAlign, L as LibColors, a as LibColorsShort, b as LibAllColors, e as LibOverlays, f as LibAllColorsAndOverlays, k as LibSpacers, ak as CssAlignContent, ai as CssAlignItems, aj as CssJustifyContent, ah as CssJustifyItems, E as LibMaxWidth, l as LibRadiuses, an as CssObjectFit, u as LibButtonVariantExtended, j as LibShadows, ag as CssVerticalAlign, h as LibFontSizes, i as LibFontWeights, ad as DispatchState, a5 as TranslateLang, aa as ReactChildren, p as LibThemeNames, ac as FC$1, a7 as LibCountry, ab as ReactElement, s as LibLoaderVariant } from './global-BFS193oO.cjs';
2
+ export { av as designTokens } from './global-BFS193oO.cjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { ClassNameValue } from 'tailwind-merge';
5
5
  import { LibMdEditorOptions } from './types/components-items-props.cjs';
@@ -15,35 +15,209 @@ import 'fuse.js';
15
15
  import 'prism-react-renderer';
16
16
  import './types/require-at-least-one.cjs';
17
17
 
18
+ /**
19
+ * Regular expression to match URLs in a string.
20
+ * Matches HTTP/HTTPS URLs with optional www, ports, and paths.
21
+ *
22
+ * @type {RegExp}
23
+ */
18
24
  declare const URL_REGEX: RegExp;
25
+ /**
26
+ * Splits a string into words and wraps detected URLs in anchor tags, optionally opening them in a new tab.
27
+ *
28
+ * @param {string} text - The input text to linkify.
29
+ * @param {boolean} [blank] - If true, links open in a new tab.
30
+ * @returns {Array<JSX.Element | string>} Array of JSX elements and strings with URLs linkified.
31
+ *
32
+ * @example
33
+ * linkifyText("Visit https://example.com", true)
34
+ */
19
35
  declare const linkifyText: (text: string, blank?: boolean) => (string | react_jsx_runtime.JSX.Element)[];
20
36
 
37
+ /**
38
+ * Maps color tokens to Tailwind CSS classes for styling anchor tags (`<a>`) with color, hover, and active states.
39
+ *
40
+ * @type {Record<LibColorsHover, string>}
41
+ * @example
42
+ * genLinkColor.primary // "[&_a]:font-black [&_a]:text-primary-500 [&_a]:hover:text-primary-300 [&_a]:active:text-primary-600"
43
+ */
21
44
  declare const genLinkColor: Record<LibColorsHover, string>;
45
+ /**
46
+ * Maps color tokens to Tailwind CSS classes for styling button tags (`<button>`) with color, hover, and active states.
47
+ *
48
+ * @type {Record<LibColorsHover, string>}
49
+ * @example
50
+ * genButtonColor.secondary // "[&_button]:font-black [&_button]:text-secondary-500 [&_button]:hover:text-secondary-300 [&_button]:active:text-secondary-600"
51
+ */
22
52
  declare const genButtonColor: Record<LibColorsHover, string>;
23
53
 
54
+ /**
55
+ * Maps CSS `text-align` values to their corresponding Tailwind CSS text alignment utility classes.
56
+ *
57
+ * @type {Record<CssTextAlign, string>}
58
+ * @example
59
+ * genTextAlign.center // "text-center"
60
+ */
24
61
  declare const genTextAlign: Record<CssTextAlign, string>;
25
62
 
63
+ /**
64
+ * Maps color tokens to their corresponding Tailwind CSS text color utility classes.
65
+ *
66
+ * @type {Record<LibColors, string>}
67
+ * @example
68
+ * genTextColor["primary-500"] // "text-primary-500"
69
+ */
26
70
  declare const genTextColor: Record<LibColors, string>;
71
+ /**
72
+ * Maps shorthand color tokens to their corresponding Tailwind CSS text color utility classes (uses the 500 shade).
73
+ *
74
+ * @type {Record<LibColorsShort, string>}
75
+ * @example
76
+ * genTextColorShort.primary // "text-primary-500"
77
+ */
27
78
  declare const genTextColorShort: Record<LibColorsShort, string>;
79
+ /**
80
+ * Maps color tokens to Tailwind CSS text color utility classes with hover and active states.
81
+ *
82
+ * @type {Record<LibColorsHover, string>}
83
+ * @example
84
+ * genTextColorHover.danger // "text-danger-500 hover:text-danger-300 active:text-danger-600"
85
+ */
28
86
  declare const genTextColorHover: Record<LibColorsHover, string>;
87
+ /**
88
+ * Combined map of all color tokens (full and shorthand) to their Tailwind CSS text color utility classes.
89
+ *
90
+ * @type {Record<LibAllColors, string>}
91
+ * @example
92
+ * genTextAllColor.primary // "text-primary-500"
93
+ * genTextAllColor["primary-100"] // "text-primary-100"
94
+ */
29
95
  declare const genTextAllColor: Record<LibAllColors, string>;
30
96
 
97
+ /**
98
+ * Maps all library color tokens to their corresponding Tailwind CSS `bg-` classes.
99
+ *
100
+ * @type {Record<LibColors, string>}
101
+ * @example
102
+ * genBgColor["primary-500"] // "bg-primary-500"
103
+ */
31
104
  declare const genBgColor: Record<LibColors, string>;
105
+ /**
106
+ * Maps shorthand color names to their Tailwind CSS `bg-` classes (uses the 500 shade).
107
+ *
108
+ * @type {Record<LibColorsShort, string>}
109
+ * @example
110
+ * genBgColorShort.primary // "bg-primary-500"
111
+ */
32
112
  declare const genBgColorShort: Record<LibColorsShort, string>;
113
+ /**
114
+ * Maps shorthand color names to their lightest (50 shade) Tailwind CSS `bg-` classes.
115
+ *
116
+ * @type {Record<Exclude<LibColorsShort, "black" | "transparent" | "background" | "current">, string>}
117
+ * @example
118
+ * genBgColor50.primary // "bg-primary-50"
119
+ */
33
120
  declare const genBgColor50: Record<Exclude<LibColorsShort, "black" | "transparent" | "background" | "current">, string>;
121
+ /**
122
+ * Maps hover color names to Tailwind CSS `bg-` classes with hover and active states.
123
+ *
124
+ * @type {Record<LibColorsHover, string>}
125
+ * @example
126
+ * genBgColorHover.primary // "bg-primary-500 hover:bg-primary-300 active:bg-primary-600"
127
+ */
34
128
  declare const genBgColorHover: Record<LibColorsHover, string>;
129
+ /**
130
+ * Maps ghost-style hover color names to Tailwind CSS `bg-` classes with hover and active states (lighter shades).
131
+ *
132
+ * @type {Record<LibColorsHover, string>}
133
+ * @example
134
+ * genBgColorGhostHover.primary // "bg-primary-50 hover:bg-primary-300 active:bg-primary-100"
135
+ */
35
136
  declare const genBgColorGhostHover: Record<LibColorsHover, string>;
137
+ /**
138
+ * Maps overlay tokens to their Tailwind CSS `bg-overlay-` classes.
139
+ *
140
+ * @type {Record<LibOverlays, string>}
141
+ * @example
142
+ * genBgOverlay["black-50"] // "bg-overlay-black-50"
143
+ */
36
144
  declare const genBgOverlay: Record<LibOverlays, string>;
145
+ /**
146
+ * Combined map of all color tokens (full and shorthand) to their Tailwind CSS `bg-` classes.
147
+ *
148
+ * @type {Record<LibAllColors, string>}
149
+ * @example
150
+ * genBgAllColors.primary // "bg-primary-500"
151
+ * genBgAllColors["primary-100"] // "bg-primary-100"
152
+ */
37
153
  declare const genBgAllColors: Record<LibAllColors, string>;
154
+ /**
155
+ * Combined map of all color and overlay tokens to their Tailwind CSS `bg-` classes.
156
+ *
157
+ * @type {Record<LibAllColorsAndOverlays, string>}
158
+ * @example
159
+ * genBgAllColorsAndOverlays.primary // "bg-primary-500"
160
+ * genBgAllColorsAndOverlays["black-50"] // "bg-overlay-black-50"
161
+ */
38
162
  declare const genBgAllColorsAndOverlays: Record<LibAllColorsAndOverlays, string>;
39
163
 
164
+ /**
165
+ * Maps all library color tokens to their corresponding Tailwind CSS `border-` classes.
166
+ *
167
+ * @type {Record<LibColors, string>}
168
+ * @example
169
+ * genBorderColor["primary-500"] // "border-primary-500"
170
+ */
40
171
  declare const genBorderColor: Record<LibColors, string>;
172
+ /**
173
+ * Maps shorthand color names to their Tailwind CSS `border-` classes (uses the 500 shade).
174
+ *
175
+ * @type {Record<LibColorsShort, string>}
176
+ * @example
177
+ * genBorderColorShort.primary // "border-primary-500"
178
+ */
41
179
  declare const genBorderColorShort: Record<LibColorsShort, string>;
180
+ /**
181
+ * Maps hover color names to Tailwind CSS `border-` classes with hover and active states.
182
+ *
183
+ * @type {Record<LibColorsHover, string>}
184
+ * @example
185
+ * genBorderColorHover.primary // "border-primary-500 hover:border-primary-300 active:border-primary-600"
186
+ */
42
187
  declare const genBorderColorHover: Record<LibColorsHover, string>;
188
+ /**
189
+ * Combined map of all color tokens (full and shorthand) to their Tailwind CSS `border-` classes.
190
+ *
191
+ * @type {Record<LibAllColors, string>}
192
+ * @example
193
+ * genBorderAllColors.primary // "border-primary-500"
194
+ * genBorderAllColors["primary-100"] // "border-primary-100"
195
+ */
43
196
  declare const genBorderAllColors: Record<LibAllColors, string>;
44
197
 
198
+ /**
199
+ * Maps spacing tokens to their corresponding Tailwind CSS gap utility classes.
200
+ *
201
+ * @type {Record<LibSpacers, string>}
202
+ * @example
203
+ * genGap.lg // "gap-6"
204
+ */
45
205
  declare const genGap: Record<LibSpacers, string>;
206
+ /**
207
+ * Maps spacing tokens to their corresponding Tailwind CSS row gap utility classes.
208
+ *
209
+ * @type {Record<LibSpacers, string>}
210
+ * @example
211
+ * genRowGap.md // "gap-y-4"
212
+ */
46
213
  declare const genRowGap: Record<LibSpacers, string>;
214
+ /**
215
+ * Maps spacing tokens to their corresponding Tailwind CSS column gap utility classes.
216
+ *
217
+ * @type {Record<LibSpacers, string>}
218
+ * @example
219
+ * genColGap.sm // "gap-x-3"
220
+ */
47
221
  declare const genColGap: Record<LibSpacers, string>;
48
222
 
49
223
  /**
@@ -53,33 +227,126 @@ declare const genColGap: Record<LibSpacers, string>;
53
227
  */
54
228
  declare const clsx: (...classes: Array<ClassNameValue>) => string;
55
229
 
230
+ /**
231
+ * Maps CSS `align-content` values to their corresponding Tailwind CSS utility classes.
232
+ *
233
+ * @type {Record<CssAlignContent, string>}
234
+ * @example
235
+ * genAlignContent.center // "content-center"
236
+ */
56
237
  declare const genAlignContent: Record<CssAlignContent, string>;
238
+ /**
239
+ * Maps CSS `align-items` values to their corresponding Tailwind CSS utility classes.
240
+ *
241
+ * @type {Record<CssAlignItems, string>}
242
+ * @example
243
+ * genAlignItems.center // "items-center"
244
+ */
57
245
  declare const genAlignItems: Record<CssAlignItems, string>;
58
246
 
247
+ /**
248
+ * Maps CSS `justify-content` values to their corresponding Tailwind CSS utility classes.
249
+ *
250
+ * @type {Record<CssJustifyContent, string>}
251
+ * @example
252
+ * genJustifyContent.center // "justify-center"
253
+ */
59
254
  declare const genJustifyContent: Record<CssJustifyContent, string>;
255
+ /**
256
+ * Maps CSS `justify-items` values to their corresponding Tailwind CSS utility classes.
257
+ *
258
+ * @type {Record<CssJustifyItems, string>}
259
+ * @example
260
+ * genJustifyItems.end // "justify-items-end"
261
+ */
60
262
  declare const genJustifyItems: Record<CssJustifyItems, string>;
61
263
 
264
+ /**
265
+ * Maps max-width tokens to their corresponding Tailwind CSS max-width utility classes.
266
+ *
267
+ * @type {Record<LibMaxWidth, string>}
268
+ * @example
269
+ * genMaxWidth.lg // "max-w-lg"
270
+ */
62
271
  declare const genMaxWidth: Record<LibMaxWidth, string>;
63
272
 
273
+ /**
274
+ * Maps each LibRadiuses key to its corresponding Tailwind CSS border-radius class.
275
+ *
276
+ * @type {Record<LibRadiuses, string>}
277
+ * @example
278
+ * genBorderRadius.sm // "rounded-sm"
279
+ */
64
280
  declare const genBorderRadius: Record<LibRadiuses, string>;
65
281
 
282
+ /**
283
+ * Maps CSS `object-fit` values to their corresponding Tailwind CSS object-fit utility classes.
284
+ *
285
+ * @type {Record<CssObjectFit, string>}
286
+ * @example
287
+ * genObjectFit.cover // "object-cover"
288
+ */
66
289
  declare const genObjectFit: Record<CssObjectFit, string>;
67
290
 
291
+ /**
292
+ * Maps button variant names to their corresponding Tailwind CSS classes for the disabled state.
293
+ *
294
+ * @type {Record<LibButtonVariantExtended, string>}
295
+ * @example
296
+ * genButtonDisabled.plain // "disabled:bg-gray-200 disabled:hover:bg-gray-200 disabled:text-gray-500!"
297
+ */
68
298
  declare const genButtonDisabled: Record<LibButtonVariantExtended, string>;
69
299
 
300
+ /**
301
+ * Maps each LibShadows key to its corresponding Tailwind CSS box-shadow utility class.
302
+ *
303
+ * @type {Record<LibShadows, string>}
304
+ * @example
305
+ * genBoxShadow.md // "shadow-md"
306
+ */
70
307
  declare const genBoxShadow: Record<LibShadows, string>;
71
308
 
309
+ /**
310
+ * Maps CSS `vertical-align` values to their corresponding Tailwind CSS vertical alignment utility classes.
311
+ *
312
+ * @type {Record<CssVerticalAlign, string>}
313
+ * @example
314
+ * genVAlign["align-middle"] // "align-middle"
315
+ */
72
316
  declare const genVAlign: Record<CssVerticalAlign, string>;
73
317
 
318
+ /**
319
+ * Custom React components mapping for rendering Markdown elements using the library's Text and Table components.
320
+ *
321
+ * @type {Components}
322
+ * @example
323
+ * // Usage with react-markdown
324
+ * <ReactMarkdown components={libMarkdownComponents} />
325
+ */
74
326
  declare const libMarkdownComponents: Components;
327
+ /**
328
+ * Default options for the Markdown editor, enabling or disabling formatting features.
329
+ *
330
+ * @type {LibMdEditorOptions}
331
+ * @example
332
+ * libMarkdownEditorOptions.bold // true
333
+ */
75
334
  declare const libMarkdownEditorOptions: LibMdEditorOptions;
76
335
 
77
336
  /**
78
- * Maps each color variant to its corresponding Tailwind focus ring classes.
337
+ * Maps each color variant to its corresponding Tailwind CSS focus ring utility classes.
338
+ *
339
+ * @type {Record<LibColorsHover, string>}
340
+ * @example
341
+ * genRingColor.primary // "focus:ring-1 focus:ring-primary-800"
79
342
  */
80
343
  declare const genRingColor: Record<LibColorsHover, string>;
81
344
  /**
82
- * Maps each color variant to its corresponding Tailwind focus ring classes, applied to child elements via the `[&>*]` selector.
345
+ * Maps each color variant to its corresponding Tailwind CSS focus ring utility classes, applied to child elements via the `[&>*]` selector.
346
+ *
347
+ * @type {Record<LibColorsHover, string>}
348
+ * @example
349
+ * genRingColorChildren.success // "[&>*]:focus:ring-1 [&>*]:focus:ring-success-800"
83
350
  */
84
351
  declare const genRingColorChildren: Record<LibColorsHover, string>;
85
352
 
@@ -165,8 +432,23 @@ declare function enableScroll(): void;
165
432
  */
166
433
  declare function scrollToTop(): void;
167
434
 
435
+ /**
436
+ * Maps font size tokens to their corresponding Tailwind CSS text-size utility classes or custom property-based classes.
437
+ *
438
+ * @type {Record<LibFontSizes, string>}
439
+ * @example
440
+ * genFontSize.xl // "text-xl"
441
+ * genFontSize["display-h1"] // "text-(length:--text-display-h1)"
442
+ */
168
443
  declare const genFontSize: Record<LibFontSizes, string>;
169
444
 
445
+ /**
446
+ * Maps font weight tokens to their corresponding Tailwind CSS font-weight utility classes.
447
+ *
448
+ * @type {Record<LibFontWeights, string>}
449
+ * @example
450
+ * genFontWeight.bold // "font-bold"
451
+ */
170
452
  declare const genFontWeight: Record<LibFontWeights, string>;
171
453
 
172
454
  /**