@commercetools/nimbus 0.0.3 → 0.0.4-rc2

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.d.ts CHANGED
@@ -10,8 +10,8 @@ import { AriaLinkOptions } from 'react-aria';
10
10
  import { AriaToggleButtonGroupProps } from 'react-aria';
11
11
  import { AriaToggleButtonProps } from 'react-aria';
12
12
  import { Bleed } from '@chakra-ui/react';
13
- import { CardContentProps } from './card.slots';
14
- import { CardHeaderProps } from './card.slots';
13
+ import { CardContentProps as CardContentProps_2 } from './card.slots';
14
+ import { CardHeaderProps as CardHeaderProps_2 } from './card.slots';
15
15
  import { CardProps as CardProps_2 } from './card.types';
16
16
  import { Code } from '@chakra-ui/react';
17
17
  import { ConditionalValue } from '@chakra-ui/react';
@@ -209,7 +209,7 @@ declare const alertRecipe: SlotRecipeDefinition<"title" | "description" | "icon"
209
209
  tone: {
210
210
  critical: {
211
211
  root: {
212
- colorPalette: "error";
212
+ colorPalette: "critical";
213
213
  };
214
214
  };
215
215
  info: {
@@ -224,7 +224,7 @@ colorPalette: "amber";
224
224
  };
225
225
  positive: {
226
226
  root: {
227
- colorPalette: "success";
227
+ colorPalette: "positive";
228
228
  };
229
229
  };
230
230
  };
@@ -453,7 +453,7 @@ colorPalette: "primary";
453
453
  };
454
454
  critical: {
455
455
  button: {
456
- colorPalette: "error";
456
+ colorPalette: "critical";
457
457
  };
458
458
  };
