react-better-html 1.1.152 → 1.1.154
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.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +94 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +94 -52
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -44,8 +44,9 @@ type DivProps<Value = unknown> = {
|
|
|
44
44
|
as?: WebTarget;
|
|
45
45
|
/** @default false */
|
|
46
46
|
isTabAccessed?: boolean;
|
|
47
|
+
htmlContentTranslate?: React.ComponentProps<"div">["translate"];
|
|
47
48
|
onClickWithValue?: (value: Value) => void;
|
|
48
|
-
} & OmitProps<React.ComponentProps<"div">, "style" | "defaultValue"> & ComponentStyle & ComponentHoverStyle;
|
|
49
|
+
} & OmitProps<React.ComponentProps<"div">, "style" | "defaultValue" | "translate"> & ComponentStyle & ComponentHoverStyle;
|
|
49
50
|
type DivComponentType = {
|
|
50
51
|
<Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value>>): React.ReactElement;
|
|
51
52
|
row: <Value>(props: ComponentPropWithRef<HTMLDivElement, OmitProps<DivProps<Value>, "display" | "flexDirection"> & {
|
|
@@ -386,6 +387,8 @@ type InputFieldProps = {
|
|
|
386
387
|
infoText?: string;
|
|
387
388
|
leftIcon?: IconName | AnyOtherString;
|
|
388
389
|
rightIcon?: IconName | AnyOtherString;
|
|
390
|
+
prefix?: React.ReactNode;
|
|
391
|
+
suffix?: React.ReactNode;
|
|
389
392
|
insideInputFieldComponent?: React.ReactNode;
|
|
390
393
|
/** @default false */
|
|
391
394
|
withDebounce?: boolean;
|
|
@@ -394,7 +397,7 @@ type InputFieldProps = {
|
|
|
394
397
|
onChangeValue?: (value: string) => void;
|
|
395
398
|
onClickRightIcon?: () => void;
|
|
396
399
|
holderRef?: React.ForwardedRef<HTMLDivElement>;
|
|
397
|
-
} & OmitProps<React.ComponentProps<"input">, "style" | "ref"> & ComponentStyle & ComponentHoverStyle;
|
|
400
|
+
} & OmitProps<React.ComponentProps<"input">, "style" | "ref" | "prefix"> & ComponentStyle & ComponentHoverStyle;
|
|
398
401
|
type TextareaFieldProps = OmitProps<InputFieldProps, "type"> & OmitProps<React.ComponentProps<"textarea">, "style" | "ref">;
|
|
399
402
|
type InputFieldComponentType = {
|
|
400
403
|
(props: ComponentPropWithRef<HTMLInputElement, InputFieldProps>): React.ReactElement;
|
|
@@ -402,7 +405,7 @@ type InputFieldComponentType = {
|
|
|
402
405
|
email: (props: ComponentPropWithRef<HTMLInputElement, InputFieldProps>) => React.ReactElement;
|
|
403
406
|
password: (props: ComponentPropWithRef<HTMLInputElement, InputFieldProps>) => React.ReactElement;
|
|
404
407
|
search: (props: ComponentPropWithRef<HTMLInputElement, InputFieldProps>) => React.ReactElement;
|
|
405
|
-
phoneNumber: (props: ComponentPropWithRef<HTMLInputElement, OmitProps<InputFieldProps, "type">>) => React.ReactElement;
|
|
408
|
+
phoneNumber: (props: ComponentPropWithRef<HTMLInputElement, OmitProps<InputFieldProps, "type" | "prefix">>) => React.ReactElement;
|
|
406
409
|
date: (props: ComponentPropWithRef<HTMLInputElement, InputFieldProps & {
|
|
407
410
|
minDate?: Date;
|
|
408
411
|
maxDate?: Date;
|
|
@@ -996,4 +999,4 @@ type AlertsPluginOptions = {
|
|
|
996
999
|
declare const defaultAlertsPluginOptions: Required<AlertsPluginOptions>;
|
|
997
1000
|
declare const alertsPlugin: BetterHtmlPluginConstructor<AlertsPluginOptions>;
|
|
998
1001
|
|
|
999
|
-
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type Styles, type TabGroup, Table, type TableColumn, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, desaturateColor, formatPhoneNumber, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, reactRouterDomPlugin, saturateColor, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
|
1002
|
+
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type Styles, type TabGroup, Table, type TableColumn, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, desaturateColor, formatPhoneNumber, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, reactRouterDomPlugin, saturateColor, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
package/dist/index.d.ts
CHANGED
|
@@ -44,8 +44,9 @@ type DivProps<Value = unknown> = {
|
|
|
44
44
|
as?: WebTarget;
|
|
45
45
|
/** @default false */
|
|
46
46
|
isTabAccessed?: boolean;
|
|
47
|
+
htmlContentTranslate?: React.ComponentProps<"div">["translate"];
|
|
47
48
|
onClickWithValue?: (value: Value) => void;
|
|
48
|
-
} & OmitProps<React.ComponentProps<"div">, "style" | "defaultValue"> & ComponentStyle & ComponentHoverStyle;
|
|
49
|
+
} & OmitProps<React.ComponentProps<"div">, "style" | "defaultValue" | "translate"> & ComponentStyle & ComponentHoverStyle;
|
|
49
50
|
type DivComponentType = {
|
|
50
51
|
<Value>(props: ComponentPropWithRef<HTMLDivElement, DivProps<Value>>): React.ReactElement;
|
|
51
52
|
row: <Value>(props: ComponentPropWithRef<HTMLDivElement, OmitProps<DivProps<Value>, "display" | "flexDirection"> & {
|
|
@@ -386,6 +387,8 @@ type InputFieldProps = {
|
|
|
386
387
|
infoText?: string;
|
|
387
388
|
leftIcon?: IconName | AnyOtherString;
|
|
388
389
|
rightIcon?: IconName | AnyOtherString;
|
|
390
|
+
prefix?: React.ReactNode;
|
|
391
|
+
suffix?: React.ReactNode;
|
|
389
392
|
insideInputFieldComponent?: React.ReactNode;
|
|
390
393
|
/** @default false */
|
|
391
394
|
withDebounce?: boolean;
|
|
@@ -394,7 +397,7 @@ type InputFieldProps = {
|
|
|
394
397
|
onChangeValue?: (value: string) => void;
|
|
395
398
|
onClickRightIcon?: () => void;
|
|
396
399
|
holderRef?: React.ForwardedRef<HTMLDivElement>;
|
|
397
|
-
} & OmitProps<React.ComponentProps<"input">, "style" | "ref"> & ComponentStyle & ComponentHoverStyle;
|
|
400
|
+
} & OmitProps<React.ComponentProps<"input">, "style" | "ref" | "prefix"> & ComponentStyle & ComponentHoverStyle;
|
|
398
401
|
type TextareaFieldProps = OmitProps<InputFieldProps, "type"> & OmitProps<React.ComponentProps<"textarea">, "style" | "ref">;
|
|
399
402
|
type InputFieldComponentType = {
|
|
400
403
|
(props: ComponentPropWithRef<HTMLInputElement, InputFieldProps>): React.ReactElement;
|
|
@@ -402,7 +405,7 @@ type InputFieldComponentType = {
|
|
|
402
405
|
email: (props: ComponentPropWithRef<HTMLInputElement, InputFieldProps>) => React.ReactElement;
|
|
403
406
|
password: (props: ComponentPropWithRef<HTMLInputElement, InputFieldProps>) => React.ReactElement;
|
|
404
407
|
search: (props: ComponentPropWithRef<HTMLInputElement, InputFieldProps>) => React.ReactElement;
|
|
405
|
-
phoneNumber: (props: ComponentPropWithRef<HTMLInputElement, OmitProps<InputFieldProps, "type">>) => React.ReactElement;
|
|
408
|
+
phoneNumber: (props: ComponentPropWithRef<HTMLInputElement, OmitProps<InputFieldProps, "type" | "prefix">>) => React.ReactElement;
|
|
406
409
|
date: (props: ComponentPropWithRef<HTMLInputElement, InputFieldProps & {
|
|
407
410
|
minDate?: Date;
|
|
408
411
|
maxDate?: Date;
|
|
@@ -996,4 +999,4 @@ type AlertsPluginOptions = {
|
|
|
996
999
|
declare const defaultAlertsPluginOptions: Required<AlertsPluginOptions>;
|
|
997
1000
|
declare const alertsPlugin: BetterHtmlPluginConstructor<AlertsPluginOptions>;
|
|
998
1001
|
|
|
999
|
-
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type Styles, type TabGroup, Table, type TableColumn, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, desaturateColor, formatPhoneNumber, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, reactRouterDomPlugin, saturateColor, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
|
1002
|
+
export { type Alert, type AlertType, type AlertsPluginOptions, type AppConfig, type AssetName, type AssetsConfig, type BetterHtmlConfig, type BetterHtmlPlugin, _default as BetterHtmlProvider, type BetterHtmlProviderValue, type BrowserName, Button, type ButtonProps, Chip, type ChipProps, type Color, type ColorName, type ColorTheme, ColorThemeSwitch, type ColorThemeSwitchProps, type Colors, type ComponentHoverStyle, type ComponentMarginProps, type ComponentPaddingProps, type DeepPartialRecord, Div, type DivProps, _default$3 as Divider, Dropdown, type DropdownOption, type DropdownProps, type ExcludeOptions, Foldable, type FoldableProps, type FoldableRef, Form, type FormProps, FormRow, type FormRowProps, type HorizontalDividerProps, _default$5 as Icon, type IconName, type IconProps, type IconsConfig, _default$4 as Image, type ImageProps, InputField, type InputFieldProps, _default$1 as Label, type LabelProps, Loader, type LoaderConfig, type LoaderName, type LoaderProps, Modal, type ModalProps, type ModalRef, type OmitProps, PageHeader, type PageHeaderProps, PageHolder, type PageHolderProps, type PartialRecord, type PickAllRequired, type PickValue, type PluginName, type Styles, type TabGroup, Table, type TableColumn, type TableProps, type TableRef, Tabs, type TabsProps, type TabsRef, Text, type TextAs, type TextProps, type TextareaFieldProps, type Theme, type ThemeConfig, _default$2 as ToggleInput, type ToggleInputProps, type ToggleInputRef, Tooltip, type TooltipProps, type TooltipRef, type VerticalDividerProps, alertControls, alertsPlugin, colorThemeControls, countries, darkenColor, defaultAlertsPluginOptions, desaturateColor, formatPhoneNumber, generateRandomString, getBrowser, getFormErrorObject, isMobileDevice, lightenColor, loaderControls, reactRouterDomPlugin, saturateColor, useAlertControls, useBetterHtmlContext, useBooleanState, useDebounceState, useForm, useLoader, useLoaderControls, useMediaQuery, usePageResize, usePageScroll, useTheme, useUrlQuery };
|
package/dist/index.js
CHANGED
|
@@ -3170,6 +3170,7 @@ var DivComponent = (0, import_react11.forwardRef)(function Div({
|
|
|
3170
3170
|
as = "div",
|
|
3171
3171
|
value,
|
|
3172
3172
|
isTabAccessed,
|
|
3173
|
+
htmlContentTranslate,
|
|
3173
3174
|
onClickWithValue,
|
|
3174
3175
|
role,
|
|
3175
3176
|
onClick,
|
|
@@ -3205,6 +3206,7 @@ var DivComponent = (0, import_react11.forwardRef)(function Div({
|
|
|
3205
3206
|
{
|
|
3206
3207
|
as,
|
|
3207
3208
|
tabIndex: isTabAccessed && !isMobileDevice ? 0 : void 0,
|
|
3209
|
+
translate: htmlContentTranslate,
|
|
3208
3210
|
role: role ?? (onClick ? "button" : void 0),
|
|
3209
3211
|
onClick: onClickElement,
|
|
3210
3212
|
onKeyDown: onKeyDownElement,
|
|
@@ -6030,7 +6032,9 @@ var colorPickerSpacing = 4;
|
|
|
6030
6032
|
var colorPickerColorWidth = 12 + 27 + colorPickerSpacing;
|
|
6031
6033
|
var colorPickerValueWidth = 12 + 74 + colorPickerSpacing;
|
|
6032
6034
|
var InputElement = import_styled_components11.default.input.withConfig({
|
|
6033
|
-
shouldForwardProp: (prop) => !["theme", "withLeftIcon", "withRightIcon", "normalStyle", "hoverStyle"].includes(
|
|
6035
|
+
shouldForwardProp: (prop) => !["theme", "withLeftIcon", "withRightIcon", "withPrefix", "withSuffix", "normalStyle", "hoverStyle"].includes(
|
|
6036
|
+
prop
|
|
6037
|
+
)
|
|
6034
6038
|
})`
|
|
6035
6039
|
position: relative;
|
|
6036
6040
|
width: 100%;
|
|
@@ -6041,10 +6045,14 @@ var InputElement = import_styled_components11.default.input.withConfig({
|
|
|
6041
6045
|
background: ${(props) => props.theme.colors.backgroundContent};
|
|
6042
6046
|
border: 1px solid ${(props) => props.theme.colors.border};
|
|
6043
6047
|
border-radius: ${(props) => props.theme.styles.borderRadius}px;
|
|
6048
|
+
border-top-left-radius: ${(props) => props.withPrefix ? 0 : void 0};
|
|
6049
|
+
border-bottom-left-radius: ${(props) => props.withPrefix ? 0 : void 0};
|
|
6050
|
+
border-top-right-radius: ${(props) => props.withSuffix ? 0 : void 0};
|
|
6051
|
+
border-bottom-right-radius: ${(props) => props.withSuffix ? 0 : void 0};
|
|
6044
6052
|
outline: none;
|
|
6045
|
-
padding: ${(props) => `${(props.theme.styles.space + props.theme.styles.gap) / 2}px ${props.theme.styles.space
|
|
6046
|
-
padding-left: ${(props) => props.withLeftIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : void 0};
|
|
6047
|
-
padding-right: ${(props) => props.withRightIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : void 0};
|
|
6053
|
+
padding: ${(props) => `${(props.theme.styles.space + props.theme.styles.gap) / 2}px ${props.theme.styles.space}px`};
|
|
6054
|
+
padding-left: ${(props) => props.withLeftIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : props.withPrefix ? `${props.theme.styles.space}px` : void 0};
|
|
6055
|
+
padding-right: ${(props) => props.withRightIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : props.withSuffix ? `${props.theme.styles.space}px` : void 0};
|
|
6048
6056
|
transition: ${(props) => props.theme.styles.transition};
|
|
6049
6057
|
|
|
6050
6058
|
&::placeholder {
|
|
@@ -6151,7 +6159,7 @@ var TextareaElement = import_styled_components11.default.textarea.withConfig({
|
|
|
6151
6159
|
border: 1px solid ${(props) => props.theme.colors.border};
|
|
6152
6160
|
border-radius: ${(props) => props.theme.styles.borderRadius}px;
|
|
6153
6161
|
outline: none;
|
|
6154
|
-
padding: ${(props) => `${(props.theme.styles.gap + props.theme.styles.space) / 2}px ${props.theme.styles.space
|
|
6162
|
+
padding: ${(props) => `${(props.theme.styles.gap + props.theme.styles.space) / 2}px ${props.theme.styles.space}px`};
|
|
6155
6163
|
padding-left: ${(props) => props.withLeftIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : void 0};
|
|
6156
6164
|
padding-right: ${(props) => props.withRightIcon ? `${props.theme.styles.space + 16 + props.theme.styles.space - 1}px` : void 0};
|
|
6157
6165
|
resize: vertical;
|
|
@@ -6180,6 +6188,8 @@ var InputFieldComponent = (0, import_react20.forwardRef)(function InputField({
|
|
|
6180
6188
|
infoText,
|
|
6181
6189
|
leftIcon,
|
|
6182
6190
|
rightIcon,
|
|
6191
|
+
prefix,
|
|
6192
|
+
suffix,
|
|
6183
6193
|
insideInputFieldComponent,
|
|
6184
6194
|
withDebounce,
|
|
6185
6195
|
debounceDelay = 0.5,
|
|
@@ -6229,58 +6239,90 @@ var InputFieldComponent = (0, import_react20.forwardRef)(function InputField({
|
|
|
6229
6239
|
const readyId = id ?? internalId;
|
|
6230
6240
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, ...styledComponentStylesWithExcluded, children: [
|
|
6231
6241
|
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
|
|
6232
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Div_default, {
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
{
|
|
6236
|
-
name: leftIcon,
|
|
6237
|
-
position: "absolute",
|
|
6238
|
-
top: (props.type === "date" || props.type === "time" || props.type === "datetime-local" ? 48 : 46) / 2,
|
|
6239
|
-
left: theme2.styles.space + 1,
|
|
6240
|
-
transform: "translateY(-50%)",
|
|
6241
|
-
pointerEvents: "none",
|
|
6242
|
-
zIndex: leftIconZIndex
|
|
6243
|
-
}
|
|
6244
|
-
),
|
|
6245
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6246
|
-
InputElement,
|
|
6242
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Div_default.row, { alignItems: "stretch", width: "100%", children: [
|
|
6243
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6244
|
+
Div_default.row,
|
|
6247
6245
|
{
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
...ariaProps,
|
|
6258
|
-
...restProps,
|
|
6259
|
-
ref
|
|
6246
|
+
alignItems: "center",
|
|
6247
|
+
justifyContent: "center",
|
|
6248
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
6249
|
+
borderRight: "none",
|
|
6250
|
+
backgroundColor: lightenColor(theme2.colors.border, 0.8),
|
|
6251
|
+
borderTopLeftRadius: theme2.styles.borderRadius,
|
|
6252
|
+
borderBottomLeftRadius: theme2.styles.borderRadius,
|
|
6253
|
+
paddingInline: theme2.styles.space,
|
|
6254
|
+
children: prefix
|
|
6260
6255
|
}
|
|
6261
6256
|
),
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6257
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Div_default, { position: "relative", width: "100%", height: "fit-content", ref: holderRef, children: [
|
|
6258
|
+
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6259
|
+
Icon_default,
|
|
6260
|
+
{
|
|
6261
|
+
name: leftIcon,
|
|
6262
|
+
position: "absolute",
|
|
6263
|
+
top: (props.type === "date" || props.type === "time" || props.type === "datetime-local" ? 48 : 46) / 2,
|
|
6264
|
+
left: theme2.styles.space + 1,
|
|
6265
|
+
transform: "translateY(-50%)",
|
|
6266
|
+
pointerEvents: "none",
|
|
6267
|
+
zIndex: leftIconZIndex
|
|
6268
|
+
}
|
|
6269
|
+
),
|
|
6270
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6271
|
+
InputElement,
|
|
6272
|
+
{
|
|
6273
|
+
theme: theme2,
|
|
6274
|
+
withLeftIcon: leftIcon !== void 0,
|
|
6275
|
+
withRightIcon: rightIcon !== void 0,
|
|
6276
|
+
withPrefix: prefix !== void 0,
|
|
6277
|
+
withSuffix: suffix !== void 0,
|
|
6278
|
+
required,
|
|
6279
|
+
placeholder: placeholder ?? label,
|
|
6280
|
+
id: readyId,
|
|
6281
|
+
onChange: onChangeElement,
|
|
6282
|
+
...styledComponentStylesWithoutExcluded,
|
|
6283
|
+
...dataProps,
|
|
6284
|
+
...ariaProps,
|
|
6285
|
+
...restProps,
|
|
6286
|
+
ref
|
|
6287
|
+
}
|
|
6288
|
+
),
|
|
6289
|
+
rightIcon ? onClickRightIcon ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6290
|
+
Button_default.icon,
|
|
6291
|
+
{
|
|
6292
|
+
icon: rightIcon,
|
|
6293
|
+
position: "absolute",
|
|
6294
|
+
top: 46 / 2,
|
|
6295
|
+
right: theme2.styles.space + 1 - theme2.styles.space / 2,
|
|
6296
|
+
transform: "translateY(-50%)",
|
|
6297
|
+
onClick: onClickRightIcon
|
|
6298
|
+
}
|
|
6299
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6300
|
+
Icon_default,
|
|
6301
|
+
{
|
|
6302
|
+
name: rightIcon,
|
|
6303
|
+
position: "absolute",
|
|
6304
|
+
top: 46 / 2,
|
|
6305
|
+
right: theme2.styles.space + 1,
|
|
6306
|
+
transform: "translateY(-50%)",
|
|
6307
|
+
pointerEvents: "none"
|
|
6308
|
+
}
|
|
6309
|
+
) : void 0,
|
|
6310
|
+
insideInputFieldComponent
|
|
6311
|
+
] }),
|
|
6312
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6313
|
+
Div_default.row,
|
|
6274
6314
|
{
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6315
|
+
alignItems: "center",
|
|
6316
|
+
justifyContent: "center",
|
|
6317
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
6318
|
+
borderLeft: "none",
|
|
6319
|
+
backgroundColor: lightenColor(theme2.colors.border, 0.8),
|
|
6320
|
+
borderTopRightRadius: theme2.styles.borderRadius,
|
|
6321
|
+
borderBottomRightRadius: theme2.styles.borderRadius,
|
|
6322
|
+
paddingInline: theme2.styles.space,
|
|
6323
|
+
children: suffix
|
|
6281
6324
|
}
|
|
6282
|
-
)
|
|
6283
|
-
insideInputFieldComponent
|
|
6325
|
+
)
|
|
6284
6326
|
] }),
|
|
6285
6327
|
(errorText || infoText) && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6286
6328
|
Text_default,
|