@cambly/syntax-core 3.1.0 → 3.3.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 +11 -11
- package/dist/index.js +4 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode, ReactElement } from 'react';
|
|
1
|
+
import React$1, { ReactNode, ReactElement } from 'react';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Avatar is a circular image that represents a user.
|
|
@@ -390,19 +390,19 @@ declare const Button: ({ text, loadingText, color, size: sizeProp, accessibility
|
|
|
390
390
|
/**
|
|
391
391
|
* The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)
|
|
392
392
|
*/
|
|
393
|
-
startIcon?: React.ComponentType<{
|
|
393
|
+
startIcon?: React$1.ComponentType<{
|
|
394
394
|
className: string;
|
|
395
395
|
}> | undefined;
|
|
396
396
|
/**
|
|
397
397
|
* The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)
|
|
398
398
|
*/
|
|
399
|
-
endIcon?: React.ComponentType<{
|
|
399
|
+
endIcon?: React$1.ComponentType<{
|
|
400
400
|
className: string;
|
|
401
401
|
}> | undefined;
|
|
402
402
|
/**
|
|
403
403
|
* The callback to be called when the button is clicked
|
|
404
404
|
*/
|
|
405
|
-
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
405
|
+
onClick: React$1.MouseEventHandler<HTMLButtonElement>;
|
|
406
406
|
/**
|
|
407
407
|
* The tooltip to be displayed when the user hovers over the button
|
|
408
408
|
*/
|
|
@@ -460,7 +460,7 @@ declare const Card: ({ children, }: {
|
|
|
460
460
|
/**
|
|
461
461
|
* Divider is a thin horizontal line to group content in lists and layouts.
|
|
462
462
|
*/
|
|
463
|
-
declare function Divider(
|
|
463
|
+
declare function Divider(): React.ReactElement;
|
|
464
464
|
declare namespace Divider {
|
|
465
465
|
var displayName: string;
|
|
466
466
|
}
|
|
@@ -533,7 +533,7 @@ declare const IconButton: ({ accessibilityLabel, color, disabled: disabledProp,
|
|
|
533
533
|
/**
|
|
534
534
|
* The icon to be displayed. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)
|
|
535
535
|
*/
|
|
536
|
-
icon: React.ComponentType<{
|
|
536
|
+
icon: React$1.ComponentType<{
|
|
537
537
|
className: string;
|
|
538
538
|
}>;
|
|
539
539
|
/**
|
|
@@ -545,7 +545,7 @@ declare const IconButton: ({ accessibilityLabel, color, disabled: disabledProp,
|
|
|
545
545
|
/**
|
|
546
546
|
* The callback to be called when the button is clicked
|
|
547
547
|
*/
|
|
548
|
-
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
548
|
+
onClick: React$1.MouseEventHandler<HTMLButtonElement>;
|
|
549
549
|
/**
|
|
550
550
|
* The tooltip to be displayed when the user hovers over the button
|
|
551
551
|
*/
|
|
@@ -565,7 +565,7 @@ declare const Checkbox: ({ checked, disabled, size, label, error, onChange, }: {
|
|
|
565
565
|
/**
|
|
566
566
|
* The callback to be called when the checkbox value changes
|
|
567
567
|
*/
|
|
568
|
-
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
568
|
+
onChange: React$1.ChangeEventHandler<HTMLInputElement>;
|
|
569
569
|
/**
|
|
570
570
|
* Whether or not the box is disabled
|
|
571
571
|
*
|
|
@@ -636,7 +636,7 @@ declare const RadioButton: ({ checked, disabled, error, label, name, onChange, s
|
|
|
636
636
|
/**
|
|
637
637
|
* The callback to be called when the radio button is clicked
|
|
638
638
|
*/
|
|
639
|
-
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
639
|
+
onChange: React$1.ChangeEventHandler<HTMLInputElement>;
|
|
640
640
|
/**
|
|
641
641
|
* Size of the components
|
|
642
642
|
*
|
|
@@ -679,7 +679,7 @@ declare const SelectList: {
|
|
|
679
679
|
/**
|
|
680
680
|
* The callback to be called when an option is selected
|
|
681
681
|
*/
|
|
682
|
-
onChange: React.ChangeEventHandler<HTMLSelectElement>;
|
|
682
|
+
onChange: React$1.ChangeEventHandler<HTMLSelectElement>;
|
|
683
683
|
/**
|
|
684
684
|
* Text showing in select box if no option has been chosen.
|
|
685
685
|
* We should always have a placeholder unless there is a default option selected
|
|
@@ -703,7 +703,7 @@ declare const SelectList: {
|
|
|
703
703
|
value: string;
|
|
704
704
|
label: string;
|
|
705
705
|
disabled?: boolean | undefined;
|
|
706
|
-
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
706
|
+
}) => React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>>;
|
|
707
707
|
};
|
|
708
708
|
|
|
709
709
|
/**
|
package/dist/index.js
CHANGED
|
@@ -545,7 +545,7 @@ var Divider_module_default = { "divider": "_divider_1ddgq_1" };
|
|
|
545
545
|
|
|
546
546
|
// src/Divider/Divider.tsx
|
|
547
547
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
548
|
-
function Divider(
|
|
548
|
+
function Divider() {
|
|
549
549
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("hr", { className: Divider_module_default.divider });
|
|
550
550
|
}
|
|
551
551
|
Divider.displayName = "Divider";
|
|
@@ -968,14 +968,7 @@ var SelectList = ({
|
|
|
968
968
|
[SelectList_module_default.opacityOverlay]: disabled
|
|
969
969
|
}),
|
|
970
970
|
children: [
|
|
971
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: id, className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
972
|
-
Typography_default,
|
|
973
|
-
{
|
|
974
|
-
size: 100,
|
|
975
|
-
color: errorText ? "destructive-primary" : "gray700",
|
|
976
|
-
children: label
|
|
977
|
-
}
|
|
978
|
-
) }),
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("label", { htmlFor: id, className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Typography_default, { size: 100, color: "gray700", children: label }) }),
|
|
979
972
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: SelectList_module_default.selectWrapper, children: [
|
|
980
973
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
981
974
|
"select",
|
|
@@ -989,8 +982,9 @@ var SelectList = ({
|
|
|
989
982
|
[SelectList_module_default.selectError]: errorText
|
|
990
983
|
}),
|
|
991
984
|
onChange,
|
|
985
|
+
value: placeholderText && !selectedValue ? placeholderText : selectedValue,
|
|
992
986
|
children: [
|
|
993
|
-
placeholderText && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { disabled: true, value:
|
|
987
|
+
placeholderText && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { disabled: true, value: placeholderText, children: placeholderText }),
|
|
994
988
|
children
|
|
995
989
|
]
|
|
996
990
|
}
|