elseware-ui 2.13.3 → 2.13.5

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.
@@ -2,10 +2,10 @@ import { ReactNode } from "react";
2
2
  export interface AccordionProps {
3
3
  summary?: ReactNode | string;
4
4
  children?: ReactNode;
5
- expandIcon?: ReactNode;
6
- collapseIcon?: ReactNode;
5
+ lhsActions?: ReactNode;
6
+ rhsActions?: ReactNode;
7
7
  defaultCollapse?: boolean;
8
8
  toggleOnSummaryClick?: boolean;
9
9
  }
10
- declare function Accordion({ summary, expandIcon, collapseIcon, children, defaultCollapse, toggleOnSummaryClick, }: AccordionProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function Accordion({ summary, children, lhsActions, rhsActions, defaultCollapse, toggleOnSummaryClick, }: AccordionProps): import("react/jsx-runtime").JSX.Element;
11
11
  export default Accordion;
package/build/index.es.js CHANGED
@@ -111594,26 +111594,18 @@ function UnderConstructionBanner(_a) {
111594
111594
  // THIS FILE IS AUTO GENERATED
111595
111595
  function FaCircleChevronDown (props) {
111596
111596
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"}}]})(props);
111597
- }function FaCircleChevronUp (props) {
111598
- return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM377 271c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-87-87-87 87c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 167c9.4-9.4 24.6-9.4 33.9 0L377 271z"}}]})(props);
111599
111597
  }
111600
111598
 
111601
111599
  function Accordion(_a) {
111602
- var _b = _a.summary, summary = _b === void 0 ? "Accordion" : _b, _c = _a.expandIcon, expandIcon = _c === void 0 ? jsx(FaCircleChevronDown, {}) : _c, _d = _a.collapseIcon, collapseIcon = _d === void 0 ? jsx(FaCircleChevronUp, {}) : _d, children = _a.children, _e = _a.defaultCollapse, defaultCollapse = _e === void 0 ? false : _e, _f = _a.toggleOnSummaryClick, toggleOnSummaryClick = _f === void 0 ? false : _f;
111603
- var _g = useState(defaultCollapse), collapse = _g[0], setCollapse = _g[1];
111604
- var handleOpen = function () {
111605
- !toggleOnSummaryClick && setCollapse(true);
111606
- };
111607
- var handleClose = function () {
111608
- !toggleOnSummaryClick && setCollapse(false);
111609
- };
111600
+ var _b = _a.summary, summary = _b === void 0 ? "Accordion" : _b, children = _a.children, lhsActions = _a.lhsActions, rhsActions = _a.rhsActions, _c = _a.defaultCollapse, defaultCollapse = _c === void 0 ? false : _c, _d = _a.toggleOnSummaryClick, toggleOnSummaryClick = _d === void 0 ? false : _d;
111601
+ var _e = useState(defaultCollapse), collapse = _e[0], setCollapse = _e[1];
111610
111602
  var handleToggle = function () {
111611
111603
  setCollapse(function (prev) { return !prev; });
111612
111604
  };
111613
111605
  return (jsxs("div", __assign$1({ className: "border border-eui-dark-400/80 text-gray-500" }, { children: [jsx("div", { children: jsxs("div", __assign$1({ className: classnames({
111614
- "select-none inline-flex gap-3 items-center justify-center p-3 w-full eui-gradient-to-r-general-xs": true,
111606
+ "inline-flex gap-3 items-center px-3 py-2 w-full eui-gradient-to-r-general-xs": true,
111615
111607
  "hover:cursor-pointer": toggleOnSummaryClick,
111616
- }), onClick: toggleOnSummaryClick ? handleToggle : undefined }, { children: [jsx("div", __assign$1({ className: "eui-text-md w-full" }, { children: summary })), jsx("div", { children: collapse ? (jsx("div", __assign$1({ onClick: handleClose, className: "text-xl hover:cursor-pointer" }, { children: collapseIcon }))) : (jsx("div", __assign$1({ onClick: handleOpen, className: "text-xl hover:cursor-pointer" }, { children: expandIcon }))) })] })) }), jsx(ze$1, __assign$1({ show: collapse, enter: "transition duration-100 ease-out", enterFrom: "transform scale-95 opacity-0", enterTo: "transform scale-100 opacity-100", leave: "transition duration-75 ease-out", leaveFrom: "transform scale-100 opacity-100", leaveTo: "transform scale-95 opacity-0", as: Fragment$3 }, { children: jsx("div", __assign$1({ className: "p-5 border-t border-t-eui-dark-400/40 eui-text-sm" }, { children: children })) }))] })));
111608
+ }), onClick: toggleOnSummaryClick ? handleToggle : undefined }, { children: [jsxs("div", __assign$1({ className: "inline-flex gap-3 items-center w-full" }, { children: [lhsActions && (jsx("div", __assign$1({ onClick: function (e) { return e.stopPropagation(); } }, { children: lhsActions }))), jsx("div", __assign$1({ className: "eui-text-md w-full" }, { children: summary }))] })), jsx("div", __assign$1({ onClick: toggleOnSummaryClick ? undefined : handleToggle, className: "hover:cursor-pointer" }, { children: jsx(FaCircleChevronDown, { className: classnames("text-xl transition-transform duration-300", { "rotate-180": collapse }) }) })), rhsActions && (jsx("div", __assign$1({ onClick: function (e) { return e.stopPropagation(); } }, { children: rhsActions })))] })) }), jsx(ze$1, __assign$1({ show: collapse, enter: "transition duration-100 ease-out", enterFrom: "transform scale-95 opacity-0", enterTo: "transform scale-100 opacity-100", leave: "transition duration-75 ease-out", leaveFrom: "transform scale-100 opacity-100", leaveTo: "transform scale-95 opacity-0", as: Fragment$3 }, { children: jsx("div", __assign$1({ className: "p-5 border-t border-t-eui-dark-400/40 eui-text-sm" }, { children: children })) }))] })));
111617
111609
  }
