@cambly/syntax-core 5.3.0 → 5.4.0
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 +21 -2
- package/dist/index.js +25 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -442,6 +442,10 @@ type ButtonType = {
|
|
|
442
442
|
* The tooltip to be displayed when the user hovers over the button
|
|
443
443
|
*/
|
|
444
444
|
tooltip?: string;
|
|
445
|
+
/**
|
|
446
|
+
* The type you want to set for the primitive <button/>
|
|
447
|
+
*/
|
|
448
|
+
type?: "button" | "submit" | "reset";
|
|
445
449
|
};
|
|
446
450
|
declare const Button: React__default.ForwardRefExoticComponent<ButtonType & React__default.RefAttributes<HTMLButtonElement>>;
|
|
447
451
|
|
|
@@ -471,15 +475,30 @@ declare const ButtonGroup: ({ orientation, size, children, }: {
|
|
|
471
475
|
children?: ReactNode;
|
|
472
476
|
}) => ReactElement;
|
|
473
477
|
|
|
478
|
+
declare const CardSizes: readonly ["sm", "lg"];
|
|
474
479
|
/**
|
|
475
480
|
* Card is a basic container component to apply consistent styling and render child components.
|
|
476
481
|
*/
|
|
477
|
-
|
|
482
|
+
type CardType = {
|
|
483
|
+
/**
|
|
484
|
+
* Test id for the button
|
|
485
|
+
*/
|
|
486
|
+
"data-testid"?: string;
|
|
478
487
|
/**
|
|
479
488
|
* The child components to render within Card.
|
|
480
489
|
*/
|
|
481
490
|
children: JSX.Element;
|
|
482
|
-
|
|
491
|
+
/**
|
|
492
|
+
* The size of the card
|
|
493
|
+
*
|
|
494
|
+
* `sm`: 352px
|
|
495
|
+
* `lg`: 744px
|
|
496
|
+
*
|
|
497
|
+
* @defaultValue sm
|
|
498
|
+
*/
|
|
499
|
+
size?: (typeof CardSizes)[number];
|
|
500
|
+
};
|
|
501
|
+
declare const Card: ({ children, size, "data-testid": dataTestId, }: CardType) => JSX.Element;
|
|
483
502
|
|
|
484
503
|
/**
|
|
485
504
|
* Divider is a thin horizontal line to group content in lists and layouts.
|
package/dist/index.js
CHANGED
|
@@ -528,7 +528,8 @@ var Button = (0, import_react2.forwardRef)(
|
|
|
528
528
|
startIcon: StartIcon,
|
|
529
529
|
endIcon: EndIcon,
|
|
530
530
|
onClick,
|
|
531
|
-
tooltip
|
|
531
|
+
tooltip,
|
|
532
|
+
type = "button"
|
|
532
533
|
}, ref) => {
|
|
533
534
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
534
535
|
"button",
|
|
@@ -536,7 +537,7 @@ var Button = (0, import_react2.forwardRef)(
|
|
|
536
537
|
"data-testid": dataTestId,
|
|
537
538
|
ref,
|
|
538
539
|
"aria-label": accessibilityLabel,
|
|
539
|
-
type
|
|
540
|
+
type,
|
|
540
541
|
title: tooltip,
|
|
541
542
|
disabled: disabled || loading,
|
|
542
543
|
onClick,
|
|
@@ -611,8 +612,28 @@ var ButtonGroup_default = ButtonGroup;
|
|
|
611
612
|
// src/Card/Card.tsx
|
|
612
613
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
613
614
|
var Card = ({
|
|
614
|
-
children
|
|
615
|
-
|
|
615
|
+
children,
|
|
616
|
+
size = "sm",
|
|
617
|
+
"data-testid": dataTestId
|
|
618
|
+
}) => {
|
|
619
|
+
const sizeWidth = {
|
|
620
|
+
sm: 352,
|
|
621
|
+
lg: 744
|
|
622
|
+
};
|
|
623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
624
|
+
Box_default,
|
|
625
|
+
{
|
|
626
|
+
rounding: "xl",
|
|
627
|
+
padding: 7,
|
|
628
|
+
smPadding: 9,
|
|
629
|
+
maxWidth: sizeWidth[size],
|
|
630
|
+
width: "100%",
|
|
631
|
+
backgroundColor: "white",
|
|
632
|
+
"data-testid": dataTestId,
|
|
633
|
+
children
|
|
634
|
+
}
|
|
635
|
+
);
|
|
636
|
+
};
|
|
616
637
|
var Card_default = Card;
|
|
617
638
|
|
|
618
639
|
// css-module:./Divider.module.css#css-module
|