Socket
Socket
Sign inDemoInstall

@heathmont/moon-core-tw

Package Overview
Dependencies
5
Maintainers
98
Versions
144
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.0.1 to 9.0.2

lib/accordion/Accordion.d.ts

4

lib/button/Button.d.ts
import React from 'react';
import Size from '../private/enums/Size';
declare type ButtonSizes = Size.XSMALL | Size.SMALL | Size.MEDIUM | Size.LARGE | Size.XLARGE;
declare type ButtonSizes = Size.XS | Size.SM | Size.MD | Size.LG | Size.XL;
declare type ButtonVariants = 'primary' | 'secondary' | 'tertiary' | 'ghost';

@@ -9,3 +9,3 @@ declare type ButtonIcons = 'left' | 'right' | 'only';

variant?: ButtonVariants;
size?: ButtonSizes | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
size?: ButtonSizes | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
icon?: ButtonIcons;

@@ -12,0 +12,0 @@ animation?: ButtonAnimations;

@@ -42,6 +42,6 @@ "use strict";

const Button = (_a) => {
var { children, variant = 'primary', size = Size_1.default.MEDIUM, 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 = Size_1.default.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"]);
const [isHover, setIsHover] = react_1.useState(false);
const hasAnimationContent = animation === 'progress' || animation === 'success';
const setIconSize = size === Size_1.default.XSMALL ? 16 : iconSize;
const setIconSize = size === Size_1.default.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),

@@ -48,0 +48,0 @@ 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,

@@ -11,3 +11,3 @@ "use strict";

react_1.default.createElement("div", { className: "flex absolute top-1/2 left-1/2 translate-y-[-50%] translate-x-[-50%] content-center justify-center" },
animation === 'progress' && (react_1.default.createElement(Loader_1.default, { color: "currentColor", size: "xsmall" })),
animation === 'progress' && react_1.default.createElement(Loader_1.default, { color: "currentColor", size: "xs" }),
animation === 'success' && react_1.default.createElement(GenericCheckAlternative_1.default, { fontSize: "1.5rem" })),

@@ -14,0 +14,0 @@ react_1.default.createElement("div", { className: "opacity-0" },

@@ -14,15 +14,15 @@ "use strict";

const buttonSizes = ({ size, icon, iconLeft, iconRight, iconOnly, }) => {
if (size === Size_1.default.XSMALL) {
if (size === Size_1.default.XS) {
return classnames_1.default(xSmallPadding_1.default({ icon, iconLeft, iconRight, iconOnly }), 'gap-1 text-xs rounded-moon-i-xs');
}
if (size === Size_1.default.SMALL) {
if (size === Size_1.default.SM) {
return classnames_1.default(smallPadding_1.default({ icon, iconLeft, iconRight, iconOnly }), 'gap-1 text-sm rounded-moon-i-sm');
}
if (size === Size_1.default.MEDIUM) {
if (size === Size_1.default.MD) {
return classnames_1.default(mediumPadding_1.default({ icon, iconLeft, iconRight, iconOnly }), 'gap-2 text-sm rounded-moon-i-sm');
}
if (size === Size_1.default.LARGE) {
if (size === Size_1.default.LG) {
return classnames_1.default(largePadding_1.default({ icon, iconLeft, iconRight, iconOnly }), 'gap-2 text-base rounded-moon-i-sm');
}
if (size === Size_1.default.XLARGE) {
if (size === Size_1.default.XL) {
return classnames_1.default(xLargePadding_1.default({ icon, iconLeft, iconRight, iconOnly }), 'gap-2 text-base rounded-moon-i-md');

@@ -29,0 +29,0 @@ }

import type { ButtonProps } from '../../Button';
declare const xSmallPadding: ({ icon, iconLeft, iconRight, iconOnly, }: ButtonProps) => "p-1" | "p-1 pr-2" | "p-1 pl-2" | "py-1 px-2";
declare const xSmallPadding: ({ icon, iconLeft, iconRight, iconOnly, }: ButtonProps) => "p-1 pl-2" | "p-1" | "p-1 pr-2" | "py-1 px-2";
export default xSmallPadding;
//# sourceMappingURL=xSmallPadding.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

const determinePadding = (size, iconLeft, iconRight, iconOnly) => {
if (size === 'small') {
if (size === 'sm') {
if (iconOnly) {

@@ -45,5 +45,5 @@ return 'py-1 ps-1 pe-1';

const Chip = (_a) => {
var { children, isActive, size = 'medium', iconLeft, iconRight, iconOnly, isStroke } = _a, rest = __rest(_a, ["children", "isActive", "size", "iconLeft", "iconRight", "iconOnly", "isStroke"]);
var { children, isActive, size = 'md', iconLeft, iconRight, iconOnly, isStroke } = _a, rest = __rest(_a, ["children", "isActive", "size", "iconLeft", "iconRight", "iconOnly", "isStroke"]);
return (react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement("button", Object.assign({ className: classnames_1.default('z-0 overflow-hidden flex flex-row items-center text-sm relative rounded-moon-i-sm cursor-pointer ease-in-out duration-75', iconOnly ? 'center' : 'space-between', size == 'small' ? 'h-8 gap-1' : 'h-10 gap-2', determinePadding(size, iconLeft, iconRight, iconOnly), isActive ? 'bg-piccolo/[.12] text-piccolo' : 'bg-gohan text-bulma', isStroke && 'hover:shadow-interactive', isActive && isStroke && 'shadow-interactive', 'hover:bg-piccolo/[.12] hover:text-piccolo') }, rest),
react_1.default.createElement("button", Object.assign({ className: classnames_1.default('z-0 overflow-hidden flex flex-row items-center text-sm relative rounded-moon-i-sm cursor-pointer ease-in-out duration-75', iconOnly ? 'center' : 'space-between', size == 'sm' ? 'h-8 gap-1' : 'h-10 gap-2', determinePadding(size, iconLeft, iconRight, iconOnly), isActive ? 'bg-piccolo/[.12] text-piccolo' : 'bg-gohan text-bulma', isStroke && 'hover:shadow-interactive', isActive && isStroke && 'shadow-interactive', 'hover:bg-piccolo/[.12] hover:text-piccolo') }, rest),
iconLeft,

@@ -50,0 +50,0 @@ children,

import React from 'react';
import Size from '../private/enums/Size';
declare type ButtonSizes = Size.XSMALL | Size.SMALL | Size.MEDIUM | Size.LARGE | Size.XLARGE;
declare type ButtonSizes = Size.XS | Size.SM | Size.MD | Size.LG | Size.XL;
declare type ButtonVariants = 'primary' | 'secondary' | 'tertiary' | 'ghost';

@@ -9,3 +9,3 @@ declare type ButtonIcons = 'left' | 'right' | 'only';

variant?: ButtonVariants;
size?: ButtonSizes | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
size?: ButtonSizes | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
icon?: ButtonIcons;

@@ -12,0 +12,0 @@ animation?: ButtonAnimations;

@@ -18,6 +18,6 @@ var __rest = (this && this.__rest) || function (s, e) {

const Button = (_a) => {
var { children, variant = 'primary', size = Size.MEDIUM, 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 = 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"]);
const [isHover, setIsHover] = useState(false);
const hasAnimationContent = animation === 'progress' || animation === 'success';
const setIconSize = size === Size.XSMALL ? 16 : iconSize;
const setIconSize = size === 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),

@@ -24,0 +24,0 @@ hasAnimationContent ? (React.createElement(AnimationContent, { iconLeft: iconLeft, children: children, iconRight: iconRight, iconOnly: iconOnly, animation: animation, variant: variant })) : (React.createElement(React.Fragment, null,

@@ -6,3 +6,3 @@ import React from 'react';

React.createElement("div", { className: "flex absolute top-1/2 left-1/2 translate-y-[-50%] translate-x-[-50%] content-center justify-center" },
animation === 'progress' && (React.createElement(Loader, { color: "currentColor", size: "xsmall" })),
animation === 'progress' && React.createElement(Loader, { color: "currentColor", size: "xs" }),
animation === 'success' && React.createElement(GenericCheckAlternative, { fontSize: "1.5rem" })),

@@ -9,0 +9,0 @@ React.createElement("div", { className: "opacity-0" },

@@ -9,15 +9,15 @@ import Size from '../../../private/enums/Size';

const buttonSizes = ({ size, icon, iconLeft, iconRight, iconOnly, }) => {
if (size === Size.XSMALL) {
if (size === Size.XS) {
return classNames(xSmallPadding({ icon, iconLeft, iconRight, iconOnly }), 'gap-1 text-xs rounded-moon-i-xs');
}
if (size === Size.SMALL) {
if (size === Size.SM) {
return classNames(smallPadding({ icon, iconLeft, iconRight, iconOnly }), 'gap-1 text-sm rounded-moon-i-sm');
}
if (size === Size.MEDIUM) {
if (size === Size.MD) {
return classNames(mediumPadding({ icon, iconLeft, iconRight, iconOnly }), 'gap-2 text-sm rounded-moon-i-sm');
}
if (size === Size.LARGE) {
if (size === Size.LG) {
return classNames(largePadding({ icon, iconLeft, iconRight, iconOnly }), 'gap-2 text-base rounded-moon-i-sm');
}
if (size === Size.XLARGE) {
if (size === Size.XL) {
return classNames(xLargePadding({ icon, iconLeft, iconRight, iconOnly }), 'gap-2 text-base rounded-moon-i-md');

@@ -24,0 +24,0 @@ }

import type { ButtonProps } from '../../Button';
declare const xSmallPadding: ({ icon, iconLeft, iconRight, iconOnly, }: ButtonProps) => "p-1" | "p-1 pr-2" | "p-1 pl-2" | "py-1 px-2";
declare const xSmallPadding: ({ icon, iconLeft, iconRight, iconOnly, }: ButtonProps) => "p-1 pl-2" | "p-1" | "p-1 pr-2" | "py-1 px-2";
export default xSmallPadding;
//# sourceMappingURL=xSmallPadding.d.ts.map

@@ -15,3 +15,3 @@ var __rest = (this && this.__rest) || function (s, e) {

const determinePadding = (size, iconLeft, iconRight, iconOnly) => {
if (size === 'small') {
if (size === 'sm') {
if (iconOnly) {

@@ -40,5 +40,5 @@ return 'py-1 ps-1 pe-1';

const Chip = (_a) => {
var { children, isActive, size = 'medium', iconLeft, iconRight, iconOnly, isStroke } = _a, rest = __rest(_a, ["children", "isActive", "size", "iconLeft", "iconRight", "iconOnly", "isStroke"]);
var { children, isActive, size = 'md', iconLeft, iconRight, iconOnly, isStroke } = _a, rest = __rest(_a, ["children", "isActive", "size", "iconLeft", "iconRight", "iconOnly", "isStroke"]);
return (React.createElement(React.Fragment, null,
React.createElement("button", Object.assign({ className: classNames('z-0 overflow-hidden flex flex-row items-center text-sm relative rounded-moon-i-sm cursor-pointer ease-in-out duration-75', iconOnly ? 'center' : 'space-between', size == 'small' ? 'h-8 gap-1' : 'h-10 gap-2', determinePadding(size, iconLeft, iconRight, iconOnly), isActive ? 'bg-piccolo/[.12] text-piccolo' : 'bg-gohan text-bulma', isStroke && 'hover:shadow-interactive', isActive && isStroke && 'shadow-interactive', 'hover:bg-piccolo/[.12] hover:text-piccolo') }, rest),
React.createElement("button", Object.assign({ className: classNames('z-0 overflow-hidden flex flex-row items-center text-sm relative rounded-moon-i-sm cursor-pointer ease-in-out duration-75', iconOnly ? 'center' : 'space-between', size == 'sm' ? 'h-8 gap-1' : 'h-10 gap-2', determinePadding(size, iconLeft, iconRight, iconOnly), isActive ? 'bg-piccolo/[.12] text-piccolo' : 'bg-gohan text-bulma', isStroke && 'hover:shadow-interactive', isActive && isStroke && 'shadow-interactive', 'hover:bg-piccolo/[.12] hover:text-piccolo') }, rest),
iconLeft,

@@ -45,0 +45,0 @@ children,

/**
* @file Automatically generated by barrelsby.
*/
export { default as Accordion } from './accordion/Accordion';
export * from './accordion/Accordion';
export { default as Button } from './button/Button';

@@ -5,0 +7,0 @@ export * from './button/Button';

/**
* @file Automatically generated by barrelsby.
*/
export { default as Accordion } from './accordion/Accordion';
export * from './accordion/Accordion';
export { default as Button } from './button/Button';

@@ -5,0 +7,0 @@ export * from './button/Button';

import React from 'react';
export declare type Size = 'twoxsmall' | 'xsmall' | 'small' | 'medium' | 'large';
export declare type Size = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
export declare type LoaderProps = {

@@ -4,0 +4,0 @@ color?: string;

@@ -5,11 +5,11 @@ import React from 'react';

switch (size) {
case 'twoxsmall':
case '2xs':
return 'w-4 h-4';
case 'xsmall':
case 'xs':
return 'w-6 h-6';
case 'small':
case 'sm':
return 'w-8 h-8';
case 'medium':
case 'md':
return 'w-10 h-10';
case 'large':
case 'lg':
return 'w-12 h-12';

@@ -22,8 +22,8 @@ default:

switch (size) {
case 'twoxsmall':
case 'xsmall':
case 'small':
case '2xs':
case 'xs':
case 'sm':
return 'border-2 border-solid';
case 'medium':
case 'large':
case 'md':
case 'lg':
return 'border-4 border-solid';

@@ -34,3 +34,3 @@ default:

};
const Loader = ({ color = 'border-hit', size = 'medium', }) => (React.createElement("div", { className: classNames(loaderSize(size), 'relative rounded-full') },
const Loader = ({ color = 'border-hit', size = 'md', }) => (React.createElement("div", { className: classNames(loaderSize(size), 'relative rounded-full') },
React.createElement("div", { className: classNames(loaderDivBorder(size), color, 'block absolute w-full h-full rounded-[50%] animate-[rotation_1.2s_cubic-bezier(0.5,0,0.5,1)_infinite] border-r-transparent border-b-transparent border-l-transparent'), style: { animationDelay: '-0.45s' } }),

@@ -37,0 +37,0 @@ React.createElement("div", { className: classNames(loaderDivBorder(size), color, 'block absolute w-full h-full rounded-[50%] animate-[rotation_1.2s_cubic-bezier(0.5,0,0.5,1)_infinite] border-r-transparent border-b-transparent border-l-transparent'), style: { animationDelay: '-0.3s' } }),

declare enum Size {
TWOXSMALL = "2xsmall",
XSMALL = "xsmall",
SMALL = "small",
MEDIUM = "medium",
LARGE = "large",
XLARGE = "xlarge",
TWOXLARGE = "2xlarge"
'3XS' = "3xs",
'2XS' = "2xs",
'XS' = "xs",
'SM' = "sm",
'MD' = "md",
'LG' = "lg",
'XL' = "xl",
'2XL' = "2xl",
'3XL' = "3xl"
}
export default Size;
//# sourceMappingURL=Size.d.ts.map
var Size;
(function (Size) {
Size["TWOXSMALL"] = "2xsmall";
Size["XSMALL"] = "xsmall";
Size["SMALL"] = "small";
Size["MEDIUM"] = "medium";
Size["LARGE"] = "large";
Size["XLARGE"] = "xlarge";
Size["TWOXLARGE"] = "2xlarge";
Size["3XS"] = "3xs";
Size["2XS"] = "2xs";
Size["XS"] = "xs";
Size["SM"] = "sm";
Size["MD"] = "md";
Size["LG"] = "lg";
Size["XL"] = "xl";
Size["2XL"] = "2xl";
Size["3XL"] = "3xl";
})(Size || (Size = {}));
export default Size;
/**
* @file Automatically generated by barrelsby.
*/
export { default as Accordion } from './accordion/Accordion';
export * from './accordion/Accordion';
export { default as Button } from './button/Button';

@@ -5,0 +7,0 @@ export * from './button/Button';

@@ -19,3 +19,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Loader = exports.Chip = exports.Checkbox = exports.Button = void 0;
exports.Loader = exports.Chip = exports.Checkbox = exports.Button = exports.Accordion = void 0;
var Accordion_1 = require("./accordion/Accordion");
Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return __importDefault(Accordion_1).default; } });
__exportStar(require("./accordion/Accordion"), exports);
var Button_1 = require("./button/Button");

@@ -22,0 +25,0 @@ Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(Button_1).default; } });

import React from 'react';
export declare type Size = 'twoxsmall' | 'xsmall' | 'small' | 'medium' | 'large';
export declare type Size = '2xs' | 'xs' | 'sm' | 'md' | 'lg';
export declare type LoaderProps = {

@@ -4,0 +4,0 @@ color?: string;

@@ -10,11 +10,11 @@ "use strict";

switch (size) {
case 'twoxsmall':
case '2xs':
return 'w-4 h-4';
case 'xsmall':
case 'xs':
return 'w-6 h-6';
case 'small':
case 'sm':
return 'w-8 h-8';
case 'medium':
case 'md':
return 'w-10 h-10';
case 'large':
case 'lg':
return 'w-12 h-12';

@@ -27,8 +27,8 @@ default:

switch (size) {
case 'twoxsmall':
case 'xsmall':
case 'small':
case '2xs':
case 'xs':
case 'sm':
return 'border-2 border-solid';
case 'medium':
case 'large':
case 'md':
case 'lg':
return 'border-4 border-solid';

@@ -39,3 +39,3 @@ default:

};
const Loader = ({ color = 'border-hit', size = 'medium', }) => (react_1.default.createElement("div", { className: classnames_1.default(loaderSize(size), 'relative rounded-full') },
const Loader = ({ color = 'border-hit', size = 'md', }) => (react_1.default.createElement("div", { className: classnames_1.default(loaderSize(size), 'relative rounded-full') },
react_1.default.createElement("div", { className: classnames_1.default(loaderDivBorder(size), color, 'block absolute w-full h-full rounded-[50%] animate-[rotation_1.2s_cubic-bezier(0.5,0,0.5,1)_infinite] border-r-transparent border-b-transparent border-l-transparent'), style: { animationDelay: '-0.45s' } }),

@@ -42,0 +42,0 @@ react_1.default.createElement("div", { className: classnames_1.default(loaderDivBorder(size), color, 'block absolute w-full h-full rounded-[50%] animate-[rotation_1.2s_cubic-bezier(0.5,0,0.5,1)_infinite] border-r-transparent border-b-transparent border-l-transparent'), style: { animationDelay: '-0.3s' } }),

declare enum Size {
TWOXSMALL = "2xsmall",
XSMALL = "xsmall",
SMALL = "small",
MEDIUM = "medium",
LARGE = "large",
XLARGE = "xlarge",
TWOXLARGE = "2xlarge"
'3XS' = "3xs",
'2XS' = "2xs",
'XS' = "xs",
'SM' = "sm",
'MD' = "md",
'LG' = "lg",
'XL' = "xl",
'2XL' = "2xl",
'3XL' = "3xl"
}
export default Size;
//# sourceMappingURL=Size.d.ts.map

@@ -5,10 +5,12 @@ "use strict";

(function (Size) {
Size["TWOXSMALL"] = "2xsmall";
Size["XSMALL"] = "xsmall";
Size["SMALL"] = "small";
Size["MEDIUM"] = "medium";
Size["LARGE"] = "large";
Size["XLARGE"] = "xlarge";
Size["TWOXLARGE"] = "2xlarge";
Size["3XS"] = "3xs";
Size["2XS"] = "2xs";
Size["XS"] = "xs";
Size["SM"] = "sm";
Size["MD"] = "md";
Size["LG"] = "lg";
Size["XL"] = "xl";
Size["2XL"] = "2xl";
Size["3XL"] = "3xl";
})(Size || (Size = {}));
exports.default = Size;
{
"name": "@heathmont/moon-core-tw",
"sideEffects": false,
"version": "9.0.1",
"version": "9.0.2",
"files": [

@@ -6,0 +6,0 @@ "lib"

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc