@simplybusiness/mobius 5.13.0 → 5.14.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d7b97da]
8
+ - @simplybusiness/icons@4.18.0
9
+
10
+ ## 5.14.0
11
+
12
+ ### Minor Changes
13
+
14
+ - bf49853: Add min/max/step props to `TextFieldProps`
15
+
16
+ ### Patch Changes
17
+
18
+ - bf49853: Make `NumberField` inherit from `TextField` so we can use prefixes and suffixes
19
+
3
20
  ## 5.13.0
4
21
 
5
22
  ### Minor Changes
@@ -12,108 +12,34 @@ Object.defineProperty(exports, "NumberField", {
12
12
  const _jsxruntime = require("react/jsx-runtime");
13
13
  const _dedupe = /*#__PURE__*/ _interop_require_default(require("classnames/dedupe"));
14
14
  const _react = require("react");
15
- const _hooks = require("../../hooks");
16
- const _spaceDelimitedList = require("../../utils/spaceDelimitedList");
17
- const _ErrorMessage = require("../ErrorMessage");
18
- const _Label = require("../Label");
19
- const _Stack = require("../Stack");
15
+ const _TextField = require("../TextField");
20
16
  function _interop_require_default(obj) {
21
17
  return obj && obj.__esModule ? obj : {
22
18
  default: obj
23
19
  };
24
20
  }
25
21
  const NumberField = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
26
- const { id, isDisabled, isRequired, label, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, className, errorMessage, validationState, isInvalid, isReadOnly, minValue, maxValue, step, placeholder, defaultValue = 0, onChange } = props;
27
- const inputRef = (0, _react.useRef)(null);
28
- const [value, setValue] = (0, _react.useState)(defaultValue);
29
- const valueWithoutLeadingZero = value.toString().replace(/^0+/, "");
30
- const optional = typeof isRequired === "boolean" && !isRequired;
31
- const required = typeof isRequired === "boolean" && isRequired;
32
- const { labelProps, fieldProps } = (0, _hooks.useLabel)({
33
- id,
34
- label,
35
- "aria-label": ariaLabel,
36
- "aria-labelledby": ariaLabelledBy
37
- });
38
- const containerClasses = (0, _dedupe.default)("mobius-number-field", className, {
39
- "--is-optional": optional
40
- });
41
- const validationClasses = (0, _hooks.useValidationClasses)({
42
- validationState,
43
- isInvalid
44
- });
45
- const inputClasses = (0, _dedupe.default)("mobius-number-field__input", className, {
46
- "--is-required": required,
47
- "--is-optional": optional,
48
- "--is-disabled": isDisabled
49
- }, validationClasses);
50
- const labelClasses = (0, _dedupe.default)("mobius-number-field__label", {
51
- "--is-disabled": isDisabled
52
- }, validationClasses);
53
- const errorMessageId = (0, _react.useId)();
54
- const shouldErrorMessageShow = errorMessage ? errorMessageId : undefined;
55
- const describedBy = (0, _spaceDelimitedList.spaceDelimitedList)([
56
- shouldErrorMessageShow,
57
- ariaDescribedBy
58
- ]);
59
- const handleChange = (event)=>{
60
- // Only allow change between min and max values
61
- const enteredValue = Number(event.target.value);
62
- if (minValue && enteredValue < minValue || maxValue && enteredValue > maxValue) {
63
- return;
64
- }
65
- setValue(enteredValue);
66
- if (onChange) {
67
- onChange(event);
68
- }
69
- };
70
- // Only allow numeric input
22
+ const { minValue, maxValue, step, defaultValue, className, ...otherProps } = props;
23
+ const containerClasses = (0, _dedupe.default)("mobius-number-field", className);
71
24
  const handleBeforeInput = (event)=>{
72
- const allowedChars = /[\d]/;
73
- if (event.data && !allowedChars.test(event.data)) {
25
+ const { data } = event.nativeEvent;
26
+ if (step != null && Number.isInteger(step) && data === ".") {
27
+ event.preventDefault();
28
+ }
29
+ if (minValue != null && minValue >= 0 && data === "-") {
74
30
  event.preventDefault();
75
- event.stopPropagation();
76
31
  }
77
32
  };
78
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Stack.Stack, {
79
- gap: "xs",
33
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TextField.TextField, {
34
+ ...otherProps,
80
35
  className: containerClasses,
81
- children: [
82
- label && /*#__PURE__*/ (0, _jsxruntime.jsx)(_Label.Label, {
83
- ...labelProps,
84
- className: labelClasses,
85
- children: label
86
- }),
87
- /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
88
- className: "mobius-number-field__input-wrapper",
89
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)("input", {
90
- ...fieldProps,
91
- ref: inputRef || ref,
92
- className: inputClasses,
93
- type: "number",
94
- onChange: handleChange,
95
- onBeforeInput: handleBeforeInput,
96
- max: maxValue,
97
- min: minValue,
98
- step: step,
99
- value: valueWithoutLeadingZero,
100
- placeholder: placeholder,
101
- required: required,
102
- "aria-describedby": describedBy,
103
- "aria-errormessage": shouldErrorMessageShow,
104
- "aria-invalid": isInvalid,
105
- readOnly: isReadOnly,
106
- disabled: isDisabled,
107
- autoComplete: "off",
108
- autoCorrect: "off",
109
- spellCheck: "false"
110
- })
111
- }),
112
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_ErrorMessage.ErrorMessage, {
113
- id: errorMessageId,
114
- errorMessage: errorMessage
115
- })
116
- ]
36
+ onBeforeInput: handleBeforeInput,
37
+ type: "number",
38
+ min: minValue !== null && minValue !== void 0 ? minValue : undefined,
39
+ max: maxValue !== null && maxValue !== void 0 ? maxValue : undefined,
40
+ step: step,
41
+ ref: ref,
42
+ defaultValue: defaultValue != null ? defaultValue.toString() : defaultValue
117
43
  });
