@cambly/syntax-core 12.1.0 → 12.2.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/Avatar/Avatar.d.ts +1 -1
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Heading/Heading.d.ts +2 -2
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.js +2 -2
- package/dist/RichSelect/RichSelectList.cjs +5 -5
- package/dist/RichSelect/RichSelectList.js +4 -4
- package/dist/SelectList/SelectList.cjs +3 -3
- package/dist/SelectList/SelectList.js +2 -2
- package/dist/TapArea/TapArea.d.ts +1 -1
- package/dist/Tooltip/Tooltip.cjs +3 -3
- package/dist/Tooltip/Tooltip.js +2 -2
- package/dist/Typography/Typography.d.ts +5 -5
- package/dist/__chunks/{PGW7AS3M.js → B7DRDFQ5.js} +2 -2
- package/dist/__chunks/{4H75FQZD.js → BGSF75WT.js} +3 -3
- package/dist/__chunks/{ZOW3SDQH.cjs → DSX7DSIZ.cjs} +5 -5
- package/dist/__chunks/{SSVDOCMD.js → H4L7P2Y7.js} +2 -2
- package/dist/__chunks/{Z5IIAJX5.js → JCOCOPM4.js} +1 -1
- package/dist/__chunks/{Z5IIAJX5.js.map → JCOCOPM4.js.map} +1 -1
- package/dist/__chunks/{M26PGOYA.js → JDTF77DO.js} +4 -3
- package/dist/__chunks/{M26PGOYA.js.map → JDTF77DO.js.map} +1 -1
- package/dist/__chunks/{K64O2RGU.cjs → NT2USB3G.cjs} +3 -3
- package/dist/__chunks/{UAN6WTHU.cjs → QR3HKPXF.cjs} +4 -3
- package/dist/__chunks/QR3HKPXF.cjs.map +1 -0
- package/dist/__chunks/{5Q53O2YE.cjs → RWYADXNX.cjs} +1 -1
- package/dist/__chunks/{5Q53O2YE.cjs.map → RWYADXNX.cjs.map} +1 -1
- package/dist/__chunks/{3KJ2VFCY.js → S2S77Y7G.js} +2 -2
- package/dist/__chunks/{W52D7D34.cjs → UH56LVRG.cjs} +3 -3
- package/dist/__chunks/{65FLKUFW.cjs → YFADRNTB.cjs} +3 -3
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/react-aria-utils/Triggerable.cjs +2 -2
- package/dist/react-aria-utils/Triggerable.js +1 -1
- package/package.json +3 -3
- package/dist/__chunks/UAN6WTHU.cjs.map +0 -1
- /package/dist/__chunks/{PGW7AS3M.js.map → B7DRDFQ5.js.map} +0 -0
- /package/dist/__chunks/{4H75FQZD.js.map → BGSF75WT.js.map} +0 -0
- /package/dist/__chunks/{ZOW3SDQH.cjs.map → DSX7DSIZ.cjs.map} +0 -0
- /package/dist/__chunks/{SSVDOCMD.js.map → H4L7P2Y7.js.map} +0 -0
- /package/dist/__chunks/{K64O2RGU.cjs.map → NT2USB3G.cjs.map} +0 -0
- /package/dist/__chunks/{3KJ2VFCY.js.map → S2S77Y7G.js.map} +0 -0
- /package/dist/__chunks/{W52D7D34.cjs.map → UH56LVRG.cjs.map} +0 -0
- /package/dist/__chunks/{65FLKUFW.cjs.map → YFADRNTB.cjs.map} +0 -0
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare const Avatar: ({ accessibilityLabel, icon, size, src, }: {
|
|
|
24
24
|
*
|
|
25
25
|
* @defaultValue `md`
|
|
26
26
|
*/
|
|
27
|
-
size?: "
|
|
27
|
+
size?: "xs" | "sm" | "md" | "lg" | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* URL of the image to display as the avatar.
|
|
30
30
|
*/
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare const Badge: ({ icon: Icon, text, color, }: {
|
|
|
19
19
|
*
|
|
20
20
|
* @defaultValue "sky"
|
|
21
21
|
*/
|
|
22
|
-
color?: "
|
|
22
|
+
color?: "sky" | "success300" | "destructive300" | "orange" | "tan" | "gray370" | "gray870" | "lilac" | "thistle" | "pink" | undefined;
|
|
23
23
|
}) => JSX.Element;
|
|
24
24
|
|
|
25
25
|
export { Badge as default };
|
|
@@ -11,7 +11,7 @@ declare const Heading: ({ align, as, children, color, "data-testid": dataTestId,
|
|
|
11
11
|
*
|
|
12
12
|
* @defaultValue "start"
|
|
13
13
|
*/
|
|
14
|
-
align?: "
|
|
14
|
+
align?: "start" | "end" | "forceLeft" | "center" | "forceRight" | undefined;
|
|
15
15
|
/**
|
|
16
16
|
* DOM element to render as.
|
|
17
17
|
*
|
|
@@ -27,7 +27,7 @@ declare const Heading: ({ align, as, children, color, "data-testid": dataTestId,
|
|
|
27
27
|
*
|
|
28
28
|
* @defaultValue "gray900"
|
|
29
29
|
*/
|
|
30
|
-
color?: "primary" | "destructive-primary" | "
|
|
30
|
+
color?: "primary" | "destructive-primary" | "gray900" | "gray700" | "success" | "white" | "inherit" | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* Test id for the text.
|
|
33
33
|
*/
|
package/dist/Popover/Popover.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _UH56LVRGcjs = require('../__chunks/UH56LVRG.cjs');
|
|
6
6
|
require('../__chunks/D62L3CWM.cjs');
|
|
7
7
|
require('../__chunks/76LTWV2Q.cjs');
|
|
8
8
|
require('../__chunks/PROA22UK.cjs');
|
|
@@ -21,12 +21,12 @@ require('../__chunks/QT6IRCGW.cjs');
|
|
|
21
21
|
|
|
22
22
|
require('../__chunks/K4AUV2VK.cjs');
|
|
23
23
|
require('../__chunks/LLFHCGRA.cjs');
|
|
24
|
-
require('../__chunks/
|
|
24
|
+
require('../__chunks/QR3HKPXF.cjs');
|
|
25
25
|
require('../__chunks/FZLDJPVT.cjs');
|
|
26
26
|
require('../__chunks/E5P6WRJD.cjs');
|
|
27
27
|
require('../__chunks/X2SDR4SD.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
exports.AriaPopover =
|
|
31
|
+
exports.AriaPopover = _UH56LVRGcjs.AriaPopover; exports.default = _UH56LVRGcjs.Popover_default;
|
|
32
32
|
//# sourceMappingURL=Popover.cjs.map
|
package/dist/Popover/Popover.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AriaPopover,
|
|
4
4
|
Popover_default
|
|
5
|
-
} from "../__chunks/
|
|
5
|
+
} from "../__chunks/H4L7P2Y7.js";
|
|
6
6
|
import "../__chunks/FVGIQTM2.js";
|
|
7
7
|
import "../__chunks/TZGJS522.js";
|
|
8
8
|
import "../__chunks/MEOMWLNG.js";
|
|
@@ -21,7 +21,7 @@ import "../__chunks/S6TNP7G5.js";
|
|
|
21
21
|
import "../__chunks/4U4UW4AK.js";
|
|
22
22
|
import "../__chunks/JB65NEXK.js";
|
|
23
23
|
import "../__chunks/SVZOETLJ.js";
|
|
24
|
-
import "../__chunks/
|
|
24
|
+
import "../__chunks/JDTF77DO.js";
|
|
25
25
|
import "../__chunks/7N4ZDVVD.js";
|
|
26
26
|
import "../__chunks/E5KMIBEU.js";
|
|
27
27
|
import "../__chunks/UWGNJENA.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _DSX7DSIZcjs = require('../__chunks/DSX7DSIZ.cjs');
|
|
5
5
|
require('../__chunks/T5LYIWR3.cjs');
|
|
6
6
|
require('../__chunks/C5XPZTFO.cjs');
|
|
7
7
|
require('../__chunks/ANY6BV2W.cjs');
|
|
@@ -11,12 +11,12 @@ require('../__chunks/BHN2OODF.cjs');
|
|
|
11
11
|
require('../__chunks/DMA6PPUZ.cjs');
|
|
12
12
|
require('../__chunks/JXI2A4FD.cjs');
|
|
13
13
|
require('../__chunks/M3KSATCF.cjs');
|
|
14
|
-
require('../__chunks/
|
|
14
|
+
require('../__chunks/UH56LVRG.cjs');
|
|
15
15
|
require('../__chunks/D62L3CWM.cjs');
|
|
16
16
|
require('../__chunks/76LTWV2Q.cjs');
|
|
17
17
|
require('../__chunks/PROA22UK.cjs');
|
|
18
18
|
require('../__chunks/3UEOKPM2.cjs');
|
|
19
|
-
require('../__chunks/
|
|
19
|
+
require('../__chunks/RWYADXNX.cjs');
|
|
20
20
|
require('../__chunks/5AKXXMJG.cjs');
|
|
21
21
|
require('../__chunks/MF7LLV7V.cjs');
|
|
22
22
|
require('../__chunks/T6Q66MTP.cjs');
|
|
@@ -39,11 +39,11 @@ require('../__chunks/QT6IRCGW.cjs');
|
|
|
39
39
|
require('../__chunks/K4AUV2VK.cjs');
|
|
40
40
|
require('../__chunks/NOELZTQX.cjs');
|
|
41
41
|
require('../__chunks/LLFHCGRA.cjs');
|
|
42
|
-
require('../__chunks/
|
|
42
|
+
require('../__chunks/QR3HKPXF.cjs');
|
|
43
43
|
require('../__chunks/FZLDJPVT.cjs');
|
|
44
44
|
require('../__chunks/E5P6WRJD.cjs');
|
|
45
45
|
require('../__chunks/X2SDR4SD.cjs');
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
exports.default =
|
|
48
|
+
exports.default = _DSX7DSIZcjs.RichSelectList_default;
|
|
49
49
|
//# sourceMappingURL=RichSelectList.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
RichSelectList_default
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/BGSF75WT.js";
|
|
5
5
|
import "../__chunks/7TTYWZJV.js";
|
|
6
6
|
import "../__chunks/BOX3VY3Q.js";
|
|
7
7
|
import "../__chunks/UX5KRRO4.js";
|
|
@@ -11,12 +11,12 @@ import "../__chunks/C7PW7CPK.js";
|
|
|
11
11
|
import "../__chunks/TK2EQ6QG.js";
|
|
12
12
|
import "../__chunks/2QPXNLJ6.js";
|
|
13
13
|
import "../__chunks/FHLZXSCX.js";
|
|
14
|
-
import "../__chunks/
|
|
14
|
+
import "../__chunks/H4L7P2Y7.js";
|
|
15
15
|
import "../__chunks/FVGIQTM2.js";
|
|
16
16
|
import "../__chunks/TZGJS522.js";
|
|
17
17
|
import "../__chunks/MEOMWLNG.js";
|
|
18
18
|
import "../__chunks/77FFPQY6.js";
|
|
19
|
-
import "../__chunks/
|
|
19
|
+
import "../__chunks/JCOCOPM4.js";
|
|
20
20
|
import "../__chunks/Y4BEP7DV.js";
|
|
21
21
|
import "../__chunks/DDUJFFG7.js";
|
|
22
22
|
import "../__chunks/52WECBHV.js";
|
|
@@ -39,7 +39,7 @@ import "../__chunks/4U4UW4AK.js";
|
|
|
39
39
|
import "../__chunks/JB65NEXK.js";
|
|
40
40
|
import "../__chunks/BWPNF6RD.js";
|
|
41
41
|
import "../__chunks/SVZOETLJ.js";
|
|
42
|
-
import "../__chunks/
|
|
42
|
+
import "../__chunks/JDTF77DO.js";
|
|
43
43
|
import "../__chunks/7N4ZDVVD.js";
|
|
44
44
|
import "../__chunks/E5KMIBEU.js";
|
|
45
45
|
import "../__chunks/UWGNJENA.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _YFADRNTBcjs = require('../__chunks/YFADRNTB.cjs');
|
|
5
5
|
require('../__chunks/4UJE5GMH.cjs');
|
|
6
|
-
require('../__chunks/
|
|
6
|
+
require('../__chunks/RWYADXNX.cjs');
|
|
7
7
|
require('../__chunks/XLUVINJW.cjs');
|
|
8
8
|
require('../__chunks/FESAFV44.cjs');
|
|
9
9
|
require('../__chunks/WFVGNGEP.cjs');
|
|
@@ -17,5 +17,5 @@ require('../__chunks/NOELZTQX.cjs');
|
|
|
17
17
|
require('../__chunks/X2SDR4SD.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
exports.default =
|
|
20
|
+
exports.default = _YFADRNTBcjs.SelectList;
|
|
21
21
|
//# sourceMappingURL=SelectList.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
SelectList
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/B7DRDFQ5.js";
|
|
5
5
|
import "../__chunks/Y47XTR6M.js";
|
|
6
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/JCOCOPM4.js";
|
|
7
7
|
import "../__chunks/KKADUD65.js";
|
|
8
8
|
import "../__chunks/M36V23WR.js";
|
|
9
9
|
import "../__chunks/4U4UW4AK.js";
|
|
@@ -48,7 +48,7 @@ declare const TapArea: React__default.ForwardRefExoticComponent<React__default.A
|
|
|
48
48
|
*
|
|
49
49
|
* @defaultValue "none"
|
|
50
50
|
*/
|
|
51
|
-
rounding?: "sm" | "md" | "
|
|
51
|
+
rounding?: "sm" | "md" | "full" | "none" | undefined;
|
|
52
52
|
/**
|
|
53
53
|
* The tab index of the tap area
|
|
54
54
|
*/
|
package/dist/Tooltip/Tooltip.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _NT2USB3Gcjs = require('../__chunks/NT2USB3G.cjs');
|
|
6
6
|
require('../__chunks/PLUVW6AM.cjs');
|
|
7
7
|
require('../__chunks/IL22HCBF.cjs');
|
|
8
8
|
require('../__chunks/WFVGNGEP.cjs');
|
|
@@ -12,12 +12,12 @@ require('../__chunks/UUIXG3PQ.cjs');
|
|
|
12
12
|
require('../__chunks/QT6IRCGW.cjs');
|
|
13
13
|
|
|
14
14
|
require('../__chunks/LLFHCGRA.cjs');
|
|
15
|
-
require('../__chunks/
|
|
15
|
+
require('../__chunks/QR3HKPXF.cjs');
|
|
16
16
|
require('../__chunks/FZLDJPVT.cjs');
|
|
17
17
|
require('../__chunks/E5P6WRJD.cjs');
|
|
18
18
|
require('../__chunks/X2SDR4SD.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.AriaTooltip =
|
|
22
|
+
exports.AriaTooltip = _NT2USB3Gcjs.AriaTooltip; exports.default = _NT2USB3Gcjs.Tooltip_default;
|
|
23
23
|
//# sourceMappingURL=Tooltip.cjs.map
|
package/dist/Tooltip/Tooltip.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
AriaTooltip,
|
|
4
4
|
Tooltip_default
|
|
5
|
-
} from "../__chunks/
|
|
5
|
+
} from "../__chunks/S2S77Y7G.js";
|
|
6
6
|
import "../__chunks/ZOWOFYUE.js";
|
|
7
7
|
import "../__chunks/AVREYFSM.js";
|
|
8
8
|
import "../__chunks/4U4UW4AK.js";
|
|
@@ -12,7 +12,7 @@ import "../__chunks/RXXGDO2J.js";
|
|
|
12
12
|
import "../__chunks/S6TNP7G5.js";
|
|
13
13
|
import "../__chunks/4U4UW4AK.js";
|
|
14
14
|
import "../__chunks/SVZOETLJ.js";
|
|
15
|
-
import "../__chunks/
|
|
15
|
+
import "../__chunks/JDTF77DO.js";
|
|
16
16
|
import "../__chunks/7N4ZDVVD.js";
|
|
17
17
|
import "../__chunks/E5KMIBEU.js";
|
|
18
18
|
import "../__chunks/UWGNJENA.js";
|
|
@@ -12,13 +12,13 @@ declare const Typography: React.ForwardRefExoticComponent<{
|
|
|
12
12
|
*
|
|
13
13
|
* @defaultValue "start"
|
|
14
14
|
*/
|
|
15
|
-
align?: "
|
|
15
|
+
align?: "start" | "end" | "forceLeft" | "center" | "forceRight" | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* DOM element to render as.
|
|
18
18
|
*
|
|
19
19
|
* @defaultValue "div"
|
|
20
20
|
*/
|
|
21
|
-
as?: "
|
|
21
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div" | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* The text to be rendered
|
|
24
24
|
*/
|
|
@@ -28,7 +28,7 @@ declare const Typography: React.ForwardRefExoticComponent<{
|
|
|
28
28
|
*
|
|
29
29
|
* @defaultValue "gray900"
|
|
30
30
|
*/
|
|
31
|
-
color?: "primary" | "destructive-primary" | "gray700" | "
|
|
31
|
+
color?: "primary" | "destructive-primary" | "gray900" | "gray700" | "success" | "white" | "inherit" | "destructive-darkBackground" | "success-darkBackground" | undefined;
|
|
32
32
|
/**
|
|
33
33
|
* Test id for the text
|
|
34
34
|
*/
|
|
@@ -86,7 +86,7 @@ declare const Typography: React.ForwardRefExoticComponent<{
|
|
|
86
86
|
*
|
|
87
87
|
* @defaultValue 200
|
|
88
88
|
*/
|
|
89
|
-
size?:
|
|
89
|
+
size?: 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100 | 100 | 200 | 300 | undefined;
|
|
90
90
|
/**
|
|
91
91
|
* The tooltip to be displayed when the user hovers the text
|
|
92
92
|
*/
|
|
@@ -113,7 +113,7 @@ declare const Typography: React.ForwardRefExoticComponent<{
|
|
|
113
113
|
*
|
|
114
114
|
* @defaultValue "regular"
|
|
115
115
|
*/
|
|
116
|
-
weight?: "
|
|
116
|
+
weight?: "regular" | "medium" | "semiBold" | "bold" | undefined;
|
|
117
117
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
118
118
|
|
|
119
119
|
export { Typography as default };
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
ColorBaseDestructive700,
|
|
7
7
|
ColorBaseGray800
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./JCOCOPM4.js";
|
|
9
9
|
import {
|
|
10
10
|
Focus_module_default
|
|
11
11
|
} from "./KKADUD65.js";
|
|
@@ -122,4 +122,4 @@ SelectList.Option = SelectOption_default;
|
|
|
122
122
|
export {
|
|
123
123
|
SelectList
|
|
124
124
|
};
|
|
125
|
-
//# sourceMappingURL=
|
|
125
|
+
//# sourceMappingURL=B7DRDFQ5.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./2QPXNLJ6.js";
|
|
10
10
|
import {
|
|
11
11
|
Popover_default
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./H4L7P2Y7.js";
|
|
13
13
|
import {
|
|
14
14
|
DialogContext
|
|
15
15
|
} from "./TZGJS522.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
ColorBaseDestructive700,
|
|
21
21
|
ColorBaseGray800
|
|
22
|
-
} from "./
|
|
22
|
+
} from "./JCOCOPM4.js";
|
|
23
23
|
import {
|
|
24
24
|
RichSelectSection_default
|
|
25
25
|
} from "./Y4BEP7DV.js";
|
|
@@ -266,4 +266,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
|
|
|
266
266
|
export {
|
|
267
267
|
RichSelectList_default
|
|
268
268
|
};
|
|
269
|
-
//# sourceMappingURL=
|
|
269
|
+
//# sourceMappingURL=BGSF75WT.js.map
|
|
@@ -9,7 +9,7 @@ var _T5LYIWR3cjs = require('./T5LYIWR3.cjs');
|
|
|
9
9
|
var _JXI2A4FDcjs = require('./JXI2A4FD.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _UH56LVRGcjs = require('./UH56LVRG.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _76LTWV2Qcjs = require('./76LTWV2Q.cjs');
|
|
@@ -19,7 +19,7 @@ var _3UEOKPM2cjs = require('./3UEOKPM2.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _RWYADXNXcjs = require('./RWYADXNX.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _5AKXXMJGcjs = require('./5AKXXMJG.cjs');
|
|
@@ -170,7 +170,7 @@ function RichSelectList(props) {
|
|
|
170
170
|
})
|
|
171
171
|
) }),
|
|
172
172
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
173
|
-
|
|
173
|
+
_UH56LVRGcjs.Popover_default,
|
|
174
174
|
{
|
|
175
175
|
ref: overlayHandlerRef,
|
|
176
176
|
disabled,
|
|
@@ -231,7 +231,7 @@ function RichSelectList(props) {
|
|
|
231
231
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
232
232
|
"path",
|
|
233
233
|
{
|
|
234
|
-
fill: errorText ?
|
|
234
|
+
fill: errorText ? _RWYADXNXcjs.ColorBaseDestructive700 : _RWYADXNXcjs.ColorBaseGray800,
|
|
235
235
|
d: "M15.88 9.29 12 13.17 8.12 9.29a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0z"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -266,4 +266,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
|
|
|
266
266
|
|
|
267
267
|
|
|
268
268
|
exports.RichSelectList_default = RichSelectList_default;
|
|
269
|
-
//# sourceMappingURL=
|
|
269
|
+
//# sourceMappingURL=DSX7DSIZ.cjs.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./SVZOETLJ.js";
|
|
17
17
|
import {
|
|
18
18
|
Triggerable_default
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./JDTF77DO.js";
|
|
20
20
|
import {
|
|
21
21
|
OverlayVisibility
|
|
22
22
|
} from "./E5KMIBEU.js";
|
|
@@ -141,4 +141,4 @@ export {
|
|
|
141
141
|
AriaPopover,
|
|
142
142
|
Popover_default
|
|
143
143
|
};
|
|
144
|
-
//# sourceMappingURL=
|
|
144
|
+
//# sourceMappingURL=H4L7P2Y7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on
|
|
1
|
+
{"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on Tue, 07 May 2024 05:16:57 GMT\n */\n\nexport const ColorBaseBlack = \"#000000\";\nexport const ColorBaseDestructive100 = \"#fef3f5\";\nexport const ColorBaseDestructive200 = \"#fad6de\";\nexport const ColorBaseDestructive300 = \"#f2a2b2\";\nexport const ColorBaseDestructive700 = \"#d32a4b\";\nexport const ColorBaseDestructive800 = \"#81162c\";\nexport const ColorBaseDestructive900 = \"#55101d\";\nexport const ColorBaseGray10 = \"#cbcbcb\"; // Used as the default color for dividers and inner strokes\nexport const ColorBaseGray30 = \"#000000\"; // For IconButton background when on top of an image\nexport const ColorBaseGray60 = \"#000000\"; // Used for icon background in classroom video grid\nexport const ColorBaseGray80 = \"#000000\"; // Used as the background for modals\nexport const ColorBaseGray100 = \"#f7f7f7\";\nexport const ColorBaseGray200 = \"#f0f0f0\"; // Used for light mode backgrounds when showing card content on top\nexport const ColorBaseGray300 = \"#d0d0d0\"; // Used for component outlines, eg: select and textfield\nexport const ColorBaseGray700 = \"#767676\"; // For secondary text in light mode\nexport const ColorBaseGray800 = \"#353535\";\nexport const ColorBaseGray900 = \"#191919\"; // Default text color, Classroom background\nexport const ColorBaseOrange100 = \"#fdf2f0\";\nexport const ColorBaseOrange200 = \"#f6cdc4\";\nexport const ColorBaseOrange300 = \"#ec9987\";\nexport const ColorBaseOrange700 = \"#c34124\";\nexport const ColorBaseOrange800 = \"#732818\";\nexport const ColorBaseOrange900 = \"#4d1a10\";\nexport const ColorBasePrimary100 = \"#eff6fa\";\nexport const ColorBasePrimary200 = \"#c1dbe7\";\nexport const ColorBasePrimary300 = \"#84b7d0\";\nexport const ColorBasePrimary700 = \"#236482\";\nexport const ColorBasePrimary800 = \"#274858\";\nexport const ColorBasePrimary900 = \"#1b303b\";\nexport const ColorBaseSuccess100 = \"#eff7f1\";\nexport const ColorBaseSuccess200 = \"#bddcc6\";\nexport const ColorBaseSuccess300 = \"#81ba92\";\nexport const ColorBaseSuccess700 = \"#397b4d\";\nexport const ColorBaseSuccess800 = \"#2d4936\";\nexport const ColorBaseSuccess900 = \"#1e3124\";\nexport const ColorBasePurple100 = \"#f9f5fa\";\nexport const ColorBasePurple200 = \"#e8dceb\";\nexport const ColorBasePurple300 = \"#cdb4d3\";\nexport const ColorBasePurple700 = \"#8b5f95\";\nexport const ColorBasePurple800 = \"#523b58\";\nexport const ColorBasePurple900 = \"#37273b\";\nexport const ColorBaseYellow100 = \"#fdf5d9\";\nexport const ColorBaseYellow200 = \"#fbe8a3\";\nexport const ColorBaseYellow300 = \"#f8d663\";\nexport const ColorBaseYellow700 = \"#ffc929\";\nexport const ColorBaseYellow800 = \"#765f1c\";\nexport const ColorBaseYellow900 = \"#3b3009\";\nexport const ColorBaseWhite = \"#ffffff\";\nexport const ColorCambioBlack = \"#050500\";\nexport const ColorCambioWhite = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#888077\";\nexport const ColorCambioGray800 = \"#5c554d\";\nexport const ColorCambioGray870 = \"#5c554d\";\nexport const ColorCambioGray900 = \"#312b23\";\nexport const ColorCambioDestructive100 = \"#ffdeda\";\nexport const ColorCambioDestructive300 = \"#ff8071\";\nexport const ColorCambioDestructive370 = \"#ff8071\";\nexport const ColorCambioDestructive700 = \"#c93f32\";\nexport const ColorCambioDestructive770 = \"#c93f32\";\nexport const ColorCambioDestructive900 = \"#6d0002\";\nexport const ColorCambioSuccess100 = \"#daf2c8\";\nexport const ColorCambioSuccess300 = \"#84ce64\";\nexport const ColorCambioSuccess370 = \"#84ce64\";\nexport const ColorCambioSuccess700 = \"#3c7f20\";\nexport const ColorCambioSuccess770 = \"#3c7f20\";\nexport const ColorCambioSuccess900 = \"#103e00\";\nexport const ColorCambioRed = \"#f56e56\";\nexport const ColorCambioOrange = \"#ff8f57\";\nexport const ColorCambioTan = \"#ffb47d\";\nexport const ColorCambioCream = \"#fffad1\";\nexport const ColorCambioPurple = \"#6840a8\";\nexport const ColorCambioLilac = \"#b59ef0\";\nexport const ColorCambioThistle = \"#d69ca4\";\nexport const ColorCambioPink = \"#ffccea\";\nexport const ColorCambioNavy = \"#191142\";\nexport const ColorCambioTeal = \"#44a6cf\";\nexport const ColorCambioSlate = \"#7c9fc6\";\nexport const ColorCambioSky = \"#b1e8fc\";\nexport const ColorCambioYellow700 = \"#ffe733\";\nexport const ColorCambioTransparentFull = \"#000000\";\nexport const Elevation400 = \"0px 16px 32px 0px #00000040\";\nexport const SyntaxFontSansSerif = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\";\n"],"mappings":";;;AASO,IAAM,0BAA0B;AAWhC,IAAM,mBAAmB;","names":[]}
|
|
@@ -65,8 +65,9 @@ var Triggerable = forwardRef(function Triggerable2(props, forwardedRef) {
|
|
|
65
65
|
{
|
|
66
66
|
className: Triggerable_module_default.trigger,
|
|
67
67
|
style: {
|
|
68
|
-
display: "
|
|
69
|
-
|
|
68
|
+
display: "flex",
|
|
69
|
+
justifyContent: "center",
|
|
70
|
+
alignItems: "center"
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
)), {
|
|
@@ -80,4 +81,4 @@ var Triggerable_default = Triggerable;
|
|
|
80
81
|
export {
|
|
81
82
|
Triggerable_default
|
|
82
83
|
};
|
|
83
|
-
//# sourceMappingURL=
|
|
84
|
+
//# sourceMappingURL=JDTF77DO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react-aria-utils/Triggerable.tsx","css-module:./Triggerable.module.css#css-module"],"sourcesContent":["import React, {\n forwardRef,\n useImperativeHandle,\n type ReactElement,\n type Ref,\n type RefAttributes,\n useContext,\n useRef,\n} from \"react\";\nimport { mergeProps, useButton, useFocusable, useHover } from \"react-aria\";\nimport { OverlayTriggerStateContext } from \"react-aria-components\";\nimport { useObjectRef, mergeRefs } from \"@react-aria/utils\";\nimport { useHasTabbableChild } from \"@react-aria/focus\";\nimport { useDomRefSyntheticEventBridge } from \"./useDomRefSyntheticEventBridge\";\nimport styles from \"./Triggerable.module.css\";\n\nexport type OverlayHandlerRef = {\n open?: () => void;\n close?: () => void;\n};\n\ntype ReactElementWithRef<T = unknown> = ReactElement & RefAttributes<T>;\nfunction cloneWithRef<T>(children: ReactElementWithRef<T>, parentRef: Ref<T>) {\n // No need for the isValidElement check since children is already typed as a ReactElement\n return React.cloneElement(children, {\n ref: children.ref ? mergeRefs<T>(parentRef, children.ref) : parentRef,\n });\n}\n\nconst Triggerable = forwardRef<\n OverlayHandlerRef,\n {\n children?: ReactElement | (ReactElement & { ref?: Ref<Element> });\n disabled?: boolean;\n }\n>(function Triggerable(props, forwardedRef) {\n const { children, disabled: isDisabled } = props;\n const wrapperDomRef = useRef<HTMLElement>(null);\n const childRef = useObjectRef<HTMLElement>(null);\n const hasTabbableChild = useHasTabbableChild(wrapperDomRef);\n const focusableRef = hasTabbableChild ? childRef : wrapperDomRef;\n const { focusableProps } = useFocusable({ isDisabled }, focusableRef);\n const { buttonProps } = useButton(\n { elementType: \"span\", isDisabled },\n focusableRef,\n );\n const { hoverProps } = useHover({ isDisabled });\n // focus handlers are attached to tabbable child if present\n const { onFocus, onBlur, onKeyDown, onKeyUp, ...otherFocusableProps } =\n focusableProps;\n const focusableHandlerProps = { onFocus, onBlur, onKeyDown, onKeyUp };\n // attach focus handlers to tabbable child if present\n const child = children ? cloneWithRef(children, childRef) : children;\n useDomRefSyntheticEventBridge(focusableHandlerProps, childRef, {\n enabled: hasTabbableChild,\n });\n\n const overlayTriggerState = useContext(OverlayTriggerStateContext);\n // Expose open and close methods from any overlay context to parent component\n useImperativeHandle(forwardedRef, () => ({\n open: () => overlayTriggerState.open(),\n close: () => overlayTriggerState.close(),\n }));\n\n return (\n <span\n ref={wrapperDomRef}\n {...mergeProps(\n buttonProps,\n hasTabbableChild ? {} : focusableHandlerProps,\n otherFocusableProps,\n hoverProps,\n {\n className: styles.trigger,\n style: {\n display: \"
|
|
1
|
+
{"version":3,"sources":["../../src/react-aria-utils/Triggerable.tsx","css-module:./Triggerable.module.css#css-module"],"sourcesContent":["import React, {\n forwardRef,\n useImperativeHandle,\n type ReactElement,\n type Ref,\n type RefAttributes,\n useContext,\n useRef,\n} from \"react\";\nimport { mergeProps, useButton, useFocusable, useHover } from \"react-aria\";\nimport { OverlayTriggerStateContext } from \"react-aria-components\";\nimport { useObjectRef, mergeRefs } from \"@react-aria/utils\";\nimport { useHasTabbableChild } from \"@react-aria/focus\";\nimport { useDomRefSyntheticEventBridge } from \"./useDomRefSyntheticEventBridge\";\nimport styles from \"./Triggerable.module.css\";\n\nexport type OverlayHandlerRef = {\n open?: () => void;\n close?: () => void;\n};\n\ntype ReactElementWithRef<T = unknown> = ReactElement & RefAttributes<T>;\nfunction cloneWithRef<T>(children: ReactElementWithRef<T>, parentRef: Ref<T>) {\n // No need for the isValidElement check since children is already typed as a ReactElement\n return React.cloneElement(children, {\n ref: children.ref ? mergeRefs<T>(parentRef, children.ref) : parentRef,\n });\n}\n\nconst Triggerable = forwardRef<\n OverlayHandlerRef,\n {\n children?: ReactElement | (ReactElement & { ref?: Ref<Element> });\n disabled?: boolean;\n }\n>(function Triggerable(props, forwardedRef) {\n const { children, disabled: isDisabled } = props;\n const wrapperDomRef = useRef<HTMLElement>(null);\n const childRef = useObjectRef<HTMLElement>(null);\n const hasTabbableChild = useHasTabbableChild(wrapperDomRef);\n const focusableRef = hasTabbableChild ? childRef : wrapperDomRef;\n const { focusableProps } = useFocusable({ isDisabled }, focusableRef);\n const { buttonProps } = useButton(\n { elementType: \"span\", isDisabled },\n focusableRef,\n );\n const { hoverProps } = useHover({ isDisabled });\n // focus handlers are attached to tabbable child if present\n const { onFocus, onBlur, onKeyDown, onKeyUp, ...otherFocusableProps } =\n focusableProps;\n const focusableHandlerProps = { onFocus, onBlur, onKeyDown, onKeyUp };\n // attach focus handlers to tabbable child if present\n const child = children ? cloneWithRef(children, childRef) : children;\n useDomRefSyntheticEventBridge(focusableHandlerProps, childRef, {\n enabled: hasTabbableChild,\n });\n\n const overlayTriggerState = useContext(OverlayTriggerStateContext);\n // Expose open and close methods from any overlay context to parent component\n useImperativeHandle(forwardedRef, () => ({\n open: () => overlayTriggerState.open(),\n close: () => overlayTriggerState.close(),\n }));\n\n return (\n <span\n ref={wrapperDomRef}\n {...mergeProps(\n buttonProps,\n hasTabbableChild ? {} : focusableHandlerProps,\n otherFocusableProps,\n hoverProps,\n {\n className: styles.trigger,\n style: {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n },\n )}\n tabIndex={hasTabbableChild ? undefined : 0}\n >\n {child}\n </span>\n );\n});\n\nexport default Triggerable;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/react-aria-utils/Triggerable.module.css\"; export default {\"trigger\":\"_trigger_1efnf_1\"}"],"mappings":";;;;;;;;;;;AAAA,OAAO;AAAA,EACL;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,OACK;AACP,SAAS,YAAY,WAAW,cAAc,gBAAgB;AAC9D,SAAS,kCAAkC;AAC3C,SAAS,cAAc,iBAAiB;AACxC,SAAS,2BAA2B;;;ACZuE,IAAO,6BAAQ,EAAC,WAAU,mBAAkB;;;ADiEnJ;AA3CJ,SAAS,aAAgB,UAAkC,WAAmB;AAE5E,SAAO,MAAM,aAAa,UAAU;AAAA,IAClC,KAAK,SAAS,MAAM,UAAa,WAAW,SAAS,GAAG,IAAI;AAAA,EAC9D,CAAC;AACH;AAEA,IAAM,cAAc,WAMlB,SAASA,aAAY,OAAO,cAAc;AAC1C,QAAM,EAAE,UAAU,UAAU,WAAW,IAAI;AAC3C,QAAM,gBAAgB,OAAoB,IAAI;AAC9C,QAAM,WAAW,aAA0B,IAAI;AAC/C,QAAM,mBAAmB,oBAAoB,aAAa;AAC1D,QAAM,eAAe,mBAAmB,WAAW;AACnD,QAAM,EAAE,eAAe,IAAI,aAAa,EAAE,WAAW,GAAG,YAAY;AACpE,QAAM,EAAE,YAAY,IAAI;AAAA,IACtB,EAAE,aAAa,QAAQ,WAAW;AAAA,IAClC;AAAA,EACF;AACA,QAAM,EAAE,WAAW,IAAI,SAAS,EAAE,WAAW,CAAC;AAE9C,QACE,qBADM,WAAS,QAAQ,WAAW,QAhDtC,IAiDI,IAD8C,gCAC9C,IAD8C,CAAxC,WAAS,UAAQ,aAAW;AAEpC,QAAM,wBAAwB,EAAE,SAAS,QAAQ,WAAW,QAAQ;AAEpE,QAAM,QAAQ,WAAW,aAAa,UAAU,QAAQ,IAAI;AAC5D,gCAA8B,uBAAuB,UAAU;AAAA,IAC7D,SAAS;AAAA,EACX,CAAC;AAED,QAAM,sBAAsB,WAAW,0BAA0B;AAEjE,sBAAoB,cAAc,OAAO;AAAA,IACvC,MAAM,MAAM,oBAAoB,KAAK;AAAA,IACrC,OAAO,MAAM,oBAAoB,MAAM;AAAA,EACzC,EAAE;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,OACD;AAAA,MACF;AAAA,MACA,mBAAmB,CAAC,IAAI;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,QACE,WAAW,2BAAO;AAAA,QAClB,OAAO;AAAA,UACL,SAAS;AAAA,UACT,gBAAgB;AAAA,UAChB,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF,IAfD;AAAA,MAgBC,UAAU,mBAAmB,SAAY;AAAA,MAExC;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,sBAAQ;","names":["Triggerable"]}
|
|
@@ -19,7 +19,7 @@ var _QT6IRCGWcjs = require('./QT6IRCGW.cjs');
|
|
|
19
19
|
var _LLFHCGRAcjs = require('./LLFHCGRA.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _QR3HKPXFcjs = require('./QR3HKPXF.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _E5P6WRJDcjs = require('./E5P6WRJD.cjs');
|
|
@@ -140,7 +140,7 @@ var Tooltip = _react.forwardRef.call(void 0, function Tooltip2(props, ref) {
|
|
|
140
140
|
isOpen: open,
|
|
141
141
|
onOpenChange,
|
|
142
142
|
children: [
|
|
143
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
143
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _QR3HKPXFcjs.Triggerable_default, { children }),
|
|
144
144
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
145
145
|
AriaTooltip,
|
|
146
146
|
{
|
|
@@ -162,4 +162,4 @@ var Tooltip_default = Tooltip;
|
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
exports.AriaTooltip = AriaTooltip; exports.Tooltip_default = Tooltip_default;
|
|
165
|
-
//# sourceMappingURL=
|
|
165
|
+
//# sourceMappingURL=NT2USB3G.cjs.map
|
|
@@ -65,8 +65,9 @@ var Triggerable = _react.forwardRef.call(void 0, function Triggerable2(props, fo
|
|
|
65
65
|
{
|
|
66
66
|
className: Triggerable_module_default.trigger,
|
|
67
67
|
style: {
|
|
68
|
-
display: "
|
|
69
|
-
|
|
68
|
+
display: "flex",
|
|
69
|
+
justifyContent: "center",
|
|
70
|
+
alignItems: "center"
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
)), {
|
|
@@ -80,4 +81,4 @@ var Triggerable_default = Triggerable;
|
|
|
80
81
|
|
|
81
82
|
|
|
82
83
|
exports.Triggerable_default = Triggerable_default;
|
|
83
|
-
//# sourceMappingURL=
|
|
84
|
+
//# sourceMappingURL=QR3HKPXF.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/react-aria-utils/Triggerable.tsx","css-module:./Triggerable.module.css#css-module"],"names":["Triggerable"],"mappings":";;;;;;;;;;;AAAA,OAAO;AAAA,EACL;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,OACK;AACP,SAAS,YAAY,WAAW,cAAc,gBAAgB;AAC9D,SAAS,kCAAkC;AAC3C,SAAS,cAAc,iBAAiB;AACxC,SAAS,2BAA2B;;;ACZuE,IAAO,6BAAQ,EAAC,WAAU,mBAAkB;;;ADiEnJ;AA3CJ,SAAS,aAAgB,UAAkC,WAAmB;AAE5E,SAAO,MAAM,aAAa,UAAU;AAAA,IAClC,KAAK,SAAS,MAAM,UAAa,WAAW,SAAS,GAAG,IAAI;AAAA,EAC9D,CAAC;AACH;AAEA,IAAM,cAAc,WAMlB,SAASA,aAAY,OAAO,cAAc;AAC1C,QAAM,EAAE,UAAU,UAAU,WAAW,IAAI;AAC3C,QAAM,gBAAgB,OAAoB,IAAI;AAC9C,QAAM,WAAW,aAA0B,IAAI;AAC/C,QAAM,mBAAmB,oBAAoB,aAAa;AAC1D,QAAM,eAAe,mBAAmB,WAAW;AACnD,QAAM,EAAE,eAAe,IAAI,aAAa,EAAE,WAAW,GAAG,YAAY;AACpE,QAAM,EAAE,YAAY,IAAI;AAAA,IACtB,EAAE,aAAa,QAAQ,WAAW;AAAA,IAClC;AAAA,EACF;AACA,QAAM,EAAE,WAAW,IAAI,SAAS,EAAE,WAAW,CAAC;AAE9C,QACE,qBADM,WAAS,QAAQ,WAAW,QAhDtC,IAiDI,IAD8C,gCAC9C,IAD8C,CAAxC,WAAS,UAAQ,aAAW;AAEpC,QAAM,wBAAwB,EAAE,SAAS,QAAQ,WAAW,QAAQ;AAEpE,QAAM,QAAQ,WAAW,aAAa,UAAU,QAAQ,IAAI;AAC5D,gCAA8B,uBAAuB,UAAU;AAAA,IAC7D,SAAS;AAAA,EACX,CAAC;AAED,QAAM,sBAAsB,WAAW,0BAA0B;AAEjE,sBAAoB,cAAc,OAAO;AAAA,IACvC,MAAM,MAAM,oBAAoB,KAAK;AAAA,IACrC,OAAO,MAAM,oBAAoB,MAAM;AAAA,EACzC,EAAE;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,OACD;AAAA,MACF;AAAA,MACA,mBAAmB,CAAC,IAAI;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,QACE,WAAW,2BAAO;AAAA,QAClB,OAAO;AAAA,UACL,SAAS;AAAA,UACT,gBAAgB;AAAA,UAChB,YAAY;AAAA,QACd;AAAA,MACF;AAAA,IACF,IAfD;AAAA,MAgBC,UAAU,mBAAmB,SAAY;AAAA,MAExC;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,sBAAQ","sourcesContent":["import React, {\n forwardRef,\n useImperativeHandle,\n type ReactElement,\n type Ref,\n type RefAttributes,\n useContext,\n useRef,\n} from \"react\";\nimport { mergeProps, useButton, useFocusable, useHover } from \"react-aria\";\nimport { OverlayTriggerStateContext } from \"react-aria-components\";\nimport { useObjectRef, mergeRefs } from \"@react-aria/utils\";\nimport { useHasTabbableChild } from \"@react-aria/focus\";\nimport { useDomRefSyntheticEventBridge } from \"./useDomRefSyntheticEventBridge\";\nimport styles from \"./Triggerable.module.css\";\n\nexport type OverlayHandlerRef = {\n open?: () => void;\n close?: () => void;\n};\n\ntype ReactElementWithRef<T = unknown> = ReactElement & RefAttributes<T>;\nfunction cloneWithRef<T>(children: ReactElementWithRef<T>, parentRef: Ref<T>) {\n // No need for the isValidElement check since children is already typed as a ReactElement\n return React.cloneElement(children, {\n ref: children.ref ? mergeRefs<T>(parentRef, children.ref) : parentRef,\n });\n}\n\nconst Triggerable = forwardRef<\n OverlayHandlerRef,\n {\n children?: ReactElement | (ReactElement & { ref?: Ref<Element> });\n disabled?: boolean;\n }\n>(function Triggerable(props, forwardedRef) {\n const { children, disabled: isDisabled } = props;\n const wrapperDomRef = useRef<HTMLElement>(null);\n const childRef = useObjectRef<HTMLElement>(null);\n const hasTabbableChild = useHasTabbableChild(wrapperDomRef);\n const focusableRef = hasTabbableChild ? childRef : wrapperDomRef;\n const { focusableProps } = useFocusable({ isDisabled }, focusableRef);\n const { buttonProps } = useButton(\n { elementType: \"span\", isDisabled },\n focusableRef,\n );\n const { hoverProps } = useHover({ isDisabled });\n // focus handlers are attached to tabbable child if present\n const { onFocus, onBlur, onKeyDown, onKeyUp, ...otherFocusableProps } =\n focusableProps;\n const focusableHandlerProps = { onFocus, onBlur, onKeyDown, onKeyUp };\n // attach focus handlers to tabbable child if present\n const child = children ? cloneWithRef(children, childRef) : children;\n useDomRefSyntheticEventBridge(focusableHandlerProps, childRef, {\n enabled: hasTabbableChild,\n });\n\n const overlayTriggerState = useContext(OverlayTriggerStateContext);\n // Expose open and close methods from any overlay context to parent component\n useImperativeHandle(forwardedRef, () => ({\n open: () => overlayTriggerState.open(),\n close: () => overlayTriggerState.close(),\n }));\n\n return (\n <span\n ref={wrapperDomRef}\n {...mergeProps(\n buttonProps,\n hasTabbableChild ? {} : focusableHandlerProps,\n otherFocusableProps,\n hoverProps,\n {\n className: styles.trigger,\n style: {\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n },\n )}\n tabIndex={hasTabbableChild ? undefined : 0}\n >\n {child}\n </span>\n );\n});\n\nexport default Triggerable;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/react-aria-utils/Triggerable.module.css\"; export default {\"trigger\":\"_trigger_1efnf_1\"}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"names":[],"mappings":";;;AASO,IAAM,0BAA0B;AAWhC,IAAM,mBAAmB","sourcesContent":["/**\n * Do not edit directly\n * Generated on
|
|
1
|
+
{"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"names":[],"mappings":";;;AASO,IAAM,0BAA0B;AAWhC,IAAM,mBAAmB","sourcesContent":["/**\n * Do not edit directly\n * Generated on Tue, 07 May 2024 05:16:57 GMT\n */\n\nexport const ColorBaseBlack = \"#000000\";\nexport const ColorBaseDestructive100 = \"#fef3f5\";\nexport const ColorBaseDestructive200 = \"#fad6de\";\nexport const ColorBaseDestructive300 = \"#f2a2b2\";\nexport const ColorBaseDestructive700 = \"#d32a4b\";\nexport const ColorBaseDestructive800 = \"#81162c\";\nexport const ColorBaseDestructive900 = \"#55101d\";\nexport const ColorBaseGray10 = \"#cbcbcb\"; // Used as the default color for dividers and inner strokes\nexport const ColorBaseGray30 = \"#000000\"; // For IconButton background when on top of an image\nexport const ColorBaseGray60 = \"#000000\"; // Used for icon background in classroom video grid\nexport const ColorBaseGray80 = \"#000000\"; // Used as the background for modals\nexport const ColorBaseGray100 = \"#f7f7f7\";\nexport const ColorBaseGray200 = \"#f0f0f0\"; // Used for light mode backgrounds when showing card content on top\nexport const ColorBaseGray300 = \"#d0d0d0\"; // Used for component outlines, eg: select and textfield\nexport const ColorBaseGray700 = \"#767676\"; // For secondary text in light mode\nexport const ColorBaseGray800 = \"#353535\";\nexport const ColorBaseGray900 = \"#191919\"; // Default text color, Classroom background\nexport const ColorBaseOrange100 = \"#fdf2f0\";\nexport const ColorBaseOrange200 = \"#f6cdc4\";\nexport const ColorBaseOrange300 = \"#ec9987\";\nexport const ColorBaseOrange700 = \"#c34124\";\nexport const ColorBaseOrange800 = \"#732818\";\nexport const ColorBaseOrange900 = \"#4d1a10\";\nexport const ColorBasePrimary100 = \"#eff6fa\";\nexport const ColorBasePrimary200 = \"#c1dbe7\";\nexport const ColorBasePrimary300 = \"#84b7d0\";\nexport const ColorBasePrimary700 = \"#236482\";\nexport const ColorBasePrimary800 = \"#274858\";\nexport const ColorBasePrimary900 = \"#1b303b\";\nexport const ColorBaseSuccess100 = \"#eff7f1\";\nexport const ColorBaseSuccess200 = \"#bddcc6\";\nexport const ColorBaseSuccess300 = \"#81ba92\";\nexport const ColorBaseSuccess700 = \"#397b4d\";\nexport const ColorBaseSuccess800 = \"#2d4936\";\nexport const ColorBaseSuccess900 = \"#1e3124\";\nexport const ColorBasePurple100 = \"#f9f5fa\";\nexport const ColorBasePurple200 = \"#e8dceb\";\nexport const ColorBasePurple300 = \"#cdb4d3\";\nexport const ColorBasePurple700 = \"#8b5f95\";\nexport const ColorBasePurple800 = \"#523b58\";\nexport const ColorBasePurple900 = \"#37273b\";\nexport const ColorBaseYellow100 = \"#fdf5d9\";\nexport const ColorBaseYellow200 = \"#fbe8a3\";\nexport const ColorBaseYellow300 = \"#f8d663\";\nexport const ColorBaseYellow700 = \"#ffc929\";\nexport const ColorBaseYellow800 = \"#765f1c\";\nexport const ColorBaseYellow900 = \"#3b3009\";\nexport const ColorBaseWhite = \"#ffffff\";\nexport const ColorCambioBlack = \"#050500\";\nexport const ColorCambioWhite = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#888077\";\nexport const ColorCambioGray800 = \"#5c554d\";\nexport const ColorCambioGray870 = \"#5c554d\";\nexport const ColorCambioGray900 = \"#312b23\";\nexport const ColorCambioDestructive100 = \"#ffdeda\";\nexport const ColorCambioDestructive300 = \"#ff8071\";\nexport const ColorCambioDestructive370 = \"#ff8071\";\nexport const ColorCambioDestructive700 = \"#c93f32\";\nexport const ColorCambioDestructive770 = \"#c93f32\";\nexport const ColorCambioDestructive900 = \"#6d0002\";\nexport const ColorCambioSuccess100 = \"#daf2c8\";\nexport const ColorCambioSuccess300 = \"#84ce64\";\nexport const ColorCambioSuccess370 = \"#84ce64\";\nexport const ColorCambioSuccess700 = \"#3c7f20\";\nexport const ColorCambioSuccess770 = \"#3c7f20\";\nexport const ColorCambioSuccess900 = \"#103e00\";\nexport const ColorCambioRed = \"#f56e56\";\nexport const ColorCambioOrange = \"#ff8f57\";\nexport const ColorCambioTan = \"#ffb47d\";\nexport const ColorCambioCream = \"#fffad1\";\nexport const ColorCambioPurple = \"#6840a8\";\nexport const ColorCambioLilac = \"#b59ef0\";\nexport const ColorCambioThistle = \"#d69ca4\";\nexport const ColorCambioPink = \"#ffccea\";\nexport const ColorCambioNavy = \"#191142\";\nexport const ColorCambioTeal = \"#44a6cf\";\nexport const ColorCambioSlate = \"#7c9fc6\";\nexport const ColorCambioSky = \"#b1e8fc\";\nexport const ColorCambioYellow700 = \"#ffe733\";\nexport const ColorCambioTransparentFull = \"#000000\";\nexport const Elevation400 = \"0px 16px 32px 0px #00000040\";\nexport const SyntaxFontSansSerif = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\";\n"]}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./SVZOETLJ.js";
|
|
20
20
|
import {
|
|
21
21
|
Triggerable_default
|
|
22
|
-
} from "./
|
|
22
|
+
} from "./JDTF77DO.js";
|
|
23
23
|
import {
|
|
24
24
|
OverlayVisibility
|
|
25
25
|
} from "./E5KMIBEU.js";
|
|
@@ -162,4 +162,4 @@ export {
|
|
|
162
162
|
AriaTooltip,
|
|
163
163
|
Tooltip_default
|
|
164
164
|
};
|
|
165
|
-
//# sourceMappingURL=
|
|
165
|
+
//# sourceMappingURL=S2S77Y7G.js.map
|
|
@@ -16,7 +16,7 @@ var _IL22HCBFcjs = require('./IL22HCBF.cjs');
|
|
|
16
16
|
var _LLFHCGRAcjs = require('./LLFHCGRA.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _QR3HKPXFcjs = require('./QR3HKPXF.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
var _E5P6WRJDcjs = require('./E5P6WRJD.cjs');
|
|
@@ -129,7 +129,7 @@ var Popover = _react.forwardRef.call(void 0, function Popover2(props, ref) {
|
|
|
129
129
|
isOpen: open,
|
|
130
130
|
onOpenChange,
|
|
131
131
|
children: [
|
|
132
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
132
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _QR3HKPXFcjs.Triggerable_default, { disabled, ref, children }),
|
|
133
133
|
modal ? modalNode : popoverNode
|
|
134
134
|
]
|
|
135
135
|
}
|
|
@@ -141,4 +141,4 @@ var Popover_default = Popover;
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
exports.AriaPopover = AriaPopover; exports.Popover_default = Popover_default;
|
|
144
|
-
//# sourceMappingURL=
|
|
144
|
+
//# sourceMappingURL=UH56LVRG.cjs.map
|
|
@@ -5,7 +5,7 @@ var _4UJE5GMHcjs = require('./4UJE5GMH.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _RWYADXNXcjs = require('./RWYADXNX.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _XLUVINJWcjs = require('./XLUVINJW.cjs');
|
|
@@ -98,7 +98,7 @@ function SelectList({
|
|
|
98
98
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
99
99
|
"path",
|
|
100
100
|
{
|
|
101
|
-
fill: errorText ?
|
|
101
|
+
fill: errorText ? _RWYADXNXcjs.ColorBaseDestructive700 : _RWYADXNXcjs.ColorBaseGray800,
|
|
102
102
|
d: "M15.88 9.29 12 13.17 8.12 9.29a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0z"
|
|
103
103
|
}
|
|
104
104
|
)
|
|
@@ -122,4 +122,4 @@ SelectList.Option = _4UJE5GMHcjs.SelectOption_default;
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
exports.SelectList = SelectList;
|
|
125
|
-
//# sourceMappingURL=
|
|
125
|
+
//# sourceMappingURL=YFADRNTB.cjs.map
|
package/dist/index.cjs
CHANGED
|
@@ -31,11 +31,11 @@ require('./__chunks/THM3NAFO.cjs');
|
|
|
31
31
|
var _XMP55GA2cjs = require('./__chunks/XMP55GA2.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _YFADRNTBcjs = require('./__chunks/YFADRNTB.cjs');
|
|
35
35
|
require('./__chunks/4UJE5GMH.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _DSX7DSIZcjs = require('./__chunks/DSX7DSIZ.cjs');
|
|
39
39
|
require('./__chunks/T5LYIWR3.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
@@ -55,7 +55,7 @@ require('./__chunks/JXI2A4FD.cjs');
|
|
|
55
55
|
var _M3KSATCFcjs = require('./__chunks/M3KSATCF.cjs');
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _UH56LVRGcjs = require('./__chunks/UH56LVRG.cjs');
|
|
59
59
|
require('./__chunks/D62L3CWM.cjs');
|
|
60
60
|
require('./__chunks/76LTWV2Q.cjs');
|
|
61
61
|
|
|
@@ -64,7 +64,7 @@ var _PROA22UKcjs = require('./__chunks/PROA22UK.cjs');
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
var _3UEOKPM2cjs = require('./__chunks/3UEOKPM2.cjs');
|
|
67
|
-
require('./__chunks/
|
|
67
|
+
require('./__chunks/RWYADXNX.cjs');
|
|
68
68
|
require('./__chunks/5AKXXMJG.cjs');
|
|
69
69
|
require('./__chunks/MF7LLV7V.cjs');
|
|
70
70
|
require('./__chunks/T6Q66MTP.cjs');
|
|
@@ -79,7 +79,7 @@ require('./__chunks/RAL6R27S.cjs');
|
|
|
79
79
|
require('./__chunks/KZT53ITQ.cjs');
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
var
|
|
82
|
+
var _NT2USB3Gcjs = require('./__chunks/NT2USB3G.cjs');
|
|
83
83
|
require('./__chunks/PLUVW6AM.cjs');
|
|
84
84
|
require('./__chunks/IL22HCBF.cjs');
|
|
85
85
|
|
|
@@ -103,7 +103,7 @@ require('./__chunks/QT6IRCGW.cjs');
|
|
|
103
103
|
require('./__chunks/K4AUV2VK.cjs');
|
|
104
104
|
require('./__chunks/NOELZTQX.cjs');
|
|
105
105
|
require('./__chunks/LLFHCGRA.cjs');
|
|
106
|
-
require('./__chunks/
|
|
106
|
+
require('./__chunks/QR3HKPXF.cjs');
|
|
107
107
|
require('./__chunks/FZLDJPVT.cjs');
|
|
108
108
|
require('./__chunks/E5P6WRJD.cjs');
|
|
109
109
|
require('./__chunks/X2SDR4SD.cjs');
|
|
@@ -132,5 +132,5 @@ require('./__chunks/X2SDR4SD.cjs');
|
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
|
|
135
|
-
exports.Avatar = _JRTUP3VPcjs.Avatar_default; exports.AvatarGroup = _CHOHIFJNcjs.AvatarGroup; exports.Badge = _4GZL7Q7Gcjs.Badge_default; exports.Box = _FESAFV44cjs.Box_default; exports.Button = _ANY6BV2Wcjs.Button_default; exports.ButtonGroup = _C5XPZTFOcjs.ButtonGroup_default; exports.Card = _D5AQ3PGBcjs.Card; exports.Checkbox = _ZMLKUOZ2cjs.Checkbox_default; exports.Chip = _M3KSATCFcjs.Chip_default; exports.Divider = _DMA6PPUZcjs.Divider; exports.Heading = _NDV4446Acjs.Heading_default; exports.IconButton = _PROA22UKcjs.IconButton_default; exports.LinkButton = _5E23KLF4cjs.LinkButton_default; exports.Modal = _ICTDYMZMcjs.Modal; exports.Popover =
|
|
135
|
+
exports.Avatar = _JRTUP3VPcjs.Avatar_default; exports.AvatarGroup = _CHOHIFJNcjs.AvatarGroup; exports.Badge = _4GZL7Q7Gcjs.Badge_default; exports.Box = _FESAFV44cjs.Box_default; exports.Button = _ANY6BV2Wcjs.Button_default; exports.ButtonGroup = _C5XPZTFOcjs.ButtonGroup_default; exports.Card = _D5AQ3PGBcjs.Card; exports.Checkbox = _ZMLKUOZ2cjs.Checkbox_default; exports.Chip = _M3KSATCFcjs.Chip_default; exports.Divider = _DMA6PPUZcjs.Divider; exports.Heading = _NDV4446Acjs.Heading_default; exports.IconButton = _PROA22UKcjs.IconButton_default; exports.LinkButton = _5E23KLF4cjs.LinkButton_default; exports.Modal = _ICTDYMZMcjs.Modal; exports.Popover = _UH56LVRGcjs.Popover_default; exports.RadioButton = _WIHMNKU4cjs.RadioButton_default; exports.RichSelectList = _DSX7DSIZcjs.RichSelectList_default; exports.SelectList = _YFADRNTBcjs.SelectList; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _XMP55GA2cjs.TextArea_default; exports.TextField = _AC3JZOEZcjs.TextField; exports.ThemeProvider = _ASFZDRJJcjs.ThemeProvider; exports.Tooltip = _NT2USB3Gcjs.Tooltip_default; exports.Typography = _UUIXG3PQcjs.Typography_default;
|
|
136
136
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -31,11 +31,11 @@ import {
|
|
|
31
31
|
} from "./__chunks/AWBESVTU.js";
|
|
32
32
|
import {
|
|
33
33
|
SelectList
|
|
34
|
-
} from "./__chunks/
|
|
34
|
+
} from "./__chunks/B7DRDFQ5.js";
|
|
35
35
|
import "./__chunks/Y47XTR6M.js";
|
|
36
36
|
import {
|
|
37
37
|
RichSelectList_default
|
|
38
|
-
} from "./__chunks/
|
|
38
|
+
} from "./__chunks/BGSF75WT.js";
|
|
39
39
|
import "./__chunks/7TTYWZJV.js";
|
|
40
40
|
import {
|
|
41
41
|
ButtonGroup_default
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
} from "./__chunks/FHLZXSCX.js";
|
|
56
56
|
import {
|
|
57
57
|
Popover_default
|
|
58
|
-
} from "./__chunks/
|
|
58
|
+
} from "./__chunks/H4L7P2Y7.js";
|
|
59
59
|
import "./__chunks/FVGIQTM2.js";
|
|
60
60
|
import "./__chunks/TZGJS522.js";
|
|
61
61
|
import {
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
TapArea_default
|
|
66
66
|
} from "./__chunks/77FFPQY6.js";
|
|
67
|
-
import "./__chunks/
|
|
67
|
+
import "./__chunks/JCOCOPM4.js";
|
|
68
68
|
import "./__chunks/Y4BEP7DV.js";
|
|
69
69
|
import "./__chunks/DDUJFFG7.js";
|
|
70
70
|
import "./__chunks/52WECBHV.js";
|
|
@@ -79,7 +79,7 @@ import "./__chunks/T6PXFSRX.js";
|
|
|
79
79
|
import "./__chunks/PUTZ53EC.js";
|
|
80
80
|
import {
|
|
81
81
|
Tooltip_default
|
|
82
|
-
} from "./__chunks/
|
|
82
|
+
} from "./__chunks/S2S77Y7G.js";
|
|
83
83
|
import "./__chunks/ZOWOFYUE.js";
|
|
84
84
|
import "./__chunks/AVREYFSM.js";
|
|
85
85
|
import {
|
|
@@ -103,7 +103,7 @@ import "./__chunks/4U4UW4AK.js";
|
|
|
103
103
|
import "./__chunks/JB65NEXK.js";
|
|
104
104
|
import "./__chunks/BWPNF6RD.js";
|
|
105
105
|
import "./__chunks/SVZOETLJ.js";
|
|
106
|
-
import "./__chunks/
|
|
106
|
+
import "./__chunks/JDTF77DO.js";
|
|
107
107
|
import "./__chunks/7N4ZDVVD.js";
|
|
108
108
|
import "./__chunks/E5KMIBEU.js";
|
|
109
109
|
import "./__chunks/UWGNJENA.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _QR3HKPXFcjs = require('../__chunks/QR3HKPXF.cjs');
|
|
5
5
|
require('../__chunks/FZLDJPVT.cjs');
|
|
6
6
|
require('../__chunks/X2SDR4SD.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.default =
|
|
9
|
+
exports.default = _QR3HKPXFcjs.Triggerable_default;
|
|
10
10
|
//# sourceMappingURL=Triggerable.cjs.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cambly/syntax-core",
|
|
3
3
|
"description": "Cambly design system core components",
|
|
4
|
-
"version": "12.
|
|
4
|
+
"version": "12.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"react": "18.2.0",
|
|
29
29
|
"tsup": "6.7.0",
|
|
30
30
|
"typescript": "5.0.4",
|
|
31
|
-
"@cambly/syntax
|
|
32
|
-
"@cambly/
|
|
31
|
+
"@cambly/eslint-config-syntax": "1.4.0",
|
|
32
|
+
"@cambly/syntax-tsconfig": "1.4.1"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react-aria-utils/Triggerable.tsx","css-module:./Triggerable.module.css#css-module"],"names":["Triggerable"],"mappings":";;;;;;;;;;;AAAA,OAAO;AAAA,EACL;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,OACK;AACP,SAAS,YAAY,WAAW,cAAc,gBAAgB;AAC9D,SAAS,kCAAkC;AAC3C,SAAS,cAAc,iBAAiB;AACxC,SAAS,2BAA2B;;;ACZuE,IAAO,6BAAQ,EAAC,WAAU,mBAAkB;;;ADiEnJ;AA3CJ,SAAS,aAAgB,UAAkC,WAAmB;AAE5E,SAAO,MAAM,aAAa,UAAU;AAAA,IAClC,KAAK,SAAS,MAAM,UAAa,WAAW,SAAS,GAAG,IAAI;AAAA,EAC9D,CAAC;AACH;AAEA,IAAM,cAAc,WAMlB,SAASA,aAAY,OAAO,cAAc;AAC1C,QAAM,EAAE,UAAU,UAAU,WAAW,IAAI;AAC3C,QAAM,gBAAgB,OAAoB,IAAI;AAC9C,QAAM,WAAW,aAA0B,IAAI;AAC/C,QAAM,mBAAmB,oBAAoB,aAAa;AAC1D,QAAM,eAAe,mBAAmB,WAAW;AACnD,QAAM,EAAE,eAAe,IAAI,aAAa,EAAE,WAAW,GAAG,YAAY;AACpE,QAAM,EAAE,YAAY,IAAI;AAAA,IACtB,EAAE,aAAa,QAAQ,WAAW;AAAA,IAClC;AAAA,EACF;AACA,QAAM,EAAE,WAAW,IAAI,SAAS,EAAE,WAAW,CAAC;AAE9C,QACE,qBADM,WAAS,QAAQ,WAAW,QAhDtC,IAiDI,IAD8C,gCAC9C,IAD8C,CAAxC,WAAS,UAAQ,aAAW;AAEpC,QAAM,wBAAwB,EAAE,SAAS,QAAQ,WAAW,QAAQ;AAEpE,QAAM,QAAQ,WAAW,aAAa,UAAU,QAAQ,IAAI;AAC5D,gCAA8B,uBAAuB,UAAU;AAAA,IAC7D,SAAS;AAAA,EACX,CAAC;AAED,QAAM,sBAAsB,WAAW,0BAA0B;AAEjE,sBAAoB,cAAc,OAAO;AAAA,IACvC,MAAM,MAAM,oBAAoB,KAAK;AAAA,IACrC,OAAO,MAAM,oBAAoB,MAAM;AAAA,EACzC,EAAE;AAEF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,OACD;AAAA,MACF;AAAA,MACA,mBAAmB,CAAC,IAAI;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,QACE,WAAW,2BAAO;AAAA,QAClB,OAAO;AAAA,UACL,SAAS;AAAA,UACT,eAAe;AAAA,QACjB;AAAA,MACF;AAAA,IACF,IAdD;AAAA,MAeC,UAAU,mBAAmB,SAAY;AAAA,MAExC;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,sBAAQ","sourcesContent":["import React, {\n forwardRef,\n useImperativeHandle,\n type ReactElement,\n type Ref,\n type RefAttributes,\n useContext,\n useRef,\n} from \"react\";\nimport { mergeProps, useButton, useFocusable, useHover } from \"react-aria\";\nimport { OverlayTriggerStateContext } from \"react-aria-components\";\nimport { useObjectRef, mergeRefs } from \"@react-aria/utils\";\nimport { useHasTabbableChild } from \"@react-aria/focus\";\nimport { useDomRefSyntheticEventBridge } from \"./useDomRefSyntheticEventBridge\";\nimport styles from \"./Triggerable.module.css\";\n\nexport type OverlayHandlerRef = {\n open?: () => void;\n close?: () => void;\n};\n\ntype ReactElementWithRef<T = unknown> = ReactElement & RefAttributes<T>;\nfunction cloneWithRef<T>(children: ReactElementWithRef<T>, parentRef: Ref<T>) {\n // No need for the isValidElement check since children is already typed as a ReactElement\n return React.cloneElement(children, {\n ref: children.ref ? mergeRefs<T>(parentRef, children.ref) : parentRef,\n });\n}\n\nconst Triggerable = forwardRef<\n OverlayHandlerRef,\n {\n children?: ReactElement | (ReactElement & { ref?: Ref<Element> });\n disabled?: boolean;\n }\n>(function Triggerable(props, forwardedRef) {\n const { children, disabled: isDisabled } = props;\n const wrapperDomRef = useRef<HTMLElement>(null);\n const childRef = useObjectRef<HTMLElement>(null);\n const hasTabbableChild = useHasTabbableChild(wrapperDomRef);\n const focusableRef = hasTabbableChild ? childRef : wrapperDomRef;\n const { focusableProps } = useFocusable({ isDisabled }, focusableRef);\n const { buttonProps } = useButton(\n { elementType: \"span\", isDisabled },\n focusableRef,\n );\n const { hoverProps } = useHover({ isDisabled });\n // focus handlers are attached to tabbable child if present\n const { onFocus, onBlur, onKeyDown, onKeyUp, ...otherFocusableProps } =\n focusableProps;\n const focusableHandlerProps = { onFocus, onBlur, onKeyDown, onKeyUp };\n // attach focus handlers to tabbable child if present\n const child = children ? cloneWithRef(children, childRef) : children;\n useDomRefSyntheticEventBridge(focusableHandlerProps, childRef, {\n enabled: hasTabbableChild,\n });\n\n const overlayTriggerState = useContext(OverlayTriggerStateContext);\n // Expose open and close methods from any overlay context to parent component\n useImperativeHandle(forwardedRef, () => ({\n open: () => overlayTriggerState.open(),\n close: () => overlayTriggerState.close(),\n }));\n\n return (\n <span\n ref={wrapperDomRef}\n {...mergeProps(\n buttonProps,\n hasTabbableChild ? {} : focusableHandlerProps,\n otherFocusableProps,\n hoverProps,\n {\n className: styles.trigger,\n style: {\n display: \"inline-block\",\n verticalAlign: \"text-top\",\n },\n },\n )}\n tabIndex={hasTabbableChild ? undefined : 0}\n >\n {child}\n </span>\n );\n});\n\nexport default Triggerable;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/react-aria-utils/Triggerable.module.css\"; export default {\"trigger\":\"_trigger_1efnf_1\"}"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|