@strapi/design-system 2.0.0-rc.10 → 2.0.0-rc.11

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.
package/dist/index.mjs CHANGED
@@ -533,38 +533,43 @@ const AccordionRoot = styled(RadixAccordion.Root)`
533
533
  `;
534
534
  const Item$5 = React.forwardRef((props, forwardedRef) => {
535
535
  const { size } = useAccordion("Item");
536
- return /* @__PURE__ */ jsx(AccordionItem, { $size: size, ref: forwardedRef, ...props });
536
+ return /* @__PURE__ */ jsx(AccordionItem, { $size: size, "data-size": size, ref: forwardedRef, ...props });
537
537
  });
538
538
  const AccordionItem = styled(RadixAccordion.Item)`
539
539
  overflow: hidden;
540
+ margin: 1px 0;
540
541
 
541
542
  &:first-child {
542
543
  border-top-left-radius: 0.3rem;
543
544
  border-top-right-radius: 0.3rem;
545
+ margin-top: 0;
544
546
  }
545
547
 
546
548
  &:last-child {
547
549
  border-bottom-left-radius: 0.3rem;
548
550
  border-bottom-right-radius: 0.3rem;
551
+ margin-bottom: 0;
549
552
  }
550
553
 
551
- & + & {
552
- border-top: ${(props) => props.$size === "S" ? `solid 1px ${props.theme.colors.neutral200}` : "unset"};
554
+ &[data-size='S'] {
555
+ & + & {
556
+ border-top: solid 1px ${(props) => props.theme.colors.neutral200};
557
+ }
553
558
  }
554
559
 
555
560
  &[data-state='open'] {
556
- box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
561
+ box-shadow: 0 0 0 1px ${(props) => props.theme.colors.primary600};
557
562
  }
558
563
 
559
- &:hover {
560
- box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
564
+ &:not([data-disabled]):hover {
565
+ box-shadow: 0 0 0 1px ${(props) => props.theme.colors.primary600};
561
566
  }
562
567
 
563
568
  /* This applies our desired focus effect correctly. */
564
569
  &:focus-within {
565
570
  position: relative;
566
571
  z-index: 1;
567
- box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
572
+ box-shadow: 0 0 0 1px ${(props) => props.theme.colors.primary600};
568
573
  }
569
574
 
570
575
  @media (prefers-reduced-motion: no-preference) {
@@ -578,7 +583,7 @@ const Trigger$7 = React.forwardRef(
578
583
  return /* @__PURE__ */ jsxs(AccordionTrigger, { $caretPosition: caretPosition, $size: size, ref: forwardedRef, ...restProps, children: [
579
584
  caretPosition === "left" ? /* @__PURE__ */ jsx(TriggerIcon, { $size: size, children: /* @__PURE__ */ jsx(CaretDown, { width: size === "S" ? "1.2rem" : "1.6rem", height: size === "S" ? "1.2rem" : "1.6rem" }) }) : null,
580
585
  /* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 2, children: [
581
- Icon ? /* @__PURE__ */ jsx(IconBox$4, { children: /* @__PURE__ */ jsx(Icon, {}) }) : null,
586
+ Icon && size === "S" ? /* @__PURE__ */ jsx(IconBox$4, { children: /* @__PURE__ */ jsx(Icon, {}) }) : null,
582
587
  /* @__PURE__ */ jsxs(Flex, { alignItems: "flex-start", direction: "column", tag: "span", ref: forwardedRef, children: [
583
588
  /* @__PURE__ */ jsx(
584
589
  Typography,
@@ -599,6 +604,7 @@ const Trigger$7 = React.forwardRef(
599
604
  );
600
605
  const IconBox$4 = styled(Box)`
601
606
  color: ${(props) => props.theme.colors.neutral500};
607
+ display: flex;
602
608
 
603
609
  @media (prefers-reduced-motion: no-preference) {
604
610
  transition: ${(props) => props.theme.transitions.color};
@@ -2276,8 +2282,8 @@ const Carousel = React.forwardRef(
2276
2282
  position: "relative",
2277
2283
  children: [
2278
2284
  childrenArray && childrenArray.length > 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
2279
- /* @__PURE__ */ jsx(CarouselAction, { tag: "button", onClick: onPrevious, $area: "startAction", ref: prevActionRef, type: "button", children: /* @__PURE__ */ jsx(AccessibleIcon, { label: previousLabel, children: /* @__PURE__ */ jsx(ChevronLeft, { width: "6px", height: "10px", fill: "neutral600" }) }) }),
2280
- /* @__PURE__ */ jsx(CarouselAction, { tag: "button", onClick: onNext, $area: "endAction", ref: nextActionRef, type: "button", children: /* @__PURE__ */ jsx(AccessibleIcon, { label: nextLabel, children: /* @__PURE__ */ jsx(ChevronRight, { width: "6px", height: "10px", fill: "neutral600" }) }) })
2285
+ /* @__PURE__ */ jsx(CarouselAction, { tag: "button", onClick: onPrevious, $area: "startAction", ref: prevActionRef, type: "button", children: /* @__PURE__ */ jsx(AccessibleIcon, { label: previousLabel, children: /* @__PURE__ */ jsx(ChevronLeft, { width: "1.6rem", height: "1.6rem", fill: "neutral600" }) }) }),
2286
+ /* @__PURE__ */ jsx(CarouselAction, { tag: "button", onClick: onNext, $area: "endAction", ref: nextActionRef, type: "button", children: /* @__PURE__ */ jsx(AccessibleIcon, { label: nextLabel, children: /* @__PURE__ */ jsx(ChevronRight, { width: "1.6rem", height: "1.6rem", fill: "neutral600" }) }) })
2281
2287
  ] }),
2282
2288
  /* @__PURE__ */ jsx(CarouselSlides, { "aria-live": "polite", paddingLeft: 2, paddingRight: 2, width: "100%", overflow: "hidden", children: childrenArray }),
2283
2289
  actions
@@ -8279,6 +8285,7 @@ const CarouselActions = ({ horizontal = true, ...props }) => /* @__PURE__ */ jsx
8279
8285
  position: "absolute",
8280
8286
  width: "100%",
8281
8287
  bottom: 1,
8288
+ gap: 1,
8282
8289
  ...props
8283
8290
  }
8284
8291
  );
@@ -9300,8 +9307,8 @@ const SingleSelect = React.forwardRef(
9300
9307
  const SingleSelectOption = React.forwardRef(
9301
9308
  ({ value, startIcon, children, ...restProps }, ref) => {
9302
9309
  return /* @__PURE__ */ jsxs(Item$2, { ref, value: value.toString(), ...restProps, children: [
9303
- startIcon && /* @__PURE__ */ jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }),
9304
- /* @__PURE__ */ jsx(Typography, { lineHeight: "20px", children: /* @__PURE__ */ jsx(ItemText, { children }) })
9310
+ startIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, children: startIcon }),
9311
+ /* @__PURE__ */ jsx(Typography, { lineHeight: "20px", width: "100%", children: /* @__PURE__ */ jsx(ItemText, { children }) })
9305
9312
  ] });
9306
9313
  }
9307
9314
  );