118
44
  });
119
45
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport {\n ChangeEvent,\n CompositionEvent,\n Ref,\n RefAttributes,\n forwardRef,\n useId,\n useRef,\n useState,\n} from \"react\";\nimport { DOMProps } from \"../../types/dom\";\nimport { UseLabelProps, useLabel, useValidationClasses } from \"../../hooks\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { ErrorMessage } from \"../ErrorMessage\";\nimport { Label } from \"../Label\";\nimport { Validation } from \"../../types\";\nimport { Stack } from \"../Stack\";\n\nexport type NumberFieldElementType = HTMLInputElement;\n\nexport interface NumberFieldProps\n extends DOMProps,\n Validation,\n UseLabelProps,\n RefAttributes<NumberFieldElementType> {\n id?: string;\n /** Custom class name for setting specific CSS */\n className?: string;\n /** The smallest value allowed for the input. */\n minValue?: number;\n /** The largest value allowed for the input. */\n maxValue?: number;\n /** The amount that the input value changes with each increment or decrement \"tick\". */\n step?: number; // ??\n /** The default value (uncontrolled). */\n defaultValue?: number;\n /** Handler that is called when the value changes. */\n onChange?: (event: ChangeEvent<NumberFieldElementType>) => void;\n /** Temporary text that occupies the text input when it is empty. */\n placeholder?: string;\n /** Whether user input is required on the input before form submission. */\n isRequired?: boolean;\n /** Whether the input is disabled. */\n isDisabled?: boolean;\n /** Whether the input can be selected but not changed by the user. */\n isReadOnly?: boolean;\n /** An error message for the field. */\n errorMessage?: string;\n /** Identifies the element (or elements) that describes the object. */\n \"aria-describedby\"?: string | undefined;\n}\n\nexport type NumberFieldRef = Ref<NumberFieldElementType>;\n\nexport const NumberField: ForwardedRefComponent<\n NumberFieldProps,\n NumberFieldElementType\n> = forwardRef((props: NumberFieldProps, ref: NumberFieldRef) => {\n const {\n id,\n isDisabled,\n isRequired,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n className,\n errorMessage,\n validationState,\n isInvalid,\n isReadOnly,\n minValue,\n maxValue,\n step,\n placeholder,\n defaultValue = 0,\n onChange,\n } = props;\n const inputRef = useRef<HTMLInputElement | null>(null);\n const [value, setValue] = useState<number>(defaultValue);\n const valueWithoutLeadingZero = value.toString().replace(/^0+/, \"\");\n const optional = typeof isRequired === \"boolean\" && !isRequired;\n const required = typeof isRequired === \"boolean\" && isRequired;\n\n const { labelProps, fieldProps } = useLabel({\n id,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n });\n\n const containerClasses = classNames(\"mobius-number-field\", className, {\n \"--is-optional\": optional,\n });\n\n const validationClasses = useValidationClasses({\n validationState,\n isInvalid,\n });\n\n const inputClasses = classNames(\n \"mobius-number-field__input\",\n className,\n {\n \"--is-required\": required,\n \"--is-optional\": optional,\n \"--is-disabled\": isDisabled,\n },\n validationClasses,\n );\n\n const labelClasses = classNames(\n \"mobius-number-field__label\",\n {\n \"--is-disabled\": isDisabled,\n },\n validationClasses,\n );\n\n const errorMessageId = useId();\n const shouldErrorMessageShow = errorMessage ? errorMessageId : undefined;\n const describedBy = spaceDelimitedList([\n shouldErrorMessageShow,\n ariaDescribedBy,\n ]);\n\n const handleChange = (event: ChangeEvent<NumberFieldElementType>) => {\n // Only allow change between min and max values\n const enteredValue = Number(event.target.value);\n if (\n (minValue && enteredValue < minValue) ||\n (maxValue && enteredValue > maxValue)\n ) {\n return;\n }\n setValue(enteredValue);\n if (onChange) {\n onChange(event);\n }\n };\n\n // Only allow numeric input\n const handleBeforeInput = (\n event: CompositionEvent<NumberFieldElementType>,\n ) => {\n const allowedChars = /[\\d]/;\n\n if (event.data && !allowedChars.test(event.data)) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n return (\n <Stack gap=\"xs\" className={containerClasses}>\n {label && (\n <Label {...labelProps} className={labelClasses}>\n {label}\n </Label>\n )}\n <div className=\"mobius-number-field__input-wrapper\">\n <input\n {...fieldProps}\n ref={inputRef || ref}\n className={inputClasses}\n type=\"number\"\n onChange={handleChange}\n onBeforeInput={handleBeforeInput}\n max={maxValue}\n min={minValue}\n step={step}\n value={valueWithoutLeadingZero}\n placeholder={placeholder}\n required={required}\n aria-describedby={describedBy}\n aria-errormessage={shouldErrorMessageShow}\n aria-invalid={isInvalid}\n readOnly={isReadOnly}\n disabled={isDisabled}\n autoComplete=\"off\"\n autoCorrect=\"off\"\n spellCheck=\"false\"\n />\n </div>\n <ErrorMessage id={errorMessageId} errorMessage={errorMessage} />\n </Stack>\n );\n});\n"],"names":["NumberField","forwardRef","props","ref","id","isDisabled","isRequired","label","ariaLabel","ariaLabelledBy","ariaDescribedBy","className","errorMessage","validationState","isInvalid","isReadOnly","minValue","maxValue","step","placeholder","defaultValue","onChange","inputRef","useRef","value","setValue","useState","valueWithoutLeadingZero","toString","replace","optional","required","labelProps","fieldProps","useLabel","containerClasses","classNames","validationClasses","useValidationClasses","inputClasses","labelClasses","errorMessageId","useId","shouldErrorMessageShow","undefined","describedBy","spaceDelimitedList","handleChange","event","enteredValue","Number","target","handleBeforeInput","allowedChars","data","test","preventDefault","stopPropagation","Stack","gap","Label","div","input","type","onBeforeInput","max","min","aria-describedby","aria-errormessage","aria-invalid","readOnly","disabled","autoComplete","autoCorrect","spellCheck","ErrorMessage"],"mappings":"AAAA;;;;;+BA0DaA;;;eAAAA;;;;+DAxDU;uBAUhB;uBAEuD;oCAE3B;8BACN;uBACP;uBAEA;;;;;;AAsCf,MAAMA,4BAGTC,IAAAA,iBAAU,EAAC,CAACC,OAAyBC;IACvC,MAAM,EACJC,EAAE,EACFC,UAAU,EACVC,UAAU,EACVC,KAAK,EACL,cAAcC,SAAS,EACvB,mBAAmBC,cAAc,EACjC,oBAAoBC,eAAe,EACnCC,SAAS,EACTC,YAAY,EACZC,eAAe,EACfC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,QAAQ,EACRC,IAAI,EACJC,WAAW,EACXC,eAAe,CAAC,EAChBC,QAAQ,EACT,GAAGnB;IACJ,MAAMoB,WAAWC,IAAAA,aAAM,EAA0B;IACjD,MAAM,CAACC,OAAOC,SAAS,GAAGC,IAAAA,eAAQ,EAASN;IAC3C,MAAMO,0BAA0BH,MAAMI,QAAQ,GAAGC,OAAO,CAAC,OAAO;IAChE,MAAMC,WAAW,OAAOxB,eAAe,aAAa,CAACA;IACrD,MAAMyB,WAAW,OAAOzB,eAAe,aAAaA;IAEpD,MAAM,EAAE0B,UAAU,EAAEC,UAAU,EAAE,GAAGC,IAAAA,eAAQ,EAAC;QAC1C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BACViB,eAAeZ;oBACfa,KAAKhD;oBACLiD,KAAKlD;oBACLE,MAAMA;oBACNM,OAAOG;oBACPR,aAAaA;oBACbY,UAAUA;oBACVoC,oBAAkBtB;oBAClBuB,qBAAmBzB;oBACnB0B,gBAAcvD;oBACdwD,UAAUvD;oBACVwD,UAAUlE;oBACVmE,cAAa;oBACbC,aAAY;oBACZC,YAAW;;;0BAGf,qBAACC,0BAAY;gBAACvE,IAAIqC;gBAAgB7B,cAAcA;;;;AAGtD"}
1
+ {"version":3,"sources":["../../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport { type Ref, type RefAttributes, forwardRef } from \"react\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport {\n TextField,\n type TextFieldElementType,\n type TextFieldProps,\n} from \"../TextField\";\n\nexport type NumberFieldElementType = TextFieldElementType;\n\nexport interface NumberFieldProps\n extends Omit<TextFieldProps, \"type\" | \"defaultValue\" | \"inputElementType\">,\n RefAttributes<NumberFieldElementType> {\n /** The smallest value allowed for the input. */\n minValue?: number;\n /** The largest value allowed for the input. */\n maxValue?: number;\n /** The amount that the input value changes with each increment or decrement \"tick\". */\n step?: number; // ??\n /** The default value for the input. */\n defaultValue?: number;\n}\n\nexport type NumberFieldRef = Ref<NumberFieldElementType>;\n\nexport const NumberField: ForwardedRefComponent<\n NumberFieldProps,\n NumberFieldElementType\n> = forwardRef((props: NumberFieldProps, ref: NumberFieldRef) => {\n const { minValue, maxValue, step, defaultValue, className, ...otherProps } =\n props;\n\n const containerClasses = classNames(\"mobius-number-field\", className);\n\n const handleBeforeInput = (\n event: React.FormEvent<NumberFieldElementType>,\n ) => {\n const { data } = event.nativeEvent as InputEvent;\n if (step != null && Number.isInteger(step) && data === \".\") {\n event.preventDefault();\n }\n if (minValue != null && minValue >= 0 && data === \"-\") {\n event.preventDefault();\n }\n };\n\n return (\n <TextField\n {...otherProps}\n className={containerClasses}\n onBeforeInput={handleBeforeInput}\n type=\"number\"\n min={minValue ?? undefined}\n max={maxValue ?? undefined}\n step={step}\n ref={ref}\n defaultValue={\n defaultValue != null ? defaultValue.toString() : defaultValue\n }\n />\n );\n});\n"],"names":["NumberField","forwardRef","props","ref","minValue","maxValue","step","defaultValue","className","otherProps","containerClasses","classNames","handleBeforeInput","event","data","nativeEvent","Number","isInteger","preventDefault","TextField","onBeforeInput","type","min","undefined","max","toString"],"mappings":"AAAA;;;;;+BA4BaA;;;eAAAA;;;;+DA1BU;uBACkC;2BAMlD;;;;;;AAmBA,MAAMA,4BAGTC,IAAAA,iBAAU,EAAC,CAACC,OAAyBC;IACvC,MAAM,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAE,GAAGC,YAAY,GACxEP;IAEF,MAAMQ,mBAAmBC,IAAAA,eAAU,EAAC,uBAAuBH;IAE3D,MAAMI,oBAAoB,CACxBC;QAEA,MAAM,EAAEC,IAAI,EAAE,GAAGD,MAAME,WAAW;QAClC,IAAIT,QAAQ,QAAQU,OAAOC,SAAS,CAACX,SAASQ,SAAS,KAAK;YAC1DD,MAAMK,cAAc;QACtB;QACA,IAAId,YAAY,QAAQA,YAAY,KAAKU,SAAS,KAAK;YACrDD,MAAMK,cAAc;QACtB;IACF;IAEA,qBACE,qBAACC,oBAAS;QACP,GAAGV,UAAU;QACdD,WAAWE;QACXU,eAAeR;QACfS,MAAK;QACLC,KAAKlB,qBAAAA,sBAAAA,WAAYmB;QACjBC,KAAKnB,qBAAAA,sBAAAA,WAAYkB;QACjBjB,MAAMA;QACNH,KAAKA;QACLI,cACEA,gBAAgB,OAAOA,aAAakB,QAAQ,KAAKlB;;AAIzD"}
@@ -23,7 +23,7 @@ function _interop_require_default(obj) {
23
23
  };
