@majoo-ui/react 1.60.2-rc.4 → 1.60.2-rc.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.
@@ -26,6 +26,10 @@ interface AccordionTriggerProps extends AccordionTriggerPrimitiveProps, BaseRadi
26
26
  */
27
27
  arrowColor?: string;
28
28
  children: React.ReactNode;
29
+ /**
30
+ * If true, then the arrow icon will be bordered
31
+ */
32
+ bordered?: boolean;
29
33
  }
30
34
  export declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
31
35
  export declare const AccordionItem: React.FC<Omit<AccordionPrimitive.AccordionItemProps, keyof AccordionPrimitive.PrimitiveDivProps> & BaseRadixNoCss>;
package/index.esm.js CHANGED
@@ -21299,9 +21299,6 @@ 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
- },
21305
21302
  '&[data-state="open"]': {
21306
21303
  '& svg.icon-cdf': {
21307
21304
  transform: 'rotate(180deg)'
@@ -21318,29 +21315,50 @@ const StyledTrigger = styled(AccordionPrimitive.Trigger, {
21318
21315
  }
21319
21316
  }
21320
21317
  });
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
+ });
21321
21330
  const AccordionTrigger = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
21322
21331
  var {
21323
21332
  children,
21324
21333
  arrowPosition = 'right',
21325
21334
  hasContent = true,
21326
- arrowColor = 'white'
21335
+ arrowColor = 'white',
21336
+ bordered
21327
21337
  } = _a,
21328
- props = __rest(_a, ["children", "arrowPosition", "hasContent", "arrowColor"]);
21338
+ props = __rest(_a, ["children", "arrowPosition", "hasContent", "arrowColor", "bordered"]);
21329
21339
  return jsx(StyledHeader, {
21330
21340
  children: jsx(StyledTrigger, Object.assign({}, props, {
21331
21341
  arrowPosition: arrowPosition,
21332
21342
  ref: forwardedRef
21333
21343
  }, {
21334
21344
  children: arrowPosition === 'right' ? jsxs(Fragment, {
21335
- children: [children, hasContent && jsx(ChevronDownOutline, {
21336
- className: "icon-cdf right",
21337
- color: arrowColor
21338
- }, void 0)]
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)]
21339
21353
  }, void 0) : jsxs(Fragment, {
21340
- children: [hasContent && jsx(ChevronDownOutline, {
21341
- className: "icon-cdf left",
21342
- color: arrowColor
21343
- }, void 0), children]
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]
21344
21362
  }, void 0)
21345
21363
  }), void 0)
21346
21364
  }, void 0);
package/index.umd.js CHANGED
@@ -21628,9 +21628,6 @@
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
- },
21634
21631
  '&[data-state="open"]': {
21635
21632
  '& svg.icon-cdf': {
21636
21633
  transform: 'rotate(180deg)'
@@ -21647,6 +21644,18 @@
21647
21644
  }
21648
21645
  }
21649
21646
  });
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
+ });
21650
21659
  var AccordionTrigger = /*#__PURE__*/React__namespace.forwardRef(function (_a, forwardedRef) {
21651
21660
  var children = _a.children,
21652
21661
  _b = _a.arrowPosition,
@@ -21655,22 +21664,31 @@
21655
21664
  hasContent = _c === void 0 ? true : _c,
21656
21665
  _d = _a.arrowColor,
21657
21666
  arrowColor = _d === void 0 ? 'white' : _d,
21658
- props = __rest(_a, ["children", "arrowPosition", "hasContent", "arrowColor"]);
21667
+ bordered = _a.bordered,
21668
+ props = __rest(_a, ["children", "arrowPosition", "hasContent", "arrowColor", "bordered"]);
21659
21669
  return jsxRuntime.jsx(StyledHeader, {
21660
21670
  children: jsxRuntime.jsx(StyledTrigger, __assign({}, props, {
21661
21671
  arrowPosition: arrowPosition,
21662
21672
  ref: forwardedRef
21663
21673
  }, {
21664
21674
  children: arrowPosition === 'right' ? jsxRuntime.jsxs(jsxRuntime.Fragment, {
21665
- children: [children, hasContent && jsxRuntime.jsx(icons.ChevronDownOutline, {
21666
- className: "icon-cdf right",
21667
- color: arrowColor
21668
- }, void 0)]
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)]
21669
21683
  }, void 0) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
21670
- children: [hasContent && jsxRuntime.jsx(icons.ChevronDownOutline, {
21671
- className: "icon-cdf left",
21672
- color: arrowColor
21673
- }, void 0), children]
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]
21674
21692
  }, void 0)
21675
21693
  }), void 0)
21676
21694
  }, void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majoo-ui/react",
3
- "version": "1.60.2-rc.4",
3
+ "version": "1.60.2-rc.5",
4
4
  "dependencies": {
5
5
  "@majoo-ui/core": "^1.31.3",
6
6
  "@majoo-ui/helpers": "^1.30.5",