459
459
  neutral: {
@@ -484,15 +484,31 @@ declare type ButtonRootProps = HTMLChakraProps<"button", ButtonRecipeProps>;
484
484
  export declare const Card: {
485
485
  Root: ForwardRefExoticComponent<CardProps_2 & RefAttributes<HTMLDivElement>>;
486
486
  Header: {
487
- ({ children, ...props }: CardHeaderProps): null;
487
+ ({ children, ...props }: CardHeaderProps_2): null;
488
488
  displayName: string;
489
489
  };
490
490
  Content: {
491
- ({ children, ...props }: CardContentProps): null;
491
+ ({ children, ...props }: CardContentProps_2): null;
492
492
  displayName: string;
493
493
  };
494
494
  };
495
495
 
496
+ export declare const CardContent: {
497
+ ({ children, ...props }: CardContentProps): null;
498
+ displayName: string;
499
+ };
500
+
501
+ declare interface CardContentProps extends HTMLChakraProps<"div", CardRecipeProps> {
502
+ }
503
+
504
+ export declare const CardHeader: {
505
+ ({ children, ...props }: CardHeaderProps): null;
506
+ displayName: string;
507
+ };
508
+
509
+ declare interface CardHeaderProps extends HTMLChakraProps<"div", CardRecipeProps> {
510
+ }
511
+
496
512
  /**
497
513
  * Main props interface for the Card component.
498
514
  * Extends CardVariantProps to include both root props and variant props,
@@ -562,6 +578,8 @@ backgroundColor: "colorPalette.2";
562
578
  declare interface CardRecipeProps extends RecipeProps<"div">, UnstyledProp {
563
579
  }
564
580
 
581
+ export declare const CardRoot: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
582
+
565
583
  /**
566
584
  * Root props interface that extends Chakra's HTML props with our recipe props.
567
585
  * This creates a complete set of props for the root element, combining
@@ -779,7 +797,21 @@ export declare interface FormFieldProps extends FormFieldRootSlotProps {
779
797
  * Recipe configuration for the FormField component.
780
798
  * Defines the styling variants and base styles using Chakra UI's recipe system.
781
799
  */
782
- declare const formFieldRecipe: SlotRecipeDefinition<"error" | "input" | "label" | "description" | "root" | "popover", {
800
+ declare const formFieldRecipe: SlotRecipeDefinition<"input" | "label" | "description" | "root" | "error" | "popover", {
801
+ size: {
802
+ md: {
803
+ root: {
804
+ "--form-field-font-size": "fontSizes.350";
805
+ "--form-field-line-height": "lineHeights.500";
806
+ };
807
+ };
808
+ sm: {
809
+ root: {
810
+ "--form-field-font-size": "fontSizes.300";
811
+ "--form-field-line-height": "lineHeights.450";
812
+ };
813
+ };
814
+ };
783
815
  direction: {
784
816
  column: {
785
817
  root: {
@@ -1294,6 +1326,8 @@ export declare const ToggleButtonGroup: {
1294
1326
  Button: ToggleButtonGroupButtonComponent_2;
1295
1327
  };
1296
1328
 
1329
+ export declare const ToggleButtonGroupButton: ToggleButtonGroupButtonComponent;
1330
+
1297
1331
  /** Type signature for the `ToggleButtonGroup.Button` sub-component (using `forwardRef`). */
1298
1332
  export declare type ToggleButtonGroupButtonComponent = ForwardRefExoticComponent<ToggleButtonGroupButtonProps & RefAttributes<typeof ToggleButton>>;
1299
1333
 
@@ -1306,6 +1340,8 @@ declare type ToggleButtonGroupButtonSlotProps = HTMLChakraProps<"button", Recipe
1306
1340
  /** Final external props for the `<ToggleButtonGroup>` component, including `children`. */
1307
1341
  export declare type ToggleButtonGroupProps = PropsWithChildren<ToggleButtonGroupRootProps>;
1308
1342
 
1343
+ export declare const ToggleButtonGroupRoot: ToggleButtonGroupRootComponent;
1344
+
1309
1345
  /** Type signature for the main `ToggleButtonGroup` component (using `forwardRef`). */
1310
1346
  export declare type ToggleButtonGroupRootComponent = ForwardRefExoticComponent<ToggleButtonGroupProps & RefAttributes<typeof ToggleButtonGroup_2>>;
1311
1347
 
package/dist/index.js CHANGED
@@ -5564,7 +5564,7 @@ const We = $e({
5564
5564
  colorPalette: "primary"
5565
5565
  },
5566
5566
  critical: {
5567
- colorPalette: "error"
5567
+ colorPalette: "critical"
5568
5568
  },
5569
5569
  neutral: {
5570
5570
  colorPalette: "neutral"
@@ -8903,8 +8903,8 @@ const Kp = kp(X.breakpoints), Fp = As({
8903
8903
  layerStyle: "disabled"
8904
8904
  },
8905
8905
  "&[data-invalid='true']": {
8906
- "--border-color": "colors.error.7",
8907
- color: "error.11"
8906
+ "--border-color": "colors.critical.7",
8907
+ color: "critical.11"
8908
8908
  }
8909
8909
  },
8910
8910
  variants: {
@@ -8982,14 +8982,14 @@ const Kp = kp(X.breakpoints), Fp = As({
8982
8982
  inverted: {
8983
8983
  value: "{colors.neutral.9}"
8984
8984
  },
8985
- error: {
8986
- value: "{colors.error.8}"
8985
+ critical: {
8986
+ value: "{colors.critical.8}"
8987
8987
  },
8988
8988
  warning: {
8989
- value: "{colors.danger.8}"
8989
+ value: "{colors.warning.8}"
8990
8990
  },
8991
- success: {
8992
- value: "{colors.success.8}"
8991
+ positive: {
8992
+ value: "{colors.positive.8}"
8993
8993
  },
8994
8994
  info: {
8995
8995
  value: "{colors.ingo.8}"
@@ -9507,7 +9507,7 @@ const Kp = kp(X.breakpoints), Fp = As({
9507
9507
  userSelect: "none",
9508
9508
  color: "neutral.11",
9509
9509
  "&[data-invalid='true']": {
9510
- color: "error.11"
9510
+ color: "critical.11"
9511
9511
  }
9512
9512
  },
9513
9513
  indicator: {
@@ -9531,10 +9531,10 @@ const Kp = kp(X.breakpoints), Fp = As({
9531
9531
  },
9532
9532
  "&[data-invalid='true']": {
9533
9533
  bg: "transparent",
9534
- borderColor: "error.9",
9535
- color: "error.11",
9534
+ borderColor: "critical.9",
9535
+ color: "critical.11",
9536
9536
  "&:hover": {
9537
- borderColor: "error.10"
9537
+ borderColor: "critical.10"
9538
9538
  }
9539
9539
  },
9540
9540
  "&[data-selected='true'], &[data-indeterminate='true']": {
@@ -9546,12 +9546,12 @@ const Kp = kp(X.breakpoints), Fp = As({
9546
9546
  borderColor: "colorPalette.10"
9547
9547
  },
9548
9548
  "&[data-invalid='true']": {
9549
- bg: "error.9",
9550
- borderColor: "error.9",
9551
- color: "error.contrast",
9549
+ bg: "critical.9",
9550
+ borderColor: "critical.9",
9551
+ color: "critical.contrast",
9552
9552
  "&:hover": {
9553
- bg: "error.10",
9554
- borderColor: "error.10"
9553
+ bg: "critical.10",
9554
+ borderColor: "critical.10"
9555
9555
  }
9556
9556
  }
9557
9557
  }
@@ -9632,7 +9632,7 @@ const Kp = kp(X.breakpoints), Fp = As({
9632
9632
  },
9633
9633
  "[data-invalid] &": {
9634
9634
  "--border-width": "sizes.50",
9635
- "--border-color": "colors.error.7"
9635
+ "--border-color": "colors.critical.7"
9636
9636
  }
9637
9637
  // [data-hovered]
9638
9638
  // [data-pressed]
@@ -9661,7 +9661,7 @@ const Kp = kp(X.breakpoints), Fp = As({
9661
9661
  opacity: 0.5
9662
9662
  },
9663
9663
  "[data-invalid] &": {
9664
- color: "error.11"
9664
+ color: "critical.11"
9665
9665
  }
9666
9666
  },
9667
9667
  // Popover
@@ -10630,7 +10630,7 @@ const bb = {
10630
10630
  variants: {
10631
10631
  tone: {
10632
10632
  critical: {
10633
- root: { colorPalette: "error" }
10633
+ root: { colorPalette: "critical" }
10634
10634
  },
10635
10635
  info: {
10636
10636
  root: { colorPalette: "info" }
@@ -10639,7 +10639,7 @@ const bb = {
10639
10639
  root: { colorPalette: "amber" }
10640
10640
  },
10641
10641
  positive: {
10642
- root: { colorPalette: "success" }
10642
+ root: { colorPalette: "positive" }
10643
10643
  }
10644
10644
  },
10645
10645
  variant: {
@@ -10684,31 +10684,29 @@ const bb = {
10684
10684
  }
10685
10685
  }, Lt = M(
10686
10686
  void 0
10687
- ), xs = _(
10688
- ({ children: r, ...e }, t) => {
10689
- const [n, o] = W(null), [i, l] = W(null), [a, s] = W(null), [u, d] = W(null), c = H(
10690
- () => ({
10691
- setTitle: o,
10692
- setDescription: l,
10693
- setActions: s,
10694
- setDismiss: d
10695
- }),
10696
- [o, l, s, d]
10697
- );
10698
- return /* @__PURE__ */ S(Lt.Provider, { value: c, children: /* @__PURE__ */ ee(n0, { ref: t, ...e, role: "alert", children: [
10699
- /* @__PURE__ */ S(l0, { alignItems: "flex-start", children: u0(e.tone) }),
10700
- /* @__PURE__ */ ee(Ln, { flex: "1", gap: "200", children: [
10701
- /* @__PURE__ */ ee(Fe, { children: [
10702
- n,
10703
- i
10704
- ] }),
10705
- a
10687
+ ), xs = _(({ children: r, ...e }, t) => {
10688
+ const [n, o] = W(null), [i, l] = W(null), [a, s] = W(null), [u, d] = W(null), c = H(
10689
+ () => ({
10690
+ setTitle: o,
10691
+ setDescription: l,
10692
+ setActions: s,
10693
+ setDismiss: d
10694
+ }),
10695
+ [o, l, s, d]
10696
+ );
10697
+ return /* @__PURE__ */ S(Lt.Provider, { value: c, children: /* @__PURE__ */ ee(n0, { ref: t, ...e, role: "alert", children: [
10698
+ /* @__PURE__ */ S(l0, { alignItems: "flex-start", children: u0(e.tone) }),
10699
+ /* @__PURE__ */ ee(Ln, { flex: "1", gap: "200", children: [
10700
+ /* @__PURE__ */ ee(Fe, { children: [
10701
+ n,
10702
+ i
10706
10703
  ] }),
10707
- u,
10708
- r
10709
- ] }) });
10710
- }
10711
- );
10704
+ a
10705
+ ] }),
10706
+ u,
10707
+ r
10708
+ ] }) });
10709
+ });
10712
10710
  xs.displayName = "Alert.Root";
10713
10711
  const Ps = ({ children: r, ...e }) => {
10714
10712
  const t = A(Lt);
@@ -10720,7 +10718,10 @@ const Ps = ({ children: r, ...e }) => {
10720
10718
  }, [r, e]), null;
10721
10719
  };
10722
10720
  Ps.displayName = "Alert.Title";
10723
- const Ss = ({ children: r, ...e }) => {
10721
+ const Ss = ({
10722
+ children: r,
10723
+ ...e
10724
+ }) => {
10724
10725
  const t = A(Lt);
10725
10726
  return I(() => {
10726
10727
  if (t) {
@@ -10812,7 +10813,7 @@ const d0 = xe({
10812
10813
  button: { colorPalette: "primary" }
10813
10814
  },
10814
10815
  critical: {
10815
- button: { colorPalette: "error" }
10816
+ button: { colorPalette: "critical" }
10816
10817
  },
10817
10818
  neutral: {
10818
10819
  button: { colorPalette: "neutral" }
@@ -10859,8 +10860,8 @@ const mb = {
10859
10860
  gridArea: "label",
10860
10861
  fontWeight: "500",
10861
10862
  color: "neutral.11",
10862
- fontSize: "350",
10863
- lineHeight: "500"
10863
+ fontSize: "var(--form-field-font-size)",
10864
+ lineHeight: "var(--form-field-line-height)"
10864
10865
  },
10865
10866
  input: {
10866
10867
  gridArea: "input"
@@ -10868,14 +10869,14 @@ const mb = {
10868
10869
  description: {
10869
10870
  gridArea: "description",
10870
10871
  color: "neutral.11",
10871
- fontSize: "350",
10872
- lineHeight: "500"
10872
+ fontSize: "var(--form-field-font-size)",
10873
+ lineHeight: "var(--form-field-line-height)"
10873
10874
  },
10874
10875
  error: {
10875
10876
  gridArea: "error",
10876
- color: "error.11",
10877
- fontSize: "350",
10878
- lineHeight: "500"
10877
+ color: "critical.11",
10878
+ fontSize: "var(--form-field-font-size)",
10879
+ lineHeight: "var(--form-field-line-height)"
10879
10880
  },
10880
10881
  popover: {
10881
10882
  "--scrollbar-color": "colors.neutral.8",
@@ -10894,6 +10895,20 @@ const mb = {
10894
10895
  }
10895
10896
  },
10896
10897
  variants: {
10898
+ size: {
10899
+ md: {
10900
+ root: {
10901
+ "--form-field-font-size": "fontSizes.350",
10902
+ "--form-field-line-height": "lineHeights.500"
10903
+ }
10904
+ },
10905
+ sm: {
10906
+ root: {
10907
+ "--form-field-font-size": "fontSizes.300",
10908
+ "--form-field-line-height": "lineHeights.450"
10909
+ }
10910
+ }
10911
+ },
10897
10912
  direction: {
10898
10913
  column: {
10899
10914
  root: {
@@ -10926,7 +10941,8 @@ const mb = {
10926
10941
  },
10927
10942
  // Default variant values when not explicitly specified
10928
10943
  defaultVariants: {
10929
- direction: "column"
10944
+ direction: "column",
10945
+ size: "md"
10930
10946
  }
10931
10947
  }), { withProvider: m0, withContext: Rt } = Ye({
10932
10948
  recipe: g0
@@ -11120,6 +11136,9 @@ export {
11120
11136
  Fe as Box,
11121
11137
  $n as Button,
11122
11138
  bb as Card,
11139
+ $s as CardContent,
11140
+ ys as CardHeader,
11141
+ ms as CardRoot,
11123
11142
  $v as Checkbox,
11124
11143
  Sb as Code,
11125
11144
  ub as ColorModeLabel,
@@ -11166,6 +11185,8 @@ export {
11166
11185
  ff as Text,
11167
11186
  Sv as TextInput,
11168
11187
  mb as ToggleButtonGroup,
11188
+ Ds as ToggleButtonGroupButton,
11189
+ Cs as ToggleButtonGroupRoot,
11169
11190
  wp as Tooltip,
11170
11191
  Ep as TooltipTrigger,
11171
11192
  us as VisuallyHidden,