karsten-design-system 1.0.16 → 1.0.17
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.
|
@@ -33,7 +33,7 @@ function Select({ options, value, onChange, placeholder = 'Selecione uma opção
|
|
|
33
33
|
? 'text-redError'
|
|
34
34
|
: isOnFocus
|
|
35
35
|
? 'text-primary'
|
|
36
|
-
: 'text-gray'), children: isFloating ? customPlaceholder : placeholder }), jsxRuntimeExports.jsxs(IconField, { className: "w-full", children: [jsxRuntimeExports.jsx(InputText, { type: "text", value: value ? value.label : '', onClick: toggleDropdown, className: clsx('w-full font-roboto text-lg border pt-5 !p-2 rounded-md focus:shadow-none', hasError ? 'border-redError' : 'border-gray focus:border-primary', disabled && 'border-stoneDark text-disabled', error && 'border-redError text-redError', !error && 'border-gray'), onFocus: () => setIsOnFocus(true), onBlur: () => setIsOnFocus(false), invalid: hasError, readOnly: true }), jsxRuntimeExports.jsx(InputIcon, { className: clsx(`${isOpen ? 'pi pi-angle-up' : 'pi pi-angle-down'}`, 'text-gray px-2', disabled && 'text-disabled', error && 'text-redError'), onClick: toggleDropdown })] })] }), isOpen && (jsxRuntimeExports.jsx("div", { className: clsx('absolute w-full bg-background border shadow-md z-10 rounded-md p-2 -bottom-1 translate-y-full', error ? 'border-redError' : 'border-gray'), children: jsxRuntimeExports.jsx("ul", { children: options.map((option) => (jsxRuntimeExports.jsxs("li", { onClick: () => handleSelect(option), className: "p-2 flex justify-between items-center cursor-pointer", children: [option.label, jsxRuntimeExports.jsx("input", { type: "radio", checked: value?.value === option.value, className: "appearance-none w-2 h-2 rounded-full ring-1 ring-offset-2 ring-offset-background ring-gray checked:bg-primary cursor-pointer" })] }, option.value))) }) })), hasError && jsxRuntimeExports.jsx("span", { className: "text-redError text-xs px-2", children: error })] }));
|
|
36
|
+
: 'text-gray'), children: isFloating ? customPlaceholder : placeholder }), jsxRuntimeExports.jsxs(IconField, { className: "w-full", children: [jsxRuntimeExports.jsx(InputText, { type: "text", value: value ? value.label : '', onClick: toggleDropdown, className: clsx('w-full font-roboto text-lg border pt-5 !p-2 rounded-md focus:shadow-none', hasError ? 'border-redError' : 'border-gray focus:border-primary', disabled && 'border-stoneDark text-disabled', error && 'border-redError text-redError', !error && 'border-gray'), onFocus: () => setIsOnFocus(true), onBlur: () => setIsOnFocus(false), invalid: hasError, readOnly: true }), jsxRuntimeExports.jsx(InputIcon, { className: clsx(`${isOpen ? 'pi pi-angle-up' : 'pi pi-angle-down'}`, 'text-gray px-2', disabled && 'text-disabled', error && 'text-redError'), onClick: toggleDropdown })] })] }), isOpen && (jsxRuntimeExports.jsx("div", { className: clsx('absolute w-full bg-background border shadow-md z-10 rounded-md p-2 -bottom-1 translate-y-full', error ? 'border-redError' : 'border-gray'), children: jsxRuntimeExports.jsx("ul", { children: options.map((option) => (jsxRuntimeExports.jsxs("li", { onClick: () => handleSelect(option), className: "p-2 flex justify-between items-center cursor-pointer", children: [option.label, jsxRuntimeExports.jsx("input", { type: "radio", checked: value?.value === option.value, onChange: () => handleSelect(option), className: "appearance-none w-2 h-2 rounded-full ring-1 ring-offset-2 ring-offset-background ring-gray checked:bg-primary cursor-pointer" })] }, option.value))) }) })), hasError && jsxRuntimeExports.jsx("span", { className: "text-redError text-xs px-2", children: error })] }));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export { Select };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sources":["../../../../src/stories/components/select.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAiBM,SAAU,MAAM,CAAC,EACrB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,WAAW,GAAG,qBAAqB,EACnC,iBAAiB,GAAG,OAAO,EAC3B,QAAQ,GAAG,KAAK,EAChB,KAAK,GACO,EAAA;IACZ,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC3C,IAAA,MAAM,CAAC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