@allxsmith/bestax-bulma 1.1.1 → 2.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.
- package/dist/index.cjs.js +1070 -331
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1064 -333
- package/dist/index.esm.js.map +1 -1
- package/dist/types/elements/Box.d.ts +1 -0
- package/dist/types/helpers/Config.d.ts +12 -0
- package/dist/types/helpers/Theme.d.ts +49 -0
- package/dist/types/helpers/classNames.d.ts +3 -0
- package/dist/types/helpers/useBulmaClasses.d.ts +7 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/layout/Media.d.ts +8 -6
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo, useState, useRef, useEffect,
|
|
1
|
+
import React, { createContext, useContext, useMemo, useState, useRef, useEffect, forwardRef } from 'react';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = {exports: {}};
|
|
4
4
|
|
|
@@ -427,6 +427,20 @@ function requireJsxRuntime () {
|
|
|
427
427
|
|
|
428
428
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
429
429
|
|
|
430
|
+
const ConfigContext = createContext({});
|
|
431
|
+
const useConfig = () => useContext(ConfigContext);
|
|
432
|
+
const ConfigProvider = ({ classPrefix, children, }) => {
|
|
433
|
+
return (jsxRuntimeExports.jsx(ConfigContext.Provider, { value: { classPrefix }, children: children }));
|
|
434
|
+
};
|
|
435
|
+
const useClassPrefix = () => {
|
|
436
|
+
const { classPrefix } = useConfig();
|
|
437
|
+
return classPrefix || '';
|
|
438
|
+
};
|
|
439
|
+
const usePrefixedClass = () => {
|
|
440
|
+
const { classPrefix } = useConfig();
|
|
441
|
+
return (className) => classPrefix ? `${classPrefix}${className}` : className;
|
|
442
|
+
};
|
|
443
|
+
|
|
430
444
|
function classNames(...args) {
|
|
431
445
|
const classSet = new Set();
|
|
432
446
|
function process(item) {
|
|
@@ -459,6 +473,55 @@ function classNames(...args) {
|
|
|
459
473
|
}
|
|
460
474
|
return Array.from(classSet).join(' ');
|
|
461
475
|
}
|
|
476
|
+
function createPrefixedClassNames(classPrefix) {
|
|
477
|
+
return function prefixedClassNames(...args) {
|
|
478
|
+
const classSet = new Set();
|
|
479
|
+
function process(item) {
|
|
480
|
+
if (item === undefined ||
|
|
481
|
+
item === null ||
|
|
482
|
+
item === false ||
|
|
483
|
+
item === '') {
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
if (typeof item === 'string' || typeof item === 'number') {
|
|
487
|
+
for (const cls of String(item).split(/\s+/)) {
|
|
488
|
+
if (cls) {
|
|
489
|
+
classSet.add(`${classPrefix}${cls}`);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
else if (Array.isArray(item)) {
|
|
494
|
+
for (const sub of item)
|
|
495
|
+
process(sub);
|
|
496
|
+
}
|
|
497
|
+
else if (typeof item === 'object') {
|
|
498
|
+
for (const key in item) {
|
|
499
|
+
if (Object.prototype.hasOwnProperty.call(item, key) && item[key]) {
|
|
500
|
+
for (const cls of key.split(/\s+/)) {
|
|
501
|
+
if (cls) {
|
|
502
|
+
classSet.add(`${classPrefix}${cls}`);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
for (const arg of args) {
|
|
510
|
+
process(arg);
|
|
511
|
+
}
|
|
512
|
+
return Array.from(classSet).join(' ');
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
function prefixedClassNames(prefix, ...args) {
|
|
516
|
+
if (!prefix) {
|
|
517
|
+
return classNames(...args);
|
|
518
|
+
}
|
|
519
|
+
return createPrefixedClassNames(prefix)(...args);
|
|
520
|
+
}
|
|
521
|
+
function usePrefixedClassNames(...args) {
|
|
522
|
+
const { classPrefix } = useConfig();
|
|
523
|
+
return prefixedClassNames(classPrefix, ...args);
|
|
524
|
+
}
|
|
462
525
|
|
|
463
526
|
const validColors = [
|
|
464
527
|
'primary',
|
|
@@ -583,7 +646,7 @@ const validAlignSelfs = [
|
|
|
583
646
|
'baseline',
|
|
584
647
|
'stretch',
|
|
585
648
|
];
|
|
586
|
-
const validFlexGrowShrink = ['0', '1'];
|
|
649
|
+
const validFlexGrowShrink = ['0', '1', '2', '3', '4', '5'];
|
|
587
650
|
const validViewports = [
|
|
588
651
|
'mobile',
|
|
589
652
|
'tablet',
|
|
@@ -592,15 +655,19 @@ const validViewports = [
|
|
|
592
655
|
'fullhd',
|
|
593
656
|
];
|
|
594
657
|
const useBulmaClasses = (props) => {
|
|
595
|
-
const {
|
|
658
|
+
const { classPrefix } = useConfig();
|
|
659
|
+
const { color, backgroundColor, colorShade, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, textSize, textAlign, textTransform, textWeight, fontFamily, display, visibility, flexDirection, flexWrap, justifyContent, alignContent, alignItems, alignSelf, flexGrow, flexShrink, float, overflow, overlay, interaction, radius, shadow, responsive, viewport, displayMobile, displayTablet, displayDesktop, displayWidescreen, displayFullhd, skeleton, ...rest } = props;
|
|
596
660
|
const bulmaHelperClasses = useMemo(() => {
|
|
597
661
|
const classes = [];
|
|
662
|
+
const addPrefixedClass = (className) => {
|
|
663
|
+
classes.push(classPrefix ? `${classPrefix}${className}` : className);
|
|
664
|
+
};
|
|
598
665
|
const addClass = (prefix, value, validValues) => {
|
|
599
666
|
if (value && (!validValues.length || validValues.includes(value))) {
|
|
600
667
|
const className = viewport && validViewports.includes(viewport)
|
|
601
668
|
? `${prefix}-${value}-${viewport}`
|
|
602
669
|
: `${prefix}-${value}`;
|
|
603
|
-
|
|
670
|
+
addPrefixedClass(className);
|
|
604
671
|
}
|
|
605
672
|
};
|
|
606
673
|
const addColorClass = (prefix, value, shade) => {
|
|
@@ -610,7 +677,7 @@ const useBulmaClasses = (props) => {
|
|
|
610
677
|
const className = prefix === 'has-text' && viewport && validViewports.includes(viewport)
|
|
611
678
|
? `${prefix}-${value}-${shade}-${viewport}`
|
|
612
679
|
: `${prefix}-${value}-${shade}`;
|
|
613
|
-
|
|
680
|
+
addPrefixedClass(className);
|
|
614
681
|
}
|
|
615
682
|
else {
|
|
616
683
|
addClass(prefix, value, [...validColors, 'inherit', 'current']);
|
|
@@ -637,18 +704,62 @@ const useBulmaClasses = (props) => {
|
|
|
637
704
|
addClass('is', textTransform, validTextTransforms);
|
|
638
705
|
addClass('has-text-weight', textWeight, validTextWeights);
|
|
639
706
|
addClass('is-family', fontFamily, validFontFamilies);
|
|
640
|
-
|
|
707
|
+
const addDisplayClass = (displayValue, viewportSuffix) => {
|
|
708
|
+
if (displayValue) {
|
|
709
|
+
if (displayValue === 'none') {
|
|
710
|
+
addPrefixedClass(`is-hidden${viewportSuffix}`);
|
|
711
|
+
}
|
|
712
|
+
else if (validDisplays.includes(displayValue)) {
|
|
713
|
+
addPrefixedClass(`is-${displayValue}${viewportSuffix}`);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
};
|
|
717
|
+
addDisplayClass(displayMobile, '-mobile');
|
|
718
|
+
addDisplayClass(displayTablet, '-tablet');
|
|
719
|
+
addDisplayClass(displayDesktop, '-desktop');
|
|
720
|
+
addDisplayClass(displayWidescreen, '-widescreen');
|
|
721
|
+
addDisplayClass(displayFullhd, '-fullhd');
|
|
722
|
+
const hasViewportSpecificDisplay = !!(displayMobile ||
|
|
723
|
+
displayTablet ||
|
|
724
|
+
displayDesktop ||
|
|
725
|
+
displayWidescreen ||
|
|
726
|
+
displayFullhd);
|
|
727
|
+
if (!hasViewportSpecificDisplay) {
|
|
728
|
+
if (display === 'none') {
|
|
729
|
+
if (viewport && validViewports.includes(viewport)) {
|
|
730
|
+
addPrefixedClass(`is-hidden-${viewport}`);
|
|
731
|
+
}
|
|
732
|
+
else {
|
|
733
|
+
addPrefixedClass('is-hidden');
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
else {
|
|
737
|
+
addClass('is', display, [...validDisplays]);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
641
740
|
if (visibility) {
|
|
642
741
|
if (visibility === 'hidden' &&
|
|
643
742
|
viewport &&
|
|
644
743
|
validViewports.includes(viewport)) {
|
|
645
|
-
|
|
744
|
+
addPrefixedClass(`is-hidden-${viewport}`);
|
|
646
745
|
}
|
|
647
746
|
else if (validVisibilities.includes(visibility)) {
|
|
648
|
-
|
|
747
|
+
addPrefixedClass(`is-${visibility}`);
|
|
649
748
|
}
|
|
650
749
|
}
|
|
651
|
-
|
|
750
|
+
const hasFlexDisplay = display === 'flex' ||
|
|
751
|
+
display === 'inline-flex' ||
|
|
752
|
+
displayMobile === 'flex' ||
|
|
753
|
+
displayMobile === 'inline-flex' ||
|
|
754
|
+
displayTablet === 'flex' ||
|
|
755
|
+
displayTablet === 'inline-flex' ||
|
|
756
|
+
displayDesktop === 'flex' ||
|
|
757
|
+
displayDesktop === 'inline-flex' ||
|
|
758
|
+
displayWidescreen === 'flex' ||
|
|
759
|
+
displayWidescreen === 'inline-flex' ||
|
|
760
|
+
displayFullhd === 'flex' ||
|
|
761
|
+
displayFullhd === 'inline-flex';
|
|
762
|
+
if (hasFlexDisplay) {
|
|
652
763
|
addClass('is-flex-direction', flexDirection, validFlexDirections);
|
|
653
764
|
addClass('is-flex-wrap', flexWrap, validFlexWraps);
|
|
654
765
|
addClass('is-justify-content', justifyContent, validJustifyContents);
|
|
@@ -665,7 +776,7 @@ const useBulmaClasses = (props) => {
|
|
|
665
776
|
addClass('is', overflow, ['clipped']);
|
|
666
777
|
}
|
|
667
778
|
if (overlay) {
|
|
668
|
-
|
|
779
|
+
addPrefixedClass('is-overlay');
|
|
669
780
|
}
|
|
670
781
|
if (interaction) {
|
|
671
782
|
addClass('is', interaction, ['unselectable', 'clickable']);
|
|
@@ -680,10 +791,11 @@ const useBulmaClasses = (props) => {
|
|
|
680
791
|
addClass('is', responsive, ['mobile', 'narrow']);
|
|
681
792
|
}
|
|
682
793
|
if (skeleton) {
|
|
683
|
-
|
|
794
|
+
addPrefixedClass('is-skeleton');
|
|
684
795
|
}
|
|
685
796
|
return classNames(classes);
|
|
686
797
|
}, [
|
|
798
|
+
classPrefix,
|
|
687
799
|
color,
|
|
688
800
|
backgroundColor,
|
|
689
801
|
colorShade,
|
|
@@ -724,134 +836,70 @@ const useBulmaClasses = (props) => {
|
|
|
724
836
|
shadow,
|
|
725
837
|
responsive,
|
|
726
838
|
viewport,
|
|
839
|
+
displayMobile,
|
|
840
|
+
displayTablet,
|
|
841
|
+
displayDesktop,
|
|
842
|
+
displayWidescreen,
|
|
843
|
+
displayFullhd,
|
|
727
844
|
skeleton,
|
|
728
845
|
]);
|
|
729
846
|
return { bulmaHelperClasses, rest };
|
|
730
847
|
};
|
|
731
848
|
|
|
732
|
-
|
|
733
|
-
const classList = [];
|
|
734
|
-
const sizeProps = [
|
|
735
|
-
{ prop: 'size', prefix: 'is', suffix: '' },
|
|
736
|
-
{ prop: 'sizeMobile', prefix: 'is', suffix: 'mobile' },
|
|
737
|
-
{ prop: 'sizeTablet', prefix: 'is', suffix: 'tablet' },
|
|
738
|
-
{ prop: 'sizeDesktop', prefix: 'is', suffix: 'desktop' },
|
|
739
|
-
{ prop: 'sizeWidescreen', prefix: 'is', suffix: 'widescreen' },
|
|
740
|
-
{ prop: 'sizeFullhd', prefix: 'is', suffix: 'fullhd' },
|
|
741
|
-
];
|
|
742
|
-
for (const { prop, prefix, suffix } of sizeProps) {
|
|
743
|
-
const val = props[prop];
|
|
744
|
-
if (val !== undefined && val !== null) {
|
|
745
|
-
let className = `${prefix}-${val}`;
|
|
746
|
-
if (suffix)
|
|
747
|
-
className += `-${suffix}`;
|
|
748
|
-
classList.push(className);
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
const offsetProps = [
|
|
752
|
-
{ prop: 'offset', prefix: 'is-offset', suffix: '' },
|
|
753
|
-
{ prop: 'offsetMobile', prefix: 'is-offset', suffix: 'mobile' },
|
|
754
|
-
{ prop: 'offsetTablet', prefix: 'is-offset', suffix: 'tablet' },
|
|
755
|
-
{ prop: 'offsetDesktop', prefix: 'is-offset', suffix: 'desktop' },
|
|
756
|
-
{ prop: 'offsetWidescreen', prefix: 'is-offset', suffix: 'widescreen' },
|
|
757
|
-
{ prop: 'offsetFullhd', prefix: 'is-offset', suffix: 'fullhd' },
|
|
758
|
-
];
|
|
759
|
-
for (const { prop, prefix, suffix } of offsetProps) {
|
|
760
|
-
const val = props[prop];
|
|
761
|
-
if (val !== undefined && val !== null) {
|
|
762
|
-
let className = `${prefix}-${val}`;
|
|
763
|
-
if (suffix)
|
|
764
|
-
className += `-${suffix}`;
|
|
765
|
-
classList.push(className);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
if (props.isNarrow)
|
|
769
|
-
classList.push('is-narrow');
|
|
770
|
-
if (props.isNarrowMobile)
|
|
771
|
-
classList.push('is-narrow-mobile');
|
|
772
|
-
if (props.isNarrowTablet)
|
|
773
|
-
classList.push('is-narrow-tablet');
|
|
774
|
-
if (props.isNarrowTouch)
|
|
775
|
-
classList.push('is-narrow-touch');
|
|
776
|
-
if (props.isNarrowDesktop)
|
|
777
|
-
classList.push('is-narrow-desktop');
|
|
778
|
-
if (props.isNarrowWidescreen)
|
|
779
|
-
classList.push('is-narrow-widescreen');
|
|
780
|
-
if (props.isNarrowFullhd)
|
|
781
|
-
classList.push('is-narrow-fullhd');
|
|
782
|
-
return classList;
|
|
783
|
-
}
|
|
784
|
-
const Column = ({ className, textColor, bgColor, size, sizeMobile, sizeTablet, sizeDesktop, sizeWidescreen, sizeFullhd, offset, offsetMobile, offsetTablet, offsetDesktop, offsetWidescreen, offsetFullhd, isNarrow, isNarrowMobile, isNarrowTablet, isNarrowTouch, isNarrowDesktop, isNarrowWidescreen, isNarrowFullhd, children, ...props }) => {
|
|
849
|
+
const Column = ({ className, textColor, color: _fieldColor, bgColor, size, sizeMobile, sizeTablet, sizeDesktop, sizeWidescreen, sizeFullhd, offset, offsetMobile, offsetTablet, offsetDesktop, offsetWidescreen, offsetFullhd, isNarrow, isNarrowMobile, isNarrowTablet, isNarrowTouch, isNarrowDesktop, isNarrowWidescreen, isNarrowFullhd, children, ...props }) => {
|
|
785
850
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
786
851
|
color: textColor,
|
|
787
852
|
backgroundColor: bgColor,
|
|
788
853
|
...props,
|
|
789
854
|
});
|
|
790
|
-
const
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
855
|
+
const mainClass = usePrefixedClassNames('column');
|
|
856
|
+
const columnSpecificClasses = usePrefixedClassNames('', {
|
|
857
|
+
[`is-${size}`]: size !== undefined && size !== null,
|
|
858
|
+
[`is-${sizeMobile}-mobile`]: sizeMobile !== undefined && sizeMobile !== null,
|
|
859
|
+
[`is-${sizeTablet}-tablet`]: sizeTablet !== undefined && sizeTablet !== null,
|
|
860
|
+
[`is-${sizeDesktop}-desktop`]: sizeDesktop !== undefined && sizeDesktop !== null,
|
|
861
|
+
[`is-${sizeWidescreen}-widescreen`]: sizeWidescreen !== undefined && sizeWidescreen !== null,
|
|
862
|
+
[`is-${sizeFullhd}-fullhd`]: sizeFullhd !== undefined && sizeFullhd !== null,
|
|
863
|
+
[`is-offset-${offset}`]: offset !== undefined && offset !== null,
|
|
864
|
+
[`is-offset-${offsetMobile}-mobile`]: offsetMobile !== undefined && offsetMobile !== null,
|
|
865
|
+
[`is-offset-${offsetTablet}-tablet`]: offsetTablet !== undefined && offsetTablet !== null,
|
|
866
|
+
[`is-offset-${offsetDesktop}-desktop`]: offsetDesktop !== undefined && offsetDesktop !== null,
|
|
867
|
+
[`is-offset-${offsetWidescreen}-widescreen`]: offsetWidescreen !== undefined && offsetWidescreen !== null,
|
|
868
|
+
[`is-offset-${offsetFullhd}-fullhd`]: offsetFullhd !== undefined && offsetFullhd !== null,
|
|
869
|
+
'is-narrow': !!isNarrow,
|
|
870
|
+
'is-narrow-mobile': !!isNarrowMobile,
|
|
871
|
+
'is-narrow-tablet': !!isNarrowTablet,
|
|
872
|
+
'is-narrow-touch': !!isNarrowTouch,
|
|
873
|
+
'is-narrow-desktop': !!isNarrowDesktop,
|
|
874
|
+
'is-narrow-widescreen': !!isNarrowWidescreen,
|
|
875
|
+
'is-narrow-fullhd': !!isNarrowFullhd,
|
|
876
|
+
});
|
|
877
|
+
const columnClasses = classNames(mainClass, columnSpecificClasses, className, bulmaHelperClasses);
|
|
811
878
|
return (jsxRuntimeExports.jsx("div", { className: columnClasses, ...rest, children: children }));
|
|
812
879
|
};
|
|
813
880
|
|
|
814
|
-
|
|
815
|
-
const gapClassMap = [
|
|
816
|
-
{ prop: 'gapSize', prefix: 'is' },
|
|
817
|
-
{ prop: 'gapSizeMobile', prefix: 'is', suffix: 'mobile' },
|
|
818
|
-
{ prop: 'gapSizeTablet', prefix: 'is', suffix: 'tablet' },
|
|
819
|
-
{ prop: 'gapSizeDesktop', prefix: 'is', suffix: 'desktop' },
|
|
820
|
-
{ prop: 'gapSizeWidescreen', prefix: 'is', suffix: 'widescreen' },
|
|
821
|
-
{ prop: 'gapSizeFullhd', prefix: 'is', suffix: 'fullhd' },
|
|
822
|
-
];
|
|
823
|
-
return gapClassMap.flatMap(({ prop, prefix, suffix }) => {
|
|
824
|
-
const val = props[prop];
|
|
825
|
-
if (val !== undefined && val !== null) {
|
|
826
|
-
let className = `${prefix}-${val}`;
|
|
827
|
-
if (suffix)
|
|
828
|
-
className += `-${suffix}`;
|
|
829
|
-
return [className];
|
|
830
|
-
}
|
|
831
|
-
return [];
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
const Columns = ({ className, textColor, bgColor, isCentered, isGapless, isMultiline, isVCentered, isMobile, isDesktop, gapSize, gapSizeMobile, gapSizeTablet, gapSizeDesktop, gapSizeWidescreen, gapSizeFullhd, children, ...props }) => {
|
|
881
|
+
const Columns = ({ className, textColor, color: _fieldColor, bgColor, isCentered, isGapless, isMultiline, isVCentered, isMobile, isDesktop, gapSize, gapSizeMobile, gapSizeTablet, gapSizeDesktop, gapSizeWidescreen, gapSizeFullhd, children, ...props }) => {
|
|
835
882
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
836
883
|
color: textColor,
|
|
837
884
|
backgroundColor: bgColor,
|
|
838
885
|
...props,
|
|
839
886
|
});
|
|
840
|
-
const
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
})
|
|
887
|
+
const mainClass = usePrefixedClassNames('columns');
|
|
888
|
+
const gapClasses = usePrefixedClassNames('', {
|
|
889
|
+
[`is-${gapSize}`]: gapSize !== undefined && gapSize !== null,
|
|
890
|
+
[`is-${gapSizeMobile}-mobile`]: gapSizeMobile !== undefined && gapSizeMobile !== null,
|
|
891
|
+
[`is-${gapSizeTablet}-tablet`]: gapSizeTablet !== undefined && gapSizeTablet !== null,
|
|
892
|
+
[`is-${gapSizeDesktop}-desktop`]: gapSizeDesktop !== undefined && gapSizeDesktop !== null,
|
|
893
|
+
[`is-${gapSizeWidescreen}-widescreen`]: gapSizeWidescreen !== undefined && gapSizeWidescreen !== null,
|
|
894
|
+
[`is-${gapSizeFullhd}-fullhd`]: gapSizeFullhd !== undefined && gapSizeFullhd !== null,
|
|
895
|
+
'is-centered': !!isCentered,
|
|
896
|
+
'is-gapless': !!isGapless,
|
|
897
|
+
'is-multiline': !!isMultiline,
|
|
898
|
+
'is-vcentered': !!isVCentered,
|
|
899
|
+
'is-mobile': !!isMobile,
|
|
900
|
+
'is-desktop': !!isDesktop,
|
|
901
|
+
});
|
|
902
|
+
const columnsClasses = classNames(mainClass, gapClasses, className, bulmaHelperClasses);
|
|
855
903
|
return (jsxRuntimeExports.jsx("div", { className: columnsClasses, ...rest, children: children }));
|
|
856
904
|
};
|
|
857
905
|
|
|
@@ -865,11 +913,12 @@ const validBreadcrumbSeparators = [
|
|
|
865
913
|
const validBreadcrumbSizes = ['small', 'medium', 'large'];
|
|
866
914
|
const Breadcrumb = ({ className, alignment, separator, size, children, ...props }) => {
|
|
867
915
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
868
|
-
const
|
|
916
|
+
const bulmaClasses = usePrefixedClassNames('breadcrumb', {
|
|
869
917
|
[`is-${alignment}`]: alignment && validBreadcrumbAlignments.includes(alignment),
|
|
870
918
|
[`has-${separator}-separator`]: separator && validBreadcrumbSeparators.includes(separator),
|
|
871
919
|
[`is-${size}`]: size && validBreadcrumbSizes.includes(size),
|
|
872
920
|
});
|
|
921
|
+
const breadcrumbClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
873
922
|
return (jsxRuntimeExports.jsx("nav", { className: breadcrumbClasses, "aria-label": "breadcrumbs", ...rest, children: jsxRuntimeExports.jsx("ul", { children: children }) }));
|
|
874
923
|
};
|
|
875
924
|
|
|
@@ -885,9 +934,10 @@ const Card = ({ className, children, textColor, bgColor, hasShadow = true, heade
|
|
|
885
934
|
backgroundColor: bgColor,
|
|
886
935
|
...props,
|
|
887
936
|
});
|
|
888
|
-
const
|
|
937
|
+
const bulmaClasses = usePrefixedClassNames('card', {
|
|
889
938
|
'is-shadowless': !hasShadow,
|
|
890
939
|
});
|
|
940
|
+
const cardClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
891
941
|
const renderHeader = (header, headerIcon, headerCentered) => {
|
|
892
942
|
if (!header && !headerIcon)
|
|
893
943
|
return null;
|
|
@@ -906,6 +956,14 @@ const DropdownComponent = ({ label, children, className, menuClassName, active:
|
|
|
906
956
|
const [active, setActive] = useState(!!activeProp);
|
|
907
957
|
const dropdownRef = useRef(null);
|
|
908
958
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
959
|
+
const bulmaClasses = usePrefixedClassNames('dropdown', {
|
|
960
|
+
'is-active': active,
|
|
961
|
+
'is-up': up,
|
|
962
|
+
'is-right': right,
|
|
963
|
+
'is-hoverable': hoverable,
|
|
964
|
+
'is-disabled': disabled,
|
|
965
|
+
});
|
|
966
|
+
const buttonClass = usePrefixedClassNames('button');
|
|
909
967
|
useEffect(() => {
|
|
910
968
|
if (typeof activeProp === 'boolean')
|
|
911
969
|
setActive(activeProp);
|
|
@@ -938,14 +996,8 @@ const DropdownComponent = ({ label, children, className, menuClassName, active:
|
|
|
938
996
|
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(false);
|
|
939
997
|
}
|
|
940
998
|
};
|
|
941
|
-
const dropdownClasses = classNames(
|
|
942
|
-
|
|
943
|
-
'is-up': up,
|
|
944
|
-
'is-right': right,
|
|
945
|
-
'is-hoverable': hoverable,
|
|
946
|
-
'is-disabled': disabled,
|
|
947
|
-
}, className);
|
|
948
|
-
return (jsxRuntimeExports.jsxs("div", { className: dropdownClasses, ref: dropdownRef, id: id, "data-testid": "dropdown-root", ...rest, children: [jsxRuntimeExports.jsx("div", { className: "dropdown-trigger", children: jsxRuntimeExports.jsxs("button", { className: "button", "aria-haspopup": "true", "aria-controls": id ? `${id}-menu` : undefined, "aria-expanded": active, onClick: handleToggle, disabled: disabled, type: "button", children: [jsxRuntimeExports.jsx("span", { children: label }), jsxRuntimeExports.jsx("span", { className: "icon is-small", "aria-hidden": "true", children: jsxRuntimeExports.jsx("i", { className: "fas fa-angle-down" }) })] }) }), jsxRuntimeExports.jsx("div", { className: classNames('dropdown-menu', menuClassName), id: id ? `${id}-menu` : undefined, role: "menu", "data-testid": "dropdown-menu", children: jsxRuntimeExports.jsx("div", { className: "dropdown-content", onClick: handleMenuClick, tabIndex: -1, children: children }) })] }));
|
|
999
|
+
const dropdownClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1000
|
+
return (jsxRuntimeExports.jsxs("div", { className: dropdownClasses, ref: dropdownRef, id: id, "data-testid": "dropdown-root", ...rest, children: [jsxRuntimeExports.jsx("div", { className: "dropdown-trigger", children: jsxRuntimeExports.jsxs("button", { className: buttonClass, "aria-haspopup": "true", "aria-controls": id ? `${id}-menu` : undefined, "aria-expanded": active, onClick: handleToggle, disabled: disabled, type: "button", children: [jsxRuntimeExports.jsx("span", { children: label }), jsxRuntimeExports.jsx("span", { className: "icon is-small", "aria-hidden": "true", children: jsxRuntimeExports.jsx("i", { className: "fas fa-angle-down" }) })] }) }), jsxRuntimeExports.jsx("div", { className: classNames('dropdown-menu', menuClassName), id: id ? `${id}-menu` : undefined, role: "menu", "data-testid": "dropdown-menu", children: jsxRuntimeExports.jsx("div", { className: "dropdown-content", onClick: handleMenuClick, tabIndex: -1, children: children }) })] }));
|
|
949
1001
|
};
|
|
950
1002
|
const DropdownItem = ({ children, active, className, as: Component = 'a', ...props }) => {
|
|
951
1003
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
@@ -960,7 +1012,8 @@ const Dropdown = Object.assign(DropdownComponent, {
|
|
|
960
1012
|
const MenuListLevelContext = createContext(0);
|
|
961
1013
|
const MenuComponent = ({ className, children, ...props }) => {
|
|
962
1014
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
963
|
-
|
|
1015
|
+
const bulmaClasses = usePrefixedClassNames('menu');
|
|
1016
|
+
return (jsxRuntimeExports.jsx("aside", { className: classNames(bulmaClasses, bulmaHelperClasses, className), ...rest, children: children }));
|
|
964
1017
|
};
|
|
965
1018
|
const MenuLabel = ({ className, children, ...props }) => {
|
|
966
1019
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
@@ -1008,8 +1061,12 @@ const Message = ({ className, title, textColor, color, bgColor, onClose, childre
|
|
|
1008
1061
|
backgroundColor: bgColor,
|
|
1009
1062
|
...props,
|
|
1010
1063
|
});
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1064
|
+
const bulmaClasses = usePrefixedClassNames('message', {
|
|
1065
|
+
[`is-${color}`]: color,
|
|
1066
|
+
});
|
|
1067
|
+
const deleteClass = usePrefixedClassNames('delete');
|
|
1068
|
+
const messageClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1069
|
+
return (jsxRuntimeExports.jsxs("article", { className: messageClasses, ...rest, "data-testid": "message", children: [(title || onClose) && (jsxRuntimeExports.jsxs("div", { className: "message-header", children: [title && jsxRuntimeExports.jsx("span", { children: title }), onClose && (jsxRuntimeExports.jsx("button", { className: deleteClass, "aria-label": "delete", onClick: onClose, type: "button", "data-testid": "message-close" }))] })), children && (jsxRuntimeExports.jsx("div", { className: "message-body", "data-testid": "message-body", children: children }))] }));
|
|
1013
1070
|
};
|
|
1014
1071
|
|
|
1015
1072
|
const Modal = ({ active = false, onClose, className, textColor, bgColor, modalCardTitle, modalCardFoot, type, children, ...props }) => {
|
|
@@ -1025,8 +1082,12 @@ const Modal = ({ active = false, onClose, className, textColor, bgColor, modalCa
|
|
|
1025
1082
|
isModalCard = false;
|
|
1026
1083
|
else
|
|
1027
1084
|
isModalCard = !!modalCardTitle || !!modalCardFoot;
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1085
|
+
const bulmaClasses = usePrefixedClassNames('modal', {
|
|
1086
|
+
'is-active': active,
|
|
1087
|
+
});
|
|
1088
|
+
const deleteClass = usePrefixedClassNames('delete');
|
|
1089
|
+
const modalClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1090
|
+
return (jsxRuntimeExports.jsxs("div", { className: modalClasses, ...rest, "data-testid": "modal", children: [jsxRuntimeExports.jsx("div", { className: "modal-background", onClick: onClose, "data-testid": "modal-background" }), isModalCard ? (jsxRuntimeExports.jsxs("div", { className: "modal-card", children: [modalCardTitle && (jsxRuntimeExports.jsxs("header", { className: "modal-card-head", children: [jsxRuntimeExports.jsx("p", { className: "modal-card-title", children: modalCardTitle }), onClose && (jsxRuntimeExports.jsx("button", { className: deleteClass, "aria-label": "close", onClick: onClose, type: "button", "data-testid": "modal-close" }))] })), jsxRuntimeExports.jsx("section", { className: "modal-card-body", "data-testid": "modal-body", children: children }), modalCardFoot && (jsxRuntimeExports.jsx("footer", { className: "modal-card-foot", children: modalCardFoot }))] })) : (jsxRuntimeExports.jsx("div", { className: "modal-content", "data-testid": "modal-content", children: children })), (!isModalCard || (!modalCardTitle && onClose)) && onClose && (jsxRuntimeExports.jsx("button", { className: "modal-close is-large", "aria-label": "close", onClick: onClose, type: "button", "data-testid": "modal-close-float" }))] }));
|
|
1030
1091
|
};
|
|
1031
1092
|
|
|
1032
1093
|
const Navbar = ({ className, textColor, bgColor, color, transparent, fixed, children, ...props }) => {
|
|
@@ -1035,11 +1096,12 @@ const Navbar = ({ className, textColor, bgColor, color, transparent, fixed, chil
|
|
|
1035
1096
|
backgroundColor: bgColor,
|
|
1036
1097
|
...props,
|
|
1037
1098
|
});
|
|
1038
|
-
const
|
|
1099
|
+
const bulmaClasses = usePrefixedClassNames('navbar', {
|
|
1039
1100
|
[`is-${color}`]: color,
|
|
1040
1101
|
'is-transparent': transparent,
|
|
1041
1102
|
[`is-fixed-${fixed}`]: fixed,
|
|
1042
1103
|
});
|
|
1104
|
+
const navbarClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1043
1105
|
return (jsxRuntimeExports.jsx("nav", { className: navbarClasses, role: "navigation", "aria-label": "main navigation", ...rest, children: children }));
|
|
1044
1106
|
};
|
|
1045
1107
|
const NavbarBrand = ({ className, children, textColor, ...props }) => {
|
|
@@ -1131,12 +1193,13 @@ const Pagination = ({ color, textColor, bgColor, size, align, rounded, className
|
|
|
1131
1193
|
backgroundColor: bgColor,
|
|
1132
1194
|
...props,
|
|
1133
1195
|
});
|
|
1134
|
-
const
|
|
1196
|
+
const bulmaClasses = usePrefixedClassNames('pagination', {
|
|
1135
1197
|
[`is-${color}`]: color,
|
|
1136
1198
|
[`is-${size}`]: size,
|
|
1137
1199
|
[`is-${align}`]: align,
|
|
1138
1200
|
'is-rounded': rounded,
|
|
1139
1201
|
});
|
|
1202
|
+
const paginationClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1140
1203
|
return (jsxRuntimeExports.jsx("nav", { className: paginationClasses, role: "navigation", "aria-label": "pagination", ...rest, children: children }));
|
|
1141
1204
|
};
|
|
1142
1205
|
const PaginationList = ({ className, textColor, bgColor, children, ...props }) => {
|
|
@@ -1180,16 +1243,20 @@ const Panel = ({ color, className, children, ...props }) => {
|
|
|
1180
1243
|
color,
|
|
1181
1244
|
...props,
|
|
1182
1245
|
});
|
|
1183
|
-
const
|
|
1246
|
+
const bulmaClasses = usePrefixedClassNames('panel', {
|
|
1184
1247
|
[`is-${color}`]: color,
|
|
1185
1248
|
});
|
|
1249
|
+
const panelClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1186
1250
|
return (jsxRuntimeExports.jsx("nav", { className: panelClasses, ...rest, children: children }));
|
|
1187
1251
|
};
|
|
1188
1252
|
const PanelHeading = ({ className, children, ...props }) => (jsxRuntimeExports.jsx("p", { className: classNames('panel-heading', className), ...props, children: children }));
|
|
1189
1253
|
const PanelTabs = ({ className, children, ...props }) => (jsxRuntimeExports.jsx("p", { className: classNames('panel-tabs', className), ...props, children: children }));
|
|
1190
1254
|
const PanelBlock = ({ className, active, children, ...props }) => (jsxRuntimeExports.jsx("a", { className: classNames('panel-block', className, { 'is-active': active }), ...props, children: children }));
|
|
1191
1255
|
const PanelIcon = ({ className, children, ...props }) => (jsxRuntimeExports.jsx("span", { className: classNames('panel-icon', className), ...props, children: children }));
|
|
1192
|
-
const PanelInputBlock = ({ value, onChange, placeholder, iconClassName = 'fas fa-search', ...props }) =>
|
|
1256
|
+
const PanelInputBlock = ({ value, onChange, placeholder, iconClassName = 'fas fa-search', ...props }) => {
|
|
1257
|
+
const inputClass = usePrefixedClassNames('input');
|
|
1258
|
+
return (jsxRuntimeExports.jsx("div", { className: "panel-block", ...props, children: jsxRuntimeExports.jsxs("p", { className: "control has-icons-left", children: [jsxRuntimeExports.jsx("input", { className: inputClass, type: "text", placeholder: placeholder, value: value, onChange: onChange }), jsxRuntimeExports.jsx("span", { className: "icon is-left", children: jsxRuntimeExports.jsx("i", { className: iconClassName, "aria-hidden": "true" }) })] }) }));
|
|
1259
|
+
};
|
|
1193
1260
|
const PanelCheckboxBlock = ({ checked, onChange, children, ...props }) => (jsxRuntimeExports.jsxs("label", { className: "panel-block", ...props, children: [jsxRuntimeExports.jsx("input", { type: "checkbox", checked: checked, onChange: onChange }), children] }));
|
|
1194
1261
|
const PanelButtonBlock = ({ children, className, ...props }) => (jsxRuntimeExports.jsx("div", { className: "panel-block", children: jsxRuntimeExports.jsx("button", { className: classNames('button is-link is-outlined is-fullwidth', className), ...props, children: children }) }));
|
|
1195
1262
|
Panel.Heading = PanelHeading;
|
|
@@ -1202,18 +1269,18 @@ Panel.ButtonBlock = PanelButtonBlock;
|
|
|
1202
1269
|
|
|
1203
1270
|
const Tabs = ({ align, size, fullwidth, boxed, toggle, rounded, color, className, children, ...props }) => {
|
|
1204
1271
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1205
|
-
color,
|
|
1206
1272
|
...props,
|
|
1207
1273
|
});
|
|
1208
|
-
const
|
|
1274
|
+
const bulmaClasses = usePrefixedClassNames('tabs', {
|
|
1209
1275
|
[`is-${align}`]: align,
|
|
1210
1276
|
[`is-${size}`]: size,
|
|
1277
|
+
[`is-${color}`]: color,
|
|
1211
1278
|
'is-fullwidth': fullwidth,
|
|
1212
1279
|
'is-boxed': boxed,
|
|
1213
1280
|
'is-toggle': toggle,
|
|
1214
|
-
'is-toggle-rounded':
|
|
1215
|
-
|
|
1216
|
-
|
|
1281
|
+
'is-toggle-rounded': rounded,
|
|
1282
|
+
});
|
|
1283
|
+
const tabsClass = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1217
1284
|
return (jsxRuntimeExports.jsx("div", { className: tabsClass, ...rest, children: children }));
|
|
1218
1285
|
};
|
|
1219
1286
|
const TabList = ({ className, children, ...props }) => (jsxRuntimeExports.jsx("ul", { className: classNames(className), ...props, children: children }));
|
|
@@ -1227,7 +1294,8 @@ const Block = ({ className, textColor, bgColor, children, ...props }) => {
|
|
|
1227
1294
|
backgroundColor: bgColor,
|
|
1228
1295
|
...props,
|
|
1229
1296
|
});
|
|
1230
|
-
const
|
|
1297
|
+
const bulmaClasses = usePrefixedClassNames('block');
|
|
1298
|
+
const blockClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1231
1299
|
return (jsxRuntimeExports.jsx("div", { className: blockClasses, ...rest, children: children }));
|
|
1232
1300
|
};
|
|
1233
1301
|
|
|
@@ -1237,9 +1305,10 @@ const Box = ({ className, textColor, bgColor, hasShadow = true, children, ...pro
|
|
|
1237
1305
|
backgroundColor: bgColor,
|
|
1238
1306
|
...props,
|
|
1239
1307
|
});
|
|
1240
|
-
const
|
|
1308
|
+
const bulmaClasses = usePrefixedClassNames('box', {
|
|
1241
1309
|
'is-shadowless': !hasShadow,
|
|
1242
1310
|
});
|
|
1311
|
+
const boxClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1243
1312
|
return (jsxRuntimeExports.jsx("div", { className: boxClasses, ...rest, children: children }));
|
|
1244
1313
|
};
|
|
1245
1314
|
|
|
@@ -1249,42 +1318,44 @@ const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWi
|
|
|
1249
1318
|
backgroundColor: bgColor,
|
|
1250
1319
|
...props,
|
|
1251
1320
|
});
|
|
1252
|
-
const
|
|
1253
|
-
[`is-${color}`]: color,
|
|
1254
|
-
[`is-${size}`]: size
|
|
1321
|
+
const bulmaClasses = usePrefixedClassNames('button', {
|
|
1322
|
+
[`is-${color}`]: color && validColors.includes(color),
|
|
1323
|
+
[`is-${size}`]: size,
|
|
1324
|
+
'is-outlined': isOutlined,
|
|
1255
1325
|
'is-light': isLight,
|
|
1256
|
-
'is-rounded': isRounded,
|
|
1257
1326
|
'is-loading': isLoading,
|
|
1258
1327
|
'is-static': isStatic,
|
|
1259
|
-
'is-
|
|
1260
|
-
'is-
|
|
1261
|
-
'is-
|
|
1328
|
+
'is-disabled': isDisabled,
|
|
1329
|
+
'is-rounded': isRounded,
|
|
1330
|
+
'is-hovered': isHovered,
|
|
1262
1331
|
'is-focused': isFocused,
|
|
1263
1332
|
'is-active': isActive,
|
|
1264
|
-
'is-
|
|
1265
|
-
'is-
|
|
1333
|
+
'is-inverted': isInverted,
|
|
1334
|
+
'is-fullwidth': isFullWidth,
|
|
1266
1335
|
});
|
|
1336
|
+
const buttonClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1267
1337
|
if (as === 'a') {
|
|
1268
|
-
const { ...anchorRest } = rest;
|
|
1338
|
+
const { type: _type, disabled: _disabled, form: _form, formAction: _formAction, formEncType: _formEncType, formMethod: _formMethod, formNoValidate: _formNoValidate, formTarget: _formTarget, name: _name, value: _value, autoFocus: _autoFocus, ...anchorRest } = rest;
|
|
1269
1339
|
return (jsxRuntimeExports.jsx("a", { className: buttonClasses, href: href, target: target, rel: rel, "aria-disabled": isDisabled, tabIndex: isDisabled ? -1 : undefined, onClick: isDisabled
|
|
1270
|
-
? e => e.preventDefault()
|
|
1340
|
+
? (e) => e.preventDefault()
|
|
1271
1341
|
: onClick, ...anchorRest, children: children }));
|
|
1272
1342
|
}
|
|
1273
1343
|
return (jsxRuntimeExports.jsx("button", { className: buttonClasses, disabled: isDisabled, onClick: onClick, ...rest, children: children }));
|
|
1274
1344
|
};
|
|
1275
1345
|
|
|
1276
1346
|
const Buttons = ({ className, textColor, bgColor, isCentered, isRight, hasAddons, children, ...props }) => {
|
|
1347
|
+
const buttonsClasses = usePrefixedClassNames('buttons', {
|
|
1348
|
+
'is-centered': isCentered,
|
|
1349
|
+
'is-right': isRight,
|
|
1350
|
+
'has-addons': hasAddons,
|
|
1351
|
+
});
|
|
1277
1352
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1278
1353
|
color: textColor,
|
|
1279
1354
|
backgroundColor: bgColor,
|
|
1280
1355
|
...props,
|
|
1281
1356
|
});
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1284
|
-
'is-right': isRight,
|
|
1285
|
-
'has-addons': hasAddons,
|
|
1286
|
-
});
|
|
1287
|
-
return (jsxRuntimeExports.jsx("div", { className: buttonsClasses, ...rest, children: children }));
|
|
1357
|
+
const combinedClasses = classNames(buttonsClasses, className, bulmaHelperClasses);
|
|
1358
|
+
return (jsxRuntimeExports.jsx("div", { className: combinedClasses, ...rest, children: children }));
|
|
1288
1359
|
};
|
|
1289
1360
|
|
|
1290
1361
|
const validSizes = ['small', 'medium', 'large'];
|
|
@@ -1294,9 +1365,10 @@ const Content = ({ className, textColor, bgColor, size, children, ...props }) =>
|
|
|
1294
1365
|
backgroundColor: bgColor,
|
|
1295
1366
|
...props,
|
|
1296
1367
|
});
|
|
1297
|
-
const
|
|
1368
|
+
const bulmaClasses = usePrefixedClassNames('content', {
|
|
1298
1369
|
[`is-${size}`]: size && size !== 'normal' && validSizes.includes(size),
|
|
1299
1370
|
});
|
|
1371
|
+
const contentClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1300
1372
|
return (jsxRuntimeExports.jsx("div", { className: contentClasses, ...rest, children: children }));
|
|
1301
1373
|
};
|
|
1302
1374
|
|
|
@@ -1306,10 +1378,11 @@ const Delete = ({ className, textColor, bgColor, onClick, size, ariaLabel = 'Clo
|
|
|
1306
1378
|
backgroundColor: bgColor,
|
|
1307
1379
|
...props,
|
|
1308
1380
|
});
|
|
1309
|
-
const
|
|
1381
|
+
const bulmaClasses = usePrefixedClassNames('delete', {
|
|
1310
1382
|
[`is-${size}`]: size,
|
|
1311
1383
|
'is-disabled': disabled,
|
|
1312
|
-
}
|
|
1384
|
+
});
|
|
1385
|
+
const classes = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1313
1386
|
return (jsxRuntimeExports.jsx("button", { className: classes, onClick: onClick, "aria-label": ariaLabel, disabled: disabled, type: "button", ...rest }));
|
|
1314
1387
|
};
|
|
1315
1388
|
|
|
@@ -1347,9 +1420,10 @@ const Icon = ({ className, textColor, bgColor, name, library = 'fa', libraryFeat
|
|
|
1347
1420
|
backgroundColor: bgColor,
|
|
1348
1421
|
...props,
|
|
1349
1422
|
});
|
|
1350
|
-
const
|
|
1423
|
+
const bulmaClasses = usePrefixedClassNames('icon', {
|
|
1351
1424
|
[`is-${size}`]: size,
|
|
1352
|
-
}
|
|
1425
|
+
});
|
|
1426
|
+
const iconContainerClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1353
1427
|
const iClasses = getIconClasses(library, name, libraryFeatures);
|
|
1354
1428
|
return (jsxRuntimeExports.jsx("span", { className: iconContainerClasses, "aria-label": ariaLabel, style: style, ...rest, children: jsxRuntimeExports.jsx("i", { className: iClasses }) }));
|
|
1355
1429
|
};
|
|
@@ -1360,7 +1434,8 @@ const IconText = ({ className, textColor, bgColor, iconProps, children, items, .
|
|
|
1360
1434
|
backgroundColor: bgColor,
|
|
1361
1435
|
...props,
|
|
1362
1436
|
});
|
|
1363
|
-
const
|
|
1437
|
+
const bulmaClasses = usePrefixedClassNames('icon-text');
|
|
1438
|
+
const iconTextClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1364
1439
|
return (jsxRuntimeExports.jsx("span", { className: iconTextClasses, ...rest, children: items ? (items.map((item, index) => (jsxRuntimeExports.jsxs(React.Fragment, { children: [jsxRuntimeExports.jsx(Icon, { ...item.iconProps }), item.text && jsxRuntimeExports.jsx("span", { children: item.text })] }, index)))) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [iconProps && jsxRuntimeExports.jsx(Icon, { ...iconProps }), children && jsxRuntimeExports.jsx("span", { children: children })] })) }));
|
|
1365
1440
|
};
|
|
1366
1441
|
|
|
@@ -1370,10 +1445,11 @@ const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, s
|
|
|
1370
1445
|
backgroundColor: bgColor,
|
|
1371
1446
|
...props,
|
|
1372
1447
|
});
|
|
1373
|
-
const
|
|
1448
|
+
const bulmaClasses = usePrefixedClassNames('image', {
|
|
1374
1449
|
[`is-${size}`]: size,
|
|
1375
1450
|
'has-ratio': size && typeof size === 'string' && size.includes('by'),
|
|
1376
1451
|
});
|
|
1452
|
+
const imageClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1377
1453
|
let Tag;
|
|
1378
1454
|
if (as) {
|
|
1379
1455
|
Tag = as;
|
|
@@ -1384,7 +1460,8 @@ const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, s
|
|
|
1384
1460
|
else {
|
|
1385
1461
|
Tag = 'div';
|
|
1386
1462
|
}
|
|
1387
|
-
const
|
|
1463
|
+
const roundedClass = usePrefixedClassNames('is-rounded');
|
|
1464
|
+
const content = children ? (children) : (jsxRuntimeExports.jsx("img", { className: classNames({ [roundedClass]: isRounded }), src: src, alt: alt, ...(isRetina && src ? { srcSet: `${src} 2x` } : {}) }));
|
|
1388
1465
|
return (jsxRuntimeExports.jsx(Tag, { className: imageClasses, ...rest, children: content }));
|
|
1389
1466
|
};
|
|
1390
1467
|
|
|
@@ -1392,29 +1469,34 @@ const Notification = ({ className, color, isLight, hasDelete, onDelete, children
|
|
|
1392
1469
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1393
1470
|
...props,
|
|
1394
1471
|
});
|
|
1395
|
-
const
|
|
1472
|
+
const bulmaClasses = usePrefixedClassNames('notification', {
|
|
1396
1473
|
[`is-${color}`]: color && validColors.includes(color),
|
|
1397
1474
|
'is-light': isLight,
|
|
1398
1475
|
});
|
|
1399
|
-
|
|
1476
|
+
const deleteClasses = usePrefixedClassNames('delete');
|
|
1477
|
+
const notificationClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1478
|
+
return (jsxRuntimeExports.jsxs("div", { className: notificationClasses, ...rest, children: [hasDelete && (jsxRuntimeExports.jsx("button", { className: deleteClasses, onClick: onDelete, "aria-label": "Close notification" })), children] }));
|
|
1400
1479
|
};
|
|
1401
1480
|
|
|
1402
1481
|
const Progress = ({ className, color, size, value, max, children, ...props }) => {
|
|
1403
1482
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1404
1483
|
...props,
|
|
1405
1484
|
});
|
|
1406
|
-
const
|
|
1485
|
+
const bulmaClasses = usePrefixedClassNames('progress', {
|
|
1407
1486
|
[`is-${color}`]: color && validColors.includes(color),
|
|
1408
1487
|
[`is-${size}`]: size,
|
|
1409
1488
|
});
|
|
1489
|
+
const progressClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1410
1490
|
return (jsxRuntimeExports.jsx("progress", { className: progressClasses, value: value, max: max, ...rest, children: children }));
|
|
1411
1491
|
};
|
|
1412
1492
|
|
|
1413
1493
|
const Skeleton = ({ className, variant = 'block', lines = 3, children, ...props }) => {
|
|
1494
|
+
const linesClass = usePrefixedClassNames('skeleton-lines');
|
|
1495
|
+
const blockClass = usePrefixedClassNames('skeleton-block');
|
|
1414
1496
|
if (variant === 'lines') {
|
|
1415
|
-
return (jsxRuntimeExports.jsx("div", { className: classNames(
|
|
1497
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames(linesClass, className), ...props, children: Array.from({ length: lines }).map((_, i) => (jsxRuntimeExports.jsx("div", {}, i))) }));
|
|
1416
1498
|
}
|
|
1417
|
-
return (jsxRuntimeExports.jsx("div", { className: classNames(
|
|
1499
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames(blockClass, className), ...props, children: children }));
|
|
1418
1500
|
};
|
|
1419
1501
|
|
|
1420
1502
|
const validSubTitleSizes = ['1', '2', '3', '4', '5', '6'];
|
|
@@ -1431,25 +1513,31 @@ const SubTitle = ({ className, size, as = 'h1', hasSkeleton, children, ...props
|
|
|
1431
1513
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1432
1514
|
const element = validSubTitleElements.includes(as) ? as : 'h1';
|
|
1433
1515
|
const validSize = size && validSubTitleSizes.includes(size) ? size : undefined;
|
|
1434
|
-
const
|
|
1516
|
+
const bulmaClasses = usePrefixedClassNames('subtitle', {
|
|
1435
1517
|
[`is-${validSize}`]: validSize,
|
|
1436
1518
|
'has-skeleton': hasSkeleton,
|
|
1437
1519
|
});
|
|
1520
|
+
const subTitleClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1438
1521
|
const Tag = element === 'p' ? 'p' : validSize ? `h${validSize}` : element;
|
|
1439
1522
|
return (jsxRuntimeExports.jsx(Tag, { className: subTitleClasses, ...rest, children: children }));
|
|
1440
1523
|
};
|
|
1441
1524
|
|
|
1442
1525
|
const Table = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isResponsive, children, ...props }) => {
|
|
1443
1526
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1444
|
-
const
|
|
1527
|
+
const bulmaClasses = usePrefixedClassNames('table', {
|
|
1445
1528
|
'is-bordered': isBordered,
|
|
1446
1529
|
'is-striped': isStriped,
|
|
1447
1530
|
'is-narrow': isNarrow,
|
|
1448
1531
|
'is-hoverable': isHoverable,
|
|
1449
1532
|
'is-fullwidth': isFullwidth,
|
|
1450
1533
|
});
|
|
1534
|
+
const containerClass = usePrefixedClassNames('table-container');
|
|
1535
|
+
const tableClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1451
1536
|
const tableElement = (jsxRuntimeExports.jsx("table", { className: tableClasses, ...rest, children: children }));
|
|
1452
|
-
|
|
1537
|
+
if (isResponsive) {
|
|
1538
|
+
return jsxRuntimeExports.jsx("div", { className: containerClass, children: tableElement });
|
|
1539
|
+
}
|
|
1540
|
+
return tableElement;
|
|
1453
1541
|
};
|
|
1454
1542
|
|
|
1455
1543
|
const validTagColors = [
|
|
@@ -1467,13 +1555,14 @@ const validTagColors = [
|
|
|
1467
1555
|
const validTagSizes = ['normal', 'medium', 'large'];
|
|
1468
1556
|
const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelete, children, ...props }) => {
|
|
1469
1557
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1470
|
-
const
|
|
1558
|
+
const bulmaClasses = usePrefixedClassNames('tag', {
|
|
1471
1559
|
[`is-${color}`]: color && validTagColors.includes(color),
|
|
1472
1560
|
[`is-${size}`]: size && size !== 'normal' && validTagSizes.includes(size),
|
|
1473
1561
|
'is-rounded': isRounded,
|
|
1474
1562
|
'is-delete': isDelete,
|
|
1475
1563
|
'is-hoverable': isHoverable,
|
|
1476
1564
|
});
|
|
1565
|
+
const tagClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1477
1566
|
if (isDelete) {
|
|
1478
1567
|
return (jsxRuntimeExports.jsx("button", { className: tagClasses, onClick: onDelete, "aria-label": "Delete tag", ...rest }));
|
|
1479
1568
|
}
|
|
@@ -1482,10 +1571,11 @@ const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelet
|
|
|
1482
1571
|
|
|
1483
1572
|
const Tags = ({ className, hasAddons, isMultiline, children, ...props }) => {
|
|
1484
1573
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1485
|
-
const
|
|
1574
|
+
const bulmaClasses = usePrefixedClassNames('tags', {
|
|
1486
1575
|
'has-addons': hasAddons,
|
|
1487
1576
|
'are-multiline': isMultiline,
|
|
1488
1577
|
});
|
|
1578
|
+
const tagsClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1489
1579
|
return (jsxRuntimeExports.jsx("div", { className: tagsClasses, ...rest, children: children }));
|
|
1490
1580
|
};
|
|
1491
1581
|
|
|
@@ -1508,10 +1598,11 @@ const validTableColors = [
|
|
|
1508
1598
|
'white',
|
|
1509
1599
|
];
|
|
1510
1600
|
const Td = ({ className, color, children, ...props }) => {
|
|
1511
|
-
const
|
|
1512
|
-
const tdClasses = classNames(className, bulmaHelperClasses, {
|
|
1601
|
+
const colorClass = usePrefixedClassNames('', {
|
|
1513
1602
|
[`is-${color}`]: color && validTableColors.includes(color),
|
|
1514
1603
|
});
|
|
1604
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1605
|
+
const tdClasses = classNames(colorClass, className, bulmaHelperClasses);
|
|
1515
1606
|
return (jsxRuntimeExports.jsx("td", { className: tdClasses, ...rest, children: children }));
|
|
1516
1607
|
};
|
|
1517
1608
|
|
|
@@ -1523,11 +1614,12 @@ const Tfoot = ({ className, children, ...props }) => {
|
|
|
1523
1614
|
|
|
1524
1615
|
const validAlignments = ['left', 'right', 'centered'];
|
|
1525
1616
|
const Th = ({ className, isAligned, width, color, children, ...props }) => {
|
|
1526
|
-
const
|
|
1527
|
-
const thClasses = classNames(className, bulmaHelperClasses, {
|
|
1617
|
+
const bulmaClasses = usePrefixedClassNames('', {
|
|
1528
1618
|
[`has-text-${isAligned}`]: isAligned && validAlignments.includes(isAligned),
|
|
1529
1619
|
[`is-${color}`]: color && validTableColors.includes(color),
|
|
1530
1620
|
});
|
|
1621
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1622
|
+
const thClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
|
|
1531
1623
|
return (jsxRuntimeExports.jsx("th", { className: thClasses, style: width
|
|
1532
1624
|
? { width: typeof width === 'number' ? `${width}px` : width }
|
|
1533
1625
|
: undefined, ...rest, children: children }));
|
|
@@ -1545,21 +1637,23 @@ const Title = ({ className, size, isSpaced, as = 'h1', hasSkeleton, children, ..
|
|
|
1545
1637
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1546
1638
|
const element = validTitleElements.includes(as) ? as : 'h1';
|
|
1547
1639
|
const validSize = size && validTitleSizes.includes(size) ? size : undefined;
|
|
1548
|
-
const
|
|
1640
|
+
const bulmaClasses = usePrefixedClassNames('title', {
|
|
1549
1641
|
[`is-${validSize}`]: validSize,
|
|
1550
1642
|
'is-spaced': isSpaced,
|
|
1551
1643
|
'has-skeleton': hasSkeleton,
|
|
1552
1644
|
});
|
|
1645
|
+
const titleClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
1553
1646
|
const Tag = element === 'p' ? 'p' : validSize ? `h${validSize}` : element;
|
|
1554
1647
|
return (jsxRuntimeExports.jsx(Tag, { className: titleClasses, ...rest, children: children }));
|
|
1555
1648
|
};
|
|
1556
1649
|
|
|
1557
1650
|
const Tr = ({ className, isSelected, color, children, ...props }) => {
|
|
1558
|
-
const
|
|
1559
|
-
const trClasses = classNames(className, bulmaHelperClasses, {
|
|
1651
|
+
const bulmaClasses = usePrefixedClassNames('', {
|
|
1560
1652
|
'is-selected': isSelected,
|
|
1561
1653
|
[`is-${color}`]: color && validTableColors.includes(color),
|
|
1562
1654
|
});
|
|
1655
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1656
|
+
const trClasses = classNames(bulmaClasses, className, bulmaHelperClasses);
|
|
1563
1657
|
return (jsxRuntimeExports.jsx("tr", { className: trClasses, ...rest, children: children }));
|
|
1564
1658
|
};
|
|
1565
1659
|
|
|
@@ -1567,7 +1661,8 @@ const Checkbox = forwardRef(({ disabled, className, children, ...props }, ref) =
|
|
|
1567
1661
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1568
1662
|
...props,
|
|
1569
1663
|
});
|
|
1570
|
-
const
|
|
1664
|
+
const mainClass = usePrefixedClassNames('checkbox');
|
|
1665
|
+
const checkboxClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1571
1666
|
return (jsxRuntimeExports.jsxs("label", { className: checkboxClass, children: [jsxRuntimeExports.jsx("input", { ref: ref, type: "checkbox", disabled: disabled, ...rest }), children] }));
|
|
1572
1667
|
});
|
|
1573
1668
|
Checkbox.displayName = 'Checkbox';
|
|
@@ -1576,7 +1671,8 @@ const Checkboxes = ({ children, className, ...props }) => {
|
|
|
1576
1671
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1577
1672
|
...props,
|
|
1578
1673
|
});
|
|
1579
|
-
const
|
|
1674
|
+
const mainClass = usePrefixedClassNames('checkboxes');
|
|
1675
|
+
const wrapperClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1580
1676
|
return (jsxRuntimeExports.jsx("div", { className: wrapperClass, ...rest, children: children }));
|
|
1581
1677
|
};
|
|
1582
1678
|
|
|
@@ -1609,13 +1705,14 @@ const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isL
|
|
|
1609
1705
|
size: iconRightSize,
|
|
1610
1706
|
}
|
|
1611
1707
|
: undefined);
|
|
1612
|
-
const
|
|
1708
|
+
const mainClass = usePrefixedClassNames('control', {
|
|
1613
1709
|
'has-icons-left': hasIconsLeft || !!leftIconProps,
|
|
1614
1710
|
'has-icons-right': hasIconsRight || !!rightIconProps,
|
|
1615
1711
|
'is-loading': isLoading,
|
|
1616
1712
|
'is-expanded': isExpanded,
|
|
1617
1713
|
[`is-${size}`]: !!size,
|
|
1618
|
-
}
|
|
1714
|
+
});
|
|
1715
|
+
const controlClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1619
1716
|
return (jsxRuntimeExports.jsxs(Component, { className: controlClass, ref: ref, ...restProps, ...rest, children: [children, leftIconProps && leftIconProps.name && (jsxRuntimeExports.jsx(Icon, { ...leftIconProps, className: "is-left" })), rightIconProps && rightIconProps.name && (jsxRuntimeExports.jsx(Icon, { ...rightIconProps, className: "is-right" }))] }));
|
|
1620
1717
|
});
|
|
1621
1718
|
Control.displayName = 'Control';
|
|
@@ -1626,7 +1723,10 @@ const FieldLabel = ({ size, textColor, bgColor, className, children, ...props })
|
|
|
1626
1723
|
backgroundColor: bgColor,
|
|
1627
1724
|
...props,
|
|
1628
1725
|
});
|
|
1629
|
-
const
|
|
1726
|
+
const mainClass = usePrefixedClassNames('field-label', {
|
|
1727
|
+
[`is-${size}`]: !!size,
|
|
1728
|
+
});
|
|
1729
|
+
const fieldLabelClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1630
1730
|
return (jsxRuntimeExports.jsx("div", { className: fieldLabelClass, ...props, ...rest, children: children }));
|
|
1631
1731
|
};
|
|
1632
1732
|
const FieldBody = ({ textColor, bgColor, className, children, ...props }) => {
|
|
@@ -1635,16 +1735,17 @@ const FieldBody = ({ textColor, bgColor, className, children, ...props }) => {
|
|
|
1635
1735
|
backgroundColor: bgColor,
|
|
1636
1736
|
...props,
|
|
1637
1737
|
});
|
|
1638
|
-
const
|
|
1738
|
+
const mainClass = usePrefixedClassNames('field-body');
|
|
1739
|
+
const fieldBodyClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1639
1740
|
return (jsxRuntimeExports.jsx("div", { className: fieldBodyClass, ...props, ...rest, children: children }));
|
|
1640
1741
|
};
|
|
1641
|
-
const Field = ({ horizontal, grouped, hasAddons, label, labelSize, labelProps, textColor, bgColor, className, children, ...props }) => {
|
|
1742
|
+
const Field = ({ horizontal, grouped, hasAddons, label, labelSize, labelProps, textColor, color: _fieldColor, bgColor, className, children, ...props }) => {
|
|
1642
1743
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1643
1744
|
color: textColor,
|
|
1644
1745
|
backgroundColor: bgColor,
|
|
1645
1746
|
...props,
|
|
1646
1747
|
});
|
|
1647
|
-
const
|
|
1748
|
+
const mainClass = usePrefixedClassNames('field', {
|
|
1648
1749
|
'is-horizontal': horizontal,
|
|
1649
1750
|
'has-addons': !!hasAddons,
|
|
1650
1751
|
'is-grouped': grouped === true ||
|
|
@@ -1654,15 +1755,17 @@ const Field = ({ horizontal, grouped, hasAddons, label, labelSize, labelProps, t
|
|
|
1654
1755
|
'is-grouped-centered': grouped === 'centered',
|
|
1655
1756
|
'is-grouped-right': grouped === 'right',
|
|
1656
1757
|
'is-grouped-multiline': grouped === 'multiline',
|
|
1657
|
-
}
|
|
1758
|
+
});
|
|
1759
|
+
const fieldClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1658
1760
|
const mappedLabelSize = labelSize === 'normal' ? undefined : labelSize;
|
|
1761
|
+
const labelClass = usePrefixedClassNames('label');
|
|
1659
1762
|
let renderedLabel = null;
|
|
1660
1763
|
if (label) {
|
|
1661
1764
|
if (horizontal) {
|
|
1662
|
-
renderedLabel = (jsxRuntimeExports.jsx(FieldLabel, { size: mappedLabelSize, children: jsxRuntimeExports.jsx("label", { ...labelProps, className: classNames(
|
|
1765
|
+
renderedLabel = (jsxRuntimeExports.jsx(FieldLabel, { size: mappedLabelSize, children: jsxRuntimeExports.jsx("label", { ...labelProps, className: classNames(labelClass, labelProps === null || labelProps === void 0 ? void 0 : labelProps.className), style: labelProps === null || labelProps === void 0 ? void 0 : labelProps.style, children: label }) }));
|
|
1663
1766
|
}
|
|
1664
1767
|
else {
|
|
1665
|
-
renderedLabel = (jsxRuntimeExports.jsx("label", { ...labelProps, className: classNames(
|
|
1768
|
+
renderedLabel = (jsxRuntimeExports.jsx("label", { ...labelProps, className: classNames(labelClass, labelProps === null || labelProps === void 0 ? void 0 : labelProps.className), style: { display: 'block', ...((labelProps === null || labelProps === void 0 ? void 0 : labelProps.style) || {}) }, children: label }));
|
|
1666
1769
|
}
|
|
1667
1770
|
}
|
|
1668
1771
|
let content = children;
|
|
@@ -1697,13 +1800,14 @@ const File = forwardRef(({ color, size, isBoxed, isFullwidth, isRight, isCentere
|
|
|
1697
1800
|
else if (isCentered) {
|
|
1698
1801
|
alignmentClass = 'is-centered';
|
|
1699
1802
|
}
|
|
1700
|
-
const
|
|
1701
|
-
[`is-${color}`]: color,
|
|
1702
|
-
[`is-${size}`]: size,
|
|
1803
|
+
const mainClass = usePrefixedClassNames('file', {
|
|
1804
|
+
[`is-${color}`]: !!color,
|
|
1805
|
+
[`is-${size}`]: !!size,
|
|
1703
1806
|
'is-boxed': isBoxed,
|
|
1704
1807
|
'is-fullwidth': isFullwidth,
|
|
1705
1808
|
'has-name': hasName,
|
|
1706
|
-
}
|
|
1809
|
+
});
|
|
1810
|
+
const fileClass = classNames(mainClass, bulmaHelperClasses, alignmentClass, className);
|
|
1707
1811
|
return (jsxRuntimeExports.jsx("div", { className: fileClass, children: jsxRuntimeExports.jsxs("label", { className: "file-label", children: [jsxRuntimeExports.jsx("input", { ref: ref, className: classNames('file-input', inputClassName), type: "file", ...rest }), jsxRuntimeExports.jsxs("span", { className: "file-cta", children: [iconLeft && jsxRuntimeExports.jsx("span", { className: "file-icon", children: iconLeft }), jsxRuntimeExports.jsx("span", { className: "file-label", children: label || 'Choose a file…' }), iconRight && jsxRuntimeExports.jsx("span", { className: "file-icon", children: iconRight })] }), hasName && fileName && jsxRuntimeExports.jsx("span", { className: "file-name", children: fileName })] }) }));
|
|
1708
1812
|
});
|
|
1709
1813
|
File.displayName = 'File';
|
|
@@ -1713,15 +1817,16 @@ const Input = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocus
|
|
|
1713
1817
|
color,
|
|
1714
1818
|
...props,
|
|
1715
1819
|
});
|
|
1716
|
-
const
|
|
1717
|
-
[`is-${color}`]: color,
|
|
1718
|
-
[`is-${size}`]: size,
|
|
1820
|
+
const mainClass = usePrefixedClassNames('input', {
|
|
1821
|
+
[`is-${color}`]: !!color,
|
|
1822
|
+
[`is-${size}`]: !!size,
|
|
1719
1823
|
'is-rounded': isRounded,
|
|
1720
1824
|
'is-static': isStatic,
|
|
1721
1825
|
'is-hovered': isHovered,
|
|
1722
1826
|
'is-focused': isFocused,
|
|
1723
1827
|
'is-loading': isLoading,
|
|
1724
|
-
}
|
|
1828
|
+
});
|
|
1829
|
+
const inputClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1725
1830
|
return (jsxRuntimeExports.jsx("input", { ref: ref, className: inputClass, disabled: disabled, readOnly: readOnly, ...rest }));
|
|
1726
1831
|
});
|
|
1727
1832
|
Input.displayName = 'Input';
|
|
@@ -1730,7 +1835,8 @@ const Radio = forwardRef(({ disabled, className, children, ...props }, ref) => {
|
|
|
1730
1835
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1731
1836
|
...props,
|
|
1732
1837
|
});
|
|
1733
|
-
const
|
|
1838
|
+
const mainClass = usePrefixedClassNames('radio');
|
|
1839
|
+
const radioClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1734
1840
|
return (jsxRuntimeExports.jsxs("label", { className: radioClass, children: [jsxRuntimeExports.jsx("input", { ref: ref, type: "radio", disabled: disabled, ...rest }), children] }));
|
|
1735
1841
|
});
|
|
1736
1842
|
Radio.displayName = 'Radio';
|
|
@@ -1739,7 +1845,8 @@ const Radios = ({ children, className, ...props }) => {
|
|
|
1739
1845
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1740
1846
|
...props,
|
|
1741
1847
|
});
|
|
1742
|
-
const
|
|
1848
|
+
const mainClass = usePrefixedClassNames('radios');
|
|
1849
|
+
const wrapperClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1743
1850
|
return (jsxRuntimeExports.jsx("div", { className: wrapperClass, ...rest, children: children }));
|
|
1744
1851
|
};
|
|
1745
1852
|
|
|
@@ -1748,13 +1855,14 @@ const Select = forwardRef(({ color, size, isRounded, isLoading, isActive, classN
|
|
|
1748
1855
|
color,
|
|
1749
1856
|
...props,
|
|
1750
1857
|
});
|
|
1751
|
-
const
|
|
1752
|
-
[`is-${color}`]: color,
|
|
1753
|
-
[`is-${size}`]: size,
|
|
1858
|
+
const mainClass = usePrefixedClassNames('select', {
|
|
1859
|
+
[`is-${color}`]: !!color,
|
|
1860
|
+
[`is-${size}`]: !!size,
|
|
1754
1861
|
'is-rounded': isRounded,
|
|
1755
1862
|
'is-loading': isLoading,
|
|
1756
1863
|
'is-active': isActive,
|
|
1757
|
-
}
|
|
1864
|
+
});
|
|
1865
|
+
const selectClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1758
1866
|
const selectProps = {
|
|
1759
1867
|
disabled,
|
|
1760
1868
|
multiple,
|
|
@@ -1772,9 +1880,9 @@ const TextArea = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFo
|
|
|
1772
1880
|
color,
|
|
1773
1881
|
...props,
|
|
1774
1882
|
});
|
|
1775
|
-
const
|
|
1776
|
-
[`is-${color}`]: color,
|
|
1777
|
-
[`is-${size}`]: size,
|
|
1883
|
+
const mainClass = usePrefixedClassNames('textarea', {
|
|
1884
|
+
[`is-${color}`]: !!color,
|
|
1885
|
+
[`is-${size}`]: !!size,
|
|
1778
1886
|
'is-rounded': isRounded,
|
|
1779
1887
|
'is-static': isStatic,
|
|
1780
1888
|
'is-hovered': isHovered,
|
|
@@ -1782,97 +1890,650 @@ const TextArea = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFo
|
|
|
1782
1890
|
'is-loading': isLoading,
|
|
1783
1891
|
'is-active': isActive,
|
|
1784
1892
|
'has-fixed-size': hasFixedSize,
|
|
1785
|
-
}
|
|
1893
|
+
});
|
|
1894
|
+
const textareaClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1786
1895
|
return (jsxRuntimeExports.jsx("textarea", { ref: ref, className: textareaClass, disabled: disabled, readOnly: readOnly, rows: rows, ...rest }));
|
|
1787
1896
|
});
|
|
1788
1897
|
TextArea.displayName = 'TextArea';
|
|
1789
1898
|
|
|
1790
|
-
|
|
1791
|
-
const classes = [];
|
|
1792
|
-
if (props.colStart !== undefined)
|
|
1793
|
-
classes.push(`is-col-start-${props.colStart}`);
|
|
1794
|
-
if (props.colFromEnd !== undefined)
|
|
1795
|
-
classes.push(`is-col-from-end-${props.colFromEnd}`);
|
|
1796
|
-
if (props.colSpan !== undefined)
|
|
1797
|
-
classes.push(`is-col-span-${props.colSpan}`);
|
|
1798
|
-
if (props.rowStart !== undefined)
|
|
1799
|
-
classes.push(`is-row-start-${props.rowStart}`);
|
|
1800
|
-
if (props.rowFromEnd !== undefined)
|
|
1801
|
-
classes.push(`is-row-from-end-${props.rowFromEnd}`);
|
|
1802
|
-
if (props.rowSpan !== undefined)
|
|
1803
|
-
classes.push(`is-row-span-${props.rowSpan}`);
|
|
1804
|
-
return classes;
|
|
1805
|
-
}
|
|
1806
|
-
const Cell = ({ colStart, colFromEnd, colSpan, rowStart, rowFromEnd, rowSpan, className, textColor, bgColor, children, ...props }) => {
|
|
1899
|
+
const Cell = ({ colStart, colFromEnd, colSpan, rowStart, rowFromEnd, rowSpan, className, textColor, color: _fieldColor, bgColor, children, ...props }) => {
|
|
1807
1900
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1808
1901
|
color: textColor,
|
|
1809
1902
|
backgroundColor: bgColor,
|
|
1810
1903
|
...props,
|
|
1811
1904
|
});
|
|
1812
|
-
const
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1905
|
+
const mainClass = usePrefixedClassNames('cell');
|
|
1906
|
+
const cellGridClasses = usePrefixedClassNames('', {
|
|
1907
|
+
[`is-col-start-${colStart}`]: colStart !== undefined && colStart !== null,
|
|
1908
|
+
[`is-col-from-end-${colFromEnd}`]: colFromEnd !== undefined && colFromEnd !== null,
|
|
1909
|
+
[`is-col-span-${colSpan}`]: colSpan !== undefined && colSpan !== null,
|
|
1910
|
+
[`is-row-start-${rowStart}`]: rowStart !== undefined && rowStart !== null,
|
|
1911
|
+
[`is-row-from-end-${rowFromEnd}`]: rowFromEnd !== undefined && rowFromEnd !== null,
|
|
1912
|
+
[`is-row-span-${rowSpan}`]: rowSpan !== undefined && rowSpan !== null,
|
|
1913
|
+
});
|
|
1914
|
+
const cellClasses = classNames(mainClass, cellGridClasses, className, bulmaHelperClasses);
|
|
1820
1915
|
return (jsxRuntimeExports.jsx("div", { className: cellClasses, ...rest, children: children }));
|
|
1821
1916
|
};
|
|
1822
1917
|
|
|
1823
|
-
|
|
1824
|
-
const classes = [];
|
|
1825
|
-
if (gap !== undefined)
|
|
1826
|
-
classes.push(`is-gap-${gap}`);
|
|
1827
|
-
if (columnGap !== undefined)
|
|
1828
|
-
classes.push(`is-column-gap-${columnGap}`);
|
|
1829
|
-
if (rowGap !== undefined)
|
|
1830
|
-
classes.push(`is-row-gap-${rowGap}`);
|
|
1831
|
-
if (minCol !== undefined)
|
|
1832
|
-
classes.push(`is-col-min-${minCol}`);
|
|
1833
|
-
return classes;
|
|
1834
|
-
}
|
|
1835
|
-
function getFixedGridClasses({ fixedCols, fixedColsMobile, fixedColsTablet, fixedColsDesktop, fixedColsWidescreen, fixedColsFullhd, }) {
|
|
1836
|
-
const classes = [];
|
|
1837
|
-
if (fixedCols === 'auto') {
|
|
1838
|
-
classes.push('has-auto-count');
|
|
1839
|
-
return classes;
|
|
1840
|
-
}
|
|
1841
|
-
if (fixedCols !== undefined)
|
|
1842
|
-
classes.push(`has-${fixedCols}-cols`);
|
|
1843
|
-
if (fixedColsMobile !== undefined)
|
|
1844
|
-
classes.push(`has-${fixedColsMobile}-cols-mobile`);
|
|
1845
|
-
if (fixedColsTablet !== undefined)
|
|
1846
|
-
classes.push(`has-${fixedColsTablet}-cols-tablet`);
|
|
1847
|
-
if (fixedColsDesktop !== undefined)
|
|
1848
|
-
classes.push(`has-${fixedColsDesktop}-cols-desktop`);
|
|
1849
|
-
if (fixedColsWidescreen !== undefined)
|
|
1850
|
-
classes.push(`has-${fixedColsWidescreen}-cols-widescreen`);
|
|
1851
|
-
if (fixedColsFullhd !== undefined)
|
|
1852
|
-
classes.push(`has-${fixedColsFullhd}-cols-fullhd`);
|
|
1853
|
-
return classes;
|
|
1854
|
-
}
|
|
1855
|
-
const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixedColsMobile, fixedColsTablet, fixedColsDesktop, fixedColsWidescreen, fixedColsFullhd, className, textColor, bgColor, children, ...props }) => {
|
|
1918
|
+
const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixedColsMobile, fixedColsTablet, fixedColsDesktop, fixedColsWidescreen, fixedColsFullhd, className, textColor, color: _fieldColor, bgColor, children, ...props }) => {
|
|
1856
1919
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1857
1920
|
color: textColor,
|
|
1858
1921
|
backgroundColor: bgColor,
|
|
1859
1922
|
...props,
|
|
1860
1923
|
});
|
|
1861
|
-
const
|
|
1924
|
+
const mainClass = usePrefixedClassNames('grid');
|
|
1925
|
+
const gridInnerClasses = usePrefixedClassNames('', {
|
|
1926
|
+
[`is-gap-${gap}`]: gap !== undefined && gap !== null,
|
|
1927
|
+
[`is-column-gap-${columnGap}`]: columnGap !== undefined && columnGap !== null,
|
|
1928
|
+
[`is-row-gap-${rowGap}`]: rowGap !== undefined && rowGap !== null,
|
|
1929
|
+
[`is-col-min-${minCol}`]: minCol !== undefined && minCol !== null,
|
|
1930
|
+
});
|
|
1931
|
+
const fixedGridClasses = usePrefixedClassNames('fixed-grid', {
|
|
1932
|
+
'has-auto-count': fixedCols === 'auto',
|
|
1933
|
+
[`has-${fixedCols}-cols`]: fixedCols !== undefined && fixedCols !== 'auto',
|
|
1934
|
+
[`has-${fixedColsMobile}-cols-mobile`]: fixedColsMobile !== undefined && fixedColsMobile !== null,
|
|
1935
|
+
[`has-${fixedColsTablet}-cols-tablet`]: fixedColsTablet !== undefined && fixedColsTablet !== null,
|
|
1936
|
+
[`has-${fixedColsDesktop}-cols-desktop`]: fixedColsDesktop !== undefined && fixedColsDesktop !== null,
|
|
1937
|
+
[`has-${fixedColsWidescreen}-cols-widescreen`]: fixedColsWidescreen !== undefined && fixedColsWidescreen !== null,
|
|
1938
|
+
[`has-${fixedColsFullhd}-cols-fullhd`]: fixedColsFullhd !== undefined && fixedColsFullhd !== null,
|
|
1939
|
+
});
|
|
1940
|
+
const gridClasses = classNames(mainClass, gridInnerClasses, bulmaHelperClasses, className);
|
|
1862
1941
|
if (isFixed) {
|
|
1863
|
-
const fixedGridClasses = classNames('fixed-grid', ...getFixedGridClasses({
|
|
1864
|
-
fixedCols,
|
|
1865
|
-
fixedColsMobile,
|
|
1866
|
-
fixedColsTablet,
|
|
1867
|
-
fixedColsDesktop,
|
|
1868
|
-
fixedColsWidescreen,
|
|
1869
|
-
fixedColsFullhd,
|
|
1870
|
-
}));
|
|
1871
1942
|
return (jsxRuntimeExports.jsx("div", { className: fixedGridClasses, children: jsxRuntimeExports.jsx("div", { className: gridClasses, ...rest, children: children }) }));
|
|
1872
1943
|
}
|
|
1873
1944
|
return (jsxRuntimeExports.jsx("div", { className: gridClasses, ...rest, children: children }));
|
|
1874
1945
|
};
|
|
1875
1946
|
|
|
1947
|
+
const bulmaCssVars = [
|
|
1948
|
+
'--bulma-scheme-h',
|
|
1949
|
+
'--bulma-scheme-s',
|
|
1950
|
+
'--bulma-light-l',
|
|
1951
|
+
'--bulma-light-invert-l',
|
|
1952
|
+
'--bulma-dark-l',
|
|
1953
|
+
'--bulma-dark-invert-l',
|
|
1954
|
+
'--bulma-soft-l',
|
|
1955
|
+
'--bulma-bold-l',
|
|
1956
|
+
'--bulma-soft-invert-l',
|
|
1957
|
+
'--bulma-bold-invert-l',
|
|
1958
|
+
'--bulma-hover-background-l-delta',
|
|
1959
|
+
'--bulma-active-background-l-delta',
|
|
1960
|
+
'--bulma-hover-border-l-delta',
|
|
1961
|
+
'--bulma-active-border-l-delta',
|
|
1962
|
+
'--bulma-hover-color-l-delta',
|
|
1963
|
+
'--bulma-active-color-l-delta',
|
|
1964
|
+
'--bulma-hover-shadow-a-delta',
|
|
1965
|
+
'--bulma-active-shadow-a-delta',
|
|
1966
|
+
'--bulma-primary-h',
|
|
1967
|
+
'--bulma-primary-s',
|
|
1968
|
+
'--bulma-primary-l',
|
|
1969
|
+
'--bulma-link-h',
|
|
1970
|
+
'--bulma-link-s',
|
|
1971
|
+
'--bulma-link-l',
|
|
1972
|
+
'--bulma-info-h',
|
|
1973
|
+
'--bulma-info-s',
|
|
1974
|
+
'--bulma-info-l',
|
|
1975
|
+
'--bulma-success-h',
|
|
1976
|
+
'--bulma-success-s',
|
|
1977
|
+
'--bulma-success-l',
|
|
1978
|
+
'--bulma-warning-h',
|
|
1979
|
+
'--bulma-warning-s',
|
|
1980
|
+
'--bulma-warning-l',
|
|
1981
|
+
'--bulma-danger-h',
|
|
1982
|
+
'--bulma-danger-s',
|
|
1983
|
+
'--bulma-danger-l',
|
|
1984
|
+
'--bulma-family-primary',
|
|
1985
|
+
'--bulma-family-secondary',
|
|
1986
|
+
'--bulma-family-code',
|
|
1987
|
+
'--bulma-size-small',
|
|
1988
|
+
'--bulma-size-normal',
|
|
1989
|
+
'--bulma-size-medium',
|
|
1990
|
+
'--bulma-size-large',
|
|
1991
|
+
'--bulma-weight-light',
|
|
1992
|
+
'--bulma-weight-normal',
|
|
1993
|
+
'--bulma-weight-medium',
|
|
1994
|
+
'--bulma-weight-semibold',
|
|
1995
|
+
'--bulma-weight-bold',
|
|
1996
|
+
'--bulma-weight-extrabold',
|
|
1997
|
+
'--bulma-block-spacing',
|
|
1998
|
+
'--bulma-duration',
|
|
1999
|
+
'--bulma-easing',
|
|
2000
|
+
'--bulma-radius-small',
|
|
2001
|
+
'--bulma-radius',
|
|
2002
|
+
'--bulma-radius-medium',
|
|
2003
|
+
'--bulma-radius-large',
|
|
2004
|
+
'--bulma-radius-rounded',
|
|
2005
|
+
'--bulma-speed',
|
|
2006
|
+
'--bulma-arrow-color',
|
|
2007
|
+
'--bulma-loading-color',
|
|
2008
|
+
'--bulma-burger-h',
|
|
2009
|
+
'--bulma-burger-s',
|
|
2010
|
+
'--bulma-burger-l',
|
|
2011
|
+
'--bulma-burger-border-radius',
|
|
2012
|
+
'--bulma-burger-gap',
|
|
2013
|
+
'--bulma-burger-item-height',
|
|
2014
|
+
'--bulma-burger-item-width',
|
|
2015
|
+
'--bulma-body-background-color',
|
|
2016
|
+
'--bulma-body-size',
|
|
2017
|
+
'--bulma-body-min-width',
|
|
2018
|
+
'--bulma-body-rendering',
|
|
2019
|
+
'--bulma-body-family',
|
|
2020
|
+
'--bulma-body-overflow-x',
|
|
2021
|
+
'--bulma-body-overflow-y',
|
|
2022
|
+
'--bulma-body-color',
|
|
2023
|
+
'--bulma-body-font-size',
|
|
2024
|
+
'--bulma-body-weight',
|
|
2025
|
+
'--bulma-body-line-height',
|
|
2026
|
+
'--bulma-code-family',
|
|
2027
|
+
'--bulma-code-padding',
|
|
2028
|
+
'--bulma-code-weight',
|
|
2029
|
+
'--bulma-code-size',
|
|
2030
|
+
'--bulma-small-font-size',
|
|
2031
|
+
'--bulma-hr-background-color',
|
|
2032
|
+
'--bulma-hr-height',
|
|
2033
|
+
'--bulma-hr-margin',
|
|
2034
|
+
'--bulma-strong-color',
|
|
2035
|
+
'--bulma-strong-weight',
|
|
2036
|
+
'--bulma-pre-font-size',
|
|
2037
|
+
'--bulma-pre-padding',
|
|
2038
|
+
'--bulma-pre-code-font-size',
|
|
2039
|
+
'--bulma-skeleton-background',
|
|
2040
|
+
'--bulma-skeleton-radius',
|
|
2041
|
+
'--bulma-skeleton-block-min-height',
|
|
2042
|
+
'--bulma-skeleton-lines-gap',
|
|
2043
|
+
'--bulma-skeleton-line-height',
|
|
2044
|
+
'--bulma-breadcrumb-item-color',
|
|
2045
|
+
'--bulma-breadcrumb-item-hover-color',
|
|
2046
|
+
'--bulma-breadcrumb-item-active-color',
|
|
2047
|
+
'--bulma-breadcrumb-item-padding-vertical',
|
|
2048
|
+
'--bulma-breadcrumb-item-padding-horizontal',
|
|
2049
|
+
'--bulma-breadcrumb-item-separator-color',
|
|
2050
|
+
'--bulma-card-color',
|
|
2051
|
+
'--bulma-card-background-color',
|
|
2052
|
+
'--bulma-card-shadow',
|
|
2053
|
+
'--bulma-card-radius',
|
|
2054
|
+
'--bulma-card-header-background-color',
|
|
2055
|
+
'--bulma-card-header-color',
|
|
2056
|
+
'--bulma-card-header-padding',
|
|
2057
|
+
'--bulma-card-header-shadow',
|
|
2058
|
+
'--bulma-card-header-weight',
|
|
2059
|
+
'--bulma-card-content-background-color',
|
|
2060
|
+
'--bulma-card-content-padding',
|
|
2061
|
+
'--bulma-card-footer-background-color',
|
|
2062
|
+
'--bulma-card-footer-border-top',
|
|
2063
|
+
'--bulma-card-footer-padding',
|
|
2064
|
+
'--bulma-card-media-margin',
|
|
2065
|
+
'--bulma-dropdown-menu-min-width',
|
|
2066
|
+
'--bulma-dropdown-content-background-color',
|
|
2067
|
+
'--bulma-dropdown-content-offset',
|
|
2068
|
+
'--bulma-dropdown-content-padding-bottom',
|
|
2069
|
+
'--bulma-dropdown-content-padding-top',
|
|
2070
|
+
'--bulma-dropdown-content-radius',
|
|
2071
|
+
'--bulma-dropdown-content-shadow',
|
|
2072
|
+
'--bulma-dropdown-content-z',
|
|
2073
|
+
'--bulma-dropdown-item-h',
|
|
2074
|
+
'--bulma-dropdown-item-s',
|
|
2075
|
+
'--bulma-dropdown-item-l',
|
|
2076
|
+
'--bulma-dropdown-item-background-l',
|
|
2077
|
+
'--bulma-dropdown-item-background-l-delta',
|
|
2078
|
+
'--bulma-dropdown-item-hover-background-l-delta',
|
|
2079
|
+
'--bulma-dropdown-item-active-background-l-delta',
|
|
2080
|
+
'--bulma-dropdown-item-color-l',
|
|
2081
|
+
'--bulma-dropdown-item-selected-h',
|
|
2082
|
+
'--bulma-dropdown-item-selected-s',
|
|
2083
|
+
'--bulma-dropdown-item-selected-l',
|
|
2084
|
+
'--bulma-dropdown-item-selected-background-l',
|
|
2085
|
+
'--bulma-dropdown-item-selected-color-l',
|
|
2086
|
+
'--bulma-dropdown-divider-background-color',
|
|
2087
|
+
'--bulma-menu-item-h',
|
|
2088
|
+
'--bulma-menu-item-s',
|
|
2089
|
+
'--bulma-menu-item-l',
|
|
2090
|
+
'--bulma-menu-item-background-l',
|
|
2091
|
+
'--bulma-menu-item-background-l-delta',
|
|
2092
|
+
'--bulma-menu-item-hover-background-l-delta',
|
|
2093
|
+
'--bulma-menu-item-active-background-l-delta',
|
|
2094
|
+
'--bulma-menu-item-color-l',
|
|
2095
|
+
'--bulma-menu-item-radius',
|
|
2096
|
+
'--bulma-menu-item-selected-h',
|
|
2097
|
+
'--bulma-menu-item-selected-s',
|
|
2098
|
+
'--bulma-menu-item-selected-l',
|
|
2099
|
+
'--bulma-menu-item-selected-background-l',
|
|
2100
|
+
'--bulma-menu-item-selected-color-l',
|
|
2101
|
+
'--bulma-menu-list-border-left',
|
|
2102
|
+
'--bulma-menu-list-line-height',
|
|
2103
|
+
'--bulma-menu-list-link-padding',
|
|
2104
|
+
'--bulma-menu-nested-list-margin',
|
|
2105
|
+
'--bulma-menu-nested-list-padding-left',
|
|
2106
|
+
'--bulma-menu-label-color',
|
|
2107
|
+
'--bulma-menu-label-font-size',
|
|
2108
|
+
'--bulma-menu-label-letter-spacing',
|
|
2109
|
+
'--bulma-menu-label-spacing',
|
|
2110
|
+
'--bulma-message-h',
|
|
2111
|
+
'--bulma-message-s',
|
|
2112
|
+
'--bulma-message-background-l',
|
|
2113
|
+
'--bulma-message-border-l',
|
|
2114
|
+
'--bulma-message-border-l-delta',
|
|
2115
|
+
'--bulma-message-border-style',
|
|
2116
|
+
'--bulma-message-border-width',
|
|
2117
|
+
'--bulma-message-color-l',
|
|
2118
|
+
'--bulma-message-radius',
|
|
2119
|
+
'--bulma-message-header-weight',
|
|
2120
|
+
'--bulma-message-header-padding',
|
|
2121
|
+
'--bulma-message-header-radius',
|
|
2122
|
+
'--bulma-message-header-body-border-width',
|
|
2123
|
+
'--bulma-message-header-background-l',
|
|
2124
|
+
'--bulma-message-header-color-l',
|
|
2125
|
+
'--bulma-message-body-border-width',
|
|
2126
|
+
'--bulma-message-body-color',
|
|
2127
|
+
'--bulma-message-body-padding',
|
|
2128
|
+
'--bulma-message-body-radius',
|
|
2129
|
+
'--bulma-message-body-pre-code-background-color',
|
|
2130
|
+
'--bulma-modal-z',
|
|
2131
|
+
'--bulma-modal-background-background-color',
|
|
2132
|
+
'--bulma-modal-content-width',
|
|
2133
|
+
'--bulma-modal-content-margin-mobile',
|
|
2134
|
+
'--bulma-modal-content-spacing-mobile',
|
|
2135
|
+
'--bulma-modal-content-spacing-tablet',
|
|
2136
|
+
'--bulma-modal-close-dimensions',
|
|
2137
|
+
'--bulma-modal-close-right',
|
|
2138
|
+
'--bulma-modal-close-top',
|
|
2139
|
+
'--bulma-modal-card-spacing',
|
|
2140
|
+
'--bulma-modal-card-head-background-color',
|
|
2141
|
+
'--bulma-modal-card-head-padding',
|
|
2142
|
+
'--bulma-modal-card-head-radius',
|
|
2143
|
+
'--bulma-modal-card-title-color',
|
|
2144
|
+
'--bulma-modal-card-title-line-height',
|
|
2145
|
+
'--bulma-modal-card-title-size',
|
|
2146
|
+
'--bulma-modal-card-foot-background-color',
|
|
2147
|
+
'--bulma-modal-card-foot-radius',
|
|
2148
|
+
'--bulma-modal-card-body-background-color',
|
|
2149
|
+
'--bulma-modal-card-body-padding',
|
|
2150
|
+
'--bulma-navbar-h',
|
|
2151
|
+
'--bulma-navbar-s',
|
|
2152
|
+
'--bulma-navbar-l',
|
|
2153
|
+
'--bulma-navbar-background-color',
|
|
2154
|
+
'--bulma-navbar-box-shadow-size',
|
|
2155
|
+
'--bulma-navbar-box-shadow-color',
|
|
2156
|
+
'--bulma-navbar-padding-vertical',
|
|
2157
|
+
'--bulma-navbar-padding-horizontal',
|
|
2158
|
+
'--bulma-navbar-z',
|
|
2159
|
+
'--bulma-navbar-fixed-z',
|
|
2160
|
+
'--bulma-navbar-item-background-a',
|
|
2161
|
+
'--bulma-navbar-item-background-l',
|
|
2162
|
+
'--bulma-navbar-item-background-l-delta',
|
|
2163
|
+
'--bulma-navbar-item-hover-background-l-delta',
|
|
2164
|
+
'--bulma-navbar-item-active-background-l-delta',
|
|
2165
|
+
'--bulma-navbar-item-color-l',
|
|
2166
|
+
'--bulma-navbar-item-selected-h',
|
|
2167
|
+
'--bulma-navbar-item-selected-s',
|
|
2168
|
+
'--bulma-navbar-item-selected-l',
|
|
2169
|
+
'--bulma-navbar-item-selected-background-l',
|
|
2170
|
+
'--bulma-navbar-item-selected-color-l',
|
|
2171
|
+
'--bulma-navbar-item-img-max-height',
|
|
2172
|
+
'--bulma-navbar-burger-color',
|
|
2173
|
+
'--bulma-navbar-tab-hover-background-color',
|
|
2174
|
+
'--bulma-navbar-tab-hover-border-bottom-color',
|
|
2175
|
+
'--bulma-navbar-tab-active-color',
|
|
2176
|
+
'--bulma-navbar-tab-active-background-color',
|
|
2177
|
+
'--bulma-navbar-tab-active-border-bottom-color',
|
|
2178
|
+
'--bulma-navbar-tab-active-border-bottom-style',
|
|
2179
|
+
'--bulma-navbar-tab-active-border-bottom-width',
|
|
2180
|
+
'--bulma-navbar-dropdown-background-color',
|
|
2181
|
+
'--bulma-navbar-dropdown-border-l',
|
|
2182
|
+
'--bulma-navbar-dropdown-border-color',
|
|
2183
|
+
'--bulma-navbar-dropdown-border-style',
|
|
2184
|
+
'--bulma-navbar-dropdown-border-width',
|
|
2185
|
+
'--bulma-navbar-dropdown-offset',
|
|
2186
|
+
'--bulma-navbar-dropdown-arrow',
|
|
2187
|
+
'--bulma-navbar-dropdown-radius',
|
|
2188
|
+
'--bulma-navbar-dropdown-z',
|
|
2189
|
+
'--bulma-navbar-dropdown-boxed-radius',
|
|
2190
|
+
'--bulma-navbar-dropdown-boxed-shadow',
|
|
2191
|
+
'--bulma-navbar-dropdown-item-h',
|
|
2192
|
+
'--bulma-navbar-dropdown-item-s',
|
|
2193
|
+
'--bulma-navbar-dropdown-item-l',
|
|
2194
|
+
'--bulma-navbar-dropdown-item-background-l',
|
|
2195
|
+
'--bulma-navbar-dropdown-item-color-l',
|
|
2196
|
+
'--bulma-navbar-divider-background-l',
|
|
2197
|
+
'--bulma-navbar-divider-height',
|
|
2198
|
+
'--bulma-navbar-bottom-box-shadow-size',
|
|
2199
|
+
'--bulma-pagination-margin',
|
|
2200
|
+
'--bulma-pagination-min-width',
|
|
2201
|
+
'--bulma-pagination-item-h',
|
|
2202
|
+
'--bulma-pagination-item-s',
|
|
2203
|
+
'--bulma-pagination-item-l',
|
|
2204
|
+
'--bulma-pagination-item-background-l-delta',
|
|
2205
|
+
'--bulma-pagination-item-hover-background-l-delta',
|
|
2206
|
+
'--bulma-pagination-item-active-background-l-delta',
|
|
2207
|
+
'--bulma-pagination-item-border-style',
|
|
2208
|
+
'--bulma-pagination-item-border-width',
|
|
2209
|
+
'--bulma-pagination-item-border-l',
|
|
2210
|
+
'--bulma-pagination-item-border-l-delta',
|
|
2211
|
+
'--bulma-pagination-item-hover-border-l-delta',
|
|
2212
|
+
'--bulma-pagination-item-active-border-l-delta',
|
|
2213
|
+
'--bulma-pagination-item-focus-border-l-delta',
|
|
2214
|
+
'--bulma-pagination-item-color-l',
|
|
2215
|
+
'--bulma-pagination-item-font-size',
|
|
2216
|
+
'--bulma-pagination-item-margin',
|
|
2217
|
+
'--bulma-pagination-item-padding-left',
|
|
2218
|
+
'--bulma-pagination-item-padding-right',
|
|
2219
|
+
'--bulma-pagination-item-outer-shadow-h',
|
|
2220
|
+
'--bulma-pagination-item-outer-shadow-s',
|
|
2221
|
+
'--bulma-pagination-item-outer-shadow-l',
|
|
2222
|
+
'--bulma-pagination-item-outer-shadow-a',
|
|
2223
|
+
'--bulma-pagination-nav-padding-left',
|
|
2224
|
+
'--bulma-pagination-nav-padding-right',
|
|
2225
|
+
'--bulma-pagination-disabled-color',
|
|
2226
|
+
'--bulma-pagination-disabled-background-color',
|
|
2227
|
+
'--bulma-pagination-disabled-border-color',
|
|
2228
|
+
'--bulma-pagination-current-color',
|
|
2229
|
+
'--bulma-pagination-current-background-color',
|
|
2230
|
+
'--bulma-pagination-current-border-color',
|
|
2231
|
+
'--bulma-pagination-ellipsis-color',
|
|
2232
|
+
'--bulma-pagination-shadow-inset',
|
|
2233
|
+
'--bulma-pagination-selected-item-h',
|
|
2234
|
+
'--bulma-pagination-selected-item-s',
|
|
2235
|
+
'--bulma-pagination-selected-item-l',
|
|
2236
|
+
'--bulma-pagination-selected-item-background-l',
|
|
2237
|
+
'--bulma-pagination-selected-item-border-l',
|
|
2238
|
+
'--bulma-pagination-selected-item-color-l',
|
|
2239
|
+
'--bulma-panel-margin',
|
|
2240
|
+
'--bulma-panel-item-border',
|
|
2241
|
+
'--bulma-panel-radius',
|
|
2242
|
+
'--bulma-panel-shadow',
|
|
2243
|
+
'--bulma-panel-heading-line-height',
|
|
2244
|
+
'--bulma-panel-heading-padding',
|
|
2245
|
+
'--bulma-panel-heading-radius',
|
|
2246
|
+
'--bulma-panel-heading-size',
|
|
2247
|
+
'--bulma-panel-heading-weight',
|
|
2248
|
+
'--bulma-panel-tabs-font-size',
|
|
2249
|
+
'--bulma-panel-tab-border-bottom-color',
|
|
2250
|
+
'--bulma-panel-tab-border-bottom-style',
|
|
2251
|
+
'--bulma-panel-tab-border-bottom-width',
|
|
2252
|
+
'--bulma-panel-tab-active-color',
|
|
2253
|
+
'--bulma-panel-list-item-color',
|
|
2254
|
+
'--bulma-panel-list-item-hover-color',
|
|
2255
|
+
'--bulma-panel-block-color',
|
|
2256
|
+
'--bulma-panel-block-hover-background-color',
|
|
2257
|
+
'--bulma-panel-block-active-border-left-color',
|
|
2258
|
+
'--bulma-panel-block-active-color',
|
|
2259
|
+
'--bulma-panel-block-active-icon-color',
|
|
2260
|
+
'--bulma-panel-icon-color',
|
|
2261
|
+
'--bulma-tabs-border-bottom-color',
|
|
2262
|
+
'--bulma-tabs-border-bottom-style',
|
|
2263
|
+
'--bulma-tabs-border-bottom-width',
|
|
2264
|
+
'--bulma-tabs-link-color',
|
|
2265
|
+
'--bulma-tabs-link-hover-border-bottom-color',
|
|
2266
|
+
'--bulma-tabs-link-hover-color',
|
|
2267
|
+
'--bulma-tabs-link-active-border-bottom-color',
|
|
2268
|
+
'--bulma-tabs-link-active-color',
|
|
2269
|
+
'--bulma-tabs-link-padding',
|
|
2270
|
+
'--bulma-tabs-boxed-link-radius',
|
|
2271
|
+
'--bulma-tabs-boxed-link-hover-background-color',
|
|
2272
|
+
'--bulma-tabs-boxed-link-hover-border-bottom-color',
|
|
2273
|
+
'--bulma-tabs-boxed-link-active-background-color',
|
|
2274
|
+
'--bulma-tabs-boxed-link-active-border-color',
|
|
2275
|
+
'--bulma-tabs-boxed-link-active-border-bottom-color',
|
|
2276
|
+
'--bulma-tabs-toggle-link-border-color',
|
|
2277
|
+
'--bulma-tabs-toggle-link-border-style',
|
|
2278
|
+
'--bulma-tabs-toggle-link-border-width',
|
|
2279
|
+
'--bulma-tabs-toggle-link-hover-background-color',
|
|
2280
|
+
'--bulma-tabs-toggle-link-hover-border-color',
|
|
2281
|
+
'--bulma-tabs-toggle-link-radius',
|
|
2282
|
+
'--bulma-tabs-toggle-link-active-background-color',
|
|
2283
|
+
'--bulma-tabs-toggle-link-active-border-color',
|
|
2284
|
+
'--bulma-tabs-toggle-link-active-color',
|
|
2285
|
+
'--bulma-box-background-color',
|
|
2286
|
+
'--bulma-box-color',
|
|
2287
|
+
'--bulma-box-radius',
|
|
2288
|
+
'--bulma-box-shadow',
|
|
2289
|
+
'--bulma-box-padding',
|
|
2290
|
+
'--bulma-box-link-hover-shadow',
|
|
2291
|
+
'--bulma-box-link-active-shadow',
|
|
2292
|
+
'--bulma-content-heading-color',
|
|
2293
|
+
'--bulma-content-heading-weight',
|
|
2294
|
+
'--bulma-content-heading-line-height',
|
|
2295
|
+
'--bulma-content-block-margin-bottom',
|
|
2296
|
+
'--bulma-content-blockquote-background-color',
|
|
2297
|
+
'--bulma-content-blockquote-border-left',
|
|
2298
|
+
'--bulma-content-blockquote-padding',
|
|
2299
|
+
'--bulma-content-pre-padding',
|
|
2300
|
+
'--bulma-content-table-cell-border',
|
|
2301
|
+
'--bulma-content-table-cell-border-width',
|
|
2302
|
+
'--bulma-content-table-cell-padding',
|
|
2303
|
+
'--bulma-content-table-cell-heading-color',
|
|
2304
|
+
'--bulma-content-table-head-cell-border-width',
|
|
2305
|
+
'--bulma-content-table-head-cell-color',
|
|
2306
|
+
'--bulma-content-table-body-last-row-cell-border-bottom-width',
|
|
2307
|
+
'--bulma-content-table-foot-cell-border-width',
|
|
2308
|
+
'--bulma-content-table-foot-cell-color',
|
|
2309
|
+
'--bulma-delete-dimensions',
|
|
2310
|
+
'--bulma-delete-background-l',
|
|
2311
|
+
'--bulma-delete-background-alpha',
|
|
2312
|
+
'--bulma-delete-color',
|
|
2313
|
+
'--bulma-icon-dimensions',
|
|
2314
|
+
'--bulma-icon-dimensions-small',
|
|
2315
|
+
'--bulma-icon-dimensions-medium',
|
|
2316
|
+
'--bulma-icon-dimensions-large',
|
|
2317
|
+
'--bulma-icon-text-spacing',
|
|
2318
|
+
'--bulma-notification-h',
|
|
2319
|
+
'--bulma-notification-s',
|
|
2320
|
+
'--bulma-notification-background-l',
|
|
2321
|
+
'--bulma-notification-color-l',
|
|
2322
|
+
'--bulma-notification-code-background-color',
|
|
2323
|
+
'--bulma-notification-radius',
|
|
2324
|
+
'--bulma-notification-padding',
|
|
2325
|
+
'--bulma-progress-border-radius',
|
|
2326
|
+
'--bulma-progress-bar-background-color',
|
|
2327
|
+
'--bulma-progress-value-background-color',
|
|
2328
|
+
'--bulma-progress-indeterminate-duration',
|
|
2329
|
+
'--bulma-table-color',
|
|
2330
|
+
'--bulma-table-background-color',
|
|
2331
|
+
'--bulma-table-cell-border-color',
|
|
2332
|
+
'--bulma-table-cell-border-style',
|
|
2333
|
+
'--bulma-table-cell-border-width',
|
|
2334
|
+
'--bulma-table-cell-padding',
|
|
2335
|
+
'--bulma-table-cell-heading-color',
|
|
2336
|
+
'--bulma-table-cell-text-align',
|
|
2337
|
+
'--bulma-table-head-cell-border-width',
|
|
2338
|
+
'--bulma-table-head-cell-color',
|
|
2339
|
+
'--bulma-table-foot-cell-border-width',
|
|
2340
|
+
'--bulma-table-foot-cell-color',
|
|
2341
|
+
'--bulma-table-head-background-color',
|
|
2342
|
+
'--bulma-table-body-background-color',
|
|
2343
|
+
'--bulma-table-foot-background-color',
|
|
2344
|
+
'--bulma-table-row-hover-background-color',
|
|
2345
|
+
'--bulma-table-row-active-background-color',
|
|
2346
|
+
'--bulma-table-row-active-color',
|
|
2347
|
+
'--bulma-table-striped-row-even-background-color',
|
|
2348
|
+
'--bulma-table-striped-row-even-hover-background-color',
|
|
2349
|
+
'--bulma-tag-h',
|
|
2350
|
+
'--bulma-tag-s',
|
|
2351
|
+
'--bulma-tag-background-l',
|
|
2352
|
+
'--bulma-tag-background-l-delta',
|
|
2353
|
+
'--bulma-tag-hover-background-l-delta',
|
|
2354
|
+
'--bulma-tag-active-background-l-delta',
|
|
2355
|
+
'--bulma-tag-color-l',
|
|
2356
|
+
'--bulma-tag-radius',
|
|
2357
|
+
'--bulma-tag-delete-margin',
|
|
2358
|
+
'--bulma-title-color',
|
|
2359
|
+
'--bulma-title-family',
|
|
2360
|
+
'--bulma-title-size',
|
|
2361
|
+
'--bulma-title-weight',
|
|
2362
|
+
'--bulma-title-line-height',
|
|
2363
|
+
'--bulma-title-strong-color',
|
|
2364
|
+
'--bulma-title-strong-weight',
|
|
2365
|
+
'--bulma-title-sub-size',
|
|
2366
|
+
'--bulma-title-sup-size',
|
|
2367
|
+
'--bulma-subtitle-color',
|
|
2368
|
+
'--bulma-subtitle-family',
|
|
2369
|
+
'--bulma-subtitle-size',
|
|
2370
|
+
'--bulma-subtitle-weight',
|
|
2371
|
+
'--bulma-subtitle-line-height',
|
|
2372
|
+
'--bulma-subtitle-strong-color',
|
|
2373
|
+
'--bulma-subtitle-strong-weight',
|
|
2374
|
+
'--bulma-control-radius',
|
|
2375
|
+
'--bulma-control-radius-small',
|
|
2376
|
+
'--bulma-control-border-width',
|
|
2377
|
+
'--bulma-control-height',
|
|
2378
|
+
'--bulma-control-line-height',
|
|
2379
|
+
'--bulma-control-padding-vertical',
|
|
2380
|
+
'--bulma-control-padding-horizontal',
|
|
2381
|
+
'--bulma-control-size',
|
|
2382
|
+
'--bulma-control-focus-shadow-l',
|
|
2383
|
+
'--bulma-file-radius',
|
|
2384
|
+
'--bulma-file-name-border-color',
|
|
2385
|
+
'--bulma-file-name-border-style',
|
|
2386
|
+
'--bulma-file-name-border-width',
|
|
2387
|
+
'--bulma-file-name-max-width',
|
|
2388
|
+
'--bulma-file-h',
|
|
2389
|
+
'--bulma-file-s',
|
|
2390
|
+
'--bulma-file-background-l',
|
|
2391
|
+
'--bulma-file-background-l-delta',
|
|
2392
|
+
'--bulma-file-hover-background-l-delta',
|
|
2393
|
+
'--bulma-file-active-background-l-delta',
|
|
2394
|
+
'--bulma-file-border-l',
|
|
2395
|
+
'--bulma-file-border-l-delta',
|
|
2396
|
+
'--bulma-file-hover-border-l-delta',
|
|
2397
|
+
'--bulma-file-active-border-l-delta',
|
|
2398
|
+
'--bulma-file-cta-color-l',
|
|
2399
|
+
'--bulma-file-name-color-l',
|
|
2400
|
+
'--bulma-file-color-l-delta',
|
|
2401
|
+
'--bulma-file-hover-color-l-delta',
|
|
2402
|
+
'--bulma-file-active-color-l-delta',
|
|
2403
|
+
'--bulma-input-h',
|
|
2404
|
+
'--bulma-input-s',
|
|
2405
|
+
'--bulma-input-l',
|
|
2406
|
+
'--bulma-input-border-style',
|
|
2407
|
+
'--bulma-input-border-l',
|
|
2408
|
+
'--bulma-input-border-l-delta',
|
|
2409
|
+
'--bulma-input-hover-border-l-delta',
|
|
2410
|
+
'--bulma-input-active-border-l-delta',
|
|
2411
|
+
'--bulma-input-focus-h',
|
|
2412
|
+
'--bulma-input-focus-s',
|
|
2413
|
+
'--bulma-input-focus-l',
|
|
2414
|
+
'--bulma-input-focus-shadow-size',
|
|
2415
|
+
'--bulma-input-focus-shadow-alpha',
|
|
2416
|
+
'--bulma-input-color-l',
|
|
2417
|
+
'--bulma-input-background-l',
|
|
2418
|
+
'--bulma-input-background-l-delta',
|
|
2419
|
+
'--bulma-input-height',
|
|
2420
|
+
'--bulma-input-shadow',
|
|
2421
|
+
'--bulma-input-placeholder-color',
|
|
2422
|
+
'--bulma-input-disabled-color',
|
|
2423
|
+
'--bulma-input-disabled-background-color',
|
|
2424
|
+
'--bulma-input-disabled-border-color',
|
|
2425
|
+
'--bulma-input-disabled-placeholder-color',
|
|
2426
|
+
'--bulma-input-arrow',
|
|
2427
|
+
'--bulma-input-icon-color',
|
|
2428
|
+
'--bulma-input-icon-hover-color',
|
|
2429
|
+
'--bulma-input-icon-focus-color',
|
|
2430
|
+
'--bulma-input-radius',
|
|
2431
|
+
'--bulma-column-gap',
|
|
2432
|
+
'--bulma-grid-gap',
|
|
2433
|
+
'--bulma-grid-column-count',
|
|
2434
|
+
'--bulma-grid-column-min',
|
|
2435
|
+
'--bulma-grid-cell-column-span',
|
|
2436
|
+
'--bulma-grid-cell-column-start',
|
|
2437
|
+
'--bulma-footer-background-color',
|
|
2438
|
+
'--bulma-footer-color',
|
|
2439
|
+
'--bulma-footer-padding',
|
|
2440
|
+
'--bulma-hero-body-padding',
|
|
2441
|
+
'--bulma-hero-body-padding-tablet',
|
|
2442
|
+
'--bulma-hero-body-padding-small',
|
|
2443
|
+
'--bulma-hero-body-padding-medium',
|
|
2444
|
+
'--bulma-hero-body-padding-large',
|
|
2445
|
+
'--bulma-media-border-color',
|
|
2446
|
+
'--bulma-media-border-size',
|
|
2447
|
+
'--bulma-media-spacing',
|
|
2448
|
+
'--bulma-media-spacing-large',
|
|
2449
|
+
'--bulma-media-content-spacing',
|
|
2450
|
+
'--bulma-media-level-1-spacing',
|
|
2451
|
+
'--bulma-media-level-1-content-spacing',
|
|
2452
|
+
'--bulma-media-level-2-spacing',
|
|
2453
|
+
'--bulma-section-padding',
|
|
2454
|
+
'--bulma-section-padding-desktop',
|
|
2455
|
+
'--bulma-section-padding-medium',
|
|
2456
|
+
'--bulma-section-padding-large',
|
|
2457
|
+
];
|
|
2458
|
+
function cssVarToProp(varName) {
|
|
2459
|
+
return varName
|
|
2460
|
+
.replace(/^--bulma-/, '')
|
|
2461
|
+
.split('-')
|
|
2462
|
+
.map((part, i) => i === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1))
|
|
2463
|
+
.join('');
|
|
2464
|
+
}
|
|
2465
|
+
const bulmaVarPropMap = Object.fromEntries(bulmaCssVars.map(cssVar => [cssVarToProp(cssVar), cssVar]));
|
|
2466
|
+
const Theme = ({ bulmaVars = {}, children, className, isRoot = false, ...restProps }) => {
|
|
2467
|
+
const { bulmaVarProps, otherProps } = useMemo(() => {
|
|
2468
|
+
const varProps = {};
|
|
2469
|
+
const otherPropsObj = {};
|
|
2470
|
+
for (const [key, value] of Object.entries(restProps)) {
|
|
2471
|
+
if (Object.prototype.hasOwnProperty.call(bulmaVarPropMap, key)) {
|
|
2472
|
+
varProps[key] = value;
|
|
2473
|
+
}
|
|
2474
|
+
else {
|
|
2475
|
+
otherPropsObj[key] = value;
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
return { bulmaVarProps: varProps, otherProps: otherPropsObj };
|
|
2479
|
+
}, [restProps]);
|
|
2480
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses(otherProps);
|
|
2481
|
+
const mergedVars = useMemo(() => {
|
|
2482
|
+
const vars = { ...bulmaVars };
|
|
2483
|
+
for (const [propName, cssVar] of Object.entries(bulmaVarPropMap)) {
|
|
2484
|
+
if (bulmaVarProps[propName] !== undefined) {
|
|
2485
|
+
vars[cssVar] = bulmaVarProps[propName];
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
return vars;
|
|
2489
|
+
}, [bulmaVars, bulmaVarProps]);
|
|
2490
|
+
useEffect(() => {
|
|
2491
|
+
if (!isRoot) {
|
|
2492
|
+
return;
|
|
2493
|
+
}
|
|
2494
|
+
const validVars = Object.entries(mergedVars).filter(([key, value]) => bulmaCssVars.includes(key) && value);
|
|
2495
|
+
if (validVars.length === 0) {
|
|
2496
|
+
return;
|
|
2497
|
+
}
|
|
2498
|
+
const styleId = 'bestax-bulma-theme-vars';
|
|
2499
|
+
let styleElement = document.getElementById(styleId);
|
|
2500
|
+
if (!styleElement) {
|
|
2501
|
+
styleElement = document.createElement('style');
|
|
2502
|
+
styleElement.id = styleId;
|
|
2503
|
+
document.head.appendChild(styleElement);
|
|
2504
|
+
}
|
|
2505
|
+
const cssRules = validVars
|
|
2506
|
+
.map(([key, value]) => `${key}: ${value};`)
|
|
2507
|
+
.join(' ');
|
|
2508
|
+
styleElement.textContent = `:root { ${cssRules} }`;
|
|
2509
|
+
return () => {
|
|
2510
|
+
const element = document.getElementById(styleId);
|
|
2511
|
+
if (element) {
|
|
2512
|
+
element.remove();
|
|
2513
|
+
}
|
|
2514
|
+
};
|
|
2515
|
+
}, [mergedVars, isRoot]);
|
|
2516
|
+
const style = useMemo(() => {
|
|
2517
|
+
if (isRoot) {
|
|
2518
|
+
return {};
|
|
2519
|
+
}
|
|
2520
|
+
const styleObj = {};
|
|
2521
|
+
for (const [key, value] of Object.entries(mergedVars)) {
|
|
2522
|
+
if (bulmaCssVars.includes(key) && value) {
|
|
2523
|
+
styleObj[key] = value;
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
return styleObj;
|
|
2527
|
+
}, [mergedVars, isRoot]);
|
|
2528
|
+
const combinedClassName = useMemo(() => {
|
|
2529
|
+
if (isRoot) {
|
|
2530
|
+
return '';
|
|
2531
|
+
}
|
|
2532
|
+
return classNames(className, bulmaHelperClasses);
|
|
2533
|
+
}, [className, bulmaHelperClasses, isRoot]);
|
|
2534
|
+
return isRoot ? (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children })) : (jsxRuntimeExports.jsx("div", { className: combinedClassName || undefined, style: style, ...rest, children: children }));
|
|
2535
|
+
};
|
|
2536
|
+
|
|
1876
2537
|
const Container = ({ className, textColor, bgColor, fluid, widescreen, fullhd, breakpoint, isMax, children, ...props }) => {
|
|
1877
2538
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1878
2539
|
color: textColor,
|
|
@@ -1893,29 +2554,40 @@ const Container = ({ className, textColor, bgColor, fluid, widescreen, fullhd, b
|
|
|
1893
2554
|
breakpointClass = `is-${breakpoint}`;
|
|
1894
2555
|
}
|
|
1895
2556
|
}
|
|
1896
|
-
const
|
|
2557
|
+
const mainClass = usePrefixedClassNames('container');
|
|
2558
|
+
const containerModifiers = usePrefixedClassNames('', {
|
|
1897
2559
|
'is-fluid': fluid,
|
|
1898
2560
|
'is-widescreen': widescreen,
|
|
1899
2561
|
'is-fullhd': fullhd,
|
|
1900
|
-
}
|
|
2562
|
+
});
|
|
2563
|
+
const prefixedBreakpointClass = usePrefixedClassNames(breakpointClass || '');
|
|
2564
|
+
const containerClasses = classNames(mainClass, containerModifiers, prefixedBreakpointClass, className, bulmaHelperClasses);
|
|
1901
2565
|
return (jsxRuntimeExports.jsx("div", { className: containerClasses, ...rest, children: children }));
|
|
1902
2566
|
};
|
|
1903
2567
|
|
|
1904
|
-
const Footer = ({ as = 'footer', className, children, ...props }) => {
|
|
1905
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses(
|
|
2568
|
+
const Footer = ({ as = 'footer', className, children, color, bgColor, textColor, ...props }) => {
|
|
2569
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2570
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2571
|
+
backgroundColor: bgColor,
|
|
2572
|
+
...props,
|
|
2573
|
+
});
|
|
1906
2574
|
const Tag = as;
|
|
1907
|
-
|
|
2575
|
+
const mainClass = usePrefixedClassNames('footer');
|
|
2576
|
+
const footerClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2577
|
+
return (jsxRuntimeExports.jsx(Tag, { className: footerClasses, ...rest, children: children }));
|
|
1908
2578
|
};
|
|
1909
2579
|
|
|
1910
2580
|
const Hero = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
|
|
1911
2581
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1912
|
-
color,
|
|
1913
2582
|
backgroundColor: bgColor,
|
|
1914
2583
|
...props,
|
|
1915
2584
|
});
|
|
1916
|
-
const
|
|
2585
|
+
const mainClass = usePrefixedClassNames('hero', {
|
|
2586
|
+
[`is-${color}`]: color,
|
|
2587
|
+
[`is-${size}`]: size && size !== 'fullheight-with-navbar',
|
|
1917
2588
|
'is-fullheight-with-navbar': fullheightWithNavbar || size === 'fullheight-with-navbar',
|
|
1918
2589
|
});
|
|
2590
|
+
const heroClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
1919
2591
|
return (jsxRuntimeExports.jsx("section", { className: heroClasses, ...rest, children: children }));
|
|
1920
2592
|
};
|
|
1921
2593
|
const HeroHead = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
@@ -1924,7 +2596,9 @@ const HeroHead = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
1924
2596
|
backgroundColor: bgColor,
|
|
1925
2597
|
...props,
|
|
1926
2598
|
});
|
|
1927
|
-
|
|
2599
|
+
const mainClass = usePrefixedClassNames('hero-head');
|
|
2600
|
+
const heroHeadClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2601
|
+
return (jsxRuntimeExports.jsx("div", { className: heroHeadClasses, ...rest, children: children }));
|
|
1928
2602
|
};
|
|
1929
2603
|
const HeroBody = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
1930
2604
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
@@ -1932,7 +2606,9 @@ const HeroBody = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
1932
2606
|
backgroundColor: bgColor,
|
|
1933
2607
|
...props,
|
|
1934
2608
|
});
|
|
1935
|
-
|
|
2609
|
+
const mainClass = usePrefixedClassNames('hero-body');
|
|
2610
|
+
const heroBodyClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2611
|
+
return (jsxRuntimeExports.jsx("div", { className: heroBodyClasses, ...rest, children: children }));
|
|
1936
2612
|
};
|
|
1937
2613
|
const HeroFoot = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
1938
2614
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
@@ -1940,71 +2616,126 @@ const HeroFoot = ({ className, children, color, bgColor, textColor, ...props })
|
|
|
1940
2616
|
backgroundColor: bgColor,
|
|
1941
2617
|
...props,
|
|
1942
2618
|
});
|
|
1943
|
-
|
|
2619
|
+
const mainClass = usePrefixedClassNames('hero-foot');
|
|
2620
|
+
const heroFootClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2621
|
+
return (jsxRuntimeExports.jsx("div", { className: heroFootClasses, ...rest, children: children }));
|
|
1944
2622
|
};
|
|
1945
2623
|
Hero.Head = HeroHead;
|
|
1946
2624
|
Hero.Body = HeroBody;
|
|
1947
2625
|
Hero.Foot = HeroFoot;
|
|
1948
2626
|
|
|
1949
|
-
const Level = ({ isMobile, className, children, ...props }) => {
|
|
1950
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses(
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
2627
|
+
const Level = ({ isMobile, className, children, color, bgColor, textColor, ...props }) => {
|
|
2628
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2629
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2630
|
+
backgroundColor: bgColor,
|
|
2631
|
+
...props,
|
|
2632
|
+
});
|
|
2633
|
+
const mainClass = usePrefixedClassNames('level', {
|
|
2634
|
+
'is-mobile': isMobile,
|
|
2635
|
+
});
|
|
2636
|
+
const levelClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2637
|
+
return (jsxRuntimeExports.jsx("nav", { className: levelClasses, ...rest, children: children }));
|
|
1954
2638
|
};
|
|
1955
|
-
const LevelLeft = ({ className, children, ...props }) => {
|
|
1956
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses(
|
|
1957
|
-
|
|
2639
|
+
const LevelLeft = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
2640
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2641
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2642
|
+
backgroundColor: bgColor,
|
|
2643
|
+
...props,
|
|
2644
|
+
});
|
|
2645
|
+
const mainClass = usePrefixedClassNames('level-left');
|
|
2646
|
+
const levelLeftClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2647
|
+
return (jsxRuntimeExports.jsx("div", { className: levelLeftClasses, ...rest, children: children }));
|
|
1958
2648
|
};
|
|
1959
|
-
const LevelRight = ({ className, children, ...props }) => {
|
|
1960
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses(
|
|
1961
|
-
|
|
2649
|
+
const LevelRight = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
2650
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2651
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2652
|
+
backgroundColor: bgColor,
|
|
2653
|
+
...props,
|
|
2654
|
+
});
|
|
2655
|
+
const mainClass = usePrefixedClassNames('level-right');
|
|
2656
|
+
const levelRightClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2657
|
+
return (jsxRuntimeExports.jsx("div", { className: levelRightClasses, ...rest, children: children }));
|
|
1962
2658
|
};
|
|
1963
|
-
const LevelItem = ({ as = 'div', hasTextCentered, className, children, href, target, rel, ...props }) => {
|
|
1964
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses(
|
|
2659
|
+
const LevelItem = ({ as = 'div', hasTextCentered, className, children, href, target, rel, color, bgColor, textColor, ...props }) => {
|
|
2660
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2661
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2662
|
+
backgroundColor: bgColor,
|
|
2663
|
+
...props,
|
|
2664
|
+
});
|
|
1965
2665
|
const Tag = as;
|
|
2666
|
+
const mainClass = usePrefixedClassNames('level-item', {
|
|
2667
|
+
'has-text-centered': hasTextCentered,
|
|
2668
|
+
});
|
|
2669
|
+
const levelItemClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
1966
2670
|
if (Tag === 'a') {
|
|
1967
|
-
return (jsxRuntimeExports.jsx("a", { className:
|
|
1968
|
-
'has-text-centered': hasTextCentered,
|
|
1969
|
-
}), href: href, target: target, rel: rel, ...rest, children: children }));
|
|
2671
|
+
return (jsxRuntimeExports.jsx("a", { className: levelItemClasses, href: href, target: target, rel: rel, ...rest, children: children }));
|
|
1970
2672
|
}
|
|
1971
|
-
return (jsxRuntimeExports.jsx(Tag, { className:
|
|
1972
|
-
'has-text-centered': hasTextCentered,
|
|
1973
|
-
}), ...rest, children: children }));
|
|
2673
|
+
return (jsxRuntimeExports.jsx(Tag, { className: levelItemClasses, ...rest, children: children }));
|
|
1974
2674
|
};
|
|
1975
2675
|
Level.Left = LevelLeft;
|
|
1976
2676
|
Level.Right = LevelRight;
|
|
1977
2677
|
Level.Item = LevelItem;
|
|
1978
2678
|
|
|
1979
|
-
const Media = ({ as = 'article', className, children, ...props }) => {
|
|
1980
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses(
|
|
2679
|
+
const Media = ({ as = 'article', className, children, color, bgColor, textColor, ...props }) => {
|
|
2680
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2681
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2682
|
+
backgroundColor: bgColor,
|
|
2683
|
+
...props,
|
|
2684
|
+
});
|
|
1981
2685
|
const Tag = as;
|
|
1982
|
-
|
|
2686
|
+
const mainClass = usePrefixedClassNames('media');
|
|
2687
|
+
const mediaClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2688
|
+
return (jsxRuntimeExports.jsx(Tag, { className: mediaClasses, ...rest, children: children }));
|
|
1983
2689
|
};
|
|
1984
|
-
const MediaLeft = ({ as = 'figure', className, children, ...props }) => {
|
|
1985
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses(
|
|
2690
|
+
const MediaLeft = ({ as = 'figure', className, children, color, bgColor, textColor, ...props }) => {
|
|
2691
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2692
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2693
|
+
backgroundColor: bgColor,
|
|
2694
|
+
...props,
|
|
2695
|
+
});
|
|
1986
2696
|
const Tag = as;
|
|
1987
|
-
|
|
2697
|
+
const mainClass = usePrefixedClassNames('media-left');
|
|
2698
|
+
const mediaLeftClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2699
|
+
return (jsxRuntimeExports.jsx(Tag, { className: mediaLeftClasses, ...rest, children: children }));
|
|
1988
2700
|
};
|
|
1989
|
-
const MediaContent = ({ className, children, ...props }) => {
|
|
1990
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses(
|
|
1991
|
-
|
|
2701
|
+
const MediaContent = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
2702
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2703
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2704
|
+
backgroundColor: bgColor,
|
|
2705
|
+
...props,
|
|
2706
|
+
});
|
|
2707
|
+
const mainClass = usePrefixedClassNames('media-content');
|
|
2708
|
+
const mediaContentClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2709
|
+
return (jsxRuntimeExports.jsx("div", { className: mediaContentClasses, ...rest, children: children }));
|
|
1992
2710
|
};
|
|
1993
|
-
const MediaRight = ({ className, children, ...props }) => {
|
|
1994
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses(
|
|
1995
|
-
|
|
2711
|
+
const MediaRight = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
2712
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2713
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2714
|
+
backgroundColor: bgColor,
|
|
2715
|
+
...props,
|
|
2716
|
+
});
|
|
2717
|
+
const mainClass = usePrefixedClassNames('media-right');
|
|
2718
|
+
const mediaRightClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
2719
|
+
return (jsxRuntimeExports.jsx("div", { className: mediaRightClasses, ...rest, children: children }));
|
|
1996
2720
|
};
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2721
|
+
const MediaWithSubcomponents = Media;
|
|
2722
|
+
MediaWithSubcomponents.Left = MediaLeft;
|
|
2723
|
+
MediaWithSubcomponents.Content = MediaContent;
|
|
2724
|
+
MediaWithSubcomponents.Right = MediaRight;
|
|
2000
2725
|
|
|
2001
|
-
const Section = ({ size, className, children, ...props }) => {
|
|
2002
|
-
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2003
|
-
|
|
2726
|
+
const Section = ({ size, className, children, color, bgColor, textColor, ...props }) => {
|
|
2727
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2728
|
+
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
2729
|
+
backgroundColor: bgColor,
|
|
2730
|
+
...props,
|
|
2731
|
+
});
|
|
2732
|
+
const mainClass = usePrefixedClassNames('section');
|
|
2733
|
+
const sectionModifiers = usePrefixedClassNames('', {
|
|
2004
2734
|
[`is-${size}`]: size,
|
|
2005
2735
|
});
|
|
2736
|
+
const sectionClasses = classNames(mainClass, sectionModifiers, className, bulmaHelperClasses);
|
|
2006
2737
|
return (jsxRuntimeExports.jsx("section", { className: sectionClasses, ...rest, children: children }));
|
|
2007
2738
|
};
|
|
2008
2739
|
|
|
2009
|
-
export { Block, Box, Breadcrumb, Button, Buttons, Card, Cell, Checkbox, Checkboxes, Column, Columns, Container, Content, Control, Delete, Dropdown, DropdownDivider, DropdownItem, Field, FieldBody, FieldLabel, File, Footer, Grid, Hero, HeroBody, HeroFoot, HeroHead, Icon, IconText, Image, Input, Level, LevelItem, LevelLeft, LevelRight, Media, MediaContent, MediaLeft, MediaRight, Menu, MenuItem, MenuLabel, MenuList, Message, Modal, Navbar, NavbarBrand, NavbarBurger, NavbarDivider, NavbarDropdown, NavbarDropdownMenu, NavbarEnd, NavbarItem, NavbarMenu, NavbarStart, Notification, Pagination, PaginationEllipsis, PaginationLink, PaginationList, PaginationNext, PaginationPrevious, Panel, PanelBlock, PanelButtonBlock, PanelCheckboxBlock, PanelHeading, PanelIcon, PanelInputBlock, PanelTabs, Progress, Radio, Radios, Section, Select, Skeleton, SubTitle, TabItem, TabList, Table, Tabs, Tag, Tags, Tbody, Td, TextArea, Tfoot, Th, Thead, Title, Tr, __test_exports__, classNames, isBrowser, useBulmaClasses, validAlignContents, validAlignItems, validAlignSelfs, validAlignments$1 as validAlignments, validColorShades, validColors, validDisplays, validFlexDirections, validFlexGrowShrink, validFlexWraps, validFontFamilies, validJustifyContents, validSizes$1 as validSizes, validTableColors, validTextSizes, validTextTransforms, validTextWeights, validViewports, validVisibilities };
|
|
2740
|
+
export { Block, Box, Breadcrumb, Button, Buttons, Card, Cell, Checkbox, Checkboxes, Column, Columns, ConfigProvider, Container, Content, Control, Delete, Dropdown, DropdownDivider, DropdownItem, Field, FieldBody, FieldLabel, File, Footer, Grid, Hero, HeroBody, HeroFoot, HeroHead, Icon, IconText, Image, Input, Level, LevelItem, LevelLeft, LevelRight, Media, MediaContent, MediaLeft, MediaRight, Menu, MenuItem, MenuLabel, MenuList, Message, Modal, Navbar, NavbarBrand, NavbarBurger, NavbarDivider, NavbarDropdown, NavbarDropdownMenu, NavbarEnd, NavbarItem, NavbarMenu, NavbarStart, Notification, Pagination, PaginationEllipsis, PaginationLink, PaginationList, PaginationNext, PaginationPrevious, Panel, PanelBlock, PanelButtonBlock, PanelCheckboxBlock, PanelHeading, PanelIcon, PanelInputBlock, PanelTabs, Progress, Radio, Radios, Section, Select, Skeleton, SubTitle, TabItem, TabList, Table, Tabs, Tag, Tags, Tbody, Td, TextArea, Tfoot, Th, Thead, Theme, Title, Tr, __test_exports__, classNames, createPrefixedClassNames, isBrowser, prefixedClassNames, useBulmaClasses, useClassPrefix, useConfig, usePrefixedClass, usePrefixedClassNames, validAlignContents, validAlignItems, validAlignSelfs, validAlignments$1 as validAlignments, validColorShades, validColors, validDisplays, validFlexDirections, validFlexGrowShrink, validFlexWraps, validFontFamilies, validJustifyContents, validSizes$1 as validSizes, validTableColors, validTextSizes, validTextTransforms, validTextWeights, validViewports, validVisibilities };
|
|
2010
2741
|
//# sourceMappingURL=index.esm.js.map
|