@majoo-ui/react 1.60.2-rc.5 → 1.60.2-rc.6

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.
@@ -25,11 +25,11 @@ interface AccordionTriggerProps extends AccordionTriggerPrimitiveProps, BaseRadi
25
25
  * Specify the arrow icon color.
26
26
  */
27
27
  arrowColor?: string;
28
- children: React.ReactNode;
29
28
  /**
30
- * If true, then the arrow icon will be bordered
29
+ * Custom the arrow component.
31
30
  */
32
- bordered?: boolean;
31
+ customArrow?: React.ReactNode;
32
+ children: React.ReactNode;
33
33
  }
34
34
  export declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
35
35
  export declare const AccordionItem: React.FC<Omit<AccordionPrimitive.AccordionItemProps, keyof AccordionPrimitive.PrimitiveDivProps> & BaseRadixNoCss>;
package/index.esm.js CHANGED
@@ -21299,6 +21299,9 @@ const StyledTrigger = styled(AccordionPrimitive.Trigger, {
21299
21299
  size: '24px',
21300
21300
  transition: 'transform 175ms cubic-bezier(0.65, 0, 0.35, 1)'
21301
21301
  },
21302
+ '& svg.right': {
21303
+ marginRight: '$spacing-05'
21304
+ },
21302
21305
  '&[data-state="open"]': {
21303
21306
  '& svg.icon-cdf': {
21304
21307
  transform: 'rotate(180deg)'
@@ -21315,50 +21318,30 @@ const StyledTrigger = styled(AccordionPrimitive.Trigger, {
21315
21318
  }
21316
21319
  }
21317
21320
  });
21318
- const ArrowContainer = styled(Box, {
21319
- marginRight: '$spacing-05',
21320
- variants: {
21321
- bordered: {
21322
- true: {
21323
- height: '26px',
21324
- border: '1px solid $bgBorder',
21325
- borderRadius: '50%'
21326
- }
21327
- }
21328
- }
21329
- });
21330
21321
  const AccordionTrigger = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
21331
21322
  var {
21332
21323
  children,
21333
21324
  arrowPosition = 'right',
21334
21325
  hasContent = true,
21335
21326
  arrowColor = 'white',
21336
- bordered
21327
+ customArrow
21337
21328
  } = _a,
21338
- props = __rest(_a, ["children", "arrowPosition", "hasContent", "arrowColor", "bordered"]);
21329
+ props = __rest(_a, ["children", "arrowPosition", "hasContent", "arrowColor", "customArrow"]);
21339
21330
  return jsx(StyledHeader, {
21340
21331
  children: jsx(StyledTrigger, Object.assign({}, props, {
21341
21332
  arrowPosition: arrowPosition,
21342
21333
  ref: forwardedRef
21343
21334
  }, {
21344
21335
  children: arrowPosition === 'right' ? jsxs(Fragment, {
21345
- children: [children, hasContent && jsx(ArrowContainer, Object.assign({
21346
- bordered: bordered
21347
- }, {
21348
- children: jsx(ChevronDownOutline, {
21349
- className: "icon-cdf right",
21350
- color: arrowColor
21351
- }, void 0)
21352
- }), void 0)]
21336
+ children: [children, hasContent && (customArrow || jsx(ChevronDownOutline, {
21337
+ className: "icon-cdf right",
21338
+ color: arrowColor
21339
+ }, void 0))]
21353
21340
  }, void 0) : jsxs(Fragment, {
21354
- children: [hasContent && jsx(ArrowContainer, Object.assign({
21355
- bordered: bordered
21356
- }, {
21357
- children: jsx(ChevronDownOutline, {
21358
- className: "icon-cdf right",
21359
- color: arrowColor
21360
- }, void 0)
21361
- }), void 0), children]
21341
+ children: [hasContent && (customArrow || jsx(ChevronDownOutline, {
21342
+ className: "icon-cdf right",
21343
+ color: arrowColor
21344
+ }, void 0)), children]
21362
21345
  }, void 0)
21363
21346
  }), void 0)
21364
21347
  }, void 0);
package/index.umd.js CHANGED
@@ -21628,6 +21628,9 @@
21628
21628
  size: '24px',
21629
21629
  transition: 'transform 175ms cubic-bezier(0.65, 0, 0.35, 1)'
21630
21630
  },
21631
+ '& svg.right': {
21632
+ marginRight: '$spacing-05'
21633
+ },
21631
21634
  '&[data-state="open"]': {
21632
21635
  '& svg.icon-cdf': {
21633
21636
  transform: 'rotate(180deg)'
@@ -21644,18 +21647,6 @@
21644
21647
  }
21645
21648
  }
21646
21649
  });
21647
- var ArrowContainer = styled(Box, {
21648
- marginRight: '$spacing-05',
21649
- variants: {
21650
- bordered: {
21651
- true: {
21652
- height: '26px',
21653
- border: '1px solid $bgBorder',
21654
- borderRadius: '50%'
21655
- }
21656
- }
21657
- }
21658
- });
21659
21650
  var AccordionTrigger = /*#__PURE__*/React__namespace.forwardRef(function (_a, forwardedRef) {
21660
21651
  var children = _a.children,
21661
21652
  _b = _a.arrowPosition,
@@ -21664,31 +21655,23 @@
21664
21655
  hasContent = _c === void 0 ? true : _c,
21665
21656
  _d = _a.arrowColor,
21666
21657
  arrowColor = _d === void 0 ? 'white' : _d,
21667
- bordered = _a.bordered,
21668
- props = __rest(_a, ["children", "arrowPosition", "hasContent", "arrowColor", "bordered"]);
21658
+ customArrow = _a.customArrow,
21659
+ props = __rest(_a, ["children", "arrowPosition", "hasContent", "arrowColor", "customArrow"]);
21669
21660
  return jsxRuntime.jsx(StyledHeader, {
21670
21661
  children: jsxRuntime.jsx(StyledTrigger, __assign({}, props, {
21671
21662
  arrowPosition: arrowPosition,
21672
21663
  ref: forwardedRef
21673
21664
  }, {
21674
21665
  children: arrowPosition === 'right' ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
21675
- children: [children, hasContent && jsxRuntime.jsx(ArrowContainer, __assign({
21676
- bordered: bordered
21677
- }, {
21678
- children: jsxRuntime.jsx(icons.ChevronDownOutline, {
21679
- className: "icon-cdf right",
21680
- color: arrowColor
21681
- }, void 0)
21682
- }), void 0)]
21666
+ children: [children, hasContent && (customArrow || jsxRuntime.jsx(icons.ChevronDownOutline, {
21667
+ className: "icon-cdf right",
21668
+ color: arrowColor
21669
+ }, void 0))]
21683
21670
  }, void 0) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
21684
- children: [hasContent && jsxRuntime.jsx(ArrowContainer, __assign({
21685
- bordered: bordered
21686
- }, {
21687
- children: jsxRuntime.jsx(icons.ChevronDownOutline, {
21688
- className: "icon-cdf right",
21689
- color: arrowColor
21690
- }, void 0)
21691
- }), void 0), children]
21671
+ children: [hasContent && (customArrow || jsxRuntime.jsx(icons.ChevronDownOutline, {
21672
+ className: "icon-cdf right",
21673
+ color: arrowColor
21674
+ }, void 0)), children]
21692
21675
  }, void 0)
21693
21676
  }), void 0)
21694
21677
  }, void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.60.2-rc.5",
3
+ "version": "1.60.2-rc.6",
4
4
  "dependencies": {
5
5
  "@majoo-ui/core": "^1.31.3",
6
6
  "@majoo-ui/helpers": "^1.30.5",