24
24
  }
25
25
  const TextField = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
26
- const { isDisabled, isReadOnly, type = "text", validationState, isInvalid, className, label, errorMessage, children, isRequired, prefixInside, prefixOutside, suffixInside, suffixOutside, ...otherProps } = props;
26
+ const { isDisabled, type = "text", validationState, isInvalid, className, label, errorMessage, children, isRequired, prefixInside, prefixOutside, suffixInside, suffixOutside, ...otherProps } = props;
27
27
  const { inputProps, labelProps, errorMessageProps } = (0, _hooks.useTextField)({
28
28
  ...props,
29
29
  "aria-errormessage": errorMessage
@@ -69,8 +69,7 @@ const TextField = /*#__PURE__*/ (0, _react.forwardRef)((props, ref)=>{
69
69
  ...inputProps,
70
70
  ref: ref,
71
71
  type: type,
72
- className: inputClasses,
73
- readOnly: isReadOnly
72
+ className: inputClasses
74
73
  }),
75
74
  (0, _adornmentWithClassName.adornmentWithClassName)(suffixInside, labelClasses, "mobius-text-field__suffix-inside")
76
75
  ]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport {\n HTMLInputTypeAttribute,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n forwardRef,\n} from \"react\";\nimport {\n UseTextFieldProps,\n useTextField,\n useValidationClasses,\n} from \"../../hooks\";\nimport { DOMProps, FocusEvents } from \"../../types\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { ErrorMessage } from \"../ErrorMessage\";\nimport { Label } from \"../Label\";\nimport { Stack } from \"../Stack\";\nimport { adornmentWithClassName } from \"./adornmentWithClassName\";\n\nexport type TextFieldElementType = HTMLInputElement;\nexport interface TextFieldProps\n extends DOMProps,\n FocusEvents,\n UseTextFieldProps,\n RefAttributes<TextFieldElementType> {\n className?: string;\n errorMessage?: string;\n children?: ReactNode;\n label?: string;\n type?: Exclude<\n HTMLInputTypeAttribute,\n | \"button\"\n | \"checkbox\"\n | \"color\"\n | \"date\"\n | \"datetime-local\"\n | \"file\"\n | \"image\"\n | \"month\"\n | \"radio\"\n | \"range\"\n | \"reset\"\n | \"submit\"\n | \"week\"\n >;\n prefixInside?: ReactElement;\n prefixOutside?: ReactElement;\n suffixInside?: ReactElement;\n suffixOutside?: ReactElement;\n}\n\nexport type TextFieldRef = Ref<TextFieldElementType>;\n\nconst TextField: ForwardedRefComponent<TextFieldProps, TextFieldElementType> =\n forwardRef((props: TextFieldProps, ref: TextFieldRef) => {\n const {\n isDisabled,\n isReadOnly,\n type = \"text\",\n validationState,\n isInvalid,\n className,\n label,\n errorMessage,\n children,\n isRequired,\n prefixInside,\n prefixOutside,\n suffixInside,\n suffixOutside,\n ...otherProps\n } = props;\n\n const { inputProps, labelProps, errorMessageProps } = useTextField({\n ...props,\n \"aria-errormessage\": errorMessage,\n });\n\n const hidden = type === \"hidden\";\n\n const validationClasses = useValidationClasses({\n validationState,\n isInvalid,\n });\n\n const textfieldClasses = {\n \"--is-disabled\": isDisabled,\n \"--is-required\": typeof isRequired === \"boolean\" && isRequired,\n \"--is-optional\": typeof isRequired === \"boolean\" && !isRequired,\n \"--is-hidden\": hidden,\n [className || \"\"]: true,\n };\n\n const sharedClasses = classNames(validationClasses, textfieldClasses);\n\n const labelClasses = classNames(\n {\n \"--is-disabled\": isDisabled,\n },\n validationClasses,\n );\n\n const containerClasses = classNames(\n \"mobius\",\n \"mobius-text-field\",\n sharedClasses,\n );\n\n const inputClasses = classNames(\n \"mobius\",\n \"mobius-text-field__input\",\n sharedClasses,\n );\n\n const inputWrapperClasses = classNames(\n \"mobius-text-field__input-wrapper\",\n sharedClasses,\n );\n\n return (\n <Stack gap=\"xs\" className={containerClasses}>\n {label && !hidden && (\n <Label {...labelProps} className={labelClasses}>\n {label}\n </Label>\n )}\n <div className=\"mobius-text-field__inner-container\">\n {adornmentWithClassName(\n prefixOutside,\n labelClasses,\n \"mobius-text-field__prefix-outside\",\n )}\n <div className={inputWrapperClasses}>\n {adornmentWithClassName(\n prefixInside,\n labelClasses,\n \"mobius-text-field__prefix-inside\",\n )}\n <input\n {...otherProps}\n {...inputProps}\n ref={ref}\n type={type}\n className={inputClasses}\n readOnly={isReadOnly}\n />\n {adornmentWithClassName(\n suffixInside,\n labelClasses,\n \"mobius-text-field__suffix-inside\",\n )}\n </div>\n {adornmentWithClassName(\n suffixOutside,\n labelClasses,\n \"mobius-text-field__suffix-outside\",\n )}\n </div>\n {children && (\n <div className=\"mobius-text-field__children\">{children}</div>\n )}\n\n <ErrorMessage {...errorMessageProps} errorMessage={errorMessage} />\n </Stack>\n );\n });\n\nTextField.displayName = \"TextField\";\nexport { TextField };\n"],"names":["TextField","forwardRef","props","ref","isDisabled","isReadOnly","type","validationState","isInvalid","className","label","errorMessage","children","isRequired","prefixInside","prefixOutside","suffixInside","suffixOutside","otherProps","inputProps","labelProps","errorMessageProps","useTextField","hidden","validationClasses","useValidationClasses","textfieldClasses","sharedClasses","classNames","labelClasses","containerClasses","inputClasses","inputWrapperClasses","Stack","gap","Label","div","adornmentWithClassName","input","readOnly","ErrorMessage","displayName"],"mappings":"AAAA;;;;;+BA4KSA;;;eAAAA;;;;+DA1Kc;uBAQhB;uBAKA;8BAGsB;uBACP;uBACA;wCACiB;;;;;;AAoCvC,MAAMA,0BACJC,IAAAA,iBAAU,EAAC,CAACC,OAAuBC;IACjC,MAAM,EACJC,UAAU,EACVC,UAAU,EACVC,OAAO,MAAM,EACbC,eAAe,EACfC,SAAS,EACTC,SAAS,EACTC,KAAK,EACLC,YAAY,EACZC,QAAQ,EACRC,UAAU,EACVC,YAAY,EACZC,aAAa,EACbC,YAAY,EACZC,aAAa,EACb,GAAGC,YACJ,GAAGhB;IAEJ,MAAM,EAAEiB,UAAU,EAAEC,UAAU,EAAEC,iBAAiB,EAAE,GAAGC,IAAAA,mBAAY,EAAC;QACjE,GAAGpB,KAAK;QACR,qBAAqBS;IACvB;IAEA,MAAMY,SAASjB,SAAS;IAExB,MAAMkB,oBAAoBC,IAAAA,2BAAoB,EAAC;QAC7ClB;QACAC;IACF;IAEA,MAAMkB,mBAAmB;QACvB,iBAAiBtB;QACjB,iBAAiB,OAAOS,eAAe,aAAaA;QACpD,iBAAiB,OAAOA,eAAe,aAAa,CAACA;QACrD,eAAeU;QACf,CAACd,aAAa,GAAG,EAAE;IACrB;IAEA,MAAMkB,gBAAgBC,IAAAA,eAAU,EAACJ,mBAAmBE;IAEpD,MAAMG,eAAeD,IAAAA,eAAU,EAC7B;QACE,iBAAiBxB;IACnB,GACAoB;IAGF,MAAMM,mBAAmBF,IAAAA,eAAU,EACjC,UACA,qBACAD;IAGF,MAAMI,eAAeH,IAAAA,eAAU,EAC7B,UACA,4BACAD;IAGF,MAAMK,sBAAsBJ,IAAAA,eAAU,EACpC,oCACAD;IAGF,qBACE,sBAACM,YAAK;QAACC,KAAI;QAAKzB,WAAWqB;;YACxBpB,SAAS,CAACa,wBACT,qBAACY,YAAK;gBAAE,GAAGf,UAAU;gBAAEX,WAAWoB;0BAC/BnB;;0BAGL,sBAAC0B;gBAAI3B,WAAU;;oBACZ4B,IAAAA,8CAAsB,EACrBtB,eACAc,cACA;kCAEF,sBAACO;wBAAI3B,WAAWuB;;4BACbK,IAAAA,8CAAsB,EACrBvB,cACAe,cACA;0CAEF,qBAACS;gCACE,GAAGpB,UAAU;gCACb,GAAGC,UAAU;gCACdhB,KAAKA;gCACLG,MAAMA;gCACNG,WAAWsB;gCACXQ,UAAUlC;;4BAEXgC,IAAAA,8CAAsB,EACrBrB,cACAa,cACA;;;oBAGHQ,IAAAA,8CAAsB,EACrBpB,eACAY,cACA;;;YAGHjB,0BACC,qBAACwB;gBAAI3B,WAAU;0BAA+BG;;0BAGhD,qBAAC4B,0BAAY;gBAAE,GAAGnB,iBAAiB;gBAAEV,cAAcA;;;;AAGzD;AAEFX,UAAUyC,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport {\n HTMLInputTypeAttribute,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n forwardRef,\n} from \"react\";\nimport {\n UseTextFieldProps,\n useTextField,\n useValidationClasses,\n} from \"../../hooks\";\nimport { DOMProps, FocusEvents } from \"../../types\";\nimport { ForwardedRefComponent } from \"../../types/components\";\nimport { ErrorMessage } from \"../ErrorMessage\";\nimport { Label } from \"../Label\";\nimport { Stack } from \"../Stack\";\nimport { adornmentWithClassName } from \"./adornmentWithClassName\";\n\nexport type TextFieldElementType = HTMLInputElement;\nexport interface TextFieldProps\n extends DOMProps,\n FocusEvents,\n UseTextFieldProps,\n RefAttributes<TextFieldElementType> {\n className?: string;\n errorMessage?: string;\n children?: ReactNode;\n label?: string;\n type?: Exclude<\n HTMLInputTypeAttribute,\n | \"button\"\n | \"checkbox\"\n | \"color\"\n | \"date\"\n | \"datetime-local\"\n | \"file\"\n | \"image\"\n | \"month\"\n | \"radio\"\n | \"range\"\n | \"reset\"\n | \"submit\"\n | \"week\"\n >;\n prefixInside?: ReactElement;\n prefixOutside?: ReactElement;\n suffixInside?: ReactElement;\n suffixOutside?: ReactElement;\n}\n\nexport type TextFieldRef = Ref<TextFieldElementType>;\n\nconst TextField: ForwardedRefComponent<TextFieldProps, TextFieldElementType> =\n forwardRef((props: TextFieldProps, ref: TextFieldRef) => {\n const {\n isDisabled,\n type = \"text\",\n validationState,\n isInvalid,\n className,\n label,\n errorMessage,\n children,\n isRequired,\n prefixInside,\n prefixOutside,\n suffixInside,\n suffixOutside,\n ...otherProps\n } = props;\n\n const { inputProps, labelProps, errorMessageProps } = useTextField({\n ...props,\n \"aria-errormessage\": errorMessage,\n });\n\n const hidden = type === \"hidden\";\n\n const validationClasses = useValidationClasses({\n validationState,\n isInvalid,\n });\n\n const textfieldClasses = {\n \"--is-disabled\": isDisabled,\n \"--is-required\": typeof isRequired === \"boolean\" && isRequired,\n \"--is-optional\": typeof isRequired === \"boolean\" && !isRequired,\n \"--is-hidden\": hidden,\n [className || \"\"]: true,\n };\n\n const sharedClasses = classNames(validationClasses, textfieldClasses);\n\n const labelClasses = classNames(\n {\n \"--is-disabled\": isDisabled,\n },\n validationClasses,\n );\n\n const containerClasses = classNames(\n \"mobius\",\n \"mobius-text-field\",\n sharedClasses,\n );\n\n const inputClasses = classNames(\n \"mobius\",\n \"mobius-text-field__input\",\n sharedClasses,\n );\n\n const inputWrapperClasses = classNames(\n \"mobius-text-field__input-wrapper\",\n sharedClasses,\n );\n\n return (\n <Stack gap=\"xs\" className={containerClasses}>\n {label && !hidden && (\n <Label {...labelProps} className={labelClasses}>\n {label}\n </Label>\n )}\n <div className=\"mobius-text-field__inner-container\">\n {adornmentWithClassName(\n prefixOutside,\n labelClasses,\n \"mobius-text-field__prefix-outside\",\n )}\n <div className={inputWrapperClasses}>\n {adornmentWithClassName(\n prefixInside,\n labelClasses,\n \"mobius-text-field__prefix-inside\",\n )}\n <input\n {...otherProps}\n {...inputProps}\n ref={ref}\n type={type}\n className={inputClasses}\n />\n {adornmentWithClassName(\n suffixInside,\n labelClasses,\n \"mobius-text-field__suffix-inside\",\n )}\n </div>\n {adornmentWithClassName(\n suffixOutside,\n labelClasses,\n \"mobius-text-field__suffix-outside\",\n )}\n </div>\n {children && (\n <div className=\"mobius-text-field__children\">{children}</div>\n )}\n\n <ErrorMessage {...errorMessageProps} errorMessage={errorMessage} />\n </Stack>\n );\n });\n\nTextField.displayName = \"TextField\";\nexport { TextField };\n"],"names":["TextField","forwardRef","props","ref","isDisabled","type","validationState","isInvalid","className","label","errorMessage","children","isRequired","prefixInside","prefixOutside","suffixInside","suffixOutside","otherProps","inputProps","labelProps","errorMessageProps","useTextField","hidden","validationClasses","useValidationClasses","textfieldClasses","sharedClasses","classNames","labelClasses","containerClasses","inputClasses","inputWrapperClasses","Stack","gap","Label","div","adornmentWithClassName","input","ErrorMessage","displayName"],"mappings":"AAAA;;;;;+BA0KSA;;;eAAAA;;;;+DAxKc;uBAQhB;uBAKA;8BAGsB;uBACP;uBACA;wCACiB;;;;;;AAoCvC,MAAMA,0BACJC,IAAAA,iBAAU,EAAC,CAACC,OAAuBC;IACjC,MAAM,EACJC,UAAU,EACVC,OAAO,MAAM,EACbC,eAAe,EAC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AAsB,EACrBrB,cACAa,cACA;;;oBAGHQ,IAAAA,8CAAsB,EACrBpB,eACAY,cACA;;;YAGHjB,0BACC,qBAACwB;gBAAI3B,WAAU;0BAA+BG;;0BAGhD,qBAAC2B,0BAAY;gBAAE,GAAGlB,iBAAiB;gBAAEV,cAAcA;;;;AAGzD;AAEFV,UAAUuC,WAAW,GAAG"}
