Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@heathmont/moon-core-tw

Package Overview
Dependencies
Maintainers
100
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heathmont/moon-core-tw - npm Package Compare versions

Comparing version 9.2.1 to 9.2.2

2

lib/accordion/Accordion.d.ts
/// <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, size, backgroundColor }: AccordionProps) => JSX.Element;
export default Accordion;
//# sourceMappingURL=Accordion.d.ts.map

@@ -32,3 +32,4 @@ "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, size = 'md', backgroundColor = 'gohan' }) => {
const backgroundColorClass = `bg-${backgroundColor}`;
const [isOpen, setIsOpen] = react_1.useState(openByDefault);

@@ -40,7 +41,7 @@ function handleState() {

}
return (react_1.default.createElement("div", { className: classnames_1.default('w-full rounded-moon-s-sm h-max flex flex-col items-center', isContentInside ? 'bg-gohan' : 'transparent', setPadding_1.default(isContentInside, size)) },
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 },
return (react_1.default.createElement("div", { className: classnames_1.default('w-full rounded-moon-s-sm h-max flex flex-col items-center', isContentInside ? backgroundColorClass : 'transparent', setPadding_1.default(isContentInside, size)) },
react_1.default.createElement("div", { className: classnames_1.default(backgroundColorClass + ' w-full flex items-center relative gap-1', disableOpen ? 'cursor-not-allowed' : 'cursor-pointer', isContentInside ? backgroundColorClass : '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 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') },
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 ' + backgroundColorClass, 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)) })))),

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

@@ -12,4 +12,6 @@ /// <reference types="react" />

isContentInside?: boolean;
isRtl?: boolean;
backgroundColor?: string;
};
export default AccordionProps;
//# sourceMappingURL=AccordionProps.d.ts.map
/// <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, size, backgroundColor }: AccordionProps) => JSX.Element;
export default Accordion;
//# sourceMappingURL=Accordion.d.ts.map

@@ -8,3 +8,4 @@ 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, size = 'md', backgroundColor = 'gohan' }) => {
const backgroundColorClass = `bg-${backgroundColor}`;
const [isOpen, setIsOpen] = useState(openByDefault);

@@ -16,7 +17,7 @@ function handleState() {

}
return (React.createElement("div", { className: classNames('w-full rounded-moon-s-sm h-max flex flex-col items-center', isContentInside ? 'bg-gohan' : 'transparent', setPadding(isContentInside, size)) },
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 },
return (React.createElement("div", { className: classNames('w-full rounded-moon-s-sm h-max flex flex-col items-center', isContentInside ? backgroundColorClass : 'transparent', setPadding(isContentInside, size)) },
React.createElement("div", { className: classNames(backgroundColorClass + ' w-full flex items-center relative gap-1', disableOpen ? 'cursor-not-allowed' : 'cursor-pointer', isContentInside ? backgroundColorClass : 'transparent rounded-moon-s-sm', isContentInside ? '' : setPadding(true, size)), onClick: handleState },
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') },
withButton && (React.createElement("button", { type: "button", disabled: disableOpen, className: classNames('align-middle text-[0.5rem] leading-none no-underline text-trunks border-transparent ' + backgroundColorClass, disableOpen ? 'cursor-not-allowed' : 'cursor-pointer') },
React.createElement(ControlsChevronRight, { className: classNames('text-trunks text-moon-24 transition-transform transition-200', setOpenIcon(isOpen)) })))),

@@ -23,0 +24,0 @@ React.createElement("div", { className: classNames('overflow-hidden w-full text-bulma', isOpen ? 'h-full' : 'h-0', isOpen && setMargin(size)) }, children)));

@@ -12,4 +12,6 @@ /// <reference types="react" />

isContentInside?: boolean;
isRtl?: boolean;
backgroundColor?: string;
};
export default AccordionProps;
//# sourceMappingURL=AccordionProps.d.ts.map
{
"name": "@heathmont/moon-core-tw",
"sideEffects": false,
"version": "9.2.1",
"version": "9.2.2",
"files": [

@@ -15,3 +15,3 @@ "lib"

"dependencies": {
"@heathmont/moon-icons-tw": "^9.2.1"
"@heathmont/moon-icons-tw": "^9.2.2"
},

@@ -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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc