@simplybusiness/mobius 9.0.1 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/index.js +5481 -3973
  3. package/dist/cjs/index.js.map +4 -4
  4. package/dist/cjs/meta.json +444 -201
  5. package/dist/esm/MaskedField-CX4GV6JS.js +142 -0
  6. package/dist/esm/MaskedField-CX4GV6JS.js.map +7 -0
  7. package/dist/esm/chunk-XUNHMVIS.js +427 -0
  8. package/dist/esm/chunk-XUNHMVIS.js.map +7 -0
  9. package/dist/esm/index.js +580 -1029
  10. package/dist/esm/index.js.map +4 -4
  11. package/dist/esm/meta.json +258 -163
  12. package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
  13. package/dist/types/src/components/Combobox/Listbox.d.ts +2 -1
  14. package/dist/types/src/components/Combobox/Option.d.ts +1 -1
  15. package/dist/types/src/components/Combobox/index.d.ts +1 -0
  16. package/dist/types/src/components/Combobox/types.d.ts +3 -0
  17. package/dist/types/src/components/Combobox/utils.d.ts +1 -0
  18. package/dist/types/src/components/MaskedField/MaskedField.d.ts +1 -0
  19. package/dist/types/src/components/MaskedField/index.d.ts +6 -1
  20. package/package.json +5 -2
  21. package/src/components/Combobox/Combobox.test.tsx +164 -3
  22. package/src/components/Combobox/Combobox.tsx +54 -4
  23. package/src/components/Combobox/Listbox.tsx +4 -0
  24. package/src/components/Combobox/Option.tsx +8 -1
  25. package/src/components/Combobox/index.tsx +1 -0
  26. package/src/components/Combobox/types.tsx +3 -0
  27. package/src/components/Combobox/utils.test.tsx +39 -0
  28. package/src/components/Combobox/utils.tsx +7 -0
  29. package/src/components/Drawer/Drawer.mdx +1 -1
  30. package/src/components/Drawer/Drawer.stories.tsx +1 -1
  31. package/src/components/ErrorMessage/ErrorMessage.css +1 -1
  32. package/src/components/MaskedField/MaskedField.tsx +1 -0
  33. package/src/components/MaskedField/index.tsx +42 -1
