@terminal-blueprint/react 0.1.0 → 0.1.1

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.cts CHANGED
@@ -139,11 +139,12 @@ interface ModalProps {
139
139
  closeOnBackdrop?: boolean;
140
140
  hideCloseButton?: boolean;
141
141
  portalTarget?: Element | null;
142
+ variant?: 'warning' | 'error' | 'success';
142
143
  children: ReactNode;
143
144
  className?: string;
144
145
  ref?: Ref<HTMLDivElement>;
145
146
  }
146
- declare function ModalRoot({ open, onOpenChange, closeOnEscape, closeOnBackdrop, hideCloseButton, portalTarget, children, className, ref, }: ModalProps): react_jsx_runtime.JSX.Element;
147
+ declare function ModalRoot({ open, onOpenChange, closeOnEscape, closeOnBackdrop, hideCloseButton, portalTarget, variant, children, className, ref, }: ModalProps): react_jsx_runtime.JSX.Element;
147
148
  interface ModalSectionProps extends HTMLAttributes<HTMLDivElement> {
148
149
  ref?: Ref<HTMLDivElement>;
149
150
  }
package/dist/index.d.ts CHANGED
@@ -139,11 +139,12 @@ interface ModalProps {
139
139
  closeOnBackdrop?: boolean;
140
140
  hideCloseButton?: boolean;
141
141
  portalTarget?: Element | null;
142
+ variant?: 'warning' | 'error' | 'success';
142
143
  children: ReactNode;
143
144
  className?: string;
144
145
  ref?: Ref<HTMLDivElement>;
145
146
  }
146
- declare function ModalRoot({ open, onOpenChange, closeOnEscape, closeOnBackdrop, hideCloseButton, portalTarget, children, className, ref, }: ModalProps): react_jsx_runtime.JSX.Element;
147
+ declare function ModalRoot({ open, onOpenChange, closeOnEscape, closeOnBackdrop, hideCloseButton, portalTarget, variant, children, className, ref, }: ModalProps): react_jsx_runtime.JSX.Element;
147
148
  interface ModalSectionProps extends HTMLAttributes<HTMLDivElement> {
148
149
  ref?: Ref<HTMLDivElement>;
149
150
  }
package/dist/index.js CHANGED
@@ -598,6 +598,7 @@ function ModalRoot({
598
598
  closeOnBackdrop = true,
599
599
  hideCloseButton = false,
600
600
  portalTarget,
601
+ variant,
601
602
  children,
602
603
  className,
603
604
  ref
@@ -683,7 +684,7 @@ function ModalRoot({
683
684
  "aria-modal": "true",
684
685
  "aria-labelledby": titleId,
685
686
  "aria-describedby": descId,
686
- className: cn("tb-modal", className),
687
+ className: cn("tb-modal", variant && `tb-modal--${variant}`, className),
687
688
  tabIndex: -1,
688
689
  onKeyDown: handleKeyDown,
689
690
  children: [
@@ -1691,7 +1692,6 @@ function ToolbarSelect({
1691
1692
  "div",
1692
1693
  {
1693
1694
  className: cn("tb-toolbar__option", opt.value === value && "tb-toolbar__option--active"),
1694
- style: { fontFamily: opt.value },
1695
1695
  onClick: () => select(opt),
1696
1696
  children: [
1697
1697
  opt.label,