@cambly/syntax-core 12.6.0 → 12.8.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/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.d.ts +7 -1
- package/dist/Checkbox/Checkbox.js +1 -1
- package/dist/RadioButton/RadioButton.cjs +2 -2
- package/dist/RadioButton/RadioButton.d.ts +7 -1
- package/dist/RadioButton/RadioButton.js +1 -1
- package/dist/RichSelect/RichSelectBox.cjs +4 -4
- package/dist/RichSelect/RichSelectBox.js +3 -3
- package/dist/RichSelect/RichSelectList.cjs +6 -6
- package/dist/RichSelect/RichSelectList.js +5 -5
- package/dist/RichSelect/RichSelectRadioButton.cjs +3 -3
- package/dist/RichSelect/RichSelectRadioButton.js +2 -2
- package/dist/SelectList/SelectList.cjs +3 -3
- package/dist/SelectList/SelectList.js +2 -2
- package/dist/TextArea/TextArea.cjs +2 -2
- package/dist/TextArea/TextArea.js +1 -1
- package/dist/__chunks/{D5RNAJCX.js → 2VVQM7UT.js} +2 -2
- package/dist/__chunks/{6ER23PG5.cjs → 7FBJ7XRE.cjs} +3 -3
- package/dist/__chunks/{XD6YC7HP.cjs → 7IHXN4U4.cjs} +3 -3
- package/dist/__chunks/{T5NFBPT6.cjs → 7YBXLFIG.cjs} +2 -2
- package/dist/__chunks/7YBXLFIG.cjs.map +1 -0
- package/dist/__chunks/{4YLZ3ZKM.js → AMATQCW4.js} +1 -1
- package/dist/__chunks/{4YLZ3ZKM.js.map → AMATQCW4.js.map} +1 -1
- package/dist/__chunks/{Q7N54CYS.js → BU3EYSKD.js} +2 -2
- package/dist/__chunks/{4SYTZR75.js → DR35U5KW.js} +4 -2
- package/dist/__chunks/DR35U5KW.js.map +1 -0
- package/dist/__chunks/{K6VWXB7M.cjs → HFWEVQNS.cjs} +4 -2
- package/dist/__chunks/HFWEVQNS.cjs.map +1 -0
- package/dist/__chunks/{RKDIXZZU.cjs → HN4N2HE2.cjs} +3 -3
- package/dist/__chunks/{YIDLOSTD.cjs → JW7TVUPB.cjs} +4 -2
- package/dist/__chunks/JW7TVUPB.cjs.map +1 -0
- package/dist/__chunks/{2CI32K5M.cjs → NKW7S75C.cjs} +10 -10
- package/dist/__chunks/{DJL67KQ3.js → OQKBWMZ4.js} +2 -2
- package/dist/__chunks/{62PHRDGW.js → TVR4TJKV.js} +4 -2
- package/dist/__chunks/TVR4TJKV.js.map +1 -0
- package/dist/__chunks/{36CGIMVN.js → VTKZKP33.js} +2 -2
- package/dist/__chunks/VTKZKP33.js.map +1 -0
- package/dist/__chunks/{Y2IIT6PV.cjs → X5BCUOJU.cjs} +1 -1
- package/dist/__chunks/{Y2IIT6PV.cjs.map → X5BCUOJU.cjs.map} +1 -1
- package/dist/__chunks/{AANQ5GIN.js → ZAUKRP2N.js} +4 -4
- package/dist/index.cjs +9 -9
- package/dist/index.js +8 -8
- package/package.json +1 -1
- package/dist/__chunks/36CGIMVN.js.map +0 -1
- package/dist/__chunks/4SYTZR75.js.map +0 -1
- package/dist/__chunks/62PHRDGW.js.map +0 -1
- package/dist/__chunks/K6VWXB7M.cjs.map +0 -1
- package/dist/__chunks/T5NFBPT6.cjs.map +0 -1
- package/dist/__chunks/YIDLOSTD.cjs.map +0 -1
- /package/dist/__chunks/{D5RNAJCX.js.map → 2VVQM7UT.js.map} +0 -0
- /package/dist/__chunks/{6ER23PG5.cjs.map → 7FBJ7XRE.cjs.map} +0 -0
- /package/dist/__chunks/{XD6YC7HP.cjs.map → 7IHXN4U4.cjs.map} +0 -0
- /package/dist/__chunks/{Q7N54CYS.js.map → BU3EYSKD.js.map} +0 -0
- /package/dist/__chunks/{RKDIXZZU.cjs.map → HN4N2HE2.cjs.map} +0 -0
- /package/dist/__chunks/{2CI32K5M.cjs.map → NKW7S75C.cjs.map} +0 -0
- /package/dist/__chunks/{DJL67KQ3.js.map → OQKBWMZ4.js.map} +0 -0
- /package/dist/__chunks/{AANQ5GIN.js.map → ZAUKRP2N.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _HFWEVQNScjs = require('../__chunks/HFWEVQNS.cjs');
|
|
5
5
|
require('../__chunks/XLUVINJW.cjs');
|
|
6
6
|
require('../__chunks/GUACYIXB.cjs');
|
|
7
7
|
require('../__chunks/72UQX6IX.cjs');
|
|
@@ -12,5 +12,5 @@ require('../__chunks/NOELZTQX.cjs');
|
|
|
12
12
|
require('../__chunks/X2SDR4SD.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
exports.default =
|
|
15
|
+
exports.default = _HFWEVQNScjs.Checkbox_default;
|
|
16
16
|
//# sourceMappingURL=Checkbox.cjs.map
|
|
@@ -3,7 +3,7 @@ import React__default, { ReactElement } from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* [Checkbox](https://cambly-syntax.vercel.app/?path=/docs/components-checkbox--docs) is a clickable element that will show if an option has been selected or not.
|
|
5
5
|
*/
|
|
6
|
-
declare const Checkbox: ({ checked, "data-testid": dataTestId, disabled: disabledProp, size, label, error, onChange, }: {
|
|
6
|
+
declare const Checkbox: ({ checked, "data-testid": dataTestId, disabled: disabledProp, size, label, error, onChange, "aria-describedby": ariaDescribedby, }: {
|
|
7
7
|
/**
|
|
8
8
|
* Whether or not the box has been clicked
|
|
9
9
|
*
|
|
@@ -43,6 +43,12 @@ declare const Checkbox: ({ checked, "data-testid": dataTestId, disabled: disable
|
|
|
43
43
|
* @defaultValue false
|
|
44
44
|
*/
|
|
45
45
|
error?: boolean | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The aria-describedby attribute for the checkbox. This aria- prop identifies the element that describes the element on which the attribute is set.
|
|
48
|
+
*
|
|
49
|
+
* @defaultValue undefined
|
|
50
|
+
*/
|
|
51
|
+
"aria-describedby"?: string | undefined;
|
|
46
52
|
}) => ReactElement;
|
|
47
53
|
|
|
48
54
|
export { Checkbox as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _JW7TVUPBcjs = require('../__chunks/JW7TVUPB.cjs');
|
|
5
5
|
require('../__chunks/XLUVINJW.cjs');
|
|
6
6
|
require('../__chunks/FESAFV44.cjs');
|
|
7
7
|
require('../__chunks/WFVGNGEP.cjs');
|
|
@@ -16,5 +16,5 @@ require('../__chunks/NOELZTQX.cjs');
|
|
|
16
16
|
require('../__chunks/X2SDR4SD.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.default =
|
|
19
|
+
exports.default = _JW7TVUPBcjs.RadioButton_default;
|
|
20
20
|
//# sourceMappingURL=RadioButton.cjs.map
|
|
@@ -3,7 +3,7 @@ import React__default, { ReactElement } from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* [RadioButton](https://cambly-syntax.vercel.app/?path=/docs/components-radiobutton--docs) is a radio button with accompanying text
|
|
5
5
|
*/
|
|
6
|
-
declare const RadioButton: ({ checked, "data-testid": dataTestId, dangerouslyForceFocusStyles, disabled: disabledProp, error, id, label, name, onChange, size, value, }: {
|
|
6
|
+
declare const RadioButton: ({ checked, "data-testid": dataTestId, dangerouslyForceFocusStyles, disabled: disabledProp, error, id, label, name, onChange, size, value, "aria-describedby": ariaDescribedby, }: {
|
|
7
7
|
/**
|
|
8
8
|
* Whether or not the radio button is checked
|
|
9
9
|
*
|
|
@@ -57,6 +57,12 @@ declare const RadioButton: ({ checked, "data-testid": dataTestId, dangerouslyFor
|
|
|
57
57
|
value: string | number;
|
|
58
58
|
/** forces focus ring styling */
|
|
59
59
|
dangerouslyForceFocusStyles?: boolean | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The aria-describedby attribute for the RadioButton. This aria- prop identifies the element that describes the element on which the attribute is set.
|
|
62
|
+
*
|
|
63
|
+
* @defaultValue undefined
|
|
64
|
+
*/
|
|
65
|
+
"aria-describedby"?: string | undefined;
|
|
60
66
|
}) => ReactElement;
|
|
61
67
|
|
|
62
68
|
export { RadioButton as default };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _HN4N2HE2cjs = require('../__chunks/HN4N2HE2.cjs');
|
|
7
7
|
require('../__chunks/C5XPZTFO.cjs');
|
|
8
8
|
require('../__chunks/S2VK4XNL.cjs');
|
|
9
9
|
require('../__chunks/5JUNB754.cjs');
|
|
@@ -14,9 +14,9 @@ require('../__chunks/ID2WKUNH.cjs');
|
|
|
14
14
|
require('../__chunks/SFZ2MHPA.cjs');
|
|
15
15
|
require('../__chunks/ZTK7E42P.cjs');
|
|
16
16
|
require('../__chunks/MF7LLV7V.cjs');
|
|
17
|
-
require('../__chunks/
|
|
17
|
+
require('../__chunks/7FBJ7XRE.cjs');
|
|
18
18
|
require('../__chunks/RYUXG4AS.cjs');
|
|
19
|
-
require('../__chunks/
|
|
19
|
+
require('../__chunks/JW7TVUPB.cjs');
|
|
20
20
|
require('../__chunks/XLUVINJW.cjs');
|
|
21
21
|
require('../__chunks/FESAFV44.cjs');
|
|
22
22
|
require('../__chunks/MKZONAGT.cjs');
|
|
@@ -38,5 +38,5 @@ require('../__chunks/X2SDR4SD.cjs');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
exports.RichSelectBoxContext =
|
|
41
|
+
exports.RichSelectBoxContext = _HN4N2HE2cjs.RichSelectBoxContext; exports.convertSelection = _HN4N2HE2cjs.convertSelection; exports.default = _HN4N2HE2cjs.RichSelectBox_default;
|
|
42
42
|
//# sourceMappingURL=RichSelectBox.cjs.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
RichSelectBoxContext,
|
|
4
4
|
RichSelectBox_default,
|
|
5
5
|
convertSelection
|
|
6
|
-
} from "../__chunks/
|
|
6
|
+
} from "../__chunks/OQKBWMZ4.js";
|
|
7
7
|
import "../__chunks/BOX3VY3Q.js";
|
|
8
8
|
import "../__chunks/7EM2GOIC.js";
|
|
9
9
|
import "../__chunks/Z5ZUAP2B.js";
|
|
@@ -14,9 +14,9 @@ import "../__chunks/TQ7D5O7L.js";
|
|
|
14
14
|
import "../__chunks/Q6657TAT.js";
|
|
15
15
|
import "../__chunks/HN2MMSUI.js";
|
|
16
16
|
import "../__chunks/DDUJFFG7.js";
|
|
17
|
-
import "../__chunks/
|
|
17
|
+
import "../__chunks/BU3EYSKD.js";
|
|
18
18
|
import "../__chunks/ODMJANSX.js";
|
|
19
|
-
import "../__chunks/
|
|
19
|
+
import "../__chunks/DR35U5KW.js";
|
|
20
20
|
import "../__chunks/KKADUD65.js";
|
|
21
21
|
import "../__chunks/M36V23WR.js";
|
|
22
22
|
import "../__chunks/UVQS6LU3.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
4
|
+
var _NKW7S75Ccjs = require('../__chunks/NKW7S75C.cjs');
|
|
5
|
+
require('../__chunks/HN4N2HE2.cjs');
|
|
6
6
|
require('../__chunks/C5XPZTFO.cjs');
|
|
7
7
|
require('../__chunks/S2VK4XNL.cjs');
|
|
8
8
|
require('../__chunks/5JUNB754.cjs');
|
|
@@ -16,12 +16,12 @@ require('../__chunks/TYPTB7HD.cjs');
|
|
|
16
16
|
require('../__chunks/76LTWV2Q.cjs');
|
|
17
17
|
require('../__chunks/63XQSPT7.cjs');
|
|
18
18
|
require('../__chunks/3UEOKPM2.cjs');
|
|
19
|
-
require('../__chunks/
|
|
19
|
+
require('../__chunks/X5BCUOJU.cjs');
|
|
20
20
|
require('../__chunks/ZTK7E42P.cjs');
|
|
21
21
|
require('../__chunks/MF7LLV7V.cjs');
|
|
22
|
-
require('../__chunks/
|
|
22
|
+
require('../__chunks/7FBJ7XRE.cjs');
|
|
23
23
|
require('../__chunks/RYUXG4AS.cjs');
|
|
24
|
-
require('../__chunks/
|
|
24
|
+
require('../__chunks/JW7TVUPB.cjs');
|
|
25
25
|
require('../__chunks/XLUVINJW.cjs');
|
|
26
26
|
require('../__chunks/FESAFV44.cjs');
|
|
27
27
|
require('../__chunks/MKZONAGT.cjs');
|
|
@@ -46,5 +46,5 @@ require('../__chunks/E5P6WRJD.cjs');
|
|
|
46
46
|
require('../__chunks/X2SDR4SD.cjs');
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
exports.default =
|
|
49
|
+
exports.default = _NKW7S75Ccjs.RichSelectList_default;
|
|
50
50
|
//# sourceMappingURL=RichSelectList.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
RichSelectList_default
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/ZAUKRP2N.js";
|
|
5
|
+
import "../__chunks/OQKBWMZ4.js";
|
|
6
6
|
import "../__chunks/BOX3VY3Q.js";
|
|
7
7
|
import "../__chunks/7EM2GOIC.js";
|
|
8
8
|
import "../__chunks/Z5ZUAP2B.js";
|
|
@@ -16,12 +16,12 @@ import "../__chunks/NPZBG5AK.js";
|
|
|
16
16
|
import "../__chunks/TZGJS522.js";
|
|
17
17
|
import "../__chunks/4JFE4NWI.js";
|
|
18
18
|
import "../__chunks/77FFPQY6.js";
|
|
19
|
-
import "../__chunks/
|
|
19
|
+
import "../__chunks/AMATQCW4.js";
|
|
20
20
|
import "../__chunks/HN2MMSUI.js";
|
|
21
21
|
import "../__chunks/DDUJFFG7.js";
|
|
22
|
-
import "../__chunks/
|
|
22
|
+
import "../__chunks/BU3EYSKD.js";
|
|
23
23
|
import "../__chunks/ODMJANSX.js";
|
|
24
|
-
import "../__chunks/
|
|
24
|
+
import "../__chunks/DR35U5KW.js";
|
|
25
25
|
import "../__chunks/KKADUD65.js";
|
|
26
26
|
import "../__chunks/M36V23WR.js";
|
|
27
27
|
import "../__chunks/UVQS6LU3.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 _7FBJ7XREcjs = require('../__chunks/7FBJ7XRE.cjs');
|
|
5
5
|
require('../__chunks/RYUXG4AS.cjs');
|
|
6
|
-
require('../__chunks/
|
|
6
|
+
require('../__chunks/JW7TVUPB.cjs');
|
|
7
7
|
require('../__chunks/XLUVINJW.cjs');
|
|
8
8
|
require('../__chunks/FESAFV44.cjs');
|
|
9
9
|
require('../__chunks/WFVGNGEP.cjs');
|
|
@@ -18,5 +18,5 @@ require('../__chunks/NOELZTQX.cjs');
|
|
|
18
18
|
require('../__chunks/X2SDR4SD.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.default =
|
|
21
|
+
exports.default = _7FBJ7XREcjs.RichSelectRadioButton_default;
|
|
22
22
|
//# sourceMappingURL=RichSelectRadioButton.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
RichSelectRadioButton_default
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/BU3EYSKD.js";
|
|
5
5
|
import "../__chunks/ODMJANSX.js";
|
|
6
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/DR35U5KW.js";
|
|
7
7
|
import "../__chunks/KKADUD65.js";
|
|
8
8
|
import "../__chunks/M36V23WR.js";
|
|
9
9
|
import "../__chunks/4U4UW4AK.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 _7IHXN4U4cjs = require('../__chunks/7IHXN4U4.cjs');
|
|
5
5
|
require('../__chunks/JVGX637E.cjs');
|
|
6
|
-
require('../__chunks/
|
|
6
|
+
require('../__chunks/X5BCUOJU.cjs');
|
|
7
7
|
require('../__chunks/XLUVINJW.cjs');
|
|
8
8
|
require('../__chunks/FESAFV44.cjs');
|
|
9
9
|
require('../__chunks/WFVGNGEP.cjs');
|
|
@@ -18,5 +18,5 @@ require('../__chunks/NOELZTQX.cjs');
|
|
|
18
18
|
require('../__chunks/X2SDR4SD.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.default =
|
|
21
|
+
exports.default = _7IHXN4U4cjs.SelectList;
|
|
22
22
|
//# sourceMappingURL=SelectList.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
SelectList
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/2VVQM7UT.js";
|
|
5
5
|
import "../__chunks/SPQ7DQHG.js";
|
|
6
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/AMATQCW4.js";
|
|
7
7
|
import "../__chunks/KKADUD65.js";
|
|
8
8
|
import "../__chunks/M36V23WR.js";
|
|
9
9
|
import "../__chunks/4U4UW4AK.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 _7YBXLFIGcjs = require('../__chunks/7YBXLFIG.cjs');
|
|
5
5
|
require('../__chunks/WFVGNGEP.cjs');
|
|
6
6
|
require('../__chunks/FESAFV44.cjs');
|
|
7
7
|
|
|
@@ -15,5 +15,5 @@ require('../__chunks/K4AUV2VK.cjs');
|
|
|
15
15
|
require('../__chunks/X2SDR4SD.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.default =
|
|
18
|
+
exports.default = _7YBXLFIGcjs.TextArea_default;
|
|
19
19
|
//# sourceMappingURL=TextArea.cjs.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
ColorBaseDestructive700,
|
|
7
7
|
ColorBaseGray800
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./AMATQCW4.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=2VVQM7UT.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _RYUXG4AScjs = require('./RYUXG4AS.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _JW7TVUPBcjs = require('./JW7TVUPB.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ var RichSelectRadioButton_default = _react.forwardRef.call(void 0,
|
|
|
19
19
|
function RichSelectRadioButton(props, ref) {
|
|
20
20
|
const _a = props, { size, name } = _a, otherProps = _X2SDR4SDcjs.__objRest.call(void 0, _a, ["size", "name"]);
|
|
21
21
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _RYUXG4AScjs.RichSelectItem_default, _X2SDR4SDcjs.__spreadProps.call(void 0, _X2SDR4SDcjs.__spreadValues.call(void 0, {}, otherProps), { ref, children: ({ isSelected, isFocusVisible, isDisabled }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
22
|
-
|
|
22
|
+
_JW7TVUPBcjs.RadioButton_default,
|
|
23
23
|
{
|
|
24
24
|
checked: isSelected,
|
|
25
25
|
disabled: isDisabled,
|
|
@@ -37,4 +37,4 @@ var RichSelectRadioButton_default = _react.forwardRef.call(void 0,
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
exports.RichSelectRadioButton_default = RichSelectRadioButton_default;
|
|
40
|
-
//# sourceMappingURL=
|
|
40
|
+
//# sourceMappingURL=7FBJ7XRE.cjs.map
|
|
@@ -5,7 +5,7 @@ var _JVGX637Ecjs = require('./JVGX637E.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _X5BCUOJUcjs = require('./X5BCUOJU.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 ? _X5BCUOJUcjs.ColorBaseDestructive700 : _X5BCUOJUcjs.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 = _JVGX637Ecjs.SelectOption_default;
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
exports.SelectList = SelectList;
|
|
125
|
-
//# sourceMappingURL=
|
|
125
|
+
//# sourceMappingURL=7IHXN4U4.cjs.map
|
|
@@ -54,7 +54,7 @@ var TextArea = _react.forwardRef.call(void 0,
|
|
|
54
54
|
},
|
|
55
55
|
position: "relative",
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FESAFV44cjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _GUACYIXBcjs.Typography_default, { size: 100, color: "gray700", children: label }) }) }),
|
|
57
|
+
label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FESAFV44cjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _GUACYIXBcjs.Typography_default, { size: 100, color: "gray700", children: label }) }) }),
|
|
58
58
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _GUACYIXBcjs.Typography_default, { size: 100, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
59
59
|
"textarea",
|
|
60
60
|
{
|
|
@@ -95,4 +95,4 @@ var TextArea_default = TextArea;
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
exports.TextArea_default = TextArea_default;
|
|
98
|
-
//# sourceMappingURL=
|
|
98
|
+
//# sourceMappingURL=7YBXLFIG.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/TextArea/TextArea.tsx","css-module:./TextArea.module.css#css-module","css-module:../TextField/TextField.module.css#css-module"],"names":["TextArea"],"mappings":";;;;;;;;;;;;AAEA,SAAmC,OAAO,kBAAkB;;;ACFoC,IAAO,0BAAQ,EAAC,YAAW,qBAAoB,cAAa,uBAAsB,oBAAmB,8BAA6B,kBAAiB,4BAA2B,cAAa,uBAAsB;;;ACA/M,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,uBAAsB;;;AFKhQ,OAAO,gBAAgB;AAuFjB,SAeQ,KAfR;AAxBN,IAAM,WAAW;AAAA,EACf,SAASA,UACP;AAAA,IACE,eAAe;AAAA,IACf,UAAU,eAAe;AAAA,IACzB,YAAY;AAAA,IACZ,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,OAAO;AAAA,IACP,QAAQ;AAAA,IACR;AAAA,IACA,SAAS;AAAA,EACX,GACA,cACc;AACd,UAAM,aAAa,cAAc;AACjC,UAAM,WAAW,CAAC,cAAc;AAChC,UAAM,UAAU,MAAM;AACtB,UAAM,UAAU,kBAAM;AAEtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,WAAU;AAAA,QACV,KAAK;AAAA,QACL,OAAM;AAAA,QACN,2BAA2B;AAAA,UACzB,SAAS;AAAA,YACP,SAAS,WAAW,MAAM;AAAA,UAC5B;AAAA,QACF;AAAA,QACA,UAAS;AAAA,QAER;AAAA,mBACC,oBAAC,WAAM,WAAW,yBAAgB,OAAO,SAAS,SAChD,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAM,WAC1B,iBACH,GACF,GACF;AAAA,UAEF,oBAAC,sBAAW,MAAM,KAChB;AAAA,YAAC;AAAA;AAAA,cACC,eAAa;AAAA,cACb,KAAK;AAAA,cACL,WAAW;AAAA,gBACT,yBAAgB;AAAA,gBAChB,wBAAO;AAAA,gBACP,wBAAO,SAAS,QAAQ;AAAA,gBACxB;AAAA,kBACE,CAAC,yBAAgB,UAAU,GAAG;AAAA,gBAChC;AAAA,cACF;AAAA,cACA,IAAI;AAAA,cACJ;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF,GACF;AAAA,WACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO,YAAY,wBAAwB;AAAA,cAE1C,uBAAa;AAAA;AAAA,UAChB,GACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ","sourcesContent":["import Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport React, { type ReactElement, useId, forwardRef } from \"react\";\nimport styles from \"./TextArea.module.css\";\nimport textFieldStyles from \"../TextField/TextField.module.css\";\nimport classNames from \"classnames\";\nimport useIsHydrated from \"../useIsHydrated\";\n\ntype TextAreaProps = {\n /**\n * A data-testid to make querying for the TextArea easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextArea will be disabled.\n */\n disabled?: boolean;\n /**\n * Text shown below TextArea if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextArea\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextArea visible label\n */\n label: string;\n /**\n * Maximum number of characters allowed in the TextArea\n */\n maxLength?: number;\n /**\n * Callback fired when the value is changed.\n */\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Placeholder text to display when TextArea is empty\n */\n placeholder?: string;\n /**\n * Sets which part resizes when the user drags the resize handle.\n * * `none`: TextArea can not be resized\n * * `horizontal`: TextArea can only be resized horizontally\n * * `vertical`: TextArea can only be resized vertically\n * * `both`: TextArea can be resized horizontally and vertically\n *\n * @defaultvalue `none`\n */\n resize?: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Number of rows to display\n */\n rows?: number;\n /**\n * Value of the TextArea\n */\n value: string;\n};\n\n/**\n * [TextArea](https://cambly-syntax.vercel.app/?path=/docs/components-textarea--docs) allows users to enter multiple lines of text.\n */\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength = 1024,\n placeholder = \"\",\n rows = 3,\n value = \"\",\n onChange,\n resize = \"none\",\n }: TextAreaProps,\n forwardedRef,\n ): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n position=\"relative\"\n >\n {label && (\n <label className={textFieldStyles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <Typography size={100}>\n <textarea\n data-testid={dataTestId}\n ref={forwardedRef}\n className={classNames(\n textFieldStyles.textfield,\n styles.textarea,\n styles[`resize${resize}`],\n {\n [textFieldStyles.inputError]: errorText,\n },\n )}\n id={inputId}\n placeholder={placeholder}\n maxLength={maxLength}\n onChange={onChange}\n rows={rows}\n value={value}\n disabled={disabled}\n />\n </Typography>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? \"destructive-primary\" : \"gray700\"}\n >\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n },\n);\n\nexport default TextArea;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextArea/TextArea.module.css\"; export default {\"textarea\":\"_textarea_1sb0v_1\",\"resizenone\":\"_resizenone_1sb0v_6\",\"resizehorizontal\":\"_resizehorizontal_1sb0v_10\",\"resizevertical\":\"_resizevertical_1sb0v_14\",\"resizeboth\":\"_resizeboth_1sb0v_18\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_wgza3_1\",\"label\":\"_label_wgza3_22\",\"md\":\"_md_wgza3_26\",\"height\":\"_height_wgza3_30\",\"inputError\":\"_inputError_wgza3_34\"}"]}
|
|
@@ -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, 14 May 2024 04:53:47 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":[]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./ODMJANSX.js";
|
|
5
5
|
import {
|
|
6
6
|
RadioButton_default
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./DR35U5KW.js";
|
|
8
8
|
import {
|
|
9
9
|
__objRest,
|
|
10
10
|
__spreadProps,
|
|
@@ -37,4 +37,4 @@ var RichSelectRadioButton_default = forwardRef(
|
|
|
37
37
|
export {
|
|
38
38
|
RichSelectRadioButton_default
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=
|
|
40
|
+
//# sourceMappingURL=BU3EYSKD.js.map
|
|
@@ -38,7 +38,8 @@ var RadioButton = ({
|
|
|
38
38
|
name,
|
|
39
39
|
onChange,
|
|
40
40
|
size = "md",
|
|
41
|
-
value
|
|
41
|
+
value,
|
|
42
|
+
"aria-describedby": ariaDescribedby
|
|
42
43
|
}) => {
|
|
43
44
|
const isHydrated = useIsHydrated();
|
|
44
45
|
const disabled = !isHydrated || disabledProp;
|
|
@@ -86,6 +87,7 @@ var RadioButton = ({
|
|
|
86
87
|
/* @__PURE__ */ jsx(
|
|
87
88
|
"input",
|
|
88
89
|
{
|
|
90
|
+
"aria-describedby": ariaDescribedby,
|
|
89
91
|
"data-testid": dataTestId,
|
|
90
92
|
type: "radio",
|
|
91
93
|
id,
|
|
@@ -127,4 +129,4 @@ var RadioButton_default = RadioButton;
|
|
|
127
129
|
export {
|
|
128
130
|
RadioButton_default
|
|
129
131
|
};
|
|
130
|
-
//# sourceMappingURL=
|
|
132
|
+
//# sourceMappingURL=DR35U5KW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/RadioButton/RadioButton.tsx","css-module:./RadioButton.module.css#css-module"],"sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./RadioButton.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport colorStyles from \"../colors/colors.module.css\";\nimport Box from \"../Box/Box\";\n\n/**\n * [RadioButton](https://cambly-syntax.vercel.app/?path=/docs/components-radiobutton--docs) is a radio button with accompanying text\n */\nconst RadioButton = ({\n checked = false,\n \"data-testid\": dataTestId,\n dangerouslyForceFocusStyles = false,\n disabled: disabledProp = false,\n error = false,\n id,\n label,\n name,\n onChange,\n size = \"md\",\n value,\n \"aria-describedby\": ariaDescribedby,\n}: {\n /**\n * Whether or not the radio button is checked\n *\n * @defaultValue false\n */\n checked?: boolean;\n /**\n * Test id for the radio button\n */\n \"data-testid\"?: string;\n /**\n * Whether or not the radio button is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Whether to show error color schema\n *\n * @defaultValue false\n */\n error?: boolean;\n /**\n * Id for the the radio button\n */\n id?: string;\n /**\n * Value to show end user\n */\n label: string;\n /**\n * The name of the grouping the radio buttons are in\n */\n name: string;\n /**\n * The callback to be called when the radio button is clicked\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Size of the components\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * Value of the selected radio option\n */\n value: string | number;\n /** forces focus ring styling */\n dangerouslyForceFocusStyles?: boolean;\n /**\n * The aria-describedby attribute for the RadioButton. This aria- prop identifies the element that describes the element on which the attribute is set.\n *\n * @defaultValue undefined\n */\n \"aria-describedby\"?: string;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n return (\n <label\n className={classnames(\n styles.radioBaseContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div\n className={classnames(\n styles.background,\n error\n ? colorStyles.cambioDestructive370BackgroundColor\n : colorStyles.cambioGray370BackgroundColor,\n styles[size],\n {\n [focusStyles.accessibilityOutlineFocus]:\n (isFocused && isFocusVisible) || dangerouslyForceFocusStyles,\n },\n )}\n />\n {checked && (\n <Box\n backgroundColor={error ? \"destructive900\" : \"gray900\"}\n width={size === \"md\" ? 12 : 8}\n height={size === \"md\" ? 12 : 8}\n position=\"absolute\"\n rounding=\"full\"\n dangerouslySetInlineStyle={{\n __style: {\n left: size === \"md\" ? 6 : 4,\n },\n }}\n />\n )}\n <input\n aria-describedby={ariaDescribedby}\n data-testid={dataTestId}\n type=\"radio\"\n id={id}\n name={name}\n className={classnames(\n styles.radioStyleOverride,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.smOverride]: size === \"sm\",\n [styles.mdOverride]: size === \"md\",\n },\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n value={value}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n {label && (\n <Typography\n size={size === \"md\" ? 200 : 100}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n )}\n </label>\n );\n};\n\nexport default RadioButton;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/RadioButton/RadioButton.module.css\"; export default {\"radioBaseContainer\":\"_radioBaseContainer_1egeq_1\",\"disabled\":\"_disabled_1egeq_9\",\"cursorDisabled\":\"_cursorDisabled_1egeq_13\",\"cursorEnabled\":\"_cursorEnabled_1egeq_17\",\"smBase\":\"_smBase_1egeq_21\",\"mdBase\":\"_mdBase_1egeq_25\",\"radioStyleOverride\":\"_radioStyleOverride_1egeq_29\",\"smOverride\":\"_smOverride_1egeq_35\",\"mdOverride\":\"_mdOverride_1egeq_40\",\"background\":\"_background_1egeq_45\",\"sm\":\"_sm_1egeq_21\",\"md\":\"_md_1egeq_25\",\"neutralBorder\":\"_neutralBorder_1egeq_62\",\"smCheckedBorder\":\"_smCheckedBorder_1egeq_66\",\"mdCheckedBorder\":\"_mdCheckedBorder_1egeq_70\",\"errorBorderColor\":\"_errorBorderColor_1egeq_74\",\"borderColor\":\"_borderColor_1egeq_78\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,SAAmC,gBAAgB;AACnD,OAAO,gBAAgB;;;ACD+E,IAAO,6BAAQ,EAAC,sBAAqB,+BAA8B,YAAW,qBAAoB,kBAAiB,4BAA2B,iBAAgB,2BAA0B,UAAS,oBAAmB,UAAS,oBAAmB,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,cAAa,wBAAuB,MAAK,gBAAe,MAAK,gBAAe,iBAAgB,2BAA0B,mBAAkB,6BAA4B,mBAAkB,6BAA4B,oBAAmB,8BAA6B,eAAc,wBAAuB;;;AD8FrvB,SASE,KATF;AAhFJ,IAAM,cAAc,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,eAAe;AAAA,EACf,8BAA8B;AAAA,EAC9B,UAAU,eAAe;AAAA,EACzB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,oBAAoB;AACtB,MA4DoB;AAClB,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,EAAE,eAAe,IAAI,gBAAgB;AAE3C,SACE;AAAA,IAAC;AAAA;AA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C5B,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,sBAAQ;","names":[]}
|
|
@@ -39,7 +39,8 @@ var Checkbox = ({
|
|
|
39
39
|
size = "md",
|
|
40
40
|
label,
|
|
41
41
|
error = false,
|
|
42
|
-
onChange
|
|
42
|
+
onChange,
|
|
43
|
+
"aria-describedby": ariaDescribedby
|
|
43
44
|
}) => {
|
|
44
45
|
const isHydrated = _K4AUV2VKcjs.useIsHydrated.call(void 0, );
|
|
45
46
|
const disabled = !isHydrated || disabledProp;
|
|
@@ -80,6 +81,7 @@ var Checkbox = ({
|
|
|
80
81
|
"input",
|
|
81
82
|
{
|
|
82
83
|
"data-testid": dataTestId,
|
|
84
|
+
"aria-describedby": ariaDescribedby,
|
|
83
85
|
type: "checkbox",
|
|
84
86
|
className: _classnames2.default.call(void 0,
|
|
85
87
|
Checkbox_module_default.inputOverlay,
|
|
@@ -114,4 +116,4 @@ var Checkbox_default = Checkbox;
|
|
|
114
116
|
|
|
115
117
|
|
|
116
118
|
exports.Checkbox_default = Checkbox_default;
|
|
117
|
-
//# sourceMappingURL=
|
|
119
|
+
//# sourceMappingURL=HFWEVQNS.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Checkbox/Checkbox.tsx","css-module:./Checkbox.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAmC,gBAAgB;AACnD,OAAO,gBAAgB;;;ACDyE,IAAO,0BAAQ,EAAC,iBAAgB,0BAAyB,gBAAe,yBAAwB,YAAW,sBAAqB,YAAW,sBAAqB,kBAAiB,4BAA2B,iBAAgB,2BAA0B,MAAK,gBAAe,MAAK,gBAAe,kBAAiB,4BAA2B,kBAAiB,4BAA2B,aAAY,uBAAsB,kBAAiB,2BAA0B;;;ADoF/hB,SAwBQ,KAxBR;AA3EJ,IAAM,iBAAiB;AAAA,EACrB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AAAA,YACA,SAAS,MAAM;AACb,2BAAa,IAAI;AAAA,YACnB;AAAA,YACA,QAAQ,MAAM;AACZ,2BAAa,KAAK;AAAA,YACpB;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,eAAe,IAAI;AAAA,YACzB,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,mBAAQ","sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classNames from \"classnames\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport styles from \"./Checkbox.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport colorStyles from \"../colors/colors.module.css\";\n\nconst typographySize = {\n sm: 100,\n md: 200,\n} as const;\n\nconst iconWidth = {\n sm: 12,\n md: 20,\n};\n\n/**\n * [Checkbox](https://cambly-syntax.vercel.app/?path=/docs/components-checkbox--docs) is a clickable element that will show if an option has been selected or not.\n */\nconst Checkbox = ({\n checked = false,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n size = \"md\",\n label,\n error = false,\n onChange,\n \"aria-describedby\": ariaDescribedby,\n}: {\n /**\n * Whether or not the box has been clicked\n *\n * @defaultValue false\n */\n checked: boolean;\n /**\n * Test id for the checkbox\n */\n \"data-testid\"?: string;\n /**\n * The callback to be called when the checkbox value changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether or not the box is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * The size of the checkbox and icon\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * The text accompanying the checkbox\n */\n label: string;\n /**\n * Whether or not there is an error with the input\n *\n * @defaultValue false\n */\n error?: boolean;\n /**\n * The aria-describedby attribute for the checkbox. This aria- prop identifies the element that describes the element on which the attribute is set.\n *\n * @defaultValue undefined\n */\n \"aria-describedby\"?: string;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n return (\n <label\n className={classNames(\n styles.mainContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div\n className={classNames(\n styles.checkbox,\n styles[size],\n {\n [focusStyles.accessibilityOutlineFocus]:\n isFocused && isFocusVisible,\n },\n error\n ? colorStyles.cambioDestructive370BackgroundColor\n : colorStyles.cambioGray370BackgroundColor,\n )}\n >\n {checked && (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width={iconWidth[size]}>\n <path\n className={error ? styles.checkmarkError : styles.checkmark}\n d=\"m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4 9.55 18Z\"\n ></path>\n </svg>\n )}\n </div>\n <input\n data-testid={dataTestId}\n aria-describedby={ariaDescribedby}\n type=\"checkbox\"\n className={classNames(\n styles.inputOverlay,\n styles[size],\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n <Typography\n size={typographySize[size]}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n </label>\n );\n};\n\nexport default Checkbox;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Checkbox/Checkbox.module.css\"; export default {\"mainContainer\":\"_mainContainer_1dut8_1\",\"inputOverlay\":\"_inputOverlay_1dut8_9\",\"checkbox\":\"_checkbox_1dut8_17\",\"disabled\":\"_disabled_1dut8_27\",\"cursorDisabled\":\"_cursorDisabled_1dut8_31\",\"cursorEnabled\":\"_cursorEnabled_1dut8_35\",\"sm\":\"_sm_1dut8_39\",\"md\":\"_md_1dut8_44\",\"smBorderRadius\":\"_smBorderRadius_1dut8_49\",\"mdBorderRadius\":\"_mdBorderRadius_1dut8_53\",\"checkmark\":\"_checkmark_1dut8_57\",\"checkmarkError\":\"_checkmarkError_1dut8_61\"}"]}
|
|
@@ -16,7 +16,7 @@ var _ID2WKUNHcjs = require('./ID2WKUNH.cjs');
|
|
|
16
16
|
var _ZTK7E42Pcjs = require('./ZTK7E42P.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _7FBJ7XREcjs = require('./7FBJ7XRE.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -200,7 +200,7 @@ var RichSelectBox = _react.forwardRef.call(void 0,
|
|
|
200
200
|
var RichSelectBox_default = Object.assign(RichSelectBox, {
|
|
201
201
|
Section: _ZTK7E42Pcjs.RichSelectSection_default,
|
|
202
202
|
Chip: _ID2WKUNHcjs.RichSelectChip_default,
|
|
203
|
-
RadioButton:
|
|
203
|
+
RadioButton: _7FBJ7XREcjs.RichSelectRadioButton_default
|
|
204
204
|
});
|
|
205
205
|
|
|
206
206
|
|
|
@@ -208,4 +208,4 @@ var RichSelectBox_default = Object.assign(RichSelectBox, {
|
|
|
208
208
|
|
|
209
209
|
|
|
210
210
|
exports.convertSelection = convertSelection; exports.RichSelectBoxContext = RichSelectBoxContext; exports.RichSelectBox_default = RichSelectBox_default;
|
|
211
|
-
//# sourceMappingURL=
|
|
211
|
+
//# sourceMappingURL=HN4N2HE2.cjs.map
|
|
@@ -38,7 +38,8 @@ var RadioButton = ({
|
|
|
38
38
|
name,
|
|
39
39
|
onChange,
|
|
40
40
|
size = "md",
|
|
41
|
-
value
|
|
41
|
+
value,
|
|
42
|
+
"aria-describedby": ariaDescribedby
|
|
42
43
|
}) => {
|
|
43
44
|
const isHydrated = _K4AUV2VKcjs.useIsHydrated.call(void 0, );
|
|
44
45
|
const disabled = !isHydrated || disabledProp;
|
|
@@ -86,6 +87,7 @@ var RadioButton = ({
|
|
|
86
87
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
87
88
|
"input",
|
|
88
89
|
{
|
|
90
|
+
"aria-describedby": ariaDescribedby,
|
|
89
91
|
"data-testid": dataTestId,
|
|
90
92
|
type: "radio",
|
|
91
93
|
id,
|
|
@@ -127,4 +129,4 @@ var RadioButton_default = RadioButton;
|
|
|
127
129
|
|
|
128
130
|
|
|
129
131
|
exports.RadioButton_default = RadioButton_default;
|
|
130
|
-
//# sourceMappingURL=
|
|
132
|
+
//# sourceMappingURL=JW7TVUPB.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/RadioButton/RadioButton.tsx","css-module:./RadioButton.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,SAAmC,gBAAgB;AACnD,OAAO,gBAAgB;;;ACD+E,IAAO,6BAAQ,EAAC,sBAAqB,+BAA8B,YAAW,qBAAoB,kBAAiB,4BAA2B,iBAAgB,2BAA0B,UAAS,oBAAmB,UAAS,oBAAmB,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,cAAa,wBAAuB,MAAK,gBAAe,MAAK,gBAAe,iBAAgB,2BAA0B,mBAAkB,6BAA4B,mBAAkB,6BAA4B,oBAAmB,8BAA6B,eAAc,wBAAuB;;;AD8FrvB,SASE,KATF;AAhFJ,IAAM,cAAc,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,eAAe;AAAA,EACf,8BAA8B;AAAA,EAC9B,UAAU,eAAe;AAAA,EACzB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,oBAAoB;AACtB,MA4DoB;AAClB,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,EAAE,eAAe,IA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;AAAA,YACC,MAAM,SAAS,OAAO,MAAM;AAAA,YAC5B,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,sBAAQ","sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./RadioButton.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport colorStyles from \"../colors/colors.module.css\";\nimport Box from \"../Box/Box\";\n\n/**\n * [RadioButton](https://cambly-syntax.vercel.app/?path=/docs/components-radiobutton--docs) is a radio button with accompanying text\n */\nconst RadioButton = ({\n checked = false,\n \"data-testid\": dataTestId,\n dangerouslyForceFocusStyles = false,\n disabled: disabledProp = false,\n error = false,\n id,\n label,\n name,\n onChange,\n size = \"md\",\n value,\n \"aria-describedby\": ariaDescribedby,\n}: {\n /**\n * Whether or not the radio button is checked\n *\n * @defaultValue false\n */\n checked?: boolean;\n /**\n * Test id for the radio button\n */\n \"data-testid\"?: string;\n /**\n * Whether or not the radio button is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Whether to show error color schema\n *\n * @defaultValue false\n */\n error?: boolean;\n /**\n * Id for the the radio button\n */\n id?: string;\n /**\n * Value to show end user\n */\n label: string;\n /**\n * The name of the grouping the radio buttons are in\n */\n name: string;\n /**\n * The callback to be called when the radio button is clicked\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Size of the components\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * Value of the selected radio option\n */\n value: string | number;\n /** forces focus ring styling */\n dangerouslyForceFocusStyles?: boolean;\n /**\n * The aria-describedby attribute for the RadioButton. This aria- prop identifies the element that describes the element on which the attribute is set.\n *\n * @defaultValue undefined\n */\n \"aria-describedby\"?: string;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n return (\n <label\n className={classnames(\n styles.radioBaseContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div\n className={classnames(\n styles.background,\n error\n ? colorStyles.cambioDestructive370BackgroundColor\n : colorStyles.cambioGray370BackgroundColor,\n styles[size],\n {\n [focusStyles.accessibilityOutlineFocus]:\n (isFocused && isFocusVisible) || dangerouslyForceFocusStyles,\n },\n )}\n />\n {checked && (\n <Box\n backgroundColor={error ? \"destructive900\" : \"gray900\"}\n width={size === \"md\" ? 12 : 8}\n height={size === \"md\" ? 12 : 8}\n position=\"absolute\"\n rounding=\"full\"\n dangerouslySetInlineStyle={{\n __style: {\n left: size === \"md\" ? 6 : 4,\n },\n }}\n />\n )}\n <input\n aria-describedby={ariaDescribedby}\n data-testid={dataTestId}\n type=\"radio\"\n id={id}\n name={name}\n className={classnames(\n styles.radioStyleOverride,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.smOverride]: size === \"sm\",\n [styles.mdOverride]: size === \"md\",\n },\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n value={value}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n {label && (\n <Typography\n size={size === \"md\" ? 200 : 100}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n )}\n </label>\n );\n};\n\nexport default RadioButton;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/RadioButton/RadioButton.module.css\"; export default {\"radioBaseContainer\":\"_radioBaseContainer_1egeq_1\",\"disabled\":\"_disabled_1egeq_9\",\"cursorDisabled\":\"_cursorDisabled_1egeq_13\",\"cursorEnabled\":\"_cursorEnabled_1egeq_17\",\"smBase\":\"_smBase_1egeq_21\",\"mdBase\":\"_mdBase_1egeq_25\",\"radioStyleOverride\":\"_radioStyleOverride_1egeq_29\",\"smOverride\":\"_smOverride_1egeq_35\",\"mdOverride\":\"_mdOverride_1egeq_40\",\"background\":\"_background_1egeq_45\",\"sm\":\"_sm_1egeq_21\",\"md\":\"_md_1egeq_25\",\"neutralBorder\":\"_neutralBorder_1egeq_62\",\"smCheckedBorder\":\"_smCheckedBorder_1egeq_66\",\"mdCheckedBorder\":\"_mdCheckedBorder_1egeq_70\",\"errorBorderColor\":\"_errorBorderColor_1egeq_74\",\"borderColor\":\"_borderColor_1egeq_78\"}"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _HN4N2HE2cjs = require('./HN4N2HE2.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _ID2WKUNHcjs = require('./ID2WKUNH.cjs');
|
|
@@ -19,13 +19,13 @@ var _3UEOKPM2cjs = require('./3UEOKPM2.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _X5BCUOJUcjs = require('./X5BCUOJU.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _ZTK7E42Pcjs = require('./ZTK7E42P.cjs');
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _7FBJ7XREcjs = require('./7FBJ7XRE.cjs');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var _FESAFV44cjs = require('./FESAFV44.cjs');
|
|
@@ -100,11 +100,11 @@ function RichSelectList(props) {
|
|
|
100
100
|
const disabled = !isHydrated || disabledProp;
|
|
101
101
|
const overlayHandlerRef = _react.useRef.call(void 0, {});
|
|
102
102
|
const selectedKeysProp = _react.useMemo.call(void 0,
|
|
103
|
-
() =>
|
|
103
|
+
() => _HN4N2HE2cjs.convertSelection.call(void 0, selectedValuesProp),
|
|
104
104
|
[selectedValuesProp]
|
|
105
105
|
);
|
|
106
106
|
const defaultSelectedKeys = _react.useMemo.call(void 0,
|
|
107
|
-
() =>
|
|
107
|
+
() => _HN4N2HE2cjs.convertSelection.call(void 0, defaultSelectedValuesProp, /* @__PURE__ */ new Set()),
|
|
108
108
|
[defaultSelectedValuesProp]
|
|
109
109
|
);
|
|
110
110
|
const [selectedKeys, setSelectedKeys] = _utils.useControlledState.call(void 0,
|
|
@@ -142,7 +142,7 @@ function RichSelectList(props) {
|
|
|
142
142
|
_reactariacomponents.Provider,
|
|
143
143
|
{
|
|
144
144
|
values: [
|
|
145
|
-
[
|
|
145
|
+
[_HN4N2HE2cjs.RichSelectBoxContext, { autoFocus: true }],
|
|
146
146
|
[_76LTWV2Qcjs.DialogContext, { padding: autosave ? void 0 : 0 }]
|
|
147
147
|
// this is altering Popover's internal dialog padding to show the sticky save/close buttons. Ideally this could be avoided
|
|
148
148
|
],
|
|
@@ -182,7 +182,7 @@ function RichSelectList(props) {
|
|
|
182
182
|
padding: autosave ? void 0 : 5,
|
|
183
183
|
dangerouslySetInlineStyle: autosave ? void 0 : { __style: { paddingBottom: 0 } },
|
|
184
184
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
185
|
-
|
|
185
|
+
_HN4N2HE2cjs.RichSelectBox_default,
|
|
186
186
|
_X2SDR4SDcjs.__spreadProps.call(void 0, _X2SDR4SDcjs.__spreadValues.call(void 0, {
|
|
187
187
|
autosave,
|
|
188
188
|
selectedValues: selectedKeys,
|
|
@@ -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 ? _X5BCUOJUcjs.ColorBaseDestructive700 : _X5BCUOJUcjs.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
|
)
|
|
@@ -260,10 +260,10 @@ function RichSelectList(props) {
|
|
|
260
260
|
var RichSelectList_default = Object.assign(RichSelectList, {
|
|
261
261
|
Section: _ZTK7E42Pcjs.RichSelectSection_default,
|
|
262
262
|
Chip: _ID2WKUNHcjs.RichSelectChip_default,
|
|
263
|
-
RadioButton:
|
|
263
|
+
RadioButton: _7FBJ7XREcjs.RichSelectRadioButton_default
|
|
264
264
|
});
|
|
265
265
|
|
|
266
266
|
|
|
267
267
|
|
|
268
268
|
exports.RichSelectList_default = RichSelectList_default;
|
|
269
|
-
//# sourceMappingURL=
|
|
269
|
+
//# sourceMappingURL=NKW7S75C.cjs.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./HN2MMSUI.js";
|
|
17
17
|
import {
|
|
18
18
|
RichSelectRadioButton_default
|
|
19
|
-
} from "./
|
|
19
|
+
} from "./BU3EYSKD.js";
|
|
20
20
|
import {
|
|
21
21
|
RichSelectItemContext,
|
|
22
22
|
RichSelect_module_default
|
|
@@ -208,4 +208,4 @@ export {
|
|
|
208
208
|
RichSelectBoxContext,
|
|
209
209
|
RichSelectBox_default
|
|
210
210
|
};
|
|
211
|
-
//# sourceMappingURL=
|
|
211
|
+
//# sourceMappingURL=OQKBWMZ4.js.map
|
|
@@ -39,7 +39,8 @@ var Checkbox = ({
|
|
|
39
39
|
size = "md",
|
|
40
40
|
label,
|
|
41
41
|
error = false,
|
|
42
|
-
onChange
|
|
42
|
+
onChange,
|
|
43
|
+
"aria-describedby": ariaDescribedby
|
|
43
44
|
}) => {
|
|
44
45
|
const isHydrated = useIsHydrated();
|
|
45
46
|
const disabled = !isHydrated || disabledProp;
|
|
@@ -80,6 +81,7 @@ var Checkbox = ({
|
|
|
80
81
|
"input",
|
|
81
82
|
{
|
|
82
83
|
"data-testid": dataTestId,
|
|
84
|
+
"aria-describedby": ariaDescribedby,
|
|
83
85
|
type: "checkbox",
|
|
84
86
|
className: classNames(
|
|
85
87
|
Checkbox_module_default.inputOverlay,
|
|
@@ -114,4 +116,4 @@ var Checkbox_default = Checkbox;
|
|
|
114
116
|
export {
|
|
115
117
|
Checkbox_default
|
|
116
118
|
};
|
|
117
|
-
//# sourceMappingURL=
|
|
119
|
+
//# sourceMappingURL=TVR4TJKV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Checkbox/Checkbox.tsx","css-module:./Checkbox.module.css#css-module"],"sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classNames from \"classnames\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport styles from \"./Checkbox.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport colorStyles from \"../colors/colors.module.css\";\n\nconst typographySize = {\n sm: 100,\n md: 200,\n} as const;\n\nconst iconWidth = {\n sm: 12,\n md: 20,\n};\n\n/**\n * [Checkbox](https://cambly-syntax.vercel.app/?path=/docs/components-checkbox--docs) is a clickable element that will show if an option has been selected or not.\n */\nconst Checkbox = ({\n checked = false,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n size = \"md\",\n label,\n error = false,\n onChange,\n \"aria-describedby\": ariaDescribedby,\n}: {\n /**\n * Whether or not the box has been clicked\n *\n * @defaultValue false\n */\n checked: boolean;\n /**\n * Test id for the checkbox\n */\n \"data-testid\"?: string;\n /**\n * The callback to be called when the checkbox value changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether or not the box is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * The size of the checkbox and icon\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * The text accompanying the checkbox\n */\n label: string;\n /**\n * Whether or not there is an error with the input\n *\n * @defaultValue false\n */\n error?: boolean;\n /**\n * The aria-describedby attribute for the checkbox. This aria- prop identifies the element that describes the element on which the attribute is set.\n *\n * @defaultValue undefined\n */\n \"aria-describedby\"?: string;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n return (\n <label\n className={classNames(\n styles.mainContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div\n className={classNames(\n styles.checkbox,\n styles[size],\n {\n [focusStyles.accessibilityOutlineFocus]:\n isFocused && isFocusVisible,\n },\n error\n ? colorStyles.cambioDestructive370BackgroundColor\n : colorStyles.cambioGray370BackgroundColor,\n )}\n >\n {checked && (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width={iconWidth[size]}>\n <path\n className={error ? styles.checkmarkError : styles.checkmark}\n d=\"m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4 9.55 18Z\"\n ></path>\n </svg>\n )}\n </div>\n <input\n data-testid={dataTestId}\n aria-describedby={ariaDescribedby}\n type=\"checkbox\"\n className={classNames(\n styles.inputOverlay,\n styles[size],\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n <Typography\n size={typographySize[size]}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n </label>\n );\n};\n\nexport default Checkbox;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Checkbox/Checkbox.module.css\"; export default {\"mainContainer\":\"_mainContainer_1dut8_1\",\"inputOverlay\":\"_inputOverlay_1dut8_9\",\"checkbox\":\"_checkbox_1dut8_17\",\"disabled\":\"_disabled_1dut8_27\",\"cursorDisabled\":\"_cursorDisabled_1dut8_31\",\"cursorEnabled\":\"_cursorEnabled_1dut8_35\",\"sm\":\"_sm_1dut8_39\",\"md\":\"_md_1dut8_44\",\"smBorderRadius\":\"_smBorderRadius_1dut8_49\",\"mdBorderRadius\":\"_mdBorderRadius_1dut8_53\",\"checkmark\":\"_checkmark_1dut8_57\",\"checkmarkError\":\"_checkmarkError_1dut8_61\"}"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAmC,gBAAgB;AACnD,OAAO,gBAAgB;;;ACDyE,IAAO,0BAAQ,EAAC,iBAAgB,0BAAyB,gBAAe,yBAAwB,YAAW,sBAAqB,YAAW,sBAAqB,kBAAiB,4BAA2B,iBAAgB,2BAA0B,MAAK,gBAAe,MAAK,gBAAe,kBAAiB,4BAA2B,kBAAiB,4BAA2B,aAAY,uBAAsB,kBAAiB,2BAA0B;;;ADoF/hB,SAwBQ,KAxBR;AA3EJ,IAAM,iBAAiB;AAAA,EACrB,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,YAAY;AAAA,EAChB,IAAI;AAAA,EACJ,IAAI;AACN;AAKA,IAAM,WAAW,CAAC;AAAA,EAChB,UAAU;AAAA,EACV,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,OAAO;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,oBAAoB;AACtB,MA8CoB;AAClB,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,EAAE,eAAe,IAAI,gBAAgB;AAE3C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,wBAAO;AAAA,QACP,wBAAO,SAAS,WAAW,aAAa,WAAW;AAAA,QACnD;AAAA,UACE,CAAC,wBAAO,QAAQ,GAAG;AAAA,QACrB;AAAA,MACF;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT,wBAAO;AAAA,cACP,wBAAO,IAAI;AAAA,cACX;AAAA,gBACE,CAAC,qBAAY,yBAAyB,GACpC,aAAa;AAAA,cACjB;AAAA,cACA,QACI,sBAAY,sCACZ,sBAAY;AAAA,YAClB;AAAA,YAEC,qBACC,oBAAC,SAAI,eAAY,QAAO,SAAQ,aAAY,OAAO,UAAU,IAAI,GAC/D;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW,QAAQ,wBAAO,iBAAiB,wBAAO;AAAA,gBAClD,GAAE;AAAA;AAAA,YACH,GACH;AAAA;AAAA,QAEJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,eAAa;AAAA,YACb,oBAAkB;AAAA,YAClB,MAAK;AAAA,YACL,WAAW;AAAA,cACT,wBAAO;AAAA,cACP,wBAAO,IAAI;AAAA,cACX,wBAAO,SAAS,WAAW,aAAa,WAAW;AAAA,YACrD;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,MAAM;AACb,2BAAa,IAAI;AAAA,YACnB;AAAA,YACA,QAAQ,MAAM;AACZ,2BAAa,KAAK;AAAA,YACpB;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,eAAe,IAAI;AAAA,YACzB,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,mBAAQ;","names":[]}
|
|
@@ -54,7 +54,7 @@ var TextArea = forwardRef(
|
|
|
54
54
|
},
|
|
55
55
|
position: "relative",
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */ jsx("label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(Typography_default, { size: 100, color: "gray700", children: label }) }) }),
|
|
57
|
+
label && /* @__PURE__ */ jsx("label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(Typography_default, { size: 100, color: "gray700", children: label }) }) }),
|
|
58
58
|
/* @__PURE__ */ jsx(Typography_default, { size: 100, children: /* @__PURE__ */ jsx(
|
|
59
59
|
"textarea",
|
|
60
60
|
{
|
|
@@ -95,4 +95,4 @@ var TextArea_default = TextArea;
|
|
|
95
95
|
export {
|
|
96
96
|
TextArea_default
|
|
97
97
|
};
|
|
98
|
-
//# sourceMappingURL=
|
|
98
|
+
//# sourceMappingURL=VTKZKP33.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/TextArea/TextArea.tsx","css-module:./TextArea.module.css#css-module","css-module:../TextField/TextField.module.css#css-module"],"sourcesContent":["import Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport React, { type ReactElement, useId, forwardRef } from \"react\";\nimport styles from \"./TextArea.module.css\";\nimport textFieldStyles from \"../TextField/TextField.module.css\";\nimport classNames from \"classnames\";\nimport useIsHydrated from \"../useIsHydrated\";\n\ntype TextAreaProps = {\n /**\n * A data-testid to make querying for the TextArea easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextArea will be disabled.\n */\n disabled?: boolean;\n /**\n * Text shown below TextArea if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextArea\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextArea visible label\n */\n label: string;\n /**\n * Maximum number of characters allowed in the TextArea\n */\n maxLength?: number;\n /**\n * Callback fired when the value is changed.\n */\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Placeholder text to display when TextArea is empty\n */\n placeholder?: string;\n /**\n * Sets which part resizes when the user drags the resize handle.\n * * `none`: TextArea can not be resized\n * * `horizontal`: TextArea can only be resized horizontally\n * * `vertical`: TextArea can only be resized vertically\n * * `both`: TextArea can be resized horizontally and vertically\n *\n * @defaultvalue `none`\n */\n resize?: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Number of rows to display\n */\n rows?: number;\n /**\n * Value of the TextArea\n */\n value: string;\n};\n\n/**\n * [TextArea](https://cambly-syntax.vercel.app/?path=/docs/components-textarea--docs) allows users to enter multiple lines of text.\n */\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength = 1024,\n placeholder = \"\",\n rows = 3,\n value = \"\",\n onChange,\n resize = \"none\",\n }: TextAreaProps,\n forwardedRef,\n ): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n position=\"relative\"\n >\n {label && (\n <label className={textFieldStyles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <Typography size={100}>\n <textarea\n data-testid={dataTestId}\n ref={forwardedRef}\n className={classNames(\n textFieldStyles.textfield,\n styles.textarea,\n styles[`resize${resize}`],\n {\n [textFieldStyles.inputError]: errorText,\n },\n )}\n id={inputId}\n placeholder={placeholder}\n maxLength={maxLength}\n onChange={onChange}\n rows={rows}\n value={value}\n disabled={disabled}\n />\n </Typography>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? \"destructive-primary\" : \"gray700\"}\n >\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n },\n);\n\nexport default TextArea;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextArea/TextArea.module.css\"; export default {\"textarea\":\"_textarea_1sb0v_1\",\"resizenone\":\"_resizenone_1sb0v_6\",\"resizehorizontal\":\"_resizehorizontal_1sb0v_10\",\"resizevertical\":\"_resizevertical_1sb0v_14\",\"resizeboth\":\"_resizeboth_1sb0v_18\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_wgza3_1\",\"label\":\"_label_wgza3_22\",\"md\":\"_md_wgza3_26\",\"height\":\"_height_wgza3_30\",\"inputError\":\"_inputError_wgza3_34\"}"],"mappings":";;;;;;;;;;;;AAEA,SAAmC,OAAO,kBAAkB;;;ACFoC,IAAO,0BAAQ,EAAC,YAAW,qBAAoB,cAAa,uBAAsB,oBAAmB,8BAA6B,kBAAiB,4BAA2B,cAAa,uBAAsB;;;ACA/M,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,uBAAsB;;;AFKhQ,OAAO,gBAAgB;AAuFjB,SAeQ,KAfR;AAxBN,IAAM,WAAW;AAAA,EACf,SAASA,UACP;AAAA,IACE,eAAe;AAAA,IACf,UAAU,eAAe;AAAA,IACzB,YAAY;AAAA,IACZ,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,OAAO;AAAA,IACP,QAAQ;AAAA,IACR;AAAA,IACA,SAAS;AAAA,EACX,GACA,cACc;AACd,UAAM,aAAa,cAAc;AACjC,UAAM,WAAW,CAAC,cAAc;AAChC,UAAM,UAAU,MAAM;AACtB,UAAM,UAAU,kBAAM;AAEtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,WAAU;AAAA,QACV,KAAK;AAAA,QACL,OAAM;AAAA,QACN,2BAA2B;AAAA,UACzB,SAAS;AAAA,YACP,SAAS,WAAW,MAAM;AAAA,UAC5B;AAAA,QACF;AAAA,QACA,UAAS;AAAA,QAER;AAAA,mBACC,oBAAC,WAAM,WAAW,yBAAgB,OAAO,SAAS,SAChD,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAM,WAC1B,iBACH,GACF,GACF;AAAA,UAEF,oBAAC,sBAAW,MAAM,KAChB;AAAA,YAAC;AAAA;AAAA,cACC,eAAa;AAAA,cACb,KAAK;AAAA,cACL,WAAW;AAAA,gBACT,yBAAgB;AAAA,gBAChB,wBAAO;AAAA,gBACP,wBAAO,SAAS,QAAQ;AAAA,gBACxB;AAAA,kBACE,CAAC,yBAAgB,UAAU,GAAG;AAAA,gBAChC;AAAA,cACF;AAAA,cACA,IAAI;AAAA,cACJ;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF,GACF;AAAA,WACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO,YAAY,wBAAwB;AAAA,cAE1C,uBAAa;AAAA;AAAA,UAChB,GACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;","names":["TextArea"]}
|
|
@@ -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, 14 May 2024 04:53:47 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"]}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
RichSelectBoxContext,
|
|
4
4
|
RichSelectBox_default,
|
|
5
5
|
convertSelection
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./OQKBWMZ4.js";
|
|
7
7
|
import {
|
|
8
8
|
RichSelectChip_default
|
|
9
9
|
} from "./TQ7D5O7L.js";
|
|
@@ -19,13 +19,13 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
ColorBaseDestructive700,
|
|
21
21
|
ColorBaseGray800
|
|
22
|
-
} from "./
|
|
22
|
+
} from "./AMATQCW4.js";
|
|
23
23
|
import {
|
|
24
24
|
RichSelectSection_default
|
|
25
25
|
} from "./HN2MMSUI.js";
|
|
26
26
|
import {
|
|
27
27
|
RichSelectRadioButton_default
|
|
28
|
-
} from "./
|
|
28
|
+
} from "./BU3EYSKD.js";
|
|
29
29
|
import {
|
|
30
30
|
Box_default
|
|
31
31
|
} from "./M36V23WR.js";
|
|
@@ -266,4 +266,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
|
|
|
266
266
|
export {
|
|
267
267
|
RichSelectList_default
|
|
268
268
|
};
|
|
269
|
-
//# sourceMappingURL=
|
|
269
|
+
//# sourceMappingURL=ZAUKRP2N.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -10,7 +10,7 @@ var _JRTUP3VPcjs = require('./__chunks/JRTUP3VP.cjs');
|
|
|
10
10
|
var _CHOHIFJNcjs = require('./__chunks/CHOHIFJN.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _HFWEVQNScjs = require('./__chunks/HFWEVQNS.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
var _D5AQ3PGBcjs = require('./__chunks/D5AQ3PGB.cjs');
|
|
@@ -34,16 +34,16 @@ require('./__chunks/EZUXET6V.cjs');
|
|
|
34
34
|
var _7X4KKISPcjs = require('./__chunks/7X4KKISP.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _7YBXLFIGcjs = require('./__chunks/7YBXLFIG.cjs');
|
|
38
38
|
require('./__chunks/WFVGNGEP.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _7IHXN4U4cjs = require('./__chunks/7IHXN4U4.cjs');
|
|
42
42
|
require('./__chunks/JVGX637E.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var
|
|
46
|
-
require('./__chunks/
|
|
45
|
+
var _NKW7S75Ccjs = require('./__chunks/NKW7S75C.cjs');
|
|
46
|
+
require('./__chunks/HN4N2HE2.cjs');
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
var _C5XPZTFOcjs = require('./__chunks/C5XPZTFO.cjs');
|
|
@@ -71,14 +71,14 @@ var _63XQSPT7cjs = require('./__chunks/63XQSPT7.cjs');
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
var _3UEOKPM2cjs = require('./__chunks/3UEOKPM2.cjs');
|
|
74
|
-
require('./__chunks/
|
|
74
|
+
require('./__chunks/X5BCUOJU.cjs');
|
|
75
75
|
require('./__chunks/ZTK7E42P.cjs');
|
|
76
76
|
require('./__chunks/MF7LLV7V.cjs');
|
|
77
|
-
require('./__chunks/
|
|
77
|
+
require('./__chunks/7FBJ7XRE.cjs');
|
|
78
78
|
require('./__chunks/RYUXG4AS.cjs');
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
var
|
|
81
|
+
var _JW7TVUPBcjs = require('./__chunks/JW7TVUPB.cjs');
|
|
82
82
|
require('./__chunks/XLUVINJW.cjs');
|
|
83
83
|
|
|
84
84
|
|
|
@@ -137,5 +137,5 @@ require('./__chunks/X2SDR4SD.cjs');
|
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
exports.Avatar = _JRTUP3VPcjs.Avatar_default; exports.AvatarGroup = _CHOHIFJNcjs.AvatarGroup; exports.Badge = _CQQJROZEcjs.Badge_default; exports.Box = _FESAFV44cjs.Box_default; exports.Button = _S2VK4XNLcjs.Button_default; exports.ButtonGroup = _C5XPZTFOcjs.ButtonGroup_default; exports.Card = _D5AQ3PGBcjs.Card; exports.Checkbox =
|
|
140
|
+
exports.Avatar = _JRTUP3VPcjs.Avatar_default; exports.AvatarGroup = _CHOHIFJNcjs.AvatarGroup; exports.Badge = _CQQJROZEcjs.Badge_default; exports.Box = _FESAFV44cjs.Box_default; exports.Button = _S2VK4XNLcjs.Button_default; exports.ButtonGroup = _C5XPZTFOcjs.ButtonGroup_default; exports.Card = _D5AQ3PGBcjs.Card; exports.Checkbox = _HFWEVQNScjs.Checkbox_default; exports.Chip = _SFZ2MHPAcjs.Chip_default; exports.Divider = _DMA6PPUZcjs.Divider; exports.Heading = _2OJKC2AXcjs.Heading_default; exports.Icon = _XMKQJFU6cjs.Icon_default; exports.IconButton = _63XQSPT7cjs.IconButton_default; exports.LinkButton = _W45CFJI7cjs.LinkButton_default; exports.Modal = _HK7T4244cjs.Modal; exports.Popover = _ELEREGBWcjs.Popover_default; exports.RadioButton = _JW7TVUPBcjs.RadioButton_default; exports.RichSelectList = _NKW7S75Ccjs.RichSelectList_default; exports.SelectList = _7IHXN4U4cjs.SelectList; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _7YBXLFIGcjs.TextArea_default; exports.TextField = _7X4KKISPcjs.TextField; exports.ThemeProvider = _ASFZDRJJcjs.ThemeProvider; exports.Tooltip = _7FYS3TSRcjs.Tooltip_default; exports.Typography = _GUACYIXBcjs.Typography_default;
|
|
141
141
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./__chunks/T32LVZ6S.js";
|
|
11
11
|
import {
|
|
12
12
|
Checkbox_default
|
|
13
|
-
} from "./__chunks/
|
|
13
|
+
} from "./__chunks/TVR4TJKV.js";
|
|
14
14
|
import {
|
|
15
15
|
Card
|
|
16
16
|
} from "./__chunks/535SBVS5.js";
|
|
@@ -34,16 +34,16 @@ import {
|
|
|
34
34
|
} from "./__chunks/D2WZPJL3.js";
|
|
35
35
|
import {
|
|
36
36
|
TextArea_default
|
|
37
|
-
} from "./__chunks/
|
|
37
|
+
} from "./__chunks/VTKZKP33.js";
|
|
38
38
|
import "./__chunks/4U4UW4AK.js";
|
|
39
39
|
import {
|
|
40
40
|
SelectList
|
|
41
|
-
} from "./__chunks/
|
|
41
|
+
} from "./__chunks/2VVQM7UT.js";
|
|
42
42
|
import "./__chunks/SPQ7DQHG.js";
|
|
43
43
|
import {
|
|
44
44
|
RichSelectList_default
|
|
45
|
-
} from "./__chunks/
|
|
46
|
-
import "./__chunks/
|
|
45
|
+
} from "./__chunks/ZAUKRP2N.js";
|
|
46
|
+
import "./__chunks/OQKBWMZ4.js";
|
|
47
47
|
import {
|
|
48
48
|
ButtonGroup_default
|
|
49
49
|
} from "./__chunks/BOX3VY3Q.js";
|
|
@@ -71,14 +71,14 @@ import {
|
|
|
71
71
|
import {
|
|
72
72
|
TapArea_default
|
|
73
73
|
} from "./__chunks/77FFPQY6.js";
|
|
74
|
-
import "./__chunks/
|
|
74
|
+
import "./__chunks/AMATQCW4.js";
|
|
75
75
|
import "./__chunks/HN2MMSUI.js";
|
|
76
76
|
import "./__chunks/DDUJFFG7.js";
|
|
77
|
-
import "./__chunks/
|
|
77
|
+
import "./__chunks/BU3EYSKD.js";
|
|
78
78
|
import "./__chunks/ODMJANSX.js";
|
|
79
79
|
import {
|
|
80
80
|
RadioButton_default
|
|
81
|
-
} from "./__chunks/
|
|
81
|
+
} from "./__chunks/DR35U5KW.js";
|
|
82
82
|
import "./__chunks/KKADUD65.js";
|
|
83
83
|
import {
|
|
84
84
|
Box_default
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/TextArea/TextArea.tsx","css-module:./TextArea.module.css#css-module","css-module:../TextField/TextField.module.css#css-module"],"sourcesContent":["import Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport React, { type ReactElement, useId, forwardRef } from \"react\";\nimport styles from \"./TextArea.module.css\";\nimport textFieldStyles from \"../TextField/TextField.module.css\";\nimport classNames from \"classnames\";\nimport useIsHydrated from \"../useIsHydrated\";\n\ntype TextAreaProps = {\n /**\n * A data-testid to make querying for the TextArea easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextArea will be disabled.\n */\n disabled?: boolean;\n /**\n * Text shown below TextArea if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextArea\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextArea visible label\n */\n label: string;\n /**\n * Maximum number of characters allowed in the TextArea\n */\n maxLength?: number;\n /**\n * Callback fired when the value is changed.\n */\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Placeholder text to display when TextArea is empty\n */\n placeholder?: string;\n /**\n * Sets which part resizes when the user drags the resize handle.\n * * `none`: TextArea can not be resized\n * * `horizontal`: TextArea can only be resized horizontally\n * * `vertical`: TextArea can only be resized vertically\n * * `both`: TextArea can be resized horizontally and vertically\n *\n * @defaultvalue `none`\n */\n resize?: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Number of rows to display\n */\n rows?: number;\n /**\n * Value of the TextArea\n */\n value: string;\n};\n\n/**\n * [TextArea](https://cambly-syntax.vercel.app/?path=/docs/components-textarea--docs) allows users to enter multiple lines of text.\n */\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength = 1024,\n placeholder = \"\",\n rows = 3,\n value = \"\",\n onChange,\n resize = \"none\",\n }: TextAreaProps,\n forwardedRef,\n ): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n position=\"relative\"\n >\n <label className={textFieldStyles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n <Typography size={100}>\n <textarea\n data-testid={dataTestId}\n ref={forwardedRef}\n className={classNames(\n textFieldStyles.textfield,\n styles.textarea,\n styles[`resize${resize}`],\n {\n [textFieldStyles.inputError]: errorText,\n },\n )}\n id={inputId}\n placeholder={placeholder}\n maxLength={maxLength}\n onChange={onChange}\n rows={rows}\n value={value}\n disabled={disabled}\n />\n </Typography>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? \"destructive-primary\" : \"gray700\"}\n >\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n },\n);\n\nexport default TextArea;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextArea/TextArea.module.css\"; export default {\"textarea\":\"_textarea_1sb0v_1\",\"resizenone\":\"_resizenone_1sb0v_6\",\"resizehorizontal\":\"_resizehorizontal_1sb0v_10\",\"resizevertical\":\"_resizevertical_1sb0v_14\",\"resizeboth\":\"_resizeboth_1sb0v_18\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_wgza3_1\",\"label\":\"_label_wgza3_22\",\"md\":\"_md_wgza3_26\",\"height\":\"_height_wgza3_30\",\"inputError\":\"_inputError_wgza3_34\"}"],"mappings":";;;;;;;;;;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ChC;AAAA,cACF;AAAA,cACA,IAAI;AAAA,cACJ;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF,GACF;AAAA,WACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO,YAAY,wBAAwB;AAAA,cAE1C,uBAAa;AAAA;AAAA,UAChB,GACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;","names":["TextArea"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/RadioButton/RadioButton.tsx","css-module:./RadioButton.module.css#css-module"],"sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./RadioButton.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport colorStyles from \"../colors/colors.module.css\";\nimport Box from \"../Box/Box\";\n\n/**\n * [RadioButton](https://cambly-syntax.vercel.app/?path=/docs/components-radiobutton--docs) is a radio button with accompanying text\n */\nconst RadioButton = ({\n checked = false,\n \"data-testid\": dataTestId,\n dangerouslyForceFocusStyles = false,\n disabled: disabledProp = false,\n error = false,\n id,\n label,\n name,\n onChange,\n size = \"md\",\n value,\n}: {\n /**\n * Whether or not the radio button is checked\n *\n * @defaultValue false\n */\n checked?: boolean;\n /**\n * Test id for the radio button\n */\n \"data-testid\"?: string;\n /**\n * Whether or not the radio button is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Whether to show error color schema\n *\n * @defaultValue false\n */\n error?: boolean;\n /**\n * Id for the the radio button\n */\n id?: string;\n /**\n * Value to show end user\n */\n label: string;\n /**\n * The name of the grouping the radio buttons are in\n */\n name: string;\n /**\n * The callback to be called when the radio button is clicked\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Size of the components\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * Value of the selected radio option\n */\n value: string | number;\n /** forces focus ring styling */\n dangerouslyForceFocusStyles?: boolean;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n return (\n <label\n className={classnames(\n styles.radioBaseContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div\n className={classnames(\n styles.background,\n error\n ? colorStyles.cambioDestructive370BackgroundColor\n : colorStyles.cambioGray370BackgroundColor,\n styles[size],\n {\n [focusStyles.accessibilityOutlineFocus]:\n (isFocused && isFocusVisible) || dangerouslyForceFocusStyles,\n },\n )}\n />\n {checked && (\n <Box\n backgroundColor={error ? \"destructive900\" : \"gray900\"}\n width={size === \"md\" ? 12 : 8}\n height={size === \"md\" ? 12 : 8}\n position=\"absolute\"\n rounding=\"full\"\n dangerouslySetInlineStyle={{\n __style: {\n left: size === \"md\" ? 6 : 4,\n },\n }}\n />\n )}\n <input\n data-testid={dataTestId}\n type=\"radio\"\n id={id}\n name={name}\n className={classnames(\n styles.radioStyleOverride,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.smOverride]: size === \"sm\",\n [styles.mdOverride]: size === \"md\",\n },\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n value={value}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n {label && (\n <Typography\n size={size === \"md\" ? 200 : 100}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n )}\n </label>\n );\n};\n\nexport default RadioButton;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/RadioButton/RadioButton.module.css\"; export default {\"radioBaseContainer\":\"_radioBaseContainer_1egeq_1\",\"disabled\":\"_disabled_1egeq_9\",\"cursorDisabled\":\"_cursorDisabled_1egeq_13\",\"cursorEnabled\":\"_cursorEnabled_1egeq_17\",\"smBase\":\"_smBase_1egeq_21\",\"mdBase\":\"_mdBase_1egeq_25\",\"radioStyleOverride\":\"_radioStyleOverride_1egeq_29\",\"smOverride\":\"_smOverride_1egeq_35\",\"mdOverride\":\"_mdOverride_1egeq_40\",\"background\":\"_background_1egeq_45\",\"sm\":\"_sm_1egeq_21\",\"md\":\"_md_1egeq_25\",\"neutralBorder\":\"_neutralBorder_1egeq_62\",\"smCheckedBorder\":\"_smCheckedBorder_1egeq_66\",\"mdCheckedBorder\":\"_mdCheckedBorder_1egeq_70\",\"errorBorderColor\":\"_errorBorderColor_1egeq_74\",\"borderColor\":\"_borderColor_1egeq_78\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,SAAmC,gBAAgB;AACnD,OAAO,gBAAgB;;;ACD+E,IAAO,6BAAQ,EAAC,sBAAqB,+BAA8B,YAAW,qBAAoB,kBAAiB,4BAA2B,iBAAgB,2BAA0B,UAAS,oBAAmB,UAAS,oBAAmB,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,cAAa,wBAAuB,MAAK,gBAAe,MAAK,gBAAe,iBAAgB,2BAA0B,mBAAkB,6BAA4B,mBAAkB,6BAA4B,oBAAmB,8BAA6B,eAAc,wBAAuB;;;ADuFrvB,SASE,KATF;AAzEJ,IAAM,cAAc,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,eAAe;AAAA,EACf,8BAA8B;AAAA,EAC9B,UAAU,eAAe;AAAA,EACzB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AACF,MAsDoB;AAClB,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,CAAC,WAAW,YAAY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ACC,SACC;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,SAAS,OAAO,MAAM;AAAA,YAC5B,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,sBAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Checkbox/Checkbox.tsx","css-module:./Checkbox.module.css#css-module"],"sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classNames from \"classnames\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport styles from \"./Checkbox.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport colorStyles from \"../colors/colors.module.css\";\n\nconst typographySize = {\n sm: 100,\n md: 200,\n} as const;\n\nconst iconWidth = {\n sm: 12,\n md: 20,\n};\n\n/**\n * [Checkbox](https://cambly-syntax.vercel.app/?path=/docs/components-checkbox--docs) is a clickable element that will show if an option has been selected or not.\n */\nconst Checkbox = ({\n checked = false,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n size = \"md\",\n label,\n error = false,\n onChange,\n}: {\n /**\n * Whether or not the box has been clicked\n *\n * @defaultValue false\n */\n checked: boolean;\n /**\n * Test id for the checkbox\n */\n \"data-testid\"?: string;\n /**\n * The callback to be called when the checkbox value changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether or not the box is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * The size of the checkbox and icon\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * The text accompanying the checkbox\n */\n label: string;\n /**\n * Whether or not there is an error with the input\n *\n * @defaultValue false\n */\n error?: boolean;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n return (\n <label\n className={classNames(\n styles.mainContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div\n className={classNames(\n styles.checkbox,\n styles[size],\n {\n [focusStyles.accessibilityOutlineFocus]:\n isFocused && isFocusVisible,\n },\n error\n ? colorStyles.cambioDestructive370BackgroundColor\n : colorStyles.cambioGray370BackgroundColor,\n )}\n >\n {checked && (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width={iconWidth[size]}>\n <path\n className={error ? styles.checkmarkError : styles.checkmark}\n d=\"m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4 9.55 18Z\"\n ></path>\n </svg>\n )}\n </div>\n <input\n data-testid={dataTestId}\n type=\"checkbox\"\n className={classNames(\n styles.inputOverlay,\n styles[size],\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n <Typography\n size={typographySize[size]}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n </label>\n );\n};\n\nexport default Checkbox;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Checkbox/Checkbox.module.css\"; export default {\"mainContainer\":\"_mainContainer_1dut8_1\",\"inputOverlay\":\"_inputOverlay_1dut8_9\",\"checkbox\":\"_checkbox_1dut8_17\",\"disabled\":\"_disabled_1dut8_27\",\"cursorDisabled\":\"_cursorDisabled_1dut8_31\",\"cursorEnabled\":\"_cursorEnabled_1dut8_35\",\"sm\":\"_sm_1dut8_39\",\"md\":\"_md_1dut8_44\",\"smBorderRadius\":\"_smBorderRadius_1dut8_49\",\"mdBorderRadius\":\"_mdBorderRadius_1dut8_53\",\"checkmark\":\"_checkmark_1dut8_57\",\"checkmarkError\":\"_checkm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,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,mBAAQ","sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classNames from \"classnames\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport styles from \"./Checkbox.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport colorStyles from \"../colors/colors.module.css\";\n\nconst typographySize = {\n sm: 100,\n md: 200,\n} as const;\n\nconst iconWidth = {\n sm: 12,\n md: 20,\n};\n\n/**\n * [Checkbox](https://cambly-syntax.vercel.app/?path=/docs/components-checkbox--docs) is a clickable element that will show if an option has been selected or not.\n */\nconst Checkbox = ({\n checked = false,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n size = \"md\",\n label,\n error = false,\n onChange,\n}: {\n /**\n * Whether or not the box has been clicked\n *\n * @defaultValue false\n */\n checked: boolean;\n /**\n * Test id for the checkbox\n */\n \"data-testid\"?: string;\n /**\n * The callback to be called when the checkbox value changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether or not the box is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * The size of the checkbox and icon\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * The text accompanying the checkbox\n */\n label: string;\n /**\n * Whether or not there is an error with the input\n *\n * @defaultValue false\n */\n error?: boolean;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n return (\n <label\n className={classNames(\n styles.mainContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div\n className={classNames(\n styles.checkbox,\n styles[size],\n {\n [focusStyles.accessibilityOutlineFocus]:\n isFocused && isFocusVisible,\n },\n error\n ? colorStyles.cambioDestructive370BackgroundColor\n : colorStyles.cambioGray370BackgroundColor,\n )}\n >\n {checked && (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width={iconWidth[size]}>\n <path\n className={error ? styles.checkmarkError : styles.checkmark}\n d=\"m9.55 18-5.7-5.7 1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4 9.55 18Z\"\n ></path>\n </svg>\n )}\n </div>\n <input\n data-testid={dataTestId}\n type=\"checkbox\"\n className={classNames(\n styles.inputOverlay,\n styles[size],\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n <Typography\n size={typographySize[size]}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n </label>\n );\n};\n\nexport default Checkbox;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Checkbox/Checkbox.module.css\"; export default {\"mainContainer\":\"_mainContainer_1dut8_1\",\"inputOverlay\":\"_inputOverlay_1dut8_9\",\"checkbox\":\"_checkbox_1dut8_17\",\"disabled\":\"_disabled_1dut8_27\",\"cursorDisabled\":\"_cursorDisabled_1dut8_31\",\"cursorEnabled\":\"_cursorEnabled_1dut8_35\",\"sm\":\"_sm_1dut8_39\",\"md\":\"_md_1dut8_44\",\"smBorderRadius\":\"_smBorderRadius_1dut8_49\",\"mdBorderRadius\":\"_mdBorderRadius_1dut8_53\",\"checkmark\":\"_checkmark_1dut8_57\",\"checkmarkError\":\"_checkmarkError_1dut8_61\"}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/TextArea/TextArea.tsx","css-module:./TextArea.module.css#css-module","css-module:../TextField/TextField.module.css#css-module"],"names":["TextArea"],"mappings":";;;;;;;;;;;;AAEA,SAAm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;AAAA,cACA,IAAI;AAAA,cACJ;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF,GACF;AAAA,WACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO,YAAY,wBAAwB;AAAA,cAE1C,uBAAa;AAAA;AAAA,UAChB,GACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ","sourcesContent":["import Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport React, { type ReactElement, useId, forwardRef } from \"react\";\nimport styles from \"./TextArea.module.css\";\nimport textFieldStyles from \"../TextField/TextField.module.css\";\nimport classNames from \"classnames\";\nimport useIsHydrated from \"../useIsHydrated\";\n\ntype TextAreaProps = {\n /**\n * A data-testid to make querying for the TextArea easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextArea will be disabled.\n */\n disabled?: boolean;\n /**\n * Text shown below TextArea if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextArea\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextArea visible label\n */\n label: string;\n /**\n * Maximum number of characters allowed in the TextArea\n */\n maxLength?: number;\n /**\n * Callback fired when the value is changed.\n */\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Placeholder text to display when TextArea is empty\n */\n placeholder?: string;\n /**\n * Sets which part resizes when the user drags the resize handle.\n * * `none`: TextArea can not be resized\n * * `horizontal`: TextArea can only be resized horizontally\n * * `vertical`: TextArea can only be resized vertically\n * * `both`: TextArea can be resized horizontally and vertically\n *\n * @defaultvalue `none`\n */\n resize?: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Number of rows to display\n */\n rows?: number;\n /**\n * Value of the TextArea\n */\n value: string;\n};\n\n/**\n * [TextArea](https://cambly-syntax.vercel.app/?path=/docs/components-textarea--docs) allows users to enter multiple lines of text.\n */\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength = 1024,\n placeholder = \"\",\n rows = 3,\n value = \"\",\n onChange,\n resize = \"none\",\n }: TextAreaProps,\n forwardedRef,\n ): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n position=\"relative\"\n >\n <label className={textFieldStyles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n <Typography size={100}>\n <textarea\n data-testid={dataTestId}\n ref={forwardedRef}\n className={classNames(\n textFieldStyles.textfield,\n styles.textarea,\n styles[`resize${resize}`],\n {\n [textFieldStyles.inputError]: errorText,\n },\n )}\n id={inputId}\n placeholder={placeholder}\n maxLength={maxLength}\n onChange={onChange}\n rows={rows}\n value={value}\n disabled={disabled}\n />\n </Typography>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? \"destructive-primary\" : \"gray700\"}\n >\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n },\n);\n\nexport default TextArea;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextArea/TextArea.module.css\"; export default {\"textarea\":\"_textarea_1sb0v_1\",\"resizenone\":\"_resizenone_1sb0v_6\",\"resizehorizontal\":\"_resizehorizontal_1sb0v_10\",\"resizevertical\":\"_resizevertical_1sb0v_14\",\"resizeboth\":\"_resizeboth_1sb0v_18\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_wgza3_1\",\"label\":\"_label_wgza3_22\",\"md\":\"_md_wgza3_26\",\"height\":\"_height_wgza3_30\",\"inputError\":\"_inputError_wgza3_34\"}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/RadioButton/RadioButton.tsx","css-module:./RadioButton.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,SAAmC,gBAAgB;AACnD,OAAO,gBAAgB;;;ACD+E,IAAO,6BAAQ,EAAC,sBAAqB,+BAA8B,YAAW,qBAAoB,kBAAiB,4BAA2B,iBAAgB,2BAA0B,UAAS,oBAAmB,UAAS,oBAAmB,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,cAAa,wBAAuB,MAAK,gBAAe,MAAK,gBAAe,iBAAgB,2BAA0B,mBAAkB,6BAA4B,mBAAkB,6BAA4B,oBAAmB,8BAA6B,eAAc,wBAAuB;;;ADuFrvB,SASE,KATF;AAzEJ,IAAM,cAAc,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,eAAe;AAAA,EACf,8BAA8B;AAAA,EAC9B,UAAU,eAAe;AAAA,EACzB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AACF,MAsDoB;AAClB,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,EAAE,eAAe,IAAI,gBAAgB;AAE3C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,2BAAO;AAAA,QACP,2BAAO,SAAS,WAAW,aAAa,WAAW;AAAA,QACnD;AAAA,UACE,CAAC,2BAAO,QAAQ,GAAG;AAAA,QACrB;AAAA,MACF;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT,2BAAO;AAAA,cACP,QACI,sBAAY,sCACZ,sBAAY;AAAA,cAChB,2BAAO,IAAI;AAAA,cACX;AAAA,gBACE,CAAC,qBAAY,yBAAyB,GACnC,aAAa,kBAAmB;AAAA,cACrC;AAAA,YACF;AAAA;AAAA,QACF;AAAA,QACC,WACC;AAAA,UAAC;AAAA;AAAA,YACC,iBAAiB,QAAQ,mBAAmB;AAAA,YAC5C,OAAO,SAAS,OAAO,KAAK;AAAA,YAC5B,QAAQ,SAAS,OAAO,KAAK;AAAA,YAC7B,UAAS;AAAA,YACT,UAAS;AAAA,YACT,2BAA2B;AAAA,cACzB,SAAS;AAAA,gBACP,MAAM,SAAS,OAAO,IAAI;AAAA,cAC5B;AAAA,YACF;AAAA;AAAA,QACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC,eAAa;AAAA,YACb,MAAK;AAAA,YACL;AAAA,YACA;AAAA,YACA,WAAW;AAAA,cACT,2BAAO;AAAA,cACP,2BAAO,SAAS,WAAW,aAAa,WAAW;AAAA,cACnD;AAAA,gBACE,CAAC,2BAAO,UAAU,GAAG,SAAS;AAAA,gBAC9B,CAAC,2BAAO,UAAU,GAAG,SAAS;AAAA,cAChC;AAAA,YACF;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,MAAM;AACb,2BAAa,IAAI;AAAA,YACnB;AAAA,YACA,QAAQ,MAAM;AACZ,2BAAa,KAAK;AAAA,YACpB;AAAA;AAAA,QACF;AAAA,QACC,SACC;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,SAAS,OAAO,MAAM;AAAA,YAC5B,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,sBAAQ","sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./RadioButton.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport colorStyles from \"../colors/colors.module.css\";\nimport Box from \"../Box/Box\";\n\n/**\n * [RadioButton](https://cambly-syntax.vercel.app/?path=/docs/components-radiobutton--docs) is a radio button with accompanying text\n */\nconst RadioButton = ({\n checked = false,\n \"data-testid\": dataTestId,\n dangerouslyForceFocusStyles = false,\n disabled: disabledProp = false,\n error = false,\n id,\n label,\n name,\n onChange,\n size = \"md\",\n value,\n}: {\n /**\n * Whether or not the radio button is checked\n *\n * @defaultValue false\n */\n checked?: boolean;\n /**\n * Test id for the radio button\n */\n \"data-testid\"?: string;\n /**\n * Whether or not the radio button is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Whether to show error color schema\n *\n * @defaultValue false\n */\n error?: boolean;\n /**\n * Id for the the radio button\n */\n id?: string;\n /**\n * Value to show end user\n */\n label: string;\n /**\n * The name of the grouping the radio buttons are in\n */\n name: string;\n /**\n * The callback to be called when the radio button is clicked\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Size of the components\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * Value of the selected radio option\n */\n value: string | number;\n /** forces focus ring styling */\n dangerouslyForceFocusStyles?: boolean;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n return (\n <label\n className={classnames(\n styles.radioBaseContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div\n className={classnames(\n styles.background,\n error\n ? colorStyles.cambioDestructive370BackgroundColor\n : colorStyles.cambioGray370BackgroundColor,\n styles[size],\n {\n [focusStyles.accessibilityOutlineFocus]:\n (isFocused && isFocusVisible) || dangerouslyForceFocusStyles,\n },\n )}\n />\n {checked && (\n <Box\n backgroundColor={error ? \"destructive900\" : \"gray900\"}\n width={size === \"md\" ? 12 : 8}\n height={size === \"md\" ? 12 : 8}\n position=\"absolute\"\n rounding=\"full\"\n dangerouslySetInlineStyle={{\n __style: {\n left: size === \"md\" ? 6 : 4,\n },\n }}\n />\n )}\n <input\n data-testid={dataTestId}\n type=\"radio\"\n id={id}\n name={name}\n className={classnames(\n styles.radioStyleOverride,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.smOverride]: size === \"sm\",\n [styles.mdOverride]: size === \"md\",\n },\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n value={value}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n {label && (\n <Typography\n size={size === \"md\" ? 200 : 100}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n )}\n </label>\n );\n};\n\nexport default RadioButton;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/RadioButton/RadioButton.module.css\"; export default {\"radioBaseContainer\":\"_radioBaseContainer_1egeq_1\",\"disabled\":\"_disabled_1egeq_9\",\"cursorDisabled\":\"_cursorDisabled_1egeq_13\",\"cursorEnabled\":\"_cursorEnabled_1egeq_17\",\"smBase\":\"_smBase_1egeq_21\",\"mdBase\":\"_mdBase_1egeq_25\",\"radioStyleOverride\":\"_radioStyleOverride_1egeq_29\",\"smOverride\":\"_smOverride_1egeq_35\",\"mdOverride\":\"_mdOverride_1egeq_40\",\"background\":\"_background_1egeq_45\",\"sm\":\"_sm_1egeq_21\",\"md\":\"_md_1egeq_25\",\"neutralBorder\":\"_neutralBorder_1egeq_62\",\"smCheckedBorder\":\"_smCheckedBorder_1egeq_66\",\"mdCheckedBorder\":\"_mdCheckedBorder_1egeq_70\",\"errorBorderColor\":\"_errorBorderColor_1egeq_74\",\"borderColor\":\"_borderColor_1egeq_78\"}"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|