@allxsmith/bestax-bulma 5.5.0 → 5.6.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 +90 -53
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +90 -53
- package/dist/index.esm.js.map +1 -1
- package/dist/types/columns/Columns.d.ts +8 -1
- package/dist/types/grid/Grid.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -682,7 +682,13 @@ const Column = ({ className, textColor, color: _fieldColor, bgColor, size, sizeM
|
|
|
682
682
|
return (jsxRuntime.jsx("div", { className: columnClasses, ...rest, children: children }));
|
|
683
683
|
};
|
|
684
684
|
|
|
685
|
-
const Columns = ({ className, textColor, color: _fieldColor, bgColor, isCentered, isGapless, isMultiline, isVCentered, isMobile, isDesktop, gapSize, gapSizeMobile, gapSizeTablet, gapSizeDesktop, gapSizeWidescreen, gapSizeFullhd, children, ...props }) => {
|
|
685
|
+
const Columns = ({ className, textColor, color: _fieldColor, bgColor, isCentered, isGapless, isMultiline, isVCentered, isMobile, isDesktop, gap, gapMobile, gapTablet, gapDesktop, gapWidescreen, gapFullhd, gapSize, gapSizeMobile, gapSizeTablet, gapSizeDesktop, gapSizeWidescreen, gapSizeFullhd, children, ...props }) => {
|
|
686
|
+
const resolvedGap = gap ?? gapSize;
|
|
687
|
+
const resolvedGapMobile = gapMobile ?? gapSizeMobile;
|
|
688
|
+
const resolvedGapTablet = gapTablet ?? gapSizeTablet;
|
|
689
|
+
const resolvedGapDesktop = gapDesktop ?? gapSizeDesktop;
|
|
690
|
+
const resolvedGapWidescreen = gapWidescreen ?? gapSizeWidescreen;
|
|
691
|
+
const resolvedGapFullhd = gapFullhd ?? gapSizeFullhd;
|
|
686
692
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
687
693
|
color: textColor,
|
|
688
694
|
backgroundColor: bgColor,
|
|
@@ -690,12 +696,12 @@ const Columns = ({ className, textColor, color: _fieldColor, bgColor, isCentered
|
|
|
690
696
|
});
|
|
691
697
|
const mainClass = usePrefixedClassNames('columns');
|
|
692
698
|
const gapClasses = usePrefixedClassNames('', {
|
|
693
|
-
[`is-${
|
|
694
|
-
[`is-${
|
|
695
|
-
[`is-${
|
|
696
|
-
[`is-${
|
|
697
|
-
[`is-${
|
|
698
|
-
[`is-${
|
|
699
|
+
[`is-${resolvedGap}`]: resolvedGap !== undefined && resolvedGap !== null,
|
|
700
|
+
[`is-${resolvedGapMobile}-mobile`]: resolvedGapMobile !== undefined && resolvedGapMobile !== null,
|
|
701
|
+
[`is-${resolvedGapTablet}-tablet`]: resolvedGapTablet !== undefined && resolvedGapTablet !== null,
|
|
702
|
+
[`is-${resolvedGapDesktop}-desktop`]: resolvedGapDesktop !== undefined && resolvedGapDesktop !== null,
|
|
703
|
+
[`is-${resolvedGapWidescreen}-widescreen`]: resolvedGapWidescreen !== undefined && resolvedGapWidescreen !== null,
|
|
704
|
+
[`is-${resolvedGapFullhd}-fullhd`]: resolvedGapFullhd !== undefined && resolvedGapFullhd !== null,
|
|
699
705
|
'is-centered': !!isCentered,
|
|
700
706
|
'is-gapless': !!isGapless,
|
|
701
707
|
'is-multiline': !!isMultiline,
|
|
@@ -1677,8 +1683,12 @@ const Loading = ({ active = false, isFullPage = false, size, color, canCancel =
|
|
|
1677
1683
|
[`is-${size}`]: size,
|
|
1678
1684
|
});
|
|
1679
1685
|
const combinedClasses = classNames(loadingClasses, bulmaHelperClasses, className);
|
|
1680
|
-
const combinedOverlayClasses = classNames('loading-overlay', overlayClassName);
|
|
1686
|
+
const combinedOverlayClasses = classNames(usePrefixedClassNames('loading-overlay'), overlayClassName);
|
|
1681
1687
|
const combinedIconClasses = classNames(iconClasses, iconClassName);
|
|
1688
|
+
const loadingContentClass = usePrefixedClassNames('loading-content');
|
|
1689
|
+
const loadingIconCustomClass = usePrefixedClassNames('loading-icon-custom');
|
|
1690
|
+
const loadingTextClass = usePrefixedClassNames('loading-text');
|
|
1691
|
+
const loadingCancelClass = usePrefixedClassNames('loading-cancel');
|
|
1682
1692
|
const handleOverlayClick = () => {
|
|
1683
1693
|
if (canCancel && onCancel) {
|
|
1684
1694
|
onCancel();
|
|
@@ -1707,7 +1717,7 @@ const Loading = ({ active = false, isFullPage = false, size, color, canCancel =
|
|
|
1707
1717
|
if (!active) {
|
|
1708
1718
|
return null;
|
|
1709
1719
|
}
|
|
1710
|
-
return (jsxRuntime.jsxs("div", { className: combinedClasses, role: "alert", "aria-busy": "true", "aria-label": "Loading", ...rest, children: [jsxRuntime.jsx("div", { className: combinedOverlayClasses, onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { className:
|
|
1720
|
+
return (jsxRuntime.jsxs("div", { className: combinedClasses, role: "alert", "aria-busy": "true", "aria-label": "Loading", ...rest, children: [jsxRuntime.jsx("div", { className: combinedOverlayClasses, onClick: handleOverlayClick, "aria-hidden": "true" }), jsxRuntime.jsxs("div", { className: loadingContentClass, children: [indicator ? (jsxRuntime.jsx("span", { className: loadingIconCustomClass, children: indicator })) : (jsxRuntime.jsx("span", { className: combinedIconClasses })), children && jsxRuntime.jsx("div", { className: loadingTextClass, children: children }), canCancel && (jsxRuntime.jsx("button", { type: "button", className: loadingCancelClass, onClick: onCancel, "aria-label": "Cancel loading", children: "Cancel" }))] })] }));
|
|
1711
1721
|
};
|
|
1712
1722
|
|
|
1713
1723
|
const Collapse = ({ open: controlledOpen, defaultOpen = false, onOpen, onClose, trigger, animation = 'fade', position = 'top', ariaId, bordered, children, className, triggerClassName, contentClassName, ...props }) => {
|
|
@@ -1770,10 +1780,10 @@ const Collapse = ({ open: controlledOpen, defaultOpen = false, onOpen, onClose,
|
|
|
1770
1780
|
'is-bordered': bordered,
|
|
1771
1781
|
});
|
|
1772
1782
|
const combinedClasses = classNames(collapseClasses, bulmaHelperClasses, className);
|
|
1773
|
-
const combinedTriggerClasses = classNames('collapse-trigger', triggerClassName);
|
|
1774
|
-
const combinedContentClasses = classNames('collapse-content',
|
|
1783
|
+
const combinedTriggerClasses = classNames(usePrefixedClassNames('collapse-trigger'), triggerClassName);
|
|
1784
|
+
const combinedContentClasses = classNames(usePrefixedClassNames('collapse-content', {
|
|
1775
1785
|
'is-active': isOpen,
|
|
1776
|
-
});
|
|
1786
|
+
}), contentClassName);
|
|
1777
1787
|
let contentWrapperStyle;
|
|
1778
1788
|
if (animation === 'slide') {
|
|
1779
1789
|
contentWrapperStyle = {
|
|
@@ -1955,10 +1965,14 @@ const Tooltip = ({ label, content, position = 'top', color, size, active: always
|
|
|
1955
1965
|
|
|
1956
1966
|
const Step = ({ isActive = false, isCompleted = false, label, icon, clickable = false, onClick, stepNumber, completedIcon, className, children, ...props }) => {
|
|
1957
1967
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
1958
|
-
const stepClasses = classNames('steps-segment', {
|
|
1968
|
+
const stepClasses = classNames(usePrefixedClassNames('steps-segment', {
|
|
1959
1969
|
'is-active': isActive,
|
|
1960
1970
|
'is-completed': isCompleted,
|
|
1961
|
-
}, bulmaHelperClasses, className);
|
|
1971
|
+
}), bulmaHelperClasses, className);
|
|
1972
|
+
const stepsLinkClass = usePrefixedClassNames('steps-link');
|
|
1973
|
+
const stepsMarkerClass = usePrefixedClassNames('steps-marker');
|
|
1974
|
+
const stepsContentClass = usePrefixedClassNames('steps-content');
|
|
1975
|
+
const stepsTitleClass = usePrefixedClassNames('steps-title');
|
|
1962
1976
|
const handleClick = () => {
|
|
1963
1977
|
if (clickable && onClick) {
|
|
1964
1978
|
onClick();
|
|
@@ -1975,7 +1989,7 @@ const Step = ({ isActive = false, isCompleted = false, label, icon, clickable =
|
|
|
1975
1989
|
(isCompleted && resolvedCompletedIcon
|
|
1976
1990
|
? resolvedCompletedIcon
|
|
1977
1991
|
: (stepNumber ?? null));
|
|
1978
|
-
return (jsxRuntime.jsx("li", { className: stepClasses, onClick: handleClick, onKeyDown: handleKeyDown, tabIndex: clickable ? 0 : undefined, role: clickable ? 'button' : undefined, "aria-current": isActive ? 'step' : undefined, ...rest, children: jsxRuntime.jsxs("div", { className:
|
|
1992
|
+
return (jsxRuntime.jsx("li", { className: stepClasses, onClick: handleClick, onKeyDown: handleKeyDown, tabIndex: clickable ? 0 : undefined, role: clickable ? 'button' : undefined, "aria-current": isActive ? 'step' : undefined, ...rest, children: jsxRuntime.jsxs("div", { className: stepsLinkClass, children: [jsxRuntime.jsx("span", { className: stepsMarkerClass, children: markerContent }), (label || children) && (jsxRuntime.jsx("div", { className: stepsContentClass, children: jsxRuntime.jsx("p", { className: stepsTitleClass, children: label || children }) }))] }) }));
|
|
1979
1993
|
};
|
|
1980
1994
|
const Steps = ({ value = 0, items, size, color, hasMarker = true, animated = true, rounded = true, vertical = false, labelPosition = 'bottom', mobileMode, showStepNumbers = true, hasNavigation = false, prevLabel, nextLabel, onPrev, onNext, onStepClick, className, children, ...props }) => {
|
|
1981
1995
|
const { bulmaHelperClasses, rest } = useBulmaClasses(props);
|
|
@@ -1990,9 +2004,14 @@ const Steps = ({ value = 0, items, size, color, hasMarker = true, animated = tru
|
|
|
1990
2004
|
[`is-${mobileMode}`]: mobileMode,
|
|
1991
2005
|
});
|
|
1992
2006
|
const combinedClasses = classNames(stepsClasses, bulmaHelperClasses, className);
|
|
1993
|
-
const listClasses =
|
|
2007
|
+
const listClasses = usePrefixedClassNames('steps-list', {
|
|
1994
2008
|
'is-vertical': vertical,
|
|
1995
2009
|
});
|
|
2010
|
+
const stepsNavigationClass = usePrefixedClassNames('steps-navigation');
|
|
2011
|
+
const prevButtonClass = usePrefixedClassNames('button');
|
|
2012
|
+
const nextButtonClass = usePrefixedClassNames('button', {
|
|
2013
|
+
'is-primary': true,
|
|
2014
|
+
});
|
|
1996
2015
|
const totalSteps = items ? items.length : React.Children.count(children);
|
|
1997
2016
|
const renderSteps = () => {
|
|
1998
2017
|
if (items && items.length > 0) {
|
|
@@ -2015,7 +2034,7 @@ const Steps = ({ value = 0, items, size, color, hasMarker = true, animated = tru
|
|
|
2015
2034
|
}
|
|
2016
2035
|
return null;
|
|
2017
2036
|
};
|
|
2018
|
-
return (jsxRuntime.jsxs("div", { className: combinedClasses, ...rest, children: [jsxRuntime.jsx("ul", { className: listClasses, children: renderSteps() }), hasNavigation && (jsxRuntime.jsxs("div", { className:
|
|
2037
|
+
return (jsxRuntime.jsxs("div", { className: combinedClasses, ...rest, children: [jsxRuntime.jsx("ul", { className: listClasses, children: renderSteps() }), hasNavigation && (jsxRuntime.jsxs("div", { className: stepsNavigationClass, children: [jsxRuntime.jsx("button", { className: prevButtonClass, disabled: value === 0, onClick: onPrev ?? (() => onStepClick?.(value - 1)), children: prevLabel ?? 'Previous' }), jsxRuntime.jsx("button", { className: nextButtonClass, disabled: value === totalSteps - 1, onClick: onNext ?? (() => onStepClick?.(value + 1)), children: nextLabel ?? 'Next' })] }))] }));
|
|
2019
2038
|
};
|
|
2020
2039
|
Steps.Step = Step;
|
|
2021
2040
|
|
|
@@ -2082,16 +2101,16 @@ const SidebarComponent = React.forwardRef(({ isOpen, onClose, position = 'left',
|
|
|
2082
2101
|
[`is-${position}`]: position,
|
|
2083
2102
|
'is-fullwidth': fullWidth,
|
|
2084
2103
|
});
|
|
2085
|
-
const backgroundClass = usePrefixedClassNames('sidebar-background'
|
|
2104
|
+
const backgroundClass = usePrefixedClassNames('sidebar-background', {
|
|
2105
|
+
'is-active': isOpen,
|
|
2106
|
+
});
|
|
2086
2107
|
const contentClass = usePrefixedClassNames('sidebar-content');
|
|
2087
2108
|
const combinedClasses = classNames(sidebarClasses, bulmaHelperClasses, className);
|
|
2088
2109
|
const sidebarStyle = {
|
|
2089
2110
|
...style,
|
|
2090
2111
|
'--bulma-sidebar-width': fullWidth ? '100%' : width,
|
|
2091
2112
|
};
|
|
2092
|
-
const sidebarContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [overlay && (jsxRuntime.jsx("div", { className:
|
|
2093
|
-
'is-active': isOpen,
|
|
2094
|
-
}), onClick: handleOverlayClick, "aria-hidden": "true" })), jsxRuntime.jsx("aside", { ref: combinedRef, className: combinedClasses, style: sidebarStyle, role: "dialog", "aria-modal": overlay ? 'true' : undefined, "aria-hidden": !isOpen, tabIndex: -1, ...rest, children: jsxRuntime.jsx("div", { className: contentClass, children: children }) })] }));
|
|
2113
|
+
const sidebarContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [overlay && (jsxRuntime.jsx("div", { className: backgroundClass, onClick: handleOverlayClick, "aria-hidden": "true" })), jsxRuntime.jsx("aside", { ref: combinedRef, className: combinedClasses, style: sidebarStyle, role: "dialog", "aria-modal": overlay ? 'true' : undefined, "aria-hidden": !isOpen, tabIndex: -1, ...rest, children: jsxRuntime.jsx("div", { className: contentClass, children: children }) })] }));
|
|
2095
2114
|
if (inline) {
|
|
2096
2115
|
return sidebarContent;
|
|
2097
2116
|
}
|
|
@@ -2196,6 +2215,12 @@ const Toast = React.forwardRef(({ message, type = 'default', actionType, positio
|
|
|
2196
2215
|
'is-rounded': rounded,
|
|
2197
2216
|
});
|
|
2198
2217
|
const combinedClasses = classNames(toastClasses, bulmaHelperClasses, className);
|
|
2218
|
+
const toastMessageClass = usePrefixedClassNames('toast-message');
|
|
2219
|
+
const toastActionsClass = usePrefixedClassNames('toast-actions');
|
|
2220
|
+
const toastCancelClass = usePrefixedClassNames('toast-cancel');
|
|
2221
|
+
const toastActionClass = usePrefixedClassNames('toast-action');
|
|
2222
|
+
const toastButtonClass = usePrefixedClassNames('button');
|
|
2223
|
+
const toastCloseClass = usePrefixedClassNames('delete', 'is-small');
|
|
2199
2224
|
if (!isVisible) {
|
|
2200
2225
|
return null;
|
|
2201
2226
|
}
|
|
@@ -2217,13 +2242,13 @@ const Toast = React.forwardRef(({ message, type = 'default', actionType, positio
|
|
|
2217
2242
|
ref.current = node;
|
|
2218
2243
|
}
|
|
2219
2244
|
};
|
|
2220
|
-
const toastElement = (jsxRuntime.jsxs("div", { ref: setRef, className: combinedClasses, role: "alert", "aria-live": type === 'danger' || type === 'warning' ? 'assertive' : 'polite', onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: dismissible ? handleClose : undefined, ...rest, children: [jsxRuntime.jsx("span", { className:
|
|
2245
|
+
const toastElement = (jsxRuntime.jsxs("div", { ref: setRef, className: combinedClasses, role: "alert", "aria-live": type === 'danger' || type === 'warning' ? 'assertive' : 'polite', onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, onClick: dismissible ? handleClose : undefined, ...rest, children: [jsxRuntime.jsx("span", { className: toastMessageClass, children: message }), (cancelText || actionText) && (jsxRuntime.jsxs("div", { className: toastActionsClass, children: [cancelText && (jsxRuntime.jsx("span", { className: toastCancelClass, children: jsxRuntime.jsx("button", { type: "button", className: toastButtonClass, onClick: e => {
|
|
2221
2246
|
e.stopPropagation();
|
|
2222
2247
|
handleClose();
|
|
2223
|
-
}, children: cancelText }) })), actionText && (jsxRuntime.jsx("span", { className:
|
|
2248
|
+
}, children: cancelText }) })), actionText && (jsxRuntime.jsx("span", { className: toastActionClass, children: jsxRuntime.jsx("button", { type: "button", className: toastButtonClass, onClick: e => {
|
|
2224
2249
|
e.stopPropagation();
|
|
2225
2250
|
handleAction();
|
|
2226
|
-
}, children: actionText }) }))] })), closable && (jsxRuntime.jsx("button", { type: "button", className:
|
|
2251
|
+
}, children: actionText }) }))] })), closable && (jsxRuntime.jsx("button", { type: "button", className: toastCloseClass, onClick: e => {
|
|
2227
2252
|
e.stopPropagation();
|
|
2228
2253
|
handleClose();
|
|
2229
2254
|
}, "aria-label": "Close" }))] }));
|
|
@@ -2504,9 +2529,7 @@ const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWi
|
|
|
2504
2529
|
};
|
|
2505
2530
|
|
|
2506
2531
|
const CarouselItem = React.forwardRef(({ active, className, children, ...props }, ref) => {
|
|
2507
|
-
const itemClasses = classNames('carousel-item',
|
|
2508
|
-
'is-active': active,
|
|
2509
|
-
});
|
|
2532
|
+
const itemClasses = classNames(usePrefixedClassNames('carousel-item', { 'is-active': active }), className);
|
|
2510
2533
|
return (jsxRuntime.jsx("div", { ref: ref, className: itemClasses, ...props, children: children }));
|
|
2511
2534
|
});
|
|
2512
2535
|
CarouselItem.displayName = 'CarouselItem';
|
|
@@ -2692,6 +2715,15 @@ const Carousel = React.forwardRef(({ value: controlledValue, autoplay = false, i
|
|
|
2692
2715
|
[`is-indicator-${indicatorStyle}`]: indicatorStyle !== 'dots',
|
|
2693
2716
|
[`is-arrow-${arrowColor}`]: !!arrowColor,
|
|
2694
2717
|
});
|
|
2718
|
+
const classPrefix = useClassPrefix();
|
|
2719
|
+
const carouselContainerClass = usePrefixedClassNames('carousel-container');
|
|
2720
|
+
const carouselSlidesClass = usePrefixedClassNames('carousel-slides');
|
|
2721
|
+
const carouselArrowPrevClass = usePrefixedClassNames('carousel-arrow', 'is-prev', { 'is-transparent': !arrowBackground });
|
|
2722
|
+
const carouselArrowNextClass = usePrefixedClassNames('carousel-arrow', 'is-next', { 'is-transparent': !arrowBackground });
|
|
2723
|
+
const carouselIndicatorClass = usePrefixedClassNames('carousel-indicator', {
|
|
2724
|
+
'is-inside': indicatorInside,
|
|
2725
|
+
'is-top': indicatorPosition === 'top',
|
|
2726
|
+
});
|
|
2695
2727
|
const combinedClasses = classNames(carouselClasses, bulmaHelperClasses, className);
|
|
2696
2728
|
const renderSlides = () => {
|
|
2697
2729
|
const slides = items.map((item, index) => {
|
|
@@ -2722,22 +2754,15 @@ const Carousel = React.forwardRef(({ value: controlledValue, autoplay = false, i
|
|
|
2722
2754
|
}
|
|
2723
2755
|
return slides;
|
|
2724
2756
|
};
|
|
2725
|
-
return (jsxRuntime.jsxs("div", { ref: combinedRef, className: combinedClasses, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, role: "region", "aria-roledescription": "carousel", "aria-label": ariaLabel, ...rest, children: [jsxRuntime.jsxs("div", { ref: containerRef, className:
|
|
2757
|
+
return (jsxRuntime.jsxs("div", { ref: combinedRef, className: combinedClasses, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, role: "region", "aria-roledescription": "carousel", "aria-label": ariaLabel, ...rest, children: [jsxRuntime.jsxs("div", { ref: containerRef, className: carouselContainerClass, onMouseDown: hasDrag ? handleMouseDown : undefined, onMouseMove: hasDrag && isDragging ? handleMouseMove : undefined, onMouseUp: hasDrag ? handleMouseUp : undefined, onMouseLeave: hasDrag ? handleMouseUp : undefined, onTouchStart: hasDrag ? handleTouchStart : undefined, onTouchMove: hasDrag ? handleTouchMove : undefined, onTouchEnd: hasDrag ? handleTouchEnd : undefined, style: {
|
|
2726
2758
|
transform: isDragging ? `translateX(${dragOffset}px)` : undefined,
|
|
2727
2759
|
cursor: hasDrag ? (isDragging ? 'grabbing' : 'grab') : undefined,
|
|
2728
|
-
}, children: [jsxRuntime.jsx("div", { className:
|
|
2760
|
+
}, children: [jsxRuntime.jsx("div", { className: carouselSlidesClass, style: {
|
|
2729
2761
|
transform: `translateX(-${(repeat && itemCount > 1 ? displayIndex + 1 : displayIndex) * 100}%)`,
|
|
2730
2762
|
transition: isDragging || skipTransition
|
|
2731
2763
|
? 'none'
|
|
2732
2764
|
: 'transform 0.3s ease-in-out',
|
|
2733
|
-
}, onTransitionEnd: handleTransitionEnd, children: renderSlides() }), arrow && itemCount > 1 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button, { className:
|
|
2734
|
-
'is-transparent': !arrowBackground,
|
|
2735
|
-
}), onClick: goToPrev, isDisabled: !canGoPrev, "aria-label": "Previous slide", children: iconPrev ? (jsxRuntime.jsx(Icon, { name: iconPrev, library: iconLibrary, variant: iconVariant, size: iconSize, features: iconFeatures })) : (jsxRuntime.jsx(DefaultPrevIcon, {})) }), jsxRuntime.jsx(Button, { className: classNames('carousel-arrow is-next', {
|
|
2736
|
-
'is-transparent': !arrowBackground,
|
|
2737
|
-
}), onClick: goToNext, isDisabled: !canGoNext, "aria-label": "Next slide", children: iconNext ? (jsxRuntime.jsx(Icon, { name: iconNext, library: iconLibrary, variant: iconVariant, size: iconSize, features: iconFeatures })) : (jsxRuntime.jsx(DefaultNextIcon, {})) })] }))] }), indicator && itemCount > 1 && (jsxRuntime.jsx("div", { className: classNames('carousel-indicator', {
|
|
2738
|
-
'is-inside': indicatorInside,
|
|
2739
|
-
'is-top': indicatorPosition === 'top',
|
|
2740
|
-
}), role: "tablist", children: items.map((_, index) => (jsxRuntime.jsx(Button, { className: classNames('indicator-item', {
|
|
2765
|
+
}, onTransitionEnd: handleTransitionEnd, children: renderSlides() }), arrow && itemCount > 1 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button, { className: carouselArrowPrevClass, onClick: goToPrev, isDisabled: !canGoPrev, "aria-label": "Previous slide", children: iconPrev ? (jsxRuntime.jsx(Icon, { name: iconPrev, library: iconLibrary, variant: iconVariant, size: iconSize, features: iconFeatures })) : (jsxRuntime.jsx(DefaultPrevIcon, {})) }), jsxRuntime.jsx(Button, { className: carouselArrowNextClass, onClick: goToNext, isDisabled: !canGoNext, "aria-label": "Next slide", children: iconNext ? (jsxRuntime.jsx(Icon, { name: iconNext, library: iconLibrary, variant: iconVariant, size: iconSize, features: iconFeatures })) : (jsxRuntime.jsx(DefaultNextIcon, {})) })] }))] }), indicator && itemCount > 1 && (jsxRuntime.jsx("div", { className: carouselIndicatorClass, role: "tablist", children: items.map((_, index) => (jsxRuntime.jsx(Button, { className: prefixedClassNames(classPrefix, 'indicator-item', {
|
|
2741
2766
|
'is-active': index === activeIndex,
|
|
2742
2767
|
}), onClick: () => goToSlide(index), role: "tab", "aria-selected": index === activeIndex, "aria-label": `Go to slide ${index + 1}` }, index))) }))] }));
|
|
2743
2768
|
});
|
|
@@ -3461,7 +3486,9 @@ const Checkbox = React.forwardRef(({ color, size, className, children, textColor
|
|
|
3461
3486
|
[`is-${size}`]: size && checkboxSizes.includes(size),
|
|
3462
3487
|
});
|
|
3463
3488
|
const checkboxClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
3464
|
-
|
|
3489
|
+
const checkClass = usePrefixedClassNames('check');
|
|
3490
|
+
const controlLabelClass = usePrefixedClassNames('control-label');
|
|
3491
|
+
return (jsxRuntime.jsxs("label", { className: checkboxClass, children: [jsxRuntime.jsx("input", { ref: ref, type: "checkbox", disabled: disabled, name: effectiveName, value: value, checked: effectiveChecked, defaultChecked: effectiveDefaultChecked, onChange: handleChange, ...rest }), jsxRuntime.jsx("span", { className: checkClass }), children && jsxRuntime.jsx("span", { className: controlLabelClass, children: children })] }));
|
|
3465
3492
|
});
|
|
3466
3493
|
Checkbox.displayName = 'Checkbox';
|
|
3467
3494
|
|
|
@@ -3690,7 +3717,9 @@ const Radio = React.forwardRef(({ color, size, className, children, textColor, d
|
|
|
3690
3717
|
[`is-${size}`]: size && radioSizes.includes(size),
|
|
3691
3718
|
});
|
|
3692
3719
|
const radioClass = classNames(mainClass, bulmaHelperClasses, className);
|
|
3693
|
-
|
|
3720
|
+
const checkClass = usePrefixedClassNames('check');
|
|
3721
|
+
const controlLabelClass = usePrefixedClassNames('control-label');
|
|
3722
|
+
return (jsxRuntime.jsxs("label", { className: radioClass, children: [jsxRuntime.jsx("input", { ref: ref, type: "radio", disabled: disabled, name: effectiveName, value: value, checked: effectiveChecked, defaultChecked: effectiveDefaultChecked, onChange: handleChange, ...rest }), jsxRuntime.jsx("span", { className: checkClass }), children && jsxRuntime.jsx("span", { className: controlLabelClass, children: children })] }));
|
|
3694
3723
|
});
|
|
3695
3724
|
Radio.displayName = 'Radio';
|
|
3696
3725
|
|
|
@@ -3754,7 +3783,9 @@ const Switch = React.forwardRef(({ color, size, isRounded, isThin, isOutlined, i
|
|
|
3754
3783
|
[`is-${passiveType}-passive`]: passiveType && switchColors.includes(passiveType),
|
|
3755
3784
|
});
|
|
3756
3785
|
const labelClasses = classNames(switchClasses, bulmaHelperClasses, className);
|
|
3757
|
-
|
|
3786
|
+
const checkClass = usePrefixedClassNames('check');
|
|
3787
|
+
const controlLabelClass = usePrefixedClassNames('control-label');
|
|
3788
|
+
return (jsxRuntime.jsxs("label", { className: labelClasses, children: [jsxRuntime.jsx("input", { ref: ref, type: "checkbox", disabled: disabled, ...rest }), jsxRuntime.jsx("span", { className: checkClass }), children && jsxRuntime.jsx("span", { className: controlLabelClass, children: children })] }));
|
|
3758
3789
|
});
|
|
3759
3790
|
Switch.displayName = 'Switch';
|
|
3760
3791
|
|
|
@@ -3922,6 +3953,7 @@ const Slider = React.forwardRef((props, ref) => {
|
|
|
3922
3953
|
}
|
|
3923
3954
|
return isCircle ? px * 1.2 : px;
|
|
3924
3955
|
};
|
|
3956
|
+
const classPrefix = useClassPrefix();
|
|
3925
3957
|
const sliderClasses = usePrefixedClassNames('slider', {
|
|
3926
3958
|
[`is-${size}`]: size,
|
|
3927
3959
|
[`is-${color}`]: color,
|
|
@@ -4026,24 +4058,24 @@ const Slider = React.forwardRef((props, ref) => {
|
|
|
4026
4058
|
const renderTicks = () => {
|
|
4027
4059
|
if (tickPositions.length === 0)
|
|
4028
4060
|
return null;
|
|
4029
|
-
return (jsxRuntime.jsx("div", { className:
|
|
4061
|
+
return (jsxRuntime.jsx("div", { className: prefixedClassNames(classPrefix, 'slider-ticks'), children: tickPositions.map((tick, i) => {
|
|
4030
4062
|
const pct = ((tick.value - min) / (max - min)) * 100;
|
|
4031
4063
|
const posStyle = isVertical
|
|
4032
4064
|
? { bottom: `${pct}%` }
|
|
4033
4065
|
: { left: `${pct}%` };
|
|
4034
4066
|
const isEndpoint = tick.value === min || tick.value === max;
|
|
4035
|
-
return (jsxRuntime.jsx("span", { className:
|
|
4067
|
+
return (jsxRuntime.jsx("span", { className: prefixedClassNames(classPrefix, 'slider-tick', {
|
|
4036
4068
|
'is-endpoint': isEndpoint,
|
|
4037
|
-
}), style: posStyle, children: tick.label !== undefined && (jsxRuntime.jsx("span", { className:
|
|
4069
|
+
}), style: posStyle, children: tick.label !== undefined && (jsxRuntime.jsx("span", { className: prefixedClassNames(classPrefix, 'slider-tick-label'), children: tick.label })) }, i));
|
|
4038
4070
|
}) }));
|
|
4039
4071
|
};
|
|
4040
4072
|
const helpClass = usePrefixedClassNames('help', {
|
|
4041
4073
|
[`is-${messageColor}`]: !!messageColor,
|
|
4042
4074
|
});
|
|
4043
4075
|
const messageEl = message ? jsxRuntime.jsx("p", { className: helpClass, children: message }) : null;
|
|
4044
|
-
const sliderElement = !range ? (jsxRuntime.jsxs("div", { ref: wrapperRef, className: combinedClasses, style: wrapperStyle, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "range", min: min, max: max, step: step, value: currentSingle, disabled: disabled, onChange: handleSingleChange, onKeyDown: handleKeyDown, onMouseEnter: () => setShowTooltip(true), onMouseLeave: () => setShowTooltip(false), onFocus: () => setShowTooltip(true), onBlur: () => setShowTooltip(false), className:
|
|
4076
|
+
const sliderElement = !range ? (jsxRuntime.jsxs("div", { ref: wrapperRef, className: combinedClasses, style: wrapperStyle, children: [jsxRuntime.jsx("input", { ref: combinedRef, type: "range", min: min, max: max, step: step, value: currentSingle, disabled: disabled, onChange: handleSingleChange, onKeyDown: handleKeyDown, onMouseEnter: () => setShowTooltip(true), onMouseLeave: () => setShowTooltip(false), onFocus: () => setShowTooltip(true), onBlur: () => setShowTooltip(false), className: prefixedClassNames(classPrefix, 'slider-input'), style: {
|
|
4045
4077
|
'--slider-progress': `${progressSingle}%`,
|
|
4046
|
-
}, "aria-valuenow": currentSingle, "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel, ...getAriaProps(currentSingle), ...rest }), tooltipMode !== 'hidden' && (jsxRuntime.jsx("output", { ref: outputRef, className:
|
|
4078
|
+
}, "aria-valuenow": currentSingle, "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel, ...getAriaProps(currentSingle), ...rest }), tooltipMode !== 'hidden' && (jsxRuntime.jsx("output", { ref: outputRef, className: prefixedClassNames(classPrefix, 'slider-output', {
|
|
4047
4079
|
'is-visible': showTipLow,
|
|
4048
4080
|
'is-flipped': flipped,
|
|
4049
4081
|
'is-flipped-left': isVertical && verticalFlippedLeft,
|
|
@@ -4063,7 +4095,7 @@ const Slider = React.forwardRef((props, ref) => {
|
|
|
4063
4095
|
left: getThumbLeft(progressSingle),
|
|
4064
4096
|
transform: `translateX(calc(-50% + ${nudgeX}px))`,
|
|
4065
4097
|
'--slider-output-arrow-offset': `calc(50% - ${nudgeX}px)`,
|
|
4066
|
-
}, children: formatValue(currentSingle) })), renderTicks()] })) : (jsxRuntime.jsxs("div", { ref: wrapperRef, className: combinedClasses, style: wrapperStyle, children: [jsxRuntime.jsx("div", { className:
|
|
4098
|
+
}, children: formatValue(currentSingle) })), renderTicks()] })) : (jsxRuntime.jsxs("div", { ref: wrapperRef, className: combinedClasses, style: wrapperStyle, children: [jsxRuntime.jsx("div", { className: prefixedClassNames(classPrefix, 'slider-track'), style: isVertical
|
|
4067
4099
|
? {
|
|
4068
4100
|
'--slider-progress-low': `${progressLow}%`,
|
|
4069
4101
|
'--slider-progress-high': `${progressHigh}%`,
|
|
@@ -4071,7 +4103,7 @@ const Slider = React.forwardRef((props, ref) => {
|
|
|
4071
4103
|
: {
|
|
4072
4104
|
'--slider-progress-low': `${progressLow}%`,
|
|
4073
4105
|
'--slider-progress-high': `${progressHigh}%`,
|
|
4074
|
-
} }), jsxRuntime.jsx("input", { ref: combinedRef, type: "range", min: min, max: max, step: step, value: currentRange[0], disabled: disabled, onChange: handleRangeLowChange, onKeyDown: handleKeyDown, onMouseEnter: () => setShowTooltip(true), onMouseLeave: () => setShowTooltip(false), onFocus: () => setShowTooltip(true), onBlur: () => setShowTooltip(false), className:
|
|
4106
|
+
} }), jsxRuntime.jsx("input", { ref: combinedRef, type: "range", min: min, max: max, step: step, value: currentRange[0], disabled: disabled, onChange: handleRangeLowChange, onKeyDown: handleKeyDown, onMouseEnter: () => setShowTooltip(true), onMouseLeave: () => setShowTooltip(false), onFocus: () => setShowTooltip(true), onBlur: () => setShowTooltip(false), className: prefixedClassNames(classPrefix, 'slider-input', 'slider-input-low'), "aria-valuenow": currentRange[0], "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel?.[0] ?? 'Minimum value', ...getAriaProps(currentRange[0]), ...rest, ...(nameLow !== undefined ? { name: nameLow } : {}) }), jsxRuntime.jsx("input", { ref: inputHighRef, type: "range", min: min, max: max, step: step, value: currentRange[1], disabled: disabled, onChange: handleRangeHighChange, onMouseEnter: () => setShowTooltipHigh(true), onMouseLeave: () => setShowTooltipHigh(false), onFocus: () => setShowTooltipHigh(true), onBlur: () => setShowTooltipHigh(false), className: prefixedClassNames(classPrefix, 'slider-input', 'slider-input-high'), "aria-valuenow": currentRange[1], "aria-valuemin": min, "aria-valuemax": max, "aria-orientation": isVertical ? 'vertical' : undefined, "aria-label": ariaLabel?.[1] ?? 'Maximum value', ...getAriaProps(currentRange[1]), name: nameHigh }), tooltipMode !== 'hidden' && (jsxRuntime.jsx("output", { ref: outputRef, className: prefixedClassNames(classPrefix, 'slider-output', 'slider-output-low', {
|
|
4075
4107
|
'is-visible': showTipLow,
|
|
4076
4108
|
'is-flipped': flipped,
|
|
4077
4109
|
'is-flipped-left': isVertical && verticalFlippedLeft,
|
|
@@ -4091,7 +4123,7 @@ const Slider = React.forwardRef((props, ref) => {
|
|
|
4091
4123
|
left: getThumbLeft(progressLow),
|
|
4092
4124
|
transform: `translateX(calc(-50% + ${nudgeX}px))`,
|
|
4093
4125
|
'--slider-output-arrow-offset': `calc(50% - ${nudgeX}px)`,
|
|
4094
|
-
}, children: formatValue(currentRange[0]) })), tooltipMode !== 'hidden' && (jsxRuntime.jsx("output", { ref: outputHighRef, className:
|
|
4126
|
+
}, children: formatValue(currentRange[0]) })), tooltipMode !== 'hidden' && (jsxRuntime.jsx("output", { ref: outputHighRef, className: prefixedClassNames(classPrefix, 'slider-output', 'slider-output-high', {
|
|
4095
4127
|
'is-visible': showTipHigh,
|
|
4096
4128
|
'is-flipped': flippedHigh,
|
|
4097
4129
|
'is-flipped-left': isVertical && verticalFlippedLeft,
|
|
@@ -4377,6 +4409,7 @@ const Rate = React.forwardRef(({ label, labelSize, labelProps, horizontal, messa
|
|
|
4377
4409
|
}
|
|
4378
4410
|
return currentValue;
|
|
4379
4411
|
};
|
|
4412
|
+
const classPrefix = useClassPrefix();
|
|
4380
4413
|
const rateClasses = usePrefixedClassNames('rate', {
|
|
4381
4414
|
[`is-${size}`]: size,
|
|
4382
4415
|
'is-disabled': disabled,
|
|
@@ -4413,9 +4446,9 @@ const Rate = React.forwardRef(({ label, labelSize, labelProps, horizontal, messa
|
|
|
4413
4446
|
return customIcon(iconProps);
|
|
4414
4447
|
}
|
|
4415
4448
|
if (iconName) {
|
|
4416
|
-
return (jsxRuntime.jsxs("span", { className:
|
|
4449
|
+
return (jsxRuntime.jsxs("span", { className: prefixedClassNames(classPrefix, 'rate-icon-partial'), style: {
|
|
4417
4450
|
'--rate-fill-percent': `${fillPercent}%`,
|
|
4418
|
-
}, children: [jsxRuntime.jsx("span", { className:
|
|
4451
|
+
}, children: [jsxRuntime.jsx("span", { className: prefixedClassNames(classPrefix, 'rate-icon-bg'), children: jsxRuntime.jsx(Icon, { name: iconName, library: resolvedLibrary, variant: iconVariant, features: iconFeatures }) }), jsxRuntime.jsx("span", { className: prefixedClassNames(classPrefix, 'rate-icon-fg'), children: jsxRuntime.jsx(Icon, { name: iconName, library: resolvedLibrary, variant: iconVariant, features: iconFeatures }) })] }));
|
|
4419
4452
|
}
|
|
4420
4453
|
const clipId = `rate-clip-${iconIndex}`;
|
|
4421
4454
|
return (jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", "aria-hidden": "true", children: [jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: clipId, children: jsxRuntime.jsx("rect", { x: "0", y: "0", width: `${(fillPercent / 100) * 24}`, height: "24" }) }) }), jsxRuntime.jsx("path", { fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" }), jsxRuntime.jsx("path", { clipPath: `url(#${clipId})`, fill: "currentColor", d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" })] }));
|
|
@@ -4431,7 +4464,7 @@ const Rate = React.forwardRef(({ label, labelSize, labelProps, horizontal, messa
|
|
|
4431
4464
|
const icon = isPartial
|
|
4432
4465
|
? renderPartialIcon(iconIndex, fillPercent)
|
|
4433
4466
|
: renderIcon(iconIndex, isActive, fillPercent);
|
|
4434
|
-
icons.push(jsxRuntime.jsx("span", { className:
|
|
4467
|
+
icons.push(jsxRuntime.jsx("span", { className: prefixedClassNames(classPrefix, 'rate-item', {
|
|
4435
4468
|
'is-active': isActive,
|
|
4436
4469
|
'is-hovered': isHovered,
|
|
4437
4470
|
}), onClick: e => handleClick(iconIndex, e), onMouseEnter: () => handleMouseEnter(iconIndex), onMouseMove: e => handleMouseMove(iconIndex, e), onMouseLeave: handleMouseLeave, role: "radio", "aria-checked": currentValue === iconIndex + 1 ||
|
|
@@ -4449,7 +4482,11 @@ const Rate = React.forwardRef(({ label, labelSize, labelProps, horizontal, messa
|
|
|
4449
4482
|
[`is-${messageColor}`]: !!messageColor,
|
|
4450
4483
|
});
|
|
4451
4484
|
const messageEl = message ? jsxRuntime.jsx("p", { className: helpClass, children: message }) : null;
|
|
4452
|
-
const
|
|
4485
|
+
const rateItemsClass = usePrefixedClassNames('rate-items');
|
|
4486
|
+
const rateScoreClass = usePrefixedClassNames('rate-score');
|
|
4487
|
+
const rateTextClass = usePrefixedClassNames('rate-text');
|
|
4488
|
+
const rateCustomTextClass = usePrefixedClassNames('rate-custom-text');
|
|
4489
|
+
const rateElement = (jsxRuntime.jsxs("div", { ref: ref, className: combinedClasses, role: "radiogroup", "aria-label": "Rating", "aria-valuenow": currentValue, "aria-valuemin": 0, "aria-valuemax": max, "aria-valuetext": ariaValueText, tabIndex: disabled ? -1 : 0, onKeyDown: handleKeyDown, ...rest, children: [jsxRuntime.jsx("div", { className: rateItemsClass, children: renderIcons() }), showScore && (jsxRuntime.jsx("span", { className: rateScoreClass, children: getScoreDisplay() })), text && jsxRuntime.jsx("span", { className: rateTextClass, children: text }), customText && (jsxRuntime.jsx("span", { className: rateCustomTextClass, children: customText })), name && (jsxRuntime.jsx("input", { type: "hidden", name: name, value: currentValue, form: form }))] }));
|
|
4453
4490
|
let content = rateElement;
|
|
4454
4491
|
if (!insideControl) {
|
|
4455
4492
|
content = jsxRuntime.jsx(Control, { children: content });
|
|
@@ -4910,7 +4947,7 @@ const Taginput = React.forwardRef(({ label, labelSize, labelProps, horizontal, m
|
|
|
4910
4947
|
const messageEl = message ? jsxRuntime.jsx("p", { className: helpClass, children: message }) : null;
|
|
4911
4948
|
const taginputElement = (jsxRuntime.jsxs("div", { ref: containerRef, className: combinedClasses, onClick: handleContainerClick, ...rest, children: [jsxRuntime.jsxs("div", { className: containerClasses, children: [icon && (jsxRuntime.jsx(Icon, { name: icon, library: resolvedLibrary, variant: iconVariant, features: iconFeatures, containerClassName: pcn('icon', 'is-left') })), jsxRuntime.jsxs("div", { className: tagsClasses, children: [tags.map((tag, index) => {
|
|
4912
4949
|
const displayVal = getDisplayValue(tag);
|
|
4913
|
-
return (jsxRuntime.jsxs("span", { className: tagClasses, children: [tagTemplate ? (tagTemplate(tag)) : ellipsis ? (jsxRuntime.jsx("span", { title: displayVal, children: displayVal })) : (displayVal), closable && !disabled && !readonly && (jsxRuntime.jsx("button", { type: "button", className:
|
|
4950
|
+
return (jsxRuntime.jsxs("span", { className: tagClasses, children: [tagTemplate ? (tagTemplate(tag)) : ellipsis ? (jsxRuntime.jsx("span", { title: displayVal, children: displayVal })) : (displayVal), closable && !disabled && !readonly && (jsxRuntime.jsx("button", { type: "button", className: pcn('delete', 'is-small'), onClick: e => {
|
|
4914
4951
|
e.stopPropagation();
|
|
4915
4952
|
removeTag(index);
|
|
4916
4953
|
}, "aria-label": ariaCloseLabel || `Remove ${displayVal}` }))] }, index));
|