@@ -37,6 +37,7 @@ function useTextField(props) {
37
37
  onChange: props.onChange,
38
38
  disabled: isDisabled,
39
39
  readOnly: isReadOnly,
40
+ required: isRequired,
40
41
  "aria-required": isRequired === true ? true : undefined,
41
42
  "aria-invalid": props.isInvalid,
42
43
  "aria-describedby": ariaDescribedBy,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/hooks/useTextField/useTextField.tsx"],"sourcesContent":["import { useId } from \"react\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { useLabel } from \"../useLabel/useLabel\";\nimport { UseTextFieldProps, UseTextFieldReturn } from \"./types\";\n\nexport function useTextField(props: UseTextFieldProps): UseTextFieldReturn {\n const {\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n inputElementType = \"input\",\n } = props;\n const { labelProps, fieldProps } = useLabel(props);\n\n const descriptionId = useId();\n const descriptionProps = { id: descriptionId };\n\n const errorMessageId = useId();\n const errorMessageProps = { id: errorMessageId };\n\n const ariaDescribedBy = spaceDelimitedList([\n props.description && descriptionId,\n props.errorMessage && errorMessageId,\n props[\"aria-describedby\"],\n ]);\n\n return {\n descriptionProps,\n errorMessageProps,\n labelProps,\n inputProps: {\n defaultValue: props.defaultValue,\n value: props.value,\n onChange: props.onChange,\n disabled: isDisabled,\n readOnly: isReadOnly,\n \"aria-required\": isRequired === true ? true : undefined,\n \"aria-invalid\": props.isInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-errormessage\": props[\"aria-errormessage\"],\n role: props.role,\n\n type: inputElementType === \"input\" ? props.type : undefined,\n pattern: inputElementType === \"input\" ? props.pattern : undefined,\n\n autoComplete: props.autoComplete,\n maxLength: props.maxLength,\n minLength: props.minLength,\n name: props.name,\n placeholder: props.placeholder,\n inputMode: props.inputMode,\n\n // Clipboard events\n onCopy: props.onCopy,\n onCut: props.onCut,\n onPaste: props.onPaste,\n\n // Composition events\n onCompositionEnd: props.onCompositionEnd,\n onCompositionStart: props.onCompositionStart,\n onCompositionUpdate: props.onCompositionUpdate,\n\n // Selection events\n onSelect: props.onSelect,\n\n // Input events\n onBeforeInput: props.onBeforeInput,\n onInput: props.onInput,\n\n // Focus events\n onFocus: props.onFocus,\n onBlur: props.onBlur,\n\n ...fieldProps,\n },\n };\n}\n"],"names":["useTextField","props","isDisabled","isReadOnly","isRequired","inputElementType","labelProps","fieldProps","useLabel","descriptionId","useId","descriptionProps","id","errorMessageId","errorMessageProps","ariaDescribedBy","spaceDelimitedList","description","errorMessage","inputProps","defaultValue","value","onChange","disabled","readOnly","undefined","isInvalid","role","type","pattern","autoComplete","maxLength","minLength","name","placeholder","inputMode","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onSelect","onBeforeInput","onInput","onFocus","onBlur"],"mappings":";;;;+BAKgBA;;;eAAAA;;;uBALM;oCACa;0BACV;AAGlB,SAASA,aAAaC,KAAwB;IACnD,MAAM,EACJC,aAAa,KAAK,EAClBC,aAAa,KAAK,EAClBC,aAAa,KAAK,EAClBC,mBAAmB,OAAO,EAC3B,GAAGJ;IACJ,MAAM,EAAEK,UAAU,EAAEC,UAAU,EAAE,GAAGC,IAAAA,kBAAQ,EAACP;IAE5C,MAAMQ,gBAAgBC,IAAAA,YAAK;IAC3B,MAAMC,mBAAmB;QAAEC,IAAIH;IAAc;IAE7C,MAAMI,iBAAiBH,IAAAA,YAAK;IAC5B,MAAMI,oBAAoB;QAAEF,IAAIC;IAAe;IAE/C,MAAME,kBAAkBC,IAAAA,sCAAkB,EAAC;QACzCf,MAAMgB,WAAW,IAAIR;QACrBR,MAAMiB,YAAY,IAAIL;QACtBZ,KAAK,CAAC,mBAAmB;KAC1B;IAED,OAAO;QACLU;QACAG;QACAR;QACAa,YAAY;YACVC,cAAcnB,MAAMmB,YAAY;YAChCC,OAAOpB,MAAMoB,KAAK;YAClBC,UAAUrB,MAAMqB,QAAQ;YACxBC,UAAUrB;YACVsB,UAAUrB;YACV,iBAAiBC,eAAe,OAAO,OAAOqB;YAC9C,gBAAgBxB,MAAMyB,SAAS;YAC/B,oBAAoBX;YACpB,qBAAqBd,KAAK,CAAC,oBAAoB;YAC/C0B,MAAM1B,MAAM0B,IAAI;YAEhBC,MAAMvB,qBAAqB,UAAUJ,MAAM2B,IAAI,GAAGH;YAClDI,SAASxB,qBAAqB,UAAUJ,MAAM4B,OAAO,GAAGJ;YAExDK,cAAc7B,MAAM6B,YAAY;YAChCC,WAAW9B,MAAM8B,SAAS;YAC1BC,WAAW/B,MAAM+B,SAAS;YAC1BC,MAAMhC,MAAMgC,IAAI;YAChBC,aAAajC,MAAMiC,WAAW;YAC9BC,WAAWlC,MAAMkC,SAAS;YAE1B,mBAAmB;YACnBC,QAAQnC,MAAMmC,MAAM;YACpBC,OAAOpC,MAAMoC,KAAK;YAClBC,SAASrC,MAAMqC,OAAO;YAEtB,qBAAqB;YACrBC,kBAAkBtC,MAAMsC,gBAAgB;YACxCC,oBAAoBvC,MAAMuC,kBAAkB;YAC5CC,qBAAqBxC,MAAMwC,mBAAmB;YAE9C,mBAAmB;YACnBC,UAAUzC,MAAMyC,QAAQ;YAExB,eAAe;YACfC,eAAe1C,MAAM0C,aAAa;YAClCC,SAAS3C,MAAM2C,OAAO;YAEtB,eAAe;YACfC,SAAS5C,MAAM4C,OAAO;YACtBC,QAAQ7C,MAAM6C,MAAM;YAEpB,GAAGvC,UAAU;QACf;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../src/hooks/useTextField/useTextField.tsx"],"sourcesContent":["import { useId } from \"react\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { useLabel } from \"../useLabel/useLabel\";\nimport { UseTextFieldProps, UseTextFieldReturn } from \"./types\";\n\nexport function useTextField(props: UseTextFieldProps): UseTextFieldReturn {\n const {\n isDisabled = false,\n isReadOnly = false,\n isRequired = false,\n inputElementType = \"input\",\n } = props;\n const { labelProps, fieldProps } = useLabel(props);\n\n const descriptionId = useId();\n const descriptionProps = { id: descriptionId };\n\n const errorMessageId = useId();\n const errorMessageProps = { id: errorMessageId };\n\n const ariaDescribedBy = spaceDelimitedList([\n props.description && descriptionId,\n props.errorMessage && errorMessageId,\n props[\"aria-describedby\"],\n ]);\n\n return {\n descriptionProps,\n errorMessageProps,\n labelProps,\n inputProps: {\n defaultValue: props.defaultValue,\n value: props.value,\n onChange: props.onChange,\n disabled: isDisabled,\n readOnly: isReadOnly,\n required: isRequired,\n \"aria-required\": isRequired === true ? true : undefined,\n \"aria-invalid\": props.isInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-errormessage\": props[\"aria-errormessage\"],\n role: props.role,\n\n type: inputElementType === \"input\" ? props.type : undefined,\n pattern: inputElementType === \"input\" ? props.pattern : undefined,\n\n autoComplete: props.autoComplete,\n maxLength: props.maxLength,\n minLength: props.minLength,\n name: props.name,\n placeholder: props.placeholder,\n inputMode: props.inputMode,\n\n // Clipboard events\n onCopy: props.onCopy,\n onCut: props.onCut,\n onPaste: props.onPaste,\n\n // Composition events\n onCompositionEnd: props.onCompositionEnd,\n onCompositionStart: props.onCompositionStart,\n onCompositionUpdate: props.onCompositionUpdate,\n\n // Selection events\n onSelect: props.onSelect,\n\n // Input events\n onBeforeInput: props.onBeforeInput,\n onInput: props.onInput,\n\n // Focus events\n onFocus: props.onFocus,\n onBlur: props.onBlur,\n\n ...fieldProps,\n },\n };\n}\n"],"names":["useTextField","props","isDisabled","isReadOnly","isRequired","inputElementType","labelProps","fieldProps","useLabel","descriptionId","useId","descriptionProps","id","errorMessageId","errorMessageProps","ariaDescribedBy","spaceDelimitedList","description","errorMessage","inputProps","defaultValue","value","onChange","disabled","readOnly","required","undefined","isInvalid","role","type","pattern","autoComplete","maxLength","minLength","name","placeholder","inputMode","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onSelect","onBeforeInput","onInput","onFocus","onBlur"],"mappings":";;;;+BAKgBA;;;eAAAA;;;uBALM;oCACa;0BACV;AAGlB,SAASA,aAAaC,KAAwB;IACnD,MAAM,EACJC,aAAa,KAAK,EAClBC,aAAa,KAAK,EAClBC,aAAa,KAAK,EAClBC,mBAAmB,OAAO,EAC3B,GAAGJ;IACJ,MAAM,EAAEK,UAAU,EAAEC,UAAU,EAAE,GAAGC,IAAAA,kBAAQ,EAACP;IAE5C,MAAMQ,gBAAgBC,IAAAA,YAAK;IAC3B,MAAMC,mBAAmB;QAAEC,IAAIH;IAAc;IAE7C,MAAMI,iBAAiBH,IAAAA,YAAK;IAC5B,MAAMI,oBAAoB;QAAEF,IAAIC;IAAe;IAE/C,MAAME,kBAAkBC,IAAAA,sCAAkB,EAAC;QACzCf,MAAMgB,WAAW,IAAIR;QACrBR,MAAMiB,YAAY,IAAIL;QACtBZ,KAAK,CAAC,mBAAmB;KAC1B;IAED,OAAO;QACLU;QACAG;QACAR;QACAa,YAAY;YACVC,cAAcnB,MAAMmB,YAAY;YAChCC,OAAOpB,MAAMoB,KAAK;YAClBC,UAAUrB,MAAMqB,QAAQ;YACxBC,UAAUrB;YACVsB,UAAUrB;YACVsB,UAAUrB;YACV,iBAAiBA,eAAe,OAAO,OAAOsB;YAC9C,gBAAgBzB,MAAM0B,SAAS;YAC/B,oBAAoBZ;YACpB,qBAAqBd,KAAK,CAAC,oBAAoB;YAC/C2B,MAAM3B,MAAM2B,IAAI;YAEhBC,MAAMxB,qBAAqB,UAAUJ,MAAM4B,IAAI,GAAGH;YAClDI,SAASzB,qBAAqB,UAAUJ,MAAM6B,OAAO,GAAGJ;YAExDK,cAAc9B,MAAM8B,YAAY;YAChCC,WAAW/B,MAAM+B,SAAS;YAC1BC,WAAWhC,MAAMgC,S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