@heathmont/moon-core-tw
Advanced tools
Comparing version 9.1.5 to 9.1.7
/// <reference types="react" /> | ||
import type AccordionProps from './private/types/AccordionProps'; | ||
declare const Accordion: ({ title, openByDefault, children, disableOpen, headerContent, withButton, isContentInside, size, }: AccordionProps) => JSX.Element; | ||
declare const Accordion: ({ title, openByDefault, children, disableOpen, headerContent, withButton, isContentInside, isRtl, size, }: AccordionProps) => JSX.Element; | ||
export default Accordion; | ||
//# sourceMappingURL=Accordion.d.ts.map |
@@ -32,3 +32,3 @@ "use strict"; | ||
const setPadding_1 = __importDefault(require("./private/utils/setPadding")); | ||
const Accordion = ({ title, openByDefault, children, disableOpen, headerContent, withButton = true, isContentInside = true, size = 'md', }) => { | ||
const Accordion = ({ title, openByDefault, children, disableOpen, headerContent, withButton = true, isContentInside = true, isRtl, size = 'md', }) => { | ||
const [isOpen, setIsOpen] = react_1.useState(openByDefault); | ||
@@ -42,8 +42,8 @@ function handleState() { | ||
react_1.default.createElement("div", { className: classnames_1.default('bg-gohan w-full flex items-center relative gap-1', disableOpen ? 'cursor-not-allowed' : 'cursor-pointer', isContentInside ? 'bg-gohan' : 'transparent rounded-moon-s-sm', isContentInside ? '' : setPadding_1.default(true, size)), onClick: handleState }, | ||
title && (react_1.default.createElement("h3", { className: classnames_1.default('flex-1 font-medium', setFont_1.default(size)) }, title)), | ||
title && (react_1.default.createElement("h3", { className: classnames_1.default('flex-1 font-medium text-bulma', setFont_1.default(size)) }, title)), | ||
headerContent && react_1.default.createElement(react_1.default.Fragment, null, headerContent), | ||
withButton && (react_1.default.createElement("button", { type: "button", disabled: disableOpen, className: classnames_1.default('align-middle text-[0.5rem] leading-none no-underline text-trunks border-transparent bg-gohan', disableOpen ? 'cursor-not-allowed' : 'cursor-pointer') }, | ||
react_1.default.createElement(moon_icons_tw_1.ControlsChevronRight, { className: classnames_1.default('text-trunks text-moon-24 transition-transform transition-200', setOpenIcon_1.default(isOpen)) })))), | ||
react_1.default.createElement("div", { className: classnames_1.default('overflow-hidden w-full', isOpen ? 'h-full' : 'h-0', isOpen && setMargin_1.default(size)) }, children))); | ||
react_1.default.createElement(moon_icons_tw_1.ControlsChevronRight, { className: classnames_1.default('text-trunks text-moon-24 transition-transform transition-200', setOpenIcon_1.default({ isOpen, isRtl })) })))), | ||
react_1.default.createElement("div", { className: classnames_1.default('overflow-hidden w-full text-bulma', isOpen ? 'h-full' : 'h-0', isOpen && setMargin_1.default(size)) }, children))); | ||
}; | ||
exports.default = Accordion; |
@@ -12,4 +12,5 @@ /// <reference types="react" /> | ||
isContentInside?: boolean; | ||
isRtl?: boolean; | ||
}; | ||
export default AccordionProps; | ||
//# sourceMappingURL=AccordionProps.d.ts.map |
@@ -1,3 +0,7 @@ | ||
declare const setOpenIcon: (isOpen?: boolean | undefined) => false | "rotate-90" | undefined; | ||
declare type Props = { | ||
isOpen?: boolean; | ||
isRtl?: boolean; | ||
}; | ||
declare const setOpenIcon: ({ isOpen, isRtl }: Props) => false | "rotate-90" | "rotate-180" | undefined; | ||
export default setOpenIcon; | ||
//# sourceMappingURL=setOpenIcon.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const setOpenIcon = (isOpen) => isOpen && 'rotate-90'; | ||
const setOpenIcon = ({ isOpen, isRtl }) => { | ||
if (isRtl) { | ||
return isOpen ? 'rotate-90' : 'rotate-180'; | ||
} | ||
return isOpen && 'rotate-90'; | ||
}; | ||
exports.default = setOpenIcon; |
@@ -12,7 +12,7 @@ "use strict"; | ||
const Wrapper_1 = __importDefault(require("./styles/Wrapper")); | ||
const Avatar = ({ name, imageUrl = '', color = 'text-bulma', backgroundColor = 'bg-gohan', size = 'md', statusOrigin = { vertical: 'bottom', horizontal: 'right' }, isStatusActive, }) => { | ||
const Avatar = ({ name, imageUrl = '', color = 'text-bulma', backgroundColor = 'bg-gohan', size = 'md', statusOrigin = { vertical: 'bottom', horizontal: 'right' }, isStatusActive, isRounded, }) => { | ||
return (react_1.default.createElement("div", { className: "relative" }, | ||
imageUrl ? (react_1.default.createElement(Wrapper_1.default, { size: size, imageUrl: imageUrl, color: color, backgroundColor: backgroundColor })) : (react_1.default.createElement(Wrapper_1.default, { size: size, imageUrl: imageUrl, color: color, backgroundColor: backgroundColor }, name || (react_1.default.createElement(moon_icons_tw_1.GenericUser, { className: classnames_1.default(setIconSize_1.default(size), color && color) })))), | ||
imageUrl ? (react_1.default.createElement(Wrapper_1.default, { size: size, imageUrl: imageUrl, color: color, backgroundColor: backgroundColor, isRounded: isRounded })) : (react_1.default.createElement(Wrapper_1.default, { size: size, imageUrl: imageUrl, color: color, backgroundColor: backgroundColor, isRounded: isRounded }, name || (react_1.default.createElement(moon_icons_tw_1.GenericUser, { className: classnames_1.default(setIconSize_1.default(size), color && color) })))), | ||
statusOrigin && isStatusActive && (react_1.default.createElement(Status_1.default, { size: size, statusOrigin: statusOrigin })))); | ||
}; | ||
exports.default = Avatar; |
@@ -12,4 +12,5 @@ /// <reference types="react" /> | ||
isStatusActive?: boolean; | ||
isRounded?: boolean; | ||
}; | ||
export default AvatarProps; | ||
//# sourceMappingURL=AvatarProps.d.ts.map |
@@ -1,3 +0,3 @@ | ||
declare const setWrapperSize: (size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined) => "h-6 w-6 text-moon-10-caption rounded-moon-i-xs" | "h-8 w-8 text-moon-12 rounded-moon-i-sm" | "h-10 w-10 text-moon-14 rounded-moon-i-sm" | "h-12 w-12 text-moon-16 rounded-moon-i-sm" | "h-14 w-14 text-moon-16 rounded-moon-i-sm" | "h-16 w-16 text-moon-20 rounded-moon-i-md"; | ||
declare const setWrapperSize: (size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined) => "h-6 w-6 text-moon-10-caption" | "h-8 w-8 text-moon-12" | "h-10 w-10 text-moon-14" | "h-12 w-12 text-moon-16" | "h-14 w-14 text-moon-16" | "h-16 w-16 text-moon-20"; | ||
export default setWrapperSize; | ||
//# sourceMappingURL=setWrapperSize.d.ts.map |
@@ -5,18 +5,18 @@ "use strict"; | ||
if (size === 'xs') { | ||
return 'h-6 w-6 text-moon-10-caption rounded-moon-i-xs'; | ||
return 'h-6 w-6 text-moon-10-caption'; | ||
} | ||
if (size === 'sm') { | ||
return 'h-8 w-8 text-moon-12 rounded-moon-i-sm'; | ||
return 'h-8 w-8 text-moon-12'; | ||
} | ||
if (size === 'md') { | ||
return 'h-10 w-10 text-moon-14 rounded-moon-i-sm'; | ||
return 'h-10 w-10 text-moon-14'; | ||
} | ||
if (size === 'lg') { | ||
return 'h-12 w-12 text-moon-16 rounded-moon-i-sm'; | ||
return 'h-12 w-12 text-moon-16'; | ||
} | ||
if (size === 'xl') { | ||
return 'h-14 w-14 text-moon-16 rounded-moon-i-sm'; | ||
return 'h-14 w-14 text-moon-16'; | ||
} | ||
return 'h-16 w-16 text-moon-20 rounded-moon-i-md'; | ||
return 'h-16 w-16 text-moon-20'; | ||
}; | ||
exports.default = setWrapperSize; |
@@ -8,6 +8,7 @@ "use strict"; | ||
const classnames_1 = __importDefault(require("../../private/utils/classnames")); | ||
const setBorderRadius_1 = __importDefault(require("../private/utils/setBorderRadius")); | ||
const setWrapperSize_1 = __importDefault(require("../private/utils/setWrapperSize")); | ||
const Wrapper = ({ children, size, imageUrl, color, backgroundColor, }) => { | ||
return (react_1.default.createElement("div", { className: classnames_1.default('overflow-hidden uppercase font-medium flex items-center justify-center bg-cover', color && color, backgroundColor && backgroundColor, setWrapperSize_1.default(size)), style: { backgroundImage: `url('${imageUrl}')` } }, children)); | ||
const Wrapper = ({ children, size, imageUrl, color, backgroundColor, isRounded, }) => { | ||
return (react_1.default.createElement("div", { className: classnames_1.default('overflow-hidden uppercase font-medium flex items-center justify-center bg-cover', color && color, backgroundColor && backgroundColor, setWrapperSize_1.default(size), setBorderRadius_1.default(size, isRounded)), style: { backgroundImage: `url('${imageUrl}')` } }, children)); | ||
}; | ||
exports.default = Wrapper; |
import React from 'react'; | ||
import BreadcrumbProps from './types/BreadcrumbProps'; | ||
import type BreadcrumbProps from './types/BreadcrumbProps'; | ||
declare const Collapsed: React.FC<BreadcrumbProps>; | ||
export default Collapsed; | ||
//# sourceMappingURL=Collapsed.d.ts.map |
@@ -56,3 +56,3 @@ "use strict"; | ||
return (react_1.default.createElement("nav", { "aria-label": "Breadcrumb" }, | ||
react_1.default.createElement("ol", { className: "flex flex-wrap gap-2 items-center text-moon-12" }, | ||
react_1.default.createElement("ol", { className: "flex flex-wrap gap-2 items-center text-moon-14" }, | ||
react_1.default.createElement("li", { key: 'crumb' + 0, className: "flex items-center gap-2 text-trunks" }, | ||
@@ -64,3 +64,3 @@ react_1.default.createElement("span", { className: "text-trunks transition-colors duration-200 hover:text-bulma" }, collapseBreadcrumbs && collapseBreadcrumbs[0]), | ||
react_1.default.createElement(moon_icons_tw_1.Other3DotsHorizontal, null)), | ||
isOpen && (react_1.default.createElement("ol", { className: "absolute left-0 top-full bg-gohan p-1 mt-2 flex flex-col gap-2 shadow-moon-xl rounded-moon-s-xs z-10000 min-w-[12rem]" }, restBreadcrumbs.map((crumb, index) => (react_1.default.createElement("li", { key: 'innercrumb' + index, className: "flex flex-col items-stretch text-bulma text-moon-12 brcrumb-li rounded-sm cursor-pointer hover:bg-goku" }, crumb))))))), | ||
isOpen && (react_1.default.createElement("ol", { className: "absolute left-0 top-full bg-gohan p-1 mt-2 flex flex-col gap-2 shadow-moon-xl rounded-moon-s-xs z-10000 min-w-[12rem]" }, restBreadcrumbs.map((crumb, index) => (react_1.default.createElement("li", { key: 'innercrumb' + index, className: "flex flex-col items-stretch text-bulma text-moon-14 brcrumb-li rounded-sm cursor-pointer hover:bg-goku" }, crumb))))))), | ||
(collapseBreadcrumbs === null || collapseBreadcrumbs === void 0 ? void 0 : collapseBreadcrumbs.length) !== 0 && | ||
@@ -73,5 +73,5 @@ collapseBreadcrumbs.map((crumb, index) => { | ||
react_1.default.createElement("span", { className: classnames_1.default('text-trunks transition-colors duration-200 hover:text-bulma', index === collapseBreadcrumbs.length - 1 && | ||
'text-bulma font-semibold') }, crumb && crumb))); | ||
'text-bulma font-medium') }, crumb && crumb))); | ||
})))); | ||
}; | ||
exports.default = Collapsed; |
import React from 'react'; | ||
import BreadcrumbProps from './types/BreadcrumbProps'; | ||
import type BreadcrumbProps from './types/BreadcrumbProps'; | ||
declare const Extended: React.FC<BreadcrumbProps>; | ||
export default Extended; | ||
//# sourceMappingURL=Extended.d.ts.map |
@@ -10,6 +10,6 @@ "use strict"; | ||
const Extended = ({ breadcrumbs }) => (react_1.default.createElement("nav", { "aria-label": "Breadcrumb" }, | ||
react_1.default.createElement("ol", { className: "flex flex-wrap gap-2 items-center text-moon-12" }, breadcrumbs.length > 0 && | ||
react_1.default.createElement("ol", { className: "flex flex-wrap gap-2 items-center text-moon-14" }, breadcrumbs.length > 0 && | ||
breadcrumbs.map((crumb, index) => (react_1.default.createElement("li", { key: 'crumb' + index, className: "flex items-center gap-2 text-trunks" }, | ||
index !== 0 && react_1.default.createElement(moon_icons_tw_1.ArrowsRight, null), | ||
react_1.default.createElement("span", { className: classnames_1.default('text-trunks transition-colors duration-200 hover:text-bulma', index === breadcrumbs.length - 1 && 'text-bulma font-semibold') }, crumb && crumb))))))); | ||
react_1.default.createElement("span", { className: classnames_1.default('text-trunks transition-colors duration-200 hover:text-bulma', index === breadcrumbs.length - 1 && 'text-bulma font-medium') }, crumb && crumb))))))); | ||
exports.default = Extended; |
@@ -41,7 +41,6 @@ "use strict"; | ||
const Button = (_a) => { | ||
var { children, variant = 'primary', size = 'md', icon, iconSize = 24, iconLeft, iconRight, iconOnly, fullWidth, disabled, animation } = _a, rest = __rest(_a, ["children", "variant", "size", "icon", "iconSize", "iconLeft", "iconRight", "iconOnly", "fullWidth", "disabled", "animation"]); | ||
var { children, variant = 'primary', size = 'md', icon, iconSize = size === 'xs' ? 16 : 24, iconLeft, iconRight, iconOnly, fullWidth, disabled, animation } = _a, rest = __rest(_a, ["children", "variant", "size", "icon", "iconSize", "iconLeft", "iconRight", "iconOnly", "fullWidth", "disabled", "animation"]); | ||
const [isHover, setIsHover] = react_1.useState(false); | ||
const hasAnimationContent = animation === 'progress' || animation === 'success'; | ||
const setIconSize = size === 'xs' ? 16 : iconSize; | ||
return (react_1.default.createElement(ButtonComponent_1.default, Object.assign({ size: size, variant: variant, icon: icon, iconSize: setIconSize, iconLeft: iconLeft, iconRight: iconRight, iconOnly: iconOnly, fullWidth: fullWidth, disabled: disabled, animation: animation, onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false) }, rest), | ||
return (react_1.default.createElement(ButtonComponent_1.default, Object.assign({ size: size, variant: variant, icon: icon, iconSize: iconSize, iconLeft: iconLeft, iconRight: iconRight, iconOnly: iconOnly, fullWidth: fullWidth, disabled: disabled, animation: animation, onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false) }, rest), | ||
hasAnimationContent ? (react_1.default.createElement(AnimationContent_1.default, { iconLeft: iconLeft, children: children, iconRight: iconRight, iconOnly: iconOnly, animation: animation, variant: variant })) : (react_1.default.createElement(react_1.default.Fragment, null, | ||
@@ -48,0 +47,0 @@ iconLeft, |
import type ButtonProps from '../types/ButtonProps'; | ||
declare const smPadding: ({ icon, iconLeft, iconRight, iconOnly }: ButtonProps) => "p-1 pr-3" | "p-1 pl-3" | "p-1" | "py-1 px-3"; | ||
declare const smPadding: ({ icon, iconLeft, iconRight, iconOnly }: ButtonProps) => "p-1 pe-3" | "p-1 ps-3" | "p-1" | "py-1 px-3"; | ||
export default smPadding; | ||
//# sourceMappingURL=smPadding.d.ts.map |
@@ -5,6 +5,6 @@ "use strict"; | ||
if (icon === 'left' || iconLeft) { | ||
return 'p-1 pr-3'; | ||
return 'p-1 pe-3'; | ||
} | ||
if (icon === 'right' || iconRight) { | ||
return 'p-1 pl-3'; | ||
return 'p-1 ps-3'; | ||
} | ||
@@ -11,0 +11,0 @@ if (icon === 'only' || iconOnly) { |
import type ButtonProps from '../types/ButtonProps'; | ||
declare const xsPadding: ({ icon, iconLeft, iconRight, iconOnly }: ButtonProps) => "p-1" | "p-1 pr-2" | "p-1 pl-2" | "py-1 px-2"; | ||
declare const xsPadding: ({ icon, iconLeft, iconRight, iconOnly }: ButtonProps) => "p-1" | "p-1 pe-2" | "p-1 ps-2" | "py-1 px-2"; | ||
export default xsPadding; | ||
//# sourceMappingURL=xsPadding.d.ts.map |
@@ -5,6 +5,6 @@ "use strict"; | ||
if (icon === 'left' || iconLeft) { | ||
return 'p-1 pr-2'; | ||
return 'p-1 pe-2'; | ||
} | ||
if (icon === 'right' || iconRight) { | ||
return 'p-1 pl-2'; | ||
return 'p-1 ps-2'; | ||
} | ||
@@ -11,0 +11,0 @@ if (icon === 'only' || iconOnly) { |
@@ -49,3 +49,3 @@ "use strict"; | ||
react_1.default.createElement("span", { className: classnames_1.default('flex me-3 relative') }, | ||
react_1.default.createElement("span", { className: classnames_1.default('w-6 h-6 rounded-moon-i-xs transition duration-200 absolute top-1/2 left-1/2 translate-x-[-50%] translate-y-[-50%] transition-[background-color]', isChecked ? 'hover:bg-piccolo/[.12]' : 'hover:bg-trunks/[.12]', !disabled && | ||
react_1.default.createElement("span", { className: classnames_1.default('w-6 h-6 rounded-moon-i-xs duration-200 absolute top-1/2 left-1/2 translate-x-[-50%] translate-y-[-50%] transition-[background-color]', isChecked ? 'hover:bg-piccolo/[.12]' : 'hover:bg-trunks/[.12]', !disabled && | ||
!readOnly && | ||
@@ -52,0 +52,0 @@ isHover && |
/// <reference types="react" /> | ||
import type AccordionProps from './private/types/AccordionProps'; | ||
declare const Accordion: ({ title, openByDefault, children, disableOpen, headerContent, withButton, isContentInside, size, }: AccordionProps) => JSX.Element; | ||
declare const Accordion: ({ title, openByDefault, children, disableOpen, headerContent, withButton, isContentInside, isRtl, size, }: AccordionProps) => JSX.Element; | ||
export default Accordion; | ||
//# sourceMappingURL=Accordion.d.ts.map |
@@ -8,3 +8,3 @@ import React, { useState } from 'react'; | ||
import setPadding from './private/utils/setPadding'; | ||
const Accordion = ({ title, openByDefault, children, disableOpen, headerContent, withButton = true, isContentInside = true, size = 'md', }) => { | ||
const Accordion = ({ title, openByDefault, children, disableOpen, headerContent, withButton = true, isContentInside = true, isRtl, size = 'md', }) => { | ||
const [isOpen, setIsOpen] = useState(openByDefault); | ||
@@ -18,8 +18,8 @@ function handleState() { | ||
React.createElement("div", { className: classNames('bg-gohan w-full flex items-center relative gap-1', disableOpen ? 'cursor-not-allowed' : 'cursor-pointer', isContentInside ? 'bg-gohan' : 'transparent rounded-moon-s-sm', isContentInside ? '' : setPadding(true, size)), onClick: handleState }, | ||
title && (React.createElement("h3", { className: classNames('flex-1 font-medium', setFont(size)) }, title)), | ||
title && (React.createElement("h3", { className: classNames('flex-1 font-medium text-bulma', setFont(size)) }, title)), | ||
headerContent && React.createElement(React.Fragment, null, headerContent), | ||
withButton && (React.createElement("button", { type: "button", disabled: disableOpen, className: classNames('align-middle text-[0.5rem] leading-none no-underline text-trunks border-transparent bg-gohan', disableOpen ? 'cursor-not-allowed' : 'cursor-pointer') }, | ||
React.createElement(ControlsChevronRight, { className: classNames('text-trunks text-moon-24 transition-transform transition-200', setOpenIcon(isOpen)) })))), | ||
React.createElement("div", { className: classNames('overflow-hidden w-full', isOpen ? 'h-full' : 'h-0', isOpen && setMargin(size)) }, children))); | ||
React.createElement(ControlsChevronRight, { className: classNames('text-trunks text-moon-24 transition-transform transition-200', setOpenIcon({ isOpen, isRtl })) })))), | ||
React.createElement("div", { className: classNames('overflow-hidden w-full text-bulma', isOpen ? 'h-full' : 'h-0', isOpen && setMargin(size)) }, children))); | ||
}; | ||
export default Accordion; |
@@ -12,4 +12,5 @@ /// <reference types="react" /> | ||
isContentInside?: boolean; | ||
isRtl?: boolean; | ||
}; | ||
export default AccordionProps; | ||
//# sourceMappingURL=AccordionProps.d.ts.map |
@@ -1,3 +0,7 @@ | ||
declare const setOpenIcon: (isOpen?: boolean | undefined) => false | "rotate-90" | undefined; | ||
declare type Props = { | ||
isOpen?: boolean; | ||
isRtl?: boolean; | ||
}; | ||
declare const setOpenIcon: ({ isOpen, isRtl }: Props) => false | "rotate-90" | "rotate-180" | undefined; | ||
export default setOpenIcon; | ||
//# sourceMappingURL=setOpenIcon.d.ts.map |
@@ -1,2 +0,7 @@ | ||
const setOpenIcon = (isOpen) => isOpen && 'rotate-90'; | ||
const setOpenIcon = ({ isOpen, isRtl }) => { | ||
if (isRtl) { | ||
return isOpen ? 'rotate-90' : 'rotate-180'; | ||
} | ||
return isOpen && 'rotate-90'; | ||
}; | ||
export default setOpenIcon; |
@@ -7,7 +7,7 @@ import React from 'react'; | ||
import Wrapper from './styles/Wrapper'; | ||
const Avatar = ({ name, imageUrl = '', color = 'text-bulma', backgroundColor = 'bg-gohan', size = 'md', statusOrigin = { vertical: 'bottom', horizontal: 'right' }, isStatusActive, }) => { | ||
const Avatar = ({ name, imageUrl = '', color = 'text-bulma', backgroundColor = 'bg-gohan', size = 'md', statusOrigin = { vertical: 'bottom', horizontal: 'right' }, isStatusActive, isRounded, }) => { | ||
return (React.createElement("div", { className: "relative" }, | ||
imageUrl ? (React.createElement(Wrapper, { size: size, imageUrl: imageUrl, color: color, backgroundColor: backgroundColor })) : (React.createElement(Wrapper, { size: size, imageUrl: imageUrl, color: color, backgroundColor: backgroundColor }, name || (React.createElement(GenericUser, { className: classNames(setIconSize(size), color && color) })))), | ||
imageUrl ? (React.createElement(Wrapper, { size: size, imageUrl: imageUrl, color: color, backgroundColor: backgroundColor, isRounded: isRounded })) : (React.createElement(Wrapper, { size: size, imageUrl: imageUrl, color: color, backgroundColor: backgroundColor, isRounded: isRounded }, name || (React.createElement(GenericUser, { className: classNames(setIconSize(size), color && color) })))), | ||
statusOrigin && isStatusActive && (React.createElement(Status, { size: size, statusOrigin: statusOrigin })))); | ||
}; | ||
export default Avatar; |
@@ -12,4 +12,5 @@ /// <reference types="react" /> | ||
isStatusActive?: boolean; | ||
isRounded?: boolean; | ||
}; | ||
export default AvatarProps; | ||
//# sourceMappingURL=AvatarProps.d.ts.map |
@@ -1,3 +0,3 @@ | ||
declare const setWrapperSize: (size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined) => "h-6 w-6 text-moon-10-caption rounded-moon-i-xs" | "h-8 w-8 text-moon-12 rounded-moon-i-sm" | "h-10 w-10 text-moon-14 rounded-moon-i-sm" | "h-12 w-12 text-moon-16 rounded-moon-i-sm" | "h-14 w-14 text-moon-16 rounded-moon-i-sm" | "h-16 w-16 text-moon-20 rounded-moon-i-md"; | ||
declare const setWrapperSize: (size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | undefined) => "h-6 w-6 text-moon-10-caption" | "h-8 w-8 text-moon-12" | "h-10 w-10 text-moon-14" | "h-12 w-12 text-moon-16" | "h-14 w-14 text-moon-16" | "h-16 w-16 text-moon-20"; | ||
export default setWrapperSize; | ||
//# sourceMappingURL=setWrapperSize.d.ts.map |
const setWrapperSize = (size) => { | ||
if (size === 'xs') { | ||
return 'h-6 w-6 text-moon-10-caption rounded-moon-i-xs'; | ||
return 'h-6 w-6 text-moon-10-caption'; | ||
} | ||
if (size === 'sm') { | ||
return 'h-8 w-8 text-moon-12 rounded-moon-i-sm'; | ||
return 'h-8 w-8 text-moon-12'; | ||
} | ||
if (size === 'md') { | ||
return 'h-10 w-10 text-moon-14 rounded-moon-i-sm'; | ||
return 'h-10 w-10 text-moon-14'; | ||
} | ||
if (size === 'lg') { | ||
return 'h-12 w-12 text-moon-16 rounded-moon-i-sm'; | ||
return 'h-12 w-12 text-moon-16'; | ||
} | ||
if (size === 'xl') { | ||
return 'h-14 w-14 text-moon-16 rounded-moon-i-sm'; | ||
return 'h-14 w-14 text-moon-16'; | ||
} | ||
return 'h-16 w-16 text-moon-20 rounded-moon-i-md'; | ||
return 'h-16 w-16 text-moon-20'; | ||
}; | ||
export default setWrapperSize; |
import React from 'react'; | ||
import classNames from '../../private/utils/classnames'; | ||
import setBorderRadius from '../private/utils/setBorderRadius'; | ||
import setWrapperSize from '../private/utils/setWrapperSize'; | ||
const Wrapper = ({ children, size, imageUrl, color, backgroundColor, }) => { | ||
return (React.createElement("div", { className: classNames('overflow-hidden uppercase font-medium flex items-center justify-center bg-cover', color && color, backgroundColor && backgroundColor, setWrapperSize(size)), style: { backgroundImage: `url('${imageUrl}')` } }, children)); | ||
const Wrapper = ({ children, size, imageUrl, color, backgroundColor, isRounded, }) => { | ||
return (React.createElement("div", { className: classNames('overflow-hidden uppercase font-medium flex items-center justify-center bg-cover', color && color, backgroundColor && backgroundColor, setWrapperSize(size), setBorderRadius(size, isRounded)), style: { backgroundImage: `url('${imageUrl}')` } }, children)); | ||
}; | ||
export default Wrapper; |
import React from 'react'; | ||
import BreadcrumbProps from './types/BreadcrumbProps'; | ||
import type BreadcrumbProps from './types/BreadcrumbProps'; | ||
declare const Collapsed: React.FC<BreadcrumbProps>; | ||
export default Collapsed; | ||
//# sourceMappingURL=Collapsed.d.ts.map |
@@ -32,3 +32,3 @@ import React, { useState } from 'react'; | ||
return (React.createElement("nav", { "aria-label": "Breadcrumb" }, | ||
React.createElement("ol", { className: "flex flex-wrap gap-2 items-center text-moon-12" }, | ||
React.createElement("ol", { className: "flex flex-wrap gap-2 items-center text-moon-14" }, | ||
React.createElement("li", { key: 'crumb' + 0, className: "flex items-center gap-2 text-trunks" }, | ||
@@ -40,3 +40,3 @@ React.createElement("span", { className: "text-trunks transition-colors duration-200 hover:text-bulma" }, collapseBreadcrumbs && collapseBreadcrumbs[0]), | ||
React.createElement(Other3DotsHorizontal, null)), | ||
isOpen && (React.createElement("ol", { className: "absolute left-0 top-full bg-gohan p-1 mt-2 flex flex-col gap-2 shadow-moon-xl rounded-moon-s-xs z-10000 min-w-[12rem]" }, restBreadcrumbs.map((crumb, index) => (React.createElement("li", { key: 'innercrumb' + index, className: "flex flex-col items-stretch text-bulma text-moon-12 brcrumb-li rounded-sm cursor-pointer hover:bg-goku" }, crumb))))))), | ||
isOpen && (React.createElement("ol", { className: "absolute left-0 top-full bg-gohan p-1 mt-2 flex flex-col gap-2 shadow-moon-xl rounded-moon-s-xs z-10000 min-w-[12rem]" }, restBreadcrumbs.map((crumb, index) => (React.createElement("li", { key: 'innercrumb' + index, className: "flex flex-col items-stretch text-bulma text-moon-14 brcrumb-li rounded-sm cursor-pointer hover:bg-goku" }, crumb))))))), | ||
(collapseBreadcrumbs === null || collapseBreadcrumbs === void 0 ? void 0 : collapseBreadcrumbs.length) !== 0 && | ||
@@ -49,5 +49,5 @@ collapseBreadcrumbs.map((crumb, index) => { | ||
React.createElement("span", { className: classNames('text-trunks transition-colors duration-200 hover:text-bulma', index === collapseBreadcrumbs.length - 1 && | ||
'text-bulma font-semibold') }, crumb && crumb))); | ||
'text-bulma font-medium') }, crumb && crumb))); | ||
})))); | ||
}; | ||
export default Collapsed; |
import React from 'react'; | ||
import BreadcrumbProps from './types/BreadcrumbProps'; | ||
import type BreadcrumbProps from './types/BreadcrumbProps'; | ||
declare const Extended: React.FC<BreadcrumbProps>; | ||
export default Extended; | ||
//# sourceMappingURL=Extended.d.ts.map |
@@ -5,6 +5,6 @@ import React from 'react'; | ||
const Extended = ({ breadcrumbs }) => (React.createElement("nav", { "aria-label": "Breadcrumb" }, | ||
React.createElement("ol", { className: "flex flex-wrap gap-2 items-center text-moon-12" }, breadcrumbs.length > 0 && | ||
React.createElement("ol", { className: "flex flex-wrap gap-2 items-center text-moon-14" }, breadcrumbs.length > 0 && | ||
breadcrumbs.map((crumb, index) => (React.createElement("li", { key: 'crumb' + index, className: "flex items-center gap-2 text-trunks" }, | ||
index !== 0 && React.createElement(ArrowsRight, null), | ||
React.createElement("span", { className: classNames('text-trunks transition-colors duration-200 hover:text-bulma', index === breadcrumbs.length - 1 && 'text-bulma font-semibold') }, crumb && crumb))))))); | ||
React.createElement("span", { className: classNames('text-trunks transition-colors duration-200 hover:text-bulma', index === breadcrumbs.length - 1 && 'text-bulma font-medium') }, crumb && crumb))))))); | ||
export default Extended; |
@@ -17,7 +17,6 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
const Button = (_a) => { | ||
var { children, variant = 'primary', size = 'md', icon, iconSize = 24, iconLeft, iconRight, iconOnly, fullWidth, disabled, animation } = _a, rest = __rest(_a, ["children", "variant", "size", "icon", "iconSize", "iconLeft", "iconRight", "iconOnly", "fullWidth", "disabled", "animation"]); | ||
var { children, variant = 'primary', size = 'md', icon, iconSize = size === 'xs' ? 16 : 24, iconLeft, iconRight, iconOnly, fullWidth, disabled, animation } = _a, rest = __rest(_a, ["children", "variant", "size", "icon", "iconSize", "iconLeft", "iconRight", "iconOnly", "fullWidth", "disabled", "animation"]); | ||
const [isHover, setIsHover] = useState(false); | ||
const hasAnimationContent = animation === 'progress' || animation === 'success'; | ||
const setIconSize = size === 'xs' ? 16 : iconSize; | ||
return (React.createElement(ButtonComponent, Object.assign({ size: size, variant: variant, icon: icon, iconSize: setIconSize, iconLeft: iconLeft, iconRight: iconRight, iconOnly: iconOnly, fullWidth: fullWidth, disabled: disabled, animation: animation, onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false) }, rest), | ||
return (React.createElement(ButtonComponent, Object.assign({ size: size, variant: variant, icon: icon, iconSize: iconSize, iconLeft: iconLeft, iconRight: iconRight, iconOnly: iconOnly, fullWidth: fullWidth, disabled: disabled, animation: animation, onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false) }, rest), | ||
hasAnimationContent ? (React.createElement(AnimationContent, { iconLeft: iconLeft, children: children, iconRight: iconRight, iconOnly: iconOnly, animation: animation, variant: variant })) : (React.createElement(React.Fragment, null, | ||
@@ -24,0 +23,0 @@ iconLeft, |
import type ButtonProps from '../types/ButtonProps'; | ||
declare const smPadding: ({ icon, iconLeft, iconRight, iconOnly }: ButtonProps) => "p-1 pr-3" | "p-1 pl-3" | "p-1" | "py-1 px-3"; | ||
declare const smPadding: ({ icon, iconLeft, iconRight, iconOnly }: ButtonProps) => "p-1 pe-3" | "p-1 ps-3" | "p-1" | "py-1 px-3"; | ||
export default smPadding; | ||
//# sourceMappingURL=smPadding.d.ts.map |
const smPadding = ({ icon, iconLeft, iconRight, iconOnly }) => { | ||
if (icon === 'left' || iconLeft) { | ||
return 'p-1 pr-3'; | ||
return 'p-1 pe-3'; | ||
} | ||
if (icon === 'right' || iconRight) { | ||
return 'p-1 pl-3'; | ||
return 'p-1 ps-3'; | ||
} | ||
@@ -8,0 +8,0 @@ if (icon === 'only' || iconOnly) { |
import type ButtonProps from '../types/ButtonProps'; | ||
declare const xsPadding: ({ icon, iconLeft, iconRight, iconOnly }: ButtonProps) => "p-1" | "p-1 pr-2" | "p-1 pl-2" | "py-1 px-2"; | ||
declare const xsPadding: ({ icon, iconLeft, iconRight, iconOnly }: ButtonProps) => "p-1" | "p-1 pe-2" | "p-1 ps-2" | "py-1 px-2"; | ||
export default xsPadding; | ||
//# sourceMappingURL=xsPadding.d.ts.map |
const xsPadding = ({ icon, iconLeft, iconRight, iconOnly }) => { | ||
if (icon === 'left' || iconLeft) { | ||
return 'p-1 pr-2'; | ||
return 'p-1 pe-2'; | ||
} | ||
if (icon === 'right' || iconRight) { | ||
return 'p-1 pl-2'; | ||
return 'p-1 ps-2'; | ||
} | ||
@@ -8,0 +8,0 @@ if (icon === 'only' || iconOnly) { |
@@ -25,3 +25,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
React.createElement("span", { className: classNames('flex me-3 relative') }, | ||
React.createElement("span", { className: classNames('w-6 h-6 rounded-moon-i-xs transition duration-200 absolute top-1/2 left-1/2 translate-x-[-50%] translate-y-[-50%] transition-[background-color]', isChecked ? 'hover:bg-piccolo/[.12]' : 'hover:bg-trunks/[.12]', !disabled && | ||
React.createElement("span", { className: classNames('w-6 h-6 rounded-moon-i-xs duration-200 absolute top-1/2 left-1/2 translate-x-[-50%] translate-y-[-50%] transition-[background-color]', isChecked ? 'hover:bg-piccolo/[.12]' : 'hover:bg-trunks/[.12]', !disabled && | ||
!readOnly && | ||
@@ -28,0 +28,0 @@ isHover && |
@@ -20,4 +20,4 @@ /** | ||
export * from './label/utils/setFontSize'; | ||
export { default as setPadding } from './label/utils/setPadding'; | ||
export * from './label/utils/setPadding'; | ||
export { default as setSpacing } from './label/utils/setSpacing'; | ||
export * from './label/utils/setSpacing'; | ||
export { default as Loader } from './loader/Loader'; | ||
@@ -27,2 +27,4 @@ export * from './loader/Loader'; | ||
export * from './pagination/Pagination'; | ||
export { default as RadioButton } from './radioButton/RadioButton'; | ||
export * from './radioButton/RadioButton'; | ||
export { default as TextInput } from './textInput/TextInput'; | ||
@@ -29,0 +31,0 @@ export * from './textInput/TextInput'; |
@@ -20,4 +20,4 @@ /** | ||
export * from './label/utils/setFontSize'; | ||
export { default as setPadding } from './label/utils/setPadding'; | ||
export * from './label/utils/setPadding'; | ||
export { default as setSpacing } from './label/utils/setSpacing'; | ||
export * from './label/utils/setSpacing'; | ||
export { default as Loader } from './loader/Loader'; | ||
@@ -27,2 +27,4 @@ export * from './loader/Loader'; | ||
export * from './pagination/Pagination'; | ||
export { default as RadioButton } from './radioButton/RadioButton'; | ||
export * from './radioButton/RadioButton'; | ||
export { default as TextInput } from './textInput/TextInput'; | ||
@@ -29,0 +31,0 @@ export * from './textInput/TextInput'; |
import React from 'react'; | ||
import classNames from '../private/utils/classnames'; | ||
import LabelContainer from './styles/LabelContainer'; | ||
const Label = ({ children, color = 'text-gohan', backgroundColor = 'bg-bulma', iconLeft, iconRight, size, isUppercase = true, }) => (React.createElement(LabelContainer, { backgroundColor: backgroundColor, color: color, size: size, isUppercase: isUppercase, iconLeft: iconLeft, iconRight: iconRight }, | ||
iconLeft && (React.createElement("span", { className: classNames('me-1', size === '2xs' ? 'text-[0.75rem]' : 'text-[1rem]') }, iconLeft)), | ||
const Label = ({ children, color = 'text-gohan', backgroundColor = 'bg-bulma', iconLeft, iconRight, size = 'xs', isUppercase = true, }) => (React.createElement(LabelContainer, { backgroundColor: backgroundColor, color: color, size: size, isUppercase: isUppercase, iconLeft: iconLeft, iconRight: iconRight }, | ||
iconLeft && iconLeft, | ||
children, | ||
iconRight && (React.createElement("span", { className: classNames('ms-1', size === '2xs' ? 'text-[0.75rem]' : 'text-[1rem]') }, iconRight)))); | ||
iconRight && iconRight)); | ||
export default Label; |
import React from 'react'; | ||
import classNames from '../../private/utils/classnames'; | ||
import setFontSize from '../utils/setFontSize'; | ||
import setPadding from '../utils/setPadding'; | ||
const LabelContainer = ({ size, iconLeft, iconRight, isUppercase, color, backgroundColor, children, }) => (React.createElement("div", { className: classNames('flex items-center rounded-moon-i-xs leading-4', setPadding({ size, iconRight, iconLeft }), isUppercase && 'uppercase font-medium', setFontSize({ isUppercase, size }), isUppercase && size === '2xs' | ||
? 'tracking-[0.031rem]' | ||
: 'tracking-[0.063rem]', color && color, backgroundColor && backgroundColor) }, children)); | ||
import setSpacing from '../utils/setSpacing'; | ||
const LabelContainer = ({ size, iconLeft, iconRight, isUppercase, color, backgroundColor, children, }) => (React.createElement("div", { className: classNames('flex items-center rounded-moon-i-xs gap-1', setSpacing({ size, iconRight, iconLeft }), setFontSize({ isUppercase, size }), color && color, backgroundColor && backgroundColor) }, children)); | ||
export default LabelContainer; |
import LabelProps from '../private/types/LabelProps'; | ||
declare const setFontSize: ({ size, isUppercase }: LabelProps) => "text-[0.563rem]" | "text-[0.625rem]" | "text-[0.75rem]"; | ||
declare const setFontSize: ({ size, isUppercase }: LabelProps) => "text-moon-9-caption uppercase font-medium" | "text-moon-10-caption uppercase font-medium" | "text-moon-10" | "text-moon-12"; | ||
export default setFontSize; | ||
//# sourceMappingURL=setFontSize.d.ts.map |
const setFontSize = ({ size, isUppercase }) => { | ||
if (isUppercase) { | ||
return size === '2xs' ? 'text-[0.563rem]' : 'text-[0.625rem]'; | ||
return size === '2xs' | ||
? 'text-moon-9-caption uppercase font-medium' | ||
: 'text-moon-10-caption uppercase font-medium'; | ||
} | ||
return size === '2xs' ? 'text-[0.625rem]' : 'text-[0.75rem]'; | ||
return size === '2xs' ? 'text-moon-10' : 'text-moon-12'; | ||
}; | ||
export default setFontSize; |
import React from 'react'; | ||
import ReactPaginate from 'react-paginate'; | ||
import { Button } from "../index"; | ||
import { Button } from '../index'; | ||
import ChevronLeft from './private/icons/ChevronLeft'; | ||
import ChevronRight from './private/icons/ChevronRight'; | ||
const Pagination = ({ onChange, previousButtonLabel, nextButtonLabel, pageNumber, goToPageSection, changePageSizeSection, pageSizeSection, pageCount, pageRangeDisplayed, marginPagesDisplayed, className = "" }) => { | ||
const Pagination = ({ onChange, previousButtonLabel, nextButtonLabel, pageNumber, goToPageSection, changePageSizeSection, pageSizeSection, pageCount, pageRangeDisplayed, marginPagesDisplayed, className = '', }) => { | ||
const renderPreviousLabel = () => { | ||
if (typeof previousButtonLabel === "string") { | ||
if (typeof previousButtonLabel === 'string') { | ||
return (React.createElement("div", null, | ||
@@ -17,3 +17,3 @@ React.createElement(Button, { className: "hidden sm:flex" }, previousButtonLabel), | ||
const renderNextLabel = () => { | ||
if (typeof nextButtonLabel === "string") { | ||
if (typeof nextButtonLabel === 'string') { | ||
return (React.createElement("div", null, | ||
@@ -27,17 +27,17 @@ React.createElement(Button, { className: "hidden sm:flex" }, nextButtonLabel), | ||
return (React.createElement("div", { className: "flex flex-wrap items-center justify-between" }, | ||
!!pageSizeSection && (React.createElement("div", { className: 'm-2.5' }, | ||
!!pageSizeSection && React.createElement("div", { className: "m-2.5" }, | ||
" ", | ||
pageSizeSection, | ||
" ")), | ||
" "), | ||
React.createElement("div", { className: "flex flex-column flex-wrap items-center justify-center md:flex-row" }, | ||
React.createElement(ReactPaginate, { forcePage: pageNumber - 1, previousLabel: renderPreviousLabel(), nextLabel: renderNextLabel(), onPageChange: ({ selected }) => onChange(selected + 1), disableInitialCallback: true, pageCount: pageCount, pageRangeDisplayed: pageRangeDisplayed, marginPagesDisplayed: marginPagesDisplayed, containerClassName: `m-2.5 flex-wrap md:flex-nowrap list-none flex items-center justify-center ${className}`, pageClassName: "group my-0 mx-0.5 rounded-lg hover:text-piccolo hover:bg-piccolo/[.12]", pageLinkClassName: "flex items-center justify-center cursor-pointer h-8 w-8 group-selected:outline-none", previousClassName: `my-2.5 text-center mr-9 text-trunks ${pageNumber === 1 && "cursor-default"}`, nextClassName: `my-2.5 text-center ml-9 text-trunks ${pageNumber === pageCount && "cursor-default"}`, activeClassName: "bg-piccolo text-goten hover:bg-piccolo hover:text-goten", breakClassName: "my-0 mx-0.5", breakLinkClassName: "flex items-center justify-center h-8 w-8" }), | ||
!!changePageSizeSection && (React.createElement("div", { className: 'm-2.5' }, | ||
React.createElement(ReactPaginate, { forcePage: pageNumber - 1, previousLabel: renderPreviousLabel(), nextLabel: renderNextLabel(), onPageChange: ({ selected }) => onChange(selected + 1), disableInitialCallback: true, pageCount: pageCount, pageRangeDisplayed: pageRangeDisplayed, marginPagesDisplayed: marginPagesDisplayed, containerClassName: `m-2.5 flex-wrap md:flex-nowrap list-none flex items-center justify-center ${className}`, pageClassName: "group my-0 mx-0.5 rounded-lg hover:text-piccolo hover:bg-piccolo/[.12]", pageLinkClassName: "flex items-center justify-center cursor-pointer h-8 w-8 group-selected:outline-none", previousClassName: `my-2.5 text-center me-9 text-trunks ${pageNumber === 1 && 'cursor-default'}`, nextClassName: `my-2.5 text-center ms-9 text-trunks ${pageNumber === pageCount && 'cursor-default'}`, activeClassName: "bg-piccolo text-goten hover:bg-piccolo hover:text-goten", breakClassName: "my-0 mx-0.5", breakLinkClassName: "flex items-center justify-center h-8 w-8" }), | ||
!!changePageSizeSection && (React.createElement("div", { className: "m-2.5" }, | ||
" ", | ||
changePageSizeSection, | ||
" "))), | ||
!!goToPageSection && (React.createElement("div", { className: 'm-2.5' }, | ||
!!goToPageSection && React.createElement("div", { className: "m-2.5" }, | ||
" ", | ||
goToPageSection, | ||
" ")))); | ||
" "))); | ||
}; | ||
export default Pagination; |
@@ -20,4 +20,4 @@ /** | ||
export * from './label/utils/setFontSize'; | ||
export { default as setPadding } from './label/utils/setPadding'; | ||
export * from './label/utils/setPadding'; | ||
export { default as setSpacing } from './label/utils/setSpacing'; | ||
export * from './label/utils/setSpacing'; | ||
export { default as Loader } from './loader/Loader'; | ||
@@ -27,2 +27,4 @@ export * from './loader/Loader'; | ||
export * from './pagination/Pagination'; | ||
export { default as RadioButton } from './radioButton/RadioButton'; | ||
export * from './radioButton/RadioButton'; | ||
export { default as TextInput } from './textInput/TextInput'; | ||
@@ -29,0 +31,0 @@ export * from './textInput/TextInput'; |
@@ -19,3 +19,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TextInputGroup = exports.TextInput = exports.Pagination = exports.Loader = exports.setPadding = exports.setFontSize = exports.Label = exports.Chip = exports.Checkbox = exports.Button = exports.Breadcrumb = exports.Avatar = exports.Accordion = void 0; | ||
exports.TextInputGroup = exports.TextInput = exports.RadioButton = exports.Pagination = exports.Loader = exports.setSpacing = exports.setFontSize = exports.Label = exports.Chip = exports.Checkbox = exports.Button = exports.Breadcrumb = exports.Avatar = exports.Accordion = void 0; | ||
var Accordion_1 = require("./accordion/Accordion"); | ||
@@ -45,5 +45,5 @@ Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return __importDefault(Accordion_1).default; } }); | ||
__exportStar(require("./label/utils/setFontSize"), exports); | ||
var setPadding_1 = require("./label/utils/setPadding"); | ||
Object.defineProperty(exports, "setPadding", { enumerable: true, get: function () { return __importDefault(setPadding_1).default; } }); | ||
__exportStar(require("./label/utils/setPadding"), exports); | ||
var setSpacing_1 = require("./label/utils/setSpacing"); | ||
Object.defineProperty(exports, "setSpacing", { enumerable: true, get: function () { return __importDefault(setSpacing_1).default; } }); | ||
__exportStar(require("./label/utils/setSpacing"), exports); | ||
var Loader_1 = require("./loader/Loader"); | ||
@@ -55,2 +55,5 @@ Object.defineProperty(exports, "Loader", { enumerable: true, get: function () { return __importDefault(Loader_1).default; } }); | ||
__exportStar(require("./pagination/Pagination"), exports); | ||
var RadioButton_1 = require("./radioButton/RadioButton"); | ||
Object.defineProperty(exports, "RadioButton", { enumerable: true, get: function () { return __importDefault(RadioButton_1).default; } }); | ||
__exportStar(require("./radioButton/RadioButton"), exports); | ||
var TextInput_1 = require("./textInput/TextInput"); | ||
@@ -57,0 +60,0 @@ Object.defineProperty(exports, "TextInput", { enumerable: true, get: function () { return __importDefault(TextInput_1).default; } }); |
@@ -7,8 +7,7 @@ "use strict"; | ||
const react_1 = __importDefault(require("react")); | ||
const classnames_1 = __importDefault(require("../private/utils/classnames")); | ||
const LabelContainer_1 = __importDefault(require("./styles/LabelContainer")); | ||
const Label = ({ children, color = 'text-gohan', backgroundColor = 'bg-bulma', iconLeft, iconRight, size, isUppercase = true, }) => (react_1.default.createElement(LabelContainer_1.default, { backgroundColor: backgroundColor, color: color, size: size, isUppercase: isUppercase, iconLeft: iconLeft, iconRight: iconRight }, | ||
iconLeft && (react_1.default.createElement("span", { className: classnames_1.default('me-1', size === '2xs' ? 'text-[0.75rem]' : 'text-[1rem]') }, iconLeft)), | ||
const Label = ({ children, color = 'text-gohan', backgroundColor = 'bg-bulma', iconLeft, iconRight, size = 'xs', isUppercase = true, }) => (react_1.default.createElement(LabelContainer_1.default, { backgroundColor: backgroundColor, color: color, size: size, isUppercase: isUppercase, iconLeft: iconLeft, iconRight: iconRight }, | ||
iconLeft && iconLeft, | ||
children, | ||
iconRight && (react_1.default.createElement("span", { className: classnames_1.default('ms-1', size === '2xs' ? 'text-[0.75rem]' : 'text-[1rem]') }, iconRight)))); | ||
iconRight && iconRight)); | ||
exports.default = Label; |
@@ -9,6 +9,4 @@ "use strict"; | ||
const setFontSize_1 = __importDefault(require("../utils/setFontSize")); | ||
const setPadding_1 = __importDefault(require("../utils/setPadding")); | ||
const LabelContainer = ({ size, iconLeft, iconRight, isUppercase, color, backgroundColor, children, }) => (react_1.default.createElement("div", { className: classnames_1.default('flex items-center rounded-moon-i-xs leading-4', setPadding_1.default({ size, iconRight, iconLeft }), isUppercase && 'uppercase font-medium', setFontSize_1.default({ isUppercase, size }), isUppercase && size === '2xs' | ||
? 'tracking-[0.031rem]' | ||
: 'tracking-[0.063rem]', color && color, backgroundColor && backgroundColor) }, children)); | ||
const setSpacing_1 = __importDefault(require("../utils/setSpacing")); | ||
const LabelContainer = ({ size, iconLeft, iconRight, isUppercase, color, backgroundColor, children, }) => (react_1.default.createElement("div", { className: classnames_1.default('flex items-center rounded-moon-i-xs gap-1', setSpacing_1.default({ size, iconRight, iconLeft }), setFontSize_1.default({ isUppercase, size }), color && color, backgroundColor && backgroundColor) }, children)); | ||
exports.default = LabelContainer; |
import LabelProps from '../private/types/LabelProps'; | ||
declare const setFontSize: ({ size, isUppercase }: LabelProps) => "text-[0.563rem]" | "text-[0.625rem]" | "text-[0.75rem]"; | ||
declare const setFontSize: ({ size, isUppercase }: LabelProps) => "text-moon-9-caption uppercase font-medium" | "text-moon-10-caption uppercase font-medium" | "text-moon-10" | "text-moon-12"; | ||
export default setFontSize; | ||
//# sourceMappingURL=setFontSize.d.ts.map |
@@ -5,6 +5,8 @@ "use strict"; | ||
if (isUppercase) { | ||
return size === '2xs' ? 'text-[0.563rem]' : 'text-[0.625rem]'; | ||
return size === '2xs' | ||
? 'text-moon-9-caption uppercase font-medium' | ||
: 'text-moon-10-caption uppercase font-medium'; | ||
} | ||
return size === '2xs' ? 'text-[0.625rem]' : 'text-[0.75rem]'; | ||
return size === '2xs' ? 'text-moon-10' : 'text-moon-12'; | ||
}; | ||
exports.default = setFontSize; |
@@ -11,5 +11,5 @@ "use strict"; | ||
const ChevronRight_1 = __importDefault(require("./private/icons/ChevronRight")); | ||
const Pagination = ({ onChange, previousButtonLabel, nextButtonLabel, pageNumber, goToPageSection, changePageSizeSection, pageSizeSection, pageCount, pageRangeDisplayed, marginPagesDisplayed, className = "" }) => { | ||
const Pagination = ({ onChange, previousButtonLabel, nextButtonLabel, pageNumber, goToPageSection, changePageSizeSection, pageSizeSection, pageCount, pageRangeDisplayed, marginPagesDisplayed, className = '', }) => { | ||
const renderPreviousLabel = () => { | ||
if (typeof previousButtonLabel === "string") { | ||
if (typeof previousButtonLabel === 'string') { | ||
return (react_1.default.createElement("div", null, | ||
@@ -23,3 +23,3 @@ react_1.default.createElement(index_1.Button, { className: "hidden sm:flex" }, previousButtonLabel), | ||
const renderNextLabel = () => { | ||
if (typeof nextButtonLabel === "string") { | ||
if (typeof nextButtonLabel === 'string') { | ||
return (react_1.default.createElement("div", null, | ||
@@ -33,17 +33,17 @@ react_1.default.createElement(index_1.Button, { className: "hidden sm:flex" }, nextButtonLabel), | ||
return (react_1.default.createElement("div", { className: "flex flex-wrap items-center justify-between" }, | ||
!!pageSizeSection && (react_1.default.createElement("div", { className: 'm-2.5' }, | ||
!!pageSizeSection && react_1.default.createElement("div", { className: "m-2.5" }, | ||
" ", | ||
pageSizeSection, | ||
" ")), | ||
" "), | ||
react_1.default.createElement("div", { className: "flex flex-column flex-wrap items-center justify-center md:flex-row" }, | ||
react_1.default.createElement(react_paginate_1.default, { forcePage: pageNumber - 1, previousLabel: renderPreviousLabel(), nextLabel: renderNextLabel(), onPageChange: ({ selected }) => onChange(selected + 1), disableInitialCallback: true, pageCount: pageCount, pageRangeDisplayed: pageRangeDisplayed, marginPagesDisplayed: marginPagesDisplayed, containerClassName: `m-2.5 flex-wrap md:flex-nowrap list-none flex items-center justify-center ${className}`, pageClassName: "group my-0 mx-0.5 rounded-lg hover:text-piccolo hover:bg-piccolo/[.12]", pageLinkClassName: "flex items-center justify-center cursor-pointer h-8 w-8 group-selected:outline-none", previousClassName: `my-2.5 text-center mr-9 text-trunks ${pageNumber === 1 && "cursor-default"}`, nextClassName: `my-2.5 text-center ml-9 text-trunks ${pageNumber === pageCount && "cursor-default"}`, activeClassName: "bg-piccolo text-goten hover:bg-piccolo hover:text-goten", breakClassName: "my-0 mx-0.5", breakLinkClassName: "flex items-center justify-center h-8 w-8" }), | ||
!!changePageSizeSection && (react_1.default.createElement("div", { className: 'm-2.5' }, | ||
react_1.default.createElement(react_paginate_1.default, { forcePage: pageNumber - 1, previousLabel: renderPreviousLabel(), nextLabel: renderNextLabel(), onPageChange: ({ selected }) => onChange(selected + 1), disableInitialCallback: true, pageCount: pageCount, pageRangeDisplayed: pageRangeDisplayed, marginPagesDisplayed: marginPagesDisplayed, containerClassName: `m-2.5 flex-wrap md:flex-nowrap list-none flex items-center justify-center ${className}`, pageClassName: "group my-0 mx-0.5 rounded-lg hover:text-piccolo hover:bg-piccolo/[.12]", pageLinkClassName: "flex items-center justify-center cursor-pointer h-8 w-8 group-selected:outline-none", previousClassName: `my-2.5 text-center me-9 text-trunks ${pageNumber === 1 && 'cursor-default'}`, nextClassName: `my-2.5 text-center ms-9 text-trunks ${pageNumber === pageCount && 'cursor-default'}`, activeClassName: "bg-piccolo text-goten hover:bg-piccolo hover:text-goten", breakClassName: "my-0 mx-0.5", breakLinkClassName: "flex items-center justify-center h-8 w-8" }), | ||
!!changePageSizeSection && (react_1.default.createElement("div", { className: "m-2.5" }, | ||
" ", | ||
changePageSizeSection, | ||
" "))), | ||
!!goToPageSection && (react_1.default.createElement("div", { className: 'm-2.5' }, | ||
!!goToPageSection && react_1.default.createElement("div", { className: "m-2.5" }, | ||
" ", | ||
goToPageSection, | ||
" ")))); | ||
" "))); | ||
}; | ||
exports.default = Pagination; |
{ | ||
"name": "@heathmont/moon-core-tw", | ||
"sideEffects": false, | ||
"version": "9.1.5", | ||
"version": "9.1.7", | ||
"files": [ | ||
@@ -15,3 +15,3 @@ "lib" | ||
"dependencies": { | ||
"@heathmont/moon-icons-tw": "^9.1.5" | ||
"@heathmont/moon-icons-tw": "^9.1.7" | ||
}, | ||
@@ -18,0 +18,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
291714
488
4860