@allxsmith/bestax-bulma 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +805 -63
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +802 -65
- package/dist/index.esm.js.map +1 -1
- package/dist/types/elements/Box.d.ts +1 -0
- package/dist/types/helpers/Config.d.ts +11 -0
- package/dist/types/helpers/Theme.d.ts +49 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo,
|
|
1
|
+
import React, { useMemo, createContext, useContext, useState, useRef, useEffect, forwardRef } from 'react';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = {exports: {}};
|
|
4
4
|
|
|
@@ -729,6 +729,16 @@ const useBulmaClasses = (props) => {
|
|
|
729
729
|
return { bulmaHelperClasses, rest };
|
|
730
730
|
};
|
|
731
731
|
|
|
732
|
+
const ConfigContext = createContext({});
|
|
733
|
+
const useConfig = () => useContext(ConfigContext);
|
|
734
|
+
const ConfigProvider = ({ classPrefix, children, }) => {
|
|
735
|
+
return (jsxRuntimeExports.jsx(ConfigContext.Provider, { value: { classPrefix }, children: children }));
|
|
736
|
+
};
|
|
737
|
+
const useClassPrefix = () => {
|
|
738
|
+
const { classPrefix } = useConfig();
|
|
739
|
+
return classPrefix || '';
|
|
740
|
+
};
|
|
741
|
+
|
|
732
742
|
function getColumnClassNames(props) {
|
|
733
743
|
const classList = [];
|
|
734
744
|
const sizeProps = [
|
|
@@ -787,7 +797,9 @@ const Column = ({ className, textColor, bgColor, size, sizeMobile, sizeTablet, s
|
|
|
787
797
|
backgroundColor: bgColor,
|
|
788
798
|
...props,
|
|
789
799
|
});
|
|
790
|
-
const
|
|
800
|
+
const { classPrefix } = useConfig();
|
|
801
|
+
const mainClass = classPrefix ? `${classPrefix}column` : 'column';
|
|
802
|
+
const columnClasses = classNames(mainClass, ...getColumnClassNames({
|
|
791
803
|
size,
|
|
792
804
|
sizeMobile,
|
|
793
805
|
sizeTablet,
|
|
@@ -837,7 +849,9 @@ const Columns = ({ className, textColor, bgColor, isCentered, isGapless, isMulti
|
|
|
837
849
|
backgroundColor: bgColor,
|
|
838
850
|
...props,
|
|
839
851
|
});
|
|
840
|
-
const
|
|
852
|
+
const { classPrefix } = useConfig();
|
|
853
|
+
const mainClass = classPrefix ? `${classPrefix}columns` : 'columns';
|
|
854
|
+
const columnsClasses = classNames(mainClass, {
|
|
841
855
|
'is-centered': isCentered,
|
|
842
856
|
'is-gapless': isGapless,
|
|
843
857
|
'is-multiline': isMultiline,
|
|
@@ -864,8 +878,10 @@ const validBreadcrumbSeparators = [
|
|
|
864
878
|
];
|
|
865
879
|
const validBreadcrumbSizes = ['small', 'medium', 'large'];
|
|
866
880
|
const Breadcrumb = ({ className, alignment, separator, size, children, ...props }) => {
|
|
881
|
+
const { classPrefix } = useConfig();
|
|
867
882
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
868
|
-
const
|
|
883
|
+
const mainClass = classPrefix ? `${classPrefix}breadcrumb` : 'breadcrumb';
|
|
884
|
+
const breadcrumbClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
869
885
|
[`is-${alignment}`]: alignment && validBreadcrumbAlignments.includes(alignment),
|
|
870
886
|
[`has-${separator}-separator`]: separator && validBreadcrumbSeparators.includes(separator),
|
|
871
887
|
[`is-${size}`]: size && validBreadcrumbSizes.includes(size),
|
|
@@ -880,12 +896,14 @@ const renderFooter = (footer) => {
|
|
|
880
896
|
return items.map((item, idx) => (jsxRuntimeExports.jsx("span", { className: "card-footer-item", children: item }, idx)));
|
|
881
897
|
};
|
|
882
898
|
const Card = ({ className, children, textColor, bgColor, hasShadow = true, header, headerCentered, headerIcon, footer, image, imageAlt, ...props }) => {
|
|
899
|
+
const { classPrefix } = useConfig();
|
|
883
900
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
884
901
|
color: textColor,
|
|
885
902
|
backgroundColor: bgColor,
|
|
886
903
|
...props,
|
|
887
904
|
});
|
|
888
|
-
const
|
|
905
|
+
const mainClass = classPrefix ? `${classPrefix}card` : 'card';
|
|
906
|
+
const cardClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
889
907
|
'is-shadowless': !hasShadow,
|
|
890
908
|
});
|
|
891
909
|
const renderHeader = (header, headerIcon, headerCentered) => {
|
|
@@ -903,9 +921,12 @@ const __test_exports__ = { renderFooter };
|
|
|
903
921
|
|
|
904
922
|
const isBrowser = (win, doc) => typeof win !== 'undefined' && typeof doc !== 'undefined';
|
|
905
923
|
const DropdownComponent = ({ label, children, className, menuClassName, active: activeProp, up, right, hoverable, disabled, onActiveChange, closeOnClick = true, id, ...props }) => {
|
|
924
|
+
const { classPrefix } = useConfig();
|
|
906
925
|
const [active, setActive] = useState(!!activeProp);
|
|
907
926
|
const dropdownRef = useRef(null);
|
|
908
927
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
928
|
+
const mainClass = classPrefix ? `${classPrefix}dropdown` : 'dropdown';
|
|
929
|
+
const buttonClass = classPrefix ? `${classPrefix}button` : 'button';
|
|
909
930
|
useEffect(() => {
|
|
910
931
|
if (typeof activeProp === 'boolean')
|
|
911
932
|
setActive(activeProp);
|
|
@@ -938,14 +959,14 @@ const DropdownComponent = ({ label, children, className, menuClassName, active:
|
|
|
938
959
|
onActiveChange === null || onActiveChange === void 0 ? void 0 : onActiveChange(false);
|
|
939
960
|
}
|
|
940
961
|
};
|
|
941
|
-
const dropdownClasses = classNames(
|
|
962
|
+
const dropdownClasses = classNames(mainClass, bulmaHelperClasses, {
|
|
942
963
|
'is-active': active,
|
|
943
964
|
'is-up': up,
|
|
944
965
|
'is-right': right,
|
|
945
966
|
'is-hoverable': hoverable,
|
|
946
967
|
'is-disabled': disabled,
|
|
947
968
|
}, 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:
|
|
969
|
+
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
970
|
};
|
|
950
971
|
const DropdownItem = ({ children, active, className, as: Component = 'a', ...props }) => {
|
|
951
972
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
@@ -959,8 +980,10 @@ const Dropdown = Object.assign(DropdownComponent, {
|
|
|
959
980
|
|
|
960
981
|
const MenuListLevelContext = createContext(0);
|
|
961
982
|
const MenuComponent = ({ className, children, ...props }) => {
|
|
983
|
+
const { classPrefix } = useConfig();
|
|
962
984
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
963
|
-
|
|
985
|
+
const mainClass = classPrefix ? `${classPrefix}menu` : 'menu';
|
|
986
|
+
return (jsxRuntimeExports.jsx("aside", { className: classNames(mainClass, className, bulmaHelperClasses), ...rest, children: children }));
|
|
964
987
|
};
|
|
965
988
|
const MenuLabel = ({ className, children, ...props }) => {
|
|
966
989
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
@@ -1003,16 +1026,20 @@ const Menu = Object.assign(MenuComponent, {
|
|
|
1003
1026
|
});
|
|
1004
1027
|
|
|
1005
1028
|
const Message = ({ className, title, textColor, color, bgColor, onClose, children, ...props }) => {
|
|
1029
|
+
const { classPrefix } = useConfig();
|
|
1006
1030
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1007
1031
|
color: textColor,
|
|
1008
1032
|
backgroundColor: bgColor,
|
|
1009
1033
|
...props,
|
|
1010
1034
|
});
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1035
|
+
const mainClass = classPrefix ? `${classPrefix}message` : 'message';
|
|
1036
|
+
const deleteClass = classPrefix ? `${classPrefix}delete` : 'delete';
|
|
1037
|
+
const messageClasses = classNames(mainClass, color && `is-${color}`, className, bulmaHelperClasses);
|
|
1038
|
+
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
1039
|
};
|
|
1014
1040
|
|
|
1015
1041
|
const Modal = ({ active = false, onClose, className, textColor, bgColor, modalCardTitle, modalCardFoot, type, children, ...props }) => {
|
|
1042
|
+
const { classPrefix } = useConfig();
|
|
1016
1043
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1017
1044
|
color: textColor,
|
|
1018
1045
|
backgroundColor: bgColor,
|
|
@@ -1025,17 +1052,21 @@ const Modal = ({ active = false, onClose, className, textColor, bgColor, modalCa
|
|
|
1025
1052
|
isModalCard = false;
|
|
1026
1053
|
else
|
|
1027
1054
|
isModalCard = !!modalCardTitle || !!modalCardFoot;
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1055
|
+
const mainClass = classPrefix ? `${classPrefix}modal` : 'modal';
|
|
1056
|
+
const deleteClass = classPrefix ? `${classPrefix}delete` : 'delete';
|
|
1057
|
+
const modalClasses = classNames(mainClass, { 'is-active': active }, className, bulmaHelperClasses);
|
|
1058
|
+
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
1059
|
};
|
|
1031
1060
|
|
|
1032
1061
|
const Navbar = ({ className, textColor, bgColor, color, transparent, fixed, children, ...props }) => {
|
|
1062
|
+
const { classPrefix } = useConfig();
|
|
1033
1063
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1034
1064
|
color: textColor,
|
|
1035
1065
|
backgroundColor: bgColor,
|
|
1036
1066
|
...props,
|
|
1037
1067
|
});
|
|
1038
|
-
const
|
|
1068
|
+
const mainClass = classPrefix ? `${classPrefix}navbar` : 'navbar';
|
|
1069
|
+
const navbarClasses = classNames(mainClass, bulmaHelperClasses, className, {
|
|
1039
1070
|
[`is-${color}`]: color,
|
|
1040
1071
|
'is-transparent': transparent,
|
|
1041
1072
|
[`is-fixed-${fixed}`]: fixed,
|
|
@@ -1126,12 +1157,14 @@ const PaginationNext = ({ className, disabled, children, ...props }) => (jsxRunt
|
|
|
1126
1157
|
}
|
|
1127
1158
|
: props.onClick, children: children }));
|
|
1128
1159
|
const Pagination = ({ color, textColor, bgColor, size, align, rounded, className, children, ...props }) => {
|
|
1160
|
+
const { classPrefix } = useConfig();
|
|
1129
1161
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1130
1162
|
color: textColor,
|
|
1131
1163
|
backgroundColor: bgColor,
|
|
1132
1164
|
...props,
|
|
1133
1165
|
});
|
|
1134
|
-
const
|
|
1166
|
+
const mainClass = classPrefix ? `${classPrefix}pagination` : 'pagination';
|
|
1167
|
+
const paginationClasses = classNames(mainClass, bulmaHelperClasses, className, {
|
|
1135
1168
|
[`is-${color}`]: color,
|
|
1136
1169
|
[`is-${size}`]: size,
|
|
1137
1170
|
[`is-${align}`]: align,
|
|
@@ -1176,11 +1209,13 @@ Pagination.Previous = PaginationPrevious;
|
|
|
1176
1209
|
Pagination.Next = PaginationNext;
|
|
1177
1210
|
|
|
1178
1211
|
const Panel = ({ color, className, children, ...props }) => {
|
|
1212
|
+
const { classPrefix } = useConfig();
|
|
1179
1213
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1180
1214
|
color,
|
|
1181
1215
|
...props,
|
|
1182
1216
|
});
|
|
1183
|
-
const
|
|
1217
|
+
const mainClass = classPrefix ? `${classPrefix}panel` : 'panel';
|
|
1218
|
+
const panelClasses = classNames(mainClass, bulmaHelperClasses, className, {
|
|
1184
1219
|
[`is-${color}`]: color,
|
|
1185
1220
|
});
|
|
1186
1221
|
return (jsxRuntimeExports.jsx("nav", { className: panelClasses, ...rest, children: children }));
|
|
@@ -1189,7 +1224,11 @@ const PanelHeading = ({ className, children, ...props }) => (jsxRuntimeExports.j
|
|
|
1189
1224
|
const PanelTabs = ({ className, children, ...props }) => (jsxRuntimeExports.jsx("p", { className: classNames('panel-tabs', className), ...props, children: children }));
|
|
1190
1225
|
const PanelBlock = ({ className, active, children, ...props }) => (jsxRuntimeExports.jsx("a", { className: classNames('panel-block', className, { 'is-active': active }), ...props, children: children }));
|
|
1191
1226
|
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 }) =>
|
|
1227
|
+
const PanelInputBlock = ({ value, onChange, placeholder, iconClassName = 'fas fa-search', ...props }) => {
|
|
1228
|
+
const { classPrefix } = useConfig();
|
|
1229
|
+
const inputClass = classPrefix ? `${classPrefix}input` : 'input';
|
|
1230
|
+
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" }) })] }) }));
|
|
1231
|
+
};
|
|
1193
1232
|
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
1233
|
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
1234
|
Panel.Heading = PanelHeading;
|
|
@@ -1201,11 +1240,13 @@ Panel.CheckboxBlock = PanelCheckboxBlock;
|
|
|
1201
1240
|
Panel.ButtonBlock = PanelButtonBlock;
|
|
1202
1241
|
|
|
1203
1242
|
const Tabs = ({ align, size, fullwidth, boxed, toggle, rounded, color, className, children, ...props }) => {
|
|
1243
|
+
const { classPrefix } = useConfig();
|
|
1204
1244
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1205
1245
|
color,
|
|
1206
1246
|
...props,
|
|
1207
1247
|
});
|
|
1208
|
-
const
|
|
1248
|
+
const mainClass = classPrefix ? `${classPrefix}tabs` : 'tabs';
|
|
1249
|
+
const tabsClass = classNames(mainClass, bulmaHelperClasses, {
|
|
1209
1250
|
[`is-${align}`]: align,
|
|
1210
1251
|
[`is-${size}`]: size,
|
|
1211
1252
|
'is-fullwidth': fullwidth,
|
|
@@ -1222,34 +1263,40 @@ Tabs.List = TabList;
|
|
|
1222
1263
|
Tabs.Item = TabItem;
|
|
1223
1264
|
|
|
1224
1265
|
const Block = ({ className, textColor, bgColor, children, ...props }) => {
|
|
1266
|
+
const { classPrefix } = useConfig();
|
|
1225
1267
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1226
1268
|
color: textColor,
|
|
1227
1269
|
backgroundColor: bgColor,
|
|
1228
1270
|
...props,
|
|
1229
1271
|
});
|
|
1230
|
-
const
|
|
1272
|
+
const mainClass = classPrefix ? `${classPrefix}block` : 'block';
|
|
1273
|
+
const blockClasses = classNames(mainClass, className, bulmaHelperClasses);
|
|
1231
1274
|
return (jsxRuntimeExports.jsx("div", { className: blockClasses, ...rest, children: children }));
|
|
1232
1275
|
};
|
|
1233
1276
|
|
|
1234
1277
|
const Box = ({ className, textColor, bgColor, hasShadow = true, children, ...props }) => {
|
|
1278
|
+
const { classPrefix } = useConfig();
|
|
1235
1279
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1236
1280
|
color: textColor,
|
|
1237
1281
|
backgroundColor: bgColor,
|
|
1238
1282
|
...props,
|
|
1239
1283
|
});
|
|
1240
|
-
const
|
|
1284
|
+
const mainClass = classPrefix ? `${classPrefix}box` : 'box';
|
|
1285
|
+
const boxClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1241
1286
|
'is-shadowless': !hasShadow,
|
|
1242
1287
|
});
|
|
1243
1288
|
return (jsxRuntimeExports.jsx("div", { className: boxClasses, ...rest, children: children }));
|
|
1244
1289
|
};
|
|
1245
1290
|
|
|
1246
1291
|
const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWidth, isOutlined, isInverted, isFocused, isActive, isHovered, isDisabled, className, children, textColor, bgColor, as = 'button', href, onClick, target, rel, ...props }) => {
|
|
1292
|
+
const { classPrefix } = useConfig();
|
|
1247
1293
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1248
1294
|
color: textColor,
|
|
1249
1295
|
backgroundColor: bgColor,
|
|
1250
1296
|
...props,
|
|
1251
1297
|
});
|
|
1252
|
-
const
|
|
1298
|
+
const mainClass = classPrefix ? `${classPrefix}button` : 'button';
|
|
1299
|
+
const buttonClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1253
1300
|
[`is-${color}`]: color,
|
|
1254
1301
|
[`is-${size}`]: size && size !== 'normal',
|
|
1255
1302
|
'is-light': isLight,
|
|
@@ -1274,12 +1321,14 @@ const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWi
|
|
|
1274
1321
|
};
|
|
1275
1322
|
|
|
1276
1323
|
const Buttons = ({ className, textColor, bgColor, isCentered, isRight, hasAddons, children, ...props }) => {
|
|
1324
|
+
const { classPrefix } = useConfig();
|
|
1277
1325
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1278
1326
|
color: textColor,
|
|
1279
1327
|
backgroundColor: bgColor,
|
|
1280
1328
|
...props,
|
|
1281
1329
|
});
|
|
1282
|
-
const
|
|
1330
|
+
const mainClass = classPrefix ? `${classPrefix}buttons` : 'buttons';
|
|
1331
|
+
const buttonsClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1283
1332
|
'is-centered': isCentered,
|
|
1284
1333
|
'is-right': isRight,
|
|
1285
1334
|
'has-addons': hasAddons,
|
|
@@ -1289,24 +1338,28 @@ const Buttons = ({ className, textColor, bgColor, isCentered, isRight, hasAddons
|
|
|
1289
1338
|
|
|
1290
1339
|
const validSizes = ['small', 'medium', 'large'];
|
|
1291
1340
|
const Content = ({ className, textColor, bgColor, size, children, ...props }) => {
|
|
1341
|
+
const { classPrefix } = useConfig();
|
|
1292
1342
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1293
1343
|
color: textColor,
|
|
1294
1344
|
backgroundColor: bgColor,
|
|
1295
1345
|
...props,
|
|
1296
1346
|
});
|
|
1297
|
-
const
|
|
1347
|
+
const mainClass = classPrefix ? `${classPrefix}content` : 'content';
|
|
1348
|
+
const contentClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1298
1349
|
[`is-${size}`]: size && size !== 'normal' && validSizes.includes(size),
|
|
1299
1350
|
});
|
|
1300
1351
|
return (jsxRuntimeExports.jsx("div", { className: contentClasses, ...rest, children: children }));
|
|
1301
1352
|
};
|
|
1302
1353
|
|
|
1303
1354
|
const Delete = ({ className, textColor, bgColor, onClick, size, ariaLabel = 'Close', disabled = false, ...props }) => {
|
|
1355
|
+
const { classPrefix } = useConfig();
|
|
1304
1356
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1305
1357
|
color: textColor,
|
|
1306
1358
|
backgroundColor: bgColor,
|
|
1307
1359
|
...props,
|
|
1308
1360
|
});
|
|
1309
|
-
const
|
|
1361
|
+
const mainClass = classPrefix ? `${classPrefix}delete` : 'delete';
|
|
1362
|
+
const classes = classNames(mainClass, {
|
|
1310
1363
|
[`is-${size}`]: size,
|
|
1311
1364
|
'is-disabled': disabled,
|
|
1312
1365
|
}, bulmaHelperClasses, className);
|
|
@@ -1342,12 +1395,14 @@ function getIconClasses(library, name, libraryFeatures) {
|
|
|
1342
1395
|
}
|
|
1343
1396
|
}
|
|
1344
1397
|
const Icon = ({ className, textColor, bgColor, name, library = 'fa', libraryFeatures, size, ariaLabel = 'icon', style, ...props }) => {
|
|
1398
|
+
const { classPrefix } = useConfig();
|
|
1345
1399
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1346
1400
|
color: textColor,
|
|
1347
1401
|
backgroundColor: bgColor,
|
|
1348
1402
|
...props,
|
|
1349
1403
|
});
|
|
1350
|
-
const
|
|
1404
|
+
const mainClass = classPrefix ? `${classPrefix}icon` : 'icon';
|
|
1405
|
+
const iconContainerClasses = classNames(mainClass, {
|
|
1351
1406
|
[`is-${size}`]: size,
|
|
1352
1407
|
}, bulmaHelperClasses, className);
|
|
1353
1408
|
const iClasses = getIconClasses(library, name, libraryFeatures);
|
|
@@ -1355,22 +1410,26 @@ const Icon = ({ className, textColor, bgColor, name, library = 'fa', libraryFeat
|
|
|
1355
1410
|
};
|
|
1356
1411
|
|
|
1357
1412
|
const IconText = ({ className, textColor, bgColor, iconProps, children, items, ...props }) => {
|
|
1413
|
+
const { classPrefix } = useConfig();
|
|
1358
1414
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1359
1415
|
color: textColor,
|
|
1360
1416
|
backgroundColor: bgColor,
|
|
1361
1417
|
...props,
|
|
1362
1418
|
});
|
|
1363
|
-
const
|
|
1419
|
+
const mainClass = classPrefix ? `${classPrefix}icon-text` : 'icon-text';
|
|
1420
|
+
const iconTextClasses = classNames(mainClass, bulmaHelperClasses, className);
|
|
1364
1421
|
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
1422
|
};
|
|
1366
1423
|
|
|
1367
1424
|
const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, src, alt, children, ...props }) => {
|
|
1425
|
+
const { classPrefix } = useConfig();
|
|
1368
1426
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1369
1427
|
color: textColor,
|
|
1370
1428
|
backgroundColor: bgColor,
|
|
1371
1429
|
...props,
|
|
1372
1430
|
});
|
|
1373
|
-
const
|
|
1431
|
+
const mainClass = classPrefix ? `${classPrefix}image` : 'image';
|
|
1432
|
+
const imageClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1374
1433
|
[`is-${size}`]: size,
|
|
1375
1434
|
'has-ratio': size && typeof size === 'string' && size.includes('by'),
|
|
1376
1435
|
});
|
|
@@ -1389,27 +1448,46 @@ const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, s
|
|
|
1389
1448
|
};
|
|
1390
1449
|
|
|
1391
1450
|
const Notification = ({ className, color, isLight, hasDelete, onDelete, children, ...props }) => {
|
|
1451
|
+
const { classPrefix } = useConfig();
|
|
1392
1452
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1393
1453
|
...props,
|
|
1394
1454
|
});
|
|
1395
|
-
const
|
|
1455
|
+
const mainClass = classPrefix ? `${classPrefix}notification` : 'notification';
|
|
1456
|
+
const deleteClass = classPrefix ? `${classPrefix}delete` : 'delete';
|
|
1457
|
+
const notificationClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1396
1458
|
[`is-${color}`]: color && validColors.includes(color),
|
|
1397
1459
|
'is-light': isLight,
|
|
1398
1460
|
});
|
|
1399
|
-
return (jsxRuntimeExports.jsxs("div", { className: notificationClasses, ...rest, children: [hasDelete && (jsxRuntimeExports.jsx("button", { className:
|
|
1461
|
+
return (jsxRuntimeExports.jsxs("div", { className: notificationClasses, ...rest, children: [hasDelete && (jsxRuntimeExports.jsx("button", { className: deleteClass, onClick: onDelete, "aria-label": "Close notification" })), children] }));
|
|
1400
1462
|
};
|
|
1401
1463
|
|
|
1402
1464
|
const Progress = ({ className, color, size, value, max, children, ...props }) => {
|
|
1465
|
+
const { classPrefix } = useConfig();
|
|
1403
1466
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1404
1467
|
...props,
|
|
1405
1468
|
});
|
|
1406
|
-
const
|
|
1469
|
+
const mainClass = classPrefix ? `${classPrefix}progress` : 'progress';
|
|
1470
|
+
const progressClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1407
1471
|
[`is-${color}`]: color && validColors.includes(color),
|
|
1408
1472
|
[`is-${size}`]: size,
|
|
1409
1473
|
});
|
|
1410
1474
|
return (jsxRuntimeExports.jsx("progress", { className: progressClasses, value: value, max: max, ...rest, children: children }));
|
|
1411
1475
|
};
|
|
1412
1476
|
|
|
1477
|
+
const Skeleton = ({ className, variant = 'block', lines = 3, children, ...props }) => {
|
|
1478
|
+
const { classPrefix } = useConfig();
|
|
1479
|
+
if (variant === 'lines') {
|
|
1480
|
+
const linesClass = classPrefix
|
|
1481
|
+
? `${classPrefix}skeleton-lines`
|
|
1482
|
+
: 'skeleton-lines';
|
|
1483
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames(linesClass, className), ...props, children: Array.from({ length: lines }).map((_, i) => (jsxRuntimeExports.jsx("div", {}, i))) }));
|
|
1484
|
+
}
|
|
1485
|
+
const blockClass = classPrefix
|
|
1486
|
+
? `${classPrefix}skeleton-block`
|
|
1487
|
+
: 'skeleton-block';
|
|
1488
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames(blockClass, className), ...props, children: children }));
|
|
1489
|
+
};
|
|
1490
|
+
|
|
1413
1491
|
const validSubTitleSizes = ['1', '2', '3', '4', '5', '6'];
|
|
1414
1492
|
const validSubTitleElements = [
|
|
1415
1493
|
'h1',
|
|
@@ -1421,10 +1499,12 @@ const validSubTitleElements = [
|
|
|
1421
1499
|
'p',
|
|
1422
1500
|
];
|
|
1423
1501
|
const SubTitle = ({ className, size, as = 'h1', hasSkeleton, children, ...props }) => {
|
|
1502
|
+
const { classPrefix } = useConfig();
|
|
1424
1503
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1425
1504
|
const element = validSubTitleElements.includes(as) ? as : 'h1';
|
|
1426
1505
|
const validSize = size && validSubTitleSizes.includes(size) ? size : undefined;
|
|
1427
|
-
const
|
|
1506
|
+
const mainClass = classPrefix ? `${classPrefix}subtitle` : 'subtitle';
|
|
1507
|
+
const subTitleClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1428
1508
|
[`is-${validSize}`]: validSize,
|
|
1429
1509
|
'has-skeleton': hasSkeleton,
|
|
1430
1510
|
});
|
|
@@ -1433,8 +1513,10 @@ const SubTitle = ({ className, size, as = 'h1', hasSkeleton, children, ...props
|
|
|
1433
1513
|
};
|
|
1434
1514
|
|
|
1435
1515
|
const Table = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFullwidth, isResponsive, children, ...props }) => {
|
|
1516
|
+
const { classPrefix } = useConfig();
|
|
1436
1517
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1437
|
-
const
|
|
1518
|
+
const mainClass = classPrefix ? `${classPrefix}table` : 'table';
|
|
1519
|
+
const tableClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1438
1520
|
'is-bordered': isBordered,
|
|
1439
1521
|
'is-striped': isStriped,
|
|
1440
1522
|
'is-narrow': isNarrow,
|
|
@@ -1442,7 +1524,13 @@ const Table = ({ className, isBordered, isStriped, isNarrow, isHoverable, isFull
|
|
|
1442
1524
|
'is-fullwidth': isFullwidth,
|
|
1443
1525
|
});
|
|
1444
1526
|
const tableElement = (jsxRuntimeExports.jsx("table", { className: tableClasses, ...rest, children: children }));
|
|
1445
|
-
|
|
1527
|
+
if (isResponsive) {
|
|
1528
|
+
const containerClass = classPrefix
|
|
1529
|
+
? `${classPrefix}table-container`
|
|
1530
|
+
: 'table-container';
|
|
1531
|
+
return jsxRuntimeExports.jsx("div", { className: containerClass, children: tableElement });
|
|
1532
|
+
}
|
|
1533
|
+
return tableElement;
|
|
1446
1534
|
};
|
|
1447
1535
|
|
|
1448
1536
|
const validTagColors = [
|
|
@@ -1459,8 +1547,10 @@ const validTagColors = [
|
|
|
1459
1547
|
];
|
|
1460
1548
|
const validTagSizes = ['normal', 'medium', 'large'];
|
|
1461
1549
|
const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelete, children, ...props }) => {
|
|
1550
|
+
const { classPrefix } = useConfig();
|
|
1462
1551
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1463
|
-
const
|
|
1552
|
+
const mainClass = classPrefix ? `${classPrefix}tag` : 'tag';
|
|
1553
|
+
const tagClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1464
1554
|
[`is-${color}`]: color && validTagColors.includes(color),
|
|
1465
1555
|
[`is-${size}`]: size && size !== 'normal' && validTagSizes.includes(size),
|
|
1466
1556
|
'is-rounded': isRounded,
|
|
@@ -1474,8 +1564,10 @@ const Tag = ({ className, color, size, isRounded, isDelete, isHoverable, onDelet
|
|
|
1474
1564
|
};
|
|
1475
1565
|
|
|
1476
1566
|
const Tags = ({ className, hasAddons, isMultiline, children, ...props }) => {
|
|
1567
|
+
const { classPrefix } = useConfig();
|
|
1477
1568
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1478
|
-
const
|
|
1569
|
+
const mainClass = classPrefix ? `${classPrefix}tags` : 'tags';
|
|
1570
|
+
const tagsClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1479
1571
|
'has-addons': hasAddons,
|
|
1480
1572
|
'are-multiline': isMultiline,
|
|
1481
1573
|
});
|
|
@@ -1535,10 +1627,12 @@ const Thead = ({ className, children, ...props }) => {
|
|
|
1535
1627
|
const validTitleSizes = ['1', '2', '3', '4', '5', '6'];
|
|
1536
1628
|
const validTitleElements = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
|
|
1537
1629
|
const Title = ({ className, size, isSpaced, as = 'h1', hasSkeleton, children, ...props }) => {
|
|
1630
|
+
const { classPrefix } = useConfig();
|
|
1538
1631
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1539
1632
|
const element = validTitleElements.includes(as) ? as : 'h1';
|
|
1540
1633
|
const validSize = size && validTitleSizes.includes(size) ? size : undefined;
|
|
1541
|
-
const
|
|
1634
|
+
const mainClass = classPrefix ? `${classPrefix}title` : 'title';
|
|
1635
|
+
const titleClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1542
1636
|
[`is-${validSize}`]: validSize,
|
|
1543
1637
|
'is-spaced': isSpaced,
|
|
1544
1638
|
'has-skeleton': hasSkeleton,
|
|
@@ -1557,25 +1651,30 @@ const Tr = ({ className, isSelected, color, children, ...props }) => {
|
|
|
1557
1651
|
};
|
|
1558
1652
|
|
|
1559
1653
|
const Checkbox = forwardRef(({ disabled, className, children, ...props }, ref) => {
|
|
1654
|
+
const { classPrefix } = useConfig();
|
|
1560
1655
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1561
1656
|
...props,
|
|
1562
1657
|
});
|
|
1563
|
-
const
|
|
1658
|
+
const mainClass = classPrefix ? `${classPrefix}checkbox` : 'checkbox';
|
|
1659
|
+
const checkboxClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1564
1660
|
return (jsxRuntimeExports.jsxs("label", { className: checkboxClass, children: [jsxRuntimeExports.jsx("input", { ref: ref, type: "checkbox", disabled: disabled, ...rest }), children] }));
|
|
1565
1661
|
});
|
|
1566
1662
|
Checkbox.displayName = 'Checkbox';
|
|
1567
1663
|
|
|
1568
1664
|
const Checkboxes = ({ children, className, ...props }) => {
|
|
1665
|
+
const { classPrefix } = useConfig();
|
|
1569
1666
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1570
1667
|
...props,
|
|
1571
1668
|
});
|
|
1572
|
-
const
|
|
1669
|
+
const mainClass = classPrefix ? `${classPrefix}checkboxes` : 'checkboxes';
|
|
1670
|
+
const wrapperClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1573
1671
|
return (jsxRuntimeExports.jsx("div", { className: wrapperClass, ...rest, children: children }));
|
|
1574
1672
|
};
|
|
1575
1673
|
|
|
1576
1674
|
const allowedColors = [...validColors, 'inherit', 'current'];
|
|
1577
1675
|
const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isLoading, isExpanded, size, textColor, bgColor, iconLeft, iconRight, iconLeftName, iconLeftSize, iconRightName, iconRightSize, className, children, ...props }, ref) => {
|
|
1578
1676
|
const Component = (as === 'p' ? 'p' : 'div');
|
|
1677
|
+
const { classPrefix } = useConfig();
|
|
1579
1678
|
const { textColor: _ignoredTextColor, bgColor: _ignoredBgColor, ...restProps } = props;
|
|
1580
1679
|
const safeTextColor = allowedColors.includes(textColor)
|
|
1581
1680
|
? textColor
|
|
@@ -1602,7 +1701,8 @@ const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isL
|
|
|
1602
1701
|
size: iconRightSize,
|
|
1603
1702
|
}
|
|
1604
1703
|
: undefined);
|
|
1605
|
-
const
|
|
1704
|
+
const mainClass = classPrefix ? `${classPrefix}control` : 'control';
|
|
1705
|
+
const controlClass = classNames(mainClass, bulmaHelperClasses, {
|
|
1606
1706
|
'has-icons-left': hasIconsLeft || !!leftIconProps,
|
|
1607
1707
|
'has-icons-right': hasIconsRight || !!rightIconProps,
|
|
1608
1708
|
'is-loading': isLoading,
|
|
@@ -1614,30 +1714,36 @@ const Control = React.forwardRef(({ as = 'div', hasIconsLeft, hasIconsRight, isL
|
|
|
1614
1714
|
Control.displayName = 'Control';
|
|
1615
1715
|
|
|
1616
1716
|
const FieldLabel = ({ size, textColor, bgColor, className, children, ...props }) => {
|
|
1717
|
+
const { classPrefix } = useConfig();
|
|
1617
1718
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1618
1719
|
color: textColor,
|
|
1619
1720
|
backgroundColor: bgColor,
|
|
1620
1721
|
...props,
|
|
1621
1722
|
});
|
|
1622
|
-
const
|
|
1723
|
+
const mainClass = classPrefix ? `${classPrefix}field-label` : 'field-label';
|
|
1724
|
+
const fieldLabelClass = classNames(mainClass, bulmaHelperClasses, { [`is-${size}`]: size }, className);
|
|
1623
1725
|
return (jsxRuntimeExports.jsx("div", { className: fieldLabelClass, ...props, ...rest, children: children }));
|
|
1624
1726
|
};
|
|
1625
1727
|
const FieldBody = ({ textColor, bgColor, className, children, ...props }) => {
|
|
1728
|
+
const { classPrefix } = useConfig();
|
|
1626
1729
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1627
1730
|
color: textColor,
|
|
1628
1731
|
backgroundColor: bgColor,
|
|
1629
1732
|
...props,
|
|
1630
1733
|
});
|
|
1631
|
-
const
|
|
1734
|
+
const mainClass = classPrefix ? `${classPrefix}field-body` : 'field-body';
|
|
1735
|
+
const fieldBodyClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1632
1736
|
return (jsxRuntimeExports.jsx("div", { className: fieldBodyClass, ...props, ...rest, children: children }));
|
|
1633
1737
|
};
|
|
1634
1738
|
const Field = ({ horizontal, grouped, hasAddons, label, labelSize, labelProps, textColor, bgColor, className, children, ...props }) => {
|
|
1739
|
+
const { classPrefix } = useConfig();
|
|
1635
1740
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1636
1741
|
color: textColor,
|
|
1637
1742
|
backgroundColor: bgColor,
|
|
1638
1743
|
...props,
|
|
1639
1744
|
});
|
|
1640
|
-
const
|
|
1745
|
+
const mainClass = classPrefix ? `${classPrefix}field` : 'field';
|
|
1746
|
+
const fieldClass = classNames(mainClass, bulmaHelperClasses, {
|
|
1641
1747
|
'is-horizontal': horizontal,
|
|
1642
1748
|
'has-addons': !!hasAddons,
|
|
1643
1749
|
'is-grouped': grouped === true ||
|
|
@@ -1651,11 +1757,12 @@ const Field = ({ horizontal, grouped, hasAddons, label, labelSize, labelProps, t
|
|
|
1651
1757
|
const mappedLabelSize = labelSize === 'normal' ? undefined : labelSize;
|
|
1652
1758
|
let renderedLabel = null;
|
|
1653
1759
|
if (label) {
|
|
1760
|
+
const labelClass = classPrefix ? `${classPrefix}label` : 'label';
|
|
1654
1761
|
if (horizontal) {
|
|
1655
|
-
renderedLabel = (jsxRuntimeExports.jsx(FieldLabel, { size: mappedLabelSize, children: jsxRuntimeExports.jsx("label", { ...labelProps, className: classNames(
|
|
1762
|
+
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 }) }));
|
|
1656
1763
|
}
|
|
1657
1764
|
else {
|
|
1658
|
-
renderedLabel = (jsxRuntimeExports.jsx("label", { ...labelProps, className: classNames(
|
|
1765
|
+
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 }));
|
|
1659
1766
|
}
|
|
1660
1767
|
}
|
|
1661
1768
|
let content = children;
|
|
@@ -1676,6 +1783,7 @@ Field.Label = FieldLabel;
|
|
|
1676
1783
|
Field.Body = FieldBody;
|
|
1677
1784
|
|
|
1678
1785
|
const File = forwardRef(({ color, size, isBoxed, isFullwidth, isRight, isCentered, hasName, label, iconLeft, iconRight, className, inputClassName, fileName, ...props }, ref) => {
|
|
1786
|
+
const { classPrefix } = useConfig();
|
|
1679
1787
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1680
1788
|
color,
|
|
1681
1789
|
...props,
|
|
@@ -1690,7 +1798,8 @@ const File = forwardRef(({ color, size, isBoxed, isFullwidth, isRight, isCentere
|
|
|
1690
1798
|
else if (isCentered) {
|
|
1691
1799
|
alignmentClass = 'is-centered';
|
|
1692
1800
|
}
|
|
1693
|
-
const
|
|
1801
|
+
const mainClass = classPrefix ? `${classPrefix}file` : 'file';
|
|
1802
|
+
const fileClass = classNames(mainClass, bulmaHelperClasses, {
|
|
1694
1803
|
[`is-${color}`]: color,
|
|
1695
1804
|
[`is-${size}`]: size,
|
|
1696
1805
|
'is-boxed': isBoxed,
|
|
@@ -1702,11 +1811,13 @@ const File = forwardRef(({ color, size, isBoxed, isFullwidth, isRight, isCentere
|
|
|
1702
1811
|
File.displayName = 'File';
|
|
1703
1812
|
|
|
1704
1813
|
const Input = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocused, isLoading, className, disabled, readOnly, ...props }, ref) => {
|
|
1814
|
+
const { classPrefix } = useConfig();
|
|
1705
1815
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1706
1816
|
color,
|
|
1707
1817
|
...props,
|
|
1708
1818
|
});
|
|
1709
|
-
const
|
|
1819
|
+
const mainClass = classPrefix ? `${classPrefix}input` : 'input';
|
|
1820
|
+
const inputClass = classNames(mainClass, bulmaHelperClasses, {
|
|
1710
1821
|
[`is-${color}`]: color,
|
|
1711
1822
|
[`is-${size}`]: size,
|
|
1712
1823
|
'is-rounded': isRounded,
|
|
@@ -1720,28 +1831,34 @@ const Input = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocus
|
|
|
1720
1831
|
Input.displayName = 'Input';
|
|
1721
1832
|
|
|
1722
1833
|
const Radio = forwardRef(({ disabled, className, children, ...props }, ref) => {
|
|
1834
|
+
const { classPrefix } = useConfig();
|
|
1723
1835
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1724
1836
|
...props,
|
|
1725
1837
|
});
|
|
1726
|
-
const
|
|
1838
|
+
const mainClass = classPrefix ? `${classPrefix}radio` : 'radio';
|
|
1839
|
+
const radioClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1727
1840
|
return (jsxRuntimeExports.jsxs("label", { className: radioClass, children: [jsxRuntimeExports.jsx("input", { ref: ref, type: "radio", disabled: disabled, ...rest }), children] }));
|
|
1728
1841
|
});
|
|
1729
1842
|
Radio.displayName = 'Radio';
|
|
1730
1843
|
|
|
1731
1844
|
const Radios = ({ children, className, ...props }) => {
|
|
1845
|
+
const { classPrefix } = useConfig();
|
|
1732
1846
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1733
1847
|
...props,
|
|
1734
1848
|
});
|
|
1735
|
-
const
|
|
1849
|
+
const mainClass = classPrefix ? `${classPrefix}radios` : 'radios';
|
|
1850
|
+
const wrapperClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
1736
1851
|
return (jsxRuntimeExports.jsx("div", { className: wrapperClass, ...rest, children: children }));
|
|
1737
1852
|
};
|
|
1738
1853
|
|
|
1739
1854
|
const Select = forwardRef(({ color, size, isRounded, isLoading, isActive, className, disabled, children, multiple, multipleSize, ...props }, ref) => {
|
|
1855
|
+
const { classPrefix } = useConfig();
|
|
1740
1856
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1741
1857
|
color,
|
|
1742
1858
|
...props,
|
|
1743
1859
|
});
|
|
1744
|
-
const
|
|
1860
|
+
const mainClass = classPrefix ? `${classPrefix}select` : 'select';
|
|
1861
|
+
const selectClass = classNames(mainClass, bulmaHelperClasses, {
|
|
1745
1862
|
[`is-${color}`]: color,
|
|
1746
1863
|
[`is-${size}`]: size,
|
|
1747
1864
|
'is-rounded': isRounded,
|
|
@@ -1761,11 +1878,13 @@ const Select = forwardRef(({ color, size, isRounded, isLoading, isActive, classN
|
|
|
1761
1878
|
Select.displayName = 'Select';
|
|
1762
1879
|
|
|
1763
1880
|
const TextArea = forwardRef(({ color, size, isRounded, isStatic, isHovered, isFocused, isLoading, isActive, hasFixedSize, className, disabled, readOnly, rows, ...props }, ref) => {
|
|
1881
|
+
const { classPrefix } = useConfig();
|
|
1764
1882
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1765
1883
|
color,
|
|
1766
1884
|
...props,
|
|
1767
1885
|
});
|
|
1768
|
-
const
|
|
1886
|
+
const mainClass = classPrefix ? `${classPrefix}textarea` : 'textarea';
|
|
1887
|
+
const textareaClass = classNames(mainClass, bulmaHelperClasses, {
|
|
1769
1888
|
[`is-${color}`]: color,
|
|
1770
1889
|
[`is-${size}`]: size,
|
|
1771
1890
|
'is-rounded': isRounded,
|
|
@@ -1802,7 +1921,9 @@ const Cell = ({ colStart, colFromEnd, colSpan, rowStart, rowFromEnd, rowSpan, cl
|
|
|
1802
1921
|
backgroundColor: bgColor,
|
|
1803
1922
|
...props,
|
|
1804
1923
|
});
|
|
1805
|
-
const
|
|
1924
|
+
const { classPrefix } = useConfig();
|
|
1925
|
+
const mainClass = classPrefix ? `${classPrefix}cell` : 'cell';
|
|
1926
|
+
const cellClasses = classNames(mainClass, ...getCellGridClasses({
|
|
1806
1927
|
colStart,
|
|
1807
1928
|
colFromEnd,
|
|
1808
1929
|
colSpan,
|
|
@@ -1851,7 +1972,9 @@ const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixe
|
|
|
1851
1972
|
backgroundColor: bgColor,
|
|
1852
1973
|
...props,
|
|
1853
1974
|
});
|
|
1854
|
-
const
|
|
1975
|
+
const { classPrefix } = useConfig();
|
|
1976
|
+
const mainClass = classPrefix ? `${classPrefix}grid` : 'grid';
|
|
1977
|
+
const gridClasses = classNames(mainClass, ...getGridInnerClasses({ gap, columnGap, rowGap, minCol }), bulmaHelperClasses, className);
|
|
1855
1978
|
if (isFixed) {
|
|
1856
1979
|
const fixedGridClasses = classNames('fixed-grid', ...getFixedGridClasses({
|
|
1857
1980
|
fixedCols,
|
|
@@ -1866,7 +1989,598 @@ const Grid = ({ isFixed = false, gap, columnGap, rowGap, minCol, fixedCols, fixe
|
|
|
1866
1989
|
return (jsxRuntimeExports.jsx("div", { className: gridClasses, ...rest, children: children }));
|
|
1867
1990
|
};
|
|
1868
1991
|
|
|
1992
|
+
const bulmaCssVars = [
|
|
1993
|
+
'--bulma-scheme-h',
|
|
1994
|
+
'--bulma-scheme-s',
|
|
1995
|
+
'--bulma-light-l',
|
|
1996
|
+
'--bulma-light-invert-l',
|
|
1997
|
+
'--bulma-dark-l',
|
|
1998
|
+
'--bulma-dark-invert-l',
|
|
1999
|
+
'--bulma-soft-l',
|
|
2000
|
+
'--bulma-bold-l',
|
|
2001
|
+
'--bulma-soft-invert-l',
|
|
2002
|
+
'--bulma-bold-invert-l',
|
|
2003
|
+
'--bulma-hover-background-l-delta',
|
|
2004
|
+
'--bulma-active-background-l-delta',
|
|
2005
|
+
'--bulma-hover-border-l-delta',
|
|
2006
|
+
'--bulma-active-border-l-delta',
|
|
2007
|
+
'--bulma-hover-color-l-delta',
|
|
2008
|
+
'--bulma-active-color-l-delta',
|
|
2009
|
+
'--bulma-hover-shadow-a-delta',
|
|
2010
|
+
'--bulma-active-shadow-a-delta',
|
|
2011
|
+
'--bulma-primary-h',
|
|
2012
|
+
'--bulma-primary-s',
|
|
2013
|
+
'--bulma-primary-l',
|
|
2014
|
+
'--bulma-link-h',
|
|
2015
|
+
'--bulma-link-s',
|
|
2016
|
+
'--bulma-link-l',
|
|
2017
|
+
'--bulma-info-h',
|
|
2018
|
+
'--bulma-info-s',
|
|
2019
|
+
'--bulma-info-l',
|
|
2020
|
+
'--bulma-success-h',
|
|
2021
|
+
'--bulma-success-s',
|
|
2022
|
+
'--bulma-success-l',
|
|
2023
|
+
'--bulma-warning-h',
|
|
2024
|
+
'--bulma-warning-s',
|
|
2025
|
+
'--bulma-warning-l',
|
|
2026
|
+
'--bulma-danger-h',
|
|
2027
|
+
'--bulma-danger-s',
|
|
2028
|
+
'--bulma-danger-l',
|
|
2029
|
+
'--bulma-family-primary',
|
|
2030
|
+
'--bulma-family-secondary',
|
|
2031
|
+
'--bulma-family-code',
|
|
2032
|
+
'--bulma-size-small',
|
|
2033
|
+
'--bulma-size-normal',
|
|
2034
|
+
'--bulma-size-medium',
|
|
2035
|
+
'--bulma-size-large',
|
|
2036
|
+
'--bulma-weight-light',
|
|
2037
|
+
'--bulma-weight-normal',
|
|
2038
|
+
'--bulma-weight-medium',
|
|
2039
|
+
'--bulma-weight-semibold',
|
|
2040
|
+
'--bulma-weight-bold',
|
|
2041
|
+
'--bulma-weight-extrabold',
|
|
2042
|
+
'--bulma-block-spacing',
|
|
2043
|
+
'--bulma-duration',
|
|
2044
|
+
'--bulma-easing',
|
|
2045
|
+
'--bulma-radius-small',
|
|
2046
|
+
'--bulma-radius',
|
|
2047
|
+
'--bulma-radius-medium',
|
|
2048
|
+
'--bulma-radius-large',
|
|
2049
|
+
'--bulma-radius-rounded',
|
|
2050
|
+
'--bulma-speed',
|
|
2051
|
+
'--bulma-arrow-color',
|
|
2052
|
+
'--bulma-loading-color',
|
|
2053
|
+
'--bulma-burger-h',
|
|
2054
|
+
'--bulma-burger-s',
|
|
2055
|
+
'--bulma-burger-l',
|
|
2056
|
+
'--bulma-burger-border-radius',
|
|
2057
|
+
'--bulma-burger-gap',
|
|
2058
|
+
'--bulma-burger-item-height',
|
|
2059
|
+
'--bulma-burger-item-width',
|
|
2060
|
+
'--bulma-body-background-color',
|
|
2061
|
+
'--bulma-body-size',
|
|
2062
|
+
'--bulma-body-min-width',
|
|
2063
|
+
'--bulma-body-rendering',
|
|
2064
|
+
'--bulma-body-family',
|
|
2065
|
+
'--bulma-body-overflow-x',
|
|
2066
|
+
'--bulma-body-overflow-y',
|
|
2067
|
+
'--bulma-body-color',
|
|
2068
|
+
'--bulma-body-font-size',
|
|
2069
|
+
'--bulma-body-weight',
|
|
2070
|
+
'--bulma-body-line-height',
|
|
2071
|
+
'--bulma-code-family',
|
|
2072
|
+
'--bulma-code-padding',
|
|
2073
|
+
'--bulma-code-weight',
|
|
2074
|
+
'--bulma-code-size',
|
|
2075
|
+
'--bulma-small-font-size',
|
|
2076
|
+
'--bulma-hr-background-color',
|
|
2077
|
+
'--bulma-hr-height',
|
|
2078
|
+
'--bulma-hr-margin',
|
|
2079
|
+
'--bulma-strong-color',
|
|
2080
|
+
'--bulma-strong-weight',
|
|
2081
|
+
'--bulma-pre-font-size',
|
|
2082
|
+
'--bulma-pre-padding',
|
|
2083
|
+
'--bulma-pre-code-font-size',
|
|
2084
|
+
'--bulma-skeleton-background',
|
|
2085
|
+
'--bulma-skeleton-radius',
|
|
2086
|
+
'--bulma-skeleton-block-min-height',
|
|
2087
|
+
'--bulma-skeleton-lines-gap',
|
|
2088
|
+
'--bulma-skeleton-line-height',
|
|
2089
|
+
'--bulma-breadcrumb-item-color',
|
|
2090
|
+
'--bulma-breadcrumb-item-hover-color',
|
|
2091
|
+
'--bulma-breadcrumb-item-active-color',
|
|
2092
|
+
'--bulma-breadcrumb-item-padding-vertical',
|
|
2093
|
+
'--bulma-breadcrumb-item-padding-horizontal',
|
|
2094
|
+
'--bulma-breadcrumb-item-separator-color',
|
|
2095
|
+
'--bulma-card-color',
|
|
2096
|
+
'--bulma-card-background-color',
|
|
2097
|
+
'--bulma-card-shadow',
|
|
2098
|
+
'--bulma-card-radius',
|
|
2099
|
+
'--bulma-card-header-background-color',
|
|
2100
|
+
'--bulma-card-header-color',
|
|
2101
|
+
'--bulma-card-header-padding',
|
|
2102
|
+
'--bulma-card-header-shadow',
|
|
2103
|
+
'--bulma-card-header-weight',
|
|
2104
|
+
'--bulma-card-content-background-color',
|
|
2105
|
+
'--bulma-card-content-padding',
|
|
2106
|
+
'--bulma-card-footer-background-color',
|
|
2107
|
+
'--bulma-card-footer-border-top',
|
|
2108
|
+
'--bulma-card-footer-padding',
|
|
2109
|
+
'--bulma-card-media-margin',
|
|
2110
|
+
'--bulma-dropdown-menu-min-width',
|
|
2111
|
+
'--bulma-dropdown-content-background-color',
|
|
2112
|
+
'--bulma-dropdown-content-offset',
|
|
2113
|
+
'--bulma-dropdown-content-padding-bottom',
|
|
2114
|
+
'--bulma-dropdown-content-padding-top',
|
|
2115
|
+
'--bulma-dropdown-content-radius',
|
|
2116
|
+
'--bulma-dropdown-content-shadow',
|
|
2117
|
+
'--bulma-dropdown-content-z',
|
|
2118
|
+
'--bulma-dropdown-item-h',
|
|
2119
|
+
'--bulma-dropdown-item-s',
|
|
2120
|
+
'--bulma-dropdown-item-l',
|
|
2121
|
+
'--bulma-dropdown-item-background-l',
|
|
2122
|
+
'--bulma-dropdown-item-background-l-delta',
|
|
2123
|
+
'--bulma-dropdown-item-hover-background-l-delta',
|
|
2124
|
+
'--bulma-dropdown-item-active-background-l-delta',
|
|
2125
|
+
'--bulma-dropdown-item-color-l',
|
|
2126
|
+
'--bulma-dropdown-item-selected-h',
|
|
2127
|
+
'--bulma-dropdown-item-selected-s',
|
|
2128
|
+
'--bulma-dropdown-item-selected-l',
|
|
2129
|
+
'--bulma-dropdown-item-selected-background-l',
|
|
2130
|
+
'--bulma-dropdown-item-selected-color-l',
|
|
2131
|
+
'--bulma-dropdown-divider-background-color',
|
|
2132
|
+
'--bulma-menu-item-h',
|
|
2133
|
+
'--bulma-menu-item-s',
|
|
2134
|
+
'--bulma-menu-item-l',
|
|
2135
|
+
'--bulma-menu-item-background-l',
|
|
2136
|
+
'--bulma-menu-item-background-l-delta',
|
|
2137
|
+
'--bulma-menu-item-hover-background-l-delta',
|
|
2138
|
+
'--bulma-menu-item-active-background-l-delta',
|
|
2139
|
+
'--bulma-menu-item-color-l',
|
|
2140
|
+
'--bulma-menu-item-radius',
|
|
2141
|
+
'--bulma-menu-item-selected-h',
|
|
2142
|
+
'--bulma-menu-item-selected-s',
|
|
2143
|
+
'--bulma-menu-item-selected-l',
|
|
2144
|
+
'--bulma-menu-item-selected-background-l',
|
|
2145
|
+
'--bulma-menu-item-selected-color-l',
|
|
2146
|
+
'--bulma-menu-list-border-left',
|
|
2147
|
+
'--bulma-menu-list-line-height',
|
|
2148
|
+
'--bulma-menu-list-link-padding',
|
|
2149
|
+
'--bulma-menu-nested-list-margin',
|
|
2150
|
+
'--bulma-menu-nested-list-padding-left',
|
|
2151
|
+
'--bulma-menu-label-color',
|
|
2152
|
+
'--bulma-menu-label-font-size',
|
|
2153
|
+
'--bulma-menu-label-letter-spacing',
|
|
2154
|
+
'--bulma-menu-label-spacing',
|
|
2155
|
+
'--bulma-message-h',
|
|
2156
|
+
'--bulma-message-s',
|
|
2157
|
+
'--bulma-message-background-l',
|
|
2158
|
+
'--bulma-message-border-l',
|
|
2159
|
+
'--bulma-message-border-l-delta',
|
|
2160
|
+
'--bulma-message-border-style',
|
|
2161
|
+
'--bulma-message-border-width',
|
|
2162
|
+
'--bulma-message-color-l',
|
|
2163
|
+
'--bulma-message-radius',
|
|
2164
|
+
'--bulma-message-header-weight',
|
|
2165
|
+
'--bulma-message-header-padding',
|
|
2166
|
+
'--bulma-message-header-radius',
|
|
2167
|
+
'--bulma-message-header-body-border-width',
|
|
2168
|
+
'--bulma-message-header-background-l',
|
|
2169
|
+
'--bulma-message-header-color-l',
|
|
2170
|
+
'--bulma-message-body-border-width',
|
|
2171
|
+
'--bulma-message-body-color',
|
|
2172
|
+
'--bulma-message-body-padding',
|
|
2173
|
+
'--bulma-message-body-radius',
|
|
2174
|
+
'--bulma-message-body-pre-code-background-color',
|
|
2175
|
+
'--bulma-modal-z',
|
|
2176
|
+
'--bulma-modal-background-background-color',
|
|
2177
|
+
'--bulma-modal-content-width',
|
|
2178
|
+
'--bulma-modal-content-margin-mobile',
|
|
2179
|
+
'--bulma-modal-content-spacing-mobile',
|
|
2180
|
+
'--bulma-modal-content-spacing-tablet',
|
|
2181
|
+
'--bulma-modal-close-dimensions',
|
|
2182
|
+
'--bulma-modal-close-right',
|
|
2183
|
+
'--bulma-modal-close-top',
|
|
2184
|
+
'--bulma-modal-card-spacing',
|
|
2185
|
+
'--bulma-modal-card-head-background-color',
|
|
2186
|
+
'--bulma-modal-card-head-padding',
|
|
2187
|
+
'--bulma-modal-card-head-radius',
|
|
2188
|
+
'--bulma-modal-card-title-color',
|
|
2189
|
+
'--bulma-modal-card-title-line-height',
|
|
2190
|
+
'--bulma-modal-card-title-size',
|
|
2191
|
+
'--bulma-modal-card-foot-background-color',
|
|
2192
|
+
'--bulma-modal-card-foot-radius',
|
|
2193
|
+
'--bulma-modal-card-body-background-color',
|
|
2194
|
+
'--bulma-modal-card-body-padding',
|
|
2195
|
+
'--bulma-navbar-h',
|
|
2196
|
+
'--bulma-navbar-s',
|
|
2197
|
+
'--bulma-navbar-l',
|
|
2198
|
+
'--bulma-navbar-background-color',
|
|
2199
|
+
'--bulma-navbar-box-shadow-size',
|
|
2200
|
+
'--bulma-navbar-box-shadow-color',
|
|
2201
|
+
'--bulma-navbar-padding-vertical',
|
|
2202
|
+
'--bulma-navbar-padding-horizontal',
|
|
2203
|
+
'--bulma-navbar-z',
|
|
2204
|
+
'--bulma-navbar-fixed-z',
|
|
2205
|
+
'--bulma-navbar-item-background-a',
|
|
2206
|
+
'--bulma-navbar-item-background-l',
|
|
2207
|
+
'--bulma-navbar-item-background-l-delta',
|
|
2208
|
+
'--bulma-navbar-item-hover-background-l-delta',
|
|
2209
|
+
'--bulma-navbar-item-active-background-l-delta',
|
|
2210
|
+
'--bulma-navbar-item-color-l',
|
|
2211
|
+
'--bulma-navbar-item-selected-h',
|
|
2212
|
+
'--bulma-navbar-item-selected-s',
|
|
2213
|
+
'--bulma-navbar-item-selected-l',
|
|
2214
|
+
'--bulma-navbar-item-selected-background-l',
|
|
2215
|
+
'--bulma-navbar-item-selected-color-l',
|
|
2216
|
+
'--bulma-navbar-item-img-max-height',
|
|
2217
|
+
'--bulma-navbar-burger-color',
|
|
2218
|
+
'--bulma-navbar-tab-hover-background-color',
|
|
2219
|
+
'--bulma-navbar-tab-hover-border-bottom-color',
|
|
2220
|
+
'--bulma-navbar-tab-active-color',
|
|
2221
|
+
'--bulma-navbar-tab-active-background-color',
|
|
2222
|
+
'--bulma-navbar-tab-active-border-bottom-color',
|
|
2223
|
+
'--bulma-navbar-tab-active-border-bottom-style',
|
|
2224
|
+
'--bulma-navbar-tab-active-border-bottom-width',
|
|
2225
|
+
'--bulma-navbar-dropdown-background-color',
|
|
2226
|
+
'--bulma-navbar-dropdown-border-l',
|
|
2227
|
+
'--bulma-navbar-dropdown-border-color',
|
|
2228
|
+
'--bulma-navbar-dropdown-border-style',
|
|
2229
|
+
'--bulma-navbar-dropdown-border-width',
|
|
2230
|
+
'--bulma-navbar-dropdown-offset',
|
|
2231
|
+
'--bulma-navbar-dropdown-arrow',
|
|
2232
|
+
'--bulma-navbar-dropdown-radius',
|
|
2233
|
+
'--bulma-navbar-dropdown-z',
|
|
2234
|
+
'--bulma-navbar-dropdown-boxed-radius',
|
|
2235
|
+
'--bulma-navbar-dropdown-boxed-shadow',
|
|
2236
|
+
'--bulma-navbar-dropdown-item-h',
|
|
2237
|
+
'--bulma-navbar-dropdown-item-s',
|
|
2238
|
+
'--bulma-navbar-dropdown-item-l',
|
|
2239
|
+
'--bulma-navbar-dropdown-item-background-l',
|
|
2240
|
+
'--bulma-navbar-dropdown-item-color-l',
|
|
2241
|
+
'--bulma-navbar-divider-background-l',
|
|
2242
|
+
'--bulma-navbar-divider-height',
|
|
2243
|
+
'--bulma-navbar-bottom-box-shadow-size',
|
|
2244
|
+
'--bulma-pagination-margin',
|
|
2245
|
+
'--bulma-pagination-min-width',
|
|
2246
|
+
'--bulma-pagination-item-h',
|
|
2247
|
+
'--bulma-pagination-item-s',
|
|
2248
|
+
'--bulma-pagination-item-l',
|
|
2249
|
+
'--bulma-pagination-item-background-l-delta',
|
|
2250
|
+
'--bulma-pagination-item-hover-background-l-delta',
|
|
2251
|
+
'--bulma-pagination-item-active-background-l-delta',
|
|
2252
|
+
'--bulma-pagination-item-border-style',
|
|
2253
|
+
'--bulma-pagination-item-border-width',
|
|
2254
|
+
'--bulma-pagination-item-border-l',
|
|
2255
|
+
'--bulma-pagination-item-border-l-delta',
|
|
2256
|
+
'--bulma-pagination-item-hover-border-l-delta',
|
|
2257
|
+
'--bulma-pagination-item-active-border-l-delta',
|
|
2258
|
+
'--bulma-pagination-item-focus-border-l-delta',
|
|
2259
|
+
'--bulma-pagination-item-color-l',
|
|
2260
|
+
'--bulma-pagination-item-font-size',
|
|
2261
|
+
'--bulma-pagination-item-margin',
|
|
2262
|
+
'--bulma-pagination-item-padding-left',
|
|
2263
|
+
'--bulma-pagination-item-padding-right',
|
|
2264
|
+
'--bulma-pagination-item-outer-shadow-h',
|
|
2265
|
+
'--bulma-pagination-item-outer-shadow-s',
|
|
2266
|
+
'--bulma-pagination-item-outer-shadow-l',
|
|
2267
|
+
'--bulma-pagination-item-outer-shadow-a',
|
|
2268
|
+
'--bulma-pagination-nav-padding-left',
|
|
2269
|
+
'--bulma-pagination-nav-padding-right',
|
|
2270
|
+
'--bulma-pagination-disabled-color',
|
|
2271
|
+
'--bulma-pagination-disabled-background-color',
|
|
2272
|
+
'--bulma-pagination-disabled-border-color',
|
|
2273
|
+
'--bulma-pagination-current-color',
|
|
2274
|
+
'--bulma-pagination-current-background-color',
|
|
2275
|
+
'--bulma-pagination-current-border-color',
|
|
2276
|
+
'--bulma-pagination-ellipsis-color',
|
|
2277
|
+
'--bulma-pagination-shadow-inset',
|
|
2278
|
+
'--bulma-pagination-selected-item-h',
|
|
2279
|
+
'--bulma-pagination-selected-item-s',
|
|
2280
|
+
'--bulma-pagination-selected-item-l',
|
|
2281
|
+
'--bulma-pagination-selected-item-background-l',
|
|
2282
|
+
'--bulma-pagination-selected-item-border-l',
|
|
2283
|
+
'--bulma-pagination-selected-item-color-l',
|
|
2284
|
+
'--bulma-panel-margin',
|
|
2285
|
+
'--bulma-panel-item-border',
|
|
2286
|
+
'--bulma-panel-radius',
|
|
2287
|
+
'--bulma-panel-shadow',
|
|
2288
|
+
'--bulma-panel-heading-line-height',
|
|
2289
|
+
'--bulma-panel-heading-padding',
|
|
2290
|
+
'--bulma-panel-heading-radius',
|
|
2291
|
+
'--bulma-panel-heading-size',
|
|
2292
|
+
'--bulma-panel-heading-weight',
|
|
2293
|
+
'--bulma-panel-tabs-font-size',
|
|
2294
|
+
'--bulma-panel-tab-border-bottom-color',
|
|
2295
|
+
'--bulma-panel-tab-border-bottom-style',
|
|
2296
|
+
'--bulma-panel-tab-border-bottom-width',
|
|
2297
|
+
'--bulma-panel-tab-active-color',
|
|
2298
|
+
'--bulma-panel-list-item-color',
|
|
2299
|
+
'--bulma-panel-list-item-hover-color',
|
|
2300
|
+
'--bulma-panel-block-color',
|
|
2301
|
+
'--bulma-panel-block-hover-background-color',
|
|
2302
|
+
'--bulma-panel-block-active-border-left-color',
|
|
2303
|
+
'--bulma-panel-block-active-color',
|
|
2304
|
+
'--bulma-panel-block-active-icon-color',
|
|
2305
|
+
'--bulma-panel-icon-color',
|
|
2306
|
+
'--bulma-tabs-border-bottom-color',
|
|
2307
|
+
'--bulma-tabs-border-bottom-style',
|
|
2308
|
+
'--bulma-tabs-border-bottom-width',
|
|
2309
|
+
'--bulma-tabs-link-color',
|
|
2310
|
+
'--bulma-tabs-link-hover-border-bottom-color',
|
|
2311
|
+
'--bulma-tabs-link-hover-color',
|
|
2312
|
+
'--bulma-tabs-link-active-border-bottom-color',
|
|
2313
|
+
'--bulma-tabs-link-active-color',
|
|
2314
|
+
'--bulma-tabs-link-padding',
|
|
2315
|
+
'--bulma-tabs-boxed-link-radius',
|
|
2316
|
+
'--bulma-tabs-boxed-link-hover-background-color',
|
|
2317
|
+
'--bulma-tabs-boxed-link-hover-border-bottom-color',
|
|
2318
|
+
'--bulma-tabs-boxed-link-active-background-color',
|
|
2319
|
+
'--bulma-tabs-boxed-link-active-border-color',
|
|
2320
|
+
'--bulma-tabs-boxed-link-active-border-bottom-color',
|
|
2321
|
+
'--bulma-tabs-toggle-link-border-color',
|
|
2322
|
+
'--bulma-tabs-toggle-link-border-style',
|
|
2323
|
+
'--bulma-tabs-toggle-link-border-width',
|
|
2324
|
+
'--bulma-tabs-toggle-link-hover-background-color',
|
|
2325
|
+
'--bulma-tabs-toggle-link-hover-border-color',
|
|
2326
|
+
'--bulma-tabs-toggle-link-radius',
|
|
2327
|
+
'--bulma-tabs-toggle-link-active-background-color',
|
|
2328
|
+
'--bulma-tabs-toggle-link-active-border-color',
|
|
2329
|
+
'--bulma-tabs-toggle-link-active-color',
|
|
2330
|
+
'--bulma-box-background-color',
|
|
2331
|
+
'--bulma-box-color',
|
|
2332
|
+
'--bulma-box-radius',
|
|
2333
|
+
'--bulma-box-shadow',
|
|
2334
|
+
'--bulma-box-padding',
|
|
2335
|
+
'--bulma-box-link-hover-shadow',
|
|
2336
|
+
'--bulma-box-link-active-shadow',
|
|
2337
|
+
'--bulma-content-heading-color',
|
|
2338
|
+
'--bulma-content-heading-weight',
|
|
2339
|
+
'--bulma-content-heading-line-height',
|
|
2340
|
+
'--bulma-content-block-margin-bottom',
|
|
2341
|
+
'--bulma-content-blockquote-background-color',
|
|
2342
|
+
'--bulma-content-blockquote-border-left',
|
|
2343
|
+
'--bulma-content-blockquote-padding',
|
|
2344
|
+
'--bulma-content-pre-padding',
|
|
2345
|
+
'--bulma-content-table-cell-border',
|
|
2346
|
+
'--bulma-content-table-cell-border-width',
|
|
2347
|
+
'--bulma-content-table-cell-padding',
|
|
2348
|
+
'--bulma-content-table-cell-heading-color',
|
|
2349
|
+
'--bulma-content-table-head-cell-border-width',
|
|
2350
|
+
'--bulma-content-table-head-cell-color',
|
|
2351
|
+
'--bulma-content-table-body-last-row-cell-border-bottom-width',
|
|
2352
|
+
'--bulma-content-table-foot-cell-border-width',
|
|
2353
|
+
'--bulma-content-table-foot-cell-color',
|
|
2354
|
+
'--bulma-delete-dimensions',
|
|
2355
|
+
'--bulma-delete-background-l',
|
|
2356
|
+
'--bulma-delete-background-alpha',
|
|
2357
|
+
'--bulma-delete-color',
|
|
2358
|
+
'--bulma-icon-dimensions',
|
|
2359
|
+
'--bulma-icon-dimensions-small',
|
|
2360
|
+
'--bulma-icon-dimensions-medium',
|
|
2361
|
+
'--bulma-icon-dimensions-large',
|
|
2362
|
+
'--bulma-icon-text-spacing',
|
|
2363
|
+
'--bulma-notification-h',
|
|
2364
|
+
'--bulma-notification-s',
|
|
2365
|
+
'--bulma-notification-background-l',
|
|
2366
|
+
'--bulma-notification-color-l',
|
|
2367
|
+
'--bulma-notification-code-background-color',
|
|
2368
|
+
'--bulma-notification-radius',
|
|
2369
|
+
'--bulma-notification-padding',
|
|
2370
|
+
'--bulma-progress-border-radius',
|
|
2371
|
+
'--bulma-progress-bar-background-color',
|
|
2372
|
+
'--bulma-progress-value-background-color',
|
|
2373
|
+
'--bulma-progress-indeterminate-duration',
|
|
2374
|
+
'--bulma-table-color',
|
|
2375
|
+
'--bulma-table-background-color',
|
|
2376
|
+
'--bulma-table-cell-border-color',
|
|
2377
|
+
'--bulma-table-cell-border-style',
|
|
2378
|
+
'--bulma-table-cell-border-width',
|
|
2379
|
+
'--bulma-table-cell-padding',
|
|
2380
|
+
'--bulma-table-cell-heading-color',
|
|
2381
|
+
'--bulma-table-cell-text-align',
|
|
2382
|
+
'--bulma-table-head-cell-border-width',
|
|
2383
|
+
'--bulma-table-head-cell-color',
|
|
2384
|
+
'--bulma-table-foot-cell-border-width',
|
|
2385
|
+
'--bulma-table-foot-cell-color',
|
|
2386
|
+
'--bulma-table-head-background-color',
|
|
2387
|
+
'--bulma-table-body-background-color',
|
|
2388
|
+
'--bulma-table-foot-background-color',
|
|
2389
|
+
'--bulma-table-row-hover-background-color',
|
|
2390
|
+
'--bulma-table-row-active-background-color',
|
|
2391
|
+
'--bulma-table-row-active-color',
|
|
2392
|
+
'--bulma-table-striped-row-even-background-color',
|
|
2393
|
+
'--bulma-table-striped-row-even-hover-background-color',
|
|
2394
|
+
'--bulma-tag-h',
|
|
2395
|
+
'--bulma-tag-s',
|
|
2396
|
+
'--bulma-tag-background-l',
|
|
2397
|
+
'--bulma-tag-background-l-delta',
|
|
2398
|
+
'--bulma-tag-hover-background-l-delta',
|
|
2399
|
+
'--bulma-tag-active-background-l-delta',
|
|
2400
|
+
'--bulma-tag-color-l',
|
|
2401
|
+
'--bulma-tag-radius',
|
|
2402
|
+
'--bulma-tag-delete-margin',
|
|
2403
|
+
'--bulma-title-color',
|
|
2404
|
+
'--bulma-title-family',
|
|
2405
|
+
'--bulma-title-size',
|
|
2406
|
+
'--bulma-title-weight',
|
|
2407
|
+
'--bulma-title-line-height',
|
|
2408
|
+
'--bulma-title-strong-color',
|
|
2409
|
+
'--bulma-title-strong-weight',
|
|
2410
|
+
'--bulma-title-sub-size',
|
|
2411
|
+
'--bulma-title-sup-size',
|
|
2412
|
+
'--bulma-subtitle-color',
|
|
2413
|
+
'--bulma-subtitle-family',
|
|
2414
|
+
'--bulma-subtitle-size',
|
|
2415
|
+
'--bulma-subtitle-weight',
|
|
2416
|
+
'--bulma-subtitle-line-height',
|
|
2417
|
+
'--bulma-subtitle-strong-color',
|
|
2418
|
+
'--bulma-subtitle-strong-weight',
|
|
2419
|
+
'--bulma-control-radius',
|
|
2420
|
+
'--bulma-control-radius-small',
|
|
2421
|
+
'--bulma-control-border-width',
|
|
2422
|
+
'--bulma-control-height',
|
|
2423
|
+
'--bulma-control-line-height',
|
|
2424
|
+
'--bulma-control-padding-vertical',
|
|
2425
|
+
'--bulma-control-padding-horizontal',
|
|
2426
|
+
'--bulma-control-size',
|
|
2427
|
+
'--bulma-control-focus-shadow-l',
|
|
2428
|
+
'--bulma-file-radius',
|
|
2429
|
+
'--bulma-file-name-border-color',
|
|
2430
|
+
'--bulma-file-name-border-style',
|
|
2431
|
+
'--bulma-file-name-border-width',
|
|
2432
|
+
'--bulma-file-name-max-width',
|
|
2433
|
+
'--bulma-file-h',
|
|
2434
|
+
'--bulma-file-s',
|
|
2435
|
+
'--bulma-file-background-l',
|
|
2436
|
+
'--bulma-file-background-l-delta',
|
|
2437
|
+
'--bulma-file-hover-background-l-delta',
|
|
2438
|
+
'--bulma-file-active-background-l-delta',
|
|
2439
|
+
'--bulma-file-border-l',
|
|
2440
|
+
'--bulma-file-border-l-delta',
|
|
2441
|
+
'--bulma-file-hover-border-l-delta',
|
|
2442
|
+
'--bulma-file-active-border-l-delta',
|
|
2443
|
+
'--bulma-file-cta-color-l',
|
|
2444
|
+
'--bulma-file-name-color-l',
|
|
2445
|
+
'--bulma-file-color-l-delta',
|
|
2446
|
+
'--bulma-file-hover-color-l-delta',
|
|
2447
|
+
'--bulma-file-active-color-l-delta',
|
|
2448
|
+
'--bulma-input-h',
|
|
2449
|
+
'--bulma-input-s',
|
|
2450
|
+
'--bulma-input-l',
|
|
2451
|
+
'--bulma-input-border-style',
|
|
2452
|
+
'--bulma-input-border-l',
|
|
2453
|
+
'--bulma-input-border-l-delta',
|
|
2454
|
+
'--bulma-input-hover-border-l-delta',
|
|
2455
|
+
'--bulma-input-active-border-l-delta',
|
|
2456
|
+
'--bulma-input-focus-h',
|
|
2457
|
+
'--bulma-input-focus-s',
|
|
2458
|
+
'--bulma-input-focus-l',
|
|
2459
|
+
'--bulma-input-focus-shadow-size',
|
|
2460
|
+
'--bulma-input-focus-shadow-alpha',
|
|
2461
|
+
'--bulma-input-color-l',
|
|
2462
|
+
'--bulma-input-background-l',
|
|
2463
|
+
'--bulma-input-background-l-delta',
|
|
2464
|
+
'--bulma-input-height',
|
|
2465
|
+
'--bulma-input-shadow',
|
|
2466
|
+
'--bulma-input-placeholder-color',
|
|
2467
|
+
'--bulma-input-disabled-color',
|
|
2468
|
+
'--bulma-input-disabled-background-color',
|
|
2469
|
+
'--bulma-input-disabled-border-color',
|
|
2470
|
+
'--bulma-input-disabled-placeholder-color',
|
|
2471
|
+
'--bulma-input-arrow',
|
|
2472
|
+
'--bulma-input-icon-color',
|
|
2473
|
+
'--bulma-input-icon-hover-color',
|
|
2474
|
+
'--bulma-input-icon-focus-color',
|
|
2475
|
+
'--bulma-input-radius',
|
|
2476
|
+
'--bulma-column-gap',
|
|
2477
|
+
'--bulma-grid-gap',
|
|
2478
|
+
'--bulma-grid-column-count',
|
|
2479
|
+
'--bulma-grid-column-min',
|
|
2480
|
+
'--bulma-grid-cell-column-span',
|
|
2481
|
+
'--bulma-grid-cell-column-start',
|
|
2482
|
+
'--bulma-footer-background-color',
|
|
2483
|
+
'--bulma-footer-color',
|
|
2484
|
+
'--bulma-footer-padding',
|
|
2485
|
+
'--bulma-hero-body-padding',
|
|
2486
|
+
'--bulma-hero-body-padding-tablet',
|
|
2487
|
+
'--bulma-hero-body-padding-small',
|
|
2488
|
+
'--bulma-hero-body-padding-medium',
|
|
2489
|
+
'--bulma-hero-body-padding-large',
|
|
2490
|
+
'--bulma-media-border-color',
|
|
2491
|
+
'--bulma-media-border-size',
|
|
2492
|
+
'--bulma-media-spacing',
|
|
2493
|
+
'--bulma-media-spacing-large',
|
|
2494
|
+
'--bulma-media-content-spacing',
|
|
2495
|
+
'--bulma-media-level-1-spacing',
|
|
2496
|
+
'--bulma-media-level-1-content-spacing',
|
|
2497
|
+
'--bulma-media-level-2-spacing',
|
|
2498
|
+
'--bulma-section-padding',
|
|
2499
|
+
'--bulma-section-padding-desktop',
|
|
2500
|
+
'--bulma-section-padding-medium',
|
|
2501
|
+
'--bulma-section-padding-large',
|
|
2502
|
+
];
|
|
2503
|
+
function cssVarToProp(varName) {
|
|
2504
|
+
return varName
|
|
2505
|
+
.replace(/^--bulma-/, '')
|
|
2506
|
+
.split('-')
|
|
2507
|
+
.map((part, i) => i === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1))
|
|
2508
|
+
.join('');
|
|
2509
|
+
}
|
|
2510
|
+
const bulmaVarPropMap = Object.fromEntries(bulmaCssVars.map(cssVar => [cssVarToProp(cssVar), cssVar]));
|
|
2511
|
+
const Theme = ({ bulmaVars = {}, children, className, isRoot = false, ...restProps }) => {
|
|
2512
|
+
const { bulmaVarProps, otherProps } = useMemo(() => {
|
|
2513
|
+
const varProps = {};
|
|
2514
|
+
const otherPropsObj = {};
|
|
2515
|
+
for (const [key, value] of Object.entries(restProps)) {
|
|
2516
|
+
if (Object.prototype.hasOwnProperty.call(bulmaVarPropMap, key)) {
|
|
2517
|
+
varProps[key] = value;
|
|
2518
|
+
}
|
|
2519
|
+
else {
|
|
2520
|
+
otherPropsObj[key] = value;
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
return { bulmaVarProps: varProps, otherProps: otherPropsObj };
|
|
2524
|
+
}, [restProps]);
|
|
2525
|
+
const { bulmaHelperClasses, rest } = useBulmaClasses(otherProps);
|
|
2526
|
+
const mergedVars = useMemo(() => {
|
|
2527
|
+
const vars = { ...bulmaVars };
|
|
2528
|
+
for (const [propName, cssVar] of Object.entries(bulmaVarPropMap)) {
|
|
2529
|
+
if (bulmaVarProps[propName] !== undefined) {
|
|
2530
|
+
vars[cssVar] = bulmaVarProps[propName];
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
return vars;
|
|
2534
|
+
}, [bulmaVars, bulmaVarProps]);
|
|
2535
|
+
useEffect(() => {
|
|
2536
|
+
if (!isRoot) {
|
|
2537
|
+
return;
|
|
2538
|
+
}
|
|
2539
|
+
const validVars = Object.entries(mergedVars).filter(([key, value]) => bulmaCssVars.includes(key) && value);
|
|
2540
|
+
if (validVars.length === 0) {
|
|
2541
|
+
return;
|
|
2542
|
+
}
|
|
2543
|
+
const styleId = 'bestax-bulma-theme-vars';
|
|
2544
|
+
let styleElement = document.getElementById(styleId);
|
|
2545
|
+
if (!styleElement) {
|
|
2546
|
+
styleElement = document.createElement('style');
|
|
2547
|
+
styleElement.id = styleId;
|
|
2548
|
+
document.head.appendChild(styleElement);
|
|
2549
|
+
}
|
|
2550
|
+
const cssRules = validVars
|
|
2551
|
+
.map(([key, value]) => `${key}: ${value};`)
|
|
2552
|
+
.join(' ');
|
|
2553
|
+
styleElement.textContent = `:root { ${cssRules} }`;
|
|
2554
|
+
return () => {
|
|
2555
|
+
const element = document.getElementById(styleId);
|
|
2556
|
+
if (element) {
|
|
2557
|
+
element.remove();
|
|
2558
|
+
}
|
|
2559
|
+
};
|
|
2560
|
+
}, [mergedVars, isRoot]);
|
|
2561
|
+
const style = useMemo(() => {
|
|
2562
|
+
if (isRoot) {
|
|
2563
|
+
return {};
|
|
2564
|
+
}
|
|
2565
|
+
const styleObj = {};
|
|
2566
|
+
for (const [key, value] of Object.entries(mergedVars)) {
|
|
2567
|
+
if (bulmaCssVars.includes(key) && value) {
|
|
2568
|
+
styleObj[key] = value;
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
return styleObj;
|
|
2572
|
+
}, [mergedVars, isRoot]);
|
|
2573
|
+
const combinedClassName = useMemo(() => {
|
|
2574
|
+
if (isRoot) {
|
|
2575
|
+
return '';
|
|
2576
|
+
}
|
|
2577
|
+
return classNames(className, bulmaHelperClasses);
|
|
2578
|
+
}, [className, bulmaHelperClasses, isRoot]);
|
|
2579
|
+
return isRoot ? (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: children })) : (jsxRuntimeExports.jsx("div", { className: combinedClassName || undefined, style: style, ...rest, children: children }));
|
|
2580
|
+
};
|
|
2581
|
+
|
|
1869
2582
|
const Container = ({ className, textColor, bgColor, fluid, widescreen, fullhd, breakpoint, isMax, children, ...props }) => {
|
|
2583
|
+
const { classPrefix } = useConfig();
|
|
1870
2584
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1871
2585
|
color: textColor,
|
|
1872
2586
|
backgroundColor: bgColor,
|
|
@@ -1886,7 +2600,8 @@ const Container = ({ className, textColor, bgColor, fluid, widescreen, fullhd, b
|
|
|
1886
2600
|
breakpointClass = `is-${breakpoint}`;
|
|
1887
2601
|
}
|
|
1888
2602
|
}
|
|
1889
|
-
const
|
|
2603
|
+
const mainClass = classPrefix ? `${classPrefix}container` : 'container';
|
|
2604
|
+
const containerClasses = classNames(mainClass, {
|
|
1890
2605
|
'is-fluid': fluid,
|
|
1891
2606
|
'is-widescreen': widescreen,
|
|
1892
2607
|
'is-fullhd': fullhd,
|
|
@@ -1895,73 +2610,91 @@ const Container = ({ className, textColor, bgColor, fluid, widescreen, fullhd, b
|
|
|
1895
2610
|
};
|
|
1896
2611
|
|
|
1897
2612
|
const Footer = ({ as = 'footer', className, children, ...props }) => {
|
|
2613
|
+
const { classPrefix } = useConfig();
|
|
1898
2614
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
1899
2615
|
const Tag = as;
|
|
1900
|
-
|
|
2616
|
+
const mainClass = classPrefix ? `${classPrefix}footer` : 'footer';
|
|
2617
|
+
return (jsxRuntimeExports.jsx(Tag, { className: classNames(mainClass, bulmaHelperClasses, className), ...rest, children: children }));
|
|
1901
2618
|
};
|
|
1902
2619
|
|
|
1903
2620
|
const Hero = ({ className, color, size, bgColor, fullheightWithNavbar, children, ...props }) => {
|
|
2621
|
+
const { classPrefix } = useConfig();
|
|
1904
2622
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1905
2623
|
color,
|
|
1906
2624
|
backgroundColor: bgColor,
|
|
1907
2625
|
...props,
|
|
1908
2626
|
});
|
|
1909
|
-
const
|
|
2627
|
+
const mainClass = classPrefix ? `${classPrefix}hero` : 'hero';
|
|
2628
|
+
const heroClasses = classNames(mainClass, bulmaHelperClasses, className, color && `is-${color}`, size && size !== 'fullheight-with-navbar' && `is-${size}`, {
|
|
1910
2629
|
'is-fullheight-with-navbar': fullheightWithNavbar || size === 'fullheight-with-navbar',
|
|
1911
2630
|
});
|
|
1912
2631
|
return (jsxRuntimeExports.jsx("section", { className: heroClasses, ...rest, children: children }));
|
|
1913
2632
|
};
|
|
1914
2633
|
const HeroHead = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
2634
|
+
const { classPrefix } = useConfig();
|
|
1915
2635
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1916
2636
|
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
1917
2637
|
backgroundColor: bgColor,
|
|
1918
2638
|
...props,
|
|
1919
2639
|
});
|
|
1920
|
-
|
|
2640
|
+
const mainClass = classPrefix ? `${classPrefix}hero-head` : 'hero-head';
|
|
2641
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames(mainClass, bulmaHelperClasses, className), ...rest, children: children }));
|
|
1921
2642
|
};
|
|
1922
2643
|
const HeroBody = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
2644
|
+
const { classPrefix } = useConfig();
|
|
1923
2645
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1924
2646
|
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
1925
2647
|
backgroundColor: bgColor,
|
|
1926
2648
|
...props,
|
|
1927
2649
|
});
|
|
1928
|
-
|
|
2650
|
+
const mainClass = classPrefix ? `${classPrefix}hero-body` : 'hero-body';
|
|
2651
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames(mainClass, bulmaHelperClasses, className), ...rest, children: children }));
|
|
1929
2652
|
};
|
|
1930
2653
|
const HeroFoot = ({ className, children, color, bgColor, textColor, ...props }) => {
|
|
2654
|
+
const { classPrefix } = useConfig();
|
|
1931
2655
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
1932
2656
|
color: textColor !== null && textColor !== void 0 ? textColor : color,
|
|
1933
2657
|
backgroundColor: bgColor,
|
|
1934
2658
|
...props,
|
|
1935
2659
|
});
|
|
1936
|
-
|
|
2660
|
+
const mainClass = classPrefix ? `${classPrefix}hero-foot` : 'hero-foot';
|
|
2661
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames(mainClass, bulmaHelperClasses, className), ...rest, children: children }));
|
|
1937
2662
|
};
|
|
1938
2663
|
Hero.Head = HeroHead;
|
|
1939
2664
|
Hero.Body = HeroBody;
|
|
1940
2665
|
Hero.Foot = HeroFoot;
|
|
1941
2666
|
|
|
1942
2667
|
const Level = ({ isMobile, className, children, ...props }) => {
|
|
2668
|
+
const { classPrefix } = useConfig();
|
|
1943
2669
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
1944
|
-
|
|
2670
|
+
const mainClass = classPrefix ? `${classPrefix}level` : 'level';
|
|
2671
|
+
return (jsxRuntimeExports.jsx("nav", { className: classNames(mainClass, bulmaHelperClasses, className, {
|
|
1945
2672
|
'is-mobile': isMobile,
|
|
1946
2673
|
}), ...rest, children: children }));
|
|
1947
2674
|
};
|
|
1948
2675
|
const LevelLeft = ({ className, children, ...props }) => {
|
|
2676
|
+
const { classPrefix } = useConfig();
|
|
1949
2677
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
1950
|
-
|
|
2678
|
+
const mainClass = classPrefix ? `${classPrefix}level-left` : 'level-left';
|
|
2679
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames(mainClass, bulmaHelperClasses, className), ...rest, children: children }));
|
|
1951
2680
|
};
|
|
1952
2681
|
const LevelRight = ({ className, children, ...props }) => {
|
|
2682
|
+
const { classPrefix } = useConfig();
|
|
1953
2683
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
1954
|
-
|
|
2684
|
+
const mainClass = classPrefix ? `${classPrefix}level-right` : 'level-right';
|
|
2685
|
+
return (jsxRuntimeExports.jsx("div", { className: classNames(mainClass, bulmaHelperClasses, className), ...rest, children: children }));
|
|
1955
2686
|
};
|
|
1956
2687
|
const LevelItem = ({ as = 'div', hasTextCentered, className, children, href, target, rel, ...props }) => {
|
|
2688
|
+
const { classPrefix } = useConfig();
|
|
1957
2689
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
1958
2690
|
const Tag = as;
|
|
2691
|
+
const mainClass = classPrefix ? `${classPrefix}level-item` : 'level-item';
|
|
1959
2692
|
if (Tag === 'a') {
|
|
1960
|
-
return (jsxRuntimeExports.jsx("a", { className: classNames(
|
|
2693
|
+
return (jsxRuntimeExports.jsx("a", { className: classNames(mainClass, bulmaHelperClasses, className, {
|
|
1961
2694
|
'has-text-centered': hasTextCentered,
|
|
1962
2695
|
}), href: href, target: target, rel: rel, ...rest, children: children }));
|
|
1963
2696
|
}
|
|
1964
|
-
return (jsxRuntimeExports.jsx(Tag, { className: classNames(
|
|
2697
|
+
return (jsxRuntimeExports.jsx(Tag, { className: classNames(mainClass, bulmaHelperClasses, className, {
|
|
1965
2698
|
'has-text-centered': hasTextCentered,
|
|
1966
2699
|
}), ...rest, children: children }));
|
|
1967
2700
|
};
|
|
@@ -1970,9 +2703,11 @@ Level.Right = LevelRight;
|
|
|
1970
2703
|
Level.Item = LevelItem;
|
|
1971
2704
|
|
|
1972
2705
|
const Media = ({ as = 'article', className, children, ...props }) => {
|
|
2706
|
+
const { classPrefix } = useConfig();
|
|
1973
2707
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
1974
2708
|
const Tag = as;
|
|
1975
|
-
|
|
2709
|
+
const mainClass = classPrefix ? `${classPrefix}media` : 'media';
|
|
2710
|
+
return (jsxRuntimeExports.jsx(Tag, { className: classNames(mainClass, bulmaHelperClasses, className), ...rest, children: children }));
|
|
1976
2711
|
};
|
|
1977
2712
|
const MediaLeft = ({ as = 'figure', className, children, ...props }) => {
|
|
1978
2713
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
@@ -1992,12 +2727,14 @@ Media.Content = MediaContent;
|
|
|
1992
2727
|
Media.Right = MediaRight;
|
|
1993
2728
|
|
|
1994
2729
|
const Section = ({ size, className, children, ...props }) => {
|
|
2730
|
+
const { classPrefix } = useConfig();
|
|
1995
2731
|
const { bulmaHelperClasses, rest } = useBulmaClasses({ ...props });
|
|
1996
|
-
const
|
|
2732
|
+
const mainClass = classPrefix ? `${classPrefix}section` : 'section';
|
|
2733
|
+
const sectionClasses = classNames(mainClass, className, bulmaHelperClasses, {
|
|
1997
2734
|
[`is-${size}`]: size,
|
|
1998
2735
|
});
|
|
1999
2736
|
return (jsxRuntimeExports.jsx("section", { className: sectionClasses, ...rest, children: children }));
|
|
2000
2737
|
};
|
|
2001
2738
|
|
|
2002
|
-
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, 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 };
|
|
2739
|
+
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, isBrowser, useBulmaClasses, useClassPrefix, useConfig, 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 };
|
|
2003
2740
|
//# sourceMappingURL=index.esm.js.map
|