@cambly/syntax-core 15.1.0 → 15.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RichSelect/RichSelectList.cjs +3 -3
- package/dist/RichSelect/RichSelectList.js +2 -2
- package/dist/SelectList/SelectList.cjs +3 -3
- package/dist/SelectList/SelectList.js +2 -2
- package/dist/TextField/TextField.cjs +2 -2
- package/dist/TextField/TextField.d.ts +5 -1
- package/dist/TextField/TextField.js +1 -1
- package/dist/__chunks/{PRSQEQ5O.cjs → 3SUN5HNO.cjs} +3 -3
- package/dist/__chunks/{LURRFB7S.js → 6BRU7BZE.js} +2 -2
- package/dist/__chunks/{VUDLDPIN.js → AHQ7E5DV.js} +2 -2
- package/dist/__chunks/{GGK4OCW3.js → CP57BL3D.js} +5 -3
- package/dist/__chunks/CP57BL3D.js.map +1 -0
- package/dist/__chunks/{LA6LOY5X.js → EUM53NAR.js} +1 -1
- package/dist/__chunks/{LA6LOY5X.js.map → EUM53NAR.js.map} +1 -1
- package/dist/__chunks/{FT35ULZS.cjs → IPQGCHQ7.cjs} +3 -3
- package/dist/__chunks/{BLCQNB25.cjs → TWMVLYWR.cjs} +1 -1
- package/dist/__chunks/{BLCQNB25.cjs.map → TWMVLYWR.cjs.map} +1 -1
- package/dist/__chunks/{ODVVI43Q.cjs → VKAYAQ3Z.cjs} +5 -3
- package/dist/__chunks/VKAYAQ3Z.cjs.map +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/__chunks/GGK4OCW3.js.map +0 -1
- package/dist/__chunks/ODVVI43Q.cjs.map +0 -1
- /package/dist/__chunks/{PRSQEQ5O.cjs.map → 3SUN5HNO.cjs.map} +0 -0
- /package/dist/__chunks/{LURRFB7S.js.map → 6BRU7BZE.js.map} +0 -0
- /package/dist/__chunks/{VUDLDPIN.js.map → AHQ7E5DV.js.map} +0 -0
- /package/dist/__chunks/{FT35ULZS.cjs.map → IPQGCHQ7.cjs.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 _IPQGCHQ7cjs = require('../__chunks/IPQGCHQ7.cjs');
|
|
5
5
|
require('../__chunks/EUBO6YEI.cjs');
|
|
6
6
|
require('../__chunks/C5XPZTFO.cjs');
|
|
7
7
|
require('../__chunks/HF4V7JJP.cjs');
|
|
@@ -16,7 +16,7 @@ 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/TWMVLYWR.cjs');
|
|
20
20
|
require('../__chunks/7BZZUMJM.cjs');
|
|
21
21
|
require('../__chunks/MF7LLV7V.cjs');
|
|
22
22
|
require('../__chunks/N7ZNFTV7.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 = _IPQGCHQ7cjs.RichSelectList_default;
|
|
50
50
|
//# sourceMappingURL=RichSelectList.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
RichSelectList_default
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/AHQ7E5DV.js";
|
|
5
5
|
import "../__chunks/OTGGVIQE.js";
|
|
6
6
|
import "../__chunks/BOX3VY3Q.js";
|
|
7
7
|
import "../__chunks/DFGY3NSE.js";
|
|
@@ -16,7 +16,7 @@ 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/EUM53NAR.js";
|
|
20
20
|
import "../__chunks/YI35INQ7.js";
|
|
21
21
|
import "../__chunks/DDUJFFG7.js";
|
|
22
22
|
import "../__chunks/ONZHIMUG.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 _3SUN5HNOcjs = require('../__chunks/3SUN5HNO.cjs');
|
|
5
5
|
require('../__chunks/JVGX637E.cjs');
|
|
6
|
-
require('../__chunks/
|
|
6
|
+
require('../__chunks/TWMVLYWR.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 = _3SUN5HNOcjs.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/6BRU7BZE.js";
|
|
5
5
|
import "../__chunks/SPQ7DQHG.js";
|
|
6
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/EUM53NAR.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 _VKAYAQ3Zcjs = require('../__chunks/VKAYAQ3Z.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 = _VKAYAQ3Zcjs.TextField;
|
|
19
19
|
//# sourceMappingURL=TextField.cjs.map
|
|
@@ -3,7 +3,7 @@ import React__default, { HTMLInputTypeAttribute, ReactElement } from 'react';
|
|
|
3
3
|
/**
|
|
4
4
|
* [TextField](https://cambly-syntax.vercel.app/?path=/docs/components-textfield--docs) is a component that allows users to enter text.
|
|
5
5
|
*/
|
|
6
|
-
declare function TextField({ autoComplete, "data-testid": dataTestId, disabled: disabledProp, errorText, helperText, id, label, maxLength, onChange, placeholder, type, value, }: {
|
|
6
|
+
declare function TextField({ autoComplete, "data-testid": dataTestId, disabled: disabledProp, errorText, helperText, id, label, maxLength, onChange, placeholder, type, value, step, }: {
|
|
7
7
|
/**
|
|
8
8
|
* The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.
|
|
9
9
|
*
|
|
@@ -58,6 +58,10 @@ declare function TextField({ autoComplete, "data-testid": dataTestId, disabled:
|
|
|
58
58
|
* Value of the TextField
|
|
59
59
|
*/
|
|
60
60
|
value: string;
|
|
61
|
+
/**
|
|
62
|
+
* Specified legal number intervals for an input field. Specifically for time or number. If for time, specify in milliseconds. Must be a positive value.
|
|
63
|
+
*/
|
|
64
|
+
step?: number;
|
|
61
65
|
}): ReactElement;
|
|
62
66
|
|
|
63
67
|
export { TextField as default };
|
|
@@ -5,7 +5,7 @@ var _JVGX637Ecjs = require('./JVGX637E.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _TWMVLYWRcjs = require('./TWMVLYWR.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 ? _TWMVLYWRcjs.ColorBaseDestructive700 : _TWMVLYWRcjs.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=3SUN5HNO.cjs.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
ColorBaseDestructive700,
|
|
7
7
|
ColorBaseGray800
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./EUM53NAR.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=6BRU7BZE.js.map
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
ColorBaseDestructive700,
|
|
21
21
|
ColorBaseGray800
|
|
22
|
-
} from "./
|
|
22
|
+
} from "./EUM53NAR.js";
|
|
23
23
|
import {
|
|
24
24
|
RichSelectSection_default
|
|
25
25
|
} from "./YI35INQ7.js";
|
|
@@ -266,4 +266,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
|
|
|
266
266
|
export {
|
|
267
267
|
RichSelectList_default
|
|
268
268
|
};
|
|
269
|
-
//# sourceMappingURL=
|
|
269
|
+
//# sourceMappingURL=AHQ7E5DV.js.map
|
|
@@ -32,7 +32,8 @@ function TextField({
|
|
|
32
32
|
onChange,
|
|
33
33
|
placeholder = "",
|
|
34
34
|
type = "text",
|
|
35
|
-
value = ""
|
|
35
|
+
value = "",
|
|
36
|
+
step
|
|
36
37
|
}) {
|
|
37
38
|
const isHydrated = useIsHydrated();
|
|
38
39
|
const disabled = !isHydrated || disabledProp;
|
|
@@ -66,7 +67,8 @@ function TextField({
|
|
|
66
67
|
type,
|
|
67
68
|
onChange,
|
|
68
69
|
placeholder,
|
|
69
|
-
value
|
|
70
|
+
value,
|
|
71
|
+
step
|
|
70
72
|
}
|
|
71
73
|
),
|
|
72
74
|
(helperText || errorText) && /* @__PURE__ */ jsx(Box_default, { paddingX: 1, children: /* @__PURE__ */ jsx(
|
|
@@ -85,4 +87,4 @@ function TextField({
|
|
|
85
87
|
export {
|
|
86
88
|
TextField
|
|
87
89
|
};
|
|
88
|
-
//# sourceMappingURL=
|
|
90
|
+
//# sourceMappingURL=CP57BL3D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/TextField/TextField.tsx","css-module:./TextField.module.css#css-module"],"sourcesContent":["import React, {\n type ReactElement,\n type HTMLInputTypeAttribute,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./TextField.module.css\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\n\n/**\n * [TextField](https://cambly-syntax.vercel.app/?path=/docs/components-textfield--docs) is a component that allows users to enter text.\n */\nexport default function TextField({\n autoComplete,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength,\n onChange,\n placeholder = \"\",\n type = \"text\",\n value = \"\",\n step,\n}: {\n /**\n * The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.\n *\n * Feel free to add new values from the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) as needed\n */\n autoComplete?: \"current-password\" | \"new-password\" | \"off\" | \"on\" | \"email\";\n /**\n * A data-testid to make querying for the TextField easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextField will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Text shown below TextField if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextField\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextField visible label\n */\n label: string;\n /**\n * Maximum length of the TextField\n */\n maxLength?: number;\n /**\n * The callback to be called the input changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Optional TextField placeholder text\n */\n placeholder?: string;\n /**\n * Input type of the TextField\n *\n * See [full list of input types](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types)\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value of the TextField\n */\n value: string;\n /**\n * Specified legal number intervals for an input field. Specifically for time or number. If for time, specify in milliseconds. Must be a positive value.\n */\n step?: number;\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 >\n {label && (\n <label className={styles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <input\n autoComplete={autoComplete}\n className={classNames(styles.textfield, styles.md, styles.height, {\n [styles.inputError]: errorText,\n })}\n data-testid={dataTestId}\n disabled={disabled}\n id={inputId}\n maxLength={maxLength}\n type={type}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n step={step}\n />\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","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":";;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,OACK;AACP,OAAO,gBAAgB;;;ACL2E,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,uBAAsB;;;AD8F5P,SAcQ,KAdR;AAhFW,SAAR,UAA2B;AAAA,EAChC;AAAA,EACA,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AACF,GA2DiB;AACf,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,kBAAM;AAEtB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,KAAK;AAAA,MACL,OAAM;AAAA,MACN,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,WAAW,MAAM;AAAA,QAC5B;AAAA,MACF;AAAA,MAEC;AAAA,iBACC,oBAAC,WAAM,WAAW,yBAAO,OAAO,SAAS,SACvC,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAM,WAC1B,iBACH,GACF,GACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW,WAAW,yBAAO,WAAW,yBAAO,IAAI,yBAAO,QAAQ;AAAA,cAChE,CAAC,yBAAO,UAAU,GAAG;AAAA,YACvB,CAAC;AAAA,YACD,eAAa;AAAA,YACb;AAAA,YACA,IAAI;AAAA,YACJ;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,SACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,OAAO,YAAY,wBAAwB;AAAA,YAE1C,uBAAa;AAAA;AAAA,QAChB,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -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 Thu, 23 May 2024 15:41:01 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":[]}
|
|
@@ -19,7 +19,7 @@ var _3UEOKPM2cjs = require('./3UEOKPM2.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _TWMVLYWRcjs = require('./TWMVLYWR.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
var _7BZZUMJMcjs = require('./7BZZUMJM.cjs');
|
|
@@ -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 ? _TWMVLYWRcjs.ColorBaseDestructive700 : _TWMVLYWRcjs.ColorBaseGray800,
|
|
235
235
|
d: "M15.88 9.29 12 13.17 8.12 9.29a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0z"
|
|
236
236
|
}
|
|
237
237
|
)
|
|
@@ -266,4 +266,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
|
|
|
266
266
|
|
|
267
267
|
|
|
268
268
|
exports.RichSelectList_default = RichSelectList_default;
|
|
269
|
-
//# sourceMappingURL=
|
|
269
|
+
//# sourceMappingURL=IPQGCHQ7.cjs.map
|
|
@@ -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 Thu, 23 May 2024 15:41:01 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"]}
|
|
@@ -32,7 +32,8 @@ function TextField({
|
|
|
32
32
|
onChange,
|
|
33
33
|
placeholder = "",
|
|
34
34
|
type = "text",
|
|
35
|
-
value = ""
|
|
35
|
+
value = "",
|
|
36
|
+
step
|
|
36
37
|
}) {
|
|
37
38
|
const isHydrated = _K4AUV2VKcjs.useIsHydrated.call(void 0, );
|
|
38
39
|
const disabled = !isHydrated || disabledProp;
|
|
@@ -66,7 +67,8 @@ function TextField({
|
|
|
66
67
|
type,
|
|
67
68
|
onChange,
|
|
68
69
|
placeholder,
|
|
69
|
-
value
|
|
70
|
+
value,
|
|
71
|
+
step
|
|
70
72
|
}
|
|
71
73
|
),
|
|
72
74
|
(helperText || errorText) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _FESAFV44cjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -85,4 +87,4 @@ function TextField({
|
|
|
85
87
|
|
|
86
88
|
|
|
87
89
|
exports.TextField = TextField;
|
|
88
|
-
//# sourceMappingURL=
|
|
90
|
+
//# sourceMappingURL=VKAYAQ3Z.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/TextField/TextField.tsx","css-module:./TextField.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,OACK;AACP,OAAO,gBAAgB;;;ACL2E,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,uBAAsB;;;AD8F5P,SAcQ,KAdR;AAhFW,SAAR,UAA2B;AAAA,EAChC;AAAA,EACA,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AACF,GA2DiB;AACf,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,kBAAM;AAEtB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,KAAK;AAAA,MACL,OAAM;AAAA,MACN,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,WAAW,MAAM;AAAA,QAC5B;AAAA,MACF;AAAA,MAEC;AAAA,iBACC,oBAAC,WAAM,WAAW,yBAAO,OAAO,SAAS,SACvC,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAM,WAC1B,iBACH,GACF,GACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW,WAAW,yBAAO,WAAW,yBAAO,IAAI,yBAAO,QAAQ;AAAA,cAChE,CAAC,yBAAO,UAAU,GAAG;AAAA,YACvB,CAAC;AAAA,YACD,eAAa;AAAA,YACb;AAAA,YACA,IAAI;AAAA,YACJ;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,SACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,OAAO,YAAY,wBAAwB;AAAA,YAE1C,uBAAa;AAAA;AAAA,QAChB,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ","sourcesContent":["import React, {\n type ReactElement,\n type HTMLInputTypeAttribute,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./TextField.module.css\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\n\n/**\n * [TextField](https://cambly-syntax.vercel.app/?path=/docs/components-textfield--docs) is a component that allows users to enter text.\n */\nexport default function TextField({\n autoComplete,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength,\n onChange,\n placeholder = \"\",\n type = \"text\",\n value = \"\",\n step,\n}: {\n /**\n * The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.\n *\n * Feel free to add new values from the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) as needed\n */\n autoComplete?: \"current-password\" | \"new-password\" | \"off\" | \"on\" | \"email\";\n /**\n * A data-testid to make querying for the TextField easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextField will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Text shown below TextField if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextField\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextField visible label\n */\n label: string;\n /**\n * Maximum length of the TextField\n */\n maxLength?: number;\n /**\n * The callback to be called the input changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Optional TextField placeholder text\n */\n placeholder?: string;\n /**\n * Input type of the TextField\n *\n * See [full list of input types](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types)\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value of the TextField\n */\n value: string;\n /**\n * Specified legal number intervals for an input field. Specifically for time or number. If for time, specify in milliseconds. Must be a positive value.\n */\n step?: number;\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 >\n {label && (\n <label className={styles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <input\n autoComplete={autoComplete}\n className={classNames(styles.textfield, styles.md, styles.height, {\n [styles.inputError]: errorText,\n })}\n data-testid={dataTestId}\n disabled={disabled}\n id={inputId}\n maxLength={maxLength}\n type={type}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n step={step}\n />\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","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\"}"]}
|
package/dist/index.cjs
CHANGED
|
@@ -31,18 +31,18 @@ require('./__chunks/HUIHS6RN.cjs');
|
|
|
31
31
|
require('./__chunks/EZUXET6V.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _VKAYAQ3Zcjs = require('./__chunks/VKAYAQ3Z.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
var _67PBF26Wcjs = require('./__chunks/67PBF26W.cjs');
|
|
38
38
|
require('./__chunks/WFVGNGEP.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _3SUN5HNOcjs = require('./__chunks/3SUN5HNO.cjs');
|
|
42
42
|
require('./__chunks/JVGX637E.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var
|
|
45
|
+
var _IPQGCHQ7cjs = require('./__chunks/IPQGCHQ7.cjs');
|
|
46
46
|
require('./__chunks/EUBO6YEI.cjs');
|
|
47
47
|
|
|
48
48
|
|
|
@@ -71,7 +71,7 @@ var _63XQSPT7cjs = require('./__chunks/63XQSPT7.cjs');
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
var _3UEOKPM2cjs = require('./__chunks/3UEOKPM2.cjs');
|
|
74
|
-
require('./__chunks/
|
|
74
|
+
require('./__chunks/TWMVLYWR.cjs');
|
|
75
75
|
require('./__chunks/7BZZUMJM.cjs');
|
|
76
76
|
require('./__chunks/MF7LLV7V.cjs');
|
|
77
77
|
require('./__chunks/N7ZNFTV7.cjs');
|
|
@@ -137,5 +137,5 @@ require('./__chunks/X2SDR4SD.cjs');
|
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
exports.Avatar = _NOQ3DDEPcjs.Avatar_default; exports.AvatarGroup = _KBFQU5AWcjs.AvatarGroup; exports.Badge = _YVQRFDEEcjs.Badge_default; exports.Box = _FESAFV44cjs.Box_default; exports.Button = _HF4V7JJPcjs.Button_default; exports.ButtonGroup = _C5XPZTFOcjs.ButtonGroup_default; exports.Card = _D5AQ3PGBcjs.Card; exports.Checkbox = _SZMHZR3Bcjs.Checkbox_default; exports.Chip = _ZBBMY7Y7cjs.Chip_default; exports.Divider = _DMA6PPUZcjs.Divider; exports.Heading = _47PGLBOScjs.Heading_default; exports.Icon = _CV5CESW2cjs.Icon_default; exports.IconButton = _63XQSPT7cjs.IconButton_default; exports.LinkButton = _XYSRAKGDcjs.LinkButton_default; exports.Modal = _TJQKHHNHcjs.Modal; exports.Popover = _ELEREGBWcjs.Popover_default; exports.RadioButton = _N5W44DQ5cjs.RadioButton_default; exports.RichSelectList =
|
|
140
|
+
exports.Avatar = _NOQ3DDEPcjs.Avatar_default; exports.AvatarGroup = _KBFQU5AWcjs.AvatarGroup; exports.Badge = _YVQRFDEEcjs.Badge_default; exports.Box = _FESAFV44cjs.Box_default; exports.Button = _HF4V7JJPcjs.Button_default; exports.ButtonGroup = _C5XPZTFOcjs.ButtonGroup_default; exports.Card = _D5AQ3PGBcjs.Card; exports.Checkbox = _SZMHZR3Bcjs.Checkbox_default; exports.Chip = _ZBBMY7Y7cjs.Chip_default; exports.Divider = _DMA6PPUZcjs.Divider; exports.Heading = _47PGLBOScjs.Heading_default; exports.Icon = _CV5CESW2cjs.Icon_default; exports.IconButton = _63XQSPT7cjs.IconButton_default; exports.LinkButton = _XYSRAKGDcjs.LinkButton_default; exports.Modal = _TJQKHHNHcjs.Modal; exports.Popover = _ELEREGBWcjs.Popover_default; exports.RadioButton = _N5W44DQ5cjs.RadioButton_default; exports.RichSelectList = _IPQGCHQ7cjs.RichSelectList_default; exports.SelectList = _3SUN5HNOcjs.SelectList; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _67PBF26Wcjs.TextArea_default; exports.TextField = _VKAYAQ3Zcjs.TextField; exports.ThemeProvider = _ASFZDRJJcjs.ThemeProvider; exports.Tooltip = _YG47EHYScjs.Tooltip_default; exports.Typography = _PJLDYIB6cjs.Typography_default;
|
|
141
141
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -31,18 +31,18 @@ import "./__chunks/QQT35OLE.js";
|
|
|
31
31
|
import "./__chunks/NMX5UDLV.js";
|
|
32
32
|
import {
|
|
33
33
|
TextField
|
|
34
|
-
} from "./__chunks/
|
|
34
|
+
} from "./__chunks/CP57BL3D.js";
|
|
35
35
|
import {
|
|
36
36
|
TextArea_default
|
|
37
37
|
} from "./__chunks/74XKLZ4N.js";
|
|
38
38
|
import "./__chunks/4U4UW4AK.js";
|
|
39
39
|
import {
|
|
40
40
|
SelectList
|
|
41
|
-
} from "./__chunks/
|
|
41
|
+
} from "./__chunks/6BRU7BZE.js";
|
|
42
42
|
import "./__chunks/SPQ7DQHG.js";
|
|
43
43
|
import {
|
|
44
44
|
RichSelectList_default
|
|
45
|
-
} from "./__chunks/
|
|
45
|
+
} from "./__chunks/AHQ7E5DV.js";
|
|
46
46
|
import "./__chunks/OTGGVIQE.js";
|
|
47
47
|
import {
|
|
48
48
|
ButtonGroup_default
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
import {
|
|
72
72
|
TapArea_default
|
|
73
73
|
} from "./__chunks/77FFPQY6.js";
|
|
74
|
-
import "./__chunks/
|
|
74
|
+
import "./__chunks/EUM53NAR.js";
|
|
75
75
|
import "./__chunks/YI35INQ7.js";
|
|
76
76
|
import "./__chunks/DDUJFFG7.js";
|
|
77
77
|
import "./__chunks/ONZHIMUG.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/TextField/TextField.tsx","css-module:./TextField.module.css#css-module"],"sourcesContent":["import React, {\n type ReactElement,\n type HTMLInputTypeAttribute,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./TextField.module.css\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\n\n/**\n * [TextField](https://cambly-syntax.vercel.app/?path=/docs/components-textfield--docs) is a component that allows users to enter text.\n */\nexport default function TextField({\n autoComplete,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength,\n onChange,\n placeholder = \"\",\n type = \"text\",\n value = \"\",\n}: {\n /**\n * The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.\n *\n * Feel free to add new values from the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) as needed\n */\n autoComplete?: \"current-password\" | \"new-password\" | \"off\" | \"on\" | \"email\";\n /**\n * A data-testid to make querying for the TextField easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextField will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Text shown below TextField if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextField\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextField visible label\n */\n label: string;\n /**\n * Maximum length of the TextField\n */\n maxLength?: number;\n /**\n * The callback to be called the input changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Optional TextField placeholder text\n */\n placeholder?: string;\n /**\n * Input type of the TextField\n *\n * See [full list of input types](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types)\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value of the TextField\n */\n value: string;\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 >\n {label && (\n <label className={styles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <input\n autoComplete={autoComplete}\n className={classNames(styles.textfield, styles.md, styles.height, {\n [styles.inputError]: errorText,\n })}\n data-testid={dataTestId}\n disabled={disabled}\n id={inputId}\n maxLength={maxLength}\n type={type}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n />\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","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":";;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,OACK;AACP,OAAO,gBAAgB;;;ACL2E,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,uBAAsB;;;ADyF5P,SAcQ,KAdR;AA3EW,SAAR,UAA2B;AAAA,EAChC;AAAA,EACA,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QAAQ;AACV,GAuDiB;AACf,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,kBAAM;AAEtB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,KAAK;AAAA,MACL,OAAM;AAAA,MACN,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,WAAW,MAAM;AAAA,QAC5B;AAAA,MACF;AAAA,MAEC;AAAA,iBACC,oBAAC,WAAM,WAAW,yBAAO,OAAO,SAAS,SACvC,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAM,WAC1B,iBACH,GACF,GACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW,WAAW,yBAAO,WAAW,yBAAO,IAAI,yBAAO,QAAQ;AAAA,cAChE,CAAC,yBAAO,UAAU,GAAG;AAAA,YACvB,CAAC;AAAA,YACD,eAAa;AAAA,YACb;AAAA,YACA,IAAI;AAAA,YACJ;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,SACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,OAAO,YAAY,wBAAwB;AAAA,YAE1C,uBAAa;AAAA;AAAA,QAChB,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/TextField/TextField.tsx","css-module:./TextField.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,OACK;AACP,OAAO,gBAAgB;;;ACL2E,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,uBAAsB;;;ADyF5P,SAcQ,KAdR;AA3EW,SAAR,UAA2B;AAAA,EAChC;AAAA,EACA,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QAAQ;AACV,GAuDiB;AACf,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,kBAAM;AAEtB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,KAAK;AAAA,MACL,OAAM;AAAA,MACN,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,WAAW,MAAM;AAAA,QAC5B;AAAA,MACF;AAAA,MAEC;AAAA,iBACC,oBAAC,WAAM,WAAW,yBAAO,OAAO,SAAS,SACvC,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAM,WAC1B,iBACH,GACF,GACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW,WAAW,yBAAO,WAAW,yBAAO,IAAI,yBAAO,QAAQ;AAAA,cAChE,CAAC,yBAAO,UAAU,GAAG;AAAA,YACvB,CAAC;AAAA,YACD,eAAa;AAAA,YACb;AAAA,YACA,IAAI;AAAA,YACJ;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,SACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,OAAO,YAAY,wBAAwB;AAAA,YAE1C,uBAAa;AAAA;AAAA,QAChB,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ","sourcesContent":["import React, {\n type ReactElement,\n type HTMLInputTypeAttribute,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./TextField.module.css\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\n\n/**\n * [TextField](https://cambly-syntax.vercel.app/?path=/docs/components-textfield--docs) is a component that allows users to enter text.\n */\nexport default function TextField({\n autoComplete,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength,\n onChange,\n placeholder = \"\",\n type = \"text\",\n value = \"\",\n}: {\n /**\n * The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.\n *\n * Feel free to add new values from the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) as needed\n */\n autoComplete?: \"current-password\" | \"new-password\" | \"off\" | \"on\" | \"email\";\n /**\n * A data-testid to make querying for the TextField easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextField will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Text shown below TextField if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextField\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextField visible label\n */\n label: string;\n /**\n * Maximum length of the TextField\n */\n maxLength?: number;\n /**\n * The callback to be called the input changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Optional TextField placeholder text\n */\n placeholder?: string;\n /**\n * Input type of the TextField\n *\n * See [full list of input types](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types)\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value of the TextField\n */\n value: string;\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 >\n {label && (\n <label className={styles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <input\n autoComplete={autoComplete}\n className={classNames(styles.textfield, styles.md, styles.height, {\n [styles.inputError]: errorText,\n })}\n data-testid={dataTestId}\n disabled={disabled}\n id={inputId}\n maxLength={maxLength}\n type={type}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n />\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","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\"}"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|