@homebound/beam 2.73.0 → 2.75.0
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/Css.d.ts +49 -4
- package/dist/Css.js +35 -19
- package/dist/components/Tabs.d.ts +3 -1
- package/dist/components/Tabs.js +9 -6
- package/dist/forms/StaticField.js +4 -1
- package/package.json +1 -1
package/dist/Css.d.ts
CHANGED
|
@@ -496,6 +496,33 @@ declare class CssBuilder<T extends Properties1> {
|
|
|
496
496
|
display(value: Properties["display"]): CssBuilder<T & {
|
|
497
497
|
display: import("csstype").Property.Display | undefined;
|
|
498
498
|
}>;
|
|
499
|
+
get fi(): CssBuilder<T & {
|
|
500
|
+
flex: import("csstype").Property.Flex<0 | (string & {})> | undefined;
|
|
501
|
+
}>;
|
|
502
|
+
get fa(): CssBuilder<T & {
|
|
503
|
+
flex: import("csstype").Property.Flex<0 | (string & {})> | undefined;
|
|
504
|
+
}>;
|
|
505
|
+
get fn(): CssBuilder<T & {
|
|
506
|
+
flex: import("csstype").Property.Flex<0 | (string & {})> | undefined;
|
|
507
|
+
}>;
|
|
508
|
+
get f1(): CssBuilder<T & {
|
|
509
|
+
flex: import("csstype").Property.Flex<0 | (string & {})> | undefined;
|
|
510
|
+
}>;
|
|
511
|
+
get f2(): CssBuilder<T & {
|
|
512
|
+
flex: import("csstype").Property.Flex<0 | (string & {})> | undefined;
|
|
513
|
+
}>;
|
|
514
|
+
get f3(): CssBuilder<T & {
|
|
515
|
+
flex: import("csstype").Property.Flex<0 | (string & {})> | undefined;
|
|
516
|
+
}>;
|
|
517
|
+
get f4(): CssBuilder<T & {
|
|
518
|
+
flex: import("csstype").Property.Flex<0 | (string & {})> | undefined;
|
|
519
|
+
}>;
|
|
520
|
+
get f5(): CssBuilder<T & {
|
|
521
|
+
flex: import("csstype").Property.Flex<0 | (string & {})> | undefined;
|
|
522
|
+
}>;
|
|
523
|
+
f(value: Properties["flex"]): CssBuilder<T & {
|
|
524
|
+
flex: import("csstype").Property.Flex<0 | (string & {})> | undefined;
|
|
525
|
+
}>;
|
|
499
526
|
get jcfs(): CssBuilder<T & {
|
|
500
527
|
justifyContent: import("csstype").Property.JustifyContent | undefined;
|
|
501
528
|
}>;
|
|
@@ -625,13 +652,10 @@ declare class CssBuilder<T extends Properties1> {
|
|
|
625
652
|
get fl(): CssBuilder<T & {
|
|
626
653
|
float: import("csstype").Property.Float | undefined;
|
|
627
654
|
}>;
|
|
628
|
-
get fn(): CssBuilder<T & {
|
|
629
|
-
float: import("csstype").Property.Float | undefined;
|
|
630
|
-
}>;
|
|
631
655
|
get fr(): CssBuilder<T & {
|
|
632
656
|
float: import("csstype").Property.Float | undefined;
|
|
633
657
|
}>;
|
|
634
|
-
|
|
658
|
+
float(value: Properties["float"]): CssBuilder<T & {
|
|
635
659
|
float: import("csstype").Property.Float | undefined;
|
|
636
660
|
}>;
|
|
637
661
|
get normal(): CssBuilder<T & {
|
|
@@ -2514,6 +2538,9 @@ declare class CssBuilder<T extends Properties1> {
|
|
|
2514
2538
|
mw(value: Properties["minWidth"]): CssBuilder<T & {
|
|
2515
2539
|
minWidth: import("csstype").Property.MinWidth<0 | (string & {})> | undefined;
|
|
2516
2540
|
}>;
|
|
2541
|
+
mwPx(px: number): CssBuilder<T & {
|
|
2542
|
+
minWidth: import("csstype").Property.MinWidth<0 | (string & {})> | undefined;
|
|
2543
|
+
}>;
|
|
2517
2544
|
get maxw0(): CssBuilder<T & {
|
|
2518
2545
|
maxWidth: import("csstype").Property.MaxWidth<0 | (string & {})> | undefined;
|
|
2519
2546
|
}>;
|
|
@@ -2532,6 +2559,9 @@ declare class CssBuilder<T extends Properties1> {
|
|
|
2532
2559
|
maxw(value: Properties["maxWidth"]): CssBuilder<T & {
|
|
2533
2560
|
maxWidth: import("csstype").Property.MaxWidth<0 | (string & {})> | undefined;
|
|
2534
2561
|
}>;
|
|
2562
|
+
maxwPx(px: number): CssBuilder<T & {
|
|
2563
|
+
maxWidth: import("csstype").Property.MaxWidth<0 | (string & {})> | undefined;
|
|
2564
|
+
}>;
|
|
2535
2565
|
get w0(): CssBuilder<T & {
|
|
2536
2566
|
width: import("csstype").Property.Width<0 | (string & {})> | undefined;
|
|
2537
2567
|
}>;
|
|
@@ -2565,6 +2595,21 @@ declare class CssBuilder<T extends Properties1> {
|
|
|
2565
2595
|
wPx(px: number): CssBuilder<T & {
|
|
2566
2596
|
width: import("csstype").Property.Width<0 | (string & {})> | undefined;
|
|
2567
2597
|
}>;
|
|
2598
|
+
get breakNormal(): CssBuilder<T & {
|
|
2599
|
+
wordBreak: import("csstype").Property.WordBreak | undefined;
|
|
2600
|
+
}>;
|
|
2601
|
+
get breakAll(): CssBuilder<T & {
|
|
2602
|
+
wordBreak: import("csstype").Property.WordBreak | undefined;
|
|
2603
|
+
}>;
|
|
2604
|
+
get breakKeepAll(): CssBuilder<T & {
|
|
2605
|
+
wordBreak: import("csstype").Property.WordBreak | undefined;
|
|
2606
|
+
}>;
|
|
2607
|
+
get breakWord(): CssBuilder<T & {
|
|
2608
|
+
wordBreak: import("csstype").Property.WordBreak | undefined;
|
|
2609
|
+
}>;
|
|
2610
|
+
wordBreak(value: Properties["wordBreak"]): CssBuilder<T & {
|
|
2611
|
+
wordBreak: import("csstype").Property.WordBreak | undefined;
|
|
2612
|
+
}>;
|
|
2568
2613
|
get z0(): CssBuilder<T & {
|
|
2569
2614
|
zIndex: import("csstype").Property.ZIndex | undefined;
|
|
2570
2615
|
}>;
|
package/dist/Css.js
CHANGED
|
@@ -126,7 +126,7 @@ class CssBuilder {
|
|
|
126
126
|
get top7() { return this.top(7); }
|
|
127
127
|
get top8() { return this.top(8); }
|
|
128
128
|
top(inc) { return this.add("top", maybeInc(inc)); }
|
|
129
|
-
topPx(px) { return this.
|
|
129
|
+
topPx(px) { return this.top(`${px}px`); }
|
|
130
130
|
get right0() { return this.right(0); }
|
|
131
131
|
get right1() { return this.right(1); }
|
|
132
132
|
get right2() { return this.right(2); }
|
|
@@ -137,7 +137,7 @@ class CssBuilder {
|
|
|
137
137
|
get right7() { return this.right(7); }
|
|
138
138
|
get right8() { return this.right(8); }
|
|
139
139
|
right(inc) { return this.add("right", maybeInc(inc)); }
|
|
140
|
-
rightPx(px) { return this.
|
|
140
|
+
rightPx(px) { return this.right(`${px}px`); }
|
|
141
141
|
get bottom0() { return this.bottom(0); }
|
|
142
142
|
get bottom1() { return this.bottom(1); }
|
|
143
143
|
get bottom2() { return this.bottom(2); }
|
|
@@ -148,7 +148,7 @@ class CssBuilder {
|
|
|
148
148
|
get bottom7() { return this.bottom(7); }
|
|
149
149
|
get bottom8() { return this.bottom(8); }
|
|
150
150
|
bottom(inc) { return this.add("bottom", maybeInc(inc)); }
|
|
151
|
-
bottomPx(px) { return this.
|
|
151
|
+
bottomPx(px) { return this.bottom(`${px}px`); }
|
|
152
152
|
get left0() { return this.left(0); }
|
|
153
153
|
get left1() { return this.left(1); }
|
|
154
154
|
get left2() { return this.left(2); }
|
|
@@ -159,7 +159,7 @@ class CssBuilder {
|
|
|
159
159
|
get left7() { return this.left(7); }
|
|
160
160
|
get left8() { return this.left(8); }
|
|
161
161
|
left(inc) { return this.add("left", maybeInc(inc)); }
|
|
162
|
-
leftPx(px) { return this.
|
|
162
|
+
leftPx(px) { return this.left(`${px}px`); }
|
|
163
163
|
// cursor
|
|
164
164
|
get cursorPointer() { return this.add("cursor", "pointer"); }
|
|
165
165
|
get cursorNotAllowed() { return this.add("cursor", "not-allowed"); }
|
|
@@ -180,6 +180,15 @@ class CssBuilder {
|
|
|
180
180
|
get dif() { return this.add("display", "inline-flex"); }
|
|
181
181
|
display(value) { return this.add("display", value); }
|
|
182
182
|
// flexbox
|
|
183
|
+
get fi() { return this.add("flex", "initial"); }
|
|
184
|
+
get fa() { return this.add("flex", "auto"); }
|
|
185
|
+
get fn() { return this.add("flex", "none"); }
|
|
186
|
+
get f1() { return this.add("flex", "1"); }
|
|
187
|
+
get f2() { return this.add("flex", "2"); }
|
|
188
|
+
get f3() { return this.add("flex", "3"); }
|
|
189
|
+
get f4() { return this.add("flex", "4"); }
|
|
190
|
+
get f5() { return this.add("flex", "5"); }
|
|
191
|
+
f(value) { return this.add("flex", value); }
|
|
183
192
|
get jcfs() { return this.add("justifyContent", "flex-start"); }
|
|
184
193
|
get jcfe() { return this.add("justifyContent", "flex-end"); }
|
|
185
194
|
get jcc() { return this.add("justifyContent", "center"); }
|
|
@@ -224,9 +233,8 @@ class CssBuilder {
|
|
|
224
233
|
fd(value) { return this.add("flexDirection", value); }
|
|
225
234
|
// float
|
|
226
235
|
get fl() { return this.add("float", "left"); }
|
|
227
|
-
get fn() { return this.add("float", "none"); }
|
|
228
236
|
get fr() { return this.add("float", "right"); }
|
|
229
|
-
|
|
237
|
+
float(value) { return this.add("float", value); }
|
|
230
238
|
// fontWeight
|
|
231
239
|
get normal() { return this.add("fontWeight", "normal"); }
|
|
232
240
|
get b() { return this.add("fontWeight", "bold"); }
|
|
@@ -255,7 +263,7 @@ class CssBuilder {
|
|
|
255
263
|
get gap7() { return this.gap(7); }
|
|
256
264
|
get gap8() { return this.gap(8); }
|
|
257
265
|
gap(inc) { return this.add("gap", maybeInc(inc)); }
|
|
258
|
-
gapPx(px) { return this.
|
|
266
|
+
gapPx(px) { return this.gap(`${px}px`); }
|
|
259
267
|
get rg0() { return this.rg(0); }
|
|
260
268
|
get rg1() { return this.rg(1); }
|
|
261
269
|
get rg2() { return this.rg(2); }
|
|
@@ -266,7 +274,7 @@ class CssBuilder {
|
|
|
266
274
|
get rg7() { return this.rg(7); }
|
|
267
275
|
get rg8() { return this.rg(8); }
|
|
268
276
|
rg(inc) { return this.add("rowGap", maybeInc(inc)); }
|
|
269
|
-
rgPx(px) { return this.
|
|
277
|
+
rgPx(px) { return this.rg(`${px}px`); }
|
|
270
278
|
get cg0() { return this.cg(0); }
|
|
271
279
|
get cg1() { return this.cg(1); }
|
|
272
280
|
get cg2() { return this.cg(2); }
|
|
@@ -277,7 +285,7 @@ class CssBuilder {
|
|
|
277
285
|
get cg7() { return this.cg(7); }
|
|
278
286
|
get cg8() { return this.cg(8); }
|
|
279
287
|
cg(inc) { return this.add("columnGap", maybeInc(inc)); }
|
|
280
|
-
cgPx(px) { return this.
|
|
288
|
+
cgPx(px) { return this.cg(`${px}px`); }
|
|
281
289
|
// height
|
|
282
290
|
get h0() { return this.h(0); }
|
|
283
291
|
get h1() { return this.h(1); }
|
|
@@ -289,7 +297,7 @@ class CssBuilder {
|
|
|
289
297
|
get h7() { return this.h(7); }
|
|
290
298
|
get h8() { return this.h(8); }
|
|
291
299
|
h(inc) { return this.add("height", maybeInc(inc)); }
|
|
292
|
-
hPx(px) { return this.
|
|
300
|
+
hPx(px) { return this.h(`${px}px`); }
|
|
293
301
|
get h25() { return this.add("height", "25%"); }
|
|
294
302
|
get h50() { return this.add("height", "50%"); }
|
|
295
303
|
get h75() { return this.add("height", "75%"); }
|
|
@@ -549,7 +557,7 @@ class CssBuilder {
|
|
|
549
557
|
get mt7() { return this.mt(7); }
|
|
550
558
|
get mt8() { return this.mt(8); }
|
|
551
559
|
mt(inc) { return this.add("marginTop", maybeInc(inc)); }
|
|
552
|
-
mtPx(px) { return this.
|
|
560
|
+
mtPx(px) { return this.mt(`${px}px`); }
|
|
553
561
|
get mr0() { return this.mr(0); }
|
|
554
562
|
get mr1() { return this.mr(1); }
|
|
555
563
|
get mr2() { return this.mr(2); }
|
|
@@ -560,7 +568,7 @@ class CssBuilder {
|
|
|
560
568
|
get mr7() { return this.mr(7); }
|
|
561
569
|
get mr8() { return this.mr(8); }
|
|
562
570
|
mr(inc) { return this.add("marginRight", maybeInc(inc)); }
|
|
563
|
-
mrPx(px) { return this.
|
|
571
|
+
mrPx(px) { return this.mr(`${px}px`); }
|
|
564
572
|
get mb0() { return this.mb(0); }
|
|
565
573
|
get mb1() { return this.mb(1); }
|
|
566
574
|
get mb2() { return this.mb(2); }
|
|
@@ -571,7 +579,7 @@ class CssBuilder {
|
|
|
571
579
|
get mb7() { return this.mb(7); }
|
|
572
580
|
get mb8() { return this.mb(8); }
|
|
573
581
|
mb(inc) { return this.add("marginBottom", maybeInc(inc)); }
|
|
574
|
-
mbPx(px) { return this.
|
|
582
|
+
mbPx(px) { return this.mb(`${px}px`); }
|
|
575
583
|
get ml0() { return this.ml(0); }
|
|
576
584
|
get ml1() { return this.ml(1); }
|
|
577
585
|
get ml2() { return this.ml(2); }
|
|
@@ -582,7 +590,7 @@ class CssBuilder {
|
|
|
582
590
|
get ml7() { return this.ml(7); }
|
|
583
591
|
get ml8() { return this.ml(8); }
|
|
584
592
|
ml(inc) { return this.add("marginLeft", maybeInc(inc)); }
|
|
585
|
-
mlPx(px) { return this.
|
|
593
|
+
mlPx(px) { return this.ml(`${px}px`); }
|
|
586
594
|
get mx0() { return this.mx(0); }
|
|
587
595
|
get mx1() { return this.mx(1); }
|
|
588
596
|
get mx2() { return this.mx(2); }
|
|
@@ -626,7 +634,7 @@ class CssBuilder {
|
|
|
626
634
|
get pt7() { return this.pt(7); }
|
|
627
635
|
get pt8() { return this.pt(8); }
|
|
628
636
|
pt(inc) { return this.add("paddingTop", maybeInc(inc)); }
|
|
629
|
-
ptPx(px) { return this.
|
|
637
|
+
ptPx(px) { return this.pt(`${px}px`); }
|
|
630
638
|
get pr0() { return this.pr(0); }
|
|
631
639
|
get pr1() { return this.pr(1); }
|
|
632
640
|
get pr2() { return this.pr(2); }
|
|
@@ -637,7 +645,7 @@ class CssBuilder {
|
|
|
637
645
|
get pr7() { return this.pr(7); }
|
|
638
646
|
get pr8() { return this.pr(8); }
|
|
639
647
|
pr(inc) { return this.add("paddingRight", maybeInc(inc)); }
|
|
640
|
-
prPx(px) { return this.
|
|
648
|
+
prPx(px) { return this.pr(`${px}px`); }
|
|
641
649
|
get pb0() { return this.pb(0); }
|
|
642
650
|
get pb1() { return this.pb(1); }
|
|
643
651
|
get pb2() { return this.pb(2); }
|
|
@@ -648,7 +656,7 @@ class CssBuilder {
|
|
|
648
656
|
get pb7() { return this.pb(7); }
|
|
649
657
|
get pb8() { return this.pb(8); }
|
|
650
658
|
pb(inc) { return this.add("paddingBottom", maybeInc(inc)); }
|
|
651
|
-
pbPx(px) { return this.
|
|
659
|
+
pbPx(px) { return this.pb(`${px}px`); }
|
|
652
660
|
get pl0() { return this.pl(0); }
|
|
653
661
|
get pl1() { return this.pl(1); }
|
|
654
662
|
get pl2() { return this.pl(2); }
|
|
@@ -659,7 +667,7 @@ class CssBuilder {
|
|
|
659
667
|
get pl7() { return this.pl(7); }
|
|
660
668
|
get pl8() { return this.pl(8); }
|
|
661
669
|
pl(inc) { return this.add("paddingLeft", maybeInc(inc)); }
|
|
662
|
-
plPx(px) { return this.
|
|
670
|
+
plPx(px) { return this.pl(`${px}px`); }
|
|
663
671
|
get px0() { return this.px(0); }
|
|
664
672
|
get px1() { return this.px(1); }
|
|
665
673
|
get px2() { return this.px(2); }
|
|
@@ -770,12 +778,14 @@ class CssBuilder {
|
|
|
770
778
|
get mw75() { return this.add("minWidth", "75%"); }
|
|
771
779
|
get mw100() { return this.add("minWidth", "100%"); }
|
|
772
780
|
mw(value) { return this.add("minWidth", value); }
|
|
781
|
+
mwPx(px) { return this.mw(`${px}px`); }
|
|
773
782
|
get maxw0() { return this.add("maxWidth", "0"); }
|
|
774
783
|
get maxw25() { return this.add("maxWidth", "25%"); }
|
|
775
784
|
get maxw50() { return this.add("maxWidth", "50%"); }
|
|
776
785
|
get maxw75() { return this.add("maxWidth", "75%"); }
|
|
777
786
|
get maxw100() { return this.add("maxWidth", "100%"); }
|
|
778
787
|
maxw(value) { return this.add("maxWidth", value); }
|
|
788
|
+
maxwPx(px) { return this.maxw(`${px}px`); }
|
|
779
789
|
get w0() { return this.w(0); }
|
|
780
790
|
get w1() { return this.w(1); }
|
|
781
791
|
get w2() { return this.w(2); }
|
|
@@ -786,7 +796,13 @@ class CssBuilder {
|
|
|
786
796
|
get w7() { return this.w(7); }
|
|
787
797
|
get w8() { return this.w(8); }
|
|
788
798
|
w(inc) { return this.add("width", maybeInc(inc)); }
|
|
789
|
-
wPx(px) { return this.
|
|
799
|
+
wPx(px) { return this.w(`${px}px`); }
|
|
800
|
+
// wordBreak
|
|
801
|
+
get breakNormal() { return this.add("wordBreak", "normal"); }
|
|
802
|
+
get breakAll() { return this.add("wordBreak", "break-all"); }
|
|
803
|
+
get breakKeepAll() { return this.add("wordBreak", "keep-all"); }
|
|
804
|
+
get breakWord() { return this.add("wordBreak", "break-word"); }
|
|
805
|
+
wordBreak(value) { return this.add("wordBreak", value); }
|
|
790
806
|
// zIndex
|
|
791
807
|
get z0() { return this.add("zIndex", 0); }
|
|
792
808
|
get z1() { return this.add("zIndex", 1); }
|
|
@@ -5,6 +5,7 @@ export interface Tab<V extends string = string> {
|
|
|
5
5
|
name: string;
|
|
6
6
|
value: V;
|
|
7
7
|
icon?: IconKey;
|
|
8
|
+
endAdornment?: ReactNode;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
render: () => ReactNode;
|
|
10
11
|
}
|
|
@@ -15,11 +16,12 @@ export interface TabsProps<V extends string, X> {
|
|
|
15
16
|
tabs: Tab<V>[];
|
|
16
17
|
onChange: (value: V) => void;
|
|
17
18
|
contentXss?: X;
|
|
19
|
+
alwaysShowAllTabs?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export interface RouteTabsProps<V extends string, X> extends Omit<TabsProps<V, X>, "onChange" | "selected" | "tabs"> {
|
|
20
22
|
tabs: RouteTab<V>[];
|
|
21
23
|
}
|
|
22
|
-
export interface RouteTab<V extends string> extends Omit<Tab<V>, "value"> {
|
|
24
|
+
export interface RouteTab<V extends string = string> extends Omit<Tab<V>, "value"> {
|
|
23
25
|
href: V;
|
|
24
26
|
path: string | string[];
|
|
25
27
|
}
|
package/dist/components/Tabs.js
CHANGED
|
@@ -21,8 +21,11 @@ const Icon_1 = require("./Icon");
|
|
|
21
21
|
* and `TabContent` components directly.
|
|
22
22
|
*/
|
|
23
23
|
function TabsWithContent(props) {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
// Hide the tabs if only one tab is enabled, and `alwaysShowAllTabs` is not true
|
|
25
|
+
const hideTabs = props.alwaysShowAllTabs
|
|
26
|
+
? false
|
|
27
|
+
: props.tabs.filter((t) => !t.disabled).length === 1;
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!hideTabs && (0, jsx_runtime_1.jsx)(Tabs, Object.assign({}, props), void 0), (0, jsx_runtime_1.jsx)(TabContent, Object.assign({}, props), void 0)] }, void 0));
|
|
26
29
|
}
|
|
27
30
|
exports.TabsWithContent = TabsWithContent;
|
|
28
31
|
function TabContent(props) {
|
|
@@ -76,8 +79,8 @@ function Tabs(props) {
|
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
// We also check this in TabsWithContent, but if someone is using Tabs standalone, check it here as well
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
82
|
+
const hideTabs = props.alwaysShowAllTabs ? false : props.tabs.filter((t) => !t.disabled).length === 1;
|
|
83
|
+
if (hideTabs) {
|
|
81
84
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}, void 0);
|
|
82
85
|
}
|
|
83
86
|
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, css: Css_1.Css.dif.childGap1.$, "aria-label": ariaLabel, role: "tablist" }, tid, { children: tabs.map((tab) => {
|
|
@@ -88,7 +91,7 @@ function Tabs(props) {
|
|
|
88
91
|
exports.Tabs = Tabs;
|
|
89
92
|
function TabImpl(props) {
|
|
90
93
|
const { tab, onClick, active, onKeyUp, onBlur, focusProps, isFocusVisible = false, ...others } = props;
|
|
91
|
-
const { disabled: isDisabled = false, name: label, icon } = tab;
|
|
94
|
+
const { disabled: isDisabled = false, name: label, icon, endAdornment } = tab;
|
|
92
95
|
const { hoverProps, isHovered } = (0, react_aria_1.useHover)({ isDisabled });
|
|
93
96
|
const { baseStyles, activeStyles, focusRingStyles, hoverStyles, disabledStyles, activeHoverStyles } = (0, react_1.useMemo)(() => getTabStyles(), []);
|
|
94
97
|
const uniqueValue = uniqueTabValue(tab);
|
|
@@ -114,7 +117,7 @@ function TabImpl(props) {
|
|
|
114
117
|
onBlur,
|
|
115
118
|
...(isRouteTab(tab) ? {} : { onClick: () => onClick(tab.value) }),
|
|
116
119
|
});
|
|
117
|
-
const tabLabel = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [label, icon && (
|
|
120
|
+
const tabLabel = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [label, (icon || endAdornment) && (0, jsx_runtime_1.jsx)("span", Object.assign({ css: Css_1.Css.ml1.$ }, { children: icon ? (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: icon }, void 0) : endAdornment }), void 0)] }, void 0));
|
|
118
121
|
return isDisabled ? ((0, jsx_runtime_1.jsx)("div", Object.assign({}, tabProps, { children: tabLabel }), void 0)) : isRouteTab(tab) ? ((0, jsx_runtime_1.jsx)(react_router_dom_1.Link, Object.assign({}, { ...tabProps, ...interactiveProps }, { className: "navLink", to: tab.href }, { children: tabLabel }), void 0)) : ((0, jsx_runtime_1.jsx)("button", Object.assign({}, { ...tabProps, ...interactiveProps }, { children: tabLabel }), void 0));
|
|
119
122
|
}
|
|
120
123
|
function getTabStyles() {
|
|
@@ -3,8 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StaticField = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
5
|
const Css_1 = require("../Css");
|
|
6
|
+
const defaultTestId_1 = require("../utils/defaultTestId");
|
|
7
|
+
const useTestIds_1 = require("../utils/useTestIds");
|
|
6
8
|
function StaticField(props) {
|
|
7
9
|
const { label, value, children } = props;
|
|
8
|
-
|
|
10
|
+
const tid = (0, useTestIds_1.useTestIds)(props, (0, defaultTestId_1.defaultTestId)(label));
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("label", Object.assign({ css: Css_1.Css.db.sm.gray700.mbPx(4).$ }, { children: label }), void 0), (0, jsx_runtime_1.jsx)("div", Object.assign({ css: Css_1.Css.sm.gray900.mh((0, Css_1.px)(40)).df.aic.$ }, tid, { children: value || children }), void 0)] }, void 0));
|
|
9
12
|
}
|
|
10
13
|
exports.StaticField = StaticField;
|