111618
111610
 
111619
111611
  function Card(_a) {
package/build/index.js CHANGED
@@ -111621,26 +111621,18 @@ function UnderConstructionBanner(_a) {
111621
111621
  // THIS FILE IS AUTO GENERATED
111622
111622
  function FaCircleChevronDown (props) {
111623
111623
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"}}]})(props);
111624
- }function FaCircleChevronUp (props) {
111625
- return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM377 271c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-87-87-87 87c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 167c9.4-9.4 24.6-9.4 33.9 0L377 271z"}}]})(props);
111626
111624
  }
111627
111625
 
111628
111626
  function Accordion(_a) {
111629
- var _b = _a.summary, summary = _b === void 0 ? "Accordion" : _b, _c = _a.expandIcon, expandIcon = _c === void 0 ? jsxRuntime.jsx(FaCircleChevronDown, {}) : _c, _d = _a.collapseIcon, collapseIcon = _d === void 0 ? jsxRuntime.jsx(FaCircleChevronUp, {}) : _d, children = _a.children, _e = _a.defaultCollapse, defaultCollapse = _e === void 0 ? false : _e, _f = _a.toggleOnSummaryClick, toggleOnSummaryClick = _f === void 0 ? false : _f;
111630
- var _g = React.useState(defaultCollapse), collapse = _g[0], setCollapse = _g[1];
111631
- var handleOpen = function () {
111632
- !toggleOnSummaryClick && setCollapse(true);
111633
- };
111634
- var handleClose = function () {
111635
- !toggleOnSummaryClick && setCollapse(false);
111636
- };
111627
+ var _b = _a.summary, summary = _b === void 0 ? "Accordion" : _b, children = _a.children, lhsActions = _a.lhsActions, rhsActions = _a.rhsActions, _c = _a.defaultCollapse, defaultCollapse = _c === void 0 ? false : _c, _d = _a.toggleOnSummaryClick, toggleOnSummaryClick = _d === void 0 ? false : _d;
111628
+ var _e = React.useState(defaultCollapse), collapse = _e[0], setCollapse = _e[1];
111637
111629
  var handleToggle = function () {
111638
111630
  setCollapse(function (prev) { return !prev; });
111639
111631
  };
111640
111632
  return (jsxRuntime.jsxs("div", __assign$1({ className: "border border-eui-dark-400/80 text-gray-500" }, { children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("div", __assign$1({ className: classnames({
111641
- "select-none inline-flex gap-3 items-center justify-center p-3 w-full eui-gradient-to-r-general-xs": true,
111633
+ "inline-flex gap-3 items-center px-3 py-2 w-full eui-gradient-to-r-general-xs": true,
111642
111634
  "hover:cursor-pointer": toggleOnSummaryClick,
111643
- }), onClick: toggleOnSummaryClick ? handleToggle : undefined }, { children: [jsxRuntime.jsx("div", __assign$1({ className: "eui-text-md w-full" }, { children: summary })), jsxRuntime.jsx("div", { children: collapse ? (jsxRuntime.jsx("div", __assign$1({ onClick: handleClose, className: "text-xl hover:cursor-pointer" }, { children: collapseIcon }))) : (jsxRuntime.jsx("div", __assign$1({ onClick: handleOpen, className: "text-xl hover:cursor-pointer" }, { children: expandIcon }))) })] })) }), jsxRuntime.jsx(ze$1, __assign$1({ show: collapse, enter: "transition duration-100 ease-out", enterFrom: "transform scale-95 opacity-0", enterTo: "transform scale-100 opacity-100", leave: "transition duration-75 ease-out", leaveFrom: "transform scale-100 opacity-100", leaveTo: "transform scale-95 opacity-0", as: React.Fragment }, { children: jsxRuntime.jsx("div", __assign$1({ className: "p-5 border-t border-t-eui-dark-400/40 eui-text-sm" }, { children: children })) }))] })));
111635
+ }), onClick: toggleOnSummaryClick ? handleToggle : undefined }, { children: [jsxRuntime.jsxs("div", __assign$1({ className: "inline-flex gap-3 items-center w-full" }, { children: [lhsActions && (jsxRuntime.jsx("div", __assign$1({ onClick: function (e) { return e.stopPropagation(); } }, { children: lhsActions }))), jsxRuntime.jsx("div", __assign$1({ className: "eui-text-md w-full" }, { children: summary }))] })), jsxRuntime.jsx("div", __assign$1({ onClick: toggleOnSummaryClick ? undefined : handleToggle, className: "hover:cursor-pointer" }, { children: jsxRuntime.jsx(FaCircleChevronDown, { className: classnames("text-xl transition-transform duration-300", { "rotate-180": collapse }) }) })), rhsActions && (jsxRuntime.jsx("div", __assign$1({ onClick: function (e) { return e.stopPropagation(); } }, { children: rhsActions })))] })) }), jsxRuntime.jsx(ze$1, __assign$1({ show: collapse, enter: "transition duration-100 ease-out", enterFrom: "transform scale-95 opacity-0", enterTo: "transform scale-100 opacity-100", leave: "transition duration-75 ease-out", leaveFrom: "transform scale-100 opacity-100", leaveTo: "transform scale-95 opacity-0", as: React.Fragment }, { children: jsxRuntime.jsx("div", __assign$1({ className: "p-5 border-t border-t-eui-dark-400/40 eui-text-sm" }, { children: children })) }))] })));
111644
111636
  }
111645
111637
 
111646
111638
  function Card(_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elseware-ui",
3
- "version": "2.13.3",
3
+ "version": "2.13.5",
4
4
  "private": false,
5
5
  "description": "A modern and customizable React UI component library by elseware Technology.",
6
6
  "keywords": [