@adam-milo/ui 1.0.31 → 1.0.33
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/index.cjs +1 -1
- package/dist/index.js +7 -3
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +1 -1
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +1 -1
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +1 -1
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +1 -1
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +1 -1
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +1 -1
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +1 -1
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +1 -1
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +28 -27
- package/dist/index2.cjs +1 -1
- package/dist/index2.js +1 -1
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +25 -35
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +51 -12
- package/dist/index22.cjs +1 -0
- package/dist/index22.js +55 -0
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +12 -20
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +298 -13
- package/dist/index26.cjs +1 -0
- package/dist/index26.js +16 -0
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +2 -2
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +18 -3
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +1 -1
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +2 -2
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +1 -1
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +1 -1
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +14 -14
- package/dist/src/components/layout/divider/Divider.component.d.ts +39 -0
- package/dist/src/components/layout/divider/Divider.component.d.ts.map +1 -0
- package/dist/src/components/typography/heading/Heading.component.d.ts +91 -0
- package/dist/src/components/typography/heading/Heading.component.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
- package/dist/index24.cjs +0 -1
- package/dist/index24.js +0 -301
- package/dist/index28.cjs +0 -1
- package/dist/index28.js +0 -1193
- package/dist/index42.cjs +0 -1
- package/dist/index42.js +0 -21
- package/dist/index45.cjs +0 -1
- package/dist/index45.js +0 -11
- package/dist/index46.cjs +0 -1
- package/dist/index46.js +0 -70
- package/dist/index47.cjs +0 -1
- package/dist/index47.js +0 -39
- package/dist/index48.cjs +0 -1
- package/dist/index48.js +0 -64
- package/dist/index49.cjs +0 -1
- package/dist/index49.js +0 -10
- package/dist/index50.cjs +0 -1
- package/dist/index50.js +0 -212
- package/dist/index51.cjs +0 -1
- package/dist/index51.js +0 -29
- package/dist/index52.cjs +0 -1
- package/dist/index52.js +0 -208
- package/dist/index53.cjs +0 -1
- package/dist/index53.js +0 -14
- package/dist/index54.cjs +0 -1
- package/dist/index54.js +0 -293
- package/dist/index55.cjs +0 -1
- package/dist/index55.js +0 -18
- package/dist/index56.cjs +0 -1
- package/dist/index56.js +0 -43
- package/dist/index57.cjs +0 -1
- package/dist/index57.js +0 -89
- package/dist/index58.cjs +0 -1
- package/dist/index58.js +0 -14
- package/dist/index59.cjs +0 -1
- package/dist/index59.js +0 -71
- package/dist/index60.cjs +0 -1
- package/dist/index60.js +0 -6
- package/dist/index61.cjs +0 -1
- package/dist/index61.js +0 -14
- package/dist/index62.cjs +0 -1
- package/dist/index62.js +0 -34
- package/dist/index63.cjs +0 -1
- package/dist/index63.js +0 -122
- package/dist/index64.cjs +0 -1
- package/dist/index64.js +0 -11
- package/dist/index65.cjs +0 -1
- package/dist/index65.js +0 -17
- package/dist/index66.cjs +0 -1
- package/dist/index66.js +0 -297
- package/dist/index67.cjs +0 -1
- package/dist/index67.js +0 -25
- package/dist/index68.cjs +0 -1
- package/dist/index68.js +0 -39
- package/dist/index69.cjs +0 -1
- package/dist/index69.js +0 -625
- package/dist/index70.cjs +0 -1
- package/dist/index70.js +0 -39
- package/dist/index71.cjs +0 -1
- package/dist/index71.js +0 -38
- package/dist/index72.cjs +0 -1
- package/dist/index72.js +0 -7
- package/dist/index73.cjs +0 -1
- package/dist/index73.js +0 -10
- package/dist/index74.cjs +0 -1
- package/dist/index74.js +0 -5
- package/dist/index75.cjs +0 -1
- package/dist/index75.js +0 -35
- package/dist/index76.cjs +0 -1
- package/dist/index76.js +0 -180
- package/dist/index77.cjs +0 -1
- package/dist/index77.js +0 -21
- package/dist/index78.cjs +0 -1
- package/dist/index78.js +0 -721
- package/dist/index79.cjs +0 -1
- package/dist/index79.js +0 -154
- package/dist/index80.cjs +0 -1
- package/dist/index80.js +0 -173
- package/dist/index81.cjs +0 -1
- package/dist/index81.js +0 -47
- package/dist/index82.cjs +0 -1
- package/dist/index82.js +0 -13
- package/dist/index83.cjs +0 -1
- package/dist/index83.js +0 -19
- package/dist/index84.cjs +0 -1
- package/dist/index84.js +0 -102
- package/dist/index85.cjs +0 -1
- package/dist/index85.js +0 -88
- package/dist/index86.cjs +0 -1
- package/dist/index86.js +0 -11
- package/dist/index87.cjs +0 -1
- package/dist/index87.js +0 -29
- package/dist/index88.cjs +0 -1
- package/dist/index88.js +0 -37
- package/dist/index89.cjs +0 -1
- package/dist/index89.js +0 -16
- package/dist/index90.cjs +0 -1
- package/dist/index90.js +0 -48
- package/dist/index91.cjs +0 -1
- package/dist/index91.js +0 -9
package/dist/index25.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),t=require("./index23.cjs");;/* empty css */const a=require("./index26.cjs"),s=require("./index44.cjs"),n=r.forwardRef(({type:n="text",label:l,error:i,helperText:o,fullWidth:u=!1,showPasswordToggle:d=!0,showLastChar:c=!0,lastCharDelay:p=500,validate:h,onValidationChange:f,className:g,id:x,onChange:v,onBlur:w,required:j,value:m,"data-cy":y,"data-testid":k,...b},C)=>{const[$,N]=r.useState(!1),[_,q]=r.useState(),[M,S]=r.useState(!1),[L,R]=r.useState(!1),T=r.useRef(!1),[E,W]=r.useState(""),B=r.useRef(""),F=r.useRef(null),I=r.useRef(null),z=a.useMergedRef(C,I),D=r.useId(),O=x||D,P=`${O}-error`,V=`${O}-helper`,H=y||"input",A=k||"input",G="password"===n,J=G&&d,K=G&&c&&!$,Q=G&&($||K&&B.current.length>0)?"text":n,U=l&&j&&!l.includes("*")?`${l} *`:l,X=r.useMemo(()=>s.debounce(e=>{if(h&&T.current){const r=h(e);q(r),null==f||f(!r)}},300),[h,f]),Y=r.useRef(X);r.useEffect(()=>{Y.current=X},[X]),r.useEffect(()=>{process.env.NODE_ENV},[G,c,m]),r.useEffect(()=>()=>{F.current&&clearTimeout(F.current),Y.current.cancel()},[]);const Z=K&&void 0===m?E:$&&G&&void 0===m?B.current||"":m,ee=i||_,re=b.disabled?"disabled":ee?"error":M?"focus":L?"hover":"idle";return e.jsxs("div",{className:t.cn("input-wrapper",u&&"input-wrapper--full-width"),"data-cy":`${H}-wrapper`,"data-testid":`${A}-wrapper`,children:[l&&e.jsx("label",{htmlFor:O,className:"input__label","data-cy":`${H}-label`,"data-testid":`${A}-label`,children:U}),e.jsxs("div",{className:"input__field-container",children:[e.jsx("input",{ref:z,id:O,type:Q,value:Z,className:t.cn("input",ee&&"input--error",u&&"input--full-width",J&&"input--with-toggle",g),"aria-invalid":ee?"true":"false","aria-required":j?"true":void 0,"aria-describedby":ee?P:o?V:void 0,"data-cy":H,"data-testid":A,"data-state":re,onChange:e=>{null==v||v(e);let r=e.target.value;if(K){const t=e.target,a=t.value;B.current=a;const s=a?"•".repeat(a.length-1)+a.slice(-1):"";W(s),t.value=s,r=a,F.current&&clearTimeout(F.current),F.current=setTimeout(()=>{W("•".repeat(a.length))},p)}T.current&&X(r)},onFocus:e=>{var r;S(!0),null==(r=b.onFocus)||r.call(b,e)},onBlur:e=>{if(S(!1),T.current=!0,h){const r=K?B.current:e.target.value,t=h(r);q(t),null==f||f(!t)}null==w||w(e)},onMouseEnter:()=>{R(!0)},onMouseLeave:()=>{R(!1)},required:j,...b}),J&&e.jsx("button",{type:"button",className:"input__toggle",onClick:()=>{N(e=>!e),setTimeout(()=>{var e;return null==(e=I.current)?void 0:e.focus()},0)},"aria-label":$?"Hide password":"Show password","data-cy":`${H}-toggle`,"data-testid":`${A}-toggle`,children:$?e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsx("path",{d:"M10 4C5.5 4 2 10 2 10s3.5 6 8 6 8-6 8-6-3.5-6-8-6z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),e.jsx("circle",{cx:"10",cy:"10",r:"2.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})]}):e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsx("path",{d:"M10 4C5.5 4 2 10 2 10s3.5 6 8 6 8-6 8-6-3.5-6-8-6z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),e.jsx("circle",{cx:"10",cy:"10",r:"2.5",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),e.jsx("path",{d:"M3 3l14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})})]}),ee&&e.jsx("span",{id:P,className:"input__error",role:"alert","data-cy":`${H}-error`,"data-testid":`${A}-error`,children:ee}),o&&!ee&&e.jsx("span",{id:V,className:"input__helper","data-cy":`${H}-helper`,"data-testid":`${A}-helper`,children:o})]})});n.displayName="Input",exports.Input=n;
|
package/dist/index25.js
CHANGED
|
@@ -1,16 +1,301 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState, useRef, useId, useMemo, useEffect } from "react";
|
|
3
|
+
import { cn } from "./index23.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { useMergedRef } from "./index26.js";
|
|
6
|
+
import { debounce } from "./index44.js";
|
|
7
|
+
const Input = forwardRef(
|
|
8
|
+
({
|
|
9
|
+
type = "text",
|
|
10
|
+
label,
|
|
11
|
+
error: externalError,
|
|
12
|
+
helperText,
|
|
13
|
+
fullWidth = false,
|
|
14
|
+
showPasswordToggle = true,
|
|
15
|
+
showLastChar = true,
|
|
16
|
+
lastCharDelay = 500,
|
|
17
|
+
validate,
|
|
18
|
+
onValidationChange,
|
|
19
|
+
className,
|
|
20
|
+
id: providedId,
|
|
21
|
+
onChange,
|
|
22
|
+
onBlur,
|
|
23
|
+
required,
|
|
24
|
+
value: controlledValue,
|
|
25
|
+
"data-cy": dataCy,
|
|
26
|
+
"data-testid": dataTestId,
|
|
27
|
+
...props
|
|
28
|
+
}, ref) => {
|
|
29
|
+
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
30
|
+
const [internalError, setInternalError] = useState();
|
|
31
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
32
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
33
|
+
const touchedRef = useRef(false);
|
|
34
|
+
const [displayPassword, setDisplayPassword] = useState("");
|
|
35
|
+
const actualPasswordRef = useRef("");
|
|
36
|
+
const timeoutRef = useRef(null);
|
|
37
|
+
const inputRef = useRef(null);
|
|
38
|
+
const mergedRef = useMergedRef(ref, inputRef);
|
|
39
|
+
const generatedId = useId();
|
|
40
|
+
const id = providedId || generatedId;
|
|
41
|
+
const errorId = `${id}-error`;
|
|
42
|
+
const helperId = `${id}-helper`;
|
|
43
|
+
const finalDataCy = dataCy || "input";
|
|
44
|
+
const finalTestId = dataTestId || "input";
|
|
45
|
+
const isPasswordType = type === "password";
|
|
46
|
+
const showToggle = isPasswordType && showPasswordToggle;
|
|
47
|
+
const shouldEnableLastCharPreview = isPasswordType && showLastChar && !isPasswordVisible;
|
|
48
|
+
const inputType = isPasswordType && (isPasswordVisible || shouldEnableLastCharPreview && actualPasswordRef.current.length > 0) ? "text" : type;
|
|
49
|
+
const displayLabel = label && required && !label.includes("*") ? `${label} *` : label;
|
|
50
|
+
const togglePasswordVisibility = () => {
|
|
51
|
+
setIsPasswordVisible((prev) => !prev);
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
var _a;
|
|
54
|
+
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
55
|
+
}, 0);
|
|
56
|
+
};
|
|
57
|
+
const debouncedValidate = useMemo(
|
|
58
|
+
() => debounce((value) => {
|
|
59
|
+
if (validate && touchedRef.current) {
|
|
60
|
+
const validationError = validate(value);
|
|
61
|
+
setInternalError(validationError);
|
|
62
|
+
onValidationChange == null ? void 0 : onValidationChange(!validationError);
|
|
63
|
+
}
|
|
64
|
+
}, 300),
|
|
65
|
+
[validate, onValidationChange]
|
|
66
|
+
);
|
|
67
|
+
const debouncedValidateRef = useRef(debouncedValidate);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
debouncedValidateRef.current = debouncedValidate;
|
|
70
|
+
}, [debouncedValidate]);
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
if (process.env.NODE_ENV === "development") {
|
|
73
|
+
if (isPasswordType && showLastChar && controlledValue !== void 0) {
|
|
74
|
+
console.warn(
|
|
75
|
+
"[Input] Password last character preview (showLastChar) only works in uncontrolled mode. Remove the value prop to use this feature, or set showLastChar={false}."
|
|
76
|
+
);
|
|
77
|
+
}
|
|
10
78
|
}
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
|
|
79
|
+
}, [isPasswordType, showLastChar, controlledValue]);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
return () => {
|
|
82
|
+
if (timeoutRef.current) {
|
|
83
|
+
clearTimeout(timeoutRef.current);
|
|
84
|
+
}
|
|
85
|
+
debouncedValidateRef.current.cancel();
|
|
86
|
+
};
|
|
87
|
+
}, []);
|
|
88
|
+
const inputValue = shouldEnableLastCharPreview && controlledValue === void 0 ? displayPassword : isPasswordVisible && isPasswordType && controlledValue === void 0 ? actualPasswordRef.current || "" : controlledValue;
|
|
89
|
+
const handleChange = (e) => {
|
|
90
|
+
onChange == null ? void 0 : onChange(e);
|
|
91
|
+
let value = e.target.value;
|
|
92
|
+
if (shouldEnableLastCharPreview) {
|
|
93
|
+
const input = e.target;
|
|
94
|
+
const newValue = input.value;
|
|
95
|
+
actualPasswordRef.current = newValue;
|
|
96
|
+
const masked = newValue ? "•".repeat(newValue.length - 1) + newValue.slice(-1) : "";
|
|
97
|
+
setDisplayPassword(masked);
|
|
98
|
+
input.value = masked;
|
|
99
|
+
value = newValue;
|
|
100
|
+
if (timeoutRef.current) {
|
|
101
|
+
clearTimeout(timeoutRef.current);
|
|
102
|
+
}
|
|
103
|
+
timeoutRef.current = setTimeout(() => {
|
|
104
|
+
setDisplayPassword("•".repeat(newValue.length));
|
|
105
|
+
}, lastCharDelay);
|
|
106
|
+
}
|
|
107
|
+
if (touchedRef.current) {
|
|
108
|
+
debouncedValidate(value);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const handleFocus = (e) => {
|
|
112
|
+
var _a;
|
|
113
|
+
setIsFocused(true);
|
|
114
|
+
(_a = props.onFocus) == null ? void 0 : _a.call(props, e);
|
|
115
|
+
};
|
|
116
|
+
const handleBlur = (e) => {
|
|
117
|
+
setIsFocused(false);
|
|
118
|
+
touchedRef.current = true;
|
|
119
|
+
if (validate) {
|
|
120
|
+
const valueToValidate = shouldEnableLastCharPreview ? actualPasswordRef.current : e.target.value;
|
|
121
|
+
const validationError = validate(valueToValidate);
|
|
122
|
+
setInternalError(validationError);
|
|
123
|
+
onValidationChange == null ? void 0 : onValidationChange(!validationError);
|
|
124
|
+
}
|
|
125
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
126
|
+
};
|
|
127
|
+
const handleMouseEnter = () => {
|
|
128
|
+
setIsHovered(true);
|
|
129
|
+
};
|
|
130
|
+
const handleMouseLeave = () => {
|
|
131
|
+
setIsHovered(false);
|
|
132
|
+
};
|
|
133
|
+
const displayError = externalError || internalError;
|
|
134
|
+
const inputState = props.disabled ? "disabled" : displayError ? "error" : isFocused ? "focus" : isHovered ? "hover" : "idle";
|
|
135
|
+
return /* @__PURE__ */ jsxs(
|
|
136
|
+
"div",
|
|
137
|
+
{
|
|
138
|
+
className: cn("input-wrapper", fullWidth && "input-wrapper--full-width"),
|
|
139
|
+
"data-cy": `${finalDataCy}-wrapper`,
|
|
140
|
+
"data-testid": `${finalTestId}-wrapper`,
|
|
141
|
+
children: [
|
|
142
|
+
label && /* @__PURE__ */ jsx(
|
|
143
|
+
"label",
|
|
144
|
+
{
|
|
145
|
+
htmlFor: id,
|
|
146
|
+
className: "input__label",
|
|
147
|
+
"data-cy": `${finalDataCy}-label`,
|
|
148
|
+
"data-testid": `${finalTestId}-label`,
|
|
149
|
+
children: displayLabel
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
/* @__PURE__ */ jsxs("div", { className: "input__field-container", children: [
|
|
153
|
+
/* @__PURE__ */ jsx(
|
|
154
|
+
"input",
|
|
155
|
+
{
|
|
156
|
+
ref: mergedRef,
|
|
157
|
+
id,
|
|
158
|
+
type: inputType,
|
|
159
|
+
value: inputValue,
|
|
160
|
+
className: cn(
|
|
161
|
+
"input",
|
|
162
|
+
displayError && "input--error",
|
|
163
|
+
fullWidth && "input--full-width",
|
|
164
|
+
showToggle && "input--with-toggle",
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
"aria-invalid": displayError ? "true" : "false",
|
|
168
|
+
"aria-required": required ? "true" : void 0,
|
|
169
|
+
"aria-describedby": displayError ? errorId : helperText ? helperId : void 0,
|
|
170
|
+
"data-cy": finalDataCy,
|
|
171
|
+
"data-testid": finalTestId,
|
|
172
|
+
"data-state": inputState,
|
|
173
|
+
onChange: handleChange,
|
|
174
|
+
onFocus: handleFocus,
|
|
175
|
+
onBlur: handleBlur,
|
|
176
|
+
onMouseEnter: handleMouseEnter,
|
|
177
|
+
onMouseLeave: handleMouseLeave,
|
|
178
|
+
required,
|
|
179
|
+
...props
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
showToggle && /* @__PURE__ */ jsx(
|
|
183
|
+
"button",
|
|
184
|
+
{
|
|
185
|
+
type: "button",
|
|
186
|
+
className: "input__toggle",
|
|
187
|
+
onClick: togglePasswordVisibility,
|
|
188
|
+
"aria-label": isPasswordVisible ? "Hide password" : "Show password",
|
|
189
|
+
"data-cy": `${finalDataCy}-toggle`,
|
|
190
|
+
"data-testid": `${finalTestId}-toggle`,
|
|
191
|
+
children: isPasswordVisible ? /* @__PURE__ */ jsxs(
|
|
192
|
+
"svg",
|
|
193
|
+
{
|
|
194
|
+
width: "20",
|
|
195
|
+
height: "20",
|
|
196
|
+
viewBox: "0 0 20 20",
|
|
197
|
+
fill: "none",
|
|
198
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
199
|
+
"aria-hidden": "true",
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ jsx(
|
|
202
|
+
"path",
|
|
203
|
+
{
|
|
204
|
+
d: "M10 4C5.5 4 2 10 2 10s3.5 6 8 6 8-6 8-6-3.5-6-8-6z",
|
|
205
|
+
stroke: "currentColor",
|
|
206
|
+
strokeWidth: "1.5",
|
|
207
|
+
strokeLinecap: "round",
|
|
208
|
+
strokeLinejoin: "round",
|
|
209
|
+
fill: "none"
|
|
210
|
+
}
|
|
211
|
+
),
|
|
212
|
+
/* @__PURE__ */ jsx(
|
|
213
|
+
"circle",
|
|
214
|
+
{
|
|
215
|
+
cx: "10",
|
|
216
|
+
cy: "10",
|
|
217
|
+
r: "2.5",
|
|
218
|
+
stroke: "currentColor",
|
|
219
|
+
strokeWidth: "1.5",
|
|
220
|
+
fill: "none"
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
) : /* @__PURE__ */ jsxs(
|
|
226
|
+
"svg",
|
|
227
|
+
{
|
|
228
|
+
width: "20",
|
|
229
|
+
height: "20",
|
|
230
|
+
viewBox: "0 0 20 20",
|
|
231
|
+
fill: "none",
|
|
232
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
233
|
+
"aria-hidden": "true",
|
|
234
|
+
children: [
|
|
235
|
+
/* @__PURE__ */ jsx(
|
|
236
|
+
"path",
|
|
237
|
+
{
|
|
238
|
+
d: "M10 4C5.5 4 2 10 2 10s3.5 6 8 6 8-6 8-6-3.5-6-8-6z",
|
|
239
|
+
stroke: "currentColor",
|
|
240
|
+
strokeWidth: "1.5",
|
|
241
|
+
strokeLinecap: "round",
|
|
242
|
+
strokeLinejoin: "round",
|
|
243
|
+
fill: "none"
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
/* @__PURE__ */ jsx(
|
|
247
|
+
"circle",
|
|
248
|
+
{
|
|
249
|
+
cx: "10",
|
|
250
|
+
cy: "10",
|
|
251
|
+
r: "2.5",
|
|
252
|
+
stroke: "currentColor",
|
|
253
|
+
strokeWidth: "1.5",
|
|
254
|
+
fill: "none"
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
/* @__PURE__ */ jsx(
|
|
258
|
+
"path",
|
|
259
|
+
{
|
|
260
|
+
d: "M3 3l14 14",
|
|
261
|
+
stroke: "currentColor",
|
|
262
|
+
strokeWidth: "1.5",
|
|
263
|
+
strokeLinecap: "round"
|
|
264
|
+
}
|
|
265
|
+
)
|
|
266
|
+
]
|
|
267
|
+
}
|
|
268
|
+
)
|
|
269
|
+
}
|
|
270
|
+
)
|
|
271
|
+
] }),
|
|
272
|
+
displayError && /* @__PURE__ */ jsx(
|
|
273
|
+
"span",
|
|
274
|
+
{
|
|
275
|
+
id: errorId,
|
|
276
|
+
className: "input__error",
|
|
277
|
+
role: "alert",
|
|
278
|
+
"data-cy": `${finalDataCy}-error`,
|
|
279
|
+
"data-testid": `${finalTestId}-error`,
|
|
280
|
+
children: displayError
|
|
281
|
+
}
|
|
282
|
+
),
|
|
283
|
+
helperText && !displayError && /* @__PURE__ */ jsx(
|
|
284
|
+
"span",
|
|
285
|
+
{
|
|
286
|
+
id: helperId,
|
|
287
|
+
className: "input__helper",
|
|
288
|
+
"data-cy": `${finalDataCy}-helper`,
|
|
289
|
+
"data-testid": `${finalTestId}-helper`,
|
|
290
|
+
children: helperText
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
Input.displayName = "Input";
|
|
14
299
|
export {
|
|
15
|
-
|
|
300
|
+
Input
|
|
16
301
|
};
|
package/dist/index26.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.useMergedRef=function(...r){return e.useCallback(e=>{r.forEach(r=>{r&&("function"==typeof r?r(e):r.current=e)})},r)};
|
package/dist/index26.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
function useMergedRef(...refs) {
|
|
3
|
+
return useCallback((element) => {
|
|
4
|
+
refs.forEach((ref) => {
|
|
5
|
+
if (!ref) return;
|
|
6
|
+
if (typeof ref === "function") {
|
|
7
|
+
ref(element);
|
|
8
|
+
} else {
|
|
9
|
+
ref.current = element;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}, refs);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
useMergedRef
|
|
16
|
+
};
|
package/dist/index3.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),e=require("react"),t=require("email-validator"),i=require("./index25.cjs"),l=e.forwardRef(({validateEmail:l=!0,invalidEmailMessage:r="Not a valid email address",validate:d,"data-cy":s,"data-testid":u,...n},o)=>{const m=e.useCallback(a=>{if(a)return t.validate(a)?void 0:r},[r]),c=e.useCallback(a=>l?d?m(a)||d(a):m(a):null==d?void 0:d(a),[l,d,m]);return a.jsx(i.Input,{ref:o,type:"email",validate:c,"data-cy":s||"email-input","data-testid":u||"email-input",...n})});l.displayName="EmailInput",exports.EmailInput=l;
|
package/dist/index3.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useCallback } from "react";
|
|
3
|
-
import { validate } from "
|
|
4
|
-
import { Input } from "./
|
|
3
|
+
import { validate } from "email-validator";
|
|
4
|
+
import { Input } from "./index25.js";
|
|
5
5
|
const EmailInput = forwardRef(
|
|
6
6
|
({
|
|
7
7
|
validateEmail = true,
|
package/dist/index4.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),s=require("./index25.cjs"),r=t.forwardRef(({showToggle:t=!0,"data-cy":r,"data-testid":a,...o},d)=>e.jsx(s.Input,{ref:d,type:"password",showPasswordToggle:t,"data-cy":r||"password-input","data-testid":a||"password-input",...o}));r.displayName="PasswordInput",exports.PasswordInput=r;
|
package/dist/index4.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import { Input } from "./
|
|
3
|
+
import { Input } from "./index25.js";
|
|
4
4
|
const PasswordInput = forwardRef(
|
|
5
5
|
({ showToggle = true, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
package/dist/index44.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.debounce=function(e,t){let l=null;const n=function(...n){l&&clearTimeout(l);const o=this;l=setTimeout(()=>{e.apply(o,n),l=null},t)};return n.cancel=()=>{l&&(clearTimeout(l),l=null)},n};
|
package/dist/index44.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
function
|
|
2
|
-
|
|
1
|
+
function debounce(func, wait) {
|
|
2
|
+
let timeoutId = null;
|
|
3
|
+
const debounced = function(...args) {
|
|
4
|
+
if (timeoutId) clearTimeout(timeoutId);
|
|
5
|
+
const context = this;
|
|
6
|
+
timeoutId = setTimeout(() => {
|
|
7
|
+
func.apply(context, args);
|
|
8
|
+
timeoutId = null;
|
|
9
|
+
}, wait);
|
|
10
|
+
};
|
|
11
|
+
debounced.cancel = () => {
|
|
12
|
+
if (timeoutId) {
|
|
13
|
+
clearTimeout(timeoutId);
|
|
14
|
+
timeoutId = null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
return debounced;
|
|
3
18
|
}
|
|
4
19
|
export {
|
|
5
|
-
|
|
20
|
+
debounce
|
|
6
21
|
};
|
package/dist/index5.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("./index25.cjs"),r=t.forwardRef(({min:r,max:i,step:s=1,allowDecimals:u=!1,validate:n,"data-cy":l,"data-testid":c,...d},o)=>{const m=t.useCallback(e=>{if(!e)return;const t=parseFloat(e);return isNaN(t)?"Please enter a valid number":u||Number.isInteger(t)?void 0!==r&&t<r?`Must be at least ${r}`:void 0!==i&&t>i?`Must be at most ${i}`:void 0:"Decimals are not allowed"},[r,i,u]),p=t.useCallback(e=>n?m(e)||n(e):m(e),[m,n]);return e.jsx(a.Input,{ref:o,type:"number",min:r,max:i,validate:p,"data-cy":l||"numeric-input","data-testid":c||"numeric-input",...d,step:u?"any":s})});r.displayName="NumericInput",exports.NumericInput=r;
|
package/dist/index5.js
CHANGED
package/dist/index6.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),a=require("./index25.cjs"),n=require("./index26.cjs"),l=t.forwardRef(({allowHyphen:l=!1,allowUnderscore:r=!1,allowSpace:s=!1,minLength:u,maxLength:i,validate:c,onChange:o,"data-cy":p,"data-testid":d,...h},g)=>{const m=t.useRef(null),f=n.useMergedRef(g,m),v=t.useMemo(()=>{let e="^[a-zA-Z0-9";return l&&(e+="\\-"),r&&(e+="_"),s&&(e+=" "),e+="]*$",new RegExp(e)},[l,r,s]),x=t.useMemo(()=>{let e="[a-zA-Z0-9";return l&&(e+="\\-"),r&&(e+="_"),s&&(e+=" "),e+="]",new RegExp(e)},[l,r,s]),y=t.useCallback(e=>{if(e){if(!v.test(e)){let e="letters and numbers";const t=[];return l&&t.push("hyphens"),r&&t.push("underscores"),s&&t.push("spaces"),t.length>0&&(e+=`, ${t.join(", ")}`),`Only ${e} are allowed`}return void 0!==u&&e.length<u?`Must be at least ${u} characters`:void 0!==i&&e.length>i?`Must be at most ${i} characters`:void 0}},[v,u,i,l,r,s]),b=t.useCallback(e=>c?y(e)||c(e):y(e),[y,c]),[j,w]=t.useState(null);t.useEffect(()=>{null!==j&&m.current&&(m.current.setSelectionRange(j,j),w(null))},[h.value,j]);const R=t.useCallback(e=>{const t=e.target,a=t.value,n=t.selectionStart||0,l=a.split("").filter(e=>x.test(e)).join(""),r=n-a.slice(0,n).split("").filter(e=>!x.test(e)).length;t.value=l;void 0!==h.value?w(r):t.setSelectionRange(r,r),null==o||o(e)},[x,o,h.value]);return e.jsx(a.Input,{ref:f,type:"text",minLength:u,maxLength:i,validate:b,onChange:R,"data-cy":p||"alphanumeric-input","data-testid":d||"alphanumeric-input",...h})});l.displayName="AlphanumericInput",exports.AlphanumericInput=l;
|
package/dist/index6.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useRef, useMemo, useCallback, useState, useEffect } from "react";
|
|
3
|
-
import { Input } from "./
|
|
4
|
-
import { useMergedRef } from "./
|
|
3
|
+
import { Input } from "./index25.js";
|
|
4
|
+
import { useMergedRef } from "./index26.js";
|
|
5
5
|
const AlphanumericInput = forwardRef(
|
|
6
6
|
({
|
|
7
7
|
allowHyphen = false,
|
package/dist/index7.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./index23.cjs");;/* empty css */const c=r.forwardRef(({label:c,error:t,helperText:d,indeterminate:i=!1,className:s,id:l,required:n,disabled:o,checked:u,"data-cy":b,"data-testid":h,...x},p)=>{const k=r.useId(),m=l||k,y=`${m}-error`,_=`${m}-helper`,$=b||"checkbox",f=h||"checkbox",j=r.useRef(null),N=r.useCallback(e=>{j.current=e,p&&("function"==typeof p?p(e):"current"in p&&(p.current=e))},[p]);r.useEffect(()=>{j.current&&(j.current.indeterminate=i)},[i]);const q=c&&n&&!c.includes("*")?`${c} *`:c;return e.jsxs("div",{className:a.cn("checkbox-wrapper",o&&"checkbox-wrapper--disabled"),"data-cy":`${$}-wrapper`,"data-testid":`${f}-wrapper`,children:[e.jsxs("div",{className:"checkbox__container",children:[e.jsx("input",{ref:N,id:m,type:"checkbox",checked:u,className:a.cn("checkbox__input",t&&"checkbox__input--error",s),"aria-invalid":t?"true":"false","aria-required":n?"true":void 0,"aria-describedby":t?y:d?_:void 0,"data-cy":$,"data-testid":f,"data-indeterminate":i?"true":void 0,disabled:o,required:n,...x}),c&&e.jsx("label",{htmlFor:m,className:"checkbox__label","data-cy":`${$}-label`,"data-testid":`${f}-label`,children:q})]}),t&&e.jsx("span",{id:y,className:"checkbox__error",role:"alert","data-cy":`${$}-error`,"data-testid":`${f}-error`,children:t}),d&&!t&&e.jsx("span",{id:_,className:"checkbox__helper","data-cy":`${$}-helper`,"data-testid":`${f}-helper`,children:d})]})});c.displayName="Checkbox",exports.Checkbox=c;
|
package/dist/index7.js
CHANGED
package/dist/index8.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./index23.cjs");;/* empty css */const d=r.forwardRef(({label:d,error:i,helperText:t,className:s,id:l,required:c,disabled:o,checked:n,"data-cy":p,"data-testid":u,...b},h)=>{const x=r.useId(),y=l||x,_=`${y}-error`,m=`${y}-helper`,$=p||"radio",j=u||"radio",N=r.useRef(null),f=r.useCallback(e=>{N.current=e,h&&("function"==typeof h?h(e):"current"in h&&(h.current=e))},[h]),q=d&&c&&!d.includes("*")?`${d} *`:d;return e.jsxs("div",{className:a.cn("radio-wrapper",o&&"radio-wrapper--disabled"),"data-cy":`${$}-wrapper`,"data-testid":`${j}-wrapper`,children:[e.jsxs("div",{className:"radio__container",children:[e.jsx("input",{ref:f,id:y,type:"radio",checked:n,className:a.cn("radio__input",i&&"radio__input--error",s),"aria-describedby":i?_:t?m:void 0,"data-cy":$,"data-testid":j,disabled:o,required:c,...b}),d&&e.jsx("label",{htmlFor:y,className:"radio__label","data-cy":`${$}-label`,"data-testid":`${j}-label`,children:q})]}),i&&e.jsx("span",{id:_,className:"radio__error",role:"alert","data-cy":`${$}-error`,"data-testid":`${j}-error`,children:i}),t&&!i&&e.jsx("span",{id:m,className:"radio__helper","data-cy":`${$}-helper`,"data-testid":`${j}-helper`,children:t})]})});d.displayName="Radio",exports.Radio=d;
|
package/dist/index8.js
CHANGED
package/dist/index9.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),r=require("@radix-ui/react-select"),a=require("./index23.cjs");function l(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)};/* empty css */const s=l(r),c=s.Root,d=t.forwardRef(({className:r,children:l,label:c,error:d,helperText:i,fullWidth:o=!1,hasValue:n=!1,id:p,"data-cy":f,"data-testid":g,disabled:h,required:u,...b},m)=>{const x=t.useId(),_=p||x,j=`${_}-error`,y=`${_}-helper`,N=f||"select-trigger",w=g||"select-trigger",S=n;return e.jsxs("div",{className:a.cn("select-wrapper",o&&"select-wrapper--full-width"),"data-cy":`${N}-wrapper`,"data-testid":`${w}-wrapper`,children:[e.jsxs("div",{className:"select-field",children:[e.jsxs("div",{className:"select-field__top",children:[e.jsx("div",{className:a.cn("select-field__border-left",d&&"select-field__border-left--error",S&&"select-field__border-left--floating",h&&"select-field__border-left--disabled")}),c&&S&&e.jsx("div",{className:a.cn("select-field__label-container",d&&"select-field__label-container--error"),children:e.jsx("span",{className:a.cn("select-field__label select-field__label--floating",d&&"select-field__label--error",h&&"select-field__label--disabled"),"data-cy":`${N}-label`,"data-testid":`${w}-label`,children:c})}),e.jsx("div",{className:a.cn("select-field__border-right",d&&"select-field__border-right--error",S&&"select-field__border-right--floating",h&&"select-field__border-right--disabled")})]}),e.jsxs(s.Trigger,{ref:m,id:_,className:a.cn("select-trigger",d&&"select-trigger--error",o&&"select-trigger--full-width",S&&"select-trigger--floating",r),"aria-invalid":d?"true":"false","aria-describedby":d?j:i?y:void 0,"aria-required":u?"true":void 0,"data-cy":N,"data-testid":w,disabled:h,...b,children:[c&&!S&&e.jsx("span",{className:"select-trigger__placeholder-label","data-cy":`${N}-placeholder`,"data-testid":`${w}-placeholder`,children:c}),S&&l,e.jsx(s.Icon,{className:"select-trigger__icon","data-cy":`${N}-icon`,"data-testid":`${w}-icon`,children:e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e.jsx("path",{d:"M7 10L12 15L17 10H7Z",fill:"currentColor"})})})]})]}),d&&e.jsx("span",{id:j,className:"select__error",role:"alert","data-cy":`${N}-error`,"data-testid":`${w}-error`,children:d}),i&&!d&&e.jsx("span",{id:y,className:"select__helper","data-cy":`${N}-helper`,"data-testid":`${w}-helper`,children:i})]})});d.displayName="SelectTrigger";const i=s.Value,o=t.forwardRef(({className:t,children:r,position:l="popper","data-cy":c,"data-testid":d,...i},o)=>{const n=c||"select-content",p=d||"select-content";return e.jsx(s.Portal,{children:e.jsx(s.Content,{ref:o,className:a.cn("select-content",t),position:l,sideOffset:8,"data-cy":n,"data-testid":p,...i,children:e.jsx(s.Viewport,{className:"select-viewport",children:r})})})});o.displayName="SelectContent";const n=t.forwardRef(({className:t,children:r,value:l,"data-cy":c,"data-testid":d,...i},o)=>{const n=c||`select-item-${l}`,p=d||`select-item-${l}`;return e.jsx(s.Item,{ref:o,className:a.cn("select-item",t),value:l,"data-cy":n,"data-testid":p,...i,children:e.jsx(s.ItemText,{children:r})})});n.displayName="SelectItem";const p=s.Group,f=t.forwardRef(({className:t,"data-cy":r,"data-testid":l,...c},d)=>{const i=r||"select-label",o=l||"select-label";return e.jsx(s.Label,{ref:d,className:a.cn("select-group-label",t),"data-cy":i,"data-testid":o,...c})});f.displayName="SelectLabel";const g=t.forwardRef(({className:t,"data-cy":r,"data-testid":l,...c},d)=>{const i=r||"select-separator",o=l||"select-separator";return e.jsx(s.Separator,{ref:d,className:a.cn("select-separator",t),"data-cy":i,"data-testid":o,...c})});g.displayName="SelectSeparator",exports.Select=c,exports.SelectContent=o,exports.SelectGroup=p,exports.SelectItem=n,exports.SelectLabel=f,exports.SelectSeparator=g,exports.SelectTrigger=d,exports.SelectValue=i;
|
package/dist/index9.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useId } from "react";
|
|
3
|
-
import
|
|
4
|
-
import { cn } from "./
|
|
3
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
|
+
import { cn } from "./index23.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
const Select =
|
|
6
|
+
const Select = SelectPrimitive.Root;
|
|
7
7
|
const SelectTrigger = forwardRef(
|
|
8
8
|
({
|
|
9
9
|
className,
|
|
@@ -82,7 +82,7 @@ const SelectTrigger = forwardRef(
|
|
|
82
82
|
)
|
|
83
83
|
] }),
|
|
84
84
|
/* @__PURE__ */ jsxs(
|
|
85
|
-
Trigger,
|
|
85
|
+
SelectPrimitive.Trigger,
|
|
86
86
|
{
|
|
87
87
|
ref,
|
|
88
88
|
id,
|
|
@@ -112,7 +112,7 @@ const SelectTrigger = forwardRef(
|
|
|
112
112
|
),
|
|
113
113
|
isFloating && children,
|
|
114
114
|
/* @__PURE__ */ jsx(
|
|
115
|
-
Icon,
|
|
115
|
+
SelectPrimitive.Icon,
|
|
116
116
|
{
|
|
117
117
|
className: "select-trigger__icon",
|
|
118
118
|
"data-cy": `${finalDataCy}-icon`,
|
|
@@ -162,7 +162,7 @@ const SelectTrigger = forwardRef(
|
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
164
|
SelectTrigger.displayName = "SelectTrigger";
|
|
165
|
-
const SelectValue = Value;
|
|
165
|
+
const SelectValue = SelectPrimitive.Value;
|
|
166
166
|
const SelectContent = forwardRef(
|
|
167
167
|
({
|
|
168
168
|
className,
|
|
@@ -174,8 +174,8 @@ const SelectContent = forwardRef(
|
|
|
174
174
|
}, ref) => {
|
|
175
175
|
const finalDataCy = dataCy || "select-content";
|
|
176
176
|
const finalTestId = dataTestId || "select-content";
|
|
177
|
-
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
|
|
178
|
-
|
|
177
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
178
|
+
SelectPrimitive.Content,
|
|
179
179
|
{
|
|
180
180
|
ref,
|
|
181
181
|
className: cn("select-content", className),
|
|
@@ -184,7 +184,7 @@ const SelectContent = forwardRef(
|
|
|
184
184
|
"data-cy": finalDataCy,
|
|
185
185
|
"data-testid": finalTestId,
|
|
186
186
|
...props,
|
|
187
|
-
children: /* @__PURE__ */ jsx(Viewport, { className: "select-viewport", children })
|
|
187
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "select-viewport", children })
|
|
188
188
|
}
|
|
189
189
|
) });
|
|
190
190
|
}
|
|
@@ -195,7 +195,7 @@ const SelectItem = forwardRef(
|
|
|
195
195
|
const finalDataCy = dataCy || `select-item-${value}`;
|
|
196
196
|
const finalTestId = dataTestId || `select-item-${value}`;
|
|
197
197
|
return /* @__PURE__ */ jsx(
|
|
198
|
-
Item,
|
|
198
|
+
SelectPrimitive.Item,
|
|
199
199
|
{
|
|
200
200
|
ref,
|
|
201
201
|
className: cn("select-item", className),
|
|
@@ -203,19 +203,19 @@ const SelectItem = forwardRef(
|
|
|
203
203
|
"data-cy": finalDataCy,
|
|
204
204
|
"data-testid": finalTestId,
|
|
205
205
|
...props,
|
|
206
|
-
children: /* @__PURE__ */ jsx(ItemText, { children })
|
|
206
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
207
207
|
}
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
210
|
);
|
|
211
211
|
SelectItem.displayName = "SelectItem";
|
|
212
|
-
const SelectGroup = Group;
|
|
212
|
+
const SelectGroup = SelectPrimitive.Group;
|
|
213
213
|
const SelectLabel = forwardRef(
|
|
214
214
|
({ className, "data-cy": dataCy, "data-testid": dataTestId, ...props }, ref) => {
|
|
215
215
|
const finalDataCy = dataCy || "select-label";
|
|
216
216
|
const finalTestId = dataTestId || "select-label";
|
|
217
217
|
return /* @__PURE__ */ jsx(
|
|
218
|
-
Label,
|
|
218
|
+
SelectPrimitive.Label,
|
|
219
219
|
{
|
|
220
220
|
ref,
|
|
221
221
|
className: cn("select-group-label", className),
|
|
@@ -231,7 +231,7 @@ const SelectSeparator = forwardRef(({ className, "data-cy": dataCy, "data-testid
|
|
|
231
231
|
const finalDataCy = dataCy || "select-separator";
|
|
232
232
|
const finalTestId = dataTestId || "select-separator";
|
|
233
233
|
return /* @__PURE__ */ jsx(
|
|
234
|
-
Separator,
|
|
234
|
+
SelectPrimitive.Separator,
|
|
235
235
|
{
|
|
236
236
|
ref,
|
|
237
237
|
className: cn("select-separator", className),
|