@jenesei-software/jenesei-kit-react 1.2.2 → 1.2.4
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/build/{area-C2sWYH-e.js → area-BC64nSGj.js} +2 -2
- package/build/{area-C2sWYH-e.js.map → area-BC64nSGj.js.map} +1 -1
- package/build/{area-CD10k19W.cjs → area-C6QOr2Kd.cjs} +7 -7
- package/build/{area-CD10k19W.cjs.map → area-C6QOr2Kd.cjs.map} +1 -1
- package/build/area-scroll.cjs.js +1 -1
- package/build/area-scroll.es.js +1 -1
- package/build/build-info.txt +3 -3
- package/build/{component-CbPhVNw5.js → component-BJ4BlUBV.js} +2 -2
- package/build/{component-CbPhVNw5.js.map → component-BJ4BlUBV.js.map} +1 -1
- package/build/{component-BnYw0FvH.cjs → component-BfsH0boq.cjs} +2 -2
- package/build/{component-BnYw0FvH.cjs.map → component-BfsH0boq.cjs.map} +1 -1
- package/build/{component-9m1Ib3fS.js → component-BtA2Qlbp.js} +2 -2
- package/build/{component-9m1Ib3fS.js.map → component-BtA2Qlbp.js.map} +1 -1
- package/build/{component-C8QrHu0C.js → component-CTz8wF0z.js} +3 -3
- package/build/{component-C8QrHu0C.js.map → component-CTz8wF0z.js.map} +1 -1
- package/build/{component-FwG2ieR3.cjs → component-CV14RCdO.cjs} +2 -2
- package/build/{component-FwG2ieR3.cjs.map → component-CV14RCdO.cjs.map} +1 -1
- package/build/{component-C0atFCun.cjs → component-DBxYbAnr.cjs} +2 -2
- package/build/{component-C0atFCun.cjs.map → component-DBxYbAnr.cjs.map} +1 -1
- package/build/{component-DURhph1i.js → component-DTH1-Npa.js} +3 -3
- package/build/{component-DURhph1i.js.map → component-DTH1-Npa.js.map} +1 -1
- package/build/{component-X4e7zEKk.cjs → component-Dw21Chky.cjs} +2 -2
- package/build/{component-X4e7zEKk.cjs.map → component-Dw21Chky.cjs.map} +1 -1
- package/build/{component-Bovatz78.cjs → component-ODhIlUPq.cjs} +2 -2
- package/build/{component-Bovatz78.cjs.map → component-ODhIlUPq.cjs.map} +1 -1
- package/build/component-button-group.cjs.js +1 -1
- package/build/component-button-group.es.js +1 -1
- package/build/component-button.cjs.js +1 -1
- package/build/component-button.es.js +1 -1
- package/build/component-checkbox-group.cjs.js +1 -1
- package/build/component-checkbox-group.es.js +1 -1
- package/build/component-checkbox.cjs.js +1 -1
- package/build/component-checkbox.es.js +1 -1
- package/build/component-date-picker.cjs.js +1 -1
- package/build/component-date-picker.d.ts +74 -65
- package/build/component-date-picker.es.js +9 -10
- package/build/component-image-button.cjs.js +1 -1
- package/build/component-image-button.es.js +1 -1
- package/build/component-image-select.cjs.js +1 -1
- package/build/component-image-select.es.js +1 -1
- package/build/component-image-slider.cjs.js +1 -1
- package/build/component-image-slider.es.js +1 -1
- package/build/component-input-otp.cjs.js +1 -1
- package/build/component-input-otp.es.js +1 -1
- package/build/component-input.cjs.js +1 -1
- package/build/component-input.d.ts +3 -3
- package/build/component-input.es.js +3 -3
- package/build/component-map.cjs.js +1 -1
- package/build/component-map.es.js +1 -1
- package/build/component-pagination.cjs.js +1 -1
- package/build/component-pagination.es.js +1 -1
- package/build/component-range.cjs.js +1 -1
- package/build/component-range.es.js +1 -1
- package/build/component-select.cjs.js +1 -1
- package/build/component-select.d.ts +6 -6
- package/build/component-select.es.js +1 -1
- package/build/component-textarea.cjs.js +1 -1
- package/build/component-textarea.es.js +1 -1
- package/build/component-toggle.cjs.js +1 -1
- package/build/component-toggle.es.js +1 -1
- package/build/component-tooltip.cjs.js +1 -1
- package/build/component-tooltip.d.ts +1 -0
- package/build/component-tooltip.es.js +1 -1
- package/build/component-typography.cjs.js +1 -1
- package/build/component-typography.d.ts +1 -0
- package/build/component-typography.es.js +1 -1
- package/build/{component--cOriuv7.js → component-zhkRBgS8.js} +45 -3
- package/build/{component--cOriuv7.js.map → component-zhkRBgS8.js.map} +1 -1
- package/build/{component.components-1kRDD3KO.cjs → component.components-9ON8OLUd.cjs} +2 -2
- package/build/{component.components-1kRDD3KO.cjs.map → component.components-9ON8OLUd.cjs.map} +1 -1
- package/build/{component.components-CQ3LLnFl.js → component.components-CnwUBa8n.js} +2 -2
- package/build/{component.components-CQ3LLnFl.js.map → component.components-CnwUBa8n.js.map} +1 -1
- package/build/{component.constants-B1rq1PLe.js → component.constants-Ck-Y1EPF.js} +2 -2
- package/build/{component.constants-B1rq1PLe.js.map → component.constants-Ck-Y1EPF.js.map} +1 -1
- package/build/{component.constants-BLHg7rcI.cjs → component.constants-DD964QJh.cjs} +2 -2
- package/build/{component.constants-BLHg7rcI.cjs.map → component.constants-DD964QJh.cjs.map} +1 -1
- package/build/{component.constants-Gz2mf7IF.cjs → component.constants-DGS-J9Sc.cjs} +2 -2
- package/build/{component.constants-Gz2mf7IF.cjs.map → component.constants-DGS-J9Sc.cjs.map} +1 -1
- package/build/{component.constants-B95xyW0s.js → component.constants-c0DK2OSH.js} +3 -3
- package/build/{component.constants-B95xyW0s.js.map → component.constants-c0DK2OSH.js.map} +1 -1
- package/build/{component.styles-q4ne6jV1.cjs → component.styles-B4reSccT.cjs} +2 -2
- package/build/{component.styles-q4ne6jV1.cjs.map → component.styles-B4reSccT.cjs.map} +1 -1
- package/build/{component.styles-BrGPrrEb.cjs → component.styles-BScmaCvt.cjs} +2 -2
- package/build/{component.styles-BrGPrrEb.cjs.map → component.styles-BScmaCvt.cjs.map} +1 -1
- package/build/{component.styles-Dm_Ov4nM.cjs → component.styles-C5GdZJou.cjs} +24 -24
- package/build/{component.styles-Dm_Ov4nM.cjs.map → component.styles-C5GdZJou.cjs.map} +1 -1
- package/build/{component.styles-BzNkEurr.js → component.styles-CFrk_dpy.js} +5 -5
- package/build/{component.styles-BzNkEurr.js.map → component.styles-CFrk_dpy.js.map} +1 -1
- package/build/{component.styles-CvJK1eif.cjs → component.styles-CGyQHdKu.cjs} +8 -13
- package/build/component.styles-CGyQHdKu.cjs.map +1 -0
- package/build/{component.styles-DqNAGfc9.cjs → component.styles-CzsKP7v-.cjs} +2 -2
- package/build/{component.styles-DqNAGfc9.cjs.map → component.styles-CzsKP7v-.cjs.map} +1 -1
- package/build/{component.styles-vcNQJK0U.cjs → component.styles-D8ZAo-kS.cjs} +2 -2
- package/build/{component.styles-vcNQJK0U.cjs.map → component.styles-D8ZAo-kS.cjs.map} +1 -1
- package/build/{component.styles-DjLSmx3e.cjs → component.styles-DLbbGi9i.cjs} +2 -2
- package/build/{component.styles-DjLSmx3e.cjs.map → component.styles-DLbbGi9i.cjs.map} +1 -1
- package/build/{component.styles-DKG-fvog.js → component.styles-DS53SD15.js} +4 -4
- package/build/{component.styles-DKG-fvog.js.map → component.styles-DS53SD15.js.map} +1 -1
- package/build/{component.styles-DMBvhmz6.js → component.styles-DjJOwUeA.js} +3 -3
- package/build/{component.styles-DMBvhmz6.js.map → component.styles-DjJOwUeA.js.map} +1 -1
- package/build/{component.styles-DqTkSP8L.js → component.styles-DsnwGPvj.js} +16 -21
- package/build/component.styles-DsnwGPvj.js.map +1 -0
- package/build/{component.styles-DhI3n-dL.js → component.styles-DxQx6LQO.js} +3 -3
- package/build/{component.styles-DhI3n-dL.js.map → component.styles-DxQx6LQO.js.map} +1 -1
- package/build/{component.styles-CccZrbSA.js → component.styles-N7ZFXn4z.js} +2 -2
- package/build/{component.styles-CccZrbSA.js.map → component.styles-N7ZFXn4z.js.map} +1 -1
- package/build/{component.styles-DuIrUV9k.js → component.styles-UIEZecbT.js} +2 -2
- package/build/{component.styles-DuIrUV9k.js.map → component.styles-UIEZecbT.js.map} +1 -1
- package/build/{component.styles-CRWn1pVi.js → component.styles-WqYNZfbs.js} +3 -3
- package/build/{component.styles-CRWn1pVi.js.map → component.styles-WqYNZfbs.js.map} +1 -1
- package/build/{component.styles-Dt_CUijB.js → component.styles-hc14mwUo.js} +6 -7
- package/build/{component.styles-Dt_CUijB.js.map → component.styles-hc14mwUo.js.map} +1 -1
- package/build/{component.styles-DwdN7mQq.cjs → component.styles-qRQ8i8W6.cjs} +2 -2
- package/build/{component.styles-DwdN7mQq.cjs.map → component.styles-qRQ8i8W6.cjs.map} +1 -1
- package/build/{component.styles-Bz2vyHqK.cjs → component.styles-sTbPcfTb.cjs} +2 -2
- package/build/{component.styles-Bz2vyHqK.cjs.map → component.styles-sTbPcfTb.cjs.map} +1 -1
- package/build/component.types-A04vFOxU.cjs +164 -0
- package/build/component.types-A04vFOxU.cjs.map +1 -0
- package/build/component.types-CqvwcIsz.js +843 -0
- package/build/component.types-CqvwcIsz.js.map +1 -0
- package/build/context-app.cjs.js +1 -1
- package/build/context-app.d.ts +2 -2
- package/build/context-app.es.js +1 -1
- package/build/context-sonner.cjs.js +1 -1
- package/build/context-sonner.es.js +1 -1
- package/build/{context.constants-BAz35AJw.js → context.constants-B9I-yc9Q.js} +3 -3
- package/build/{context.constants-BAz35AJw.js.map → context.constants-B9I-yc9Q.js.map} +1 -1
- package/build/{context.constants-fwK8ogSf.cjs → context.constants-DkMk-pc7.cjs} +2 -2
- package/build/{context.constants-fwK8ogSf.cjs.map → context.constants-DkMk-pc7.cjs.map} +1 -1
- package/build/{context.hooks-Bs1dD25S.js → context.hooks-BFZtc7kP.js} +12 -12
- package/build/context.hooks-BFZtc7kP.js.map +1 -0
- package/build/{context.hooks-KAyS_7Pj.cjs → context.hooks-BfETPRDy.cjs} +23 -23
- package/build/context.hooks-BfETPRDy.cjs.map +1 -0
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +85 -63
- package/build/index.es.js +34 -35
- package/build/{style-DjCgiI7l.js → style-Dca2udON.js} +2 -2
- package/build/{style-DjCgiI7l.js.map → style-Dca2udON.js.map} +1 -1
- package/build/{style-eIuUYu9x.cjs → style-DmwoOdFB.cjs} +2 -2
- package/build/{style-eIuUYu9x.cjs.map → style-DmwoOdFB.cjs.map} +1 -1
- package/build/style-error.cjs.js +1 -1
- package/build/style-error.es.js +1 -1
- package/build/{use-BnaBipTR.cjs → use-Deto6eH3.cjs} +2 -2
- package/build/{use-BnaBipTR.cjs.map → use-Deto6eH3.cjs.map} +1 -1
- package/build/{use-B6rT81uF.js → use-JiiFbVer.js} +3 -3
- package/build/{use-B6rT81uF.js.map → use-JiiFbVer.js.map} +1 -1
- package/package.json +1 -1
- package/build/component.styles-CvJK1eif.cjs.map +0 -1
- package/build/component.styles-DCDOKa6e.js +0 -793
- package/build/component.styles-DCDOKa6e.js.map +0 -1
- package/build/component.styles-DTC9tjQX.cjs +0 -165
- package/build/component.styles-DTC9tjQX.cjs.map +0 -1
- package/build/component.styles-DqTkSP8L.js.map +0 -1
- package/build/context.hooks-Bs1dD25S.js.map +0 -1
- package/build/context.hooks-KAyS_7Pj.cjs.map +0 -1
package/build/index.d.ts
CHANGED
|
@@ -150,6 +150,21 @@ $isShowAlwaysOutline?: boolean;
|
|
|
150
150
|
|
|
151
151
|
export declare const addColorTransition: RuleSet<object>;
|
|
152
152
|
|
|
153
|
+
export declare const addDateDropdownDaySize: RuleSet<AddDollarSign_2<Pick<DatePickerProps_2, "size" | "genre"> & Pick<DateDayProps_2, "isToday" | "isWeekend"> & {
|
|
154
|
+
row: number;
|
|
155
|
+
column: number;
|
|
156
|
+
isChoice?: boolean;
|
|
157
|
+
isCurrentMonth?: boolean;
|
|
158
|
+
isDisabled?: boolean;
|
|
159
|
+
}>>;
|
|
160
|
+
|
|
161
|
+
/****************************************** Size *************************************************/
|
|
162
|
+
export declare const addDateInputWrapperSize: RuleSet<AddDollarSign_2<Pick<DatePickerProps_2, "size" | "error" | "genre" | "isBold"> & {
|
|
163
|
+
isOpen?: boolean;
|
|
164
|
+
isActive?: boolean;
|
|
165
|
+
isHaveValue?: boolean;
|
|
166
|
+
}>>;
|
|
167
|
+
|
|
153
168
|
export declare const addDisabled: RuleSet< {
|
|
154
169
|
$isDisabled?: boolean;
|
|
155
170
|
}>;
|
|
@@ -168,6 +183,9 @@ export declare type addErrorStylesProps = AddDollarSign<addErrorProps>;
|
|
|
168
183
|
|
|
169
184
|
export declare const addGridTransition: RuleSet<object>;
|
|
170
185
|
|
|
186
|
+
/****************************************** is isInputEffect *************************************************/
|
|
187
|
+
export declare const addInputIsInputEffect: RuleSet<Pick<AddDollarSign_2<Pick<InputProps_2, "size" | "sx" | "isDisabled" | "error" | "genre" | "isLoading" | "isCenter" | "isNotShowHoverStyle" | "isBold" | "isInputEffect" | "postfixChildren" | "prefixChildren" | "isNiceNumber">>, "$isInputEffect">>;
|
|
188
|
+
|
|
171
189
|
/****************************************** Placeholder *************************************************/
|
|
172
190
|
export declare const addInputPlaceholder: RuleSet<AddDollarSign_2<Pick<InputProps_2, "size" | "sx" | "isDisabled" | "error" | "genre" | "isLoading" | "isCenter" | "isNotShowHoverStyle" | "isBold" | "isInputEffect" | "postfixChildren" | "prefixChildren" | "isNiceNumber">>>;
|
|
173
191
|
|
|
@@ -248,7 +266,7 @@ declare type AutoHeightTextAreaProps = BaseTextAreaProps & {
|
|
|
248
266
|
|
|
249
267
|
declare type BaseInputProps = CommonInputProps & (ControlledValue | UncontrolledValue);
|
|
250
268
|
|
|
251
|
-
declare type BaseTextAreaProps = CommonTextAreaProps & (
|
|
269
|
+
declare type BaseTextAreaProps = CommonTextAreaProps & (ControlledValue_3 | UncontrolledValue_3);
|
|
252
270
|
|
|
253
271
|
export declare function BlurIn({ children }: {
|
|
254
272
|
children: ReactNode;
|
|
@@ -396,6 +414,32 @@ export declare const CheckboxSizeConstructor: (props: IThemeSizePropertyDefault
|
|
|
396
414
|
/****************************************** Default *************************************************/
|
|
397
415
|
export declare const CheckboxWrapper: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, StyledCheckboxProps>> & string;
|
|
398
416
|
|
|
417
|
+
export declare type CommonDatePickerProps = addErrorProps & addSXProps & {
|
|
418
|
+
genre: TDateGenre;
|
|
419
|
+
id?: string;
|
|
420
|
+
isDisabled?: boolean;
|
|
421
|
+
isBold?: boolean;
|
|
422
|
+
isMinWidth?: boolean;
|
|
423
|
+
isInputEffect?: InputStandardProps['isInputEffect'];
|
|
424
|
+
isOnClickClose?: boolean;
|
|
425
|
+
labelPlaceholder?: string;
|
|
426
|
+
locale: {
|
|
427
|
+
months: SelectMonthProps['monthsLocale'];
|
|
428
|
+
weeks: WeekItem[];
|
|
429
|
+
inputs: InputItem;
|
|
430
|
+
};
|
|
431
|
+
notValidDate?: Omit<ErrorMessageProps, 'size' | 'isError'>;
|
|
432
|
+
mode?: DatePickerMode;
|
|
433
|
+
name?: string;
|
|
434
|
+
onBlur?: () => void;
|
|
435
|
+
onChange: (timestamp: number | null) => void;
|
|
436
|
+
onFocus?: () => void;
|
|
437
|
+
size: IThemeSize;
|
|
438
|
+
dateMax?: number;
|
|
439
|
+
dateMin?: number;
|
|
440
|
+
dateDefault: number;
|
|
441
|
+
};
|
|
442
|
+
|
|
399
443
|
declare type CommonInputProps = addErrorProps & addSXProps & {
|
|
400
444
|
ref?: Ref<HTMLInputElement | null>;
|
|
401
445
|
name?: string;
|
|
@@ -480,6 +524,11 @@ declare type ControlledValue = {
|
|
|
480
524
|
};
|
|
481
525
|
|
|
482
526
|
declare type ControlledValue_2 = {
|
|
527
|
+
value: number | null | undefined;
|
|
528
|
+
defaultValue?: never;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
declare type ControlledValue_3 = {
|
|
483
532
|
value: string | null | undefined;
|
|
484
533
|
defaultValue?: never;
|
|
485
534
|
};
|
|
@@ -525,6 +574,7 @@ row: number;
|
|
|
525
574
|
column: number;
|
|
526
575
|
isChoice?: boolean;
|
|
527
576
|
isCurrentMonth?: boolean;
|
|
577
|
+
isDisabled?: boolean;
|
|
528
578
|
}>>> & string;
|
|
529
579
|
|
|
530
580
|
export declare const DateDropdownDayOfWeek: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, AddDollarSign_2<Pick<DatePickerProps_2, "size" | "genre"> & Pick<DateDayProps_2, "isToday" | "isWeekend"> & {
|
|
@@ -532,6 +582,7 @@ row: number;
|
|
|
532
582
|
column: number;
|
|
533
583
|
isChoice?: boolean;
|
|
534
584
|
isCurrentMonth?: boolean;
|
|
585
|
+
isDisabled?: boolean;
|
|
535
586
|
}>>> & string;
|
|
536
587
|
|
|
537
588
|
export declare type DateDropdownDayProps = AddDollarSign<Pick<DatePickerProps, 'genre' | 'size'> & Pick<DateDayProps, 'isToday' | 'isWeekend'> & {
|
|
@@ -539,80 +590,48 @@ export declare type DateDropdownDayProps = AddDollarSign<Pick<DatePickerProps, '
|
|
|
539
590
|
column: number;
|
|
540
591
|
isChoice?: boolean;
|
|
541
592
|
isCurrentMonth?: boolean;
|
|
593
|
+
isDisabled?: boolean;
|
|
542
594
|
}>;
|
|
543
595
|
|
|
544
596
|
export declare const DateDropdownDays: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
545
597
|
$rows: number;
|
|
546
598
|
}>> & string;
|
|
547
599
|
|
|
548
|
-
export declare const DateDropdownDaySize: RuleSet<AddDollarSign_2<Pick<DatePickerProps_2, "size" | "genre"> & Pick<DateDayProps_2, "isToday" | "isWeekend"> & {
|
|
549
|
-
row: number;
|
|
550
|
-
column: number;
|
|
551
|
-
isChoice?: boolean;
|
|
552
|
-
isCurrentMonth?: boolean;
|
|
553
|
-
}>>;
|
|
554
|
-
|
|
555
|
-
export declare const DateDropdownDaySizeConstructor: (props: IThemeSizePropertyDefault) => RuleSet<object>;
|
|
556
|
-
|
|
557
600
|
export declare const DateDropdownList: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, AddDollarSign_2<Pick<DatePickerProps_2, "isInputEffect"> & Pick<DatePickerProps_2, "size" | "genre">>>> & string;
|
|
558
601
|
|
|
559
602
|
export declare const DateDropdownListParent: IStyledComponentBase<"web", Substitute<Omit<HTMLMotionProps<"div">, "ref"> & RefAttributes<HTMLDivElement>, AddDollarSign_2<Pick<InputStandardProps_2, "size" | "genre">>>> & string & Omit<ForwardRefComponent<HTMLDivElement, HTMLMotionProps<"div">>, keyof Component<any, {}, any>>;
|
|
560
603
|
|
|
561
604
|
export declare type DateDropdownListProps = AddDollarSign<Pick<DatePickerProps, 'isInputEffect'> & Pick<DatePickerProps, 'genre' | 'size'>>;
|
|
562
605
|
|
|
563
|
-
export declare const DateInput: IStyledComponentBase<"web", Substitute<
|
|
564
|
-
format: string;
|
|
565
|
-
mask?: string | string[];
|
|
566
|
-
allowEmptyFormatting?: boolean;
|
|
567
|
-
patternChar?: string;
|
|
568
|
-
} & Omit<InputAttributes, never> & Omit<unknown, "mask" | "value" | "ref" | "defaultValue" | "inputMode" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onMouseUp" | "type" | "format" | "displayType" | "renderText" | "getInputRef" | "valueIsNumericString" | "onValueChange" | "isAllowed" | "allowEmptyFormatting" | "patternChar"> & {
|
|
569
|
-
customInput?: ComponentType<unknown> | undefined;
|
|
570
|
-
}, AddDollarSign_2<Pick<DatePickerProps_2, "size" | "error" | "genre"> & {
|
|
606
|
+
export declare const DateInput: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, AddDollarSign_2<Pick<DatePickerProps_2, "size" | "error" | "genre" | "isBold"> & {
|
|
571
607
|
isOpen?: boolean;
|
|
572
|
-
|
|
608
|
+
isActive?: boolean;
|
|
609
|
+
isHaveValue?: boolean;
|
|
610
|
+
}>>> & string;
|
|
573
611
|
|
|
574
|
-
export declare type DateInputProps = AddDollarSign<Pick<DatePickerProps, 'error' | 'genre' | 'size'> & {
|
|
612
|
+
export declare type DateInputProps = AddDollarSign<Pick<DatePickerProps, 'error' | 'genre' | 'size' | 'isBold'> & {
|
|
575
613
|
isOpen?: boolean;
|
|
614
|
+
isActive?: boolean;
|
|
615
|
+
isHaveValue?: boolean;
|
|
576
616
|
}>;
|
|
577
617
|
|
|
578
|
-
export declare const DateInputWrapper: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, AddDollarSign_2<Pick<DatePickerProps_2, "size" | "error" | "genre"> & {
|
|
618
|
+
export declare const DateInputWrapper: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, AddDollarSign_2<Pick<DatePickerProps_2, "size" | "error" | "genre" | "isBold"> & {
|
|
579
619
|
isOpen?: boolean;
|
|
620
|
+
isActive?: boolean;
|
|
621
|
+
isHaveValue?: boolean;
|
|
580
622
|
}>>> & string;
|
|
581
623
|
|
|
582
|
-
/****************************************** Size *************************************************/
|
|
583
|
-
export declare const DateInputWrapperSize: RuleSet<AddDollarSign_2<Pick<DatePickerProps_2, "size" | "error" | "genre"> & {
|
|
584
|
-
isOpen?: boolean;
|
|
585
|
-
}>>;
|
|
586
|
-
|
|
587
|
-
export declare const DateInputWrapperSizeConstructor: (props: IThemeSizePropertyDefault) => RuleSet<object>;
|
|
588
|
-
|
|
589
624
|
export declare const DatePicker: (props: DatePickerProps) => JSX.Element;
|
|
590
625
|
|
|
591
|
-
export declare type DatePickerMode =
|
|
626
|
+
export declare type DatePickerMode = DatePickerVariant[];
|
|
592
627
|
|
|
593
|
-
export declare type DatePickerProps =
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
isOnClickClose?: boolean;
|
|
601
|
-
labelPlaceholder?: string;
|
|
602
|
-
locale: {
|
|
603
|
-
months: SelectMonthProps['monthsLocale'];
|
|
604
|
-
weeks: WeekItem[];
|
|
605
|
-
inputs: InputItem;
|
|
606
|
-
};
|
|
607
|
-
mode?: DatePickerMode;
|
|
608
|
-
name?: string;
|
|
609
|
-
onBlur?: () => void;
|
|
610
|
-
onChange: (timestamp: number | null) => void;
|
|
611
|
-
onFocus?: () => void;
|
|
612
|
-
size: IThemeSize;
|
|
613
|
-
startDate?: number;
|
|
614
|
-
value: number | null;
|
|
615
|
-
};
|
|
628
|
+
export declare type DatePickerProps = CommonDatePickerProps & (ControlledValue_2 | UncontrolledValue_2);
|
|
629
|
+
|
|
630
|
+
export declare enum DatePickerVariant {
|
|
631
|
+
DD = "DD",
|
|
632
|
+
MM = "MM",
|
|
633
|
+
YYYY = "YYYY"
|
|
634
|
+
}
|
|
616
635
|
|
|
617
636
|
export declare type DateStyledListProps = AddDollarSign<Pick<InputStandardProps, 'genre' | 'size'>>;
|
|
618
637
|
|
|
@@ -1128,9 +1147,6 @@ export declare interface InputChildrenProps extends PropsWithChildren {
|
|
|
1128
1147
|
width: string;
|
|
1129
1148
|
}
|
|
1130
1149
|
|
|
1131
|
-
/****************************************** is isInputEffect *************************************************/
|
|
1132
|
-
export declare const InputIsInputEffect: RuleSet<Pick<AddDollarSign_2<Pick<InputProps_2, "size" | "sx" | "isDisabled" | "error" | "genre" | "isLoading" | "isCenter" | "isNotShowHoverStyle" | "isBold" | "isInputEffect" | "postfixChildren" | "prefixChildren" | "isNiceNumber">>, "$isInputEffect">>;
|
|
1133
|
-
|
|
1134
1150
|
export declare type InputItem = {
|
|
1135
1151
|
day: string;
|
|
1136
1152
|
month: string;
|
|
@@ -1688,9 +1704,9 @@ export declare type ProviderAppElementProps = Partial<AddDollarSign<Pick<Provide
|
|
|
1688
1704
|
|
|
1689
1705
|
export declare const ProviderAppOutlet: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Partial<AddDollarSign_2<Pick<ProviderAppProps_2, "footer" | "header" | "nav" | "isScrollOutlet" | "notification" | "leftAside" | "rightAside">>>>> & string;
|
|
1690
1706
|
|
|
1691
|
-
export declare const ProviderAppOutletChildren: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, AddDollarSign_2<Pick<ProviderAppProps_2, "main">>>> & string;
|
|
1707
|
+
export declare const ProviderAppOutletChildren: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, AddDollarSign_2<Pick<ProviderAppProps_2, "main" | "isScrollOutlet">>>> & string;
|
|
1692
1708
|
|
|
1693
|
-
export declare type ProviderAppOutletChildrenProps = AddDollarSign<Pick<ProviderAppProps, 'main'>>;
|
|
1709
|
+
export declare type ProviderAppOutletChildrenProps = AddDollarSign<Pick<ProviderAppProps, 'main' | 'isScrollOutlet'>>;
|
|
1694
1710
|
|
|
1695
1711
|
export declare const ProviderAppOutletFooter: IStyledComponentBase<"web", Substitute<DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>, Partial<AddDollarSign_2<Pick<ProviderAppProps_2, "footer" | "header" | "nav" | "isScrollOutlet" | "notification" | "leftAside" | "rightAside">>>>> & string;
|
|
1696
1712
|
|
|
@@ -1958,8 +1974,8 @@ export declare type SelectMapThemeProps = Omit<SelectProps<ISelectItem>, 'option
|
|
|
1958
1974
|
export declare const SelectMonth: FC<SelectMonthProps>;
|
|
1959
1975
|
|
|
1960
1976
|
export declare type SelectMonthProps = Omit<SelectProps<ISelectItem>, 'option' | 'value' | 'onChange'> & {
|
|
1961
|
-
|
|
1962
|
-
|
|
1977
|
+
dateMin?: number;
|
|
1978
|
+
dateMax?: number;
|
|
1963
1979
|
value: number | null;
|
|
1964
1980
|
isShortLabel?: boolean;
|
|
1965
1981
|
onChange: (value: number | null) => void;
|
|
@@ -1969,8 +1985,8 @@ export declare type SelectMonthProps = Omit<SelectProps<ISelectItem>, 'option' |
|
|
|
1969
1985
|
export declare const SelectMonths: FC<SelectMonthsProps>;
|
|
1970
1986
|
|
|
1971
1987
|
export declare type SelectMonthsProps = Omit<SelectProps<ISelectItem>, 'option' | 'value' | 'onChange'> & {
|
|
1972
|
-
|
|
1973
|
-
|
|
1988
|
+
dateMin?: number;
|
|
1989
|
+
dateMax?: number;
|
|
1974
1990
|
value: number[];
|
|
1975
1991
|
isShortLabel?: boolean;
|
|
1976
1992
|
onChange: (value: number[]) => void;
|
|
@@ -2040,8 +2056,8 @@ export declare type SelectWrapperProps = AddDollarSign<Pick<SelectProps<ISelectI
|
|
|
2040
2056
|
export declare const SelectYear: FC<SelectYearProps>;
|
|
2041
2057
|
|
|
2042
2058
|
export declare type SelectYearProps = Omit<SelectMonthProps, 'monthsLocale'> & {
|
|
2043
|
-
|
|
2044
|
-
|
|
2059
|
+
dateMin?: number;
|
|
2060
|
+
dateMax?: number;
|
|
2045
2061
|
sortOrder?: 'asc' | 'desc';
|
|
2046
2062
|
};
|
|
2047
2063
|
|
|
@@ -2474,6 +2490,11 @@ declare type UncontrolledValue = {
|
|
|
2474
2490
|
};
|
|
2475
2491
|
|
|
2476
2492
|
declare type UncontrolledValue_2 = {
|
|
2493
|
+
defaultValue: number | null | undefined;
|
|
2494
|
+
value?: never;
|
|
2495
|
+
};
|
|
2496
|
+
|
|
2497
|
+
declare type UncontrolledValue_3 = {
|
|
2477
2498
|
value?: never;
|
|
2478
2499
|
defaultValue: string;
|
|
2479
2500
|
};
|
|
@@ -2567,6 +2588,7 @@ declare type UsePopoverProps = {
|
|
|
2567
2588
|
refsExcludeClickOutside?: Ref<HTMLElement | null>[];
|
|
2568
2589
|
onFocus?: () => void;
|
|
2569
2590
|
onBlur?: () => void;
|
|
2591
|
+
onBlurReference?: () => void;
|
|
2570
2592
|
};
|
|
2571
2593
|
|
|
2572
2594
|
export declare const useRemovePreviewLoader: () => void;
|
package/build/index.es.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { O } from "./area-DRqAofd0.js";
|
|
2
2
|
import { u } from "./area.hooks-Bk04M7mk.js";
|
|
3
3
|
import { P } from "./area-EcUYP2tl.js";
|
|
4
|
-
import { a, S } from "./area-
|
|
4
|
+
import { a, S } from "./area-BC64nSGj.js";
|
|
5
5
|
import { a as a2, S as S2 } from "./area-3gVEQsJq.js";
|
|
6
6
|
import { S as S3 } from "./component-BcHiCCC9.js";
|
|
7
7
|
import { A, d, e, b, c, a as a3 } from "./component.styles-uPfiNBIy.js";
|
|
8
|
-
import { c as c2, B, a as a4, b as b2, S as S4 } from "./component-
|
|
9
|
-
import { a as a5, B as B2 } from "./component-
|
|
10
|
-
import { C, c as c3, a as a6, b as b3, d as d2, S as S5 } from "./component.styles-
|
|
11
|
-
import { f, C as C2, d as d3, e as e2, a as a7, b as b4, c as c4 } from "./component.styles-
|
|
12
|
-
import {
|
|
8
|
+
import { c as c2, B, a as a4, b as b2, S as S4 } from "./component-BJ4BlUBV.js";
|
|
9
|
+
import { a as a5, B as B2 } from "./component-BtA2Qlbp.js";
|
|
10
|
+
import { C, c as c3, a as a6, b as b3, d as d2, S as S5 } from "./component.styles-WqYNZfbs.js";
|
|
11
|
+
import { f, C as C2, d as d3, e as e2, a as a7, b as b4, c as c4 } from "./component.styles-DjJOwUeA.js";
|
|
12
|
+
import { f as f2, g, d as d4, c as c5, b as b5, h, j, D, k, a as a8, e as e3, i } from "./component.types-CqvwcIsz.js";
|
|
13
13
|
import { I, S as S6 } from "./component.styles-CiGPOpxk.js";
|
|
14
14
|
import { a as a9, E, b as b6, d as d5, c as c6 } from "./component.types-D05KdxnZ.js";
|
|
15
15
|
import { I as I2, a as a10 } from "./component.styles-BI4OuDrG.js";
|
|
16
|
-
import { I as I3 } from "./component-
|
|
17
|
-
import { I as I4, a as a11, b as b7, f as f3, c as c7, d as d6, e as e4 } from "./component.styles-
|
|
18
|
-
import { b as b8, I as I5, a as a12, S as S7 } from "./component.constants-
|
|
19
|
-
import { I as I6, f as f4 } from "./component-
|
|
20
|
-
import {
|
|
21
|
-
import { I as I8, a as a14, b as b10, c as c9 } from "./component.styles-
|
|
22
|
-
import { C as C3, c as c10, D as D2, a as a15, d as d8, b as b11, M, e as e6, g as g3, f as f6, U, h as h3, j as j3, i as i3 } from "./component.components-
|
|
23
|
-
import { D as D3, P as P2 } from "./component.constants-
|
|
24
|
-
import { R, c as c11, b as b12, a as a16 } from "./component.styles-
|
|
16
|
+
import { I as I3 } from "./component-DTH1-Npa.js";
|
|
17
|
+
import { I as I4, a as a11, b as b7, f as f3, c as c7, d as d6, e as e4 } from "./component.styles-CFrk_dpy.js";
|
|
18
|
+
import { b as b8, I as I5, a as a12, S as S7 } from "./component.constants-c0DK2OSH.js";
|
|
19
|
+
import { I as I6, f as f4 } from "./component-CTz8wF0z.js";
|
|
20
|
+
import { k as k2, j as j2, I as I7, c as c8, f as f5, e as e5, i as i2, h as h2, S as S8, g as g2, d as d7, a as a13, b as b9 } from "./component.styles-hc14mwUo.js";
|
|
21
|
+
import { I as I8, a as a14, b as b10, c as c9 } from "./component.styles-DS53SD15.js";
|
|
22
|
+
import { C as C3, c as c10, D as D2, a as a15, d as d8, b as b11, M, e as e6, g as g3, f as f6, U, h as h3, j as j3, i as i3 } from "./component.components-CnwUBa8n.js";
|
|
23
|
+
import { D as D3, P as P2 } from "./component.constants-Ck-Y1EPF.js";
|
|
24
|
+
import { R, c as c11, b as b12, a as a16 } from "./component.styles-UIEZecbT.js";
|
|
25
25
|
import { D as D4, a as a17, R as R2, b as b13, c as c12, d as d9 } from "./component.styles-B0L4jbOO.js";
|
|
26
26
|
import { R as R3 } from "./component-vpCWcIhC.js";
|
|
27
|
-
import { B as B3, C as C4, a as a18, h as h4, i as i4, j as j4, D as D5, S as S9, b as b14, k as k3, l
|
|
27
|
+
import { B as B3, C as C4, a as a18, h as h4, i as i4, j as j4, D as D5, S as S9, b as b14, k as k3, l, f as f7, c as c13, d as d10, m, g as g4, e as e7 } from "./component.styles-DsnwGPvj.js";
|
|
28
28
|
import { S as S10, a as a19 } from "./component.styles-BnJjm_ES.js";
|
|
29
29
|
import { b as b15, c as c14, S as S11, a as a20 } from "./component-jPZYT5iL.js";
|
|
30
|
-
import { S as S12, T, a as a21, b as b16 } from "./component.styles-
|
|
31
|
-
import { T as T2, b as b17, a as a22 } from "./component.styles-
|
|
32
|
-
import { f as f8, D as D6, i as i5, d as d11, c as c15, T as T3, e as e8, j as j5, k as k4, l as
|
|
30
|
+
import { S as S12, T, a as a21, b as b16 } from "./component.styles-DxQx6LQO.js";
|
|
31
|
+
import { T as T2, b as b17, a as a22 } from "./component.styles-N7ZFXn4z.js";
|
|
32
|
+
import { f as f8, D as D6, i as i5, d as d11, c as c15, T as T3, e as e8, j as j5, k as k4, l as l2, h as h5, a as a23, b as b18, g as g5 } from "./component-zhkRBgS8.js";
|
|
33
33
|
import { ImageSupportedFormats, ImageSupportedFormatsForInput, KeysLanguage, KeysService, ListLanguage, ListService, LoremIpsumText, MapThemeList, ObjectLanguage, ObjectService, localeInput, localeMonths, localeWeeks } from "./consts.es.js";
|
|
34
|
-
import { A as A2, P as P3, e as e9, f as f9, i as i6, h as h6, k as k5, j as j6, g as g6, l as
|
|
34
|
+
import { A as A2, P as P3, e as e9, f as f9, i as i6, h as h6, k as k5, j as j6, g as g6, l as l3, d as d12, m as m2, u as u2, b as b19, c as c16, a as a24 } from "./context.hooks-BFZtc7kP.js";
|
|
35
35
|
import { C as C5, P as P4, g as g7, s, u as u3 } from "./context.functions-BD15C8_y.js";
|
|
36
36
|
import { e as e10, f as f10, k as k6, i as i7, g as g8, h as h7, j as j7, d as d13, D as D7, c as c17, b as b20, P as P5, a as a25, u as u4 } from "./context.constants-COR-ReeN.js";
|
|
37
37
|
import { G, P as P6, u as u5 } from "./context.hooks-BzMTkJNv.js";
|
|
@@ -39,12 +39,12 @@ import { L, P as P7, g as g9, s as s2, u as u6 } from "./context.functions-CQ9Ge
|
|
|
39
39
|
import { u as u7 } from "./context.functions-B8FDl7nJ.js";
|
|
40
40
|
import { P as P8, a as a26, u as u8 } from "./context.hooks-7ydA7mGj.js";
|
|
41
41
|
import { P as P9, S as S13, u as u9 } from "./context.hooks-BmwyZ1p3.js";
|
|
42
|
-
import { m as m3, j as j8, k as k7, l as
|
|
42
|
+
import { m as m3, j as j8, k as k7, l as l4, h as h8, i as i8, D as D8, P as P10, g as g10, c as c18, f as f11, e as e11, S as S14, b as b21, d as d14, a as a27, u as u10 } from "./context.constants-B9I-yc9Q.js";
|
|
43
43
|
import { getContrastYIQ, getScrollbarWidth, transformEnumToOptions, transformObjectToArray, transformObjectValuesToKeys } from "./functions.es.js";
|
|
44
44
|
import { u as u11 } from "./use-Bp8UVw4Y.js";
|
|
45
45
|
import { u as u12 } from "./use-DT0XgvJT.js";
|
|
46
46
|
import { h as h9, e as e12, k as k8, d as d15, j as j9, f as f12, g as g11, i as i9, a as a28, b as b22, c as c19 } from "./style-Bvt_Melk.js";
|
|
47
|
-
import { b as b23, E as E2, a as a29 } from "./style-
|
|
47
|
+
import { b as b23, E as E2, a as a29 } from "./style-Dca2udON.js";
|
|
48
48
|
import { B as B4, G as G2, T as T4, W } from "./motion-CIQfrLky.js";
|
|
49
49
|
import { a as a30 } from "./style-plT9Ah7t.js";
|
|
50
50
|
import { c as c20, J, K, b as b24, a as a31, T as T5 } from "./theme.global-B46v_8eu.js";
|
|
@@ -95,7 +95,7 @@ export {
|
|
|
95
95
|
m3 as DEFAULT_PROVIDER_SONNER_BUTTON,
|
|
96
96
|
j8 as DEFAULT_PROVIDER_SONNER_DURATION,
|
|
97
97
|
k7 as DEFAULT_PROVIDER_SONNER_GENRE,
|
|
98
|
-
|
|
98
|
+
l4 as DEFAULT_PROVIDER_SONNER_MARGIN_BOTTOM,
|
|
99
99
|
h8 as DEFAULT_PROVIDER_SONNER_SCALE,
|
|
100
100
|
i8 as DEFAULT_PROVIDER_SONNER_Y,
|
|
101
101
|
D8 as DEFAULT_PROVIDER_SONNER_Z_INDEX,
|
|
@@ -103,18 +103,15 @@ export {
|
|
|
103
103
|
a17 as DEFAULT_RIPPLE_ID,
|
|
104
104
|
f8 as DEFAULT_TOOLTIP_OFFSET_FALLBACK,
|
|
105
105
|
D6 as DEFAULT_TOOLTIP_PLACEMENT_FALLBACK,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
e3 as DateDropdownDaySize,
|
|
109
|
-
f2 as DateDropdownDaySizeConstructor,
|
|
106
|
+
f2 as DateDropdownDay,
|
|
107
|
+
g as DateDropdownDayOfWeek,
|
|
110
108
|
d4 as DateDropdownDays,
|
|
111
109
|
c5 as DateDropdownList,
|
|
112
110
|
b5 as DateDropdownListParent,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
j as DateInputWrapperSize,
|
|
116
|
-
k as DateInputWrapperSizeConstructor,
|
|
111
|
+
h as DateInput,
|
|
112
|
+
j as DateInputWrapper,
|
|
117
113
|
D as DatePicker,
|
|
114
|
+
k as DatePickerVariant,
|
|
118
115
|
a8 as DateWrapper,
|
|
119
116
|
d13 as DialogContent,
|
|
120
117
|
D7 as DialogContext,
|
|
@@ -149,7 +146,6 @@ export {
|
|
|
149
146
|
ImageSupportedFormats,
|
|
150
147
|
ImageSupportedFormatsForInput,
|
|
151
148
|
I6 as Input,
|
|
152
|
-
d7 as InputIsInputEffect,
|
|
153
149
|
I8 as InputOTP,
|
|
154
150
|
a14 as InputOTPSize,
|
|
155
151
|
b10 as InputOTPSizeConstructor,
|
|
@@ -187,7 +183,7 @@ export {
|
|
|
187
183
|
k5 as ProviderAppOutletLeftAside,
|
|
188
184
|
j6 as ProviderAppOutletNav,
|
|
189
185
|
g6 as ProviderAppOutletNotification,
|
|
190
|
-
|
|
186
|
+
l3 as ProviderAppOutletRightAside,
|
|
191
187
|
d12 as ProviderAppWrapper,
|
|
192
188
|
P4 as ProviderCookie,
|
|
193
189
|
P5 as ProviderDialog,
|
|
@@ -208,7 +204,7 @@ export {
|
|
|
208
204
|
S9 as Select,
|
|
209
205
|
b14 as SelectLanguage,
|
|
210
206
|
k3 as SelectList,
|
|
211
|
-
|
|
207
|
+
l as SelectListOption,
|
|
212
208
|
f7 as SelectMapTheme,
|
|
213
209
|
c13 as SelectMonth,
|
|
214
210
|
d10 as SelectMonths,
|
|
@@ -261,14 +257,17 @@ export {
|
|
|
261
257
|
T4 as TypingEffect,
|
|
262
258
|
j5 as Typography,
|
|
263
259
|
k4 as TypographyLink,
|
|
264
|
-
|
|
260
|
+
l2 as TypographyTooltip,
|
|
265
261
|
U as UpdateMapSettings,
|
|
266
262
|
W as WordsPullUp,
|
|
267
263
|
h9 as addAlwaysOutline,
|
|
268
264
|
e12 as addColorTransition,
|
|
265
|
+
e3 as addDateDropdownDaySize,
|
|
266
|
+
i as addDateInputWrapperSize,
|
|
269
267
|
k8 as addDisabled,
|
|
270
268
|
a29 as addError,
|
|
271
269
|
d15 as addGridTransition,
|
|
270
|
+
d7 as addInputIsInputEffect,
|
|
272
271
|
a13 as addInputPlaceholder,
|
|
273
272
|
b9 as addInputPlaceholderNiceNumber,
|
|
274
273
|
j9 as addNiceNumber,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "./jsx-runtime-BrDlu8eK.js";
|
|
2
2
|
import styled, { css } from "styled-components";
|
|
3
|
-
import { g as getFontSizeStyles } from "./component
|
|
3
|
+
import { g as getFontSizeStyles } from "./component-zhkRBgS8.js";
|
|
4
4
|
import { K as KEY_SIZE_DATA } from "./theme.global-B46v_8eu.js";
|
|
5
5
|
import { W as WordsPullUp } from "./motion-CIQfrLky.js";
|
|
6
6
|
import { a as addSX } from "./style-plT9Ah7t.js";
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
addError as a,
|
|
50
50
|
ErrorMessage as b
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=style-
|
|
52
|
+
//# sourceMappingURL=style-Dca2udON.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-
|
|
1
|
+
{"version":3,"file":"style-Dca2udON.js","sources":["../src/styles/error/style.tsx"],"sourcesContent":["import { FC } from 'react'\nimport styled, { css } from 'styled-components'\n\nimport { getFontSizeStyles } from '@local/components/typography'\nimport { IThemeSizePropertyDefault, KEY_SIZE_DATA } from '@local/theme'\n\nimport { ErrorMessageProps, ErrorMessagePropsDollar, addErrorStylesProps } from '.'\nimport { WordsPullUp } from '../motion'\nimport { addSX } from '../sx'\n\nconst ErrorMessageSize = css<ErrorMessagePropsDollar>`\n ${props =>\n props.$size\n ? ErrorMessageSizeConstructor({ ...KEY_SIZE_DATA[props.$size], $isErrorAbsolute: props.$isErrorAbsolute })\n : null};\n`\nconst ErrorMessageSizeConstructor = (\n props: IThemeSizePropertyDefault & { $isErrorAbsolute: ErrorMessageProps['isErrorAbsolute'] }\n) => css`\n ${props.$isErrorAbsolute\n ? css`\n position: absolute;\n top: calc(100% + 4px);\n padding-left: ${props.padding}px;\n color: ${props => props.theme.states.danger};\n `\n : css`\n position: static;\n padding: 0px ${props.padding}px;\n color: ${props => props.theme.states.danger};\n `}\n`\n\nexport const ErrorMessageComponent = styled.div<ErrorMessagePropsDollar>`\n ${props => getFontSizeStyles(12, 400, props.theme.font.family)};\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n ${ErrorMessageSize}\n ${addSX}\n`\nexport const addError = css<addErrorStylesProps>`\n ${props =>\n props.$error?.isError &&\n css`\n border-color: ${props => props.theme.states.danger};\n &:focus,\n &:active,\n &:hover,\n &:focus-visible {\n border-color: ${props => props.theme.states.danger};\n }\n `};\n`\nexport const ErrorMessage: FC<ErrorMessageProps> = props => {\n return (\n <>\n {props.errorMessage && props.isError ? (\n <ErrorMessageComponent $size={props.size} $sx={props.sx} $isErrorAbsolute={props.isErrorAbsolute}>\n <WordsPullUp text={props.errorMessage} />\n </ErrorMessageComponent>\n ) : null}\n </>\n )\n}\n"],"names":["props","jsx","Fragment"],"mappings":";;;;;;AAUA,MAAM,mBAAmB;AAAA,IACrB,CAAA,UACA,MAAM,QACF,4BAA4B,EAAE,GAAG,cAAc,MAAM,KAAK,GAAG,kBAAkB,MAAM,iBAAA,CAAkB,IACvG,IAAI;AAAA;AAEZ,MAAM,8BAA8B,CAClC,UACG;AAAA,IACD,MAAM,mBACJ;AAAA;AAAA;AAAA,wBAGkB,MAAM,OAAO;AAAA,iBACpB,CAAAA,WAASA,OAAM,MAAM,OAAO,MAAM;AAAA,UAE7C;AAAA;AAAA,uBAEiB,MAAM,OAAO;AAAA,iBACnB,CAAAA,WAASA,OAAM,MAAM,OAAO,MAAM;AAAA,OAC5C;AAAA;AAGA,MAAM,wBAAwB,OAAO;AAAA,IACxC,CAAA,UAAS,kBAAkB,IAAI,KAAK,MAAM,MAAM,KAAK,MAAM,CAAC;AAAA;AAAA;AAAA;AAAA,IAI5D,gBAAgB;AAAA,IAChB,KAAK;AAAA;AAEF,MAAM,WAAW;AAAA,IACpB,CAAA,UAAA;;AACA,sBAAM,WAAN,mBAAc,YACd;AAAA,sBACkB,CAAAA,WAASA,OAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,wBAKhC,CAAAA,WAASA,OAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,CAErD;AAAA;AAEE,MAAM,eAAsC,CAAA,UAAS;AAC1D,SACEC,kCAAAA,IAAAC,kBAAAA,UAAA,EACG,gBAAM,gBAAgB,MAAM,UAC3BD,kCAAAA,IAAC,uBAAA,EAAsB,OAAO,MAAM,MAAM,KAAK,MAAM,IAAI,kBAAkB,MAAM,iBAC/E,UAAAA,kCAAAA,IAAC,aAAA,EAAY,MAAM,MAAM,aAAA,CAAc,EAAA,CACzC,IACE,KAAA,CACN;AAEJ;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),r=require("styled-components"),s=require("./component-
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),r=require("styled-components"),s=require("./component-BfsH0boq.cjs"),o=require("./theme.global-BdZkriPJ.cjs"),t=require("./motion-DgB7M2Hn.cjs"),i=require("./style-fRZ6xrVp.cjs"),l=r.css`
|
|
2
2
|
${e=>e.$size?n({...o.KEY_SIZE_DATA[e.$size],$isErrorAbsolute:e.$isErrorAbsolute}):null};
|
|
3
3
|
`,n=e=>r.css`
|
|
4
4
|
${e.$isErrorAbsolute?r.css`
|
|
@@ -29,4 +29,4 @@
|
|
|
29
29
|
}
|
|
30
30
|
`}};
|
|
31
31
|
`;exports.ErrorMessage=r=>e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:r.errorMessage&&r.isError?e.jsxRuntimeExports.jsx(a,{$size:r.size,$sx:r.sx,$isErrorAbsolute:r.isErrorAbsolute,children:e.jsxRuntimeExports.jsx(t.WordsPullUp,{text:r.errorMessage})}):null}),exports.ErrorMessageComponent=a,exports.addError=c;
|
|
32
|
-
//# sourceMappingURL=style-
|
|
32
|
+
//# sourceMappingURL=style-DmwoOdFB.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style-
|
|
1
|
+
{"version":3,"file":"style-DmwoOdFB.cjs","sources":["../src/styles/error/style.tsx"],"sourcesContent":["import { FC } from 'react'\nimport styled, { css } from 'styled-components'\n\nimport { getFontSizeStyles } from '@local/components/typography'\nimport { IThemeSizePropertyDefault, KEY_SIZE_DATA } from '@local/theme'\n\nimport { ErrorMessageProps, ErrorMessagePropsDollar, addErrorStylesProps } from '.'\nimport { WordsPullUp } from '../motion'\nimport { addSX } from '../sx'\n\nconst ErrorMessageSize = css<ErrorMessagePropsDollar>`\n ${props =>\n props.$size\n ? ErrorMessageSizeConstructor({ ...KEY_SIZE_DATA[props.$size], $isErrorAbsolute: props.$isErrorAbsolute })\n : null};\n`\nconst ErrorMessageSizeConstructor = (\n props: IThemeSizePropertyDefault & { $isErrorAbsolute: ErrorMessageProps['isErrorAbsolute'] }\n) => css`\n ${props.$isErrorAbsolute\n ? css`\n position: absolute;\n top: calc(100% + 4px);\n padding-left: ${props.padding}px;\n color: ${props => props.theme.states.danger};\n `\n : css`\n position: static;\n padding: 0px ${props.padding}px;\n color: ${props => props.theme.states.danger};\n `}\n`\n\nexport const ErrorMessageComponent = styled.div<ErrorMessagePropsDollar>`\n ${props => getFontSizeStyles(12, 400, props.theme.font.family)};\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n ${ErrorMessageSize}\n ${addSX}\n`\nexport const addError = css<addErrorStylesProps>`\n ${props =>\n props.$error?.isError &&\n css`\n border-color: ${props => props.theme.states.danger};\n &:focus,\n &:active,\n &:hover,\n &:focus-visible {\n border-color: ${props => props.theme.states.danger};\n }\n `};\n`\nexport const ErrorMessage: FC<ErrorMessageProps> = props => {\n return (\n <>\n {props.errorMessage && props.isError ? (\n <ErrorMessageComponent $size={props.size} $sx={props.sx} $isErrorAbsolute={props.isErrorAbsolute}>\n <WordsPullUp text={props.errorMessage} />\n </ErrorMessageComponent>\n ) : null}\n </>\n )\n}\n"],"names":["ErrorMessageSize","css","props","$size","ErrorMessageSizeConstructor","KEY_SIZE_DATA","$isErrorAbsolute","padding","theme","states","danger","ErrorMessageComponent","styled","div","getFontSizeStyles","font","family","addSX","addError","_a","$error","isError","jsx","Fragment","children","errorMessage","size","$sx","sx","isErrorAbsolute","WordsPullUp","text"],"mappings":"8OAUMA,EAAmBC,EAAAA,GAAAA;IACrBC,GACAA,EAAMC,MACFC,EAA4B,IAAKC,EAAAA,cAAcH,EAAMC,OAAQG,iBAAkBJ,EAAMI,mBACrF;EAEFF,EACJF,GACGD,EAAAA,GAAAA;IACDC,EAAMI,iBACJL,EAAAA,GAAAA;;;wBAGkBC,EAAMK;iBACbL,GAASA,EAAMM,MAAMC,OAAOC;QAEvCT,EAAAA,GAAAA;;uBAEiBC,EAAMK;iBACZL,GAASA,EAAMM,MAAMC,OAAOC;;EAIhCC,EAAwBC,EAAOC,GAAA;IACxCX,GAASY,EAAAA,kBAAkB,GAAI,IAAKZ,EAAMM,MAAMO,KAAKC;;;;IAIrDhB;IACAiB,EAAAA;EAESC,EAAWjB,EAAAA,GAAAA;IACpBC,UACA,OAAA,OAAAiB,EAAAjB,EAAMkB,aAAN,EAAAD,EAAcE,UACdpB,EAAAA,GAAAA;sBACkBC,GAASA,EAAMM,MAAMC,OAAOC;;;;;wBAK1BR,GAASA,EAAMM,MAAMC,OAAOC;;;uBAIDR,KAE/CoB,kBAAAA,IAAAC,EAAAA,kBAAAA,SAAA,CACGC,WAAMC,cAAgBvB,EAAMmB,QAC3BC,EAAAA,kBAAAA,IAACX,EAAA,CAAsBR,MAAOD,EAAMwB,KAAMC,IAAKzB,EAAM0B,GAAItB,iBAAkBJ,EAAM2B,gBAC/EL,SAAAF,EAAAA,kBAAAA,IAACQ,EAAAA,YAAA,CAAYC,KAAM7B,EAAMuB,iBAEzB"}
|
package/build/style-error.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./style-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./style-DmwoOdFB.cjs");exports.ErrorMessage=r.ErrorMessage,exports.ErrorMessageComponent=r.ErrorMessageComponent,exports.addError=r.addError;
|
|
2
2
|
//# sourceMappingURL=style-error.cjs.js.map
|
package/build/style-error.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("react"),o=require("styled-components"),n=require("./area-E4w7aKuZ.cjs"),i=require("./component-
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BcGej2Kr.cjs"),t=require("react"),o=require("styled-components"),n=require("./area-E4w7aKuZ.cjs"),i=require("./component-Dw21Chky.cjs"),r=require("./component.constants-DD964QJh.cjs"),a=require("./component-BV_7tGiu.cjs"),s=require("./consts.cjs.js"),c=require("./context.constants-BJPyze-d.cjs"),p=require("./theme.global-BdZkriPJ.cjs");function u(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const o in e)if("default"!==o){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}return t.default=e,Object.freeze(t)}const d=u(t);function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)};var m=function(){return m=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},m.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var g,v,f,w,x,C,y,S,b,R,z,D,E,P,M,j=!1;function A(){if(!j){j=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),o=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(D=/\b(iPhone|iP[ao]d)/.exec(e),E=/\b(iP[ao]d)/.exec(e),R=/Android/i.exec(e),P=/FBAN\/\w+;/i.exec(e),M=/Mobile/i.exec(e),z=!!/Win64/.exec(e),t){(g=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN)&&document&&document.documentMode&&(g=document.documentMode);var n=/(?:Trident\/(\d+.\d+))/.exec(e);C=n?parseFloat(n[1])+4:g,v=t[2]?parseFloat(t[2]):NaN,f=t[3]?parseFloat(t[3]):NaN,(w=t[4]?parseFloat(t[4]):NaN)?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),x=t&&t[1]?parseFloat(t[1]):NaN):x=NaN}else g=v=f=x=w=NaN;if(o){if(o[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);y=!i||parseFloat(i[1].replace("_","."))}else y=!1;S=!!o[2],b=!!o[3]}else y=S=b=!1}}var O,T={ie:function(){return A()||g},ieCompatibilityMode:function(){return A()||C>g},ie64:function(){return T.ie()&&z},firefox:function(){return A()||v},opera:function(){return A()||f},webkit:function(){return A()||w},safari:function(){return T.webkit()},chrome:function(){return A()||x},windows:function(){return A()||S},osx:function(){return A()||y},linux:function(){return A()||b},iphone:function(){return A()||D},mobile:function(){return A()||D||E||R||M},nativeApp:function(){return A()||P},android:function(){return A()||R},ipad:function(){return A()||E}},W=T,_={canUseDOM:!("undefined"==typeof window||!window.document||!window.document.createElement)};_.canUseDOM&&(O=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""))
|
|
2
2
|
/**
|
|
3
3
|
* Checks if an event is supported in the current execution environment.
|
|
4
4
|
*
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
* @internal
|
|
14
14
|
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
|
15
15
|
*/;var L=W,N=function(e,t){if(!_.canUseDOM||t&&!("addEventListener"in document))return!1;var o="on"+e,n=o in document;if(!n){var i=document.createElement("div");i.setAttribute(o,"return;"),n="function"==typeof i[o]}return!n&&O&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n};function I(e){var t=0,o=0,n=0,i=0;return"detail"in e&&(o=e.detail),"wheelDelta"in e&&(o=-e.wheelDelta/120),"wheelDeltaY"in e&&(o=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=o,o=0),n=10*t,i=10*o,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||i)&&e.deltaMode&&(1==e.deltaMode?(n*=40,i*=40):(n*=800,i*=800)),n&&!t&&(t=n<1?-1:1),i&&!o&&(o=i<1?-1:1),{spinX:t,spinY:o,pixelX:n,pixelY:i}}I.getEventType=function(){return L.firefox()?"DOMMouseScroll":N("wheel")?"wheel":"mousewheel"};const F=l(I);function k(e,t,o,n,i){void 0===i&&(i=0);var r=X(t.width,t.height,i),a=r.width,s=r.height;return{x:Z(e.x,a,o.width,n),y:Z(e.y,s,o.height,n)}}function Z(e,t,o,n){var i=t*n/2-o/2;return V(e,-i,i)}function H(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function U(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function q(e,t){return Math.min(e,Math.max(0,t))}function B(e,t){return t}function G(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function X(e,t,o){var n=o*Math.PI/180;return{width:Math.abs(Math.cos(n)*e)+Math.abs(Math.sin(n)*t),height:Math.abs(Math.sin(n)*e)+Math.abs(Math.cos(n)*t)}}function V(e,t,o){return Math.min(Math.max(e,t),o)}function Y(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter(function(e){return"string"==typeof e&&e.length>0}).join(" ").trim()}var K=function(e){function t(){var o=null!==e&&e.apply(this,arguments)||this;return o.cropperRef=d.createRef(),o.imageRef=d.createRef(),o.videoRef=d.createRef(),o.containerPosition={x:0,y:0},o.containerRef=null,o.styleRef=null,o.containerRect=null,o.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},o.dragStartPosition={x:0,y:0},o.dragStartCrop={x:0,y:0},o.gestureZoomStart=0,o.gestureRotationStart=0,o.isTouching=!1,o.lastPinchDistance=0,o.lastPinchRotation=0,o.rafDragTimeout=null,o.rafPinchTimeout=null,o.wheelTimer=null,o.currentDoc="undefined"!=typeof document?document:null,o.currentWindow="undefined"!=typeof window?window:null,o.resizeObserver=null,o.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},o.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&o.containerRef){var e=!0;o.resizeObserver=new window.ResizeObserver(function(t){e?e=!1:o.computeSizes()}),o.resizeObserver.observe(o.containerRef)}},o.preventZoomSafari=function(e){return e.preventDefault()},o.cleanEvents=function(){o.currentDoc&&(o.currentDoc.removeEventListener("mousemove",o.onMouseMove),o.currentDoc.removeEventListener("mouseup",o.onDragStopped),o.currentDoc.removeEventListener("touchmove",o.onTouchMove),o.currentDoc.removeEventListener("touchend",o.onDragStopped),o.currentDoc.removeEventListener("gesturechange",o.onGestureChange),o.currentDoc.removeEventListener("gestureend",o.onGestureEnd),o.currentDoc.removeEventListener("scroll",o.onScroll))},o.clearScrollEvent=function(){o.containerRef&&o.containerRef.removeEventListener("wheel",o.onWheel),o.wheelTimer&&clearTimeout(o.wheelTimer)},o.onMediaLoad=function(){var e=o.computeSizes();e&&(o.emitCropData(),o.setInitialCrop(e)),o.props.onMediaLoaded&&o.props.onMediaLoaded(o.mediaSize)},o.setInitialCrop=function(e){if(o.props.initialCroppedAreaPercentages){var t=function(e,t,o,n,i,r){var a=X(t.width,t.height,o),s=V(n.width/a.width*(100/e.width),i,r);return{crop:{x:s*a.width/2-n.width/2-a.width*s*(e.x/100),y:s*a.height/2-n.height/2-a.height*s*(e.y/100)},zoom:s}}(o.props.initialCroppedAreaPercentages,o.mediaSize,o.props.rotation,e,o.props.minZoom,o.props.maxZoom),n=t.crop,i=t.zoom;o.props.onCropChange(n),o.props.onZoomChange&&o.props.onZoomChange(i)}else if(o.props.initialCroppedAreaPixels){var r=function(e,t,o,n,i,r){void 0===o&&(o=0);var a=X(t.naturalWidth,t.naturalHeight,o),s=V(function(e,t,o){var n=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return o.height>o.width?o.height/(e.height*n):o.width/(e.width*n)}(e,t,n),i,r),c=n.height>n.width?n.height/e.height:n.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*c,y:((a.height-e.height)/2-e.y)*c},zoom:s}}(o.props.initialCroppedAreaPixels,o.mediaSize,o.props.rotation,e,o.props.minZoom,o.props.maxZoom);n=r.crop,i=r.zoom;o.props.onCropChange(n),o.props.onZoomChange&&o.props.onZoomChange(i)}},o.computeSizes=function(){var e,t,n,i,r,a,s=o.imageRef.current||o.videoRef.current;if(s&&o.containerRef){o.containerRect=o.containerRef.getBoundingClientRect(),o.saveContainerPosition();var c=o.containerRect.width/o.containerRect.height,p=(null===(e=o.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=o.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(n=o.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(i=o.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,d=p/u,l=void 0;if(s.offsetWidth<p||s.offsetHeight<u)switch(o.state.mediaObjectFit){default:case"contain":l=c>d?{width:o.containerRect.height*d,height:o.containerRect.height}:{width:o.containerRect.width,height:o.containerRect.width/d};break;case"horizontal-cover":l={width:o.containerRect.width,height:o.containerRect.width/d};break;case"vertical-cover":l={width:o.containerRect.height*d,height:o.containerRect.height}}else l={width:s.offsetWidth,height:s.offsetHeight};o.mediaSize=m(m({},l),{naturalWidth:p,naturalHeight:u}),o.props.setMediaSize&&o.props.setMediaSize(o.mediaSize);var h=o.props.cropSize?o.props.cropSize:function(e,t,o,n,i,r){void 0===r&&(r=0);var a=X(e,t,r),s=a.width,c=a.height,p=Math.min(s,o),u=Math.min(c,n);return p>u*i?{width:u*i,height:u}:{width:p,height:p/i}}(o.mediaSize.width,o.mediaSize.height,o.containerRect.width,o.containerRect.height,o.props.aspect,o.props.rotation);return(null===(r=o.state.cropSize)||void 0===r?void 0:r.height)===h.height&&(null===(a=o.state.cropSize)||void 0===a?void 0:a.width)===h.width||o.props.onCropSizeChange&&o.props.onCropSizeChange(h),o.setState({cropSize:h},o.recomputeCropPosition),o.props.setCropSize&&o.props.setCropSize(h),h}},o.saveContainerPosition=function(){if(o.containerRef){var e=o.containerRef.getBoundingClientRect();o.containerPosition={x:e.left,y:e.top}}},o.onMouseDown=function(e){o.currentDoc&&(e.preventDefault(),o.currentDoc.addEventListener("mousemove",o.onMouseMove),o.currentDoc.addEventListener("mouseup",o.onDragStopped),o.saveContainerPosition(),o.onDragStart(t.getMousePoint(e)))},o.onMouseMove=function(e){return o.onDrag(t.getMousePoint(e))},o.onScroll=function(e){o.currentDoc&&(e.preventDefault(),o.saveContainerPosition())},o.onTouchStart=function(e){o.currentDoc&&(o.isTouching=!0,o.props.onTouchRequest&&!o.props.onTouchRequest(e)||(o.currentDoc.addEventListener("touchmove",o.onTouchMove,{passive:!1}),o.currentDoc.addEventListener("touchend",o.onDragStopped),o.saveContainerPosition(),2===e.touches.length?o.onPinchStart(e):1===e.touches.length&&o.onDragStart(t.getTouchPoint(e.touches[0]))))},o.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?o.onPinchMove(e):1===e.touches.length&&o.onDrag(t.getTouchPoint(e.touches[0]))},o.onGestureStart=function(e){o.currentDoc&&(e.preventDefault(),o.currentDoc.addEventListener("gesturechange",o.onGestureChange),o.currentDoc.addEventListener("gestureend",o.onGestureEnd),o.gestureZoomStart=o.props.zoom,o.gestureRotationStart=o.props.rotation)},o.onGestureChange=function(e){if(e.preventDefault(),!o.isTouching){var n=t.getMousePoint(e),i=o.gestureZoomStart-1+e.scale;if(o.setNewZoom(i,n,{shouldUpdatePosition:!0}),o.props.onRotationChange){var r=o.gestureRotationStart+e.rotation;o.props.onRotationChange(r)}}},o.onGestureEnd=function(e){o.cleanEvents()},o.onDragStart=function(e){var t,n,i=e.x,r=e.y;o.dragStartPosition={x:i,y:r},o.dragStartCrop=m({},o.props.crop),null===(n=(t=o.props).onInteractionStart)||void 0===n||n.call(t)},o.onDrag=function(e){var t=e.x,n=e.y;o.currentWindow&&(o.rafDragTimeout&&o.currentWindow.cancelAnimationFrame(o.rafDragTimeout),o.rafDragTimeout=o.currentWindow.requestAnimationFrame(function(){if(o.state.cropSize&&void 0!==t&&void 0!==n){var e=t-o.dragStartPosition.x,i=n-o.dragStartPosition.y,r={x:o.dragStartCrop.x+e,y:o.dragStartCrop.y+i},a=o.props.restrictPosition?k(r,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):r;o.props.onCropChange(a)}}))},o.onDragStopped=function(){var e,t;o.isTouching=!1,o.cleanEvents(),o.emitCropData(),null===(t=(e=o.props).onInteractionEnd)||void 0===t||t.call(e)},o.onWheel=function(e){if(o.currentWindow&&(!o.props.onWheelRequest||o.props.onWheelRequest(e))){e.preventDefault();var n=t.getMousePoint(e),i=F(e).pixelY,r=o.props.zoom-i*o.props.zoomSpeed/200;o.setNewZoom(r,n,{shouldUpdatePosition:!0}),o.state.hasWheelJustStarted||o.setState({hasWheelJustStarted:!0},function(){var e,t;return null===(t=(e=o.props).onInteractionStart)||void 0===t?void 0:t.call(e)}),o.wheelTimer&&clearTimeout(o.wheelTimer),o.wheelTimer=o.currentWindow.setTimeout(function(){return o.setState({hasWheelJustStarted:!1},function(){var e,t;return null===(t=(e=o.props).onInteractionEnd)||void 0===t?void 0:t.call(e)})},250)}},o.getPointOnContainer=function(e,t){var n=e.x,i=e.y;if(!o.containerRect)throw new Error("The Cropper is not mounted");return{x:o.containerRect.width/2-(n-t.x),y:o.containerRect.height/2-(i-t.y)}},o.getPointOnMedia=function(e){var t=e.x,n=e.y,i=o.props,r=i.crop,a=i.zoom;return{x:(t+r.x)/a,y:(n+r.y)/a}},o.setNewZoom=function(e,t,n){var i=(void 0===n?{}:n).shouldUpdatePosition,r=void 0===i||i;if(o.state.cropSize&&o.props.onZoomChange){var a=V(e,o.props.minZoom,o.props.maxZoom);if(r){var s=o.getPointOnContainer(t,o.containerPosition),c=o.getPointOnMedia(s),p={x:c.x*a-s.x,y:c.y*a-s.y},u=o.props.restrictPosition?k(p,o.mediaSize,o.state.cropSize,a,o.props.rotation):p;o.props.onCropChange(u)}o.props.onZoomChange(a)}},o.getCropData=function(){return o.state.cropSize?function(e,t,o,n,i,r,a){void 0===r&&(r=0),void 0===a&&(a=!0);var s=a?q:B,c=X(t.width,t.height,r),p=X(t.naturalWidth,t.naturalHeight,r),u={x:s(100,((c.width-o.width/i)/2-e.x/i)/c.width*100),y:s(100,((c.height-o.height/i)/2-e.y/i)/c.height*100),width:s(100,o.width/c.width*100/i),height:s(100,o.height/c.height*100/i)},d=Math.round(s(p.width,u.width*p.width/100)),l=Math.round(s(p.height,u.height*p.height/100)),h=p.width>=p.height*n?{width:Math.round(l*n),height:l}:{width:d,height:Math.round(d/n)};return{croppedAreaPercentages:u,croppedAreaPixels:m(m({},h),{x:Math.round(s(p.width-h.width,u.x*p.width/100)),y:Math.round(s(p.height-h.height,u.y*p.height/100))})}}(o.props.restrictPosition?k(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop,o.mediaSize,o.state.cropSize,o.getAspect(),o.props.zoom,o.props.rotation,o.props.restrictPosition):null},o.emitCropData=function(){var e=o.getCropData();if(e){var t=e.croppedAreaPercentages,n=e.croppedAreaPixels;o.props.onCropComplete&&o.props.onCropComplete(t,n),o.props.onCropAreaChange&&o.props.onCropAreaChange(t,n)}},o.emitCropAreaChange=function(){var e=o.getCropData();if(e){var t=e.croppedAreaPercentages,n=e.croppedAreaPixels;o.props.onCropAreaChange&&o.props.onCropAreaChange(t,n)}},o.recomputeCropPosition=function(){if(o.state.cropSize){var e=o.props.restrictPosition?k(o.props.crop,o.mediaSize,o.state.cropSize,o.props.zoom,o.props.rotation):o.props.crop;o.props.onCropChange(e),o.emitCropData()}},o.onKeyDown=function(e){var t,n,i=o.props,r=i.crop,a=i.onCropChange,s=i.keyboardStep,c=i.zoom,p=i.rotation,u=s;if(o.state.cropSize){e.shiftKey&&(u*=.2);var d=m({},r);switch(e.key){case"ArrowUp":d.y-=u,e.preventDefault();break;case"ArrowDown":d.y+=u,e.preventDefault();break;case"ArrowLeft":d.x-=u,e.preventDefault();break;case"ArrowRight":d.x+=u,e.preventDefault();break;default:return}o.props.restrictPosition&&(d=k(d,o.mediaSize,o.state.cropSize,c,p)),e.repeat||null===(n=(t=o.props).onInteractionStart)||void 0===n||n.call(t),a(d)}},o.onKeyUp=function(e){var t,n;switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":e.preventDefault();break;default:return}o.emitCropData(),null===(n=(t=o.props).onInteractionEnd)||void 0===n||n.call(t)},o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,o,n,i,r,a,s,c,p;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.height)||(null===(n=e.cropSize)||void 0===n?void 0:n.width)!==(null===(i=this.props.cropSize)||void 0===i?void 0:i.width)?this.computeSizes():(null===(r=e.crop)||void 0===r?void 0:r.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(c=this.props.crop)||void 0===c?void 0:c.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(p=this.videoRef.current)||void 0===p||p.load());var u=this.getObjectFit();u!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:u},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,o=e.aspect;return t?t.width/t.height:o},t.prototype.getObjectFit=function(){var e,t,o,n;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var i=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(o=this.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(n=this.videoRef.current)||void 0===n?void 0:n.videoHeight)||0)<i?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var o=t.getTouchPoint(e.touches[0]),n=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=H(o,n),this.lastPinchRotation=U(o,n),this.onDragStart(G(o,n))},t.prototype.onPinchMove=function(e){var o=this;if(this.currentDoc&&this.currentWindow){var n=t.getTouchPoint(e.touches[0]),i=t.getTouchPoint(e.touches[1]),r=G(n,i);this.onDrag(r),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame(function(){var e=H(n,i),t=o.props.zoom*(e/o.lastPinchDistance);o.setNewZoom(t,r,{shouldUpdatePosition:!1}),o.lastPinchDistance=e;var a=U(n,i),s=o.props.rotation+(a-o.lastPinchRotation);o.props.onRotationChange&&o.props.onRotationChange(s),o.lastPinchRotation=a})}},t.prototype.render=function(){var e,t=this,o=this.props,n=o.image,i=o.video,r=o.mediaProps,a=o.cropperProps,s=o.transform,c=o.crop,p=c.x,u=c.y,l=o.rotation,h=o.zoom,g=o.cropShape,v=o.showGrid,f=o.style,w=f.containerStyle,x=f.cropAreaStyle,C=f.mediaStyle,y=o.classes,S=y.containerClassName,b=y.cropAreaClassName,R=y.mediaClassName,z=null!==(e=this.state.mediaObjectFit)&&void 0!==e?e:this.getObjectFit();return d.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef=e},"data-testid":"container",style:w,className:Y("reactEasyCrop_Container",S)},n?d.createElement("img",m({alt:"",className:Y("reactEasyCrop_Image","contain"===z&&"reactEasyCrop_Contain","horizontal-cover"===z&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===z&&"reactEasyCrop_Cover_Vertical",R)},r,{src:n,ref:this.imageRef,style:m(m({},C),{transform:s||"translate(".concat(p,"px, ").concat(u,"px) rotate(").concat(l,"deg) scale(").concat(h,")")}),onLoad:this.onMediaLoad})):i&&d.createElement("video",m({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:Y("reactEasyCrop_Video","contain"===z&&"reactEasyCrop_Contain","horizontal-cover"===z&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===z&&"reactEasyCrop_Cover_Vertical",R)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:m(m({},C),{transform:s||"translate(".concat(p,"px, ").concat(u,"px) rotate(").concat(l,"deg) scale(").concat(h,")")}),controls:!1}),(Array.isArray(i)?i:[{src:i}]).map(function(e){return d.createElement("source",m({key:e.src},e))})),this.state.cropSize&&d.createElement("div",m({ref:this.cropperRef,style:m(m({},x),{width:this.state.cropSize.width,height:this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:Y("reactEasyCrop_CropArea","round"===g&&"reactEasyCrop_CropAreaRound",v&&"reactEasyCrop_CropAreaGrid",b)},a)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(d.Component);const J=c=>{var p,u,d,l,h,m,g,v,f,w;const[x,C]=t.useState(0),[y,S]=t.useState([]),[b,R]=t.useState([]),z=o.useTheme(),D=t.useMemo(()=>c.images.length>1,[c.images.length]),E=t.useMemo(()=>null==y?void 0:y[x],[y,x]),P=t.useCallback(async e=>{var t,o,n;const i=await Promise.all(e.map(async e=>{const t=b[e.index]??null;if(e.isDeleted||!e.isCropped||!e.url||!e.name||!t)return null;const o=await function(e,t,o="image/png"){const n=s.ImageSupportedFormats.includes(o)?o:"image/png";return new Promise((o,i)=>{const r=new Image;r.src=e,r.crossOrigin="anonymous",r.onload=()=>{const e=document.createElement("canvas"),a=e.getContext("2d");e.width=t.width,e.height=t.height,a.drawImage(r,t.x,t.y,t.width,t.height,0,0,t.width,t.height),e.toBlob(e=>{e?o(e):i(new Error("Canvas is empty"))},n)},r.onerror=()=>i(new Error("Failed to load image"))})}(e.url,t,e.format),n=new File([o],e.name,{type:e.format});return{...e,file:n,url:URL.createObjectURL(n)}}));null==(o=null==(t=c.params)?void 0:t.onSave)||o.call(t,i.filter(Boolean)),null==(n=c.remove)||n.call(c)},[b,c]),M=t.useCallback(async e=>{var t;const o=null==(t=c.images)?void 0:t[e.index];if(o){const t={...o,id:Date.now()+e.index,index:e.index,croppedArea:e.croppedArea??o.croppedArea,zoom:e.zoom??o.zoom,crop:e.crop??o.crop,isNew:!0,isCropped:e.isCropped??o.isCropped,isDeleted:e.isDeleted??o.isDeleted};if(S(o=>{const n=[...o];return n[e.index]=t,n}),e.isNext){const t=e.index+1>=c.images.length?0:e.index+1;C(t)}e.isSave&&P([t])}},[P,c.images]);t.useEffect(()=>{S(c.images),R(c.images.map(e=>e.croppedArea??null))},[c.images]),t.useEffect(()=>()=>{C(0),S([]),R([])},[]);const j=t.useMemo(()=>y.reduce((e,t)=>(e&&void 0!==(null==t?void 0:t.index)&&(e[t.index]={genre:t.isDeleted?"redTransparent":t.isCropped?"greenTransparent":"white",icons:t.isDeleted?[{type:"id",name:"CloseMini"}]:t.isCropped?[{type:"id",name:"TickMini"}]:[]}),e),{}),[y]),A=t.useMemo(()=>y.every(e=>(null==e?void 0:e.isDeleted)||!(null==e?void 0:e.isCropped)),[y]),O=t.useMemo(()=>{var e;return(null==(e=c.params)?void 0:e.dialog.button.genre)||"product"},[null==(p=c.params)?void 0:p.dialog.button.genre]),T=t.useMemo(()=>{var e;return(null==(e=c.params)?void 0:e.dialog.button.size)||"medium"},[null==(u=c.params)?void 0:u.dialog.button.size]),W=t.useMemo(()=>{var e;return(null==(e=c.params)?void 0:e.dialog.buttonDelete.genre)||"product"},[null==(d=c.params)?void 0:d.dialog.buttonDelete.genre]),_=t.useMemo(()=>{var e;return(null==(e=c.params)?void 0:e.dialog.button.size)||"medium"},[null==(l=c.params)?void 0:l.dialog.button.size]);return e.jsxRuntimeExports.jsxs(a.Stack,{sx:e=>{var t,o,n;return{default:{position:"relative",overflow:"hidden",aspectRatio:(null==(t=c.params)?void 0:t.imageSettings.aspect)?2*(null==(o=c.params)?void 0:o.imageSettings.aspect)+" / 2":void 0,width:"auto",maxWidth:"70dvw",height:"85dvh",borderRadius:null==(n=c.params)?void 0:n.br,backgroundColor:e.palette.whiteStandard},tablet:{maxWidth:"95dvw"}}},children:[e.jsxRuntimeExports.jsxs(n.Preview,{visible:!c.isAnimating,minTime:500,children:[e.jsxRuntimeExports.jsx(a.Stack,{sx:{default:{position:"absolute",top:0,left:0,right:0,bottom:0}},children:E&&e.jsxRuntimeExports.jsx(K,{style:{containerStyle:{backgroundColor:z.palette.black80}},image:E.url,crop:(null==E?void 0:E.crop)??{x:0,y:0},zoom:(null==E?void 0:E.zoom)??1,aspect:null==(h=c.params)?void 0:h.imageSettings.aspect,onCropChange:e=>{M({...E,crop:e})},onZoomChange:e=>{M({...E,zoom:e})},onCropComplete:(e,t)=>{R(e=>{const o=[...e];return o[x]=t,o})}})}),e.jsxRuntimeExports.jsxs(a.Stack,{sx:{default:{position:"absolute",top:15,right:15,gap:"10px"}},children:[e.jsxRuntimeExports.jsx(i.Button,{genre:W,size:_,isHiddenBorder:!0,isRadius:!0,onClick:()=>{var e;return null==(e=c.remove)?void 0:e.call(c)},children:null==(m=c.params)?void 0:m.locale.dialogCancel}),D&&e.jsxRuntimeExports.jsx(i.Button,{genre:O,size:T,isHiddenBorder:!0,isRadius:!0,onClick:()=>P(y),isHidden:A,isDisabled:A,children:null==(g=c.params)?void 0:g.locale.dialogSave})]})]}),D&&x!==c.images.length&&e.jsxRuntimeExports.jsx(i.Button,{sx:{default:{position:"absolute",top:15,left:15}},genre:O,size:T,isHiddenBorder:!0,isWidthAsHeight:!0,isRadius:!0,isDisabled:!0,children:x+1}),e.jsxRuntimeExports.jsxs(a.Stack,{sx:e=>({default:{position:"absolute",bottom:D?5:15,left:D?5:void 0,right:D?void 0:15,width:D?"calc(100% - 10px)":"fit-content",backgroundColor:D?e.palette.whiteStandard:e.palette.transparent,padding:"10px",borderRadius:"50px",flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:"10px"},mobile:{borderRadius:"24px",flexDirection:"column",alignItems:"stretch",gap:"10px"}}),children:[D&&e.jsxRuntimeExports.jsx(r.Pagination,{sx:{default:{},mobile:{justifyContent:"space-between"}},lengthData:j,length:c.images.length,index:x,changeIndex:e=>{C(e)},isInfinity:!0,viewQuantity:4,buttonControl:{genre:O,size:T,isRadius:!0,isWidthAsHeight:!0},buttonCount:{active:{genre:O,size:T,isRadius:!0,isPlaystationEffect:!0},inactive:{genre:"white",size:T,isRadius:!0}},locale:{next:"Next",prev:"Prev"}}),e.jsxRuntimeExports.jsxs(a.Stack,{sx:{default:{gap:"10px"},mobile:{justifyContent:"center"}},children:[D&&e.jsxRuntimeExports.jsx(i.Button,{genre:W,size:_,isHiddenBorder:!0,isRadius:!0,onClick:()=>{M({...E,isDeleted:!0,isNext:D})},children:null==(v=c.params)?void 0:v.locale.dialogDeleteImage}),e.jsxRuntimeExports.jsx(i.Button,{genre:O,size:T,isHiddenBorder:!0,isRadius:!0,onClick:()=>{M({...E,isDeleted:!1,isCropped:!0,isNext:D,isSave:!D})},children:D?null==(f=c.params)?void 0:f.locale.dialogAddImage:null==(w=c.params)?void 0:w.locale.dialogSave})]})]})]})};exports.useImageCrop=o=>{const n=t.useMemo(()=>p.KEY_SIZE_DATA[o.dialog.button.size],[o.dialog.button.size]),i=t.useMemo(()=>`${n.radius}px`,[n.radius]),{add:r}=c.useDialog({br:i,imageSettings:o.imageSettings,onSave:o.onSave,dialog:o.dialog,locale:o.locale,propsDialog:{borderRadius:i,padding:"0",background:"transparent"}}),a=t.useCallback(t=>{r({content:(o,n,i)=>e.jsxRuntimeExports.jsx(J,{images:t,params:o,remove:n,isAnimating:i})})},[r]),s=t.useCallback(e=>{const t=Array.from(e).filter(e=>!(e.size>o.imageSettings.maxSize)||(console.warn(`File ${e.name} exceeds the allowed size of ${o.imageSettings.maxSize} bytes`),!1)).map((e,t)=>({id:Date.now()+t,file:e,url:URL.createObjectURL(e),index:t,isNew:!0,name:e.name,format:e.type}));o.refInput&&"current"in o.refInput&&o.refInput.current&&(o.refInput.current.value=""),t.length&&a(t)},[a,o.imageSettings.maxSize,o.refInput]);return{handleAdd:a,handleAddFiles:s}};
|
|
16
|
-
//# sourceMappingURL=use-
|
|
16
|
+
//# sourceMappingURL=use-Deto6eH3.cjs.map
|