@cambly/syntax-core 3.3.0 → 4.1.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.css +6 -7
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +13 -20
- package/dist/index.js +19 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -35
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -160,6 +160,7 @@ function Box(props) {
|
|
|
160
160
|
display,
|
|
161
161
|
smDisplay,
|
|
162
162
|
lgDisplay,
|
|
163
|
+
flexShrink,
|
|
163
164
|
flexWrap,
|
|
164
165
|
gap: gap2,
|
|
165
166
|
justifyContent,
|
|
@@ -211,6 +212,7 @@ function Box(props) {
|
|
|
211
212
|
"display",
|
|
212
213
|
"smDisplay",
|
|
213
214
|
"lgDisplay",
|
|
215
|
+
"flexShrink",
|
|
214
216
|
"flexWrap",
|
|
215
217
|
"gap",
|
|
216
218
|
"justifyContent",
|
|
@@ -312,6 +314,7 @@ function Box(props) {
|
|
|
312
314
|
rounding && rounding !== "none" && Box_module_default[`rounding${rounding}`]
|
|
313
315
|
),
|
|
314
316
|
style: __spreadValues({
|
|
317
|
+
flexShrink,
|
|
315
318
|
height,
|
|
316
319
|
maxHeight,
|
|
317
320
|
maxWidth,
|
|
@@ -372,17 +375,6 @@ function foregroundColor(color) {
|
|
|
372
375
|
}
|
|
373
376
|
}
|
|
374
377
|
|
|
375
|
-
// src/Button/Button.tsx
|
|
376
|
-
import { useContext } from "react";
|
|
377
|
-
|
|
378
|
-
// src/ButtonGroup/ButtonGroupContext.tsx
|
|
379
|
-
import React from "react";
|
|
380
|
-
var ButtonGroupContext = React.createContext(
|
|
381
|
-
{}
|
|
382
|
-
);
|
|
383
|
-
ButtonGroupContext.displayName = "ButtonGroupContext";
|
|
384
|
-
var ButtonGroupContext_default = ButtonGroupContext;
|
|
385
|
-
|
|
386
378
|
// css-module:./Button.module.css#css-module
|
|
387
379
|
var Button_module_default = { "button": "_button_13egy_1", "buttonGap": "_buttonGap_13egy_9", "fullWidth": "_fullWidth_13egy_50", "sm": "_sm_13egy_54", "md": "_md_13egy_61", "lg": "_lg_13egy_68", "icon": "_icon_13egy_75", "smIcon": "_smIcon_13egy_79", "mdIcon": "_mdIcon_13egy_86", "lgIcon": "_lgIcon_13egy_93", "textContainer": "_textContainer_13egy_100", "secondaryBorder": "_secondaryBorder_13egy_105", "secondaryDestructiveBorder": "_secondaryDestructiveBorder_13egy_109", "loading": "_loading_13egy_123", "syntaxButtonLoadingRotate": "_syntaxButtonLoadingRotate_13egy_1", "loadingCircle": "_loadingCircle_13egy_127", "buttonText": "_buttonText_13egy_135", "buttonTextSmall": "_buttonTextSmall_13egy_142", "buttonTextMedium": "_buttonTextMedium_13egy_146", "buttonTextLarge": "_buttonTextLarge_13egy_150" };
|
|
388
380
|
|
|
@@ -408,20 +400,16 @@ var Button = ({
|
|
|
408
400
|
text,
|
|
409
401
|
loadingText,
|
|
410
402
|
color = "primary",
|
|
411
|
-
size
|
|
403
|
+
size = "md",
|
|
412
404
|
accessibilityLabel,
|
|
413
|
-
disabled
|
|
405
|
+
disabled = false,
|
|
414
406
|
loading = false,
|
|
415
|
-
fullWidth
|
|
407
|
+
fullWidth = false,
|
|
416
408
|
startIcon: StartIcon,
|
|
417
409
|
endIcon: EndIcon,
|
|
418
410
|
onClick,
|
|
419
411
|
tooltip
|
|
420
412
|
}) => {
|
|
421
|
-
const contextProps = useContext(ButtonGroupContext_default);
|
|
422
|
-
const size = (contextProps == null ? void 0 : contextProps.size) || sizeProp;
|
|
423
|
-
const disabled = (contextProps == null ? void 0 : contextProps.disabled) || disabledProp;
|
|
424
|
-
const fullWidth = (contextProps == null ? void 0 : contextProps.fullWidth) || fullWidthProp;
|
|
425
413
|
return /* @__PURE__ */ jsxs(
|
|
426
414
|
"button",
|
|
427
415
|
{
|
|
@@ -472,11 +460,8 @@ var Button = ({
|
|
|
472
460
|
};
|
|
473
461
|
var Button_default = Button;
|
|
474
462
|
|
|
475
|
-
// src/ButtonGroup/ButtonGroup.tsx
|
|
476
|
-
import { useMemo } from "react";
|
|
477
|
-
|
|
478
463
|
// css-module:./ButtonGroup.module.css#css-module
|
|
479
|
-
var ButtonGroup_module_default = { "buttonGroup": "
|
|
464
|
+
var ButtonGroup_module_default = { "buttonGroup": "_buttonGroup_1f9x9_1", "horizontal": "_horizontal_1f9x9_5", "vertical": "_vertical_1f9x9_9", "smallGap": "_smallGap_1f9x9_13", "mediumGap": "_mediumGap_1f9x9_17", "largeGap": "_largeGap_1f9x9_21" };
|
|
480
465
|
|
|
481
466
|
// src/ButtonGroup/ButtonGroup.tsx
|
|
482
467
|
var import_classnames4 = __toESM(require_classnames());
|
|
@@ -487,21 +472,15 @@ var gap = {
|
|
|
487
472
|
["lg"]: ButtonGroup_module_default.largeGap
|
|
488
473
|
};
|
|
489
474
|
var ButtonGroup = ({
|
|
490
|
-
disabled = false,
|
|
491
|
-
fullWidth = false,
|
|
492
475
|
orientation = "horizontal",
|
|
493
476
|
size = "md",
|
|
494
477
|
children
|
|
495
478
|
}) => {
|
|
496
|
-
const context = useMemo(
|
|
497
|
-
() => ({ disabled, fullWidth, size }),
|
|
498
|
-
[disabled, fullWidth, size]
|
|
499
|
-
);
|
|
500
479
|
const classnames2 = (0, import_classnames4.default)(ButtonGroup_module_default.buttonGroup, gap[size], {
|
|
501
480
|
[ButtonGroup_module_default.horizontal]: orientation === "horizontal",
|
|
502
481
|
[ButtonGroup_module_default.vertical]: orientation === "vertical"
|
|
503
482
|
});
|
|
504
|
-
return /* @__PURE__ */ jsx4(
|
|
483
|
+
return /* @__PURE__ */ jsx4("div", { className: classnames2, children });
|
|
505
484
|
};
|
|
506
485
|
var ButtonGroup_default = ButtonGroup;
|
|
507
486
|
|
|
@@ -598,7 +577,6 @@ var Heading_default = Heading;
|
|
|
598
577
|
|
|
599
578
|
// src/IconButton/IconButton.tsx
|
|
600
579
|
var import_classnames6 = __toESM(require_classnames());
|
|
601
|
-
import { useContext as useContext2 } from "react";
|
|
602
580
|
|
|
603
581
|
// css-module:./IconButton.module.css#css-module
|
|
604
582
|
var IconButton_module_default = { "iconButton": "_iconButton_dzhn0_1", "sm": "_sm_dzhn0_46", "md": "_md_dzhn0_51", "lg": "_lg_dzhn0_56", "smIcon": "_smIcon_dzhn0_61", "mdIcon": "_mdIcon_dzhn0_68", "lgIcon": "_lgIcon_dzhn0_75" };
|
|
@@ -613,15 +591,12 @@ var iconSize2 = {
|
|
|
613
591
|
var IconButton = ({
|
|
614
592
|
accessibilityLabel,
|
|
615
593
|
color = "primary",
|
|
616
|
-
disabled
|
|
594
|
+
disabled = false,
|
|
617
595
|
icon: Icon,
|
|
618
|
-
size
|
|
596
|
+
size = "md",
|
|
619
597
|
tooltip,
|
|
620
598
|
onClick
|
|
621
599
|
}) => {
|
|
622
|
-
const contextProps = useContext2(ButtonGroupContext_default);
|
|
623
|
-
const size = (contextProps == null ? void 0 : contextProps.size) || sizeProp;
|
|
624
|
-
const disabled = (contextProps == null ? void 0 : contextProps.disabled) || disabledProp;
|
|
625
600
|
return /* @__PURE__ */ jsx9(
|
|
626
601
|
"button",
|
|
627
602
|
{
|