@bodynarf/react.components 1.14.1 → 1.14.2
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/components/primitives/radioGroup/component/style.css +63 -143
- package/components/primitives/radioGroup/component/style.scss +33 -2
- package/components/primitives/slider/component/style.css +81 -161
- package/components/primitives/slider/component/style.scss +32 -3
- package/components/primitives/switch/component/style.css +52 -104
- package/components/primitives/switch/component/style.scss +32 -3
- package/components/progress/component/style.css +41 -41
- package/components/progress/component/style.scss +20 -15
- package/components/stepper/component/style.css +83 -175
- package/components/stepper/component/style.scss +27 -3
- package/components/timeline/component/style.css +69 -141
- package/components/timeline/component/style.scss +28 -4
- package/package.json +5 -2
- package/components/anchor/component/index.d.ts +0 -8
- package/components/anchor/component/index.d.ts.map +0 -1
- package/components/anchor/component/index.js +0 -23
- package/components/anchor/component/style.css +0 -12
- package/components/anchor/component/style.scss +0 -15
- package/components/anchor/components/anchorWithIcon/index.d.ts +0 -11
- package/components/anchor/components/anchorWithIcon/index.d.ts.map +0 -1
- package/components/anchor/components/anchorWithIcon/index.js +0 -24
- package/components/anchor/components/simpleAnchor/index.d.ts +0 -5
- package/components/anchor/components/simpleAnchor/index.d.ts.map +0 -1
- package/components/anchor/components/simpleAnchor/index.js +0 -11
- package/components/anchor/index.d.ts +0 -3
- package/components/anchor/index.d.ts.map +0 -1
- package/components/anchor/index.js +0 -2
- package/components/anchor/types.d.ts +0 -20
- package/components/anchor/types.d.ts.map +0 -1
- package/components/anchor/types.js +0 -1
- package/components/tooltip/component/index.d.ts +0 -6
- package/components/tooltip/component/index.d.ts.map +0 -1
- package/components/tooltip/component/index.js +0 -80
- package/components/tooltip/index.d.ts +0 -3
- package/components/tooltip/index.d.ts.map +0 -1
- package/components/tooltip/index.js +0 -2
- package/components/tooltip/types.d.ts +0 -31
- package/components/tooltip/types.d.ts.map +0 -1
- package/components/tooltip/types.js +0 -1
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
height: 1.5rem;
|
|
45
45
|
min-width: 1.5rem;
|
|
46
46
|
border-radius: 50%;
|
|
47
|
-
background:
|
|
48
|
-
border: 2px solid
|
|
49
|
-
color:
|
|
47
|
+
background: var(--bulma-primary, #00d1b2);
|
|
48
|
+
border: 2px solid var(--bulma-primary, #00d1b2);
|
|
49
|
+
color: var(--bulma-white, #fff);
|
|
50
50
|
font-size: 0.75rem;
|
|
51
51
|
font-weight: 600;
|
|
52
52
|
z-index: 1;
|
|
@@ -61,28 +61,28 @@
|
|
|
61
61
|
}
|
|
62
62
|
.bbr-timeline .bbr-timeline-content {
|
|
63
63
|
flex: 1;
|
|
64
|
-
background:
|
|
65
|
-
border: 1px solid
|
|
64
|
+
background: var(--bulma-white, #fff);
|
|
65
|
+
border: 1px solid var(--bulma-grey-lighter, #dbdbdb);
|
|
66
66
|
border-radius: 4px;
|
|
67
67
|
padding: 1rem;
|
|
68
68
|
margin-left: 1rem;
|
|
69
|
-
box-shadow: 0 2px 4px rgba(
|
|
69
|
+
box-shadow: 0 2px 4px rgba(var(--bulma-black, #0a0a0a), 0.05);
|
|
70
70
|
}
|
|
71
71
|
.bbr-timeline .bbr-timeline-title {
|
|
72
72
|
font-weight: 600;
|
|
73
73
|
font-size: 1rem;
|
|
74
|
-
color:
|
|
74
|
+
color: var(--bulma-grey-darker, #363636);
|
|
75
75
|
line-height: 1.25;
|
|
76
76
|
}
|
|
77
77
|
.bbr-timeline .bbr-timeline-text {
|
|
78
78
|
margin-top: 0.5rem;
|
|
79
79
|
font-size: 0.875rem;
|
|
80
|
-
color:
|
|
80
|
+
color: var(--bulma-grey, #7a7a7a);
|
|
81
81
|
line-height: 1.5;
|
|
82
82
|
}
|
|
83
83
|
.bbr-timeline .bbr-timeline-timestamp {
|
|
84
84
|
font-size: 0.75rem;
|
|
85
|
-
color:
|
|
85
|
+
color: var(--bulma-grey-light, #b5b5b5);
|
|
86
86
|
margin-bottom: 0.25rem;
|
|
87
87
|
}
|
|
88
88
|
.bbr-timeline .bbr-timeline-connector {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
top: 1.5rem;
|
|
92
92
|
width: 2px;
|
|
93
93
|
height: calc(100% - 1.5rem);
|
|
94
|
-
background:
|
|
94
|
+
background: var(--bulma-grey-lighter, #dbdbdb);
|
|
95
95
|
z-index: 0;
|
|
96
96
|
}
|
|
97
97
|
.bbr-timeline.is-left-aligned .bbr-timeline-item {
|
|
@@ -163,57 +163,37 @@
|
|
|
163
163
|
display: none;
|
|
164
164
|
}
|
|
165
165
|
.bbr-timeline.is-hollow .bbr-timeline-marker {
|
|
166
|
-
background:
|
|
167
|
-
}
|
|
168
|
-
.bbr-timeline.is-hollow .bbr-timeline-item.is-white .bbr-timeline-marker {
|
|
169
|
-
background: hsl(0, 0%, 100%);
|
|
170
|
-
border-color: hsl(0, 0%, 100%);
|
|
171
|
-
color: hsl(0, 0%, 100%);
|
|
172
|
-
}
|
|
173
|
-
.bbr-timeline.is-hollow .bbr-timeline-item.is-black .bbr-timeline-marker {
|
|
174
|
-
background: hsl(0, 0%, 100%);
|
|
175
|
-
border-color: hsl(0, 0%, 4%);
|
|
176
|
-
color: hsl(0, 0%, 4%);
|
|
177
|
-
}
|
|
178
|
-
.bbr-timeline.is-hollow .bbr-timeline-item.is-light .bbr-timeline-marker {
|
|
179
|
-
background: hsl(0, 0%, 100%);
|
|
180
|
-
border-color: hsl(0, 0%, 96%);
|
|
181
|
-
color: hsl(0, 0%, 96%);
|
|
182
|
-
}
|
|
183
|
-
.bbr-timeline.is-hollow .bbr-timeline-item.is-dark .bbr-timeline-marker {
|
|
184
|
-
background: hsl(0, 0%, 100%);
|
|
185
|
-
border-color: hsl(0, 0%, 21%);
|
|
186
|
-
color: hsl(0, 0%, 21%);
|
|
166
|
+
background: var(--bulma-white, #fff);
|
|
187
167
|
}
|
|
188
168
|
.bbr-timeline.is-hollow .bbr-timeline-item.is-primary .bbr-timeline-marker {
|
|
189
|
-
background:
|
|
190
|
-
border-color:
|
|
191
|
-
color:
|
|
169
|
+
background: var(--bulma-white, #fff);
|
|
170
|
+
border-color: var(--bulma-primary, #00d1b2);
|
|
171
|
+
color: var(--bulma-primary, #00d1b2);
|
|
192
172
|
}
|
|
193
173
|
.bbr-timeline.is-hollow .bbr-timeline-item.is-link .bbr-timeline-marker {
|
|
194
|
-
background:
|
|
195
|
-
border-color:
|
|
196
|
-
color:
|
|
174
|
+
background: var(--bulma-white, #fff);
|
|
175
|
+
border-color: var(--bulma-link, #485fc7);
|
|
176
|
+
color: var(--bulma-link, #485fc7);
|
|
197
177
|
}
|
|
198
178
|
.bbr-timeline.is-hollow .bbr-timeline-item.is-info .bbr-timeline-marker {
|
|
199
|
-
background:
|
|
200
|
-
border-color:
|
|
201
|
-
color:
|
|
179
|
+
background: var(--bulma-white, #fff);
|
|
180
|
+
border-color: var(--bulma-info, #3e8ed0);
|
|
181
|
+
color: var(--bulma-info, #3e8ed0);
|
|
202
182
|
}
|
|
203
183
|
.bbr-timeline.is-hollow .bbr-timeline-item.is-success .bbr-timeline-marker {
|
|
204
|
-
background:
|
|
205
|
-
border-color:
|
|
206
|
-
color:
|
|
184
|
+
background: var(--bulma-white, #fff);
|
|
185
|
+
border-color: var(--bulma-success, #48c78e);
|
|
186
|
+
color: var(--bulma-success, #48c78e);
|
|
207
187
|
}
|
|
208
188
|
.bbr-timeline.is-hollow .bbr-timeline-item.is-warning .bbr-timeline-marker {
|
|
209
|
-
background:
|
|
210
|
-
border-color:
|
|
211
|
-
color:
|
|
189
|
+
background: var(--bulma-white, #fff);
|
|
190
|
+
border-color: var(--bulma-warning, #ffe08a);
|
|
191
|
+
color: var(--bulma-warning, #ffe08a);
|
|
212
192
|
}
|
|
213
193
|
.bbr-timeline.is-hollow .bbr-timeline-item.is-danger .bbr-timeline-marker {
|
|
214
|
-
background:
|
|
215
|
-
border-color:
|
|
216
|
-
color:
|
|
194
|
+
background: var(--bulma-white, #fff);
|
|
195
|
+
border-color: var(--bulma-danger, #f14668);
|
|
196
|
+
color: var(--bulma-danger, #f14668);
|
|
217
197
|
}
|
|
218
198
|
.bbr-timeline.is-animated .bbr-timeline-item {
|
|
219
199
|
opacity: 0;
|
|
@@ -356,133 +336,81 @@
|
|
|
356
336
|
top: 2rem;
|
|
357
337
|
height: calc(100% - 2rem);
|
|
358
338
|
}
|
|
359
|
-
.bbr-timeline.is-white .bbr-timeline-marker {
|
|
360
|
-
background: hsl(0, 0%, 100%);
|
|
361
|
-
border-color: hsl(0, 0%, 100%);
|
|
362
|
-
color: hsl(0, 0%, 4%);
|
|
363
|
-
}
|
|
364
|
-
.bbr-timeline.is-white .bbr-timeline-connector {
|
|
365
|
-
background: rgba(255, 255, 255, 0.3);
|
|
366
|
-
}
|
|
367
|
-
.bbr-timeline .bbr-timeline-item.is-white .bbr-timeline-marker {
|
|
368
|
-
background: hsl(0, 0%, 100%);
|
|
369
|
-
border-color: hsl(0, 0%, 100%);
|
|
370
|
-
color: hsl(0, 0%, 4%);
|
|
371
|
-
}
|
|
372
|
-
.bbr-timeline.is-black .bbr-timeline-marker {
|
|
373
|
-
background: hsl(0, 0%, 4%);
|
|
374
|
-
border-color: hsl(0, 0%, 4%);
|
|
375
|
-
color: hsl(0, 0%, 100%);
|
|
376
|
-
}
|
|
377
|
-
.bbr-timeline.is-black .bbr-timeline-connector {
|
|
378
|
-
background: rgba(10.2, 10.2, 10.2, 0.3);
|
|
379
|
-
}
|
|
380
|
-
.bbr-timeline .bbr-timeline-item.is-black .bbr-timeline-marker {
|
|
381
|
-
background: hsl(0, 0%, 4%);
|
|
382
|
-
border-color: hsl(0, 0%, 4%);
|
|
383
|
-
color: hsl(0, 0%, 100%);
|
|
384
|
-
}
|
|
385
|
-
.bbr-timeline.is-light .bbr-timeline-marker {
|
|
386
|
-
background: hsl(0, 0%, 96%);
|
|
387
|
-
border-color: hsl(0, 0%, 96%);
|
|
388
|
-
color: rgba(0, 0, 0, 0.7);
|
|
389
|
-
}
|
|
390
|
-
.bbr-timeline.is-light .bbr-timeline-connector {
|
|
391
|
-
background: rgba(244.8, 244.8, 244.8, 0.3);
|
|
392
|
-
}
|
|
393
|
-
.bbr-timeline .bbr-timeline-item.is-light .bbr-timeline-marker {
|
|
394
|
-
background: hsl(0, 0%, 96%);
|
|
395
|
-
border-color: hsl(0, 0%, 96%);
|
|
396
|
-
color: rgba(0, 0, 0, 0.7);
|
|
397
|
-
}
|
|
398
|
-
.bbr-timeline.is-dark .bbr-timeline-marker {
|
|
399
|
-
background: hsl(0, 0%, 21%);
|
|
400
|
-
border-color: hsl(0, 0%, 21%);
|
|
401
|
-
color: #fff;
|
|
402
|
-
}
|
|
403
|
-
.bbr-timeline.is-dark .bbr-timeline-connector {
|
|
404
|
-
background: rgba(53.55, 53.55, 53.55, 0.3);
|
|
405
|
-
}
|
|
406
|
-
.bbr-timeline .bbr-timeline-item.is-dark .bbr-timeline-marker {
|
|
407
|
-
background: hsl(0, 0%, 21%);
|
|
408
|
-
border-color: hsl(0, 0%, 21%);
|
|
409
|
-
color: #fff;
|
|
410
|
-
}
|
|
411
339
|
.bbr-timeline.is-primary .bbr-timeline-marker {
|
|
412
|
-
background:
|
|
413
|
-
border-color:
|
|
414
|
-
color: #fff;
|
|
340
|
+
background: var(--bulma-primary, #00d1b2);
|
|
341
|
+
border-color: var(--bulma-primary, #00d1b2);
|
|
342
|
+
color: var(--bulma-white, #fff);
|
|
415
343
|
}
|
|
416
344
|
.bbr-timeline.is-primary .bbr-timeline-connector {
|
|
417
|
-
background: rgba(
|
|
345
|
+
background: rgba(var(--bulma-primary, #00d1b2), 0.3);
|
|
418
346
|
}
|
|
419
347
|
.bbr-timeline .bbr-timeline-item.is-primary .bbr-timeline-marker {
|
|
420
|
-
background:
|
|
421
|
-
border-color:
|
|
422
|
-
color: #fff;
|
|
348
|
+
background: var(--bulma-primary, #00d1b2);
|
|
349
|
+
border-color: var(--bulma-primary, #00d1b2);
|
|
350
|
+
color: var(--bulma-white, #fff);
|
|
423
351
|
}
|
|
424
352
|
.bbr-timeline.is-link .bbr-timeline-marker {
|
|
425
|
-
background:
|
|
426
|
-
border-color:
|
|
427
|
-
color: #fff;
|
|
353
|
+
background: var(--bulma-link, #485fc7);
|
|
354
|
+
border-color: var(--bulma-link, #485fc7);
|
|
355
|
+
color: var(--bulma-white, #fff);
|
|
428
356
|
}
|
|
429
357
|
.bbr-timeline.is-link .bbr-timeline-connector {
|
|
430
|
-
background: rgba(
|
|
358
|
+
background: rgba(var(--bulma-link, #485fc7), 0.3);
|
|
431
359
|
}
|
|
432
360
|
.bbr-timeline .bbr-timeline-item.is-link .bbr-timeline-marker {
|
|
433
|
-
background:
|
|
434
|
-
border-color:
|
|
435
|
-
color: #fff;
|
|
361
|
+
background: var(--bulma-link, #485fc7);
|
|
362
|
+
border-color: var(--bulma-link, #485fc7);
|
|
363
|
+
color: var(--bulma-white, #fff);
|
|
436
364
|
}
|
|
437
365
|
.bbr-timeline.is-info .bbr-timeline-marker {
|
|
438
|
-
background:
|
|
439
|
-
border-color:
|
|
440
|
-
color: #fff;
|
|
366
|
+
background: var(--bulma-info, #3e8ed0);
|
|
367
|
+
border-color: var(--bulma-info, #3e8ed0);
|
|
368
|
+
color: var(--bulma-white, #fff);
|
|
441
369
|
}
|
|
442
370
|
.bbr-timeline.is-info .bbr-timeline-connector {
|
|
443
|
-
background: rgba(
|
|
371
|
+
background: rgba(var(--bulma-info, #3e8ed0), 0.3);
|
|
444
372
|
}
|
|
445
373
|
.bbr-timeline .bbr-timeline-item.is-info .bbr-timeline-marker {
|
|
446
|
-
background:
|
|
447
|
-
border-color:
|
|
448
|
-
color: #fff;
|
|
374
|
+
background: var(--bulma-info, #3e8ed0);
|
|
375
|
+
border-color: var(--bulma-info, #3e8ed0);
|
|
376
|
+
color: var(--bulma-white, #fff);
|
|
449
377
|
}
|
|
450
378
|
.bbr-timeline.is-success .bbr-timeline-marker {
|
|
451
|
-
background:
|
|
452
|
-
border-color:
|
|
453
|
-
color: #fff;
|
|
379
|
+
background: var(--bulma-success, #48c78e);
|
|
380
|
+
border-color: var(--bulma-success, #48c78e);
|
|
381
|
+
color: var(--bulma-white, #fff);
|
|
454
382
|
}
|
|
455
383
|
.bbr-timeline.is-success .bbr-timeline-connector {
|
|
456
|
-
background: rgba(
|
|
384
|
+
background: rgba(var(--bulma-success, #48c78e), 0.3);
|
|
457
385
|
}
|
|
458
386
|
.bbr-timeline .bbr-timeline-item.is-success .bbr-timeline-marker {
|
|
459
|
-
background:
|
|
460
|
-
border-color:
|
|
461
|
-
color: #fff;
|
|
387
|
+
background: var(--bulma-success, #48c78e);
|
|
388
|
+
border-color: var(--bulma-success, #48c78e);
|
|
389
|
+
color: var(--bulma-white, #fff);
|
|
462
390
|
}
|
|
463
391
|
.bbr-timeline.is-warning .bbr-timeline-marker {
|
|
464
|
-
background:
|
|
465
|
-
border-color:
|
|
392
|
+
background: var(--bulma-warning, #ffe08a);
|
|
393
|
+
border-color: var(--bulma-warning, #ffe08a);
|
|
466
394
|
color: rgba(0, 0, 0, 0.7);
|
|
467
395
|
}
|
|
468
396
|
.bbr-timeline.is-warning .bbr-timeline-connector {
|
|
469
|
-
background: rgba(
|
|
397
|
+
background: rgba(var(--bulma-warning, #ffe08a), 0.3);
|
|
470
398
|
}
|
|
471
399
|
.bbr-timeline .bbr-timeline-item.is-warning .bbr-timeline-marker {
|
|
472
|
-
background:
|
|
473
|
-
border-color:
|
|
400
|
+
background: var(--bulma-warning, #ffe08a);
|
|
401
|
+
border-color: var(--bulma-warning, #ffe08a);
|
|
474
402
|
color: rgba(0, 0, 0, 0.7);
|
|
475
403
|
}
|
|
476
404
|
.bbr-timeline.is-danger .bbr-timeline-marker {
|
|
477
|
-
background:
|
|
478
|
-
border-color:
|
|
479
|
-
color: #fff;
|
|
405
|
+
background: var(--bulma-danger, #f14668);
|
|
406
|
+
border-color: var(--bulma-danger, #f14668);
|
|
407
|
+
color: var(--bulma-white, #fff);
|
|
480
408
|
}
|
|
481
409
|
.bbr-timeline.is-danger .bbr-timeline-connector {
|
|
482
|
-
background: rgba(
|
|
410
|
+
background: rgba(var(--bulma-danger, #f14668), 0.3);
|
|
483
411
|
}
|
|
484
412
|
.bbr-timeline .bbr-timeline-item.is-danger .bbr-timeline-marker {
|
|
485
|
-
background:
|
|
486
|
-
border-color:
|
|
487
|
-
color: #fff;
|
|
413
|
+
background: var(--bulma-danger, #f14668);
|
|
414
|
+
border-color: var(--bulma-danger, #f14668);
|
|
415
|
+
color: var(--bulma-white, #fff);
|
|
488
416
|
}
|
|
@@ -1,4 +1,28 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "sass:list";
|
|
2
|
+
|
|
3
|
+
// Bulma variables - compatible with v0.9.x and v1.x
|
|
4
|
+
// Uses CSS variables with fallbacks matching Bulma 0.9.4 defaults
|
|
5
|
+
// v1.x: CSS variables (--bulma-*) will be used if defined
|
|
6
|
+
// v0.9.x: Fallback values will be used (no CSS variables in 0.9.x)
|
|
7
|
+
|
|
8
|
+
// Colors
|
|
9
|
+
$primary: var(--bulma-primary, #00d1b2);
|
|
10
|
+
$white: var(--bulma-white, #fff);
|
|
11
|
+
$black: var(--bulma-black, #0a0a0a);
|
|
12
|
+
$grey-lighter: var(--bulma-grey-lighter, #dbdbdb);
|
|
13
|
+
$grey-light: var(--bulma-grey-light, #b5b5b5);
|
|
14
|
+
$grey: var(--bulma-grey, #7a7a7a);
|
|
15
|
+
$grey-darker: var(--bulma-grey-darker, #363636);
|
|
16
|
+
|
|
17
|
+
// Color map for variations
|
|
18
|
+
$colors: (
|
|
19
|
+
"primary": ($primary, $white),
|
|
20
|
+
"link": (var(--bulma-link, #485fc7), $white),
|
|
21
|
+
"info": (var(--bulma-info, #3e8ed0), $white),
|
|
22
|
+
"success": (var(--bulma-success, #48c78e), $white),
|
|
23
|
+
"warning": (var(--bulma-warning, #ffe08a), rgba(0, 0, 0, 0.7)),
|
|
24
|
+
"danger": (var(--bulma-danger, #f14668), $white)
|
|
25
|
+
);
|
|
2
26
|
|
|
3
27
|
$timeline-marker-size: 1.5rem !default;
|
|
4
28
|
$timeline-marker-size-small: 1.25rem !default;
|
|
@@ -241,7 +265,7 @@ $timeline-item-spacing: 2rem !default;
|
|
|
241
265
|
}
|
|
242
266
|
|
|
243
267
|
@each $name, $pair in $colors {
|
|
244
|
-
$color: nth($pair, 1);
|
|
268
|
+
$color: list.nth($pair, 1);
|
|
245
269
|
|
|
246
270
|
.bbr-timeline-item.is-#{$name} .bbr-timeline-marker {
|
|
247
271
|
background: $timeline-marker-hollow-bg;
|
|
@@ -371,8 +395,8 @@ $timeline-item-spacing: 2rem !default;
|
|
|
371
395
|
|
|
372
396
|
// Color variations
|
|
373
397
|
@each $name, $pair in $colors {
|
|
374
|
-
$color: nth($pair, 1);
|
|
375
|
-
$color-invert: nth($pair, 2);
|
|
398
|
+
$color: list.nth($pair, 1);
|
|
399
|
+
$color-invert: list.nth($pair, 2);
|
|
376
400
|
|
|
377
401
|
&.is-#{$name} {
|
|
378
402
|
.bbr-timeline-marker {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bodynarf/react.components",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Artem",
|
|
6
6
|
"email": "bodynar@gmail.com"
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
"bulma"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
+
"dev": "cd examples && npm run dev",
|
|
25
|
+
"examples:install": "cd examples && npm install",
|
|
24
26
|
"build": "npx tsc && tsc-alias -p tsconfig.json",
|
|
25
27
|
"copy_styles": "copyfiles -u 1 src/**/*.scss dist",
|
|
26
28
|
"copy_main": "copyfiles package.json *.md .npmignore dist",
|
|
@@ -50,7 +52,8 @@
|
|
|
50
52
|
"stylelint-config-standard-scss": "^13.1.0",
|
|
51
53
|
"tsc-alias": "^1.8.6",
|
|
52
54
|
"typescript": "~5.8.3",
|
|
53
|
-
"typescript-eslint": "^8.35.1"
|
|
55
|
+
"typescript-eslint": "^8.35.1",
|
|
56
|
+
"vite-tsconfig-paths": "^6.1.1"
|
|
54
57
|
},
|
|
55
58
|
"peerDependencies": {
|
|
56
59
|
"@bodynarf/utils": "latest",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./style.scss";
|
|
2
|
-
import { AnchorProps } from "..";
|
|
3
|
-
/**
|
|
4
|
-
* Anchor component
|
|
5
|
-
* @deprecated Since v1.12.7. Use html element with custom formatting
|
|
6
|
-
*/
|
|
7
|
-
export default function Anchor(props: AnchorProps): JSX.Element;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/anchor/component/index.tsx"],"names":[],"mappings":"AAEA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAIjC;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA6B9D"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { isNullOrUndefined, getClassName } from "@bodynarf/utils";
|
|
3
|
-
import "./style.scss";
|
|
4
|
-
import SimpleAnchor from "../components/simpleAnchor";
|
|
5
|
-
import AnchorWithIcon from "../components/anchorWithIcon";
|
|
6
|
-
/**
|
|
7
|
-
* Anchor component
|
|
8
|
-
* @deprecated Since v1.12.7. Use html element with custom formatting
|
|
9
|
-
*/
|
|
10
|
-
export default function Anchor(props) {
|
|
11
|
-
if (isNullOrUndefined(props.caption) && isNullOrUndefined(props.icon)) {
|
|
12
|
-
throw new Error("No anchor content provided");
|
|
13
|
-
}
|
|
14
|
-
const className = getClassName([
|
|
15
|
-
"bbr-anchor",
|
|
16
|
-
props.className,
|
|
17
|
-
props.disableHovering === true ? "bbr-anchor--unhoverable" : ""
|
|
18
|
-
]);
|
|
19
|
-
if (isNullOrUndefined(props.icon)) {
|
|
20
|
-
return (_jsx(SimpleAnchor, { ...props, className: className }));
|
|
21
|
-
}
|
|
22
|
-
return (_jsx(AnchorWithIcon, { ...props, icon: props.icon, className: className }));
|
|
23
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ElementIcon } from "../../../../types";
|
|
2
|
-
import { AnchorProps } from "../..";
|
|
3
|
-
/** Props type of `AnchorWithIcon` */
|
|
4
|
-
interface AnchorWithIconProps extends Omit<AnchorProps, "icon"> {
|
|
5
|
-
/** Configuration of icon */
|
|
6
|
-
icon: ElementIcon;
|
|
7
|
-
}
|
|
8
|
-
/** Anchor with icon component */
|
|
9
|
-
declare const AnchorWithIcon: ({ href, caption, target, icon, onClick, className, title, data, }: AnchorWithIconProps) => JSX.Element;
|
|
10
|
-
export default AnchorWithIcon;
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/anchor/components/anchorWithIcon/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAmB,MAAM,YAAY,CAAC;AAI1D,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,qCAAqC;AACrC,UAAU,mBAAoB,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;IAC3D,4BAA4B;IAC5B,IAAI,EAAE,WAAW,CAAC;CACrB;AAED,iCAAiC;AACjC,QAAA,MAAM,cAAc,GAAI,mEAMrB,mBAAmB,KAAG,GAAG,CAAC,OA6C5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { getClassName, isNullOrEmpty, isNullOrUndefined } from "@bodynarf/utils";
|
|
3
|
-
import { ElementPosition } from "../../../../types";
|
|
4
|
-
import { mapDataAttributes } from "../../../../utils";
|
|
5
|
-
import Icon from "../../../icon";
|
|
6
|
-
/** Anchor with icon component */
|
|
7
|
-
const AnchorWithIcon = ({ href, caption, target, icon, onClick, className, title, data, }) => {
|
|
8
|
-
const iconClassName = isNullOrEmpty(caption)
|
|
9
|
-
? icon.className
|
|
10
|
-
: getClassName([
|
|
11
|
-
icon.className,
|
|
12
|
-
icon.position === ElementPosition.Right
|
|
13
|
-
? "bbr-icon--right"
|
|
14
|
-
: "bbr-icon--left"
|
|
15
|
-
]);
|
|
16
|
-
const dataAttributes = isNullOrUndefined(data)
|
|
17
|
-
? undefined
|
|
18
|
-
: mapDataAttributes(data);
|
|
19
|
-
if (icon.position === ElementPosition.Right) {
|
|
20
|
-
return (_jsxs("a", { href: href, target: target, onClick: onClick, className: className, title: title, ...dataAttributes, children: [caption, _jsx(Icon, { ...icon, className: iconClassName })] }));
|
|
21
|
-
}
|
|
22
|
-
return (_jsxs("a", { href: href, target: target, onClick: onClick, className: className, title: title, ...dataAttributes, children: [_jsx(Icon, { ...icon, className: iconClassName }), caption] }));
|
|
23
|
-
};
|
|
24
|
-
export default AnchorWithIcon;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AnchorProps } from "../..";
|
|
2
|
-
/** Simple anchor component, without icon */
|
|
3
|
-
declare const SimpleAnchor: ({ href, className, caption, target, onClick, title, data, }: AnchorProps) => JSX.Element;
|
|
4
|
-
export default SimpleAnchor;
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/anchor/components/simpleAnchor/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,4CAA4C;AAC5C,QAAA,MAAM,YAAY,GAAI,6DAKnB,WAAW,KAAG,GAAG,CAAC,OAkBpB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { isNullOrUndefined } from "@bodynarf/utils";
|
|
3
|
-
import { mapDataAttributes } from "../../../../utils";
|
|
4
|
-
/** Simple anchor component, without icon */
|
|
5
|
-
const SimpleAnchor = ({ href, className, caption, target, onClick, title, data, }) => {
|
|
6
|
-
const dataAttributes = isNullOrUndefined(data)
|
|
7
|
-
? undefined
|
|
8
|
-
: mapDataAttributes(data);
|
|
9
|
-
return (_jsx("a", { href: href, target: target, onClick: onClick, className: className, title: title, ...dataAttributes, children: caption }));
|
|
10
|
-
};
|
|
11
|
-
export default SimpleAnchor;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,SAAS,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseElementProps, ElementIcon } from "../../types";
|
|
2
|
-
/**
|
|
3
|
-
* Anchor component props type
|
|
4
|
-
* @deprecated Since v1.12.0. Use html element with custom formatting
|
|
5
|
-
*/
|
|
6
|
-
export interface AnchorProps extends BaseElementProps {
|
|
7
|
-
/** Configuration od inner icon */
|
|
8
|
-
icon?: ElementIcon;
|
|
9
|
-
/** Should css hovering effects be disabled */
|
|
10
|
-
disableHovering?: boolean;
|
|
11
|
-
/** Link destination */
|
|
12
|
-
href?: string;
|
|
13
|
-
/** Link caption */
|
|
14
|
-
caption?: string;
|
|
15
|
-
/** Where to open the linked document */
|
|
16
|
-
target?: "_blank" | "_top";
|
|
17
|
-
/** Click handler */
|
|
18
|
-
onClick?: () => void;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/anchor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACjD,kCAAkC;IAClC,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,wCAAwC;IACxC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAE3B,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/component/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAoD,MAAM,OAAO,CAAC;AAO7E,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAElC,OAAO,cAAc,CAAC;AAEtB,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAsJ7B,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useEffect, useId, useMemo, useState } from "react";
|
|
3
|
-
import { getClassName, isNotNullish, isNullish } from "@bodynarf/utils";
|
|
4
|
-
import { useComponentOutsideClick, useEventListener } from "../../../hooks";
|
|
5
|
-
import { mapDataAttributes } from "../../../utils";
|
|
6
|
-
import "./style.scss";
|
|
7
|
-
const Tooltip = ({ content, children, trigger = "hover", position = "top", disabled = false, isOpen, defaultOpen = false, closeOnOutsideClick = true, closeOnEsc = true, interactive = false, className, contentClassName, title, data, onOpenChange, }) => {
|
|
8
|
-
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
9
|
-
const generatedId = useId();
|
|
10
|
-
const id = useMemo(() => `tooltip-${generatedId}`.replace(/:/g, ""), [generatedId]);
|
|
11
|
-
const isControlled = isNotNullish(isOpen);
|
|
12
|
-
const open = (isControlled ? isOpen : internalOpen) ?? false;
|
|
13
|
-
const setOpen = useCallback((next) => {
|
|
14
|
-
if (!isControlled) {
|
|
15
|
-
setInternalOpen(next);
|
|
16
|
-
}
|
|
17
|
-
onOpenChange?.(next);
|
|
18
|
-
}, [isControlled, onOpenChange]);
|
|
19
|
-
const onMouseEnter = useCallback(() => {
|
|
20
|
-
if (disabled || trigger !== "hover") {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
setOpen(true);
|
|
24
|
-
}, [disabled, trigger, setOpen]);
|
|
25
|
-
const onMouseLeave = useCallback(() => {
|
|
26
|
-
if (disabled || trigger !== "hover") {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
setOpen(false);
|
|
30
|
-
}, [disabled, trigger, setOpen]);
|
|
31
|
-
const onFocus = useCallback(() => {
|
|
32
|
-
if (disabled || trigger !== "hover") {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
setOpen(true);
|
|
36
|
-
}, [disabled, trigger, setOpen]);
|
|
37
|
-
const onBlur = useCallback(() => {
|
|
38
|
-
if (disabled || trigger !== "hover") {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
setOpen(false);
|
|
42
|
-
}, [disabled, trigger, setOpen]);
|
|
43
|
-
const onClick = useCallback(() => {
|
|
44
|
-
if (disabled || trigger !== "click") {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
setOpen(!open);
|
|
48
|
-
}, [disabled, trigger, open, setOpen]);
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
if (disabled && open) {
|
|
51
|
-
setOpen(false);
|
|
52
|
-
}
|
|
53
|
-
}, [disabled, open, setOpen]);
|
|
54
|
-
useComponentOutsideClick(`[data-tooltip-id="${id}"]`, open && trigger === "click" && closeOnOutsideClick, () => setOpen(false), trigger === "click");
|
|
55
|
-
useEventListener("keydown", (event) => {
|
|
56
|
-
if (!closeOnEsc || !open) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
if (event.key === "Escape") {
|
|
60
|
-
setOpen(false);
|
|
61
|
-
}
|
|
62
|
-
}, document);
|
|
63
|
-
const rootClassName = getClassName([
|
|
64
|
-
"bbr-tooltip",
|
|
65
|
-
`bbr-tooltip--${position}`,
|
|
66
|
-
className,
|
|
67
|
-
]);
|
|
68
|
-
const dataAttributes = mapDataAttributes(data);
|
|
69
|
-
const contentClassNames = getClassName([
|
|
70
|
-
"bbr-tooltip__content",
|
|
71
|
-
interactive ? "" : "bbr-tooltip__content--noninteractive",
|
|
72
|
-
"has-background-dark",
|
|
73
|
-
"has-text-white",
|
|
74
|
-
contentClassName,
|
|
75
|
-
]);
|
|
76
|
-
return (_jsxs("span", { title: title, onBlur: onBlur, onClick: onClick, onFocus: onFocus, ...dataAttributes, "data-tooltip-id": id, className: rootClassName, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: [children, open && !disabled && !isNullish(content)
|
|
77
|
-
? (_jsx("span", { role: "tooltip", className: contentClassNames, children: content }))
|
|
78
|
-
: null] }));
|
|
79
|
-
};
|
|
80
|
-
export default Tooltip;
|