@@ -0,0 +1,142 @@
1
+ "use client";
2
+ import {
3
+ TextField
4
+ } from "./chunk-XUNHMVIS.js";
5
+
6
+ // src/components/MaskedField/MaskedField.tsx
7
+ import { useCallback, useEffect } from "react";
8
+ import { useIMask } from "react-imask";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var useAcceptHandler = (onChange, useMaskedValue, name) => {
11
+ return useCallback(
12
+ (maskedValue, maskInstance) => {
13
+ if (!onChange) {
14
+ return;
15
+ }
16
+ const formattedValue = maskedValue;
17
+ const rawValue = maskInstance.unmaskedValue;
18
+ const valueToEmit = useMaskedValue ? formattedValue : rawValue;
19
+ onChange({
20
+ target: { name, value: valueToEmit }
21
+ });
22
+ },
23
+ [onChange, useMaskedValue, name]
24
+ );
25
+ };
26
+ var useCombinedRef = (imaskRef, forwardedRef) => {
27
+ return useCallback(
28
+ (element) => {
29
+ imaskRef.current = element;
30
+ if (typeof forwardedRef === "function") {
31
+ forwardedRef(element);
32
+ } else if (forwardedRef) {
33
+ forwardedRef.current = element;
34
+ }
35
+ },
36
+ [imaskRef, forwardedRef]
37
+ );
38
+ };
39
+ var useBlurHandler = (onBlur, maskRef, useMaskedValue, name) => {
40
+ return useCallback(
41
+ (event) => {
42
+ if (!onBlur || !maskRef.current) {
43
+ return;
44
+ }
45
+ const formattedValue = maskRef.current.value;
46
+ const rawValue = maskRef.current.unmaskedValue;
47
+ const valueToEmit = useMaskedValue ? formattedValue : rawValue;
48
+ onBlur({
49
+ ...event,
50
+ target: { ...event.target, name, value: valueToEmit }
51
+ });
52
+ },
53
+ [onBlur, maskRef, useMaskedValue, name]
54
+ );
55
+ };
56
+ var ControlledMaskedField = ({
57
+ mask,
58
+ useMaskedValue = false,
59
+ value,
60
+ onChange,
61
+ onBlur,
62
+ name,
63
+ forwardedRef,
64
+ ...textFieldProps
65
+ }) => {
66
+ const onAccept = useAcceptHandler(onChange, useMaskedValue, name);
67
+ const { ref: imaskRef, maskRef, setValue } = useIMask(mask, { onAccept });
68
+ const combinedRef = useCombinedRef(imaskRef, forwardedRef);
69
+ const handleBlur = useBlurHandler(onBlur, maskRef, useMaskedValue, name);
70
+ useEffect(() => {
71
+ if (!maskRef.current) {
72
+ return;
73
+ }
74
+ const stringValue = value.toString();
75
+ const currentMasked = maskRef.current.value;
76
+ const currentUnmasked = maskRef.current.unmaskedValue;
77
+ if (currentMasked !== stringValue && currentUnmasked !== stringValue) {
78
+ setValue(stringValue);
79
+ }
80
+ }, [value, maskRef, setValue, imaskRef]);
81
+ return /* @__PURE__ */ jsx(
82
+ TextField,
83
+ {
84
+ ...textFieldProps,
85
+ ref: combinedRef,
86
+ name,
87
+ onBlur: handleBlur
88
+ }
89
+ );
90
+ };
91
+ var UncontrolledMaskedField = ({
92
+ mask,
93
+ useMaskedValue = false,
94
+ defaultValue,
95
+ onChange,
96
+ onBlur,
97
+ name,
98
+ forwardedRef,
99
+ ...textFieldProps
100
+ }) => {
101
+ const onAccept = useAcceptHandler(onChange, useMaskedValue, name);
102
+ const { ref: imaskRef, maskRef } = useIMask(mask, { onAccept });
103
+ const combinedRef = useCombinedRef(imaskRef, forwardedRef);
104
+ const handleBlur = useBlurHandler(onBlur, maskRef, useMaskedValue, name);
105
+ return /* @__PURE__ */ jsx(
106
+ TextField,
107
+ {
108
+ ...textFieldProps,
109
+ ref: combinedRef,
110
+ name,
111
+ onBlur: handleBlur,
112
+ defaultValue: defaultValue?.toString()
113
+ }
114
+ );
115
+ };
116
+ var MaskedField = ({ ref: forwardedRef, ...props }) => {
117
+ const { value, defaultValue, ...rest } = props;
118
+ if ("value" in props) {
119
+ return /* @__PURE__ */ jsx(
120
+ ControlledMaskedField,
121
+ {
122
+ ...rest,
123
+ value: value ?? "",
124
+ forwardedRef
125
+ }
126
+ );
127
+ } else {
128
+ return /* @__PURE__ */ jsx(
129
+ UncontrolledMaskedField,
130
+ {
131
+ ...rest,
132
+ defaultValue,
133
+ forwardedRef
134
+ }
135
+ );
136
+ }
137
+ };
138
+ MaskedField.displayName = "MaskedField";
139
+ export {
140
+ MaskedField
141
+ };
142
+ //# sourceMappingURL=MaskedField-CX4GV6JS.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/MaskedField/MaskedField.tsx"],
4
+ "sourcesContent": ["\"use client\";\n\nimport type { ChangeEvent, FocusEvent, Ref, RefAttributes } from \"react\";\nimport { useCallback, useEffect } from \"react\";\nimport { useIMask } from \"react-imask\";\nimport type { FactoryOpts, InputMask, InputMaskElement } from \"imask\";\nimport type { TextFieldProps } from \"../TextField\";\nimport { TextField } from \"../TextField\";\n\nexport type MaskedFieldElementType = HTMLInputElement;\n\nexport interface MaskedFieldProps\n extends\n Omit<TextFieldProps, \"type\" | \"ref\">,\n RefAttributes<MaskedFieldElementType> {\n mask: FactoryOpts;\n \"data-testid\"?: string;\n /**\n * If true, onChange and onBlur events will emit the masked (formatted) value.\n * If false (default), events will emit the unmasked (raw) value.\n *\n * @example\n * // TelephoneQuestion uses useMaskedValue={true}\n * // User types: 5551234567\n * // onChange receives: \"(555) 123-4567\" (formatted for display/storage)\n *\n * @example\n * // CurrencyQuestion uses useMaskedValue={false}\n * // User types: 1234\n * // User sees: \"1,234\" (with thousands separator)\n * // onChange receives: \"1234\" (raw number for calculations)\n */\n useMaskedValue?: boolean;\n}\n\nexport type MaskedFieldRef = Ref<MaskedFieldElementType>;\n\n/**\n * Creates an onChange handler for IMask's onAccept callback.\n *\n * IMask calls onAccept every time the user types and the mask accepts the input.\n * This handler converts IMask's callback into a standard React onChange event.\n *\n * @param onChange - The onChange handler from parent component\n * @param useMaskedValue - Whether to emit the formatted value or raw value\n * @param name - The input's name attribute (for the synthetic event)\n *\n * @example\n * // TelephoneQuestion (US) - useMaskedValue=true\n * // User types: \"5551234567\"\n * // Emits: \"(555) 123-4567\" (formatted for display)\n * // Use case: Want to store/display the formatted phone number\n *\n * @example\n * // CurrencyQuestion - useMaskedValue=false\n * // User types: \"1234.56\"\n * // User sees: \"1,234.56\" (with formatting)\n * // Emits: \"1234.56\" (raw value for calculations)\n * // Use case: Need numeric value for backend/calculations\n */\nconst useAcceptHandler = (\n onChange: MaskedFieldProps[\"onChange\"],\n useMaskedValue: boolean,\n name?: string,\n) => {\n return useCallback(\n (maskedValue: string, maskInstance: InputMask<FactoryOpts>) => {\n // Exit early if no onChange handler provided\n if (!onChange) {\n return;\n }\n\n // IMask provides two values:\n // 1. maskedValue: The formatted value user sees (e.g., \"(555) 123-4567\")\n // 2. maskInstance.unmaskedValue: The raw value without formatting (e.g., \"5551234567\")\n const formattedValue = maskedValue;\n const rawValue = maskInstance.unmaskedValue;\n\n // Choose which value to emit based on useMaskedValue prop\n const valueToEmit = useMaskedValue ? formattedValue : rawValue;\n\n // Create a synthetic React event that matches the standard onChange signature\n // This allows parent components to handle it like any other input change\n onChange({\n target: { name, value: valueToEmit },\n } as ChangeEvent<HTMLInputElement>);\n },\n [onChange, useMaskedValue, name],\n );\n};\n\n/**\n * Creates a ref callback that forwards the input element to both IMask and the parent component.\n *\n * React allows two ways to pass refs:\n * 1. Ref callback function: (element) => { ... }\n * 2. Ref object: { current: element }\n *\n * This hook handles both cases and also ensures IMask gets the element reference it needs.\n *\n * @param imaskRef - IMask's ref (needs the element to apply masking)\n * @param forwardedRef - Parent component's ref (could be function or object)\n *\n * @example\n * // Parent uses callback ref\n * <MaskedField ref={(el) => console.log(el)} />\n *\n * @example\n * // Parent uses useRef\n * const inputRef = useRef(null);\n * <MaskedField ref={inputRef} />\n */\nconst useCombinedRef = (\n imaskRef: React.MutableRefObject<InputMaskElement | null>,\n forwardedRef?: MaskedFieldRef,\n) => {\n return useCallback(\n (element: HTMLInputElement | null) => {\n // First, give the element to IMask so it can apply masking\n imaskRef.current = element;\n\n // Then forward the element to the parent component's ref\n // Handle both callback refs and ref objects\n\n // Case 1: Parent passed a callback ref function\n if (typeof forwardedRef === \"function\") {\n forwardedRef(element);\n }\n // Case 2: Parent passed a ref object (from useRef)\n else if (forwardedRef) {\n forwardedRef.current = element;\n }\n // Case 3: No ref was forwarded (forwardedRef is null/undefined)\n // Do nothing - this is fine\n },\n [imaskRef, forwardedRef],\n );\n};\n\n/**\n * Creates an onBlur handler that extracts the correct value from IMask.\n *\n * When the user tabs away or clicks outside the input, we need to emit\n * the current value (either formatted or raw) via the onBlur event.\n *\n * @param onBlur - The onBlur handler from parent component\n * @param maskRef - Reference to the IMask instance (provides current values)\n * @param useMaskedValue - Whether to emit the formatted value or raw value\n * @param name - The input's name attribute (for the synthetic event)\n *\n * @example\n * // TelephoneQuestion - useMaskedValue=true\n * // Input displays: \"(555) 123-4567\"\n * // onBlur emits: \"(555) 123-4567\" (formatted)\n *\n * @example\n * // CurrencyQuestion - useMaskedValue=false\n * // Input displays: \"$1,234.56\"\n * // onBlur emits: \"1234.56\" (raw for validation/submission)\n */\nconst useBlurHandler = (\n onBlur: MaskedFieldProps[\"onBlur\"],\n maskRef: React.MutableRefObject<InputMask<FactoryOpts> | null>,\n useMaskedValue: boolean,\n name?: string,\n) => {\n return useCallback(\n (event: FocusEvent<Element>) => {\n // Exit early if no onBlur handler provided or mask isn't initialized\n if (!onBlur || !maskRef.current) {\n return;\n }\n\n // Extract current values from the IMask instance\n // maskRef.current.value: The formatted value (e.g., \"(555) 123-4567\")\n // maskRef.current.unmaskedValue: The raw value (e.g., \"5551234567\")\n const formattedValue = maskRef.current.value;\n const rawValue = maskRef.current.unmaskedValue;\n\n // Choose which value to emit based on useMaskedValue prop\n const valueToEmit = useMaskedValue ? formattedValue : rawValue;\n\n // Create an enhanced event that preserves the original event properties\n // but overrides the target to include our extracted value\n onBlur({\n ...event,\n target: { ...event.target, name, value: valueToEmit },\n } as FocusEvent<Element>);\n },\n [onBlur, maskRef, useMaskedValue, name],\n );\n};\n\n/**\n * Controlled MaskedField - for use with value prop.\n * Syncs external value changes to IMask via useEffect.\n *\n * Use this when:\n * - The parent component manages the input state\n * - You need to programmatically update the value\n * - You need validation or transformation on every change\n */\nconst ControlledMaskedField = ({\n mask,\n useMaskedValue = false,\n value,\n onChange,\n onBlur,\n name,\n forwardedRef,\n ...textFieldProps\n}: Omit<MaskedFieldProps, \"defaultValue\"> & {\n value: string | number;\n forwardedRef?: MaskedFieldRef;\n}) => {\n const onAccept = useAcceptHandler(onChange, useMaskedValue, name);\n const { ref: imaskRef, maskRef, setValue } = useIMask(mask, { onAccept });\n\n const combinedRef = useCombinedRef(imaskRef, forwardedRef);\n const handleBlur = useBlurHandler(onBlur, maskRef, useMaskedValue, name);\n\n // Sync external value changes to IMask\n useEffect(() => {\n if (!maskRef.current) {\n return;\n }\n\n const stringValue = value.toString();\n const currentMasked = maskRef.current.value;\n const currentUnmasked = maskRef.current.unmaskedValue;\n\n // Only update if value actually changed (prevents infinite loops)\n if (currentMasked !== stringValue && currentUnmasked !== stringValue) {\n setValue(stringValue);\n }\n }, [value, maskRef, setValue, imaskRef]);\n\n return (\n <TextField\n {...textFieldProps}\n ref={combinedRef}\n name={name}\n onBlur={handleBlur}\n />\n );\n};\n\n/**\n * Uncontrolled MaskedField - for use with defaultValue prop.\n * No value synchronization needed - IMask manages the value internally.\n *\n * Use this when:\n * - You only need the final value on submit\n * - You don't need to react to intermediate changes\n * - You want simpler code without state management\n */\nconst UncontrolledMaskedField = ({\n mask,\n useMaskedValue = false,\n defaultValue,\n onChange,\n onBlur,\n name,\n forwardedRef,\n ...textFieldProps\n}: Omit<MaskedFieldProps, \"value\"> & {\n defaultValue?: string | number;\n forwardedRef?: MaskedFieldRef;\n}) => {\n const onAccept = useAcceptHandler(onChange, useMaskedValue, name);\n const { ref: imaskRef, maskRef } = useIMask(mask, { onAccept });\n\n const combinedRef = useCombinedRef(imaskRef, forwardedRef);\n const handleBlur = useBlurHandler(onBlur, maskRef, useMaskedValue, name);\n\n return (\n <TextField\n {...textFieldProps}\n ref={combinedRef}\n name={name}\n onBlur={handleBlur}\n defaultValue={defaultValue?.toString()}\n />\n );\n};\n\nconst MaskedField = ({ ref: forwardedRef, ...props }: MaskedFieldProps) => {\n const { value, defaultValue, ...rest } = props;\n\n // Check for \"value\" in props (not `value !== undefined`) to maintain consistent\n // controlled/uncontrolled state throughout component lifetime and prevent focus loss.\n // Example: CurrencyQuestion passes value={undefined} initially, then value={5} after typing.\n if (\"value\" in props) {\n return (\n <ControlledMaskedField\n {...rest}\n value={value ?? \"\"}\n forwardedRef={forwardedRef}\n />\n );\n } else {\n return (\n <UncontrolledMaskedField\n {...rest}\n defaultValue={defaultValue}\n forwardedRef={forwardedRef}\n />\n );\n }\n};\n\nMaskedField.displayName = \"MaskedField\";\n\nexport { MaskedField };\n"],
5
+ "mappings": ";;;;;;AAGA,SAAS,aAAa,iBAAiB;AACvC,SAAS,gBAAgB;AA0OrB;AAlLJ,IAAM,mBAAmB,CACvB,UACA,gBACA,SACG;AACH,SAAO;AAAA,IACL,CAAC,aAAqB,iBAAyC;AAE7D,UAAI,CAAC,UAAU;AACb;AAAA,MACF;AAKA,YAAM,iBAAiB;AACvB,YAAM,WAAW,aAAa;AAG9B,YAAM,cAAc,iBAAiB,iBAAiB;AAItD,eAAS;AAAA,QACP,QAAQ,EAAE,MAAM,OAAO,YAAY;AAAA,MACrC,CAAkC;AAAA,IACpC;AAAA,IACA,CAAC,UAAU,gBAAgB,IAAI;AAAA,EACjC;AACF;AAuBA,IAAM,iBAAiB,CACrB,UACA,iBACG;AACH,SAAO;AAAA,IACL,CAAC,YAAqC;AAEpC,eAAS,UAAU;AAMnB,UAAI,OAAO,iBAAiB,YAAY;AACtC,qBAAa,OAAO;AAAA,MACtB,WAES,cAAc;AACrB,qBAAa,UAAU;AAAA,MACzB;AAAA,IAGF;AAAA,IACA,CAAC,UAAU,YAAY;AAAA,EACzB;AACF;AAuBA,IAAM,iBAAiB,CACrB,QACA,SACA,gBACA,SACG;AACH,SAAO;AAAA,IACL,CAAC,UAA+B;AAE9B,UAAI,CAAC,UAAU,CAAC,QAAQ,SAAS;AAC/B;AAAA,MACF;AAKA,YAAM,iBAAiB,QAAQ,QAAQ;AAC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U,QAAQ,IAAI,SAAS,MAAM,EAAE,SAAS,CAAC;AAE9D,QAAM,cAAc,eAAe,UAAU,YAAY;AACzD,QAAM,aAAa,eAAe,QAAQ,SAAS,gBAAgB,IAAI;AAEvE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA,QAAQ;AAAA,MACR,cAAc,cAAc,SAAS;AAAA;AAAA,EACvC;AAEJ;AAEA,IAAM,cAAc,CAAC,EAAE,KAAK,cAAc,GAAG,MAAM,MAAwB;AACzE,QAAM,EAAE,OAAO,cAAc,GAAG,KAAK,IAAI;AAKzC,MAAI,WAAW,OAAO;AACpB,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,OAAO,SAAS;AAAA,QAChB;AAAA;AAAA,IACF;AAAA,EAEJ,OAAO;AACL,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,427 @@
1
+ var __typeError = (msg) => {
2
+ throw TypeError(msg);
3
+ };
4
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
5
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
6
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
7
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
+
9
+ // src/components/Icon/Icon.tsx
10
+ import classNames from "classnames/dedupe";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var ICON_PREFIX = "mobius-icon";
13
+ var capitaliseFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1);
14
+ function Icon({
15
+ ref,
16
+ icon,
17
+ className,
18
+ size = "xs",
19
+ color,
20
+ fixedWidth,
21
+ spin,
22
+ spinReverse,
23
+ title,
24
+ ...otherProps
25
+ }) {
26
+ if (!icon) {
27
+ throw new Error("Must specify icon object");
28
+ }
29
+ const classes = classNames(
30
+ "mobius",
31
+ "mobius-icon",
32
+ `svg-inline--${ICON_PREFIX}`,
33
+ `--size-${size}`,
34
+ className,
35
+ {
36
+ [`${ICON_PREFIX}-fw`]: fixedWidth,
37
+ [`${ICON_PREFIX}-spin`]: spin || spinReverse,
38
+ [`${ICON_PREFIX}-spin-reverse`]: spinReverse
39
+ }
40
+ );
41
+ const { iconName, width, height, svgPathData } = icon;
42
+ const formattedIconName = iconName.split("-").join(" ");
43
+ const defaultTitle = `${capitaliseFirstLetter(formattedIconName)} icon`;
44
+ const titleText = title || defaultTitle;
45
+ return /* @__PURE__ */ jsxs(
46
+ "svg",
47
+ {
48
+ ref,
49
+ focusable: "false",
50
+ "data-icon": iconName,
51
+ className: classes,
52
+ role: "img",
53
+ xmlns: "http://www.w3.org/2000/svg",
54
+ viewBox: `0 0 ${width} ${height}`,
55
+ style: { color },
56
+ ...otherProps,
57
+ children: [
58
+ /* @__PURE__ */ jsx("title", { children: titleText }),
59
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: svgPathData })
60
+ ]
61
+ }
62
+ );
63
+ }
64
+
65
+ // src/hooks/useLabel/useLabel.tsx
66
+ import { useId, useRef } from "react";
67
+ function useLabel({
68
+ id: providedId,
69
+ label,
70
+ "aria-label": ariaLabel,
71
+ "aria-labelledby": ariaLabelledby,
72
+ labelElementType = "label"
73
+ }) {
74
+ let labelProps = {};
75
+ let fieldProps = {};
76
+ const hasWarnedAboutMissingLabels = useRef(false);
77
+ const fallbackId = useId();
78
+ const id = providedId || fallbackId;
79
+ const labelId = useId();
80
+ if (label) {
81
+ ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;
82
+ labelProps = {
83
+ id: labelId,
84
+ htmlFor: labelElementType === "label" ? id : void 0
85
+ };
86
+ } else if (!ariaLabelledby && !ariaLabel && !hasWarnedAboutMissingLabels.current) {
87
+ hasWarnedAboutMissingLabels.current = true;
88
+ console.warn(
89
+ "If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility"
90
+ );
91
+ }
92
+ fieldProps = {
93
+ id,
94
+ "aria-label": ariaLabel,
95
+ "aria-labelledby": ariaLabelledby
96
+ };
97
+ return {
98
+ labelProps,
99
+ fieldProps
100
+ };
101
+ }
102
+
103
+ // src/hooks/useTextField/useTextField.tsx
104
+ import { useId as useId2 } from "react";
105
+
106
+ // src/utils/spaceDelimitedList.ts
107
+ function spaceDelimitedList(list) {
108
+ return list.filter(Boolean).join(" ") || void 0;
109
+ }
110
+
111
+ // src/hooks/useTextField/useTextField.tsx
112
+ function useTextField(props) {
113
+ const {
114
+ isDisabled = false,
115
+ isReadOnly = false,
116
+ isRequired = false,
117
+ inputElementType = "input"
118
+ } = props;
119
+ const { labelProps, fieldProps } = useLabel(props);
120
+ const descriptionId = useId2();
121
+ const descriptionProps = { id: descriptionId };
122
+ const errorMessageId = useId2();
123
+ const errorMessageProps = { id: errorMessageId };
124
+ const ariaDescribedBy = spaceDelimitedList([
125
+ props.description && descriptionId,
126
+ props.errorMessage && errorMessageId,
127
+ props["aria-describedby"]
128
+ ]);
129
+ return {
130
+ descriptionProps,
131
+ errorMessageProps,
132
+ labelProps,
133
+ inputProps: {
134
+ defaultValue: props.defaultValue,
135
+ value: props.value,
136
+ onChange: props.onChange,
137
+ disabled: isDisabled,
138
+ readOnly: isReadOnly,
139
+ required: isRequired,
140
+ "aria-required": isRequired === true ? true : void 0,
141
+ "aria-invalid": props.isInvalid,
142
+ "aria-describedby": ariaDescribedBy,
143
+ "aria-errormessage": props["aria-errormessage"],
144
+ role: props.role,
145
+ type: inputElementType === "input" ? props.type : void 0,
146
+ pattern: inputElementType === "input" ? props.pattern : void 0,
147
+ autoComplete: props.autoComplete,
148
+ maxLength: props.maxLength,
149
+ minLength: props.minLength,
150
+ name: props.name,
151
+ placeholder: props.placeholder,
152
+ inputMode: props.inputMode,
153
+ // Clipboard events
154
+ onCopy: props.onCopy,
155
+ onCut: props.onCut,
156
+ onPaste: props.onPaste,
157
+ // Composition events
158
+ onCompositionEnd: props.onCompositionEnd,
159
+ onCompositionStart: props.onCompositionStart,
160
+ onCompositionUpdate: props.onCompositionUpdate,
161
+ // Selection events
162
+ onSelect: props.onSelect,
163
+ // Input events
164
+ onBeforeInput: props.onBeforeInput,
165
+ onInput: props.onInput,
166
+ // Focus events
167
+ onFocus: props.onFocus,
168
+ onBlur: props.onBlur,
169
+ ...fieldProps
170
+ }
171
+ };
172
+ }
173
+
174
+ // src/hooks/useValidationClasses/useValidationClasses.ts
175
+ var useValidationClasses = (props) => {
176
+ const { isInvalid } = props;
177
+ if (isInvalid) {
178
+ return "--is-invalid";
179
+ }
180
+ if (isInvalid === false) {
181
+ return "--is-valid";
182
+ }
183
+ return "";
184
+ };
185
+
186
+ // src/components/ErrorMessage/ErrorMessage.tsx
187
+ import { error } from "@simplybusiness/icons";
188
+ import classNames7 from "classnames/dedupe";
189
+
190
+ // src/components/TextField/TextField.tsx
191
+ import classNames5 from "classnames/dedupe";
192
+
193
+ // src/components/Label/Label.tsx
194
+ import classNames2 from "classnames/dedupe";
195
+ import { jsx as jsx2 } from "react/jsx-runtime";
196
+ var Label = ({ ref, ...props }) => {
197
+ const { elementType: Element = "label", children, ...otherProps } = props;
198
+ const classes = classNames2("mobius", "mobius-label", props.className);
199
+ otherProps.className = classes;
200
+ return /* @__PURE__ */ jsx2(Element, { ref, ...otherProps, className: classes, children });
201
+ };
202
+ Label.displayName = "Label";
203
+
204
+ // src/components/Stack/Stack.tsx
205
+ import classNames3 from "classnames/dedupe";
206
+ import { jsx as jsx3 } from "react/jsx-runtime";
207
+ var Stack = ({ ref, ...props }) => {
208
+ const { elementType: Element = "div", gap, ...otherProps } = props;
209
+ const classes = classNames3(
210
+ "mobius",
211
+ "mobius-stack",
212
+ {
213
+ [`--gap-${gap}`]: gap
214
+ },
215
+ otherProps.className
216
+ );
217
+ return /* @__PURE__ */ jsx3(Element, { ref, ...otherProps, className: classes });
218
+ };
219
+ Stack.displayName = "Stack";
220
+
221
+ // src/components/TextField/adornmentWithClassName.ts
222
+ import classNames4 from "classnames/dedupe";
223
+ import { cloneElement } from "react";
224
+ var adornmentWithClassName = (component, validationClasses, className) => {
225
+ if (!component) return null;
226
+ return cloneElement(component, {
227
+ className: classNames4(
228
+ component.props.className,
229
+ validationClasses,
230
+ className
231
+ )
232
+ });
233
+ };
234
+
235
+ // src/components/TextField/TextField.tsx
236
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
237
+ var TextField = ({ ref, ...props }) => {
238
+ const {
239
+ isDisabled,
240
+ type = "text",
241
+ isInvalid,
242
+ className,
243
+ label,
244
+ errorMessage,
245
+ children,
246
+ isRequired,
247
+ prefixInside,
248
+ prefixOutside,
249
+ suffixInside,
250
+ suffixOutside,
251
+ isReadOnly,
252
+ ...otherProps
253
+ } = props;
254
+ const { inputProps, labelProps, errorMessageProps } = useTextField({
255
+ ...props,
256
+ "aria-errormessage": errorMessage
257
+ });
258
+ const hidden = type === "hidden";
259
+ const validationClasses = useValidationClasses({ isInvalid });
260
+ const textfieldClasses = {
261
+ "--is-disabled": isDisabled,
262
+ "--is-required": typeof isRequired === "boolean" && isRequired,
263
+ "--is-optional": typeof isRequired === "boolean" && !isRequired,
264
+ "--is-hidden": hidden,
265
+ [className || ""]: true
266
+ };
267
+ const sharedClasses = classNames5(validationClasses, textfieldClasses);
268
+ const labelClasses = classNames5(
269
+ {
270
+ "--is-disabled": isDisabled
271
+ },
272
+ validationClasses
273
+ );
274
+ const containerClasses = classNames5(
275
+ "mobius",
276
+ "mobius-text-field",
277
+ sharedClasses
278
+ );
279
+ const inputClasses = classNames5(
280
+ "mobius",
281
+ "mobius-text-field__input",
282
+ sharedClasses
283
+ );
284
+ const inputWrapperClasses = classNames5(
285
+ "mobius-text-field__input-wrapper",
286
+ sharedClasses
287
+ );
288
+ return /* @__PURE__ */ jsxs2(Stack, { gap: "xs", className: containerClasses, children: [
289
+ label && !hidden && /* @__PURE__ */ jsx4(Label, { ...labelProps, className: labelClasses, children: label }),
290
+ /* @__PURE__ */ jsxs2("div", { className: "mobius-text-field__inner-container", children: [
291
+ adornmentWithClassName(
292
+ prefixOutside,
293
+ labelClasses,
294
+ "mobius-text-field__prefix-outside"
295
+ ),
296
+ /* @__PURE__ */ jsxs2("div", { className: inputWrapperClasses, children: [
297
+ adornmentWithClassName(
298
+ prefixInside,
299
+ labelClasses,
300
+ "mobius-text-field__prefix-inside"
301
+ ),
302
+ /* @__PURE__ */ jsx4(
303
+ "input",
304
+ {
305
+ ...otherProps,
306
+ ...inputProps,
307
+ ref,
308
+ type,
309
+ className: inputClasses
310
+ }
311
+ ),
312
+ adornmentWithClassName(
313
+ suffixInside,
314
+ labelClasses,
315
+ "mobius-text-field__suffix-inside"
316
+ )
317
+ ] }),
318
+ adornmentWithClassName(
319
+ suffixOutside,
320
+ labelClasses,
321
+ "mobius-text-field__suffix-outside"
322
+ )
323
+ ] }),
324
+ children && /* @__PURE__ */ jsx4("div", { className: "mobius-text-field__children", children }),
325
+ /* @__PURE__ */ jsx4(ErrorMessage, { ...errorMessageProps, errorMessage })
326
+ ] });
327
+ };
328
+ TextField.displayName = "TextField";
329
+
330
+ // src/components/Text/Text.tsx
331
+ import classNames6 from "classnames/dedupe";
332
+ import { jsx as jsx5 } from "react/jsx-runtime";
333
+ var getElementType = (variant, elementType) => {
334
+ if (variant) {
335
+ return ["h1", "h2", "h3", "h4"].includes(variant) ? variant : "p";
336
+ }
337
+ return elementType || "p";
338
+ };
339
+ var Text = ({ ref, elementType: Component = "p", ...props }) => {
340
+ const { variant, className, spacing, ...otherProps } = props;
341
+ const elementType = getElementType(variant, Component);
342
+ const variantType = variant || elementType;
343
+ const classes = classNames6(
344
+ "mobius",
345
+ "mobius-text",
346
+ { [`--is-${variantType}`]: variantType },
347
+ { [`--has-line-height-${spacing}`]: spacing },
348
+ className
349
+ );
350
+ return /* @__PURE__ */ jsx5(Component, { ref, ...otherProps, className: classes });
351
+ };
352
+ Text.displayName = "Text";
353
+
354
+ // src/components/TextOrHTML/TextOrHTML.tsx
355
+ import { useMemo } from "react";
356
+ import { jsx as jsx6 } from "react/jsx-runtime";
357
+ var TextOrHTML = ({
358
+ ref,
359
+ text,
360
+ htmlClassName,
361
+ htmlElementType = "span",
362
+ textWrapper = false,
363
+ ...textProps
364
+ }) => {
365
+ const DangerousComponent = htmlElementType;
366
+ const dangerousHTML = useMemo(() => ({ __html: text }), [text]);
367
+ const dangerousElement = /* @__PURE__ */ jsx6(
368
+ DangerousComponent,
369
+ {
370
+ className: htmlClassName,
371
+ dangerouslySetInnerHTML: dangerousHTML
372
+ }
373
+ );
374
+ if (textWrapper) {
375
+ return /* @__PURE__ */ jsx6(Text, { ref, ...textProps, children: dangerousElement });
376
+ }
377
+ return dangerousElement;
378
+ };
379
+ TextOrHTML.displayName = "TextOrHTML";
380
+
381
+ // src/components/ErrorMessage/ErrorMessage.tsx
382
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
383
+ var ErrorMessage = ({
384
+ id,
385
+ errorMessage,
386
+ className
387
+ }) => {
388
+ const classes = classNames7("mobius", "mobius-error-message", className);
389
+ if (!errorMessage) return null;
390
+ return /* @__PURE__ */ jsxs3("div", { id, className: classes, "data-testid": "ErrorMessage", role: "alert", children: [
391
+ /* @__PURE__ */ jsx7(
392
+ Icon,
393
+ {
394
+ icon: error,
395
+ className: "mobius-error-message__icon",
396
+ "aria-hidden": "true"
397
+ }
398
+ ),
399
+ /* @__PURE__ */ jsx7(
400
+ TextOrHTML,
401
+ {
402
+ elementType: "span",
403
+ className: "mobius-error-message__text",
404
+ text: errorMessage
405
+ }
406
+ )
407
+ ] });
408
+ };
409
+ ErrorMessage.displayName = "ErrorMessage";
410
+
411
+ export {
412
+ __privateGet,
413
+ __privateAdd,
414
+ __privateSet,
415
+ spaceDelimitedList,
416
+ Icon,
417
+ useLabel,
418
+ useTextField,
419
+ useValidationClasses,
420
+ ErrorMessage,
421
+ Label,
422
+ Stack,
423
+ TextField,
424
+ Text,
425
+ TextOrHTML
426
+ };
427
+ //# sourceMappingURL=chunk-XUNHMVIS.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/components/Icon/Icon.tsx", "../../src/hooks/useLabel/useLabel.tsx", "../../src/hooks/useTextField/useTextField.tsx", "../../src/utils/spaceDelimitedList.ts", "../../src/hooks/useValidationClasses/useValidationClasses.ts", "../../src/components/ErrorMessage/ErrorMessage.tsx", "../../src/components/TextField/TextField.tsx", "../../src/components/Label/Label.tsx", "../../src/components/Stack/Stack.tsx", "../../src/components/TextField/adornmentWithClassName.ts", "../../src/components/Text/Text.tsx", "../../src/components/TextOrHTML/TextOrHTML.tsx"],
4
+ "sourcesContent": ["import classNames from \"classnames/dedupe\";\nimport type { IconProps } from \"./types\";\n\nconst ICON_PREFIX = \"mobius-icon\";\n\nconst capitaliseFirstLetter = (str: string) =>\n str.charAt(0).toUpperCase() + str.slice(1);\n\nexport function Icon({\n ref,\n icon,\n className,\n size = \"xs\",\n color,\n fixedWidth,\n spin,\n spinReverse,\n title,\n ...otherProps\n}: IconProps) {\n if (!icon) {\n throw new Error(\"Must specify icon object\");\n }\n\n const classes = classNames(\n \"mobius\",\n \"mobius-icon\",\n `svg-inline--${ICON_PREFIX}`,\n `--size-${size}`,\n className,\n {\n [`${ICON_PREFIX}-fw`]: fixedWidth,\n [`${ICON_PREFIX}-spin`]: spin || spinReverse,\n [`${ICON_PREFIX}-spin-reverse`]: spinReverse,\n },\n );\n\n const { iconName, width, height, svgPathData } = icon;\n const formattedIconName = iconName.split(\"-\").join(\" \");\n\n const defaultTitle = `${capitaliseFirstLetter(formattedIconName)} icon`;\n const titleText = title || defaultTitle;\n\n return (\n <svg\n ref={ref}\n focusable=\"false\"\n data-icon={iconName}\n className={classes}\n role=\"img\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox={`0 0 ${width} ${height}`}\n style={{ color }}\n {...otherProps}\n >\n <title>{titleText}</title>\n <path fill=\"currentColor\" d={svgPathData} />\n </svg>\n );\n}\n", "import type { LabelHTMLAttributes } from \"react\";\nimport { useId, useRef } from \"react\";\n\nexport type UseLabelProps = {\n id?: string | undefined;\n label?: string | undefined;\n \"aria-label\"?: string | undefined;\n \"aria-labelledby\"?: string | undefined;\n labelElementType?: \"label\" | \"span\" | undefined;\n};\n\nexport type UseLabelReturn = {\n labelProps: {\n id?: string | undefined;\n } & LabelHTMLAttributes<HTMLLabelElement>;\n fieldProps: LabellingProps;\n};\n\nexport type LabellingProps = {\n id?: string | undefined;\n \"aria-label\"?: string | undefined;\n \"aria-labelledby\"?: string | undefined;\n \"aria-describedby\"?: string | undefined;\n \"aria-details\"?: string | undefined;\n};\n\nexport function useLabel({\n id: providedId,\n label,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n labelElementType = \"label\",\n}: UseLabelProps) {\n let labelProps: UseLabelReturn[\"labelProps\"] = {};\n let fieldProps: UseLabelReturn[\"fieldProps\"] = {};\n\n const hasWarnedAboutMissingLabels = useRef(false);\n\n const fallbackId = useId();\n const id = providedId || fallbackId;\n const labelId = useId();\n\n if (label) {\n ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;\n labelProps = {\n id: labelId,\n htmlFor: labelElementType === \"label\" ? id : undefined,\n };\n } else if (\n !ariaLabelledby &&\n !ariaLabel &&\n !hasWarnedAboutMissingLabels.current\n ) {\n hasWarnedAboutMissingLabels.current = true;\n console.warn(\n \"If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility\",\n );\n }\n\n fieldProps = {\n id,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n };\n\n return {\n labelProps,\n fieldProps,\n };\n}\n", "import { useId } from \"react\";\nimport { spaceDelimitedList } from \"../../utils/spaceDelimitedList\";\nimport { useLabel } from \"../useLabel/useLabel\";\nimport type { 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", "export function spaceDelimitedList(\n list: (string | null | undefined)[],\n): string | undefined {\n return list.filter(Boolean).join(\" \") || undefined;\n}\n", "import type { Validation } from \"../../types\";\n\nexport type GetValidationClassesProps = Pick<Validation, \"isInvalid\">;\n\nexport const useValidationClasses = (props: GetValidationClassesProps) => {\n const { isInvalid } = props;\n\n if (isInvalid) {\n return \"--is-invalid\";\n }\n\n if (isInvalid === false) {\n return \"--is-valid\";\n }\n\n return \"\";\n};\n", "import { error } from \"@simplybusiness/icons\";\nimport classNames from \"classnames/dedupe\";\nimport { TextOrHTML } from \"../..\";\nimport { Icon } from \"../Icon\";\n\nexport interface ErrorMessageProps {\n errorMessage?: string;\n id?: string;\n className?: string;\n}\n\nexport const ErrorMessage = ({\n id,\n errorMessage,\n className,\n}: ErrorMessageProps) => {\n const classes = classNames(\"mobius\", \"mobius-error-message\", className);\n\n if (!errorMessage) return null;\n\n return (\n <div id={id} className={classes} data-testid=\"ErrorMessage\" role=\"alert\">\n <Icon\n icon={error}\n className=\"mobius-error-message__icon\"\n aria-hidden=\"true\"\n />\n <TextOrHTML\n elementType=\"span\"\n className=\"mobius-error-message__text\"\n text={errorMessage}\n />\n </div>\n );\n};\n\nErrorMessage.displayName = \"ErrorMessage\";\n", "\"use client\";\n\nimport classNames from \"classnames/dedupe\";\nimport type {\n HTMLInputTypeAttribute,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from \"react\";\nimport type { UseTextFieldProps } from \"../../hooks\";\nimport { useTextField, useValidationClasses } from \"../../hooks\";\nimport type { DOMProps, FocusEvents } from \"../../types\";\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\n 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 = ({ ref, ...props }: TextFieldProps) => {\n const {\n isDisabled,\n type = \"text\",\n isInvalid,\n className,\n label,\n errorMessage,\n children,\n isRequired,\n prefixInside,\n prefixOutside,\n suffixInside,\n suffixOutside,\n\n isReadOnly,\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({ isInvalid });\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", "import type React from \"react\";\nimport type { ReactNode, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport type { DOMProps } from \"../../types/dom\";\n\nexport type LabelElementType = HTMLLabelElement;\nexport type IntrinsicLabel = Omit<\n React.JSX.IntrinsicElements[\"label\"],\n \"css\" | \"color\" | \"ref\"\n>;\n\nexport interface LabelProps\n extends IntrinsicLabel, DOMProps, RefAttributes<LabelElementType> {\n children?: ReactNode;\n className?: string;\n elementType?: \"label\" | \"span\";\n}\n\nconst Label = ({ ref, ...props }: LabelProps) => {\n const { elementType: Element = \"label\", children, ...otherProps } = props;\n\n const classes = classNames(\"mobius\", \"mobius-label\", props.className);\n otherProps.className = classes;\n\n return (\n <Element ref={ref} {...otherProps} className={classes}>\n {children}\n </Element>\n );\n};\n\nLabel.displayName = \"Label\";\nexport { Label };\n", "import type { Ref, RefAttributes, ReactNode } from \"react\";\nimport type React from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport type { DOMProps } from \"../../types/dom\";\nimport type { SpacingType } from \"../../types\";\n\nexport type StackElementType = HTMLDivElement;\n\nexport interface StackProps extends DOMProps, RefAttributes<StackElementType> {\n children?: ReactNode;\n /** How big a gap between items */\n gap?: SpacingType;\n /** Custom class name for setting specific CSS */\n className?: string;\n elementType?: React.ElementType;\n}\n\nexport type StackRef = Ref<StackElementType>;\n\nexport const Stack = ({ ref, ...props }: StackProps) => {\n const { elementType: Element = \"div\", gap, ...otherProps } = props;\n\n const classes = classNames(\n \"mobius\",\n \"mobius-stack\",\n {\n [`--gap-${gap}`]: gap,\n },\n otherProps.className,\n );\n\n return <Element ref={ref} {...otherProps} className={classes} />;\n};\n\nStack.displayName = \"Stack\";\n", "import classNames from \"classnames/dedupe\";\nimport type { ReactElement } from \"react\";\nimport { cloneElement } from \"react\";\n\nexport const adornmentWithClassName = (\n component?: ReactElement,\n validationClasses?: string,\n className?: string,\n) => {\n if (!component) return null;\n\n return cloneElement(component, {\n className: classNames(\n (component.props as { className?: string }).className,\n validationClasses,\n className,\n ),\n } as { className: string });\n};\n", "import type { ReactNode, RefAttributes } from \"react\";\nimport classNames from \"classnames/dedupe\";\nimport type { DOMProps } from \"../../types/dom\";\n\nexport type TextElementType = HTMLHeadingElement | HTMLParagraphElement;\nexport type TextVariantType =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"body\"\n | \"small\"\n | \"legal\";\nexport type ElementType = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"p\" | \"span\";\nexport interface TextProps extends DOMProps, RefAttributes<TextElementType> {\n /** HTML element for the text */\n elementType?: ElementType;\n /** Specify font size override */\n variant?: TextVariantType;\n /** Specify compact line height override */\n spacing?: \"loose\" | \"tight\";\n /** Custom class name for setting specific CSS */\n className?: string;\n children: ReactNode;\n style?: React.CSSProperties;\n}\n\nconst getElementType = (\n variant: TextVariantType | undefined,\n elementType: ElementType | undefined,\n) => {\n if (variant) {\n return [\"h1\", \"h2\", \"h3\", \"h4\"].includes(variant) ? variant : \"p\";\n }\n return elementType || \"p\";\n};\n\nconst Text = ({ ref, elementType: Component = \"p\", ...props }: TextProps) => {\n // Remove non-DOM props from element\n const { variant, className, spacing, ...otherProps } = props;\n\n // If a variant is supplied, set the class name and element type\n const elementType = getElementType(variant, Component);\n const variantType = variant || elementType;\n const classes = classNames(\n \"mobius\",\n \"mobius-text\",\n { [`--is-${variantType}`]: variantType },\n { [`--has-line-height-${spacing}`]: spacing },\n className,\n );\n\n return <Component ref={ref} {...otherProps} className={classes} />;\n};\n\nText.displayName = \"Text\";\nexport { Text };\n", "import type { RefAttributes } from \"react\";\nimport { useMemo } from \"react\";\nimport type { TextElementType, TextProps } from \"../Text/Text\";\nimport { Text } from \"../Text/Text\";\n\nexport type HTMLElementType = \"span\" | \"div\";\n\nexport interface TextOrHTMLProps\n extends Omit<TextProps, \"children\">, RefAttributes<TextElementType> {\n /** HTML string to be rendered with dangerouslySetInnerHTML */\n text: string;\n /** Custom class name for the dangerous HTML element */\n htmlClassName?: string;\n /** HTML element type for the dangerous HTML element */\n htmlElementType?: HTMLElementType;\n /** If true, wraps the dangerous HTML element inside a Text component */\n textWrapper?: boolean;\n}\n\nconst TextOrHTML = ({\n ref,\n text,\n htmlClassName,\n htmlElementType = \"span\",\n textWrapper = false,\n ...textProps\n}: TextOrHTMLProps) => {\n const DangerousComponent = htmlElementType;\n\n // Memoize the dangerouslySetInnerHTML object to prevent unnecessary re-renders\n // See: https://github.com/facebook/react/issues/31660\n const dangerousHTML = useMemo(() => ({ __html: text }), [text]);\n\n const dangerousElement = (\n <DangerousComponent\n className={htmlClassName}\n dangerouslySetInnerHTML={dangerousHTML}\n />\n );\n\n if (textWrapper) {\n return (\n <Text ref={ref} {...textProps}>\n {dangerousElement}\n </Text>\n );\n }\n\n return dangerousElement;\n};\n\nTextOrHTML.displayName = \"TextOrHTML\";\nexport { TextOrHTML };\n"],
5
+ "mappings": ";;;;;;;;;AAAA,OAAO,gBAAgB;AA4CnB,SAWE,KAXF;AAzCJ,IAAM,cAAc;AAEpB,IAAM,wBAAwB,CAAC,QAC7B,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC;AAEpC,SAAS,KAAK;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAc;AACZ,MAAI,CAAC,MAAM;AACT,UAA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QACV,eAAY;AAAA;AAAA,IACd;AAAA,IACA,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC,aAAY;AAAA,QACZ,WAAU;AAAA,QACV,MAAM;AAAA;AAAA,IACR;AAAA,KACF;AAEJ;AAEA,aAAa,cAAc;",
6
+ "names": ["useId", "useId", "classNames", "classNames", "classNames", "jsx", "classNames", "jsx", "classNames", "jsx", "jsxs", "classNames", "classNames", "jsx", "jsx", "jsx", "jsxs", "classNames"]
7
+ }